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

3889 lines
1.5 MiB

(self.webpackChunk=self.webpackChunk||[]).push([[1512],{40001:function(or,mt,Te){"use strict";Te.d(mt,{Z:function(){return h}});var we=Te(60499),st=Te(59301),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},M=o,R=Te(7657),p=function(g,w){return st.createElement(R.Z,(0,we.Z)({},g,{ref:w,icon:M}))},f=st.forwardRef(p),h=f},26227:function(or,mt,Te){"use strict";Te.d(mt,{Z:function(){return h}});var we=Te(60499),st=Te(59301),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},M=o,R=Te(7657),p=function(g,w){return st.createElement(R.Z,(0,we.Z)({},g,{ref:w,icon:M}))},f=st.forwardRef(p),h=f},41464:function(or,mt,Te){"use strict";Te.d(mt,{Z:function(){return h}});var we=Te(60499),st=Te(59301),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},M=o,R=Te(7657),p=function(g,w){return st.createElement(R.Z,(0,we.Z)({},g,{ref:w,icon:M}))},f=st.forwardRef(p),h=f},15277:function(or,mt,Te){"use strict";Te.d(mt,{Z:function(){return h}});var we=Te(60499),st=Te(59301),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},M=o,R=Te(7657),p=function(g,w){return st.createElement(R.Z,(0,we.Z)({},g,{ref:w,icon:M}))},f=st.forwardRef(p),h=f},68196:function(or,mt,Te){"use strict";Te.d(mt,{Z:function(){return ye}});var we=Te(85899),st=Te(72190),o=Te(42244),M=Te(43403),R=Te(92310),p=Te.n(R),f=Te(29301),h=Te(76846),y=Te(96452),g=Te(6089),w=Te(80402),c=Te(34280),m=Te(49658),v=Te(59301),b=Te(60499),x=Te(77900),T=Te(8654);function S(V){var G=V.prefixCls,W=V.align,K=V.arrow,te=V.arrowPos,U=K||{},L=U.className,$=U.content,ue=te.x,Ee=ue===void 0?0:ue,ze=te.y,_e=ze===void 0?0:ze,le=v.useRef();if(!W||!W.points)return null;var Re={position:"absolute"};if(W.autoArrow!==!1){var Me=W.points[0],He=W.points[1],Be=Me[0],Je=Me[1],$e=He[0],rt=He[1];Be===$e||!["t","b"].includes(Be)?Re.top=_e:Be==="t"?Re.top=0:Re.bottom=0,Je===rt||!["l","r"].includes(Je)?Re.left=Ee:Je==="l"?Re.left=0:Re.right=0}return v.createElement("div",{ref:le,className:p()("".concat(G,"-arrow"),L),style:Re},$)}function C(V){var G=V.prefixCls,W=V.open,K=V.zIndex,te=V.mask,U=V.motion;return te?v.createElement(x.default,(0,b.Z)({},U,{motionAppear:!0,visible:W,removeOnLeave:!0}),function(L){var $=L.className;return v.createElement("div",{style:{zIndex:K},className:p()("".concat(G,"-mask"),$)})}):null}var E=v.memo(function(V){var G=V.children;return G},function(V,G){return G.cache}),j=E,Z=v.forwardRef(function(V,G){var W=V.popup,K=V.className,te=V.prefixCls,U=V.style,L=V.target,$=V.onVisibleChanged,ue=V.open,Ee=V.keepDom,ze=V.fresh,_e=V.onClick,le=V.mask,Re=V.arrow,Me=V.arrowPos,He=V.align,Be=V.motion,Je=V.maskMotion,$e=V.forceRender,rt=V.getPopupContainer,qe=V.autoDestroy,pt=V.portal,Pe=V.zIndex,Qe=V.onMouseEnter,nt=V.onMouseLeave,yt=V.onPointerEnter,St=V.onPointerDownCapture,Lt=V.ready,jt=V.offsetX,Dt=V.offsetY,Ct=V.offsetR,Mt=V.offsetB,Bt=V.onAlign,Ut=V.onPrepare,Nt=V.stretch,tr=V.targetWidth,Zt=V.targetHeight,zt=typeof W=="function"?W():W,Xe=ue||Ee,Kt=(rt==null?void 0:rt.length)>0,Ft=v.useState(!rt||!Kt),kr=(0,st.Z)(Ft,2),hr=kr[0],vr=kr[1];if((0,c.Z)(function(){!hr&&Kt&&L&&vr(!0)},[hr,Kt,L]),!hr)return null;var $t="auto",Xt={left:"-1000vw",top:"-1000vh",right:$t,bottom:$t};if(Lt||!ue){var sr,Nr=He.points,Tt=He.dynamicInset||((sr=He._experimental)===null||sr===void 0?void 0:sr.dynamicInset),Mr=Tt&&Nr[0][1]==="r",Jt=Tt&&Nr[0][0]==="b";Mr?(Xt.right=Ct,Xt.left=$t):(Xt.left=jt,Xt.right=$t),Jt?(Xt.bottom=Mt,Xt.top=$t):(Xt.top=Dt,Xt.bottom=$t)}var Xr={};return Nt&&(Nt.includes("height")&&Zt?Xr.height=Zt:Nt.includes("minHeight")&&Zt&&(Xr.minHeight=Zt),Nt.includes("width")&&tr?Xr.width=tr:Nt.includes("minWidth")&&tr&&(Xr.minWidth=tr)),ue||(Xr.pointerEvents="none"),v.createElement(pt,{open:$e||Xe,getContainer:rt&&function(){return rt(L)},autoDestroy:qe},v.createElement(C,{prefixCls:te,open:ue,zIndex:Pe,mask:le,motion:Je}),v.createElement(f.Z,{onResize:Bt,disabled:!ue},function(Kr){return v.createElement(x.default,(0,b.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:$e,leavedClassName:"".concat(te,"-hidden")},Be,{onAppearPrepare:Ut,onEnterPrepare:Ut,visible:ue,onVisibleChanged:function(hn){var Yr;Be==null||(Yr=Be.onVisibleChanged)===null||Yr===void 0||Yr.call(Be,hn),$(hn)}}),function(on,hn){var Yr=on.className,$r=on.style,We=p()(te,Yr,K);return v.createElement("div",{ref:(0,T.sQ)(Kr,G,hn),className:We,style:(0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)({"--arrow-x":"".concat(Me.x||0,"px"),"--arrow-y":"".concat(Me.y||0,"px")},Xt),Xr),$r),{},{boxSizing:"border-box",zIndex:Pe},U),onMouseEnter:Qe,onMouseLeave:nt,onPointerEnter:yt,onClick:_e,onPointerDownCapture:St},Re&&v.createElement(S,{prefixCls:te,arrow:Re,arrowPos:Me,align:He}),v.createElement(j,{cache:!ue&&!ze},zt))})}))}),P=Z,Q=v.forwardRef(function(V,G){var W=V.children,K=V.getTriggerDOMNode,te=(0,T.Yr)(W),U=v.useCallback(function($){(0,T.mH)(G,K?K($):$)},[K]),L=(0,T.x1)(U,(0,T.C4)(W));return te?v.cloneElement(W,{ref:L}):W}),B=Q,k=v.createContext(null),D=k;function F(V){return V?Array.isArray(V)?V:[V]:[]}function J(V,G,W,K){return v.useMemo(function(){var te=F(W!=null?W:G),U=F(K!=null?K:G),L=new Set(te),$=new Set(U);return V&&(L.has("hover")&&(L.delete("hover"),L.add("click")),$.has("hover")&&($.delete("hover"),$.add("click"))),[L,$]},[V,G,W,K])}var H=Te(29194);function N(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],W=arguments.length>2?arguments[2]:void 0;return W?V[0]===G[0]:V[0]===G[0]&&V[1]===G[1]}function _(V,G,W,K){for(var te=W.points,U=Object.keys(V),L=0;L<U.length;L+=1){var $,ue=U[L];if(N(($=V[ue])===null||$===void 0?void 0:$.points,te,K))return"".concat(G,"-placement-").concat(ue)}return""}function X(V,G,W,K){return G||(W?{motionName:"".concat(V,"-").concat(W)}:K?{motionName:K}:null)}function ee(V){return V.ownerDocument.defaultView}function ie(V){for(var G=[],W=V==null?void 0:V.parentElement,K=["hidden","scroll","clip","auto"];W;){var te=ee(W).getComputedStyle(W),U=te.overflowX,L=te.overflowY,$=te.overflow;[U,L,$].some(function(ue){return K.includes(ue)})&&G.push(W),W=W.parentElement}return G}function he(V){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(V)?G:V}function ne(V){return he(parseFloat(V),0)}function Ie(V,G){var W=(0,we.Z)({},V);return(G||[]).forEach(function(K){if(!(K instanceof HTMLBodyElement||K instanceof HTMLHtmlElement)){var te=ee(K).getComputedStyle(K),U=te.overflow,L=te.overflowClipMargin,$=te.borderTopWidth,ue=te.borderBottomWidth,Ee=te.borderLeftWidth,ze=te.borderRightWidth,_e=K.getBoundingClientRect(),le=K.offsetHeight,Re=K.clientHeight,Me=K.offsetWidth,He=K.clientWidth,Be=ne($),Je=ne(ue),$e=ne(Ee),rt=ne(ze),qe=he(Math.round(_e.width/Me*1e3)/1e3),pt=he(Math.round(_e.height/le*1e3)/1e3),Pe=(Me-He-$e-rt)*qe,Qe=(le-Re-Be-Je)*pt,nt=Be*pt,yt=Je*pt,St=$e*qe,Lt=rt*qe,jt=0,Dt=0;if(U==="clip"){var Ct=ne(L);jt=Ct*qe,Dt=Ct*pt}var Mt=_e.x+St-jt,Bt=_e.y+nt-Dt,Ut=Mt+_e.width+2*jt-St-Lt-Pe,Nt=Bt+_e.height+2*Dt-nt-yt-Qe;W.left=Math.max(W.left,Mt),W.top=Math.max(W.top,Bt),W.right=Math.min(W.right,Ut),W.bottom=Math.min(W.bottom,Nt)}}),W}function q(V){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,W="".concat(G),K=W.match(/^(.*)\%$/);return K?V*(parseFloat(K[1])/100):parseFloat(W)}function pe(V,G){var W=G||[],K=(0,st.Z)(W,2),te=K[0],U=K[1];return[q(V.width,te),q(V.height,U)]}function ve(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[V[0],V[1]]}function xe(V,G){var W=G[0],K=G[1],te,U;return W==="t"?U=V.y:W==="b"?U=V.y+V.height:U=V.y+V.height/2,K==="l"?te=V.x:K==="r"?te=V.x+V.width:te=V.x+V.width/2,{x:te,y:U}}function ce(V,G){var W={t:"b",b:"t",l:"r",r:"l"};return V.map(function(K,te){return te===G?W[K]||"c":K}).join("")}function fe(V,G,W,K,te,U,L){var $=v.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:te[K]||{}}),ue=(0,st.Z)($,2),Ee=ue[0],ze=ue[1],_e=v.useRef(0),le=v.useMemo(function(){return G?ie(G):[]},[G]),Re=v.useRef({}),Me=function(){Re.current={}};V||Me();var He=(0,g.Z)(function(){if(G&&W&&V){let mn=function(je,ai){var Ai=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ge,ia=Xe.x+je,En=Xe.y+ai,Dn=ia+Jt,zn=En+Mr,oi=Math.max(ia,Ai.left),_t=Math.max(En,Ai.top),Ht=Math.min(Dn,Ai.right),rn=Math.min(zn,Ai.bottom);return Math.max(0,(Ht-oi)*(rn-_t))},Hi=function(){Jr=Xe.y+Br,qt=Jr+Mr,_r=Xe.x+mr,qr=_r+Jt};var $e,rt,qe,pt,Pe=G,Qe=Pe.ownerDocument,nt=ee(Pe),yt=nt.getComputedStyle(Pe),St=yt.position,Lt=Pe.style.left,jt=Pe.style.top,Dt=Pe.style.right,Ct=Pe.style.bottom,Mt=Pe.style.overflow,Bt=(0,we.Z)((0,we.Z)({},te[K]),U),Ut=Qe.createElement("div");($e=Pe.parentElement)===null||$e===void 0||$e.appendChild(Ut),Ut.style.left="".concat(Pe.offsetLeft,"px"),Ut.style.top="".concat(Pe.offsetTop,"px"),Ut.style.position=St,Ut.style.height="".concat(Pe.offsetHeight,"px"),Ut.style.width="".concat(Pe.offsetWidth,"px"),Pe.style.left="0",Pe.style.top="0",Pe.style.right="auto",Pe.style.bottom="auto",Pe.style.overflow="hidden";var Nt;if(Array.isArray(W))Nt={x:W[0],y:W[1],width:0,height:0};else{var tr,Zt,zt=W.getBoundingClientRect();zt.x=(tr=zt.x)!==null&&tr!==void 0?tr:zt.left,zt.y=(Zt=zt.y)!==null&&Zt!==void 0?Zt:zt.top,Nt={x:zt.x,y:zt.y,width:zt.width,height:zt.height}}var Xe=Pe.getBoundingClientRect(),Kt=nt.getComputedStyle(Pe),Ft=Kt.height,kr=Kt.width;Xe.x=(rt=Xe.x)!==null&&rt!==void 0?rt:Xe.left,Xe.y=(qe=Xe.y)!==null&&qe!==void 0?qe:Xe.top;var hr=Qe.documentElement,vr=hr.clientWidth,$t=hr.clientHeight,Xt=hr.scrollWidth,sr=hr.scrollHeight,Nr=hr.scrollTop,Tt=hr.scrollLeft,Mr=Xe.height,Jt=Xe.width,Xr=Nt.height,Kr=Nt.width,on={left:0,top:0,right:vr,bottom:$t},hn={left:-Tt,top:-Nr,right:Xt-Tt,bottom:sr-Nr},Yr=Bt.htmlRegion,$r="visible",We="visibleFirst";Yr!=="scroll"&&Yr!==We&&(Yr=$r);var tn=Yr===We,Zr=Ie(hn,le),yr=Ie(on,le),Ge=Yr===$r?yr:Zr,Ye=tn?yr:Ge;Pe.style.left="auto",Pe.style.top="auto",Pe.style.right="0",Pe.style.bottom="0";var ot=Pe.getBoundingClientRect();Pe.style.left=Lt,Pe.style.top=jt,Pe.style.right=Dt,Pe.style.bottom=Ct,Pe.style.overflow=Mt,(pt=Pe.parentElement)===null||pt===void 0||pt.removeChild(Ut);var ut=he(Math.round(Jt/parseFloat(kr)*1e3)/1e3),dt=he(Math.round(Mr/parseFloat(Ft)*1e3)/1e3);if(ut===0||dt===0||(0,h.Sh)(W)&&!(0,H.Z)(W))return;var ht=Bt.offset,xt=Bt.targetOffset,it=pe(Xe,ht),Wt=(0,st.Z)(it,2),Pt=Wt[0],lt=Wt[1],rr=pe(Nt,xt),er=(0,st.Z)(rr,2),dr=er[0],pr=er[1];Nt.x-=dr,Nt.y-=pr;var Er=Bt.points||[],jr=(0,st.Z)(Er,2),Wr=jr[0],Cr=jr[1],br=ve(Cr),ar=ve(Wr),Rt=xe(Nt,br),fn=xe(Xe,ar),nr=(0,we.Z)({},Bt),mr=Rt.x-fn.x+Pt,Br=Rt.y-fn.y+lt,dn=mn(mr,Br),sn=mn(mr,Br,yr),vn=xe(Nt,["t","l"]),Qn=xe(Xe,["t","l"]),Xn=xe(Nt,["b","r"]),_n=xe(Xe,["b","r"]),gn=Bt.overflow||{},un=gn.adjustX,Fn=gn.adjustY,Ln=gn.shiftX,Un=gn.shiftY,Kn=function(ai){return typeof ai=="boolean"?ai:ai>=0},Jr,qt,_r,qr;Hi();var yn=Kn(Fn),ln=ar[0]===br[0];if(yn&&ar[0]==="t"&&(qt>Ye.bottom||Re.current.bt)){var Tn=Br;ln?Tn-=Mr-Xr:Tn=vn.y-_n.y-lt;var Zn=mn(mr,Tn),Jn=mn(mr,Tn,yr);Zn>dn||Zn===dn&&(!tn||Jn>=sn)?(Re.current.bt=!0,Br=Tn,lt=-lt,nr.points=[ce(ar,0),ce(br,0)]):Re.current.bt=!1}if(yn&&ar[0]==="b"&&(Jr<Ye.top||Re.current.tb)){var Wn=Br;ln?Wn+=Mr-Xr:Wn=Xn.y-Qn.y-lt;var fi=mn(mr,Wn),wr=mn(mr,Wn,yr);fi>dn||fi===dn&&(!tn||wr>=sn)?(Re.current.tb=!0,Br=Wn,lt=-lt,nr.points=[ce(ar,0),ce(br,0)]):Re.current.tb=!1}var zr=Kn(un),Gn=ar[1]===br[1];if(zr&&ar[1]==="l"&&(qr>Ye.right||Re.current.rl)){var di=mr;Gn?di-=Jt-Kr:di=vn.x-_n.x-Pt;var ii=mn(di,Br),Ci=mn(di,Br,yr);ii>dn||ii===dn&&(!tn||Ci>=sn)?(Re.current.rl=!0,mr=di,Pt=-Pt,nr.points=[ce(ar,1),ce(br,1)]):Re.current.rl=!1}if(zr&&ar[1]==="r"&&(_r<Ye.left||Re.current.lr)){var Si=mr;Gn?Si+=Jt-Kr:Si=Xn.x-Qn.x-Pt;var Yt=mn(Si,Br),Pi=mn(Si,Br,yr);Yt>dn||Yt===dn&&(!tn||Pi>=sn)?(Re.current.lr=!0,mr=Si,Pt=-Pt,nr.points=[ce(ar,1),ce(br,1)]):Re.current.lr=!1}Hi();var ui=Ln===!0?0:Ln;typeof ui=="number"&&(_r<yr.left&&(mr-=_r-yr.left-Pt,Nt.x+Kr<yr.left+ui&&(mr+=Nt.x-yr.left+Kr-ui)),qr>yr.right&&(mr-=qr-yr.right-Pt,Nt.x>yr.right-ui&&(mr+=Nt.x-yr.right+ui)));var Ii=Un===!0?0:Un;typeof Ii=="number"&&(Jr<yr.top&&(Br-=Jr-yr.top-lt,Nt.y+Xr<yr.top+Ii&&(Br+=Nt.y-yr.top+Xr-Ii)),qt>yr.bottom&&(Br-=qt-yr.bottom-lt,Nt.y>yr.bottom-Ii&&(Br+=Nt.y-yr.bottom+Ii)));var pi=Xe.x+mr,Ti=pi+Jt,ra=Xe.y+Br,Ba=ra+Mr,ya=Nt.x,Ot=ya+Kr,bn=Nt.y,ba=bn+Xr,Na=Math.max(pi,ya),na=Math.min(Ti,Ot),lr=(Na+na)/2,Fr=lr-pi,en=Math.max(ra,bn),Sr=Math.min(Ba,ba),Gr=(en+Sr)/2,Rn=Gr-ra;L==null||L(G,nr);var jn=ot.right-Xe.x-(mr+Xe.width),hi=ot.bottom-Xe.y-(Br+Xe.height);ut===1&&(mr=Math.floor(mr),jn=Math.floor(jn)),dt===1&&(Br=Math.floor(Br),hi=Math.floor(hi));var Yn={ready:!0,offsetX:mr/ut,offsetY:Br/dt,offsetR:jn/ut,offsetB:hi/dt,arrowX:Fr/ut,arrowY:Rn/dt,scaleX:ut,scaleY:dt,align:nr};ze(Yn)}}),Be=function(){_e.current+=1;var rt=_e.current;Promise.resolve().then(function(){_e.current===rt&&He()})},Je=function(){ze(function(rt){return(0,we.Z)((0,we.Z)({},rt),{},{ready:!1})})};return(0,c.Z)(Je,[K]),(0,c.Z)(function(){V||Je()},[V]),[Ee.ready,Ee.offsetX,Ee.offsetY,Ee.offsetR,Ee.offsetB,Ee.arrowX,Ee.arrowY,Ee.scaleX,Ee.scaleY,Ee.align,Be]}var ge=Te(77654);function Se(V,G,W,K,te){(0,c.Z)(function(){if(V&&G&&W){let _e=function(){K(),te()};var U=G,L=W,$=ie(U),ue=ie(L),Ee=ee(L),ze=new Set([Ee].concat((0,ge.Z)($),(0,ge.Z)(ue)));return ze.forEach(function(le){le.addEventListener("scroll",_e,{passive:!0})}),Ee.addEventListener("resize",_e,{passive:!0}),K(),function(){ze.forEach(function(le){le.removeEventListener("scroll",_e),Ee.removeEventListener("resize",_e)})}}},[V,G,W])}var De=Te(48736);function ke(V,G,W,K,te,U,L,$){var ue=v.useRef(V);ue.current=V;var Ee=v.useRef(!1);v.useEffect(function(){if(G&&K&&(!te||U)){var _e=function(){Ee.current=!1},le=function(qe){var pt;ue.current&&!L(((pt=qe.composedPath)===null||pt===void 0||(pt=pt.call(qe))===null||pt===void 0?void 0:pt[0])||qe.target)&&!Ee.current&&$(!1)},Re=ee(K);Re.addEventListener("pointerdown",_e,!0),Re.addEventListener("mousedown",le,!0),Re.addEventListener("contextmenu",le,!0);var Me=(0,y.A)(W);if(Me&&(Me.addEventListener("mousedown",le,!0),Me.addEventListener("contextmenu",le,!0)),0)var He,Be,Je,$e;return function(){Re.removeEventListener("pointerdown",_e,!0),Re.removeEventListener("mousedown",le,!0),Re.removeEventListener("contextmenu",le,!0),Me&&(Me.removeEventListener("mousedown",le,!0),Me.removeEventListener("contextmenu",le,!0))}}},[G,W,K,te,U]);function ze(){Ee.current=!0}return ze}var de=["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 Y(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:M.Z,G=v.forwardRef(function(W,K){var te=W.prefixCls,U=te===void 0?"rc-trigger-popup":te,L=W.children,$=W.action,ue=$===void 0?"hover":$,Ee=W.showAction,ze=W.hideAction,_e=W.popupVisible,le=W.defaultPopupVisible,Re=W.onPopupVisibleChange,Me=W.afterPopupVisibleChange,He=W.mouseEnterDelay,Be=W.mouseLeaveDelay,Je=Be===void 0?.1:Be,$e=W.focusDelay,rt=W.blurDelay,qe=W.mask,pt=W.maskClosable,Pe=pt===void 0?!0:pt,Qe=W.getPopupContainer,nt=W.forceRender,yt=W.autoDestroy,St=W.destroyPopupOnHide,Lt=W.popup,jt=W.popupClassName,Dt=W.popupStyle,Ct=W.popupPlacement,Mt=W.builtinPlacements,Bt=Mt===void 0?{}:Mt,Ut=W.popupAlign,Nt=W.zIndex,tr=W.stretch,Zt=W.getPopupClassNameFromAlign,zt=W.fresh,Xe=W.alignPoint,Kt=W.onPopupClick,Ft=W.onPopupAlign,kr=W.arrow,hr=W.popupMotion,vr=W.maskMotion,$t=W.popupTransitionName,Xt=W.popupAnimation,sr=W.maskTransitionName,Nr=W.maskAnimation,Tt=W.className,Mr=W.getTriggerDOMNode,Jt=(0,o.Z)(W,de),Xr=yt||St||!1,Kr=v.useState(!1),on=(0,st.Z)(Kr,2),hn=on[0],Yr=on[1];(0,c.Z)(function(){Yr((0,m.Z)())},[]);var $r=v.useRef({}),We=v.useContext(D),tn=v.useMemo(function(){return{registerSubPopup:function(Ht,rn){$r.current[Ht]=rn,We==null||We.registerSubPopup(Ht,rn)}}},[We]),Zr=(0,w.Z)(),yr=v.useState(null),Ge=(0,st.Z)(yr,2),Ye=Ge[0],ot=Ge[1],ut=v.useRef(null),dt=(0,g.Z)(function(_t){ut.current=_t,(0,h.Sh)(_t)&&Ye!==_t&&ot(_t),We==null||We.registerSubPopup(Zr,_t)}),ht=v.useState(null),xt=(0,st.Z)(ht,2),it=xt[0],Wt=xt[1],Pt=v.useRef(null),lt=(0,g.Z)(function(_t){(0,h.Sh)(_t)&&it!==_t&&(Wt(_t),Pt.current=_t)}),rr=v.Children.only(L),er=(rr==null?void 0:rr.props)||{},dr={},pr=(0,g.Z)(function(_t){var Ht,rn,nn=it;return(nn==null?void 0:nn.contains(_t))||((Ht=(0,y.A)(nn))===null||Ht===void 0?void 0:Ht.host)===_t||_t===nn||(Ye==null?void 0:Ye.contains(_t))||((rn=(0,y.A)(Ye))===null||rn===void 0?void 0:rn.host)===_t||_t===Ye||Object.values($r.current).some(function(Ve){return(Ve==null?void 0:Ve.contains(_t))||_t===Ve})}),Er=X(U,hr,Xt,$t),jr=X(U,vr,Nr,sr),Wr=v.useState(le||!1),Cr=(0,st.Z)(Wr,2),br=Cr[0],ar=Cr[1],Rt=_e!=null?_e:br,fn=(0,g.Z)(function(_t){_e===void 0&&ar(_t)});(0,c.Z)(function(){ar(_e||!1)},[_e]);var nr=v.useRef(Rt);nr.current=Rt;var mr=v.useRef([]);mr.current=[];var Br=(0,g.Z)(function(_t){var Ht;fn(_t),((Ht=mr.current[mr.current.length-1])!==null&&Ht!==void 0?Ht:Rt)!==_t&&(mr.current.push(_t),Re==null||Re(_t))}),dn=v.useRef(),sn=function(){clearTimeout(dn.current)},vn=function(Ht){var rn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;sn(),rn===0?Br(Ht):dn.current=setTimeout(function(){Br(Ht)},rn*1e3)};v.useEffect(function(){return sn},[]);var Qn=v.useState(!1),Xn=(0,st.Z)(Qn,2),_n=Xn[0],gn=Xn[1];(0,c.Z)(function(_t){(!_t||Rt)&&gn(!0)},[Rt]);var un=v.useState(null),Fn=(0,st.Z)(un,2),Ln=Fn[0],Un=Fn[1],Kn=v.useState(null),Jr=(0,st.Z)(Kn,2),qt=Jr[0],_r=Jr[1],qr=function(Ht){_r([Ht.clientX,Ht.clientY])},yn=fe(Rt,Ye,Xe&&qt!==null?qt:it,Ct,Bt,Ut,Ft),ln=(0,st.Z)(yn,11),Tn=ln[0],Zn=ln[1],Jn=ln[2],Wn=ln[3],fi=ln[4],wr=ln[5],zr=ln[6],Gn=ln[7],di=ln[8],ii=ln[9],Ci=ln[10],Si=J(hn,ue,Ee,ze),Yt=(0,st.Z)(Si,2),Pi=Yt[0],ui=Yt[1],Ii=Pi.has("click"),pi=ui.has("click")||ui.has("contextMenu"),Ti=(0,g.Z)(function(){_n||Ci()}),ra=function(){nr.current&&Xe&&pi&&vn(!1)};Se(Rt,it,Ye,Ti,ra),(0,c.Z)(function(){Ti()},[qt,Ct]),(0,c.Z)(function(){Rt&&!(Bt!=null&&Bt[Ct])&&Ti()},[JSON.stringify(Ut)]);var Ba=v.useMemo(function(){var _t=_(Bt,U,ii,Xe);return p()(_t,Zt==null?void 0:Zt(ii))},[ii,Zt,Bt,U,Xe]);v.useImperativeHandle(K,function(){return{nativeElement:Pt.current,popupElement:ut.current,forceAlign:Ti}});var ya=v.useState(0),Ot=(0,st.Z)(ya,2),bn=Ot[0],ba=Ot[1],Na=v.useState(0),na=(0,st.Z)(Na,2),lr=na[0],Fr=na[1],en=function(){if(tr&&it){var Ht=it.getBoundingClientRect();ba(Ht.width),Fr(Ht.height)}},Sr=function(){en(),Ti()},Gr=function(Ht){gn(!1),Ci(),Me==null||Me(Ht)},Rn=function(){return new Promise(function(Ht){en(),Un(function(){return Ht})})};(0,c.Z)(function(){Ln&&(Ci(),Ln(),Un(null))},[Ln]);function jn(_t,Ht,rn,nn){dr[_t]=function(Ve){var Cn;nn==null||nn(Ve),vn(Ht,rn);for(var $n=arguments.length,vi=new Array($n>1?$n-1:0),Sn=1;Sn<$n;Sn++)vi[Sn-1]=arguments[Sn];(Cn=er[_t])===null||Cn===void 0||Cn.call.apply(Cn,[er,Ve].concat(vi))}}(Ii||pi)&&(dr.onClick=function(_t){var Ht;nr.current&&pi?vn(!1):!nr.current&&Ii&&(qr(_t),vn(!0));for(var rn=arguments.length,nn=new Array(rn>1?rn-1:0),Ve=1;Ve<rn;Ve++)nn[Ve-1]=arguments[Ve];(Ht=er.onClick)===null||Ht===void 0||Ht.call.apply(Ht,[er,_t].concat(nn))});var hi=ke(Rt,pi,it,Ye,qe,Pe,pr,vn),Yn=Pi.has("hover"),mn=ui.has("hover"),Hi,je;Yn&&(jn("onMouseEnter",!0,He,function(_t){qr(_t)}),jn("onPointerEnter",!0,He,function(_t){qr(_t)}),Hi=function(Ht){(Rt||_n)&&Ye!==null&&Ye!==void 0&&Ye.contains(Ht.target)&&vn(!0,He)},Xe&&(dr.onMouseMove=function(_t){var Ht;(Ht=er.onMouseMove)===null||Ht===void 0||Ht.call(er,_t)})),mn&&(jn("onMouseLeave",!1,Je),jn("onPointerLeave",!1,Je),je=function(){vn(!1,Je)}),Pi.has("focus")&&jn("onFocus",!0,$e),ui.has("focus")&&jn("onBlur",!1,rt),Pi.has("contextMenu")&&(dr.onContextMenu=function(_t){var Ht;nr.current&&ui.has("contextMenu")?vn(!1):(qr(_t),vn(!0)),_t.preventDefault();for(var rn=arguments.length,nn=new Array(rn>1?rn-1:0),Ve=1;Ve<rn;Ve++)nn[Ve-1]=arguments[Ve];(Ht=er.onContextMenu)===null||Ht===void 0||Ht.call.apply(Ht,[er,_t].concat(nn))}),Tt&&(dr.className=p()(er.className,Tt));var ai=v.useRef(!1);ai.current||(ai.current=nt||Rt||_n);var Ai=(0,we.Z)((0,we.Z)({},er),dr),ia={},En=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];En.forEach(function(_t){Jt[_t]&&(ia[_t]=function(){for(var Ht,rn=arguments.length,nn=new Array(rn),Ve=0;Ve<rn;Ve++)nn[Ve]=arguments[Ve];(Ht=Ai[_t])===null||Ht===void 0||Ht.call.apply(Ht,[Ai].concat(nn)),Jt[_t].apply(Jt,nn)})});var Dn=v.cloneElement(rr,(0,we.Z)((0,we.Z)({},Ai),ia)),zn={x:wr,y:zr},oi=kr?(0,we.Z)({},kr!==!0?kr:{}):null;return v.createElement(v.Fragment,null,v.createElement(f.Z,{disabled:!Rt,ref:lt,onResize:Sr},v.createElement(B,{getTriggerDOMNode:Mr},Dn)),ai.current&&v.createElement(D.Provider,{value:tn},v.createElement(P,{portal:V,ref:dt,prefixCls:U,popup:Lt,className:p()(jt,Ba),style:Dt,target:it,onMouseEnter:Hi,onMouseLeave:je,onPointerEnter:Hi,zIndex:Nt,open:Rt,keepDom:_n,fresh:zt,onClick:Kt,onPointerDownCapture:hi,mask:qe,motion:Er,maskMotion:jr,onVisibleChanged:Gr,onPrepare:Rn,forceRender:nt,autoDestroy:Xr,getPopupContainer:Qe,align:ii,arrow:oi,arrowPos:zn,ready:Tn,offsetX:Zn,offsetY:Jn,offsetR:Wn,offsetB:fi,onAlign:Ti,stretch:tr,targetWidth:bn/Gn,targetHeight:lr/di})))});return G}var ye=Y(M.Z)},25173:function(or,mt,Te){"use strict";Te.d(mt,{cT:function(){return k},pe:function(){return P}});var we=Te(59301),st=Te(94968),o=Te(6767),M=Te(49317),R=Te(28209),p=Te.n(R),f=Te(1012),h=Te(44283),y=Te(47257),g=Te.n(y),w=Object.defineProperty,c=Object.defineProperties,m=Object.getOwnPropertyDescriptors,v=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,T=(F,J,H)=>J in F?w(F,J,{enumerable:!0,configurable:!0,writable:!0,value:H}):F[J]=H,S=(F,J)=>{for(var H in J||(J={}))b.call(J,H)&&T(F,H,J[H]);if(v)for(var H of v(J))x.call(J,H)&&T(F,H,J[H]);return F},C=(F,J)=>c(F,m(J)),E=(F,J)=>{var H={};for(var N in F)b.call(F,N)&&J.indexOf(N)<0&&(H[N]=F[N]);if(F!=null&&v)for(var N of v(F))J.indexOf(N)<0&&x.call(F,N)&&(H[N]=F[N]);return H},j=(F,J,H)=>new Promise((N,_)=>{var X=he=>{try{ie(H.next(he))}catch(ne){_(ne)}},ee=he=>{try{ie(H.throw(he))}catch(ne){_(ne)}},ie=he=>he.done?N(he.value):Promise.resolve(he.value).then(X,ee);ie((H=H.apply(F,J)).next())});const{Dragger:Z}=st.default,P=F=>{const J="bf3c199c2470cb477d907b1e0917c17b",H="5183666c72eec9e4";var N=p().enc.Utf8.parse(J);let _=p().enc.Utf8.parse(H);var X=p().AES.decrypt(F,N,{iv:_,mode:p().mode.CBC});return X.toString(p().enc.Utf8)};let Q;const B=F=>j(void 0,[F],function*({identifier:J,oldFilename:H,newFilename:N}){var _,X,ee,ie,he,ne;const Ie=yield Fetch("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});Ie.data=JSON.parse(P(Ie.data));const q=new OSS({endpoint:(_=Ie==null?void 0:Ie.data)==null?void 0:_.end_point,region:(X=Ie==null?void 0:Ie.data)==null?void 0:X.region,accessKeyId:(ee=Ie==null?void 0:Ie.data)==null?void 0:ee.access_key_id,accessKeySecret:(ie=Ie==null?void 0:Ie.data)==null?void 0:ie.access_key_secret,bucket:(he=Ie==null?void 0:Ie.data)==null?void 0:he.bucket,stsToken:(ne=Ie==null?void 0:Ie.data)==null?void 0:ne.security_token});return new Promise((pe,ve)=>{console.log(11111,`${J}/${H}`,`${J}/${N}`,Ie.data),q.copy(`/${J}/${H}`,`/${J}/${N}`).then(xe=>{console.log("\u62F7\u8D1D\u6210\u529F",xe)}).catch(xe=>{console.log(xe)})})}),k=(F,J,H)=>j(void 0,null,function*(){var N,_,X,ee,ie,he;J.file_name=F.name;const ne=yield(0,M.ZP)("/api/buckets/get_upload_token.json",{method:"get"});console.log("decrypt(res.data):",P(ne.data)),ne.data=JSON.parse(P(ne.data));const Ie=F.name.split(".");Ie.pop();const q=J.realFileName?Ie.join(""):(0,f.Z)(),pe=new(g())({endpoint:(N=ne==null?void 0:ne.data)==null?void 0:N.end_point,region:(_=ne==null?void 0:ne.data)==null?void 0:_.region,accessKeyId:(X=ne==null?void 0:ne.data)==null?void 0:X.access_key_id,accessKeySecret:(ee=ne==null?void 0:ne.data)==null?void 0:ee.access_key_secret,bucket:(ie=ne==null?void 0:ne.data)==null?void 0:ie.bucket,stsToken:(he=ne==null?void 0:ne.data)==null?void 0:he.security_token});return new Promise((ve,xe)=>{var ce;pe.multipartUpload(`${q}`,new Blob([F],{type:F.type}),C(S({timeout:200*1e3,partSize:102400},H),{callback:{url:(ce=ne==null?void 0:ne.data)==null?void 0:ce.callback_url,host:ne==null?void 0:ne.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,M.rz)(J)}})).then(function(fe){var ge;F.response=(ge=fe.data)==null?void 0:ge.data,ve(fe==null?void 0:fe.data)}).catch(function(fe){xe(fe),console.log("err:",fe)})})}),D=F=>{var J=F,{user:H,cancelUpload:N}=J,_=E(J,["user","cancelUpload"]);const[X,ee]=(0,we.useState)([]);let[ie,he]=(0,we.useState)();const ne={onRemove:q=>{ee([...X.filter(pe=>pe.name!==q.name)]),_.onChange(X.filter(pe=>pe.name!==q.name))},disabled:_.disabled,multiple:!0,fileList:X==null?void 0:X.map(q=>q.file),customRequest:()=>{},beforeUpload:q=>j(void 0,null,function*(){let pe=_.maxSize||1073741824;if(X.filter(ve=>ve.name===q.name).length){o.ZP.info(`${q.name}\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9`);return}return(q==null?void 0:q.size)>pe?(o.ZP.info(`\u6587\u4EF6\u8D85\u8FC7${pe/1024/1024/1024}GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42`),!1):(X.push({name:q.name,file:q}),ee([...X]),_.onChange(X),!1)})},Ie=(q,pe)=>j(void 0,null,function*(){var ve,xe,ce,fe,ge,Se;pe.file_name=q.name;const De=q.name,ke=yield(0,M.ZP)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});if(ke.data=JSON.parse(P(ke.data)),(ke==null?void 0:ke.status)!==0){X[X.findIndex(ye=>ye.name===De)].status="error",X[X.findIndex(ye=>ye.name===De)].file.status="error",_.onChange(X),o.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5");return}ie=new(g())({endpoint:(ve=ke==null?void 0:ke.data)==null?void 0:ve.end_point,region:(xe=ke==null?void 0:ke.data)==null?void 0:xe.region,accessKeyId:(ce=ke==null?void 0:ke.data)==null?void 0:ce.access_key_id,accessKeySecret:(fe=ke==null?void 0:ke.data)==null?void 0:fe.access_key_secret,bucket:(ge=ke==null?void 0:ke.data)==null?void 0:ge.bucket,stsToken:(Se=ke==null?void 0:ke.data)==null?void 0:Se.security_token}),console.log(q,"file"),he(ie);const de=q.name.split(".");de.pop();const Y=De.indexOf(".")>-1?pe.realFileName?de.join("."):(0,f.Z)():De;return new Promise((ye,V)=>{var G;try{ie.multipartUpload(`${_.identifier}/${Y}${De.indexOf(".")>-1?"."+De.split(".").pop():""}`,new Blob([q.file],{type:q.file.type}),{timeout:3600*1e3,partSize:1002400,progress:(W,K,te)=>{try{console.log("\u8FDB\u5EA6",W,K,te);const U=X.findIndex(L=>L.name===De);X[U].file.percent=W*100,X[U].tempCheckpoint=K,ee([...X])}catch(U){}},checkpoint:X[X.findIndex(W=>W.name===De)].tempCheckpoint,callback:{customValue:{id:De+""},url:(G=ke==null?void 0:ke.data)==null?void 0:G.callback_url,host:ke==null?void 0:ke.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,M.rz)(pe)}}).then(function(W){var K,te,U;const L=X.findIndex(ue=>ue.name===De);let $="done";if(((K=W.data)==null?void 0:K.status)===0){q.response=(te=W.data)==null?void 0:te.data;const ue=X.findIndex(Ee=>Ee.name===De);X[ue].status="done",X[ue].file.status="done"}else o.ZP.warning((U=W.data)==null?void 0:U.message),$="error";X[L].status=$,X[L].file.status=$,_.onChange(X),ye(W==null?void 0:W.data)}).catch(function(W){X[X.findIndex(K=>K.name===De)].status="error",X[X.findIndex(K=>K.name===De)].file.status="error",o.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),ee([...X]),_.onChange(X),V(W),console.log("err:",W)})}catch(W){}})});return(0,we.useEffect)(()=>{X.every(q=>q==="done"||q==="error")&&_.onComplete(X)},[X]),(0,we.useEffect)(()=>{N&&(ie==null||ie.cancel())},[N]),(0,we.useEffect)(()=>{_.uploading&&X.map(q=>j(void 0,null,function*(){var pe;if((!q.status||q.status==="error")&&!N){q.status="uploading",q.file.status="uploading";const ve=yield Ie(q,{login:(pe=H==null?void 0:H.userInfo)==null?void 0:pe.login,container_type:_.container_type,container_id:_.container_id,description:_.description,realFileName:_.realFileName})}}))},[_.uploading]),we.createElement(Z,C(S({},ne),{height:_.height,className:_.className}),we.createElement("p",{className:"ant-upload-hint"},_.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};mt.ZP=(0,h.connect)(({loading:F,globalSetting:J,user:H})=>({globalSetting:J,loading:F.models.competitions,user:H}))(D)},56781:function(or,mt,Te){"use strict";Te.r(mt),Te.d(mt,{default:function(){return $0}});var we=Te(59301),st=Te(44283),o=Te(11938),M=Te(10846),R=Te(6767),p=Te(7939),f=Te(77019),h=Te(5269),y=Te(62957),g={flex_box_center:"flex_box_center___uIDcP",flex_space_between:"flex_space_between___l5roZ",flex_box_vertical_center:"flex_box_vertical_center___mj8nW",flex_box_center_end:"flex_box_center_end___v4Eig",flex_box_column:"flex_box_column___SQn0H",bg:"bg___H5S8d",steps:"steps___mrlSw",qrcode:"qrcode___xRSbG"},w=Te(76406),c=Te(84849),m=Te(15845),v=Te.n(m),b=Te(97671),x=Te(19208).lW;var T=function(n,t){return(T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i])})(n,t)};function S(n,t){function e(){this.constructor=n}T(n,t),n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function C(n,t,e,r){return new(e||(e=Promise))(function(i,a){function s(d){try{l(r.next(d))}catch(A){a(A)}}function u(d){try{l(r.throw(d))}catch(A){a(A)}}function l(d){d.done?i(d.value):new e(function(A){A(d.value)}).then(s,u)}l((r=r.apply(n,t||[])).next())})}function E(n,t){var e,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(l){return function(d){return function(A){if(e)throw new TypeError("Generator is already executing.");for(;s;)try{if(e=1,r&&(i=2&A[0]?r.return:A[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,A[1])).done)return i;switch(r=0,i&&(A=[2&A[0],i.value]),A[0]){case 0:case 1:i=A;break;case 4:return s.label++,{value:A[1],done:!1};case 5:s.label++,r=A[1],A=[0];continue;case 7:A=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(A[0]===6||A[0]===2)){s=0;continue}if(A[0]===3&&(!i||A[1]>i[0]&&A[1]<i[3])){s.label=A[1];break}if(A[0]===6&&s.label<i[1]){s.label=i[1],i=A;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(A);break}i[2]&&s.ops.pop(),s.trys.pop();continue}A=t.call(n,s)}catch(I){A=[6,I],r=0}finally{e=i=0}if(5&A[0])throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}([l,d])}}}var j=function(){function n(t){this.global=t,this.flags={},this.flagRegistry={},this.urlFlags={},this.populateURLFlags()}return n.prototype.setPlatform=function(t,e){this.platform!=null&&console.warn("Platform "+this.platformName+" has already been set. Overwriting the platform with "+e+"."),this.platformName=t,this.platform=e},n.prototype.registerFlag=function(t,e,r){if(this.flagRegistry[t]={evaluationFn:e,setHook:r},this.urlFlags[t]!=null){var i=this.urlFlags[t];console.warn("Setting feature override from URL "+t+": "+i+"."),this.set(t,i)}},n.prototype.get=function(t){return t in this.flags?this.flags[t]:(this.flags[t]=this.evaluateFlag(t),this.flags[t])},n.prototype.getNumber=function(t){return this.get(t)},n.prototype.getBool=function(t){return this.get(t)},n.prototype.getFlags=function(){return this.flags},Object.defineProperty(n.prototype,"features",{get:function(){return this.flags},enumerable:!0,configurable:!0}),n.prototype.set=function(t,e){if(this.flagRegistry[t]==null)throw new Error("Cannot set flag "+t+" as it has not been registered.");this.flags[t]=e,this.flagRegistry[t].setHook!=null&&this.flagRegistry[t].setHook(e)},n.prototype.evaluateFlag=function(t){if(this.flagRegistry[t]==null)throw new Error("Cannot evaluate flag '"+t+"': no evaluation function found.");return this.flagRegistry[t].evaluationFn()},n.prototype.setFlags=function(t){this.flags=Object.assign({},t)},n.prototype.reset=function(){this.flags={},this.urlFlags={},this.populateURLFlags()},n.prototype.populateURLFlags=function(){var t=this;if(this.global!==void 0&&this.global.location!==void 0&&this.global.location.search!==void 0){var e,r,i=(e=this.global.location.search,r={},e.replace(/[?&]([^=?&]+)(?:=([^&]*))?/g,function(a){for(var s=[],u=1;u<arguments.length;u++)s[u-1]=arguments[u];return Z(r,s[0],s[1]),s.join("=")}),r);"tfjsflags"in i&&i.tfjsflags.split(",").forEach(function(a){var s=a.split(":"),u=s[0],l=s[1];t.urlFlags[u]=function(d,A){if((A=A.toLowerCase())==="true"||A==="false")return A==="true";if(""+ +A===A)return+A;throw new Error("Could not parse value flag value "+A+" for flag "+d+".")}(u,l)})}},n}();function Z(n,t,e){n[decodeURIComponent(t)]=decodeURIComponent(e||"")}function P(){return Q}var Q=null,B=new Map,k=new Map;function D(n,t){var e=ee(n,t);return B.get(e)}function F(n){return k.get(n)}function J(n){for(var t=B.entries(),e=[];;){var r=t.next(),i=r.done,a=r.value;if(i)break;var s=a[0],u=a[1];s.split("_")[0]===n&&e.push(u)}return e}function H(n){var t=n.kernelName,e=n.backendName,r=ee(t,e);if(B.has(r))throw new Error("The kernel '"+t+"' for backend '"+e+"' is already registered");B.set(r,n)}function N(n){var t=n.kernelName;k.has(t)&&console.warn("Overriding the gradient for '"+t+"'"),k.set(t,n)}function _(n,t){var e=ee(n,t);if(!B.has(e))throw new Error("The kernel '"+n+"' for backend '"+t+"' is not registered");B.delete(e)}function X(n){if(!k.has(n))throw new Error("The gradient '"+n+"' for backend is not registered");k.delete(n)}function ee(n,t){return t+"_"+n}function ie(n){for(var t=n.length,e=0,r=0;t>0;)r=Math.random()*t|0,e=n[--t],n[t]=n[r],n[r]=e}function he(n,t,e){return Math.max(n,Math.min(t,e))}function ne(n){return n%2==0?n:n+1}function Ie(n){for(var t=0,e=0;e<n.length;e++)t+=n[e];return t}function q(n,t){if(!n)throw new Error(typeof t=="string"?t:t())}function pe(n,t,e){e===void 0&&(e=""),q(fe(n,t),function(){return e+" Shapes "+n+" and "+t+" must match"})}function ve(n){q(n!=null,function(){return"The input to the tensor constructor must be a non-null value."})}function xe(n,t,e){if(t===void 0&&(t=[]),e===void 0&&(e=!1),t==null&&(t=[]),Array.isArray(n)||L(n)&&!e)for(var r=0;r<n.length;++r)xe(n[r],t,e);else t.push(n);return t}function ce(n){if(n.length===0)return 1;for(var t=n[0],e=1;e<n.length;e++)t*=n[e];return t}function fe(n,t){if(n===t)return!0;if(n==null||t==null||n.length!==t.length)return!1;for(var e=0;e<n.length;e++)if(n[e]!==t[e])return!1;return!0}function ge(n){return n%1==0}function Se(n){if(Math.tanh!=null)return Math.tanh(n);if(n===1/0)return 1;if(n===-1/0)return-1;var t=Math.exp(2*n);return(t-1)/(t+1)}function De(n){var t=Math.ceil(Math.sqrt(n));return[t,Math.ceil(n/t)]}function ke(n,t){return t<=n.length?n:n+" ".repeat(t-n.length)}function de(n,t,e){return t===void 0&&(t=function(r){return 0}),new Promise(function(r,i){var a=0,s=function(){if(n())r();else{a++;var u=t(a);e!=null&&a>=e?i():setTimeout(s,u)}};s()})}function Y(n,t){for(var e=1,r=-1,i=0;i<n.length;++i)if(n[i]>=0)e*=n[i];else if(n[i]===-1){if(r!==-1)throw Error("Shapes can only have 1 implicit size. Found -1 at dim "+r+" and dim "+i);r=i}else if(n[i]<0)throw Error("Shapes can not be < 0. Found "+n[i]+" at dim "+i);if(r===-1){if(t>0&&t!==e)throw Error("Size("+t+") must match the product of shape "+n);return n}if(e===0)throw Error("Cannot infer the missing size in ["+n+"] when there are 0 elements");if(t%e!=0)throw Error("The implicit shape can't be a fractional number. Got "+t+" / "+e);var a=n.slice();return a[r]=t/e,a}function ye(n,t){var e=t.length;return q((n=n==null?t.map(function(r,i){return i}):[].concat(n)).every(function(r){return r>=-e&&r<e}),function(){return"All values in axis param must be in range [-"+e+", "+e+") but got axis "+n}),q(n.every(function(r){return ge(r)}),function(){return"All values in axis param must be integers but got axis "+n}),n.map(function(r){return r<0?e+r:r})}function V(n,t){for(var e=[],r=[],i=t!=null&&Array.isArray(t)&&t.length===0,a=t==null||i?null:ye(t,n).sort(),s=0,u=0;u<n.length;++u){if(a!=null){if(a[s]===u&&n[u]!==1)throw new Error("Can't squeeze axis "+u+" since its dim '"+n[u]+"' is not 1");(a[s]==null||a[s]>u)&&n[u]===1&&(e.push(n[u]),r.push(u)),a[s]<=u&&s++}n[u]!==1&&(e.push(n[u]),r.push(u))}return{newShape:e,keptDims:r}}function G(n,t){var e=null;if(n==null||n==="float32")e=new Float32Array(t);else if(n==="int32")e=new Int32Array(t);else{if(n!=="bool")throw new Error("Unknown data type "+n);e=new Uint8Array(t)}return e}function W(n,t){var e=null;if(n==null||n==="float32")e=new Float32Array(t);else if(n==="int32")e=new Int32Array(t);else if(n==="bool")e=new Uint8Array(t);else{if(n!=="string")throw new Error("Unknown data type "+n);e=new Array(t)}return e}function K(n,t){for(var e=0;e<n.length;e++){var r=n[e];if(isNaN(r)||!isFinite(r))throw Error("A tensor of type "+t+" being uploaded contains "+r+".")}}function te(n){return n==="bool"||n==="complex64"||n==="float32"||n==="int32"||n==="string"}function U(n,t){return t!=="complex64"&&(t!=="float32"||n==="complex64")&&(t!=="int32"||n==="float32"||n==="complex64")&&(t!=="bool"||n!=="bool")}function L(n){return n instanceof Float32Array||n instanceof Int32Array||n instanceof Uint8Array}function $(n){if(n==="float32"||n==="int32")return 4;if(n==="complex64")return 8;if(n==="bool")return 1;throw new Error("Unknown dtype "+n)}function ue(n){if(n==null)return 0;var t=0;return n.forEach(function(e){return t+=e.length}),t}function Ee(n){return typeof n=="string"||n instanceof String}function ze(n){return typeof n=="boolean"}function _e(n){return typeof n=="number"}function le(n){return Array.isArray(n)?le(n[0]):n instanceof Float32Array?"float32":n instanceof Int32Array||n instanceof Uint8Array?"int32":_e(n)?"float32":Ee(n)?"string":ze(n)?"bool":"float32"}function Re(n){return!!(n&&n.constructor&&n.call&&n.apply)}function Me(n,t){for(var e=t;e<n;++e)if(n%e==0)return e;return n}function He(n){var t=n.length;if(t<2)return[];var e=new Array(t-1);e[t-2]=n[t-1];for(var r=t-3;r>=0;--r)e[r]=e[r+1]*n[r+1];return e}function Be(n,t,e){if(t==="string")throw new Error("Cannot convert a string[] to a TypedArray");if(Array.isArray(n)&&(n=xe(n)),e&&K(n,t),function(a,s){return a instanceof Float32Array&&s==="float32"||a instanceof Int32Array&&s==="int32"||a instanceof Uint8Array&&s==="bool"}(n,t))return n;if(t==null||t==="float32"||t==="complex64")return new Float32Array(n);if(t==="int32")return new Int32Array(n);if(t==="bool"){for(var r=new Uint8Array(n.length),i=0;i<r.length;++i)Math.round(n[i])!==0&&(r[i]=1);return r}throw new Error("Unknown data type "+t)}function Je(n,t){if(n.length===0)return t[0];var e=n.reduce(function(r,i){return r*i});if(e===0)return[];if(e!==t.length)throw new Error("["+n+"] does not match the input size.");return function r(i,a,s){var u=new Array;if(a.length===1)for(var l=a[0],d=0;d<l;d++)u[d]=s[i+d];else{l=a[0];var A=a.slice(1),I=A.reduce(function(O,z){return O*z});for(d=0;d<l;d++)u[d]=r(i+d*I,A,s)}return u}(0,n,t)}function $e(n,t){for(var e=rt(n,t),r=0;r<e.length;r++)e[r]=1;return e}function rt(n,t){if(t==null||t==="float32"||t==="complex64")return new Float32Array(n);if(t==="int32")return new Int32Array(n);if(t==="bool")return new Uint8Array(n);throw new Error("Unknown data type "+t)}function qe(){return P().platform.now()}function pt(n){n.forEach(function(t){q(Number.isInteger(t)&&t>=0,function(){return"Tensor must have a shape comprised of positive integers but got shape ["+n+"]."})})}function Pe(n,t){return t===void 0&&(t="utf-8"),t=t||"utf-8",P().platform.encode(n,t)}function Qe(n,t){return t===void 0&&(t="utf-8"),t=t||"utf-8",P().platform.decode(n,t)}function nt(n,t,e){if(t===0)return 0;if(t===1)return n[0];for(var r=n[n.length-1],i=0;i<n.length-1;++i)r+=e[i]*n[i];return r}function yt(n,t,e){if(t===0)return[];if(t===1)return[n];for(var r=new Array(t),i=0;i<r.length-1;++i)r[i]=Math.floor(n/e[i]),n-=r[i]*e[i];return r[r.length-1]=n,r}var St=Object.freeze({shuffle:ie,clamp:he,nearestLargerEven:ne,sum:Ie,randUniform:function(n,t){var e=Math.random();return t*e+(1-e)*n},distSquared:function(n,t){for(var e=0,r=0;r<n.length;r++){var i=Number(n[r])-Number(t[r]);e+=i*i}return e},assert:q,assertShapesMatch:pe,assertNonNull:ve,flatten:xe,sizeFromShape:ce,isScalarShape:function(n){return n.length===0},arraysEqual:fe,isInt:ge,tanh:Se,sizeToSquarishShape:De,createShuffledIndices:function(n){for(var t=new Uint32Array(n),e=0;e<n;++e)t[e]=e;return ie(t),t},rightPad:ke,repeatedTry:de,inferFromImplicitShape:Y,parseAxisParam:ye,squeezeShape:V,getTypedArrayFromDType:G,getArrayFromDType:W,checkConversionForErrors:K,isValidDtype:te,hasEncodingLoss:U,isTypedArray:L,bytesPerElement:$,bytesFromStringArray:ue,isString:Ee,isBoolean:ze,isNumber:_e,inferDtype:le,isFunction:Re,nearestDivisor:Me,computeStrides:He,toTypedArray:Be,toNestedArray:Je,makeOnesTypedArray:$e,makeZerosTypedArray:rt,now:qe,assertNonNegativeIntegerDimensions:pt,fetch:function(n,t){return P().platform.fetch(n,t)},encodeString:Pe,decodeString:Qe,locToIndex:nt,indexToLoc:yt}),Lt=function(){function n(t,e){this.backendTimer=t,this.logger=e,e==null&&(this.logger=new jt)}return n.prototype.profileKernel=function(t,e,r){var i,a=this,s=this.backendTimer.time(function(){i=r()});return i.forEach(function(u){u.data().then(function(l){(function(d,A,I){if(A!=="float32")return!1;for(var O=0;O<d.length;O++){var z=d[O];if(isNaN(z)||!isFinite(z))return console.warn("Found "+z+" in the result of '"+I+"'"),!0}})(l,u.dtype,t),s.then(function(d){var A="";d.getExtraProfileInfo!=null&&(A=d.getExtraProfileInfo()),a.logger.logKernelProfile(t,u,l,d.kernelMs,e,A)})})}),i},n}(),jt=function(){function n(){}return n.prototype.logKernelProfile=function(t,e,r,i,a,s){var u=typeof i=="number"?ke(i+"ms",9):i.error,l=ke(t,25),d=e.rank,A=e.size,I=ke(e.shape.toString(),14),O="";for(var z in a){var re=a[z].shape||e.shape,oe=re.length;O+=z+": "+oe+"D "+(oe>0?re:"")+" "}console.log("%c"+l+" %c"+u+" %c"+d+"D "+I+" %c"+A+" %c"+O+" %c"+s,"font-weight:bold","color:red","color:blue","color: orange","color: green","color: steelblue")},n}(),Dt=20,Ct=3,Mt=7;function Bt(n,t,e,r){var i=He(t),a=function(d,A,I,O){var z=ce(A),re=O[O.length-1],oe=new Array(re).fill(0),ae=A.length,se=I==="complex64"?tr(d):d;if(ae>1)for(var be=0;be<z/re;be++)for(var Ae=be*re,me=0;me<re;me++)oe[me]=Math.max(oe[me],Ut(se[Ae+me],0,I).length);return oe}(n,t,e,i),s=t.length,u=function d(A,I,O,z,re,oe){oe===void 0&&(oe=!0);var ae=O==="complex64"?2:1,se=I[0],be=I.length;if(be===0)return O==="complex64"?[Ut(tr(A)[0],0,O)]:O==="bool"?[Nt(A[0])]:[A[0].toString()];if(be===1){if(se>Dt){var Ae=Ct*ae,me=Array.from(A.slice(0,Ae)),Ce=Array.from(A.slice((se-Ct)*ae,se*ae));return O==="complex64"&&(me=tr(me),Ce=tr(Ce)),["["+me.map(function(ct,bt){return Ut(ct,re[bt],O)}).join(", ")+", ..., "+Ce.map(function(ct,bt){return Ut(ct,re[se-Ct+bt],O)}).join(", ")+"]"]}return["["+(O==="complex64"?tr(A):Array.from(A)).map(function(ct,bt){return Ut(ct,re[bt],O)}).join(", ")+"]"]}var Oe=I.slice(1),Le=z.slice(1),Ue=z[0]*ae,Ne=[];if(se>Dt){for(var Fe=0;Fe<Ct;Fe++){var Ze=(Ke=Fe*Ue)+Ue;Ne.push.apply(Ne,d(A.slice(Ke,Ze),Oe,O,Le,re,!1))}for(Ne.push("..."),Fe=se-Ct;Fe<se;Fe++)Ze=(Ke=Fe*Ue)+Ue,Ne.push.apply(Ne,d(A.slice(Ke,Ze),Oe,O,Le,re,Fe===se-1))}else for(Fe=0;Fe<se;Fe++){var Ke;Ze=(Ke=Fe*Ue)+Ue,Ne.push.apply(Ne,d(A.slice(Ke,Ze),Oe,O,Le,re,Fe===se-1))}var et=be===2?",":"";for(Ne[0]="["+Ne[0]+et,Fe=1;Fe<Ne.length-1;Fe++)Ne[Fe]=" "+Ne[Fe]+et;var tt=`,
`;for(Fe=2;Fe<be;Fe++)tt+=`
`;return Ne[Ne.length-1]=" "+Ne[Ne.length-1]+"]"+(oe?"":tt),Ne}(n,t,e,i,a),l=["Tensor"];return r&&(l.push(" dtype: "+e),l.push(" rank: "+s),l.push(" shape: ["+t+"]"),l.push(" values:")),l.push(u.map(function(d){return" "+d}).join(`
`)),l.join(`
`)}function Ut(n,t,e){return ke(Array.isArray(n)?parseFloat(n[0].toFixed(Mt))+" + "+parseFloat(n[1].toFixed(Mt))+"j":Ee(n)?"'"+n+"'":e==="bool"?Nt(n):parseFloat(n.toFixed(Mt)).toString(),t)}function Nt(n){return n===0?"false":"true"}function tr(n){for(var t=[],e=0;e<n.length;e+=2)t.push([n[e],n[e+1]]);return t}var Zt=function(){function n(t,e,r){var i=this;if(this.dtype=e,this.shape=t.slice(),this.size=ce(t),r!=null){var a=r.length;q(a===this.size,function(){return"Length of values '"+a+"' does not match the size inferred by the shape '"+i.size+"'."})}if(e==="complex64")throw new Error("complex64 dtype TensorBuffers are not supported. Please create a TensorBuffer for the real and imaginary parts separately and call tf.complex(real, imag).");this.values=r||W(e,this.size),this.strides=He(t)}return n.prototype.set=function(t){for(var e=this,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];r.length===0&&(r=[0]),q(r.length===this.rank,function(){return"The number of provided coordinates ("+r.length+") must match the rank ("+e.rank+")"});var a=this.locToIndex(r);this.values[a]=t},n.prototype.get=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];t.length===0&&(t=[0]);for(var r=0,i=0,a=t;i<a.length;i++){var s=a[i];if(s<0||s>=this.shape[r]){var u="Requested out of range element at "+t+". Buffer shape="+this.shape;throw new Error(u)}r++}for(var l=t[t.length-1],d=0;d<t.length-1;++d)l+=this.strides[d]*t[d];return this.values[l]},n.prototype.locToIndex=function(t){if(this.rank===0)return 0;if(this.rank===1)return t[0];for(var e=t[t.length-1],r=0;r<t.length-1;++r)e+=this.strides[r]*t[r];return e},n.prototype.indexToLoc=function(t){if(this.rank===0)return[];if(this.rank===1)return[t];for(var e=new Array(this.shape.length),r=0;r<e.length-1;++r)e[r]=Math.floor(t/this.strides[r]),t-=e[r]*this.strides[r];return e[e.length-1]=t,e},Object.defineProperty(n.prototype,"rank",{get:function(){return this.shape.length},enumerable:!0,configurable:!0}),n.prototype.toTensor=function(){return zt().makeTensor(this.values,this.shape,this.dtype)},n}(),zt=null,Xe=null,Kt=null,Ft=function(){function n(t,e,r,i){this.kept=!1,this.isDisposedInternal=!1,this.shape=t.slice(),this.dtype=e||"float32",this.size=ce(t),this.strides=He(t),this.dataId=r,this.id=i,this.rankType=this.rank<5?this.rank.toString():"higher"}return n.prototype.flatten=function(){return this.throwIfDisposed(),this.as1D()},n.prototype.asScalar=function(){return this.throwIfDisposed(),q(this.size===1,function(){return"The array must have only 1 element."}),this.reshape([])},n.prototype.as1D=function(){return this.throwIfDisposed(),this.reshape([this.size])},n.prototype.as2D=function(t,e){return this.throwIfDisposed(),this.reshape([t,e])},n.prototype.as3D=function(t,e,r){return this.throwIfDisposed(),this.reshape([t,e,r])},n.prototype.as4D=function(t,e,r,i){return this.throwIfDisposed(),this.reshape([t,e,r,i])},n.prototype.as5D=function(t,e,r,i,a){return this.throwIfDisposed(),this.reshape([t,e,r,i,a])},n.prototype.asType=function(t){return this.throwIfDisposed(),Xe.cast(this,t)},Object.defineProperty(n.prototype,"rank",{get:function(){return this.shape.length},enumerable:!0,configurable:!0}),n.prototype.buffer=function(){return C(this,void 0,void 0,function(){var t;return E(this,function(e){switch(e.label){case 0:return[4,this.data()];case 1:return t=e.sent(),[2,Xe.buffer(this.shape,this.dtype,t)]}})})},n.prototype.bufferSync=function(){return Xe.buffer(this.shape,this.dtype,this.dataSync())},n.prototype.array=function(){return C(this,void 0,void 0,function(){var t;return E(this,function(e){switch(e.label){case 0:return[4,this.data()];case 1:return t=e.sent(),[2,Je(this.shape,t)]}})})},n.prototype.arraySync=function(){return Je(this.shape,this.dataSync())},n.prototype.data=function(){return C(this,void 0,void 0,function(){var t,e;return E(this,function(r){switch(r.label){case 0:return this.throwIfDisposed(),t=zt().read(this.dataId),this.dtype!=="string"?[3,2]:[4,t];case 1:e=r.sent();try{return[2,e.map(function(i){return Qe(i)})]}catch(i){throw new Error("Failed to decode the string bytes into utf-8. To get the original bytes, call tensor.bytes().")}r.label=2;case 2:return[2,t]}})})},n.prototype.dataSync=function(){this.throwIfDisposed();var t=zt().readSync(this.dataId);if(this.dtype==="string")try{return t.map(function(e){return Qe(e)})}catch(e){throw new Error("Failed to decode the string bytes into utf-8. To get the original bytes, call tensor.bytes().")}return t},n.prototype.bytes=function(){return C(this,void 0,void 0,function(){var t;return E(this,function(e){switch(e.label){case 0:return this.throwIfDisposed(),[4,zt().read(this.dataId)];case 1:return t=e.sent(),this.dtype==="string"?[2,t]:[2,new Uint8Array(t.buffer)]}})})},n.prototype.dispose=function(){this.isDisposed||(zt().disposeTensor(this),this.isDisposedInternal=!0)},Object.defineProperty(n.prototype,"isDisposed",{get:function(){return this.isDisposedInternal},enumerable:!0,configurable:!0}),n.prototype.throwIfDisposed=function(){if(this.isDisposed)throw new Error("Tensor is disposed.")},n.prototype.toFloat=function(){return this.asType("float32")},n.prototype.toInt=function(){return this.asType("int32")},n.prototype.toBool=function(){return this.asType("bool")},n.prototype.print=function(t){return t===void 0&&(t=!1),Xe.print(this,t)},n.prototype.reshape=function(t){return this.throwIfDisposed(),Xe.reshape(this,t)},n.prototype.reshapeAs=function(t){return this.throwIfDisposed(),this.reshape(t.shape)},n.prototype.expandDims=function(t){return t===void 0&&(t=0),Xe.expandDims(this,t)},n.prototype.cumsum=function(t,e,r){return t===void 0&&(t=0),e===void 0&&(e=!1),r===void 0&&(r=!1),Xe.cumsum(this,t,e,r)},n.prototype.squeeze=function(t){return this.throwIfDisposed(),Xe.squeeze(this,t)},n.prototype.clone=function(){return this.throwIfDisposed(),Xe.clone(this)},n.prototype.oneHot=function(t,e,r){return this.throwIfDisposed(),Xe.oneHot(this,t,e,r)},n.prototype.toString=function(t){return t===void 0&&(t=!1),Bt(this.dataSync(),this.shape,this.dtype,t)},n.prototype.tile=function(t){return this.throwIfDisposed(),Xe.tile(this,t)},n.prototype.gather=function(t,e){return e===void 0&&(e=0),this.throwIfDisposed(),Xe.gather(this,t,e)},n.prototype.matMul=function(t,e,r){return e===void 0&&(e=!1),r===void 0&&(r=!1),this.throwIfDisposed(),Xe.matMul(this,t,e,r)},n.prototype.dot=function(t){return this.throwIfDisposed(),Xe.dot(this,t)},n.prototype.norm=function(t,e,r){return t===void 0&&(t="euclidean"),e===void 0&&(e=null),r===void 0&&(r=!1),this.throwIfDisposed(),Xe.norm(this,t,e,r)},n.prototype.slice=function(t,e){return this.throwIfDisposed(),Xe.slice(this,t,e)},n.prototype.reverse=function(t){return this.throwIfDisposed(),Xe.reverse(this,t)},n.prototype.concat=function(t,e){return e===void 0&&(e=0),this.throwIfDisposed(),t instanceof n&&(t=[t]),Xe.concat([this].concat(t),e)},n.prototype.split=function(t,e){return e===void 0&&(e=0),this.throwIfDisposed(),Xe.split(this,t,e)},n.prototype.stack=function(t,e){return e===void 0&&(e=0),Xe.stack([this,t],e)},n.prototype.unstack=function(t){return t===void 0&&(t=0),Xe.unstack(this,t)},n.prototype.pad=function(t,e){return e===void 0&&(e=0),Xe.pad(this,t,e)},n.prototype.batchNormalization=function(t,e,r,i,a){return r===void 0&&(r=.001),Kt("tf.batchNormalization() is going away. Use tf.batchNorm() instead, and note the positional argument change of scale, offset, and varianceEpsilon"),this.batchNorm(t,e,a,i,r)},n.prototype.batchNorm=function(t,e,r,i,a){return a===void 0&&(a=.001),this.throwIfDisposed(),Xe.batchNorm(this,t,e,r,i,a)},n.prototype.all=function(t,e){return t===void 0&&(t=null),e===void 0&&(e=!1),this.throwIfDisposed(),Xe.all(this,t,e)},n.prototype.any=function(t,e){return t===void 0&&(t=null),e===void 0&&(e=!1),this.throwIfDisposed(),Xe.any(this,t,e)},n.prototype.logSumExp=function(t,e){return t===void 0&&(t=null),e===void 0&&(e=!1),this.throwIfDisposed(),Xe.logSumExp(this,t,e)},n.prototype.sum=function(t,e){return t===void 0&&(t=null),e===void 0&&(e=!1),this.throwIfDisposed(),Xe.sum(this,t,e)},n.prototype.prod=function(t,e){return t===void 0&&(t=null),e===void 0&&(e=!1),this.throwIfDisposed(),Xe.prod(this,t,e)},n.prototype.mean=function(t,e){return t===void 0&&(t=null),e===void 0&&(e=!1),this.throwIfDisposed(),Xe.mean(this,t,e)},n.prototype.min=function(t,e){return t===void 0&&(t=null),e===void 0&&(e=!1),this.throwIfDisposed(),Xe.min(this,t,e)},n.prototype.max=function(t,e){return t===void 0&&(t=null),e===void 0&&(e=!1),this.throwIfDisposed(),Xe.max(this,t,e)},n.prototype.argMin=function(t){return t===void 0&&(t=null),this.throwIfDisposed(),Xe.argMin(this,t)},n.prototype.argMax=function(t){return t===void 0&&(t=null),this.throwIfDisposed(),Xe.argMax(this,t)},n.prototype.cast=function(t){return this.throwIfDisposed(),Xe.cast(this,t)},n.prototype.add=function(t){return this.throwIfDisposed(),Xe.add(this,t)},n.prototype.addStrict=function(t){return this.throwIfDisposed(),Xe.addStrict(this,t)},n.prototype.atan2=function(t){return this.throwIfDisposed(),Xe.atan2(this,t)},n.prototype.sub=function(t){return this.throwIfDisposed(),Xe.sub(this,t)},n.prototype.subStrict=function(t){return this.throwIfDisposed(),Xe.subStrict(this,t)},n.prototype.pow=function(t){return this.throwIfDisposed(),Xe.pow(this,t)},n.prototype.powStrict=function(t){return this.throwIfDisposed(),Xe.powStrict(this,t)},n.prototype.mul=function(t){return this.throwIfDisposed(),Xe.mul(this,t)},n.prototype.mulStrict=function(t){return this.throwIfDisposed(),Xe.mulStrict(this,t)},n.prototype.div=function(t){return this.throwIfDisposed(),Xe.div(this,t)},n.prototype.divNoNan=function(t){return this.throwIfDisposed(),Xe.divNoNan(this,t)},n.prototype.floorDiv=function(t){return this.throwIfDisposed(),Xe.floorDiv(this,t)},n.prototype.divStrict=function(t){return this.throwIfDisposed(),Xe.divStrict(this,t)},n.prototype.minimum=function(t){return this.throwIfDisposed(),Xe.minimum(this,t)},n.prototype.minimumStrict=function(t){return this.throwIfDisposed(),Xe.minimumStrict(this,t)},n.prototype.maximum=function(t){return this.throwIfDisposed(),Xe.maximum(this,t)},n.prototype.maximumStrict=function(t){return this.throwIfDisposed(),Xe.maximumStrict(this,t)},n.prototype.mod=function(t){return this.throwIfDisposed(),Xe.mod(this,t)},n.prototype.modStrict=function(t){return this.throwIfDisposed(),Xe.modStrict(this,t)},n.prototype.squaredDifferenceStrict=function(t){return this.throwIfDisposed(),Xe.squaredDifferenceStrict(this,t)},n.prototype.transpose=function(t){return this.throwIfDisposed(),Xe.transpose(this,t)},n.prototype.notEqual=function(t){return this.throwIfDisposed(),Xe.notEqual(this,t)},n.prototype.notEqualStrict=function(t){return this.throwIfDisposed(),Xe.notEqualStrict(this,t)},n.prototype.less=function(t){return this.throwIfDisposed(),Xe.less(this,t)},n.prototype.lessStrict=function(t){return this.throwIfDisposed(),Xe.lessStrict(this,t)},n.prototype.equal=function(t){return this.throwIfDisposed(),Xe.equal(this,t)},n.prototype.equalStrict=function(t){return this.throwIfDisposed(),Xe.equalStrict(this,t)},n.prototype.lessEqual=function(t){return this.throwIfDisposed(),Xe.lessEqual(this,t)},n.prototype.lessEqualStrict=function(t){return this.throwIfDisposed(),Xe.lessEqualStrict(this,t)},n.prototype.greater=function(t){return this.throwIfDisposed(),Xe.greater(this,t)},n.prototype.greaterStrict=function(t){return this.throwIfDisposed(),Xe.greaterStrict(this,t)},n.prototype.greaterEqual=function(t){return this.throwIfDisposed(),Xe.greaterEqual(this,t)},n.prototype.greaterEqualStrict=function(t){return this.throwIfDisposed(),Xe.greaterEqualStrict(this,t)},n.prototype.logicalAnd=function(t){return this.throwIfDisposed(),Xe.logicalAnd(this,t)},n.prototype.logicalOr=function(t){return this.throwIfDisposed(),Xe.logicalOr(this,t)},n.prototype.logicalNot=function(){return this.throwIfDisposed(),Xe.logicalNot(this)},n.prototype.logicalXor=function(t){return this.throwIfDisposed(),Xe.logicalXor(this,t)},n.prototype.where=function(t,e){return this.throwIfDisposed(),Xe.where(t,this,e)},n.prototype.neg=function(){return this.throwIfDisposed(),Xe.neg(this)},n.prototype.ceil=function(){return this.throwIfDisposed(),Xe.ceil(this)},n.prototype.floor=function(){return this.throwIfDisposed(),Xe.floor(this)},n.prototype.sign=function(){return this.throwIfDisposed(),Xe.sign(this)},n.prototype.isNaN=function(){return this.throwIfDisposed(),Xe.isNaN(this)},n.prototype.isInf=function(){return this.throwIfDisposed(),Xe.isInf(this)},n.prototype.isFinite=function(){return this.throwIfDisposed(),Xe.isFinite(this)},n.prototype.exp=function(){return this.throwIfDisposed(),Xe.exp(this)},n.prototype.expm1=function(){return this.throwIfDisposed(),Xe.expm1(this)},n.prototype.log=function(){return this.throwIfDisposed(),Xe.log(this)},n.prototype.log1p=function(){return this.throwIfDisposed(),Xe.log1p(this)},n.prototype.sqrt=function(){return this.throwIfDisposed(),Xe.sqrt(this)},n.prototype.rsqrt=function(){return this.throwIfDisposed(),Xe.rsqrt(this)},n.prototype.square=function(){return this.throwIfDisposed(),Xe.square(this)},n.prototype.reciprocal=function(){return this.throwIfDisposed(),Xe.reciprocal(this)},n.prototype.abs=function(){return this.throwIfDisposed(),Xe.abs(this)},n.prototype.clipByValue=function(t,e){return this.throwIfDisposed(),Xe.clipByValue(this,t,e)},n.prototype.relu=function(){return this.throwIfDisposed(),Xe.relu(this)},n.prototype.relu6=function(){return this.throwIfDisposed(),Xe.relu6(this)},n.prototype.elu=function(){return this.throwIfDisposed(),Xe.elu(this)},n.prototype.selu=function(){return this.throwIfDisposed(),Xe.selu(this)},n.prototype.leakyRelu=function(t){return t===void 0&&(t=.2),this.throwIfDisposed(),Xe.leakyRelu(this,t)},n.prototype.prelu=function(t){return this.throwIfDisposed(),Xe.prelu(this,t)},n.prototype.sigmoid=function(){return this.throwIfDisposed(),Xe.sigmoid(this)},n.prototype.logSigmoid=function(){return this.throwIfDisposed(),Xe.logSigmoid(this)},n.prototype.softplus=function(){return this.throwIfDisposed(),Xe.softplus(this)},n.prototype.zerosLike=function(){return this.throwIfDisposed(),Xe.zerosLike(this)},n.prototype.onesLike=function(){return this.throwIfDisposed(),Xe.onesLike(this)},n.prototype.sin=function(){return this.throwIfDisposed(),Xe.sin(this)},n.prototype.cos=function(){return this.throwIfDisposed(),Xe.cos(this)},n.prototype.tan=function(){return this.throwIfDisposed(),Xe.tan(this)},n.prototype.asin=function(){return this.throwIfDisposed(),Xe.asin(this)},n.prototype.acos=function(){return this.throwIfDisposed(),Xe.acos(this)},n.prototype.atan=function(){return this.throwIfDisposed(),Xe.atan(this)},n.prototype.sinh=function(){return this.throwIfDisposed(),Xe.sinh(this)},n.prototype.cosh=function(){return this.throwIfDisposed(),Xe.cosh(this)},n.prototype.tanh=function(){return this.throwIfDisposed(),Xe.tanh(this)},n.prototype.asinh=function(){return this.throwIfDisposed(),Xe.asinh(this)},n.prototype.acosh=function(){return this.throwIfDisposed(),Xe.acosh(this)},n.prototype.atanh=function(){return this.throwIfDisposed(),Xe.atanh(this)},n.prototype.erf=function(){return this.throwIfDisposed(),Xe.erf(this)},n.prototype.round=function(){return this.throwIfDisposed(),Xe.round(this)},n.prototype.step=function(t){return t===void 0&&(t=0),this.throwIfDisposed(),Xe.step(this,t)},n.prototype.softmax=function(t){return t===void 0&&(t=-1),this.throwIfDisposed(),Xe.softmax(this,t)},n.prototype.logSoftmax=function(t){return t===void 0&&(t=-1),this.throwIfDisposed(),Xe.logSoftmax(this,t)},n.prototype.resizeBilinear=function(t,e){return e===void 0&&(e=!1),this.throwIfDisposed(),Xe.image.resizeBilinear(this,t,e)},n.prototype.resizeNearestNeighbor=function(t,e){return e===void 0&&(e=!1),this.throwIfDisposed(),Xe.image.resizeNearestNeighbor(this,t,e)},n.prototype.conv1d=function(t,e,r,i,a,s){return i===void 0&&(i="NWC"),a===void 0&&(a=1),this.throwIfDisposed(),Xe.conv1d(this,t,e,r,i,a,s)},n.prototype.conv2d=function(t,e,r,i,a,s){return i===void 0&&(i="NHWC"),a===void 0&&(a=[1,1]),this.throwIfDisposed(),Xe.conv2d(this,t,e,r,i,a,s)},n.prototype.conv2dTranspose=function(t,e,r,i,a){return this.throwIfDisposed(),Xe.conv2dTranspose(this,t,e,r,i,a)},n.prototype.depthwiseConv2D=function(t,e,r,i,a,s){return i===void 0&&(i="NHWC"),a===void 0&&(a=[1,1]),this.throwIfDisposed(),Xe.depthwiseConv2d(this,t,e,r,i,a,s)},n.prototype.separableConv2d=function(t,e,r,i,a,s){return a===void 0&&(a=[1,1]),s===void 0&&(s="NHWC"),this.throwIfDisposed(),Xe.separableConv2d(this,t,e,r,i,a,s)},n.prototype.avgPool=function(t,e,r,i){return this.throwIfDisposed(),Xe.avgPool(this,t,e,r,i)},n.prototype.maxPool=function(t,e,r,i){return this.throwIfDisposed(),Xe.maxPool(this,t,e,r,i)},n.prototype.localResponseNormalization=function(t,e,r,i){return t===void 0&&(t=5),e===void 0&&(e=1),r===void 0&&(r=1),i===void 0&&(i=.5),Xe.localResponseNormalization(this,t,e,r,i)},n.prototype.pool=function(t,e,r,i,a){return this.throwIfDisposed(),Xe.pool(this,t,e,r,i,a)},n.prototype.variable=function(t,e,r){return t===void 0&&(t=!0),this.throwIfDisposed(),zt().makeVariable(this,t,e,r)},n.prototype.unsortedSegmentSum=function(t,e){return this.throwIfDisposed(),Xe.unsortedSegmentSum(this,t,e)},n.prototype.batchToSpaceND=function(t,e){return this.throwIfDisposed(),Xe.batchToSpaceND(this,t,e)},n.prototype.spaceToBatchND=function(t,e){return this.throwIfDisposed(),Xe.spaceToBatchND(this,t,e)},n.prototype.topk=function(t,e){return t===void 0&&(t=1),e===void 0&&(e=!0),this.throwIfDisposed(),Xe.topk(this,t,e)},n.prototype.stridedSlice=function(t,e,r,i,a,s,u,l){return i===void 0&&(i=0),a===void 0&&(a=0),s===void 0&&(s=0),u===void 0&&(u=0),l===void 0&&(l=0),this.throwIfDisposed(),Xe.stridedSlice(this,t,e,r,i,a,s,u,l)},n.prototype.depthToSpace=function(t,e){return this.throwIfDisposed(),Xe.depthToSpace(this,t,e)},n.prototype.fft=function(){return this.throwIfDisposed(),Xe.spectral.fft(this)},n.prototype.ifft=function(){return this.throwIfDisposed(),Xe.spectral.ifft(this)},n.prototype.rfft=function(){return this.throwIfDisposed(),Xe.spectral.rfft(this)},n.prototype.irfft=function(){return this.throwIfDisposed(),Xe.spectral.irfft(this)},n}();Object.defineProperty(Ft,Symbol.hasInstance,{value:function(n){return!!n&&n.dataId!=null&&n.shape!=null&&n.dtype!=null}});var kr,hr,vr,$t,Xt,sr=function(n){function t(e,r,i,a){var s=n.call(this,e.shape,e.dtype,e.dataId,a)||this;return s.trainable=r,s.name=i,s}return S(t,n),t.prototype.assign=function(e){if(e.dtype!==this.dtype)throw new Error("dtype of the new value ("+e.dtype+") and previous value ("+this.dtype+") must match");if(!fe(e.shape,this.shape))throw new Error("shape of the new value ("+e.shape+") and previous value ("+this.shape+") must match");zt().disposeTensor(this),this.dataId=e.dataId,zt().incRef(this,null)},t.prototype.dispose=function(){zt().disposeVariable(this),this.isDisposedInternal=!0},t}(Ft);Object.defineProperty(sr,Symbol.hasInstance,{value:function(n){return n instanceof Ft&&n.assign!=null&&n.assign instanceof Function}}),function(n){n.R0="R0",n.R1="R1",n.R2="R2",n.R3="R3",n.R4="R4",n.R5="R5",n.R6="R6"}(kr||(kr={})),function(n){n.float32="float32",n.int32="int32",n.bool="int32",n.complex64="complex64"}(hr||(hr={})),function(n){n.float32="float32",n.int32="int32",n.bool="bool",n.complex64="complex64"}(vr||(vr={})),function(n){n.float32="float32",n.int32="float32",n.bool="float32",n.complex64="complex64"}($t||($t={})),function(n){n.float32="complex64",n.int32="complex64",n.bool="complex64",n.complex64="complex64"}(Xt||(Xt={}));var Nr={float32:$t,int32:hr,bool:vr,complex64:Xt};function Tt(n,t){if(n==="string"||t==="string"){if(n==="string"&&t==="string")return"string";throw new Error("Can not upcast "+n+" with "+t)}return Nr[n][t]}function Mr(n){return Tt(n,"int32")}function Jt(n,t){if(n.dtype===t.dtype)return[n,t];var e=Tt(n.dtype,t.dtype);return[n.cast(e),t.cast(e)]}function Xr(n,t){q(n.dtype===t.dtype,function(){return"The dtypes of the first("+n.dtype+") and second("+t.dtype+") input must match"})}function Kr(n){var t=[];return function e(r,i,a){if(r!=null){if(r instanceof Ft)return void i.push(r);if(s=r,!(!Array.isArray(s)&&typeof s!="object")){var s,u=r;for(var l in u){var d=u[l];a.has(d)||(a.add(d),e(d,i,a))}}}}(n,t,new Set),t}var on,hn=Object.freeze({makeTypesMatch:Jt,assertTypesMatch:Xr,isTensorInList:function(n,t){return t.some(function(e){return e.id===n.id})},getTensorsInContainer:Kr}),Yr=function(){function n(){this.registeredVariables={},this.nextTapeNodeId=0,this.numBytes=0,this.numTensors=0,this.numStringTensors=0,this.numDataBuffers=0,this.gradientDepth=0,this.kernelDepth=0,this.scopeStack=[],this.numDataMovesStack=[],this.nextScopeId=0,this.tensorInfo=new WeakMap,this.profiling=!1,this.activeProfile={newBytes:0,newTensors:0,peakBytes:0,kernels:[],result:null}}return n.prototype.dispose=function(){for(var t in this.registeredVariables)this.registeredVariables[t].dispose()},n}(),$r=function(){function n(t){this.ENV=t,this.registry={},this.registryFactory={},this.pendingBackendInitId=0,this.state=new Yr}return n.prototype.ready=function(){return C(this,void 0,void 0,function(){var t,e,r;return E(this,function(i){switch(i.label){case 0:if(this.pendingBackendInit!=null)return[2,this.pendingBackendInit.then(function(){})];if(this.backendInstance!=null)return[2];t=this.getSortedBackends(),e=0,i.label=1;case 1:return e<t.length?(r=t[e],[4,this.initializeBackend(r).success]):[3,5];case 2:return i.sent()?[4,this.setBackend(r)]:[3,4];case 3:return i.sent(),[2];case 4:return e++,[3,1];case 5:throw new Error("Could not initialize any backends, all backend initializations failed.")}})})},Object.defineProperty(n.prototype,"backend",{get:function(){if(this.pendingBackendInit!=null)throw new Error("Backend '"+this.backendName+"' has not yet been initialized. Make sure to await tf.ready() or await tf.setBackend() before calling other methods");if(this.backendInstance==null){var t=this.initializeBackendsAndReturnBest(),e=t.name;if(t.asyncInit)throw new Error("The highest priority backend '"+e+"' has not yet been initialized. Make sure to await tf.ready() or await tf.setBackend() before calling other methods");this.setBackend(e)}return this.backendInstance},enumerable:!0,configurable:!0}),n.prototype.backendNames=function(){return Object.keys(this.registryFactory)},n.prototype.findBackend=function(t){return!(t in this.registry)&&(!(t in this.registryFactory)||this.initializeBackend(t).asyncInit)?null:this.registry[t]},n.prototype.findBackendFactory=function(t){return t in this.registryFactory?this.registryFactory[t].factory:null},n.prototype.registerBackend=function(t,e,r){return r===void 0&&(r=1),t in this.registryFactory?(console.warn(t+" backend was already registered. Reusing existing backend factory."),!1):(this.registryFactory[t]={factory:e,priority:r},!0)},n.prototype.setBackend=function(t){return C(this,void 0,void 0,function(){var e,r,i;return E(this,function(a){switch(a.label){case 0:if(this.registryFactory[t]==null)throw new Error("Backend name '"+t+"' not found in registry");return this.backendName=t,this.registry[t]!=null?[3,4]:(this.backendInstance=null,e=this.initializeBackend(t),r=e.success,e.asyncInit?[4,r]:[3,2]);case 1:return i=a.sent(),[3,3];case 2:i=r,a.label=3;case 3:if(!i)return[2,!1];a.label=4;case 4:return this.backendInstance=this.registry[t],this.setupRegisteredKernels(),this.profiler=new Lt(this.backendInstance),[2,!0]}})})},n.prototype.setupRegisteredKernels=function(){var t=this;J(this.backendName).forEach(function(e){e.setupFunc!=null&&e.setupFunc(t.backendInstance)})},n.prototype.disposeRegisteredKernels=function(t){var e=this;J(t).forEach(function(r){r.disposeFunc!=null&&r.disposeFunc(e.registry[t])})},n.prototype.initializeBackend=function(t){var e=this,r=this.registryFactory[t];if(r==null)throw new Error("Cannot initialize backend "+t+", no registration found.");try{var i=r.factory();if(Promise.resolve(i)===i){var a=++this.pendingBackendInitId,s=i.then(function(u){return!(a<e.pendingBackendInitId)&&(e.registry[t]=u,e.pendingBackendInit=null,!0)}).catch(function(u){return!(a<e.pendingBackendInitId)&&(e.pendingBackendInit=null,console.warn("Initialization of backend "+t+" failed"),console.warn(u.stack||u.message),!1)});return this.pendingBackendInit=s,{success:s,asyncInit:!0}}return this.registry[t]=i,{success:!0,asyncInit:!1}}catch(u){return console.warn("Initialization of backend "+t+" failed"),console.warn(u.stack||u.message),{success:!1,asyncInit:!1}}},n.prototype.removeBackend=function(t){if(!(t in this.registryFactory))throw new Error(t+" backend not found in registry");this.backendName===t&&this.pendingBackendInit!=null&&this.pendingBackendInitId++,t in this.registry&&(this.disposeRegisteredKernels(t),this.registry[t].dispose(),delete this.registry[t]),delete this.registryFactory[t],this.backendName===t&&(this.pendingBackendInit=null,this.backendName=null,this.backendInstance=null)},n.prototype.getSortedBackends=function(){var t=this;if(Object.keys(this.registryFactory).length===0)throw new Error("No backend found in registry.");return Object.keys(this.registryFactory).sort(function(e,r){return t.registryFactory[r].priority-t.registryFactory[e].priority})},n.prototype.initializeBackendsAndReturnBest=function(){for(var t=this.getSortedBackends(),e=0;e<t.length;e++){var r=t[e],i=this.initializeBackend(r),a=i.success,s=i.asyncInit;if(s||a)return{name:r,asyncInit:s}}throw new Error("Could not initialize any backends, all backend initializations failed.")},n.prototype.moveData=function(t,e){var r=this.state.tensorInfo.get(e),i=r.backend,a=this.readSync(e);i.disposeData(e),r.backend=t,t.move(e,a,r.shape,r.dtype),this.shouldCheckForMemLeaks()&&this.state.numDataMovesStack[this.state.numDataMovesStack.length-1]++},n.prototype.tidy=function(t,e){var r,i=this,a=null;if(e==null){if(typeof t!="function")throw new Error("Please provide a function to tidy()");e=t}else{if(typeof t!="string"&&!(t instanceof String))throw new Error("When calling with two arguments, the first argument to tidy() must be a string");if(typeof e!="function")throw new Error("When calling with two arguments, the 2nd argument to tidy() must be a function");a=t}return this.scopedRun(function(){return i.startScope(a)},function(){return i.endScope(r)},function(){return(r=e())instanceof Promise&&console.error("Cannot return a Promise inside of tidy."),r})},n.prototype.scopedRun=function(t,e,r){t();try{var i=r();return e(),i}catch(a){throw e(),a}},n.prototype.nextTensorId=function(){return n.nextTensorId++},n.prototype.nextVariableId=function(){return n.nextVariableId++},n.prototype.clone=function(t){var e=this.makeTensorFromDataId(t.dataId,t.shape,t.dtype),r={x:t};return this.addTapeNode(this.state.activeScope.name,r,[e],function(i){return{x:function(){return i.toFloat()}}},[]),e},n.prototype.runKernel=function(t,e,r,i,a){return this.runKernelFunc(null,e,null,t,r,i,a)},n.prototype.shouldCheckForMemLeaks=function(){return this.ENV.getBool("IS_TEST")},n.prototype.checkKernelForMemLeak=function(t,e,r){var i=this.backend.numDataIds(),a=0;r.forEach(function(l){a+=l.dtype==="complex64"?3:1});var s=this.state.numDataMovesStack[this.state.numDataMovesStack.length-1],u=i-e-a-s;if(u>0)throw new Error("Backend '"+this.backendName+"' has an internal memory leak ("+u+" data ids) after running '"+t+"'")},n.prototype.runKernelFunc=function(t,e,r,i,a,s,u){var l,d=this;s===void 0&&(s=[]),u===void 0&&(u=[]);var A=[],I=this.isTapeOn();i==null&&(i=this.state.activeScope!=null?this.state.activeScope.name:"");var O,z=function(be){I&&(A=be.map(function(Ae){return d.keep(d.clone(Ae))}))},re=this.state.numBytes,oe=this.state.numTensors;this.shouldCheckForMemLeaks()&&this.state.numDataMovesStack.push(0);var ae,se=D(i,this.backendName);return O=se!=null?function(){var be=d.backend.numDataIds();ae=se.kernelFunc({inputs:e,attrs:a,backend:d.backend});var Ae=Array.isArray(ae)?ae:[ae];d.shouldCheckForMemLeaks()&&d.checkKernelForMemLeak(i,be,Ae);var me=Ae.map(function(Oe){var Le=Oe.dataId,Ue=Oe.shape,Ne=Oe.dtype;return d.makeTensorFromDataId(Le,Ue,Ne)}),Ce=me.filter(function(Oe,Le){return u[Le]});return z((s||[]).slice().concat(Ce)),me}:function(){var be=d.backend.numDataIds();ae=d.tidy(function(){return t(d.backend,z)});var Ae=Array.isArray(ae)?ae:[ae];return d.shouldCheckForMemLeaks()&&d.checkKernelForMemLeak(i,be,Ae),Ae},this.scopedRun(function(){return d.state.kernelDepth++},function(){return d.state.kernelDepth--},function(){l=d.ENV.getBool("DEBUG")?d.profiler.profileKernel(i,e,function(){return O()}):O()}),I&&this.addTapeNode(i,e,l,r,A),this.state.profiling&&this.state.activeProfile.kernels.push({name:i,bytesAdded:this.state.numBytes-re,totalBytesSnapshot:this.state.numBytes,tensorsAdded:this.state.numTensors-oe,totalTensorsSnapshot:this.state.numTensors,inputShapes:Object.keys(e).map(function(be){return e[be].shape}),outputShapes:l.map(function(be){return be.shape})}),Array.isArray(ae)?l:l[0]},n.prototype.makeTensor=function(t,e,r,i){if(t==null)throw new Error("Values passed to engine.makeTensor() are null");r=r||"float32",i=i||this.backend;var a=t;r==="string"&&Ee(t[0])&&(a=t.map(function(A){return Pe(A)}));var s=i.write(a,e,r),u=new Ft(e,r,s,this.nextTensorId());if(this.incRef(u,i),r==="string"){var l=this.state.tensorInfo.get(s),d=ue(a);this.state.numBytes+=d-l.bytes,l.bytes=d}return u},n.prototype.makeTensorFromDataId=function(t,e,r,i){var a=new Ft(e,r=r||"float32",t,this.nextTensorId());return this.incRef(a,i),a},n.prototype.makeVariable=function(t,e,r,i){e===void 0&&(e=!0),r=r||this.nextVariableId().toString(),i!=null&&i!==t.dtype&&(t=t.asType(i));var a=new sr(t,e,r,this.nextTensorId());if(this.state.registeredVariables[a.name]!=null)throw new Error("Variable with name "+a.name+" was already registered");return this.state.registeredVariables[a.name]=a,this.incRef(a,this.backend),a},n.prototype.incRef=function(t,e){var r=this.state.tensorInfo.has(t.dataId)?this.state.tensorInfo.get(t.dataId).refCount:0;if(this.state.numTensors++,t.dtype==="string"&&this.state.numStringTensors++,r===0){this.state.numDataBuffers++;var i=0;t.dtype!=="complex64"&&t.dtype!=="string"&&(i=t.size*$(t.dtype)),this.state.tensorInfo.set(t.dataId,{backend:e||this.backend,dtype:t.dtype,shape:t.shape,bytes:i,refCount:0}),this.state.numBytes+=i}this.state.tensorInfo.get(t.dataId).refCount++,t instanceof sr||this.track(t)},n.prototype.disposeTensor=function(t){if(this.state.tensorInfo.has(t.dataId)){this.state.numTensors--,t.dtype==="string"&&this.state.numStringTensors--;var e=this.state.tensorInfo.get(t.dataId);e.refCount<=1?(t.dtype!=="complex64"&&(this.state.numBytes-=e.bytes),this.state.numDataBuffers--,e.backend.disposeData(t.dataId),this.state.tensorInfo.delete(t.dataId)):this.state.tensorInfo.get(t.dataId).refCount--}},n.prototype.disposeVariables=function(){for(var t in this.state.registeredVariables){var e=this.state.registeredVariables[t];this.disposeVariable(e)}},n.prototype.disposeVariable=function(t){this.disposeTensor(t),this.state.registeredVariables[t.name]!=null&&delete this.state.registeredVariables[t.name]},n.prototype.memory=function(){var t=this.backend.memory();return t.numTensors=this.state.numTensors,t.numDataBuffers=this.state.numDataBuffers,t.numBytes=this.state.numBytes,this.state.numStringTensors>0&&(t.unreliable=!0,t.reasons==null&&(t.reasons=[]),t.reasons.push("Memory usage by string tensors is approximate (2 bytes per character)")),t},n.prototype.profile=function(t){return C(this,void 0,void 0,function(){var e,r;return E(this,function(i){return this.state.profiling=!0,e=this.state.numBytes,r=this.state.numTensors,this.state.activeProfile.kernels=[],this.state.activeProfile.result=t(),this.state.profiling=!1,this.state.activeProfile.peakBytes=Math.max.apply(Math,this.state.activeProfile.kernels.map(function(a){return a.totalBytesSnapshot})),this.state.activeProfile.newBytes=this.state.numBytes-e,this.state.activeProfile.newTensors=this.state.numTensors-r,[2,this.state.activeProfile]})})},n.prototype.isTapeOn=function(){return this.state.gradientDepth>0&&this.state.kernelDepth===0},n.prototype.addTapeNode=function(t,e,r,i,a){var s=this,u={id:this.state.nextTapeNodeId++,kernelName:t,inputs:e,outputs:r,saved:a},l=F(t);l!=null&&(i=l.gradFunc),i!=null&&(u.gradient=function(d){return d=d.map(function(A,I){if(A==null){var O=r[I],z=rt(O.size,O.dtype);return s.makeTensor(z,O.shape,O.dtype)}return A}),i(d.length>1?d:d[0],a)}),this.state.activeTape.push(u)},n.prototype.keep=function(t){return t.kept=!0,t},n.prototype.startTape=function(){this.state.gradientDepth===0&&(this.state.activeTape=[]),this.state.gradientDepth++},n.prototype.endTape=function(){this.state.gradientDepth--},n.prototype.startScope=function(t){var e={track:[],name:"unnamed scope",id:this.state.nextScopeId++};t&&(e.name=t),this.state.scopeStack.push(e),this.state.activeScope=e},n.prototype.endScope=function(t){for(var e=this,r=Kr(t),i=new Set(r.map(function(l){return l.id})),a=0;a<this.state.activeScope.track.length;a++){var s=this.state.activeScope.track[a];s.kept||i.has(s.id)||s.dispose()}var u=this.state.scopeStack.pop();this.state.activeScope=this.state.scopeStack.length===0?null:this.state.scopeStack[this.state.scopeStack.length-1],r.forEach(function(l){l.kept||l.scopeId!==u.id||e.track(l)})},n.prototype.gradients=function(t,e,r,i){var a=this;if(i===void 0&&(i=!1),q(e.length>0,function(){return"gradients() received an empty list of xs."}),r!=null&&r.dtype!=="float32")throw new Error("dy must have 'float32' dtype, but has '"+r.dtype+"'");var s=this.scopedRun(function(){return a.startTape()},function(){return a.endTape()},function(){return a.tidy("forward",t)});q(s instanceof Ft,function(){return"The result y returned by f() must be a tensor."});var u=function(l,d,A){for(var I={},O={},z=0;z<d.length;z++)I[d[z].id]=!0;for(z=0;z<l.length;z++){var re=(Oe=l[z]).inputs;for(var oe in re){for(var ae=re[oe],se=!1,be=0;be<d.length;be++)if(I[ae.id]){Oe.outputs.forEach(function(Fe){return I[Fe.id]=!0}),se=!0,O[Oe.id]=!0;break}if(se)break}}var Ae={};Ae[A.id]=!0;var me={};for(z=l.length-1;z>=0;z--)for(re=(Oe=l[z]).inputs,be=0;be<Oe.outputs.length;be++)if(Ae[Oe.outputs[be].id]){for(var oe in re)Ae[re[oe].id]=!0,me[Oe.id]=!0;break}var Ce=[];for(z=0;z<l.length;z++){var Oe;if(O[(Oe=l[z]).id]&&me[Oe.id]){var Le={};for(var oe in Oe.inputs){var Ue=Oe.inputs[oe];I[Ue.id]&&(Le[oe]=Ue)}var Ne=Object.assign({},Oe);Ne.inputs=Le,Ne.outputs=Oe.outputs,Ce.push(Ne)}}return Ce}(this.state.activeTape,e,s);if(!i&&u.length===0&&e.length>0)throw new Error("Cannot compute gradient of y=f(x) with respect to x. Make sure that the f you passed encloses all operations that lead from x to y.");return this.tidy("backward",function(){var l,d,A={};A[s.id]=r==null?(l=s.shape,d=$e(ce(l),"float32"),We.makeTensor(d,l,"float32")):r,function(O,z,re){for(var oe=function(se){var be=z[se],Ae=[];if(be.outputs.forEach(function(Le){var Ue=O[Le.id];Ue!=null?Ae.push(Ue):Ae.push(null)}),be.gradient==null)throw new Error("Cannot compute gradient: gradient function not found for "+be.kernelName+".");var me=be.gradient(Ae),Ce=function(Le){if(!(Le in me))throw new Error("Cannot backprop through input "+Le+". Available gradients found: "+Object.keys(me)+".");var Ue=re(function(){return me[Le]()});if(Ue.dtype!=="float32")throw new Error("Error in gradient for op "+be.kernelName+". The gradient of input "+Le+" must have 'float32' dtype, but has '"+Ue.dtype+"'");var Ne=be.inputs[Le];if(!fe(Ue.shape,Ne.shape))throw new Error("Error in gradient for op "+be.kernelName+". The gradient of input '"+Le+"' has shape '"+Ue.shape+"', which does not match the shape of the input '"+Ne.shape+"'");if(O[Ne.id]==null)O[Ne.id]=Ue;else{var Fe=O[Ne.id];O[Ne.id]=Fe.add(Ue),Fe.dispose()}};for(var Oe in be.inputs)Ce(Oe)},ae=z.length-1;ae>=0;ae--)oe(ae)}(A,u,function(O){return a.tidy(O)});var I=e.map(function(O){return A[O.id]});return a.state.gradientDepth===0&&(a.state.activeTape.forEach(function(O){for(var z=0,re=O.saved;z<re.length;z++)re[z].dispose()}),a.state.activeTape=null),{value:s,grads:I}})},n.prototype.customGrad=function(t){var e=this;return q(Re(t),function(){return"The f passed in customGrad(f) must be a function."}),function(){for(var r,i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];q(i.every(function(u){return u instanceof Ft}),function(){return"The args passed in customGrad(f)(x1, x2,...) must all be tensors"});var s={};return i.forEach(function(u,l){s[l]=u}),e.runKernelFunc(function(u,l){return q((r=t.apply(void 0,i.concat([l]))).value instanceof Ft,function(){return"The function f passed in customGrad(f) must return an object where `obj.value` is a tensor"}),q(Re(r.gradFunc),function(){return"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function."}),r.value},s,function(u,l){var d=r.gradFunc(u,l),A=Array.isArray(d)?d:[d];q(A.length===i.length,function(){return"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function that returns the same number of tensors as inputs passed to f(...)."}),q(A.every(function(O){return O instanceof Ft}),function(){return"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function that returns a list of only tensors."});var I={};return A.forEach(function(O,z){I[z]=function(){return O}}),I})}},n.prototype.readSync=function(t){return this.state.tensorInfo.get(t).backend.readSync(t)},n.prototype.read=function(t){return this.state.tensorInfo.get(t).backend.read(t)},n.prototype.time=function(t){return C(this,void 0,void 0,function(){var e,r;return E(this,function(i){switch(i.label){case 0:return e=qe(),[4,this.backend.time(t)];case 1:return(r=i.sent()).wallMs=qe()-e,[2,r]}})})},n.prototype.track=function(t){return this.state.activeScope!=null&&(t.scopeId=this.state.activeScope.id,this.state.activeScope.track.push(t)),t},Object.defineProperty(n.prototype,"registeredVariables",{get:function(){return this.state.registeredVariables},enumerable:!0,configurable:!0}),n.prototype.reset=function(){for(var t in this.pendingBackendInitId++,this.state.dispose(),this.ENV.reset(),this.state=new Yr,this.registry)this.disposeRegisteredKernels(t),this.registry[t].dispose(),delete this.registry[t];this.backendName=null,this.backendInstance=null,this.pendingBackendInit=null},n.nextTensorId=0,n.nextVariableId=0,n}(),We=function(){var n=function(){if(on==null){var e=void 0;if(typeof window!="undefined")e=window;else if(typeof Te.g!="undefined")e=Te.g;else if(typeof b!="undefined")e=b;else{if(typeof self=="undefined")throw new Error("Could not find a global object");b=self}on=e}return on}();if(n._tfengine==null){var t=new j(n);n._tfengine=new $r(t)}return function(e){Q=e}(n._tfengine.ENV),zt=function(){return n._tfengine},n._tfengine}();function tn(){return typeof window!="undefined"&&window.document!=null||typeof WorkerGlobalScope!="undefined"}var Zr=P();Zr.registerFlag("DEBUG",function(){return!1},function(n){n&&console.warn("Debugging mode is ON. The output of every math call will be downloaded to CPU and checked for NaNs. This significantly impacts performance.")}),Zr.registerFlag("IS_BROWSER",function(){return tn()}),Zr.registerFlag("IS_NODE",function(){return typeof b!="undefined"&&b.versions!==void 0&&b.versions.node!==void 0}),Zr.registerFlag("IS_CHROME",function(){return typeof navigator!="undefined"&&navigator!=null&&navigator.userAgent!=null&&/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}),Zr.registerFlag("PROD",function(){return!1}),Zr.registerFlag("TENSORLIKE_CHECK_SHAPE_CONSISTENCY",function(){return Zr.getBool("DEBUG")}),Zr.registerFlag("DEPRECATION_WARNINGS_ENABLED",function(){return!0}),Zr.registerFlag("IS_TEST",function(){return!1});var yr,Ge,Ye,ot={},ut={alpha:!1,antialias:!1,premultipliedAlpha:!1,preserveDrawingBuffer:!1,depth:!1,stencil:!1,failIfMajorPerformanceCaveat:!0};function dt(n,t){ot[n]=t}function ht(n){n in ot||(ot[n]=function(e){if(e!==1&&e!==2)throw new Error("Cannot get WebGL rendering context, WebGL is disabled.");var r=function(i){if(typeof OffscreenCanvas!="undefined"&&i===2)return new OffscreenCanvas(300,150);if(typeof document!="undefined")return document.createElement("canvas");throw new Error("Cannot create a canvas in this context")}(e);return r.addEventListener("webglcontextlost",function(i){i.preventDefault(),delete ot[e]},!1),e===1?r.getContext("webgl",ut)||r.getContext("experimental-webgl",ut):r.getContext("webgl2",ut)}(n));var t=ot[n];return t.isContextLost()?(delete ot[n],ht(n)):(t.disable(t.DEPTH_TEST),t.disable(t.STENCIL_TEST),t.disable(t.BLEND),t.disable(t.DITHER),t.disable(t.POLYGON_OFFSET_FILL),t.disable(t.SAMPLE_COVERAGE),t.enable(t.SCISSOR_TEST),t.enable(t.CULL_FACE),t.cullFace(t.BACK),ot[n])}function xt(n,t){return[t,n]}function it(n){var t=ce(n);return De(Math.ceil(t/4))}function Wt(n,t){return[Math.max(1,Math.ceil(t/2)),Math.max(1,Math.ceil(n/2))]}function Pt(n,t){var e,r,i,a,s,u,l,d,A,I=n;return P().getNumber("WEBGL_VERSION")===2?(e=I.R32F,r=I.R16F,i=I.RGBA16F,a=I.RGBA32F,s=I.RED,u=4,l=1,d=I.HALF_FLOAT,A=I.FLOAT):(e=n.RGBA,r=n.RGBA,i=n.RGBA,a=I.RGBA,s=n.RGBA,u=4,l=4,d=t!=null?t.HALF_FLOAT_OES:null,A=n.FLOAT),{internalFormatFloat:e,internalFormatHalfFloat:r,internalFormatPackedHalfFloat:i,internalFormatPackedFloat:a,textureFormatFloat:s,downloadTextureFormat:n.RGBA,downloadUnpackNumChannels:u,defaultNumChannels:l,textureTypeHalfFloat:d,textureTypeFloat:A}}function lt(n,t,e){var r=e();return t&&function(i){var a=i.getError();if(a!==i.NO_ERROR)throw new Error("WebGL Error: "+pr(i,a))}(n),r}(function(n){n[n.DENSE=0]="DENSE",n[n.SHARED_BATCH=1]="SHARED_BATCH"})(yr||(yr={})),function(n){n[n.RENDER=0]="RENDER",n[n.UPLOAD=1]="UPLOAD",n[n.PIXELS=2]="PIXELS",n[n.DOWNLOAD=3]="DOWNLOAD"}(Ge||(Ge={})),function(n){n[n.UNPACKED_FLOAT16=0]="UNPACKED_FLOAT16",n[n.UNPACKED_FLOAT32=1]="UNPACKED_FLOAT32",n[n.PACKED_4X1_UNSIGNED_BYTE=2]="PACKED_4X1_UNSIGNED_BYTE",n[n.PACKED_2X2_FLOAT32=3]="PACKED_2X2_FLOAT32",n[n.PACKED_2X2_FLOAT16=4]="PACKED_2X2_FLOAT16"}(Ye||(Ye={}));var rr=596e-10,er=65504;function dr(n){return!!(P().getBool("WEBGL_RENDER_FLOAT32_ENABLED")||n===0||rr<Math.abs(n)&&Math.abs(n)<er)}function pr(n,t){switch(t){case n.NO_ERROR:return"NO_ERROR";case n.INVALID_ENUM:return"INVALID_ENUM";case n.INVALID_VALUE:return"INVALID_VALUE";case n.INVALID_OPERATION:return"INVALID_OPERATION";case n.INVALID_FRAMEBUFFER_OPERATION:return"INVALID_FRAMEBUFFER_OPERATION";case n.OUT_OF_MEMORY:return"OUT_OF_MEMORY";case n.CONTEXT_LOST_WEBGL:return"CONTEXT_LOST_WEBGL";default:return"Unknown error code "+t}}function Er(n,t,e){return Jr(n,t,function(){return n.getExtension(e)},'Extension "'+e+'" not supported on this browser.')}function jr(n,t,e){var r=Jr(n,t,function(){return n.createShader(n.VERTEX_SHADER)},"Unable to create vertex WebGLShader.");if(lt(n,t,function(){return n.shaderSource(r,e)}),lt(n,t,function(){return n.compileShader(r)}),n.getShaderParameter(r,n.COMPILE_STATUS)===!1)throw console.log(n.getShaderInfoLog(r)),new Error("Failed to compile vertex shader.");return r}function Wr(n,t,e){var r=Jr(n,t,function(){return n.createShader(n.FRAGMENT_SHADER)},"Unable to create fragment WebGLShader.");if(lt(n,t,function(){return n.shaderSource(r,e)}),lt(n,t,function(){return n.compileShader(r)}),n.getShaderParameter(r,n.COMPILE_STATUS)===!1)throw function(i,a){var s=ar.exec(a);if(s==null)return console.log("Couldn't parse line number in error: "+a),void console.log(i);for(var u=+s[1],l=i.split(`
`),d=l.length.toString().length+2,A=l.map(function(ae,se){return ke((se+1).toString(),d)+ae}),I=0,O=0;O<A.length;O++)I=Math.max(A[O].length,I);var z=A.slice(0,u-1),re=A.slice(u-1,u),oe=A.slice(u);console.log(z.join(`
`)),console.log(a.split(`
`)[0]),console.log("%c "+ke(re[0],I),"border:1px solid red; background-color:#e3d2d2; color:#a61717"),console.log(oe.join(`
`))}(e,n.getShaderInfoLog(r)),new Error("Failed to compile fragment shader.");return r}var Cr,br,ar=/ERROR: [0-9]+:([0-9]+):/g;function Rt(n,t){return Jr(n,t,function(){return n.createProgram()},"Unable to create WebGLProgram.")}function fn(n,t,e){if(lt(n,t,function(){return n.linkProgram(e)}),n.getProgramParameter(e,n.LINK_STATUS)===!1)throw console.log(n.getProgramInfoLog(e)),new Error("Failed to link vertex and fragment shaders.")}function nr(n,t,e){if(lt(n,t,function(){return n.validateProgram(e)}),n.getProgramParameter(e,n.VALIDATE_STATUS)===!1)throw console.log(n.getProgramInfoLog(e)),new Error("Shader program validation failed.")}function mr(n,t,e){var r=Jr(n,t,function(){return n.createBuffer()},"Unable to create WebGLBuffer");return lt(n,t,function(){return n.bindBuffer(n.ARRAY_BUFFER,r)}),lt(n,t,function(){return n.bufferData(n.ARRAY_BUFFER,e,n.STATIC_DRAW)}),r}function Br(n,t,e){var r=Jr(n,t,function(){return n.createBuffer()},"Unable to create WebGLBuffer");return lt(n,t,function(){return n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,r)}),lt(n,t,function(){return n.bufferData(n.ELEMENT_ARRAY_BUFFER,e,n.STATIC_DRAW)}),r}function dn(n,t){return Jr(n,t,function(){return n.createTexture()},"Unable to create WebGLTexture.")}function sn(n,t){var e=P().getNumber("WEBGL_MAX_TEXTURE_SIZE");if(n<=0||t<=0){var r="["+n+"x"+t+"]";throw new Error("Requested texture size "+r+" is invalid.")}if(n>e||t>e)throw r="["+n+"x"+t+"]",new Error("Requested texture size "+r+" greater than WebGL maximum on this browser / GPU "+("["+e+"x"+e+"]")+".")}function vn(n,t){return Jr(n,t,function(){return n.createFramebuffer()},"Unable to create WebGLFramebuffer.")}function Qn(n,t,e,r,i,a,s,u){var l=n.getAttribLocation(e,r);return l!==-1&&(lt(n,t,function(){return n.bindBuffer(n.ARRAY_BUFFER,i)}),lt(n,t,function(){return n.vertexAttribPointer(l,a,n.FLOAT,!1,s,u)}),lt(n,t,function(){return n.enableVertexAttribArray(l)}),!0)}function Xn(n,t,e,r){qt(n,r),lt(n,t,function(){return n.activeTexture(n.TEXTURE0+r)}),lt(n,t,function(){return n.bindTexture(n.TEXTURE_2D,e)})}function _n(n,t,e,r){return Jr(n,t,function(){return n.getUniformLocation(e,r)},'uniform "'+r+'" not present in program.')}function gn(n,t,e){return n.getUniformLocation(t,e)}function un(n,t,e,r,i,a){lt(n,t,function(){return Xn(n,t,r,a)}),lt(n,t,function(){return n.uniform1i(i,a)})}function Fn(n,t,e,r){lt(n,t,function(){return n.bindFramebuffer(n.FRAMEBUFFER,r)}),lt(n,t,function(){return n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,e,0)})}function Ln(n,t,e){lt(n,t,function(){return n.bindFramebuffer(n.FRAMEBUFFER,e)}),lt(n,t,function(){return n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,null,0)})}function Un(n){var t=n.checkFramebufferStatus(n.FRAMEBUFFER);if(t!==n.FRAMEBUFFER_COMPLETE)throw new Error("Error binding framebuffer: "+Kn(n,t))}function Kn(n,t){switch(t){case n.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:return"FRAMEBUFFER_INCOMPLETE_ATTACHMENT";case n.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:return"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT";case n.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:return"FRAMEBUFFER_INCOMPLETE_DIMENSIONS";case n.FRAMEBUFFER_UNSUPPORTED:return"FRAMEBUFFER_UNSUPPORTED";default:return"unknown error "+t}}function Jr(n,t,e,r){var i=lt(n,t,function(){return e()});if(i==null)throw new Error(r);return i}function qt(n,t){var e=n.MAX_COMBINED_TEXTURE_IMAGE_UNITS-1,r=t+n.TEXTURE0;if(r<n.TEXTURE0||r>e)throw new Error("textureUnit must be in "+("[gl.TEXTURE0, gl.TEXTURE"+e+"]")+".")}function _r(n,t){return t===void 0&&(t=2),ce(n.slice(0,n.length-t))}function qr(n){if(n.length===0)throw Error("Cannot get rows and columns of an empty shape array.");return[n.length>1?n[n.length-2]:1,n[n.length-1]]}function yn(n){var t=[1,1,1];return n.length===0||n.length===1&&n[0]===1||(t=[_r(n)].concat(qr(n))),t}function ln(n,t){var e;t===void 0&&(t=!1);var r=P().getNumber("WEBGL_MAX_TEXTURE_SIZE");if(t&&(r*=2,(n=n.map(function(d,A){return A>=n.length-2?ne(n[A]):n[A]})).length===1&&(n=[2,n[0]])),n.length!==2){var i=V(n);n=i.newShape}var a=ce(n);if(n.length<=1&&a<=r)return[1,a];if(n.length===2&&n[0]<=r&&n[1]<=r)return n;if(n.length===3&&n[0]*n[1]<=r&&n[2]<=r)return[n[0]*n[1],n[2]];if(n.length===3&&n[0]<=r&&n[1]*n[2]<=r)return[n[0],n[1]*n[2]];if(n.length===4&&n[0]*n[1]*n[2]<=r&&n[3]<=r)return[n[0]*n[1]*n[2],n[3]];if(n.length===4&&n[0]<=r&&n[1]*n[2]*n[3]<=r)return[n[0],n[1]*n[2]*n[3]];if(t){var s=_r(n),u=2,l=2;return n.length&&(u=(e=qr(n))[0],l=e[1]),De(a=s*(u/2)*(l/2)).map(function(d){return 2*d})}return De(a)}function Tn(n){return n%2==0}function Zn(n,t){if(fe(n=n.slice(-2),t=t.slice(-2))||!n.length||!t.length||n[0]===0||n[1]===0||t[0]===0||t[1]===0)return!0;if(n.length!==t.length){var e=n.slice(-1)[0],r=t.slice(-1)[0];if(e===r||Tn(e)&&Tn(r)&&(n[0]===1||t[0]===1))return!0}return n[1]===t[1]&&Tn(n[0])&&Tn(t[0])}function Jn(n){if(Cr==null){var t=ht(n);Cr=t.getParameter(t.MAX_TEXTURE_SIZE)}return Cr}function Wn(n){if(br==null){var t=ht(n);br=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS)}return Math.min(16,br)}function fi(n){if(n===0)return 0;var t=ht(n);return wr(t,"EXT_disjoint_timer_query_webgl2")&&n===2?2:wr(t,"EXT_disjoint_timer_query")?1:0}function wr(n,t){return n.getExtension(t)!=null}function zr(n){try{if(ht(n)!=null)return!0}catch(t){return!1}return!1}function Gn(n){if(n===0)return!1;var t=ht(n);if(n===1){if(!wr(t,"OES_texture_float"))return!1}else if(!wr(t,"EXT_color_buffer_float"))return!1;return ii(t)}function di(n){if(n===0)return!1;var t=ht(n);if(n!==1){if(wr(t,"EXT_color_buffer_float"))return ii(t);if(wr(t,"EXT_color_buffer_half_float")){var e=t.getExtension("EXT_color_buffer_half_float");return function(r,i){var a=Pt(r,i),s=r.createTexture();r.bindTexture(r.TEXTURE_2D,s),r.texImage2D(r.TEXTURE_2D,0,a.internalFormatHalfFloat,1,1,0,a.textureFormatFloat,a.textureTypeHalfFloat,null);var u=r.createFramebuffer();r.bindFramebuffer(r.FRAMEBUFFER,u),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,s,0);var l=r.checkFramebufferStatus(r.FRAMEBUFFER)===r.FRAMEBUFFER_COMPLETE;return r.bindTexture(r.TEXTURE_2D,null),r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteTexture(s),r.deleteFramebuffer(u),l}(t,e)}return!1}return!!wr(t,"OES_texture_float")&&!!wr(t,"WEBGL_color_buffer_float")&&ii(t)}function ii(n){var t=Pt(n),e=n.createTexture();n.bindTexture(n.TEXTURE_2D,e),n.texImage2D(n.TEXTURE_2D,0,t.internalFormatFloat,1,1,0,t.textureFormatFloat,t.textureTypeFloat,null);var r=n.createFramebuffer();n.bindFramebuffer(n.FRAMEBUFFER,r),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,e,0);var i=n.checkFramebufferStatus(n.FRAMEBUFFER)===n.FRAMEBUFFER_COMPLETE;return n.bindTexture(n.TEXTURE_2D,null),n.bindFramebuffer(n.FRAMEBUFFER,null),n.deleteTexture(e),n.deleteFramebuffer(r),i}function Ci(n){return n===2&&ht(n).fenceSync!=null}var Si=Object.freeze({callAndCheck:lt,canBeRepresented:dr,getWebGLErrorMessage:pr,getExtensionOrThrow:Er,createVertexShader:jr,createFragmentShader:Wr,createProgram:Rt,linkProgram:fn,validateProgram:nr,createStaticVertexBuffer:mr,createStaticIndexBuffer:Br,getNumChannels:function(){return P().getNumber("WEBGL_VERSION")===2?1:4},createTexture:dn,validateTextureSize:sn,createFramebuffer:vn,bindVertexBufferToProgramAttribute:Qn,bindTextureUnit:Xn,unbindTextureUnit:function(n,t,e){qt(n,e),lt(n,t,function(){return n.activeTexture(n.TEXTURE0+e)}),lt(n,t,function(){return n.bindTexture(n.TEXTURE_2D,null)})},getProgramUniformLocationOrThrow:_n,getProgramUniformLocation:gn,bindTextureToProgramUniformSampler:un,bindCanvasToFramebuffer:function(n,t){lt(n,t,function(){return n.bindFramebuffer(n.FRAMEBUFFER,null)}),lt(n,t,function(){return n.viewport(0,0,n.canvas.width,n.canvas.height)}),lt(n,t,function(){return n.scissor(0,0,n.canvas.width,n.canvas.height)})},bindColorTextureToFramebuffer:Fn,unbindColorTextureFromFramebuffer:Ln,validateFramebuffer:Un,getFramebufferErrorMessage:Kn,getBatchDim:_r,getRowsCols:qr,getShapeAs3D:yn,getTextureShapeFromLogicalShape:ln,isReshapeFree:Zn,getWebGLMaxTextureSize:Jn,resetMaxTextureSize:function(){Cr=null},resetMaxTexturesInShader:function(){br=null},getMaxTexturesInShader:Wn,getWebGLDisjointQueryTimerVersion:fi,hasExtension:wr,isWebGLVersionEnabled:zr,isCapableOfRenderingToFloatTexture:Gn,isDownloadFloatTextureEnabled:di,isWebGLFenceEnabled:Ci}),Yt=P();function Pi(){P().set("PROD",!0)}function ui(){P().set("DEBUG",!0)}function Ii(){P().set("DEPRECATION_WARNINGS_ENABLED",!1),console.warn("TensorFlow.js deprecation warnings have been disabled.")}function pi(n){P().getBool("DEPRECATION_WARNINGS_ENABLED")&&console.warn(n+" You can disable deprecation warnings with tf.disableDeprecationWarnings().")}function Ti(){We.disposeVariables()}function ra(){return We}function Ba(){return We.memory()}function ya(n){return We.profile(n)}function Ot(n,t){return We.tidy(n,t)}function bn(n){Kr(n).forEach(function(t){return t.dispose()})}function ba(n){return We.keep(n)}function Na(n){return We.time(n)}function na(n){return We.setBackend(n)}function lr(){return We.ready()}function Fr(){return We.backendName}function en(n){We.removeBackend(n)}function Sr(n){return We.findBackend(n)}function Gr(n){return We.findBackendFactory(n)}function Rn(n,t,e){return e===void 0&&(e=1),We.registerBackend(n,t,e)}function jn(){return We.backend}function hi(n,t){P().setPlatform(n,t)}function Yn(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];P().getBool("IS_TEST")||console.warn.apply(console,n)}function mn(n,t){var e=n;if(L(n))return t==="string"?[]:[n.length];if(!Array.isArray(n))return[];for(var r=[];Array.isArray(e)||L(e)&&t!=="string";)r.push(e.length),e=e[0];return Array.isArray(n)&&P().getBool("TENSORLIKE_CHECK_SHAPE_CONSISTENCY")&&function i(a,s,u){if(u=u||[],!Array.isArray(a)&&!L(a))return void q(s.length===0,function(){return"Element arr["+u.join("][")+"] is a primitive, but should be an array/TypedArray of "+s[0]+" elements"});q(s.length>0,function(){return"Element arr["+u.join("][")+"] should be a primitive, but is an array of "+a.length+" elements"}),q(a.length===s[0],function(){return"Element arr["+u.join("][")+"] should have "+s[0]+" elements, but has "+a.length+" elements"});for(var l=s.slice(1),d=0;d<a.length;++d)i(a[d],l,u.concat(d))}(n,r,[]),r}function Hi(n,t,e,r){if(n!=null&&(n!=="numeric"&&n!==t||n==="numeric"&&t==="string"))throw new Error("Argument '"+e+"' passed to '"+r+"' must be "+n+" tensor, but got "+t+" tensor")}function je(n,t,e,r){if(r===void 0&&(r="numeric"),n instanceof Ft)return Hi(r,n.dtype,t,e),n;var i=le(n);if(i!=="string"&&["bool","int32","float32"].indexOf(r)>=0&&(i=r),Hi(r,i,t,e),n==null||!L(n)&&!Array.isArray(n)&&typeof n!="number"&&typeof n!="boolean"&&typeof n!="string"){var a=n==null?"null":n.constructor.name;throw new Error("Argument '"+t+"' passed to '"+e+"' must be a Tensor or TensorLike, but got '"+a+"'")}var s=mn(n,i);L(n)||Array.isArray(n)||(n=[n]);var u=i!=="string"?Be(n,i,P().getBool("DEBUG")):xe(n,[],!0);return We.makeTensor(u,s,i)}function ai(n,t,e,r){if(r===void 0&&(r="numeric"),!Array.isArray(n))throw new Error("Argument "+t+" passed to "+e+" must be a `Tensor[]` or `TensorLike[]`");return n.map(function(i,a){return je(i,t+"["+a+"]",e)},r)}function Ai(n,t){for(var e=0;e<n.length;++e)if(n[n.length-e-1]!==t-1-e)return!1;return!0}function ia(n,t,e){for(var r=n.length+t.length,i=[],a=0,s=0,u=0;u<r;u++)e.indexOf(u)===-1?i.push(n[a++]):i.push(t[s++]);return i}function En(n,t){for(var e=[],r=n.length,i=0;i<r;i++)t.indexOf(i)===-1&&e.push(n[i]);return[e,t.map(function(a){return n[a]})]}function Dn(n,t){return ia(n,t.map(function(e){return 1}),t)}function zn(n,t,e){q(Ai(t,e),function(){return n+" supports only inner-most axes for now. Got axes "+t+" and rank-"+e+" input."})}function oi(n,t){if(Ai(n,t))return null;for(var e=[],r=0;r<t;++r)n.indexOf(r)===-1&&e.push(r);return n.forEach(function(i){return e.push(i)}),e}function _t(n){return n.map(function(t,e){return[e,t]}).sort(function(t,e){return t[1]-e[1]}).map(function(t){return t[0]})}function Ht(n,t){for(var e=[],r=t-n;r<t;++r)e.push(r);return e}function rn(n,t){var e=n[0].length;n.forEach(function(i,a){q(i.length===e,function(){return"Error in concat"+e+"D: rank of tensors["+a+"] must be the same as the rank of the rest ("+e+")"})}),q(t>=0&&t<e,function(){return"Error in concat"+e+"D: axis must be between 0 and "+(e-1)+"."});var r=n[0];n.forEach(function(i,a){for(var s=0;s<e;s++)q(s===t||i[s]===r[s],function(){return"Error in concat"+e+"D: Shape of tensors["+a+"] ("+i+") does not match the shape of the rest ("+r+") along the non-concatenated axis "+a+"."})})}function nn(n,t){for(var e=n[0].slice(),r=1;r<n.length;r++)e[t]+=n[r][t];return e}function Ve(n){var t=Object.keys(n);if(t.length!==1)throw new Error("Please provide an object with a single key (operation name) mapping to a function. Got an object with "+t.length+" keys.");var e=t[0],r=n[e];e.endsWith("_")&&(e=e.substring(0,e.length-1));var i=function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];We.startScope(e);try{var u=r.apply(void 0,a);return u instanceof Promise&&console.error("Cannot return a Promise inside of tidy."),We.endScope(u),u}catch(l){throw We.endScope(null),l}};return Object.defineProperty(i,"name",{value:e,configurable:!0}),i}Yt.registerFlag("HAS_WEBGL",function(){return Yt.getNumber("WEBGL_VERSION")>0}),Yt.registerFlag("WEBGL_VERSION",function(){return zr(2)?2:zr(1)?1:0}),Yt.registerFlag("WEBGL_BUFFER_SUPPORTED",function(){return Yt.get("WEBGL_VERSION")===2}),Yt.registerFlag("WEBGL_CPU_FORWARD",function(){return!0}),Yt.registerFlag("WEBGL_FORCE_F16_TEXTURES",function(){return!1}),Yt.registerFlag("WEBGL_PACK",function(){return Yt.getBool("HAS_WEBGL")}),Yt.registerFlag("WEBGL_PACK_NORMALIZATION",function(){return Yt.getBool("WEBGL_PACK")}),Yt.registerFlag("WEBGL_PACK_CLIP",function(){return Yt.getBool("WEBGL_PACK")}),Yt.registerFlag("WEBGL_PACK_DEPTHWISECONV",function(){return!1}),Yt.registerFlag("WEBGL_PACK_BINARY_OPERATIONS",function(){return Yt.getBool("WEBGL_PACK")}),Yt.registerFlag("WEBGL_PACK_UNARY_OPERATIONS",function(){return Yt.getBool("WEBGL_PACK")}),Yt.registerFlag("WEBGL_PACK_ARRAY_OPERATIONS",function(){return Yt.getBool("WEBGL_PACK")}),Yt.registerFlag("WEBGL_PACK_IMAGE_OPERATIONS",function(){return Yt.getBool("WEBGL_PACK")}),Yt.registerFlag("WEBGL_PACK_REDUCE",function(){return Yt.getBool("WEBGL_PACK")}),Yt.registerFlag("WEBGL_LAZILY_UNPACK",function(){return Yt.getBool("WEBGL_PACK")}),Yt.registerFlag("WEBGL_CONV_IM2COL",function(){return Yt.getBool("WEBGL_PACK")}),Yt.registerFlag("WEBGL_MAX_TEXTURE_SIZE",function(){return Jn(Yt.getNumber("WEBGL_VERSION"))}),Yt.registerFlag("WEBGL_MAX_TEXTURES_IN_SHADER",function(){return Wn(Yt.getNumber("WEBGL_VERSION"))}),Yt.registerFlag("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION",function(){var n=Yt.getNumber("WEBGL_VERSION");return n===0?0:fi(n)}),Yt.registerFlag("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE",function(){return Yt.getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")>0&&(n=navigator.userAgent||navigator.vendor||window.opera,!(/(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/i.test(n)||/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(n.substr(0,4))));var n}),Yt.registerFlag("WEBGL_RENDER_FLOAT32_CAPABLE",function(){return Gn(Yt.getNumber("WEBGL_VERSION"))}),Yt.registerFlag("WEBGL_RENDER_FLOAT32_ENABLED",function(){return!Yt.getBool("WEBGL_FORCE_F16_TEXTURES")&&Yt.getBool("WEBGL_RENDER_FLOAT32_CAPABLE")}),Yt.registerFlag("WEBGL_DOWNLOAD_FLOAT_ENABLED",function(){return di(Yt.getNumber("WEBGL_VERSION"))}),Yt.registerFlag("WEBGL_FENCE_API_ENABLED",function(){return Ci(Yt.getNumber("WEBGL_VERSION"))}),Yt.registerFlag("WEBGL_SIZE_UPLOAD_UNIFORM",function(){return Yt.getBool("WEBGL_RENDER_FLOAT32_ENABLED")?4:0}),Kt=pi;var Cn=Ve({complex_:function(n,t){var e=je(n,"real","complex"),r=je(t,"imag","complex");return pe(e.shape,r.shape,"real and imag shapes, "+e.shape+" and "+r.shape+", must match in call to tf.complex()."),We.runKernelFunc(function(i){return i.complex(e,r)},{$real:e,$imag:r})}}),$n=Ve({real_:function(n){var t=je(n,"input","real");return We.runKernelFunc(function(e){return e.real(t)},{$input:t})}}),vi=Ve({imag_:function(n){var t=je(n,"input","imag");return We.runKernelFunc(function(e){return e.imag(t)},{$input:t})}});function Sn(n,t,e){return aa(n,t,mn(n,e),e)}function aa(n,t,e,r){if(r==null&&(r=le(n)),r==="complex64")throw new Error("Cannot construct a complex64 tensor directly. Please use tf.complex(real, imag).");if(!L(n)&&!Array.isArray(n)&&typeof n!="number"&&typeof n!="boolean"&&typeof n!="string")throw new Error("values passed to tensor(values) must be a number/boolean/string or an array of numbers/booleans/strings, or a TypedArray");if(t!=null){pt(t);var i=ce(t),a=ce(e);q(i===a,function(){return"Based on the provided shape, ["+t+"], the tensor should have "+i+" values but has "+a});for(var s=0;s<e.length;++s){var u=e[s],l=s!==e.length-1||u!==ce(t.slice(s));q(e[s]===t[s]||!l,function(){return"Error creating a new Tensor. Inferred shape ("+e+") does not match the provided shape ("+t+"). "})}}return L(n)||Array.isArray(n)||(n=[n]),t=t||e,n=r!=="string"?Be(n,r,P().getBool("DEBUG")):xe(n,[],!0),We.makeTensor(n,t,r)}function kt(n,t){if((L(n)&&t!=="string"||Array.isArray(n))&&t!=="complex64")throw new Error("Error creating a new Scalar: value must be a primitive (number|boolean|string)");if(t==="string"&&L(n)&&!(n instanceof Uint8Array))throw new Error("When making a scalar from encoded string, the value must be `Uint8Array`.");return aa(n,[],[],t)}function On(n,t){ve(n);var e=mn(n,t);if(e.length!==1)throw new Error("tensor1d() requires values to be a flat/TypedArray");return aa(n,null,e,t)}function oa(n,t,e){if(ve(n),t!=null&&t.length!==2)throw new Error("tensor2d() requires shape to have two numbers");var r=mn(n,e);if(r.length!==2&&r.length!==1)throw new Error("tensor2d() requires values to be number[][] or flat/TypedArray");if(r.length===1&&t==null)throw new Error("tensor2d() requires shape to be provided when `values` are a flat/TypedArray");return aa(n,t,r,e)}function hs(n,t,e){if(ve(n),t!=null&&t.length!==3)throw new Error("tensor3d() requires shape to have three numbers");var r=mn(n,e);if(r.length!==3&&r.length!==1)throw new Error("tensor3d() requires values to be number[][][] or flat/TypedArray");if(r.length===1&&t==null)throw new Error("tensor3d() requires shape to be provided when `values` are a flat array");return aa(n,t,r,e)}function li(n,t,e){if(ve(n),t!=null&&t.length!==4)throw new Error("tensor4d() requires shape to have four numbers");var r=mn(n,e);if(r.length!==4&&r.length!==1)throw new Error("tensor4d() requires values to be number[][][][] or flat/TypedArray");if(r.length===1&&t==null)throw new Error("tensor4d() requires shape to be provided when `values` are a flat array");return aa(n,t,r,e)}function jd(n,t,e){if(ve(n),t!=null&&t.length!==5)throw new Error("tensor5d() requires shape to have five numbers");var r=mn(n,e);if(r.length!==5&&r.length!==1)throw new Error("tensor5d() requires values to be number[][][][][] or flat/TypedArray");if(r.length===1&&t==null)throw new Error("tensor5d() requires shape to be provided when `values` are a flat array");return aa(n,t,r,e)}function Dd(n,t,e){if(ve(n),t!=null&&t.length!==6)throw new Error("tensor6d() requires shape to have six numbers");var r=mn(n,e);if(r.length!==6&&r.length!==1)throw new Error("tensor6d() requires values to be number[][][][][][] or flat/TypedArray");if(r.length===1&&t==null)throw new Error("tensor6d() requires shape to be provided when `values` are a flat array");return aa(n,t=t||r,r,e)}function Pd(n,t,e,r){return t===void 0&&(t=!0),We.makeVariable(n,t,e,r)}function Ma(n,t){if(t===void 0&&(t="float32"),t==="complex64"){var e=Ma(n,"float32"),r=pn(n,"float32");return Cn(e,r)}var i=$e(ce(n),t);return We.makeTensor(i,n,t)}function pn(n,t){if(t===void 0&&(t="float32"),t==="complex64"){var e=pn(n,"float32"),r=pn(n,"float32");return Cn(e,r)}var i=rt(ce(n),t);return We.makeTensor(i,n,t)}function Bi(n,t,e){return We.runKernelFunc(function(r){return r.fill(n,t,e)},{})}function Bd(n,t,e){if(e<=0)throw new Error("The number of values should be positive.");return We.runKernelFunc(function(r){return r.linspace(n,t,e)},{})}function Eo(n,t,e,r){if(e===void 0&&(e=1),r===void 0&&(r="float32"),e===0)throw new Error("Cannot have a step of zero");if(n===t||n<t&&e<0||t<n&&e>1)return pn([0],r);var i=rt(Math.abs(Math.ceil((t-n)/e)),r);t<n&&e===1&&(e=-1),i[0]=n;for(var a=1;a<i.length;a++)i[a]=i[a-1]+e;return On(i,r)}var cl=Ve({onesLike_:function(n){var t=je(n,"x","onesLike");if(t.dtype==="complex64"){var e=cl($n(t)),r=Lr(vi(t));return Cn(e,r)}return We.runKernelFunc(function(i){return i.onesLike(t)},{$x:t},function(i,a){return{$x:function(){return Lr(i)}}})}}),Lr=Ve({zerosLike_:function(n){var t=je(n,"x","zerosLike");return We.runKernelFunc(function(e){return e.zerosLike(t)},{$x:t},function(e,r){return{$x:function(){return Lr(e)}}})}}),Pn=Ve({concat_:function(n,t){t===void 0&&(t=0),q(n.length>=1,function(){return"Pass at least one tensor to concat"});var e=ai(n,"tensors","concat");e[0].dtype==="complex64"&&e.forEach(function(u){if(u.dtype!=="complex64")throw new Error(`Cannot concatenate complex64 tensors with a tensor
with dtype `+u.dtype+". ")}),t=ye(t,e[0].shape)[0];var r=nn(e.map(function(u){return u.shape}),t);if(ce(r)===0)return Sn([],r);if((e=e.filter(function(u){return u.size>0})).length===1)return e[0];var i=e.map(function(u){return u.shape});rn(i,t);var a=e,s={axis:t};return We.runKernelFunc(function(u){return u.concat(e,t)},a,function(u){var l=i.map(function(d){return d[t]});return vs(u,l,t).map(function(d){return function(){return d}})},"Concat",s)}}),Nd=Ve({concat1d_:function(n){return Pn(n,0)}}),Md=Ve({concat2d_:function(n,t){return Pn(n,t)}}),_d=Ve({concat3d_:function(n,t){return Pn(n,t)}}),Fd=Ve({concat4d_:function(n,t){return Pn(n,t)}}),vs=Ve({split_:function(n,t,e){e===void 0&&(e=0);var r,i=je(n,"x","split");return e=ye(e,i.shape)[0],typeof t=="number"?(q(i.shape[e]%t==0,function(){return"Number of splits must evenly divide the axis."}),r=new Array(t).fill(i.shape[e]/t)):(q(i.shape[e]===t.reduce(function(a,s){return a+s}),function(){return"The sum of sizes must match the size of the axis dimension."}),r=t),We.runKernelFunc(function(a){return a.split(i,r,e)},{$x:i},function(a){return{$x:function(){return Pn(a,e)}}})}});typeof globalThis!="undefined"||typeof window!="undefined"||typeof Te.g!="undefined"&&Te.g;function wa(n,t){return n(t={exports:{}},t.exports),t.exports}var Ld=wa(function(n){(function(t,e,r){function i(u){var l,d=this,A=(l=4022871197,function(I){I=I.toString();for(var O=0;O<I.length;O++){var z=.02519603282416938*(l+=I.charCodeAt(O));z-=l=z>>>0,l=(z*=l)>>>0,l+=4294967296*(z-=l)}return 23283064365386963e-26*(l>>>0)});d.next=function(){var I=2091639*d.s0+23283064365386963e-26*d.c;return d.s0=d.s1,d.s1=d.s2,d.s2=I-(d.c=0|I)},d.c=1,d.s0=A(" "),d.s1=A(" "),d.s2=A(" "),d.s0-=A(u),d.s0<0&&(d.s0+=1),d.s1-=A(u),d.s1<0&&(d.s1+=1),d.s2-=A(u),d.s2<0&&(d.s2+=1),A=null}function a(u,l){return l.c=u.c,l.s0=u.s0,l.s1=u.s1,l.s2=u.s2,l}function s(u,l){var d=new i(u),A=l&&l.state,I=d.next;return I.int32=function(){return 4294967296*d.next()|0},I.double=function(){return I()+11102230246251565e-32*(2097152*I()|0)},I.quick=I,A&&(typeof A=="object"&&a(A,d),I.state=function(){return a(d,{})}),I}e&&e.exports?e.exports=s:r&&r.amd?r(function(){return s}):this.alea=s})(0,n,!1)}),Ud=wa(function(n){(function(t,e,r){function i(u){var l=this,d="";l.x=0,l.y=0,l.z=0,l.w=0,l.next=function(){var I=l.x^l.x<<11;return l.x=l.y,l.y=l.z,l.z=l.w,l.w^=l.w>>>19^I^I>>>8},u===(0|u)?l.x=u:d+=u;for(var A=0;A<d.length+64;A++)l.x^=0|d.charCodeAt(A),l.next()}function a(u,l){return l.x=u.x,l.y=u.y,l.z=u.z,l.w=u.w,l}function s(u,l){var d=new i(u),A=l&&l.state,I=function(){return(d.next()>>>0)/4294967296};return I.double=function(){do var O=((d.next()>>>11)+(d.next()>>>0)/4294967296)/2097152;while(O===0);return O},I.int32=d.next,I.quick=I,A&&(typeof A=="object"&&a(A,d),I.state=function(){return a(d,{})}),I}e&&e.exports?e.exports=s:r&&r.amd?r(function(){return s}):this.xor128=s})(0,n,!1)}),Wd=wa(function(n){(function(t,e,r){function i(u){var l=this,d="";l.next=function(){var I=l.x^l.x>>>2;return l.x=l.y,l.y=l.z,l.z=l.w,l.w=l.v,(l.d=l.d+362437|0)+(l.v=l.v^l.v<<4^I^I<<1)|0},l.x=0,l.y=0,l.z=0,l.w=0,l.v=0,u===(0|u)?l.x=u:d+=u;for(var A=0;A<d.length+64;A++)l.x^=0|d.charCodeAt(A),A==d.length&&(l.d=l.x<<10^l.x>>>4),l.next()}function a(u,l){return l.x=u.x,l.y=u.y,l.z=u.z,l.w=u.w,l.v=u.v,l.d=u.d,l}function s(u,l){var d=new i(u),A=l&&l.state,I=function(){return(d.next()>>>0)/4294967296};return I.double=function(){do var O=((d.next()>>>11)+(d.next()>>>0)/4294967296)/2097152;while(O===0);return O},I.int32=d.next,I.quick=I,A&&(typeof A=="object"&&a(A,d),I.state=function(){return a(d,{})}),I}e&&e.exports?e.exports=s:r&&r.amd?r(function(){return s}):this.xorwow=s})(0,n,!1)}),zd=wa(function(n){(function(t,e,r){function i(u){var l=this;l.next=function(){var d,A,I=l.x,O=l.i;return d=I[O],A=(d^=d>>>7)^d<<24,A^=(d=I[O+1&7])^d>>>10,A^=(d=I[O+3&7])^d>>>3,A^=(d=I[O+4&7])^d<<7,d=I[O+7&7],A^=(d^=d<<13)^d<<9,I[O]=A,l.i=O+1&7,A},function(d,A){var I,O=[];if(A===(0|A))O[0]=A;else for(A=""+A,I=0;I<A.length;++I)O[7&I]=O[7&I]<<15^A.charCodeAt(I)+O[I+1&7]<<13;for(;O.length<8;)O.push(0);for(I=0;I<8&&O[I]===0;++I);for(I==8?O[7]=-1:O[I],d.x=O,d.i=0,I=256;I>0;--I)d.next()}(l,u)}function a(u,l){return l.x=u.x.slice(),l.i=u.i,l}function s(u,l){u==null&&(u=+new Date);var d=new i(u),A=l&&l.state,I=function(){return(d.next()>>>0)/4294967296};return I.double=function(){do var O=((d.next()>>>11)+(d.next()>>>0)/4294967296)/2097152;while(O===0);return O},I.int32=d.next,I.quick=I,A&&(A.x&&a(A,d),I.state=function(){return a(d,{})}),I}e&&e.exports?e.exports=s:r&&r.amd?r(function(){return s}):this.xorshift7=s})(0,n,!1)}),Vd=wa(function(n){(function(t,e,r){function i(u){var l=this;l.next=function(){var d,A,I=l.w,O=l.X,z=l.i;return l.w=I=I+1640531527|0,A=O[z+34&127],d=O[z=z+1&127],A^=A<<13,d^=d<<17,A^=A>>>15,d^=d>>>12,A=O[z]=A^d,l.i=z,A+(I^I>>>16)|0},function(d,A){var I,O,z,re,oe,ae=[],se=128;for(A===(0|A)?(O=A,A=null):(A+="\0",O=0,se=Math.max(se,A.length)),z=0,re=-32;re<se;++re)A&&(O^=A.charCodeAt((re+32)%A.length)),re===0&&(oe=O),O^=O<<10,O^=O>>>15,O^=O<<4,O^=O>>>13,re>=0&&(oe=oe+1640531527|0,z=(I=ae[127&re]^=O+oe)==0?z+1:0);for(z>=128&&(ae[127&(A&&A.length||0)]=-1),z=127,re=512;re>0;--re)O=ae[z+34&127],I=ae[z=z+1&127],O^=O<<13,I^=I<<17,O^=O>>>15,I^=I>>>12,ae[z]=O^I;d.w=oe,d.X=ae,d.i=z}(l,u)}function a(u,l){return l.i=u.i,l.w=u.w,l.X=u.X.slice(),l}function s(u,l){u==null&&(u=+new Date);var d=new i(u),A=l&&l.state,I=function(){return(d.next()>>>0)/4294967296};return I.double=function(){do var O=((d.next()>>>11)+(d.next()>>>0)/4294967296)/2097152;while(O===0);return O},I.int32=d.next,I.quick=I,A&&(A.X&&a(A,d),I.state=function(){return a(d,{})}),I}e&&e.exports?e.exports=s:r&&r.amd?r(function(){return s}):this.xor4096=s})(0,n,!1)}),Hd=wa(function(n){(function(t,e,r){function i(u){var l=this,d="";l.next=function(){var I=l.b,O=l.c,z=l.d,re=l.a;return I=I<<25^I>>>7^O,O=O-z|0,z=z<<24^z>>>8^re,re=re-I|0,l.b=I=I<<20^I>>>12^O,l.c=O=O-z|0,l.d=z<<16^O>>>16^re,l.a=re-I|0},l.a=0,l.b=0,l.c=-1640531527,l.d=1367130551,u===Math.floor(u)?(l.a=u/4294967296|0,l.b=0|u):d+=u;for(var A=0;A<d.length+20;A++)l.b^=0|d.charCodeAt(A),l.next()}function a(u,l){return l.a=u.a,l.b=u.b,l.c=u.c,l.d=u.d,l}function s(u,l){var d=new i(u),A=l&&l.state,I=function(){return(d.next()>>>0)/4294967296};return I.double=function(){do var O=((d.next()>>>11)+(d.next()>>>0)/4294967296)/2097152;while(O===0);return O},I.int32=d.next,I.quick=I,A&&(typeof A=="object"&&a(A,d),I.state=function(){return a(d,{})}),I}e&&e.exports?e.exports=s:r&&r.amd?r(function(){return s}):this.tychei=s})(0,n,!1)}),Aa=wa(function(n){(function(t,e){var r,i=this,a=256,s=6,u="random",l=e.pow(a,s),d=e.pow(2,52),A=2*d,I=a-1;function O(se,be,Ae){var me=[],Ce=oe(function Ue(Ne,Fe){var Ze,Ke=[],et=typeof Ne;if(Fe&&et=="object")for(Ze in Ne)try{Ke.push(Ue(Ne[Ze],Fe-1))}catch(tt){}return Ke.length?Ke:et=="string"?Ne:Ne+"\0"}((be=be==1?{entropy:!0}:be||{}).entropy?[se,ae(t)]:se==null?function(){try{var Ue;return r&&(Ue=r.randomBytes)?Ue=Ue(a):(Ue=new Uint8Array(a),(i.crypto||i.msCrypto).getRandomValues(Ue)),ae(Ue)}catch(Ze){var Ne=i.navigator,Fe=Ne&&Ne.plugins;return[+new Date,i,Fe,i.screen,ae(t)]}}():se,3),me),Oe=new z(me),Le=function(){for(var Ue=Oe.g(s),Ne=l,Fe=0;Ue<d;)Ue=(Ue+Fe)*a,Ne*=a,Fe=Oe.g(1);for(;Ue>=A;)Ue/=2,Ne/=2,Fe>>>=1;return(Ue+Fe)/Ne};return Le.int32=function(){return 0|Oe.g(4)},Le.quick=function(){return Oe.g(4)/4294967296},Le.double=Le,oe(ae(Oe.S),t),(be.pass||Ae||function(Ue,Ne,Fe,Ze){return Ze&&(Ze.S&&re(Ze,Oe),Ue.state=function(){return re(Oe,{})}),Fe?(e[u]=Ue,Ne):Ue})(Le,Ce,"global"in be?be.global:this==e,be.state)}function z(se){var be,Ae=se.length,me=this,Ce=0,Oe=me.i=me.j=0,Le=me.S=[];for(Ae||(se=[Ae++]);Ce<a;)Le[Ce]=Ce++;for(Ce=0;Ce<a;Ce++)Le[Ce]=Le[Oe=I&Oe+se[Ce%Ae]+(be=Le[Ce])],Le[Oe]=be;(me.g=function(Ue){for(var Ne,Fe=0,Ze=me.i,Ke=me.j,et=me.S;Ue--;)Ne=et[Ze=I&Ze+1],Fe=Fe*a+et[I&(et[Ze]=et[Ke=I&Ke+Ne])+(et[Ke]=Ne)];return me.i=Ze,me.j=Ke,Fe})(a)}function re(se,be){return be.i=se.i,be.j=se.j,be.S=se.S.slice(),be}function oe(se,be){for(var Ae,me=se+"",Ce=0;Ce<me.length;)be[I&Ce]=I&(Ae^=19*be[I&Ce])+me.charCodeAt(Ce++);return ae(be)}function ae(se){return String.fromCharCode.apply(0,se)}if(e["seed"+u]=O,oe(e.random(),t),n.exports){n.exports=O;try{r=Te(91423)}catch(se){}}})([],Math)});Aa.alea=Ld,Aa.xor128=Ud,Aa.xorwow=Wd,Aa.xorshift7=zd,Aa.xor4096=Vd,Aa.tychei=Hd;var Co=Aa.alea,ms=function(){function n(t,e,r,i,a){this.mean=t,this.stdDev=e,this.dtype=r,this.nextVal=NaN,this.truncated=i,this.truncated&&(this.upper=this.mean+2*this.stdDev,this.lower=this.mean-2*this.stdDev);var s=a||Math.random();this.random=Co(s.toString())}return n.prototype.nextValue=function(){if(!isNaN(this.nextVal)){var t=this.nextVal;return this.nextVal=NaN,t}for(var e,r,i=!1;!i;){var a=void 0,s=void 0,u=void 0;do u=(a=2*this.random()-1)*a+(s=2*this.random()-1)*s;while(u>=1||u===0);var l=Math.sqrt(-2*Math.log(u)/u);e=this.mean+this.stdDev*a*l,r=this.mean+this.stdDev*s*l,this.truncated&&!this.isValidTruncated(e)||(i=!0)}return this.truncated&&!this.isValidTruncated(r)||(this.nextVal=this.convertValue(r)),this.convertValue(e)},n.prototype.convertValue=function(t){return this.dtype==null||this.dtype==="float32"?t:Math.round(t)},n.prototype.isValidTruncated=function(t){return t<=this.upper&&t>=this.lower},n}(),Gd=function(){function n(t,e,r,i){this.alpha=t,this.beta=1/e,this.dtype=r;var a=i||Math.random();this.randu=Co(a.toString()),this.randn=new ms(0,1,r,!1,this.randu()),this.d=t<1?t+2/3:t-1/3,this.c=1/Math.sqrt(9*this.d)}return n.prototype.nextValue=function(){for(var t,e,r,i,a,s;;){do i=this.randn.nextValue(),s=1+this.c*i;while(s<=0);if(s*=s*s,e=1-.331*(t=i*i)*t,r=.5*t+this.d*(1-s+Math.log(s)),(a=this.randu())<e||Math.log(a)<r)break}return s=1/this.beta*this.d*s,this.alpha<1&&(s*=Math.pow(this.randu(),1/this.alpha)),this.convertValue(s)},n.prototype.convertValue=function(t){return this.dtype==="float32"?t:Math.round(t)},n}(),Qd=function(){function n(t,e,r,i){var a=this;if(t===void 0&&(t=0),e===void 0&&(e=1),this.canReturnFloat=function(){return a.dtype==null||a.dtype==="float32"},this.min=t,this.range=e-t,this.dtype=r,i==null&&(i=Math.random()),typeof i=="number"&&(i=i.toString()),!this.canReturnFloat()&&this.range<=1)throw new Error("The difference between "+t+" - "+e+" <= 1 and dtype is not float");this.random=Co(i)}return n.prototype.convertValue=function(t){return this.canReturnFloat()?t:Math.round(t)},n.prototype.nextValue=function(){return this.convertValue(this.min+this.range*this.random())},n}();function cr(n,t,e){return t===void 0&&(t="float32"),t=t||"float32",pt(n),new Zt(n,t,e)}function Xd(n,t){t===void 0&&(t=!1),console.log(n.toString(t))}var fl=Ve({batchToSpaceND_:function(n,t,e){var r=je(n,"x","batchToSpaceND"),i=t.reduce(function(a,s){return a*s});return q(r.rank>=1+t.length,function(){return"input rank is "+r.rank+" but should be > than blockShape.length "+t.length}),q(e.length===t.length,function(){return"crops.length is "+e.length+" but should be equal to blockShape.length "+t.length}),q(r.shape[0]%i==0,function(){return"input tensor batch is "+r.shape[0]+" but is not divisible by the product of the elements of blockShape "+t.join(" * ")+" === "+i}),We.runKernelFunc(function(a){return a.batchToSpaceND(r,t,e)},{$x:r},function(a){return{$x:function(){return a.spaceToBatchND(t,e)}}})}}),Kd=Ve({broadcastTo_:function(n,t){var e=je(n,"broadcastTo","x"),r=e.shape;if(t.some(function(l){return!(l>0)||l%1!=0}))throw new Error("broadcastTo(): Invalid broadcast shape ["+t+"].");if(t.length<e.rank)throw new Error("broadcastTo(): shape.length="+t.length+" < input.rank="+e.rank+".");if(t.length>e.rank){for(var i=e.shape.slice();i.length<t.length;)i.unshift(1);e=e.reshape(i)}for(var a=Array.from(t),s=t.length-1;s>=0;s--)if(e.shape[s]===t[s])a[s]=1;else if(e.shape[s]!==1)throw new Error("broadcastTo(): ["+r+"] cannot be broadcast to ["+t+"].");var u=a.map(function(l,d){return l>1?d:-1}).filter(function(l){return l>=0});return u.length===0?e.clone():We.runKernelFunc(function(l){return l.tile(e,a)},{input:e},function(l){return{input:function(){return l.sum(u,!0)}}})}}),Zd=Ve({cast_:function(n,t){var e=je(n,"x","cast");if(!te(t))throw new Error("Failed to cast to unknown dtype "+t);if(t==="string"&&e.dtype!=="string"||t!=="string"&&e.dtype==="string")throw new Error("Only strings can be casted to strings");var r={dtype:t};return We.runKernelFunc(function(i){return i.cast(e,t)},{x:e},function(i){return{x:function(){return i.clone()}}},"Cast",r)}}),Jd=Ve({clone_:function(n){var t=je(n,"x","clone",null);return We.runKernelFunc(function(){return We.makeTensorFromDataId(t.dataId,t.shape,t.dtype)},{$x:t},function(e){return{$x:function(){return e.toFloat()}}})}}),Yd=Ve({cumsum_:function(n,t,e,r){t===void 0&&(t=0),e===void 0&&(e=!1),r===void 0&&(r=!1);var i=je(n,"x","cumsum"),a=oi([t|=0],i.rank),s=i;a!=null&&(s=i.transpose(a));var u=Ht(1,i.rank)[0],l=We.runKernelFunc(function(d){return d.cumsum(s,u,e,r)},{permutedX:s},function(d){return{permutedX:function(){return d.cumsum(t,e,!r)}}});return a!=null&&(l=l.transpose(a)),l}}),$d=Ve({depthToSpace_:function(n,t,e){e===void 0&&(e="NHWC");var r=je(n,"x","depthToSpace"),i=e==="NHWC"?r.shape[1]:r.shape[2],a=e==="NHWC"?r.shape[2]:r.shape[3],s=e==="NHWC"?r.shape[3]:r.shape[1];return q(i*t>=0,function(){return`Negative dimension size caused by overflow when multiplying
`+i+" and "+t+` for depthToSpace with input shape
`+r.shape}),q(a*t>=0,function(){return`Negative dimension size caused by overflow when multiplying
`+a+" and "+t+` for depthToSpace with input shape
`+r.shape}),q(s%(t*t)==0,function(){return"Dimension size must be evenly divisible by "+t*t+" but is "+s+" for depthToSpace with input shape "+r.shape}),We.runKernelFunc(function(u){return u.depthToSpace(r,t,e)},{$x:r})}}),xi=Ve({expandDims_:function(n,t){t===void 0&&(t=0);var e=je(n,"x","expandDims",null);q(t<=e.rank,function(){return"Axis must be <= rank of the tensor"});var r=e.shape.slice();return t<0&&(q(-(e.rank+1)<=t,function(){return"Axis must be in the interval ["+-(e.rank+1)+", "+e.rank+"]"}),t=e.rank+t+1),r.splice(t,0,1),Ri(e,r)}}),dl=Ve({eye_:function(n,t,e,r){r===void 0&&(r="float32"),t==null&&(t=n);for(var i=cr([n,t],r),a=n<=t?n:t,s=0;s<a;++s)i.set(1,s,s);var u=i.toTensor().as2D(n,t);if(e==null)return u;if(e.length===1)return _a(xi(u,0),[e[0],1,1]);if(e.length===2)return _a(xi(xi(u,0),0),[e[0],e[1],1,1]);if(e.length===3)return _a(xi(xi(xi(u,0),0),0),[e[0],e[1],e[2],1,1]);throw new Error("eye() currently supports only 1D and 2D batchShapes, but received "+e.length+"D.")}}),qd=Ve({multinomial_:function(n,t,e,r){r===void 0&&(r=!1);var i=je(n,"logits","multinomial"),a=i.size,s=i.rank;if(a<2)throw new Error("Error in multinomial: you need at least 2 outcomes, but got "+a+".");if(s>2)throw new Error("Rank of probabilities must be 1 or 2, but is "+s);e=e||Math.random();var u=s===1?i.as2D(1,-1):i,l=We.runKernelFunc(function(d){return d.multinomial(u,r,t,e)},{logits2D:u});return s===1?l.as1D():l}}),gs=Ve({oneHot_:function(n,t,e,r){if(e===void 0&&(e=1),r===void 0&&(r=0),t<2)throw new Error("Error in oneHot: depth must be >=2, but it is "+t);var i=je(n,"indices","oneHot","int32"),a=i.shape.concat([t]);return i=i.flatten(),We.runKernelFunc(function(s){return s.oneHot(i,t,e,r)},{$indices:i},function(s){return{$indices:function(){return pn(i.shape,"float32")}}}).reshape(a)}}),xa=Ve({pad_:function(n,t,e){e===void 0&&(e=0);var r=je(n,"x","pad");if(r.rank===0)throw new Error("pad(scalar) is not defined. Pass non-scalar to pad");var i={paddings:t,constantValue:e};return We.runKernelFunc(function(a){return a.pad(r,t,e)},{x:r},function(a){var s=t.map(function(u){return u[0]});return{x:function(){return a.slice(s,r.shape)}}},"PadV2",i)}}),ep=Ve({pad1d_:function(n,t,e){return e===void 0&&(e=0),q(t.length===2,function(){return"Invalid number of paddings. Must be length of 2."}),xa(n,[t],e)}}),tp=Ve({pad2d_:function(n,t,e){return e===void 0&&(e=0),q(t.length===2&&t[0].length===2&&t[1].length===2,function(){return"Invalid number of paddings. Must be length of 2 each."}),xa(n,t,e)}}),rp=Ve({pad3d_:function(n,t,e){return e===void 0&&(e=0),q(t.length===3&&t[0].length===2&&t[1].length===2&&t[2].length===2,function(){return"Invalid number of paddings. Must be length of 2 each."}),xa(n,t,e)}}),np=Ve({pad4d_:function(n,t,e){return e===void 0&&(e=0),q(t.length===4&&t[0].length===2&&t[1].length===2&&t[2].length===2&&t[3].length===2,function(){return"Invalid number of paddings. Must be length of 2 each."}),xa(n,t,e)}}),ip=Ve({rand_:function(n,t,e){var r=ce(n),i=null;if(e==null||e==="float32")i=new Float32Array(r);else if(e==="int32")i=new Int32Array(r);else{if(e!=="bool")throw new Error("Unknown data type "+e);i=new Uint8Array(r)}for(var a=0;a<r;a++)i[a]=t();return We.makeTensor(i,n,e)}}),ap=Ve({randomNormal_:function(n,t,e,r,i){if(t===void 0&&(t=0),e===void 0&&(e=1),r!=null&&r==="bool")throw new Error("Unsupported data type "+r);for(var a=new ms(t,e,r,!1,i),s=cr(n,r),u=0;u<s.values.length;u++)s.values[u]=a.nextValue();return s.toTensor()}}),op=Ve({randomGamma_:function(n,t,e,r,i){if(e===void 0&&(e=1),r===void 0&&(r="float32"),e==null&&(e=1),r==null&&(r="float32"),r!=="float32"&&r!=="int32")throw new Error("Unsupported data type "+r);for(var a=new Gd(t,e,r,i),s=cr(n,r),u=0;u<s.values.length;u++)s.values[u]=a.nextValue();return s.toTensor()}}),pl=Ve({randomUniform_:function(n,t,e,r,i){t===void 0&&(t=0),e===void 0&&(e=1),r===void 0&&(r="float32");for(var a=cr(n,r),s=new Qd(t,e,null,i),u=0;u<a.values.length;u++)a.values[u]=s.nextValue();return a.toTensor()}}),Ri=Ve({reshape_:function(n,t){var e=je(n,"x","reshape",null);t=Y(t,e.size),q(e.size===ce(t),function(){return"new shape and old shape must have the same number of elements."});var r={shape:t};return We.runKernelFunc(function(i){return i.reshape(e,t)},{x:e},function(i){return{x:function(){return i.reshape(e.shape)}}},"Reshape",r)}}),hl=Ve({spaceToBatchND_:function(n,t,e){var r=je(n,"x","spaceToBatchND");return q(r.rank>=1+t.length,function(){return"input rank "+r.rank+" should be > than [blockShape] "+t.length}),q(e.length===t.length,function(){return"paddings.shape[0] "+e.length+" must be equal to [blockShape] "+t.length}),q(r.shape.reduce(function(i,a,s){return s>0&&s<=t.length?i&&(a+e[s-1][0]+e[s-1][1])%t[s-1]==0:i},!0),function(){return"input spatial dimensions "+r.shape.slice(1)+" with paddings "+e.toString()+" must be divisible by blockShapes "+t.toString()}),We.runKernelFunc(function(i){return i.spaceToBatchND(r,t,e)},{$x:r},function(i){return{$x:function(){return i.batchToSpaceND(t,e)}}})}}),vl=Ve({squeeze_:function(n,t){var e=je(n,"x","squeeze");return Ri(e,V(e.shape,t).newShape)}}),mi=Ve({stack_:function(n,t){t===void 0&&(t=0);var e=ai(n,"tensors","stack");if(q(e.length>=1,function(){return"Pass at least one tensor to tf.stack"}),e.length===1)return e[0].expandDims(t);var r=e[0].rank,i=e[0].shape,a=e[0].dtype;q(t<=r,function(){return"Axis must be <= rank of the tensor"}),e.forEach(function(u){pe(i,u.shape,"All tensors passed to stack must have matching shapes")}),e.forEach(function(u){q(a===u.dtype,function(){return"All tensors passed to stack must have matching dtypes"})});var s=e.map(function(u){return u.expandDims(t)});return Pn(s,t)}}),_a=Ve({tile_:function(n,t){var e=je(n,"x","tile",null);q(e.rank===t.length,function(){return"Error in transpose: rank of input "+e.rank+" must match length of reps "+t+"."});var r=[e],i={reps:t};return We.runKernelFunc(function(a,s){var u=a.tile(e,t);return s([e]),u},{x:e},function(a,s){var u=s[0];return{x:function(){var l=Lr(u);if(u.rank===1)for(var d=0;d<t[0];++d)l=l.add(a.slice([d*u.shape[0]],[u.shape[0]]));else if(u.rank===2)for(d=0;d<t[0];++d)for(var A=0;A<t[1];++A)l=l.add(a.slice([d*u.shape[0],A*u.shape[1]],[u.shape[0],u.shape[1]]));else if(u.rank===3)for(d=0;d<t[0];++d)for(A=0;A<t[1];++A)for(var I=0;I<t[2];++I)l=l.add(a.slice([d*u.shape[0],A*u.shape[1],I*u.shape[2]],[u.shape[0],u.shape[1],u.shape[2]]));else{if(u.rank!==4)throw new Error("Gradient for tile operation is not implemented for rank-"+u.rank+" tensors yet.");for(d=0;d<t[0];++d)for(A=0;A<t[1];++A)for(I=0;I<t[2];++I)for(var O=0;O<t[3];++O)l=l.add(a.slice([d*u.shape[0],A*u.shape[1],I*u.shape[2],O*u.shape[3]],[u.shape[0],u.shape[1],u.shape[2],u.shape[3]]))}return l}}},"Tile",i,r)}}),sp=Ve({truncatedNormal_:function(n,t,e,r,i){if(t===void 0&&(t=0),e===void 0&&(e=1),r!=null&&r==="bool")throw new Error("Unsupported data type "+r);for(var a=new ms(t,e,r,!0,i),s=cr(n,r),u=0;u<s.values.length;u++)s.values[u]=a.nextValue();return s.toTensor()}}),Bn=Ve({unstack_:function(n,t){t===void 0&&(t=0),t=t||0;var e=je(n,"x","unstack");q(t>=-e.shape.length&&t<e.shape.length,function(){return"Axis = "+t+" is not in [-"+e.shape.length+", "+e.shape.length+")"}),t<0&&(t+=e.shape.length);var r={axis:t};return We.runKernelFunc(function(i){return i.unstack(e,t)},{x:e},function(i){return{x:function(){return mi(i,t)}}},"Unpack",r)}}),up=function(n,t){return C(this,void 0,void 0,function(){var e,r,i,a,s,u,l,d,A,I;return E(this,function(O){switch(O.label){case 0:return e=je(n,"x","setdiff1d"),r=je(t,"y","setdiff1d"),q(e.dtype===r.dtype,function(){return"x and y should have the same dtype, but got x ("+e.dtype+") and y ("+r.dtype+")."}),q(e.rank===1,function(){return"x should be 1D tensor, but got x ("+e.shape+")."}),q(r.rank===1,function(){return"y should be 1D tensor, but got y ("+r.shape+")."}),[4,e.data()];case 1:return i=O.sent(),[4,r.data()];case 2:for(a=O.sent(),s=new Set(a),u=0,A=0;A<i.length;A++)s.has(i[A])||u++;for(l=new Zt([u],e.dtype),d=new Zt([u],"int32"),A=0,I=0;A<i.length;A++)s.has(i[A])||(l.values[I]=i[A],d.values[I]=A,I++);return[2,[l.toTensor(),d.toTensor()]]}})})};function So(n,t,e,r){r===void 0&&(r=!0);var i=[];if(r)(i=i.concat(t.slice(0))).push(n[0]/e),i=i.concat(n.slice(1));else{i=i.concat(n[0]);for(var a=t.length,s=0;s<a;++s)i=i.concat([n[s+1]/t[s],t[s]]);i=i.concat(n.slice(a+1))}return i}function Io(n,t,e){e===void 0&&(e=!0);var r=[];if(e){r.push(t);for(var i=t+1;i<n;++i)i<=2*t?(r.push(i),r.push(i-(t+1))):r.push(i)}else{var a=[],s=[];for(i=1;i<n;++i)i>=2*t+1||i%2==1?s.push(i):a.push(i);r.push.apply(r,a),r.push(0),r.push.apply(r,s)}return r}function To(n,t,e,r){r===void 0&&(r=!0);var i=[];r?i.push(n[0]/e):i.push(n[0]*e);for(var a=1;a<n.length;++a)a<=t.length?r?i.push(t[a-1]*n[a]):i.push(n[a]/t[a-1]):i.push(n[a]);return i}function ml(n,t){for(var e=[0],r=0;r<t;++r)e.push(n[r][0]);return e}function gl(n,t,e){for(var r=n.slice(0,1),i=0;i<e;++i)r.push(n[i+1]-t[i][0]-t[i][1]);return r}function ys(n,t){if(n.rank<1)throw new Error("tf.gatherND() expects the input to be rank 1 or higher, but the rank was "+n.rank+".");if(t.rank<1)throw new Error("tf.gatherND() expects the indices to be rank 1 or higher, but the rank was "+t.rank+".");if(t.dtype!=="int32")throw new Error("tf.gatherND() expects the indices to be int32 type, but the dtype was "+t.dtype+".");if(t.shape[t.rank-1]>n.rank)throw new Error("index innermost dimension length must be <= tensor rank; saw: "+t.shape[t.rank-1]+" vs. "+n.rank);if(n.size===0)throw new Error("Requested more than 0 entries, but input is empty. Input shape: "+n.shape+".");for(var e=t.shape,r=e[e.length-1],i=1,a=0;a<e.length-1;++a)i*=e[a];var s=n.shape,u=e.slice();u.pop();var l=1;for(a=r;a<n.rank;++a)l*=s[a],u.push(s[a]);var d=He(n.shape).map(function(A){return A/l}).concat([1]).slice(0,r);return[u,i,l,d]}var rb=Object.freeze({prepareAndValidate:ys}),bs=30;function Ro(n){return n<=bs?n:Me(n,Math.floor(Math.sqrt(n)))}function yl(n,t,e){var r=t.rank>1?t.shape[t.rank-1]:1,i=t.rank>1?t.rank-1:1,a="Must have updates.shape = indices.shape[:batchDim] + shape[sliceDim:], got updates.shape: "+e.shape+", indices.shape: "+t.shape+", shape: "+n+", sliceDim: "+r+", and batchDim: "+i+".";if(e.rank<i)throw new Error(a+" update.rank < "+i+". ");if(n.length<r+(e.rank-i))throw new Error(a+" Output shape length < "+(r+(e.rank-i)));if(e.rank!==i+n.length-r)throw new Error(a+" update.rank != "+(i+n.length-r));for(var s=0;s<i;++s)if(e.shape[s]!==t.shape[s])throw new Error(a+" updates.shape["+s+"] ("+e.shape[s]+") != indices.shape["+s+"] ("+t.shape[s]+").");for(s=0;s<e.rank-i;++s)if(e.shape[s+i]!==n[s+r])throw new Error(a+" updates.shape["+(s+i)+"] ("+e.shape[s+i]+") != shape["+(s+i)+"] ("+n[s+i]+")")}function bl(n,t,e){if(t.rank<1)throw new Error("tf.scatterND() expects the indices to be rank 1 or higher, but the rank was "+t.rank+".");if(n.rank<1)throw new Error("tf.scatterND() expects the updates to be rank 1 or higher, but the rank was "+n.rank+".");if(t.dtype!=="int32")throw new Error("The dtype of 'indices' should be int32, but got dtype: "+t.dtype);if(e.length<1)throw new Error("Output rank must be greater or equal to 1, but got shape: "+e);if(e.length===0){if(t.size===0)throw new Error("Indices specified for empty output. indices shape: "+t.shape);if(n.size===0)throw new Error("Updates specified for empty output. updates shape: "+n.shape)}yl(e,t,n)}function no(n,t,e){for(var r=t.shape.length,i=r>1?t.shape[r-1]:1,a=e.length,s=1,u=i;u<a;++u)s*=e[u];var l=i<1?1:i;return{sliceRank:i,numUpdates:ce(t.shape)/l,sliceSize:s,strides:He(e.slice(0,i)).concat([1]),outputSize:ce(e)}}var nb=Object.freeze({validateUpdateShape:yl,validateInput:bl,calculateShapes:no});function wl(n,t,e){q(n.rank===t.length,function(){return"Error in slice"+n.rank+"D: Length of begin "+t+" must match the rank of the array ("+n.rank+")."}),q(n.rank===e.length,function(){return"Error in slice"+n.rank+"D: Length of size "+e+" must match the rank of the array ("+n.rank+")."});for(var r=function(a){q(t[a]+e[a]<=n.shape[a],function(){return"Error in slice"+n.rank+"D: begin["+a+"] + size["+a+"] ("+(t[a]+e[a])+") would overflow input.shape["+a+"] ("+n.shape[a]+")"})},i=0;i<n.rank;++i)r(i)}function ws(n){for(var t=[],e=0;n>0;)1&n&&t.push(e),n/=2,e++;return t}function Oo(n,t,e){for(var r=[],i=0;i<n.length;i++)r[i]=Math.ceil((t[i]-n[i])/e[i]);return r}function Al(n,t,e,r,i){var a=t[i],s=e[i]||1;(n&1<<i||a==null)&&(a=s>0?Number.MIN_SAFE_INTEGER:Number.MAX_SAFE_INTEGER);var u=r[i];return a<0&&(a+=u),a=he(0,a,u-1)}function xl(n,t,e,r,i){var a=t[i],s=e[i]||1;(n&1<<i||a==null)&&(a=s>0?Number.MAX_SAFE_INTEGER:Number.MIN_SAFE_INTEGER);var u=r[i];return a<0&&(a+=u),a=s>0?he(0,a,u):he(-1,a,u-1)}function As(n,t,e){for(var r=e.length,i=0;i<e.length;i++)if(e[i]>1){r=i;break}for(i=r+1;i<e.length;i++)if(t[i]>0||e[i]!==n[i])return!1;return!0}function xs(n,t){for(var e=n.length>0?n[n.length-1]:1,r=0;r<n.length-1;r++)e+=n[r]*t[r];return e}var ib=Object.freeze({assertParamsValid:wl,maskToAxes:ws,computeOutShape:Oo,startForAxis:Al,stopForAxis:xl,isSliceContinous:As,computeFlatOffset:xs});function ab(n){return q(Re(n),function(){return"The f passed in grad(f) must be a function"}),function(t,e){var r=je(t,"x","tf.grad",null),i=e!=null?je(e,"dy","tf.grad"):null;return We.tidy(function(){var a=We.gradients(function(){return n(r)},[r],i),s=a.value,u=a.grads;return i!=null&&pe(s.shape,i.shape,"The shape of dy passed in grad(f)(x, dy) must match the shape returned by f(x)"),jo(u),u[0]})}}function ob(n){return q(Re(n),function(){return"The f passed in grads(f) must be a function"}),function(t,e){q(Array.isArray(t),function(){return"The args passed in grads(f)(args) must be an array of `Tensor`s or `TensorLike`s"});var r=ai(t,"args","tf.grads",null),i=e!=null?je(e,"dy","tf.grads"):null;return We.tidy(function(){var a=We.gradients(function(){return n.apply(void 0,r)},r,i),s=a.value,u=a.grads;return i!=null&&pe(s.shape,i.shape,"The shape of dy passed in grads(f)([x1,...], dy) must match the shape returned by f([x1,...])"),jo(u),u})}}function sb(n){return q(Re(n),function(){return"The f passed in valueAndGrad(f) must be a function"}),function(t,e){q(t instanceof Ft,function(){return"The x passed in valueAndGrad(f)(x) must be a tensor"}),q(e==null||e instanceof Ft,function(){return"The dy passed in valueAndGrad(f)(x, dy) must be a tensor"});var r=We.gradients(function(){return n(t)},[t],e),i=r.grads,a=r.value;return jo(i),{grad:i[0],value:a}}}function ub(n){return q(Re(n),function(){return"The f passed in valueAndGrads(f) must be a function"}),function(t,e){q(Array.isArray(t)&&t.every(function(i){return i instanceof Ft}),function(){return"The args passed in valueAndGrads(f)(args) must be array of tensors"}),q(e==null||e instanceof Ft,function(){return"The dy passed in valueAndGrads(f)(args, dy) must be a tensor"});var r=We.gradients(function(){return n.apply(void 0,t)},t,e);return e!=null&&pe(r.value.shape,e.shape,"The shape of dy passed in valueAndGrads(f)([x1,...], dy) must match the shape returned by f([x1,...])"),jo(r.grads),r}}function lp(n,t){q(Re(n),function(){return"The f passed in variableGrads(f) must be a function"}),q(t==null||Array.isArray(t)&&t.every(function(A){return A instanceof sr}),function(){return"The varList passed in variableGrads(f, varList) must be an array of variables"});var e=t!=null;if(!e)for(var r in t=[],We.registeredVariables)t.push(We.registeredVariables[r]);var i=e?t.filter(function(A){return!A.trainable}):null,a=t.length;q((t=t.filter(function(A){return A.trainable})).length>0,function(){return"variableGrads() expects at least one of the input variables to be trainable, but none of the "+a+" variables is trainable."});var s=We.gradients(n,t,null,!0),u=s.value,l=s.grads;q(l.some(function(A){return A!=null}),function(){return"Cannot find a connection between any variable and the result of the loss function y=f(x). Please make sure the operations that use variables are inside the function f passed to minimize()."}),q(u.rank===0,function(){return"The f passed in variableGrads(f) must return a scalar, but it returned a rank-"+u.rank+" tensor"});var d={};return t.forEach(function(A,I){l[I]!=null&&(d[A.name]=l[I])}),i!=null&&i.forEach(function(A){return d[A.name]=null}),{value:u,grads:d}}function ko(n){return We.customGrad(n)}function jo(n){if(n.filter(function(t){return t==null}).length>0)throw new Error(`Cannot compute gradient of y=f(x) with respect to x. Make sure that
the f you passed encloses all operations that lead from x to y.`)}var Gi=Ve({softmax_:function(n,t){t===void 0&&(t=-1);var e=je(n,"logits","softmax","float32");if(t===-1&&(t=e.rank-1),t!==e.rank-1)throw Error("Softmax along a non-last dimension is not yet supported. Logits was rank "+e.rank+" and dim was "+t);return We.runKernelFunc(function(r,i){var a=r.softmax(e,t);return i([a]),a},{logits:e},function(r,i){var a=i[0],s=r.mul(a);return{logits:function(){return s.sub(s.sum([t],!0).mul(a))}}},"Softmax",{dim:t},[],[!0])}}),cp=Ve({logSoftmax_:function(n,t){t===void 0&&(t=-1);var e=je(n,"logits","logSoftmax");if(t===-1&&(t=e.rank-1),t!==e.rank-1)throw Error("Log Softmax along a non-last dimension is not yet supported. Logits was rank "+e.rank+" and axis was "+t);return ko(function(r,i){var a=r.max(t,!0),s=r.sub(a),u=s.toFloat().sub(s.exp().sum(t,!0).log());return i([u]),{value:u,gradFunc:function(l,d){var A=d[0].exp();return l.sub(l.sum(t,!0).mul(A))}}})(e)}}),El=function(){function n(t,e){this.backend=t,this.dataMover=e,this.data=new WeakMap,this.dataIdsCount=0}return n.prototype.get=function(t){return this.data.has(t)||this.dataMover.moveData(this.backend,t),this.data.get(t)},n.prototype.set=function(t,e){this.dataIdsCount++,this.data.set(t,e)},n.prototype.has=function(t){return this.data.has(t)},n.prototype.delete=function(t){return this.dataIdsCount--,this.data.delete(t)},n.prototype.numDataIds=function(){return this.dataIdsCount},n}(),Cl=function(){function n(){}return n.prototype.time=function(t){return at("time")},n.prototype.read=function(t){return at("read")},n.prototype.readSync=function(t){return at("readSync")},n.prototype.numDataIds=function(){return at("numDataIds")},n.prototype.disposeData=function(t){return at("disposeData")},n.prototype.write=function(t,e,r){return at("write")},n.prototype.move=function(t,e,r,i){return at("move")},n.prototype.memory=function(){return at("memory")},n.prototype.floatPrecision=function(){return at("floatPrecision")},n.prototype.epsilon=function(){return this.floatPrecision()===32?1e-7:1e-4},n.prototype.batchMatMul=function(t,e,r,i){return at("batchMatMul")},n.prototype.fusedBatchMatMul=function(t){return t.a,t.b,t.transposeA,t.transposeB,t.bias,t.activation,t.preluActivationWeights,at("fusedBatchMatMul")},n.prototype.slice=function(t,e,r){return at("slice")},n.prototype.stridedSlice=function(t,e,r,i){return at("stridedSlice")},n.prototype.unstack=function(t,e){return at("unstack")},n.prototype.reverse=function(t,e){return at("reverse")},n.prototype.concat=function(t,e){return at("concat")},n.prototype.neg=function(t){return at("neg")},n.prototype.add=function(t,e){return at("add")},n.prototype.addN=function(t){return at("addN")},n.prototype.subtract=function(t,e){return at("subtract")},n.prototype.multiply=function(t,e){return at("multiply")},n.prototype.realDivide=function(t,e){return at("realDivide")},n.prototype.floorDiv=function(t,e){return at("floorDiv")},n.prototype.sum=function(t,e){return at("sum")},n.prototype.prod=function(t,e){return at("prod")},n.prototype.unsortedSegmentSum=function(t,e,r){return at("unsortedSegmentSum")},n.prototype.argMin=function(t,e){return at("argMin")},n.prototype.argMax=function(t,e){return at("argMax")},n.prototype.equal=function(t,e){return at("equal")},n.prototype.notEqual=function(t,e){return at("notEqual")},n.prototype.less=function(t,e){return at("less")},n.prototype.lessEqual=function(t,e){return at("lessEqual")},n.prototype.greater=function(t,e){return at("greater")},n.prototype.greaterEqual=function(t,e){return at("greaterEqual")},n.prototype.logicalNot=function(t){return at("logicalNot")},n.prototype.logicalAnd=function(t,e){return at("logicalAnd")},n.prototype.logicalOr=function(t,e){return at("logicalOr")},n.prototype.where=function(t){return at("where")},n.prototype.select=function(t,e,r){return at("select")},n.prototype.topk=function(t,e,r){return at("topk")},n.prototype.min=function(t,e){return at("min")},n.prototype.minimum=function(t,e){return at("minimum")},n.prototype.mod=function(t,e){return at("mod")},n.prototype.max=function(t,e){return at("max")},n.prototype.maximum=function(t,e){return at("maximum")},n.prototype.all=function(t,e){return at("all")},n.prototype.any=function(t,e){return at("any")},n.prototype.squaredDifference=function(t,e){return at("squaredDifference")},n.prototype.ceil=function(t){return at("ceil")},n.prototype.floor=function(t){return at("floor")},n.prototype.round=function(t){return at("round")},n.prototype.sign=function(t){return at("sign")},n.prototype.isNaN=function(t){return at("isNaN")},n.prototype.isInf=function(t){return at("isInf")},n.prototype.isFinite=function(t){return at("isFinite")},n.prototype.pow=function(t,e){return at("pow")},n.prototype.exp=function(t){return at("exp")},n.prototype.expm1=function(t){return at("expm1")},n.prototype.softmax=function(t,e){return at("softmax")},n.prototype.log=function(t){return at("log")},n.prototype.log1p=function(t){return at("log1p")},n.prototype.sqrt=function(t){return at("sqrt")},n.prototype.rsqrt=function(t){return at("rsqrt")},n.prototype.square=function(t){return at("square")},n.prototype.reciprocal=function(t){return at("reciprocal")},n.prototype.relu=function(t){return at("relu")},n.prototype.relu6=function(t){return at("relu6")},n.prototype.prelu=function(t,e){return at("prelu")},n.prototype.elu=function(t){return at("elu")},n.prototype.eluDer=function(t,e){return at("eluDer")},n.prototype.selu=function(t){return at("selu")},n.prototype.int=function(t){return at("int")},n.prototype.clip=function(t,e,r){return at("clip")},n.prototype.abs=function(t){return at("abs")},n.prototype.complexAbs=function(t){return at("complexAbs")},n.prototype.sigmoid=function(t){return at("sigmoid")},n.prototype.softplus=function(t){return at("softplus")},n.prototype.sin=function(t){return at("sin")},n.prototype.cos=function(t){return at("cos")},n.prototype.tan=function(t){return at("tan")},n.prototype.asin=function(t){return at("asin")},n.prototype.acos=function(t){return at("acos")},n.prototype.atan=function(t){return at("atan")},n.prototype.atan2=function(t,e){return at("atan2")},n.prototype.sinh=function(t){return at("sinh")},n.prototype.cosh=function(t){return at("cosh")},n.prototype.tanh=function(t){return at("tanh")},n.prototype.asinh=function(t){return at("asinh")},n.prototype.acosh=function(t){return at("acosh")},n.prototype.atanh=function(t){return at("atanh")},n.prototype.erf=function(t){return at("erf")},n.prototype.step=function(t,e){return at("step")},n.prototype.fusedConv2d=function(t){return t.input,t.filter,t.convInfo,t.bias,t.activation,t.preluActivationWeights,at("fusedConv2d")},n.prototype.conv2d=function(t,e,r){return at("conv2d")},n.prototype.conv2dDerInput=function(t,e,r){return at("conv2dDerInput")},n.prototype.conv2dDerFilter=function(t,e,r){return at("conv2dDerFilter")},n.prototype.fusedDepthwiseConv2D=function(t){return t.input,t.filter,t.convInfo,t.bias,t.activation,t.preluActivationWeights,at("fusedDepthwiseConv2D")},n.prototype.depthwiseConv2D=function(t,e,r){return at("depthwiseConv2D")},n.prototype.depthwiseConv2DDerInput=function(t,e,r){return at("depthwiseConv2DDerInput")},n.prototype.depthwiseConv2DDerFilter=function(t,e,r){return at("depthwiseConv2DDerFilter")},n.prototype.conv3d=function(t,e,r){return at("conv3d")},n.prototype.conv3dDerInput=function(t,e,r){return at("conv3dDerInput")},n.prototype.conv3dDerFilter=function(t,e,r){return at("conv3dDerFilter")},n.prototype.maxPool=function(t,e){return at("maxPool")},n.prototype.maxPoolBackprop=function(t,e,r,i){return at("maxPoolBackprop")},n.prototype.avgPool=function(t,e){return at("avgPool")},n.prototype.avgPoolBackprop=function(t,e,r){return at("avgPoolBackprop")},n.prototype.avgPool3d=function(t,e){return at("avgPool3d")},n.prototype.avgPool3dBackprop=function(t,e,r){return at("avgPool3dBackprop")},n.prototype.maxPool3d=function(t,e){return at("maxPool3d")},n.prototype.maxPool3dBackprop=function(t,e,r,i){return at("maxPool3dBackprop")},n.prototype.reshape=function(t,e){return at("reshape")},n.prototype.cast=function(t,e){return at("cast")},n.prototype.tile=function(t,e){return at("tile")},n.prototype.pad=function(t,e,r){return at("pad")},n.prototype.transpose=function(t,e){return at("transpose")},n.prototype.gather=function(t,e,r){return at("gather")},n.prototype.gatherND=function(t,e){return at("gatherND")},n.prototype.scatterND=function(t,e,r){return at("scatterND")},n.prototype.batchToSpaceND=function(t,e,r){return at("batchToSpaceND")},n.prototype.spaceToBatchND=function(t,e,r){return at("spaceToBatchND")},n.prototype.resizeBilinear=function(t,e,r,i){return at("resizeBilinear")},n.prototype.resizeBilinearBackprop=function(t,e,r){return at("resizeBilinearBackprop")},n.prototype.resizeNearestNeighbor=function(t,e,r,i){return at("resizeNearestNeighbor")},n.prototype.resizeNearestNeighborBackprop=function(t,e,r){return at("resizeNearestNeighborBackprop")},n.prototype.batchNormalization=function(t,e,r,i,a,s){return at("batchNormalization")},n.prototype.localResponseNormalization4D=function(t,e,r,i,a){return at("localResponseNormalization4D")},n.prototype.LRNGrad=function(t,e,r,i,a,s,u){return at("LRNGrad")},n.prototype.multinomial=function(t,e,r,i){return at("multinomial")},n.prototype.oneHot=function(t,e,r,i){return at("oneHot")},n.prototype.cumsum=function(t,e,r,i){return at("cumsum")},n.prototype.nonMaxSuppression=function(t,e,r,i,a){return at("nonMaxSuppression")},n.prototype.fft=function(t){return at("fft")},n.prototype.ifft=function(t){return at("ifft")},n.prototype.complex=function(t,e){return at("complex")},n.prototype.real=function(t){return at("real")},n.prototype.imag=function(t){return at("imag")},n.prototype.cropAndResize=function(t,e,r,i,a,s){return at("cropAndResize")},n.prototype.depthToSpace=function(t,e,r){return at("depthToSpace")},n.prototype.split=function(t,e,r){return at("split")},n.prototype.sparseToDense=function(t,e,r,i){return at("sparseToDense")},n.prototype.diag=function(t){return at("diag")},n.prototype.fill=function(t,e,r){return at("fill")},n.prototype.onesLike=function(t){return at("onesLike")},n.prototype.zerosLike=function(t){return at("zerosLike")},n.prototype.linspace=function(t,e,r){return at("linspace")},n.prototype.dispose=function(){return at("dispose")},n}();function at(n){throw new Error("'"+n+"' not yet implemented or not found in the registry. Did you forget to import the kernel?")}function Qi(n,t){for(var e=n.length,r=[],i=0;i<e;i++){var a=e-1-i,s=n[a]||1;(t[t.length-1-i]||1)>1&&s===1&&r.unshift(a)}return r}function kn(n,t){for(var e=[],r=0;r<t.length;r++){var i=n[n.length-r-1],a=t.length-r-1,s=t[a];(i==null||i===1&&s>1)&&e.unshift(a)}return e}function Ir(n,t){for(var e=[],r=Math.max(n.length,t.length),i=0;i<r;i++){var a=n[n.length-i-1];a==null&&(a=1);var s=t[t.length-i-1];if(s==null&&(s=1),a===1)e.unshift(s);else if(s===1)e.unshift(a);else{if(a!==s)throw Error("Operands could not be broadcast together with shapes "+n+" and "+t+".");e.unshift(a)}}return e}function Fa(n,t,e,r,i,a,s){s===void 0&&(s="channelsLast");var u,l=Do(t),d=l[0],A=l[1];if(s==="channelsLast")u=[d,A,n[3],n[3]];else{if(s!=="channelsFirst")throw new Error("Unknown dataFormat "+s);u=[d,A,n[1],n[1]]}return sa(n,u,e,r,i,a,!1,s)}function io(n,t,e,r,i,a,s){s===void 0&&(s="NDHWC");var u,l,d=Cs(t),A=d[0],I=d[1],O=d[2];if(s==="NDHWC")l="channelsLast",u=[A,I,O,n[4],n[4]];else{if(s!=="NCDHW")throw new Error("Unknown dataFormat "+s);l="channelsFirst",u=[A,I,O,n[1],n[1]]}return ao(n,u,e,r,i,!1,l,a)}function sa(n,t,e,r,i,a,s,u){s===void 0&&(s=!1),u===void 0&&(u="channelsLast");var l=[-1,-1,-1,-1],d=l[0],A=l[1],I=l[2],O=l[3];if(u==="channelsLast")d=n[0],A=n[1],I=n[2],O=n[3];else{if(u!=="channelsFirst")throw new Error("Unknown dataFormat "+u);d=n[0],O=n[1],A=n[2],I=n[3]}var z,re=t[0],oe=t[1],ae=t[3],se=Do(e),be=se[0],Ae=se[1],me=Do(r),Ce=me[0],Oe=me[1],Le=La(re,Ce),Ue=La(oe,Oe),Ne=function(tt,ct,bt,gt,vt,At,ft,Et){var It,Vt,ir;if(typeof tt=="number"){It={top:tt,bottom:tt,left:tt,right:tt,type:tt===0?"VALID":"NUMBER"};var fr=function(Or,Qr,Ur,an,An){an==null&&(an=Es(Or,Qr,Ur));var xn=Or[0],Wi=Or[1],zi=oo((xn-Qr+2*an)/Ur+1,An);q(ge(zi),function(){return"The output # of rows ("+zi+") must be an integer. Change the stride and/or zero pad parameters"});var wi=oo((Wi-Qr+2*an)/Ur+1,An);return q(ge(wi),function(){return"The output # of columns ("+wi+") must be an integer. Change the stride and/or zero pad parameters"}),[zi,wi]}([ct,bt],At,gt,tt,Et);Vt=fr[0],ir=fr[1]}else if(tt==="same"){Vt=Math.ceil(ct/gt),ir=Math.ceil(bt/vt);var Ar=Math.max(0,(Vt-1)*gt+At-ct),Dr=Math.max(0,(ir-1)*vt+ft-bt),Rr=Math.floor(Ar/2),Pr=Ar-Rr,xr=Math.floor(Dr/2);It={top:Rr,bottom:Pr,left:xr,right:Dr-xr,type:"SAME"}}else{if(tt!=="valid")throw Error("Unknown padding parameter: "+tt);It={top:0,bottom:0,left:0,right:0,type:"VALID"},Vt=Math.ceil((ct-At+1)/gt),ir=Math.ceil((bt-ft+1)/vt)}return{padInfo:It,outHeight:Vt,outWidth:ir}}(i,A,I,be,Ae,Le,Ue,a),Fe=Ne.padInfo,Ze=Ne.outHeight,Ke=Ne.outWidth,et=s?ae*O:ae;return u==="channelsFirst"?z=[d,et,Ze,Ke]:u==="channelsLast"&&(z=[d,Ze,Ke,et]),{batchSize:d,dataFormat:u,inHeight:A,inWidth:I,inChannels:O,outHeight:Ze,outWidth:Ke,outChannels:et,padInfo:Fe,strideHeight:be,strideWidth:Ae,filterHeight:re,filterWidth:oe,effectiveFilterHeight:Le,effectiveFilterWidth:Ue,dilationHeight:Ce,dilationWidth:Oe,inShape:n,outShape:z,filterShape:t}}function ao(n,t,e,r,i,a,s,u){a===void 0&&(a=!1),s===void 0&&(s="channelsLast");var l=[-1,-1,-1,-1,-1],d=l[0],A=l[1],I=l[2],O=l[3],z=l[4];if(s==="channelsLast")d=n[0],A=n[1],I=n[2],O=n[3],z=n[4];else{if(s!=="channelsFirst")throw new Error("Unknown dataFormat "+s);d=n[0],z=n[1],A=n[2],I=n[3],O=n[4]}var re,oe=t[0],ae=t[1],se=t[2],be=t[4],Ae=Cs(e),me=Ae[0],Ce=Ae[1],Oe=Ae[2],Le=Cs(r),Ue=Le[0],Ne=Le[1],Fe=Le[2],Ze=La(oe,Ue),Ke=La(ae,Ne),et=La(se,Fe),tt=function(ft,Et,It,Vt,ir,fr,Ar,Dr,Rr,Pr,xr){var Or,Qr,Ur,an;if(typeof ft=="number"){Or={top:ft,bottom:ft,left:ft,right:ft,front:ft,back:ft,type:ft===0?"VALID":"NUMBER"};var An=function(to,ta,al,ro,Vi,ol){Vi==null&&(Vi=Es(to,ta,ro));var q0=to[0],eb=to[1],tb=to[2],sl=oo((q0-ta+2*Vi)/ro+1,ol);q(ge(sl),function(){return"The output # of depths ("+sl+") must be an integer. Change the stride and/or zero pad parameters"});var ul=oo((eb-ta+2*Vi)/ro+1,ol);q(ge(ul),function(){return"The output # of rows ("+ul+") must be an integer. Change the stride and/or zero pad parameters"});var ll=oo((tb-ta+2*Vi)/ro+1,ol);return q(ge(ll),function(){return"The output # of columns ("+ll+") must be an integer. Change the stride and/or zero pad parameters"}),[sl,ul,ll,al]}([Et,It,Vt,1],Dr,1,ir,ft,xr);Qr=An[0],Ur=An[1],an=An[2]}else if(ft==="same"){Qr=Math.ceil(Et/ir),Ur=Math.ceil(It/fr),an=Math.ceil(Vt/Ar);var xn=(Qr-1)*ir+Dr-Et,Wi=(Ur-1)*fr+Rr-It,zi=(an-1)*Ar+Pr-Vt,wi=Math.floor(xn/2),eo=xn-wi,qi=Math.floor(Wi/2),ga=Wi-qi,ea=Math.floor(zi/2);Or={top:qi,bottom:ga,left:ea,right:zi-ea,front:wi,back:eo,type:"SAME"}}else{if(ft!=="valid")throw Error("Unknown padding parameter: "+ft);Or={top:0,bottom:0,left:0,right:0,front:0,back:0,type:"VALID"},Qr=Math.ceil((Et-Dr+1)/ir),Ur=Math.ceil((It-Rr+1)/fr),an=Math.ceil((Vt-Pr+1)/Ar)}return{padInfo:Or,outDepth:Qr,outHeight:Ur,outWidth:an}}(i,A,I,O,me,Ce,Oe,Ze,Ke,et,u),ct=tt.padInfo,bt=tt.outDepth,gt=tt.outHeight,vt=tt.outWidth,At=a?be*z:be;return s==="channelsFirst"?re=[d,At,bt,gt,vt]:s==="channelsLast"&&(re=[d,bt,gt,vt,At]),{batchSize:d,dataFormat:s,inDepth:A,inHeight:I,inWidth:O,inChannels:z,outDepth:bt,outHeight:gt,outWidth:vt,outChannels:At,padInfo:ct,strideDepth:me,strideHeight:Ce,strideWidth:Oe,filterDepth:oe,filterHeight:ae,filterWidth:se,effectiveFilterDepth:Ze,effectiveFilterHeight:Ke,effectiveFilterWidth:et,dilationDepth:Ue,dilationHeight:Ne,dilationWidth:Fe,inShape:n,outShape:re,filterShape:t}}function Es(n,t,e,r){r===void 0&&(r=1);var i=La(t,r);return Math.floor((n[0]*(e-1)-e+i)/2)}function Do(n){return typeof n=="number"?[n,n,n]:n.length===2?[n[0],n[1],1]:n}function Cs(n){return typeof n=="number"?[n,n,n]:n}function La(n,t){return t<=1?n:n+(n-1)*(t-1)}function oo(n,t){if(!t)return n;switch(t){case"round":return Math.round(n);case"ceil":return Math.ceil(n);case"floor":return Math.floor(n);default:throw new Error("Unknown roundingMode "+t)}}function Ea(n){var t=Do(n),e=t[0],r=t[1],i=t[2];return e===1&&r===1&&i===1}function si(n,t){return Ea(n)||Ea(t)}function Po(n){if(n==="NHWC")return"channelsLast";if(n==="NCHW")return"channelsFirst";throw new Error("Unknown dataFormat "+n)}function Ss(n,t,e){if(t==="complex64"){if(n.dtype==="complex64")return n.clone();var r=pn(n.shape),i=n.toFloat(),a=e.complex(i,r);return r.dispose(),i.dispose(),a}if(!U(n.dtype,t))return We.makeTensorFromDataId(n.dataId,n.shape,t);if(n.dtype==="complex64"){var s=e.real(n);return a=s.cast(t),s.dispose(),a}if(t==="int32")return e.int(n);if(t==="bool"){var u=kt(0,n.dtype);return a=e.notEqual(n,u),u.dispose(),a}throw new Error("Error in Cast: failed to cast "+n.dtype+" to "+t)}function Bo(n,t){return We.makeTensorFromDataId(n.dataId,t,n.dtype)}function Is(n,t,e){var r=(t-n)/(e-1),i=rt(e,"float32");i[0]=n;for(var a=1;a<i.length;a++)i[a]=i[a-1]+r;return On(i,"float32")}var lb=Object.freeze({castTensor:Ss,reshapeTensor:Bo,linspaceImpl:Is,upcastType:Tt,axesAreInnerMostDims:Ai,combineLocations:ia,computeOutAndReduceShapes:En,expandShapeToKeepDim:Dn,assertAxesAreInnerMostDims:zn,getAxesPermutation:oi,getUndoAxesPermutation:_t,getInnerMostAxes:Ht,getBroadcastDims:Qi,getReductionAxes:kn,assertAndGetBroadcastShape:Ir,assertParamsConsistent:rn,computeOutShape:nn,computePool2DInfo:Fa,computePool3DInfo:io,computeConv2DInfo:sa,computeConv3DInfo:ao,computeDefaultPad:Es,tupleValuesAreOne:Ea,eitherStridesOrDilationsAreOne:si,convertConv2DDataFormat:Po,PARALLELIZE_THRESHOLD:bs,computeOptimalWindowSize:Ro});function Ts(n,t){if(n.length!==t.length)throw new Error("Cannot merge real and imag arrays of different lengths. real:"+n.length+", imag: "+t.length+".");for(var e=new Float32Array(2*n.length),r=0;r<e.length;r+=2)e[r]=n[r/2],e[r+1]=t[r/2];return e}function Sl(n,t){return{real:n[2*t],imag:n[2*t+1]}}function fp(n,t,e,r){n[2*r]=t,n[2*r+1]=e}function dp(n,t,e){var r=(e?2:-2)*Math.PI*(n/t);return{real:Math.cos(r),imag:Math.sin(r)}}function pp(n,t,e){var r=function(a,s,u){return function(l,d,A){for(var I=0,O=l.length,z=0,re=!1;I<O;){var oe=A(d,l[z=I+(O-I>>>1)]);oe>0?I=z+1:(O=z,re=!oe)}return re?I:-I-1}(a,s,u||hp)}(n,t,e),i=r<0?-(r+1):r;n.splice(i,0,t)}function hp(n,t){return n>t?1:n<t?-1:0}function Rs(n,t,e,r,i){return Il(n,t,e,r,i,0).selectedIndices}function Os(n,t,e,r,i,a){var s=Il(n,t,e,r,i,a,!0);return s.numValidOutputs.dispose(),{selectedIndices:s.selectedIndices,selectedScores:s.selectedScores}}function Il(n,t,e,r,i,a,s,u){s===void 0&&(s=!1),u===void 0&&(u=!1);for(var l=Array.from(t).map(function(me,Ce){return{score:me,boxIndex:Ce,suppressBeginIndex:0}}).filter(function(me){return me.score>i}).sort(Tl),d=a>0?-.5/a:0,A=[],I=[];A.length<e&&l.length>0;){var O=l.pop(),z=O.score,re=O.boxIndex,oe=O.suppressBeginIndex;if(z<i)break;for(var ae=!1,se=A.length-1;se>=oe;--se){var be=vp(n,re,A[se]);if(be>=r){ae=!0;break}if(O.score=O.score*mp(r,d,be),O.score<=i)break}O.suppressBeginIndex=A.length,ae||(O.score===z?(A.push(re),I.push(O.score)):O.score>i&&pp(l,O,Tl))}var Ae=A.length;return u&&(A.fill(0,Ae),I.fill(0,Ae)),{selectedIndices:On(A,"int32"),selectedScores:On(I,"float32"),numValidOutputs:kt(Ae,"int32")}}function vp(n,t,e){var r=n.subarray(4*t,4*t+4),i=n.subarray(4*e,4*e+4),a=Math.min(r[0],r[2]),s=Math.min(r[1],r[3]),u=Math.max(r[0],r[2]),l=Math.max(r[1],r[3]),d=Math.min(i[0],i[2]),A=Math.min(i[1],i[3]),I=Math.max(i[0],i[2]),O=Math.max(i[1],i[3]),z=(u-a)*(l-s),re=(I-d)*(O-A);if(z<=0||re<=0)return 0;var oe=Math.max(a,d),ae=Math.max(s,A),se=Math.min(u,I),be=Math.min(l,O),Ae=Math.max(se-oe,0)*Math.max(be-ae,0);return Ae/(z+re-Ae)}function mp(n,t,e){var r=Math.exp(t*e*e);return e<=n?r:0}function Tl(n,t){return n.score-t.score||n.score===t.score&&t.boxIndex-n.boxIndex}function Rl(n,t,e){var r=new Array(n.rank).fill(0),i=n.shape.slice();return t.map(function(a){i[e]=a;var s=n.slice(r,i);return r[e]+=a,s})}function Ol(n,t){for(var e=new Array(n.rank),r=0;r<e.length;r++)e[r]=n.shape[r]*t[r];var i=cr(e,n.dtype);for(r=0;r<i.values.length;++r){for(var a=i.indexToLoc(r),s=new Array(n.rank),u=0;u<s.length;u++)s[u]=a[u]%n.shape[u];var l=n.locToIndex(s);i.values[r]=n.values[l]}return i.toTensor()}function kl(n,t,e,r,i){for(var a=t[t.length-1],s=[n.length/a,a],u=s[0],l=s[1],d=G(e,u*r),A=G("int32",u*r),I=0;I<u;I++){for(var O=I*l,z=n.subarray(O,O+l),re=[],oe=0;oe<z.length;oe++)re.push({value:z[oe],index:oe});re.sort(function(me,Ce){return Ce.value-me.value});var ae=I*r,se=d.subarray(ae,ae+r),be=A.subarray(ae,ae+r);for(oe=0;oe<r;oe++)se[oe]=re[oe].value,be[oe]=re[oe].index}var Ae=t.slice();return Ae[Ae.length-1]=r,[Sn(d,Ae,e),Sn(A,Ae,"int32")]}function ks(n,t){for(var e=[],r=0;r<t.length;r++)t[r]&&e.push(r);var i=cr(n,"int32"),a=cr([e.length,n.length],"int32");for(r=0;r<e.length;r++){var s=i.indexToLoc(e[r]),u=r*n.length;a.values.set(s,u)}return a.toTensor()}var gp=function(n,t){this.outputShape=[],this.outputShape=n,this.variableNames=t.map(function(i,a){return"T"+a});var e=[];this.variableNames.forEach(function(i){e.push("float v"+i+" = get"+i+"AtOutCoords();")});var r=this.variableNames.map(function(i){return"v"+i}).join(" + ");this.userCode=`
void main() {
`+e.join(`
`)+`
float result = `+r+`;
setOutput(result);
}
`},yp=function(n,t){this.outputShape=[],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=n,this.variableNames=t.map(function(i,a){return"T"+a});var e=[];this.variableNames.forEach(function(i){e.push("vec4 v"+i+" = get"+i+"AtOutCoords();")});var r=this.variableNames.map(function(i){return"v"+i}).join(" + ");this.userCode=`
void main() {
`+e.join(`
`)+`
vec4 result = `+r+`;
setOutput(result);
}
`},bp=function(n,t,e){this.variableNames=["A"];var r=n.windowSize,i=n.batchSize,a=n.inSize,s=Math.ceil(a/r);e||this.variableNames.push("bestIndicesA"),this.outputShape=[i,s];var u=t==="max"?">":"<",l=e?"inOffset + i;":"round(getBestIndicesA(batch, inOffset + i));";this.userCode=`
void main() {
ivec2 coords = getOutputCoords();
int batch = coords[0];
int outIdx = coords[1];
int inOffset = outIdx * `+r+`;
int bestIndex = inOffset;
float bestValue = getA(batch, bestIndex);
for (int i = 0; i < `+r+`; i++) {
int inIdx = `+l+`;
float candidate = getA(batch, inIdx);
if (candidate `+u+` bestValue) {
bestValue = candidate;
bestIndex = inIdx;
}
}
setOutput(float(bestIndex));
}
`};function jl(n,t){return["x","y","z","w","u","v"].slice(0,t).map(function(e){return n+"."+e})}function ci(n,t){return t===1?[n]:jl(n,t)}function qn(){var n,t,e,r,i,a,s,u,l,d;return P().getNumber("WEBGL_VERSION")===2?(n="#version 300 es",t="in",e="out",r="in",i="texture",a="outputColor",s="out vec4 outputColor;",u=`
bool isnan_custom(float val) {
return (val > 0.0 || val < 0.0) ? false : val != 0.0;
}
bvec4 isnan_custom(vec4 val) {
return bvec4(isnan_custom(val.x),
isnan_custom(val.y), isnan_custom(val.z), isnan_custom(val.w));
}
#define isnan(value) isnan_custom(value)
`,l="",d=`
#define round(value) newRound(value)
int newRound(float value) {
return int(floor(value + 0.5));
}
ivec4 newRound(vec4 value) {
return ivec4(floor(value + vec4(0.5)));
}
`):(n="",t="attribute",e="varying",r="varying",i="texture2D",a="gl_FragColor",s="",u=`
#define isnan(value) isnan_custom(value)
bool isnan_custom(float val) {
return (val > 0. || val < 1. || val == 0.) ? false : true;
}
bvec4 isnan_custom(vec4 val) {
return bvec4(isnan(val.x), isnan(val.y), isnan(val.z), isnan(val.w));
}
`,l=`
uniform float INFINITY;
bool isinf(float val) {
return abs(val) == INFINITY;
}
bvec4 isinf(vec4 val) {
return equal(abs(val), vec4(INFINITY));
}
`,d=`
int round(float value) {
return int(floor(value + 0.5));
}
ivec4 round(vec4 value) {
return ivec4(floor(value + vec4(0.5)));
}
`),{version:n,attribute:t,varyingVs:e,varyingFs:r,texture2D:i,output:a,defineOutput:s,defineSpecialNaN:u,defineSpecialInf:l,defineRound:d}}function Ca(n,t,e){e===void 0&&(e="index");var r=He(t);return r.map(function(i,a){return"int "+n[a]+" = "+e+" / "+i+"; "+(a===r.length-1?"int "+n[a+1]+" = "+e+" - "+n[a]+" * "+i:"index -= "+n[a]+" * "+i)+";"}).join("")}function js(n){var t=He(n).map(function(e){return e.toString()});return`
int getFlatIndex(ivec3 coords) {
return coords.x * `+t[0]+" + coords.y * "+t[1]+` + coords.z;
}
`}var Dl=`
const float FLOAT_MAX = 1.70141184e38;
const float FLOAT_MIN = 1.17549435e-38;
lowp vec4 encode_float(highp float v) {
if (isnan(v)) {
return vec4(255, 255, 255, 255);
}
highp float av = abs(v);
if(av < FLOAT_MIN) {
return vec4(0.0, 0.0, 0.0, 0.0);
} else if(v > FLOAT_MAX) {
return vec4(0.0, 0.0, 128.0, 127.0) / 255.0;
} else if(v < -FLOAT_MAX) {
return vec4(0.0, 0.0, 128.0, 255.0) / 255.0;
}
highp vec4 c = vec4(0,0,0,0);
highp float e = floor(log2(av));
highp float m = exp2(fract(log2(av))) - 1.0;
c[2] = floor(128.0 * m);
m -= c[2] / 128.0;
c[1] = floor(32768.0 * m);
m -= c[1] / 32768.0;
c[0] = floor(8388608.0 * m);
highp float ebias = e + 127.0;
c[3] = floor(ebias / 2.0);
ebias -= c[3] * 2.0;
c[2] += floor(ebias) * 128.0;
c[3] += 128.0 * step(0.0, -v);
return c / 255.0;
}
`;function wp(n,t,e,r){var i=[];n.forEach(function(z){var re=ce(z.shapeInfo.logicalShape);z.shapeInfo.isUniform?i.push("uniform float "+z.name+(re>1?"["+re+"]":"")+";"):(i.push("uniform sampler2D "+z.name+";"),i.push("uniform int offset"+z.name+";"))});var a,s,u=i.join(`
`),l=n.map(function(z){return function(re,oe,ae){ae===void 0&&(ae=!1);var se="";se+=ae?Pl(re):Ua(re);var be=re.shapeInfo.logicalShape,Ae=oe.logicalShape;return be.length<=Ae.length&&(se+=ae?function(me,Ce){var Oe,Le=me.name,Ue=Le.charAt(0).toUpperCase()+Le.slice(1),Ne="get"+Ue+"AtOutCoords",Fe=me.shapeInfo.logicalShape.length,Ze=Ce.logicalShape.length,Ke=Qi(me.shapeInfo.logicalShape,Ce.logicalShape),et=cn(Ze),tt=Ze-Fe,ct=["x","y","z","w","u","v"];Oe=Fe===0?"":Ze<2&&Ke.length>=1?"coords = 0;":Ke.map(function(It){return"coords."+ct[It+tt]+" = 0;"}).join(`
`);var bt="";bt=Ze<2&&Fe>0?"coords":me.shapeInfo.logicalShape.map(function(It,Vt){return"coords."+ct[Vt+tt]}).join(", ");var gt="return outputValue;",vt=ce(me.shapeInfo.logicalShape)===1,At=ce(Ce.logicalShape)===1;if(Fe!==1||vt||At){if(vt&&!At)gt=Ze===1?`
return vec4(outputValue.x, outputValue.x, 0., 0.);
`:`
return vec4(outputValue.x);
`;else if(Ke.length){var ft=Fe-2,Et=Fe-1;Ke.indexOf(ft)>-1&&Ke.indexOf(Et)>-1?gt="return vec4(outputValue.x);":Ke.indexOf(ft)>-1?gt="return vec4(outputValue.x, outputValue.y, outputValue.x, outputValue.y);":Ke.indexOf(Et)>-1&&(gt="return vec4(outputValue.xx, outputValue.zz);")}}else gt=`
return vec4(outputValue.xy, outputValue.xy);
`;return`
vec4 `+Ne+`() {
`+et+` coords = getOutputCoords();
`+Oe+`
vec4 outputValue = get`+Ue+"("+bt+`);
`+gt+`
}
`}(re,oe):function(me,Ce){var Oe=me.name,Le=Oe.charAt(0).toUpperCase()+Oe.slice(1),Ue="get"+Le+"AtOutCoords",Ne=Ce.texShape,Fe=me.shapeInfo.texShape,Ze=me.shapeInfo.logicalShape.length,Ke=Ce.logicalShape.length;if(!me.shapeInfo.isUniform&&Ze===Ke&&me.shapeInfo.flatOffset==null&&fe(Fe,Ne))return`
float `+Ue+`() {
return sampleTexture(`+Oe+`, resultUV);
}
`;var et,tt=cn(Ke),ct=Qi(me.shapeInfo.logicalShape,Ce.logicalShape),bt=Ke-Ze,gt=["x","y","z","w","u","v"];et=Ze===0?"":Ke<2&&ct.length>=1?"coords = 0;":ct.map(function(At){return"coords."+gt[At+bt]+" = 0;"}).join(`
`);var vt="";return vt=Ke<2&&Ze>0?"coords":me.shapeInfo.logicalShape.map(function(At,ft){return"coords."+gt[ft+bt]}).join(", "),`
float `+Ue+`() {
`+tt+` coords = getOutputCoords();
`+et+`
return get`+Le+"("+vt+`);
}
`}(re,oe)),se}(z,t,r)}).join(`
`),d=t.texShape,A=qn(),I=function(z){return`
float sampleTexture(sampler2D textureSampler, vec2 uv) {
return `+z.texture2D+`(textureSampler, uv).r;
}
`}(A),O=function(z){return z.version+`
precision highp float;
precision highp int;
precision highp sampler2D;
`+z.varyingFs+` vec2 resultUV;
`+z.defineOutput+`
const vec2 halfCR = vec2(0.5, 0.5);
struct ivec5
{
int x;
int y;
int z;
int w;
int u;
};
struct ivec6
{
int x;
int y;
int z;
int w;
int u;
int v;
};
uniform float NAN;
`+z.defineSpecialNaN+`
`+z.defineSpecialInf+`
`+z.defineRound+`
int imod(int x, int y) {
return x - y * (x / y);
}
int idiv(int a, int b, float sign) {
int res = a / b;
int mod = imod(a, b);
if (sign < 0. && mod != 0) {
res -= 1;
}
return res;
}
//Based on the work of Dave Hoskins
//https://www.shadertoy.com/view/4djSRW
#define HASHSCALE1 443.8975
float random(float seed){
vec2 p = resultUV * seed;
vec3 p3 = fract(vec3(p.xyx) * HASHSCALE1);
p3 += dot(p3, p3.yzx + 19.19);
return fract((p3.x + p3.y) * p3.z);
}
`+Ap+`
`+xp+`
`+Ep+`
`}(A);return t.isPacked?(a=function(z,re){switch(z.length){case 0:return`
int getOutputCoords() {
return 0;
}
`;case 1:return function(me,Ce){var Oe=[Math.ceil(Ce[0]/2),Math.ceil(Ce[1]/2)];return Oe[0]===1?`
int getOutputCoords() {
return 2 * int(resultUV.x * `+Oe[1]+`.0);
}
`:Oe[1]===1?`
int getOutputCoords() {
return 2 * int(resultUV.y * `+Oe[0]+`.0);
}
`:`
int getOutputCoords() {
ivec2 resTexRC = ivec2(resultUV.yx *
vec2(`+Oe[0]+", "+Oe[1]+`));
return 2 * (resTexRC.x * `+Oe[1]+` + resTexRC.y);
}
`}(0,re);case 2:return function(me,Ce){var Oe=[Math.ceil(Ce[0]/2),Math.ceil(Ce[1]/2)];if(fe(me,Ce))return`
ivec2 getOutputCoords() {
return 2 * ivec2(resultUV.yx * vec2(`+Oe[0]+", "+Oe[1]+`));
}
`;var Le=Math.ceil(me[1]/2);return`
ivec2 getOutputCoords() {
ivec2 resTexRC = ivec2(resultUV.yx *
vec2(`+Oe[0]+", "+Oe[1]+`));
int index = resTexRC.x * `+Oe[1]+` + resTexRC.y;
int r = 2 * (index / `+Le+`);
int c = imod(index, `+Le+`) * 2;
return ivec2(r, c);
}
`}(z,re);case 3:return oe=z,ae=re,se=[Math.ceil(ae[0]/2),Math.ceil(ae[1]/2)],be=Math.ceil(oe[2]/2),Ae=be*Math.ceil(oe[1]/2),`
ivec3 getOutputCoords() {
ivec2 resTexRC = ivec2(resultUV.yx *
vec2(`+se[0]+", "+se[1]+`));
int index = resTexRC.x * `+se[1]+` + resTexRC.y;
int b = index / `+Ae+`;
index -= b * `+Ae+`;
int r = 2 * (index / `+be+`);
int c = imod(index, `+be+`) * 2;
return ivec3(b, r, c);
}
`;default:return function(me,Ce){for(var Oe=[Math.ceil(Ce[0]/2),Math.ceil(Ce[1]/2)],Le=Math.ceil(me[me.length-1]/2),Ue=Le*Math.ceil(me[me.length-2]/2),Ne=Ue,Fe="",Ze="b, r, c",Ke=2;Ke<me.length-1;Ke++)Ne*=me[me.length-Ke-1],Fe=`
int b`+Ke+" = index / "+Ne+`;
index -= b`+Ke+" * "+Ne+`;
`+Fe,Ze="b"+Ke+", "+Ze;return`
ivec`+me.length+` getOutputCoords() {
ivec2 resTexRC = ivec2(resultUV.yx *
vec2(`+Oe[0]+", "+Oe[1]+`));
int index = resTexRC.x * `+Oe[1]+` + resTexRC.y;
`+Fe+`
int b = index / `+Ue+`;
index -= b * `+Ue+`;
int r = 2 * (index / `+Le+`);
int c = imod(index, `+Le+`) * 2;
return ivec`+me.length+"("+Ze+`);
}
`}(z,re)}var oe,ae,se,be,Ae}(t.logicalShape,d),s=function(z){return`
void setOutput(vec4 val) {
`+z.output+` = val;
}
`}(A)):(a=function(z,re){switch(z.length){case 0:return`
int getOutputCoords() {
return 0;
}
`;case 1:return function(se,be){return be[0]===1?`
int getOutputCoords() {
return int(resultUV.x * `+be[1]+`.0);
}
`:be[1]===1?`
int getOutputCoords() {
return int(resultUV.y * `+be[0]+`.0);
}
`:`
int getOutputCoords() {
ivec2 resTexRC = ivec2(resultUV.yx *
vec2(`+be[0]+", "+be[1]+`));
return resTexRC.x * `+be[1]+` + resTexRC.y;
}
`}(0,re);case 2:return function(se,be){return fe(se,be)?`
ivec2 getOutputCoords() {
return ivec2(resultUV.yx * vec2(`+be[0]+", "+be[1]+`));
}
`:se[1]===1?`
ivec2 getOutputCoords() {
ivec2 resTexRC = ivec2(resultUV.yx *
vec2(`+be[0]+", "+be[1]+`));
int index = resTexRC.x * `+be[1]+` + resTexRC.y;
return ivec2(index, 0);
}
`:se[0]===1?`
ivec2 getOutputCoords() {
ivec2 resTexRC = ivec2(resultUV.yx *
vec2(`+be[0]+", "+be[1]+`));
int index = resTexRC.x * `+be[1]+` + resTexRC.y;
return ivec2(0, index);
}
`:`
ivec2 getOutputCoords() {
ivec2 resTexRC = ivec2(resultUV.yx *
vec2(`+be[0]+", "+be[1]+`));
int index = resTexRC.x * `+be[1]+` + resTexRC.y;
int r = index / `+se[1]+`;
int c = index - r * `+se[1]+`;
return ivec2(r, c);
}
`}(z,re);case 3:return oe=re,ae=Ca(["r","c","d"],z),`
ivec3 getOutputCoords() {
ivec2 resTexRC = ivec2(resultUV.yx *
vec2(`+oe[0]+", "+oe[1]+`));
int index = resTexRC.x * `+oe[1]+` + resTexRC.y;
`+ae+`
return ivec3(r, c, d);
}
`;case 4:return function(se,be){var Ae=Ca(["r","c","d","d2"],se);return`
ivec4 getOutputCoords() {
ivec2 resTexRC = ivec2(resultUV.yx *
vec2(`+be[0]+", "+be[1]+`));
int index = resTexRC.x * `+be[1]+` + resTexRC.y;
`+Ae+`
return ivec4(r, c, d, d2);
}
`}(z,re);case 5:return function(se,be){var Ae=Ca(["r","c","d","d2","d3"],se);return`
ivec5 getOutputCoords() {
ivec2 resTexRC = ivec2(resultUV.yx * vec2(`+be[0]+`,
`+be[1]+`));
int index = resTexRC.x * `+be[1]+` + resTexRC.y;
`+Ae+`
ivec5 outShape = ivec5(r, c, d, d2, d3);
return outShape;
}
`}(z,re);case 6:return function(se,be){var Ae=Ca(["r","c","d","d2","d3","d4"],se);return`
ivec6 getOutputCoords() {
ivec2 resTexRC = ivec2(resultUV.yx *
vec2(`+be[0]+", "+be[1]+`));
int index = resTexRC.x * `+be[1]+` + resTexRC.y;
`+Ae+`
ivec6 result = ivec6(r, c, d, d2, d3, d4);
return result;
}
`}(z,re);default:throw new Error(z.length+"-D output sampling is not yet supported")}var oe,ae}(t.logicalShape,d),s=function(z){return`
void setOutput(float val) {
`+z.output+` = vec4(val, 0, 0, 0);
}
`}(A)),r&&(O+=Cp),[O,I,s,u,a,l,e].join(`
`)}function Ua(n){var t=n.shapeInfo.logicalShape;switch(t.length){case 0:return function(e){var r=e.name,i="get"+r.charAt(0).toUpperCase()+r.slice(1);if(e.shapeInfo.isUniform)return"float "+i+"() {return "+r+";}";var a=e.shapeInfo.texShape,s=a[0],u=a[1];if(s===1&&u===1)return`
float `+i+`() {
return sampleTexture(`+r+`, halfCR);
}
`;var l=e.shapeInfo.texShape,d=l[0],A=l[1],I=Sa(r);return`
float `+i+`() {
vec2 uv = uvFromFlat(`+d+", "+A+", "+I+`);
return sampleTexture(`+r+`, uv);
}
`}(n);case 1:return function(e){var r=e.name,i="get"+r.charAt(0).toUpperCase()+r.slice(1);if(e.shapeInfo.isUniform)return`
float `+i+`(int index) {
`+Wa(e)+`
}
`;var a=e.shapeInfo.texShape,s=a[0],u=a[1];if(u===1&&s===1)return`
float `+i+`(int index) {
return sampleTexture(`+r+`, halfCR);
}
`;var l=Sa(r);return u===1?`
float `+i+`(int index) {
vec2 uv = vec2(0.5, (float(index + `+l+") + 0.5) / "+s+`.0);
return sampleTexture(`+r+`, uv);
}
`:s===1?`
float `+i+`(int index) {
vec2 uv = vec2((float(index + `+l+") + 0.5) / "+u+`.0, 0.5);
return sampleTexture(`+r+`, uv);
}
`:`
float `+i+`(int index) {
vec2 uv = uvFromFlat(`+s+", "+u+", index + "+l+`);
return sampleTexture(`+r+`, uv);
}
`}(n);case 2:return function(e){var r=e.shapeInfo.logicalShape,i=e.name,a="get"+i.charAt(0).toUpperCase()+i.slice(1),s=e.shapeInfo.texShape;if(s!=null&&fe(r,s)){var u=s[0],l=s[1];return`
float `+a+`(int row, int col) {
vec2 uv = (vec2(col, row) + halfCR) / vec2(`+l+".0, "+u+`.0);
return sampleTexture(`+i+`, uv);
}
`}var d=V(r),A=d.newShape,I=d.keptDims,O=A;if(O.length<r.length){var z=za(e,O);return`
`+Ua(z)+`
float `+a+`(int row, int col) {
return `+a+"("+Va(["row","col"],I)+`);
}
`}if(e.shapeInfo.isUniform)return`
float `+a+`(int row, int col) {
int index = round(dot(vec2(row, col), vec2(`+r[1]+`, 1)));
`+Wa(e)+`
}
`;var re=s[0],oe=s[1],ae=Sa(i);return oe===1?`
float `+a+`(int row, int col) {
float index = dot(vec3(row, col, `+ae+"), vec3("+r[1]+`, 1, 1));
vec2 uv = vec2(0.5, (index + 0.5) / `+re+`.0);
return sampleTexture(`+i+`, uv);
}
`:re===1?`
float `+a+`(int row, int col) {
float index = dot(vec3(row, col, `+ae+"), vec3("+r[1]+`, 1, 1));
vec2 uv = vec2((index + 0.5) / `+oe+`.0, 0.5);
return sampleTexture(`+i+`, uv);
}
`:`
float `+a+`(int row, int col) {
// Explicitly use integer operations as dot() only works on floats.
int index = row * `+r[1]+" + col + "+ae+`;
vec2 uv = uvFromFlat(`+re+", "+oe+`, index);
return sampleTexture(`+i+`, uv);
}
`}(n);case 3:return function(e){var r=e.shapeInfo.logicalShape,i=e.name,a="get"+i.charAt(0).toUpperCase()+i.slice(1),s=r[1]*r[2],u=r[2],l=V(r),d=l.newShape,A=l.keptDims,I=d;if(I.length<r.length){var O=za(e,I);return`
`+Ua(O)+`
float `+a+`(int row, int col, int depth) {
return `+a+"("+Va(["row","col","depth"],A)+`);
}
`}if(e.shapeInfo.isUniform)return`
float `+a+`(int row, int col, int depth) {
int index = round(dot(vec3(row, col, depth),
vec3(`+s+", "+u+`, 1)));
`+Wa(e)+`
}
`;var z=e.shapeInfo.texShape,re=z[0],oe=z[1],ae=e.shapeInfo.flatOffset;if(oe===s&&ae==null)return`
float `+a+`(int row, int col, int depth) {
float texR = float(row);
float texC = dot(vec2(col, depth), vec2(`+u+`, 1));
vec2 uv = (vec2(texC, texR) + halfCR) /
vec2(`+oe+".0, "+re+`.0);
return sampleTexture(`+i+`, uv);
}
`;if(oe===u&&ae==null)return`
float `+a+`(int row, int col, int depth) {
float texR = dot(vec2(row, col), vec2(`+r[1]+`, 1));
float texC = float(depth);
vec2 uv = (vec2(texC, texR) + halfCR) / vec2(`+oe+".0, "+re+`.0);
return sampleTexture(`+i+`, uv);
}
`;var se=Sa(i);return`
float `+a+`(int row, int col, int depth) {
// Explicitly use integer operations as dot() only works on floats.
int index = row * `+s+" + col * "+u+" + depth + "+se+`;
vec2 uv = uvFromFlat(`+re+", "+oe+`, index);
return sampleTexture(`+i+`, uv);
}
`}(n);case 4:return function(e){var r=e.shapeInfo.logicalShape,i=e.name,a="get"+i.charAt(0).toUpperCase()+i.slice(1),s=r[3],u=r[2]*s,l=r[1]*u,d=V(r),A=d.newShape,I=d.keptDims;if(A.length<r.length){var O=za(e,A);return`
`+Ua(O)+`
float `+a+`(int row, int col, int depth, int depth2) {
return `+a+"("+Va(["row","col","depth","depth2"],I)+`);
}
`}if(e.shapeInfo.isUniform)return`
float `+a+`(int row, int col, int depth, int depth2) {
int index = round(dot(vec4(row, col, depth, depth2),
vec4(`+l+", "+u+", "+s+`, 1)));
`+Wa(e)+`
}
`;var z=e.shapeInfo.flatOffset,re=e.shapeInfo.texShape,oe=re[0],ae=re[1];if(ae===l&&z==null)return`
float `+a+`(int row, int col, int depth, int depth2) {
float texR = float(row);
float texC =
dot(vec3(col, depth, depth2),
vec3(`+u+", "+s+`, 1));
vec2 uv = (vec2(texC, texR) + halfCR) /
vec2(`+ae+".0, "+oe+`.0);
return sampleTexture(`+i+`, uv);
}
`;if(ae===s&&z==null)return`
float `+a+`(int row, int col, int depth, int depth2) {
float texR = dot(vec3(row, col, depth),
vec3(`+r[1]*r[2]+", "+r[2]+`, 1));
float texC = float(depth2);
vec2 uv = (vec2(texC, texR) + halfCR) /
vec2(`+ae+".0, "+oe+`.0);
return sampleTexture(`+i+`, uv);
}
`;var se=Sa(i);return`
float `+a+`(int row, int col, int depth, int depth2) {
// Explicitly use integer operations as dot() only works on floats.
int index = row * `+l+" + col * "+u+` +
depth * `+s+` + depth2;
vec2 uv = uvFromFlat(`+oe+", "+ae+", index + "+se+`);
return sampleTexture(`+i+`, uv);
}
`}(n);case 5:return function(e){var r=e.shapeInfo.logicalShape,i=e.name,a="get"+i.charAt(0).toUpperCase()+i.slice(1),s=r[4],u=r[3]*s,l=r[2]*u,d=r[1]*l,A=V(r),I=A.newShape,O=A.keptDims;if(I.length<r.length){var z=za(e,I);return`
`+Ua(z)+`
float `+a+`(int row, int col, int depth, int depth2, int depth3) {
return `+a+"("+Va(["row","col","depth","depth2","depth3"],O)+`);
}
`}if(e.shapeInfo.isUniform)return`
float `+a+`(int row, int col, int depth, int depth2, int depth3) {
float index = dot(
vec4(row, col, depth, depth2),
vec4(`+d+", "+l+", "+u+", "+s+`)) +
depth3;
`+Wa(e)+`
}
`;var re=e.shapeInfo.flatOffset,oe=e.shapeInfo.texShape,ae=oe[0],se=oe[1];if(se===d&&re==null)return`
float `+a+`(int row, int col, int depth, int depth2, int depth3) {
int texR = row;
float texC = dot(vec4(col, depth, depth2, depth3),
vec4(`+l+", "+u+", "+s+`, 1));
vec2 uv = (vec2(texC, texR) + halfCR) /
vec2(`+se+".0, "+ae+`.0);
return sampleTexture(`+i+`, uv);
}
`;if(se===s&&re==null)return`
float `+a+`(int row, int col, int depth, int depth2, int depth3) {
float texR = dot(
vec4(row, col, depth, depth2),
vec4(`+r[1]*r[2]*r[3]+`,
`+r[2]*r[3]+", "+r[3]+`, 1));
int texC = depth3;
vec2 uv = (vec2(texC, texR) + halfCR) /
vec2(`+se+".0, "+ae+`.0);
return sampleTexture(`+i+`, uv);
}
`;var be=Sa(i);return`
float `+a+`(int row, int col, int depth, int depth2, int depth3) {
// Explicitly use integer operations as dot() only works on floats.
int index = row * `+d+" + col * "+l+" + depth * "+u+` +
depth2 * `+s+" + depth3 + "+be+`;
vec2 uv = uvFromFlat(`+ae+", "+se+`, index);
return sampleTexture(`+i+`, uv);
}
`}(n);case 6:return function(e){var r=e.shapeInfo.logicalShape,i=e.name,a="get"+i.charAt(0).toUpperCase()+i.slice(1),s=V(r),u=s.newShape,l=s.keptDims;if(u.length<r.length){var d=za(e,u);return`
`+Ua(d)+`
float `+a+`(int row, int col, int depth,
int depth2, int depth3, int depth4) {
return `+a+"("+Va(["row","col","depth","depth2","depth3","depth4"],l)+`);
}
`}var A=r[5],I=r[4]*A,O=r[3]*I,z=r[2]*O,re=r[1]*z;if(e.shapeInfo.isUniform)return`
float `+a+`(int row, int col, int depth,
int depth2, int depth3, int depth4) {
int index = round(dot(
vec4(row, col, depth, depth2),
vec4(`+re+", "+z+", "+O+", "+I+`)) +
dot(
vec2(depth3, depth4),
vec2(`+A+`, 1)));
`+Wa(e)+`
}
`;var oe=e.shapeInfo.flatOffset,ae=e.shapeInfo.texShape,se=ae[0],be=ae[1];if(be===re&&oe==null)return`
float `+a+`(int row, int col, int depth,
int depth2, int depth3, int depth4) {
int texR = row;
float texC = dot(vec4(col, depth, depth2, depth3),
vec4(`+z+", "+O+", "+I+", "+A+`)) +
float(depth4);
vec2 uv = (vec2(texC, texR) + halfCR) /
vec2(`+be+".0, "+se+`.0);
return sampleTexture(`+i+`, uv);
}
`;if(be===A&&oe==null)return`
float `+a+`(int row, int col, int depth,
int depth2, int depth3, int depth4) {
float texR = dot(vec4(row, col, depth, depth2),
vec4(`+r[1]*r[2]*r[3]*r[4]+`,
`+r[2]*r[3]*r[4]+`,
`+r[3]*r[4]+`,
`+r[4]+`)) + float(depth3);
int texC = depth4;
vec2 uv = (vec2(texC, texR) + halfCR) /
vec2(`+be+".0, "+se+`.0);
return sampleTexture(`+i+`, uv);
}
`;var Ae=Sa(i);return`
float `+a+`(int row, int col, int depth,
int depth2, int depth3, int depth4) {
// Explicitly use integer operations as dot() only works on floats.
int index = row * `+re+" + col * "+z+" + depth * "+O+` +
depth2 * `+I+" + depth3 * "+A+" + depth4 + "+Ae+`;
vec2 uv = uvFromFlat(`+se+", "+be+`, index);
return sampleTexture(`+i+`, uv);
}
`}(n);default:throw new Error(t.length+"-D input sampling is not yet supported")}}function Pl(n){var t,e,r;switch(n.shapeInfo.logicalShape.length){case 0:return t=n.name,e="get"+t.charAt(0).toUpperCase()+t.slice(1),r=qn(),`
vec4 `+e+`() {
return `+r.texture2D+"("+t+`, halfCR);
}
`;case 1:return function(i){var a=i.name,s="get"+a.charAt(0).toUpperCase()+a.slice(1),u=i.shapeInfo.texShape,l=[Math.ceil(u[0]/2),Math.ceil(u[1]/2)],d=qn();return`
vec4 `+s+`(int index) {
vec2 uv = packedUVfrom1D(
`+l[0]+", "+l[1]+`, index);
return `+d.texture2D+"("+a+`, uv);
}
`}(n);case 2:return function(i){var a=i.shapeInfo.logicalShape,s=i.name,u="get"+s.charAt(0).toUpperCase()+s.slice(1),l=i.shapeInfo.texShape,d=l[0],A=l[1],I=qn();if(l!=null&&fe(a,l))return`
vec4 `+u+`(int row, int col) {
vec2 uv = (vec2(col, row) + halfCR) / vec2(`+A+".0, "+d+`.0);
return `+I.texture2D+"("+s+`, uv);
}
`;var O=[Math.ceil(l[0]/2),Math.ceil(l[1]/2)],z=Math.ceil(a[1]/2);return`
vec4 `+u+`(int row, int col) {
vec2 uv = packedUVfrom2D(`+z+", "+O[0]+", "+O[1]+`, row, col);
return `+I.texture2D+"("+s+`, uv);
}
`}(n);case 3:return function(i){var a=i.shapeInfo.logicalShape,s=i.name,u="get"+s.charAt(0).toUpperCase()+s.slice(1),l=i.shapeInfo.texShape,d=[Math.ceil(l[0]/2),Math.ceil(l[1]/2)];if(a[0]===1){var A=a.slice(1),I=za(i,A);return`
`+Pl(I)+`
vec4 `+u+`(int b, int row, int col) {
return `+u+"("+Va(["b","row","col"],[1,2])+`);
}
`}var O=d[0],z=d[1],re=Math.ceil(a[2]/2),oe=re*Math.ceil(a[1]/2),ae=qn();return`
vec4 `+u+`(int b, int row, int col) {
vec2 uv = packedUVfrom3D(
`+O+", "+z+", "+oe+", "+re+`, b, row, col);
return `+ae.texture2D+"("+s+`, uv);
}
`}(n);default:return function(i){for(var a=i.shapeInfo.logicalShape,s=a.length,u=i.name,l="get"+u.charAt(0).toUpperCase()+u.slice(1),d=i.shapeInfo.texShape,A=[Math.ceil(d[0]/2),Math.ceil(d[1]/2)],I=A[0],O=A[1],z=Math.ceil(a[s-1]/2),re=z*Math.ceil(a[s-2]/2),oe="int b, int row, int col",ae="b * "+re+" + (row / 2) * "+z+" + (col / 2)",se=2;se<s-1;se++)oe="int b"+se+", "+oe,re*=a[s-se-1],ae="b"+se+" * "+re+" + "+ae;var be=qn();return`
vec4 `+l+"("+oe+`) {
int index = `+ae+`;
int texR = index / `+O+`;
int texC = index - texR * `+O+`;
vec2 uv = (vec2(texC, texR) + halfCR) / vec2(`+O+", "+I+`);
return `+be.texture2D+"("+u+`, uv);
}
`}(n)}}var Ap=`
vec2 uvFromFlat(int texNumR, int texNumC, int index) {
int texR = index / texNumC;
int texC = index - texR * texNumC;
return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);
}
vec2 packedUVfrom1D(int texNumR, int texNumC, int index) {
int texelIndex = index / 2;
int texR = texelIndex / texNumC;
int texC = texelIndex - texR * texNumC;
return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);
}
`,xp=`
vec2 packedUVfrom2D(int texelsInLogicalRow, int texNumR,
int texNumC, int row, int col) {
int texelIndex = (row / 2) * texelsInLogicalRow + (col / 2);
int texR = texelIndex / texNumC;
int texC = texelIndex - texR * texNumC;
return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);
}
`,Ep=`
vec2 packedUVfrom3D(int texNumR, int texNumC,
int texelsInBatch, int texelsInLogicalRow, int b,
int row, int col) {
int index = b * texelsInBatch + (row / 2) * texelsInLogicalRow + (col / 2);
int texR = index / texNumC;
int texC = index - texR * texNumC;
return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);
}
`,Cp=`
float getChannel(vec4 frag, vec2 innerDims) {
vec2 modCoord = mod(innerDims, 2.);
return modCoord.x == 0. ?
(modCoord.y == 0. ? frag.r : frag.g) :
(modCoord.y == 0. ? frag.b : frag.a);
}
float getChannel(vec4 frag, int dim) {
float modCoord = mod(float(dim), 2.);
return modCoord == 0. ? frag.r : frag.g;
}
`;function Sa(n){return"offset"+n}function Wa(n){var t=n.name,e=ce(n.shapeInfo.logicalShape);return e<2?"return "+t+";":`
for (int i = 0; i < `+e+`; i++) {
if (i == index) {
return `+t+`[i];
}
}
`}function cn(n){if(n<=1)return"int";if(n===2)return"ivec2";if(n===3)return"ivec3";if(n===4)return"ivec4";if(n===5)return"ivec5";if(n===6)return"ivec6";throw Error("GPU for rank "+n+" is not yet supported")}function za(n,t){var e=JSON.parse(JSON.stringify(n));return e.shapeInfo.logicalShape=t,e}function Va(n,t){return t.map(function(e){return n[e]}).join(", ")}var Sp=function(n,t,e,r){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,q(n.length>2,function(){return"Packed arg"+(e.charAt(0).toUpperCase()+e.slice(1))+" supports only inputs with rank above 2."});var i=n[n.length-1],a=Math.ceil(i/t);this.outputShape=n.slice(0,-1),a>1&&this.outputShape.push(a),r||this.variableNames.push("bestIndicesA");var s,u,l=this.outputShape,d=l.length,A=cn(d),I=ci("coords",d);if(a===1){var O=cn(u=d+1);s=`
`+O+" sourceLocR = "+O+"("+I.join()+`, 0);
++`+I[d-1]+`;
`+O+" sourceLocG = "+O+"("+I.join()+`, 0);
++`+I[d-2]+`;
`+O+" sourceLocA = "+O+"("+I.join()+`, 0);
--`+I[d-1]+`;
`+O+" sourceLocB = "+O+"("+I.join()+`, 0);
--`+I[d-2]+";"}else u=d,s=`
`+A+` sourceLocR = coords;
++`+I[d-1]+`;
`+A+` sourceLocG = coords;
++`+I[d-2]+`;
`+A+` sourceLocA = coords;
--`+I[d-1]+`;
`+A+` sourceLocB = coords;
--`+I[d-2]+";";var z=["x","y","z","w","u","v"].slice(0,u),re="."+z[u-1],oe=z.map(function(Ue){return"int "+Ue}),ae=ci("sourceLocR",u-1).concat("inIdx.r"),se=ci("sourceLocG",u-1).concat("inIdx.g"),be=ci("sourceLocB",u-1).concat("inIdx.b"),Ae=ci("sourceLocA",u-1).concat("inIdx.a"),me=e==="max"?"greaterThan":"lessThan",Ce=r?"":`
inIdx = round(vec4(getBestIndicesAChannel(`+ae.join()+`),
getBestIndicesAChannel(`+se.join()+`),
getBestIndicesAChannel(`+be.join()+`),
getBestIndicesAChannel(`+Ae.join()+")));",Oe=`vec4(
getAChannel(`+ae.join()+`),
hasNextCol ? getAChannel(`+se.join()+`) : 0.,
hasNextRow ? getAChannel(`+be.join()+`) : 0.,
hasNextRow && hasNextCol ? getAChannel(`+Ae.join()+") : 0.)",Le=r?"":`
float getBestIndicesAChannel(`+oe.join()+`) {
return getChannel(getBestIndicesA(`+z.join()+`),
vec2(`+z.slice(-2).join()+`));
}`;this.userCode=`
float getAChannel(`+oe.join()+`) {
return getChannel(getA(`+z.join()+`),
vec2(`+z.slice(-2).join()+`));
}
`+Le+`
void main() {
`+A+` coords = getOutputCoords();
bool hasNextCol = `+I[d-1]+" < "+(l[d-1]-1)+`;
bool hasNextRow = `+I[d-2]+" < "+(l[d-2]-1)+`;
`+s+`
ivec4 srcIdx = ivec4(sourceLocR`+re+", sourceLocG"+re+`,
sourceLocB`+re+", sourceLocA"+re+") * "+t+`;
ivec4 inIdx = srcIdx;
vec4 bestIndex = vec4(inIdx);
vec4 bestValue = `+Oe+`;
for (int i = 0; i < `+t+`; i++) {
inIdx = srcIdx;
`+Ce+`
vec4 candidate = `+Oe+`;
bvec4 nan = isnan(candidate);
bvec4 replace = bvec4(
vec4(`+me+`(candidate, bestValue)) * (vec4(1.0) - vec4(nan)));
bestValue = vec4(replace.x ? candidate.x : bestValue.x,
replace.y ? candidate.y : bestValue.y,
replace.z ? candidate.z : bestValue.z,
replace.w ? candidate.w : bestValue.w);
bestIndex = mix(bestIndex, vec4(inIdx), vec4(replace));
srcIdx++;
}
setOutput(bestIndex);
}
`},Ip=function(n){this.variableNames=["dy"],this.outputShape=n.inShape;var t=n.filterHeight,e=n.filterWidth,r=n.strideHeight,i=n.strideWidth,a=n.dilationHeight,s=n.dilationWidth,u=n.effectiveFilterHeight,l=n.effectiveFilterWidth,d=u-1-n.padInfo.top,A=l-1-n.padInfo.left,I=1/(t*e);this.userCode=`
const ivec2 pads = ivec2(`+d+", "+A+`);
const float avgMultiplier = float(`+I+`);
void main() {
ivec4 coords = getOutputCoords();
int b = coords[0];
int d = coords[3];
ivec2 dyRCCorner = coords.yz - pads;
int dyRCorner = dyRCCorner.x;
int dyCCorner = dyRCCorner.y;
// Convolve dy(?, ?, d) with pos mask(:, :, d) to get dx(xR, xC, d).
// ? = to be determined. : = across all values in that axis.
float dotProd = 0.0;
for (int wR = 0; wR < `+u+`;
wR += `+a+`) {
float dyR = float(dyRCorner + wR) / `+r+`.0;
if (dyR < 0.0 || dyR >= `+n.outHeight+`.0 || fract(dyR) > 0.0) {
continue;
}
int idyR = int(dyR);
for (int wC = 0; wC < `+l+`;
wC+= `+s+`) {
float dyC = float(dyCCorner + wC) / `+i+`.0;
if (dyC < 0.0 || dyC >= `+n.outWidth+`.0 ||
fract(dyC) > 0.0) {
continue;
}
int idyC = int(dyC);
float dyValue = getDy(b, idyR, idyC, d);
dotProd += dyValue * avgMultiplier;
}
}
setOutput(dotProd);
}
`},Tp=function(n){this.variableNames=["dy"],this.outputShape=n.inShape;var t=n.filterDepth,e=n.filterHeight,r=n.filterWidth,i=n.strideDepth,a=n.strideHeight,s=n.strideWidth,u=n.dilationDepth,l=n.dilationHeight,d=n.dilationWidth,A=n.effectiveFilterDepth,I=n.effectiveFilterHeight,O=n.effectiveFilterWidth,z=A-1-n.padInfo.front,re=I-1-n.padInfo.top,oe=O-1-n.padInfo.left,ae=1/(t*e*r);this.userCode=`
const ivec3 pads = ivec3(`+z+", "+re+", "+oe+`);
const float avgMultiplier = float(`+ae+`);
void main() {
ivec5 coords = getOutputCoords();
int batch = coords.x;
int ch = coords.u;
ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;
int dyDCorner = dyCorner.x;
int dyRCorner = dyCorner.y;
int dyCCorner = dyCorner.z;
// Convolve dy(?, ?, ?, d) with pos mask(:, :, :, ch) to get
// dx(xD, xR, xC, ch).
// ? = to be determined. : = across all values in that axis.
float dotProd = 0.0;
for (int wD = 0; wD < `+A+`;
wD += `+u+`) {
float dyD = float(dyDCorner + wD) / `+i+`.0;
if (dyD < 0.0 || dyD >= `+n.outDepth+`.0 || fract(dyD) > 0.0) {
continue;
}
int idyD = int(dyD);
for (int wR = 0; wR < `+I+`;
wR += `+l+`) {
float dyR = float(dyRCorner + wR) / `+a+`.0;
if (dyR < 0.0 || dyR >= `+n.outHeight+`.0 ||
fract(dyR) > 0.0) {
continue;
}
int idyR = int(dyR);
for (int wC = 0; wC < `+O+`;
wC += `+d+`) {
float dyC = float(dyCCorner + wC) / `+s+`.0;
if (dyC < 0.0 || dyC >= `+n.outWidth+`.0 ||
fract(dyC) > 0.0) {
continue;
}
int idyC = int(dyC);
float dyValue = getDy(batch, idyD, idyR, idyC, ch);
dotProd += dyValue * avgMultiplier;
}
}
}
setOutput(dotProd);
}
`},Rp=function(n,t,e,r,i,a){this.outputShape=[],this.variableNames=["x","mean","variance"],Ir(n,t),Ir(n,e);var s="0.0";r!=null&&(Ir(n,r),this.variableNames.push("offset"),s="getOffsetAtOutCoords()");var u="1.0";i!=null&&(Ir(n,i),this.variableNames.push("scale"),u="getScaleAtOutCoords()"),this.outputShape=n,this.userCode=`
void main() {
float x = getXAtOutCoords();
float mean = getMeanAtOutCoords();
float variance = getVarianceAtOutCoords();
float offset = `+s+`;
float scale = `+u+`;
float inv = scale * inversesqrt(variance + float(`+a+`));
setOutput(dot(vec3(x, -mean, offset), vec3(inv, inv, 1)));
}
`},Op=function(n,t,e,r,i,a){this.packedInputs=!0,this.packedOutput=!0,this.variableNames=["x","mean","variance"],Ir(n,t),Ir(n,e);var s="vec4(0.0)";r!=null&&(Ir(n,r),this.variableNames.push("offset"),s="getOffsetAtOutCoords()");var u="vec4(1.0)";i!=null&&(Ir(n,i),this.variableNames.push("scale"),u="getScaleAtOutCoords()"),this.outputShape=n,this.userCode=`
void main() {
vec4 offset = `+s+`;
vec4 scale = `+u+`;
vec4 x = getXAtOutCoords();
vec4 mean = getMeanAtOutCoords();
vec4 variance = getVarianceAtOutCoords();
vec4 inv = scale * inversesqrt(variance + vec4(`+a+`));
setOutput((x - mean) * inv + offset);
}
`},kp="return areal * breal - aimag * bimag;",jp="return areal * bimag + aimag * breal;",Bl=function(n,t,e){this.variableNames=["AReal","AImag","BReal","BImag"],this.outputShape=Ir(t,e),this.userCode=`
float binaryOpComplex(
float areal, float aimag, float breal, float bimag) {
`+n+`
}
void main() {
float areal = getARealAtOutCoords();
float aimag = getAImagAtOutCoords();
float breal = getBRealAtOutCoords();
float bimag = getBImagAtOutCoords();
setOutput(binaryOpComplex(areal, aimag, breal, bimag));
}
`},Ds="return a + b;",Ps="return a - b;",Nl="return a * b;",Ml="return (a < 0.) ? b * a : a;",In=function(n,t,e){this.variableNames=["A","B"],this.outputShape=Ir(t,e),this.userCode=`
float binaryOperation(float a, float b) {
`+n+`
}
void main() {
float a = getAAtOutCoords();
float b = getBAtOutCoords();
setOutput(binaryOperation(a, b));
}
`},_l=`
vec4 aLessThanZero = vec4(lessThan(a, vec4(0.)));
return (aLessThanZero * (b * a)) + ((vec4(1.0) - aLessThanZero) * a);
`,Xi=function(n,t,e,r){r===void 0&&(r=!1),this.variableNames=["A","B"],this.supportsBroadcasting=!0,this.packedInputs=!0,this.packedOutput=!0,this.outputShape=Ir(t,e);var i=this.outputShape.length,a="";if(r)if(i===0||ce(this.outputShape)===1)a=`
result.y = 0.;
result.z = 0.;
result.w = 0.;
`;else if(a=`
`+cn(i)+` coords = getOutputCoords();
`,i===1)a+=`
result.y = (coords + 1) >= `+this.outputShape[0]+` ? 0. : result.y;
result.z = 0.;
result.w = 0.;
`;else{var s=ci("coords",i);a+=`
bool nextRowOutOfBounds =
(`+s[i-2]+" + 1) >= "+this.outputShape[i-2]+`;
bool nextColOutOfBounds =
(`+s[i-1]+" + 1) >= "+this.outputShape[i-1]+`;
result.y = nextColOutOfBounds ? 0. : result.y;
result.z = nextRowOutOfBounds ? 0. : result.z;
result.w = nextColOutOfBounds || nextRowOutOfBounds ? 0. : result.w;
`}this.userCode=`
vec4 binaryOperation(vec4 a, vec4 b) {
`+n+`
}
void main() {
vec4 a = getAAtOutCoords();
vec4 b = getBAtOutCoords();
vec4 result = binaryOperation(a, b);
`+a+`
setOutput(result);
}
`},Dp=function(){function n(t){this.variableNames=["A"],this.outputShape=t,this.userCode=`
uniform float minVal;
uniform float maxVal;
void main() {
float value = getAAtOutCoords();
if (isnan(value)) {
setOutput(value);
return;
}
setOutput(clamp(value, minVal, maxVal));
}
`}return n.prototype.getCustomSetupFunc=function(t,e){var r=this;return function(i,a){r.minLoc==null&&(r.minLoc=i.getUniformLocationNoThrow(a,"minVal"),r.maxLoc=i.getUniformLocationNoThrow(a,"maxVal")),i.gl.uniform1f(r.minLoc,t),i.gl.uniform1f(r.maxLoc,e)}},n}(),Pp=function(){function n(t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=t,this.userCode=`
uniform float minVal;
uniform float maxVal;
void main() {
vec4 value = getAAtOutCoords();
if (any(isnan(value))) {
setOutput(value);
return;
}
setOutput(clamp(value, vec4(minVal), vec4(maxVal)));
}
`}return n.prototype.getCustomSetupFunc=function(t,e){var r=this;return function(i,a){r.minLoc==null&&(r.minLoc=i.getUniformLocationNoThrow(a,"minVal"),r.maxLoc=i.getUniformLocationNoThrow(a,"maxVal")),i.gl.uniform1f(r.minLoc,t),i.gl.uniform1f(r.maxLoc,e)}},n}(),Bp=function(n){this.variableNames=["real","imag"],this.outputShape=n,this.userCode=`
void main() {
float re = abs(getRealAtOutCoords());
float im = abs(getImagAtOutCoords());
float mx = max(re, im);
// sadly the length function in glsl is not underflow-safe
// (at least not on Intel GPUs). So the safe solution is
// to ensure underflow-safety in all cases.
setOutput(
mx == 0.0 ? 0.0 : mx * length(vec2(1, min(re, im)/mx))
);
}
`},Np=function(n){this.outputShape=[],this.outputShape=nn(n,1),this.variableNames=n.map(function(u,l){return"T"+l});var t=new Array(n.length-1);t[0]=n[0][1];for(var e=1;e<t.length;e++)t[e]=t[e-1]+n[e][1];var r=["if (yC < "+t[0]+") setOutput(getT0(yR, yC));"];for(e=1;e<t.length;e++){var i=t[e-1];r.push("else if (yC < "+t[e]+") setOutput(getT"+e+"(yR, yC-"+i+"));")}var a=t.length,s=t[t.length-1];r.push("else setOutput(getT"+a+"(yR, yC-"+s+"));"),this.userCode=`
void main() {
ivec2 coords = getOutputCoords();
int yR = coords.x;
int yC = coords.y;
`+r.join(`
`)+`
}
`},Mp=function(n,t){this.packedInputs=!0,this.packedOutput=!0,this.outputShape=[],this.outputShape=nn(n,t);var e=this.outputShape,r=e.length,i=cn(r),a=ci("coords",r),s=["x","y","z","w","u","v"].slice(0,r);this.variableNames=n.map(function(ae,se){return"T"+se});var u=new Array(n.length-1);u[0]=n[0][t];for(var l=1;l<u.length;l++)u[l]=u[l-1]+n[l][t];var d=s[t],A=s.slice(-2),I=s.join(),O="if ("+d+" < "+u[0]+`) {
return getChannel(
getT0(`+I+"), vec2("+A.join()+`));
}`;for(l=1;l<u.length;l++){var z=u[l-1];O+=`
if (`+d+" < "+u[l]+" && "+d+" >= "+u[l-1]+`) {
return getChannel(
getT`+l+"("+No(s,d,z)+`),
vec2(`+No(A,d,z)+`));
}`}var re=u.length,oe=u[u.length-1];O+=`
return getChannel(
getT`+re+"("+No(s,d,oe)+`),
vec2(`+No(A,d,oe)+"));",this.userCode=`
float getValue(`+s.map(function(ae){return"int "+ae})+`) {
`+O+`
}
void main() {
`+i+` coords = getOutputCoords();
vec4 result = vec4(getValue(`+a+`), 0., 0., 0.);
`+a[r-1]+" = "+a[r-1]+` + 1;
if (`+a[r-1]+" < "+e[r-1]+`) {
result.g = getValue(`+a+`);
}
`+a[r-2]+" = "+a[r-2]+` + 1;
if (`+a[r-2]+" < "+e[r-2]+`) {
result.a = getValue(`+a+`);
}
`+a[r-1]+" = "+a[r-1]+` - 1;
if (`+a[r-2]+" < "+e[r-2]+` &&
`+a[r-1]+" < "+e[r-1]+`) {
result.b = getValue(`+a+`);
}
setOutput(result);
}
`};function No(n,t,e){var r=n.indexOf(t);return n.map(function(i,a){return a===r?i+" - "+e:i}).join()}var _p=function(n){this.variableNames=["x","dy"],this.outputShape=n.filterShape;var t=n.strideHeight,e=n.strideWidth,r=n.padInfo.top,i=n.padInfo.left,a=n.dataFormat==="channelsLast";this.userCode=`
void main() {
ivec4 coords = getOutputCoords();
int wR = coords.x;
int wC = coords.y;
int d1 = coords.z;
int d2 = coords.w;
// Convolve x(?, ?, d1) with dy(:, :, d2) to get dw(wR, wC, d1, d2).
// ? = to be determined. : = across all values in that axis.
float dotProd = 0.0;
for (int b = 0; b < `+n.batchSize+`; b++) {
for (int yR = 0; yR < `+n.outHeight+`; yR++) {
int xR = wR + yR * `+t+" - "+r+`;
if (xR < 0 || xR >= `+n.inHeight+`) {
continue;
}
for (int yC = 0; yC < `+n.outWidth+`; yC++) {
int xC = wC + yC * `+e+" - "+i+`;
if (xC < 0 || xC >= `+n.inWidth+`) {
continue;
}
if (`+a+`) {
float dyValue = getDy(b, yR, yC, d2);
float xValue = getX(b, xR, xC, d1);
dotProd += (xValue * dyValue);
} else {
float dyValue = getDy(b, d2, yR, yC);
float xValue = getX(b, d1, xR, xC);
dotProd += (xValue * dyValue);
}
}
}
}
setOutput(dotProd);
}
`},Fp=function(n){this.variableNames=["dy","W"],this.outputShape=n.inShape;var t=n.filterHeight,e=n.filterWidth,r=n.strideHeight,i=n.strideWidth,a=n.dataFormat==="channelsLast",s=t-1-n.padInfo.top,u=e-1-n.padInfo.left,l=a?1:2,d=a?2:3,A=a?3:1;this.userCode=`
const ivec2 pads = ivec2(`+s+", "+u+`);
void main() {
ivec4 coords = getOutputCoords();
int batch = coords[0];
int d1 = coords[`+A+`];
ivec2 dyCorner = ivec2(coords[`+l+"], coords["+d+`]) - pads;
int dyRCorner = dyCorner.x;
int dyCCorner = dyCorner.y;
// Convolve dy(?, ?, d2) with w(:, :, d1, d2) to compute dx(xR, xC, d1).
// ? = to be determined. : = across all values in that axis.
float dotProd = 0.0;
for (int wR = 0; wR < `+t+`; wR++) {
float dyR = float(dyRCorner + wR) / `+r+`.0;
if (dyR < 0.0 || dyR >= `+n.outHeight+`.0 || fract(dyR) > 0.0) {
continue;
}
int idyR = int(dyR);
int wRPerm = `+t+` - 1 - wR;
for (int wC = 0; wC < `+e+`; wC++) {
float dyC = float(dyCCorner + wC) / `+i+`.0;
if (dyC < 0.0 || dyC >= `+n.outWidth+`.0 ||
fract(dyC) > 0.0) {
continue;
}
int idyC = int(dyC);
int wCPerm = `+e+` - 1 - wC;
for (int d2 = 0; d2 < `+n.outChannels+`; d2++) {
if (`+a+`) {
float xValue = getDy(batch, idyR, idyC, d2);
float wValue = getW(wRPerm, wCPerm, d1, d2);
dotProd += xValue * wValue;
} else {
float xValue = getDy(batch, d2, idyR, idyC);
float wValue = getW(wRPerm, wCPerm, d1, d2);
dotProd += xValue * wValue;
}
}
}
}
setOutput(dotProd);
}
`},Lp=function(n){this.variableNames=["x","dy"],this.outputShape=n.filterShape;var t=n.strideDepth,e=n.strideHeight,r=n.strideWidth,i=n.padInfo.front,a=n.padInfo.top,s=n.padInfo.left;this.userCode=`
void main() {
ivec5 coords = getOutputCoords();
int wF = coords.x;
int wR = coords.y;
int wC = coords.z;
int d1 = coords.w;
int d2 = coords.u;
float dotProd = 0.0;
for (int b = 0; b < `+n.batchSize+`; b++) {
for (int yF = 0; yF < `+n.outDepth+`; yF++) {
int xF = wF + yF * `+t+" - "+i+`;
if (xF < 0 || xF >= `+n.inDepth+`) {
continue;
}
for (int yR = 0; yR < `+n.outHeight+`; yR++) {
int xR = wR + yR * `+e+" - "+a+`;
if (xR < 0 || xR >= `+n.inHeight+`) {
continue;
}
for (int yC = 0; yC < `+n.outWidth+`; yC++) {
int xC = wC + yC * `+r+" - "+s+`;
if (xC < 0 || xC >= `+n.inWidth+`) {
continue;
}
float dyValue = getDy(b, yF, yR, yC, d2);
float xValue = getX(b, xF, xR, xC, d1);
dotProd += (xValue * dyValue);
}
}
}
}
setOutput(dotProd);
}
`},Up=function(n){this.variableNames=["dy","W"],this.outputShape=n.inShape;var t=n.filterDepth,e=n.filterHeight,r=n.filterWidth,i=n.strideDepth,a=n.strideHeight,s=n.strideWidth,u=t-1-n.padInfo.front,l=e-1-n.padInfo.top,d=r-1-n.padInfo.left;this.userCode=`
const ivec3 pads = ivec3(`+u+", "+l+", "+d+`);
void main() {
ivec5 coords = getOutputCoords();
int batch = coords.x;
int d1 = coords.u;
ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;
int dyFCorner = dyCorner.x;
int dyRCorner = dyCorner.y;
int dyCCorner = dyCorner.z;
float dotProd = 0.0;
for (int wF = 0; wF < `+t+`; wF++) {
float dyF = float(dyFCorner + wF) / `+i+`.0;
if (dyF < 0.0 || dyF >= `+n.outDepth+`.0 || fract(dyF) > 0.0) {
continue;
}
int idyF = int(dyF);
int wFPerm = `+t+` - 1 - wF;
for (int wR = 0; wR < `+e+`; wR++) {
float dyR = float(dyRCorner + wR) / `+a+`.0;
if (dyR < 0.0 || dyR >= `+n.outHeight+`.0 ||
fract(dyR) > 0.0) {
continue;
}
int idyR = int(dyR);
int wRPerm = `+e+` - 1 - wR;
for (int wC = 0; wC < `+r+`; wC++) {
float dyC = float(dyCCorner + wC) / `+s+`.0;
if (dyC < 0.0 || dyC >= `+n.outWidth+`.0 ||
fract(dyC) > 0.0) {
continue;
}
int idyC = int(dyC);
int wCPerm = `+r+` - 1 - wC;
for (int d2 = 0; d2 < `+n.outChannels+`; d2++) {
float xValue = getDy(batch, idyF, idyR, idyC, d2);
float wValue = getW(wFPerm, wRPerm, wCPerm, d1, d2);
dotProd += xValue * wValue;
}
}
}
}
setOutput(dotProd);
}
`},Wp=function(n){this.variableNames=["x","dy"],this.outputShape=n.filterShape;var t=n.strideHeight,e=n.strideWidth,r=n.padInfo.top,i=n.padInfo.left,a=n.outChannels/n.inChannels;this.userCode=`
void main() {
ivec4 coords = getOutputCoords();
int wR = coords.x;
int wC = coords.y;
int d1 = coords.z;
int dm = coords.w;
int d2 = d1 * `+a+` + dm;
float dotProd = 0.0;
// TO DO: Vec4 over the batch size
for (int b = 0; b < `+n.batchSize+`; b++) {
for (int yR = 0; yR < `+n.outHeight+`; yR++) {
int xR = wR + yR * `+t+" - "+r+`;
if (xR < 0 || xR >= `+n.inHeight+`) {
continue;
}
for (int yC = 0; yC < `+n.outWidth+`; yC++) {
int xC = wC + yC * `+e+" - "+i+`;
if (xC < 0 || xC >= `+n.inWidth+`) {
continue;
}
float dyValue = getDy(b, yR, yC, d2);
float xValue = getX(b, xR, xC, d1);
dotProd += (xValue * dyValue);
}
}
}
setOutput(dotProd);
}
`},zp=function(n){this.variableNames=["dy","W"],this.outputShape=n.inShape;var t=n.filterHeight,e=n.filterWidth,r=n.strideHeight,i=n.strideWidth,a=t-1-n.padInfo.top,s=e-1-n.padInfo.left,u=n.outChannels/n.inChannels;this.userCode=`
const ivec2 pads = ivec2(`+a+", "+s+`);
void main() {
ivec4 coords = getOutputCoords();
int batch = coords[0];
int d1 = coords[3];
ivec2 dyCorner = coords.yz - pads;
int dyRCorner = dyCorner.x;
int dyCCorner = dyCorner.y;
float dotProd = 0.0;
for (int wR = 0; wR < `+t+`; wR++) {
float dyR = float(dyRCorner + wR) / `+r+`.0;
if (dyR < 0.0 || dyR >= `+n.outHeight+`.0 || fract(dyR) > 0.0) {
continue;
}
int idyR = int(dyR);
int wRPerm = `+t+` - 1 - wR;
for (int wC = 0; wC < `+e+`; wC++) {
float dyC = float(dyCCorner + wC) / `+i+`.0;
if (dyC < 0.0 || dyC >= `+n.outWidth+`.0 ||
fract(dyC) > 0.0) {
continue;
}
int idyC = int(dyC);
int wCPerm = `+e+` - 1 - wC;
// TO DO: Vec4 over the channelMul
for (int dm = 0; dm < `+u+`; dm++) {
int d2 = d1 * `+u+` + dm;
float xValue = getDy(batch, idyR, idyC, d2);
float wValue = getW(wRPerm, wCPerm, d1, dm);
dotProd += xValue * wValue;
}
}
}
setOutput(dotProd);
}
`},Fl=function(n,t,e,r){t===void 0&&(t=!1),e===void 0&&(e=null),r===void 0&&(r=!1),this.variableNames=["x","W"],this.outputShape=n.outShape;var i=n.padInfo.top,a=n.padInfo.left,s=n.strideHeight,u=n.strideWidth,l=n.dilationHeight,d=n.dilationWidth,A=n.filterHeight,I=n.filterWidth,O=4*Math.floor(n.inChannels/4),z=n.inChannels%4,re=n.dataFormat==="channelsLast",oe=re?1:2,ae=re?2:3,se=re?3:1,be="",Ae="";e&&(be=r?`float activation(float a) {
float b = getPreluActivationWeightsAtOutCoords();
`+e+`
}`:`
float activation(float x) {
`+e+`
}
`,Ae="result = activation(result);");var me=t?"result += getBiasAtOutCoords();":"";t&&this.variableNames.push("bias"),r&&this.variableNames.push("preluActivationWeights"),this.userCode=`
`+be+`
const ivec2 strides = ivec2(`+s+", "+u+`);
const ivec2 pads = ivec2(`+i+", "+a+`);
void main() {
ivec4 coords = getOutputCoords();
int batch = coords[0];
int d2 = coords[`+se+`];
ivec2 xRCCorner =
ivec2(coords[`+oe+"], coords["+ae+`]) * strides - pads;
int xRCorner = xRCCorner.x;
int xCCorner = xRCCorner.y;
// Convolve x(?, ?, d1) with w(:, :, d1, d2) to get y(yR, yC, d2).
// ? = to be determined. : = across all values in that axis.
float dotProd = 0.0;
for (int wR = 0; wR < `+A+`; wR++) {
int xR = xRCorner + wR * `+l+`;
if (xR < 0 || xR >= `+n.inHeight+`) {
continue;
}
for (int wC = 0; wC < `+I+`; wC++) {
int xC = xCCorner + wC * `+d+`;
if (xC < 0 || xC >= `+n.inWidth+`) {
continue;
}
for (int d1 = 0; d1 < `+O+`; d1 += 4) {
vec4 wValues = vec4(
getW(wR, wC, d1, d2),
getW(wR, wC, d1 + 1, d2),
getW(wR, wC, d1 + 2, d2),
getW(wR, wC, d1 + 3, d2)
);
if (`+re+`) {
vec4 xValues = vec4(
getX(batch, xR, xC, d1),
getX(batch, xR, xC, d1 + 1),
getX(batch, xR, xC, d1 + 2),
getX(batch, xR, xC, d1 + 3)
);
dotProd += dot(xValues, wValues);
} else {
vec4 xValues = vec4(
getX(batch, d1, xR, xC),
getX(batch, d1 + 1, xR, xC),
getX(batch, d1 + 2, xR, xC),
getX(batch, d1 + 3, xR, xC)
);
dotProd += dot(xValues, wValues);
}
}
if (`+(z===1)+`) {
if (`+re+`) {
dotProd +=
getX(batch, xR, xC, `+O+`) *
getW(wR, wC, `+O+`, d2);
} else {
dotProd +=
getX(batch, `+O+`, xR, xC) *
getW(wR, wC, `+O+`, d2);
}
} else if (`+(z===2)+`) {
vec2 wValues = vec2(
getW(wR, wC, `+O+`, d2),
getW(wR, wC, `+O+` + 1, d2)
);
if (`+re+`) {
vec2 xValues = vec2(
getX(batch, xR, xC, `+O+`),
getX(batch, xR, xC, `+O+` + 1)
);
dotProd += dot(xValues, wValues);
} else {
vec2 xValues = vec2(
getX(batch, `+O+`, xR, xC),
getX(batch, `+O+` + 1, xR, xC)
);
dotProd += dot(xValues, wValues);
}
} else if (`+(z===3)+`) {
vec3 wValues = vec3(
getW(wR, wC, `+O+`, d2),
getW(wR, wC, `+O+` + 1, d2),
getW(wR, wC, `+O+` + 2, d2)
);
if (`+re+`) {
vec3 xValues = vec3(
getX(batch, xR, xC, `+O+`),
getX(batch, xR, xC, `+O+` + 1),
getX(batch, xR, xC, `+O+` + 2)
);
dotProd += dot(xValues, wValues);
} else {
vec3 xValues = vec3(
getX(batch, `+O+`, xR, xC),
getX(batch, `+O+` + 1, xR, xC),
getX(batch, `+O+` + 2, xR, xC)
);
dotProd += dot(xValues, wValues);
}
}
}
}
float result = dotProd;
`+me+`
`+Ae+`
setOutput(result);
}
`},Vp=function(n){this.variableNames=["x","W"],this.outputShape=n.outShape;var t=n.padInfo.front,e=n.padInfo.top,r=n.padInfo.left,i=n.strideDepth,a=n.strideHeight,s=n.strideWidth,u=n.dilationDepth,l=n.dilationHeight,d=n.dilationWidth,A=n.filterDepth,I=n.filterHeight,O=n.filterWidth,z=4*Math.floor(n.inChannels/4),re=n.inChannels%4;this.userCode=`
const ivec3 strides = ivec3(`+i+", "+a+", "+s+`);
const ivec3 pads = ivec3(`+t+", "+e+", "+r+`);
void main() {
ivec5 coords = getOutputCoords();
int batch = coords.x;
int d2 = coords.u;
ivec3 xFRCCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;
int xFCorner = xFRCCorner.x;
int xRCorner = xFRCCorner.y;
int xCCorner = xFRCCorner.z;
// Convolve x(?, ?, ?, d1) with w(:, :, :, d1, d2) to get
// y(yF, yR, yC, d2). ? = to be determined. : = across all
// values in that axis.
float dotProd = 0.0;
for (int wF = 0; wF < `+A+`; wF++) {
int xF = xFCorner + wF * `+u+`;
if (xF < 0 || xF >= `+n.inDepth+`) {
continue;
}
for (int wR = 0; wR < `+I+`; wR++) {
int xR = xRCorner + wR * `+l+`;
if (xR < 0 || xR >= `+n.inHeight+`) {
continue;
}
for (int wC = 0; wC < `+O+`; wC++) {
int xC = xCCorner + wC * `+d+`;
if (xC < 0 || xC >= `+n.inWidth+`) {
continue;
}
for (int d1 = 0; d1 < `+z+`; d1 += 4) {
vec4 xValues = vec4(
getX(batch, xF, xR, xC, d1),
getX(batch, xF, xR, xC, d1 + 1),
getX(batch, xF, xR, xC, d1 + 2),
getX(batch, xF, xR, xC, d1 + 3)
);
vec4 wValues = vec4(
getW(wF, wR, wC, d1, d2),
getW(wF, wR, wC, d1 + 1, d2),
getW(wF, wR, wC, d1 + 2, d2),
getW(wF, wR, wC, d1 + 3, d2)
);
dotProd += dot(xValues, wValues);
}
if (`+(re===1)+`) {
dotProd +=
getX(batch, xF, xR, xC, `+z+`) *
getW(wF, wR, wC, `+z+`, d2);
} else if (`+(re===2)+`) {
vec2 xValues = vec2(
getX(batch, xF, xR, xC, `+z+`),
getX(batch, xF, xR, xC, `+z+` + 1)
);
vec2 wValues = vec2(
getW(wF, wR, wC, `+z+`, d2),
getW(wF, wR, wC, `+z+` + 1, d2)
);
dotProd += dot(xValues, wValues);
} else if (`+(re===3)+`) {
vec3 xValues = vec3(
getX(batch, xF, xR, xC, `+z+`),
getX(batch, xF, xR, xC, `+z+` + 1),
getX(batch, xF, xR, xC, `+z+` + 2)
);
vec3 wValues = vec3(
getW(wF, wR, wC, `+z+`, d2),
getW(wF, wR, wC, `+z+` + 1, d2),
getW(wF, wR, wC, `+z+` + 2, d2)
);
dotProd += dot(xValues, wValues);
}
}
}
}
setOutput(dotProd);
}
`},Ll=function(n,t,e,r){t===void 0&&(t=!1),e===void 0&&(e=null),r===void 0&&(r=!1),this.variableNames=["x","W"],this.outputShape=n.outShape;var i=n.inHeight,a=n.inWidth,s=n.padInfo.top,u=n.padInfo.left,l=n.strideHeight,d=n.strideWidth,A=n.dilationHeight,I=n.dilationWidth,O=n.filterHeight,z=n.filterWidth,re=n.outChannels/n.inChannels,oe="",ae="";e&&(oe=r?`float activation(float a) {
float b = getPreluActivationWeightsAtOutCoords();
`+e+`
}`:`
float activation(float x) {
`+e+`
}
`,ae="result = activation(result);");var se=t?"result += getBiasAtOutCoords();":"";t&&this.variableNames.push("bias"),r&&this.variableNames.push("preluActivationWeights"),this.userCode=`
`+oe+`
const ivec2 strides = ivec2(`+l+", "+d+`);
const ivec2 pads = ivec2(`+s+", "+u+`);
void main() {
ivec4 coords = getOutputCoords();
int batch = coords.x;
ivec2 xRCCorner = coords.yz * strides - pads;
int d2 = coords.w;
int d1 = d2 / `+re+`;
int q = d2 - d1 * `+re+`;
int xRCorner = xRCCorner.x;
int xCCorner = xRCCorner.y;
// Convolve x(?, ?, d1) with w(:, :, d1, q) to get y(yR, yC, d2).
// ? = to be determined. : = across all values in that axis.
float dotProd = 0.0;
// TO DO(dsmilkov): Flatten the two for loops and vec4 the operations.
for (int wR = 0; wR < `+O+`; wR++) {
int xR = xRCorner + wR * `+A+`;
if (xR < 0 || xR >= `+i+`) {
continue;
}
for (int wC = 0; wC < `+z+`; wC++) {
int xC = xCCorner + wC * `+I+`;
if (xC < 0 || xC >= `+a+`) {
continue;
}
float xVal = getX(batch, xR, xC, d1);
float wVal = getW(wR, wC, d1, q);
dotProd += xVal * wVal;
}
}
float result = dotProd;
`+se+`
`+ae+`
setOutput(result);
}
`},Ul=function(n,t,e,r){t===void 0&&(t=!1),e===void 0&&(e=null),r===void 0&&(r=!1),this.variableNames=["x","W"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=n.outShape;for(var i=n.inHeight,a=n.inWidth,s=n.padInfo.top,u=n.padInfo.left,l=n.strideHeight,d=n.strideWidth,A=n.dilationHeight,I=n.dilationWidth,O=n.filterHeight,z=n.filterWidth,re=z,oe="int xR; int xC; int xCOffset;",ae=0;ae<O;ae++)for(var se=0;se<z;se++)oe+=`
vec4 xTexelR`+ae+"C"+2*se+` = vec4(0.);
vec4 wR`+ae+"C"+se+` = vec4(0.);
vec4 xR`+ae+"C"+se+" = vec4(0.);";for(ae=0;ae<O;ae++)for(var be=0;be<re;be++){if(oe+=`
xR = xRCorner + `+ae*A+`;
xC = xCCorner + `+(se=2*be)*I+`;
`,d===1){if(se<z&&(oe+=u%2==1?`
xCOffset = xC + 1;
if(xR >= 0 && xR < `+i+" && xCOffset >= 0 && xCOffset < "+a+`) {
xTexelR`+ae+"C"+se+` = getX(batch, xR, xCOffset, d1);
// Need to manually clear unused channels in case
// we're reading from recycled texture.
if(xCOffset + 1 >= `+a+`) {
xTexelR`+ae+"C"+se+`.zw = vec2(0.);
}
} else {
xTexelR`+ae+"C"+se+` = vec4(0.);
}
xCOffset = xC + 1 - 2;
if(xR >= 0 && xR < `+i+" && xCOffset >= 0 && xCOffset < "+a+`) {
vec4 previous = getX(batch, xR, xCOffset, d1);
// Need to manually clear unused channels in case
// we're reading from recycled texture.
if(xCOffset + 1 >= `+a+`) {
previous.zw = vec2(0.);
}
xR`+ae+"C"+se+" = vec4(previous.zw, xTexelR"+ae+"C"+se+`.xy);
} else {
xR`+ae+"C"+se+" = vec4(0, 0, xTexelR"+ae+"C"+se+`.xy);
}
`:`
if(xR >= 0 && xR < `+i+" && xC >= 0 && xC < "+a+`) {
xTexelR`+ae+"C"+se+` = getX(batch, xR, xC, d1);
} else {
xTexelR`+ae+"C"+se+` = vec4(0.);
}
xR`+ae+"C"+se+" = xTexelR"+ae+"C"+se+`;
`,se+1<z)){var Ae=u%2==0?ne(I):I;I%2==0&&u%2==1||I%2!=0&&u%2!=1?(oe+=`
xCOffset = xC + `+u%2+" + "+Ae+`;
if(xR >= 0 && xR < `+i+` &&
xCOffset >= 0 && xCOffset < `+a+`) {
xTexelR`+ae+"C"+(se+2)+` = getX(batch, xR, xCOffset, d1);
}
`,I>1&&(oe+=`
xCOffset -= 2;
if(xR >= 0 && xR < `+i+` &&
xCOffset >= 0 && xCOffset < `+a+`) {
xTexelR`+ae+"C"+se+` = getX(batch, xR, xCOffset, d1);
} else {
xTexelR`+ae+"C"+se+` = vec4(0.);
}
`),oe+=`
xR`+ae+"C"+(se+1)+` = vec4(
xTexelR`+ae+"C"+se+".zw, xTexelR"+ae+"C"+(se+2)+`.xy);
`):oe+=`
xCOffset = xC + `+Ae+`;
if(xR >= 0 && xR < `+i+` &&
xCOffset >= 0 && xCOffset < `+a+`) {
xTexelR`+ae+"C"+(se+2)+` = getX(batch, xR, xCOffset, d1);
}
xR`+ae+"C"+(se+1)+" = xTexelR"+ae+"C"+(se+2)+`;
`}}else se<z&&(oe+=`
if(xR >= 0 && xR < `+i+`) {
`,u%2==1?(oe+=`
xCOffset = xC + 1 - `+d+`;
if(xCOffset >= 0 && xCOffset < `+a+`) {
xTexelR`+ae+"C"+se+` = getX(batch, xR, xCOffset, d1);
} else {
xTexelR`+ae+"C"+se+` = vec4(0.);
}
if(xC + 1 >= 0 && xC + 1 < `+a+`) {
xTexelR`+ae+"C"+(se+2)+` = getX(batch, xR, xC + 1, d1);
} else {
xTexelR`+ae+"C"+(se+2)+` = vec4(0.);
}
xR`+ae+"C"+se+` = vec4(
xTexelR`+ae+"C"+se+".zw, xTexelR"+ae+"C"+(se+2)+`.zw);
`,se+1<z&&(oe+=`
vec4 final = vec4(0.);
xCOffset = xC + 1 + `+d+`;
if(xCOffset >= 0 && xCOffset < `+a+`) {
final = getX(batch, xR, xCOffset, d1);
}
xR`+ae+"C"+(se+1)+" = vec4(xTexelR"+ae+"C"+(se+2)+`.xy, final.xy);
`)):(oe+=`
if(xC >= 0 && xC < `+a+`) {
xTexelR`+ae+"C"+se+` = getX(batch, xR, xC, d1);
} else {
xTexelR`+ae+"C"+se+` = vec4(0.);
}
xCOffset = xC + `+d+`;
if(xCOffset >= 0 && xCOffset < `+a+`) {
xTexelR`+ae+"C"+(se+2)+` = getX(batch, xR, xCOffset, d1);
} else {
xTexelR`+ae+"C"+(se+2)+` = vec4(0.);
}
xR`+ae+"C"+se+` = vec4(
xTexelR`+ae+"C"+se+".xy, xTexelR"+ae+"C"+(se+2)+`.xy);
`,se+1<z&&(oe+=`
xR`+ae+"C"+(se+1)+` = vec4(
xTexelR`+ae+"C"+se+".zw, xTexelR"+ae+"C"+(se+2)+`.zw);
`)),oe+="}");se<z&&(oe+=`
vec4 wTexelR`+ae+"C"+se+" = getW("+ae+", "+se+`, d1, q);
wR`+ae+"C"+se+" = vec4(wTexelR"+ae+"C"+se+".xz, wTexelR"+ae+"C"+se+`.xz);
`,se+1<z&&(oe+=`
vec4 wTexelR`+ae+"C"+(se+1)+" = getW("+ae+", "+(se+1)+`, d1, q);
wR`+ae+"C"+(se+1)+` =
vec4(wTexelR`+ae+"C"+(se+1)+".xz, wTexelR"+ae+"C"+(se+1)+".xz);"))}for(ae=0;ae<O;ae++)for(se=0;se<z;se++)oe+="dotProd += xR"+ae+"C"+se+" * wR"+ae+"C"+se+";";var me="",Ce="";e&&(me=r?`vec4 activation(vec4 a) {
vec4 b = getPreluActivationWeightsAtOutCoords();
`+e+`
}`:`vec4 activation(vec4 x) {
`+e+`
}`,Ce="result = activation(result);");var Oe=t?"result += getBiasAtOutCoords();":"";t&&this.variableNames.push("bias"),r&&this.variableNames.push("preluActivationWeights"),this.userCode=`
`+me+`
const ivec2 strides = ivec2(`+l+", "+d+`);
const ivec2 pads = ivec2(`+s+", "+u+`);
void main() {
ivec4 coords = getOutputCoords();
int batch = coords.x;
ivec2 xRCCorner = coords.yz * strides - pads;
int d2 = coords.w;
int d1 = d2;
int q = 0;
int xRCorner = xRCCorner.x;
int xCCorner = xRCCorner.y;
vec4 dotProd = vec4(0.);
`+oe+`
vec4 result = dotProd;
`+Oe+`
`+Ce+`
setOutput(result);
}
`},Hp=function(n,t,e,r,i){this.variableNames=["Image","Boxes","BoxInd"],this.outputShape=[];var a=n[0],s=n[1],u=n[2],l=n[3],d=t[0],A=e[0],I=e[1];this.outputShape=[d,A,I,l];var O=r==="bilinear"?1:0,z=[s-1+".0",u-1+".0"],re=z[0],oe=z[1],ae=A>1?[""+(s-1)/(A-1),"(y2-y1) * height_ratio","y1*"+re+" + float(y)*(height_scale)"]:["0.0","0.0","0.5 * (y1+y2) * "+re],se=ae[0],be=ae[1],Ae=ae[2],me=I>1?[""+(u-1)/(I-1),"(x2-x1) * width_ratio","x1*"+oe+" + float(x)*(width_scale)"]:["0.0","0.0","0.5 * (x1+x2) * "+oe],Ce=me[0],Oe=me[1],Le=me[2];this.userCode=`
const float height_ratio = float(`+se+`);
const float width_ratio = float(`+Ce+`);
void main() {
ivec4 coords = getOutputCoords();
int b = coords[0];
int y = coords[1];
int x = coords[2];
int d = coords[3];
// get box vals
float y1 = getBoxes(b,0);
float x1 = getBoxes(b,1);
float y2 = getBoxes(b,2);
float x2 = getBoxes(b,3);
// get image in batch index
int bInd = round(getBoxInd(b));
if(bInd < 0 || bInd >= `+a+`) {
return;
}
float height_scale = `+be+`;
float width_scale = `+Oe+`;
float in_y = `+Ae+`;
if( in_y < 0.0 || in_y > `+re+` ) {
setOutput(float(`+i+`));
return;
}
float in_x = `+Le+`;
if( in_x < 0.0 || in_x > `+oe+` ) {
setOutput(float(`+i+`));
return;
}
vec2 sourceFracIndexCR = vec2(in_x,in_y);
if(`+O+` == 1) {
// Compute the four integer indices.
ivec2 sourceFloorCR = ivec2(sourceFracIndexCR);
ivec2 sourceCeilCR = ivec2(ceil(sourceFracIndexCR));
float topLeft = getImage(b, sourceFloorCR.y, sourceFloorCR.x, d);
float bottomLeft = getImage(b, sourceCeilCR.y, sourceFloorCR.x, d);
float topRight = getImage(b, sourceFloorCR.y, sourceCeilCR.x, d);
float bottomRight = getImage(b, sourceCeilCR.y, sourceCeilCR.x, d);
vec2 fracCR = sourceFracIndexCR - vec2(sourceFloorCR);
float top = topLeft + (topRight - topLeft) * fracCR.x;
float bottom = bottomLeft + (bottomRight - bottomLeft) * fracCR.x;
float newValue = top + (bottom - top) * fracCR.y;
setOutput(newValue);
} else {
// Compute the coordinators of nearest neighbor point.
ivec2 sourceNearestCR = ivec2(floor(
sourceFracIndexCR + vec2(0.5,0.5)));
float newValue = getImage(b, sourceNearestCR.y, sourceNearestCR.x, d);
setOutput(newValue);
}
}
`},Gp=function(n,t,e){this.variableNames=["x"],this.outputShape=n;var r=n.length,i=n[n.length-1],a=e?"<":">";this.userCode=`
int getIndex(int i) {
`+(e?"return "+i+" -i - 1;":"return i;")+`
}
void main() {
`+cn(r)+` coords = getOutputCoords();
int end = `+Wl(r,"coords")+`;
float val = 0.0;
for (int i = `+i+` - 1; i >= 0; i -= 1) {
int idx = getIndex(i);
if (idx `+a+` end) {
continue;
}
if (idx == end && `+t+`) {
continue;
}
`+Wl(r,"coords")+` = idx;
val += getX(`+function(s,u){if(s===1)return""+u;if(s===2)return u+".x, "+u+".y";if(s===3)return u+".x, "+u+".y, "+u+".z";if(s===4)return u+".x, "+u+".y, "+u+".z, "+u+".w";throw Error("Cumulative sum for rank "+s+" is not yet supported")}(r,"coords")+`);
}
setOutput(val);
}
`};function Wl(n,t){if(n===1)return""+t;if(n===2)return t+".y";if(n===3)return t+".z";if(n===4)return t+".w";throw Error("Cumulative sum for rank "+n+" is not yet supported")}var Qp=function(n){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0,this.outPackingScheme=yr.DENSE;var t=it(n),e=qn();this.outputShape=n,this.userCode=`
ivec3 outCoordsFromFlatIndex(int index) {
`+Ca(["r","c","d"],n)+`
return ivec3(r, c, d);
}
void main() {
ivec2 resTexRC = ivec2(resultUV.yx *
vec2(`+t[0]+", "+t[1]+`));
int index = 4 * (resTexRC.x * `+t[1]+` + resTexRC.y);
vec4 result = vec4(0.);
for (int i=0; i<4; i++) {
int flatIndex = index + i;
ivec3 rc = outCoordsFromFlatIndex(flatIndex);
result[i] = getA(rc.x, rc.y, rc.z);
}
`+e.output+` = result;
}
`},Xp=function(n){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outPackingScheme=yr.DENSE;var t=it(n),e=qn();this.outputShape=n,this.userCode=`
ivec3 outCoordsFromFlatIndex(int index) {
`+Ca(["r","c","d"],n)+`
return ivec3(r, c, d);
}
void main() {
ivec2 resTexRC = ivec2(resultUV.yx *
vec2(`+t[0]+", "+t[1]+`));
int index = 4 * (resTexRC.x * `+t[1]+` + resTexRC.y);
vec4 result = vec4(0.);
for (int i=0; i<4; i++) {
int flatIndex = index + i;
ivec3 rc = outCoordsFromFlatIndex(flatIndex);
result[i] = getChannel(getA(rc.x, rc.y, rc.z), vec2(rc.y, rc.z));
}
`+e.output+` = result;
}
`},Kp=function(){function n(t,e,r){this.variableNames=["x"],this.outputShape=[],this.outputShape=t,this.blockSize=e,this.dataFormat=r,this.userCode=`
void main() {
ivec4 coords = getOutputCoords();
int b = coords[0];
int h = `+this.getHeightCoordString()+`;
int w = `+this.getWidthCoordString()+`;
int d = `+this.getDepthCoordString()+`;
int in_h = h / `+e+`;
int offset_h = imod(h, `+e+`);
int in_w = w / `+e+`;
int offset_w = imod(w, `+e+`);
int offset_d = (offset_h * `+e+` + offset_w) *
`+this.getOutputDepthSize()+`;
int in_d = d + offset_d;
float result = `+this.getInputSamplingString()+`;
setOutput(result);
}
`}return n.prototype.getHeightCoordString=function(){return this.dataFormat==="NHWC"?"coords[1]":"coords[2]"},n.prototype.getWidthCoordString=function(){return this.dataFormat==="NHWC"?"coords[2]":"coords[3]"},n.prototype.getDepthCoordString=function(){return this.dataFormat==="NHWC"?"coords[3]":"coords[1]"},n.prototype.getOutputDepthSize=function(){return this.dataFormat==="NHWC"?this.outputShape[3]:this.outputShape[1]},n.prototype.getInputSamplingString=function(){return this.dataFormat==="NHWC"?"getX(b, in_h, in_w, in_d)":"getX(b, in_d, in_h, in_w)"},n}(),Zp=function(n){this.variableNames=["X"],this.outputShape=[n,n],this.userCode=`
void main() {
ivec2 coords = getOutputCoords();
float val = coords[0] == coords[1] ? getX(coords[0]) : 0.0;
setOutput(val);
}
`},Jp=function(n){this.variableNames=["A"],this.outTexUsage=Ge.DOWNLOAD;var t=qn();this.outputShape=n,this.userCode=`
`+Dl+`
void main() {
float x = getAAtOutCoords();
`+t.output+` = encode_float(x);
}
`},Yp=function(n){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!1,this.outTexUsage=Ge.DOWNLOAD;var t=qn();this.outputShape=n,this.userCode=`
`+Dl+`
void main() {
ivec3 coords = getOutputCoords();
float x = getChannel(getAAtOutCoords(), vec2(coords.y, coords.z));
`+t.output+` = encode_float(x);
}
`},$p=function(n,t,e){e===void 0&&(e=!1),this.variableNames=["A"];var r=qn(),i=t[0],a=t[1];this.outputShape=n;var s="result";e&&(s="floor(result * 255. + 0.5)"),this.userCode=`
`+js(n)+`
void main() {
ivec3 coords = getOutputCoords();
int flatIndex = getFlatIndex(coords);
int offset = imod(flatIndex, 4);
flatIndex = idiv(flatIndex, 4, 1.);
int r = flatIndex / `+a+`;
int c = imod(flatIndex, `+a+`);
vec2 uv = (vec2(c, r) + halfCR) / vec2(`+a+".0, "+i+`.0);
vec4 values = `+r.texture2D+`(A, uv);
float result;
if(offset == 0) {
result = values[0];
} else if(offset == 1) {
result = values[1];
} else if(offset == 2) {
result = values[2];
} else {
result = values[3];
}
`+r.output+" = vec4("+s+`, 0., 0., 0.);
}
`},qp=function(n,t,e){e===void 0&&(e=!1),this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0;var r=qn(),i=t[0],a=t[1];this.outputShape=n;var s="",u="result";e&&(u="floor(result * 255. + 0.5)");for(var l=0;l<=1;l++)for(var d=0;d<=1;d++){var A=2*l+d;s+=`
localCoords = coords;
if(localCoords[2] + `+d+" < "+n[2]+`) {
localCoords[2] += `+d+`;
if(localCoords[1] + `+l+" < "+n[1]+`) {
localCoords[1] += `+l+`;
flatIndex = getFlatIndex(localCoords);
offset = imod(flatIndex, 4);
flatIndex = idiv(flatIndex, 4, 1.);
r = flatIndex / `+a+`;
c = imod(flatIndex, `+a+`);
uv = (vec2(c, r) + halfCR) / vec2(`+a+".0, "+i+`.0);
values = `+r.texture2D+`(A, uv);
if(offset == 0) {
result[`+A+`] = values[0];
} else if(offset == 1) {
result[`+A+`] = values[1];
} else if(offset == 2) {
result[`+A+`] = values[2];
} else {
result[`+A+`] = values[3];
}
}
}
`}this.userCode=`
`+js(n)+`
void main() {
ivec3 coords = getOutputCoords();
vec4 result = vec4(0.);
int flatIndex, r, c, offset;
ivec3 localCoords;
vec2 uv;
vec4 values;
`+s+`
`+r.output+" = "+u+`;
}
`},eh="return real * expR - imag * expI;",th="return real * expI + imag * expR;",zl=function(n,t,e){this.variableNames=["real","imag"];var r=t[1];this.outputShape=t;var i=e?"2.0 * "+Math.PI:"-2.0 * "+Math.PI,a=e?r+".0":"1.0";this.userCode=`
const float exponentMultiplier = `+i+`;
float unaryOpComplex(float real, float expR, float imag, float expI) {
`+n+`
}
float mulMatDFT(int batch, int index) {
float indexRatio = float(index) / float(`+r+`);
float exponentMultiplierTimesIndexRatio =
exponentMultiplier * indexRatio;
float result = 0.0;
for (int i = 0; i < `+r+`; i++) {
// x = (-2|2 * PI / N) * index * i;
float x = exponentMultiplierTimesIndexRatio * float(i);
float expR = cos(x);
float expI = sin(x);
float real = getReal(batch, i);
float imag = getImag(batch, i);
result +=
unaryOpComplex(real, expR, imag, expI) / `+a+`;
}
return result;
}
void main() {
ivec2 coords = getOutputCoords();
setOutput(mulMatDFT(coords[0], coords[1]));
}
`},rh=function(){function n(t,e){this.outputShape=[],this.variableNames=["x"],this.outputShape=t,this.userCode=`
uniform float value;
void main() {
// Input can be obtained from uniform value.
setOutput(value);
}
`}return n.prototype.getCustomSetupFunc=function(t){var e=this;return function(r,i){e.valueLoc==null&&(e.valueLoc=r.getUniformLocationNoThrow(i,"value")),r.gl.uniform1f(e.valueLoc,t)}},n}(),nh=function(n,t,e){this.variableNames=["A","indices"];var r=n.slice();r[e]=t,this.outputShape=r,this.rank=r.length;var i=cn(this.rank),a=function(s,u){var l=s.length;if(l>4)throw Error("Gather for rank "+l+" is not yet supported");if(l===1)return"int(getIndices(resRC))";for(var d=["resRC.x","resRC.y","resRC.z","resRC.w"],A=[],I=0;I<s.length;I++)I===u?A.push("int(getIndices("+d[I]+"))"):A.push(""+d[I]);return A.join()}(n,e);this.userCode=`
void main() {
`+i+` resRC = getOutputCoords();
setOutput(getA(`+a+`));
}
`},ih=function(n,t,e){this.sliceDim=n,this.strides=t,this.variableNames=["x","indices"],this.outputShape=e;var r=cn(t.length),i=cn(e.length),a=this.sliceDim>1?"strides[j]":"strides";this.userCode=`
`+r+" strides = "+r+"("+this.strides+`);
void main() {
`+i+` coords = getOutputCoords();
int flattenIndex = 0;
for (int j = 0; j < `+this.sliceDim+`; j++) {
int index = round(getIndices(coords[0], j));
flattenIndex += index * `+a+`;
}
setOutput(getX(flattenIndex, coords[1]));
}
`};function Vl(n,t){var e=qn();return jr(n,t,e.version+`
precision highp float;
`+e.attribute+` vec3 clipSpacePos;
`+e.attribute+` vec2 uv;
`+e.varyingVs+` vec2 resultUV;
void main() {
gl_Position = vec4(clipSpacePos, 1);
resultUV = uv;
}`)}function Hl(n,t){return mr(n,t,new Float32Array([-1,1,0,0,1,-1,-1,0,0,0,1,1,0,1,1,1,-1,0,1,0]))}function Gl(n,t){return Br(n,t,new Uint16Array([0,1,2,2,1,3]))}function so(n,t,e,r,i,a,s){sn(e,r);var u=dn(n,t),l=n.TEXTURE_2D;return lt(n,t,function(){return n.bindTexture(l,u)}),lt(n,t,function(){return n.texParameteri(l,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE)}),lt(n,t,function(){return n.texParameteri(l,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE)}),lt(n,t,function(){return n.texParameteri(l,n.TEXTURE_MIN_FILTER,n.NEAREST)}),lt(n,t,function(){return n.texParameteri(l,n.TEXTURE_MAG_FILTER,n.NEAREST)}),lt(n,t,function(){return n.texImage2D(l,0,i,e,r,0,a,s,null)}),lt(n,t,function(){return n.bindTexture(n.TEXTURE_2D,null)}),u}function Ql(n,t,e,r,i){var a=xt(e,r);return so(n,t,a[0],a[1],i.internalFormatFloat,i.textureFormatFloat,n.FLOAT)}function Xl(n,t,e,r,i){var a=xt(e,r);return so(n,t,a[0],a[1],i.internalFormatHalfFloat,i.textureFormatFloat,i.textureTypeHalfFloat)}function Kl(n,t,e,r,i){var a=xt(e,r);return so(n,t,a[0],a[1],n.RGBA,n.RGBA,n.UNSIGNED_BYTE)}function Zl(n,t,e,r,i){var a=Wt(e,r);return so(n,t,a[0],a[1],i.internalFormatPackedFloat,n.RGBA,n.FLOAT)}function Jl(n,t,e,r,i){var a=Wt(e,r);return so(n,t,a[0],a[1],i.internalFormatPackedHalfFloat,n.RGBA,i.textureTypeHalfFloat)}function Yl(n,t,e,r){return lt(n,t,function(){return n.bindBuffer(n.ARRAY_BUFFER,r)}),Qn(n,t,e,"clipSpacePos",r,3,20,0)&&Qn(n,t,e,"uv",r,2,20,12)}function $l(n,t,e,r,i,a,s){var u,l,d;lt(n,t,function(){return n.bindTexture(n.TEXTURE_2D,e)}),a instanceof Uint8Array?(u=new Uint8Array(r*i*4),l=n.UNSIGNED_BYTE,d=n.RGBA):(u=new Float32Array(r*i*4),l=n.FLOAT,d=s.internalFormatPackedFloat),u.set(a),lt(n,t,function(){return n.texImage2D(n.TEXTURE_2D,0,d,r,i,0,n.RGBA,l,u)}),lt(n,t,function(){return n.bindTexture(n.TEXTURE_2D,null)})}function ql(n,t,e,r){lt(n,t,function(){return n.bindTexture(n.TEXTURE_2D,e)}),r.data instanceof Uint8Array?lt(n,t,function(){return n.texImage2D(n.TEXTURE_2D,0,n.RGBA,r.width,r.height,0,n.RGBA,n.UNSIGNED_BYTE,r.data)}):lt(n,t,function(){return n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,r)}),lt(n,t,function(){return n.bindTexture(n.TEXTURE_2D,null)})}function ec(n,t,e,r,i){var a=n.createBuffer();lt(n,t,function(){return n.bindBuffer(n.PIXEL_PACK_BUFFER,a)});var s=16*e*r;return lt(n,t,function(){return n.bufferData(n.PIXEL_PACK_BUFFER,s,n.STREAM_READ)}),lt(n,t,function(){return n.readPixels(0,0,r,e,n.RGBA,n.FLOAT,0)}),lt(n,t,function(){return n.bindBuffer(n.PIXEL_PACK_BUFFER,null)}),a}function tc(n,t,e){var r=n,i=new Float32Array(e);return r.bindBuffer(r.PIXEL_PACK_BUFFER,t),r.getBufferSubData(r.PIXEL_PACK_BUFFER,0,i),r.bindBuffer(r.PIXEL_PACK_BUFFER,null),i}function rc(n,t,e,r,i){var a=xt(e,r),s=a[0],u=a[1],l=new Uint8Array(e*r*4);return lt(n,t,function(){return n.readPixels(0,0,s,u,i.downloadTextureFormat,n.UNSIGNED_BYTE,l)}),new Float32Array(l.buffer)}function nc(n,t,e,r,i,a,s,u){var l=n,d=new Float32Array(function(A,I){var O=Wt(A,I);return O[0]*O[1]*4}(a,s));return l.bindBuffer(l.PIXEL_PACK_BUFFER,t),l.getBufferSubData(l.PIXEL_PACK_BUFFER,0,d),l.bindBuffer(l.PIXEL_PACK_BUFFER,null),d}function ic(n,t,e,r){var i=new Float32Array(e*r*4);return lt(n,t,function(){return n.readPixels(0,0,r,e,n.RGBA,n.FLOAT,i)}),i}var ah=Object.freeze({createVertexShader:Vl,createVertexBuffer:Hl,createIndexBuffer:Gl,createFloat32MatrixTexture:Ql,createFloat16MatrixTexture:Xl,createUnsignedBytesMatrixTexture:Kl,createPackedMatrixTexture:Zl,createFloat16PackedMatrixTexture:Jl,bindVertexProgramAttributeStreams:Yl,uploadDenseMatrixToTexture:$l,uploadPixelDataToTexture:ql,createBufferFromOutputTexture:ec,downloadFloat32MatrixFromBuffer:tc,downloadByteEncodedFloatMatrixFromOutputTexture:rc,downloadPackedMatrixFromBuffer:nc,downloadMatrixFromPackedOutputTexture:ic}),ac=function(){function n(t){this.outputTexture=null,this.program=null,this.disposed=!1,this.vertexAttrsAreBound=!1,this.itemsToPoll=[];var e=P().getNumber("WEBGL_VERSION");t!=null?(this.gl=t,dt(e,t)):this.gl=ht(e);var r="WEBGL_color_buffer_float";if(P().getNumber("WEBGL_VERSION")===1){if(this.textureFloatExtension=Er(this.gl,this.debug,"OES_texture_float"),wr(this.gl,"OES_texture_half_float"))this.textureHalfFloatExtension=Er(this.gl,this.debug,"OES_texture_half_float");else if(P().get("WEBGL_FORCE_F16_TEXTURES"))throw new Error("GL context does not support half float textures, yet the environment flag WEBGL_FORCE_F16_TEXTURES is set to true.");if(this.colorBufferFloatExtension=this.gl.getExtension(r),wr(this.gl,"EXT_color_buffer_half_float"))this.colorBufferHalfFloatExtension=Er(this.gl,this.debug,"EXT_color_buffer_half_float");else if(P().get("WEBGL_FORCE_F16_TEXTURES"))throw new Error("GL context does not support color renderable half floats, yet the environment flag WEBGL_FORCE_F16_TEXTURES is set to true.")}else if(r="EXT_color_buffer_float",wr(this.gl,r))this.colorBufferFloatExtension=this.gl.getExtension(r);else{if(!wr(this.gl,"EXT_color_buffer_half_float"))throw new Error("GL context does not support color renderable floats");this.colorBufferHalfFloatExtension=this.gl.getExtension("EXT_color_buffer_half_float")}this.vertexBuffer=Hl(this.gl,this.debug),this.indexBuffer=Gl(this.gl,this.debug),this.framebuffer=vn(this.gl,this.debug),this.textureConfig=Pt(this.gl,this.textureHalfFloatExtension)}return Object.defineProperty(n.prototype,"debug",{get:function(){return P().getBool("DEBUG")},enumerable:!0,configurable:!0}),n.prototype.dispose=function(){var t=this;if(!this.disposed){this.program!=null&&console.warn("Disposing a GPGPUContext that still has a bound WebGLProgram. This is probably a resource leak, delete the program with GPGPUContext.deleteProgram before disposing."),this.outputTexture!=null&&console.warn("Disposing a GPGPUContext that still has a bound output matrix texture. This is probably a resource leak, delete the output matrix texture with GPGPUContext.deleteMatrixTexture before disposing.");var e=this.gl;lt(e,this.debug,function(){return e.finish()}),lt(e,this.debug,function(){return e.bindFramebuffer(e.FRAMEBUFFER,null)}),lt(e,this.debug,function(){return e.deleteFramebuffer(t.framebuffer)}),lt(e,this.debug,function(){return e.bindBuffer(e.ARRAY_BUFFER,null)}),lt(e,this.debug,function(){return e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null)}),lt(e,this.debug,function(){return e.deleteBuffer(t.indexBuffer)}),this.disposed=!0}},n.prototype.createFloat32MatrixTexture=function(t,e){return this.throwIfDisposed(),Ql(this.gl,this.debug,t,e,this.textureConfig)},n.prototype.createFloat16MatrixTexture=function(t,e){return this.throwIfDisposed(),Xl(this.gl,this.debug,t,e,this.textureConfig)},n.prototype.createUnsignedBytesMatrixTexture=function(t,e){return this.throwIfDisposed(),Kl(this.gl,this.debug,t,e,this.textureConfig)},n.prototype.uploadPixelDataToTexture=function(t,e){this.throwIfDisposed(),ql(this.gl,this.debug,t,e)},n.prototype.uploadDenseMatrixToTexture=function(t,e,r,i){this.throwIfDisposed(),$l(this.gl,this.debug,t,e,r,i,this.textureConfig)},n.prototype.createFloat16PackedMatrixTexture=function(t,e){return this.throwIfDisposed(),Jl(this.gl,this.debug,t,e,this.textureConfig)},n.prototype.createPackedMatrixTexture=function(t,e){return this.throwIfDisposed(),Zl(this.gl,this.debug,t,e,this.textureConfig)},n.prototype.deleteMatrixTexture=function(t){var e=this;this.throwIfDisposed(),this.outputTexture===t&&(Ln(this.gl,this.debug,this.framebuffer),this.outputTexture=null),lt(this.gl,this.debug,function(){return e.gl.deleteTexture(t)})},n.prototype.downloadByteEncodedFloatMatrixFromOutputTexture=function(t,e,r){var i=this;return this.downloadMatrixDriver(t,function(){return rc(i.gl,i.debug,e,r,i.textureConfig)})},n.prototype.downloadPackedMatrixFromBuffer=function(t,e,r,i,a,s){return nc(this.gl,t,0,0,0,a,s,this.textureConfig)},n.prototype.downloadFloat32MatrixFromBuffer=function(t,e){return tc(this.gl,t,e)},n.prototype.createBufferFromTexture=function(t,e,r){this.bindTextureToFrameBuffer(t);var i=ec(this.gl,this.debug,e,r,this.textureConfig);return this.unbindTextureToFrameBuffer(),i},n.prototype.createAndWaitForFence=function(){var t=this.createFence(this.gl);return this.pollFence(t)},n.prototype.createFence=function(t){var e,r,i=this;if(P().getBool("WEBGL_FENCE_API_ENABLED")){var a=t,s=a.fenceSync(a.SYNC_GPU_COMMANDS_COMPLETE,0);t.flush(),r=function(){var u=a.clientWaitSync(s,0,0);return u===a.ALREADY_SIGNALED||u===a.CONDITION_SATISFIED},e=s}else P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")>0?(e=this.beginQuery(),this.endQuery(),r=function(){return i.isQueryAvailable(e,P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))}):r=function(){return!0};return{query:e,isFencePassed:r}},n.prototype.downloadMatrixFromPackedTexture=function(t,e,r){var i=this;return this.downloadMatrixDriver(t,function(){return ic(i.gl,i.debug,e,r)})},n.prototype.createProgram=function(t){this.throwIfDisposed();var e=this.gl,r=Wr(e,this.debug,t),i=Vl(e,this.debug),a=Rt(e,this.debug);return lt(e,this.debug,function(){return e.attachShader(a,i)}),lt(e,this.debug,function(){return e.attachShader(a,r)}),fn(e,this.debug,a),this.debug&&nr(e,this.debug,a),this.vertexAttrsAreBound||(this.setProgram(a),this.vertexAttrsAreBound=Yl(e,this.debug,this.program,this.vertexBuffer)),a},n.prototype.deleteProgram=function(t){var e=this;this.throwIfDisposed(),t===this.program&&(this.program=null),t!=null&&lt(this.gl,this.debug,function(){return e.gl.deleteProgram(t)})},n.prototype.setProgram=function(t){var e=this;this.throwIfDisposed(),this.program=t,this.program!=null&&this.debug&&nr(this.gl,this.debug,this.program),lt(this.gl,this.debug,function(){return e.gl.useProgram(t)})},n.prototype.getUniformLocation=function(t,e,r){return r===void 0&&(r=!0),this.throwIfDisposed(),r?_n(this.gl,this.debug,t,e):gn(this.gl,t,e)},n.prototype.getAttributeLocation=function(t,e){var r=this;return this.throwIfDisposed(),lt(this.gl,this.debug,function(){return r.gl.getAttribLocation(t,e)})},n.prototype.getUniformLocationNoThrow=function(t,e){return this.throwIfDisposed(),this.gl.getUniformLocation(t,e)},n.prototype.setInputMatrixTexture=function(t,e,r){this.throwIfDisposed(),this.throwIfNoProgram(),un(this.gl,this.debug,this.program,t,e,r)},n.prototype.setOutputMatrixTexture=function(t,e,r){this.setOutputMatrixTextureDriver(t,r,e)},n.prototype.setOutputPackedMatrixTexture=function(t,e,r){this.throwIfDisposed();var i=Wt(e,r),a=i[0],s=i[1];this.setOutputMatrixTextureDriver(t,a,s)},n.prototype.setOutputMatrixWriteRegion=function(t,e,r,i){this.setOutputMatrixWriteRegionDriver(r,t,i,e)},n.prototype.setOutputPackedMatrixWriteRegion=function(t,e,r,i){throw new Error("setOutputPackedMatrixWriteRegion not implemented.")},n.prototype.debugValidate=function(){this.program!=null&&nr(this.gl,this.debug,this.program),Un(this.gl)},n.prototype.executeProgram=function(){this.throwIfDisposed(),this.throwIfNoProgram();var t=this.gl;this.debug&&this.debugValidate(),lt(t,this.debug,function(){return t.drawElements(t.TRIANGLES,6,t.UNSIGNED_SHORT,0)})},n.prototype.blockUntilAllProgramsCompleted=function(){var t=this;this.throwIfDisposed(),lt(this.gl,this.debug,function(){return t.gl.finish()})},n.prototype.getQueryTimerExtension=function(){return this.disjointQueryTimerExtension==null&&(this.disjointQueryTimerExtension=Er(this.gl,this.debug,P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")===2?"EXT_disjoint_timer_query_webgl2":"EXT_disjoint_timer_query")),this.disjointQueryTimerExtension},n.prototype.getQueryTimerExtensionWebGL2=function(){return this.getQueryTimerExtension()},n.prototype.getQueryTimerExtensionWebGL1=function(){return this.getQueryTimerExtension()},n.prototype.beginQuery=function(){if(P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")===2){var t=this.gl,e=this.getQueryTimerExtensionWebGL2(),r=t.createQuery();return t.beginQuery(e.TIME_ELAPSED_EXT,r),r}var i=this.getQueryTimerExtensionWebGL1(),a=i.createQueryEXT();return i.beginQueryEXT(i.TIME_ELAPSED_EXT,a),a},n.prototype.endQuery=function(){if(P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")!==2){var t=this.getQueryTimerExtensionWebGL1();t.endQueryEXT(t.TIME_ELAPSED_EXT)}else{var e=this.gl,r=this.getQueryTimerExtensionWebGL2();e.endQuery(r.TIME_ELAPSED_EXT)}},n.prototype.waitForQueryAndGetTime=function(t){return C(this,void 0,void 0,function(){var e=this;return E(this,function(r){switch(r.label){case 0:return[4,de(function(){return e.disposed||e.isQueryAvailable(t,P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))})];case 1:return r.sent(),[2,this.getQueryTime(t,P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))]}})})},n.prototype.getQueryTime=function(t,e){if(e===0)return null;if(e===2){var r=this.gl;return r.getQueryParameter(t,r.QUERY_RESULT)/1e6}var i=this.getQueryTimerExtensionWebGL1();return i.getQueryObjectEXT(t,i.QUERY_RESULT_EXT)/1e6},n.prototype.isQueryAvailable=function(t,e){if(e===0)return!0;if(e===2){var r=this.gl,i=this.getQueryTimerExtensionWebGL2(),a=r.getQueryParameter(t,r.QUERY_RESULT_AVAILABLE);return this.disjoint==null&&(this.disjoint=this.gl.getParameter(i.GPU_DISJOINT_EXT)),a&&!this.disjoint}return a=(i=this.getQueryTimerExtensionWebGL1()).getQueryObjectEXT(t,i.QUERY_RESULT_AVAILABLE_EXT),this.disjoint==null&&(this.disjoint=this.gl.getParameter(i.GPU_DISJOINT_EXT)),a&&!this.disjoint},n.prototype.pollFence=function(t){var e=this;return new Promise(function(r){e.addItemToPoll(function(){return t.isFencePassed()},function(){return r()})})},n.prototype.pollItems=function(){for(var t=function(r){for(var i=0;i<r.length&&r[i]();++i);return i-1}(this.itemsToPoll.map(function(r){return r.isDoneFn})),e=0;e<=t;++e)(0,this.itemsToPoll[e].resolveFn)();this.itemsToPoll=this.itemsToPoll.slice(t+1)},n.prototype.addItemToPoll=function(t,e){var r=this;this.itemsToPoll.push({isDoneFn:t,resolveFn:e}),this.itemsToPoll.length>1||de(function(){return r.pollItems(),r.itemsToPoll.length===0})},n.prototype.bindTextureToFrameBuffer=function(t){this.throwIfDisposed(),Fn(this.gl,this.debug,t,this.framebuffer),this.debug&&Un(this.gl)},n.prototype.unbindTextureToFrameBuffer=function(){this.outputTexture!=null?(Fn(this.gl,this.debug,this.outputTexture,this.framebuffer),this.debug&&Un(this.gl)):Ln(this.gl,this.debug,this.framebuffer)},n.prototype.downloadMatrixDriver=function(t,e){this.bindTextureToFrameBuffer(t);var r=e();return this.unbindTextureToFrameBuffer(),r},n.prototype.setOutputMatrixTextureDriver=function(t,e,r){this.throwIfDisposed();var i=this.gl;Fn(i,this.debug,t,this.framebuffer),this.debug&&Un(i),this.outputTexture=t,lt(i,this.debug,function(){return i.viewport(0,0,e,r)}),lt(i,this.debug,function(){return i.scissor(0,0,e,r)})},n.prototype.setOutputMatrixWriteRegionDriver=function(t,e,r,i){var a=this;this.throwIfDisposed(),lt(this.gl,this.debug,function(){return a.gl.scissor(t,e,r,i)})},n.prototype.throwIfDisposed=function(){if(this.disposed)throw new Error("Attempted to use disposed GPGPUContext.")},n.prototype.throwIfNoProgram=function(){if(this.program==null)throw new Error("No GPU program is currently set.")},n}();function oc(n,t){if(n.length!==t.length)throw Error("Binary was compiled with "+n.length+" inputs, but was executed with "+t.length+" inputs");n.forEach(function(e,r){var i=e.logicalShape,a=t[r],s=a.shape;if(!fe(i,s))throw Error("Binary was compiled with different shapes than the current args. Shapes "+i+" and "+s+" must match");if(!e.isUniform||!a.isUniform){var u=e.texShape,l=a.isUniform?null:a.texData.texShape;if(!fe(u,l))throw Error("Binary was compiled with different texture shapes than the current args. Shape "+u+" and "+l+" must match")}})}var oh=function(n,t,e){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=n;for(var r=e.filterWidth,i=e.inChannels,a=e.strideWidth,s=e.strideHeight,u=e.padInfo,l=e.outWidth,d=e.dilationWidth,A=e.dilationHeight,I=e.dataFormat,O=u.left,z=u.top,re=i*r,oe=qn(),ae=I==="channelsLast",se=ae?0:1,be=ae?1:2,Ae="",me=0;me<=1;me++)for(var Ce=0;Ce<=1;Ce++)Ae+=`
blockIndex = rc.y + `+Ce+`;
pos = rc.x + `+me+`;
if(blockIndex < `+n[1]+" && pos < "+n[0]+`) {
offsetY = int(blockIndex / (`+l+")) * "+s+" - "+z+`;
d0 = offsetY + `+A+" * (pos / "+re+`);
if(d0 < `+t[se]+` && d0 >= 0) {
offsetX = int(mod(float(blockIndex), `+l+".) * "+a+". - "+O+`.);
d1 = offsetX + `+d+" * (int(mod(float(pos), "+re+".) / "+i+`.));
if(d1 < `+t[be]+` && d1 >= 0) {
ch = int(mod(float(pos), `+i+`.));
if (`+ae+`) {
innerDims = vec2(d1, ch);
result[`+(2*me+Ce)+`] = getChannel(
getA(d0, int(innerDims.x),
int(innerDims.y)), innerDims);
} else {
innerDims = vec2(d0, d1);
result[`+(2*me+Ce)+`] = getChannel(
getA(ch, int(innerDims.x),
int(innerDims.y)), innerDims);
}
}
}
}
`;this.userCode=`
void main() {
ivec2 rc = getOutputCoords();
vec4 result = vec4(0);
int blockIndex, pos, offsetY, d0, offsetX, d1, ch;
vec2 innerDims;
`+Ae+`
`+oe.output+` = result;
}
`},sh=function(n,t,e,r,i){this.variableNames=["x"],this.outputShape=[];var a,s=t,u=n[3]-1;this.outputShape=n;var l="float("+e+") + float("+r+") * sum";a=i===.5?"inversesqrt("+l+")":i===1?"1.0/("+l+")":"exp(log("+l+") * float(-"+i+"));",this.userCode=`
void main() {
ivec4 coords = getOutputCoords();
int b = coords[0];
int r = coords[1];
int c = coords[2];
int d = coords[3];
float x = getX(b, r, c, d);
float sum = 0.0;
for (int j = -`+s+"; j <= "+s+`; j++) {
int idx = d + j;
if (idx >= 0 && idx <= `+u+`) {
float z = getX(b, r, c, idx);
sum += z * z;
}
}
float val = x * `+a+`;
setOutput(val);
}
`},uh=function(n,t,e,r,i){this.variableNames=["inputImage","outputImage","dy"],this.outputShape=[],this.outputShape=n,this.depth=n[3],this.depthRadius=t,this.bias=e,this.alpha=r,this.beta=i,this.userCode=`
void main() {
ivec4 coords = getOutputCoords();
int b = coords[0];
int r = coords[1];
int c = coords[2];
float result = 0.0;
for (int d = 0; d < `+this.depth+`; ++d) {
int depthBegin = int(max(0.0, float(d - `+t+`)));
int depthEnd = int(min(float(`+this.depth+`),
float(d + `+t+` + 1)));
const int MIN_DEPTH_BEGIN = 0;
const int MAX_DEPTH_END = `+this.depth+`;
float norm = 0.0;
for (int k = MIN_DEPTH_BEGIN; k < MAX_DEPTH_END; ++k) {
if (k < depthBegin){
continue;
}
else if (k >= depthBegin && k < depthEnd) {
norm += getInputImage(b, r, c, k) * getInputImage(b, r, c, k);
}
else {
break;
}
}
norm = float(`+r+") * norm + float("+e+`);
for(int k = MIN_DEPTH_BEGIN; k < MAX_DEPTH_END; ++k){
if (k < depthBegin){
continue;
}
else if (k >= depthBegin && k < depthEnd){
float dyi = -2.0 * float(`+r+`)
* float(`+i+`)
* getInputImage(b ,r ,c, k) * getOutputImage(b, r, c, d)
/ norm;
if (k == d) {
dyi += pow(norm, -1.0 * `+i+`);
}
if (k == coords[3]) {
dyi *= getDy(b, r, c, d);
result += dyi;
}
}
else {
break;
}
}
}
setOutput(result);
}
`},lh=function(n,t,e,r,i){this.variableNames=["x"],this.outputShape=[],this.packedInputs=!0,this.packedOutput=!0;var a,s=t,u=n[3]-1;this.outputShape=n;var l="float("+e+") + float("+r+") * sum";a=i===.5?"inversesqrt("+l+")":i===1?"1.0/("+l+")":"exp(log("+l+") * float(-"+i+"));",this.userCode=`
void main() {
ivec4 coords = getOutputCoords();
int b = coords.x;
int r = coords.y;
int c = coords.z;
int d = coords.w;
bool hasNextCol = d < `+this.outputShape[3]+`;
bool hasNextRow = c < `+this.outputShape[2]+`;
vec4 sum = vec4(0.);
vec4 xFragAtOutputCoords = getX(b, r, c, d);
vec4 xAtOutputCoords = vec4(
getChannel(xFragAtOutputCoords, vec2(c, d)),
hasNextCol ?
getChannel(xFragAtOutputCoords, vec2(c, d + 1)) : 0.0,
hasNextRow ?
getChannel(xFragAtOutputCoords , vec2(c + 1, d)) : 0.0,
(hasNextRow && hasNextCol) ?
getChannel(xFragAtOutputCoords, vec2(c + 1, d + 1)) : 0.0
);
int firstChannel = d - `+s+`;
vec2 cache = vec2(0.);
if(firstChannel >= 0){
vec4 firstChannelFrag = getX(b, r, c, firstChannel);
cache.x = getChannel(firstChannelFrag, vec2(c, firstChannel));
if(hasNextRow){
cache.y = getChannel(firstChannelFrag, vec2(c + 1, firstChannel));
}
}
ivec2 depth = ivec2(d, d + 1);
for (int j = - `+s+"; j <= "+s+`; j++) {
ivec2 idx = depth + j;
bvec2 aboveLowerBound = greaterThanEqual(idx, ivec2(0));
bvec2 belowUpperBound = lessThanEqual(idx, ivec2(`+u+`));
bool depthInRange = aboveLowerBound.x && belowUpperBound.x;
bool depthPlusOneInRange = aboveLowerBound.y && belowUpperBound.y;
if(depthInRange || depthPlusOneInRange){
vec4 z = vec4(0.);
vec4 xFragAtCurrentDepth;
z.xz = cache.xy;
if(depthPlusOneInRange && hasNextCol){
xFragAtCurrentDepth = idx.y != d ?
getX(b, r, c, idx.y) : xFragAtOutputCoords;
z.y = getChannel(xFragAtCurrentDepth, vec2(c, idx.y));
if(hasNextRow){
z.w = getChannel(xFragAtCurrentDepth, vec2(c + 1, idx.y));
}
}
cache.xy = z.yw;
sum += z * z;
}
}
vec4 result = xAtOutputCoords * `+a+`;
setOutput(result);
}
`},ch=function(n){this.variableNames=["dy","maxPos"],this.outputShape=n.inShape;var t=n.strideHeight,e=n.strideWidth,r=n.dilationHeight,i=n.effectiveFilterHeight,a=n.effectiveFilterWidth,s=i-1-n.padInfo.top,u=a-1-n.padInfo.left,l=i*a-1;this.userCode=`
const ivec2 pads = ivec2(`+s+", "+u+`);
void main() {
ivec4 coords = getOutputCoords();
int b = coords[0];
int d = coords[3];
ivec2 dyRCCorner = coords.yz - pads;
int dyRCorner = dyRCCorner.x;
int dyCCorner = dyRCCorner.y;
// Convolve dy(?, ?, d) with pos mask(:, :, d) to get dx(xR, xC, d).
// ? = to be determined. : = across all values in that axis.
float dotProd = 0.0;
for (int wR = 0; wR < `+i+`;
wR += `+r+`) {
float dyR = float(dyRCorner + wR) / `+t+`.0;
if (dyR < 0.0 || dyR >= `+n.outHeight+`.0 || fract(dyR) > 0.0) {
continue;
}
int idyR = int(dyR);
for (int wC = 0; wC < `+a+`; wC++) {
float dyC = float(dyCCorner + wC) / `+e+`.0;
if (dyC < 0.0 || dyC >= `+n.outWidth+`.0 ||
fract(dyC) > 0.0) {
continue;
}
int idyC = int(dyC);
float dyValue = getDy(b, idyR, idyC, d);
int maxPosValue = `+l+` - int(getMaxPos(b, idyR, idyC, d));
// Get the current value, check it against the value from the
// position matrix.
int curPosValue = wR * `+a+` + wC;
float mask = float(maxPosValue == curPosValue ? 1.0 : 0.0);
dotProd += dyValue * mask;
}
}
setOutput(dotProd);
}
`},fh=function(n){this.variableNames=["dy","maxPos"],this.outputShape=n.inShape;var t=n.strideDepth,e=n.strideHeight,r=n.strideWidth,i=n.dilationDepth,a=n.dilationHeight,s=n.dilationWidth,u=n.effectiveFilterDepth,l=n.effectiveFilterHeight,d=n.effectiveFilterWidth,A=u-1-n.padInfo.front,I=l-1-n.padInfo.top,O=d-1-n.padInfo.left,z=u*l*d-1;this.userCode=`
const ivec3 pads = ivec3(`+A+", "+I+", "+O+`);
void main() {
ivec5 coords = getOutputCoords();
int batch = coords.x;
int ch = coords.u;
ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;
int dyDCorner = dyCorner.x;
int dyRCorner = dyCorner.y;
int dyCCorner = dyCorner.z;
// Convolve dy(?, ?, ?, ch) with pos mask(:, :, :, d) to get
// dx(xD, xR, xC, ch).
// ? = to be determined. : = across all values in that axis.
float dotProd = 0.0;
for (int wD = 0; wD < `+u+`;
wD += `+i+`) {
float dyD = float(dyDCorner + wD) / `+t+`.0;
if (dyD < 0.0 || dyD >= `+n.outDepth+`.0 || fract(dyD) > 0.0) {
continue;
}
int idyD = int(dyD);
for (int wR = 0; wR < `+l+`;
wR += `+a+`) {
float dyR = float(dyRCorner + wR) / `+e+`.0;
if (dyR < 0.0 || dyR >= `+n.outHeight+`.0 ||
fract(dyR) > 0.0) {
continue;
}
int idyR = int(dyR);
for (int wC = 0; wC < `+d+`;
wC += `+s+`) {
float dyC = float(dyCCorner + wC) / `+r+`.0;
if (dyC < 0.0 || dyC >= `+n.outWidth+`.0 ||
fract(dyC) > 0.0) {
continue;
}
int idyC = int(dyC);
float dyValue = getDy(batch, idyD, idyR, idyC, ch);
int maxPosValue = `+z+` -
int(getMaxPos(batch, idyD, idyR, idyC, ch));
// Get the current value, check it against the value from the
// position matrix.
int curPosValue =
wD * `+l+" * "+d+` +
wR * `+d+` + wC;
float mask = float(maxPosValue == curPosValue ? 1.0 : 0.0);
dotProd += dyValue * mask;
}
}
}
setOutput(dotProd);
}
`},Bs=function(n,t,e,r,i,a,s){e===void 0&&(e=!1),r===void 0&&(r=!1),i===void 0&&(i=!1),a===void 0&&(a=null),s===void 0&&(s=!1),this.variableNames=["matrixA","matrixB"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=t;var u=e?n[1]:n[2],l=Math.ceil(u/2),d=e?"i * 2, rc.y":"rc.y, i * 2",A=r?"rc.z, i * 2":"i * 2, rc.z",I=e?["a.xxyy","a.zzww"]:["a.xxzz","a.yyww"],O=r?["b.xzxz","b.ywyw"]:["b.xyxy","b.zwzw"],z="",re="";a&&(z=s?`vec4 activation(vec4 a) {
vec4 b = getPreluActivationWeightsAtOutCoords();
`+a+`
}`:`vec4 activation(vec4 x) {
`+a+`
}`,re="result = activation(result);");var oe=i?"result += getBiasAtOutCoords();":"";i&&this.variableNames.push("bias"),s&&this.variableNames.push("preluActivationWeights"),this.userCode=`
`+z+`
const float sharedDimension = `+l+`.0;
vec4 dot2x2ARowBCol(ivec3 rc) {
vec4 result = vec4(0);
for (int i = 0; i < `+l+`; i++) {
vec4 a = getMatrixA(rc.x, `+d+`);
vec4 b = getMatrixB(rc.x, `+A+`);
// These swizzled products need to be separately added.
// See: https://github.com/tensorflow/tfjs/issues/1735
result += (`+I[0]+" * "+O[0]+`);
result += (`+I[1]+" * "+O[1]+`);
}
return result;
}
void main() {
ivec3 rc = getOutputCoords();
vec4 result = dot2x2ARowBCol(rc);
`+oe+`
`+re+`
setOutput(result);
}
`},dh=function(){function n(t,e,r){this.variableNames=["probs"],this.outputShape=[t,r],this.userCode=`
uniform float seed;
void main() {
ivec2 coords = getOutputCoords();
int batch = coords[0];
float r = random(seed);
float cdf = 0.0;
for (int i = 0; i < `+(e-1)+`; i++) {
cdf += getProbs(batch, i);
if (r < cdf) {
setOutput(float(i));
return;
}
}
// If no other event happened, last event happened.
setOutput(float(`+(e-1)+`));
}
`}return n.prototype.getCustomSetupFunc=function(t){var e=this;return function(r,i){e.seedLoc==null&&(e.seedLoc=r.getUniformLocation(i,"seed")),r.gl.uniform1f(e.seedLoc,t)}},n}(),ph=function(n,t,e,r){this.variableNames=["indices"],this.outputShape=[n,t],this.userCode=`
void main() {
ivec2 coords = getOutputCoords();
int index = round(getIndices(coords.x));
setOutput(mix(float(`+r+"), float("+e+`),
float(index == coords.y)));
}
`},hh=function(n){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0,this.outputShape=n;var t=n.length;if(t===0)this.userCode=`
void main() {
setOutput(vec4(getA(), 0., 0., 0.));
}
`;else{var e=ci("rc",t),r=cn(t),i=function(u,l,d){if(u===1)return"rc > "+l[0];for(var A="",I=u-2;I<u;I++)A+=d[I]+" >= "+l[I],I<u-1&&(A+="||");return A}(t,n,e),a=function(u,l,d,A){if(u===1)return"";var I=A.slice(-2);return`
int r = `+I[0]+`;
int c = `+I[1]+`;
int rp1 = r + 1;
int cp1 = c + 1;
bool cEdge = cp1 >= `+l+`;
bool rEdge = rp1 >= `+d+`;
`}(t,n[n.length-1],n[n.length-2],e),s=function(u,l){var d=u.length,A=function(I,O){for(var z=[],re=0;re<=1;re++)for(var oe=0;oe<=1;oe++){for(var ae=(re===0?"r":"rp1")+", "+(oe===0?"c":"cp1"),se=2;se<I;se++)ae=O[O.length-1-se]+","+ae;z.push(ae)}return z}(d,l);return d===1?`getA(rc),
rc + 1 >= `+u[0]+` ? 0. : getA(rc + 1),
0, 0`:"getA("+A[0]+`),
cEdge ? 0. : getA(`+A[1]+`),
rEdge ? 0. : getA(`+A[2]+`),
rEdge || cEdge ? 0. : getA(`+A[3]+")"}(n,e);this.userCode=`
void main() {
`+r+` rc = getOutputCoords();
if(`+i+`) {
setOutput(vec4(0));
} else {
`+a+`
setOutput(vec4(`+s+`));
}
}
`}},vh=function(n,t,e){this.variableNames=["x"],this.outputShape=t.map(function(l,d){return l[0]+n[d]+l[1]});var r=n.length,i=cn(r),a=t.map(function(l){return l[0]}).join(","),s=t.map(function(l,d){return l[0]+n[d]}).join(","),u=["coords[0]","coords[1]","coords[2]","coords[3]"].slice(0,r);this.userCode=r!==1?`
`+i+" start = "+i+"("+a+`);
`+i+" end = "+i+"("+s+`);
void main() {
`+i+` outC = getOutputCoords();
if (any(lessThan(outC, start)) || any(greaterThanEqual(outC, end))) {
setOutput(float(`+e+`));
} else {
`+i+` coords = outC - start;
setOutput(getX(`+u+`));
}
}
`:`
int start = `+a+`;
int end = `+s+`;
void main() {
int outC = getOutputCoords();
if (outC < start || outC >= end) {
setOutput(float(`+e+`));
} else {
setOutput(getX(outC - start));
}
}
`},mh=function(n,t,e){this.variableNames=["x"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=t.map(function(ae,se){return ae[0]+n[se]+ae[1]});for(var r=n.length,i=cn(r),a=t.map(function(ae){return ae[0]}).join(","),s=t.map(function(ae,se){return ae[0]+n[se]}).join(","),u=ci("rc",r),l=ci("source",r),d=u[r-1]+" < "+this.outputShape[r-1],A=r===1?"source":"vec2("+l.slice(-2).join()+")",I=[i+" rc = outputLoc;",u[r-1]+` += 1;
if(`+d+`) {
`,r===1?"":`}
rc = outputLoc;
`+u[r-2]+` += 1;
if(`+u[r-2]+" < "+this.outputShape[r-2]+") {",r===1?"":" "+u[r-1]+` += 1;
if(`+d+") {"],O=r===1?"rc < start || rc >= end":"any(lessThan(rc, start)) || any(greaterThanEqual(rc, end))",z="",re=0,oe=r===1?2:4;re<oe;re++)z+=`
`+I[re]+`
if (`+O+`) {
result[`+re+"] = float("+e+`);
} else {
`+i+` source = rc - start;
result[`+re+"] = getChannel(getX("+l.join()+"), "+A+`);
}
`;z+=r===1?"} ":"}}",this.userCode=`
const `+i+" start = "+i+"("+a+`);
const `+i+" end = "+i+"("+s+`);
void main() {
`+i+` outputLoc = getOutputCoords();
vec4 result = vec4(0.);
`+z+`
setOutput(result);
}
`},Ns=function(n,t,e){if(this.variableNames=["x"],t==="avg"&&e)throw new Error("Cannot compute positions for average pool.");var r=n.filterWidth,i=n.strideHeight,a=n.strideWidth,s=n.dilationHeight,u=n.dilationWidth,l=n.effectiveFilterHeight,d=n.effectiveFilterWidth,A=n.padInfo.top,I=n.padInfo.left;this.outputShape=n.outShape;var O=t==="avg",z="0.0";if(O||(z="-1.0 / 1e-20"),e)this.userCode=`
const ivec2 strides = ivec2(`+i+", "+a+`);
const ivec2 pads = ivec2(`+A+", "+I+`);
void main() {
ivec4 coords = getOutputCoords();
int batch = coords[0];
int d = coords[3];
ivec2 xRCCorner = coords.yz * strides - pads;
int xRCorner = xRCCorner.x;
int xCCorner = xRCCorner.y;
// max/min x(?, ?, d) to get y(yR, yC, d).
// ? = to be determined
float minMaxValue = 0.0;
float minMaxValueFound = 0.0;
int minMaxPosition = 0;
float avgValue = 0.0;
for (int wR = 0; wR < `+l+`;
wR += `+s+`) {
int xR = xRCorner + wR;
if (xR < 0 || xR >= `+n.inHeight+`) {
continue;
}
for (int wC = 0; wC < `+d+`;
wC += `+u+`) {
int xC = xCCorner + wC;
if (xC < 0 || xC >= `+n.inWidth+`) {
continue;
}
float value = getX(batch, xR, xC, d);
// If a min / max value has already been found, use it. If not,
// use the current value.
float currMinMaxValue = mix(
value, minMaxValue, minMaxValueFound);
if (value >= currMinMaxValue) {
minMaxValue = value;
minMaxValueFound = 1.0;
minMaxPosition = wR * `+d+` + wC;
}
}
}
setOutput(float(minMaxPosition));
}
`;else{var re=t+"("+t+"("+t+"(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])";t==="avg"&&(re="avgValue / count");var oe=4*Math.floor(r/4),ae=r%4,se=`
if (`+O+`) {
avgValue += dot(values, ones);
} else {
minMaxValue = max(values, minMaxValue);
}
`;this.userCode=`
const ivec2 strides = ivec2(`+i+", "+a+`);
const ivec2 pads = ivec2(`+A+", "+I+`);
const float initializationValue = `+z+`;
const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);
float count = 0.0;
float getValue(int batch, int xR, int xC, int d) {
if (xC < 0 || xC >= `+n.inWidth+`) {
return initializationValue;
}
count += 1.0;
return getX(batch, xR, xC, d);
}
void main() {
ivec4 coords = getOutputCoords();
int batch = coords[0];
int d = coords[3];
ivec2 xRCCorner = coords.yz * strides - pads;
int xRCorner = xRCCorner.x;
int xCCorner = xRCCorner.y;
// max/min x(?, ?, d) to get y(yR, yC, d).
// ? = to be determined
vec4 minMaxValue = vec4(`+z+`);
float avgValue = 0.0;
count = 0.0;
for (int wR = 0; wR < `+l+`;
wR += `+s+`) {
int xR = xRCorner + wR;
if (xR < 0 || xR >= `+n.inHeight+`) {
continue;
}
for (int wC = 0; wC < `+oe+`; wC += 4) {
int xC = xCCorner + wC * `+u+`;
vec4 values = vec4(
getValue(batch, xR, xC, d),
getValue(batch, xR, xC + `+u+`, d),
getValue(batch, xR, xC + 2 * `+u+`, d),
getValue(batch, xR, xC + 3 * `+u+`, d)
);
`+se+`
}
int xC = xCCorner + `+oe+`;
if (`+(ae===1)+`) {
vec4 values = vec4(
getValue(batch, xR, xC, d),
initializationValue,
initializationValue,
initializationValue
);
`+se+`
} else if (`+(ae===2)+`) {
vec4 values = vec4(
getValue(batch, xR, xC, d),
getValue(batch, xR, xC + `+u+`, d),
initializationValue,
initializationValue
);
`+se+`
} else if (`+(ae===3)+`) {
vec4 values = vec4(
getValue(batch, xR, xC, d),
getValue(batch, xR, xC + `+u+`, d),
getValue(batch, xR, xC + 2 * `+u+`, d),
initializationValue
);
`+se+`
}
}
setOutput(`+re+`);
}
`}},Ms=function(n,t,e){if(this.variableNames=["x"],t==="avg"&&e)throw new Error("Cannot compute positions for average pool.");var r=n.filterWidth,i=n.strideDepth,a=n.strideHeight,s=n.strideWidth,u=n.dilationDepth,l=n.dilationHeight,d=n.dilationWidth,A=n.effectiveFilterDepth,I=n.effectiveFilterHeight,O=n.effectiveFilterWidth,z=n.padInfo.front,re=n.padInfo.top,oe=n.padInfo.left;this.outputShape=n.outShape;var ae=t==="avg",se="0.0";if(ae||(se="-1.0 / 1e-20"),e)this.userCode=`
const ivec3 strides =
ivec3(`+i+", "+a+", "+s+`);
const ivec3 pads = ivec3(`+z+", "+re+", "+oe+`);
void main() {
ivec5 coords = getOutputCoords();
int batch = coords.x;
int ch = coords.u;
ivec3 xCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;
int xDCorner = xCorner.x;
int xRCorner = xCorner.y;
int xCCorner = xCorner.z;
// max/min x(?, ?, ?, ch) to get y(yD, yR, yC, ch).
// ? = to be determined
float minMaxValue = 0.0;
float minMaxValueFound = 0.0;
int minMaxPosition = 0;
for (int wD = 0; wD < `+A+`;
wD += `+u+`) {
int xD = xDCorner + wD;
if (xD < 0 || xD >= `+n.inDepth+`) {
continue;
}
for (int wR = 0; wR < `+I+`;
wR += `+l+`) {
int xR = xRCorner + wR;
if (xR < 0 || xR >= `+n.inHeight+`) {
continue;
}
for (int wC = 0; wC < `+O+`;
wC += `+d+`) {
int xC = xCCorner + wC;
if (xC < 0 || xC >= `+n.inWidth+`) {
continue;
}
float value = getX(batch, xD, xR, xC, ch);
// If a min / max value has already been found, use it. If not,
// use the current value.
float currMinMaxValue = mix(
value, minMaxValue, minMaxValueFound);
if (value >= currMinMaxValue) {
minMaxValue = value;
minMaxValueFound = 1.0;
minMaxPosition =
wD * `+I+" * "+O+` +
wR * `+O+` + wC;;
}
}
}
}
setOutput(float(minMaxPosition));
}
`;else{var be=t+"("+t+"("+t+"(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])";t==="avg"&&(be="avgValue / count");var Ae=4*Math.floor(r/4),me=r%4,Ce=`
if (`+ae+`) {
avgValue += dot(values, ones);
} else {
minMaxValue = max(values, minMaxValue);
}
`;this.userCode=`
const ivec3 strides =
ivec3(`+i+", "+a+", "+s+`);
const ivec3 pads = ivec3(`+z+", "+re+", "+oe+`);
const float initializationValue = `+se+`;
const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);
float count = 0.0;
float getValue(int batch, int xD, int xR, int xC, int ch) {
if (xC < 0 || xC >= `+n.inWidth+`) {
return initializationValue;
}
count += 1.0;
return getX(batch, xD, xR, xC, ch);
}
void main() {
ivec5 coords = getOutputCoords();
int batch = coords.x;
int ch = coords.u;
ivec3 xCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;
int xDCorner = xCorner.x;
int xRCorner = xCorner.y;
int xCCorner = xCorner.z;
// max/min x(?, ?, ?, d) to get y(yD, yR, yC, ch).
// ? = to be determined
vec4 minMaxValue = vec4(`+se+`);
float avgValue = 0.0;
count = 0.0;
for (int wD = 0; wD < `+A+`;
wD += `+u+`) {
int xD = xDCorner + wD;
if (xD < 0 || xD >= `+n.inDepth+`) {
continue;
}
for (int wR = 0; wR < `+I+`;
wR += `+l+`) {
int xR = xRCorner + wR;
if (xR < 0 || xR >= `+n.inHeight+`) {
continue;
}
for (int wC = 0; wC < `+Ae+`; wC += 4) {
int xC = xCCorner + wC * `+d+`;
vec4 values = vec4(
getValue(batch, xD, xR, xC, ch),
getValue(batch, xD, xR, xC + `+d+`, ch),
getValue(batch, xD, xR, xC + 2 * `+d+`, ch),
getValue(batch, xD, xR, xC + 3 * `+d+`, ch)
);
`+Ce+`
}
int xC = xCCorner + `+Ae+`;
if (`+(me===1)+`) {
vec4 values = vec4(
getValue(batch, xD, xR, xC, ch),
initializationValue,
initializationValue,
initializationValue
);
`+Ce+`
} else if (`+(me===2)+`) {
vec4 values = vec4(
getValue(batch, xD, xR, xC, ch),
getValue(batch, xD, xR, xC + `+d+`, ch),
initializationValue,
initializationValue
);
`+Ce+`
} else if (`+(me===3)+`) {
vec4 values = vec4(
getValue(batch, xD, xR, xC, ch),
getValue(batch, xD, xR, xC + `+d+`, ch),
getValue(batch, xD, xR, xC + 2 * `+d+`, ch),
initializationValue
);
`+Ce+`
}
}
setOutput(`+be+`);
}
}
`}},gh=function(n,t){this.variableNames=["x"];var e=n.windowSize,r=n.batchSize,i=n.inSize,a=Math.ceil(i/e);this.outputShape=[r,a];var s="0.0",u="";t==="prod"?s="1.0":t==="min"?(s="1.0 / 1e-20",u="min"):t==="max"&&(s="-1.0 / 1e-20",u="max");var l=t+"("+t+"("+t+"(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])";t==="sum"?l="sumValue":t==="prod"?l="prodValue":t==="all"?l="allValue":t==="any"&&(l="anyValue");var d=4*Math.floor(e/4),A=e%4,I=`
if (`+(t==="sum")+`) {
sumValue += dot(values, ones);
} else if (`+(t==="prod")+`) {
vec2 tmp = vec2(values[0], values[1]) * vec2(values[2], values[3]);
prodValue *= tmp[0] * tmp[1];
} else {
minMaxValue = `+u+`(values, minMaxValue);
}
`,O="vec4";t==="all"?(s="1.0",I=`
bool reducedAllValue = all(values);
float floatedReducedAllValue = float(reducedAllValue);
allValue = float(allValue >= 1.0 && floatedReducedAllValue >= 1.0);
`,O="bvec4"):t==="any"&&(s="0.0",I=`
bool reducedAnyValue = any(values);
float floatedReducedAnyValue = float(reducedAnyValue);
anyValue = float(anyValue >= 1.0 || floatedReducedAnyValue >= 1.0);
`,O="bvec4");var z="";i%e>0&&(z=`
if (inIdx < 0 || inIdx >= `+i+`) {
return initializationValue;
}
`),this.userCode=`
const float initializationValue = `+s+`;
const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);
float getValue(int batch, int inIdx) {
`+z+`
return getX(batch, inIdx);
}
void main() {
ivec2 coords = getOutputCoords();
int batch = coords[0];
int outIdx = coords[1];
int inOffset = outIdx * `+e+`;
vec4 minMaxValue = vec4(`+s+`);
float prodValue = 1.0;
float sumValue = 0.0;
float allValue = 1.0;
float anyValue = 0.0;
for (int i = 0; i < `+d+`; i += 4) {
int inIdx = inOffset + i;
`+O+" values = "+O+`(
getValue(batch, inIdx),
getValue(batch, inIdx + 1),
getValue(batch, inIdx + 2),
getValue(batch, inIdx + 3)
);
`+I+`
}
int inIdx = inOffset + `+d+`;
if (`+(A===1)+`) {
`+O+" values = "+O+`(
getValue(batch, inIdx),
initializationValue,
initializationValue,
initializationValue
);
`+I+`
} else if (`+(A===2)+`) {
`+O+" values = "+O+`(
getValue(batch, inIdx),
getValue(batch, inIdx + 1),
initializationValue,
initializationValue
);
`+I+`
} else if (`+(A===3)+`) {
`+O+" values = "+O+`(
getValue(batch, inIdx),
getValue(batch, inIdx + 1),
getValue(batch, inIdx + 2),
initializationValue
);
`+I+`
}
setOutput(`+l+`);
}
`},yh=function(n,t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=n;for(var e="",r=0;r<4;r++){var i="thisRC = rc;";r%2==1&&(i+="thisRC.z += 1;"),r>1&&(i+="thisRC.y += 1;"),e+=`
`+i+`
`+(r>0?"if(thisRC.y < rows && thisRC.z < cols){":"")+`
int flatIndex = getFlatIndex(thisRC);
ivec3 inputRC = inputCoordsFromReshapedOutCoords(flatIndex);
vec2 inputRCInnerDims = vec2(float(inputRC.y),float(inputRC.z));
result[`+r+`] =
getChannel(getA(inputRC.x, inputRC.y, inputRC.z), inputRCInnerDims);
`+(r>0?"}":"")+`
`}this.userCode=`
ivec3 inputCoordsFromReshapedOutCoords(int index) {
`+Ca(["r","c","d"],t)+`
return ivec3(r, c, d);
}
`+js(n)+`
void main() {
ivec3 rc = getOutputCoords();
vec4 result = vec4(0.);
ivec3 thisRC;
int rows = `+n[1]+`;
int cols = `+n[2]+`;
`+e+`
setOutput(result);
}
`},bh=function(n,t,e){this.variableNames=["dy"],this.outputShape=[],this.outputShape=t.shape;var r=t.shape,i=r[1],a=r[2],s=n.shape,u=s[1],l=s[2],d=[e&&u>1?i-1:i,e&&l>1?a-1:a],A=[e&&u>1?u-1:u,e&&l>1?l-1:l],I=d[0]/A[0],O=d[1]/A[1],z=1/I,re=1/O,oe=2*Math.ceil(z)+2,ae=2*Math.ceil(re)+2;this.userCode=`
void main() {
ivec4 coords = getOutputCoords();
int b = coords[0];
int d = coords[3];
int r = coords[1];
int c = coords[2];
float accumulator = 0.0;
const float heightScale = float(`+I+`);
const float widthScale = float(`+O+`);
const float invHeightScale = float(`+z+`);
const float invWidthScale = float(`+re+`);
const int winHeight = int(`+oe+`);
const int winWidth = int(`+ae+`);
// Compute bounds for where in dy we will look
float startRLerp = floor(float(r) * invHeightScale);
int startDyR = int(startRLerp - float(winHeight / 2));
float startCLerp = floor(float(c) * invWidthScale);
int startDyC = int(startCLerp - float(winWidth / 2));
// Loop over dy
for (int dyROffset = 0; dyROffset < winHeight; dyROffset++) {
int dyR = dyROffset + startDyR;
// Guard against the window exceeding the bounds of dy
if (dyR < 0 || dyR >= `+u+`) {
continue;
}
for (int dyCOffset = 0; dyCOffset < winWidth; dyCOffset++) {
int dyC = dyCOffset + startDyC;
// Guard against the window exceeding the bounds of dy
if (dyC < 0 || dyC >= `+l+`) {
continue;
}
float dxR = float(dyR) * heightScale;
int topDxRIndex = int(floor(dxR));
int bottomDxRIndex = int(min(ceil(dxR), `+(i-1)+`.0));
float dxRLerp = dxR - float(topDxRIndex);
float inverseDxRLerp = 1.0 - dxRLerp;
float dxC = float(dyC) * widthScale;
int leftDxCIndex = int(floor(dxC));
int rightDxCIndex = int(min(ceil(dxC), `+(a-1)+`.0));
float dxCLerp = dxC - float(leftDxCIndex);
float inverseDxCLerp = 1.0 - dxCLerp;
if (r == topDxRIndex && c == leftDxCIndex) {
// topLeft
accumulator +=
getDy(b, dyR, dyC, d) * inverseDxRLerp * inverseDxCLerp;
}
if (r == topDxRIndex && c == rightDxCIndex) {
// topRight
accumulator += getDy(b, dyR, dyC, d) * inverseDxRLerp * dxCLerp;
}
if (r == bottomDxRIndex && c == leftDxCIndex) {
// bottomLeft
accumulator += getDy(b, dyR, dyC, d) * dxRLerp * inverseDxCLerp;
}
if (r == bottomDxRIndex && c == rightDxCIndex) {
// bottomRight
accumulator += getDy(b, dyR, dyC, d) * dxRLerp * dxCLerp;
}
}
}
// End loop over dy
setOutput(accumulator);
}
`},wh=function(n,t,e,r){this.variableNames=["A"],this.outputShape=[];var i=n[0],a=n[1],s=n[2],u=n[3];this.outputShape=[i,t,e,u];var l=[r&&t>1?a-1:a,r&&e>1?s-1:s],d=[r&&t>1?t-1:t,r&&e>1?e-1:e];this.userCode=`
const vec2 effectiveInputOverOutputRatioRC = vec2(
`+l[0]/d[0]+`,
`+l[1]/d[1]+`);
const vec2 inputShapeRC = vec2(`+a+".0, "+s+`.0);
void main() {
ivec4 coords = getOutputCoords();
int b = coords[0];
int d = coords[3];
ivec2 yRC = coords.yz;
// Fractional source index.
vec2 sourceFracIndexRC = vec2(yRC) * effectiveInputOverOutputRatioRC;
// Compute the four integer indices.
ivec2 sourceFloorRC = ivec2(sourceFracIndexRC);
ivec2 sourceCeilRC = ivec2(
min(inputShapeRC - 1.0, ceil(sourceFracIndexRC)));
float topLeft = getA(b, sourceFloorRC.x, sourceFloorRC.y, d);
float bottomLeft = getA(b, sourceCeilRC.x, sourceFloorRC.y, d);
float topRight = getA(b, sourceFloorRC.x, sourceCeilRC.y, d);
float bottomRight = getA(b, sourceCeilRC.x, sourceCeilRC.y, d);
vec2 fracRC = sourceFracIndexRC - vec2(sourceFloorRC);
float top = topLeft + (topRight - topLeft) * fracRC.y;
float bottom = bottomLeft + (bottomRight - bottomLeft) * fracRC.y;
float newValue = top + (bottom - top) * fracRC.x;
setOutput(newValue);
}
`},Ah=function(n,t,e,r){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=[];var i=n[0],a=n[1],s=n[2],u=n[3];this.outputShape=[i,t,e,u];var l=[r&&t>1?a-1:a,r&&e>1?s-1:s],d=[r&&t>1?t-1:t,r&&e>1?e-1:e];this.userCode=`
const vec3 effectiveInputOverOutputRatioRC = vec3(
`+l[0]/d[0]+`,
`+l[1]/d[1]+`,
`+l[1]/d[1]+`);
const vec3 inputShapeRC = vec3(`+a+".0, "+s+`.0,
`+s+`.0);
float getAValue(int b, int r, int c, int d) {
return getChannel(getA(b, r, c, d), vec2(c, d));
}
void main() {
ivec4 coords = getOutputCoords();
int b = coords[0];
int d = coords[3];
// Calculate values for next column in yRC.z.
ivec3 yRC = coords.yzz + ivec3(0, 0, 1);
// Fractional source index.
vec3 sourceFracIndexRC = vec3(yRC) * effectiveInputOverOutputRatioRC;
// Compute the four integer indices.
ivec3 sourceFloorRC = ivec3(sourceFracIndexRC);
ivec3 sourceCeilRC = ivec3(
min(inputShapeRC - 1.0, ceil(sourceFracIndexRC)));
// Should we calculate next column and row elements in 2x2 packed cell.
bool hasNextCol = d < `+(u-1)+`;
bool hasNextRow = coords.z < `+(e-1)+`;
// In parallel, construct four corners for all four components in
// packed 2x2 cell.
vec4 topLeft = vec4(
getAValue(b, sourceFloorRC.x, sourceFloorRC.y, d),
hasNextCol ? getAValue(b, sourceFloorRC.x, sourceFloorRC.y, d + 1)
: 0.0,
hasNextRow ? getAValue(b, sourceFloorRC.x, sourceFloorRC.z, d)
: 0.0,
(hasNextRow && hasNextCol) ?
getAValue(b, sourceFloorRC.x, sourceFloorRC.z, d + 1) : 0.0);
vec4 bottomLeft = vec4(
getAValue(b, sourceCeilRC.x, sourceFloorRC.y, d),
hasNextCol ? getAValue(b, sourceCeilRC.x, sourceFloorRC.y, d + 1)
: 0.0,
hasNextRow ? getAValue(b, sourceCeilRC.x, sourceFloorRC.z, d)
: 0.0,
(hasNextRow && hasNextCol) ?
getAValue(b, sourceCeilRC.x, sourceFloorRC.z, d + 1) : 0.0);
vec4 topRight = vec4(
getAValue(b, sourceFloorRC.x, sourceCeilRC.y, d),
hasNextCol ? getAValue(b, sourceFloorRC.x, sourceCeilRC.y, d + 1)
: 0.0,
hasNextRow ? getAValue(b, sourceFloorRC.x, sourceCeilRC.z, d)
: 0.0,
(hasNextRow && hasNextCol) ?
getAValue(b, sourceFloorRC.x, sourceCeilRC.z, d + 1) : 0.0);
vec4 bottomRight = vec4(
getAValue(b, sourceCeilRC.x, sourceCeilRC.y, d),
hasNextCol ? getAValue(b, sourceCeilRC.x, sourceCeilRC.y, d + 1)
: 0.0,
hasNextRow ? getAValue(b, sourceCeilRC.x, sourceCeilRC.z, d)
: 0.0,
(hasNextRow && hasNextCol) ?
getAValue(b, sourceCeilRC.x, sourceCeilRC.z, d + 1) : 0.0);
vec3 fracRC = sourceFracIndexRC - vec3(sourceFloorRC);
vec4 top = mix(topLeft, topRight, fracRC.yyzz);
vec4 bottom = mix(bottomLeft, bottomRight, fracRC.yyzz);
vec4 newValue = mix(top, bottom, fracRC.x);
setOutput(newValue);
}
`},xh=function(n,t,e){this.variableNames=["dy"],this.outputShape=[],this.outputShape=t.shape;var r=t.shape,i=r[1],a=r[2],s=n.shape,u=s[1],l=s[2],d=[e&&u>1?i-1:i,e&&l>1?a-1:a],A=[e&&u>1?u-1:u,e&&l>1?l-1:l],I=d[0]/A[0],O=d[1]/A[1],z=1/I,re=1/O,oe=2*Math.ceil(z)+2,ae=2*Math.ceil(re)+2;this.userCode=`
void main() {
ivec4 coords = getOutputCoords();
int b = coords[0];
int d = coords[3];
int r = coords[1];
int c = coords[2];
float accumulator = 0.0;
const float heightScale = float(`+I+`);
const float widthScale = float(`+O+`);
const float invHeightScale = float(`+z+`);
const float invWidthScale = float(`+re+`);
const int winHeight = int(`+oe+`);
const int winWidth = int(`+ae+`);
// Compute bounds for where in dy we will look
float startRLerp = floor(float(r) * invHeightScale);
int startDyR = int(floor(startRLerp - float(winHeight / 2)));
float startCLerp = floor(float(c) * invWidthScale);
int startDyC = int(floor(startCLerp - float(winWidth / 2)));
// Loop over dy
for (int dyROffset = 0; dyROffset < winHeight; dyROffset++) {
int dyR = dyROffset + startDyR;
// Guard against the window exceeding the bounds of dy
if (dyR < 0 || dyR >= `+u+`) {
continue;
}
for (int dyCOffset = 0; dyCOffset < winWidth; dyCOffset++) {
int dyC = dyCOffset + startDyC;
// Guard against the window exceeding the bounds of dy
if (dyC < 0 || dyC >= `+l+`) {
continue;
}
float sourceFracRow =
float(`+d[0]+`) *
(float(dyR) / float(`+A[0]+`));
float sourceFracCol =
float(`+d[1]+`) *
(float(dyC) / float(`+A[1]+`));
int sourceNearestRow = int(min(
float(int(`+i+`) - 1),
`+e+` ? float(round(sourceFracRow)) :
float(floor(sourceFracRow))));
int sourceNearestCol = int(min(
float(int(`+a+`) - 1),
`+e+` ? float(round(sourceFracCol)) :
float(floor(sourceFracCol))));
if (r == sourceNearestRow && c == sourceNearestCol) {
accumulator += getDy(b, dyR, dyC, d);
}
}
}
// End loop over dy
setOutput(accumulator);
}
`},Eh=function(n,t,e,r){this.variableNames=["A"],this.outputShape=[];var i=n[0],a=n[1],s=n[2],u=n[3];this.outputShape=[i,t,e,u];var l=[r&&t>1?a-1:a,r&&e>1?s-1:s],d=[r&&t>1?t-1:t,r&&e>1?e-1:e],A=r?"0.5":"0.0";this.userCode=`
const vec2 effectiveInputOverOutputRatioRC = vec2(
`+l[0]/d[0]+`,
`+l[1]/d[1]+`);
const vec2 inputShapeRC = vec2(`+a+".0, "+s+`.0);
void main() {
ivec4 coords = getOutputCoords();
int b = coords[0];
int d = coords[3];
ivec2 yRC = coords.yz;
// Fractional source index.
vec2 sourceFracIndexRC = vec2(yRC) * effectiveInputOverOutputRatioRC;
// Compute the coordinators of nearest neighbor point.
ivec2 sourceNearestRC = ivec2(
min(inputShapeRC - 1.0, floor(sourceFracIndexRC + `+A+`)));
float newValue = getA(b, sourceNearestRC.x, sourceNearestRC.y, d);
setOutput(newValue);
}
`},Ch=function(n,t){this.variableNames=["x"];var e=n.length;if(e>4)throw new Error("WebGL backend: Reverse of rank-"+e+" tensor is not yet supported");if(this.outputShape=n,e!==1){var r=n.map(function(a,s){return function(u){return t.indexOf(u)!==-1&&n[u]!==1?n[u]+" - coords["+u+"] - 1":"coords["+u+"]"}(s)}).join(","),i=cn(e);this.userCode=`
void main() {
`+i+` coords = getOutputCoords();
setOutput(getX(`+r+`));
}
`}else this.userCode=`
void main() {
int coord = getOutputCoords();
setOutput(getX(`+n[0]+` - coord - 1));
}
`},Sh=function(n,t){this.variableNames=["x"],this.packedInputs=!0,this.packedOutput=!0;var e=n.length;if(e>4)throw new Error("WebGL backend: Reverse of rank-"+e+" tensor is not yet supported");this.outputShape=n;var r=ci("rc",e),i=r[e-1]+" + 1 < "+this.outputShape[e-1],a=r[e-2]+" + 1 < "+this.outputShape[e-2],s=cn(e);function u(l){var d=n.map(function(A,I){return function(O,z){return t.indexOf(O)!==-1&&n[O]!==1?n[O]+" - "+z[O]+" - 1":""+z[O]}(I,l)});return"getChannel(getX("+d.join(",")+"), vec2("+d.slice(-2).join(",")+"))"}this.userCode=e===1?`
void main(){
int rc = getOutputCoords();
vec4 result = vec4(0.);
result.r = getChannel(getX(`+n[0]+` - rc - 1),
`+n[0]+` - rc - 1);
if(`+i+`){
result.g = getChannel(getX(`+n[0]+` - (rc + 1) - 1),
`+n[0]+` - (rc + 1) - 1);
}
setOutput(result);
}
`:`
void main() {
`+s+` rc = getOutputCoords();
vec4 result = vec4(0.);
result.r = `+function(l){return u(l)}(r.slice())+`;
if(`+i+`){
result.g = `+function(l){return l[e-1]="("+l[e-1]+" + 1)",u(l)}(r.slice())+`;
}
if(`+a+`) {
result.b = `+function(l){return l[e-2]="("+l[e-2]+" + 1)",u(l)}(r.slice())+`;
if(`+i+`) {
result.a = `+function(l){return l[e-1]="("+l[e-1]+" + 1)",l[e-2]="("+l[e-2]+" + 1)",u(l)}(r.slice())+`;
}
}
setOutput(result);
}
`},sc=function(n,t,e,r,i,a,s){s===void 0&&(s=!0),this.variableNames=["updates","indices","defaultValue"],this.outputShape=a;var u=cn(i.length),l=cn(a.length),d="";e===1?d="i":e===2&&(d="i, j");var A="getIndices("+d+")",I="";r===1?I="i":r===2&&(I="i, coords[1]");var O="getUpdates("+I+")",z=t>1?"strides[j]":"strides";this.userCode=`
`+u+" strides = "+u+"("+i+`);
void main() {
`+l+` coords = getOutputCoords();
float sum = 0.0;
bool found = false;
for (int i = 0; i < `+n+`; i++) {
int flattenedIndex = 0;
for (int j = 0; j < `+t+`; j++) {
int index = round(`+A+`);
flattenedIndex += index * `+z+`;
}
if (flattenedIndex == coords[0]) {
sum += `+O+`;
found = true;
}
}
setOutput(mix(getDefaultValue(), sum, float(found)));
}
`},Ih=function(n,t){this.variableNames=["x","segmentIds"];var e=n.windowSize,r=n.batchSize,i=n.inSize,a=n.numSegments,s=a*Math.ceil(i/e);this.outputShape=[r,s];var u=4*Math.floor(e/4),l=e%4,d=`
sumValue += dot(values, segFilter);
`,A="";i%e>0&&(A=`
if (inIdx < 0 || inIdx >= `+i+`) {
return initializationValue;
}
`);var I="";i%e>0&&(I=`
if (inIdx < 0 || inIdx >= `+i+`) {
return -1.0;
}
`),this.userCode=`
const float initializationValue = 0.0;
float getValue(int batch, int inIdx) {
`+A+`
return getX(batch, inIdx);
}
float getSegmentIdAtIndex(int inIdx) {
`+I+`
return getSegmentIds(inIdx);
}
void main() {
ivec2 coords = getOutputCoords();
int batch = coords[0];
int outIdx = coords[1];
int inOffset = int(floor(float(outIdx) / float(
`+a+")) * float("+e+`));
int currentSeg = int(mod(float(outIdx), float(`+a+`)));
float sumValue = 0.0;
for (int i = 0; i < `+u+`; i += 4) {
int inIdx = inOffset + i;
vec4 values = vec4(
getValue(batch, inIdx),
getValue(batch, inIdx + 1),
getValue(batch, inIdx + 2),
getValue(batch, inIdx + 3)
);
vec4 segFilter = vec4(
int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,
int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,
int(getSegmentIdAtIndex(inIdx + 2)) == currentSeg ? 1 : 0,
int(getSegmentIdAtIndex(inIdx + 3)) == currentSeg ? 1 : 0
);
`+d+`
}
int inIdx = inOffset + `+u+`;
if (`+(l===1)+`) {
vec4 values = vec4(
getValue(batch, inIdx),
initializationValue,
initializationValue,
initializationValue
);
int inIdxSeg = int(getSegmentIdAtIndex(inIdx));
vec4 segFilter = vec4(
int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,
0,
0,
0
);
`+d+`
} else if (`+(l===2)+`) {
vec4 values = vec4(
getValue(batch, inIdx),
getValue(batch, inIdx + 1),
initializationValue,
initializationValue
);
vec4 segFilter = vec4(
int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,
int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,
0,
0
);
`+d+`
} else if (`+(l===3)+`) {
vec4 values = vec4(
getValue(batch, inIdx),
getValue(batch, inIdx + 1),
getValue(batch, inIdx + 2),
initializationValue
);
vec4 segFilter = vec4(
int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,
int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,
int(getSegmentIdAtIndex(inIdx + 2)) == currentSeg ? 1 : 0,
0
);
`+d+`
}
setOutput(sumValue);
}
`},Th=function(n,t,e){var r,i;if(this.variableNames=["c","a","b"],this.outputShape=t,e>4)throw Error("Where for rank "+e+" is not yet supported");if(e===1)i="resRC",r="resRC";else{for(var a=["resRC.x","resRC.y","resRC.z","resRC.w"],s=[],u=[],l=0;l<t.length;l++)u.push(""+a[l]),l<n&&s.push(""+a[l]);r=s.join(),i=u.join()}var d=cn(e);this.userCode=`
void main() {
`+d+` resRC = getOutputCoords();
float cVal = getC(`+r+`);
if (cVal >= 1.0) {
setOutput(getA(`+i+`));
} else {
setOutput(getB(`+i+`));
}
}
`},Rh=function(){function n(t){this.variableNames=["source"],this.outputShape=t,this.rank=t.length;var e,r=cn(this.rank),i="uniform int start["+this.rank+"];",a=function(s){if(s===1)return"sourceLoc";if(s<=6)return _s.slice(0,s).map(function(u){return"sourceLoc."+u}).join(",");throw Error("Slicing for rank "+s+" is not yet supported")}(this.rank);e=`
`+r+` sourceLoc;
`+r+` coords = getOutputCoords();
`+t.map(function(s,u){return"sourceLoc."+_s[u]+" = start["+u+"] + coords."+_s[u]+";"}).join(`
`)+`
`,this.userCode=`
`+i+`
void main() {
`+e+`
setOutput(getSource(`+a+`));
}
`}return n.prototype.getCustomSetupFunc=function(t){var e=this;if(t.length!==this.rank)throw Error("The rank ("+this.rank+") of the program must match the length of start ("+t.length+")");return function(r,i){e.startLoc==null&&(e.startLoc=r.getUniformLocationNoThrow(i,"start"),e.startLoc==null)||r.gl.uniform1iv(e.startLoc,t)}},n}(),_s=["x","y","z","w","u","v"],Oh=function(){function n(t){this.variableNames=["source"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=t,this.rank=t.length;var e=cn(this.rank),r=ci("coords",this.rank),i=ci("sourceLoc",this.rank),a=this.rank===1?"sourceLoc":"vec2("+i.slice(-2).join()+")",s="getChannel(getSource("+i.join()+"), "+a+")",u=`
result.x = `+s+`;
if (++`+r[this.rank-1]+" < "+t[this.rank-1]+`) {
++`+i[this.rank-1]+`;
result.y = `+s+`;
--`+i[this.rank-1]+`;
}
`,l=this.rank===1?"":`
--`+r[this.rank-1]+`;
if (++`+r[this.rank-2]+" < "+t[this.rank-2]+`) {
++`+i[this.rank-2]+`;
result.z = `+s+`;
if (++`+r[this.rank-1]+" < "+t[this.rank-1]+`) {
++`+i[this.rank-1]+`;
result.w = `+s+`;
}
}
`,d=this.rank<=4?`sourceLoc = coords +
`+e+"("+t.map(function(A,I){return"start["+I+"]"}).join()+");":t.map(function(A,I){return i[I]+" = "+r[I]+" + start["+I+"];"}).join(`
`);this.userCode=`
uniform int start[`+this.rank+`];
void main() {
`+e+` coords = getOutputCoords();
`+e+` sourceLoc;
`+d+`
vec4 result = vec4(0.);
`+u+`
`+l+`
setOutput(result);
}
`}return n.prototype.getCustomSetupFunc=function(t){var e=this;if(t.length!==this.rank)throw Error("The rank ("+this.rank+") of the program must match the length of start ("+t.length+")");return function(r,i){e.startLoc==null&&(e.startLoc=r.getUniformLocationNoThrow(i,"start"),e.startLoc==null)||r.gl.uniform1iv(e.startLoc,t)}},n}(),kh=function(n,t,e){this.variableNames=["x"],this.outputShape=e;var r=e.length,i=cn(e.length),a=cn(e.length),s="";if(r===1)s="coords * strides + begin";else{var u=0;s=e.map(function(l,d){return u++,e.length===1?"coords * strides["+d+"] + begin["+d+"]":"coords["+(u-1)+"] * strides["+d+"] + begin["+d+"]"}).join(",")}this.userCode=`
`+i+" begin = "+i+"("+n+`);
`+i+" strides = "+i+"("+t+`);
void main() {
`+a+` coords = getOutputCoords();
setOutput(getX(`+s+`));
}
`},jh=function(){function n(t){this.gpgpu=t,this.numUsedTextures=0,this.numFreeTextures=0,this.freeTextures={},this.logEnabled=!1,this.usedTextures={}}return n.prototype.acquireTexture=function(t,e,r){var i,a=uc(e,r),s=lc(t,a,r);if(s in this.freeTextures||(this.freeTextures[s]=[]),s in this.usedTextures||(this.usedTextures[s]=[]),this.freeTextures[s].length>0){this.numFreeTextures--,this.numUsedTextures++,this.log();var u=this.freeTextures[s].shift();return this.usedTextures[s].push(u),u}return this.numUsedTextures++,this.log(),a===Ye.PACKED_2X2_FLOAT32?i=this.gpgpu.createPackedMatrixTexture(t[0],t[1]):a===Ye.PACKED_2X2_FLOAT16?i=this.gpgpu.createFloat16PackedMatrixTexture(t[0],t[1]):a===Ye.UNPACKED_FLOAT32?i=this.gpgpu.createFloat32MatrixTexture(t[0],t[1]):a===Ye.UNPACKED_FLOAT16?i=this.gpgpu.createFloat16MatrixTexture(t[0],t[1]):a===Ye.PACKED_4X1_UNSIGNED_BYTE&&(i=this.gpgpu.createUnsignedBytesMatrixTexture(t[0],t[1])),this.usedTextures[s].push(i),i},n.prototype.releaseTexture=function(t,e,r,i){if(this.freeTextures!=null){var a=lc(e,uc(r,i),i);a in this.freeTextures||(this.freeTextures[a]=[]),this.freeTextures[a].push(t),this.numFreeTextures++,this.numUsedTextures--;var s=this.usedTextures[a],u=s.indexOf(t);if(u<0)throw new Error("Cannot release a texture that was never provided by this texture manager");s.splice(u,1),this.log()}},n.prototype.log=function(){if(this.logEnabled){var t=this.numFreeTextures+this.numUsedTextures;console.log("Free/Used",this.numFreeTextures+" / "+this.numUsedTextures,"("+t+")")}},n.prototype.getNumUsedTextures=function(){return this.numUsedTextures},n.prototype.getNumFreeTextures=function(){return this.numFreeTextures},n.prototype.dispose=function(){var t=this;if(this.freeTextures!=null){for(var e in this.freeTextures)this.freeTextures[e].forEach(function(r){t.gpgpu.deleteMatrixTexture(r)});for(var e in this.usedTextures)this.usedTextures[e].forEach(function(i){t.gpgpu.deleteMatrixTexture(i)});this.freeTextures=null,this.usedTextures=null,this.numUsedTextures=0,this.numFreeTextures=0}},n}();function uc(n,t){if(n===Ge.UPLOAD)return Ye.PACKED_2X2_FLOAT32;if(n===Ge.RENDER||n==null)return function(e){return P().getBool("WEBGL_RENDER_FLOAT32_ENABLED")?e?Ye.PACKED_2X2_FLOAT32:Ye.UNPACKED_FLOAT32:e?Ye.PACKED_2X2_FLOAT16:Ye.UNPACKED_FLOAT16}(t);if(n===Ge.DOWNLOAD||n===Ge.PIXELS)return Ye.PACKED_4X1_UNSIGNED_BYTE;throw new Error("Unknown logical texture type "+n)}function lc(n,t,e){return n[0]+"_"+n[1]+"_"+t+"_"+e}var Dh=function(n,t){this.variableNames=["A"];for(var e=new Array(n.length),r=0;r<e.length;r++)e[r]=n[r]*t[r];this.outputShape=e,this.rank=e.length;var i=cn(this.rank),a=function(s){var u=s.length;if(u>5)throw Error("Tile for rank "+u+" is not yet supported");if(u===1)return"imod(resRC, "+s[0]+")";for(var l=["resRC.x","resRC.y","resRC.z","resRC.w","resRC.u"],d=[],A=0;A<s.length;A++)d.push("imod("+l[A]+", "+s[A]+")");return d.join()}(n);this.userCode=`
void main() {
`+i+` resRC = getOutputCoords();
setOutput(getA(`+a+`));
}
`},Ph=function(n,t){this.variableNames=["A"];for(var e=new Array(n.length),r=0;r<e.length;r++)e[r]=n[t[r]];this.outputShape=e,this.rank=e.length;var i=cn(this.rank),a=function(s){var u=s.length;if(u>6)throw Error("Transpose for rank "+u+" is not yet supported");for(var l=["resRC.x","resRC.y","resRC.z","resRC.w","resRC.u","resRC.v"],d=new Array(u),A=0;A<s.length;A++)d[s[A]]=l[A];return d.join()}(t);this.userCode=`
void main() {
`+i+` resRC = getOutputCoords();
setOutput(getA(`+a+`));
}
`},Bh=function(n,t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0;for(var e=new Array(n.length),r=0;r<e.length;r++)e[r]=n[t[r]];if(this.outputShape=e,this.rank=e.length,this.rank>6)throw Error("Packed transpose for rank "+this.rank+" is not yet supported.");var i=cn(this.rank),a=jl("rc",this.rank),s=new Array(this.rank);for(r=0;r<t.length;r++)s[t[r]]=a[r];var u="vec2("+s.slice(-2).join()+")",l="++"+a[this.rank-1]+" < "+e[this.rank-1],d="getChannel(getA("+s.join()+"), "+u+")";this.userCode=`
void main() {
`+i+` rc = getOutputCoords();
vec4 result = vec4(0.);
result[0] = `+d+`;
if(`+l+`) {
result[1] = `+d+`;
}
--`+a[this.rank-1]+`;
if(++`+a[this.rank-2]+" < "+e[this.rank-2]+`) {
result[2] = `+d+`;
if(`+l+`) {
result[3] = `+d+`;
}
}
setOutput(result);
}
`},Fs=1.7580993408473768,Ls=1.0507009873554805,gr=function(n,t){this.variableNames=["A"],this.outputShape=n,this.userCode=`
float unaryOperation(float x) {
`+t+`
}
void main() {
float x = getAAtOutCoords();
float y = unaryOperation(x);
setOutput(y);
}
`},Oi="if (isnan(x)) return x;",Nh="return x;",cc="return abs(x);",fc=Oi+`
return (x < 0.0) ? 0.0 : x;
`,dc=Oi+`
return (x < 0.0) ? 0.0 : min(6.0, x);
`,pc="return (x >= 0.0) ? x : (exp(x) - 1.0);",Mh=`
// Stable and Attracting Fixed Point (0, 1) for Normalized Weights.
// see: https://arxiv.org/abs/1706.02515
float scaleAlpha = `+Fs+`;
float scale = `+Ls+`;
return (x >= 0.0) ? scale * x : scaleAlpha * (exp(x) - 1.0);
`,hc="return -x;",vc="return ceil(x);",mc="return floor(x);",gc="return exp(x);",yc="return exp(x) - 1.0;",_h=Oi+`
return sin(x);
`,Fh=Oi+`
return cos(x);
`,Lh=Oi+`
if (abs(x) > 1.) {
return NAN;
}
return asin(x);
`,Uh=Oi+`
if (abs(x) > 1.) {
return NAN;
}
return acos(x);
`,Wh=Oi+`
return atan(x);
`,zh=Oi+"return log(x + sqrt(x * x + 1.0));",Vh=Oi+`
if (x < 1.0) return NAN;
return log(x + sqrt(x * x - 1.0));`,Hh=Oi+`
if ((x < -1.0) || (x > 1.0)) return NAN;
return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Mo="return x;",Gh="return x;",bc=`
vec4 result = x * vec4(greaterThanEqual(x, vec4(0.0)));
bvec4 isNaN = isnan(x);
result.r = isNaN.r ? x.r : result.r;
result.g = isNaN.g ? x.g : result.g;
result.b = isNaN.b ? x.b : result.b;
result.a = isNaN.a ? x.a : result.a;
return result;
`,wc=`
vec4 result = min(x, vec4(6.)) * vec4(greaterThanEqual(x, vec4(0.0)));
bvec4 isNaN = isnan(x);
result.r = isNaN.r ? x.r : result.r;
result.g = isNaN.g ? x.g : result.g;
result.b = isNaN.b ? x.b : result.b;
result.a = isNaN.a ? x.a : result.a;
return result;
`,Ac=`
vec4 result;
result.r = (x.r >= 0.0) ? x.r : (exp(x.r) - 1.0);
result.g = (x.g >= 0.0) ? x.g : (exp(x.g) - 1.0);
result.b = (x.b >= 0.0) ? x.b : (exp(x.b) - 1.0);
result.a = (x.a >= 0.0) ? x.a : (exp(x.a) - 1.0);
return result;
`,uo=function(n,t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=n,this.userCode=`
vec4 unaryOperation(vec4 x) {
`+t+`
}
void main() {
vec4 x = getAAtOutCoords();
vec4 y = unaryOperation(x);
setOutput(y);
}
`},Qh=function(n){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!1,this.outputShape=n;var t=n.length,e=ci("rc",t),r=cn(t),i=function(u,l){if(u===1)return"rc";for(var d="",A=0;A<u;A++)d+=l[A],A<u-1&&(d+=",");return d}(t,e),a=e.slice(-2),s=t<=1?"rc":"vec2("+a.join(",")+")";this.userCode=`
void main() {
`+r+` rc = getOutputCoords();
vec4 packedInput = getA(`+i+`);
setOutput(getChannel(packedInput, `+s+`));
}
`},_o={};function Fo(n,t){if(t===void 0&&(t=!1),n==="linear")return t?Gh:Nh;if(n==="relu")return t?bc:fc;if(n==="elu")return t?Ac:pc;if(n==="relu6")return t?wc:dc;if(n==="prelu")return t?_l:Ml;throw new Error("Activation "+n+" has not been implemented for the WebGL backend.")}var Xh=600,xc=function(n){function t(e){var r,i=n.call(this)||this;if(i.pendingRead=new WeakMap,i.pendingDisposal=new WeakSet,i.dataRefCount=new WeakMap,i.numBytesInGPU=0,i.uploadWaitMs=0,i.downloadWaitMs=0,i.warnedAboutMemory=!1,i.pendingDeletes=0,i.disposed=!1,!P().getBool("HAS_WEBGL"))throw new Error("WebGL is not supported on this device");if(e==null){var a=ht(P().getNumber("WEBGL_VERSION"));i.binaryCache=((r=P().getNumber("WEBGL_VERSION"))in _o||(_o[r]={}),_o[r]),i.gpgpu=new ac(a),i.canvas=a.canvas,i.gpgpuCreatedLocally=!0}else i.gpgpu=e,i.binaryCache={},i.gpgpuCreatedLocally=!1,i.canvas=e.gl.canvas;return i.textureManager=new jh(i.gpgpu),i.numMBBeforeWarning=P().global.screen==null?1024:P().global.screen.height*P().global.screen.width*window.devicePixelRatio*Xh/1024/1024,i.texData=new El(i,We),i}return S(t,n),t.prototype.numDataIds=function(){return this.texData.numDataIds()+(this.cpuBackend?this.cpuBackend.numDataIds():0)-this.pendingDeletes},t.prototype.write=function(e,r,i){if(P().getBool("DEBUG")&&this.checkNumericalProblems(e),i==="complex64"&&e!=null)throw new Error("Cannot write to a complex64 dtype. Please use tf.complex(real, imag).");var a={};return this.texData.set(a,{shape:r,dtype:i,values:e,usage:Ge.UPLOAD}),a},t.prototype.move=function(e,r,i,a){if(P().getBool("DEBUG")&&this.checkNumericalProblems(r),a==="complex64")throw new Error("Cannot write to a complex64 dtype. Please use tf.complex(real, imag).");this.texData.set(e,{shape:i,dtype:a,values:r,usage:Ge.UPLOAD})},t.prototype.readSync=function(e){var r=this.texData.get(e),i=r.values,a=r.dtype,s=r.complexTensors,u=r.slice,l=r.shape,d=r.isPacked;if(u!=null){var A=void 0;A=d?new uo(l,Mo):new gr(l,Mo);var I=this.runWebGLProgram(A,[{dataId:e,shape:l,dtype:a}],a),O=this.readSync(I.dataId);return this.disposeData(I.dataId),O}if(i!=null)return this.convertAndCacheOnCPU(e);if(a==="string")return i;var z,re,oe=this.activeTimers!=null;return oe&&(z=qe()),a==="complex64"?re=Ts(s.real.dataSync(),s.imag.dataSync()):re=this.getValuesFromTexture(e),oe&&(this.downloadWaitMs+=qe()-z),this.convertAndCacheOnCPU(e,re)},t.prototype.read=function(e){return C(this,void 0,void 0,function(){var r,i,a,s,u,l,d,A,I,O,z,re,oe,ae,se,be,Ae,me,Ce,Oe,Le,Ue;return E(this,function(Ne){switch(Ne.label){case 0:if(this.pendingRead.has(e))return r=this.pendingRead.get(e),[2,new Promise(function(Fe){return r.push(Fe)})];if(i=this.texData.get(e),a=i.values,s=i.shape,u=i.slice,l=i.dtype,d=i.complexTensors,A=i.isPacked,u!=null)return I=void 0,I=A?new uo(s,Mo):new gr(s,Mo),O=this.runWebGLProgram(I,[{dataId:e,shape:s,dtype:l}],l),z=this.read(O.dataId),this.disposeData(O.dataId),[2,z];if(a!=null)return[2,this.convertAndCacheOnCPU(e)];if(!P().getBool("WEBGL_DOWNLOAD_FLOAT_ENABLED")&&P().getNumber("WEBGL_VERSION")===2)throw new Error("tensor.data() with WEBGL_DOWNLOAD_FLOAT_ENABLED=false and WEBGL_VERSION=2 not yet supported.");return re=null,l!=="complex64"&&P().get("WEBGL_BUFFER_SUPPORTED")&&(oe=this.decode(e),ae=this.texData.get(oe.dataId),re=(Ue=this.gpgpu).createBufferFromTexture.apply(Ue,[ae.texture].concat(it(s)))),this.pendingRead.set(e,[]),l==="complex64"?[3,2]:[4,this.gpgpu.createAndWaitForFence()];case 1:Ne.sent(),Ne.label=2;case 2:return l!=="complex64"?[3,4]:[4,Promise.all([d.real.data(),d.imag.data()])];case 3:return be=Ne.sent(),Ae=be[0],me=be[1],se=Ts(Ae,me),[3,5];case 4:re==null?se=this.getValuesFromTexture(e):(Ce=ce(s),se=this.gpgpu.downloadFloat32MatrixFromBuffer(re,Ce)),Ne.label=5;case 5:return oe!=null&&this.disposeData(oe.dataId),Oe=this.convertAndCacheOnCPU(e,se),Le=this.pendingRead.get(e),this.pendingRead.delete(e),Le.forEach(function(Fe){return Fe(Oe)}),this.pendingDisposal.has(e)&&(this.pendingDisposal.delete(e),this.disposeData(e),this.pendingDeletes--),[2,Oe]}})})},t.prototype.checkNumericalProblems=function(e){if(e!=null)for(var r=0;r<e.length;r++){var i=e[r];if(!dr(i))throw P().getBool("WEBGL_RENDER_FLOAT32_CAPABLE")?Error("The value "+i+" cannot be represented with your current settings. Consider enabling float32 rendering: 'tf.env().set('WEBGL_RENDER_FLOAT32_ENABLED', true);'"):Error("The value "+i+" cannot be represented on this device.")}},t.prototype.getValuesFromTexture=function(e){var r,i=this.texData.get(e),a=i.shape,s=i.dtype,u=i.isPacked,l=ce(a);if(P().getBool("WEBGL_DOWNLOAD_FLOAT_ENABLED")){var d=this.decode(e),A=this.texData.get(d.dataId),I=(r=this.gpgpu).downloadMatrixFromPackedTexture.apply(r,[A.texture].concat(it(a))).subarray(0,l);return this.disposeData(d.dataId),I}var O=P().getBool("WEBGL_PACK")&&u===!0,z=O?yn(a):a,re=O?new Yp(z):new Jp(z),oe=this.runWebGLProgram(re,[{shape:z,dtype:s,dataId:e}],"float32"),ae=this.texData.get(oe.dataId),se=this.gpgpu.downloadByteEncodedFloatMatrixFromOutputTexture(ae.texture,ae.texShape[0],ae.texShape[1]).subarray(0,l);return this.disposeData(oe.dataId),se},t.prototype.time=function(e){return C(this,void 0,void 0,function(){var r,i,a,s,u,l,d;return E(this,function(A){switch(A.label){case 0:return r=this.activeTimers,i=[],a=!1,this.programTimersStack==null?(this.programTimersStack=i,a=!0):this.activeTimers.push(i),this.activeTimers=i,e(),s=xe(this.activeTimers.map(function(I){return I.query})).filter(function(I){return I!=null}),u=xe(this.activeTimers.map(function(I){return I.name})).filter(function(I){return I!=null}),this.activeTimers=r,a&&(this.programTimersStack=null),l={uploadWaitMs:this.uploadWaitMs,downloadWaitMs:this.downloadWaitMs,kernelMs:null,wallMs:null},P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?[4,Promise.all(s)]:[3,2];case 1:return d=A.sent(),l.kernelMs=Ie(d),l.getExtraProfileInfo=function(){return d.map(function(I,O){return{name:u[O],ms:I}}).map(function(I){return I.name+": "+I.ms}).join(", ")},[3,3];case 2:l.kernelMs={error:"WebGL query timers are not supported in this environment."},A.label=3;case 3:return this.uploadWaitMs=0,this.downloadWaitMs=0,[2,l]}})})},t.prototype.memory=function(){return{unreliable:!1,numBytesInGPU:this.numBytesInGPU}},t.prototype.startTimer=function(){return P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?this.gpgpu.beginQuery():{startMs:qe(),endMs:null}},t.prototype.endTimer=function(e){return P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?(this.gpgpu.endQuery(),e):(e.endMs=qe(),e)},t.prototype.getQueryTime=function(e){return C(this,void 0,void 0,function(){var r;return E(this,function(i){return P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?[2,this.gpgpu.waitForQueryAndGetTime(e)]:[2,(r=e).endMs-r.startMs]})})},t.prototype.disposeData=function(e){if(!this.pendingDisposal.has(e)){if(this.pendingRead.has(e))return this.pendingDisposal.add(e),void this.pendingDeletes++;if(this.texData.has(e)){this.releaseGPUData(e);var r=this.texData.get(e).complexTensors;r!=null&&(r.real.dispose(),r.imag.dispose()),this.texData.delete(e)}}},t.prototype.releaseGPUData=function(e){var r=this.texData.get(e),i=r.texture,a=r.dtype,s=r.texShape,u=r.usage,l=r.isPacked,d=r.slice,A=d&&d.origDataId||e,I=this.dataRefCount.get(A);I>1?this.dataRefCount.set(A,I-1):(this.dataRefCount.delete(A),i!=null&&(this.numBytesInGPU-=this.computeBytes(s,a),this.textureManager.releaseTexture(i,s,u,l)));var O=this.texData.get(e);O.texture=null,O.texShape=null,O.isPacked=!1,O.slice=null},t.prototype.getTexture=function(e){return this.uploadToGPU(e),this.texData.get(e).texture},t.prototype.getDataInfo=function(e){return this.texData.get(e)},t.prototype.getCPUBackend=function(){return P().getBool("WEBGL_CPU_FORWARD")?(this.cpuBackend==null&&(this.cpuBackend=We.findBackend("cpu")),this.cpuBackend):null},t.prototype.shouldExecuteOnCPU=function(e,r){var i=this;return r===void 0&&(r=128),this.getCPUBackend()!=null&&e.every(function(a){return i.texData.get(a.dataId).texture==null&&a.size<r})},t.prototype.getGPGPUContext=function(){return this.gpgpu},t.prototype.complex=function(e,r){var i=this.makeOutput(e.shape,"complex64");return this.texData.get(i.dataId).complexTensors={real:We.keep(e.clone()),imag:We.keep(r.clone())},i},t.prototype.real=function(e){return this.texData.get(e.dataId).complexTensors.real.clone()},t.prototype.imag=function(e){return this.texData.get(e.dataId).complexTensors.imag.clone()},t.prototype.slice=function(e,r,i){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.slice(e,r,i);if(ce(i)===0)return Sn([],i,e.dtype);var a=this.texData.get(e.dataId).isPacked,s=As(e.shape,r,i);if(a||!s){var u=P().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new Oh(i):new Rh(i),l=u.getCustomSetupFunc(r);return this.compileAndRun(u,[e],null,l)}return this.uploadToGPU(e.dataId),this.shallowSlice(e,r,i)},t.prototype.shallowSlice=function(e,r,i){var a=this.texData.get(e.dataId),s=this.makeOutput(i,e.dtype),u=this.texData.get(s.dataId);Object.assign(u,a),u.shape=i,u.dtype=e.dtype;var l=xs(r,e.strides);a.slice&&(l+=a.slice.flatOffset),u.slice={flatOffset:l,origDataId:a.slice&&a.slice.origDataId||e.dataId};var d=this.dataRefCount.get(u.slice.origDataId)||1;return this.dataRefCount.set(u.slice.origDataId,d+1),s},t.prototype.stridedSlice=function(e,r,i,a){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.stridedSlice(e,r,i,a);var s=Oo(r,i,a);if(s.some(function(l){return l===0}))return Sn([],s);var u=new kh(r,a,s);return this.compileAndRun(u,[e])},t.prototype.reverse=function(e,r){var i=P().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new Sh(e.shape,r):new Ch(e.shape,r);return this.compileAndRun(i,[e])},t.prototype.concat=function(e,r){if(e[0].dtype==="complex64"){var i=e.map(function(z){return $n(z)}),a=e.map(function(z){return vi(z)});return Cn(this.concat(i,r),this.concat(a,r))}if(this.shouldExecuteOnCPU(e))return this.cpuBackend.concat(e,r);if(e.length===1)return e[0];if(e.length>P().getNumber("WEBGL_MAX_TEXTURES_IN_SHADER")){var s=Math.floor(e.length/2),u=this.concat(e.slice(0,s),r),l=this.concat(e.slice(s),r);return this.concat([u,l],r)}if(P().getBool("WEBGL_PACK_ARRAY_OPERATIONS")&&e[0].rank>1){var d=new Mp(e.map(function(z){return z.shape}),r);return this.compileAndRun(d,e)}var A=nn(e.map(function(z){return z.shape}),r),I=e.map(function(z){return z.as2D(-1,ce(z.shape.slice(r)))}),O=new Np(I.map(function(z){return z.shape}));return this.compileAndRun(O,I).reshape(A)},t.prototype.neg=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.neg(e);if(P().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,hc,e.dtype);var r=new gr(e.shape,hc);return this.compileAndRun(r,[e])},t.prototype.batchMatMul=function(e,r,i,a){var s=i?e.shape[2]:e.shape[1],u=a?r.shape[1]:r.shape[2],l=i?e.shape[1]:e.shape[2],d=e.shape[0];if((s===1||u===1)&&l>1e3){i&&(e=e.transpose([0,2,1])),a&&(r=r.transpose([0,2,1]));var A=u===1?e:e.as3D(d,l,1),I=u===1?2:1,O=u===1?r.as3D(d,1,l):r;return this.multiply(A,O).sum(I,!0)}var z=Tt(e.dtype,r.dtype),re=new Bs(e.shape,[d,s,u],i,a);return this.compileAndRun(re,[e,r],z)},t.prototype.fusedBatchMatMul=function(e){var r=e.a,i=e.b,a=e.transposeA,s=e.transposeB,u=e.bias,l=e.activation,d=e.preluActivationWeights,A=a?r.shape[2]:r.shape[1],I=s?i.shape[1]:i.shape[2],O=r.shape[0],z=Tt(r.dtype,i.dtype),re=u!=null,oe=d!=null,ae=l?Fo(l,!0):null,se=new Bs(r.shape,[O,A,I],a,s,re,ae,oe),be=[r,i];return u&&be.push(u),d&&be.push(d),this.compileAndRun(se,be,z)},t.prototype.multiply=function(e,r){if(e.dtype==="complex64"){var i=this.texData.get(e.dataId),a=this.texData.get(r.dataId),s=new Bl(kp,e.shape,r.shape),u=new Bl(jp,e.shape,r.shape),l=[this.makeComplexComponentTensorInfo(e,i.complexTensors.real),this.makeComplexComponentTensorInfo(e,i.complexTensors.imag),this.makeComplexComponentTensorInfo(r,a.complexTensors.real),this.makeComplexComponentTensorInfo(r,a.complexTensors.imag)],d=this.compileAndRun(s,l),A=this.compileAndRun(u,l),I=this.complex(d,A);return d.dispose(),A.dispose(),I}if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.multiply(e,r);if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,Nl,e.dtype);var O=new In(Nl,e.shape,r.shape);return this.compileAndRun(O,[e,r],e.dtype)},t.prototype.batchNormalization=function(e,r,i,a,s,u){var l=[e,r,i],d=null;u!=null&&(d=u.shape,l.push(u));var A=null;if(s!=null&&(A=s.shape,l.push(s)),P().getBool("WEBGL_PACK_NORMALIZATION")){var I=new Op(e.shape,r.shape,i.shape,d,A,a);return this.compileAndRun(I,l)}var O=new Rp(e.shape,r.shape,i.shape,d,A,a);return this.compileAndRun(O,l)},t.prototype.localResponseNormalization4D=function(e,r,i,a,s){var u=P().getBool("WEBGL_PACK_NORMALIZATION")?new lh(e.shape,r,i,a,s):new sh(e.shape,r,i,a,s);return this.compileAndRun(u,[e])},t.prototype.LRNGrad=function(e,r,i,a,s,u,l){var d=new uh(r.shape,a,s,u,l);return this.compileAndRun(d,[r,i,e])},t.prototype.tile=function(e,r){if(e.dtype==="string"){var i=this.readSync(e.dataId).map(function(s){return Qe(s)});return Ol(cr(e.shape,e.dtype,i),r)}var a=new Dh(e.shape,r);return this.compileAndRun(a,[e])},t.prototype.pad=function(e,r,i){var a=P().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new mh(e.shape,r,i):new vh(e.shape,r,i);return this.compileAndRun(a,[e])},t.prototype.transpose=function(e,r){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.transpose(e,r);var i=P().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new Bh(e.shape,r):new Ph(e.shape,r);return this.compileAndRun(i,[e])},t.prototype.gather=function(e,r,i){if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.gather(e,r,i);var a=new nh(e.shape,r.size,i);return this.compileAndRun(a,[e,r])},t.prototype.batchToSpaceND=function(e,r,i){q(e.rank<=4,function(){return"batchToSpaceND for rank > 4 with a WebGL backend not implemented yet"});var a=r.reduce(function(I,O){return I*O}),s=So(e.shape,r,a),u=Io(s.length,r.length),l=To(e.shape,r,a),d=ml(i,r.length),A=gl(l,i,r.length);return e.reshape(s).transpose(u).reshape(l).slice(d,A)},t.prototype.spaceToBatchND=function(e,r,i){q(e.rank<=4,function(){return"spaceToBatchND for rank > 4 with a WebGL backend not implemented yet"});var a=r.reduce(function(O,z){return O*z}),s=[[0,0]];s.push.apply(s,i);for(var u=1+r.length;u<e.shape.length;++u)s.push([0,0]);var l=e.pad(s),d=So(l.shape,r,a,!1),A=Io(d.length,r.length,!1),I=To(l.shape,r,a,!1);return l.reshape(d).transpose(A).reshape(I)},t.prototype.reduce=function(e,r,i){var a=e.shape[0],s=e.shape[1],u=Ro(s),l=new gh({windowSize:u,inSize:s,batchSize:a},r),d=this.compileAndRun(l,[e],i);return d.shape[1]===1?d:this.reduce(d,r,i)},t.prototype.argReduce=function(e,r,i){i===void 0&&(i=null);var a=e.shape[0],s=e.shape[1];i!=null&&(a=i.shape[0],s=i.shape[1]);var u=Ro(s),l=new bp({windowSize:u,inSize:s,batchSize:a},r,i==null),d=[e];i!=null&&d.push(i);var A=this.compileAndRun(l,d,"int32");return A.shape[1]===1?A:this.argReduce(e,r,A)},t.prototype.argReducePacked=function(e,r,i){i===void 0&&(i=null);var a=i!=null?i.shape:e.shape,s=Ro(a[a.length-1]),u=new Sp(a,s,r,i==null),l=i==null?[e]:[e,i],d=this.compileAndRun(u,l,"int32");return d.rank===e.rank?this.argReducePacked(e,r,d):d},t.prototype.sum=function(e,r){zn("sum",r,e.rank);var i=En(e.shape,r),a=i[0],s=ce(i[1]),u=e.as2D(-1,s),l=Mr(e.dtype);return this.reduce(u,"sum",l).reshape(a)},t.prototype.prod=function(e,r){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.prod(e,r);var i=En(e.shape,r),a=i[0],s=ce(i[1]),u=e.as2D(-1,s),l=Mr(e.dtype);return this.reduce(u,"prod",l).reshape(a)},t.prototype.unsortedSegmentSum=function(e,r,i){var a=0,s=oi([a],e.rank),u=e;s!=null&&(u=e.transpose(s),a=Ht(1,e.rank)[0]);var l=function(z,re,oe){for(var ae=[],se=z.length,be=0;be<se;be++)be!==re?ae.push(z[be]):ae.push(oe);return ae}(u.shape,a,i),d=ce([u.shape[a]]),A=u.as2D(-1,d),I=Mr(e.dtype),O=this.segOpCompute(A,"unsortedSegmentSum",r,I,i).reshape(l);return s!=null&&(O=O.transpose(_t(s))),O},t.prototype.segOpCompute=function(e,r,i,a,s){var u=e.shape[0],l=e.shape[1],d=function(O,z){var re,oe=!1;for(O<=bs?(re=O,oe=!0):re=Me(O,Math.floor(Math.sqrt(O)));!oe;)re>z||re===O?oe=!0:re=Me(O,re+1);return re}(l,s),A=new Ih({windowSize:d,inSize:l,batchSize:u,numSegments:s},r),I=this.compileAndRun(A,[e,i],a);return I.shape[1]===s?I:(i=Eo(0,s).tile([l/d]),this.segOpCompute(I,r,i,a,s))},t.prototype.argMinMaxReduce=function(e,r,i){var a=[r];if(zn("arg"+i.charAt(0).toUpperCase()+i.slice(1),a,e.rank),!P().getBool("WEBGL_PACK_REDUCE")||e.rank<=2){var s=En(e.shape,a),u=s[0],l=ce(s[1]),d=e.as2D(-1,l);return this.argReduce(d,i).reshape(u)}return this.argReducePacked(e,i)},t.prototype.argMin=function(e,r){return this.argMinMaxReduce(e,r,"min")},t.prototype.argMax=function(e,r){return this.argMinMaxReduce(e,r,"max")},t.prototype.cumsum=function(e,r,i,a){if(r!==e.rank-1)throw new Error("WebGL cumsum shader expects an inner-most axis="+(e.rank-1)+" but got axis="+r);var s=new Gp(e.shape,i,a);return this.compileAndRun(s,[e])},t.prototype.equal=function(e,r){if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
return vec4(equal(a, b));
`,"bool");var i=new In("return float(a == b);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},t.prototype.notEqual=function(e,r){if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
return vec4(notEqual(a, b));
`,"bool");var i=new In("return float(a != b);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},t.prototype.less=function(e,r){if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.less(e,r);if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
return vec4(lessThan(a, b));
`,"bool");var i=new In("return float(a < b);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},t.prototype.lessEqual=function(e,r){if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
return vec4(lessThanEqual(a, b));
`,"bool");var i=new In("return float(a <= b);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},t.prototype.greater=function(e,r){if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.greater(e,r);if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
return vec4(greaterThan(a, b));
`,"bool");var i=new In("return float(a > b);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},t.prototype.greaterEqual=function(e,r){if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
return vec4(greaterThanEqual(a, b));
`,"bool");var i=new In("return float(a >= b);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},t.prototype.logicalNot=function(e){var r=new gr(e.shape,"return float(!(x >= 1.0));");return this.compileAndRun(r,[e])},t.prototype.logicalAnd=function(e,r){if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
return vec4(
vec4(greaterThanEqual(a, vec4(1.0))) *
vec4(greaterThanEqual(b, vec4(1.0))));
`,"bool");var i=new In("return float(a >= 1.0 && b >= 1.0);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},t.prototype.logicalOr=function(e,r){if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
return min(
vec4(greaterThanEqual(a, vec4(1.0))) +
vec4(greaterThanEqual(b, vec4(1.0))),
vec4(1.0));
`,"bool");var i=new In("return float(a >= 1.0 || b >= 1.0);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},t.prototype.select=function(e,r,i){var a=new Th(e.rank,r.shape,r.rank);return this.compileAndRun(a,[e,r,i],Tt(r.dtype,i.dtype))},t.prototype.where=function(e){Yn("tf.where() in webgl locks the UI thread. Call tf.whereAsync() instead");var r=e.dataSync();return ks(e.shape,r)},t.prototype.topk=function(e,r,i){return kl(e.dataSync(),e.shape,e.dtype,r)},t.prototype.min=function(e,r){zn("min",r,e.rank);var i=En(e.shape,r),a=i[0],s=ce(i[1]),u=e.as2D(-1,s);return this.reduce(u,"min",u.dtype).reshape(a)},t.prototype.minimum=function(e,r){if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.minimum(e,r);var i=P().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Xi(`
vec4 result = vec4(min(a, b));
vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0));
result.r = isNaN.r > 0. ? NAN : result.r;
result.g = isNaN.g > 0. ? NAN : result.g;
result.b = isNaN.b > 0. ? NAN : result.b;
result.a = isNaN.a > 0. ? NAN : result.a;
return result;
`,e.shape,r.shape):new In(`
if (isnan(a)) return a;
if (isnan(b)) return b;
return min(a, b);
`,e.shape,r.shape);return this.compileAndRun(i,[e,r])},t.prototype.mod=function(e,r){var i=P().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Xi(`
vec4 result = mod(a, b);
vec4 isNaN = vec4(equal(b, vec4(0.0)));
result.r = isNaN.r > 0. ? NAN : result.r;
result.g = isNaN.g > 0. ? NAN : result.g;
result.b = isNaN.b > 0. ? NAN : result.b;
result.a = isNaN.a > 0. ? NAN : result.a;
return result;
`,e.shape,r.shape):new In(`if (b == 0.0) return NAN;
return mod(a, b);`,e.shape,r.shape);return this.compileAndRun(i,[e,r])},t.prototype.max=function(e,r){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.max(e,r);zn("max",r,e.rank);var i=En(e.shape,r),a=i[0],s=ce(i[1]),u=e.as2D(-1,s);return this.reduce(u,"max",u.dtype).reshape(a)},t.prototype.maximum=function(e,r){if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.maximum(e,r);var i=P().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Xi(`
vec4 result = vec4(max(a, b));
vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0));
result.r = isNaN.r > 0. ? NAN : result.r;
result.g = isNaN.g > 0. ? NAN : result.g;
result.b = isNaN.b > 0. ? NAN : result.b;
result.a = isNaN.a > 0. ? NAN : result.a;
return result;
`,e.shape,r.shape):new In(`
if (isnan(a)) return a;
if (isnan(b)) return b;
return max(a, b);
`,e.shape,r.shape);return this.compileAndRun(i,[e,r])},t.prototype.all=function(e,r){zn("all",r,e.rank);var i=En(e.shape,r),a=i[0],s=ce(i[1]),u=e.as2D(-1,s);return this.reduce(u,"all",u.dtype).reshape(a)},t.prototype.any=function(e,r){zn("any",r,e.rank);var i=En(e.shape,r),a=i[0],s=ce(i[1]),u=e.as2D(-1,s);return this.reduce(u,"any",u.dtype).reshape(a)},t.prototype.realDivide=function(e,r){if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
// vec4 one = vec4(equal(a, b));
// return one + (vec4(1.0) - one) * a / b;
vec4 result = a / b;
if(a.x == b.x) {
result.x = 1.;
}
if(a.y == b.y) {
result.y = 1.;
}
if(a.z == b.z) {
result.z = 1.;
}
if(a.w == b.w) {
result.w = 1.;
}
return result;
`,"float32",!0);var i=new In(`
if (a == b) {
return 1.0;
};
return a / b;`,e.shape,r.shape);return this.compileAndRun(i,[e,r],"float32")},t.prototype.floorDiv=function(e,r){if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
ivec4 ia = round(a);
ivec4 ib = round(b);
bvec4 cond = notEqual(ib, ivec4(0));
ivec4 result = ivec4(0);
vec4 s = sign(a) * sign(b);
// Windows (D3D) wants guaranteed non-zero int division at compile-time.
if (cond[0]) {
result[0] = idiv(ia[0], ib[0], s[0]);
}
if (cond[1]) {
result[1] = idiv(ia[1], ib[1], s[1]);
}
if (cond[2]) {
result[2] = idiv(ia[2], ib[2], s[2]);
}
if (cond[3]) {
result[3] = idiv(ia[3], ib[3], s[3]);
}
return vec4(result);
`,"int32");var i=new In(`
float s = sign(a) * sign(b);
int ia = round(a);
int ib = round(b);
if (ib != 0) {
// Windows (D3D) wants guaranteed non-zero int division at compile-time.
return float(idiv(ia, ib, s));
} else {
return NAN;
}
`,e.shape,r.shape);return this.compileAndRun(i,[e,r],"int32")},t.prototype.add=function(e,r){if(e.dtype==="complex64"&&r.dtype==="complex64")return this.complexSeparableBinaryOp(e,r,Ds);if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.add(e,r);var i=Tt(e.dtype,r.dtype);if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,Ds,i);var a=new In(Ds,e.shape,r.shape);return this.compileAndRun(a,[e,r],i)},t.prototype.packedUnaryOp=function(e,r,i){var a=new uo(e.shape,r);return this.compileAndRun(a,[e],i)},t.prototype.packedBinaryOp=function(e,r,i,a,s){s===void 0&&(s=!1);var u=new Xi(i,e.shape,r.shape,s);return this.compileAndRun(u,[e,r],a)},t.prototype.complexSeparableBinaryOp=function(e,r,i){var a=this,s=this.texData.get(e.dataId),u=this.texData.get(r.dataId),l=[[s.complexTensors.real,u.complexTensors.real],[s.complexTensors.imag,u.complexTensors.imag]].map(function(O){var z=O[0],re=O[1],oe=a.makeComplexComponentTensorInfo(e,z),ae=a.makeComplexComponentTensorInfo(r,re),se=new In(i,e.shape,r.shape);return a.compileAndRun(se,[oe,ae],Tt(z.dtype,re.dtype))}),d=l[0],A=l[1],I=this.complex(d,A);return d.dispose(),A.dispose(),I},t.prototype.makeComplexComponentTensorInfo=function(e,r){return{dataId:r.dataId,dtype:r.dtype,shape:e.shape}},t.prototype.addN=function(e){if(e.length===1)return e[0];if(e.length>P().get("WEBGL_MAX_TEXTURES_IN_SHADER")){var r=Math.floor(e.length/2),i=this.addN(e.slice(0,r)),a=this.addN(e.slice(r));return this.addN([i,a])}var s=e.map(function(d){return d.dtype}).reduce(function(d,A){return Tt(d,A)}),u=e.map(function(d){return d.shape}),l=P().getBool("WEBGL_PACK")?new yp(e[0].shape,u):new gp(e[0].shape,u);return this.compileAndRun(l,e,s)},t.prototype.subtract=function(e,r){if(e.dtype==="complex64"&&r.dtype==="complex64")return this.complexSeparableBinaryOp(e,r,Ps);if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.subtract(e,r);var i=Tt(e.dtype,r.dtype);if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,Ps,e.dtype);var a=new In(Ps,e.shape,r.shape);return this.compileAndRun(a,[e,r],i)},t.prototype.pow=function(e,r){var i=P().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Xi(`
// isModRound1 has 1 for components with round(mod(b, 2.0)) == 1, 0 otherwise.
vec4 isModRound1 = vec4(equal(round(mod(b, 2.0)), ivec4(1)));
vec4 multiplier = sign(a) * isModRound1 + (vec4(1.0) - isModRound1);
vec4 result = multiplier * pow(abs(a), b);
// Ensure that a^0 = 1, including 0^0 = 1 as this correspond to TF and JS
bvec4 isExpZero = equal(b, vec4(0.0));
result.r = isExpZero.r ? 1.0 : result.r;
result.g = isExpZero.g ? 1.0 : result.g;
result.b = isExpZero.b ? 1.0 : result.b;
result.a = isExpZero.a ? 1.0 : result.a;
vec4 isNaN = vec4(lessThan(a, vec4(0.0))) * vec4(lessThan(floor(b), b));
result.r = isNaN.r > 0. ? NAN : result.r;
result.g = isNaN.g > 0. ? NAN : result.g;
result.b = isNaN.b > 0. ? NAN : result.b;
result.a = isNaN.a > 0. ? NAN : result.a;
return result;
`,e.shape,r.shape):new In(`
if(a < 0.0 && floor(b) < b){
return NAN;
}
if (b == 0.0) {
return 1.0;
}
return (round(mod(b, 2.0)) != 1) ?
pow(abs(a), b) : sign(a) * pow(abs(a), b);
`,e.shape,r.shape),a=Tt(e.dtype,r.dtype);return this.compileAndRun(i,[e,r],a)},t.prototype.ceil=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.ceil(e);if(P().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,vc,e.dtype);var r=new gr(e.shape,vc);return this.compileAndRun(r,[e])},t.prototype.floor=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.floor(e);if(P().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,mc,e.dtype);var r=new gr(e.shape,mc);return this.compileAndRun(r,[e])},t.prototype.sign=function(e){var r=new gr(e.shape,`
if (isnan(x)) { return 0.0; }
return sign(x);
`);return this.compileAndRun(r,[e])},t.prototype.isNaN=function(e){var r=new gr(e.shape,"return float(isnan(x));");return this.compileAndRun(r,[e],"bool")},t.prototype.isInf=function(e){var r=new gr(e.shape,"return float(isinf(x));");return this.compileAndRun(r,[e],"bool")},t.prototype.isFinite=function(e){var r=new gr(e.shape,"return float(!isnan(x) && !isinf(x));");return this.compileAndRun(r,[e],"bool")},t.prototype.round=function(e){var r=new gr(e.shape,`
// OpenGL ES does not support round function.
// The algorithm is based on banker's rounding.
float base = floor(x);
if ((x - base) < 0.5) {
return floor(x);
} else if ((x - base) > 0.5) {
return ceil(x);
} else {
if (mod(base, 2.0) == 0.0) {
return base;
} else {
return base + 1.0;
}
}
`);return this.compileAndRun(r,[e])},t.prototype.exp=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.exp(e);if(P().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,gc,e.dtype);var r=new gr(e.shape,gc);return this.compileAndRun(r,[e])},t.prototype.expm1=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.expm1(e);if(P().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,yc,e.dtype);var r=new gr(e.shape,yc);return this.compileAndRun(r,[e])},t.prototype.softmax=function(e,r){var i=ye([r],e.shape),a=this.max(e,i),s=Dn(a.shape,i),u=this.subtract(e,a.reshape(s)),l=this.exp(u),d=this.sum(l,i).reshape(s);return this.realDivide(l,d)},t.prototype.log=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.log(e);if(P().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,`
vec4 result = log(x);
vec4 isNaN = vec4(lessThan(x, vec4(0.0)));
result.r = isNaN.r == 1.0 ? NAN : result.r;
result.g = isNaN.g == 1.0 ? NAN : result.g;
result.b = isNaN.b == 1.0 ? NAN : result.b;
result.a = isNaN.a == 1.0 ? NAN : result.a;
return result;
`,e.dtype);var r=new gr(e.shape,`if (x < 0.0) return NAN;
return log(x);`);return this.compileAndRun(r,[e])},t.prototype.log1p=function(e){var r=new gr(e.shape,"return log(1.0 + x);");return this.compileAndRun(r,[e])},t.prototype.sqrt=function(e){var r=new gr(e.shape,"return sqrt(x);");return this.compileAndRun(r,[e])},t.prototype.rsqrt=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.rsqrt(e);var r=new gr(e.shape,"return inversesqrt(x);");return this.compileAndRun(r,[e])},t.prototype.reciprocal=function(e){var r=new gr(e.shape,"return 1.0 / x;");return this.compileAndRun(r,[e])},t.prototype.relu=function(e){var r;return r=P().getBool("WEBGL_PACK")?new uo(e.shape,bc):new gr(e.shape,fc),this.compileAndRun(r,[e])},t.prototype.relu6=function(e){var r;return r=P().getBool("WEBGL_PACK")?new uo(e.shape,wc):new gr(e.shape,dc),this.compileAndRun(r,[e])},t.prototype.prelu=function(e,r){var i=P().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Xi(_l,e.shape,r.shape):new In(Ml,e.shape,r.shape);return this.compileAndRun(i,[e,r])},t.prototype.elu=function(e){if(P().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,Ac,e.dtype);var r=new gr(e.shape,pc);return this.compileAndRun(r,[e])},t.prototype.eluDer=function(e,r){var i=P().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Xi(`
vec4 bGTEZero = vec4(greaterThanEqual(b, vec4(0.)));
return (bGTEZero * a) + ((vec4(1.0) - bGTEZero) * (a * (b + vec4(1.0))));
`,e.shape,r.shape):new In("return (b >= 1.0) ? a : a * (b + 1.0);",e.shape,r.shape);return this.compileAndRun(i,[e,r])},t.prototype.selu=function(e){var r=new gr(e.shape,Mh);return this.compileAndRun(r,[e])},t.prototype.int=function(e){var r=new gr(e.shape,"return float(int(x));");return this.compileAndRun(r,[e],"int32")},t.prototype.clip=function(e,r,i){var a,s=(a=P().getBool("WEBGL_PACK_CLIP")?new Pp(e.shape):new Dp(e.shape)).getCustomSetupFunc(r,i);return this.compileAndRun(a,[e],null,s)},t.prototype.abs=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.abs(e);if(P().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,cc,e.dtype);var r=new gr(e.shape,cc);return this.compileAndRun(r,[e])},t.prototype.complexAbs=function(e){var r=this.texData.get(e.dataId),i=new Bp(e.shape),a=[this.makeComplexComponentTensorInfo(e,r.complexTensors.real),this.makeComplexComponentTensorInfo(e,r.complexTensors.imag)];return this.compileAndRun(i,a)},t.prototype.sigmoid=function(e){var r=new gr(e.shape,"return 1.0 / (1.0 + exp(-1.0 * x));");return this.compileAndRun(r,[e])},t.prototype.softplus=function(e){var r=new gr(e.shape,`
float epsilon = 1.1920928955078125e-7;
float threshold = log(epsilon) + 2.0;
bool too_large = x > -threshold;
bool too_small = x < threshold;
float result;
float exp_x = exp(x);
if (too_large){
result = x;
}
else if (too_small){
result = exp_x;
}
else{
result = log(exp_x + 1.0);
}
return result;
`);return this.compileAndRun(r,[e])},t.prototype.sin=function(e){var r=new gr(e.shape,_h);return this.compileAndRun(r,[e])},t.prototype.cos=function(e){var r=new gr(e.shape,Fh);return this.compileAndRun(r,[e])},t.prototype.tan=function(e){var r=new gr(e.shape,"return tan(x);");return this.compileAndRun(r,[e])},t.prototype.asin=function(e){var r=new gr(e.shape,Lh);return this.compileAndRun(r,[e])},t.prototype.acos=function(e){var r=new gr(e.shape,Uh);return this.compileAndRun(r,[e])},t.prototype.atan=function(e){var r=new gr(e.shape,Wh);return this.compileAndRun(r,[e])},t.prototype.atan2=function(e,r){var i=P().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Xi(`
vec4 result = atan(a, b);
vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0));
result.r = isNaN.r > 0. ? NAN : result.r;
result.g = isNaN.g > 0. ? NAN : result.g;
result.b = isNaN.b > 0. ? NAN : result.b;
result.a = isNaN.a > 0. ? NAN : result.a;
return result;
`,e.shape,r.shape):new In(`
if (isnan(a)) return a;
if (isnan(b)) return b;
return atan(a, b);
`,e.shape,r.shape);return this.compileAndRun(i,[e,r])},t.prototype.sinh=function(e){var r=new gr(e.shape,`
float e2x = exp(x);
return (e2x - 1.0 / e2x) / 2.0;
`);return this.compileAndRun(r,[e])},t.prototype.cosh=function(e){var r=new gr(e.shape,`
float e2x = exp(-x);
return (e2x + 1.0 / e2x) / 2.0;
`);return this.compileAndRun(r,[e])},t.prototype.tanh=function(e){var r=new gr(e.shape,`
float e2x = exp(-2.0 * abs(x));
return sign(x) * (1.0 - e2x) / (1.0 + e2x);
`);return this.compileAndRun(r,[e])},t.prototype.asinh=function(e){var r=new gr(e.shape,zh);return this.compileAndRun(r,[e])},t.prototype.acosh=function(e){var r=new gr(e.shape,Vh);return this.compileAndRun(r,[e])},t.prototype.atanh=function(e){var r=new gr(e.shape,Hh);return this.compileAndRun(r,[e])},t.prototype.erf=function(e){var r=new gr(e.shape,`
// Error function is calculated approximately with elementary function.
// See "Handbook of Mathematical Functions with Formulas,
// Graphs, and Mathematical Tables", Abramowitz and Stegun.
float p = 0.3275911;
float a1 = 0.254829592;
float a2 = -0.284496736;
float a3 = 1.421413741;
float a4 = -1.453152027;
float a5 = 1.061405429;
float sign = sign(x);
x = abs(x);
float t = 1.0 / (1.0 + p * x);
return sign * (1.0 - (((((a5*t + a4)*t) + a3)*t + a2)*t + a1)*t*exp(-x*x));
`);return this.compileAndRun(r,[e])},t.prototype.step=function(e,r){var i=new gr(e.shape,function(a){return a===void 0&&(a=0),Oi+`
return x > 0.0 ? 1.0 : float(`+a+`);
`}(r));return this.compileAndRun(i,[e])},t.prototype.conv2dByMatMul=function(e,r,i,a,s,u){var l=e.shape,d=this.texData.get(e.dataId),A=i.inChannels,I=l[0]*l[1]*l[2],O=i.outChannels,z=i.dataFormat==="channelsLast",re=(I===1||O===1)&&A>1e3,oe=l[2]%2!=0&&!!d.isPacked;if(re||!P().getBool("WEBGL_LAZILY_UNPACK")||!P().getBool("WEBGL_PACK_BINARY_OPERATIONS")||!oe){var ae=z?l[0]*l[1]*l[2]:l[0]*l[2]*l[3],se=this.reshape(e,[1,ae,i.inChannels]),be=this.reshape(r,[1,i.inChannels,i.outChannels]);return this.reshape(this.fusedBatchMatMul({a:se,b:be,transposeA:!1,transposeB:!1,bias:a,activation:s,preluActivationWeights:u}),i.outShape)}var Ae=z?l[0]*l[1]*(l[2]+1):l[0]*l[2]*(l[3]+1),me={dataId:e.dataId,shape:[1,Ae,i.inChannels],dtype:e.dtype},Ce=d.shape;d.shape=d.shape.slice(),d.shape[d.shape.length-2]++,q(Zn(d.shape,me.shape),function(){return"packed reshape "+d.shape+" to "+me.shape+" isn't free"});var Oe=this.reshape(r,[1,i.inChannels,i.outChannels]),Le=this.fusedBatchMatMul({a:me,b:Oe,transposeA:!1,transposeB:!1,bias:a,activation:s,preluActivationWeights:u}),Ue=this.texData.get(Le.dataId);return q(Ue.isPacked,function(){return"batchMatMul result is expected to be packed"}),d.shape=Ce,Ue.shape=i.outShape,We.makeTensorFromDataId(Le.dataId,i.outShape,Le.dtype)},t.prototype.conv2dWithIm2Row=function(e,r,i,a,s,u){var l=i.filterWidth,d=i.filterHeight,A=i.inChannels,I=i.outWidth,O=i.outHeight,z=i.dataFormat==="channelsLast",re=l*d*A,oe=O*I,ae=[re,oe],se=e.squeeze([0]),be=r.reshape([1,re,-1]),Ae=new oh(ae,se.shape,i),me=this.compileAndRun(Ae,[se]).reshape([1,ae[0],ae[1]]),Ce=a!=null,Oe=u!=null,Le=s?Fo(s,!0):null,Ue=new Bs(me.shape,[1,oe,i.outChannels],!0,!1,Ce,Le,Oe),Ne=[me,be];a&&Ne.push(a),Oe&&Ne.push(u);var Fe=this.compileAndRun(Ue,Ne);return z?Fe.reshape([1,O,I,i.outChannels]):Fe.reshape([1,i.outChannels,O,I])},t.prototype.fusedConv2d=function(e){var r=e.input,i=e.filter,a=e.convInfo,s=e.bias,u=e.activation,l=e.preluActivationWeights;if(a.filterHeight===1&&a.filterWidth===1&&a.dilationHeight===1&&a.dilationWidth===1&&a.strideHeight===1&&a.strideWidth===1&&(a.padInfo.type==="SAME"||a.padInfo.type==="VALID"))return this.conv2dByMatMul(r,i,a,s,u,l);if(P().getBool("WEBGL_CONV_IM2COL")&&r.shape[0]===1)return this.conv2dWithIm2Row(r,i,a,s,u,l);var d=s!=null,A=l!=null,I=u?Fo(u,!1):null,O=new Fl(a,d,I,A),z=[r,i];return s&&z.push(s),l&&z.push(l),this.compileAndRun(O,z)},t.prototype.conv2d=function(e,r,i){if(i.filterHeight===1&&i.filterWidth===1&&i.dilationHeight===1&&i.dilationWidth===1&&i.strideHeight===1&&i.strideWidth===1&&(i.padInfo.type==="SAME"||i.padInfo.type==="VALID"))return this.conv2dByMatMul(e,r,i);if(P().getBool("WEBGL_CONV_IM2COL")&&e.shape[0]===1)return this.conv2dWithIm2Row(e,r,i);var a=new Fl(i);return this.compileAndRun(a,[e,r])},t.prototype.conv2dDerInput=function(e,r,i){var a=new Fp(i);return this.compileAndRun(a,[e,r])},t.prototype.conv2dDerFilter=function(e,r,i){var a=new _p(i);return this.compileAndRun(a,[e,r])},t.prototype.fusedDepthwiseConv2D=function(e){var r,i=e.input,a=e.filter,s=e.convInfo,u=e.bias,l=e.activation,d=e.preluActivationWeights,A=P().getBool("WEBGL_PACK_DEPTHWISECONV")&&s.strideWidth<=2&&s.outChannels/s.inChannels==1,I=l?Fo(l,A):null,O=[i,a],z=u!=null,re=d!=null;return z&&O.push(u),re&&O.push(d),A?(r=new Ul(s,z,I,re),this.compileAndRun(r,O)):(r=new Ll(s,z,I,re),this.compileAndRun(r,O))},t.prototype.depthwiseConv2D=function(e,r,i){var a;return P().getBool("WEBGL_PACK_DEPTHWISECONV")&&i.strideWidth<=2&&i.outChannels/i.inChannels==1?(a=new Ul(i),this.compileAndRun(a,[e,r])):(a=new Ll(i),this.compileAndRun(a,[e,r]))},t.prototype.depthwiseConv2DDerInput=function(e,r,i){var a=new zp(i);return this.compileAndRun(a,[e,r])},t.prototype.depthwiseConv2DDerFilter=function(e,r,i){var a=new Wp(i);return this.compileAndRun(a,[e,r])},t.prototype.conv3d=function(e,r,i){var a=new Vp(i);return this.compileAndRun(a,[e,r])},t.prototype.conv3dDerInput=function(e,r,i){var a=new Up(i);return this.compileAndRun(a,[e,r])},t.prototype.conv3dDerFilter=function(e,r,i){var a=new Lp(i);return this.compileAndRun(a,[e,r])},t.prototype.maxPool=function(e,r){var i=new Ns(r,"max",!1);return this.compileAndRun(i,[e])},t.prototype.avgPool=function(e,r){var i=new Ns(r,"avg",!1);return this.compileAndRun(i,[e],"float32")},t.prototype.maxPoolBackprop=function(e,r,i,a){var s=new Ns(a,"max",!0),u=this.compileAndRun(s,[r]),l=new ch(a),d=this.compileAndRun(l,[e,u],r.dtype);return u.dispose(),d},t.prototype.avgPoolBackprop=function(e,r,i){var a=new Ip(i);return this.compileAndRun(a,[e],r.dtype)},t.prototype.cast=function(e,r){return Ss(e,r,this)},t.prototype.unstack=function(e,r){for(var i=e.shape[r],a=new Array(e.rank-1),s=0,u=0;u<e.rank;u++)u!==r&&(a[s++]=e.shape[u]);var l=new Array(e.rank).fill(0),d=e.shape.slice();d[r]=1;var A=new Array(i);for(u=0;u<A.length;u++)l[r]=u,A[u]=this.slice(e,l,d).reshape(a);return A},t.prototype.avgPool3d=function(e,r){var i=new Ms(r,"avg",!1);return this.compileAndRun(i,[e],"float32")},t.prototype.avgPool3dBackprop=function(e,r,i){var a=new Tp(i);return this.compileAndRun(a,[e],r.dtype)},t.prototype.maxPool3d=function(e,r){var i=new Ms(r,"max",!1);return this.compileAndRun(i,[e],"float32")},t.prototype.maxPool3dBackprop=function(e,r,i,a){var s=new Ms(a,"max",!0),u=this.compileAndRun(s,[r]),l=new fh(a),d=this.compileAndRun(l,[e,u],r.dtype);return u.dispose(),d},t.prototype.reshape=function(e,r){var i=this.texData.get(e.dataId);if(i.isPacked&&!Zn(e.shape,r)&&(i.texture===null||!Zn(i.shape,r))){var a=this.packedReshape(e,r);return We.makeTensorFromDataId(a.dataId,a.shape,a.dtype)}return Bo(e,r)},t.prototype.resizeBilinear=function(e,r,i,a){var s=P().getBool("WEBGL_PACK_IMAGE_OPERATIONS")?new Ah(e.shape,r,i,a):new wh(e.shape,r,i,a);return this.compileAndRun(s,[e],"float32")},t.prototype.resizeBilinearBackprop=function(e,r,i){var a=new bh(e,r,i);return this.compileAndRun(a,[e])},t.prototype.resizeNearestNeighbor=function(e,r,i,a){var s=new Eh(e.shape,r,i,a);return this.compileAndRun(s,[e])},t.prototype.resizeNearestNeighborBackprop=function(e,r,i){var a=new xh(e,r,i);return this.compileAndRun(a,[e])},t.prototype.multinomial=function(e,r,i,a){var s=r?e:Gi(e),u=s.shape[0],l=s.shape[1],d=new dh(u,l,i),A=d.getCustomSetupFunc(a);return this.compileAndRun(d,[s],"int32",A)},t.prototype.oneHot=function(e,r,i,a){var s=new ph(e.size,r,i,a);return this.compileAndRun(s,[e])},t.prototype.diag=function(e){var r=new Zp(e.size);return this.compileAndRun(r,[e])},t.prototype.nonMaxSuppression=function(e,r,i,a,s){return Yn("tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead"),Rs(e.dataSync(),r.dataSync(),i,a,s)},t.prototype.cropAndResize=function(e,r,i,a,s,u){var l=new Hp(e.shape,r.shape,a,s,u);return this.compileAndRun(l,[e,r,i],"float32")},t.prototype.depthToSpace=function(e,r,i){q(r>1,function(){return"blockSize should be > 1 for depthToSpace, but was: "+r});var a=e.shape[0],s=i==="NHWC"?e.shape[1]:e.shape[2],u=i==="NHWC"?e.shape[2]:e.shape[3],l=i==="NHWC"?e.shape[3]:e.shape[1],d=s*r,A=u*r,I=l/(r*r),O=new Kp(i==="NHWC"?[a,d,A,I]:[a,I,d,A],r,i);return this.compileAndRun(O,[e])},t.prototype.split=function(e,r,i){return Rl(e,r,i)},t.prototype.scatterND=function(e,r,i){var a=no(0,e,i),s=a.sliceRank,u=a.numUpdates,l=a.sliceSize,d=a.strides,A=a.outputSize,I=[A/l,l],O=e.reshape([u,s]),z=r.reshape([u,l]);if(A===0)return Bo(Sn([]),i);var re=kt(0),oe=new sc(u,s,O.rank,z.rank,d,I);return this.compileAndRun(oe,[z,O,re]).reshape(i)},t.prototype.sparseToDense=function(e,r,i,a){var s=no(0,e,i),u=s.sliceRank,l=s.numUpdates,d=s.strides,A=s.outputSize,I=new sc(l,u,e.rank,r.rank,d,[A,1],!1);return this.compileAndRun(I,[r,e,a]).reshape(i)},t.prototype.fft=function(e){return this.fftImpl(e,!1)},t.prototype.ifft=function(e){return this.fftImpl(e,!0)},t.prototype.fftImpl=function(e,r){var i=this.texData.get(e.dataId),a=new zl(eh,e.shape,r),s=new zl(th,e.shape,r),u=[this.makeComplexComponentTensorInfo(e,i.complexTensors.real),this.makeComplexComponentTensorInfo(e,i.complexTensors.imag)],l=this.compileAndRun(a,u),d=this.compileAndRun(s,u),A=this.complex(l,d).as2D(e.shape[0],e.shape[1]);return l.dispose(),d.dispose(),A},t.prototype.gatherND=function(e,r){var i=r.shape,a=i[i.length-1],s=ys(e,r),u=s[0],l=s[1],d=s[2],A=s[3],I=r.reshape([l,a]),O=e.reshape([e.size/d,d]),z=new ih(a,A,[l,d]);return this.compileAndRun(z,[O,I]).reshape(u)},t.prototype.fill=function(e,r,i){if((i=i||le(r))==="string"){var a=W(i,ce(e));return a.fill(r),We.makeTensor(a,e,i,this)}var s=new rh(e,r),u=s.getCustomSetupFunc(r);return this.compileAndRun(s,[],i,u)},t.prototype.onesLike=function(e){if(e.dtype==="string")throw new Error("onesLike is not supported under string dtype");return this.fill(e.shape,1,e.dtype)},t.prototype.zerosLike=function(e){return this.fill(e.shape,e.dtype==="string"?"":0,e.dtype)},t.prototype.linspace=function(e,r,i){return Is(e,r,i)},t.prototype.makeTensorInfo=function(e,r){var i=this.write(null,e,r);return this.texData.get(i).usage=null,{dataId:i,shape:e,dtype:r}},t.prototype.makeOutput=function(e,r){var i=this.makeTensorInfo(e,r).dataId;return We.makeTensorFromDataId(i,e,r,this)},t.prototype.unpackTensor=function(e){var r=new Qh(e.shape);return this.runWebGLProgram(r,[e],e.dtype)},t.prototype.packTensor=function(e){var r=new hh(e.shape);return this.runWebGLProgram(r,[e],e.dtype,null,!0)},t.prototype.packedReshape=function(e,r){var i=[_r(e.shape)].concat(qr(e.shape)),a={dtype:e.dtype,shape:i,dataId:e.dataId},s=[_r(r)].concat(qr(r)),u=new yh(s,i),l=this.runWebGLProgram(u,[a],e.dtype,null,!0);return{dataId:l.dataId,shape:r,dtype:l.dtype}},t.prototype.decode=function(e){var r,i=this.texData.get(e),a=i.isPacked,s=i.shape,u=i.dtype,l=yn(s);return r=a?new Xp(l):new Qp(l),{dtype:u,shape:s,dataId:this.runWebGLProgram(r,[{shape:l,dtype:u,dataId:e}],u,null,!0).dataId}},t.prototype.runWebGLProgram=function(e,r,i,a,s){var u=this;s===void 0&&(s=!1);var l=this.makeTensorInfo(e.outputShape,i),d=this.texData.get(l.dataId);if(e.packedOutput&&(d.isPacked=!0),e.outPackingScheme===yr.DENSE){var A=it(e.outputShape);d.texShape=A.map(function(Ae){return 2*Ae})}if(e.outTexUsage!=null&&(d.usage=e.outTexUsage),ce(l.shape)===0)return d.values=G(l.dtype,0),l;var I=[],O=r.map(function(Ae){if(Ae.dtype==="complex64")throw new Error("GPGPUProgram does not support complex64 input. For complex64 dtypes, please separate the program into real and imaginary parts.");var me=u.texData.get(Ae.dataId);if(me.texture==null){if(!e.packedInputs&&ce(Ae.shape)<=P().getNumber("WEBGL_SIZE_UPLOAD_UNIFORM"))return{shape:Ae.shape,texData:null,isUniform:!0,uniformValues:me.values};e.packedInputs&&(me.isPacked=!0,me.shape=Ae.shape)}else if(!!me.isPacked!=!!e.packedInputs)Ae=me.isPacked?u.unpackTensor(Ae):u.packTensor(Ae),I.push(Ae),me=u.texData.get(Ae.dataId);else if(me.isPacked&&!Zn(me.shape,Ae.shape)){var Ce=Ae,Oe=Ae.shape;Ae.shape=me.shape,Ae=u.packedReshape(Ae,Oe),I.push(Ae),me=u.texData.get(Ae.dataId),Ce.shape=Oe}return u.uploadToGPU(Ae.dataId),{shape:Ae.shape,texData:me,isUniform:!1}});this.uploadToGPU(l.dataId);var z,re={shape:l.shape,texData:d,isUniform:!1},oe=function(Ae,me,Ce){var Oe="";me.concat(Ce).forEach(function(Ne){var Fe=Ne.texData!=null&&Ne.texData.slice!=null&&Ne.texData.slice.flatOffset>0,Ze=Ne.isUniform?"uniform":Ne.texData.texShape;Oe+=Ne.shape+"_"+Ze+"_"+Fe});var Le=Ae.userCode,Ue=Ae.constructor.name;return Ue+="_"+Oe+"_"+Le}(e,O,re),ae=this.getAndSaveBinary(oe,function(){return function(Ae,me,Ce,Oe){var Le=me.userCode,Ue=Ce.map(function(vt,At){var ft={logicalShape:vt.shape,texShape:vt.isUniform?null:vt.texData.texShape,isUniform:vt.isUniform,isPacked:!vt.isUniform&&vt.texData.isPacked,flatOffset:null};return vt.texData!=null&&vt.texData.slice!=null&&vt.texData.slice.flatOffset>0&&(ft.flatOffset=vt.texData.slice.flatOffset),{name:me.variableNames[At],shapeInfo:ft}}),Ne=Ue.map(function(vt){return vt.shapeInfo}),Fe={logicalShape:Oe.shape,texShape:Oe.texData.texShape,isUniform:!1,isPacked:Oe.texData.isPacked,flatOffset:null},Ze=wp(Ue,Fe,Le,me.packedInputs),Ke=Ae.createProgram(Ze),et=null,tt=Ae.getUniformLocation(Ke,"NAN",!1);P().getNumber("WEBGL_VERSION")===1&&(et=Ae.getUniformLocation(Ke,"INFINITY",!1));for(var ct={},bt=0;bt<me.variableNames.length;bt++){var gt=me.variableNames[bt];ct[gt]=Ae.getUniformLocation(Ke,gt,!1),ct["offset"+gt]=Ae.getUniformLocation(Ke,"offset"+gt,!1)}return{program:me,source:Ze,webGLProgram:Ke,uniformLocations:ct,inShapeInfos:Ne,outShapeInfo:Fe,infLoc:et,nanLoc:tt}}(u.gpgpu,e,O,re)}),se=this.activeTimers!=null;if(se&&(z=this.startTimer()),function(Ae,me,Ce,Oe,Le){oc(me.inShapeInfos,Ce),oc([me.outShapeInfo],[Oe]);var Ue=Oe.texData.texture,Ne=Oe.texData.texShape;Oe.texData.isPacked?Ae.setOutputPackedMatrixTexture(Ue,Ne[0],Ne[1]):Ae.setOutputMatrixTexture(Ue,Ne[0],Ne[1]),Ae.setProgram(me.webGLProgram),P().getNumber("WEBGL_VERSION")===1&&me.infLoc!==null&&Ae.gl.uniform1f(me.infLoc,1/0),me.nanLoc!==null&&Ae.gl.uniform1f(me.nanLoc,NaN),Ce.forEach(function(Fe,Ze){var Ke=me.program.variableNames[Ze],et=me.uniformLocations[Ke],tt=me.uniformLocations["offset"+Ke];if(et!=null)if(Fe.isUniform)if(ce(Fe.shape)<2)Ae.gl.uniform1f(et,Fe.uniformValues[0]);else{var ct=Fe.uniformValues;ct instanceof Float32Array||(ct=new Float32Array(ct)),Ae.gl.uniform1fv(et,ct)}else Fe.texData.slice!=null&&tt!=null&&Ae.gl.uniform1i(tt,Fe.texData.slice.flatOffset),Ae.setInputMatrixTexture(Fe.texData.texture,et,Ze)}),Le!=null&&Le(Ae,me.webGLProgram),Ae.executeProgram()}(this.gpgpu,ae,O,re,a),I.forEach(function(Ae){return u.disposeData(Ae.dataId)}),se&&(z=this.endTimer(z),this.activeTimers.push({name:e.constructor.name,query:this.getQueryTime(z)})),!P().getBool("WEBGL_LAZILY_UNPACK")&&d.isPacked&&s===!1){var be=this.unpackTensor(l);return this.disposeData(l.dataId),be}return l},t.prototype.compileAndRun=function(e,r,i,a,s){s===void 0&&(s=!1),i=i||r[0].dtype;var u=this.runWebGLProgram(e,r,i,a,s);return We.makeTensorFromDataId(u.dataId,u.shape,u.dtype)},t.prototype.getAndSaveBinary=function(e,r){return e in this.binaryCache||(this.binaryCache[e]=r()),this.binaryCache[e]},t.prototype.getTextureManager=function(){return this.textureManager},t.prototype.dispose=function(){var e=this;this.disposed||(P().getBool("IS_TEST")||Object.keys(this.binaryCache).forEach(function(r){e.gpgpu.deleteProgram(e.binaryCache[r].webGLProgram),delete e.binaryCache[r]}),this.textureManager.dispose(),this.canvas!=null&&typeof HTMLCanvasElement!="undefined"&&this.canvas instanceof HTMLCanvasElement?this.canvas.remove():this.canvas=null,this.gpgpuCreatedLocally&&(this.gpgpu.program=null,this.gpgpu.dispose()),this.disposed=!0)},t.prototype.floatPrecision=function(){var e=this;return this.floatPrecisionValue==null&&(this.floatPrecisionValue=Ot(function(){if(!P().get("WEBGL_RENDER_FLOAT32_ENABLED")){var r=P().getBool("DEBUG");P().set("DEBUG",!1);var i=e.abs(kt(1e-8)).dataSync()[0];if(P().set("DEBUG",r),i>0)return 32}return 16})),this.floatPrecisionValue},t.prototype.epsilon=function(){return this.floatPrecision()===32?1e-7:1e-4},t.prototype.uploadToGPU=function(e){var r,i=this.texData.get(e),a=i.shape,s=i.dtype,u=i.values,l=i.texture,d=i.usage,A=i.isPacked;if(l==null){var I,O=this.activeTimers!=null;O&&(I=qe());var z=i.texShape;if(z==null&&(z=ln(a,A),i.texShape=z),u!=null){var re=yn(a),oe=void 0,ae=z[1],se=z[0],be=u instanceof Uint8Array;A?(ae=(r=Wt(z[0],z[1]))[0],se=r[1],oe=new qp(re,[se,ae],be)):oe=new $p(re,[se,ae],be);var Ae=this.makeTensorInfo([se,ae],s);this.texData.get(Ae.dataId).usage=be?Ge.PIXELS:Ge.UPLOAD,this.gpgpu.uploadDenseMatrixToTexture(this.getTexture(Ae.dataId),ae,se,u);var me=this.runWebGLProgram(oe,[Ae],s,null,!0),Ce=this.texData.get(me.dataId);i.texture=Ce.texture,i.texShape=Ce.texShape,i.isPacked=Ce.isPacked,i.usage=Ce.usage,this.disposeData(Ae.dataId),this.texData.delete(me.dataId),i.values=null,O&&(this.uploadWaitMs+=qe()-I)}else{var Oe=this.acquireTexture(z,d,s,A);i.texture=Oe}}},t.prototype.convertAndCacheOnCPU=function(e,r){var i=this.texData.get(e),a=i.dtype;return this.releaseGPUData(e),r!=null&&(i.values=function(s,u){if(u==="float32"||u==="complex64")return s;if(u==="int32"||u==="bool"){for(var l=u==="int32"?new Int32Array(s.length):new Uint8Array(s.length),d=0;d<l.length;++d)l[d]=Math.round(s[d]);return l}throw new Error("Unknown dtype "+u)}(r,a)),i.values},t.prototype.acquireTexture=function(e,r,i,a){if(this.numBytesInGPU+=this.computeBytes(e,i),!this.warnedAboutMemory&&this.numBytesInGPU>1024*this.numMBBeforeWarning*1024){var s=(this.numBytesInGPU/1024/1024).toFixed(2);this.warnedAboutMemory=!0,console.warn("High memory usage in GPU: "+s+" MB, most likely due to a memory leak")}return this.textureManager.acquireTexture(e,r,a)},t.prototype.computeBytes=function(e,r){return e[0]*e[1]*$(r)},t}(Cl);tn()&&We.registerBackend("webgl",function(){return new xc},2);var Kh=Ve({square_:function(n){var t=je(n,"x","square"),e=[t];return We.runKernelFunc(function(r,i){return i([t]),r.square(t)},{x:t},null,"Square",{},e,[])}}),lo="SquaredDifference",Ec=Ve({squaredDifference_:function(n,t){var e,r=je(n,"a","squaredDifference"),i=je(t,"b","squaredDifference");e=Jt(r,i),r=e[0],i=e[1],Ir(r.shape,i.shape);var a={a:r,b:i},s=[r,i];return We.runKernelFunc(function(u,l){var d=u.squaredDifference(r,i);return l([r,i]),d},a,function(u,l){var d=l[0],A=l[1],I=kt(2);return{a:function(){return u.mul(d.sub(A).mul(I))},b:function(){return u.mul(A.sub(d).mul(I))}}},lo,{},s,[])}}),Zh=Ve({abs_:function(n){var t=je(n,"x","abs");return t.dtype==="complex64"?We.runKernelFunc(function(e){return e.complexAbs(t)},{$x:t}):We.runKernelFunc(function(e,r){var i=e.abs(t);return r([t]),i},{x:t},function(e,r){var i=r[0];return{x:function(){return e.mul(i.toFloat().step(-1))}}},"Abs")}}),Jh=Ve({acos_:function(n){var t=je(n,"x","acos");return We.runKernelFunc(function(e,r){var i=e.acos(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.divStrict(kt(1).sub(i.toFloat().square()).sqrt()).neg()}}})}}),Yh=Ve({acosh_:function(n){var t=je(n,"x","acosh");return We.runKernelFunc(function(e,r){var i=e.acosh(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.divStrict(i.toFloat().square().sub(1).sqrt())}}})}}),$h=Ve({asin_:function(n){var t=je(n,"x","asin");return We.runKernelFunc(function(e,r){var i=e.asin(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.divStrict(kt(1).sub(i.toFloat().square()).sqrt())}}})}}),qh=Ve({asinh_:function(n){var t=je(n,"x","asinh");return We.runKernelFunc(function(e,r){var i=e.asinh(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.divStrict(kt(1).add(i.toFloat().square()).sqrt())}}})}}),ev=Ve({atan_:function(n){var t=je(n,"x","atan");return We.runKernelFunc(function(e,r){var i=e.atan(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.div(i.toFloat().square().add(1))}}})}}),tv=Ve({atanh_:function(n){var t=je(n,"x","atanh");return We.runKernelFunc(function(e,r){var i=e.atanh(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.div(kt(1).sub(i.toFloat().square()))}}})}}),rv=Ve({ceil_:function(n){var t=je(n,"x","ceil");return We.runKernelFunc(function(e){return e.ceil(t)},{$x:t},function(e){return{$x:function(){return Lr(e)}}})}}),Us=Ve({clipByValue_:function(n,t,e){var r=je(n,"x","clipByValue");q(t<=e,function(){return"Error in clip: min ("+t+") must be less than or equal to max ("+e+")."});var i=[r],a={min:t,max:e};return We.runKernelFunc(function(s,u){var l=s.clip(r,t,e);return u([r]),l},{x:r},function(s,u){var l=u[0];return{x:function(){return s.where(l.greaterEqual(t).logicalAnd(l.lessEqual(e)),Lr(s))}}},"ClipByValue",a,i)}}),nv=Ve({cos_:function(n){var t=je(n,"x","cos"),e=[t];return We.runKernelFunc(function(r,i){var a=r.cos(t);return i([t]),a},{x:t},function(r,i){var a=i[0];return{x:function(){return a.toFloat().sin().neg().mul(r)}}},"Cos",{},e)}}),iv=Ve({cosh_:function(n){var t=je(n,"x","cosh");return We.runKernelFunc(function(e,r){var i=e.cosh(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return i.toFloat().sinh().mulStrict(e)}}})}}),av=Ve({erf_:function(n){var t=je(n,"x","erf");return q(t.dtype==="int32"||t.dtype==="float32",function(){return"Input dtype must be `int32` or `float32`."}),t.dtype==="int32"&&(t=t.toFloat()),We.runKernelFunc(function(e,r){var i=e.erf(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.mul(i.square().neg().exp().mul(2/Math.sqrt(Math.PI)))}}})}}),Ws=Ve({exp_:function(n){var t=je(n,"x","exp");return We.runKernelFunc(function(e,r){var i=e.exp(t);return r([i]),i},{x:t},function(e,r){return{x:function(){return e.mulStrict(r[0])}}},"Exp",{},[],[!0])}}),ov=Ve({expm1_:function(n){var t=je(n,"x","expm1");return We.runKernelFunc(function(e,r){var i=e.expm1(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.mul(i.exp())}}})}}),sv=Ve({floor_:function(n){var t=je(n,"x","floor");return We.runKernelFunc(function(e){return e.floor(t)},{$x:t},function(e){return{$x:function(){return Lr(e)}}})}}),uv=Ve({log_:function(n){var t=je(n,"x","log"),e=[t];return We.runKernelFunc(function(r,i){var a=r.log(t);return i([t]),a},{x:t},function(r,i){var a=i[0];return{x:function(){return r.div(a.toFloat())}}},"Log",{},e)}}),lv=Ve({log1p_:function(n){var t=je(n,"x","log1p");return We.runKernelFunc(function(e,r){var i=e.log1p(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.div(i.add(1))}}})}}),cv=Ve({logSigmoid_:function(n){var t=je(n,"x","logSigmoid");return We.runKernelFunc(function(e,r){var i=e.softplus(t.neg()).neg();return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.mul(i.neg().sigmoid())}}})}}),Lo=Ve({neg_:function(n){var t=je(n,"x","neg"),e=[t];return We.runKernelFunc(function(r){return r.neg(t)},{x:t},function(r){return{x:function(){return r.neg()}}},"Neg",{},e)}}),fv=Ve({reciprocal_:function(n){var t=je(n,"x","reciprocal");return We.runKernelFunc(function(e,r){var i=e.reciprocal(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.div(i.square().neg())}}})}}),dv=Ve({round_:function(n){var t=je(n,"x","round");return We.runKernelFunc(function(e){return e.round(t)},{$x:t},function(e){return{$x:function(){return Lr(e)}}})}}),Cc=Ve({rsqrt_:function(n){var t=je(n,"x","rsqrt"),e=[t];return We.runKernelFunc(function(r,i){var a=r.rsqrt(t);return i([t]),a},{x:t},function(r,i){var a=i[0];return{x:function(){return r.div(a.pow(1.5).mul(2)).neg()}}},"Rsqrt",{},e)}}),Sc=Ve({sigmoid_:function(n){var t=je(n,"x","sigmoid");return We.runKernelFunc(function(e,r){var i=e.sigmoid(t);return r([i]),i},{x:t},function(e,r){var i=r[0];return{x:function(){return e.mul(i.mul(kt(1).sub(i)))}}},"Sigmoid")}}),pv=Ve({sign_:function(n){var t=je(n,"x","sign");return We.runKernelFunc(function(e){return e.sign(t)},{$x:t},function(e){return{$x:function(){return Lr(e)}}})}}),hv=Ve({isNaN_:function(n){var t=je(n,"x","isNaN");return We.runKernelFunc(function(e){return e.isNaN(t)},{$x:t},function(e){return{$x:function(){return Lr(e)}}})}}),vv=Ve({isInf_:function(n){var t=je(n,"x","isInf");return We.runKernelFunc(function(e){return e.isInf(t)},{$x:t},function(e){return{$x:function(){return Lr(e)}}})}}),mv=Ve({isFinite_:function(n){var t=je(n,"x","isFinite");return We.runKernelFunc(function(e){return e.isFinite(t)},{$x:t},function(e){return{$x:function(){return Lr(e)}}})}}),gv=Ve({sin_:function(n){var t=je(n,"x","sin"),e=[t];return We.runKernelFunc(function(r,i){var a=r.sin(t);return i([t]),a},{x:t},function(r,i){var a=i[0];return{x:function(){return a.toFloat().cos().mul(r)}}},"Sin",{},e)}}),yv=Ve({sinh_:function(n){var t=je(n,"x","sinh");return We.runKernelFunc(function(e,r){var i=e.sinh(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return i.toFloat().cosh().mulStrict(e)}}})}}),bv=Ve({softplus_:function(n){var t=je(n,"x","softplus");return We.runKernelFunc(function(e,r){var i=e.softplus(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.mul(i.sigmoid())}}})}}),wv=Ve({sqrt_:function(n){var t=je(n,"x","sqrt");return We.runKernelFunc(function(e,r){var i=e.sqrt(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.div(i.toFloat().sqrt().mul(2))}}})}}),Av=Ve({step_:function(n,t){t===void 0&&(t=0);var e=je(n,"x","step");return We.runKernelFunc(function(r){return r.step(e,t)},{$x:e},function(r){return{$x:function(){return Lr(r)}}})}}),xv=Ve({tan_:function(n){var t=je(n,"x","tan");return We.runKernelFunc(function(e,r){var i=e.tan(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.div(i.cos().square())}}})}}),Ev=Ve({tanh_:function(n){var t=je(n,"x","tanh");return We.runKernelFunc(function(e,r){var i=e.tanh(t);return r([i]),i},{x:t},function(e,r){var i=r[0];return{x:function(){return kt(1).sub(i.square()).mulStrict(e)}}},"Tanh",{},null,[!0])}});function Ic(n,t,e,r,i,a){var s,u,l=je(n,"x","batchNorm"),d=je(t,"mean","batchNorm"),A=je(e,"variance","batchNorm");return i!=null&&(s=je(i,"scale","batchNorm")),r!=null&&(u=je(r,"offset","batchNorm")),q(l.rank===2,function(){return"Error in batchNorm3D: x must be rank 3 but got rank "+l.rank+"."}),q(d.rank===2||d.rank===1,function(){return"Error in batchNorm2D: mean must be rank 2 or rank 1 but got rank "+d.rank+"."}),q(A.rank===2||A.rank===1,function(){return"Error in batchNorm2D: variance must be rank 2 or rank 1 but got rank "+A.rank+"."}),s!=null&&q(s.rank===2||s.rank===1,function(){return"Error in batchNorm2D: scale must be rank 2 or rank 1 but got rank "+s.rank+"."}),u!=null&&q(u.rank===2||u.rank===1,function(){return"Error in batchNorm2D: offset must be rank 2 or rank 1 but got rank "+u.rank+"."}),co(l,d,A,u,s,a)}function Tc(n,t,e,r,i,a){var s,u,l=je(n,"x","batchNorm"),d=je(t,"mean","batchNorm"),A=je(e,"variance","batchNorm");return i!=null&&(s=je(i,"scale","batchNorm")),r!=null&&(u=je(r,"offset","batchNorm")),q(l.rank===3,function(){return"Error in batchNorm3D: x must be rank 3 but got rank "+l.rank+"."}),q(d.rank===3||d.rank===1,function(){return"Error in batchNorm3D: mean must be rank 3 or rank 1 but got rank "+d.rank+"."}),q(A.rank===3||A.rank===1,function(){return"Error in batchNorm3D: variance must be rank 3 or rank 1 but got rank "+A.rank+"."}),s!=null&&q(s.rank===3||s.rank===1,function(){return"Error in batchNorm3D: scale must be rank 3 or rank 1 but got rank "+s.rank+"."}),u!=null&&q(u.rank===3||u.rank===1,function(){return"Error in batchNorm3D: offset must be rank 3 or rank 1 but got rank "+u.rank+"."}),co(l,d,A,u,s,a)}function Rc(n,t,e,r,i,a){var s,u,l=je(n,"x","batchNorm"),d=je(t,"mean","batchNorm"),A=je(e,"variance","batchNorm");return i!=null&&(s=je(i,"scale","batchNorm")),r!=null&&(u=je(r,"offset","batchNorm")),q(l.rank===4,function(){return"Error in batchNorm4D: x must be rank 4 but got rank "+l.rank+"."}),q(d.rank===4||d.rank===1,function(){return"Error in batchNorm4D: mean must be rank 4 or rank 1 but got rank "+d.rank+"."}),q(A.rank===4||A.rank===1,function(){return"Error in batchNorm4D: variance must be rank 4 or rank 1 but got rank "+A.rank+"."}),s!=null&&q(s.rank===4||s.rank===1,function(){return"Error in batchNorm4D: scale must be rank 4 or rank 1 but got rank "+s.rank+"."}),u!=null&&q(u.rank===4||u.rank===1,function(){return"Error in batchNorm4D: offset must be rank 4 or rank 1 but got rank "+u.rank+"."}),co(l,d,A,u,s,a)}function co(n,t,e,r,i,a){a==null&&(a=.001);var s,u,l,d=je(n,"x","batchNorm"),A=je(t,"mean","batchNorm"),I=je(e,"variance","batchNorm");i!=null&&(s=je(i,"scale","batchNorm")),r!=null&&(u=je(r,"offset","batchNorm")),q(A.rank===I.rank,function(){return"Batch normalization gradient requires mean and variance to have equal ranks."}),q(u==null||A.rank===u.rank,function(){return"Batch normalization gradient requires mean and offset to have equal ranks."}),q(s==null||A.rank===s.rank,function(){return"Batch normalization gradient requires mean and scale to have equal ranks."}),l=d.rank===0||d.rank===1?d.as4D(1,1,1,d.size):d.rank===2?d.as4D(1,1,d.shape[0],d.shape[1]):d.rank===3?d.as4D(1,d.shape[0],d.shape[1],d.shape[2]):d;var O=[d,A,I,s];return We.runKernelFunc(function(z,re){var oe=z.batchNormalization(l,Uo(A),Uo(I),a,Uo(s),Uo(u));return re([d,A,I,s]),oe},{x:d,mean:A,variance:I,scale:s,offset:u},function(z,re){var oe=re,ae=oe[0],se=oe[1],be=oe[2],Ae=oe[3],me=Ae==null?kt(1):Ae,Ce=kn(se.shape,l.shape),Oe=[];if(se.rank===1){for(var Le=0;Le<l.shape.length-1;++Le)Oe.push(l.shape[Le]);Oe.push(1)}var Ue=ae.sub(se),Ne=z.mul(me),Fe=Cc(be.add(kt(a))),Ze=Fe.mul(Fe).mul(Fe).mul(kt(-.5));return{x:function(){return se.rank===1?z.mul(_a(Fe.as4D(1,1,1,se.shape[0]),Oe)).mul(me).reshape(ae.shape):z.mul(Fe).mul(me).reshape(ae.shape)},mean:function(){var Ke=Fe.mul(kt(-1)).mul(Ne);return se.rank===1&&(Ke=Ke.sum(Ce)),Ke.reshape(se.shape)},variance:function(){var Ke=Ze.mul(Ue).mul(Ne);return se.rank===1&&(Ke=Ke.sum(Ce)),Ke.reshape(se.shape)},scale:function(){var Ke=Ue.mul(Fe),et=z.mul(Ke);return se.rank===1&&(et=et.sum(Ce)),et.reshape(se.shape)},offset:function(){var Ke=z;return se.rank===1&&(Ke=Ke.sum(Ce)),Ke.reshape(se.shape)}}},"BatchNormalization",{varianceEpsilon:a},O).reshape(d.shape)}function Uo(n){return n==null?null:n.rank===0?n.as1D():n.rank===1?n:n.rank===2?n.as4D(1,1,n.shape[0],n.shape[1]):n.rank===3?n.as4D(1,n.shape[0],n.shape[1],n.shape[2]):n}function Wo(){pi("tf.batchNormalization() is going away. Use tf.batchNorm() instead, and note the positional argument change of scale, offset, and varianceEpsilon")}var Cv=Ve({batchNormalization2d_:function(n,t,e,r,i,a){return r===void 0&&(r=.001),Wo(),Ic(n,t,e,a,i,r)}}),Sv=Ve({batchNormalization3d_:function(n,t,e,r,i,a){return r===void 0&&(r=.001),Wo(),Tc(n,t,e,a,i,r)}}),Iv=Ve({batchNormalization4d_:function(n,t,e,r,i,a){return r===void 0&&(r=.001),Wo(),Rc(n,t,e,a,i,r)}}),Tv=Ve({batchNormalization_:function(n,t,e,r,i,a){return r===void 0&&(r=.001),Wo(),co(n,t,e,a,i,r)}}),Oc=Ve({batchNorm_:co}),Rv=Ve({batchNorm2d_:Ic}),Ov=Ve({batchNorm3d_:Tc}),kv=Ve({batchNorm4d_:Rc}),zo=Ve({logicalAnd_:function(n,t){var e=je(n,"a","logicalAnd","bool"),r=je(t,"b","logicalAnd","bool");return Ir(e.shape,r.shape),We.runKernelFunc(function(i){return i.logicalAnd(e,r)},{a:e,b:r},null,"LogicalAnd")}}),jv=Ve({logicalNot_:function(n){var t=je(n,"x","logicalNot","bool");return We.runKernelFunc(function(e){return e.logicalNot(t)},{$x:t})}}),kc=Ve({logicalOr_:function(n,t){var e=je(n,"a","logicalOr","bool"),r=je(t,"b","logicalOr","bool");return Ir(e.shape,r.shape),We.runKernelFunc(function(i){return i.logicalOr(e,r)},{$a:e,$b:r})}}),Dv=Ve({logicalXor_:function(n,t){var e=je(n,"a","logicalXor","bool"),r=je(t,"b","logicalXor","bool");return Ir(e.shape,r.shape),kc(n,t).logicalAnd(zo(n,t).logicalNot())}}),Ia=Ve({where_:function(n,t,e){var r=je(t,"a","where"),i=je(e,"b","where"),a=je(n,"condition","where","bool");return pe(r.shape,i.shape,"Error in where: "),a.rank===1?q(a.shape[0]===r.shape[0],function(){return"The first dimension of `a` must match the size of `condition`."}):pe(a.shape,i.shape,"Error in where: "),We.runKernelFunc(function(s,u){var l=s.select(a,r,i);return u([a]),l},{$condition:a,$a:r,$b:i},function(s,u){var l=u[0];return{$condition:function(){return Lr(l).toFloat()},$a:function(){return s.mul(l.cast(s.dtype))},$b:function(){return s.mul(l.logicalNot().cast(s.dtype))}}})}}),jc=function(n){return C(this,void 0,void 0,function(){var t,e,r;return E(this,function(i){switch(i.label){case 0:return[4,(t=je(n,"condition","whereAsync","bool")).data()];case 1:return e=i.sent(),r=ks(t.shape,e),n!==t&&t.dispose(),[2,r]}})})},Tr=Ve({add_:function(n,t){var e,r=je(n,"a","add"),i=je(t,"b","add");e=Jt(r,i),r=e[0],i=e[1];var a=Ir(r.shape,i.shape);return We.runKernelFunc(function(s){return s.add(r,i)},{a:r,b:i},function(s){return{a:function(){var u=s,l=kn(r.shape,a);return l.length>0&&(u=u.sum(l)),u.reshape(r.shape)},b:function(){var u=s,l=kn(i.shape,a);return l.length>0&&(u=u.sum(l)),u.reshape(i.shape)}}},"Add")}}),Pv=Ve({addN_:function(n){q(Array.isArray(n),function(){return"The argument passed to tf.addN() must be a list of tensors"}),q(n.length>=1,function(){return"Must pass at least one tensor to tf.addN(), but got "+n.length});var t=n.map(function(i,a){return je(i,"tensors"+a,"addN")}),e=t[0];t.forEach(function(i){if(i.dtype!==e.dtype)throw new Error("All tensors passed to tf.addN() must have the same dtype")}),t.forEach(function(i){if(!fe(i.shape,e.shape))throw new Error("All tensors passed to tf.addN() must have the same shape")});var r=t;return We.runKernelFunc(function(i){return i.addN(t)},r,function(i){var a={};return t.forEach(function(s,u){a[u]=function(){return i.clone()}}),a},"AddN")}}),Bv=Ve({addStrict_:function(n,t){var e=je(n,"a","addStrict"),r=je(t,"b","addStrict");return pe(e.shape,r.shape,"Error in addStrict: "),e.add(r)}}),Nv=Ve({atan2_:function(n,t){var e,r=je(n,"a","atan2"),i=je(t,"b","atan2");e=Jt(r,i),r=e[0],i=e[1];var a=Ir(r.shape,i.shape);return We.runKernelFunc(function(s,u){var l=s.atan2(r,i);return u([r,i]),l},{$a:r,$b:i},function(s,u){var l=u[0],d=u[1];return{$a:function(){var A=Tr(l.square(),d.square()),I=s.mul(d.div(A)),O=kn(l.shape,a);return O.length>0&&(I=I.sum(O)),I.reshape(l.shape)},$b:function(){var A=Tr(l.square(),d.square()),I=Lo(s.mul(l.div(A))),O=kn(d.shape,a);return O.length>0&&(I=I.sum(O)),I.reshape(d.shape)}}})}}),ki=Ve({div_:function(n,t){var e,r=je(n,"a","div"),i=je(t,"b","div");if(e=Jt(r,i),r=e[0],i=e[1],r.dtype==="int32"&&i.dtype==="int32")return Dc(r,i);var a=Ir(r.shape,i.shape);return We.runKernelFunc(function(s,u){var l=s.realDivide(r,i);return u([r,i]),l},{a:r,b:i},function(s,u){var l=u[0],d=u[1];return{a:function(){var A=s.div(d.toFloat()),I=kn(l.shape,a);return I.length>0?A.sum(I).reshape(l.shape):A},b:function(){var A=s.mul(l.toFloat()),I=kn(d.shape,a);I.length>0&&(A=A.sum(I).reshape(d.shape));var O=d.square();return A.div(O.toFloat()).neg()}}},"Div")}}),Mv=Ve({divNoNan_:function(n,t){var e,r=je(n,"a","div"),i=je(t,"b","div");r=(e=Jt(r,i))[0],i=e[1];var a=ki(r,i),s=Lr(a),u=i.equal(s);return Ia(u,s,a)}}),_v=Ve({divStrict_:function(n,t){var e=je(n,"a","div"),r=je(t,"b","div");return pe(e.shape,r.shape,"Error in divideStrict: "),e.div(r)}}),Dc=Ve({floorDiv_:function(n,t){var e,r=je(n,"a","floorDiv"),i=je(t,"b","floorDiv");e=Jt(r,i),r=e[0],i=e[1];var a=Ir(r.shape,i.shape);return We.runKernelFunc(function(s,u){var l=s.floorDiv(r,i);return u([r,i]),l},{a:r,b:i},function(s,u){var l=u[0],d=u[1];return{a:function(){var A=s.div(d.toFloat()),I=kn(l.shape,a);return I.length>0?A.sum(I).reshape(l.shape):A},b:function(){var A=s.mul(l.toFloat()),I=kn(d.shape,a);I.length>0&&(A=A.sum(I).reshape(d.shape));var O=d.square();return A.div(O.toFloat()).neg()}}},"FloorDiv")}}),zs=Ve({maximum_:function(n,t){var e,r=je(n,"a","maximum"),i=je(t,"b","maximum");return e=Jt(r,i),r=e[0],i=e[1],r.dtype==="bool"&&(r=r.toInt(),i=i.toInt()),Ir(r.shape,i.shape),We.runKernelFunc(function(a,s){var u=a.maximum(r,i);return s([r,i]),u},{a:r,b:i},function(a,s){var u=s[0],l=s[1];return{a:function(){return a.mul(u.greaterEqual(l).toFloat())},b:function(){return a.mul(u.less(l).toFloat())}}},"Maximum")}}),Fv=Ve({maximumStrict_:function(n,t){var e=je(n,"a","maximumStrict"),r=je(t,"b","maximumStrict");return pe(e.shape,r.shape,"Error in maximumStrict: "),e.maximum(r)}}),Pc=Ve({minimum_:function(n,t){var e,r=je(n,"a","minimum"),i=je(t,"b","minimum");return e=Jt(r,i),r=e[0],i=e[1],r.dtype==="bool"&&(r=r.toInt(),i=i.toInt()),Ir(r.shape,i.shape),We.runKernelFunc(function(a,s){var u=a.minimum(r,i);return s([r,i]),u},{a:r,b:i},function(a,s){var u=s[0],l=s[1];return{a:function(){return a.mul(u.lessEqual(l).toFloat())},b:function(){return a.mul(u.greater(l).toFloat())}}},"Minimum")}}),Lv=Ve({minimumStrict_:function(n,t){var e=je(n,"a","minimumStrict"),r=je(t,"b","minimumStrict");return pe(e.shape,r.shape,"Error in minimumStrict: "),e.minimum(r)}}),Uv=Ve({mod_:function(n,t){var e,r=je(n,"a","mod"),i=je(t,"b","mod");e=Jt(r,i),r=e[0],i=e[1];var a=Ir(r.shape,i.shape);return We.runKernelFunc(function(s,u){var l=s.mod(r,i);return u([r,i]),l},{$a:r,$b:i},function(s,u){var l=u[0],d=u[1];return{$a:function(){var A=kn(l.shape,a);return A.length>0?s.sum(A).reshape(l.shape):s},$b:function(){var A=s.mul(l.div(d).floor().neg()),I=kn(d.shape,a);return I.length>0?A.sum(I).reshape(d.shape):A}}})}}),Wv=Ve({modStrict_:function(n,t){var e=je(n,"a","modStrict"),r=je(t,"b","modStrict");return pe(e.shape,r.shape,"Error in modStrict: "),e.mod(r)}}),ei=Ve({mul_:function(n,t){var e,r=je(n,"a","mul"),i=je(t,"b","mul");e=Jt(r,i),r=e[0],i=e[1];var a=Ir(r.shape,i.shape);return We.runKernelFunc(function(s,u){var l=s.multiply(r,i);return u([r,i]),l},{a:r,b:i},function(s,u){var l=u[0],d=u[1];return{a:function(){var A=s.mul(d.toFloat()),I=kn(l.shape,a);return I.length>0?A.sum(I).reshape(l.shape):A},b:function(){var A=s.mul(l.toFloat()),I=kn(d.shape,a);return I.length>0?A.sum(I).reshape(d.shape):A}}},"Mul")}}),zv=Ve({mulStrict_:function(n,t){var e=je(n,"a","mul"),r=je(t,"b","mul");return pe(e.shape,r.shape,"Error in multiplyStrict: "),e.mul(r)}}),Vo=Ve({pow_:function(n,t){var e,r=je(n,"base","pow"),i=je(t,"exp","pow");e=Jt(r,i),r=e[0],i=e[1];var a=Ir(r.shape,i.shape),s=[r,i];return We.runKernelFunc(function(u,l){var d=u.pow(r,i);return l([r,i,d]),d},{a:r,b:i},function(u,l){var d=l[0],A=l[1],I=l[2];return{a:function(){var O=A.toFloat(),z=u.mul(O.mul(d.pow(O.sub(kt(1))))),re=kn(d.shape,a);return re.length>0&&(z=z.sum(re)),z.reshape(d.shape)},b:function(){var O=d.greater(0),z=d.log().where(O,Lr(d)),re=u.mul(I.mul(z)),oe=kn(A.shape,a);return oe.length>0&&(re=re.sum(oe)),re.reshape(A.shape)}}},"Pow",{},s,[!0])}}),Vv=Ve({powStrict_:function(n,t){return pe(n.shape,t.shape,"Error in powStrict: "),n.pow(t)}}),Hv=Ve({squaredDifferenceStrict_:function(n,t){var e=je(n,"a","squaredDifferenceStrict"),r=je(t,"b","squaredDifferenceStrict");return pe(e.shape,r.shape,"Error in squaredDifferenceStrict: "),e.squaredDifference(r)}}),Nn=Ve({sub_:function(n,t){var e,r=je(n,"a","sub"),i=je(t,"b","sub");e=Jt(r,i),r=e[0],i=e[1];var a=Ir(r.shape,i.shape);return We.runKernelFunc(function(s){return s.subtract(r,i)},{a:r,b:i},function(s){return{a:function(){var u=s,l=kn(r.shape,a);return l.length>0&&(u=u.sum(l)),u.reshape(r.shape)},b:function(){var u=s,l=kn(i.shape,a);return l.length>0&&(u=u.sum(l)),u.neg().reshape(i.shape)}}},"Sub")}}),Gv=Ve({subStrict_:function(n,t){var e=je(n,"a","subStrict"),r=je(t,"b","subStrict");return pe(e.shape,r.shape,"Error in subStrict: "),e.sub(r)}}),Bc=Ve({equal_:function(n,t){var e,r=je(n,"a","equal"),i=je(t,"b","equal");return e=Jt(r,i),r=e[0],i=e[1],Ir(r.shape,i.shape),We.runKernelFunc(function(a){return a.equal(r,i)},{$a:r,$b:i})}}),Qv=Ve({equalStrict_:function(n,t){var e=je(n,"a","equalStrict"),r=je(t,"b","equalStrict");return pe(e.shape,r.shape,"Error in equalStrict: "),e.equal(r)}}),Xv=Ve({greater_:function(n,t){var e,r=je(n,"a","greater"),i=je(t,"b","greater");return e=Jt(r,i),r=e[0],i=e[1],Ir(r.shape,i.shape),We.runKernelFunc(function(a){return a.greater(r,i)},{a:r,b:i},null,"Greater")}}),Nc=Ve({greaterEqual_:function(n,t){var e,r=je(n,"a","greaterEqual"),i=je(t,"b","greaterEqual");return e=Jt(r,i),r=e[0],i=e[1],Ir(r.shape,i.shape),We.runKernelFunc(function(a,s){var u=a.greaterEqual(r,i);return s([r,i]),u},{a:r,b:i},function(a,s){var u=s[0],l=s[1];return{a:function(){return Lr(u)},b:function(){return Lr(l)}}},"GreaterEqual")}}),Kv=Ve({greaterEqualStrict_:function(n,t){var e=je(n,"a","greaterEqualStrict"),r=je(t,"b","greaterEqualStrict");return pe(e.shape,r.shape,"Error in greaterEqualStrict: "),e.greaterEqual(r)}}),Zv=Ve({greaterStrict_:function(n,t){var e=je(n,"a","greaterStrict"),r=je(t,"b","greaterStrict");return pe(e.shape,r.shape,"Error in greaterStrict: "),e.greater(r)}}),Jv=Ve({less_:function(n,t){var e,r=je(n,"a","less"),i=je(t,"b","less");return e=Jt(r,i),r=e[0],i=e[1],Ir(r.shape,i.shape),We.runKernelFunc(function(a){return a.less(r,i)},{a:r,b:i},null,"Less")}}),Yv=Ve({lessEqual_:function(n,t){var e,r=je(n,"a","lessEqual"),i=je(t,"b","lessEqual");return e=Jt(r,i),r=e[0],i=e[1],Ir(r.shape,i.shape),We.runKernelFunc(function(a,s){var u=a.lessEqual(r,i);return s([r,i]),u},{a:r,b:i},null,"LessEqual")}}),$v=Ve({lessEqualStrict_:function(n,t){var e=je(n,"a","lessEqualStrict"),r=je(t,"b","lessEqualStrict");return pe(e.shape,r.shape,"Error in lessEqualStrict: "),e.lessEqual(r)}}),qv=Ve({lessStrict_:function(n,t){var e=je(n,"a","lessStrict"),r=je(t,"b","lessStrict");return pe(e.shape,r.shape,"Error in lessStrict: "),e.less(r)}}),em=Ve({notEqual_:function(n,t){var e,r=je(n,"a","notEqual"),i=je(t,"b","notEqual");return e=Jt(r,i),r=e[0],i=e[1],Ir(r.shape,i.shape),We.runKernelFunc(function(a){return a.notEqual(r,i)},{a:r,b:i},null,"NotEqual")}}),tm=Ve({notEqualStrict_:function(n,t){var e=je(n,"a","notEqualStrict"),r=je(t,"b","notEqualStrict");return pe(e.shape,r.shape,"Error in notEqualStrict: "),e.notEqual(r)}});function Mc(n,t){for(var e=[],r=n;r<t;++r)e.push(r);return e}function _c(n){for(var t=[],e=0;e<n.length;++e)for(var r=0;r<n[e].length;++r)t.push(n[e][r]);return t}var Vs=Ve({gather_:function(n,t,e){e===void 0&&(e=0);var r=je(n,"x","gather"),i=je(t,"indices","gather","int32");e=ye(e,r.shape)[0];var a=function(s,u,l){for(var d=s.shape[l],A=[],I=1,O=1,z=0;z<l;z++)A.push(s.shape[z]),I*=s.shape[z];for(z=0;z<u.rank;z++)A.push(u.shape[z]);for(z=l+1;z<s.rank;z++)A.push(s.shape[z]),O*=s.shape[z];return{batchSize:I,sliceSize:O,dimSize:d,outputShape:A}}(r,i,e);return We.runKernelFunc(function(s,u){var l=s.gather(r,i.flatten(),e);return u([i]),l},{x:r,indices:i},function(s,u){var l=u[0];return{x:function(){var d=r.shape,A=l.size,I=d.slice(0,e),O=I.length,z=d.slice(e,d.length).slice(1),re=z.length,oe=Mc(0,O),ae=Mc(O+1,O+1+re),se=_c([I,[A],z]),be=s.reshape(se),Ae=l.reshape([A]),me=_c([[O],oe,ae]),Ce=be.transpose(me),Oe=Fc(Ce,Ae,r.shape[e]),Le=_t(me);return Oe=Oe.transpose(Le)},indices:function(){return l}}},"Gather",{axis:e}).reshape(a.outputShape)}}),Fc=Ve({unsortedSegmentSum_:function(n,t,e){var r=je(n,"x","unsortedSegmentSum"),i=je(t,"segmentIds","unsortedSegmentSum","int32");return q(ge(e),function(){return"numSegments must be of dtype int"}),We.runKernelFunc(function(a,s){var u=a.unsortedSegmentSum(r,i,e);return s([i]),u},{$x:r},function(a,s){var u=s[0];return{$x:function(){return function(l,d){for(var A=zs(d,Lr(d)),I=Vs(l,A),O=Nc(d,kt(0,"int32")),z=I.rank-O.rank,re=0;re<z;++re)O=xi(O,re+1);O=zo(O,Ma(I.shape,"bool"));var oe=Lr(I);return Ia(O,I,oe)}(a,u)}}})}}),rm=function(n,t,e){return C(this,void 0,void 0,function(){var r,i,a,s,u,l,d,A,I,O,z,re,oe;return E(this,function(ae){switch(ae.label){case 0:for(r=je(n,"tensor","boolMask"),i=je(t,"mask","boolMask","bool"),a=e==null?0:e,s=i.rank,u=r.shape,q(s>0,function(){return"mask cannot be scalar"}),pe(u.slice(a,a+s),i.shape,"mask's shape must match the first K dimensions of tensor's shape,"),l=1,d=a;d<a+s;d++)l*=u[d];return A=u.slice(0,a).concat([l],u.slice(a+s)),I=r.reshape(A),O=i.reshape([-1]),[4,jc(O)];case 1:return z=ae.sent(),re=z.squeeze([1]),oe=Vs(I,re,a),n!==r&&r.dispose(),t!==i&&i.dispose(),re.dispose(),I.dispose(),O.dispose(),z.dispose(),[2,oe]}})})};function Lc(n,t,e,r,i,a,s){a===void 0&&(a="NHWC"),q(n.length===t.rank,function(){return"Length of inShape ("+n.length+") and rank of dy ("+t.rank+") must match"});var u=n,l=t,d=!1;t.rank===3&&(d=!0,l=t.as4D(1,t.shape[0],t.shape[1],t.shape[2]),u=[1,n[0],n[1],n[2]]),q(u.length===4,function(){return"Error in conv2dDerInput: inShape must be length 4, but got length "+u.length+"."}),q(l.rank===4,function(){return"Error in conv2dDerInput: dy must be rank 4, but got rank "+l.rank}),q(e.rank===4,function(){return"Error in conv2dDerInput: filter must be rank 4, but got rank "+e.rank});var A=a==="NHWC"?u[3]:u[1],I=a==="NHWC"?l.shape[3]:l.shape[1];q(A===e.shape[2],function(){return"Error in conv2dDerInput: depth of input ("+A+") must match input depth for filter "+e.shape[2]+"."}),q(I===e.shape[3],function(){return"Error in conv2dDerInput: depth of output ("+I+") must match output depth for filter "+e.shape[3]+"."}),s!=null&&q(ge(i),function(){return"Error in conv2dDerInput: pad must be an integer when using, dimRoundingMode "+s+" but got pad "+i+"."});var O=Po(a),z=sa(u,e.shape,r,1,i,s,!1,O),re=We.runKernelFunc(function(oe,ae){var se=oe.conv2dDerInput(l,e,z);return ae([e,l]),se},{dy4D:l,filter:e},function(oe,ae){var se=ae[0],be=ae[1];return{dy4D:function(){return Ei(oe,se,r,i,a,1,s)},filter:function(){return Gs(oe,be,se.shape,r,i,a,s)}}});return d?re.as3D(re.shape[1],re.shape[2],re.shape[3]):re}function Hs(n){var t=function(a){return typeof a=="number"?[a,a,a]:a.length===2?[a[0],a[1],1]:a}(n),e=t[0],r=t[1],i=t[2];return e===1&&r===1&&i===1}function Uc(n,t,e,r,i){q(n.length===t.rank,function(){return"Length of inShape ("+n.length+") and rank of dy ("+t.rank+") must match"});var a=n,s=t,u=!1;t.rank===4&&(u=!0,s=t.as5D(1,t.shape[0],t.shape[1],t.shape[2],t.shape[3]),a=[1,n[0],n[1],n[2],n[3]]);var l=a[4],d=s.shape[4];q(a.length===5,function(){return"Error in conv3dDerInput: inShape must be length 5, but got length "+a.length+"."}),q(s.rank===5,function(){return"Error in conv3dDerInput: dy must be rank 5, but got rank "+s.rank}),q(e.rank===5,function(){return"Error in conv3dDerInput: filter must be rank 5, but got rank "+e.rank}),q(l===e.shape[3],function(){return"Error in conv3dDerInput: depth of input ("+l+") must match input depth for filter "+e.shape[3]+"."}),q(d===e.shape[4],function(){return"Error in conv3dDerInput: depth of output ("+d+") must match output depth for filter "+e.shape[4]+"."});var A=ao(a,e.shape,r,1,i),I=We.runKernelFunc(function(O){return O.conv3dDerInput(s,e,A)},{dy5D:s});return u?I.as4D(I.shape[1],I.shape[2],I.shape[3],I.shape[4]):I}var nm=Ve({conv1d_:function(n,t,e,r,i,a,s){i===void 0&&(i="NWC"),a===void 0&&(a=1);var u=je(n,"x","conv1d"),l=je(t,"filter","conv1d"),d=u,A=!1;u.rank===2&&(A=!0,d=u.as3D(1,u.shape[0],u.shape[1])),q(d.rank===3,function(){return"Error in conv1d: input must be rank 3, but got rank "+d.rank+"."}),q(l.rank===3,function(){return"Error in conv1d: filter must be rank 3, but got rank "+l.rank+"."}),s!=null&&q(ge(r),function(){return"Error in conv1d: pad must be an integer when using, dimRoundingMode "+s+" but got pad "+r+"."}),q(d.shape[2]===l.shape[1],function(){return"Error in conv1d: depth of input ("+d.shape[2]+") must match input depth for filter "+l.shape[1]+"."}),q(si(e,a),function(){return"Error in conv1D: Either stride or dilation must be 1. Got stride "+e+" and dilation '"+a+"'"}),q(i==="NWC",function(){return"Error in conv1d: got dataFormat of "+i+" but only NWC is currently supported."});var I=l.as4D(1,l.shape[0],l.shape[1],l.shape[2]),O=d.as4D(d.shape[0],1,d.shape[1],d.shape[2]),z=Ei(O,I,[1,e],r,"NHWC",[1,a],s);return A?z.as2D(z.shape[2],z.shape[3]):z.as3D(z.shape[0],z.shape[2],z.shape[3])}}),Ei=Ve({conv2d_:function(n,t,e,r,i,a,s){i===void 0&&(i="NHWC"),a===void 0&&(a=[1,1]);var u=je(n,"x","conv2d"),l=je(t,"filter","conv2d"),d=u,A=!1;u.rank===3&&(A=!0,d=u.as4D(1,u.shape[0],u.shape[1],u.shape[2])),q(d.rank===4,function(){return"Error in conv2d: input must be rank 4, but got rank "+d.rank+"."}),q(l.rank===4,function(){return"Error in conv2d: filter must be rank 4, but got rank "+l.rank+"."}),s!=null&&q(ge(r),function(){return"Error in conv2d: pad must be an integer when using, dimRoundingMode "+s+" but got pad "+r+"."});var I=i==="NHWC"?d.shape[3]:d.shape[1];q(I===l.shape[2],function(){return"Error in conv2d: depth of input ("+I+") must match input depth for filter "+l.shape[2]+"."}),q(si(e,a),function(){return"Error in conv2D: Either strides or dilations must be 1. Got strides "+e+" and dilations '"+a+"'"});var O=Po(i),z=sa(d.shape,l.shape,e,a,r,s,!1,O),re=[l,d],oe=We.runKernelFunc(function(ae,se){var be=ae.conv2d(d,l,z);return se([l,d]),be},{x:d,filter:l},function(ae,se){var be=se,Ae=be[0],me=be[1];return q(Ea(a),function(){return"Error in gradient of conv2D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '"+a+"'"}),{x:function(){return Wc(me.shape,ae,Ae,e,r,i)},filter:function(){return Gs(me,ae,Ae.shape,e,r,i)}}},"Conv2D",z,re);return A?oe.as3D(oe.shape[1],oe.shape[2],oe.shape[3]):oe}}),im=Ve({conv3d_:function(n,t,e,r,i,a){i===void 0&&(i="NDHWC"),a===void 0&&(a=[1,1,1]);var s=je(n,"x","conv3d"),u=je(t,"filter","conv3d"),l=s,d=!1;s.rank===4&&(d=!0,l=s.as5D(1,s.shape[0],s.shape[1],s.shape[2],s.shape[3])),q(l.rank===5,function(){return"Error in conv3d: input must be rank 5, but got rank "+l.rank+"."}),q(u.rank===5,function(){return"Error in conv3d: filter must be rank 5, but got rank "+u.rank+"."}),q(l.shape[4]===u.shape[3],function(){return"Error in conv3d: depth of input ("+l.shape[4]+") must match input depth for filter "+u.shape[3]+"."}),q(function(O,z){return Hs(O)||Hs(z)}(e,a),function(){return"Error in conv3D: Either strides or dilations must be 1. Got strides "+e+" and dilations '"+a+"'"}),q(i==="NDHWC",function(){return"Error in conv3d: got dataFormat of "+i+" but only NDHWC is currently supported."});var A=ao(l.shape,u.shape,e,a,r),I=We.runKernelFunc(function(O,z){var re=O.conv3d(l,u,A);return z([l,u]),re},{x:l,$filter:u},function(O,z){q(Hs(a),function(){return"Error in gradient of conv3D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '"+a+"'"});var re=z[0],oe=z[1];return{x:function(){return Uc(re.shape,O,oe,e,r)},$filter:function(){return function(ae,se,be,Ae,me){var Ce=ae;ae.rank===4&&(Ce=ae.as5D(1,ae.shape[0],ae.shape[1],ae.shape[2],ae.shape[3]));var Oe=se;Oe.rank===4&&(Oe=se.as5D(1,se.shape[0],se.shape[1],se.shape[2],se.shape[3])),q(Ce.rank===5,function(){return"Error in conv3dDerFilter: input must be rank 5, but got shape "+Ce.shape+"."}),q(Oe.rank===5,function(){return"Error in conv3dDerFilter: dy must be rank 5, but got shape "+Oe.shape+"."}),q(be.length===5,function(){return"Error in conv3dDerFilter: filterShape must be length 5, but got "+be+"."}),q(Ce.shape[4]===be[3],function(){return"Error in conv3dDerFilter: depth of input "+Ce.shape[4]+") must match input depth in filter ("+be[3]+"."}),q(Oe.shape[4]===be[4],function(){return"Error in conv3dDerFilter: depth of dy ("+Oe.shape[4]+") must match output depth for filter ("+be[4]+")."});var Le=ao(Ce.shape,be,Ae,1,me);return We.runKernelFunc(function(Ue){return Ue.conv3dDerFilter(Ce,Oe,Le)},{x5D:Ce,dy5D:Oe})}(re,O,oe.shape,e,r)}}});return d?I.as4D(I.shape[1],I.shape[2],I.shape[3],I.shape[4]):I}}),Gs=Ve({conv2dDerFilter_:function(n,t,e,r,i,a,s){a===void 0&&(a="NHWC");var u=n;n.rank===3&&(u=n.as4D(1,n.shape[0],n.shape[1],n.shape[2]));var l=t;l.rank===3&&(l=t.as4D(1,t.shape[0],t.shape[1],t.shape[2])),q(u.rank===4,function(){return"Error in conv2dDerFilter: input must be rank 4, but got shape "+u.shape+"."}),q(l.rank===4,function(){return"Error in conv2dDerFilter: dy must be rank 4, but got shape "+l.shape+"."}),q(e.length===4,function(){return"Error in conv2dDerFilter: filterShape must be length 4, but got "+e+"."});var d=a==="NHWC"?u.shape[3]:u.shape[1],A=a==="NHWC"?l.shape[3]:l.shape[1];q(d===e[2],function(){return"Error in conv2dDerFilter: depth of input "+d+") must match input depth in filter ("+e[2]+"."}),q(A===e[3],function(){return"Error in conv2dDerFilter: depth of dy ("+A+") must match output depth for filter ("+e[3]+")."}),s!=null&&q(ge(i),function(){return"Error in conv2dDerFilter: pad must be an integer when using, dimRoundingMode "+s+" but got pad "+i+"."});var I=Po(a),O=sa(u.shape,e,r,1,i,s,!1,I);return We.runKernelFunc(function(z){return z.conv2dDerFilter(u,l,O)},{x4D:u,dy4D:l})}}),Wc=Ve({conv2dDerInput_:Lc}),Ho=Ve({depthwiseConv2d_:function(n,t,e,r,i,a,s){i===void 0&&(i="NHWC"),a===void 0&&(a=[1,1]);var u=je(n,"x","depthwiseConv2d"),l=je(t,"filter","depthwiseConv2d"),d=u,A=!1;u.rank===3&&(A=!0,d=u.as4D(1,u.shape[0],u.shape[1],u.shape[2])),q(d.rank===4,function(){return"Error in depthwiseConv2d: input must be rank 4, but got rank "+d.rank+"."}),q(l.rank===4,function(){return"Error in depthwiseConv2d: filter must be rank 4, but got rank "+l.rank+"."}),q(d.shape[3]===l.shape[2],function(){return"Error in depthwiseConv2d: number of input channels ("+d.shape[3]+") must match the inChannels dimension in filter "+l.shape[2]+"."}),a==null&&(a=[1,1]),q(si(e,a),function(){return"Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides "+e+" and dilations '"+a+"'"}),s!=null&&q(ge(r),function(){return"Error in depthwiseConv2d: pad must be an integer when using, dimRoundingMode "+s+" but got pad "+r+"."});var I=sa(d.shape,l.shape,e,a,r,s,!0),O=[d,l],z=We.runKernelFunc(function(re,oe){var ae=re.depthwiseConv2D(d,l,I);return oe([d,l]),ae},{x:d,filter:l},function(re,oe){q(Ea(a),function(){return"Error in gradient of depthwiseConv2d: dilation rates greater than 1 are not yet supported. Got dilations '"+a+"'"});var ae=oe[0],se=oe[1];return{x:function(){return zc(ae.shape,re,se,I)},filter:function(){return Vc(ae,re,se.shape,I)}}},"DepthwiseConv2dNative",I,O);return A?z.as3D(z.shape[1],z.shape[2],z.shape[3]):z}}),zc=Ve({depthwiseConv2dDerInput_:function(n,t,e,r){var i=t,a=!1;t.rank===3&&(a=!0,i=t.as4D(1,t.shape[0],t.shape[1],t.shape[2]));var s=We.runKernelFunc(function(u){return u.depthwiseConv2DDerInput(i,e,r)},{dy4D:i});return a?s.as3D(s.shape[1],s.shape[2],s.shape[3]):s}}),Vc=Ve({depthwiseConv2dDerFilter_:function(n,t,e,r){var i=n;n.rank===3&&(i=n.as4D(1,n.shape[0],n.shape[1],n.shape[2]));var a=t;return a.rank===3&&(a=t.as4D(1,t.shape[0],t.shape[1],t.shape[2])),We.runKernelFunc(function(s){return s.depthwiseConv2DDerFilter(i,a,r)},{x4D:i,dy4D:a})}}),Qs=Ve({separableConv2d_:function(n,t,e,r,i,a,s){a===void 0&&(a=[1,1]),s===void 0&&(s="NHWC");var u=je(n,"x","separableConv2d"),l=je(t,"depthwiseFilter","separableConv2d"),d=je(e,"pointwiseFilter","separableConv2d"),A=u,I=!1;if(u.rank===3&&(I=!0,A=u.as4D(1,u.shape[0],u.shape[1],u.shape[2])),s==="NCHW")throw new Error("separableConv2d currently does not support dataFormat NCHW; only NHWC is supported");q(A.rank===4,function(){return"Error in separableConv2d: input must be rank 4, but got rank "+A.rank+"."}),q(l.rank===4,function(){return"Error in separableConv2d: depthwise filter must be rank 4, but got rank "+l.rank+"."}),q(d.rank===4,function(){return"Error in separableConv2d: pointwise filter must be rank 4, but got rank "+l.rank+"."}),q(d.shape[0]===1,function(){return"Error in separableConv2d: the first dimension of pointwise filter must be 1, but got "+d.shape[0]+"."}),q(d.shape[1]===1,function(){return"Error in separableConv2d: the second dimension of pointwise filter must be 1, but got "+d.shape[1]+"."});var O=l.shape[2],z=l.shape[3];q(d.shape[2]===O*z,function(){return"Error in separableConv2d: the third dimension of pointwise filter must be "+O*z+", but got "+d.shape[2]+"."});var re=Ho(A,l,r,i,s,a),oe=Ei(re,d,1,"valid",s);return I?oe.as3D(oe.shape[1],oe.shape[2],oe.shape[3]):oe}}),am=Ve({conv2dTranspose_:function(n,t,e,r,i,a){return Lc(e,je(n,"x","conv2dTranspose"),je(t,"filter","conv2dTranspose"),r,i,"NHWC",a)}}),om=Ve({conv3dTranspose_:function(n,t,e,r,i){return Uc(e,je(n,"x","conv3dTranspose"),je(t,"filter","conv3dTranspose"),r,i)}}),Go=Ve({matMul_:function(n,t,e,r){var i;e===void 0&&(e=!1),r===void 0&&(r=!1);var a=je(n,"a","matMul"),s=je(t,"b","matMul");i=Jt(a,s),a=i[0],s=i[1];var u=e?a.shape[a.rank-2]:a.shape[a.rank-1],l=r?s.shape[s.rank-1]:s.shape[s.rank-2],d=e?a.shape[a.rank-1]:a.shape[a.rank-2],A=r?s.shape[s.rank-2]:s.shape[s.rank-1],I=a.shape.slice(0,-2),O=s.shape.slice(0,-2),z=ce(I),re=ce(O);q(a.rank>=2&&s.rank>=2&&a.rank===s.rank,function(){return"Error in matMul: inputs must have the same rank of at least 2, got ranks "+a.rank+" and "+s.rank+"."}),q(fe(I,O),function(){return"Error in matMul: outer dimensions ("+I+") and ("+O+") of Tensors with shapes "+a.shape+" and "+s.shape+" must match."}),q(u===l,function(){return"Error in matMul: inner shapes ("+u+") and ("+l+") of Tensors with shapes "+a.shape+" and "+s.shape+" and transposeA="+e+" and transposeB="+r+" must match."});var oe=a.shape.slice(0,-2).concat([d,A]),ae=e?a.as3D(z,u,d):a.as3D(z,d,u),se=r?s.as3D(re,A,l):s.as3D(re,l,A),be={transposeA:e,transposeB:r};return We.runKernelFunc(function(Ae,me){var Ce=Ae.batchMatMul(ae,se,e,r);return me([ae,se]),Ce},{a:ae,b:se},function(Ae,me){var Ce=me,Oe=Ce[0],Le=Ce[1];return e||r?!e&&r?{a:function(){return Ae.matMul(Le,!1,!1)},b:function(){return Ae.matMul(Oe,!0,!1)}}:e&&!r?{a:function(){return Le.matMul(Ae,!1,!0)},b:function(){return Oe.matMul(Ae,!1,!1)}}:{a:function(){return Le.matMul(Ae,!0,!0)},b:function(){return Ae.matMul(Oe,!0,!0)}}:{a:function(){return Ae.matMul(Le,!1,!0)},b:function(){return Oe.matMul(Ae,!0,!1)}}},"BatchMatMul",be).reshape(oe)}}),sm=Ve({dot_:function(n,t){var e=je(n,"t1","dot"),r=je(t,"t2","dot");q(!(e.rank!==1&&e.rank!==2||r.rank!==1&&r.rank!==2),function(){return"Error in dot: inputs must all be rank 1 or 2, but got ranks "+e.rank+" and "+r.rank+"."});var i=e.rank===1?e.size:e.shape[1],a=r.rank===1?r.size:r.shape[0];return q(i===a,function(){return"Error in dot: inner dimensions of inputs must match, but got "+i+" and "+a+"."}),e.rank===1&&r.rank===1?e.as2D(1,-1).matMul(r.as2D(-1,1)).asScalar():e.rank===1&&r.rank===2?e.as2D(1,-1).matMul(r.as2D(r.shape[0],r.shape[1])).as1D():e.rank===2&&r.rank===1?e.matMul(r.as2D(-1,1)).as1D():e.matMul(r.as2D(r.shape[0],r.shape[1]))}}),um=Ve({outerProduct_:function(n,t){var e=je(n,"v1","outerProduct"),r=je(t,"v2","outerProduct");return q(e.rank===1&&r.rank===1,function(){return"Error in outerProduct: inputs must be rank 1, but got ranks "+e.rank+" and "+r.rank+"."}),e.as2D(-1,1).matMul(r.as2D(1,-1))}}),fo=Ve({reverse_:function(n,t){var e=je(n,"x","reverse");if(e.rank===0)return e.clone();var r=ye(t,e.shape);return We.runKernelFunc(function(i){return i.reverse(e,r)},{$x:e},function(i){return{$x:function(){return i.reverse(r)}}}).reshapeAs(e)}}),lm=Ve({reverse1d_:function(n){var t=je(n,"x","reverse");return q(t.rank===1,function(){return"Error in reverse1D: x must be rank 1 but got rank "+t.rank+"."}),fo(t,0)}}),cm=Ve({reverse2d_:function(n,t){var e=je(n,"x","reverse");return q(e.rank===2,function(){return"Error in reverse2D: x must be rank 2 but got rank "+e.rank+"."}),fo(e,t)}}),fm=Ve({reverse3d_:function(n,t){var e=je(n,"x","reverse");return q(e.rank===3,function(){return"Error in reverse3D: x must be rank 3 but got rank "+e.rank+"."}),fo(e,t)}}),dm=Ve({reverse4d_:function(n,t){var e=je(n,"x","reverse");return q(e.rank===4,function(){return"Error in reverse4D: x must be rank 4 but got rank "+e.rank+"."}),fo(e,t)}});function Hc(n,t,e,r,i,a){var s=je(n,"x","maxPool"),u=s,l=!1;s.rank===3&&(l=!0,u=s.as4D(1,s.shape[0],s.shape[1],s.shape[2])),r==null&&(r=[1,1]),q(u.rank===4,function(){return"Error in maxPool: input must be rank 4 but got rank "+u.rank+"."}),q(si(e,r),function(){return"Error in maxPool: Either strides or dilations must be 1. Got strides "+e+" and dilations '"+r+"'"}),a!=null&&q(ge(i),function(){return"Error in maxPool: pad must be an integer when using, dimRoundingMode "+a+" but got pad "+i+"."});var d=Fa(u.shape,t,e,r,i,a);if(d.filterWidth===1&&d.filterHeight===1&&fe(d.inShape,d.outShape))return s.clone();var A=[u],I=We.runKernelFunc(function(O,z){var re=O.maxPool(u,d);return z([u,re]),re},{x:u},function(O,z){var re=z[0],oe=z[1];return{x:function(){return function(ae,se,be,Ae,me,Ce,Oe,Le){var Ue=je(ae,"dy","maxPoolBackprop"),Ne=je(se,"input","maxPoolBackprop"),Fe=je(be,"output","maxPoolBackprop");q(Ne.rank===Ue.rank,function(){return"Rank of input ("+Ne.rank+") does not match rank of dy ("+Ue.rank+")"}),Ce==null&&(Ce=[1,1]),q(si(me,Ce),function(){return"Error in maxPoolBackProp: Either strides or dilations must be 1. Got strides "+me+" and dilations '"+Ce+"'"}),q(Ue.rank===4,function(){return"Error in maxPoolBackprop: dy must be rank 4 but got rank "+Ue.rank+"."}),q(Ne.rank===4,function(){return"Error in maxPoolBackprop: input must be rank 4 but got rank "+Ne.rank+"."}),Le!=null&&q(ge(Oe),function(){return"Error in maxPoolBackprop: pad must be an integer when using, dimRoundingMode "+Le+" but got pad "+Oe+"."});var Ze=Fa(Ne.shape,Ae,me,Ce,Oe,Le);return We.runKernelFunc(function(Ke){return Ke.maxPoolBackprop(Ue,Ne,Fe,Ze)},{$dy:Ue,$input:Ne})}(O,re,oe,t,e,r,i)}}},"MaxPool",d,A);return l?I.as3D(I.shape[1],I.shape[2],I.shape[3]):I}function Gc(n,t,e,r,i,a){var s=je(n,"x","avgPool","float32");r==null&&(r=[1,1]),q(si(e,r),function(){return"Error in avgPool: Either strides or dilations must be 1. Got strides "+e+" and dilations '"+r+"'"});var u=s,l=!1;s.rank===3&&(l=!0,u=s.as4D(1,s.shape[0],s.shape[1],s.shape[2])),q(u.rank===4,function(){return"Error in avgPool: x must be rank 4 but got rank "+u.rank+"."}),a!=null&&q(ge(i),function(){return"Error in avgPool: pad must be an integer when using, dimRoundingMode "+a+" but got pad "+i+"."});var d=Fa(u.shape,t,e,r,i,a);if(d.filterWidth===1&&d.filterHeight===1&&fe(d.inShape,d.outShape))return s.clone();var A=We.runKernelFunc(function(I){return I.avgPool(u,d)},{x:u},function(I){return{x:function(){return function(O,z,re,oe,ae,se){var be=je(O,"dy","avgPoolBackprop"),Ae=je(z,"input","avgPoolBackprop");q(Ae.rank===be.rank,function(){return"Rank of input ("+Ae.rank+") does not match rank of dy ("+be.rank+")"}),ae==null&&(ae=[1,1]),q(si(oe,ae),function(){return"Error in avgPoolBackprop: Either strides or dilations must be 1. Got strides "+oe+" and dilations '"+ae+"'"});var me=Ae,Ce=be,Oe=!1;Ae.rank===3&&(Oe=!0,me=Ae.as4D(1,Ae.shape[0],Ae.shape[1],Ae.shape[2]),Ce=be.as4D(1,be.shape[0],be.shape[1],be.shape[2])),q(Ce.rank===4,function(){return"Error in avgPoolBackprop: dy must be rank 4 but got rank "+Ce.rank+"."}),q(me.rank===4,function(){return"Error in avgPoolBackprop: input must be rank 4 but got rank "+me.rank+"."});var Le=Fa(me.shape,re,oe,ae,se),Ue=We.runKernelFunc(function(Ne){return Ne.avgPoolBackprop(Ce,me,Le)},{dy4D:Ce,input4D:me});return Oe?Ue.as3D(Ue.shape[1],Ue.shape[2],Ue.shape[3]):Ue}(I,u,t,e,r,i)}}},"AvgPool",d);return A=A.cast(s.dtype),l?A.as3D(A.shape[1],A.shape[2],A.shape[3]):A}var Vn=Ve({maxPool_:function(n,t,e,r,i){return Hc(n,t,e,1,r,i)}}),po=Ve({avgPool_:function(n,t,e,r,i){return Gc(n,t,e,1,r,i)}}),pm=Ve({pool_:function(n,t,e,r,i,a){i==null&&(i=[1,1]),a==null&&(a=1),r===0&&(r="valid");var s=je(n,"x","maxPool"),u=s,l=!1;s.rank===3&&(l=!0,u=s.as4D(1,s.shape[0],s.shape[1],s.shape[2])),q(si(a,i),function(){return"Error in pool: Either strides or dilations must be 1. Got strides "+a+" and dilations '"+i+"'"});var d,A=Fa(u.shape,t,a,i,r),I=[A.dilationHeight,A.dilationWidth];d=r==="same"?function(me,Ce){var Oe=me.map(function(Ne,Fe){return Ne+(Ne-1)*(Ce[Fe]-1)}).map(function(Ne){return Ne-1}),Le=Oe.map(function(Ne){return Math.floor(Ne/2)}),Ue=Oe.map(function(Ne,Fe){return Ne-Le[Fe]});return Oe.map(function(Ne,Fe){return[Le[Fe],Ue[Fe]]})}([A.filterHeight,A.filterWidth],I):[[0,0],[0,0]];var O=I[0]===1&&I[1]===1,z=function(me,Ce,Oe){var Le=Oe.map(function(tt){return tt[0]}),Ue=Oe.map(function(tt){return tt[1]}),Ne=me.concat(Le,Ue),Fe=Ce.map(function(tt,ct){return(tt-Ne[ct]%tt)%tt}),Ze=Ue.map(function(tt,ct){return tt+Fe[ct]}),Ke=Ce.map(function(tt,ct){return[Le[ct],Ze[ct]]}),et=Ce.map(function(tt,ct){return[0,Fe[ct]]});return[Ke,et]}([A.inHeight,A.inWidth],I,d),re=z[0],oe=z[1],ae=O?r:"valid",se=O?u:hl(u,I,re),be=(e==="avg"?function(){return Gc(se,t,a,1,ae)}:function(){return Hc(se,t,a,1,ae)})(),Ae=O?be:fl(be,I,oe);return l?Ae.as3D(Ae.shape[1],Ae.shape[2],Ae.shape[3]):Ae}}),hm=Ve({maxPool3d_:function(n,t,e,r,i,a,s){a===void 0&&(a="NDHWC");var u=je(n,"x","maxPool3d"),l=u,d=!1;u.rank===4&&(d=!0,l=u.as5D(1,u.shape[0],u.shape[1],u.shape[2],u.shape[3])),s==null&&(s=[1,1,1]),q(l.rank===5,function(){return"Error in maxPool3d: x must be rank 5 but got rank "+l.rank+"."}),q(a==="NDHWC",function(){return"Error in maxPool3d: Only NDHWC is currently supported, but got dataFormat of "+a}),q(si(e,s),function(){return"Error in maxPool3d: Either strides or dilations must be 1. Got strides "+e+" and dilations '"+s+"'"}),i!=null&&q(ge(r),function(){return"Error in maxPool3d: pad must be an integer when using, dimRoundingMode "+i+" but got pad "+r+"."});var A=io(l.shape,t,e,s,r,i,a),I=We.runKernelFunc(function(O,z){var re=O.maxPool3d(l,A);return z([l,re]),re},{x:l},function(O,z){var re=z[0],oe=z[1];return{x:function(){return function(ae,se,be,Ae,me,Ce,Oe,Le){var Ue=je(ae,"dy","maxPool3dBackprop"),Ne=je(se,"input","maxPool3dBackprop"),Fe=je(be,"output","maxPool3dBackprop"),Ze=Ue,Ke=Ne,et=Fe,tt=!1;Ne.rank===4&&(tt=!0,Ze=Ue.as5D(1,Ue.shape[0],Ue.shape[1],Ue.shape[2],Ue.shape[3]),Ke=Ne.as5D(1,Ne.shape[0],Ne.shape[1],Ne.shape[2],Ne.shape[3]),et=Fe.as5D(1,Fe.shape[0],Fe.shape[1],Fe.shape[2],Fe.shape[3])),q(Ze.rank===5,function(){return"Error in maxPool3dBackprop: dy must be rank 5 but got rank "+Ze.rank+"."}),q(Ke.rank===5,function(){return"Error in maxPool3dBackprop: input must be rank 5 but got rank "+Ke.rank+"."}),q(et.rank===5,function(){return"Error in maxPool3dBackprop: output must be rank 5 but got rank "+et.rank+"."}),Ce==null&&(Ce=[1,1,1]),q(si(me,Ce),function(){return"Error in maxPool3dBackprop: Either strides or dilations must be 1. Got strides "+me+" and dilations '"+Ce+"'"}),Le!=null&&q(ge(Oe),function(){return"Error in maxPool3dBackprop: pad must be an integer when using, dimRoundingMode "+Le+" but got pad "+Oe+"."});var ct=io(Ke.shape,Ae,me,Ce,Oe,Le),bt=We.runKernelFunc(function(gt){return gt.maxPool3dBackprop(Ze,Ke,et,ct)},{dy5D:Ze,input5D:Ke});return tt?bt.as4D(bt.shape[1],bt.shape[2],bt.shape[3],bt.shape[4]):bt}(O,re,oe,t,e,s,r,i)}}});return d?I.as4D(I.shape[1],I.shape[2],I.shape[3],I.shape[4]):I}}),vm=Ve({avgPool3d_:function(n,t,e,r,i,a,s){a===void 0&&(a="NDHWC");var u=je(n,"x","avgPool3d","float32"),l=u,d=!1;u.rank===4&&(d=!0,l=u.as5D(1,u.shape[0],u.shape[1],u.shape[2],u.shape[3])),s==null&&(s=[1,1,1]),q(l.rank===5,function(){return"Error in avgPool3d: x must be rank 5 but got rank "+l.rank+"."}),q(a==="NDHWC",function(){return"Error in avgPool3d: Only NDHWC is currently supported, but got dataFormat of "+a}),q(si(e,s),function(){return"Error in avgPool3d: Either strides or dilations must be 1. Got strides "+e+" and dilations '"+s+"'"}),i!=null&&q(ge(r),function(){return"Error in avgPool3d: pad must be an integer when using, dimRoundingMode "+i+" but got pad "+r+"."});var A=io(l.shape,t,e,s,r,i,a),I=We.runKernelFunc(function(O){return O.avgPool3d(l,A)},{x:l},function(O){return{x:function(){return function(z,re,oe,ae,se,be,Ae){var me=je(z,"dy","avgPool3dBackprop"),Ce=je(re,"input","avgPool3dBackprop"),Oe=me,Le=Ce,Ue=!1;Ce.rank===4&&(Ue=!0,Oe=me.as5D(1,me.shape[0],me.shape[1],me.shape[2],me.shape[3]),Le=Ce.as5D(1,Ce.shape[0],Ce.shape[1],Ce.shape[2],Ce.shape[3])),q(Oe.rank===5,function(){return"Error in avgPool3dBackprop: dy must be rank 5 but got rank "+Oe.rank+"."}),q(Le.rank===5,function(){return"Error in avgPool3dBackprop: input must be rank 5 but got rank "+Le.rank+"."}),se==null&&(se=[1,1,1]),q(si(ae,se),function(){return"Error in avgPool3dBackprop: Either strides or dilations must be 1. Got strides "+ae+" and dilations '"+se+"'"}),Ae!=null&&q(ge(be),function(){return"Error in maxPool3dBackprop: pad must be an integer when using, dimRoundingMode "+Ae+" but got pad "+be+"."});var Ne=io(Le.shape,oe,ae,se,be,Ae),Fe=We.runKernelFunc(function(Ze){return Ze.avgPool3dBackprop(Oe,Le,Ne)},{dy5D:Oe,input5D:Le});return Ue?Fe.as4D(Fe.shape[1],Fe.shape[2],Fe.shape[3],Fe.shape[4]):Fe}(O,l,t,e,s,r,i)}}});return I=I.cast(l.dtype),d?I.as4D(I.shape[1],I.shape[2],I.shape[3],I.shape[4]):I}}),Ni=Ve({slice_:function(n,t,e){var r,i,a=je(n,"x","slice");if(a.rank===0)throw new Error("Slicing scalar is not possible");(r=typeof t=="number"?[t].concat(new Array(a.rank-1).fill(0)):t.length<a.rank?t.concat(new Array(a.rank-t.length).fill(0)):t.slice()).forEach(function(l){q(l!==-1,function(){return"slice() does not support negative begin indexing."})}),i=(i=e==null?new Array(a.rank).fill(-1):typeof e=="number"?[e].concat(new Array(a.rank-1).fill(-1)):e.length<a.rank?e.concat(new Array(a.rank-e.length).fill(-1)):e).map(function(l,d){return l>=0?l:(q(l===-1,function(){return"Negative size values should be exactly -1 but got "+l+" for the slice() size at index "+d+"."}),a.shape[d]-r[d])}),wl(a,r,i);var s=a.shape,u={begin:r,size:i};return We.runKernelFunc(function(l){return l.slice(a,r,i)},{x:a},function(l){for(var d=[],A=0;A<l.rank;A++)d.push([r[A],s[A]-r[A]-i[A]]);return{x:function(){return l.pad(d)}}},"Slice",u)}}),mm=Ve({slice1d_:function(n,t,e){var r=je(n,"x","slice1d");return q(r.rank===1,function(){return"slice1d expects a rank-1 tensor, but got a rank-"+r.rank+" tensor"}),Ni(r,[t],[e])}}),gm=Ve({slice2d_:function(n,t,e){var r=je(n,"x","slice2d");return q(r.rank===2,function(){return"slice2d expects a rank-2 tensor, but got a rank-"+r.rank+" tensor"}),Ni(r,t,e)}}),Qc=Ve({slice3d_:function(n,t,e){var r=je(n,"x","slice3d");return q(r.rank===3,function(){return"slice3d expects a rank-3 tensor, but got a rank-"+r.rank+" tensor"}),Ni(r,t,e)}}),ym=Ve({slice4d_:function(n,t,e){var r=je(n,"x","slice4d");return q(r.rank===4,function(){return"slice4d expects a rank-4 tensor, but got a rank-"+r.rank+" tensor"}),Ni(r,t,e)}});function Xc(n,t,e,r,i){return t.rank<e.rank&&(t=t.reshape(Dn(t.shape,r))),n.rank<e.rank&&(n=n.reshape(Dn(n.shape,r))),{x:function(){var a=n.mul(e.equal(t).cast(n.dtype));return i==null?a:a.transpose(i)}}}var bm=Ve({all_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=je(n,"x","all","bool"),i=ye(t,r.shape),a=i,s=oi(a,r.rank);s!=null&&(r=r.transpose(s),a=Ht(a.length,r.rank));var u=We.runKernelFunc(function(d){return d.all(r,a)},{$x:r});if(e){var l=Dn(u.shape,i);return u.reshape(l)}return u}}),wm=Ve({any_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=je(n,"x","any","bool"),i=ye(t,r.shape),a=i,s=oi(a,r.rank);s!=null&&(r=r.transpose(s),a=Ht(a.length,r.rank));var u=We.runKernelFunc(function(d){return d.any(r,a)},{$x:r});if(e){var l=Dn(u.shape,i);return u.reshape(l)}return u}}),Am=Ve({argMax_:function(n,t){t===void 0&&(t=0);var e=je(n,"x","argMax");t==null&&(t=0);var r=ye(t,e.shape),i=oi(r,e.rank);i!=null&&(e=e.transpose(i),r=Ht(r.length,e.rank));var a={axis:r[0]},s=[e];return We.runKernelFunc(function(u,l){var d=u.argMax(e,r[0]);return l([e]),d},{x:e},function(u,l){var d=l[0];return{x:function(){return Lr(d)}}},"ArgMax",a,s)}}),xm=Ve({argMin_:function(n,t){t===void 0&&(t=0);var e=je(n,"x","argMin");t==null&&(t=0);var r=ye(t,e.shape),i=oi(r,e.rank);return i!=null&&(e=e.transpose(i),r=Ht(r.length,e.rank)),We.runKernelFunc(function(a,s){var u=a.argMin(e,r[0]);return s([e]),u},{$x:e},function(a,s){var u=s[0];return{$x:function(){return Lr(u)}}})}}),Em=Ve({logSumExp_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=je(n,"x","logSumExp"),i=ye(t,r.shape),a=r.max(i,!0),s=r.sub(a).exp().sum(i).log(),u=a.reshape(s.shape).add(s);if(e){var l=Dn(u.shape,i);return u.reshape(l)}return u}}),Qo=Ve({max_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=je(n,"x","max"),i=r,a=ye(t,r.shape),s=a,u=oi(s,r.rank);u!=null&&(r=r.transpose(u),s=Ht(s.length,r.rank));var l=[r],d=We.runKernelFunc(function(I,O){var z=I.max(r,s);return O([i,z]),z},{x:r},function(I,O){return Xc(I,O[1],O[0],a,u)},"Max",{axes:s},l,[!0]);if(e){var A=Dn(d.shape,a);d=d.reshape(A)}return d}}),Cm=Ve({mean_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=je(n,"x","mean"),i=ye(t,r.shape),a=ce(En(r.shape,i)[1]);return ko(function(s){var u=kt(a);return{value:(u.dtype===s.dtype?s:s.cast(u.dtype)).div(u).sum(t,e),gradFunc:function(l){var d=s.shape.slice();return i.forEach(function(A){d[A]=1}),l.reshape(d).mul(Ma(s.shape,"float32")).div(a)}}})(r)}}),Sm=Ve({min_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=je(n,"x","min"),i=r,a=ye(t,r.shape),s=a,u=oi(s,r.rank);u!=null&&(r=r.transpose(u),s=Ht(s.length,r.rank));var l=[r],d=We.runKernelFunc(function(I,O){var z=I.min(r,s);return O([i,z]),z},{x:r},function(I,O){return Xc(I,O[1],O[0],a,u)},"Min",{axes:s},l,[!0]);if(e){var A=Dn(d.shape,a);d=d.reshape(A)}return d}}),Im=Ve({moments_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=ye(t,(n=je(n,"x","moments")).shape),i=n.mean(r,e),a=i.shape;e||(a=Dn(i.shape,r));var s=n.toFloat().sub(i.reshape(a)).square();return{mean:i,variance:s.mean(r,e)}}}),Kc=Ve({sum_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=je(n,"x","sum");r.dtype==="bool"&&(r=r.toInt());var i=ye(t,r.shape);return ko(function(a){var s=oi(i,a.rank),u=i,l=a;s!=null&&(l=a.transpose(s),u=Ht(u.length,a.rank));var d=function(z){var re=a.shape.slice();return i.forEach(function(oe){re[oe]=1}),z.reshape(re).mul(Ma(a.shape,"float32"))},A={axes:u},I=We.runKernelFunc(function(z){return z.sum(l,u)},{x:l},function(z){return{x:function(){return d(z)}}},"Sum",A);if(e){var O=Dn(I.shape,i);I=I.reshape(O)}return{value:I,gradFunc:d}})(r)}}),Tm=Ve({prod_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=je(n,"x","prod");r.dtype==="bool"&&(r=r.toInt());var i=ye(t,r.shape),a=oi(i,r.rank),s=i,u=r;a!=null&&(u=r.transpose(a),s=Ht(s.length,r.rank));var l=We.runKernelFunc(function(A){return A.prod(u,s)},{permutedX:u});if(e){var d=Dn(l.shape,i);l=l.reshape(d)}return l}}),Zc=Ve({elu_:function(n){var t=je(n,"x","elu");return We.runKernelFunc(function(e,r){var i=e.elu(t);return r([i]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return We.runKernelFunc(function(a){return a.eluDer(e,i)},{dy:e,y:i})}}})}}),Rm=Ve({leakyRelu_:function(n,t){t===void 0&&(t=.2);var e=je(n,"x","leakyRelu");return zs(kt(t).mul(e),e)}}),Jc=Ve({prelu_:function(n,t){var e=je(n,"x","prelu"),r=je(t,"alpha","prelu");return We.runKernelFunc(function(i,a){var s=i.prelu(e,r);return a([e,r]),s},{x:e,alpha:r},function(i,a){var s=a[0],u=a[1],l=s.greater(0);return{x:function(){return Ia(l,i,i.mul(u))},alpha:function(){var d=Ia(l,Lr(i),i.mul(s)),A=kn(u.shape,i.shape);return A.length>0&&(d=d.sum(A)),d.reshape(u.shape)}}},"Prelu")}}),wn=Ve({relu_:function(n){var t=je(n,"x","relu");return t.dtype==="bool"?t.toInt():We.runKernelFunc(function(e,r){var i=e.relu(t);return r([t]),i},{x:t},function(e,r){var i=r[0];return{x:function(){return e.mulStrict(i.step().toFloat())}}},"Relu")}}),Yc=Ve({relu6_:function(n){var t=je(n,"x","relu6");return t.dtype==="bool"?t.toInt():We.runKernelFunc(function(e,r){var i=e.relu6(t);return r([t]),i},{x:t},function(e,r){var i=r[0],a=i.lessEqual(6).mul(i.step());return{x:function(){return e.mulStrict(a.toFloat())}}},"Relu6")}}),Om=Ve({selu_:function(n){var t=je(n,"x","selu");return We.runKernelFunc(function(e,r){var i=e.selu(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){var a=i.greater(kt(0)),s=kt(Fs),u=kt(Ls),l=e.mul(u),d=e.mul(s).mul(i.toFloat().exp());return Ia(a,l,d)}}})}}),ua=Ve({transpose_:function(n,t){var e=je(n,"x","transpose");if(t==null&&(t=e.shape.map(function(i,a){return a}).reverse()),q(e.rank===t.length,function(){return"Error in transpose: rank of input "+e.rank+" must match length of perm "+t+"."}),t.forEach(function(i){q(i>=0&&i<e.rank,function(){return"All entries in 'perm' must be between 0 and "+(e.rank-1)+" but got "+t})}),e.rank<=1)return e.clone();var r={perm:t};return We.runKernelFunc(function(i){return i.transpose(e,t)},{x:e},function(i){var a=_t(t);return{x:function(){return i.transpose(a)}}},"Transpose",r)}}),km=Ve({localResponseNormalization_:function(n,t,e,r,i){t===void 0&&(t=5),e===void 0&&(e=1),r===void 0&&(r=1),i===void 0&&(i=.5);var a=je(n,"x","localResponseNormalization");q(a.rank===4||a.rank===3,function(){return`Error in localResponseNormalization: x must be rank 3 or 4 but got
rank `+a.rank+"."}),q(ge(t),function(){return"Error in localResponseNormalization: depthRadius must be an integer but got depthRadius "+t+"."});var s=a,u=!1;a.rank===3&&(u=!0,s=a.as4D(1,a.shape[0],a.shape[1],a.shape[2]));var l=We.runKernelFunc(function(d,A){var I=d.localResponseNormalization4D(s,t,e,r,i);return A([s,I]),I},{x4D:s},function(d,A){var I=A[0],O=A[1];return{x4D:function(){return We.runKernelFunc(function(z){return z.LRNGrad(d,I,O,t,e,r,i)},{})}}});return u?l.as3D(l.shape[1],l.shape[2],l.shape[3]):l}}),$c=Ve({norm_:function(n,t,e,r){t===void 0&&(t="euclidean"),e===void 0&&(e=null),r===void 0&&(r=!1);var i=function u(l,d,A){if(A===void 0&&(A=null),l.rank===0)return l.abs();if(l.rank!==1&&A===null)return u(l.reshape([-1]),d,A);if(l.rank===1||typeof A=="number"||Array.isArray(A)&&A.length===1){if(d===1)return l.abs().sum(A);if(d===1/0)return l.abs().max(A);if(d===-1/0)return l.abs().min(A);if(d==="euclidean"||d===2)return l.abs().pow(kt(2,"int32")).sum(A).sqrt();throw new Error("Error in norm: invalid ord value: "+d)}if(Array.isArray(A)&&A.length===2){if(d===1)return l.abs().sum(A[0]).max(A[1]-1);if(d===1/0)return l.abs().sum(A[1]).max(A[0]);if(d===-1/0)return l.abs().sum(A[1]).min(A[0]);if(d==="fro"||d==="euclidean")return l.square().sum(A).sqrt();throw new Error("Error in norm: invalid ord value: "+d)}throw new Error("Error in norm: invalid axis: "+A)}(n=je(n,"x","norm"),t,e),a=i.shape;if(r){var s=ye(e,n.shape);a=Dn(i.shape,s)}return i.reshape(a)}}),jm=Ve({basicLSTMCell_:function(n,t,e,r,i,a){var s=je(n,"forgetBias","basicLSTMCell"),u=je(t,"lstmKernel","basicLSTMCell"),l=je(e,"lstmBias","basicLSTMCell"),d=je(r,"data","basicLSTMCell"),A=je(i,"c","basicLSTMCell"),I=je(a,"h","basicLSTMCell"),O=d.concat(I,1).matMul(u).add(l),z=O.shape[0],re=O.shape[1]/4,oe=[z,re],ae=O.slice([0,0],oe),se=O.slice([0,re],oe),be=O.slice([0,2*re],oe),Ae=O.slice([0,3*re],oe),me=ae.sigmoid().mulStrict(se.tanh()).addStrict(A.mulStrict(s.add(be).sigmoid())),Ce=me.tanh().mulStrict(Ae.sigmoid());return[me,Ce]}}),Dm=Ve({multiRNNCell_:function(n,t,e,r){for(var i=je(t,"data","multiRNNCell"),a=ai(e,"c","multiRNNCell"),s=ai(r,"h","multiRNNCell"),u=i,l=[],d=0;d<n.length;d++){var A=n[d](u,a[d],s[d]);l.push(A[0]),l.push(A[1]),u=A[1]}var I=[],O=[];for(d=0;d<l.length;d+=2)I.push(l[d]),O.push(l[d+1]);return[I,O]}}),Pm=Ve({movingAverage_:function(n,t,e,r,i){i===void 0&&(i=!0);var a=je(n,"v","movingAverage"),s=je(t,"x","movingAverage"),u=je(e,"decay","movingAverage");Xr(a,s),q(fe(a.shape,s.shape),function(){return"Shape mismatch in v and x"});var l=kt(1),d=l.sub(u),A=s.sub(a).mul(d);if(i){q(r!=null,function(){return"When using zeroDebias: true, step is required."});var I=je(r,"step","movingAverage");A=A.div(l.sub(Vo(u,I)))}return a.add(A)}}),Bm=Ve({stridedSlice_:function(n,t,e,r,i,a,s,u,l){if(i===void 0&&(i=0),a===void 0&&(a=0),s===void 0&&(s=0),u===void 0&&(u=0),l===void 0&&(l=0),r==null&&(r=new Array(t.length)),s!==0)throw new Error("ellipsis mask is not yet supported");var d=je(n,"x","stridedSlice"),A=ws(u),I=d.shape.slice();A.forEach(function(ae){t[ae]=0,e[ae]=1,I.splice(ae,0,1)}),d=d.reshape(I);for(var O=0;O<d.rank;O++)t[O]=Al(i,t,r,d.shape,O),e[O]=xl(a,e,r,d.shape,O),r[O]=r[O]||1;var z=ws(l);z.forEach(function(ae){e[ae]=t[ae]+1,r[ae]=1});var re=Oo(t,e,r),oe=re.filter(function(ae,se){return z.indexOf(se)===-1});return r.every(function(ae){return ae===1})?Ni(d,t,re).reshape(oe):We.runKernelFunc(function(ae){return ae.stridedSlice(d,t,e,r)},{$x:d}).reshape(oe)}}),Nm=Ve({topk_:function(n,t,e){t===void 0&&(t=1),e===void 0&&(e=!0);var r=je(n,"x","topk");if(r.rank===0)throw new Error("topk() expects the input to be of rank 1 or higher");var i=r.shape[r.shape.length-1];if(t>i)throw new Error("'k' passed to topk() must be <= the last dimension ("+i+") but got "+t);var a=We.runKernelFunc(function(s){return s.topk(r,t,e)},{$x:r});return{values:a[0],indices:a[1]}}}),Mm=Ve({scatterND_:function(n,t,e){var r=je(n,"indices","scatterND","int32"),i=je(t,"updates","scatterND");return bl(i,r,e),We.runKernelFunc(function(a){return a.scatterND(r,i,e)},{indices:r,updates:i},null,"ScatterNd",{shape:e})}}),Xs=Ve({fft_:function(n){q(n.dtype==="complex64",function(){return"The dtype for tf.spectral.fft() must be complex64 but got "+n.dtype+"."});var t=n.shape[n.shape.length-1],e=n.size/t,r=n.as2D(e,t);return We.runKernelFunc(function(i){return i.fft(r)},{input:n}).reshape(n.shape)}}),Xo=Ve({ifft_:function(n){q(n.dtype==="complex64",function(){return"The dtype for tf.spectral.ifft() must be complex64 but got "+n.dtype+"."});var t=n.shape[n.shape.length-1],e=n.size/t,r=n.as2D(e,t);return We.runKernelFunc(function(i){return i.ifft(r)},{input:n}).reshape(n.shape)}}),Ks=Ve({rfft_:function(n,t){q(n.dtype==="float32",function(){return"The dtype for rfft() must be real value but got "+n.dtype});var e,r=n.shape[n.shape.length-1],i=n.size/r;if(t!=null&&t<r){var a=n.shape.map(function(se){return 0}),s=n.shape.map(function(se){return se});s[n.shape.length-1]=t,e=n.slice(a,s),r=t}else if(t!=null&&t>r){var u=n.shape.map(function(se){return se});u[n.shape.length-1]=t-r,e=n.concat(pn(u),n.shape.length-1),r=t}else e=n;var l=e.zerosLike(),d=Cn(e,l).as2D(i,r),A=Xs(d),I=Math.floor(r/2)+1,O=$n(A),z=vi(A),re=O.split([I,r-I],O.shape.length-1),oe=z.split([I,r-I],z.shape.length-1),ae=e.shape.slice();return ae[e.shape.length-1]=I,Cn(re[0],oe[0]).reshape(ae)}}),qc=Ve({irfft_:function(n){var t=n.shape[n.shape.length-1],e=n.size/t;if(t<=2){var r=n.as2D(e,t),i=Xo(r);return $n(i)}var a=[e,2*(t-1)],s=$n(n).as2D(e,t),u=vi(n).as2D(e,t),l=s.slice([0,1],[e,t-2]).reverse(1),d=u.slice([0,1],[e,t-2]).reverse(1).mul(kt(-1)),A=s.concat(l,1),I=u.concat(d,1);return r=Cn(A,I).as2D(a[0],a[1]),i=Xo(r),$n(i)}}),_m=Object.freeze({fft:Xs,ifft:Xo,rfft:Ks,irfft:qc}),Fm=Ve({sparseToDense_:function(n,t,e,r){r===void 0&&(r=0);var i=je(n,"sparseIndices","sparseToDense","int32"),a=je(t,"sparseValues","sparseToDense"),s=je(r,"defaultValue","sparseToDense",a.dtype);return function(u,l,d,A){if(u.dtype!=="int32")throw new Error("tf.sparseToDense() expects the indices to be int32 type, but the dtype was "+u.dtype+".");if(u.rank>2)throw new Error("sparseIndices should be a scalar, vector, or matrix, but got shape "+u.shape+".");var I=u.rank>0?u.shape[0]:1,O=u.rank>1?u.shape[1]:1;if(d.length!==O)throw new Error("outputShape has incorrect number of elements:, "+d.length+", should be: "+O+".");var z=l.size;if(l.rank!==0&&(l.rank!==1||z!==I))throw new Error("sparseValues has incorrect shape "+l.shape+", should be [] or ["+I+"]");if(l.dtype!==A.dtype)throw new Error("sparseValues.dtype must match defaultValues.dtype")}(i,a,e,s),We.runKernelFunc(function(u){return u.sparseToDense(i,a,e,s)},{$sparseIndices:i,$sparseValues:a,$defaultValue:s})}}),Lm=Ve({gatherND_:function(n,t){var e=je(t,"indices","gatherND","int32"),r=je(n,"x","gatherND");return We.runKernelFunc(function(i){return i.gatherND(r,e)},{x:r,indices:e},null,"GatherNd")}}),Um=Ve({diag_:function(n){var t=je(n,"x","diag").flatten(),e=n.shape.concat(n.shape);return We.runKernelFunc(function(r){return r.diag(t)},{$x:t}).reshape(e)}}),Wm=Ve({dropout_:function(n,t,e,r){var i=je(n,"x","dropout");if(q(i.dtype==="float32",function(){return"x has to be a floating point tensor since it's going to be scaled, but got a "+i.dtype+" tensor instead."}),q(t>=0&&t<1,function(){return"rate must be a float in the range [0, 1), but got "+t+"."}),t===0)return n instanceof Ft?i.clone():i;var a=function(l,d){if(d==null)return l.shape.slice();if(fe(l.shape,d))return d;if(l.shape.length===d.length){for(var A=[],I=0;I<l.shape.length;I++)d[I]==null&&l.shape[I]!=null?A.push(l.shape[I]):A.push(d[I]);return A}return d}(i,e),s=1-t,u=pl(a,0,1,"float32",r).add(s).floor().div(s);return i.mul(u)}});function ef(n,t,e){for(var r=1-n%2,i=new Float32Array(n),a=0;a<n;++a){var s=2*Math.PI*a/(n+r-1);i[a]=t-e*Math.cos(s)}return On(i,"float32")}var Zs=Ve({hannWindow_:function(n){return ef(n,.5,.5)}}),tf=Ve({hammingWindow_:function(n){return ef(n,.54,.46)}}),Js=Ve({frame_:function(n,t,e,r,i){r===void 0&&(r=!1),i===void 0&&(i=0);for(var a=0,s=[];a+t<=n.size;)s.push(Ni(n,a,t)),a+=e;if(r)for(;a<n.size;){var u=a+t-n.size,l=Pn([Ni(n,a,t-u),Bi([u],i)]);s.push(l),a+=e}return s.length===0?oa([],[0,t]):Pn(s).as2D(s.length,t)}}),rf=Ve({stft_:function(n,t,e,r,i){var a;i===void 0&&(i=Zs),r==null&&(a=t,r=Math.floor(Math.pow(2,Math.ceil(Math.log(a)/Math.log(2)))));for(var s=Js(n,t,e),u=ei(s,i(t)),l=[],d=0;d<s.shape[0];d++)l.push(Ks(u.slice([d,0],[1,t]),r));return Pn(l)}}),zm=Object.freeze({hannWindow:Zs,hammingWindow:tf,frame:Js,stft:rf}),ti,Vm=function(n,t,e){return e===void 0&&(e=1),C(this,void 0,void 0,function(){var r,i,a,s,u,l,d,A,I,O,z,re,oe,ae;return E(this,function(se){switch(se.label){case 0:return r=je(n,"predictions","inTopK"),i=je(t,"targets","inTopK"),q(r.rank>1,function(){return"inTopK() expects the predictions to be of rank 2 or higher, but got "+r.rank}),q(r.rank-1===i.rank,function(){return"predictions rank should be 1 larger than targets rank, but got predictions rank "+r.rank+" and targets rank "+i.rank}),pe(r.shape.slice(0,r.shape.length-1),i.shape,"predictions's shape should be align with the targets' shape, except the last dimension."),a=r.shape[r.shape.length-1],q(e>0&&e<=a,function(){return"'k' passed to inTopK() must be > 0 && <= the predictions last dimension ("+a+"), but got "+e}),[4,r.data()];case 1:return s=se.sent(),[4,i.data()];case 2:for(u=se.sent(),l=[s.length/a,a],A=l[1],I=G("bool",d=l[0]),O=0;O<d;O++){for(z=O*A,re=s.subarray(z,z+A),oe=[],ae=0;ae<re.length;ae++)oe.push({value:re[ae],index:ae});for(oe.sort(function(be,Ae){return Ae.value-be.value}),I[O]=0,ae=0;ae<e;ae++)if(oe[ae].index===u[O]){I[O]=1;break}}return n!==r&&r.dispose(),t!==i&&i.dispose(),[2,Sn(I,i.shape,"bool")]}})})};(function(n){n[n.NONE=0]="NONE",n[n.MEAN=1]="MEAN",n[n.SUM=2]="SUM",n[n.SUM_BY_NONZERO_WEIGHTS=3]="SUM_BY_NONZERO_WEIGHTS"})(ti||(ti={}));var Hm=Ve({absoluteDifference_:function(n,t,e,r){r===void 0&&(r=ti.SUM_BY_NONZERO_WEIGHTS);var i=je(n,"labels","absoluteDifference"),a=je(t,"predictions","absoluteDifference"),s=null;e!=null&&(s=je(e,"weights","absoluteDifference")),pe(i.shape,a.shape,"Error in absoluteDifference: ");var u=i.sub(a).abs();return Ki(u,s,r)}}),Ki=Ve({computeWeightedLoss_:function(n,t,e){e===void 0&&(e=ti.SUM_BY_NONZERO_WEIGHTS);var r=je(n,"losses","computeWeightedLoss"),i=null;t!=null&&(i=je(t,"weights","computeWeightedLoss"));var a=i==null?r:r.mul(i);if(e===ti.NONE)return a;if(e===ti.SUM)return a.sum();if(e===ti.MEAN){if(i==null)return a.mean();var s=r.size/i.size,u=a.sum().div(i.sum());return s>1?u.div(kt(s)):u}if(e===ti.SUM_BY_NONZERO_WEIGHTS){if(i==null)return a.sum().div(kt(r.size));var l=i.mul(Ma(r.shape)).notEqual(kt(0)).sum().toFloat();return a.sum().div(l)}throw Error("Unknown reduction: "+e)}}),Gm=Ve({cosineDistance_:function(n,t,e,r,i){i===void 0&&(i=ti.SUM_BY_NONZERO_WEIGHTS);var a=je(n,"labels","cosineDistance"),s=je(t,"predictions","cosineDistance"),u=null;r!=null&&(u=je(r,"weights","cosineDistance")),pe(a.shape,s.shape,"Error in cosineDistance: ");var l=kt(1).sub(a.mul(s).sum(e,!0));return Ki(l,u,i)}}),Qm=Ve({hingeLoss_:function(n,t,e,r){r===void 0&&(r=ti.SUM_BY_NONZERO_WEIGHTS);var i=je(n,"labels","hingeLoss"),a=je(t,"predictions","hingeLoss"),s=null;e!=null&&(s=je(e,"weights","hingeLoss")),pe(i.shape,a.shape,"Error in hingeLoss: ");var u=kt(1);i=kt(2).mul(i).sub(u);var l=u.sub(i.mul(a)).relu();return Ki(l,s,r)}}),Xm=Ve({huberLoss_:function(n,t,e,r,i){r===void 0&&(r=1),i===void 0&&(i=ti.SUM_BY_NONZERO_WEIGHTS);var a=je(n,"labels","huberLoss"),s=je(t,"predictions","huberLoss"),u=null;e!=null&&(u=je(e,"weights","huberLoss")),pe(a.shape,s.shape,"Error in huberLoss: ");var l=kt(r),d=s.sub(a).abs(),A=Pc(d,l),I=d.sub(A),O=kt(.5).mul(A.square()).add(l.mul(I));return Ki(O,u,i)}}),Km=Ve({logLoss_:function(n,t,e,r,i){r===void 0&&(r=1e-7),i===void 0&&(i=ti.SUM_BY_NONZERO_WEIGHTS);var a=je(n,"labels","logLoss"),s=je(t,"predictions","logLoss"),u=null;e!=null&&(u=je(e,"weights","logLoss")),pe(a.shape,s.shape,"Error in logLoss: ");var l=kt(1),d=kt(r),A=a.mul(s.add(d).log()).neg().sub(l.sub(a).mul(l.sub(s).add(d).log()));return Ki(A,u,i)}}),Zm=Ve({meanSquaredError_:function(n,t,e,r){r===void 0&&(r=ti.SUM_BY_NONZERO_WEIGHTS);var i=je(n,"labels","meanSquaredError"),a=je(t,"predictions","meanSquaredError"),s=null;e!=null&&(s=je(e,"weights","meanSquaredError")),pe(i.shape,a.shape,"Error in meanSquaredError: ");var u=i.squaredDifference(a);return Ki(u,s,r)}}),Jm=Ve({sigmoidCrossEntropy_:function(n,t,e,r,i){r===void 0&&(r=0),i===void 0&&(i=ti.SUM_BY_NONZERO_WEIGHTS);var a=je(n,"multiClassLabels","sigmoidCrossEntropy"),s=je(t,"logits","sigmoidCrossEntropy"),u=null;if(e!=null&&(u=je(e,"weights","sigmoidCrossEntropy")),pe(a.shape,s.shape,"Error in sigmoidCrossEntropy: "),r>0){var l=kt(r),d=kt(1),A=kt(.5);a=a.mul(d.sub(l)).add(A.mul(l))}var I=function(O,z){var re=je(O,"labels","sigmoidCrossEntropyWithLogits"),oe=je(z,"logits","sigmoidCrossEntropyWithLogits");pe(re.shape,oe.shape,"Error in sigmoidCrossEntropyWithLogits: ");var ae=oe.relu(),se=oe.mul(re),be=oe.abs().neg().exp().log1p();return ae.sub(se).add(be)}(a,s);return Ki(I,u,i)}}),Ym=Ve({softmaxCrossEntropy_:function(n,t,e,r,i){r===void 0&&(r=0),i===void 0&&(i=ti.SUM_BY_NONZERO_WEIGHTS);var a=je(n,"onehotLabels","softmaxCrossEntropy"),s=je(t,"logits","softmaxCrossEntropy"),u=null;if(e!=null&&(u=je(e,"weights","softmaxCrossEntropy")),pe(a.shape,s.shape,"Error in softmaxCrossEntropy: "),r>0){var l=kt(r),d=kt(1),A=kt(a.shape[1]);a=a.mul(d.sub(l)).add(l.div(A))}var I=function(O,z,re){if(re===void 0&&(re=-1),re===-1&&(re=z.rank-1),re!==z.rank-1)throw Error("Softmax cross entropy along a non-last dimension is not yet supported. Labels / logits was rank "+z.rank+" and dim was "+re);return ko(function(oe,ae,se){var be=ae.logSumExp([re],!0),Ae=ae.toFloat().sub(be);return se([oe,Ae]),{value:Ae.mul(oe).neg().sum([re]),gradFunc:function(me,Ce){var Oe=Ce[0],Le=Ce[1],Ue=Dn(me.shape,[re]);return[me.reshape(Ue).mul(Oe.toFloat().sub(Le.exp())),me.reshape(Ue).mul(Le.exp().sub(Oe.toFloat()))]}}})(O,z)}(a,s);return Ki(I,u,i)}}),$m=Object.freeze({get Reduction(){return ti},absoluteDifference:Hm,computeWeightedLoss:Ki,cosineDistance:Gm,hingeLoss:Qm,huberLoss:Xm,logLoss:Km,meanSquaredError:Zm,sigmoidCrossEntropy:Jm,softmaxCrossEntropy:Ym});function nf(n,t){return t===void 0&&(t=!1),We.tidy(function(){if(n.shape.length!==2)throw new Error("qr2d() requires a 2D Tensor, but got a "+n.shape.length+"D Tensor.");for(var e=n.shape[0],r=n.shape[1],i=dl(e),a=n.clone(),s=oa([[1]],[1,1]),u=s.clone(),l=e>=r?r:e,d=function(I){var O,z=a,re=u,oe=i;O=We.tidy(function(){var ae=a.slice([I,I],[e-I,1]),se=ae.norm(),be=a.slice([I,I],[1,1]),Ae=oa([[-1]]).where(be.greater(0),oa([[1]])),me=be.sub(Ae.mul(se)),Ce=ae.div(me);u=Ce.shape[0]===1?s.clone():s.concat(Ce.slice([1,0],[Ce.shape[0]-1,Ce.shape[1]]),0);var Oe=Ae.matMul(me).div(se).neg(),Le=a.slice([I,0],[e-I,r]),Ue=Oe.mul(u);if(I===0)a=Le.sub(Ue.matMul(u.transpose().matMul(Le)));else{var Ne=Le.sub(Ue.matMul(u.transpose().matMul(Le)));a=a.slice([0,0],[I,r]).concat(Ne,0)}var Fe=i.slice([0,I],[e,i.shape[1]-I]);if(I===0)i=Fe.sub(Fe.matMul(u).matMul(Ue.transpose()));else{var Ze=Fe.sub(Fe.matMul(u).matMul(Ue.transpose()));i=i.slice([0,0],[e,I]).concat(Ze,1)}return[u,a,i]}),u=O[0],a=O[1],i=O[2],bn([z,re,oe])},A=0;A<l;++A)d(A);return!t&&e>r&&(i=i.slice([0,0],[e,r]),a=a.slice([0,0],[r,r])),[i,a]})}var qm=Ve({bandPart_:function(n,t,e){if(t%1!=0)throw new Error("bandPart(): numLower must be an integer, got "+t+".");if(e%1!=0)throw new Error("bandPart(): numUpper must be an integer, got "+e+".");var r=je(n,"a","bandPart");if(r.rank<2)throw new Error("bandPart(): Rank must be at least 2, got "+r.rank+".");var i=r.shape,a=r.shape.slice(-2),s=a[0],u=a[1];if(!(t<=s))throw new Error("bandPart(): numLower ("+t+") must not be greater than the number of rows ("+s+").");if(!(e<=u))throw new Error("bandPart(): numUpper ("+e+") must not be greater than the number of columns ("+u+").");t<0&&(t=s),e<0&&(e=u);var l=Eo(0,s,1,"int32").reshape([-1,1]),d=Eo(0,u,1,"int32"),A=Nn(l,d),I=zo(A.lessEqual(kt(+t,"int32")),A.greaterEqual(kt(-e,"int32"))),O=pn([s,u],r.dtype);return mi(Bn(r.reshape([-1,s,u])).map(function(z){return Ia(I,z,O)})).reshape(i)}}),eg=Ve({gramSchmidt_:function(n){var t;if(Array.isArray(n)){t=!1,q(n!=null&&n.length>0,function(){return"Gram-Schmidt process: input must not be null, undefined, or empty"});for(var e=n[0].shape[0],r=function(l){q(n[l].shape[0]===e,function(){return"Gram-Schmidt: Non-unique lengths found in the input vectors: ("+n[l].shape[0]+" vs. "+e+")"})},i=1;i<n.length;++i)r(i)}else t=!0,n=vs(n,n.shape[0],0).map(function(l){return vl(l,[0])});q(n.length<=n[0].shape[0],function(){return"Gram-Schmidt: Number of vectors ("+n.length+") exceeds number of dimensions ("+n[0].shape[0]+")."});var a=[],s=n,u=function(l){a.push(We.tidy(function(){var d=s[l];if(l>0)for(var A=0;A<l;++A){var I=Kc(a[A].mulStrict(d)).mul(a[A]);d=d.sub(I)}return d.div($c(d,"euclidean"))}))};for(i=0;i<n.length;++i)u(i);return t?mi(a,0):a}}),tg=Ve({qr_:function(n,t){if(t===void 0&&(t=!1),n.rank<2)throw new Error("qr() requires input tensor to have a rank >= 2, but got rank "+n.rank);if(n.rank===2)return nf(n,t);var e=n.shape.slice(0,n.shape.length-2).reduce(function(s,u){return s*u}),r=Bn(n.reshape([e,n.shape[n.shape.length-2],n.shape[n.shape.length-1]]),0),i=[],a=[];return r.forEach(function(s){var u=nf(s,t),l=u[0],d=u[1];i.push(l),a.push(d)}),[mi(i,0).reshape(n.shape),mi(a,0).reshape(n.shape)]}}),rg=Object.freeze({bandPart:qm,gramSchmidt:eg,qr:tg});function Ko(n,t,e,r,i,a){r==null&&(r=.5),i==null&&(i=Number.NEGATIVE_INFINITY),a==null&&(a=0);var s=n.shape[0];return e=Math.min(e,s),q(0<=r&&r<=1,function(){return"iouThreshold must be in [0, 1], but was '"+r+"'"}),q(n.rank===2,function(){return"boxes must be a 2D tensor, but was of rank '"+n.rank+"'"}),q(n.shape[1]===4,function(){return"boxes must have 4 columns, but 2nd dimension was "+n.shape[1]}),q(t.rank===1,function(){return"scores must be a 1D tensor"}),q(t.shape[0]===s,function(){return"scores has incompatible shape with boxes. Expected "+s+", but was "+t.shape[0]}),q(0<=a&&a<=1,function(){return"softNmsSigma must be in [0, 1], but was '"+a+"'"}),{maxOutputSize:e,iouThreshold:r,scoreThreshold:i,softNmsSigma:a}}var ng=Ve({resizeBilinear_:function(n,t,e){e===void 0&&(e=!1);var r=je(n,"images","resizeBilinear");q(r.rank===3||r.rank===4,function(){return"Error in resizeBilinear: x must be rank 3 or 4, but got rank "+r.rank+"."}),q(t.length===2,function(){return"Error in resizeBilinear: new shape must 2D, but got shape "+t+"."});var i=r,a=!1;r.rank===3&&(a=!0,i=r.as4D(1,r.shape[0],r.shape[1],r.shape[2]));var s=t[0],u=t[1],l=We.runKernelFunc(function(d,A){return A([i]),d.resizeBilinear(i,s,u,e)},{x:i},function(d,A){return{x:function(){return We.runKernelFunc(function(I){return I.resizeBilinearBackprop(d,A[0],e)},{})}}},"ResizeBilinear",{alignCorners:e,newHeight:s,newWidth:u});return a?l.as3D(l.shape[1],l.shape[2],l.shape[3]):l}}),ig=Ve({resizeNearestNeighbor_:function(n,t,e){e===void 0&&(e=!1);var r=je(n,"images","resizeNearestNeighbor");q(r.rank===3||r.rank===4,function(){return"Error in resizeNearestNeighbor: x must be rank 3 or 4, but got rank "+r.rank+"."}),q(t.length===2,function(){return"Error in resizeNearestNeighbor: new shape must 2D, but got shape "+t+"."}),q(r.dtype==="float32"||r.dtype==="int32",function(){return"`images` must have `int32` or `float32` as dtype"});var i=r,a=!1;r.rank===3&&(a=!0,i=r.as4D(1,r.shape[0],r.shape[1],r.shape[2]));var s=t[0],u=t[1],l=We.runKernelFunc(function(d,A){return A([i]),d.resizeNearestNeighbor(i,s,u,e)},{batchImages:i},function(d,A){return{batchImages:function(){return We.runKernelFunc(function(I){return I.resizeNearestNeighborBackprop(d,A[0],e)},{})}}});return a?l.as3D(l.shape[1],l.shape[2],l.shape[3]):l}}),ag=Ve({nonMaxSuppression_:function(n,t,e,r,i){r===void 0&&(r=.5),i===void 0&&(i=Number.NEGATIVE_INFINITY);var a=je(n,"boxes","nonMaxSuppression"),s=je(t,"scores","nonMaxSuppression"),u=Ko(a,s,e,r,i);e=u.maxOutputSize,r=u.iouThreshold,i=u.scoreThreshold;var l={maxOutputSize:e,iouThreshold:r,scoreThreshold:i};return We.runKernelFunc(function(d){return d.nonMaxSuppression(a,s,e,r,i)},{boxes:a,scores:s},null,"NonMaxSuppressionV3",l)}}),og=function(n,t,e,r,i){return r===void 0&&(r=.5),i===void 0&&(i=Number.NEGATIVE_INFINITY),C(this,void 0,void 0,function(){var a,s,u,l,d,A,I;return E(this,function(O){switch(O.label){case 0:return a=je(n,"boxes","nonMaxSuppressionAsync"),s=je(t,"scores","nonMaxSuppressionAsync"),u=Ko(a,s,e,r,i),e=u.maxOutputSize,r=u.iouThreshold,i=u.scoreThreshold,[4,Promise.all([a.data(),s.data()])];case 1:return l=O.sent(),d=l[0],A=l[1],I=Rs(d,A,e,r,i),a!==n&&a.dispose(),s!==t&&s.dispose(),[2,I]}})})},sg=Ve({nonMaxSuppressionWithScore_:function(n,t,e,r,i,a){r===void 0&&(r=.5),i===void 0&&(i=Number.NEGATIVE_INFINITY),a===void 0&&(a=0);var s=je(n,"boxes","nonMaxSuppression"),u=je(t,"scores","nonMaxSuppression"),l=Ko(s,u,e,r,i,a),d={maxOutputSize:e=l.maxOutputSize,iouThreshold:r=l.iouThreshold,scoreThreshold:i=l.scoreThreshold,softNmsSigma:a=l.softNmsSigma},A=We.runKernel("NonMaxSuppressionV5",{boxes:s,scores:u},d);return{selectedIndices:A[0],selectedScores:A[1]}}}),ug=function(n,t,e,r,i,a){return r===void 0&&(r=.5),i===void 0&&(i=Number.NEGATIVE_INFINITY),a===void 0&&(a=0),C(this,void 0,void 0,function(){var s,u,l,d,A,I,O;return E(this,function(z){switch(z.label){case 0:return s=je(n,"boxes","nonMaxSuppressionAsync"),u=je(t,"scores","nonMaxSuppressionAsync"),l=Ko(s,u,e,r,i,a),e=l.maxOutputSize,r=l.iouThreshold,i=l.scoreThreshold,a=l.softNmsSigma,[4,Promise.all([s.data(),u.data()])];case 1:return d=z.sent(),A=d[0],I=d[1],O=Os(A,I,e,r,i,a),s!==n&&s.dispose(),u!==t&&u.dispose(),[2,O]}})})},lg=Ve({cropAndResize_:function(n,t,e,r,i,a){var s=je(n,"image","cropAndResize"),u=je(t,"boxes","cropAndResize","float32"),l=je(e,"boxInd","cropAndResize","int32");i=i||"bilinear",a=a||0;var d=u.shape[0];return q(s.rank===4,function(){return"Error in cropAndResize: image must be rank 4,but got rank "+s.rank+"."}),q(u.rank===2&&u.shape[1]===4,function(){return"Error in cropAndResize: boxes must be have size ["+d+",4] but had shape "+u.shape+"."}),q(l.rank===1&&l.shape[0]===d,function(){return"Error in cropAndResize: boxInd must be have size ["+d+"] but had shape "+u.shape+"."}),q(r.length===2,function(){return"Error in cropAndResize: cropSize must be of length 2, but got length "+r.length+"."}),q(r[0]>=1&&r[1]>=1,function(){return"cropSize must be atleast [1,1], but was "+r}),q(i==="bilinear"||i==="nearest",function(){return"method must be bilinear or nearest, but was "+i}),We.runKernelFunc(function(A,I){return A.cropAndResize(s,u,l,r,i,a)},{images:s,boxes:u,boxInd:l},null,"CropAndResize",{method:i,extrapolationValue:a,cropSize:r})}}),Ys=Object.freeze({resizeBilinear:ng,resizeNearestNeighbor:ig,nonMaxSuppression:ag,nonMaxSuppressionAsync:og,nonMaxSuppressionWithScore:sg,nonMaxSuppressionWithScoreAsync:ug,cropAndResize:lg}),$s=function(n,t){return!(n>0)||t==="linear"},eu=function(n,t,e){if(e==null||e==="linear")return n;if(e==="relu")return n.mul(t.step());throw new Error("Gradient for activation "+e+" has not been implemented yet.")},tu=function(n,t){var e=t,r=kn(n.shape,t.shape);return r.length>0&&(e=e.sum(r)),e.reshape(n.shape)},ru=function(n,t,e){if(t==="linear")return n;if(t==="relu")return wn(n);if(t==="elu")return Zc(n);if(t==="relu6")return Yc(n);if(t==="prelu")return Jc(n,e);throw new Error("Unknown fused activation "+t+".")},cg=Ve({fusedMatMul_:function(n){var t,e=n.a,r=n.b,i=n.transposeA,a=i!==void 0&&i,s=n.transposeB,u=s!==void 0&&s,l=n.bias,d=n.activation,A=d===void 0?"linear":d,I=n.preluActivationWeights;if($s(We.state.gradientDepth,A)===!1){var O=Go(e,r,a,u);return l!=null&&(O=Tr(O,l)),ru(O,A,I)}var z=je(e,"a","fused matMul"),re=je(r,"b","fused matMul");t=Jt(z,re),z=t[0],re=t[1];var oe=a?z.shape[z.rank-2]:z.shape[z.rank-1],ae=u?re.shape[re.rank-1]:re.shape[re.rank-2],se=a?z.shape[z.rank-1]:z.shape[z.rank-2],be=u?re.shape[re.rank-2]:re.shape[re.rank-1],Ae=z.shape.slice(0,-2),me=re.shape.slice(0,-2),Ce=ce(Ae),Oe=ce(me);q(z.rank>=2&&re.rank>=2&&z.rank===re.rank,function(){return"Error in fused matMul: inputs must have the same rank of at least 2, got ranks "+z.rank+" and "+re.rank+"."}),q(fe(Ae,me),function(){return"Error in fused matMul: outer dimensions ("+Ae+") and ("+me+") of Tensors with shapes "+z.shape+" and "+re.shape+" must match."}),q(oe===ae,function(){return"Error in fused matMul: inner shapes ("+oe+") and ("+ae+") of Tensors with shapes "+z.shape+" and "+re.shape+" and transposeA="+a+" and transposeB="+u+" must match."});var Le,Ue,Ne=z.shape.slice(0,-2).concat([se,be]),Fe=a?z.as3D(Ce,oe,se):z.as3D(Ce,se,oe),Ze=u?re.as3D(Oe,be,ae):re.as3D(Oe,ae,be);l!=null&&Ir(Ne,(Le=Jt(Le=je(l,"bias","fused matMul"),z)[0]).shape),I!=null&&(Ue=je(I,"prelu weights","fused matMul"));var Ke={a:Fe,b:Ze};l!=null&&(Ke.bias=Le),I!=null&&(Ke.preluActivationWeights=Ue);var et=[Fe,Ze];return We.runKernelFunc(function(tt,ct){var bt=tt.fusedBatchMatMul({a:Fe,b:Ze,transposeA:a,transposeB:u,bias:Le,activation:A,preluActivationWeights:Ue});return ct([Fe,Ze,bt]),bt},Ke,function(tt,ct){var bt=ct[0],gt=ct[1],vt=ct[2],At=eu(tt,vt,A),ft={};return l!=null&&(ft={bias:function(){return tu(Le,At)}}),Object.assign(a||u?!a&&u?{a:function(){return At.matMul(gt,!1,!1)},b:function(){return At.matMul(bt,!0,!1)}}:a&&!u?{a:function(){return gt.matMul(At,!1,!0)},b:function(){return bt.matMul(At,!1,!1)}}:{a:function(){return gt.matMul(At,!0,!0)},b:function(){return At.matMul(bt,!0,!0)}}:{a:function(){return At.matMul(gt,!1,!0)},b:function(){return bt.matMul(At,!0,!1)}},ft)},"_FusedMatMul",{transposeA:a,transposeB:u,activation:A},et,[!0]).reshape(Ne)}}),fg=Ve({fusedConv2d_:function(n){var t=n.x,e=n.filter,r=n.strides,i=n.pad,a=n.dataFormat,s=a===void 0?"NHWC":a,u=n.dilations,l=u===void 0?[1,1]:u,d=n.dimRoundingMode,A=n.bias,I=n.activation,O=I===void 0?"linear":I,z=n.preluActivationWeights;if(O=O||"linear",$s(We.state.gradientDepth,O)===!1){var re=Ei(t,e,r,i,s,l,d);return A!=null&&(re=Tr(re,A)),ru(re,O,z)}var oe=je(t,"x","conv2d"),ae=je(e,"filter","conv2d"),se=oe,be=!1;oe.rank===3&&(be=!0,se=oe.as4D(1,oe.shape[0],oe.shape[1],oe.shape[2])),q(se.rank===4,function(){return"Error in fused conv2d: input must be rank 4, but got rank "+se.rank+"."}),q(ae.rank===4,function(){return"Error in fused conv2d: filter must be rank 4, but got rank "+ae.rank+"."}),d!=null&&q(ge(i),function(){return"Error in fused conv2d: pad must be an integer when using, dimRoundingMode "+d+" but got pad "+i+"."}),q(se.shape[3]===ae.shape[2],function(){return"Error in conv2d: depth of input ("+se.shape[3]+") must match input depth for filter "+ae.shape[2]+"."}),q(si(r,l),function(){return"Error in conv2D: Either strides or dilations must be 1. Got strides "+r+" and dilations '"+l+"'"}),q(s==="NHWC",function(){return"Error in conv2d: got dataFormat of "+s+" but only NHWC is currently supported."});var Ae,me,Ce=sa(se.shape,ae.shape,r,l,i,d);A!=null&&(Ae=Jt(Ae=je(A,"bias","fused conv2d"),oe)[0],Ir(Ce.outShape,Ae.shape)),z!=null&&(me=je(z,"prelu weights","fused conv2d"));var Oe={x:se,filter:ae};A!=null&&(Oe.bias=Ae),z!=null&&(Oe.preluActivationWeights=me);var Le=[ae,se],Ue=We.runKernelFunc(function(Ne,Fe){var Ze=Ne.fusedConv2d({input:se,filter:ae,convInfo:Ce,bias:Ae,activation:O,preluActivationWeights:me});return Fe([ae,se,Ze]),Ze},Oe,function(Ne,Fe){var Ze=Fe,Ke=Ze[0],et=Ze[1],tt=Ze[2],ct=eu(Ne,tt,O);q(Ea(l),function(){return"Error in gradient of fused conv2D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '"+l+"'"});var bt={};return A!=null&&(bt={bias:function(){return tu(Ae,ct)}}),Object.assign({x:function(){return Wc(et.shape,ct,Ke,r,i)},filter:function(){return Gs(et,ct,Ke.shape,r,i)}},bt)},"FusedConv2D",{convInfo:Ce,activation:O},Le,[!0]);return be?Ue.as3D(Ue.shape[1],Ue.shape[2],Ue.shape[3]):Ue}}),dg=Ve({fusedDepthwiseConv2d_:function(n){var t=n.x,e=n.filter,r=n.strides,i=n.pad,a=n.dataFormat,s=a===void 0?"NHWC":a,u=n.dilations,l=u===void 0?[1,1]:u,d=n.dimRoundingMode,A=n.bias,I=n.activation,O=I===void 0?"linear":I,z=n.preluActivationWeights;if($s(We.state.gradientDepth,O)===!1){var re=Ho(t,e,r,i,s,l,d);return A!=null&&(re=Tr(re,A)),ru(re,O,z)}var oe=je(t,"x","depthwiseConv2d"),ae=je(e,"filter","depthwiseConv2d"),se=oe,be=!1;oe.rank===3&&(be=!0,se=oe.as4D(1,oe.shape[0],oe.shape[1],oe.shape[2])),q(se.rank===4,function(){return"Error in fused depthwiseConv2d: input must be rank 4, but got rank "+se.rank+"."}),q(ae.rank===4,function(){return"Error in fused depthwiseConv2d: filter must be rank 4, but got rank "+ae.rank+"."}),q(se.shape[3]===ae.shape[2],function(){return"Error in fused depthwiseConv2d: number of input channels ("+se.shape[3]+") must match the inChannels dimension in filter "+ae.shape[2]+"."}),l==null&&(l=[1,1]),q(si(r,l),function(){return"Error in fused depthwiseConv2d: Either strides or dilations must be 1. Got strides "+r+" and dilations '"+l+"'"}),d!=null&&q(ge(i),function(){return"Error in fused depthwiseConv2d: pad must be an integer when using dimRoundingMode "+d+" but got pad "+i+"."});var Ae,me,Ce=sa(se.shape,ae.shape,r,l,i,d,!0);A!=null&&(Ae=Jt(Ae=je(A,"bias","fused conv2d"),oe)[0],Ir(Ce.outShape,Ae.shape)),z!=null&&(me=je(z,"prelu weights","fused depthwiseConv2d"));var Oe={x:se,filter:ae};A!=null&&(Oe.bias=Ae),z!=null&&(Oe.preluActivationWeights=me);var Le=[ae,se],Ue=We.runKernelFunc(function(Ne,Fe){var Ze=Ne.fusedDepthwiseConv2D({input:se,filter:ae,convInfo:Ce,bias:Ae,activation:O,preluActivationWeights:me});return Fe([ae,se,Ze]),Ze},Oe,function(Ne,Fe){q(Ea(l),function(){return"Error in gradient of fused depthwiseConv2d: dilation rates greater than 1 are not yet supported. Got dilations '"+l+"'"});var Ze=Fe[0],Ke=Fe[1],et=Fe[2],tt=eu(Ne,et,O),ct={};return A!=null&&(ct={bias:function(){return tu(Ae,tt)}}),Object.assign({x:function(){return zc(Ke.shape,tt,Ze,Ce)},filter:function(){return Vc(Ke,tt,Ze.shape,Ce)}},ct)},"FusedDepthwiseConv2D",{convInfo:Ce,activation:O},Le,[!0]);return be?Ue.as3D(Ue.shape[1],Ue.shape[2],Ue.shape[3]):Ue}}),pg=Object.freeze({matMul:cg,conv2d:fg,depthwiseConv2d:dg}),hg=Object.freeze({image:Ys,linalg:rg,losses:$m,spectral:_m,fused:pg,signal:zm,square:Kh,squaredDifference:Ec,conv1d:nm,conv2d:Ei,conv3d:im,depthwiseConv2d:Ho,separableConv2d:Qs,conv2dTranspose:am,conv3dTranspose:om,op:Ve,batchNormalization2d:Cv,batchNormalization3d:Sv,batchNormalization4d:Iv,batchNormalization:Tv,batchNorm:Oc,batchNorm2d:Rv,batchNorm3d:Ov,batchNorm4d:kv,booleanMaskAsync:rm,complex:Cn,real:$n,imag:vi,concat:Pn,concat1d:Nd,concat2d:Md,concat3d:_d,concat4d:Fd,split:vs,matMul:Go,dot:sm,outerProduct:um,reverse:fo,reverse1d:lm,reverse2d:cm,reverse3d:fm,reverse4d:dm,maxPool:Vn,avgPool:po,pool:pm,maxPool3d:hm,avgPool3d:vm,slice:Ni,slice1d:mm,slice2d:gm,slice3d:Qc,slice4d:ym,abs:Zh,acos:Jh,acosh:Yh,asin:$h,asinh:qh,atan:ev,atanh:tv,ceil:rv,clipByValue:Us,cos:nv,cosh:iv,erf:av,exp:Ws,expm1:ov,floor:sv,log:uv,log1p:lv,logSigmoid:cv,neg:Lo,reciprocal:fv,round:dv,rsqrt:Cc,sigmoid:Sc,sign:pv,isNaN:hv,isInf:vv,isFinite:mv,sin:gv,sinh:yv,softplus:bv,sqrt:wv,step:Av,tan:xv,tanh:Ev,all:bm,any:wm,argMax:Am,argMin:xm,logSumExp:Em,max:Qo,mean:Cm,min:Sm,moments:Im,sum:Kc,prod:Tm,equal:Bc,equalStrict:Qv,greater:Xv,greaterEqual:Nc,greaterEqualStrict:Kv,greaterStrict:Zv,less:Jv,lessEqual:Yv,lessEqualStrict:$v,lessStrict:qv,notEqual:em,notEqualStrict:tm,add:Tr,addN:Pv,addStrict:Bv,atan2:Nv,div:ki,divNoNan:Mv,divStrict:_v,floorDiv:Dc,maximum:zs,maximumStrict:Fv,minimum:Pc,minimumStrict:Lv,mod:Uv,modStrict:Wv,mul:ei,mulStrict:zv,pow:Vo,powStrict:Vv,squaredDifferenceStrict:Hv,sub:Nn,subStrict:Gv,elu:Zc,leakyRelu:Rm,prelu:Jc,relu:wn,relu6:Yc,selu:Om,logicalAnd:zo,logicalNot:jv,logicalOr:kc,logicalXor:Dv,where:Ia,whereAsync:jc,buffer:cr,print:Xd,batchToSpaceND:fl,broadcastTo:Kd,cast:Zd,clone:Jd,cumsum:Yd,depthToSpace:$d,expandDims:xi,eye:dl,multinomial:qd,oneHot:gs,pad:xa,pad1d:ep,pad2d:tp,pad3d:rp,pad4d:np,rand:ip,randomNormal:ap,randomGamma:op,randomUniform:pl,reshape:Ri,spaceToBatchND:hl,squeeze:vl,stack:mi,tile:_a,truncatedNormal:sp,unstack:Bn,setdiff1dAsync:up,fill:Bi,linspace:Bd,ones:Ma,range:Eo,scalar:kt,tensor:Sn,tensor1d:On,tensor2d:oa,tensor3d:hs,tensor4d:li,tensor5d:jd,tensor6d:Dd,variable:Pd,zeros:pn,onesLike:cl,zerosLike:Lr,transpose:ua,softmax:Gi,logSoftmax:cp,localResponseNormalization:km,norm:$c,gather:Vs,unsortedSegmentSum:Fc,basicLSTMCell:jm,multiRNNCell:Dm,movingAverage:Pm,stridedSlice:Bm,topk:Nm,scatterND:Mm,fft:Xs,ifft:Xo,rfft:Ks,irfft:qc,sparseToDense:Fm,gatherND:Lm,diag:Um,dropout:Wm,hannWindow:Zs,hammingWindow:tf,frame:Js,stft:rf,inTopKAsync:Vm});function wt(n,t){Array.isArray(n)||(n=[n]),n.forEach(function(e){e!=null&&q(e.dtype!=="complex64",function(){return t+" does not support complex64 tensors."})})}function nu(n,t,e,r){if(e==="linear")return n.linear(t);if(e==="relu")return n.relu(t);if(e==="elu")return n.elu(t);if(e==="relu6")return n.relu6(t);if(e==="prelu")return n.prelu(t,r);throw new Error("Activation "+e+" has not been implemented for the CPU backend.")}var vg=function(n){function t(){var e=n.call(this)||this;return e.blockSize=48,e.firstUse=!0,e.data=new El(e,We),e}return S(t,n),t.prototype.write=function(e,r,i){this.firstUse&&(this.firstUse=!1,P().get("IS_NODE")&&Yn(`
============================
Hi there \u{1F44B}. Looks like you are running TensorFlow.js in Node.js. To speed things up dramatically, install our node backend, which binds to TensorFlow C++, by running npm i @tensorflow/tfjs-node, or npm i @tensorflow/tfjs-node-gpu if you have CUDA. Then call require('@tensorflow/tfjs-node'); (-gpu suffix for CUDA) at the start of your program. Visit https://github.com/tensorflow/tfjs-node for more details.
============================`));var a={};return this.data.set(a,{values:e,dtype:i}),a},t.prototype.move=function(e,r,i,a){this.data.set(e,{values:r,dtype:a})},t.prototype.numDataIds=function(){return this.data.numDataIds()},t.prototype.read=function(e){return C(this,void 0,void 0,function(){return E(this,function(r){return[2,this.readSync(e)]})})},t.prototype.readSync=function(e){var r=this.data.get(e),i=r.dtype,a=r.complexTensors;return i==="complex64"?Ts(this.readSync(a.real.dataId),this.readSync(a.imag.dataId)):this.data.get(e).values},t.prototype.bufferSync=function(e){var r=this.readSync(e.dataId),i=r;if(e.dtype==="string")try{i=r.map(function(a){return Qe(a)})}catch(a){throw new Error("Failed to decode encoded string bytes into utf-8")}return cr(e.shape,e.dtype,i)},t.prototype.makeOutput=function(e,r,i){var a=this.write(e,r,i);return We.makeTensorFromDataId(a,r,i,this)},t.prototype.disposeData=function(e){if(this.data.has(e)){var r=this.data.get(e).complexTensors;r!=null&&(r.real.dispose(),r.imag.dispose()),this.data.delete(e)}},t.prototype.time=function(e){return C(this,void 0,void 0,function(){var r;return E(this,function(i){return r=qe(),e(),[2,{kernelMs:qe()-r}]})})},t.prototype.memory=function(){return{unreliable:!0,reasons:["The reported memory is an upper bound. Due to automatic garbage collection, the true allocated memory may be less."]}},t.prototype.complex=function(e,r){var i=this.makeOutput(null,e.shape,"complex64");return this.data.get(i.dataId).complexTensors={real:We.keep(e.clone()),imag:We.keep(r.clone())},i},t.prototype.real=function(e){return this.data.get(e.dataId).complexTensors.real.clone()},t.prototype.imag=function(e){return this.data.get(e.dataId).complexTensors.imag.clone()},t.prototype.slice=function(e,r,i){if(wt(e,"slice"),As(e.shape,r,i)){var a=xs(r,e.strides),s=ce(i);return Sn(this.readSync(e.dataId).subarray(a,a+s),i,e.dtype)}for(var u=cr(i,e.dtype),l=this.bufferSync(e),d=0;d<u.size;++d){var A=u.indexToLoc(d).map(function(I,O){return I+r[O]});u.values[d]=l.get.apply(l,A)}return u.toTensor()},t.prototype.stridedSlice=function(e,r,i,a){wt(e,"stridedSlice");var s=Oo(r,i,a);if(s.some(function(z){return z===0}))return Sn([],s);for(var u=cr(s,e.dtype),l=this.bufferSync(e),d=0;d<u.size;d++){for(var A=u.indexToLoc(d),I=new Array(A.length),O=0;O<I.length;O++)I[O]=A[O]*a[O]+r[O];u.set.apply(u,[l.get.apply(l,I)].concat(A))}return u.toTensor()},t.prototype.diag=function(e){for(var r=this.readSync(e.dataId),i=cr([e.size,e.size],e.dtype),a=i.values,s=0;s<r.length;s++)a[s*e.size+s]=r[s];return i.toTensor()},t.prototype.unstack=function(e,r){for(var i=e.shape[r],a=new Array(e.rank-1),s=0,u=0;u<e.rank;u++)u!==r&&(a[s++]=e.shape[u]);var l=new Array(e.rank).fill(0),d=e.shape.slice();d[r]=1;var A=new Array(i);for(u=0;u<A.length;u++)l[r]=u,A[u]=this.slice(e,l,d).reshape(a);return A},t.prototype.reverse=function(e,r){wt(e,"reverse");for(var i=cr(e.shape,e.dtype),a=this.bufferSync(e),s=function(l){var d=i.indexToLoc(l),A=d.slice();r.forEach(function(I){return A[I]=e.shape[I]-1-A[I]}),i.set.apply(i,[a.get.apply(a,A)].concat(d))},u=0;u<i.size;u++)s(u);return i.toTensor()},t.prototype.concat=function(e,r){var i=this;if(e[0].dtype==="complex64"){var a=e.map(function(z){return $n(z)}),s=e.map(function(z){return vi(z)});return Cn(this.concat(a,r),this.concat(s,r))}var u=e.map(function(z){var re=ce(z.shape.slice(r));return z.as2D(-1,re)}),l=nn(u.map(function(z){return z.shape}),1),d=cr(l,e[0].dtype).values;if(u[0].shape[0]===1){var A=0;u.forEach(function(z){d.set(i.readSync(z.dataId),A),A+=z.size})}else{var I=0;u.forEach(function(z){for(var re=i.readSync(z.dataId),oe=0,ae=0;ae<z.shape[0];++ae)for(var se=ae*l[1]+I,be=0;be<z.shape[1];++be)d[se+be]=re[oe++];I+=z.shape[1]})}var O=nn(e.map(function(z){return z.shape}),r);return Sn(d,O,e[0].dtype)},t.prototype.neg=function(e){return wt(e,"neg"),this.multiply(kt(-1),e)},t.prototype.add=function(e,r){return e.dtype==="complex64"||r.dtype==="complex64"?this.broadcastedBinaryComplexOp(e.cast("complex64"),r.cast("complex64"),function(i,a,s,u){return{real:i+s,imag:a+u}}):this.broadcastedBinaryOp(e,r,Tt(e.dtype,r.dtype),function(i,a){return i+a})},t.prototype.addN=function(e){var r=this;wt(e,"addN");for(var i=e.map(function(A){return r.readSync(A.dataId)}),a=cr(e[0].shape,e[0].dtype),s=a.values,u=0;u<e.length;u++)for(var l=i[u],d=0;d<s.length;d++)s[d]+=l[d];return a.toTensor()},t.prototype.softmax=function(e,r){var i=ye([r],e.shape),a=this.max(e,i),s=Dn(a.shape,i),u=this.subtract(e,a.reshape(s)),l=this.exp(u),d=this.sum(l,i).reshape(s);return this.realDivide(l,d)},t.prototype.subtract=function(e,r){return e.dtype==="complex64"||r.dtype==="complex64"?this.broadcastedBinaryComplexOp(e.cast("complex64"),r.cast("complex64"),function(i,a,s,u){return{real:i-s,imag:a-u}}):this.broadcastedBinaryOp(e,r,Tt(e.dtype,r.dtype),function(i,a){return i-a})},t.prototype.pow=function(e,r){return wt([e,r],"pow"),this.broadcastedBinaryOp(e,r,e.dtype,function(i,a){return Math.pow(i,a)})},t.prototype.batchMatMul=function(e,r,i,a){wt([e,r],"matMul");for(var s=i?e.shape[1]:e.shape[2],u=i?e.shape[2]:e.shape[1],l=a?r.shape[1]:r.shape[2],d=e.shape[0],A=this.readSync(e.dataId),I=this.readSync(r.dataId),O=i?[e.strides[0],1,e.strides[1]]:[e.strides[0],e.strides[1],1],z=O[0],re=O[1],oe=O[2],ae=a?[1,r.strides[1],r.strides[0]]:[r.strides[1],1,r.strides[0]],se=ae[0],be=ae[1],Ae=ae[2],me=u*l,Ce=cr([d,u,l],e.dtype),Oe=Ce.values,Le=this.blockSize,Ue=0;Ue<d;Ue++)for(var Ne=0;Ne<u;Ne+=Le)for(var Fe=0;Fe<l;Fe+=Le)for(var Ze=0;Ze<s;Ze+=Le)for(var Ke=Math.min(Ne+Le,u),et=Math.min(Fe+Le,l),tt=Math.min(Ze+Le,s),ct=Ne;ct<Ke;ct++)for(var bt=Fe;bt<et;bt++){for(var gt=0,vt=Ze;vt<tt;vt++)gt+=A[Ue*z+ct*re+vt*oe]*I[vt*se+bt*be+Ue*Ae];Oe[Ue*me+(ct*l+bt)]+=gt}return Ce.toTensor()},t.prototype.fusedBatchMatMul=function(e){var r=e.a,i=e.b,a=e.transposeA,s=e.transposeB,u=e.bias,l=e.activation,d=e.preluActivationWeights,A=this.batchMatMul(r,i,a,s);return u&&(A=this.add(A,u)),l&&(A=nu(this,A,l,d)),A},t.prototype.multiply=function(e,r){return e.dtype==="complex64"||r.dtype==="complex64"?this.broadcastedBinaryComplexOp(e.cast("complex64"),r.cast("complex64"),function(i,a,s,u){return{real:i*s-a*u,imag:i*u+a*s}}):this.broadcastedBinaryOp(e,r,Tt(e.dtype,r.dtype),function(i,a){return i*a})},t.prototype.realDivide=function(e,r){return wt([e,r],"realDivide"),this.broadcastedBinaryOp(e,r,"float32",function(i,a){return i/a})},t.prototype.floorDiv=function(e,r){return wt([e,r],"floorDiv"),this.broadcastedBinaryOp(e,r,"int32",function(i,a){return Math.floor(i/a)})},t.prototype.sum=function(e,r){wt(e,"sum"),zn("sum",r,e.rank);for(var i=En(e.shape,r),a=i[0],s=i[1],u=pn(a,Tt(e.dtype,"int32")),l=ce(s),d=this.readSync(u.dataId),A=this.readSync(e.dataId),I=0;I<d.length;++I){for(var O=I*l,z=0,re=0;re<l;++re)z+=A[O+re];d[I]=z}return u},t.prototype.prod=function(e,r){wt(e,"sum");for(var i=En(e.shape,r),a=i[0],s=i[1],u=pn(a,Tt(e.dtype,"int32")),l=ce(s),d=this.readSync(u.dataId),A=this.readSync(e.dataId),I=0;I<d.length;++I){for(var O=I*l,z=1,re=0;re<l;++re)z*=A[O+re];d[I]=z}return u},t.prototype.unsortedSegmentSum=function(e,r,i){wt(e,"unsortedSegmentSum");for(var a=[],s=e.rank-r.rank,u=0;u<s;++u)r=r.expandDims(u+1);for(u=0;u<i;++u){var l=kt(u,"int32"),d=Bc(l,r).asType("float32").mul(e).sum(0);a.push(d)}return mi(a)},t.prototype.argMin=function(e,r){wt(e,"argMin");var i=[r];zn("argMin",i,e.rank);for(var a=En(e.shape,i),s=a[0],u=a[1],l=pn(s,"int32"),d=ce(u),A=this.readSync(l.dataId),I=this.readSync(e.dataId),O=0;O<A.length;++O){for(var z=O*d,re=I[z],oe=0,ae=0;ae<d;++ae){var se=I[z+ae];se<re&&(re=se,oe=ae)}A[O]=oe}return l},t.prototype.argMax=function(e,r){wt(e,"argMax");var i=[r];zn("argMax",i,e.rank);for(var a=En(e.shape,i),s=a[0],u=a[1],l=pn(s,"int32"),d=ce(u),A=this.readSync(l.dataId),I=this.readSync(e.dataId),O=0;O<A.length;++O){for(var z=O*d,re=I[z],oe=0,ae=0;ae<d;++ae){var se=I[z+ae];se>re&&(re=se,oe=ae)}A[O]=oe}return l},t.prototype.cumsum=function(e,r,i,a){if(wt(e,"cumsum"),r!==e.rank-1)throw new Error("backend.cumsum in CPU expects an inner-most axis="+(e.rank-1)+" but got axis="+r);for(var s=Tt(e.dtype,"int32"),u=pn(e.shape,s),l=this.readSync(u.dataId),d=this.readSync(e.dataId),A=e.shape[e.rank-1],I=a?function(ae,se){return ae+A-se-1}:function(ae,se){return ae+se},O=0;O<d.length;O+=A)for(var z=0;z<A;z++){var re=I(O,z);if(z===0)l[re]=i?0:d[re];else{var oe=I(O,z-1);l[re]=i?d[oe]+l[oe]:d[re]+l[oe]}}return u},t.prototype.equal=function(e,r){return wt([e,r],"equal"),this.broadcastedBinaryOp(e,r,"bool",function(i,a){return i===a?1:0})},t.prototype.notEqual=function(e,r){return wt([e,r],"notEqual"),this.broadcastedBinaryOp(e,r,"bool",function(i,a){return i!==a?1:0})},t.prototype.less=function(e,r){return wt([e,r],"less"),this.broadcastedBinaryOp(e,r,"bool",function(i,a){return i<a?1:0})},t.prototype.lessEqual=function(e,r){return wt([e,r],"lessEqual"),this.broadcastedBinaryOp(e,r,"bool",function(i,a){return i<=a?1:0})},t.prototype.greater=function(e,r){return wt([e,r],"greater"),this.broadcastedBinaryOp(e,r,"bool",function(i,a){return i>a?1:0})},t.prototype.greaterEqual=function(e,r){return wt([e,r],"greaterEqual"),this.broadcastedBinaryOp(e,r,"bool",function(i,a){return i>=a?1:0})},t.prototype.logicalNot=function(e){wt(e,"logicalNot");for(var r=this.readSync(e.dataId),i=new Uint8Array(r.length),a=0;a<r.length;++a)i[a]=r[a]?0:1;return this.makeOutput(i,e.shape,"bool")},t.prototype.logicalAnd=function(e,r){return wt([e,r],"logicalAnd"),this.broadcastedBinaryOp(e,r,"bool",function(i,a){return i&&a})},t.prototype.logicalOr=function(e,r){return wt([e,r],"logicalOr"),this.broadcastedBinaryOp(e,r,"bool",function(i,a){return i||a})},t.prototype.select=function(e,r,i){wt([e,r,i],"select");for(var a=this.readSync(e.dataId),s=this.readSync(r.dataId),u=this.readSync(i.dataId),l=pn(r.shape,Tt(r.dtype,i.dtype)),d=this.readSync(l.dataId),A=0,I=e.rank===0||e.rank>1||r.rank===1?1:ce(r.shape.slice(1)),O=0;O<a.length;O++)for(var z=0;z<I;z++)a[O]===1?d[A++]=s[O]:d[A++]=u[O];return l},t.prototype.where=function(e){wt([e],"where");var r=this.readSync(e.dataId);return ks(e.shape,r)},t.prototype.topk=function(e,r,i){return wt(e,"topk"),kl(this.readSync(e.dataId),e.shape,e.dtype,r)},t.prototype.min=function(e,r){wt(e,"min"),zn("min",r,e.rank);for(var i=En(e.shape,r),a=i[0],s=i[1],u=pn(a,e.dtype),l=ce(s),d=this.readSync(u.dataId),A=this.readSync(e.dataId),I=0;I<d.length;++I){for(var O=I*l,z=A[O],re=0;re<l;++re){var oe=A[O+re];oe<z&&(z=oe)}d[I]=z}return u},t.prototype.minimum=function(e,r){return wt([e,r],"minimum"),this.broadcastedBinaryOp(e,r,e.dtype,function(i,a){return Math.min(i,a)})},t.prototype.mod=function(e,r){return wt([e,r],"mod"),this.broadcastedBinaryOp(e,r,e.dtype,function(i,a){var s=i%a;return i<0&&a<0||i>=0&&a>=0?s:(s+a)%a})},t.prototype.max=function(e,r){wt(e,"max"),zn("max",r,e.rank);for(var i=En(e.shape,r),a=i[0],s=i[1],u=pn(a,e.dtype),l=ce(s),d=this.readSync(u.dataId),A=this.readSync(e.dataId),I=0;I<d.length;++I){for(var O=I*l,z=A[O],re=0;re<l;++re){var oe=A[O+re];oe>z&&(z=oe)}d[I]=z}return u},t.prototype.maximum=function(e,r){return wt([e,r],"maximum"),this.broadcastedBinaryOp(e,r,e.dtype,function(i,a){return Math.max(i,a)})},t.prototype.all=function(e,r){wt(e,"all"),zn("all",r,e.rank);for(var i=En(e.shape,r),a=i[0],s=i[1],u=pn(a,e.dtype),l=ce(s),d=this.readSync(u.dataId),A=this.readSync(e.dataId),I=0;I<d.length;++I){for(var O=I*l,z=A[O],re=0;re<l;++re){var oe=A[O+re];z=z&&oe}d[I]=z}return u},t.prototype.any=function(e,r){wt(e,"any"),zn("any",r,e.rank);for(var i=En(e.shape,r),a=i[0],s=i[1],u=pn(a,e.dtype),l=ce(s),d=this.readSync(u.dataId),A=this.readSync(e.dataId),I=0;I<d.length;++I){for(var O=I*l,z=A[O],re=0;re<l;++re){var oe=A[O+re];z=z||oe}d[I]=z}return u},t.prototype.squaredDifference=function(e,r){return wt([e,r],"squaredDifference"),this.broadcastedBinaryOp(e,r,e.dtype,function(i,a){var s=i-a;return s*s})},t.prototype.ceil=function(e){wt(e,"ceil");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),a=0;a<r.length;++a)i[a]=Math.ceil(r[a]);return this.makeOutput(i,e.shape,"float32")},t.prototype.floor=function(e){wt(e,"floor");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),a=0;a<r.length;++a)i[a]=Math.floor(r[a]);return this.makeOutput(i,e.shape,"float32")},t.prototype.sign=function(e){wt(e,"x");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),a=0;a<r.length;++a)r[a]<0?i[a]=-1:r[a]>0?i[a]=1:i[a]=0;return this.makeOutput(i,e.shape,"float32")},t.prototype.isNaN=function(e){wt(e,"x");for(var r=this.readSync(e.dataId),i=new Uint8Array(r.length),a=0;a<r.length;++a)Number.isNaN(r[a])&&(i[a]=1);return this.makeOutput(i,e.shape,"bool")},t.prototype.isInf=function(e){wt(e,"x");for(var r=this.readSync(e.dataId),i=new Uint8Array(r.length),a=0;a<r.length;++a)Math.abs(r[a])===1/0&&(i[a]=1);return this.makeOutput(i,e.shape,"bool")},t.prototype.isFinite=function(e){wt(e,"x");for(var r=this.readSync(e.dataId),i=new Uint8Array(r.length),a=0;a<r.length;++a)Number.isFinite(r[a])&&(i[a]=1);return this.makeOutput(i,e.shape,"bool")},t.prototype.round=function(e){wt(e,"round");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),a=0;a<r.length;++a){var s=Math.floor(r[a]);r[a]-s<.5?i[a]=Math.floor(r[a]):r[a]-s>.5?i[a]=Math.ceil(r[a]):i[a]=s%2==0?s:s+1}return this.makeOutput(i,e.shape,"float32")},t.prototype.exp=function(e){wt(e,"exp");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),a=0;a<r.length;++a)i[a]=Math.exp(r[a]);return this.makeOutput(i,e.shape,"float32")},t.prototype.expm1=function(e){wt(e,"expm1");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),a=0;a<r.length;++a)i[a]=Math.expm1(r[a]);return this.makeOutput(i,e.shape,"float32")},t.prototype.log=function(e){wt(e,"log");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),a=0;a<r.length;++a){var s=r[a];i[a]=Math.log(s)}return this.makeOutput(i,e.shape,"float32")},t.prototype.log1p=function(e){wt(e,"log1p");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),a=0;a<r.length;++a){var s=r[a];i[a]=Math.log1p(s)}return this.makeOutput(i,e.shape,"float32")},t.prototype.sqrt=function(e){wt(e,"sqrt");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),a=0;a<r.length;++a){var s=r[a];i[a]=Math.sqrt(s)}return this.makeOutput(i,e.shape,"float32")},t.prototype.rsqrt=function(e){wt(e,"rsqrt");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),a=0;a<r.length;++a){var s=r[a];i[a]=1/Math.sqrt(s)}return this.makeOutput(i,e.shape,"float32")},t.prototype.reciprocal=function(e){wt(e,"reciprocal");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),a=0;a<r.length;++a)i[a]=1/r[a];return this.makeOutput(i,e.shape,"float32")},t.prototype.linear=function(e){return e},t.prototype.relu=function(e){wt(e,"relu");for(var r=pn(e.shape,e.dtype),i=this.readSync(r.dataId),a=this.readSync(e.dataId),s=0;s<a.length;++s)i[s]=Math.max(0,a[s]);return r},t.prototype.relu6=function(e){wt(e,"relu");for(var r=pn(e.shape,e.dtype),i=this.readSync(r.dataId),a=this.readSync(e.dataId),s=0;s<a.length;++s)i[s]=Math.min(Math.max(0,a[s]),6);return r},t.prototype.prelu=function(e,r){return wt([e,r],"prelu"),this.broadcastedBinaryOp(e,r,e.dtype,function(i,a){return i<0?a*i:i})},t.prototype.elu=function(e){wt(e,"elu");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a){var s=i[a];r[a]=s>=0?s:Math.exp(s)-1}return this.makeOutput(r,e.shape,"float32")},t.prototype.eluDer=function(e,r){wt([e,r],"eluDer");for(var i=new Float32Array(r.size),a=this.readSync(r.dataId),s=this.readSync(e.dataId),u=0;u<a.length;++u){var l=a[u];i[u]=l>=1?s[u]:s[u]*(l+1)}return this.makeOutput(i,r.shape,"float32")},t.prototype.selu=function(e){wt(e,"selu");for(var r=Fs,i=Ls,a=new Float32Array(e.size),s=this.readSync(e.dataId),u=0;u<s.length;++u){var l=s[u];a[u]=l>=0?i*l:r*(Math.exp(l)-1)}return this.makeOutput(a,e.shape,"float32")},t.prototype.clip=function(e,r,i){wt(e,"clip");for(var a=new Float32Array(e.size),s=this.readSync(e.dataId),u=0;u<s.length;++u){var l=s[u];a[u]=l>i?i:l<r?r:l}return this.makeOutput(a,e.shape,"float32")},t.prototype.abs=function(e){for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.abs(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.complexAbs=function(e){for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<e.size;++a){var s=i[2*a],u=i[2*a+1];r[a]=Math.hypot(s,u)}return this.makeOutput(r,e.shape,"float32")},t.prototype.int=function(e){wt(e,"int");for(var r=new Int32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=i[a];return this.makeOutput(r,e.shape,"int32")},t.prototype.sigmoid=function(e){wt(e,"sigmoid");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=1/(1+Math.exp(-i[a]));return this.makeOutput(r,e.shape,"float32")},t.prototype.softplus=function(e){wt(e,"softplus");for(var r=Math.log(11920928955078125e-23)+2,i=new Float32Array(e.size),a=this.readSync(e.dataId),s=0;s<a.length;++s){var u=a[s]>-r,l=a[s]<r,d=Math.exp(a[s]),A=void 0;A=l?d:u?a[s]:Math.log(1+d),i[s]=A}return this.makeOutput(i,e.shape,"float32")},t.prototype.sin=function(e){wt(e,"sin");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.sin(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.cos=function(e){wt(e,"cos");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.cos(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.tan=function(e){wt(e,"tan");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.tan(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.asin=function(e){wt(e,"asin");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.asin(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.acos=function(e){wt(e,"acos");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.acos(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.atan=function(e){wt(e,"atan");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.atan(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.atan2=function(e,r){return wt([e,r],"atan2"),this.broadcastedBinaryOp(e,r,e.dtype,function(i,a){return Math.atan2(i,a)})},t.prototype.sinh=function(e){wt(e,"sinh");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.sinh(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.cosh=function(e){wt(e,"cosh");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.cosh(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.tanh=function(e){wt(e,"tanh");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Se(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.asinh=function(e){wt(e,"asinh");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.asinh(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.acosh=function(e){wt(e,"acosh");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.acosh(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.atanh=function(e){wt(e,"atanh");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.atanh(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.erf=function(e){wt(e,"erf");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a){var s=Math.sign(i[a]),u=Math.abs(i[a]),l=1/(1+.3275911*u);r[a]=s*(1-((((1.061405429*l-1.453152027)*l+1.421413741)*l-.284496736)*l+.254829592)*l*Math.exp(-u*u))}return this.makeOutput(r,e.shape,"float32")},t.prototype.step=function(e,r){r===void 0&&(r=0),wt(e,"step");for(var i=new Float32Array(e.size),a=this.readSync(e.dataId),s=0;s<a.length;++s){var u=a[s];isNaN(u)?i[s]=NaN:i[s]=u>0?1:r}return this.makeOutput(i,e.shape,"float32")},t.prototype.fusedConv2d=function(e){var r=e.input,i=e.filter,a=e.convInfo,s=e.bias,u=e.activation,l=e.preluActivationWeights,d=this.conv2d(r,i,a);return s&&(d=this.add(d,s)),u&&(d=nu(this,d,u,l)),d},t.prototype.conv2d=function(e,r,i){wt([e,r],"conv2d");for(var a=i.filterHeight,s=i.filterWidth,u=i.dilationHeight,l=i.dilationWidth,d=i.padInfo.left,A=i.padInfo.top,I=i.dataFormat==="channelsLast",O=cr(i.outShape,e.dtype),z=e.strides[0],re=I?e.strides[1]:e.strides[2],oe=I?e.strides[2]:1,ae=I?1:e.strides[1],se=O.strides[0],be=I?O.strides[1]:O.strides[2],Ae=I?O.strides[2]:1,me=I?1:O.strides[1],Ce=this.readSync(e.dataId),Oe=this.readSync(r.dataId),Le=O.values,Ue=0;Ue<i.batchSize;++Ue)for(var Ne=Ue*z,Fe=Ue*se,Ze=0;Ze<i.outHeight;++Ze)for(var Ke=Fe+Ze*be,et=Ze*i.strideHeight-A,tt=0;tt<a;tt++){var ct=et+tt*u;if(!(ct<0||ct>=i.inHeight))for(var bt=tt*r.strides[0],gt=Ne+ct*re,vt=0;vt<i.outWidth;++vt)for(var At=Ke+vt*Ae,ft=vt*i.strideWidth-d,Et=0;Et<s;Et++){var It=ft+Et*l;if(!(It<0||It>=i.inWidth))for(var Vt=gt+It*oe,ir=bt+Et*r.strides[1],fr=0;fr<i.inChannels;++fr){for(var Ar=Ce[Vt+fr*ae],Dr=0;Dr<i.outChannels;++Dr)Le[At+Dr*me]+=Ar*Oe[ir+Dr];ir+=i.outChannels}}}return O.toTensor()},t.prototype.conv3d=function(e,r,i){for(var a=i.filterDepth,s=i.filterHeight,u=i.filterWidth,l=i.dilationDepth,d=i.dilationHeight,A=i.dilationWidth,I=i.padInfo.front,O=i.padInfo.left,z=i.padInfo.top,re=cr(i.outShape,e.dtype),oe=this.readSync(e.dataId),ae=this.readSync(r.dataId),se=re.values,be=0;be<i.batchSize;++be)for(var Ae=be*e.strides[0],me=be*re.strides[0],Ce=0;Ce<i.outDepth;++Ce)for(var Oe=me+Ce*re.strides[1],Le=Ce*i.strideDepth-I,Ue=0;Ue<a;Ue++){var Ne=Le+Ue*l;if(!(Ne<0||Ne>=i.inDepth))for(var Fe=Ue*r.strides[0],Ze=Ae+Ne*e.strides[1],Ke=0;Ke<i.outHeight;++Ke)for(var et=Oe+Ke*re.strides[2],tt=Ke*i.strideHeight-z,ct=0;ct<s;ct++){var bt=tt+ct*d;if(!(bt<0||bt>=i.inHeight))for(var gt=Fe+ct*r.strides[1],vt=Ze+bt*e.strides[2],At=0;At<i.outWidth;++At)for(var ft=et+At*i.outChannels,Et=At*i.strideWidth-O,It=0;It<u;It++){var Vt=Et+It*A;if(!(Vt<0||Vt>=i.inWidth))for(var ir=gt+It*r.strides[2],fr=vt+Vt*i.inChannels,Ar=ir,Dr=0;Dr<i.inChannels;++Dr){for(var Rr=oe[fr+Dr],Pr=0;Pr<i.outChannels;++Pr)se[ft+Pr]+=Rr*ae[Ar+Pr];Ar+=i.outChannels}}}}return re.toTensor()},t.prototype.conv2dDerInput=function(e,r,i){wt([e,r],"conv2dDerInput");for(var a=cr(i.inShape,"float32"),s=a.values,u=this.readSync(e.dataId),l=this.readSync(r.dataId),d=r.strides,A=d[0],I=d[1],O=d[2],z=i.batchSize,re=i.filterHeight,oe=i.filterWidth,ae=i.inChannels,se=i.inHeight,be=i.inWidth,Ae=i.outChannels,me=i.outHeight,Ce=i.outWidth,Oe=i.strideHeight,Le=i.strideWidth,Ue=i.dataFormat,Ne=re-1-i.padInfo.top,Fe=oe-1-i.padInfo.left,Ze=Ue==="channelsLast",Ke=a.strides[0],et=Ze?a.strides[1]:a.strides[2],tt=Ze?a.strides[2]:1,ct=Ze?1:a.strides[1],bt=e.strides[0],gt=Ze?e.strides[1]:e.strides[2],vt=Ze?e.strides[2]:1,At=Ze?1:e.strides[1],ft=0;ft<z;++ft)for(var Et=0;Et<ae;++Et)for(var It=0;It<se;++It)for(var Vt=It-Ne,ir=Math.max(0,Math.ceil(Vt/Oe)),fr=Math.min(me,(re+Vt)/Oe),Ar=0;Ar<be;++Ar){for(var Dr=Ar-Fe,Rr=Math.max(0,Math.ceil(Dr/Le)),Pr=Math.min(Ce,(oe+Dr)/Le),xr=0,Or=ir;Or<fr;++Or)for(var Qr=Or*Oe-Vt,Ur=Rr;Ur<Pr;++Ur)for(var an=bt*ft+gt*Or+vt*Ur,An=A*(re-1-Qr)+I*(oe-1-(Ur*Le-Dr))+O*Et,xn=0;xn<Ae;++xn)xr+=u[an+At*xn]*l[An+xn];s[Ke*ft+et*It+tt*Ar+ct*Et]=xr}return a.toTensor()},t.prototype.conv3dDerInput=function(e,r,i){for(var a=cr(i.inShape,"float32"),s=a.values,u=a.strides,l=u[0],d=u[1],A=u[2],I=u[3],O=this.readSync(e.dataId),z=e.strides,re=z[0],oe=z[1],ae=z[2],se=z[3],be=this.readSync(r.dataId),Ae=r.strides,me=Ae[0],Ce=Ae[1],Oe=Ae[2],Le=Ae[3],Ue=i.batchSize,Ne=i.filterDepth,Fe=i.filterHeight,Ze=i.filterWidth,Ke=i.inChannels,et=i.inDepth,tt=i.inHeight,ct=i.inWidth,bt=i.outChannels,gt=i.outDepth,vt=i.outHeight,At=i.outWidth,ft=i.strideDepth,Et=i.strideHeight,It=i.strideWidth,Vt=Ne-1-i.padInfo.front,ir=Fe-1-i.padInfo.top,fr=Ze-1-i.padInfo.left,Ar=0;Ar<Ue;++Ar)for(var Dr=0;Dr<Ke;++Dr)for(var Rr=0;Rr<et;++Rr)for(var Pr=Rr-Vt,xr=Math.max(0,Math.ceil(Pr/ft)),Or=Math.min(gt,(Ne+Pr)/ft),Qr=0;Qr<tt;++Qr)for(var Ur=Qr-ir,an=Math.max(0,Math.ceil(Ur/Et)),An=Math.min(vt,(Fe+Ur)/Et),xn=0;xn<ct;++xn){for(var Wi=xn-fr,zi=Math.max(0,Math.ceil(Wi/It)),wi=Math.min(At,(Ze+Wi)/It),eo=0,qi=xr;qi<Or;++qi)for(var ga=qi*ft-Pr,ea=an;ea<An;++ea)for(var to=ea*Et-Ur,ta=zi;ta<wi;++ta)for(var al=re*Ar+oe*qi+ae*ea+se*ta,ro=me*(Ne-1-ga)+Ce*(Fe-1-to)+Oe*(Ze-1-(ta*It-Wi))+Le*Dr,Vi=0;Vi<bt;++Vi)eo+=O[al+Vi]*be[ro+Vi];s[l*Ar+d*Rr+A*Qr+I*xn+Dr]=eo}return a.toTensor()},t.prototype.conv2dDerFilter=function(e,r,i){wt([e,r],"conv2dDerFilter");for(var a=i.strideHeight,s=i.strideWidth,u=i.filterHeight,l=i.filterWidth,d=i.dataFormat==="channelsLast",A=cr(i.filterShape,"float32"),I=i.padInfo.left,O=i.padInfo.top,z=this.bufferSync(e),re=this.bufferSync(r),oe=0;oe<u;++oe)for(var ae=Math.max(0,Math.ceil((O-oe)/a)),se=Math.min(i.outHeight,(i.inHeight+O-oe)/a),be=0;be<l;++be)for(var Ae=Math.max(0,Math.ceil((I-be)/s)),me=Math.min(i.outWidth,(i.inWidth+I-be)/s),Ce=0;Ce<i.inChannels;++Ce)for(var Oe=0;Oe<i.outChannels;++Oe){for(var Le=0,Ue=0;Ue<i.batchSize;++Ue)for(var Ne=ae;Ne<se;++Ne)for(var Fe=oe+Ne*a-O,Ze=Ae;Ze<me;++Ze){var Ke=be+Ze*s-I;Le+=d?z.get(Ue,Fe,Ke,Ce)*re.get(Ue,Ne,Ze,Oe):z.get(Ue,Ce,Fe,Ke)*re.get(Ue,Oe,Ne,Ze)}A.set(Le,oe,be,Ce,Oe)}return A.toTensor()},t.prototype.conv3dDerFilter=function(e,r,i){for(var a=i.strideDepth,s=i.strideHeight,u=i.strideWidth,l=i.filterDepth,d=i.filterHeight,A=i.filterWidth,I=cr(i.filterShape,"float32"),O=I.values,z=I.strides,re=z[0],oe=z[1],ae=z[2],se=z[3],be=this.readSync(r.dataId),Ae=r.strides,me=Ae[0],Ce=Ae[1],Oe=Ae[2],Le=Ae[3],Ue=this.readSync(e.dataId),Ne=e.strides,Fe=Ne[0],Ze=Ne[1],Ke=Ne[2],et=Ne[3],tt=i.padInfo.front,ct=i.padInfo.left,bt=i.padInfo.top,gt=0;gt<l;++gt)for(var vt=Math.max(0,Math.ceil((tt-gt)/a)),At=Math.min(i.outDepth,(i.inDepth+tt-gt)/a),ft=gt*re,Et=0;Et<d;++Et)for(var It=Math.max(0,Math.ceil((bt-Et)/s)),Vt=Math.min(i.outHeight,(i.inHeight+bt-Et)/s),ir=Et*oe+ft,fr=0;fr<A;++fr)for(var Ar=Math.max(0,Math.ceil((ct-fr)/u)),Dr=Math.min(i.outWidth,(i.inWidth+ct-fr)/u),Rr=fr*ae+ir,Pr=0;Pr<i.inChannels;++Pr)for(var xr=Pr*se+Rr,Or=0;Or<i.outChannels;++Or){for(var Qr=0,Ur=0;Ur<i.batchSize;++Ur)for(var an=Ur*Fe,An=Ur*me,xn=vt;xn<At;++xn)for(var Wi=(gt+xn*a-tt)*Ze+an,zi=xn*Ce+An,wi=It;wi<Vt;++wi)for(var eo=(Et+wi*s-bt)*Ke+Wi,qi=wi*Oe+zi,ga=Ar;ga<Dr;++ga){var ea=ga*Le+qi;Qr+=Ue[(fr+ga*u-ct)*et+eo+Pr]*be[ea+Or]}O[xr+Or]=Qr}return I.toTensor()},t.prototype.fusedDepthwiseConv2D=function(e){var r=e.input,i=e.filter,a=e.convInfo,s=e.bias,u=e.activation,l=e.preluActivationWeights,d=this.depthwiseConv2D(r,i,a);return s&&(d=this.add(d,s)),u&&(d=nu(this,d,u,l)),d},t.prototype.depthwiseConv2D=function(e,r,i){wt([e,r],"depthwiseConv2D");for(var a=i.filterHeight,s=i.filterWidth,u=i.dilationHeight,l=i.dilationWidth,d=i.padInfo.left,A=i.padInfo.top,I=i.outChannels/i.inChannels,O=cr(i.outShape,e.dtype),z=this.readSync(e.dataId),re=this.readSync(r.dataId),oe=O.values,ae=0;ae<i.batchSize;++ae)for(var se=ae*e.strides[0],be=ae*O.strides[0],Ae=0;Ae<i.outHeight;++Ae)for(var me=be+Ae*O.strides[1],Ce=Ae*i.strideHeight-d,Oe=0;Oe<a;++Oe){var Le=Ce+Oe*u;if(!(Le<0||Le>=i.inHeight))for(var Ue=Oe*r.strides[0],Ne=se+Le*e.strides[1],Fe=0;Fe<i.outWidth;++Fe)for(var Ze=me+Fe*O.strides[2],Ke=Fe*i.strideWidth-A,et=0;et<s;++et){var tt=Ke+et*l;if(!(tt<0||tt>=i.inWidth))for(var ct=Ue+et*r.strides[1],bt=Ne+tt*i.inChannels,gt=Ze,vt=ct,At=0;At<i.inChannels;++At){for(var ft=z[bt+At],Et=0;Et<I;++Et)oe[gt+Et]+=ft*re[vt+Et];gt+=I,vt+=I}}}return O.toTensor()},t.prototype.depthwiseConv2DDerInput=function(e,r,i){wt([e,r],"depthwiseConv2DDerInput");for(var a=cr(i.inShape,"float32"),s=a.values,u=a.strides,l=u[0],d=u[1],A=u[2],I=this.readSync(e.dataId),O=e.strides,z=O[0],re=O[1],oe=O[2],ae=this.readSync(r.dataId),se=r.strides,be=se[0],Ae=se[1],me=se[2],Ce=i.batchSize,Oe=i.filterHeight,Le=i.filterWidth,Ue=i.inChannels,Ne=i.inHeight,Fe=i.inWidth,Ze=i.outChannels,Ke=i.outHeight,et=i.outWidth,tt=i.strideHeight,ct=i.strideWidth,bt=Oe-1-i.padInfo.top,gt=Le-1-i.padInfo.left,vt=Ze/Ue,At=0;At<Ce;++At)for(var ft=0;ft<Ue;++ft)for(var Et=0;Et<Ne;++Et)for(var It=Et-bt,Vt=Math.max(0,Math.ceil(It/tt)),ir=Math.min(Ke,(Oe+It)/tt),fr=0;fr<Fe;++fr){for(var Ar=fr-gt,Dr=Math.max(0,Math.ceil(Ar/ct)),Rr=Math.min(et,(Le+Ar)/ct),Pr=0,xr=Vt;xr<ir;++xr)for(var Or=xr*tt-It,Qr=Dr;Qr<Rr;++Qr)for(var Ur=z*At+re*xr+oe*Qr,an=be*(Oe-1-Or)+Ae*(Le-1-(Qr*ct-Ar))+me*ft,An=0;An<vt;++An)Pr+=I[Ur+(ft*vt+An)]*ae[an+An];s[l*At+d*Et+A*fr+ft]=Pr}return a.toTensor()},t.prototype.depthwiseConv2DDerFilter=function(e,r,i){wt([e,r],"depthwiseConv2DDerFilter");for(var a=i.strideHeight,s=i.strideWidth,u=i.filterHeight,l=i.filterWidth,d=cr(i.filterShape,"float32"),A=i.padInfo.left,I=i.padInfo.top,O=i.outChannels/i.inChannels,z=this.bufferSync(e),re=this.bufferSync(r),oe=0;oe<u;++oe)for(var ae=Math.max(0,Math.ceil((I-oe)/a)),se=Math.min(i.outHeight,(i.inHeight+I-oe)/a),be=0;be<l;++be)for(var Ae=Math.max(0,Math.ceil((A-be)/s)),me=Math.min(i.outWidth,(i.inWidth+A-be)/s),Ce=0;Ce<i.outChannels;++Ce){for(var Oe=Math.trunc(Ce/O),Le=Ce%O,Ue=0,Ne=0;Ne<i.batchSize;++Ne)for(var Fe=ae;Fe<se;++Fe)for(var Ze=oe+Fe*a-I,Ke=Ae;Ke<me;++Ke){var et=be+Ke*s-A;Ue+=z.get(Ne,Ze,et,Oe)*re.get(Ne,Fe,Ke,Ce)}d.set(Ue,oe,be,Oe,Le)}return d.toTensor()},t.prototype.tile=function(e,r){return wt(e,"tile"),Ol(this.bufferSync(e),r)},t.prototype.pad=function(e,r,i){wt(e,"pad");var a=r.map(function(O,z){return O[0]+e.shape[z]+O[1]}),s=r.map(function(O){return O[0]}),u=this.bufferSync(e),l=cr(a,e.dtype);i!==0&&l.values.fill(i);for(var d=0;d<e.size;d++){var A=u.indexToLoc(d),I=A.map(function(O,z){return O+s[z]});l.set.apply(l,[u.get.apply(u,A)].concat(I))}return l.toTensor()},t.prototype.transpose=function(e,r){wt(e,"transpose");for(var i=new Array(e.rank),a=0;a<i.length;a++)i[a]=e.shape[r[a]];var s=this.readSync(e.dataId),u=cr(i,e.dtype),l=this.bufferSync(e);for(a=0;a<e.size;++a){for(var d=l.indexToLoc(a),A=new Array(d.length),I=0;I<A.length;I++)A[I]=d[r[I]];var O=u.locToIndex(A);u.values[O]=s[a]}return u.toTensor()},t.prototype.gather=function(e,r,i){wt([e,r],"gather");var a=e.shape.slice(),s=this.readSync(r.dataId);a[i]=s.length;for(var u=cr(a,e.dtype),l=this.bufferSync(e),d=0;d<u.size;++d){var A=u.indexToLoc(d),I=A.slice();I[i]=s[A[i]];var O=l.locToIndex(I);u.values[d]=l.values[O]}return u.toTensor()},t.prototype.batchToSpaceND=function(e,r,i){wt([e],"batchToSpaceND");var a=r.reduce(function(I,O){return I*O}),s=So(e.shape,r,a),u=Io(s.length,r.length),l=To(e.shape,r,a),d=ml(i,r.length),A=gl(l,i,r.length);return e.reshape(s).transpose(u).reshape(l).slice(d,A)},t.prototype.spaceToBatchND=function(e,r,i){wt([e],"spaceToBatchND");var a=r.reduce(function(O,z){return O*z}),s=[[0,0]];s.push.apply(s,i);for(var u=1+r.length;u<e.shape.length;++u)s.push([0,0]);var l=e.pad(s),d=So(l.shape,r,a,!1),A=Io(d.length,r.length,!1),I=To(l.shape,r,a,!1);return l.reshape(d).transpose(A).reshape(I)},t.prototype.pool=function(e,r,i){wt(e,"pool");for(var a=r.strideHeight,s=r.strideWidth,u=r.dilationHeight,l=r.dilationWidth,d=r.effectiveFilterHeight,A=r.effectiveFilterWidth,I=r.padInfo.top,O=r.padInfo.left,z=i==="max"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,re=this.readSync(e.dataId),oe=cr(r.outShape,e.dtype),ae=oe.values,se=r.outShape[1]*r.outShape[2]*r.outShape[3],be=r.outShape[2]*r.outShape[3],Ae=r.outShape[3],me=0;me<r.batchSize;++me)for(var Ce=me*se,Oe=me*e.strides[0],Le=0;Le<r.inChannels;++Le)for(var Ue=0;Ue<r.outHeight;++Ue)for(var Ne=Ue*a-I,Fe=Math.max(0,Ne),Ze=Math.min(r.inHeight,d+Ne),Ke=Ce+Ue*be,et=0;et<r.outWidth;++et){for(var tt=et*s-O,ct=Math.max(0,tt),bt=Math.min(r.inWidth,A+tt),gt=z,vt=0,At=0,ft=Fe;ft<Ze;ft+=u){for(var Et=Oe+ft*e.strides[1],It=ct;It<bt;It+=l){var Vt=re[Et+It*e.strides[2]+Le];i==="max"&&Vt>gt?gt=Vt:i==="avg"&&(vt+=Vt,At++)}if(isNaN(gt))break}ae[Ke+et*Ae+Le]=i==="avg"?vt/At:gt}return oe.toTensor()},t.prototype.maxPool=function(e,r){return this.pool(e,r,"max")},t.prototype.maxPoolPositions=function(e,r){for(var i=cr(r.outShape,"int32"),a=r.strideHeight,s=r.strideWidth,u=r.dilationHeight,l=r.dilationWidth,d=r.effectiveFilterHeight,A=r.effectiveFilterWidth,I=r.padInfo.top,O=r.padInfo.left,z=this.bufferSync(e),re=0;re<r.batchSize;++re)for(var oe=0;oe<r.inChannels;++oe)for(var ae=0;ae<r.outHeight;++ae){for(var se=ae*a-I,be=se;be<0;)be+=u;for(var Ae=Math.min(r.inHeight,d+se),me=0;me<r.outWidth;++me){for(var Ce=me*s-O,Oe=Ce;Oe<0;)Oe+=l;for(var Le=Math.min(r.inWidth,A+Ce),Ue=Number.NEGATIVE_INFINITY,Ne=-1,Fe=be;Fe<Ae;Fe+=u)for(var Ze=Fe-se,Ke=Oe;Ke<Le;Ke+=l){var et=Ke-Ce,tt=z.get(re,Fe,Ke,oe);tt>Ue&&(Ue=tt,Ne=Ze*A+et)}i.set(Ne,re,ae,me,oe)}}return i.toTensor()},t.prototype.maxPoolBackprop=function(e,r,i,a){wt([r,i],"maxPoolBackprop");for(var s=this.maxPoolPositions(r,a),u=a.strideHeight,l=a.strideWidth,d=a.dilationHeight,A=a.dilationWidth,I=a.effectiveFilterHeight,O=a.effectiveFilterWidth,z=O-1-a.padInfo.left,re=I-1-a.padInfo.top,oe=cr(r.shape,"float32"),ae=this.bufferSync(s),se=this.bufferSync(e),be=0;be<a.batchSize;++be)for(var Ae=0;Ae<a.inChannels;++Ae)for(var me=0;me<a.inHeight;++me)for(var Ce=0;Ce<a.inWidth;++Ce){for(var Oe=me-re,Le=Ce-z,Ue=0,Ne=0;Ne<I;Ne+=d){var Fe=(Oe+Ne)/u;if(!(Fe<0||Fe>=a.outHeight||Math.floor(Fe)!==Fe))for(var Ze=0;Ze<O;Ze+=A){var Ke=(Le+Ze)/l;if(!(Ke<0||Ke>=a.outWidth||Math.floor(Ke)!==Ke)){var et=I*O-1-ae.get(be,Fe,Ke,Ae)===Ne*O+Ze?1:0;et!==0&&(Ue+=se.get(be,Fe,Ke,Ae)*et)}}}oe.set(Ue,be,me,Ce,Ae)}return oe.toTensor()},t.prototype.avgPoolBackprop=function(e,r,i){wt([e,r],"avgPoolBackprop");for(var a=i.strideHeight,s=i.strideWidth,u=i.filterHeight,l=i.filterWidth,d=i.dilationHeight,A=i.dilationWidth,I=i.effectiveFilterHeight,O=i.effectiveFilterWidth,z=O-1-i.padInfo.left,re=I-1-i.padInfo.top,oe=cr(r.shape,"float32"),ae=1/(u*l),se=this.bufferSync(e),be=0;be<i.batchSize;++be)for(var Ae=0;Ae<i.inChannels;++Ae)for(var me=0;me<i.inHeight;++me)for(var Ce=0;Ce<i.inWidth;++Ce){for(var Oe=me-re,Le=Ce-z,Ue=0,Ne=0;Ne<I;Ne+=d){var Fe=(Oe+Ne)/a;if(!(Fe<0||Fe>=i.outHeight||Math.floor(Fe)!==Fe))for(var Ze=0;Ze<O;Ze+=A){var Ke=(Le+Ze)/s;Ke<0||Ke>=i.outWidth||Math.floor(Ke)!==Ke||(Ue+=se.get(be,Fe,Ke,Ae))}}oe.set(Ue*ae,be,me,Ce,Ae)}return oe.toTensor()},t.prototype.pool3d=function(e,r,i){wt(e,"pool3d");for(var a=r.strideDepth,s=r.strideHeight,u=r.strideWidth,l=r.dilationDepth,d=r.dilationHeight,A=r.dilationWidth,I=r.effectiveFilterDepth,O=r.effectiveFilterHeight,z=r.effectiveFilterWidth,re=r.padInfo.front,oe=r.padInfo.top,ae=r.padInfo.left,se=i==="max"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,be=this.readSync(e.dataId),Ae=cr(r.outShape,e.dtype),me=Ae.values,Ce=r.outShape[1]*r.outShape[2]*r.outShape[3]*r.outShape[4],Oe=r.outShape[2]*r.outShape[3]*r.outShape[4],Le=r.outShape[3]*r.outShape[4],Ue=r.outShape[4],Ne=0;Ne<r.batchSize;++Ne)for(var Fe=Ne*Ce,Ze=Ne*e.strides[0],Ke=0;Ke<r.inChannels;++Ke)for(var et=0;et<r.outDepth;++et){for(var tt=et*a-re,ct=tt;ct<0;)ct+=l;for(var bt=Math.min(r.inDepth,I+tt),gt=Fe+et*Oe,vt=0;vt<r.outHeight;++vt){for(var At=vt*s-oe,ft=At;ft<0;)ft+=d;for(var Et=Math.min(r.inHeight,O+At),It=gt+vt*Le,Vt=0;Vt<r.outWidth;++Vt){for(var ir=Vt*u-ae,fr=ir;fr<0;)fr+=A;for(var Ar=Math.min(r.inWidth,z+ir),Dr=It+Vt*Ue,Rr=se,Pr=0,xr=0,Or=ct;Or<bt;Or+=l){for(var Qr=Ze+Or*e.strides[1],Ur=ft;Ur<Et;Ur+=d){for(var an=Qr+Ur*e.strides[2],An=fr;An<Ar;An+=A){var xn=be[an+An*e.strides[3]+Ke];if(i==="max"&&xn>Rr?Rr=xn:i==="avg"&&(Pr+=xn,xr++),isNaN(Rr))break}if(isNaN(Rr))break}if(isNaN(Rr))break}me[Dr+Ke]=i==="avg"?Pr/xr:Rr}}}return Ae.toTensor()},t.prototype.avgPool3d=function(e,r){return wt(e,"avgPool3d"),this.pool3d(e,r,"avg").toFloat()},t.prototype.avgPool3dBackprop=function(e,r,i){wt([e,r],"avgPool3dBackprop");for(var a=i.strideDepth,s=i.strideHeight,u=i.strideWidth,l=i.filterDepth,d=i.filterHeight,A=i.filterWidth,I=i.dilationDepth,O=i.dilationHeight,z=i.dilationWidth,re=i.effectiveFilterDepth,oe=i.effectiveFilterHeight,ae=i.effectiveFilterWidth,se=re-1-i.padInfo.front,be=ae-1-i.padInfo.left,Ae=oe-1-i.padInfo.top,me=cr(r.shape,"float32"),Ce=1/(l*d*A),Oe=this.bufferSync(e),Le=0;Le<i.batchSize;++Le)for(var Ue=0;Ue<i.inChannels;++Ue)for(var Ne=0;Ne<i.inDepth;++Ne)for(var Fe=0;Fe<i.inHeight;++Fe)for(var Ze=0;Ze<i.inWidth;++Ze){for(var Ke=Ne-se,et=Fe-Ae,tt=Ze-be,ct=0,bt=0;bt<re;bt+=I){var gt=(Ke+bt)/a;if(!(gt<0||gt>=i.outDepth||Math.floor(gt)!==gt))for(var vt=0;vt<oe;vt+=O){var At=(et+vt)/s;if(!(At<0||At>=i.outHeight||Math.floor(At)!==At))for(var ft=0;ft<ae;ft+=z){var Et=(tt+ft)/u;Et<0||Et>=i.outWidth||Math.floor(Et)!==Et||(ct+=Oe.get(Le,gt,At,Et,Ue))}}}me.set(ct*Ce,Le,Ne,Fe,Ze,Ue)}return me.toTensor()},t.prototype.maxPool3d=function(e,r){return wt(e,"maxPool3d"),this.pool3d(e,r,"max").toFloat()},t.prototype.maxPool3dPositions=function(e,r){for(var i=cr(r.outShape,"int32"),a=r.strideDepth,s=r.strideHeight,u=r.strideWidth,l=r.dilationDepth,d=r.dilationHeight,A=r.dilationWidth,I=r.effectiveFilterDepth,O=r.effectiveFilterHeight,z=r.effectiveFilterWidth,re=r.padInfo.front,oe=r.padInfo.top,ae=r.padInfo.left,se=this.bufferSync(e),be=0;be<r.batchSize;++be)for(var Ae=0;Ae<r.inChannels;++Ae)for(var me=0;me<r.outDepth;++me){for(var Ce=me*a-re,Oe=Ce;Oe<0;)Oe+=l;for(var Le=Math.min(r.inDepth,I+Ce),Ue=0;Ue<r.outHeight;++Ue){for(var Ne=Ue*s-oe,Fe=Ne;Fe<0;)Fe+=d;for(var Ze=Math.min(r.inHeight,O+Ne),Ke=0;Ke<r.outWidth;++Ke){for(var et=Ke*u-ae,tt=et;tt<0;)tt+=A;for(var ct=Math.min(r.inWidth,z+et),bt=Number.NEGATIVE_INFINITY,gt=-1,vt=Oe;vt<Le;vt+=l)for(var At=vt-Ce,ft=Fe;ft<Ze;ft+=d)for(var Et=ft-Ne,It=tt;It<ct;It+=A){var Vt=It-et,ir=se.get(be,vt,ft,It,Ae);ir>=bt&&(bt=ir,gt=At*O*z+Et*O+Vt)}i.set(gt,be,me,Ue,Ke,Ae)}}}return i.toTensor()},t.prototype.maxPool3dBackprop=function(e,r,i,a){wt([r,i],"maxPool3dBackprop");for(var s=this.maxPool3dPositions(r,a),u=a.strideDepth,l=a.strideHeight,d=a.strideWidth,A=a.dilationDepth,I=a.dilationHeight,O=a.dilationWidth,z=a.effectiveFilterDepth,re=a.effectiveFilterHeight,oe=a.effectiveFilterWidth,ae=z-1-a.padInfo.front,se=oe-1-a.padInfo.left,be=re-1-a.padInfo.top,Ae=cr(r.shape,"float32"),me=this.bufferSync(s),Ce=this.bufferSync(e),Oe=0;Oe<a.batchSize;++Oe)for(var Le=0;Le<a.inChannels;++Le)for(var Ue=0;Ue<a.inDepth;++Ue)for(var Ne=0;Ne<a.inHeight;++Ne)for(var Fe=0;Fe<a.inWidth;++Fe){for(var Ze=Ue-ae,Ke=Ne-be,et=Fe-se,tt=0,ct=0;ct<z;ct+=A){var bt=(Ze+ct)/u;if(!(bt<0||bt>=a.outDepth||Math.floor(bt)!==bt))for(var gt=0;gt<re;gt+=I){var vt=(Ke+gt)/l;if(!(vt<0||vt>=a.outHeight||Math.floor(vt)!==vt))for(var At=0;At<oe;At+=O){var ft=(et+At)/d;if(!(ft<0||ft>=a.outWidth||Math.floor(ft)!==ft)){var Et=z*re*oe-1-me.get(Oe,bt,vt,ft,Le)===ct*re*oe+gt*oe+At?1:0;Et!==0&&(tt+=Ce.get(Oe,bt,vt,ft,Le)*Et)}}}}Ae.set(tt,Oe,Ue,Ne,Fe,Le)}return Ae.toTensor()},t.prototype.cast=function(e,r){return Ss(e,r,this)},t.prototype.reshape=function(e,r){return Bo(e,r)},t.prototype.avgPool=function(e,r){return wt(e,"avgPool"),this.pool(e,r,"avg").toFloat()},t.prototype.resizeBilinear=function(e,r,i,a){wt(e,"resizeBilinear");for(var s=e.shape,u=s[0],l=s[1],d=s[2],A=s[3],I=this.readSync(e.dataId),O=new Float32Array(ce([u,r,i,A])),z=[a&&r>1?l-1:l,a&&i>1?d-1:d],re=[a&&r>1?r-1:r,a&&i>1?i-1:i],oe=0,ae=z[0]/re[0],se=z[1]/re[1],be=0;be<u;be++)for(var Ae=0;Ae<r;Ae++)for(var me=ae*Ae,Ce=Math.floor(me),Oe=me-Ce,Le=Math.min(l-1,Math.ceil(me)),Ue=be*e.strides[0]+Ce*e.strides[1],Ne=be*e.strides[0]+Le*e.strides[1],Fe=0;Fe<i;Fe++)for(var Ze=se*Fe,Ke=Math.floor(Ze),et=Ze-Ke,tt=Math.min(d-1,Math.ceil(Ze)),ct=Ue+Ke*e.strides[2],bt=Ne+Ke*e.strides[2],gt=Ue+tt*e.strides[2],vt=Ne+tt*e.strides[2],At=0;At<A;At++){var ft=I[ct+At],Et=I[bt+At],It=ft+(I[gt+At]-ft)*et,Vt=It+(Et+(I[vt+At]-Et)*et-It)*Oe;O[oe++]=Vt}return Sn(O,[u,r,i,A])},t.prototype.resizeBilinearBackprop=function(e,r,i){wt([e,r],"resizeBilinearBackprop");for(var a=r.shape,s=a[0],u=a[1],l=a[2],d=a[3],A=e.shape,I=A[1],O=A[2],z=new Float32Array(s*u*l*d),re=[i&&I>1?u-1:u,i&&O>1?l-1:l],oe=[i&&I>1?I-1:I,i&&O>1?O-1:O],ae=re[0]/oe[0],se=re[1]/oe[1],be=this.readSync(e.dataId),Ae=0,me=0;me<s;me++)for(var Ce=me*r.strides[0],Oe=0;Oe<I;Oe++)for(var Le=Oe*ae,Ue=Math.floor(Le),Ne=Math.min(Math.ceil(Le),u-1),Fe=Ce+Ue*r.strides[1],Ze=Ce+Ne*r.strides[1],Ke=Le-Ue,et=1-Ke,tt=0;tt<O;tt++)for(var ct=tt*se,bt=Math.floor(ct),gt=Math.min(Math.ceil(ct),l-1),vt=ct-bt,At=1-vt,ft=Fe+bt*r.strides[2],Et=Fe+gt*r.strides[2],It=Ze+bt*r.strides[2],Vt=Ze+gt*r.strides[2],ir=et*At,fr=et*vt,Ar=Ke*At,Dr=Ke*vt,Rr=0;Rr<d;Rr++){var Pr=be[Ae++];z[ft+Rr]+=Pr*ir,z[Et+Rr]+=Pr*fr,z[It+Rr]+=Pr*Ar,z[Vt+Rr]+=Pr*Dr}return li(z,[s,l,u,d],r.dtype)},t.prototype.resizeNearestNeighbor=function(e,r,i,a){wt(e,"resizeNearestNeighbor");for(var s=e.shape,u=s[0],l=s[1],d=s[2],A=s[3],I=this.readSync(e.dataId),O=new Float32Array(u*r*i*A),z=[a&&r>1?l-1:l,a&&i>1?d-1:d],re=[a&&r>1?r-1:r,a&&i>1?i-1:i],oe=z[0]/re[0],ae=z[1]/re[1],se=0,be=0;be<u;be++)for(var Ae=be*e.strides[0],me=0;me<r;me++)for(var Ce=oe*me,Oe=Ae+Math.min(l-1,a?Math.round(Ce):Math.floor(Ce))*e.strides[1],Le=0;Le<i;Le++)for(var Ue=ae*Le,Ne=Oe+Math.min(d-1,a?Math.round(Ue):Math.floor(Ue))*e.strides[2],Fe=0;Fe<A;Fe++){var Ze=I[Ne+Fe];O[se++]=Ze}return Sn(O,[u,r,i,A],e.dtype)},t.prototype.resizeNearestNeighborBackprop=function(e,r,i){wt([e,r],"resizeNearestNeighborBackprop");for(var a=r.shape,s=a[0],u=a[1],l=a[2],d=a[3],A=e.shape,I=A[1],O=A[2],z=new Float32Array(s*u*l*d),re=this.readSync(e.dataId),oe=[i&&I>1?u-1:u,i&&O>1?l-1:l],ae=[i&&I>1?I-1:I,i&&O>1?O-1:O],se=oe[0]/ae[0],be=oe[1]/ae[1],Ae=1/se,me=1/be,Ce=2*Math.ceil(Ae)+2,Oe=2*Math.ceil(me)+2,Le=0;Le<s;Le++)for(var Ue=Le*r.strides[0],Ne=0;Ne<u;Ne++)for(var Fe=Ue+Ne*r.strides[1],Ze=Math.floor(Ne*Ae),Ke=Math.floor(Ze-Ce/2),et=0;et<l;et++)for(var tt=Fe+et*r.strides[2],ct=Math.floor(et*me),bt=Math.floor(ct-Oe/2),gt=0;gt<d;gt++){for(var vt=0,At=0;At<Ce;At++){var ft=At+Ke;if(!(ft<0||ft>=I)){var Et=Ue+ft*e.strides[1],It=ft*se;if(Ne===Math.min(u-1,i?Math.round(It):Math.floor(It)))for(var Vt=0;Vt<Oe;Vt++){var ir=Vt+bt;if(!(ir<0||ir>=O)){var fr=Et+ir*e.strides[2],Ar=ir*be;et===Math.min(l-1,i?Math.round(Ar):Math.floor(Ar))&&(vt+=re[fr+gt])}}}}z[tt+gt]=vt}return li(z,r.shape,r.dtype)},t.prototype.batchNormalization=function(e,r,i,a,s,u){wt([e,r,i,s,u],"batchNorm");for(var l=this.readSync(e.dataId),d=this.readSync(r.dataId),A=this.readSync(i.dataId),I=s?this.readSync(s.dataId):new Float32Array([1]),O=u?this.readSync(u.dataId):new Float32Array([0]),z=new Float32Array(l.length),re=O.length,oe=I.length,ae=A.length,se=d.length,be=0,Ae=0,me=0,Ce=0,Oe=0;Oe<l.length;++Oe)z[Oe]=O[be++]+(l[Oe]-d[Ae++])*I[me++]/Math.sqrt(A[Ce++]+a),be>=re&&(be=0),Ae>=se&&(Ae=0),me>=oe&&(me=0),Ce>=ae&&(Ce=0);return li(z,e.shape)},t.prototype.localResponseNormalization4D=function(e,r,i,a,s){wt(e,"localResponseNormalization4D");var u=e.shape[3],l=u-1,d=this.readSync(e.dataId),A=e.size,I=new Float32Array(A);function O(ae){for(var se=ae%u,be=ae-se+Math.max(0,se-r),Ae=ae-se+Math.min(se+r,l),me=0;be<=Ae;be++){var Ce=d[be];me+=Ce*Ce}return me}for(var z=0;z<A;z++){var re=O(z),oe=d[z]*Math.pow(i+a*re,-s);I[z]=oe}return li(I,e.shape)},t.prototype.LRNGrad=function(e,r,i,a,s,u,l){wt(e,"LRNGrad");for(var d=e.shape[3],A=this.readSync(e.dataId),I=this.readSync(r.dataId),O=this.readSync(i.dataId),z=new Float32Array(e.size),re=e.size,oe=0;oe<re;oe++){for(var ae=oe%d,se=oe-ae+Math.max(0,ae-a),be=oe-ae+Math.min(d,ae+a+1),Ae=0,me=se;me<be;me++)Ae+=Math.pow(I[me],2);for(Ae=u*Ae+s,me=se;me<be;me++){var Ce=-2*u*l*I[me]*O[oe]/Ae;oe===me&&(Ce+=Math.pow(Ae,-l)),Ce*=A[oe],z[me]+=Ce}}return li(z,e.shape)},t.prototype.multinomial=function(e,r,i,a){wt(e,"multinomial");for(var s=r?e:Gi(e),u=s.shape[0],l=s.shape[1],d=pn([u,i],"int32"),A=this.readSync(d.dataId),I=this.readSync(s.dataId),O=0;O<u;++O){var z=O*l,re=new Float32Array(l-1);re[0]=I[z];for(var oe=1;oe<re.length;++oe)re[oe]=re[oe-1]+I[z+oe];for(var ae=Co(a.toString()),se=O*i,be=0;be<i;++be){var Ae=ae();A[se+be]=re.length;for(var me=0;me<re.length;me++)if(Ae<re[me]){A[se+be]=me;break}}}return d},t.prototype.oneHot=function(e,r,i,a){wt(e,"oneHot");var s=new Float32Array(e.size*r);s.fill(a);for(var u=this.readSync(e.dataId),l=0;l<e.size;++l)u[l]>=0&&u[l]<r&&(s[l*r+u[l]]=i);return oa(s,[e.size,r],"int32")},t.prototype.nonMaxSuppression=function(e,r,i,a,s){return wt(e,"nonMaxSuppression"),Rs(this.readSync(e.dataId),this.readSync(r.dataId),i,a,s)},t.prototype.fft=function(e){return this.fftBatch(e,!1)},t.prototype.ifft=function(e){return this.fftBatch(e,!0)},t.prototype.fftBatch=function(e,r){for(var i=e.shape[0],a=e.shape[1],s=cr(e.shape,"float32"),u=cr(e.shape,"float32"),l=$n(e).as2D(i,a),d=vi(e).as2D(i,a),A=0;A<i;A++)for(var I=l.slice([A,0],[1,a]),O=d.slice([A,0],[1,a]),z=Cn(I,O),re=this.readSync(this.fftImpl(z,r).dataId),oe=0;oe<a;oe++){var ae=Sl(re,oe);s.values[A*a+oe]=ae.real,u.values[A*a+oe]=ae.imag}return Cn(s.toTensor(),u.toTensor()).as2D(i,a)},t.prototype.fftImpl=function(e,r){var i=e.as1D(),a=i.size;if(this.isExponentOf2(a)){var s=this.fftRadix2(i,a,r).as2D(e.shape[0],e.shape[1]);return r&&(s=Cn($n(s).div(kt(a)),vi(s).div(kt(a)))),s}var u=this.readSync(e.dataId),l=function(d){for(var A=new Float32Array(d.length/2),I=new Float32Array(d.length/2),O=0;O<d.length;O+=2)A[O/2]=d[O],I[O/2]=d[O+1];return{real:A,imag:I}}(this.fourierTransformByMatmul(u,a,r));return Cn(l.real,l.imag).as2D(e.shape[0],e.shape[1])},t.prototype.isExponentOf2=function(e){return(e&e-1)==0},t.prototype.fftRadix2=function(e,r,i){if(r===1)return e;var a=this.readSync(e.dataId),s=r/2,u=function(se){for(var be=Math.ceil(se.length/4),Ae=new Float32Array(be),me=new Float32Array(be),Ce=0;Ce<se.length;Ce+=4)Ae[Math.floor(Ce/4)]=se[Ce],me[Math.floor(Ce/4)]=se[Ce+1];return{real:Ae,imag:me}}(a),l=Cn(u.real,u.imag).as1D(),d=function(se){for(var be=Math.floor(se.length/4),Ae=new Float32Array(be),me=new Float32Array(be),Ce=2;Ce<se.length;Ce+=4)Ae[Math.floor(Ce/4)]=se[Ce],me[Math.floor(Ce/4)]=se[Ce+1];return{real:Ae,imag:me}}(a),A=Cn(d.real,d.imag).as1D();l=this.fftRadix2(l,s,i),A=this.fftRadix2(A,s,i);var I=function(se,be){for(var Ae=new Float32Array(se/2),me=new Float32Array(se/2),Ce=0;Ce<Math.ceil(se/2);Ce++){var Oe=(be?2:-2)*Math.PI*(Ce/se);Ae[Ce]=Math.cos(Oe),me[Ce]=Math.sin(Oe)}return{real:Ae,imag:me}}(r,i),O=Cn(I.real,I.imag).mul(A),z=l.add(O),re=l.sub(O),oe=$n(z).concat($n(re)),ae=vi(z).concat(vi(re));return Cn(oe,ae).as1D()},t.prototype.fourierTransformByMatmul=function(e,r,i){for(var a=new Float32Array(2*r),s=0;s<r;s++){for(var u=0,l=0,d=0;d<r;d++){var A=dp(s*d,r,i),I=Sl(e,d);u+=I.real*A.real-I.imag*A.imag,l+=I.real*A.imag+I.imag*A.real}i&&(u/=r,l/=r),fp(a,u,l,s)}return a},t.prototype.depthToSpace=function(e,r,i){q(i==="NHWC",function(){return"Only NHWC dataFormat supported on CPU for depthToSpace. Got "+i}),q(r>1,function(){return"blockSize should be > 1 for depthToSpace, but was: "+r});for(var a=e.shape[0],s=e.shape[1],u=e.shape[2],l=e.shape[3],d=s*r,A=u*r,I=l/(r*r),O=this.readSync(e.dataId),z=new Float32Array(a*d*A*I),re=0,oe=0;oe<a;++oe)for(var ae=0;ae<d;++ae)for(var se=Math.floor(ae/r),be=ae%r,Ae=0;Ae<A;++Ae)for(var me=Math.floor(Ae/r),Ce=(be*r+Ae%r)*I,Oe=0;Oe<I;++Oe){var Le=Oe+Ce+l*(me+u*(se+s*oe));z[re++]=O[Le]}return li(z,[a,d,A,I])},t.prototype.broadcastedBinaryOp=function(e,r,i,a){var s=Ir(e.shape,r.shape),u=cr(s,i),l=this.readSync(e.dataId),d=this.readSync(r.dataId),A=Qi(e.shape,s),I=Qi(r.shape,s),O=u.values;if(A.length+I.length===0)for(var z=0;z<O.length;++z)O[z]=a(l[z%l.length],d[z%d.length]);else{var re=this.bufferSync(e),oe=this.bufferSync(r),ae=function(se){var be=u.indexToLoc(se),Ae=be.slice(-e.rank);A.forEach(function(Le){return Ae[Le]=0});var me=re.locToIndex(Ae),Ce=be.slice(-r.rank);I.forEach(function(Le){return Ce[Le]=0});var Oe=oe.locToIndex(Ce);O[se]=a(l[me],d[Oe])};for(z=0;z<O.length;++z)ae(z)}return u.toTensor()},t.prototype.broadcastedBinaryComplexOp=function(e,r,i){var a=Ir(e.shape,r.shape),s=cr(a,"float32"),u=cr(a,"float32"),l=this.readSync(e.dataId),d=this.readSync(r.dataId),A=Qi(e.shape,a),I=Qi(r.shape,a),O=s.values,z=u.values;if(A.length+I.length===0)for(var re=0;re<O.length;re++){var oe=re%l.length,ae=re%d.length,se=i(l[2*oe],l[2*oe+1],d[2*ae],d[2*ae+1]);O[re]=se.real,z[re]=se.imag}else{var be=this.bufferSync(this.data.get(e.dataId).complexTensors.real),Ae=this.bufferSync(this.data.get(r.dataId).complexTensors.real),me=function(Ce){var Oe=s.indexToLoc(Ce),Le=Oe.slice(-e.rank);A.forEach(function(Ke){return Le[Ke]=0});var Ue=be.locToIndex(Le),Ne=Oe.slice(-r.rank);I.forEach(function(Ke){return Ne[Ke]=0});var Fe=Ae.locToIndex(Ne),Ze=i(l[2*Ue],l[2*Ue+1],d[2*Fe],d[2*Fe+1]);O[Ce]=Ze.real,z[Ce]=Ze.imag};for(re=0;re<O.length;re++)me(re)}return this.complex(s.toTensor(),u.toTensor())},t.prototype.split=function(e,r,i){return Rl(e,r,i)},t.prototype.dispose=function(){},t.prototype.floatPrecision=function(){return 32},t.prototype.epsilon=function(){return 1e-7},t.prototype.cropAndResize=function(e,r,i,a,s,u){for(var l=e.shape,d=l[0],A=l[1],I=l[2],O=l[3],z=r.shape[0],re=a[0],oe=a[1],ae=cr([z,re,oe,O],"float32"),se=this.readSync(r.dataId),be=this.readSync(i.dataId),Ae=this.readSync(e.dataId),me=e.strides,Ce=ae.strides,Oe=0;Oe<z;Oe++){var Le=4*Oe,Ue=se[Le],Ne=se[Le+1],Fe=se[Le+2],Ze=se[Le+3],Ke=be[Oe];if(!(Ke>=d))for(var et=re>1?(Fe-Ue)*(A-1)/(re-1):0,tt=oe>1?(Ze-Ne)*(I-1)/(oe-1):0,ct=0;ct<re;ct++){var bt=re>1?Ue*(A-1)+ct*et:.5*(Ue+Fe)*(A-1);if(bt<0||bt>A-1)for(var gt=0;gt<oe;gt++)for(var vt=0;vt<O;vt++){var At=vt+gt*Ce[2]+ct*Ce[1]+Oe*Ce[0];ae.values[At]=u}else if(s==="bilinear"){var ft=Math.floor(bt),Et=Math.ceil(bt),It=bt-ft;for(gt=0;gt<oe;gt++)if((Or=oe>1?Ne*(I-1)+gt*tt:.5*(Ne+Ze)*(I-1))<0||Or>I-1)for(vt=0;vt<O;vt++)At=vt+gt*Ce[2]+ct*Ce[1]+Oe*Ce[0],ae.values[At]=u;else{var Vt=Math.floor(Or),ir=Math.ceil(Or),fr=Or-Vt;for(vt=0;vt<O;vt++){var Ar=Ae[At=vt+Vt*me[2]+ft*me[1]+Ke*me[0]],Dr=Ae[At=vt+ir*me[2]+ft*me[1]+Ke*me[0]],Rr=Ae[At=vt+Vt*me[2]+Et*me[1]+Ke*me[0]],Pr=Ar+(Dr-Ar)*fr,xr=Rr+(Ae[At=vt+ir*me[2]+Et*me[1]+Ke*me[0]]-Rr)*fr;At=vt+gt*Ce[2]+ct*Ce[1]+Oe*Ce[0],ae.values[At]=Pr+(xr-Pr)*It}}}else for(gt=0;gt<oe;++gt){var Or;if((Or=oe>1?Ne*(I-1)+gt*tt:.5*(Ne+Ze)*(I-1))<0||Or>I-1)for(vt=0;vt<O;vt++)At=vt+gt*Ce[2]+ct*Ce[1]+Oe*Ce[0],ae.values[At]=u;else{var Qr=Math.round(Or),Ur=Math.round(bt);for(vt=0;vt<O;vt++){var an=vt+Qr*me[2]+Ur*me[1]+Ke*me[0],An=vt+gt*Ce[2]+ct*Ce[1]+Oe*Ce[0];ae.values[An]=Ae[an]}}}}}return ae.toTensor()},t.prototype.sparseToDense=function(e,r,i,a){var s=no(0,e,i),u=s.sliceRank,l=s.numUpdates,d=s.sliceSize,A=s.strides,I=s.outputSize;return this.scatter(e,r,i,I,d,l,u,A,a,!1)},t.prototype.gatherND=function(e,r){var i=r.shape,a=i[i.length-1],s=ys(e,r),u=s[0],l=s[1],d=s[2],A=s[3];if(l===0)return Sn([],u,e.dtype);for(var I=new Zt([l,d],e.dtype),O=this.readSync(r.dataId),z=this.readSync(e.dataId),re=0;re<l;re++){for(var oe=[],ae=0,se=0;se<a;se++){var be=O[re*a+se];ae+=be*A[se],oe.push(be)}if(ae<0||ae>=e.size/d)throw new Error("Invalid indices: "+oe+" does not index into "+e.shape);for(var Ae=0;Ae<d;Ae++)I.values[re*d+Ae]=z[ae*d+Ae]}return I.toTensor().reshape(u)},t.prototype.scatterND=function(e,r,i){var a=no(0,e,i),s=a.sliceRank,u=a.numUpdates,l=a.sliceSize,d=a.strides,A=a.outputSize,I=kt(0);return this.scatter(e,r,i,A,l,u,s,d,I,!0)},t.prototype.fill=function(e,r,i){var a=W(i=i||le(r),ce(e));return a.fill(r),We.makeTensor(a,e,i,this)},t.prototype.onesLike=function(e){if(e.dtype==="string")throw new Error("onesLike is not supported for string tensors");return this.fill(e.shape,1,e.dtype)},t.prototype.zerosLike=function(e){var r=W(e.dtype,ce(e.shape));return this.makeOutput(r,e.shape,e.dtype)},t.prototype.linspace=function(e,r,i){return Is(e,r,i)},t.prototype.scatter=function(e,r,i,a,s,u,l,d,A,I){var O=[a/s,s],z=this.readSync(e.dataId),re=this.readSync(r.dataId);if(a===0)return Sn([],i,r.dtype);var oe=new Zt(O,r.dtype);oe.values.fill(this.readSync(A.dataId)[0]);for(var ae=0;ae<u;ae++){for(var se=[],be=0,Ae=0;Ae<l;Ae++){var me=z[ae*l+Ae];se.push(me),be+=me*d[Ae]}if(be<0||be>=a/s)throw new Error("Invalid indices: "+se+" does not index into "+i);for(var Ce=0;Ce<s;Ce++)I?oe.values[be*s+Ce]+=re[ae*s+Ce]:oe.values[be*s+Ce]=r.rank===0?re[0]:re[ae*s+Ce]}return oe.toTensor().reshape(i)},t}(Cl);We.registerBackend("cpu",function(){return new vg},1);for(var iu=0,af=[{kernelName:"NonMaxSuppressionV5",backendName:"cpu",kernelFunc:function(n){var t=n.inputs,e=n.backend,r=n.attrs,i=t,a=i.boxes,s=i.scores,u=r,l=u.maxOutputSize,d=u.iouThreshold,A=u.scoreThreshold,I=u.softNmsSigma,O=e;wt(a,"NonMaxSuppressionWithScore");var z=Os(O.data.get(a.dataId).values,O.data.get(s.dataId).values,l,d,A,I);return[z.selectedIndices,z.selectedScores]}},{kernelName:"Square",backendName:"cpu",kernelFunc:function(n){var t=n.inputs,e=n.backend,r=t.x,i=e;wt(r,"square");for(var a=i.data.get(r.dataId).values,s=new Float32Array(a.length),u=0;u<a.length;++u){var l=a[u];s[u]=l*l}return{dataId:i.write(s,r.shape,r.dtype),shape:r.shape,dtype:r.dtype}}},{kernelName:lo,backendName:"cpu",kernelFunc:function(n){var t=n.inputs,e=n.backend,r=t,i=r.a,a=r.b,s=e;wt([i,a],lo);var u=s.data.get(i.dataId).values,l=s.data.get(a.dataId).values,d=function(O,z,re,oe,ae,se){var be=Ir(O,z),Ae=be.length,me=He(be),Ce=G(ae,ce(be)),Oe=O.length,Le=z.length,Ue=He(O),Ne=He(z),Fe=Qi(O,be),Ze=Qi(z,be);if(Fe.length+Ze.length===0)for(var Ke=0;Ke<Ce.length;++Ke)Ce[Ke]=se(re[Ke%re.length],oe[Ke%oe.length]);else{var et=function(tt){var ct=yt(tt,Ae,me),bt=ct.slice(-Oe);Fe.forEach(function(ft){return bt[ft]=0});var gt=nt(bt,Oe,Ue),vt=ct.slice(-Le);Ze.forEach(function(ft){return vt[ft]=0});var At=nt(vt,Le,Ne);Ce[tt]=se(re[gt],oe[At])};for(Ke=0;Ke<Ce.length;++Ke)et(Ke)}return[Ce,be]}(i.shape,a.shape,u,l,i.dtype,function(O,z){var re=O-z;return re*re}),A=d[0],I=d[1];return{dataId:s.write(A,I,i.dtype),shape:I,dtype:i.dtype}}}];iu<af.length;iu++)H(af[iu]);for(var Ha,mg=function(n){this.variableNames=["A"];var t=qn(),e=n[0],r=n[1];this.outputShape=n,this.userCode=`
void main() {
ivec3 coords = getOutputCoords();
int texR = coords[0];
int texC = coords[1];
int depth = coords[2];
vec2 uv = (vec2(texC, texR) + halfCR) / vec2(`+r+".0, "+e+`.0);
vec4 values = `+t.texture2D+`(A, uv);
float value;
if (depth == 0) {
value = values.r;
} else if (depth == 1) {
value = values.g;
} else if (depth == 2) {
value = values.b;
} else if (depth == 3) {
value = values.a;
}
setOutput(floor(value * 255.0 + 0.5));
}
`},gg=function(n){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0;var t=qn(),e=n[0],r=n[1];this.outputShape=n,this.userCode=`
void main() {
ivec3 coords = getOutputCoords();
int texR = coords[0];
int texC = coords[1];
int depth = coords[2];
vec4 result = vec4(0.);
for(int row=0; row<=1; row++) {
for(int col=0; col<=1; col++) {
texC = coords[1] + row;
depth = coords[2] + col;
vec2 uv = (vec2(texC, texR) + halfCR) /
vec2(`+r+".0, "+e+`.0);
vec4 values = `+t.texture2D+`(A, uv);
float value;
if (depth == 0) {
value = values.r;
} else if (depth == 1) {
value = values.g;
} else if (depth == 2) {
value = values.b;
} else if (depth == 3) {
value = values.a;
}
result[row * 2 + col] = floor(value * 255.0 + 0.5);
}
}
`+t.output+` = result;
}
`},au=0,of=[{kernelName:"FromPixels",backendName:"webgl",kernelFunc:function(n){var t=n.inputs,e=n.backend,r=n.attrs,i=t.pixels,a=r.numChannels,s=typeof HTMLVideoElement!="undefined"&&i instanceof HTMLVideoElement,u=typeof HTMLImageElement!="undefined"&&i instanceof HTMLImageElement,l=s?[i.videoWidth,i.videoHeight]:[i.width,i.height],d=l[0],A=l[1],I=[A,d],O=[A,d,a];(u||s)&&(Ha==null&&(Ha=document.createElement("canvas").getContext("2d")),Ha.canvas.width=d,Ha.canvas.height=A,Ha.drawImage(i,0,0,d,A),i=Ha.canvas);var z=e.makeTensorInfo(I,"int32");e.texData.get(z.dataId).usage=Ge.PIXELS,e.gpgpu.uploadPixelDataToTexture(e.getTexture(z.dataId),i);var re=P().getBool("WEBGL_PACK")?new gg(O):new mg(O),oe=e.runWebGLProgram(re,[z],"int32");return e.disposeData(z.dataId),oe}},{kernelName:"NonMaxSuppressionV5",backendName:"webgl",kernelFunc:function(n){var t=n.inputs,e=n.backend,r=n.attrs;Yn("tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead");var i=t,a=i.boxes,s=i.scores,u=r,l=u.maxOutputSize,d=u.iouThreshold,A=u.scoreThreshold,I=u.softNmsSigma,O=e,z=Os(O.readSync(a.dataId),O.readSync(s.dataId),l,d,A,I);return[z.selectedIndices,z.selectedScores]}},{kernelName:"Square",backendName:"webgl",kernelFunc:function(n){var t=n.inputs,e=n.backend,r=t.x,i=e,a=new gr(r.shape,"return x * x;");return i.runWebGLProgram(a,[r],r.dtype)}},{kernelName:lo,backendName:"webgl",kernelFunc:function(n){var t=n.inputs,e=n.backend,r=t,i=r.a,a=r.b,s=e,u=P().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Xi("return (a - b) * (a - b);",i.shape,a.shape):new In("return (a - b) * (a - b);",i.shape,a.shape);return s.compileAndRun(u,[i,a])}}];au<of.length;au++)H(of[au]);for(var ou=0,sf=[{kernelName:"Square",gradFunc:function(n,t){var e=t[0];return{x:function(){return n.mul(e.toFloat().mul(2))}}}},{kernelName:lo,gradFunc:function(n,t){var e=t[0],r=t[1],i=kt(2);return{a:function(){return ei(n,ei(i,Nn(e,r)))},b:function(){return ei(n,ei(i,Nn(r,e)))}}}}];ou<sf.length;ou++)N(sf[ou]);var yg=function(){function n(){}return n.prototype.fetch=function(t,e){return fetch(t,e)},n.prototype.now=function(){return performance.now()},n.prototype.encode=function(t,e){if(e!=="utf-8"&&e!=="utf8")throw new Error("Browser's encoder only supports utf-8, but got "+e);return this.textEncoder==null&&(this.textEncoder=new TextEncoder),this.textEncoder.encode(t)},n.prototype.decode=function(t,e){return new TextDecoder(e).decode(t)},n}();P().get("IS_BROWSER")&&P().setPlatform("browser",new yg);var su,bg=function(){return Te(22591)},wg=function(){function n(){this.util=Te(24726),this.textEncoder=new this.util.TextEncoder}return n.prototype.fetch=function(t,e){return P().global.fetch!=null?P().global.fetch(t,e):(su==null&&(su=bg()),su(t,e))},n.prototype.now=function(){var t=b.hrtime();return 1e3*t[0]+t[1]/1e6},n.prototype.encode=function(t,e){if(e!=="utf-8"&&e!=="utf8")throw new Error("Node built-in encoder only supports utf-8, but got "+e);return this.textEncoder.encode(t)},n.prototype.decode=function(t,e){return t.length===0?"":new this.util.TextDecoder(e).decode(t)},n}();P().get("IS_NODE")&&P().setPlatform("node",new wg);var uu={float32:4,int32:4,uint16:2,uint8:1,bool:1},Zo=4;function uf(n,t){for(var e={},r=0,i=function(u){var l=u.name,d=u.dtype,A=u.shape,I=ce(A),O=void 0;if("quantization"in u){var z=u.quantization;if(z.dtype!=="uint8"&&z.dtype!=="uint16")throw new Error("Weight "+u.name+" has unknown quantization dtype "+z.dtype+". Supported quantization dtypes are: 'uint8' and 'uint16'.");var re=uu[z.dtype],oe=n.slice(r,r+I*re),ae=z.dtype==="uint8"?new Uint8Array(oe):new Uint16Array(oe);if(d==="float32")O=Float32Array.from(ae,function(Oe){return Oe*z.scale+z.min});else{if(d!=="int32")throw new Error("Unsupported dtype in weight '"+l+"': "+d);O=Int32Array.from(ae,function(Oe){return Math.round(Oe*z.scale+z.min)})}r+=I*re}else if(d==="string"){var se=ce(u.shape);O=[];for(var be=0;be<se;be++){var Ae=new Uint32Array(n.slice(r,r+Zo))[0];r+=Zo;var me=new Uint8Array(n.slice(r,r+Ae));O.push(me),r+=Ae}}else{var Ce=uu[d];if(oe=n.slice(r,r+I*Ce),d==="float32")O=new Float32Array(oe);else if(d==="int32")O=new Int32Array(oe);else{if(d!=="bool")throw new Error("Unsupported dtype in weight '"+l+"': "+d);O=new Uint8Array(oe)}r+=I*Ce}e[l]=Sn(O,A,d)},a=0,s=t;a<s.length;a++)i(s[a]);return e}function Ag(n){if(n===null)throw new Error("Invalid input value: "+JSON.stringify(n));var t=0,e=[];n.forEach(function(a){if(t+=a.byteLength,e.push(a.byteLength===a.buffer.byteLength?a:new a.constructor(a)),!(a instanceof Float32Array||a instanceof Int32Array||a instanceof Uint8Array))throw new Error("Unsupported TypedArray subtype: "+a.constructor.name)});var r=new Uint8Array(t),i=0;return e.forEach(function(a){r.set(new Uint8Array(a.buffer),i),i+=a.byteLength}),r.buffer}var lu=typeof x!="undefined"&&(typeof Blob=="undefined"||typeof atob=="undefined"||typeof btoa=="undefined");function lf(n){return lu?x.byteLength(n):new Blob([n]).size}function cu(n){var t=0;n.forEach(function(i){t+=i.byteLength});var e=new Uint8Array(t),r=0;return n.forEach(function(i){e.set(new Uint8Array(i),r),r+=i.byteLength}),e.buffer}function cf(n){for(n=n.trim();n.endsWith("/");)n=n.slice(0,n.length-1);var t=n.split("/");return t[t.length-1]}function ho(n){if(n.modelTopology instanceof ArrayBuffer)throw new Error("Expected JSON model topology, received ArrayBuffer.");return{dateSaved:new Date,modelTopologyType:"JSON",modelTopologyBytes:n.modelTopology==null?0:lf(JSON.stringify(n.modelTopology)),weightSpecsBytes:n.weightSpecs==null?0:lf(JSON.stringify(n.weightSpecs)),weightDataBytes:n.weightData==null?0:n.weightData.byteLength}}var gi=function(){function n(){this.saveRouters=[],this.loadRouters=[]}return n.getInstance=function(){return n.instance==null&&(n.instance=new n),n.instance},n.registerSaveRouter=function(t){n.getInstance().saveRouters.push(t)},n.registerLoadRouter=function(t){n.getInstance().loadRouters.push(t)},n.getSaveHandlers=function(t){return n.getHandlers(t,"save")},n.getLoadHandlers=function(t,e){return n.getHandlers(t,"load",e)},n.getHandlers=function(t,e,r){var i=[];return(e==="load"?n.getInstance().loadRouters:n.getInstance().saveRouters).forEach(function(a){var s=a(t,r);s!==null&&i.push(s)}),i},n}(),Ga="://",la=function(){function n(){this.managers={}}return n.getInstance=function(){return n.instance==null&&(n.instance=new n),n.instance},n.registerManager=function(t,e){q(t!=null,function(){return"scheme must not be undefined or null."}),t.endsWith(Ga)&&(t=t.slice(0,t.indexOf(Ga))),q(t.length>0,function(){return"scheme must not be an empty string."});var r=n.getInstance();q(r.managers[t]==null,function(){return"A model store manager is already registered for scheme '"+t+"'."}),r.managers[t]=e},n.getManager=function(t){var e=this.getInstance().managers[t];if(e==null)throw new Error("Cannot find model manager for scheme '"+t+"'");return e},n.getSchemes=function(){return Object.keys(this.getInstance().managers)},n}();function Jo(n){if(n.indexOf(Ga)===-1)throw new Error("The url string provided does not contain a scheme. Supported schemes are: "+la.getSchemes().join(","));return{scheme:n.split(Ga)[0],path:n.split(Ga)[1]}}function ff(n,t,e){return e===void 0&&(e=!1),C(this,void 0,void 0,function(){var r,i,a,s,u,l,d,A,I;return E(this,function(O){switch(O.label){case 0:return q(n!==t,function(){return"Old path and new path are the same: '"+n+"'"}),q((r=gi.getLoadHandlers(n)).length>0,function(){return"Copying failed because no load handler is found for source URL "+n+"."}),q(r.length<2,function(){return"Copying failed because more than one ("+r.length+") load handlers for source URL "+n+"."}),i=r[0],q((a=gi.getSaveHandlers(t)).length>0,function(){return"Copying failed because no save handler is found for destination URL "+t+"."}),q(a.length<2,function(){return"Copying failed because more than one ("+r.length+") save handlers for destination URL "+t+"."}),s=a[0],u=Jo(n).scheme,l=Jo(n).path,d=u===Jo(n).scheme,[4,i.load()];case 1:return A=O.sent(),e&&d?[4,la.getManager(u).removeModel(l)]:[3,3];case 2:O.sent(),O.label=3;case 3:return[4,s.save(A)];case 4:return I=O.sent(),!e||d?[3,6]:[4,la.getManager(u).removeModel(l)];case 5:O.sent(),O.label=6;case 6:return[2,I.modelArtifactsInfo]}})})}var Ta="models_store",ca="model_info_store";function df(){if(!P().getBool("IS_BROWSER"))throw new Error("Failed to obtain IndexedDB factory because the current environmentis not a web browser.");var n=window||self,t=n.indexedDB||n.mozIndexedDB||n.webkitIndexedDB||n.msIndexedDB||n.shimIndexedDB;if(t==null)throw new Error("The current browser does not appear to support IndexedDB.");return t}function fu(n){var t=n.result;t.createObjectStore(Ta,{keyPath:"modelPath"}),t.createObjectStore(ca,{keyPath:"modelPath"})}var Qa=function(){function n(t){if(this.indexedDB=df(),t==null||!t)throw new Error("For IndexedDB, modelPath must not be null, undefined or empty.");this.modelPath=t}return n.prototype.save=function(t){return C(this,void 0,void 0,function(){return E(this,function(e){if(t.modelTopology instanceof ArrayBuffer)throw new Error("BrowserLocalStorage.save() does not support saving model topology in binary formats yet.");return[2,this.databaseAction(this.modelPath,t)]})})},n.prototype.load=function(){return C(this,void 0,void 0,function(){return E(this,function(t){return[2,this.databaseAction(this.modelPath)]})})},n.prototype.databaseAction=function(t,e){var r=this;return new Promise(function(i,a){var s=r.indexedDB.open("tensorflowjs",1);s.onupgradeneeded=function(){return fu(s)},s.onsuccess=function(){var u=s.result;if(e==null){var l=u.transaction(Ta,"readonly"),d=l.objectStore(Ta).get(r.modelPath);d.onsuccess=function(){if(d.result==null)return u.close(),a(new Error("Cannot find model with path '"+r.modelPath+"' in IndexedDB."));i(d.result.modelArtifacts)},d.onerror=function(oe){return u.close(),a(d.error)},l.oncomplete=function(){return u.close()}}else{var A,I=ho(e),O=u.transaction(ca,"readwrite"),z=O.objectStore(ca),re=z.put({modelPath:r.modelPath,modelArtifactsInfo:I});re.onsuccess=function(){var oe=(A=u.transaction(Ta,"readwrite")).objectStore(Ta).put({modelPath:r.modelPath,modelArtifacts:e,modelArtifactsInfo:I});oe.onsuccess=function(){return i({modelArtifactsInfo:I})},oe.onerror=function(ae){var se=(z=O.objectStore(ca)).delete(r.modelPath);se.onsuccess=function(){return u.close(),a(oe.error)},se.onerror=function(be){return u.close(),a(oe.error)}}},re.onerror=function(oe){return u.close(),a(re.error)},O.oncomplete=function(){A==null?u.close():A.oncomplete=function(){return u.close()}}}},s.onerror=function(u){return a(s.error)}})},n.URL_SCHEME="indexeddb://",n}(),pf=function(n){return P().getBool("IS_BROWSER")&&!Array.isArray(n)&&n.startsWith(Qa.URL_SCHEME)?(t=n.slice(Qa.URL_SCHEME.length),new Qa(t)):null;var t};gi.registerSaveRouter(pf),gi.registerLoadRouter(pf);var xg=function(){function n(){this.indexedDB=df()}return n.prototype.listModels=function(){return C(this,void 0,void 0,function(){var t=this;return E(this,function(e){return[2,new Promise(function(r,i){var a=t.indexedDB.open("tensorflowjs",1);a.onupgradeneeded=function(){return fu(a)},a.onsuccess=function(){var s=a.result,u=s.transaction(ca,"readonly"),l=u.objectStore(ca).getAll();l.onsuccess=function(){for(var d={},A=0,I=l.result;A<I.length;A++){var O=I[A];d[O.modelPath]=O.modelArtifactsInfo}r(d)},l.onerror=function(d){return s.close(),i(l.error)},u.oncomplete=function(){return s.close()}},a.onerror=function(s){return i(a.error)}})]})})},n.prototype.removeModel=function(t){return C(this,void 0,void 0,function(){var e=this;return E(this,function(r){var i;return t=(i=t).startsWith(Qa.URL_SCHEME)?i.slice(Qa.URL_SCHEME.length):i,[2,new Promise(function(a,s){var u=e.indexedDB.open("tensorflowjs",1);u.onupgradeneeded=function(){return fu(u)},u.onsuccess=function(){var l,d=u.result,A=d.transaction(ca,"readwrite"),I=A.objectStore(ca),O=I.get(t);O.onsuccess=function(){if(O.result==null)return d.close(),s(new Error("Cannot find model with path '"+t+"' in IndexedDB."));var z=I.delete(t),re=function(){var oe=(l=d.transaction(Ta,"readwrite")).objectStore(Ta).delete(t);oe.onsuccess=function(){return a(O.result.modelArtifactsInfo)},oe.onerror=function(ae){return s(O.error)}};z.onsuccess=re,z.onerror=function(oe){return re(),d.close(),s(O.error)}},O.onerror=function(z){return d.close(),s(O.error)},A.oncomplete=function(){l==null?d.close():l.oncomplete=function(){return d.close()}}},u.onerror=function(l){return s(u.error)}})]})})},n}();if(P().getBool("IS_BROWSER"))try{la.registerManager(Qa.URL_SCHEME,new xg)}catch(n){}var Zi="/",Xa="tensorflowjs_models",hf="info",Eg="model_topology",Cg="weight_specs",Sg="weight_data",Ig="model_metadata";function vf(n){return{info:[Xa,n,hf].join(Zi),topology:[Xa,n,Eg].join(Zi),weightSpecs:[Xa,n,Cg].join(Zi),weightData:[Xa,n,Sg].join(Zi),modelMetadata:[Xa,n,Ig].join(Zi)}}function Tg(n){var t=n.split(Zi);if(t.length<3)throw new Error("Invalid key format: "+n);return t.slice(1,t.length-1).join(Zi)}var Ka=function(){function n(t){if(!P().getBool("IS_BROWSER")||typeof window=="undefined"||window.localStorage===void 0)throw new Error("The current environment does not support local storage.");if(this.LS=window.localStorage,t==null||!t)throw new Error("For local storage, modelPath must not be null, undefined or empty.");this.modelPath=t,this.keys=vf(this.modelPath)}return n.prototype.save=function(t){return C(this,void 0,void 0,function(){var e,r,i;return E(this,function(a){if(t.modelTopology instanceof ArrayBuffer)throw new Error("BrowserLocalStorage.save() does not support saving model topology in binary formats yet.");e=JSON.stringify(t.modelTopology),r=JSON.stringify(t.weightSpecs),i=ho(t);try{return this.LS.setItem(this.keys.info,JSON.stringify(i)),this.LS.setItem(this.keys.topology,e),this.LS.setItem(this.keys.weightSpecs,r),this.LS.setItem(this.keys.weightData,function(s){if(lu)return x.from(s).toString("base64");for(var u=new Uint8Array(s),l="",d=0,A=u.length;d<A;d++)l+=String.fromCharCode(u[d]);return btoa(l)}(t.weightData)),this.LS.setItem(this.keys.modelMetadata,JSON.stringify({format:t.format,generatedBy:t.generatedBy,convertedBy:t.convertedBy,userDefinedMetadata:t.userDefinedMetadata})),[2,{modelArtifactsInfo:i}]}catch(s){throw this.LS.removeItem(this.keys.info),this.LS.removeItem(this.keys.topology),this.LS.removeItem(this.keys.weightSpecs),this.LS.removeItem(this.keys.weightData),this.LS.removeItem(this.keys.modelMetadata),new Error("Failed to save model '"+this.modelPath+"' to local storage: size quota being exceeded is a possible cause of this failure: modelTopologyBytes="+i.modelTopologyBytes+", weightSpecsBytes="+i.weightSpecsBytes+", weightDataBytes="+i.weightDataBytes+".")}return[2]})})},n.prototype.load=function(){return C(this,void 0,void 0,function(){var t,e,r,i,a,s,u;return E(this,function(l){if((t=JSON.parse(this.LS.getItem(this.keys.info)))==null)throw new Error("In local storage, there is no model with name '"+this.modelPath+"'");if(t.modelTopologyType!=="JSON")throw new Error("BrowserLocalStorage does not support loading non-JSON model topology yet.");if(e={},(r=JSON.parse(this.LS.getItem(this.keys.topology)))==null)throw new Error("In local storage, the topology of model '"+this.modelPath+"' is missing.");if(e.modelTopology=r,(i=JSON.parse(this.LS.getItem(this.keys.weightSpecs)))==null)throw new Error("In local storage, the weight specs of model '"+this.modelPath+"' are missing.");if(e.weightSpecs=i,(a=this.LS.getItem(this.keys.modelMetadata))!=null&&(s=JSON.parse(a),e.format=s.format,e.generatedBy=s.generatedBy,e.convertedBy=s.convertedBy,e.userDefinedMetadata=s.userDefinedMetadata),(u=this.LS.getItem(this.keys.weightData))==null)throw new Error("In local storage, the binary weight values of model '"+this.modelPath+"' are missing.");return e.weightData=function(d){if(lu){var A=x.from(d,"base64");return A.buffer.slice(A.byteOffset,A.byteOffset+A.byteLength)}for(var I=atob(d),O=new Uint8Array(I.length),z=0;z<I.length;++z)O.set([I.charCodeAt(z)],z);return O.buffer}(u),[2,e]})})},n.URL_SCHEME="localstorage://",n}(),mf=function(n){return P().getBool("IS_BROWSER")&&!Array.isArray(n)&&n.startsWith(Ka.URL_SCHEME)?(t=n.slice(Ka.URL_SCHEME.length),new Ka(t)):null;var t};gi.registerSaveRouter(mf),gi.registerLoadRouter(mf);var Rg=function(){function n(){q(P().getBool("IS_BROWSER"),function(){return"Current environment is not a web browser"}),q(typeof window=="undefined"||window.localStorage!==void 0,function(){return"Current browser does not appear to support localStorage"}),this.LS=window.localStorage}return n.prototype.listModels=function(){return C(this,void 0,void 0,function(){var t,e,r,i,a,s;return E(this,function(u){for(t={},e=Xa+Zi,r=Zi+hf,i=0;i<this.LS.length;++i)(a=this.LS.key(i)).startsWith(e)&&a.endsWith(r)&&(s=Tg(a),t[s]=JSON.parse(this.LS.getItem(a)));return[2,t]})})},n.prototype.removeModel=function(t){return C(this,void 0,void 0,function(){var e,r;return E(this,function(i){var a;if(t=(a=t).startsWith(Ka.URL_SCHEME)?a.slice(Ka.URL_SCHEME.length):a,e=vf(t),this.LS.getItem(e.info)==null)throw new Error("Cannot find model at path '"+t+"'");return r=JSON.parse(this.LS.getItem(e.info)),this.LS.removeItem(e.info),this.LS.removeItem(e.topology),this.LS.removeItem(e.weightSpecs),this.LS.removeItem(e.weightData),[2,r]})})},n}();if(P().getBool("IS_BROWSER"))try{la.registerManager(Ka.URL_SCHEME,new Rg)}catch(n){}var Og="model",kg=".json",jg=".weights.bin";function gf(n){return new Promise(function(t){return setTimeout(t)}).then(n)}var du=function(){function n(t){if(!P().getBool("IS_BROWSER"))throw new Error("browserDownloads() cannot proceed because the current environment is not a browser.");t.startsWith(n.URL_SCHEME)&&(t=t.slice(n.URL_SCHEME.length)),t!=null&&t.length!==0||(t=Og),this.modelTopologyFileName=t+kg,this.weightDataFileName=t+jg}return n.prototype.save=function(t){return C(this,void 0,void 0,function(){var e,r,i,a,s,u;return E(this,function(l){switch(l.label){case 0:if(typeof document=="undefined")throw new Error("Browser downloads are not supported in this environment since `document` is not present");if(e=window.URL.createObjectURL(new Blob([t.weightData],{type:"application/octet-stream"})),!(t.modelTopology instanceof ArrayBuffer))return[3,1];throw new Error("BrowserDownloads.save() does not support saving model topology in binary formats yet.");case 1:return r=[{paths:["./"+this.weightDataFileName],weights:t.weightSpecs}],i={modelTopology:t.modelTopology,format:t.format,generatedBy:t.generatedBy,convertedBy:t.convertedBy,weightsManifest:r},a=window.URL.createObjectURL(new Blob([JSON.stringify(i)],{type:"application/json"})),(s=this.jsonAnchor==null?document.createElement("a"):this.jsonAnchor).download=this.modelTopologyFileName,s.href=a,[4,gf(function(){return s.dispatchEvent(new MouseEvent("click"))})];case 2:return l.sent(),t.weightData==null?[3,4]:((u=this.weightDataAnchor==null?document.createElement("a"):this.weightDataAnchor).download=this.weightDataFileName,u.href=e,[4,gf(function(){return u.dispatchEvent(new MouseEvent("click"))})]);case 3:l.sent(),l.label=4;case 4:return[2,{modelArtifactsInfo:ho(t)}]}})})},n.URL_SCHEME="downloads://",n}(),Dg=function(){function n(t){if(t==null||t.length<1)throw new Error("When calling browserFiles, at least 1 file is required, but received "+t);this.files=t}return n.prototype.load=function(){return C(this,void 0,void 0,function(){var t,e,r=this;return E(this,function(i){return t=this.files[0],e=this.files.slice(1),[2,new Promise(function(a,s){var u=new FileReader;u.onload=function(l){var d=JSON.parse(l.target.result),A=d.modelTopology;if(A!=null){e.length===0&&a({modelTopology:A});var I=d.weightsManifest;if(I!=null){var O;try{O=r.checkManifestAndWeightFiles(I,e)}catch(ae){return void s(ae)}var z=[],re=[],oe=[];I.forEach(function(ae){ae.paths.forEach(function(se){re.push(se),oe.push(null)}),z.push.apply(z,ae.weights)}),I.forEach(function(ae){ae.paths.forEach(function(se){var be=new FileReader;be.onload=function(Ae){var me=Ae.target.result,Ce=re.indexOf(se);oe[Ce]=me,oe.indexOf(null)===-1&&a({modelTopology:A,weightSpecs:z,weightData:cu(oe),format:d.format,generatedBy:d.generatedBy,convertedBy:d.convertedBy,userDefinedMetadata:d.userDefinedMetadata})},be.onerror=function(Ae){return s("Failed to weights data from file of path '"+se+"'.")},be.readAsArrayBuffer(O[se])})})}else s(new Error("weightManifest field is missing from file "+t.name))}else s(new Error("modelTopology field is missing from file "+t.name))},u.onerror=function(l){return s("Failed to read model topology and weights manifest JSON from file '"+t.name+"'. BrowserFiles supports loading Keras-style tf.Model artifacts only.")},u.readAsText(t)})]})})},n.prototype.checkManifestAndWeightFiles=function(t,e){for(var r=[],i=e.map(function(l){return cf(l.name)}),a={},s=0,u=t;s<u.length;s++)u[s].paths.forEach(function(l){var d=cf(l);if(r.indexOf(d)!==-1)throw new Error("Duplicate file basename found in weights manifest: '"+d+"'");if(r.push(d),i.indexOf(d)===-1)throw new Error("Weight file with basename '"+d+"' is not provided.");a[l]=e[i.indexOf(d)]});if(r.length!==e.length)throw new Error("Mismatch in the number of files in weights manifest ("+r.length+") and the number of weight files provided ("+e.length+").");return a},n}();function yf(n,t,e,r){(function(a){q(a!=null&&Array.isArray(a)&&a.length>0,function(){return"promises must be a none empty array"})})(n),function(a,s){q(a>=0&&a<=1,function(){return"Progress fraction must be in range [0, 1], but got startFraction "+a}),q(s>=0&&s<=1,function(){return"Progress fraction must be in range [0, 1], but got endFraction "+s}),q(s>=a,function(){return"startFraction must be no more than endFraction, but got startFraction "+a+" and endFraction "+s})}(e=e==null?0:e,r=r==null?1:r);var i=0;return Promise.all(n.map(function(a){return a.then(function(s){var u=e+ ++i/n.length*(r-e);return t(u),s}),a}))}function bf(n,t){return C(this,void 0,void 0,function(){var e,r,i,a,s,u,l,d,A;return E(this,function(I){switch(I.label){case 0:return t==null&&(t={}),e=t.fetchFunc==null?P().platform.fetch:t.fetchFunc,r=n.map(function(O){return e(O,t.requestInit,{isBinary:!0})}),i=0,a=.5,t.onProgress!=null?[3,2]:[4,Promise.all(r)];case 1:return s=I.sent(),[3,4];case 2:return[4,yf(r,t.onProgress,i,a)];case 3:s=I.sent(),I.label=4;case 4:return u=s.map(function(O){return O.arrayBuffer()}),l=.5,d=1,t.onProgress!=null?[3,6]:[4,Promise.all(u)];case 5:return A=I.sent(),[3,8];case 6:return[4,yf(u,t.onProgress,l,d)];case 7:A=I.sent(),I.label=8;case 8:return[2,A]}})})}function wf(n){var t=this;return function(e,r,i){return r===void 0&&(r=""),C(t,void 0,void 0,function(){var a,s,u,l,d,A,I,O,z,re;return E(this,function(oe){switch(oe.label){case 0:if(a=e.map(function(){return!1}),s={},u=i!=null?i.map(function(){return!1}):[],l=[],e.forEach(function(ae,se){var be=0;ae.weights.forEach(function(Ae){var me="quantization"in Ae?Ae.quantization.dtype:Ae.dtype,Ce=uu[me]*ce(Ae.shape),Oe=function(){a[se]=!0,s[se]==null&&(s[se]=[]),s[se].push({manifestEntry:Ae,groupOffset:be,sizeBytes:Ce})};i!=null?i.forEach(function(Le,Ue){Le===Ae.name&&(Oe(),u[Ue]=!0)}):Oe(),l.push(Ae.name),be+=Ce})}),!u.every(function(ae){return ae}))throw d=i.filter(function(ae,se){return!u[se]}),new Error("Could not find weights in manifest with names: "+d.join(", ")+`.
Manifest JSON has weights with names: `+l.join(", ")+".");return A=a.reduce(function(ae,se,be){return se&&ae.push(be),ae},[]),I=[],A.forEach(function(ae){e[ae].paths.forEach(function(se){var be=r+(r.endsWith("/")?"":"/")+se;I.push(be)})}),[4,n(I)];case 1:return O=oe.sent(),z={},re=0,A.forEach(function(ae){for(var se=e[ae].paths.length,be=0,Ae=0;Ae<se;Ae++)be+=O[re+Ae].byteLength;for(var me=new ArrayBuffer(be),Ce=new Uint8Array(me),Oe=0,Le=0;Le<se;Le++){var Ue=new Uint8Array(O[re+Le]);Ce.set(Ue,Oe),Oe+=Ue.byteLength}s[ae].forEach(function(Ne){var Fe=uf(me.slice(Ne.groupOffset,Ne.groupOffset+Ne.sizeBytes),[Ne.manifestEntry]);for(var Ze in Fe)z[Ze]=Fe[Ze]}),re+=se}),[2,z]}})})}}gi.registerSaveRouter(function(n){return P().getBool("IS_BROWSER")&&!Array.isArray(n)&&n.startsWith(du.URL_SCHEME)?function(t){return t===void 0&&(t="model"),new du(t)}(n.slice(du.URL_SCHEME.length)):null});var Af=function(){function n(t,e){if(this.DEFAULT_METHOD="POST",e==null&&(e={}),this.weightPathPrefix=e.weightPathPrefix,this.onProgress=e.onProgress,e.fetchFunc!=null?(q(typeof e.fetchFunc=="function",function(){return"Must pass a function that matches the signature of `fetch` (see https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)"}),this.fetch=e.fetchFunc):this.fetch=P().platform.fetch,q(t!=null&&t.length>0,function(){return"URL path for http must not be null, undefined or empty."}),Array.isArray(t)&&q(t.length===2,function(){return"URL paths for http must have a length of 2, (actual length is "+t.length+")."}),this.path=t,e.requestInit!=null&&e.requestInit.body!=null)throw new Error("requestInit is expected to have no pre-existing body, but has one.");this.requestInit=e.requestInit||{}}return n.prototype.save=function(t){return C(this,void 0,void 0,function(){var e,r,i,a;return E(this,function(s){switch(s.label){case 0:if(t.modelTopology instanceof ArrayBuffer)throw new Error("BrowserHTTPRequest.save() does not support saving model topology in binary formats yet.");return(e=Object.assign({method:this.DEFAULT_METHOD},this.requestInit)).body=new FormData,r=[{paths:["./model.weights.bin"],weights:t.weightSpecs}],i={modelTopology:t.modelTopology,format:t.format,generatedBy:t.generatedBy,convertedBy:t.convertedBy,userDefinedMetadata:t.userDefinedMetadata,weightsManifest:r},e.body.append("model.json",new Blob([JSON.stringify(i)],{type:"application/json"}),"model.json"),t.weightData!=null&&e.body.append("model.weights.bin",new Blob([t.weightData],{type:"application/octet-stream"}),"model.weights.bin"),[4,this.fetch(this.path,e)];case 1:if((a=s.sent()).ok)return[2,{modelArtifactsInfo:ho(t),responses:[a]}];throw new Error("BrowserHTTPRequest.save() failed due to HTTP response status "+a.status+".")}})})},n.prototype.load=function(){return C(this,void 0,void 0,function(){var t,e,r,i,a,s,u,l,d,A,I,O;return E(this,function(z){switch(z.label){case 0:return[4,this.fetch(this.path,this.requestInit)];case 1:if(!(t=z.sent()).ok)throw new Error("Request to "+this.path+" failed with status code "+t.status+". Please verify this URL points to the model JSON of the model to load.");z.label=2;case 2:return z.trys.push([2,4,,5]),[4,t.json()];case 3:return e=z.sent(),[3,5];case 4:throw z.sent(),r="Failed to parse model JSON of response from "+this.path+".",this.path.endsWith(".pb")?r+=" Your path contains a .pb file extension. Support for .pb models have been removed in TensorFlow.js 1.0 in favor of .json models. You can re-convert your Python TensorFlow model using the TensorFlow.js 1.0 conversion scripts or you can convert your.pb models with the 'pb2json'NPM script in the tensorflow/tfjs-converter repository.":r+=" Please make sure the server is serving valid JSON for this request.",new Error(r);case 5:if(i=e.modelTopology,a=e.weightsManifest,s=e.generatedBy,u=e.convertedBy,l=e.format,d=e.userDefinedMetadata,i==null&&a==null)throw new Error("The JSON from HTTP path "+this.path+" contains neither model topology or manifest for weights.");return a==null?[3,7]:[4,this.loadWeights(a)];case 6:O=z.sent(),A=O[0],I=O[1],z.label=7;case 7:return[2,{modelTopology:i,weightSpecs:A,weightData:I,userDefinedMetadata:d,generatedBy:s,convertedBy:u,format:l}]}})})},n.prototype.loadWeights=function(t){return C(this,void 0,void 0,function(){var e,r,i,a,s,u,l,d,A,I,O;return E(this,function(z){switch(z.label){case 0:for(e=Array.isArray(this.path)?this.path[1]:this.path,r=function(re){var oe=re.lastIndexOf("/"),ae=re.lastIndexOf("?"),se=re.substring(0,oe),be=ae>oe?re.substring(ae):"";return[se+"/",be]}(e),i=r[0],a=r[1],s=this.weightPathPrefix||i,u=[],l=0,d=t;l<d.length;l++)A=d[l],u.push.apply(u,A.weights);return I=[],t.forEach(function(re){re.paths.forEach(function(oe){I.push(s+oe+a)})}),[4,bf(I,{requestInit:this.requestInit,fetchFunc:this.fetch,onProgress:this.onProgress})];case 1:return O=z.sent(),[2,[u,cu(O)]]}})})},n.URL_SCHEME_REGEX=/^https?:\/\//,n}();function pu(n){return n.match(Af.URL_SCHEME_REGEX)!=null}var xf=function(n,t){return typeof fetch=="undefined"?null:(Array.isArray(n)?n.every(function(e){return pu(e)}):pu(n))?hu(n,{onProgress:t}):null};function hu(n,t){return new Af(n,t)}gi.registerSaveRouter(xf),gi.registerLoadRouter(xf);var vu=function(){function n(t){this.modelArtifacts=t}return n.prototype.load=function(){return C(this,void 0,void 0,function(){return E(this,function(t){return[2,this.modelArtifacts]})})},n}(),Pg=function(){function n(t){this.saveHandler=t}return n.prototype.save=function(t){return C(this,void 0,void 0,function(){return E(this,function(e){return[2,this.saveHandler(t)]})})},n}(),Ef=Object.freeze({browserFiles:function(n){return new Dg(n)},browserHTTPRequest:function(n,t){return hu(n,t)},concatenateArrayBuffers:cu,decodeWeights:uf,encodeWeights:function(n,t){return C(this,void 0,void 0,function(){var e,r,i,a,s,u=this;return E(this,function(l){switch(l.label){case 0:for(e=[],r=[],i=Array.isArray(n)?n.map(function(d){return d.name}):Object.keys(n),a=function(d){var A=i[d],I=Array.isArray(n)?n[d].tensor:n[A];if(I.dtype!=="float32"&&I.dtype!=="int32"&&I.dtype!=="bool"&&I.dtype!=="string")throw new Error("Unsupported dtype in weight '"+A+"': "+I.dtype);var O={name:A,shape:I.shape,dtype:I.dtype};if(I.dtype==="string"){var z=new Promise(function(re){return C(u,void 0,void 0,function(){var oe,ae,se,be,Ae,me,Ce;return E(this,function(Oe){switch(Oe.label){case 0:return[4,I.bytes()];case 1:for(oe=Oe.sent(),ae=oe.reduce(function(Le,Ue){return Le+Ue.length},0)+Zo*oe.length,se=new Uint8Array(ae),be=0,Ae=0;Ae<oe.length;Ae++)me=oe[Ae],Ce=new Uint8Array(new Uint32Array([me.length]).buffer),se.set(Ce,be),be+=Zo,se.set(me,be),be+=me.length;return re(se),[2]}})})});r.push(z)}else r.push(I.data());t!=null&&(O.group=t),e.push(O)},s=0;s<i.length;++s)a(s);return[4,Promise.all(r)];case 1:return[2,{data:Ag(l.sent()),specs:e}]}})})},fromMemory:function(n,t,e,r){return arguments.length===1?n.modelTopology!=null||n.weightSpecs!=null?new vu(n):(console.warn("Please call tf.io.fromMemory() with only one argument. The argument should be of type ModelArtifacts. The multi-argument signature of tf.io.fromMemory() has been deprecated and will be removed in a future release."),new vu({modelTopology:n})):(console.warn("Please call tf.io.fromMemory() with only one argument. The argument should be of type ModelArtifacts. The multi-argument signature of tf.io.fromMemory() has been deprecated and will be removed in a future release."),new vu({modelTopology:n,weightSpecs:t,weightData:e,trainingConfig:r}))},getLoadHandlers:function(n,t){return gi.getLoadHandlers(n,t)},getModelArtifactsInfoForJSON:ho,getSaveHandlers:function(n){return gi.getSaveHandlers(n)},http:hu,isHTTPScheme:pu,loadWeights:function(n,t,e,r){return t===void 0&&(t=""),C(this,void 0,void 0,function(){return E(this,function(i){return[2,wf(function(a){return bf(a,{requestInit:r})})(n,t,e)]})})},registerLoadRouter:function(n){return gi.registerLoadRouter(n)},registerSaveRouter:function(n){return gi.registerSaveRouter(n)},weightsLoaderFactory:wf,withSaveHandler:function(n){return new Pg(n)},copyModel:function(n,t){return C(this,void 0,void 0,function(){return E(this,function(e){return[2,ff(n,t,!1)]})})},listModels:function(){return C(this,void 0,void 0,function(){var n,t,e,r,i,a,s;return E(this,function(u){switch(u.label){case 0:n=la.getSchemes(),t={},e=0,r=n,u.label=1;case 1:return e<r.length?(i=r[e],[4,la.getManager(i).listModels()]):[3,4];case 2:for(s in a=u.sent())t[i+Ga+s]=a[s];u.label=3;case 3:return e++,[3,1];case 4:return[2,t]}})})},moveModel:function(n,t){return C(this,void 0,void 0,function(){return E(this,function(e){return[2,ff(n,t,!0)]})})},removeModel:function(n){return C(this,void 0,void 0,function(){var t;return E(this,function(e){return t=Jo(n),[2,la.getManager(t.scheme).removeModel(t.path)]})})}}),Za,Bg=Ve({confusionMatrix_:function(n,t,e){var r=je(n,"labels","confusionMatrix"),i=je(t,"predictions","confusionMatrix");q(e==null||e>0&&Number.isInteger(e),function(){return"If provided, numClasses must be a positive integer, but got "+e}),q(r.rank===1,function(){return"Expected the rank of labels to be 1, but got "+r.rank}),q(i.rank===1,function(){return"Expected the rank of predictions to be 1, but got "+i.rank}),q(r.shape[0]===i.shape[0],function(){return"Mismatch in the number of examples: "+r.shape[0]+" vs. "+i.shape[0]+". Labels and predictions should have the same number of elements."}),q(e>0&&Number.isInteger(e),function(){return"numClasses is required to be a positive integer, but got "+e});var a=gs(r.asType("int32"),e),s=gs(i.asType("int32"),e);return a.transpose().matMul(s).asType("int32")}}),cb=Object.freeze({confusionMatrix:Bg}),Ng=Ve({fromPixels_:function(n,t){if(t===void 0&&(t=3),t>4)throw new Error("Cannot construct Tensor with more than 4 channels from pixels.");if(n==null)throw new Error("pixels passed to tf.browser.fromPixels() can not be null");var e=!1,r=!1,i=!1,a=!1,s=!1;if(n.data instanceof Uint8Array)e=!0;else if(typeof ImageData!="undefined"&&n instanceof ImageData)r=!0;else if(typeof HTMLVideoElement!="undefined"&&n instanceof HTMLVideoElement)i=!0;else if(typeof HTMLImageElement!="undefined"&&n instanceof HTMLImageElement)a=!0;else{if(n.getContext==null)throw new Error("pixels passed to tf.browser.fromPixels() must be either an HTMLVideoElement, HTMLImageElement, HTMLCanvasElement, ImageData in browser, or OffscreenCanvas, ImageData in webworker or {data: Uint32Array, width: number, height: number}, but was "+n.constructor.name);s=!0}if(i&&i&&n.readyState<2)throw new Error("The video element has not loaded data yet. Please wait for `loadeddata` event on the <video> element.");if(D("FromPixels",We.backendName)!=null)return We.runKernel("FromPixels",{pixels:n},{numChannels:t});var u,l,d=i?[n.videoWidth,n.videoHeight]:[n.width,n.height],A=d[0],I=d[1];if(s?u=n.getContext("2d").getImageData(0,0,A,I).data:r||e?u=n.data:(a||i)&&(Za==null&&(Za=document.createElement("canvas").getContext("2d")),Za.canvas.width=A,Za.canvas.height=I,Za.drawImage(n,0,0,A,I),u=Za.getImageData(0,0,A,I).data),t===4)l=new Int32Array(u);else{var O=A*I;l=new Int32Array(O*t);for(var z=0;z<O;z++)for(var re=0;re<t;++re)l[z*t+re]=u[4*z+re]}return hs(l,[I,A,t],"int32")}}),mu=Object.freeze({toPixels:function(n,t){return C(this,void 0,void 0,function(){var e,r,i,a,s,u,l,d,A,I,O,z,re,oe,ae,se,be,Ae,me,Ce,Oe,Le,Ue;return E(this,function(Ne){switch(Ne.label){case 0:if(e=je(n,"img","toPixels"),n instanceof Ft||(e=e.toInt()),e.rank!==2&&e.rank!==3)throw new Error("toPixels only supports rank 2 or 3 tensors, got rank "+e.rank+".");if(r=e.shape.slice(0,2),i=r[0],a=r[1],(s=e.rank===2?1:e.shape[2])>4||s===2)throw new Error("toPixels only supports depth of size 1, 3 or 4 but got "+s);return[4,e.data()];case 1:return u=Ne.sent(),l=e.min(),d=e.max(),[4,Promise.all([l.data(),d.data()])];case 2:if(A=Ne.sent(),I=A[0],O=A[1],z=I[0],re=O[0],l.dispose(),d.dispose(),e.dtype==="float32"){if(z<0||re>1)throw new Error("Tensor values for a float32 Tensor must be in the range [0 - 1] but got range ["+z+" - "+re+"].")}else{if(e.dtype!=="int32")throw new Error("Unsupported type for toPixels: "+e.dtype+". Please use float32 or int32 tensors.");if(z<0||re>255)throw new Error("Tensor values for a int32 Tensor must be in the range [0 - 255] but got range ["+z+" - "+re+"].")}for(oe=e.dtype==="float32"?255:1,ae=new Uint8ClampedArray(a*i*4),se=0;se<i*a;++se)be=void 0,Ae=void 0,me=void 0,Ce=void 0,s===1?(be=u[se]*oe,Ae=u[se]*oe,me=u[se]*oe,Ce=255):s===3?(be=u[3*se]*oe,Ae=u[3*se+1]*oe,me=u[3*se+2]*oe,Ce=255):s===4&&(be=u[4*se]*oe,Ae=u[4*se+1]*oe,me=u[4*se+2]*oe,Ce=u[4*se+3]*oe),ae[(Oe=4*se)+0]=Math.round(be),ae[Oe+1]=Math.round(Ae),ae[Oe+2]=Math.round(me),ae[Oe+3]=Math.round(Ce);return t!=null&&(t.width=a,t.height=i,Le=t.getContext("2d"),Ue=new ImageData(ae,a,i),Le.putImageData(Ue,0,0)),e!==n&&e.dispose(),[2,ae]}})})},fromPixels:Ng}),Cf=function(){function n(){}return n.prototype.getClassName=function(){return this.constructor.className},n.fromConfig=function(t,e){return new t(e)},n}(),Sf=function(){function n(){this.classNameMap={}}return n.getMap=function(){return n.instance==null&&(n.instance=new n),n.instance},n.register=function(t){n.getMap().classNameMap[t.className]=[t,t.fromConfig]},n}();function fa(n){q(n.className!=null,function(){return"Class being registered does not have the static className property defined."}),q(typeof n.className=="string",function(){return"className is required to be a string, but got type "+typeof n.className}),q(n.className.length>0,function(){return"Class being registered has an empty-string as its className, which is disallowed."}),Sf.register(n)}var fb=Object.freeze({Serializable:Cf,SerializationMap:Sf,registerClass:fa}),Mg=.001,If=.1;function gu(){return We.backend.floatPrecision()===32?Mg:If}function yu(n,t,e){var r=!0;if((L(n)||L(t))&&(r=!1),L(n)&&L(t)&&(r=!0),r){var i=n.constructor.name,a=t.constructor.name;if(i!==a)throw new Error("Arrays are of different type. Actual: "+i+". Expected: "+a)}if(Array.isArray(n)&&Array.isArray(t)){var s=mn(n),u=mn(t);if(!fe(s,u))throw new Error("Arrays have different shapes. Actual: ["+s+"]. Expected: ["+u+"]")}var l=L(n)?n:xe(n),d=L(t)?t:xe(t);if(l.length!==d.length)throw new Error("Arrays have different lengths actual: "+l.length+" vs expected: "+d.length+`.
Actual: `+l+`.
Expected: `+d+".");for(var A=0;A<d.length;++A){var I=l[A],O=d[A];if(!e(I,O))throw new Error("Arrays differ: actual["+A+"] = "+I+", expected["+A+"] = "+O+`.
Actual: `+l+`.
Expected: `+d+".")}}function bu(n,t,e){return!isFinite(n)&&!isFinite(t)||!(isNaN(n)||isNaN(t)||Math.abs(n-t)>e)}var db=Object.freeze({TEST_EPSILON_FLOAT16:If,expectArraysClose:function(n,t,e){return e==null&&(e=gu()),yu(n,t,function(r,i){return bu(r,i,e)})},testEpsilon:gu,expectPromiseToFail:function(n,t){n().then(function(){return t.fail()},function(){return t()})},expectArraysEqual:function(n,t){var e=typeof t=="string"||typeof t=="number"||typeof t=="boolean"?[t]:t;return Ee(n)||Ee(n[0])||Ee(t)||Ee(t[0])?yu(n,e,function(r,i){return r==i}):yu(n,t,function(r,i){return bu(r,i,0)})},expectNumbersClose:function(n,t,e){if(e==null&&(e=gu()),!bu(n,t,e))throw new Error("Numbers differ: actual === "+n+", expected === "+t)},expectValuesInRange:function(n,t,e){for(var r=0;r<n.length;r++)if(n[r]<t||n[r]>e)throw new Error("Value out of range:"+n[r]+" low: "+t+", high: "+e)},expectArrayBuffersEqual:function(n,t){expect(new Float32Array(n)).toEqual(new Float32Array(t))}}),pb="1.7.0",hb=Object.freeze({gpgpu_util:ah,webgl_util:Si,forceHalfFloat:function(){P().set("WEBGL_FORCE_F16_TEXTURES",!0)},MathBackendWebGL:xc,setWebGLContext:dt,GPGPUContext:ac}),Ra=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return S(t,n),t.prototype.minimize=function(e,r,i){r===void 0&&(r=!1);var a=this.computeGradients(e,i),s=a.value,u=a.grads;if(i!=null){var l=i.map(function(d){return{name:d.name,tensor:u[d.name]}});this.applyGradients(l)}else this.applyGradients(u);return bn(u),r?s:(s.dispose(),null)},Object.defineProperty(t.prototype,"iterations",{get:function(){return this.iterations_==null&&(this.iterations_=0),this.iterations_},enumerable:!0,configurable:!0}),t.prototype.incrementIterations=function(){this.iterations_=this.iterations+1},t.prototype.computeGradients=function(e,r){return lp(e,r)},t.prototype.dispose=function(){this.iterations_!=null&&bn(this.iterations_)},t.prototype.saveIterations=function(){return C(this,void 0,void 0,function(){return E(this,function(e){return this.iterations_==null&&(this.iterations_=0),[2,{name:"iter",tensor:kt(this.iterations_,"int32")}]})})},t.prototype.getWeights=function(){return C(this,void 0,void 0,function(){return E(this,function(e){throw new Error("getWeights() is not implemented for this optimizer yet.")})})},t.prototype.setWeights=function(e){return C(this,void 0,void 0,function(){return E(this,function(r){throw new Error("setWeights() is not implemented for this optimizer class "+this.getClassName())})})},t.prototype.extractIterations=function(e){return C(this,void 0,void 0,function(){var r;return E(this,function(i){switch(i.label){case 0:return r=this,[4,e[0].tensor.data()];case 1:return r.iterations_=i.sent()[0],[2,e.slice(1)]}})})},t}(Cf);Object.defineProperty(Ra,Symbol.hasInstance,{value:function(n){return n.minimize!=null&&n.computeGradients!=null&&n.applyGradients!=null}});var Tf=function(n){function t(e,r,i){i===void 0&&(i=null);var a=n.call(this)||this;return a.learningRate=e,a.rho=r,a.epsilon=i,a.accumulatedGrads=[],a.accumulatedUpdates=[],i==null&&(a.epsilon=We.backend.epsilon()),a}return S(t,n),t.prototype.applyGradients=function(e){var r=this;(Array.isArray(e)?e.map(function(i){return i.name}):Object.keys(e)).forEach(function(i,a){var s=We.registeredVariables[i];r.accumulatedGrads[a]==null&&(r.accumulatedGrads[a]={originalName:i+"/accum_grad",variable:Ot(function(){return Lr(s).variable(!1)})}),r.accumulatedUpdates[a]==null&&(r.accumulatedUpdates[a]={originalName:i+"/accum_var",variable:Ot(function(){return Lr(s).variable(!1)})});var u=Array.isArray(e)?e[a].tensor:e[i];if(u!=null){var l=r.accumulatedGrads[a].variable,d=r.accumulatedUpdates[a].variable;Ot(function(){var A=l.mul(r.rho).add(u.square().mul(1-r.rho)),I=d.add(r.epsilon).sqrt().div(l.add(r.epsilon).sqrt()).mul(u),O=d.mul(r.rho).add(I.square().mul(1-r.rho));l.assign(A),d.assign(O);var z=I.mul(-r.learningRate).add(s);s.assign(z)})}}),this.incrementIterations()},t.prototype.dispose=function(){this.accumulatedUpdates!=null&&(bn(this.accumulatedGrads.map(function(e){return e.variable})),bn(this.accumulatedUpdates.map(function(e){return e.variable})))},t.prototype.getWeights=function(){return C(this,void 0,void 0,function(){var e;return E(this,function(r){switch(r.label){case 0:return e=this.accumulatedGrads.concat(this.accumulatedUpdates),[4,this.saveIterations()];case 1:return[2,[r.sent()].concat(e.map(function(i){return{name:i.originalName,tensor:i.variable}}))]}})})},t.prototype.setWeights=function(e){return C(this,void 0,void 0,function(){var r;return E(this,function(i){switch(i.label){case 0:return[4,this.extractIterations(e)];case 1:return e=i.sent(),r=e.length/2,this.accumulatedGrads=e.slice(0,r).map(function(a){return{originalName:a.name,variable:a.tensor.variable(!1)}}),this.accumulatedUpdates=e.slice(r,2*r).map(function(a){return{originalName:a.name,variable:a.tensor.variable(!1)}}),[2]}})})},t.prototype.getConfig=function(){return{learningRate:this.learningRate,rho:this.rho,epsilon:this.epsilon}},t.fromConfig=function(e,r){return new e(r.learningRate,r.rho,r.epsilon)},t.className="Adadelta",t}(Ra);fa(Tf);var Rf=function(n){function t(e,r){r===void 0&&(r=.1);var i=n.call(this)||this;return i.learningRate=e,i.initialAccumulatorValue=r,i.accumulatedGrads=[],i}return S(t,n),t.prototype.applyGradients=function(e){var r=this;(Array.isArray(e)?e.map(function(i){return i.name}):Object.keys(e)).forEach(function(i,a){var s=We.registeredVariables[i];r.accumulatedGrads[a]==null&&(r.accumulatedGrads[a]={originalName:i+"/accumulator",variable:Ot(function(){return Bi(s.shape,r.initialAccumulatorValue).variable(!1)})});var u=Array.isArray(e)?e[a].tensor:e[i];if(u!=null){var l=r.accumulatedGrads[a].variable;Ot(function(){var d=l.add(u.square());l.assign(d);var A=u.div(d.add(We.backend.epsilon()).sqrt()).mul(-r.learningRate).add(s);s.assign(A)})}}),this.incrementIterations()},t.prototype.dispose=function(){this.accumulatedGrads!=null&&bn(this.accumulatedGrads.map(function(e){return e.variable}))},t.prototype.getWeights=function(){return C(this,void 0,void 0,function(){return E(this,function(e){switch(e.label){case 0:return[4,this.saveIterations()];case 1:return[2,[e.sent()].concat(this.accumulatedGrads.map(function(r){return{name:r.originalName,tensor:r.variable}}))]}})})},t.prototype.setWeights=function(e){return C(this,void 0,void 0,function(){return E(this,function(r){switch(r.label){case 0:return[4,this.extractIterations(e)];case 1:return e=r.sent(),this.accumulatedGrads=e.map(function(i){return{originalName:i.name,variable:i.tensor.variable(!1)}}),[2]}})})},t.prototype.getConfig=function(){return{learningRate:this.learningRate,initialAccumulatorValue:this.initialAccumulatorValue}},t.fromConfig=function(e,r){return new e(r.learningRate,r.initialAccumulatorValue)},t.className="Adagrad",t}(Ra);fa(Rf);var Of=function(n){function t(e,r,i,a){a===void 0&&(a=null);var s=n.call(this)||this;return s.learningRate=e,s.beta1=r,s.beta2=i,s.epsilon=a,s.accumulatedFirstMoment=[],s.accumulatedSecondMoment=[],Ot(function(){s.accBeta1=kt(r).variable(),s.accBeta2=kt(i).variable()}),a==null&&(s.epsilon=We.backend.epsilon()),s}return S(t,n),t.prototype.applyGradients=function(e){var r=this,i=Array.isArray(e)?e.map(function(a){return a.name}):Object.keys(e);Ot(function(){var a=Nn(1,r.accBeta1),s=Nn(1,r.accBeta2);i.forEach(function(u,l){var d=We.registeredVariables[u];r.accumulatedFirstMoment[l]==null&&(r.accumulatedFirstMoment[l]={originalName:u+"/m",variable:Ot(function(){return Lr(d).variable(!1)})}),r.accumulatedSecondMoment[l]==null&&(r.accumulatedSecondMoment[l]={originalName:u+"/v",variable:Ot(function(){return Lr(d).variable(!1)})});var A=Array.isArray(e)?e[l].tensor:e[u];if(A!=null){var I=r.accumulatedFirstMoment[l].variable,O=r.accumulatedSecondMoment[l].variable,z=I.mul(r.beta1).add(A.mul(1-r.beta1)),re=O.mul(r.beta2).add(A.square().mul(1-r.beta2)),oe=z.div(a),ae=re.div(s);I.assign(z),O.assign(re);var se=oe.div(ae.sqrt().add(r.epsilon)).mul(-r.learningRate).add(d);d.assign(se)}}),r.accBeta1.assign(r.accBeta1.mul(r.beta1)),r.accBeta2.assign(r.accBeta2.mul(r.beta2))}),this.incrementIterations()},t.prototype.dispose=function(){this.accBeta1.dispose(),this.accBeta2.dispose(),this.accumulatedFirstMoment!=null&&bn(this.accumulatedFirstMoment.map(function(e){return e.variable})),this.accumulatedSecondMoment!=null&&bn(this.accumulatedSecondMoment.map(function(e){return e.variable}))},t.prototype.getWeights=function(){return C(this,void 0,void 0,function(){var e;return E(this,function(r){switch(r.label){case 0:return e=this.accumulatedFirstMoment.concat(this.accumulatedSecondMoment),[4,this.saveIterations()];case 1:return[2,[r.sent()].concat(e.map(function(i){return{name:i.originalName,tensor:i.variable}}))]}})})},t.prototype.setWeights=function(e){return C(this,void 0,void 0,function(){var r,i=this;return E(this,function(a){switch(a.label){case 0:return[4,this.extractIterations(e)];case 1:return e=a.sent(),Ot(function(){i.accBeta1.assign(Vo(i.beta1,i.iterations_+1)),i.accBeta2.assign(Vo(i.beta2,i.iterations_+1))}),r=e.length/2,this.accumulatedFirstMoment=e.slice(0,r).map(function(s){return{originalName:s.name,variable:s.tensor.variable(!1)}}),this.accumulatedSecondMoment=e.slice(r,2*r).map(function(s){return{originalName:s.name,variable:s.tensor.variable(!1)}}),[2]}})})},t.prototype.getConfig=function(){return{learningRate:this.learningRate,beta1:this.beta1,beta2:this.beta2,epsilon:this.epsilon}},t.fromConfig=function(e,r){return new e(r.learningRate,r.beta1,r.beta2,r.epsilon)},t.className="Adam",t}(Ra);fa(Of);var kf=function(n){function t(e,r,i,a,s){a===void 0&&(a=null),s===void 0&&(s=0);var u=n.call(this)||this;return u.learningRate=e,u.beta1=r,u.beta2=i,u.epsilon=a,u.decay=s,u.accumulatedFirstMoment=[],u.accumulatedWeightedInfNorm=[],Ot(function(){u.iteration=kt(0).variable(),u.accBeta1=kt(r).variable()}),a==null&&(u.epsilon=We.backend.epsilon()),u}return S(t,n),t.prototype.applyGradients=function(e){var r=this,i=Array.isArray(e)?e.map(function(a){return a.name}):Object.keys(e);Ot(function(){var a=Nn(1,r.accBeta1),s=ki(-r.learningRate,r.iteration.mul(r.decay).add(1));i.forEach(function(u,l){var d=We.registeredVariables[u];r.accumulatedFirstMoment[l]==null&&(r.accumulatedFirstMoment[l]={originalName:u+"/m",variable:Lr(d).variable(!1)}),r.accumulatedWeightedInfNorm[l]==null&&(r.accumulatedWeightedInfNorm[l]={originalName:u+"/v",variable:Lr(d).variable(!1)});var A=Array.isArray(e)?e[l].tensor:e[u];if(A!=null){var I=r.accumulatedFirstMoment[l].variable,O=r.accumulatedWeightedInfNorm[l].variable,z=I.mul(r.beta1).add(A.mul(1-r.beta1)),re=O.mul(r.beta2),oe=A.abs(),ae=re.maximum(oe);I.assign(z),O.assign(ae);var se=s.div(a).mul(z.div(ae.add(r.epsilon))).add(d);d.assign(se)}}),r.iteration.assign(r.iteration.add(1)),r.accBeta1.assign(r.accBeta1.mul(r.beta1))}),this.incrementIterations()},t.prototype.dispose=function(){this.accBeta1.dispose(),this.iteration.dispose(),this.accumulatedFirstMoment!=null&&bn(this.accumulatedFirstMoment.map(function(e){return e.variable})),this.accumulatedWeightedInfNorm!=null&&bn(this.accumulatedWeightedInfNorm.map(function(e){return e.variable}))},t.prototype.getWeights=function(){return C(this,void 0,void 0,function(){return E(this,function(e){throw new Error("getWeights() is not implemented for Adamax yet.")})})},t.prototype.setWeights=function(e){return C(this,void 0,void 0,function(){return E(this,function(r){throw new Error("setWeights() is not implemented for Adamax yet.")})})},t.prototype.getConfig=function(){return{learningRate:this.learningRate,beta1:this.beta1,beta2:this.beta2,epsilon:this.epsilon,decay:this.decay}},t.fromConfig=function(e,r){return new e(r.learningRate,r.beta1,r.beta2,r.epsilon,r.decay)},t.className="Adamax",t}(Ra);fa(kf);var wu=function(n){function t(e){var r=n.call(this)||this;return r.learningRate=e,r.setLearningRate(e),r}return S(t,n),t.prototype.applyGradients=function(e){var r=this;(Array.isArray(e)?e.map(function(i){return i.name}):Object.keys(e)).forEach(function(i,a){var s=Array.isArray(e)?e[a].tensor:e[i];if(s!=null){var u=We.registeredVariables[i];Ot(function(){var l=r.c.mul(s).add(u);u.assign(l)})}}),this.incrementIterations()},t.prototype.setLearningRate=function(e){this.learningRate=e,this.c!=null&&this.c.dispose(),this.c=ba(kt(-e))},t.prototype.dispose=function(){this.c.dispose()},t.prototype.getWeights=function(){return C(this,void 0,void 0,function(){return E(this,function(e){switch(e.label){case 0:return[4,this.saveIterations()];case 1:return[2,[e.sent()]]}})})},t.prototype.setWeights=function(e){return C(this,void 0,void 0,function(){return E(this,function(r){switch(r.label){case 0:return[4,this.extractIterations(e)];case 1:if((e=r.sent()).length!==0)throw new Error("SGD optimizer does not have settable weights.");return[2]}})})},t.prototype.getConfig=function(){return{learningRate:this.learningRate}},t.fromConfig=function(e,r){return new e(r.learningRate)},t.className="SGD",t}(Ra);fa(wu);var jf=function(n){function t(e,r,i){i===void 0&&(i=!1);var a=n.call(this,e)||this;return a.learningRate=e,a.momentum=r,a.useNesterov=i,a.accumulations=[],a.m=kt(a.momentum),a}return S(t,n),t.prototype.applyGradients=function(e){var r=this;(Array.isArray(e)?e.map(function(i){return i.name}):Object.keys(e)).forEach(function(i,a){var s=We.registeredVariables[i];r.accumulations[a]==null&&(r.accumulations[a]={originalName:i+"/momentum",variable:Ot(function(){return Lr(s).variable(!1)})});var u=r.accumulations[a].variable,l=Array.isArray(e)?e[a].tensor:e[i];l!=null&&Ot(function(){var d,A=r.m.mul(u).add(l);d=r.useNesterov?r.c.mul(l.add(A.mul(r.m))).add(s):r.c.mul(A).add(s),u.assign(A),s.assign(d)})}),this.incrementIterations()},t.prototype.dispose=function(){this.m.dispose(),this.accumulations!=null&&bn(this.accumulations.map(function(e){return e.variable}))},t.prototype.setMomentum=function(e){this.momentum=e},t.prototype.getWeights=function(){return C(this,void 0,void 0,function(){return E(this,function(e){switch(e.label){case 0:return[4,this.saveIterations()];case 1:return[2,[e.sent()].concat(this.accumulations.map(function(r){return{name:r.originalName,tensor:r.variable}}))]}})})},t.prototype.setWeights=function(e){return C(this,void 0,void 0,function(){return E(this,function(r){switch(r.label){case 0:return[4,this.extractIterations(e)];case 1:return e=r.sent(),this.accumulations=e.map(function(i){return{originalName:i.name,variable:i.tensor.variable(!1)}}),[2]}})})},t.prototype.getConfig=function(){return{learningRate:this.learningRate,momentum:this.momentum,useNesterov:this.useNesterov}},t.fromConfig=function(e,r){return new e(r.learningRate,r.momentum,r.useNesterov)},t.className="Momentum",t}(wu);fa(jf);var Df=function(n){function t(e,r,i,a,s){r===void 0&&(r=.9),i===void 0&&(i=0),a===void 0&&(a=null),s===void 0&&(s=!1);var u=n.call(this)||this;if(u.learningRate=e,u.decay=r,u.momentum=i,u.epsilon=a,u.accumulatedMeanSquares=[],u.accumulatedMoments=[],u.accumulatedMeanGrads=[],u.centered=s,a==null&&(u.epsilon=We.backend.epsilon()),e==null)throw new Error("learningRate for RMSPropOptimizer must be defined.");return u}return S(t,n),t.prototype.applyGradients=function(e){var r=this;(Array.isArray(e)?e.map(function(i){return i.name}):Object.keys(e)).forEach(function(i,a){var s=We.registeredVariables[i];r.accumulatedMeanSquares[a]==null&&(r.accumulatedMeanSquares[a]={originalName:i+"/rms",variable:Ot(function(){return Lr(s).variable(!1)})}),r.accumulatedMoments[a]==null&&(r.accumulatedMoments[a]={originalName:i+"/momentum",variable:Ot(function(){return Lr(s).variable(!1)})}),r.accumulatedMeanGrads[a]==null&&r.centered&&(r.accumulatedMeanGrads[a]={originalName:i+"/mg",variable:Ot(function(){return Lr(s).variable(!1)})});var u=Array.isArray(e)?e[a].tensor:e[i];if(u!=null){var l=r.accumulatedMeanSquares[a].variable,d=r.accumulatedMoments[a].variable;Ot(function(){var A=l.mul(r.decay).add(u.square().mul(1-r.decay));if(r.centered){var I=r.accumulatedMeanGrads[a].variable,O=I.mul(r.decay).add(u.mul(1-r.decay)),z=d.mul(r.momentum).add(u.mul(r.learningRate).div(A.sub(O.square().add(r.epsilon)).sqrt()));l.assign(A),I.assign(O),d.assign(z);var re=s.sub(z);s.assign(re)}else{var oe=l.mul(r.decay).add(u.square().mul(1-r.decay));z=d.mul(r.momentum).add(u.mul(r.learningRate).div(oe.add(r.epsilon).sqrt())),l.assign(oe),d.assign(z),re=s.sub(z),s.assign(re)}})}}),this.incrementIterations()},t.prototype.dispose=function(){this.accumulatedMeanSquares!=null&&bn(this.accumulatedMeanSquares.map(function(e){return e.variable})),this.accumulatedMeanGrads!=null&&this.centered&&bn(this.accumulatedMeanGrads.map(function(e){return e.variable})),this.accumulatedMoments!=null&&bn(this.accumulatedMoments.map(function(e){return e.variable}))},t.prototype.getWeights=function(){return C(this,void 0,void 0,function(){var e;return E(this,function(r){switch(r.label){case 0:return e=this.accumulatedMeanSquares.concat(this.accumulatedMoments),this.centered&&e.push.apply(e,this.accumulatedMeanGrads),[4,this.saveIterations()];case 1:return[2,[r.sent()].concat(e.map(function(i){return{name:i.originalName,tensor:i.variable}}))]}})})},t.prototype.setWeights=function(e){return C(this,void 0,void 0,function(){var r;return E(this,function(i){switch(i.label){case 0:return[4,this.extractIterations(e)];case 1:return e=i.sent(),r=this.centered?e.length/3:e.length/2,this.accumulatedMeanSquares=e.slice(0,r).map(function(a){return{originalName:a.name,variable:a.tensor.variable(!1)}}),this.accumulatedMoments=e.slice(r,2*r).map(function(a){return{originalName:a.name,variable:a.tensor.variable(!1)}}),this.centered&&(this.accumulatedMeanGrads=e.slice(2*r,3*r).map(function(a){return{originalName:a.name,variable:a.tensor.variable(!1)}})),[2]}})})},t.prototype.getConfig=function(){return{learningRate:this.learningRate,decay:this.decay,momentum:this.momentum,epsilon:this.epsilon,centered:this.centered}},t.fromConfig=function(e,r){return new e(r.learningRate,r.decay,r.momentum,r.epsilon,r.centered)},t.className="RMSProp",t}(Ra);fa(Df);var Oa=function(){function n(){}return n.sgd=function(t){return new wu(t)},n.momentum=function(t,e,r){return r===void 0&&(r=!1),new jf(t,e,r)},n.rmsprop=function(t,e,r,i,a){return e===void 0&&(e=.9),r===void 0&&(r=0),i===void 0&&(i=null),a===void 0&&(a=!1),new Df(t,e,r,i,a)},n.adam=function(t,e,r,i){return t===void 0&&(t=.001),e===void 0&&(e=.9),r===void 0&&(r=.999),i===void 0&&(i=null),new Of(t,e,r,i)},n.adadelta=function(t,e,r){return t===void 0&&(t=.001),e===void 0&&(e=.95),r===void 0&&(r=null),new Tf(t,e,r)},n.adamax=function(t,e,r,i,a){return t===void 0&&(t=.002),e===void 0&&(e=.9),r===void 0&&(r=.999),i===void 0&&(i=null),a===void 0&&(a=0),new kf(t,e,r,i,a)},n.adagrad=function(t,e){return e===void 0&&(e=.1),new Rf(t,e)},n}(),vb={sgd:Oa.sgd,momentum:Oa.momentum,adadelta:Oa.adadelta,adagrad:Oa.adagrad,rmsprop:Oa.rmsprop,adamax:Oa.adamax,adam:Oa.adam},_g=typeof requestAnimationFrame!="undefined"?requestAnimationFrame:typeof setImmediate!="undefined"?setImmediate:function(n){return n()};function mb(){return new Promise(function(n){return _g(function(){return n()})})}Ft.prototype.squaredDifference=function(n){return Ec(this,n)},Xe=hg;function ka(n,t,e){if(e===void 0&&(e=!1),n.beginPath(),t.slice(1).forEach(function(a,s){var u=a.x,l=a.y,d=t[s];n.moveTo(d.x,d.y),n.lineTo(u,l)}),e){var r=t[t.length-1],i=t[0];if(!r||!i)return;n.moveTo(r.x,r.y),n.lineTo(i.x,i.y)}n.stroke()}var Au=function(n,t){return Au=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i])},Au(n,t)};function ur(n,t){Au(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var ri=function(){return ri=Object.assign||function(t){for(var e,r=1,i=arguments.length;r<i;r++){e=arguments[r];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])}return t},ri.apply(this,arguments)};function gb(n,t){var e={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&t.indexOf(r)<0&&(e[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(e[r[i]]=n[r[i]]);return e}function yb(n,t,e,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(n,t,e,r);else for(var u=n.length-1;u>=0;u--)(s=n[u])&&(a=(i<3?s(a):i>3?s(t,e,a):s(t,e))||a);return i>3&&a&&Object.defineProperty(t,e,a),a}function bb(n,t){return function(e,r){t(e,r,n)}}function wb(n,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,t)}function Gt(n,t,e,r){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function u(A){try{d(r.next(A))}catch(I){s(I)}}function l(A){try{d(r.throw(A))}catch(I){s(I)}}function d(A){A.done?a(A.value):i(A.value).then(u,l)}d((r=r.apply(n,t||[])).next())})}function Qt(n,t){var e={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(d){return function(A){return l([d,A])}}function l(d){if(r)throw new TypeError("Generator is already executing.");for(;e;)try{if(r=1,i&&(a=d[0]&2?i.return:d[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,d[1])).done)return a;switch(i=0,a&&(d=[d[0]&2,a.value]),d[0]){case 0:case 1:a=d;break;case 4:return e.label++,{value:d[1],done:!1};case 5:e.label++,i=d[1],d=[0];continue;case 7:d=e.ops.pop(),e.trys.pop();continue;default:if(a=e.trys,!(a=a.length>0&&a[a.length-1])&&(d[0]===6||d[0]===2)){e=0;continue}if(d[0]===3&&(!a||d[1]>a[0]&&d[1]<a[3])){e.label=d[1];break}if(d[0]===6&&e.label<a[1]){e.label=a[1],a=d;break}if(a&&e.label<a[2]){e.label=a[2],e.ops.push(d);break}a[2]&&e.ops.pop(),e.trys.pop();continue}d=t.call(n,e)}catch(A){d=[6,A],i=0}finally{r=a=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function Ab(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]}function xb(n,t){for(var e in n)e!=="default"&&!t.hasOwnProperty(e)&&(t[e]=n[e])}function Pf(n){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&n[t],r=0;if(e)return e.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&r>=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Fg(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,a=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(u){s={error:u}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return a}function Eb(){for(var n=[],t=0;t<arguments.length;t++)n=n.concat(Fg(arguments[t]));return n}function vo(){for(var n=0,t=0,e=arguments.length;t<e;t++)n+=arguments[t].length;for(var r=Array(n),i=0,t=0;t<e;t++)for(var a=arguments[t],s=0,u=a.length;s<u;s++,i++)r[i]=a[s];return r}function Yo(n){return this instanceof Yo?(this.v=n,this):new Yo(n)}function Cb(n,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=e.apply(n,t||[]),i,a=[];return i={},s("next"),s("throw"),s("return"),i[Symbol.asyncIterator]=function(){return this},i;function s(O){r[O]&&(i[O]=function(z){return new Promise(function(re,oe){a.push([O,z,re,oe])>1||u(O,z)})})}function u(O,z){try{l(r[O](z))}catch(re){I(a[0][3],re)}}function l(O){O.value instanceof Yo?Promise.resolve(O.value.v).then(d,A):I(a[0][2],O)}function d(O){u("next",O)}function A(O){u("throw",O)}function I(O,z){O(z),a.shift(),a.length&&u(a[0][0],a[0][1])}}function Sb(n){var t,e;return t={},r("next"),r("throw",function(i){throw i}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(i,a){t[i]=n[i]?function(s){return(e=!e)?{value:Yo(n[i](s)),done:i==="return"}:a?a(s):s}:a}}function Ib(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=n[Symbol.asyncIterator],e;return t?t.call(n):(n=typeof Pf=="function"?Pf(n):n[Symbol.iterator](),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(a){e[a]=n[a]&&function(s){return new Promise(function(u,l){s=n[a](s),i(u,l,s.done,s.value)})}}function i(a,s,u,l){Promise.resolve(l).then(function(d){a({value:d,done:u})},s)}}function Tb(n,t){return Object.defineProperty?Object.defineProperty(n,"raw",{value:t}):n.raw=t,n}function Rb(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)Object.hasOwnProperty.call(n,e)&&(t[e]=n[e]);return t.default=n,t}function Ob(n){return n&&n.__esModule?n:{default:n}}function kb(n,t){if(!t.has(n))throw new TypeError("attempted to get private field on non-instance");return t.get(n)}function jb(n,t,e){if(!t.has(n))throw new TypeError("attempted to set private field on non-instance");return t.set(n,e),e}var ja=function(){function n(t,e){if(!Da(t)||!Da(e))throw new Error("Dimensions.constructor - expected width and height to be valid numbers, instead have "+JSON.stringify({width:t,height:e}));this._width=t,this._height=e}return Object.defineProperty(n.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),n.prototype.reverse=function(){return new n(1/this.width,1/this.height)},n}();function mo(n,t){return n instanceof Ft&&n.shape.length===t}function Db(n){return mo(n,1)}function Lg(n){return mo(n,2)}function $o(n){return mo(n,3)}function da(n){return mo(n,4)}function Ug(n){return n%1!==0}function Bf(n){return n%2===0}function xu(n,t){t===void 0&&(t=2);var e=Math.pow(10,t);return Math.floor(n*e)/e}function Nf(n){return n&&n.width&&n.height}function Wg(n,t){var e=n.width,r=n.height,i=t/Math.max(r,e);return new ja(Math.round(e*i),Math.round(r*i))}function Eu(n){return n.reduce(function(t,e){return t.add(e)},new Vr(0,0)).div(new Vr(n.length,n.length))}function go(n,t,e){return Array(n).fill(0).map(function(r,i){return t+i*e})}function Da(n){return!!n&&n!==1/0&&n!==-1/0&&!isNaN(n)||n===0}function Mf(n){return Da(n)&&0<=n&&n<=1}var Vr=function(){function n(t,e){this._x=t,this._y=e}return Object.defineProperty(n.prototype,"x",{get:function(){return this._x},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"y",{get:function(){return this._y},enumerable:!0,configurable:!0}),n.prototype.add=function(t){return new n(this.x+t.x,this.y+t.y)},n.prototype.sub=function(t){return new n(this.x-t.x,this.y-t.y)},n.prototype.mul=function(t){return new n(this.x*t.x,this.y*t.y)},n.prototype.div=function(t){return new n(this.x/t.x,this.y/t.y)},n.prototype.abs=function(){return new n(Math.abs(this.x),Math.abs(this.y))},n.prototype.magnitude=function(){return Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2))},n.prototype.floor=function(){return new n(Math.floor(this.x),Math.floor(this.y))},n}(),Mi=function(){function n(t,e){e===void 0&&(e=!0);var r=t||{},i=[r.left,r.top,r.right,r.bottom].every(Da),a=[r.x,r.y,r.width,r.height].every(Da);if(!a&&!i)throw new Error("Box.constructor - expected box to be IBoundingBox | IRect, instead have "+JSON.stringify(r));var s=a?[r.x,r.y,r.width,r.height]:[r.left,r.top,r.right-r.left,r.bottom-r.top],u=s[0],l=s[1],d=s[2],A=s[3];n.assertIsValidBox({x:u,y:l,width:d,height:A},"Box.constructor",e),this._x=u,this._y=l,this._width=d,this._height=A}return n.isRect=function(t){return!!t&&[t.x,t.y,t.width,t.height].every(Da)},n.assertIsValidBox=function(t,e,r){if(r===void 0&&(r=!1),!n.isRect(t))throw new Error(e+" - invalid box: "+JSON.stringify(t)+", expected object with properties x, y, width, height");if(!r&&(t.width<0||t.height<0))throw new Error(e+" - width ("+t.width+") and height ("+t.height+") must be positive numbers")},Object.defineProperty(n.prototype,"x",{get:function(){return this._x},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"y",{get:function(){return this._y},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"left",{get:function(){return this.x},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"top",{get:function(){return this.y},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"right",{get:function(){return this.x+this.width},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"area",{get:function(){return this.width*this.height},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"topLeft",{get:function(){return new Vr(this.left,this.top)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"topRight",{get:function(){return new Vr(this.right,this.top)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"bottomLeft",{get:function(){return new Vr(this.left,this.bottom)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"bottomRight",{get:function(){return new Vr(this.right,this.bottom)},enumerable:!0,configurable:!0}),n.prototype.round=function(){var t=[this.x,this.y,this.width,this.height].map(function(s){return Math.round(s)}),e=t[0],r=t[1],i=t[2],a=t[3];return new n({x:e,y:r,width:i,height:a})},n.prototype.floor=function(){var t=[this.x,this.y,this.width,this.height].map(function(s){return Math.floor(s)}),e=t[0],r=t[1],i=t[2],a=t[3];return new n({x:e,y:r,width:i,height:a})},n.prototype.toSquare=function(){var t=this,e=t.x,r=t.y,i=t.width,a=t.height,s=Math.abs(i-a);return i<a&&(e-=s/2,i+=s),a<i&&(r-=s/2,a+=s),new n({x:e,y:r,width:i,height:a})},n.prototype.rescale=function(t){var e=Nf(t)?t.width:t,r=Nf(t)?t.height:t;return new n({x:this.x*e,y:this.y*r,width:this.width*e,height:this.height*r})},n.prototype.pad=function(t,e){var r=[this.x-t/2,this.y-e/2,this.width+t,this.height+e],i=r[0],a=r[1],s=r[2],u=r[3];return new n({x:i,y:a,width:s,height:u})},n.prototype.clipAtImageBorders=function(t,e){var r=this,i=r.x,a=r.y,s=r.right,u=r.bottom,l=Math.max(i,0),d=Math.max(a,0),A=s-l,I=u-d,O=Math.min(A,t-l),z=Math.min(I,e-d);return new n({x:l,y:d,width:O,height:z}).floor()},n.prototype.shift=function(t,e){var r=this,i=r.width,a=r.height,s=this.x+t,u=this.y+e;return new n({x:s,y:u,width:i,height:a})},n.prototype.padAtBorders=function(t,e){var r=this.width+1,i=this.height+1,a=1,s=1,u=r,l=i,d=this.left,A=this.top,I=this.right,O=this.bottom;return I>e&&(u=-I+e+r,I=e),O>t&&(l=-O+t+i,O=t),d<1&&(l=2-d,d=1),A<1&&(l=2-A,A=1),{dy:s,edy:l,dx:a,edx:u,y:A,ey:O,x:d,ex:I,w:r,h:i}},n.prototype.calibrate=function(t){return new n({left:this.left+t.left*this.width,top:this.top+t.top*this.height,right:this.right+t.right*this.width,bottom:this.bottom+t.bottom*this.height}).toSquare().round()},n}(),qo=function(n){ur(t,n);function t(e,r,i,a,s){return s===void 0&&(s=!1),n.call(this,{left:e,top:r,right:i,bottom:a},s)||this}return t}(Mi),_f=function(){function n(t,e,r,i,a){this._imageDims=new ja(a.width,a.height),this._score=t,this._classScore=e,this._className=r,this._box=new Mi(i).rescale(this._imageDims)}return Object.defineProperty(n.prototype,"score",{get:function(){return this._score},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"classScore",{get:function(){return this._classScore},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"className",{get:function(){return this._className},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"box",{get:function(){return this._box},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"imageDims",{get:function(){return this._imageDims},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"imageWidth",{get:function(){return this.imageDims.width},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"imageHeight",{get:function(){return this.imageDims.height},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"relativeBox",{get:function(){return new Mi(this._box).rescale(this.imageDims.reverse())},enumerable:!0,configurable:!0}),n.prototype.forSize=function(t,e){return new n(this.score,this.classScore,this.className,this.relativeBox,{width:t,height:e})},n}(),yi=function(n){ur(t,n);function t(e,r,i){return n.call(this,e,e,"",r,i)||this}return t.prototype.forSize=function(e,r){var i=n.prototype.forSize.call(this,e,r),a=i.score,s=i.relativeBox,u=i.imageDims;return new t(a,s,u)},t}(_f);function zg(n){var t=n.map(function(u){return u.x}),e=n.map(function(u){return u.y}),r=t.reduce(function(u,l){return l<u?l:u},1/0),i=e.reduce(function(u,l){return l<u?l:u},1/0),a=t.reduce(function(u,l){return u<l?l:u},0),s=e.reduce(function(u,l){return u<l?l:u},0);return new qo(r,i,a,s)}function Vg(n,t,e){e===void 0&&(e=!0);var r=Math.max(0,Math.min(n.right,t.right)-Math.max(n.left,t.left)),i=Math.max(0,Math.min(n.bottom,t.bottom)-Math.max(n.top,t.top)),a=r*i;return e?a/(n.area+t.area-a):a/Math.min(n.area,t.area)}function yo(n,t,e,r){r===void 0&&(r=!0);for(var i=t.map(function(u,l){return{score:u,boxIndex:l}}).sort(function(u,l){return u.score-l.score}).map(function(u){return u.boxIndex}),a=[],s=function(){var u=i.pop();a.push(u);for(var l=i,d=[],A=0;A<l.length;A++){var I=l[A],O=n[u],z=n[I];d.push(Vg(O,z,r))}i=i.filter(function(re,oe){return d[oe]<=e})};i.length>0;)s();return a}function bo(n,t){return Ot(function(){var e=t[0],r=t[1],i=t[2],a=Bi(vo(n.shape.slice(0,3),[1]),e),s=Bi(vo(n.shape.slice(0,3),[1]),r),u=Bi(vo(n.shape.slice(0,3),[1]),i),l=Pn([a,s,u],3);return Nn(n,l)})}function Hg(n,t){return t===void 0&&(t=!1),Ot(function(){var e=n.shape.slice(1),r=e[0],i=e[1];if(r===i)return n;var a=Math.abs(r-i),s=Math.round(a*(t?.5:1)),u=r>i?2:1,l=function(z){var re=n.shape.slice();return re[u]=z,Bi(re,0)},d=l(s),A=a-d.shape[u],I=t&&A?l(A):null,O=[I,n,d].filter(function(z){return!!z}).map(function(z){return z.toFloat()});return Pn(O,u)})}function Cu(n){return 1/(1+Math.exp(-n))}function Pb(n){return Math.log(n/(1-n))}var Su=function(n){ur(t,n);function t(e,r,i,a,s){return s===void 0&&(s=!1),n.call(this,{x:e,y:r,width:i,height:a},s)||this}return t}(Mi),Gg=.5,Qg=.43,Xg=.45,Ja=function(){function n(t,e,r){r===void 0&&(r=new Vr(0,0));var i=e.width,a=e.height;this._imgDims=new ja(i,a),this._shift=r,this._positions=t.map(function(s){return s.mul(new Vr(i,a)).add(r)})}return Object.defineProperty(n.prototype,"shift",{get:function(){return new Vr(this._shift.x,this._shift.y)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"imageWidth",{get:function(){return this._imgDims.width},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"imageHeight",{get:function(){return this._imgDims.height},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"positions",{get:function(){return this._positions},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"relativePositions",{get:function(){var t=this;return this._positions.map(function(e){return e.sub(t._shift).div(new Vr(t.imageWidth,t.imageHeight))})},enumerable:!0,configurable:!0}),n.prototype.forSize=function(t,e){return new this.constructor(this.relativePositions,{width:t,height:e})},n.prototype.shiftBy=function(t,e){return new this.constructor(this.relativePositions,this._imgDims,new Vr(t,e))},n.prototype.shiftByPoint=function(t){return this.shiftBy(t.x,t.y)},n.prototype.align=function(t,e){if(e===void 0&&(e={}),t){var r=t instanceof yi?t.box.floor():new Mi(t);return this.shiftBy(r.x,r.y).align(null,e)}var i=Object.assign({},{useDlibAlignment:!1,minBoxPadding:.2},e),a=i.useDlibAlignment,s=i.minBoxPadding;return a?this.alignDlib():this.alignMinBbox(s)},n.prototype.alignDlib=function(){var t=this.getRefPointsForAlignment(),e=t[0],r=t[1],i=t[2],a=function(I){return i.sub(I).magnitude()},s=(a(e)+a(r))/2,u=Math.floor(s/Xg),l=Eu(t),d=Math.floor(Math.max(0,l.x-Gg*u)),A=Math.floor(Math.max(0,l.y-Qg*u));return new Su(d,A,Math.min(u,this.imageWidth+d),Math.min(u,this.imageHeight+A))},n.prototype.alignMinBbox=function(t){var e=zg(this.positions);return e.pad(e.width*t,e.height*t)},n.prototype.getRefPointsForAlignment=function(){throw new Error("getRefPointsForAlignment not implemented by base class")},n}(),Kg=function(n){ur(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.getRefPointsForAlignment=function(){var e=this.positions;return[e[0],e[1],Eu([e[3],e[4]])]},t}(Ja),Ff=function(n){ur(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.getJawOutline=function(){return this.positions.slice(0,17)},t.prototype.getLeftEyeBrow=function(){return this.positions.slice(17,22)},t.prototype.getRightEyeBrow=function(){return this.positions.slice(22,27)},t.prototype.getNose=function(){return this.positions.slice(27,36)},t.prototype.getLeftEye=function(){return this.positions.slice(36,42)},t.prototype.getRightEye=function(){return this.positions.slice(42,48)},t.prototype.getMouth=function(){return this.positions.slice(48,68)},t.prototype.getRefPointsForAlignment=function(){return[this.getLeftEye(),this.getRightEye(),this.getMouth()].map(Eu)},t}(Ja),Lf=function(){function n(t,e){this._label=t,this._distance=e}return Object.defineProperty(n.prototype,"label",{get:function(){return this._label},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"distance",{get:function(){return this._distance},enumerable:!0,configurable:!0}),n.prototype.toString=function(t){return t===void 0&&(t=!0),""+this.label+(t?" ("+xu(this.distance)+")":"")},n}(),Uf=function(n){ur(t,n);function t(e,r){var i=n.call(this,e)||this;return i._label=r,i}return t.assertIsValidLabeledBox=function(e,r){if(Mi.assertIsValidBox(e,r),!Da(e.label))throw new Error(r+" - expected property label ("+e.label+") to be a number")},Object.defineProperty(t.prototype,"label",{get:function(){return this._label},enumerable:!0,configurable:!0}),t}(Mi),es=function(){function n(t,e){if(typeof t!="string")throw new Error("LabeledFaceDescriptors - constructor expected label to be a string");if(!Array.isArray(e)||e.some(function(r){return!(r instanceof Float32Array)}))throw new Error("LabeledFaceDescriptors - constructor expected descriptors to be an array of Float32Array");this._label=t,this._descriptors=e}return Object.defineProperty(n.prototype,"label",{get:function(){return this._label},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"descriptors",{get:function(){return this._descriptors},enumerable:!0,configurable:!0}),n.prototype.toJSON=function(){return{label:this.label,descriptors:this.descriptors.map(function(t){return Array.from(t)})}},n.fromJSON=function(t){var e=t.descriptors.map(function(r){return new Float32Array(r)});return new n(t.label,e)},n}(),Bb=function(n){ur(t,n);function t(e,r,i,a){var s=n.call(this,e,r)||this;return s._score=i,s._classScore=a,s}return t.assertIsValidPredictedBox=function(e,r){if(Uf.assertIsValidLabeledBox(e,r),!Mf(e.score)||!Mf(e.classScore))throw new Error(r+" - expected properties score ("+e.score+") and ("+e.classScore+") to be a number between [0, 1]")},Object.defineProperty(t.prototype,"score",{get:function(){return this._score},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"classScore",{get:function(){return this._classScore},enumerable:!0,configurable:!0}),t}(Uf);function wo(n){return n.detection instanceof yi}function Ao(n,t){var e={detection:t};return Object.assign({},n,e)}function Wf(){var n=window.fetch||function(){throw new Error("fetch - missing fetch implementation for browser environment")},t=function(){throw new Error("readFile - filesystem not available for browser environment")};return{Canvas:HTMLCanvasElement,CanvasRenderingContext2D,Image:HTMLImageElement,ImageData,Video:HTMLVideoElement,createCanvasElement:function(){return document.createElement("canvas")},createImageElement:function(){return document.createElement("img")},fetch:n,readFile:t}}function zf(n){var t="";if(!n)try{n=Te(90872)}catch(r){t=r.toString()}var e=n?function(r){return new Promise(function(i,a){n.readFile(r,function(s,u){return s?a(s):i(u)})})}:function(){throw new Error("readFile - failed to require fs in nodejs environment with error: "+t)};return{readFile:e}}function Vf(){var n=Te.g.Canvas||Te.g.HTMLCanvasElement,t=Te.g.Image||Te.g.HTMLImageElement,e=function(){if(n)return new n;throw new Error("createCanvasElement - missing Canvas implementation for nodejs environment")},r=function(){if(t)return new t;throw new Error("createImageElement - missing Image implementation for nodejs environment")},i=Te.g.fetch||function(){throw new Error("fetch - missing fetch implementation for nodejs environment")},a=zf();return ri({Canvas:n||function(){function s(){}return s}(),CanvasRenderingContext2D:Te.g.CanvasRenderingContext2D||function(){function s(){}return s}(),Image:t||function(){function s(){}return s}(),ImageData:Te.g.ImageData||function(){function s(){}return s}(),Video:Te.g.HTMLVideoElement||function(){function s(){}return s}(),createCanvasElement:e,createImageElement:r,fetch:i},a)}function Hf(){return typeof window=="object"&&typeof document!="undefined"&&typeof HTMLImageElement!="undefined"&&typeof HTMLCanvasElement!="undefined"&&typeof HTMLVideoElement!="undefined"&&typeof ImageData!="undefined"&&typeof CanvasRenderingContext2D!="undefined"}var Gf=Te(97671);function Qf(){return typeof Te.g=="object"&&!0&&!0&&typeof Gf!="undefined"&&!!Gf.version}var Mn;function Zg(){if(!Mn)throw new Error("getEnv - environment is not defined, check isNodejs() and isBrowser()");return Mn}function Iu(n){Mn=n}function Tu(){Hf()&&Iu(Wf()),Qf()&&Iu(Vf())}function Jg(n){if(Mn||Tu(),!Mn)throw new Error("monkeyPatch - environment is not defined, check isNodejs() and isBrowser()");var t=n.Canvas,e=t===void 0?Mn.Canvas:t,r=n.Image,i=r===void 0?Mn.Image:r;Mn.Canvas=e,Mn.Image=i,Mn.createCanvasElement=n.createCanvasElement||function(){return new e},Mn.createImageElement=n.createImageElement||function(){return new i},Mn.ImageData=n.ImageData||Mn.ImageData,Mn.Video=n.Video||Mn.Video,Mn.fetch=n.fetch||Mn.fetch,Mn.readFile=n.readFile||Mn.readFile}var ni={getEnv:Zg,setEnv:Iu,initialize:Tu,createBrowserEnv:Wf,createFileSystem:zf,createNodejsEnv:Vf,monkeyPatch:Jg,isBrowser:Hf,isNodejs:Qf};Tu();function Ru(n){return!ni.isNodejs()&&typeof n=="string"?document.getElementById(n):n}function _i(n){var t=ni.getEnv(),e=t.Canvas,r=t.CanvasRenderingContext2D;if(n instanceof r)return n;var i=Ru(n);if(!(i instanceof e))throw new Error("resolveContext2d - expected canvas to be of instance of Canvas");var a=i.getContext("2d");if(!a)throw new Error("resolveContext2d - canvas 2d context is null");return a}var pa;(function(n){n.TOP_LEFT="TOP_LEFT",n.TOP_RIGHT="TOP_RIGHT",n.BOTTOM_LEFT="BOTTOM_LEFT",n.BOTTOM_RIGHT="BOTTOM_RIGHT"})(pa||(pa={}));var Xf=function(){function n(t){t===void 0&&(t={});var e=t.anchorPosition,r=t.backgroundColor,i=t.fontColor,a=t.fontSize,s=t.fontStyle,u=t.padding;this.anchorPosition=e||pa.TOP_LEFT,this.backgroundColor=r||"rgba(0, 0, 0, 0.5)",this.fontColor=i||"rgba(255, 255, 255, 1)",this.fontSize=a||14,this.fontStyle=s||"Georgia",this.padding=u||4}return n}(),Kf=function(){function n(t,e,r){r===void 0&&(r={}),this.text=typeof t=="string"?[t]:t instanceof n?t.text:t,this.anchor=e,this.options=new Xf(r)}return n.prototype.measureWidth=function(t){var e=this.options.padding;return this.text.map(function(r){return t.measureText(r).width}).reduce(function(r,i){return r<i?i:r},0)+2*e},n.prototype.measureHeight=function(){var t=this.options,e=t.fontSize,r=t.padding;return this.text.length*e+2*r},n.prototype.getUpperLeft=function(t,e){var r=this.options.anchorPosition,i=r===pa.BOTTOM_RIGHT||r===pa.TOP_RIGHT,a=r===pa.BOTTOM_LEFT||r===pa.BOTTOM_RIGHT,s=this.measureWidth(t),u=this.measureHeight(),l=i?this.anchor.x-s:this.anchor.x,d=a?this.anchor.y-u:this.anchor.y;if(e){var A=e.width,I=e.height,O=Math.max(Math.min(l,A-s),0),z=Math.max(Math.min(d,I-u),0);return{x:O,y:z}}return{x:l,y:d}},n.prototype.draw=function(t){var e=Ru(t),r=_i(e),i=this.options,a=i.backgroundColor,s=i.fontColor,u=i.fontSize,l=i.fontStyle,d=i.padding;r.font=u+"px "+l;var A=this.measureWidth(r),I=this.measureHeight();r.fillStyle=a;var O=this.getUpperLeft(r,e);r.fillRect(O.x,O.y,A,I),r.fillStyle=s,this.text.forEach(function(z,re){var oe=d+O.x,ae=d+O.y+(re+1)*u;r.fillText(z,oe,ae)})},n}(),Yg=function(){function n(t){t===void 0&&(t={});var e=t.boxColor,r=t.lineWidth,i=t.label,a=t.drawLabelOptions;this.boxColor=e||"rgba(0, 0, 255, 1)",this.lineWidth=r||2,this.label=i;var s={anchorPosition:pa.BOTTOM_LEFT,backgroundColor:this.boxColor};this.drawLabelOptions=new Xf(Object.assign({},s,a))}return n}(),$g=function(){function n(t,e){e===void 0&&(e={}),this.box=new Mi(t),this.options=new Yg(e)}return n.prototype.draw=function(t){var e=_i(t),r=this.options,i=r.boxColor,a=r.lineWidth,s=this.box,u=s.x,l=s.y,d=s.width,A=s.height;e.strokeStyle=i,e.lineWidth=a,e.strokeRect(u,l,d,A);var I=this.options.label;I&&new Kf([I],{x:u-a/2,y:l},this.options.drawLabelOptions).draw(t)},n}();function qg(n,t){var e=Array.isArray(t)?t:[t];e.forEach(function(r){var i=r instanceof yi?r.score:wo(r)?r.detection.score:void 0,a=r instanceof yi?r.box:wo(r)?r.detection.box:new Mi(r),s=i?""+xu(i):void 0;new $g(a,{label:s}).draw(n)})}function Zf(n){var t=ni.getEnv(),e=t.Image,r=t.Video;return n instanceof e&&n.complete||n instanceof r&&n.readyState>=3}function ey(n){return new Promise(function(t,e){if(n instanceof ni.getEnv().Canvas||Zf(n))return t();function r(a){a.currentTarget&&(a.currentTarget.removeEventListener("load",r),a.currentTarget.removeEventListener("error",i),t(a))}function i(a){a.currentTarget&&(a.currentTarget.removeEventListener("load",r),a.currentTarget.removeEventListener("error",i),e(a))}n.addEventListener("load",r),n.addEventListener("error",i)})}function Nb(n){return new Promise(function(t,e){if(!(n instanceof Blob))return e("bufferToImage - expected buf to be of type: Blob");var r=new FileReader;r.onload=function(){if(typeof r.result!="string")return e("bufferToImage - expected reader.result to be a string, in onload");var i=env.getEnv().createImageElement();i.onload=function(){return t(i)},i.onerror=e,i.src=r.result},r.onerror=e,r.readAsDataURL(n)})}function Ou(n){var t=ni.getEnv(),e=t.Image,r=t.Video;return n instanceof e?new ja(n.naturalWidth,n.naturalHeight):n instanceof r?new ja(n.videoWidth,n.videoHeight):new ja(n.width,n.height)}function ts(n){var t=n.width,e=n.height,r=ni.getEnv().createCanvasElement,i=r();return i.width=t,i.height=e,i}function ku(n,t){var e=ni.getEnv().ImageData;if(!(n instanceof e)&&!Zf(n))throw new Error("createCanvasFromMedia - media has not finished loading yet");var r=t||Ou(n),i=r.width,a=r.height,s=ts({width:i,height:a});return n instanceof e?_i(s).putImageData(n,0,0):_i(s).drawImage(n,0,0,i,a),s}function ty(n,t){return Gt(this,void 0,void 0,function(){var e,r,i,a,s,u;return Qt(this,function(l){switch(l.label){case 0:return e=t||ni.getEnv().createCanvasElement(),r=n.shape.slice(da(n)?1:0),i=r[0],a=r[1],s=r[2],u=Ot(function(){return n.as3D(i,a,s).toInt()}),[4,mu.toPixels(u,e)];case 1:return l.sent(),u.dispose(),[2,e]}})})}function Jf(n){var t=ni.getEnv(),e=t.Image,r=t.Canvas,i=t.Video;return n instanceof e||n instanceof r||n instanceof i}function ry(n,t,e){e===void 0&&(e=!1);var r=ni.getEnv(),i=r.Image,a=r.Canvas;if(!(n instanceof i||n instanceof a))throw new Error("imageToSquare - expected arg0 to be HTMLImageElement | HTMLCanvasElement");var s=Ou(n),u=t/Math.max(s.height,s.width),l=u*s.width,d=u*s.height,A=ts({width:t,height:t}),I=n instanceof a?n:ku(n),O=Math.abs(l-d)/2,z=e&&l<d?O:0,re=e&&d<l?O:0;return _i(A).drawImage(I,z,re,l,d),A}var rs=function(){function n(t,e){var r=this;if(e===void 0&&(e=!1),this._imageTensors=[],this._canvases=[],this._treatAsBatchInput=!1,this._inputDimensions=[],!Array.isArray(t))throw new Error("NetInput.constructor - expected inputs to be an Array of TResolvedNetInput or to be instanceof tf.Tensor4D, instead have "+t);this._treatAsBatchInput=e,this._batchSize=t.length,t.forEach(function(i,a){if($o(i)){r._imageTensors[a]=i,r._inputDimensions[a]=i.shape;return}if(da(i)){var s=i.shape[0];if(s!==1)throw new Error("NetInput - tf.Tensor4D with batchSize "+s+" passed, but not supported in input array");r._imageTensors[a]=i,r._inputDimensions[a]=i.shape.slice(1);return}var u=i instanceof ni.getEnv().Canvas?i:ku(i);r._canvases[a]=u,r._inputDimensions[a]=[u.height,u.width,3]})}return Object.defineProperty(n.prototype,"imageTensors",{get:function(){return this._imageTensors},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"canvases",{get:function(){return this._canvases},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isBatchInput",{get:function(){return this.batchSize>1||this._treatAsBatchInput},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"batchSize",{get:function(){return this._batchSize},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"inputDimensions",{get:function(){return this._inputDimensions},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"inputSize",{get:function(){return this._inputSize},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"reshapedInputDimensions",{get:function(){var t=this;return go(this.batchSize,0,1).map(function(e,r){return t.getReshapedInputDimensions(r)})},enumerable:!0,configurable:!0}),n.prototype.getInput=function(t){return this.canvases[t]||this.imageTensors[t]},n.prototype.getInputDimensions=function(t){return this._inputDimensions[t]},n.prototype.getInputHeight=function(t){return this._inputDimensions[t][0]},n.prototype.getInputWidth=function(t){return this._inputDimensions[t][1]},n.prototype.getReshapedInputDimensions=function(t){if(typeof this.inputSize!="number")throw new Error("getReshapedInputDimensions - inputSize not set, toBatchTensor has not been called yet");var e=this.getInputWidth(t),r=this.getInputHeight(t);return Wg({width:e,height:r},this.inputSize)},n.prototype.toBatchTensor=function(t,e){var r=this;return e===void 0&&(e=!0),this._inputSize=t,Ot(function(){var i=go(r.batchSize,0,1).map(function(s){var u=r.getInput(s);if(u instanceof Ft){var l=da(u)?u:u.expandDims();return l=Hg(l,e),(l.shape[1]!==t||l.shape[2]!==t)&&(l=Ys.resizeBilinear(l,[t,t])),l.as3D(t,t,3)}if(u instanceof ni.getEnv().Canvas)return mu.fromPixels(ry(u,t,e));throw new Error("toBatchTensor - at batchIdx "+s+", expected input to be instanceof tf.Tensor or instanceof HTMLCanvasElement, instead have "+u)}),a=mi(i.map(function(s){return s.toFloat()})).as4D(r.batchSize,t,t,3);return a})},n}();function Hn(n){return Gt(this,void 0,void 0,function(){var t,e,r;return Qt(this,function(i){switch(i.label){case 0:if(n instanceof rs)return[2,n];if(t=Array.isArray(n)?n:[n],!t.length)throw new Error("toNetInput - empty array passed as input");return e=function(a){return Array.isArray(n)?" at input index "+a+":":""},r=t.map(Ru),r.forEach(function(a,s){if(!Jf(a)&&!$o(a)&&!da(a))throw typeof t[s]=="string"?new Error("toNetInput -"+e(s)+" string passed, but could not resolve HTMLElement for element id "+t[s]):new Error("toNetInput -"+e(s)+" expected media to be of type HTMLImageElement | HTMLVideoElement | HTMLCanvasElement | tf.Tensor3D, or to be an element id");if(da(a)){var u=a.shape[0];if(u!==1)throw new Error("toNetInput -"+e(s)+" tf.Tensor4D with batchSize "+u+" passed, but not supported in input array")}}),[4,Promise.all(r.map(function(a){return Jf(a)&&ey(a)}))];case 1:return i.sent(),[2,new rs(r,Array.isArray(n))]}})})}function ju(n,t){return Gt(this,void 0,void 0,function(){var e,r,i,a,s,u,l;return Qt(this,function(d){switch(d.label){case 0:return e=ni.getEnv().Canvas,r=n,n instanceof e?[3,5]:[4,Hn(n)];case 1:if(i=d.sent(),i.batchSize>1)throw new Error("extractFaces - batchSize > 1 not supported");return a=i.getInput(0),a instanceof e?(s=a,[3,4]):[3,2];case 2:return[4,ty(a)];case 3:s=d.sent(),d.label=4;case 4:r=s,d.label=5;case 5:return u=_i(r),l=t.map(function(A){return A instanceof yi?A.forSize(r.width,r.height).box.floor():A}).map(function(A){return A.clipAtImageBorders(r.width,r.height)}),[2,l.map(function(A){var I=A.x,O=A.y,z=A.width,re=A.height,oe=ts({width:z,height:re});return _i(oe).putImageData(u.getImageData(I,O,z,re),0,0),oe})]}})})}function Du(n,t){return Gt(this,void 0,void 0,function(){return Qt(this,function(e){if(!$o(n)&&!da(n))throw new Error("extractFaceTensors - expected image tensor to be 3D or 4D");if(da(n)&&n.shape[0]>1)throw new Error("extractFaceTensors - batchSize > 1 not supported");return[2,Ot(function(){var r=n.shape.slice(da(n)?1:0),i=r[0],a=r[1],s=r[2],u=t.map(function(d){return d instanceof yi?d.forSize(a,i).box:d}).map(function(d){return d.clipAtImageBorders(a,i)}),l=u.map(function(d){var A=d.x,I=d.y,O=d.width,z=d.height;return Qc(n.as3D(i,a,s),[I,A,0],[z,O,s])});return l})]})})}function ny(n,t){return Gt(this,void 0,void 0,function(){var e,r;return Qt(this,function(i){switch(i.label){case 0:return e=ni.getEnv().fetch,[4,e(n,t)];case 1:if(r=i.sent(),!(r.status<400))throw new Error("failed to fetch: ("+r.status+") "+r.statusText+", from url: "+r.url);return[2,r]}})})}function Mb(n){return __awaiter(this,void 0,void 0,function(){var t,e;return __generator(this,function(r){switch(r.label){case 0:return[4,fetchOrThrow(n)];case 1:return t=r.sent(),[4,t.blob()];case 2:if(e=r.sent(),!e.type.startsWith("image/"))throw new Error("fetchImage - expected blob type to be of type image/*, instead have: "+e.type+", for url: "+t.url);return[2,bufferToImage(e)]}})})}function iy(n){return Gt(this,void 0,void 0,function(){return Qt(this,function(t){switch(t.label){case 0:return[4,ny(n)];case 1:return[2,t.sent().json()]}})})}function _b(n){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(e){switch(e.label){case 0:return t=Float32Array.bind,[4,fetchOrThrow(n)];case 1:return[4,e.sent().arrayBuffer()];case 2:return[2,new(t.apply(Float32Array,[void 0,e.sent()]))]}})})}function Yf(n,t){var e=t+"-weights_manifest.json";if(!n)return{modelBaseUri:"",manifestUri:e};if(n==="/")return{modelBaseUri:"/",manifestUri:"/"+e};var r=n.startsWith("http://")?"http://":n.startsWith("https://")?"https://":"";n=n.replace(r,"");var i=n.split("/").filter(function(u){return u}),a=n.endsWith(".json")?i[i.length-1]:e,s=r+(n.endsWith(".json")?i.slice(0,i.length-1):i).join("/");return s=n.startsWith("/")?"/"+s:s,{modelBaseUri:s,manifestUri:s==="/"?"/"+a:s+"/"+a}}function ay(n,t){return Gt(this,void 0,void 0,function(){var e,r,i,a;return Qt(this,function(s){switch(s.label){case 0:return e=Yf(n,t),r=e.manifestUri,i=e.modelBaseUri,[4,iy(r)];case 1:return a=s.sent(),[2,Ef.loadWeights(a,i)]}})})}function Fb(n,t,e){e===void 0&&(e=!1);var r=e?getMediaDimensions(t):t,i=r.width,a=r.height;return n.width=i,n.height=a,{width:i,height:a}}var Ji=function(){function n(t){this._name=t,this._params=void 0,this._paramMappings=[]}return Object.defineProperty(n.prototype,"params",{get:function(){return this._params},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"paramMappings",{get:function(){return this._paramMappings},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isLoaded",{get:function(){return!!this.params},enumerable:!0,configurable:!0}),n.prototype.getParamFromPath=function(t){var e=this.traversePropertyPath(t),r=e.obj,i=e.objProp;return r[i]},n.prototype.reassignParamFromPath=function(t,e){var r=this.traversePropertyPath(t),i=r.obj,a=r.objProp;i[a].dispose(),i[a]=e},n.prototype.getParamList=function(){var t=this;return this._paramMappings.map(function(e){var r=e.paramPath;return{path:r,tensor:t.getParamFromPath(r)}})},n.prototype.getTrainableParams=function(){return this.getParamList().filter(function(t){return t.tensor instanceof sr})},n.prototype.getFrozenParams=function(){return this.getParamList().filter(function(t){return!(t.tensor instanceof sr)})},n.prototype.variable=function(){var t=this;this.getFrozenParams().forEach(function(e){var r=e.path,i=e.tensor;t.reassignParamFromPath(r,i.variable())})},n.prototype.freeze=function(){var t=this;this.getTrainableParams().forEach(function(e){var r=e.path,i=e.tensor,a=Sn(i.dataSync());i.dispose(),t.reassignParamFromPath(r,a)})},n.prototype.dispose=function(t){t===void 0&&(t=!0),this.getParamList().forEach(function(e){if(t&&e.tensor.isDisposed)throw new Error("param tensor has already been disposed for path "+e.path);e.tensor.dispose()}),this._params=void 0},n.prototype.serializeParams=function(){return new Float32Array(this.getParamList().map(function(t){var e=t.tensor;return Array.from(e.dataSync())}).reduce(function(t,e){return t.concat(e)}))},n.prototype.load=function(t){return Gt(this,void 0,void 0,function(){return Qt(this,function(e){switch(e.label){case 0:return t instanceof Float32Array?(this.extractWeights(t),[2]):[4,this.loadFromUri(t)];case 1:return e.sent(),[2]}})})},n.prototype.loadFromUri=function(t){return Gt(this,void 0,void 0,function(){var e;return Qt(this,function(r){switch(r.label){case 0:if(t&&typeof t!="string")throw new Error(this._name+".loadFromUri - expected model uri");return[4,ay(t,this.getDefaultModelName())];case 1:return e=r.sent(),this.loadFromWeightMap(e),[2]}})})},n.prototype.loadFromDisk=function(t){return Gt(this,void 0,void 0,function(){var e,r,i,a,s,u,l,d,A,I;return Qt(this,function(O){switch(O.label){case 0:if(t&&typeof t!="string")throw new Error(this._name+".loadFromDisk - expected model file path");return e=ni.getEnv().readFile,r=Yf(t,this.getDefaultModelName()),i=r.manifestUri,a=r.modelBaseUri,s=function(z){return Promise.all(z.map(function(re){return e(re).then(function(oe){return oe.buffer})}))},u=Ef.weightsLoaderFactory(s),A=(d=JSON).parse,[4,e(i)];case 1:return l=A.apply(d,[O.sent().toString()]),[4,u(l,a)];case 2:return I=O.sent(),this.loadFromWeightMap(I),[2]}})})},n.prototype.loadFromWeightMap=function(t){var e=this.extractParamsFromWeigthMap(t),r=e.paramMappings,i=e.params;this._paramMappings=r,this._params=i},n.prototype.extractWeights=function(t){var e=this.extractParams(t),r=e.paramMappings,i=e.params;this._paramMappings=r,this._params=i},n.prototype.traversePropertyPath=function(t){if(!this.params)throw new Error("traversePropertyPath - model has no loaded params");var e=t.split("/").reduce(function(a,s){if(!a.nextObj.hasOwnProperty(s))throw new Error("traversePropertyPath - object does not have property "+s+", for path "+t);return{obj:a.nextObj,objProp:s,nextObj:a.nextObj[s]}},{nextObj:this.params}),r=e.obj,i=e.objProp;if(!r||!i||!(r[i]instanceof Ft))throw new Error("traversePropertyPath - parameter is not a tensor, for path "+t);return{obj:r,objProp:i}},n}();function bi(n,t,e){return Ot(function(){var r=Qs(n,t.depthwise_filter,t.pointwise_filter,e,"same");return r=Tr(r,t.bias),r})}function Pu(n,t,e){return e===void 0&&(e=!1),Ot(function(){var r=wn(e?Tr(Ei(n,t.conv0.filters,[2,2],"same"),t.conv0.bias):bi(n,t.conv0,[2,2])),i=bi(r,t.conv1,[1,1]),a=wn(Tr(r,i)),s=bi(a,t.conv2,[1,1]);return wn(Tr(r,Tr(i,s)))})}function ns(n,t,e,r){return e===void 0&&(e=!1),r===void 0&&(r=!0),Ot(function(){var i=wn(e?Tr(Ei(n,t.conv0.filters,r?[2,2]:[1,1],"same"),t.conv0.bias):bi(n,t.conv0,r?[2,2]:[1,1])),a=bi(i,t.conv1,[1,1]),s=wn(Tr(i,a)),u=bi(s,t.conv2,[1,1]),l=wn(Tr(i,Tr(a,u))),d=bi(l,t.conv3,[1,1]);return wn(Tr(i,Tr(a,Tr(u,d))))})}function ji(n,t,e,r){return e===void 0&&(e="same"),r===void 0&&(r=!1),Ot(function(){var i=Tr(Ei(n,t.filters,[1,1],e),t.bias);return r?wn(i):i})}function Yi(n,t){Object.keys(n).forEach(function(e){t.some(function(r){return r.originalPath===e})||n[e].dispose()})}function is(n,t){return function(e,r,i,a){var s=li(n(e*r*i*i),[i,i,e,r]),u=On(n(r));return t.push({paramPath:a+"/filters"},{paramPath:a+"/bias"}),{filters:s,bias:u}}}function Bu(n,t){return function(e,r,i){var a=oa(n(e*r),[e,r]),s=On(n(r));return t.push({paramPath:i+"/weights"},{paramPath:i+"/bias"}),{weights:a,bias:s}}}var $f=function(){function n(t,e,r){this.depthwise_filter=t,this.pointwise_filter=e,this.bias=r}return n}();function Nu(n,t){return function(e,r,i){var a=li(n(9*e),[3,3,e,1]),s=li(n(e*r),[1,1,e,r]),u=On(n(r));return t.push({paramPath:i+"/depthwise_filter"},{paramPath:i+"/pointwise_filter"},{paramPath:i+"/bias"}),new $f(a,s,u)}}function Mu(n){return function(t){var e=n(t+"/depthwise_filter",4),r=n(t+"/pointwise_filter",4),i=n(t+"/bias",1);return new $f(e,r,i)}}function ha(n,t){return function(e,r,i){var a=n[e];if(!mo(a,r))throw new Error("expected weightMap["+e+"] to be a Tensor"+r+"D, instead have "+a);return t.push({originalPath:e,paramPath:i||e}),a}}function $i(n){var t=n;function e(i){var a=t.slice(0,i);return t=t.slice(i),a}function r(){return t}return{extractWeights:e,getRemainingWeights:r}}function qf(n,t){var e=is(n,t),r=Nu(n,t);function i(s,u,l,d){d===void 0&&(d=!1);var A=d?e(s,u,3,l+"/conv0"):r(s,u,l+"/conv0"),I=r(u,u,l+"/conv1"),O=r(u,u,l+"/conv2");return{conv0:A,conv1:I,conv2:O}}function a(s,u,l,d){d===void 0&&(d=!1);var A=i(s,u,l,d),I=A.conv0,O=A.conv1,z=A.conv2,re=r(u,u,l+"/conv3");return{conv0:I,conv1:O,conv2:z,conv3:re}}return{extractDenseBlock3Params:i,extractDenseBlock4Params:a}}function oy(n){var t=[],e=$i(n),r=e.extractWeights,i=e.getRemainingWeights,a=qf(r,t).extractDenseBlock4Params,s=a(3,32,"dense0",!0),u=a(32,64,"dense1"),l=a(64,128,"dense2"),d=a(128,256,"dense3");if(i().length!==0)throw new Error("weights remaing after extract: "+i().length);return{paramMappings:t,params:{dense0:s,dense1:u,dense2:l,dense3:d}}}function ed(n){return function(t){var e=n(t+"/filters",4),r=n(t+"/bias",1);return{filters:e,bias:r}}}function td(n,t){var e=ha(n,t),r=ed(e),i=Mu(e);function a(u,l){l===void 0&&(l=!1);var d=l?r(u+"/conv0"):i(u+"/conv0"),A=i(u+"/conv1"),I=i(u+"/conv2");return{conv0:d,conv1:A,conv2:I}}function s(u,l){l===void 0&&(l=!1);var d=l?r(u+"/conv0"):i(u+"/conv0"),A=i(u+"/conv1"),I=i(u+"/conv2"),O=i(u+"/conv3");return{conv0:d,conv1:A,conv2:I,conv3:O}}return{extractDenseBlock3Params:a,extractDenseBlock4Params:s}}function sy(n){var t=[],e=td(n,t).extractDenseBlock4Params,r={dense0:e("dense0",!0),dense1:e("dense1"),dense2:e("dense2"),dense3:e("dense3")};return Yi(n,t),{params:r,paramMappings:t}}var rd=function(n){ur(t,n);function t(){return n.call(this,"FaceFeatureExtractor")||this}return t.prototype.forwardInput=function(e){var r=this.params;if(!r)throw new Error("FaceFeatureExtractor - load model before inference");return Ot(function(){var i=e.toBatchTensor(112,!0),a=[122.782,117.001,104.298],s=bo(i,a).div(kt(255)),u=ns(s,r.dense0,!0);return u=ns(u,r.dense1),u=ns(u,r.dense2),u=ns(u,r.dense3),u=po(u,[7,7],[2,2],"valid"),u})},t.prototype.forward=function(e){return Gt(this,void 0,void 0,function(){var r;return Qt(this,function(i){switch(i.label){case 0:return r=this.forwardInput,[4,Hn(e)];case 1:return[2,r.apply(this,[i.sent()])]}})})},t.prototype.getDefaultModelName=function(){return"face_feature_extractor_model"},t.prototype.extractParamsFromWeigthMap=function(e){return sy(e)},t.prototype.extractParams=function(e){return oy(e)},t}(Ji);function Fi(n,t){return Ot(function(){return Tr(Go(n,t.weights),t.bias)})}function uy(n,t,e){var r=[],i=$i(n),a=i.extractWeights,s=i.getRemainingWeights,u=Bu(a,r),l=u(t,e,"fc");if(s().length!==0)throw new Error("weights remaing after extract: "+s().length);return{paramMappings:r,params:{fc:l}}}function ly(n){var t=[],e=ha(n,t);function r(a){var s=e(a+"/weights",2),u=e(a+"/bias",1);return{weights:s,bias:u}}var i={fc:r("fc")};return Yi(n,t),{params:i,paramMappings:t}}function nd(n){var t={},e={};return Object.keys(n).forEach(function(r){var i=r.startsWith("fc")?e:t;i[r]=n[r]}),{featureExtractorMap:t,classifierMap:e}}var id=function(n){ur(t,n);function t(e,r){var i=n.call(this,e)||this;return i._faceFeatureExtractor=r,i}return Object.defineProperty(t.prototype,"faceFeatureExtractor",{get:function(){return this._faceFeatureExtractor},enumerable:!0,configurable:!0}),t.prototype.runNet=function(e){var r=this,i=this.params;if(!i)throw new Error(this._name+" - load model before inference");return Ot(function(){var a=e instanceof rs?r.faceFeatureExtractor.forwardInput(e):e;return Fi(a.as2D(a.shape[0],-1),i.fc)})},t.prototype.dispose=function(e){e===void 0&&(e=!0),this.faceFeatureExtractor.dispose(e),n.prototype.dispose.call(this,e)},t.prototype.loadClassifierParams=function(e){var r=this.extractClassifierParams(e),i=r.params,a=r.paramMappings;this._params=i,this._paramMappings=a},t.prototype.extractClassifierParams=function(e){return uy(e,this.getClassifierChannelsIn(),this.getClassifierChannelsOut())},t.prototype.extractParamsFromWeigthMap=function(e){var r=nd(e),i=r.featureExtractorMap,a=r.classifierMap;return this.faceFeatureExtractor.loadFromWeightMap(i),ly(a)},t.prototype.extractParams=function(e){var r=this.getClassifierChannelsIn(),i=this.getClassifierChannelsOut(),a=i*r+i,s=e.slice(0,e.length-a),u=e.slice(e.length-a);return this.faceFeatureExtractor.extractWeights(s),this.extractClassifierParams(u)},t}(Ji),ad=["neutral","happy","sad","angry","fearful","disgusted","surprised"],_u=function(){function n(t){var e=this;if(t.length!==7)throw new Error("FaceExpressions.constructor - expected probabilities.length to be 7, have: "+t.length);ad.forEach(function(r,i){e[r]=t[i]})}return n.prototype.asSortedArray=function(){var t=this;return ad.map(function(e){return{expression:e,probability:t[e]}}).sort(function(e,r){return r.probability-e.probability})},n}(),cy=function(n){ur(t,n);function t(e){return e===void 0&&(e=new rd),n.call(this,"FaceExpressionNet",e)||this}return t.prototype.forwardInput=function(e){var r=this;return Ot(function(){return Gi(r.runNet(e))})},t.prototype.forward=function(e){return Gt(this,void 0,void 0,function(){var r;return Qt(this,function(i){switch(i.label){case 0:return r=this.forwardInput,[4,Hn(e)];case 1:return[2,r.apply(this,[i.sent()])]}})})},t.prototype.predictExpressions=function(e){return Gt(this,void 0,void 0,function(){var r,i,a,s,u=this;return Qt(this,function(l){switch(l.label){case 0:return[4,Hn(e)];case 1:return r=l.sent(),[4,this.forwardInput(r)];case 2:return i=l.sent(),[4,Promise.all(Bn(i).map(function(d){return Gt(u,void 0,void 0,function(){var A;return Qt(this,function(I){switch(I.label){case 0:return[4,d.data()];case 1:return A=I.sent(),d.dispose(),[2,A]}})})}))];case 3:return a=l.sent(),i.dispose(),s=a.map(function(d){return new _u(d)}),[2,r.isBatchInput?s:s[0]]}})})},t.prototype.getDefaultModelName=function(){return"face_expression_model"},t.prototype.getClassifierChannelsIn=function(){return 256},t.prototype.getClassifierChannelsOut=function(){return 7},t}(id);function fy(n){return n.expressions instanceof _u}function od(n,t){var e={expressions:t};return Object.assign({},n,e)}function Lb(n,t,e,r){e===void 0&&(e=.1);var i=Array.isArray(t)?t:[t];i.forEach(function(a){var s=a instanceof _u?a:fy(a)?a.expressions:void 0;if(!s)throw new Error("drawFaceExpressions - expected faceExpressions to be FaceExpressions | WithFaceExpressions<{}> or array thereof");var u=s.asSortedArray(),l=u.filter(function(I){return I.probability>e}),d=wo(a)?a.detection.box.bottomLeft:r||new Vr(0,0),A=new Kf(l.map(function(I){return I.expression+" ("+xu(I.probability)+")"}),d);A.draw(n)})}function Fu(n){return wo(n)&&n.landmarks instanceof Ja&&n.unshiftedLandmarks instanceof Ja&&n.alignedRect instanceof yi}function as(n,t){var e=n.detection.box,r=t.shiftBy(e.x,e.y),i=r.align(),a=n.detection.imageDims,s=new yi(n.detection.score,i.rescale(a.reverse()),a),u={landmarks:r,unshiftedLandmarks:t,alignedRect:s};return Object.assign({},n,u)}var dy=function(){function n(t){t===void 0&&(t={});var e=t.drawLines,r=e===void 0?!0:e,i=t.drawPoints,a=i===void 0?!0:i,s=t.lineWidth,u=t.lineColor,l=t.pointSize,d=t.pointColor;this.drawLines=r,this.drawPoints=a,this.lineWidth=s||1,this.pointSize=l||2,this.lineColor=u||"rgba(0, 255, 255, 1)",this.pointColor=d||"rgba(255, 0, 255, 1)"}return n}(),py=function(){function n(t,e){e===void 0&&(e={}),this.faceLandmarks=t,this.options=new dy(e)}return n.prototype.draw=function(t){var e=_i(t),r=this.options,i=r.drawLines,a=r.drawPoints,s=r.lineWidth,u=r.lineColor,l=r.pointSize,d=r.pointColor;if(i&&this.faceLandmarks instanceof Ff&&(e.strokeStyle=u,e.lineWidth=s,ka(e,this.faceLandmarks.getJawOutline()),ka(e,this.faceLandmarks.getLeftEyeBrow()),ka(e,this.faceLandmarks.getRightEyeBrow()),ka(e,this.faceLandmarks.getNose()),ka(e,this.faceLandmarks.getLeftEye(),!0),ka(e,this.faceLandmarks.getRightEye(),!0),ka(e,this.faceLandmarks.getMouth(),!0)),a){e.strokeStyle=d,e.fillStyle=d;var A=function(I){e.beginPath(),e.arc(I.x,I.y,l,0,2*Math.PI),e.fill()};this.faceLandmarks.positions.forEach(A)}},n}();function Ub(n,t){var e=Array.isArray(t)?t:[t];e.forEach(function(r){var i=r instanceof Ja?r:Fu(r)?r.landmarks:void 0;if(!i)throw new Error("drawFaceLandmarks - expected faceExpressions to be FaceLandmarks | WithFaceLandmarks<WithFaceDetection<{}>> or array thereof");new py(i).draw(n)})}function hy(n,t){var e=is(n,t),r=Nu(n,t);function i(s,u,l){var d=r(s,u,l+"/separable_conv0"),A=r(u,u,l+"/separable_conv1"),I=e(s,u,1,l+"/expansion_conv");return{separable_conv0:d,separable_conv1:A,expansion_conv:I}}function a(s,u){var l=r(s,s,u+"/separable_conv0"),d=r(s,s,u+"/separable_conv1"),A=r(s,s,u+"/separable_conv2");return{separable_conv0:l,separable_conv1:d,separable_conv2:A}}return{extractConvParams:e,extractSeparableConvParams:r,extractReductionBlockParams:i,extractMainBlockParams:a}}function vy(n,t){var e=[],r=$i(n),i=r.extractWeights,a=r.getRemainingWeights,s=hy(i,e),u=s.extractConvParams,l=s.extractSeparableConvParams,d=s.extractReductionBlockParams,A=s.extractMainBlockParams,I=u(3,32,3,"entry_flow/conv_in"),O=d(32,64,"entry_flow/reduction_block_0"),z=d(64,128,"entry_flow/reduction_block_1"),re={conv_in:I,reduction_block_0:O,reduction_block_1:z},oe={};go(t,0,1).forEach(function(Ae){oe["main_block_"+Ae]=A(128,"middle_flow/main_block_"+Ae)});var ae=d(128,256,"exit_flow/reduction_block"),se=l(256,512,"exit_flow/separable_conv"),be={reduction_block:ae,separable_conv:se};if(a().length!==0)throw new Error("weights remaing after extract: "+a().length);return{paramMappings:e,params:{entry_flow:re,middle_flow:oe,exit_flow:be}}}function my(n,t){var e=ha(n,t),r=ed(e),i=Mu(e);function a(u){var l=i(u+"/separable_conv0"),d=i(u+"/separable_conv1"),A=r(u+"/expansion_conv");return{separable_conv0:l,separable_conv1:d,expansion_conv:A}}function s(u){var l=i(u+"/separable_conv0"),d=i(u+"/separable_conv1"),A=i(u+"/separable_conv2");return{separable_conv0:l,separable_conv1:d,separable_conv2:A}}return{extractConvParams:r,extractSeparableConvParams:i,extractReductionBlockParams:a,extractMainBlockParams:s}}function gy(n,t){var e=[],r=my(n,e),i=r.extractConvParams,a=r.extractSeparableConvParams,s=r.extractReductionBlockParams,u=r.extractMainBlockParams,l=i("entry_flow/conv_in"),d=s("entry_flow/reduction_block_0"),A=s("entry_flow/reduction_block_1"),I={conv_in:l,reduction_block_0:d,reduction_block_1:A},O={};go(t,0,1).forEach(function(ae){O["main_block_"+ae]=u("middle_flow/main_block_"+ae)});var z=s("exit_flow/reduction_block"),re=a("exit_flow/separable_conv"),oe={reduction_block:z,separable_conv:re};return Yi(n,e),{params:{entry_flow:I,middle_flow:O,exit_flow:oe},paramMappings:e}}function sd(n,t,e){return Tr(Ei(n,t.filters,e,"same"),t.bias)}function Lu(n,t,e){e===void 0&&(e=!0);var r=e?wn(n):n;return r=bi(r,t.separable_conv0,[1,1]),r=bi(wn(r),t.separable_conv1,[1,1]),r=Vn(r,[3,3],[2,2],"same"),r=Tr(r,sd(n,t.expansion_conv,[2,2])),r}function yy(n,t){var e=bi(wn(n),t.separable_conv0,[1,1]);return e=bi(wn(e),t.separable_conv1,[1,1]),e=bi(wn(e),t.separable_conv2,[1,1]),e=Tr(e,n),e}var by=function(n){ur(t,n);function t(e){var r=n.call(this,"TinyXception")||this;return r._numMainBlocks=e,r}return t.prototype.forwardInput=function(e){var r=this,i=this.params;if(!i)throw new Error("TinyXception - load model before inference");return Ot(function(){var a=e.toBatchTensor(112,!0),s=[122.782,117.001,104.298],u=bo(a,s).div(kt(256)),l=wn(sd(u,i.entry_flow.conv_in,[2,2]));return l=Lu(l,i.entry_flow.reduction_block_0,!1),l=Lu(l,i.entry_flow.reduction_block_1),go(r._numMainBlocks,0,1).forEach(function(d){l=yy(l,i.middle_flow["main_block_"+d])}),l=Lu(l,i.exit_flow.reduction_block),l=wn(bi(l,i.exit_flow.separable_conv,[1,1])),l})},t.prototype.forward=function(e){return Gt(this,void 0,void 0,function(){var r;return Qt(this,function(i){switch(i.label){case 0:return r=this.forwardInput,[4,Hn(e)];case 1:return[2,r.apply(this,[i.sent()])]}})})},t.prototype.getDefaultModelName=function(){return"tiny_xception_model"},t.prototype.extractParamsFromWeigthMap=function(e){return gy(e,this._numMainBlocks)},t.prototype.extractParams=function(e){return vy(e,this._numMainBlocks)},t}(Ji);function wy(n){var t=[],e=$i(n),r=e.extractWeights,i=e.getRemainingWeights,a=Bu(r,t),s=a(512,1,"fc/age"),u=a(512,2,"fc/gender");if(i().length!==0)throw new Error("weights remaing after extract: "+i().length);return{paramMappings:t,params:{fc:{age:s,gender:u}}}}function Ay(n){var t=[],e=ha(n,t);function r(a){var s=e(a+"/weights",2),u=e(a+"/bias",1);return{weights:s,bias:u}}var i={fc:{age:r("fc/age"),gender:r("fc/gender")}};return Yi(n,t),{params:i,paramMappings:t}}var os;(function(n){n.FEMALE="female",n.MALE="male"})(os||(os={}));var xy=function(n){ur(t,n);function t(e){e===void 0&&(e=new by(2));var r=n.call(this,"AgeGenderNet")||this;return r._faceFeatureExtractor=e,r}return Object.defineProperty(t.prototype,"faceFeatureExtractor",{get:function(){return this._faceFeatureExtractor},enumerable:!0,configurable:!0}),t.prototype.runNet=function(e){var r=this,i=this.params;if(!i)throw new Error(this._name+" - load model before inference");return Ot(function(){var a=e instanceof rs?r.faceFeatureExtractor.forwardInput(e):e,s=po(a,[7,7],[2,2],"valid").as2D(a.shape[0],-1),u=Fi(s,i.fc.age).as1D(),l=Fi(s,i.fc.gender);return{age:u,gender:l}})},t.prototype.forwardInput=function(e){var r=this;return Ot(function(){var i=r.runNet(e),a=i.age,s=i.gender;return{age:a,gender:Gi(s)}})},t.prototype.forward=function(e){return Gt(this,void 0,void 0,function(){var r;return Qt(this,function(i){switch(i.label){case 0:return r=this.forwardInput,[4,Hn(e)];case 1:return[2,r.apply(this,[i.sent()])]}})})},t.prototype.predictAgeAndGender=function(e){return Gt(this,void 0,void 0,function(){var r,i,a,s,u,l,d=this;return Qt(this,function(A){switch(A.label){case 0:return[4,Hn(e)];case 1:return r=A.sent(),[4,this.forwardInput(r)];case 2:return i=A.sent(),a=Bn(i.age),s=Bn(i.gender),u=a.map(function(I,O){return{ageTensor:I,genderTensor:s[O]}}),[4,Promise.all(u.map(function(I){var O=I.ageTensor,z=I.genderTensor;return Gt(d,void 0,void 0,function(){var re,oe,ae,se,be;return Qt(this,function(Ae){switch(Ae.label){case 0:return[4,O.data()];case 1:return re=Ae.sent()[0],[4,z.data()];case 2:return oe=Ae.sent()[0],ae=oe>.5,se=ae?os.MALE:os.FEMALE,be=ae?oe:1-oe,O.dispose(),z.dispose(),[2,{age:re,gender:se,genderProbability:be}]}})})}))];case 3:return l=A.sent(),i.age.dispose(),i.gender.dispose(),[2,r.isBatchInput?l:l[0]]}})})},t.prototype.getDefaultModelName=function(){return"age_gender_model"},t.prototype.dispose=function(e){e===void 0&&(e=!0),this.faceFeatureExtractor.dispose(e),n.prototype.dispose.call(this,e)},t.prototype.loadClassifierParams=function(e){var r=this.extractClassifierParams(e),i=r.params,a=r.paramMappings;this._params=i,this._paramMappings=a},t.prototype.extractClassifierParams=function(e){return wy(e)},t.prototype.extractParamsFromWeigthMap=function(e){var r=nd(e),i=r.featureExtractorMap,a=r.classifierMap;return this.faceFeatureExtractor.loadFromWeightMap(i),Ay(a)},t.prototype.extractParams=function(e){var r=1539,i=e.slice(0,e.length-r),a=e.slice(e.length-r);return this.faceFeatureExtractor.extractWeights(i),this.extractClassifierParams(a)},t}(Ji),ud=function(n){ur(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.postProcess=function(e,r,i){var a=i.map(function(u){var l=u.width,d=u.height,A=r/Math.max(d,l);return{width:l*A,height:d*A}}),s=a.length;return Ot(function(){var u=function(O,z){return mi([Bi([68],O),Bi([68],z)],1).as2D(1,136).as1D()},l=function(O,z){var re=a[O],oe=re.width,ae=re.height;return z(oe,ae)?Math.abs(oe-ae)/2:0},d=function(O){return l(O,function(z,re){return z<re})},A=function(O){return l(O,function(z,re){return re<z})},I=e.mul(Bi([s,136],r)).sub(mi(Array.from(Array(s),function(O,z){return u(d(z),A(z))}))).div(mi(Array.from(Array(s),function(O,z){return u(a[z].width,a[z].height)})));return I})},t.prototype.forwardInput=function(e){var r=this;return Ot(function(){var i=r.runNet(e);return r.postProcess(i,e.inputSize,e.inputDimensions.map(function(a){var s=a[0],u=a[1];return{height:s,width:u}}))})},t.prototype.forward=function(e){return Gt(this,void 0,void 0,function(){var r;return Qt(this,function(i){switch(i.label){case 0:return r=this.forwardInput,[4,Hn(e)];case 1:return[2,r.apply(this,[i.sent()])]}})})},t.prototype.detectLandmarks=function(e){return Gt(this,void 0,void 0,function(){var r,i,a,s=this;return Qt(this,function(u){switch(u.label){case 0:return[4,Hn(e)];case 1:return r=u.sent(),i=Ot(function(){return Bn(s.forwardInput(r))}),[4,Promise.all(i.map(function(l,d){return Gt(s,void 0,void 0,function(){var A,I,O,z,re;return Qt(this,function(oe){switch(oe.label){case 0:return O=(I=Array).from,[4,l.data()];case 1:return A=O.apply(I,[oe.sent()]),z=A.filter(function(ae,se){return Bf(se)}),re=A.filter(function(ae,se){return!Bf(se)}),[2,new Ff(Array(68).fill(0).map(function(ae,se){return new Vr(z[se],re[se])}),{height:r.getInputHeight(d),width:r.getInputWidth(d)})]}})})}))];case 2:return a=u.sent(),i.forEach(function(l){return l.dispose()}),[2,r.isBatchInput?a:a[0]]}})})},t.prototype.getClassifierChannelsOut=function(){return 136},t}(id),ld=function(n){ur(t,n);function t(e){return e===void 0&&(e=new rd),n.call(this,"FaceLandmark68Net",e)||this}return t.prototype.getDefaultModelName=function(){return"face_landmark_68_model"},t.prototype.getClassifierChannelsIn=function(){return 256},t}(ud);function Ey(n){var t=[],e=td(n,t).extractDenseBlock3Params,r={dense0:e("dense0",!0),dense1:e("dense1"),dense2:e("dense2")};return Yi(n,t),{params:r,paramMappings:t}}function Cy(n){var t=[],e=$i(n),r=e.extractWeights,i=e.getRemainingWeights,a=qf(r,t).extractDenseBlock3Params,s=a(3,32,"dense0",!0),u=a(32,64,"dense1"),l=a(64,128,"dense2");if(i().length!==0)throw new Error("weights remaing after extract: "+i().length);return{paramMappings:t,params:{dense0:s,dense1:u,dense2:l}}}var Sy=function(n){ur(t,n);function t(){return n.call(this,"TinyFaceFeatureExtractor")||this}return t.prototype.forwardInput=function(e){var r=this.params;if(!r)throw new Error("TinyFaceFeatureExtractor - load model before inference");return Ot(function(){var i=e.toBatchTensor(112,!0),a=[122.782,117.001,104.298],s=bo(i,a).div(kt(255)),u=Pu(s,r.dense0,!0);return u=Pu(u,r.dense1),u=Pu(u,r.dense2),u=po(u,[14,14],[2,2],"valid"),u})},t.prototype.forward=function(e){return Gt(this,void 0,void 0,function(){var r;return Qt(this,function(i){switch(i.label){case 0:return r=this.forwardInput,[4,Hn(e)];case 1:return[2,r.apply(this,[i.sent()])]}})})},t.prototype.getDefaultModelName=function(){return"face_feature_extractor_tiny_model"},t.prototype.extractParamsFromWeigthMap=function(e){return Ey(e)},t.prototype.extractParams=function(e){return Cy(e)},t}(Ji),Iy=function(n){ur(t,n);function t(e){return e===void 0&&(e=new Sy),n.call(this,"FaceLandmark68TinyNet",e)||this}return t.prototype.getDefaultModelName=function(){return"face_landmark_68_tiny_model"},t.prototype.getClassifierChannelsIn=function(){return 128},t}(ud),Wb=function(n){ur(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t}(ld);function Ty(n,t){return Tr(ei(n,t.weights),t.biases)}function Uu(n,t,e,r,i){i===void 0&&(i="same");var a=t.conv,s=a.filters,u=a.bias,l=Ei(n,s,e,i);return l=Tr(l,u),l=Ty(l,t.scale),r?wn(l):l}function Ry(n,t){return Uu(n,t,[1,1],!0)}function cd(n,t){return Uu(n,t,[1,1],!1)}function fd(n,t){return Uu(n,t,[2,2],!0,"valid")}function Oy(n,t){function e(u,l,d){var A=n(u),I=A.length/(l*d*d);if(Ug(I))throw new Error("depth has to be an integer: "+I+", weights.length: "+A.length+", numFilters: "+l+", filterSize: "+d);return Ot(function(){return ua(li(A,[l,I,d,d]),[2,3,1,0])})}function r(u,l,d,A){var I=e(u,l,d),O=On(n(l));return t.push({paramPath:A+"/filters"},{paramPath:A+"/bias"}),{filters:I,bias:O}}function i(u,l){var d=On(n(u)),A=On(n(u));return t.push({paramPath:l+"/weights"},{paramPath:l+"/biases"}),{weights:d,biases:A}}function a(u,l,d,A){var I=r(u,l,d,A+"/conv"),O=i(l,A+"/scale");return{conv:I,scale:O}}function s(u,l,d,A,I){I===void 0&&(I=!1);var O=a((I?.5:1)*u,l,d,A+"/conv1"),z=a(u,l,d,A+"/conv2");return{conv1:O,conv2:z}}return{extractConvLayerParams:a,extractResidualLayerParams:s}}function ky(n){var t=$i(n),e=t.extractWeights,r=t.getRemainingWeights,i=[],a=Oy(e,i),s=a.extractConvLayerParams,u=a.extractResidualLayerParams,l=s(4704,32,7,"conv32_down"),d=u(9216,32,3,"conv32_1"),A=u(9216,32,3,"conv32_2"),I=u(9216,32,3,"conv32_3"),O=u(36864,64,3,"conv64_down",!0),z=u(36864,64,3,"conv64_1"),re=u(36864,64,3,"conv64_2"),oe=u(36864,64,3,"conv64_3"),ae=u(147456,128,3,"conv128_down",!0),se=u(147456,128,3,"conv128_1"),be=u(147456,128,3,"conv128_2"),Ae=u(589824,256,3,"conv256_down",!0),me=u(589824,256,3,"conv256_1"),Ce=u(589824,256,3,"conv256_2"),Oe=u(589824,256,3,"conv256_down_out"),Le=Ot(function(){return ua(oa(e(256*128),[128,256]),[1,0])});if(i.push({paramPath:"fc"}),r().length!==0)throw new Error("weights remaing after extract: "+r().length);var Ue={conv32_down:l,conv32_1:d,conv32_2:A,conv32_3:I,conv64_down:O,conv64_1:z,conv64_2:re,conv64_3:oe,conv128_down:ae,conv128_1:se,conv128_2:be,conv256_down:Ae,conv256_1:me,conv256_2:Ce,conv256_down_out:Oe,fc:Le};return{params:Ue,paramMappings:i}}function jy(n,t){var e=ha(n,t);function r(s){var u=e(s+"/scale/weights",1),l=e(s+"/scale/biases",1);return{weights:u,biases:l}}function i(s){var u=e(s+"/conv/filters",4),l=e(s+"/conv/bias",1),d=r(s);return{conv:{filters:u,bias:l},scale:d}}function a(s){return{conv1:i(s+"/conv1"),conv2:i(s+"/conv2")}}return{extractConvLayerParams:i,extractResidualLayerParams:a}}function Dy(n){var t=[],e=jy(n,t),r=e.extractConvLayerParams,i=e.extractResidualLayerParams,a=r("conv32_down"),s=i("conv32_1"),u=i("conv32_2"),l=i("conv32_3"),d=i("conv64_down"),A=i("conv64_1"),I=i("conv64_2"),O=i("conv64_3"),z=i("conv128_down"),re=i("conv128_1"),oe=i("conv128_2"),ae=i("conv256_down"),se=i("conv256_1"),be=i("conv256_2"),Ae=i("conv256_down_out"),me=n.fc;if(t.push({originalPath:"fc",paramPath:"fc"}),!Lg(me))throw new Error("expected weightMap[fc] to be a Tensor2D, instead have "+me);var Ce={conv32_down:a,conv32_1:s,conv32_2:u,conv32_3:l,conv64_down:d,conv64_1:A,conv64_2:I,conv64_3:O,conv128_down:z,conv128_1:re,conv128_2:oe,conv256_down:ae,conv256_1:se,conv256_2:be,conv256_down_out:Ae,fc:me};return Yi(n,t),{params:Ce,paramMappings:t}}function Li(n,t){var e=Ry(n,t.conv1);return e=cd(e,t.conv2),e=Tr(e,n),e=wn(e),e}function ss(n,t){var e=fd(n,t.conv1);e=cd(e,t.conv2);var r=po(n,2,2,"valid"),i=pn(r.shape),a=r.shape[3]!==e.shape[3],s=r.shape[1]!==e.shape[1]||r.shape[2]!==e.shape[2];if(s){var u=vo(e.shape);u[1]=1;var l=pn(u);e=Pn([e,l],1);var d=vo(e.shape);d[2]=1;var A=pn(d);e=Pn([e,A],2)}return r=a?Pn([r,i],3):r,e=Tr(r,e),e=wn(e),e}var Py=function(n){ur(t,n);function t(){return n.call(this,"FaceRecognitionNet")||this}return t.prototype.forwardInput=function(e){var r=this.params;if(!r)throw new Error("FaceRecognitionNet - load model before inference");return Ot(function(){var i=e.toBatchTensor(150,!0).toFloat(),a=[122.782,117.001,104.298],s=bo(i,a).div(kt(256)),u=fd(s,r.conv32_down);u=Vn(u,3,2,"valid"),u=Li(u,r.conv32_1),u=Li(u,r.conv32_2),u=Li(u,r.conv32_3),u=ss(u,r.conv64_down),u=Li(u,r.conv64_1),u=Li(u,r.conv64_2),u=Li(u,r.conv64_3),u=ss(u,r.conv128_down),u=Li(u,r.conv128_1),u=Li(u,r.conv128_2),u=ss(u,r.conv256_down),u=Li(u,r.conv256_1),u=Li(u,r.conv256_2),u=ss(u,r.conv256_down_out);var l=u.mean([1,2]),d=Go(l,r.fc);return d})},t.prototype.forward=function(e){return Gt(this,void 0,void 0,function(){var r;return Qt(this,function(i){switch(i.label){case 0:return r=this.forwardInput,[4,Hn(e)];case 1:return[2,r.apply(this,[i.sent()])]}})})},t.prototype.computeFaceDescriptor=function(e){return Gt(this,void 0,void 0,function(){var r,i,a,s=this;return Qt(this,function(u){switch(u.label){case 0:return[4,Hn(e)];case 1:return r=u.sent(),i=Ot(function(){return Bn(s.forwardInput(r))}),[4,Promise.all(i.map(function(l){return l.data()}))];case 2:return a=u.sent(),i.forEach(function(l){return l.dispose()}),[2,r.isBatchInput?a:a[0]]}})})},t.prototype.getDefaultModelName=function(){return"face_recognition_model"},t.prototype.extractParamsFromWeigthMap=function(e){return Dy(e)},t.prototype.extractParams=function(e){return ky(e)},t}(Ji);function zb(n){var t=new FaceRecognitionNet;return t.extractWeights(n),t}function Vb(n){return(n.gender===Gender.MALE||n.gender===Gender.FEMALE)&&isValidProbablitiy(n.genderProbability)}function dd(n,t,e){var r={gender:t,genderProbability:e};return Object.assign({},n,r)}var pd=function(){function n(t){var e=t===void 0?{}:t,r=e.minFaceSize,i=e.scaleFactor,a=e.maxNumScales,s=e.scoreThresholds,u=e.scaleSteps;if(this._name="MtcnnOptions",this._minFaceSize=r||20,this._scaleFactor=i||.709,this._maxNumScales=a||10,this._scoreThresholds=s||[.6,.7,.7],this._scaleSteps=u,typeof this._minFaceSize!="number"||this._minFaceSize<0)throw new Error(this._name+" - expected minFaceSize to be a number > 0");if(typeof this._scaleFactor!="number"||this._scaleFactor<=0||this._scaleFactor>=1)throw new Error(this._name+" - expected scaleFactor to be a number between 0 and 1");if(typeof this._maxNumScales!="number"||this._maxNumScales<0)throw new Error(this._name+" - expected maxNumScales to be a number > 0");if(!Array.isArray(this._scoreThresholds)||this._scoreThresholds.length!==3||this._scoreThresholds.some(function(l){return typeof l!="number"}))throw new Error(this._name+" - expected scoreThresholds to be an array of numbers of length 3");if(this._scaleSteps&&(!Array.isArray(this._scaleSteps)||this._scaleSteps.some(function(l){return typeof l!="number"})))throw new Error(this._name+" - expected scaleSteps to be an array of numbers")}return Object.defineProperty(n.prototype,"minFaceSize",{get:function(){return this._minFaceSize},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"scaleFactor",{get:function(){return this._scaleFactor},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"maxNumScales",{get:function(){return this._maxNumScales},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"scoreThresholds",{get:function(){return this._scoreThresholds},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"scaleSteps",{get:function(){return this._scaleSteps},enumerable:!0,configurable:!0}),n}();function By(n,t){function e(l,d){var A=li(n(9*l),[3,3,l,1]),I=On(n(l)),O=On(n(l)),z=On(n(l)),re=On(n(l));return t.push({paramPath:d+"/filters"},{paramPath:d+"/batch_norm_scale"},{paramPath:d+"/batch_norm_offset"},{paramPath:d+"/batch_norm_mean"},{paramPath:d+"/batch_norm_variance"}),{filters:A,batch_norm_scale:I,batch_norm_offset:O,batch_norm_mean:z,batch_norm_variance:re}}function r(l,d,A,I,O){var z=li(n(l*d*A*A),[A,A,l,d]),re=On(n(d));return t.push({paramPath:I+"/filters"},{paramPath:I+"/"+(O?"batch_norm_offset":"bias")}),{filters:z,bias:re}}function i(l,d,A,I){var O=r(l,d,A,I,!0),z=O.filters,re=O.bias;return{filters:z,batch_norm_offset:re}}function a(l,d,A){var I=e(l,A+"/depthwise_conv"),O=i(l,d,1,A+"/pointwise_conv");return{depthwise_conv:I,pointwise_conv:O}}function s(){var l=i(3,32,3,"mobilenetv1/conv_0"),d=a(32,64,"mobilenetv1/conv_1"),A=a(64,128,"mobilenetv1/conv_2"),I=a(128,128,"mobilenetv1/conv_3"),O=a(128,256,"mobilenetv1/conv_4"),z=a(256,256,"mobilenetv1/conv_5"),re=a(256,512,"mobilenetv1/conv_6"),oe=a(512,512,"mobilenetv1/conv_7"),ae=a(512,512,"mobilenetv1/conv_8"),se=a(512,512,"mobilenetv1/conv_9"),be=a(512,512,"mobilenetv1/conv_10"),Ae=a(512,512,"mobilenetv1/conv_11"),me=a(512,1024,"mobilenetv1/conv_12"),Ce=a(1024,1024,"mobilenetv1/conv_13");return{conv_0:l,conv_1:d,conv_2:A,conv_3:I,conv_4:O,conv_5:z,conv_6:re,conv_7:oe,conv_8:ae,conv_9:se,conv_10:be,conv_11:Ae,conv_12:me,conv_13:Ce}}function u(){var l=i(1024,256,1,"prediction_layer/conv_0"),d=i(256,512,3,"prediction_layer/conv_1"),A=i(512,128,1,"prediction_layer/conv_2"),I=i(128,256,3,"prediction_layer/conv_3"),O=i(256,128,1,"prediction_layer/conv_4"),z=i(128,256,3,"prediction_layer/conv_5"),re=i(256,64,1,"prediction_layer/conv_6"),oe=i(64,128,3,"prediction_layer/conv_7"),ae=r(512,12,1,"prediction_layer/box_predictor_0/box_encoding_predictor"),se=r(512,9,1,"prediction_layer/box_predictor_0/class_predictor"),be=r(1024,24,1,"prediction_layer/box_predictor_1/box_encoding_predictor"),Ae=r(1024,18,1,"prediction_layer/box_predictor_1/class_predictor"),me=r(512,24,1,"prediction_layer/box_predictor_2/box_encoding_predictor"),Ce=r(512,18,1,"prediction_layer/box_predictor_2/class_predictor"),Oe=r(256,24,1,"prediction_layer/box_predictor_3/box_encoding_predictor"),Le=r(256,18,1,"prediction_layer/box_predictor_3/class_predictor"),Ue=r(256,24,1,"prediction_layer/box_predictor_4/box_encoding_predictor"),Ne=r(256,18,1,"prediction_layer/box_predictor_4/class_predictor"),Fe=r(128,24,1,"prediction_layer/box_predictor_5/box_encoding_predictor"),Ze=r(128,18,1,"prediction_layer/box_predictor_5/class_predictor"),Ke={box_encoding_predictor:ae,class_predictor:se},et={box_encoding_predictor:be,class_predictor:Ae},tt={box_encoding_predictor:me,class_predictor:Ce},ct={box_encoding_predictor:Oe,class_predictor:Le},bt={box_encoding_predictor:Ue,class_predictor:Ne},gt={box_encoding_predictor:Fe,class_predictor:Ze};return{conv_0:l,conv_1:d,conv_2:A,conv_3:I,conv_4:O,conv_5:z,conv_6:re,conv_7:oe,box_predictor_0:Ke,box_predictor_1:et,box_predictor_2:tt,box_predictor_3:ct,box_predictor_4:bt,box_predictor_5:gt}}return{extractMobilenetV1Params:s,extractPredictionLayerParams:u}}function Ny(n){var t=[],e=$i(n),r=e.extractWeights,i=e.getRemainingWeights,a=By(r,t),s=a.extractMobilenetV1Params,u=a.extractPredictionLayerParams,l=s(),d=u(),A=hs(r(5118*4),[1,5118,4]),I={extra_dim:A};if(t.push({paramPath:"output_layer/extra_dim"}),i().length!==0)throw new Error("weights remaing after extract: "+i().length);return{params:{mobilenetv1:l,prediction_layer:d,output_layer:I},paramMappings:t}}function My(n,t){var e=ha(n,t);function r(d,A,I){var O=e(d+"/Conv2d_"+A+"_pointwise/weights",4,I+"/filters"),z=e(d+"/Conv2d_"+A+"_pointwise/convolution_bn_offset",1,I+"/batch_norm_offset");return{filters:O,batch_norm_offset:z}}function i(d){var A="mobilenetv1/conv_"+d,I="MobilenetV1/Conv2d_"+d+"_depthwise",O=A+"/depthwise_conv",z=A+"/pointwise_conv",re=e(I+"/depthwise_weights",4,O+"/filters"),oe=e(I+"/BatchNorm/gamma",1,O+"/batch_norm_scale"),ae=e(I+"/BatchNorm/beta",1,O+"/batch_norm_offset"),se=e(I+"/BatchNorm/moving_mean",1,O+"/batch_norm_mean"),be=e(I+"/BatchNorm/moving_variance",1,O+"/batch_norm_variance");return{depthwise_conv:{filters:re,batch_norm_scale:oe,batch_norm_offset:ae,batch_norm_mean:se,batch_norm_variance:be},pointwise_conv:r("MobilenetV1",d,z)}}function a(){return{conv_0:r("MobilenetV1",0,"mobilenetv1/conv_0"),conv_1:i(1),conv_2:i(2),conv_3:i(3),conv_4:i(4),conv_5:i(5),conv_6:i(6),conv_7:i(7),conv_8:i(8),conv_9:i(9),conv_10:i(10),conv_11:i(11),conv_12:i(12),conv_13:i(13)}}function s(d,A){var I=e(d+"/weights",4,A+"/filters"),O=e(d+"/biases",1,A+"/bias");return{filters:I,bias:O}}function u(d){var A=s("Prediction/BoxPredictor_"+d+"/BoxEncodingPredictor","prediction_layer/box_predictor_"+d+"/box_encoding_predictor"),I=s("Prediction/BoxPredictor_"+d+"/ClassPredictor","prediction_layer/box_predictor_"+d+"/class_predictor");return{box_encoding_predictor:A,class_predictor:I}}function l(){return{conv_0:r("Prediction",0,"prediction_layer/conv_0"),conv_1:r("Prediction",1,"prediction_layer/conv_1"),conv_2:r("Prediction",2,"prediction_layer/conv_2"),conv_3:r("Prediction",3,"prediction_layer/conv_3"),conv_4:r("Prediction",4,"prediction_layer/conv_4"),conv_5:r("Prediction",5,"prediction_layer/conv_5"),conv_6:r("Prediction",6,"prediction_layer/conv_6"),conv_7:r("Prediction",7,"prediction_layer/conv_7"),box_predictor_0:u(0),box_predictor_1:u(1),box_predictor_2:u(2),box_predictor_3:u(3),box_predictor_4:u(4),box_predictor_5:u(5)}}return{extractMobilenetV1Params:a,extractPredictionLayerParams:l}}function _y(n){var t=[],e=My(n,t),r=e.extractMobilenetV1Params,i=e.extractPredictionLayerParams,a=n["Output/extra_dim"];if(t.push({originalPath:"Output/extra_dim",paramPath:"output_layer/extra_dim"}),!$o(a))throw new Error("expected weightMap['Output/extra_dim'] to be a Tensor3D, instead have "+a);var s={mobilenetv1:r(),prediction_layer:i(),output_layer:{extra_dim:a}};return Yi(n,t),{params:s,paramMappings:t}}function Ui(n,t,e){return Ot(function(){var r=Ei(n,t.filters,e,"same");return r=Tr(r,t.batch_norm_offset),Us(r,0,6)})}var Fy=.0010000000474974513;function Ly(n,t,e){return Ot(function(){var r=Ho(n,t.filters,e,"same");return r=Oc(r,t.batch_norm_mean,t.batch_norm_variance,t.batch_norm_offset,t.batch_norm_scale,Fy),Us(r,0,6)})}function Uy(n){return[2,4,6,12].some(function(t){return t===n})?[2,2]:[1,1]}function Wy(n,t){return Ot(function(){var e=null,r=Ui(n,t.conv_0,[2,2]),i=[t.conv_1,t.conv_2,t.conv_3,t.conv_4,t.conv_5,t.conv_6,t.conv_7,t.conv_8,t.conv_9,t.conv_10,t.conv_11,t.conv_12,t.conv_13];if(i.forEach(function(a,s){var u=s+1,l=Uy(u);r=Ly(r,a.depthwise_conv,l),r=Ui(r,a.pointwise_conv,[1,1]),u===11&&(e=r)}),e===null)throw new Error("mobileNetV1 - output of conv layer 11 is null");return{out:r,conv11:e}})}function zy(n,t,e,r,i){var a=n.shape[0],s=Math.min(e,a),u=t.map(function(A,I){return{score:A,boxIndex:I}}).filter(function(A){return A.score>i}).sort(function(A,I){return I.score-A.score}),l=function(A){return A<=r?1:0},d=[];return u.forEach(function(A){if(!(d.length>=s)){for(var I=A.score,O=d.length-1;O>=0;--O){var z=Vy(n,A.boxIndex,d[O]);if(z!==0&&(A.score*=l(z),A.score<=i))break}I===A.score&&d.push(A.boxIndex)}}),d}function Vy(n,t,e){var r=n.arraySync(),i=Math.min(r[t][0],r[t][2]),a=Math.min(r[t][1],r[t][3]),s=Math.max(r[t][0],r[t][2]),u=Math.max(r[t][1],r[t][3]),l=Math.min(r[e][0],r[e][2]),d=Math.min(r[e][1],r[e][3]),A=Math.max(r[e][0],r[e][2]),I=Math.max(r[e][1],r[e][3]),O=(s-i)*(u-a),z=(A-l)*(I-d);if(O<=0||z<=0)return 0;var re=Math.max(i,l),oe=Math.max(a,d),ae=Math.min(s,A),se=Math.min(u,I),be=Math.max(ae-re,0)*Math.max(se-oe,0);return be/(O+z-be)}function Hy(n){var t=Bn(ua(n,[1,0])),e=[Nn(t[2],t[0]),Nn(t[3],t[1])],r=[Tr(t[0],ki(e[0],kt(2))),Tr(t[1],ki(e[1],kt(2)))];return{sizes:e,centers:r}}function Gy(n,t){var e=Hy(n),r=e.sizes,i=e.centers,a=Bn(ua(t,[1,0])),s=ki(ei(Ws(ki(a[2],kt(5))),r[0]),kt(2)),u=Tr(ei(ki(a[0],kt(10)),r[0]),i[0]),l=ki(ei(Ws(ki(a[3],kt(5))),r[1]),kt(2)),d=Tr(ei(ki(a[1],kt(10)),r[1]),i[1]);return ua(mi([Nn(u,s),Nn(d,l),Tr(u,s),Tr(d,l)]),[1,0])}function Qy(n,t,e){return Ot(function(){var r=n.shape[0],i=Gy(Ri(_a(e.extra_dim,[r,1,1]),[-1,4]),Ri(n,[-1,4]));i=Ri(i,[r,i.shape[0]/r,4]);var a=Sc(Ni(t,[0,0,1],[-1,-1,-1])),s=Ni(a,[0,0,0],[-1,-1,1]);s=Ri(s,[r,s.shape[1]]);var u=Bn(i),l=Bn(s);return{boxes:u,scores:l}})}function Ya(n,t){return Ot(function(){var e=n.shape[0],r=Ri(ji(n,t.box_encoding_predictor),[e,-1,1,4]),i=Ri(ji(n,t.class_predictor),[e,-1,3]);return{boxPredictionEncoding:r,classPrediction:i}})}function Xy(n,t,e){return Ot(function(){var r=Ui(n,e.conv_0,[1,1]),i=Ui(r,e.conv_1,[2,2]),a=Ui(i,e.conv_2,[1,1]),s=Ui(a,e.conv_3,[2,2]),u=Ui(s,e.conv_4,[1,1]),l=Ui(u,e.conv_5,[2,2]),d=Ui(l,e.conv_6,[1,1]),A=Ui(d,e.conv_7,[2,2]),I=Ya(t,e.box_predictor_0),O=Ya(n,e.box_predictor_1),z=Ya(i,e.box_predictor_2),re=Ya(s,e.box_predictor_3),oe=Ya(l,e.box_predictor_4),ae=Ya(A,e.box_predictor_5),se=Pn([I.boxPredictionEncoding,O.boxPredictionEncoding,z.boxPredictionEncoding,re.boxPredictionEncoding,oe.boxPredictionEncoding,ae.boxPredictionEncoding],1),be=Pn([I.classPrediction,O.classPrediction,z.classPrediction,re.classPrediction,oe.classPrediction,ae.classPrediction],1);return{boxPredictions:se,classPredictions:be}})}var us=function(){function n(t){var e=t===void 0?{}:t,r=e.minConfidence,i=e.maxResults;if(this._name="SsdMobilenetv1Options",this._minConfidence=r||.5,this._maxResults=i||100,typeof this._minConfidence!="number"||this._minConfidence<=0||this._minConfidence>=1)throw new Error(this._name+" - expected minConfidence to be a number between 0 and 1");if(typeof this._maxResults!="number")throw new Error(this._name+" - expected maxResults to be a number")}return Object.defineProperty(n.prototype,"minConfidence",{get:function(){return this._minConfidence},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"maxResults",{get:function(){return this._maxResults},enumerable:!0,configurable:!0}),n}(),hd=function(n){ur(t,n);function t(){return n.call(this,"SsdMobilenetv1")||this}return t.prototype.forwardInput=function(e){var r=this.params;if(!r)throw new Error("SsdMobilenetv1 - load model before inference");return Ot(function(){var i=e.toBatchTensor(512,!1).toFloat(),a=Nn(ei(i,kt(.007843137718737125)),kt(1)),s=Wy(a,r.mobilenetv1),u=Xy(s.out,s.conv11,r.prediction_layer),l=u.boxPredictions,d=u.classPredictions;return Qy(l,d,r.output_layer)})},t.prototype.forward=function(e){return Gt(this,void 0,void 0,function(){var r;return Qt(this,function(i){switch(i.label){case 0:return r=this.forwardInput,[4,Hn(e)];case 1:return[2,r.apply(this,[i.sent()])]}})})},t.prototype.locateFaces=function(e,r){return r===void 0&&(r={}),Gt(this,void 0,void 0,function(){var i,a,s,u,l,d,A,I,O,z,re,oe,ae,se,be,Ae,me,Ce,Oe,Le,Ue;return Qt(this,function(Ne){switch(Ne.label){case 0:return i=new us(r),a=i.maxResults,s=i.minConfidence,[4,Hn(e)];case 1:for(u=Ne.sent(),l=this.forwardInput(u),d=l.boxes,A=l.scores,I=d[0],O=A[0],z=1;z<d.length;z++)d[z].dispose(),A[z].dispose();return ae=(oe=Array).from,[4,O.data()];case 2:return re=ae.apply(oe,[Ne.sent()]),se=.5,be=zy(I,re,a,se,s),Ae=u.getReshapedInputDimensions(0),me=u.inputSize,Ce=me/Ae.width,Oe=me/Ae.height,Le=I.arraySync(),Ue=be.map(function(Fe){var Ze=[Math.max(0,Le[Fe][0]),Math.min(1,Le[Fe][2])].map(function(gt){return gt*Oe}),Ke=Ze[0],et=Ze[1],tt=[Math.max(0,Le[Fe][1]),Math.min(1,Le[Fe][3])].map(function(gt){return gt*Ce}),ct=tt[0],bt=tt[1];return new yi(re[Fe],new Su(ct,Ke,bt-ct,et-Ke),{height:u.getInputHeight(0),width:u.getInputWidth(0)})}),I.dispose(),O.dispose(),[2,Ue]}})})},t.prototype.getDefaultModelName=function(){return"ssd_mobilenetv1_model"},t.prototype.extractParamsFromWeigthMap=function(e){return _y(e)},t.prototype.extractParams=function(e){return Ny(e)},t}(Ji);function Ky(n){var t=new SsdMobilenetv1;return t.extractWeights(n),t}function Hb(n){return Ky(n)}var Gb=function(n){ur(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t}(hd),Zy=.4,Jy=[new Vr(.738768,.874946),new Vr(2.42204,2.65704),new Vr(4.30971,7.04493),new Vr(10.246,4.59428),new Vr(12.6868,11.8741)],Yy=[new Vr(1.603231,2.094468),new Vr(6.041143,7.080126),new Vr(2.882459,3.518061),new Vr(4.266906,5.178857),new Vr(9.041765,10.66308)],$y=[117.001,114.697,97.404],qy="tiny_yolov2_model",e0="tiny_yolov2_separable_conv_model",ls=function(n){return typeof n=="number"};function t0(n){if(!n)throw new Error("invalid config: "+n);if(typeof n.withSeparableConvs!="boolean")throw new Error("config.withSeparableConvs has to be a boolean, have: "+n.withSeparableConvs);if(!ls(n.iouThreshold)||n.iouThreshold<0||n.iouThreshold>1)throw new Error("config.iouThreshold has to be a number between [0, 1], have: "+n.iouThreshold);if(!Array.isArray(n.classes)||!n.classes.length||!n.classes.every(function(t){return typeof t=="string"}))throw new Error("config.classes has to be an array class names: string[], have: "+JSON.stringify(n.classes));if(!Array.isArray(n.anchors)||!n.anchors.length||!n.anchors.map(function(t){return t||{}}).every(function(t){return ls(t.x)&&ls(t.y)}))throw new Error("config.anchors has to be an array of { x: number, y: number }, have: "+JSON.stringify(n.anchors));if(n.meanRgb&&(!Array.isArray(n.meanRgb)||n.meanRgb.length!==3||!n.meanRgb.every(ls)))throw new Error("config.meanRgb has to be an array of shape [number, number, number], have: "+JSON.stringify(n.meanRgb))}function Wu(n){return Ot(function(){var t=ei(n,kt(.10000000149011612));return Tr(wn(Nn(n,t)),t)})}function va(n,t){return Ot(function(){var e=xa(n,[[0,0],[1,1],[1,1],[0,0]]);return e=Ei(e,t.conv.filters,[1,1],"valid"),e=Nn(e,t.bn.sub),e=ei(e,t.bn.truediv),e=Tr(e,t.conv.bias),Wu(e)})}function ma(n,t){return Ot(function(){var e=xa(n,[[0,0],[1,1],[1,1],[0,0]]);return e=Qs(e,t.depthwise_filter,t.pointwise_filter,[1,1],"valid"),e=Tr(e,t.bias),Wu(e)})}function r0(n,t){var e=is(n,t);function r(s,u){var l=On(n(s)),d=On(n(s));return t.push({paramPath:u+"/sub"},{paramPath:u+"/truediv"}),{sub:l,truediv:d}}function i(s,u,l){var d=e(s,u,3,l+"/conv"),A=r(u,l+"/bn");return{conv:d,bn:A}}var a=Nu(n,t);return{extractConvParams:e,extractConvWithBatchNormParams:i,extractSeparableConvParams:a}}function n0(n,t,e,r){var i=$i(n),a=i.extractWeights,s=i.getRemainingWeights,u=[],l=r0(a,u),d=l.extractConvParams,A=l.extractConvWithBatchNormParams,I=l.extractSeparableConvParams,O;if(t.withSeparableConvs){var z=r[0],re=r[1],oe=r[2],ae=r[3],se=r[4],be=r[5],Ae=r[6],me=r[7],Ce=r[8],Oe=t.isFirstLayerConv2d?d(z,re,3,"conv0"):I(z,re,"conv0"),Le=I(re,oe,"conv1"),Ue=I(oe,ae,"conv2"),Ne=I(ae,se,"conv3"),Fe=I(se,be,"conv4"),Ze=I(be,Ae,"conv5"),Ke=me?I(Ae,me,"conv6"):void 0,et=Ce?I(me,Ce,"conv7"):void 0,tt=d(Ce||me||Ae,5*e,1,"conv8");O={conv0:Oe,conv1:Le,conv2:Ue,conv3:Ne,conv4:Fe,conv5:Ze,conv6:Ke,conv7:et,conv8:tt}}else{var z=r[0],re=r[1],oe=r[2],ae=r[3],se=r[4],be=r[5],Ae=r[6],me=r[7],Ce=r[8],Oe=A(z,re,"conv0"),Le=A(re,oe,"conv1"),Ue=A(oe,ae,"conv2"),Ne=A(ae,se,"conv3"),Fe=A(se,be,"conv4"),Ze=A(be,Ae,"conv5"),Ke=A(Ae,me,"conv6"),et=A(me,Ce,"conv7"),tt=d(Ce,5*e,1,"conv8");O={conv0:Oe,conv1:Le,conv2:Ue,conv3:Ne,conv4:Fe,conv5:Ze,conv6:Ke,conv7:et,conv8:tt}}if(s().length!==0)throw new Error("weights remaing after extract: "+s().length);return{params:O,paramMappings:u}}function i0(n,t){var e=ha(n,t);function r(u){var l=e(u+"/sub",1),d=e(u+"/truediv",1);return{sub:l,truediv:d}}function i(u){var l=e(u+"/filters",4),d=e(u+"/bias",1);return{filters:l,bias:d}}function a(u){var l=i(u+"/conv"),d=r(u+"/bn");return{conv:l,bn:d}}var s=Mu(e);return{extractConvParams:i,extractConvWithBatchNormParams:a,extractSeparableConvParams:s}}function a0(n,t){var e=[],r=i0(n,e),i=r.extractConvParams,a=r.extractConvWithBatchNormParams,s=r.extractSeparableConvParams,u;if(t.withSeparableConvs){var l=t.filterSizes&&t.filterSizes.length||9;u={conv0:t.isFirstLayerConv2d?i("conv0"):s("conv0"),conv1:s("conv1"),conv2:s("conv2"),conv3:s("conv3"),conv4:s("conv4"),conv5:s("conv5"),conv6:l>7?s("conv6"):void 0,conv7:l>8?s("conv7"):void 0,conv8:i("conv8")}}else u={conv0:a("conv0"),conv1:a("conv1"),conv2:a("conv2"),conv3:a("conv3"),conv4:a("conv4"),conv5:a("conv5"),conv6:a("conv6"),conv7:a("conv7"),conv8:i("conv8")};return Yi(n,e),{params:u,paramMappings:e}}var vd;(function(n){n[n.XS=224]="XS",n[n.SM=320]="SM",n[n.MD=416]="MD",n[n.LG=608]="LG"})(vd||(vd={}));var zu=function(){function n(t){var e=t===void 0?{}:t,r=e.inputSize,i=e.scoreThreshold;if(this._name="TinyYolov2Options",this._inputSize=r||416,this._scoreThreshold=i||.5,typeof this._inputSize!="number"||this._inputSize%32!==0)throw new Error(this._name+" - expected inputSize to be a number divisible by 32");if(typeof this._scoreThreshold!="number"||this._scoreThreshold<=0||this._scoreThreshold>=1)throw new Error(this._name+" - expected scoreThreshold to be a number between 0 and 1")}return Object.defineProperty(n.prototype,"inputSize",{get:function(){return this._inputSize},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"scoreThreshold",{get:function(){return this._scoreThreshold},enumerable:!0,configurable:!0}),n}(),md=function(n){ur(t,n);function t(e){var r=n.call(this,"TinyYolov2")||this;return t0(e),r._config=e,r}return Object.defineProperty(t.prototype,"config",{get:function(){return this._config},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"withClassScores",{get:function(){return this.config.withClassScores||this.config.classes.length>1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"boxEncodingSize",{get:function(){return 5+(this.withClassScores?this.config.classes.length:0)},enumerable:!0,configurable:!0}),t.prototype.runTinyYolov2=function(e,r){var i=va(e,r.conv0);return i=Vn(i,[2,2],[2,2],"same"),i=va(i,r.conv1),i=Vn(i,[2,2],[2,2],"same"),i=va(i,r.conv2),i=Vn(i,[2,2],[2,2],"same"),i=va(i,r.conv3),i=Vn(i,[2,2],[2,2],"same"),i=va(i,r.conv4),i=Vn(i,[2,2],[2,2],"same"),i=va(i,r.conv5),i=Vn(i,[2,2],[1,1],"same"),i=va(i,r.conv6),i=va(i,r.conv7),ji(i,r.conv8,"valid",!1)},t.prototype.runMobilenet=function(e,r){var i=this.config.isFirstLayerConv2d?Wu(ji(e,r.conv0,"valid",!1)):ma(e,r.conv0);return i=Vn(i,[2,2],[2,2],"same"),i=ma(i,r.conv1),i=Vn(i,[2,2],[2,2],"same"),i=ma(i,r.conv2),i=Vn(i,[2,2],[2,2],"same"),i=ma(i,r.conv3),i=Vn(i,[2,2],[2,2],"same"),i=ma(i,r.conv4),i=Vn(i,[2,2],[2,2],"same"),i=ma(i,r.conv5),i=Vn(i,[2,2],[1,1],"same"),i=r.conv6?ma(i,r.conv6):i,i=r.conv7?ma(i,r.conv7):i,ji(i,r.conv8,"valid",!1)},t.prototype.forwardInput=function(e,r){var i=this,a=this.params;if(!a)throw new Error("TinyYolov2 - load model before inference");return Ot(function(){var s=e.toBatchTensor(r,!1).toFloat();return s=i.config.meanRgb?bo(s,i.config.meanRgb):s,s=s.div(kt(256)),i.config.withSeparableConvs?i.runMobilenet(s,a):i.runTinyYolov2(s,a)})},t.prototype.forward=function(e,r){return Gt(this,void 0,void 0,function(){var i;return Qt(this,function(a){switch(a.label){case 0:return i=this.forwardInput,[4,Hn(e)];case 1:return[4,i.apply(this,[a.sent(),r])];case 2:return[2,a.sent()]}})})},t.prototype.detect=function(e,r){return r===void 0&&(r={}),Gt(this,void 0,void 0,function(){var i,a,s,u,l,d,A,I,O,z,re,oe,ae,se,be=this;return Qt(this,function(Ae){switch(Ae.label){case 0:return i=new zu(r),a=i.inputSize,s=i.scoreThreshold,[4,Hn(e)];case 1:return u=Ae.sent(),[4,this.forwardInput(u,a)];case 2:return l=Ae.sent(),d=Ot(function(){return Bn(l)[0].expandDims()}),A={width:u.getInputWidth(0),height:u.getInputHeight(0)},[4,this.extractBoxes(d,u.getReshapedInputDimensions(0),s)];case 3:return I=Ae.sent(),l.dispose(),d.dispose(),O=I.map(function(me){return me.box}),z=I.map(function(me){return me.score}),re=I.map(function(me){return me.classScore}),oe=I.map(function(me){return be.config.classes[me.label]}),ae=yo(O.map(function(me){return me.rescale(a)}),z,this.config.iouThreshold,!0),se=ae.map(function(me){return new _f(z[me],re[me],oe[me],O[me],A)}),[2,se]}})})},t.prototype.getDefaultModelName=function(){return""},t.prototype.extractParamsFromWeigthMap=function(e){return a0(e,this.config)},t.prototype.extractParams=function(e){var r=this.config.filterSizes||t.DEFAULT_FILTER_SIZES,i=r?r.length:void 0;if(i!==7&&i!==8&&i!==9)throw new Error("TinyYolov2 - expected 7 | 8 | 9 convolutional filters, but found "+i+" filterSizes in config");return n0(e,this.config,this.boxEncodingSize,r)},t.prototype.extractBoxes=function(e,r,i){return Gt(this,void 0,void 0,function(){var a,s,u,l,d,A,I,O,z,re,oe,ae,se,be,Ae,me,Ce,Oe,Le,Ue,Ne,Fe,Ze,Ke,et,tt,ct,bt,gt,vt=this;return Qt(this,function(At){switch(At.label){case 0:return a=r.width,s=r.height,u=Math.max(a,s),l=u/a,d=u/s,A=e.shape[1],I=this.config.anchors.length,O=Ot(function(){var ft=e.reshape([A,A,I,vt.boxEncodingSize]),Et=ft.slice([0,0,0,0],[A,A,I,4]),It=ft.slice([0,0,0,4],[A,A,I,1]),Vt=vt.withClassScores?Gi(ft.slice([0,0,0,5],[A,A,I,vt.config.classes.length]),3):kt(0);return[Et,It,Vt]}),z=O[0],re=O[1],oe=O[2],ae=[],[4,re.array()];case 1:return se=At.sent(),[4,z.array()];case 2:be=At.sent(),Ae=0,At.label=3;case 3:if(!(Ae<A))return[3,12];me=0,At.label=4;case 4:if(!(me<A))return[3,11];Ce=0,At.label=5;case 5:return Ce<I?(Oe=Cu(se[Ae][me][Ce][0]),!i||Oe>i?(Le=(me+Cu(be[Ae][me][Ce][0]))/A*l,Ue=(Ae+Cu(be[Ae][me][Ce][1]))/A*d,Ne=Math.exp(be[Ae][me][Ce][2])*this.config.anchors[Ce].x/A*l,Fe=Math.exp(be[Ae][me][Ce][3])*this.config.anchors[Ce].y/A*d,Ze=Le-Ne/2,Ke=Ue-Fe/2,et={row:Ae,col:me,anchor:Ce},this.withClassScores?[4,this.extractPredictedClass(oe,et)]:[3,7]):[3,9]):[3,10];case 6:return gt=At.sent(),[3,8];case 7:gt={classScore:1,label:0},At.label=8;case 8:tt=gt,ct=tt.classScore,bt=tt.label,ae.push(ri({box:new qo(Ze,Ke,Ze+Ne,Ke+Fe),score:Oe,classScore:Oe*ct,label:bt},et)),At.label=9;case 9:return Ce++,[3,5];case 10:return me++,[3,4];case 11:return Ae++,[3,3];case 12:return z.dispose(),re.dispose(),oe.dispose(),[2,ae]}})})},t.prototype.extractPredictedClass=function(e,r){return Gt(this,void 0,void 0,function(){var i,a,s,u;return Qt(this,function(l){switch(l.label){case 0:return i=r.row,a=r.col,s=r.anchor,[4,e.array()];case 1:return u=l.sent(),[2,Array(this.config.classes.length).fill(0).map(function(d,A){return u[i][a][s][A]}).map(function(d,A){return{classScore:d,label:A}}).reduce(function(d,A){return d.classScore>A.classScore?d:A})]}})})},t.DEFAULT_FILTER_SIZES=[3,16,32,64,128,256,512,1024,1024],t}(Ji),o0=function(n){ur(t,n);function t(e){e===void 0&&(e=!0);var r=this,i=Object.assign({},{withSeparableConvs:e,iouThreshold:Zy,classes:["face"]},e?{anchors:Yy,meanRgb:$y}:{anchors:Jy,withClassScores:!0});return r=n.call(this,i)||this,r}return Object.defineProperty(t.prototype,"withSeparableConvs",{get:function(){return this.config.withSeparableConvs},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"anchors",{get:function(){return this.config.anchors},enumerable:!0,configurable:!0}),t.prototype.locateFaces=function(e,r){return Gt(this,void 0,void 0,function(){var i;return Qt(this,function(a){switch(a.label){case 0:return[4,this.detect(e,r)];case 1:return i=a.sent(),[2,i.map(function(s){return new yi(s.score,s.relativeBox,{width:s.imageWidth,height:s.imageHeight})})]}})})},t.prototype.getDefaultModelName=function(){return this.withSeparableConvs?e0:qy},t.prototype.extractParamsFromWeigthMap=function(e){return n.prototype.extractParamsFromWeigthMap.call(this,e)},t}(md);function Qb(n,t){t===void 0&&(t=!0);var e=new TinyYolov2(t);return e.extractWeights(n),e}var gd=function(n){ur(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e._name="TinyFaceDetectorOptions",e}return t}(zu),xo=function(){function n(){}return n.prototype.then=function(t){return Gt(this,void 0,void 0,function(){var e;return Qt(this,function(r){switch(r.label){case 0:return e=t,[4,this.run()];case 1:return[2,e.apply(void 0,[r.sent()])]}})})},n.prototype.run=function(){return Gt(this,void 0,void 0,function(){return Qt(this,function(t){throw new Error("ComposableTask - run is not implemented")})})},n}();function yd(n,t){var e={descriptor:t};return Object.assign({},n,e)}function cs(n,t,e,r,i){return i===void 0&&(i=function(a){var s=a.alignedRect;return s}),Gt(this,void 0,void 0,function(){var a,s,u,l,d;return Qt(this,function(A){switch(A.label){case 0:return a=n.map(function(I){return Fu(I)?i(I):I.detection}),u=r,u?[3,5]:t instanceof Ft?[4,Du(t,a)]:[3,2];case 1:return l=A.sent(),[3,4];case 2:return[4,ju(t,a)];case 3:l=A.sent(),A.label=4;case 4:u=l,A.label=5;case 5:return s=u,[4,e(s)];case 6:return d=A.sent(),s.forEach(function(I){return I instanceof Ft&&I.dispose()}),[2,d]}})})}function Vu(n,t,e,r,i){return Gt(this,void 0,void 0,function(){var a=this;return Qt(this,function(s){return[2,cs([n],t,function(u){return Gt(a,void 0,void 0,function(){return Qt(this,function(l){return[2,e(u[0])]})})},r,i)]})})}function s0(n){return Ot(function(){return mi(Bn(n,3).reverse(),3)})}var fs=2,ds=12;function u0(n,t){var e=is(n,t),r=Bu(n,t);function i(d,A){var I=On(n(d));return t.push({paramPath:A}),I}function a(d,A,I){I===void 0&&(I=!1);var O=e(d[0],d[1],3,A+"/conv1"),z=i(d[1],A+"/prelu1_alpha"),re=e(d[1],d[2],3,A+"/conv2"),oe=i(d[2],A+"/prelu2_alpha"),ae=e(d[2],d[3],I?2:3,A+"/conv3"),se=i(d[3],A+"/prelu3_alpha");return{conv1:O,prelu1_alpha:z,conv2:re,prelu2_alpha:oe,conv3:ae,prelu3_alpha:se}}function s(){var d=a([3,10,16,32],"pnet"),A=e(32,2,1,"pnet/conv4_1"),I=e(32,4,1,"pnet/conv4_2");return ri(ri({},d),{conv4_1:A,conv4_2:I})}function u(){var d=a([3,28,48,64],"rnet",!0),A=r(576,128,"rnet/fc1"),I=i(128,"rnet/prelu4_alpha"),O=r(128,2,"rnet/fc2_1"),z=r(128,4,"rnet/fc2_2");return ri(ri({},d),{fc1:A,prelu4_alpha:I,fc2_1:O,fc2_2:z})}function l(){var d=a([3,32,64,64],"onet"),A=e(64,128,2,"onet/conv4"),I=i(128,"onet/prelu4_alpha"),O=r(1152,256,"onet/fc1"),z=i(256,"onet/prelu5_alpha"),re=r(256,2,"onet/fc2_1"),oe=r(256,4,"onet/fc2_2"),ae=r(256,10,"onet/fc2_3");return ri(ri({},d),{conv4:A,prelu4_alpha:I,fc1:O,prelu5_alpha:z,fc2_1:re,fc2_2:oe,fc2_3:ae})}return{extractPNetParams:s,extractRNetParams:u,extractONetParams:l}}function l0(n){var t=$i(n),e=t.extractWeights,r=t.getRemainingWeights,i=[],a=u0(e,i),s=a.extractPNetParams,u=a.extractRNetParams,l=a.extractONetParams,d=s(),A=u(),I=l();if(r().length!==0)throw new Error("weights remaing after extract: "+r().length);return{params:{pnet:d,rnet:A,onet:I},paramMappings:i}}function c0(n,t){var e=ha(n,t);function r(A){var I=e(A+"/weights",4,A+"/filters"),O=e(A+"/bias",1);return{filters:I,bias:O}}function i(A){var I=e(A+"/weights",2),O=e(A+"/bias",1);return{weights:I,bias:O}}function a(A){return e(A,1)}function s(A){var I=r(A+"/conv1"),O=a(A+"/prelu1_alpha"),z=r(A+"/conv2"),re=a(A+"/prelu2_alpha"),oe=r(A+"/conv3"),ae=a(A+"/prelu3_alpha");return{conv1:I,prelu1_alpha:O,conv2:z,prelu2_alpha:re,conv3:oe,prelu3_alpha:ae}}function u(){var A=s("pnet"),I=r("pnet/conv4_1"),O=r("pnet/conv4_2");return ri(ri({},A),{conv4_1:I,conv4_2:O})}function l(){var A=s("rnet"),I=i("rnet/fc1"),O=a("rnet/prelu4_alpha"),z=i("rnet/fc2_1"),re=i("rnet/fc2_2");return ri(ri({},A),{fc1:I,prelu4_alpha:O,fc2_1:z,fc2_2:re})}function d(){var A=s("onet"),I=r("onet/conv4"),O=a("onet/prelu4_alpha"),z=i("onet/fc1"),re=a("onet/prelu5_alpha"),oe=i("onet/fc2_1"),ae=i("onet/fc2_2"),se=i("onet/fc2_3");return ri(ri({},A),{conv4:I,prelu4_alpha:O,fc1:z,prelu5_alpha:re,fc2_1:oe,fc2_2:ae,fc2_3:se})}return{extractPNetParams:u,extractRNetParams:l,extractONetParams:d}}function f0(n){var t=[],e=c0(n,t),r=e.extractPNetParams,i=e.extractRNetParams,a=e.extractONetParams,s=r(),u=i(),l=a();return Yi(n,t),{params:{pnet:s,rnet:u,onet:l},paramMappings:t}}function Hu(n,t){var e=t[0],r=t[1];return{height:Math.floor(e*n),width:Math.floor(r*n)}}function d0(n,t,e){for(var r=e[0],i=e[1],a=ds/n,s=[],u=Math.min(r,i)*a,l=0;u>=12;)s.push(a*Math.pow(t,l)),u=u*t,l+=1;return s}var Gu=function(n){ur(t,n);function t(e,r,i,a){return n.call(this,{left:e,top:r,right:i,bottom:a},!0)||this}return t}(Mi);function bd(n){return Ot(function(){return ei(Nn(n,kt(127.5)),kt(.0078125))})}function $a(n,t){return Ot(function(){return Tr(wn(n),ei(t,Lo(wn(Lo(n)))))})}function Qu(n,t,e){return e===void 0&&(e=!1),Ot(function(){var r=ji(n,t.conv1,"valid");return r=$a(r,t.prelu1_alpha),r=Vn(r,e?[2,2]:[3,3],[2,2],"same"),r=ji(r,t.conv2,"valid"),r=$a(r,t.prelu2_alpha),r=e?r:Vn(r,[3,3],[2,2],"valid"),r=ji(r,t.conv3,"valid"),r=$a(r,t.prelu3_alpha),r})}function p0(n,t){return Ot(function(){var e=Qu(n,t,!0),r=ji(e,t.conv4_1,"valid"),i=xi(Qo(r,3),3),a=Gi(Nn(r,i),3),s=ji(e,t.conv4_2,"valid");return{prob:a,regions:s}})}function h0(n,t){return Ot(function(){var e=Hu(t,n.shape.slice(1)),r=e.height,i=e.width,a=Ys.resizeBilinear(n,[r,i]),s=bd(a);return ua(s,[0,2,1,3])})}function v0(n,t,e,r){for(var i=[],a=n.arraySync(),s=0;s<n.shape[0];s++)for(var u=0;u<n.shape[1];u++)a[s][u]>=r&&i.push(new Vr(u,s));var l=i.map(function(d){var A=new qo(Math.round((d.y*fs+1)/e),Math.round((d.x*fs+1)/e),Math.round((d.y*fs+ds)/e),Math.round((d.x*fs+ds)/e)),I=a[d.y][d.x],O=t.arraySync(),z=new Gu(O[d.y][d.x][0],O[d.y][d.x][1],O[d.y][d.x][2],O[d.y][d.x][3]);return{cell:A,score:I,region:z}});return l}function m0(n,t,e,r,i){i.stage1=[];var a=t.map(function(O){return Ot(function(){var z={scale:O},re=h0(n,O),oe=Date.now(),ae=p0(re,r),se=ae.prob,be=ae.regions;z.pnet=Date.now()-oe;var Ae=Bn(Bn(se,3)[1])[0],me=Bn(be)[0];return{scoresTensor:Ae,regionsTensor:me,scale:O,statsForScale:z}})}),s=a.map(function(O){var z=O.scoresTensor,re=O.regionsTensor,oe=O.scale,ae=O.statsForScale,se=v0(z,re,oe,e);if(z.dispose(),re.dispose(),!se.length)return i.stage1.push(ae),[];var be=Date.now(),Ae=yo(se.map(function(me){return me.cell}),se.map(function(me){return me.score}),.5);return ae.nms=Date.now()-be,ae.numBoxes=Ae.length,i.stage1.push(ae),Ae.map(function(me){return se[me]})}),u=s.reduce(function(O,z){return O.concat(z)},[]),l=[],d=[];if(u.length>0){var A=Date.now(),I=yo(u.map(function(O){return O.cell}),u.map(function(O){return O.score}),.7);i.stage1_nms=Date.now()-A,d=I.map(function(O){return u[O].score}),l=I.map(function(O){return u[O]}).map(function(O){var z=O.cell,re=O.region;return new qo(z.left+re.left*z.width,z.top+re.top*z.height,z.right+re.right*z.width,z.bottom+re.bottom*z.height).toSquare().round()})}return{boxes:l,scores:d}}function wd(n,t,e){var r=e.width,i=e.height;return Gt(this,void 0,void 0,function(){var a,s,u,l=this;return Qt(this,function(d){switch(d.label){case 0:return a=_i(n),[4,Promise.all(t.map(function(A){return Gt(l,void 0,void 0,function(){var I,O,z,re,oe,ae,se,be;return Qt(this,function(Ae){return I=A.padAtBorders(n.height,n.width),O=I.y,z=I.ey,re=I.x,oe=I.ex,ae=re-1,se=O-1,be=a.getImageData(ae,se,oe-ae,z-se),[2,ni.isNodejs()?ku(be):createImageBitmap(be)]})})}))];case 1:return s=d.sent(),u=[],s.forEach(function(A){var I=ts({width:r,height:i}),O=_i(I);O.drawImage(A,0,0,r,i);for(var z=O.getImageData(0,0,r,i).data,re=[],oe=0;oe<z.length;oe+=4)re.push(z[oe+2]),re.push(z[oe+1]),re.push(z[oe]);u.push(re)}),[2,u.map(function(A){var I=Ot(function(){var O=ua(li(A,[1,r,i,3]),[0,2,1,3]).toFloat();return bd(O)});return I})]}})})}function g0(n,t){return Ot(function(){var e=Qu(n,t),r=Ri(e,[e.shape[0],t.fc1.weights.shape[0]]),i=Fi(r,t.fc1),a=$a(i,t.prelu4_alpha),s=Fi(a,t.fc2_1),u=xi(Qo(s,1),1),l=Gi(Nn(s,u),1),d=Fi(a,t.fc2_2),A=Bn(l,1)[1];return{scores:A,regions:d}})}function y0(n,t,e,r,i){return Gt(this,void 0,void 0,function(){var a,s,u,l,d,A,I,O,z,re,oe,ae,se,be;return Qt(this,function(Ae){switch(Ae.label){case 0:return a=Date.now(),[4,wd(n,t,{width:24,height:24})];case 1:return s=Ae.sent(),i.stage2_extractImagePatches=Date.now()-a,a=Date.now(),u=s.map(function(me){var Ce=g0(me,r);return me.dispose(),Ce}),i.stage2_rnet=Date.now()-a,l=u.length>1?Pn(u.map(function(me){return me.scores})):u[0].scores,I=(A=Array).from,[4,l.data()];case 2:return d=I.apply(A,[Ae.sent()]),l.dispose(),O=d.map(function(me,Ce){return{score:me,idx:Ce}}).filter(function(me){return me.score>e}).map(function(me){var Ce=me.idx;return Ce}),z=O.map(function(me){return t[me]}),re=O.map(function(me){return d[me]}),oe=[],ae=[],z.length>0&&(a=Date.now(),se=yo(z,re,.7),i.stage2_nms=Date.now()-a,be=se.map(function(me){var Ce=u[O[me]].regions.arraySync();return new Gu(Ce[0][0],Ce[0][1],Ce[0][2],Ce[0][3])}),ae=se.map(function(me){return re[me]}),oe=se.map(function(me,Ce){return z[me].calibrate(be[Ce])})),u.forEach(function(me){me.regions.dispose(),me.scores.dispose()}),[2,{boxes:oe,scores:ae}]}})})}function b0(n,t){return Ot(function(){var e=Qu(n,t);e=Vn(e,[2,2],[2,2],"same"),e=ji(e,t.conv4,"valid"),e=$a(e,t.prelu4_alpha);var r=Ri(e,[e.shape[0],t.fc1.weights.shape[0]]),i=Fi(r,t.fc1),a=$a(i,t.prelu5_alpha),s=Fi(a,t.fc2_1),u=xi(Qo(s,1),1),l=Gi(Nn(s,u),1),d=Fi(a,t.fc2_2),A=Fi(a,t.fc2_3),I=Bn(l,1)[1];return{scores:I,regions:d,points:A}})}function w0(n,t,e,r,i){return Gt(this,void 0,void 0,function(){var a,s,u,l,d,A,I,O,z,re,oe,ae,se,be,Ae;return Qt(this,function(me){switch(me.label){case 0:return a=Date.now(),[4,wd(n,t,{width:48,height:48})];case 1:return s=me.sent(),i.stage3_extractImagePatches=Date.now()-a,a=Date.now(),u=s.map(function(Ce){var Oe=b0(Ce,r);return Ce.dispose(),Oe}),i.stage3_onet=Date.now()-a,l=u.length>1?Pn(u.map(function(Ce){return Ce.scores})):u[0].scores,I=(A=Array).from,[4,l.data()];case 2:return d=I.apply(A,[me.sent()]),l.dispose(),O=d.map(function(Ce,Oe){return{score:Ce,idx:Oe}}).filter(function(Ce){return Ce.score>e}).map(function(Ce){var Oe=Ce.idx;return Oe}),z=O.map(function(Ce){var Oe=u[Ce].regions.arraySync();return new Gu(Oe[0][0],Oe[0][1],Oe[0][2],Oe[0][3])}),re=O.map(function(Ce,Oe){return t[Ce].calibrate(z[Oe])}),oe=O.map(function(Ce){return d[Ce]}),ae=[],se=[],be=[],re.length>0&&(a=Date.now(),Ae=yo(re,oe,.7,!1),i.stage3_nms=Date.now()-a,ae=Ae.map(function(Ce){return re[Ce]}),se=Ae.map(function(Ce){return oe[Ce]}),be=Ae.map(function(Ce,Oe){return Array(5).fill(0).map(function(Le,Ue){var Ne=u[Ce].points.arraySync();return new Vr(Ne[0][Ue]*(ae[Oe].width+1)+ae[Oe].left,Ne[0][Ue+5]*(ae[Oe].height+1)+ae[Oe].top)})})),u.forEach(function(Ce){Ce.regions.dispose(),Ce.scores.dispose(),Ce.points.dispose()}),[2,{boxes:ae,scores:se,points:be}]}})})}var A0=function(n){ur(t,n);function t(){return n.call(this,"Mtcnn")||this}return t.prototype.load=function(e){return Gt(this,void 0,void 0,function(){return Qt(this,function(r){return console.warn("mtcnn is deprecated and will be removed soon"),[2,n.prototype.load.call(this,e)]})})},t.prototype.loadFromDisk=function(e){return Gt(this,void 0,void 0,function(){return Qt(this,function(r){return console.warn("mtcnn is deprecated and will be removed soon"),[2,n.prototype.loadFromDisk.call(this,e)]})})},t.prototype.forwardInput=function(e,r){return r===void 0&&(r={}),Gt(this,void 0,void 0,function(){var i,a,s,u,l,d,A,I,O,z,re,oe,ae,se,be,Ae,me,Ce,Oe,Le,Ue;return Qt(this,function(Ne){switch(Ne.label){case 0:if(i=this.params,!i)throw new Error("Mtcnn - load model before inference");if(a=e.canvases[0],!a)throw new Error("Mtcnn - inputCanvas is not defined, note that passing tensors into Mtcnn.forwardInput is not supported yet.");return s={},u=Date.now(),l=Ot(function(){return s0(xi(mu.fromPixels(a)).toFloat())}),d=function(Fe){return l.dispose(),s.total=Date.now()-u,Fe},A=l.shape.slice(1),I=A[0],O=A[1],z=new pd(r),re=z.minFaceSize,oe=z.scaleFactor,ae=z.maxNumScales,se=z.scoreThresholds,be=z.scaleSteps,Ae=(be||d0(re,oe,[I,O])).filter(function(Fe){var Ze=Hu(Fe,[I,O]);return Math.min(Ze.width,Ze.height)>ds}).slice(0,ae),s.scales=Ae,s.pyramid=Ae.map(function(Fe){return Hu(Fe,[I,O])}),me=Date.now(),[4,m0(l,Ae,se[0],i.pnet,s)];case 1:return Ce=Ne.sent(),s.total_stage1=Date.now()-me,Ce.boxes.length?(s.stage2_numInputBoxes=Ce.boxes.length,me=Date.now(),[4,y0(a,Ce.boxes,se[1],i.rnet,s)]):[2,d({results:[],stats:s})];case 2:return Oe=Ne.sent(),s.total_stage2=Date.now()-me,Oe.boxes.length?(s.stage3_numInputBoxes=Oe.boxes.length,me=Date.now(),[4,w0(a,Oe.boxes,se[2],i.onet,s)]):[2,d({results:[],stats:s})];case 3:return Le=Ne.sent(),s.total_stage3=Date.now()-me,Ue=Le.boxes.map(function(Fe,Ze){return as(Ao({},new yi(Le.scores[Ze],new Su(Fe.left/O,Fe.top/I,Fe.width/O,Fe.height/I),{height:I,width:O})),new Kg(Le.points[Ze].map(function(Ke){return Ke.sub(new Vr(Fe.left,Fe.top)).div(new Vr(Fe.width,Fe.height))}),{width:Fe.width,height:Fe.height}))}),[2,d({results:Ue,stats:s})]}})})},t.prototype.forward=function(e,r){return r===void 0&&(r={}),Gt(this,void 0,void 0,function(){var i;return Qt(this,function(a){switch(a.label){case 0:return i=this.forwardInput,[4,Hn(e)];case 1:return[4,i.apply(this,[a.sent(),r])];case 2:return[2,a.sent().results]}})})},t.prototype.forwardWithStats=function(e,r){return r===void 0&&(r={}),Gt(this,void 0,void 0,function(){var i;return Qt(this,function(a){switch(a.label){case 0:return i=this.forwardInput,[4,Hn(e)];case 1:return[2,i.apply(this,[a.sent(),r])]}})})},t.prototype.getDefaultModelName=function(){return"mtcnn_model"},t.prototype.extractParamsFromWeigthMap=function(e){return f0(e)},t.prototype.extractParams=function(e){return l0(e)},t}(Ji),x0=.4,E0=[new Vr(1.603231,2.094468),new Vr(6.041143,7.080126),new Vr(2.882459,3.518061),new Vr(4.266906,5.178857),new Vr(9.041765,10.66308)],C0=[117.001,114.697,97.404],S0=function(n){ur(t,n);function t(){var e=this,r={withSeparableConvs:!0,iouThreshold:x0,classes:["face"],anchors:E0,meanRgb:C0,isFirstLayerConv2d:!0,filterSizes:[3,16,32,64,128,256,512]};return e=n.call(this,r)||this,e}return Object.defineProperty(t.prototype,"anchors",{get:function(){return this.config.anchors},enumerable:!0,configurable:!0}),t.prototype.locateFaces=function(e,r){return Gt(this,void 0,void 0,function(){var i;return Qt(this,function(a){switch(a.label){case 0:return[4,this.detect(e,r)];case 1:return i=a.sent(),[2,i.map(function(s){return new yi(s.score,s.relativeBox,{width:s.imageWidth,height:s.imageHeight})})]}})})},t.prototype.getDefaultModelName=function(){return"tiny_face_detector_model"},t.prototype.extractParamsFromWeigthMap=function(e){return n.prototype.extractParamsFromWeigthMap.call(this,e)},t}(md),Hr={ssdMobilenetv1:new hd,tinyFaceDetector:new S0,tinyYolov2:new o0,mtcnn:new A0,faceLandmark68Net:new ld,faceLandmark68TinyNet:new Iy,faceRecognitionNet:new Py,faceExpressionNet:new cy,ageGenderNet:new xy},Xb=function(n,t){return Hr.ssdMobilenetv1.locateFaces(n,t)},Kb=function(n,t){return Hr.tinyFaceDetector.locateFaces(n,t)},Zb=function(n,t){return Hr.tinyYolov2.locateFaces(n,t)},Jb=function(n,t){return Hr.mtcnn.forward(n,t)},Yb=function(n){return Hr.faceLandmark68Net.detectLandmarks(n)},$b=function(n){return Hr.faceLandmark68TinyNet.detectLandmarks(n)},qb=function(n){return Hr.faceRecognitionNet.computeFaceDescriptor(n)},e1=function(n){return Hr.faceExpressionNet.predictExpressions(n)},t1=function(n){return Hr.ageGenderNet.predictAgeAndGender(n)},r1=function(n){return Hr.ssdMobilenetv1.load(n)},I0=function(n){return Hr.tinyFaceDetector.load(n)},n1=function(n){return Hr.mtcnn.load(n)},i1=function(n){return Hr.tinyYolov2.load(n)},T0=function(n){return Hr.faceLandmark68Net.load(n)},a1=function(n){return Hr.faceLandmark68TinyNet.load(n)},R0=function(n){return Hr.faceRecognitionNet.load(n)},o1=function(n){return Hr.faceExpressionNet.load(n)},s1=function(n){return Hr.ageGenderNet.load(n)},u1=null,l1=null,c1=null;function f1(n){return typeof n.age=="number"}function Ad(n,t){var e={age:t};return Object.assign({},n,e)}var xd=function(n){ur(t,n);function t(e,r,i){var a=n.call(this)||this;return a.parentTask=e,a.input=r,a.extractedFaces=i,a}return t}(xo),Xu=function(n){ur(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return Gt(this,void 0,void 0,function(){var e,r,i=this;return Qt(this,function(a){switch(a.label){case 0:return[4,this.parentTask];case 1:return e=a.sent(),[4,cs(e,this.input,function(s){return Gt(i,void 0,void 0,function(){return Qt(this,function(u){switch(u.label){case 0:return[4,Promise.all(s.map(function(l){return Hr.faceExpressionNet.predictExpressions(l)}))];case 1:return[2,u.sent()]}})})},this.extractedFaces)];case 2:return r=a.sent(),[2,e.map(function(s,u){return od(s,r[u])})]}})})},t.prototype.withAgeAndGender=function(){return new Yu(this,this.input)},t}(xd),Ku=function(n){ur(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return Gt(this,void 0,void 0,function(){var e,r;return Qt(this,function(i){switch(i.label){case 0:return[4,this.parentTask];case 1:return e=i.sent(),e?[4,Vu(e,this.input,function(a){return Hr.faceExpressionNet.predictExpressions(a)},this.extractedFaces)]:[2];case 2:return r=i.sent(),[2,od(e,r)]}})})},t.prototype.withAgeAndGender=function(){return new $u(this,this.input)},t}(xd),Zu=function(n){ur(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.withAgeAndGender=function(){return new qu(this,this.input)},t.prototype.withFaceDescriptors=function(){return new tl(this,this.input)},t}(Xu),Ju=function(n){ur(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.withAgeAndGender=function(){return new el(this,this.input)},t.prototype.withFaceDescriptor=function(){return new rl(this,this.input)},t}(Ku),Ed=function(n){ur(t,n);function t(e,r,i){var a=n.call(this)||this;return a.parentTask=e,a.input=r,a.extractedFaces=i,a}return t}(xo),Yu=function(n){ur(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return Gt(this,void 0,void 0,function(){var e,r,i=this;return Qt(this,function(a){switch(a.label){case 0:return[4,this.parentTask];case 1:return e=a.sent(),[4,cs(e,this.input,function(s){return Gt(i,void 0,void 0,function(){return Qt(this,function(u){switch(u.label){case 0:return[4,Promise.all(s.map(function(l){return Hr.ageGenderNet.predictAgeAndGender(l)}))];case 1:return[2,u.sent()]}})})},this.extractedFaces)];case 2:return r=a.sent(),[2,e.map(function(s,u){var l=r[u],d=l.age,A=l.gender,I=l.genderProbability;return Ad(dd(s,A,I),d)})]}})})},t.prototype.withFaceExpressions=function(){return new Xu(this,this.input)},t}(Ed),$u=function(n){ur(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return Gt(this,void 0,void 0,function(){var e,r,i,a,s;return Qt(this,function(u){switch(u.label){case 0:return[4,this.parentTask];case 1:return e=u.sent(),e?[4,Vu(e,this.input,function(l){return Hr.ageGenderNet.predictAgeAndGender(l)},this.extractedFaces)]:[2];case 2:return r=u.sent(),i=r.age,a=r.gender,s=r.genderProbability,[2,Ad(dd(e,a,s),i)]}})})},t.prototype.withFaceExpressions=function(){return new Ku(this,this.input)},t}(Ed),qu=function(n){ur(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.withFaceExpressions=function(){return new Zu(this,this.input)},t.prototype.withFaceDescriptors=function(){return new tl(this,this.input)},t}(Yu),el=function(n){ur(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.withFaceExpressions=function(){return new Ju(this,this.input)},t.prototype.withFaceDescriptor=function(){return new rl(this,this.input)},t}($u),Cd=function(n){ur(t,n);function t(e,r){var i=n.call(this)||this;return i.parentTask=e,i.input=r,i}return t}(xo),tl=function(n){ur(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return Gt(this,void 0,void 0,function(){var e,r;return Qt(this,function(i){switch(i.label){case 0:return[4,this.parentTask];case 1:return e=i.sent(),[4,cs(e,this.input,function(a){return Promise.all(a.map(function(s){return Hr.faceRecognitionNet.computeFaceDescriptor(s)}))},null,function(a){return a.landmarks.align(null,{useDlibAlignment:!0})})];case 2:return r=i.sent(),[2,r.map(function(a,s){return yd(e[s],a)})]}})})},t.prototype.withFaceExpressions=function(){return new Zu(this,this.input)},t.prototype.withAgeAndGender=function(){return new qu(this,this.input)},t}(Cd),rl=function(n){ur(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return Gt(this,void 0,void 0,function(){var e,r;return Qt(this,function(i){switch(i.label){case 0:return[4,this.parentTask];case 1:return e=i.sent(),e?[4,Vu(e,this.input,function(a){return Hr.faceRecognitionNet.computeFaceDescriptor(a)},null,function(a){return a.landmarks.align(null,{useDlibAlignment:!0})})]:[2];case 2:return r=i.sent(),[2,yd(e,r)]}})})},t.prototype.withFaceExpressions=function(){return new Ju(this,this.input)},t.prototype.withAgeAndGender=function(){return new el(this,this.input)},t}(Cd),Sd=function(n){ur(t,n);function t(e,r,i){var a=n.call(this)||this;return a.parentTask=e,a.input=r,a.useTinyLandmarkNet=i,a}return Object.defineProperty(t.prototype,"landmarkNet",{get:function(){return this.useTinyLandmarkNet?Hr.faceLandmark68TinyNet:Hr.faceLandmark68Net},enumerable:!0,configurable:!0}),t}(xo),O0=function(n){ur(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return Gt(this,void 0,void 0,function(){var e,r,i,a,s,u=this;return Qt(this,function(l){switch(l.label){case 0:return[4,this.parentTask];case 1:return e=l.sent(),r=e.map(function(d){return d.detection}),this.input instanceof Ft?[4,Du(this.input,r)]:[3,3];case 2:return a=l.sent(),[3,5];case 3:return[4,ju(this.input,r)];case 4:a=l.sent(),l.label=5;case 5:return i=a,[4,Promise.all(i.map(function(d){return u.landmarkNet.detectLandmarks(d)}))];case 6:return s=l.sent(),i.forEach(function(d){return d instanceof Ft&&d.dispose()}),[2,e.map(function(d,A){return as(d,s[A])})]}})})},t.prototype.withFaceExpressions=function(){return new Zu(this,this.input)},t.prototype.withAgeAndGender=function(){return new qu(this,this.input)},t.prototype.withFaceDescriptors=function(){return new tl(this,this.input)},t}(Sd),k0=function(n){ur(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return Gt(this,void 0,void 0,function(){var e,r,i,a,s;return Qt(this,function(u){switch(u.label){case 0:return[4,this.parentTask];case 1:return e=u.sent(),e?(r=e.detection,this.input instanceof Ft?[4,Du(this.input,[r])]:[3,3]):[2];case 2:return a=u.sent(),[3,5];case 3:return[4,ju(this.input,[r])];case 4:a=u.sent(),u.label=5;case 5:return i=a,[4,this.landmarkNet.detectLandmarks(i[0])];case 6:return s=u.sent(),i.forEach(function(l){return l instanceof Ft&&l.dispose()}),[2,as(e,s)]}})})},t.prototype.withFaceExpressions=function(){return new Ju(this,this.input)},t.prototype.withAgeAndGender=function(){return new el(this,this.input)},t.prototype.withFaceDescriptor=function(){return new rl(this,this.input)},t}(Sd),Id=function(n){ur(t,n);function t(e,r){r===void 0&&(r=new us);var i=n.call(this)||this;return i.input=e,i.options=r,i}return t}(xo),j0=function(n){ur(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return Gt(this,void 0,void 0,function(){var e,r,i,a;return Qt(this,function(s){switch(s.label){case 0:return e=this,r=e.input,i=e.options,i instanceof pd?[4,Hr.mtcnn.forward(r,i)]:[3,2];case 1:return[2,s.sent().map(function(u){return u.detection})];case 2:if(a=i instanceof gd?function(u){return Hr.tinyFaceDetector.locateFaces(u,i)}:i instanceof us?function(u){return Hr.ssdMobilenetv1.locateFaces(u,i)}:i instanceof zu?function(u){return Hr.tinyYolov2.locateFaces(u,i)}:null,!a)throw new Error("detectFaces - expected options to be instance of TinyFaceDetectorOptions | SsdMobilenetv1Options | MtcnnOptions | TinyYolov2Options");return[2,a(r)]}})})},t.prototype.runAndExtendWithFaceDetections=function(){var e=this;return new Promise(function(r){return Gt(e,void 0,void 0,function(){var i;return Qt(this,function(a){switch(a.label){case 0:return[4,this.run()];case 1:return i=a.sent(),[2,r(i.map(function(s){return Ao({},s)}))]}})})})},t.prototype.withFaceLandmarks=function(e){return e===void 0&&(e=!1),new O0(this.runAndExtendWithFaceDetections(),this.input,e)},t.prototype.withFaceExpressions=function(){return new Xu(this.runAndExtendWithFaceDetections(),this.input)},t.prototype.withAgeAndGender=function(){return new Yu(this.runAndExtendWithFaceDetections(),this.input)},t}(Id),D0=function(n){ur(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return Gt(this,void 0,void 0,function(){var e,r;return Qt(this,function(i){switch(i.label){case 0:return[4,new j0(this.input,this.options)];case 1:return e=i.sent(),r=e[0],e.forEach(function(a){a.score>r.score&&(r=a)}),[2,r]}})})},t.prototype.runAndExtendWithFaceDetection=function(){var e=this;return new Promise(function(r){return Gt(e,void 0,void 0,function(){var i;return Qt(this,function(a){switch(a.label){case 0:return[4,this.run()];case 1:return i=a.sent(),[2,r(i?Ao({},i):void 0)]}})})})},t.prototype.withFaceLandmarks=function(e){return e===void 0&&(e=!1),new k0(this.runAndExtendWithFaceDetection(),this.input,e)},t.prototype.withFaceExpressions=function(){return new Ku(this.runAndExtendWithFaceDetection(),this.input)},t.prototype.withAgeAndGender=function(){return new $u(this.runAndExtendWithFaceDetection(),this.input)},t}(Id);function nl(n,t){return t===void 0&&(t=new us),new D0(n,t)}function d1(n,t){return t===void 0&&(t=new SsdMobilenetv1Options),new DetectAllFacesTask(n,t)}function p1(n,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:return console.warn("allFacesSsdMobilenetv1 is deprecated and will be removed soon, use the high level api instead"),[4,detectAllFaces(n,new SsdMobilenetv1Options(t?{minConfidence:t}:{})).withFaceLandmarks().withFaceDescriptors()];case 1:return[2,e.sent()]}})})}function h1(n,t){return t===void 0&&(t={}),__awaiter(this,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:return console.warn("allFacesTinyYolov2 is deprecated and will be removed soon, use the high level api instead"),[4,detectAllFaces(n,new TinyYolov2Options(t)).withFaceLandmarks().withFaceDescriptors()];case 1:return[2,e.sent()]}})})}function v1(n,t){return t===void 0&&(t={}),__awaiter(this,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:return console.warn("allFacesMtcnn is deprecated and will be removed soon, use the high level api instead"),[4,detectAllFaces(n,new MtcnnOptions(t)).withFaceLandmarks().withFaceDescriptors()];case 1:return[2,e.sent()]}})})}var m1=null;function P0(n,t){if(n.length!==t.length)throw new Error("euclideanDistance: arr1.length !== arr2.length");var e=Array.from(n),r=Array.from(t);return Math.sqrt(e.map(function(i,a){return i-r[a]}).reduce(function(i,a){return i+Math.pow(a,2)},0))}var B0=function(){function n(t,e){e===void 0&&(e=.6),this._distanceThreshold=e;var r=Array.isArray(t)?t:[t];if(!r.length)throw new Error("FaceRecognizer.constructor - expected atleast one input");var i=1,a=function(){return"person "+i++};this._labeledDescriptors=r.map(function(s){if(s instanceof es)return s;if(s instanceof Float32Array)return new es(a(),[s]);if(s.descriptor&&s.descriptor instanceof Float32Array)return new es(a(),[s.descriptor]);throw new Error("FaceRecognizer.constructor - expected inputs to be of type LabeledFaceDescriptors | WithFaceDescriptor<any> | Float32Array | Array<LabeledFaceDescriptors | WithFaceDescriptor<any> | Float32Array>")})}return Object.defineProperty(n.prototype,"labeledDescriptors",{get:function(){return this._labeledDescriptors},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"distanceThreshold",{get:function(){return this._distanceThreshold},enumerable:!0,configurable:!0}),n.prototype.computeMeanDistance=function(t,e){return e.map(function(r){return P0(r,t)}).reduce(function(r,i){return r+i},0)/(e.length||1)},n.prototype.matchDescriptor=function(t){var e=this;return this.labeledDescriptors.map(function(r){var i=r.descriptors,a=r.label;return new Lf(a,e.computeMeanDistance(t,i))}).reduce(function(r,i){return r.distance<i.distance?r:i})},n.prototype.findBestMatch=function(t){var e=this.matchDescriptor(t);return e.distance<this.distanceThreshold?e:new Lf("unknown",e.distance)},n.prototype.toJSON=function(){return{distanceThreshold:this.distanceThreshold,labeledDescriptors:this.labeledDescriptors.map(function(t){return t.toJSON()})}},n.fromJSON=function(t){var e=t.labeledDescriptors.map(function(r){return es.fromJSON(r)});return new n(e,t.distanceThreshold)},n}();function g1(n){var t=new Mtcnn;return t.extractWeights(n),t}function y1(n){var t=new TinyFaceDetector;return t.extractWeights(n),t}function Td(n,t){var e=new ja(t.width,t.height),r=e.width,i=e.height;if(r<=0||i<=0)throw new Error("resizeResults - invalid dimensions: "+JSON.stringify({width:r,height:i}));if(Array.isArray(n))return n.map(function(u){return Td(u,{width:r,height:i})});if(Fu(n)){var a=n.detection.forSize(r,i),s=n.unshiftedLandmarks.forSize(a.box.width,a.box.height);return as(Ao(n,a),s)}return wo(n)?Ao(n,n.detection.forSize(r,i)):n instanceof Ja||n instanceof yi?n.forSize(r,i):n}var N0=Te(29787),M0=Te(47257),_0=Te.n(M0),F0=Te(1012),L0=Te(25173),U0=Te(49317),W0={wrp:"wrp___x6ffm"},qa=Te(59301),Di=(n,t,e)=>new Promise((r,i)=>{var a=l=>{try{u(e.next(l))}catch(d){i(d)}},s=l=>{try{u(e.throw(l))}catch(d){i(d)}},u=l=>l.done?r(l.value):Promise.resolve(l.value).then(a,s);u((e=e.apply(n,t)).next())});const z0=function(t,e){const r=t.split(","),i=r[0].match(/:(.*?);/)[1],a=atob(r[1]);let s=a.length;const u=new Uint8Array(s);for(;s--;)u[s]=a.charCodeAt(s);return new Blob([u],{type:i})},V0=n=>Di(void 0,null,function*(){return new Promise((t,e)=>{let r=new Image;(n==null?void 0:n.indexOf("educoder.net"))>-1?r.setAttribute("crossOrigin","educoder.net"):r.setAttribute("crossOrigin","aliyuncs.com"),r.onload=function(){let i=document.createElement("canvas");i.width=this.naturalWidth,i.height=this.naturalHeight,i.getContext("2d").drawImage(r,0,0);let a=i.toDataURL("image/png");t(a)},r.src=n,r.onerror=()=>{e(new Error("\u56FE\u7247\u6D41\u5F02\u5E38")),R.ZP.error("\u60A8\u7684\u8EAB\u4EFD\u7167\u7247\u5F02\u5E38\uFF0C\u8BF7\u62CD\u7167\u540E\u63D0\u4EA4\u81F3\u4EBA\u5DE5\u5BA1\u6838")}})});var H0=(0,we.forwardRef)(({outputResult:n,identity_url:t,onCameraReady:e,defaultOpen:r},i)=>{const a=(0,st.useParams)(),s=(0,we.useRef)(),u=(0,we.useRef)(),l=(0,we.useRef)(),d=(0,we.useRef)(!1);let A=(0,we.useRef)();const[I,O]=(0,we.useState)(!0),[z,re]=(0,we.useState)(""),[oe,ae]=(0,we.useState)(""),se=(0,we.useRef)(!1),be=(0,we.useRef)(""),[Ae]=(0,we.useState)(!0),me=.7,Ce=224,Oe="\u5BA1\u6838\u5931\u8D25",Le=(0,we.useMemo)(()=>new gd({inputSize:Ce,scoreThreshold:me}),[]),Ue=()=>Di(void 0,null,function*(){yield Hr.ssdMobilenetv1.loadFromUri("https://www-cdn.educoder.net/weights/"),yield I0("https://www-cdn.educoder.net/weights/"),yield T0("https://www-cdn.educoder.net/weights/"),yield R0("https://www-cdn.educoder.net/weights/"),gt(!0)});(0,we.useEffect)(()=>{r&&Ue()},[r]),(0,we.useImperativeHandle)(i,()=>({handleStop:bt,handleRemove:ct,handlePlay:gt,startDiscern:et,handleUploadImage:Ke}));const Ne=ft=>Di(void 0,null,function*(){if(!s.current){setTimeout(()=>Ne(ft));return}navigator.mediaDevices.getUserMedia({video:{width:640,height:360}}).then(Et=>Di(void 0,null,function*(){if("srcObject"in s.current?s.current.srcObject=Et:s.current.src=window.URL.createObjectURL(Et),s.current.onloadedmetadata=function(It){O(!1),s.current.play()},ft){const It=document.createElement("img");It.src=yield V0(t+"?t="+new Date().getTime()),A.current=yield nl(It,Le).withFaceLandmarks().withFaceDescriptor()}})).catch(function(Et){console.log("err:",Et,Et.message),Et.message==="Permission denied"||Et.name==="NotAllowedError"?R.ZP.error("\u60A8\u5DF2\u62D2\u7EDD\u4E86\u83B7\u53D6\u6444\u50CF\u5934"):Et.message!="\u56FE\u7247\u6D41\u5F02\u5E38"&&R.ZP.error("\u6444\u50CF\u5934\u83B7\u53D6\u5931\u8D25\uFF0C\u6216\u60A8\u5DF2\u62D2\u7EDD\u4E86\u83B7\u53D6\u6444\u50CF\u5934")})}),Fe=(ft,Et)=>Di(void 0,null,function*(){return new Promise(It=>Di(void 0,null,function*(){var Vt,ir,fr,Ar,Dr,Rr,Pr;const xr=yield(0,U0.ZP)("/api/buckets/get_upload_token.json",{method:"get"});xr.data=JSON.parse((0,L0.pe)(xr.data));const Or=(0,F0.Z)(),Qr=new(_0())({endpoint:(Vt=xr==null?void 0:xr.data)==null?void 0:Vt.end_point,region:(ir=xr==null?void 0:xr.data)==null?void 0:ir.region,accessKeyId:(fr=xr==null?void 0:xr.data)==null?void 0:fr.access_key_id,accessKeySecret:(Ar=xr==null?void 0:xr.data)==null?void 0:Ar.access_key_secret,bucket:(Dr=xr==null?void 0:xr.data)==null?void 0:Dr.bucket,stsToken:(Rr=xr==null?void 0:xr.data)==null?void 0:Rr.security_token}),Ur=z0(ft,Or);Qr.multipartUpload(`${Or}.png`,Ur,{timeout:10*1e3,partSize:10485760,callback:{url:(Pr=xr==null?void 0:xr.data)==null?void 0:Pr.callback_url,host:xr==null?void 0:xr.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&login="+a.login+"&container_id="+a.categoryId+"&container_type=ExerciseIdentity&p="+Et}}).then(function(an){It(an),console.log("result:",an)}).catch(function(an){console.log("err:",an)})}))}),Ze=ft=>Di(void 0,null,function*(){try{u.current.width=s.current.videoWidth,u.current.height=360,yield u.current.getContext("2d").drawImage(s.current,0,0,u.current.width,u.current.height),be.current=u.current.toDataURL("image/png"),ft===1&&Fe(be.current,ft)}catch(Et){}}),Ke=ft=>Di(void 0,null,function*(){return new Promise(Et=>Di(void 0,null,function*(){yield u.current.getContext("2d").drawImage(s.current,0,0,u.current.width,u.current.height),yield Fe(be.current,ft),Et()}))}),et=()=>Di(void 0,null,function*(){d.current=!0;const ft=yield nl(s.current,Le).withFaceLandmarks().withFaceDescriptor();if(ft&&A.current){const It=new B0(ft).findBestMatch(A.current.descriptor);re(It._distance<.43?"\u8BC6\u522B\u6210\u529F":Oe),Ze(It._distance<.43?1:0),setTimeout(()=>{n==null||n({content:It._distance<.43?"\u8BC6\u522B\u6210\u529F":Oe,success:It._distance<.43})},1e3),se.current=!0}else Ze(0),re(Oe),setTimeout(()=>{n==null||n({content:Oe,success:!1})},1e3);setTimeout(()=>{s.current.pause()},600)}),tt=()=>Di(void 0,null,function*(){var ft,Et;if((ft=s.current)!=null&&ft.paused||(Et=s.current)!=null&&Et.ended)return setTimeout(()=>tt());const It=yield nl(s.current,Le).withFaceLandmarks().withFaceDescriptor();d.current||(d.current=!0,e(!0)),It&&s.current?(ae(""),vt(s.current,l.current,[It],Ae)):ae("\u8BF7\u5C06\u8138\u90E8\u79FB\u52A8\u81F3\u53D6\u666F\u6846\u5185"),se.current||setTimeout(()=>tt())}),ct=()=>{try{s.current.srcObject.getTracks().forEach(function(It){It.stop()}),d.current=!1}catch(ft){}},bt=()=>{O(!1);try{d.current=!1}catch(ft){}},gt=ft=>{d.current=!1,se.current=!1,u.current.getContext("2d").clearRect(0,0,640,480),re(""),O(!0);try{Ne(ft||!1)}catch(Et){}},vt=(ft,Et,It,Vt=!0)=>{const ir=At(ft,Et,It);Vt&&qg(Et,ir.map(fr=>fr.detection))},At=(ft,Et,It)=>{const{width:Vt,height:ir}=ft instanceof HTMLVideoElement?Ou(ft):ft;return Et.width=Vt,Et.height=ir,Td(It,{width:Vt,height:ir})};return qa.createElement("div",{className:W0.wrp},qa.createElement(N0.Z,{spinning:I,tip:"\u6B63\u5728\u542F\u52A8\u6444\u50CF\u5934\uFF0C\u8BF7\u7A0D\u540E..."},qa.createElement("video",{onPlay:tt,ref:s,id:"inputVideo",autoPlay:!0,muted:!0}),qa.createElement("canvas",{style:{zIndex:2},ref:l}),qa.createElement("canvas",{ref:u}),qa.createElement("div",{className:"c-red mt5 tc",style:{height:22}},z," ",oe)))}),G0="data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAABEAAAAHoCAYAAABJiJprAAAAAXNSR0IArs4c6QAAQABJREFUeAHsnQegXFW1/r+Z23vqTe89IYEAoQpBRBBFLIiU518BeYoFffr08RQVEbF3fE9AEaygwEOUJh1CaIkEEpIQ0utNQurtbe7815q5J/fM3Jkz7ZwzZ858S4c5ZZ9dfvvumzvfrL1WAHEWDocDcZd4SgIkQAIkQAIkQAIkQAIkQAIkQAIkQAIFRSAQCITNHT4idlD4MGPhMQmQAAmQAAmQAAmQAAmQAAmQAAmQgB8IGEJIRABJV/y4/vrrjwgmfoDAMZAACZAACZAACZAACZAACZAACZAACRQugeuuuy7GyyPZSFQESSmAHBE9rrsO1/XXdPfdd1MISUaV10mABEiABEiABEiABEiABEiABEiABBwlcOGFF0aEj+u1lesj/4WVGBIRQJJ5fxjCh1QQcrTXrJwESIAESIAESIAESIAESIAESIAESIAEciQgOkaJVpFMCAkmqj8ifojHx9y5c+npkQgQr5EACZAACZAACZAACZAACZAACZAACXiKQETDEC3DcOiI79wgAeSI+MFtLvGseE4CJEACJEACJEACJEACJEACJEACJOBhAnNVy0giggwSQHQckQfkfeTIkfQA8fDEsmskQAIkQAIkQAIkQAIkQAIkQAIkQAJRAoaGYWga8VxiBBD1/pC9MpEy+uCbb75JASSeGM9JgARIgARIgARIgARIgARIgARIgAQ8R0A1DEMEUW0jfitMjACivdcML2v6xY+hQ4dSAPHclLJDJEACJEACJEACJEACJEACJEACJEAC8QRUw1ARRDWNRNlrYwWQfu+PxVrLccdh9+7dFEDiifKcBEiABEiABEiABEiABEiABEiABEjAcwQiGoZoGRFNQ3vXr3EYHT0igES2v/RfVcVk6KZNgenTpxvl+E4CJEACJEACJEACJEACJEACJEACJEACniWgGoZqGUY4Dw3wYd4Gc0QAMUawZs2aI14fe/bsOXJs3Oc7CZAACZAACZAACZAACZAACZAACZAACXiNgFnDMGsbRj9jBJDIHpnFUWcRbn8xEPGdBEiABEiABEiABEiABEiABEiABEigEAgc0TJE24iPA1KacACyZwZ79+Jgays9QBIC4kUSIAESIAESIAESIAESIAESIAESIAEvEThYUxMoHTUqjMZGoKVlUNdiPEAG3eUFEiABEiABEiABEiABEiABEiABEiABEvABAQogPphEDoEESIAESIAESIAESIAESIAESIAESMCaAAUQaz68SwIkQAIkQAIkQAIkQAIkQAIkQAIk4AMCFEB8MIkcAgmQAAmQAAmQAAmQAAmQAAmQAAmQgDUBCiDWfHiXBEiABEiABEiABEiABEiABEiABEjABwQogPhgEjkEEiABEiABEiABEiABEiABEiABEiABawIUQKz58C4JkAAJkAAJkAAJkAAJkAAJkAAJkIAPCFAA8cEkcggkQAIkQAIkQAIkQAIkQAIkQAIkQALWBCiAWPPhXRIgARIgARIgARIgARIgARIgARIgAR8QoADig0nkEEiABEiABEiABEiABEiABEiABEiABKwJUACx5sO7JEACJEACJEACJEACJEACJEACJEACPiBAAcQHk8ghkAAJkAAJkAAJkAAJkAAJkAAJkAAJWBOgAGLNh3dJgARIgARIgARIgARIgARIgARIgAR8QIACiA8mkUMgARIgARIgARIgARIgARIgARIgARKwJkABxJoP75IACZAACZAACZAACZAACZAACZAACfiAAAUQH0wih0ACJEACJEACJEACJEACJEACJEACJGBNgAKINR/eJQESIAESIAESIAESIAESIAESIAES8AEBCiA+mEQOgQRIgARIgARIgARIgARIgARIgARIwJoABRBrPrxLAiRAAiRAAiRAAiRAAiRAAiRAAiTgAwIUQHwwiRwCCZAACZAACZAACZAACZAACZAACZCANQEKINZ8eJcESIAESIAESIAESIAESIAESIAESMAHBCiA+GASOQQSIAESIAESIAESIAESIAESIAESIAFrAhRArPnwLgmQAAmQAAmQAAmQAAmQAAmQAAmQgA8IUADxwSRyCCRAAiRAAiRAAiRAAiRAAiRAAiRAAtYEKIBY8+FdEiABEiABEiABEiABEiABEiABEiABHxCgAOKDSeQQSIAESIAESIAESIAESIAESIAESIAErAlQALHmw7skQAIkQAIkQAIkQAIkQAIkQAIkQAI+IEABxAeTyCGQAAmQAAmQAAmQAAmQAAmQAAmQAAlYE6AAYs2Hd0mABEiABEiABEiABEiABEiABEiABHxAgAKIDyaRQyABEiABEiABEiABEiABEiABEiABErAmQAHEmg/vkgAJkAAJkAAJkAAJkAAJkAAJkAAJ+IAABRAfTCKHQAIkQAIkQAIkQAIkQAIkQAIkQAIkYE2AAog1H94lARIgARIgARIgARIgARIgARIgARLwAQEKID6YRA6BBEiABEiABEiABEiABEiABEiABEjAmgAFEGs+vEsCJEACJEACJEACJEACJEACJEACJOADAhRAfDCJHAIJkAAJkAAJkAAJkAAJkAAJkAAJkIA1AQog1nx4lwRIgARIgARIgARIgARIgARIgARIwAcEKID4YBI5BBIgARIgARIgARIgARIgARIgARIgAWsCFECs+fAuCZAACZAACZAACZAACZAACZAACZCADwhQAPHBJHIIJEACJEACJEACJEACJEACJEACJEAC1gQogFjz4V0SIAESIAESIAESIAESIAESIAESIAEfEKAA4oNJ5BBIgARIgARIgARIgARIgARIgARIgASsCVAAsebDuyRAAiRAAiRAAiRAAiRAAiRAAiRAAj4gQAHEB5PIIZAACZAACZAACZAACZAACZAACZAACVgToABizYd3SYAESIAESIAESIAESIAESIAESIAEfECAAogPJpFDIAESIAESIAESIAESIAESIAESIAESsCZAAcSaD++SAAmQAAmQAAmQAAmQAAmQAAmQAAn4gAAFEB9MIodAAiRAAiRAAiRAAiRAAiRAAiRAAiRgTYACiDUf3iUBEiABEiABEiABEiABEiABEiABEvABAQogPphEDoEESIAESIAESIAESIAESIAESIAESMCaAAUQaz68SwIkQAIkQAIkQAIkQAIkQAIkQAIk4AMCFEB8MIkcAgmQAAmQAAmQAAmQAAmQAAmQAAmQgDUBCiDWfHiXBEiABEiABEiABEiABEiABEiABEjABwQogPhgEjkEEiABEiABEiABEiABEiABEiABEiABawIUQKz58C4JkAAJkAAJkAAJkAAJkAAJkAAJkIAPCFAA8cEkcggkQAIkQAIkQAIkQAIkQAIkQAIkQALWBCiAWPPhXRIgARIgARIgARIgARIgARIgARIgAR8QoADig0nkEEiABEiABEiABEiABEiABEiABEiABKwJUACx5sO7JEACJEACJEACJEACJEACJEACJEACPiBAAcQHk8ghkAAJkAAJkAAJkAAJkAAJkAAJkAAJWBOgAGLNh3dJgARIgARIgARIgARIgARIgARIgAR8QIACiA8mkUMgARIgARIgARIgARIgARIgARIgARKwJkABxJoP75IACZAACZAACZAACZAACZAACZAACfiAAAUQH0wih0ACJEACJEACJEACJEACJEACJEACJGBNgAKINR/eJQESIAESIAESIAESIAESIAESIAES8AEBCiA+mEQOgQRIgARIgARIgARIgARIgARIgARIwJoABRBrPrxLAiRAAiRAAiRAAiRAAiRAAiRAAiTgAwIUQHwwiRwCCZAACZAACZAACZAACZAACZAACZCANQEKINZ8eJcESIAESIAESIAESIAESIAESIAESMAHBCiA+GASOQQSIAESIAESIAESIAESIAESIAESIAFrAhRArPnwLgmQAAmQAAmQAAmQAAmQAAmQAAmQgA8IlPpgDBwCCZAACZAACZAACZBACgJdPcCWPcDGJnntBjbJ+75moK0TaJVX5L0j+q5V1VQCtVX973Ks5yPqgaljgGmj5SXvk0cBFWUpGuZtEiABcP3xh4AEvEGAAog35iFlL3r7gG75T6gvgL6+cMryLEACJEACJJCcQDAYQEkwjPLSIOT/NBLwJYENInA8v0Zea4FVW4Cd+yF/Q6Q/1O5W4KC8rCwo62fccGD+ZOCUOfKaC0wXYYRGAsVOgOuv2H8COH6vEqAA4tWZ6e9XSMSOju6wCB9GRyl+GCT4TgIkQALZElAhWT8I9oiwXCIf4KrKVRAJZFsdnyMBTxBQseLRV4Cl/aLH3kPOd0vX0fa3oq+HlkXbaxwSFUNOFTHk7GOBobXO94MtkEC+CXD95XsG2D4JpEeAAkh6nPJSSr0+2ruAcL/mUVEWQFlJAPptC/9Mz8uUsFESIAEfENBfqRHxIxQWl+SowNwmv2urK0BvEB/Mb7ENobsXeHwFcO9S4OlVKurln4AKL397Ifr66u+AM+YDF5wKnLUQ4nWV//6xByRgFwGuP7tIsh4ScI8A/xlyj3VGLannR1T8CEe+nayuCIJfTmaEkIVJgARIICEBFZDV60M9PspLA/K7VrcXRn/n1ogIQk+QhNh40WMEVm4G7noW+MdLwOE2j3XO1B0VZB4TgUZfDTXAe08ELj4dWDDFVIiHJFBgBLj+CmzC2F0SMBGgAGKC4aVD3fainh/6R3pNZZAeH16aHPaFBEjANwRUWNbfsW2d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ysQfqZx0Mr/7kPRBw0nrySFfYoKAICAICAKCgCAgCAgCgkARIBD7F3QRDE6GIAhkFYE+g7PafCqNNyxcSnWz5lHTspVkrWWvk1gpdTkVatPyVbRy6iya/+n39Mcr7/PnA2pYkAdZPyAu25G1UArclq1qoxBuCuO2+PwuWx37ONbUX6iB0+D279qDNt58B0V4dGPPj+FD1wuTH9aK1eqI/fv1p+b61dShvJw01gIZvslWVNlQT01za8maHcokk0LXpKogIAikiUBdXR09/PDD9NZbb6XZUmZ2b2xsTKmhr7/+ms4880z6/vvvU9pv7Nix9P777ye1z+eff05TpkxJqq5UKl0EVqxYQatXh/6vyzYKd999N/32228xDzN//nxCne+++y5mHe+GpUuXeotirj/wwAOET6asublZtZfoPp43bx499NBDtHZt7N8kmeqTtCMIZAoB8QDJFJLSTukhAC0QeIKsSv4/qGyA1Lh4Gc356OuIpqEoAq8OfAx4d3D2FZMzgQQbmzj9abSAZrAhtR+4EQfLxAqyw/QemImW2r2N5XVrKTjXos4dGf9kst6k2GOTSSyQH41rY2vMaJxFR5s/lyr1Vk+P8eN/YH2PAA1hbRCEZNk4511C4TALF82n+vpWTRvDZAFXlrTRehS2HkuK0Ep1QSArCLz44os0adKkqLYPOugg2nzzzaPK77vvPnrhhRf4sa3RwIEDaeONN46q4y344YcfCMRJOjZs2DDq169fRBNo84wzzqD111+frrjiCtWniAo+KwMGDFCTvJ49e9JWW23lU8O/6P7776empibac889IyqgrMLltRbklN7nn38+7bXXXnTdddeF6yKL1cSJE5PCK7yTLBQtAiDuTj31VDJYn+2ee+6h7t3591qLvf7667Rs2TJnNanvwYMH0+jRo33r/vzzz/T444/TjBkz6Pbbb1d1li9fTtXV1RQIhKZaCxcuVHWqqqpo66239m3HXfjMM88QngVXX3017bbbbuFNsUiR9957T9U5/PDDw3XdCzU1NeG+uMtjLYPQALGB55BzH1v8+3Hu3Lk0a9Ys9fnmm28IhCfK0X6sY8c6hpQLAu2FgBAg7YW8HLc4EOjDk/Y6TonrQyrkaoBGRTkZnGbWVDojoaMilanJniD4sD+Ir+Ftf4eeXal6YD+qHjzAt07OCrv05MwxLAZbJLa6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",Q0=Te(78267),X0=Object.defineProperty,ps=Object.getOwnPropertySymbols,Rd=Object.prototype.hasOwnProperty,Od=Object.prototype.propertyIsEnumerable,kd=(n,t,e)=>t in n?X0(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,il=(n,t)=>{for(var e in t||(t={}))Rd.call(t,e)&&kd(n,e,t[e]);if(ps)for(var e of ps(t))Od.call(t,e)&&kd(n,e,t[e]);return n},K0=(n,t)=>{var e={};for(var r in n)Rd.call(n,r)&&t.indexOf(r)<0&&(e[r]=n[r]);if(n!=null&&ps)for(var r of ps(n))t.indexOf(r)<0&&Od.call(n,r)&&(e[r]=n[r]);return e},Pa=(n,t,e)=>new Promise((r,i)=>{var a=l=>{try{u(e.next(l))}catch(d){i(d)}},s=l=>{try{u(e.throw(l))}catch(d){i(d)}},u=l=>l.done?r(l.value):Promise.resolve(l.value).then(a,s);u((e=e.apply(n,t)).next())});const{Countdown:Z0}=o.default,{Step:J0}=M.default,w1=null,A1={0:"c-red-ee4",1:"c-green"},x1=null,Y0=n=>{var t=n,{globalSetting:e,loading:r,user:i,exercise:a,dispatch:s}=t,u=K0(t,["globalSetting","loading","user","exercise","dispatch"]),l;const d=(0,st.useParams)(),[A,I]=(0,we.useState)(0),[O,z]=(0,we.useState)(!1),[re,oe]=(0,we.useState)(!1),[ae,se]=(0,we.useState)(!1),[be,Ae]=(0,we.useState)(0),[me,Ce]=(0,we.useState)({}),Oe=(0,we.useRef)(),Le=(0,we.useRef)(!0),Ue=[{title:"\u91C7\u96C6\u7167\u7247",content:"First-content"},{title:"\u5BA1\u6838\u7ED3\u679C",content:"Second-content"},{title:"\u5F00\u542F\u624B\u673A\u5F55\u5236",content:"Last-content"}].filter(et=>me!=null&&me.open_phone_video_recording?!0:et.content!=="Last-content"),Ne=()=>Pa(void 0,null,function*(){return new Promise(et=>Pa(void 0,null,function*(){const tt=yield(0,c.PJ)(il({},d));Ce(il({},tt)),et(tt)}))}),Fe=()=>Pa(void 0,null,function*(){var et;const tt=yield Ne();tt!=null&&tt.identity_verify||I(2),tt!=null&&tt.can_start&&tt.countdown_time===0?I(2):(tt==null?void 0:tt.identity_photo_state)==="rejected"?(Le.current=!1,Ae(1)):(tt==null?void 0:tt.identity_photo_state)==="passed"&&(Le.current=!1,(et=Oe==null?void 0:Oe.current)==null||et.handleStop(),me!=null&&me.open_phone_video_recording||I(2))}),Ze=()=>Pa(void 0,null,function*(){var et;const tt=yield Ne();(tt==null?void 0:tt.identity_photo_state)==="submitted"||((tt==null?void 0:tt.identity_photo_state)==="rejected"?(Le.current=!1,Ae(2)):(tt==null?void 0:tt.identity_photo_state)==="passed"&&(Le.current=!1,(et=Oe==null?void 0:Oe.current)==null||et.handleStop(),Ae(1),me!=null&&me.open_phone_video_recording||I(2))),(tt==null?void 0:tt.identity_photo_state)!=="passed"&&Le.current&&setTimeout(()=>{Ze()},30*1e3)}),Ke=()=>{var et;z(!1),(et=Oe==null?void 0:Oe.current)==null||et.startDiscern()};return(0,we.useEffect)(()=>(Fe(),console.log("captureRef:",Oe),()=>{Ae(0),se(!1),oe(!1),I(0)}),[]),we.createElement("div",{className:"p30 bg-white minHb100 edu-container mt20"},(me==null?void 0:me.identity_verify)&&we.createElement(we.Fragment,null,we.createElement("div",{className:"tc font16 blod"},"\u8EAB\u4EFD\u9A8C\u8BC1"),we.createElement("div",{className:g.steps},we.createElement(M.default,{current:A},Ue.map(et=>we.createElement(J0,{key:et.title,title:et.title}))))),we.createElement("div",{className:A===0?"":"hide"},we.createElement("div",{className:"tc mt50"},"\u8BF7\u4FDD\u8BC1\u5468\u56F4\u5149\u7EBF\u5145\u8DB3\uFF0C\u4E94\u5B98\u6E05\u6670\u53EF\u89C1\uFF01"),!re&&we.createElement("div",{className:"tc"},we.createElement("img",{width:536,src:G0,className:"mt30"})),we.createElement("div",{className:re?"":"hide"},we.createElement(H0,{ref:Oe,onCameraReady:et=>{z(et)},defaultOpen:me==null?void 0:me.identity_verify,identity_url:(0,w.Tv)((l=i==null?void 0:i.userInfo)==null?void 0:l.identity_url),outputResult:et=>{et.success?(R.ZP.success({content:"\u4EBA\u8138\u8BC6\u522B\u6210\u529F",key:"checkapi"}),I(2)):se(!0),z(!1)}})),re&&we.createElement(we.Fragment,null,ae?we.createElement("div",{className:"tc mb30 mt15"},we.createElement(p.ZP,{type:"primary",onClick:()=>{var et;(et=Oe==null?void 0:Oe.current)==null||et.handlePlay(),Ce(il({},{})),se(!1)}},"\u91CD\u65B0\u8BC6\u522B"),we.createElement(p.ZP,{type:"primary",className:"ml90",onClick:()=>Pa(void 0,null,function*(){var et;yield(et=Oe==null?void 0:Oe.current)==null?void 0:et.handleUploadImage(0),Le.current=!0,I(1),Ae(0),se(!1),Ze()})},"\u4EBA\u5DE5\u5BA1\u6838")):O&&we.createElement("div",{className:"tc mb30 mt15"},we.createElement(p.ZP,{type:"primary",onClick:(0,Q0.throttle)(Ke,2e3)},"\u5F00\u59CB\u8BC6\u522B"))),!re&&we.createElement("div",{className:"tc mb30 mt15"},we.createElement(p.ZP,{type:"primary",onClick:()=>{oe(!0)}},"\u5F00\u59CB\u91C7\u96C6"))),A===1&&we.createElement("div",{className:"tc"},be===0&&we.createElement(we.Fragment,null,we.createElement("div",{className:"tc mt50"},we.createElement("span",{className:"c-blue font50 iconfont icon-dengdaishenhe"}),we.createElement("br",null),"\u4EBA\u5DE5\u5BA1\u6838\u4E2D...",we.createElement("br",null),"\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u76D1\u63A7\u8001\u5E08\u5BA1\u6838\u4E2D\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85\uFF01"),we.createElement(p.ZP,{type:"primary",className:"mt50",onClick:()=>Pa(void 0,null,function*(){const et=yield Ne();(et==null?void 0:et.identity_photo_state)==="submitted"?R.ZP.warning({content:"\u6B63\u5728\u7B49\u5F85\u8001\u5E08\u5BA1\u6838\u4E2D\uFF0C\u8BF7\u7A0D\u540E...",key:"sh1"}):(et==null?void 0:et.identity_photo_state)==="rejected"?(Ae(2),Le.current=!1):(et==null?void 0:et.identity_photo_state)==="passed"&&(Le.current=!1,Ae(1),me!=null&&me.open_phone_video_recording||I(2))})},"\u67E5\u770B\u5BA1\u6838\u7ED3\u679C")),be===1&&we.createElement(we.Fragment,null,we.createElement("div",{className:"tc mt50"},we.createElement("span",{className:"c-green font50 iconfont icon-tongguo"}),we.createElement("br",null),"\u8EAB\u4EFD\u9A8C\u8BC1\u5BA1\u6838\u901A\u8FC7\u3002"),(me==null?void 0:me.open_phone_video_recording)&&we.createElement(p.ZP,{type:"primary",className:"mt50",onClick:()=>I(2)},"\u4E0B\u4E00\u6B65")),be===2&&we.createElement(we.Fragment,null,we.createElement("div",{className:"tc mt50"},we.createElement("span",{className:"c-red font50 iconfont icon-hongsejingshi"}),we.createElement("br",null),"\u8EAB\u4EFD\u9A8C\u8BC1\u5BA1\u6838\u4E0D\u901A\u8FC7\u3002\u8BF7\u91CD\u65B0\u62CD\u7167\u9A8C\u8BC1\u3002"),we.createElement("div",{className:"mt20"},we.createElement(f.Z,null,we.createElement(h.Z,{className:"tr",flex:"430px"},"\u5931\u8D25\u539F\u56E0\uFF1A"),we.createElement(h.Z,null,me==null?void 0:me.identity_photo_comment)),we.createElement(f.Z,{className:"mt30"},we.createElement(h.Z,{className:"tr",flex:"430px"},"\u91C7\u96C6\u7167\u7247\uFF1A"),we.createElement(h.Z,null,we.createElement("img",{src:(0,w.Tv)(me==null?void 0:me.identity_photo_url),width:200}))),we.createElement(f.Z,null,we.createElement(h.Z,{className:"tr",flex:"430px"}),we.createElement(h.Z,null,we.createElement(p.ZP,{type:"primary",className:"mt50",onClick:()=>{var et;I(0),z(!1),se(!1),oe(!1),(et=Oe==null?void 0:Oe.current)==null||et.handlePlay()}},"\u91CD\u65B0\u8BA4\u8BC1")))))),A===2&&we.createElement(we.Fragment,null,we.createElement("div",{className:"tc mt50"},!(me!=null&&me.open_phone_video_recording)&&we.createElement(we.Fragment,null,(me==null?void 0:me.countdown_time)<=0?we.createElement(we.Fragment,null,we.createElement("div",{className:"tc mt50"},we.createElement("span",{className:"c-green font50 iconfont icon-tongguo"}),we.createElement("br",null),"\u8EAB\u4EFD\u9A8C\u8BC1\u5BA1\u6838\u901A\u8FC7\u3002")):"\u8003\u8BD5\u5373\u5C06\u5F00\u59CB\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85..."),(me==null?void 0:me.open_phone_video_recording)&&we.createElement(we.Fragment,null,(me==null?void 0:me.countdown_time)<=0?we.createElement("div",{className:"tc"},"\u6839\u636E\u8003\u8BD5\u89C4\u5B9A\uFF0C\u8BF7\u6253\u5F00\u5FAE\u4FE1\u626B\u4E00\u626B\uFF0C\u626B\u7801\u4E0B\u9762\u7684\u4E8C\u7EF4\u7801\u5F00\u542F\u624B\u673A\u5F55\u5236\u89C6\u9891",we.createElement("br",null),we.createElement("span",{className:"c-blue",style:{cursor:"default"},onClick:()=>{y.default.info({icon:null,title:"\u67E5\u770B\u64CD\u4F5C\u6307\u5F15",className:"custom-modal-divider",width:540,content:we.createElement(f.Z,null,we.createElement(h.Z,{flex:"178px"},we.createElement("img",{width:148,src:"/images/operation_guidance.png"})),we.createElement(h.Z,{flex:"1"},"\u8BF7\u70B9\u51FB\u53F3\u4E0A\u89D2\u201C\u2026\u201D\uFF0C\u9009\u62E9",we.createElement("span",{className:"c-orange"},"Safari\u4E2D\u6253\u5F00"),"\u6216\u8005",we.createElement("span",{className:"c-orange"},"\u201C\u5728\u9ED8\u8BA4\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00\u201D"),"\u540E\uFF0C\u6D4F\u89C8\u5668\u6253\u5F00\u540E\u8BF7\u70B9\u51FB\u5F00\u59CB\u5F55\u5236\u6309\u94AE\uFF0C\u53EF\u4EE5\u5F00\u542F\u624B\u673A\u5F55\u5236\u89C6\u9891\u3002"))})}},"\u5982\u82F9\u679C\u624B\u673A\u5FAE\u4FE1\u626B\u63CF\u4E8C\u7EF4\u7801\u540E\uFF0C\u51FA\u73B0\u70B9\u51FB\u5F00\u59CB\u5F55\u5236\u65E0\u54CD\u5E94\uFF0C\u8BF7\u67E5\u770B\u64CD\u4F5C\u6307\u5F15\u3002")):"\u8003\u8BD5\u5373\u5C06\u5F00\u59CB\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85...")),(me==null?void 0:me.open_phone_video_recording)&&we.createElement("div",{className:g.qrcode},we.createElement(v(),{value:`https://${document.domain}/live-push.html?id=${d.categoryId}&login=${d.login}&cookie=${(0,w.ej)("_educoder_session")}`})),(me==null?void 0:me.countdown_time)>0&&we.createElement("div",{className:"tc mt20"},we.createElement(Z0,{value:Date.now()+(me==null?void 0:me.countdown_time)*1e3,valueStyle:{color:"#cf1322",fontSize:40},onFinish:()=>{Ne()}})),we.createElement("div",{className:"tc mb30 mt50"},we.createElement(p.ZP,{type:"primary",onClick:()=>Pa(void 0,null,function*(){var et;const tt=yield Ne();tt!=null&&tt.can_start&&(tt==null?void 0:tt.countdown_time)<=0?((et=Oe==null?void 0:Oe.current)==null||et.handleRemove(),me!=null&&me.open_phone_video_recording?tt!=null&&tt.video_url&&setTimeout(()=>{location.href=`/classrooms/${d.coursesId}/exercise/${d.categoryId}/users/${d.login}`},300):setTimeout(()=>{location.href=`/classrooms/${d.coursesId}/exercise/${d.categoryId}/users/${d.login}`},300)):(tt==null?void 0:tt.countdown_time)>0?R.ZP.warning({content:"\u8003\u8BD5\u6682\u672A\u5F00\u59CB\uFF0C\u8BF7\u7A0D\u540E..."}):R.ZP.warning({content:"\u8BF7\u6253\u5F00\u5FAE\u4FE1\u626B\u4E00\u626B\uFF0C\u5F00\u542F\u624B\u673A\u89C6\u9891\u5F55\u5236"})})},"\u5F00\u59CB\u8003\u8BD5"))))};var $0=(0,st.connect)(({loading:n,user:t,exercise:e,globalSetting:r})=>({globalSetting:r,user:t,exercise:e,loading:n.effects}))(Y0)},47257:function(or){(function(mt){(function(Te){if(1)or.exports=Te();else var we})(function(){var Te,we,st;return function(){function o(M,R,p){function f(g,w){if(!R[g]){if(!M[g]){var c=void 0;if(!w&&c)return require(g,!0);if(h)return h(g,!0);var m=new Error("Cannot find module '"+g+"'");throw m.code="MODULE_NOT_FOUND",m}var v=R[g]={exports:{}};M[g][0].call(v.exports,function(b){var x=M[g][1][b];return f(x||b)},v,v.exports,o,M,R,p)}return R[g].exports}for(var h=void 0,y=0;y<p.length;y++)f(p[y]);return f}return o}()({1:[function(o,M,R){"use strict";var p=o("./browser/client");p.Buffer=o("buffer").Buffer,p.urllib=o("../shims/xhr"),p.version=o("./browser/version").version,M.exports=p},{"../shims/xhr":475,"./browser/client":3,"./browser/version":6,buffer:90}],2:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator")),h=p(o("@babel/runtime/helpers/asyncToGenerator"));o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js"),o("core-js/modules/es.array.slice.js");var y=o("assert"),g=o("../common/utils/checkBucketName"),w=g.checkBucketName,c=R;function m(b){return Array.isArray?Array.isArray(b):Object.prototype.toString.call(b)==="[object Array]"}function v(b){return b?m(b)?b:[b]:[]}c.useBucket=function(x){return w(x),this.options.bucket=x,this},c.setBucket=function(x){return w(x),this.options.bucket=x,this},c.getBucket=function(){return this.options.bucket},c.deleteBucket=function(){var b=(0,h.default)(f.default.mark(function T(S,C){var E,j;return f.default.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return E=this._bucketRequestParams("DELETE",S,"",C),P.next=3,this.request(E);case 3:if(j=P.sent,!(j.status===200||j.status===204)){P.next=6;break}return P.abrupt("return",{res:j.res});case 6:return P.next=8,this.requestError(j);case 8:throw P.sent;case 9:case"end":return P.stop()}},T,this)}));function x(T,S){return b.apply(this,arguments)}return x}(),c.putBucketACL=function(){var b=(0,h.default)(f.default.mark(function T(S,C,E){var j,Z;return f.default.wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:return j=this._bucketRequestParams("PUT",S,"acl",E),j.headers={"x-oss-acl":C},j.successStatuses=[200],Q.next=5,this.request(j);case 5:return Z=Q.sent,Q.abrupt("return",{bucket:Z.headers.location&&Z.headers.location.substring(1)||null,res:Z.res});case 7:case"end":return Q.stop()}},T,this)}));function x(T,S,C){return b.apply(this,arguments)}return x}(),c.getBucketACL=function(){var b=(0,h.default)(f.default.mark(function T(S,C){var E,j;return f.default.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return E=this._bucketRequestParams("GET",S,"acl",C),E.successStatuses=[200],E.xmlResponse=!0,P.next=5,this.request(E);case 5:return j=P.sent,P.abrupt("return",{acl:j.data.AccessControlList.Grant,owner:{id:j.data.Owner.ID,displayName:j.data.Owner.DisplayName},res:j.res});case 7:case"end":return P.stop()}},T,this)}));function x(T,S){return b.apply(this,arguments)}return x}(),c.putBucketLogging=function(){var b=(0,h.default)(f.default.mark(function T(S,C,E){var j,Z,P;return f.default.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return j=this._bucketRequestParams("PUT",S,"logging",E),Z=`<?xml version="1.0" encoding="UTF-8"?>
<BucketLoggingStatus>
<LoggingEnabled>
<TargetBucket>`.concat(S,`</TargetBucket>
`),C&&(Z+="<TargetPrefix>".concat(C,`</TargetPrefix>
`)),Z+=`</LoggingEnabled>
</BucketLoggingStatus>`,j.content=Z,j.mime="xml",j.successStatuses=[200],B.next=9,this.request(j);case 9:return P=B.sent,B.abrupt("return",{res:P.res});case 11:case"end":return B.stop()}},T,this)}));function x(T,S,C){return b.apply(this,arguments)}return x}(),c.getBucketLogging=function(){var b=(0,h.default)(f.default.mark(function T(S,C){var E,j,Z;return f.default.wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:return E=this._bucketRequestParams("GET",S,"logging",C),E.successStatuses=[200],E.xmlResponse=!0,Q.next=5,this.request(E);case 5:return j=Q.sent,Z=j.data.LoggingEnabled,Q.abrupt("return",{enable:!!Z,prefix:Z&&Z.TargetPrefix||null,res:j.res});case 8:case"end":return Q.stop()}},T,this)}));function x(T,S){return b.apply(this,arguments)}return x}(),c.deleteBucketLogging=function(){var b=(0,h.default)(f.default.mark(function T(S,C){var E,j;return f.default.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return E=this._bucketRequestParams("DELETE",S,"logging",C),E.successStatuses=[204,200],P.next=4,this.request(E);case 4:return j=P.sent,P.abrupt("return",{res:j.res});case 6:case"end":return P.stop()}},T,this)}));function x(T,S){return b.apply(this,arguments)}return x}(),c.putBucketCORS=function(){var b=(0,h.default)(f.default.mark(function T(S,C,E){var j,Z,P,Q,B,k,D,F,J,H;return f.default.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:for(C=C||[],y(C.length,"rules is required"),C.forEach(function(X){y(X.allowedOrigin,"allowedOrigin is required"),y(X.allowedMethod,"allowedMethod is required")}),j=this._bucketRequestParams("PUT",S,"cors",E),Z=`<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration>`,P=function(ee){Z+="<AllowedOrigin>".concat(ee,"</AllowedOrigin>")},Q=function(ee){Z+="<AllowedMethod>".concat(ee,"</AllowedMethod>")},B=function(ee){Z+="<AllowedHeader>".concat(ee,"</AllowedHeader>")},k=function(ee){Z+="<ExposeHeader>".concat(ee,"</ExposeHeader>")},D=0,F=C.length;D<F;D++)J=C[D],Z+="<CORSRule>",v(J.allowedOrigin).forEach(P),v(J.allowedMethod).forEach(Q),v(J.allowedHeader).forEach(B),v(J.exposeHeader).forEach(k),J.maxAgeSeconds&&(Z+="<MaxAgeSeconds>".concat(J.maxAgeSeconds,"</MaxAgeSeconds>")),Z+="</CORSRule>";return Z+="</CORSConfiguration>",j.content=Z,j.mime="xml",j.successStatuses=[200],_.next=16,this.request(j);case 16:return H=_.sent,_.abrupt("return",{res:H.res});case 18:case"end":return _.stop()}},T,this)}));function x(T,S,C){return b.apply(this,arguments)}return x}(),c.getBucketCORS=function(){var b=(0,h.default)(f.default.mark(function T(S,C){var E,j,Z,P;return f.default.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return E=this._bucketRequestParams("GET",S,"cors",C),E.successStatuses=[200],E.xmlResponse=!0,B.next=5,this.request(E);case 5:return j=B.sent,Z=[],j.data&&j.data.CORSRule&&(P=j.data.CORSRule,m(P)||(P=[P]),P.forEach(function(k){var D={};Object.keys(k).forEach(function(F){D[F.slice(0,1).toLowerCase()+F.slice(1,F.length)]=k[F]}),Z.push(D)})),B.abrupt("return",{rules:Z,res:j.res});case 9:case"end":return B.stop()}},T,this)}));function x(T,S){return b.apply(this,arguments)}return x}(),c.deleteBucketCORS=function(){var b=(0,h.default)(f.default.mark(function T(S,C){var E,j;return f.default.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return E=this._bucketRequestParams("DELETE",S,"cors",C),E.successStatuses=[204],P.next=4,this.request(E);case 4:return j=P.sent,P.abrupt("return",{res:j.res});case 6:case"end":return P.stop()}},T,this)}));function x(T,S){return b.apply(this,arguments)}return x}(),c.putBucketReferer=function(){var b=(0,h.default)(f.default.mark(function T(S,C,E,j){var Z,P,Q,B;return f.default.wrap(function(D){for(;;)switch(D.prev=D.next){case 0:if(Z=this._bucketRequestParams("PUT",S,"referer",j),P=`<?xml version="1.0" encoding="UTF-8"?>
<RefererConfiguration>
`,P+=" <AllowEmptyReferer>".concat(C?"true":"false",`</AllowEmptyReferer>
`),E&&E.length>0){for(P+=` <RefererList>
`,Q=0;Q<E.length;Q++)P+=" <Referer>".concat(E[Q],`</Referer>
`);P+=` </RefererList>
`}else P+=` <RefererList />
`;return P+="</RefererConfiguration>",Z.content=P,Z.mime="xml",Z.successStatuses=[200],D.next=10,this.request(Z);case 10:return B=D.sent,D.abrupt("return",{res:B.res});case 12:case"end":return D.stop()}},T,this)}));function x(T,S,C,E){return b.apply(this,arguments)}return x}(),c.getBucketReferer=function(){var b=(0,h.default)(f.default.mark(function T(S,C){var E,j,Z;return f.default.wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:return E=this._bucketRequestParams("GET",S,"referer",C),E.successStatuses=[200],E.xmlResponse=!0,Q.next=5,this.request(E);case 5:return j=Q.sent,Z=j.data.RefererList.Referer||null,Z&&(m(Z)||(Z=[Z])),Q.abrupt("return",{allowEmpty:j.data.AllowEmptyReferer==="true",referers:Z,res:j.res});case 9:case"end":return Q.stop()}},T,this)}));function x(T,S){return b.apply(this,arguments)}return x}(),c.deleteBucketReferer=function(){var b=(0,h.default)(f.default.mark(function T(S,C){return f.default.wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return j.next=2,this.putBucketReferer(S,!0,null,C);case 2:return j.abrupt("return",j.sent);case 3:case"end":return j.stop()}},T,this)}));function x(T,S){return b.apply(this,arguments)}return x}(),c._bucketRequestParams=function(x,T,S,C){return{method:x,bucket:T,subres:S,timeout:C&&C.timeout,ctx:C&&C.ctx}}},{"../common/utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,assert:82,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],3:[function(o,M,R){(function(p,f){(function(){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),y=h(o("@babel/runtime/regenerator")),g=h(o("@babel/runtime/helpers/asyncToGenerator"));o("core-js/modules/es.function.name.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.split.js"),o("core-js/modules/es.object.assign.js"),o("core-js/modules/es.array.includes.js"),o("core-js/modules/es.string.replace.js"),o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.symbol.js"),o("core-js/modules/es.symbol.description.js"),o("core-js/modules/es.array.slice.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.promise.js"),o("core-js/modules/es.regexp.to-string.js");var w=o("debug")("ali-oss"),c=o("xml2js"),m=o("agentkeepalive"),v=o("merge-descriptors"),b=o("platform"),x=o("utility"),T=o("urllib"),S=o("./version"),C=o("bowser"),E=o("../common/signUtils"),j=o("../common/client/initOptions"),Z=o("../common/utils/createRequest"),P=Z.createRequest,Q=o("../common/utils/encoder"),B=Q.encoder,k=o("../common/client/getReqUrl"),D=k.getReqUrl,F=o("../common/utils/setSTSToken"),J=F.setSTSToken,H=o("../common/utils/retry"),N=H.retry,_=o("../common/utils/isFunction"),X=_.isFunction,ee=new m;function ie(){var ve=b.name,xe=b.version;ve&&ve.toLowerCase&&ve.toLowerCase()==="ie"&&xe.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function he(){return location&&location.protocol==="https:"}function ne(ve,xe){if(ie(),!(this instanceof ne))return new ne(ve,xe);ve&&ve.inited?this.options=ve:this.options=ne.initOptions(ve),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=T,this.agent=this.options.agent||ee),this.ctx=xe,this.userAgent=this._getUserAgent(),this.stsTokenFreshTime=new Date,this.options.amendTimeSkewed=0}M.exports=ne,ne.initOptions=function(xe){xe.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var ce=Object.assign({secure:he(),useFetch:!1},xe);return j(ce)};var Ie=ne.prototype;Ie.debug=w,v(Ie,o("./object")),v(Ie,o("./bucket")),v(Ie,o("../common/bucket/getBucketWebsite")),v(Ie,o("../common/bucket/putBucketWebsite")),v(Ie,o("../common/bucket/deleteBucketWebsite")),v(Ie,o("../common/bucket/getBucketLifecycle")),v(Ie,o("../common/bucket/putBucketLifecycle")),v(Ie,o("../common/bucket/deleteBucketLifecycle")),v(Ie,o("../common/bucket/putBucketVersioning")),v(Ie,o("../common/bucket/getBucketVersioning")),v(Ie,o("../common/bucket/getBucketInventory")),v(Ie,o("../common/bucket/deleteBucketInventory")),v(Ie,o("../common/bucket/listBucketInventory")),v(Ie,o("../common/bucket/putBucketInventory")),v(Ie,o("../common/bucket/abortBucketWorm")),v(Ie,o("../common/bucket/completeBucketWorm")),v(Ie,o("../common/bucket/extendBucketWorm")),v(Ie,o("../common/bucket/getBucketWorm")),v(Ie,o("../common/bucket/initiateBucketWorm")),v(Ie,o("./managed-upload")),v(Ie,o("../common/multipart-copy")),v(Ie,o("../common/multipart")),v(Ie,o("../common/parallel")),Ie.signature=function(xe){return this.debug("authorization stringToSign: %s",xe,"info"),E.computeSignature(this.options.accessKeySecret,xe,this.options.headerEncoding)},Ie._getReqUrl=D,Ie.authorization=function(xe,ce,fe,ge){var Se=E.buildCanonicalString(xe.toUpperCase(),ce,{headers:ge,parameters:fe});return E.authorization(this.options.accessKeyId,this.options.accessKeySecret,Se,this.options.headerEncoding)},Ie.request=function(){var ve=(0,g.default)(y.default.mark(function xe(ce){var fe=this;return y.default.wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:if(!this.options.retryMax){Se.next=6;break}return Se.next=3,N(q.bind(this),this.options.retryMax,{errorHandler:function(ke){var de=function(ye){if(ce.stream)return!1;var V=[-1,-2].includes(ye.status),G=fe.options.requestErrorRetryHandle||function(){return!0};return V&&G(ye)};return!!de(ke)}})(ce);case 3:return Se.abrupt("return",Se.sent);case 6:return Se.abrupt("return",q.call(this,ce));case 7:case"end":return Se.stop()}},xe,this)}));return function(xe){return ve.apply(this,arguments)}}();function q(ve){return pe.apply(this,arguments)}function pe(){return pe=(0,g.default)(y.default.mark(function ve(xe){var ce,fe,ge,Se,De,ke;return y.default.wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:if(!(this.options.stsToken&&X(this.options.refreshSTSToken))){Y.next=3;break}return Y.next=3,J.call(this);case 3:return ce=P.call(this,xe),this.options.useFetch||(ce.params.mode="disable-fetch"),Se=!!xe.stream,Y.prev=6,Y.next=9,this.urllib.request(ce.url,ce.params);case 9:fe=Y.sent,this.debug("response %s %s, got %s, headers: %j",xe.method,ce.url,fe.status,fe.headers,"info"),Y.next=16;break;case 13:Y.prev=13,Y.t0=Y.catch(6),ge=Y.t0;case 16:if(!(fe&&xe.successStatuses&&xe.successStatuses.indexOf(fe.status)===-1)){Y.next=28;break}return Y.next=19,this.requestError(fe);case 19:if(De=Y.sent,!(De.code==="RequestTimeTooSkewed"&&!Se)){Y.next=25;break}return this.options.amendTimeSkewed=+new Date(De.serverTime)-new Date,Y.next=24,this.request(xe);case 24:return Y.abrupt("return",Y.sent);case 25:De.params=xe,Y.next=32;break;case 28:if(!ge){Y.next=32;break}return Y.next=31,this.requestError(ge);case 31:De=Y.sent;case 32:if(!De){Y.next=34;break}throw De;case 34:if(!xe.xmlResponse){Y.next=39;break}return Y.next=37,this.parseXML(fe.data);case 37:ke=Y.sent,fe.data=ke;case 39:return Y.abrupt("return",fe);case 40:case"end":return Y.stop()}},ve,this,[[6,13]])})),pe.apply(this,arguments)}Ie._getResource=function(xe){var ce="/";return xe.bucket&&(ce+="".concat(xe.bucket,"/")),xe.object&&(ce+=B(xe.object,this.options.headerEncoding)),ce},Ie._escape=function(xe){return x.encodeURIComponent(xe).replace(/%2F/g,"/")},Ie._getUserAgent=function(){var xe=f&&f.browser?"js":"nodejs",ce="aliyun-sdk-".concat(xe,"/").concat(S.version),fe=b.description;return!fe&&f&&(fe="Node.js ".concat(f.version.slice(1)," on ").concat(f.platform," ").concat(f.arch)),this._checkUserAgent("".concat(ce," ").concat(fe))},Ie._checkUserAgent=function(xe){var ce=xe.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return ce},Ie.checkBrowserAndVersion=function(xe,ce){return C.name===xe&&C.version.split(".")[0]===ce},Ie.parseXML=function(xe){return new Promise(function(ce,fe){p.isBuffer(xe)&&(xe=xe.toString()),c.parseString(xe,{explicitRoot:!1,explicitArray:!1},function(ge,Se){ge?fe(ge):ce(Se)})})},Ie.requestError=function(){var ve=(0,g.default)(y.default.mark(function ce(fe){var ge,Se,De,ke;return y.default.wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:if(ge=null,!(!fe.data||!fe.data.length)){Y.next=5;break}fe.status===-1||fe.status===-2?(ge=new Error(fe.message),ge.name=fe.name,ge.status=fe.status,ge.code=fe.name):(fe.status===404?(ge=new Error("Object not exists"),ge.name="NoSuchKeyError",ge.status=404,ge.code="NoSuchKey"):fe.status===412?(ge=new Error("Pre condition failed"),ge.name="PreconditionFailedError",ge.status=412,ge.code="PreconditionFailed"):(ge=new Error("Unknow error, status: ".concat(fe.status)),ge.name="UnknownError",ge.status=fe.status),ge.requestId=fe.headers["x-oss-request-id"],ge.host=""),Y.next=32;break;case 5:return Se=String(fe.data),this.debug("request response error data: %s",Se,"error"),Y.prev=7,Y.next=10,this.parseXML(Se);case 10:if(Y.t0=Y.sent,Y.t0){Y.next=13;break}Y.t0={};case 13:De=Y.t0,Y.next=23;break;case 16:return Y.prev=16,Y.t1=Y.catch(7),this.debug(Se,"error"),Y.t1.message+=`
raw xml: `.concat(Se),Y.t1.status=fe.status,Y.t1.requestId=fe.headers["x-oss-request-id"],Y.abrupt("return",Y.t1);case 23:ke=De.Message||"unknow request error, status: ".concat(fe.status),De.Condition&&(ke+=" (condition: ".concat(De.Condition,")")),ge=new Error(ke),ge.name=De.Code?"".concat(De.Code,"Error"):"UnknownError",ge.status=fe.status,ge.code=De.Code,ge.requestId=De.RequestId,ge.hostId=De.HostId,ge.serverTime=De.ServerTime;case 32:return this.debug("generate error %j",ge,"error"),Y.abrupt("return",ge);case 34:case"end":return Y.stop()}},ce,this,[[7,16]])}));function xe(ce){return ve.apply(this,arguments)}return xe}()}).call(this)}).call(this,{isBuffer:o("../../node_modules/is-buffer/index.js")},o("_process"))},{"../../node_modules/is-buffer/index.js":366,"../common/bucket/abortBucketWorm":7,"../common/bucket/completeBucketWorm":8,"../common/bucket/deleteBucketInventory":9,"../common/bucket/deleteBucketLifecycle":10,"../common/bucket/deleteBucketWebsite":11,"../common/bucket/extendBucketWorm":12,"../common/bucket/getBucketInventory":13,"../common/bucket/getBucketLifecycle":14,"../common/bucket/getBucketVersioning":15,"../common/bucket/getBucketWebsite":16,"../common/bucket/getBucketWorm":17,"../common/bucket/initiateBucketWorm":18,"../common/bucket/listBucketInventory":19,"../common/bucket/putBucketInventory":20,"../common/bucket/putBucketLifecycle":21,"../common/bucket/putBucketVersioning":22,"../common/bucket/putBucketWebsite":23,"../common/client/getReqUrl":25,"../common/client/initOptions":26,"../common/multipart":30,"../common/multipart-copy":29,"../common/parallel":49,"../common/signUtils":50,"../common/utils/createRequest":56,"../common/utils/encoder":59,"../common/utils/isFunction":68,"../common/utils/retry":74,"../common/utils/setSTSToken":76,"./bucket":2,"./managed-upload":4,"./object":5,"./version":6,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,agentkeepalive:81,bowser:88,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/es.string.split.js":307,"core-js/modules/es.symbol.description.js":310,"core-js/modules/es.symbol.js":313,debug:465,"merge-descriptors":372,platform:379,urllib:475,utility:474,xml2js:426}],4:[function(o,M,R){(function(p){(function(){"use strict";var f=o("@babel/runtime/helpers/interopRequireDefault"),h=f(o("@babel/runtime/regenerator"));o("core-js/modules/es.function.name.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.promise.js"),o("core-js/modules/es.array.from.js"),o("core-js/modules/es.string.iterator.js"),o("core-js/modules/es.array.map.js"),o("core-js/modules/es.array.filter.js"),o("core-js/modules/es.array.find.js"),o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.regexp.to-string.js"),o("core-js/modules/es.array.slice.js"),o("core-js/modules/es.array.iterator.js"),o("core-js/modules/es.array-buffer.slice.js"),o("core-js/modules/es.typed-array.uint8-array.js"),o("core-js/modules/es.typed-array.copy-within.js"),o("core-js/modules/es.typed-array.every.js"),o("core-js/modules/es.typed-array.fill.js"),o("core-js/modules/es.typed-array.filter.js"),o("core-js/modules/es.typed-array.find.js"),o("core-js/modules/es.typed-array.find-index.js"),o("core-js/modules/es.typed-array.for-each.js"),o("core-js/modules/es.typed-array.includes.js"),o("core-js/modules/es.typed-array.index-of.js"),o("core-js/modules/es.typed-array.iterator.js"),o("core-js/modules/es.typed-array.join.js"),o("core-js/modules/es.typed-array.last-index-of.js"),o("core-js/modules/es.typed-array.map.js"),o("core-js/modules/es.typed-array.reduce.js"),o("core-js/modules/es.typed-array.reduce-right.js"),o("core-js/modules/es.typed-array.reverse.js"),o("core-js/modules/es.typed-array.set.js"),o("core-js/modules/es.typed-array.slice.js"),o("core-js/modules/es.typed-array.some.js"),o("core-js/modules/es.typed-array.sort.js"),o("core-js/modules/es.typed-array.subarray.js"),o("core-js/modules/es.typed-array.to-locale-string.js"),o("core-js/modules/es.typed-array.to-string.js");var y=f(o("@babel/runtime/helpers/asyncToGenerator")),g=o("util"),w=o("path"),c=o("mime"),m=o("copy-to"),v=o("../common/utils/isBlob"),b=v.isBlob,x=o("../common/utils/isFile"),T=x.isFile,S=o("../common/utils/isBuffer"),C=S.isBuffer,E=R;E.multipartUpload=function(){var B=(0,y.default)(h.default.mark(function D(F,J){var H,N,_,X,ee,ie,he,ne,Ie,q=arguments;return h.default.wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:if(H=q.length>2&&q[2]!==void 0?q[2]:{},this.resetCancelFlag(),H.disabledMD5=H.disabledMD5===void 0?!0:!!H.disabledMD5,!(H.checkpoint&&H.checkpoint.uploadId)){ve.next=8;break}return J&&T(J)&&(H.checkpoint.file=J),ve.next=7,this._resumeMultipart(H.checkpoint,H);case 7:return ve.abrupt("return",ve.sent);case 8:return N=102400,H.mime||(T(J)?H.mime=c.getType(w.extname(J.name)):b(J)?H.mime=J.type:C(J)?H.mime="":H.mime=c.getType(w.extname(J))),H.headers=H.headers||{},this._convertMetaToHeaders(H.meta,H.headers),ve.next=14,this._getFileSize(J);case 14:if(_=ve.sent,!(_<N)){ve.next=26;break}return H.contentLength=_,ve.next=19,this.put(F,J,H);case 19:if(X=ve.sent,!(H&&H.progress)){ve.next=23;break}return ve.next=23,H.progress(1);case 23:return ee={res:X.res,bucket:this.options.bucket,name:F,etag:X.res.headers.etag},(H.headers&&H.headers["x-oss-callback"]||H.callback)&&(ee.data=X.data),ve.abrupt("return",ee);case 26:if(!(H.partSize&&parseInt(H.partSize,10)!==H.partSize)){ve.next=28;break}throw new Error("partSize must be int number");case 28:if(!(H.partSize&&H.partSize<N)){ve.next=30;break}throw new Error("partSize must not be smaller than ".concat(N));case 30:return ve.next=32,this.initMultipartUpload(F,H);case 32:if(ie=ve.sent,he=ie.uploadId,ne=this._getPartSize(_,H.partSize),Ie={file:J,name:F,fileSize:_,partSize:ne,uploadId:he,doneParts:[]},!(H&&H.progress)){ve.next=39;break}return ve.next=39,H.progress(0,Ie,ie.res);case 39:return ve.next=41,this._resumeMultipart(Ie,H);case 41:return ve.abrupt("return",ve.sent);case 42:case"end":return ve.stop()}},D,this)}));function k(D,F){return B.apply(this,arguments)}return k}(),E._resumeMultipart=function(){var B=(0,y.default)(h.default.mark(function D(F,J){var H,N,_,X,ee,ie,he,ne,Ie,q,pe,ve,xe,ce,fe,ge,Se,De,ke;return h.default.wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:if(H=this,!this.isCancel()){Y.next=3;break}throw this._makeCancelEvent();case 3:return N=F.file,_=F.fileSize,X=F.partSize,ee=F.uploadId,ie=F.doneParts,he=F.name,ne=[],ie.length>0&&m(ie).to(ne),Ie=this._divideParts(_,X),q=Ie.length,pe=!1,ve=function(V,G){return new Promise(function(){var W=(0,y.default)(h.default.mark(function K(te,U){var L,$,ue,Ee,ze;return h.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:if(le.prev=0,V.isCancel()){le.next=29;break}return L=Ie[G-1],le.next=5,V._createBuffer(N,L.start,L.end);case 5:return $=le.sent,ue={content:$,size:L.end-L.start},le.prev=7,le.next=10,V._uploadPart(he,ee,G,ue,J);case 10:Ee=le.sent,le.next=18;break;case 13:if(le.prev=13,le.t0=le.catch(7),le.t0.status!==404){le.next=17;break}throw V._makeAbortEvent();case 17:throw le.t0;case 18:if(!(!V.isCancel()&&!pe)){le.next=26;break}if(F.doneParts.push({number:G,etag:Ee.res.headers.etag}),!J.progress){le.next=23;break}return le.next=23,J.progress(ie.length/(q+1),F,Ee.res);case 23:te({number:G,etag:Ee.res.headers.etag}),le.next=27;break;case 26:te();case 27:le.next=30;break;case 29:te();case 30:le.next=41;break;case 32:le.prev=32,le.t1=le.catch(0),ze=new Error,ze.name=le.t1.name,ze.message=le.t1.message,ze.stack=le.t1.stack,ze.partNum=G,m(le.t1).to(ze),U(ze);case 41:case"end":return le.stop()}},K,null,[[0,32],[7,13]])}));return function(K,te){return W.apply(this,arguments)}}())},xe=Array.from(new Array(q),function(ye,V){return V+1}),ce=ne.map(function(ye){return ye.number}),fe=xe.filter(function(ye){return ce.indexOf(ye)<0}),ge=5,Se=J.parallel||ge,Y.next=17,this._parallel(fe,Se,function(ye){return new Promise(function(V,G){ve(H,ye).then(function(W){W&&ne.push(W),V()}).catch(function(W){G(W)})})});case 17:if(De=Y.sent,pe=!0,ke=De.find(function(ye){return ye.name==="abort"}),!ke){Y.next=22;break}throw ke;case 22:if(!this.isCancel()){Y.next=25;break}throw ve=null,this._makeCancelEvent();case 25:if(!(De&&De.length>0)){Y.next=28;break}throw De[0].message="Failed to upload some parts with error: ".concat(De[0].toString()," part_num: ").concat(De[0].partNum),De[0];case 28:return Y.next=30,this.completeMultipartUpload(he,ee,ne,J);case 30:return Y.abrupt("return",Y.sent);case 31:case"end":return Y.stop()}},D,this)}));function k(D,F){return B.apply(this,arguments)}return k}(),E._getFileSize=function(){var B=(0,y.default)(h.default.mark(function D(F){return h.default.wrap(function(H){for(;;)switch(H.prev=H.next){case 0:if(!C(F)){H.next=4;break}return H.abrupt("return",F.length);case 4:if(!(b(F)||T(F))){H.next=6;break}return H.abrupt("return",F.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return H.stop()}},D)}));function k(D){return B.apply(this,arguments)}return k}();var j=o("stream"),Z=j.Readable;function P(B,k){if(!(this instanceof P))return new P(B,k);Z.call(this,k),this.file=B,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}g.inherits(P,Z),P.prototype.readFileAndPush=function(k){if(this.fileBuffer)for(var D=!0;D&&this.fileBuffer&&this.start<this.fileBuffer.length;){var F=this.start,J=F+k;J=J>this.fileBuffer.length?this.fileBuffer.length:J,this.start=J,D=this.push(this.fileBuffer.slice(F,J))}},P.prototype._read=function(k){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file){this.finish||(this.fileBuffer=null,this.finish=!0),this.push(null);return}var D=16*1024;k=k||D;var F=this;this.reader.onload=function(H){F.fileBuffer=p.from(new Uint8Array(H.target.result)),F.file=null,F.readFileAndPush(k)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(k)};function Q(B){return B.arrayBuffer?B.arrayBuffer():new Promise(function(k,D){var F=new FileReader;F.onload=function(J){k(J.target.result)},F.onerror=function(J){D(J)},F.readAsArrayBuffer(B)})}E._createBuffer=function(){var B=(0,y.default)(h.default.mark(function D(F,J,H){var N,_;return h.default.wrap(function(ee){for(;;)switch(ee.prev=ee.next){case 0:if(!(b(F)||T(F))){ee.next=8;break}return N=F.slice(J,H),ee.next=4,Q(N);case 4:return _=ee.sent,ee.abrupt("return",p.from(_));case 8:if(!C(F)){ee.next=12;break}return ee.abrupt("return",F.subarray(J,H));case 12:throw new Error("_createBuffer requires File/Blob/Buffer.");case 13:case"end":return ee.stop()}},D)}));function k(D,F,J){return B.apply(this,arguments)}return k}(),E._getPartSize=function(k,D){var F=1e4,J=1*1024*1024;D||(D=J);var H=Math.ceil(k/F);return D<H&&(D=H,console.warn("partSize has been set to ".concat(D,", because the partSize you provided causes partNumber to be greater than 10,000"))),D},E._divideParts=function(k,D){for(var F=Math.ceil(k/D),J=[],H=0;H<F;H++){var N=D*H,_=Math.min(N+D,k);J.push({start:N,end:_})}return J}}).call(this)}).call(this,o("buffer").Buffer)},{"../common/utils/isBlob":64,"../common/utils/isBuffer":65,"../common/utils/isFile":67,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,buffer:90,"copy-to":94,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.map.js":280,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.iterator.js":303,"core-js/modules/es.typed-array.copy-within.js":315,"core-js/modules/es.typed-array.every.js":316,"core-js/modules/es.typed-array.fill.js":317,"core-js/modules/es.typed-array.filter.js":318,"core-js/modules/es.typed-array.find-index.js":319,"core-js/modules/es.typed-array.find.js":320,"core-js/modules/es.typed-array.for-each.js":321,"core-js/modules/es.typed-array.includes.js":322,"core-js/modules/es.typed-array.index-of.js":323,"core-js/modules/es.typed-array.iterator.js":324,"core-js/modules/es.typed-array.join.js":325,"core-js/modules/es.typed-array.last-index-of.js":326,"core-js/modules/es.typed-array.map.js":327,"core-js/modules/es.typed-array.reduce-right.js":328,"core-js/modules/es.typed-array.reduce.js":329,"core-js/modules/es.typed-array.reverse.js":330,"core-js/modules/es.typed-array.set.js":331,"core-js/modules/es.typed-array.slice.js":332,"core-js/modules/es.typed-array.some.js":333,"core-js/modules/es.typed-array.sort.js":334,"core-js/modules/es.typed-array.subarray.js":335,"core-js/modules/es.typed-array.to-locale-string.js":336,"core-js/modules/es.typed-array.to-string.js":337,"core-js/modules/es.typed-array.uint8-array.js":338,mime:374,path:378,stream:398,util:419}],5:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault");o("core-js/modules/es.function.name.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.regexp.to-string.js"),o("core-js/modules/es.array.map.js"),o("core-js/modules/es.number.constructor.js"),o("core-js/modules/es.object.assign.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.replace.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js"),o("core-js/modules/es.promise.js");var f=p(o("@babel/runtime/regenerator")),h=p(o("@babel/runtime/helpers/asyncToGenerator")),y=o("fs"),g=o("copy-to"),w=o("path"),c=o("mime"),m=o("../common/callback"),v=o("merge-descriptors"),b=o("../common/utils/isBlob"),x=b.isBlob,T=o("../common/utils/isFile"),S=T.isFile,C=o("../common/utils/isBuffer"),E=C.isBuffer,j=o("../common/utils/obj2xml"),Z=j.obj2xml,P=R;P.append=function(){var Q=(0,h.default)(f.default.mark(function k(D,F,J){var H;return f.default.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return J=J||{},J.position===void 0&&(J.position="0"),J.subres={append:"",position:J.position},J.method="POST",_.next=6,this.put(D,F,J);case 6:return H=_.sent,H.nextAppendPosition=H.res.headers["x-oss-next-append-position"],_.abrupt("return",H);case 9:case"end":return _.stop()}},k,this)}));function B(k,D,F){return Q.apply(this,arguments)}return B}(),P.put=function(){var Q=(0,h.default)(f.default.mark(function k(D,F,J){var H,N,_,X,ee;return f.default.wrap(function(he){for(;;)switch(he.prev=he.next){case 0:if(J=J||{},J.disabledMD5=J.disabledMD5===void 0?!0:!!J.disabledMD5,J.headers=J.headers||{},D=this._objectName(D),!E(F)){he.next=8;break}H=F,he.next=19;break;case 8:if(!(x(F)||S(F))){he.next=18;break}return J.mime||(S(F)?J.mime=c.getType(w.extname(F.name)):J.mime=F.type),he.next=12,this._createBuffer(F,0,F.size);case 12:return H=he.sent,he.next=15,this._getFileSize(F);case 15:J.contentLength=he.sent,he.next=19;break;case 18:throw new TypeError("Must provide Buffer/Blob/File for put.");case 19:return this._convertMetaToHeaders(J.meta,J.headers),N=J.method||"PUT",_=this._objectRequestParams(N,D,J),m.encodeCallback(_,J),_.mime=J.mime,_.disabledMD5=J.disabledMD5,_.content=H,_.successStatuses=[200],he.next=29,this.request(_);case 29:return X=he.sent,ee={name:D,url:this._objectUrl(D),res:X.res},_.headers&&_.headers["x-oss-callback"]&&(ee.data=JSON.parse(X.data.toString())),he.abrupt("return",ee);case 33:case"end":return he.stop()}},k,this)}));function B(k,D,F){return Q.apply(this,arguments)}return B}(),P.putStream=function(){var Q=(0,h.default)(f.default.mark(function k(D,F,J){var H,N,_,X;return f.default.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return J=J||{},J.headers=J.headers||{},D=this._objectName(D),J.contentLength?J.headers["Content-Length"]=J.contentLength:J.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(J.meta,J.headers),H=J.method||"PUT",N=this._objectRequestParams(H,D,J),m.encodeCallback(N,J),N.mime=J.mime,N.stream=F,N.successStatuses=[200],ie.next=13,this.request(N);case 13:return _=ie.sent,X={name:D,url:this._objectUrl(D),res:_.res},N.headers&&N.headers["x-oss-callback"]&&(X.data=JSON.parse(_.data.toString())),ie.abrupt("return",X);case 17:case"end":return ie.stop()}},k,this)}));function B(k,D,F){return Q.apply(this,arguments)}return B}(),v(P,o("../common/object/copyObject")),v(P,o("../common/object/getObjectTagging")),v(P,o("../common/object/putObjectTagging")),v(P,o("../common/object/deleteObjectTagging")),v(P,o("../common/image")),v(P,o("../common/object/getBucketVersions")),v(P,o("../common/object/getACL")),v(P,o("../common/object/putACL")),v(P,o("../common/object/head")),v(P,o("../common/object/delete")),v(P,o("../common/object/get")),v(P,o("../common/object/putSymlink")),v(P,o("../common/object/getSymlink")),v(P,o("../common/object/deleteMulti")),v(P,o("../common/object/getObjectMeta")),v(P,o("../common/object/getObjectUrl")),v(P,o("../common/object/generateObjectUrl")),v(P,o("../common/object/signatureUrl")),v(P,o("../common/object/asyncSignatureUrl")),P.putMeta=function(){var Q=(0,h.default)(f.default.mark(function k(D,F,J){var H;return f.default.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return _.next=2,this.copy(D,D,{meta:F||{},timeout:J&&J.timeout,ctx:J&&J.ctx});case 2:return H=_.sent,_.abrupt("return",H);case 4:case"end":return _.stop()}},k,this)}));function B(k,D,F){return Q.apply(this,arguments)}return B}(),P.list=function(){var Q=(0,h.default)(f.default.mark(function k(D,F){var J,H,N,_,X;return f.default.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return J=this._objectRequestParams("GET","",F),J.query=D,J.xmlResponse=!0,J.successStatuses=[200],ie.next=6,this.request(J);case 6:return H=ie.sent,N=H.data.Contents||[],_=this,N&&(Array.isArray(N)||(N=[N]),N=N.map(function(he){return{name:he.Key,url:_._objectUrl(he.Key),lastModified:he.LastModified,etag:he.ETag,type:he.Type,size:Number(he.Size),storageClass:he.StorageClass,owner:{id:he.Owner.ID,displayName:he.Owner.DisplayName}}})),X=H.data.CommonPrefixes||null,X&&(Array.isArray(X)||(X=[X]),X=X.map(function(he){return he.Prefix})),ie.abrupt("return",{res:H.res,objects:N,prefixes:X,nextMarker:H.data.NextMarker||null,isTruncated:H.data.IsTruncated==="true"});case 13:case"end":return ie.stop()}},k,this)}));function B(k,D){return Q.apply(this,arguments)}return B}(),P.listV2=function(){var Q=(0,h.default)(f.default.mark(function k(D){var F,J,H,N,_,X,ee,ie=arguments;return f.default.wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:return F=ie.length>1&&ie[1]!==void 0?ie[1]:{},J=D["continuation-token"]||D.continuationToken,J&&(F.subres=Object.assign({"continuation-token":J},F.subres)),H=this._objectRequestParams("GET","",F),H.query=Object.assign({"list-type":2},D),delete H.query["continuation-token"],delete H.query.continuationToken,H.xmlResponse=!0,H.successStatuses=[200],ne.next=11,this.request(H);case 11:return N=ne.sent,_=N.data.Contents||[],X=this,_&&(Array.isArray(_)||(_=[_]),_=_.map(function(Ie){var q=null;return Ie.Owner&&(q={id:Ie.Owner.ID,displayName:Ie.Owner.DisplayName}),{name:Ie.Key,url:X._objectUrl(Ie.Key),lastModified:Ie.LastModified,etag:Ie.ETag,type:Ie.Type,size:Number(Ie.Size),storageClass:Ie.StorageClass,owner:q}})),ee=N.data.CommonPrefixes||null,ee&&(Array.isArray(ee)||(ee=[ee]),ee=ee.map(function(Ie){return Ie.Prefix})),ne.abrupt("return",{res:N.res,objects:_,prefixes:ee,isTruncated:N.data.IsTruncated==="true",keyCount:+N.data.KeyCount,continuationToken:N.data.ContinuationToken||null,nextContinuationToken:N.data.NextContinuationToken||null});case 18:case"end":return ne.stop()}},k,this)}));function B(k){return Q.apply(this,arguments)}return B}(),P.restore=function(){var Q=(0,h.default)(f.default.mark(function k(D){var F,J,H,N,_=arguments;return f.default.wrap(function(ee){for(;;)switch(ee.prev=ee.next){case 0:return F=_.length>1&&_[1]!==void 0?_[1]:{type:"Archive"},F=F||{},F.subres=Object.assign({restore:""},F.subres),F.versionId&&(F.subres.versionId=F.versionId),J=this._objectRequestParams("POST",D,F),F.type==="ColdArchive"&&(H={RestoreRequest:{Days:F.Days?F.Days:2,JobParameters:{Tier:F.JobParameters?F.JobParameters:"Standard"}}},J.content=Z(H,{headers:!0}),J.mime="xml"),J.successStatuses=[202],ee.next=9,this.request(J);case 9:return N=ee.sent,ee.abrupt("return",{res:N.res});case 11:case"end":return ee.stop()}},k,this)}));function B(k){return Q.apply(this,arguments)}return B}(),P._objectUrl=function(B){return this._getReqUrl({bucket:this.options.bucket,object:B})},P._objectRequestParams=function(B,k,D){if(!this.options.bucket&&!this.options.cname)throw new Error("Please create a bucket first");D=D||{},k=this._objectName(k);var F={object:k,bucket:this.options.bucket,method:B,subres:D&&D.subres,timeout:D&&D.timeout,ctx:D&&D.ctx};return D.headers&&(F.headers={},g(D.headers).to(F.headers)),F},P._objectName=function(B){return B.replace(/^\/+/,"")},P._convertMetaToHeaders=function(B,k){B&&Object.keys(B).forEach(function(D){k["x-oss-meta-".concat(D)]=B[D]})},P._deleteFileSafe=function(B){var k=this;return new Promise(function(D){y.exists(B,function(F){F?y.unlink(B,function(J){J&&k.debug("unlink %j error: %s",B,J,"error"),D()}):D()})})}},{"../common/callback":24,"../common/image":27,"../common/object/asyncSignatureUrl":31,"../common/object/copyObject":32,"../common/object/delete":33,"../common/object/deleteMulti":34,"../common/object/deleteObjectTagging":35,"../common/object/generateObjectUrl":36,"../common/object/get":37,"../common/object/getACL":38,"../common/object/getBucketVersions":39,"../common/object/getObjectMeta":40,"../common/object/getObjectTagging":41,"../common/object/getObjectUrl":42,"../common/object/getSymlink":43,"../common/object/head":44,"../common/object/putACL":45,"../common/object/putObjectTagging":46,"../common/object/putSymlink":47,"../common/object/signatureUrl":48,"../common/utils/isBlob":64,"../common/utils/isBuffer":65,"../common/utils/isFile":67,"../common/utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.number.constructor.js":286,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339,fs:89,"merge-descriptors":372,mime:374,path:378}],6:[function(o,M,R){"use strict";R.version="6.18.1"},{}],7:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator")),h=p(o("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(R,"__esModule",{value:!0}),R.abortBucketWorm=void 0;var y=o("../utils/checkBucketName");function g(c,m){return w.apply(this,arguments)}function w(){return w=(0,h.default)(f.default.mark(function c(m,v){var b,x;return f.default.wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return y.checkBucketName(m),b=this._bucketRequestParams("DELETE",m,"worm",v),S.next=4,this.request(b);case 4:return x=S.sent,S.abrupt("return",{res:x.res,status:x.status});case 6:case"end":return S.stop()}},c,this)})),w.apply(this,arguments)}R.abortBucketWorm=g},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],8:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator")),h=p(o("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(R,"__esModule",{value:!0}),R.completeBucketWorm=void 0;var y=o("../utils/checkBucketName");function g(c,m,v){return w.apply(this,arguments)}function w(){return w=(0,h.default)(f.default.mark(function c(m,v,b){var x,T;return f.default.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return y.checkBucketName(m),x=this._bucketRequestParams("POST",m,{wormId:v},b),C.next=4,this.request(x);case 4:return T=C.sent,C.abrupt("return",{res:T.res,status:T.status});case 6:case"end":return C.stop()}},c,this)})),w.apply(this,arguments)}R.completeBucketWorm=g},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],9:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(R,"__esModule",{value:!0}),R.deleteBucketInventory=void 0;var y=o("../utils/checkBucketName");function g(c,m){return w.apply(this,arguments)}function w(){return w=(0,h.default)(f.default.mark(function c(m,v){var b,x,T,S,C=arguments;return f.default.wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return b=C.length>2&&C[2]!==void 0?C[2]:{},x=Object.assign({inventory:"",inventoryId:v},b.subres),y.checkBucketName(m),T=this._bucketRequestParams("DELETE",m,x,b),T.successStatuses=[204],j.next=7,this.request(T);case 7:return S=j.sent,j.abrupt("return",{status:S.status,res:S.res});case 9:case"end":return j.stop()}},c,this)})),w.apply(this,arguments)}R.deleteBucketInventory=g},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],10:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator")),h=p(o("@babel/runtime/helpers/asyncToGenerator")),y=o("../utils/checkBucketName"),g=y.checkBucketName,w=R;w.deleteBucketLifecycle=function(){var c=(0,h.default)(f.default.mark(function v(b,x){var T,S;return f.default.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return g(b),T=this._bucketRequestParams("DELETE",b,"lifecycle",x),T.successStatuses=[204],E.next=5,this.request(T);case 5:return S=E.sent,E.abrupt("return",{res:S.res});case 7:case"end":return E.stop()}},v,this)}));function m(v,b){return c.apply(this,arguments)}return m}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],11:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator")),h=p(o("@babel/runtime/helpers/asyncToGenerator")),y=o("../utils/checkBucketName"),g=y.checkBucketName,w=R;w.deleteBucketWebsite=function(){var c=(0,h.default)(f.default.mark(function v(b,x){var T,S;return f.default.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return g(b),T=this._bucketRequestParams("DELETE",b,"website",x),T.successStatuses=[204],E.next=5,this.request(T);case 5:return S=E.sent,E.abrupt("return",{res:S.res});case 7:case"end":return E.stop()}},v,this)}));function m(v,b){return c.apply(this,arguments)}return m}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],12:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator")),h=p(o("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(R,"__esModule",{value:!0}),R.extendBucketWorm=void 0;var y=o("../utils/checkBucketName"),g=o("../utils/obj2xml");function w(m,v,b,x){return c.apply(this,arguments)}function c(){return c=(0,h.default)(f.default.mark(function m(v,b,x,T){var S,C,E;return f.default.wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return y.checkBucketName(v),S=this._bucketRequestParams("POST",v,{wormExtend:"",wormId:b},T),C={ExtendWormConfiguration:{RetentionPeriodInDays:x}},S.mime="xml",S.content=g.obj2xml(C,{headers:!0}),S.successStatuses=[200],Z.next=8,this.request(S);case 8:return E=Z.sent,Z.abrupt("return",{res:E.res,status:E.status});case 10:case"end":return Z.stop()}},m,this)})),c.apply(this,arguments)}R.extendBucketWorm=w},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],13:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(R,"__esModule",{value:!0}),R.getBucketInventory=void 0;var y=o("../utils/checkBucketName"),g=o("../utils/formatInventoryConfig");function w(m,v){return c.apply(this,arguments)}function c(){return c=(0,h.default)(f.default.mark(function m(v,b){var x,T,S,C,E=arguments;return f.default.wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return x=E.length>2&&E[2]!==void 0?E[2]:{},T=Object.assign({inventory:"",inventoryId:b},x.subres),y.checkBucketName(v),S=this._bucketRequestParams("GET",v,T,x),S.successStatuses=[200],S.xmlResponse=!0,Z.next=8,this.request(S);case 8:return C=Z.sent,Z.abrupt("return",{status:C.status,res:C.res,inventory:g.formatInventoryConfig(C.data)});case 10:case"end":return Z.stop()}},m,this)})),c.apply(this,arguments)}R.getBucketInventory=w},{"../utils/checkBucketName":51,"../utils/formatInventoryConfig":60,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],14:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.array.map.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),y=o("../utils/checkBucketName"),g=y.checkBucketName,w=o("../utils/isArray"),c=w.isArray,m=o("../utils/formatObjKey"),v=m.formatObjKey,b=R;b.getBucketLifecycle=function(){var x=(0,h.default)(f.default.mark(function S(C,E){var j,Z,P;return f.default.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return g(C),j=this._bucketRequestParams("GET",C,"lifecycle",E),j.successStatuses=[200],j.xmlResponse=!0,B.next=6,this.request(j);case 6:return Z=B.sent,P=Z.data.Rule||null,P&&(c(P)||(P=[P]),P=P.map(function(k){return k.ID&&(k.id=k.ID,delete k.ID),k.Tag&&!c(k.Tag)&&(k.Tag=[k.Tag]),v(k,"firstLowerCase")})),B.abrupt("return",{rules:P,res:Z.res});case 10:case"end":return B.stop()}},S,this)}));function T(S,C){return x.apply(this,arguments)}return T}()},{"../utils/checkBucketName":51,"../utils/formatObjKey":61,"../utils/isArray":63,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280}],15:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator")),h=p(o("@babel/runtime/helpers/asyncToGenerator")),y=o("../utils/checkBucketName"),g=y.checkBucketName,w=R;w.getBucketVersioning=function(){var c=(0,h.default)(f.default.mark(function v(b,x){var T,S,C;return f.default.wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return g(b),T=this._bucketRequestParams("GET",b,"versioning",x),T.xmlResponse=!0,T.successStatuses=[200],j.next=6,this.request(T);case 6:return S=j.sent,C=S.data.Status,j.abrupt("return",{status:S.status,versionStatus:C,res:S.res});case 9:case"end":return j.stop()}},v,this)}));function m(v,b){return c.apply(this,arguments)}return m}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],16:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator")),h=p(o("@babel/runtime/helpers/asyncToGenerator")),y=o("../utils/checkBucketName"),g=y.checkBucketName,w=o("../utils/isObject"),c=w.isObject,m=R;m.getBucketWebsite=function(){var v=(0,h.default)(f.default.mark(function x(T,S){var C,E,j;return f.default.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return g(T),C=this._bucketRequestParams("GET",T,"website",S),C.successStatuses=[200],C.xmlResponse=!0,P.next=6,this.request(C);case 6:return E=P.sent,j=[],E.data.RoutingRules&&E.data.RoutingRules.RoutingRule&&(c(E.data.RoutingRules.RoutingRule)?j=[E.data.RoutingRules.RoutingRule]:j=E.data.RoutingRules.RoutingRule),P.abrupt("return",{index:E.data.IndexDocument&&E.data.IndexDocument.Suffix||"",supportSubDir:E.data.IndexDocument&&E.data.IndexDocument.SupportSubDir||"false",type:E.data.IndexDocument&&E.data.IndexDocument.Type,routingRules:j,error:E.data.ErrorDocument&&E.data.ErrorDocument.Key||null,res:E.res});case 10:case"end":return P.stop()}},x,this)}));function b(x,T){return v.apply(this,arguments)}return b}()},{"../utils/checkBucketName":51,"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],17:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(R,"__esModule",{value:!0}),R.getBucketWorm=void 0;var y=o("../utils/checkBucketName"),g=o("../utils/dataFix");function w(m,v){return c.apply(this,arguments)}function c(){return c=(0,h.default)(f.default.mark(function m(v,b){var x,T;return f.default.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return y.checkBucketName(v),x=this._bucketRequestParams("GET",v,"worm",b),x.successStatuses=[200],x.xmlResponse=!0,C.next=6,this.request(x);case 6:return T=C.sent,g.dataFix(T.data,{lowerFirst:!0,rename:{RetentionPeriodInDays:"days"}}),C.abrupt("return",Object.assign(Object.assign({},T.data),{res:T.res,status:T.status}));case 9:case"end":return C.stop()}},m,this)})),c.apply(this,arguments)}R.getBucketWorm=w},{"../utils/checkBucketName":51,"../utils/dataFix":57,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],18:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator")),h=p(o("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(R,"__esModule",{value:!0}),R.initiateBucketWorm=void 0;var y=o("../utils/obj2xml"),g=o("../utils/checkBucketName");function w(m,v,b){return c.apply(this,arguments)}function c(){return c=(0,h.default)(f.default.mark(function m(v,b,x){var T,S,C;return f.default.wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return g.checkBucketName(v),T=this._bucketRequestParams("POST",v,"worm",x),S={InitiateWormConfiguration:{RetentionPeriodInDays:b}},T.mime="xml",T.content=y.obj2xml(S,{headers:!0}),T.successStatuses=[200],j.next=8,this.request(T);case 8:return C=j.sent,j.abrupt("return",{res:C.res,wormId:C.res.headers["x-oss-worm-id"],status:C.status});case 10:case"end":return j.stop()}},m,this)})),c.apply(this,arguments)}R.initiateBucketWorm=w},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],19:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(R,"__esModule",{value:!0}),R.listBucketInventory=void 0;var y=o("../utils/checkBucketName"),g=o("../utils/formatInventoryConfig");function w(m){return c.apply(this,arguments)}function c(){return c=(0,h.default)(f.default.mark(function m(v){var b,x,T,S,C,E,j,Z,P=arguments;return f.default.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return b=P.length>1&&P[1]!==void 0?P[1]:{},x=b.continuationToken,T=Object.assign({inventory:""},x&&{"continuation-token":x},b.subres),y.checkBucketName(v),S=this._bucketRequestParams("GET",v,T,b),S.successStatuses=[200],S.xmlResponse=!0,B.next=9,this.request(S);case 9:return C=B.sent,E=C.data,j=C.res,Z=C.status,B.abrupt("return",{isTruncated:E.IsTruncated==="true",nextContinuationToken:E.NextContinuationToken,inventoryList:g.formatInventoryConfig(E.InventoryConfiguration,!0),status:Z,res:j});case 12:case"end":return B.stop()}},m,this)})),c.apply(this,arguments)}R.listBucketInventory=w},{"../utils/checkBucketName":51,"../utils/formatInventoryConfig":60,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],20:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js"),o("core-js/modules/es.array.concat.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(R,"__esModule",{value:!0}),R.putBucketInventory=void 0;var y=o("../utils/checkBucketName"),g=o("../utils/obj2xml");function w(m,v){return c.apply(this,arguments)}function c(){return c=(0,h.default)(f.default.mark(function m(v,b){var x,T,S,C,E,j,Z,P,Q,B,k,D=arguments;return f.default.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return x=D.length>2&&D[2]!==void 0?D[2]:{},T=Object.assign({inventory:"",inventoryId:b.id},x.subres),y.checkBucketName(v),S=b.OSSBucketDestination,C=b.optionalFields,E=b.includedObjectVersions,j="acs:oss:::",Z="acs:ram::".concat(S.accountId,":role/"),P={InventoryConfiguration:{Id:b.id,IsEnabled:b.isEnabled,Filter:{Prefix:b.prefix||""},Destination:{OSSBucketDestination:{Format:S.format,AccountId:S.accountId,RoleArn:"".concat(Z).concat(S.rolename),Bucket:"".concat(j).concat(S.bucket),Prefix:S.prefix||"",Encryption:S.encryption||""}},Schedule:{Frequency:b.frequency},IncludedObjectVersions:E,OptionalFields:{Field:(C==null?void 0:C.field)||[]}}},Q=g.obj2xml(P,{headers:!0,firstUpperCase:!0}),B=this._bucketRequestParams("PUT",v,T,x),B.successStatuses=[200],B.mime="xml",B.content=Q,J.next=14,this.request(B);case 14:return k=J.sent,J.abrupt("return",{status:k.status,res:k.res});case 16:case"end":return J.stop()}},m,this)})),c.apply(this,arguments)}R.putBucketInventory=w},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.assign.js":287}],21:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.array.includes.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),y=o("../utils/checkBucketName"),g=y.checkBucketName,w=o("../utils/isArray"),c=w.isArray,m=o("../utils/deepCopy"),v=m.deepCopy,b=o("../utils/isObject"),x=b.isObject,T=o("../utils/obj2xml"),S=T.obj2xml,C=o("../utils/checkObjectTag"),E=C.checkObjectTag,j=o("../utils/getStrBytesCount"),Z=j.getStrBytesCount,P=R;P.putBucketLifecycle=function(){var F=(0,h.default)(f.default.mark(function H(N,_,X){var ee,ie,he,ne,Ie;return f.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:if(g(N),c(_)){pe.next=3;break}throw new Error("rules must be Array");case 3:return ee=this._bucketRequestParams("PUT",N,"lifecycle",X),ie=[],he={LifecycleConfiguration:{Rule:ie}},_.forEach(function(ve){Q(ve),D(ve),ve.id&&(ve.ID=ve.id,delete ve.id),ie.push(ve)}),ne=S(he,{headers:!0,firstUpperCase:!0}),ee.content=ne,ee.mime="xml",ee.successStatuses=[200],pe.next=13,this.request(ee);case 13:return Ie=pe.sent,pe.abrupt("return",{res:Ie.res});case 15:case"end":return pe.stop()}},H,this)}));function J(H,N,_){return F.apply(this,arguments)}return J}();function Q(F){F.days&&(F.expiration={days:F.days}),F.date&&(F.expiration={createdBeforeDate:F.date})}function B(F,J){var H=F.days,N=F.createdBeforeDate;if(!H&&!N)throw new Error("".concat(J," must includes days or createdBeforeDate"));if(H&&!/^[1-9][0-9]*$/.test(H))throw new Error("days must be a positive integer");if(N&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(N))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function k(F){if(!c(F)&&!x(F))throw new Error("tag must be Object or Array");F=x(F)?[F]:F;var J={},H=v(F);H.forEach(function(N){J[N.key]=N.value}),E(J)}function D(F){if(F.id&&Z(F.id)>255)throw new Error("ID is composed of 255 bytes at most");if(F.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(F.status))throw new Error("Status must be Enabled or Disabled");if(F.transition){if(!["IA","Archive"].includes(F.transition.storageClass))throw new Error("StorageClass must be IA or Archive");B(F.transition,"Transition")}if(F.expiration){if(!F.expiration.expiredObjectDeleteMarker)B(F.expiration,"Expiration");else if(F.expiration.days||F.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(F.abortMultipartUpload&&B(F.abortMultipartUpload,"AbortMultipartUpload"),!F.expiration&&!F.abortMultipartUpload&&!F.transition&&!F.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(F.tag){if(F.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");k(F.tag)}}},{"../utils/checkBucketName":51,"../utils/checkObjectTag":54,"../utils/deepCopy":58,"../utils/getStrBytesCount":62,"../utils/isArray":63,"../utils/isObject":70,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/web.dom-collections.for-each.js":339}],22:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.array.includes.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),y=o("../utils/checkBucketName"),g=y.checkBucketName,w=o("../utils/obj2xml"),c=w.obj2xml,m=R;m.putBucketVersioning=function(){var v=(0,h.default)(f.default.mark(function x(T,S){var C,E,j,Z,P=arguments;return f.default.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:if(C=P.length>2&&P[2]!==void 0?P[2]:{},g(T),["Enabled","Suspended"].includes(S)){B.next=4;break}throw new Error("status must be Enabled or Suspended");case 4:return E=this._bucketRequestParams("PUT",T,"versioning",C),j={VersioningConfiguration:{Status:S}},E.mime="xml",E.content=c(j,{headers:!0}),B.next=10,this.request(E);case 10:return Z=B.sent,B.abrupt("return",{res:Z.res,status:Z.status});case 12:case"end":return B.stop()}},x,this)}));function b(x,T){return v.apply(this,arguments)}return b}()},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.includes.js":277}],23:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator")),h=p(o("@babel/runtime/helpers/asyncToGenerator")),y=o("../utils/checkBucketName"),g=y.checkBucketName,w=o("../utils/obj2xml"),c=w.obj2xml,m=o("../utils/isArray"),v=m.isArray,b=R;b.putBucketWebsite=function(){var x=(0,h.default)(f.default.mark(function S(C){var E,j,Z,P,Q,B,k,D=arguments;return f.default.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:if(E=D.length>1&&D[1]!==void 0?D[1]:{},j=D.length>2?D[2]:void 0,g(C),Z=this._bucketRequestParams("PUT",C,"website",j),P={Suffix:E.index||"index.html"},Q={IndexDocument:P},B={WebsiteConfiguration:Q},E.supportSubDir&&(P.SupportSubDir=E.supportSubDir),E.type&&(P.Type=E.type),E.error&&(Q.ErrorDocument={Key:E.error}),E.routingRules===void 0){J.next=14;break}if(v(E.routingRules)){J.next=13;break}throw new Error("RoutingRules must be Array");case 13:Q.RoutingRules={RoutingRule:E.routingRules};case 14:return B=c(B),Z.content=B,Z.mime="xml",Z.successStatuses=[200],J.next=20,this.request(Z);case 20:return k=J.sent,J.abrupt("return",{res:k.res});case 22:case"end":return J.stop()}},S,this)}));function T(S){return x.apply(this,arguments)}return T}()},{"../utils/checkBucketName":51,"../utils/isArray":63,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],24:[function(o,M,R){(function(p){(function(){"use strict";o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.regexp.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js"),R.encodeCallback=function(h,y){if(h.headers=h.headers||{},!Object.prototype.hasOwnProperty.call(h.headers,"x-oss-callback")&&y.callback){var g={callbackUrl:encodeURI(y.callback.url),callbackBody:y.callback.body};y.callback.host&&(g.callbackHost=y.callback.host),y.callback.contentType&&(g.callbackBodyType=y.callback.contentType);var w=p.from(JSON.stringify(g)).toString("base64");if(h.headers["x-oss-callback"]=w,y.callback.customValue){var c={};Object.keys(y.callback.customValue).forEach(function(m){c["x:".concat(m)]=y.callback.customValue[m].toString()}),h.headers["x-oss-callback-var"]=p.from(JSON.stringify(c)).toString("base64")}}}}).call(this)}).call(this,o("buffer").Buffer)},{buffer:90,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/web.dom-collections.for-each.js":339}],25:[function(o,M,R){"use strict";o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.replace.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js");var p=function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(R,"__esModule",{value:!0}),R.getReqUrl=void 0;var f=p(o("copy-to")),h=p(o("url")),y=p(o("merge-descriptors")),g=p(o("is-type-of")),w=o("../utils/isIP"),c=o("../utils/checkConfigValid");function m(v){var b={},x=this.options.cname;c.checkConfigValid(this.options.endpoint,"endpoint"),f.default(this.options.endpoint,!1).to(b),v.bucket&&!x&&!w.isIP(b.hostname)&&!this.options.sldEnable&&(b.host="".concat(v.bucket,".").concat(b.host));var T="/";v.bucket&&this.options.sldEnable&&(T+="".concat(v.bucket,"/")),v.object&&(T+=this._escape(v.object).replace(/\+/g,"%2B")),b.pathname=T;var S={};if(v.query&&y.default(S,v.query),v.subres){var C={};g.default.string(v.subres)?C[v.subres]="":g.default.array(v.subres)?v.subres.forEach(function(E){C[E]=""}):C=v.subres,y.default(S,C)}return b.query=S,h.default.format(b)}R.getReqUrl=m},{"../utils/checkConfigValid":52,"../utils/isIP":69,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339,"is-type-of":466,"merge-descriptors":372,url:472}],26:[function(o,M,R){"use strict";o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.object.assign.js"),o("core-js/modules/es.string.trim.js");var p=o("humanize-ms"),f=o("url"),h=o("../utils/checkBucketName"),y=h.checkBucketName,g=o("../utils/setRegion"),w=g.setRegion,c=o("../utils/checkConfigValid"),m=c.checkConfigValid;function v(b,x){m(b,"endpoint");var T=f.parse(b);if(T.protocol||(T=f.parse("http".concat(x?"s":"","://").concat(b))),T.protocol!=="http:"&&T.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return T}M.exports=function(b){if(!b||!b.accessKeyId||!b.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");b.stsToken&&!b.refreshSTSToken&&!b.refreshSTSTokenInterval&&console.warn("It's recommended to set 'refreshSTSToken' and 'refreshSTSTokenInterval' to refresh stsToken\u3001accessKeyId\u3001accessKeySecret automatically when sts token has expired"),b.bucket&&y(b.bucket);var x=Object.assign({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1,headerEncoding:"utf-8",refreshSTSToken:null,refreshSTSTokenInterval:6e4*5,retryMax:0},b);if(x.accessKeyId=x.accessKeyId.trim(),x.accessKeySecret=x.accessKeySecret.trim(),x.timeout&&(x.timeout=p(x.timeout)),x.endpoint)x.endpoint=v(x.endpoint,x.secure);else if(x.region)x.endpoint=w(x.region,x.internal,x.secure);else throw new Error("require options.endpoint or options.region");return x.inited=!0,x}},{"../utils/checkBucketName":51,"../utils/checkConfigValid":52,"../utils/setRegion":75,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.string.trim.js":308,"humanize-ms":356,url:472}],27:[function(o,M,R){"use strict";var p=o("merge-descriptors"),f=R;p(f,o("./processObjectSave"))},{"./processObjectSave":28,"merge-descriptors":372}],28:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.array.concat.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),y=o("../utils/checkBucketName"),g=y.checkBucketName,w=o("querystring"),c=o("js-base64"),m=c.Base64.encode,v=R;v.processObjectSave=function(){var x=(0,h.default)(f.default.mark(function S(C,E,j,Z){var P,Q,B,k;return f.default.wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return b(C,"sourceObject"),b(E,"targetObject"),b(j,"process"),E=this._objectName(E),Z&&g(Z),P=this._objectRequestParams("POST",C,{subres:"x-oss-process"}),Q=Z?",b_".concat(m(Z)):"",E=m(E),B={"x-oss-process":"".concat(j,"|sys/saveas,o_").concat(E).concat(Q)},P.content=w.stringify(B),F.next=12,this.request(P);case 12:return k=F.sent,F.abrupt("return",{res:k.res,status:k.res.status});case 14:case"end":return F.stop()}},S,this)}));function T(S,C,E,j){return x.apply(this,arguments)}return T}();function b(x,T){if(!x)throw new Error("".concat(T," is required"));if(typeof x!="string")throw new Error("".concat(T," must be String"))}},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"js-base64":371,querystring:385}],29:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.function.name.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.promise.js"),o("core-js/modules/es.array.from.js"),o("core-js/modules/es.string.iterator.js"),o("core-js/modules/es.array.map.js"),o("core-js/modules/es.array.filter.js"),o("core-js/modules/es.array.find.js"),o("core-js/modules/es.regexp.to-string.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),y=o("debug")("ali-oss:multipart-copy"),g=o("copy-to"),w=R;w.uploadPartCopy=function(){var c=(0,h.default)(f.default.mark(function v(b,x,T,S,C){var E,j,Z,P,Q,B=arguments;return f.default.wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return E=B.length>5&&B[5]!==void 0?B[5]:{},E.headers=E.headers||{},j=E.versionId||E.subres&&E.subres.versionId||null,j?Z="/".concat(C.sourceBucketName,"/").concat(encodeURIComponent(C.sourceKey),"?versionId=").concat(j):Z="/".concat(C.sourceBucketName,"/").concat(encodeURIComponent(C.sourceKey)),E.headers["x-oss-copy-source"]=Z,S&&(E.headers["x-oss-copy-source-range"]="bytes=".concat(S)),E.subres={partNumber:T,uploadId:x},P=this._objectRequestParams("PUT",b,E),P.mime=E.mime,P.successStatuses=[200],D.next=12,this.request(P);case 12:return Q=D.sent,D.abrupt("return",{name:b,etag:Q.res.headers.etag,res:Q.res});case 14:case"end":return D.stop()}},v,this)}));function m(v,b,x,T,S){return c.apply(this,arguments)}return m}(),w.multipartUploadCopy=function(){var c=(0,h.default)(f.default.mark(function v(b,x){var T,S,C,E,j,Z,P,Q,B,k,D,F,J=arguments;return f.default.wrap(function(N){for(;;)switch(N.prev=N.next){case 0:return T=J.length>2&&J[2]!==void 0?J[2]:{},this.resetCancelFlag(),S=T.versionId,C=S===void 0?null:S,E={versionId:C},N.next=6,this._getObjectMeta(x.sourceBucketName,x.sourceKey,E);case 6:if(j=N.sent,Z=j.res.headers["content-length"],x.startOffset=x.startOffset||0,x.endOffset=x.endOffset||Z,!(T.checkpoint&&T.checkpoint.uploadId)){N.next=14;break}return N.next=13,this._resumeMultipartCopy(T.checkpoint,x,T);case 13:return N.abrupt("return",N.sent);case 14:if(P=102400,Q=x.endOffset-x.startOffset,!(Q<P)){N.next=18;break}throw new Error("copySize must not be smaller than ".concat(P));case 18:if(!(T.partSize&&T.partSize<P)){N.next=20;break}throw new Error("partSize must not be smaller than ".concat(P));case 20:return N.next=22,this.initMultipartUpload(b,T);case 22:if(B=N.sent,k=B.uploadId,D=this._getPartSize(Q,T.partSize),F={name:b,copySize:Q,partSize:D,uploadId:k,doneParts:[]},!(T&&T.progress)){N.next=29;break}return N.next=29,T.progress(0,F,B.res);case 29:return N.next=31,this._resumeMultipartCopy(F,x,T);case 31:return N.abrupt("return",N.sent);case 32:case"end":return N.stop()}},v,this)}));function m(v,b){return c.apply(this,arguments)}return m}(),w._resumeMultipartCopy=function(){var c=(0,h.default)(f.default.mark(function v(b,x,T){var S,C,E,j,Z,P,Q,B,k,D,F,J,H,N,_,X,ee,ie,he,ne,Ie;return f.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:if(!this.isCancel()){pe.next=2;break}throw this._makeCancelEvent();case 2:if(S=T.versionId,C=S===void 0?null:S,E={versionId:C},j=b.copySize,Z=b.partSize,P=b.uploadId,Q=b.doneParts,B=b.name,k=this._divideMultipartCopyParts(j,Z,x.startOffset),D=k.length,F={headers:{}},T.copyheaders&&g(T.copyheaders).to(F.headers),C&&g(E).to(F),J=function(xe,ce,fe){return new Promise(function(){var ge=(0,h.default)(f.default.mark(function Se(De,ke){var de,Y,ye;return f.default.wrap(function(G){for(;;)switch(G.prev=G.next){case 0:if(G.prev=0,xe.isCancel()){G.next=22;break}return de=k[ce-1],Y="".concat(de.start,"-").concat(de.end-1),G.prev=4,G.next=7,xe.uploadPartCopy(B,P,ce,Y,fe,F);case 7:ye=G.sent,G.next=15;break;case 10:if(G.prev=10,G.t0=G.catch(4),G.t0.status!==404){G.next=14;break}throw xe._makeAbortEvent();case 14:throw G.t0;case 15:if(xe.isCancel()){G.next=22;break}if(y("content-range ".concat(ye.res.headers["content-range"])),Q.push({number:ce,etag:ye.res.headers.etag}),b.doneParts=Q,!(T&&T.progress)){G.next=22;break}return G.next=22,T.progress(Q.length/D,b,ye.res);case 22:De(),G.next=29;break;case 25:G.prev=25,G.t1=G.catch(0),G.t1.partNum=ce,ke(G.t1);case 29:case"end":return G.stop()}},Se,null,[[0,25],[4,10]])}));return function(Se,De){return ge.apply(this,arguments)}}())},H=Array.from(new Array(D),function(ve,xe){return xe+1}),N=Q.map(function(ve){return ve.number}),_=H.filter(function(ve){return N.indexOf(ve)<0}),X=5,ee=T.parallel||X,!(this.checkBrowserAndVersion("Internet Explorer","10")||ee===1)){pe.next=28;break}ie=0;case 18:if(!(ie<_.length)){pe.next=26;break}if(!this.isCancel()){pe.next=21;break}throw this._makeCancelEvent();case 21:return pe.next=23,J(this,_[ie],x);case 23:ie++,pe.next=18;break;case 26:pe.next=40;break;case 28:return pe.next=30,this._parallelNode(_,ee,J,x);case 30:if(he=pe.sent,ne=he.find(function(ve){return ve.name==="abort"}),!ne){pe.next=34;break}throw ne;case 34:if(!this.isCancel()){pe.next=36;break}throw this._makeCancelEvent();case 36:if(!(he&&he.length>0)){pe.next=40;break}throw Ie=he[0],Ie.message="Failed to copy some parts with error: ".concat(Ie.toString()," part_num: ").concat(Ie.partNum),Ie;case 40:return pe.next=42,this.completeMultipartUpload(B,P,Q,T);case 42:return pe.abrupt("return",pe.sent);case 43:case"end":return pe.stop()}},v,this)}));function m(v,b,x){return c.apply(this,arguments)}return m}(),w._divideMultipartCopyParts=function(m,v,b){for(var x=Math.ceil(m/v),T=[],S=0;S<x;S++){var C=v*S+b,E=Math.min(C+v,m+b);T.push({start:C,end:E})}return T},w._getObjectMeta=function(){var c=(0,h.default)(f.default.mark(function v(b,x,T){var S,C;return f.default.wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return S=this.getBucket(),this.setBucket(b),j.next=4,this.head(x,T);case 4:return C=j.sent,this.setBucket(S),j.abrupt("return",C);case 7:case"end":return j.stop()}},v,this)}));function m(v,b,x){return c.apply(this,arguments)}return m}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.iterator.js":303,debug:465}],30:[function(o,M,R){(function(p){(function(){"use strict";var f=o("@babel/runtime/helpers/interopRequireDefault"),h=f(o("@babel/runtime/regenerator"));o("core-js/modules/es.array.map.js"),o("core-js/modules/es.array.filter.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.array.sort.js"),o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.regexp.to-string.js");var y=f(o("@babel/runtime/helpers/asyncToGenerator")),g=o("copy-to"),w=o("./callback"),c=o("./utils/deepCopy"),m=c.deepCopyWith,v=o("./utils/isBuffer"),b=v.isBuffer,x=o("./utils/omit"),T=x.omit,S=R;S.listUploads=function(){var C=(0,y.default)(h.default.mark(function j(Z,P){var Q,B,k,D;return h.default.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return P=P||{},Q={},g(P).to(Q),Q.subres="uploads",B=this._objectRequestParams("GET","",Q),B.query=Z,B.xmlResponse=!0,B.successStatuses=[200],J.next=10,this.request(B);case 10:return k=J.sent,D=k.data.Upload||[],Array.isArray(D)||(D=[D]),D=D.map(function(H){return{name:H.Key,uploadId:H.UploadId,initiated:H.Initiated}}),J.abrupt("return",{res:k.res,uploads:D,bucket:k.data.Bucket,nextKeyMarker:k.data.NextKeyMarker,nextUploadIdMarker:k.data.NextUploadIdMarker,isTruncated:k.data.IsTruncated==="true"});case 15:case"end":return J.stop()}},j,this)}));function E(j,Z){return C.apply(this,arguments)}return E}(),S.listParts=function(){var C=(0,y.default)(h.default.mark(function j(Z,P,Q,B){var k,D,F;return h.default.wrap(function(H){for(;;)switch(H.prev=H.next){case 0:return B=B||{},k={},g(B).to(k),k.subres={uploadId:P},D=this._objectRequestParams("GET",Z,k),D.query=Q,D.xmlResponse=!0,D.successStatuses=[200],H.next=10,this.request(D);case 10:return F=H.sent,H.abrupt("return",{res:F.res,uploadId:F.data.UploadId,bucket:F.data.Bucket,name:F.data.Key,partNumberMarker:F.data.PartNumberMarker,nextPartNumberMarker:F.data.NextPartNumberMarker,maxParts:F.data.MaxParts,isTruncated:F.data.IsTruncated,parts:F.data.Part||[]});case 12:case"end":return H.stop()}},j,this)}));function E(j,Z,P,Q){return C.apply(this,arguments)}return E}(),S.abortMultipartUpload=function(){var C=(0,y.default)(h.default.mark(function j(Z,P,Q){var B,k,D;return h.default.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return this._stop(),Q=Q||{},B={},g(Q).to(B),B.subres={uploadId:P},k=this._objectRequestParams("DELETE",Z,B),k.successStatuses=[204],J.next=9,this.request(k);case 9:return D=J.sent,J.abrupt("return",{res:D.res});case 11:case"end":return J.stop()}},j,this)}));function E(j,Z,P){return C.apply(this,arguments)}return E}(),S.initMultipartUpload=function(){var C=(0,y.default)(h.default.mark(function j(Z,P){var Q,B,k;return h.default.wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return P=P||{},Q={},g(P).to(Q),Q.headers=Q.headers||{},this._convertMetaToHeaders(P.meta,Q.headers),Q.subres="uploads",B=this._objectRequestParams("POST",Z,Q),B.mime=P.mime,B.xmlResponse=!0,B.successStatuses=[200],F.next=12,this.request(B);case 12:return k=F.sent,F.abrupt("return",{res:k.res,bucket:k.data.Bucket,name:k.data.Key,uploadId:k.data.UploadId});case 14:case"end":return F.stop()}},j,this)}));function E(j,Z){return C.apply(this,arguments)}return E}(),S.uploadPart=function(){var C=(0,y.default)(h.default.mark(function j(Z,P,Q,B,k,D,F){var J,H;return h.default.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:if(J={size:D-k},H=p&&p.browser,!H){_.next=8;break}return _.next=5,this._createBuffer(B,k,D);case 5:J.content=_.sent,_.next=11;break;case 8:return _.next=10,this._createStream(B,k,D);case 10:J.stream=_.sent;case 11:return _.next=13,this._uploadPart(Z,P,Q,J,F);case 13:return _.abrupt("return",_.sent);case 14:case"end":return _.stop()}},j,this)}));function E(j,Z,P,Q,B,k,D){return C.apply(this,arguments)}return E}(),S.completeMultipartUpload=function(){var C=(0,y.default)(h.default.mark(function j(Z,P,Q,B){var k,D,F,J,H,N,_,X;return h.default.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:for(k=Q.concat().sort(function(he,ne){return he.number-ne.number}).filter(function(he,ne,Ie){return!ne||he.number!==Ie[ne-1].number}),D=`<?xml version="1.0" encoding="UTF-8"?>
<CompleteMultipartUpload>
`,F=0;F<k.length;F++)J=k[F],D+=`<Part>
`,D+="<PartNumber>".concat(J.number,`</PartNumber>
`),D+="<ETag>".concat(J.etag,`</ETag>
`),D+=`</Part>
`;return D+="</CompleteMultipartUpload>",B=B||{},H={},H=m(B,function(he){if(b(he))return null}),H.subres={uploadId:P},H.headers=T(H.headers,["x-oss-server-side-encryption","x-oss-storage-class"]),N=this._objectRequestParams("POST",Z,H),w.encodeCallback(N,H),N.mime="xml",N.content=D,N.headers&&N.headers["x-oss-callback"]||(N.xmlResponse=!0),N.successStatuses=[200],ie.next=17,this.request(N);case 17:if(_=ie.sent,!B.progress){ie.next=21;break}return ie.next=21,B.progress(1,null,_.res);case 21:return X={res:_.res,bucket:N.bucket,name:Z,etag:_.res.headers.etag},N.headers&&N.headers["x-oss-callback"]&&(X.data=JSON.parse(_.data.toString())),ie.abrupt("return",X);case 24:case"end":return ie.stop()}},j,this)}));function E(j,Z,P,Q){return C.apply(this,arguments)}return E}(),S._uploadPart=function(){var C=(0,y.default)(h.default.mark(function j(Z,P,Q,B,k){var D,F,J,H;return h.default.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return k=k||{},D={},g(k).to(D),D.headers=D.headers||{},D.headers["Content-Length"]=B.size,D.headers=T(D.headers,["x-oss-server-side-encryption"]),D.subres={partNumber:Q,uploadId:P},F=this._objectRequestParams("PUT",Z,D),F.mime=D.mime,J=p&&p.browser,J?F.content=B.content:F.stream=B.stream,F.successStatuses=[200],F.disabledMD5=k.disabledMD5,_.next=15,this.request(F);case 15:if(H=_.sent,H.res.headers.etag){_.next=18;break}throw new Error(`Please set the etag of expose-headers in OSS
https://help.aliyun.com/document_detail/32069.html`);case 18:return B.stream&&(B.stream=null,F.stream=null),_.abrupt("return",{name:Z,etag:H.res.headers.etag,res:H.res});case 20:case"end":return _.stop()}},j,this)}));function E(j,Z,P,Q,B){return C.apply(this,arguments)}return E}()}).call(this)}).call(this,o("_process"))},{"./callback":24,"./utils/deepCopy":58,"./utils/isBuffer":65,"./utils/omit":73,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.map.js":280,"core-js/modules/es.array.sort.js":282,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],31:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator")),h=p(o("@babel/runtime/helpers/asyncToGenerator")),y=o("url"),g=o("utility"),w=o("copy-to"),c=o("../../common/signUtils"),m=o("../utils/isIP"),v=m.isIP,b=o("../utils/setSTSToken"),x=b.setSTSToken,T=o("../utils/isFunction"),S=T.isFunction,C=R;C.asyncSignatureUrl=function(){var E=(0,h.default)(f.default.mark(function Z(P,Q){var B,k,D,F,J;return f.default.wrap(function(N){for(;;)switch(N.prev=N.next){case 0:if(!v(this.options.endpoint.hostname)){N.next=2;break}throw new Error("can not get the object URL when endpoint is IP");case 2:if(Q=Q||{},P=this._objectName(P),Q.method=Q.method||"GET",B=g.timestamp()+(Q.expires||1800),k={bucket:this.options.bucket,object:P},D=this._getResource(k),!(this.options.stsToken&&S(this.options.refreshSTSToken))){N.next=11;break}return N.next=11,x.call(this);case 11:return this.options.stsToken&&(Q["security-token"]=this.options.stsToken),F=c._signatureForURL(this.options.accessKeySecret,Q,D,B),J=y.parse(this._getReqUrl(k)),J.query={OSSAccessKeyId:this.options.accessKeyId,Expires:B,Signature:F.Signature},w(F.subResource).to(J.query),N.abrupt("return",J.format());case 17:case"end":return N.stop()}},Z,this)}));function j(Z,P){return E.apply(this,arguments)}return j}()},{"../../common/signUtils":50,"../utils/isFunction":68,"../utils/isIP":69,"../utils/setSTSToken":76,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,url:472,utility:474}],32:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js"),o("core-js/modules/es.array.find.js"),o("core-js/modules/es.array.includes.js"),o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.replace.js");var h=p(o("@babel/runtime/helpers/typeof")),y=p(o("@babel/runtime/helpers/asyncToGenerator")),g=o("../utils/checkBucketName"),w=g.checkBucketName,c=R,m=["content-type","content-encoding","content-language","content-disposition","cache-control","expires"];c.copy=function(){var v=(0,y.default)(f.default.mark(function x(T,S,C,E){var j,Z,P;return f.default.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return(0,h.default)(C)==="object"&&(E=C),E=E||{},E.headers=E.headers||{},Object.keys(E.headers).forEach(function(k){E.headers["x-oss-copy-source-".concat(k.toLowerCase())]=E.headers[k]}),(E.meta||Object.keys(E.headers).find(function(k){return m.includes(k.toLowerCase())}))&&(E.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(E.meta,E.headers),S=this._getSourceName(S,C),E.versionId&&(S="".concat(S,"?versionId=").concat(E.versionId)),E.headers["x-oss-copy-source"]=S,j=this._objectRequestParams("PUT",T,E),j.xmlResponse=!0,j.successStatuses=[200,304],B.next=14,this.request(j);case 14:return Z=B.sent,P=Z.data,P&&(P={etag:P.ETag,lastModified:P.LastModified}),B.abrupt("return",{data:P,res:Z.res});case 18:case"end":return B.stop()}},x,this)}));function b(x,T,S,C){return v.apply(this,arguments)}return b}(),c._getSourceName=function(b,x){return typeof x=="string"?b=this._objectName(b):b[0]!=="/"?x=this.options.bucket:(x=b.replace(/\/(.+?)(\/.*)/,"$1"),b=b.replace(/(\/.+?\/)(.*)/,"$2")),w(x),b=encodeURIComponent(b),b="/".concat(x,"/").concat(b),b}},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],33:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),y=R;y.delete=function(){var g=(0,h.default)(f.default.mark(function c(m){var v,b,x,T=arguments;return f.default.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return v=T.length>1&&T[1]!==void 0?T[1]:{},v.subres=Object.assign({},v.subres),v.versionId&&(v.subres.versionId=v.versionId),b=this._objectRequestParams("DELETE",m,v),b.successStatuses=[204],C.next=7,this.request(b);case 7:return x=C.sent,C.abrupt("return",{res:x.res});case 9:case"end":return C.stop()}},c,this)}));function w(c){return g.apply(this,arguments)}return w}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],34:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),y=o("utility"),g=o("../utils/obj2xml"),w=g.obj2xml,c=R;c.deleteMulti=function(){var m=(0,h.default)(f.default.mark(function b(x){var T,S,C,E,j,Z,P,Q,B,k,D,F,J,H=arguments;return f.default.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:if(T=H.length>1&&H[1]!==void 0?H[1]:{},S=[],!(!x||!x.length)){_.next=4;break}throw new Error("names is required");case 4:for(C=0;C<x.length;C++)E={},typeof x[C]=="string"?E.Key=y.escape(this._objectName(x[C])):(j=x[C],Z=j.key,P=j.versionId,E.Key=y.escape(this._objectName(Z)),E.VersionId=P),S.push(E);return Q={Delete:{Quiet:!!T.quiet,Object:S}},B=w(Q,{headers:!0}),T.subres=Object.assign({delete:""},T.subres),T.versionId&&(T.subres.versionId=T.versionId),k=this._objectRequestParams("POST","",T),k.mime="xml",k.content=B,k.xmlResponse=!0,k.successStatuses=[200],_.next=16,this.request(k);case 16:return D=_.sent,F=D.data,J=F&&F.Deleted||null,J&&(Array.isArray(J)||(J=[J])),_.abrupt("return",{res:D.res,deleted:J||[]});case 21:case"end":return _.stop()}},b,this)}));function v(b){return m.apply(this,arguments)}return v}()},{"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,utility:474}],35:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),y=R;y.deleteObjectTagging=function(){var g=(0,h.default)(f.default.mark(function c(m){var v,b,x,T=arguments;return f.default.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return v=T.length>1&&T[1]!==void 0?T[1]:{},v.subres=Object.assign({tagging:""},v.subres),v.versionId&&(v.subres.versionId=v.versionId),m=this._objectName(m),b=this._objectRequestParams("DELETE",m,v),b.successStatuses=[204],C.next=8,this.request(b);case 8:return x=C.sent,C.abrupt("return",{status:x.status,res:x.res});case 10:case"end":return C.stop()}},c,this)}));function w(c){return g.apply(this,arguments)}return w}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],36:[function(o,M,R){"use strict";o("core-js/modules/es.array.concat.js");var p=o("url"),f=o("../utils/isIP"),h=f.isIP,y=R;y.generateObjectUrl=function(w,c){if(h(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");if(c)c[c.length-1]!=="/"&&(c+="/");else{c=this.options.endpoint.format();var m=p.parse(c),v=this.options.bucket;m.hostname="".concat(v,".").concat(m.hostname),m.host="".concat(v,".").concat(m.host),c=m.format()}return c+this._escape(this._objectName(w))}},{"../utils/isIP":69,"core-js/modules/es.array.concat.js":272,url:472}],37:[function(o,M,R){(function(p){(function(){"use strict";var f=o("@babel/runtime/helpers/interopRequireDefault"),h=f(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var y=f(o("@babel/runtime/helpers/asyncToGenerator")),g=o("fs"),w=o("is-type-of"),c=R;c.get=function(){var m=(0,y.default)(h.default.mark(function b(x,T){var S,C,E,j,Z,P,Q,B,k=arguments;return h.default.wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return S=k.length>2&&k[2]!==void 0?k[2]:{},C=null,E=!1,w.writableStream(T)?C=T:w.string(T)?(C=g.createWriteStream(T),E=!0):S=T,S=S||{},j=p&&p.browser,Z=S.responseCacheControl===null?"":"no-cache",P=j&&Z?{"response-cache-control":Z}:{},S.subres=Object.assign(P,S.subres),S.versionId&&(S.subres.versionId=S.versionId),S.process&&(S.subres["x-oss-process"]=S.process),F.prev=11,B=this._objectRequestParams("GET",x,S),B.writeStream=C,B.successStatuses=[200,206,304],F.next=17,this.request(B);case 17:Q=F.sent,E&&C.destroy(),F.next=28;break;case 21:if(F.prev=21,F.t0=F.catch(11),!E){F.next=27;break}return C.destroy(),F.next=27,this._deleteFileSafe(T);case 27:throw F.t0;case 28:return F.abrupt("return",{res:Q.res,content:Q.data});case 29:case"end":return F.stop()}},b,this,[[11,21]])}));function v(b,x){return m.apply(this,arguments)}return v}()}).call(this)}).call(this,o("_process"))},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,"core-js/modules/es.object.assign.js":287,fs:89,"is-type-of":466}],38:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),y=R;y.getACL=function(){var g=(0,h.default)(f.default.mark(function c(m){var v,b,x,T=arguments;return f.default.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return v=T.length>1&&T[1]!==void 0?T[1]:{},v.subres=Object.assign({acl:""},v.subres),v.versionId&&(v.subres.versionId=v.versionId),m=this._objectName(m),b=this._objectRequestParams("GET",m,v),b.successStatuses=[200],b.xmlResponse=!0,C.next=9,this.request(b);case 9:return x=C.sent,C.abrupt("return",{acl:x.data.AccessControlList.Grant,owner:{id:x.data.Owner.ID,displayName:x.data.Owner.DisplayName},res:x.res});case 11:case"end":return C.stop()}},c,this)}));function w(c){return g.apply(this,arguments)}return w}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],39:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.replace.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js"),o("core-js/modules/es.object.assign.js"),o("core-js/modules/es.array.map.js"),o("core-js/modules/es.number.constructor.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),y=R,g=o("../utils/isObject"),w=g.isObject,c=o("../utils/isArray"),m=c.isArray;y.getBucketVersions=v,y.listObjectVersions=v;function v(){return b.apply(this,arguments)}function b(){return b=(0,h.default)(f.default.mark(function S(){var C,E,j,Z,P,Q,B,k,D=arguments;return f.default.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:if(C=D.length>0&&D[0]!==void 0?D[0]:{},E=D.length>1&&D[1]!==void 0?D[1]:{},!(C.versionIdMarker&&C.keyMarker===void 0)){J.next=4;break}throw new Error("A version-id marker cannot be specified without a key marker");case 4:return E.subres=Object.assign({versions:""},E.subres),E.versionId&&(E.subres.versionId=E.versionId),j=this._objectRequestParams("GET","",E),j.xmlResponse=!0,j.successStatuses=[200],j.query=T(C),J.next=12,this.request(j);case 12:return Z=J.sent,P=Z.data.Version||[],Q=Z.data.DeleteMarker||[],B=this,P&&(Array.isArray(P)||(P=[P]),P=P.map(function(H){return{name:H.Key,url:B._objectUrl(H.Key),lastModified:H.LastModified,isLatest:H.IsLatest==="true",versionId:H.VersionId,etag:H.ETag,type:H.Type,size:Number(H.Size),storageClass:H.StorageClass,owner:{id:H.Owner.ID,displayName:H.Owner.DisplayName}}})),Q&&(m(Q)||(Q=[Q]),Q=Q.map(function(H){return{name:H.Key,lastModified:H.LastModified,versionId:H.VersionId,owner:{id:H.Owner.ID,displayName:H.Owner.DisplayName}}})),k=Z.data.CommonPrefixes||null,k&&(m(k)||(k=[k]),k=k.map(function(H){return H.Prefix})),J.abrupt("return",{res:Z.res,objects:P,deleteMarker:Q,prefixes:k,nextMarker:Z.data.NextKeyMarker||null,NextVersionIdMarker:Z.data.NextVersionIdMarker||null,nextKeyMarker:Z.data.NextKeyMarker||null,nextVersionIdMarker:Z.data.NextVersionIdMarker||null,isTruncated:Z.data.IsTruncated==="true"});case 21:case"end":return J.stop()}},S,this)})),b.apply(this,arguments)}function x(S){return S.replace(/([A-Z])/g,"-$1").toLowerCase()}function T(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},C={};return w(S)&&Object.keys(S).forEach(function(E){C[x(E)]=S[E]}),C}},{"../utils/isArray":63,"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280,"core-js/modules/es.number.constructor.js":286,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],40:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),y=R;y.getObjectMeta=function(){var g=(0,h.default)(f.default.mark(function c(m,v){var b,x;return f.default.wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return v=v||{},m=this._objectName(m),v.subres=Object.assign({objectMeta:""},v.subres),v.versionId&&(v.subres.versionId=v.versionId),b=this._objectRequestParams("HEAD",m,v),b.successStatuses=[200],S.next=8,this.request(b);case 8:return x=S.sent,S.abrupt("return",{status:x.status,res:x.res});case 10:case"end":return S.stop()}},c,this)}));function w(c,m){return g.apply(this,arguments)}return w}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],41:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),y=R,g=o("../utils/isObject"),w=g.isObject;y.getObjectTagging=function(){var c=(0,h.default)(f.default.mark(function v(b){var x,T,S,C,E,j,Z=arguments;return f.default.wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:return x=Z.length>1&&Z[1]!==void 0?Z[1]:{},x.subres=Object.assign({tagging:""},x.subres),x.versionId&&(x.subres.versionId=x.versionId),b=this._objectName(b),T=this._objectRequestParams("GET",b,x),T.successStatuses=[200],Q.next=8,this.request(T);case 8:return S=Q.sent,Q.next=11,this.parseXML(S.data);case 11:return C=Q.sent,E=C.TagSet.Tag,E=E&&w(E)?[E]:E||[],j={},E.forEach(function(B){j[B.Key]=B.Value}),Q.abrupt("return",{status:S.status,res:S.res,tag:j});case 17:case"end":return Q.stop()}},v,this)}));function m(v){return c.apply(this,arguments)}return m}()},{"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],42:[function(o,M,R){"use strict";var p=o("../utils/isIP"),f=p.isIP,h=R;h.getObjectUrl=function(g,w){if(f(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");return w?w[w.length-1]!=="/"&&(w+="/"):w=this.options.endpoint.format(),w+this._escape(this._objectName(g))}},{"../utils/isIP":69}],43:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),y=R;y.getSymlink=function(){var g=(0,h.default)(f.default.mark(function c(m){var v,b,x,T,S=arguments;return f.default.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return v=S.length>1&&S[1]!==void 0?S[1]:{},v.subres=Object.assign({symlink:""},v.subres),v.versionId&&(v.subres.versionId=v.versionId),m=this._objectName(m),b=this._objectRequestParams("GET",m,v),b.successStatuses=[200],E.next=8,this.request(b);case 8:return x=E.sent,T=x.res.headers["x-oss-symlink-target"],E.abrupt("return",{targetName:decodeURIComponent(T),res:x.res});case 11:case"end":return E.stop()}},c,this)}));function w(c){return g.apply(this,arguments)}return w}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],44:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),y=o("../utils/checkEnv"),g=y.checkEnv,w=R;w.head=function(){var c=(0,h.default)(f.default.mark(function v(b){var x,T,S,C,E=arguments;return f.default.wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return x=E.length>1&&E[1]!==void 0?E[1]:{},g("Because HeadObject has gzip enabled, head cannot get the file size correctly. If you need to get the file size, please use getObjectMeta"),x.subres=Object.assign({},x.subres),x.versionId&&(x.subres.versionId=x.versionId),T=this._objectRequestParams("HEAD",b,x),T.successStatuses=[200,304],Z.next=8,this.request(T);case 8:return S=Z.sent,C={meta:null,res:S.res,status:S.status},S.status===200&&Object.keys(S.headers).forEach(function(P){P.indexOf("x-oss-meta-")===0&&(C.meta||(C.meta={}),C.meta[P.substring(11)]=S.headers[P])}),Z.abrupt("return",C);case 12:case"end":return Z.stop()}},v,this)}));function m(v){return c.apply(this,arguments)}return m}()},{"../utils/checkEnv":53,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],45:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),y=R;y.putACL=function(){var g=(0,h.default)(f.default.mark(function c(m,v,b){var x,T;return f.default.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return b=b||{},b.subres=Object.assign({acl:""},b.subres),b.versionId&&(b.subres.versionId=b.versionId),b.headers=b.headers||{},b.headers["x-oss-object-acl"]=v,m=this._objectName(m),x=this._objectRequestParams("PUT",m,b),x.successStatuses=[200],C.next=10,this.request(x);case 10:return T=C.sent,C.abrupt("return",{res:T.res});case 12:case"end":return C.stop()}},c,this)}));function w(c,m,v){return g.apply(this,arguments)}return w}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],46:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js"),o("core-js/modules/es.array.map.js"),o("core-js/modules/es.object.keys.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),y=o("../utils/obj2xml"),g=y.obj2xml,w=o("../utils/checkObjectTag"),c=w.checkObjectTag,m=R;m.putObjectTagging=function(){var v=(0,h.default)(f.default.mark(function x(T,S){var C,E,j,Z,P=arguments;return f.default.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return C=P.length>2&&P[2]!==void 0?P[2]:{},c(S),C.subres=Object.assign({tagging:""},C.subres),C.versionId&&(C.subres.versionId=C.versionId),T=this._objectName(T),E=this._objectRequestParams("PUT",T,C),E.successStatuses=[200],S=Object.keys(S).map(function(k){return{Key:k,Value:S[k]}}),j={Tagging:{TagSet:{Tag:S}}},E.mime="xml",E.content=g(j),B.next=13,this.request(E);case 13:return Z=B.sent,B.abrupt("return",{res:Z.res,status:Z.status});case 15:case"end":return B.stop()}},x,this)}));function b(x,T){return v.apply(this,arguments)}return b}()},{"../utils/checkObjectTag":54,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290}],47:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),y=R;y.putSymlink=function(){var g=(0,h.default)(f.default.mark(function c(m,v,b){var x,T;return f.default.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return b=b||{},b.headers=b.headers||{},v=this._escape(this._objectName(v)),this._convertMetaToHeaders(b.meta,b.headers),b.headers["x-oss-symlink-target"]=v,b.subres=Object.assign({symlink:""},b.subres),b.versionId&&(b.subres.versionId=b.versionId),b.storageClass&&(b.headers["x-oss-storage-class"]=b.storageClass),m=this._objectName(m),x=this._objectRequestParams("PUT",m,b),x.successStatuses=[200],C.next=13,this.request(x);case 13:return T=C.sent,C.abrupt("return",{res:T.res});case 15:case"end":return C.stop()}},c,this)}));function w(c,m,v){return g.apply(this,arguments)}return w}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],48:[function(o,M,R){"use strict";var p=o("url"),f=o("utility"),h=o("copy-to"),y=o("../../common/signUtils"),g=o("../utils/isIP"),w=g.isIP,c=R;c.signatureUrl=function(v,b){if(w(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");b=b||{},v=this._objectName(v),b.method=b.method||"GET";var x=f.timestamp()+(b.expires||1800),T={bucket:this.options.bucket,object:v},S=this._getResource(T);this.options.stsToken&&(b["security-token"]=this.options.stsToken);var C=y._signatureForURL(this.options.accessKeySecret,b,S,x),E=p.parse(this._getReqUrl(T));return E.query={OSSAccessKeyId:this.options.accessKeyId,Expires:x,Signature:C.Signature},h(C.subResource).to(E.query),E.format()}},{"../../common/signUtils":50,"../utils/isIP":69,"copy-to":94,url:472,utility:474}],49:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.array.iterator.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.promise.js"),o("core-js/modules/es.string.iterator.js"),o("core-js/modules/web.dom-collections.iterator.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.function.name.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),y=o("./utils/isArray"),g=y.isArray,w=R;w._parallelNode=function(){var c=(0,h.default)(f.default.mark(function v(b,x,T,S){var C,E,j,Z,P,Q,B,k;return f.default.wrap(function(F){for(;;)switch(F.prev=F.next){case 0:C=this,E=[],j=[],Z=b.length/x,P=b.length%x,Q=P===0?Z:(b.length-P)/x+1,B=1,k=0;case 8:if(!(k<b.length)){F.next=26;break}if(!C.isCancel()){F.next=11;break}return F.abrupt("break",26);case 11:if(S?j.push(T(C,b[k],S)):j.push(T(C,b[k])),!(j.length===x||B===Q&&k===b.length-1)){F.next=23;break}return F.prev=13,B+=1,F.next=17,Promise.all(j);case 17:F.next=22;break;case 19:F.prev=19,F.t0=F.catch(13),E.push(F.t0);case 22:j=[];case 23:k++,F.next=8;break;case 26:return F.abrupt("return",E);case 27:case"end":return F.stop()}},v,this,[[13,19]])}));function m(v,b,x,T){return c.apply(this,arguments)}return m}(),w._parallel=function(m,v,b){var x=this;return new Promise(function(T){var S=[];if(v<=0||!m){T(S);return}function C(F){return function(){if(F===null)throw new Error("Callback was already called.");var J=F;F=null;for(var H=arguments.length,N=new Array(H),_=0;_<H;_++)N[_]=arguments[_];J.apply(this,N)}}function E(F){var J=-1,H=F.length;return function(){return++J<H&&!x.isCancel()?{value:F[J],key:J}:null}}var j=E(m),Z=!1,P=0,Q=!1;function B(F){P-=1,F?(Z=!0,S.push(F),T(S)):Z&&P<=0?(Z=!0,T(S)):Q||(x.isCancel()?T(S):D())}function k(F,J){b(F).then(function(H){J(null,H)}).catch(function(H){J(H)})}function D(){for(Q=!0;P<v&&!Z&&!x.isCancel();){var F=j();if(F===null||S.length>0){Z=!0,P<=0&&T(S);return}P+=1,k(F.value,C(B))}Q=!1}D()})},w.cancel=function(m){this.options.cancelFlag=!0,g(this.multipartUploadStreams)&&this.multipartUploadStreams.forEach(function(v){if(v.destroyed===!1){var b={name:"cancel",message:"cancel"};v.destroy(b)}}),this.multipartUploadStreams=[],m&&this.abortMultipartUpload(m.name,m.uploadId,m.options)},w.isCancel=function(){return this.options.cancelFlag},w.resetCancelFlag=function(){this.options.cancelFlag=!1},w._stop=function(){this.options.cancelFlag=!0},w._makeCancelEvent=function(){var m={status:0,name:"cancel"};return m},w._makeAbortEvent=function(){var m={status:0,name:"abort",message:"upload task has been abort"};return m}},{"./utils/isArray":63,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.string.iterator.js":303,"core-js/modules/web.dom-collections.for-each.js":339,"core-js/modules/web.dom-collections.iterator.js":340}],50:[function(o,M,R){(function(p){(function(){"use strict";o("core-js/modules/es.string.trim.js"),o("core-js/modules/es.array.sort.js"),o("core-js/modules/es.array.join.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js"),o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.regexp.to-string.js");var f=o("./../../shims/crypto/crypto.js"),h=o("is-type-of"),y=o("./utils/lowercaseKeyHeader"),g=y.lowercaseKeyHeader;R.buildCanonicalizedResource=function(c,m){var v="".concat(c),b="?";if(h.string(m)&&m.trim()!=="")v+=b+m;else if(h.array(m))m.sort(),v+=b+m.join("&");else if(m){var x=function(C,E){return C[0]>E[0]?1:C[0]<E[0]?-1:0},T=function(C){v+=b+C,(m[C]||m[C]===0)&&(v+="=".concat(m[C])),b="&"};Object.keys(m).sort(x).forEach(T)}return v},R.buildCanonicalString=function(c,m,v,b){v=v||{};var x=g(v.headers),T="x-oss-",S=[],C={},E=[c.toUpperCase(),x["content-md5"]||"",x["content-type"],b||x["x-oss-date"]];return Object.keys(x).forEach(function(j){var Z=j.toLowerCase();Z.indexOf(T)===0&&(C[Z]=String(x[j]).trim())}),Object.keys(C).sort().forEach(function(j){S.push("".concat(j,":").concat(C[j]))}),E=E.concat(S),E.push(this.buildCanonicalizedResource(m,v.parameters)),E.join(`
`)},R.computeSignature=function(c,m){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"utf-8",b=f.createHmac("sha1",c);return b.update(p.from(m,v)).digest("base64")},R.authorization=function(c,m,v,b){return"OSS ".concat(c,":").concat(this.computeSignature(m,v,b))},R._signatureForURL=function(c){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v=arguments.length>2?arguments[2]:void 0,b=arguments.length>3?arguments[3]:void 0,x=arguments.length>4?arguments[4]:void 0,T={},S=m.subResource,C=S===void 0?{}:S;if(m.process){var E="x-oss-process";C[E]=m.process}if(m.trafficLimit){var j="x-oss-traffic-limit";C[j]=m.trafficLimit}if(m.response&&Object.keys(m.response).forEach(function(B){var k="response-".concat(B.toLowerCase());C[k]=m.response[B]}),Object.keys(m).forEach(function(B){var k=B.toLowerCase(),D=m[B];k.indexOf("x-oss-")===0?T[k]=D:(k.indexOf("content-md5")===0||k.indexOf("content-type")===0)&&(T[B]=D)}),Object.prototype.hasOwnProperty.call(m,"security-token")&&(C["security-token"]=m["security-token"]),Object.prototype.hasOwnProperty.call(m,"callback")){var Z={callbackUrl:encodeURI(m.callback.url),callbackBody:m.callback.body};if(m.callback.host&&(Z.callbackHost=m.callback.host),m.callback.contentType&&(Z.callbackBodyType=m.callback.contentType),C.callback=p.from(JSON.stringify(Z)).toString("base64"),m.callback.customValue){var P={};Object.keys(m.callback.customValue).forEach(function(B){P["x:".concat(B)]=m.callback.customValue[B]}),C["callback-var"]=p.from(JSON.stringify(P)).toString("base64")}}var Q=this.buildCanonicalString(m.method,v,{headers:T,parameters:C},b.toString());return{Signature:this.computeSignature(c,Q,x),subResource:C}}}).call(this)}).call(this,o("buffer").Buffer)},{"./../../shims/crypto/crypto.js":461,"./utils/lowercaseKeyHeader":71,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.sort.js":282,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.trim.js":308,"core-js/modules/web.dom-collections.for-each.js":339,"is-type-of":466}],51:[function(o,M,R){"use strict";o("core-js/modules/es.regexp.exec.js"),Object.defineProperty(R,"__esModule",{value:!0}),R.checkBucketName=void 0,R.checkBucketName=function(p){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,h=f?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!h.test(p))throw new Error("The bucket must be conform to the specifications")}},{"core-js/modules/es.regexp.exec.js":300}],52:[function(o,M,R){"use strict";o("core-js/modules/es.regexp.exec.js"),Object.defineProperty(R,"__esModule",{value:!0}),R.checkConfigValid=void 0;var p={endpoint:f,region:/^[a-zA-Z0-9\-_]+$/};function f(h){return typeof h=="string"?/^[a-zA-Z0-9._:/-]+$/.test(h):h.host?/^[a-zA-Z0-9._:/-]+$/.test(h.host):!1}R.checkConfigValid=function(h,y){if(p[y]){var g=!0;if(p[y]instanceof Function?g=p[y](h):g=p[y].test(h),!g)throw new Error("The ".concat(y," must be conform to the specifications"))}}},{"core-js/modules/es.regexp.exec.js":300}],53:[function(o,M,R){(function(p){(function(){"use strict";Object.defineProperty(R,"__esModule",{value:!0}),R.checkEnv=void 0;function f(h){p.browser&&console.warn(h)}R.checkEnv=f}).call(this)}).call(this,o("_process"))},{_process:467}],54:[function(o,M,R){"use strict";o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.object.entries.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),Object.defineProperty(R,"__esModule",{value:!0}),R.checkObjectTag=void 0;var p=o("./checkValid"),f=p.checkValid,h=o("./isObject"),y=h.isObject,g=[{validator:function(v){if(typeof v!="string")throw new Error("the key and value of the tag must be String")}},{pattern:/^[a-zA-Z0-9 +-=._:/]+$/,msg:"tag can contain letters, numbers, spaces, and the following symbols: plus sign (+), hyphen (-), equal sign (=), period (.), underscore (_), colon (:), and forward slash (/)"}],w={key:[].concat(g,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(g,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function c(m){if(!y(m))throw new Error("tag must be Object");var v=Object.entries(m);if(v.length>10)throw new Error("maximum of 10 tags for a object");var b=["key","value"];v.forEach(function(x){x.forEach(function(T,S){f(T,w[b[S]])})})}R.checkObjectTag=c},{"./checkValid":55,"./isObject":70,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.entries.js":288,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],55:[function(o,M,R){"use strict";o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.regexp.exec.js"),Object.defineProperty(R,"__esModule",{value:!0}),R.checkValid=void 0;function p(f,h){h.forEach(function(y){if(y.validator)y.validator(f);else if(y.pattern&&!y.pattern.test(f))throw new Error(y.msg)})}R.checkValid=p},{"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/web.dom-collections.for-each.js":339}],56:[function(o,M,R){(function(p){(function(){"use strict";o("core-js/modules/es.array.includes.js"),o("core-js/modules/es.string.includes.js"),o("core-js/modules/es.object.assign.js"),o("core-js/modules/es.array.concat.js"),Object.defineProperty(R,"__esModule",{value:!0}),R.createRequest=void 0;var f=o("./../../../shims/crypto/crypto.js"),h=o("debug")("ali-oss"),y=o("mime"),g=o("dateformat"),w=o("copy-to"),c=o("path"),m=o("./encoder"),v=m.encoder,b=o("./isIP"),x=b.isIP,T=o("./setRegion"),S=T.setRegion,C=o("../client/getReqUrl"),E=C.getReqUrl,j=o("./isDingTalk"),Z=j.isDingTalk;function P(k,D){return k[D]||k[D.toLowerCase()]}function Q(k,D){delete k[D],delete k[D.toLowerCase()]}function B(k){var D=new Date;this.options.amendTimeSkewed&&(D=+new Date+this.options.amendTimeSkewed);var F={"x-oss-date":g(D,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'")};typeof window!="undefined"&&(F["x-oss-user-agent"]=this.userAgent),this.userAgent.includes("nodejs")&&(F["User-Agent"]=this.userAgent),this.options.isRequestPay&&Object.assign(F,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(F["x-oss-security-token"]=this.options.stsToken),w(k.headers).to(F),P(F,"Content-Type")||(k.mime&&k.mime.indexOf("/")>0?F["Content-Type"]=k.mime:Z()?F["Content-Type"]="application/octet-stream":F["Content-Type"]=y.getType(k.mime||c.extname(k.object||""))),P(F,"Content-Type")||Q(F,"Content-Type"),k.content&&(k.disabledMD5||(!k.headers||!k.headers["Content-MD5"]?F["Content-MD5"]=f.createHash("md5").update(p.from(k.content,"utf8")).digest("base64"):F["Content-MD5"]=k.headers["Content-MD5"]),F["Content-Length"]||(F["Content-Length"]=k.content.length));var J=Object.prototype.hasOwnProperty;for(var H in F)F[H]&&J.call(F,H)&&(F[H]=v(String(F[H]),this.options.headerEncoding));var N=this._getResource(k);if(F.authorization=this.authorization(k.method,N,k.subres,F,this.options.headerEncoding),x(this.options.endpoint.hostname)){var _=this.options,X=_.region,ee=_.internal,ie=_.secure,he=S(X,ee,ie);F.host="".concat(k.bucket,".").concat(he.host)}var ne=E.bind(this)(k);h("request %s %s, with headers %j, !!stream: %s",k.method,ne,F,!!k.stream);var Ie=k.timeout||this.options.timeout,q={method:k.method,content:k.content,stream:k.stream,headers:F,timeout:Ie,writeStream:k.writeStream,customResponse:k.customResponse,ctx:k.ctx||this.ctx};return this.agent&&(q.agent=this.agent),this.httpsAgent&&(q.httpsAgent=this.httpsAgent),q.enableProxy=!!this.options.enableProxy,q.proxy=this.options.proxy?this.options.proxy:null,{url:ne,params:q}}R.createRequest=B}).call(this)}).call(this,o("buffer").Buffer)},{"../client/getReqUrl":25,"./../../../shims/crypto/crypto.js":461,"./encoder":59,"./isDingTalk":66,"./isIP":69,"./setRegion":75,buffer:90,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.string.includes.js":302,dateformat:342,debug:465,mime:374,path:378}],57:[function(o,M,R){"use strict";o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.entries.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.replace.js"),o("core-js/modules/es.array.includes.js"),o("core-js/modules/es.object.keys.js"),Object.defineProperty(R,"__esModule",{value:!0}),R.dataFix=void 0;var p=o("./isObject"),f=["true","TRUE","1",1],h=["false","FALSE","0",0];function y(c,m,v){if(p.isObject(c)){var b=m.remove,x=b===void 0?[]:b,T=m.rename,S=T===void 0?{}:T,C=m.camel,E=C===void 0?[]:C,j=m.bool,Z=j===void 0?[]:j,P=m.lowerFirst,Q=P===void 0?!1:P;return x.forEach(function(B){return delete c[B]}),Object.entries(S).forEach(function(B){c[B[0]]&&(c[B[1]]||(c[B[1]]=c[B[0]],delete c[B[0]]))}),E.forEach(function(B){if(c[B]){var k=B.replace(/^(.)/,function(D){return D.toLowerCase()}).replace(/-(\w)/g,function(D,F){return F.toUpperCase()});c[k]||(c[k]=c[B])}}),Z.forEach(function(B){c[B]=g(c[B])}),typeof v=="function"&&v(c),w(c,Q),y}}R.dataFix=y;function g(c){return c?f.includes(c)?!0:h.includes(c)?!1:c:!1}function w(c,m){m&&Object.keys(c).forEach(function(v){var b=v.replace(/^\w/,function(x){return x.toLowerCase()});typeof c[b]=="undefined"&&(c[b]=c[v],delete c[v])})}},{"./isObject":70,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.entries.js":288,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],58:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault");o("core-js/modules/es.array.slice.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js");var f=p(o("@babel/runtime/helpers/typeof"));Object.defineProperty(R,"__esModule",{value:!0}),R.deepCopyWith=R.deepCopy=void 0;var h=o("./isBuffer");R.deepCopy=function(y){if(y===null||(0,f.default)(y)!=="object")return y;if(h.isBuffer(y))return y.slice();var g=Array.isArray(y)?[]:{};return Object.keys(y).forEach(function(w){g[w]=R.deepCopy(y[w])}),g},R.deepCopyWith=function(y,g){function w(c,m,v){var b=g(c,m,v);if(b!==void 0)return b;if(c===null||(0,f.default)(c)!=="object")return c;if(h.isBuffer(c))return c.slice();var x=Array.isArray(c)?[]:{};return Object.keys(c).forEach(function(T){x[T]=w(c[T],T,c)}),x}return g?w(y,"",null):R.deepCopy(y)}},{"./isBuffer":65,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],59:[function(o,M,R){(function(p){(function(){"use strict";o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(R,"__esModule",{value:!0}),R.encoder=void 0;function f(h){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"utf-8";return y==="utf-8"?h:p.from(h).toString("latin1")}R.encoder=f}).call(this)}).call(this,o("buffer").Buffer)},{buffer:90,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],60:[function(o,M,R){"use strict";o("core-js/modules/es.array.map.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.replace.js"),Object.defineProperty(R,"__esModule",{value:!0}),R.formatInventoryConfig=void 0;var p=o("../utils/dataFix"),f=o("../utils/isObject"),h=o("../utils/isArray"),y=o("../utils/formatObjKey");function g(c){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return m&&f.isObject(c)&&(c=[c]),h.isArray(c)?c=c.map(w):c=w(c),c}R.formatInventoryConfig=g;function w(c){return p.dataFix(c,{bool:["IsEnabled"]},function(m){var v,b;m.prefix=m.Filter.Prefix,delete m.Filter,m.OSSBucketDestination=m.Destination.OSSBucketDestination,m.OSSBucketDestination.rolename=m.OSSBucketDestination.RoleArn.replace(/.*\//,""),delete m.OSSBucketDestination.RoleArn,m.OSSBucketDestination.bucket=m.OSSBucketDestination.Bucket.replace(/.*:::/,""),delete m.OSSBucketDestination.Bucket,delete m.Destination,m.frequency=m.Schedule.Frequency,delete m.Schedule.Frequency,!((v=m==null?void 0:m.OptionalFields)===null||v===void 0)&&v.Field&&!h.isArray((b=m.OptionalFields)===null||b===void 0?void 0:b.Field)&&(m.OptionalFields.Field=[m.OptionalFields.Field])}),c=y.formatObjKey(c,"firstLowerCase",{exclude:["OSSBucketDestination","SSE-OSS","SSE-KMS"]}),c}},{"../utils/dataFix":57,"../utils/formatObjKey":61,"../utils/isArray":63,"../utils/isObject":70,"core-js/modules/es.array.map.js":280,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305}],61:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault");o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js"),o("core-js/modules/es.array.includes.js"),o("core-js/modules/es.string.includes.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.replace.js");var f=p(o("@babel/runtime/helpers/typeof"));Object.defineProperty(R,"__esModule",{value:!0}),R.formatObjKey=void 0;function h(g,w,c){if(g===null||(0,f.default)(g)!=="object")return g;var m;if(Array.isArray(g)){m=[];for(var v=0;v<g.length;v++)m.push(h(g[v],w,c))}else m={},Object.keys(g).forEach(function(b){m[y(b,w,c)]=h(g[b],w,c)});return m}R.formatObjKey=h;function y(g,w,c){return c&&c.exclude&&c.exclude.includes(g)||(w==="firstUpperCase"?g=g.replace(/^./,function(m){return m.toUpperCase()}):w==="firstLowerCase"&&(g=g.replace(/^./,function(m){return m.toLowerCase()}))),g}},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.includes.js":302,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],62:[function(o,M,R){"use strict";o("core-js/modules/es.regexp.exec.js"),Object.defineProperty(R,"__esModule",{value:!0}),R.getStrBytesCount=void 0;function p(f){for(var h=0,y=0;y<f.length;y++){var g=f.charAt(y);/^[\u00-\uff]$/.test(g)?h+=1:h+=2}return h}R.getStrBytesCount=p},{"core-js/modules/es.regexp.exec.js":300}],63:[function(o,M,R){"use strict";o("core-js/modules/es.object.to-string.js"),Object.defineProperty(R,"__esModule",{value:!0}),R.isArray=void 0,R.isArray=function(p){return Object.prototype.toString.call(p)==="[object Array]"}},{"core-js/modules/es.object.to-string.js":291}],64:[function(o,M,R){"use strict";Object.defineProperty(R,"__esModule",{value:!0}),R.isBlob=void 0;function p(f){return typeof Blob!="undefined"&&f instanceof Blob}R.isBlob=p},{}],65:[function(o,M,R){(function(p){(function(){"use strict";Object.defineProperty(R,"__esModule",{value:!0}),R.isBuffer=void 0;function f(h){return p.isBuffer(h)}R.isBuffer=f}).call(this)}).call(this,{isBuffer:o("../../../node_modules/is-buffer/index.js")})},{"../../../node_modules/is-buffer/index.js":366}],66:[function(o,M,R){(function(p){(function(){"use strict";o("core-js/modules/es.array.includes.js"),o("core-js/modules/es.string.includes.js"),Object.defineProperty(R,"__esModule",{value:!0}),R.isDingTalk=void 0;function f(){return!!(p.browser&&window.navigator.userAgent.toLowerCase().includes("aliapp(dingtalk"))}R.isDingTalk=f}).call(this)}).call(this,o("_process"))},{_process:467,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.string.includes.js":302}],67:[function(o,M,R){"use strict";Object.defineProperty(R,"__esModule",{value:!0}),R.isFile=void 0,R.isFile=function(p){return typeof File!="undefined"&&p instanceof File}},{}],68:[function(o,M,R){"use strict";Object.defineProperty(R,"__esModule",{value:!0}),R.isFunction=void 0,R.isFunction=function(p){return typeof p=="function"}},{}],69:[function(o,M,R){"use strict";o("core-js/modules/es.regexp.exec.js"),Object.defineProperty(R,"__esModule",{value:!0}),R.isIP=void 0,R.isIP=function(p){var f=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,h=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;return f.test(p)||h.test(p)}},{"core-js/modules/es.regexp.exec.js":300}],70:[function(o,M,R){"use strict";o("core-js/modules/es.object.to-string.js"),Object.defineProperty(R,"__esModule",{value:!0}),R.isObject=void 0,R.isObject=function(p){return Object.prototype.toString.call(p)==="[object Object]"}},{"core-js/modules/es.object.to-string.js":291}],71:[function(o,M,R){"use strict";o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js"),Object.defineProperty(R,"__esModule",{value:!0}),R.lowercaseKeyHeader=void 0;var p=o("./isObject");function f(h){var y={};return p.isObject(h)&&Object.keys(h).forEach(function(g){y[g.toLowerCase()]=h[g]}),y}R.lowercaseKeyHeader=f},{"./isObject":70,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],72:[function(o,M,R){"use strict";o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.replace.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js"),o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.array.join.js"),o("core-js/modules/es.array.map.js"),o("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(R,"__esModule",{value:!0}),R.obj2xml=void 0;var p=o("./formatObjKey");function f(y){return Object.prototype.toString.call(y).replace(/(.*? |])/g,"").toLowerCase()}function h(y,g){var w="";return g&&g.headers&&(w=`<?xml version="1.0" encoding="UTF-8"?>
`),g&&g.firstUpperCase&&(y=p.formatObjKey(y,"firstUpperCase")),f(y)==="object"?Object.keys(y).forEach(function(c){f(y[c])!=="undefined"&&f(y[c])!=="null"&&(f(y[c])==="string"||f(y[c])==="number"?w+="<".concat(c,">").concat(y[c],"</").concat(c,">"):f(y[c])==="object"?w+="<".concat(c,">").concat(h(y[c]),"</").concat(c,">"):f(y[c])==="array"?w+=y[c].map(function(m){return"<".concat(c,">").concat(h(m),"</").concat(c,">")}).join(""):w+="<".concat(c,">").concat(y[c].toString(),"</").concat(c,">"))}):w+=y.toString(),w}R.obj2xml=h},{"./formatObjKey":61,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.map.js":280,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],73:[function(o,M,R){"use strict";o("core-js/modules/es.array.slice.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.function.name.js"),o("core-js/modules/es.array.from.js"),o("core-js/modules/es.string.iterator.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.symbol.js"),o("core-js/modules/es.symbol.description.js"),o("core-js/modules/es.symbol.iterator.js"),o("core-js/modules/es.array.iterator.js"),o("core-js/modules/web.dom-collections.iterator.js"),o("core-js/modules/es.object.assign.js");function p(g,w){var c=typeof Symbol!="undefined"&&g[Symbol.iterator]||g["@@iterator"];if(!c){if(Array.isArray(g)||(c=f(g))||w&&g&&typeof g.length=="number"){c&&(g=c);var m=0,v=function(){};return{s:v,n:function(){return m>=g.length?{done:!0}:{done:!1,value:g[m++]}},e:function(C){throw C},f:v}}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 b=!0,x=!1,T;return{s:function(){c=c.call(g)},n:function(){var C=c.next();return b=C.done,C},e:function(C){x=!0,T=C},f:function(){try{!b&&c.return!=null&&c.return()}finally{if(x)throw T}}}}function f(g,w){if(g){if(typeof g=="string")return h(g,w);var c=Object.prototype.toString.call(g).slice(8,-1);if(c==="Object"&&g.constructor&&(c=g.constructor.name),c==="Map"||c==="Set")return Array.from(g);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return h(g,w)}}function h(g,w){(w==null||w>g.length)&&(w=g.length);for(var c=0,m=new Array(w);c<w;c++)m[c]=g[c];return m}Object.defineProperty(R,"__esModule",{value:!0}),R.omit=void 0;function y(g,w){var c=Object.assign({},g),m=p(w),v;try{for(m.s();!(v=m.n()).done;){var b=v.value;delete c[b]}}catch(x){m.e(x)}finally{m.f()}return c}R.omit=y},{"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.iterator.js":303,"core-js/modules/es.symbol.description.js":310,"core-js/modules/es.symbol.iterator.js":312,"core-js/modules/es.symbol.js":313,"core-js/modules/web.dom-collections.iterator.js":340}],74:[function(o,M,R){"use strict";o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.promise.js"),Object.defineProperty(R,"__esModule",{value:!0}),R.retry=void 0;function p(f,h){var y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},g=0,w=y.retryDelay,c=w===void 0?500:w,m=y.errorHandler,v=m===void 0?function(){return!0}:m,b=function x(){for(var T=arguments.length,S=new Array(T),C=0;C<T;C++)S[C]=arguments[C];return new Promise(function(E,j){f.apply(void 0,S).then(function(Z){g=0,E(Z)}).catch(function(Z){g<h&&v(Z)?(g++,setTimeout(function(){E(x.apply(void 0,S))},c)):(g=0,j(Z))})})};return b}R.retry=p},{"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295}],75:[function(o,M,R){"use strict";var p=function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(R,"__esModule",{value:!0}),R.setRegion=void 0;var f=p(o("url")),h=o("./checkConfigValid");function y(g){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;h.checkConfigValid(g,"region");var m=c?"https://":"http://",v=w?"-internal.aliyuncs.com":".aliyuncs.com",b="vpc100-oss-cn-";return g.substr(0,b.length)===b&&(v=".aliyuncs.com"),f.default.parse(m+g+v)}R.setRegion=y},{"./checkConfigValid":52,url:472}],76:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.keys.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.array.find.js"),o("core-js/modules/es.object.assign.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(R,"__esModule",{value:!0}),R.checkCredentials=R.setSTSToken=void 0;var y=o("./formatObjKey");function g(){return w.apply(this,arguments)}function w(){return w=(0,h.default)(f.default.mark(function m(){var v,b;return f.default.wrap(function(T){for(;;)switch(T.prev=T.next){case 0:if(this.options||(this.options={}),v=new Date,!this.stsTokenFreshTime){T.next=14;break}if(!(+v-this.stsTokenFreshTime>=this.options.refreshSTSTokenInterval)){T.next=12;break}return this.stsTokenFreshTime=v,T.next=7,this.options.refreshSTSToken();case 7:b=T.sent,b=y.formatObjKey(b,"firstLowerCase"),b.securityToken&&(b.stsToken=b.securityToken),c(b),Object.assign(this.options,b);case 12:T.next=15;break;case 14:this.stsTokenFreshTime=v;case 15:return T.abrupt("return",null);case 16:case"end":return T.stop()}},m,this)})),w.apply(this,arguments)}R.setSTSToken=g;function c(m){var v=["accessKeySecret","accessKeyId","stsToken"],b=Object.keys(m);v.forEach(function(x){if(!b.find(function(T){return T===x}))throw Error("refreshSTSToken must return contains ".concat(x))})}R.checkCredentials=c},{"./formatObjKey":61,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.find.js":275,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291}],77:[function(o,M,R){function p(h,y,g,w,c,m,v){try{var b=h[m](v),x=b.value}catch(T){g(T);return}b.done?y(x):Promise.resolve(x).then(w,c)}function f(h){return function(){var y=this,g=arguments;return new Promise(function(w,c){var m=h.apply(y,g);function v(x){p(m,w,c,v,b,"next",x)}function b(x){p(m,w,c,v,b,"throw",x)}v(void 0)})}}M.exports=f,M.exports.__esModule=!0,M.exports.default=M.exports},{}],78:[function(o,M,R){function p(f){return f&&f.__esModule?f:{default:f}}M.exports=p,M.exports.__esModule=!0,M.exports.default=M.exports},{}],79:[function(o,M,R){function p(f){"@babel/helpers - typeof";return M.exports=p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},M.exports.__esModule=!0,M.exports.default=M.exports,p(f)}M.exports=p,M.exports.__esModule=!0,M.exports.default=M.exports},{}],80:[function(o,M,R){M.exports=o("regenerator-runtime")},{"regenerator-runtime":395}],81:[function(o,M,R){M.exports=p,M.exports.HttpsAgent=p;function p(){}},{}],82:[function(o,M,R){(function(p){(function(){"use strict";var f=o("object-assign");function h(X,ee){if(X===ee)return 0;for(var ie=X.length,he=ee.length,ne=0,Ie=Math.min(ie,he);ne<Ie;++ne)if(X[ne]!==ee[ne]){ie=X[ne],he=ee[ne];break}return ie<he?-1:he<ie?1:0}function y(X){return p.Buffer&&typeof p.Buffer.isBuffer=="function"?p.Buffer.isBuffer(X):!!(X!=null&&X._isBuffer)}var g=o("util/"),w=Object.prototype.hasOwnProperty,c=Array.prototype.slice,m=function(){return function(){}.name==="foo"}();function v(X){return Object.prototype.toString.call(X)}function b(X){return y(X)||typeof p.ArrayBuffer!="function"?!1:typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(X):X?!!(X instanceof DataView||X.buffer&&X.buffer instanceof ArrayBuffer):!1}var x=M.exports=P,T=/\s*function\s+([^\(\s]*)\s*/;function S(X){if(g.isFunction(X)){if(m)return X.name;var ee=X.toString(),ie=ee.match(T);return ie&&ie[1]}}x.AssertionError=function(ee){this.name="AssertionError",this.actual=ee.actual,this.expected=ee.expected,this.operator=ee.operator,ee.message?(this.message=ee.message,this.generatedMessage=!1):(this.message=j(this),this.generatedMessage=!0);var ie=ee.stackStartFunction||Z;if(Error.captureStackTrace)Error.captureStackTrace(this,ie);else{var he=new Error;if(he.stack){var ne=he.stack,Ie=S(ie),q=ne.indexOf(`
`+Ie);if(q>=0){var pe=ne.indexOf(`
`,q+1);ne=ne.substring(pe+1)}this.stack=ne}}},g.inherits(x.AssertionError,Error);function C(X,ee){return typeof X=="string"?X.length<ee?X:X.slice(0,ee):X}function E(X){if(m||!g.isFunction(X))return g.inspect(X);var ee=S(X),ie=ee?": "+ee:"";return"[Function"+ie+"]"}function j(X){return C(E(X.actual),128)+" "+X.operator+" "+C(E(X.expected),128)}function Z(X,ee,ie,he,ne){throw new x.AssertionError({message:ie,actual:X,expected:ee,operator:he,stackStartFunction:ne})}x.fail=Z;function P(X,ee){X||Z(X,!0,ee,"==",x.ok)}x.ok=P,x.equal=function(ee,ie,he){ee!=ie&&Z(ee,ie,he,"==",x.equal)},x.notEqual=function(ee,ie,he){ee==ie&&Z(ee,ie,he,"!=",x.notEqual)},x.deepEqual=function(ee,ie,he){Q(ee,ie,!1)||Z(ee,ie,he,"deepEqual",x.deepEqual)},x.deepStrictEqual=function(ee,ie,he){Q(ee,ie,!0)||Z(ee,ie,he,"deepStrictEqual",x.deepStrictEqual)};function Q(X,ee,ie,he){if(X===ee)return!0;if(y(X)&&y(ee))return h(X,ee)===0;if(g.isDate(X)&&g.isDate(ee))return X.getTime()===ee.getTime();if(g.isRegExp(X)&&g.isRegExp(ee))return X.source===ee.source&&X.global===ee.global&&X.multiline===ee.multiline&&X.lastIndex===ee.lastIndex&&X.ignoreCase===ee.ignoreCase;if((X===null||typeof X!="object")&&(ee===null||typeof ee!="object"))return ie?X===ee:X==ee;if(b(X)&&b(ee)&&v(X)===v(ee)&&!(X instanceof Float32Array||X instanceof Float64Array))return h(new Uint8Array(X.buffer),new Uint8Array(ee.buffer))===0;if(y(X)!==y(ee))return!1;he=he||{actual:[],expected:[]};var ne=he.actual.indexOf(X);return ne!==-1&&ne===he.expected.indexOf(ee)?!0:(he.actual.push(X),he.expected.push(ee),k(X,ee,ie,he))}function B(X){return Object.prototype.toString.call(X)=="[object Arguments]"}function k(X,ee,ie,he){if(X==null||ee===null||ee===void 0)return!1;if(g.isPrimitive(X)||g.isPrimitive(ee))return X===ee;if(ie&&Object.getPrototypeOf(X)!==Object.getPrototypeOf(ee))return!1;var ne=B(X),Ie=B(ee);if(ne&&!Ie||!ne&&Ie)return!1;if(ne)return X=c.call(X),ee=c.call(ee),Q(X,ee,ie);var q=_(X),pe=_(ee),ve,xe;if(q.length!==pe.length)return!1;for(q.sort(),pe.sort(),xe=q.length-1;xe>=0;xe--)if(q[xe]!==pe[xe])return!1;for(xe=q.length-1;xe>=0;xe--)if(ve=q[xe],!Q(X[ve],ee[ve],ie,he))return!1;return!0}x.notDeepEqual=function(ee,ie,he){Q(ee,ie,!1)&&Z(ee,ie,he,"notDeepEqual",x.notDeepEqual)},x.notDeepStrictEqual=D;function D(X,ee,ie){Q(X,ee,!0)&&Z(X,ee,ie,"notDeepStrictEqual",D)}x.strictEqual=function(ee,ie,he){ee!==ie&&Z(ee,ie,he,"===",x.strictEqual)},x.notStrictEqual=function(ee,ie,he){ee===ie&&Z(ee,ie,he,"!==",x.notStrictEqual)};function F(X,ee){if(!X||!ee)return!1;if(Object.prototype.toString.call(ee)=="[object RegExp]")return ee.test(X);try{if(X instanceof ee)return!0}catch(ie){}return Error.isPrototypeOf(ee)?!1:ee.call({},X)===!0}function J(X){var ee;try{X()}catch(ie){ee=ie}return ee}function H(X,ee,ie,he){var ne;if(typeof ee!="function")throw new TypeError('"block" argument must be a function');typeof ie=="string"&&(he=ie,ie=null),ne=J(ee),he=(ie&&ie.name?" ("+ie.name+").":".")+(he?" "+he:"."),X&&!ne&&Z(ne,ie,"Missing expected exception"+he);var Ie=typeof he=="string",q=!X&&g.isError(ne),pe=!X&&ne&&!ie;if((q&&Ie&&F(ne,ie)||pe)&&Z(ne,ie,"Got unwanted exception"+he),X&&ne&&ie&&!F(ne,ie)||!X&&ne)throw ne}x.throws=function(X,ee,ie){H(!0,X,ee,ie)},x.doesNotThrow=function(X,ee,ie){H(!1,X,ee,ie)},x.ifError=function(X){if(X)throw X};function N(X,ee){X||Z(X,!0,ee,"==",N)}x.strict=f(N,x,{equal:x.strictEqual,deepEqual:x.deepStrictEqual,notEqual:x.notStrictEqual,notDeepEqual:x.notDeepStrictEqual}),x.strict.strict=x.strict;var _=Object.keys||function(X){var ee=[];for(var ie in X)w.call(X,ie)&&ee.push(ie);return ee}}).call(this)}).call(this,typeof mt!="undefined"?mt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"object-assign":377,"util/":85}],83:[function(o,M,R){typeof Object.create=="function"?M.exports=function(f,h){f.super_=h,f.prototype=Object.create(h.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}})}:M.exports=function(f,h){f.super_=h;var y=function(){};y.prototype=h.prototype,f.prototype=new y,f.prototype.constructor=f}},{}],84:[function(o,M,R){M.exports=function(f){return f&&typeof f=="object"&&typeof f.copy=="function"&&typeof f.fill=="function"&&typeof f.readUInt8=="function"}},{}],85:[function(o,M,R){(function(p,f){(function(){var h=/%[sdj%]/g;R.format=function(pe){if(!k(pe)){for(var ve=[],xe=0;xe<arguments.length;xe++)ve.push(w(arguments[xe]));return ve.join(" ")}for(var xe=1,ce=arguments,fe=ce.length,ge=String(pe).replace(h,function(De){if(De==="%%")return"%";if(xe>=fe)return De;switch(De){case"%s":return String(ce[xe++]);case"%d":return Number(ce[xe++]);case"%j":try{return JSON.stringify(ce[xe++])}catch(ke){return"[Circular]"}default:return De}}),Se=ce[xe];xe<fe;Se=ce[++xe])P(Se)||!H(Se)?ge+=" "+Se:ge+=" "+w(Se);return ge},R.deprecate=function(pe,ve){if(F(f.process))return function(){return R.deprecate(pe,ve).apply(this,arguments)};if(p.noDeprecation===!0)return pe;var xe=!1;function ce(){if(!xe){if(p.throwDeprecation)throw new Error(ve);p.traceDeprecation?console.trace(ve):console.error(ve),xe=!0}return pe.apply(this,arguments)}return ce};var y={},g;R.debuglog=function(pe){if(F(g)&&(g=p.env.NODE_DEBUG||""),pe=pe.toUpperCase(),!y[pe])if(new RegExp("\\b"+pe+"\\b","i").test(g)){var ve=p.pid;y[pe]=function(){var xe=R.format.apply(R,arguments);console.error("%s %d: %s",pe,ve,xe)}}else y[pe]=function(){};return y[pe]};function w(pe,ve){var xe={seen:[],stylize:m};return arguments.length>=3&&(xe.depth=arguments[2]),arguments.length>=4&&(xe.colors=arguments[3]),Z(ve)?xe.showHidden=ve:ve&&R._extend(xe,ve),F(xe.showHidden)&&(xe.showHidden=!1),F(xe.depth)&&(xe.depth=2),F(xe.colors)&&(xe.colors=!1),F(xe.customInspect)&&(xe.customInspect=!0),xe.colors&&(xe.stylize=c),b(xe,pe,xe.depth)}R.inspect=w,w.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},w.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function c(pe,ve){var xe=w.styles[ve];return xe?"\x1B["+w.colors[xe][0]+"m"+pe+"\x1B["+w.colors[xe][1]+"m":pe}function m(pe,ve){return pe}function v(pe){var ve={};return pe.forEach(function(xe,ce){ve[xe]=!0}),ve}function b(pe,ve,xe){if(pe.customInspect&&ve&&X(ve.inspect)&&ve.inspect!==R.inspect&&!(ve.constructor&&ve.constructor.prototype===ve)){var ce=ve.inspect(xe,pe);return k(ce)||(ce=b(pe,ce,xe)),ce}var fe=x(pe,ve);if(fe)return fe;var ge=Object.keys(ve),Se=v(ge);if(pe.showHidden&&(ge=Object.getOwnPropertyNames(ve)),_(ve)&&(ge.indexOf("message")>=0||ge.indexOf("description")>=0))return T(ve);if(ge.length===0){if(X(ve)){var De=ve.name?": "+ve.name:"";return pe.stylize("[Function"+De+"]","special")}if(J(ve))return pe.stylize(RegExp.prototype.toString.call(ve),"regexp");if(N(ve))return pe.stylize(Date.prototype.toString.call(ve),"date");if(_(ve))return T(ve)}var ke="",de=!1,Y=["{","}"];if(j(ve)&&(de=!0,Y=["[","]"]),X(ve)){var ye=ve.name?": "+ve.name:"";ke=" [Function"+ye+"]"}if(J(ve)&&(ke=" "+RegExp.prototype.toString.call(ve)),N(ve)&&(ke=" "+Date.prototype.toUTCString.call(ve)),_(ve)&&(ke=" "+T(ve)),ge.length===0&&(!de||ve.length==0))return Y[0]+ke+Y[1];if(xe<0)return J(ve)?pe.stylize(RegExp.prototype.toString.call(ve),"regexp"):pe.stylize("[Object]","special");pe.seen.push(ve);var V;return de?V=S(pe,ve,xe,Se,ge):V=ge.map(function(G){return C(pe,ve,xe,Se,G,de)}),pe.seen.pop(),E(V,ke,Y)}function x(pe,ve){if(F(ve))return pe.stylize("undefined","undefined");if(k(ve)){var xe="'"+JSON.stringify(ve).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return pe.stylize(xe,"string")}if(B(ve))return pe.stylize(""+ve,"number");if(Z(ve))return pe.stylize(""+ve,"boolean");if(P(ve))return pe.stylize("null","null")}function T(pe){return"["+Error.prototype.toString.call(pe)+"]"}function S(pe,ve,xe,ce,fe){for(var ge=[],Se=0,De=ve.length;Se<De;++Se)q(ve,String(Se))?ge.push(C(pe,ve,xe,ce,String(Se),!0)):ge.push("");return fe.forEach(function(ke){ke.match(/^\d+$/)||ge.push(C(pe,ve,xe,ce,ke,!0))}),ge}function C(pe,ve,xe,ce,fe,ge){var Se,De,ke;if(ke=Object.getOwnPropertyDescriptor(ve,fe)||{value:ve[fe]},ke.get?ke.set?De=pe.stylize("[Getter/Setter]","special"):De=pe.stylize("[Getter]","special"):ke.set&&(De=pe.stylize("[Setter]","special")),q(ce,fe)||(Se="["+fe+"]"),De||(pe.seen.indexOf(ke.value)<0?(P(xe)?De=b(pe,ke.value,null):De=b(pe,ke.value,xe-1),De.indexOf(`
`)>-1&&(ge?De=De.split(`
`).map(function(de){return" "+de}).join(`
`).substr(2):De=`
`+De.split(`
`).map(function(de){return" "+de}).join(`
`))):De=pe.stylize("[Circular]","special")),F(Se)){if(ge&&fe.match(/^\d+$/))return De;Se=JSON.stringify(""+fe),Se.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Se=Se.substr(1,Se.length-2),Se=pe.stylize(Se,"name")):(Se=Se.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Se=pe.stylize(Se,"string"))}return Se+": "+De}function E(pe,ve,xe){var ce=0,fe=pe.reduce(function(ge,Se){return ce++,Se.indexOf(`
`)>=0&&ce++,ge+Se.replace(/\u001b\[\d\d?m/g,"").length+1},0);return fe>60?xe[0]+(ve===""?"":ve+`
`)+" "+pe.join(`,
`)+" "+xe[1]:xe[0]+ve+" "+pe.join(", ")+" "+xe[1]}function j(pe){return Array.isArray(pe)}R.isArray=j;function Z(pe){return typeof pe=="boolean"}R.isBoolean=Z;function P(pe){return pe===null}R.isNull=P;function Q(pe){return pe==null}R.isNullOrUndefined=Q;function B(pe){return typeof pe=="number"}R.isNumber=B;function k(pe){return typeof pe=="string"}R.isString=k;function D(pe){return typeof pe=="symbol"}R.isSymbol=D;function F(pe){return pe===void 0}R.isUndefined=F;function J(pe){return H(pe)&&ie(pe)==="[object RegExp]"}R.isRegExp=J;function H(pe){return typeof pe=="object"&&pe!==null}R.isObject=H;function N(pe){return H(pe)&&ie(pe)==="[object Date]"}R.isDate=N;function _(pe){return H(pe)&&(ie(pe)==="[object Error]"||pe instanceof Error)}R.isError=_;function X(pe){return typeof pe=="function"}R.isFunction=X;function ee(pe){return pe===null||typeof pe=="boolean"||typeof pe=="number"||typeof pe=="string"||typeof pe=="symbol"||typeof pe=="undefined"}R.isPrimitive=ee,R.isBuffer=o("./support/isBuffer");function ie(pe){return Object.prototype.toString.call(pe)}function he(pe){return pe<10?"0"+pe.toString(10):pe.toString(10)}var ne=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Ie(){var pe=new Date,ve=[he(pe.getHours()),he(pe.getMinutes()),he(pe.getSeconds())].join(":");return[pe.getDate(),ne[pe.getMonth()],ve].join(" ")}R.log=function(){console.log("%s - %s",Ie(),R.format.apply(R,arguments))},R.inherits=o("inherits"),R._extend=function(pe,ve){if(!ve||!H(ve))return pe;for(var xe=Object.keys(ve),ce=xe.length;ce--;)pe[xe[ce]]=ve[xe[ce]];return pe};function q(pe,ve){return Object.prototype.hasOwnProperty.call(pe,ve)}}).call(this)}).call(this,o("_process"),typeof mt!="undefined"?mt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":84,_process:467,inherits:83}],86:[function(o,M,R){(function(p){(function(){"use strict";var f=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],h=typeof globalThis=="undefined"?p:globalThis;M.exports=function(){for(var g=[],w=0;w<f.length;w++)typeof h[f[w]]=="function"&&(g[g.length]=f[w]);return g}}).call(this)}).call(this,typeof mt!="undefined"?mt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],87:[function(o,M,R){"use strict";R.byteLength=m,R.toByteArray=b,R.fromByteArray=S;for(var p=[],f=[],h=typeof Uint8Array!="undefined"?Uint8Array:Array,y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",g=0,w=y.length;g<w;++g)p[g]=y[g],f[y.charCodeAt(g)]=g;f[45]=62,f[95]=63;function c(C){var E=C.length;if(E%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var j=C.indexOf("=");j===-1&&(j=E);var Z=j===E?0:4-j%4;return[j,Z]}function m(C){var E=c(C),j=E[0],Z=E[1];return(j+Z)*3/4-Z}function v(C,E,j){return(E+j)*3/4-j}function b(C){var E,j=c(C),Z=j[0],P=j[1],Q=new h(v(C,Z,P)),B=0,k=P>0?Z-4:Z,D;for(D=0;D<k;D+=4)E=f[C.charCodeAt(D)]<<18|f[C.charCodeAt(D+1)]<<12|f[C.charCodeAt(D+2)]<<6|f[C.charCodeAt(D+3)],Q[B++]=E>>16&255,Q[B++]=E>>8&255,Q[B++]=E&255;return P===2&&(E=f[C.charCodeAt(D)]<<2|f[C.charCodeAt(D+1)]>>4,Q[B++]=E&255),P===1&&(E=f[C.charCodeAt(D)]<<10|f[C.charCodeAt(D+1)]<<4|f[C.charCodeAt(D+2)]>>2,Q[B++]=E>>8&255,Q[B++]=E&255),Q}function x(C){return p[C>>18&63]+p[C>>12&63]+p[C>>6&63]+p[C&63]}function T(C,E,j){for(var Z,P=[],Q=E;Q<j;Q+=3)Z=(C[Q]<<16&16711680)+(C[Q+1]<<8&65280)+(C[Q+2]&255),P.push(x(Z));return P.join("")}function S(C){for(var E,j=C.length,Z=j%3,P=[],Q=16383,B=0,k=j-Z;B<k;B+=Q)P.push(T(C,B,B+Q>k?k:B+Q));return Z===1?(E=C[j-1],P.push(p[E>>2]+p[E<<4&63]+"==")):Z===2&&(E=(C[j-2]<<8)+C[j-1],P.push(p[E>>10]+p[E>>4&63]+p[E<<2&63]+"=")),P.join("")}},{}],88:[function(o,M,R){(function(p,f,h){typeof M!="undefined"&&M.exports?M.exports=h():typeof Te=="function"&&Te.amd?Te(f,h):p[f]=h()})(this,"bowser",function(){var p=!0;function f(v){function b(ve){var xe=v.match(ve);return xe&&xe.length>1&&xe[1]||""}function x(ve){var xe=v.match(ve);return xe&&xe.length>1&&xe[2]||""}var T=b(/(ipod|iphone|ipad)/i).toLowerCase(),S=/like android/i.test(v),C=!S&&/android/i.test(v),E=/nexus\s*[0-6]\s*/i.test(v),j=!E&&/nexus\s*[0-9]+/i.test(v),Z=/CrOS/.test(v),P=/silk/i.test(v),Q=/sailfish/i.test(v),B=/tizen/i.test(v),k=/(web|hpw)(o|0)s/i.test(v),D=/windows phone/i.test(v),F=/SamsungBrowser/i.test(v),J=!D&&/windows/i.test(v),H=!T&&!P&&/macintosh/i.test(v),N=!C&&!Q&&!B&&!k&&/linux/i.test(v),_=x(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),X=b(/version\/(\d+(\.\d+)?)/i),ee=/tablet/i.test(v)&&!/tablet pc/i.test(v),ie=!ee&&/[^-]mobi/i.test(v),he=/xbox/i.test(v),ne;/opera/i.test(v)?ne={name:"Opera",opera:p,version:X||b(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(v)?ne={name:"Opera",opera:p,version:b(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||X}:/SamsungBrowser/i.test(v)?ne={name:"Samsung Internet for Android",samsungBrowser:p,version:X||b(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(v)?ne={name:"NAVER Whale browser",whale:p,version:b(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(v)?ne={name:"MZ Browser",mzbrowser:p,version:b(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(v)?ne={name:"Opera Coast",coast:p,version:X||b(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(v)?ne={name:"Focus",focus:p,version:b(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(v)?ne={name:"Yandex Browser",yandexbrowser:p,version:X||b(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(v)?ne={name:"UC Browser",ucbrowser:p,version:b(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(v)?ne={name:"Maxthon",maxthon:p,version:b(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(v)?ne={name:"Epiphany",epiphany:p,version:b(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(v)?ne={name:"Puffin",puffin:p,version:b(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(v)?ne={name:"Sleipnir",sleipnir:p,version:b(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(v)?ne={name:"K-Meleon",kMeleon:p,version:b(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:D?(ne={name:"Windows Phone",osname:"Windows Phone",windowsphone:p},_?(ne.msedge=p,ne.version=_):(ne.msie=p,ne.version=b(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(v)?ne={name:"Internet Explorer",msie:p,version:b(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:Z?ne={name:"Chrome",osname:"Chrome OS",chromeos:p,chromeBook:p,chrome:p,version:b(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(v)?ne={name:"Microsoft Edge",msedge:p,version:_}:/vivaldi/i.test(v)?ne={name:"Vivaldi",vivaldi:p,version:b(/vivaldi\/(\d+(\.\d+)?)/i)||X}:Q?ne={name:"Sailfish",osname:"Sailfish OS",sailfish:p,version:b(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(v)?ne={name:"SeaMonkey",seamonkey:p,version:b(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(v)?(ne={name:"Firefox",firefox:p,version:b(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(v)&&(ne.firefoxos=p,ne.osname="Firefox OS")):P?ne={name:"Amazon Silk",silk:p,version:b(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(v)?ne={name:"PhantomJS",phantom:p,version:b(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(v)?ne={name:"SlimerJS",slimer:p,version:b(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(v)||/rim\stablet/i.test(v)?ne={name:"BlackBerry",osname:"BlackBerry OS",blackberry:p,version:X||b(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:k?(ne={name:"WebOS",osname:"WebOS",webos:p,version:X||b(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(v)&&(ne.touchpad=p)):/bada/i.test(v)?ne={name:"Bada",osname:"Bada",bada:p,version:b(/dolfin\/(\d+(\.\d+)?)/i)}:B?ne={name:"Tizen",osname:"Tizen",tizen:p,version:b(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||X}:/qupzilla/i.test(v)?ne={name:"QupZilla",qupzilla:p,version:b(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||X}:/chromium/i.test(v)?ne={name:"Chromium",chromium:p,version:b(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||X}:/chrome|crios|crmo/i.test(v)?ne={name:"Chrome",chrome:p,version:b(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:C?ne={name:"Android",version:X}:/safari|applewebkit/i.test(v)?(ne={name:"Safari",safari:p},X&&(ne.version=X)):T?(ne={name:T=="iphone"?"iPhone":T=="ipad"?"iPad":"iPod"},X&&(ne.version=X)):/googlebot/i.test(v)?ne={name:"Googlebot",googlebot:p,version:b(/googlebot\/(\d+(\.\d+))/i)||X}:ne={name:b(/^(.*)\/(.*) /),version:x(/^(.*)\/(.*) /)},!ne.msedge&&/(apple)?webkit/i.test(v)?(/(apple)?webkit\/537\.36/i.test(v)?(ne.name=ne.name||"Blink",ne.blink=p):(ne.name=ne.name||"Webkit",ne.webkit=p),!ne.version&&X&&(ne.version=X)):!ne.opera&&/gecko\//i.test(v)&&(ne.name=ne.name||"Gecko",ne.gecko=p,ne.version=ne.version||b(/gecko\/(\d+(\.\d+)?)/i)),!ne.windowsphone&&(C||ne.silk)?(ne.android=p,ne.osname="Android"):!ne.windowsphone&&T?(ne[T]=p,ne.ios=p,ne.osname="iOS"):H?(ne.mac=p,ne.osname="macOS"):he?(ne.xbox=p,ne.osname="Xbox"):J?(ne.windows=p,ne.osname="Windows"):N&&(ne.linux=p,ne.osname="Linux");function Ie(ve){switch(ve){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}var q="";ne.windows?q=Ie(b(/Windows ((NT|XP)( \d\d?.\d)?)/i)):ne.windowsphone?q=b(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):ne.mac?(q=b(/Mac OS X (\d+([_\.\s]\d+)*)/i),q=q.replace(/[_\s]/g,".")):T?(q=b(/os (\d+([_\s]\d+)*) like mac os x/i),q=q.replace(/[_\s]/g,".")):C?q=b(/android[ \/-](\d+(\.\d+)*)/i):ne.webos?q=b(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):ne.blackberry?q=b(/rim\stablet\sos\s(\d+(\.\d+)*)/i):ne.bada?q=b(/bada\/(\d+(\.\d+)*)/i):ne.tizen&&(q=b(/tizen[\/\s](\d+(\.\d+)*)/i)),q&&(ne.osversion=q);var pe=!ne.windows&&q.split(".")[0];return ee||j||T=="ipad"||C&&(pe==3||pe>=4&&!ie)||ne.silk?ne.tablet=p:(ie||T=="iphone"||T=="ipod"||C||E||ne.blackberry||ne.webos||ne.bada)&&(ne.mobile=p),ne.msedge||ne.msie&&ne.version>=10||ne.yandexbrowser&&ne.version>=15||ne.vivaldi&&ne.version>=1||ne.chrome&&ne.version>=20||ne.samsungBrowser&&ne.version>=4||ne.whale&&w([ne.version,"1.0"])===1||ne.mzbrowser&&w([ne.version,"6.0"])===1||ne.focus&&w([ne.version,"1.0"])===1||ne.firefox&&ne.version>=20||ne.safari&&ne.version>=6||ne.opera&&ne.version>=10||ne.ios&&ne.osversion&&ne.osversion.split(".")[0]>=6||ne.blackberry&&ne.version>=10.1||ne.chromium&&ne.version>=20?ne.a=p:ne.msie&&ne.version<10||ne.chrome&&ne.version<20||ne.firefox&&ne.version<20||ne.safari&&ne.version<6||ne.opera&&ne.version<10||ne.ios&&ne.osversion&&ne.osversion.split(".")[0]<6||ne.chromium&&ne.version<20?ne.c=p:ne.x=p,ne}var h=f(typeof navigator!="undefined"&&navigator.userAgent||"");h.test=function(v){for(var b=0;b<v.length;++b){var x=v[b];if(typeof x=="string"&&x in h)return!0}return!1};function y(v){return v.split(".").length}function g(v,b){var x=[],T;if(Array.prototype.map)return Array.prototype.map.call(v,b);for(T=0;T<v.length;T++)x.push(b(v[T]));return x}function w(v){for(var b=Math.max(y(v[0]),y(v[1])),x=g(v,function(T){var S=b-y(T);return T=T+new Array(S+1).join(".0"),g(T.split("."),function(C){return new Array(20-C.length).join("0")+C}).reverse()});--b>=0;){if(x[0][b]>x[1][b])return 1;if(x[0][b]===x[1][b]){if(b===0)return 0}else return-1}}function c(v,b,x){var T=h;typeof b=="string"&&(x=b,b=void 0),b===void 0&&(b=!1),x&&(T=f(x));var S=""+T.version;for(var C in v)if(v.hasOwnProperty(C)&&T[C]){if(typeof v[C]!="string")throw new Error("Browser version in the minVersion map should be a string: "+C+": "+String(v));return w([S,v[C]])<0}return b}function m(v,b,x){return!c(v,b,x)}return h.isUnsupportedBrowser=c,h.compareVersions=w,h.check=m,h._detect=f,h.detect=f,h})},{}],89:[function(o,M,R){},{}],90:[function(o,M,R){(function(p){(function(){"use strict";var f=o("base64-js"),h=o("ieee754");R.Buffer=c,R.SlowBuffer=Z,R.INSPECT_MAX_BYTES=50;var y=2147483647;R.kMaxLength=y,c.TYPED_ARRAY_SUPPORT=g(),!c.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function g(){try{var U=new Uint8Array(1);return U.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},U.foo()===42}catch(L){return!1}}Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}});function w(U){if(U>y)throw new RangeError('The value "'+U+'" is invalid for option "size"');var L=new Uint8Array(U);return L.__proto__=c.prototype,L}function c(U,L,$){if(typeof U=="number"){if(typeof L=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return x(U)}return m(U,L,$)}typeof Symbol!="undefined"&&Symbol.species!=null&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),c.poolSize=8192;function m(U,L,$){if(typeof U=="string")return T(U,L);if(ArrayBuffer.isView(U))return S(U);if(U==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof U);if(K(U,ArrayBuffer)||U&&K(U.buffer,ArrayBuffer))return C(U,L,$);if(typeof U=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var ue=U.valueOf&&U.valueOf();if(ue!=null&&ue!==U)return c.from(ue,L,$);var Ee=E(U);if(Ee)return Ee;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof U[Symbol.toPrimitive]=="function")return c.from(U[Symbol.toPrimitive]("string"),L,$);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof U)}c.from=function(U,L,$){return m(U,L,$)},c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array;function v(U){if(typeof U!="number")throw new TypeError('"size" argument must be of type number');if(U<0)throw new RangeError('The value "'+U+'" is invalid for option "size"')}function b(U,L,$){return v(U),U<=0?w(U):L!==void 0?typeof $=="string"?w(U).fill(L,$):w(U).fill(L):w(U)}c.alloc=function(U,L,$){return b(U,L,$)};function x(U){return v(U),w(U<0?0:j(U)|0)}c.allocUnsafe=function(U){return x(U)},c.allocUnsafeSlow=function(U){return x(U)};function T(U,L){if((typeof L!="string"||L==="")&&(L="utf8"),!c.isEncoding(L))throw new TypeError("Unknown encoding: "+L);var $=P(U,L)|0,ue=w($),Ee=ue.write(U,L);return Ee!==$&&(ue=ue.slice(0,Ee)),ue}function S(U){for(var L=U.length<0?0:j(U.length)|0,$=w(L),ue=0;ue<L;ue+=1)$[ue]=U[ue]&255;return $}function C(U,L,$){if(L<0||U.byteLength<L)throw new RangeError('"offset" is outside of buffer bounds');if(U.byteLength<L+($||0))throw new RangeError('"length" is outside of buffer bounds');var ue;return L===void 0&&$===void 0?ue=new Uint8Array(U):$===void 0?ue=new Uint8Array(U,L):ue=new Uint8Array(U,L,$),ue.__proto__=c.prototype,ue}function E(U){if(c.isBuffer(U)){var L=j(U.length)|0,$=w(L);return $.length===0||U.copy($,0,0,L),$}if(U.length!==void 0)return typeof U.length!="number"||te(U.length)?w(0):S(U);if(U.type==="Buffer"&&Array.isArray(U.data))return S(U.data)}function j(U){if(U>=y)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+y.toString(16)+" bytes");return U|0}function Z(U){return+U!=U&&(U=0),c.alloc(+U)}c.isBuffer=function(L){return L!=null&&L._isBuffer===!0&&L!==c.prototype},c.compare=function(L,$){if(K(L,Uint8Array)&&(L=c.from(L,L.offset,L.byteLength)),K($,Uint8Array)&&($=c.from($,$.offset,$.byteLength)),!c.isBuffer(L)||!c.isBuffer($))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(L===$)return 0;for(var ue=L.length,Ee=$.length,ze=0,_e=Math.min(ue,Ee);ze<_e;++ze)if(L[ze]!==$[ze]){ue=L[ze],Ee=$[ze];break}return ue<Ee?-1:Ee<ue?1:0},c.isEncoding=function(L){switch(String(L).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(L,$){if(!Array.isArray(L))throw new TypeError('"list" argument must be an Array of Buffers');if(L.length===0)return c.alloc(0);var ue;if($===void 0)for($=0,ue=0;ue<L.length;++ue)$+=L[ue].length;var Ee=c.allocUnsafe($),ze=0;for(ue=0;ue<L.length;++ue){var _e=L[ue];if(K(_e,Uint8Array)&&(_e=c.from(_e)),!c.isBuffer(_e))throw new TypeError('"list" argument must be an Array of Buffers');_e.copy(Ee,ze),ze+=_e.length}return Ee};function P(U,L){if(c.isBuffer(U))return U.length;if(ArrayBuffer.isView(U)||K(U,ArrayBuffer))return U.byteLength;if(typeof U!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof U);var $=U.length,ue=arguments.length>2&&arguments[2]===!0;if(!ue&&$===0)return 0;for(var Ee=!1;;)switch(L){case"ascii":case"latin1":case"binary":return $;case"utf8":case"utf-8":return Y(U).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $*2;case"hex":return $>>>1;case"base64":return G(U).length;default:if(Ee)return ue?-1:Y(U).length;L=(""+L).toLowerCase(),Ee=!0}}c.byteLength=P;function Q(U,L,$){var ue=!1;if((L===void 0||L<0)&&(L=0),L>this.length||(($===void 0||$>this.length)&&($=this.length),$<=0)||($>>>=0,L>>>=0,$<=L))return"";for(U||(U="utf8");;)switch(U){case"hex":return pe(this,L,$);case"utf8":case"utf-8":return ie(this,L,$);case"ascii":return Ie(this,L,$);case"latin1":case"binary":return q(this,L,$);case"base64":return ee(this,L,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ve(this,L,$);default:if(ue)throw new TypeError("Unknown encoding: "+U);U=(U+"").toLowerCase(),ue=!0}}c.prototype._isBuffer=!0;function B(U,L,$){var ue=U[L];U[L]=U[$],U[$]=ue}c.prototype.swap16=function(){var L=this.length;if(L%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var $=0;$<L;$+=2)B(this,$,$+1);return this},c.prototype.swap32=function(){var L=this.length;if(L%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var $=0;$<L;$+=4)B(this,$,$+3),B(this,$+1,$+2);return this},c.prototype.swap64=function(){var L=this.length;if(L%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var $=0;$<L;$+=8)B(this,$,$+7),B(this,$+1,$+6),B(this,$+2,$+5),B(this,$+3,$+4);return this},c.prototype.toString=function(){var L=this.length;return L===0?"":arguments.length===0?ie(this,0,L):Q.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(L){if(!c.isBuffer(L))throw new TypeError("Argument must be a Buffer");return this===L?!0:c.compare(this,L)===0},c.prototype.inspect=function(){var L="",$=R.INSPECT_MAX_BYTES;return L=this.toString("hex",0,$).replace(/(.{2})/g,"$1 ").trim(),this.length>$&&(L+=" ... "),"<Buffer "+L+">"},c.prototype.compare=function(L,$,ue,Ee,ze){if(K(L,Uint8Array)&&(L=c.from(L,L.offset,L.byteLength)),!c.isBuffer(L))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof L);if($===void 0&&($=0),ue===void 0&&(ue=L?L.length:0),Ee===void 0&&(Ee=0),ze===void 0&&(ze=this.length),$<0||ue>L.length||Ee<0||ze>this.length)throw new RangeError("out of range index");if(Ee>=ze&&$>=ue)return 0;if(Ee>=ze)return-1;if($>=ue)return 1;if($>>>=0,ue>>>=0,Ee>>>=0,ze>>>=0,this===L)return 0;for(var _e=ze-Ee,le=ue-$,Re=Math.min(_e,le),Me=this.slice(Ee,ze),He=L.slice($,ue),Be=0;Be<Re;++Be)if(Me[Be]!==He[Be]){_e=Me[Be],le=He[Be];break}return _e<le?-1:le<_e?1:0};function k(U,L,$,ue,Ee){if(U.length===0)return-1;if(typeof $=="string"?(ue=$,$=0):$>2147483647?$=2147483647:$<-2147483648&&($=-2147483648),$=+$,te($)&&($=Ee?0:U.length-1),$<0&&($=U.length+$),$>=U.length){if(Ee)return-1;$=U.length-1}else if($<0)if(Ee)$=0;else return-1;if(typeof L=="string"&&(L=c.from(L,ue)),c.isBuffer(L))return L.length===0?-1:D(U,L,$,ue,Ee);if(typeof L=="number")return L=L&255,typeof Uint8Array.prototype.indexOf=="function"?Ee?Uint8Array.prototype.indexOf.call(U,L,$):Uint8Array.prototype.lastIndexOf.call(U,L,$):D(U,[L],$,ue,Ee);throw new TypeError("val must be string, number or Buffer")}function D(U,L,$,ue,Ee){var ze=1,_e=U.length,le=L.length;if(ue!==void 0&&(ue=String(ue).toLowerCase(),ue==="ucs2"||ue==="ucs-2"||ue==="utf16le"||ue==="utf-16le")){if(U.length<2||L.length<2)return-1;ze=2,_e/=2,le/=2,$/=2}function Re($e,rt){return ze===1?$e[rt]:$e.readUInt16BE(rt*ze)}var Me;if(Ee){var He=-1;for(Me=$;Me<_e;Me++)if(Re(U,Me)===Re(L,He===-1?0:Me-He)){if(He===-1&&(He=Me),Me-He+1===le)return He*ze}else He!==-1&&(Me-=Me-He),He=-1}else for($+le>_e&&($=_e-le),Me=$;Me>=0;Me--){for(var Be=!0,Je=0;Je<le;Je++)if(Re(U,Me+Je)!==Re(L,Je)){Be=!1;break}if(Be)return Me}return-1}c.prototype.includes=function(L,$,ue){return this.indexOf(L,$,ue)!==-1},c.prototype.indexOf=function(L,$,ue){return k(this,L,$,ue,!0)},c.prototype.lastIndexOf=function(L,$,ue){return k(this,L,$,ue,!1)};function F(U,L,$,ue){$=Number($)||0;var Ee=U.length-$;ue?(ue=Number(ue),ue>Ee&&(ue=Ee)):ue=Ee;var ze=L.length;ue>ze/2&&(ue=ze/2);for(var _e=0;_e<ue;++_e){var le=parseInt(L.substr(_e*2,2),16);if(te(le))return _e;U[$+_e]=le}return _e}function J(U,L,$,ue){return W(Y(L,U.length-$),U,$,ue)}function H(U,L,$,ue){return W(ye(L),U,$,ue)}function N(U,L,$,ue){return H(U,L,$,ue)}function _(U,L,$,ue){return W(G(L),U,$,ue)}function X(U,L,$,ue){return W(V(L,U.length-$),U,$,ue)}c.prototype.write=function(L,$,ue,Ee){if($===void 0)Ee="utf8",ue=this.length,$=0;else if(ue===void 0&&typeof $=="string")Ee=$,ue=this.length,$=0;else if(isFinite($))$=$>>>0,isFinite(ue)?(ue=ue>>>0,Ee===void 0&&(Ee="utf8")):(Ee=ue,ue=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var ze=this.length-$;if((ue===void 0||ue>ze)&&(ue=ze),L.length>0&&(ue<0||$<0)||$>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ee||(Ee="utf8");for(var _e=!1;;)switch(Ee){case"hex":return F(this,L,$,ue);case"utf8":case"utf-8":return J(this,L,$,ue);case"ascii":return H(this,L,$,ue);case"latin1":case"binary":return N(this,L,$,ue);case"base64":return _(this,L,$,ue);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,L,$,ue);default:if(_e)throw new TypeError("Unknown encoding: "+Ee);Ee=(""+Ee).toLowerCase(),_e=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ee(U,L,$){return L===0&&$===U.length?f.fromByteArray(U):f.fromByteArray(U.slice(L,$))}function ie(U,L,$){$=Math.min(U.length,$);for(var ue=[],Ee=L;Ee<$;){var ze=U[Ee],_e=null,le=ze>239?4:ze>223?3:ze>191?2:1;if(Ee+le<=$){var Re,Me,He,Be;switch(le){case 1:ze<128&&(_e=ze);break;case 2:Re=U[Ee+1],(Re&192)===128&&(Be=(ze&31)<<6|Re&63,Be>127&&(_e=Be));break;case 3:Re=U[Ee+1],Me=U[Ee+2],(Re&192)===128&&(Me&192)===128&&(Be=(ze&15)<<12|(Re&63)<<6|Me&63,Be>2047&&(Be<55296||Be>57343)&&(_e=Be));break;case 4:Re=U[Ee+1],Me=U[Ee+2],He=U[Ee+3],(Re&192)===128&&(Me&192)===128&&(He&192)===128&&(Be=(ze&15)<<18|(Re&63)<<12|(Me&63)<<6|He&63,Be>65535&&Be<1114112&&(_e=Be))}}_e===null?(_e=65533,le=1):_e>65535&&(_e-=65536,ue.push(_e>>>10&1023|55296),_e=56320|_e&1023),ue.push(_e),Ee+=le}return ne(ue)}var he=4096;function ne(U){var L=U.length;if(L<=he)return String.fromCharCode.apply(String,U);for(var $="",ue=0;ue<L;)$+=String.fromCharCode.apply(String,U.slice(ue,ue+=he));return $}function Ie(U,L,$){var ue="";$=Math.min(U.length,$);for(var Ee=L;Ee<$;++Ee)ue+=String.fromCharCode(U[Ee]&127);return ue}function q(U,L,$){var ue="";$=Math.min(U.length,$);for(var Ee=L;Ee<$;++Ee)ue+=String.fromCharCode(U[Ee]);return ue}function pe(U,L,$){var ue=U.length;(!L||L<0)&&(L=0),(!$||$<0||$>ue)&&($=ue);for(var Ee="",ze=L;ze<$;++ze)Ee+=de(U[ze]);return Ee}function ve(U,L,$){for(var ue=U.slice(L,$),Ee="",ze=0;ze<ue.length;ze+=2)Ee+=String.fromCharCode(ue[ze]+ue[ze+1]*256);return Ee}c.prototype.slice=function(L,$){var ue=this.length;L=~~L,$=$===void 0?ue:~~$,L<0?(L+=ue,L<0&&(L=0)):L>ue&&(L=ue),$<0?($+=ue,$<0&&($=0)):$>ue&&($=ue),$<L&&($=L);var Ee=this.subarray(L,$);return Ee.__proto__=c.prototype,Ee};function xe(U,L,$){if(U%1!==0||U<0)throw new RangeError("offset is not uint");if(U+L>$)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUIntLE=function(L,$,ue){L=L>>>0,$=$>>>0,ue||xe(L,$,this.length);for(var Ee=this[L],ze=1,_e=0;++_e<$&&(ze*=256);)Ee+=this[L+_e]*ze;return Ee},c.prototype.readUIntBE=function(L,$,ue){L=L>>>0,$=$>>>0,ue||xe(L,$,this.length);for(var Ee=this[L+--$],ze=1;$>0&&(ze*=256);)Ee+=this[L+--$]*ze;return Ee},c.prototype.readUInt8=function(L,$){return L=L>>>0,$||xe(L,1,this.length),this[L]},c.prototype.readUInt16LE=function(L,$){return L=L>>>0,$||xe(L,2,this.length),this[L]|this[L+1]<<8},c.prototype.readUInt16BE=function(L,$){return L=L>>>0,$||xe(L,2,this.length),this[L]<<8|this[L+1]},c.prototype.readUInt32LE=function(L,$){return L=L>>>0,$||xe(L,4,this.length),(this[L]|this[L+1]<<8|this[L+2]<<16)+this[L+3]*16777216},c.prototype.readUInt32BE=function(L,$){return L=L>>>0,$||xe(L,4,this.length),this[L]*16777216+(this[L+1]<<16|this[L+2]<<8|this[L+3])},c.prototype.readIntLE=function(L,$,ue){L=L>>>0,$=$>>>0,ue||xe(L,$,this.length);for(var Ee=this[L],ze=1,_e=0;++_e<$&&(ze*=256);)Ee+=this[L+_e]*ze;return ze*=128,Ee>=ze&&(Ee-=Math.pow(2,8*$)),Ee},c.prototype.readIntBE=function(L,$,ue){L=L>>>0,$=$>>>0,ue||xe(L,$,this.length);for(var Ee=$,ze=1,_e=this[L+--Ee];Ee>0&&(ze*=256);)_e+=this[L+--Ee]*ze;return ze*=128,_e>=ze&&(_e-=Math.pow(2,8*$)),_e},c.prototype.readInt8=function(L,$){return L=L>>>0,$||xe(L,1,this.length),this[L]&128?(255-this[L]+1)*-1:this[L]},c.prototype.readInt16LE=function(L,$){L=L>>>0,$||xe(L,2,this.length);var ue=this[L]|this[L+1]<<8;return ue&32768?ue|4294901760:ue},c.prototype.readInt16BE=function(L,$){L=L>>>0,$||xe(L,2,this.length);var ue=this[L+1]|this[L]<<8;return ue&32768?ue|4294901760:ue},c.prototype.readInt32LE=function(L,$){return L=L>>>0,$||xe(L,4,this.length),this[L]|this[L+1]<<8|this[L+2]<<16|this[L+3]<<24},c.prototype.readInt32BE=function(L,$){return L=L>>>0,$||xe(L,4,this.length),this[L]<<24|this[L+1]<<16|this[L+2]<<8|this[L+3]},c.prototype.readFloatLE=function(L,$){return L=L>>>0,$||xe(L,4,this.length),h.read(this,L,!0,23,4)},c.prototype.readFloatBE=function(L,$){return L=L>>>0,$||xe(L,4,this.length),h.read(this,L,!1,23,4)},c.prototype.readDoubleLE=function(L,$){return L=L>>>0,$||xe(L,8,this.length),h.read(this,L,!0,52,8)},c.prototype.readDoubleBE=function(L,$){return L=L>>>0,$||xe(L,8,this.length),h.read(this,L,!1,52,8)};function ce(U,L,$,ue,Ee,ze){if(!c.isBuffer(U))throw new TypeError('"buffer" argument must be a Buffer instance');if(L>Ee||L<ze)throw new RangeError('"value" argument is out of bounds');if($+ue>U.length)throw new RangeError("Index out of range")}c.prototype.writeUIntLE=function(L,$,ue,Ee){if(L=+L,$=$>>>0,ue=ue>>>0,!Ee){var ze=Math.pow(2,8*ue)-1;ce(this,L,$,ue,ze,0)}var _e=1,le=0;for(this[$]=L&255;++le<ue&&(_e*=256);)this[$+le]=L/_e&255;return $+ue},c.prototype.writeUIntBE=function(L,$,ue,Ee){if(L=+L,$=$>>>0,ue=ue>>>0,!Ee){var ze=Math.pow(2,8*ue)-1;ce(this,L,$,ue,ze,0)}var _e=ue-1,le=1;for(this[$+_e]=L&255;--_e>=0&&(le*=256);)this[$+_e]=L/le&255;return $+ue},c.prototype.writeUInt8=function(L,$,ue){return L=+L,$=$>>>0,ue||ce(this,L,$,1,255,0),this[$]=L&255,$+1},c.prototype.writeUInt16LE=function(L,$,ue){return L=+L,$=$>>>0,ue||ce(this,L,$,2,65535,0),this[$]=L&255,this[$+1]=L>>>8,$+2},c.prototype.writeUInt16BE=function(L,$,ue){return L=+L,$=$>>>0,ue||ce(this,L,$,2,65535,0),this[$]=L>>>8,this[$+1]=L&255,$+2},c.prototype.writeUInt32LE=function(L,$,ue){return L=+L,$=$>>>0,ue||ce(this,L,$,4,4294967295,0),this[$+3]=L>>>24,this[$+2]=L>>>16,this[$+1]=L>>>8,this[$]=L&255,$+4},c.prototype.writeUInt32BE=function(L,$,ue){return L=+L,$=$>>>0,ue||ce(this,L,$,4,4294967295,0),this[$]=L>>>24,this[$+1]=L>>>16,this[$+2]=L>>>8,this[$+3]=L&255,$+4},c.prototype.writeIntLE=function(L,$,ue,Ee){if(L=+L,$=$>>>0,!Ee){var ze=Math.pow(2,8*ue-1);ce(this,L,$,ue,ze-1,-ze)}var _e=0,le=1,Re=0;for(this[$]=L&255;++_e<ue&&(le*=256);)L<0&&Re===0&&this[$+_e-1]!==0&&(Re=1),this[$+_e]=(L/le>>0)-Re&255;return $+ue},c.prototype.writeIntBE=function(L,$,ue,Ee){if(L=+L,$=$>>>0,!Ee){var ze=Math.pow(2,8*ue-1);ce(this,L,$,ue,ze-1,-ze)}var _e=ue-1,le=1,Re=0;for(this[$+_e]=L&255;--_e>=0&&(le*=256);)L<0&&Re===0&&this[$+_e+1]!==0&&(Re=1),this[$+_e]=(L/le>>0)-Re&255;return $+ue},c.prototype.writeInt8=function(L,$,ue){return L=+L,$=$>>>0,ue||ce(this,L,$,1,127,-128),L<0&&(L=255+L+1),this[$]=L&255,$+1},c.prototype.writeInt16LE=function(L,$,ue){return L=+L,$=$>>>0,ue||ce(this,L,$,2,32767,-32768),this[$]=L&255,this[$+1]=L>>>8,$+2},c.prototype.writeInt16BE=function(L,$,ue){return L=+L,$=$>>>0,ue||ce(this,L,$,2,32767,-32768),this[$]=L>>>8,this[$+1]=L&255,$+2},c.prototype.writeInt32LE=function(L,$,ue){return L=+L,$=$>>>0,ue||ce(this,L,$,4,2147483647,-2147483648),this[$]=L&255,this[$+1]=L>>>8,this[$+2]=L>>>16,this[$+3]=L>>>24,$+4},c.prototype.writeInt32BE=function(L,$,ue){return L=+L,$=$>>>0,ue||ce(this,L,$,4,2147483647,-2147483648),L<0&&(L=4294967295+L+1),this[$]=L>>>24,this[$+1]=L>>>16,this[$+2]=L>>>8,this[$+3]=L&255,$+4};function fe(U,L,$,ue,Ee,ze){if($+ue>U.length)throw new RangeError("Index out of range");if($<0)throw new RangeError("Index out of range")}function ge(U,L,$,ue,Ee){return L=+L,$=$>>>0,Ee||fe(U,L,$,4,34028234663852886e22,-34028234663852886e22),h.write(U,L,$,ue,23,4),$+4}c.prototype.writeFloatLE=function(L,$,ue){return ge(this,L,$,!0,ue)},c.prototype.writeFloatBE=function(L,$,ue){return ge(this,L,$,!1,ue)};function Se(U,L,$,ue,Ee){return L=+L,$=$>>>0,Ee||fe(U,L,$,8,17976931348623157e292,-17976931348623157e292),h.write(U,L,$,ue,52,8),$+8}c.prototype.writeDoubleLE=function(L,$,ue){return Se(this,L,$,!0,ue)},c.prototype.writeDoubleBE=function(L,$,ue){return Se(this,L,$,!1,ue)},c.prototype.copy=function(L,$,ue,Ee){if(!c.isBuffer(L))throw new TypeError("argument should be a Buffer");if(ue||(ue=0),!Ee&&Ee!==0&&(Ee=this.length),$>=L.length&&($=L.length),$||($=0),Ee>0&&Ee<ue&&(Ee=ue),Ee===ue||L.length===0||this.length===0)return 0;if($<0)throw new RangeError("targetStart out of bounds");if(ue<0||ue>=this.length)throw new RangeError("Index out of range");if(Ee<0)throw new RangeError("sourceEnd out of bounds");Ee>this.length&&(Ee=this.length),L.length-$<Ee-ue&&(Ee=L.length-$+ue);var ze=Ee-ue;if(this===L&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin($,ue,Ee);else if(this===L&&ue<$&&$<Ee)for(var _e=ze-1;_e>=0;--_e)L[_e+$]=this[_e+ue];else Uint8Array.prototype.set.call(L,this.subarray(ue,Ee),$);return ze},c.prototype.fill=function(L,$,ue,Ee){if(typeof L=="string"){if(typeof $=="string"?(Ee=$,$=0,ue=this.length):typeof ue=="string"&&(Ee=ue,ue=this.length),Ee!==void 0&&typeof Ee!="string")throw new TypeError("encoding must be a string");if(typeof Ee=="string"&&!c.isEncoding(Ee))throw new TypeError("Unknown encoding: "+Ee);if(L.length===1){var ze=L.charCodeAt(0);(Ee==="utf8"&&ze<128||Ee==="latin1")&&(L=ze)}}else typeof L=="number"&&(L=L&255);if($<0||this.length<$||this.length<ue)throw new RangeError("Out of range index");if(ue<=$)return this;$=$>>>0,ue=ue===void 0?this.length:ue>>>0,L||(L=0);var _e;if(typeof L=="number")for(_e=$;_e<ue;++_e)this[_e]=L;else{var le=c.isBuffer(L)?L:c.from(L,Ee),Re=le.length;if(Re===0)throw new TypeError('The value "'+L+'" is invalid for argument "value"');for(_e=0;_e<ue-$;++_e)this[_e+$]=le[_e%Re]}return this};var De=/[^+/0-9A-Za-z-_]/g;function ke(U){if(U=U.split("=")[0],U=U.trim().replace(De,""),U.length<2)return"";for(;U.length%4!==0;)U=U+"=";return U}function de(U){return U<16?"0"+U.toString(16):U.toString(16)}function Y(U,L){L=L||1/0;for(var $,ue=U.length,Ee=null,ze=[],_e=0;_e<ue;++_e){if($=U.charCodeAt(_e),$>55295&&$<57344){if(!Ee){if($>56319){(L-=3)>-1&&ze.push(239,191,189);continue}else if(_e+1===ue){(L-=3)>-1&&ze.push(239,191,189);continue}Ee=$;continue}if($<56320){(L-=3)>-1&&ze.push(239,191,189),Ee=$;continue}$=(Ee-55296<<10|$-56320)+65536}else Ee&&(L-=3)>-1&&ze.push(239,191,189);if(Ee=null,$<128){if((L-=1)<0)break;ze.push($)}else if($<2048){if((L-=2)<0)break;ze.push($>>6|192,$&63|128)}else if($<65536){if((L-=3)<0)break;ze.push($>>12|224,$>>6&63|128,$&63|128)}else if($<1114112){if((L-=4)<0)break;ze.push($>>18|240,$>>12&63|128,$>>6&63|128,$&63|128)}else throw new Error("Invalid code point")}return ze}function ye(U){for(var L=[],$=0;$<U.length;++$)L.push(U.charCodeAt($)&255);return L}function V(U,L){for(var $,ue,Ee,ze=[],_e=0;_e<U.length&&!((L-=2)<0);++_e)$=U.charCodeAt(_e),ue=$>>8,Ee=$%256,ze.push(Ee),ze.push(ue);return ze}function G(U){return f.toByteArray(ke(U))}function W(U,L,$,ue){for(var Ee=0;Ee<ue&&!(Ee+$>=L.length||Ee>=U.length);++Ee)L[Ee+$]=U[Ee];return Ee}function K(U,L){return U instanceof L||U!=null&&U.constructor!=null&&U.constructor.name!=null&&U.constructor.name===L.name}function te(U){return U!==U}}).call(this)}).call(this,o("buffer").Buffer)},{"base64-js":87,buffer:90,ieee754:357}],91:[function(o,M,R){M.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],92:[function(o,M,R){"use strict";var p=o("get-intrinsic"),f=o("./"),h=f(p("String.prototype.indexOf"));M.exports=function(g,w){var c=p(g,!!w);return typeof c=="function"&&h(g,".prototype.")>-1?f(c):c}},{"./":93,"get-intrinsic":348}],93:[function(o,M,R){"use strict";var p=o("function-bind"),f=o("get-intrinsic"),h=f("%Function.prototype.apply%"),y=f("%Function.prototype.call%"),g=f("%Reflect.apply%",!0)||p.call(y,h),w=f("%Object.getOwnPropertyDescriptor%",!0),c=f("%Object.defineProperty%",!0),m=f("%Math.max%");if(c)try{c({},"a",{value:1})}catch(b){c=null}M.exports=function(x){var T=g(p,y,arguments);if(w&&c){var S=w(T,"length");S.configurable&&c(T,"length",{value:1+m(0,x.length-(arguments.length-1))})}return T};var v=function(){return g(p,h,arguments)};c?c(M.exports,"apply",{value:v}):M.exports.apply=v},{"function-bind":347,"get-intrinsic":348}],94:[function(o,M,R){"use strict";var p=Array.prototype.slice;M.exports=f;function f(y,g){if(!(this instanceof f))return new f(y,g);this.src=y,this._withAccess=g}f.prototype.withAccess=function(y){return this._withAccess=y!==!1,this},f.prototype.pick=function(y){return Array.isArray(y)||(y=p.call(arguments)),y.length&&(this.keys=y),this},f.prototype.to=function(y){if(y=y||{},!this.src)return y;var g=this.keys||Object.keys(this.src);if(!this._withAccess){for(var w=0;w<g.length;w++)c=g[w],y[c]===void 0&&(y[c]=this.src[c]);return y}for(var w=0;w<g.length;w++){var c=g[w];if(h(y,c)){var m=this.src.__lookupGetter__(c),v=this.src.__lookupSetter__(c);m&&y.__defineGetter__(c,m),v&&y.__defineSetter__(c,v),!m&&!v&&(y[c]=this.src[c])}}return y},f.prototype.toCover=function(y){for(var g=this.keys||Object.keys(this.src),w=0;w<g.length;w++){var c=g[w];delete y[c];var m=this.src.__lookupGetter__(c),v=this.src.__lookupSetter__(c);m&&y.__defineGetter__(c,m),v&&y.__defineSetter__(c,v),!m&&!v&&(y[c]=this.src[c])}},f.prototype.override=f.prototype.toCover,f.prototype.and=function(y){var g={};return this.to(g),this.src=y,this.to(g),this.src=g,this};function h(y,g){return y[g]===void 0&&y.__lookupGetter__(g)===void 0&&y.__lookupSetter__(g)===void 0}},{}],95:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/is-callable"),h=o("../internals/try-to-string"),y=p.TypeError;M.exports=function(g){if(f(g))return g;throw y(h(g)+" is not a function")}},{"../internals/global":163,"../internals/is-callable":176,"../internals/try-to-string":257}],96:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/is-constructor"),h=o("../internals/try-to-string"),y=p.TypeError;M.exports=function(g){if(f(g))return g;throw y(h(g)+" is not a constructor")}},{"../internals/global":163,"../internals/is-constructor":177,"../internals/try-to-string":257}],97:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/is-callable"),h=p.String,y=p.TypeError;M.exports=function(g){if(typeof g=="object"||f(g))return g;throw y("Can't set "+h(g)+" as a prototype")}},{"../internals/global":163,"../internals/is-callable":176}],98:[function(o,M,R){var p=o("../internals/well-known-symbol"),f=o("../internals/object-create"),h=o("../internals/object-define-property"),y=p("unscopables"),g=Array.prototype;g[y]==null&&h.f(g,y,{configurable:!0,value:f(null)}),M.exports=function(w){g[y][w]=!0}},{"../internals/object-create":196,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],99:[function(o,M,R){"use strict";var p=o("../internals/string-multibyte").charAt;M.exports=function(f,h,y){return h+(y?p(f,h).length:1)}},{"../internals/string-multibyte":239}],100:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/object-is-prototype-of"),h=p.TypeError;M.exports=function(y,g){if(f(g,y))return y;throw h("Incorrect invocation")}},{"../internals/global":163,"../internals/object-is-prototype-of":204}],101:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/is-object"),h=p.String,y=p.TypeError;M.exports=function(g){if(f(g))return g;throw y(h(g)+" is not an object")}},{"../internals/global":163,"../internals/is-object":180}],102:[function(o,M,R){M.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"},{}],103:[function(o,M,R){"use strict";var p=o("../internals/array-buffer-native"),f=o("../internals/descriptors"),h=o("../internals/global"),y=o("../internals/is-callable"),g=o("../internals/is-object"),w=o("../internals/has-own-property"),c=o("../internals/classof"),m=o("../internals/try-to-string"),v=o("../internals/create-non-enumerable-property"),b=o("../internals/redefine"),x=o("../internals/object-define-property").f,T=o("../internals/object-is-prototype-of"),S=o("../internals/object-get-prototype-of"),C=o("../internals/object-set-prototype-of"),E=o("../internals/well-known-symbol"),j=o("../internals/uid"),Z=h.Int8Array,P=Z&&Z.prototype,Q=h.Uint8ClampedArray,B=Q&&Q.prototype,k=Z&&S(Z),D=P&&S(P),F=Object.prototype,J=h.TypeError,H=E("toStringTag"),N=j("TYPED_ARRAY_TAG"),_=j("TYPED_ARRAY_CONSTRUCTOR"),X=p&&!!C&&c(h.opera)!=="Opera",ee=!1,ie,he,ne,Ie={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},q={BigInt64Array:8,BigUint64Array:8},pe=function(De){if(!g(De))return!1;var ke=c(De);return ke==="DataView"||w(Ie,ke)||w(q,ke)},ve=function(Se){if(!g(Se))return!1;var De=c(Se);return w(Ie,De)||w(q,De)},xe=function(Se){if(ve(Se))return Se;throw J("Target is not a typed array")},ce=function(Se){if(y(Se)&&(!C||T(k,Se)))return Se;throw J(m(Se)+" is not a typed array constructor")},fe=function(Se,De,ke,de){if(f){if(ke)for(var Y in Ie){var ye=h[Y];if(ye&&w(ye.prototype,Se))try{delete ye.prototype[Se]}catch(V){try{ye.prototype[Se]=De}catch(G){}}}(!D[Se]||ke)&&b(D,Se,ke?De:X&&P[Se]||De,de)}},ge=function(Se,De,ke){var de,Y;if(f){if(C){if(ke){for(de in Ie)if(Y=h[de],Y&&w(Y,Se))try{delete Y[Se]}catch(ye){}}if(!k[Se]||ke)try{return b(k,Se,ke?De:X&&k[Se]||De)}catch(ye){}else return}for(de in Ie)Y=h[de],Y&&(!Y[Se]||ke)&&b(Y,Se,De)}};for(ie in Ie)he=h[ie],ne=he&&he.prototype,ne?v(ne,_,he):X=!1;for(ie in q)he=h[ie],ne=he&&he.prototype,ne&&v(ne,_,he);if((!X||!y(k)||k===Function.prototype)&&(k=function(){throw J("Incorrect invocation")},X))for(ie in Ie)h[ie]&&C(h[ie],k);if((!X||!D||D===F)&&(D=k.prototype,X))for(ie in Ie)h[ie]&&C(h[ie].prototype,D);if(X&&S(B)!==D&&C(B,D),f&&!w(D,H)){ee=!0,x(D,H,{get:function(){return g(this)?this[N]:void 0}});for(ie in Ie)h[ie]&&v(h[ie],N,ie)}M.exports={NATIVE_ARRAY_BUFFER_VIEWS:X,TYPED_ARRAY_CONSTRUCTOR:_,TYPED_ARRAY_TAG:ee&&N,aTypedArray:xe,aTypedArrayConstructor:ce,exportTypedArrayMethod:fe,exportTypedArrayStaticMethod:ge,isView:pe,isTypedArray:ve,TypedArray:k,TypedArrayPrototype:D}},{"../internals/array-buffer-native":102,"../internals/classof":124,"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/global":163,"../internals/has-own-property":164,"../internals/is-callable":176,"../internals/is-object":180,"../internals/object-define-property":198,"../internals/object-get-prototype-of":203,"../internals/object-is-prototype-of":204,"../internals/object-set-prototype-of":208,"../internals/redefine":222,"../internals/try-to-string":257,"../internals/uid":263,"../internals/well-known-symbol":268}],104:[function(o,M,R){"use strict";var p=o("../internals/global"),f=o("../internals/function-uncurry-this"),h=o("../internals/descriptors"),y=o("../internals/array-buffer-native"),g=o("../internals/function-name"),w=o("../internals/create-non-enumerable-property"),c=o("../internals/redefine-all"),m=o("../internals/fails"),v=o("../internals/an-instance"),b=o("../internals/to-integer-or-infinity"),x=o("../internals/to-length"),T=o("../internals/to-index"),S=o("../internals/ieee754"),C=o("../internals/object-get-prototype-of"),E=o("../internals/object-set-prototype-of"),j=o("../internals/object-get-own-property-names").f,Z=o("../internals/object-define-property").f,P=o("../internals/array-fill"),Q=o("../internals/array-slice-simple"),B=o("../internals/set-to-string-tag"),k=o("../internals/internal-state"),D=g.PROPER,F=g.CONFIGURABLE,J=k.get,H=k.set,N="ArrayBuffer",_="DataView",X="prototype",ee="Wrong length",ie="Wrong index",he=p[N],ne=he,Ie=ne&&ne[X],q=p[_],pe=q&&q[X],ve=Object.prototype,xe=p.Array,ce=p.RangeError,fe=f(P),ge=f([].reverse),Se=S.pack,De=S.unpack,ke=function(_e){return[_e&255]},de=function(_e){return[_e&255,_e>>8&255]},Y=function(_e){return[_e&255,_e>>8&255,_e>>16&255,_e>>24&255]},ye=function(_e){return _e[3]<<24|_e[2]<<16|_e[1]<<8|_e[0]},V=function(_e){return Se(_e,23,4)},G=function(_e){return Se(_e,52,8)},W=function(_e,le){Z(_e[X],le,{get:function(){return J(this)[le]}})},K=function(_e,le,Re,Me){var He=T(Re),Be=J(_e);if(He+le>Be.byteLength)throw ce(ie);var Je=J(Be.buffer).bytes,$e=He+Be.byteOffset,rt=Q(Je,$e,$e+le);return Me?rt:ge(rt)},te=function(_e,le,Re,Me,He,Be){var Je=T(Re),$e=J(_e);if(Je+le>$e.byteLength)throw ce(ie);for(var rt=J($e.buffer).bytes,qe=Je+$e.byteOffset,pt=Me(+He),Pe=0;Pe<le;Pe++)rt[qe+Pe]=pt[Be?Pe:le-Pe-1]};if(!y)ne=function(le){v(this,Ie);var Re=T(le);H(this,{bytes:fe(xe(Re),0),byteLength:Re}),h||(this.byteLength=Re)},Ie=ne[X],q=function(le,Re,Me){v(this,pe),v(le,Ie);var He=J(le).byteLength,Be=b(Re);if(Be<0||Be>He)throw ce("Wrong offset");if(Me=Me===void 0?He-Be:x(Me),Be+Me>He)throw ce(ee);H(this,{buffer:le,byteLength:Me,byteOffset:Be}),h||(this.buffer=le,this.byteLength=Me,this.byteOffset=Be)},pe=q[X],h&&(W(ne,"byteLength"),W(q,"buffer"),W(q,"byteLength"),W(q,"byteOffset")),c(pe,{getInt8:function(le){return K(this,1,le)[0]<<24>>24},getUint8:function(le){return K(this,1,le)[0]},getInt16:function(le){var Re=K(this,2,le,arguments.length>1?arguments[1]:void 0);return(Re[1]<<8|Re[0])<<16>>16},getUint16:function(le){var Re=K(this,2,le,arguments.length>1?arguments[1]:void 0);return Re[1]<<8|Re[0]},getInt32:function(le){return ye(K(this,4,le,arguments.length>1?arguments[1]:void 0))},getUint32:function(le){return ye(K(this,4,le,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(le){return De(K(this,4,le,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(le){return De(K(this,8,le,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(le,Re){te(this,1,le,ke,Re)},setUint8:function(le,Re){te(this,1,le,ke,Re)},setInt16:function(le,Re){te(this,2,le,de,Re,arguments.length>2?arguments[2]:void 0)},setUint16:function(le,Re){te(this,2,le,de,Re,arguments.length>2?arguments[2]:void 0)},setInt32:function(le,Re){te(this,4,le,Y,Re,arguments.length>2?arguments[2]:void 0)},setUint32:function(le,Re){te(this,4,le,Y,Re,arguments.length>2?arguments[2]:void 0)},setFloat32:function(le,Re){te(this,4,le,V,Re,arguments.length>2?arguments[2]:void 0)},setFloat64:function(le,Re){te(this,8,le,G,Re,arguments.length>2?arguments[2]:void 0)}});else{var U=D&&he.name!==N;if(!m(function(){he(1)})||!m(function(){new he(-1)})||m(function(){return new he,new he(1.5),new he(NaN),U&&!F})){ne=function(le){return v(this,Ie),new he(T(le))},ne[X]=Ie;for(var L=j(he),$=0,ue;L.length>$;)(ue=L[$++])in ne||w(ne,ue,he[ue]);Ie.constructor=ne}else U&&F&&w(he,"name",N);E&&C(pe)!==ve&&E(pe,ve);var Ee=new q(new ne(2)),ze=f(pe.setInt8);Ee.setInt8(0,2147483648),Ee.setInt8(1,2147483649),(Ee.getInt8(0)||!Ee.getInt8(1))&&c(pe,{setInt8:function(le,Re){ze(this,le,Re<<24>>24)},setUint8:function(le,Re){ze(this,le,Re<<24>>24)}},{unsafe:!0})}B(ne,N),B(q,_),M.exports={ArrayBuffer:ne,DataView:q}},{"../internals/an-instance":100,"../internals/array-buffer-native":102,"../internals/array-fill":106,"../internals/array-slice-simple":116,"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/fails":150,"../internals/function-name":156,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/ieee754":169,"../internals/internal-state":173,"../internals/object-define-property":198,"../internals/object-get-own-property-names":201,"../internals/object-get-prototype-of":203,"../internals/object-set-prototype-of":208,"../internals/redefine-all":221,"../internals/set-to-string-tag":234,"../internals/to-index":246,"../internals/to-integer-or-infinity":248,"../internals/to-length":249}],105:[function(o,M,R){"use strict";var p=o("../internals/to-object"),f=o("../internals/to-absolute-index"),h=o("../internals/length-of-array-like"),y=Math.min;M.exports=[].copyWithin||function(w,c){var m=p(this),v=h(m),b=f(w,v),x=f(c,v),T=arguments.length>2?arguments[2]:void 0,S=y((T===void 0?v:f(T,v))-x,v-b),C=1;for(x<b&&b<x+S&&(C=-1,x+=S-1,b+=S-1);S-- >0;)x in m?m[b]=m[x]:delete m[b],b+=C,x+=C;return m}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],106:[function(o,M,R){"use strict";var p=o("../internals/to-object"),f=o("../internals/to-absolute-index"),h=o("../internals/length-of-array-like");M.exports=function(g){for(var w=p(this),c=h(w),m=arguments.length,v=f(m>1?arguments[1]:void 0,c),b=m>2?arguments[2]:void 0,x=b===void 0?c:f(b,c);x>v;)w[v++]=g;return w}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],107:[function(o,M,R){"use strict";var p=o("../internals/array-iteration").forEach,f=o("../internals/array-method-is-strict"),h=f("forEach");M.exports=h?[].forEach:function(g){return p(this,g,arguments.length>1?arguments[1]:void 0)}},{"../internals/array-iteration":111,"../internals/array-method-is-strict":114}],108:[function(o,M,R){var p=o("../internals/length-of-array-like");M.exports=function(f,h){for(var y=0,g=p(h),w=new f(g);g>y;)w[y]=h[y++];return w}},{"../internals/length-of-array-like":188}],109:[function(o,M,R){"use strict";var p=o("../internals/global"),f=o("../internals/function-bind-context"),h=o("../internals/function-call"),y=o("../internals/to-object"),g=o("../internals/call-with-safe-iteration-closing"),w=o("../internals/is-array-iterator-method"),c=o("../internals/is-constructor"),m=o("../internals/length-of-array-like"),v=o("../internals/create-property"),b=o("../internals/get-iterator"),x=o("../internals/get-iterator-method"),T=p.Array;M.exports=function(C){var E=y(C),j=c(this),Z=arguments.length,P=Z>1?arguments[1]:void 0,Q=P!==void 0;Q&&(P=f(P,Z>2?arguments[2]:void 0));var B=x(E),k=0,D,F,J,H,N,_;if(B&&!(this==T&&w(B)))for(H=b(E,B),N=H.next,F=j?new this:[];!(J=h(N,H)).done;k++)_=Q?g(H,P,[J.value,k],!0):J.value,v(F,k,_);else for(D=m(E),F=j?new this(D):T(D);D>k;k++)_=Q?P(E[k],k):E[k],v(F,k,_);return F.length=k,F}},{"../internals/call-with-safe-iteration-closing":121,"../internals/create-property":131,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/is-array-iterator-method":174,"../internals/is-constructor":177,"../internals/length-of-array-like":188,"../internals/to-object":250}],110:[function(o,M,R){var p=o("../internals/to-indexed-object"),f=o("../internals/to-absolute-index"),h=o("../internals/length-of-array-like"),y=function(g){return function(w,c,m){var v=p(w),b=h(v),x=f(m,b),T;if(g&&c!=c){for(;b>x;)if(T=v[x++],T!=T)return!0}else for(;b>x;x++)if((g||x in v)&&v[x]===c)return g||x||0;return!g&&-1}};M.exports={includes:y(!0),indexOf:y(!1)}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-indexed-object":247}],111:[function(o,M,R){var p=o("../internals/function-bind-context"),f=o("../internals/function-uncurry-this"),h=o("../internals/indexed-object"),y=o("../internals/to-object"),g=o("../internals/length-of-array-like"),w=o("../internals/array-species-create"),c=f([].push),m=function(v){var b=v==1,x=v==2,T=v==3,S=v==4,C=v==6,E=v==7,j=v==5||C;return function(Z,P,Q,B){for(var k=y(Z),D=h(k),F=p(P,Q),J=g(D),H=0,N=B||w,_=b?N(Z,J):x||E?N(Z,0):void 0,X,ee;J>H;H++)if((j||H in D)&&(X=D[H],ee=F(X,H,k),v))if(b)_[H]=ee;else if(ee)switch(v){case 3:return!0;case 5:return X;case 6:return H;case 2:c(_,X)}else switch(v){case 4:return!1;case 7:c(_,X)}return C?-1:T||S?S:_}};M.exports={forEach:m(0),map:m(1),filter:m(2),some:m(3),every:m(4),find:m(5),findIndex:m(6),filterReject:m(7)}},{"../internals/array-species-create":120,"../internals/function-bind-context":153,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/length-of-array-like":188,"../internals/to-object":250}],112:[function(o,M,R){"use strict";var p=o("../internals/function-apply"),f=o("../internals/to-indexed-object"),h=o("../internals/to-integer-or-infinity"),y=o("../internals/length-of-array-like"),g=o("../internals/array-method-is-strict"),w=Math.min,c=[].lastIndexOf,m=!!c&&1/[1].lastIndexOf(1,-0)<0,v=g("lastIndexOf"),b=m||!v;M.exports=b?function(T){if(m)return p(c,this,arguments)||0;var S=f(this),C=y(S),E=C-1;for(arguments.length>1&&(E=w(E,h(arguments[1]))),E<0&&(E=C+E);E>=0;E--)if(E in S&&S[E]===T)return E||0;return-1}:c},{"../internals/array-method-is-strict":114,"../internals/function-apply":152,"../internals/length-of-array-like":188,"../internals/to-indexed-object":247,"../internals/to-integer-or-infinity":248}],113:[function(o,M,R){var p=o("../internals/fails"),f=o("../internals/well-known-symbol"),h=o("../internals/engine-v8-version"),y=f("species");M.exports=function(g){return h>=51||!p(function(){var w=[],c=w.constructor={};return c[y]=function(){return{foo:1}},w[g](Boolean).foo!==1})}},{"../internals/engine-v8-version":146,"../internals/fails":150,"../internals/well-known-symbol":268}],114:[function(o,M,R){"use strict";var p=o("../internals/fails");M.exports=function(f,h){var y=[][f];return!!y&&p(function(){y.call(null,h||function(){return 1},1)})}},{"../internals/fails":150}],115:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/a-callable"),h=o("../internals/to-object"),y=o("../internals/indexed-object"),g=o("../internals/length-of-array-like"),w=p.TypeError,c=function(m){return function(v,b,x,T){f(b);var S=h(v),C=y(S),E=g(S),j=m?E-1:0,Z=m?-1:1;if(x<2)for(;;){if(j in C){T=C[j],j+=Z;break}if(j+=Z,m?j<0:E<=j)throw w("Reduce of empty array with no initial value")}for(;m?j>=0:E>j;j+=Z)j in C&&(T=b(T,C[j],j,S));return T}};M.exports={left:c(!1),right:c(!0)}},{"../internals/a-callable":95,"../internals/global":163,"../internals/indexed-object":170,"../internals/length-of-array-like":188,"../internals/to-object":250}],116:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/to-absolute-index"),h=o("../internals/length-of-array-like"),y=o("../internals/create-property"),g=p.Array,w=Math.max;M.exports=function(c,m,v){for(var b=h(c),x=f(m,b),T=f(v===void 0?b:v,b),S=g(w(T-x,0)),C=0;x<T;x++,C++)y(S,C,c[x]);return S.length=C,S}},{"../internals/create-property":131,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245}],117:[function(o,M,R){var p=o("../internals/function-uncurry-this");M.exports=p([].slice)},{"../internals/function-uncurry-this":157}],118:[function(o,M,R){var p=o("../internals/array-slice-simple"),f=Math.floor,h=function(w,c){var m=w.length,v=f(m/2);return m<8?y(w,c):g(w,h(p(w,0,v),c),h(p(w,v),c),c)},y=function(w,c){for(var m=w.length,v=1,b,x;v<m;){for(x=v,b=w[v];x&&c(w[x-1],b)>0;)w[x]=w[--x];x!==v++&&(w[x]=b)}return w},g=function(w,c,m,v){for(var b=c.length,x=m.length,T=0,S=0;T<b||S<x;)w[T+S]=T<b&&S<x?v(c[T],m[S])<=0?c[T++]:m[S++]:T<b?c[T++]:m[S++];return w};M.exports=h},{"../internals/array-slice-simple":116}],119:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/is-array"),h=o("../internals/is-constructor"),y=o("../internals/is-object"),g=o("../internals/well-known-symbol"),w=g("species"),c=p.Array;M.exports=function(m){var v;return f(m)&&(v=m.constructor,h(v)&&(v===c||f(v.prototype))?v=void 0:y(v)&&(v=v[w],v===null&&(v=void 0))),v===void 0?c:v}},{"../internals/global":163,"../internals/is-array":175,"../internals/is-constructor":177,"../internals/is-object":180,"../internals/well-known-symbol":268}],120:[function(o,M,R){var p=o("../internals/array-species-constructor");M.exports=function(f,h){return new(p(f))(h===0?0:h)}},{"../internals/array-species-constructor":119}],121:[function(o,M,R){var p=o("../internals/an-object"),f=o("../internals/iterator-close");M.exports=function(h,y,g,w){try{return w?y(p(g)[0],g[1]):y(g)}catch(c){f(h,"throw",c)}}},{"../internals/an-object":101,"../internals/iterator-close":185}],122:[function(o,M,R){var p=o("../internals/well-known-symbol"),f=p("iterator"),h=!1;try{var y=0,g={next:function(){return{done:!!y++}},return:function(){h=!0}};g[f]=function(){return this},Array.from(g,function(){throw 2})}catch(w){}M.exports=function(w,c){if(!c&&!h)return!1;var m=!1;try{var v={};v[f]=function(){return{next:function(){return{done:m=!0}}}},w(v)}catch(b){}return m}},{"../internals/well-known-symbol":268}],123:[function(o,M,R){var p=o("../internals/function-uncurry-this"),f=p({}.toString),h=p("".slice);M.exports=function(y){return h(f(y),8,-1)}},{"../internals/function-uncurry-this":157}],124:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/to-string-tag-support"),h=o("../internals/is-callable"),y=o("../internals/classof-raw"),g=o("../internals/well-known-symbol"),w=g("toStringTag"),c=p.Object,m=y(function(){return arguments}())=="Arguments",v=function(b,x){try{return b[x]}catch(T){}};M.exports=f?y:function(b){var x,T,S;return b===void 0?"Undefined":b===null?"Null":typeof(T=v(x=c(b),w))=="string"?T:m?y(x):(S=y(x))=="Object"&&h(x.callee)?"Arguments":S}},{"../internals/classof-raw":123,"../internals/global":163,"../internals/is-callable":176,"../internals/to-string-tag-support":255,"../internals/well-known-symbol":268}],125:[function(o,M,R){var p=o("../internals/has-own-property"),f=o("../internals/own-keys"),h=o("../internals/object-get-own-property-descriptor"),y=o("../internals/object-define-property");M.exports=function(g,w,c){for(var m=f(w),v=y.f,b=h.f,x=0;x<m.length;x++){var T=m[x];!p(g,T)&&!(c&&p(c,T))&&v(g,T,b(w,T))}}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/own-keys":212}],126:[function(o,M,R){var p=o("../internals/well-known-symbol"),f=p("match");M.exports=function(h){var y=/./;try{"/./"[h](y)}catch(g){try{return y[f]=!1,"/./"[h](y)}catch(w){}}return!1}},{"../internals/well-known-symbol":268}],127:[function(o,M,R){var p=o("../internals/fails");M.exports=!p(function(){function f(){}return f.prototype.constructor=null,Object.getPrototypeOf(new f)!==f.prototype})},{"../internals/fails":150}],128:[function(o,M,R){"use strict";var p=o("../internals/iterators-core").IteratorPrototype,f=o("../internals/object-create"),h=o("../internals/create-property-descriptor"),y=o("../internals/set-to-string-tag"),g=o("../internals/iterators"),w=function(){return this};M.exports=function(c,m,v,b){var x=m+" Iterator";return c.prototype=f(p,{next:h(+!b,v)}),y(c,x,!1,!0),g[x]=w,c}},{"../internals/create-property-descriptor":130,"../internals/iterators":187,"../internals/iterators-core":186,"../internals/object-create":196,"../internals/set-to-string-tag":234}],129:[function(o,M,R){var p=o("../internals/descriptors"),f=o("../internals/object-define-property"),h=o("../internals/create-property-descriptor");M.exports=p?function(y,g,w){return f.f(y,g,h(1,w))}:function(y,g,w){return y[g]=w,y}},{"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/object-define-property":198}],130:[function(o,M,R){M.exports=function(p,f){return{enumerable:!(p&1),configurable:!(p&2),writable:!(p&4),value:f}}},{}],131:[function(o,M,R){"use strict";var p=o("../internals/to-property-key"),f=o("../internals/object-define-property"),h=o("../internals/create-property-descriptor");M.exports=function(y,g,w){var c=p(g);c in y?f.f(y,c,h(0,w)):y[c]=w}},{"../internals/create-property-descriptor":130,"../internals/object-define-property":198,"../internals/to-property-key":254}],132:[function(o,M,R){"use strict";var p=o("../internals/export"),f=o("../internals/function-call"),h=o("../internals/is-pure"),y=o("../internals/function-name"),g=o("../internals/is-callable"),w=o("../internals/create-iterator-constructor"),c=o("../internals/object-get-prototype-of"),m=o("../internals/object-set-prototype-of"),v=o("../internals/set-to-string-tag"),b=o("../internals/create-non-enumerable-property"),x=o("../internals/redefine"),T=o("../internals/well-known-symbol"),S=o("../internals/iterators"),C=o("../internals/iterators-core"),E=y.PROPER,j=y.CONFIGURABLE,Z=C.IteratorPrototype,P=C.BUGGY_SAFARI_ITERATORS,Q=T("iterator"),B="keys",k="values",D="entries",F=function(){return this};M.exports=function(J,H,N,_,X,ee,ie){w(N,H,_);var he=function(Se){if(Se===X&&ve)return ve;if(!P&&Se in q)return q[Se];switch(Se){case B:return function(){return new N(this,Se)};case k:return function(){return new N(this,Se)};case D:return function(){return new N(this,Se)}}return function(){return new N(this)}},ne=H+" Iterator",Ie=!1,q=J.prototype,pe=q[Q]||q["@@iterator"]||X&&q[X],ve=!P&&pe||he(X),xe=H=="Array"&&q.entries||pe,ce,fe,ge;if(xe&&(ce=c(xe.call(new J)),ce!==Object.prototype&&ce.next&&(!h&&c(ce)!==Z&&(m?m(ce,Z):g(ce[Q])||x(ce,Q,F)),v(ce,ne,!0,!0),h&&(S[ne]=F))),E&&X==k&&pe&&pe.name!==k&&(!h&&j?b(q,"name",k):(Ie=!0,ve=function(){return f(pe,this)})),X)if(fe={values:he(k),keys:ee?ve:he(B),entries:he(D)},ie)for(ge in fe)(P||Ie||!(ge in q))&&x(q,ge,fe[ge]);else p({target:H,proto:!0,forced:P||Ie},fe);return(!h||ie)&&q[Q]!==ve&&x(q,Q,ve,{name:X}),S[H]=ve,fe}},{"../internals/create-iterator-constructor":128,"../internals/create-non-enumerable-property":129,"../internals/export":149,"../internals/function-call":155,"../internals/function-name":156,"../internals/is-callable":176,"../internals/is-pure":181,"../internals/iterators":187,"../internals/iterators-core":186,"../internals/object-get-prototype-of":203,"../internals/object-set-prototype-of":208,"../internals/redefine":222,"../internals/set-to-string-tag":234,"../internals/well-known-symbol":268}],133:[function(o,M,R){var p=o("../internals/path"),f=o("../internals/has-own-property"),h=o("../internals/well-known-symbol-wrapped"),y=o("../internals/object-define-property").f;M.exports=function(g){var w=p.Symbol||(p.Symbol={});f(w,g)||y(w,g,{value:h.f(g)})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/path":213,"../internals/well-known-symbol-wrapped":267}],134:[function(o,M,R){var p=o("../internals/fails");M.exports=!p(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},{"../internals/fails":150}],135:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/is-object"),h=p.document,y=f(h)&&f(h.createElement);M.exports=function(g){return y?h.createElement(g):{}}},{"../internals/global":163,"../internals/is-object":180}],136:[function(o,M,R){M.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},{}],137:[function(o,M,R){var p=o("../internals/document-create-element"),f=p("span").classList,h=f&&f.constructor&&f.constructor.prototype;M.exports=h===Object.prototype?void 0:h},{"../internals/document-create-element":135}],138:[function(o,M,R){var p=o("../internals/engine-user-agent"),f=p.match(/firefox\/(\d+)/i);M.exports=!!f&&+f[1]},{"../internals/engine-user-agent":145}],139:[function(o,M,R){M.exports=typeof window=="object"&&typeof Deno!="object"},{}],140:[function(o,M,R){var p=o("../internals/engine-user-agent");M.exports=/MSIE|Trident/.test(p)},{"../internals/engine-user-agent":145}],141:[function(o,M,R){var p=o("../internals/engine-user-agent"),f=o("../internals/global");M.exports=/ipad|iphone|ipod/i.test(p)&&f.Pebble!==void 0},{"../internals/engine-user-agent":145,"../internals/global":163}],142:[function(o,M,R){var p=o("../internals/engine-user-agent");M.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(p)},{"../internals/engine-user-agent":145}],143:[function(o,M,R){var p=o("../internals/classof-raw"),f=o("../internals/global");M.exports=p(f.process)=="process"},{"../internals/classof-raw":123,"../internals/global":163}],144:[function(o,M,R){var p=o("../internals/engine-user-agent");M.exports=/web0s(?!.*chrome)/i.test(p)},{"../internals/engine-user-agent":145}],145:[function(o,M,R){var p=o("../internals/get-built-in");M.exports=p("navigator","userAgent")||""},{"../internals/get-built-in":158}],146:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/engine-user-agent"),h=p.process,y=p.Deno,g=h&&h.versions||y&&y.version,w=g&&g.v8,c,m;w&&(c=w.split("."),m=c[0]>0&&c[0]<4?1:+(c[0]+c[1])),!m&&f&&(c=f.match(/Edge\/(\d+)/),(!c||c[1]>=74)&&(c=f.match(/Chrome\/(\d+)/),c&&(m=+c[1]))),M.exports=m},{"../internals/engine-user-agent":145,"../internals/global":163}],147:[function(o,M,R){var p=o("../internals/engine-user-agent"),f=p.match(/AppleWebKit\/(\d+)\./);M.exports=!!f&&+f[1]},{"../internals/engine-user-agent":145}],148:[function(o,M,R){M.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],149:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/object-get-own-property-descriptor").f,h=o("../internals/create-non-enumerable-property"),y=o("../internals/redefine"),g=o("../internals/set-global"),w=o("../internals/copy-constructor-properties"),c=o("../internals/is-forced");M.exports=function(m,v){var b=m.target,x=m.global,T=m.stat,S,C,E,j,Z,P;if(x?C=p:T?C=p[b]||g(b,{}):C=(p[b]||{}).prototype,C)for(E in v){if(Z=v[E],m.noTargetGet?(P=f(C,E),j=P&&P.value):j=C[E],S=c(x?E:b+(T?".":"#")+E,m.forced),!S&&j!==void 0){if(typeof Z==typeof j)continue;w(Z,j)}(m.sham||j&&j.sham)&&h(Z,"sham",!0),y(C,E,Z,m)}}},{"../internals/copy-constructor-properties":125,"../internals/create-non-enumerable-property":129,"../internals/global":163,"../internals/is-forced":178,"../internals/object-get-own-property-descriptor":199,"../internals/redefine":222,"../internals/set-global":232}],150:[function(o,M,R){M.exports=function(p){try{return!!p()}catch(f){return!0}}},{}],151:[function(o,M,R){"use strict";o("../modules/es.regexp.exec");var p=o("../internals/function-uncurry-this"),f=o("../internals/redefine"),h=o("../internals/regexp-exec"),y=o("../internals/fails"),g=o("../internals/well-known-symbol"),w=o("../internals/create-non-enumerable-property"),c=g("species"),m=RegExp.prototype;M.exports=function(v,b,x,T){var S=g(v),C=!y(function(){var P={};return P[S]=function(){return 7},""[v](P)!=7}),E=C&&!y(function(){var P=!1,Q=/a/;return v==="split"&&(Q={},Q.constructor={},Q.constructor[c]=function(){return Q},Q.flags="",Q[S]=/./[S]),Q.exec=function(){return P=!0,null},Q[S](""),!P});if(!C||!E||x){var j=p(/./[S]),Z=b(S,""[v],function(P,Q,B,k,D){var F=p(P),J=Q.exec;return J===h||J===m.exec?C&&!D?{done:!0,value:j(Q,B,k)}:{done:!0,value:F(B,Q,k)}:{done:!1}});f(String.prototype,v,Z[0]),f(m,S,Z[1])}T&&w(m[S],"sham",!0)}},{"../internals/create-non-enumerable-property":129,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/redefine":222,"../internals/regexp-exec":224,"../internals/well-known-symbol":268,"../modules/es.regexp.exec":300}],152:[function(o,M,R){var p=o("../internals/function-bind-native"),f=Function.prototype,h=f.apply,y=f.call;M.exports=typeof Reflect=="object"&&Reflect.apply||(p?y.bind(h):function(){return y.apply(h,arguments)})},{"../internals/function-bind-native":154}],153:[function(o,M,R){var p=o("../internals/function-uncurry-this"),f=o("../internals/a-callable"),h=o("../internals/function-bind-native"),y=p(p.bind);M.exports=function(g,w){return f(g),w===void 0?g:h?y(g,w):function(){return g.apply(w,arguments)}}},{"../internals/a-callable":95,"../internals/function-bind-native":154,"../internals/function-uncurry-this":157}],154:[function(o,M,R){var p=o("../internals/fails");M.exports=!p(function(){var f=function(){}.bind();return typeof f!="function"||f.hasOwnProperty("prototype")})},{"../internals/fails":150}],155:[function(o,M,R){var p=o("../internals/function-bind-native"),f=Function.prototype.call;M.exports=p?f.bind(f):function(){return f.apply(f,arguments)}},{"../internals/function-bind-native":154}],156:[function(o,M,R){var p=o("../internals/descriptors"),f=o("../internals/has-own-property"),h=Function.prototype,y=p&&Object.getOwnPropertyDescriptor,g=f(h,"name"),w=g&&function(){}.name==="something",c=g&&(!p||p&&y(h,"name").configurable);M.exports={EXISTS:g,PROPER:w,CONFIGURABLE:c}},{"../internals/descriptors":134,"../internals/has-own-property":164}],157:[function(o,M,R){var p=o("../internals/function-bind-native"),f=Function.prototype,h=f.bind,y=f.call,g=p&&h.bind(y,y);M.exports=p?function(w){return w&&g(w)}:function(w){return w&&function(){return y.apply(w,arguments)}}},{"../internals/function-bind-native":154}],158:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/is-callable"),h=function(y){return f(y)?y:void 0};M.exports=function(y,g){return arguments.length<2?h(p[y]):p[y]&&p[y][g]}},{"../internals/global":163,"../internals/is-callable":176}],159:[function(o,M,R){var p=o("../internals/classof"),f=o("../internals/get-method"),h=o("../internals/iterators"),y=o("../internals/well-known-symbol"),g=y("iterator");M.exports=function(w){if(w!=null)return f(w,g)||f(w,"@@iterator")||h[p(w)]}},{"../internals/classof":124,"../internals/get-method":161,"../internals/iterators":187,"../internals/well-known-symbol":268}],160:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/function-call"),h=o("../internals/a-callable"),y=o("../internals/an-object"),g=o("../internals/try-to-string"),w=o("../internals/get-iterator-method"),c=p.TypeError;M.exports=function(m,v){var b=arguments.length<2?w(m):v;if(h(b))return y(f(b,m));throw c(g(m)+" is not iterable")}},{"../internals/a-callable":95,"../internals/an-object":101,"../internals/function-call":155,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/try-to-string":257}],161:[function(o,M,R){var p=o("../internals/a-callable");M.exports=function(f,h){var y=f[h];return y==null?void 0:p(y)}},{"../internals/a-callable":95}],162:[function(o,M,R){var p=o("../internals/function-uncurry-this"),f=o("../internals/to-object"),h=Math.floor,y=p("".charAt),g=p("".replace),w=p("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,m=/\$([$&'`]|\d{1,2})/g;M.exports=function(v,b,x,T,S,C){var E=x+v.length,j=T.length,Z=m;return S!==void 0&&(S=f(S),Z=c),g(C,Z,function(P,Q){var B;switch(y(Q,0)){case"$":return"$";case"&":return v;case"`":return w(b,0,x);case"'":return w(b,E);case"<":B=S[w(Q,1,-1)];break;default:var k=+Q;if(k===0)return P;if(k>j){var D=h(k/10);return D===0?P:D<=j?T[D-1]===void 0?y(Q,1):T[D-1]+y(Q,1):P}B=T[k-1]}return B===void 0?"":B})}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],163:[function(o,M,R){(function(p){(function(){var f=function(h){return h&&h.Math==Math&&h};M.exports=f(typeof globalThis=="object"&&globalThis)||f(typeof window=="object"&&window)||f(typeof self=="object"&&self)||f(typeof p=="object"&&p)||function(){return this}()||Function("return this")()}).call(this)}).call(this,typeof mt!="undefined"?mt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],164:[function(o,M,R){var p=o("../internals/function-uncurry-this"),f=o("../internals/to-object"),h=p({}.hasOwnProperty);M.exports=Object.hasOwn||function(g,w){return h(f(g),w)}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],165:[function(o,M,R){M.exports={}},{}],166:[function(o,M,R){var p=o("../internals/global");M.exports=function(f,h){var y=p.console;y&&y.error&&(arguments.length==1?y.error(f):y.error(f,h))}},{"../internals/global":163}],167:[function(o,M,R){var p=o("../internals/get-built-in");M.exports=p("document","documentElement")},{"../internals/get-built-in":158}],168:[function(o,M,R){var p=o("../internals/descriptors"),f=o("../internals/fails"),h=o("../internals/document-create-element");M.exports=!p&&!f(function(){return Object.defineProperty(h("div"),"a",{get:function(){return 7}}).a!=7})},{"../internals/descriptors":134,"../internals/document-create-element":135,"../internals/fails":150}],169:[function(o,M,R){var p=o("../internals/global"),f=p.Array,h=Math.abs,y=Math.pow,g=Math.floor,w=Math.log,c=Math.LN2,m=function(b,x,T){var S=f(T),C=T*8-x-1,E=(1<<C)-1,j=E>>1,Z=x===23?y(2,-24)-y(2,-77):0,P=b<0||b===0&&1/b<0?1:0,Q=0,B,k,D;for(b=h(b),b!=b||b===1/0?(k=b!=b?1:0,B=E):(B=g(w(b)/c),D=y(2,-B),b*D<1&&(B--,D*=2),B+j>=1?b+=Z/D:b+=Z*y(2,1-j),b*D>=2&&(B++,D/=2),B+j>=E?(k=0,B=E):B+j>=1?(k=(b*D-1)*y(2,x),B=B+j):(k=b*y(2,j-1)*y(2,x),B=0));x>=8;)S[Q++]=k&255,k/=256,x-=8;for(B=B<<x|k,C+=x;C>0;)S[Q++]=B&255,B/=256,C-=8;return S[--Q]|=P*128,S},v=function(b,x){var T=b.length,S=T*8-x-1,C=(1<<S)-1,E=C>>1,j=S-7,Z=T-1,P=b[Z--],Q=P&127,B;for(P>>=7;j>0;)Q=Q*256+b[Z--],j-=8;for(B=Q&(1<<-j)-1,Q>>=-j,j+=x;j>0;)B=B*256+b[Z--],j-=8;if(Q===0)Q=1-E;else{if(Q===C)return B?NaN:P?-1/0:1/0;B=B+y(2,x),Q=Q-E}return(P?-1:1)*B*y(2,Q-x)};M.exports={pack:m,unpack:v}},{"../internals/global":163}],170:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/function-uncurry-this"),h=o("../internals/fails"),y=o("../internals/classof-raw"),g=p.Object,w=f("".split);M.exports=h(function(){return!g("z").propertyIsEnumerable(0)})?function(c){return y(c)=="String"?w(c,""):g(c)}:g},{"../internals/classof-raw":123,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],171:[function(o,M,R){var p=o("../internals/is-callable"),f=o("../internals/is-object"),h=o("../internals/object-set-prototype-of");M.exports=function(y,g,w){var c,m;return h&&p(c=g.constructor)&&c!==w&&f(m=c.prototype)&&m!==w.prototype&&h(y,m),y}},{"../internals/is-callable":176,"../internals/is-object":180,"../internals/object-set-prototype-of":208}],172:[function(o,M,R){var p=o("../internals/function-uncurry-this"),f=o("../internals/is-callable"),h=o("../internals/shared-store"),y=p(Function.toString);f(h.inspectSource)||(h.inspectSource=function(g){return y(g)}),M.exports=h.inspectSource},{"../internals/function-uncurry-this":157,"../internals/is-callable":176,"../internals/shared-store":236}],173:[function(o,M,R){var p=o("../internals/native-weak-map"),f=o("../internals/global"),h=o("../internals/function-uncurry-this"),y=o("../internals/is-object"),g=o("../internals/create-non-enumerable-property"),w=o("../internals/has-own-property"),c=o("../internals/shared-store"),m=o("../internals/shared-key"),v=o("../internals/hidden-keys"),b="Object already initialized",x=f.TypeError,T=f.WeakMap,S,C,E,j=function(F){return E(F)?C(F):S(F,{})},Z=function(F){return function(J){var H;if(!y(J)||(H=C(J)).type!==F)throw x("Incompatible receiver, "+F+" required");return H}};if(p||c.state){var P=c.state||(c.state=new T),Q=h(P.get),B=h(P.has),k=h(P.set);S=function(F,J){if(B(P,F))throw new x(b);return J.facade=F,k(P,F,J),J},C=function(F){return Q(P,F)||{}},E=function(F){return B(P,F)}}else{var D=m("state");v[D]=!0,S=function(F,J){if(w(F,D))throw new x(b);return J.facade=F,g(F,D,J),J},C=function(F){return w(F,D)?F[D]:{}},E=function(F){return w(F,D)}}M.exports={set:S,get:C,has:E,enforce:j,getterFor:Z}},{"../internals/create-non-enumerable-property":129,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/is-object":180,"../internals/native-weak-map":192,"../internals/shared-key":235,"../internals/shared-store":236}],174:[function(o,M,R){var p=o("../internals/well-known-symbol"),f=o("../internals/iterators"),h=p("iterator"),y=Array.prototype;M.exports=function(g){return g!==void 0&&(f.Array===g||y[h]===g)}},{"../internals/iterators":187,"../internals/well-known-symbol":268}],175:[function(o,M,R){var p=o("../internals/classof-raw");M.exports=Array.isArray||function(h){return p(h)=="Array"}},{"../internals/classof-raw":123}],176:[function(o,M,R){M.exports=function(p){return typeof p=="function"}},{}],177:[function(o,M,R){var p=o("../internals/function-uncurry-this"),f=o("../internals/fails"),h=o("../internals/is-callable"),y=o("../internals/classof"),g=o("../internals/get-built-in"),w=o("../internals/inspect-source"),c=function(){},m=[],v=g("Reflect","construct"),b=/^\s*(?:class|function)\b/,x=p(b.exec),T=!b.exec(c),S=function(j){if(!h(j))return!1;try{return v(c,m,j),!0}catch(Z){return!1}},C=function(j){if(!h(j))return!1;switch(y(j)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return T||!!x(b,w(j))}catch(Z){return!0}};C.sham=!0,M.exports=!v||f(function(){var E;return S(S.call)||!S(Object)||!S(function(){E=!0})||E})?C:S},{"../internals/classof":124,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/inspect-source":172,"../internals/is-callable":176}],178:[function(o,M,R){var p=o("../internals/fails"),f=o("../internals/is-callable"),h=/#|\.prototype\./,y=function(v,b){var x=w[g(v)];return x==m?!0:x==c?!1:f(b)?p(b):!!b},g=y.normalize=function(v){return String(v).replace(h,".").toLowerCase()},w=y.data={},c=y.NATIVE="N",m=y.POLYFILL="P";M.exports=y},{"../internals/fails":150,"../internals/is-callable":176}],179:[function(o,M,R){var p=o("../internals/is-object"),f=Math.floor;M.exports=Number.isInteger||function(y){return!p(y)&&isFinite(y)&&f(y)===y}},{"../internals/is-object":180}],180:[function(o,M,R){var p=o("../internals/is-callable");M.exports=function(f){return typeof f=="object"?f!==null:p(f)}},{"../internals/is-callable":176}],181:[function(o,M,R){M.exports=!1},{}],182:[function(o,M,R){var p=o("../internals/is-object"),f=o("../internals/classof-raw"),h=o("../internals/well-known-symbol"),y=h("match");M.exports=function(g){var w;return p(g)&&((w=g[y])!==void 0?!!w:f(g)=="RegExp")}},{"../internals/classof-raw":123,"../internals/is-object":180,"../internals/well-known-symbol":268}],183:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/get-built-in"),h=o("../internals/is-callable"),y=o("../internals/object-is-prototype-of"),g=o("../internals/use-symbol-as-uid"),w=p.Object;M.exports=g?function(c){return typeof c=="symbol"}:function(c){var m=f("Symbol");return h(m)&&y(m.prototype,w(c))}},{"../internals/get-built-in":158,"../internals/global":163,"../internals/is-callable":176,"../internals/object-is-prototype-of":204,"../internals/use-symbol-as-uid":264}],184:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/function-bind-context"),h=o("../internals/function-call"),y=o("../internals/an-object"),g=o("../internals/try-to-string"),w=o("../internals/is-array-iterator-method"),c=o("../internals/length-of-array-like"),m=o("../internals/object-is-prototype-of"),v=o("../internals/get-iterator"),b=o("../internals/get-iterator-method"),x=o("../internals/iterator-close"),T=p.TypeError,S=function(E,j){this.stopped=E,this.result=j},C=S.prototype;M.exports=function(E,j,Z){var P=Z&&Z.that,Q=!!(Z&&Z.AS_ENTRIES),B=!!(Z&&Z.IS_ITERATOR),k=!!(Z&&Z.INTERRUPTED),D=f(j,P),F,J,H,N,_,X,ee,ie=function(ne){return F&&x(F,"normal",ne),new S(!0,ne)},he=function(ne){return Q?(y(ne),k?D(ne[0],ne[1],ie):D(ne[0],ne[1])):k?D(ne,ie):D(ne)};if(B)F=E;else{if(J=b(E),!J)throw T(g(E)+" is not iterable");if(w(J)){for(H=0,N=c(E);N>H;H++)if(_=he(E[H]),_&&m(C,_))return _;return new S(!1)}F=v(E,J)}for(X=F.next;!(ee=h(X,F)).done;){try{_=he(ee.value)}catch(ne){x(F,"throw",ne)}if(typeof _=="object"&&_&&m(C,_))return _}return new S(!1)}},{"../internals/an-object":101,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/is-array-iterator-method":174,"../internals/iterator-close":185,"../internals/length-of-array-like":188,"../internals/object-is-prototype-of":204,"../internals/try-to-string":257}],185:[function(o,M,R){var p=o("../internals/function-call"),f=o("../internals/an-object"),h=o("../internals/get-method");M.exports=function(y,g,w){var c,m;f(y);try{if(c=h(y,"return"),!c){if(g==="throw")throw w;return w}c=p(c,y)}catch(v){m=!0,c=v}if(g==="throw")throw w;if(m)throw c;return f(c),w}},{"../internals/an-object":101,"../internals/function-call":155,"../internals/get-method":161}],186:[function(o,M,R){"use strict";var p=o("../internals/fails"),f=o("../internals/is-callable"),h=o("../internals/object-create"),y=o("../internals/object-get-prototype-of"),g=o("../internals/redefine"),w=o("../internals/well-known-symbol"),c=o("../internals/is-pure"),m=w("iterator"),v=!1,b,x,T;[].keys&&(T=[].keys(),"next"in T?(x=y(y(T)),x!==Object.prototype&&(b=x)):v=!0);var S=b==null||p(function(){var C={};return b[m].call(C)!==C});S?b={}:c&&(b=h(b)),f(b[m])||g(b,m,function(){return this}),M.exports={IteratorPrototype:b,BUGGY_SAFARI_ITERATORS:v}},{"../internals/fails":150,"../internals/is-callable":176,"../internals/is-pure":181,"../internals/object-create":196,"../internals/object-get-prototype-of":203,"../internals/redefine":222,"../internals/well-known-symbol":268}],187:[function(o,M,R){arguments[4][165][0].apply(R,arguments)},{dup:165}],188:[function(o,M,R){var p=o("../internals/to-length");M.exports=function(f){return p(f.length)}},{"../internals/to-length":249}],189:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/function-bind-context"),h=o("../internals/object-get-own-property-descriptor").f,y=o("../internals/task").set,g=o("../internals/engine-is-ios"),w=o("../internals/engine-is-ios-pebble"),c=o("../internals/engine-is-webos-webkit"),m=o("../internals/engine-is-node"),v=p.MutationObserver||p.WebKitMutationObserver,b=p.document,x=p.process,T=p.Promise,S=h(p,"queueMicrotask"),C=S&&S.value,E,j,Z,P,Q,B,k,D;C||(E=function(){var F,J;for(m&&(F=x.domain)&&F.exit();j;){J=j.fn,j=j.next;try{J()}catch(H){throw j?P():Z=void 0,H}}Z=void 0,F&&F.enter()},!g&&!m&&!c&&v&&b?(Q=!0,B=b.createTextNode(""),new v(E).observe(B,{characterData:!0}),P=function(){B.data=Q=!Q}):!w&&T&&T.resolve?(k=T.resolve(void 0),k.constructor=T,D=f(k.then,k),P=function(){D(E)}):m?P=function(){x.nextTick(E)}:(y=f(y,p),P=function(){y(E)})),M.exports=C||function(F){var J={fn:F,next:void 0};Z&&(Z.next=J),j||(j=J,P()),Z=J}},{"../internals/engine-is-ios":142,"../internals/engine-is-ios-pebble":141,"../internals/engine-is-node":143,"../internals/engine-is-webos-webkit":144,"../internals/function-bind-context":153,"../internals/global":163,"../internals/object-get-own-property-descriptor":199,"../internals/task":243}],190:[function(o,M,R){var p=o("../internals/native-symbol");M.exports=p&&!!Symbol.for&&!!Symbol.keyFor},{"../internals/native-symbol":191}],191:[function(o,M,R){var p=o("../internals/engine-v8-version"),f=o("../internals/fails");M.exports=!!Object.getOwnPropertySymbols&&!f(function(){var h=Symbol();return!String(h)||!(Object(h)instanceof Symbol)||!Symbol.sham&&p&&p<41})},{"../internals/engine-v8-version":146,"../internals/fails":150}],192:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/is-callable"),h=o("../internals/inspect-source"),y=p.WeakMap;M.exports=f(y)&&/native code/.test(h(y))},{"../internals/global":163,"../internals/inspect-source":172,"../internals/is-callable":176}],193:[function(o,M,R){"use strict";var p=o("../internals/a-callable"),f=function(h){var y,g;this.promise=new h(function(w,c){if(y!==void 0||g!==void 0)throw TypeError("Bad Promise constructor");y=w,g=c}),this.resolve=p(y),this.reject=p(g)};M.exports.f=function(h){return new f(h)}},{"../internals/a-callable":95}],194:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/is-regexp"),h=p.TypeError;M.exports=function(y){if(f(y))throw h("The method doesn't accept regular expressions");return y}},{"../internals/global":163,"../internals/is-regexp":182}],195:[function(o,M,R){"use strict";var p=o("../internals/descriptors"),f=o("../internals/function-uncurry-this"),h=o("../internals/function-call"),y=o("../internals/fails"),g=o("../internals/object-keys"),w=o("../internals/object-get-own-property-symbols"),c=o("../internals/object-property-is-enumerable"),m=o("../internals/to-object"),v=o("../internals/indexed-object"),b=Object.assign,x=Object.defineProperty,T=f([].concat);M.exports=!b||y(function(){if(p&&b({b:1},b(x({},"a",{enumerable:!0,get:function(){x(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var S={},C={},E=Symbol(),j="abcdefghijklmnopqrst";return S[E]=7,j.split("").forEach(function(Z){C[Z]=Z}),b({},S)[E]!=7||g(b({},C)).join("")!=j})?function(C,E){for(var j=m(C),Z=arguments.length,P=1,Q=w.f,B=c.f;Z>P;)for(var k=v(arguments[P++]),D=Q?T(g(k),Q(k)):g(k),F=D.length,J=0,H;F>J;)H=D[J++],(!p||h(B,k,H))&&(j[H]=k[H]);return j}:b},{"../internals/descriptors":134,"../internals/fails":150,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/object-get-own-property-symbols":202,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/to-object":250}],196:[function(o,M,R){var p=o("../internals/an-object"),f=o("../internals/object-define-properties"),h=o("../internals/enum-bug-keys"),y=o("../internals/hidden-keys"),g=o("../internals/html"),w=o("../internals/document-create-element"),c=o("../internals/shared-key"),m=">",v="<",b="prototype",x="script",T=c("IE_PROTO"),S=function(){},C=function(Q){return v+x+m+Q+v+"/"+x+m},E=function(Q){Q.write(C("")),Q.close();var B=Q.parentWindow.Object;return Q=null,B},j=function(){var Q=w("iframe"),B="java"+x+":",k;return Q.style.display="none",g.appendChild(Q),Q.src=String(B),k=Q.contentWindow.document,k.open(),k.write(C("document.F=Object")),k.close(),k.F},Z,P=function(){try{Z=new ActiveXObject("htmlfile")}catch(B){}P=typeof document!="undefined"?document.domain&&Z?E(Z):j():E(Z);for(var Q=h.length;Q--;)delete P[b][h[Q]];return P()};y[T]=!0,M.exports=Object.create||function(B,k){var D;return B!==null?(S[b]=p(B),D=new S,S[b]=null,D[T]=B):D=P(),k===void 0?D:f.f(D,k)}},{"../internals/an-object":101,"../internals/document-create-element":135,"../internals/enum-bug-keys":148,"../internals/hidden-keys":165,"../internals/html":167,"../internals/object-define-properties":197,"../internals/shared-key":235}],197:[function(o,M,R){var p=o("../internals/descriptors"),f=o("../internals/v8-prototype-define-bug"),h=o("../internals/object-define-property"),y=o("../internals/an-object"),g=o("../internals/to-indexed-object"),w=o("../internals/object-keys");R.f=p&&!f?Object.defineProperties:function(m,v){y(m);for(var b=g(v),x=w(v),T=x.length,S=0,C;T>S;)h.f(m,C=x[S++],b[C]);return m}},{"../internals/an-object":101,"../internals/descriptors":134,"../internals/object-define-property":198,"../internals/object-keys":206,"../internals/to-indexed-object":247,"../internals/v8-prototype-define-bug":265}],198:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/descriptors"),h=o("../internals/ie8-dom-define"),y=o("../internals/v8-prototype-define-bug"),g=o("../internals/an-object"),w=o("../internals/to-property-key"),c=p.TypeError,m=Object.defineProperty,v=Object.getOwnPropertyDescriptor,b="enumerable",x="configurable",T="writable";R.f=f?y?function(C,E,j){if(g(C),E=w(E),g(j),typeof C=="function"&&E==="prototype"&&"value"in j&&T in j&&!j[T]){var Z=v(C,E);Z&&Z[T]&&(C[E]=j.value,j={configurable:x in j?j[x]:Z[x],enumerable:b in j?j[b]:Z[b],writable:!1})}return m(C,E,j)}:m:function(C,E,j){if(g(C),E=w(E),g(j),h)try{return m(C,E,j)}catch(Z){}if("get"in j||"set"in j)throw c("Accessors not supported");return"value"in j&&(C[E]=j.value),C}},{"../internals/an-object":101,"../internals/descriptors":134,"../internals/global":163,"../internals/ie8-dom-define":168,"../internals/to-property-key":254,"../internals/v8-prototype-define-bug":265}],199:[function(o,M,R){var p=o("../internals/descriptors"),f=o("../internals/function-call"),h=o("../internals/object-property-is-enumerable"),y=o("../internals/create-property-descriptor"),g=o("../internals/to-indexed-object"),w=o("../internals/to-property-key"),c=o("../internals/has-own-property"),m=o("../internals/ie8-dom-define"),v=Object.getOwnPropertyDescriptor;R.f=p?v:function(x,T){if(x=g(x),T=w(T),m)try{return v(x,T)}catch(S){}if(c(x,T))return y(!f(h.f,x,T),x[T])}},{"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/function-call":155,"../internals/has-own-property":164,"../internals/ie8-dom-define":168,"../internals/object-property-is-enumerable":207,"../internals/to-indexed-object":247,"../internals/to-property-key":254}],200:[function(o,M,R){var p=o("../internals/classof-raw"),f=o("../internals/to-indexed-object"),h=o("../internals/object-get-own-property-names").f,y=o("../internals/array-slice-simple"),g=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],w=function(c){try{return h(c)}catch(m){return y(g)}};M.exports.f=function(m){return g&&p(m)=="Window"?w(m):h(f(m))}},{"../internals/array-slice-simple":116,"../internals/classof-raw":123,"../internals/object-get-own-property-names":201,"../internals/to-indexed-object":247}],201:[function(o,M,R){var p=o("../internals/object-keys-internal"),f=o("../internals/enum-bug-keys"),h=f.concat("length","prototype");R.f=Object.getOwnPropertyNames||function(g){return p(g,h)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],202:[function(o,M,R){R.f=Object.getOwnPropertySymbols},{}],203:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/has-own-property"),h=o("../internals/is-callable"),y=o("../internals/to-object"),g=o("../internals/shared-key"),w=o("../internals/correct-prototype-getter"),c=g("IE_PROTO"),m=p.Object,v=m.prototype;M.exports=w?m.getPrototypeOf:function(b){var x=y(b);if(f(x,c))return x[c];var T=x.constructor;return h(T)&&x instanceof T?T.prototype:x instanceof m?v:null}},{"../internals/correct-prototype-getter":127,"../internals/global":163,"../internals/has-own-property":164,"../internals/is-callable":176,"../internals/shared-key":235,"../internals/to-object":250}],204:[function(o,M,R){var p=o("../internals/function-uncurry-this");M.exports=p({}.isPrototypeOf)},{"../internals/function-uncurry-this":157}],205:[function(o,M,R){var p=o("../internals/function-uncurry-this"),f=o("../internals/has-own-property"),h=o("../internals/to-indexed-object"),y=o("../internals/array-includes").indexOf,g=o("../internals/hidden-keys"),w=p([].push);M.exports=function(c,m){var v=h(c),b=0,x=[],T;for(T in v)!f(g,T)&&f(v,T)&&w(x,T);for(;m.length>b;)f(v,T=m[b++])&&(~y(x,T)||w(x,T));return x}},{"../internals/array-includes":110,"../internals/function-uncurry-this":157,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/to-indexed-object":247}],206:[function(o,M,R){var p=o("../internals/object-keys-internal"),f=o("../internals/enum-bug-keys");M.exports=Object.keys||function(y){return p(y,f)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],207:[function(o,M,R){"use strict";var p={}.propertyIsEnumerable,f=Object.getOwnPropertyDescriptor,h=f&&!p.call({1:2},1);R.f=h?function(g){var w=f(this,g);return!!w&&w.enumerable}:p},{}],208:[function(o,M,R){var p=o("../internals/function-uncurry-this"),f=o("../internals/an-object"),h=o("../internals/a-possible-prototype");M.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var y=!1,g={},w;try{w=p(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),w(g,[]),y=g instanceof Array}catch(c){}return function(m,v){return f(m),h(v),y?w(m,v):m.__proto__=v,m}}():void 0)},{"../internals/a-possible-prototype":97,"../internals/an-object":101,"../internals/function-uncurry-this":157}],209:[function(o,M,R){var p=o("../internals/descriptors"),f=o("../internals/function-uncurry-this"),h=o("../internals/object-keys"),y=o("../internals/to-indexed-object"),g=o("../internals/object-property-is-enumerable").f,w=f(g),c=f([].push),m=function(v){return function(b){for(var x=y(b),T=h(x),S=T.length,C=0,E=[],j;S>C;)j=T[C++],(!p||w(x,j))&&c(E,v?[j,x[j]]:x[j]);return E}};M.exports={entries:m(!0),values:m(!1)}},{"../internals/descriptors":134,"../internals/function-uncurry-this":157,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/to-indexed-object":247}],210:[function(o,M,R){"use strict";var p=o("../internals/to-string-tag-support"),f=o("../internals/classof");M.exports=p?{}.toString:function(){return"[object "+f(this)+"]"}},{"../internals/classof":124,"../internals/to-string-tag-support":255}],211:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/function-call"),h=o("../internals/is-callable"),y=o("../internals/is-object"),g=p.TypeError;M.exports=function(w,c){var m,v;if(c==="string"&&h(m=w.toString)&&!y(v=f(m,w))||h(m=w.valueOf)&&!y(v=f(m,w))||c!=="string"&&h(m=w.toString)&&!y(v=f(m,w)))return v;throw g("Can't convert object to primitive value")}},{"../internals/function-call":155,"../internals/global":163,"../internals/is-callable":176,"../internals/is-object":180}],212:[function(o,M,R){var p=o("../internals/get-built-in"),f=o("../internals/function-uncurry-this"),h=o("../internals/object-get-own-property-names"),y=o("../internals/object-get-own-property-symbols"),g=o("../internals/an-object"),w=f([].concat);M.exports=p("Reflect","ownKeys")||function(m){var v=h.f(g(m)),b=y.f;return b?w(v,b(m)):v}},{"../internals/an-object":101,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/object-get-own-property-names":201,"../internals/object-get-own-property-symbols":202}],213:[function(o,M,R){var p=o("../internals/global");M.exports=p},{"../internals/global":163}],214:[function(o,M,R){M.exports=function(p){try{return{error:!1,value:p()}}catch(f){return{error:!0,value:f}}}},{}],215:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/promise-native-constructor"),h=o("../internals/is-callable"),y=o("../internals/is-forced"),g=o("../internals/inspect-source"),w=o("../internals/well-known-symbol"),c=o("../internals/engine-is-browser"),m=o("../internals/is-pure"),v=o("../internals/engine-v8-version"),b=f&&f.prototype,x=w("species"),T=!1,S=h(p.PromiseRejectionEvent),C=y("Promise",function(){var E=g(f),j=E!==String(f);if(!j&&v===66||m&&!(b.catch&&b.finally))return!0;if(v>=51&&/native code/.test(E))return!1;var Z=new f(function(B){B(1)}),P=function(B){B(function(){},function(){})},Q=Z.constructor={};return Q[x]=P,T=Z.then(function(){})instanceof P,T?!j&&c&&!S:!0});M.exports={CONSTRUCTOR:C,REJECTION_EVENT:S,SUBCLASSING:T}},{"../internals/engine-is-browser":139,"../internals/engine-v8-version":146,"../internals/global":163,"../internals/inspect-source":172,"../internals/is-callable":176,"../internals/is-forced":178,"../internals/is-pure":181,"../internals/promise-native-constructor":216,"../internals/well-known-symbol":268}],216:[function(o,M,R){var p=o("../internals/global");M.exports=p.Promise},{"../internals/global":163}],217:[function(o,M,R){var p=o("../internals/an-object"),f=o("../internals/is-object"),h=o("../internals/new-promise-capability");M.exports=function(y,g){if(p(y),f(g)&&g.constructor===y)return g;var w=h.f(y),c=w.resolve;return c(g),w.promise}},{"../internals/an-object":101,"../internals/is-object":180,"../internals/new-promise-capability":193}],218:[function(o,M,R){var p=o("../internals/promise-native-constructor"),f=o("../internals/check-correctness-of-iteration"),h=o("../internals/promise-constructor-detection").CONSTRUCTOR;M.exports=h||!f(function(y){p.all(y).then(void 0,function(){})})},{"../internals/check-correctness-of-iteration":122,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216}],219:[function(o,M,R){var p=o("../internals/object-define-property").f;M.exports=function(f,h,y){y in f||p(f,y,{configurable:!0,get:function(){return h[y]},set:function(g){h[y]=g}})}},{"../internals/object-define-property":198}],220:[function(o,M,R){var p=function(){this.head=null,this.tail=null};p.prototype={add:function(f){var h={item:f,next:null};this.head?this.tail.next=h:this.head=h,this.tail=h},get:function(){var f=this.head;if(f)return this.head=f.next,this.tail===f&&(this.tail=null),f.item}},M.exports=p},{}],221:[function(o,M,R){var p=o("../internals/redefine");M.exports=function(f,h,y){for(var g in h)p(f,g,h[g],y);return f}},{"../internals/redefine":222}],222:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/is-callable"),h=o("../internals/has-own-property"),y=o("../internals/create-non-enumerable-property"),g=o("../internals/set-global"),w=o("../internals/inspect-source"),c=o("../internals/internal-state"),m=o("../internals/function-name").CONFIGURABLE,v=c.get,b=c.enforce,x=String(String).split("String");(M.exports=function(T,S,C,E){var j=E?!!E.unsafe:!1,Z=E?!!E.enumerable:!1,P=E?!!E.noTargetGet:!1,Q=E&&E.name!==void 0?E.name:S,B;if(f(C)&&(String(Q).slice(0,7)==="Symbol("&&(Q="["+String(Q).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!h(C,"name")||m&&C.name!==Q)&&y(C,"name",Q),B=b(C),B.source||(B.source=x.join(typeof Q=="string"?Q:""))),T===p){Z?T[S]=C:g(S,C);return}else j?!P&&T[S]&&(Z=!0):delete T[S];Z?T[S]=C:y(T,S,C)})(Function.prototype,"toString",function(){return f(this)&&v(this).source||w(this)})},{"../internals/create-non-enumerable-property":129,"../internals/function-name":156,"../internals/global":163,"../internals/has-own-property":164,"../internals/inspect-source":172,"../internals/internal-state":173,"../internals/is-callable":176,"../internals/set-global":232}],223:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/function-call"),h=o("../internals/an-object"),y=o("../internals/is-callable"),g=o("../internals/classof-raw"),w=o("../internals/regexp-exec"),c=p.TypeError;M.exports=function(m,v){var b=m.exec;if(y(b)){var x=f(b,m,v);return x!==null&&h(x),x}if(g(m)==="RegExp")return f(w,m,v);throw c("RegExp#exec called on incompatible receiver")}},{"../internals/an-object":101,"../internals/classof-raw":123,"../internals/function-call":155,"../internals/global":163,"../internals/is-callable":176,"../internals/regexp-exec":224}],224:[function(o,M,R){"use strict";var p=o("../internals/function-call"),f=o("../internals/function-uncurry-this"),h=o("../internals/to-string"),y=o("../internals/regexp-flags"),g=o("../internals/regexp-sticky-helpers"),w=o("../internals/shared"),c=o("../internals/object-create"),m=o("../internals/internal-state").get,v=o("../internals/regexp-unsupported-dot-all"),b=o("../internals/regexp-unsupported-ncg"),x=w("native-string-replace",String.prototype.replace),T=RegExp.prototype.exec,S=T,C=f("".charAt),E=f("".indexOf),j=f("".replace),Z=f("".slice),P=function(){var D=/a/,F=/b*/g;return p(T,D,"a"),p(T,F,"a"),D.lastIndex!==0||F.lastIndex!==0}(),Q=g.BROKEN_CARET,B=/()??/.exec("")[1]!==void 0,k=P||B||Q||v||b;k&&(S=function(F){var J=this,H=m(J),N=h(F),_=H.raw,X,ee,ie,he,ne,Ie,q;if(_)return _.lastIndex=J.lastIndex,X=p(S,_,N),J.lastIndex=_.lastIndex,X;var pe=H.groups,ve=Q&&J.sticky,xe=p(y,J),ce=J.source,fe=0,ge=N;if(ve&&(xe=j(xe,"y",""),E(xe,"g")===-1&&(xe+="g"),ge=Z(N,J.lastIndex),J.lastIndex>0&&(!J.multiline||J.multiline&&C(N,J.lastIndex-1)!==`
`)&&(ce="(?: "+ce+")",ge=" "+ge,fe++),ee=new RegExp("^(?:"+ce+")",xe)),B&&(ee=new RegExp("^"+ce+"$(?!\\s)",xe)),P&&(ie=J.lastIndex),he=p(T,ve?ee:J,ge),ve?he?(he.input=Z(he.input,fe),he[0]=Z(he[0],fe),he.index=J.lastIndex,J.lastIndex+=he[0].length):J.lastIndex=0:P&&he&&(J.lastIndex=J.global?he.index+he[0].length:ie),B&&he&&he.length>1&&p(x,he[0],ee,function(){for(ne=1;ne<arguments.length-2;ne++)arguments[ne]===void 0&&(he[ne]=void 0)}),he&&pe)for(he.groups=Ie=c(null),ne=0;ne<pe.length;ne++)q=pe[ne],Ie[q[0]]=he[q[1]];return he}),M.exports=S},{"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/internal-state":173,"../internals/object-create":196,"../internals/regexp-flags":225,"../internals/regexp-sticky-helpers":227,"../internals/regexp-unsupported-dot-all":228,"../internals/regexp-unsupported-ncg":229,"../internals/shared":237,"../internals/to-string":256}],225:[function(o,M,R){"use strict";var p=o("../internals/an-object");M.exports=function(){var f=p(this),h="";return f.hasIndices&&(h+="d"),f.global&&(h+="g"),f.ignoreCase&&(h+="i"),f.multiline&&(h+="m"),f.dotAll&&(h+="s"),f.unicode&&(h+="u"),f.sticky&&(h+="y"),h}},{"../internals/an-object":101}],226:[function(o,M,R){var p=o("../internals/function-call"),f=o("../internals/has-own-property"),h=o("../internals/object-is-prototype-of"),y=o("../internals/regexp-flags"),g=RegExp.prototype;M.exports=function(w){var c=w.flags;return c===void 0&&!("flags"in g)&&!f(w,"flags")&&h(g,w)?p(y,w):c}},{"../internals/function-call":155,"../internals/has-own-property":164,"../internals/object-is-prototype-of":204,"../internals/regexp-flags":225}],227:[function(o,M,R){var p=o("../internals/fails"),f=o("../internals/global"),h=f.RegExp,y=p(function(){var c=h("a","y");return c.lastIndex=2,c.exec("abcd")!=null}),g=y||p(function(){return!h("a","y").sticky}),w=y||p(function(){var c=h("^r","gy");return c.lastIndex=2,c.exec("str")!=null});M.exports={BROKEN_CARET:w,MISSED_STICKY:g,UNSUPPORTED_Y:y}},{"../internals/fails":150,"../internals/global":163}],228:[function(o,M,R){var p=o("../internals/fails"),f=o("../internals/global"),h=f.RegExp;M.exports=p(function(){var y=h(".","s");return!(y.dotAll&&y.exec(`
`)&&y.flags==="s")})},{"../internals/fails":150,"../internals/global":163}],229:[function(o,M,R){var p=o("../internals/fails"),f=o("../internals/global"),h=f.RegExp;M.exports=p(function(){var y=h("(?<a>b)","g");return y.exec("b").groups.a!=="b"||"b".replace(y,"$<a>c")!=="bc"})},{"../internals/fails":150,"../internals/global":163}],230:[function(o,M,R){var p=o("../internals/global"),f=p.TypeError;M.exports=function(h){if(h==null)throw f("Can't call method on "+h);return h}},{"../internals/global":163}],231:[function(o,M,R){M.exports=Object.is||function(f,h){return f===h?f!==0||1/f===1/h:f!=f&&h!=h}},{}],232:[function(o,M,R){var p=o("../internals/global"),f=Object.defineProperty;M.exports=function(h,y){try{f(p,h,{value:y,configurable:!0,writable:!0})}catch(g){p[h]=y}return y}},{"../internals/global":163}],233:[function(o,M,R){"use strict";var p=o("../internals/get-built-in"),f=o("../internals/object-define-property"),h=o("../internals/well-known-symbol"),y=o("../internals/descriptors"),g=h("species");M.exports=function(w){var c=p(w),m=f.f;y&&c&&!c[g]&&m(c,g,{configurable:!0,get:function(){return this}})}},{"../internals/descriptors":134,"../internals/get-built-in":158,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],234:[function(o,M,R){var p=o("../internals/object-define-property").f,f=o("../internals/has-own-property"),h=o("../internals/well-known-symbol"),y=h("toStringTag");M.exports=function(g,w,c){g&&!c&&(g=g.prototype),g&&!f(g,y)&&p(g,y,{configurable:!0,value:w})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],235:[function(o,M,R){var p=o("../internals/shared"),f=o("../internals/uid"),h=p("keys");M.exports=function(y){return h[y]||(h[y]=f(y))}},{"../internals/shared":237,"../internals/uid":263}],236:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/set-global"),h="__core-js_shared__",y=p[h]||f(h,{});M.exports=y},{"../internals/global":163,"../internals/set-global":232}],237:[function(o,M,R){var p=o("../internals/is-pure"),f=o("../internals/shared-store");(M.exports=function(h,y){return f[h]||(f[h]=y!==void 0?y:{})})("versions",[]).push({version:"3.22.1",mode:p?"pure":"global",copyright:"\xA9 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.1/LICENSE",source:"https://github.com/zloirock/core-js"})},{"../internals/is-pure":181,"../internals/shared-store":236}],238:[function(o,M,R){var p=o("../internals/an-object"),f=o("../internals/a-constructor"),h=o("../internals/well-known-symbol"),y=h("species");M.exports=function(g,w){var c=p(g).constructor,m;return c===void 0||(m=p(c)[y])==null?w:f(m)}},{"../internals/a-constructor":96,"../internals/an-object":101,"../internals/well-known-symbol":268}],239:[function(o,M,R){var p=o("../internals/function-uncurry-this"),f=o("../internals/to-integer-or-infinity"),h=o("../internals/to-string"),y=o("../internals/require-object-coercible"),g=p("".charAt),w=p("".charCodeAt),c=p("".slice),m=function(v){return function(b,x){var T=h(y(b)),S=f(x),C=T.length,E,j;return S<0||S>=C?v?"":void 0:(E=w(T,S),E<55296||E>56319||S+1===C||(j=w(T,S+1))<56320||j>57343?v?g(T,S):E:v?c(T,S,S+2):(E-55296<<10)+(j-56320)+65536)}};M.exports={codeAt:m(!1),charAt:m(!0)}},{"../internals/function-uncurry-this":157,"../internals/require-object-coercible":230,"../internals/to-integer-or-infinity":248,"../internals/to-string":256}],240:[function(o,M,R){var p=o("../internals/function-name").PROPER,f=o("../internals/fails"),h=o("../internals/whitespaces"),y="\u200B\x85\u180E";M.exports=function(g){return f(function(){return!!h[g]()||y[g]()!==y||p&&h[g].name!==g})}},{"../internals/fails":150,"../internals/function-name":156,"../internals/whitespaces":269}],241:[function(o,M,R){var p=o("../internals/function-uncurry-this"),f=o("../internals/require-object-coercible"),h=o("../internals/to-string"),y=o("../internals/whitespaces"),g=p("".replace),w="["+y+"]",c=RegExp("^"+w+w+"*"),m=RegExp(w+w+"*$"),v=function(b){return function(x){var T=h(f(x));return b&1&&(T=g(T,c,"")),b&2&&(T=g(T,m,"")),T}};M.exports={start:v(1),end:v(2),trim:v(3)}},{"../internals/function-uncurry-this":157,"../internals/require-object-coercible":230,"../internals/to-string":256,"../internals/whitespaces":269}],242:[function(o,M,R){var p=o("../internals/function-call"),f=o("../internals/get-built-in"),h=o("../internals/well-known-symbol"),y=o("../internals/redefine");M.exports=function(){var g=f("Symbol"),w=g&&g.prototype,c=w&&w.valueOf,m=h("toPrimitive");w&&!w[m]&&y(w,m,function(v){return p(c,this)})}},{"../internals/function-call":155,"../internals/get-built-in":158,"../internals/redefine":222,"../internals/well-known-symbol":268}],243:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/function-apply"),h=o("../internals/function-bind-context"),y=o("../internals/is-callable"),g=o("../internals/has-own-property"),w=o("../internals/fails"),c=o("../internals/html"),m=o("../internals/array-slice"),v=o("../internals/document-create-element"),b=o("../internals/validate-arguments-length"),x=o("../internals/engine-is-ios"),T=o("../internals/engine-is-node"),S=p.setImmediate,C=p.clearImmediate,E=p.process,j=p.Dispatch,Z=p.Function,P=p.MessageChannel,Q=p.String,B=0,k={},D="onreadystatechange",F,J,H,N;try{F=p.location}catch(he){}var _=function(he){if(g(k,he)){var ne=k[he];delete k[he],ne()}},X=function(he){return function(){_(he)}},ee=function(he){_(he.data)},ie=function(he){p.postMessage(Q(he),F.protocol+"//"+F.host)};(!S||!C)&&(S=function(ne){b(arguments.length,1);var Ie=y(ne)?ne:Z(ne),q=m(arguments,1);return k[++B]=function(){f(Ie,void 0,q)},J(B),B},C=function(ne){delete k[ne]},T?J=function(he){E.nextTick(X(he))}:j&&j.now?J=function(he){j.now(X(he))}:P&&!x?(H=new P,N=H.port2,H.port1.onmessage=ee,J=h(N.postMessage,N)):p.addEventListener&&y(p.postMessage)&&!p.importScripts&&F&&F.protocol!=="file:"&&!w(ie)?(J=ie,p.addEventListener("message",ee,!1)):D in v("script")?J=function(he){c.appendChild(v("script"))[D]=function(){c.removeChild(this),_(he)}}:J=function(he){setTimeout(X(he),0)}),M.exports={set:S,clear:C}},{"../internals/array-slice":117,"../internals/document-create-element":135,"../internals/engine-is-ios":142,"../internals/engine-is-node":143,"../internals/fails":150,"../internals/function-apply":152,"../internals/function-bind-context":153,"../internals/global":163,"../internals/has-own-property":164,"../internals/html":167,"../internals/is-callable":176,"../internals/validate-arguments-length":266}],244:[function(o,M,R){var p=o("../internals/function-uncurry-this");M.exports=p(1 .valueOf)},{"../internals/function-uncurry-this":157}],245:[function(o,M,R){var p=o("../internals/to-integer-or-infinity"),f=Math.max,h=Math.min;M.exports=function(y,g){var w=p(y);return w<0?f(w+g,0):h(w,g)}},{"../internals/to-integer-or-infinity":248}],246:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/to-integer-or-infinity"),h=o("../internals/to-length"),y=p.RangeError;M.exports=function(g){if(g===void 0)return 0;var w=f(g),c=h(w);if(w!==c)throw y("Wrong length or index");return c}},{"../internals/global":163,"../internals/to-integer-or-infinity":248,"../internals/to-length":249}],247:[function(o,M,R){var p=o("../internals/indexed-object"),f=o("../internals/require-object-coercible");M.exports=function(h){return p(f(h))}},{"../internals/indexed-object":170,"../internals/require-object-coercible":230}],248:[function(o,M,R){var p=Math.ceil,f=Math.floor;M.exports=function(h){var y=+h;return y!==y||y===0?0:(y>0?f:p)(y)}},{}],249:[function(o,M,R){var p=o("../internals/to-integer-or-infinity"),f=Math.min;M.exports=function(h){return h>0?f(p(h),9007199254740991):0}},{"../internals/to-integer-or-infinity":248}],250:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/require-object-coercible"),h=p.Object;M.exports=function(y){return h(f(y))}},{"../internals/global":163,"../internals/require-object-coercible":230}],251:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/to-positive-integer"),h=p.RangeError;M.exports=function(y,g){var w=f(y);if(w%g)throw h("Wrong offset");return w}},{"../internals/global":163,"../internals/to-positive-integer":252}],252:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/to-integer-or-infinity"),h=p.RangeError;M.exports=function(y){var g=f(y);if(g<0)throw h("The argument can't be less than 0");return g}},{"../internals/global":163,"../internals/to-integer-or-infinity":248}],253:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/function-call"),h=o("../internals/is-object"),y=o("../internals/is-symbol"),g=o("../internals/get-method"),w=o("../internals/ordinary-to-primitive"),c=o("../internals/well-known-symbol"),m=p.TypeError,v=c("toPrimitive");M.exports=function(b,x){if(!h(b)||y(b))return b;var T=g(b,v),S;if(T){if(x===void 0&&(x="default"),S=f(T,b,x),!h(S)||y(S))return S;throw m("Can't convert object to primitive value")}return x===void 0&&(x="number"),w(b,x)}},{"../internals/function-call":155,"../internals/get-method":161,"../internals/global":163,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/ordinary-to-primitive":211,"../internals/well-known-symbol":268}],254:[function(o,M,R){var p=o("../internals/to-primitive"),f=o("../internals/is-symbol");M.exports=function(h){var y=p(h,"string");return f(y)?y:y+""}},{"../internals/is-symbol":183,"../internals/to-primitive":253}],255:[function(o,M,R){var p=o("../internals/well-known-symbol"),f=p("toStringTag"),h={};h[f]="z",M.exports=String(h)==="[object z]"},{"../internals/well-known-symbol":268}],256:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/classof"),h=p.String;M.exports=function(y){if(f(y)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return h(y)}},{"../internals/classof":124,"../internals/global":163}],257:[function(o,M,R){var p=o("../internals/global"),f=p.String;M.exports=function(h){try{return f(h)}catch(y){return"Object"}}},{"../internals/global":163}],258:[function(o,M,R){"use strict";var p=o("../internals/export"),f=o("../internals/global"),h=o("../internals/function-call"),y=o("../internals/descriptors"),g=o("../internals/typed-array-constructors-require-wrappers"),w=o("../internals/array-buffer-view-core"),c=o("../internals/array-buffer"),m=o("../internals/an-instance"),v=o("../internals/create-property-descriptor"),b=o("../internals/create-non-enumerable-property"),x=o("../internals/is-integral-number"),T=o("../internals/to-length"),S=o("../internals/to-index"),C=o("../internals/to-offset"),E=o("../internals/to-property-key"),j=o("../internals/has-own-property"),Z=o("../internals/classof"),P=o("../internals/is-object"),Q=o("../internals/is-symbol"),B=o("../internals/object-create"),k=o("../internals/object-is-prototype-of"),D=o("../internals/object-set-prototype-of"),F=o("../internals/object-get-own-property-names").f,J=o("../internals/typed-array-from"),H=o("../internals/array-iteration").forEach,N=o("../internals/set-species"),_=o("../internals/object-define-property"),X=o("../internals/object-get-own-property-descriptor"),ee=o("../internals/internal-state"),ie=o("../internals/inherit-if-required"),he=ee.get,ne=ee.set,Ie=_.f,q=X.f,pe=Math.round,ve=f.RangeError,xe=c.ArrayBuffer,ce=xe.prototype,fe=c.DataView,ge=w.NATIVE_ARRAY_BUFFER_VIEWS,Se=w.TYPED_ARRAY_CONSTRUCTOR,De=w.TYPED_ARRAY_TAG,ke=w.TypedArray,de=w.TypedArrayPrototype,Y=w.aTypedArrayConstructor,ye=w.isTypedArray,V="BYTES_PER_ELEMENT",G="Wrong length",W=function(ue,Ee){Y(ue);for(var ze=0,_e=Ee.length,le=new ue(_e);_e>ze;)le[ze]=Ee[ze++];return le},K=function(ue,Ee){Ie(ue,Ee,{get:function(){return he(this)[Ee]}})},te=function(ue){var Ee;return k(ce,ue)||(Ee=Z(ue))=="ArrayBuffer"||Ee=="SharedArrayBuffer"},U=function(ue,Ee){return ye(ue)&&!Q(Ee)&&Ee in ue&&x(+Ee)&&Ee>=0},L=function(Ee,ze){return ze=E(ze),U(Ee,ze)?v(2,Ee[ze]):q(Ee,ze)},$=function(Ee,ze,_e){return ze=E(ze),U(Ee,ze)&&P(_e)&&j(_e,"value")&&!j(_e,"get")&&!j(_e,"set")&&!_e.configurable&&(!j(_e,"writable")||_e.writable)&&(!j(_e,"enumerable")||_e.enumerable)?(Ee[ze]=_e.value,Ee):Ie(Ee,ze,_e)};y?(ge||(X.f=L,_.f=$,K(de,"buffer"),K(de,"byteOffset"),K(de,"byteLength"),K(de,"length")),p({target:"Object",stat:!0,forced:!ge},{getOwnPropertyDescriptor:L,defineProperty:$}),M.exports=function(ue,Ee,ze){var _e=ue.match(/\d+$/)[0]/8,le=ue+(ze?"Clamped":"")+"Array",Re="get"+ue,Me="set"+ue,He=f[le],Be=He,Je=Be&&Be.prototype,$e={},rt=function(Pe,Qe){var nt=he(Pe);return nt.view[Re](Qe*_e+nt.byteOffset,!0)},qe=function(Pe,Qe,nt){var yt=he(Pe);ze&&(nt=(nt=pe(nt))<0?0:nt>255?255:nt&255),yt.view[Me](Qe*_e+yt.byteOffset,nt,!0)},pt=function(Pe,Qe){Ie(Pe,Qe,{get:function(){return rt(this,Qe)},set:function(nt){return qe(this,Qe,nt)},enumerable:!0})};ge?g&&(Be=Ee(function(Pe,Qe,nt,yt){return m(Pe,Je),ie(function(){return P(Qe)?te(Qe)?yt!==void 0?new He(Qe,C(nt,_e),yt):nt!==void 0?new He(Qe,C(nt,_e)):new He(Qe):ye(Qe)?W(Be,Qe):h(J,Be,Qe):new He(S(Qe))}(),Pe,Be)}),D&&D(Be,ke),H(F(He),function(Pe){Pe in Be||b(Be,Pe,He[Pe])}),Be.prototype=Je):(Be=Ee(function(Pe,Qe,nt,yt){m(Pe,Je);var St=0,Lt=0,jt,Dt,Ct;if(!P(Qe))Ct=S(Qe),Dt=Ct*_e,jt=new xe(Dt);else if(te(Qe)){jt=Qe,Lt=C(nt,_e);var Mt=Qe.byteLength;if(yt===void 0){if(Mt%_e||(Dt=Mt-Lt,Dt<0))throw ve(G)}else if(Dt=T(yt)*_e,Dt+Lt>Mt)throw ve(G);Ct=Dt/_e}else return ye(Qe)?W(Be,Qe):h(J,Be,Qe);for(ne(Pe,{buffer:jt,byteOffset:Lt,byteLength:Dt,length:Ct,view:new fe(jt)});St<Ct;)pt(Pe,St++)}),D&&D(Be,ke),Je=Be.prototype=B(de)),Je.constructor!==Be&&b(Je,"constructor",Be),b(Je,Se,Be),De&&b(Je,De,le),$e[le]=Be,p({global:!0,forced:Be!=He,sham:!ge},$e),V in Be||b(Be,V,_e),V in Je||b(Je,V,_e),N(le)}):M.exports=function(){}},{"../internals/an-instance":100,"../internals/array-buffer":104,"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/classof":124,"../internals/create-non-enumerable-property":129,"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/export":149,"../internals/function-call":155,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/internal-state":173,"../internals/is-integral-number":179,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/object-create":196,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/object-set-prototype-of":208,"../internals/set-species":233,"../internals/to-index":246,"../internals/to-length":249,"../internals/to-offset":251,"../internals/to-property-key":254,"../internals/typed-array-constructors-require-wrappers":259,"../internals/typed-array-from":261}],259:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/fails"),h=o("../internals/check-correctness-of-iteration"),y=o("../internals/array-buffer-view-core").NATIVE_ARRAY_BUFFER_VIEWS,g=p.ArrayBuffer,w=p.Int8Array;M.exports=!y||!f(function(){w(1)})||!f(function(){new w(-1)})||!h(function(c){new w,new w(null),new w(1.5),new w(c)},!0)||f(function(){return new w(new g(2),1,void 0).length!==1})},{"../internals/array-buffer-view-core":103,"../internals/check-correctness-of-iteration":122,"../internals/fails":150,"../internals/global":163}],260:[function(o,M,R){var p=o("../internals/array-from-constructor-and-list"),f=o("../internals/typed-array-species-constructor");M.exports=function(h,y){return p(f(h),y)}},{"../internals/array-from-constructor-and-list":108,"../internals/typed-array-species-constructor":262}],261:[function(o,M,R){var p=o("../internals/function-bind-context"),f=o("../internals/function-call"),h=o("../internals/a-constructor"),y=o("../internals/to-object"),g=o("../internals/length-of-array-like"),w=o("../internals/get-iterator"),c=o("../internals/get-iterator-method"),m=o("../internals/is-array-iterator-method"),v=o("../internals/array-buffer-view-core").aTypedArrayConstructor;M.exports=function(x){var T=h(this),S=y(x),C=arguments.length,E=C>1?arguments[1]:void 0,j=E!==void 0,Z=c(S),P,Q,B,k,D,F;if(Z&&!m(Z))for(D=w(S,Z),F=D.next,S=[];!(k=f(F,D)).done;)S.push(k.value);for(j&&C>2&&(E=p(E,arguments[2])),Q=g(S),B=new(v(T))(Q),P=0;Q>P;P++)B[P]=j?E(S[P],P):S[P];return B}},{"../internals/a-constructor":96,"../internals/array-buffer-view-core":103,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/is-array-iterator-method":174,"../internals/length-of-array-like":188,"../internals/to-object":250}],262:[function(o,M,R){var p=o("../internals/array-buffer-view-core"),f=o("../internals/species-constructor"),h=p.TYPED_ARRAY_CONSTRUCTOR,y=p.aTypedArrayConstructor;M.exports=function(g){return y(f(g,g[h]))}},{"../internals/array-buffer-view-core":103,"../internals/species-constructor":238}],263:[function(o,M,R){var p=o("../internals/function-uncurry-this"),f=0,h=Math.random(),y=p(1 .toString);M.exports=function(g){return"Symbol("+(g===void 0?"":g)+")_"+y(++f+h,36)}},{"../internals/function-uncurry-this":157}],264:[function(o,M,R){var p=o("../internals/native-symbol");M.exports=p&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},{"../internals/native-symbol":191}],265:[function(o,M,R){var p=o("../internals/descriptors"),f=o("../internals/fails");M.exports=p&&f(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})},{"../internals/descriptors":134,"../internals/fails":150}],266:[function(o,M,R){var p=o("../internals/global"),f=p.TypeError;M.exports=function(h,y){if(h<y)throw f("Not enough arguments");return h}},{"../internals/global":163}],267:[function(o,M,R){var p=o("../internals/well-known-symbol");R.f=p},{"../internals/well-known-symbol":268}],268:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/shared"),h=o("../internals/has-own-property"),y=o("../internals/uid"),g=o("../internals/native-symbol"),w=o("../internals/use-symbol-as-uid"),c=f("wks"),m=p.Symbol,v=m&&m.for,b=w?m:m&&m.withoutSetter||y;M.exports=function(x){if(!h(c,x)||!(g||typeof c[x]=="string")){var T="Symbol."+x;g&&h(m,x)?c[x]=m[x]:w&&v?c[x]=v(T):c[x]=b(T)}return c[x]}},{"../internals/global":163,"../internals/has-own-property":164,"../internals/native-symbol":191,"../internals/shared":237,"../internals/uid":263,"../internals/use-symbol-as-uid":264}],269:[function(o,M,R){M.exports=`
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`},{}],270:[function(o,M,R){"use strict";var p=o("../internals/export"),f=o("../internals/global"),h=o("../internals/array-buffer"),y=o("../internals/set-species"),g="ArrayBuffer",w=h[g],c=f[g];p({global:!0,forced:c!==w},{ArrayBuffer:w}),y(g)},{"../internals/array-buffer":104,"../internals/export":149,"../internals/global":163,"../internals/set-species":233}],271:[function(o,M,R){"use strict";var p=o("../internals/export"),f=o("../internals/function-uncurry-this"),h=o("../internals/fails"),y=o("../internals/array-buffer"),g=o("../internals/an-object"),w=o("../internals/to-absolute-index"),c=o("../internals/to-length"),m=o("../internals/species-constructor"),v=y.ArrayBuffer,b=y.DataView,x=b.prototype,T=f(v.prototype.slice),S=f(x.getUint8),C=f(x.setUint8),E=h(function(){return!new v(2).slice(1,void 0).byteLength});p({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:E},{slice:function(Z,P){if(T&&P===void 0)return T(g(this),Z);for(var Q=g(this).byteLength,B=w(Z,Q),k=w(P===void 0?Q:P,Q),D=new(m(this,v))(c(k-B)),F=new b(this),J=new b(D),H=0;B<k;)C(J,H++,S(F,B++));return D}})},{"../internals/an-object":101,"../internals/array-buffer":104,"../internals/export":149,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/species-constructor":238,"../internals/to-absolute-index":245,"../internals/to-length":249}],272:[function(o,M,R){"use strict";var p=o("../internals/export"),f=o("../internals/global"),h=o("../internals/fails"),y=o("../internals/is-array"),g=o("../internals/is-object"),w=o("../internals/to-object"),c=o("../internals/length-of-array-like"),m=o("../internals/create-property"),v=o("../internals/array-species-create"),b=o("../internals/array-method-has-species-support"),x=o("../internals/well-known-symbol"),T=o("../internals/engine-v8-version"),S=x("isConcatSpreadable"),C=9007199254740991,E="Maximum allowed index exceeded",j=f.TypeError,Z=T>=51||!h(function(){var k=[];return k[S]=!1,k.concat()[0]!==k}),P=b("concat"),Q=function(k){if(!g(k))return!1;var D=k[S];return D!==void 0?!!D:y(k)},B=!Z||!P;p({target:"Array",proto:!0,forced:B},{concat:function(D){var F=w(this),J=v(F,0),H=0,N,_,X,ee,ie;for(N=-1,X=arguments.length;N<X;N++)if(ie=N===-1?F:arguments[N],Q(ie)){if(ee=c(ie),H+ee>C)throw j(E);for(_=0;_<ee;_++,H++)_ in ie&&m(J,H,ie[_])}else{if(H>=C)throw j(E);m(J,H++,ie)}return J.length=H,J}})},{"../internals/array-method-has-species-support":113,"../internals/array-species-create":120,"../internals/create-property":131,"../internals/engine-v8-version":146,"../internals/export":149,"../internals/fails":150,"../internals/global":163,"../internals/is-array":175,"../internals/is-object":180,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/well-known-symbol":268}],273:[function(o,M,R){var p=o("../internals/export"),f=o("../internals/array-fill"),h=o("../internals/add-to-unscopables");p({target:"Array",proto:!0},{fill:f}),h("fill")},{"../internals/add-to-unscopables":98,"../internals/array-fill":106,"../internals/export":149}],274:[function(o,M,R){"use strict";var p=o("../internals/export"),f=o("../internals/array-iteration").filter,h=o("../internals/array-method-has-species-support"),y=h("filter");p({target:"Array",proto:!0,forced:!y},{filter:function(w){return f(this,w,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],275:[function(o,M,R){"use strict";var p=o("../internals/export"),f=o("../internals/array-iteration").find,h=o("../internals/add-to-unscopables"),y="find",g=!0;y in[]&&Array(1)[y](function(){g=!1}),p({target:"Array",proto:!0,forced:g},{find:function(c){return f(this,c,arguments.length>1?arguments[1]:void 0)}}),h(y)},{"../internals/add-to-unscopables":98,"../internals/array-iteration":111,"../internals/export":149}],276:[function(o,M,R){var p=o("../internals/export"),f=o("../internals/array-from"),h=o("../internals/check-correctness-of-iteration"),y=!h(function(g){Array.from(g)});p({target:"Array",stat:!0,forced:y},{from:f})},{"../internals/array-from":109,"../internals/check-correctness-of-iteration":122,"../internals/export":149}],277:[function(o,M,R){"use strict";var p=o("../internals/export"),f=o("../internals/array-includes").includes,h=o("../internals/add-to-unscopables");p({target:"Array",proto:!0},{includes:function(g){return f(this,g,arguments.length>1?arguments[1]:void 0)}}),h("includes")},{"../internals/add-to-unscopables":98,"../internals/array-includes":110,"../internals/export":149}],278:[function(o,M,R){"use strict";var p=o("../internals/to-indexed-object"),f=o("../internals/add-to-unscopables"),h=o("../internals/iterators"),y=o("../internals/internal-state"),g=o("../internals/object-define-property").f,w=o("../internals/define-iterator"),c=o("../internals/is-pure"),m=o("../internals/descriptors"),v="Array Iterator",b=y.set,x=y.getterFor(v);M.exports=w(Array,"Array",function(S,C){b(this,{type:v,target:p(S),index:0,kind:C})},function(){var S=x(this),C=S.target,E=S.kind,j=S.index++;return!C||j>=C.length?(S.target=void 0,{value:void 0,done:!0}):E=="keys"?{value:j,done:!1}:E=="values"?{value:C[j],done:!1}:{value:[j,C[j]],done:!1}},"values");var T=h.Arguments=h.Array;if(f("keys"),f("values"),f("entries"),!c&&m&&T.name!=="values")try{g(T,"name",{value:"values"})}catch(S){}},{"../internals/add-to-unscopables":98,"../internals/define-iterator":132,"../internals/descriptors":134,"../internals/internal-state":173,"../internals/is-pure":181,"../internals/iterators":187,"../internals/object-define-property":198,"../internals/to-indexed-object":247}],279:[function(o,M,R){"use strict";var p=o("../internals/export"),f=o("../internals/function-uncurry-this"),h=o("../internals/indexed-object"),y=o("../internals/to-indexed-object"),g=o("../internals/array-method-is-strict"),w=f([].join),c=h!=Object,m=g("join",",");p({target:"Array",proto:!0,forced:c||!m},{join:function(b){return w(y(this),b===void 0?",":b)}})},{"../internals/array-method-is-strict":114,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/to-indexed-object":247}],280:[function(o,M,R){"use strict";var p=o("../internals/export"),f=o("../internals/array-iteration").map,h=o("../internals/array-method-has-species-support"),y=h("map");p({target:"Array",proto:!0,forced:!y},{map:function(w){return f(this,w,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],281:[function(o,M,R){"use strict";var p=o("../internals/export"),f=o("../internals/global"),h=o("../internals/is-array"),y=o("../internals/is-constructor"),g=o("../internals/is-object"),w=o("../internals/to-absolute-index"),c=o("../internals/length-of-array-like"),m=o("../internals/to-indexed-object"),v=o("../internals/create-property"),b=o("../internals/well-known-symbol"),x=o("../internals/array-method-has-species-support"),T=o("../internals/array-slice"),S=x("slice"),C=b("species"),E=f.Array,j=Math.max;p({target:"Array",proto:!0,forced:!S},{slice:function(P,Q){var B=m(this),k=c(B),D=w(P,k),F=w(Q===void 0?k:Q,k),J,H,N;if(h(B)&&(J=B.constructor,y(J)&&(J===E||h(J.prototype))?J=void 0:g(J)&&(J=J[C],J===null&&(J=void 0)),J===E||J===void 0))return T(B,D,F);for(H=new(J===void 0?E:J)(j(F-D,0)),N=0;D<F;D++,N++)D in B&&v(H,N,B[D]);return H.length=N,H}})},{"../internals/array-method-has-species-support":113,"../internals/array-slice":117,"../internals/create-property":131,"../internals/export":149,"../internals/global":163,"../internals/is-array":175,"../internals/is-constructor":177,"../internals/is-object":180,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-indexed-object":247,"../internals/well-known-symbol":268}],282:[function(o,M,R){"use strict";var p=o("../internals/export"),f=o("../internals/function-uncurry-this"),h=o("../internals/a-callable"),y=o("../internals/to-object"),g=o("../internals/length-of-array-like"),w=o("../internals/to-string"),c=o("../internals/fails"),m=o("../internals/array-sort"),v=o("../internals/array-method-is-strict"),b=o("../internals/engine-ff-version"),x=o("../internals/engine-is-ie-or-edge"),T=o("../internals/engine-v8-version"),S=o("../internals/engine-webkit-version"),C=[],E=f(C.sort),j=f(C.push),Z=c(function(){C.sort(void 0)}),P=c(function(){C.sort(null)}),Q=v("sort"),B=!c(function(){if(T)return T<70;if(!(b&&b>3)){if(x)return!0;if(S)return S<603;var F="",J,H,N,_;for(J=65;J<76;J++){switch(H=String.fromCharCode(J),J){case 66:case 69:case 70:case 72:N=3;break;case 68:case 71:N=4;break;default:N=2}for(_=0;_<47;_++)C.push({k:H+_,v:N})}for(C.sort(function(X,ee){return ee.v-X.v}),_=0;_<C.length;_++)H=C[_].k.charAt(0),F.charAt(F.length-1)!==H&&(F+=H);return F!=="DGBEFHACIJK"}}),k=Z||!P||!Q||!B,D=function(F){return function(J,H){return H===void 0?-1:J===void 0?1:F!==void 0?+F(J,H)||0:w(J)>w(H)?1:-1}};p({target:"Array",proto:!0,forced:k},{sort:function(J){J!==void 0&&h(J);var H=y(this);if(B)return J===void 0?E(H):E(H,J);var N=[],_=g(H),X,ee;for(ee=0;ee<_;ee++)ee in H&&j(N,H[ee]);for(m(N,D(J)),X=N.length,ee=0;ee<X;)H[ee]=N[ee++];for(;ee<_;)delete H[ee++];return H}})},{"../internals/a-callable":95,"../internals/array-method-is-strict":114,"../internals/array-sort":118,"../internals/engine-ff-version":138,"../internals/engine-is-ie-or-edge":140,"../internals/engine-v8-version":146,"../internals/engine-webkit-version":147,"../internals/export":149,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/to-string":256}],283:[function(o,M,R){"use strict";var p=o("../internals/export"),f=o("../internals/global"),h=o("../internals/to-absolute-index"),y=o("../internals/to-integer-or-infinity"),g=o("../internals/length-of-array-like"),w=o("../internals/to-object"),c=o("../internals/array-species-create"),m=o("../internals/create-property"),v=o("../internals/array-method-has-species-support"),b=v("splice"),x=f.TypeError,T=Math.max,S=Math.min,C=9007199254740991,E="Maximum allowed length exceeded";p({target:"Array",proto:!0,forced:!b},{splice:function(Z,P){var Q=w(this),B=g(Q),k=h(Z,B),D=arguments.length,F,J,H,N,_,X;if(D===0?F=J=0:D===1?(F=0,J=B-k):(F=D-2,J=S(T(y(P),0),B-k)),B+F-J>C)throw x(E);for(H=c(Q,J),N=0;N<J;N++)_=k+N,_ in Q&&m(H,N,Q[_]);if(H.length=J,F<J){for(N=k;N<B-J;N++)_=N+J,X=N+F,_ in Q?Q[X]=Q[_]:delete Q[X];for(N=B;N>B-J+F;N--)delete Q[N-1]}else if(F>J)for(N=B-J;N>k;N--)_=N+J-1,X=N+F-1,_ in Q?Q[X]=Q[_]:delete Q[X];for(N=0;N<F;N++)Q[N+k]=arguments[N+2];return Q.length=B-J+F,H}})},{"../internals/array-method-has-species-support":113,"../internals/array-species-create":120,"../internals/create-property":131,"../internals/export":149,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-integer-or-infinity":248,"../internals/to-object":250}],284:[function(o,M,R){var p=o("../internals/descriptors"),f=o("../internals/function-name").EXISTS,h=o("../internals/function-uncurry-this"),y=o("../internals/object-define-property").f,g=Function.prototype,w=h(g.toString),c=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,m=h(c.exec),v="name";p&&!f&&y(g,v,{configurable:!0,get:function(){try{return m(c,w(this))[1]}catch(b){return""}}})},{"../internals/descriptors":134,"../internals/function-name":156,"../internals/function-uncurry-this":157,"../internals/object-define-property":198}],285:[function(o,M,R){var p=o("../internals/export"),f=o("../internals/get-built-in"),h=o("../internals/function-apply"),y=o("../internals/function-call"),g=o("../internals/function-uncurry-this"),w=o("../internals/fails"),c=o("../internals/is-array"),m=o("../internals/is-callable"),v=o("../internals/is-object"),b=o("../internals/is-symbol"),x=o("../internals/array-slice"),T=o("../internals/native-symbol"),S=f("JSON","stringify"),C=g(/./.exec),E=g("".charAt),j=g("".charCodeAt),Z=g("".replace),P=g(1 .toString),Q=/[\uD800-\uDFFF]/g,B=/^[\uD800-\uDBFF]$/,k=/^[\uDC00-\uDFFF]$/,D=!T||w(function(){var N=f("Symbol")();return S([N])!="[null]"||S({a:N})!="{}"||S(Object(N))!="{}"}),F=w(function(){return S("\uDF06\uD834")!=='"\\udf06\\ud834"'||S("\uDEAD")!=='"\\udead"'}),J=function(N,_){var X=x(arguments),ee=_;if(!(!v(_)&&N===void 0||b(N)))return c(_)||(_=function(ie,he){if(m(ee)&&(he=y(ee,this,ie,he)),!b(he))return he}),X[1]=_,h(S,null,X)},H=function(N,_,X){var ee=E(X,_-1),ie=E(X,_+1);return C(B,N)&&!C(k,ie)||C(k,N)&&!C(B,ee)?"\\u"+P(j(N,0),16):N};S&&p({target:"JSON",stat:!0,forced:D||F},{stringify:function(_,X,ee){var ie=x(arguments),he=h(D?J:S,null,ie);return F&&typeof he=="string"?Z(he,Q,H):he}})},{"../internals/array-slice":117,"../internals/export":149,"../internals/fails":150,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/is-array":175,"../internals/is-callable":176,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/native-symbol":191}],286:[function(o,M,R){"use strict";var p=o("../internals/descriptors"),f=o("../internals/global"),h=o("../internals/function-uncurry-this"),y=o("../internals/is-forced"),g=o("../internals/redefine"),w=o("../internals/has-own-property"),c=o("../internals/inherit-if-required"),m=o("../internals/object-is-prototype-of"),v=o("../internals/is-symbol"),b=o("../internals/to-primitive"),x=o("../internals/fails"),T=o("../internals/object-get-own-property-names").f,S=o("../internals/object-get-own-property-descriptor").f,C=o("../internals/object-define-property").f,E=o("../internals/this-number-value"),j=o("../internals/string-trim").trim,Z="Number",P=f[Z],Q=P.prototype,B=f.TypeError,k=h("".slice),D=h("".charCodeAt),F=function(ee){var ie=b(ee,"number");return typeof ie=="bigint"?ie:J(ie)},J=function(ee){var ie=b(ee,"number"),he,ne,Ie,q,pe,ve,xe,ce;if(v(ie))throw B("Cannot convert a Symbol value to a number");if(typeof ie=="string"&&ie.length>2){if(ie=j(ie),he=D(ie,0),he===43||he===45){if(ne=D(ie,2),ne===88||ne===120)return NaN}else if(he===48){switch(D(ie,1)){case 66:case 98:Ie=2,q=49;break;case 79:case 111:Ie=8,q=55;break;default:return+ie}for(pe=k(ie,2),ve=pe.length,xe=0;xe<ve;xe++)if(ce=D(pe,xe),ce<48||ce>q)return NaN;return parseInt(pe,Ie)}}return+ie};if(y(Z,!P(" 0o1")||!P("0b1")||P("+0x1"))){for(var H=function(ie){var he=arguments.length<1?0:P(F(ie)),ne=this;return m(Q,ne)&&x(function(){E(ne)})?c(Object(he),ne,H):he},N=p?T(P):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),_=0,X;N.length>_;_++)w(P,X=N[_])&&!w(H,X)&&C(H,X,S(P,X));H.prototype=Q,Q.constructor=H,g(f,Z,H)}},{"../internals/descriptors":134,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/is-forced":178,"../internals/is-symbol":183,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/redefine":222,"../internals/string-trim":241,"../internals/this-number-value":244,"../internals/to-primitive":253}],287:[function(o,M,R){var p=o("../internals/export"),f=o("../internals/object-assign");p({target:"Object",stat:!0,forced:Object.assign!==f},{assign:f})},{"../internals/export":149,"../internals/object-assign":195}],288:[function(o,M,R){var p=o("../internals/export"),f=o("../internals/object-to-array").entries;p({target:"Object",stat:!0},{entries:function(y){return f(y)}})},{"../internals/export":149,"../internals/object-to-array":209}],289:[function(o,M,R){var p=o("../internals/export"),f=o("../internals/native-symbol"),h=o("../internals/fails"),y=o("../internals/object-get-own-property-symbols"),g=o("../internals/to-object"),w=!f||h(function(){y.f(1)});p({target:"Object",stat:!0,forced:w},{getOwnPropertySymbols:function(m){var v=y.f;return v?v(g(m)):[]}})},{"../internals/export":149,"../internals/fails":150,"../internals/native-symbol":191,"../internals/object-get-own-property-symbols":202,"../internals/to-object":250}],290:[function(o,M,R){var p=o("../internals/export"),f=o("../internals/to-object"),h=o("../internals/object-keys"),y=o("../internals/fails"),g=y(function(){h(1)});p({target:"Object",stat:!0,forced:g},{keys:function(c){return h(f(c))}})},{"../internals/export":149,"../internals/fails":150,"../internals/object-keys":206,"../internals/to-object":250}],291:[function(o,M,R){var p=o("../internals/to-string-tag-support"),f=o("../internals/redefine"),h=o("../internals/object-to-string");p||f(Object.prototype,"toString",h,{unsafe:!0})},{"../internals/object-to-string":210,"../internals/redefine":222,"../internals/to-string-tag-support":255}],292:[function(o,M,R){"use strict";var p=o("../internals/export"),f=o("../internals/function-call"),h=o("../internals/a-callable"),y=o("../internals/new-promise-capability"),g=o("../internals/perform"),w=o("../internals/iterate"),c=o("../internals/promise-statics-incorrect-iteration");p({target:"Promise",stat:!0,forced:c},{all:function(v){var b=this,x=y.f(b),T=x.resolve,S=x.reject,C=g(function(){var E=h(b.resolve),j=[],Z=0,P=1;w(v,function(Q){var B=Z++,k=!1;P++,f(E,b,Q).then(function(D){k||(k=!0,j[B]=D,--P||T(j))},S)}),--P||T(j)});return C.error&&S(C.value),x.promise}})},{"../internals/a-callable":95,"../internals/export":149,"../internals/function-call":155,"../internals/iterate":184,"../internals/new-promise-capability":193,"../internals/perform":214,"../internals/promise-statics-incorrect-iteration":218}],293:[function(o,M,R){"use strict";var p=o("../internals/export"),f=o("../internals/is-pure"),h=o("../internals/promise-constructor-detection").CONSTRUCTOR,y=o("../internals/promise-native-constructor"),g=o("../internals/get-built-in"),w=o("../internals/is-callable"),c=o("../internals/redefine"),m=y&&y.prototype;if(p({target:"Promise",proto:!0,forced:h,real:!0},{catch:function(b){return this.then(void 0,b)}}),!f&&w(y)){var v=g("Promise").prototype.catch;m.catch!==v&&c(m,"catch",v,{unsafe:!0})}},{"../internals/export":149,"../internals/get-built-in":158,"../internals/is-callable":176,"../internals/is-pure":181,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/redefine":222}],294:[function(o,M,R){"use strict";var p=o("../internals/export"),f=o("../internals/is-pure"),h=o("../internals/engine-is-node"),y=o("../internals/global"),g=o("../internals/function-call"),w=o("../internals/redefine"),c=o("../internals/redefine-all"),m=o("../internals/object-set-prototype-of"),v=o("../internals/set-to-string-tag"),b=o("../internals/set-species"),x=o("../internals/a-callable"),T=o("../internals/is-callable"),S=o("../internals/is-object"),C=o("../internals/an-instance"),E=o("../internals/species-constructor"),j=o("../internals/task").set,Z=o("../internals/microtask"),P=o("../internals/host-report-errors"),Q=o("../internals/perform"),B=o("../internals/queue"),k=o("../internals/internal-state"),D=o("../internals/promise-native-constructor"),F=o("../internals/promise-constructor-detection"),J=o("../internals/new-promise-capability"),H="Promise",N=F.CONSTRUCTOR,_=F.REJECTION_EVENT,X=F.SUBCLASSING,ee=k.getterFor(H),ie=k.set,he=D&&D.prototype,ne=D,Ie=he,q=y.TypeError,pe=y.document,ve=y.process,xe=J.f,ce=xe,fe=!!(pe&&pe.createEvent&&y.dispatchEvent),ge="unhandledrejection",Se="rejectionhandled",De=0,ke=1,de=2,Y=1,ye=2,V,G,W,K,te=function(Me){var He;return S(Me)&&T(He=Me.then)?He:!1},U=function(Me,He){var Be=He.value,Je=He.state==ke,$e=Je?Me.ok:Me.fail,rt=Me.resolve,qe=Me.reject,pt=Me.domain,Pe,Qe,nt;try{$e?(Je||(He.rejection===ye&&ze(He),He.rejection=Y),$e===!0?Pe=Be:(pt&&pt.enter(),Pe=$e(Be),pt&&(pt.exit(),nt=!0)),Pe===Me.promise?qe(q("Promise-chain cycle")):(Qe=te(Pe))?g(Qe,Pe,rt,qe):rt(Pe)):qe(Be)}catch(yt){pt&&!nt&&pt.exit(),qe(yt)}},L=function(Me,He){Me.notified||(Me.notified=!0,Z(function(){for(var Be=Me.reactions,Je;Je=Be.get();)U(Je,Me);Me.notified=!1,He&&!Me.rejection&&ue(Me)}))},$=function(Me,He,Be){var Je,$e;fe?(Je=pe.createEvent("Event"),Je.promise=He,Je.reason=Be,Je.initEvent(Me,!1,!0),y.dispatchEvent(Je)):Je={promise:He,reason:Be},!_&&($e=y["on"+Me])?$e(Je):Me===ge&&P("Unhandled promise rejection",Be)},ue=function(Me){g(j,y,function(){var He=Me.facade,Be=Me.value,Je=Ee(Me),$e;if(Je&&($e=Q(function(){h?ve.emit("unhandledRejection",Be,He):$(ge,He,Be)}),Me.rejection=h||Ee(Me)?ye:Y,$e.error))throw $e.value})},Ee=function(Me){return Me.rejection!==Y&&!Me.parent},ze=function(Me){g(j,y,function(){var He=Me.facade;h?ve.emit("rejectionHandled",He):$(Se,He,Me.value)})},_e=function(Me,He,Be){return function(Je){Me(He,Je,Be)}},le=function(Me,He,Be){Me.done||(Me.done=!0,Be&&(Me=Be),Me.value=He,Me.state=de,L(Me,!0))},Re=function(Me,He,Be){if(!Me.done){Me.done=!0,Be&&(Me=Be);try{if(Me.facade===He)throw q("Promise can't be resolved itself");var Je=te(He);Je?Z(function(){var $e={done:!1};try{g(Je,He,_e(Re,$e,Me),_e(le,$e,Me))}catch(rt){le($e,rt,Me)}}):(Me.value=He,Me.state=ke,L(Me,!1))}catch($e){le({done:!1},$e,Me)}}};if(N&&(ne=function(He){C(this,Ie),x(He),g(V,this);var Be=ee(this);try{He(_e(Re,Be),_e(le,Be))}catch(Je){le(Be,Je)}},Ie=ne.prototype,V=function(He){ie(this,{type:H,done:!1,notified:!1,parent:!1,reactions:new B,rejection:!1,state:De,value:void 0})},V.prototype=c(Ie,{then:function(He,Be){var Je=ee(this),$e=xe(E(this,ne));return Je.parent=!0,$e.ok=T(He)?He:!0,$e.fail=T(Be)&&Be,$e.domain=h?ve.domain:void 0,Je.state==De?Je.reactions.add($e):Z(function(){U($e,Je)}),$e.promise}}),G=function(){var Me=new V,He=ee(Me);this.promise=Me,this.resolve=_e(Re,He),this.reject=_e(le,He)},J.f=xe=function(Me){return Me===ne||Me===W?new G(Me):ce(Me)},!f&&T(D)&&he!==Object.prototype)){K=he.then,X||w(he,"then",function(He,Be){var Je=this;return new ne(function($e,rt){g(K,Je,$e,rt)}).then(He,Be)},{unsafe:!0});try{delete he.constructor}catch(Me){}m&&m(he,Ie)}p({global:!0,wrap:!0,forced:N},{Promise:ne}),v(ne,H,!1,!0),b(H)},{"../internals/a-callable":95,"../internals/an-instance":100,"../internals/engine-is-node":143,"../internals/export":149,"../internals/function-call":155,"../internals/global":163,"../internals/host-report-errors":166,"../internals/internal-state":173,"../internals/is-callable":176,"../internals/is-object":180,"../internals/is-pure":181,"../internals/microtask":189,"../internals/new-promise-capability":193,"../internals/object-set-prototype-of":208,"../internals/perform":214,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/queue":220,"../internals/redefine":222,"../internals/redefine-all":221,"../internals/set-species":233,"../internals/set-to-string-tag":234,"../internals/species-constructor":238,"../internals/task":243}],295:[function(o,M,R){o("../modules/es.promise.constructor"),o("../modules/es.promise.all"),o("../modules/es.promise.catch"),o("../modules/es.promise.race"),o("../modules/es.promise.reject"),o("../modules/es.promise.resolve")},{"../modules/es.promise.all":292,"../modules/es.promise.catch":293,"../modules/es.promise.constructor":294,"../modules/es.promise.race":296,"../modules/es.promise.reject":297,"../modules/es.promise.resolve":298}],296:[function(o,M,R){"use strict";var p=o("../internals/export"),f=o("../internals/function-call"),h=o("../internals/a-callable"),y=o("../internals/new-promise-capability"),g=o("../internals/perform"),w=o("../internals/iterate"),c=o("../internals/promise-statics-incorrect-iteration");p({target:"Promise",stat:!0,forced:c},{race:function(v){var b=this,x=y.f(b),T=x.reject,S=g(function(){var C=h(b.resolve);w(v,function(E){f(C,b,E).then(x.resolve,T)})});return S.error&&T(S.value),x.promise}})},{"../internals/a-callable":95,"../internals/export":149,"../internals/function-call":155,"../internals/iterate":184,"../internals/new-promise-capability":193,"../internals/perform":214,"../internals/promise-statics-incorrect-iteration":218}],297:[function(o,M,R){"use strict";var p=o("../internals/export"),f=o("../internals/function-call"),h=o("../internals/new-promise-capability"),y=o("../internals/promise-constructor-detection").CONSTRUCTOR;p({target:"Promise",stat:!0,forced:y},{reject:function(w){var c=h.f(this);return f(c.reject,void 0,w),c.promise}})},{"../internals/export":149,"../internals/function-call":155,"../internals/new-promise-capability":193,"../internals/promise-constructor-detection":215}],298:[function(o,M,R){"use strict";var p=o("../internals/export"),f=o("../internals/get-built-in"),h=o("../internals/is-pure"),y=o("../internals/promise-native-constructor"),g=o("../internals/promise-constructor-detection").CONSTRUCTOR,w=o("../internals/promise-resolve"),c=f("Promise"),m=h&&!g;p({target:"Promise",stat:!0,forced:h||g},{resolve:function(b){return w(m&&this===c?y:this,b)}})},{"../internals/export":149,"../internals/get-built-in":158,"../internals/is-pure":181,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/promise-resolve":217}],299:[function(o,M,R){var p=o("../internals/descriptors"),f=o("../internals/global"),h=o("../internals/function-uncurry-this"),y=o("../internals/is-forced"),g=o("../internals/inherit-if-required"),w=o("../internals/create-non-enumerable-property"),c=o("../internals/object-get-own-property-names").f,m=o("../internals/object-is-prototype-of"),v=o("../internals/is-regexp"),b=o("../internals/to-string"),x=o("../internals/regexp-get-flags"),T=o("../internals/regexp-sticky-helpers"),S=o("../internals/proxy-accessor"),C=o("../internals/redefine"),E=o("../internals/fails"),j=o("../internals/has-own-property"),Z=o("../internals/internal-state").enforce,P=o("../internals/set-species"),Q=o("../internals/well-known-symbol"),B=o("../internals/regexp-unsupported-dot-all"),k=o("../internals/regexp-unsupported-ncg"),D=Q("match"),F=f.RegExp,J=F.prototype,H=f.SyntaxError,N=h(J.exec),_=h("".charAt),X=h("".replace),ee=h("".indexOf),ie=h("".slice),he=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,ne=/a/g,Ie=/a/g,q=new F(ne)!==ne,pe=T.MISSED_STICKY,ve=T.UNSUPPORTED_Y,xe=p&&(!q||pe||B||k||E(function(){return Ie[D]=!1,F(ne)!=ne||F(Ie)==Ie||F(ne,"i")!="/a/i"})),ce=function(ke){for(var de=ke.length,Y=0,ye="",V=!1,G;Y<=de;Y++){if(G=_(ke,Y),G==="\\"){ye+=G+_(ke,++Y);continue}!V&&G==="."?ye+="[\\s\\S]":(G==="["?V=!0:G==="]"&&(V=!1),ye+=G)}return ye},fe=function(ke){for(var de=ke.length,Y=0,ye="",V=[],G={},W=!1,K=!1,te=0,U="",L;Y<=de;Y++){if(L=_(ke,Y),L==="\\")L=L+_(ke,++Y);else if(L==="]")W=!1;else if(!W)switch(!0){case L==="[":W=!0;break;case L==="(":N(he,ie(ke,Y+1))&&(Y+=2,K=!0),ye+=L,te++;continue;case(L===">"&&K):if(U===""||j(G,U))throw new H("Invalid capture group name");G[U]=!0,V[V.length]=[U,te],K=!1,U="";continue}K?U+=L:ye+=L}return[ye,V]};if(y("RegExp",xe)){for(var ge=function(de,Y){var ye=m(J,this),V=v(de),G=Y===void 0,W=[],K=de,te,U,L,$,ue,Ee;if(!ye&&V&&G&&de.constructor===ge)return de;if((V||m(J,de))&&(de=de.source,G&&(Y=x(K))),de=de===void 0?"":b(de),Y=Y===void 0?"":b(Y),K=de,B&&"dotAll"in ne&&(U=!!Y&&ee(Y,"s")>-1,U&&(Y=X(Y,/s/g,""))),te=Y,pe&&"sticky"in ne&&(L=!!Y&&ee(Y,"y")>-1,L&&ve&&(Y=X(Y,/y/g,""))),k&&($=fe(de),de=$[0],W=$[1]),ue=g(F(de,Y),ye?this:J,ge),(U||L||W.length)&&(Ee=Z(ue),U&&(Ee.dotAll=!0,Ee.raw=ge(ce(de),te)),L&&(Ee.sticky=!0),W.length&&(Ee.groups=W)),de!==K)try{w(ue,"source",K===""?"(?:)":K)}catch(ze){}return ue},Se=c(F),De=0;Se.length>De;)S(ge,F,Se[De++]);J.constructor=ge,ge.prototype=J,C(f,"RegExp",ge)}P("RegExp")},{"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/internal-state":173,"../internals/is-forced":178,"../internals/is-regexp":182,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/proxy-accessor":219,"../internals/redefine":222,"../internals/regexp-get-flags":226,"../internals/regexp-sticky-helpers":227,"../internals/regexp-unsupported-dot-all":228,"../internals/regexp-unsupported-ncg":229,"../internals/set-species":233,"../internals/to-string":256,"../internals/well-known-symbol":268}],300:[function(o,M,R){"use strict";var p=o("../internals/export"),f=o("../internals/regexp-exec");p({target:"RegExp",proto:!0,forced:/./.exec!==f},{exec:f})},{"../internals/export":149,"../internals/regexp-exec":224}],301:[function(o,M,R){"use strict";var p=o("../internals/function-name").PROPER,f=o("../internals/redefine"),h=o("../internals/an-object"),y=o("../internals/to-string"),g=o("../internals/fails"),w=o("../internals/regexp-get-flags"),c="toString",m=RegExp.prototype,v=m[c],b=g(function(){return v.call({source:"a",flags:"b"})!="/a/b"}),x=p&&v.name!=c;(b||x)&&f(RegExp.prototype,c,function(){var S=h(this),C=y(S.source),E=y(w(S));return"/"+C+"/"+E},{unsafe:!0})},{"../internals/an-object":101,"../internals/fails":150,"../internals/function-name":156,"../internals/redefine":222,"../internals/regexp-get-flags":226,"../internals/to-string":256}],302:[function(o,M,R){"use strict";var p=o("../internals/export"),f=o("../internals/function-uncurry-this"),h=o("../internals/not-a-regexp"),y=o("../internals/require-object-coercible"),g=o("../internals/to-string"),w=o("../internals/correct-is-regexp-logic"),c=f("".indexOf);p({target:"String",proto:!0,forced:!w("includes")},{includes:function(v){return!!~c(g(y(this)),g(h(v)),arguments.length>1?arguments[1]:void 0)}})},{"../internals/correct-is-regexp-logic":126,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/not-a-regexp":194,"../internals/require-object-coercible":230,"../internals/to-string":256}],303:[function(o,M,R){"use strict";var p=o("../internals/string-multibyte").charAt,f=o("../internals/to-string"),h=o("../internals/internal-state"),y=o("../internals/define-iterator"),g="String Iterator",w=h.set,c=h.getterFor(g);y(String,"String",function(m){w(this,{type:g,string:f(m),index:0})},function(){var v=c(this),b=v.string,x=v.index,T;return x>=b.length?{value:void 0,done:!0}:(T=p(b,x),v.index+=T.length,{value:T,done:!1})})},{"../internals/define-iterator":132,"../internals/internal-state":173,"../internals/string-multibyte":239,"../internals/to-string":256}],304:[function(o,M,R){"use strict";var p=o("../internals/function-call"),f=o("../internals/fix-regexp-well-known-symbol-logic"),h=o("../internals/an-object"),y=o("../internals/to-length"),g=o("../internals/to-string"),w=o("../internals/require-object-coercible"),c=o("../internals/get-method"),m=o("../internals/advance-string-index"),v=o("../internals/regexp-exec-abstract");f("match",function(b,x,T){return[function(C){var E=w(this),j=C==null?void 0:c(C,b);return j?p(j,C,E):new RegExp(C)[b](g(E))},function(S){var C=h(this),E=g(S),j=T(x,C,E);if(j.done)return j.value;if(!C.global)return v(C,E);var Z=C.unicode;C.lastIndex=0;for(var P=[],Q=0,B;(B=v(C,E))!==null;){var k=g(B[0]);P[Q]=k,k===""&&(C.lastIndex=m(E,y(C.lastIndex),Z)),Q++}return Q===0?null:P}]})},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-call":155,"../internals/get-method":161,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/to-length":249,"../internals/to-string":256}],305:[function(o,M,R){"use strict";var p=o("../internals/function-apply"),f=o("../internals/function-call"),h=o("../internals/function-uncurry-this"),y=o("../internals/fix-regexp-well-known-symbol-logic"),g=o("../internals/fails"),w=o("../internals/an-object"),c=o("../internals/is-callable"),m=o("../internals/to-integer-or-infinity"),v=o("../internals/to-length"),b=o("../internals/to-string"),x=o("../internals/require-object-coercible"),T=o("../internals/advance-string-index"),S=o("../internals/get-method"),C=o("../internals/get-substitution"),E=o("../internals/regexp-exec-abstract"),j=o("../internals/well-known-symbol"),Z=j("replace"),P=Math.max,Q=Math.min,B=h([].concat),k=h([].push),D=h("".indexOf),F=h("".slice),J=function(X){return X===void 0?X:String(X)},H=function(){return"a".replace(/./,"$0")==="$0"}(),N=function(){return/./[Z]?/./[Z]("a","$0")==="":!1}(),_=!g(function(){var X=/./;return X.exec=function(){var ee=[];return ee.groups={a:"7"},ee},"".replace(X,"$<a>")!=="7"});y("replace",function(X,ee,ie){var he=N?"$":"$0";return[function(Ie,q){var pe=x(this),ve=Ie==null?void 0:S(Ie,Z);return ve?f(ve,Ie,pe,q):f(ee,b(pe),Ie,q)},function(ne,Ie){var q=w(this),pe=b(ne);if(typeof Ie=="string"&&D(Ie,he)===-1&&D(Ie,"$<")===-1){var ve=ie(ee,q,pe,Ie);if(ve.done)return ve.value}var xe=c(Ie);xe||(Ie=b(Ie));var ce=q.global;if(ce){var fe=q.unicode;q.lastIndex=0}for(var ge=[];;){var Se=E(q,pe);if(Se===null||(k(ge,Se),!ce))break;var De=b(Se[0]);De===""&&(q.lastIndex=T(pe,v(q.lastIndex),fe))}for(var ke="",de=0,Y=0;Y<ge.length;Y++){Se=ge[Y];for(var ye=b(Se[0]),V=P(Q(m(Se.index),pe.length),0),G=[],W=1;W<Se.length;W++)k(G,J(Se[W]));var K=Se.groups;if(xe){var te=B([ye],G,V,pe);K!==void 0&&k(te,K);var U=b(p(Ie,void 0,te))}else U=C(ye,pe,V,G,K,Ie);V>=de&&(ke+=F(pe,de,V)+U,de=V+ye.length)}return ke+F(pe,de)}]},!_||!H||N)},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/fails":150,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-method":161,"../internals/get-substitution":162,"../internals/is-callable":176,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/to-integer-or-infinity":248,"../internals/to-length":249,"../internals/to-string":256,"../internals/well-known-symbol":268}],306:[function(o,M,R){"use strict";var p=o("../internals/function-call"),f=o("../internals/fix-regexp-well-known-symbol-logic"),h=o("../internals/an-object"),y=o("../internals/require-object-coercible"),g=o("../internals/same-value"),w=o("../internals/to-string"),c=o("../internals/get-method"),m=o("../internals/regexp-exec-abstract");f("search",function(v,b,x){return[function(S){var C=y(this),E=S==null?void 0:c(S,v);return E?p(E,S,C):new RegExp(S)[v](w(C))},function(T){var S=h(this),C=w(T),E=x(b,S,C);if(E.done)return E.value;var j=S.lastIndex;g(j,0)||(S.lastIndex=0);var Z=m(S,C);return g(S.lastIndex,j)||(S.lastIndex=j),Z===null?-1:Z.index}]})},{"../internals/an-object":101,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-call":155,"../internals/get-method":161,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/same-value":231,"../internals/to-string":256}],307:[function(o,M,R){"use strict";var p=o("../internals/function-apply"),f=o("../internals/function-call"),h=o("../internals/function-uncurry-this"),y=o("../internals/fix-regexp-well-known-symbol-logic"),g=o("../internals/is-regexp"),w=o("../internals/an-object"),c=o("../internals/require-object-coercible"),m=o("../internals/species-constructor"),v=o("../internals/advance-string-index"),b=o("../internals/to-length"),x=o("../internals/to-string"),T=o("../internals/get-method"),S=o("../internals/array-slice-simple"),C=o("../internals/regexp-exec-abstract"),E=o("../internals/regexp-exec"),j=o("../internals/regexp-sticky-helpers"),Z=o("../internals/fails"),P=j.UNSUPPORTED_Y,Q=4294967295,B=Math.min,k=[].push,D=h(/./.exec),F=h(k),J=h("".slice),H=!Z(function(){var N=/(?:)/,_=N.exec;N.exec=function(){return _.apply(this,arguments)};var X="ab".split(N);return X.length!==2||X[0]!=="a"||X[1]!=="b"});y("split",function(N,_,X){var ee;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?ee=function(ie,he){var ne=x(c(this)),Ie=he===void 0?Q:he>>>0;if(Ie===0)return[];if(ie===void 0)return[ne];if(!g(ie))return f(_,ne,ie,Ie);for(var q=[],pe=(ie.ignoreCase?"i":"")+(ie.multiline?"m":"")+(ie.unicode?"u":"")+(ie.sticky?"y":""),ve=0,xe=new RegExp(ie.source,pe+"g"),ce,fe,ge;(ce=f(E,xe,ne))&&(fe=xe.lastIndex,!(fe>ve&&(F(q,J(ne,ve,ce.index)),ce.length>1&&ce.index<ne.length&&p(k,q,S(ce,1)),ge=ce[0].length,ve=fe,q.length>=Ie)));)xe.lastIndex===ce.index&&xe.lastIndex++;return ve===ne.length?(ge||!D(xe,""))&&F(q,""):F(q,J(ne,ve)),q.length>Ie?S(q,0,Ie):q}:"0".split(void 0,0).length?ee=function(ie,he){return ie===void 0&&he===0?[]:f(_,this,ie,he)}:ee=_,[function(he,ne){var Ie=c(this),q=he==null?void 0:T(he,N);return q?f(q,he,Ie,ne):f(ee,x(Ie),he,ne)},function(ie,he){var ne=w(this),Ie=x(ie),q=X(ee,ne,Ie,he,ee!==_);if(q.done)return q.value;var pe=m(ne,RegExp),ve=ne.unicode,xe=(ne.ignoreCase?"i":"")+(ne.multiline?"m":"")+(ne.unicode?"u":"")+(P?"g":"y"),ce=new pe(P?"^(?:"+ne.source+")":ne,xe),fe=he===void 0?Q:he>>>0;if(fe===0)return[];if(Ie.length===0)return C(ce,Ie)===null?[Ie]:[];for(var ge=0,Se=0,De=[];Se<Ie.length;){ce.lastIndex=P?0:Se;var ke=C(ce,P?J(Ie,Se):Ie),de;if(ke===null||(de=B(b(ce.lastIndex+(P?Se:0)),Ie.length))===ge)Se=v(Ie,Se,ve);else{if(F(De,J(Ie,ge,Se)),De.length===fe)return De;for(var Y=1;Y<=ke.length-1;Y++)if(F(De,ke[Y]),De.length===fe)return De;Se=ge=de}}return F(De,J(Ie,ge)),De}]},!H,P)},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/array-slice-simple":116,"../internals/fails":150,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-method":161,"../internals/is-regexp":182,"../internals/regexp-exec":224,"../internals/regexp-exec-abstract":223,"../internals/regexp-sticky-helpers":227,"../internals/require-object-coercible":230,"../internals/species-constructor":238,"../internals/to-length":249,"../internals/to-string":256}],308:[function(o,M,R){"use strict";var p=o("../internals/export"),f=o("../internals/string-trim").trim,h=o("../internals/string-trim-forced");p({target:"String",proto:!0,forced:h("trim")},{trim:function(){return f(this)}})},{"../internals/export":149,"../internals/string-trim":241,"../internals/string-trim-forced":240}],309:[function(o,M,R){"use strict";var p=o("../internals/export"),f=o("../internals/global"),h=o("../internals/function-call"),y=o("../internals/function-uncurry-this"),g=o("../internals/is-pure"),w=o("../internals/descriptors"),c=o("../internals/native-symbol"),m=o("../internals/fails"),v=o("../internals/has-own-property"),b=o("../internals/object-is-prototype-of"),x=o("../internals/an-object"),T=o("../internals/to-indexed-object"),S=o("../internals/to-property-key"),C=o("../internals/to-string"),E=o("../internals/create-property-descriptor"),j=o("../internals/object-create"),Z=o("../internals/object-keys"),P=o("../internals/object-get-own-property-names"),Q=o("../internals/object-get-own-property-names-external"),B=o("../internals/object-get-own-property-symbols"),k=o("../internals/object-get-own-property-descriptor"),D=o("../internals/object-define-property"),F=o("../internals/object-define-properties"),J=o("../internals/object-property-is-enumerable"),H=o("../internals/redefine"),N=o("../internals/shared"),_=o("../internals/shared-key"),X=o("../internals/hidden-keys"),ee=o("../internals/uid"),ie=o("../internals/well-known-symbol"),he=o("../internals/well-known-symbol-wrapped"),ne=o("../internals/define-well-known-symbol"),Ie=o("../internals/symbol-define-to-primitive"),q=o("../internals/set-to-string-tag"),pe=o("../internals/internal-state"),ve=o("../internals/array-iteration").forEach,xe=_("hidden"),ce="Symbol",fe="prototype",ge=pe.set,Se=pe.getterFor(ce),De=Object[fe],ke=f.Symbol,de=ke&&ke[fe],Y=f.TypeError,ye=f.QObject,V=k.f,G=D.f,W=Q.f,K=J.f,te=y([].push),U=N("symbols"),L=N("op-symbols"),$=N("wks"),ue=!ye||!ye[fe]||!ye[fe].findChild,Ee=w&&m(function(){return j(G({},"a",{get:function(){return G(this,"a",{value:7}).a}})).a!=7})?function($e,rt,qe){var pt=V(De,rt);pt&&delete De[rt],G($e,rt,qe),pt&&$e!==De&&G(De,rt,pt)}:G,ze=function($e,rt){var qe=U[$e]=j(de);return ge(qe,{type:ce,tag:$e,description:rt}),w||(qe.description=rt),qe},_e=function(rt,qe,pt){rt===De&&_e(L,qe,pt),x(rt);var Pe=S(qe);return x(pt),v(U,Pe)?(pt.enumerable?(v(rt,xe)&&rt[xe][Pe]&&(rt[xe][Pe]=!1),pt=j(pt,{enumerable:E(0,!1)})):(v(rt,xe)||G(rt,xe,E(1,{})),rt[xe][Pe]=!0),Ee(rt,Pe,pt)):G(rt,Pe,pt)},le=function(rt,qe){x(rt);var pt=T(qe),Pe=Z(pt).concat(Je(pt));return ve(Pe,function(Qe){(!w||h(Me,pt,Qe))&&_e(rt,Qe,pt[Qe])}),rt},Re=function(rt,qe){return qe===void 0?j(rt):le(j(rt),qe)},Me=function(rt){var qe=S(rt),pt=h(K,this,qe);return this===De&&v(U,qe)&&!v(L,qe)?!1:pt||!v(this,qe)||!v(U,qe)||v(this,xe)&&this[xe][qe]?pt:!0},He=function(rt,qe){var pt=T(rt),Pe=S(qe);if(!(pt===De&&v(U,Pe)&&!v(L,Pe))){var Qe=V(pt,Pe);return Qe&&v(U,Pe)&&!(v(pt,xe)&&pt[xe][Pe])&&(Qe.enumerable=!0),Qe}},Be=function(rt){var qe=W(T(rt)),pt=[];return ve(qe,function(Pe){!v(U,Pe)&&!v(X,Pe)&&te(pt,Pe)}),pt},Je=function($e){var rt=$e===De,qe=W(rt?L:T($e)),pt=[];return ve(qe,function(Pe){v(U,Pe)&&(!rt||v(De,Pe))&&te(pt,U[Pe])}),pt};c||(ke=function(){if(b(de,this))throw Y("Symbol is not a constructor");var rt=!arguments.length||arguments[0]===void 0?void 0:C(arguments[0]),qe=ee(rt),pt=function(Pe){this===De&&h(pt,L,Pe),v(this,xe)&&v(this[xe],qe)&&(this[xe][qe]=!1),Ee(this,qe,E(1,Pe))};return w&&ue&&Ee(De,qe,{configurable:!0,set:pt}),ze(qe,rt)},de=ke[fe],H(de,"toString",function(){return Se(this).tag}),H(ke,"withoutSetter",function($e){return ze(ee($e),$e)}),J.f=Me,D.f=_e,F.f=le,k.f=He,P.f=Q.f=Be,B.f=Je,he.f=function($e){return ze(ie($e),$e)},w&&(G(de,"description",{configurable:!0,get:function(){return Se(this).description}}),g||H(De,"propertyIsEnumerable",Me,{unsafe:!0}))),p({global:!0,wrap:!0,forced:!c,sham:!c},{Symbol:ke}),ve(Z($),function($e){ne($e)}),p({target:ce,stat:!0,forced:!c},{useSetter:function(){ue=!0},useSimple:function(){ue=!1}}),p({target:"Object",stat:!0,forced:!c,sham:!w},{create:Re,defineProperty:_e,defineProperties:le,getOwnPropertyDescriptor:He}),p({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:Be}),Ie(),q(ke,ce),X[xe]=!0},{"../internals/an-object":101,"../internals/array-iteration":111,"../internals/create-property-descriptor":130,"../internals/define-well-known-symbol":133,"../internals/descriptors":134,"../internals/export":149,"../internals/fails":150,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/internal-state":173,"../internals/is-pure":181,"../internals/native-symbol":191,"../internals/object-create":196,"../internals/object-define-properties":197,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-get-own-property-names-external":200,"../internals/object-get-own-property-symbols":202,"../internals/object-is-prototype-of":204,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/redefine":222,"../internals/set-to-string-tag":234,"../internals/shared":237,"../internals/shared-key":235,"../internals/symbol-define-to-primitive":242,"../internals/to-indexed-object":247,"../internals/to-property-key":254,"../internals/to-string":256,"../internals/uid":263,"../internals/well-known-symbol":268,"../internals/well-known-symbol-wrapped":267}],310:[function(o,M,R){"use strict";var p=o("../internals/export"),f=o("../internals/descriptors"),h=o("../internals/global"),y=o("../internals/function-uncurry-this"),g=o("../internals/has-own-property"),w=o("../internals/is-callable"),c=o("../internals/object-is-prototype-of"),m=o("../internals/to-string"),v=o("../internals/object-define-property").f,b=o("../internals/copy-constructor-properties"),x=h.Symbol,T=x&&x.prototype;if(f&&w(x)&&(!("description"in T)||x().description!==void 0)){var S={},C=function(){var D=arguments.length<1||arguments[0]===void 0?void 0:m(arguments[0]),F=c(T,this)?new x(D):D===void 0?x():x(D);return D===""&&(S[F]=!0),F};b(C,x),C.prototype=T,T.constructor=C;var E=String(x("test"))=="Symbol(test)",j=y(T.toString),Z=y(T.valueOf),P=/^Symbol\((.*)\)[^)]+$/,Q=y("".replace),B=y("".slice);v(T,"description",{configurable:!0,get:function(){var D=Z(this),F=j(D);if(g(S,D))return"";var J=E?B(F,7,-1):Q(F,P,"$1");return J===""?void 0:J}}),p({global:!0,forced:!0},{Symbol:C})}},{"../internals/copy-constructor-properties":125,"../internals/descriptors":134,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/is-callable":176,"../internals/object-define-property":198,"../internals/object-is-prototype-of":204,"../internals/to-string":256}],311:[function(o,M,R){var p=o("../internals/export"),f=o("../internals/get-built-in"),h=o("../internals/has-own-property"),y=o("../internals/to-string"),g=o("../internals/shared"),w=o("../internals/native-symbol-registry"),c=g("string-to-symbol-registry"),m=g("symbol-to-string-registry");p({target:"Symbol",stat:!0,forced:!w},{for:function(v){var b=y(v);if(h(c,b))return c[b];var x=f("Symbol")(b);return c[b]=x,m[x]=b,x}})},{"../internals/export":149,"../internals/get-built-in":158,"../internals/has-own-property":164,"../internals/native-symbol-registry":190,"../internals/shared":237,"../internals/to-string":256}],312:[function(o,M,R){var p=o("../internals/define-well-known-symbol");p("iterator")},{"../internals/define-well-known-symbol":133}],313:[function(o,M,R){o("../modules/es.symbol.constructor"),o("../modules/es.symbol.for"),o("../modules/es.symbol.key-for"),o("../modules/es.json.stringify"),o("../modules/es.object.get-own-property-symbols")},{"../modules/es.json.stringify":285,"../modules/es.object.get-own-property-symbols":289,"../modules/es.symbol.constructor":309,"../modules/es.symbol.for":311,"../modules/es.symbol.key-for":314}],314:[function(o,M,R){var p=o("../internals/export"),f=o("../internals/has-own-property"),h=o("../internals/is-symbol"),y=o("../internals/try-to-string"),g=o("../internals/shared"),w=o("../internals/native-symbol-registry"),c=g("symbol-to-string-registry");p({target:"Symbol",stat:!0,forced:!w},{keyFor:function(v){if(!h(v))throw TypeError(y(v)+" is not a symbol");if(f(c,v))return c[v]}})},{"../internals/export":149,"../internals/has-own-property":164,"../internals/is-symbol":183,"../internals/native-symbol-registry":190,"../internals/shared":237,"../internals/try-to-string":257}],315:[function(o,M,R){"use strict";var p=o("../internals/function-uncurry-this"),f=o("../internals/array-buffer-view-core"),h=o("../internals/array-copy-within"),y=p(h),g=f.aTypedArray,w=f.exportTypedArrayMethod;w("copyWithin",function(m,v){return y(g(this),m,v,arguments.length>2?arguments[2]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-copy-within":105,"../internals/function-uncurry-this":157}],316:[function(o,M,R){"use strict";var p=o("../internals/array-buffer-view-core"),f=o("../internals/array-iteration").every,h=p.aTypedArray,y=p.exportTypedArrayMethod;y("every",function(w){return f(h(this),w,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],317:[function(o,M,R){"use strict";var p=o("../internals/array-buffer-view-core"),f=o("../internals/function-call"),h=o("../internals/array-fill"),y=p.aTypedArray,g=p.exportTypedArrayMethod;g("fill",function(c){var m=arguments.length;return f(h,y(this),c,m>1?arguments[1]:void 0,m>2?arguments[2]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-fill":106,"../internals/function-call":155}],318:[function(o,M,R){"use strict";var p=o("../internals/array-buffer-view-core"),f=o("../internals/array-iteration").filter,h=o("../internals/typed-array-from-species-and-list"),y=p.aTypedArray,g=p.exportTypedArrayMethod;g("filter",function(c){var m=f(y(this),c,arguments.length>1?arguments[1]:void 0);return h(this,m)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/typed-array-from-species-and-list":260}],319:[function(o,M,R){"use strict";var p=o("../internals/array-buffer-view-core"),f=o("../internals/array-iteration").findIndex,h=p.aTypedArray,y=p.exportTypedArrayMethod;y("findIndex",function(w){return f(h(this),w,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],320:[function(o,M,R){"use strict";var p=o("../internals/array-buffer-view-core"),f=o("../internals/array-iteration").find,h=p.aTypedArray,y=p.exportTypedArrayMethod;y("find",function(w){return f(h(this),w,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],321:[function(o,M,R){"use strict";var p=o("../internals/array-buffer-view-core"),f=o("../internals/array-iteration").forEach,h=p.aTypedArray,y=p.exportTypedArrayMethod;y("forEach",function(w){f(h(this),w,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],322:[function(o,M,R){"use strict";var p=o("../internals/array-buffer-view-core"),f=o("../internals/array-includes").includes,h=p.aTypedArray,y=p.exportTypedArrayMethod;y("includes",function(w){return f(h(this),w,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],323:[function(o,M,R){"use strict";var p=o("../internals/array-buffer-view-core"),f=o("../internals/array-includes").indexOf,h=p.aTypedArray,y=p.exportTypedArrayMethod;y("indexOf",function(w){return f(h(this),w,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],324:[function(o,M,R){"use strict";var p=o("../internals/global"),f=o("../internals/fails"),h=o("../internals/function-uncurry-this"),y=o("../internals/array-buffer-view-core"),g=o("../modules/es.array.iterator"),w=o("../internals/well-known-symbol"),c=w("iterator"),m=p.Uint8Array,v=h(g.values),b=h(g.keys),x=h(g.entries),T=y.aTypedArray,S=y.exportTypedArrayMethod,C=m&&m.prototype,E=!f(function(){C[c].call([1])}),j=!!C&&C.values&&C[c]===C.values&&C.values.name==="values",Z=function(){return v(T(this))};S("entries",function(){return x(T(this))},E),S("keys",function(){return b(T(this))},E),S("values",Z,E||!j,{name:"values"}),S(c,Z,E||!j,{name:"values"})},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/well-known-symbol":268,"../modules/es.array.iterator":278}],325:[function(o,M,R){"use strict";var p=o("../internals/array-buffer-view-core"),f=o("../internals/function-uncurry-this"),h=p.aTypedArray,y=p.exportTypedArrayMethod,g=f([].join);y("join",function(c){return g(h(this),c)})},{"../internals/array-buffer-view-core":103,"../internals/function-uncurry-this":157}],326:[function(o,M,R){"use strict";var p=o("../internals/array-buffer-view-core"),f=o("../internals/function-apply"),h=o("../internals/array-last-index-of"),y=p.aTypedArray,g=p.exportTypedArrayMethod;g("lastIndexOf",function(c){var m=arguments.length;return f(h,y(this),m>1?[c,arguments[1]]:[c])})},{"../internals/array-buffer-view-core":103,"../internals/array-last-index-of":112,"../internals/function-apply":152}],327:[function(o,M,R){"use strict";var p=o("../internals/array-buffer-view-core"),f=o("../internals/array-iteration").map,h=o("../internals/typed-array-species-constructor"),y=p.aTypedArray,g=p.exportTypedArrayMethod;g("map",function(c){return f(y(this),c,arguments.length>1?arguments[1]:void 0,function(m,v){return new(h(m))(v)})})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/typed-array-species-constructor":262}],328:[function(o,M,R){"use strict";var p=o("../internals/array-buffer-view-core"),f=o("../internals/array-reduce").right,h=p.aTypedArray,y=p.exportTypedArrayMethod;y("reduceRight",function(w){var c=arguments.length;return f(h(this),w,c,c>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],329:[function(o,M,R){"use strict";var p=o("../internals/array-buffer-view-core"),f=o("../internals/array-reduce").left,h=p.aTypedArray,y=p.exportTypedArrayMethod;y("reduce",function(w){var c=arguments.length;return f(h(this),w,c,c>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],330:[function(o,M,R){"use strict";var p=o("../internals/array-buffer-view-core"),f=p.aTypedArray,h=p.exportTypedArrayMethod,y=Math.floor;h("reverse",function(){for(var w=this,c=f(w).length,m=y(c/2),v=0,b;v<m;)b=w[v],w[v++]=w[--c],w[c]=b;return w})},{"../internals/array-buffer-view-core":103}],331:[function(o,M,R){"use strict";var p=o("../internals/global"),f=o("../internals/function-call"),h=o("../internals/array-buffer-view-core"),y=o("../internals/length-of-array-like"),g=o("../internals/to-offset"),w=o("../internals/to-object"),c=o("../internals/fails"),m=p.RangeError,v=p.Int8Array,b=v&&v.prototype,x=b&&b.set,T=h.aTypedArray,S=h.exportTypedArrayMethod,C=!c(function(){var j=new Uint8ClampedArray(2);return f(x,j,{length:1,0:3},1),j[1]!==3}),E=C&&h.NATIVE_ARRAY_BUFFER_VIEWS&&c(function(){var j=new v(2);return j.set(1),j.set("2",1),j[0]!==0||j[1]!==2});S("set",function(Z){T(this);var P=g(arguments.length>1?arguments[1]:void 0,1),Q=w(Z);if(C)return f(x,this,Q,P);var B=this.length,k=y(Q),D=0;if(k+P>B)throw m("Wrong length");for(;D<k;)this[P+D]=Q[D++]},!C||E)},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-call":155,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/to-offset":251}],332:[function(o,M,R){"use strict";var p=o("../internals/array-buffer-view-core"),f=o("../internals/typed-array-species-constructor"),h=o("../internals/fails"),y=o("../internals/array-slice"),g=p.aTypedArray,w=p.exportTypedArrayMethod,c=h(function(){new Int8Array(1).slice()});w("slice",function(v,b){for(var x=y(g(this),v,b),T=f(this),S=0,C=x.length,E=new T(C);C>S;)E[S]=x[S++];return E},c)},{"../internals/array-buffer-view-core":103,"../internals/array-slice":117,"../internals/fails":150,"../internals/typed-array-species-constructor":262}],333:[function(o,M,R){"use strict";var p=o("../internals/array-buffer-view-core"),f=o("../internals/array-iteration").some,h=p.aTypedArray,y=p.exportTypedArrayMethod;y("some",function(w){return f(h(this),w,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],334:[function(o,M,R){"use strict";var p=o("../internals/global"),f=o("../internals/function-uncurry-this"),h=o("../internals/fails"),y=o("../internals/a-callable"),g=o("../internals/array-sort"),w=o("../internals/array-buffer-view-core"),c=o("../internals/engine-ff-version"),m=o("../internals/engine-is-ie-or-edge"),v=o("../internals/engine-v8-version"),b=o("../internals/engine-webkit-version"),x=w.aTypedArray,T=w.exportTypedArrayMethod,S=p.Uint16Array,C=S&&f(S.prototype.sort),E=!!C&&!(h(function(){C(new S(2),null)})&&h(function(){C(new S(2),{})})),j=!!C&&!h(function(){if(v)return v<74;if(c)return c<67;if(m)return!0;if(b)return b<602;var P=new S(516),Q=Array(516),B,k;for(B=0;B<516;B++)k=B%4,P[B]=515-B,Q[B]=B-2*k+3;for(C(P,function(D,F){return(D/4|0)-(F/4|0)}),B=0;B<516;B++)if(P[B]!==Q[B])return!0}),Z=function(P){return function(Q,B){return P!==void 0?+P(Q,B)||0:B!==B?-1:Q!==Q?1:Q===0&&B===0?1/Q>0&&1/B<0?1:-1:Q>B}};T("sort",function(Q){return Q!==void 0&&y(Q),j?C(this,Q):g(x(this),Z(Q))},!j||E)},{"../internals/a-callable":95,"../internals/array-buffer-view-core":103,"../internals/array-sort":118,"../internals/engine-ff-version":138,"../internals/engine-is-ie-or-edge":140,"../internals/engine-v8-version":146,"../internals/engine-webkit-version":147,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],335:[function(o,M,R){"use strict";var p=o("../internals/array-buffer-view-core"),f=o("../internals/to-length"),h=o("../internals/to-absolute-index"),y=o("../internals/typed-array-species-constructor"),g=p.aTypedArray,w=p.exportTypedArrayMethod;w("subarray",function(m,v){var b=g(this),x=b.length,T=h(m,x),S=y(b);return new S(b.buffer,b.byteOffset+T*b.BYTES_PER_ELEMENT,f((v===void 0?x:h(v,x))-T))})},{"../internals/array-buffer-view-core":103,"../internals/to-absolute-index":245,"../internals/to-length":249,"../internals/typed-array-species-constructor":262}],336:[function(o,M,R){"use strict";var p=o("../internals/global"),f=o("../internals/function-apply"),h=o("../internals/array-buffer-view-core"),y=o("../internals/fails"),g=o("../internals/array-slice"),w=p.Int8Array,c=h.aTypedArray,m=h.exportTypedArrayMethod,v=[].toLocaleString,b=!!w&&y(function(){v.call(new w(1))}),x=y(function(){return[1,2].toLocaleString()!=new w([1,2]).toLocaleString()})||!y(function(){w.prototype.toLocaleString.call([1,2])});m("toLocaleString",function(){return f(v,b?g(c(this)):c(this),g(arguments))},x)},{"../internals/array-buffer-view-core":103,"../internals/array-slice":117,"../internals/fails":150,"../internals/function-apply":152,"../internals/global":163}],337:[function(o,M,R){"use strict";var p=o("../internals/array-buffer-view-core").exportTypedArrayMethod,f=o("../internals/fails"),h=o("../internals/global"),y=o("../internals/function-uncurry-this"),g=h.Uint8Array,w=g&&g.prototype||{},c=[].toString,m=y([].join);f(function(){c.call({})})&&(c=function(){return m(this)});var v=w.toString!=c;p("toString",c,v)},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],338:[function(o,M,R){var p=o("../internals/typed-array-constructor");p("Uint8",function(f){return function(y,g,w){return f(this,y,g,w)}})},{"../internals/typed-array-constructor":258}],339:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/dom-iterables"),h=o("../internals/dom-token-list-prototype"),y=o("../internals/array-for-each"),g=o("../internals/create-non-enumerable-property"),w=function(m){if(m&&m.forEach!==y)try{g(m,"forEach",y)}catch(v){m.forEach=y}};for(var c in f)f[c]&&w(p[c]&&p[c].prototype);w(h)},{"../internals/array-for-each":107,"../internals/create-non-enumerable-property":129,"../internals/dom-iterables":136,"../internals/dom-token-list-prototype":137,"../internals/global":163}],340:[function(o,M,R){var p=o("../internals/global"),f=o("../internals/dom-iterables"),h=o("../internals/dom-token-list-prototype"),y=o("../modules/es.array.iterator"),g=o("../internals/create-non-enumerable-property"),w=o("../internals/well-known-symbol"),c=w("iterator"),m=w("toStringTag"),v=y.values,b=function(T,S){if(T){if(T[c]!==v)try{g(T,c,v)}catch(E){T[c]=v}if(T[m]||g(T,m,S),f[S]){for(var C in y)if(T[C]!==y[C])try{g(T,C,y[C])}catch(E){T[C]=y[C]}}}};for(var x in f)b(p[x]&&p[x].prototype,x);b(h,"DOMTokenList")},{"../internals/create-non-enumerable-property":129,"../internals/dom-iterables":136,"../internals/dom-token-list-prototype":137,"../internals/global":163,"../internals/well-known-symbol":268,"../modules/es.array.iterator":278}],341:[function(o,M,R){function p(j){return Array.isArray?Array.isArray(j):E(j)==="[object Array]"}R.isArray=p;function f(j){return typeof j=="boolean"}R.isBoolean=f;function h(j){return j===null}R.isNull=h;function y(j){return j==null}R.isNullOrUndefined=y;function g(j){return typeof j=="number"}R.isNumber=g;function w(j){return typeof j=="string"}R.isString=w;function c(j){return typeof j=="symbol"}R.isSymbol=c;function m(j){return j===void 0}R.isUndefined=m;function v(j){return E(j)==="[object RegExp]"}R.isRegExp=v;function b(j){return typeof j=="object"&&j!==null}R.isObject=b;function x(j){return E(j)==="[object Date]"}R.isDate=x;function T(j){return E(j)==="[object Error]"||j instanceof Error}R.isError=T;function S(j){return typeof j=="function"}R.isFunction=S;function C(j){return j===null||typeof j=="boolean"||typeof j=="number"||typeof j=="string"||typeof j=="symbol"||typeof j=="undefined"}R.isPrimitive=C,R.isBuffer=o("buffer").Buffer.isBuffer;function E(j){return Object.prototype.toString.call(j)}},{buffer:90}],342:[function(o,M,R){(function(p){"use strict";var f=function(){var c=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,m=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,v=/[^-+\dA-Z]/g;return function(b,x,T,S){if(arguments.length===1&&w(b)==="string"&&!/\d/.test(b)&&(x=b,b=void 0),b=b||new Date,b instanceof Date||(b=new Date(b)),isNaN(b))throw TypeError("Invalid date");x=String(f.masks[x]||x||f.masks.default);var C=x.slice(0,4);(C==="UTC:"||C==="GMT:")&&(x=x.slice(4),T=!0,C==="GMT:"&&(S=!0));var E=T?"getUTC":"get",j=b[E+"Date"](),Z=b[E+"Day"](),P=b[E+"Month"](),Q=b[E+"FullYear"](),B=b[E+"Hours"](),k=b[E+"Minutes"](),D=b[E+"Seconds"](),F=b[E+"Milliseconds"](),J=T?0:b.getTimezoneOffset(),H=y(b),N=g(b),_={d:j,dd:h(j),ddd:f.i18n.dayNames[Z],dddd:f.i18n.dayNames[Z+7],m:P+1,mm:h(P+1),mmm:f.i18n.monthNames[P],mmmm:f.i18n.monthNames[P+12],yy:String(Q).slice(2),yyyy:Q,h:B%12||12,hh:h(B%12||12),H:B,HH:h(B),M:k,MM:h(k),s:D,ss:h(D),l:h(F,3),L:h(Math.round(F/10)),t:B<12?"a":"p",tt:B<12?"am":"pm",T:B<12?"A":"P",TT:B<12?"AM":"PM",Z:S?"GMT":T?"UTC":(String(b).match(m)||[""]).pop().replace(v,""),o:(J>0?"-":"+")+h(Math.floor(Math.abs(J)/60)*100+Math.abs(J)%60,4),S:["th","st","nd","rd"][j%10>3?0:(j%100-j%10!=10)*j%10],W:H,N};return x.replace(c,function(X){return X in _?_[X]:X.slice(1,X.length-1)})}}();f.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},f.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]};function h(c,m){for(c=String(c),m=m||2;c.length<m;)c="0"+c;return c}function y(c){var m=new Date(c.getFullYear(),c.getMonth(),c.getDate());m.setDate(m.getDate()-(m.getDay()+6)%7+3);var v=new Date(m.getFullYear(),0,4);v.setDate(v.getDate()-(v.getDay()+6)%7+3);var b=m.getTimezoneOffset()-v.getTimezoneOffset();m.setHours(m.getHours()-b);var x=(m-v)/(864e5*7);return 1+Math.floor(x)}function g(c){var m=c.getDay();return m===0&&(m=7),m}function w(c){return c===null?"null":c===void 0?"undefined":typeof c!="object"?typeof c:Array.isArray(c)?"array":{}.toString.call(c).slice(8,-1).toLowerCase()}typeof Te=="function"&&Te.amd?Te(function(){return f}):typeof R=="object"?M.exports=f:p.dateFormat=f})(this)},{}],343:[function(o,M,R){"use strict";var p=/["'&<>]/;M.exports=f;function f(h){var y=""+h,g=p.exec(y);if(!g)return y;var w,c="",m=0,v=0;for(m=g.index;m<y.length;m++){switch(y.charCodeAt(m)){case 34:w="&quot;";break;case 38:w="&amp;";break;case 39:w="&#39;";break;case 60:w="&lt;";break;case 62:w="&gt;";break;default:continue}v!==m&&(c+=y.substring(v,m)),v=m+1,c+=w}return v!==m?c+y.substring(v,m):c}},{}],344:[function(o,M,R){"use strict";var p=typeof Reflect=="object"?Reflect:null,f=p&&typeof p.apply=="function"?p.apply:function(D,F,J){return Function.prototype.apply.call(D,F,J)},h;p&&typeof p.ownKeys=="function"?h=p.ownKeys:Object.getOwnPropertySymbols?h=function(D){return Object.getOwnPropertyNames(D).concat(Object.getOwnPropertySymbols(D))}:h=function(D){return Object.getOwnPropertyNames(D)};function y(k){console&&console.warn&&console.warn(k)}var g=Number.isNaN||function(D){return D!==D};function w(){w.init.call(this)}M.exports=w,M.exports.once=P,w.EventEmitter=w,w.prototype._events=void 0,w.prototype._eventsCount=0,w.prototype._maxListeners=void 0;var c=10;function m(k){if(typeof k!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof k)}Object.defineProperty(w,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(k){if(typeof k!="number"||k<0||g(k))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+k+".");c=k}}),w.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},w.prototype.setMaxListeners=function(D){if(typeof D!="number"||D<0||g(D))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+D+".");return this._maxListeners=D,this};function v(k){return k._maxListeners===void 0?w.defaultMaxListeners:k._maxListeners}w.prototype.getMaxListeners=function(){return v(this)},w.prototype.emit=function(D){for(var F=[],J=1;J<arguments.length;J++)F.push(arguments[J]);var H=D==="error",N=this._events;if(N!==void 0)H=H&&N.error===void 0;else if(!H)return!1;if(H){var _;if(F.length>0&&(_=F[0]),_ instanceof Error)throw _;var X=new Error("Unhandled error."+(_?" ("+_.message+")":""));throw X.context=_,X}var ee=N[D];if(ee===void 0)return!1;if(typeof ee=="function")f(ee,this,F);else for(var ie=ee.length,he=E(ee,ie),J=0;J<ie;++J)f(he[J],this,F);return!0};function b(k,D,F,J){var H,N,_;if(m(F),N=k._events,N===void 0?(N=k._events=Object.create(null),k._eventsCount=0):(N.newListener!==void 0&&(k.emit("newListener",D,F.listener?F.listener:F),N=k._events),_=N[D]),_===void 0)_=N[D]=F,++k._eventsCount;else if(typeof _=="function"?_=N[D]=J?[F,_]:[_,F]:J?_.unshift(F):_.push(F),H=v(k),H>0&&_.length>H&&!_.warned){_.warned=!0;var X=new Error("Possible EventEmitter memory leak detected. "+_.length+" "+String(D)+" listeners added. Use emitter.setMaxListeners() to increase limit");X.name="MaxListenersExceededWarning",X.emitter=k,X.type=D,X.count=_.length,y(X)}return k}w.prototype.addListener=function(D,F){return b(this,D,F,!1)},w.prototype.on=w.prototype.addListener,w.prototype.prependListener=function(D,F){return b(this,D,F,!0)};function x(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function T(k,D,F){var J={fired:!1,wrapFn:void 0,target:k,type:D,listener:F},H=x.bind(J);return H.listener=F,J.wrapFn=H,H}w.prototype.once=function(D,F){return m(F),this.on(D,T(this,D,F)),this},w.prototype.prependOnceListener=function(D,F){return m(F),this.prependListener(D,T(this,D,F)),this},w.prototype.removeListener=function(D,F){var J,H,N,_,X;if(m(F),H=this._events,H===void 0)return this;if(J=H[D],J===void 0)return this;if(J===F||J.listener===F)--this._eventsCount===0?this._events=Object.create(null):(delete H[D],H.removeListener&&this.emit("removeListener",D,J.listener||F));else if(typeof J!="function"){for(N=-1,_=J.length-1;_>=0;_--)if(J[_]===F||J[_].listener===F){X=J[_].listener,N=_;break}if(N<0)return this;N===0?J.shift():j(J,N),J.length===1&&(H[D]=J[0]),H.removeListener!==void 0&&this.emit("removeListener",D,X||F)}return this},w.prototype.off=w.prototype.removeListener,w.prototype.removeAllListeners=function(D){var F,J,H;if(J=this._events,J===void 0)return this;if(J.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):J[D]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete J[D]),this;if(arguments.length===0){var N=Object.keys(J),_;for(H=0;H<N.length;++H)_=N[H],_!=="removeListener"&&this.removeAllListeners(_);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(F=J[D],typeof F=="function")this.removeListener(D,F);else if(F!==void 0)for(H=F.length-1;H>=0;H--)this.removeListener(D,F[H]);return this};function S(k,D,F){var J=k._events;if(J===void 0)return[];var H=J[D];return H===void 0?[]:typeof H=="function"?F?[H.listener||H]:[H]:F?Z(H):E(H,H.length)}w.prototype.listeners=function(D){return S(this,D,!0)},w.prototype.rawListeners=function(D){return S(this,D,!1)},w.listenerCount=function(k,D){return typeof k.listenerCount=="function"?k.listenerCount(D):C.call(k,D)},w.prototype.listenerCount=C;function C(k){var D=this._events;if(D!==void 0){var F=D[k];if(typeof F=="function")return 1;if(F!==void 0)return F.length}return 0}w.prototype.eventNames=function(){return this._eventsCount>0?h(this._events):[]};function E(k,D){for(var F=new Array(D),J=0;J<D;++J)F[J]=k[J];return F}function j(k,D){for(;D+1<k.length;D++)k[D]=k[D+1];k.pop()}function Z(k){for(var D=new Array(k.length),F=0;F<D.length;++F)D[F]=k[F].listener||k[F];return D}function P(k,D){return new Promise(function(F,J){function H(_){k.removeListener(D,N),J(_)}function N(){typeof k.removeListener=="function"&&k.removeListener("error",H),F([].slice.call(arguments))}B(k,D,N,{once:!0}),D!=="error"&&Q(k,H,{once:!0})})}function Q(k,D,F){typeof k.on=="function"&&B(k,"error",D,F)}function B(k,D,F,J){if(typeof k.on=="function")J.once?k.once(D,F):k.on(D,F);else if(typeof k.addEventListener=="function")k.addEventListener(D,function H(N){J.once&&k.removeEventListener(D,H),F(N)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof k)}},{}],345:[function(o,M,R){"use strict";var p=o("is-callable"),f=Object.prototype.toString,h=Object.prototype.hasOwnProperty,y=function(v,b,x){for(var T=0,S=v.length;T<S;T++)h.call(v,T)&&(x==null?b(v[T],T,v):b.call(x,v[T],T,v))},g=function(v,b,x){for(var T=0,S=v.length;T<S;T++)x==null?b(v.charAt(T),T,v):b.call(x,v.charAt(T),T,v)},w=function(v,b,x){for(var T in v)h.call(v,T)&&(x==null?b(v[T],T,v):b.call(x,v[T],T,v))},c=function(v,b,x){if(!p(b))throw new TypeError("iterator must be a function");var T;arguments.length>=3&&(T=x),f.call(v)==="[object Array]"?y(v,b,T):typeof v=="string"?g(v,b,T):w(v,b,T)};M.exports=c},{"is-callable":367}],346:[function(o,M,R){"use strict";var p="Function.prototype.bind called on incompatible ",f=Array.prototype.slice,h=Object.prototype.toString,y="[object Function]";M.exports=function(w){var c=this;if(typeof c!="function"||h.call(c)!==y)throw new TypeError(p+c);for(var m=f.call(arguments,1),v,b=function(){if(this instanceof v){var E=c.apply(this,m.concat(f.call(arguments)));return Object(E)===E?E:this}else return c.apply(w,m.concat(f.call(arguments)))},x=Math.max(0,c.length-m.length),T=[],S=0;S<x;S++)T.push("$"+S);if(v=Function("binder","return function ("+T.join(",")+"){ return binder.apply(this,arguments); }")(b),c.prototype){var C=function(){};C.prototype=c.prototype,v.prototype=new C,C.prototype=null}return v}},{}],347:[function(o,M,R){"use strict";var p=o("./implementation");M.exports=Function.prototype.bind||p},{"./implementation":346}],348:[function(o,M,R){"use strict";var p,f=SyntaxError,h=Function,y=TypeError,g=function(ee){try{return h('"use strict"; return ('+ee+").constructor;")()}catch(ie){}},w=Object.getOwnPropertyDescriptor;if(w)try{w({},"")}catch(ee){w=null}var c=function(){throw new y},m=w?function(){try{return arguments.callee,c}catch(ee){try{return w(arguments,"callee").get}catch(ie){return c}}}():c,v=o("has-symbols")(),b=o("has-proto")(),x=Object.getPrototypeOf||(b?function(ee){return ee.__proto__}:null),T={},S=typeof Uint8Array=="undefined"||!x?p:x(Uint8Array),C={"%AggregateError%":typeof AggregateError=="undefined"?p:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?p:ArrayBuffer,"%ArrayIteratorPrototype%":v&&x?x([][Symbol.iterator]()):p,"%AsyncFromSyncIteratorPrototype%":p,"%AsyncFunction%":T,"%AsyncGenerator%":T,"%AsyncGeneratorFunction%":T,"%AsyncIteratorPrototype%":T,"%Atomics%":typeof Atomics=="undefined"?p:Atomics,"%BigInt%":typeof BigInt=="undefined"?p:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?p:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?p:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?p:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array=="undefined"?p:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?p:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?p:FinalizationRegistry,"%Function%":h,"%GeneratorFunction%":T,"%Int8Array%":typeof Int8Array=="undefined"?p:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?p:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?p:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":v&&x?x(x([][Symbol.iterator]())):p,"%JSON%":typeof JSON=="object"?JSON:p,"%Map%":typeof Map=="undefined"?p:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!v||!x?p:x(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?p:Promise,"%Proxy%":typeof Proxy=="undefined"?p:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect=="undefined"?p:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?p:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!v||!x?p:x(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?p:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":v&&x?x(""[Symbol.iterator]()):p,"%Symbol%":v?Symbol:p,"%SyntaxError%":f,"%ThrowTypeError%":m,"%TypedArray%":S,"%TypeError%":y,"%Uint8Array%":typeof Uint8Array=="undefined"?p:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?p:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?p:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?p:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap=="undefined"?p:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?p:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?p:WeakSet};if(x)try{null.error}catch(ee){var E=x(x(ee));C["%Error.prototype%"]=E}var j=function ee(ie){var he;if(ie==="%AsyncFunction%")he=g("async function () {}");else if(ie==="%GeneratorFunction%")he=g("function* () {}");else if(ie==="%AsyncGeneratorFunction%")he=g("async function* () {}");else if(ie==="%AsyncGenerator%"){var ne=ee("%AsyncGeneratorFunction%");ne&&(he=ne.prototype)}else if(ie==="%AsyncIteratorPrototype%"){var Ie=ee("%AsyncGenerator%");Ie&&x&&(he=x(Ie.prototype))}return C[ie]=he,he},Z={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},P=o("function-bind"),Q=o("has"),B=P.call(Function.call,Array.prototype.concat),k=P.call(Function.apply,Array.prototype.splice),D=P.call(Function.call,String.prototype.replace),F=P.call(Function.call,String.prototype.slice),J=P.call(Function.call,RegExp.prototype.exec),H=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,N=/\\(\\)?/g,_=function(ie){var he=F(ie,0,1),ne=F(ie,-1);if(he==="%"&&ne!=="%")throw new f("invalid intrinsic syntax, expected closing `%`");if(ne==="%"&&he!=="%")throw new f("invalid intrinsic syntax, expected opening `%`");var Ie=[];return D(ie,H,function(q,pe,ve,xe){Ie[Ie.length]=ve?D(xe,N,"$1"):pe||q}),Ie},X=function(ie,he){var ne=ie,Ie;if(Q(Z,ne)&&(Ie=Z[ne],ne="%"+Ie[0]+"%"),Q(C,ne)){var q=C[ne];if(q===T&&(q=j(ne)),typeof q=="undefined"&&!he)throw new y("intrinsic "+ie+" exists, but is not available. Please file an issue!");return{alias:Ie,name:ne,value:q}}throw new f("intrinsic "+ie+" does not exist!")};M.exports=function(ie,he){if(typeof ie!="string"||ie.length===0)throw new y("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof he!="boolean")throw new y('"allowMissing" argument must be a boolean');if(J(/^%?[^%]*%?$/,ie)===null)throw new f("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var ne=_(ie),Ie=ne.length>0?ne[0]:"",q=X("%"+Ie+"%",he),pe=q.name,ve=q.value,xe=!1,ce=q.alias;ce&&(Ie=ce[0],k(ne,B([0,1],ce)));for(var fe=1,ge=!0;fe<ne.length;fe+=1){var Se=ne[fe],De=F(Se,0,1),ke=F(Se,-1);if((De==='"'||De==="'"||De==="`"||ke==='"'||ke==="'"||ke==="`")&&De!==ke)throw new f("property names with quotes must have matching quotes");if((Se==="constructor"||!ge)&&(xe=!0),Ie+="."+Se,pe="%"+Ie+"%",Q(C,pe))ve=C[pe];else if(ve!=null){if(!(Se in ve)){if(!he)throw new y("base intrinsic for "+ie+" exists, but the property is not available.");return}if(w&&fe+1>=ne.length){var de=w(ve,Se);ge=!!de,ge&&"get"in de&&!("originalValue"in de.get)?ve=de.get:ve=ve[Se]}else ge=Q(ve,Se),ve=ve[Se];ge&&!xe&&(C[pe]=ve)}}return ve}},{"function-bind":347,has:354,"has-proto":350,"has-symbols":351}],349:[function(o,M,R){"use strict";var p=o("get-intrinsic"),f=p("%Object.getOwnPropertyDescriptor%",!0);if(f)try{f([],"length")}catch(h){f=null}M.exports=f},{"get-intrinsic":348}],350:[function(o,M,R){"use strict";var p={foo:{}},f=Object;M.exports=function(){return{__proto__:p}.foo===p.foo&&!({__proto__:null}instanceof f)}},{}],351:[function(o,M,R){"use strict";var p=typeof Symbol!="undefined"&&Symbol,f=o("./shams");M.exports=function(){return typeof p!="function"||typeof Symbol!="function"||typeof p("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:f()}},{"./shams":352}],352:[function(o,M,R){"use strict";M.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var f={},h=Symbol("test"),y=Object(h);if(typeof h=="string"||Object.prototype.toString.call(h)!=="[object Symbol]"||Object.prototype.toString.call(y)!=="[object Symbol]")return!1;var g=42;f[h]=g;for(h in f)return!1;if(typeof Object.keys=="function"&&Object.keys(f).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(f).length!==0)return!1;var w=Object.getOwnPropertySymbols(f);if(w.length!==1||w[0]!==h||!Object.prototype.propertyIsEnumerable.call(f,h))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var c=Object.getOwnPropertyDescriptor(f,h);if(c.value!==g||c.enumerable!==!0)return!1}return!0}},{}],353:[function(o,M,R){"use strict";var p=o("has-symbols/shams");M.exports=function(){return p()&&!!Symbol.toStringTag}},{"has-symbols/shams":352}],354:[function(o,M,R){"use strict";var p=o("function-bind");M.exports=p.call(Function.call,Object.prototype.hasOwnProperty)},{"function-bind":347}],355:[function(o,M,R){var p=o("http"),f=o("url"),h=M.exports;for(var y in p)p.hasOwnProperty(y)&&(h[y]=p[y]);h.request=function(w,c){return w=g(w),p.request.call(this,w,c)},h.get=function(w,c){return w=g(w),p.get.call(this,w,c)};function g(w){if(typeof w=="string"&&(w=f.parse(w)),w.protocol||(w.protocol="https:"),w.protocol!=="https:")throw new Error('Protocol "'+w.protocol+'" not supported. Expected "https:"');return w}},{http:468,url:472}],356:[function(o,M,R){"use strict";var p=o("util"),f=o("ms");M.exports=function(h){if(typeof h=="number")return h;var y=f(h);if(y===void 0){var g=new Error(p.format("humanize-ms(%j) result undefined",h));console.warn(g.stack)}return y}},{ms:376,util:419}],357:[function(o,M,R){R.read=function(p,f,h,y,g){var w,c,m=g*8-y-1,v=(1<<m)-1,b=v>>1,x=-7,T=h?g-1:0,S=h?-1:1,C=p[f+T];for(T+=S,w=C&(1<<-x)-1,C>>=-x,x+=m;x>0;w=w*256+p[f+T],T+=S,x-=8);for(c=w&(1<<-x)-1,w>>=-x,x+=y;x>0;c=c*256+p[f+T],T+=S,x-=8);if(w===0)w=1-b;else{if(w===v)return c?NaN:(C?-1:1)*(1/0);c=c+Math.pow(2,y),w=w-b}return(C?-1:1)*c*Math.pow(2,w-y)},R.write=function(p,f,h,y,g,w){var c,m,v,b=w*8-g-1,x=(1<<b)-1,T=x>>1,S=g===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=y?0:w-1,E=y?1:-1,j=f<0||f===0&&1/f<0?1:0;for(f=Math.abs(f),isNaN(f)||f===1/0?(m=isNaN(f)?1:0,c=x):(c=Math.floor(Math.log(f)/Math.LN2),f*(v=Math.pow(2,-c))<1&&(c--,v*=2),c+T>=1?f+=S/v:f+=S*Math.pow(2,1-T),f*v>=2&&(c++,v/=2),c+T>=x?(m=0,c=x):c+T>=1?(m=(f*v-1)*Math.pow(2,g),c=c+T):(m=f*Math.pow(2,T-1)*Math.pow(2,g),c=0));g>=8;p[h+C]=m&255,C+=E,m/=256,g-=8);for(c=c<<g|m,b+=g;b>0;p[h+C]=c&255,C+=E,c/=256,b-=8);p[h+C-E]|=j*128}},{}],358:[function(o,M,R){"use strict";var p=[o("./nextTick"),o("./queueMicrotask"),o("./mutation.js"),o("./messageChannel"),o("./stateChange"),o("./timeout")],f,h,y=-1,g=[],w=!1;function c(){!f||!h||(f=!1,h.length?g=h.concat(g):y=-1,g.length&&m())}function m(){if(!f){w=!1,f=!0;for(var C=g.length,E=setTimeout(c);C;){for(h=g,g=[];h&&++y<C;)h[y].run();y=-1,C=g.length}h=null,y=-1,f=!1,clearTimeout(E)}}for(var v,b=-1,x=p.length;++b<x;)if(p[b]&&p[b].test&&p[b].test()){v=p[b].install(m);break}function T(C,E){this.fun=C,this.array=E}T.prototype.run=function(){var C=this.fun,E=this.array;switch(E.length){case 0:return C();case 1:return C(E[0]);case 2:return C(E[0],E[1]);case 3:return C(E[0],E[1],E[2]);default:return C.apply(null,E)}},M.exports=S;function S(C){var E=new Array(arguments.length-1);if(arguments.length>1)for(var j=1;j<arguments.length;j++)E[j-1]=arguments[j];g.push(new T(C,E)),!w&&!f&&(w=!0,v())}},{"./messageChannel":359,"./mutation.js":360,"./nextTick":89,"./queueMicrotask":361,"./stateChange":362,"./timeout":363}],359:[function(o,M,R){(function(p){(function(){"use strict";R.test=function(){return p.setImmediate?!1:typeof p.MessageChannel!="undefined"},R.install=function(f){var h=new p.MessageChannel;return h.port1.onmessage=f,function(){h.port2.postMessage(0)}}}).call(this)}).call(this,typeof mt!="undefined"?mt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],360:[function(o,M,R){(function(p){(function(){"use strict";var f=p.MutationObserver||p.WebKitMutationObserver;R.test=function(){return f},R.install=function(h){var y=0,g=new f(h),w=p.document.createTextNode("");return g.observe(w,{characterData:!0}),function(){w.data=y=++y%2}}}).call(this)}).call(this,typeof mt!="undefined"?mt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],361:[function(o,M,R){(function(p){(function(){"use strict";R.test=function(){return typeof p.queueMicrotask=="function"},R.install=function(f){return function(){p.queueMicrotask(f)}}}).call(this)}).call(this,typeof mt!="undefined"?mt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],362:[function(o,M,R){(function(p){(function(){"use strict";R.test=function(){return"document"in p&&"onreadystatechange"in p.document.createElement("script")},R.install=function(f){return function(){var h=p.document.createElement("script");return h.onreadystatechange=function(){f(),h.onreadystatechange=null,h.parentNode.removeChild(h),h=null},p.document.documentElement.appendChild(h),f}}}).call(this)}).call(this,typeof mt!="undefined"?mt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],363:[function(o,M,R){"use strict";R.test=function(){return!0},R.install=function(p){return function(){setTimeout(p,0)}}},{}],364:[function(o,M,R){typeof Object.create=="function"?M.exports=function(f,h){h&&(f.super_=h,f.prototype=Object.create(h.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}))}:M.exports=function(f,h){if(h){f.super_=h;var y=function(){};y.prototype=h.prototype,f.prototype=new y,f.prototype.constructor=f}}},{}],365:[function(o,M,R){"use strict";var p=o("has-tostringtag/shams")(),f=o("call-bind/callBound"),h=f("Object.prototype.toString"),y=function(m){return p&&m&&typeof m=="object"&&Symbol.toStringTag in m?!1:h(m)==="[object Arguments]"},g=function(m){return y(m)?!0:m!==null&&typeof m=="object"&&typeof m.length=="number"&&m.length>=0&&h(m)!=="[object Array]"&&h(m.callee)==="[object Function]"},w=function(){return y(arguments)}();y.isLegacyArguments=g,M.exports=w?y:g},{"call-bind/callBound":92,"has-tostringtag/shams":353}],366:[function(o,M,R){M.exports=function(h){return h!=null&&(p(h)||f(h)||!!h._isBuffer)};function p(h){return!!h.constructor&&typeof h.constructor.isBuffer=="function"&&h.constructor.isBuffer(h)}function f(h){return typeof h.readFloatLE=="function"&&typeof h.slice=="function"&&p(h.slice(0,0))}},{}],367:[function(o,M,R){"use strict";var p=Function.prototype.toString,f=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,h,y;if(typeof f=="function"&&typeof Object.defineProperty=="function")try{h=Object.defineProperty({},"length",{get:function(){throw y}}),y={},f(function(){throw 42},null,h)}catch(Q){Q!==y&&(f=null)}else f=null;var g=/^\s*class\b/,w=function(B){try{var k=p.call(B);return g.test(k)}catch(D){return!1}},c=function(B){try{return w(B)?!1:(p.call(B),!0)}catch(k){return!1}},m=Object.prototype.toString,v="[object Object]",b="[object Function]",x="[object GeneratorFunction]",T="[object HTMLAllCollection]",S="[object HTML document.all class]",C="[object HTMLCollection]",E=typeof Symbol=="function"&&!!Symbol.toStringTag,j=!(0 in[,]),Z=function(){return!1};if(typeof document=="object"){var P=document.all;m.call(P)===m.call(document.all)&&(Z=function(B){if((j||!B)&&(typeof B=="undefined"||typeof B=="object"))try{var k=m.call(B);return(k===T||k===S||k===C||k===v)&&B("")==null}catch(D){}return!1})}M.exports=f?function(B){if(Z(B))return!0;if(!B||typeof B!="function"&&typeof B!="object")return!1;try{f(B,null,h)}catch(k){if(k!==y)return!1}return!w(B)&&c(B)}:function(B){if(Z(B))return!0;if(!B||typeof B!="function"&&typeof B!="object")return!1;if(E)return c(B);if(w(B))return!1;var k=m.call(B);return k!==b&&k!==x&&!/^\[object HTML/.test(k)?!1:c(B)}},{}],368:[function(o,M,R){"use strict";var p=Object.prototype.toString,f=Function.prototype.toString,h=/^\s*(?:function)?\*/,y=o("has-tostringtag/shams")(),g=Object.getPrototypeOf,w=function(){if(!y)return!1;try{return Function("return function*() {}")()}catch(m){}},c;M.exports=function(v){if(typeof v!="function")return!1;if(h.test(f.call(v)))return!0;if(!y){var b=p.call(v);return b==="[object GeneratorFunction]"}if(!g)return!1;if(typeof c=="undefined"){var x=w();c=x?g(x):!1}return g(v)===c}},{"has-tostringtag/shams":353}],369:[function(o,M,R){"use strict";var p=o("which-typed-array");M.exports=function(h){return!!p(h)}},{"which-typed-array":420}],370:[function(o,M,R){var p={}.toString;M.exports=Array.isArray||function(f){return p.call(f)=="[object Array]"}},{}],371:[function(o,M,R){(function(p){(function(){(function(f,h){typeof R=="object"&&typeof M!="undefined"?M.exports=h(f):typeof Te=="function"&&Te.amd?Te(h):h(f)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof p!="undefined"?p:this,function(f){"use strict";f=f||{};var h=f.Base64,y="2.6.4",g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",w=function(ie){for(var he={},ne=0,Ie=ie.length;ne<Ie;ne++)he[ie.charAt(ne)]=ne;return he}(g),c=String.fromCharCode,m=function(ie){if(ie.length<2){var he=ie.charCodeAt(0);return he<128?ie:he<2048?c(192|he>>>6)+c(128|he&63):c(224|he>>>12&15)+c(128|he>>>6&63)+c(128|he&63)}else{var he=65536+(ie.charCodeAt(0)-55296)*1024+(ie.charCodeAt(1)-56320);return c(240|he>>>18&7)+c(128|he>>>12&63)+c(128|he>>>6&63)+c(128|he&63)}},v=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,b=function(ie){return ie.replace(v,m)},x=function(ie){var he=[0,2,1][ie.length%3],ne=ie.charCodeAt(0)<<16|(ie.length>1?ie.charCodeAt(1):0)<<8|(ie.length>2?ie.charCodeAt(2):0),Ie=[g.charAt(ne>>>18),g.charAt(ne>>>12&63),he>=2?"=":g.charAt(ne>>>6&63),he>=1?"=":g.charAt(ne&63)];return Ie.join("")},T=f.btoa&&typeof f.btoa=="function"?function(ie){return f.btoa(ie)}:function(ie){if(ie.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return ie.replace(/[\s\S]{1,3}/g,x)},S=function(ie){return T(b(String(ie)))},C=function(ie){return ie.replace(/[+\/]/g,function(he){return he=="+"?"-":"_"}).replace(/=/g,"")},E=function(ie,he){return he?C(S(ie)):S(ie)},j=function(ie){return E(ie,!0)},Z;f.Uint8Array&&(Z=function(ie,he){for(var ne="",Ie=0,q=ie.length;Ie<q;Ie+=3){var pe=ie[Ie],ve=ie[Ie+1],xe=ie[Ie+2],ce=pe<<16|ve<<8|xe;ne+=g.charAt(ce>>>18)+g.charAt(ce>>>12&63)+(typeof ve!="undefined"?g.charAt(ce>>>6&63):"=")+(typeof xe!="undefined"?g.charAt(ce&63):"=")}return he?C(ne):ne});var P=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Q=function(ie){switch(ie.length){case 4:var he=(7&ie.charCodeAt(0))<<18|(63&ie.charCodeAt(1))<<12|(63&ie.charCodeAt(2))<<6|63&ie.charCodeAt(3),ne=he-65536;return c((ne>>>10)+55296)+c((ne&1023)+56320);case 3:return c((15&ie.charCodeAt(0))<<12|(63&ie.charCodeAt(1))<<6|63&ie.charCodeAt(2));default:return c((31&ie.charCodeAt(0))<<6|63&ie.charCodeAt(1))}},B=function(ie){return ie.replace(P,Q)},k=function(ie){var he=ie.length,ne=he%4,Ie=(he>0?w[ie.charAt(0)]<<18:0)|(he>1?w[ie.charAt(1)]<<12:0)|(he>2?w[ie.charAt(2)]<<6:0)|(he>3?w[ie.charAt(3)]:0),q=[c(Ie>>>16),c(Ie>>>8&255),c(Ie&255)];return q.length-=[0,0,2,1][ne],q.join("")},D=f.atob&&typeof f.atob=="function"?function(ie){return f.atob(ie)}:function(ie){return ie.replace(/\S{1,4}/g,k)},F=function(ie){return D(String(ie).replace(/[^A-Za-z0-9\+\/]/g,""))},J=function(ie){return B(D(ie))},H=function(ie){return String(ie).replace(/[-_]/g,function(he){return he=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},N=function(ie){return J(H(ie))},_;f.Uint8Array&&(_=function(ie){return Uint8Array.from(F(H(ie)),function(he){return he.charCodeAt(0)})});var X=function(){var ie=f.Base64;return f.Base64=h,ie};if(f.Base64={VERSION:y,atob:F,btoa:T,fromBase64:N,toBase64:E,utob:b,encode:E,encodeURI:j,btou:B,decode:N,noConflict:X,fromUint8Array:Z,toUint8Array:_},typeof Object.defineProperty=="function"){var ee=function(ie){return{value:ie,enumerable:!1,writable:!0,configurable:!0}};f.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",ee(function(){return N(this)})),Object.defineProperty(String.prototype,"toBase64",ee(function(ie){return E(this,ie)})),Object.defineProperty(String.prototype,"toBase64URI",ee(function(){return E(this,!0)}))}}return f.Meteor&&(Base64=f.Base64),typeof M!="undefined"&&M.exports?M.exports.Base64=f.Base64:typeof Te=="function"&&Te.amd&&Te([],function(){return f.Base64}),{Base64:f.Base64}})}).call(this)}).call(this,typeof mt!="undefined"?mt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],372:[function(o,M,R){"use strict";M.exports=f;var p=Object.prototype.hasOwnProperty;function f(h,y,g){if(!h)throw new TypeError("argument dest is required");if(!y)throw new TypeError("argument src is required");return g===void 0&&(g=!0),Object.getOwnPropertyNames(y).forEach(function(c){if(!(!g&&p.call(h,c))){var m=Object.getOwnPropertyDescriptor(y,c);Object.defineProperty(h,c,m)}}),h}},{}],373:[function(o,M,R){"use strict";o("core-js/modules/es.array.map.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.replace.js"),o("core-js/modules/es.regexp.constructor.js"),o("core-js/modules/es.regexp.to-string.js");function p(){this._types=Object.create(null),this._extensions=Object.create(null);for(var f=0;f<arguments.length;f++)this.define(arguments[f]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}p.prototype.define=function(f,h){for(var y in f){var g=f[y].map(function(v){return v.toLowerCase()});y=y.toLowerCase();for(var w=0;w<g.length;w++){var c=g[w];if(c[0]!=="*"){if(!h&&c in this._types)throw new Error('Attempt to change mapping for "'+c+'" extension from "'+this._types[c]+'" to "'+y+'". Pass `force=true` to allow this, otherwise remove "'+c+'" from the list of extensions for "'+y+'".');this._types[c]=y}}if(h||!this._extensions[y]){var m=g[0];this._extensions[y]=m[0]!=="*"?m:m.substr(1)}}},p.prototype.getType=function(f){f=String(f);var h=f.replace(/^.*[/\\]/,"").toLowerCase(),y=h.replace(/^.*\./,"").toLowerCase(),g=h.length<f.length,w=y.length<h.length-1;return(w||!g)&&this._types[y]||null},p.prototype.getExtension=function(f){return f=/^\s*([^;\s]*)/.test(f)&&RegExp.$1,f&&this._extensions[f.toLowerCase()]||null},M.exports=p},{"core-js/modules/es.array.map.js":280,"core-js/modules/es.regexp.constructor.js":299,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305}],374:[function(o,M,R){"use strict";var p=o("./Mime");M.exports=new p(o("./types/standard"))},{"./Mime":373,"./types/standard":375}],375:[function(o,M,R){"use strict";M.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}},{}],376:[function(o,M,R){var p=1e3,f=p*60,h=f*60,y=h*24,g=y*7,w=y*365.25;M.exports=function(x,T){T=T||{};var S=typeof x;if(S==="string"&&x.length>0)return c(x);if(S==="number"&&isFinite(x))return T.long?v(x):m(x);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(x))};function c(x){if(x=String(x),!(x.length>100)){var T=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(x);if(T){var S=parseFloat(T[1]),C=(T[2]||"ms").toLowerCase();switch(C){case"years":case"year":case"yrs":case"yr":case"y":return S*w;case"weeks":case"week":case"w":return S*g;case"days":case"day":case"d":return S*y;case"hours":case"hour":case"hrs":case"hr":case"h":return S*h;case"minutes":case"minute":case"mins":case"min":case"m":return S*f;case"seconds":case"second":case"secs":case"sec":case"s":return S*p;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return S;default:return}}}}function m(x){var T=Math.abs(x);return T>=y?Math.round(x/y)+"d":T>=h?Math.round(x/h)+"h":T>=f?Math.round(x/f)+"m":T>=p?Math.round(x/p)+"s":x+"ms"}function v(x){var T=Math.abs(x);return T>=y?b(x,T,y,"day"):T>=h?b(x,T,h,"hour"):T>=f?b(x,T,f,"minute"):T>=p?b(x,T,p,"second"):x+" ms"}function b(x,T,S,C){var E=T>=S*1.5;return Math.round(x/S)+" "+C+(E?"s":"")}},{}],377:[function(o,M,R){"use strict";var p=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable;function y(w){if(w==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(w)}function g(){try{if(!Object.assign)return!1;var w=new String("abc");if(w[5]="de",Object.getOwnPropertyNames(w)[0]==="5")return!1;for(var c={},m=0;m<10;m++)c["_"+String.fromCharCode(m)]=m;var v=Object.getOwnPropertyNames(c).map(function(x){return c[x]});if(v.join("")!=="0123456789")return!1;var b={};return"abcdefghijklmnopqrst".split("").forEach(function(x){b[x]=x}),Object.keys(Object.assign({},b)).join("")==="abcdefghijklmnopqrst"}catch(x){return!1}}M.exports=g()?Object.assign:function(w,c){for(var m,v=y(w),b,x=1;x<arguments.length;x++){m=Object(arguments[x]);for(var T in m)f.call(m,T)&&(v[T]=m[T]);if(p){b=p(m);for(var S=0;S<b.length;S++)h.call(m,b[S])&&(v[b[S]]=m[b[S]])}}return v}},{}],378:[function(o,M,R){(function(p){(function(){"use strict";function f(w){if(typeof w!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(w))}function h(w,c){for(var m="",v=0,b=-1,x=0,T,S=0;S<=w.length;++S){if(S<w.length)T=w.charCodeAt(S);else{if(T===47)break;T=47}if(T===47){if(!(b===S-1||x===1))if(b!==S-1&&x===2){if(m.length<2||v!==2||m.charCodeAt(m.length-1)!==46||m.charCodeAt(m.length-2)!==46){if(m.length>2){var C=m.lastIndexOf("/");if(C!==m.length-1){C===-1?(m="",v=0):(m=m.slice(0,C),v=m.length-1-m.lastIndexOf("/")),b=S,x=0;continue}}else if(m.length===2||m.length===1){m="",v=0,b=S,x=0;continue}}c&&(m.length>0?m+="/..":m="..",v=2)}else m.length>0?m+="/"+w.slice(b+1,S):m=w.slice(b+1,S),v=S-b-1;b=S,x=0}else T===46&&x!==-1?++x:x=-1}return m}function y(w,c){var m=c.dir||c.root,v=c.base||(c.name||"")+(c.ext||"");return m?m===c.root?m+v:m+w+v:v}var g={resolve:function(){for(var c="",m=!1,v,b=arguments.length-1;b>=-1&&!m;b--){var x;b>=0?x=arguments[b]:(v===void 0&&(v=p.cwd()),x=v),f(x),x.length!==0&&(c=x+"/"+c,m=x.charCodeAt(0)===47)}return c=h(c,!m),m?c.length>0?"/"+c:"/":c.length>0?c:"."},normalize:function(c){if(f(c),c.length===0)return".";var m=c.charCodeAt(0)===47,v=c.charCodeAt(c.length-1)===47;return c=h(c,!m),c.length===0&&!m&&(c="."),c.length>0&&v&&(c+="/"),m?"/"+c:c},isAbsolute:function(c){return f(c),c.length>0&&c.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var c,m=0;m<arguments.length;++m){var v=arguments[m];f(v),v.length>0&&(c===void 0?c=v:c+="/"+v)}return c===void 0?".":g.normalize(c)},relative:function(c,m){if(f(c),f(m),c===m||(c=g.resolve(c),m=g.resolve(m),c===m))return"";for(var v=1;v<c.length&&c.charCodeAt(v)===47;++v);for(var b=c.length,x=b-v,T=1;T<m.length&&m.charCodeAt(T)===47;++T);for(var S=m.length,C=S-T,E=x<C?x:C,j=-1,Z=0;Z<=E;++Z){if(Z===E){if(C>E){if(m.charCodeAt(T+Z)===47)return m.slice(T+Z+1);if(Z===0)return m.slice(T+Z)}else x>E&&(c.charCodeAt(v+Z)===47?j=Z:Z===0&&(j=0));break}var P=c.charCodeAt(v+Z),Q=m.charCodeAt(T+Z);if(P!==Q)break;P===47&&(j=Z)}var B="";for(Z=v+j+1;Z<=b;++Z)(Z===b||c.charCodeAt(Z)===47)&&(B.length===0?B+="..":B+="/..");return B.length>0?B+m.slice(T+j):(T+=j,m.charCodeAt(T)===47&&++T,m.slice(T))},_makeLong:function(c){return c},dirname:function(c){if(f(c),c.length===0)return".";for(var m=c.charCodeAt(0),v=m===47,b=-1,x=!0,T=c.length-1;T>=1;--T)if(m=c.charCodeAt(T),m===47){if(!x){b=T;break}}else x=!1;return b===-1?v?"/":".":v&&b===1?"//":c.slice(0,b)},basename:function(c,m){if(m!==void 0&&typeof m!="string")throw new TypeError('"ext" argument must be a string');f(c);var v=0,b=-1,x=!0,T;if(m!==void 0&&m.length>0&&m.length<=c.length){if(m.length===c.length&&m===c)return"";var S=m.length-1,C=-1;for(T=c.length-1;T>=0;--T){var E=c.charCodeAt(T);if(E===47){if(!x){v=T+1;break}}else C===-1&&(x=!1,C=T+1),S>=0&&(E===m.charCodeAt(S)?--S===-1&&(b=T):(S=-1,b=C))}return v===b?b=C:b===-1&&(b=c.length),c.slice(v,b)}else{for(T=c.length-1;T>=0;--T)if(c.charCodeAt(T)===47){if(!x){v=T+1;break}}else b===-1&&(x=!1,b=T+1);return b===-1?"":c.slice(v,b)}},extname:function(c){f(c);for(var m=-1,v=0,b=-1,x=!0,T=0,S=c.length-1;S>=0;--S){var C=c.charCodeAt(S);if(C===47){if(!x){v=S+1;break}continue}b===-1&&(x=!1,b=S+1),C===46?m===-1?m=S:T!==1&&(T=1):m!==-1&&(T=-1)}return m===-1||b===-1||T===0||T===1&&m===b-1&&m===v+1?"":c.slice(m,b)},format:function(c){if(c===null||typeof c!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof c);return y("/",c)},parse:function(c){f(c);var m={root:"",dir:"",base:"",ext:"",name:""};if(c.length===0)return m;var v=c.charCodeAt(0),b=v===47,x;b?(m.root="/",x=1):x=0;for(var T=-1,S=0,C=-1,E=!0,j=c.length-1,Z=0;j>=x;--j){if(v=c.charCodeAt(j),v===47){if(!E){S=j+1;break}continue}C===-1&&(E=!1,C=j+1),v===46?T===-1?T=j:Z!==1&&(Z=1):T!==-1&&(Z=-1)}return T===-1||C===-1||Z===0||Z===1&&T===C-1&&T===S+1?C!==-1&&(S===0&&b?m.base=m.name=c.slice(1,C):m.base=m.name=c.slice(S,C)):(S===0&&b?(m.name=c.slice(1,T),m.base=c.slice(1,C)):(m.name=c.slice(S,T),m.base=c.slice(S,C)),m.ext=c.slice(T,C)),S>0?m.dir=c.slice(0,S-1):b&&(m.dir="/"),m},sep:"/",delimiter:":",win32:null,posix:null};g.posix=g,M.exports=g}).call(this)}).call(this,o("_process"))},{_process:467}],379:[function(o,M,R){(function(p){(function(){(function(){"use strict";var f={function:!0,object:!0},h=f[typeof window]&&window||this,y=h,g=f[typeof R]&&R,w=f[typeof M]&&M&&!M.nodeType&&M,c=g&&w&&typeof p=="object"&&p;c&&(c.global===c||c.window===c||c.self===c)&&(h=c);var m=Math.pow(2,53)-1,v=/\bOpera/,b=this,x=Object.prototype,T=x.hasOwnProperty,S=x.toString;function C(N){return N=String(N),N.charAt(0).toUpperCase()+N.slice(1)}function E(N,_,X){var ee={"10.0":"10","6.4":"10 Technical Preview","6.3":"8.1","6.2":"8","6.1":"Server 2008 R2 / 7","6.0":"Server 2008 / Vista","5.2":"Server 2003 / XP 64-bit","5.1":"XP","5.01":"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return _&&X&&/^Win/i.test(N)&&!/^Windows Phone /i.test(N)&&(ee=ee[/[\d.]+$/.exec(N)])&&(N="Windows "+ee),N=String(N),_&&X&&(N=N.replace(RegExp(_,"i"),X)),N=Z(N.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0]),N}function j(N,_){var X=-1,ee=N?N.length:0;if(typeof ee=="number"&&ee>-1&&ee<=m)for(;++X<ee;)_(N[X],X,N);else P(N,_)}function Z(N){return N=F(N),/^(?:webOS|i(?:OS|P))/.test(N)?N:C(N)}function P(N,_){for(var X in N)T.call(N,X)&&_(N[X],X,N)}function Q(N){return N==null?C(N):S.call(N).slice(8,-1)}function B(N,_){var X=N!=null?typeof N[_]:"number";return!/^(?:boolean|number|string|undefined)$/.test(X)&&(X=="object"?!!N[_]:!0)}function k(N){return String(N).replace(/([ -])(?!$)/g,"$1?")}function D(N,_){var X=null;return j(N,function(ee,ie){X=_(X,ee,ie,N)}),X}function F(N){return String(N).replace(/^ +| +$/g,"")}function J(N){var _=h,X=N&&typeof N=="object"&&Q(N)!="String";X&&(_=N,N=null);var ee=_.navigator||{},ie=ee.userAgent||"";N||(N=ie);var he=X||b==y,ne=X?!!ee.likeChrome:/\bChrome\b/.test(N)&&!/internal|\n/i.test(S.toString()),Ie="Object",q=X?Ie:"ScriptBridgingProxyObject",pe=X?Ie:"Environment",ve=X&&_.java?"JavaPackage":Q(_.java),xe=X?Ie:"RuntimeObject",ce=/\bJava/.test(ve)&&_.java,fe=ce&&Q(_.environment)==pe,ge=ce?"a":"\u03B1",Se=ce?"b":"\u03B2",De=_.document||{},ke=_.operamini||_.opera,de=v.test(de=X&&ke?ke["[[Class]]"]:Q(ke))?de:ke=null,Y,ye=N,V=[],G=null,W=N==ie,K=W&&ke&&typeof ke.version=="function"&&ke.version(),te,U=ze([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),L=le(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"(?:Edge|Edg|EdgA|EdgiOS)"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Vivaldi","Waterfox","WebPositive",{label:"Yandex Browser",pattern:"YaBrowser"},{label:"UC Browser",pattern:"UCBrowser"},"Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chromium","Chrome",{label:"Chrome",pattern:"(?:HeadlessChrome)"},{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),$=Me([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),ue=_e({Apple:{iPad:1,iPhone:1,iPod:1},Alcatel:{},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},Huawei:{},Lenovo:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Oppo:{},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1},Xiaomi:{Mi:1,Redmi:1}}),Ee=Re(["Windows Phone","KaiOS","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian",{label:"DragonFly BSD",pattern:"DragonFly"},"Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);function ze($e){return D($e,function(rt,qe){return rt||RegExp("\\b"+(qe.pattern||k(qe))+"\\b","i").exec(N)&&(qe.label||qe)})}function _e($e){return D($e,function(rt,qe,pt){return rt||(qe[$]||qe[/^[a-z]+(?: +[a-z]+\b)*/i.exec($)]||RegExp("\\b"+k(pt)+"(?:\\b|\\w*\\d)","i").exec(N))&&pt})}function le($e){return D($e,function(rt,qe){return rt||RegExp("\\b"+(qe.pattern||k(qe))+"\\b","i").exec(N)&&(qe.label||qe)})}function Re($e){return D($e,function(rt,qe){var pt=qe.pattern||k(qe);return!rt&&(rt=RegExp("\\b"+pt+"(?:/[\\d.]+|[ \\w.]*)","i").exec(N))&&(rt=E(rt,pt,qe.label||qe)),rt})}function Me($e){return D($e,function(rt,qe){var pt=qe.pattern||k(qe);return!rt&&(rt=RegExp("\\b"+pt+" *\\d+[.\\w_]*","i").exec(N)||RegExp("\\b"+pt+" *\\w+-[\\w]*","i").exec(N)||RegExp("\\b"+pt+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(N))&&((rt=String(qe.label&&!RegExp(pt,"i").test(qe.label)?qe.label:rt).split("/"))[1]&&!/[\d.]+/.test(rt[0])&&(rt[0]+=" "+rt[1]),qe=qe.label||qe,rt=Z(rt[0].replace(RegExp(pt,"i"),qe).replace(RegExp("; *(?:"+qe+"[_-])?","i")," ").replace(RegExp("("+qe+")[-_.]?(\\w)","i"),"$1 $2"))),rt})}function He($e){return D($e,function(rt,qe){return rt||(RegExp(qe+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(N)||0)[1]||null})}function Be(){return this.description||""}if(U&&(U=[U]),/\bAndroid\b/.test(Ee)&&!$&&(Y=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(N))&&($=F(Y[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),ue&&!$?$=Me([ue]):ue&&$&&($=$.replace(RegExp("^("+k(ue)+")[-_.\\s]","i"),ue+" ").replace(RegExp("^("+k(ue)+")[-_.]?(\\w)","i"),ue+" $2")),(Y=/\bGoogle TV\b/.exec($))&&($=Y[0]),/\bSimulator\b/i.test(N)&&($=($?$+" ":"")+"Simulator"),L=="Opera Mini"&&/\bOPiOS\b/.test(N)&&V.push("running in Turbo/Uncompressed mode"),L=="IE"&&/\blike iPhone OS\b/.test(N)?(Y=J(N.replace(/like iPhone OS/,"")),ue=Y.manufacturer,$=Y.product):/^iP/.test($)?(L||(L="Safari"),Ee="iOS"+((Y=/ OS ([\d_]+)/i.exec(N))?" "+Y[1].replace(/_/g,"."):"")):L=="Konqueror"&&/^Linux\b/i.test(Ee)?Ee="Kubuntu":ue&&ue!="Google"&&(/Chrome/.test(L)&&!/\bMobile Safari\b/i.test(N)||/\bVita\b/.test($))||/\bAndroid\b/.test(Ee)&&/^Chrome/.test(L)&&/\bVersion\//i.test(N)?(L="Android Browser",Ee=/\bAndroid\b/.test(Ee)?Ee:"Android"):L=="Silk"?(/\bMobi/i.test(N)||(Ee="Android",V.unshift("desktop mode")),/Accelerated *= *true/i.test(N)&&V.unshift("accelerated")):L=="UC Browser"&&/\bUCWEB\b/.test(N)?V.push("speed mode"):L=="PaleMoon"&&(Y=/\bFirefox\/([\d.]+)\b/.exec(N))?V.push("identifying as Firefox "+Y[1]):L=="Firefox"&&(Y=/\b(Mobile|Tablet|TV)\b/i.exec(N))?(Ee||(Ee="Firefox OS"),$||($=Y[1])):!L||(Y=!/\bMinefield\b/i.test(N)&&/\b(?:Firefox|Safari)\b/.exec(L))?(L&&!$&&/[\/,]|^[^(]+?\)/.test(N.slice(N.indexOf(Y+"/")+8))&&(L=null),(Y=$||ue||Ee)&&($||ue||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(Ee))&&(L=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(Ee)?Ee:Y)+" Browser")):L=="Electron"&&(Y=(/\bChrome\/([\d.]+)\b/.exec(N)||0)[1])&&V.push("Chromium "+Y),K||(K=He(["(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)","Version",k(L),"(?:Firefox|Minefield|NetFront)"])),(Y=U=="iCab"&&parseFloat(K)>3&&"WebKit"||/\bOpera\b/.test(L)&&(/\bOPR\b/.test(N)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(N)&&!/^(?:Trident|EdgeHTML)$/.test(U)&&"WebKit"||!U&&/\bMSIE\b/i.test(N)&&(Ee=="Mac OS"?"Tasman":"Trident")||U=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(L)&&"NetFront")&&(U=[Y]),L=="IE"&&(Y=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(N)||0)[1])?(L+=" Mobile",Ee="Windows Phone "+(/\+$/.test(Y)?Y:Y+".x"),V.unshift("desktop mode")):/\bWPDesktop\b/i.test(N)?(L="IE Mobile",Ee="Windows Phone 8.x",V.unshift("desktop mode"),K||(K=(/\brv:([\d.]+)/.exec(N)||0)[1])):L!="IE"&&U=="Trident"&&(Y=/\brv:([\d.]+)/.exec(N))&&(L&&V.push("identifying as "+L+(K?" "+K:"")),L="IE",K=Y[1]),W){if(B(_,"global"))if(ce&&(Y=ce.lang.System,ye=Y.getProperty("os.arch"),Ee=Ee||Y.getProperty("os.name")+" "+Y.getProperty("os.version")),fe){try{K=_.require("ringo/engine").version.join("."),L="RingoJS"}catch($e){(Y=_.system)&&Y.global.system==_.system&&(L="Narwhal",Ee||(Ee=Y[0].os||null))}L||(L="Rhino")}else typeof _.process=="object"&&!_.process.browser&&(Y=_.process)&&(typeof Y.versions=="object"&&(typeof Y.versions.electron=="string"?(V.push("Node "+Y.versions.node),L="Electron",K=Y.versions.electron):typeof Y.versions.nw=="string"&&(V.push("Chromium "+K,"Node "+Y.versions.node),L="NW.js",K=Y.versions.nw)),L||(L="Node.js",ye=Y.arch,Ee=Y.platform,K=/[\d.]+/.exec(Y.version),K=K?K[0]:null));else Q(Y=_.runtime)==q?(L="Adobe AIR",Ee=Y.flash.system.Capabilities.os):Q(Y=_.phantom)==xe?(L="PhantomJS",K=(Y=Y.version||null)&&Y.major+"."+Y.minor+"."+Y.patch):typeof De.documentMode=="number"&&(Y=/\bTrident\/(\d+)/i.exec(N))?(K=[K,De.documentMode],(Y=+Y[1]+4)!=K[1]&&(V.push("IE "+K[1]+" mode"),U&&(U[1]=""),K[1]=Y),K=L=="IE"?String(K[1].toFixed(1)):K[0]):typeof De.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(L)&&(V.push("masking as "+L+" "+K),L="IE",K="11.0",U=["Trident"],Ee="Windows");Ee=Ee&&Z(Ee)}if(K&&(Y=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(K)||/(?:alpha|beta)(?: ?\d)?/i.exec(N+";"+(W&&ee.appMinorVersion))||/\bMinefield\b/i.test(N)&&"a")&&(G=/b/i.test(Y)?"beta":"alpha",K=K.replace(RegExp(Y+"\\+?$"),"")+(G=="beta"?Se:ge)+(/\d+\+?/.exec(Y)||"")),L=="Fennec"||L=="Firefox"&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(Ee))L="Firefox Mobile";else if(L=="Maxthon"&&K)K=K.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test($))$=="Xbox 360"&&(Ee=null),$=="Xbox 360"&&/\bIEMobile\b/.test(N)&&V.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(L)||L&&!$&&!/Browser|Mobi/.test(L))&&(Ee=="Windows CE"||/Mobi/i.test(N)))L+=" Mobile";else if(L=="IE"&&W)try{_.external===null&&V.unshift("platform preview")}catch($e){V.unshift("embedded")}else(/\bBlackBerry\b/.test($)||/\bBB10\b/.test(N))&&(Y=(RegExp($.replace(/ +/g," *")+"/([.\\d]+)","i").exec(N)||0)[1]||K)?(Y=[Y,/BB10/.test(N)],Ee=(Y[1]?($=null,ue="BlackBerry"):"Device Software")+" "+Y[0],K=null):this!=P&&$!="Wii"&&(W&&ke||/Opera/.test(L)&&/\b(?:MSIE|Firefox)\b/i.test(N)||L=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(Ee)||L=="IE"&&(Ee&&!/^Win/.test(Ee)&&K>5.5||/\bWindows XP\b/.test(Ee)&&K>8||K==8&&!/\bTrident\b/.test(N)))&&!v.test(Y=J.call(P,N.replace(v,"")+";"))&&Y.name&&(Y="ing as "+Y.name+((Y=Y.version)?" "+Y:""),v.test(L)?(/\bIE\b/.test(Y)&&Ee=="Mac OS"&&(Ee=null),Y="identify"+Y):(Y="mask"+Y,de?L=Z(de.replace(/([a-z])([A-Z])/g,"$1 $2")):L="Opera",/\bIE\b/.test(Y)&&(Ee=null),W||(K=null)),U=["Presto"],V.push(Y));(Y=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(N)||0)[1])&&(Y=[parseFloat(Y.replace(/\.(\d)$/,".0$1")),Y],L=="Safari"&&Y[1].slice(-1)=="+"?(L="WebKit Nightly",G="alpha",K=Y[1].slice(0,-1)):(K==Y[1]||K==(Y[2]=(/\bSafari\/([\d.]+\+?)/i.exec(N)||0)[1]))&&(K=null),Y[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(N)||0)[1],Y[0]==537.36&&Y[2]==537.36&&parseFloat(Y[1])>=28&&U=="WebKit"&&(U=["Blink"]),!W||!ne&&!Y[1]?(U&&(U[1]="like Safari"),Y=(Y=Y[0],Y<400?1:Y<500?2:Y<526?3:Y<533?4:Y<534?"4+":Y<535?5:Y<537?6:Y<538?7:Y<601?8:Y<602?9:Y<604?10:Y<606?11:Y<608?12:"12")):(U&&(U[1]="like Chrome"),Y=Y[1]||(Y=Y[0],Y<530?1:Y<532?2:Y<532.05?3:Y<533?4:Y<534.03?5:Y<534.07?6:Y<534.1?7:Y<534.13?8:Y<534.16?9:Y<534.24?10:Y<534.3?11:Y<535.01?12:Y<535.02?"13+":Y<535.07?15:Y<535.11?16:Y<535.19?17:Y<536.05?18:Y<536.1?19:Y<537.01?20:Y<537.11?"21+":Y<537.13?23:Y<537.18?24:Y<537.24?25:Y<537.36?26:U!="Blink"?"27":"28")),U&&(U[1]+=" "+(Y+=typeof Y=="number"?".x":/[.+]/.test(Y)?"":"+")),L=="Safari"&&(!K||parseInt(K)>45)?K=Y:L=="Chrome"&&/\bHeadlessChrome/i.test(N)&&V.unshift("headless")),L=="Opera"&&(Y=/\bzbov|zvav$/.exec(Ee))?(L+=" ",V.unshift("desktop mode"),Y=="zvav"?(L+="Mini",K=null):L+="Mobile",Ee=Ee.replace(RegExp(" *"+Y+"$"),"")):L=="Safari"&&/\bChrome\b/.exec(U&&U[1])?(V.unshift("desktop mode"),L="Chrome Mobile",K=null,/\bOS X\b/.test(Ee)?(ue="Apple",Ee="iOS 4.3+"):Ee=null):/\bSRWare Iron\b/.test(L)&&!K&&(K=He("Chrome")),K&&K.indexOf(Y=/[\d.]+$/.exec(Ee))==0&&N.indexOf("/"+Y+"-")>-1&&(Ee=F(Ee.replace(Y,""))),Ee&&Ee.indexOf(L)!=-1&&!RegExp(L+" OS").test(Ee)&&(Ee=Ee.replace(RegExp(" *"+k(L)+" *"),"")),U&&!/\b(?:Avant|Nook)\b/.test(L)&&(/Browser|Lunascape|Maxthon/.test(L)||L!="Safari"&&/^iOS/.test(Ee)&&/\bSafari\b/.test(U[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(L)&&U[1])&&(Y=U[U.length-1])&&V.push(Y),V.length&&(V=["("+V.join("; ")+")"]),ue&&$&&$.indexOf(ue)<0&&V.push("on "+ue),$&&V.push((/^on /.test(V[V.length-1])?"":"on ")+$),Ee&&(Y=/ ([\d.+]+)$/.exec(Ee),te=Y&&Ee.charAt(Ee.length-Y[0].length-1)=="/",Ee={architecture:32,family:Y&&!te?Ee.replace(Y[0],""):Ee,version:Y?Y[1]:null,toString:function(){var $e=this.version;return this.family+($e&&!te?" "+$e:"")+(this.architecture==64?" 64-bit":"")}}),(Y=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(ye))&&!/\bi686\b/i.test(ye)?(Ee&&(Ee.architecture=64,Ee.family=Ee.family.replace(RegExp(" *"+Y),"")),L&&(/\bWOW64\b/i.test(N)||W&&/\w(?:86|32)$/.test(ee.cpuClass||ee.platform)&&!/\bWin64; x64\b/i.test(N))&&V.unshift("32-bit")):Ee&&/^OS X/.test(Ee.family)&&L=="Chrome"&&parseFloat(K)>=39&&(Ee.architecture=64),N||(N=null);var Je={};return Je.description=N,Je.layout=U&&U[0],Je.manufacturer=ue,Je.name=L,Je.prerelease=G,Je.product=$,Je.ua=N,Je.version=L&&K,Je.os=Ee||{architecture:null,family:null,version:null,toString:function(){return"null"}},Je.parse=J,Je.toString=Be,Je.version&&V.unshift(K),Je.name&&V.unshift(L),Ee&&L&&!(Ee==String(Ee).split(" ")[0]&&(Ee==L.split(" ")[0]||$))&&V.push($?"("+Ee+")":"on "+Ee),V.length&&(Je.description=V.join(" ")),Je}var H=J();typeof Te=="function"&&typeof Te.amd=="object"&&Te.amd?(h.platform=H,Te(function(){return H})):g&&w?P(H,function(N,_){g[_]=N}):h.platform=H}).call(this)}).call(this)}).call(this,typeof mt!="undefined"?mt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],380:[function(o,M,R){(function(p){(function(){"use strict";typeof p=="undefined"||!p.version||p.version.indexOf("v0.")===0||p.version.indexOf("v1.")===0&&p.version.indexOf("v1.8.")!==0?M.exports={nextTick:f}:M.exports=p;function f(h,y,g,w){if(typeof h!="function")throw new TypeError('"callback" argument must be a function');var c=arguments.length,m,v;switch(c){case 0:case 1:return p.nextTick(h);case 2:return p.nextTick(function(){h.call(null,y)});case 3:return p.nextTick(function(){h.call(null,y,g)});case 4:return p.nextTick(function(){h.call(null,y,g,w)});default:for(m=new Array(c-1),v=0;v<m.length;)m[v++]=arguments[v];return p.nextTick(function(){h.apply(null,m)})}}}).call(this)}).call(this,o("_process"))},{_process:467}],381:[function(o,M,R){var p=M.exports={},f,h;function y(){throw new Error("setTimeout has not been defined")}function g(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?f=setTimeout:f=y}catch(j){f=y}try{typeof clearTimeout=="function"?h=clearTimeout:h=g}catch(j){h=g}})();function w(j){if(f===setTimeout)return setTimeout(j,0);if((f===y||!f)&&setTimeout)return f=setTimeout,setTimeout(j,0);try{return f(j,0)}catch(Z){try{return f.call(null,j,0)}catch(P){return f.call(this,j,0)}}}function c(j){if(h===clearTimeout)return clearTimeout(j);if((h===g||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(j);try{return h(j)}catch(Z){try{return h.call(null,j)}catch(P){return h.call(this,j)}}}var m=[],v=!1,b,x=-1;function T(){!v||!b||(v=!1,b.length?m=b.concat(m):x=-1,m.length&&S())}function S(){if(!v){var j=w(T);v=!0;for(var Z=m.length;Z;){for(b=m,m=[];++x<Z;)b&&b[x].run();x=-1,Z=m.length}b=null,v=!1,c(j)}}p.nextTick=function(j){var Z=new Array(arguments.length-1);if(arguments.length>1)for(var P=1;P<arguments.length;P++)Z[P-1]=arguments[P];m.push(new C(j,Z)),m.length===1&&!v&&w(S)};function C(j,Z){this.fun=j,this.array=Z}C.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={};function E(){}p.on=E,p.addListener=E,p.once=E,p.off=E,p.removeListener=E,p.removeAllListeners=E,p.emit=E,p.prependListener=E,p.prependOnceListener=E,p.listeners=function(j){return[]},p.binding=function(j){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(j){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},{}],382:[function(o,M,R){(function(p){(function(){(function(f){var h=typeof R=="object"&&R&&!R.nodeType&&R,y=typeof M=="object"&&M&&!M.nodeType&&M,g=typeof p=="object"&&p;(g.global===g||g.window===g||g.self===g)&&(f=g);var w,c=2147483647,m=36,v=1,b=26,x=38,T=700,S=72,C=128,E="-",j=/^xn--/,Z=/[^\x20-\x7E]/,P=/[\x2E\u3002\uFF0E\uFF61]/g,Q={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},B=m-v,k=Math.floor,D=String.fromCharCode,F;function J(ve){throw new RangeError(Q[ve])}function H(ve,xe){for(var ce=ve.length,fe=[];ce--;)fe[ce]=xe(ve[ce]);return fe}function N(ve,xe){var ce=ve.split("@"),fe="";ce.length>1&&(fe=ce[0]+"@",ve=ce[1]),ve=ve.replace(P,".");var ge=ve.split("."),Se=H(ge,xe).join(".");return fe+Se}function _(ve){for(var xe=[],ce=0,fe=ve.length,ge,Se;ce<fe;)ge=ve.charCodeAt(ce++),ge>=55296&&ge<=56319&&ce<fe?(Se=ve.charCodeAt(ce++),(Se&64512)==56320?xe.push(((ge&1023)<<10)+(Se&1023)+65536):(xe.push(ge),ce--)):xe.push(ge);return xe}function X(ve){return H(ve,function(xe){var ce="";return xe>65535&&(xe-=65536,ce+=D(xe>>>10&1023|55296),xe=56320|xe&1023),ce+=D(xe),ce}).join("")}function ee(ve){return ve-48<10?ve-22:ve-65<26?ve-65:ve-97<26?ve-97:m}function ie(ve,xe){return ve+22+75*(ve<26)-((xe!=0)<<5)}function he(ve,xe,ce){var fe=0;for(ve=ce?k(ve/T):ve>>1,ve+=k(ve/xe);ve>B*b>>1;fe+=m)ve=k(ve/B);return k(fe+(B+1)*ve/(ve+x))}function ne(ve){var xe=[],ce=ve.length,fe,ge=0,Se=C,De=S,ke,de,Y,ye,V,G,W,K,te;for(ke=ve.lastIndexOf(E),ke<0&&(ke=0),de=0;de<ke;++de)ve.charCodeAt(de)>=128&&J("not-basic"),xe.push(ve.charCodeAt(de));for(Y=ke>0?ke+1:0;Y<ce;){for(ye=ge,V=1,G=m;Y>=ce&&J("invalid-input"),W=ee(ve.charCodeAt(Y++)),(W>=m||W>k((c-ge)/V))&&J("overflow"),ge+=W*V,K=G<=De?v:G>=De+b?b:G-De,!(W<K);G+=m)te=m-K,V>k(c/te)&&J("overflow"),V*=te;fe=xe.length+1,De=he(ge-ye,fe,ye==0),k(ge/fe)>c-Se&&J("overflow"),Se+=k(ge/fe),ge%=fe,xe.splice(ge++,0,Se)}return X(xe)}function Ie(ve){var xe,ce,fe,ge,Se,De,ke,de,Y,ye,V,G=[],W,K,te,U;for(ve=_(ve),W=ve.length,xe=C,ce=0,Se=S,De=0;De<W;++De)V=ve[De],V<128&&G.push(D(V));for(fe=ge=G.length,ge&&G.push(E);fe<W;){for(ke=c,De=0;De<W;++De)V=ve[De],V>=xe&&V<ke&&(ke=V);for(K=fe+1,ke-xe>k((c-ce)/K)&&J("overflow"),ce+=(ke-xe)*K,xe=ke,De=0;De<W;++De)if(V=ve[De],V<xe&&++ce>c&&J("overflow"),V==xe){for(de=ce,Y=m;ye=Y<=Se?v:Y>=Se+b?b:Y-Se,!(de<ye);Y+=m)U=de-ye,te=m-ye,G.push(D(ie(ye+U%te,0))),de=k(U/te);G.push(D(ie(de,0))),Se=he(ce,K,fe==ge),ce=0,++fe}++ce,++xe}return G.join("")}function q(ve){return N(ve,function(xe){return j.test(xe)?ne(xe.slice(4).toLowerCase()):xe})}function pe(ve){return N(ve,function(xe){return Z.test(xe)?"xn--"+Ie(xe):xe})}if(w={version:"1.4.1",ucs2:{decode:_,encode:X},decode:ne,encode:Ie,toASCII:pe,toUnicode:q},typeof Te=="function"&&typeof Te.amd=="object"&&Te.amd)Te("punycode",function(){return w});else if(h&&y)if(M.exports==h)y.exports=w;else for(F in w)w.hasOwnProperty(F)&&(h[F]=w[F]);else f.punycode=w})(this)}).call(this)}).call(this,typeof mt!="undefined"?mt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],383:[function(o,M,R){"use strict";function p(h,y){return Object.prototype.hasOwnProperty.call(h,y)}M.exports=function(h,y,g,w){y=y||"&",g=g||"=";var c={};if(typeof h!="string"||h.length===0)return c;var m=/\+/g;h=h.split(y);var v=1e3;w&&typeof w.maxKeys=="number"&&(v=w.maxKeys);var b=h.length;v>0&&b>v&&(b=v);for(var x=0;x<b;++x){var T=h[x].replace(m,"%20"),S=T.indexOf(g),C,E,j,Z;S>=0?(C=T.substr(0,S),E=T.substr(S+1)):(C=T,E=""),j=decodeURIComponent(C),Z=decodeURIComponent(E),p(c,j)?f(c[j])?c[j].push(Z):c[j]=[c[j],Z]:c[j]=Z}return c};var f=Array.isArray||function(h){return Object.prototype.toString.call(h)==="[object Array]"}},{}],384:[function(o,M,R){"use strict";var p=function(g){switch(typeof g){case"string":return g;case"boolean":return g?"true":"false";case"number":return isFinite(g)?g:"";default:return""}};M.exports=function(g,w,c,m){return w=w||"&",c=c||"=",g===null&&(g=void 0),typeof g=="object"?h(y(g),function(v){var b=encodeURIComponent(p(v))+c;return f(g[v])?h(g[v],function(x){return b+encodeURIComponent(p(x))}).join(w):b+encodeURIComponent(p(g[v]))}).join(w):m?encodeURIComponent(p(m))+c+encodeURIComponent(p(g)):""};var f=Array.isArray||function(g){return Object.prototype.toString.call(g)==="[object Array]"};function h(g,w){if(g.map)return g.map(w);for(var c=[],m=0;m<g.length;m++)c.push(w(g[m],m));return c}var y=Object.keys||function(g){var w=[];for(var c in g)Object.prototype.hasOwnProperty.call(g,c)&&w.push(c);return w}},{}],385:[function(o,M,R){"use strict";R.decode=R.parse=o("./decode"),R.encode=R.stringify=o("./encode")},{"./decode":383,"./encode":384}],386:[function(o,M,R){"use strict";var p=o("process-nextick-args"),f=Object.keys||function(T){var S=[];for(var C in T)S.push(C);return S};M.exports=v;var h=Object.create(o("core-util-is"));h.inherits=o("inherits");var y=o("./_stream_readable"),g=o("./_stream_writable");h.inherits(v,y);for(var w=f(g.prototype),c=0;c<w.length;c++){var m=w[c];v.prototype[m]||(v.prototype[m]=g.prototype[m])}function v(T){if(!(this instanceof v))return new v(T);y.call(this,T),g.call(this,T),T&&T.readable===!1&&(this.readable=!1),T&&T.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,T&&T.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",b)}Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function b(){this.allowHalfOpen||this._writableState.ended||p.nextTick(x,this)}function x(T){T.end()}Object.defineProperty(v.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(T){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=T,this._writableState.destroyed=T)}}),v.prototype._destroy=function(T,S){this.push(null),this.end(),p.nextTick(S,T)}},{"./_stream_readable":388,"./_stream_writable":390,"core-util-is":341,inherits:364,"process-nextick-args":380}],387:[function(o,M,R){"use strict";M.exports=h;var p=o("./_stream_transform"),f=Object.create(o("core-util-is"));f.inherits=o("inherits"),f.inherits(h,p);function h(y){if(!(this instanceof h))return new h(y);p.call(this,y)}h.prototype._transform=function(y,g,w){w(null,y)}},{"./_stream_transform":389,"core-util-is":341,inherits:364}],388:[function(o,M,R){(function(p,f){(function(){"use strict";var h=o("process-nextick-args");M.exports=D;var y=o("isarray"),g;D.ReadableState=k;var w=o("events").EventEmitter,c=function(V,G){return V.listeners(G).length},m=o("./internal/streams/stream"),v=o("safe-buffer").Buffer,b=f.Uint8Array||function(){};function x(V){return v.from(V)}function T(V){return v.isBuffer(V)||V instanceof b}var S=Object.create(o("core-util-is"));S.inherits=o("inherits");var C=o("util"),E=void 0;C&&C.debuglog?E=C.debuglog("stream"):E=function(){};var j=o("./internal/streams/BufferList"),Z=o("./internal/streams/destroy"),P;S.inherits(D,m);var Q=["error","close","destroy","pause","resume"];function B(V,G,W){if(typeof V.prependListener=="function")return V.prependListener(G,W);!V._events||!V._events[G]?V.on(G,W):y(V._events[G])?V._events[G].unshift(W):V._events[G]=[W,V._events[G]]}function k(V,G){g=g||o("./_stream_duplex"),V=V||{};var W=G instanceof g;this.objectMode=!!V.objectMode,W&&(this.objectMode=this.objectMode||!!V.readableObjectMode);var K=V.highWaterMark,te=V.readableHighWaterMark,U=this.objectMode?16:16*1024;K||K===0?this.highWaterMark=K:W&&(te||te===0)?this.highWaterMark=te:this.highWaterMark=U,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new j,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=V.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,V.encoding&&(P||(P=o("string_decoder/").StringDecoder),this.decoder=new P(V.encoding),this.encoding=V.encoding)}function D(V){if(g=g||o("./_stream_duplex"),!(this instanceof D))return new D(V);this._readableState=new k(V,this),this.readable=!0,V&&(typeof V.read=="function"&&(this._read=V.read),typeof V.destroy=="function"&&(this._destroy=V.destroy)),m.call(this)}Object.defineProperty(D.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(V){this._readableState&&(this._readableState.destroyed=V)}}),D.prototype.destroy=Z.destroy,D.prototype._undestroy=Z.undestroy,D.prototype._destroy=function(V,G){this.push(null),G(V)},D.prototype.push=function(V,G){var W=this._readableState,K;return W.objectMode?K=!0:typeof V=="string"&&(G=G||W.defaultEncoding,G!==W.encoding&&(V=v.from(V,G),G=""),K=!0),F(this,V,G,!1,K)},D.prototype.unshift=function(V){return F(this,V,null,!0,!1)};function F(V,G,W,K,te){var U=V._readableState;if(G===null)U.reading=!1,ie(V,U);else{var L;te||(L=H(U,G)),L?V.emit("error",L):U.objectMode||G&&G.length>0?(typeof G!="string"&&!U.objectMode&&Object.getPrototypeOf(G)!==v.prototype&&(G=x(G)),K?U.endEmitted?V.emit("error",new Error("stream.unshift() after end event")):J(V,U,G,!0):U.ended?V.emit("error",new Error("stream.push() after EOF")):(U.reading=!1,U.decoder&&!W?(G=U.decoder.write(G),U.objectMode||G.length!==0?J(V,U,G,!1):Ie(V,U)):J(V,U,G,!1))):K||(U.reading=!1)}return N(U)}function J(V,G,W,K){G.flowing&&G.length===0&&!G.sync?(V.emit("data",W),V.read(0)):(G.length+=G.objectMode?1:W.length,K?G.buffer.unshift(W):G.buffer.push(W),G.needReadable&&he(V)),Ie(V,G)}function H(V,G){var W;return!T(G)&&typeof G!="string"&&G!==void 0&&!V.objectMode&&(W=new TypeError("Invalid non-string/buffer chunk")),W}function N(V){return!V.ended&&(V.needReadable||V.length<V.highWaterMark||V.length===0)}D.prototype.isPaused=function(){return this._readableState.flowing===!1},D.prototype.setEncoding=function(V){return P||(P=o("string_decoder/").StringDecoder),this._readableState.decoder=new P(V),this._readableState.encoding=V,this};var _=8388608;function X(V){return V>=_?V=_:(V--,V|=V>>>1,V|=V>>>2,V|=V>>>4,V|=V>>>8,V|=V>>>16,V++),V}function ee(V,G){return V<=0||G.length===0&&G.ended?0:G.objectMode?1:V!==V?G.flowing&&G.length?G.buffer.head.data.length:G.length:(V>G.highWaterMark&&(G.highWaterMark=X(V)),V<=G.length?V:G.ended?G.length:(G.needReadable=!0,0))}D.prototype.read=function(V){E("read",V),V=parseInt(V,10);var G=this._readableState,W=V;if(V!==0&&(G.emittedReadable=!1),V===0&&G.needReadable&&(G.length>=G.highWaterMark||G.ended))return E("read: emitReadable",G.length,G.ended),G.length===0&&G.ended?de(this):he(this),null;if(V=ee(V,G),V===0&&G.ended)return G.length===0&&de(this),null;var K=G.needReadable;E("need readable",K),(G.length===0||G.length-V<G.highWaterMark)&&(K=!0,E("length less than watermark",K)),G.ended||G.reading?(K=!1,E("reading or ended",K)):K&&(E("do read"),G.reading=!0,G.sync=!0,G.length===0&&(G.needReadable=!0),this._read(G.highWaterMark),G.sync=!1,G.reading||(V=ee(W,G)));var te;return V>0?te=ge(V,G):te=null,te===null?(G.needReadable=!0,V=0):G.length-=V,G.length===0&&(G.ended||(G.needReadable=!0),W!==V&&G.ended&&de(this)),te!==null&&this.emit("data",te),te};function ie(V,G){if(!G.ended){if(G.decoder){var W=G.decoder.end();W&&W.length&&(G.buffer.push(W),G.length+=G.objectMode?1:W.length)}G.ended=!0,he(V)}}function he(V){var G=V._readableState;G.needReadable=!1,G.emittedReadable||(E("emitReadable",G.flowing),G.emittedReadable=!0,G.sync?h.nextTick(ne,V):ne(V))}function ne(V){E("emit readable"),V.emit("readable"),fe(V)}function Ie(V,G){G.readingMore||(G.readingMore=!0,h.nextTick(q,V,G))}function q(V,G){for(var W=G.length;!G.reading&&!G.flowing&&!G.ended&&G.length<G.highWaterMark&&(E("maybeReadMore read 0"),V.read(0),W!==G.length);)W=G.length;G.readingMore=!1}D.prototype._read=function(V){this.emit("error",new Error("_read() is not implemented"))},D.prototype.pipe=function(V,G){var W=this,K=this._readableState;switch(K.pipesCount){case 0:K.pipes=V;break;case 1:K.pipes=[K.pipes,V];break;default:K.pipes.push(V);break}K.pipesCount+=1,E("pipe count=%d opts=%j",K.pipesCount,G);var te=(!G||G.end!==!1)&&V!==p.stdout&&V!==p.stderr,U=te?$:Be;K.endEmitted?h.nextTick(U):W.once("end",U),V.on("unpipe",L);function L(Je,$e){E("onunpipe"),Je===W&&$e&&$e.hasUnpiped===!1&&($e.hasUnpiped=!0,ze())}function $(){E("onend"),V.end()}var ue=pe(W);V.on("drain",ue);var Ee=!1;function ze(){E("cleanup"),V.removeListener("close",Me),V.removeListener("finish",He),V.removeListener("drain",ue),V.removeListener("error",Re),V.removeListener("unpipe",L),W.removeListener("end",$),W.removeListener("end",Be),W.removeListener("data",le),Ee=!0,K.awaitDrain&&(!V._writableState||V._writableState.needDrain)&&ue()}var _e=!1;W.on("data",le);function le(Je){E("ondata"),_e=!1;var $e=V.write(Je);$e===!1&&!_e&&((K.pipesCount===1&&K.pipes===V||K.pipesCount>1&&ye(K.pipes,V)!==-1)&&!Ee&&(E("false write response, pause",W._readableState.awaitDrain),W._readableState.awaitDrain++,_e=!0),W.pause())}function Re(Je){E("onerror",Je),Be(),V.removeListener("error",Re),c(V,"error")===0&&V.emit("error",Je)}B(V,"error",Re);function Me(){V.removeListener("finish",He),Be()}V.once("close",Me);function He(){E("onfinish"),V.removeListener("close",Me),Be()}V.once("finish",He);function Be(){E("unpipe"),W.unpipe(V)}return V.emit("pipe",W),K.flowing||(E("pipe resume"),W.resume()),V};function pe(V){return function(){var G=V._readableState;E("pipeOnDrain",G.awaitDrain),G.awaitDrain&&G.awaitDrain--,G.awaitDrain===0&&c(V,"data")&&(G.flowing=!0,fe(V))}}D.prototype.unpipe=function(V){var G=this._readableState,W={hasUnpiped:!1};if(G.pipesCount===0)return this;if(G.pipesCount===1)return V&&V!==G.pipes?this:(V||(V=G.pipes),G.pipes=null,G.pipesCount=0,G.flowing=!1,V&&V.emit("unpipe",this,W),this);if(!V){var K=G.pipes,te=G.pipesCount;G.pipes=null,G.pipesCount=0,G.flowing=!1;for(var U=0;U<te;U++)K[U].emit("unpipe",this,W);return this}var L=ye(G.pipes,V);return L===-1?this:(G.pipes.splice(L,1),G.pipesCount-=1,G.pipesCount===1&&(G.pipes=G.pipes[0]),V.emit("unpipe",this,W),this)},D.prototype.on=function(V,G){var W=m.prototype.on.call(this,V,G);if(V==="data")this._readableState.flowing!==!1&&this.resume();else if(V==="readable"){var K=this._readableState;!K.endEmitted&&!K.readableListening&&(K.readableListening=K.needReadable=!0,K.emittedReadable=!1,K.reading?K.length&&he(this):h.nextTick(ve,this))}return W},D.prototype.addListener=D.prototype.on;function ve(V){E("readable nexttick read 0"),V.read(0)}D.prototype.resume=function(){var V=this._readableState;return V.flowing||(E("resume"),V.flowing=!0,xe(this,V)),this};function xe(V,G){G.resumeScheduled||(G.resumeScheduled=!0,h.nextTick(ce,V,G))}function ce(V,G){G.reading||(E("resume read 0"),V.read(0)),G.resumeScheduled=!1,G.awaitDrain=0,V.emit("resume"),fe(V),G.flowing&&!G.reading&&V.read(0)}D.prototype.pause=function(){return E("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(E("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function fe(V){var G=V._readableState;for(E("flow",G.flowing);G.flowing&&V.read()!==null;);}D.prototype.wrap=function(V){var G=this,W=this._readableState,K=!1;V.on("end",function(){if(E("wrapped end"),W.decoder&&!W.ended){var L=W.decoder.end();L&&L.length&&G.push(L)}G.push(null)}),V.on("data",function(L){if(E("wrapped data"),W.decoder&&(L=W.decoder.write(L)),!(W.objectMode&&L==null)&&!(!W.objectMode&&(!L||!L.length))){var $=G.push(L);$||(K=!0,V.pause())}});for(var te in V)this[te]===void 0&&typeof V[te]=="function"&&(this[te]=function(L){return function(){return V[L].apply(V,arguments)}}(te));for(var U=0;U<Q.length;U++)V.on(Q[U],this.emit.bind(this,Q[U]));return this._read=function(L){E("wrapped _read",L),K&&(K=!1,V.resume())},this},Object.defineProperty(D.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),D._fromList=ge;function ge(V,G){if(G.length===0)return null;var W;return G.objectMode?W=G.buffer.shift():!V||V>=G.length?(G.decoder?W=G.buffer.join(""):G.buffer.length===1?W=G.buffer.head.data:W=G.buffer.concat(G.length),G.buffer.clear()):W=Se(V,G.buffer,G.decoder),W}function Se(V,G,W){var K;return V<G.head.data.length?(K=G.head.data.slice(0,V),G.head.data=G.head.data.slice(V)):V===G.head.data.length?K=G.shift():K=W?De(V,G):ke(V,G),K}function De(V,G){var W=G.head,K=1,te=W.data;for(V-=te.length;W=W.next;){var U=W.data,L=V>U.length?U.length:V;if(L===U.length?te+=U:te+=U.slice(0,V),V-=L,V===0){L===U.length?(++K,W.next?G.head=W.next:G.head=G.tail=null):(G.head=W,W.data=U.slice(L));break}++K}return G.length-=K,te}function ke(V,G){var W=v.allocUnsafe(V),K=G.head,te=1;for(K.data.copy(W),V-=K.data.length;K=K.next;){var U=K.data,L=V>U.length?U.length:V;if(U.copy(W,W.length-V,0,L),V-=L,V===0){L===U.length?(++te,K.next?G.head=K.next:G.head=G.tail=null):(G.head=K,K.data=U.slice(L));break}++te}return G.length-=te,W}function de(V){var G=V._readableState;if(G.length>0)throw new Error('"endReadable()" called on non-empty stream');G.endEmitted||(G.ended=!0,h.nextTick(Y,G,V))}function Y(V,G){!V.endEmitted&&V.length===0&&(V.endEmitted=!0,G.readable=!1,G.emit("end"))}function ye(V,G){for(var W=0,K=V.length;W<K;W++)if(V[W]===G)return W;return-1}}).call(this)}).call(this,o("_process"),typeof mt!="undefined"?mt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":386,"./internal/streams/BufferList":391,"./internal/streams/destroy":392,"./internal/streams/stream":393,_process:467,"core-util-is":341,events:344,inherits:364,isarray:370,"process-nextick-args":380,"safe-buffer":396,"string_decoder/":413,util:89}],389:[function(o,M,R){"use strict";M.exports=y;var p=o("./_stream_duplex"),f=Object.create(o("core-util-is"));f.inherits=o("inherits"),f.inherits(y,p);function h(c,m){var v=this._transformState;v.transforming=!1;var b=v.writecb;if(!b)return this.emit("error",new Error("write callback called multiple times"));v.writechunk=null,v.writecb=null,m!=null&&this.push(m),b(c);var x=this._readableState;x.reading=!1,(x.needReadable||x.length<x.highWaterMark)&&this._read(x.highWaterMark)}function y(c){if(!(this instanceof y))return new y(c);p.call(this,c),this._transformState={afterTransform:h.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,c&&(typeof c.transform=="function"&&(this._transform=c.transform),typeof c.flush=="function"&&(this._flush=c.flush)),this.on("prefinish",g)}function g(){var c=this;typeof this._flush=="function"?this._flush(function(m,v){w(c,m,v)}):w(this,null,null)}y.prototype.push=function(c,m){return this._transformState.needTransform=!1,p.prototype.push.call(this,c,m)},y.prototype._transform=function(c,m,v){throw new Error("_transform() is not implemented")},y.prototype._write=function(c,m,v){var b=this._transformState;if(b.writecb=v,b.writechunk=c,b.writeencoding=m,!b.transforming){var x=this._readableState;(b.needTransform||x.needReadable||x.length<x.highWaterMark)&&this._read(x.highWaterMark)}},y.prototype._read=function(c){var m=this._transformState;m.writechunk!==null&&m.writecb&&!m.transforming?(m.transforming=!0,this._transform(m.writechunk,m.writeencoding,m.afterTransform)):m.needTransform=!0},y.prototype._destroy=function(c,m){var v=this;p.prototype._destroy.call(this,c,function(b){m(b),v.emit("close")})};function w(c,m,v){if(m)return c.emit("error",m);if(v!=null&&c.push(v),c._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(c._transformState.transforming)throw new Error("Calling transform done when still transforming");return c.push(null)}},{"./_stream_duplex":386,"core-util-is":341,inherits:364}],390:[function(o,M,R){(function(p,f,h){(function(){"use strict";var y=o("process-nextick-args");M.exports=B;function g(ce,fe,ge){this.chunk=ce,this.encoding=fe,this.callback=ge,this.next=null}function w(ce){var fe=this;this.next=null,this.entry=null,this.finish=function(){xe(fe,ce)}}var c=!p.browser&&["v0.10","v0.9."].indexOf(p.version.slice(0,5))>-1?h:y.nextTick,m;B.WritableState=P;var v=Object.create(o("core-util-is"));v.inherits=o("inherits");var b={deprecate:o("util-deprecate")},x=o("./internal/streams/stream"),T=o("safe-buffer").Buffer,S=f.Uint8Array||function(){};function C(ce){return T.from(ce)}function E(ce){return T.isBuffer(ce)||ce instanceof S}var j=o("./internal/streams/destroy");v.inherits(B,x);function Z(){}function P(ce,fe){m=m||o("./_stream_duplex"),ce=ce||{};var ge=fe instanceof m;this.objectMode=!!ce.objectMode,ge&&(this.objectMode=this.objectMode||!!ce.writableObjectMode);var Se=ce.highWaterMark,De=ce.writableHighWaterMark,ke=this.objectMode?16:16*1024;Se||Se===0?this.highWaterMark=Se:ge&&(De||De===0)?this.highWaterMark=De:this.highWaterMark=ke,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var de=ce.decodeStrings===!1;this.decodeStrings=!de,this.defaultEncoding=ce.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Y){X(fe,Y)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new w(this)}P.prototype.getBuffer=function(){for(var fe=this.bufferedRequest,ge=[];fe;)ge.push(fe),fe=fe.next;return ge},function(){try{Object.defineProperty(P.prototype,"buffer",{get:b.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(ce){}}();var Q;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Q=Function.prototype[Symbol.hasInstance],Object.defineProperty(B,Symbol.hasInstance,{value:function(ce){return Q.call(this,ce)?!0:this!==B?!1:ce&&ce._writableState instanceof P}})):Q=function(ce){return ce instanceof this};function B(ce){if(m=m||o("./_stream_duplex"),!Q.call(B,this)&&!(this instanceof m))return new B(ce);this._writableState=new P(ce,this),this.writable=!0,ce&&(typeof ce.write=="function"&&(this._write=ce.write),typeof ce.writev=="function"&&(this._writev=ce.writev),typeof ce.destroy=="function"&&(this._destroy=ce.destroy),typeof ce.final=="function"&&(this._final=ce.final)),x.call(this)}B.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function k(ce,fe){var ge=new Error("write after end");ce.emit("error",ge),y.nextTick(fe,ge)}function D(ce,fe,ge,Se){var De=!0,ke=!1;return ge===null?ke=new TypeError("May not write null values to stream"):typeof ge!="string"&&ge!==void 0&&!fe.objectMode&&(ke=new TypeError("Invalid non-string/buffer chunk")),ke&&(ce.emit("error",ke),y.nextTick(Se,ke),De=!1),De}B.prototype.write=function(ce,fe,ge){var Se=this._writableState,De=!1,ke=!Se.objectMode&&E(ce);return ke&&!T.isBuffer(ce)&&(ce=C(ce)),typeof fe=="function"&&(ge=fe,fe=null),ke?fe="buffer":fe||(fe=Se.defaultEncoding),typeof ge!="function"&&(ge=Z),Se.ended?k(this,ge):(ke||D(this,Se,ce,ge))&&(Se.pendingcb++,De=J(this,Se,ke,ce,fe,ge)),De},B.prototype.cork=function(){var ce=this._writableState;ce.corked++},B.prototype.uncork=function(){var ce=this._writableState;ce.corked&&(ce.corked--,!ce.writing&&!ce.corked&&!ce.finished&&!ce.bufferProcessing&&ce.bufferedRequest&&he(this,ce))},B.prototype.setDefaultEncoding=function(fe){if(typeof fe=="string"&&(fe=fe.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((fe+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+fe);return this._writableState.defaultEncoding=fe,this};function F(ce,fe,ge){return!ce.objectMode&&ce.decodeStrings!==!1&&typeof fe=="string"&&(fe=T.from(fe,ge)),fe}Object.defineProperty(B.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function J(ce,fe,ge,Se,De,ke){if(!ge){var de=F(fe,Se,De);Se!==de&&(ge=!0,De="buffer",Se=de)}var Y=fe.objectMode?1:Se.length;fe.length+=Y;var ye=fe.length<fe.highWaterMark;if(ye||(fe.needDrain=!0),fe.writing||fe.corked){var V=fe.lastBufferedRequest;fe.lastBufferedRequest={chunk:Se,encoding:De,isBuf:ge,callback:ke,next:null},V?V.next=fe.lastBufferedRequest:fe.bufferedRequest=fe.lastBufferedRequest,fe.bufferedRequestCount+=1}else H(ce,fe,!1,Y,Se,De,ke);return ye}function H(ce,fe,ge,Se,De,ke,de){fe.writelen=Se,fe.writecb=de,fe.writing=!0,fe.sync=!0,ge?ce._writev(De,fe.onwrite):ce._write(De,ke,fe.onwrite),fe.sync=!1}function N(ce,fe,ge,Se,De){--fe.pendingcb,ge?(y.nextTick(De,Se),y.nextTick(pe,ce,fe),ce._writableState.errorEmitted=!0,ce.emit("error",Se)):(De(Se),ce._writableState.errorEmitted=!0,ce.emit("error",Se),pe(ce,fe))}function _(ce){ce.writing=!1,ce.writecb=null,ce.length-=ce.writelen,ce.writelen=0}function X(ce,fe){var ge=ce._writableState,Se=ge.sync,De=ge.writecb;if(_(ge),fe)N(ce,ge,Se,fe,De);else{var ke=ne(ge);!ke&&!ge.corked&&!ge.bufferProcessing&&ge.bufferedRequest&&he(ce,ge),Se?c(ee,ce,ge,ke,De):ee(ce,ge,ke,De)}}function ee(ce,fe,ge,Se){ge||ie(ce,fe),fe.pendingcb--,Se(),pe(ce,fe)}function ie(ce,fe){fe.length===0&&fe.needDrain&&(fe.needDrain=!1,ce.emit("drain"))}function he(ce,fe){fe.bufferProcessing=!0;var ge=fe.bufferedRequest;if(ce._writev&&ge&&ge.next){var Se=fe.bufferedRequestCount,De=new Array(Se),ke=fe.corkedRequestsFree;ke.entry=ge;for(var de=0,Y=!0;ge;)De[de]=ge,ge.isBuf||(Y=!1),ge=ge.next,de+=1;De.allBuffers=Y,H(ce,fe,!0,fe.length,De,"",ke.finish),fe.pendingcb++,fe.lastBufferedRequest=null,ke.next?(fe.corkedRequestsFree=ke.next,ke.next=null):fe.corkedRequestsFree=new w(fe),fe.bufferedRequestCount=0}else{for(;ge;){var ye=ge.chunk,V=ge.encoding,G=ge.callback,W=fe.objectMode?1:ye.length;if(H(ce,fe,!1,W,ye,V,G),ge=ge.next,fe.bufferedRequestCount--,fe.writing)break}ge===null&&(fe.lastBufferedRequest=null)}fe.bufferedRequest=ge,fe.bufferProcessing=!1}B.prototype._write=function(ce,fe,ge){ge(new Error("_write() is not implemented"))},B.prototype._writev=null,B.prototype.end=function(ce,fe,ge){var Se=this._writableState;typeof ce=="function"?(ge=ce,ce=null,fe=null):typeof fe=="function"&&(ge=fe,fe=null),ce!=null&&this.write(ce,fe),Se.corked&&(Se.corked=1,this.uncork()),!Se.ending&&!Se.finished&&ve(this,Se,ge)};function ne(ce){return ce.ending&&ce.length===0&&ce.bufferedRequest===null&&!ce.finished&&!ce.writing}function Ie(ce,fe){ce._final(function(ge){fe.pendingcb--,ge&&ce.emit("error",ge),fe.prefinished=!0,ce.emit("prefinish"),pe(ce,fe)})}function q(ce,fe){!fe.prefinished&&!fe.finalCalled&&(typeof ce._final=="function"?(fe.pendingcb++,fe.finalCalled=!0,y.nextTick(Ie,ce,fe)):(fe.prefinished=!0,ce.emit("prefinish")))}function pe(ce,fe){var ge=ne(fe);return ge&&(q(ce,fe),fe.pendingcb===0&&(fe.finished=!0,ce.emit("finish"))),ge}function ve(ce,fe,ge){fe.ending=!0,pe(ce,fe),ge&&(fe.finished?y.nextTick(ge):ce.once("finish",ge)),fe.ended=!0,ce.writable=!1}function xe(ce,fe,ge){var Se=ce.entry;for(ce.entry=null;Se;){var De=Se.callback;fe.pendingcb--,De(ge),Se=Se.next}fe.corkedRequestsFree?fe.corkedRequestsFree.next=ce:fe.corkedRequestsFree=ce}Object.defineProperty(B.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(ce){this._writableState&&(this._writableState.destroyed=ce)}}),B.prototype.destroy=j.destroy,B.prototype._undestroy=j.undestroy,B.prototype._destroy=function(ce,fe){this.end(),fe(ce)}}).call(this)}).call(this,o("_process"),typeof mt!="undefined"?mt:typeof self!="undefined"?self:typeof window!="undefined"?window:{},o("timers").setImmediate)},{"./_stream_duplex":386,"./internal/streams/destroy":392,"./internal/streams/stream":393,_process:467,"core-util-is":341,inherits:364,"process-nextick-args":380,"safe-buffer":396,timers:414,"util-deprecate":416}],391:[function(o,M,R){"use strict";function p(g,w){if(!(g instanceof w))throw new TypeError("Cannot call a class as a function")}var f=o("safe-buffer").Buffer,h=o("util");function y(g,w,c){g.copy(w,c)}M.exports=function(){function g(){p(this,g),this.head=null,this.tail=null,this.length=0}return g.prototype.push=function(c){var m={data:c,next:null};this.length>0?this.tail.next=m:this.head=m,this.tail=m,++this.length},g.prototype.unshift=function(c){var m={data:c,next:this.head};this.length===0&&(this.tail=m),this.head=m,++this.length},g.prototype.shift=function(){if(this.length!==0){var c=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,c}},g.prototype.clear=function(){this.head=this.tail=null,this.length=0},g.prototype.join=function(c){if(this.length===0)return"";for(var m=this.head,v=""+m.data;m=m.next;)v+=c+m.data;return v},g.prototype.concat=function(c){if(this.length===0)return f.alloc(0);if(this.length===1)return this.head.data;for(var m=f.allocUnsafe(c>>>0),v=this.head,b=0;v;)y(v.data,m,b),b+=v.data.length,v=v.next;return m},g}(),h&&h.inspect&&h.inspect.custom&&(M.exports.prototype[h.inspect.custom]=function(){var g=h.inspect({length:this.length});return this.constructor.name+" "+g})},{"safe-buffer":396,util:89}],392:[function(o,M,R){"use strict";var p=o("process-nextick-args");function f(g,w){var c=this,m=this._readableState&&this._readableState.destroyed,v=this._writableState&&this._writableState.destroyed;return m||v?(w?w(g):g&&(!this._writableState||!this._writableState.errorEmitted)&&p.nextTick(y,this,g),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(g||null,function(b){!w&&b?(p.nextTick(y,c,b),c._writableState&&(c._writableState.errorEmitted=!0)):w&&w(b)}),this)}function h(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function y(g,w){g.emit("error",w)}M.exports={destroy:f,undestroy:h}},{"process-nextick-args":380}],393:[function(o,M,R){M.exports=o("events").EventEmitter},{events:344}],394:[function(o,M,R){R=M.exports=o("./lib/_stream_readable.js"),R.Stream=R,R.Readable=R,R.Writable=o("./lib/_stream_writable.js"),R.Duplex=o("./lib/_stream_duplex.js"),R.Transform=o("./lib/_stream_transform.js"),R.PassThrough=o("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":386,"./lib/_stream_passthrough.js":387,"./lib/_stream_readable.js":388,"./lib/_stream_transform.js":389,"./lib/_stream_writable.js":390}],395:[function(o,M,R){var p=function(f){"use strict";var h=Object.prototype,y=h.hasOwnProperty,g,w=typeof Symbol=="function"?Symbol:{},c=w.iterator||"@@iterator",m=w.asyncIterator||"@@asyncIterator",v=w.toStringTag||"@@toStringTag";function b(q,pe,ve){return Object.defineProperty(q,pe,{value:ve,enumerable:!0,configurable:!0,writable:!0}),q[pe]}try{b({},"")}catch(q){b=function(pe,ve,xe){return pe[ve]=xe}}function x(q,pe,ve,xe){var ce=pe&&pe.prototype instanceof P?pe:P,fe=Object.create(ce.prototype),ge=new he(xe||[]);return fe._invoke=_(q,ve,ge),fe}f.wrap=x;function T(q,pe,ve){try{return{type:"normal",arg:q.call(pe,ve)}}catch(xe){return{type:"throw",arg:xe}}}var S="suspendedStart",C="suspendedYield",E="executing",j="completed",Z={};function P(){}function Q(){}function B(){}var k={};b(k,c,function(){return this});var D=Object.getPrototypeOf,F=D&&D(D(ne([])));F&&F!==h&&y.call(F,c)&&(k=F);var J=B.prototype=P.prototype=Object.create(k);Q.prototype=B,b(J,"constructor",B),b(B,"constructor",Q),Q.displayName=b(B,v,"GeneratorFunction");function H(q){["next","throw","return"].forEach(function(pe){b(q,pe,function(ve){return this._invoke(pe,ve)})})}f.isGeneratorFunction=function(q){var pe=typeof q=="function"&&q.constructor;return pe?pe===Q||(pe.displayName||pe.name)==="GeneratorFunction":!1},f.mark=function(q){return Object.setPrototypeOf?Object.setPrototypeOf(q,B):(q.__proto__=B,b(q,v,"GeneratorFunction")),q.prototype=Object.create(J),q},f.awrap=function(q){return{__await:q}};function N(q,pe){function ve(fe,ge,Se,De){var ke=T(q[fe],q,ge);if(ke.type==="throw")De(ke.arg);else{var de=ke.arg,Y=de.value;return Y&&typeof Y=="object"&&y.call(Y,"__await")?pe.resolve(Y.__await).then(function(ye){ve("next",ye,Se,De)},function(ye){ve("throw",ye,Se,De)}):pe.resolve(Y).then(function(ye){de.value=ye,Se(de)},function(ye){return ve("throw",ye,Se,De)})}}var xe;function ce(fe,ge){function Se(){return new pe(function(De,ke){ve(fe,ge,De,ke)})}return xe=xe?xe.then(Se,Se):Se()}this._invoke=ce}H(N.prototype),b(N.prototype,m,function(){return this}),f.AsyncIterator=N,f.async=function(q,pe,ve,xe,ce){ce===void 0&&(ce=Promise);var fe=new N(x(q,pe,ve,xe),ce);return f.isGeneratorFunction(pe)?fe:fe.next().then(function(ge){return ge.done?ge.value:fe.next()})};function _(q,pe,ve){var xe=S;return function(fe,ge){if(xe===E)throw new Error("Generator is already running");if(xe===j){if(fe==="throw")throw ge;return Ie()}for(ve.method=fe,ve.arg=ge;;){var Se=ve.delegate;if(Se){var De=X(Se,ve);if(De){if(De===Z)continue;return De}}if(ve.method==="next")ve.sent=ve._sent=ve.arg;else if(ve.method==="throw"){if(xe===S)throw xe=j,ve.arg;ve.dispatchException(ve.arg)}else ve.method==="return"&&ve.abrupt("return",ve.arg);xe=E;var ke=T(q,pe,ve);if(ke.type==="normal"){if(xe=ve.done?j:C,ke.arg===Z)continue;return{value:ke.arg,done:ve.done}}else ke.type==="throw"&&(xe=j,ve.method="throw",ve.arg=ke.arg)}}}function X(q,pe){var ve=q.iterator[pe.method];if(ve===g){if(pe.delegate=null,pe.method==="throw"){if(q.iterator.return&&(pe.method="return",pe.arg=g,X(q,pe),pe.method==="throw"))return Z;pe.method="throw",pe.arg=new TypeError("The iterator does not provide a 'throw' method")}return Z}var xe=T(ve,q.iterator,pe.arg);if(xe.type==="throw")return pe.method="throw",pe.arg=xe.arg,pe.delegate=null,Z;var ce=xe.arg;if(!ce)return pe.method="throw",pe.arg=new TypeError("iterator result is not an object"),pe.delegate=null,Z;if(ce.done)pe[q.resultName]=ce.value,pe.next=q.nextLoc,pe.method!=="return"&&(pe.method="next",pe.arg=g);else return ce;return pe.delegate=null,Z}H(J),b(J,v,"Generator"),b(J,c,function(){return this}),b(J,"toString",function(){return"[object Generator]"});function ee(q){var pe={tryLoc:q[0]};1 in q&&(pe.catchLoc=q[1]),2 in q&&(pe.finallyLoc=q[2],pe.afterLoc=q[3]),this.tryEntries.push(pe)}function ie(q){var pe=q.completion||{};pe.type="normal",delete pe.arg,q.completion=pe}function he(q){this.tryEntries=[{tryLoc:"root"}],q.forEach(ee,this),this.reset(!0)}f.keys=function(q){var pe=[];for(var ve in q)pe.push(ve);return pe.reverse(),function xe(){for(;pe.length;){var ce=pe.pop();if(ce in q)return xe.value=ce,xe.done=!1,xe}return xe.done=!0,xe}};function ne(q){if(q){var pe=q[c];if(pe)return pe.call(q);if(typeof q.next=="function")return q;if(!isNaN(q.length)){var ve=-1,xe=function ce(){for(;++ve<q.length;)if(y.call(q,ve))return ce.value=q[ve],ce.done=!1,ce;return ce.value=g,ce.done=!0,ce};return xe.next=xe}}return{next:Ie}}f.values=ne;function Ie(){return{value:g,done:!0}}return he.prototype={constructor:he,reset:function(q){if(this.prev=0,this.next=0,this.sent=this._sent=g,this.done=!1,this.delegate=null,this.method="next",this.arg=g,this.tryEntries.forEach(ie),!q)for(var pe in this)pe.charAt(0)==="t"&&y.call(this,pe)&&!isNaN(+pe.slice(1))&&(this[pe]=g)},stop:function(){this.done=!0;var q=this.tryEntries[0],pe=q.completion;if(pe.type==="throw")throw pe.arg;return this.rval},dispatchException:function(q){if(this.done)throw q;var pe=this;function ve(De,ke){return fe.type="throw",fe.arg=q,pe.next=De,ke&&(pe.method="next",pe.arg=g),!!ke}for(var xe=this.tryEntries.length-1;xe>=0;--xe){var ce=this.tryEntries[xe],fe=ce.completion;if(ce.tryLoc==="root")return ve("end");if(ce.tryLoc<=this.prev){var ge=y.call(ce,"catchLoc"),Se=y.call(ce,"finallyLoc");if(ge&&Se){if(this.prev<ce.catchLoc)return ve(ce.catchLoc,!0);if(this.prev<ce.finallyLoc)return ve(ce.finallyLoc)}else if(ge){if(this.prev<ce.catchLoc)return ve(ce.catchLoc,!0)}else if(Se){if(this.prev<ce.finallyLoc)return ve(ce.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(q,pe){for(var ve=this.tryEntries.length-1;ve>=0;--ve){var xe=this.tryEntries[ve];if(xe.tryLoc<=this.prev&&y.call(xe,"finallyLoc")&&this.prev<xe.finallyLoc){var ce=xe;break}}ce&&(q==="break"||q==="continue")&&ce.tryLoc<=pe&&pe<=ce.finallyLoc&&(ce=null);var fe=ce?ce.completion:{};return fe.type=q,fe.arg=pe,ce?(this.method="next",this.next=ce.finallyLoc,Z):this.complete(fe)},complete:function(q,pe){if(q.type==="throw")throw q.arg;return q.type==="break"||q.type==="continue"?this.next=q.arg:q.type==="return"?(this.rval=this.arg=q.arg,this.method="return",this.next="end"):q.type==="normal"&&pe&&(this.next=pe),Z},finish:function(q){for(var pe=this.tryEntries.length-1;pe>=0;--pe){var ve=this.tryEntries[pe];if(ve.finallyLoc===q)return this.complete(ve.completion,ve.afterLoc),ie(ve),Z}},catch:function(q){for(var pe=this.tryEntries.length-1;pe>=0;--pe){var ve=this.tryEntries[pe];if(ve.tryLoc===q){var xe=ve.completion;if(xe.type==="throw"){var ce=xe.arg;ie(ve)}return ce}}throw new Error("illegal catch attempt")},delegateYield:function(q,pe,ve){return this.delegate={iterator:ne(q),resultName:pe,nextLoc:ve},this.method==="next"&&(this.arg=g),Z}},f}(typeof M=="object"?M.exports:{});try{regeneratorRuntime=p}catch(f){typeof globalThis=="object"?globalThis.regeneratorRuntime=p:Function("r","regeneratorRuntime = r")(p)}},{}],396:[function(o,M,R){var p=o("buffer"),f=p.Buffer;function h(g,w){for(var c in g)w[c]=g[c]}f.from&&f.alloc&&f.allocUnsafe&&f.allocUnsafeSlow?M.exports=p:(h(p,R),R.Buffer=y);function y(g,w,c){return f(g,w,c)}h(f,y),y.from=function(g,w,c){if(typeof g=="number")throw new TypeError("Argument must not be a number");return f(g,w,c)},y.alloc=function(g,w,c){if(typeof g!="number")throw new TypeError("Argument must be a number");var m=f(g);return w!==void 0?typeof c=="string"?m.fill(w,c):m.fill(w):m.fill(0),m},y.allocUnsafe=function(g){if(typeof g!="number")throw new TypeError("Argument must be a number");return f(g)},y.allocUnsafeSlow=function(g){if(typeof g!="number")throw new TypeError("Argument must be a number");return p.SlowBuffer(g)}},{buffer:90}],397:[function(o,M,R){(function(p){(function(){(function(f){f.parser=function(de,Y){return new y(de,Y)},f.SAXParser=y,f.SAXStream=x,f.createStream=b,f.MAX_BUFFER_LENGTH=64*1024;var h=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];f.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function y(de,Y){if(!(this instanceof y))return new y(de,Y);var ye=this;w(ye),ye.q=ye.c="",ye.bufferCheckPosition=f.MAX_BUFFER_LENGTH,ye.opt=Y||{},ye.opt.lowercase=ye.opt.lowercase||ye.opt.lowercasetags,ye.looseCase=ye.opt.lowercase?"toLowerCase":"toUpperCase",ye.tags=[],ye.closed=ye.closedRoot=ye.sawRoot=!1,ye.tag=ye.error=null,ye.strict=!!de,ye.noscript=!!(de||ye.opt.noscript),ye.state=N.BEGIN,ye.strictEntities=ye.opt.strictEntities,ye.ENTITIES=ye.strictEntities?Object.create(f.XML_ENTITIES):Object.create(f.ENTITIES),ye.attribList=[],ye.opt.xmlns&&(ye.ns=Object.create(j)),ye.trackPosition=ye.opt.position!==!1,ye.trackPosition&&(ye.position=ye.line=ye.column=0),X(ye,"onready")}Object.create||(Object.create=function(de){function Y(){}Y.prototype=de;var ye=new Y;return ye}),Object.keys||(Object.keys=function(de){var Y=[];for(var ye in de)de.hasOwnProperty(ye)&&Y.push(ye);return Y});function g(de){for(var Y=Math.max(f.MAX_BUFFER_LENGTH,10),ye=0,V=0,G=h.length;V<G;V++){var W=de[h[V]].length;if(W>Y)switch(h[V]){case"textNode":ie(de);break;case"cdata":ee(de,"oncdata",de.cdata),de.cdata="";break;case"script":ee(de,"onscript",de.script),de.script="";break;default:ne(de,"Max buffer length exceeded: "+h[V])}ye=Math.max(ye,W)}var K=f.MAX_BUFFER_LENGTH-ye;de.bufferCheckPosition=K+de.position}function w(de){for(var Y=0,ye=h.length;Y<ye;Y++)de[h[Y]]=""}function c(de){ie(de),de.cdata!==""&&(ee(de,"oncdata",de.cdata),de.cdata=""),de.script!==""&&(ee(de,"onscript",de.script),de.script="")}y.prototype={end:function(){Ie(this)},write:ke,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){c(this)}};var m;try{m=o("stream").Stream}catch(de){m=function(){}}var v=f.EVENTS.filter(function(de){return de!=="error"&&de!=="end"});function b(de,Y){return new x(de,Y)}function x(de,Y){if(!(this instanceof x))return new x(de,Y);m.apply(this),this._parser=new y(de,Y),this.writable=!0,this.readable=!0;var ye=this;this._parser.onend=function(){ye.emit("end")},this._parser.onerror=function(V){ye.emit("error",V),ye._parser.error=null},this._decoder=null,v.forEach(function(V){Object.defineProperty(ye,"on"+V,{get:function(){return ye._parser["on"+V]},set:function(G){if(!G)return ye.removeAllListeners(V),ye._parser["on"+V]=G,G;ye.on(V,G)},enumerable:!0,configurable:!1})})}x.prototype=Object.create(m.prototype,{constructor:{value:x}}),x.prototype.write=function(de){if(typeof p=="function"&&typeof p.isBuffer=="function"&&p.isBuffer(de)){if(!this._decoder){var Y=o("string_decoder").StringDecoder;this._decoder=new Y("utf8")}de=this._decoder.write(de)}return this._parser.write(de.toString()),this.emit("data",de),!0},x.prototype.end=function(de){return de&&de.length&&this.write(de),this._parser.end(),!0},x.prototype.on=function(de,Y){var ye=this;return!ye._parser["on"+de]&&v.indexOf(de)!==-1&&(ye._parser["on"+de]=function(){var V=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);V.splice(0,0,de),ye.emit.apply(ye,V)}),m.prototype.on.call(ye,de,Y)};var T="[CDATA[",S="DOCTYPE",C="http://www.w3.org/XML/1998/namespace",E="http://www.w3.org/2000/xmlns/",j={xml:C,xmlns:E},Z=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,P=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,Q=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,B=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function k(de){return de===" "||de===`
`||de==="\r"||de===" "}function D(de){return de==='"'||de==="'"}function F(de){return de===">"||k(de)}function J(de,Y){return de.test(Y)}function H(de,Y){return!J(de,Y)}var N=0;f.STATE={BEGIN:N++,BEGIN_WHITESPACE:N++,TEXT:N++,TEXT_ENTITY:N++,OPEN_WAKA:N++,SGML_DECL:N++,SGML_DECL_QUOTED:N++,DOCTYPE:N++,DOCTYPE_QUOTED:N++,DOCTYPE_DTD:N++,DOCTYPE_DTD_QUOTED:N++,COMMENT_STARTING:N++,COMMENT:N++,COMMENT_ENDING:N++,COMMENT_ENDED:N++,CDATA:N++,CDATA_ENDING:N++,CDATA_ENDING_2:N++,PROC_INST:N++,PROC_INST_BODY:N++,PROC_INST_ENDING:N++,OPEN_TAG:N++,OPEN_TAG_SLASH:N++,ATTRIB:N++,ATTRIB_NAME:N++,ATTRIB_NAME_SAW_WHITE:N++,ATTRIB_VALUE:N++,ATTRIB_VALUE_QUOTED:N++,ATTRIB_VALUE_CLOSED:N++,ATTRIB_VALUE_UNQUOTED:N++,ATTRIB_VALUE_ENTITY_Q:N++,ATTRIB_VALUE_ENTITY_U:N++,CLOSE_TAG:N++,CLOSE_TAG_SAW_WHITE:N++,SCRIPT:N++,SCRIPT_ENDING:N++},f.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},f.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(f.ENTITIES).forEach(function(de){var Y=f.ENTITIES[de],ye=typeof Y=="number"?String.fromCharCode(Y):Y;f.ENTITIES[de]=ye});for(var _ in f.STATE)f.STATE[f.STATE[_]]=_;N=f.STATE;function X(de,Y,ye){de[Y]&&de[Y](ye)}function ee(de,Y,ye){de.textNode&&ie(de),X(de,Y,ye)}function ie(de){de.textNode=he(de.opt,de.textNode),de.textNode&&X(de,"ontext",de.textNode),de.textNode=""}function he(de,Y){return de.trim&&(Y=Y.trim()),de.normalize&&(Y=Y.replace(/\s+/g," ")),Y}function ne(de,Y){return ie(de),de.trackPosition&&(Y+=`
Line: `+de.line+`
Column: `+de.column+`
Char: `+de.c),Y=new Error(Y),de.error=Y,X(de,"onerror",Y),de}function Ie(de){return de.sawRoot&&!de.closedRoot&&q(de,"Unclosed root tag"),de.state!==N.BEGIN&&de.state!==N.BEGIN_WHITESPACE&&de.state!==N.TEXT&&ne(de,"Unexpected end"),ie(de),de.c="",de.closed=!0,X(de,"onend"),y.call(de,de.strict,de.opt),de}function q(de,Y){if(typeof de!="object"||!(de instanceof y))throw new Error("bad call to strictFail");de.strict&&ne(de,Y)}function pe(de){de.strict||(de.tagName=de.tagName[de.looseCase]());var Y=de.tags[de.tags.length-1]||de,ye=de.tag={name:de.tagName,attributes:{}};de.opt.xmlns&&(ye.ns=Y.ns),de.attribList.length=0,ee(de,"onopentagstart",ye)}function ve(de,Y){var ye=de.indexOf(":"),V=ye<0?["",de]:de.split(":"),G=V[0],W=V[1];return Y&&de==="xmlns"&&(G="xmlns",W=""),{prefix:G,local:W}}function xe(de){if(de.strict||(de.attribName=de.attribName[de.looseCase]()),de.attribList.indexOf(de.attribName)!==-1||de.tag.attributes.hasOwnProperty(de.attribName)){de.attribName=de.attribValue="";return}if(de.opt.xmlns){var Y=ve(de.attribName,!0),ye=Y.prefix,V=Y.local;if(ye==="xmlns")if(V==="xml"&&de.attribValue!==C)q(de,"xml: prefix must be bound to "+C+`
Actual: `+de.attribValue);else if(V==="xmlns"&&de.attribValue!==E)q(de,"xmlns: prefix must be bound to "+E+`
Actual: `+de.attribValue);else{var G=de.tag,W=de.tags[de.tags.length-1]||de;G.ns===W.ns&&(G.ns=Object.create(W.ns)),G.ns[V]=de.attribValue}de.attribList.push([de.attribName,de.attribValue])}else de.tag.attributes[de.attribName]=de.attribValue,ee(de,"onattribute",{name:de.attribName,value:de.attribValue});de.attribName=de.attribValue=""}function ce(de,Y){if(de.opt.xmlns){var ye=de.tag,V=ve(de.tagName);ye.prefix=V.prefix,ye.local=V.local,ye.uri=ye.ns[V.prefix]||"",ye.prefix&&!ye.uri&&(q(de,"Unbound namespace prefix: "+JSON.stringify(de.tagName)),ye.uri=V.prefix);var G=de.tags[de.tags.length-1]||de;ye.ns&&G.ns!==ye.ns&&Object.keys(ye.ns).forEach(function(le){ee(de,"onopennamespace",{prefix:le,uri:ye.ns[le]})});for(var W=0,K=de.attribList.length;W<K;W++){var te=de.attribList[W],U=te[0],L=te[1],$=ve(U,!0),ue=$.prefix,Ee=$.local,ze=ue===""?"":ye.ns[ue]||"",_e={name:U,value:L,prefix:ue,local:Ee,uri:ze};ue&&ue!=="xmlns"&&!ze&&(q(de,"Unbound namespace prefix: "+JSON.stringify(ue)),_e.uri=ue),de.tag.attributes[U]=_e,ee(de,"onattribute",_e)}de.attribList.length=0}de.tag.isSelfClosing=!!Y,de.sawRoot=!0,de.tags.push(de.tag),ee(de,"onopentag",de.tag),Y||(!de.noscript&&de.tagName.toLowerCase()==="script"?de.state=N.SCRIPT:de.state=N.TEXT,de.tag=null,de.tagName=""),de.attribName=de.attribValue="",de.attribList.length=0}function fe(de){if(!de.tagName){q(de,"Weird empty close tag."),de.textNode+="</>",de.state=N.TEXT;return}if(de.script){if(de.tagName!=="script"){de.script+="</"+de.tagName+">",de.tagName="",de.state=N.SCRIPT;return}ee(de,"onscript",de.script),de.script=""}var Y=de.tags.length,ye=de.tagName;de.strict||(ye=ye[de.looseCase]());for(var V=ye;Y--;){var G=de.tags[Y];if(G.name!==V)q(de,"Unexpected close tag");else break}if(Y<0){q(de,"Unmatched closing tag: "+de.tagName),de.textNode+="</"+de.tagName+">",de.state=N.TEXT;return}de.tagName=ye;for(var W=de.tags.length;W-- >Y;){var K=de.tag=de.tags.pop();de.tagName=de.tag.name,ee(de,"onclosetag",de.tagName);var te={};for(var U in K.ns)te[U]=K.ns[U];var L=de.tags[de.tags.length-1]||de;de.opt.xmlns&&K.ns!==L.ns&&Object.keys(K.ns).forEach(function($){var ue=K.ns[$];ee(de,"onclosenamespace",{prefix:$,uri:ue})})}Y===0&&(de.closedRoot=!0),de.tagName=de.attribValue=de.attribName="",de.attribList.length=0,de.state=N.TEXT}function ge(de){var Y=de.entity,ye=Y.toLowerCase(),V,G="";return de.ENTITIES[Y]?de.ENTITIES[Y]:de.ENTITIES[ye]?de.ENTITIES[ye]:(Y=ye,Y.charAt(0)==="#"&&(Y.charAt(1)==="x"?(Y=Y.slice(2),V=parseInt(Y,16),G=V.toString(16)):(Y=Y.slice(1),V=parseInt(Y,10),G=V.toString(10))),Y=Y.replace(/^0+/,""),isNaN(V)||G.toLowerCase()!==Y?(q(de,"Invalid character entity"),"&"+de.entity+";"):String.fromCodePoint(V))}function Se(de,Y){Y==="<"?(de.state=N.OPEN_WAKA,de.startTagPosition=de.position):k(Y)||(q(de,"Non-whitespace before first tag."),de.textNode=Y,de.state=N.TEXT)}function De(de,Y){var ye="";return Y<de.length&&(ye=de.charAt(Y)),ye}function ke(de){var Y=this;if(this.error)throw this.error;if(Y.closed)return ne(Y,"Cannot write after close. Assign an onready handler.");if(de===null)return Ie(Y);typeof de=="object"&&(de=de.toString());for(var ye=0,V="";V=De(de,ye++),Y.c=V,!!V;)switch(Y.trackPosition&&(Y.position++,V===`
`?(Y.line++,Y.column=0):Y.column++),Y.state){case N.BEGIN:if(Y.state=N.BEGIN_WHITESPACE,V==="\uFEFF")continue;Se(Y,V);continue;case N.BEGIN_WHITESPACE:Se(Y,V);continue;case N.TEXT:if(Y.sawRoot&&!Y.closedRoot){for(var G=ye-1;V&&V!=="<"&&V!=="&";)V=De(de,ye++),V&&Y.trackPosition&&(Y.position++,V===`
`?(Y.line++,Y.column=0):Y.column++);Y.textNode+=de.substring(G,ye-1)}V==="<"&&!(Y.sawRoot&&Y.closedRoot&&!Y.strict)?(Y.state=N.OPEN_WAKA,Y.startTagPosition=Y.position):(!k(V)&&(!Y.sawRoot||Y.closedRoot)&&q(Y,"Text data outside of root node."),V==="&"?Y.state=N.TEXT_ENTITY:Y.textNode+=V);continue;case N.SCRIPT:V==="<"?Y.state=N.SCRIPT_ENDING:Y.script+=V;continue;case N.SCRIPT_ENDING:V==="/"?Y.state=N.CLOSE_TAG:(Y.script+="<"+V,Y.state=N.SCRIPT);continue;case N.OPEN_WAKA:if(V==="!")Y.state=N.SGML_DECL,Y.sgmlDecl="";else if(!k(V))if(J(Z,V))Y.state=N.OPEN_TAG,Y.tagName=V;else if(V==="/")Y.state=N.CLOSE_TAG,Y.tagName="";else if(V==="?")Y.state=N.PROC_INST,Y.procInstName=Y.procInstBody="";else{if(q(Y,"Unencoded <"),Y.startTagPosition+1<Y.position){var W=Y.position-Y.startTagPosition;V=new Array(W).join(" ")+V}Y.textNode+="<"+V,Y.state=N.TEXT}continue;case N.SGML_DECL:(Y.sgmlDecl+V).toUpperCase()===T?(ee(Y,"onopencdata"),Y.state=N.CDATA,Y.sgmlDecl="",Y.cdata=""):Y.sgmlDecl+V==="--"?(Y.state=N.COMMENT,Y.comment="",Y.sgmlDecl=""):(Y.sgmlDecl+V).toUpperCase()===S?(Y.state=N.DOCTYPE,(Y.doctype||Y.sawRoot)&&q(Y,"Inappropriately located doctype declaration"),Y.doctype="",Y.sgmlDecl=""):V===">"?(ee(Y,"onsgmldeclaration",Y.sgmlDecl),Y.sgmlDecl="",Y.state=N.TEXT):(D(V)&&(Y.state=N.SGML_DECL_QUOTED),Y.sgmlDecl+=V);continue;case N.SGML_DECL_QUOTED:V===Y.q&&(Y.state=N.SGML_DECL,Y.q=""),Y.sgmlDecl+=V;continue;case N.DOCTYPE:V===">"?(Y.state=N.TEXT,ee(Y,"ondoctype",Y.doctype),Y.doctype=!0):(Y.doctype+=V,V==="["?Y.state=N.DOCTYPE_DTD:D(V)&&(Y.state=N.DOCTYPE_QUOTED,Y.q=V));continue;case N.DOCTYPE_QUOTED:Y.doctype+=V,V===Y.q&&(Y.q="",Y.state=N.DOCTYPE);continue;case N.DOCTYPE_DTD:Y.doctype+=V,V==="]"?Y.state=N.DOCTYPE:D(V)&&(Y.state=N.DOCTYPE_DTD_QUOTED,Y.q=V);continue;case N.DOCTYPE_DTD_QUOTED:Y.doctype+=V,V===Y.q&&(Y.state=N.DOCTYPE_DTD,Y.q="");continue;case N.COMMENT:V==="-"?Y.state=N.COMMENT_ENDING:Y.comment+=V;continue;case N.COMMENT_ENDING:V==="-"?(Y.state=N.COMMENT_ENDED,Y.comment=he(Y.opt,Y.comment),Y.comment&&ee(Y,"oncomment",Y.comment),Y.comment=""):(Y.comment+="-"+V,Y.state=N.COMMENT);continue;case N.COMMENT_ENDED:V!==">"?(q(Y,"Malformed comment"),Y.comment+="--"+V,Y.state=N.COMMENT):Y.state=N.TEXT;continue;case N.CDATA:V==="]"?Y.state=N.CDATA_ENDING:Y.cdata+=V;continue;case N.CDATA_ENDING:V==="]"?Y.state=N.CDATA_ENDING_2:(Y.cdata+="]"+V,Y.state=N.CDATA);continue;case N.CDATA_ENDING_2:V===">"?(Y.cdata&&ee(Y,"oncdata",Y.cdata),ee(Y,"onclosecdata"),Y.cdata="",Y.state=N.TEXT):V==="]"?Y.cdata+="]":(Y.cdata+="]]"+V,Y.state=N.CDATA);continue;case N.PROC_INST:V==="?"?Y.state=N.PROC_INST_ENDING:k(V)?Y.state=N.PROC_INST_BODY:Y.procInstName+=V;continue;case N.PROC_INST_BODY:if(!Y.procInstBody&&k(V))continue;V==="?"?Y.state=N.PROC_INST_ENDING:Y.procInstBody+=V;continue;case N.PROC_INST_ENDING:V===">"?(ee(Y,"onprocessinginstruction",{name:Y.procInstName,body:Y.procInstBody}),Y.procInstName=Y.procInstBody="",Y.state=N.TEXT):(Y.procInstBody+="?"+V,Y.state=N.PROC_INST_BODY);continue;case N.OPEN_TAG:J(P,V)?Y.tagName+=V:(pe(Y),V===">"?ce(Y):V==="/"?Y.state=N.OPEN_TAG_SLASH:(k(V)||q(Y,"Invalid character in tag name"),Y.state=N.ATTRIB));continue;case N.OPEN_TAG_SLASH:V===">"?(ce(Y,!0),fe(Y)):(q(Y,"Forward-slash in opening tag not followed by >"),Y.state=N.ATTRIB);continue;case N.ATTRIB:if(k(V))continue;V===">"?ce(Y):V==="/"?Y.state=N.OPEN_TAG_SLASH:J(Z,V)?(Y.attribName=V,Y.attribValue="",Y.state=N.ATTRIB_NAME):q(Y,"Invalid attribute name");continue;case N.ATTRIB_NAME:V==="="?Y.state=N.ATTRIB_VALUE:V===">"?(q(Y,"Attribute without value"),Y.attribValue=Y.attribName,xe(Y),ce(Y)):k(V)?Y.state=N.ATTRIB_NAME_SAW_WHITE:J(P,V)?Y.attribName+=V:q(Y,"Invalid attribute name");continue;case N.ATTRIB_NAME_SAW_WHITE:if(V==="=")Y.state=N.ATTRIB_VALUE;else{if(k(V))continue;q(Y,"Attribute without value"),Y.tag.attributes[Y.attribName]="",Y.attribValue="",ee(Y,"onattribute",{name:Y.attribName,value:""}),Y.attribName="",V===">"?ce(Y):J(Z,V)?(Y.attribName=V,Y.state=N.ATTRIB_NAME):(q(Y,"Invalid attribute name"),Y.state=N.ATTRIB)}continue;case N.ATTRIB_VALUE:if(k(V))continue;D(V)?(Y.q=V,Y.state=N.ATTRIB_VALUE_QUOTED):(q(Y,"Unquoted attribute value"),Y.state=N.ATTRIB_VALUE_UNQUOTED,Y.attribValue=V);continue;case N.ATTRIB_VALUE_QUOTED:if(V!==Y.q){V==="&"?Y.state=N.ATTRIB_VALUE_ENTITY_Q:Y.attribValue+=V;continue}xe(Y),Y.q="",Y.state=N.ATTRIB_VALUE_CLOSED;continue;case N.ATTRIB_VALUE_CLOSED:k(V)?Y.state=N.ATTRIB:V===">"?ce(Y):V==="/"?Y.state=N.OPEN_TAG_SLASH:J(Z,V)?(q(Y,"No whitespace between attributes"),Y.attribName=V,Y.attribValue="",Y.state=N.ATTRIB_NAME):q(Y,"Invalid attribute name");continue;case N.ATTRIB_VALUE_UNQUOTED:if(!F(V)){V==="&"?Y.state=N.ATTRIB_VALUE_ENTITY_U:Y.attribValue+=V;continue}xe(Y),V===">"?ce(Y):Y.state=N.ATTRIB;continue;case N.CLOSE_TAG:if(Y.tagName)V===">"?fe(Y):J(P,V)?Y.tagName+=V:Y.script?(Y.script+="</"+Y.tagName,Y.tagName="",Y.state=N.SCRIPT):(k(V)||q(Y,"Invalid tagname in closing tag"),Y.state=N.CLOSE_TAG_SAW_WHITE);else{if(k(V))continue;H(Z,V)?Y.script?(Y.script+="</"+V,Y.state=N.SCRIPT):q(Y,"Invalid tagname in closing tag."):Y.tagName=V}continue;case N.CLOSE_TAG_SAW_WHITE:if(k(V))continue;V===">"?fe(Y):q(Y,"Invalid characters in closing tag");continue;case N.TEXT_ENTITY:case N.ATTRIB_VALUE_ENTITY_Q:case N.ATTRIB_VALUE_ENTITY_U:var K,te;switch(Y.state){case N.TEXT_ENTITY:K=N.TEXT,te="textNode";break;case N.ATTRIB_VALUE_ENTITY_Q:K=N.ATTRIB_VALUE_QUOTED,te="attribValue";break;case N.ATTRIB_VALUE_ENTITY_U:K=N.ATTRIB_VALUE_UNQUOTED,te="attribValue";break}V===";"?(Y[te]+=ge(Y),Y.entity="",Y.state=K):J(Y.entity.length?B:Q,V)?Y.entity+=V:(q(Y,"Invalid character in entity name"),Y[te]+="&"+Y.entity+V,Y.entity="",Y.state=K);continue;default:throw new Error(Y,"Unknown state: "+Y.state)}return Y.position>=Y.bufferCheckPosition&&g(Y),Y}String.fromCodePoint||function(){var de=String.fromCharCode,Y=Math.floor,ye=function(){var V=16384,G=[],W,K,te=-1,U=arguments.length;if(!U)return"";for(var L="";++te<U;){var $=Number(arguments[te]);if(!isFinite($)||$<0||$>1114111||Y($)!==$)throw RangeError("Invalid code point: "+$);$<=65535?G.push($):($-=65536,W=($>>10)+55296,K=$%1024+56320,G.push(W,K)),(te+1===U||G.length>V)&&(L+=de.apply(null,G),G.length=0)}return L};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:ye,configurable:!0,writable:!0}):String.fromCodePoint=ye}()})(typeof R=="undefined"?this.sax={}:R)}).call(this)}).call(this,o("buffer").Buffer)},{buffer:90,stream:398,string_decoder:413}],398:[function(o,M,R){M.exports=h;var p=o("events").EventEmitter,f=o("inherits");f(h,p),h.Readable=o("readable-stream/lib/_stream_readable.js"),h.Writable=o("readable-stream/lib/_stream_writable.js"),h.Duplex=o("readable-stream/lib/_stream_duplex.js"),h.Transform=o("readable-stream/lib/_stream_transform.js"),h.PassThrough=o("readable-stream/lib/_stream_passthrough.js"),h.finished=o("readable-stream/lib/internal/streams/end-of-stream.js"),h.pipeline=o("readable-stream/lib/internal/streams/pipeline.js"),h.Stream=h;function h(){p.call(this)}h.prototype.pipe=function(y,g){var w=this;function c(C){y.writable&&y.write(C)===!1&&w.pause&&w.pause()}w.on("data",c);function m(){w.readable&&w.resume&&w.resume()}y.on("drain",m),!y._isStdio&&(!g||g.end!==!1)&&(w.on("end",b),w.on("close",x));var v=!1;function b(){v||(v=!0,y.end())}function x(){v||(v=!0,typeof y.destroy=="function"&&y.destroy())}function T(C){if(S(),p.listenerCount(this,"error")===0)throw C}w.on("error",T),y.on("error",T);function S(){w.removeListener("data",c),y.removeListener("drain",m),w.removeListener("end",b),w.removeListener("close",x),w.removeListener("error",T),y.removeListener("error",T),w.removeListener("end",S),w.removeListener("close",S),y.removeListener("close",S)}return w.on("end",S),w.on("close",S),y.on("close",S),y.emit("pipe",w),y}},{events:344,inherits:364,"readable-stream/lib/_stream_duplex.js":400,"readable-stream/lib/_stream_passthrough.js":401,"readable-stream/lib/_stream_readable.js":402,"readable-stream/lib/_stream_transform.js":403,"readable-stream/lib/_stream_writable.js":404,"readable-stream/lib/internal/streams/end-of-stream.js":408,"readable-stream/lib/internal/streams/pipeline.js":410}],399:[function(o,M,R){"use strict";function p(m,v){m.prototype=Object.create(v.prototype),m.prototype.constructor=m,m.__proto__=v}var f={};function h(m,v,b){b||(b=Error);function x(S,C,E){return typeof v=="string"?v:v(S,C,E)}var T=function(S){p(C,S);function C(E,j,Z){return S.call(this,x(E,j,Z))||this}return C}(b);T.prototype.name=b.name,T.prototype.code=m,f[m]=T}function y(m,v){if(Array.isArray(m)){var b=m.length;return m=m.map(function(x){return String(x)}),b>2?"one of ".concat(v," ").concat(m.slice(0,b-1).join(", "),", or ")+m[b-1]:b===2?"one of ".concat(v," ").concat(m[0]," or ").concat(m[1]):"of ".concat(v," ").concat(m[0])}else return"of ".concat(v," ").concat(String(m))}function g(m,v,b){return m.substr(!b||b<0?0:+b,v.length)===v}function w(m,v,b){return(b===void 0||b>m.length)&&(b=m.length),m.substring(b-v.length,b)===v}function c(m,v,b){return typeof b!="number"&&(b=0),b+v.length>m.length?!1:m.indexOf(v,b)!==-1}h("ERR_INVALID_OPT_VALUE",function(m,v){return'The value "'+v+'" is invalid for option "'+m+'"'},TypeError),h("ERR_INVALID_ARG_TYPE",function(m,v,b){var x;typeof v=="string"&&g(v,"not ")?(x="must not be",v=v.replace(/^not /,"")):x="must be";var T;if(w(m," argument"))T="The ".concat(m," ").concat(x," ").concat(y(v,"type"));else{var S=c(m,".")?"property":"argument";T='The "'.concat(m,'" ').concat(S," ").concat(x," ").concat(y(v,"type"))}return T+=". Received type ".concat(typeof b),T},TypeError),h("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),h("ERR_METHOD_NOT_IMPLEMENTED",function(m){return"The "+m+" method is not implemented"}),h("ERR_STREAM_PREMATURE_CLOSE","Premature close"),h("ERR_STREAM_DESTROYED",function(m){return"Cannot call "+m+" after a stream was destroyed"}),h("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),h("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),h("ERR_STREAM_WRITE_AFTER_END","write after end"),h("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),h("ERR_UNKNOWN_ENCODING",function(m){return"Unknown encoding: "+m},TypeError),h("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),M.exports.codes=f},{}],400:[function(o,M,R){(function(p){(function(){"use strict";var f=Object.keys||function(x){var T=[];for(var S in x)T.push(S);return T};M.exports=m;var h=o("./_stream_readable"),y=o("./_stream_writable");o("inherits")(m,h);for(var g=f(y.prototype),w=0;w<g.length;w++){var c=g[w];m.prototype[c]||(m.prototype[c]=y.prototype[c])}function m(x){if(!(this instanceof m))return new m(x);h.call(this,x),y.call(this,x),this.allowHalfOpen=!0,x&&(x.readable===!1&&(this.readable=!1),x.writable===!1&&(this.writable=!1),x.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",v)))}Object.defineProperty(m.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(m.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(m.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function v(){this._writableState.ended||p.nextTick(b,this)}function b(x){x.end()}Object.defineProperty(m.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(T){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=T,this._writableState.destroyed=T)}})}).call(this)}).call(this,o("_process"))},{"./_stream_readable":402,"./_stream_writable":404,_process:467,inherits:364}],401:[function(o,M,R){"use strict";M.exports=f;var p=o("./_stream_transform");o("inherits")(f,p);function f(h){if(!(this instanceof f))return new f(h);p.call(this,h)}f.prototype._transform=function(h,y,g){g(null,h)}},{"./_stream_transform":403,inherits:364}],402:[function(o,M,R){(function(p,f){(function(){"use strict";M.exports=ee;var h;ee.ReadableState=X;var y=o("events").EventEmitter,g=function(U,L){return U.listeners(L).length},w=o("./internal/streams/stream"),c=o("buffer").Buffer,m=(typeof f!="undefined"?f:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function v(te){return c.from(te)}function b(te){return c.isBuffer(te)||te instanceof m}var x=o("util"),T;x&&x.debuglog?T=x.debuglog("stream"):T=function(){};var S=o("./internal/streams/buffer_list"),C=o("./internal/streams/destroy"),E=o("./internal/streams/state"),j=E.getHighWaterMark,Z=o("../errors").codes,P=Z.ERR_INVALID_ARG_TYPE,Q=Z.ERR_STREAM_PUSH_AFTER_EOF,B=Z.ERR_METHOD_NOT_IMPLEMENTED,k=Z.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,D,F,J;o("inherits")(ee,w);var H=C.errorOrDestroy,N=["error","close","destroy","pause","resume"];function _(te,U,L){if(typeof te.prependListener=="function")return te.prependListener(U,L);!te._events||!te._events[U]?te.on(U,L):Array.isArray(te._events[U])?te._events[U].unshift(L):te._events[U]=[L,te._events[U]]}function X(te,U,L){h=h||o("./_stream_duplex"),te=te||{},typeof L!="boolean"&&(L=U instanceof h),this.objectMode=!!te.objectMode,L&&(this.objectMode=this.objectMode||!!te.readableObjectMode),this.highWaterMark=j(this,te,"readableHighWaterMark",L),this.buffer=new S,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=te.emitClose!==!1,this.autoDestroy=!!te.autoDestroy,this.destroyed=!1,this.defaultEncoding=te.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,te.encoding&&(D||(D=o("string_decoder/").StringDecoder),this.decoder=new D(te.encoding),this.encoding=te.encoding)}function ee(te){if(h=h||o("./_stream_duplex"),!(this instanceof ee))return new ee(te);var U=this instanceof h;this._readableState=new X(te,this,U),this.readable=!0,te&&(typeof te.read=="function"&&(this._read=te.read),typeof te.destroy=="function"&&(this._destroy=te.destroy)),w.call(this)}Object.defineProperty(ee.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(U){this._readableState&&(this._readableState.destroyed=U)}}),ee.prototype.destroy=C.destroy,ee.prototype._undestroy=C.undestroy,ee.prototype._destroy=function(te,U){U(te)},ee.prototype.push=function(te,U){var L=this._readableState,$;return L.objectMode?$=!0:typeof te=="string"&&(U=U||L.defaultEncoding,U!==L.encoding&&(te=c.from(te,U),U=""),$=!0),ie(this,te,U,!1,$)},ee.prototype.unshift=function(te){return ie(this,te,null,!0,!1)};function ie(te,U,L,$,ue){T("readableAddChunk",U);var Ee=te._readableState;if(U===null)Ee.reading=!1,ve(te,Ee);else{var ze;if(ue||(ze=ne(Ee,U)),ze)H(te,ze);else if(Ee.objectMode||U&&U.length>0)if(typeof U!="string"&&!Ee.objectMode&&Object.getPrototypeOf(U)!==c.prototype&&(U=v(U)),$)Ee.endEmitted?H(te,new k):he(te,Ee,U,!0);else if(Ee.ended)H(te,new Q);else{if(Ee.destroyed)return!1;Ee.reading=!1,Ee.decoder&&!L?(U=Ee.decoder.write(U),Ee.objectMode||U.length!==0?he(te,Ee,U,!1):fe(te,Ee)):he(te,Ee,U,!1)}else $||(Ee.reading=!1,fe(te,Ee))}return!Ee.ended&&(Ee.length<Ee.highWaterMark||Ee.length===0)}function he(te,U,L,$){U.flowing&&U.length===0&&!U.sync?(U.awaitDrain=0,te.emit("data",L)):(U.length+=U.objectMode?1:L.length,$?U.buffer.unshift(L):U.buffer.push(L),U.needReadable&&xe(te)),fe(te,U)}function ne(te,U){var L;return!b(U)&&typeof U!="string"&&U!==void 0&&!te.objectMode&&(L=new P("chunk",["string","Buffer","Uint8Array"],U)),L}ee.prototype.isPaused=function(){return this._readableState.flowing===!1},ee.prototype.setEncoding=function(te){D||(D=o("string_decoder/").StringDecoder);var U=new D(te);this._readableState.decoder=U,this._readableState.encoding=this._readableState.decoder.encoding;for(var L=this._readableState.buffer.head,$="";L!==null;)$+=U.write(L.data),L=L.next;return this._readableState.buffer.clear(),$!==""&&this._readableState.buffer.push($),this._readableState.length=$.length,this};var Ie=1073741824;function q(te){return te>=Ie?te=Ie:(te--,te|=te>>>1,te|=te>>>2,te|=te>>>4,te|=te>>>8,te|=te>>>16,te++),te}function pe(te,U){return te<=0||U.length===0&&U.ended?0:U.objectMode?1:te!==te?U.flowing&&U.length?U.buffer.head.data.length:U.length:(te>U.highWaterMark&&(U.highWaterMark=q(te)),te<=U.length?te:U.ended?U.length:(U.needReadable=!0,0))}ee.prototype.read=function(te){T("read",te),te=parseInt(te,10);var U=this._readableState,L=te;if(te!==0&&(U.emittedReadable=!1),te===0&&U.needReadable&&((U.highWaterMark!==0?U.length>=U.highWaterMark:U.length>0)||U.ended))return T("read: emitReadable",U.length,U.ended),U.length===0&&U.ended?G(this):xe(this),null;if(te=pe(te,U),te===0&&U.ended)return U.length===0&&G(this),null;var $=U.needReadable;T("need readable",$),(U.length===0||U.length-te<U.highWaterMark)&&($=!0,T("length less than watermark",$)),U.ended||U.reading?($=!1,T("reading or ended",$)):$&&(T("do read"),U.reading=!0,U.sync=!0,U.length===0&&(U.needReadable=!0),this._read(U.highWaterMark),U.sync=!1,U.reading||(te=pe(L,U)));var ue;return te>0?ue=V(te,U):ue=null,ue===null?(U.needReadable=U.length<=U.highWaterMark,te=0):(U.length-=te,U.awaitDrain=0),U.length===0&&(U.ended||(U.needReadable=!0),L!==te&&U.ended&&G(this)),ue!==null&&this.emit("data",ue),ue};function ve(te,U){if(T("onEofChunk"),!U.ended){if(U.decoder){var L=U.decoder.end();L&&L.length&&(U.buffer.push(L),U.length+=U.objectMode?1:L.length)}U.ended=!0,U.sync?xe(te):(U.needReadable=!1,U.emittedReadable||(U.emittedReadable=!0,ce(te)))}}function xe(te){var U=te._readableState;T("emitReadable",U.needReadable,U.emittedReadable),U.needReadable=!1,U.emittedReadable||(T("emitReadable",U.flowing),U.emittedReadable=!0,p.nextTick(ce,te))}function ce(te){var U=te._readableState;T("emitReadable_",U.destroyed,U.length,U.ended),!U.destroyed&&(U.length||U.ended)&&(te.emit("readable"),U.emittedReadable=!1),U.needReadable=!U.flowing&&!U.ended&&U.length<=U.highWaterMark,ye(te)}function fe(te,U){U.readingMore||(U.readingMore=!0,p.nextTick(ge,te,U))}function ge(te,U){for(;!U.reading&&!U.ended&&(U.length<U.highWaterMark||U.flowing&&U.length===0);){var L=U.length;if(T("maybeReadMore read 0"),te.read(0),L===U.length)break}U.readingMore=!1}ee.prototype._read=function(te){H(this,new B("_read()"))},ee.prototype.pipe=function(te,U){var L=this,$=this._readableState;switch($.pipesCount){case 0:$.pipes=te;break;case 1:$.pipes=[$.pipes,te];break;default:$.pipes.push(te);break}$.pipesCount+=1,T("pipe count=%d opts=%j",$.pipesCount,U);var ue=(!U||U.end!==!1)&&te!==p.stdout&&te!==p.stderr,Ee=ue?_e:rt;$.endEmitted?p.nextTick(Ee):L.once("end",Ee),te.on("unpipe",ze);function ze(qe,pt){T("onunpipe"),qe===L&&pt&&pt.hasUnpiped===!1&&(pt.hasUnpiped=!0,Me())}function _e(){T("onend"),te.end()}var le=Se(L);te.on("drain",le);var Re=!1;function Me(){T("cleanup"),te.removeListener("close",Je),te.removeListener("finish",$e),te.removeListener("drain",le),te.removeListener("error",Be),te.removeListener("unpipe",ze),L.removeListener("end",_e),L.removeListener("end",rt),L.removeListener("data",He),Re=!0,$.awaitDrain&&(!te._writableState||te._writableState.needDrain)&&le()}L.on("data",He);function He(qe){T("ondata");var pt=te.write(qe);T("dest.write",pt),pt===!1&&(($.pipesCount===1&&$.pipes===te||$.pipesCount>1&&K($.pipes,te)!==-1)&&!Re&&(T("false write response, pause",$.awaitDrain),$.awaitDrain++),L.pause())}function Be(qe){T("onerror",qe),rt(),te.removeListener("error",Be),g(te,"error")===0&&H(te,qe)}_(te,"error",Be);function Je(){te.removeListener("finish",$e),rt()}te.once("close",Je);function $e(){T("onfinish"),te.removeListener("close",Je),rt()}te.once("finish",$e);function rt(){T("unpipe"),L.unpipe(te)}return te.emit("pipe",L),$.flowing||(T("pipe resume"),L.resume()),te};function Se(te){return function(){var L=te._readableState;T("pipeOnDrain",L.awaitDrain),L.awaitDrain&&L.awaitDrain--,L.awaitDrain===0&&g(te,"data")&&(L.flowing=!0,ye(te))}}ee.prototype.unpipe=function(te){var U=this._readableState,L={hasUnpiped:!1};if(U.pipesCount===0)return this;if(U.pipesCount===1)return te&&te!==U.pipes?this:(te||(te=U.pipes),U.pipes=null,U.pipesCount=0,U.flowing=!1,te&&te.emit("unpipe",this,L),this);if(!te){var $=U.pipes,ue=U.pipesCount;U.pipes=null,U.pipesCount=0,U.flowing=!1;for(var Ee=0;Ee<ue;Ee++)$[Ee].emit("unpipe",this,{hasUnpiped:!1});return this}var ze=K(U.pipes,te);return ze===-1?this:(U.pipes.splice(ze,1),U.pipesCount-=1,U.pipesCount===1&&(U.pipes=U.pipes[0]),te.emit("unpipe",this,L),this)},ee.prototype.on=function(te,U){var L=w.prototype.on.call(this,te,U),$=this._readableState;return te==="data"?($.readableListening=this.listenerCount("readable")>0,$.flowing!==!1&&this.resume()):te==="readable"&&!$.endEmitted&&!$.readableListening&&($.readableListening=$.needReadable=!0,$.flowing=!1,$.emittedReadable=!1,T("on readable",$.length,$.reading),$.length?xe(this):$.reading||p.nextTick(ke,this)),L},ee.prototype.addListener=ee.prototype.on,ee.prototype.removeListener=function(te,U){var L=w.prototype.removeListener.call(this,te,U);return te==="readable"&&p.nextTick(De,this),L},ee.prototype.removeAllListeners=function(te){var U=w.prototype.removeAllListeners.apply(this,arguments);return(te==="readable"||te===void 0)&&p.nextTick(De,this),U};function De(te){var U=te._readableState;U.readableListening=te.listenerCount("readable")>0,U.resumeScheduled&&!U.paused?U.flowing=!0:te.listenerCount("data")>0&&te.resume()}function ke(te){T("readable nexttick read 0"),te.read(0)}ee.prototype.resume=function(){var te=this._readableState;return te.flowing||(T("resume"),te.flowing=!te.readableListening,de(this,te)),te.paused=!1,this};function de(te,U){U.resumeScheduled||(U.resumeScheduled=!0,p.nextTick(Y,te,U))}function Y(te,U){T("resume",U.reading),U.reading||te.read(0),U.resumeScheduled=!1,te.emit("resume"),ye(te),U.flowing&&!U.reading&&te.read(0)}ee.prototype.pause=function(){return T("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(T("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function ye(te){var U=te._readableState;for(T("flow",U.flowing);U.flowing&&te.read()!==null;);}ee.prototype.wrap=function(te){var U=this,L=this._readableState,$=!1;te.on("end",function(){if(T("wrapped end"),L.decoder&&!L.ended){var ze=L.decoder.end();ze&&ze.length&&U.push(ze)}U.push(null)}),te.on("data",function(ze){if(T("wrapped data"),L.decoder&&(ze=L.decoder.write(ze)),!(L.objectMode&&ze==null)&&!(!L.objectMode&&(!ze||!ze.length))){var _e=U.push(ze);_e||($=!0,te.pause())}});for(var ue in te)this[ue]===void 0&&typeof te[ue]=="function"&&(this[ue]=function(_e){return function(){return te[_e].apply(te,arguments)}}(ue));for(var Ee=0;Ee<N.length;Ee++)te.on(N[Ee],this.emit.bind(this,N[Ee]));return this._read=function(ze){T("wrapped _read",ze),$&&($=!1,te.resume())},this},typeof Symbol=="function"&&(ee.prototype[Symbol.asyncIterator]=function(){return F===void 0&&(F=o("./internal/streams/async_iterator")),F(this)}),Object.defineProperty(ee.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(ee.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(ee.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(U){this._readableState&&(this._readableState.flowing=U)}}),ee._fromList=V,Object.defineProperty(ee.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function V(te,U){if(U.length===0)return null;var L;return U.objectMode?L=U.buffer.shift():!te||te>=U.length?(U.decoder?L=U.buffer.join(""):U.buffer.length===1?L=U.buffer.first():L=U.buffer.concat(U.length),U.buffer.clear()):L=U.buffer.consume(te,U.decoder),L}function G(te){var U=te._readableState;T("endReadable",U.endEmitted),U.endEmitted||(U.ended=!0,p.nextTick(W,U,te))}function W(te,U){if(T("endReadableNT",te.endEmitted,te.length),!te.endEmitted&&te.length===0&&(te.endEmitted=!0,U.readable=!1,U.emit("end"),te.autoDestroy)){var L=U._writableState;(!L||L.autoDestroy&&L.finished)&&U.destroy()}}typeof Symbol=="function"&&(ee.from=function(te,U){return J===void 0&&(J=o("./internal/streams/from")),J(ee,te,U)});function K(te,U){for(var L=0,$=te.length;L<$;L++)if(te[L]===U)return L;return-1}}).call(this)}).call(this,o("_process"),typeof mt!="undefined"?mt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"../errors":399,"./_stream_duplex":400,"./internal/streams/async_iterator":405,"./internal/streams/buffer_list":406,"./internal/streams/destroy":407,"./internal/streams/from":409,"./internal/streams/state":411,"./internal/streams/stream":412,_process:467,buffer:90,events:344,inherits:364,"string_decoder/":413,util:89}],403:[function(o,M,R){"use strict";M.exports=m;var p=o("../errors").codes,f=p.ERR_METHOD_NOT_IMPLEMENTED,h=p.ERR_MULTIPLE_CALLBACK,y=p.ERR_TRANSFORM_ALREADY_TRANSFORMING,g=p.ERR_TRANSFORM_WITH_LENGTH_0,w=o("./_stream_duplex");o("inherits")(m,w);function c(x,T){var S=this._transformState;S.transforming=!1;var C=S.writecb;if(C===null)return this.emit("error",new h);S.writechunk=null,S.writecb=null,T!=null&&this.push(T),C(x);var E=this._readableState;E.reading=!1,(E.needReadable||E.length<E.highWaterMark)&&this._read(E.highWaterMark)}function m(x){if(!(this instanceof m))return new m(x);w.call(this,x),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,x&&(typeof x.transform=="function"&&(this._transform=x.transform),typeof x.flush=="function"&&(this._flush=x.flush)),this.on("prefinish",v)}function v(){var x=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(T,S){b(x,T,S)}):b(this,null,null)}m.prototype.push=function(x,T){return this._transformState.needTransform=!1,w.prototype.push.call(this,x,T)},m.prototype._transform=function(x,T,S){S(new f("_transform()"))},m.prototype._write=function(x,T,S){var C=this._transformState;if(C.writecb=S,C.writechunk=x,C.writeencoding=T,!C.transforming){var E=this._readableState;(C.needTransform||E.needReadable||E.length<E.highWaterMark)&&this._read(E.highWaterMark)}},m.prototype._read=function(x){var T=this._transformState;T.writechunk!==null&&!T.transforming?(T.transforming=!0,this._transform(T.writechunk,T.writeencoding,T.afterTransform)):T.needTransform=!0},m.prototype._destroy=function(x,T){w.prototype._destroy.call(this,x,function(S){T(S)})};function b(x,T,S){if(T)return x.emit("error",T);if(S!=null&&x.push(S),x._writableState.length)throw new g;if(x._transformState.transforming)throw new y;return x.push(null)}},{"../errors":399,"./_stream_duplex":400,inherits:364}],404:[function(o,M,R){(function(p,f){(function(){"use strict";M.exports=X;function h(ye,V,G){this.chunk=ye,this.encoding=V,this.callback=G,this.next=null}function y(ye){var V=this;this.next=null,this.entry=null,this.finish=function(){Y(V,ye)}}var g;X.WritableState=N;var w={deprecate:o("util-deprecate")},c=o("./internal/streams/stream"),m=o("buffer").Buffer,v=(typeof f!="undefined"?f:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function b(ye){return m.from(ye)}function x(ye){return m.isBuffer(ye)||ye instanceof v}var T=o("./internal/streams/destroy"),S=o("./internal/streams/state"),C=S.getHighWaterMark,E=o("../errors").codes,j=E.ERR_INVALID_ARG_TYPE,Z=E.ERR_METHOD_NOT_IMPLEMENTED,P=E.ERR_MULTIPLE_CALLBACK,Q=E.ERR_STREAM_CANNOT_PIPE,B=E.ERR_STREAM_DESTROYED,k=E.ERR_STREAM_NULL_VALUES,D=E.ERR_STREAM_WRITE_AFTER_END,F=E.ERR_UNKNOWN_ENCODING,J=T.errorOrDestroy;o("inherits")(X,c);function H(){}function N(ye,V,G){g=g||o("./_stream_duplex"),ye=ye||{},typeof G!="boolean"&&(G=V instanceof g),this.objectMode=!!ye.objectMode,G&&(this.objectMode=this.objectMode||!!ye.writableObjectMode),this.highWaterMark=C(this,ye,"writableHighWaterMark",G),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var W=ye.decodeStrings===!1;this.decodeStrings=!W,this.defaultEncoding=ye.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(K){ve(V,K)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=ye.emitClose!==!1,this.autoDestroy=!!ye.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new y(this)}N.prototype.getBuffer=function(){for(var V=this.bufferedRequest,G=[];V;)G.push(V),V=V.next;return G},function(){try{Object.defineProperty(N.prototype,"buffer",{get:w.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(ye){}}();var _;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(_=Function.prototype[Symbol.hasInstance],Object.defineProperty(X,Symbol.hasInstance,{value:function(V){return _.call(this,V)?!0:this!==X?!1:V&&V._writableState instanceof N}})):_=function(V){return V instanceof this};function X(ye){g=g||o("./_stream_duplex");var V=this instanceof g;if(!V&&!_.call(X,this))return new X(ye);this._writableState=new N(ye,this,V),this.writable=!0,ye&&(typeof ye.write=="function"&&(this._write=ye.write),typeof ye.writev=="function"&&(this._writev=ye.writev),typeof ye.destroy=="function"&&(this._destroy=ye.destroy),typeof ye.final=="function"&&(this._final=ye.final)),c.call(this)}X.prototype.pipe=function(){J(this,new Q)};function ee(ye,V){var G=new D;J(ye,G),p.nextTick(V,G)}function ie(ye,V,G,W){var K;return G===null?K=new k:typeof G!="string"&&!V.objectMode&&(K=new j("chunk",["string","Buffer"],G)),K?(J(ye,K),p.nextTick(W,K),!1):!0}X.prototype.write=function(ye,V,G){var W=this._writableState,K=!1,te=!W.objectMode&&x(ye);return te&&!m.isBuffer(ye)&&(ye=b(ye)),typeof V=="function"&&(G=V,V=null),te?V="buffer":V||(V=W.defaultEncoding),typeof G!="function"&&(G=H),W.ending?ee(this,G):(te||ie(this,W,ye,G))&&(W.pendingcb++,K=ne(this,W,te,ye,V,G)),K},X.prototype.cork=function(){this._writableState.corked++},X.prototype.uncork=function(){var ye=this._writableState;ye.corked&&(ye.corked--,!ye.writing&&!ye.corked&&!ye.bufferProcessing&&ye.bufferedRequest&&fe(this,ye))},X.prototype.setDefaultEncoding=function(V){if(typeof V=="string"&&(V=V.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((V+"").toLowerCase())>-1))throw new F(V);return this._writableState.defaultEncoding=V,this},Object.defineProperty(X.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function he(ye,V,G){return!ye.objectMode&&ye.decodeStrings!==!1&&typeof V=="string"&&(V=m.from(V,G)),V}Object.defineProperty(X.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function ne(ye,V,G,W,K,te){if(!G){var U=he(V,W,K);W!==U&&(G=!0,K="buffer",W=U)}var L=V.objectMode?1:W.length;V.length+=L;var $=V.length<V.highWaterMark;if($||(V.needDrain=!0),V.writing||V.corked){var ue=V.lastBufferedRequest;V.lastBufferedRequest={chunk:W,encoding:K,isBuf:G,callback:te,next:null},ue?ue.next=V.lastBufferedRequest:V.bufferedRequest=V.lastBufferedRequest,V.bufferedRequestCount+=1}else Ie(ye,V,!1,L,W,K,te);return $}function Ie(ye,V,G,W,K,te,U){V.writelen=W,V.writecb=U,V.writing=!0,V.sync=!0,V.destroyed?V.onwrite(new B("write")):G?ye._writev(K,V.onwrite):ye._write(K,te,V.onwrite),V.sync=!1}function q(ye,V,G,W,K){--V.pendingcb,G?(p.nextTick(K,W),p.nextTick(ke,ye,V),ye._writableState.errorEmitted=!0,J(ye,W)):(K(W),ye._writableState.errorEmitted=!0,J(ye,W),ke(ye,V))}function pe(ye){ye.writing=!1,ye.writecb=null,ye.length-=ye.writelen,ye.writelen=0}function ve(ye,V){var G=ye._writableState,W=G.sync,K=G.writecb;if(typeof K!="function")throw new P;if(pe(G),V)q(ye,G,W,V,K);else{var te=ge(G)||ye.destroyed;!te&&!G.corked&&!G.bufferProcessing&&G.bufferedRequest&&fe(ye,G),W?p.nextTick(xe,ye,G,te,K):xe(ye,G,te,K)}}function xe(ye,V,G,W){G||ce(ye,V),V.pendingcb--,W(),ke(ye,V)}function ce(ye,V){V.length===0&&V.needDrain&&(V.needDrain=!1,ye.emit("drain"))}function fe(ye,V){V.bufferProcessing=!0;var G=V.bufferedRequest;if(ye._writev&&G&&G.next){var W=V.bufferedRequestCount,K=new Array(W),te=V.corkedRequestsFree;te.entry=G;for(var U=0,L=!0;G;)K[U]=G,G.isBuf||(L=!1),G=G.next,U+=1;K.allBuffers=L,Ie(ye,V,!0,V.length,K,"",te.finish),V.pendingcb++,V.lastBufferedRequest=null,te.next?(V.corkedRequestsFree=te.next,te.next=null):V.corkedRequestsFree=new y(V),V.bufferedRequestCount=0}else{for(;G;){var $=G.chunk,ue=G.encoding,Ee=G.callback,ze=V.objectMode?1:$.length;if(Ie(ye,V,!1,ze,$,ue,Ee),G=G.next,V.bufferedRequestCount--,V.writing)break}G===null&&(V.lastBufferedRequest=null)}V.bufferedRequest=G,V.bufferProcessing=!1}X.prototype._write=function(ye,V,G){G(new Z("_write()"))},X.prototype._writev=null,X.prototype.end=function(ye,V,G){var W=this._writableState;return typeof ye=="function"?(G=ye,ye=null,V=null):typeof V=="function"&&(G=V,V=null),ye!=null&&this.write(ye,V),W.corked&&(W.corked=1,this.uncork()),W.ending||de(this,W,G),this},Object.defineProperty(X.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function ge(ye){return ye.ending&&ye.length===0&&ye.bufferedRequest===null&&!ye.finished&&!ye.writing}function Se(ye,V){ye._final(function(G){V.pendingcb--,G&&J(ye,G),V.prefinished=!0,ye.emit("prefinish"),ke(ye,V)})}function De(ye,V){!V.prefinished&&!V.finalCalled&&(typeof ye._final=="function"&&!V.destroyed?(V.pendingcb++,V.finalCalled=!0,p.nextTick(Se,ye,V)):(V.prefinished=!0,ye.emit("prefinish")))}function ke(ye,V){var G=ge(V);if(G&&(De(ye,V),V.pendingcb===0&&(V.finished=!0,ye.emit("finish"),V.autoDestroy))){var W=ye._readableState;(!W||W.autoDestroy&&W.endEmitted)&&ye.destroy()}return G}function de(ye,V,G){V.ending=!0,ke(ye,V),G&&(V.finished?p.nextTick(G):ye.once("finish",G)),V.ended=!0,ye.writable=!1}function Y(ye,V,G){var W=ye.entry;for(ye.entry=null;W;){var K=W.callback;V.pendingcb--,K(G),W=W.next}V.corkedRequestsFree.next=ye}Object.defineProperty(X.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(V){this._writableState&&(this._writableState.destroyed=V)}}),X.prototype.destroy=T.destroy,X.prototype._undestroy=T.undestroy,X.prototype._destroy=function(ye,V){V(ye)}}).call(this)}).call(this,o("_process"),typeof mt!="undefined"?mt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"../errors":399,"./_stream_duplex":400,"./internal/streams/destroy":407,"./internal/streams/state":411,"./internal/streams/stream":412,_process:467,buffer:90,inherits:364,"util-deprecate":416}],405:[function(o,M,R){(function(p){(function(){"use strict";var f;function h(k,D,F){return D=y(D),D in k?Object.defineProperty(k,D,{value:F,enumerable:!0,configurable:!0,writable:!0}):k[D]=F,k}function y(k){var D=g(k,"string");return typeof D=="symbol"?D:String(D)}function g(k,D){if(typeof k!="object"||k===null)return k;var F=k[Symbol.toPrimitive];if(F!==void 0){var J=F.call(k,D||"default");if(typeof J!="object")return J;throw new TypeError("@@toPrimitive must return a primitive value.")}return(D==="string"?String:Number)(k)}var w=o("./end-of-stream"),c=Symbol("lastResolve"),m=Symbol("lastReject"),v=Symbol("error"),b=Symbol("ended"),x=Symbol("lastPromise"),T=Symbol("handlePromise"),S=Symbol("stream");function C(k,D){return{value:k,done:D}}function E(k){var D=k[c];if(D!==null){var F=k[S].read();F!==null&&(k[x]=null,k[c]=null,k[m]=null,D(C(F,!1)))}}function j(k){p.nextTick(E,k)}function Z(k,D){return function(F,J){k.then(function(){if(D[b]){F(C(void 0,!0));return}D[T](F,J)},J)}}var P=Object.getPrototypeOf(function(){}),Q=Object.setPrototypeOf((f={get stream(){return this[S]},next:function(){var D=this,F=this[v];if(F!==null)return Promise.reject(F);if(this[b])return Promise.resolve(C(void 0,!0));if(this[S].destroyed)return new Promise(function(_,X){p.nextTick(function(){D[v]?X(D[v]):_(C(void 0,!0))})});var J=this[x],H;if(J)H=new Promise(Z(J,this));else{var N=this[S].read();if(N!==null)return Promise.resolve(C(N,!1));H=new Promise(this[T])}return this[x]=H,H}},h(f,Symbol.asyncIterator,function(){return this}),h(f,"return",function(){var D=this;return new Promise(function(F,J){D[S].destroy(null,function(H){if(H){J(H);return}F(C(void 0,!0))})})}),f),P),B=function(D){var F,J=Object.create(Q,(F={},h(F,S,{value:D,writable:!0}),h(F,c,{value:null,writable:!0}),h(F,m,{value:null,writable:!0}),h(F,v,{value:null,writable:!0}),h(F,b,{value:D._readableState.endEmitted,writable:!0}),h(F,T,{value:function(N,_){var X=J[S].read();X?(J[x]=null,J[c]=null,J[m]=null,N(C(X,!1))):(J[c]=N,J[m]=_)},writable:!0}),F));return J[x]=null,w(D,function(H){if(H&&H.code!=="ERR_STREAM_PREMATURE_CLOSE"){var N=J[m];N!==null&&(J[x]=null,J[c]=null,J[m]=null,N(H)),J[v]=H;return}var _=J[c];_!==null&&(J[x]=null,J[c]=null,J[m]=null,_(C(void 0,!0))),J[b]=!0}),D.on("readable",j.bind(null,J)),J};M.exports=B}).call(this)}).call(this,o("_process"))},{"./end-of-stream":408,_process:467}],406:[function(o,M,R){"use strict";function p(E,j){var Z=Object.keys(E);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(E);j&&(P=P.filter(function(Q){return Object.getOwnPropertyDescriptor(E,Q).enumerable})),Z.push.apply(Z,P)}return Z}function f(E){for(var j=1;j<arguments.length;j++){var Z=arguments[j]!=null?arguments[j]:{};j%2?p(Object(Z),!0).forEach(function(P){h(E,P,Z[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(Z)):p(Object(Z)).forEach(function(P){Object.defineProperty(E,P,Object.getOwnPropertyDescriptor(Z,P))})}return E}function h(E,j,Z){return j=c(j),j in E?Object.defineProperty(E,j,{value:Z,enumerable:!0,configurable:!0,writable:!0}):E[j]=Z,E}function y(E,j){if(!(E instanceof j))throw new TypeError("Cannot call a class as a function")}function g(E,j){for(var Z=0;Z<j.length;Z++){var P=j[Z];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(E,c(P.key),P)}}function w(E,j,Z){return j&&g(E.prototype,j),Z&&g(E,Z),Object.defineProperty(E,"prototype",{writable:!1}),E}function c(E){var j=m(E,"string");return typeof j=="symbol"?j:String(j)}function m(E,j){if(typeof E!="object"||E===null)return E;var Z=E[Symbol.toPrimitive];if(Z!==void 0){var P=Z.call(E,j||"default");if(typeof P!="object")return P;throw new TypeError("@@toPrimitive must return a primitive value.")}return(j==="string"?String:Number)(E)}var v=o("buffer"),b=v.Buffer,x=o("util"),T=x.inspect,S=T&&T.custom||"inspect";function C(E,j,Z){b.prototype.copy.call(E,j,Z)}M.exports=function(){function E(){y(this,E),this.head=null,this.tail=null,this.length=0}return w(E,[{key:"push",value:function(Z){var P={data:Z,next:null};this.length>0?this.tail.next=P:this.head=P,this.tail=P,++this.length}},{key:"unshift",value:function(Z){var P={data:Z,next:this.head};this.length===0&&(this.tail=P),this.head=P,++this.length}},{key:"shift",value:function(){if(this.length!==0){var Z=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,Z}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(Z){if(this.length===0)return"";for(var P=this.head,Q=""+P.data;P=P.next;)Q+=Z+P.data;return Q}},{key:"concat",value:function(Z){if(this.length===0)return b.alloc(0);for(var P=b.allocUnsafe(Z>>>0),Q=this.head,B=0;Q;)C(Q.data,P,B),B+=Q.data.length,Q=Q.next;return P}},{key:"consume",value:function(Z,P){var Q;return Z<this.head.data.length?(Q=this.head.data.slice(0,Z),this.head.data=this.head.data.slice(Z)):Z===this.head.data.length?Q=this.shift():Q=P?this._getString(Z):this._getBuffer(Z),Q}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(Z){var P=this.head,Q=1,B=P.data;for(Z-=B.length;P=P.next;){var k=P.data,D=Z>k.length?k.length:Z;if(D===k.length?B+=k:B+=k.slice(0,Z),Z-=D,Z===0){D===k.length?(++Q,P.next?this.head=P.next:this.head=this.tail=null):(this.head=P,P.data=k.slice(D));break}++Q}return this.length-=Q,B}},{key:"_getBuffer",value:function(Z){var P=b.allocUnsafe(Z),Q=this.head,B=1;for(Q.data.copy(P),Z-=Q.data.length;Q=Q.next;){var k=Q.data,D=Z>k.length?k.length:Z;if(k.copy(P,P.length-Z,0,D),Z-=D,Z===0){D===k.length?(++B,Q.next?this.head=Q.next:this.head=this.tail=null):(this.head=Q,Q.data=k.slice(D));break}++B}return this.length-=B,P}},{key:S,value:function(Z,P){return T(this,f(f({},P),{},{depth:0,customInspect:!1}))}}]),E}()},{buffer:90,util:89}],407:[function(o,M,R){(function(p){(function(){"use strict";function f(m,v){var b=this,x=this._readableState&&this._readableState.destroyed,T=this._writableState&&this._writableState.destroyed;return x||T?(v?v(m):m&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,p.nextTick(w,this,m)):p.nextTick(w,this,m)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(m||null,function(S){!v&&S?b._writableState?b._writableState.errorEmitted?p.nextTick(y,b):(b._writableState.errorEmitted=!0,p.nextTick(h,b,S)):p.nextTick(h,b,S):v?(p.nextTick(y,b),v(S)):p.nextTick(y,b)}),this)}function h(m,v){w(m,v),y(m)}function y(m){m._writableState&&!m._writableState.emitClose||m._readableState&&!m._readableState.emitClose||m.emit("close")}function g(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function w(m,v){m.emit("error",v)}function c(m,v){var b=m._readableState,x=m._writableState;b&&b.autoDestroy||x&&x.autoDestroy?m.destroy(v):m.emit("error",v)}M.exports={destroy:f,undestroy:g,errorOrDestroy:c}}).call(this)}).call(this,o("_process"))},{_process:467}],408:[function(o,M,R){"use strict";var p=o("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function f(w){var c=!1;return function(){if(!c){c=!0;for(var m=arguments.length,v=new Array(m),b=0;b<m;b++)v[b]=arguments[b];w.apply(this,v)}}}function h(){}function y(w){return w.setHeader&&typeof w.abort=="function"}function g(w,c,m){if(typeof c=="function")return g(w,null,c);c||(c={}),m=f(m||h);var v=c.readable||c.readable!==!1&&w.readable,b=c.writable||c.writable!==!1&&w.writable,x=function(){w.writable||S()},T=w._writableState&&w._writableState.finished,S=function(){b=!1,T=!0,v||m.call(w)},C=w._readableState&&w._readableState.endEmitted,E=function(){v=!1,C=!0,b||m.call(w)},j=function(B){m.call(w,B)},Z=function(){var B;if(v&&!C)return(!w._readableState||!w._readableState.ended)&&(B=new p),m.call(w,B);if(b&&!T)return(!w._writableState||!w._writableState.ended)&&(B=new p),m.call(w,B)},P=function(){w.req.on("finish",S)};return y(w)?(w.on("complete",S),w.on("abort",Z),w.req?P():w.on("request",P)):b&&!w._writableState&&(w.on("end",x),w.on("close",x)),w.on("end",E),w.on("finish",S),c.error!==!1&&w.on("error",j),w.on("close",Z),function(){w.removeListener("complete",S),w.removeListener("abort",Z),w.removeListener("request",P),w.req&&w.req.removeListener("finish",S),w.removeListener("end",x),w.removeListener("close",x),w.removeListener("finish",S),w.removeListener("end",E),w.removeListener("error",j),w.removeListener("close",Z)}}M.exports=g},{"../../../errors":399}],409:[function(o,M,R){M.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],410:[function(o,M,R){"use strict";var p;function f(S){var C=!1;return function(){C||(C=!0,S.apply(void 0,arguments))}}var h=o("../../../errors").codes,y=h.ERR_MISSING_ARGS,g=h.ERR_STREAM_DESTROYED;function w(S){if(S)throw S}function c(S){return S.setHeader&&typeof S.abort=="function"}function m(S,C,E,j){j=f(j);var Z=!1;S.on("close",function(){Z=!0}),p===void 0&&(p=o("./end-of-stream")),p(S,{readable:C,writable:E},function(Q){if(Q)return j(Q);Z=!0,j()});var P=!1;return function(Q){if(!Z&&!P){if(P=!0,c(S))return S.abort();if(typeof S.destroy=="function")return S.destroy();j(Q||new g("pipe"))}}}function v(S){S()}function b(S,C){return S.pipe(C)}function x(S){return!S.length||typeof S[S.length-1]!="function"?w:S.pop()}function T(){for(var S=arguments.length,C=new Array(S),E=0;E<S;E++)C[E]=arguments[E];var j=x(C);if(Array.isArray(C[0])&&(C=C[0]),C.length<2)throw new y("streams");var Z,P=C.map(function(Q,B){var k=B<C.length-1,D=B>0;return m(Q,k,D,function(F){Z||(Z=F),F&&P.forEach(v),!k&&(P.forEach(v),j(Z))})});return C.reduce(b)}M.exports=T},{"../../../errors":399,"./end-of-stream":408}],411:[function(o,M,R){"use strict";var p=o("../../../errors").codes.ERR_INVALID_OPT_VALUE;function f(y,g,w){return y.highWaterMark!=null?y.highWaterMark:g?y[w]:null}function h(y,g,w,c){var m=f(g,c,w);if(m!=null){if(!(isFinite(m)&&Math.floor(m)===m)||m<0){var v=c?w:"highWaterMark";throw new p(v,m)}return Math.floor(m)}return y.objectMode?16:16*1024}M.exports={getHighWaterMark:h}},{"../../../errors":399}],412:[function(o,M,R){arguments[4][393][0].apply(R,arguments)},{dup:393,events:344}],413:[function(o,M,R){"use strict";var p=o("safe-buffer").Buffer,f=p.isEncoding||function(P){switch(P=""+P,P&&P.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function h(P){if(!P)return"utf8";for(var Q;;)switch(P){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return P;default:if(Q)return;P=(""+P).toLowerCase(),Q=!0}}function y(P){var Q=h(P);if(typeof Q!="string"&&(p.isEncoding===f||!f(P)))throw new Error("Unknown encoding: "+P);return Q||P}R.StringDecoder=g;function g(P){this.encoding=y(P);var Q;switch(this.encoding){case"utf16le":this.text=T,this.end=S,Q=4;break;case"utf8":this.fillLast=v,Q=4;break;case"base64":this.text=C,this.end=E,Q=3;break;default:this.write=j,this.end=Z;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=p.allocUnsafe(Q)}g.prototype.write=function(P){if(P.length===0)return"";var Q,B;if(this.lastNeed){if(Q=this.fillLast(P),Q===void 0)return"";B=this.lastNeed,this.lastNeed=0}else B=0;return B<P.length?Q?Q+this.text(P,B):this.text(P,B):Q||""},g.prototype.end=x,g.prototype.text=b,g.prototype.fillLast=function(P){if(this.lastNeed<=P.length)return P.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);P.copy(this.lastChar,this.lastTotal-this.lastNeed,0,P.length),this.lastNeed-=P.length};function w(P){return P<=127?0:P>>5===6?2:P>>4===14?3:P>>3===30?4:P>>6===2?-1:-2}function c(P,Q,B){var k=Q.length-1;if(k<B)return 0;var D=w(Q[k]);return D>=0?(D>0&&(P.lastNeed=D-1),D):--k<B||D===-2?0:(D=w(Q[k]),D>=0?(D>0&&(P.lastNeed=D-2),D):--k<B||D===-2?0:(D=w(Q[k]),D>=0?(D>0&&(D===2?D=0:P.lastNeed=D-3),D):0))}function m(P,Q,B){if((Q[0]&192)!==128)return P.lastNeed=0,"\uFFFD";if(P.lastNeed>1&&Q.length>1){if((Q[1]&192)!==128)return P.lastNeed=1,"\uFFFD";if(P.lastNeed>2&&Q.length>2&&(Q[2]&192)!==128)return P.lastNeed=2,"\uFFFD"}}function v(P){var Q=this.lastTotal-this.lastNeed,B=m(this,P,Q);if(B!==void 0)return B;if(this.lastNeed<=P.length)return P.copy(this.lastChar,Q,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);P.copy(this.lastChar,Q,0,P.length),this.lastNeed-=P.length}function b(P,Q){var B=c(this,P,Q);if(!this.lastNeed)return P.toString("utf8",Q);this.lastTotal=B;var k=P.length-(B-this.lastNeed);return P.copy(this.lastChar,0,k),P.toString("utf8",Q,k)}function x(P){var Q=P&&P.length?this.write(P):"";return this.lastNeed?Q+"\uFFFD":Q}function T(P,Q){if((P.length-Q)%2===0){var B=P.toString("utf16le",Q);if(B){var k=B.charCodeAt(B.length-1);if(k>=55296&&k<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=P[P.length-2],this.lastChar[1]=P[P.length-1],B.slice(0,-1)}return B}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=P[P.length-1],P.toString("utf16le",Q,P.length-1)}function S(P){var Q=P&&P.length?this.write(P):"";if(this.lastNeed){var B=this.lastTotal-this.lastNeed;return Q+this.lastChar.toString("utf16le",0,B)}return Q}function C(P,Q){var B=(P.length-Q)%3;return B===0?P.toString("base64",Q):(this.lastNeed=3-B,this.lastTotal=3,B===1?this.lastChar[0]=P[P.length-1]:(this.lastChar[0]=P[P.length-2],this.lastChar[1]=P[P.length-1]),P.toString("base64",Q,P.length-B))}function E(P){var Q=P&&P.length?this.write(P):"";return this.lastNeed?Q+this.lastChar.toString("base64",0,3-this.lastNeed):Q}function j(P){return P.toString(this.encoding)}function Z(P){return P&&P.length?this.write(P):""}},{"safe-buffer":396}],414:[function(o,M,R){(function(p,f){(function(){var h=o("process/browser.js").nextTick,y=Function.prototype.apply,g=Array.prototype.slice,w={},c=0;R.setTimeout=function(){return new m(y.call(setTimeout,window,arguments),clearTimeout)},R.setInterval=function(){return new m(y.call(setInterval,window,arguments),clearInterval)},R.clearTimeout=R.clearInterval=function(v){v.close()};function m(v,b){this._id=v,this._clearFn=b}m.prototype.unref=m.prototype.ref=function(){},m.prototype.close=function(){this._clearFn.call(window,this._id)},R.enroll=function(v,b){clearTimeout(v._idleTimeoutId),v._idleTimeout=b},R.unenroll=function(v){clearTimeout(v._idleTimeoutId),v._idleTimeout=-1},R._unrefActive=R.active=function(v){clearTimeout(v._idleTimeoutId);var b=v._idleTimeout;b>=0&&(v._idleTimeoutId=setTimeout(function(){v._onTimeout&&v._onTimeout()},b))},R.setImmediate=typeof p=="function"?p:function(v){var b=c++,x=arguments.length<2?!1:g.call(arguments,1);return w[b]=!0,h(function(){w[b]&&(x?v.apply(null,x):v.call(null),R.clearImmediate(b))}),b},R.clearImmediate=typeof f=="function"?f:function(v){delete w[v]}}).call(this)}).call(this,o("timers").setImmediate,o("timers").clearImmediate)},{"process/browser.js":381,timers:414}],415:[function(o,M,R){var p=o("buffer").Buffer;M.exports=function(f){if(f instanceof Uint8Array){if(f.byteOffset===0&&f.byteLength===f.buffer.byteLength)return f.buffer;if(typeof f.buffer.slice=="function")return f.buffer.slice(f.byteOffset,f.byteOffset+f.byteLength)}if(p.isBuffer(f)){for(var h=new Uint8Array(f.length),y=f.length,g=0;g<y;g++)h[g]=f[g];return h.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:90}],416:[function(o,M,R){(function(p){(function(){M.exports=f;function f(y,g){if(h("noDeprecation"))return y;var w=!1;function c(){if(!w){if(h("throwDeprecation"))throw new Error(g);h("traceDeprecation")?console.trace(g):console.warn(g),w=!0}return y.apply(this,arguments)}return c}function h(y){try{if(!p.localStorage)return!1}catch(w){return!1}var g=p.localStorage[y];return g==null?!1:String(g).toLowerCase()==="true"}}).call(this)}).call(this,typeof mt!="undefined"?mt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],417:[function(o,M,R){arguments[4][84][0].apply(R,arguments)},{dup:84}],418:[function(o,M,R){"use strict";var p=o("is-arguments"),f=o("is-generator-function"),h=o("which-typed-array"),y=o("is-typed-array");function g(ue){return ue.call.bind(ue)}var w=typeof BigInt!="undefined",c=typeof Symbol!="undefined",m=g(Object.prototype.toString),v=g(Number.prototype.valueOf),b=g(String.prototype.valueOf),x=g(Boolean.prototype.valueOf);if(w)var T=g(BigInt.prototype.valueOf);if(c)var S=g(Symbol.prototype.valueOf);function C(ue,Ee){if(typeof ue!="object")return!1;try{return Ee(ue),!0}catch(ze){return!1}}R.isArgumentsObject=p,R.isGeneratorFunction=f,R.isTypedArray=y;function E(ue){return typeof Promise!="undefined"&&ue instanceof Promise||ue!==null&&typeof ue=="object"&&typeof ue.then=="function"&&typeof ue.catch=="function"}R.isPromise=E;function j(ue){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(ue):y(ue)||fe(ue)}R.isArrayBufferView=j;function Z(ue){return h(ue)==="Uint8Array"}R.isUint8Array=Z;function P(ue){return h(ue)==="Uint8ClampedArray"}R.isUint8ClampedArray=P;function Q(ue){return h(ue)==="Uint16Array"}R.isUint16Array=Q;function B(ue){return h(ue)==="Uint32Array"}R.isUint32Array=B;function k(ue){return h(ue)==="Int8Array"}R.isInt8Array=k;function D(ue){return h(ue)==="Int16Array"}R.isInt16Array=D;function F(ue){return h(ue)==="Int32Array"}R.isInt32Array=F;function J(ue){return h(ue)==="Float32Array"}R.isFloat32Array=J;function H(ue){return h(ue)==="Float64Array"}R.isFloat64Array=H;function N(ue){return h(ue)==="BigInt64Array"}R.isBigInt64Array=N;function _(ue){return h(ue)==="BigUint64Array"}R.isBigUint64Array=_;function X(ue){return m(ue)==="[object Map]"}X.working=typeof Map!="undefined"&&X(new Map);function ee(ue){return typeof Map=="undefined"?!1:X.working?X(ue):ue instanceof Map}R.isMap=ee;function ie(ue){return m(ue)==="[object Set]"}ie.working=typeof Set!="undefined"&&ie(new Set);function he(ue){return typeof Set=="undefined"?!1:ie.working?ie(ue):ue instanceof Set}R.isSet=he;function ne(ue){return m(ue)==="[object WeakMap]"}ne.working=typeof WeakMap!="undefined"&&ne(new WeakMap);function Ie(ue){return typeof WeakMap=="undefined"?!1:ne.working?ne(ue):ue instanceof WeakMap}R.isWeakMap=Ie;function q(ue){return m(ue)==="[object WeakSet]"}q.working=typeof WeakSet!="undefined"&&q(new WeakSet);function pe(ue){return q(ue)}R.isWeakSet=pe;function ve(ue){return m(ue)==="[object ArrayBuffer]"}ve.working=typeof ArrayBuffer!="undefined"&&ve(new ArrayBuffer);function xe(ue){return typeof ArrayBuffer=="undefined"?!1:ve.working?ve(ue):ue instanceof ArrayBuffer}R.isArrayBuffer=xe;function ce(ue){return m(ue)==="[object DataView]"}ce.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&ce(new DataView(new ArrayBuffer(1),0,1));function fe(ue){return typeof DataView=="undefined"?!1:ce.working?ce(ue):ue instanceof DataView}R.isDataView=fe;var ge=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function Se(ue){return m(ue)==="[object SharedArrayBuffer]"}function De(ue){return typeof ge=="undefined"?!1:(typeof Se.working=="undefined"&&(Se.working=Se(new ge)),Se.working?Se(ue):ue instanceof ge)}R.isSharedArrayBuffer=De;function ke(ue){return m(ue)==="[object AsyncFunction]"}R.isAsyncFunction=ke;function de(ue){return m(ue)==="[object Map Iterator]"}R.isMapIterator=de;function Y(ue){return m(ue)==="[object Set Iterator]"}R.isSetIterator=Y;function ye(ue){return m(ue)==="[object Generator]"}R.isGeneratorObject=ye;function V(ue){return m(ue)==="[object WebAssembly.Module]"}R.isWebAssemblyCompiledModule=V;function G(ue){return C(ue,v)}R.isNumberObject=G;function W(ue){return C(ue,b)}R.isStringObject=W;function K(ue){return C(ue,x)}R.isBooleanObject=K;function te(ue){return w&&C(ue,T)}R.isBigIntObject=te;function U(ue){return c&&C(ue,S)}R.isSymbolObject=U;function L(ue){return G(ue)||W(ue)||K(ue)||te(ue)||U(ue)}R.isBoxedPrimitive=L;function $(ue){return typeof Uint8Array!="undefined"&&(xe(ue)||De(ue))}R.isAnyArrayBuffer=$,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(ue){Object.defineProperty(R,ue,{enumerable:!1,value:function(){throw new Error(ue+" is not supported in userland")}})})},{"is-arguments":365,"is-generator-function":368,"is-typed-array":369,"which-typed-array":420}],419:[function(o,M,R){(function(p){(function(){var f=Object.getOwnPropertyDescriptors||function(ge){for(var Se=Object.keys(ge),De={},ke=0;ke<Se.length;ke++)De[Se[ke]]=Object.getOwnPropertyDescriptor(ge,Se[ke]);return De},h=/%[sdj%]/g;R.format=function(fe){if(!D(fe)){for(var ge=[],Se=0;Se<arguments.length;Se++)ge.push(c(arguments[Se]));return ge.join(" ")}for(var Se=1,De=arguments,ke=De.length,de=String(fe).replace(h,function(ye){if(ye==="%%")return"%";if(Se>=ke)return ye;switch(ye){case"%s":return String(De[Se++]);case"%d":return Number(De[Se++]);case"%j":try{return JSON.stringify(De[Se++])}catch(V){return"[Circular]"}default:return ye}}),Y=De[Se];Se<ke;Y=De[++Se])Q(Y)||!N(Y)?de+=" "+Y:de+=" "+c(Y);return de},R.deprecate=function(fe,ge){if(typeof p!="undefined"&&p.noDeprecation===!0)return fe;if(typeof p=="undefined")return function(){return R.deprecate(fe,ge).apply(this,arguments)};var Se=!1;function De(){if(!Se){if(p.throwDeprecation)throw new Error(ge);p.traceDeprecation?console.trace(ge):console.error(ge),Se=!0}return fe.apply(this,arguments)}return De};var y={},g=/^$/;if(p.env.NODE_DEBUG){var w=p.env.NODE_DEBUG;w=w.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),g=new RegExp("^"+w+"$","i")}R.debuglog=function(fe){if(fe=fe.toUpperCase(),!y[fe])if(g.test(fe)){var ge=p.pid;y[fe]=function(){var Se=R.format.apply(R,arguments);console.error("%s %d: %s",fe,ge,Se)}}else y[fe]=function(){};return y[fe]};function c(fe,ge){var Se={seen:[],stylize:v};return arguments.length>=3&&(Se.depth=arguments[2]),arguments.length>=4&&(Se.colors=arguments[3]),P(ge)?Se.showHidden=ge:ge&&R._extend(Se,ge),J(Se.showHidden)&&(Se.showHidden=!1),J(Se.depth)&&(Se.depth=2),J(Se.colors)&&(Se.colors=!1),J(Se.customInspect)&&(Se.customInspect=!0),Se.colors&&(Se.stylize=m),x(Se,fe,Se.depth)}R.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function m(fe,ge){var Se=c.styles[ge];return Se?"\x1B["+c.colors[Se][0]+"m"+fe+"\x1B["+c.colors[Se][1]+"m":fe}function v(fe,ge){return fe}function b(fe){var ge={};return fe.forEach(function(Se,De){ge[Se]=!0}),ge}function x(fe,ge,Se){if(fe.customInspect&&ge&&ee(ge.inspect)&&ge.inspect!==R.inspect&&!(ge.constructor&&ge.constructor.prototype===ge)){var De=ge.inspect(Se,fe);return D(De)||(De=x(fe,De,Se)),De}var ke=T(fe,ge);if(ke)return ke;var de=Object.keys(ge),Y=b(de);if(fe.showHidden&&(de=Object.getOwnPropertyNames(ge)),X(ge)&&(de.indexOf("message")>=0||de.indexOf("description")>=0))return S(ge);if(de.length===0){if(ee(ge)){var ye=ge.name?": "+ge.name:"";return fe.stylize("[Function"+ye+"]","special")}if(H(ge))return fe.stylize(RegExp.prototype.toString.call(ge),"regexp");if(_(ge))return fe.stylize(Date.prototype.toString.call(ge),"date");if(X(ge))return S(ge)}var V="",G=!1,W=["{","}"];if(Z(ge)&&(G=!0,W=["[","]"]),ee(ge)){var K=ge.name?": "+ge.name:"";V=" [Function"+K+"]"}if(H(ge)&&(V=" "+RegExp.prototype.toString.call(ge)),_(ge)&&(V=" "+Date.prototype.toUTCString.call(ge)),X(ge)&&(V=" "+S(ge)),de.length===0&&(!G||ge.length==0))return W[0]+V+W[1];if(Se<0)return H(ge)?fe.stylize(RegExp.prototype.toString.call(ge),"regexp"):fe.stylize("[Object]","special");fe.seen.push(ge);var te;return G?te=C(fe,ge,Se,Y,de):te=de.map(function(U){return E(fe,ge,Se,Y,U,G)}),fe.seen.pop(),j(te,V,W)}function T(fe,ge){if(J(ge))return fe.stylize("undefined","undefined");if(D(ge)){var Se="'"+JSON.stringify(ge).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return fe.stylize(Se,"string")}if(k(ge))return fe.stylize(""+ge,"number");if(P(ge))return fe.stylize(""+ge,"boolean");if(Q(ge))return fe.stylize("null","null")}function S(fe){return"["+Error.prototype.toString.call(fe)+"]"}function C(fe,ge,Se,De,ke){for(var de=[],Y=0,ye=ge.length;Y<ye;++Y)pe(ge,String(Y))?de.push(E(fe,ge,Se,De,String(Y),!0)):de.push("");return ke.forEach(function(V){V.match(/^\d+$/)||de.push(E(fe,ge,Se,De,V,!0))}),de}function E(fe,ge,Se,De,ke,de){var Y,ye,V;if(V=Object.getOwnPropertyDescriptor(ge,ke)||{value:ge[ke]},V.get?V.set?ye=fe.stylize("[Getter/Setter]","special"):ye=fe.stylize("[Getter]","special"):V.set&&(ye=fe.stylize("[Setter]","special")),pe(De,ke)||(Y="["+ke+"]"),ye||(fe.seen.indexOf(V.value)<0?(Q(Se)?ye=x(fe,V.value,null):ye=x(fe,V.value,Se-1),ye.indexOf(`
`)>-1&&(de?ye=ye.split(`
`).map(function(G){return" "+G}).join(`
`).slice(2):ye=`
`+ye.split(`
`).map(function(G){return" "+G}).join(`
`))):ye=fe.stylize("[Circular]","special")),J(Y)){if(de&&ke.match(/^\d+$/))return ye;Y=JSON.stringify(""+ke),Y.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Y=Y.slice(1,-1),Y=fe.stylize(Y,"name")):(Y=Y.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Y=fe.stylize(Y,"string"))}return Y+": "+ye}function j(fe,ge,Se){var De=0,ke=fe.reduce(function(de,Y){return De++,Y.indexOf(`
`)>=0&&De++,de+Y.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ke>60?Se[0]+(ge===""?"":ge+`
`)+" "+fe.join(`,
`)+" "+Se[1]:Se[0]+ge+" "+fe.join(", ")+" "+Se[1]}R.types=o("./support/types");function Z(fe){return Array.isArray(fe)}R.isArray=Z;function P(fe){return typeof fe=="boolean"}R.isBoolean=P;function Q(fe){return fe===null}R.isNull=Q;function B(fe){return fe==null}R.isNullOrUndefined=B;function k(fe){return typeof fe=="number"}R.isNumber=k;function D(fe){return typeof fe=="string"}R.isString=D;function F(fe){return typeof fe=="symbol"}R.isSymbol=F;function J(fe){return fe===void 0}R.isUndefined=J;function H(fe){return N(fe)&&he(fe)==="[object RegExp]"}R.isRegExp=H,R.types.isRegExp=H;function N(fe){return typeof fe=="object"&&fe!==null}R.isObject=N;function _(fe){return N(fe)&&he(fe)==="[object Date]"}R.isDate=_,R.types.isDate=_;function X(fe){return N(fe)&&(he(fe)==="[object Error]"||fe instanceof Error)}R.isError=X,R.types.isNativeError=X;function ee(fe){return typeof fe=="function"}R.isFunction=ee;function ie(fe){return fe===null||typeof fe=="boolean"||typeof fe=="number"||typeof fe=="string"||typeof fe=="symbol"||typeof fe=="undefined"}R.isPrimitive=ie,R.isBuffer=o("./support/isBuffer");function he(fe){return Object.prototype.toString.call(fe)}function ne(fe){return fe<10?"0"+fe.toString(10):fe.toString(10)}var Ie=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function q(){var fe=new Date,ge=[ne(fe.getHours()),ne(fe.getMinutes()),ne(fe.getSeconds())].join(":");return[fe.getDate(),Ie[fe.getMonth()],ge].join(" ")}R.log=function(){console.log("%s - %s",q(),R.format.apply(R,arguments))},R.inherits=o("inherits"),R._extend=function(fe,ge){if(!ge||!N(ge))return fe;for(var Se=Object.keys(ge),De=Se.length;De--;)fe[Se[De]]=ge[Se[De]];return fe};function pe(fe,ge){return Object.prototype.hasOwnProperty.call(fe,ge)}var ve=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;R.promisify=function(ge){if(typeof ge!="function")throw new TypeError('The "original" argument must be of type Function');if(ve&&ge[ve]){var Se=ge[ve];if(typeof Se!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Se,ve,{value:Se,enumerable:!1,writable:!1,configurable:!0}),Se}function Se(){for(var De,ke,de=new Promise(function(V,G){De=V,ke=G}),Y=[],ye=0;ye<arguments.length;ye++)Y.push(arguments[ye]);Y.push(function(V,G){V?ke(V):De(G)});try{ge.apply(this,Y)}catch(V){ke(V)}return de}return Object.setPrototypeOf(Se,Object.getPrototypeOf(ge)),ve&&Object.defineProperty(Se,ve,{value:Se,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(Se,f(ge))},R.promisify.custom=ve;function xe(fe,ge){if(!fe){var Se=new Error("Promise was rejected with a falsy value");Se.reason=fe,fe=Se}return ge(fe)}function ce(fe){if(typeof fe!="function")throw new TypeError('The "original" argument must be of type Function');function ge(){for(var Se=[],De=0;De<arguments.length;De++)Se.push(arguments[De]);var ke=Se.pop();if(typeof ke!="function")throw new TypeError("The last argument must be of type Function");var de=this,Y=function(){return ke.apply(de,arguments)};fe.apply(this,Se).then(function(ye){p.nextTick(Y.bind(null,null,ye))},function(ye){p.nextTick(xe.bind(null,ye,Y))})}return Object.setPrototypeOf(ge,Object.getPrototypeOf(fe)),Object.defineProperties(ge,f(fe)),ge}R.callbackify=ce}).call(this)}).call(this,o("_process"))},{"./support/isBuffer":417,"./support/types":418,_process:467,inherits:364}],420:[function(o,M,R){(function(p){(function(){"use strict";var f=o("for-each"),h=o("available-typed-arrays"),y=o("call-bind"),g=o("call-bind/callBound"),w=o("gopd"),c=g("Object.prototype.toString"),m=o("has-tostringtag/shams")(),v=typeof globalThis=="undefined"?p:globalThis,b=h(),x=g("String.prototype.slice"),T=Object.getPrototypeOf,S=g("Array.prototype.indexOf",!0)||function(P,Q){for(var B=0;B<P.length;B+=1)if(P[B]===Q)return B;return-1},C={__proto__:null};m&&w&&T?f(b,function(Z){var P=new v[Z];if(Symbol.toStringTag in P){var Q=T(P),B=w(Q,Symbol.toStringTag);if(!B){var k=T(Q);B=w(k,Symbol.toStringTag)}C["$"+Z]=y(B.get)}}):f(b,function(Z){var P=new v[Z];C["$"+Z]=y(P.slice)});var E=function(P){var Q=!1;return f(C,function(B,k){if(!Q)try{"$"+B(P)===k&&(Q=x(k,1))}catch(D){}}),Q},j=function(P){var Q=!1;return f(C,function(B,k){if(!Q)try{B(P),Q=x(k,1)}catch(D){}}),Q};M.exports=function(P){if(!P||typeof P!="object")return!1;if(!m){var Q=x(c(P),8,-1);return S(b,Q)>-1?Q:Q!=="Object"?!1:j(P)}return w?E(P):null}}).call(this)}).call(this,typeof mt!="undefined"?mt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"available-typed-arrays":86,"call-bind":93,"call-bind/callBound":92,"for-each":345,gopd:349,"has-tostringtag/shams":353}],421:[function(o,M,R){(function(){"use strict";R.stripBOM=function(p){return p[0]==="\uFEFF"?p.substring(1):p}}).call(this)},{}],422:[function(o,M,R){(function(){"use strict";var p,f,h,y,g,w={}.hasOwnProperty;p=o("xmlbuilder"),f=o("./defaults").defaults,y=function(c){return typeof c=="string"&&(c.indexOf("&")>=0||c.indexOf(">")>=0||c.indexOf("<")>=0)},g=function(c){return"<![CDATA["+h(c)+"]]>"},h=function(c){return c.replace("]]>","]]]]><![CDATA[>")},R.Builder=function(){function c(m){var v,b,x;this.options={},b=f["0.2"];for(v in b)w.call(b,v)&&(x=b[v],this.options[v]=x);for(v in m)w.call(m,v)&&(x=m[v],this.options[v]=x)}return c.prototype.buildObject=function(m){var v,b,x,T,S;return v=this.options.attrkey,b=this.options.charkey,Object.keys(m).length===1&&this.options.rootName===f["0.2"].rootName?(S=Object.keys(m)[0],m=m[S]):S=this.options.rootName,x=function(C){return function(E,j){var Z,P,Q,B,k,D;if(typeof j!="object")C.options.cdata&&y(j)?E.raw(g(j)):E.txt(j);else if(Array.isArray(j)){for(B in j)if(w.call(j,B)){P=j[B];for(k in P)Q=P[k],E=x(E.ele(k),Q).up()}}else for(k in j)if(w.call(j,k))if(P=j[k],k===v){if(typeof P=="object")for(Z in P)D=P[Z],E=E.att(Z,D)}else if(k===b)C.options.cdata&&y(P)?E=E.raw(g(P)):E=E.txt(P);else if(Array.isArray(P))for(B in P)w.call(P,B)&&(Q=P[B],typeof Q=="string"?C.options.cdata&&y(Q)?E=E.ele(k).raw(g(Q)).up():E=E.ele(k,Q).up():E=x(E.ele(k),Q).up());else typeof P=="object"?E=x(E.ele(k),P).up():typeof P=="string"&&C.options.cdata&&y(P)?E=E.ele(k).raw(g(P)).up():(P==null&&(P=""),E=E.ele(k,P.toString()).up());return E}}(this),T=p.create(S,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),x(T,m).end(this.options.renderOpts)},c}()}).call(this)},{"./defaults":423,xmlbuilder:459}],423:[function(o,M,R){(function(){R.defaults={"0.1":{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},"0.2":{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:`
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(this)},{}],424:[function(o,M,R){(function(){"use strict";var p,f,h,y,g,w,c,m,v,b=function(S,C){return function(){return S.apply(C,arguments)}},x=function(S,C){for(var E in C)T.call(C,E)&&(S[E]=C[E]);function j(){this.constructor=S}return j.prototype=C.prototype,S.prototype=new j,S.__super__=C.prototype,S},T={}.hasOwnProperty;m=o("sax"),y=o("events"),p=o("./bom"),c=o("./processors"),v=o("timers").setImmediate,f=o("./defaults").defaults,g=function(S){return typeof S=="object"&&S!=null&&Object.keys(S).length===0},w=function(S,C,E){var j,Z,P;for(j=0,Z=S.length;j<Z;j++)P=S[j],C=P(C,E);return C},h=function(S,C,E){var j;return j=Object.create(null),j.value=E,j.writable=!0,j.enumerable=!0,j.configurable=!0,Object.defineProperty(S,C,j)},R.Parser=function(S){x(C,S);function C(E){this.parseStringPromise=b(this.parseStringPromise,this),this.parseString=b(this.parseString,this),this.reset=b(this.reset,this),this.assignOrPush=b(this.assignOrPush,this),this.processAsync=b(this.processAsync,this);var j,Z,P;if(!(this instanceof R.Parser))return new R.Parser(E);this.options={},Z=f["0.2"];for(j in Z)T.call(Z,j)&&(P=Z[j],this.options[j]=P);for(j in E)T.call(E,j)&&(P=E[j],this.options[j]=P);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(c.normalize)),this.reset()}return C.prototype.processAsync=function(){var E,j;try{return this.remaining.length<=this.options.chunkSize?(E=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(E),this.saxParser.close()):(E=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(E),v(this.processAsync))}catch(Z){if(j=Z,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(j)}},C.prototype.assignOrPush=function(E,j,Z){return j in E?(E[j]instanceof Array||h(E,j,[E[j]]),E[j].push(Z)):this.options.explicitArray?h(E,j,[Z]):h(E,j,Z)},C.prototype.reset=function(){var E,j,Z,P;return this.removeAllListeners(),this.saxParser=m.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(Q){return function(B){if(Q.saxParser.resume(),!Q.saxParser.errThrown)return Q.saxParser.errThrown=!0,Q.emit("error",B)}}(this),this.saxParser.onend=function(Q){return function(){if(!Q.saxParser.ended)return Q.saxParser.ended=!0,Q.emit("end",Q.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,P=[],E=this.options.attrkey,j=this.options.charkey,this.saxParser.onopentag=function(Q){return function(B){var k,D,F,J,H;if(F={},F[j]="",!Q.options.ignoreAttrs){H=B.attributes;for(k in H)T.call(H,k)&&(!(E in F)&&!Q.options.mergeAttrs&&(F[E]={}),D=Q.options.attrValueProcessors?w(Q.options.attrValueProcessors,B.attributes[k],k):B.attributes[k],J=Q.options.attrNameProcessors?w(Q.options.attrNameProcessors,k):k,Q.options.mergeAttrs?Q.assignOrPush(F,J,D):h(F[E],J,D))}return F["#name"]=Q.options.tagNameProcessors?w(Q.options.tagNameProcessors,B.name):B.name,Q.options.xmlns&&(F[Q.options.xmlnskey]={uri:B.uri,local:B.local}),P.push(F)}}(this),this.saxParser.onclosetag=function(Q){return function(){var B,k,D,F,J,H,N,_,X,ee;if(H=P.pop(),J=H["#name"],(!Q.options.explicitChildren||!Q.options.preserveChildrenOrder)&&delete H["#name"],H.cdata===!0&&(B=H.cdata,delete H.cdata),X=P[P.length-1],H[j].match(/^\s*$/)&&!B?(k=H[j],delete H[j]):(Q.options.trim&&(H[j]=H[j].trim()),Q.options.normalize&&(H[j]=H[j].replace(/\s{2,}/g," ").trim()),H[j]=Q.options.valueProcessors?w(Q.options.valueProcessors,H[j],J):H[j],Object.keys(H).length===1&&j in H&&!Q.EXPLICIT_CHARKEY&&(H=H[j])),g(H)&&(typeof Q.options.emptyTag=="function"?H=Q.options.emptyTag():H=Q.options.emptyTag!==""?Q.options.emptyTag:k),Q.options.validator!=null&&(ee="/"+function(){var ie,he,ne;for(ne=[],ie=0,he=P.length;ie<he;ie++)F=P[ie],ne.push(F["#name"]);return ne}().concat(J).join("/"),function(){var ie;try{return H=Q.options.validator(ee,X&&X[J],H)}catch(he){return ie=he,Q.emit("error",ie)}}()),Q.options.explicitChildren&&!Q.options.mergeAttrs&&typeof H=="object"){if(!Q.options.preserveChildrenOrder)F={},Q.options.attrkey in H&&(F[Q.options.attrkey]=H[Q.options.attrkey],delete H[Q.options.attrkey]),!Q.options.charsAsChildren&&Q.options.charkey in H&&(F[Q.options.charkey]=H[Q.options.charkey],delete H[Q.options.charkey]),Object.getOwnPropertyNames(H).length>0&&(F[Q.options.childkey]=H),H=F;else if(X){X[Q.options.childkey]=X[Q.options.childkey]||[],N={};for(D in H)T.call(H,D)&&h(N,D,H[D]);X[Q.options.childkey].push(N),delete H["#name"],Object.keys(H).length===1&&j in H&&!Q.EXPLICIT_CHARKEY&&(H=H[j])}}return P.length>0?Q.assignOrPush(X,J,H):(Q.options.explicitRoot&&(_=H,H={},h(H,J,_)),Q.resultObject=H,Q.saxParser.ended=!0,Q.emit("end",Q.resultObject))}}(this),Z=function(Q){return function(B){var k,D;if(D=P[P.length-1],D)return D[j]+=B,Q.options.explicitChildren&&Q.options.preserveChildrenOrder&&Q.options.charsAsChildren&&(Q.options.includeWhiteChars||B.replace(/\\n/g,"").trim()!=="")&&(D[Q.options.childkey]=D[Q.options.childkey]||[],k={"#name":"__text__"},k[j]=B,Q.options.normalize&&(k[j]=k[j].replace(/\s{2,}/g," ").trim()),D[Q.options.childkey].push(k)),D}}(this),this.saxParser.ontext=Z,this.saxParser.oncdata=function(Q){return function(B){var k;if(k=Z(B),k)return k.cdata=!0}}(this)},C.prototype.parseString=function(E,j){var Z;j!=null&&typeof j=="function"&&(this.on("end",function(P){return this.reset(),j(null,P)}),this.on("error",function(P){return this.reset(),j(P)}));try{return E=E.toString(),E.trim()===""?(this.emit("end",null),!0):(E=p.stripBOM(E),this.options.async?(this.remaining=E,v(this.processAsync),this.saxParser):this.saxParser.write(E).close())}catch(P){if(Z=P,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw Z}else return this.emit("error",Z),this.saxParser.errThrown=!0}},C.prototype.parseStringPromise=function(E){return new Promise(function(j){return function(Z,P){return j.parseString(E,function(Q,B){return Q?P(Q):Z(B)})}}(this))},C}(y),R.parseString=function(S,C,E){var j,Z,P;return E!=null?(typeof E=="function"&&(j=E),typeof C=="object"&&(Z=C)):(typeof C=="function"&&(j=C),Z={}),P=new R.Parser(Z),P.parseString(S,j)},R.parseStringPromise=function(S,C){var E,j;return typeof C=="object"&&(E=C),j=new R.Parser(E),j.parseStringPromise(S)}}).call(this)},{"./bom":421,"./defaults":423,"./processors":425,events:344,sax:397,timers:414}],425:[function(o,M,R){(function(){"use strict";var p;p=new RegExp(/(?!xmlns)^.*:/),R.normalize=function(f){return f.toLowerCase()},R.firstCharLowerCase=function(f){return f.charAt(0).toLowerCase()+f.slice(1)},R.stripPrefix=function(f){return f.replace(p,"")},R.parseNumbers=function(f){return isNaN(f)||(f=f%1===0?parseInt(f,10):parseFloat(f)),f},R.parseBooleans=function(f){return/^(?:true|false)$/i.test(f)&&(f=f.toLowerCase()==="true"),f}}).call(this)},{}],426:[function(o,M,R){(function(){"use strict";var p,f,h,y,g=function(c,m){for(var v in m)w.call(m,v)&&(c[v]=m[v]);function b(){this.constructor=c}return b.prototype=m.prototype,c.prototype=new b,c.__super__=m.prototype,c},w={}.hasOwnProperty;f=o("./defaults"),p=o("./builder"),h=o("./parser"),y=o("./processors"),R.defaults=f.defaults,R.processors=y,R.ValidationError=function(c){g(m,c);function m(v){this.message=v}return m}(Error),R.Builder=p.Builder,R.Parser=h.Parser,R.parseString=h.parseString,R.parseStringPromise=h.parseStringPromise}).call(this)},{"./builder":422,"./defaults":423,"./parser":424,"./processors":425}],427:[function(o,M,R){(function(){M.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(this)},{}],428:[function(o,M,R){(function(){M.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(this)},{}],429:[function(o,M,R){(function(){var p,f,h,y,g,w,c,m=[].slice,v={}.hasOwnProperty;p=function(){var b,x,T,S,C,E;if(E=arguments[0],C=2<=arguments.length?m.call(arguments,1):[],g(Object.assign))Object.assign.apply(null,arguments);else for(b=0,T=C.length;b<T;b++)if(S=C[b],S!=null)for(x in S)v.call(S,x)&&(E[x]=S[x]);return E},g=function(b){return!!b&&Object.prototype.toString.call(b)==="[object Function]"},w=function(b){var x;return!!b&&((x=typeof b)=="function"||x==="object")},h=function(b){return g(Array.isArray)?Array.isArray(b):Object.prototype.toString.call(b)==="[object Array]"},y=function(b){var x;if(h(b))return!b.length;for(x in b)if(v.call(b,x))return!1;return!0},c=function(b){var x,T;return w(b)&&(T=Object.getPrototypeOf(b))&&(x=T.constructor)&&typeof x=="function"&&x instanceof x&&Function.prototype.toString.call(x)===Function.prototype.toString.call(Object)},f=function(b){return g(b.valueOf)?b.valueOf():b},M.exports.assign=p,M.exports.isFunction=g,M.exports.isObject=w,M.exports.isArray=h,M.exports.isEmpty=y,M.exports.isPlainObject=c,M.exports.getValue=f}).call(this)},{}],430:[function(o,M,R){(function(){M.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(this)},{}],431:[function(o,M,R){(function(){var p,f,h;p=o("./NodeType"),h=o("./XMLNode"),M.exports=f=function(){function y(g,w,c){if(this.parent=g,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),w==null)throw new Error("Missing attribute name. "+this.debugInfo(w));this.name=this.stringify.name(w),this.value=this.stringify.attValue(c),this.type=p.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(y.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(y.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(y.prototype,"textContent",{get:function(){return this.value},set:function(g){return this.value=g||""}}),Object.defineProperty(y.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(y.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(y.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(y.prototype,"specified",{get:function(){return!0}}),y.prototype.clone=function(){return Object.create(this)},y.prototype.toString=function(g){return this.options.writer.attribute(this,this.options.writer.filterOptions(g))},y.prototype.debugInfo=function(g){return g=g||this.name,g==null?"parent: <"+this.parent.name+">":"attribute: {"+g+"}, parent: <"+this.parent.name+">"},y.prototype.isEqualNode=function(g){return!(g.namespaceURI!==this.namespaceURI||g.prefix!==this.prefix||g.localName!==this.localName||g.value!==this.value)},y}()}).call(this)},{"./NodeType":428,"./XMLNode":450}],432:[function(o,M,R){(function(){var p,f,h,y=function(w,c){for(var m in c)g.call(c,m)&&(w[m]=c[m]);function v(){this.constructor=w}return v.prototype=c.prototype,w.prototype=new v,w.__super__=c.prototype,w},g={}.hasOwnProperty;p=o("./NodeType"),h=o("./XMLCharacterData"),M.exports=f=function(w){y(c,w);function c(m,v){if(c.__super__.constructor.call(this,m),v==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=p.CData,this.value=this.stringify.cdata(v)}return c.prototype.clone=function(){return Object.create(this)},c.prototype.toString=function(m){return this.options.writer.cdata(this,this.options.writer.filterOptions(m))},c}(h)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],433:[function(o,M,R){(function(){var p,f,h=function(g,w){for(var c in w)y.call(w,c)&&(g[c]=w[c]);function m(){this.constructor=g}return m.prototype=w.prototype,g.prototype=new m,g.__super__=w.prototype,g},y={}.hasOwnProperty;f=o("./XMLNode"),M.exports=p=function(g){h(w,g);function w(c){w.__super__.constructor.call(this,c),this.value=""}return Object.defineProperty(w.prototype,"data",{get:function(){return this.value},set:function(c){return this.value=c||""}}),Object.defineProperty(w.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(w.prototype,"textContent",{get:function(){return this.value},set:function(c){return this.value=c||""}}),w.prototype.clone=function(){return Object.create(this)},w.prototype.substringData=function(c,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.appendData=function(c){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.insertData=function(c,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.deleteData=function(c,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.replaceData=function(c,m,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.isEqualNode=function(c){return!(!w.__super__.isEqualNode.apply(this,arguments).isEqualNode(c)||c.data!==this.data)},w}(f)}).call(this)},{"./XMLNode":450}],434:[function(o,M,R){(function(){var p,f,h,y=function(w,c){for(var m in c)g.call(c,m)&&(w[m]=c[m]);function v(){this.constructor=w}return v.prototype=c.prototype,w.prototype=new v,w.__super__=c.prototype,w},g={}.hasOwnProperty;p=o("./NodeType"),f=o("./XMLCharacterData"),M.exports=h=function(w){y(c,w);function c(m,v){if(c.__super__.constructor.call(this,m),v==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=p.Comment,this.value=this.stringify.comment(v)}return c.prototype.clone=function(){return Object.create(this)},c.prototype.toString=function(m){return this.options.writer.comment(this,this.options.writer.filterOptions(m))},c}(f)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],435:[function(o,M,R){(function(){var p,f,h;f=o("./XMLDOMErrorHandler"),h=o("./XMLDOMStringList"),M.exports=p=function(){function y(){var g;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new f,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=g=Object.create(this.defaultParams)}return Object.defineProperty(y.prototype,"parameterNames",{get:function(){return new h(Object.keys(this.defaultParams))}}),y.prototype.getParameter=function(g){return this.params.hasOwnProperty(g)?this.params[g]:null},y.prototype.canSetParameter=function(g,w){return!0},y.prototype.setParameter=function(g,w){return w!=null?this.params[g]=w:delete this.params[g]},y}()}).call(this)},{"./XMLDOMErrorHandler":436,"./XMLDOMStringList":438}],436:[function(o,M,R){(function(){var p;M.exports=p=function(){function f(){}return f.prototype.handleError=function(h){throw new Error(h)},f}()}).call(this)},{}],437:[function(o,M,R){(function(){var p;M.exports=p=function(){function f(){}return f.prototype.hasFeature=function(h,y){return!0},f.prototype.createDocumentType=function(h,y,g){throw new Error("This DOM method is not implemented.")},f.prototype.createDocument=function(h,y,g){throw new Error("This DOM method is not implemented.")},f.prototype.createHTMLDocument=function(h){throw new Error("This DOM method is not implemented.")},f.prototype.getFeature=function(h,y){throw new Error("This DOM method is not implemented.")},f}()}).call(this)},{}],438:[function(o,M,R){(function(){var p;M.exports=p=function(){function f(h){this.arr=h||[]}return Object.defineProperty(f.prototype,"length",{get:function(){return this.arr.length}}),f.prototype.item=function(h){return this.arr[h]||null},f.prototype.contains=function(h){return this.arr.indexOf(h)!==-1},f}()}).call(this)},{}],439:[function(o,M,R){(function(){var p,f,h,y=function(w,c){for(var m in c)g.call(c,m)&&(w[m]=c[m]);function v(){this.constructor=w}return v.prototype=c.prototype,w.prototype=new v,w.__super__=c.prototype,w},g={}.hasOwnProperty;h=o("./XMLNode"),p=o("./NodeType"),M.exports=f=function(w){y(c,w);function c(m,v,b,x,T,S){if(c.__super__.constructor.call(this,m),v==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(b==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(v));if(!x)throw new Error("Missing DTD attribute type. "+this.debugInfo(v));if(!T)throw new Error("Missing DTD attribute default. "+this.debugInfo(v));if(T.indexOf("#")!==0&&(T="#"+T),!T.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(v));if(S&&!T.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(v));this.elementName=this.stringify.name(v),this.type=p.AttributeDeclaration,this.attributeName=this.stringify.name(b),this.attributeType=this.stringify.dtdAttType(x),S&&(this.defaultValue=this.stringify.dtdAttDefault(S)),this.defaultValueType=T}return c.prototype.toString=function(m){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(m))},c}(h)}).call(this)},{"./NodeType":428,"./XMLNode":450}],440:[function(o,M,R){(function(){var p,f,h,y=function(w,c){for(var m in c)g.call(c,m)&&(w[m]=c[m]);function v(){this.constructor=w}return v.prototype=c.prototype,w.prototype=new v,w.__super__=c.prototype,w},g={}.hasOwnProperty;h=o("./XMLNode"),p=o("./NodeType"),M.exports=f=function(w){y(c,w);function c(m,v,b){if(c.__super__.constructor.call(this,m),v==null)throw new Error("Missing DTD element name. "+this.debugInfo());b||(b="(#PCDATA)"),Array.isArray(b)&&(b="("+b.join(",")+")"),this.name=this.stringify.name(v),this.type=p.ElementDeclaration,this.value=this.stringify.dtdElementValue(b)}return c.prototype.toString=function(m){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(m))},c}(h)}).call(this)},{"./NodeType":428,"./XMLNode":450}],441:[function(o,M,R){(function(){var p,f,h,y,g=function(c,m){for(var v in m)w.call(m,v)&&(c[v]=m[v]);function b(){this.constructor=c}return b.prototype=m.prototype,c.prototype=new b,c.__super__=m.prototype,c},w={}.hasOwnProperty;y=o("./Utility").isObject,h=o("./XMLNode"),p=o("./NodeType"),M.exports=f=function(c){g(m,c);function m(v,b,x,T){if(m.__super__.constructor.call(this,v),x==null)throw new Error("Missing DTD entity name. "+this.debugInfo(x));if(T==null)throw new Error("Missing DTD entity value. "+this.debugInfo(x));if(this.pe=!!b,this.name=this.stringify.name(x),this.type=p.EntityDeclaration,!y(T))this.value=this.stringify.dtdEntityValue(T),this.internal=!0;else{if(!T.pubID&&!T.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(x));if(T.pubID&&!T.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(x));if(this.internal=!1,T.pubID!=null&&(this.pubID=this.stringify.dtdPubID(T.pubID)),T.sysID!=null&&(this.sysID=this.stringify.dtdSysID(T.sysID)),T.nData!=null&&(this.nData=this.stringify.dtdNData(T.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(x))}}return Object.defineProperty(m.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(m.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(m.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(m.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(m.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(m.prototype,"xmlVersion",{get:function(){return null}}),m.prototype.toString=function(v){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(v))},m}(h)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],442:[function(o,M,R){(function(){var p,f,h,y=function(w,c){for(var m in c)g.call(c,m)&&(w[m]=c[m]);function v(){this.constructor=w}return v.prototype=c.prototype,w.prototype=new v,w.__super__=c.prototype,w},g={}.hasOwnProperty;h=o("./XMLNode"),p=o("./NodeType"),M.exports=f=function(w){y(c,w);function c(m,v,b){if(c.__super__.constructor.call(this,m),v==null)throw new Error("Missing DTD notation name. "+this.debugInfo(v));if(!b.pubID&&!b.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(v));this.name=this.stringify.name(v),this.type=p.NotationDeclaration,b.pubID!=null&&(this.pubID=this.stringify.dtdPubID(b.pubID)),b.sysID!=null&&(this.sysID=this.stringify.dtdSysID(b.sysID))}return Object.defineProperty(c.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(c.prototype,"systemId",{get:function(){return this.sysID}}),c.prototype.toString=function(m){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(m))},c}(h)}).call(this)},{"./NodeType":428,"./XMLNode":450}],443:[function(o,M,R){(function(){var p,f,h,y,g=function(c,m){for(var v in m)w.call(m,v)&&(c[v]=m[v]);function b(){this.constructor=c}return b.prototype=m.prototype,c.prototype=new b,c.__super__=m.prototype,c},w={}.hasOwnProperty;y=o("./Utility").isObject,h=o("./XMLNode"),p=o("./NodeType"),M.exports=f=function(c){g(m,c);function m(v,b,x,T){var S;m.__super__.constructor.call(this,v),y(b)&&(S=b,b=S.version,x=S.encoding,T=S.standalone),b||(b="1.0"),this.type=p.Declaration,this.version=this.stringify.xmlVersion(b),x!=null&&(this.encoding=this.stringify.xmlEncoding(x)),T!=null&&(this.standalone=this.stringify.xmlStandalone(T))}return m.prototype.toString=function(v){return this.options.writer.declaration(this,this.options.writer.filterOptions(v))},m}(h)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],444:[function(o,M,R){(function(){var p,f,h,y,g,w,c,m,v,b=function(T,S){for(var C in S)x.call(S,C)&&(T[C]=S[C]);function E(){this.constructor=T}return E.prototype=S.prototype,T.prototype=new E,T.__super__=S.prototype,T},x={}.hasOwnProperty;v=o("./Utility").isObject,m=o("./XMLNode"),p=o("./NodeType"),f=o("./XMLDTDAttList"),y=o("./XMLDTDEntity"),h=o("./XMLDTDElement"),g=o("./XMLDTDNotation"),c=o("./XMLNamedNodeMap"),M.exports=w=function(T){b(S,T);function S(C,E,j){var Z,P,Q,B,k,D;if(S.__super__.constructor.call(this,C),this.type=p.DocType,C.children){for(B=C.children,P=0,Q=B.length;P<Q;P++)if(Z=B[P],Z.type===p.Element){this.name=Z.name;break}}this.documentObject=C,v(E)&&(k=E,E=k.pubID,j=k.sysID),j==null&&(D=[E,j],j=D[0],E=D[1]),E!=null&&(this.pubID=this.stringify.dtdPubID(E)),j!=null&&(this.sysID=this.stringify.dtdSysID(j))}return Object.defineProperty(S.prototype,"entities",{get:function(){var C,E,j,Z,P;for(Z={},P=this.children,E=0,j=P.length;E<j;E++)C=P[E],C.type===p.EntityDeclaration&&!C.pe&&(Z[C.name]=C);return new c(Z)}}),Object.defineProperty(S.prototype,"notations",{get:function(){var C,E,j,Z,P;for(Z={},P=this.children,E=0,j=P.length;E<j;E++)C=P[E],C.type===p.NotationDeclaration&&(Z[C.name]=C);return new c(Z)}}),Object.defineProperty(S.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(S.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(S.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),S.prototype.element=function(C,E){var j;return j=new h(this,C,E),this.children.push(j),this},S.prototype.attList=function(C,E,j,Z,P){var Q;return Q=new f(this,C,E,j,Z,P),this.children.push(Q),this},S.prototype.entity=function(C,E){var j;return j=new y(this,!1,C,E),this.children.push(j),this},S.prototype.pEntity=function(C,E){var j;return j=new y(this,!0,C,E),this.children.push(j),this},S.prototype.notation=function(C,E){var j;return j=new g(this,C,E),this.children.push(j),this},S.prototype.toString=function(C){return this.options.writer.docType(this,this.options.writer.filterOptions(C))},S.prototype.ele=function(C,E){return this.element(C,E)},S.prototype.att=function(C,E,j,Z,P){return this.attList(C,E,j,Z,P)},S.prototype.ent=function(C,E){return this.entity(C,E)},S.prototype.pent=function(C,E){return this.pEntity(C,E)},S.prototype.not=function(C,E){return this.notation(C,E)},S.prototype.up=function(){return this.root()||this.documentObject},S.prototype.isEqualNode=function(C){return!(!S.__super__.isEqualNode.apply(this,arguments).isEqualNode(C)||C.name!==this.name||C.publicId!==this.publicId||C.systemId!==this.systemId)},S}(m)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLNamedNodeMap":449,"./XMLNode":450}],445:[function(o,M,R){(function(){var p,f,h,y,g,w,c,m,v=function(x,T){for(var S in T)b.call(T,S)&&(x[S]=T[S]);function C(){this.constructor=x}return C.prototype=T.prototype,x.prototype=new C,x.__super__=T.prototype,x},b={}.hasOwnProperty;m=o("./Utility").isPlainObject,h=o("./XMLDOMImplementation"),f=o("./XMLDOMConfiguration"),g=o("./XMLNode"),p=o("./NodeType"),c=o("./XMLStringifier"),w=o("./XMLStringWriter"),M.exports=y=function(x){v(T,x);function T(S){T.__super__.constructor.call(this,null),this.name="#document",this.type=p.Document,this.documentURI=null,this.domConfig=new f,S||(S={}),S.writer||(S.writer=new w),this.options=S,this.stringify=new c(S)}return Object.defineProperty(T.prototype,"implementation",{value:new h}),Object.defineProperty(T.prototype,"doctype",{get:function(){var S,C,E,j;for(j=this.children,C=0,E=j.length;C<E;C++)if(S=j[C],S.type===p.DocType)return S;return null}}),Object.defineProperty(T.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(T.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(T.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(T.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===p.Declaration?this.children[0].encoding:null}}),Object.defineProperty(T.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===p.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(T.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===p.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(T.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(T.prototype,"origin",{get:function(){return null}}),Object.defineProperty(T.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(T.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(T.prototype,"contentType",{get:function(){return null}}),T.prototype.end=function(S){var C;return C={},S?m(S)&&(C=S,S=this.options.writer):S=this.options.writer,S.document(this,S.filterOptions(C))},T.prototype.toString=function(S){return this.options.writer.document(this,this.options.writer.filterOptions(S))},T.prototype.createElement=function(S){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.createTextNode=function(S){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.createComment=function(S){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.createCDATASection=function(S){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.createProcessingInstruction=function(S,C){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.createAttribute=function(S){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.createEntityReference=function(S){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.getElementsByTagName=function(S){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.importNode=function(S,C){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.createElementNS=function(S,C){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.createAttributeNS=function(S,C){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.getElementsByTagNameNS=function(S,C){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.getElementById=function(S){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.adoptNode=function(S){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.renameNode=function(S,C,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.getElementsByClassName=function(S){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.createEvent=function(S){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.createNodeIterator=function(S,C,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.createTreeWalker=function(S,C,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},T}(g)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLDOMConfiguration":435,"./XMLDOMImplementation":437,"./XMLNode":450,"./XMLStringWriter":455,"./XMLStringifier":456}],446:[function(o,M,R){(function(){var p,f,h,y,g,w,c,m,v,b,x,T,S,C,E,j,Z,P,Q,B,k,D,F,J,H={}.hasOwnProperty;J=o("./Utility"),D=J.isObject,k=J.isFunction,F=J.isPlainObject,B=J.getValue,p=o("./NodeType"),T=o("./XMLDocument"),C=o("./XMLElement"),y=o("./XMLCData"),g=o("./XMLComment"),j=o("./XMLRaw"),Q=o("./XMLText"),E=o("./XMLProcessingInstruction"),b=o("./XMLDeclaration"),x=o("./XMLDocType"),w=o("./XMLDTDAttList"),m=o("./XMLDTDEntity"),c=o("./XMLDTDElement"),v=o("./XMLDTDNotation"),h=o("./XMLAttribute"),P=o("./XMLStringifier"),Z=o("./XMLStringWriter"),f=o("./WriterState"),M.exports=S=function(){function N(_,X,ee){var ie;this.name="?xml",this.type=p.Document,_||(_={}),ie={},_.writer?F(_.writer)&&(ie=_.writer,_.writer=new Z):_.writer=new Z,this.options=_,this.writer=_.writer,this.writerOptions=this.writer.filterOptions(ie),this.stringify=new P(_),this.onDataCallback=X||function(){},this.onEndCallback=ee||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return N.prototype.createChildNode=function(_){var X,ee,ie,he,ne,Ie,q,pe;switch(_.type){case p.CData:this.cdata(_.value);break;case p.Comment:this.comment(_.value);break;case p.Element:ie={},q=_.attribs;for(ee in q)H.call(q,ee)&&(X=q[ee],ie[ee]=X.value);this.node(_.name,ie);break;case p.Dummy:this.dummy();break;case p.Raw:this.raw(_.value);break;case p.Text:this.text(_.value);break;case p.ProcessingInstruction:this.instruction(_.target,_.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+_.constructor.name)}for(pe=_.children,ne=0,Ie=pe.length;ne<Ie;ne++)he=pe[ne],this.createChildNode(he),he.type===p.Element&&this.up();return this},N.prototype.dummy=function(){return this},N.prototype.node=function(_,X,ee){var ie;if(_==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(_));return this.openCurrent(),_=B(_),X==null&&(X={}),X=B(X),D(X)||(ie=[X,ee],ee=ie[0],X=ie[1]),this.currentNode=new C(this,_,X),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,ee!=null&&this.text(ee),this},N.prototype.element=function(_,X,ee){var ie,he,ne,Ie,q,pe;if(this.currentNode&&this.currentNode.type===p.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(_)||D(_)||k(_))for(Ie=this.options.noValidation,this.options.noValidation=!0,pe=new T(this.options).element("TEMP_ROOT"),pe.element(_),this.options.noValidation=Ie,q=pe.children,he=0,ne=q.length;he<ne;he++)ie=q[he],this.createChildNode(ie),ie.type===p.Element&&this.up();else this.node(_,X,ee);return this},N.prototype.attribute=function(_,X){var ee,ie;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(_));if(_!=null&&(_=B(_)),D(_))for(ee in _)H.call(_,ee)&&(ie=_[ee],this.attribute(ee,ie));else k(X)&&(X=X.apply()),this.options.keepNullAttributes&&X==null?this.currentNode.attribs[_]=new h(this,_,""):X!=null&&(this.currentNode.attribs[_]=new h(this,_,X));return this},N.prototype.text=function(_){var X;return this.openCurrent(),X=new Q(this,_),this.onData(this.writer.text(X,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},N.prototype.cdata=function(_){var X;return this.openCurrent(),X=new y(this,_),this.onData(this.writer.cdata(X,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},N.prototype.comment=function(_){var X;return this.openCurrent(),X=new g(this,_),this.onData(this.writer.comment(X,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},N.prototype.raw=function(_){var X;return this.openCurrent(),X=new j(this,_),this.onData(this.writer.raw(X,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},N.prototype.instruction=function(_,X){var ee,ie,he,ne,Ie;if(this.openCurrent(),_!=null&&(_=B(_)),X!=null&&(X=B(X)),Array.isArray(_))for(ee=0,ne=_.length;ee<ne;ee++)ie=_[ee],this.instruction(ie);else if(D(_))for(ie in _)H.call(_,ie)&&(he=_[ie],this.instruction(ie,he));else k(X)&&(X=X.apply()),Ie=new E(this,_,X),this.onData(this.writer.processingInstruction(Ie,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},N.prototype.declaration=function(_,X,ee){var ie;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return ie=new b(this,_,X,ee),this.onData(this.writer.declaration(ie,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},N.prototype.doctype=function(_,X,ee){if(this.openCurrent(),_==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new x(this,X,ee),this.currentNode.rootNodeName=_,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},N.prototype.dtdElement=function(_,X){var ee;return this.openCurrent(),ee=new c(this,_,X),this.onData(this.writer.dtdElement(ee,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},N.prototype.attList=function(_,X,ee,ie,he){var ne;return this.openCurrent(),ne=new w(this,_,X,ee,ie,he),this.onData(this.writer.dtdAttList(ne,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},N.prototype.entity=function(_,X){var ee;return this.openCurrent(),ee=new m(this,!1,_,X),this.onData(this.writer.dtdEntity(ee,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},N.prototype.pEntity=function(_,X){var ee;return this.openCurrent(),ee=new m(this,!0,_,X),this.onData(this.writer.dtdEntity(ee,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},N.prototype.notation=function(_,X){var ee;return this.openCurrent(),ee=new v(this,_,X),this.onData(this.writer.dtdNotation(ee,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},N.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},N.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},N.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},N.prototype.openNode=function(_){var X,ee,ie,he;if(!_.isOpen){if(!this.root&&this.currentLevel===0&&_.type===p.Element&&(this.root=_),ee="",_.type===p.Element){this.writerOptions.state=f.OpenTag,ee=this.writer.indent(_,this.writerOptions,this.currentLevel)+"<"+_.name,he=_.attribs;for(ie in he)H.call(he,ie)&&(X=he[ie],ee+=this.writer.attribute(X,this.writerOptions,this.currentLevel));ee+=(_.children?">":"/>")+this.writer.endline(_,this.writerOptions,this.currentLevel),this.writerOptions.state=f.InsideTag}else this.writerOptions.state=f.OpenTag,ee=this.writer.indent(_,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+_.rootNodeName,_.pubID&&_.sysID?ee+=' PUBLIC "'+_.pubID+'" "'+_.sysID+'"':_.sysID&&(ee+=' SYSTEM "'+_.sysID+'"'),_.children?(ee+=" [",this.writerOptions.state=f.InsideTag):(this.writerOptions.state=f.CloseTag,ee+=">"),ee+=this.writer.endline(_,this.writerOptions,this.currentLevel);return this.onData(ee,this.currentLevel),_.isOpen=!0}},N.prototype.closeNode=function(_){var X;if(!_.isClosed)return X="",this.writerOptions.state=f.CloseTag,_.type===p.Element?X=this.writer.indent(_,this.writerOptions,this.currentLevel)+"</"+_.name+">"+this.writer.endline(_,this.writerOptions,this.currentLevel):X=this.writer.indent(_,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(_,this.writerOptions,this.currentLevel),this.writerOptions.state=f.None,this.onData(X,this.currentLevel),_.isClosed=!0},N.prototype.onData=function(_,X){return this.documentStarted=!0,this.onDataCallback(_,X+1)},N.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},N.prototype.debugInfo=function(_){return _==null?"":"node: <"+_+">"},N.prototype.ele=function(){return this.element.apply(this,arguments)},N.prototype.nod=function(_,X,ee){return this.node(_,X,ee)},N.prototype.txt=function(_){return this.text(_)},N.prototype.dat=function(_){return this.cdata(_)},N.prototype.com=function(_){return this.comment(_)},N.prototype.ins=function(_,X){return this.instruction(_,X)},N.prototype.dec=function(_,X,ee){return this.declaration(_,X,ee)},N.prototype.dtd=function(_,X,ee){return this.doctype(_,X,ee)},N.prototype.e=function(_,X,ee){return this.element(_,X,ee)},N.prototype.n=function(_,X,ee){return this.node(_,X,ee)},N.prototype.t=function(_){return this.text(_)},N.prototype.d=function(_){return this.cdata(_)},N.prototype.c=function(_){return this.comment(_)},N.prototype.r=function(_){return this.raw(_)},N.prototype.i=function(_,X){return this.instruction(_,X)},N.prototype.att=function(){return this.currentNode&&this.currentNode.type===p.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},N.prototype.a=function(){return this.currentNode&&this.currentNode.type===p.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},N.prototype.ent=function(_,X){return this.entity(_,X)},N.prototype.pent=function(_,X){return this.pEntity(_,X)},N.prototype.not=function(_,X){return this.notation(_,X)},N}()}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLAttribute":431,"./XMLCData":432,"./XMLComment":434,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDocument":445,"./XMLElement":448,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLStringWriter":455,"./XMLStringifier":456,"./XMLText":457}],447:[function(o,M,R){(function(){var p,f,h,y=function(w,c){for(var m in c)g.call(c,m)&&(w[m]=c[m]);function v(){this.constructor=w}return v.prototype=c.prototype,w.prototype=new v,w.__super__=c.prototype,w},g={}.hasOwnProperty;h=o("./XMLNode"),p=o("./NodeType"),M.exports=f=function(w){y(c,w);function c(m){c.__super__.constructor.call(this,m),this.type=p.Dummy}return c.prototype.clone=function(){return Object.create(this)},c.prototype.toString=function(m){return""},c}(h)}).call(this)},{"./NodeType":428,"./XMLNode":450}],448:[function(o,M,R){(function(){var p,f,h,y,g,w,c,m,v,b=function(T,S){for(var C in S)x.call(S,C)&&(T[C]=S[C]);function E(){this.constructor=T}return E.prototype=S.prototype,T.prototype=new E,T.__super__=S.prototype,T},x={}.hasOwnProperty;v=o("./Utility"),m=v.isObject,c=v.isFunction,w=v.getValue,g=o("./XMLNode"),p=o("./NodeType"),f=o("./XMLAttribute"),y=o("./XMLNamedNodeMap"),M.exports=h=function(T){b(S,T);function S(C,E,j){var Z,P,Q,B;if(S.__super__.constructor.call(this,C),E==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(E),this.type=p.Element,this.attribs={},this.schemaTypeInfo=null,j!=null&&this.attribute(j),C.type===p.Document&&(this.isRoot=!0,this.documentObject=C,C.rootObject=this,C.children)){for(B=C.children,P=0,Q=B.length;P<Q;P++)if(Z=B[P],Z.type===p.DocType){Z.name=this.name;break}}}return Object.defineProperty(S.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(S.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(S.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(S.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(S.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(S.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(S.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(S.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new y(this.attribs)),this.attributeMap}}),S.prototype.clone=function(){var C,E,j,Z;j=Object.create(this),j.isRoot&&(j.documentObject=null),j.attribs={},Z=this.attribs;for(E in Z)x.call(Z,E)&&(C=Z[E],j.attribs[E]=C.clone());return j.children=[],this.children.forEach(function(P){var Q;return Q=P.clone(),Q.parent=j,j.children.push(Q)}),j},S.prototype.attribute=function(C,E){var j,Z;if(C!=null&&(C=w(C)),m(C))for(j in C)x.call(C,j)&&(Z=C[j],this.attribute(j,Z));else c(E)&&(E=E.apply()),this.options.keepNullAttributes&&E==null?this.attribs[C]=new f(this,C,""):E!=null&&(this.attribs[C]=new f(this,C,E));return this},S.prototype.removeAttribute=function(C){var E,j,Z;if(C==null)throw new Error("Missing attribute name. "+this.debugInfo());if(C=w(C),Array.isArray(C))for(j=0,Z=C.length;j<Z;j++)E=C[j],delete this.attribs[E];else delete this.attribs[C];return this},S.prototype.toString=function(C){return this.options.writer.element(this,this.options.writer.filterOptions(C))},S.prototype.att=function(C,E){return this.attribute(C,E)},S.prototype.a=function(C,E){return this.attribute(C,E)},S.prototype.getAttribute=function(C){return this.attribs.hasOwnProperty(C)?this.attribs[C].value:null},S.prototype.setAttribute=function(C,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.getAttributeNode=function(C){return this.attribs.hasOwnProperty(C)?this.attribs[C]:null},S.prototype.setAttributeNode=function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.removeAttributeNode=function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.getElementsByTagName=function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.getAttributeNS=function(C,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.setAttributeNS=function(C,E,j){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.removeAttributeNS=function(C,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.getAttributeNodeNS=function(C,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.setAttributeNodeNS=function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.getElementsByTagNameNS=function(C,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.hasAttribute=function(C){return this.attribs.hasOwnProperty(C)},S.prototype.hasAttributeNS=function(C,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.setIdAttribute=function(C,E){return this.attribs.hasOwnProperty(C)?this.attribs[C].isId:E},S.prototype.setIdAttributeNS=function(C,E,j){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.setIdAttributeNode=function(C,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.getElementsByTagName=function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.getElementsByTagNameNS=function(C,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.getElementsByClassName=function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.isEqualNode=function(C){var E,j,Z;if(!S.__super__.isEqualNode.apply(this,arguments).isEqualNode(C)||C.namespaceURI!==this.namespaceURI||C.prefix!==this.prefix||C.localName!==this.localName||C.attribs.length!==this.attribs.length)return!1;for(E=j=0,Z=this.attribs.length-1;0<=Z?j<=Z:j>=Z;E=0<=Z?++j:--j)if(!this.attribs[E].isEqualNode(C.attribs[E]))return!1;return!0},S}(g)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLAttribute":431,"./XMLNamedNodeMap":449,"./XMLNode":450}],449:[function(o,M,R){(function(){var p;M.exports=p=function(){function f(h){this.nodes=h}return Object.defineProperty(f.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),f.prototype.clone=function(){return this.nodes=null},f.prototype.getNamedItem=function(h){return this.nodes[h]},f.prototype.setNamedItem=function(h){var y;return y=this.nodes[h.nodeName],this.nodes[h.nodeName]=h,y||null},f.prototype.removeNamedItem=function(h){var y;return y=this.nodes[h],delete this.nodes[h],y||null},f.prototype.item=function(h){return this.nodes[Object.keys(this.nodes)[h]]||null},f.prototype.getNamedItemNS=function(h,y){throw new Error("This DOM method is not implemented.")},f.prototype.setNamedItemNS=function(h){throw new Error("This DOM method is not implemented.")},f.prototype.removeNamedItemNS=function(h,y){throw new Error("This DOM method is not implemented.")},f}()}).call(this)},{}],450:[function(o,M,R){(function(){var p,f,h,y,g,w,c,m,v,b,x,T,S,C,E,j,Z,P,Q,B={}.hasOwnProperty;Q=o("./Utility"),P=Q.isObject,Z=Q.isFunction,j=Q.isEmpty,E=Q.getValue,m=null,h=null,y=null,g=null,w=null,S=null,C=null,T=null,c=null,f=null,x=null,v=null,p=null,M.exports=b=function(){function k(D){this.parent=D,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,m||(m=o("./XMLElement"),h=o("./XMLCData"),y=o("./XMLComment"),g=o("./XMLDeclaration"),w=o("./XMLDocType"),S=o("./XMLRaw"),C=o("./XMLText"),T=o("./XMLProcessingInstruction"),c=o("./XMLDummy"),f=o("./NodeType"),x=o("./XMLNodeList"),v=o("./XMLNamedNodeMap"),p=o("./DocumentPosition"))}return Object.defineProperty(k.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(k.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(k.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(k.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(k.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new x(this.children)),this.childNodeList}}),Object.defineProperty(k.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(k.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(k.prototype,"previousSibling",{get:function(){var D;return D=this.parent.children.indexOf(this),this.parent.children[D-1]||null}}),Object.defineProperty(k.prototype,"nextSibling",{get:function(){var D;return D=this.parent.children.indexOf(this),this.parent.children[D+1]||null}}),Object.defineProperty(k.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(k.prototype,"textContent",{get:function(){var D,F,J,H,N;if(this.nodeType===f.Element||this.nodeType===f.DocumentFragment){for(N="",H=this.children,F=0,J=H.length;F<J;F++)D=H[F],D.textContent&&(N+=D.textContent);return N}else return null},set:function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),k.prototype.setParent=function(D){var F,J,H,N,_;for(this.parent=D,D&&(this.options=D.options,this.stringify=D.stringify),N=this.children,_=[],J=0,H=N.length;J<H;J++)F=N[J],_.push(F.setParent(this));return _},k.prototype.element=function(D,F,J){var H,N,_,X,ee,ie,he,ne,Ie,q,pe;if(ie=null,F===null&&J==null&&(Ie=[{},null],F=Ie[0],J=Ie[1]),F==null&&(F={}),F=E(F),P(F)||(q=[F,J],J=q[0],F=q[1]),D!=null&&(D=E(D)),Array.isArray(D))for(_=0,he=D.length;_<he;_++)N=D[_],ie=this.element(N);else if(Z(D))ie=this.element(D.apply());else if(P(D)){for(ee in D)if(B.call(D,ee))if(pe=D[ee],Z(pe)&&(pe=pe.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&ee.indexOf(this.stringify.convertAttKey)===0)ie=this.attribute(ee.substr(this.stringify.convertAttKey.length),pe);else if(!this.options.separateArrayItems&&Array.isArray(pe)&&j(pe))ie=this.dummy();else if(P(pe)&&j(pe))ie=this.element(ee);else if(!this.options.keepNullNodes&&pe==null)ie=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(pe))for(X=0,ne=pe.length;X<ne;X++)N=pe[X],H={},H[ee]=N,ie=this.element(H);else P(pe)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&ee.indexOf(this.stringify.convertTextKey)===0?ie=this.element(pe):(ie=this.element(ee),ie.element(pe)):ie=this.element(ee,pe)}else!this.options.keepNullNodes&&J===null?ie=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&D.indexOf(this.stringify.convertTextKey)===0?ie=this.text(J):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&D.indexOf(this.stringify.convertCDataKey)===0?ie=this.cdata(J):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&D.indexOf(this.stringify.convertCommentKey)===0?ie=this.comment(J):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&D.indexOf(this.stringify.convertRawKey)===0?ie=this.raw(J):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&D.indexOf(this.stringify.convertPIKey)===0?ie=this.instruction(D.substr(this.stringify.convertPIKey.length),J):ie=this.node(D,F,J);if(ie==null)throw new Error("Could not create any elements with: "+D+". "+this.debugInfo());return ie},k.prototype.insertBefore=function(D,F,J){var H,N,_,X,ee;if(D!=null&&D.type)return _=D,X=F,_.setParent(this),X?(N=children.indexOf(X),ee=children.splice(N),children.push(_),Array.prototype.push.apply(children,ee)):children.push(_),_;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(D));return N=this.parent.children.indexOf(this),ee=this.parent.children.splice(N),H=this.parent.element(D,F,J),Array.prototype.push.apply(this.parent.children,ee),H},k.prototype.insertAfter=function(D,F,J){var H,N,_;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(D));return N=this.parent.children.indexOf(this),_=this.parent.children.splice(N+1),H=this.parent.element(D,F,J),Array.prototype.push.apply(this.parent.children,_),H},k.prototype.remove=function(){var D,F;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return D=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[D,D-D+1].concat(F=[])),this.parent},k.prototype.node=function(D,F,J){var H,N;return D!=null&&(D=E(D)),F||(F={}),F=E(F),P(F)||(N=[F,J],J=N[0],F=N[1]),H=new m(this,D,F),J!=null&&H.text(J),this.children.push(H),H},k.prototype.text=function(D){var F;return P(D)&&this.element(D),F=new C(this,D),this.children.push(F),this},k.prototype.cdata=function(D){var F;return F=new h(this,D),this.children.push(F),this},k.prototype.comment=function(D){var F;return F=new y(this,D),this.children.push(F),this},k.prototype.commentBefore=function(D){var F,J,H;return J=this.parent.children.indexOf(this),H=this.parent.children.splice(J),F=this.parent.comment(D),Array.prototype.push.apply(this.parent.children,H),this},k.prototype.commentAfter=function(D){var F,J,H;return J=this.parent.children.indexOf(this),H=this.parent.children.splice(J+1),F=this.parent.comment(D),Array.prototype.push.apply(this.parent.children,H),this},k.prototype.raw=function(D){var F;return F=new S(this,D),this.children.push(F),this},k.prototype.dummy=function(){var D;return D=new c(this),D},k.prototype.instruction=function(D,F){var J,H,N,_,X;if(D!=null&&(D=E(D)),F!=null&&(F=E(F)),Array.isArray(D))for(_=0,X=D.length;_<X;_++)J=D[_],this.instruction(J);else if(P(D))for(J in D)B.call(D,J)&&(H=D[J],this.instruction(J,H));else Z(F)&&(F=F.apply()),N=new T(this,D,F),this.children.push(N);return this},k.prototype.instructionBefore=function(D,F){var J,H,N;return H=this.parent.children.indexOf(this),N=this.parent.children.splice(H),J=this.parent.instruction(D,F),Array.prototype.push.apply(this.parent.children,N),this},k.prototype.instructionAfter=function(D,F){var J,H,N;return H=this.parent.children.indexOf(this),N=this.parent.children.splice(H+1),J=this.parent.instruction(D,F),Array.prototype.push.apply(this.parent.children,N),this},k.prototype.declaration=function(D,F,J){var H,N;return H=this.document(),N=new g(H,D,F,J),H.children.length===0?H.children.unshift(N):H.children[0].type===f.Declaration?H.children[0]=N:H.children.unshift(N),H.root()||H},k.prototype.dtd=function(D,F){var J,H,N,_,X,ee,ie,he,ne,Ie;for(H=this.document(),N=new w(H,D,F),ne=H.children,_=X=0,ie=ne.length;X<ie;_=++X)if(J=ne[_],J.type===f.DocType)return H.children[_]=N,N;for(Ie=H.children,_=ee=0,he=Ie.length;ee<he;_=++ee)if(J=Ie[_],J.isRoot)return H.children.splice(_,0,N),N;return H.children.push(N),N},k.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},k.prototype.root=function(){var D;for(D=this;D;){if(D.type===f.Document)return D.rootObject;if(D.isRoot)return D;D=D.parent}},k.prototype.document=function(){var D;for(D=this;D;){if(D.type===f.Document)return D;D=D.parent}},k.prototype.end=function(D){return this.document().end(D)},k.prototype.prev=function(){var D;if(D=this.parent.children.indexOf(this),D<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[D-1]},k.prototype.next=function(){var D;if(D=this.parent.children.indexOf(this),D===-1||D===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[D+1]},k.prototype.importDocument=function(D){var F;return F=D.root().clone(),F.parent=this,F.isRoot=!1,this.children.push(F),this},k.prototype.debugInfo=function(D){var F,J;return D=D||this.name,D==null&&!((F=this.parent)!=null&&F.name)?"":D==null?"parent: <"+this.parent.name+">":(J=this.parent)!=null&&J.name?"node: <"+D+">, parent: <"+this.parent.name+">":"node: <"+D+">"},k.prototype.ele=function(D,F,J){return this.element(D,F,J)},k.prototype.nod=function(D,F,J){return this.node(D,F,J)},k.prototype.txt=function(D){return this.text(D)},k.prototype.dat=function(D){return this.cdata(D)},k.prototype.com=function(D){return this.comment(D)},k.prototype.ins=function(D,F){return this.instruction(D,F)},k.prototype.doc=function(){return this.document()},k.prototype.dec=function(D,F,J){return this.declaration(D,F,J)},k.prototype.e=function(D,F,J){return this.element(D,F,J)},k.prototype.n=function(D,F,J){return this.node(D,F,J)},k.prototype.t=function(D){return this.text(D)},k.prototype.d=function(D){return this.cdata(D)},k.prototype.c=function(D){return this.comment(D)},k.prototype.r=function(D){return this.raw(D)},k.prototype.i=function(D,F){return this.instruction(D,F)},k.prototype.u=function(){return this.up()},k.prototype.importXMLBuilder=function(D){return this.importDocument(D)},k.prototype.replaceChild=function(D,F){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.removeChild=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.appendChild=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.hasChildNodes=function(){return this.children.length!==0},k.prototype.cloneNode=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.isSupported=function(D,F){return!0},k.prototype.hasAttributes=function(){return this.attribs.length!==0},k.prototype.compareDocumentPosition=function(D){var F,J;return F=this,F===D?0:this.document()!==D.document()?(J=p.Disconnected|p.ImplementationSpecific,Math.random()<.5?J|=p.Preceding:J|=p.Following,J):F.isAncestor(D)?p.Contains|p.Preceding:F.isDescendant(D)?p.Contains|p.Following:F.isPreceding(D)?p.Preceding:p.Following},k.prototype.isSameNode=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.lookupPrefix=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.isDefaultNamespace=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.lookupNamespaceURI=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.isEqualNode=function(D){var F,J,H;if(D.nodeType!==this.nodeType||D.children.length!==this.children.length)return!1;for(F=J=0,H=this.children.length-1;0<=H?J<=H:J>=H;F=0<=H?++J:--J)if(!this.children[F].isEqualNode(D.children[F]))return!1;return!0},k.prototype.getFeature=function(D,F){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.setUserData=function(D,F,J){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.getUserData=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.contains=function(D){return D?D===this||this.isDescendant(D):!1},k.prototype.isDescendant=function(D){var F,J,H,N,_;for(_=this.children,H=0,N=_.length;H<N;H++)if(F=_[H],D===F||(J=F.isDescendant(D),J))return!0;return!1},k.prototype.isAncestor=function(D){return D.isDescendant(this)},k.prototype.isPreceding=function(D){var F,J;return F=this.treePosition(D),J=this.treePosition(this),F===-1||J===-1?!1:F<J},k.prototype.isFollowing=function(D){var F,J;return F=this.treePosition(D),J=this.treePosition(this),F===-1||J===-1?!1:F>J},k.prototype.treePosition=function(D){var F,J;return J=0,F=!1,this.foreachTreeNode(this.document(),function(H){if(J++,!F&&H===D)return F=!0}),F?J:-1},k.prototype.foreachTreeNode=function(D,F){var J,H,N,_,X;for(D||(D=this.document()),_=D.children,H=0,N=_.length;H<N;H++){if(J=_[H],X=F(J))return X;if(X=this.foreachTreeNode(J,F),X)return X}},k}()}).call(this)},{"./DocumentPosition":427,"./NodeType":428,"./Utility":429,"./XMLCData":432,"./XMLComment":434,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDummy":447,"./XMLElement":448,"./XMLNamedNodeMap":449,"./XMLNodeList":451,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLText":457}],451:[function(o,M,R){(function(){var p;M.exports=p=function(){function f(h){this.nodes=h}return Object.defineProperty(f.prototype,"length",{get:function(){return this.nodes.length||0}}),f.prototype.clone=function(){return this.nodes=null},f.prototype.item=function(h){return this.nodes[h]||null},f}()}).call(this)},{}],452:[function(o,M,R){(function(){var p,f,h,y=function(w,c){for(var m in c)g.call(c,m)&&(w[m]=c[m]);function v(){this.constructor=w}return v.prototype=c.prototype,w.prototype=new v,w.__super__=c.prototype,w},g={}.hasOwnProperty;p=o("./NodeType"),f=o("./XMLCharacterData"),M.exports=h=function(w){y(c,w);function c(m,v,b){if(c.__super__.constructor.call(this,m),v==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=p.ProcessingInstruction,this.target=this.stringify.insTarget(v),this.name=this.target,b&&(this.value=this.stringify.insValue(b))}return c.prototype.clone=function(){return Object.create(this)},c.prototype.toString=function(m){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(m))},c.prototype.isEqualNode=function(m){return!(!c.__super__.isEqualNode.apply(this,arguments).isEqualNode(m)||m.target!==this.target)},c}(f)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],453:[function(o,M,R){(function(){var p,f,h,y=function(w,c){for(var m in c)g.call(c,m)&&(w[m]=c[m]);function v(){this.constructor=w}return v.prototype=c.prototype,w.prototype=new v,w.__super__=c.prototype,w},g={}.hasOwnProperty;p=o("./NodeType"),f=o("./XMLNode"),M.exports=h=function(w){y(c,w);function c(m,v){if(c.__super__.constructor.call(this,m),v==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=p.Raw,this.value=this.stringify.raw(v)}return c.prototype.clone=function(){return Object.create(this)},c.prototype.toString=function(m){return this.options.writer.raw(this,this.options.writer.filterOptions(m))},c}(f)}).call(this)},{"./NodeType":428,"./XMLNode":450}],454:[function(o,M,R){(function(){var p,f,h,y,g=function(c,m){for(var v in m)w.call(m,v)&&(c[v]=m[v]);function b(){this.constructor=c}return b.prototype=m.prototype,c.prototype=new b,c.__super__=m.prototype,c},w={}.hasOwnProperty;p=o("./NodeType"),y=o("./XMLWriterBase"),f=o("./WriterState"),M.exports=h=function(c){g(m,c);function m(v,b){this.stream=v,m.__super__.constructor.call(this,b)}return m.prototype.endline=function(v,b,x){return v.isLastRootNode&&b.state===f.CloseTag?"":m.__super__.endline.call(this,v,b,x)},m.prototype.document=function(v,b){var x,T,S,C,E,j,Z,P,Q;for(Z=v.children,T=S=0,E=Z.length;S<E;T=++S)x=Z[T],x.isLastRootNode=T===v.children.length-1;for(b=this.filterOptions(b),P=v.children,Q=[],C=0,j=P.length;C<j;C++)x=P[C],Q.push(this.writeChildNode(x,b,0));return Q},m.prototype.attribute=function(v,b,x){return this.stream.write(m.__super__.attribute.call(this,v,b,x))},m.prototype.cdata=function(v,b,x){return this.stream.write(m.__super__.cdata.call(this,v,b,x))},m.prototype.comment=function(v,b,x){return this.stream.write(m.__super__.comment.call(this,v,b,x))},m.prototype.declaration=function(v,b,x){return this.stream.write(m.__super__.declaration.call(this,v,b,x))},m.prototype.docType=function(v,b,x){var T,S,C,E;if(x||(x=0),this.openNode(v,b,x),b.state=f.OpenTag,this.stream.write(this.indent(v,b,x)),this.stream.write("<!DOCTYPE "+v.root().name),v.pubID&&v.sysID?this.stream.write(' PUBLIC "'+v.pubID+'" "'+v.sysID+'"'):v.sysID&&this.stream.write(' SYSTEM "'+v.sysID+'"'),v.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(v,b,x)),b.state=f.InsideTag,E=v.children,S=0,C=E.length;S<C;S++)T=E[S],this.writeChildNode(T,b,x+1);b.state=f.CloseTag,this.stream.write("]")}return b.state=f.CloseTag,this.stream.write(b.spaceBeforeSlash+">"),this.stream.write(this.endline(v,b,x)),b.state=f.None,this.closeNode(v,b,x)},m.prototype.element=function(v,b,x){var T,S,C,E,j,Z,P,Q,B,k;x||(x=0),this.openNode(v,b,x),b.state=f.OpenTag,this.stream.write(this.indent(v,b,x)+"<"+v.name),B=v.attribs;for(P in B)w.call(B,P)&&(T=B[P],this.attribute(T,b,x));if(C=v.children.length,E=C===0?null:v.children[0],C===0||v.children.every(function(D){return(D.type===p.Text||D.type===p.Raw)&&D.value===""}))b.allowEmpty?(this.stream.write(">"),b.state=f.CloseTag,this.stream.write("</"+v.name+">")):(b.state=f.CloseTag,this.stream.write(b.spaceBeforeSlash+"/>"));else if(b.pretty&&C===1&&(E.type===p.Text||E.type===p.Raw)&&E.value!=null)this.stream.write(">"),b.state=f.InsideTag,b.suppressPrettyCount++,Q=!0,this.writeChildNode(E,b,x+1),b.suppressPrettyCount--,Q=!1,b.state=f.CloseTag,this.stream.write("</"+v.name+">");else{for(this.stream.write(">"+this.endline(v,b,x)),b.state=f.InsideTag,k=v.children,j=0,Z=k.length;j<Z;j++)S=k[j],this.writeChildNode(S,b,x+1);b.state=f.CloseTag,this.stream.write(this.indent(v,b,x)+"</"+v.name+">")}return this.stream.write(this.endline(v,b,x)),b.state=f.None,this.closeNode(v,b,x)},m.prototype.processingInstruction=function(v,b,x){return this.stream.write(m.__super__.processingInstruction.call(this,v,b,x))},m.prototype.raw=function(v,b,x){return this.stream.write(m.__super__.raw.call(this,v,b,x))},m.prototype.text=function(v,b,x){return this.stream.write(m.__super__.text.call(this,v,b,x))},m.prototype.dtdAttList=function(v,b,x){return this.stream.write(m.__super__.dtdAttList.call(this,v,b,x))},m.prototype.dtdElement=function(v,b,x){return this.stream.write(m.__super__.dtdElement.call(this,v,b,x))},m.prototype.dtdEntity=function(v,b,x){return this.stream.write(m.__super__.dtdEntity.call(this,v,b,x))},m.prototype.dtdNotation=function(v,b,x){return this.stream.write(m.__super__.dtdNotation.call(this,v,b,x))},m}(y)}).call(this)},{"./NodeType":428,"./WriterState":430,"./XMLWriterBase":458}],455:[function(o,M,R){(function(){var p,f,h=function(g,w){for(var c in w)y.call(w,c)&&(g[c]=w[c]);function m(){this.constructor=g}return m.prototype=w.prototype,g.prototype=new m,g.__super__=w.prototype,g},y={}.hasOwnProperty;f=o("./XMLWriterBase"),M.exports=p=function(g){h(w,g);function w(c){w.__super__.constructor.call(this,c)}return w.prototype.document=function(c,m){var v,b,x,T,S;for(m=this.filterOptions(m),T="",S=c.children,b=0,x=S.length;b<x;b++)v=S[b],T+=this.writeChildNode(v,m,0);return m.pretty&&T.slice(-m.newline.length)===m.newline&&(T=T.slice(0,-m.newline.length)),T},w}(f)}).call(this)},{"./XMLWriterBase":458}],456:[function(o,M,R){(function(){var p,f=function(y,g){return function(){return y.apply(g,arguments)}},h={}.hasOwnProperty;M.exports=p=function(){function y(g){this.assertLegalName=f(this.assertLegalName,this),this.assertLegalChar=f(this.assertLegalChar,this);var w,c,m;g||(g={}),this.options=g,this.options.version||(this.options.version="1.0"),c=g.stringify||{};for(w in c)h.call(c,w)&&(m=c[w],this[w]=m)}return y.prototype.name=function(g){return this.options.noValidation?g:this.assertLegalName(""+g||"")},y.prototype.text=function(g){return this.options.noValidation?g:this.assertLegalChar(this.textEscape(""+g||""))},y.prototype.cdata=function(g){return this.options.noValidation?g:(g=""+g||"",g=g.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(g))},y.prototype.comment=function(g){if(this.options.noValidation)return g;if(g=""+g||"",g.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+g);return this.assertLegalChar(g)},y.prototype.raw=function(g){return this.options.noValidation?g:""+g||""},y.prototype.attValue=function(g){return this.options.noValidation?g:this.assertLegalChar(this.attEscape(g=""+g||""))},y.prototype.insTarget=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},y.prototype.insValue=function(g){if(this.options.noValidation)return g;if(g=""+g||"",g.match(/\?>/))throw new Error("Invalid processing instruction value: "+g);return this.assertLegalChar(g)},y.prototype.xmlVersion=function(g){if(this.options.noValidation)return g;if(g=""+g||"",!g.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+g);return g},y.prototype.xmlEncoding=function(g){if(this.options.noValidation)return g;if(g=""+g||"",!g.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+g);return this.assertLegalChar(g)},y.prototype.xmlStandalone=function(g){return this.options.noValidation?g:g?"yes":"no"},y.prototype.dtdPubID=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},y.prototype.dtdSysID=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},y.prototype.dtdElementValue=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},y.prototype.dtdAttType=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},y.prototype.dtdAttDefault=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},y.prototype.dtdEntityValue=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},y.prototype.dtdNData=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},y.prototype.convertAttKey="@",y.prototype.convertPIKey="?",y.prototype.convertTextKey="#text",y.prototype.convertCDataKey="#cdata",y.prototype.convertCommentKey="#comment",y.prototype.convertRawKey="#raw",y.prototype.assertLegalChar=function(g){var w,c;if(this.options.noValidation)return g;if(w="",this.options.version==="1.0"){if(w=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,c=g.match(w))throw new Error("Invalid character in string: "+g+" at index "+c.index)}else if(this.options.version==="1.1"&&(w=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,c=g.match(w)))throw new Error("Invalid character in string: "+g+" at index "+c.index);return g},y.prototype.assertLegalName=function(g){var w;if(this.options.noValidation)return g;if(this.assertLegalChar(g),w=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!g.match(w))throw new Error("Invalid character in name");return g},y.prototype.textEscape=function(g){var w;return this.options.noValidation?g:(w=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,g.replace(w,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))},y.prototype.attEscape=function(g){var w;return this.options.noValidation?g:(w=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,g.replace(w,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))},y}()}).call(this)},{}],457:[function(o,M,R){(function(){var p,f,h,y=function(w,c){for(var m in c)g.call(c,m)&&(w[m]=c[m]);function v(){this.constructor=w}return v.prototype=c.prototype,w.prototype=new v,w.__super__=c.prototype,w},g={}.hasOwnProperty;p=o("./NodeType"),f=o("./XMLCharacterData"),M.exports=h=function(w){y(c,w);function c(m,v){if(c.__super__.constructor.call(this,m),v==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=p.Text,this.value=this.stringify.text(v)}return Object.defineProperty(c.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(c.prototype,"wholeText",{get:function(){var m,v,b;for(b="",v=this.previousSibling;v;)b=v.data+b,v=v.previousSibling;for(b+=this.data,m=this.nextSibling;m;)b=b+m.data,m=m.nextSibling;return b}}),c.prototype.clone=function(){return Object.create(this)},c.prototype.toString=function(m){return this.options.writer.text(this,this.options.writer.filterOptions(m))},c.prototype.splitText=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.replaceWholeText=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},c}(f)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],458:[function(o,M,R){(function(){var p,f,h,y,g,w,c,m,v,b,x,T,S,C,E,j,Z,P={}.hasOwnProperty;Z=o("./Utility").assign,p=o("./NodeType"),v=o("./XMLDeclaration"),b=o("./XMLDocType"),h=o("./XMLCData"),y=o("./XMLComment"),T=o("./XMLElement"),C=o("./XMLRaw"),E=o("./XMLText"),S=o("./XMLProcessingInstruction"),x=o("./XMLDummy"),g=o("./XMLDTDAttList"),w=o("./XMLDTDElement"),c=o("./XMLDTDEntity"),m=o("./XMLDTDNotation"),f=o("./WriterState"),M.exports=j=function(){function Q(B){var k,D,F;B||(B={}),this.options=B,D=B.writer||{};for(k in D)P.call(D,k)&&(F=D[k],this["_"+k]=this[k],this[k]=F)}return Q.prototype.filterOptions=function(B){var k,D,F,J,H,N,_,X;return B||(B={}),B=Z({},this.options,B),k={writer:this},k.pretty=B.pretty||!1,k.allowEmpty=B.allowEmpty||!1,k.indent=(D=B.indent)!=null?D:" ",k.newline=(F=B.newline)!=null?F:`
`,k.offset=(J=B.offset)!=null?J:0,k.dontPrettyTextNodes=(H=(N=B.dontPrettyTextNodes)!=null?N:B.dontprettytextnodes)!=null?H:0,k.spaceBeforeSlash=(_=(X=B.spaceBeforeSlash)!=null?X:B.spacebeforeslash)!=null?_:"",k.spaceBeforeSlash===!0&&(k.spaceBeforeSlash=" "),k.suppressPrettyCount=0,k.user={},k.state=f.None,k},Q.prototype.indent=function(B,k,D){var F;return!k.pretty||k.suppressPrettyCount?"":k.pretty&&(F=(D||0)+k.offset+1,F>0)?new Array(F).join(k.indent):""},Q.prototype.endline=function(B,k,D){return!k.pretty||k.suppressPrettyCount?"":k.newline},Q.prototype.attribute=function(B,k,D){var F;return this.openAttribute(B,k,D),F=" "+B.name+'="'+B.value+'"',this.closeAttribute(B,k,D),F},Q.prototype.cdata=function(B,k,D){var F;return this.openNode(B,k,D),k.state=f.OpenTag,F=this.indent(B,k,D)+"<![CDATA[",k.state=f.InsideTag,F+=B.value,k.state=f.CloseTag,F+="]]>"+this.endline(B,k,D),k.state=f.None,this.closeNode(B,k,D),F},Q.prototype.comment=function(B,k,D){var F;return this.openNode(B,k,D),k.state=f.OpenTag,F=this.indent(B,k,D)+"<!-- ",k.state=f.InsideTag,F+=B.value,k.state=f.CloseTag,F+=" -->"+this.endline(B,k,D),k.state=f.None,this.closeNode(B,k,D),F},Q.prototype.declaration=function(B,k,D){var F;return this.openNode(B,k,D),k.state=f.OpenTag,F=this.indent(B,k,D)+"<?xml",k.state=f.InsideTag,F+=' version="'+B.version+'"',B.encoding!=null&&(F+=' encoding="'+B.encoding+'"'),B.standalone!=null&&(F+=' standalone="'+B.standalone+'"'),k.state=f.CloseTag,F+=k.spaceBeforeSlash+"?>",F+=this.endline(B,k,D),k.state=f.None,this.closeNode(B,k,D),F},Q.prototype.docType=function(B,k,D){var F,J,H,N,_;if(D||(D=0),this.openNode(B,k,D),k.state=f.OpenTag,N=this.indent(B,k,D),N+="<!DOCTYPE "+B.root().name,B.pubID&&B.sysID?N+=' PUBLIC "'+B.pubID+'" "'+B.sysID+'"':B.sysID&&(N+=' SYSTEM "'+B.sysID+'"'),B.children.length>0){for(N+=" [",N+=this.endline(B,k,D),k.state=f.InsideTag,_=B.children,J=0,H=_.length;J<H;J++)F=_[J],N+=this.writeChildNode(F,k,D+1);k.state=f.CloseTag,N+="]"}return k.state=f.CloseTag,N+=k.spaceBeforeSlash+">",N+=this.endline(B,k,D),k.state=f.None,this.closeNode(B,k,D),N},Q.prototype.element=function(B,k,D){var F,J,H,N,_,X,ee,ie,he,ne,Ie,q,pe,ve;D||(D=0),ne=!1,Ie="",this.openNode(B,k,D),k.state=f.OpenTag,Ie+=this.indent(B,k,D)+"<"+B.name,q=B.attribs;for(he in q)P.call(q,he)&&(F=q[he],Ie+=this.attribute(F,k,D));if(H=B.children.length,N=H===0?null:B.children[0],H===0||B.children.every(function(xe){return(xe.type===p.Text||xe.type===p.Raw)&&xe.value===""}))k.allowEmpty?(Ie+=">",k.state=f.CloseTag,Ie+="</"+B.name+">"+this.endline(B,k,D)):(k.state=f.CloseTag,Ie+=k.spaceBeforeSlash+"/>"+this.endline(B,k,D));else if(k.pretty&&H===1&&(N.type===p.Text||N.type===p.Raw)&&N.value!=null)Ie+=">",k.state=f.InsideTag,k.suppressPrettyCount++,ne=!0,Ie+=this.writeChildNode(N,k,D+1),k.suppressPrettyCount--,ne=!1,k.state=f.CloseTag,Ie+="</"+B.name+">"+this.endline(B,k,D);else{if(k.dontPrettyTextNodes){for(pe=B.children,_=0,ee=pe.length;_<ee;_++)if(J=pe[_],(J.type===p.Text||J.type===p.Raw)&&J.value!=null){k.suppressPrettyCount++,ne=!0;break}}for(Ie+=">"+this.endline(B,k,D),k.state=f.InsideTag,ve=B.children,X=0,ie=ve.length;X<ie;X++)J=ve[X],Ie+=this.writeChildNode(J,k,D+1);k.state=f.CloseTag,Ie+=this.indent(B,k,D)+"</"+B.name+">",ne&&k.suppressPrettyCount--,Ie+=this.endline(B,k,D),k.state=f.None}return this.closeNode(B,k,D),Ie},Q.prototype.writeChildNode=function(B,k,D){switch(B.type){case p.CData:return this.cdata(B,k,D);case p.Comment:return this.comment(B,k,D);case p.Element:return this.element(B,k,D);case p.Raw:return this.raw(B,k,D);case p.Text:return this.text(B,k,D);case p.ProcessingInstruction:return this.processingInstruction(B,k,D);case p.Dummy:return"";case p.Declaration:return this.declaration(B,k,D);case p.DocType:return this.docType(B,k,D);case p.AttributeDeclaration:return this.dtdAttList(B,k,D);case p.ElementDeclaration:return this.dtdElement(B,k,D);case p.EntityDeclaration:return this.dtdEntity(B,k,D);case p.NotationDeclaration:return this.dtdNotation(B,k,D);default:throw new Error("Unknown XML node type: "+B.constructor.name)}},Q.prototype.processingInstruction=function(B,k,D){var F;return this.openNode(B,k,D),k.state=f.OpenTag,F=this.indent(B,k,D)+"<?",k.state=f.InsideTag,F+=B.target,B.value&&(F+=" "+B.value),k.state=f.CloseTag,F+=k.spaceBeforeSlash+"?>",F+=this.endline(B,k,D),k.state=f.None,this.closeNode(B,k,D),F},Q.prototype.raw=function(B,k,D){var F;return this.openNode(B,k,D),k.state=f.OpenTag,F=this.indent(B,k,D),k.state=f.InsideTag,F+=B.value,k.state=f.CloseTag,F+=this.endline(B,k,D),k.state=f.None,this.closeNode(B,k,D),F},Q.prototype.text=function(B,k,D){var F;return this.openNode(B,k,D),k.state=f.OpenTag,F=this.indent(B,k,D),k.state=f.InsideTag,F+=B.value,k.state=f.CloseTag,F+=this.endline(B,k,D),k.state=f.None,this.closeNode(B,k,D),F},Q.prototype.dtdAttList=function(B,k,D){var F;return this.openNode(B,k,D),k.state=f.OpenTag,F=this.indent(B,k,D)+"<!ATTLIST",k.state=f.InsideTag,F+=" "+B.elementName+" "+B.attributeName+" "+B.attributeType,B.defaultValueType!=="#DEFAULT"&&(F+=" "+B.defaultValueType),B.defaultValue&&(F+=' "'+B.defaultValue+'"'),k.state=f.CloseTag,F+=k.spaceBeforeSlash+">"+this.endline(B,k,D),k.state=f.None,this.closeNode(B,k,D),F},Q.prototype.dtdElement=function(B,k,D){var F;return this.openNode(B,k,D),k.state=f.OpenTag,F=this.indent(B,k,D)+"<!ELEMENT",k.state=f.InsideTag,F+=" "+B.name+" "+B.value,k.state=f.CloseTag,F+=k.spaceBeforeSlash+">"+this.endline(B,k,D),k.state=f.None,this.closeNode(B,k,D),F},Q.prototype.dtdEntity=function(B,k,D){var F;return this.openNode(B,k,D),k.state=f.OpenTag,F=this.indent(B,k,D)+"<!ENTITY",k.state=f.InsideTag,B.pe&&(F+=" %"),F+=" "+B.name,B.value?F+=' "'+B.value+'"':(B.pubID&&B.sysID?F+=' PUBLIC "'+B.pubID+'" "'+B.sysID+'"':B.sysID&&(F+=' SYSTEM "'+B.sysID+'"'),B.nData&&(F+=" NDATA "+B.nData)),k.state=f.CloseTag,F+=k.spaceBeforeSlash+">"+this.endline(B,k,D),k.state=f.None,this.closeNode(B,k,D),F},Q.prototype.dtdNotation=function(B,k,D){var F;return this.openNode(B,k,D),k.state=f.OpenTag,F=this.indent(B,k,D)+"<!NOTATION",k.state=f.InsideTag,F+=" "+B.name,B.pubID&&B.sysID?F+=' PUBLIC "'+B.pubID+'" "'+B.sysID+'"':B.pubID?F+=' PUBLIC "'+B.pubID+'"':B.sysID&&(F+=' SYSTEM "'+B.sysID+'"'),k.state=f.CloseTag,F+=k.spaceBeforeSlash+">"+this.endline(B,k,D),k.state=f.None,this.closeNode(B,k,D),F},Q.prototype.openNode=function(B,k,D){},Q.prototype.closeNode=function(B,k,D){},Q.prototype.openAttribute=function(B,k,D){},Q.prototype.closeAttribute=function(B,k,D){},Q}()}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLCData":432,"./XMLComment":434,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDummy":447,"./XMLElement":448,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLText":457}],459:[function(o,M,R){(function(){var p,f,h,y,g,w,c,m,v,b;b=o("./Utility"),m=b.assign,v=b.isFunction,h=o("./XMLDOMImplementation"),y=o("./XMLDocument"),g=o("./XMLDocumentCB"),c=o("./XMLStringWriter"),w=o("./XMLStreamWriter"),p=o("./NodeType"),f=o("./WriterState"),M.exports.create=function(x,T,S,C){var E,j;if(x==null)throw new Error("Root element needs a name.");return C=m({},T,S,C),E=new y(C),j=E.element(x),C.headless||(E.declaration(C),(C.pubID!=null||C.sysID!=null)&&E.dtd(C)),j},M.exports.begin=function(x,T,S){var C;return v(x)&&(C=[x,T],T=C[0],S=C[1],x={}),T?new g(x,T,S):new y(x)},M.exports.stringWriter=function(x){return new c(x)},M.exports.streamWriter=function(x,T){return new w(x,T)},M.exports.implementation=new h,M.exports.nodeType=p,M.exports.writerState=f}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLDOMImplementation":437,"./XMLDocument":445,"./XMLDocumentCB":446,"./XMLStreamWriter":454,"./XMLStringWriter":455}],460:[function(o,M,R){M.exports=f;var p=Object.prototype.hasOwnProperty;function f(){for(var h={},y=0;y<arguments.length;y++){var g=arguments[y];for(var w in g)p.call(g,w)&&(h[w]=g[w])}return h}},{}],461:[function(o,M,R){"use strict";o("core-js/modules/es.array.fill.js"),o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.regexp.to-string.js"),o("core-js/modules/es.array.join.js"),o("core-js/modules/es.array.slice.js");var p=o("buffer").Buffer,f=o("./sha"),h=o("./md5"),y={sha1:f,md5:h},g=64,w=p.alloc(g);w.fill(0);function c(b,x,T){p.isBuffer(x)||(x=p.from(x)),p.isBuffer(T)||(T=p.from(T)),x.length>g?x=b(x):x.length<g&&(x=p.concat([x,w],g));for(var S=p.alloc(g),C=p.alloc(g),E=0;E<g;E++)S[E]=x[E]^54,C[E]=x[E]^92;var j=b(p.concat([S,T]));return b(p.concat([C,j]))}function m(b,x){b=b||"sha1";var T=y[b],S=[],C=0;return T||v("algorithm:",b,"is not yet supported"),{update:function(j){return p.isBuffer(j)||(j=p.from(j)),S.push(j),C+=j.length,this},digest:function(j){var Z=p.concat(S),P=x?c(T,x,Z):T(Z);return S=null,j?P.toString(j):P}}}function v(){var b=[].slice.call(arguments).join(" ");throw new Error([b,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
`))}R.createHash=function(b){return m(b)},R.createHmac=function(b,x){return m(b,x)},R.createCredentials=function(){v("sorry,createCredentials is not implemented yet")},R.createCipher=function(){v("sorry,createCipher is not implemented yet")},R.createCipheriv=function(){v("sorry,createCipheriv is not implemented yet")},R.createDecipher=function(){v("sorry,createDecipher is not implemented yet")},R.createDecipheriv=function(){v("sorry,createDecipheriv is not implemented yet")},R.createSign=function(){v("sorry,createSign is not implemented yet")},R.createVerify=function(){v("sorry,createVerify is not implemented yet")},R.createDiffieHellman=function(){v("sorry,createDiffieHellman is not implemented yet")},R.pbkdf2=function(){v("sorry,pbkdf2 is not implemented yet")}},{"./md5":463,"./sha":464,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.fill.js":273,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],462:[function(o,M,R){"use strict";o("core-js/modules/es.array.fill.js"),o("core-js/modules/es.array.concat.js");var p=o("buffer").Buffer,f=4,h=p.alloc(f);h.fill(0);var y=8;function g(m,v){if(m.length%f!==0){var b=m.length+(f-m.length%f);m=p.concat([m,h],b)}for(var x=[],T=v?m.readInt32BE:m.readInt32LE,S=0;S<m.length;S+=f)x.push(T.call(m,S));return x}function w(m,v,b){for(var x=p.alloc(v),T=b?x.writeInt32BE:x.writeInt32LE,S=0;S<m.length;S++)T.call(x,m[S],S*4,!0);return x}function c(m,v,b,x){p.isBuffer(m)||(m=p.from(m));var T=v(g(m,x),m.length*y);return w(T,b,x)}M.exports={hash:c}},{buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.fill.js":273}],463:[function(o,M,R){"use strict";var p=o("./helpers");function f(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function h(x,T){x[T>>5]|=128<<T%32,x[(T+64>>>9<<4)+14]=T;for(var S=1732584193,C=-271733879,E=-1732584194,j=271733878,Z=0;Z<x.length;Z+=16){var P=S,Q=C,B=E,k=j;S=g(S,C,E,j,x[Z+0],7,-680876936),j=g(j,S,C,E,x[Z+1],12,-389564586),E=g(E,j,S,C,x[Z+2],17,606105819),C=g(C,E,j,S,x[Z+3],22,-1044525330),S=g(S,C,E,j,x[Z+4],7,-176418897),j=g(j,S,C,E,x[Z+5],12,1200080426),E=g(E,j,S,C,x[Z+6],17,-1473231341),C=g(C,E,j,S,x[Z+7],22,-45705983),S=g(S,C,E,j,x[Z+8],7,1770035416),j=g(j,S,C,E,x[Z+9],12,-1958414417),E=g(E,j,S,C,x[Z+10],17,-42063),C=g(C,E,j,S,x[Z+11],22,-1990404162),S=g(S,C,E,j,x[Z+12],7,1804603682),j=g(j,S,C,E,x[Z+13],12,-40341101),E=g(E,j,S,C,x[Z+14],17,-1502002290),C=g(C,E,j,S,x[Z+15],22,1236535329),S=w(S,C,E,j,x[Z+1],5,-165796510),j=w(j,S,C,E,x[Z+6],9,-1069501632),E=w(E,j,S,C,x[Z+11],14,643717713),C=w(C,E,j,S,x[Z+0],20,-373897302),S=w(S,C,E,j,x[Z+5],5,-701558691),j=w(j,S,C,E,x[Z+10],9,38016083),E=w(E,j,S,C,x[Z+15],14,-660478335),C=w(C,E,j,S,x[Z+4],20,-405537848),S=w(S,C,E,j,x[Z+9],5,568446438),j=w(j,S,C,E,x[Z+14],9,-1019803690),E=w(E,j,S,C,x[Z+3],14,-187363961),C=w(C,E,j,S,x[Z+8],20,1163531501),S=w(S,C,E,j,x[Z+13],5,-1444681467),j=w(j,S,C,E,x[Z+2],9,-51403784),E=w(E,j,S,C,x[Z+7],14,1735328473),C=w(C,E,j,S,x[Z+12],20,-1926607734),S=c(S,C,E,j,x[Z+5],4,-378558),j=c(j,S,C,E,x[Z+8],11,-2022574463),E=c(E,j,S,C,x[Z+11],16,1839030562),C=c(C,E,j,S,x[Z+14],23,-35309556),S=c(S,C,E,j,x[Z+1],4,-1530992060),j=c(j,S,C,E,x[Z+4],11,1272893353),E=c(E,j,S,C,x[Z+7],16,-155497632),C=c(C,E,j,S,x[Z+10],23,-1094730640),S=c(S,C,E,j,x[Z+13],4,681279174),j=c(j,S,C,E,x[Z+0],11,-358537222),E=c(E,j,S,C,x[Z+3],16,-722521979),C=c(C,E,j,S,x[Z+6],23,76029189),S=c(S,C,E,j,x[Z+9],4,-640364487),j=c(j,S,C,E,x[Z+12],11,-421815835),E=c(E,j,S,C,x[Z+15],16,530742520),C=c(C,E,j,S,x[Z+2],23,-995338651),S=m(S,C,E,j,x[Z+0],6,-198630844),j=m(j,S,C,E,x[Z+7],10,1126891415),E=m(E,j,S,C,x[Z+14],15,-1416354905),C=m(C,E,j,S,x[Z+5],21,-57434055),S=m(S,C,E,j,x[Z+12],6,1700485571),j=m(j,S,C,E,x[Z+3],10,-1894986606),E=m(E,j,S,C,x[Z+10],15,-1051523),C=m(C,E,j,S,x[Z+1],21,-2054922799),S=m(S,C,E,j,x[Z+8],6,1873313359),j=m(j,S,C,E,x[Z+15],10,-30611744),E=m(E,j,S,C,x[Z+6],15,-1560198380),C=m(C,E,j,S,x[Z+13],21,1309151649),S=m(S,C,E,j,x[Z+4],6,-145523070),j=m(j,S,C,E,x[Z+11],10,-1120210379),E=m(E,j,S,C,x[Z+2],15,718787259),C=m(C,E,j,S,x[Z+9],21,-343485551),S=v(S,P),C=v(C,Q),E=v(E,B),j=v(j,k)}return Array(S,C,E,j)}function y(x,T,S,C,E,j){return v(b(v(v(T,x),v(C,j)),E),S)}function g(x,T,S,C,E,j,Z){return y(T&S|~T&C,x,T,E,j,Z)}function w(x,T,S,C,E,j,Z){return y(T&C|S&~C,x,T,E,j,Z)}function c(x,T,S,C,E,j,Z){return y(T^S^C,x,T,E,j,Z)}function m(x,T,S,C,E,j,Z){return y(S^(T|~C),x,T,E,j,Z)}function v(x,T){var S=(x&65535)+(T&65535),C=(x>>16)+(T>>16)+(S>>16);return C<<16|S&65535}function b(x,T){return x<<T|x>>>32-T}M.exports=function(T){return p.hash(T,h,16)}},{"./helpers":462}],464:[function(o,M,R){"use strict";var p=o("./helpers");function f(c,m){c[m>>5]|=128<<24-m%32,c[(m+64>>9<<4)+15]=m;for(var v=Array(80),b=1732584193,x=-271733879,T=-1732584194,S=271733878,C=-1009589776,E=0;E<c.length;E+=16){for(var j=b,Z=x,P=T,Q=S,B=C,k=0;k<80;k++){k<16?v[k]=c[E+k]:v[k]=w(v[k-3]^v[k-8]^v[k-14]^v[k-16],1);var D=g(g(w(b,5),h(k,x,T,S)),g(g(C,v[k]),y(k)));C=S,S=T,T=w(x,30),x=b,b=D}b=g(b,j),x=g(x,Z),T=g(T,P),S=g(S,Q),C=g(C,B)}return Array(b,x,T,S,C)}function h(c,m,v,b){return c<20?m&v|~m&b:c<40?m^v^b:c<60?m&v|m&b|v&b:m^v^b}function y(c){return c<20?1518500249:c<40?1859775393:c<60?-1894007588:-899497514}function g(c,m){var v=(c&65535)+(m&65535),b=(c>>16)+(m>>16)+(v>>16);return b<<16|v&65535}function w(c,m){return c<<m|c>>>32-m}M.exports=function(m){return p.hash(m,f,20,!0)}},{"./helpers":462}],465:[function(o,M,R){"use strict";M.exports=function(){return function(){}}},{}],466:[function(o,M,R){(function(p){(function(){"use strict";var f=o("@babel/runtime/helpers/interopRequireDefault"),h=f(o("@babel/runtime/helpers/typeof")),y=o("stream"),g=y.Stream,w=o("../lib/common/utils/isArray"),c=w.isArray;M.exports.string=function(b){return typeof b=="string"},M.exports.array=c,M.exports.buffer=p.isBuffer;function m(v){return v instanceof g}M.exports.writableStream=function(b){return m(b)&&typeof b._write=="function"&&(0,h.default)(b._writableState)==="object"}}).call(this)}).call(this,{isBuffer:o("../node_modules/is-buffer/index.js")})},{"../lib/common/utils/isArray":63,"../node_modules/is-buffer/index.js":366,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,stream:398}],467:[function(o,M,R){"use strict";var p=o("immediate"),f=M.exports={};f.nextTick=p,f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={};function h(){}f.on=h,f.addListener=h,f.once=h,f.off=h,f.removeListener=h,f.removeAllListeners=h,f.emit=h,f.prependListener=h,f.prependOnceListener=h,f.listeners=function(y){return[]},f.binding=function(y){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(y){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},{immediate:358}],468:[function(o,M,R){(function(p){(function(){"use strict";o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.search.js");var f=o("./lib/request"),h=o("./lib/response"),y=o("xtend"),g=o("builtin-status-codes"),w=o("url"),c=R;c.request=function(m,v){typeof m=="string"?m=w.parse(m):m=y(m);var b=p.location.protocol.search(/^https?:$/)===-1?"http:":"",x=m.protocol||b,T=m.hostname||m.host,S=m.port,C=m.path||"/";T&&T.indexOf(":")!==-1&&(T="["+T+"]"),m.url=(T?x+"//"+T:"")+(S?":"+S:"")+C,m.method=(m.method||"GET").toUpperCase(),m.headers=m.headers||{};var E=new f(m);return v&&E.on("response",v),E},c.get=function(v,b){var x=c.request(v,b);return x.end(),x},c.ClientRequest=f,c.IncomingMessage=h.IncomingMessage,c.Agent=function(){},c.Agent.defaultMaxSockets=4,c.globalAgent=new c.Agent,c.STATUS_CODES=g,c.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this)}).call(this,typeof mt!="undefined"?mt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":470,"./lib/response":471,"builtin-status-codes":91,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.search.js":306,url:472,xtend:460}],469:[function(o,M,R){(function(p){(function(){"use strict";o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.promise.js"),o("core-js/modules/es.array-buffer.constructor.js"),o("core-js/modules/es.array-buffer.slice.js"),o("core-js/modules/es.array.slice.js"),R.fetch=c(p.fetch)&&c(p.ReadableStream),R.writableStream=c(p.WritableStream),R.abortController=c(p.AbortController),R.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),R.blobConstructor=!0}catch(m){}var f;function h(){if(f!==void 0)return f;if(p.XMLHttpRequest){f=new p.XMLHttpRequest;try{f.open("GET",p.XDomainRequest?"/":"https://example.com")}catch(m){f=null}}else f=null;return f}function y(m){var v=h();if(!v)return!1;try{return v.responseType=m,v.responseType===m}catch(b){}return!1}var g=typeof p.ArrayBuffer!="undefined",w=g&&c(p.ArrayBuffer.prototype.slice);R.arraybuffer=R.fetch||g&&y("arraybuffer"),R.msstream=!R.fetch&&w&&y("ms-stream"),R.mozchunkedarraybuffer=!R.fetch&&g&&y("moz-chunked-arraybuffer"),R.overrideMimeType=R.fetch||(h()?c(h().overrideMimeType):!1),R.vbArray=c(p.VBArray);function c(m){return typeof m=="function"}f=null}).call(this)}).call(this,typeof mt!="undefined"?mt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"core-js/modules/es.array-buffer.constructor.js":270,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295}],470:[function(o,M,R){(function(p,f,h){(function(){"use strict";o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.regexp.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js"),o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.array.map.js"),o("core-js/modules/es.function.name.js"),o("core-js/modules/es.promise.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.split.js");var y=o("./capability"),g=o("inherits"),w=o("./response"),c=o("readable-stream"),m=o("to-arraybuffer"),v=w.IncomingMessage,b=w.readyStates;function x(E,j){return y.fetch&&j?"fetch":y.mozchunkedarraybuffer?"moz-chunked-arraybuffer":y.msstream?"ms-stream":y.arraybuffer&&E?"arraybuffer":y.vbArray&&E?"text:vbarray":"text"}var T=M.exports=function(E){var j=this;c.Writable.call(j),j._opts=E,j._body=[],j._headers={},E.auth&&j.setHeader("Authorization","Basic "+new h(E.auth).toString("base64")),Object.keys(E.headers).forEach(function(Q){j.setHeader(Q,E.headers[Q])});var Z,P=!0;if(E.mode==="disable-fetch"||"requestTimeout"in E&&!y.abortController)P=!1,Z=!0;else if(E.mode==="prefer-streaming")Z=!1;else if(E.mode==="allow-wrong-content-type")Z=!y.overrideMimeType;else if(!E.mode||E.mode==="default"||E.mode==="prefer-fast")Z=!0;else throw new Error("Invalid value for opts.mode");j._mode=x(Z,P),j._fetchTimer=null,j.on("finish",function(){j._onFinish()})};g(T,c.Writable),T.prototype.setHeader=function(E,j){var Z=this,P=E.toLowerCase();C.indexOf(P)===-1&&(Z._headers[P]={name:E,value:j})},T.prototype.getHeader=function(E){var j=this._headers[E.toLowerCase()];return j?j.value:null},T.prototype.removeHeader=function(E){var j=this;delete j._headers[E.toLowerCase()]},T.prototype._onFinish=function(){var E=this;if(!E._destroyed){var j=E._opts,Z=E._headers,P=null;j.method!=="GET"&&j.method!=="HEAD"&&(y.arraybuffer?P=m(h.concat(E._body)):y.blobConstructor?P=new f.Blob(E._body.map(function(J){return m(J)}),{type:(Z["content-type"]||{}).value||""}):P=h.concat(E._body).toString());var Q=[];if(Object.keys(Z).forEach(function(J){var H=Z[J].name,N=Z[J].value;Array.isArray(N)?N.forEach(function(_){Q.push([H,_])}):Q.push([H,N])}),E._mode==="fetch"){var B=null,k=null;if(y.abortController){var D=new AbortController;B=D.signal,E._fetchAbortController=D,"requestTimeout"in j&&j.requestTimeout!==0&&(E._fetchTimer=f.setTimeout(function(){E.emit("requestTimeout"),E._fetchAbortController&&E._fetchAbortController.abort()},j.requestTimeout))}f.fetch(E._opts.url,{method:E._opts.method,headers:Q,body:P||void 0,mode:"cors",credentials:j.withCredentials?"include":"same-origin",signal:B}).then(function(J){E._fetchResponse=J,E._connect()},function(J){f.clearTimeout(E._fetchTimer),E._destroyed||E.emit("error",J)})}else{var F=E._xhr=new f.XMLHttpRequest;try{F.open(E._opts.method,E._opts.url,!0)}catch(J){p.nextTick(function(){E.emit("error",J)});return}"responseType"in F&&(F.responseType=E._mode.split(":")[0]),"withCredentials"in F&&(F.withCredentials=!!j.withCredentials),E._mode==="text"&&"overrideMimeType"in F&&F.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in j&&(F.timeout=j.requestTimeout,F.ontimeout=function(){E.emit("requestTimeout")}),Q.forEach(function(J){F.setRequestHeader(J[0],J[1])}),E._response=null,F.onreadystatechange=function(){switch(F.readyState){case b.LOADING:case b.DONE:E._onXHRProgress();break}},E._mode==="moz-chunked-arraybuffer"&&(F.onprogress=function(){E._onXHRProgress()}),F.onerror=function(){E._destroyed||E.emit("error",new Error("XHR error"))};try{F.send(P)}catch(J){p.nextTick(function(){E.emit("error",J)});return}}}};function S(E){try{var j=E.status;return j!==null&&j!==0}catch(Z){return!1}}T.prototype._onXHRProgress=function(){var E=this;!S(E._xhr)||E._destroyed||(E._response||E._connect(),E._response._onXHRProgress())},T.prototype._connect=function(){var E=this;E._destroyed||(E._response=new v(E._xhr,E._fetchResponse,E._mode,E._fetchTimer),E._response.on("error",function(j){E.emit("error",j)}),E.emit("response",E._response))},T.prototype._write=function(E,j,Z){var P=this;P._body.push(E),Z()},T.prototype.abort=T.prototype.destroy=function(){var E=this;E._destroyed=!0,f.clearTimeout(E._fetchTimer),E._response&&(E._response._destroyed=!0),E._xhr?E._xhr.abort():E._fetchAbortController&&E._fetchAbortController.abort()},T.prototype.end=function(E,j,Z){var P=this;typeof E=="function"&&(Z=E,E=void 0),c.Writable.prototype.end.call(P,E,j,Z)},T.prototype.flushHeaders=function(){},T.prototype.setTimeout=function(){},T.prototype.setNoDelay=function(){},T.prototype.setSocketKeepAlive=function(){};var C=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this)}).call(this,o("_process"),typeof mt!="undefined"?mt:typeof self!="undefined"?self:typeof window!="undefined"?window:{},o("buffer").Buffer)},{"./capability":469,"./response":471,_process:467,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.split.js":307,"core-js/modules/web.dom-collections.for-each.js":339,inherits:364,"readable-stream":394,"to-arraybuffer":415}],471:[function(o,M,R){(function(p,f,h){(function(){"use strict";o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.promise.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.split.js"),o("core-js/modules/es.string.match.js"),o("core-js/modules/es.array.iterator.js"),o("core-js/modules/es.array-buffer.slice.js"),o("core-js/modules/es.typed-array.uint8-array.js"),o("core-js/modules/es.typed-array.copy-within.js"),o("core-js/modules/es.typed-array.every.js"),o("core-js/modules/es.typed-array.fill.js"),o("core-js/modules/es.typed-array.filter.js"),o("core-js/modules/es.typed-array.find.js"),o("core-js/modules/es.typed-array.find-index.js"),o("core-js/modules/es.typed-array.for-each.js"),o("core-js/modules/es.typed-array.includes.js"),o("core-js/modules/es.typed-array.index-of.js"),o("core-js/modules/es.typed-array.iterator.js"),o("core-js/modules/es.typed-array.join.js"),o("core-js/modules/es.typed-array.last-index-of.js"),o("core-js/modules/es.typed-array.map.js"),o("core-js/modules/es.typed-array.reduce.js"),o("core-js/modules/es.typed-array.reduce-right.js"),o("core-js/modules/es.typed-array.reverse.js"),o("core-js/modules/es.typed-array.set.js"),o("core-js/modules/es.typed-array.slice.js"),o("core-js/modules/es.typed-array.some.js"),o("core-js/modules/es.typed-array.sort.js"),o("core-js/modules/es.typed-array.subarray.js"),o("core-js/modules/es.typed-array.to-locale-string.js"),o("core-js/modules/es.typed-array.to-string.js"),o("core-js/modules/es.array.slice.js");var y=o("./capability"),g=o("inherits"),w=o("readable-stream"),c=R.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},m=R.IncomingMessage=function(v,b,x,T){var S=this;if(w.Readable.call(S),S._mode=x,S.headers={},S.rawHeaders=[],S.trailers={},S.rawTrailers=[],S.on("end",function(){p.nextTick(function(){S.emit("close")})}),x==="fetch"){var C=function B(){j.read().then(function(k){if(!S._destroyed){if(k.done){f.clearTimeout(T),S.push(null);return}S.push(new h(k.value)),B()}}).catch(function(k){f.clearTimeout(T),S._destroyed||S.emit("error",k)})};if(S._fetchResponse=b,S.url=b.url,S.statusCode=b.status,S.statusMessage=b.statusText,b.headers.forEach(function(B,k){S.headers[k.toLowerCase()]=B,S.rawHeaders.push(k,B)}),y.writableStream){var E=new WritableStream({write:function(k){return new Promise(function(D,F){S._destroyed?F():S.push(new h(k))?D():S._resumeFetch=D})},close:function(){f.clearTimeout(T),S._destroyed||S.push(null)},abort:function(k){S._destroyed||S.emit("error",k)}});try{b.body.pipeTo(E).catch(function(B){f.clearTimeout(T),S._destroyed||S.emit("error",B)});return}catch(B){}}var j=b.body.getReader();C()}else{S._xhr=v,S._pos=0,S.url=v.responseURL,S.statusCode=v.status,S.statusMessage=v.statusText;var Z=v.getAllResponseHeaders().split(/\r?\n/);if(Z.forEach(function(B){var k=B.match(/^([^:]+):\s*(.*)/);if(k){var D=k[1].toLowerCase();D==="set-cookie"?(S.headers[D]===void 0&&(S.headers[D]=[]),S.headers[D].push(k[2])):S.headers[D]!==void 0?S.headers[D]+=", "+k[2]:S.headers[D]=k[2],S.rawHeaders.push(k[1],k[2])}}),S._charset="x-user-defined",!y.overrideMimeType){var P=S.rawHeaders["mime-type"];if(P){var Q=P.match(/;\s*charset=([^;])(;|$)/);Q&&(S._charset=Q[1].toLowerCase())}S._charset||(S._charset="utf-8")}}};g(m,w.Readable),m.prototype._read=function(){var v=this,b=v._resumeFetch;b&&(v._resumeFetch=null,b())},m.prototype._onXHRProgress=function(){var v=this,b=v._xhr,x=null;switch(v._mode){case"text:vbarray":if(b.readyState!==c.DONE)break;try{x=new f.VBArray(b.responseBody).toArray()}catch(j){}if(x!==null){v.push(new h(x));break}case"text":try{x=b.responseText}catch(j){v._mode="text:vbarray";break}if(x.length>v._pos){var T=x.substr(v._pos);if(v._charset==="x-user-defined"){for(var S=new h(T.length),C=0;C<T.length;C++)S[C]=T.charCodeAt(C)&255;v.push(S)}else v.push(T,v._charset);v._pos=x.length}break;case"arraybuffer":if(b.readyState!==c.DONE||!b.response)break;x=b.response,v.push(new h(new Uint8Array(x)));break;case"moz-chunked-arraybuffer":if(x=b.response,b.readyState!==c.LOADING||!x)break;v.push(new h(new Uint8Array(x)));break;case"ms-stream":if(x=b.response,b.readyState!==c.LOADING)break;var E=new f.MSStreamReader;E.onprogress=function(){E.result.byteLength>v._pos&&(v.push(new h(new Uint8Array(E.result.slice(v._pos)))),v._pos=E.result.byteLength)},E.onload=function(){v.push(null)},E.readAsArrayBuffer(x);break}v._xhr.readyState===c.DONE&&v._mode!=="ms-stream"&&v.push(null)}}).call(this)}).call(this,o("_process"),typeof mt!="undefined"?mt:typeof self!="undefined"?self:typeof window!="undefined"?window:{},o("buffer").Buffer)},{"./capability":469,_process:467,buffer:90,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.match.js":304,"core-js/modules/es.string.split.js":307,"core-js/modules/es.typed-array.copy-within.js":315,"core-js/modules/es.typed-array.every.js":316,"core-js/modules/es.typed-array.fill.js":317,"core-js/modules/es.typed-array.filter.js":318,"core-js/modules/es.typed-array.find-index.js":319,"core-js/modules/es.typed-array.find.js":320,"core-js/modules/es.typed-array.for-each.js":321,"core-js/modules/es.typed-array.includes.js":322,"core-js/modules/es.typed-array.index-of.js":323,"core-js/modules/es.typed-array.iterator.js":324,"core-js/modules/es.typed-array.join.js":325,"core-js/modules/es.typed-array.last-index-of.js":326,"core-js/modules/es.typed-array.map.js":327,"core-js/modules/es.typed-array.reduce-right.js":328,"core-js/modules/es.typed-array.reduce.js":329,"core-js/modules/es.typed-array.reverse.js":330,"core-js/modules/es.typed-array.set.js":331,"core-js/modules/es.typed-array.slice.js":332,"core-js/modules/es.typed-array.some.js":333,"core-js/modules/es.typed-array.sort.js":334,"core-js/modules/es.typed-array.subarray.js":335,"core-js/modules/es.typed-array.to-locale-string.js":336,"core-js/modules/es.typed-array.to-string.js":337,"core-js/modules/es.typed-array.uint8-array.js":338,"core-js/modules/web.dom-collections.for-each.js":339,inherits:364,"readable-stream":394}],472:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/helpers/typeof"));o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.search.js"),o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.string.split.js"),o("core-js/modules/es.string.replace.js"),o("core-js/modules/es.array.join.js"),o("core-js/modules/es.string.trim.js"),o("core-js/modules/es.string.match.js"),o("core-js/modules/es.array.slice.js"),o("core-js/modules/es.object.keys.js"),o("core-js/modules/es.array.splice.js");var h=o("punycode"),y=o("./util");R.parse=k,R.resolve=F,R.resolveObject=J,R.format=D,R.Url=g;function g(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var w=/^([a-z0-9.+-]+:)/i,c=/:[0-9]*$/,m=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,v=["<",">",'"',"`"," ","\r",`
`," "],b=["{","}","|","\\","^","`"].concat(v),x=["'"].concat(b),T=["%","/","?",";","#"].concat(x),S=["/","?","#"],C=255,E=/^[+a-z0-9A-Z_-]{0,63}$/,j=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Z={javascript:!0,"javascript:":!0},P={javascript:!0,"javascript:":!0},Q={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},B=o("querystring");function k(H,N,_){if(H&&y.isObject(H)&&H instanceof g)return H;var X=new g;return X.parse(H,N,_),X}g.prototype.parse=function(H,N,_){if(!y.isString(H))throw new TypeError("Parameter 'url' must be a string, not "+(0,f.default)(H));var X=H.indexOf("?"),ee=X!==-1&&X<H.indexOf("#")?"?":"#",ie=H.split(ee),he=/\\/g;ie[0]=ie[0].replace(he,"/"),H=ie.join(ee);var ne=H;if(ne=ne.trim(),!_&&H.split("#").length===1){var Ie=m.exec(ne);if(Ie)return this.path=ne,this.href=ne,this.pathname=Ie[1],Ie[2]?(this.search=Ie[2],N?this.query=B.parse(this.search.substr(1)):this.query=this.search.substr(1)):N&&(this.search="",this.query={}),this}var q=w.exec(ne);if(q){q=q[0];var pe=q.toLowerCase();this.protocol=pe,ne=ne.substr(q.length)}if(_||q||ne.match(/^\/\/[^@\/]+@[^@\/]+/)){var ve=ne.substr(0,2)==="//";ve&&!(q&&P[q])&&(ne=ne.substr(2),this.slashes=!0)}if(!P[q]&&(ve||q&&!Q[q])){for(var xe=-1,ce=0;ce<S.length;ce++){var fe=ne.indexOf(S[ce]);fe!==-1&&(xe===-1||fe<xe)&&(xe=fe)}var ge,Se;xe===-1?Se=ne.lastIndexOf("@"):Se=ne.lastIndexOf("@",xe),Se!==-1&&(ge=ne.slice(0,Se),ne=ne.slice(Se+1),this.auth=decodeURIComponent(ge)),xe=-1;for(var ce=0;ce<T.length;ce++){var fe=ne.indexOf(T[ce]);fe!==-1&&(xe===-1||fe<xe)&&(xe=fe)}xe===-1&&(xe=ne.length),this.host=ne.slice(0,xe),ne=ne.slice(xe),this.parseHost(),this.hostname=this.hostname||"";var De=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!De)for(var ke=this.hostname.split("."),ce=0,de=ke.length;ce<de;ce++){var Y=ke[ce];if(Y&&!Y.match(E)){for(var ye="",V=0,G=Y.length;V<G;V++)Y.charCodeAt(V)>127?ye+="x":ye+=Y[V];if(!ye.match(E)){var W=ke.slice(0,ce),K=ke.slice(ce+1),te=Y.match(j);te&&(W.push(te[1]),K.unshift(te[2])),K.length&&(ne="/"+K.join(".")+ne),this.hostname=W.join(".");break}}}this.hostname.length>C?this.hostname="":this.hostname=this.hostname.toLowerCase(),De||(this.hostname=h.toASCII(this.hostname));var U=this.port?":"+this.port:"",L=this.hostname||"";this.host=L+U,this.href+=this.host,De&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),ne[0]!=="/"&&(ne="/"+ne))}if(!Z[pe])for(var ce=0,de=x.length;ce<de;ce++){var $=x[ce];if(ne.indexOf($)!==-1){var ue=encodeURIComponent($);ue===$&&(ue=escape($)),ne=ne.split($).join(ue)}}var Ee=ne.indexOf("#");Ee!==-1&&(this.hash=ne.substr(Ee),ne=ne.slice(0,Ee));var ze=ne.indexOf("?");if(ze!==-1?(this.search=ne.substr(ze),this.query=ne.substr(ze+1),N&&(this.query=B.parse(this.query)),ne=ne.slice(0,ze)):N&&(this.search="",this.query={}),ne&&(this.pathname=ne),Q[pe]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var U=this.pathname||"",_e=this.search||"";this.path=U+_e}return this.href=this.format(),this};function D(H){return y.isString(H)&&(H=k(H)),H instanceof g?H.format():g.prototype.format.call(H)}g.prototype.format=function(){var H=this.auth||"";H&&(H=encodeURIComponent(H),H=H.replace(/%3A/i,":"),H+="@");var N=this.protocol||"",_=this.pathname||"",X=this.hash||"",ee=!1,ie="";this.host?ee=H+this.host:this.hostname&&(ee=H+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(ee+=":"+this.port)),this.query&&y.isObject(this.query)&&Object.keys(this.query).length&&(ie=B.stringify(this.query));var he=this.search||ie&&"?"+ie||"";return N&&N.substr(-1)!==":"&&(N+=":"),this.slashes||(!N||Q[N])&&ee!==!1?(ee="//"+(ee||""),_&&_.charAt(0)!=="/"&&(_="/"+_)):ee||(ee=""),X&&X.charAt(0)!=="#"&&(X="#"+X),he&&he.charAt(0)!=="?"&&(he="?"+he),_=_.replace(/[?#]/g,function(ne){return encodeURIComponent(ne)}),he=he.replace("#","%23"),N+ee+_+he+X};function F(H,N){return k(H,!1,!0).resolve(N)}g.prototype.resolve=function(H){return this.resolveObject(k(H,!1,!0)).format()};function J(H,N){return H?k(H,!1,!0).resolveObject(N):N}g.prototype.resolveObject=function(H){if(y.isString(H)){var N=new g;N.parse(H,!1,!0),H=N}for(var _=new g,X=Object.keys(this),ee=0;ee<X.length;ee++){var ie=X[ee];_[ie]=this[ie]}if(_.hash=H.hash,H.href==="")return _.href=_.format(),_;if(H.slashes&&!H.protocol){for(var he=Object.keys(H),ne=0;ne<he.length;ne++){var Ie=he[ne];Ie!=="protocol"&&(_[Ie]=H[Ie])}return Q[_.protocol]&&_.hostname&&!_.pathname&&(_.path=_.pathname="/"),_.href=_.format(),_}if(H.protocol&&H.protocol!==_.protocol){if(!Q[H.protocol]){for(var q=Object.keys(H),pe=0;pe<q.length;pe++){var ve=q[pe];_[ve]=H[ve]}return _.href=_.format(),_}if(_.protocol=H.protocol,!H.host&&!P[H.protocol]){for(var de=(H.pathname||"").split("/");de.length&&!(H.host=de.shift()););H.host||(H.host=""),H.hostname||(H.hostname=""),de[0]!==""&&de.unshift(""),de.length<2&&de.unshift(""),_.pathname=de.join("/")}else _.pathname=H.pathname;if(_.search=H.search,_.query=H.query,_.host=H.host||"",_.auth=H.auth,_.hostname=H.hostname||H.host,_.port=H.port,_.pathname||_.search){var xe=_.pathname||"",ce=_.search||"";_.path=xe+ce}return _.slashes=_.slashes||H.slashes,_.href=_.format(),_}var fe=_.pathname&&_.pathname.charAt(0)==="/",ge=H.host||H.pathname&&H.pathname.charAt(0)==="/",Se=ge||fe||_.host&&H.pathname,De=Se,ke=_.pathname&&_.pathname.split("/")||[],de=H.pathname&&H.pathname.split("/")||[],Y=_.protocol&&!Q[_.protocol];if(Y&&(_.hostname="",_.port=null,_.host&&(ke[0]===""?ke[0]=_.host:ke.unshift(_.host)),_.host="",H.protocol&&(H.hostname=null,H.port=null,H.host&&(de[0]===""?de[0]=H.host:de.unshift(H.host)),H.host=null),Se=Se&&(de[0]===""||ke[0]==="")),ge)_.host=H.host||H.host===""?H.host:_.host,_.hostname=H.hostname||H.hostname===""?H.hostname:_.hostname,_.search=H.search,_.query=H.query,ke=de;else if(de.length)ke||(ke=[]),ke.pop(),ke=ke.concat(de),_.search=H.search,_.query=H.query;else if(!y.isNullOrUndefined(H.search)){if(Y){_.hostname=_.host=ke.shift();var ye=_.host&&_.host.indexOf("@")>0?_.host.split("@"):!1;ye&&(_.auth=ye.shift(),_.host=_.hostname=ye.shift())}return _.search=H.search,_.query=H.query,(!y.isNull(_.pathname)||!y.isNull(_.search))&&(_.path=(_.pathname?_.pathname:"")+(_.search?_.search:"")),_.href=_.format(),_}if(!ke.length)return _.pathname=null,_.search?_.path="/"+_.search:_.path=null,_.href=_.format(),_;for(var V=ke.slice(-1)[0],G=(_.host||H.host||ke.length>1)&&(V==="."||V==="..")||V==="",W=0,K=ke.length;K>=0;K--)V=ke[K],V==="."?ke.splice(K,1):V===".."?(ke.splice(K,1),W++):W&&(ke.splice(K,1),W--);if(!Se&&!De)for(;W--;W)ke.unshift("..");Se&&ke[0]!==""&&(!ke[0]||ke[0].charAt(0)!=="/")&&ke.unshift(""),G&&ke.join("/").substr(-1)!=="/"&&ke.push("");var te=ke[0]===""||ke[0]&&ke[0].charAt(0)==="/";if(Y){_.hostname=_.host=te?"":ke.length?ke.shift():"";var ye=_.host&&_.host.indexOf("@")>0?_.host.split("@"):!1;ye&&(_.auth=ye.shift(),_.host=_.hostname=ye.shift())}return Se=Se||_.host&&ke.length,Se&&!te&&ke.unshift(""),ke.length?_.pathname=ke.join("/"):(_.pathname=null,_.path=null),(!y.isNull(_.pathname)||!y.isNull(_.search))&&(_.path=(_.pathname?_.pathname:"")+(_.search?_.search:"")),_.auth=H.auth||_.auth,_.slashes=_.slashes||H.slashes,_.href=_.format(),_},g.prototype.parseHost=function(){var H=this.host,N=c.exec(H);N&&(N=N[0],N!==":"&&(this.port=N.substr(1)),H=H.substr(0,H.length-N.length)),H&&(this.hostname=H)}},{"./util":473,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.array.splice.js":283,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.match.js":304,"core-js/modules/es.string.replace.js":305,"core-js/modules/es.string.search.js":306,"core-js/modules/es.string.split.js":307,"core-js/modules/es.string.trim.js":308,punycode:382,querystring:385}],473:[function(o,M,R){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/helpers/typeof"));M.exports={isString:function(y){return typeof y=="string"},isObject:function(y){return(0,f.default)(y)==="object"&&y!==null},isNull:function(y){return y===null},isNullOrUndefined:function(y){return y==null}}},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79}],474:[function(o,M,R){"use strict";o("core-js/modules/es.number.constructor.js"),R.encodeURIComponent=function(p){try{return encodeURIComponent(p)}catch(f){return p}},R.escape=o("escape-html"),R.timestamp=function(f){if(f){var h=f;return typeof h=="string"&&(h=Number(h)),String(f).length===10&&(h*=1e3),new Date(h)}return Math.round(Date.now()/1e3)}},{"core-js/modules/es.number.constructor.js":286,"escape-html":343}],475:[function(o,M,R){(function(p,f){(function(){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),y=h(o("@babel/runtime/helpers/typeof"));o("core-js/modules/es.string.trim.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.split.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.promise.js"),o("core-js/modules/es.function.name.js"),o("core-js/modules/es.array.concat.js");var g=o("util"),w=o("url"),c=o("http"),m=o("https"),v=o("debug")("urllib"),b=o("humanize-ms"),x=0,T=Math.pow(2,31)-10,S=/^https?:\/\//i;function C(P,Q){return P===void 0?Q:P}function E(P){return P?P.split(";")[0].trim().toLowerCase():""}function j(P,Q){return function(B,k,D){if(B)return Q(B);P({data:k,status:D.statusCode,headers:D.headers,res:D})}}R.TIMEOUTS=[b("300s"),b("300s")];var Z=["json","text"];R.request=function(Q,B,k){return arguments.length===2&&typeof B=="function"&&(k=B,B=null),typeof k=="function"?R.requestWithCallback(Q,B,k):new Promise(function(D,F){R.requestWithCallback(Q,B,j(D,F))})},R.requestWithCallback=function(Q,B,k){if(!Q||typeof Q!="string"&&(0,y.default)(Q)!=="object"){var D=g.format("expect request url to be a string or a http request options, but got %j",Q);throw new Error(D)}arguments.length===2&&typeof B=="function"&&(k=B,B=null),B=B||{},x>=T&&(x=0);var F=++x;B.requestUrls=B.requestUrls||[];var J={requestId:F,url:Q,args:B,ctx:B.ctx};B.emitter&&B.emitter.emit("request",J),B.timeout=B.timeout||R.TIMEOUTS,B.maxRedirects=B.maxRedirects||10,B.streaming=B.streaming||B.customResponse;var H=Date.now(),N;typeof Q=="string"?(S.test(Q)||(Q="https://"+Q),N=w.parse(Q)):N=Q;var _=(B.type||B.method||N.method||"GET").toUpperCase(),X=N.port||80,ee=c,ie=C(B.agent,R.agent),he=B.fixJSONCtlChars;N.protocol==="https:"&&(ee=m,ie=C(B.httpsAgent,R.httpsAgent),N.port||(X=443));var ne={host:N.hostname||N.host||"localhost",path:N.path||"/",method:_,port:X,agent:ie,headers:B.headers||{},lookup:B.lookup};Array.isArray(B.timeout)?ne.requestTimeout=B.timeout[B.timeout.length-1]:typeof B.timeout!="undefined"&&(ne.requestTimeout=B.timeout);var Ie=B.auth||N.auth;Ie&&(ne.auth=Ie);var q=B.content||B.data,pe=_==="GET"||_==="HEAD"||B.dataAsQueryString;if(!B.content&&q&&!(typeof q=="string"||f.isBuffer(q)))if(pe)q=B.nestedQuerystring?qs.stringify(q):querystring.stringify(q);else{var ve=ne.headers["Content-Type"]||ne.headers["content-type"];ve||(B.contentType==="json"?ve="application/json":ve="application/x-www-form-urlencoded",ne.headers["Content-Type"]=ve),E(ve)==="application/json"?q=JSON.stringify(q):q=B.nestedQuerystring?qs.stringify(q):querystring.stringify(q)}pe&&q&&(ne.path+=(N.query?"&":"?")+q,q=null);var xe=0;if(q){var ce=q.length;f.isBuffer(q)||(ce=f.byteLength(q)),xe=ne.headers["Content-Length"]=ce}B.dataType==="json"&&(ne.headers.Accept="application/json"),typeof B.beforeRequest=="function"&&B.beforeRequest(ne);var fe=null,ge=null,Se=null,De=!1,ke=!1,de=0,Y=-1,ye=!1,V="",G="",W=null;B.timing&&(W={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function K(){fe&&(clearTimeout(fe),fe=null)}function te(){ge&&(clearTimeout(ge),ge=null)}function U(Be,Je,$e){if(te(),!k){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),F,p.pid,ne.method,Q),Be&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
stack: %s`,Date(),F,p.pid,Be.name,Be.message,Be.stack);return}var rt=k;k=null;var qe={};$e&&(Y=$e.statusCode,qe=$e.headers);var pt=Date.now()-H;W&&(W.contentDownload=pt),v("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",pt,de,Y,ne.method,ne.host,ne.path,ke,W);var Pe={status:Y,statusCode:Y,headers:qe,size:de,aborted:ye,rt:pt,keepAliveSocket:ke,data:Je,requestUrls:B.requestUrls,timing:W,remoteAddress:V,remotePort:G};if(Be){var Qe="";ie&&typeof ie.getCurrentStatus=="function"&&(Qe=", agent status: "+JSON.stringify(ie.getCurrentStatus())),Be.message+=", "+ne.method+" "+Q+" "+Y+" (connected: "+De+", keepalive socket: "+ke+Qe+`)
headers: `+JSON.stringify(qe),Be.data=Je,Be.path=ne.path,Be.status=Y,Be.headers=qe,Be.res=Pe}rt(Be,Je,B.streaming?$e:Pe),B.emitter&&(J.url=Q,J.socket=Me&&Me.connection,J.options=ne,J.size=xe,B.emitter.emit("response",{requestId:F,error:Be,ctx:B.ctx,req:J,res:Pe}))}function L(Be){var Je=null;if(B.followRedirect&&statuses.redirect[Be.statusCode]){B._followRedirectCount=(B._followRedirectCount||0)+1;var $e=Be.headers.location;if(!$e)Je=new Error("Got statusCode "+Be.statusCode+" but cannot resolve next location from headers"),Je.name="FollowRedirectError";else if(B._followRedirectCount>B.maxRedirects)Je=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+Q),Je.name="MaxRedirectError";else{var rt=B.formatRedirectUrl?B.formatRedirectUrl(Q,$e):w.resolve(Q,$e);v("Request#%d %s: `redirected` from %s to %s",F,ne.path,Q,rt),te(),B.headers&&B.headers.Host&&S.test($e)&&(B.headers.Host=null);var qe=k;return k=null,R.requestWithCallback(rt,B,qe),{redirect:!0,error:null}}}return{redirect:!1,error:Je}}B.gzip&&!ne.headers["Accept-Encoding"]&&!ne.headers["accept-encoding"]&&(ne.headers["Accept-Encoding"]="gzip");function $(Be,Je,$e){var rt=Be.headers["content-encoding"];return $e(null,Je,rt)}var ue=B.writeStream;v("Request#%d %s %s with headers %j, options.path: %s",F,_,Q,ne.headers,ne.path),B.requestUrls.push(Q);function Ee(Be){if(W&&(W.waiting=Date.now()-H),v("Request#%d %s `req response` event emit: status %d, headers: %j",F,Q,Be.statusCode,Be.headers),B.streaming){var Je=L(Be);if(Je.redirect){Be.resume();return}return Je.error?(Be.resume(),U(Je.error,null,Be)):U(null,null,Be)}if(Be.on("close",function(){v("Request#%d %s: `res close` event emit, total size %d",F,Q,de)}),Be.on("error",function(){v("Request#%d %s: `res error` event emit, total size %d",F,Q,de)}),Be.on("aborted",function(){ye=!0,v("Request#%d %s: `res aborted` event emit, total size %d",F,Q,de)}),ue){var $e=L(Be);if($e.redirect){Be.resume();return}return $e.error?(Be.resume(),ue.end(),U($e.error,null,Be)):(B.consumeWriteStream===!1?Be.on("end",U.bind(null,null,null,Be)):ue.on("close",function(){v("Request#%d %s: writeStream close event emitted",F,Q),U(Se||null,null,Be)}),Be.pipe(ue))}var rt=[];Be.on("data",function(qe){v("Request#%d %s: `res data` event emit, size %d",F,Q,qe.length),de+=qe.length,rt.push(qe)}),Be.on("end",function(){var qe=f.concat(rt,de);if(v("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",F,Q,de,Be._dumped),Se)return U(Se,qe,Be);var pt=L(Be);if(pt.error)return U(pt.error,qe,Be);pt.redirect||$(Be,qe,function(Pe,Qe,nt){if(Pe)return U(Pe,qe,Be);if(!nt&&Z.indexOf(B.dataType)>=0){try{Qe=decodeBodyByCharset(Qe,Be)}catch(St){return v("decodeBodyByCharset error: %s",St),U(null,Qe,Be)}if(B.dataType==="json")if(de===0)Qe=null;else{var yt=parseJSON(Qe,he);yt.error?Pe=yt.error:Qe=yt.data}}ye&&v("Request#%d %s: Remote socket was terminated before `response.end()` was called",F,Q),U(Pe,Qe,Be)})})}var ze,_e;Array.isArray(B.timeout)?(ze=b(B.timeout[0]),_e=b(B.timeout[1])):ze=_e=b(B.timeout),v("ConnectTimeout: %d, ResponseTimeout: %d",ze,_e);function le(){v("Connect timer ticking, timeout: %d",ze),fe=setTimeout(function(){fe=null,Y===-1&&(Y=-2);var Be="Connect timeout for "+ze+"ms",Je="ConnectionTimeoutError";Me.socket||(Je="SocketAssignTimeoutError",Be+=", working sockets is full"),Se=new Error(Be),Se.name=Je,Se.requestId=F,v("ConnectTimeout: Request#%d %s %s: %s, connected: %s",F,Q,Se.name,Be,De),He()},ze)}function Re(){v("Response timer ticking, timeout: %d",_e),ge=setTimeout(function(){ge=null;var Be="Response timeout for "+_e+"ms",Je="ResponseTimeoutError";Se=new Error(Be),Se.name=Je,Se.requestId=F,v("ResponseTimeout: Request#%d %s %s: %s, connected: %s",F,Q,Se.name,Be,De),He()},_e)}var Me;ne.mode=B.mode?B.mode:"";try{Me=ee.request(ne,Ee)}catch(Be){return U(Be)}typeof window=="undefined"?le():Me.on("requestTimeout",function(){Y===-1&&(Y=-2);var Be="Connect timeout for "+ze+"ms",Je="ConnectionTimeoutError";Se=new Error(Be),Se.name=Je,Se.requestId=F,He()});function He(){v("Request#%d %s abort, connected: %s",F,Q,De),Me.socket||(Se.noSocket=!0,U(Se)),Me.abort()}return W&&Me.on("finish",function(){W.requestSent=Date.now()-H}),Me.once("socket",function(Be){W&&(W.queuing=Date.now()-H);var Je=Be.readyState;if(Je==="opening"){Be.once("lookup",function($e,rt,qe){v("Request#%d %s lookup: %s, %s, %s",F,Q,$e,rt,qe),W&&(W.dnslookup=Date.now()-H),rt&&(V=rt)}),Be.once("connect",function(){W&&(W.connected=Date.now()-H),K(),Re(),v("Request#%d %s new socket connected",F,Q),De=!0,V||(V=Be.remoteAddress),G=Be.remotePort});return}v("Request#%d %s reuse socket connected, readyState: %s",F,Q,Je),De=!0,ke=!0,V||(V=Be.remoteAddress),G=Be.remotePort,K(),Re()}),Me.on("error",function(Be){(Be.name==="Error"||Be.name==="TypeError")&&(Be.name=De?"ResponseError":"RequestError"),Be.message+=' (req "error")',v("Request#%d %s `req error` event emit, %s: %s",F,Q,Be.name,Be.message),U(Se||Be)}),ue&&ue.once("error",function(Be){Be.message+=' (writeStream "error")',Se=Be,v("Request#%d %s `writeStream error` event emit, %s: %s",F,Q,Be.name,Be.message),He()}),B.stream?(B.stream.pipe(Me),B.stream.once("error",function(Be){Be.message+=' (stream "error")',Se=Be,v("Request#%d %s `readStream error` event emit, %s: %s",F,Q,Be.name,Be.message),He()})):Me.end(q),Me.requestId=F,Me}}).call(this)}).call(this,o("_process"),o("buffer").Buffer)},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,_process:467,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.split.js":307,"core-js/modules/es.string.trim.js":308,debug:465,http:468,https:355,"humanize-ms":356,url:472,util:419}]},{},[1])(1)})})(window)},29509:function(or,mt,Te){"use strict";Te.d(mt,{o2:function(){return R},yT:function(){return p}});var we=Te(77654),st=Te(34998);const o=st.i.map(f=>`${f}-inverse`),M=["success","processing","error","default","warning"];function R(f){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[].concat((0,we.Z)(o),(0,we.Z)(st.i)).includes(f):st.i.includes(f)}function p(f){return M.includes(f)}},52838:function(or,mt,Te){"use strict";Te.d(mt,{Z:function(){return p}});var we=Te(37645);function st(f,h,y,g){if(g===!1)return{adjustX:!1,adjustY:!1};const w=g&&typeof g=="object"?g:{},c={};switch(f){case"top":case"bottom":c.shiftX=h.arrowOffsetHorizontal*2+y,c.shiftY=!0,c.adjustY=!0;break;case"left":case"right":c.shiftY=h.arrowOffsetVertical*2+y,c.shiftX=!0,c.adjustX=!0;break}const m=Object.assign(Object.assign({},c),w);return m.shiftX||(m.adjustX=!0),m.shiftY||(m.adjustY=!0),m}const o={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},M={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},R=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function p(f){const{arrowWidth:h,autoAdjustOverflow:y,arrowPointAtCenter:g,offset:w,borderRadius:c,visibleFirst:m}=f,v=h/2,b={};return Object.keys(o).forEach(x=>{const T=g&&M[x]||o[x],S=Object.assign(Object.assign({},T),{offset:[0,0],dynamicInset:!0});switch(b[x]=S,R.has(x)&&(S.autoArrow=!1),x){case"top":case"topLeft":case"topRight":S.offset[1]=-v-w;break;case"bottom":case"bottomLeft":case"bottomRight":S.offset[1]=v+w;break;case"left":case"leftTop":case"leftBottom":S.offset[0]=-v-w;break;case"right":case"rightTop":case"rightBottom":S.offset[0]=v+w;break}const C=(0,we.wZ)({contentRadius:c,limitVerticalRadius:!0});if(g)switch(x){case"topLeft":case"bottomLeft":S.offset[0]=-C.arrowOffsetHorizontal-v;break;case"topRight":case"bottomRight":S.offset[0]=C.arrowOffsetHorizontal+v;break;case"leftTop":case"rightTop":S.offset[1]=-C.arrowOffsetHorizontal*2+v;break;case"leftBottom":case"rightBottom":S.offset[1]=C.arrowOffsetHorizontal*2-v;break}S.overflow=st(x,C,h,y),m&&(S.htmlRegion="visibleFirst")}),b}},89787:function(or,mt,Te){"use strict";Te.d(mt,{Z:function(){return pt}});var we=Te(59301),st=Te(17835),o=Te(29679),M=Te(40001),R=Te(19248),p=Te(99267),f=Te(92310),h=Te.n(f),y=Te(2738),g=Te(48755),w=Te(60499),c=Te(85899),m=Te(42244),v={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},b=function(){var Qe=(0,we.useRef)([]),nt=(0,we.useRef)(null);return(0,we.useEffect)(function(){var yt=Date.now(),St=!1;Qe.current.forEach(function(Lt){if(Lt){St=!0;var jt=Lt.style;jt.transitionDuration=".3s, .3s, .3s, .06s",nt.current&&yt-nt.current<100&&(jt.transitionDuration="0s, 0s")}}),St&&(nt.current=Date.now())}),Qe.current},x=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],T=function(Qe){var nt=(0,c.Z)((0,c.Z)({},v),Qe),yt=nt.className,St=nt.percent,Lt=nt.prefixCls,jt=nt.strokeColor,Dt=nt.strokeLinecap,Ct=nt.strokeWidth,Mt=nt.style,Bt=nt.trailColor,Ut=nt.trailWidth,Nt=nt.transition,tr=(0,m.Z)(nt,x);delete tr.gapPosition;var Zt=Array.isArray(St)?St:[St],zt=Array.isArray(jt)?jt:[jt],Xe=b(),Kt=Ct/2,Ft=100-Ct/2,kr="M ".concat(Dt==="round"?Kt:0,",").concat(Kt,`
L `).concat(Dt==="round"?Ft:100,",").concat(Kt),hr="0 0 100 ".concat(Ct),vr=0;return we.createElement("svg",(0,w.Z)({className:h()("".concat(Lt,"-line"),yt),viewBox:hr,preserveAspectRatio:"none",style:Mt},tr),we.createElement("path",{className:"".concat(Lt,"-line-trail"),d:kr,strokeLinecap:Dt,stroke:Bt,strokeWidth:Ut||Ct,fillOpacity:"0"}),Zt.map(function($t,Xt){var sr=1;switch(Dt){case"round":sr=1-Ct/100;break;case"square":sr=1-Ct/2/100;break;default:sr=1;break}var Nr={strokeDasharray:"".concat($t*sr,"px, 100px"),strokeDashoffset:"-".concat(vr,"px"),transition:Nt||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Tt=zt[Xt]||zt[zt.length-1];return vr+=$t,we.createElement("path",{key:Xt,className:"".concat(Lt,"-line-path"),d:kr,strokeLinecap:Dt,stroke:Tt,strokeWidth:Ct,fillOpacity:"0",ref:function(Jt){Xe[Xt]=Jt},style:Nr})}))},S=T,C=Te(43749),E=Te(72190),j=Te(47273),Z=0,P=(0,j.Z)();function Q(){var Pe;return P?(Pe=Z,Z+=1):Pe="TEST_OR_SSR",Pe}var B=function(Pe){var Qe=we.useState(),nt=(0,E.Z)(Qe,2),yt=nt[0],St=nt[1];return we.useEffect(function(){St("rc_progress_".concat(Q()))},[]),Pe||yt},k=function(Qe){var nt=Qe.bg,yt=Qe.children;return we.createElement("div",{style:{width:"100%",height:"100%",background:nt}},yt)};function D(Pe,Qe){return Object.keys(Pe).map(function(nt){var yt=parseFloat(nt),St="".concat(Math.floor(yt*Qe),"%");return"".concat(Pe[nt]," ").concat(St)})}var F=we.forwardRef(function(Pe,Qe){var nt=Pe.prefixCls,yt=Pe.color,St=Pe.gradientId,Lt=Pe.radius,jt=Pe.style,Dt=Pe.ptg,Ct=Pe.strokeLinecap,Mt=Pe.strokeWidth,Bt=Pe.size,Ut=Pe.gapDegree,Nt=yt&&(0,C.Z)(yt)==="object",tr=Nt?"#FFF":void 0,Zt=Bt/2,zt=we.createElement("circle",{className:"".concat(nt,"-circle-path"),r:Lt,cx:Zt,cy:Zt,stroke:tr,strokeLinecap:Ct,strokeWidth:Mt,opacity:Dt===0?0:1,style:jt,ref:Qe});if(!Nt)return zt;var Xe="".concat(St,"-conic"),Kt=Ut?"".concat(180+Ut/2,"deg"):"0deg",Ft=D(yt,(360-Ut)/360),kr=D(yt,1),hr="conic-gradient(from ".concat(Kt,", ").concat(Ft.join(", "),")"),vr="linear-gradient(to ".concat(Ut?"bottom":"top",", ").concat(kr.join(", "),")");return we.createElement(we.Fragment,null,we.createElement("mask",{id:Xe},zt),we.createElement("foreignObject",{x:0,y:0,width:Bt,height:Bt,mask:"url(#".concat(Xe,")")},we.createElement(k,{bg:vr},we.createElement(k,{bg:hr}))))}),J=F,H=100,N=function(Qe,nt,yt,St,Lt,jt,Dt,Ct,Mt,Bt){var Ut=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,Nt=yt/100*360*((360-jt)/360),tr=jt===0?0:{bottom:0,top:180,left:90,right:-90}[Dt],Zt=(100-St)/100*nt;Mt==="round"&&St!==100&&(Zt+=Bt/2,Zt>=nt&&(Zt=nt-.01));var zt=H/2;return{stroke:typeof Ct=="string"?Ct:void 0,strokeDasharray:"".concat(nt,"px ").concat(Qe),strokeDashoffset:Zt+Ut,transform:"rotate(".concat(Lt+Nt+tr,"deg)"),transformOrigin:"".concat(zt,"px ").concat(zt,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},_=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function X(Pe){var Qe=Pe!=null?Pe:[];return Array.isArray(Qe)?Qe:[Qe]}var ee=function(Qe){var nt=(0,c.Z)((0,c.Z)({},v),Qe),yt=nt.id,St=nt.prefixCls,Lt=nt.steps,jt=nt.strokeWidth,Dt=nt.trailWidth,Ct=nt.gapDegree,Mt=Ct===void 0?0:Ct,Bt=nt.gapPosition,Ut=nt.trailColor,Nt=nt.strokeLinecap,tr=nt.style,Zt=nt.className,zt=nt.strokeColor,Xe=nt.percent,Kt=(0,m.Z)(nt,_),Ft=H/2,kr=B(yt),hr="".concat(kr,"-gradient"),vr=Ft-jt/2,$t=Math.PI*2*vr,Xt=Mt>0?90+Mt/2:-90,sr=$t*((360-Mt)/360),Nr=(0,C.Z)(Lt)==="object"?Lt:{count:Lt,gap:2},Tt=Nr.count,Mr=Nr.gap,Jt=X(Xe),Xr=X(zt),Kr=Xr.find(function(Zr){return Zr&&(0,C.Z)(Zr)==="object"}),on=Kr&&(0,C.Z)(Kr)==="object",hn=on?"butt":Nt,Yr=N($t,sr,0,100,Xt,Mt,Bt,Ut,hn,jt),$r=b(),We=function(){var yr=0;return Jt.map(function(Ge,Ye){var ot=Xr[Ye]||Xr[Xr.length-1],ut=N($t,sr,yr,Ge,Xt,Mt,Bt,ot,hn,jt);return yr+=Ge,we.createElement(J,{key:Ye,color:ot,ptg:Ge,radius:vr,prefixCls:St,gradientId:hr,style:ut,strokeLinecap:hn,strokeWidth:jt,gapDegree:Mt,ref:function(ht){$r[Ye]=ht},size:H})}).reverse()},tn=function(){var yr=Math.round(Tt*(Jt[0]/100)),Ge=100/Tt,Ye=0;return new Array(Tt).fill(null).map(function(ot,ut){var dt=ut<=yr-1?Xr[0]:Ut,ht=dt&&(0,C.Z)(dt)==="object"?"url(#".concat(hr,")"):void 0,xt=N($t,sr,Ye,Ge,Xt,Mt,Bt,dt,"butt",jt,Mr);return Ye+=(sr-xt.strokeDashoffset+Mr)*100/sr,we.createElement("circle",{key:ut,className:"".concat(St,"-circle-path"),r:vr,cx:Ft,cy:Ft,stroke:ht,strokeWidth:jt,opacity:1,style:xt,ref:function(Wt){$r[ut]=Wt}})})};return we.createElement("svg",(0,w.Z)({className:h()("".concat(St,"-circle"),Zt),viewBox:"0 0 ".concat(H," ").concat(H),style:tr,id:yt,role:"presentation"},Kt),!Tt&&we.createElement("circle",{className:"".concat(St,"-circle-trail"),r:vr,cx:Ft,cy:Ft,stroke:Ut,strokeLinecap:hn,strokeWidth:Dt||jt,style:Yr}),Tt?tn():We())},ie=ee,he={Line:S,Circle:ie},ne=Te(25399),Ie=Te(68361);function q(Pe){return!Pe||Pe<0?0:Pe>100?100:Pe}function pe(Pe){let{success:Qe,successPercent:nt}=Pe,yt=nt;return Qe&&"progress"in Qe&&(yt=Qe.progress),Qe&&"percent"in Qe&&(yt=Qe.percent),yt}const ve=Pe=>{let{percent:Qe,success:nt,successPercent:yt}=Pe;const St=q(pe({success:nt,successPercent:yt}));return[St,q(q(Qe)-St)]},xe=Pe=>{let{success:Qe={},strokeColor:nt}=Pe;const{strokeColor:yt}=Qe;return[yt||Ie.presetPrimaryColors.green,nt||null]},ce=(Pe,Qe,nt)=>{var yt,St,Lt,jt;let Dt=-1,Ct=-1;if(Qe==="step"){const Mt=nt.steps,Bt=nt.strokeWidth;typeof Pe=="string"||typeof Pe=="undefined"?(Dt=Pe==="small"?2:14,Ct=Bt!=null?Bt:8):typeof Pe=="number"?[Dt,Ct]=[Pe,Pe]:[Dt=14,Ct=8]=Array.isArray(Pe)?Pe:[Pe.width,Pe.height],Dt*=Mt}else if(Qe==="line"){const Mt=nt==null?void 0:nt.strokeWidth;typeof Pe=="string"||typeof Pe=="undefined"?Ct=Mt||(Pe==="small"?6:8):typeof Pe=="number"?[Dt,Ct]=[Pe,Pe]:[Dt=-1,Ct=8]=Array.isArray(Pe)?Pe:[Pe.width,Pe.height]}else(Qe==="circle"||Qe==="dashboard")&&(typeof Pe=="string"||typeof Pe=="undefined"?[Dt,Ct]=Pe==="small"?[60,60]:[120,120]:typeof Pe=="number"?[Dt,Ct]=[Pe,Pe]:Array.isArray(Pe)&&(Dt=(St=(yt=Pe[0])!==null&&yt!==void 0?yt:Pe[1])!==null&&St!==void 0?St:120,Ct=(jt=(Lt=Pe[0])!==null&&Lt!==void 0?Lt:Pe[1])!==null&&jt!==void 0?jt:120));return[Dt,Ct]},fe=3,ge=Pe=>fe/Pe*100;var De=Pe=>{const{prefixCls:Qe,trailColor:nt=null,strokeLinecap:yt="round",gapPosition:St,gapDegree:Lt,width:jt=120,type:Dt,children:Ct,success:Mt,size:Bt=jt,steps:Ut}=Pe,[Nt,tr]=ce(Bt,"circle");let{strokeWidth:Zt}=Pe;Zt===void 0&&(Zt=Math.max(ge(Nt),6));const zt={width:Nt,height:tr,fontSize:Nt*.15+6},Xe=we.useMemo(()=>{if(Lt||Lt===0)return Lt;if(Dt==="dashboard")return 75},[Lt,Dt]),Kt=ve(Pe),Ft=St||Dt==="dashboard"&&"bottom"||void 0,kr=Object.prototype.toString.call(Pe.strokeColor)==="[object Object]",hr=xe({success:Mt,strokeColor:Pe.strokeColor}),vr=h()(`${Qe}-inner`,{[`${Qe}-circle-gradient`]:kr}),$t=we.createElement(ie,{steps:Ut,percent:Ut?Kt[1]:Kt,strokeWidth:Zt,trailWidth:Zt,strokeColor:Ut?hr[1]:hr,strokeLinecap:yt,trailColor:nt,prefixCls:Qe,gapDegree:Xe,gapPosition:Ft}),Xt=Nt<=20,sr=we.createElement("div",{className:vr,style:zt},$t,!Xt&&Ct);return Xt?we.createElement(ne.Z,{title:Ct},sr):sr},ke=Te(36237),de=Te(63356),Y=Te(16931),ye=Te(51636);const V="--progress-line-stroke-color",G="--progress-percent",W=Pe=>{const Qe=Pe?"100%":"-100%";return new ke.Keyframes(`antProgress${Pe?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${Qe}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${Qe}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},K=Pe=>{const{componentCls:Qe,iconCls:nt}=Pe;return{[Qe]:Object.assign(Object.assign({},(0,de.Wf)(Pe)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:Pe.fontSize},[`${Qe}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${Qe}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:Pe.remainingColor,borderRadius:Pe.lineBorderRadius},[`${Qe}-inner:not(${Qe}-circle-gradient)`]:{[`${Qe}-circle-path`]:{stroke:Pe.defaultColor}},[`${Qe}-success-bg, ${Qe}-bg`]:{position:"relative",background:Pe.defaultColor,borderRadius:Pe.lineBorderRadius,transition:`all ${Pe.motionDurationSlow} ${Pe.motionEaseInOutCirc}`},[`${Qe}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${Qe}-text`]:{width:"max-content",marginInlineStart:0,marginTop:Pe.marginXXS}},[`${Qe}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${V})`]},height:"100%",width:`calc(1 / var(${G}) * 100%)`,display:"block"},[`&${Qe}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${Qe}-text-inner`]:{color:Pe.colorWhite,[`&${Qe}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${Qe}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:Pe.colorSuccess},[`${Qe}-text`]:{display:"inline-block",marginInlineStart:Pe.marginXS,color:Pe.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[nt]:{fontSize:Pe.fontSize},[`&${Qe}-text-outer`]:{width:"max-content"},[`&${Qe}-text-outer${Qe}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:Pe.marginXS}},[`${Qe}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${(0,ke.unit)(Pe.paddingXXS)}`,[`&${Qe}-text-start`]:{justifyContent:"start"},[`&${Qe}-text-end`]:{justifyContent:"end"}},[`&${Qe}-status-active`]:{[`${Qe}-bg::before`]:{position:"absolute",inset:0,backgroundColor:Pe.colorBgContainer,borderRadius:Pe.lineBorderRadius,opacity:0,animationName:W(),animationDuration:Pe.progressActiveMotionDuration,animationTimingFunction:Pe.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${Qe}-rtl${Qe}-status-active`]:{[`${Qe}-bg::before`]:{animationName:W(!0)}},[`&${Qe}-status-exception`]:{[`${Qe}-bg`]:{backgroundColor:Pe.colorError},[`${Qe}-text`]:{color:Pe.colorError}},[`&${Qe}-status-exception ${Qe}-inner:not(${Qe}-circle-gradient)`]:{[`${Qe}-circle-path`]:{stroke:Pe.colorError}},[`&${Qe}-status-success`]:{[`${Qe}-bg`]:{backgroundColor:Pe.colorSuccess},[`${Qe}-text`]:{color:Pe.colorSuccess}},[`&${Qe}-status-success ${Qe}-inner:not(${Qe}-circle-gradient)`]:{[`${Qe}-circle-path`]:{stroke:Pe.colorSuccess}}})}},te=Pe=>{const{componentCls:Qe,iconCls:nt}=Pe;return{[Qe]:{[`${Qe}-circle-trail`]:{stroke:Pe.remainingColor},[`&${Qe}-circle ${Qe}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${Qe}-circle ${Qe}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:Pe.circleTextColor,fontSize:Pe.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[nt]:{fontSize:Pe.circleIconFontSize}},[`${Qe}-circle&-status-exception`]:{[`${Qe}-text`]:{color:Pe.colorError}},[`${Qe}-circle&-status-success`]:{[`${Qe}-text`]:{color:Pe.colorSuccess}}},[`${Qe}-inline-circle`]:{lineHeight:1,[`${Qe}-inner`]:{verticalAlign:"bottom"}}}},U=Pe=>{const{componentCls:Qe}=Pe;return{[Qe]:{[`${Qe}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:Pe.progressStepMinWidth,marginInlineEnd:Pe.progressStepMarginInlineEnd,backgroundColor:Pe.remainingColor,transition:`all ${Pe.motionDurationSlow}`,"&-active":{backgroundColor:Pe.defaultColor}}}}}},L=Pe=>{const{componentCls:Qe,iconCls:nt}=Pe;return{[Qe]:{[`${Qe}-small&-line, ${Qe}-small&-line ${Qe}-text ${nt}`]:{fontSize:Pe.fontSizeSM}}}},$=Pe=>({circleTextColor:Pe.colorText,defaultColor:Pe.colorInfo,remainingColor:Pe.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${Pe.fontSize/Pe.fontSizeSM}em`});var ue=(0,Y.I$)("Progress",Pe=>{const Qe=Pe.calc(Pe.marginXXS).div(2).equal(),nt=(0,ye.mergeToken)(Pe,{progressStepMarginInlineEnd:Qe,progressStepMinWidth:Qe,progressActiveMotionDuration:"2.4s"});return[K(nt),te(nt),U(nt),L(nt)]},$),Ee=function(Pe,Qe){var nt={};for(var yt in Pe)Object.prototype.hasOwnProperty.call(Pe,yt)&&Qe.indexOf(yt)<0&&(nt[yt]=Pe[yt]);if(Pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var St=0,yt=Object.getOwnPropertySymbols(Pe);St<yt.length;St++)Qe.indexOf(yt[St])<0&&Object.prototype.propertyIsEnumerable.call(Pe,yt[St])&&(nt[yt[St]]=Pe[yt[St]]);return nt};const ze=Pe=>{let Qe=[];return Object.keys(Pe).forEach(nt=>{const yt=parseFloat(nt.replace(/%/g,""));Number.isNaN(yt)||Qe.push({key:yt,value:Pe[nt]})}),Qe=Qe.sort((nt,yt)=>nt.key-yt.key),Qe.map(nt=>{let{key:yt,value:St}=nt;return`${St} ${yt}%`}).join(", ")},_e=(Pe,Qe)=>{const{from:nt=Ie.presetPrimaryColors.blue,to:yt=Ie.presetPrimaryColors.blue,direction:St=Qe==="rtl"?"to left":"to right"}=Pe,Lt=Ee(Pe,["from","to","direction"]);if(Object.keys(Lt).length!==0){const Dt=ze(Lt),Ct=`linear-gradient(${St}, ${Dt})`;return{background:Ct,[V]:Ct}}const jt=`linear-gradient(${St}, ${nt}, ${yt})`;return{background:jt,[V]:jt}};var Re=Pe=>{const{prefixCls:Qe,direction:nt,percent:yt,size:St,strokeWidth:Lt,strokeColor:jt,strokeLinecap:Dt="round",children:Ct,trailColor:Mt=null,percentPosition:Bt,success:Ut}=Pe,{align:Nt,type:tr}=Bt,Zt=jt&&typeof jt!="string"?_e(jt,nt):{[V]:jt,background:jt},zt=Dt==="square"||Dt==="butt"?0:void 0,Xe=St!=null?St:[-1,Lt||(St==="small"?6:8)],[Kt,Ft]=ce(Xe,"line",{strokeWidth:Lt}),kr={backgroundColor:Mt||void 0,borderRadius:zt},hr=Object.assign(Object.assign({width:`${q(yt)}%`,height:Ft,borderRadius:zt},Zt),{[G]:q(yt)/100}),vr=pe(Pe),$t={width:`${q(vr)}%`,height:Ft,borderRadius:zt,backgroundColor:Ut==null?void 0:Ut.strokeColor},Xt={width:Kt<0?"100%":Kt},sr=we.createElement("div",{className:`${Qe}-inner`,style:kr},we.createElement("div",{className:h()(`${Qe}-bg`,`${Qe}-bg-${tr}`),style:hr},tr==="inner"&&Ct),vr!==void 0&&we.createElement("div",{className:`${Qe}-success-bg`,style:$t})),Nr=tr==="outer"&&Nt==="start",Tt=tr==="outer"&&Nt==="end";return tr==="outer"&&Nt==="center"?we.createElement("div",{className:`${Qe}-layout-bottom`},sr,Ct):we.createElement("div",{className:`${Qe}-outer`,style:Xt},Nr&&Ct,sr,Tt&&Ct)},He=Pe=>{const{size:Qe,steps:nt,rounding:yt=Math.round,percent:St=0,strokeWidth:Lt=8,strokeColor:jt,trailColor:Dt=null,prefixCls:Ct,children:Mt}=Pe,Bt=yt(nt*(St/100)),Ut=Qe==="small"?2:14,Nt=Qe!=null?Qe:[Ut,Lt],[tr,Zt]=ce(Nt,"step",{steps:nt,strokeWidth:Lt}),zt=tr/nt,Xe=Array.from({length:nt});for(let Kt=0;Kt<nt;Kt++){const Ft=Array.isArray(jt)?jt[Kt]:jt;Xe[Kt]=we.createElement("div",{key:Kt,className:h()(`${Ct}-steps-item`,{[`${Ct}-steps-item-active`]:Kt<=Bt-1}),style:{backgroundColor:Kt<=Bt-1?Ft:Dt,width:zt,height:Zt}})}return we.createElement("div",{className:`${Ct}-steps-outer`},Xe,Mt)},Be=function(Pe,Qe){var nt={};for(var yt in Pe)Object.prototype.hasOwnProperty.call(Pe,yt)&&Qe.indexOf(yt)<0&&(nt[yt]=Pe[yt]);if(Pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var St=0,yt=Object.getOwnPropertySymbols(Pe);St<yt.length;St++)Qe.indexOf(yt[St])<0&&Object.prototype.propertyIsEnumerable.call(Pe,yt[St])&&(nt[yt[St]]=Pe[yt[St]]);return nt};const Je=null,$e=["normal","exception","active","success"];var qe=we.forwardRef((Pe,Qe)=>{const{prefixCls:nt,className:yt,rootClassName:St,steps:Lt,strokeColor:jt,percent:Dt=0,size:Ct="default",showInfo:Mt=!0,type:Bt="line",status:Ut,format:Nt,style:tr,percentPosition:Zt={}}=Pe,zt=Be(Pe,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:Xe="end",type:Kt="outer"}=Zt,Ft=Array.isArray(jt)?jt[0]:jt,kr=typeof jt=="string"||Array.isArray(jt)?jt:void 0,hr=we.useMemo(()=>{if(Ft){const We=typeof Ft=="string"?Ft:Object.values(Ft)[0];return new st.FastColor(We).isLight()}return!1},[jt]),vr=we.useMemo(()=>{var We,tn;const Zr=pe(Pe);return parseInt(Zr!==void 0?(We=Zr!=null?Zr:0)===null||We===void 0?void 0:We.toString():(tn=Dt!=null?Dt:0)===null||tn===void 0?void 0:tn.toString(),10)},[Dt,Pe.success,Pe.successPercent]),$t=we.useMemo(()=>!$e.includes(Ut)&&vr>=100?"success":Ut||"normal",[Ut,vr]),{getPrefixCls:Xt,direction:sr,progress:Nr}=we.useContext(g.E_),Tt=Xt("progress",nt),[Mr,Jt,Xr]=ue(Tt),Kr=Bt==="line",on=Kr&&!Lt,hn=we.useMemo(()=>{if(!Mt)return null;const We=pe(Pe);let tn;const Zr=Nt||(Ge=>`${Ge}%`),yr=Kr&&hr&&Kt==="inner";return Kt==="inner"||Nt||$t!=="exception"&&$t!=="success"?tn=Zr(q(Dt),q(We)):$t==="exception"?tn=Kr?we.createElement(R.Z,null):we.createElement(p.Z,null):$t==="success"&&(tn=Kr?we.createElement(o.Z,null):we.createElement(M.Z,null)),we.createElement("span",{className:h()(`${Tt}-text`,{[`${Tt}-text-bright`]:yr,[`${Tt}-text-${Xe}`]:on,[`${Tt}-text-${Kt}`]:on}),title:typeof tn=="string"?tn:void 0},tn)},[Mt,Dt,vr,$t,Bt,Tt,Nt]);let Yr;Bt==="line"?Yr=Lt?we.createElement(He,Object.assign({},Pe,{strokeColor:kr,prefixCls:Tt,steps:typeof Lt=="object"?Lt.count:Lt}),hn):we.createElement(Re,Object.assign({},Pe,{strokeColor:Ft,prefixCls:Tt,direction:sr,percentPosition:{align:Xe,type:Kt}}),hn):(Bt==="circle"||Bt==="dashboard")&&(Yr=we.createElement(De,Object.assign({},Pe,{strokeColor:Ft,prefixCls:Tt,progressStatus:$t}),hn));const $r=h()(Tt,`${Tt}-status-${$t}`,{[`${Tt}-${Bt==="dashboard"&&"circle"||Bt}`]:Bt!=="line",[`${Tt}-inline-circle`]:Bt==="circle"&&ce(Ct,"circle")[0]<=20,[`${Tt}-line`]:on,[`${Tt}-line-align-${Xe}`]:on,[`${Tt}-line-position-${Kt}`]:on,[`${Tt}-steps`]:Lt,[`${Tt}-show-info`]:Mt,[`${Tt}-${Ct}`]:typeof Ct=="string",[`${Tt}-rtl`]:sr==="rtl"},Nr==null?void 0:Nr.className,yt,St,Jt,Xr);return Mr(we.createElement("div",Object.assign({ref:Qe,style:Object.assign(Object.assign({},Nr==null?void 0:Nr.style),tr),className:$r,role:"progressbar","aria-valuenow":vr,"aria-valuemin":0,"aria-valuemax":100},(0,y.Z)(zt,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),Yr))}),pt=qe},11938:function(or,mt,Te){"use strict";Te.d(mt,{default:function(){return F}});var we=Te(59301),st=Te(40192),o=Te(22703),M=Te(92310),R=Te.n(M),p=Te(26112),f=Te(48755),h=Te(458),g=J=>{const{value:H,formatter:N,precision:_,decimalSeparator:X,groupSeparator:ee="",prefixCls:ie}=J;let he;if(typeof N=="function")he=N(H);else{const ne=String(H),Ie=ne.match(/^(-?)(\d*)(\.(\d+))?$/);if(!Ie||ne==="-")he=ne;else{const q=Ie[1];let pe=Ie[2]||"0",ve=Ie[4]||"";pe=pe.replace(/\B(?=(\d{3})+(?!\d))/g,ee),typeof _=="number"&&(ve=ve.padEnd(_,"0").slice(0,_>0?_:0)),ve&&(ve=`${X}${ve}`),he=[we.createElement("span",{key:"int",className:`${ie}-content-value-int`},q,pe),ve&&we.createElement("span",{key:"decimal",className:`${ie}-content-value-decimal`},ve)]}}return we.createElement("span",{className:`${ie}-content-value`},he)},w=Te(63356),c=Te(16931),m=Te(51636);const v=J=>{const{componentCls:H,marginXXS:N,padding:_,colorTextDescription:X,titleFontSize:ee,colorTextHeading:ie,contentFontSize:he,fontFamily:ne}=J;return{[H]:Object.assign(Object.assign({},(0,w.Wf)(J)),{[`${H}-title`]:{marginBottom:N,color:X,fontSize:ee},[`${H}-skeleton`]:{paddingTop:_},[`${H}-content`]:{color:ie,fontSize:he,fontFamily:ne,[`${H}-content-value`]:{display:"inline-block",direction:"ltr"},[`${H}-content-prefix, ${H}-content-suffix`]:{display:"inline-block"},[`${H}-content-prefix`]:{marginInlineEnd:N},[`${H}-content-suffix`]:{marginInlineStart:N}}})}},b=J=>{const{fontSizeHeading3:H,fontSize:N}=J;return{titleFontSize:N,contentFontSize:H}};var x=(0,c.I$)("Statistic",J=>{const H=(0,m.mergeToken)(J,{});return[v(H)]},b),T=function(J,H){var N={};for(var _ in J)Object.prototype.hasOwnProperty.call(J,_)&&H.indexOf(_)<0&&(N[_]=J[_]);if(J!=null&&typeof Object.getOwnPropertySymbols=="function")for(var X=0,_=Object.getOwnPropertySymbols(J);X<_.length;X++)H.indexOf(_[X])<0&&Object.prototype.propertyIsEnumerable.call(J,_[X])&&(N[_[X]]=J[_[X]]);return N},C=J=>{const{prefixCls:H,className:N,rootClassName:_,style:X,valueStyle:ee,value:ie=0,title:he,valueRender:ne,prefix:Ie,suffix:q,loading:pe=!1,formatter:ve,precision:xe,decimalSeparator:ce=".",groupSeparator:fe=",",onMouseEnter:ge,onMouseLeave:Se}=J,De=T(J,["prefixCls","className","rootClassName","style","valueStyle","value","title","valueRender","prefix","suffix","loading","formatter","precision","decimalSeparator","groupSeparator","onMouseEnter","onMouseLeave"]),{getPrefixCls:ke,direction:de,className:Y,style:ye}=(0,f.dj)("statistic"),V=ke("statistic",H),[G,W,K]=x(V),te=we.createElement(g,{decimalSeparator:ce,groupSeparator:fe,prefixCls:V,formatter:ve,precision:xe,value:ie}),U=R()(V,{[`${V}-rtl`]:de==="rtl"},Y,N,_,W,K),L=(0,p.Z)(De,{aria:!0,data:!0});return G(we.createElement("div",Object.assign({},L,{className:U,style:Object.assign(Object.assign({},ye),X),onMouseEnter:ge,onMouseLeave:Se}),he&&we.createElement("div",{className:`${V}-title`},he),we.createElement(h.Z,{paragraph:!1,loading:pe,className:`${V}-skeleton`},we.createElement("div",{style:ee,className:`${V}-content`},Ie&&we.createElement("span",{className:`${V}-content-prefix`},Ie),ne?ne(te):te,q&&we.createElement("span",{className:`${V}-content-suffix`},q)))))};const E=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]];function j(J,H){let N=J;const _=/\[[^\]]*]/g,X=(H.match(_)||[]).map(ne=>ne.slice(1,-1)),ee=H.replace(_,"[]"),ie=E.reduce((ne,Ie)=>{let[q,pe]=Ie;if(ne.includes(q)){const ve=Math.floor(N/pe);return N-=ve*pe,ne.replace(new RegExp(`${q}+`,"g"),xe=>{const ce=xe.length;return ve.toString().padStart(ce,"0")})}return ne},ee);let he=0;return ie.replace(_,()=>{const ne=X[he];return he+=1,ne})}function Z(J,H){const{format:N=""}=H,_=new Date(J).getTime(),X=Date.now(),ee=Math.max(_-X,0);return j(ee,N)}var P=function(J,H){var N={};for(var _ in J)Object.prototype.hasOwnProperty.call(J,_)&&H.indexOf(_)<0&&(N[_]=J[_]);if(J!=null&&typeof Object.getOwnPropertySymbols=="function")for(var X=0,_=Object.getOwnPropertySymbols(J);X<_.length;X++)H.indexOf(_[X])<0&&Object.prototype.propertyIsEnumerable.call(J,_[X])&&(N[_[X]]=J[_[X]]);return N};const Q=1e3/30;function B(J){return new Date(J).getTime()}const k=J=>{const{value:H,format:N="HH:mm:ss",onChange:_,onFinish:X}=J,ee=P(J,["value","format","onChange","onFinish"]),ie=(0,st.Z)(),he=we.useRef(null),ne=()=>{X==null||X(),he.current&&(clearInterval(he.current),he.current=null)},Ie=()=>{const ve=B(H);ve>=Date.now()&&(he.current=setInterval(()=>{ie(),_==null||_(ve-Date.now()),ve<Date.now()&&ne()},Q))};we.useEffect(()=>(Ie(),()=>{he.current&&(clearInterval(he.current),he.current=null)}),[H]);const q=(ve,xe)=>Z(ve,Object.assign(Object.assign({},xe),{format:N})),pe=ve=>(0,o.Tm)(ve,{title:void 0});return we.createElement(C,Object.assign({},ee,{value:H,valueRender:pe,formatter:q}))};var D=we.memo(k);C.Countdown=D;var F=C},10846:function(or,mt,Te){"use strict";Te.d(mt,{default:function(){return _e}});var we=Te(59301),st=Te(40001),o=Te(99267),M=Te(92310),R=Te.n(M),p=Te(60499),f=Te(85899),h=Te(18642),y=Te(42244),g=Te(10228),w=["className","prefixCls","style","active","status","iconPrefix","icon","wrapperStyle","stepNumber","disabled","description","title","subTitle","progressDot","stepIcon","tailContent","icons","stepIndex","onStepClick","onClick","render"];function c(le){return typeof le=="string"}function m(le){var Re,Me=le.className,He=le.prefixCls,Be=le.style,Je=le.active,$e=le.status,rt=le.iconPrefix,qe=le.icon,pt=le.wrapperStyle,Pe=le.stepNumber,Qe=le.disabled,nt=le.description,yt=le.title,St=le.subTitle,Lt=le.progressDot,jt=le.stepIcon,Dt=le.tailContent,Ct=le.icons,Mt=le.stepIndex,Bt=le.onStepClick,Ut=le.onClick,Nt=le.render,tr=(0,y.Z)(le,w),Zt=!!Bt&&!Qe,zt={};Zt&&(zt.role="button",zt.tabIndex=0,zt.onClick=function(vr){Ut==null||Ut(vr),Bt(Mt)},zt.onKeyDown=function(vr){var $t=vr.which;($t===g.Z.ENTER||$t===g.Z.SPACE)&&Bt(Mt)});var Xe=function(){var $t,Xt,sr=R()("".concat(He,"-icon"),"".concat(rt,"icon"),($t={},(0,h.Z)($t,"".concat(rt,"icon-").concat(qe),qe&&c(qe)),(0,h.Z)($t,"".concat(rt,"icon-check"),!qe&&$e==="finish"&&(Ct&&!Ct.finish||!Ct)),(0,h.Z)($t,"".concat(rt,"icon-cross"),!qe&&$e==="error"&&(Ct&&!Ct.error||!Ct)),$t)),Nr=we.createElement("span",{className:"".concat(He,"-icon-dot")});return Lt?typeof Lt=="function"?Xt=we.createElement("span",{className:"".concat(He,"-icon")},Lt(Nr,{index:Pe-1,status:$e,title:yt,description:nt})):Xt=we.createElement("span",{className:"".concat(He,"-icon")},Nr):qe&&!c(qe)?Xt=we.createElement("span",{className:"".concat(He,"-icon")},qe):Ct&&Ct.finish&&$e==="finish"?Xt=we.createElement("span",{className:"".concat(He,"-icon")},Ct.finish):Ct&&Ct.error&&$e==="error"?Xt=we.createElement("span",{className:"".concat(He,"-icon")},Ct.error):qe||$e==="finish"||$e==="error"?Xt=we.createElement("span",{className:sr}):Xt=we.createElement("span",{className:"".concat(He,"-icon")},Pe),jt&&(Xt=jt({index:Pe-1,status:$e,title:yt,description:nt,node:Xt})),Xt},Kt=$e||"wait",Ft=R()("".concat(He,"-item"),"".concat(He,"-item-").concat(Kt),Me,(Re={},(0,h.Z)(Re,"".concat(He,"-item-custom"),qe),(0,h.Z)(Re,"".concat(He,"-item-active"),Je),(0,h.Z)(Re,"".concat(He,"-item-disabled"),Qe===!0),Re)),kr=(0,f.Z)({},Be),hr=we.createElement("div",(0,p.Z)({},tr,{className:Ft,style:kr}),we.createElement("div",(0,p.Z)({onClick:Ut},zt,{className:"".concat(He,"-item-container")}),we.createElement("div",{className:"".concat(He,"-item-tail")},Dt),we.createElement("div",{className:"".concat(He,"-item-icon")},Xe()),we.createElement("div",{className:"".concat(He,"-item-content")},we.createElement("div",{className:"".concat(He,"-item-title")},yt,St&&we.createElement("div",{title:typeof St=="string"?St:void 0,className:"".concat(He,"-item-subtitle")},St)),nt&&we.createElement("div",{className:"".concat(He,"-item-description")},nt))));return Nt&&(hr=Nt(hr)||null),hr}var v=m,b=["prefixCls","style","className","children","direction","type","labelPlacement","iconPrefix","status","size","current","progressDot","stepIcon","initial","icons","onChange","itemRender","items"];function x(le){var Re,Me=le.prefixCls,He=Me===void 0?"rc-steps":Me,Be=le.style,Je=Be===void 0?{}:Be,$e=le.className,rt=le.children,qe=le.direction,pt=qe===void 0?"horizontal":qe,Pe=le.type,Qe=Pe===void 0?"default":Pe,nt=le.labelPlacement,yt=nt===void 0?"horizontal":nt,St=le.iconPrefix,Lt=St===void 0?"rc":St,jt=le.status,Dt=jt===void 0?"process":jt,Ct=le.size,Mt=le.current,Bt=Mt===void 0?0:Mt,Ut=le.progressDot,Nt=Ut===void 0?!1:Ut,tr=le.stepIcon,Zt=le.initial,zt=Zt===void 0?0:Zt,Xe=le.icons,Kt=le.onChange,Ft=le.itemRender,kr=le.items,hr=kr===void 0?[]:kr,vr=(0,y.Z)(le,b),$t=Qe==="navigation",Xt=Qe==="inline",sr=Xt||Nt,Nr=Xt?"horizontal":pt,Tt=Xt?void 0:Ct,Mr=sr?"vertical":yt,Jt=R()(He,"".concat(He,"-").concat(Nr),$e,(Re={},(0,h.Z)(Re,"".concat(He,"-").concat(Tt),Tt),(0,h.Z)(Re,"".concat(He,"-label-").concat(Mr),Nr==="horizontal"),(0,h.Z)(Re,"".concat(He,"-dot"),!!sr),(0,h.Z)(Re,"".concat(He,"-navigation"),$t),(0,h.Z)(Re,"".concat(He,"-inline"),Xt),Re)),Xr=function(hn){Kt&&Bt!==hn&&Kt(hn)},Kr=function(hn,Yr){var $r=(0,f.Z)({},hn),We=zt+Yr;return Dt==="error"&&Yr===Bt-1&&($r.className="".concat(He,"-next-error")),$r.status||(We===Bt?$r.status=Dt:We<Bt?$r.status="finish":$r.status="wait"),Xt&&($r.icon=void 0,$r.subTitle=void 0),!$r.render&&Ft&&($r.render=function(tn){return Ft($r,tn)}),we.createElement(v,(0,p.Z)({},$r,{active:We===Bt,stepNumber:We+1,stepIndex:We,key:We,prefixCls:He,iconPrefix:Lt,wrapperStyle:Je,progressDot:sr,stepIcon:tr,icons:Xe,onStepClick:Kt&&Xr}))};return we.createElement("div",(0,p.Z)({className:Jt,style:Je},vr),hr.filter(function(on){return on}).map(Kr))}x.Step=v;var T=x,S=T,C=Te(48755),E=Te(31756),j=Te(13783),Z=Te(89787),P=Te(25399),Q=Te(36237),B=Te(63356),k=Te(16931),D=Te(51636),J=le=>{const{componentCls:Re,customIconTop:Me,customIconSize:He,customIconFontSize:Be}=le;return{[`${Re}-item-custom`]:{[`> ${Re}-item-container > ${Re}-item-icon`]:{height:"auto",background:"none",border:0,[`> ${Re}-icon`]:{top:Me,width:He,height:He,fontSize:Be,lineHeight:(0,Q.unit)(He)}}},[`&:not(${Re}-vertical)`]:{[`${Re}-item-custom`]:{[`${Re}-item-icon`]:{width:"auto",background:"none"}}}}},N=le=>{const{componentCls:Re}=le,Me=`${Re}-item`;return{[`${Re}-horizontal`]:{[`${Me}-tail`]:{transform:"translateY(-50%)"}}}},X=le=>{const{componentCls:Re,inlineDotSize:Me,inlineTitleColor:He,inlineTailColor:Be}=le,Je=le.calc(le.paddingXS).add(le.lineWidth).equal(),$e={[`${Re}-item-container ${Re}-item-content ${Re}-item-title`]:{color:He}};return{[`&${Re}-inline`]:{width:"auto",display:"inline-flex",[`${Re}-item`]:{flex:"none","&-container":{padding:`${(0,Q.unit)(Je)} ${(0,Q.unit)(le.paddingXXS)} 0`,margin:`0 ${(0,Q.unit)(le.calc(le.marginXXS).div(2).equal())}`,borderRadius:le.borderRadiusSM,cursor:"pointer",transition:`background-color ${le.motionDurationMid}`,"&:hover":{background:le.controlItemBgHover},"&[role='button']:hover":{opacity:1}},"&-icon":{width:Me,height:Me,marginInlineStart:`calc(50% - ${(0,Q.unit)(le.calc(Me).div(2).equal())})`,[`> ${Re}-icon`]:{top:0},[`${Re}-icon-dot`]:{borderRadius:le.calc(le.fontSizeSM).div(4).equal(),"&::after":{display:"none"}}},"&-content":{width:"auto",marginTop:le.calc(le.marginXS).sub(le.lineWidth).equal()},"&-title":{color:He,fontSize:le.fontSizeSM,lineHeight:le.lineHeightSM,fontWeight:"normal",marginBottom:le.calc(le.marginXXS).div(2).equal()},"&-description":{display:"none"},"&-tail":{marginInlineStart:0,top:le.calc(Me).div(2).add(Je).equal(),transform:"translateY(-50%)","&:after":{width:"100%",height:le.lineWidth,borderRadius:0,marginInlineStart:0,background:Be}},[`&:first-child ${Re}-item-tail`]:{width:"50%",marginInlineStart:"50%"},[`&:last-child ${Re}-item-tail`]:{display:"block",width:"50%"},"&-wait":Object.assign({[`${Re}-item-icon ${Re}-icon ${Re}-icon-dot`]:{backgroundColor:le.colorBorderBg,border:`${(0,Q.unit)(le.lineWidth)} ${le.lineType} ${Be}`}},$e),"&-finish":Object.assign({[`${Re}-item-tail::after`]:{backgroundColor:Be},[`${Re}-item-icon ${Re}-icon ${Re}-icon-dot`]:{backgroundColor:Be,border:`${(0,Q.unit)(le.lineWidth)} ${le.lineType} ${Be}`}},$e),"&-error":$e,"&-active, &-process":Object.assign({[`${Re}-item-icon`]:{width:Me,height:Me,marginInlineStart:`calc(50% - ${(0,Q.unit)(le.calc(Me).div(2).equal())})`,top:0}},$e),[`&:not(${Re}-item-active) > ${Re}-item-container[role='button']:hover`]:{[`${Re}-item-title`]:{color:He}}}}}},ie=le=>{const{componentCls:Re,iconSize:Me,lineHeight:He,iconSizeSM:Be}=le;return{[`&${Re}-label-vertical`]:{[`${Re}-item`]:{overflow:"visible","&-tail":{marginInlineStart:le.calc(Me).div(2).add(le.controlHeightLG).equal(),padding:`0 ${(0,Q.unit)(le.paddingLG)}`},"&-content":{display:"block",width:le.calc(Me).div(2).add(le.controlHeightLG).mul(2).equal(),marginTop:le.marginSM,textAlign:"center"},"&-icon":{display:"inline-block",marginInlineStart:le.controlHeightLG},"&-title":{paddingInlineEnd:0,paddingInlineStart:0,"&::after":{display:"none"}},"&-subtitle":{display:"block",marginBottom:le.marginXXS,marginInlineStart:0,lineHeight:He}},[`&${Re}-small:not(${Re}-dot)`]:{[`${Re}-item`]:{"&-icon":{marginInlineStart:le.calc(Me).sub(Be).div(2).add(le.controlHeightLG).equal()}}}}}},ne=le=>{const{componentCls:Re,navContentMaxWidth:Me,navArrowColor:He,stepsNavActiveColor:Be,motionDurationSlow:Je}=le;return{[`&${Re}-navigation`]:{paddingTop:le.paddingSM,[`&${Re}-small`]:{[`${Re}-item`]:{"&-container":{marginInlineStart:le.calc(le.marginSM).mul(-1).equal()}}},[`${Re}-item`]:{overflow:"visible",textAlign:"center","&-container":{display:"inline-block",height:"100%",marginInlineStart:le.calc(le.margin).mul(-1).equal(),paddingBottom:le.paddingSM,textAlign:"start",transition:`opacity ${Je}`,[`${Re}-item-content`]:{maxWidth:Me},[`${Re}-item-title`]:Object.assign(Object.assign({maxWidth:"100%",paddingInlineEnd:0},B.vS),{"&::after":{display:"none"}})},[`&:not(${Re}-item-active)`]:{[`${Re}-item-container[role='button']`]:{cursor:"pointer","&:hover":{opacity:.85}}},"&:last-child":{flex:1,"&::after":{display:"none"}},"&::after":{position:"absolute",top:`calc(50% - ${(0,Q.unit)(le.calc(le.paddingSM).div(2).equal())})`,insetInlineStart:"100%",display:"inline-block",width:le.fontSizeIcon,height:le.fontSizeIcon,borderTop:`${(0,Q.unit)(le.lineWidth)} ${le.lineType} ${He}`,borderBottom:"none",borderInlineStart:"none",borderInlineEnd:`${(0,Q.unit)(le.lineWidth)} ${le.lineType} ${He}`,transform:"translateY(-50%) translateX(-50%) rotate(45deg)",content:'""'},"&::before":{position:"absolute",bottom:0,insetInlineStart:"50%",display:"inline-block",width:0,height:le.lineWidthBold,backgroundColor:Be,transition:`width ${Je}, inset-inline-start ${Je}`,transitionTimingFunction:"ease-out",content:'""'}},[`${Re}-item${Re}-item-active::before`]:{insetInlineStart:0,width:"100%"}},[`&${Re}-navigation${Re}-vertical`]:{[`> ${Re}-item`]:{marginInlineEnd:0,"&::before":{display:"none"},[`&${Re}-item-active::before`]:{top:0,insetInlineEnd:0,insetInlineStart:"unset",display:"block",width:le.calc(le.lineWidth).mul(3).equal(),height:`calc(100% - ${(0,Q.unit)(le.marginLG)})`},"&::after":{position:"relative",insetInlineStart:"50%",display:"block",width:le.calc(le.controlHeight).mul(.25).equal(),height:le.calc(le.controlHeight).mul(.25).equal(),marginBottom:le.marginXS,textAlign:"center",transform:"translateY(-50%) translateX(-50%) rotate(135deg)"},"&:last-child":{"&::after":{display:"none"}},[`> ${Re}-item-container > ${Re}-item-tail`]:{visibility:"hidden"}}},[`&${Re}-navigation${Re}-horizontal`]:{[`> ${Re}-item > ${Re}-item-container > ${Re}-item-tail`]:{visibility:"hidden"}}}},q=le=>{const{antCls:Re,componentCls:Me,iconSize:He,iconSizeSM:Be,processIconColor:Je,marginXXS:$e,lineWidthBold:rt,lineWidth:qe,paddingXXS:pt}=le,Pe=le.calc(He).add(le.calc(rt).mul(4).equal()).equal(),Qe=le.calc(Be).add(le.calc(le.lineWidth).mul(4).equal()).equal();return{[`&${Me}-with-progress`]:{[`${Me}-item`]:{paddingTop:pt,[`&-process ${Me}-item-container ${Me}-item-icon ${Me}-icon`]:{color:Je}},[`&${Me}-vertical > ${Me}-item `]:{paddingInlineStart:pt,[`> ${Me}-item-container > ${Me}-item-tail`]:{top:$e,insetInlineStart:le.calc(He).div(2).sub(qe).add(pt).equal()}},[`&, &${Me}-small`]:{[`&${Me}-horizontal ${Me}-item:first-child`]:{paddingBottom:pt,paddingInlineStart:pt}},[`&${Me}-small${Me}-vertical > ${Me}-item > ${Me}-item-container > ${Me}-item-tail`]:{insetInlineStart:le.calc(Be).div(2).sub(qe).add(pt).equal()},[`&${Me}-label-vertical ${Me}-item ${Me}-item-tail`]:{top:le.calc(He).div(2).add(pt).equal()},[`${Me}-item-icon`]:{position:"relative",[`${Re}-progress`]:{position:"absolute",insetInlineStart:"50%",top:"50%",transform:"translate(-50%, -50%)","&-inner":{width:`${(0,Q.unit)(Pe)} !important`,height:`${(0,Q.unit)(Pe)} !important`}}},[`&${Me}-small`]:{[`&${Me}-label-vertical ${Me}-item ${Me}-item-tail`]:{top:le.calc(Be).div(2).add(pt).equal()},[`${Me}-item-icon ${Re}-progress-inner`]:{width:`${(0,Q.unit)(Qe)} !important`,height:`${(0,Q.unit)(Qe)} !important`}}}}},ve=le=>{const{componentCls:Re,descriptionMaxWidth:Me,lineHeight:He,dotCurrentSize:Be,dotSize:Je,motionDurationSlow:$e}=le;return{[`&${Re}-dot, &${Re}-dot${Re}-small`]:{[`${Re}-item`]:{"&-title":{lineHeight:He},"&-tail":{top:le.calc(le.dotSize).sub(le.calc(le.lineWidth).mul(3).equal()).div(2).equal(),width:"100%",marginTop:0,marginBottom:0,marginInline:`${(0,Q.unit)(le.calc(Me).div(2).equal())} 0`,padding:0,"&::after":{width:`calc(100% - ${(0,Q.unit)(le.calc(le.marginSM).mul(2).equal())})`,height:le.calc(le.lineWidth).mul(3).equal(),marginInlineStart:le.marginSM}},"&-icon":{width:Je,height:Je,marginInlineStart:le.calc(le.descriptionMaxWidth).sub(Je).div(2).equal(),paddingInlineEnd:0,lineHeight:(0,Q.unit)(Je),background:"transparent",border:0,[`${Re}-icon-dot`]:{position:"relative",float:"left",width:"100%",height:"100%",borderRadius:100,transition:`all ${$e}`,"&::after":{position:"absolute",top:le.calc(le.marginSM).mul(-1).equal(),insetInlineStart:le.calc(Je).sub(le.calc(le.controlHeightLG).mul(1.5).equal()).div(2).equal(),width:le.calc(le.controlHeightLG).mul(1.5).equal(),height:le.controlHeight,background:"transparent",content:'""'}}},"&-content":{width:Me},[`&-process ${Re}-item-icon`]:{position:"relative",top:le.calc(Je).sub(Be).div(2).equal(),width:Be,height:Be,lineHeight:(0,Q.unit)(Be),background:"none",marginInlineStart:le.calc(le.descriptionMaxWidth).sub(Be).div(2).equal()},[`&-process ${Re}-icon`]:{[`&:first-child ${Re}-icon-dot`]:{insetInlineStart:0}}}},[`&${Re}-vertical${Re}-dot`]:{[`${Re}-item-icon`]:{marginTop:le.calc(le.controlHeight).sub(Je).div(2).equal(),marginInlineStart:0,background:"none"},[`${Re}-item-process ${Re}-item-icon`]:{marginTop:le.calc(le.controlHeight).sub(Be).div(2).equal(),top:0,insetInlineStart:le.calc(Je).sub(Be).div(2).equal(),marginInlineStart:0},[`${Re}-item > ${Re}-item-container > ${Re}-item-tail`]:{top:le.calc(le.controlHeight).sub(Je).div(2).equal(),insetInlineStart:0,margin:0,padding:`${(0,Q.unit)(le.calc(Je).add(le.paddingXS).equal())} 0 ${(0,Q.unit)(le.paddingXS)}`,"&::after":{marginInlineStart:le.calc(Je).sub(le.lineWidth).div(2).equal()}},[`&${Re}-small`]:{[`${Re}-item-icon`]:{marginTop:le.calc(le.controlHeightSM).sub(Je).div(2).equal()},[`${Re}-item-process ${Re}-item-icon`]:{marginTop:le.calc(le.controlHeightSM).sub(Be).div(2).equal()},[`${Re}-item > ${Re}-item-container > ${Re}-item-tail`]:{top:le.calc(le.controlHeightSM).sub(Je).div(2).equal()}},[`${Re}-item:first-child ${Re}-icon-dot`]:{insetInlineStart:0},[`${Re}-item-content`]:{width:"inherit"}}}},ce=le=>{const{componentCls:Re}=le;return{[`&${Re}-rtl`]:{direction:"rtl",[`${Re}-item`]:{"&-subtitle":{float:"left"}},[`&${Re}-navigation`]:{[`${Re}-item::after`]:{transform:"rotate(-45deg)"}},[`&${Re}-vertical`]:{[`> ${Re}-item`]:{"&::after":{transform:"rotate(225deg)"},[`${Re}-item-icon`]:{float:"right"}}},[`&${Re}-dot`]:{[`${Re}-item-icon ${Re}-icon-dot, &${Re}-small ${Re}-item-icon ${Re}-icon-dot`]:{float:"right"}}}}},ge=le=>{const{componentCls:Re,iconSizeSM:Me,fontSizeSM:He,fontSize:Be,colorTextDescription:Je}=le;return{[`&${Re}-small`]:{[`&${Re}-horizontal:not(${Re}-label-vertical) ${Re}-item`]:{paddingInlineStart:le.paddingSM,"&:first-child":{paddingInlineStart:0}},[`${Re}-item-icon`]:{width:Me,height:Me,marginTop:0,marginBottom:0,marginInline:`0 ${(0,Q.unit)(le.marginXS)}`,fontSize:He,lineHeight:(0,Q.unit)(Me),textAlign:"center",borderRadius:Me},[`${Re}-item-title`]:{paddingInlineEnd:le.paddingSM,fontSize:Be,lineHeight:(0,Q.unit)(Me),"&::after":{top:le.calc(Me).div(2).equal()}},[`${Re}-item-description`]:{color:Je,fontSize:Be},[`${Re}-item-tail`]:{top:le.calc(Me).div(2).sub(le.paddingXXS).equal()},[`${Re}-item-custom ${Re}-item-icon`]:{width:"inherit",height:"inherit",lineHeight:"inherit",background:"none",border:0,borderRadius:0,[`> ${Re}-icon`]:{fontSize:Me,lineHeight:(0,Q.unit)(Me),transform:"none"}}}}},De=le=>{const{componentCls:Re,iconSizeSM:Me,iconSize:He}=le;return{[`&${Re}-vertical`]:{display:"flex",flexDirection:"column",[`> ${Re}-item`]:{display:"block",flex:"1 0 auto",paddingInlineStart:0,overflow:"visible",[`${Re}-item-icon`]:{float:"left",marginInlineEnd:le.margin},[`${Re}-item-content`]:{display:"block",minHeight:le.calc(le.controlHeight).mul(1.5).equal(),overflow:"hidden"},[`${Re}-item-title`]:{lineHeight:(0,Q.unit)(He)},[`${Re}-item-description`]:{paddingBottom:le.paddingSM}},[`> ${Re}-item > ${Re}-item-container > ${Re}-item-tail`]:{position:"absolute",top:0,insetInlineStart:le.calc(He).div(2).sub(le.lineWidth).equal(),width:le.lineWidth,height:"100%",padding:`${(0,Q.unit)(le.calc(le.marginXXS).mul(1.5).add(He).equal())} 0 ${(0,Q.unit)(le.calc(le.marginXXS).mul(1.5).equal())}`,"&::after":{width:le.lineWidth,height:"100%"}},[`> ${Re}-item:not(:last-child) > ${Re}-item-container > ${Re}-item-tail`]:{display:"block"},[` > ${Re}-item > ${Re}-item-container > ${Re}-item-content > ${Re}-item-title`]:{"&::after":{display:"none"}},[`&${Re}-small ${Re}-item-container`]:{[`${Re}-item-tail`]:{position:"absolute",top:0,insetInlineStart:le.calc(Me).div(2).sub(le.lineWidth).equal(),padding:`${(0,Q.unit)(le.calc(le.marginXXS).mul(1.5).add(Me).equal())} 0 ${(0,Q.unit)(le.calc(le.marginXXS).mul(1.5).equal())}`},[`${Re}-item-title`]:{lineHeight:(0,Q.unit)(Me)}}}}};const ke="wait",de="process",Y="finish",ye="error",V=(le,Re)=>{const Me=`${Re.componentCls}-item`,He=`${le}IconColor`,Be=`${le}TitleColor`,Je=`${le}DescriptionColor`,$e=`${le}TailColor`,rt=`${le}IconBgColor`,qe=`${le}IconBorderColor`,pt=`${le}DotColor`;return{[`${Me}-${le} ${Me}-icon`]:{backgroundColor:Re[rt],borderColor:Re[qe],[`> ${Re.componentCls}-icon`]:{color:Re[He],[`${Re.componentCls}-icon-dot`]:{background:Re[pt]}}},[`${Me}-${le}${Me}-custom ${Me}-icon`]:{[`> ${Re.componentCls}-icon`]:{color:Re[pt]}},[`${Me}-${le} > ${Me}-container > ${Me}-content > ${Me}-title`]:{color:Re[Be],"&::after":{backgroundColor:Re[$e]}},[`${Me}-${le} > ${Me}-container > ${Me}-content > ${Me}-description`]:{color:Re[Je]},[`${Me}-${le} > ${Me}-container > ${Me}-tail::after`]:{backgroundColor:Re[$e]}}},G=le=>{const{componentCls:Re,motionDurationSlow:Me}=le,He=`${Re}-item`,Be=`${He}-icon`;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[He]:{position:"relative",display:"inline-block",flex:1,overflow:"hidden",verticalAlign:"top","&:last-child":{flex:"none",[`> ${He}-container > ${He}-tail, > ${He}-container > ${He}-content > ${He}-title::after`]:{display:"none"}}},[`${He}-container`]:{outline:"none","&:focus-visible":{[Be]:Object.assign({},(0,B.oN)(le))}},[`${Be}, ${He}-content`]:{display:"inline-block",verticalAlign:"top"},[Be]:{width:le.iconSize,height:le.iconSize,marginTop:0,marginBottom:0,marginInlineStart:0,marginInlineEnd:le.marginXS,fontSize:le.iconFontSize,fontFamily:le.fontFamily,lineHeight:(0,Q.unit)(le.iconSize),textAlign:"center",borderRadius:le.iconSize,border:`${(0,Q.unit)(le.lineWidth)} ${le.lineType} transparent`,transition:`background-color ${Me}, border-color ${Me}`,[`${Re}-icon`]:{position:"relative",top:le.iconTop,color:le.colorPrimary,lineHeight:1}},[`${He}-tail`]:{position:"absolute",top:le.calc(le.iconSize).div(2).equal(),insetInlineStart:0,width:"100%","&::after":{display:"inline-block",width:"100%",height:le.lineWidth,background:le.colorSplit,borderRadius:le.lineWidth,transition:`background ${Me}`,content:'""'}},[`${He}-title`]:{position:"relative",display:"inline-block",paddingInlineEnd:le.padding,color:le.colorText,fontSize:le.fontSizeLG,lineHeight:(0,Q.unit)(le.titleLineHeight),"&::after":{position:"absolute",top:le.calc(le.titleLineHeight).div(2).equal(),insetInlineStart:"100%",display:"block",width:9999,height:le.lineWidth,background:le.processTailColor,content:'""'}},[`${He}-subtitle`]:{display:"inline",marginInlineStart:le.marginXS,color:le.colorTextDescription,fontWeight:"normal",fontSize:le.fontSize},[`${He}-description`]:{color:le.colorTextDescription,fontSize:le.fontSize}},V(ke,le)),V(de,le)),{[`${He}-process > ${He}-container > ${He}-title`]:{fontWeight:le.fontWeightStrong}}),V(Y,le)),V(ye,le)),{[`${He}${Re}-next-error > ${Re}-item-title::after`]:{background:le.colorError},[`${He}-disabled`]:{cursor:"not-allowed"}})},W=le=>{const{componentCls:Re,motionDurationSlow:Me}=le;return{[`& ${Re}-item`]:{[`&:not(${Re}-item-active)`]:{[`& > ${Re}-item-container[role='button']`]:{cursor:"pointer",[`${Re}-item`]:{[`&-title, &-subtitle, &-description, &-icon ${Re}-icon`]:{transition:`color ${Me}`}},"&:hover":{[`${Re}-item`]:{"&-title, &-subtitle, &-description":{color:le.colorPrimary}}}},[`&:not(${Re}-item-process)`]:{[`& > ${Re}-item-container[role='button']:hover`]:{[`${Re}-item`]:{"&-icon":{borderColor:le.colorPrimary,[`${Re}-icon`]:{color:le.colorPrimary}}}}}}},[`&${Re}-horizontal:not(${Re}-label-vertical)`]:{[`${Re}-item`]:{paddingInlineStart:le.padding,whiteSpace:"nowrap","&:first-child":{paddingInlineStart:0},[`&:last-child ${Re}-item-title`]:{paddingInlineEnd:0},"&-tail":{display:"none"},"&-description":{maxWidth:le.descriptionMaxWidth,whiteSpace:"normal"}}}}},K=le=>{const{componentCls:Re}=le;return{[Re]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,B.Wf)(le)),{display:"flex",width:"100%",fontSize:0,textAlign:"initial"}),G(le)),W(le)),J(le)),ge(le)),De(le)),N(le)),ie(le)),ve(le)),ne(le)),ce(le)),q(le)),X(le))}},te=le=>({titleLineHeight:le.controlHeight,customIconSize:le.controlHeight,customIconTop:0,customIconFontSize:le.controlHeightSM,iconSize:le.controlHeight,iconTop:-.5,iconFontSize:le.fontSize,iconSizeSM:le.fontSizeHeading3,dotSize:le.controlHeight/4,dotCurrentSize:le.controlHeightLG/4,navArrowColor:le.colorTextDisabled,navContentMaxWidth:"unset",descriptionMaxWidth:140,waitIconColor:le.wireframe?le.colorTextDisabled:le.colorTextLabel,waitIconBgColor:le.wireframe?le.colorBgContainer:le.colorFillContent,waitIconBorderColor:le.wireframe?le.colorTextDisabled:"transparent",finishIconBgColor:le.wireframe?le.colorBgContainer:le.controlItemBgActive,finishIconBorderColor:le.wireframe?le.colorPrimary:le.controlItemBgActive});var U=(0,k.I$)("Steps",le=>{const{colorTextDisabled:Re,controlHeightLG:Me,colorTextLightSolid:He,colorText:Be,colorPrimary:Je,colorTextDescription:$e,colorTextQuaternary:rt,colorError:qe,colorBorderSecondary:pt,colorSplit:Pe}=le,Qe=(0,D.mergeToken)(le,{processIconColor:He,processTitleColor:Be,processDescriptionColor:Be,processIconBgColor:Je,processIconBorderColor:Je,processDotColor:Je,processTailColor:Pe,waitTitleColor:$e,waitDescriptionColor:$e,waitTailColor:Pe,waitDotColor:Re,finishIconColor:Je,finishTitleColor:Be,finishDescriptionColor:$e,finishTailColor:Je,finishDotColor:Je,errorIconColor:He,errorTitleColor:qe,errorDescriptionColor:qe,errorTailColor:Pe,errorIconBgColor:qe,errorIconBorderColor:qe,errorDotColor:qe,stepsNavActiveColor:Je,stepsProgressSize:Me,inlineDotSize:6,inlineTitleColor:rt,inlineTailColor:pt});return[K(Qe)]},te),L=Te(11592);function $(le){return le.filter(Re=>Re)}function ue(le,Re){if(le)return le;const Me=(0,L.Z)(Re).map(He=>{if(we.isValidElement(He)){const{props:Be}=He;return Object.assign({},Be)}return null});return $(Me)}var Ee=function(le,Re){var Me={};for(var He in le)Object.prototype.hasOwnProperty.call(le,He)&&Re.indexOf(He)<0&&(Me[He]=le[He]);if(le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Be=0,He=Object.getOwnPropertySymbols(le);Be<He.length;Be++)Re.indexOf(He[Be])<0&&Object.prototype.propertyIsEnumerable.call(le,He[Be])&&(Me[He[Be]]=le[He[Be]]);return Me};const ze=le=>{const{percent:Re,size:Me,className:He,rootClassName:Be,direction:Je,items:$e,responsive:rt=!0,current:qe=0,children:pt,style:Pe}=le,Qe=Ee(le,["percent","size","className","rootClassName","direction","items","responsive","current","children","style"]),{xs:nt}=(0,j.Z)(rt),{getPrefixCls:yt,direction:St,className:Lt,style:jt}=(0,C.dj)("steps"),Dt=we.useMemo(()=>rt&&nt?"vertical":Je,[nt,Je]),Ct=(0,E.Z)(Me),Mt=yt("steps",le.prefixCls),[Bt,Ut,Nt]=U(Mt),tr=le.type==="inline",Zt=yt("",le.iconPrefix),zt=ue($e,pt),Xe=tr?void 0:Re,Kt=Object.assign(Object.assign({},jt),Pe),Ft=R()(Lt,{[`${Mt}-rtl`]:St==="rtl",[`${Mt}-with-progress`]:Xe!==void 0},He,Be,Ut,Nt),kr={finish:we.createElement(st.Z,{className:`${Mt}-finish-icon`}),error:we.createElement(o.Z,{className:`${Mt}-error-icon`})},hr=$t=>{let{node:Xt,status:sr}=$t;if(sr==="process"&&Xe!==void 0){const Nr=Ct==="small"?32:40;return we.createElement("div",{className:`${Mt}-progress-icon`},we.createElement(Z.Z,{type:"circle",percent:Xe,size:Nr,strokeWidth:4,format:()=>null}),Xt)}return Xt},vr=($t,Xt)=>$t.description?we.createElement(P.Z,{title:$t.description},Xt):Xt;return Bt(we.createElement(S,Object.assign({icons:kr},Qe,{style:Kt,current:qe,size:Ct,items:zt,itemRender:tr?vr:void 0,stepIcon:hr,direction:Dt,prefixCls:Mt,iconPrefix:Zt,className:Ft})))};ze.Step=S.Step;var _e=ze},37645:function(or,mt,Te){"use strict";Te.d(mt,{ZP:function(){return p},qN:function(){return o},wZ:function(){return M}});var we=Te(36237),st=Te(36305);const o=8;function M(f){const{contentRadius:h,limitVerticalRadius:y}=f,g=h>12?h+2:12;return{arrowOffsetHorizontal:g,arrowOffsetVertical:y?o:g}}function R(f,h){return f?h:{}}function p(f,h,y){const{componentCls:g,boxShadowPopoverArrow:w,arrowOffsetVertical:c,arrowOffsetHorizontal:m}=f,{arrowDistance:v=0,arrowPlacement:b={left:!0,right:!0,top:!0,bottom:!0}}=y||{};return{[g]:Object.assign(Object.assign(Object.assign(Object.assign({[`${g}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},(0,st.W)(f,h,w)),{"&:before":{background:h}})]},R(!!b.top,{[[`&-placement-top > ${g}-arrow`,`&-placement-topLeft > ${g}-arrow`,`&-placement-topRight > ${g}-arrow`].join(",")]:{bottom:v,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${g}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":m,[`> ${g}-arrow`]:{left:{_skip_check_:!0,value:m}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${(0,we.unit)(m)})`,[`> ${g}-arrow`]:{right:{_skip_check_:!0,value:m}}}})),R(!!b.bottom,{[[`&-placement-bottom > ${g}-arrow`,`&-placement-bottomLeft > ${g}-arrow`,`&-placement-bottomRight > ${g}-arrow`].join(",")]:{top:v,transform:"translateY(-100%)"},[`&-placement-bottom > ${g}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":m,[`> ${g}-arrow`]:{left:{_skip_check_:!0,value:m}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${(0,we.unit)(m)})`,[`> ${g}-arrow`]:{right:{_skip_check_:!0,value:m}}}})),R(!!b.left,{[[`&-placement-left > ${g}-arrow`,`&-placement-leftTop > ${g}-arrow`,`&-placement-leftBottom > ${g}-arrow`].join(",")]:{right:{_skip_check_:!0,value:v},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${g}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${g}-arrow`]:{top:c},[`&-placement-leftBottom > ${g}-arrow`]:{bottom:c}})),R(!!b.right,{[[`&-placement-right > ${g}-arrow`,`&-placement-rightTop > ${g}-arrow`,`&-placement-rightBottom > ${g}-arrow`].join(",")]:{left:{_skip_check_:!0,value:v},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${g}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${g}-arrow`]:{top:c},[`&-placement-rightBottom > ${g}-arrow`]:{bottom:c}}))}}},36305:function(or,mt,Te){"use strict";Te.d(mt,{W:function(){return o},w:function(){return st}});var we=Te(36237);function st(M){const{sizePopupArrow:R,borderRadiusXS:p,borderRadiusOuter:f}=M,h=R/2,y=0,g=h,w=f*1/Math.sqrt(2),c=h-f*(1-1/Math.sqrt(2)),m=h-p*(1/Math.sqrt(2)),v=f*(Math.sqrt(2)-1)+p*(1/Math.sqrt(2)),b=2*h-m,x=v,T=2*h-w,S=c,C=2*h-y,E=g,j=h*Math.sqrt(2)+f*(Math.sqrt(2)-2),Z=f*(Math.sqrt(2)-1),P=`polygon(${Z}px 100%, 50% ${Z}px, ${2*h-Z}px 100%, ${Z}px 100%)`,Q=`path('M ${y} ${g} A ${f} ${f} 0 0 0 ${w} ${c} L ${m} ${v} A ${p} ${p} 0 0 1 ${b} ${x} L ${T} ${S} A ${f} ${f} 0 0 0 ${C} ${E} Z')`;return{arrowShadowWidth:j,arrowPath:Q,arrowPolygon:P}}const o=(M,R,p)=>{const{sizePopupArrow:f,arrowPolygon:h,arrowPath:y,arrowShadowWidth:g,borderRadiusXS:w,calc:c}=M;return{pointerEvents:"none",width:f,height:f,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:f,height:c(f).div(2).equal(),background:R,clipPath:{_multi_value_:!0,value:[h,y]},content:'""'},"&::after":{content:'""',position:"absolute",width:g,height:g,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${(0,we.unit)(w)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:p,zIndex:0,background:"transparent"}}}},93427:function(or,mt,Te){"use strict";Te.d(mt,{Z:function(){return st}});var we=Te(34998);function st(o,M){return we.i.reduce((R,p)=>{const f=o[`${p}1`],h=o[`${p}3`],y=o[`${p}6`],g=o[`${p}7`];return Object.assign(Object.assign({},R),M(p,{lightColor:f,lightBorderColor:h,darkColor:y,textColor:g}))},{})}},25399:function(or,mt,Te){"use strict";Te.d(mt,{Z:function(){return X}});var we=Te(59301),st=Te(92310),o=Te.n(st),M=Te(29125),R=Te(18929),p=Te(62487),f=Te(75030),h=Te(86641),y=Te(52838),g=Te(22703),w=Te(32383),c=Te(55743),m=Te(57700),v=Te(48755),b=Te(36237),x=Te(63356),T=Te(34925),S=Te(37645),C=Te(36305),E=Te(93427),j=Te(51636),Z=Te(16931);const P=ee=>{const{calc:ie,componentCls:he,tooltipMaxWidth:ne,tooltipColor:Ie,tooltipBg:q,tooltipBorderRadius:pe,zIndexPopup:ve,controlHeight:xe,boxShadowSecondary:ce,paddingSM:fe,paddingXS:ge,arrowOffsetHorizontal:Se,sizePopupArrow:De}=ee,ke=ie(pe).add(De).add(Se).equal(),de=ie(pe).mul(2).add(De).equal();return[{[he]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,x.Wf)(ee)),{position:"absolute",zIndex:ve,display:"block",width:"max-content",maxWidth:ne,visibility:"visible","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"&-hidden":{display:"none"},"--antd-arrow-background-color":q,[`${he}-inner`]:{minWidth:de,minHeight:xe,padding:`${(0,b.unit)(ee.calc(fe).div(2).equal())} ${(0,b.unit)(ge)}`,color:Ie,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:q,borderRadius:pe,boxShadow:ce,boxSizing:"border-box"},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:ke},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${he}-inner`]:{borderRadius:ee.min(pe,S.qN)}},[`${he}-content`]:{position:"relative"}}),(0,E.Z)(ee,(Y,ye)=>{let{darkColor:V}=ye;return{[`&${he}-${Y}`]:{[`${he}-inner`]:{backgroundColor:V},[`${he}-arrow`]:{"--antd-arrow-background-color":V}}}})),{"&-rtl":{direction:"rtl"}})},(0,S.ZP)(ee,"var(--antd-arrow-background-color)"),{[`${he}-pure`]:{position:"relative",maxWidth:"none",margin:ee.sizePopupArrow}}]},Q=ee=>Object.assign(Object.assign({zIndexPopup:ee.zIndexPopupBase+70},(0,S.wZ)({contentRadius:ee.borderRadius,limitVerticalRadius:!0})),(0,C.w)((0,j.mergeToken)(ee,{borderRadiusOuter:Math.min(ee.borderRadiusOuter,4)})));var B=function(ee){let ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return(0,Z.I$)("Tooltip",ne=>{const{borderRadius:Ie,colorTextLightSolid:q,colorBgSpotlight:pe}=ne,ve=(0,j.mergeToken)(ne,{tooltipMaxWidth:250,tooltipColor:q,tooltipBorderRadius:Ie,tooltipBg:pe});return[P(ve),(0,T._y)(ne,"zoom-big-fast")]},Q,{resetStyle:!1,injectStyle:ie})(ee)},k=Te(29509);function D(ee,ie){const he=(0,k.o2)(ie),ne=o()({[`${ee}-${ie}`]:ie&&he}),Ie={},q={};return ie&&!he&&(Ie.background=ie,q["--antd-arrow-background-color"]=ie),{className:ne,overlayStyle:Ie,arrowStyle:q}}var J=ee=>{const{prefixCls:ie,className:he,placement:ne="top",title:Ie,color:q,overlayInnerStyle:pe}=ee,{getPrefixCls:ve}=we.useContext(v.E_),xe=ve("tooltip",ie),[ce,fe,ge]=B(xe),Se=D(xe,q),De=Se.arrowStyle,ke=Object.assign(Object.assign({},pe),Se.overlayStyle),de=o()(fe,ge,xe,`${xe}-pure`,`${xe}-placement-${ne}`,he,Se.className);return ce(we.createElement("div",{className:de,style:De},we.createElement("div",{className:`${xe}-arrow`}),we.createElement(M.G,Object.assign({},ee,{className:fe,prefixCls:xe,overlayInnerStyle:ke}),Ie)))},H=function(ee,ie){var he={};for(var ne in ee)Object.prototype.hasOwnProperty.call(ee,ne)&&ie.indexOf(ne)<0&&(he[ne]=ee[ne]);if(ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ie=0,ne=Object.getOwnPropertySymbols(ee);Ie<ne.length;Ie++)ie.indexOf(ne[Ie])<0&&Object.prototype.propertyIsEnumerable.call(ee,ne[Ie])&&(he[ne[Ie]]=ee[ne[Ie]]);return he};const _=we.forwardRef((ee,ie)=>{var he,ne;const{prefixCls:Ie,openClassName:q,getTooltipContainer:pe,color:ve,overlayInnerStyle:xe,children:ce,afterOpenChange:fe,afterVisibleChange:ge,destroyTooltipOnHide:Se,arrow:De=!0,title:ke,overlay:de,builtinPlacements:Y,arrowPointAtCenter:ye=!1,autoAdjustOverflow:V=!0,motion:G,getPopupContainer:W,placement:K="top",mouseEnterDelay:te=.1,mouseLeaveDelay:U=.1,overlayStyle:L,rootClassName:$,overlayClassName:ue,styles:Ee,classNames:ze}=ee,_e=H(ee,["prefixCls","openClassName","getTooltipContainer","color","overlayInnerStyle","children","afterOpenChange","afterVisibleChange","destroyTooltipOnHide","arrow","title","overlay","builtinPlacements","arrowPointAtCenter","autoAdjustOverflow","motion","getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName","overlayClassName","styles","classNames"]),le=!!De,[,Re]=(0,m.ZP)(),{getPopupContainer:Me,getPrefixCls:He,direction:Be,className:Je,style:$e,classNames:rt,styles:qe}=(0,v.dj)("tooltip"),pt=(0,w.ln)("Tooltip"),Pe=we.useRef(null),Qe=()=>{var Tt;(Tt=Pe.current)===null||Tt===void 0||Tt.forceAlign()};we.useImperativeHandle(ie,()=>{var Tt,Mr;return{forceAlign:Qe,forcePopupAlign:()=>{pt.deprecated(!1,"forcePopupAlign","forceAlign"),Qe()},nativeElement:(Tt=Pe.current)===null||Tt===void 0?void 0:Tt.nativeElement,popupElement:(Mr=Pe.current)===null||Mr===void 0?void 0:Mr.popupElement}});const[nt,yt]=(0,R.Z)(!1,{value:(he=ee.open)!==null&&he!==void 0?he:ee.visible,defaultValue:(ne=ee.defaultOpen)!==null&&ne!==void 0?ne:ee.defaultVisible}),St=!ke&&!de&&ke!==0,Lt=Tt=>{var Mr,Jt;yt(St?!1:Tt),St||((Mr=ee.onOpenChange)===null||Mr===void 0||Mr.call(ee,Tt),(Jt=ee.onVisibleChange)===null||Jt===void 0||Jt.call(ee,Tt))},jt=we.useMemo(()=>{var Tt,Mr;let Jt=ye;return typeof De=="object"&&(Jt=(Mr=(Tt=De.pointAtCenter)!==null&&Tt!==void 0?Tt:De.arrowPointAtCenter)!==null&&Mr!==void 0?Mr:ye),Y||(0,y.Z)({arrowPointAtCenter:Jt,autoAdjustOverflow:V,arrowWidth:le?Re.sizePopupArrow:0,borderRadius:Re.borderRadius,offset:Re.marginXXS,visibleFirst:!0})},[ye,De,Y,Re]),Dt=we.useMemo(()=>ke===0?ke:de||ke||"",[de,ke]),Ct=we.createElement(p.Z,{space:!0},typeof Dt=="function"?Dt():Dt),Mt=He("tooltip",Ie),Bt=He(),Ut=ee["data-popover-inject"];let Nt=nt;!("open"in ee)&&!("visible"in ee)&&St&&(Nt=!1);const tr=we.isValidElement(ce)&&!(0,g.M2)(ce)?ce:we.createElement("span",null,ce),Zt=tr.props,zt=!Zt.className||typeof Zt.className=="string"?o()(Zt.className,q||`${Mt}-open`):Zt.className,[Xe,Kt,Ft]=B(Mt,!Ut),kr=D(Mt,ve),hr=kr.arrowStyle,vr=o()(ue,{[`${Mt}-rtl`]:Be==="rtl"},kr.className,$,Kt,Ft,Je,rt.root,ze==null?void 0:ze.root),$t=o()(rt.body,ze==null?void 0:ze.body),[Xt,sr]=(0,f.Cn)("Tooltip",_e.zIndex),Nr=we.createElement(M.Z,Object.assign({},_e,{zIndex:Xt,showArrow:le,placement:K,mouseEnterDelay:te,mouseLeaveDelay:U,prefixCls:Mt,classNames:{root:vr,body:$t},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},hr),qe.root),$e),L),Ee==null?void 0:Ee.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},qe.body),xe),Ee==null?void 0:Ee.body),kr.overlayStyle)},getTooltipContainer:W||pe||Me,ref:Pe,builtinPlacements:jt,overlay:Ct,visible:Nt,onVisibleChange:Lt,afterVisibleChange:fe!=null?fe:ge,arrowContent:we.createElement("span",{className:`${Mt}-arrow-content`}),motion:{motionName:(0,h.m)(Bt,"zoom-big-fast",ee.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!Se}),Nt?(0,g.Tm)(tr,{className:zt}):tr);return Xe(we.createElement(c.Z.Provider,{value:sr},Nr))});_._InternalPanelDoNotUseOrYouWillBeFired=J;var X=_},94968:function(or,mt,Te){"use strict";Te.d(mt,{default:function(){return yr}});var we=Te(59301),st=Te(77654),o=Te(4676),M=Te(92310),R=Te.n(M),p=Te(60499),f=Te(38705),h=Te(17212),y=Te(15793),g=Te(39153),w=Te(55401),c=Te(18642),m=Te(85899),v=Te(42244),b=Te(43749),x=Te(73001),T=Te(11576),S=Te(26112),C=Te(48736),E=function(Ge,Ye){if(Ge&&Ye){var ot=Array.isArray(Ye)?Ye:Ye.split(","),ut=Ge.name||"",dt=Ge.type||"",ht=dt.replace(/\/.*$/,"");return ot.some(function(xt){var it=xt.trim();if(/^\*(\/\*)?$/.test(xt))return!0;if(it.charAt(0)==="."){var Wt=ut.toLowerCase(),Pt=it.toLowerCase(),lt=[Pt];return(Pt===".jpg"||Pt===".jpeg")&&(lt=[".jpg",".jpeg"]),lt.some(function(rr){return Wt.endsWith(rr)})}return/\/\*$/.test(it)?ht===it.replace(/\/.*$/,""):dt===it?!0:/^\w+$/.test(it)?((0,C.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(it,"'.Skip for check.")),!0):!1})}return!0};function j(Ge,Ye){var ot="cannot ".concat(Ge.method," ").concat(Ge.action," ").concat(Ye.status,"'"),ut=new Error(ot);return ut.status=Ye.status,ut.method=Ge.method,ut.url=Ge.action,ut}function Z(Ge){var Ye=Ge.responseText||Ge.response;if(!Ye)return Ye;try{return JSON.parse(Ye)}catch(ot){return Ye}}function P(Ge){var Ye=new XMLHttpRequest;Ge.onProgress&&Ye.upload&&(Ye.upload.onprogress=function(ht){ht.total>0&&(ht.percent=ht.loaded/ht.total*100),Ge.onProgress(ht)});var ot=new FormData;Ge.data&&Object.keys(Ge.data).forEach(function(dt){var ht=Ge.data[dt];if(Array.isArray(ht)){ht.forEach(function(xt){ot.append("".concat(dt,"[]"),xt)});return}ot.append(dt,ht)}),Ge.file instanceof Blob?ot.append(Ge.filename,Ge.file,Ge.file.name):ot.append(Ge.filename,Ge.file),Ye.onerror=function(ht){Ge.onError(ht)},Ye.onload=function(){return Ye.status<200||Ye.status>=300?Ge.onError(j(Ge,Ye),Z(Ye)):Ge.onSuccess(Z(Ye),Ye)},Ye.open(Ge.method,Ge.action,!0),Ge.withCredentials&&"withCredentials"in Ye&&(Ye.withCredentials=!0);var ut=Ge.headers||{};return ut["X-Requested-With"]!==null&&Ye.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(ut).forEach(function(dt){ut[dt]!==null&&Ye.setRequestHeader(dt,ut[dt])}),Ye.send(ot),{abort:function(){Ye.abort()}}}var Q=function(){var Ge=(0,T.Z)((0,x.Z)().mark(function Ye(ot,ut){var dt,ht,xt,it,Wt,Pt,lt,rr;return(0,x.Z)().wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:Pt=function(){return Pt=(0,T.Z)((0,x.Z)().mark(function Er(jr){return(0,x.Z)().wrap(function(Cr){for(;;)switch(Cr.prev=Cr.next){case 0:return Cr.abrupt("return",new Promise(function(br){jr.file(function(ar){ut(ar)?(jr.fullPath&&!ar.webkitRelativePath&&(Object.defineProperties(ar,{webkitRelativePath:{writable:!0}}),ar.webkitRelativePath=jr.fullPath.replace(/^\//,""),Object.defineProperties(ar,{webkitRelativePath:{writable:!1}})),br(ar)):br(null)})}));case 1:case"end":return Cr.stop()}},Er)})),Pt.apply(this,arguments)},Wt=function(Er){return Pt.apply(this,arguments)},it=function(){return it=(0,T.Z)((0,x.Z)().mark(function Er(jr){var Wr,Cr,br,ar,Rt;return(0,x.Z)().wrap(function(nr){for(;;)switch(nr.prev=nr.next){case 0:Wr=jr.createReader(),Cr=[];case 2:return nr.next=5,new Promise(function(mr){Wr.readEntries(mr,function(){return mr([])})});case 5:if(br=nr.sent,ar=br.length,ar){nr.next=9;break}return nr.abrupt("break",12);case 9:for(Rt=0;Rt<ar;Rt++)Cr.push(br[Rt]);nr.next=2;break;case 12:return nr.abrupt("return",Cr);case 13:case"end":return nr.stop()}},Er)})),it.apply(this,arguments)},xt=function(Er){return it.apply(this,arguments)},dt=[],ht=[],ot.forEach(function(pr){return ht.push(pr.webkitGetAsEntry())}),lt=function(){var pr=(0,T.Z)((0,x.Z)().mark(function Er(jr,Wr){var Cr,br;return(0,x.Z)().wrap(function(Rt){for(;;)switch(Rt.prev=Rt.next){case 0:if(jr){Rt.next=2;break}return Rt.abrupt("return");case 2:if(jr.path=Wr||"",!jr.isFile){Rt.next=10;break}return Rt.next=6,Wt(jr);case 6:Cr=Rt.sent,Cr&&dt.push(Cr),Rt.next=15;break;case 10:if(!jr.isDirectory){Rt.next=15;break}return Rt.next=13,xt(jr);case 13:br=Rt.sent,ht.push.apply(ht,(0,st.Z)(br));case 15:case"end":return Rt.stop()}},Er)}));return function(jr,Wr){return pr.apply(this,arguments)}}(),rr=0;case 9:if(!(rr<ht.length)){dr.next=15;break}return dr.next=12,lt(ht[rr]);case 12:rr++,dr.next=9;break;case 15:return dr.abrupt("return",dt);case 16:case"end":return dr.stop()}},Ye)}));return function(ot,ut){return Ge.apply(this,arguments)}}(),B=Q,k=+new Date,D=0;function F(){return"rc-upload-".concat(k,"-").concat(++D)}var J=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],H=function(Ge){(0,g.Z)(ot,Ge);var Ye=(0,w.Z)(ot);function ot(){var ut;(0,f.Z)(this,ot);for(var dt=arguments.length,ht=new Array(dt),xt=0;xt<dt;xt++)ht[xt]=arguments[xt];return ut=Ye.call.apply(Ye,[this].concat(ht)),(0,c.Z)((0,y.Z)(ut),"state",{uid:F()}),(0,c.Z)((0,y.Z)(ut),"reqs",{}),(0,c.Z)((0,y.Z)(ut),"fileInput",void 0),(0,c.Z)((0,y.Z)(ut),"_isMounted",void 0),(0,c.Z)((0,y.Z)(ut),"onChange",function(it){var Wt=ut.props,Pt=Wt.accept,lt=Wt.directory,rr=it.target.files,er=(0,st.Z)(rr).filter(function(dr){return!lt||E(dr,Pt)});ut.uploadFiles(er),ut.reset()}),(0,c.Z)((0,y.Z)(ut),"onClick",function(it){var Wt=ut.fileInput;if(Wt){var Pt=it.target,lt=ut.props.onClick;if(Pt&&Pt.tagName==="BUTTON"){var rr=Wt.parentNode;rr.focus(),Pt.blur()}Wt.click(),lt&&lt(it)}}),(0,c.Z)((0,y.Z)(ut),"onKeyDown",function(it){it.key==="Enter"&&ut.onClick(it)}),(0,c.Z)((0,y.Z)(ut),"onFileDrop",function(){var it=(0,T.Z)((0,x.Z)().mark(function Wt(Pt){var lt,rr,er;return(0,x.Z)().wrap(function(pr){for(;;)switch(pr.prev=pr.next){case 0:if(lt=ut.props.multiple,Pt.preventDefault(),Pt.type!=="dragover"){pr.next=4;break}return pr.abrupt("return");case 4:if(!ut.props.directory){pr.next=11;break}return pr.next=7,B(Array.prototype.slice.call(Pt.dataTransfer.items),function(Er){return E(Er,ut.props.accept)});case 7:rr=pr.sent,ut.uploadFiles(rr),pr.next=14;break;case 11:er=(0,st.Z)(Pt.dataTransfer.files).filter(function(Er){return E(Er,ut.props.accept)}),lt===!1&&(er=er.slice(0,1)),ut.uploadFiles(er);case 14:case"end":return pr.stop()}},Wt)}));return function(Wt){return it.apply(this,arguments)}}()),(0,c.Z)((0,y.Z)(ut),"uploadFiles",function(it){var Wt=(0,st.Z)(it),Pt=Wt.map(function(lt){return lt.uid=F(),ut.processFile(lt,Wt)});Promise.all(Pt).then(function(lt){var rr=ut.props.onBatchStart;rr==null||rr(lt.map(function(er){var dr=er.origin,pr=er.parsedFile;return{file:dr,parsedFile:pr}})),lt.filter(function(er){return er.parsedFile!==null}).forEach(function(er){ut.post(er)})})}),(0,c.Z)((0,y.Z)(ut),"processFile",function(){var it=(0,T.Z)((0,x.Z)().mark(function Wt(Pt,lt){var rr,er,dr,pr,Er,jr,Wr,Cr,br;return(0,x.Z)().wrap(function(Rt){for(;;)switch(Rt.prev=Rt.next){case 0:if(rr=ut.props.beforeUpload,er=Pt,!rr){Rt.next=14;break}return Rt.prev=3,Rt.next=6,rr(Pt,lt);case 6:er=Rt.sent,Rt.next=12;break;case 9:Rt.prev=9,Rt.t0=Rt.catch(3),er=!1;case 12:if(er!==!1){Rt.next=14;break}return Rt.abrupt("return",{origin:Pt,parsedFile:null,action:null,data:null});case 14:if(dr=ut.props.action,typeof dr!="function"){Rt.next=21;break}return Rt.next=18,dr(Pt);case 18:pr=Rt.sent,Rt.next=22;break;case 21:pr=dr;case 22:if(Er=ut.props.data,typeof Er!="function"){Rt.next=29;break}return Rt.next=26,Er(Pt);case 26:jr=Rt.sent,Rt.next=30;break;case 29:jr=Er;case 30:return Wr=((0,b.Z)(er)==="object"||typeof er=="string")&&er?er:Pt,Wr instanceof File?Cr=Wr:Cr=new File([Wr],Pt.name,{type:Pt.type}),br=Cr,br.uid=Pt.uid,Rt.abrupt("return",{origin:Pt,data:jr,parsedFile:br,action:pr});case 35:case"end":return Rt.stop()}},Wt,null,[[3,9]])}));return function(Wt,Pt){return it.apply(this,arguments)}}()),(0,c.Z)((0,y.Z)(ut),"saveFileInput",function(it){ut.fileInput=it}),ut}return(0,h.Z)(ot,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(dt){var ht=this,xt=dt.data,it=dt.origin,Wt=dt.action,Pt=dt.parsedFile;if(this._isMounted){var lt=this.props,rr=lt.onStart,er=lt.customRequest,dr=lt.name,pr=lt.headers,Er=lt.withCredentials,jr=lt.method,Wr=it.uid,Cr=er||P,br={action:Wt,filename:dr,data:xt,file:Pt,headers:pr,withCredentials:Er,method:jr||"post",onProgress:function(Rt){var fn=ht.props.onProgress;fn==null||fn(Rt,Pt)},onSuccess:function(Rt,fn){var nr=ht.props.onSuccess;nr==null||nr(Rt,Pt,fn),delete ht.reqs[Wr]},onError:function(Rt,fn){var nr=ht.props.onError;nr==null||nr(Rt,fn,Pt),delete ht.reqs[Wr]}};rr(it),this.reqs[Wr]=Cr(br)}}},{key:"reset",value:function(){this.setState({uid:F()})}},{key:"abort",value:function(dt){var ht=this.reqs;if(dt){var xt=dt.uid?dt.uid:dt;ht[xt]&&ht[xt].abort&&ht[xt].abort(),delete ht[xt]}else Object.keys(ht).forEach(function(it){ht[it]&&ht[it].abort&&ht[it].abort(),delete ht[it]})}},{key:"render",value:function(){var dt=this.props,ht=dt.component,xt=dt.prefixCls,it=dt.className,Wt=dt.classNames,Pt=Wt===void 0?{}:Wt,lt=dt.disabled,rr=dt.id,er=dt.name,dr=dt.style,pr=dt.styles,Er=pr===void 0?{}:pr,jr=dt.multiple,Wr=dt.accept,Cr=dt.capture,br=dt.children,ar=dt.directory,Rt=dt.openFileDialogOnClick,fn=dt.onMouseEnter,nr=dt.onMouseLeave,mr=dt.hasControlInside,Br=(0,v.Z)(dt,J),dn=R()((0,c.Z)((0,c.Z)((0,c.Z)({},xt,!0),"".concat(xt,"-disabled"),lt),it,it)),sn=ar?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},vn=lt?{}:{onClick:Rt?this.onClick:function(){},onKeyDown:Rt?this.onKeyDown:function(){},onMouseEnter:fn,onMouseLeave:nr,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:mr?void 0:"0"};return we.createElement(ht,(0,p.Z)({},vn,{className:dn,role:mr?void 0:"button",style:dr}),we.createElement("input",(0,p.Z)({},(0,S.Z)(Br,{aria:!0,data:!0}),{id:rr,name:er,disabled:lt,type:"file",ref:this.saveFileInput,onClick:function(Xn){return Xn.stopPropagation()},key:this.state.uid,style:(0,m.Z)({display:"none"},Er.input),className:Pt.input,accept:Wr},sn,{multiple:jr,onChange:this.onChange},Cr!=null?{capture:Cr}:{})),br)}}]),ot}(we.Component),N=H;function _(){}var X=function(Ge){(0,g.Z)(ot,Ge);var Ye=(0,w.Z)(ot);function ot(){var ut;(0,f.Z)(this,ot);for(var dt=arguments.length,ht=new Array(dt),xt=0;xt<dt;xt++)ht[xt]=arguments[xt];return ut=Ye.call.apply(Ye,[this].concat(ht)),(0,c.Z)((0,y.Z)(ut),"uploader",void 0),(0,c.Z)((0,y.Z)(ut),"saveUploader",function(it){ut.uploader=it}),ut}return(0,h.Z)(ot,[{key:"abort",value:function(dt){this.uploader.abort(dt)}},{key:"render",value:function(){return we.createElement(N,(0,p.Z)({},this.props,{ref:this.saveUploader}))}}]),ot}(we.Component);(0,c.Z)(X,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:_,onError:_,onSuccess:_,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});var ee=X,ie=ee,he=Te(18929),ne=Te(48755),Ie=Te(2171),q=Te(9017),pe=Te(85981),ve=Te(63356),xe=Te(34961),ce=Te(16931),fe=Te(51636),ge=Te(36237),De=Ge=>{const{componentCls:Ye,iconCls:ot}=Ge;return{[`${Ye}-wrapper`]:{[`${Ye}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:Ge.colorFillAlter,border:`${(0,ge.unit)(Ge.lineWidth)} dashed ${Ge.colorBorder}`,borderRadius:Ge.borderRadiusLG,cursor:"pointer",transition:`border-color ${Ge.motionDurationSlow}`,[Ye]:{padding:Ge.padding},[`${Ye}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none",borderRadius:Ge.borderRadiusLG,"&:focus-visible":{outline:`${(0,ge.unit)(Ge.lineWidthFocus)} solid ${Ge.colorPrimaryBorder}`}},[`${Ye}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`
&:not(${Ye}-disabled):hover,
&-hover:not(${Ye}-disabled)
`]:{borderColor:Ge.colorPrimaryHover},[`p${Ye}-drag-icon`]:{marginBottom:Ge.margin,[ot]:{color:Ge.colorPrimary,fontSize:Ge.uploadThumbnailSize}},[`p${Ye}-text`]:{margin:`0 0 ${(0,ge.unit)(Ge.marginXXS)}`,color:Ge.colorTextHeading,fontSize:Ge.fontSizeLG},[`p${Ye}-hint`]:{color:Ge.colorTextDescription,fontSize:Ge.fontSize},[`&${Ye}-disabled`]:{[`p${Ye}-drag-icon ${ot},
p${Ye}-text,
p${Ye}-hint
`]:{color:Ge.colorTextDisabled}}}}}},de=Ge=>{const{componentCls:Ye,iconCls:ot,fontSize:ut,lineHeight:dt,calc:ht}=Ge,xt=`${Ye}-list-item`,it=`${xt}-actions`,Wt=`${xt}-action`;return{[`${Ye}-wrapper`]:{[`${Ye}-list`]:Object.assign(Object.assign({},(0,ve.dF)()),{lineHeight:Ge.lineHeight,[xt]:{position:"relative",height:ht(Ge.lineHeight).mul(ut).equal(),marginTop:Ge.marginXS,fontSize:ut,display:"flex",alignItems:"center",transition:`background-color ${Ge.motionDurationSlow}`,borderRadius:Ge.borderRadiusSM,"&:hover":{backgroundColor:Ge.controlItemBgHover},[`${xt}-name`]:Object.assign(Object.assign({},ve.vS),{padding:`0 ${(0,ge.unit)(Ge.paddingXS)}`,lineHeight:dt,flex:"auto",transition:`all ${Ge.motionDurationSlow}`}),[it]:{whiteSpace:"nowrap",[Wt]:{opacity:0},[ot]:{color:Ge.actionsColor,transition:`all ${Ge.motionDurationSlow}`},[`
${Wt}:focus-visible,
&.picture ${Wt}
`]:{opacity:1}},[`${Ye}-icon ${ot}`]:{color:Ge.colorTextDescription,fontSize:ut},[`${xt}-progress`]:{position:"absolute",bottom:Ge.calc(Ge.uploadProgressOffset).mul(-1).equal(),width:"100%",paddingInlineStart:ht(ut).add(Ge.paddingXS).equal(),fontSize:ut,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${xt}:hover ${Wt}`]:{opacity:1},[`${xt}-error`]:{color:Ge.colorError,[`${xt}-name, ${Ye}-icon ${ot}`]:{color:Ge.colorError},[it]:{[`${ot}, ${ot}:hover`]:{color:Ge.colorError},[Wt]:{opacity:1}}},[`${Ye}-list-item-container`]:{transition:`opacity ${Ge.motionDurationSlow}, height ${Ge.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},Y=Te(99495),V=Ge=>{const{componentCls:Ye}=Ge,ot=new ge.Keyframes("uploadAnimateInlineIn",{from:{width:0,height:0,padding:0,opacity:0,margin:Ge.calc(Ge.marginXS).div(-2).equal()}}),ut=new ge.Keyframes("uploadAnimateInlineOut",{to:{width:0,height:0,padding:0,opacity:0,margin:Ge.calc(Ge.marginXS).div(-2).equal()}}),dt=`${Ye}-animate-inline`;return[{[`${Ye}-wrapper`]:{[`${dt}-appear, ${dt}-enter, ${dt}-leave`]:{animationDuration:Ge.motionDurationSlow,animationTimingFunction:Ge.motionEaseInOutCirc,animationFillMode:"forwards"},[`${dt}-appear, ${dt}-enter`]:{animationName:ot},[`${dt}-leave`]:{animationName:ut}}},{[`${Ye}-wrapper`]:(0,Y.J$)(Ge)},ot,ut]},G=Te(68361);const W=Ge=>{const{componentCls:Ye,iconCls:ot,uploadThumbnailSize:ut,uploadProgressOffset:dt,calc:ht}=Ge,xt=`${Ye}-list`,it=`${xt}-item`;return{[`${Ye}-wrapper`]:{[`
${xt}${xt}-picture,
${xt}${xt}-picture-card,
${xt}${xt}-picture-circle
`]:{[it]:{position:"relative",height:ht(ut).add(ht(Ge.lineWidth).mul(2)).add(ht(Ge.paddingXS).mul(2)).equal(),padding:Ge.paddingXS,border:`${(0,ge.unit)(Ge.lineWidth)} ${Ge.lineType} ${Ge.colorBorder}`,borderRadius:Ge.borderRadiusLG,"&:hover":{background:"transparent"},[`${it}-thumbnail`]:Object.assign(Object.assign({},ve.vS),{width:ut,height:ut,lineHeight:(0,ge.unit)(ht(ut).add(Ge.paddingSM).equal()),textAlign:"center",flex:"none",[ot]:{fontSize:Ge.fontSizeHeading2,color:Ge.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${it}-progress`]:{bottom:dt,width:`calc(100% - ${(0,ge.unit)(ht(Ge.paddingSM).mul(2).equal())})`,marginTop:0,paddingInlineStart:ht(ut).add(Ge.paddingXS).equal()}},[`${it}-error`]:{borderColor:Ge.colorError,[`${it}-thumbnail ${ot}`]:{[`svg path[fill='${G.blue[0]}']`]:{fill:Ge.colorErrorBg},[`svg path[fill='${G.blue.primary}']`]:{fill:Ge.colorError}}},[`${it}-uploading`]:{borderStyle:"dashed",[`${it}-name`]:{marginBottom:dt}}},[`${xt}${xt}-picture-circle ${it}`]:{[`&, &::before, ${it}-thumbnail`]:{borderRadius:"50%"}}}}},K=Ge=>{const{componentCls:Ye,iconCls:ot,fontSizeLG:ut,colorTextLightSolid:dt,calc:ht}=Ge,xt=`${Ye}-list`,it=`${xt}-item`,Wt=Ge.uploadPicCardSize;return{[`
${Ye}-wrapper${Ye}-picture-card-wrapper,
${Ye}-wrapper${Ye}-picture-circle-wrapper
`]:Object.assign(Object.assign({},(0,ve.dF)()),{display:"block",[`${Ye}${Ye}-select`]:{width:Wt,height:Wt,textAlign:"center",verticalAlign:"top",backgroundColor:Ge.colorFillAlter,border:`${(0,ge.unit)(Ge.lineWidth)} dashed ${Ge.colorBorder}`,borderRadius:Ge.borderRadiusLG,cursor:"pointer",transition:`border-color ${Ge.motionDurationSlow}`,[`> ${Ye}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${Ye}-disabled):hover`]:{borderColor:Ge.colorPrimary}},[`${xt}${xt}-picture-card, ${xt}${xt}-picture-circle`]:{display:"flex",flexWrap:"wrap","@supports not (gap: 1px)":{"& > *":{marginBlockEnd:Ge.marginXS,marginInlineEnd:Ge.marginXS}},"@supports (gap: 1px)":{gap:Ge.marginXS},[`${xt}-item-container`]:{display:"inline-block",width:Wt,height:Wt,verticalAlign:"top"},"&::after":{display:"none"},"&::before":{display:"none"},[it]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${(0,ge.unit)(ht(Ge.paddingXS).mul(2).equal())})`,height:`calc(100% - ${(0,ge.unit)(ht(Ge.paddingXS).mul(2).equal())})`,backgroundColor:Ge.colorBgMask,opacity:0,transition:`all ${Ge.motionDurationSlow}`,content:'" "'}},[`${it}:hover`]:{[`&::before, ${it}-actions`]:{opacity:1}},[`${it}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${Ge.motionDurationSlow}`,[`
${ot}-eye,
${ot}-download,
${ot}-delete
`]:{zIndex:10,width:ut,margin:`0 ${(0,ge.unit)(Ge.marginXXS)}`,fontSize:ut,cursor:"pointer",transition:`all ${Ge.motionDurationSlow}`,color:dt,"&:hover":{color:dt},svg:{verticalAlign:"baseline"}}},[`${it}-thumbnail, ${it}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${it}-name`]:{display:"none",textAlign:"center"},[`${it}-file + ${it}-name`]:{position:"absolute",bottom:Ge.margin,display:"block",width:`calc(100% - ${(0,ge.unit)(ht(Ge.paddingXS).mul(2).equal())})`},[`${it}-uploading`]:{[`&${it}`]:{backgroundColor:Ge.colorFillAlter},[`&::before, ${ot}-eye, ${ot}-download, ${ot}-delete`]:{display:"none"}},[`${it}-progress`]:{bottom:Ge.marginXL,width:`calc(100% - ${(0,ge.unit)(ht(Ge.paddingXS).mul(2).equal())})`,paddingInlineStart:0}}}),[`${Ye}-wrapper${Ye}-picture-circle-wrapper`]:{[`${Ye}${Ye}-select`]:{borderRadius:"50%"}}}};var U=Ge=>{const{componentCls:Ye}=Ge;return{[`${Ye}-rtl`]:{direction:"rtl"}}};const L=Ge=>{const{componentCls:Ye,colorTextDisabled:ot}=Ge;return{[`${Ye}-wrapper`]:Object.assign(Object.assign({},(0,ve.Wf)(Ge)),{[Ye]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${Ye}-select`]:{display:"inline-block"},[`${Ye}-hidden`]:{display:"none"},[`${Ye}-disabled`]:{color:ot,cursor:"not-allowed"}})}},$=Ge=>({actionsColor:Ge.colorTextDescription});var ue=(0,ce.I$)("Upload",Ge=>{const{fontSizeHeading3:Ye,fontHeight:ot,lineWidth:ut,controlHeightLG:dt,calc:ht}=Ge,xt=(0,fe.mergeToken)(Ge,{uploadThumbnailSize:ht(Ye).mul(2).equal(),uploadProgressOffset:ht(ht(ot).div(2)).add(ut).equal(),uploadPicCardSize:ht(dt).mul(2.55).equal()});return[L(xt),De(xt),W(xt),K(xt),de(xt),V(xt),U(xt),(0,xe.Z)(xt)]},$),Ee={icon:function(Ye,ot){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:ot}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:Ye}}]}},name:"file",theme:"twotone"},ze=Ee,_e=Te(7657),le=function(Ye,ot){return we.createElement(_e.Z,(0,p.Z)({},Ye,{ref:ot,icon:ze}))},Re=we.forwardRef(le),Me=Re,He=Te(58617),Be={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"},Je=Be,$e=function(Ye,ot){return we.createElement(_e.Z,(0,p.Z)({},Ye,{ref:ot,icon:Je}))},rt=we.forwardRef($e),qe=rt,pt={icon:function(Ye,ot){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:Ye}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:ot}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:ot}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:ot}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:Ye}}]}},name:"picture",theme:"twotone"},Pe=pt,Qe=function(Ye,ot){return we.createElement(_e.Z,(0,p.Z)({},Ye,{ref:ot,icon:Pe}))},nt=we.forwardRef(Qe),yt=nt,St=Te(77900),Lt=Te(2738),jt=Te(40192),Dt=Te(86641),Ct=Te(22703),Mt=Te(7939);function Bt(Ge){return Object.assign(Object.assign({},Ge),{lastModified:Ge.lastModified,lastModifiedDate:Ge.lastModifiedDate,name:Ge.name,size:Ge.size,type:Ge.type,uid:Ge.uid,percent:0,originFileObj:Ge})}function Ut(Ge,Ye){const ot=(0,st.Z)(Ye),ut=ot.findIndex(dt=>{let{uid:ht}=dt;return ht===Ge.uid});return ut===-1?ot.push(Ge):ot[ut]=Ge,ot}function Nt(Ge,Ye){const ot=Ge.uid!==void 0?"uid":"name";return Ye.filter(ut=>ut[ot]===Ge[ot])[0]}function tr(Ge,Ye){const ot=Ge.uid!==void 0?"uid":"name",ut=Ye.filter(dt=>dt[ot]!==Ge[ot]);return ut.length===Ye.length?null:ut}const Zt=function(){const Ye=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),ut=Ye[Ye.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(ut)||[""])[0]},zt=Ge=>Ge.indexOf("image/")===0,Xe=Ge=>{if(Ge.type&&!Ge.thumbUrl)return zt(Ge.type);const Ye=Ge.thumbUrl||Ge.url||"",ot=Zt(Ye);return/^data:image\//.test(Ye)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(ot)?!0:!(/^data:/.test(Ye)||ot)},Kt=200;function Ft(Ge){return new Promise(Ye=>{if(!Ge.type||!zt(Ge.type)){Ye("");return}const ot=document.createElement("canvas");ot.width=Kt,ot.height=Kt,ot.style.cssText=`position: fixed; left: 0; top: 0; width: ${Kt}px; height: ${Kt}px; z-index: 9999; display: none;`,document.body.appendChild(ot);const ut=ot.getContext("2d"),dt=new Image;if(dt.onload=()=>{const{width:ht,height:xt}=dt;let it=Kt,Wt=Kt,Pt=0,lt=0;ht>xt?(Wt=xt*(Kt/ht),lt=-(Wt-it)/2):(it=ht*(Kt/xt),Pt=-(it-Wt)/2),ut.drawImage(dt,Pt,lt,it,Wt);const rr=ot.toDataURL();document.body.removeChild(ot),window.URL.revokeObjectURL(dt.src),Ye(rr)},dt.crossOrigin="anonymous",Ge.type.startsWith("image/svg+xml")){const ht=new FileReader;ht.onload=()=>{ht.result&&typeof ht.result=="string"&&(dt.src=ht.result)},ht.readAsDataURL(Ge)}else if(Ge.type.startsWith("image/gif")){const ht=new FileReader;ht.onload=()=>{ht.result&&Ye(ht.result)},ht.readAsDataURL(Ge)}else dt.src=window.URL.createObjectURL(Ge)})}var kr=Te(26227),hr=Te(41464),vr=Te(15277),$t=Te(89787),Xt=Te(25399),Nr=we.forwardRef((Ge,Ye)=>{let{prefixCls:ot,className:ut,style:dt,locale:ht,listType:xt,file:it,items:Wt,progress:Pt,iconRender:lt,actionIconRender:rr,itemRender:er,isImgUrl:dr,showPreviewIcon:pr,showRemoveIcon:Er,showDownloadIcon:jr,previewIcon:Wr,removeIcon:Cr,downloadIcon:br,extra:ar,onPreview:Rt,onDownload:fn,onClose:nr}=Ge;var mr,Br;const{status:dn}=it,[sn,vn]=we.useState(dn);we.useEffect(()=>{dn!=="removed"&&vn(dn)},[dn]);const[Qn,Xn]=we.useState(!1);we.useEffect(()=>{const wr=setTimeout(()=>{Xn(!0)},300);return()=>{clearTimeout(wr)}},[]);const _n=lt(it);let gn=we.createElement("div",{className:`${ot}-icon`},_n);if(xt==="picture"||xt==="picture-card"||xt==="picture-circle")if(sn==="uploading"||!it.thumbUrl&&!it.url){const wr=R()(`${ot}-list-item-thumbnail`,{[`${ot}-list-item-file`]:sn!=="uploading"});gn=we.createElement("div",{className:wr},_n)}else{const wr=dr!=null&&dr(it)?we.createElement("img",{src:it.thumbUrl||it.url,alt:it.name,className:`${ot}-list-item-image`,crossOrigin:it.crossOrigin}):_n,zr=R()(`${ot}-list-item-thumbnail`,{[`${ot}-list-item-file`]:dr&&!dr(it)});gn=we.createElement("a",{className:zr,onClick:Gn=>Rt(it,Gn),href:it.url||it.thumbUrl,target:"_blank",rel:"noopener noreferrer"},wr)}const un=R()(`${ot}-list-item`,`${ot}-list-item-${sn}`),Fn=typeof it.linkProps=="string"?JSON.parse(it.linkProps):it.linkProps,Ln=(typeof Er=="function"?Er(it):Er)?rr((typeof Cr=="function"?Cr(it):Cr)||we.createElement(kr.Z,null),()=>nr(it),ot,ht.removeFile,!0):null,Un=(typeof jr=="function"?jr(it):jr)&&sn==="done"?rr((typeof br=="function"?br(it):br)||we.createElement(hr.Z,null),()=>fn(it),ot,ht.downloadFile):null,Kn=xt!=="picture-card"&&xt!=="picture-circle"&&we.createElement("span",{key:"download-delete",className:R()(`${ot}-list-item-actions`,{picture:xt==="picture"})},Un,Ln),Jr=typeof ar=="function"?ar(it):ar,qt=Jr&&we.createElement("span",{className:`${ot}-list-item-extra`},Jr),_r=R()(`${ot}-list-item-name`),qr=it.url?we.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:_r,title:it.name},Fn,{href:it.url,onClick:wr=>Rt(it,wr)}),it.name,qt):we.createElement("span",{key:"view",className:_r,onClick:wr=>Rt(it,wr),title:it.name},it.name,qt),yn=(typeof pr=="function"?pr(it):pr)&&(it.url||it.thumbUrl)?we.createElement("a",{href:it.url||it.thumbUrl,target:"_blank",rel:"noopener noreferrer",onClick:wr=>Rt(it,wr),title:ht.previewFile},typeof Wr=="function"?Wr(it):Wr||we.createElement(vr.Z,null)):null,ln=(xt==="picture-card"||xt==="picture-circle")&&sn!=="uploading"&&we.createElement("span",{className:`${ot}-list-item-actions`},yn,sn==="done"&&Un,Ln),{getPrefixCls:Tn}=we.useContext(ne.E_),Zn=Tn(),Jn=we.createElement("div",{className:un},gn,qr,Kn,ln,Qn&&we.createElement(St.default,{motionName:`${Zn}-fade`,visible:sn==="uploading",motionDeadline:2e3},wr=>{let{className:zr}=wr;const Gn="percent"in it?we.createElement($t.Z,Object.assign({},Pt,{type:"line",percent:it.percent,"aria-label":it["aria-label"],"aria-labelledby":it["aria-labelledby"]})):null;return we.createElement("div",{className:R()(`${ot}-list-item-progress`,zr)},Gn)})),Wn=it.response&&typeof it.response=="string"?it.response:((mr=it.error)===null||mr===void 0?void 0:mr.statusText)||((Br=it.error)===null||Br===void 0?void 0:Br.message)||ht.uploadError,fi=sn==="error"?we.createElement(Xt.Z,{title:Wn,getPopupContainer:wr=>wr.parentNode},Jn):Jn;return we.createElement("div",{className:R()(`${ot}-list-item-container`,ut),style:dt,ref:Ye},er?er(fi,it,Wt,{download:fn.bind(null,it),preview:Rt.bind(null,it),remove:nr.bind(null,it)}):fi)});const Tt=(Ge,Ye)=>{const{listType:ot="text",previewFile:ut=Ft,onPreview:dt,onDownload:ht,onRemove:xt,locale:it,iconRender:Wt,isImageUrl:Pt=Xe,prefixCls:lt,items:rr=[],showPreviewIcon:er=!0,showRemoveIcon:dr=!0,showDownloadIcon:pr=!1,removeIcon:Er,previewIcon:jr,downloadIcon:Wr,extra:Cr,progress:br={size:[-1,2],showInfo:!1},appendAction:ar,appendActionVisible:Rt=!0,itemRender:fn,disabled:nr}=Ge,mr=(0,jt.Z)(),[Br,dn]=we.useState(!1),sn=["picture-card","picture-circle"].includes(ot);we.useEffect(()=>{ot.startsWith("picture")&&(rr||[]).forEach(qt=>{!(qt.originFileObj instanceof File||qt.originFileObj instanceof Blob)||qt.thumbUrl!==void 0||(qt.thumbUrl="",ut==null||ut(qt.originFileObj).then(_r=>{qt.thumbUrl=_r||"",mr()}))})},[ot,rr,ut]),we.useEffect(()=>{dn(!0)},[]);const vn=(qt,_r)=>{if(dt)return _r==null||_r.preventDefault(),dt(qt)},Qn=qt=>{typeof ht=="function"?ht(qt):qt.url&&window.open(qt.url)},Xn=qt=>{xt==null||xt(qt)},_n=qt=>{if(Wt)return Wt(qt,ot);const _r=qt.status==="uploading";if(ot.startsWith("picture")){const qr=ot==="picture"?we.createElement(He.Z,null):it.uploading,yn=Pt!=null&&Pt(qt)?we.createElement(yt,null):we.createElement(Me,null);return _r?qr:yn}return _r?we.createElement(He.Z,null):we.createElement(qe,null)},gn=(qt,_r,qr,yn,ln)=>{const Tn={type:"text",size:"small",title:yn,onClick:Zn=>{var Jn,Wn;_r(),we.isValidElement(qt)&&((Wn=(Jn=qt.props).onClick)===null||Wn===void 0||Wn.call(Jn,Zn))},className:`${qr}-list-item-action`};return ln&&(Tn.disabled=nr),we.isValidElement(qt)?we.createElement(Mt.ZP,Object.assign({},Tn,{icon:(0,Ct.Tm)(qt,Object.assign(Object.assign({},qt.props),{onClick:()=>{}}))})):we.createElement(Mt.ZP,Object.assign({},Tn),we.createElement("span",null,qt))};we.useImperativeHandle(Ye,()=>({handlePreview:vn,handleDownload:Qn}));const{getPrefixCls:un}=we.useContext(ne.E_),Fn=un("upload",lt),Ln=un(),Un=R()(`${Fn}-list`,`${Fn}-list-${ot}`),Kn=we.useMemo(()=>(0,Lt.Z)((0,Dt.Z)(Ln),["onAppearEnd","onEnterEnd","onLeaveEnd"]),[Ln]),Jr=Object.assign(Object.assign({},sn?{}:Kn),{motionDeadline:2e3,motionName:`${Fn}-${sn?"animate-inline":"animate"}`,keys:(0,st.Z)(rr.map(qt=>({key:qt.uid,file:qt}))),motionAppear:Br});return we.createElement("div",{className:Un},we.createElement(St.CSSMotionList,Object.assign({},Jr,{component:!1}),qt=>{let{key:_r,file:qr,className:yn,style:ln}=qt;return we.createElement(Nr,{key:_r,locale:it,prefixCls:Fn,className:yn,style:ln,file:qr,items:rr,progress:br,listType:ot,isImgUrl:Pt,showPreviewIcon:er,showRemoveIcon:dr,showDownloadIcon:pr,removeIcon:Er,previewIcon:jr,downloadIcon:Wr,extra:Cr,iconRender:_n,actionIconRender:gn,itemRender:fn,onPreview:vn,onDownload:Qn,onClose:Xn})}),ar&&we.createElement(St.default,Object.assign({},Jr,{visible:Rt,forceRender:!0}),qt=>{let{className:_r,style:qr}=qt;return(0,Ct.Tm)(ar,yn=>({className:R()(yn.className,_r),style:Object.assign(Object.assign(Object.assign({},qr),{pointerEvents:_r?"none":void 0}),yn.style)}))}))};var Jt=we.forwardRef(Tt),Xr=function(Ge,Ye,ot,ut){function dt(ht){return ht instanceof ot?ht:new ot(function(xt){xt(ht)})}return new(ot||(ot=Promise))(function(ht,xt){function it(lt){try{Pt(ut.next(lt))}catch(rr){xt(rr)}}function Wt(lt){try{Pt(ut.throw(lt))}catch(rr){xt(rr)}}function Pt(lt){lt.done?ht(lt.value):dt(lt.value).then(it,Wt)}Pt((ut=ut.apply(Ge,Ye||[])).next())})};const Kr=`__LIST_IGNORE_${Date.now()}__`,on=(Ge,Ye)=>{const{fileList:ot,defaultFileList:ut,onRemove:dt,showUploadList:ht=!0,listType:xt="text",onPreview:it,onDownload:Wt,onChange:Pt,onDrop:lt,previewFile:rr,disabled:er,locale:dr,iconRender:pr,isImageUrl:Er,progress:jr,prefixCls:Wr,className:Cr,type:br="select",children:ar,style:Rt,itemRender:fn,maxCount:nr,data:mr={},multiple:Br=!1,hasControlInside:dn=!0,action:sn="",accept:vn="",supportServerRender:Qn=!0,rootClassName:Xn}=Ge,_n=we.useContext(Ie.Z),gn=er!=null?er:_n,[un,Fn]=(0,he.Z)(ut||[],{value:ot,postState:lr=>lr!=null?lr:[]}),[Ln,Un]=we.useState("drop"),Kn=we.useRef(null),Jr=we.useRef(null);we.useMemo(()=>{const lr=Date.now();(ot||[]).forEach((Fr,en)=>{!Fr.uid&&!Object.isFrozen(Fr)&&(Fr.uid=`__AUTO__${lr}_${en}__`)})},[ot]);const qt=(lr,Fr,en)=>{let Sr=(0,st.Z)(Fr),Gr=!1;nr===1?Sr=Sr.slice(-1):nr&&(Gr=Sr.length>nr,Sr=Sr.slice(0,nr)),(0,o.flushSync)(()=>{Fn(Sr)});const Rn={file:lr,fileList:Sr};en&&(Rn.event=en),(!Gr||lr.status==="removed"||Sr.some(jn=>jn.uid===lr.uid))&&(0,o.flushSync)(()=>{Pt==null||Pt(Rn)})},_r=(lr,Fr)=>Xr(void 0,void 0,void 0,function*(){const{beforeUpload:en,transformFile:Sr}=Ge;let Gr=lr;if(en){const Rn=yield en(lr,Fr);if(Rn===!1)return!1;if(delete lr[Kr],Rn===Kr)return Object.defineProperty(lr,Kr,{value:!0,configurable:!0}),!1;typeof Rn=="object"&&Rn&&(Gr=Rn)}return Sr&&(Gr=yield Sr(Gr)),Gr}),qr=lr=>{const Fr=lr.filter(Gr=>!Gr.file[Kr]);if(!Fr.length)return;const en=Fr.map(Gr=>Bt(Gr.file));let Sr=(0,st.Z)(un);en.forEach(Gr=>{Sr=Ut(Gr,Sr)}),en.forEach((Gr,Rn)=>{let jn=Gr;if(Fr[Rn].parsedFile)Gr.status="uploading";else{const{originFileObj:hi}=Gr;let Yn;try{Yn=new File([hi],hi.name,{type:hi.type})}catch(mn){Yn=new Blob([hi],{type:hi.type}),Yn.name=hi.name,Yn.lastModifiedDate=new Date,Yn.lastModified=new Date().getTime()}Yn.uid=Gr.uid,jn=Yn}qt(jn,Sr)})},yn=(lr,Fr,en)=>{try{typeof lr=="string"&&(lr=JSON.parse(lr))}catch(Rn){}if(!Nt(Fr,un))return;const Sr=Bt(Fr);Sr.status="done",Sr.percent=100,Sr.response=lr,Sr.xhr=en;const Gr=Ut(Sr,un);qt(Sr,Gr)},ln=(lr,Fr)=>{if(!Nt(Fr,un))return;const en=Bt(Fr);en.status="uploading",en.percent=lr.percent;const Sr=Ut(en,un);qt(en,Sr,lr)},Tn=(lr,Fr,en)=>{if(!Nt(en,un))return;const Sr=Bt(en);Sr.error=lr,Sr.response=Fr,Sr.status="error";const Gr=Ut(Sr,un);qt(Sr,Gr)},Zn=lr=>{let Fr;Promise.resolve(typeof dt=="function"?dt(lr):dt).then(en=>{var Sr;if(en===!1)return;const Gr=tr(lr,un);Gr&&(Fr=Object.assign(Object.assign({},lr),{status:"removed"}),un==null||un.forEach(Rn=>{const jn=Fr.uid!==void 0?"uid":"name";Rn[jn]===Fr[jn]&&!Object.isFrozen(Rn)&&(Rn.status="removed")}),(Sr=Kn.current)===null||Sr===void 0||Sr.abort(Fr),qt(Fr,Gr))})},Jn=lr=>{Un(lr.type),lr.type==="drop"&&(lt==null||lt(lr))};we.useImperativeHandle(Ye,()=>({onBatchStart:qr,onSuccess:yn,onProgress:ln,onError:Tn,fileList:un,upload:Kn.current,nativeElement:Jr.current}));const{getPrefixCls:Wn,direction:fi,upload:wr}=we.useContext(ne.E_),zr=Wn("upload",Wr),Gn=Object.assign(Object.assign({onBatchStart:qr,onError:Tn,onProgress:ln,onSuccess:yn},Ge),{data:mr,multiple:Br,action:sn,accept:vn,supportServerRender:Qn,prefixCls:zr,disabled:gn,beforeUpload:_r,onChange:void 0,hasControlInside:dn});delete Gn.className,delete Gn.style,(!ar||gn)&&delete Gn.id;const di=`${zr}-wrapper`,[ii,Ci,Si]=ue(zr,di),[Yt]=(0,q.Z)("Upload",pe.Z.Upload),{showRemoveIcon:Pi,showPreviewIcon:ui,showDownloadIcon:Ii,removeIcon:pi,previewIcon:Ti,downloadIcon:ra,extra:Ba}=typeof ht=="boolean"?{}:ht,ya=typeof Pi=="undefined"?!gn:Pi,Ot=(lr,Fr)=>ht?we.createElement(Jt,{prefixCls:zr,listType:xt,items:un,previewFile:rr,onPreview:it,onDownload:Wt,onRemove:Zn,showRemoveIcon:ya,showPreviewIcon:ui,showDownloadIcon:Ii,removeIcon:pi,previewIcon:Ti,downloadIcon:ra,iconRender:pr,extra:Ba,locale:Object.assign(Object.assign({},Yt),dr),isImageUrl:Er,progress:jr,appendAction:lr,appendActionVisible:Fr,itemRender:fn,disabled:gn}):lr,bn=R()(di,Cr,Xn,Ci,Si,wr==null?void 0:wr.className,{[`${zr}-rtl`]:fi==="rtl",[`${zr}-picture-card-wrapper`]:xt==="picture-card",[`${zr}-picture-circle-wrapper`]:xt==="picture-circle"}),ba=Object.assign(Object.assign({},wr==null?void 0:wr.style),Rt);if(br==="drag"){const lr=R()(Ci,zr,`${zr}-drag`,{[`${zr}-drag-uploading`]:un.some(Fr=>Fr.status==="uploading"),[`${zr}-drag-hover`]:Ln==="dragover",[`${zr}-disabled`]:gn,[`${zr}-rtl`]:fi==="rtl"});return ii(we.createElement("span",{className:bn,ref:Jr},we.createElement("div",{className:lr,style:ba,onDrop:Jn,onDragOver:Jn,onDragLeave:Jn},we.createElement(ie,Object.assign({},Gn,{ref:Kn,className:`${zr}-btn`}),we.createElement("div",{className:`${zr}-drag-container`},ar))),Ot()))}const Na=R()(zr,`${zr}-select`,{[`${zr}-disabled`]:gn,[`${zr}-hidden`]:!ar}),na=we.createElement("div",{className:Na},we.createElement(ie,Object.assign({},Gn,{ref:Kn})));return ii(xt==="picture-card"||xt==="picture-circle"?we.createElement("span",{className:bn,ref:Jr},Ot(na,!!ar)):we.createElement("span",{className:bn,ref:Jr},na,Ot()))};var Yr=we.forwardRef(on),$r=function(Ge,Ye){var ot={};for(var ut in Ge)Object.prototype.hasOwnProperty.call(Ge,ut)&&Ye.indexOf(ut)<0&&(ot[ut]=Ge[ut]);if(Ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var dt=0,ut=Object.getOwnPropertySymbols(Ge);dt<ut.length;dt++)Ye.indexOf(ut[dt])<0&&Object.prototype.propertyIsEnumerable.call(Ge,ut[dt])&&(ot[ut[dt]]=Ge[ut[dt]]);return ot},tn=we.forwardRef((Ge,Ye)=>{var{style:ot,height:ut,hasControlInside:dt=!1}=Ge,ht=$r(Ge,["style","height","hasControlInside"]);return we.createElement(Yr,Object.assign({ref:Ye,hasControlInside:dt},ht,{type:"drag",style:Object.assign(Object.assign({},ot),{height:ut})}))});const Zr=Yr;Zr.Dragger=tn,Zr.LIST_IGNORE=Kr;var yr=Zr},86251:function(or,mt){"use strict";mt.byteLength=f,mt.toByteArray=y,mt.fromByteArray=c;for(var Te=[],we=[],st=typeof Uint8Array!="undefined"?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",M=0,R=o.length;M<R;++M)Te[M]=o[M],we[o.charCodeAt(M)]=M;we[45]=62,we[95]=63;function p(m){var v=m.length;if(v%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var b=m.indexOf("=");b===-1&&(b=v);var x=b===v?0:4-b%4;return[b,x]}function f(m){var v=p(m),b=v[0],x=v[1];return(b+x)*3/4-x}function h(m,v,b){return(v+b)*3/4-b}function y(m){var v,b=p(m),x=b[0],T=b[1],S=new st(h(m,x,T)),C=0,E=T>0?x-4:x,j;for(j=0;j<E;j+=4)v=we[m.charCodeAt(j)]<<18|we[m.charCodeAt(j+1)]<<12|we[m.charCodeAt(j+2)]<<6|we[m.charCodeAt(j+3)],S[C++]=v>>16&255,S[C++]=v>>8&255,S[C++]=v&255;return T===2&&(v=we[m.charCodeAt(j)]<<2|we[m.charCodeAt(j+1)]>>4,S[C++]=v&255),T===1&&(v=we[m.charCodeAt(j)]<<10|we[m.charCodeAt(j+1)]<<4|we[m.charCodeAt(j+2)]>>2,S[C++]=v>>8&255,S[C++]=v&255),S}function g(m){return Te[m>>18&63]+Te[m>>12&63]+Te[m>>6&63]+Te[m&63]}function w(m,v,b){for(var x,T=[],S=v;S<b;S+=3)x=(m[S]<<16&16711680)+(m[S+1]<<8&65280)+(m[S+2]&255),T.push(g(x));return T.join("")}function c(m){for(var v,b=m.length,x=b%3,T=[],S=16383,C=0,E=b-x;C<E;C+=S)T.push(w(m,C,C+S>E?E:C+S));return x===1?(v=m[b-1],T.push(Te[v>>2]+Te[v<<4&63]+"==")):x===2&&(v=(m[b-2]<<8)+m[b-1],T.push(Te[v>>10]+Te[v>>4&63]+Te[v<<2&63]+"=")),T.join("")}},19208:function(or,mt,Te){"use strict";var we;var st=Te(86251),o=Te(67467),M=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;mt.lW=h,we=C,mt.h2=50;var R=2147483647;we=R,h.TYPED_ARRAY_SUPPORT=p(),!h.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function p(){try{var G=new Uint8Array(1),W={foo:function(){return 42}};return Object.setPrototypeOf(W,Uint8Array.prototype),Object.setPrototypeOf(G,W),G.foo()===42}catch(K){return!1}}Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}});function f(G){if(G>R)throw new RangeError('The value "'+G+'" is invalid for option "size"');var W=new Uint8Array(G);return Object.setPrototypeOf(W,h.prototype),W}function h(G,W,K){if(typeof G=="number"){if(typeof W=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return c(G)}return y(G,W,K)}h.poolSize=8192;function y(G,W,K){if(typeof G=="string")return m(G,W);if(ArrayBuffer.isView(G))return b(G);if(G==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof G);if(Y(G,ArrayBuffer)||G&&Y(G.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(Y(G,SharedArrayBuffer)||G&&Y(G.buffer,SharedArrayBuffer)))return x(G,W,K);if(typeof G=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var te=G.valueOf&&G.valueOf();if(te!=null&&te!==G)return h.from(te,W,K);var U=T(G);if(U)return U;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof G[Symbol.toPrimitive]=="function")return h.from(G[Symbol.toPrimitive]("string"),W,K);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof G)}h.from=function(G,W,K){return y(G,W,K)},Object.setPrototypeOf(h.prototype,Uint8Array.prototype),Object.setPrototypeOf(h,Uint8Array);function g(G){if(typeof G!="number")throw new TypeError('"size" argument must be of type number');if(G<0)throw new RangeError('The value "'+G+'" is invalid for option "size"')}function w(G,W,K){return g(G),G<=0?f(G):W!==void 0?typeof K=="string"?f(G).fill(W,K):f(G).fill(W):f(G)}h.alloc=function(G,W,K){return w(G,W,K)};function c(G){return g(G),f(G<0?0:S(G)|0)}h.allocUnsafe=function(G){return c(G)},h.allocUnsafeSlow=function(G){return c(G)};function m(G,W){if((typeof W!="string"||W==="")&&(W="utf8"),!h.isEncoding(W))throw new TypeError("Unknown encoding: "+W);var K=E(G,W)|0,te=f(K),U=te.write(G,W);return U!==K&&(te=te.slice(0,U)),te}function v(G){for(var W=G.length<0?0:S(G.length)|0,K=f(W),te=0;te<W;te+=1)K[te]=G[te]&255;return K}function b(G){if(Y(G,Uint8Array)){var W=new Uint8Array(G);return x(W.buffer,W.byteOffset,W.byteLength)}return v(G)}function x(G,W,K){if(W<0||G.byteLength<W)throw new RangeError('"offset" is outside of buffer bounds');if(G.byteLength<W+(K||0))throw new RangeError('"length" is outside of buffer bounds');var te;return W===void 0&&K===void 0?te=new Uint8Array(G):K===void 0?te=new Uint8Array(G,W):te=new Uint8Array(G,W,K),Object.setPrototypeOf(te,h.prototype),te}function T(G){if(h.isBuffer(G)){var W=S(G.length)|0,K=f(W);return K.length===0||G.copy(K,0,0,W),K}if(G.length!==void 0)return typeof G.length!="number"||ye(G.length)?f(0):v(G);if(G.type==="Buffer"&&Array.isArray(G.data))return v(G.data)}function S(G){if(G>=R)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+R.toString(16)+" bytes");return G|0}function C(G){return+G!=G&&(G=0),h.alloc(+G)}h.isBuffer=function(W){return W!=null&&W._isBuffer===!0&&W!==h.prototype},h.compare=function(W,K){if(Y(W,Uint8Array)&&(W=h.from(W,W.offset,W.byteLength)),Y(K,Uint8Array)&&(K=h.from(K,K.offset,K.byteLength)),!h.isBuffer(W)||!h.isBuffer(K))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(W===K)return 0;for(var te=W.length,U=K.length,L=0,$=Math.min(te,U);L<$;++L)if(W[L]!==K[L]){te=W[L],U=K[L];break}return te<U?-1:U<te?1:0},h.isEncoding=function(W){switch(String(W).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},h.concat=function(W,K){if(!Array.isArray(W))throw new TypeError('"list" argument must be an Array of Buffers');if(W.length===0)return h.alloc(0);var te;if(K===void 0)for(K=0,te=0;te<W.length;++te)K+=W[te].length;var U=h.allocUnsafe(K),L=0;for(te=0;te<W.length;++te){var $=W[te];if(Y($,Uint8Array))L+$.length>U.length?h.from($).copy(U,L):Uint8Array.prototype.set.call(U,$,L);else if(h.isBuffer($))$.copy(U,L);else throw new TypeError('"list" argument must be an Array of Buffers');L+=$.length}return U};function E(G,W){if(h.isBuffer(G))return G.length;if(ArrayBuffer.isView(G)||Y(G,ArrayBuffer))return G.byteLength;if(typeof G!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof G);var K=G.length,te=arguments.length>2&&arguments[2]===!0;if(!te&&K===0)return 0;for(var U=!1;;)switch(W){case"ascii":case"latin1":case"binary":return K;case"utf8":case"utf-8":return ge(G).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return K*2;case"hex":return K>>>1;case"base64":return ke(G).length;default:if(U)return te?-1:ge(G).length;W=(""+W).toLowerCase(),U=!0}}h.byteLength=E;function j(G,W,K){var te=!1;if((W===void 0||W<0)&&(W=0),W>this.length||((K===void 0||K>this.length)&&(K=this.length),K<=0)||(K>>>=0,W>>>=0,K<=W))return"";for(G||(G="utf8");;)switch(G){case"hex":return he(this,W,K);case"utf8":case"utf-8":return N(this,W,K);case"ascii":return ee(this,W,K);case"latin1":case"binary":return ie(this,W,K);case"base64":return H(this,W,K);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ne(this,W,K);default:if(te)throw new TypeError("Unknown encoding: "+G);G=(G+"").toLowerCase(),te=!0}}h.prototype._isBuffer=!0;function Z(G,W,K){var te=G[W];G[W]=G[K],G[K]=te}h.prototype.swap16=function(){var W=this.length;if(W%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var K=0;K<W;K+=2)Z(this,K,K+1);return this},h.prototype.swap32=function(){var W=this.length;if(W%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var K=0;K<W;K+=4)Z(this,K,K+3),Z(this,K+1,K+2);return this},h.prototype.swap64=function(){var W=this.length;if(W%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var K=0;K<W;K+=8)Z(this,K,K+7),Z(this,K+1,K+6),Z(this,K+2,K+5),Z(this,K+3,K+4);return this},h.prototype.toString=function(){var W=this.length;return W===0?"":arguments.length===0?N(this,0,W):j.apply(this,arguments)},h.prototype.toLocaleString=h.prototype.toString,h.prototype.equals=function(W){if(!h.isBuffer(W))throw new TypeError("Argument must be a Buffer");return this===W?!0:h.compare(this,W)===0},h.prototype.inspect=function(){var W="",K=mt.h2;return W=this.toString("hex",0,K).replace(/(.{2})/g,"$1 ").trim(),this.length>K&&(W+=" ... "),"<Buffer "+W+">"},M&&(h.prototype[M]=h.prototype.inspect),h.prototype.compare=function(W,K,te,U,L){if(Y(W,Uint8Array)&&(W=h.from(W,W.offset,W.byteLength)),!h.isBuffer(W))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof W);if(K===void 0&&(K=0),te===void 0&&(te=W?W.length:0),U===void 0&&(U=0),L===void 0&&(L=this.length),K<0||te>W.length||U<0||L>this.length)throw new RangeError("out of range index");if(U>=L&&K>=te)return 0;if(U>=L)return-1;if(K>=te)return 1;if(K>>>=0,te>>>=0,U>>>=0,L>>>=0,this===W)return 0;for(var $=L-U,ue=te-K,Ee=Math.min($,ue),ze=this.slice(U,L),_e=W.slice(K,te),le=0;le<Ee;++le)if(ze[le]!==_e[le]){$=ze[le],ue=_e[le];break}return $<ue?-1:ue<$?1:0};function P(G,W,K,te,U){if(G.length===0)return-1;if(typeof K=="string"?(te=K,K=0):K>2147483647?K=2147483647:K<-2147483648&&(K=-2147483648),K=+K,ye(K)&&(K=U?0:G.length-1),K<0&&(K=G.length+K),K>=G.length){if(U)return-1;K=G.length-1}else if(K<0)if(U)K=0;else return-1;if(typeof W=="string"&&(W=h.from(W,te)),h.isBuffer(W))return W.length===0?-1:Q(G,W,K,te,U);if(typeof W=="number")return W=W&255,typeof Uint8Array.prototype.indexOf=="function"?U?Uint8Array.prototype.indexOf.call(G,W,K):Uint8Array.prototype.lastIndexOf.call(G,W,K):Q(G,[W],K,te,U);throw new TypeError("val must be string, number or Buffer")}function Q(G,W,K,te,U){var L=1,$=G.length,ue=W.length;if(te!==void 0&&(te=String(te).toLowerCase(),te==="ucs2"||te==="ucs-2"||te==="utf16le"||te==="utf-16le")){if(G.length<2||W.length<2)return-1;L=2,$/=2,ue/=2,K/=2}function Ee(Me,He){return L===1?Me[He]:Me.readUInt16BE(He*L)}var ze;if(U){var _e=-1;for(ze=K;ze<$;ze++)if(Ee(G,ze)===Ee(W,_e===-1?0:ze-_e)){if(_e===-1&&(_e=ze),ze-_e+1===ue)return _e*L}else _e!==-1&&(ze-=ze-_e),_e=-1}else for(K+ue>$&&(K=$-ue),ze=K;ze>=0;ze--){for(var le=!0,Re=0;Re<ue;Re++)if(Ee(G,ze+Re)!==Ee(W,Re)){le=!1;break}if(le)return ze}return-1}h.prototype.includes=function(W,K,te){return this.indexOf(W,K,te)!==-1},h.prototype.indexOf=function(W,K,te){return P(this,W,K,te,!0)},h.prototype.lastIndexOf=function(W,K,te){return P(this,W,K,te,!1)};function B(G,W,K,te){K=Number(K)||0;var U=G.length-K;te?(te=Number(te),te>U&&(te=U)):te=U;var L=W.length;te>L/2&&(te=L/2);for(var $=0;$<te;++$){var ue=parseInt(W.substr($*2,2),16);if(ye(ue))return $;G[K+$]=ue}return $}function k(G,W,K,te){return de(ge(W,G.length-K),G,K,te)}function D(G,W,K,te){return de(Se(W),G,K,te)}function F(G,W,K,te){return de(ke(W),G,K,te)}function J(G,W,K,te){return de(De(W,G.length-K),G,K,te)}h.prototype.write=function(W,K,te,U){if(K===void 0)U="utf8",te=this.length,K=0;else if(te===void 0&&typeof K=="string")U=K,te=this.length,K=0;else if(isFinite(K))K=K>>>0,isFinite(te)?(te=te>>>0,U===void 0&&(U="utf8")):(U=te,te=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var L=this.length-K;if((te===void 0||te>L)&&(te=L),W.length>0&&(te<0||K<0)||K>this.length)throw new RangeError("Attempt to write outside buffer bounds");U||(U="utf8");for(var $=!1;;)switch(U){case"hex":return B(this,W,K,te);case"utf8":case"utf-8":return k(this,W,K,te);case"ascii":case"latin1":case"binary":return D(this,W,K,te);case"base64":return F(this,W,K,te);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J(this,W,K,te);default:if($)throw new TypeError("Unknown encoding: "+U);U=(""+U).toLowerCase(),$=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function H(G,W,K){return W===0&&K===G.length?st.fromByteArray(G):st.fromByteArray(G.slice(W,K))}function N(G,W,K){K=Math.min(G.length,K);for(var te=[],U=W;U<K;){var L=G[U],$=null,ue=L>239?4:L>223?3:L>191?2:1;if(U+ue<=K){var Ee,ze,_e,le;switch(ue){case 1:L<128&&($=L);break;case 2:Ee=G[U+1],(Ee&192)===128&&(le=(L&31)<<6|Ee&63,le>127&&($=le));break;case 3:Ee=G[U+1],ze=G[U+2],(Ee&192)===128&&(ze&192)===128&&(le=(L&15)<<12|(Ee&63)<<6|ze&63,le>2047&&(le<55296||le>57343)&&($=le));break;case 4:Ee=G[U+1],ze=G[U+2],_e=G[U+3],(Ee&192)===128&&(ze&192)===128&&(_e&192)===128&&(le=(L&15)<<18|(Ee&63)<<12|(ze&63)<<6|_e&63,le>65535&&le<1114112&&($=le))}}$===null?($=65533,ue=1):$>65535&&($-=65536,te.push($>>>10&1023|55296),$=56320|$&1023),te.push($),U+=ue}return X(te)}var _=4096;function X(G){var W=G.length;if(W<=_)return String.fromCharCode.apply(String,G);for(var K="",te=0;te<W;)K+=String.fromCharCode.apply(String,G.slice(te,te+=_));return K}function ee(G,W,K){var te="";K=Math.min(G.length,K);for(var U=W;U<K;++U)te+=String.fromCharCode(G[U]&127);return te}function ie(G,W,K){var te="";K=Math.min(G.length,K);for(var U=W;U<K;++U)te+=String.fromCharCode(G[U]);return te}function he(G,W,K){var te=G.length;(!W||W<0)&&(W=0),(!K||K<0||K>te)&&(K=te);for(var U="",L=W;L<K;++L)U+=V[G[L]];return U}function ne(G,W,K){for(var te=G.slice(W,K),U="",L=0;L<te.length-1;L+=2)U+=String.fromCharCode(te[L]+te[L+1]*256);return U}h.prototype.slice=function(W,K){var te=this.length;W=~~W,K=K===void 0?te:~~K,W<0?(W+=te,W<0&&(W=0)):W>te&&(W=te),K<0?(K+=te,K<0&&(K=0)):K>te&&(K=te),K<W&&(K=W);var U=this.subarray(W,K);return Object.setPrototypeOf(U,h.prototype),U};function Ie(G,W,K){if(G%1!==0||G<0)throw new RangeError("offset is not uint");if(G+W>K)throw new RangeError("Trying to access beyond buffer length")}h.prototype.readUintLE=h.prototype.readUIntLE=function(W,K,te){W=W>>>0,K=K>>>0,te||Ie(W,K,this.length);for(var U=this[W],L=1,$=0;++$<K&&(L*=256);)U+=this[W+$]*L;return U},h.prototype.readUintBE=h.prototype.readUIntBE=function(W,K,te){W=W>>>0,K=K>>>0,te||Ie(W,K,this.length);for(var U=this[W+--K],L=1;K>0&&(L*=256);)U+=this[W+--K]*L;return U},h.prototype.readUint8=h.prototype.readUInt8=function(W,K){return W=W>>>0,K||Ie(W,1,this.length),this[W]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(W,K){return W=W>>>0,K||Ie(W,2,this.length),this[W]|this[W+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(W,K){return W=W>>>0,K||Ie(W,2,this.length),this[W]<<8|this[W+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(W,K){return W=W>>>0,K||Ie(W,4,this.length),(this[W]|this[W+1]<<8|this[W+2]<<16)+this[W+3]*16777216},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(W,K){return W=W>>>0,K||Ie(W,4,this.length),this[W]*16777216+(this[W+1]<<16|this[W+2]<<8|this[W+3])},h.prototype.readIntLE=function(W,K,te){W=W>>>0,K=K>>>0,te||Ie(W,K,this.length);for(var U=this[W],L=1,$=0;++$<K&&(L*=256);)U+=this[W+$]*L;return L*=128,U>=L&&(U-=Math.pow(2,8*K)),U},h.prototype.readIntBE=function(W,K,te){W=W>>>0,K=K>>>0,te||Ie(W,K,this.length);for(var U=K,L=1,$=this[W+--U];U>0&&(L*=256);)$+=this[W+--U]*L;return L*=128,$>=L&&($-=Math.pow(2,8*K)),$},h.prototype.readInt8=function(W,K){return W=W>>>0,K||Ie(W,1,this.length),this[W]&128?(255-this[W]+1)*-1:this[W]},h.prototype.readInt16LE=function(W,K){W=W>>>0,K||Ie(W,2,this.length);var te=this[W]|this[W+1]<<8;return te&32768?te|4294901760:te},h.prototype.readInt16BE=function(W,K){W=W>>>0,K||Ie(W,2,this.length);var te=this[W+1]|this[W]<<8;return te&32768?te|4294901760:te},h.prototype.readInt32LE=function(W,K){return W=W>>>0,K||Ie(W,4,this.length),this[W]|this[W+1]<<8|this[W+2]<<16|this[W+3]<<24},h.prototype.readInt32BE=function(W,K){return W=W>>>0,K||Ie(W,4,this.length),this[W]<<24|this[W+1]<<16|this[W+2]<<8|this[W+3]},h.prototype.readFloatLE=function(W,K){return W=W>>>0,K||Ie(W,4,this.length),o.read(this,W,!0,23,4)},h.prototype.readFloatBE=function(W,K){return W=W>>>0,K||Ie(W,4,this.length),o.read(this,W,!1,23,4)},h.prototype.readDoubleLE=function(W,K){return W=W>>>0,K||Ie(W,8,this.length),o.read(this,W,!0,52,8)},h.prototype.readDoubleBE=function(W,K){return W=W>>>0,K||Ie(W,8,this.length),o.read(this,W,!1,52,8)};function q(G,W,K,te,U,L){if(!h.isBuffer(G))throw new TypeError('"buffer" argument must be a Buffer instance');if(W>U||W<L)throw new RangeError('"value" argument is out of bounds');if(K+te>G.length)throw new RangeError("Index out of range")}h.prototype.writeUintLE=h.prototype.writeUIntLE=function(W,K,te,U){if(W=+W,K=K>>>0,te=te>>>0,!U){var L=Math.pow(2,8*te)-1;q(this,W,K,te,L,0)}var $=1,ue=0;for(this[K]=W&255;++ue<te&&($*=256);)this[K+ue]=W/$&255;return K+te},h.prototype.writeUintBE=h.prototype.writeUIntBE=function(W,K,te,U){if(W=+W,K=K>>>0,te=te>>>0,!U){var L=Math.pow(2,8*te)-1;q(this,W,K,te,L,0)}var $=te-1,ue=1;for(this[K+$]=W&255;--$>=0&&(ue*=256);)this[K+$]=W/ue&255;return K+te},h.prototype.writeUint8=h.prototype.writeUInt8=function(W,K,te){return W=+W,K=K>>>0,te||q(this,W,K,1,255,0),this[K]=W&255,K+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(W,K,te){return W=+W,K=K>>>0,te||q(this,W,K,2,65535,0),this[K]=W&255,this[K+1]=W>>>8,K+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(W,K,te){return W=+W,K=K>>>0,te||q(this,W,K,2,65535,0),this[K]=W>>>8,this[K+1]=W&255,K+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(W,K,te){return W=+W,K=K>>>0,te||q(this,W,K,4,4294967295,0),this[K+3]=W>>>24,this[K+2]=W>>>16,this[K+1]=W>>>8,this[K]=W&255,K+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(W,K,te){return W=+W,K=K>>>0,te||q(this,W,K,4,4294967295,0),this[K]=W>>>24,this[K+1]=W>>>16,this[K+2]=W>>>8,this[K+3]=W&255,K+4},h.prototype.writeIntLE=function(W,K,te,U){if(W=+W,K=K>>>0,!U){var L=Math.pow(2,8*te-1);q(this,W,K,te,L-1,-L)}var $=0,ue=1,Ee=0;for(this[K]=W&255;++$<te&&(ue*=256);)W<0&&Ee===0&&this[K+$-1]!==0&&(Ee=1),this[K+$]=(W/ue>>0)-Ee&255;return K+te},h.prototype.writeIntBE=function(W,K,te,U){if(W=+W,K=K>>>0,!U){var L=Math.pow(2,8*te-1);q(this,W,K,te,L-1,-L)}var $=te-1,ue=1,Ee=0;for(this[K+$]=W&255;--$>=0&&(ue*=256);)W<0&&Ee===0&&this[K+$+1]!==0&&(Ee=1),this[K+$]=(W/ue>>0)-Ee&255;return K+te},h.prototype.writeInt8=function(W,K,te){return W=+W,K=K>>>0,te||q(this,W,K,1,127,-128),W<0&&(W=255+W+1),this[K]=W&255,K+1},h.prototype.writeInt16LE=function(W,K,te){return W=+W,K=K>>>0,te||q(this,W,K,2,32767,-32768),this[K]=W&255,this[K+1]=W>>>8,K+2},h.prototype.writeInt16BE=function(W,K,te){return W=+W,K=K>>>0,te||q(this,W,K,2,32767,-32768),this[K]=W>>>8,this[K+1]=W&255,K+2},h.prototype.writeInt32LE=function(W,K,te){return W=+W,K=K>>>0,te||q(this,W,K,4,2147483647,-2147483648),this[K]=W&255,this[K+1]=W>>>8,this[K+2]=W>>>16,this[K+3]=W>>>24,K+4},h.prototype.writeInt32BE=function(W,K,te){return W=+W,K=K>>>0,te||q(this,W,K,4,2147483647,-2147483648),W<0&&(W=4294967295+W+1),this[K]=W>>>24,this[K+1]=W>>>16,this[K+2]=W>>>8,this[K+3]=W&255,K+4};function pe(G,W,K,te,U,L){if(K+te>G.length)throw new RangeError("Index out of range");if(K<0)throw new RangeError("Index out of range")}function ve(G,W,K,te,U){return W=+W,K=K>>>0,U||pe(G,W,K,4,34028234663852886e22,-34028234663852886e22),o.write(G,W,K,te,23,4),K+4}h.prototype.writeFloatLE=function(W,K,te){return ve(this,W,K,!0,te)},h.prototype.writeFloatBE=function(W,K,te){return ve(this,W,K,!1,te)};function xe(G,W,K,te,U){return W=+W,K=K>>>0,U||pe(G,W,K,8,17976931348623157e292,-17976931348623157e292),o.write(G,W,K,te,52,8),K+8}h.prototype.writeDoubleLE=function(W,K,te){return xe(this,W,K,!0,te)},h.prototype.writeDoubleBE=function(W,K,te){return xe(this,W,K,!1,te)},h.prototype.copy=function(W,K,te,U){if(!h.isBuffer(W))throw new TypeError("argument should be a Buffer");if(te||(te=0),!U&&U!==0&&(U=this.length),K>=W.length&&(K=W.length),K||(K=0),U>0&&U<te&&(U=te),U===te||W.length===0||this.length===0)return 0;if(K<0)throw new RangeError("targetStart out of bounds");if(te<0||te>=this.length)throw new RangeError("Index out of range");if(U<0)throw new RangeError("sourceEnd out of bounds");U>this.length&&(U=this.length),W.length-K<U-te&&(U=W.length-K+te);var L=U-te;return this===W&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(K,te,U):Uint8Array.prototype.set.call(W,this.subarray(te,U),K),L},h.prototype.fill=function(W,K,te,U){if(typeof W=="string"){if(typeof K=="string"?(U=K,K=0,te=this.length):typeof te=="string"&&(U=te,te=this.length),U!==void 0&&typeof U!="string")throw new TypeError("encoding must be a string");if(typeof U=="string"&&!h.isEncoding(U))throw new TypeError("Unknown encoding: "+U);if(W.length===1){var L=W.charCodeAt(0);(U==="utf8"&&L<128||U==="latin1")&&(W=L)}}else typeof W=="number"?W=W&255:typeof W=="boolean"&&(W=Number(W));if(K<0||this.length<K||this.length<te)throw new RangeError("Out of range index");if(te<=K)return this;K=K>>>0,te=te===void 0?this.length:te>>>0,W||(W=0);var $;if(typeof W=="number")for($=K;$<te;++$)this[$]=W;else{var ue=h.isBuffer(W)?W:h.from(W,U),Ee=ue.length;if(Ee===0)throw new TypeError('The value "'+W+'" is invalid for argument "value"');for($=0;$<te-K;++$)this[$+K]=ue[$%Ee]}return this};var ce=/[^+/0-9A-Za-z-_]/g;function fe(G){if(G=G.split("=")[0],G=G.trim().replace(ce,""),G.length<2)return"";for(;G.length%4!==0;)G=G+"=";return G}function ge(G,W){W=W||1/0;for(var K,te=G.length,U=null,L=[],$=0;$<te;++$){if(K=G.charCodeAt($),K>55295&&K<57344){if(!U){if(K>56319){(W-=3)>-1&&L.push(239,191,189);continue}else if($+1===te){(W-=3)>-1&&L.push(239,191,189);continue}U=K;continue}if(K<56320){(W-=3)>-1&&L.push(239,191,189),U=K;continue}K=(U-55296<<10|K-56320)+65536}else U&&(W-=3)>-1&&L.push(239,191,189);if(U=null,K<128){if((W-=1)<0)break;L.push(K)}else if(K<2048){if((W-=2)<0)break;L.push(K>>6|192,K&63|128)}else if(K<65536){if((W-=3)<0)break;L.push(K>>12|224,K>>6&63|128,K&63|128)}else if(K<1114112){if((W-=4)<0)break;L.push(K>>18|240,K>>12&63|128,K>>6&63|128,K&63|128)}else throw new Error("Invalid code point")}return L}function Se(G){for(var W=[],K=0;K<G.length;++K)W.push(G.charCodeAt(K)&255);return W}function De(G,W){for(var K,te,U,L=[],$=0;$<G.length&&!((W-=2)<0);++$)K=G.charCodeAt($),te=K>>8,U=K%256,L.push(U),L.push(te);return L}function ke(G){return st.toByteArray(fe(G))}function de(G,W,K,te){for(var U=0;U<te&&!(U+K>=W.length||U>=G.length);++U)W[U+K]=G[U];return U}function Y(G,W){return G instanceof W||G!=null&&G.constructor!=null&&G.constructor.name!=null&&G.constructor.name===W.name}function ye(G){return G!==G}var V=function(){for(var G="0123456789abcdef",W=new Array(256),K=0;K<16;++K)for(var te=K*16,U=0;U<16;++U)W[te+U]=G[K]+G[U];return W}()},67467:function(or,mt){mt.read=function(Te,we,st,o,M){var R,p,f=M*8-o-1,h=(1<<f)-1,y=h>>1,g=-7,w=st?M-1:0,c=st?-1:1,m=Te[we+w];for(w+=c,R=m&(1<<-g)-1,m>>=-g,g+=f;g>0;R=R*256+Te[we+w],w+=c,g-=8);for(p=R&(1<<-g)-1,R>>=-g,g+=o;g>0;p=p*256+Te[we+w],w+=c,g-=8);if(R===0)R=1-y;else{if(R===h)return p?NaN:(m?-1:1)*(1/0);p=p+Math.pow(2,o),R=R-y}return(m?-1:1)*p*Math.pow(2,R-o)},mt.write=function(Te,we,st,o,M,R){var p,f,h,y=R*8-M-1,g=(1<<y)-1,w=g>>1,c=M===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=o?0:R-1,v=o?1:-1,b=we<0||we===0&&1/we<0?1:0;for(we=Math.abs(we),isNaN(we)||we===1/0?(f=isNaN(we)?1:0,p=g):(p=Math.floor(Math.log(we)/Math.LN2),we*(h=Math.pow(2,-p))<1&&(p--,h*=2),p+w>=1?we+=c/h:we+=c*Math.pow(2,1-w),we*h>=2&&(p++,h/=2),p+w>=g?(f=0,p=g):p+w>=1?(f=(we*h-1)*Math.pow(2,M),p=p+w):(f=we*Math.pow(2,w-1)*Math.pow(2,M),p=0));M>=8;Te[st+m]=f&255,m+=v,f/=256,M-=8);for(p=p<<M|f,y+=M;y>0;Te[st+m]=p&255,m+=v,p/=256,y-=8);Te[st+m-v]|=b*128}},31193:function(or,mt,Te){var we=Te(48955);function st(o){this.mode=we.MODE_8BIT_BYTE,this.data=o}st.prototype={getLength:function(o){return this.data.length},write:function(o){for(var M=0;M<this.data.length;M++)o.put(this.data.charCodeAt(M),8)}},or.exports=st},31144:function(or){function mt(){this.buffer=new Array,this.length=0}mt.prototype={get:function(Te){var we=Math.floor(Te/8);return(this.buffer[we]>>>7-Te%8&1)==1},put:function(Te,we){for(var st=0;st<we;st++)this.putBit((Te>>>we-st-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(Te){var we=Math.floor(this.length/8);this.buffer.length<=we&&this.buffer.push(0),Te&&(this.buffer[we]|=128>>>this.length%8),this.length++}},or.exports=mt},78485:function(or){or.exports={L:1,M:0,Q:3,H:2}},13679:function(or,mt,Te){var we=Te(87532);function st(o,M){if(o.length==null)throw new Error(o.length+"/"+M);for(var R=0;R<o.length&&o[R]==0;)R++;this.num=new Array(o.length-R+M);for(var p=0;p<o.length-R;p++)this.num[p]=o[p+R]}st.prototype={get:function(o){return this.num[o]},getLength:function(){return this.num.length},multiply:function(o){for(var M=new Array(this.getLength()+o.getLength()-1),R=0;R<this.getLength();R++)for(var p=0;p<o.getLength();p++)M[R+p]^=we.gexp(we.glog(this.get(R))+we.glog(o.get(p)));return new st(M,0)},mod:function(o){if(this.getLength()-o.getLength()<0)return this;for(var M=we.glog(this.get(0))-we.glog(o.get(0)),R=new Array(this.getLength()),p=0;p<this.getLength();p++)R[p]=this.get(p);for(var p=0;p<o.getLength();p++)R[p]^=we.gexp(we.glog(o.get(p))+M);return new st(R,0).mod(o)}},or.exports=st},86397:function(or,mt,Te){var we=Te(31193),st=Te(84590),o=Te(31144),M=Te(28688),R=Te(13679);function p(h,y){this.typeNumber=h,this.errorCorrectLevel=y,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var f=p.prototype;f.addData=function(h){var y=new we(h);this.dataList.push(y),this.dataCache=null},f.isDark=function(h,y){if(h<0||this.moduleCount<=h||y<0||this.moduleCount<=y)throw new Error(h+","+y);return this.modules[h][y]},f.getModuleCount=function(){return this.moduleCount},f.make=function(){if(this.typeNumber<1){var h=1;for(h=1;h<40;h++){for(var y=st.getRSBlocks(h,this.errorCorrectLevel),g=new o,w=0,c=0;c<y.length;c++)w+=y[c].dataCount;for(var c=0;c<this.dataList.length;c++){var m=this.dataList[c];g.put(m.mode,4),g.put(m.getLength(),M.getLengthInBits(m.mode,h)),m.write(g)}if(g.getLengthInBits()<=w*8)break}this.typeNumber=h}this.makeImpl(!1,this.getBestMaskPattern())},f.makeImpl=function(h,y){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var g=0;g<this.moduleCount;g++){this.modules[g]=new Array(this.moduleCount);for(var w=0;w<this.moduleCount;w++)this.modules[g][w]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(h,y),this.typeNumber>=7&&this.setupTypeNumber(h),this.dataCache==null&&(this.dataCache=p.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,y)},f.setupPositionProbePattern=function(h,y){for(var g=-1;g<=7;g++)if(!(h+g<=-1||this.moduleCount<=h+g))for(var w=-1;w<=7;w++)y+w<=-1||this.moduleCount<=y+w||(0<=g&&g<=6&&(w==0||w==6)||0<=w&&w<=6&&(g==0||g==6)||2<=g&&g<=4&&2<=w&&w<=4?this.modules[h+g][y+w]=!0:this.modules[h+g][y+w]=!1)},f.getBestMaskPattern=function(){for(var h=0,y=0,g=0;g<8;g++){this.makeImpl(!0,g);var w=M.getLostPoint(this);(g==0||h>w)&&(h=w,y=g)}return y},f.createMovieClip=function(h,y,g){var w=h.createEmptyMovieClip(y,g),c=1;this.make();for(var m=0;m<this.modules.length;m++)for(var v=m*c,b=0;b<this.modules[m].length;b++){var x=b*c,T=this.modules[m][b];T&&(w.beginFill(0,100),w.moveTo(x,v),w.lineTo(x+c,v),w.lineTo(x+c,v+c),w.lineTo(x,v+c),w.endFill())}return w},f.setupTimingPattern=function(){for(var h=8;h<this.moduleCount-8;h++)this.modules[h][6]==null&&(this.modules[h][6]=h%2==0);for(var y=8;y<this.moduleCount-8;y++)this.modules[6][y]==null&&(this.modules[6][y]=y%2==0)},f.setupPositionAdjustPattern=function(){for(var h=M.getPatternPosition(this.typeNumber),y=0;y<h.length;y++)for(var g=0;g<h.length;g++){var w=h[y],c=h[g];if(this.modules[w][c]==null)for(var m=-2;m<=2;m++)for(var v=-2;v<=2;v++)m==-2||m==2||v==-2||v==2||m==0&&v==0?this.modules[w+m][c+v]=!0:this.modules[w+m][c+v]=!1}},f.setupTypeNumber=function(h){for(var y=M.getBCHTypeNumber(this.typeNumber),g=0;g<18;g++){var w=!h&&(y>>g&1)==1;this.modules[Math.floor(g/3)][g%3+this.moduleCount-8-3]=w}for(var g=0;g<18;g++){var w=!h&&(y>>g&1)==1;this.modules[g%3+this.moduleCount-8-3][Math.floor(g/3)]=w}},f.setupTypeInfo=function(h,y){for(var g=this.errorCorrectLevel<<3|y,w=M.getBCHTypeInfo(g),c=0;c<15;c++){var m=!h&&(w>>c&1)==1;c<6?this.modules[c][8]=m:c<8?this.modules[c+1][8]=m:this.modules[this.moduleCount-15+c][8]=m}for(var c=0;c<15;c++){var m=!h&&(w>>c&1)==1;c<8?this.modules[8][this.moduleCount-c-1]=m:c<9?this.modules[8][15-c-1+1]=m:this.modules[8][15-c-1]=m}this.modules[this.moduleCount-8][8]=!h},f.mapData=function(h,y){for(var g=-1,w=this.moduleCount-1,c=7,m=0,v=this.moduleCount-1;v>0;v-=2)for(v==6&&v--;;){for(var b=0;b<2;b++)if(this.modules[w][v-b]==null){var x=!1;m<h.length&&(x=(h[m]>>>c&1)==1);var T=M.getMask(y,w,v-b);T&&(x=!x),this.modules[w][v-b]=x,c--,c==-1&&(m++,c=7)}if(w+=g,w<0||this.moduleCount<=w){w-=g,g=-g;break}}},p.PAD0=236,p.PAD1=17,p.createData=function(h,y,g){for(var w=st.getRSBlocks(h,y),c=new o,m=0;m<g.length;m++){var v=g[m];c.put(v.mode,4),c.put(v.getLength(),M.getLengthInBits(v.mode,h)),v.write(c)}for(var b=0,m=0;m<w.length;m++)b+=w[m].dataCount;if(c.getLengthInBits()>b*8)throw new Error("code length overflow. ("+c.getLengthInBits()+">"+b*8+")");for(c.getLengthInBits()+4<=b*8&&c.put(0,4);c.getLengthInBits()%8!=0;)c.putBit(!1);for(;!(c.getLengthInBits()>=b*8||(c.put(p.PAD0,8),c.getLengthInBits()>=b*8));)c.put(p.PAD1,8);return p.createBytes(c,w)},p.createBytes=function(h,y){for(var g=0,w=0,c=0,m=new Array(y.length),v=new Array(y.length),b=0;b<y.length;b++){var x=y[b].dataCount,T=y[b].totalCount-x;w=Math.max(w,x),c=Math.max(c,T),m[b]=new Array(x);for(var S=0;S<m[b].length;S++)m[b][S]=255&h.buffer[S+g];g+=x;var C=M.getErrorCorrectPolynomial(T),E=new R(m[b],C.getLength()-1),j=E.mod(C);v[b]=new Array(C.getLength()-1);for(var S=0;S<v[b].length;S++){var Z=S+j.getLength()-v[b].length;v[b][S]=Z>=0?j.get(Z):0}}for(var P=0,S=0;S<y.length;S++)P+=y[S].totalCount;for(var Q=new Array(P),B=0,S=0;S<w;S++)for(var b=0;b<y.length;b++)S<m[b].length&&(Q[B++]=m[b][S]);for(var S=0;S<c;S++)for(var b=0;b<y.length;b++)S<v[b].length&&(Q[B++]=v[b][S]);return Q},or.exports=p},84590:function(or,mt,Te){var we=Te(78485);function st(o,M){this.totalCount=o,this.dataCount=M}st.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],st.getRSBlocks=function(o,M){var R=st.getRsBlockTable(o,M);if(R==null)throw new Error("bad rs block @ typeNumber:"+o+"/errorCorrectLevel:"+M);for(var p=R.length/3,f=new Array,h=0;h<p;h++)for(var y=R[h*3+0],g=R[h*3+1],w=R[h*3+2],c=0;c<y;c++)f.push(new st(g,w));return f},st.getRsBlockTable=function(o,M){switch(M){case we.L:return st.RS_BLOCK_TABLE[(o-1)*4+0];case we.M:return st.RS_BLOCK_TABLE[(o-1)*4+1];case we.Q:return st.RS_BLOCK_TABLE[(o-1)*4+2];case we.H:return st.RS_BLOCK_TABLE[(o-1)*4+3];default:return}},or.exports=st},87532:function(or){for(var mt={glog:function(we){if(we<1)throw new Error("glog("+we+")");return mt.LOG_TABLE[we]},gexp:function(we){for(;we<0;)we+=255;for(;we>=256;)we-=255;return mt.EXP_TABLE[we]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},Te=0;Te<8;Te++)mt.EXP_TABLE[Te]=1<<Te;for(var Te=8;Te<256;Te++)mt.EXP_TABLE[Te]=mt.EXP_TABLE[Te-4]^mt.EXP_TABLE[Te-5]^mt.EXP_TABLE[Te-6]^mt.EXP_TABLE[Te-8];for(var Te=0;Te<255;Te++)mt.LOG_TABLE[mt.EXP_TABLE[Te]]=Te;or.exports=mt},48955:function(or){or.exports={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}},28688:function(or,mt,Te){var we=Te(48955),st=Te(13679),o=Te(87532),M={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},R={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(p){for(var f=p<<10;R.getBCHDigit(f)-R.getBCHDigit(R.G15)>=0;)f^=R.G15<<R.getBCHDigit(f)-R.getBCHDigit(R.G15);return(p<<10|f)^R.G15_MASK},getBCHTypeNumber:function(p){for(var f=p<<12;R.getBCHDigit(f)-R.getBCHDigit(R.G18)>=0;)f^=R.G18<<R.getBCHDigit(f)-R.getBCHDigit(R.G18);return p<<12|f},getBCHDigit:function(p){for(var f=0;p!=0;)f++,p>>>=1;return f},getPatternPosition:function(p){return R.PATTERN_POSITION_TABLE[p-1]},getMask:function(p,f,h){switch(p){case M.PATTERN000:return(f+h)%2==0;case M.PATTERN001:return f%2==0;case M.PATTERN010:return h%3==0;case M.PATTERN011:return(f+h)%3==0;case M.PATTERN100:return(Math.floor(f/2)+Math.floor(h/3))%2==0;case M.PATTERN101:return f*h%2+f*h%3==0;case M.PATTERN110:return(f*h%2+f*h%3)%2==0;case M.PATTERN111:return(f*h%3+(f+h)%2)%2==0;default:throw new Error("bad maskPattern:"+p)}},getErrorCorrectPolynomial:function(p){for(var f=new st([1],0),h=0;h<p;h++)f=f.multiply(new st([1,o.gexp(h)],0));return f},getLengthInBits:function(p,f){if(1<=f&&f<10)switch(p){case we.MODE_NUMBER:return 10;case we.MODE_ALPHA_NUM:return 9;case we.MODE_8BIT_BYTE:return 8;case we.MODE_KANJI:return 8;default:throw new Error("mode:"+p)}else if(f<27)switch(p){case we.MODE_NUMBER:return 12;case we.MODE_ALPHA_NUM:return 11;case we.MODE_8BIT_BYTE:return 16;case we.MODE_KANJI:return 10;default:throw new Error("mode:"+p)}else if(f<41)switch(p){case we.MODE_NUMBER:return 14;case we.MODE_ALPHA_NUM:return 13;case we.MODE_8BIT_BYTE:return 16;case we.MODE_KANJI:return 12;default:throw new Error("mode:"+p)}else throw new Error("type:"+f)},getLostPoint:function(p){for(var f=p.getModuleCount(),h=0,y=0;y<f;y++)for(var g=0;g<f;g++){for(var w=0,c=p.isDark(y,g),m=-1;m<=1;m++)if(!(y+m<0||f<=y+m))for(var v=-1;v<=1;v++)g+v<0||f<=g+v||m==0&&v==0||c==p.isDark(y+m,g+v)&&w++;w>5&&(h+=3+w-5)}for(var y=0;y<f-1;y++)for(var g=0;g<f-1;g++){var b=0;p.isDark(y,g)&&b++,p.isDark(y+1,g)&&b++,p.isDark(y,g+1)&&b++,p.isDark(y+1,g+1)&&b++,(b==0||b==4)&&(h+=3)}for(var y=0;y<f;y++)for(var g=0;g<f-6;g++)p.isDark(y,g)&&!p.isDark(y,g+1)&&p.isDark(y,g+2)&&p.isDark(y,g+3)&&p.isDark(y,g+4)&&!p.isDark(y,g+5)&&p.isDark(y,g+6)&&(h+=40);for(var g=0;g<f;g++)for(var y=0;y<f-6;y++)p.isDark(y,g)&&!p.isDark(y+1,g)&&p.isDark(y+2,g)&&p.isDark(y+3,g)&&p.isDark(y+4,g)&&!p.isDark(y+5,g)&&p.isDark(y+6,g)&&(h+=40);for(var x=0,g=0;g<f;g++)for(var y=0;y<f;y++)p.isDark(y,g)&&x++;var T=Math.abs(100*x/f/f-50)/5;return h+=T*10,h}};or.exports=R},15845:function(or,mt,Te){"use strict";function we(_){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?we=function(ee){return typeof ee}:we=function(ee){return ee&&typeof Symbol=="function"&&ee.constructor===Symbol&&ee!==Symbol.prototype?"symbol":typeof ee},we(_)}function st(){return st=Object.assign||function(_){for(var X=1;X<arguments.length;X++){var ee=arguments[X];for(var ie in ee)Object.prototype.hasOwnProperty.call(ee,ie)&&(_[ie]=ee[ie])}return _},st.apply(this,arguments)}function o(_,X){var ee=Object.keys(_);if(Object.getOwnPropertySymbols){var ie=Object.getOwnPropertySymbols(_);X&&(ie=ie.filter(function(he){return Object.getOwnPropertyDescriptor(_,he).enumerable})),ee.push.apply(ee,ie)}return ee}function M(_){for(var X=1;X<arguments.length;X++){var ee=arguments[X]!=null?arguments[X]:{};X%2?o(ee,!0).forEach(function(ie){b(_,ie,ee[ie])}):Object.getOwnPropertyDescriptors?Object.defineProperties(_,Object.getOwnPropertyDescriptors(ee)):o(ee).forEach(function(ie){Object.defineProperty(_,ie,Object.getOwnPropertyDescriptor(ee,ie))})}return _}function R(_,X){if(_==null)return{};var ee=p(_,X),ie,he;if(Object.getOwnPropertySymbols){var ne=Object.getOwnPropertySymbols(_);for(he=0;he<ne.length;he++)ie=ne[he],!(X.indexOf(ie)>=0)&&Object.prototype.propertyIsEnumerable.call(_,ie)&&(ee[ie]=_[ie])}return ee}function p(_,X){if(_==null)return{};var ee={},ie=Object.keys(_),he,ne;for(ne=0;ne<ie.length;ne++)he=ie[ne],!(X.indexOf(he)>=0)&&(ee[he]=_[he]);return ee}function f(_,X){if(!(_ instanceof X))throw new TypeError("Cannot call a class as a function")}function h(_,X){for(var ee=0;ee<X.length;ee++){var ie=X[ee];ie.enumerable=ie.enumerable||!1,ie.configurable=!0,"value"in ie&&(ie.writable=!0),Object.defineProperty(_,ie.key,ie)}}function y(_,X,ee){return X&&h(_.prototype,X),ee&&h(_,ee),_}function g(_,X){return X&&(we(X)==="object"||typeof X=="function")?X:c(_)}function w(_){return w=Object.setPrototypeOf?Object.getPrototypeOf:function(ee){return ee.__proto__||Object.getPrototypeOf(ee)},w(_)}function c(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}function m(_,X){if(typeof X!="function"&&X!==null)throw new TypeError("Super expression must either be null or a function");_.prototype=Object.create(X&&X.prototype,{constructor:{value:_,writable:!0,configurable:!0}}),X&&v(_,X)}function v(_,X){return v=Object.setPrototypeOf||function(ie,he){return ie.__proto__=he,ie},v(_,X)}function b(_,X,ee){return X in _?Object.defineProperty(_,X,{value:ee,enumerable:!0,configurable:!0,writable:!0}):_[X]=ee,_}var x=Te(59301),T=Te(12708),S=Te(86397),C=Te(78485);function E(_){for(var X="",ee=0;ee<_.length;ee++){var ie=_.charCodeAt(ee);ie<128?X+=String.fromCharCode(ie):ie<2048?(X+=String.fromCharCode(192|ie>>6),X+=String.fromCharCode(128|ie&63)):ie<55296||ie>=57344?(X+=String.fromCharCode(224|ie>>12),X+=String.fromCharCode(128|ie>>6&63),X+=String.fromCharCode(128|ie&63)):(ee++,ie=65536+((ie&1023)<<10|_.charCodeAt(ee)&1023),X+=String.fromCharCode(240|ie>>18),X+=String.fromCharCode(128|ie>>12&63),X+=String.fromCharCode(128|ie>>6&63),X+=String.fromCharCode(128|ie&63))}return X}var j={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000",includeMargin:!1},Z={},P=4,Q=.1;function B(_){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,ee=[];return _.forEach(function(ie,he){var ne=null;ie.forEach(function(Ie,q){if(!Ie&&ne!==null){ee.push("M".concat(ne+X," ").concat(he+X,"h").concat(q-ne,"v1H").concat(ne+X,"z")),ne=null;return}if(q===ie.length-1){if(!Ie)return;ne===null?ee.push("M".concat(q+X,",").concat(he+X," h1v1H").concat(q+X,"z")):ee.push("M".concat(ne+X,",").concat(he+X," h").concat(q+1-ne,"v1H").concat(ne+X,"z"));return}Ie&&ne===null&&(ne=q)})}),ee.join("")}function k(_,X){return _.slice().map(function(ee,ie){return ie<X.y||ie>=X.y+X.h?ee:ee.map(function(he,ne){return ne<X.x||ne>=X.x+X.w?he:!1})})}function D(_,X){var ee=_.imageSettings,ie=_.size,he=_.includeMargin;if(ee==null)return null;var ne=he?P:0,Ie=X.length+ne*2,q=Math.floor(ie*Q),pe=Ie/ie,ve=(ee.width||q)*pe,xe=(ee.height||q)*pe,ce=ee.x==null?X.length/2-ve/2:ee.x*pe,fe=ee.y==null?X.length/2-xe/2:ee.y*pe,ge=null;if(ee.excavate){var Se=Math.floor(ce),De=Math.floor(fe),ke=Math.ceil(ve+ce-Se),de=Math.ceil(xe+fe-De);ge={x:Se,y:De,w:ke,h:de}}return{x:ce,y:fe,h:xe,w:ve,excavation:ge}}var F=function(){try{new Path2D().addPath(new Path2D)}catch(_){return!1}return!0}(),J=function(_){m(X,_);function X(){var ee,ie;f(this,X);for(var he=arguments.length,ne=new Array(he),Ie=0;Ie<he;Ie++)ne[Ie]=arguments[Ie];return ie=g(this,(ee=w(X)).call.apply(ee,[this].concat(ne))),b(c(ie),"_canvas",void 0),b(c(ie),"_image",void 0),b(c(ie),"state",{imgLoaded:!1}),b(c(ie),"handleImageLoad",function(){ie.setState({imgLoaded:!0})}),ie}return y(X,[{key:"componentDidMount",value:function(){this.update()}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var ie=this.props,he=ie.value,ne=ie.size,Ie=ie.level,q=ie.bgColor,pe=ie.fgColor,ve=ie.includeMargin,xe=ie.imageSettings,ce=new S(-1,C[Ie]);if(ce.addData(E(he)),ce.make(),this._canvas!=null){var fe=this._canvas,ge=fe.getContext("2d");if(!ge)return;var Se=ce.modules;if(Se===null)return;var De=ve?P:0,ke=Se.length+De*2,de=D(this.props,Se);xe!=null&&de!=null&&de.excavation!=null&&(Se=k(Se,de.excavation));var Y=window.devicePixelRatio||1;fe.height=fe.width=ne*Y;var ye=ne/ke*Y;ge.scale(ye,ye),ge.fillStyle=q,ge.fillRect(0,0,ke,ke),ge.fillStyle=pe,F?ge.fill(new Path2D(B(Se,De))):Se.forEach(function(V,G){V.forEach(function(W,K){W&&ge.fillRect(K+De,G+De,1,1)})}),this.state.imgLoaded&&this._image&&de!=null&&ge.drawImage(this._image,de.x+De,de.y+De,de.w,de.h)}}},{key:"render",value:function(){var ie=this,he=this.props,ne=he.value,Ie=he.size,q=he.level,pe=he.bgColor,ve=he.fgColor,xe=he.style,ce=he.includeMargin,fe=he.imageSettings,ge=R(he,["value","size","level","bgColor","fgColor","style","includeMargin","imageSettings"]),Se=M({height:Ie,width:Ie},xe),De=null,ke=fe&&fe.src;return fe!=null&&ke!=null&&(De=x.createElement("img",{src:ke,style:{display:"none"},onLoad:this.handleImageLoad,ref:function(Y){return ie._image=Y}})),x.createElement(x.Fragment,null,x.createElement("canvas",st({style:Se,height:Ie,width:Ie,ref:function(Y){return ie._canvas=Y}},ge)),De)}}]),X}(x.PureComponent);b(J,"defaultProps",j);var H=function(_){m(X,_);function X(){return f(this,X),g(this,w(X).apply(this,arguments))}return y(X,[{key:"render",value:function(){var ie=this.props,he=ie.value,ne=ie.size,Ie=ie.level,q=ie.bgColor,pe=ie.fgColor,ve=ie.includeMargin,xe=ie.imageSettings,ce=R(ie,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]),fe=new S(-1,C[Ie]);fe.addData(E(he)),fe.make();var ge=fe.modules;if(ge===null)return null;var Se=ve?P:0,De=ge.length+Se*2,ke=D(this.props,ge),de=null;xe!=null&&ke!=null&&(ke.excavation!=null&&(ge=k(ge,ke.excavation)),de=x.createElement("image",{xlinkHref:xe.src,height:ke.h,width:ke.w,x:ke.x+Se,y:ke.y+Se,preserveAspectRatio:"none"}));var Y=B(ge,Se);return x.createElement("svg",st({shapeRendering:"crispEdges",height:ne,width:ne,viewBox:"0 0 ".concat(De," ").concat(De)},ce),x.createElement("path",{fill:q,d:"M0,0 h".concat(De,"v").concat(De,"H0z")}),x.createElement("path",{fill:pe,d:Y}),de)}}]),X}(x.PureComponent);b(H,"defaultProps",j);var N=function(X){var ee=X.renderAs,ie=R(X,["renderAs"]),he=ee==="svg"?H:J;return x.createElement(he,ie)};N.defaultProps=M({renderAs:"canvas"},j),or.exports=N},29301:function(or,mt,Te){"use strict";Te.d(mt,{Z:function(){return H}});var we=Te(60499),st=Te(59301),o=Te(11592),M=Te(48736),R=Te(85899),p=Te(43749),f=Te(76846),h=Te(8654),y=st.createContext(null);function g(N){var _=N.children,X=N.onBatchResize,ee=st.useRef(0),ie=st.useRef([]),he=st.useContext(y),ne=st.useCallback(function(Ie,q,pe){ee.current+=1;var ve=ee.current;ie.current.push({size:Ie,element:q,data:pe}),Promise.resolve().then(function(){ve===ee.current&&(X==null||X(ie.current),ie.current=[])}),he==null||he(Ie,q,pe)},[X,he]);return st.createElement(y.Provider,{value:ne},_)}var w=Te(76374),c=new Map;function m(N){N.forEach(function(_){var X,ee=_.target;(X=c.get(ee))===null||X===void 0||X.forEach(function(ie){return ie(ee)})})}var v=new w.Z(m),b=null,x=null;function T(N,_){c.has(N)||(c.set(N,new Set),v.observe(N)),c.get(N).add(_)}function S(N,_){c.has(N)&&(c.get(N).delete(_),c.get(N).size||(v.unobserve(N),c.delete(N)))}var C=Te(38705),E=Te(17212),j=Te(39153),Z=Te(55401),P=function(N){(0,j.Z)(X,N);var _=(0,Z.Z)(X);function X(){return(0,C.Z)(this,X),_.apply(this,arguments)}return(0,E.Z)(X,[{key:"render",value:function(){return this.props.children}}]),X}(st.Component);function Q(N,_){var X=N.children,ee=N.disabled,ie=st.useRef(null),he=st.useRef(null),ne=st.useContext(y),Ie=typeof X=="function",q=Ie?X(ie):X,pe=st.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),ve=!Ie&&st.isValidElement(q)&&(0,h.Yr)(q),xe=ve?(0,h.C4)(q):null,ce=(0,h.x1)(xe,ie),fe=function(){var ke;return(0,f.ZP)(ie.current)||(ie.current&&(0,p.Z)(ie.current)==="object"?(0,f.ZP)((ke=ie.current)===null||ke===void 0?void 0:ke.nativeElement):null)||(0,f.ZP)(he.current)};st.useImperativeHandle(_,function(){return fe()});var ge=st.useRef(N);ge.current=N;var Se=st.useCallback(function(De){var ke=ge.current,de=ke.onResize,Y=ke.data,ye=De.getBoundingClientRect(),V=ye.width,G=ye.height,W=De.offsetWidth,K=De.offsetHeight,te=Math.floor(V),U=Math.floor(G);if(pe.current.width!==te||pe.current.height!==U||pe.current.offsetWidth!==W||pe.current.offsetHeight!==K){var L={width:te,height:U,offsetWidth:W,offsetHeight:K};pe.current=L;var $=W===Math.round(V)?V:W,ue=K===Math.round(G)?G:K,Ee=(0,R.Z)((0,R.Z)({},L),{},{offsetWidth:$,offsetHeight:ue});ne==null||ne(Ee,De,Y),de&&Promise.resolve().then(function(){de(Ee,De)})}},[]);return st.useEffect(function(){var De=fe();return De&&!ee&&T(De,Se),function(){return S(De,Se)}},[ie.current,ee]),st.createElement(P,{ref:he},ve?st.cloneElement(q,{ref:ce}):q)}var B=st.forwardRef(Q),k=B,D="rc-observer-key";function F(N,_){var X=N.children,ee=typeof X=="function"?[X]:(0,o.Z)(X);return ee.map(function(ie,he){var ne=(ie==null?void 0:ie.key)||"".concat(D,"-").concat(he);return st.createElement(k,(0,we.Z)({},N,{key:ne,ref:he===0?_:void 0}),ie)})}var J=st.forwardRef(F);J.Collection=g;var H=J},29125:function(or,mt,Te){"use strict";Te.d(mt,{G:function(){return M},Z:function(){return S}});var we=Te(92310),st=Te.n(we),o=Te(59301);function M(C){var E=C.children,j=C.prefixCls,Z=C.id,P=C.overlayInnerStyle,Q=C.bodyClassName,B=C.className,k=C.style;return o.createElement("div",{className:st()("".concat(j,"-content"),B),style:k},o.createElement("div",{className:st()("".concat(j,"-inner"),Q),id:Z,role:"tooltip",style:P},typeof E=="function"?E():E))}var R=Te(60499),p=Te(85899),f=Te(42244),h=Te(68196),y={shiftX:64,adjustY:1},g={adjustX:1,shiftY:!0},w=[0,0],c={left:{points:["cr","cl"],overflow:g,offset:[-4,0],targetOffset:w},right:{points:["cl","cr"],overflow:g,offset:[4,0],targetOffset:w},top:{points:["bc","tc"],overflow:y,offset:[0,-4],targetOffset:w},bottom:{points:["tc","bc"],overflow:y,offset:[0,4],targetOffset:w},topLeft:{points:["bl","tl"],overflow:y,offset:[0,-4],targetOffset:w},leftTop:{points:["tr","tl"],overflow:g,offset:[-4,0],targetOffset:w},topRight:{points:["br","tr"],overflow:y,offset:[0,-4],targetOffset:w},rightTop:{points:["tl","tr"],overflow:g,offset:[4,0],targetOffset:w},bottomRight:{points:["tr","br"],overflow:y,offset:[0,4],targetOffset:w},rightBottom:{points:["bl","br"],overflow:g,offset:[4,0],targetOffset:w},bottomLeft:{points:["tl","bl"],overflow:y,offset:[0,4],targetOffset:w},leftBottom:{points:["br","bl"],overflow:g,offset:[-4,0],targetOffset:w}},m=null,v=Te(80402),b=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],x=function(E,j){var Z=E.overlayClassName,P=E.trigger,Q=P===void 0?["hover"]:P,B=E.mouseEnterDelay,k=B===void 0?0:B,D=E.mouseLeaveDelay,F=D===void 0?.1:D,J=E.overlayStyle,H=E.prefixCls,N=H===void 0?"rc-tooltip":H,_=E.children,X=E.onVisibleChange,ee=E.afterVisibleChange,ie=E.transitionName,he=E.animation,ne=E.motion,Ie=E.placement,q=Ie===void 0?"right":Ie,pe=E.align,ve=pe===void 0?{}:pe,xe=E.destroyTooltipOnHide,ce=xe===void 0?!1:xe,fe=E.defaultVisible,ge=E.getTooltipContainer,Se=E.overlayInnerStyle,De=E.arrowContent,ke=E.overlay,de=E.id,Y=E.showArrow,ye=Y===void 0?!0:Y,V=E.classNames,G=E.styles,W=(0,f.Z)(E,b),K=(0,v.Z)(de),te=(0,o.useRef)(null);(0,o.useImperativeHandle)(j,function(){return te.current});var U=(0,p.Z)({},W);"visible"in E&&(U.popupVisible=E.visible);var L=function(){return o.createElement(M,{key:"content",prefixCls:N,id:K,bodyClassName:V==null?void 0:V.body,overlayInnerStyle:(0,p.Z)((0,p.Z)({},Se),G==null?void 0:G.body)},ke)},$=function(){var Ee=o.Children.only(_),ze=(Ee==null?void 0:Ee.props)||{},_e=(0,p.Z)((0,p.Z)({},ze),{},{"aria-describedby":ke?K:null});return o.cloneElement(_,_e)};return o.createElement(h.Z,(0,R.Z)({popupClassName:st()(Z,V==null?void 0:V.root),prefixCls:N,popup:L,action:Q,builtinPlacements:c,popupPlacement:q,ref:te,popupAlign:ve,getPopupContainer:ge,onPopupVisibleChange:X,afterPopupVisibleChange:ee,popupTransitionName:ie,popupAnimation:he,popupMotion:ne,defaultPopupVisible:fe,autoDestroy:ce,mouseLeaveDelay:F,popupStyle:(0,p.Z)((0,p.Z)({},J),G==null?void 0:G.root),mouseEnterDelay:k,arrow:ye},U),$())},T=(0,o.forwardRef)(x),S=T},49658:function(or,mt){"use strict";mt.Z=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var Te=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(Te)||/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(Te==null?void 0:Te.substr(0,4))}},76374:function(or,mt,Te){"use strict";var we=function(){if(typeof Map!="undefined")return Map;function H(N,_){var X=-1;return N.some(function(ee,ie){return ee[0]===_?(X=ie,!0):!1}),X}return function(){function N(){this.__entries__=[]}return Object.defineProperty(N.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),N.prototype.get=function(_){var X=H(this.__entries__,_),ee=this.__entries__[X];return ee&&ee[1]},N.prototype.set=function(_,X){var ee=H(this.__entries__,_);~ee?this.__entries__[ee][1]=X:this.__entries__.push([_,X])},N.prototype.delete=function(_){var X=this.__entries__,ee=H(X,_);~ee&&X.splice(ee,1)},N.prototype.has=function(_){return!!~H(this.__entries__,_)},N.prototype.clear=function(){this.__entries__.splice(0)},N.prototype.forEach=function(_,X){X===void 0&&(X=null);for(var ee=0,ie=this.__entries__;ee<ie.length;ee++){var he=ie[ee];_.call(X,he[1],he[0])}},N}()}(),st=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,o=function(){return typeof Te.g!="undefined"&&Te.g.Math===Math?Te.g:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),M=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(o):function(H){return setTimeout(function(){return H(Date.now())},1e3/60)}}(),R=2;function p(H,N){var _=!1,X=!1,ee=0;function ie(){_&&(_=!1,H()),X&&ne()}function he(){M(ie)}function ne(){var Ie=Date.now();if(_){if(Ie-ee<R)return;X=!0}else _=!0,X=!1,setTimeout(he,N);ee=Ie}return ne}var f=20,h=["top","right","bottom","left","width","height","size","weight"],y=typeof MutationObserver!="undefined",g=function(){function H(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=p(this.refresh.bind(this),f)}return H.prototype.addObserver=function(N){~this.observers_.indexOf(N)||this.observers_.push(N),this.connected_||this.connect_()},H.prototype.removeObserver=function(N){var _=this.observers_,X=_.indexOf(N);~X&&_.splice(X,1),!_.length&&this.connected_&&this.disconnect_()},H.prototype.refresh=function(){var N=this.updateObservers_();N&&this.refresh()},H.prototype.updateObservers_=function(){var N=this.observers_.filter(function(_){return _.gatherActive(),_.hasActive()});return N.forEach(function(_){return _.broadcastActive()}),N.length>0},H.prototype.connect_=function(){!st||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),y?(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)},H.prototype.disconnect_=function(){!st||!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)},H.prototype.onTransitionEnd_=function(N){var _=N.propertyName,X=_===void 0?"":_,ee=h.some(function(ie){return!!~X.indexOf(ie)});ee&&this.refresh()},H.getInstance=function(){return this.instance_||(this.instance_=new H),this.instance_},H.instance_=null,H}(),w=function(H,N){for(var _=0,X=Object.keys(N);_<X.length;_++){var ee=X[_];Object.defineProperty(H,ee,{value:N[ee],enumerable:!1,writable:!1,configurable:!0})}return H},c=function(H){var N=H&&H.ownerDocument&&H.ownerDocument.defaultView;return N||o},m=P(0,0,0,0);function v(H){return parseFloat(H)||0}function b(H){for(var N=[],_=1;_<arguments.length;_++)N[_-1]=arguments[_];return N.reduce(function(X,ee){var ie=H["border-"+ee+"-width"];return X+v(ie)},0)}function x(H){for(var N=["top","right","bottom","left"],_={},X=0,ee=N;X<ee.length;X++){var ie=ee[X],he=H["padding-"+ie];_[ie]=v(he)}return _}function T(H){var N=H.getBBox();return P(0,0,N.width,N.height)}function S(H){var N=H.clientWidth,_=H.clientHeight;if(!N&&!_)return m;var X=c(H).getComputedStyle(H),ee=x(X),ie=ee.left+ee.right,he=ee.top+ee.bottom,ne=v(X.width),Ie=v(X.height);if(X.boxSizing==="border-box"&&(Math.round(ne+ie)!==N&&(ne-=b(X,"left","right")+ie),Math.round(Ie+he)!==_&&(Ie-=b(X,"top","bottom")+he)),!E(H)){var q=Math.round(ne+ie)-N,pe=Math.round(Ie+he)-_;Math.abs(q)!==1&&(ne-=q),Math.abs(pe)!==1&&(Ie-=pe)}return P(ee.left,ee.top,ne,Ie)}var C=function(){return typeof SVGGraphicsElement!="undefined"?function(H){return H instanceof c(H).SVGGraphicsElement}:function(H){return H instanceof c(H).SVGElement&&typeof H.getBBox=="function"}}();function E(H){return H===c(H).document.documentElement}function j(H){return st?C(H)?T(H):S(H):m}function Z(H){var N=H.x,_=H.y,X=H.width,ee=H.height,ie=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,he=Object.create(ie.prototype);return w(he,{x:N,y:_,width:X,height:ee,top:_,right:N+X,bottom:ee+_,left:N}),he}function P(H,N,_,X){return{x:H,y:N,width:_,height:X}}var Q=function(){function H(N){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=P(0,0,0,0),this.target=N}return H.prototype.isActive=function(){var N=j(this.target);return this.contentRect_=N,N.width!==this.broadcastWidth||N.height!==this.broadcastHeight},H.prototype.broadcastRect=function(){var N=this.contentRect_;return this.broadcastWidth=N.width,this.broadcastHeight=N.height,N},H}(),B=function(){function H(N,_){var X=Z(_);w(this,{target:N,contentRect:X})}return H}(),k=function(){function H(N,_,X){if(this.activeObservations_=[],this.observations_=new we,typeof N!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=N,this.controller_=_,this.callbackCtx_=X}return H.prototype.observe=function(N){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(N instanceof c(N).Element))throw new TypeError('parameter 1 is not of type "Element".');var _=this.observations_;_.has(N)||(_.set(N,new Q(N)),this.controller_.addObserver(this),this.controller_.refresh())}},H.prototype.unobserve=function(N){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(N instanceof c(N).Element))throw new TypeError('parameter 1 is not of type "Element".');var _=this.observations_;_.has(N)&&(_.delete(N),_.size||this.controller_.removeObserver(this))}},H.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},H.prototype.gatherActive=function(){var N=this;this.clearActive(),this.observations_.forEach(function(_){_.isActive()&&N.activeObservations_.push(_)})},H.prototype.broadcastActive=function(){if(this.hasActive()){var N=this.callbackCtx_,_=this.activeObservations_.map(function(X){return new B(X.target,X.broadcastRect())});this.callback_.call(N,_,N),this.clearActive()}},H.prototype.clearActive=function(){this.activeObservations_.splice(0)},H.prototype.hasActive=function(){return this.activeObservations_.length>0},H}(),D=typeof WeakMap!="undefined"?new WeakMap:new we,F=function(){function H(N){if(!(this instanceof H))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var _=g.getInstance(),X=new k(N,_,this);D.set(this,X)}return H}();["observe","unobserve","disconnect"].forEach(function(H){F.prototype[H]=function(){var N;return(N=D.get(this))[H].apply(N,arguments)}});var J=function(){return typeof o.ResizeObserver!="undefined"?o.ResizeObserver:F}();mt.Z=J},91423:function(){},22591:function(){},24726:function(){},90872:function(){}}]);