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...

1 line
1.4 MiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

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

(self.webpackChunk=self.webpackChunk||[]).push([[1512],{65030:function(e,t,n){"use strict";n.d(t,{Z:function(){return G}});var r=n(33885),o=n(42978),i=n(75931),a=n(43403),s=n(92310),u=n.n(s),c=n(29301),l=n(76846),f=n(96452),p=n(6089),h=n(80402),d=n(34280),m=n(49658),g=n(59301),v=n(54476),y=n(77900),b=n(8654);function w(e){var t=e.prefixCls,n=e.align,r=e.arrow,o=e.arrowPos,i=r||{},a=i.className,s=i.content,c=o.x,l=void 0===c?0:c,f=o.y,p=void 0===f?0:f,h=g.useRef();if(!n||!n.points)return null;var d={position:"absolute"};if(!1!==n.autoArrow){var m=n.points[0],v=n.points[1],y=m[0],b=m[1],w=v[0],x=v[1];y!==w&&["t","b"].includes(y)?"t"===y?d.top=0:d.bottom=0:d.top=p,b!==x&&["l","r"].includes(b)?"l"===b?d.left=0:d.right=0:d.left=l}return g.createElement("div",{ref:h,className:u()("".concat(t,"-arrow"),a),style:d},s)}function x(e){var t=e.prefixCls,n=e.open,r=e.zIndex,o=e.mask,i=e.motion;return o?g.createElement(y.default,(0,v.Z)({},i,{motionAppear:!0,visible:n,removeOnLeave:!0}),(function(e){var n=e.className;return g.createElement("div",{style:{zIndex:r},className:u()("".concat(t,"-mask"),n)})})):null}var A=g.memo((function(e){return e.children}),(function(e,t){return t.cache}));var E=g.forwardRef((function(e,t){var n=e.popup,i=e.className,a=e.prefixCls,s=e.style,l=e.target,f=e.onVisibleChanged,p=e.open,h=e.keepDom,m=e.fresh,E=e.onClick,C=e.mask,k=e.arrow,I=e.arrowPos,S=e.align,j=e.motion,T=e.maskMotion,R=e.forceRender,O=e.getPopupContainer,D=e.autoDestroy,B=e.portal,_=e.zIndex,N=e.onMouseEnter,P=e.onMouseLeave,M=e.onPointerEnter,F=e.onPointerDownCapture,L=e.ready,U=e.offsetX,W=e.offsetY,z=e.offsetR,q=e.offsetB,Q=e.onAlign,V=e.onPrepare,H=e.stretch,G=e.targetWidth,X=e.targetHeight,Z="function"==typeof n?n():n,K=p||h,J=(null==O?void 0:O.length)>0,Y=g.useState(!O||!J),$=(0,o.Z)(Y,2),ee=$[0],te=$[1];if((0,d.Z)((function(){!ee&&J&&l&&te(!0)}),[ee,J,l]),!ee)return null;var ne="auto",re={left:"-1000vw",top:"-1000vh",right:ne,bottom:ne};if(L||!p){var oe,ie=S.points,ae=S.dynamicInset||(null===(oe=S._experimental)||void 0===oe?void 0:oe.dynamicInset),se=ae&&"r"===ie[0][1],ue=ae&&"b"===ie[0][0];se?(re.right=z,re.left=ne):(re.left=U,re.right=ne),ue?(re.bottom=q,re.top=ne):(re.top=W,re.bottom=ne)}var ce={};return H&&(H.includes("height")&&X?ce.height=X:H.includes("minHeight")&&X&&(ce.minHeight=X),H.includes("width")&&G?ce.width=G:H.includes("minWidth")&&G&&(ce.minWidth=G)),p||(ce.pointerEvents="none"),g.createElement(B,{open:R||K,getContainer:O&&function(){return O(l)},autoDestroy:D},g.createElement(x,{prefixCls:a,open:p,zIndex:_,mask:C,motion:T}),g.createElement(c.Z,{onResize:Q,disabled:!p},(function(e){return g.createElement(y.default,(0,v.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:R,leavedClassName:"".concat(a,"-hidden")},j,{onAppearPrepare:V,onEnterPrepare:V,visible:p,onVisibleChanged:function(e){var t;null==j||null===(t=j.onVisibleChanged)||void 0===t||t.call(j,e),f(e)}}),(function(n,o){var c=n.className,l=n.style,f=u()(a,c,i);return g.createElement("div",{ref:(0,b.sQ)(e,t,o),className:f,style:(0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)({"--arrow-x":"".concat(I.x||0,"px"),"--arrow-y":"".concat(I.y||0,"px")},re),ce),l),{},{boxSizing:"border-box",zIndex:_},s),onMouseEnter:N,onMouseLeave:P,onPointerEnter:M,onClick:E,onPointerDownCapture:F},k&&g.createElement(w,{prefixCls:a,arrow:k,arrowPos:I,align:S}),g.createElement(A,{cache:!p&&!m},Z))}))})))}));var C=g.forwardRef((function(e,t){var n=e.children,r=e.getTriggerDOMNode,o=(0,b.Yr)(n),i=g.useCallback((function(e){(0,b.mH)(t,r?r(e):e)}),[r]),a=(0,b.x1)(i,(0,b.C4)(n));return o?g.cloneElement(n,{ref:a}):n})),k=g.createContext(null);function I(e){return e?Array.isArray(e)?e:[e]:[]}function S(e,t,n,r){return g.useMemo((function(){var o=I(null!=n?n:t),i=I(null!=r?r:t),a=new Set(o),s=new Set(i);return e&&(a.has("hover")&&(a.delete("hover"),a.add("click")),s.has("hover")&&(s.delete("hover"),s.add("click"))),[a,s]}),[e,t,n,r])}var j=n(29194);function T(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function R(e,t,n,r){for(var o=n.points,i=Object.keys(e),a=0;a<i.length;a+=1){var s,u=i[a];if(T(null===(s=e[u])||void 0===s?void 0:s.points,o,r))return"".concat(t,"-placement-").concat(u)}return""}function O(e,t,n,r){return t||(n?{motionName:"".concat(e,"-").concat(n)}:r?{motionName:r}:null)}function D(e){return e.ownerDocument.defaultView}function B(e){for(var t=[],n=null==e?void 0:e.parentElement,r=["hidden","scroll","clip","auto"];n;){var o=D(n).getComputedStyle(n);[o.overflowX,o.overflowY,o.overflow].some((function(e){return r.includes(e)}))&&t.push(n),n=n.parentElement}return t}function _(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Number.isNaN(e)?t:e}function N(e){return _(parseFloat(e),0)}function P(e,t){var n=(0,r.Z)({},e);return(t||[]).forEach((function(e){if(!(e instanceof HTMLBodyElement||e instanceof HTMLHtmlElement)){var t=D(e).getComputedStyle(e),r=t.overflow,o=t.overflowClipMargin,i=t.borderTopWidth,a=t.borderBottomWidth,s=t.borderLeftWidth,u=t.borderRightWidth,c=e.getBoundingClientRect(),l=e.offsetHeight,f=e.clientHeight,p=e.offsetWidth,h=e.clientWidth,d=N(i),m=N(a),g=N(s),v=N(u),y=_(Math.round(c.width/p*1e3)/1e3),b=_(Math.round(c.height/l*1e3)/1e3),w=(p-h-g-v)*y,x=(l-f-d-m)*b,A=d*b,E=m*b,C=g*y,k=v*y,I=0,S=0;if("clip"===r){var j=N(o);I=j*y,S=j*b}var T=c.x+C-I,R=c.y+A-S,O=T+c.width+2*I-C-k-w,B=R+c.height+2*S-A-E-x;n.left=Math.max(n.left,T),n.top=Math.max(n.top,R),n.right=Math.min(n.right,O),n.bottom=Math.min(n.bottom,B)}})),n}function M(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n="".concat(t),r=n.match(/^(.*)\%$/);return r?e*(parseFloat(r[1])/100):parseFloat(n)}function F(e,t){var n=t||[],r=(0,o.Z)(n,2),i=r[0],a=r[1];return[M(e.width,i),M(e.height,a)]}function L(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return[e[0],e[1]]}function U(e,t){var n,r=t[0],o=t[1];return n="t"===r?e.y:"b"===r?e.y+e.height:e.y+e.height/2,{x:"l"===o?e.x:"r"===o?e.x+e.width:e.x+e.width/2,y:n}}function W(e,t){var n={t:"b",b:"t",l:"r",r:"l"};return e.map((function(e,r){return r===t?n[e]||"c":e})).join("")}function z(e,t,n,i,a,s,u){var c=g.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:a[i]||{}}),f=(0,o.Z)(c,2),h=f[0],m=f[1],v=g.useRef(0),y=g.useMemo((function(){return t?B(t):[]}),[t]),b=g.useRef({});e||(b.current={});var w=(0,p.Z)((function(){if(t&&n&&e){var c,f,p,h,d,g=t,v=g.ownerDocument,w=D(g),x=w.getComputedStyle(g).position,A=g.style.left,E=g.style.top,C=g.style.right,k=g.style.bottom,I=g.style.overflow,S=(0,r.Z)((0,r.Z)({},a[i]),s),T=v.createElement("div");if(null===(c=g.parentElement)||void 0===c||c.appendChild(T),T.style.left="".concat(g.offsetLeft,"px"),T.style.top="".concat(g.offsetTop,"px"),T.style.position=x,T.style.height="".concat(g.offsetHeight,"px"),T.style.width="".concat(g.offsetWidth,"px"),g.style.left="0",g.style.top="0",g.style.right="auto",g.style.bottom="auto",g.style.overflow="hidden",Array.isArray(n))d={x:n[0],y:n[1],width:0,height:0};else{var R,O,B=n.getBoundingClientRect();B.x=null!==(R=B.x)&&void 0!==R?R:B.left,B.y=null!==(O=B.y)&&void 0!==O?O:B.top,d={x:B.x,y:B.y,width:B.width,height:B.height}}var N=g.getBoundingClientRect(),M=w.getComputedStyle(g),z=M.height,q=M.width;N.x=null!==(f=N.x)&&void 0!==f?f:N.left,N.y=null!==(p=N.y)&&void 0!==p?p:N.top;var Q=v.documentElement,V=Q.clientWidth,H=Q.clientHeight,G=Q.scrollWidth,X=Q.scrollHeight,Z=Q.scrollTop,K=Q.scrollLeft,J=N.height,Y=N.width,$=d.height,ee=d.width,te={left:0,top:0,right:V,bottom:H},ne={left:-K,top:-Z,right:G-K,bottom:X-Z},re=S.htmlRegion,oe="visible",ie="visibleFirst";"scroll"!==re&&re!==ie&&(re=oe);var ae=re===ie,se=P(ne,y),ue=P(te,y),ce=re===oe?ue:se,le=ae?ue:ce;g.style.left="auto",g.style.top="auto",g.style.right="0",g.style.bottom="0";var fe=g.getBoundingClientRect();g.style.left=A,g.style.top=E,g.style.right=C,g.style.bottom=k,g.style.overflow=I,null===(h=g.parentElement)||void 0===h||h.removeChild(T);var pe=_(Math.round(Y/parseFloat(q)*1e3)/1e3),he=_(Math.round(J/parseFloat(z)*1e3)/1e3);if(0===pe||0===he||(0,l.Sh)(n)&&!(0,j.Z)(n))return;var de=S.offset,me=S.targetOffset,ge=F(N,de),ve=(0,o.Z)(ge,2),ye=ve[0],be=ve[1],we=F(d,me),xe=(0,o.Z)(we,2),Ae=xe[0],Ee=xe[1];d.x-=Ae,d.y-=Ee;var Ce=S.points||[],ke=(0,o.Z)(Ce,2),Ie=ke[0],Se=L(ke[1]),je=L(Ie),Te=U(d,Se),Re=U(N,je),Oe=(0,r.Z)({},S),De=Te.x-Re.x+ye,Be=Te.y-Re.y+be;function It(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ce,r=N.x+e,o=N.y+t,i=r+Y,a=o+J,s=Math.max(r,n.left),u=Math.max(o,n.top),c=Math.min(i,n.right),l=Math.min(a,n.bottom);return Math.max(0,(c-s)*(l-u))}var _e,Ne,Pe,Me,Fe=It(De,Be),Le=It(De,Be,ue),Ue=U(d,["t","l"]),We=U(N,["t","l"]),ze=U(d,["b","r"]),qe=U(N,["b","r"]),Qe=S.overflow||{},Ve=Qe.adjustX,He=Qe.adjustY,Ge=Qe.shiftX,Xe=Qe.shiftY,Ze=function(e){return"boolean"==typeof e?e:e>=0};function St(){_e=N.y+Be,Ne=_e+J,Pe=N.x+De,Me=Pe+Y}St();var Ke=Ze(He),Je=je[0]===Se[0];if(Ke&&"t"===je[0]&&(Ne>le.bottom||b.current.bt)){var Ye=Be;Je?Ye-=J-$:Ye=Ue.y-qe.y-be;var $e=It(De,Ye),et=It(De,Ye,ue);$e>Fe||$e===Fe&&(!ae||et>=Le)?(b.current.bt=!0,Be=Ye,be=-be,Oe.points=[W(je,0),W(Se,0)]):b.current.bt=!1}if(Ke&&"b"===je[0]&&(_e<le.top||b.current.tb)){var tt=Be;Je?tt+=J-$:tt=ze.y-We.y-be;var nt=It(De,tt),rt=It(De,tt,ue);nt>Fe||nt===Fe&&(!ae||rt>=Le)?(b.current.tb=!0,Be=tt,be=-be,Oe.points=[W(je,0),W(Se,0)]):b.current.tb=!1}var ot=Ze(Ve),it=je[1]===Se[1];if(ot&&"l"===je[1]&&(Me>le.right||b.current.rl)){var at=De;it?at-=Y-ee:at=Ue.x-qe.x-ye;var st=It(at,Be),ut=It(at,Be,ue);st>Fe||st===Fe&&(!ae||ut>=Le)?(b.current.rl=!0,De=at,ye=-ye,Oe.points=[W(je,1),W(Se,1)]):b.current.rl=!1}if(ot&&"r"===je[1]&&(Pe<le.left||b.current.lr)){var ct=De;it?ct+=Y-ee:ct=ze.x-We.x-ye;var lt=It(ct,Be),ft=It(ct,Be,ue);lt>Fe||lt===Fe&&(!ae||ft>=Le)?(b.current.lr=!0,De=ct,ye=-ye,Oe.points=[W(je,1),W(Se,1)]):b.current.lr=!1}St();var pt=!0===Ge?0:Ge;"number"==typeof pt&&(Pe<ue.left&&(De-=Pe-ue.left-ye,d.x+ee<ue.left+pt&&(De+=d.x-ue.left+ee-pt)),Me>ue.right&&(De-=Me-ue.right-ye,d.x>ue.right-pt&&(De+=d.x-ue.right+pt)));var ht=!0===Xe?0:Xe;"number"==typeof ht&&(_e<ue.top&&(Be-=_e-ue.top-be,d.y+$<ue.top+ht&&(Be+=d.y-ue.top+$-ht)),Ne>ue.bottom&&(Be-=Ne-ue.bottom-be,d.y>ue.bottom-ht&&(Be+=d.y-ue.bottom+ht)));var dt=N.x+De,mt=dt+Y,gt=N.y+Be,vt=gt+J,yt=d.x,bt=yt+ee,wt=d.y,xt=wt+$,At=(Math.max(dt,yt)+Math.min(mt,bt))/2-dt,Et=(Math.max(gt,wt)+Math.min(vt,xt))/2-gt;null==u||u(t,Oe);var Ct=fe.right-N.x-(De+N.width),kt=fe.bottom-N.y-(Be+N.height);1===pe&&(De=Math.round(De),Ct=Math.round(Ct)),1===he&&(Be=Math.round(Be),kt=Math.round(kt)),m({ready:!0,offsetX:De/pe,offsetY:Be/he,offsetR:Ct/pe,offsetB:kt/he,arrowX:At/pe,arrowY:Et/he,scaleX:pe,scaleY:he,align:Oe})}})),x=function(){m((function(e){return(0,r.Z)((0,r.Z)({},e),{},{ready:!1})}))};return(0,d.Z)(x,[i]),(0,d.Z)((function(){e||x()}),[e]),[h.ready,h.offsetX,h.offsetY,h.offsetR,h.offsetB,h.arrowX,h.arrowY,h.scaleX,h.scaleY,h.align,function(){v.current+=1;var e=v.current;Promise.resolve().then((function(){v.current===e&&w()}))}]}var q=n(94480);function Q(e,t,n,r,o){(0,d.Z)((function(){if(e&&t&&n){var i=n,a=B(t),s=B(i),u=D(i),c=new Set([u].concat((0,q.Z)(a),(0,q.Z)(s)));function l(){r(),o()}return c.forEach((function(e){e.addEventListener("scroll",l,{passive:!0})})),u.addEventListener("resize",l,{passive:!0}),r(),function(){c.forEach((function(e){e.removeEventListener("scroll",l),u.removeEventListener("resize",l)}))}}}),[e,t,n])}n(48736);function V(e,t,n,r,o,i,a,s){var u=g.useRef(e);u.current=e;var c=g.useRef(!1);return g.useEffect((function(){if(t&&r&&(!o||i)){var e=function(){c.current=!1},l=function(e){var t;!u.current||a((null===(t=e.composedPath)||void 0===t||null===(t=t.call(e))||void 0===t?void 0:t[0])||e.target)||c.current||s(!1)},p=D(r);p.addEventListener("pointerdown",e,!0),p.addEventListener("mousedown",l,!0),p.addEventListener("contextmenu",l,!0);var h=(0,f.A)(n);return h&&(h.addEventListener("mousedown",l,!0),h.addEventListener("contextmenu",l,!0)),function(){p.removeEventListener("pointerdown",e,!0),p.removeEventListener("mousedown",l,!0),p.removeEventListener("contextmenu",l,!0),h&&(h.removeEventListener("mousedown",l,!0),h.removeEventListener("contextmenu",l,!0))}}}),[t,n,r,o,i]),function(){c.current=!0}}var H=["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"];var G=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z,t=g.forwardRef((function(t,n){var a=t.prefixCls,s=void 0===a?"rc-trigger-popup":a,v=t.children,y=t.action,b=void 0===y?"hover":y,w=t.showAction,x=t.hideAction,A=t.popupVisible,I=t.defaultPopupVisible,j=t.onPopupVisibleChange,T=t.afterPopupVisibleChange,D=t.mouseEnterDelay,B=t.mouseLeaveDelay,_=void 0===B?.1:B,N=t.focusDelay,P=t.blurDelay,M=t.mask,F=t.maskClosable,L=void 0===F||F,U=t.getPopupContainer,W=t.forceRender,q=t.autoDestroy,G=t.destroyPopupOnHide,X=t.popup,Z=t.popupClassName,K=t.popupStyle,J=t.popupPlacement,Y=t.builtinPlacements,$=void 0===Y?{}:Y,ee=t.popupAlign,te=t.zIndex,ne=t.stretch,re=t.getPopupClassNameFromAlign,oe=t.fresh,ie=t.alignPoint,ae=t.onPopupClick,se=t.onPopupAlign,ue=t.arrow,ce=t.popupMotion,le=t.maskMotion,fe=t.popupTransitionName,pe=t.popupAnimation,he=t.maskTransitionName,de=t.maskAnimation,me=t.className,ge=t.getTriggerDOMNode,ve=(0,i.Z)(t,H),ye=q||G||!1,be=g.useState(!1),we=(0,o.Z)(be,2),xe=we[0],Ae=we[1];(0,d.Z)((function(){Ae((0,m.Z)())}),[]);var Ee=g.useRef({}),Ce=g.useContext(k),ke=g.useMemo((function(){return{registerSubPopup:function(e,t){Ee.current[e]=t,null==Ce||Ce.registerSubPopup(e,t)}}}),[Ce]),Ie=(0,h.Z)(),Se=g.useState(null),je=(0,o.Z)(Se,2),Te=je[0],Re=je[1],Oe=g.useRef(null),De=(0,p.Z)((function(e){Oe.current=e,(0,l.Sh)(e)&&Te!==e&&Re(e),null==Ce||Ce.registerSubPopup(Ie,e)})),Be=g.useState(null),_e=(0,o.Z)(Be,2),Ne=_e[0],Pe=_e[1],Me=g.useRef(null),Fe=(0,p.Z)((function(e){(0,l.Sh)(e)&&Ne!==e&&(Pe(e),Me.current=e)})),Le=g.Children.only(v),Ue=(null==Le?void 0:Le.props)||{},We={},ze=(0,p.Z)((function(e){var t,n,r=Ne;return(null==r?void 0:r.contains(e))||(null===(t=(0,f.A)(r))||void 0===t?void 0:t.host)===e||e===r||(null==Te?void 0:Te.contains(e))||(null===(n=(0,f.A)(Te))||void 0===n?void 0:n.host)===e||e===Te||Object.values(Ee.current).some((function(t){return(null==t?void 0:t.contains(e))||e===t}))})),qe=O(s,ce,pe,fe),Qe=O(s,le,de,he),Ve=g.useState(I||!1),He=(0,o.Z)(Ve,2),Ge=He[0],Xe=He[1],Ze=null!=A?A:Ge,Ke=(0,p.Z)((function(e){void 0===A&&Xe(e)}));(0,d.Z)((function(){Xe(A||!1)}),[A]);var Je=g.useRef(Ze);Je.current=Ze;var Ye=g.useRef([]);Ye.current=[];var $e=(0,p.Z)((function(e){var t;Ke(e),(null!==(t=Ye.current[Ye.current.length-1])&&void 0!==t?t:Ze)!==e&&(Ye.current.push(e),null==j||j(e))})),et=g.useRef(),tt=function(){clearTimeout(et.current)},nt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;tt(),0===t?$e(e):et.current=setTimeout((function(){$e(e)}),1e3*t)};g.useEffect((function(){return tt}),[]);var rt=g.useState(!1),ot=(0,o.Z)(rt,2),it=ot[0],at=ot[1];(0,d.Z)((function(e){e&&!Ze||at(!0)}),[Ze]);var st=g.useState(null),ut=(0,o.Z)(st,2),ct=ut[0],lt=ut[1],ft=g.useState(null),pt=(0,o.Z)(ft,2),ht=pt[0],dt=pt[1],mt=function(e){dt([e.clientX,e.clientY])},gt=z(Ze,Te,ie&&null!==ht?ht:Ne,J,$,ee,se),vt=(0,o.Z)(gt,11),yt=vt[0],bt=vt[1],wt=vt[2],xt=vt[3],At=vt[4],Et=vt[5],Ct=vt[6],kt=vt[7],It=vt[8],St=vt[9],jt=vt[10],Tt=S(xe,b,w,x),Rt=(0,o.Z)(Tt,2),Ot=Rt[0],Dt=Rt[1],Bt=Ot.has("click"),_t=Dt.has("click")||Dt.has("contextMenu"),Nt=(0,p.Z)((function(){it||jt()}));Q(Ze,Ne,Te,Nt,(function(){Je.current&&ie&&_t&&nt(!1)})),(0,d.Z)((function(){Nt()}),[ht,J]),(0,d.Z)((function(){!Ze||null!=$&&$[J]||Nt()}),[JSON.stringify(ee)]);var Pt=g.useMemo((function(){var e=R($,s,St,ie);return u()(e,null==re?void 0:re(St))}),[St,re,$,s,ie]);g.useImperativeHandle(n,(function(){return{nativeElement:Me.current,popupElement:Oe.current,forceAlign:Nt}}));var Mt=g.useState(0),Ft=(0,o.Z)(Mt,2),Lt=Ft[0],Ut=Ft[1],Wt=g.useState(0),zt=(0,o.Z)(Wt,2),qt=zt[0],Qt=zt[1],Vt=function(){if(ne&&Ne){var e=Ne.getBoundingClientRect();Ut(e.width),Qt(e.height)}};function Ht(e,t,n,r){We[e]=function(o){var i;null==r||r(o),nt(t,n);for(var a=arguments.length,s=new Array(a>1?a-1:0),u=1;u<a;u++)s[u-1]=arguments[u];null===(i=Ue[e])||void 0===i||i.call.apply(i,[Ue,o].concat(s))}}(0,d.Z)((function(){ct&&(jt(),ct(),lt(null))}),[ct]),(Bt||_t)&&(We.onClick=function(e){var t;Je.current&&_t?nt(!1):!Je.current&&Bt&&(mt(e),nt(!0));for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];null===(t=Ue.onClick)||void 0===t||t.call.apply(t,[Ue,e].concat(r))});var Gt,Xt,Zt=V(Ze,_t,Ne,Te,M,L,ze,nt),Kt=Ot.has("hover"),Jt=Dt.has("hover");Kt&&(Ht("onMouseEnter",!0,D,(function(e){mt(e)})),Ht("onPointerEnter",!0,D,(function(e){mt(e)})),Gt=function(e){(Ze||it)&&null!=Te&&Te.contains(e.target)&&nt(!0,D)},ie&&(We.onMouseMove=function(e){var t;null===(t=Ue.onMouseMove)||void 0===t||t.call(Ue,e)})),Jt&&(Ht("onMouseLeave",!1,_),Ht("onPointerLeave",!1,_),Xt=function(){nt(!1,_)}),Ot.has("focus")&&Ht("onFocus",!0,N),Dt.has("focus")&&Ht("onBlur",!1,P),Ot.has("contextMenu")&&(We.onContextMenu=function(e){var t;Je.current&&Dt.has("contextMenu")?nt(!1):(mt(e),nt(!0)),e.preventDefault();for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];null===(t=Ue.onContextMenu)||void 0===t||t.call.apply(t,[Ue,e].concat(r))}),me&&(We.className=u()(Ue.className,me));var Yt=g.useRef(!1);Yt.current||(Yt.current=W||Ze||it);var $t=(0,r.Z)((0,r.Z)({},Ue),We),en={};["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"].forEach((function(e){ve[e]&&(en[e]=function(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];null===(t=$t[e])||void 0===t||t.call.apply(t,[$t].concat(r)),ve[e].apply(ve,r)})}));var tn=g.cloneElement(Le,(0,r.Z)((0,r.Z)({},$t),en)),nn={x:Et,y:Ct},rn=ue?(0,r.Z)({},!0!==ue?ue:{}):null;return g.createElement(g.Fragment,null,g.createElement(c.Z,{disabled:!Ze,ref:Fe,onResize:function(){Vt(),Nt()}},g.createElement(C,{getTriggerDOMNode:ge},tn)),Yt.current&&g.createElement(k.Provider,{value:ke},g.createElement(E,{portal:e,ref:De,prefixCls:s,popup:X,className:u()(Z,Pt),style:K,target:Ne,onMouseEnter:Gt,onMouseLeave:Xt,onPointerEnter:Gt,zIndex:te,open:Ze,keepDom:it,fresh:oe,onClick:ae,onPointerDownCapture:Zt,mask:M,motion:qe,maskMotion:Qe,onVisibleChanged:function(e){at(!1),jt(),null==T||T(e)},onPrepare:function(){return new Promise((function(e){Vt(),lt((function(){return e}))}))},forceRender:W,autoDestroy:ye,getPopupContainer:U,align:St,arrow:rn,arrowPos:nn,ready:yt,offsetX:bt,offsetY:wt,offsetR:xt,offsetB:At,onAlign:Nt,stretch:ne,targetWidth:Lt/kt,targetHeight:qt/It})))}));return t}(a.Z)},4146:function(e,t,n){"use strict";n.d(t,{cT:function(){return T},pe:function(){return j}});var r=n(37205),o=n.n(r),i=n(79800),a=n.n(i),s=n(39647),u=n.n(s),c=n(82242),l=n.n(c),f=n(7557),p=n.n(f),h=n(41498),d=n.n(h),m=n(59301),g=n(14566),v=n(6767),y=n(43170),b=n(28209),w=n.n(b),x=n(1012),A=n(56565),E=n(47257),C=n.n(E),k=n(37712),I=["user","cancelUpload"],S=g.Z.Dragger,j=function(e){var t=w().enc.Utf8.parse("bf3c199c2470cb477d907b1e0917c17b"),n=w().enc.Utf8.parse("5183666c72eec9e4"),r=w().AES.decrypt(e,t,{iv:n,mode:w().mode.CBC});return r.toString(w().enc.Utf8)},T=function(){var e=d()(p()().mark((function e(t,n,r){var o,i,a,s,u,c,f,h,d,m;return p()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.file_name=t.name,e.next=3,(0,y.ZP)("/api/buckets/get_upload_token.json",{method:"get"});case 3:return f=e.sent,console.log("decrypt(res.data):",j(f.data)),f.data=JSON.parse(j(f.data)),(h=t.name.split(".")).pop(),d=n.realFileName?h.join(""):(0,x.Z)(),m=new(C())({endpoint:null==f||null===(o=f.data)||void 0===o?void 0:o.end_point,region:null==f||null===(i=f.data)||void 0===i?void 0:i.region,accessKeyId:null==f||null===(a=f.data)||void 0===a?void 0:a.access_key_id,accessKeySecret:null==f||null===(s=f.data)||void 0===s?void 0:s.access_key_secret,bucket:null==f||null===(u=f.data)||void 0===u?void 0:u.bucket,stsToken:null==f||null===(c=f.data)||void 0===c?void 0:c.security_token}),e.abrupt("return",new Promise((function(e,o){var i;m.multipartUpload("".concat(d),new Blob([t],{type:t.type}),l()(l()({timeout:2e5,partSize:102400},r),{},{callback:{url:null==f||null===(i=f.data)||void 0===i?void 0:i.callback_url,host:null==f?void 0:f.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,y.rz)(n)}})).then((function(n){var r;t.response=null===(r=n.data)||void 0===r?void 0:r.data,e(null==n?void 0:n.data)})).catch((function(e){o(e),console.log("err:",e)}))})));case 11:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}();t.ZP=(0,A.connect)((function(e){var t=e.loading,n=e.globalSetting,r=e.user;return{globalSetting:n,loading:t.models.competitions,user:r}}))((function(e){var t,n=e.user,r=e.cancelUpload,i=u()(e,I),s=(0,m.useState)([]),c=a()(s,2),f=c[0],h=c[1],g=(0,m.useState)(),b=a()(g,2),w=b[0],A=b[1],E={onRemove:function(e){h(o()(f.filter((function(t){return t.name!==e.name})))),i.onChange(f.filter((function(t){return t.name!==e.name})))},disabled:i.disabled,multiple:!0,fileList:null==f?void 0:f.map((function(e){return e.file})),customRequest:function(){},beforeUpload:(t=d()(p()().mark((function e(t){var n;return p()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=i.maxSize||1073741824,!f.filter((function(e){return e.name===t.name})).length){e.next=4;break}return v.ZP.info("".concat(t.name,"已存在,请重新选择")),e.abrupt("return");case 4:if(!((null==t?void 0:t.size)>n)){e.next=7;break}return v.ZP.info("文件超过".concat(n/1024/1024/1024,"GB不符合上传要求")),e.abrupt("return",!1);case 7:return f.push({name:t.name,file:t}),h(o()(f)),i.onChange(f),e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},T=function(){var e=d()(p()().mark((function e(t,n){var r,a,s,u,c,l,d,m,g,b;return p()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.file_name=t.name,d=t.name,e.next=4,(0,y.ZP)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if((m=e.sent).data=JSON.parse(j(m.data)),0===(null==m?void 0:m.status)){e.next=12;break}return f[f.findIndex((function(e){return e.name===d}))].status="error",f[f.findIndex((function(e){return e.name===d}))].file.status="error",i.onChange(f),v.ZP.warning("上传失败,请重新尝试"),e.abrupt("return");case 12:return w=new(C())({endpoint:null==m||null===(r=m.data)||void 0===r?void 0:r.end_point,region:null==m||null===(a=m.data)||void 0===a?void 0:a.region,accessKeyId:null==m||null===(s=m.data)||void 0===s?void 0:s.access_key_id,accessKeySecret:null==m||null===(u=m.data)||void 0===u?void 0:u.access_key_secret,bucket:null==m||null===(c=m.data)||void 0===c?void 0:c.bucket,stsToken:null==m||null===(l=m.data)||void 0===l?void 0:l.security_token}),console.log(t,"file"),A(w),(g=t.name.split(".")).pop(),b=d.indexOf(".")>-1?n.realFileName?g.join("."):(0,x.Z)():d,e.abrupt("return",new Promise((function(e,r){try{var a;w.multipartUpload("".concat(i.identifier,"/").concat(b).concat(d.indexOf(".")>-1?"."+d.split(".").pop():""),new Blob([t.file],{type:t.file.type}),{timeout:36e5,partSize:1002400,progress:function(e,t,n){try{console.log("进度",e,t,n);var r=f.findIndex((function(e){return e.name===d}));f[r].file.percent=100*e,f[r].tempCheckpoint=t,h(o()(f))}catch(e){}},checkpoint:f[f.findIndex((function(e){return e.name===d}))].tempCheckpoint,callback:{customValue:{id:d+""},url:null==m||null===(a=m.data)||void 0===a?void 0:a.callback_url,host:null==m?void 0:m.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,y.rz)(n)}}).then((function(n){var r,o=f.findIndex((function(e){return e.name===d})),a="done";if(0===(null===(r=n.data)||void 0===r?void 0:r.status)){var s;t.response=null===(s=n.data)||void 0===s?void 0:s.data;var u=f.findIndex((function(e){return e.name===d}));f[u].status="done",f[u].file.status="done"}else{var c;v.ZP.warning(null===(c=n.data)||void 0===c?void 0:c.message),a="error"}f[o].status=a,f[o].file.status=a,i.onChange(f),e(null==n?void 0:n.data)})).catch((function(e){f[f.findIndex((function(e){return e.name===d}))].status="error",f[f.findIndex((function(e){return e.name===d}))].file.status="error",v.ZP.warning("上传失败,请重新尝试"),h(o()(f)),i.onChange(f),r(e),console.log("err:",e)}))}catch(e){}})));case 19:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return(0,m.useEffect)((function(){f.every((function(e){return"done"===e||"error"===e}))&&i.onComplete(f)}),[f]),(0,m.useEffect)((function(){var e;r&&(null===(e=w)||void 0===e||e.cancel())}),[r]),(0,m.useEffect)((function(){i.uploading&&f.map(function(){var e=d()(p()().mark((function e(t){var o;return p()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.status&&"error"!==t.status||r){e.next=6;break}return t.status="uploading",t.file.status="uploading",e.next=5,T(t,{login:null==n||null===(o=n.userInfo)||void 0===o?void 0:o.login,container_type:i.container_type,container_id:i.container_id,description:i.description,realFileName:i.realFileName});case 5:e.sent;case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}),[i.uploading]),(0,k.jsx)(S,l()(l()({},E),{},{height:i.height,className:i.className,children:(0,k.jsx)("p",{className:"ant-upload-hint",children:i.text||"拖拽文件或者点击上传"})}))}))},93475:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return jg}});var r=n(7557),o=n.n(r),i=n(82242),a=n.n(i),s=n(41498),u=n.n(s),c=n(79800),l=n.n(c),f=n(39647),p=n.n(f),h=n(59301),d=n(56565),m=n(11938),g=n(10846),v=n(6767),y=n(99571),b=n(77019),w=n(5269),x=n(62957),A="steps___mrlSw",E="qrcode___xRSbG",C=n(89728),k=n(31005),I=n(15845),S=n.n(I),j=n(97671),T=n(19208).lW,R=function(e,t){return(R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function O(e,t){function n(){this.constructor=e}R(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function D(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new n((function(t){t(e.value)})).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function B(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var _=function(){function e(e){this.global=e,this.flags={},this.flagRegistry={},this.urlFlags={},this.populateURLFlags()}return e.prototype.setPlatform=function(e,t){null!=this.platform&&console.warn("Platform "+this.platformName+" has already been set. Overwriting the platform with "+t+"."),this.platformName=e,this.platform=t},e.prototype.registerFlag=function(e,t,n){if(this.flagRegistry[e]={evaluationFn:t,setHook:n},null!=this.urlFlags[e]){var r=this.urlFlags[e];console.warn("Setting feature override from URL "+e+": "+r+"."),this.set(e,r)}},e.prototype.get=function(e){return e in this.flags||(this.flags[e]=this.evaluateFlag(e)),this.flags[e]},e.prototype.getNumber=function(e){return this.get(e)},e.prototype.getBool=function(e){return this.get(e)},e.prototype.getFlags=function(){return this.flags},Object.defineProperty(e.prototype,"features",{get:function(){return this.flags},enumerable:!0,configurable:!0}),e.prototype.set=function(e,t){if(null==this.flagRegistry[e])throw new Error("Cannot set flag "+e+" as it has not been registered.");this.flags[e]=t,null!=this.flagRegistry[e].setHook&&this.flagRegistry[e].setHook(t)},e.prototype.evaluateFlag=function(e){if(null==this.flagRegistry[e])throw new Error("Cannot evaluate flag '"+e+"': no evaluation function found.");return this.flagRegistry[e].evaluationFn()},e.prototype.setFlags=function(e){this.flags=Object.assign({},e)},e.prototype.reset=function(){this.flags={},this.urlFlags={},this.populateURLFlags()},e.prototype.populateURLFlags=function(){var e=this;if(void 0!==this.global&&void 0!==this.global.location&&void 0!==this.global.location.search){var t,n,r=(t=this.global.location.search,n={},t.replace(/[?&]([^=?&]+)(?:=([^&]*))?/g,(function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return N(n,t[0],t[1]),t.join("=")})),n);"tfjsflags"in r&&r.tfjsflags.split(",").forEach((function(t){var n=t.split(":"),r=n[0],o=n[1];e.urlFlags[r]=function(e,t){if("true"===(t=t.toLowerCase())||"false"===t)return"true"===t;if(""+ +t===t)return+t;throw new Error("Could not parse value flag value "+t+" for flag "+e+".")}(r,o)}))}},e}();function N(e,t,n){e[decodeURIComponent(t)]=decodeURIComponent(n||"")}function P(){return M}var M=null,F=new Map,L=new Map;function U(e,t){var n=Q(e,t);return F.get(n)}function W(e){for(var t=F.entries(),n=[];;){var r=t.next(),o=r.done,i=r.value;if(o)break;var a=i[0],s=i[1];a.split("_")[0]===e&&n.push(s)}return n}function z(e){var t=e.kernelName,n=e.backendName,r=Q(t,n);if(F.has(r))throw new Error("The kernel '"+t+"' for backend '"+n+"' is already registered");F.set(r,e)}function q(e){var t=e.kernelName;L.has(t)&&console.warn("Overriding the gradient for '"+t+"'"),L.set(t,e)}function Q(e,t){return t+"_"+e}function V(e){for(var t=e.length,n=0,r=0;t>0;)r=Math.random()*t|0,n=e[--t],e[t]=e[r],e[r]=n}function H(e,t,n){return Math.max(e,Math.min(t,n))}function G(e){return e%2==0?e:e+1}function X(e){for(var t=0,n=0;n<e.length;n++)t+=e[n];return t}function Z(e,t){if(!e)throw new Error("string"==typeof t?t:t())}function K(e,t,n){void 0===n&&(n=""),Z(ee(e,t),(function(){return n+" Shapes "+e+" and "+t+" must match"}))}function J(e){Z(null!=e,(function(){return"The input to the tensor constructor must be a non-null value."}))}function Y(e,t,n){if(void 0===t&&(t=[]),void 0===n&&(n=!1),null==t&&(t=[]),Array.isArray(e)||de(e)&&!n)for(var r=0;r<e.length;++r)Y(e[r],t,n);else t.push(e);return t}function $(e){if(0===e.length)return 1;for(var t=e[0],n=1;n<e.length;n++)t*=e[n];return t}function ee(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function te(e){return e%1==0}function ne(e){if(null!=Math.tanh)return Math.tanh(e);if(e===1/0)return 1;if(e===-1/0)return-1;var t=Math.exp(2*e);return(t-1)/(t+1)}function re(e){var t=Math.ceil(Math.sqrt(e));return[t,Math.ceil(e/t)]}function oe(e,t){return t<=e.length?e:e+" ".repeat(t-e.length)}function ie(e,t,n){return void 0===t&&(t=function(e){return 0}),new Promise((function(r,o){var i=0,a=function(){if(e())r();else{i++;var s=t(i);null!=n&&i>=n?o():setTimeout(a,s)}};a()}))}function ae(e,t){for(var n=1,r=-1,o=0;o<e.length;++o)if(e[o]>=0)n*=e[o];else if(-1===e[o]){if(-1!==r)throw Error("Shapes can only have 1 implicit size. Found -1 at dim "+r+" and dim "+o);r=o}else if(e[o]<0)throw Error("Shapes can not be < 0. Found "+e[o]+" at dim "+o);if(-1===r){if(t>0&&t!==n)throw Error("Size("+t+") must match the product of shape "+e);return e}if(0===n)throw Error("Cannot infer the missing size in ["+e+"] when there are 0 elements");if(t%n!=0)throw Error("The implicit shape can't be a fractional number. Got "+t+" / "+n);var i=e.slice();return i[r]=t/n,i}function se(e,t){var n=t.length;return Z((e=null==e?t.map((function(e,t){return t})):[].concat(e)).every((function(e){return e>=-n&&e<n})),(function(){return"All values in axis param must be in range [-"+n+", "+n+") but got axis "+e})),Z(e.every((function(e){return te(e)})),(function(){return"All values in axis param must be integers but got axis "+e})),e.map((function(e){return e<0?n+e:e}))}function ue(e,t){for(var n=[],r=[],o=null!=t&&Array.isArray(t)&&0===t.length,i=null==t||o?null:se(t,e).sort(),a=0,s=0;s<e.length;++s){if(null!=i){if(i[a]===s&&1!==e[s])throw new Error("Can't squeeze axis "+s+" since its dim '"+e[s]+"' is not 1");(null==i[a]||i[a]>s)&&1===e[s]&&(n.push(e[s]),r.push(s)),i[a]<=s&&a++}1!==e[s]&&(n.push(e[s]),r.push(s))}return{newShape:n,keptDims:r}}function ce(e,t){var n=null;if(null==e||"float32"===e)n=new Float32Array(t);else if("int32"===e)n=new Int32Array(t);else{if("bool"!==e)throw new Error("Unknown data type "+e);n=new Uint8Array(t)}return n}function le(e,t){var n=null;if(null==e||"float32"===e)n=new Float32Array(t);else if("int32"===e)n=new Int32Array(t);else if("bool"===e)n=new Uint8Array(t);else{if("string"!==e)throw new Error("Unknown data type "+e);n=new Array(t)}return n}function fe(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(isNaN(r)||!isFinite(r))throw Error("A tensor of type "+t+" being uploaded contains "+r+".")}}function pe(e){return"bool"===e||"complex64"===e||"float32"===e||"int32"===e||"string"===e}function he(e,t){return!("complex64"===t||"float32"===t&&"complex64"!==e||"int32"===t&&"float32"!==e&&"complex64"!==e||"bool"===t&&"bool"===e)}function de(e){return e instanceof Float32Array||e instanceof Int32Array||e instanceof Uint8Array}function me(e){if("float32"===e||"int32"===e)return 4;if("complex64"===e)return 8;if("bool"===e)return 1;throw new Error("Unknown dtype "+e)}function ge(e){if(null==e)return 0;var t=0;return e.forEach((function(e){return t+=e.length})),t}function ve(e){return"string"==typeof e||e instanceof String}function ye(e){return"boolean"==typeof e}function be(e){return"number"==typeof e}function we(e){return Array.isArray(e)?we(e[0]):e instanceof Float32Array?"float32":e instanceof Int32Array||e instanceof Uint8Array?"int32":be(e)?"float32":ve(e)?"string":ye(e)?"bool":"float32"}function xe(e){return!!(e&&e.constructor&&e.call&&e.apply)}function Ae(e,t){for(var n=t;n<e;++n)if(e%n==0)return n;return e}function Ee(e){var t=e.length;if(t<2)return[];var n=new Array(t-1);n[t-2]=e[t-1];for(var r=t-3;r>=0;--r)n[r]=n[r+1]*e[r+1];return n}function Ce(e,t,n){if("string"===t)throw new Error("Cannot convert a string[] to a TypedArray");if(Array.isArray(e)&&(e=Y(e)),n&&fe(e,t),function(e,t){return e instanceof Float32Array&&"float32"===t||e instanceof Int32Array&&"int32"===t||e instanceof Uint8Array&&"bool"===t}(e,t))return e;if(null==t||"float32"===t||"complex64"===t)return new Float32Array(e);if("int32"===t)return new Int32Array(e);if("bool"===t){for(var r=new Uint8Array(e.length),o=0;o<r.length;++o)0!==Math.round(e[o])&&(r[o]=1);return r}throw new Error("Unknown data type "+t)}function ke(e,t){if(0===e.length)return t[0];var n=e.reduce((function(e,t){return e*t}));if(0===n)return[];if(n!==t.length)throw new Error("["+e+"] does not match the input size.");return function e(t,n,r){var o=new Array;if(1===n.length)for(var i=n[0],a=0;a<i;a++)o[a]=r[t+a];else{i=n[0];var s=n.slice(1),u=s.reduce((function(e,t){return e*t}));for(a=0;a<i;a++)o[a]=e(t+a*u,s,r)}return o}(0,e,t)}function Ie(e,t){for(var n=Se(e,t),r=0;r<n.length;r++)n[r]=1;return n}function Se(e,t){if(null==t||"float32"===t||"complex64"===t)return new Float32Array(e);if("int32"===t)return new Int32Array(e);if("bool"===t)return new Uint8Array(e);throw new Error("Unknown data type "+t)}function je(){return P().platform.now()}function Te(e){e.forEach((function(t){Z(Number.isInteger(t)&&t>=0,(function(){return"Tensor must have a shape comprised of positive integers but got shape ["+e+"]."}))}))}function Re(e,t){return void 0===t&&(t="utf-8"),t=t||"utf-8",P().platform.encode(e,t)}function Oe(e,t){return void 0===t&&(t="utf-8"),t=t||"utf-8",P().platform.decode(e,t)}function De(e,t,n){if(0===t)return 0;if(1===t)return e[0];for(var r=e[e.length-1],o=0;o<e.length-1;++o)r+=n[o]*e[o];return r}function Be(e,t,n){if(0===t)return[];if(1===t)return[e];for(var r=new Array(t),o=0;o<r.length-1;++o)r[o]=Math.floor(e/n[o]),e-=r[o]*n[o];return r[r.length-1]=e,r}Object.freeze({shuffle:V,clamp:H,nearestLargerEven:G,sum:X,randUniform:function(e,t){var n=Math.random();return t*n+(1-n)*e},distSquared:function(e,t){for(var n=0,r=0;r<e.length;r++){var o=Number(e[r])-Number(t[r]);n+=o*o}return n},assert:Z,assertShapesMatch:K,assertNonNull:J,flatten:Y,sizeFromShape:$,isScalarShape:function(e){return 0===e.length},arraysEqual:ee,isInt:te,tanh:ne,sizeToSquarishShape:re,createShuffledIndices:function(e){for(var t=new Uint32Array(e),n=0;n<e;++n)t[n]=n;return V(t),t},rightPad:oe,repeatedTry:ie,inferFromImplicitShape:ae,parseAxisParam:se,squeezeShape:ue,getTypedArrayFromDType:ce,getArrayFromDType:le,checkConversionForErrors:fe,isValidDtype:pe,hasEncodingLoss:he,isTypedArray:de,bytesPerElement:me,bytesFromStringArray:ge,isString:ve,isBoolean:ye,isNumber:be,inferDtype:we,isFunction:xe,nearestDivisor:Ae,computeStrides:Ee,toTypedArray:Ce,toNestedArray:ke,makeOnesTypedArray:Ie,makeZerosTypedArray:Se,now:je,assertNonNegativeIntegerDimensions:Te,fetch:function(e,t){return P().platform.fetch(e,t)},encodeString:Re,decodeString:Oe,locToIndex:De,indexToLoc:Be});var _e=function(){function e(e,t){this.backendTimer=e,this.logger=t,null==t&&(this.logger=new Ne)}return e.prototype.profileKernel=function(e,t,n){var r,o=this,i=this.backendTimer.time((function(){r=n()}));return r.forEach((function(n){n.data().then((function(r){!function(e,t,n){if("float32"!==t)return!1;for(var r=0;r<e.length;r++){var o=e[r];if(isNaN(o)||!isFinite(o))return console.warn("Found "+o+" in the result of '"+n+"'"),!0}}(r,n.dtype,e),i.then((function(i){var a="";null!=i.getExtraProfileInfo&&(a=i.getExtraProfileInfo()),o.logger.logKernelProfile(e,n,r,i.kernelMs,t,a)}))}))})),r},e}(),Ne=function(){function e(){}return e.prototype.logKernelProfile=function(e,t,n,r,o,i){var a="number"==typeof r?oe(r+"ms",9):r.error,s=oe(e,25),u=t.rank,c=t.size,l=oe(t.shape.toString(),14),f="";for(var p in o){var h=o[p].shape||t.shape,d=h.length;f+=p+": "+d+"D "+(d>0?h:"")+" "}console.log("%c"+s+"\t%c"+a+"\t%c"+u+"D "+l+"\t%c"+c+"\t%c"+f+"\t%c"+i,"font-weight:bold","color:red","color:blue","color: orange","color: green","color: steelblue")},e}();function Pe(e,t,n){return oe(Array.isArray(e)?parseFloat(e[0].toFixed(7))+" + "+parseFloat(e[1].toFixed(7))+"j":ve(e)?"'"+e+"'":"bool"===n?Me(e):parseFloat(e.toFixed(7)).toString(),t)}function Me(e){return 0===e?"false":"true"}function Fe(e){for(var t=[],n=0;n<e.length;n+=2)t.push([e[n],e[n+1]]);return t}var Le=function(){function e(e,t,n){var r=this;if(this.dtype=t,this.shape=e.slice(),this.size=$(e),null!=n){var o=n.length;Z(o===this.size,(function(){return"Length of values '"+o+"' does not match the size inferred by the shape '"+r.size+"'."}))}if("complex64"===t)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=n||le(t,this.size),this.strides=Ee(e)}return e.prototype.set=function(e){for(var t=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];0===n.length&&(n=[0]),Z(n.length===this.rank,(function(){return"The number of provided coordinates ("+n.length+") must match the rank ("+t.rank+")"}));var o=this.locToIndex(n);this.values[o]=e},e.prototype.get=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];0===e.length&&(e=[0]);for(var n=0,r=0,o=e;r<o.length;r++){var i=o[r];if(i<0||i>=this.shape[n]){var a="Requested out of range element at "+e+". Buffer shape="+this.shape;throw new Error(a)}n++}for(var s=e[e.length-1],u=0;u<e.length-1;++u)s+=this.strides[u]*e[u];return this.values[s]},e.prototype.locToIndex=function(e){if(0===this.rank)return 0;if(1===this.rank)return e[0];for(var t=e[e.length-1],n=0;n<e.length-1;++n)t+=this.strides[n]*e[n];return t},e.prototype.indexToLoc=function(e){if(0===this.rank)return[];if(1===this.rank)return[e];for(var t=new Array(this.shape.length),n=0;n<t.length-1;++n)t[n]=Math.floor(e/this.strides[n]),e-=t[n]*this.strides[n];return t[t.length-1]=e,t},Object.defineProperty(e.prototype,"rank",{get:function(){return this.shape.length},enumerable:!0,configurable:!0}),e.prototype.toTensor=function(){return Ue().makeTensor(this.values,this.shape,this.dtype)},e}(),Ue=null,We=null,ze=null,qe=function(){function e(e,t,n,r){this.kept=!1,this.isDisposedInternal=!1,this.shape=e.slice(),this.dtype=t||"float32",this.size=$(e),this.strides=Ee(e),this.dataId=n,this.id=r,this.rankType=this.rank<5?this.rank.toString():"higher"}return e.prototype.flatten=function(){return this.throwIfDisposed(),this.as1D()},e.prototype.asScalar=function(){return this.throwIfDisposed(),Z(1===this.size,(function(){return"The array must have only 1 element."})),this.reshape([])},e.prototype.as1D=function(){return this.throwIfDisposed(),this.reshape([this.size])},e.prototype.as2D=function(e,t){return this.throwIfDisposed(),this.reshape([e,t])},e.prototype.as3D=function(e,t,n){return this.throwIfDisposed(),this.reshape([e,t,n])},e.prototype.as4D=function(e,t,n,r){return this.throwIfDisposed(),this.reshape([e,t,n,r])},e.prototype.as5D=function(e,t,n,r,o){return this.throwIfDisposed(),this.reshape([e,t,n,r,o])},e.prototype.asType=function(e){return this.throwIfDisposed(),We.cast(this,e)},Object.defineProperty(e.prototype,"rank",{get:function(){return this.shape.length},enumerable:!0,configurable:!0}),e.prototype.buffer=function(){return D(this,void 0,void 0,(function(){var e;return B(this,(function(t){switch(t.label){case 0:return[4,this.data()];case 1:return e=t.sent(),[2,We.buffer(this.shape,this.dtype,e)]}}))}))},e.prototype.bufferSync=function(){return We.buffer(this.shape,this.dtype,this.dataSync())},e.prototype.array=function(){return D(this,void 0,void 0,(function(){var e;return B(this,(function(t){switch(t.label){case 0:return[4,this.data()];case 1:return e=t.sent(),[2,ke(this.shape,e)]}}))}))},e.prototype.arraySync=function(){return ke(this.shape,this.dataSync())},e.prototype.data=function(){return D(this,void 0,void 0,(function(){var e,t;return B(this,(function(n){switch(n.label){case 0:return this.throwIfDisposed(),e=Ue().read(this.dataId),"string"!==this.dtype?[3,2]:[4,e];case 1:t=n.sent();try{return[2,t.map((function(e){return Oe(e)}))]}catch(e){throw new Error("Failed to decode the string bytes into utf-8. To get the original bytes, call tensor.bytes().")}n.label=2;case 2:return[2,e]}}))}))},e.prototype.dataSync=function(){this.throwIfDisposed();var e=Ue().readSync(this.dataId);if("string"===this.dtype)try{return e.map((function(e){return Oe(e)}))}catch(e){throw new Error("Failed to decode the string bytes into utf-8. To get the original bytes, call tensor.bytes().")}return e},e.prototype.bytes=function(){return D(this,void 0,void 0,(function(){var e;return B(this,(function(t){switch(t.label){case 0:return this.throwIfDisposed(),[4,Ue().read(this.dataId)];case 1:return e=t.sent(),"string"===this.dtype?[2,e]:[2,new Uint8Array(e.buffer)]}}))}))},e.prototype.dispose=function(){this.isDisposed||(Ue().disposeTensor(this),this.isDisposedInternal=!0)},Object.defineProperty(e.prototype,"isDisposed",{get:function(){return this.isDisposedInternal},enumerable:!0,configurable:!0}),e.prototype.throwIfDisposed=function(){if(this.isDisposed)throw new Error("Tensor is disposed.")},e.prototype.toFloat=function(){return this.asType("float32")},e.prototype.toInt=function(){return this.asType("int32")},e.prototype.toBool=function(){return this.asType("bool")},e.prototype.print=function(e){return void 0===e&&(e=!1),We.print(this,e)},e.prototype.reshape=function(e){return this.throwIfDisposed(),We.reshape(this,e)},e.prototype.reshapeAs=function(e){return this.throwIfDisposed(),this.reshape(e.shape)},e.prototype.expandDims=function(e){return void 0===e&&(e=0),We.expandDims(this,e)},e.prototype.cumsum=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=!1),void 0===n&&(n=!1),We.cumsum(this,e,t,n)},e.prototype.squeeze=function(e){return this.throwIfDisposed(),We.squeeze(this,e)},e.prototype.clone=function(){return this.throwIfDisposed(),We.clone(this)},e.prototype.oneHot=function(e,t,n){return this.throwIfDisposed(),We.oneHot(this,e,t,n)},e.prototype.toString=function(e){return void 0===e&&(e=!1),function(e,t,n,r){var o=Ee(t),i=function(e,t,n,r){var o=$(t),i=r[r.length-1],a=new Array(i).fill(0),s=t.length,u="complex64"===n?Fe(e):e;if(s>1)for(var c=0;c<o/i;c++)for(var l=c*i,f=0;f<i;f++)a[f]=Math.max(a[f],Pe(u[l+f],0,n).length);return a}(e,t,n,o),a=t.length,s=function e(t,n,r,o,i,a){void 0===a&&(a=!0);var s="complex64"===r?2:1,u=n[0],c=n.length;if(0===c)return"complex64"===r?[Pe(Fe(t)[0],0,r)]:"bool"===r?[Me(t[0])]:[t[0].toString()];if(1===c){if(u>20){var l=3*s,f=Array.from(t.slice(0,l)),p=Array.from(t.slice((u-3)*s,u*s));return"complex64"===r&&(f=Fe(f),p=Fe(p)),["["+f.map((function(e,t){return Pe(e,i[t],r)})).join(", ")+", ..., "+p.map((function(e,t){return Pe(e,i[u-3+t],r)})).join(", ")+"]"]}return["["+("complex64"===r?Fe(t):Array.from(t)).map((function(e,t){return Pe(e,i[t],r)})).join(", ")+"]"]}var h=n.slice(1),d=o.slice(1),m=o[0]*s,g=[];if(u>20){for(var v=0;v<3;v++){var y=(b=v*m)+m;g.push.apply(g,e(t.slice(b,y),h,r,d,i,!1))}for(g.push("..."),v=u-3;v<u;v++)y=(b=v*m)+m,g.push.apply(g,e(t.slice(b,y),h,r,d,i,v===u-1))}else for(v=0;v<u;v++){var b;y=(b=v*m)+m,g.push.apply(g,e(t.slice(b,y),h,r,d,i,v===u-1))}var w=2===c?",":"";for(g[0]="["+g[0]+w,v=1;v<g.length-1;v++)g[v]=" "+g[v]+w;var x=",\n";for(v=2;v<c;v++)x+="\n";return g[g.length-1]=" "+g[g.length-1]+"]"+(a?"":x),g}(e,t,n,o,i),u=["Tensor"];return r&&(u.push(" dtype: "+n),u.push(" rank: "+a),u.push(" shape: ["+t+"]"),u.push(" values:")),u.push(s.map((function(e){return" "+e})).join("\n")),u.join("\n")}(this.dataSync(),this.shape,this.dtype,e)},e.prototype.tile=function(e){return this.throwIfDisposed(),We.tile(this,e)},e.prototype.gather=function(e,t){return void 0===t&&(t=0),this.throwIfDisposed(),We.gather(this,e,t)},e.prototype.matMul=function(e,t,n){return void 0===t&&(t=!1),void 0===n&&(n=!1),this.throwIfDisposed(),We.matMul(this,e,t,n)},e.prototype.dot=function(e){return this.throwIfDisposed(),We.dot(this,e)},e.prototype.norm=function(e,t,n){return void 0===e&&(e="euclidean"),void 0===t&&(t=null),void 0===n&&(n=!1),this.throwIfDisposed(),We.norm(this,e,t,n)},e.prototype.slice=function(e,t){return this.throwIfDisposed(),We.slice(this,e,t)},e.prototype.reverse=function(e){return this.throwIfDisposed(),We.reverse(this,e)},e.prototype.concat=function(t,n){return void 0===n&&(n=0),this.throwIfDisposed(),t instanceof e&&(t=[t]),We.concat([this].concat(t),n)},e.prototype.split=function(e,t){return void 0===t&&(t=0),this.throwIfDisposed(),We.split(this,e,t)},e.prototype.stack=function(e,t){return void 0===t&&(t=0),We.stack([this,e],t)},e.prototype.unstack=function(e){return void 0===e&&(e=0),We.unstack(this,e)},e.prototype.pad=function(e,t){return void 0===t&&(t=0),We.pad(this,e,t)},e.prototype.batchNormalization=function(e,t,n,r,o){return void 0===n&&(n=.001),ze("tf.batchNormalization() is going away. Use tf.batchNorm() instead, and note the positional argument change of scale, offset, and varianceEpsilon"),this.batchNorm(e,t,o,r,n)},e.prototype.batchNorm=function(e,t,n,r,o){return void 0===o&&(o=.001),this.throwIfDisposed(),We.batchNorm(this,e,t,n,r,o)},e.prototype.all=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!1),this.throwIfDisposed(),We.all(this,e,t)},e.prototype.any=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!1),this.throwIfDisposed(),We.any(this,e,t)},e.prototype.logSumExp=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!1),this.throwIfDisposed(),We.logSumExp(this,e,t)},e.prototype.sum=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!1),this.throwIfDisposed(),We.sum(this,e,t)},e.prototype.prod=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!1),this.throwIfDisposed(),We.prod(this,e,t)},e.prototype.mean=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!1),this.throwIfDisposed(),We.mean(this,e,t)},e.prototype.min=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!1),this.throwIfDisposed(),We.min(this,e,t)},e.prototype.max=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!1),this.throwIfDisposed(),We.max(this,e,t)},e.prototype.argMin=function(e){return void 0===e&&(e=null),this.throwIfDisposed(),We.argMin(this,e)},e.prototype.argMax=function(e){return void 0===e&&(e=null),this.throwIfDisposed(),We.argMax(this,e)},e.prototype.cast=function(e){return this.throwIfDisposed(),We.cast(this,e)},e.prototype.add=function(e){return this.throwIfDisposed(),We.add(this,e)},e.prototype.addStrict=function(e){return this.throwIfDisposed(),We.addStrict(this,e)},e.prototype.atan2=function(e){return this.throwIfDisposed(),We.atan2(this,e)},e.prototype.sub=function(e){return this.throwIfDisposed(),We.sub(this,e)},e.prototype.subStrict=function(e){return this.throwIfDisposed(),We.subStrict(this,e)},e.prototype.pow=function(e){return this.throwIfDisposed(),We.pow(this,e)},e.prototype.powStrict=function(e){return this.throwIfDisposed(),We.powStrict(this,e)},e.prototype.mul=function(e){return this.throwIfDisposed(),We.mul(this,e)},e.prototype.mulStrict=function(e){return this.throwIfDisposed(),We.mulStrict(this,e)},e.prototype.div=function(e){return this.throwIfDisposed(),We.div(this,e)},e.prototype.divNoNan=function(e){return this.throwIfDisposed(),We.divNoNan(this,e)},e.prototype.floorDiv=function(e){return this.throwIfDisposed(),We.floorDiv(this,e)},e.prototype.divStrict=function(e){return this.throwIfDisposed(),We.divStrict(this,e)},e.prototype.minimum=function(e){return this.throwIfDisposed(),We.minimum(this,e)},e.prototype.minimumStrict=function(e){return this.throwIfDisposed(),We.minimumStrict(this,e)},e.prototype.maximum=function(e){return this.throwIfDisposed(),We.maximum(this,e)},e.prototype.maximumStrict=function(e){return this.throwIfDisposed(),We.maximumStrict(this,e)},e.prototype.mod=function(e){return this.throwIfDisposed(),We.mod(this,e)},e.prototype.modStrict=function(e){return this.throwIfDisposed(),We.modStrict(this,e)},e.prototype.squaredDifferenceStrict=function(e){return this.throwIfDisposed(),We.squaredDifferenceStrict(this,e)},e.prototype.transpose=function(e){return this.throwIfDisposed(),We.transpose(this,e)},e.prototype.notEqual=function(e){return this.throwIfDisposed(),We.notEqual(this,e)},e.prototype.notEqualStrict=function(e){return this.throwIfDisposed(),We.notEqualStrict(this,e)},e.prototype.less=function(e){return this.throwIfDisposed(),We.less(this,e)},e.prototype.lessStrict=function(e){return this.throwIfDisposed(),We.lessStrict(this,e)},e.prototype.equal=function(e){return this.throwIfDisposed(),We.equal(this,e)},e.prototype.equalStrict=function(e){return this.throwIfDisposed(),We.equalStrict(this,e)},e.prototype.lessEqual=function(e){return this.throwIfDisposed(),We.lessEqual(this,e)},e.prototype.lessEqualStrict=function(e){return this.throwIfDisposed(),We.lessEqualStrict(this,e)},e.prototype.greater=function(e){return this.throwIfDisposed(),We.greater(this,e)},e.prototype.greaterStrict=function(e){return this.throwIfDisposed(),We.greaterStrict(this,e)},e.prototype.greaterEqual=function(e){return this.throwIfDisposed(),We.greaterEqual(this,e)},e.prototype.greaterEqualStrict=function(e){return this.throwIfDisposed(),We.greaterEqualStrict(this,e)},e.prototype.logicalAnd=function(e){return this.throwIfDisposed(),We.logicalAnd(this,e)},e.prototype.logicalOr=function(e){return this.throwIfDisposed(),We.logicalOr(this,e)},e.prototype.logicalNot=function(){return this.throwIfDisposed(),We.logicalNot(this)},e.prototype.logicalXor=function(e){return this.throwIfDisposed(),We.logicalXor(this,e)},e.prototype.where=function(e,t){return this.throwIfDisposed(),We.where(e,this,t)},e.prototype.neg=function(){return this.throwIfDisposed(),We.neg(this)},e.prototype.ceil=function(){return this.throwIfDisposed(),We.ceil(this)},e.prototype.floor=function(){return this.throwIfDisposed(),We.floor(this)},e.prototype.sign=function(){return this.throwIfDisposed(),We.sign(this)},e.prototype.isNaN=function(){return this.throwIfDisposed(),We.isNaN(this)},e.prototype.isInf=function(){return this.throwIfDisposed(),We.isInf(this)},e.prototype.isFinite=function(){return this.throwIfDisposed(),We.isFinite(this)},e.prototype.exp=function(){return this.throwIfDisposed(),We.exp(this)},e.prototype.expm1=function(){return this.throwIfDisposed(),We.expm1(this)},e.prototype.log=function(){return this.throwIfDisposed(),We.log(this)},e.prototype.log1p=function(){return this.throwIfDisposed(),We.log1p(this)},e.prototype.sqrt=function(){return this.throwIfDisposed(),We.sqrt(this)},e.prototype.rsqrt=function(){return this.throwIfDisposed(),We.rsqrt(this)},e.prototype.square=function(){return this.throwIfDisposed(),We.square(this)},e.prototype.reciprocal=function(){return this.throwIfDisposed(),We.reciprocal(this)},e.prototype.abs=function(){return this.throwIfDisposed(),We.abs(this)},e.prototype.clipByValue=function(e,t){return this.throwIfDisposed(),We.clipByValue(this,e,t)},e.prototype.relu=function(){return this.throwIfDisposed(),We.relu(this)},e.prototype.relu6=function(){return this.throwIfDisposed(),We.relu6(this)},e.prototype.elu=function(){return this.throwIfDisposed(),We.elu(this)},e.prototype.selu=function(){return this.throwIfDisposed(),We.selu(this)},e.prototype.leakyRelu=function(e){return void 0===e&&(e=.2),this.throwIfDisposed(),We.leakyRelu(this,e)},e.prototype.prelu=function(e){return this.throwIfDisposed(),We.prelu(this,e)},e.prototype.sigmoid=function(){return this.throwIfDisposed(),We.sigmoid(this)},e.prototype.logSigmoid=function(){return this.throwIfDisposed(),We.logSigmoid(this)},e.prototype.softplus=function(){return this.throwIfDisposed(),We.softplus(this)},e.prototype.zerosLike=function(){return this.throwIfDisposed(),We.zerosLike(this)},e.prototype.onesLike=function(){return this.throwIfDisposed(),We.onesLike(this)},e.prototype.sin=function(){return this.throwIfDisposed(),We.sin(this)},e.prototype.cos=function(){return this.throwIfDisposed(),We.cos(this)},e.prototype.tan=function(){return this.throwIfDisposed(),We.tan(this)},e.prototype.asin=function(){return this.throwIfDisposed(),We.asin(this)},e.prototype.acos=function(){return this.throwIfDisposed(),We.acos(this)},e.prototype.atan=function(){return this.throwIfDisposed(),We.atan(this)},e.prototype.sinh=function(){return this.throwIfDisposed(),We.sinh(this)},e.prototype.cosh=function(){return this.throwIfDisposed(),We.cosh(this)},e.prototype.tanh=function(){return this.throwIfDisposed(),We.tanh(this)},e.prototype.asinh=function(){return this.throwIfDisposed(),We.asinh(this)},e.prototype.acosh=function(){return this.throwIfDisposed(),We.acosh(this)},e.prototype.atanh=function(){return this.throwIfDisposed(),We.atanh(this)},e.prototype.erf=function(){return this.throwIfDisposed(),We.erf(this)},e.prototype.round=function(){return this.throwIfDisposed(),We.round(this)},e.prototype.step=function(e){return void 0===e&&(e=0),this.throwIfDisposed(),We.step(this,e)},e.prototype.softmax=function(e){return void 0===e&&(e=-1),this.throwIfDisposed(),We.softmax(this,e)},e.prototype.logSoftmax=function(e){return void 0===e&&(e=-1),this.throwIfDisposed(),We.logSoftmax(this,e)},e.prototype.resizeBilinear=function(e,t){return void 0===t&&(t=!1),this.throwIfDisposed(),We.image.resizeBilinear(this,e,t)},e.prototype.resizeNearestNeighbor=function(e,t){return void 0===t&&(t=!1),this.throwIfDisposed(),We.image.resizeNearestNeighbor(this,e,t)},e.prototype.conv1d=function(e,t,n,r,o,i){return void 0===r&&(r="NWC"),void 0===o&&(o=1),this.throwIfDisposed(),We.conv1d(this,e,t,n,r,o,i)},e.prototype.conv2d=function(e,t,n,r,o,i){return void 0===r&&(r="NHWC"),void 0===o&&(o=[1,1]),this.throwIfDisposed(),We.conv2d(this,e,t,n,r,o,i)},e.prototype.conv2dTranspose=function(e,t,n,r,o){return this.throwIfDisposed(),We.conv2dTranspose(this,e,t,n,r,o)},e.prototype.depthwiseConv2D=function(e,t,n,r,o,i){return void 0===r&&(r="NHWC"),void 0===o&&(o=[1,1]),this.throwIfDisposed(),We.depthwiseConv2d(this,e,t,n,r,o,i)},e.prototype.separableConv2d=function(e,t,n,r,o,i){return void 0===o&&(o=[1,1]),void 0===i&&(i="NHWC"),this.throwIfDisposed(),We.separableConv2d(this,e,t,n,r,o,i)},e.prototype.avgPool=function(e,t,n,r){return this.throwIfDisposed(),We.avgPool(this,e,t,n,r)},e.prototype.maxPool=function(e,t,n,r){return this.throwIfDisposed(),We.maxPool(this,e,t,n,r)},e.prototype.localResponseNormalization=function(e,t,n,r){return void 0===e&&(e=5),void 0===t&&(t=1),void 0===n&&(n=1),void 0===r&&(r=.5),We.localResponseNormalization(this,e,t,n,r)},e.prototype.pool=function(e,t,n,r,o){return this.throwIfDisposed(),We.pool(this,e,t,n,r,o)},e.prototype.variable=function(e,t,n){return void 0===e&&(e=!0),this.throwIfDisposed(),Ue().makeVariable(this,e,t,n)},e.prototype.unsortedSegmentSum=function(e,t){return this.throwIfDisposed(),We.unsortedSegmentSum(this,e,t)},e.prototype.batchToSpaceND=function(e,t){return this.throwIfDisposed(),We.batchToSpaceND(this,e,t)},e.prototype.spaceToBatchND=function(e,t){return this.throwIfDisposed(),We.spaceToBatchND(this,e,t)},e.prototype.topk=function(e,t){return void 0===e&&(e=1),void 0===t&&(t=!0),this.throwIfDisposed(),We.topk(this,e,t)},e.prototype.stridedSlice=function(e,t,n,r,o,i,a,s){return void 0===r&&(r=0),void 0===o&&(o=0),void 0===i&&(i=0),void 0===a&&(a=0),void 0===s&&(s=0),this.throwIfDisposed(),We.stridedSlice(this,e,t,n,r,o,i,a,s)},e.prototype.depthToSpace=function(e,t){return this.throwIfDisposed(),We.depthToSpace(this,e,t)},e.prototype.fft=function(){return this.throwIfDisposed(),We.spectral.fft(this)},e.prototype.ifft=function(){return this.throwIfDisposed(),We.spectral.ifft(this)},e.prototype.rfft=function(){return this.throwIfDisposed(),We.spectral.rfft(this)},e.prototype.irfft=function(){return this.throwIfDisposed(),We.spectral.irfft(this)},e}();Object.defineProperty(qe,Symbol.hasInstance,{value:function(e){return!!e&&null!=e.dataId&&null!=e.shape&&null!=e.dtype}});var Qe,Ve,He,Ge,Xe,Ze=function(e){function t(t,n,r,o){var i=e.call(this,t.shape,t.dtype,t.dataId,o)||this;return i.trainable=n,i.name=r,i}return O(t,e),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(!ee(e.shape,this.shape))throw new Error("shape of the new value ("+e.shape+") and previous value ("+this.shape+") must match");Ue().disposeTensor(this),this.dataId=e.dataId,Ue().incRef(this,null)},t.prototype.dispose=function(){Ue().disposeVariable(this),this.isDisposedInternal=!0},t}(qe);Object.defineProperty(Ze,Symbol.hasInstance,{value:function(e){return e instanceof qe&&null!=e.assign&&e.assign instanceof Function}}),function(e){e.R0="R0",e.R1="R1",e.R2="R2",e.R3="R3",e.R4="R4",e.R5="R5",e.R6="R6"}(Qe||(Qe={})),function(e){e.float32="float32",e.int32="int32",e.bool="int32",e.complex64="complex64"}(Ve||(Ve={})),function(e){e.float32="float32",e.int32="int32",e.bool="bool",e.complex64="complex64"}(He||(He={})),function(e){e.float32="float32",e.int32="float32",e.bool="float32",e.complex64="complex64"}(Ge||(Ge={})),function(e){e.float32="complex64",e.int32="complex64",e.bool="complex64",e.complex64="complex64"}(Xe||(Xe={}));var Ke={float32:Ge,int32:Ve,bool:He,complex64:Xe};function Je(e,t){if("string"===e||"string"===t){if("string"===e&&"string"===t)return"string";throw new Error("Can not upcast "+e+" with "+t)}return Ke[e][t]}function Ye(e){return Je(e,"int32")}function $e(e,t){if(e.dtype===t.dtype)return[e,t];var n=Je(e.dtype,t.dtype);return[e.cast(n),t.cast(n)]}function et(e,t){Z(e.dtype===t.dtype,(function(){return"The dtypes of the first("+e.dtype+") and second("+t.dtype+") input must match"}))}function tt(e){var t=[];return function e(t,n,r){if(null!=t)if(t instanceof qe)n.push(t);else if(o=t,Array.isArray(o)||"object"==typeof o){var o,i=t;for(var a in i){var s=i[a];r.has(s)||(r.add(s),e(s,n,r))}}}(e,t,new Set),t}Object.freeze({makeTypesMatch:$e,assertTypesMatch:et,isTensorInList:function(e,t){return t.some((function(t){return t.id===e.id}))},getTensorsInContainer:tt});var nt,rt=function(){function e(){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 e.prototype.dispose=function(){for(var e in this.registeredVariables)this.registeredVariables[e].dispose()},e}(),ot=function(){function e(e){this.ENV=e,this.registry={},this.registryFactory={},this.pendingBackendInitId=0,this.state=new rt}return e.prototype.ready=function(){return D(this,void 0,void 0,(function(){var e,t,n;return B(this,(function(r){switch(r.label){case 0:if(null!=this.pendingBackendInit)return[2,this.pendingBackendInit.then((function(){}))];if(null!=this.backendInstance)return[2];e=this.getSortedBackends(),t=0,r.label=1;case 1:return t<e.length?(n=e[t],[4,this.initializeBackend(n).success]):[3,5];case 2:return r.sent()?[4,this.setBackend(n)]:[3,4];case 3:return r.sent(),[2];case 4:return t++,[3,1];case 5:throw new Error("Could not initialize any backends, all backend initializations failed.")}}))}))},Object.defineProperty(e.prototype,"backend",{get:function(){if(null!=this.pendingBackendInit)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(null==this.backendInstance){var e=this.initializeBackendsAndReturnBest(),t=e.name;if(e.asyncInit)throw new Error("The highest priority backend '"+t+"' has not yet been initialized. Make sure to await tf.ready() or await tf.setBackend() before calling other methods");this.setBackend(t)}return this.backendInstance},enumerable:!0,configurable:!0}),e.prototype.backendNames=function(){return Object.keys(this.registryFactory)},e.prototype.findBackend=function(e){if(!(e in this.registry)){if(!(e in this.registryFactory))return null;if(this.initializeBackend(e).asyncInit)return null}return this.registry[e]},e.prototype.findBackendFactory=function(e){return e in this.registryFactory?this.registryFactory[e].factory:null},e.prototype.registerBackend=function(e,t,n){return void 0===n&&(n=1),e in this.registryFactory?(console.warn(e+" backend was already registered. Reusing existing backend factory."),!1):(this.registryFactory[e]={factory:t,priority:n},!0)},e.prototype.setBackend=function(e){return D(this,void 0,void 0,(function(){var t,n,r;return B(this,(function(o){switch(o.label){case 0:if(null==this.registryFactory[e])throw new Error("Backend name '"+e+"' not found in registry");return this.backendName=e,null!=this.registry[e]?[3,4]:(this.backendInstance=null,t=this.initializeBackend(e),n=t.success,t.asyncInit?[4,n]:[3,2]);case 1:return r=o.sent(),[3,3];case 2:r=n,o.label=3;case 3:if(!r)return[2,!1];o.label=4;case 4:return this.backendInstance=this.registry[e],this.setupRegisteredKernels(),this.profiler=new _e(this.backendInstance),[2,!0]}}))}))},e.prototype.setupRegisteredKernels=function(){var e=this;W(this.backendName).forEach((function(t){null!=t.setupFunc&&t.setupFunc(e.backendInstance)}))},e.prototype.disposeRegisteredKernels=function(e){var t=this;W(e).forEach((function(n){null!=n.disposeFunc&&n.disposeFunc(t.registry[e])}))},e.prototype.initializeBackend=function(e){var t=this,n=this.registryFactory[e];if(null==n)throw new Error("Cannot initialize backend "+e+", no registration found.");try{var r=n.factory();if(Promise.resolve(r)===r){var o=++this.pendingBackendInitId,i=r.then((function(n){return!(o<t.pendingBackendInitId||(t.registry[e]=n,t.pendingBackendInit=null,0))})).catch((function(n){return!(o<t.pendingBackendInitId||(t.pendingBackendInit=null,console.warn("Initialization of backend "+e+" failed"),console.warn(n.stack||n.message),1))}));return this.pendingBackendInit=i,{success:i,asyncInit:!0}}return this.registry[e]=r,{success:!0,asyncInit:!1}}catch(t){return console.warn("Initialization of backend "+e+" failed"),console.warn(t.stack||t.message),{success:!1,asyncInit:!1}}},e.prototype.removeBackend=function(e){if(!(e in this.registryFactory))throw new Error(e+" backend not found in registry");this.backendName===e&&null!=this.pendingBackendInit&&this.pendingBackendInitId++,e in this.registry&&(this.disposeRegisteredKernels(e),this.registry[e].dispose(),delete this.registry[e]),delete this.registryFactory[e],this.backendName===e&&(this.pendingBackendInit=null,this.backendName=null,this.backendInstance=null)},e.prototype.getSortedBackends=function(){var e=this;if(0===Object.keys(this.registryFactory).length)throw new Error("No backend found in registry.");return Object.keys(this.registryFactory).sort((function(t,n){return e.registryFactory[n].priority-e.registryFactory[t].priority}))},e.prototype.initializeBackendsAndReturnBest=function(){for(var e=this.getSortedBackends(),t=0;t<e.length;t++){var n=e[t],r=this.initializeBackend(n),o=r.success,i=r.asyncInit;if(i||o)return{name:n,asyncInit:i}}throw new Error("Could not initialize any backends, all backend initializations failed.")},e.prototype.moveData=function(e,t){var n=this.state.tensorInfo.get(t),r=n.backend,o=this.readSync(t);r.disposeData(t),n.backend=e,e.move(t,o,n.shape,n.dtype),this.shouldCheckForMemLeaks()&&this.state.numDataMovesStack[this.state.numDataMovesStack.length-1]++},e.prototype.tidy=function(e,t){var n,r=this,o=null;if(null==t){if("function"!=typeof e)throw new Error("Please provide a function to tidy()");t=e}else{if("string"!=typeof e&&!(e instanceof String))throw new Error("When calling with two arguments, the first argument to tidy() must be a string");if("function"!=typeof t)throw new Error("When calling with two arguments, the 2nd argument to tidy() must be a function");o=e}return this.scopedRun((function(){return r.startScope(o)}),(function(){return r.endScope(n)}),(function(){return(n=t())instanceof Promise&&console.error("Cannot return a Promise inside of tidy."),n}))},e.prototype.scopedRun=function(e,t,n){e();try{var r=n();return t(),r}catch(e){throw t(),e}},e.prototype.nextTensorId=function(){return e.nextTensorId++},e.prototype.nextVariableId=function(){return e.nextVariableId++},e.prototype.clone=function(e){var t=this.makeTensorFromDataId(e.dataId,e.shape,e.dtype),n={x:e};return this.addTapeNode(this.state.activeScope.name,n,[t],(function(e){return{x:function(){return e.toFloat()}}}),[]),t},e.prototype.runKernel=function(e,t,n,r,o){return this.runKernelFunc(null,t,null,e,n,r,o)},e.prototype.shouldCheckForMemLeaks=function(){return this.ENV.getBool("IS_TEST")},e.prototype.checkKernelForMemLeak=function(e,t,n){var r=this.backend.numDataIds(),o=0;n.forEach((function(e){o+="complex64"===e.dtype?3:1}));var i=this.state.numDataMovesStack[this.state.numDataMovesStack.length-1],a=r-t-o-i;if(a>0)throw new Error("Backend '"+this.backendName+"' has an internal memory leak ("+a+" data ids) after running '"+e+"'")},e.prototype.runKernelFunc=function(e,t,n,r,o,i,a){var s,u=this;void 0===i&&(i=[]),void 0===a&&(a=[]);var c=[],l=this.isTapeOn();null==r&&(r=null!=this.state.activeScope?this.state.activeScope.name:"");var f,p=function(e){l&&(c=e.map((function(e){return u.keep(u.clone(e))})))},h=this.state.numBytes,d=this.state.numTensors;this.shouldCheckForMemLeaks()&&this.state.numDataMovesStack.push(0);var m,g=U(r,this.backendName);return f=null!=g?function(){var e=u.backend.numDataIds();m=g.kernelFunc({inputs:t,attrs:o,backend:u.backend});var n=Array.isArray(m)?m:[m];u.shouldCheckForMemLeaks()&&u.checkKernelForMemLeak(r,e,n);var s=n.map((function(e){var t=e.dataId,n=e.shape,r=e.dtype;return u.makeTensorFromDataId(t,n,r)})),c=s.filter((function(e,t){return a[t]}));return p((i||[]).slice().concat(c)),s}:function(){var t=u.backend.numDataIds();m=u.tidy((function(){return e(u.backend,p)}));var n=Array.isArray(m)?m:[m];return u.shouldCheckForMemLeaks()&&u.checkKernelForMemLeak(r,t,n),n},this.scopedRun((function(){return u.state.kernelDepth++}),(function(){return u.state.kernelDepth--}),(function(){s=u.ENV.getBool("DEBUG")?u.profiler.profileKernel(r,t,(function(){return f()})):f()})),l&&this.addTapeNode(r,t,s,n,c),this.state.profiling&&this.state.activeProfile.kernels.push({name:r,bytesAdded:this.state.numBytes-h,totalBytesSnapshot:this.state.numBytes,tensorsAdded:this.state.numTensors-d,totalTensorsSnapshot:this.state.numTensors,inputShapes:Object.keys(t).map((function(e){return t[e].shape})),outputShapes:s.map((function(e){return e.shape}))}),Array.isArray(m)?s:s[0]},e.prototype.makeTensor=function(e,t,n,r){if(null==e)throw new Error("Values passed to engine.makeTensor() are null");n=n||"float32",r=r||this.backend;var o=e;"string"===n&&ve(e[0])&&(o=e.map((function(e){return Re(e)})));var i=r.write(o,t,n),a=new qe(t,n,i,this.nextTensorId());if(this.incRef(a,r),"string"===n){var s=this.state.tensorInfo.get(i),u=ge(o);this.state.numBytes+=u-s.bytes,s.bytes=u}return a},e.prototype.makeTensorFromDataId=function(e,t,n,r){var o=new qe(t,n=n||"float32",e,this.nextTensorId());return this.incRef(o,r),o},e.prototype.makeVariable=function(e,t,n,r){void 0===t&&(t=!0),n=n||this.nextVariableId().toString(),null!=r&&r!==e.dtype&&(e=e.asType(r));var o=new Ze(e,t,n,this.nextTensorId());if(null!=this.state.registeredVariables[o.name])throw new Error("Variable with name "+o.name+" was already registered");return this.state.registeredVariables[o.name]=o,this.incRef(o,this.backend),o},e.prototype.incRef=function(e,t){var n=this.state.tensorInfo.has(e.dataId)?this.state.tensorInfo.get(e.dataId).refCount:0;if(this.state.numTensors++,"string"===e.dtype&&this.state.numStringTensors++,0===n){this.state.numDataBuffers++;var r=0;"complex64"!==e.dtype&&"string"!==e.dtype&&(r=e.size*me(e.dtype)),this.state.tensorInfo.set(e.dataId,{backend:t||this.backend,dtype:e.dtype,shape:e.shape,bytes:r,refCount:0}),this.state.numBytes+=r}this.state.tensorInfo.get(e.dataId).refCount++,e instanceof Ze||this.track(e)},e.prototype.disposeTensor=function(e){if(this.state.tensorInfo.has(e.dataId)){this.state.numTensors--,"string"===e.dtype&&this.state.numStringTensors--;var t=this.state.tensorInfo.get(e.dataId);t.refCount<=1?("complex64"!==e.dtype&&(this.state.numBytes-=t.bytes),this.state.numDataBuffers--,t.backend.disposeData(e.dataId),this.state.tensorInfo.delete(e.dataId)):this.state.tensorInfo.get(e.dataId).refCount--}},e.prototype.disposeVariables=function(){for(var e in this.state.registeredVariables){var t=this.state.registeredVariables[e];this.disposeVariable(t)}},e.prototype.disposeVariable=function(e){this.disposeTensor(e),null!=this.state.registeredVariables[e.name]&&delete this.state.registeredVariables[e.name]},e.prototype.memory=function(){var e=this.backend.memory();return e.numTensors=this.state.numTensors,e.numDataBuffers=this.state.numDataBuffers,e.numBytes=this.state.numBytes,this.state.numStringTensors>0&&(e.unreliable=!0,null==e.reasons&&(e.reasons=[]),e.reasons.push("Memory usage by string tensors is approximate (2 bytes per character)")),e},e.prototype.profile=function(e){return D(this,void 0,void 0,(function(){var t,n;return B(this,(function(r){return this.state.profiling=!0,t=this.state.numBytes,n=this.state.numTensors,this.state.activeProfile.kernels=[],this.state.activeProfile.result=e(),this.state.profiling=!1,this.state.activeProfile.peakBytes=Math.max.apply(Math,this.state.activeProfile.kernels.map((function(e){return e.totalBytesSnapshot}))),this.state.activeProfile.newBytes=this.state.numBytes-t,this.state.activeProfile.newTensors=this.state.numTensors-n,[2,this.state.activeProfile]}))}))},e.prototype.isTapeOn=function(){return this.state.gradientDepth>0&&0===this.state.kernelDepth},e.prototype.addTapeNode=function(e,t,n,r,o){var i=this,a={id:this.state.nextTapeNodeId++,kernelName:e,inputs:t,outputs:n,saved:o},s=function(e){return L.get(e)}(e);null!=s&&(r=s.gradFunc),null!=r&&(a.gradient=function(e){return e=e.map((function(e,t){if(null==e){var r=n[t],o=Se(r.size,r.dtype);return i.makeTensor(o,r.shape,r.dtype)}return e})),r(e.length>1?e:e[0],o)}),this.state.activeTape.push(a)},e.prototype.keep=function(e){return e.kept=!0,e},e.prototype.startTape=function(){0===this.state.gradientDepth&&(this.state.activeTape=[]),this.state.gradientDepth++},e.prototype.endTape=function(){this.state.gradientDepth--},e.prototype.startScope=function(e){var t={track:[],name:"unnamed scope",id:this.state.nextScopeId++};e&&(t.name=e),this.state.scopeStack.push(t),this.state.activeScope=t},e.prototype.endScope=function(e){for(var t=this,n=tt(e),r=new Set(n.map((function(e){return e.id}))),o=0;o<this.state.activeScope.track.length;o++){var i=this.state.activeScope.track[o];i.kept||r.has(i.id)||i.dispose()}var a=this.state.scopeStack.pop();this.state.activeScope=0===this.state.scopeStack.length?null:this.state.scopeStack[this.state.scopeStack.length-1],n.forEach((function(e){e.kept||e.scopeId!==a.id||t.track(e)}))},e.prototype.gradients=function(e,t,n,r){var o=this;if(void 0===r&&(r=!1),Z(t.length>0,(function(){return"gradients() received an empty list of xs."})),null!=n&&"float32"!==n.dtype)throw new Error("dy must have 'float32' dtype, but has '"+n.dtype+"'");var i=this.scopedRun((function(){return o.startTape()}),(function(){return o.endTape()}),(function(){return o.tidy("forward",e)}));Z(i instanceof qe,(function(){return"The result y returned by f() must be a tensor."}));var a=function(e,t,n){for(var r={},o={},i=0;i<t.length;i++)r[t[i].id]=!0;for(i=0;i<e.length;i++){var a=(d=e[i]).inputs;for(var s in a){for(var u=a[s],c=!1,l=0;l<t.length;l++)if(r[u.id]){d.outputs.forEach((function(e){return r[e.id]=!0})),c=!0,o[d.id]=!0;break}if(c)break}}var f={};f[n.id]=!0;var p={};for(i=e.length-1;i>=0;i--)for(a=(d=e[i]).inputs,l=0;l<d.outputs.length;l++)if(f[d.outputs[l].id]){for(var s in a)f[a[s].id]=!0,p[d.id]=!0;break}var h=[];for(i=0;i<e.length;i++){var d;if(o[(d=e[i]).id]&&p[d.id]){var m={};for(var s in d.inputs){var g=d.inputs[s];r[g.id]&&(m[s]=g)}var v=Object.assign({},d);v.inputs=m,v.outputs=d.outputs,h.push(v)}}return h}(this.state.activeTape,t,i);if(!r&&0===a.length&&t.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 e,r,s={};s[i.id]=null==n?(r=Ie($(e=i.shape),"float32"),it.makeTensor(r,e,"float32")):n,function(e,t,n){for(var r=function(r){var o=t[r],i=[];if(o.outputs.forEach((function(t){var n=e[t.id];null!=n?i.push(n):i.push(null)})),null==o.gradient)throw new Error("Cannot compute gradient: gradient function not found for "+o.kernelName+".");var a=o.gradient(i),s=function(t){if(!(t in a))throw new Error("Cannot backprop through input "+t+". Available gradients found: "+Object.keys(a)+".");var r=n((function(){return a[t]()}));if("float32"!==r.dtype)throw new Error("Error in gradient for op "+o.kernelName+". The gradient of input "+t+" must have 'float32' dtype, but has '"+r.dtype+"'");var i=o.inputs[t];if(!ee(r.shape,i.shape))throw new Error("Error in gradient for op "+o.kernelName+". The gradient of input '"+t+"' has shape '"+r.shape+"', which does not match the shape of the input '"+i.shape+"'");if(null==e[i.id])e[i.id]=r;else{var s=e[i.id];e[i.id]=s.add(r),s.dispose()}};for(var u in o.inputs)s(u)},o=t.length-1;o>=0;o--)r(o)}(s,a,(function(e){return o.tidy(e)}));var u=t.map((function(e){return s[e.id]}));return 0===o.state.gradientDepth&&(o.state.activeTape.forEach((function(e){for(var t=0,n=e.saved;t<n.length;t++)n[t].dispose()})),o.state.activeTape=null),{value:i,grads:u}}))},e.prototype.customGrad=function(e){var t=this;return Z(xe(e),(function(){return"The f passed in customGrad(f) must be a function."})),function(){for(var n,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];Z(r.every((function(e){return e instanceof qe})),(function(){return"The args passed in customGrad(f)(x1, x2,...) must all be tensors"}));var i={};return r.forEach((function(e,t){i[t]=e})),t.runKernelFunc((function(t,o){return Z((n=e.apply(void 0,r.concat([o]))).value instanceof qe,(function(){return"The function f passed in customGrad(f) must return an object where `obj.value` is a tensor"})),Z(xe(n.gradFunc),(function(){return"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function."})),n.value}),i,(function(e,t){var o=n.gradFunc(e,t),i=Array.isArray(o)?o:[o];Z(i.length===r.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(...)."})),Z(i.every((function(e){return e instanceof qe})),(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 a={};return i.forEach((function(e,t){a[t]=function(){return e}})),a}))}},e.prototype.readSync=function(e){return this.state.tensorInfo.get(e).backend.readSync(e)},e.prototype.read=function(e){return this.state.tensorInfo.get(e).backend.read(e)},e.prototype.time=function(e){return D(this,void 0,void 0,(function(){var t,n;return B(this,(function(r){switch(r.label){case 0:return t=je(),[4,this.backend.time(e)];case 1:return(n=r.sent()).wallMs=je()-t,[2,n]}}))}))},e.prototype.track=function(e){return null!=this.state.activeScope&&(e.scopeId=this.state.activeScope.id,this.state.activeScope.track.push(e)),e},Object.defineProperty(e.prototype,"registeredVariables",{get:function(){return this.state.registeredVariables},enumerable:!0,configurable:!0}),e.prototype.reset=function(){for(var e in this.pendingBackendInitId++,this.state.dispose(),this.ENV.reset(),this.state=new rt,this.registry)this.disposeRegisteredKernels(e),this.registry[e].dispose(),delete this.registry[e];this.backendName=null,this.backendInstance=null,this.pendingBackendInit=null},e.nextTensorId=0,e.nextVariableId=0,e}(),it=function(){var e=function(){if(null==nt){var e=void 0;if("undefined"!=typeof window)e=window;else if(void 0!==n.g)e=n.g;else if(void 0!==j)e=j;else{if("undefined"==typeof self)throw new Error("Could not find a global object");j=self}nt=e}return nt}();if(null==e._tfengine){var t=new _(e);e._tfengine=new ot(t)}return function(e){M=e}(e._tfengine.ENV),Ue=function(){return e._tfengine},e._tfengine}();function at(){return"undefined"!=typeof window&&null!=window.document||"undefined"!=typeof WorkerGlobalScope}var st=P();st.registerFlag("DEBUG",(function(){return!1}),(function(e){e&&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.")})),st.registerFlag("IS_BROWSER",(function(){return at()})),st.registerFlag("IS_NODE",(function(){return void 0!==j&&void 0!==j.versions&&void 0!==j.versions.node})),st.registerFlag("IS_CHROME",(function(){return"undefined"!=typeof navigator&&null!=navigator&&null!=navigator.userAgent&&/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)})),st.registerFlag("PROD",(function(){return!1})),st.registerFlag("TENSORLIKE_CHECK_SHAPE_CONSISTENCY",(function(){return st.getBool("DEBUG")})),st.registerFlag("DEPRECATION_WARNINGS_ENABLED",(function(){return!0})),st.registerFlag("IS_TEST",(function(){return!1}));var ut,ct,lt,ft={},pt={alpha:!1,antialias:!1,premultipliedAlpha:!1,preserveDrawingBuffer:!1,depth:!1,stencil:!1,failIfMajorPerformanceCaveat:!0};function ht(e,t){ft[e]=t}function dt(e){e in ft||(ft[e]=function(e){if(1!==e&&2!==e)throw new Error("Cannot get WebGL rendering context, WebGL is disabled.");var t=function(e){if("undefined"!=typeof OffscreenCanvas&&2===e)return new OffscreenCanvas(300,150);if("undefined"!=typeof document)return document.createElement("canvas");throw new Error("Cannot create a canvas in this context")}(e);return t.addEventListener("webglcontextlost",(function(t){t.preventDefault(),delete ft[e]}),!1),1===e?t.getContext("webgl",pt)||t.getContext("experimental-webgl",pt):t.getContext("webgl2",pt)}(e));var t=ft[e];return t.isContextLost()?(delete ft[e],dt(e)):(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),ft[e])}function mt(e,t){return[t,e]}function gt(e){var t=$(e);return re(Math.ceil(t/4))}function vt(e,t){return[Math.max(1,Math.ceil(t/2)),Math.max(1,Math.ceil(e/2))]}function yt(e,t){var n,r,o,i,a,s,u,c,l,f=e;return 2===P().getNumber("WEBGL_VERSION")?(n=f.R32F,r=f.R16F,o=f.RGBA16F,i=f.RGBA32F,a=f.RED,s=4,u=1,c=f.HALF_FLOAT,l=f.FLOAT):(n=e.RGBA,r=e.RGBA,o=e.RGBA,i=f.RGBA,a=e.RGBA,s=4,u=4,c=null!=t?t.HALF_FLOAT_OES:null,l=e.FLOAT),{internalFormatFloat:n,internalFormatHalfFloat:r,internalFormatPackedHalfFloat:o,internalFormatPackedFloat:i,textureFormatFloat:a,downloadTextureFormat:e.RGBA,downloadUnpackNumChannels:s,defaultNumChannels:u,textureTypeHalfFloat:c,textureTypeFloat:l}}function bt(e,t,n){var r=n();return t&&function(e){var t=e.getError();if(t!==e.NO_ERROR)throw new Error("WebGL Error: "+xt(e,t))}(e),r}!function(e){e[e.DENSE=0]="DENSE",e[e.SHARED_BATCH=1]="SHARED_BATCH"}(ut||(ut={})),function(e){e[e.RENDER=0]="RENDER",e[e.UPLOAD=1]="UPLOAD",e[e.PIXELS=2]="PIXELS",e[e.DOWNLOAD=3]="DOWNLOAD"}(ct||(ct={})),function(e){e[e.UNPACKED_FLOAT16=0]="UNPACKED_FLOAT16",e[e.UNPACKED_FLOAT32=1]="UNPACKED_FLOAT32",e[e.PACKED_4X1_UNSIGNED_BYTE=2]="PACKED_4X1_UNSIGNED_BYTE",e[e.PACKED_2X2_FLOAT32=3]="PACKED_2X2_FLOAT32",e[e.PACKED_2X2_FLOAT16=4]="PACKED_2X2_FLOAT16"}(lt||(lt={}));function wt(e){return!!(P().getBool("WEBGL_RENDER_FLOAT32_ENABLED")||0===e||5.96e-8<Math.abs(e)&&Math.abs(e)<65504)}function xt(e,t){switch(t){case e.NO_ERROR:return"NO_ERROR";case e.INVALID_ENUM:return"INVALID_ENUM";case e.INVALID_VALUE:return"INVALID_VALUE";case e.INVALID_OPERATION:return"INVALID_OPERATION";case e.INVALID_FRAMEBUFFER_OPERATION:return"INVALID_FRAMEBUFFER_OPERATION";case e.OUT_OF_MEMORY:return"OUT_OF_MEMORY";case e.CONTEXT_LOST_WEBGL:return"CONTEXT_LOST_WEBGL";default:return"Unknown error code "+t}}function At(e,t,n){return Vt(e,t,(function(){return e.getExtension(n)}),'Extension "'+n+'" not supported on this browser.')}function Et(e,t,n){var r=Vt(e,t,(function(){return e.createShader(e.VERTEX_SHADER)}),"Unable to create vertex WebGLShader.");if(bt(e,t,(function(){return e.shaderSource(r,n)})),bt(e,t,(function(){return e.compileShader(r)})),!1===e.getShaderParameter(r,e.COMPILE_STATUS))throw console.log(e.getShaderInfoLog(r)),new Error("Failed to compile vertex shader.");return r}function Ct(e,t,n){var r=Vt(e,t,(function(){return e.createShader(e.FRAGMENT_SHADER)}),"Unable to create fragment WebGLShader.");if(bt(e,t,(function(){return e.shaderSource(r,n)})),bt(e,t,(function(){return e.compileShader(r)})),!1===e.getShaderParameter(r,e.COMPILE_STATUS))throw function(e,t){var n=St.exec(t);if(null==n)return console.log("Couldn't parse line number in error: "+t),void console.log(e);for(var r=+n[1],o=e.split("\n"),i=o.length.toString().length+2,a=o.map((function(e,t){return oe((t+1).toString(),i)+e})),s=0,u=0;u<a.length;u++)s=Math.max(a[u].length,s);var c=a.slice(0,r-1),l=a.slice(r-1,r),f=a.slice(r);console.log(c.join("\n")),console.log(t.split("\n")[0]),console.log("%c "+oe(l[0],s),"border:1px solid red; background-color:#e3d2d2; color:#a61717"),console.log(f.join("\n"))}(n,e.getShaderInfoLog(r)),new Error("Failed to compile fragment shader.");return r}var kt,It,St=/ERROR: [0-9]+:([0-9]+):/g;function jt(e,t){return Vt(e,t,(function(){return e.createProgram()}),"Unable to create WebGLProgram.")}function Tt(e,t,n){if(bt(e,t,(function(){return e.linkProgram(n)})),!1===e.getProgramParameter(n,e.LINK_STATUS))throw console.log(e.getProgramInfoLog(n)),new Error("Failed to link vertex and fragment shaders.")}function Rt(e,t,n){if(bt(e,t,(function(){return e.validateProgram(n)})),!1===e.getProgramParameter(n,e.VALIDATE_STATUS))throw console.log(e.getProgramInfoLog(n)),new Error("Shader program validation failed.")}function Ot(e,t,n){var r=Vt(e,t,(function(){return e.createBuffer()}),"Unable to create WebGLBuffer");return bt(e,t,(function(){return e.bindBuffer(e.ARRAY_BUFFER,r)})),bt(e,t,(function(){return e.bufferData(e.ARRAY_BUFFER,n,e.STATIC_DRAW)})),r}function Dt(e,t,n){var r=Vt(e,t,(function(){return e.createBuffer()}),"Unable to create WebGLBuffer");return bt(e,t,(function(){return e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,r)})),bt(e,t,(function(){return e.bufferData(e.ELEMENT_ARRAY_BUFFER,n,e.STATIC_DRAW)})),r}function Bt(e,t){return Vt(e,t,(function(){return e.createTexture()}),"Unable to create WebGLTexture.")}function _t(e,t){var n=P().getNumber("WEBGL_MAX_TEXTURE_SIZE");if(e<=0||t<=0){var r="["+e+"x"+t+"]";throw new Error("Requested texture size "+r+" is invalid.")}if(e>n||t>n)throw r="["+e+"x"+t+"]",new Error("Requested texture size "+r+" greater than WebGL maximum on this browser / GPU ["+n+"x"+n+"].")}function Nt(e,t){return Vt(e,t,(function(){return e.createFramebuffer()}),"Unable to create WebGLFramebuffer.")}function Pt(e,t,n,r,o,i,a,s){var u=e.getAttribLocation(n,r);return-1!==u&&(bt(e,t,(function(){return e.bindBuffer(e.ARRAY_BUFFER,o)})),bt(e,t,(function(){return e.vertexAttribPointer(u,i,e.FLOAT,!1,a,s)})),bt(e,t,(function(){return e.enableVertexAttribArray(u)})),!0)}function Mt(e,t,n,r){Ht(e,r),bt(e,t,(function(){return e.activeTexture(e.TEXTURE0+r)})),bt(e,t,(function(){return e.bindTexture(e.TEXTURE_2D,n)}))}function Ft(e,t,n,r){return Vt(e,t,(function(){return e.getUniformLocation(n,r)}),'uniform "'+r+'" not present in program.')}function Lt(e,t,n){return e.getUniformLocation(t,n)}function Ut(e,t,n,r,o,i){bt(e,t,(function(){return Mt(e,t,r,i)})),bt(e,t,(function(){return e.uniform1i(o,i)}))}function Wt(e,t,n,r){bt(e,t,(function(){return e.bindFramebuffer(e.FRAMEBUFFER,r)})),bt(e,t,(function(){return e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,n,0)}))}function zt(e,t,n){bt(e,t,(function(){return e.bindFramebuffer(e.FRAMEBUFFER,n)})),bt(e,t,(function(){return e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,null,0)}))}function qt(e){var t=e.checkFramebufferStatus(e.FRAMEBUFFER);if(t!==e.FRAMEBUFFER_COMPLETE)throw new Error("Error binding framebuffer: "+Qt(e,t))}function Qt(e,t){switch(t){case e.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:return"FRAMEBUFFER_INCOMPLETE_ATTACHMENT";case e.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:return"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT";case e.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:return"FRAMEBUFFER_INCOMPLETE_DIMENSIONS";case e.FRAMEBUFFER_UNSUPPORTED:return"FRAMEBUFFER_UNSUPPORTED";default:return"unknown error "+t}}function Vt(e,t,n,r){var o=bt(e,t,(function(){return n()}));if(null==o)throw new Error(r);return o}function Ht(e,t){var n=e.MAX_COMBINED_TEXTURE_IMAGE_UNITS-1,r=t+e.TEXTURE0;if(r<e.TEXTURE0||r>n)throw new Error("textureUnit must be in [gl.TEXTURE0, gl.TEXTURE"+n+"].")}function Gt(e,t){return void 0===t&&(t=2),$(e.slice(0,e.length-t))}function Xt(e){if(0===e.length)throw Error("Cannot get rows and columns of an empty shape array.");return[e.length>1?e[e.length-2]:1,e[e.length-1]]}function Zt(e){var t=[1,1,1];return 0===e.length||1===e.length&&1===e[0]||(t=[Gt(e)].concat(Xt(e))),t}function Kt(e,t){var n;void 0===t&&(t=!1);var r=P().getNumber("WEBGL_MAX_TEXTURE_SIZE");if(t&&(r*=2,1===(e=e.map((function(t,n){return n>=e.length-2?G(e[n]):e[n]}))).length&&(e=[2,e[0]])),2!==e.length){var o=ue(e);e=o.newShape}var i=$(e);if(e.length<=1&&i<=r)return[1,i];if(2===e.length&&e[0]<=r&&e[1]<=r)return e;if(3===e.length&&e[0]*e[1]<=r&&e[2]<=r)return[e[0]*e[1],e[2]];if(3===e.length&&e[0]<=r&&e[1]*e[2]<=r)return[e[0],e[1]*e[2]];if(4===e.length&&e[0]*e[1]*e[2]<=r&&e[3]<=r)return[e[0]*e[1]*e[2],e[3]];if(4===e.length&&e[0]<=r&&e[1]*e[2]*e[3]<=r)return[e[0],e[1]*e[2]*e[3]];if(t){var a=Gt(e),s=2,u=2;return e.length&&(s=(n=Xt(e))[0],u=n[1]),re(i=a*(s/2)*(u/2)).map((function(e){return 2*e}))}return re(i)}function Jt(e){return e%2==0}function Yt(e,t){if(ee(e=e.slice(-2),t=t.slice(-2)))return!0;if(!e.length||!t.length)return!0;if(0===e[0]||0===e[1]||0===t[0]||0===t[1])return!0;if(e.length!==t.length){var n=e.slice(-1)[0],r=t.slice(-1)[0];if(n===r)return!0;if(Jt(n)&&Jt(r)&&(1===e[0]||1===t[0]))return!0}return e[1]===t[1]&&Jt(e[0])&&Jt(t[0])}function $t(e){if(null==kt){var t=dt(e);kt=t.getParameter(t.MAX_TEXTURE_SIZE)}return kt}function en(e){if(null==It){var t=dt(e);It=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS)}return Math.min(16,It)}function tn(e){if(0===e)return 0;var t=dt(e);return nn(t,"EXT_disjoint_timer_query_webgl2")&&2===e?2:nn(t,"EXT_disjoint_timer_query")?1:0}function nn(e,t){return null!=e.getExtension(t)}function rn(e){try{if(null!=dt(e))return!0}catch(e){return!1}return!1}function on(e){if(0===e)return!1;var t=dt(e);if(1===e){if(!nn(t,"OES_texture_float"))return!1}else if(!nn(t,"EXT_color_buffer_float"))return!1;return sn(t)}function an(e){if(0===e)return!1;var t=dt(e);if(1!==e){if(nn(t,"EXT_color_buffer_float"))return sn(t);if(nn(t,"EXT_color_buffer_half_float")){var n=t.getExtension("EXT_color_buffer_half_float");return function(e,t){var n=yt(e,t),r=e.createTexture();e.bindTexture(e.TEXTURE_2D,r),e.texImage2D(e.TEXTURE_2D,0,n.internalFormatHalfFloat,1,1,0,n.textureFormatFloat,n.textureTypeHalfFloat,null);var o=e.createFramebuffer();e.bindFramebuffer(e.FRAMEBUFFER,o),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,r,0);var i=e.checkFramebufferStatus(e.FRAMEBUFFER)===e.FRAMEBUFFER_COMPLETE;return e.bindTexture(e.TEXTURE_2D,null),e.bindFramebuffer(e.FRAMEBUFFER,null),e.deleteTexture(r),e.deleteFramebuffer(o),i}(t,n)}return!1}return!!nn(t,"OES_texture_float")&&!!nn(t,"WEBGL_color_buffer_float")&&sn(t)}function sn(e){var t=yt(e),n=e.createTexture();e.bindTexture(e.TEXTURE_2D,n),e.texImage2D(e.TEXTURE_2D,0,t.internalFormatFloat,1,1,0,t.textureFormatFloat,t.textureTypeFloat,null);var r=e.createFramebuffer();e.bindFramebuffer(e.FRAMEBUFFER,r),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,n,0);var o=e.checkFramebufferStatus(e.FRAMEBUFFER)===e.FRAMEBUFFER_COMPLETE;return e.bindTexture(e.TEXTURE_2D,null),e.bindFramebuffer(e.FRAMEBUFFER,null),e.deleteTexture(n),e.deleteFramebuffer(r),o}function un(e){return 2===e&&null!=dt(e).fenceSync}var cn=Object.freeze({callAndCheck:bt,canBeRepresented:wt,getWebGLErrorMessage:xt,getExtensionOrThrow:At,createVertexShader:Et,createFragmentShader:Ct,createProgram:jt,linkProgram:Tt,validateProgram:Rt,createStaticVertexBuffer:Ot,createStaticIndexBuffer:Dt,getNumChannels:function(){return 2===P().getNumber("WEBGL_VERSION")?1:4},createTexture:Bt,validateTextureSize:_t,createFramebuffer:Nt,bindVertexBufferToProgramAttribute:Pt,bindTextureUnit:Mt,unbindTextureUnit:function(e,t,n){Ht(e,n),bt(e,t,(function(){return e.activeTexture(e.TEXTURE0+n)})),bt(e,t,(function(){return e.bindTexture(e.TEXTURE_2D,null)}))},getProgramUniformLocationOrThrow:Ft,getProgramUniformLocation:Lt,bindTextureToProgramUniformSampler:Ut,bindCanvasToFramebuffer:function(e,t){bt(e,t,(function(){return e.bindFramebuffer(e.FRAMEBUFFER,null)})),bt(e,t,(function(){return e.viewport(0,0,e.canvas.width,e.canvas.height)})),bt(e,t,(function(){return e.scissor(0,0,e.canvas.width,e.canvas.height)}))},bindColorTextureToFramebuffer:Wt,unbindColorTextureFromFramebuffer:zt,validateFramebuffer:qt,getFramebufferErrorMessage:Qt,getBatchDim:Gt,getRowsCols:Xt,getShapeAs3D:Zt,getTextureShapeFromLogicalShape:Kt,isReshapeFree:Yt,getWebGLMaxTextureSize:$t,resetMaxTextureSize:function(){kt=null},resetMaxTexturesInShader:function(){It=null},getMaxTexturesInShader:en,getWebGLDisjointQueryTimerVersion:tn,hasExtension:nn,isWebGLVersionEnabled:rn,isCapableOfRenderingToFloatTexture:on,isDownloadFloatTextureEnabled:an,isWebGLFenceEnabled:un}),ln=P();function fn(e){P().getBool("DEPRECATION_WARNINGS_ENABLED")&&console.warn(e+" You can disable deprecation warnings with tf.disableDeprecationWarnings().")}function pn(e,t){return it.tidy(e,t)}function hn(e){tt(e).forEach((function(e){return e.dispose()}))}function dn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];P().getBool("IS_TEST")||console.warn.apply(console,e)}function mn(e,t){var n=e;if(de(e))return"string"===t?[]:[e.length];if(!Array.isArray(e))return[];for(var r=[];Array.isArray(n)||de(n)&&"string"!==t;)r.push(n.length),n=n[0];return Array.isArray(e)&&P().getBool("TENSORLIKE_CHECK_SHAPE_CONSISTENCY")&&function e(t,n,r){if(r=r||[],Array.isArray(t)||de(t)){Z(n.length>0,(function(){return"Element arr["+r.join("][")+"] should be a primitive, but is an array of "+t.length+" elements"})),Z(t.length===n[0],(function(){return"Element arr["+r.join("][")+"] should have "+n[0]+" elements, but has "+t.length+" elements"}));for(var o=n.slice(1),i=0;i<t.length;++i)e(t[i],o,r.concat(i))}else Z(0===n.length,(function(){return"Element arr["+r.join("][")+"] is a primitive, but should be an array/TypedArray of "+n[0]+" elements"}))}(e,r,[]),r}function gn(e,t,n,r){if(null!=e&&("numeric"!==e&&e!==t||"numeric"===e&&"string"===t))throw new Error("Argument '"+n+"' passed to '"+r+"' must be "+e+" tensor, but got "+t+" tensor")}function vn(e,t,n,r){if(void 0===r&&(r="numeric"),e instanceof qe)return gn(r,e.dtype,t,n),e;var o=we(e);if("string"!==o&&["bool","int32","float32"].indexOf(r)>=0&&(o=r),gn(r,o,t,n),null==e||!de(e)&&!Array.isArray(e)&&"number"!=typeof e&&"boolean"!=typeof e&&"string"!=typeof e){var i=null==e?"null":e.constructor.name;throw new Error("Argument '"+t+"' passed to '"+n+"' must be a Tensor or TensorLike, but got '"+i+"'")}var a=mn(e,o);de(e)||Array.isArray(e)||(e=[e]);var s="string"!==o?Ce(e,o,P().getBool("DEBUG")):Y(e,[],!0);return it.makeTensor(s,a,o)}function yn(e,t,n,r){if(void 0===r&&(r="numeric"),!Array.isArray(e))throw new Error("Argument "+t+" passed to "+n+" must be a `Tensor[]` or `TensorLike[]`");return e.map((function(e,r){return vn(e,t+"["+r+"]",n)}),r)}function bn(e,t){for(var n=0;n<e.length;++n)if(e[e.length-n-1]!==t-1-n)return!1;return!0}function wn(e,t,n){for(var r=e.length+t.length,o=[],i=0,a=0,s=0;s<r;s++)-1===n.indexOf(s)?o.push(e[i++]):o.push(t[a++]);return o}function xn(e,t){for(var n=[],r=e.length,o=0;o<r;o++)-1===t.indexOf(o)&&n.push(e[o]);return[n,t.map((function(t){return e[t]}))]}function An(e,t){return wn(e,t.map((function(e){return 1})),t)}function En(e,t,n){Z(bn(t,n),(function(){return e+" supports only inner-most axes for now. Got axes "+t+" and rank-"+n+" input."}))}function Cn(e,t){if(bn(e,t))return null;for(var n=[],r=0;r<t;++r)-1===e.indexOf(r)&&n.push(r);return e.forEach((function(e){return n.push(e)})),n}function kn(e){return e.map((function(e,t){return[t,e]})).sort((function(e,t){return e[1]-t[1]})).map((function(e){return e[0]}))}function In(e,t){for(var n=[],r=t-e;r<t;++r)n.push(r);return n}function Sn(e,t){var n=e[0].length;e.forEach((function(e,t){Z(e.length===n,(function(){return"Error in concat"+n+"D: rank of tensors["+t+"] must be the same as the rank of the rest ("+n+")"}))})),Z(t>=0&&t<n,(function(){return"Error in concat"+n+"D: axis must be between 0 and "+(n-1)+"."}));var r=e[0];e.forEach((function(e,o){for(var i=0;i<n;i++)Z(i===t||e[i]===r[i],(function(){return"Error in concat"+n+"D: Shape of tensors["+o+"] ("+e+") does not match the shape of the rest ("+r+") along the non-concatenated axis "+o+"."}))}))}function jn(e,t){for(var n=e[0].slice(),r=1;r<e.length;r++)n[t]+=e[r][t];return n}function Tn(e){var t=Object.keys(e);if(1!==t.length)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 n=t[0],r=e[n];n.endsWith("_")&&(n=n.substring(0,n.length-1));var o=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];it.startScope(n);try{var o=r.apply(void 0,e);return o instanceof Promise&&console.error("Cannot return a Promise inside of tidy."),it.endScope(o),o}catch(e){throw it.endScope(null),e}};return Object.defineProperty(o,"name",{value:n,configurable:!0}),o}ln.registerFlag("HAS_WEBGL",(function(){return ln.getNumber("WEBGL_VERSION")>0})),ln.registerFlag("WEBGL_VERSION",(function(){return rn(2)?2:rn(1)?1:0})),ln.registerFlag("WEBGL_BUFFER_SUPPORTED",(function(){return 2===ln.get("WEBGL_VERSION")})),ln.registerFlag("WEBGL_CPU_FORWARD",(function(){return!0})),ln.registerFlag("WEBGL_FORCE_F16_TEXTURES",(function(){return!1})),ln.registerFlag("WEBGL_PACK",(function(){return ln.getBool("HAS_WEBGL")})),ln.registerFlag("WEBGL_PACK_NORMALIZATION",(function(){return ln.getBool("WEBGL_PACK")})),ln.registerFlag("WEBGL_PACK_CLIP",(function(){return ln.getBool("WEBGL_PACK")})),ln.registerFlag("WEBGL_PACK_DEPTHWISECONV",(function(){return!1})),ln.registerFlag("WEBGL_PACK_BINARY_OPERATIONS",(function(){return ln.getBool("WEBGL_PACK")})),ln.registerFlag("WEBGL_PACK_UNARY_OPERATIONS",(function(){return ln.getBool("WEBGL_PACK")})),ln.registerFlag("WEBGL_PACK_ARRAY_OPERATIONS",(function(){return ln.getBool("WEBGL_PACK")})),ln.registerFlag("WEBGL_PACK_IMAGE_OPERATIONS",(function(){return ln.getBool("WEBGL_PACK")})),ln.registerFlag("WEBGL_PACK_REDUCE",(function(){return ln.getBool("WEBGL_PACK")})),ln.registerFlag("WEBGL_LAZILY_UNPACK",(function(){return ln.getBool("WEBGL_PACK")})),ln.registerFlag("WEBGL_CONV_IM2COL",(function(){return ln.getBool("WEBGL_PACK")})),ln.registerFlag("WEBGL_MAX_TEXTURE_SIZE",(function(){return $t(ln.getNumber("WEBGL_VERSION"))})),ln.registerFlag("WEBGL_MAX_TEXTURES_IN_SHADER",(function(){return en(ln.getNumber("WEBGL_VERSION"))})),ln.registerFlag("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION",(function(){var e=ln.getNumber("WEBGL_VERSION");return 0===e?0:tn(e)})),ln.registerFlag("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE",(function(){return ln.getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")>0&&(e=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(e)||/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(e.substr(0,4))));var e})),ln.registerFlag("WEBGL_RENDER_FLOAT32_CAPABLE",(function(){return on(ln.getNumber("WEBGL_VERSION"))})),ln.registerFlag("WEBGL_RENDER_FLOAT32_ENABLED",(function(){return!ln.getBool("WEBGL_FORCE_F16_TEXTURES")&&ln.getBool("WEBGL_RENDER_FLOAT32_CAPABLE")})),ln.registerFlag("WEBGL_DOWNLOAD_FLOAT_ENABLED",(function(){return an(ln.getNumber("WEBGL_VERSION"))})),ln.registerFlag("WEBGL_FENCE_API_ENABLED",(function(){return un(ln.getNumber("WEBGL_VERSION"))})),ln.registerFlag("WEBGL_SIZE_UPLOAD_UNIFORM",(function(){return ln.getBool("WEBGL_RENDER_FLOAT32_ENABLED")?4:0})),ze=fn;var Rn=Tn({complex_:function(e,t){var n=vn(e,"real","complex"),r=vn(t,"imag","complex");return K(n.shape,r.shape,"real and imag shapes, "+n.shape+" and "+r.shape+", must match in call to tf.complex()."),it.runKernelFunc((function(e){return e.complex(n,r)}),{$real:n,$imag:r})}}),On=Tn({real_:function(e){var t=vn(e,"input","real");return it.runKernelFunc((function(e){return e.real(t)}),{$input:t})}}),Dn=Tn({imag_:function(e){var t=vn(e,"input","imag");return it.runKernelFunc((function(e){return e.imag(t)}),{$input:t})}});function Bn(e,t,n){return _n(e,t,mn(e,n),n)}function _n(e,t,n,r){if(null==r&&(r=we(e)),"complex64"===r)throw new Error("Cannot construct a complex64 tensor directly. Please use tf.complex(real, imag).");if(!de(e)&&!Array.isArray(e)&&"number"!=typeof e&&"boolean"!=typeof e&&"string"!=typeof e)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(null!=t){Te(t);var o=$(t),i=$(n);Z(o===i,(function(){return"Based on the provided shape, ["+t+"], the tensor should have "+o+" values but has "+i}));for(var a=0;a<n.length;++a){var s=n[a],u=a!==n.length-1||s!==$(t.slice(a));Z(n[a]===t[a]||!u,(function(){return"Error creating a new Tensor. Inferred shape ("+n+") does not match the provided shape ("+t+"). "}))}}return de(e)||Array.isArray(e)||(e=[e]),t=t||n,e="string"!==r?Ce(e,r,P().getBool("DEBUG")):Y(e,[],!0),it.makeTensor(e,t,r)}function Nn(e,t){if((de(e)&&"string"!==t||Array.isArray(e))&&"complex64"!==t)throw new Error("Error creating a new Scalar: value must be a primitive (number|boolean|string)");if("string"===t&&de(e)&&!(e instanceof Uint8Array))throw new Error("When making a scalar from encoded string, the value must be `Uint8Array`.");return _n(e,[],[],t)}function Pn(e,t){J(e);var n=mn(e,t);if(1!==n.length)throw new Error("tensor1d() requires values to be a flat/TypedArray");return _n(e,null,n,t)}function Mn(e,t,n){if(J(e),null!=t&&2!==t.length)throw new Error("tensor2d() requires shape to have two numbers");var r=mn(e,n);if(2!==r.length&&1!==r.length)throw new Error("tensor2d() requires values to be number[][] or flat/TypedArray");if(1===r.length&&null==t)throw new Error("tensor2d() requires shape to be provided when `values` are a flat/TypedArray");return _n(e,t,r,n)}function Fn(e,t,n){if(J(e),null!=t&&3!==t.length)throw new Error("tensor3d() requires shape to have three numbers");var r=mn(e,n);if(3!==r.length&&1!==r.length)throw new Error("tensor3d() requires values to be number[][][] or flat/TypedArray");if(1===r.length&&null==t)throw new Error("tensor3d() requires shape to be provided when `values` are a flat array");return _n(e,t,r,n)}function Ln(e,t,n){if(J(e),null!=t&&4!==t.length)throw new Error("tensor4d() requires shape to have four numbers");var r=mn(e,n);if(4!==r.length&&1!==r.length)throw new Error("tensor4d() requires values to be number[][][][] or flat/TypedArray");if(1===r.length&&null==t)throw new Error("tensor4d() requires shape to be provided when `values` are a flat array");return _n(e,t,r,n)}function Un(e,t){if(void 0===t&&(t="float32"),"complex64"===t){var n=Un(e,"float32"),r=Wn(e,"float32");return Rn(n,r)}var o=Ie($(e),t);return it.makeTensor(o,e,t)}function Wn(e,t){if(void 0===t&&(t="float32"),"complex64"===t){var n=Wn(e,"float32"),r=Wn(e,"float32");return Rn(n,r)}var o=Se($(e),t);return it.makeTensor(o,e,t)}function zn(e,t,n){return it.runKernelFunc((function(r){return r.fill(e,t,n)}),{})}function qn(e,t,n,r){if(void 0===n&&(n=1),void 0===r&&(r="float32"),0===n)throw new Error("Cannot have a step of zero");if(e===t||e<t&&n<0||t<e&&n>1)return Wn([0],r);var o=Se(Math.abs(Math.ceil((t-e)/n)),r);t<e&&1===n&&(n=-1),o[0]=e;for(var i=1;i<o.length;i++)o[i]=o[i-1]+n;return Pn(o,r)}var Qn=Tn({onesLike_:function(e){var t=vn(e,"x","onesLike");if("complex64"===t.dtype){var n=Qn(On(t)),r=Vn(Dn(t));return Rn(n,r)}return it.runKernelFunc((function(e){return e.onesLike(t)}),{$x:t},(function(e,t){return{$x:function(){return Vn(e)}}}))}}),Vn=Tn({zerosLike_:function(e){var t=vn(e,"x","zerosLike");return it.runKernelFunc((function(e){return e.zerosLike(t)}),{$x:t},(function(e,t){return{$x:function(){return Vn(e)}}}))}}),Hn=Tn({concat_:function(e,t){void 0===t&&(t=0),Z(e.length>=1,(function(){return"Pass at least one tensor to concat"}));var n=yn(e,"tensors","concat");"complex64"===n[0].dtype&&n.forEach((function(e){if("complex64"!==e.dtype)throw new Error("Cannot concatenate complex64 tensors with a tensor\n with dtype "+e.dtype+". ")})),t=se(t,n[0].shape)[0];var r=jn(n.map((function(e){return e.shape})),t);if(0===$(r))return Bn([],r);if(1===(n=n.filter((function(e){return e.size>0}))).length)return n[0];var o=n.map((function(e){return e.shape}));Sn(o,t);var i=n,a={axis:t};return it.runKernelFunc((function(e){return e.concat(n,t)}),i,(function(e){var n=o.map((function(e){return e[t]}));return Jn(e,n,t).map((function(e){return function(){return e}}))}),"Concat",a)}}),Gn=Tn({concat1d_:function(e){return Hn(e,0)}}),Xn=Tn({concat2d_:function(e,t){return Hn(e,t)}}),Zn=Tn({concat3d_:function(e,t){return Hn(e,t)}}),Kn=Tn({concat4d_:function(e,t){return Hn(e,t)}}),Jn=Tn({split_:function(e,t,n){void 0===n&&(n=0);var r,o=vn(e,"x","split");return n=se(n,o.shape)[0],"number"==typeof t?(Z(o.shape[n]%t==0,(function(){return"Number of splits must evenly divide the axis."})),r=new Array(t).fill(o.shape[n]/t)):(Z(o.shape[n]===t.reduce((function(e,t){return e+t})),(function(){return"The sum of sizes must match the size of the axis dimension."})),r=t),it.runKernelFunc((function(e){return e.split(o,r,n)}),{$x:o},(function(e){return{$x:function(){return Hn(e,n)}}}))}});function Yn(e,t){return e(t={exports:{}},t.exports),t.exports}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self&&self;var $n=Yn((function(e){!function(e,t,n){function r(e){var t,n=this,r=(t=4022871197,function(e){e=e.toString();for(var n=0;n<e.length;n++){var r=.02519603282416938*(t+=e.charCodeAt(n));r-=t=r>>>0,t=(r*=t)>>>0,t+=4294967296*(r-=t)}return 2.3283064365386963e-10*(t>>>0)});n.next=function(){var e=2091639*n.s0+2.3283064365386963e-10*n.c;return n.s0=n.s1,n.s1=n.s2,n.s2=e-(n.c=0|e)},n.c=1,n.s0=r(" "),n.s1=r(" "),n.s2=r(" "),n.s0-=r(e),n.s0<0&&(n.s0+=1),n.s1-=r(e),n.s1<0&&(n.s1+=1),n.s2-=r(e),n.s2<0&&(n.s2+=1),r=null}function o(e,t){return t.c=e.c,t.s0=e.s0,t.s1=e.s1,t.s2=e.s2,t}function i(e,t){var n=new r(e),i=t&&t.state,a=n.next;return a.int32=function(){return 4294967296*n.next()|0},a.double=function(){return a()+11102230246251565e-32*(2097152*a()|0)},a.quick=a,i&&("object"==typeof i&&o(i,n),a.state=function(){return o(n,{})}),a}t&&t.exports?t.exports=i:this.alea=i}(0,e)})),er=Yn((function(e){!function(e,t,n){function r(e){var t=this,n="";t.x=0,t.y=0,t.z=0,t.w=0,t.next=function(){var e=t.x^t.x<<11;return t.x=t.y,t.y=t.z,t.z=t.w,t.w^=t.w>>>19^e^e>>>8},e===(0|e)?t.x=e:n+=e;for(var r=0;r<n.length+64;r++)t.x^=0|n.charCodeAt(r),t.next()}function o(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t}function i(e,t){var n=new r(e),i=t&&t.state,a=function(){return(n.next()>>>0)/4294967296};return a.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},a.int32=n.next,a.quick=a,i&&("object"==typeof i&&o(i,n),a.state=function(){return o(n,{})}),a}t&&t.exports?t.exports=i:this.xor128=i}(0,e)})),tr=Yn((function(e){!function(e,t,n){function r(e){var t=this,n="";t.next=function(){var e=t.x^t.x>>>2;return t.x=t.y,t.y=t.z,t.z=t.w,t.w=t.v,(t.d=t.d+362437|0)+(t.v=t.v^t.v<<4^e^e<<1)|0},t.x=0,t.y=0,t.z=0,t.w=0,t.v=0,e===(0|e)?t.x=e:n+=e;for(var r=0;r<n.length+64;r++)t.x^=0|n.charCodeAt(r),r==n.length&&(t.d=t.x<<10^t.x>>>4),t.next()}function o(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t.v=e.v,t.d=e.d,t}function i(e,t){var n=new r(e),i=t&&t.state,a=function(){return(n.next()>>>0)/4294967296};return a.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},a.int32=n.next,a.quick=a,i&&("object"==typeof i&&o(i,n),a.state=function(){return o(n,{})}),a}t&&t.exports?t.exports=i:this.xorwow=i}(0,e)})),nr=Yn((function(e){!function(e,t,n){function r(e){var t=this;t.next=function(){var e,n,r=t.x,o=t.i;return e=r[o],n=(e^=e>>>7)^e<<24,n^=(e=r[o+1&7])^e>>>10,n^=(e=r[o+3&7])^e>>>3,n^=(e=r[o+4&7])^e<<7,e=r[o+7&7],n^=(e^=e<<13)^e<<9,r[o]=n,t.i=o+1&7,n},function(e,t){var n,r=[];if(t===(0|t))r[0]=t;else for(t=""+t,n=0;n<t.length;++n)r[7&n]=r[7&n]<<15^t.charCodeAt(n)+r[n+1&7]<<13;for(;r.length<8;)r.push(0);for(n=0;n<8&&0===r[n];++n);for(8==n?r[7]=-1:r[n],e.x=r,e.i=0,n=256;n>0;--n)e.next()}(t,e)}function o(e,t){return t.x=e.x.slice(),t.i=e.i,t}function i(e,t){null==e&&(e=+new Date);var n=new r(e),i=t&&t.state,a=function(){return(n.next()>>>0)/4294967296};return a.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},a.int32=n.next,a.quick=a,i&&(i.x&&o(i,n),a.state=function(){return o(n,{})}),a}t&&t.exports?t.exports=i:this.xorshift7=i}(0,e)})),rr=Yn((function(e){!function(e,t,n){function r(e){var t=this;t.next=function(){var e,n,r=t.w,o=t.X,i=t.i;return t.w=r=r+1640531527|0,n=o[i+34&127],e=o[i=i+1&127],n^=n<<13,e^=e<<17,n^=n>>>15,e^=e>>>12,n=o[i]=n^e,t.i=i,n+(r^r>>>16)|0},function(e,t){var n,r,o,i,a,s=[],u=128;for(t===(0|t)?(r=t,t=null):(t+="\0",r=0,u=Math.max(u,t.length)),o=0,i=-32;i<u;++i)t&&(r^=t.charCodeAt((i+32)%t.length)),0===i&&(a=r),r^=r<<10,r^=r>>>15,r^=r<<4,r^=r>>>13,i>=0&&(a=a+1640531527|0,o=0==(n=s[127&i]^=r+a)?o+1:0);for(o>=128&&(s[127&(t&&t.length||0)]=-1),o=127,i=512;i>0;--i)r=s[o+34&127],n=s[o=o+1&127],r^=r<<13,n^=n<<17,r^=r>>>15,n^=n>>>12,s[o]=r^n;e.w=a,e.X=s,e.i=o}(t,e)}function o(e,t){return t.i=e.i,t.w=e.w,t.X=e.X.slice(),t}function i(e,t){null==e&&(e=+new Date);var n=new r(e),i=t&&t.state,a=function(){return(n.next()>>>0)/4294967296};return a.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},a.int32=n.next,a.quick=a,i&&(i.X&&o(i,n),a.state=function(){return o(n,{})}),a}t&&t.exports?t.exports=i:this.xor4096=i}(0,e)})),or=Yn((function(e){!function(e,t,n){function r(e){var t=this,n="";t.next=function(){var e=t.b,n=t.c,r=t.d,o=t.a;return e=e<<25^e>>>7^n,n=n-r|0,r=r<<24^r>>>8^o,o=o-e|0,t.b=e=e<<20^e>>>12^n,t.c=n=n-r|0,t.d=r<<16^n>>>16^o,t.a=o-e|0},t.a=0,t.b=0,t.c=-1640531527,t.d=1367130551,e===Math.floor(e)?(t.a=e/4294967296|0,t.b=0|e):n+=e;for(var r=0;r<n.length+20;r++)t.b^=0|n.charCodeAt(r),t.next()}function o(e,t){return t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t}function i(e,t){var n=new r(e),i=t&&t.state,a=function(){return(n.next()>>>0)/4294967296};return a.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},a.int32=n.next,a.quick=a,i&&("object"==typeof i&&o(i,n),a.state=function(){return o(n,{})}),a}t&&t.exports?t.exports=i:this.tychei=i}(0,e)})),ir=Yn((function(e){!function(t,r){var o,i=this,a=256,s="random",u=r.pow(a,6),c=r.pow(2,52),l=2*c,f=255;function p(e,n,f){var p=[],v=m(function e(t,n){var r,o=[],i=typeof t;if(n&&"object"==i)for(r in t)try{o.push(e(t[r],n-1))}catch(e){}return o.length?o:"string"==i?t:t+"\0"}((n=1==n?{entropy:!0}:n||{}).entropy?[e,g(t)]:null==e?function(){try{var e;return o&&(e=o.randomBytes)?e=e(a):(e=new Uint8Array(a),(i.crypto||i.msCrypto).getRandomValues(e)),g(e)}catch(e){var n=i.navigator,r=n&&n.plugins;return[+new Date,i,r,i.screen,g(t)]}}():e,3),p),y=new h(p),b=function(){for(var e=y.g(6),t=u,n=0;e<c;)e=(e+n)*a,t*=a,n=y.g(1);for(;e>=l;)e/=2,t/=2,n>>>=1;return(e+n)/t};return b.int32=function(){return 0|y.g(4)},b.quick=function(){return y.g(4)/4294967296},b.double=b,m(g(y.S),t),(n.pass||f||function(e,t,n,o){return o&&(o.S&&d(o,y),e.state=function(){return d(y,{})}),n?(r[s]=e,t):e})(b,v,"global"in n?n.global:this==r,n.state)}function h(e){var t,n=e.length,r=this,o=0,i=r.i=r.j=0,s=r.S=[];for(n||(e=[n++]);o<a;)s[o]=o++;for(o=0;o<a;o++)s[o]=s[i=f&i+e[o%n]+(t=s[o])],s[i]=t;(r.g=function(e){for(var t,n=0,o=r.i,i=r.j,s=r.S;e--;)t=s[o=f&o+1],n=n*a+s[f&(s[o]=s[i=f&i+t])+(s[i]=t)];return r.i=o,r.j=i,n})(a)}function d(e,t){return t.i=e.i,t.j=e.j,t.S=e.S.slice(),t}function m(e,t){for(var n,r=e+"",o=0;o<r.length;)t[f&o]=f&(n^=19*t[f&o])+r.charCodeAt(o++);return g(t)}function g(e){return String.fromCharCode.apply(0,e)}if(r["seed"+s]=p,m(r.random(),t),e.exports){e.exports=p;try{o=n(91423)}catch(e){}}}([],Math)}));ir.alea=$n,ir.xor128=er,ir.xorwow=tr,ir.xorshift7=nr,ir.xor4096=rr,ir.tychei=or;var ar=ir.alea,sr=function(){function e(e,t,n,r,o){this.mean=e,this.stdDev=t,this.dtype=n,this.nextVal=NaN,this.truncated=r,this.truncated&&(this.upper=this.mean+2*this.stdDev,this.lower=this.mean-2*this.stdDev);var i=o||Math.random();this.random=ar(i.toString())}return e.prototype.nextValue=function(){if(!isNaN(this.nextVal)){var e=this.nextVal;return this.nextVal=NaN,e}for(var t,n,r=!1;!r;){var o=void 0,i=void 0,a=void 0;do{a=(o=2*this.random()-1)*o+(i=2*this.random()-1)*i}while(a>=1||0===a);var s=Math.sqrt(-2*Math.log(a)/a);t=this.mean+this.stdDev*o*s,n=this.mean+this.stdDev*i*s,this.truncated&&!this.isValidTruncated(t)||(r=!0)}return this.truncated&&!this.isValidTruncated(n)||(this.nextVal=this.convertValue(n)),this.convertValue(t)},e.prototype.convertValue=function(e){return null==this.dtype||"float32"===this.dtype?e:Math.round(e)},e.prototype.isValidTruncated=function(e){return e<=this.upper&&e>=this.lower},e}(),ur=function(){function e(e,t,n,r){this.alpha=e,this.beta=1/t,this.dtype=n;var o=r||Math.random();this.randu=ar(o.toString()),this.randn=new sr(0,1,n,!1,this.randu()),this.d=e<1?e+2/3:e-1/3,this.c=1/Math.sqrt(9*this.d)}return e.prototype.nextValue=function(){for(var e,t,n,r,o,i;;){do{r=this.randn.nextValue(),i=1+this.c*r}while(i<=0);if(i*=i*i,t=1-.331*(e=r*r)*e,n=.5*e+this.d*(1-i+Math.log(i)),(o=this.randu())<t||Math.log(o)<n)break}return i=1/this.beta*this.d*i,this.alpha<1&&(i*=Math.pow(this.randu(),1/this.alpha)),this.convertValue(i)},e.prototype.convertValue=function(e){return"float32"===this.dtype?e:Math.round(e)},e}(),cr=function(){function e(e,t,n,r){var o=this;if(void 0===e&&(e=0),void 0===t&&(t=1),this.canReturnFloat=function(){return null==o.dtype||"float32"===o.dtype},this.min=e,this.range=t-e,this.dtype=n,null==r&&(r=Math.random()),"number"==typeof r&&(r=r.toString()),!this.canReturnFloat()&&this.range<=1)throw new Error("The difference between "+e+" - "+t+" <= 1 and dtype is not float");this.random=ar(r)}return e.prototype.convertValue=function(e){return this.canReturnFloat()?e:Math.round(e)},e.prototype.nextValue=function(){return this.convertValue(this.min+this.range*this.random())},e}();function lr(e,t,n){return void 0===t&&(t="float32"),t=t||"float32",Te(e),new Le(e,t,n)}var fr=Tn({batchToSpaceND_:function(e,t,n){var r=vn(e,"x","batchToSpaceND"),o=t.reduce((function(e,t){return e*t}));return Z(r.rank>=1+t.length,(function(){return"input rank is "+r.rank+" but should be > than blockShape.length "+t.length})),Z(n.length===t.length,(function(){return"crops.length is "+n.length+" but should be equal to blockShape.length "+t.length})),Z(r.shape[0]%o==0,(function(){return"input tensor batch is "+r.shape[0]+" but is not divisible by the product of the elements of blockShape "+t.join(" * ")+" === "+o})),it.runKernelFunc((function(e){return e.batchToSpaceND(r,t,n)}),{$x:r},(function(e){return{$x:function(){return e.spaceToBatchND(t,n)}}}))}}),pr=Tn({broadcastTo_:function(e,t){var n=vn(e,"broadcastTo","x"),r=n.shape;if(t.some((function(e){return!(e>0)||e%1!=0})))throw new Error("broadcastTo(): Invalid broadcast shape ["+t+"].");if(t.length<n.rank)throw new Error("broadcastTo(): shape.length="+t.length+" < input.rank="+n.rank+".");if(t.length>n.rank){for(var o=n.shape.slice();o.length<t.length;)o.unshift(1);n=n.reshape(o)}for(var i=Array.from(t),a=t.length-1;a>=0;a--)if(n.shape[a]===t[a])i[a]=1;else if(1!==n.shape[a])throw new Error("broadcastTo(): ["+r+"] cannot be broadcast to ["+t+"].");var s=i.map((function(e,t){return e>1?t:-1})).filter((function(e){return e>=0}));return 0===s.length?n.clone():it.runKernelFunc((function(e){return e.tile(n,i)}),{input:n},(function(e){return{input:function(){return e.sum(s,!0)}}}))}}),hr=Tn({cast_:function(e,t){var n=vn(e,"x","cast");if(!pe(t))throw new Error("Failed to cast to unknown dtype "+t);if("string"===t&&"string"!==n.dtype||"string"!==t&&"string"===n.dtype)throw new Error("Only strings can be casted to strings");var r={dtype:t};return it.runKernelFunc((function(e){return e.cast(n,t)}),{x:n},(function(e){return{x:function(){return e.clone()}}}),"Cast",r)}}),dr=Tn({clone_:function(e){var t=vn(e,"x","clone",null);return it.runKernelFunc((function(){return it.makeTensorFromDataId(t.dataId,t.shape,t.dtype)}),{$x:t},(function(e){return{$x:function(){return e.toFloat()}}}))}}),mr=Tn({cumsum_:function(e,t,n,r){void 0===t&&(t=0),void 0===n&&(n=!1),void 0===r&&(r=!1);var o=vn(e,"x","cumsum"),i=Cn([t|=0],o.rank),a=o;null!=i&&(a=o.transpose(i));var s=In(1,o.rank)[0],u=it.runKernelFunc((function(e){return e.cumsum(a,s,n,r)}),{permutedX:a},(function(e){return{permutedX:function(){return e.cumsum(t,n,!r)}}}));return null!=i&&(u=u.transpose(i)),u}}),gr=Tn({depthToSpace_:function(e,t,n){void 0===n&&(n="NHWC");var r=vn(e,"x","depthToSpace"),o="NHWC"===n?r.shape[1]:r.shape[2],i="NHWC"===n?r.shape[2]:r.shape[3],a="NHWC"===n?r.shape[3]:r.shape[1];return Z(o*t>=0,(function(){return"Negative dimension size caused by overflow when multiplying\n "+o+" and "+t+" for depthToSpace with input shape\n "+r.shape})),Z(i*t>=0,(function(){return"Negative dimension size caused by overflow when multiplying\n "+i+" and "+t+" for depthToSpace with input shape\n "+r.shape})),Z(a%(t*t)==0,(function(){return"Dimension size must be evenly divisible by "+t*t+" but is "+a+" for depthToSpace with input shape "+r.shape})),it.runKernelFunc((function(e){return e.depthToSpace(r,t,n)}),{$x:r})}}),vr=Tn({expandDims_:function(e,t){void 0===t&&(t=0);var n=vn(e,"x","expandDims",null);Z(t<=n.rank,(function(){return"Axis must be <= rank of the tensor"}));var r=n.shape.slice();return t<0&&(Z(-(n.rank+1)<=t,(function(){return"Axis must be in the interval ["+-(n.rank+1)+", "+n.rank+"]"})),t=n.rank+t+1),r.splice(t,0,1),Rr(n,r)}}),yr=Tn({eye_:function(e,t,n,r){void 0===r&&(r="float32"),null==t&&(t=e);for(var o=lr([e,t],r),i=e<=t?e:t,a=0;a<i;++a)o.set(1,a,a);var s=o.toTensor().as2D(e,t);if(null==n)return s;if(1===n.length)return _r(vr(s,0),[n[0],1,1]);if(2===n.length)return _r(vr(vr(s,0),0),[n[0],n[1],1,1]);if(3===n.length)return _r(vr(vr(vr(s,0),0),0),[n[0],n[1],n[2],1,1]);throw new Error("eye() currently supports only 1D and 2D batchShapes, but received "+n.length+"D.")}}),br=Tn({multinomial_:function(e,t,n,r){void 0===r&&(r=!1);var o=vn(e,"logits","multinomial"),i=o.size,a=o.rank;if(i<2)throw new Error("Error in multinomial: you need at least 2 outcomes, but got "+i+".");if(a>2)throw new Error("Rank of probabilities must be 1 or 2, but is "+a);n=n||Math.random();var s=1===a?o.as2D(1,-1):o,u=it.runKernelFunc((function(e){return e.multinomial(s,r,t,n)}),{logits2D:s});return 1===a?u.as1D():u}}),wr=Tn({oneHot_:function(e,t,n,r){if(void 0===n&&(n=1),void 0===r&&(r=0),t<2)throw new Error("Error in oneHot: depth must be >=2, but it is "+t);var o=vn(e,"indices","oneHot","int32"),i=o.shape.concat([t]);return o=o.flatten(),it.runKernelFunc((function(e){return e.oneHot(o,t,n,r)}),{$indices:o},(function(e){return{$indices:function(){return Wn(o.shape,"float32")}}})).reshape(i)}}),xr=Tn({pad_:function(e,t,n){void 0===n&&(n=0);var r=vn(e,"x","pad");if(0===r.rank)throw new Error("pad(scalar) is not defined. Pass non-scalar to pad");var o={paddings:t,constantValue:n};return it.runKernelFunc((function(e){return e.pad(r,t,n)}),{x:r},(function(e){var n=t.map((function(e){return e[0]}));return{x:function(){return e.slice(n,r.shape)}}}),"PadV2",o)}}),Ar=Tn({pad1d_:function(e,t,n){return void 0===n&&(n=0),Z(2===t.length,(function(){return"Invalid number of paddings. Must be length of 2."})),xr(e,[t],n)}}),Er=Tn({pad2d_:function(e,t,n){return void 0===n&&(n=0),Z(2===t.length&&2===t[0].length&&2===t[1].length,(function(){return"Invalid number of paddings. Must be length of 2 each."})),xr(e,t,n)}}),Cr=Tn({pad3d_:function(e,t,n){return void 0===n&&(n=0),Z(3===t.length&&2===t[0].length&&2===t[1].length&&2===t[2].length,(function(){return"Invalid number of paddings. Must be length of 2 each."})),xr(e,t,n)}}),kr=Tn({pad4d_:function(e,t,n){return void 0===n&&(n=0),Z(4===t.length&&2===t[0].length&&2===t[1].length&&2===t[2].length&&2===t[3].length,(function(){return"Invalid number of paddings. Must be length of 2 each."})),xr(e,t,n)}}),Ir=Tn({rand_:function(e,t,n){var r=$(e),o=null;if(null==n||"float32"===n)o=new Float32Array(r);else if("int32"===n)o=new Int32Array(r);else{if("bool"!==n)throw new Error("Unknown data type "+n);o=new Uint8Array(r)}for(var i=0;i<r;i++)o[i]=t();return it.makeTensor(o,e,n)}}),Sr=Tn({randomNormal_:function(e,t,n,r,o){if(void 0===t&&(t=0),void 0===n&&(n=1),null!=r&&"bool"===r)throw new Error("Unsupported data type "+r);for(var i=new sr(t,n,r,!1,o),a=lr(e,r),s=0;s<a.values.length;s++)a.values[s]=i.nextValue();return a.toTensor()}}),jr=Tn({randomGamma_:function(e,t,n,r,o){if(void 0===n&&(n=1),void 0===r&&(r="float32"),null==n&&(n=1),null==r&&(r="float32"),"float32"!==r&&"int32"!==r)throw new Error("Unsupported data type "+r);for(var i=new ur(t,n,r,o),a=lr(e,r),s=0;s<a.values.length;s++)a.values[s]=i.nextValue();return a.toTensor()}}),Tr=Tn({randomUniform_:function(e,t,n,r,o){void 0===t&&(t=0),void 0===n&&(n=1),void 0===r&&(r="float32");for(var i=lr(e,r),a=new cr(t,n,null,o),s=0;s<i.values.length;s++)i.values[s]=a.nextValue();return i.toTensor()}}),Rr=Tn({reshape_:function(e,t){var n=vn(e,"x","reshape",null);t=ae(t,n.size),Z(n.size===$(t),(function(){return"new shape and old shape must have the same number of elements."}));var r={shape:t};return it.runKernelFunc((function(e){return e.reshape(n,t)}),{x:n},(function(e){return{x:function(){return e.reshape(n.shape)}}}),"Reshape",r)}}),Or=Tn({spaceToBatchND_:function(e,t,n){var r=vn(e,"x","spaceToBatchND");return Z(r.rank>=1+t.length,(function(){return"input rank "+r.rank+" should be > than [blockShape] "+t.length})),Z(n.length===t.length,(function(){return"paddings.shape[0] "+n.length+" must be equal to [blockShape] "+t.length})),Z(r.shape.reduce((function(e,r,o){return o>0&&o<=t.length?e&&(r+n[o-1][0]+n[o-1][1])%t[o-1]==0:e}),!0),(function(){return"input spatial dimensions "+r.shape.slice(1)+" with paddings "+n.toString()+" must be divisible by blockShapes "+t.toString()})),it.runKernelFunc((function(e){return e.spaceToBatchND(r,t,n)}),{$x:r},(function(e){return{$x:function(){return e.batchToSpaceND(t,n)}}}))}}),Dr=Tn({squeeze_:function(e,t){var n=vn(e,"x","squeeze");return Rr(n,ue(n.shape,t).newShape)}}),Br=Tn({stack_:function(e,t){void 0===t&&(t=0);var n=yn(e,"tensors","stack");if(Z(n.length>=1,(function(){return"Pass at least one tensor to tf.stack"})),1===n.length)return n[0].expandDims(t);var r=n[0].rank,o=n[0].shape,i=n[0].dtype;Z(t<=r,(function(){return"Axis must be <= rank of the tensor"})),n.forEach((function(e){K(o,e.shape,"All tensors passed to stack must have matching shapes")})),n.forEach((function(e){Z(i===e.dtype,(function(){return"All tensors passed to stack must have matching dtypes"}))}));var a=n.map((function(e){return e.expandDims(t)}));return Hn(a,t)}}),_r=Tn({tile_:function(e,t){var n=vn(e,"x","tile",null);Z(n.rank===t.length,(function(){return"Error in transpose: rank of input "+n.rank+" must match length of reps "+t+"."}));var r=[n],o={reps:t};return it.runKernelFunc((function(e,r){var o=e.tile(n,t);return r([n]),o}),{x:n},(function(e,n){var r=n[0];return{x:function(){var n=Vn(r);if(1===r.rank)for(var o=0;o<t[0];++o)n=n.add(e.slice([o*r.shape[0]],[r.shape[0]]));else if(2===r.rank)for(o=0;o<t[0];++o)for(var i=0;i<t[1];++i)n=n.add(e.slice([o*r.shape[0],i*r.shape[1]],[r.shape[0],r.shape[1]]));else if(3===r.rank)for(o=0;o<t[0];++o)for(i=0;i<t[1];++i)for(var a=0;a<t[2];++a)n=n.add(e.slice([o*r.shape[0],i*r.shape[1],a*r.shape[2]],[r.shape[0],r.shape[1],r.shape[2]]));else{if(4!==r.rank)throw new Error("Gradient for tile operation is not implemented for rank-"+r.rank+" tensors yet.");for(o=0;o<t[0];++o)for(i=0;i<t[1];++i)for(a=0;a<t[2];++a)for(var s=0;s<t[3];++s)n=n.add(e.slice([o*r.shape[0],i*r.shape[1],a*r.shape[2],s*r.shape[3]],[r.shape[0],r.shape[1],r.shape[2],r.shape[3]]))}return n}}}),"Tile",o,r)}}),Nr=Tn({truncatedNormal_:function(e,t,n,r,o){if(void 0===t&&(t=0),void 0===n&&(n=1),null!=r&&"bool"===r)throw new Error("Unsupported data type "+r);for(var i=new sr(t,n,r,!0,o),a=lr(e,r),s=0;s<a.values.length;s++)a.values[s]=i.nextValue();return a.toTensor()}}),Pr=Tn({unstack_:function(e,t){void 0===t&&(t=0),t=t||0;var n=vn(e,"x","unstack");Z(t>=-n.shape.length&&t<n.shape.length,(function(){return"Axis = "+t+" is not in [-"+n.shape.length+", "+n.shape.length+")"})),t<0&&(t+=n.shape.length);var r={axis:t};return it.runKernelFunc((function(e){return e.unstack(n,t)}),{x:n},(function(e){return{x:function(){return Br(e,t)}}}),"Unpack",r)}});function Mr(e,t,n,r){void 0===r&&(r=!0);var o=[];if(r)(o=o.concat(t.slice(0))).push(e[0]/n),o=o.concat(e.slice(1));else{o=o.concat(e[0]);for(var i=t.length,a=0;a<i;++a)o=o.concat([e[a+1]/t[a],t[a]]);o=o.concat(e.slice(i+1))}return o}function Fr(e,t,n){void 0===n&&(n=!0);var r=[];if(n){r.push(t);for(var o=t+1;o<e;++o)o<=2*t?(r.push(o),r.push(o-(t+1))):r.push(o)}else{var i=[],a=[];for(o=1;o<e;++o)o>=2*t+1||o%2==1?a.push(o):i.push(o);r.push.apply(r,i),r.push(0),r.push.apply(r,a)}return r}function Lr(e,t,n,r){void 0===r&&(r=!0);var o=[];r?o.push(e[0]/n):o.push(e[0]*n);for(var i=1;i<e.length;++i)i<=t.length?r?o.push(t[i-1]*e[i]):o.push(e[i]/t[i-1]):o.push(e[i]);return o}function Ur(e,t){for(var n=[0],r=0;r<t;++r)n.push(e[r][0]);return n}function Wr(e,t,n){for(var r=e.slice(0,1),o=0;o<n;++o)r.push(e[o+1]-t[o][0]-t[o][1]);return r}function zr(e,t){if(e.rank<1)throw new Error("tf.gatherND() expects the input to be rank 1 or higher, but the rank was "+e.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("int32"!==t.dtype)throw new Error("tf.gatherND() expects the indices to be int32 type, but the dtype was "+t.dtype+".");if(t.shape[t.rank-1]>e.rank)throw new Error("index innermost dimension length must be <= tensor rank; saw: "+t.shape[t.rank-1]+" vs. "+e.rank);if(0===e.size)throw new Error("Requested more than 0 entries, but input is empty. Input shape: "+e.shape+".");for(var n=t.shape,r=n[n.length-1],o=1,i=0;i<n.length-1;++i)o*=n[i];var a=e.shape,s=n.slice();s.pop();var u=1;for(i=r;i<e.rank;++i)u*=a[i],s.push(a[i]);var c=Ee(e.shape).map((function(e){return e/u})).concat([1]).slice(0,r);return[s,o,u,c]}Object.freeze({prepareAndValidate:zr});function qr(e){return e<=30?e:Ae(e,Math.floor(Math.sqrt(e)))}function Qr(e,t,n){var r=t.rank>1?t.shape[t.rank-1]:1,o=t.rank>1?t.rank-1:1,i="Must have updates.shape = indices.shape[:batchDim] + shape[sliceDim:], got updates.shape: "+n.shape+", indices.shape: "+t.shape+", shape: "+e+", sliceDim: "+r+", and batchDim: "+o+".";if(n.rank<o)throw new Error(i+" update.rank < "+o+". ");if(e.length<r+(n.rank-o))throw new Error(i+" Output shape length < "+(r+(n.rank-o)));if(n.rank!==o+e.length-r)throw new Error(i+" update.rank != "+(o+e.length-r));for(var a=0;a<o;++a)if(n.shape[a]!==t.shape[a])throw new Error(i+" updates.shape["+a+"] ("+n.shape[a]+") != indices.shape["+a+"] ("+t.shape[a]+").");for(a=0;a<n.rank-o;++a)if(n.shape[a+o]!==e[a+r])throw new Error(i+" updates.shape["+(a+o)+"] ("+n.shape[a+o]+") != shape["+(a+o)+"] ("+e[a+o]+")")}function Vr(e,t,n){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(e.rank<1)throw new Error("tf.scatterND() expects the updates to be rank 1 or higher, but the rank was "+e.rank+".");if("int32"!==t.dtype)throw new Error("The dtype of 'indices' should be int32, but got dtype: "+t.dtype);if(n.length<1)throw new Error("Output rank must be greater or equal to 1, but got shape: "+n);if(0===n.length){if(0===t.size)throw new Error("Indices specified for empty output. indices shape: "+t.shape);if(0===e.size)throw new Error("Updates specified for empty output. updates shape: "+e.shape)}Qr(n,t,e)}function Hr(e,t,n){for(var r=t.shape.length,o=r>1?t.shape[r-1]:1,i=n.length,a=1,s=o;s<i;++s)a*=n[s];var u=o<1?1:o;return{sliceRank:o,numUpdates:$(t.shape)/u,sliceSize:a,strides:Ee(n.slice(0,o)).concat([1]),outputSize:$(n)}}Object.freeze({validateUpdateShape:Qr,validateInput:Vr,calculateShapes:Hr});function Gr(e,t,n){Z(e.rank===t.length,(function(){return"Error in slice"+e.rank+"D: Length of begin "+t+" must match the rank of the array ("+e.rank+")."})),Z(e.rank===n.length,(function(){return"Error in slice"+e.rank+"D: Length of size "+n+" must match the rank of the array ("+e.rank+")."}));for(var r=function(r){Z(t[r]+n[r]<=e.shape[r],(function(){return"Error in slice"+e.rank+"D: begin["+r+"] + size["+r+"] ("+(t[r]+n[r])+") would overflow input.shape["+r+"] ("+e.shape[r]+")"}))},o=0;o<e.rank;++o)r(o)}function Xr(e){for(var t=[],n=0;e>0;)1&e&&t.push(n),e/=2,n++;return t}function Zr(e,t,n){for(var r=[],o=0;o<e.length;o++)r[o]=Math.ceil((t[o]-e[o])/n[o]);return r}function Kr(e,t,n,r,o){var i=t[o],a=n[o]||1;(e&1<<o||null==i)&&(i=a>0?Number.MIN_SAFE_INTEGER:Number.MAX_SAFE_INTEGER);var s=r[o];return i<0&&(i+=s),H(0,i,s-1)}function Jr(e,t,n,r,o){var i=t[o],a=n[o]||1;(e&1<<o||null==i)&&(i=a>0?Number.MAX_SAFE_INTEGER:Number.MIN_SAFE_INTEGER);var s=r[o];return i<0&&(i+=s),a>0?H(0,i,s):H(-1,i,s-1)}function Yr(e,t,n){for(var r=n.length,o=0;o<n.length;o++)if(n[o]>1){r=o;break}for(o=r+1;o<n.length;o++)if(t[o]>0||n[o]!==e[o])return!1;return!0}function $r(e,t){for(var n=e.length>0?e[e.length-1]:1,r=0;r<e.length-1;r++)n+=e[r]*t[r];return n}Object.freeze({assertParamsValid:Gr,maskToAxes:Xr,computeOutShape:Zr,startForAxis:Kr,stopForAxis:Jr,isSliceContinous:Yr,computeFlatOffset:$r});function eo(e){return it.customGrad(e)}var to=Tn({softmax_:function(e,t){void 0===t&&(t=-1);var n=vn(e,"logits","softmax","float32");if(-1===t&&(t=n.rank-1),t!==n.rank-1)throw Error("Softmax along a non-last dimension is not yet supported. Logits was rank "+n.rank+" and dim was "+t);return it.runKernelFunc((function(e,r){var o=e.softmax(n,t);return r([o]),o}),{logits:n},(function(e,n){var r=n[0],o=e.mul(r);return{logits:function(){return o.sub(o.sum([t],!0).mul(r))}}}),"Softmax",{dim:t},[],[!0])}}),no=Tn({logSoftmax_:function(e,t){void 0===t&&(t=-1);var n=vn(e,"logits","logSoftmax");if(-1===t&&(t=n.rank-1),t!==n.rank-1)throw Error("Log Softmax along a non-last dimension is not yet supported. Logits was rank "+n.rank+" and axis was "+t);return eo((function(e,n){var r=e.max(t,!0),o=e.sub(r),i=o.toFloat().sub(o.exp().sum(t,!0).log());return n([i]),{value:i,gradFunc:function(e,n){var r=n[0].exp();return e.sub(e.sum(t,!0).mul(r))}}}))(n)}}),ro=function(){function e(e,t){this.backend=e,this.dataMover=t,this.data=new WeakMap,this.dataIdsCount=0}return e.prototype.get=function(e){return this.data.has(e)||this.dataMover.moveData(this.backend,e),this.data.get(e)},e.prototype.set=function(e,t){this.dataIdsCount++,this.data.set(e,t)},e.prototype.has=function(e){return this.data.has(e)},e.prototype.delete=function(e){return this.dataIdsCount--,this.data.delete(e)},e.prototype.numDataIds=function(){return this.dataIdsCount},e}(),oo=function(){function e(){}return e.prototype.time=function(e){return io("time")},e.prototype.read=function(e){return io("read")},e.prototype.readSync=function(e){return io("readSync")},e.prototype.numDataIds=function(){return io("numDataIds")},e.prototype.disposeData=function(e){return io("disposeData")},e.prototype.write=function(e,t,n){return io("write")},e.prototype.move=function(e,t,n,r){return io("move")},e.prototype.memory=function(){return io("memory")},e.prototype.floatPrecision=function(){return io("floatPrecision")},e.prototype.epsilon=function(){return 32===this.floatPrecision()?1e-7:1e-4},e.prototype.batchMatMul=function(e,t,n,r){return io("batchMatMul")},e.prototype.fusedBatchMatMul=function(e){return e.a,e.b,e.transposeA,e.transposeB,e.bias,e.activation,e.preluActivationWeights,io("fusedBatchMatMul")},e.prototype.slice=function(e,t,n){return io("slice")},e.prototype.stridedSlice=function(e,t,n,r){return io("stridedSlice")},e.prototype.unstack=function(e,t){return io("unstack")},e.prototype.reverse=function(e,t){return io("reverse")},e.prototype.concat=function(e,t){return io("concat")},e.prototype.neg=function(e){return io("neg")},e.prototype.add=function(e,t){return io("add")},e.prototype.addN=function(e){return io("addN")},e.prototype.subtract=function(e,t){return io("subtract")},e.prototype.multiply=function(e,t){return io("multiply")},e.prototype.realDivide=function(e,t){return io("realDivide")},e.prototype.floorDiv=function(e,t){return io("floorDiv")},e.prototype.sum=function(e,t){return io("sum")},e.prototype.prod=function(e,t){return io("prod")},e.prototype.unsortedSegmentSum=function(e,t,n){return io("unsortedSegmentSum")},e.prototype.argMin=function(e,t){return io("argMin")},e.prototype.argMax=function(e,t){return io("argMax")},e.prototype.equal=function(e,t){return io("equal")},e.prototype.notEqual=function(e,t){return io("notEqual")},e.prototype.less=function(e,t){return io("less")},e.prototype.lessEqual=function(e,t){return io("lessEqual")},e.prototype.greater=function(e,t){return io("greater")},e.prototype.greaterEqual=function(e,t){return io("greaterEqual")},e.prototype.logicalNot=function(e){return io("logicalNot")},e.prototype.logicalAnd=function(e,t){return io("logicalAnd")},e.prototype.logicalOr=function(e,t){return io("logicalOr")},e.prototype.where=function(e){return io("where")},e.prototype.select=function(e,t,n){return io("select")},e.prototype.topk=function(e,t,n){return io("topk")},e.prototype.min=function(e,t){return io("min")},e.prototype.minimum=function(e,t){return io("minimum")},e.prototype.mod=function(e,t){return io("mod")},e.prototype.max=function(e,t){return io("max")},e.prototype.maximum=function(e,t){return io("maximum")},e.prototype.all=function(e,t){return io("all")},e.prototype.any=function(e,t){return io("any")},e.prototype.squaredDifference=function(e,t){return io("squaredDifference")},e.prototype.ceil=function(e){return io("ceil")},e.prototype.floor=function(e){return io("floor")},e.prototype.round=function(e){return io("round")},e.prototype.sign=function(e){return io("sign")},e.prototype.isNaN=function(e){return io("isNaN")},e.prototype.isInf=function(e){return io("isInf")},e.prototype.isFinite=function(e){return io("isFinite")},e.prototype.pow=function(e,t){return io("pow")},e.prototype.exp=function(e){return io("exp")},e.prototype.expm1=function(e){return io("expm1")},e.prototype.softmax=function(e,t){return io("softmax")},e.prototype.log=function(e){return io("log")},e.prototype.log1p=function(e){return io("log1p")},e.prototype.sqrt=function(e){return io("sqrt")},e.prototype.rsqrt=function(e){return io("rsqrt")},e.prototype.square=function(e){return io("square")},e.prototype.reciprocal=function(e){return io("reciprocal")},e.prototype.relu=function(e){return io("relu")},e.prototype.relu6=function(e){return io("relu6")},e.prototype.prelu=function(e,t){return io("prelu")},e.prototype.elu=function(e){return io("elu")},e.prototype.eluDer=function(e,t){return io("eluDer")},e.prototype.selu=function(e){return io("selu")},e.prototype.int=function(e){return io("int")},e.prototype.clip=function(e,t,n){return io("clip")},e.prototype.abs=function(e){return io("abs")},e.prototype.complexAbs=function(e){return io("complexAbs")},e.prototype.sigmoid=function(e){return io("sigmoid")},e.prototype.softplus=function(e){return io("softplus")},e.prototype.sin=function(e){return io("sin")},e.prototype.cos=function(e){return io("cos")},e.prototype.tan=function(e){return io("tan")},e.prototype.asin=function(e){return io("asin")},e.prototype.acos=function(e){return io("acos")},e.prototype.atan=function(e){return io("atan")},e.prototype.atan2=function(e,t){return io("atan2")},e.prototype.sinh=function(e){return io("sinh")},e.prototype.cosh=function(e){return io("cosh")},e.prototype.tanh=function(e){return io("tanh")},e.prototype.asinh=function(e){return io("asinh")},e.prototype.acosh=function(e){return io("acosh")},e.prototype.atanh=function(e){return io("atanh")},e.prototype.erf=function(e){return io("erf")},e.prototype.step=function(e,t){return io("step")},e.prototype.fusedConv2d=function(e){return e.input,e.filter,e.convInfo,e.bias,e.activation,e.preluActivationWeights,io("fusedConv2d")},e.prototype.conv2d=function(e,t,n){return io("conv2d")},e.prototype.conv2dDerInput=function(e,t,n){return io("conv2dDerInput")},e.prototype.conv2dDerFilter=function(e,t,n){return io("conv2dDerFilter")},e.prototype.fusedDepthwiseConv2D=function(e){return e.input,e.filter,e.convInfo,e.bias,e.activation,e.preluActivationWeights,io("fusedDepthwiseConv2D")},e.prototype.depthwiseConv2D=function(e,t,n){return io("depthwiseConv2D")},e.prototype.depthwiseConv2DDerInput=function(e,t,n){return io("depthwiseConv2DDerInput")},e.prototype.depthwiseConv2DDerFilter=function(e,t,n){return io("depthwiseConv2DDerFilter")},e.prototype.conv3d=function(e,t,n){return io("conv3d")},e.prototype.conv3dDerInput=function(e,t,n){return io("conv3dDerInput")},e.prototype.conv3dDerFilter=function(e,t,n){return io("conv3dDerFilter")},e.prototype.maxPool=function(e,t){return io("maxPool")},e.prototype.maxPoolBackprop=function(e,t,n,r){return io("maxPoolBackprop")},e.prototype.avgPool=function(e,t){return io("avgPool")},e.prototype.avgPoolBackprop=function(e,t,n){return io("avgPoolBackprop")},e.prototype.avgPool3d=function(e,t){return io("avgPool3d")},e.prototype.avgPool3dBackprop=function(e,t,n){return io("avgPool3dBackprop")},e.prototype.maxPool3d=function(e,t){return io("maxPool3d")},e.prototype.maxPool3dBackprop=function(e,t,n,r){return io("maxPool3dBackprop")},e.prototype.reshape=function(e,t){return io("reshape")},e.prototype.cast=function(e,t){return io("cast")},e.prototype.tile=function(e,t){return io("tile")},e.prototype.pad=function(e,t,n){return io("pad")},e.prototype.transpose=function(e,t){return io("transpose")},e.prototype.gather=function(e,t,n){return io("gather")},e.prototype.gatherND=function(e,t){return io("gatherND")},e.prototype.scatterND=function(e,t,n){return io("scatterND")},e.prototype.batchToSpaceND=function(e,t,n){return io("batchToSpaceND")},e.prototype.spaceToBatchND=function(e,t,n){return io("spaceToBatchND")},e.prototype.resizeBilinear=function(e,t,n,r){return io("resizeBilinear")},e.prototype.resizeBilinearBackprop=function(e,t,n){return io("resizeBilinearBackprop")},e.prototype.resizeNearestNeighbor=function(e,t,n,r){return io("resizeNearestNeighbor")},e.prototype.resizeNearestNeighborBackprop=function(e,t,n){return io("resizeNearestNeighborBackprop")},e.prototype.batchNormalization=function(e,t,n,r,o,i){return io("batchNormalization")},e.prototype.localResponseNormalization4D=function(e,t,n,r,o){return io("localResponseNormalization4D")},e.prototype.LRNGrad=function(e,t,n,r,o,i,a){return io("LRNGrad")},e.prototype.multinomial=function(e,t,n,r){return io("multinomial")},e.prototype.oneHot=function(e,t,n,r){return io("oneHot")},e.prototype.cumsum=function(e,t,n,r){return io("cumsum")},e.prototype.nonMaxSuppression=function(e,t,n,r,o){return io("nonMaxSuppression")},e.prototype.fft=function(e){return io("fft")},e.prototype.ifft=function(e){return io("ifft")},e.prototype.complex=function(e,t){return io("complex")},e.prototype.real=function(e){return io("real")},e.prototype.imag=function(e){return io("imag")},e.prototype.cropAndResize=function(e,t,n,r,o,i){return io("cropAndResize")},e.prototype.depthToSpace=function(e,t,n){return io("depthToSpace")},e.prototype.split=function(e,t,n){return io("split")},e.prototype.sparseToDense=function(e,t,n,r){return io("sparseToDense")},e.prototype.diag=function(e){return io("diag")},e.prototype.fill=function(e,t,n){return io("fill")},e.prototype.onesLike=function(e){return io("onesLike")},e.prototype.zerosLike=function(e){return io("zerosLike")},e.prototype.linspace=function(e,t,n){return io("linspace")},e.prototype.dispose=function(){return io("dispose")},e}();function io(e){throw new Error("'"+e+"' not yet implemented or not found in the registry. Did you forget to import the kernel?")}function ao(e,t){for(var n=e.length,r=[],o=0;o<n;o++){var i=n-1-o,a=e[i]||1;(t[t.length-1-o]||1)>1&&1===a&&r.unshift(i)}return r}function so(e,t){for(var n=[],r=0;r<t.length;r++){var o=e[e.length-r-1],i=t.length-r-1,a=t[i];(null==o||1===o&&a>1)&&n.unshift(i)}return n}function uo(e,t){for(var n=[],r=Math.max(e.length,t.length),o=0;o<r;o++){var i=e[e.length-o-1];null==i&&(i=1);var a=t[t.length-o-1];if(null==a&&(a=1),1===i)n.unshift(a);else if(1===a)n.unshift(i);else{if(i!==a)throw Error("Operands could not be broadcast together with shapes "+e+" and "+t+".");n.unshift(i)}}return n}function co(e,t,n,r,o,i,a){void 0===a&&(a="channelsLast");var s,u=mo(t),c=u[0],l=u[1];if("channelsLast"===a)s=[c,l,e[3],e[3]];else{if("channelsFirst"!==a)throw new Error("Unknown dataFormat "+a);s=[c,l,e[1],e[1]]}return fo(e,s,n,r,o,i,!1,a)}function lo(e,t,n,r,o,i,a){void 0===a&&(a="NDHWC");var s,u,c=go(t),l=c[0],f=c[1],p=c[2];if("NDHWC"===a)u="channelsLast",s=[l,f,p,e[4],e[4]];else{if("NCDHW"!==a)throw new Error("Unknown dataFormat "+a);u="channelsFirst",s=[l,f,p,e[1],e[1]]}return po(e,s,n,r,o,!1,u,i)}function fo(e,t,n,r,o,i,a,s){void 0===a&&(a=!1),void 0===s&&(s="channelsLast");var u=[-1,-1,-1,-1],c=u[0],l=u[1],f=u[2],p=u[3];if("channelsLast"===s)c=e[0],l=e[1],f=e[2],p=e[3];else{if("channelsFirst"!==s)throw new Error("Unknown dataFormat "+s);c=e[0],p=e[1],l=e[2],f=e[3]}var h,d=t[0],m=t[1],g=t[3],v=mo(n),y=v[0],b=v[1],w=mo(r),x=w[0],A=w[1],E=vo(d,x),C=vo(m,A),k=function(e,t,n,r,o,i,a,s){var u,c,l;if("number"==typeof e){u={top:e,bottom:e,left:e,right:e,type:0===e?"VALID":"NUMBER"};var f=function(e,t,n,r,o){null==r&&(r=ho(e,t,n));var i=e[1],a=yo((e[0]-t+2*r)/n+1,o);Z(te(a),(function(){return"The output # of rows ("+a+") must be an integer. Change the stride and/or zero pad parameters"}));var s=yo((i-t+2*r)/n+1,o);return Z(te(s),(function(){return"The output # of columns ("+s+") must be an integer. Change the stride and/or zero pad parameters"})),[a,s]}([t,n],i,r,e,s);c=f[0],l=f[1]}else if("same"===e){c=Math.ceil(t/r),l=Math.ceil(n/o);var p=Math.max(0,(c-1)*r+i-t),h=Math.max(0,(l-1)*o+a-n),d=Math.floor(p/2),m=p-d,g=Math.floor(h/2);u={top:d,bottom:m,left:g,right:h-g,type:"SAME"}}else{if("valid"!==e)throw Error("Unknown padding parameter: "+e);u={top:0,bottom:0,left:0,right:0,type:"VALID"},c=Math.ceil((t-i+1)/r),l=Math.ceil((n-a+1)/o)}return{padInfo:u,outHeight:c,outWidth:l}}(o,l,f,y,b,E,C,i),I=k.padInfo,S=k.outHeight,j=k.outWidth,T=a?g*p:g;return"channelsFirst"===s?h=[c,T,S,j]:"channelsLast"===s&&(h=[c,S,j,T]),{batchSize:c,dataFormat:s,inHeight:l,inWidth:f,inChannels:p,outHeight:S,outWidth:j,outChannels:T,padInfo:I,strideHeight:y,strideWidth:b,filterHeight:d,filterWidth:m,effectiveFilterHeight:E,effectiveFilterWidth:C,dilationHeight:x,dilationWidth:A,inShape:e,outShape:h,filterShape:t}}function po(e,t,n,r,o,i,a,s){void 0===i&&(i=!1),void 0===a&&(a="channelsLast");var u=[-1,-1,-1,-1,-1],c=u[0],l=u[1],f=u[2],p=u[3],h=u[4];if("channelsLast"===a)c=e[0],l=e[1],f=e[2],p=e[3],h=e[4];else{if("channelsFirst"!==a)throw new Error("Unknown dataFormat "+a);c=e[0],h=e[1],l=e[2],f=e[3],p=e[4]}var d,m=t[0],g=t[1],v=t[2],y=t[4],b=go(n),w=b[0],x=b[1],A=b[2],E=go(r),C=E[0],k=E[1],I=E[2],S=vo(m,C),j=vo(g,k),T=vo(v,I),R=function(e,t,n,r,o,i,a,s,u,c,l){var f,p,h,d;if("number"==typeof e){f={top:e,bottom:e,left:e,right:e,front:e,back:e,type:0===e?"VALID":"NUMBER"};var m=function(e,t,n,r,o,i){null==o&&(o=ho(e,t,r));var a=e[1],s=e[2],u=yo((e[0]-t+2*o)/r+1,i);Z(te(u),(function(){return"The output # of depths ("+u+") must be an integer. Change the stride and/or zero pad parameters"}));var c=yo((a-t+2*o)/r+1,i);Z(te(c),(function(){return"The output # of rows ("+c+") must be an integer. Change the stride and/or zero pad parameters"}));var l=yo((s-t+2*o)/r+1,i);return Z(te(l),(function(){return"The output # of columns ("+l+") must be an integer. Change the stride and/or zero pad parameters"})),[u,c,l,1]}([t,n,r,1],s,0,o,e,l);p=m[0],h=m[1],d=m[2]}else if("same"===e){var g=((p=Math.ceil(t/o))-1)*o+s-t,v=((h=Math.ceil(n/i))-1)*i+u-n,y=((d=Math.ceil(r/a))-1)*a+c-r,b=Math.floor(g/2),w=g-b,x=Math.floor(v/2),A=v-x,E=Math.floor(y/2);f={top:x,bottom:A,left:E,right:y-E,front:b,back:w,type:"SAME"}}else{if("valid"!==e)throw Error("Unknown padding parameter: "+e);f={top:0,bottom:0,left:0,right:0,front:0,back:0,type:"VALID"},p=Math.ceil((t-s+1)/o),h=Math.ceil((n-u+1)/i),d=Math.ceil((r-c+1)/a)}return{padInfo:f,outDepth:p,outHeight:h,outWidth:d}}(o,l,f,p,w,x,A,S,j,T,s),O=R.padInfo,D=R.outDepth,B=R.outHeight,_=R.outWidth,N=i?y*h:y;return"channelsFirst"===a?d=[c,N,D,B,_]:"channelsLast"===a&&(d=[c,D,B,_,N]),{batchSize:c,dataFormat:a,inDepth:l,inHeight:f,inWidth:p,inChannels:h,outDepth:D,outHeight:B,outWidth:_,outChannels:N,padInfo:O,strideDepth:w,strideHeight:x,strideWidth:A,filterDepth:m,filterHeight:g,filterWidth:v,effectiveFilterDepth:S,effectiveFilterHeight:j,effectiveFilterWidth:T,dilationDepth:C,dilationHeight:k,dilationWidth:I,inShape:e,outShape:d,filterShape:t}}function ho(e,t,n,r){void 0===r&&(r=1);var o=vo(t,r);return Math.floor((e[0]*(n-1)-n+o)/2)}function mo(e){return"number"==typeof e?[e,e,e]:2===e.length?[e[0],e[1],1]:e}function go(e){return"number"==typeof e?[e,e,e]:e}function vo(e,t){return t<=1?e:e+(e-1)*(t-1)}function yo(e,t){if(!t)return e;switch(t){case"round":return Math.round(e);case"ceil":return Math.ceil(e);case"floor":return Math.floor(e);default:throw new Error("Unknown roundingMode "+t)}}function bo(e){var t=mo(e),n=t[0],r=t[1],o=t[2];return 1===n&&1===r&&1===o}function wo(e,t){return bo(e)||bo(t)}function xo(e){if("NHWC"===e)return"channelsLast";if("NCHW"===e)return"channelsFirst";throw new Error("Unknown dataFormat "+e)}function Ao(e,t,n){if("complex64"===t){if("complex64"===e.dtype)return e.clone();var r=Wn(e.shape),o=e.toFloat(),i=n.complex(o,r);return r.dispose(),o.dispose(),i}if(!he(e.dtype,t))return it.makeTensorFromDataId(e.dataId,e.shape,t);if("complex64"===e.dtype){var a=n.real(e);return i=a.cast(t),a.dispose(),i}if("int32"===t)return n.int(e);if("bool"===t){var s=Nn(0,e.dtype);return i=n.notEqual(e,s),s.dispose(),i}throw new Error("Error in Cast: failed to cast "+e.dtype+" to "+t)}function Eo(e,t){return it.makeTensorFromDataId(e.dataId,t,e.dtype)}function Co(e,t,n){var r=(t-e)/(n-1),o=Se(n,"float32");o[0]=e;for(var i=1;i<o.length;i++)o[i]=o[i-1]+r;return Pn(o,"float32")}Object.freeze({castTensor:Ao,reshapeTensor:Eo,linspaceImpl:Co,upcastType:Je,axesAreInnerMostDims:bn,combineLocations:wn,computeOutAndReduceShapes:xn,expandShapeToKeepDim:An,assertAxesAreInnerMostDims:En,getAxesPermutation:Cn,getUndoAxesPermutation:kn,getInnerMostAxes:In,getBroadcastDims:ao,getReductionAxes:so,assertAndGetBroadcastShape:uo,assertParamsConsistent:Sn,computeOutShape:jn,computePool2DInfo:co,computePool3DInfo:lo,computeConv2DInfo:fo,computeConv3DInfo:po,computeDefaultPad:ho,tupleValuesAreOne:bo,eitherStridesOrDilationsAreOne:wo,convertConv2DDataFormat:xo,PARALLELIZE_THRESHOLD:30,computeOptimalWindowSize:qr});function ko(e,t){if(e.length!==t.length)throw new Error("Cannot merge real and imag arrays of different lengths. real:"+e.length+", imag: "+t.length+".");for(var n=new Float32Array(2*e.length),r=0;r<n.length;r+=2)n[r]=e[r/2],n[r+1]=t[r/2];return n}function Io(e,t){return{real:e[2*t],imag:e[2*t+1]}}function So(e,t,n,r){e[2*r]=t,e[2*r+1]=n}function jo(e,t,n){var r=(n?2:-2)*Math.PI*(e/t);return{real:Math.cos(r),imag:Math.sin(r)}}function To(e,t,n){var r=function(e,t,n){return function(e,t,n){for(var r=0,o=e.length,i=0,a=!1;r<o;){var s=n(t,e[i=r+(o-r>>>1)]);s>0?r=i+1:(o=i,a=!s)}return a?r:-r-1}(e,t,n||Ro)}(e,t,n),o=r<0?-(r+1):r;e.splice(o,0,t)}function Ro(e,t){return e>t?1:e<t?-1:0}function Oo(e,t,n,r,o){return Bo(e,t,n,r,o,0).selectedIndices}function Do(e,t,n,r,o,i){var a=Bo(e,t,n,r,o,i,!0);return a.numValidOutputs.dispose(),{selectedIndices:a.selectedIndices,selectedScores:a.selectedScores}}function Bo(e,t,n,r,o,i,a,s){void 0===a&&(a=!1),void 0===s&&(s=!1);for(var u=Array.from(t).map((function(e,t){return{score:e,boxIndex:t,suppressBeginIndex:0}})).filter((function(e){return e.score>o})).sort(Po),c=i>0?-.5/i:0,l=[],f=[];l.length<n&&u.length>0;){var p=u.pop(),h=p.score,d=p.boxIndex,m=p.suppressBeginIndex;if(h<o)break;for(var g=!1,v=l.length-1;v>=m;--v){var y=_o(e,d,l[v]);if(y>=r){g=!0;break}if(p.score=p.score*No(r,c,y),p.score<=o)break}p.suppressBeginIndex=l.length,g||(p.score===h?(l.push(d),f.push(p.score)):p.score>o&&To(u,p,Po))}var b=l.length;return s&&(l.fill(0,b),f.fill(0,b)),{selectedIndices:Pn(l,"int32"),selectedScores:Pn(f,"float32"),numValidOutputs:Nn(b,"int32")}}function _o(e,t,n){var r=e.subarray(4*t,4*t+4),o=e.subarray(4*n,4*n+4),i=Math.min(r[0],r[2]),a=Math.min(r[1],r[3]),s=Math.max(r[0],r[2]),u=Math.max(r[1],r[3]),c=Math.min(o[0],o[2]),l=Math.min(o[1],o[3]),f=Math.max(o[0],o[2]),p=Math.max(o[1],o[3]),h=(s-i)*(u-a),d=(f-c)*(p-l);if(h<=0||d<=0)return 0;var m=Math.max(i,c),g=Math.max(a,l),v=Math.min(s,f),y=Math.min(u,p),b=Math.max(v-m,0)*Math.max(y-g,0);return b/(h+d-b)}function No(e,t,n){var r=Math.exp(t*n*n);return n<=e?r:0}function Po(e,t){return e.score-t.score||e.score===t.score&&t.boxIndex-e.boxIndex}function Mo(e,t,n){var r=new Array(e.rank).fill(0),o=e.shape.slice();return t.map((function(t){o[n]=t;var i=e.slice(r,o);return r[n]+=t,i}))}function Fo(e,t){for(var n=new Array(e.rank),r=0;r<n.length;r++)n[r]=e.shape[r]*t[r];var o=lr(n,e.dtype);for(r=0;r<o.values.length;++r){for(var i=o.indexToLoc(r),a=new Array(e.rank),s=0;s<a.length;s++)a[s]=i[s]%e.shape[s];var u=e.locToIndex(a);o.values[r]=e.values[u]}return o.toTensor()}function Lo(e,t,n,r,o){for(var i=t[t.length-1],a=[e.length/i,i],s=a[0],u=a[1],c=ce(n,s*r),l=ce("int32",s*r),f=0;f<s;f++){for(var p=f*u,h=e.subarray(p,p+u),d=[],m=0;m<h.length;m++)d.push({value:h[m],index:m});d.sort((function(e,t){return t.value-e.value}));var g=f*r,v=c.subarray(g,g+r),y=l.subarray(g,g+r);for(m=0;m<r;m++)v[m]=d[m].value,y[m]=d[m].index}var b=t.slice();return b[b.length-1]=r,[Bn(c,b,n),Bn(l,b,"int32")]}function Uo(e,t){for(var n=[],r=0;r<t.length;r++)t[r]&&n.push(r);var o=lr(e,"int32"),i=lr([n.length,e.length],"int32");for(r=0;r<n.length;r++){var a=o.indexToLoc(n[r]),s=r*e.length;i.values.set(a,s)}return i.toTensor()}var Wo=function(e,t){this.outputShape=[],this.outputShape=e,this.variableNames=t.map((function(e,t){return"T"+t}));var n=[];this.variableNames.forEach((function(e){n.push("float v"+e+" = get"+e+"AtOutCoords();")}));var r=this.variableNames.map((function(e){return"v"+e})).join(" + ");this.userCode="\n void main() {\n "+n.join("\n ")+"\n\n float result = "+r+";\n setOutput(result);\n }\n "},zo=function(e,t){this.outputShape=[],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=e,this.variableNames=t.map((function(e,t){return"T"+t}));var n=[];this.variableNames.forEach((function(e){n.push("vec4 v"+e+" = get"+e+"AtOutCoords();")}));var r=this.variableNames.map((function(e){return"v"+e})).join(" + ");this.userCode="\n void main() {\n "+n.join("\n ")+"\n\n vec4 result = "+r+";\n setOutput(result);\n }\n "},qo=function(e,t,n){this.variableNames=["A"];var r=e.windowSize,o=e.batchSize,i=e.inSize,a=Math.ceil(i/r);n||this.variableNames.push("bestIndicesA"),this.outputShape=[o,a];var s="max"===t?">":"<",u=n?"inOffset + i;":"round(getBestIndicesA(batch, inOffset + i));";this.userCode="\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int outIdx = coords[1];\n int inOffset = outIdx * "+r+";\n\n int bestIndex = inOffset;\n float bestValue = getA(batch, bestIndex);\n\n for (int i = 0; i < "+r+"; i++) {\n int inIdx = "+u+";\n float candidate = getA(batch, inIdx);\n if (candidate "+s+" bestValue) {\n bestValue = candidate;\n bestIndex = inIdx;\n }\n }\n setOutput(float(bestIndex));\n }\n "};function Qo(e,t){return["x","y","z","w","u","v"].slice(0,t).map((function(t){return e+"."+t}))}function Vo(e,t){return 1===t?[e]:Qo(e,t)}function Ho(){var e,t,n,r,o,i,a,s,u,c;return 2===P().getNumber("WEBGL_VERSION")?(e="#version 300 es",t="in",n="out",r="in",o="texture",i="outputColor",a="out vec4 outputColor;",s="\n bool isnan_custom(float val) {\n return (val > 0.0 || val < 0.0) ? false : val != 0.0;\n }\n\n bvec4 isnan_custom(vec4 val) {\n return bvec4(isnan_custom(val.x),\n isnan_custom(val.y), isnan_custom(val.z), isnan_custom(val.w));\n }\n\n #define isnan(value) isnan_custom(value)\n ",u="",c="\n #define round(value) newRound(value)\n int newRound(float value) {\n return int(floor(value + 0.5));\n }\n\n ivec4 newRound(vec4 value) {\n return ivec4(floor(value + vec4(0.5)));\n }\n "):(e="",t="attribute",n="varying",r="varying",o="texture2D",i="gl_FragColor",a="",s="\n #define isnan(value) isnan_custom(value)\n bool isnan_custom(float val) {\n return (val > 0. || val < 1. || val == 0.) ? false : true;\n }\n bvec4 isnan_custom(vec4 val) {\n return bvec4(isnan(val.x), isnan(val.y), isnan(val.z), isnan(val.w));\n }\n ",u="\n uniform float INFINITY;\n\n bool isinf(float val) {\n return abs(val) == INFINITY;\n }\n bvec4 isinf(vec4 val) {\n return equal(abs(val), vec4(INFINITY));\n }\n ",c="\n int round(float value) {\n return int(floor(value + 0.5));\n }\n\n ivec4 round(vec4 value) {\n return ivec4(floor(value + vec4(0.5)));\n }\n "),{version:e,attribute:t,varyingVs:n,varyingFs:r,texture2D:o,output:i,defineOutput:a,defineSpecialNaN:s,defineSpecialInf:u,defineRound:c}}function Go(e,t,n){void 0===n&&(n="index");var r=Ee(t);return r.map((function(t,o){return"int "+e[o]+" = "+n+" / "+t+"; "+(o===r.length-1?"int "+e[o+1]+" = "+n+" - "+e[o]+" * "+t:"index -= "+e[o]+" * "+t)+";"})).join("")}function Xo(e){var t=Ee(e).map((function(e){return e.toString()}));return"\n int getFlatIndex(ivec3 coords) {\n return coords.x * "+t[0]+" + coords.y * "+t[1]+" + coords.z;\n }\n"}var Zo="\n const float FLOAT_MAX = 1.70141184e38;\n const float FLOAT_MIN = 1.17549435e-38;\n\n lowp vec4 encode_float(highp float v) {\n if (isnan(v)) {\n return vec4(255, 255, 255, 255);\n }\n\n highp float av = abs(v);\n\n if(av < FLOAT_MIN) {\n return vec4(0.0, 0.0, 0.0, 0.0);\n } else if(v > FLOAT_MAX) {\n return vec4(0.0, 0.0, 128.0, 127.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(0.0, 0.0, 128.0, 255.0) / 255.0;\n }\n\n highp vec4 c = vec4(0,0,0,0);\n\n highp float e = floor(log2(av));\n highp float m = exp2(fract(log2(av))) - 1.0;\n\n c[2] = floor(128.0 * m);\n m -= c[2] / 128.0;\n c[1] = floor(32768.0 * m);\n m -= c[1] / 32768.0;\n c[0] = floor(8388608.0 * m);\n\n highp float ebias = e + 127.0;\n c[3] = floor(ebias / 2.0);\n ebias -= c[3] * 2.0;\n c[2] += floor(ebias) * 128.0;\n\n c[3] += 128.0 * step(0.0, -v);\n\n return c / 255.0;\n }\n";function Ko(e,t,n,r){var o=[];e.forEach((function(e){var t=$(e.shapeInfo.logicalShape);e.shapeInfo.isUniform?o.push("uniform float "+e.name+(t>1?"["+t+"]":"")+";"):(o.push("uniform sampler2D "+e.name+";"),o.push("uniform int offset"+e.name+";"))}));var i,a,s=o.join("\n"),u=e.map((function(e){return function(e,t,n){void 0===n&&(n=!1);var r="";r+=n?Yo(e):Jo(e);var o=e.shapeInfo.logicalShape,i=t.logicalShape;return o.length<=i.length&&(r+=n?function(e,t){var n,r=e.name,o=r.charAt(0).toUpperCase()+r.slice(1),i="get"+o+"AtOutCoords",a=e.shapeInfo.logicalShape.length,s=t.logicalShape.length,u=ao(e.shapeInfo.logicalShape,t.logicalShape),c=ii(s),l=s-a,f=["x","y","z","w","u","v"];n=0===a?"":s<2&&u.length>=1?"coords = 0;":u.map((function(e){return"coords."+f[e+l]+" = 0;"})).join("\n");var p;p=s<2&&a>0?"coords":e.shapeInfo.logicalShape.map((function(e,t){return"coords."+f[t+l]})).join(", ");var h="return outputValue;",d=1===$(e.shapeInfo.logicalShape),m=1===$(t.logicalShape);if(1!==a||d||m){if(d&&!m)h=1===s?"\n return vec4(outputValue.x, outputValue.x, 0., 0.);\n ":"\n return vec4(outputValue.x);\n ";else if(u.length){var g=a-2,v=a-1;u.indexOf(g)>-1&&u.indexOf(v)>-1?h="return vec4(outputValue.x);":u.indexOf(g)>-1?h="return vec4(outputValue.x, outputValue.y, outputValue.x, outputValue.y);":u.indexOf(v)>-1&&(h="return vec4(outputValue.xx, outputValue.zz);")}}else h="\n return vec4(outputValue.xy, outputValue.xy);\n ";return"\n vec4 "+i+"() {\n "+c+" coords = getOutputCoords();\n "+n+"\n vec4 outputValue = get"+o+"("+p+");\n "+h+"\n }\n "}(e,t):function(e,t){var n=e.name,r=n.charAt(0).toUpperCase()+n.slice(1),o="get"+r+"AtOutCoords",i=t.texShape,a=e.shapeInfo.texShape,s=e.shapeInfo.logicalShape.length,u=t.logicalShape.length;if(!e.shapeInfo.isUniform&&s===u&&null==e.shapeInfo.flatOffset&&ee(a,i))return"\n float "+o+"() {\n return sampleTexture("+n+", resultUV);\n }\n ";var c,l=ii(u),f=ao(e.shapeInfo.logicalShape,t.logicalShape),p=u-s,h=["x","y","z","w","u","v"];c=0===s?"":u<2&&f.length>=1?"coords = 0;":f.map((function(e){return"coords."+h[e+p]+" = 0;"})).join("\n");var d;return d=u<2&&s>0?"coords":e.shapeInfo.logicalShape.map((function(e,t){return"coords."+h[t+p]})).join(", "),"\n float "+o+"() {\n "+l+" coords = getOutputCoords();\n "+c+"\n return get"+r+"("+d+");\n }\n "}(e,t)),r}(e,t,r)})).join("\n"),c=t.texShape,l=Ho(),f=function(e){return"\n float sampleTexture(sampler2D textureSampler, vec2 uv) {\n return "+e.texture2D+"(textureSampler, uv).r;\n }\n "}(l),p=function(e){return e.version+"\n precision highp float;\n precision highp int;\n precision highp sampler2D;\n "+e.varyingFs+" vec2 resultUV;\n "+e.defineOutput+"\n const vec2 halfCR = vec2(0.5, 0.5);\n\n struct ivec5\n {\n int x;\n int y;\n int z;\n int w;\n int u;\n };\n\n struct ivec6\n {\n int x;\n int y;\n int z;\n int w;\n int u;\n int v;\n };\n\n uniform float NAN;\n "+e.defineSpecialNaN+"\n "+e.defineSpecialInf+"\n "+e.defineRound+"\n\n int imod(int x, int y) {\n return x - y * (x / y);\n }\n\n int idiv(int a, int b, float sign) {\n int res = a / b;\n int mod = imod(a, b);\n if (sign < 0. && mod != 0) {\n res -= 1;\n }\n return res;\n }\n\n //Based on the work of Dave Hoskins\n //https://www.shadertoy.com/view/4djSRW\n #define HASHSCALE1 443.8975\n float random(float seed){\n vec2 p = resultUV * seed;\n vec3 p3 = fract(vec3(p.xyx) * HASHSCALE1);\n p3 += dot(p3, p3.yzx + 19.19);\n return fract((p3.x + p3.y) * p3.z);\n }\n\n "+$o+"\n "+ei+"\n "+ti+"\n "}(l);return t.isPacked?(i=function(e,t){switch(e.length){case 0:return"\n int getOutputCoords() {\n return 0;\n }\n ";case 1:return function(e,t){var n=[Math.ceil(t[0]/2),Math.ceil(t[1]/2)];return 1===n[0]?"\n int getOutputCoords() {\n return 2 * int(resultUV.x * "+n[1]+".0);\n }\n ":1===n[1]?"\n int getOutputCoords() {\n return 2 * int(resultUV.y * "+n[0]+".0);\n }\n ":"\n int getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+n[0]+", "+n[1]+"));\n return 2 * (resTexRC.x * "+n[1]+" + resTexRC.y);\n }\n "}(0,t);case 2:return function(e,t){var n=[Math.ceil(t[0]/2),Math.ceil(t[1]/2)];if(ee(e,t))return"\n ivec2 getOutputCoords() {\n return 2 * ivec2(resultUV.yx * vec2("+n[0]+", "+n[1]+"));\n }\n ";var r=Math.ceil(e[1]/2);return"\n ivec2 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+n[0]+", "+n[1]+"));\n\n int index = resTexRC.x * "+n[1]+" + resTexRC.y;\n int r = 2 * (index / "+r+");\n int c = imod(index, "+r+") * 2;\n\n return ivec2(r, c);\n }\n "}(e,t);case 3:return n=e,r=t,o=[Math.ceil(r[0]/2),Math.ceil(r[1]/2)],a=(i=Math.ceil(n[2]/2))*Math.ceil(n[1]/2),"\n ivec3 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+o[0]+", "+o[1]+"));\n int index = resTexRC.x * "+o[1]+" + resTexRC.y;\n\n int b = index / "+a+";\n index -= b * "+a+";\n\n int r = 2 * (index / "+i+");\n int c = imod(index, "+i+") * 2;\n\n return ivec3(b, r, c);\n }\n ";default:return function(e,t){for(var n=[Math.ceil(t[0]/2),Math.ceil(t[1]/2)],r=Math.ceil(e[e.length-1]/2),o=r*Math.ceil(e[e.length-2]/2),i=o,a="",s="b, r, c",u=2;u<e.length-1;u++)a="\n int b"+u+" = index / "+(i*=e[e.length-u-1])+";\n index -= b"+u+" * "+i+";\n "+a,s="b"+u+", "+s;return"\n ivec"+e.length+" getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+n[0]+", "+n[1]+"));\n int index = resTexRC.x * "+n[1]+" + resTexRC.y;\n\n "+a+"\n\n int b = index / "+o+";\n index -= b * "+o+";\n\n int r = 2 * (index / "+r+");\n int c = imod(index, "+r+") * 2;\n\n return ivec"+e.length+"("+s+");\n }\n "}(e,t)}var n,r,o,i,a}(t.logicalShape,c),a=function(e){return"\n void setOutput(vec4 val) {\n "+e.output+" = val;\n }\n "}(l)):(i=function(e,t){switch(e.length){case 0:return"\n int getOutputCoords() {\n return 0;\n }\n ";case 1:return function(e,t){return 1===t[0]?"\n int getOutputCoords() {\n return int(resultUV.x * "+t[1]+".0);\n }\n ":1===t[1]?"\n int getOutputCoords() {\n return int(resultUV.y * "+t[0]+".0);\n }\n ":"\n int getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+t[0]+", "+t[1]+"));\n return resTexRC.x * "+t[1]+" + resTexRC.y;\n }\n "}(0,t);case 2:return function(e,t){return ee(e,t)?"\n ivec2 getOutputCoords() {\n return ivec2(resultUV.yx * vec2("+t[0]+", "+t[1]+"));\n }\n ":1===e[1]?"\n ivec2 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+t[0]+", "+t[1]+"));\n int index = resTexRC.x * "+t[1]+" + resTexRC.y;\n return ivec2(index, 0);\n }\n ":1===e[0]?"\n ivec2 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+t[0]+", "+t[1]+"));\n int index = resTexRC.x * "+t[1]+" + resTexRC.y;\n return ivec2(0, index);\n }\n ":"\n ivec2 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+t[0]+", "+t[1]+"));\n int index = resTexRC.x * "+t[1]+" + resTexRC.y;\n int r = index / "+e[1]+";\n int c = index - r * "+e[1]+";\n return ivec2(r, c);\n }\n "}(e,t);case 3:return n=t,r=Go(["r","c","d"],e),"\n ivec3 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+n[0]+", "+n[1]+"));\n int index = resTexRC.x * "+n[1]+" + resTexRC.y;\n "+r+"\n return ivec3(r, c, d);\n }\n ";case 4:return function(e,t){var n=Go(["r","c","d","d2"],e);return"\n ivec4 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+t[0]+", "+t[1]+"));\n int index = resTexRC.x * "+t[1]+" + resTexRC.y;\n "+n+"\n return ivec4(r, c, d, d2);\n }\n "}(e,t);case 5:return function(e,t){var n=Go(["r","c","d","d2","d3"],e);return"\n ivec5 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx * vec2("+t[0]+",\n "+t[1]+"));\n\n int index = resTexRC.x * "+t[1]+" + resTexRC.y;\n\n "+n+"\n\n ivec5 outShape = ivec5(r, c, d, d2, d3);\n return outShape;\n }\n "}(e,t);case 6:return function(e,t){var n=Go(["r","c","d","d2","d3","d4"],e);return"\n ivec6 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+t[0]+", "+t[1]+"));\n int index = resTexRC.x * "+t[1]+" + resTexRC.y;\n\n "+n+"\n\n ivec6 result = ivec6(r, c, d, d2, d3, d4);\n return result;\n }\n "}(e,t);default:throw new Error(e.length+"-D output sampling is not yet supported")}var n,r}(t.logicalShape,c),a=function(e){return"\n void setOutput(float val) {\n "+e.output+" = vec4(val, 0, 0, 0);\n }\n "}(l)),r&&(p+=ni),[p,f,a,s,i,u,n].join("\n")}function Jo(e){var t=e.shapeInfo.logicalShape;switch(t.length){case 0:return function(e){var t=e.name,n="get"+t.charAt(0).toUpperCase()+t.slice(1);if(e.shapeInfo.isUniform)return"float "+n+"() {return "+t+";}";var r=e.shapeInfo.texShape,o=r[0],i=r[1];if(1===o&&1===i)return"\n float "+n+"() {\n return sampleTexture("+t+", halfCR);\n }\n ";var a=e.shapeInfo.texShape;return"\n float "+n+"() {\n vec2 uv = uvFromFlat("+a[0]+", "+a[1]+", "+ri(t)+");\n return sampleTexture("+t+", uv);\n }\n "}(e);case 1:return function(e){var t=e.name,n="get"+t.charAt(0).toUpperCase()+t.slice(1);if(e.shapeInfo.isUniform)return"\n float "+n+"(int index) {\n "+oi(e)+"\n }\n ";var r=e.shapeInfo.texShape,o=r[0],i=r[1];if(1===i&&1===o)return"\n float "+n+"(int index) {\n return sampleTexture("+t+", halfCR);\n }\n ";var a=ri(t);return 1===i?"\n float "+n+"(int index) {\n vec2 uv = vec2(0.5, (float(index + "+a+") + 0.5) / "+o+".0);\n return sampleTexture("+t+", uv);\n }\n ":1===o?"\n float "+n+"(int index) {\n vec2 uv = vec2((float(index + "+a+") + 0.5) / "+i+".0, 0.5);\n return sampleTexture("+t+", uv);\n }\n ":"\n float "+n+"(int index) {\n vec2 uv = uvFromFlat("+o+", "+i+", index + "+a+");\n return sampleTexture("+t+", uv);\n }\n "}(e);case 2:return function(e){var t=e.shapeInfo.logicalShape,n=e.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1),o=e.shapeInfo.texShape;if(null!=o&&ee(t,o)){var i=o[0];return"\n float "+r+"(int row, int col) {\n vec2 uv = (vec2(col, row) + halfCR) / vec2("+o[1]+".0, "+i+".0);\n return sampleTexture("+n+", uv);\n }\n "}var a=ue(t),s=a.newShape,u=a.keptDims,c=s;if(c.length<t.length)return"\n "+Jo(ai(e,c))+"\n float "+r+"(int row, int col) {\n return "+r+"("+si(["row","col"],u)+");\n }\n ";if(e.shapeInfo.isUniform)return"\n float "+r+"(int row, int col) {\n int index = round(dot(vec2(row, col), vec2("+t[1]+", 1)));\n "+oi(e)+"\n }\n ";var l=o[0],f=o[1],p=ri(n);return 1===f?"\n float "+r+"(int row, int col) {\n float index = dot(vec3(row, col, "+p+"), vec3("+t[1]+", 1, 1));\n vec2 uv = vec2(0.5, (index + 0.5) / "+l+".0);\n return sampleTexture("+n+", uv);\n }\n ":1===l?"\n float "+r+"(int row, int col) {\n float index = dot(vec3(row, col, "+p+"), vec3("+t[1]+", 1, 1));\n vec2 uv = vec2((index + 0.5) / "+f+".0, 0.5);\n return sampleTexture("+n+", uv);\n }\n ":"\n float "+r+"(int row, int col) {\n // Explicitly use integer operations as dot() only works on floats.\n int index = row * "+t[1]+" + col + "+p+";\n vec2 uv = uvFromFlat("+l+", "+f+", index);\n return sampleTexture("+n+", uv);\n }\n"}(e);case 3:return function(e){var t=e.shapeInfo.logicalShape,n=e.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1),o=t[1]*t[2],i=t[2],a=ue(t),s=a.newShape,u=a.keptDims,c=s;if(c.length<t.length)return"\n "+Jo(ai(e,c))+"\n float "+r+"(int row, int col, int depth) {\n return "+r+"("+si(["row","col","depth"],u)+");\n }\n ";if(e.shapeInfo.isUniform)return"\n float "+r+"(int row, int col, int depth) {\n int index = round(dot(vec3(row, col, depth),\n vec3("+o+", "+i+", 1)));\n "+oi(e)+"\n }\n ";var l=e.shapeInfo.texShape,f=l[0],p=l[1],h=e.shapeInfo.flatOffset;return p===o&&null==h?"\n float "+r+"(int row, int col, int depth) {\n float texR = float(row);\n float texC = dot(vec2(col, depth), vec2("+i+", 1));\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2("+p+".0, "+f+".0);\n return sampleTexture("+n+", uv);\n }\n ":p===i&&null==h?"\n float "+r+"(int row, int col, int depth) {\n float texR = dot(vec2(row, col), vec2("+t[1]+", 1));\n float texC = float(depth);\n vec2 uv = (vec2(texC, texR) + halfCR) / vec2("+p+".0, "+f+".0);\n return sampleTexture("+n+", uv);\n }\n ":"\n float "+r+"(int row, int col, int depth) {\n // Explicitly use integer operations as dot() only works on floats.\n int index = row * "+o+" + col * "+i+" + depth + "+ri(n)+";\n vec2 uv = uvFromFlat("+f+", "+p+", index);\n return sampleTexture("+n+", uv);\n }\n "}(e);case 4:return function(e){var t=e.shapeInfo.logicalShape,n=e.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1),o=t[3],i=t[2]*o,a=t[1]*i,s=ue(t),u=s.newShape,c=s.keptDims;if(u.length<t.length)return"\n "+Jo(ai(e,u))+"\n float "+r+"(int row, int col, int depth, int depth2) {\n return "+r+"("+si(["row","col","depth","depth2"],c)+");\n }\n ";if(e.shapeInfo.isUniform)return"\n float "+r+"(int row, int col, int depth, int depth2) {\n int index = round(dot(vec4(row, col, depth, depth2),\n vec4("+a+", "+i+", "+o+", 1)));\n "+oi(e)+"\n }\n ";var l=e.shapeInfo.flatOffset,f=e.shapeInfo.texShape,p=f[0],h=f[1];return h===a&&null==l?"\n float "+r+"(int row, int col, int depth, int depth2) {\n float texR = float(row);\n float texC =\n dot(vec3(col, depth, depth2),\n vec3("+i+", "+o+", 1));\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2("+h+".0, "+p+".0);\n return sampleTexture("+n+", uv);\n }\n ":h===o&&null==l?"\n float "+r+"(int row, int col, int depth, int depth2) {\n float texR = dot(vec3(row, col, depth),\n vec3("+t[1]*t[2]+", "+t[2]+", 1));\n float texC = float(depth2);\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2("+h+".0, "+p+".0);\n return sampleTexture("+n+", uv);\n }\n ":"\n float "+r+"(int row, int col, int depth, int depth2) {\n // Explicitly use integer operations as dot() only works on floats.\n int index = row * "+a+" + col * "+i+" +\n depth * "+o+" + depth2;\n vec2 uv = uvFromFlat("+p+", "+h+", index + "+ri(n)+");\n return sampleTexture("+n+", uv);\n }\n "}(e);case 5:return function(e){var t=e.shapeInfo.logicalShape,n=e.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1),o=t[4],i=t[3]*o,a=t[2]*i,s=t[1]*a,u=ue(t),c=u.newShape,l=u.keptDims;if(c.length<t.length)return"\n "+Jo(ai(e,c))+"\n float "+r+"(int row, int col, int depth, int depth2, int depth3) {\n return "+r+"("+si(["row","col","depth","depth2","depth3"],l)+");\n }\n ";if(e.shapeInfo.isUniform)return"\n float "+r+"(int row, int col, int depth, int depth2, int depth3) {\n float index = dot(\n vec4(row, col, depth, depth2),\n vec4("+s+", "+a+", "+i+", "+o+")) +\n depth3;\n "+oi(e)+"\n }\n ";var f=e.shapeInfo.flatOffset,p=e.shapeInfo.texShape,h=p[0],d=p[1];return d===s&&null==f?"\n float "+r+"(int row, int col, int depth, int depth2, int depth3) {\n int texR = row;\n float texC = dot(vec4(col, depth, depth2, depth3),\n vec4("+a+", "+i+", "+o+", 1));\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2("+d+".0, "+h+".0);\n return sampleTexture("+n+", uv);\n }\n ":d===o&&null==f?"\n float "+r+"(int row, int col, int depth, int depth2, int depth3) {\n float texR = dot(\n vec4(row, col, depth, depth2),\n vec4("+t[1]*t[2]*t[3]+",\n "+t[2]*t[3]+", "+t[3]+", 1));\n int texC = depth3;\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2("+d+".0, "+h+".0);\n return sampleTexture("+n+", uv);\n }\n ":"\n float "+r+"(int row, int col, int depth, int depth2, int depth3) {\n // Explicitly use integer operations as dot() only works on floats.\n int index = row * "+s+" + col * "+a+" + depth * "+i+" +\n depth2 * "+o+" + depth3 + "+ri(n)+";\n vec2 uv = uvFromFlat("+h+", "+d+", index);\n return sampleTexture("+n+", uv);\n }\n "}(e);case 6:return function(e){var t=e.shapeInfo.logicalShape,n=e.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1),o=ue(t),i=o.newShape,a=o.keptDims;if(i.length<t.length)return"\n "+Jo(ai(e,i))+"\n float "+r+"(int row, int col, int depth,\n int depth2, int depth3, int depth4) {\n return "+r+"("+si(["row","col","depth","depth2","depth3","depth4"],a)+");\n }\n ";var s=t[5],u=t[4]*s,c=t[3]*u,l=t[2]*c,f=t[1]*l;if(e.shapeInfo.isUniform)return"\n float "+r+"(int row, int col, int depth,\n int depth2, int depth3, int depth4) {\n int index = round(dot(\n vec4(row, col, depth, depth2),\n vec4("+f+", "+l+", "+c+", "+u+")) +\n dot(\n vec2(depth3, depth4),\n vec2("+s+", 1)));\n "+oi(e)+"\n }\n ";var p=e.shapeInfo.flatOffset,h=e.shapeInfo.texShape,d=h[0],m=h[1];return m===f&&null==p?"\n float "+r+"(int row, int col, int depth,\n int depth2, int depth3, int depth4) {\n int texR = row;\n float texC = dot(vec4(col, depth, depth2, depth3),\n vec4("+l+", "+c+", "+u+", "+s+")) +\n float(depth4);\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2("+m+".0, "+d+".0);\n return sampleTexture("+n+", uv);\n }\n ":m===s&&null==p?"\n float "+r+"(int row, int col, int depth,\n int depth2, int depth3, int depth4) {\n float texR = dot(vec4(row, col, depth, depth2),\n vec4("+t[1]*t[2]*t[3]*t[4]+",\n "+t[2]*t[3]*t[4]+",\n "+t[3]*t[4]+",\n "+t[4]+")) + float(depth3);\n int texC = depth4;\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2("+m+".0, "+d+".0);\n return sampleTexture("+n+", uv);\n }\n ":"\n float "+r+"(int row, int col, int depth,\n int depth2, int depth3, int depth4) {\n // Explicitly use integer operations as dot() only works on floats.\n int index = row * "+f+" + col * "+l+" + depth * "+c+" +\n depth2 * "+u+" + depth3 * "+s+" + depth4 + "+ri(n)+";\n vec2 uv = uvFromFlat("+d+", "+m+", index);\n return sampleTexture("+n+", uv);\n }\n "}(e);default:throw new Error(t.length+"-D input sampling is not yet supported")}}function Yo(e){var t;switch(e.shapeInfo.logicalShape.length){case 0:return"\n vec4 "+("get"+(t=e.name).charAt(0).toUpperCase()+t.slice(1))+"() {\n return "+Ho().texture2D+"("+t+", halfCR);\n }\n ";case 1:return function(e){var t=e.name,n="get"+t.charAt(0).toUpperCase()+t.slice(1),r=e.shapeInfo.texShape,o=[Math.ceil(r[0]/2),Math.ceil(r[1]/2)],i=Ho();return"\n vec4 "+n+"(int index) {\n vec2 uv = packedUVfrom1D(\n "+o[0]+", "+o[1]+", index);\n return "+i.texture2D+"("+t+", uv);\n }\n "}(e);case 2:return function(e){var t=e.shapeInfo.logicalShape,n=e.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1),o=e.shapeInfo.texShape,i=o[0],a=o[1],s=Ho();if(null!=o&&ee(t,o))return"\n vec4 "+r+"(int row, int col) {\n vec2 uv = (vec2(col, row) + halfCR) / vec2("+a+".0, "+i+".0);\n\n return "+s.texture2D+"("+n+", uv);\n }\n ";var u=[Math.ceil(o[0]/2),Math.ceil(o[1]/2)];return"\n vec4 "+r+"(int row, int col) {\n vec2 uv = packedUVfrom2D("+Math.ceil(t[1]/2)+", "+u[0]+", "+u[1]+", row, col);\n return "+s.texture2D+"("+n+", uv);\n }\n "}(e);case 3:return function(e){var t=e.shapeInfo.logicalShape,n=e.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1),o=e.shapeInfo.texShape,i=[Math.ceil(o[0]/2),Math.ceil(o[1]/2)];if(1===t[0])return"\n "+Yo(ai(e,t.slice(1)))+"\n vec4 "+r+"(int b, int row, int col) {\n return "+r+"("+si(["b","row","col"],[1,2])+");\n }\n ";var a=i[0],s=i[1],u=Math.ceil(t[2]/2);return"\n vec4 "+r+"(int b, int row, int col) {\n vec2 uv = packedUVfrom3D(\n "+a+", "+s+", "+u*Math.ceil(t[1]/2)+", "+u+", b, row, col);\n return "+Ho().texture2D+"("+n+", uv);\n }\n "}(e);default:return function(e){for(var t=e.shapeInfo.logicalShape,n=t.length,r=e.name,o="get"+r.charAt(0).toUpperCase()+r.slice(1),i=e.shapeInfo.texShape,a=[Math.ceil(i[0]/2),Math.ceil(i[1]/2)],s=a[0],u=a[1],c=Math.ceil(t[n-1]/2),l=c*Math.ceil(t[n-2]/2),f="int b, int row, int col",p="b * "+l+" + (row / 2) * "+c+" + (col / 2)",h=2;h<n-1;h++)f="int b"+h+", "+f,p="b"+h+" * "+(l*=t[n-h-1])+" + "+p;return"\n vec4 "+o+"("+f+") {\n int index = "+p+";\n int texR = index / "+u+";\n int texC = index - texR * "+u+";\n vec2 uv = (vec2(texC, texR) + halfCR) / vec2("+u+", "+s+");\n return "+Ho().texture2D+"("+r+", uv);\n }\n "}(e)}}var $o="\nvec2 uvFromFlat(int texNumR, int texNumC, int index) {\n int texR = index / texNumC;\n int texC = index - texR * texNumC;\n return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);\n}\nvec2 packedUVfrom1D(int texNumR, int texNumC, int index) {\n int texelIndex = index / 2;\n int texR = texelIndex / texNumC;\n int texC = texelIndex - texR * texNumC;\n return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);\n}\n",ei="\nvec2 packedUVfrom2D(int texelsInLogicalRow, int texNumR,\n int texNumC, int row, int col) {\n int texelIndex = (row / 2) * texelsInLogicalRow + (col / 2);\n int texR = texelIndex / texNumC;\n int texC = texelIndex - texR * texNumC;\n return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);\n}\n",ti="\nvec2 packedUVfrom3D(int texNumR, int texNumC,\n int texelsInBatch, int texelsInLogicalRow, int b,\n int row, int col) {\n int index = b * texelsInBatch + (row / 2) * texelsInLogicalRow + (col / 2);\n int texR = index / texNumC;\n int texC = index - texR * texNumC;\n return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);\n}\n",ni="\n float getChannel(vec4 frag, vec2 innerDims) {\n vec2 modCoord = mod(innerDims, 2.);\n return modCoord.x == 0. ?\n (modCoord.y == 0. ? frag.r : frag.g) :\n (modCoord.y == 0. ? frag.b : frag.a);\n }\n float getChannel(vec4 frag, int dim) {\n float modCoord = mod(float(dim), 2.);\n return modCoord == 0. ? frag.r : frag.g;\n }\n";function ri(e){return"offset"+e}function oi(e){var t=e.name,n=$(e.shapeInfo.logicalShape);return n<2?"return "+t+";":"\n for (int i = 0; i < "+n+"; i++) {\n if (i == index) {\n return "+t+"[i];\n }\n }\n "}function ii(e){if(e<=1)return"int";if(2===e)return"ivec2";if(3===e)return"ivec3";if(4===e)return"ivec4";if(5===e)return"ivec5";if(6===e)return"ivec6";throw Error("GPU for rank "+e+" is not yet supported")}function ai(e,t){var n=JSON.parse(JSON.stringify(e));return n.shapeInfo.logicalShape=t,n}function si(e,t){return t.map((function(t){return e[t]})).join(", ")}var ui=function(e,t,n,r){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,Z(e.length>2,(function(){return"Packed arg"+(n.charAt(0).toUpperCase()+n.slice(1))+" supports only inputs with rank above 2."}));var o=e[e.length-1],i=Math.ceil(o/t);this.outputShape=e.slice(0,-1),i>1&&this.outputShape.push(i),r||this.variableNames.push("bestIndicesA");var a,s,u=this.outputShape,c=u.length,l=ii(c),f=Vo("coords",c);if(1===i){var p=ii(s=c+1);a="\n "+p+" sourceLocR = "+p+"("+f.join()+", 0);\n ++"+f[c-1]+";\n "+p+" sourceLocG = "+p+"("+f.join()+", 0);\n ++"+f[c-2]+";\n "+p+" sourceLocA = "+p+"("+f.join()+", 0);\n --"+f[c-1]+";\n "+p+" sourceLocB = "+p+"("+f.join()+", 0);\n --"+f[c-2]+";"}else s=c,a="\n "+l+" sourceLocR = coords;\n ++"+f[c-1]+";\n "+l+" sourceLocG = coords;\n ++"+f[c-2]+";\n "+l+" sourceLocA = coords;\n --"+f[c-1]+";\n "+l+" sourceLocB = coords;\n --"+f[c-2]+";";var h=["x","y","z","w","u","v"].slice(0,s),d="."+h[s-1],m=h.map((function(e){return"int "+e})),g=Vo("sourceLocR",s-1).concat("inIdx.r"),v=Vo("sourceLocG",s-1).concat("inIdx.g"),y=Vo("sourceLocB",s-1).concat("inIdx.b"),b=Vo("sourceLocA",s-1).concat("inIdx.a"),w="max"===n?"greaterThan":"lessThan",x=r?"":"\n inIdx = round(vec4(getBestIndicesAChannel("+g.join()+"),\n getBestIndicesAChannel("+v.join()+"),\n getBestIndicesAChannel("+y.join()+"),\n getBestIndicesAChannel("+b.join()+")));",A="vec4(\n getAChannel("+g.join()+"),\n hasNextCol ? getAChannel("+v.join()+") : 0.,\n hasNextRow ? getAChannel("+y.join()+") : 0.,\n hasNextRow && hasNextCol ? getAChannel("+b.join()+") : 0.)",E=r?"":"\n float getBestIndicesAChannel("+m.join()+") {\n return getChannel(getBestIndicesA("+h.join()+"),\n vec2("+h.slice(-2).join()+"));\n }";this.userCode="\n float getAChannel("+m.join()+") {\n return getChannel(getA("+h.join()+"),\n vec2("+h.slice(-2).join()+"));\n }\n "+E+"\n void main() {\n "+l+" coords = getOutputCoords();\n bool hasNextCol = "+f[c-1]+" < "+(u[c-1]-1)+";\n bool hasNextRow = "+f[c-2]+" < "+(u[c-2]-1)+";\n "+a+"\n ivec4 srcIdx = ivec4(sourceLocR"+d+", sourceLocG"+d+",\n sourceLocB"+d+", sourceLocA"+d+") * "+t+";\n ivec4 inIdx = srcIdx;\n vec4 bestIndex = vec4(inIdx);\n vec4 bestValue = "+A+";\n\n for (int i = 0; i < "+t+"; i++) {\n inIdx = srcIdx;\n "+x+"\n vec4 candidate = "+A+";\n bvec4 nan = isnan(candidate);\n bvec4 replace = bvec4(\n vec4("+w+"(candidate, bestValue)) * (vec4(1.0) - vec4(nan)));\n\n bestValue = vec4(replace.x ? candidate.x : bestValue.x,\n replace.y ? candidate.y : bestValue.y,\n replace.z ? candidate.z : bestValue.z,\n replace.w ? candidate.w : bestValue.w);\n bestIndex = mix(bestIndex, vec4(inIdx), vec4(replace));\n srcIdx++;\n }\n setOutput(bestIndex);\n }\n "},ci=function(e){this.variableNames=["dy"],this.outputShape=e.inShape;var t=e.filterHeight,n=e.filterWidth,r=e.strideHeight,o=e.strideWidth,i=e.dilationHeight,a=e.dilationWidth,s=e.effectiveFilterHeight,u=e.effectiveFilterWidth,c=s-1-e.padInfo.top,l=u-1-e.padInfo.left,f=1/(t*n);this.userCode="\n const ivec2 pads = ivec2("+c+", "+l+");\n const float avgMultiplier = float("+f+");\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n\n ivec2 dyRCCorner = coords.yz - pads;\n int dyRCorner = dyRCCorner.x;\n int dyCCorner = dyRCCorner.y;\n\n // Convolve dy(?, ?, d) with pos mask(:, :, d) to get dx(xR, xC, d).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < "+s+";\n wR += "+i+") {\n float dyR = float(dyRCorner + wR) / "+r+".0;\n\n if (dyR < 0.0 || dyR >= "+e.outHeight+".0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n for (int wC = 0; wC < "+u+";\n wC+= "+a+") {\n float dyC = float(dyCCorner + wC) / "+o+".0;\n\n if (dyC < 0.0 || dyC >= "+e.outWidth+".0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n float dyValue = getDy(b, idyR, idyC, d);\n\n dotProd += dyValue * avgMultiplier;\n }\n }\n setOutput(dotProd);\n }\n "},li=function(e){this.variableNames=["dy"],this.outputShape=e.inShape;var t=e.filterDepth,n=e.filterHeight,r=e.filterWidth,o=e.strideDepth,i=e.strideHeight,a=e.strideWidth,s=e.dilationDepth,u=e.dilationHeight,c=e.dilationWidth,l=e.effectiveFilterDepth,f=e.effectiveFilterHeight,p=e.effectiveFilterWidth,h=l-1-e.padInfo.front,d=f-1-e.padInfo.top,m=p-1-e.padInfo.left,g=1/(t*n*r);this.userCode="\n const ivec3 pads = ivec3("+h+", "+d+", "+m+");\n const float avgMultiplier = float("+g+");\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int ch = coords.u;\n\n ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;\n int dyDCorner = dyCorner.x;\n int dyRCorner = dyCorner.y;\n int dyCCorner = dyCorner.z;\n\n // Convolve dy(?, ?, ?, d) with pos mask(:, :, :, ch) to get\n // dx(xD, xR, xC, ch).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n\n for (int wD = 0; wD < "+l+";\n wD += "+s+") {\n float dyD = float(dyDCorner + wD) / "+o+".0;\n\n if (dyD < 0.0 || dyD >= "+e.outDepth+".0 || fract(dyD) > 0.0) {\n continue;\n }\n int idyD = int(dyD);\n\n for (int wR = 0; wR < "+f+";\n wR += "+u+") {\n float dyR = float(dyRCorner + wR) / "+i+".0;\n\n if (dyR < 0.0 || dyR >= "+e.outHeight+".0 ||\n fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n for (int wC = 0; wC < "+p+";\n wC += "+c+") {\n float dyC = float(dyCCorner + wC) / "+a+".0;\n\n if (dyC < 0.0 || dyC >= "+e.outWidth+".0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n float dyValue = getDy(batch, idyD, idyR, idyC, ch);\n\n dotProd += dyValue * avgMultiplier;\n }\n }\n }\n setOutput(dotProd);\n }\n "},fi=function(e,t,n,r,o,i){this.outputShape=[],this.variableNames=["x","mean","variance"],uo(e,t),uo(e,n);var a="0.0";null!=r&&(uo(e,r),this.variableNames.push("offset"),a="getOffsetAtOutCoords()");var s="1.0";null!=o&&(uo(e,o),this.variableNames.push("scale"),s="getScaleAtOutCoords()"),this.outputShape=e,this.userCode="\n void main() {\n float x = getXAtOutCoords();\n float mean = getMeanAtOutCoords();\n float variance = getVarianceAtOutCoords();\n float offset = "+a+";\n float scale = "+s+";\n float inv = scale * inversesqrt(variance + float("+i+"));\n setOutput(dot(vec3(x, -mean, offset), vec3(inv, inv, 1)));\n }\n "},pi=function(e,t,n,r,o,i){this.packedInputs=!0,this.packedOutput=!0,this.variableNames=["x","mean","variance"],uo(e,t),uo(e,n);var a="vec4(0.0)";null!=r&&(uo(e,r),this.variableNames.push("offset"),a="getOffsetAtOutCoords()");var s="vec4(1.0)";null!=o&&(uo(e,o),this.variableNames.push("scale"),s="getScaleAtOutCoords()"),this.outputShape=e,this.userCode="\n void main() {\n vec4 offset = "+a+";\n vec4 scale = "+s+";\n\n vec4 x = getXAtOutCoords();\n vec4 mean = getMeanAtOutCoords();\n vec4 variance = getVarianceAtOutCoords();\n\n vec4 inv = scale * inversesqrt(variance + vec4("+i+"));\n\n setOutput((x - mean) * inv + offset);\n }\n "},hi=function(e,t,n){this.variableNames=["AReal","AImag","BReal","BImag"],this.outputShape=uo(t,n),this.userCode="\n float binaryOpComplex(\n float areal, float aimag, float breal, float bimag) {\n "+e+"\n }\n\n void main() {\n float areal = getARealAtOutCoords();\n float aimag = getAImagAtOutCoords();\n float breal = getBRealAtOutCoords();\n float bimag = getBImagAtOutCoords();\n setOutput(binaryOpComplex(areal, aimag, breal, bimag));\n }\n "},di="return a + b;",mi="return a - b;",gi="return a * b;",vi="return (a < 0.) ? b * a : a;",yi=function(e,t,n){this.variableNames=["A","B"],this.outputShape=uo(t,n),this.userCode="\n float binaryOperation(float a, float b) {\n "+e+"\n }\n\n void main() {\n float a = getAAtOutCoords();\n float b = getBAtOutCoords();\n setOutput(binaryOperation(a, b));\n }\n "},bi="\n vec4 aLessThanZero = vec4(lessThan(a, vec4(0.)));\n return (aLessThanZero * (b * a)) + ((vec4(1.0) - aLessThanZero) * a);\n",wi=function(e,t,n,r){void 0===r&&(r=!1),this.variableNames=["A","B"],this.supportsBroadcasting=!0,this.packedInputs=!0,this.packedOutput=!0,this.outputShape=uo(t,n);var o=this.outputShape.length,i="";if(r)if(0===o||1===$(this.outputShape))i="\n result.y = 0.;\n result.z = 0.;\n result.w = 0.;\n ";else if(i="\n "+ii(o)+" coords = getOutputCoords();\n ",1===o)i+="\n result.y = (coords + 1) >= "+this.outputShape[0]+" ? 0. : result.y;\n result.z = 0.;\n result.w = 0.;\n ";else{var a=Vo("coords",o);i+="\n bool nextRowOutOfBounds =\n ("+a[o-2]+" + 1) >= "+this.outputShape[o-2]+";\n bool nextColOutOfBounds =\n ("+a[o-1]+" + 1) >= "+this.outputShape[o-1]+";\n result.y = nextColOutOfBounds ? 0. : result.y;\n result.z = nextRowOutOfBounds ? 0. : result.z;\n result.w = nextColOutOfBounds || nextRowOutOfBounds ? 0. : result.w;\n "}this.userCode="\n vec4 binaryOperation(vec4 a, vec4 b) {\n "+e+"\n }\n\n void main() {\n vec4 a = getAAtOutCoords();\n vec4 b = getBAtOutCoords();\n\n vec4 result = binaryOperation(a, b);\n "+i+"\n\n setOutput(result);\n }\n "},xi=function(){function e(e){this.variableNames=["A"],this.outputShape=e,this.userCode="\n uniform float minVal;\n uniform float maxVal;\n\n void main() {\n float value = getAAtOutCoords();\n if (isnan(value)) {\n setOutput(value);\n return;\n }\n\n setOutput(clamp(value, minVal, maxVal));\n }\n "}return e.prototype.getCustomSetupFunc=function(e,t){var n=this;return function(r,o){null==n.minLoc&&(n.minLoc=r.getUniformLocationNoThrow(o,"minVal"),n.maxLoc=r.getUniformLocationNoThrow(o,"maxVal")),r.gl.uniform1f(n.minLoc,e),r.gl.uniform1f(n.maxLoc,t)}},e}(),Ai=function(){function e(e){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=e,this.userCode="\n uniform float minVal;\n uniform float maxVal;\n\n void main() {\n vec4 value = getAAtOutCoords();\n\n if (any(isnan(value))) {\n setOutput(value);\n return;\n }\n\n setOutput(clamp(value, vec4(minVal), vec4(maxVal)));\n }\n "}return e.prototype.getCustomSetupFunc=function(e,t){var n=this;return function(r,o){null==n.minLoc&&(n.minLoc=r.getUniformLocationNoThrow(o,"minVal"),n.maxLoc=r.getUniformLocationNoThrow(o,"maxVal")),r.gl.uniform1f(n.minLoc,e),r.gl.uniform1f(n.maxLoc,t)}},e}(),Ei=function(e){this.variableNames=["real","imag"],this.outputShape=e,this.userCode="\n void main() {\n float re = abs(getRealAtOutCoords());\n float im = abs(getImagAtOutCoords());\n float mx = max(re, im);\n\n // sadly the length function in glsl is not underflow-safe\n // (at least not on Intel GPUs). So the safe solution is\n // to ensure underflow-safety in all cases.\n setOutput(\n mx == 0.0 ? 0.0 : mx * length(vec2(1, min(re, im)/mx))\n );\n }\n "},Ci=function(e){this.outputShape=[],this.outputShape=jn(e,1),this.variableNames=e.map((function(e,t){return"T"+t}));var t=new Array(e.length-1);t[0]=e[0][1];for(var n=1;n<t.length;n++)t[n]=t[n-1]+e[n][1];var r=["if (yC < "+t[0]+") setOutput(getT0(yR, yC));"];for(n=1;n<t.length;n++){var o=t[n-1];r.push("else if (yC < "+t[n]+") setOutput(getT"+n+"(yR, yC-"+o+"));")}var i=t.length,a=t[t.length-1];r.push("else setOutput(getT"+i+"(yR, yC-"+a+"));"),this.userCode="\n void main() {\n ivec2 coords = getOutputCoords();\n int yR = coords.x;\n int yC = coords.y;\n\n "+r.join("\n ")+"\n }\n "},ki=function(e,t){this.packedInputs=!0,this.packedOutput=!0,this.outputShape=[],this.outputShape=jn(e,t);var n=this.outputShape,r=n.length,o=ii(r),i=Vo("coords",r),a=["x","y","z","w","u","v"].slice(0,r);this.variableNames=e.map((function(e,t){return"T"+t}));var s=new Array(e.length-1);s[0]=e[0][t];for(var u=1;u<s.length;u++)s[u]=s[u-1]+e[u][t];var c=a[t],l=a.slice(-2),f=a.join(),p="if ("+c+" < "+s[0]+") {\n return getChannel(\n getT0("+f+"), vec2("+l.join()+"));\n }";for(u=1;u<s.length;u++){var h=s[u-1];p+="\n if ("+c+" < "+s[u]+" && "+c+" >= "+s[u-1]+") {\n return getChannel(\n getT"+u+"("+Ii(a,c,h)+"),\n vec2("+Ii(l,c,h)+"));\n }"}var d=s.length,m=s[s.length-1];p+="\n return getChannel(\n getT"+d+"("+Ii(a,c,m)+"),\n vec2("+Ii(l,c,m)+"));",this.userCode="\n float getValue("+a.map((function(e){return"int "+e}))+") {\n "+p+"\n }\n\n void main() {\n "+o+" coords = getOutputCoords();\n vec4 result = vec4(getValue("+i+"), 0., 0., 0.);\n\n "+i[r-1]+" = "+i[r-1]+" + 1;\n if ("+i[r-1]+" < "+n[r-1]+") {\n result.g = getValue("+i+");\n }\n\n "+i[r-2]+" = "+i[r-2]+" + 1;\n if ("+i[r-2]+" < "+n[r-2]+") {\n result.a = getValue("+i+");\n }\n\n "+i[r-1]+" = "+i[r-1]+" - 1;\n if ("+i[r-2]+" < "+n[r-2]+" &&\n "+i[r-1]+" < "+n[r-1]+") {\n result.b = getValue("+i+");\n }\n setOutput(result);\n }\n "};function Ii(e,t,n){var r=e.indexOf(t);return e.map((function(e,t){return t===r?e+" - "+n:e})).join()}var Si=function(e){this.variableNames=["x","dy"],this.outputShape=e.filterShape;var t=e.strideHeight,n=e.strideWidth,r=e.padInfo.top,o=e.padInfo.left,i="channelsLast"===e.dataFormat;this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int wR = coords.x;\n int wC = coords.y;\n int d1 = coords.z;\n int d2 = coords.w;\n\n // Convolve x(?, ?, d1) with dy(:, :, d2) to get dw(wR, wC, d1, d2).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n\n for (int b = 0; b < "+e.batchSize+"; b++) {\n for (int yR = 0; yR < "+e.outHeight+"; yR++) {\n int xR = wR + yR * "+t+" - "+r+";\n\n if (xR < 0 || xR >= "+e.inHeight+") {\n continue;\n }\n\n for (int yC = 0; yC < "+e.outWidth+"; yC++) {\n int xC = wC + yC * "+n+" - "+o+";\n\n if (xC < 0 || xC >= "+e.inWidth+") {\n continue;\n }\n\n if ("+i+") {\n float dyValue = getDy(b, yR, yC, d2);\n float xValue = getX(b, xR, xC, d1);\n dotProd += (xValue * dyValue);\n } else {\n float dyValue = getDy(b, d2, yR, yC);\n float xValue = getX(b, d1, xR, xC);\n dotProd += (xValue * dyValue);\n }\n\n }\n }\n }\n setOutput(dotProd);\n }\n "},ji=function(e){this.variableNames=["dy","W"],this.outputShape=e.inShape;var t=e.filterHeight,n=e.filterWidth,r=e.strideHeight,o=e.strideWidth,i="channelsLast"===e.dataFormat,a=t-1-e.padInfo.top,s=n-1-e.padInfo.left,u=i?1:2,c=i?2:3,l=i?3:1;this.userCode="\n const ivec2 pads = ivec2("+a+", "+s+");\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d1 = coords["+l+"];\n\n ivec2 dyCorner = ivec2(coords["+u+"], coords["+c+"]) - pads;\n int dyRCorner = dyCorner.x;\n int dyCCorner = dyCorner.y;\n\n // Convolve dy(?, ?, d2) with w(:, :, d1, d2) to compute dx(xR, xC, d1).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < "+t+"; wR++) {\n float dyR = float(dyRCorner + wR) / "+r+".0;\n\n if (dyR < 0.0 || dyR >= "+e.outHeight+".0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n int wRPerm = "+t+" - 1 - wR;\n\n for (int wC = 0; wC < "+n+"; wC++) {\n float dyC = float(dyCCorner + wC) / "+o+".0;\n\n if (dyC < 0.0 || dyC >= "+e.outWidth+".0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n int wCPerm = "+n+" - 1 - wC;\n\n for (int d2 = 0; d2 < "+e.outChannels+"; d2++) {\n\n if ("+i+") {\n float xValue = getDy(batch, idyR, idyC, d2);\n float wValue = getW(wRPerm, wCPerm, d1, d2);\n dotProd += xValue * wValue;\n } else {\n float xValue = getDy(batch, d2, idyR, idyC);\n float wValue = getW(wRPerm, wCPerm, d1, d2);\n dotProd += xValue * wValue;\n }\n\n }\n }\n }\n setOutput(dotProd);\n }\n "},Ti=function(e){this.variableNames=["x","dy"],this.outputShape=e.filterShape;var t=e.strideDepth,n=e.strideHeight,r=e.strideWidth,o=e.padInfo.front,i=e.padInfo.top,a=e.padInfo.left;this.userCode="\n void main() {\n ivec5 coords = getOutputCoords();\n int wF = coords.x;\n int wR = coords.y;\n int wC = coords.z;\n int d1 = coords.w;\n int d2 = coords.u;\n\n float dotProd = 0.0;\n\n for (int b = 0; b < "+e.batchSize+"; b++) {\n for (int yF = 0; yF < "+e.outDepth+"; yF++) {\n int xF = wF + yF * "+t+" - "+o+";\n\n if (xF < 0 || xF >= "+e.inDepth+") {\n continue;\n }\n\n for (int yR = 0; yR < "+e.outHeight+"; yR++) {\n int xR = wR + yR * "+n+" - "+i+";\n\n if (xR < 0 || xR >= "+e.inHeight+") {\n continue;\n }\n\n for (int yC = 0; yC < "+e.outWidth+"; yC++) {\n int xC = wC + yC * "+r+" - "+a+";\n\n if (xC < 0 || xC >= "+e.inWidth+") {\n continue;\n }\n\n float dyValue = getDy(b, yF, yR, yC, d2);\n float xValue = getX(b, xF, xR, xC, d1);\n dotProd += (xValue * dyValue);\n }\n }\n }\n }\n setOutput(dotProd);\n }\n "},Ri=function(e){this.variableNames=["dy","W"],this.outputShape=e.inShape;var t=e.filterDepth,n=e.filterHeight,r=e.filterWidth,o=e.strideDepth,i=e.strideHeight,a=e.strideWidth,s=t-1-e.padInfo.front,u=n-1-e.padInfo.top,c=r-1-e.padInfo.left;this.userCode="\n const ivec3 pads = ivec3("+s+", "+u+", "+c+");\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int d1 = coords.u;\n\n\n ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;\n int dyFCorner = dyCorner.x;\n int dyRCorner = dyCorner.y;\n int dyCCorner = dyCorner.z;\n\n float dotProd = 0.0;\n for (int wF = 0; wF < "+t+"; wF++) {\n float dyF = float(dyFCorner + wF) / "+o+".0;\n\n if (dyF < 0.0 || dyF >= "+e.outDepth+".0 || fract(dyF) > 0.0) {\n continue;\n }\n int idyF = int(dyF);\n\n int wFPerm = "+t+" - 1 - wF;\n\n for (int wR = 0; wR < "+n+"; wR++) {\n float dyR = float(dyRCorner + wR) / "+i+".0;\n\n if (dyR < 0.0 || dyR >= "+e.outHeight+".0 ||\n fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n int wRPerm = "+n+" - 1 - wR;\n\n for (int wC = 0; wC < "+r+"; wC++) {\n float dyC = float(dyCCorner + wC) / "+a+".0;\n\n if (dyC < 0.0 || dyC >= "+e.outWidth+".0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n int wCPerm = "+r+" - 1 - wC;\n\n for (int d2 = 0; d2 < "+e.outChannels+"; d2++) {\n float xValue = getDy(batch, idyF, idyR, idyC, d2);\n float wValue = getW(wFPerm, wRPerm, wCPerm, d1, d2);\n dotProd += xValue * wValue;\n }\n }\n }\n }\n setOutput(dotProd);\n }\n "},Oi=function(e){this.variableNames=["x","dy"],this.outputShape=e.filterShape;var t=e.strideHeight,n=e.strideWidth,r=e.padInfo.top,o=e.padInfo.left,i=e.outChannels/e.inChannels;this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int wR = coords.x;\n int wC = coords.y;\n int d1 = coords.z;\n int dm = coords.w;\n int d2 = d1 * "+i+" + dm;\n\n float dotProd = 0.0;\n\n // TO DO: Vec4 over the batch size\n for (int b = 0; b < "+e.batchSize+"; b++) {\n for (int yR = 0; yR < "+e.outHeight+"; yR++) {\n int xR = wR + yR * "+t+" - "+r+";\n\n if (xR < 0 || xR >= "+e.inHeight+") {\n continue;\n }\n\n for (int yC = 0; yC < "+e.outWidth+"; yC++) {\n int xC = wC + yC * "+n+" - "+o+";\n\n if (xC < 0 || xC >= "+e.inWidth+") {\n continue;\n }\n\n float dyValue = getDy(b, yR, yC, d2);\n float xValue = getX(b, xR, xC, d1);\n dotProd += (xValue * dyValue);\n }\n }\n }\n setOutput(dotProd);\n }\n "},Di=function(e){this.variableNames=["dy","W"],this.outputShape=e.inShape;var t=e.filterHeight,n=e.filterWidth,r=e.strideHeight,o=e.strideWidth,i=t-1-e.padInfo.top,a=n-1-e.padInfo.left,s=e.outChannels/e.inChannels;this.userCode="\n const ivec2 pads = ivec2("+i+", "+a+");\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d1 = coords[3];\n ivec2 dyCorner = coords.yz - pads;\n int dyRCorner = dyCorner.x;\n int dyCCorner = dyCorner.y;\n\n float dotProd = 0.0;\n\n for (int wR = 0; wR < "+t+"; wR++) {\n float dyR = float(dyRCorner + wR) / "+r+".0;\n\n if (dyR < 0.0 || dyR >= "+e.outHeight+".0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n int wRPerm = "+t+" - 1 - wR;\n\n for (int wC = 0; wC < "+n+"; wC++) {\n float dyC = float(dyCCorner + wC) / "+o+".0;\n\n if (dyC < 0.0 || dyC >= "+e.outWidth+".0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n int wCPerm = "+n+" - 1 - wC;\n\n // TO DO: Vec4 over the channelMul\n for (int dm = 0; dm < "+s+"; dm++) {\n int d2 = d1 * "+s+" + dm;\n float xValue = getDy(batch, idyR, idyC, d2);\n float wValue = getW(wRPerm, wCPerm, d1, dm);\n dotProd += xValue * wValue;\n }\n }\n }\n setOutput(dotProd);\n }\n "},Bi=function(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=null),void 0===r&&(r=!1),this.variableNames=["x","W"],this.outputShape=e.outShape;var o=e.padInfo.top,i=e.padInfo.left,a=e.strideHeight,s=e.strideWidth,u=e.dilationHeight,c=e.dilationWidth,l=e.filterHeight,f=e.filterWidth,p=4*Math.floor(e.inChannels/4),h=e.inChannels%4,d="channelsLast"===e.dataFormat,m=d?1:2,g=d?2:3,v=d?3:1,y="",b="";n&&(y=r?"float activation(float a) {\n float b = getPreluActivationWeightsAtOutCoords();\n "+n+"\n }":"\n float activation(float x) {\n "+n+"\n }\n ",b="result = activation(result);");var w=t?"result += getBiasAtOutCoords();":"";t&&this.variableNames.push("bias"),r&&this.variableNames.push("preluActivationWeights"),this.userCode="\n "+y+"\n\n const ivec2 strides = ivec2("+a+", "+s+");\n const ivec2 pads = ivec2("+o+", "+i+");\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d2 = coords["+v+"];\n\n ivec2 xRCCorner =\n ivec2(coords["+m+"], coords["+g+"]) * strides - pads;\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // Convolve x(?, ?, d1) with w(:, :, d1, d2) to get y(yR, yC, d2).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < "+l+"; wR++) {\n int xR = xRCorner + wR * "+u+";\n\n if (xR < 0 || xR >= "+e.inHeight+") {\n continue;\n }\n\n for (int wC = 0; wC < "+f+"; wC++) {\n int xC = xCCorner + wC * "+c+";\n\n if (xC < 0 || xC >= "+e.inWidth+") {\n continue;\n }\n\n for (int d1 = 0; d1 < "+p+"; d1 += 4) {\n vec4 wValues = vec4(\n getW(wR, wC, d1, d2),\n getW(wR, wC, d1 + 1, d2),\n getW(wR, wC, d1 + 2, d2),\n getW(wR, wC, d1 + 3, d2)\n );\n\n if ("+d+") {\n vec4 xValues = vec4(\n getX(batch, xR, xC, d1),\n getX(batch, xR, xC, d1 + 1),\n getX(batch, xR, xC, d1 + 2),\n getX(batch, xR, xC, d1 + 3)\n );\n dotProd += dot(xValues, wValues);\n } else {\n vec4 xValues = vec4(\n getX(batch, d1, xR, xC),\n getX(batch, d1 + 1, xR, xC),\n getX(batch, d1 + 2, xR, xC),\n getX(batch, d1 + 3, xR, xC)\n );\n dotProd += dot(xValues, wValues);\n }\n }\n\n if ("+(1===h)+") {\n\n if ("+d+") {\n dotProd +=\n getX(batch, xR, xC, "+p+") *\n getW(wR, wC, "+p+", d2);\n } else {\n dotProd +=\n getX(batch, "+p+", xR, xC) *\n getW(wR, wC, "+p+", d2);\n }\n\n } else if ("+(2===h)+") {\n vec2 wValues = vec2(\n getW(wR, wC, "+p+", d2),\n getW(wR, wC, "+p+" + 1, d2)\n );\n\n if ("+d+") {\n vec2 xValues = vec2(\n getX(batch, xR, xC, "+p+"),\n getX(batch, xR, xC, "+p+" + 1)\n );\n dotProd += dot(xValues, wValues);\n } else {\n vec2 xValues = vec2(\n getX(batch, "+p+", xR, xC),\n getX(batch, "+p+" + 1, xR, xC)\n );\n dotProd += dot(xValues, wValues);\n }\n\n } else if ("+(3===h)+") {\n vec3 wValues = vec3(\n getW(wR, wC, "+p+", d2),\n getW(wR, wC, "+p+" + 1, d2),\n getW(wR, wC, "+p+" + 2, d2)\n );\n\n if ("+d+") {\n vec3 xValues = vec3(\n getX(batch, xR, xC, "+p+"),\n getX(batch, xR, xC, "+p+" + 1),\n getX(batch, xR, xC, "+p+" + 2)\n );\n dotProd += dot(xValues, wValues);\n } else {\n vec3 xValues = vec3(\n getX(batch, "+p+", xR, xC),\n getX(batch, "+p+" + 1, xR, xC),\n getX(batch, "+p+" + 2, xR, xC)\n );\n dotProd += dot(xValues, wValues);\n }\n\n }\n }\n }\n\n float result = dotProd;\n "+w+"\n "+b+"\n setOutput(result);\n }\n "},_i=function(e){this.variableNames=["x","W"],this.outputShape=e.outShape;var t=e.padInfo.front,n=e.padInfo.top,r=e.padInfo.left,o=e.strideDepth,i=e.strideHeight,a=e.strideWidth,s=e.dilationDepth,u=e.dilationHeight,c=e.dilationWidth,l=e.filterDepth,f=e.filterHeight,p=e.filterWidth,h=4*Math.floor(e.inChannels/4),d=e.inChannels%4;this.userCode="\n const ivec3 strides = ivec3("+o+", "+i+", "+a+");\n const ivec3 pads = ivec3("+t+", "+n+", "+r+");\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int d2 = coords.u;\n\n ivec3 xFRCCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;\n int xFCorner = xFRCCorner.x;\n int xRCorner = xFRCCorner.y;\n int xCCorner = xFRCCorner.z;\n\n // Convolve x(?, ?, ?, d1) with w(:, :, :, d1, d2) to get\n // y(yF, yR, yC, d2). ? = to be determined. : = across all\n // values in that axis.\n float dotProd = 0.0;\n for (int wF = 0; wF < "+l+"; wF++) {\n int xF = xFCorner + wF * "+s+";\n\n if (xF < 0 || xF >= "+e.inDepth+") {\n continue;\n }\n\n for (int wR = 0; wR < "+f+"; wR++) {\n int xR = xRCorner + wR * "+u+";\n\n if (xR < 0 || xR >= "+e.inHeight+") {\n continue;\n }\n\n for (int wC = 0; wC < "+p+"; wC++) {\n int xC = xCCorner + wC * "+c+";\n\n if (xC < 0 || xC >= "+e.inWidth+") {\n continue;\n }\n\n for (int d1 = 0; d1 < "+h+"; d1 += 4) {\n vec4 xValues = vec4(\n getX(batch, xF, xR, xC, d1),\n getX(batch, xF, xR, xC, d1 + 1),\n getX(batch, xF, xR, xC, d1 + 2),\n getX(batch, xF, xR, xC, d1 + 3)\n );\n vec4 wValues = vec4(\n getW(wF, wR, wC, d1, d2),\n getW(wF, wR, wC, d1 + 1, d2),\n getW(wF, wR, wC, d1 + 2, d2),\n getW(wF, wR, wC, d1 + 3, d2)\n );\n\n dotProd += dot(xValues, wValues);\n }\n\n if ("+(1===d)+") {\n dotProd +=\n getX(batch, xF, xR, xC, "+h+") *\n getW(wF, wR, wC, "+h+", d2);\n } else if ("+(2===d)+") {\n vec2 xValues = vec2(\n getX(batch, xF, xR, xC, "+h+"),\n getX(batch, xF, xR, xC, "+h+" + 1)\n );\n vec2 wValues = vec2(\n getW(wF, wR, wC, "+h+", d2),\n getW(wF, wR, wC, "+h+" + 1, d2)\n );\n dotProd += dot(xValues, wValues);\n } else if ("+(3===d)+") {\n vec3 xValues = vec3(\n getX(batch, xF, xR, xC, "+h+"),\n getX(batch, xF, xR, xC, "+h+" + 1),\n getX(batch, xF, xR, xC, "+h+" + 2)\n );\n vec3 wValues = vec3(\n getW(wF, wR, wC, "+h+", d2),\n getW(wF, wR, wC, "+h+" + 1, d2),\n getW(wF, wR, wC, "+h+" + 2, d2)\n );\n dotProd += dot(xValues, wValues);\n }\n }\n }\n }\n setOutput(dotProd);\n }\n "},Ni=function(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=null),void 0===r&&(r=!1),this.variableNames=["x","W"],this.outputShape=e.outShape;var o=e.inHeight,i=e.inWidth,a=e.padInfo.top,s=e.padInfo.left,u=e.strideHeight,c=e.strideWidth,l=e.dilationHeight,f=e.dilationWidth,p=e.filterHeight,h=e.filterWidth,d=e.outChannels/e.inChannels,m="",g="";n&&(m=r?"float activation(float a) {\n float b = getPreluActivationWeightsAtOutCoords();\n "+n+"\n }":"\n float activation(float x) {\n "+n+"\n }\n ",g="result = activation(result);");var v=t?"result += getBiasAtOutCoords();":"";t&&this.variableNames.push("bias"),r&&this.variableNames.push("preluActivationWeights"),this.userCode="\n "+m+"\n\n const ivec2 strides = ivec2("+u+", "+c+");\n const ivec2 pads = ivec2("+a+", "+s+");\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords.x;\n ivec2 xRCCorner = coords.yz * strides - pads;\n int d2 = coords.w;\n int d1 = d2 / "+d+";\n int q = d2 - d1 * "+d+";\n\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // Convolve x(?, ?, d1) with w(:, :, d1, q) to get y(yR, yC, d2).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n // TO DO(dsmilkov): Flatten the two for loops and vec4 the operations.\n for (int wR = 0; wR < "+p+"; wR++) {\n int xR = xRCorner + wR * "+l+";\n\n if (xR < 0 || xR >= "+o+") {\n continue;\n }\n\n for (int wC = 0; wC < "+h+"; wC++) {\n int xC = xCCorner + wC * "+f+";\n\n if (xC < 0 || xC >= "+i+") {\n continue;\n }\n\n float xVal = getX(batch, xR, xC, d1);\n float wVal = getW(wR, wC, d1, q);\n dotProd += xVal * wVal;\n }\n }\n\n float result = dotProd;\n "+v+"\n "+g+"\n setOutput(result);\n }\n "},Pi=function(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=null),void 0===r&&(r=!1),this.variableNames=["x","W"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=e.outShape;for(var o=e.inHeight,i=e.inWidth,a=e.padInfo.top,s=e.padInfo.left,u=e.strideHeight,c=e.strideWidth,l=e.dilationHeight,f=e.dilationWidth,p=e.filterHeight,h=e.filterWidth,d=h,m="int xR; int xC; int xCOffset;",g=0;g<p;g++)for(var v=0;v<h;v++)m+="\n vec4 xTexelR"+g+"C"+2*v+" = vec4(0.);\n vec4 wR"+g+"C"+v+" = vec4(0.);\n vec4 xR"+g+"C"+v+" = vec4(0.);";for(g=0;g<p;g++)for(var y=0;y<d;y++){if(m+="\n xR = xRCorner + "+g*l+";\n xC = xCCorner + "+(v=2*y)*f+";\n ",1===c){if(v<h&&(m+=s%2==1?"\n xCOffset = xC + 1;\n if(xR >= 0 && xR < "+o+" && xCOffset >= 0 && xCOffset < "+i+") {\n xTexelR"+g+"C"+v+" = getX(batch, xR, xCOffset, d1);\n\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if(xCOffset + 1 >= "+i+") {\n xTexelR"+g+"C"+v+".zw = vec2(0.);\n }\n } else {\n xTexelR"+g+"C"+v+" = vec4(0.);\n }\n\n xCOffset = xC + 1 - 2;\n if(xR >= 0 && xR < "+o+" && xCOffset >= 0 && xCOffset < "+i+") {\n vec4 previous = getX(batch, xR, xCOffset, d1);\n\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if(xCOffset + 1 >= "+i+") {\n previous.zw = vec2(0.);\n }\n\n xR"+g+"C"+v+" = vec4(previous.zw, xTexelR"+g+"C"+v+".xy);\n } else {\n xR"+g+"C"+v+" = vec4(0, 0, xTexelR"+g+"C"+v+".xy);\n }\n ":"\n if(xR >= 0 && xR < "+o+" && xC >= 0 && xC < "+i+") {\n xTexelR"+g+"C"+v+" = getX(batch, xR, xC, d1);\n } else {\n xTexelR"+g+"C"+v+" = vec4(0.);\n }\n\n xR"+g+"C"+v+" = xTexelR"+g+"C"+v+";\n ",v+1<h)){var b=s%2==0?G(f):f;f%2==0&&s%2==1||f%2!=0&&s%2!=1?(m+="\n xCOffset = xC + "+s%2+" + "+b+";\n\n if(xR >= 0 && xR < "+o+" &&\n xCOffset >= 0 && xCOffset < "+i+") {\n xTexelR"+g+"C"+(v+2)+" = getX(batch, xR, xCOffset, d1);\n }\n ",f>1&&(m+="\n xCOffset -= 2;\n if(xR >= 0 && xR < "+o+" &&\n xCOffset >= 0 && xCOffset < "+i+") {\n xTexelR"+g+"C"+v+" = getX(batch, xR, xCOffset, d1);\n } else {\n xTexelR"+g+"C"+v+" = vec4(0.);\n }\n "),m+="\n xR"+g+"C"+(v+1)+" = vec4(\n xTexelR"+g+"C"+v+".zw, xTexelR"+g+"C"+(v+2)+".xy);\n "):m+="\n xCOffset = xC + "+b+";\n\n if(xR >= 0 && xR < "+o+" &&\n xCOffset >= 0 && xCOffset < "+i+") {\n xTexelR"+g+"C"+(v+2)+" = getX(batch, xR, xCOffset, d1);\n }\n\n xR"+g+"C"+(v+1)+" = xTexelR"+g+"C"+(v+2)+";\n "}}else v<h&&(m+="\n if(xR >= 0 && xR < "+o+") {\n ",s%2==1?(m+="\n xCOffset = xC + 1 - "+c+";\n if(xCOffset >= 0 && xCOffset < "+i+") {\n xTexelR"+g+"C"+v+" = getX(batch, xR, xCOffset, d1);\n } else {\n xTexelR"+g+"C"+v+" = vec4(0.);\n }\n\n if(xC + 1 >= 0 && xC + 1 < "+i+") {\n xTexelR"+g+"C"+(v+2)+" = getX(batch, xR, xC + 1, d1);\n } else {\n xTexelR"+g+"C"+(v+2)+" = vec4(0.);\n }\n\n xR"+g+"C"+v+" = vec4(\n xTexelR"+g+"C"+v+".zw, xTexelR"+g+"C"+(v+2)+".zw);\n ",v+1<h&&(m+="\n vec4 final = vec4(0.);\n xCOffset = xC + 1 + "+c+";\n if(xCOffset >= 0 && xCOffset < "+i+") {\n final = getX(batch, xR, xCOffset, d1);\n }\n xR"+g+"C"+(v+1)+" = vec4(xTexelR"+g+"C"+(v+2)+".xy, final.xy);\n ")):(m+="\n if(xC >= 0 && xC < "+i+") {\n xTexelR"+g+"C"+v+" = getX(batch, xR, xC, d1);\n } else {\n xTexelR"+g+"C"+v+" = vec4(0.);\n }\n\n xCOffset = xC + "+c+";\n if(xCOffset >= 0 && xCOffset < "+i+") {\n xTexelR"+g+"C"+(v+2)+" = getX(batch, xR, xCOffset, d1);\n } else {\n xTexelR"+g+"C"+(v+2)+" = vec4(0.);\n }\n\n xR"+g+"C"+v+" = vec4(\n xTexelR"+g+"C"+v+".xy, xTexelR"+g+"C"+(v+2)+".xy);\n ",v+1<h&&(m+="\n xR"+g+"C"+(v+1)+" = vec4(\n xTexelR"+g+"C"+v+".zw, xTexelR"+g+"C"+(v+2)+".zw);\n ")),m+="}");v<h&&(m+="\n vec4 wTexelR"+g+"C"+v+" = getW("+g+", "+v+", d1, q);\n wR"+g+"C"+v+" = vec4(wTexelR"+g+"C"+v+".xz, wTexelR"+g+"C"+v+".xz);\n ",v+1<h&&(m+="\n vec4 wTexelR"+g+"C"+(v+1)+" = getW("+g+", "+(v+1)+", d1, q);\n wR"+g+"C"+(v+1)+" =\n vec4(wTexelR"+g+"C"+(v+1)+".xz, wTexelR"+g+"C"+(v+1)+".xz);"))}for(g=0;g<p;g++)for(v=0;v<h;v++)m+="dotProd += xR"+g+"C"+v+" * wR"+g+"C"+v+";";var w="",x="";n&&(w=r?"vec4 activation(vec4 a) {\n vec4 b = getPreluActivationWeightsAtOutCoords();\n "+n+"\n }":"vec4 activation(vec4 x) {\n "+n+"\n }",x="result = activation(result);");var A=t?"result += getBiasAtOutCoords();":"";t&&this.variableNames.push("bias"),r&&this.variableNames.push("preluActivationWeights"),this.userCode="\n "+w+"\n\n const ivec2 strides = ivec2("+u+", "+c+");\n const ivec2 pads = ivec2("+a+", "+s+");\n\n void main() {\n\n ivec4 coords = getOutputCoords();\n int batch = coords.x;\n ivec2 xRCCorner = coords.yz * strides - pads;\n int d2 = coords.w;\n int d1 = d2;\n int q = 0;\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n vec4 dotProd = vec4(0.);\n\n "+m+"\n\n vec4 result = dotProd;\n "+A+"\n "+x+"\n setOutput(result);\n }\n "},Mi=function(e,t,n,r,o){this.variableNames=["Image","Boxes","BoxInd"],this.outputShape=[];var i=e[0],a=e[1],s=e[2],u=e[3],c=t[0],l=n[0],f=n[1];this.outputShape=[c,l,f,u];var p="bilinear"===r?1:0,h=[a-1+".0",s-1+".0"],d=h[0],m=h[1],g=l>1?[""+(a-1)/(l-1),"(y2-y1) * height_ratio","y1*"+d+" + float(y)*(height_scale)"]:["0.0","0.0","0.5 * (y1+y2) * "+d],v=g[0],y=g[1],b=g[2],w=f>1?[""+(s-1)/(f-1),"(x2-x1) * width_ratio","x1*"+m+" + float(x)*(width_scale)"]:["0.0","0.0","0.5 * (x1+x2) * "+m],x=w[0],A=w[1],E=w[2];this.userCode="\n const float height_ratio = float("+v+");\n const float width_ratio = float("+x+");\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int y = coords[1];\n int x = coords[2];\n int d = coords[3];\n\n // get box vals\n float y1 = getBoxes(b,0);\n float x1 = getBoxes(b,1);\n float y2 = getBoxes(b,2);\n float x2 = getBoxes(b,3);\n\n // get image in batch index\n int bInd = round(getBoxInd(b));\n if(bInd < 0 || bInd >= "+i+") {\n return;\n }\n\n float height_scale = "+y+";\n float width_scale = "+A+";\n\n float in_y = "+b+";\n if( in_y < 0.0 || in_y > "+d+" ) {\n setOutput(float("+o+"));\n return;\n }\n float in_x = "+E+";\n if( in_x < 0.0 || in_x > "+m+" ) {\n setOutput(float("+o+"));\n return;\n }\n\n vec2 sourceFracIndexCR = vec2(in_x,in_y);\n if("+p+" == 1) {\n // Compute the four integer indices.\n ivec2 sourceFloorCR = ivec2(sourceFracIndexCR);\n ivec2 sourceCeilCR = ivec2(ceil(sourceFracIndexCR));\n\n float topLeft = getImage(b, sourceFloorCR.y, sourceFloorCR.x, d);\n float bottomLeft = getImage(b, sourceCeilCR.y, sourceFloorCR.x, d);\n float topRight = getImage(b, sourceFloorCR.y, sourceCeilCR.x, d);\n float bottomRight = getImage(b, sourceCeilCR.y, sourceCeilCR.x, d);\n\n vec2 fracCR = sourceFracIndexCR - vec2(sourceFloorCR);\n\n float top = topLeft + (topRight - topLeft) * fracCR.x;\n float bottom = bottomLeft + (bottomRight - bottomLeft) * fracCR.x;\n float newValue = top + (bottom - top) * fracCR.y;\n setOutput(newValue);\n } else {\n // Compute the coordinators of nearest neighbor point.\n ivec2 sourceNearestCR = ivec2(floor(\n sourceFracIndexCR + vec2(0.5,0.5)));\n float newValue = getImage(b, sourceNearestCR.y, sourceNearestCR.x, d);\n setOutput(newValue);\n }\n }\n "},Fi=function(e,t,n){this.variableNames=["x"],this.outputShape=e;var r=e.length,o=e[e.length-1],i=n?"<":">";this.userCode="\n int getIndex(int i) {\n "+(n?"return "+o+" -i - 1;":"return i;")+"\n }\n\n void main() {\n "+ii(r)+" coords = getOutputCoords();\n int end = "+Li(r,"coords")+";\n float val = 0.0;\n for (int i = "+o+" - 1; i >= 0; i -= 1) {\n int idx = getIndex(i);\n if (idx "+i+" end) {\n continue;\n }\n if (idx == end && "+t+") {\n continue;\n }\n "+Li(r,"coords")+" = idx;\n val += getX("+function(e,t){if(1===e)return""+t;if(2===e)return t+".x, "+t+".y";if(3===e)return t+".x, "+t+".y, "+t+".z";if(4===e)return t+".x, "+t+".y, "+t+".z, "+t+".w";throw Error("Cumulative sum for rank "+e+" is not yet supported")}(r,"coords")+");\n }\n setOutput(val);\n }\n "};function Li(e,t){if(1===e)return""+t;if(2===e)return t+".y";if(3===e)return t+".z";if(4===e)return t+".w";throw Error("Cumulative sum for rank "+e+" is not yet supported")}var Ui=function(e){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0,this.outPackingScheme=ut.DENSE;var t=gt(e),n=Ho();this.outputShape=e,this.userCode="\n ivec3 outCoordsFromFlatIndex(int index) {\n "+Go(["r","c","d"],e)+"\n return ivec3(r, c, d);\n }\n\n void main() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+t[0]+", "+t[1]+"));\n int index = 4 * (resTexRC.x * "+t[1]+" + resTexRC.y);\n\n vec4 result = vec4(0.);\n\n for (int i=0; i<4; i++) {\n int flatIndex = index + i;\n ivec3 rc = outCoordsFromFlatIndex(flatIndex);\n result[i] = getA(rc.x, rc.y, rc.z);\n }\n\n "+n.output+" = result;\n }\n "},Wi=function(e){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outPackingScheme=ut.DENSE;var t=gt(e),n=Ho();this.outputShape=e,this.userCode="\n ivec3 outCoordsFromFlatIndex(int index) {\n "+Go(["r","c","d"],e)+"\n return ivec3(r, c, d);\n }\n\n void main() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+t[0]+", "+t[1]+"));\n int index = 4 * (resTexRC.x * "+t[1]+" + resTexRC.y);\n\n vec4 result = vec4(0.);\n\n for (int i=0; i<4; i++) {\n int flatIndex = index + i;\n ivec3 rc = outCoordsFromFlatIndex(flatIndex);\n result[i] = getChannel(getA(rc.x, rc.y, rc.z), vec2(rc.y, rc.z));\n }\n\n "+n.output+" = result;\n }\n "},zi=function(){function e(e,t,n){this.variableNames=["x"],this.outputShape=[],this.outputShape=e,this.blockSize=t,this.dataFormat=n,this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int h = "+this.getHeightCoordString()+";\n int w = "+this.getWidthCoordString()+";\n int d = "+this.getDepthCoordString()+";\n\n int in_h = h / "+t+";\n int offset_h = imod(h, "+t+");\n int in_w = w / "+t+";\n int offset_w = imod(w, "+t+");\n int offset_d = (offset_h * "+t+" + offset_w) *\n "+this.getOutputDepthSize()+";\n int in_d = d + offset_d;\n\n float result = "+this.getInputSamplingString()+";\n setOutput(result);\n }\n "}return e.prototype.getHeightCoordString=function(){return"NHWC"===this.dataFormat?"coords[1]":"coords[2]"},e.prototype.getWidthCoordString=function(){return"NHWC"===this.dataFormat?"coords[2]":"coords[3]"},e.prototype.getDepthCoordString=function(){return"NHWC"===this.dataFormat?"coords[3]":"coords[1]"},e.prototype.getOutputDepthSize=function(){return"NHWC"===this.dataFormat?this.outputShape[3]:this.outputShape[1]},e.prototype.getInputSamplingString=function(){return"NHWC"===this.dataFormat?"getX(b, in_h, in_w, in_d)":"getX(b, in_d, in_h, in_w)"},e}(),qi=function(e){this.variableNames=["X"],this.outputShape=[e,e],this.userCode="\n void main() {\n ivec2 coords = getOutputCoords();\n float val = coords[0] == coords[1] ? getX(coords[0]) : 0.0;\n setOutput(val);\n }\n "},Qi=function(e){this.variableNames=["A"],this.outTexUsage=ct.DOWNLOAD;var t=Ho();this.outputShape=e,this.userCode="\n "+Zo+"\n\n void main() {\n float x = getAAtOutCoords();\n "+t.output+" = encode_float(x);\n }\n "},Vi=function(e){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!1,this.outTexUsage=ct.DOWNLOAD;var t=Ho();this.outputShape=e,this.userCode="\n "+Zo+"\n\n void main() {\n ivec3 coords = getOutputCoords();\n float x = getChannel(getAAtOutCoords(), vec2(coords.y, coords.z));\n "+t.output+" = encode_float(x);\n }\n "},Hi=function(e,t,n){void 0===n&&(n=!1),this.variableNames=["A"];var r=Ho(),o=t[0],i=t[1];this.outputShape=e;var a="result";n&&(a="floor(result * 255. + 0.5)"),this.userCode="\n "+Xo(e)+"\n\n void main() {\n ivec3 coords = getOutputCoords();\n\n int flatIndex = getFlatIndex(coords);\n int offset = imod(flatIndex, 4);\n\n flatIndex = idiv(flatIndex, 4, 1.);\n \n int r = flatIndex / "+i+";\n int c = imod(flatIndex, "+i+");\n vec2 uv = (vec2(c, r) + halfCR) / vec2("+i+".0, "+o+".0);\n vec4 values = "+r.texture2D+"(A, uv);\n\n float result;\n\n if(offset == 0) {\n result = values[0];\n } else if(offset == 1) {\n result = values[1];\n } else if(offset == 2) {\n result = values[2];\n } else {\n result = values[3];\n }\n\n "+r.output+" = vec4("+a+", 0., 0., 0.);\n }\n "},Gi=function(e,t,n){void 0===n&&(n=!1),this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0;var r=Ho(),o=t[0],i=t[1];this.outputShape=e;var a="",s="result";n&&(s="floor(result * 255. + 0.5)");for(var u=0;u<=1;u++)for(var c=0;c<=1;c++){var l=2*u+c;a+="\n localCoords = coords;\n if(localCoords[2] + "+c+" < "+e[2]+") {\n localCoords[2] += "+c+";\n if(localCoords[1] + "+u+" < "+e[1]+") {\n localCoords[1] += "+u+";\n\n flatIndex = getFlatIndex(localCoords);\n offset = imod(flatIndex, 4);\n\n flatIndex = idiv(flatIndex, 4, 1.);\n\n r = flatIndex / "+i+";\n c = imod(flatIndex, "+i+");\n uv = (vec2(c, r) + halfCR) / vec2("+i+".0, "+o+".0);\n values = "+r.texture2D+"(A, uv);\n\n if(offset == 0) {\n result["+l+"] = values[0];\n } else if(offset == 1) {\n result["+l+"] = values[1];\n } else if(offset == 2) {\n result["+l+"] = values[2];\n } else {\n result["+l+"] = values[3];\n }\n }\n }\n "}this.userCode="\n "+Xo(e)+"\n\n void main() {\n ivec3 coords = getOutputCoords();\n\n vec4 result = vec4(0.);\n int flatIndex, r, c, offset;\n ivec3 localCoords;\n vec2 uv;\n vec4 values;\n\n "+a+"\n\n "+r.output+" = "+s+";\n }\n "},Xi=function(e,t,n){this.variableNames=["real","imag"];var r=t[1];this.outputShape=t;var o=n?"2.0 * "+Math.PI:"-2.0 * "+Math.PI,i=n?r+".0":"1.0";this.userCode="\n const float exponentMultiplier = "+o+";\n\n float unaryOpComplex(float real, float expR, float imag, float expI) {\n "+e+"\n }\n\n float mulMatDFT(int batch, int index) {\n float indexRatio = float(index) / float("+r+");\n float exponentMultiplierTimesIndexRatio =\n exponentMultiplier * indexRatio;\n\n float result = 0.0;\n\n for (int i = 0; i < "+r+"; i++) {\n // x = (-2|2 * PI / N) * index * i;\n float x = exponentMultiplierTimesIndexRatio * float(i);\n float expR = cos(x);\n float expI = sin(x);\n float real = getReal(batch, i);\n float imag = getImag(batch, i);\n\n result +=\n unaryOpComplex(real, expR, imag, expI) / "+i+";\n }\n\n return result;\n }\n\n void main() {\n ivec2 coords = getOutputCoords();\n setOutput(mulMatDFT(coords[0], coords[1]));\n }\n "},Zi=function(){function e(e,t){this.outputShape=[],this.variableNames=["x"],this.outputShape=e,this.userCode="\n uniform float value;\n void main() {\n // Input can be obtained from uniform value.\n setOutput(value);\n }\n "}return e.prototype.getCustomSetupFunc=function(e){var t=this;return function(n,r){null==t.valueLoc&&(t.valueLoc=n.getUniformLocationNoThrow(r,"value")),n.gl.uniform1f(t.valueLoc,e)}},e}(),Ki=function(e,t,n){this.variableNames=["A","indices"];var r=e.slice();r[n]=t,this.outputShape=r,this.rank=r.length;var o=ii(this.rank),i=function(e,t){var n=e.length;if(n>4)throw Error("Gather for rank "+n+" is not yet supported");if(1===n)return"int(getIndices(resRC))";for(var r=["resRC.x","resRC.y","resRC.z","resRC.w"],o=[],i=0;i<e.length;i++)i===t?o.push("int(getIndices("+r[i]+"))"):o.push(""+r[i]);return o.join()}(e,n);this.userCode="\n void main() {\n "+o+" resRC = getOutputCoords();\n setOutput(getA("+i+"));\n }\n "},Ji=function(e,t,n){this.sliceDim=e,this.strides=t,this.variableNames=["x","indices"],this.outputShape=n;var r=ii(t.length),o=ii(n.length),i=this.sliceDim>1?"strides[j]":"strides";this.userCode="\n "+r+" strides = "+r+"("+this.strides+");\n void main() {\n "+o+" coords = getOutputCoords();\n int flattenIndex = 0;\n for (int j = 0; j < "+this.sliceDim+"; j++) {\n int index = round(getIndices(coords[0], j));\n flattenIndex += index * "+i+";\n }\n setOutput(getX(flattenIndex, coords[1]));\n }\n "};function Yi(e,t){var n=Ho();return Et(e,t,n.version+"\n precision highp float;\n "+n.attribute+" vec3 clipSpacePos;\n "+n.attribute+" vec2 uv;\n "+n.varyingVs+" vec2 resultUV;\n\n void main() {\n gl_Position = vec4(clipSpacePos, 1);\n resultUV = uv;\n }")}function $i(e,t){return Ot(e,t,new Float32Array([-1,1,0,0,1,-1,-1,0,0,0,1,1,0,1,1,1,-1,0,1,0]))}function ea(e,t){return Dt(e,t,new Uint16Array([0,1,2,2,1,3]))}function ta(e,t,n,r,o,i,a){_t(n,r);var s=Bt(e,t),u=e.TEXTURE_2D;return bt(e,t,(function(){return e.bindTexture(u,s)})),bt(e,t,(function(){return e.texParameteri(u,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE)})),bt(e,t,(function(){return e.texParameteri(u,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)})),bt(e,t,(function(){return e.texParameteri(u,e.TEXTURE_MIN_FILTER,e.NEAREST)})),bt(e,t,(function(){return e.texParameteri(u,e.TEXTURE_MAG_FILTER,e.NEAREST)})),bt(e,t,(function(){return e.texImage2D(u,0,o,n,r,0,i,a,null)})),bt(e,t,(function(){return e.bindTexture(e.TEXTURE_2D,null)})),s}function na(e,t,n,r,o){var i=mt(n,r);return ta(e,t,i[0],i[1],o.internalFormatFloat,o.textureFormatFloat,e.FLOAT)}function ra(e,t,n,r,o){var i=mt(n,r);return ta(e,t,i[0],i[1],o.internalFormatHalfFloat,o.textureFormatFloat,o.textureTypeHalfFloat)}function oa(e,t,n,r,o){var i=mt(n,r);return ta(e,t,i[0],i[1],e.RGBA,e.RGBA,e.UNSIGNED_BYTE)}function ia(e,t,n,r,o){var i=vt(n,r);return ta(e,t,i[0],i[1],o.internalFormatPackedFloat,e.RGBA,e.FLOAT)}function aa(e,t,n,r,o){var i=vt(n,r);return ta(e,t,i[0],i[1],o.internalFormatPackedHalfFloat,e.RGBA,o.textureTypeHalfFloat)}function sa(e,t,n,r){return bt(e,t,(function(){return e.bindBuffer(e.ARRAY_BUFFER,r)})),Pt(e,t,n,"clipSpacePos",r,3,20,0)&&Pt(e,t,n,"uv",r,2,20,12)}function ua(e,t,n,r,o,i,a){var s,u,c;bt(e,t,(function(){return e.bindTexture(e.TEXTURE_2D,n)})),i instanceof Uint8Array?(s=new Uint8Array(r*o*4),u=e.UNSIGNED_BYTE,c=e.RGBA):(s=new Float32Array(r*o*4),u=e.FLOAT,c=a.internalFormatPackedFloat),s.set(i),bt(e,t,(function(){return e.texImage2D(e.TEXTURE_2D,0,c,r,o,0,e.RGBA,u,s)})),bt(e,t,(function(){return e.bindTexture(e.TEXTURE_2D,null)}))}function ca(e,t,n,r){bt(e,t,(function(){return e.bindTexture(e.TEXTURE_2D,n)})),r.data instanceof Uint8Array?bt(e,t,(function(){return e.texImage2D(e.TEXTURE_2D,0,e.RGBA,r.width,r.height,0,e.RGBA,e.UNSIGNED_BYTE,r.data)})):bt(e,t,(function(){return e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,r)})),bt(e,t,(function(){return e.bindTexture(e.TEXTURE_2D,null)}))}function la(e,t,n,r,o){var i=e.createBuffer();bt(e,t,(function(){return e.bindBuffer(e.PIXEL_PACK_BUFFER,i)}));var a=16*n*r;return bt(e,t,(function(){return e.bufferData(e.PIXEL_PACK_BUFFER,a,e.STREAM_READ)})),bt(e,t,(function(){return e.readPixels(0,0,r,n,e.RGBA,e.FLOAT,0)})),bt(e,t,(function(){return e.bindBuffer(e.PIXEL_PACK_BUFFER,null)})),i}function fa(e,t,n){var r=e,o=new Float32Array(n);return r.bindBuffer(r.PIXEL_PACK_BUFFER,t),r.getBufferSubData(r.PIXEL_PACK_BUFFER,0,o),r.bindBuffer(r.PIXEL_PACK_BUFFER,null),o}function pa(e,t,n,r,o){var i=mt(n,r),a=i[0],s=i[1],u=new Uint8Array(n*r*4);return bt(e,t,(function(){return e.readPixels(0,0,a,s,o.downloadTextureFormat,e.UNSIGNED_BYTE,u)})),new Float32Array(u.buffer)}function ha(e,t,n,r,o,i,a,s){var u=e,c=new Float32Array(function(e,t){var n=vt(e,t);return n[0]*n[1]*4}(i,a));return u.bindBuffer(u.PIXEL_PACK_BUFFER,t),u.getBufferSubData(u.PIXEL_PACK_BUFFER,0,c),u.bindBuffer(u.PIXEL_PACK_BUFFER,null),c}function da(e,t,n,r){var o=new Float32Array(n*r*4);return bt(e,t,(function(){return e.readPixels(0,0,r,n,e.RGBA,e.FLOAT,o)})),o}var ma=Object.freeze({createVertexShader:Yi,createVertexBuffer:$i,createIndexBuffer:ea,createFloat32MatrixTexture:na,createFloat16MatrixTexture:ra,createUnsignedBytesMatrixTexture:oa,createPackedMatrixTexture:ia,createFloat16PackedMatrixTexture:aa,bindVertexProgramAttributeStreams:sa,uploadDenseMatrixToTexture:ua,uploadPixelDataToTexture:ca,createBufferFromOutputTexture:la,downloadFloat32MatrixFromBuffer:fa,downloadByteEncodedFloatMatrixFromOutputTexture:pa,downloadPackedMatrixFromBuffer:ha,downloadMatrixFromPackedOutputTexture:da}),ga=function(){function e(e){this.outputTexture=null,this.program=null,this.disposed=!1,this.vertexAttrsAreBound=!1,this.itemsToPoll=[];var t=P().getNumber("WEBGL_VERSION");null!=e?(this.gl=e,ht(t,e)):this.gl=dt(t);var n="WEBGL_color_buffer_float";if(1===P().getNumber("WEBGL_VERSION")){if(this.textureFloatExtension=At(this.gl,this.debug,"OES_texture_float"),nn(this.gl,"OES_texture_half_float"))this.textureHalfFloatExtension=At(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(n),nn(this.gl,"EXT_color_buffer_half_float"))this.colorBufferHalfFloatExtension=At(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(n="EXT_color_buffer_float",nn(this.gl,n))this.colorBufferFloatExtension=this.gl.getExtension(n);else{if(!nn(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=$i(this.gl,this.debug),this.indexBuffer=ea(this.gl,this.debug),this.framebuffer=Nt(this.gl,this.debug),this.textureConfig=yt(this.gl,this.textureHalfFloatExtension)}return Object.defineProperty(e.prototype,"debug",{get:function(){return P().getBool("DEBUG")},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){var e=this;if(!this.disposed){null!=this.program&&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."),null!=this.outputTexture&&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 t=this.gl;bt(t,this.debug,(function(){return t.finish()})),bt(t,this.debug,(function(){return t.bindFramebuffer(t.FRAMEBUFFER,null)})),bt(t,this.debug,(function(){return t.deleteFramebuffer(e.framebuffer)})),bt(t,this.debug,(function(){return t.bindBuffer(t.ARRAY_BUFFER,null)})),bt(t,this.debug,(function(){return t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null)})),bt(t,this.debug,(function(){return t.deleteBuffer(e.indexBuffer)})),this.disposed=!0}},e.prototype.createFloat32MatrixTexture=function(e,t){return this.throwIfDisposed(),na(this.gl,this.debug,e,t,this.textureConfig)},e.prototype.createFloat16MatrixTexture=function(e,t){return this.throwIfDisposed(),ra(this.gl,this.debug,e,t,this.textureConfig)},e.prototype.createUnsignedBytesMatrixTexture=function(e,t){return this.throwIfDisposed(),oa(this.gl,this.debug,e,t,this.textureConfig)},e.prototype.uploadPixelDataToTexture=function(e,t){this.throwIfDisposed(),ca(this.gl,this.debug,e,t)},e.prototype.uploadDenseMatrixToTexture=function(e,t,n,r){this.throwIfDisposed(),ua(this.gl,this.debug,e,t,n,r,this.textureConfig)},e.prototype.createFloat16PackedMatrixTexture=function(e,t){return this.throwIfDisposed(),aa(this.gl,this.debug,e,t,this.textureConfig)},e.prototype.createPackedMatrixTexture=function(e,t){return this.throwIfDisposed(),ia(this.gl,this.debug,e,t,this.textureConfig)},e.prototype.deleteMatrixTexture=function(e){var t=this;this.throwIfDisposed(),this.outputTexture===e&&(zt(this.gl,this.debug,this.framebuffer),this.outputTexture=null),bt(this.gl,this.debug,(function(){return t.gl.deleteTexture(e)}))},e.prototype.downloadByteEncodedFloatMatrixFromOutputTexture=function(e,t,n){var r=this;return this.downloadMatrixDriver(e,(function(){return pa(r.gl,r.debug,t,n,r.textureConfig)}))},e.prototype.downloadPackedMatrixFromBuffer=function(e,t,n,r,o,i){return ha(this.gl,e,0,0,0,o,i,this.textureConfig)},e.prototype.downloadFloat32MatrixFromBuffer=function(e,t){return fa(this.gl,e,t)},e.prototype.createBufferFromTexture=function(e,t,n){this.bindTextureToFrameBuffer(e);var r=la(this.gl,this.debug,t,n,this.textureConfig);return this.unbindTextureToFrameBuffer(),r},e.prototype.createAndWaitForFence=function(){var e=this.createFence(this.gl);return this.pollFence(e)},e.prototype.createFence=function(e){var t,n,r=this;if(P().getBool("WEBGL_FENCE_API_ENABLED")){var o=e,i=o.fenceSync(o.SYNC_GPU_COMMANDS_COMPLETE,0);e.flush(),n=function(){var e=o.clientWaitSync(i,0,0);return e===o.ALREADY_SIGNALED||e===o.CONDITION_SATISFIED},t=i}else P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")>0?(t=this.beginQuery(),this.endQuery(),n=function(){return r.isQueryAvailable(t,P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))}):n=function(){return!0};return{query:t,isFencePassed:n}},e.prototype.downloadMatrixFromPackedTexture=function(e,t,n){var r=this;return this.downloadMatrixDriver(e,(function(){return da(r.gl,r.debug,t,n)}))},e.prototype.createProgram=function(e){this.throwIfDisposed();var t=this.gl,n=Ct(t,this.debug,e),r=Yi(t,this.debug),o=jt(t,this.debug);return bt(t,this.debug,(function(){return t.attachShader(o,r)})),bt(t,this.debug,(function(){return t.attachShader(o,n)})),Tt(t,this.debug,o),this.debug&&Rt(t,this.debug,o),this.vertexAttrsAreBound||(this.setProgram(o),this.vertexAttrsAreBound=sa(t,this.debug,this.program,this.vertexBuffer)),o},e.prototype.deleteProgram=function(e){var t=this;this.throwIfDisposed(),e===this.program&&(this.program=null),null!=e&&bt(this.gl,this.debug,(function(){return t.gl.deleteProgram(e)}))},e.prototype.setProgram=function(e){var t=this;this.throwIfDisposed(),this.program=e,null!=this.program&&this.debug&&Rt(this.gl,this.debug,this.program),bt(this.gl,this.debug,(function(){return t.gl.useProgram(e)}))},e.prototype.getUniformLocation=function(e,t,n){return void 0===n&&(n=!0),this.throwIfDisposed(),n?Ft(this.gl,this.debug,e,t):Lt(this.gl,e,t)},e.prototype.getAttributeLocation=function(e,t){var n=this;return this.throwIfDisposed(),bt(this.gl,this.debug,(function(){return n.gl.getAttribLocation(e,t)}))},e.prototype.getUniformLocationNoThrow=function(e,t){return this.throwIfDisposed(),this.gl.getUniformLocation(e,t)},e.prototype.setInputMatrixTexture=function(e,t,n){this.throwIfDisposed(),this.throwIfNoProgram(),Ut(this.gl,this.debug,this.program,e,t,n)},e.prototype.setOutputMatrixTexture=function(e,t,n){this.setOutputMatrixTextureDriver(e,n,t)},e.prototype.setOutputPackedMatrixTexture=function(e,t,n){this.throwIfDisposed();var r=vt(t,n),o=r[0],i=r[1];this.setOutputMatrixTextureDriver(e,o,i)},e.prototype.setOutputMatrixWriteRegion=function(e,t,n,r){this.setOutputMatrixWriteRegionDriver(n,e,r,t)},e.prototype.setOutputPackedMatrixWriteRegion=function(e,t,n,r){throw new Error("setOutputPackedMatrixWriteRegion not implemented.")},e.prototype.debugValidate=function(){null!=this.program&&Rt(this.gl,this.debug,this.program),qt(this.gl)},e.prototype.executeProgram=function(){this.throwIfDisposed(),this.throwIfNoProgram();var e=this.gl;this.debug&&this.debugValidate(),bt(e,this.debug,(function(){return e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0)}))},e.prototype.blockUntilAllProgramsCompleted=function(){var e=this;this.throwIfDisposed(),bt(this.gl,this.debug,(function(){return e.gl.finish()}))},e.prototype.getQueryTimerExtension=function(){return null==this.disjointQueryTimerExtension&&(this.disjointQueryTimerExtension=At(this.gl,this.debug,2===P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")?"EXT_disjoint_timer_query_webgl2":"EXT_disjoint_timer_query")),this.disjointQueryTimerExtension},e.prototype.getQueryTimerExtensionWebGL2=function(){return this.getQueryTimerExtension()},e.prototype.getQueryTimerExtensionWebGL1=function(){return this.getQueryTimerExtension()},e.prototype.beginQuery=function(){if(2===P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")){var e=this.gl,t=this.getQueryTimerExtensionWebGL2(),n=e.createQuery();return e.beginQuery(t.TIME_ELAPSED_EXT,n),n}var r=this.getQueryTimerExtensionWebGL1(),o=r.createQueryEXT();return r.beginQueryEXT(r.TIME_ELAPSED_EXT,o),o},e.prototype.endQuery=function(){if(2!==P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")){var e=this.getQueryTimerExtensionWebGL1();e.endQueryEXT(e.TIME_ELAPSED_EXT)}else{var t=this.gl,n=this.getQueryTimerExtensionWebGL2();t.endQuery(n.TIME_ELAPSED_EXT)}},e.prototype.waitForQueryAndGetTime=function(e){return D(this,void 0,void 0,(function(){var t=this;return B(this,(function(n){switch(n.label){case 0:return[4,ie((function(){return t.disposed||t.isQueryAvailable(e,P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))}))];case 1:return n.sent(),[2,this.getQueryTime(e,P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))]}}))}))},e.prototype.getQueryTime=function(e,t){if(0===t)return null;if(2===t){var n=this.gl;return n.getQueryParameter(e,n.QUERY_RESULT)/1e6}var r=this.getQueryTimerExtensionWebGL1();return r.getQueryObjectEXT(e,r.QUERY_RESULT_EXT)/1e6},e.prototype.isQueryAvailable=function(e,t){if(0===t)return!0;if(2===t){var n=this.gl,r=this.getQueryTimerExtensionWebGL2(),o=n.getQueryParameter(e,n.QUERY_RESULT_AVAILABLE);return null==this.disjoint&&(this.disjoint=this.gl.getParameter(r.GPU_DISJOINT_EXT)),o&&!this.disjoint}return o=(r=this.getQueryTimerExtensionWebGL1()).getQueryObjectEXT(e,r.QUERY_RESULT_AVAILABLE_EXT),null==this.disjoint&&(this.disjoint=this.gl.getParameter(r.GPU_DISJOINT_EXT)),o&&!this.disjoint},e.prototype.pollFence=function(e){var t=this;return new Promise((function(n){t.addItemToPoll((function(){return e.isFencePassed()}),(function(){return n()}))}))},e.prototype.pollItems=function(){for(var e=function(e){for(var t=0;t<e.length&&e[t]();++t);return t-1}(this.itemsToPoll.map((function(e){return e.isDoneFn}))),t=0;t<=e;++t)(0,this.itemsToPoll[t].resolveFn)();this.itemsToPoll=this.itemsToPoll.slice(e+1)},e.prototype.addItemToPoll=function(e,t){var n=this;this.itemsToPoll.push({isDoneFn:e,resolveFn:t}),this.itemsToPoll.length>1||ie((function(){return n.pollItems(),0===n.itemsToPoll.length}))},e.prototype.bindTextureToFrameBuffer=function(e){this.throwIfDisposed(),Wt(this.gl,this.debug,e,this.framebuffer),this.debug&&qt(this.gl)},e.prototype.unbindTextureToFrameBuffer=function(){null!=this.outputTexture?(Wt(this.gl,this.debug,this.outputTexture,this.framebuffer),this.debug&&qt(this.gl)):zt(this.gl,this.debug,this.framebuffer)},e.prototype.downloadMatrixDriver=function(e,t){this.bindTextureToFrameBuffer(e);var n=t();return this.unbindTextureToFrameBuffer(),n},e.prototype.setOutputMatrixTextureDriver=function(e,t,n){this.throwIfDisposed();var r=this.gl;Wt(r,this.debug,e,this.framebuffer),this.debug&&qt(r),this.outputTexture=e,bt(r,this.debug,(function(){return r.viewport(0,0,t,n)})),bt(r,this.debug,(function(){return r.scissor(0,0,t,n)}))},e.prototype.setOutputMatrixWriteRegionDriver=function(e,t,n,r){var o=this;this.throwIfDisposed(),bt(this.gl,this.debug,(function(){return o.gl.scissor(e,t,n,r)}))},e.prototype.throwIfDisposed=function(){if(this.disposed)throw new Error("Attempted to use disposed GPGPUContext.")},e.prototype.throwIfNoProgram=function(){if(null==this.program)throw new Error("No GPU program is currently set.")},e}();function va(e,t){if(e.length!==t.length)throw Error("Binary was compiled with "+e.length+" inputs, but was executed with "+t.length+" inputs");e.forEach((function(e,n){var r=e.logicalShape,o=t[n],i=o.shape;if(!ee(r,i))throw Error("Binary was compiled with different shapes than the current args. Shapes "+r+" and "+i+" must match");if(!e.isUniform||!o.isUniform){var a=e.texShape,s=o.isUniform?null:o.texData.texShape;if(!ee(a,s))throw Error("Binary was compiled with different texture shapes than the current args. Shape "+a+" and "+s+" must match")}}))}var ya=function(e,t,n){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=e;for(var r=n.filterWidth,o=n.inChannels,i=n.strideWidth,a=n.strideHeight,s=n.padInfo,u=n.outWidth,c=n.dilationWidth,l=n.dilationHeight,f=n.dataFormat,p=s.left,h=s.top,d=o*r,m=Ho(),g="channelsLast"===f,v=g?0:1,y=g?1:2,b="",w=0;w<=1;w++)for(var x=0;x<=1;x++)b+="\n blockIndex = rc.y + "+x+";\n pos = rc.x + "+w+";\n\n if(blockIndex < "+e[1]+" && pos < "+e[0]+") {\n offsetY = int(blockIndex / ("+u+")) * "+a+" - "+h+";\n d0 = offsetY + "+l+" * (pos / "+d+");\n\n if(d0 < "+t[v]+" && d0 >= 0) {\n\n offsetX = int(mod(float(blockIndex), "+u+".) * "+i+". - "+p+".);\n d1 = offsetX + "+c+" * (int(mod(float(pos), "+d+".) / "+o+".));\n\n if(d1 < "+t[y]+" && d1 >= 0) {\n\n ch = int(mod(float(pos), "+o+".));\n\n if ("+g+") {\n innerDims = vec2(d1, ch);\n result["+(2*w+x)+"] = getChannel(\n getA(d0, int(innerDims.x),\n int(innerDims.y)), innerDims);\n } else {\n innerDims = vec2(d0, d1);\n result["+(2*w+x)+"] = getChannel(\n getA(ch, int(innerDims.x),\n int(innerDims.y)), innerDims);\n }\n }\n }\n }\n ";this.userCode="\n void main() {\n ivec2 rc = getOutputCoords();\n\n vec4 result = vec4(0);\n\n int blockIndex, pos, offsetY, d0, offsetX, d1, ch;\n vec2 innerDims;\n\n "+b+"\n\n "+m.output+" = result;\n }\n "},ba=function(e,t,n,r,o){this.variableNames=["x"],this.outputShape=[];var i,a=t,s=e[3]-1;this.outputShape=e;var u="float("+n+") + float("+r+") * sum";i=.5===o?"inversesqrt("+u+")":1===o?"1.0/("+u+")":"exp(log("+u+") * float(-"+o+"));",this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int r = coords[1];\n int c = coords[2];\n int d = coords[3];\n float x = getX(b, r, c, d);\n float sum = 0.0;\n for (int j = -"+a+"; j <= "+a+"; j++) {\n int idx = d + j;\n if (idx >= 0 && idx <= "+s+") {\n float z = getX(b, r, c, idx);\n sum += z * z;\n }\n }\n float val = x * "+i+";\n setOutput(val);\n }\n "},wa=function(e,t,n,r,o){this.variableNames=["inputImage","outputImage","dy"],this.outputShape=[],this.outputShape=e,this.depth=e[3],this.depthRadius=t,this.bias=n,this.alpha=r,this.beta=o,this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int r = coords[1];\n int c = coords[2];\n\n float result = 0.0;\n for (int d = 0; d < "+this.depth+"; ++d) {\n int depthBegin = int(max(0.0, float(d - "+t+")));\n int depthEnd = int(min(float("+this.depth+"),\n float(d + "+t+" + 1)));\n\n const int MIN_DEPTH_BEGIN = 0;\n const int MAX_DEPTH_END = "+this.depth+";\n\n float norm = 0.0;\n for (int k = MIN_DEPTH_BEGIN; k < MAX_DEPTH_END; ++k) {\n if (k < depthBegin){\n continue;\n }\n else if (k >= depthBegin && k < depthEnd) {\n norm += getInputImage(b, r, c, k) * getInputImage(b, r, c, k);\n }\n else {\n break;\n }\n }\n\n norm = float("+r+") * norm + float("+n+");\n\n for(int k = MIN_DEPTH_BEGIN; k < MAX_DEPTH_END; ++k){\n if (k < depthBegin){\n continue;\n }\n else if (k >= depthBegin && k < depthEnd){\n float dyi = -2.0 * float("+r+")\n * float("+o+")\n * getInputImage(b ,r ,c, k) * getOutputImage(b, r, c, d)\n / norm;\n if (k == d) {\n dyi += pow(norm, -1.0 * "+o+");\n }\n if (k == coords[3]) {\n dyi *= getDy(b, r, c, d);\n result += dyi;\n }\n }\n else {\n break;\n }\n }\n }\n setOutput(result);\n }\n "},xa=function(e,t,n,r,o){this.variableNames=["x"],this.outputShape=[],this.packedInputs=!0,this.packedOutput=!0;var i,a=t,s=e[3]-1;this.outputShape=e;var u="float("+n+") + float("+r+") * sum";i=.5===o?"inversesqrt("+u+")":1===o?"1.0/("+u+")":"exp(log("+u+") * float(-"+o+"));",this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords.x;\n int r = coords.y;\n int c = coords.z;\n int d = coords.w;\n\n bool hasNextCol = d < "+this.outputShape[3]+";\n bool hasNextRow = c < "+this.outputShape[2]+";\n\n vec4 sum = vec4(0.);\n vec4 xFragAtOutputCoords = getX(b, r, c, d);\n\n vec4 xAtOutputCoords = vec4(\n getChannel(xFragAtOutputCoords, vec2(c, d)),\n hasNextCol ?\n getChannel(xFragAtOutputCoords, vec2(c, d + 1)) : 0.0,\n hasNextRow ?\n getChannel(xFragAtOutputCoords , vec2(c + 1, d)) : 0.0,\n (hasNextRow && hasNextCol) ?\n getChannel(xFragAtOutputCoords, vec2(c + 1, d + 1)) : 0.0\n );\n\n int firstChannel = d - "+a+";\n vec2 cache = vec2(0.);\n if(firstChannel >= 0){\n vec4 firstChannelFrag = getX(b, r, c, firstChannel);\n cache.x = getChannel(firstChannelFrag, vec2(c, firstChannel));\n if(hasNextRow){\n cache.y = getChannel(firstChannelFrag, vec2(c + 1, firstChannel));\n }\n }\n\n ivec2 depth = ivec2(d, d + 1);\n for (int j = - "+a+"; j <= "+a+"; j++) {\n ivec2 idx = depth + j;\n bvec2 aboveLowerBound = greaterThanEqual(idx, ivec2(0));\n bvec2 belowUpperBound = lessThanEqual(idx, ivec2("+s+"));\n\n bool depthInRange = aboveLowerBound.x && belowUpperBound.x;\n bool depthPlusOneInRange = aboveLowerBound.y && belowUpperBound.y;\n\n if(depthInRange || depthPlusOneInRange){\n vec4 z = vec4(0.);\n vec4 xFragAtCurrentDepth;\n z.xz = cache.xy;\n if(depthPlusOneInRange && hasNextCol){\n xFragAtCurrentDepth = idx.y != d ?\n getX(b, r, c, idx.y) : xFragAtOutputCoords;\n z.y = getChannel(xFragAtCurrentDepth, vec2(c, idx.y));\n if(hasNextRow){\n z.w = getChannel(xFragAtCurrentDepth, vec2(c + 1, idx.y));\n }\n }\n cache.xy = z.yw;\n sum += z * z;\n }\n }\n vec4 result = xAtOutputCoords * "+i+";\n setOutput(result);\n }\n "},Aa=function(e){this.variableNames=["dy","maxPos"],this.outputShape=e.inShape;var t=e.strideHeight,n=e.strideWidth,r=e.dilationHeight,o=e.effectiveFilterHeight,i=e.effectiveFilterWidth,a=o-1-e.padInfo.top,s=i-1-e.padInfo.left,u=o*i-1;this.userCode="\n const ivec2 pads = ivec2("+a+", "+s+");\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n\n ivec2 dyRCCorner = coords.yz - pads;\n int dyRCorner = dyRCCorner.x;\n int dyCCorner = dyRCCorner.y;\n\n // Convolve dy(?, ?, d) with pos mask(:, :, d) to get dx(xR, xC, d).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < "+o+";\n wR += "+r+") {\n float dyR = float(dyRCorner + wR) / "+t+".0;\n\n if (dyR < 0.0 || dyR >= "+e.outHeight+".0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n for (int wC = 0; wC < "+i+"; wC++) {\n float dyC = float(dyCCorner + wC) / "+n+".0;\n\n if (dyC < 0.0 || dyC >= "+e.outWidth+".0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n float dyValue = getDy(b, idyR, idyC, d);\n int maxPosValue = "+u+" - int(getMaxPos(b, idyR, idyC, d));\n\n // Get the current value, check it against the value from the\n // position matrix.\n int curPosValue = wR * "+i+" + wC;\n float mask = float(maxPosValue == curPosValue ? 1.0 : 0.0);\n\n dotProd += dyValue * mask;\n }\n }\n setOutput(dotProd);\n }\n "},Ea=function(e){this.variableNames=["dy","maxPos"],this.outputShape=e.inShape;var t=e.strideDepth,n=e.strideHeight,r=e.strideWidth,o=e.dilationDepth,i=e.dilationHeight,a=e.dilationWidth,s=e.effectiveFilterDepth,u=e.effectiveFilterHeight,c=e.effectiveFilterWidth,l=s-1-e.padInfo.front,f=u-1-e.padInfo.top,p=c-1-e.padInfo.left,h=s*u*c-1;this.userCode="\n const ivec3 pads = ivec3("+l+", "+f+", "+p+");\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int ch = coords.u;\n\n ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;\n int dyDCorner = dyCorner.x;\n int dyRCorner = dyCorner.y;\n int dyCCorner = dyCorner.z;\n\n // Convolve dy(?, ?, ?, ch) with pos mask(:, :, :, d) to get\n // dx(xD, xR, xC, ch).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n\n for (int wD = 0; wD < "+s+";\n wD += "+o+") {\n float dyD = float(dyDCorner + wD) / "+t+".0;\n\n if (dyD < 0.0 || dyD >= "+e.outDepth+".0 || fract(dyD) > 0.0) {\n continue;\n }\n int idyD = int(dyD);\n\n for (int wR = 0; wR < "+u+";\n wR += "+i+") {\n float dyR = float(dyRCorner + wR) / "+n+".0;\n\n if (dyR < 0.0 || dyR >= "+e.outHeight+".0 ||\n fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n for (int wC = 0; wC < "+c+";\n wC += "+a+") {\n float dyC = float(dyCCorner + wC) / "+r+".0;\n\n if (dyC < 0.0 || dyC >= "+e.outWidth+".0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n float dyValue = getDy(batch, idyD, idyR, idyC, ch);\n int maxPosValue = "+h+" -\n int(getMaxPos(batch, idyD, idyR, idyC, ch));\n\n // Get the current value, check it against the value from the\n // position matrix.\n int curPosValue =\n wD * "+u+" * "+c+" +\n wR * "+c+" + wC;\n float mask = float(maxPosValue == curPosValue ? 1.0 : 0.0);\n\n dotProd += dyValue * mask;\n }\n }\n }\n setOutput(dotProd);\n }\n "},Ca=function(e,t,n,r,o,i,a){void 0===n&&(n=!1),void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===i&&(i=null),void 0===a&&(a=!1),this.variableNames=["matrixA","matrixB"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=t;var s=n?e[1]:e[2],u=Math.ceil(s/2),c=n?"i * 2, rc.y":"rc.y, i * 2",l=r?"rc.z, i * 2":"i * 2, rc.z",f=n?["a.xxyy","a.zzww"]:["a.xxzz","a.yyww"],p=r?["b.xzxz","b.ywyw"]:["b.xyxy","b.zwzw"],h="",d="";i&&(h=a?"vec4 activation(vec4 a) {\n vec4 b = getPreluActivationWeightsAtOutCoords();\n "+i+"\n }":"vec4 activation(vec4 x) {\n "+i+"\n }",d="result = activation(result);");var m=o?"result += getBiasAtOutCoords();":"";o&&this.variableNames.push("bias"),a&&this.variableNames.push("preluActivationWeights"),this.userCode="\n "+h+"\n\n const float sharedDimension = "+u+".0;\n\n vec4 dot2x2ARowBCol(ivec3 rc) {\n vec4 result = vec4(0);\n for (int i = 0; i < "+u+"; i++) {\n vec4 a = getMatrixA(rc.x, "+c+");\n vec4 b = getMatrixB(rc.x, "+l+");\n\n // These swizzled products need to be separately added.\n // See: https://github.com/tensorflow/tfjs/issues/1735\n result += ("+f[0]+" * "+p[0]+");\n result += ("+f[1]+" * "+p[1]+");\n }\n return result;\n }\n\n void main() {\n ivec3 rc = getOutputCoords();\n vec4 result = dot2x2ARowBCol(rc);\n\n "+m+"\n\n "+d+"\n\n setOutput(result);\n }\n "},ka=function(){function e(e,t,n){this.variableNames=["probs"],this.outputShape=[e,n],this.userCode="\n uniform float seed;\n\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n\n float r = random(seed);\n float cdf = 0.0;\n\n for (int i = 0; i < "+(t-1)+"; i++) {\n cdf += getProbs(batch, i);\n\n if (r < cdf) {\n setOutput(float(i));\n return;\n }\n }\n\n // If no other event happened, last event happened.\n setOutput(float("+(t-1)+"));\n }\n "}return e.prototype.getCustomSetupFunc=function(e){var t=this;return function(n,r){null==t.seedLoc&&(t.seedLoc=n.getUniformLocation(r,"seed")),n.gl.uniform1f(t.seedLoc,e)}},e}(),Ia=function(e,t,n,r){this.variableNames=["indices"],this.outputShape=[e,t],this.userCode="\n void main() {\n ivec2 coords = getOutputCoords();\n int index = round(getIndices(coords.x));\n setOutput(mix(float("+r+"), float("+n+"),\n float(index == coords.y)));\n }\n "},Sa=function(e){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0,this.outputShape=e;var t=e.length;if(0===t)this.userCode="\n void main() {\n setOutput(vec4(getA(), 0., 0., 0.));\n }\n ";else{var n=Vo("rc",t),r=ii(t),o=function(e,t,n){if(1===e)return"rc > "+t[0];for(var r="",o=e-2;o<e;o++)r+=n[o]+" >= "+t[o],o<e-1&&(r+="||");return r}(t,e,n),i=function(e,t,n,r){if(1===e)return"";var o=r.slice(-2);return"\n int r = "+o[0]+";\n int c = "+o[1]+";\n int rp1 = r + 1;\n int cp1 = c + 1;\n\n bool cEdge = cp1 >= "+t+";\n bool rEdge = rp1 >= "+n+";\n "}(t,e[e.length-1],e[e.length-2],n),a=function(e,t){var n=e.length,r=function(e,t){for(var n=[],r=0;r<=1;r++)for(var o=0;o<=1;o++){for(var i=(0===r?"r":"rp1")+", "+(0===o?"c":"cp1"),a=2;a<e;a++)i=t[t.length-1-a]+","+i;n.push(i)}return n}(n,t);return 1===n?"getA(rc),\n rc + 1 >= "+e[0]+" ? 0. : getA(rc + 1),\n 0, 0":"getA("+r[0]+"),\n cEdge ? 0. : getA("+r[1]+"),\n rEdge ? 0. : getA("+r[2]+"),\n rEdge || cEdge ? 0. : getA("+r[3]+")"}(e,n);this.userCode="\n void main() {\n "+r+" rc = getOutputCoords();\n\n if("+o+") {\n setOutput(vec4(0));\n } else {\n "+i+"\n\n setOutput(vec4("+a+"));\n }\n }\n "}},ja=function(e,t,n){this.variableNames=["x"],this.outputShape=t.map((function(t,n){return t[0]+e[n]+t[1]}));var r=e.length,o=ii(r),i=t.map((function(e){return e[0]})).join(","),a=t.map((function(t,n){return t[0]+e[n]})).join(","),s=["coords[0]","coords[1]","coords[2]","coords[3]"].slice(0,r);this.userCode=1!==r?"\n "+o+" start = "+o+"("+i+");\n "+o+" end = "+o+"("+a+");\n\n void main() {\n "+o+" outC = getOutputCoords();\n if (any(lessThan(outC, start)) || any(greaterThanEqual(outC, end))) {\n setOutput(float("+n+"));\n } else {\n "+o+" coords = outC - start;\n setOutput(getX("+s+"));\n }\n }\n ":"\n int start = "+i+";\n int end = "+a+";\n\n void main() {\n int outC = getOutputCoords();\n if (outC < start || outC >= end) {\n setOutput(float("+n+"));\n } else {\n setOutput(getX(outC - start));\n }\n }\n "},Ta=function(e,t,n){this.variableNames=["x"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=t.map((function(t,n){return t[0]+e[n]+t[1]}));for(var r=e.length,o=ii(r),i=t.map((function(e){return e[0]})).join(","),a=t.map((function(t,n){return t[0]+e[n]})).join(","),s=Vo("rc",r),u=Vo("source",r),c=s[r-1]+" < "+this.outputShape[r-1],l=1===r?"source":"vec2("+u.slice(-2).join()+")",f=[o+" rc = outputLoc;",s[r-1]+" += 1;\n if("+c+") {\n ",1===r?"":"}\n rc = outputLoc;\n "+s[r-2]+" += 1;\n if("+s[r-2]+" < "+this.outputShape[r-2]+") {",1===r?"":" "+s[r-1]+" += 1;\n if("+c+") {"],p=1===r?"rc < start || rc >= end":"any(lessThan(rc, start)) || any(greaterThanEqual(rc, end))",h="",d=0,m=1===r?2:4;d<m;d++)h+="\n "+f[d]+"\n if ("+p+") {\n result["+d+"] = float("+n+");\n } else {\n "+o+" source = rc - start;\n result["+d+"] = getChannel(getX("+u.join()+"), "+l+");\n }\n ";h+=1===r?"} ":"}}",this.userCode="\n const "+o+" start = "+o+"("+i+");\n const "+o+" end = "+o+"("+a+");\n\n void main() {\n "+o+" outputLoc = getOutputCoords();\n vec4 result = vec4(0.);\n "+h+"\n setOutput(result);\n }\n "},Ra=function(e,t,n){if(this.variableNames=["x"],"avg"===t&&n)throw new Error("Cannot compute positions for average pool.");var r=e.filterWidth,o=e.strideHeight,i=e.strideWidth,a=e.dilationHeight,s=e.dilationWidth,u=e.effectiveFilterHeight,c=e.effectiveFilterWidth,l=e.padInfo.top,f=e.padInfo.left;this.outputShape=e.outShape;var p="avg"===t,h="0.0";if(p||(h="-1.0 / 1e-20"),n)this.userCode="\n const ivec2 strides = ivec2("+o+", "+i+");\n const ivec2 pads = ivec2("+l+", "+f+");\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d = coords[3];\n\n ivec2 xRCCorner = coords.yz * strides - pads;\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // max/min x(?, ?, d) to get y(yR, yC, d).\n // ? = to be determined\n float minMaxValue = 0.0;\n float minMaxValueFound = 0.0;\n int minMaxPosition = 0;\n float avgValue = 0.0;\n\n for (int wR = 0; wR < "+u+";\n wR += "+a+") {\n int xR = xRCorner + wR;\n\n if (xR < 0 || xR >= "+e.inHeight+") {\n continue;\n }\n\n for (int wC = 0; wC < "+c+";\n wC += "+s+") {\n int xC = xCCorner + wC;\n\n if (xC < 0 || xC >= "+e.inWidth+") {\n continue;\n }\n\n float value = getX(batch, xR, xC, d);\n\n // If a min / max value has already been found, use it. If not,\n // use the current value.\n float currMinMaxValue = mix(\n value, minMaxValue, minMaxValueFound);\n if (value >= currMinMaxValue) {\n minMaxValue = value;\n minMaxValueFound = 1.0;\n minMaxPosition = wR * "+c+" + wC;\n }\n }\n }\n setOutput(float(minMaxPosition));\n }\n ";else{var d=t+"("+t+"("+t+"(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])";"avg"===t&&(d="avgValue / count");var m=4*Math.floor(r/4),g=r%4,v="\n if ("+p+") {\n avgValue += dot(values, ones);\n } else {\n minMaxValue = max(values, minMaxValue);\n }\n ";this.userCode="\n const ivec2 strides = ivec2("+o+", "+i+");\n const ivec2 pads = ivec2("+l+", "+f+");\n const float initializationValue = "+h+";\n const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n float count = 0.0;\n\n float getValue(int batch, int xR, int xC, int d) {\n if (xC < 0 || xC >= "+e.inWidth+") {\n return initializationValue;\n }\n count += 1.0;\n return getX(batch, xR, xC, d);\n }\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d = coords[3];\n\n ivec2 xRCCorner = coords.yz * strides - pads;\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // max/min x(?, ?, d) to get y(yR, yC, d).\n // ? = to be determined\n vec4 minMaxValue = vec4("+h+");\n float avgValue = 0.0;\n count = 0.0;\n\n for (int wR = 0; wR < "+u+";\n wR += "+a+") {\n int xR = xRCorner + wR;\n\n if (xR < 0 || xR >= "+e.inHeight+") {\n continue;\n }\n\n for (int wC = 0; wC < "+m+"; wC += 4) {\n int xC = xCCorner + wC * "+s+";\n\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n getValue(batch, xR, xC + "+s+", d),\n getValue(batch, xR, xC + 2 * "+s+", d),\n getValue(batch, xR, xC + 3 * "+s+", d)\n );\n\n "+v+"\n }\n\n int xC = xCCorner + "+m+";\n if ("+(1===g)+") {\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n initializationValue,\n initializationValue,\n initializationValue\n );\n\n "+v+"\n } else if ("+(2===g)+") {\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n getValue(batch, xR, xC + "+s+", d),\n initializationValue,\n initializationValue\n );\n\n "+v+"\n } else if ("+(3===g)+") {\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n getValue(batch, xR, xC + "+s+", d),\n getValue(batch, xR, xC + 2 * "+s+", d),\n initializationValue\n );\n\n "+v+"\n }\n }\n setOutput("+d+");\n }\n "}},Oa=function(e,t,n){if(this.variableNames=["x"],"avg"===t&&n)throw new Error("Cannot compute positions for average pool.");var r=e.filterWidth,o=e.strideDepth,i=e.strideHeight,a=e.strideWidth,s=e.dilationDepth,u=e.dilationHeight,c=e.dilationWidth,l=e.effectiveFilterDepth,f=e.effectiveFilterHeight,p=e.effectiveFilterWidth,h=e.padInfo.front,d=e.padInfo.top,m=e.padInfo.left;this.outputShape=e.outShape;var g="avg"===t,v="0.0";if(g||(v="-1.0 / 1e-20"),n)this.userCode="\n const ivec3 strides =\n ivec3("+o+", "+i+", "+a+");\n const ivec3 pads = ivec3("+h+", "+d+", "+m+");\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int ch = coords.u;\n\n ivec3 xCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;\n int xDCorner = xCorner.x;\n int xRCorner = xCorner.y;\n int xCCorner = xCorner.z;\n\n // max/min x(?, ?, ?, ch) to get y(yD, yR, yC, ch).\n // ? = to be determined\n float minMaxValue = 0.0;\n float minMaxValueFound = 0.0;\n int minMaxPosition = 0;\n\n for (int wD = 0; wD < "+l+";\n wD += "+s+") {\n int xD = xDCorner + wD;\n\n if (xD < 0 || xD >= "+e.inDepth+") {\n continue;\n }\n\n for (int wR = 0; wR < "+f+";\n wR += "+u+") {\n int xR = xRCorner + wR;\n\n if (xR < 0 || xR >= "+e.inHeight+") {\n continue;\n }\n\n for (int wC = 0; wC < "+p+";\n wC += "+c+") {\n int xC = xCCorner + wC;\n\n if (xC < 0 || xC >= "+e.inWidth+") {\n continue;\n }\n\n float value = getX(batch, xD, xR, xC, ch);\n\n // If a min / max value has already been found, use it. If not,\n // use the current value.\n float currMinMaxValue = mix(\n value, minMaxValue, minMaxValueFound);\n if (value >= currMinMaxValue) {\n minMaxValue = value;\n minMaxValueFound = 1.0;\n minMaxPosition =\n wD * "+f+" * "+p+" +\n wR * "+p+" + wC;;\n }\n }\n }\n }\n setOutput(float(minMaxPosition));\n }\n ";else{var y=t+"("+t+"("+t+"(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])";"avg"===t&&(y="avgValue / count");var b=4*Math.floor(r/4),w=r%4,x="\n if ("+g+") {\n avgValue += dot(values, ones);\n } else {\n minMaxValue = max(values, minMaxValue);\n }\n ";this.userCode="\n const ivec3 strides =\n ivec3("+o+", "+i+", "+a+");\n const ivec3 pads = ivec3("+h+", "+d+", "+m+");\n const float initializationValue = "+v+";\n const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n float count = 0.0;\n\n float getValue(int batch, int xD, int xR, int xC, int ch) {\n if (xC < 0 || xC >= "+e.inWidth+") {\n return initializationValue;\n }\n count += 1.0;\n return getX(batch, xD, xR, xC, ch);\n }\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int ch = coords.u;\n\n ivec3 xCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;\n int xDCorner = xCorner.x;\n int xRCorner = xCorner.y;\n int xCCorner = xCorner.z;\n\n // max/min x(?, ?, ?, d) to get y(yD, yR, yC, ch).\n // ? = to be determined\n vec4 minMaxValue = vec4("+v+");\n float avgValue = 0.0;\n count = 0.0;\n\n for (int wD = 0; wD < "+l+";\n wD += "+s+") {\n int xD = xDCorner + wD;\n\n if (xD < 0 || xD >= "+e.inDepth+") {\n continue;\n }\n\n for (int wR = 0; wR < "+f+";\n wR += "+u+") {\n int xR = xRCorner + wR;\n\n if (xR < 0 || xR >= "+e.inHeight+") {\n continue;\n }\n\n for (int wC = 0; wC < "+b+"; wC += 4) {\n int xC = xCCorner + wC * "+c+";\n\n vec4 values = vec4(\n getValue(batch, xD, xR, xC, ch),\n getValue(batch, xD, xR, xC + "+c+", ch),\n getValue(batch, xD, xR, xC + 2 * "+c+", ch),\n getValue(batch, xD, xR, xC + 3 * "+c+", ch)\n );\n\n "+x+"\n }\n\n int xC = xCCorner + "+b+";\n if ("+(1===w)+") {\n vec4 values = vec4(\n getValue(batch, xD, xR, xC, ch),\n initializationValue,\n initializationValue,\n initializationValue\n );\n\n "+x+"\n } else if ("+(2===w)+") {\n vec4 values = vec4(\n getValue(batch, xD, xR, xC, ch),\n getValue(batch, xD, xR, xC + "+c+", ch),\n initializationValue,\n initializationValue\n );\n\n "+x+"\n } else if ("+(3===w)+") {\n vec4 values = vec4(\n getValue(batch, xD, xR, xC, ch),\n getValue(batch, xD, xR, xC + "+c+", ch),\n getValue(batch, xD, xR, xC + 2 * "+c+", ch),\n initializationValue\n );\n\n "+x+"\n }\n }\n setOutput("+y+");\n }\n }\n "}},Da=function(e,t){this.variableNames=["x"];var n=e.windowSize,r=e.batchSize,o=e.inSize,i=Math.ceil(o/n);this.outputShape=[r,i];var a="0.0",s="";"prod"===t?a="1.0":"min"===t?(a="1.0 / 1e-20",s="min"):"max"===t&&(a="-1.0 / 1e-20",s="max");var u=t+"("+t+"("+t+"(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])";"sum"===t?u="sumValue":"prod"===t?u="prodValue":"all"===t?u="allValue":"any"===t&&(u="anyValue");var c=4*Math.floor(n/4),l=n%4,f="\n if ("+("sum"===t)+") {\n sumValue += dot(values, ones);\n } else if ("+("prod"===t)+") {\n vec2 tmp = vec2(values[0], values[1]) * vec2(values[2], values[3]);\n prodValue *= tmp[0] * tmp[1];\n } else {\n minMaxValue = "+s+"(values, minMaxValue);\n }\n ",p="vec4";"all"===t?(a="1.0",f="\n bool reducedAllValue = all(values);\n float floatedReducedAllValue = float(reducedAllValue);\n allValue = float(allValue >= 1.0 && floatedReducedAllValue >= 1.0);\n ",p="bvec4"):"any"===t&&(a="0.0",f="\n bool reducedAnyValue = any(values);\n float floatedReducedAnyValue = float(reducedAnyValue);\n anyValue = float(anyValue >= 1.0 || floatedReducedAnyValue >= 1.0);\n ",p="bvec4");var h="";o%n>0&&(h="\n if (inIdx < 0 || inIdx >= "+o+") {\n return initializationValue;\n }\n "),this.userCode="\n const float initializationValue = "+a+";\n const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n float getValue(int batch, int inIdx) {\n "+h+"\n return getX(batch, inIdx);\n }\n\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int outIdx = coords[1];\n int inOffset = outIdx * "+n+";\n\n vec4 minMaxValue = vec4("+a+");\n float prodValue = 1.0;\n float sumValue = 0.0;\n float allValue = 1.0;\n float anyValue = 0.0;\n\n for (int i = 0; i < "+c+"; i += 4) {\n int inIdx = inOffset + i;\n "+p+" values = "+p+"(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n getValue(batch, inIdx + 3)\n );\n\n "+f+"\n }\n\n int inIdx = inOffset + "+c+";\n if ("+(1===l)+") {\n "+p+" values = "+p+"(\n getValue(batch, inIdx),\n initializationValue,\n initializationValue,\n initializationValue\n );\n\n "+f+"\n } else if ("+(2===l)+") {\n "+p+" values = "+p+"(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n initializationValue,\n initializationValue\n );\n\n "+f+"\n } else if ("+(3===l)+") {\n "+p+" values = "+p+"(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n initializationValue\n );\n\n "+f+"\n }\n setOutput("+u+");\n }\n "},Ba=function(e,t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=e;for(var n="",r=0;r<4;r++){var o="thisRC = rc;";r%2==1&&(o+="thisRC.z += 1;"),r>1&&(o+="thisRC.y += 1;"),n+="\n "+o+"\n "+(r>0?"if(thisRC.y < rows && thisRC.z < cols){":"")+"\n int flatIndex = getFlatIndex(thisRC);\n\n ivec3 inputRC = inputCoordsFromReshapedOutCoords(flatIndex);\n vec2 inputRCInnerDims = vec2(float(inputRC.y),float(inputRC.z));\n\n result["+r+"] =\n getChannel(getA(inputRC.x, inputRC.y, inputRC.z), inputRCInnerDims);\n "+(r>0?"}":"")+"\n "}this.userCode="\n \n ivec3 inputCoordsFromReshapedOutCoords(int index) {\n "+Go(["r","c","d"],t)+"\n return ivec3(r, c, d);\n }\n \n "+Xo(e)+"\n\n void main() {\n ivec3 rc = getOutputCoords();\n\n vec4 result = vec4(0.);\n\n ivec3 thisRC;\n int rows = "+e[1]+";\n int cols = "+e[2]+";\n\n "+n+"\n\n setOutput(result);\n }\n "},_a=function(e,t,n){this.variableNames=["dy"],this.outputShape=[],this.outputShape=t.shape;var r=t.shape,o=r[1],i=r[2],a=e.shape,s=a[1],u=a[2],c=[n&&s>1?o-1:o,n&&u>1?i-1:i],l=[n&&s>1?s-1:s,n&&u>1?u-1:u],f=c[0]/l[0],p=c[1]/l[1],h=1/f,d=1/p,m=2*Math.ceil(h)+2,g=2*Math.ceil(d)+2;this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n int r = coords[1];\n int c = coords[2];\n\n float accumulator = 0.0;\n\n const float heightScale = float("+f+");\n const float widthScale = float("+p+");\n\n const float invHeightScale = float("+h+");\n const float invWidthScale = float("+d+");\n\n const int winHeight = int("+m+");\n const int winWidth = int("+g+");\n\n // Compute bounds for where in dy we will look\n float startRLerp = floor(float(r) * invHeightScale);\n int startDyR = int(startRLerp - float(winHeight / 2));\n\n float startCLerp = floor(float(c) * invWidthScale);\n int startDyC = int(startCLerp - float(winWidth / 2));\n\n // Loop over dy\n for (int dyROffset = 0; dyROffset < winHeight; dyROffset++) {\n int dyR = dyROffset + startDyR;\n\n // Guard against the window exceeding the bounds of dy\n if (dyR < 0 || dyR >= "+s+") {\n continue;\n }\n\n for (int dyCOffset = 0; dyCOffset < winWidth; dyCOffset++) {\n int dyC = dyCOffset + startDyC;\n\n // Guard against the window exceeding the bounds of dy\n if (dyC < 0 || dyC >= "+u+") {\n continue;\n }\n\n float dxR = float(dyR) * heightScale;\n int topDxRIndex = int(floor(dxR));\n int bottomDxRIndex = int(min(ceil(dxR), "+(o-1)+".0));\n float dxRLerp = dxR - float(topDxRIndex);\n float inverseDxRLerp = 1.0 - dxRLerp;\n\n float dxC = float(dyC) * widthScale;\n int leftDxCIndex = int(floor(dxC));\n int rightDxCIndex = int(min(ceil(dxC), "+(i-1)+".0));\n float dxCLerp = dxC - float(leftDxCIndex);\n float inverseDxCLerp = 1.0 - dxCLerp;\n\n if (r == topDxRIndex && c == leftDxCIndex) {\n // topLeft\n accumulator +=\n getDy(b, dyR, dyC, d) * inverseDxRLerp * inverseDxCLerp;\n }\n\n if (r == topDxRIndex && c == rightDxCIndex) {\n // topRight\n accumulator += getDy(b, dyR, dyC, d) * inverseDxRLerp * dxCLerp;\n }\n\n if (r == bottomDxRIndex && c == leftDxCIndex) {\n // bottomLeft\n accumulator += getDy(b, dyR, dyC, d) * dxRLerp * inverseDxCLerp;\n }\n\n if (r == bottomDxRIndex && c == rightDxCIndex) {\n // bottomRight\n accumulator += getDy(b, dyR, dyC, d) * dxRLerp * dxCLerp;\n }\n }\n }\n // End loop over dy\n\n setOutput(accumulator);\n }\n "},Na=function(e,t,n,r){this.variableNames=["A"],this.outputShape=[];var o=e[0],i=e[1],a=e[2],s=e[3];this.outputShape=[o,t,n,s];var u=[r&&t>1?i-1:i,r&&n>1?a-1:a],c=[r&&t>1?t-1:t,r&&n>1?n-1:n];this.userCode="\n const vec2 effectiveInputOverOutputRatioRC = vec2(\n "+u[0]/c[0]+",\n "+u[1]/c[1]+");\n const vec2 inputShapeRC = vec2("+i+".0, "+a+".0);\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n ivec2 yRC = coords.yz;\n\n // Fractional source index.\n vec2 sourceFracIndexRC = vec2(yRC) * effectiveInputOverOutputRatioRC;\n\n // Compute the four integer indices.\n ivec2 sourceFloorRC = ivec2(sourceFracIndexRC);\n ivec2 sourceCeilRC = ivec2(\n min(inputShapeRC - 1.0, ceil(sourceFracIndexRC)));\n\n float topLeft = getA(b, sourceFloorRC.x, sourceFloorRC.y, d);\n float bottomLeft = getA(b, sourceCeilRC.x, sourceFloorRC.y, d);\n float topRight = getA(b, sourceFloorRC.x, sourceCeilRC.y, d);\n float bottomRight = getA(b, sourceCeilRC.x, sourceCeilRC.y, d);\n\n vec2 fracRC = sourceFracIndexRC - vec2(sourceFloorRC);\n\n float top = topLeft + (topRight - topLeft) * fracRC.y;\n float bottom = bottomLeft + (bottomRight - bottomLeft) * fracRC.y;\n float newValue = top + (bottom - top) * fracRC.x;\n\n setOutput(newValue);\n }\n "},Pa=function(e,t,n,r){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=[];var o=e[0],i=e[1],a=e[2],s=e[3];this.outputShape=[o,t,n,s];var u=[r&&t>1?i-1:i,r&&n>1?a-1:a],c=[r&&t>1?t-1:t,r&&n>1?n-1:n];this.userCode="\n const vec3 effectiveInputOverOutputRatioRC = vec3(\n "+u[0]/c[0]+",\n "+u[1]/c[1]+",\n "+u[1]/c[1]+");\n const vec3 inputShapeRC = vec3("+i+".0, "+a+".0,\n "+a+".0);\n\n float getAValue(int b, int r, int c, int d) {\n return getChannel(getA(b, r, c, d), vec2(c, d));\n }\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n // Calculate values for next column in yRC.z.\n ivec3 yRC = coords.yzz + ivec3(0, 0, 1);\n\n // Fractional source index.\n vec3 sourceFracIndexRC = vec3(yRC) * effectiveInputOverOutputRatioRC;\n\n // Compute the four integer indices.\n ivec3 sourceFloorRC = ivec3(sourceFracIndexRC);\n ivec3 sourceCeilRC = ivec3(\n min(inputShapeRC - 1.0, ceil(sourceFracIndexRC)));\n\n // Should we calculate next column and row elements in 2x2 packed cell.\n bool hasNextCol = d < "+(s-1)+";\n bool hasNextRow = coords.z < "+(n-1)+";\n\n // In parallel, construct four corners for all four components in\n // packed 2x2 cell.\n vec4 topLeft = vec4(\n getAValue(b, sourceFloorRC.x, sourceFloorRC.y, d),\n hasNextCol ? getAValue(b, sourceFloorRC.x, sourceFloorRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceFloorRC.x, sourceFloorRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceFloorRC.x, sourceFloorRC.z, d + 1) : 0.0);\n\n vec4 bottomLeft = vec4(\n getAValue(b, sourceCeilRC.x, sourceFloorRC.y, d),\n hasNextCol ? getAValue(b, sourceCeilRC.x, sourceFloorRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceCeilRC.x, sourceFloorRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceCeilRC.x, sourceFloorRC.z, d + 1) : 0.0);\n\n vec4 topRight = vec4(\n getAValue(b, sourceFloorRC.x, sourceCeilRC.y, d),\n hasNextCol ? getAValue(b, sourceFloorRC.x, sourceCeilRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceFloorRC.x, sourceCeilRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceFloorRC.x, sourceCeilRC.z, d + 1) : 0.0);\n\n vec4 bottomRight = vec4(\n getAValue(b, sourceCeilRC.x, sourceCeilRC.y, d),\n hasNextCol ? getAValue(b, sourceCeilRC.x, sourceCeilRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceCeilRC.x, sourceCeilRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceCeilRC.x, sourceCeilRC.z, d + 1) : 0.0);\n\n vec3 fracRC = sourceFracIndexRC - vec3(sourceFloorRC);\n\n vec4 top = mix(topLeft, topRight, fracRC.yyzz);\n vec4 bottom = mix(bottomLeft, bottomRight, fracRC.yyzz);\n vec4 newValue = mix(top, bottom, fracRC.x);\n\n setOutput(newValue);\n }\n "},Ma=function(e,t,n){this.variableNames=["dy"],this.outputShape=[],this.outputShape=t.shape;var r=t.shape,o=r[1],i=r[2],a=e.shape,s=a[1],u=a[2],c=[n&&s>1?o-1:o,n&&u>1?i-1:i],l=[n&&s>1?s-1:s,n&&u>1?u-1:u],f=c[0]/l[0],p=c[1]/l[1],h=1/f,d=1/p,m=2*Math.ceil(h)+2,g=2*Math.ceil(d)+2;this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n int r = coords[1];\n int c = coords[2];\n\n float accumulator = 0.0;\n\n const float heightScale = float("+f+");\n const float widthScale = float("+p+");\n\n const float invHeightScale = float("+h+");\n const float invWidthScale = float("+d+");\n\n const int winHeight = int("+m+");\n const int winWidth = int("+g+");\n\n // Compute bounds for where in dy we will look\n float startRLerp = floor(float(r) * invHeightScale);\n int startDyR = int(floor(startRLerp - float(winHeight / 2)));\n\n float startCLerp = floor(float(c) * invWidthScale);\n int startDyC = int(floor(startCLerp - float(winWidth / 2)));\n\n // Loop over dy\n for (int dyROffset = 0; dyROffset < winHeight; dyROffset++) {\n int dyR = dyROffset + startDyR;\n\n // Guard against the window exceeding the bounds of dy\n if (dyR < 0 || dyR >= "+s+") {\n continue;\n }\n\n for (int dyCOffset = 0; dyCOffset < winWidth; dyCOffset++) {\n int dyC = dyCOffset + startDyC;\n\n // Guard against the window exceeding the bounds of dy\n if (dyC < 0 || dyC >= "+u+") {\n continue;\n }\n\n float sourceFracRow =\n float("+c[0]+") *\n (float(dyR) / float("+l[0]+"));\n\n float sourceFracCol =\n float("+c[1]+") *\n (float(dyC) / float("+l[1]+"));\n\n int sourceNearestRow = int(min(\n float(int("+o+") - 1),\n "+n+" ? float(round(sourceFracRow)) :\n float(floor(sourceFracRow))));\n\n int sourceNearestCol = int(min(\n float(int("+i+") - 1),\n "+n+" ? float(round(sourceFracCol)) :\n float(floor(sourceFracCol))));\n\n if (r == sourceNearestRow && c == sourceNearestCol) {\n accumulator += getDy(b, dyR, dyC, d);\n }\n }\n }\n // End loop over dy\n\n setOutput(accumulator);\n }\n "},Fa=function(e,t,n,r){this.variableNames=["A"],this.outputShape=[];var o=e[0],i=e[1],a=e[2],s=e[3];this.outputShape=[o,t,n,s];var u=[r&&t>1?i-1:i,r&&n>1?a-1:a],c=[r&&t>1?t-1:t,r&&n>1?n-1:n],l=r?"0.5":"0.0";this.userCode="\n const vec2 effectiveInputOverOutputRatioRC = vec2(\n "+u[0]/c[0]+",\n "+u[1]/c[1]+");\n const vec2 inputShapeRC = vec2("+i+".0, "+a+".0);\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n ivec2 yRC = coords.yz;\n\n // Fractional source index.\n vec2 sourceFracIndexRC = vec2(yRC) * effectiveInputOverOutputRatioRC;\n\n // Compute the coordinators of nearest neighbor point.\n ivec2 sourceNearestRC = ivec2(\n min(inputShapeRC - 1.0, floor(sourceFracIndexRC + "+l+")));\n\n float newValue = getA(b, sourceNearestRC.x, sourceNearestRC.y, d);\n\n setOutput(newValue);\n }\n "},La=function(e,t){this.variableNames=["x"];var n=e.length;if(n>4)throw new Error("WebGL backend: Reverse of rank-"+n+" tensor is not yet supported");if(this.outputShape=e,1!==n){var r=e.map((function(n,r){return function(n){return-1!==t.indexOf(n)&&1!==e[n]?e[n]+" - coords["+n+"] - 1":"coords["+n+"]"}(r)})).join(","),o=ii(n);this.userCode="\n void main() {\n "+o+" coords = getOutputCoords();\n setOutput(getX("+r+"));\n }\n "}else this.userCode="\n void main() {\n int coord = getOutputCoords();\n setOutput(getX("+e[0]+" - coord - 1));\n }\n "},Ua=function(e,t){this.variableNames=["x"],this.packedInputs=!0,this.packedOutput=!0;var n=e.length;if(n>4)throw new Error("WebGL backend: Reverse of rank-"+n+" tensor is not yet supported");this.outputShape=e;var r=Vo("rc",n),o=r[n-1]+" + 1 < "+this.outputShape[n-1],i=r[n-2]+" + 1 < "+this.outputShape[n-2],a=ii(n);function s(n){var r=e.map((function(r,o){return function(n,r){return-1!==t.indexOf(n)&&1!==e[n]?e[n]+" - "+r[n]+" - 1":""+r[n]}(o,n)}));return"getChannel(getX("+r.join(",")+"), vec2("+r.slice(-2).join(",")+"))"}this.userCode=1===n?"\n void main(){\n int rc = getOutputCoords();\n vec4 result = vec4(0.);\n result.r = getChannel(getX("+e[0]+" - rc - 1),\n "+e[0]+" - rc - 1);\n if("+o+"){\n result.g = getChannel(getX("+e[0]+" - (rc + 1) - 1),\n "+e[0]+" - (rc + 1) - 1);\n }\n setOutput(result);\n }\n ":"\n void main() {\n "+a+" rc = getOutputCoords();\n vec4 result = vec4(0.);\n result.r = "+function(e){return s(e)}(r.slice())+";\n if("+o+"){\n result.g = "+function(e){return e[n-1]="("+e[n-1]+" + 1)",s(e)}(r.slice())+";\n }\n if("+i+") {\n result.b = "+function(e){return e[n-2]="("+e[n-2]+" + 1)",s(e)}(r.slice())+";\n if("+o+") {\n result.a = "+function(e){return e[n-1]="("+e[n-1]+" + 1)",e[n-2]="("+e[n-2]+" + 1)",s(e)}(r.slice())+";\n }\n }\n setOutput(result);\n }\n "},Wa=function(e,t,n,r,o,i,a){void 0===a&&(a=!0),this.variableNames=["updates","indices","defaultValue"],this.outputShape=i;var s=ii(o.length),u=ii(i.length),c="";1===n?c="i":2===n&&(c="i, j");var l="getIndices("+c+")",f="";1===r?f="i":2===r&&(f="i, coords[1]");var p="getUpdates("+f+")",h=t>1?"strides[j]":"strides";this.userCode="\n "+s+" strides = "+s+"("+o+");\n\n void main() {\n "+u+" coords = getOutputCoords();\n float sum = 0.0;\n bool found = false;\n for (int i = 0; i < "+e+"; i++) {\n int flattenedIndex = 0;\n for (int j = 0; j < "+t+"; j++) {\n int index = round("+l+");\n flattenedIndex += index * "+h+";\n }\n if (flattenedIndex == coords[0]) {\n sum += "+p+";\n found = true;\n }\n }\n setOutput(mix(getDefaultValue(), sum, float(found)));\n }\n "},za=function(e,t){this.variableNames=["x","segmentIds"];var n=e.windowSize,r=e.batchSize,o=e.inSize,i=e.numSegments,a=i*Math.ceil(o/n);this.outputShape=[r,a];var s=4*Math.floor(n/4),u=n%4,c="\n sumValue += dot(values, segFilter);\n ",l="";o%n>0&&(l="\n if (inIdx < 0 || inIdx >= "+o+") {\n return initializationValue;\n }\n ");var f="";o%n>0&&(f="\n if (inIdx < 0 || inIdx >= "+o+") {\n return -1.0;\n }\n "),this.userCode="\n const float initializationValue = 0.0;\n\n float getValue(int batch, int inIdx) {\n "+l+"\n return getX(batch, inIdx);\n }\n\n float getSegmentIdAtIndex(int inIdx) {\n "+f+"\n return getSegmentIds(inIdx);\n }\n\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int outIdx = coords[1];\n int inOffset = int(floor(float(outIdx) / float(\n "+i+")) * float("+n+"));\n int currentSeg = int(mod(float(outIdx), float("+i+")));\n\n float sumValue = 0.0;\n\n for (int i = 0; i < "+s+"; i += 4) {\n int inIdx = inOffset + i;\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n getValue(batch, inIdx + 3)\n );\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 2)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 3)) == currentSeg ? 1 : 0\n );\n\n "+c+"\n }\n\n int inIdx = inOffset + "+s+";\n if ("+(1===u)+") {\n vec4 values = vec4(\n getValue(batch, inIdx),\n initializationValue,\n initializationValue,\n initializationValue\n );\n\n int inIdxSeg = int(getSegmentIdAtIndex(inIdx));\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n 0,\n 0,\n 0\n );\n\n "+c+"\n } else if ("+(2===u)+") {\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n initializationValue,\n initializationValue\n );\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,\n 0,\n 0\n );\n\n "+c+"\n } else if ("+(3===u)+") {\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n initializationValue\n );\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 2)) == currentSeg ? 1 : 0,\n 0\n );\n\n "+c+"\n }\n setOutput(sumValue);\n }\n "},qa=function(e,t,n){var r,o;if(this.variableNames=["c","a","b"],this.outputShape=t,n>4)throw Error("Where for rank "+n+" is not yet supported");if(1===n)o="resRC",r="resRC";else{for(var i=["resRC.x","resRC.y","resRC.z","resRC.w"],a=[],s=[],u=0;u<t.length;u++)s.push(""+i[u]),u<e&&a.push(""+i[u]);r=a.join(),o=s.join()}var c=ii(n);this.userCode="\n void main() {\n "+c+" resRC = getOutputCoords();\n float cVal = getC("+r+");\n if (cVal >= 1.0) {\n setOutput(getA("+o+"));\n } else {\n setOutput(getB("+o+"));\n }\n }\n "},Qa=function(){function e(e){this.variableNames=["source"],this.outputShape=e,this.rank=e.length;var t,n=ii(this.rank),r="uniform int start["+this.rank+"];",o=function(e){if(1===e)return"sourceLoc";if(e<=6)return Va.slice(0,e).map((function(e){return"sourceLoc."+e})).join(",");throw Error("Slicing for rank "+e+" is not yet supported")}(this.rank);t="\n "+n+" sourceLoc;\n "+n+" coords = getOutputCoords();\n "+e.map((function(e,t){return"sourceLoc."+Va[t]+" = start["+t+"] + coords."+Va[t]+";"})).join("\n")+"\n ",this.userCode="\n "+r+"\n void main() {\n "+t+"\n setOutput(getSource("+o+"));\n }\n "}return e.prototype.getCustomSetupFunc=function(e){var t=this;if(e.length!==this.rank)throw Error("The rank ("+this.rank+") of the program must match the length of start ("+e.length+")");return function(n,r){null==t.startLoc&&(t.startLoc=n.getUniformLocationNoThrow(r,"start"),null==t.startLoc)||n.gl.uniform1iv(t.startLoc,e)}},e}(),Va=["x","y","z","w","u","v"],Ha=function(){function e(e){this.variableNames=["source"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=e,this.rank=e.length;var t=ii(this.rank),n=Vo("coords",this.rank),r=Vo("sourceLoc",this.rank),o=1===this.rank?"sourceLoc":"vec2("+r.slice(-2).join()+")",i="getChannel(getSource("+r.join()+"), "+o+")",a="\n result.x = "+i+";\n if (++"+n[this.rank-1]+" < "+e[this.rank-1]+") {\n ++"+r[this.rank-1]+";\n result.y = "+i+";\n --"+r[this.rank-1]+";\n }\n ",s=1===this.rank?"":"\n --"+n[this.rank-1]+";\n if (++"+n[this.rank-2]+" < "+e[this.rank-2]+") {\n ++"+r[this.rank-2]+";\n result.z = "+i+";\n if (++"+n[this.rank-1]+" < "+e[this.rank-1]+") {\n ++"+r[this.rank-1]+";\n result.w = "+i+";\n }\n }\n ",u=this.rank<=4?"sourceLoc = coords +\n "+t+"("+e.map((function(e,t){return"start["+t+"]"})).join()+");":e.map((function(e,t){return r[t]+" = "+n[t]+" + start["+t+"];"})).join("\n");this.userCode="\n uniform int start["+this.rank+"];\n void main() {\n "+t+" coords = getOutputCoords();\n "+t+" sourceLoc;\n "+u+"\n vec4 result = vec4(0.);\n "+a+"\n "+s+"\n setOutput(result);\n }\n "}return e.prototype.getCustomSetupFunc=function(e){var t=this;if(e.length!==this.rank)throw Error("The rank ("+this.rank+") of the program must match the length of start ("+e.length+")");return function(n,r){null==t.startLoc&&(t.startLoc=n.getUniformLocationNoThrow(r,"start"),null==t.startLoc)||n.gl.uniform1iv(t.startLoc,e)}},e}(),Ga=function(e,t,n){this.variableNames=["x"],this.outputShape=n;var r=n.length,o=ii(n.length),i=ii(n.length),a="";if(1===r)a="coords * strides + begin";else{var s=0;a=n.map((function(e,t){return s++,1===n.length?"coords * strides["+t+"] + begin["+t+"]":"coords["+(s-1)+"] * strides["+t+"] + begin["+t+"]"})).join(",")}this.userCode="\n "+o+" begin = "+o+"("+e+");\n "+o+" strides = "+o+"("+t+");\n\n void main() {\n "+i+" coords = getOutputCoords();\n setOutput(getX("+a+"));\n }\n "},Xa=function(){function e(e){this.gpgpu=e,this.numUsedTextures=0,this.numFreeTextures=0,this.freeTextures={},this.logEnabled=!1,this.usedTextures={}}return e.prototype.acquireTexture=function(e,t,n){var r,o=Za(t,n),i=Ka(e,o,n);if(i in this.freeTextures||(this.freeTextures[i]=[]),i in this.usedTextures||(this.usedTextures[i]=[]),this.freeTextures[i].length>0){this.numFreeTextures--,this.numUsedTextures++,this.log();var a=this.freeTextures[i].shift();return this.usedTextures[i].push(a),a}return this.numUsedTextures++,this.log(),o===lt.PACKED_2X2_FLOAT32?r=this.gpgpu.createPackedMatrixTexture(e[0],e[1]):o===lt.PACKED_2X2_FLOAT16?r=this.gpgpu.createFloat16PackedMatrixTexture(e[0],e[1]):o===lt.UNPACKED_FLOAT32?r=this.gpgpu.createFloat32MatrixTexture(e[0],e[1]):o===lt.UNPACKED_FLOAT16?r=this.gpgpu.createFloat16MatrixTexture(e[0],e[1]):o===lt.PACKED_4X1_UNSIGNED_BYTE&&(r=this.gpgpu.createUnsignedBytesMatrixTexture(e[0],e[1])),this.usedTextures[i].push(r),r},e.prototype.releaseTexture=function(e,t,n,r){if(null!=this.freeTextures){var o=Ka(t,Za(n,r),r);o in this.freeTextures||(this.freeTextures[o]=[]),this.freeTextures[o].push(e),this.numFreeTextures++,this.numUsedTextures--;var i=this.usedTextures[o],a=i.indexOf(e);if(a<0)throw new Error("Cannot release a texture that was never provided by this texture manager");i.splice(a,1),this.log()}},e.prototype.log=function(){if(this.logEnabled){var e=this.numFreeTextures+this.numUsedTextures;console.log("Free/Used",this.numFreeTextures+" / "+this.numUsedTextures,"("+e+")")}},e.prototype.getNumUsedTextures=function(){return this.numUsedTextures},e.prototype.getNumFreeTextures=function(){return this.numFreeTextures},e.prototype.dispose=function(){var e=this;if(null!=this.freeTextures){for(var t in this.freeTextures)this.freeTextures[t].forEach((function(t){e.gpgpu.deleteMatrixTexture(t)}));for(var t in this.usedTextures)this.usedTextures[t].forEach((function(t){e.gpgpu.deleteMatrixTexture(t)}));this.freeTextures=null,this.usedTextures=null,this.numUsedTextures=0,this.numFreeTextures=0}},e}();function Za(e,t){if(e===ct.UPLOAD)return lt.PACKED_2X2_FLOAT32;if(e===ct.RENDER||null==e)return function(e){return P().getBool("WEBGL_RENDER_FLOAT32_ENABLED")?e?lt.PACKED_2X2_FLOAT32:lt.UNPACKED_FLOAT32:e?lt.PACKED_2X2_FLOAT16:lt.UNPACKED_FLOAT16}(t);if(e===ct.DOWNLOAD||e===ct.PIXELS)return lt.PACKED_4X1_UNSIGNED_BYTE;throw new Error("Unknown logical texture type "+e)}function Ka(e,t,n){return e[0]+"_"+e[1]+"_"+t+"_"+n}var Ja=function(e,t){this.variableNames=["A"];for(var n=new Array(e.length),r=0;r<n.length;r++)n[r]=e[r]*t[r];this.outputShape=n,this.rank=n.length;var o=ii(this.rank),i=function(e){var t=e.length;if(t>5)throw Error("Tile for rank "+t+" is not yet supported");if(1===t)return"imod(resRC, "+e[0]+")";for(var n=["resRC.x","resRC.y","resRC.z","resRC.w","resRC.u"],r=[],o=0;o<e.length;o++)r.push("imod("+n[o]+", "+e[o]+")");return r.join()}(e);this.userCode="\n void main() {\n "+o+" resRC = getOutputCoords();\n setOutput(getA("+i+"));\n }\n "},Ya=function(e,t){this.variableNames=["A"];for(var n=new Array(e.length),r=0;r<n.length;r++)n[r]=e[t[r]];this.outputShape=n,this.rank=n.length;var o=ii(this.rank),i=function(e){var t=e.length;if(t>6)throw Error("Transpose for rank "+t+" is not yet supported");for(var n=["resRC.x","resRC.y","resRC.z","resRC.w","resRC.u","resRC.v"],r=new Array(t),o=0;o<e.length;o++)r[e[o]]=n[o];return r.join()}(t);this.userCode="\n void main() {\n "+o+" resRC = getOutputCoords();\n setOutput(getA("+i+"));\n }\n "},$a=function(e,t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0;for(var n=new Array(e.length),r=0;r<n.length;r++)n[r]=e[t[r]];if(this.outputShape=n,this.rank=n.length,this.rank>6)throw Error("Packed transpose for rank "+this.rank+" is not yet supported.");var o=ii(this.rank),i=Qo("rc",this.rank),a=new Array(this.rank);for(r=0;r<t.length;r++)a[t[r]]=i[r];var s="vec2("+a.slice(-2).join()+")",u="++"+i[this.rank-1]+" < "+n[this.rank-1],c="getChannel(getA("+a.join()+"), "+s+")";this.userCode="\n void main() {\n "+o+" rc = getOutputCoords();\n vec4 result = vec4(0.);\n result[0] = "+c+";\n if("+u+") {\n result[1] = "+c+";\n }\n --"+i[this.rank-1]+";\n if(++"+i[this.rank-2]+" < "+n[this.rank-2]+") {\n result[2] = "+c+";\n if("+u+") {\n result[3] = "+c+";\n }\n }\n setOutput(result);\n }\n "},es=1.7580993408473768,ts=1.0507009873554805,ns=function(e,t){this.variableNames=["A"],this.outputShape=e,this.userCode="\n float unaryOperation(float x) {\n "+t+"\n }\n\n void main() {\n float x = getAAtOutCoords();\n float y = unaryOperation(x);\n\n setOutput(y);\n }\n "},rs="if (isnan(x)) return x;",os="return abs(x);",is=rs+"\n return (x < 0.0) ? 0.0 : x;\n",as=rs+"\n return (x < 0.0) ? 0.0 : min(6.0, x);\n",ss="return (x >= 0.0) ? x : (exp(x) - 1.0);",us="\n // Stable and Attracting Fixed Point (0, 1) for Normalized Weights.\n // see: https://arxiv.org/abs/1706.02515\n float scaleAlpha = "+es+";\n float scale = "+ts+";\n return (x >= 0.0) ? scale * x : scaleAlpha * (exp(x) - 1.0);\n",cs="return -x;",ls="return ceil(x);",fs="return floor(x);",ps="return exp(x);",hs="return exp(x) - 1.0;",ds=rs+"\n return sin(x);\n",ms=rs+"\n return cos(x);\n",gs=rs+"\n if (abs(x) > 1.) {\n return NAN;\n }\n return asin(x);\n",vs=rs+"\n if (abs(x) > 1.) {\n return NAN;\n }\n return acos(x);\n",ys=rs+"\n return atan(x);\n",bs=rs+"return log(x + sqrt(x * x + 1.0));",ws=rs+"\n if (x < 1.0) return NAN;\n return log(x + sqrt(x * x - 1.0));",xs=rs+"\n if ((x < -1.0) || (x > 1.0)) return NAN;\n return (log(1.0 + x) - log(1.0 - x)) / 2.0;",As="return x;",Es="\n vec4 result = x * vec4(greaterThanEqual(x, vec4(0.0)));\n bvec4 isNaN = isnan(x);\n\n result.r = isNaN.r ? x.r : result.r;\n result.g = isNaN.g ? x.g : result.g;\n result.b = isNaN.b ? x.b : result.b;\n result.a = isNaN.a ? x.a : result.a;\n\n return result;\n",Cs="\n vec4 result = min(x, vec4(6.)) * vec4(greaterThanEqual(x, vec4(0.0)));\n bvec4 isNaN = isnan(x);\n\n result.r = isNaN.r ? x.r : result.r;\n result.g = isNaN.g ? x.g : result.g;\n result.b = isNaN.b ? x.b : result.b;\n result.a = isNaN.a ? x.a : result.a;\n\n return result;\n",ks="\n vec4 result;\n\n result.r = (x.r >= 0.0) ? x.r : (exp(x.r) - 1.0);\n result.g = (x.g >= 0.0) ? x.g : (exp(x.g) - 1.0);\n result.b = (x.b >= 0.0) ? x.b : (exp(x.b) - 1.0);\n result.a = (x.a >= 0.0) ? x.a : (exp(x.a) - 1.0);\n\n return result;\n",Is=function(e,t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=e,this.userCode="\n vec4 unaryOperation(vec4 x) {\n "+t+"\n }\n\n void main() {\n vec4 x = getAAtOutCoords();\n vec4 y = unaryOperation(x);\n\n setOutput(y);\n }\n "},Ss=function(e){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!1,this.outputShape=e;var t=e.length,n=Vo("rc",t),r=ii(t),o=function(e,t){if(1===e)return"rc";for(var n="",r=0;r<e;r++)n+=t[r],r<e-1&&(n+=",");return n}(t,n),i=n.slice(-2),a=t<=1?"rc":"vec2("+i.join(",")+")";this.userCode="\n void main() {\n "+r+" rc = getOutputCoords();\n vec4 packedInput = getA("+o+");\n\n setOutput(getChannel(packedInput, "+a+"));\n }\n "},js={};function Ts(e,t){if(void 0===t&&(t=!1),"linear"===e)return"return x;";if("relu"===e)return t?Es:is;if("elu"===e)return t?ks:ss;if("relu6"===e)return t?Cs:as;if("prelu"===e)return t?bi:vi;throw new Error("Activation "+e+" has not been implemented for the WebGL backend.")}var Rs=function(e){function t(t){var n,r=e.call(this)||this;if(r.pendingRead=new WeakMap,r.pendingDisposal=new WeakSet,r.dataRefCount=new WeakMap,r.numBytesInGPU=0,r.uploadWaitMs=0,r.downloadWaitMs=0,r.warnedAboutMemory=!1,r.pendingDeletes=0,r.disposed=!1,!P().getBool("HAS_WEBGL"))throw new Error("WebGL is not supported on this device");if(null==t){var o=dt(P().getNumber("WEBGL_VERSION"));r.binaryCache=((n=P().getNumber("WEBGL_VERSION"))in js||(js[n]={}),js[n]),r.gpgpu=new ga(o),r.canvas=o.canvas,r.gpgpuCreatedLocally=!0}else r.gpgpu=t,r.binaryCache={},r.gpgpuCreatedLocally=!1,r.canvas=t.gl.canvas;return r.textureManager=new Xa(r.gpgpu),r.numMBBeforeWarning=null==P().global.screen?1024:P().global.screen.height*P().global.screen.width*window.devicePixelRatio*600/1024/1024,r.texData=new ro(r,it),r}return O(t,e),t.prototype.numDataIds=function(){return this.texData.numDataIds()+(this.cpuBackend?this.cpuBackend.numDataIds():0)-this.pendingDeletes},t.prototype.write=function(e,t,n){if(P().getBool("DEBUG")&&this.checkNumericalProblems(e),"complex64"===n&&null!=e)throw new Error("Cannot write to a complex64 dtype. Please use tf.complex(real, imag).");var r={};return this.texData.set(r,{shape:t,dtype:n,values:e,usage:ct.UPLOAD}),r},t.prototype.move=function(e,t,n,r){if(P().getBool("DEBUG")&&this.checkNumericalProblems(t),"complex64"===r)throw new Error("Cannot write to a complex64 dtype. Please use tf.complex(real, imag).");this.texData.set(e,{shape:n,dtype:r,values:t,usage:ct.UPLOAD})},t.prototype.readSync=function(e){var t=this.texData.get(e),n=t.values,r=t.dtype,o=t.complexTensors,i=t.slice,a=t.shape,s=t.isPacked;if(null!=i){var u;u=s?new Is(a,As):new ns(a,As);var c=this.runWebGLProgram(u,[{dataId:e,shape:a,dtype:r}],r),l=this.readSync(c.dataId);return this.disposeData(c.dataId),l}if(null!=n)return this.convertAndCacheOnCPU(e);if("string"===r)return n;var f,p,h=null!=this.activeTimers;return h&&(f=je()),p="complex64"===r?ko(o.real.dataSync(),o.imag.dataSync()):this.getValuesFromTexture(e),h&&(this.downloadWaitMs+=je()-f),this.convertAndCacheOnCPU(e,p)},t.prototype.read=function(e){return D(this,void 0,void 0,(function(){var t,n,r,o,i,a,s,u,c,l,f,p,h,d,m,g,v,y,b,w,x,A;return B(this,(function(E){switch(E.label){case 0:if(this.pendingRead.has(e))return t=this.pendingRead.get(e),[2,new Promise((function(e){return t.push(e)}))];if(n=this.texData.get(e),r=n.values,o=n.shape,i=n.slice,a=n.dtype,s=n.complexTensors,u=n.isPacked,null!=i)return void 0,c=u?new Is(o,As):new ns(o,As),l=this.runWebGLProgram(c,[{dataId:e,shape:o,dtype:a}],a),f=this.read(l.dataId),this.disposeData(l.dataId),[2,f];if(null!=r)return[2,this.convertAndCacheOnCPU(e)];if(!P().getBool("WEBGL_DOWNLOAD_FLOAT_ENABLED")&&2===P().getNumber("WEBGL_VERSION"))throw new Error("tensor.data() with WEBGL_DOWNLOAD_FLOAT_ENABLED=false and WEBGL_VERSION=2 not yet supported.");return p=null,"complex64"!==a&&P().get("WEBGL_BUFFER_SUPPORTED")&&(h=this.decode(e),d=this.texData.get(h.dataId),p=(A=this.gpgpu).createBufferFromTexture.apply(A,[d.texture].concat(gt(o)))),this.pendingRead.set(e,[]),"complex64"===a?[3,2]:[4,this.gpgpu.createAndWaitForFence()];case 1:E.sent(),E.label=2;case 2:return"complex64"!==a?[3,4]:[4,Promise.all([s.real.data(),s.imag.data()])];case 3:return g=E.sent(),v=g[0],y=g[1],m=ko(v,y),[3,5];case 4:null==p?m=this.getValuesFromTexture(e):(b=$(o),m=this.gpgpu.downloadFloat32MatrixFromBuffer(p,b)),E.label=5;case 5:return null!=h&&this.disposeData(h.dataId),w=this.convertAndCacheOnCPU(e,m),x=this.pendingRead.get(e),this.pendingRead.delete(e),x.forEach((function(e){return e(w)})),this.pendingDisposal.has(e)&&(this.pendingDisposal.delete(e),this.disposeData(e),this.pendingDeletes--),[2,w]}}))}))},t.prototype.checkNumericalProblems=function(e){if(null!=e)for(var t=0;t<e.length;t++){var n=e[t];if(!wt(n)){if(P().getBool("WEBGL_RENDER_FLOAT32_CAPABLE"))throw Error("The value "+n+" cannot be represented with your current settings. Consider enabling float32 rendering: 'tf.env().set('WEBGL_RENDER_FLOAT32_ENABLED', true);'");throw Error("The value "+n+" cannot be represented on this device.")}}},t.prototype.getValuesFromTexture=function(e){var t,n=this.texData.get(e),r=n.shape,o=n.dtype,i=n.isPacked,a=$(r);if(P().getBool("WEBGL_DOWNLOAD_FLOAT_ENABLED")){var s=this.decode(e),u=this.texData.get(s.dataId),c=(t=this.gpgpu).downloadMatrixFromPackedTexture.apply(t,[u.texture].concat(gt(r))).subarray(0,a);return this.disposeData(s.dataId),c}var l=P().getBool("WEBGL_PACK")&&!0===i,f=l?Zt(r):r,p=l?new Vi(f):new Qi(f),h=this.runWebGLProgram(p,[{shape:f,dtype:o,dataId:e}],"float32"),d=this.texData.get(h.dataId),m=this.gpgpu.downloadByteEncodedFloatMatrixFromOutputTexture(d.texture,d.texShape[0],d.texShape[1]).subarray(0,a);return this.disposeData(h.dataId),m},t.prototype.time=function(e){return D(this,void 0,void 0,(function(){var t,n,r,o,i,a,s;return B(this,(function(u){switch(u.label){case 0:return t=this.activeTimers,n=[],r=!1,null==this.programTimersStack?(this.programTimersStack=n,r=!0):this.activeTimers.push(n),this.activeTimers=n,e(),o=Y(this.activeTimers.map((function(e){return e.query}))).filter((function(e){return null!=e})),i=Y(this.activeTimers.map((function(e){return e.name}))).filter((function(e){return null!=e})),this.activeTimers=t,r&&(this.programTimersStack=null),a={uploadWaitMs:this.uploadWaitMs,downloadWaitMs:this.downloadWaitMs,kernelMs:null,wallMs:null},P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?[4,Promise.all(o)]:[3,2];case 1:return s=u.sent(),a.kernelMs=X(s),a.getExtraProfileInfo=function(){return s.map((function(e,t){return{name:i[t],ms:e}})).map((function(e){return e.name+": "+e.ms})).join(", ")},[3,3];case 2:a.kernelMs={error:"WebGL query timers are not supported in this environment."},u.label=3;case 3:return this.uploadWaitMs=0,this.downloadWaitMs=0,[2,a]}}))}))},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:je(),endMs:null}},t.prototype.endTimer=function(e){return P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?(this.gpgpu.endQuery(),e):(e.endMs=je(),e)},t.prototype.getQueryTime=function(e){return D(this,void 0,void 0,(function(){var t;return B(this,(function(n){return P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?[2,this.gpgpu.waitForQueryAndGetTime(e)]:[2,(t=e).endMs-t.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 t=this.texData.get(e).complexTensors;null!=t&&(t.real.dispose(),t.imag.dispose()),this.texData.delete(e)}}},t.prototype.releaseGPUData=function(e){var t=this.texData.get(e),n=t.texture,r=t.dtype,o=t.texShape,i=t.usage,a=t.isPacked,s=t.slice,u=s&&s.origDataId||e,c=this.dataRefCount.get(u);c>1?this.dataRefCount.set(u,c-1):(this.dataRefCount.delete(u),null!=n&&(this.numBytesInGPU-=this.computeBytes(o,r),this.textureManager.releaseTexture(n,o,i,a)));var l=this.texData.get(e);l.texture=null,l.texShape=null,l.isPacked=!1,l.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")?(null==this.cpuBackend&&(this.cpuBackend=it.findBackend("cpu")),this.cpuBackend):null},t.prototype.shouldExecuteOnCPU=function(e,t){var n=this;return void 0===t&&(t=128),null!=this.getCPUBackend()&&e.every((function(e){return null==n.texData.get(e.dataId).texture&&e.size<t}))},t.prototype.getGPGPUContext=function(){return this.gpgpu},t.prototype.complex=function(e,t){var n=this.makeOutput(e.shape,"complex64");return this.texData.get(n.dataId).complexTensors={real:it.keep(e.clone()),imag:it.keep(t.clone())},n},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,t,n){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.slice(e,t,n);if(0===$(n))return Bn([],n,e.dtype);var r=this.texData.get(e.dataId).isPacked,o=Yr(e.shape,t,n);if(r||!o){var i=P().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new Ha(n):new Qa(n),a=i.getCustomSetupFunc(t);return this.compileAndRun(i,[e],null,a)}return this.uploadToGPU(e.dataId),this.shallowSlice(e,t,n)},t.prototype.shallowSlice=function(e,t,n){var r=this.texData.get(e.dataId),o=this.makeOutput(n,e.dtype),i=this.texData.get(o.dataId);Object.assign(i,r),i.shape=n,i.dtype=e.dtype;var a=$r(t,e.strides);r.slice&&(a+=r.slice.flatOffset),i.slice={flatOffset:a,origDataId:r.slice&&r.slice.origDataId||e.dataId};var s=this.dataRefCount.get(i.slice.origDataId)||1;return this.dataRefCount.set(i.slice.origDataId,s+1),o},t.prototype.stridedSlice=function(e,t,n,r){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.stridedSlice(e,t,n,r);var o=Zr(t,n,r);if(o.some((function(e){return 0===e})))return Bn([],o);var i=new Ga(t,r,o);return this.compileAndRun(i,[e])},t.prototype.reverse=function(e,t){var n=P().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new Ua(e.shape,t):new La(e.shape,t);return this.compileAndRun(n,[e])},t.prototype.concat=function(e,t){if("complex64"===e[0].dtype){var n=e.map((function(e){return On(e)})),r=e.map((function(e){return Dn(e)}));return Rn(this.concat(n,t),this.concat(r,t))}if(this.shouldExecuteOnCPU(e))return this.cpuBackend.concat(e,t);if(1===e.length)return e[0];if(e.length>P().getNumber("WEBGL_MAX_TEXTURES_IN_SHADER")){var o=Math.floor(e.length/2),i=this.concat(e.slice(0,o),t),a=this.concat(e.slice(o),t);return this.concat([i,a],t)}if(P().getBool("WEBGL_PACK_ARRAY_OPERATIONS")&&e[0].rank>1){var s=new ki(e.map((function(e){return e.shape})),t);return this.compileAndRun(s,e)}var u=jn(e.map((function(e){return e.shape})),t),c=e.map((function(e){return e.as2D(-1,$(e.shape.slice(t)))})),l=new Ci(c.map((function(e){return e.shape})));return this.compileAndRun(l,c).reshape(u)},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,cs,e.dtype);var t=new ns(e.shape,cs);return this.compileAndRun(t,[e])},t.prototype.batchMatMul=function(e,t,n,r){var o=n?e.shape[2]:e.shape[1],i=r?t.shape[1]:t.shape[2],a=n?e.shape[1]:e.shape[2],s=e.shape[0];if((1===o||1===i)&&a>1e3){n&&(e=e.transpose([0,2,1])),r&&(t=t.transpose([0,2,1]));var u=1===i?e:e.as3D(s,a,1),c=1===i?2:1,l=1===i?t.as3D(s,1,a):t;return this.multiply(u,l).sum(c,!0)}var f=Je(e.dtype,t.dtype),p=new Ca(e.shape,[s,o,i],n,r);return this.compileAndRun(p,[e,t],f)},t.prototype.fusedBatchMatMul=function(e){var t=e.a,n=e.b,r=e.transposeA,o=e.transposeB,i=e.bias,a=e.activation,s=e.preluActivationWeights,u=r?t.shape[2]:t.shape[1],c=o?n.shape[1]:n.shape[2],l=t.shape[0],f=Je(t.dtype,n.dtype),p=null!=i,h=null!=s,d=a?Ts(a,!0):null,m=new Ca(t.shape,[l,u,c],r,o,p,d,h),g=[t,n];return i&&g.push(i),s&&g.push(s),this.compileAndRun(m,g,f)},t.prototype.multiply=function(e,t){if("complex64"===e.dtype){var n=this.texData.get(e.dataId),r=this.texData.get(t.dataId),o=new hi("return areal * breal - aimag * bimag;",e.shape,t.shape),i=new hi("return areal * bimag + aimag * breal;",e.shape,t.shape),a=[this.makeComplexComponentTensorInfo(e,n.complexTensors.real),this.makeComplexComponentTensorInfo(e,n.complexTensors.imag),this.makeComplexComponentTensorInfo(t,r.complexTensors.real),this.makeComplexComponentTensorInfo(t,r.complexTensors.imag)],s=this.compileAndRun(o,a),u=this.compileAndRun(i,a),c=this.complex(s,u);return s.dispose(),u.dispose(),c}if(this.shouldExecuteOnCPU([e,t]))return this.cpuBackend.multiply(e,t);if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,t,gi,e.dtype);var l=new yi(gi,e.shape,t.shape);return this.compileAndRun(l,[e,t],e.dtype)},t.prototype.batchNormalization=function(e,t,n,r,o,i){var a=[e,t,n],s=null;null!=i&&(s=i.shape,a.push(i));var u=null;if(null!=o&&(u=o.shape,a.push(o)),P().getBool("WEBGL_PACK_NORMALIZATION")){var c=new pi(e.shape,t.shape,n.shape,s,u,r);return this.compileAndRun(c,a)}var l=new fi(e.shape,t.shape,n.shape,s,u,r);return this.compileAndRun(l,a)},t.prototype.localResponseNormalization4D=function(e,t,n,r,o){var i=P().getBool("WEBGL_PACK_NORMALIZATION")?new xa(e.shape,t,n,r,o):new ba(e.shape,t,n,r,o);return this.compileAndRun(i,[e])},t.prototype.LRNGrad=function(e,t,n,r,o,i,a){var s=new wa(t.shape,r,o,i,a);return this.compileAndRun(s,[t,n,e])},t.prototype.tile=function(e,t){if("string"===e.dtype){var n=this.readSync(e.dataId).map((function(e){return Oe(e)}));return Fo(lr(e.shape,e.dtype,n),t)}var r=new Ja(e.shape,t);return this.compileAndRun(r,[e])},t.prototype.pad=function(e,t,n){var r=P().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new Ta(e.shape,t,n):new ja(e.shape,t,n);return this.compileAndRun(r,[e])},t.prototype.transpose=function(e,t){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.transpose(e,t);var n=P().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new $a(e.shape,t):new Ya(e.shape,t);return this.compileAndRun(n,[e])},t.prototype.gather=function(e,t,n){if(this.shouldExecuteOnCPU([e,t]))return this.cpuBackend.gather(e,t,n);var r=new Ki(e.shape,t.size,n);return this.compileAndRun(r,[e,t])},t.prototype.batchToSpaceND=function(e,t,n){Z(e.rank<=4,(function(){return"batchToSpaceND for rank > 4 with a WebGL backend not implemented yet"}));var r=t.reduce((function(e,t){return e*t})),o=Mr(e.shape,t,r),i=Fr(o.length,t.length),a=Lr(e.shape,t,r),s=Ur(n,t.length),u=Wr(a,n,t.length);return e.reshape(o).transpose(i).reshape(a).slice(s,u)},t.prototype.spaceToBatchND=function(e,t,n){Z(e.rank<=4,(function(){return"spaceToBatchND for rank > 4 with a WebGL backend not implemented yet"}));var r=t.reduce((function(e,t){return e*t})),o=[[0,0]];o.push.apply(o,n);for(var i=1+t.length;i<e.shape.length;++i)o.push([0,0]);var a=e.pad(o),s=Mr(a.shape,t,r,!1),u=Fr(s.length,t.length,!1),c=Lr(a.shape,t,r,!1);return a.reshape(s).transpose(u).reshape(c)},t.prototype.reduce=function(e,t,n){var r=e.shape[0],o=e.shape[1],i=qr(o),a=new Da({windowSize:i,inSize:o,batchSize:r},t),s=this.compileAndRun(a,[e],n);return 1===s.shape[1]?s:this.reduce(s,t,n)},t.prototype.argReduce=function(e,t,n){void 0===n&&(n=null);var r=e.shape[0],o=e.shape[1];null!=n&&(r=n.shape[0],o=n.shape[1]);var i=qr(o),a=new qo({windowSize:i,inSize:o,batchSize:r},t,null==n),s=[e];null!=n&&s.push(n);var u=this.compileAndRun(a,s,"int32");return 1===u.shape[1]?u:this.argReduce(e,t,u)},t.prototype.argReducePacked=function(e,t,n){void 0===n&&(n=null);var r=null!=n?n.shape:e.shape,o=qr(r[r.length-1]),i=new ui(r,o,t,null==n),a=null==n?[e]:[e,n],s=this.compileAndRun(i,a,"int32");return s.rank===e.rank?this.argReducePacked(e,t,s):s},t.prototype.sum=function(e,t){En("sum",t,e.rank);var n=xn(e.shape,t),r=n[0],o=$(n[1]),i=e.as2D(-1,o),a=Ye(e.dtype);return this.reduce(i,"sum",a).reshape(r)},t.prototype.prod=function(e,t){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.prod(e,t);var n=xn(e.shape,t),r=n[0],o=$(n[1]),i=e.as2D(-1,o),a=Ye(e.dtype);return this.reduce(i,"prod",a).reshape(r)},t.prototype.unsortedSegmentSum=function(e,t,n){var r=0,o=Cn([r],e.rank),i=e;null!=o&&(i=e.transpose(o),r=In(1,e.rank)[0]);var a=function(e,t,n){for(var r=[],o=e.length,i=0;i<o;i++)i!==t?r.push(e[i]):r.push(n);return r}(i.shape,r,n),s=$([i.shape[r]]),u=i.as2D(-1,s),c=Ye(e.dtype),l=this.segOpCompute(u,"unsortedSegmentSum",t,c,n).reshape(a);return null!=o&&(l=l.transpose(kn(o))),l},t.prototype.segOpCompute=function(e,t,n,r,o){var i=e.shape[0],a=e.shape[1],s=function(e,t){var n,r=!1;for(e<=30?(n=e,r=!0):n=Ae(e,Math.floor(Math.sqrt(e)));!r;)n>t||n===e?r=!0:n=Ae(e,n+1);return n}(a,o),u=new za({windowSize:s,inSize:a,batchSize:i,numSegments:o},t),c=this.compileAndRun(u,[e,n],r);return c.shape[1]===o?c:(n=qn(0,o).tile([a/s]),this.segOpCompute(c,t,n,r,o))},t.prototype.argMinMaxReduce=function(e,t,n){var r=[t];if(En("arg"+n.charAt(0).toUpperCase()+n.slice(1),r,e.rank),!P().getBool("WEBGL_PACK_REDUCE")||e.rank<=2){var o=xn(e.shape,r),i=o[0],a=$(o[1]),s=e.as2D(-1,a);return this.argReduce(s,n).reshape(i)}return this.argReducePacked(e,n)},t.prototype.argMin=function(e,t){return this.argMinMaxReduce(e,t,"min")},t.prototype.argMax=function(e,t){return this.argMinMaxReduce(e,t,"max")},t.prototype.cumsum=function(e,t,n,r){if(t!==e.rank-1)throw new Error("WebGL cumsum shader expects an inner-most axis="+(e.rank-1)+" but got axis="+t);var o=new Fi(e.shape,n,r);return this.compileAndRun(o,[e])},t.prototype.equal=function(e,t){if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,t,"\n return vec4(equal(a, b));\n","bool");var n=new yi("return float(a == b);",e.shape,t.shape);return this.compileAndRun(n,[e,t],"bool")},t.prototype.notEqual=function(e,t){if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,t,"\n return vec4(notEqual(a, b));\n","bool");var n=new yi("return float(a != b);",e.shape,t.shape);return this.compileAndRun(n,[e,t],"bool")},t.prototype.less=function(e,t){if(this.shouldExecuteOnCPU([e,t]))return this.cpuBackend.less(e,t);if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,t,"\n return vec4(lessThan(a, b));\n","bool");var n=new yi("return float(a < b);",e.shape,t.shape);return this.compileAndRun(n,[e,t],"bool")},t.prototype.lessEqual=function(e,t){if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,t,"\n return vec4(lessThanEqual(a, b));\n","bool");var n=new yi("return float(a <= b);",e.shape,t.shape);return this.compileAndRun(n,[e,t],"bool")},t.prototype.greater=function(e,t){if(this.shouldExecuteOnCPU([e,t]))return this.cpuBackend.greater(e,t);if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,t,"\n return vec4(greaterThan(a, b));\n","bool");var n=new yi("return float(a > b);",e.shape,t.shape);return this.compileAndRun(n,[e,t],"bool")},t.prototype.greaterEqual=function(e,t){if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,t,"\n return vec4(greaterThanEqual(a, b));\n","bool");var n=new yi("return float(a >= b);",e.shape,t.shape);return this.compileAndRun(n,[e,t],"bool")},t.prototype.logicalNot=function(e){var t=new ns(e.shape,"return float(!(x >= 1.0));");return this.compileAndRun(t,[e])},t.prototype.logicalAnd=function(e,t){if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,t,"\n return vec4(\n vec4(greaterThanEqual(a, vec4(1.0))) *\n vec4(greaterThanEqual(b, vec4(1.0))));\n","bool");var n=new yi("return float(a >= 1.0 && b >= 1.0);",e.shape,t.shape);return this.compileAndRun(n,[e,t],"bool")},t.prototype.logicalOr=function(e,t){if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,t,"\n return min(\n vec4(greaterThanEqual(a, vec4(1.0))) +\n vec4(greaterThanEqual(b, vec4(1.0))),\n vec4(1.0));\n","bool");var n=new yi("return float(a >= 1.0 || b >= 1.0);",e.shape,t.shape);return this.compileAndRun(n,[e,t],"bool")},t.prototype.select=function(e,t,n){var r=new qa(e.rank,t.shape,t.rank);return this.compileAndRun(r,[e,t,n],Je(t.dtype,n.dtype))},t.prototype.where=function(e){dn("tf.where() in webgl locks the UI thread. Call tf.whereAsync() instead");var t=e.dataSync();return Uo(e.shape,t)},t.prototype.topk=function(e,t,n){return Lo(e.dataSync(),e.shape,e.dtype,t)},t.prototype.min=function(e,t){En("min",t,e.rank);var n=xn(e.shape,t),r=n[0],o=$(n[1]),i=e.as2D(-1,o);return this.reduce(i,"min",i.dtype).reshape(r)},t.prototype.minimum=function(e,t){if(this.shouldExecuteOnCPU([e,t]))return this.cpuBackend.minimum(e,t);var n=P().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new wi("\n vec4 result = vec4(min(a, b));\n vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0));\n \n result.r = isNaN.r > 0. ? NAN : result.r;\n result.g = isNaN.g > 0. ? NAN : result.g;\n result.b = isNaN.b > 0. ? NAN : result.b;\n result.a = isNaN.a > 0. ? NAN : result.a;\n\n return result;\n",e.shape,t.shape):new yi("\n if (isnan(a)) return a;\n if (isnan(b)) return b;\n\n return min(a, b);\n",e.shape,t.shape);return this.compileAndRun(n,[e,t])},t.prototype.mod=function(e,t){var n=P().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new wi("\n vec4 result = mod(a, b);\n vec4 isNaN = vec4(equal(b, vec4(0.0)));\n \n result.r = isNaN.r > 0. ? NAN : result.r;\n result.g = isNaN.g > 0. ? NAN : result.g;\n result.b = isNaN.b > 0. ? NAN : result.b;\n result.a = isNaN.a > 0. ? NAN : result.a;\n\n return result;\n",e.shape,t.shape):new yi("if (b == 0.0) return NAN;\n return mod(a, b);",e.shape,t.shape);return this.compileAndRun(n,[e,t])},t.prototype.max=function(e,t){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.max(e,t);En("max",t,e.rank);var n=xn(e.shape,t),r=n[0],o=$(n[1]),i=e.as2D(-1,o);return this.reduce(i,"max",i.dtype).reshape(r)},t.prototype.maximum=function(e,t){if(this.shouldExecuteOnCPU([e,t]))return this.cpuBackend.maximum(e,t);var n=P().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new wi("\n vec4 result = vec4(max(a, b));\n vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0));\n \n result.r = isNaN.r > 0. ? NAN : result.r;\n result.g = isNaN.g > 0. ? NAN : result.g;\n result.b = isNaN.b > 0. ? NAN : result.b;\n result.a = isNaN.a > 0. ? NAN : result.a;\n\n return result;\n",e.shape,t.shape):new yi("\n if (isnan(a)) return a;\n if (isnan(b)) return b;\n\n return max(a, b);\n",e.shape,t.shape);return this.compileAndRun(n,[e,t])},t.prototype.all=function(e,t){En("all",t,e.rank);var n=xn(e.shape,t),r=n[0],o=$(n[1]),i=e.as2D(-1,o);return this.reduce(i,"all",i.dtype).reshape(r)},t.prototype.any=function(e,t){En("any",t,e.rank);var n=xn(e.shape,t),r=n[0],o=$(n[1]),i=e.as2D(-1,o);return this.reduce(i,"any",i.dtype).reshape(r)},t.prototype.realDivide=function(e,t){if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,t,"\n // vec4 one = vec4(equal(a, b));\n // return one + (vec4(1.0) - one) * a / b;\n vec4 result = a / b;\n if(a.x == b.x) {\n result.x = 1.;\n }\n if(a.y == b.y) {\n result.y = 1.;\n }\n if(a.z == b.z) {\n result.z = 1.;\n }\n if(a.w == b.w) {\n result.w = 1.;\n }\n\n return result;\n","float32",!0);var n=new yi("\nif (a == b) {\n return 1.0;\n};\nreturn a / b;",e.shape,t.shape);return this.compileAndRun(n,[e,t],"float32")},t.prototype.floorDiv=function(e,t){if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,t,"\n ivec4 ia = round(a);\n ivec4 ib = round(b);\n bvec4 cond = notEqual(ib, ivec4(0));\n ivec4 result = ivec4(0);\n vec4 s = sign(a) * sign(b);\n\n // Windows (D3D) wants guaranteed non-zero int division at compile-time.\n if (cond[0]) {\n result[0] = idiv(ia[0], ib[0], s[0]);\n }\n if (cond[1]) {\n result[1] = idiv(ia[1], ib[1], s[1]);\n }\n if (cond[2]) {\n result[2] = idiv(ia[2], ib[2], s[2]);\n }\n if (cond[3]) {\n result[3] = idiv(ia[3], ib[3], s[3]);\n }\n return vec4(result);\n","int32");var n=new yi("\n float s = sign(a) * sign(b);\n int ia = round(a);\n int ib = round(b);\n if (ib != 0) {\n // Windows (D3D) wants guaranteed non-zero int division at compile-time.\n return float(idiv(ia, ib, s));\n } else {\n return NAN;\n }\n",e.shape,t.shape);return this.compileAndRun(n,[e,t],"int32")},t.prototype.add=function(e,t){if("complex64"===e.dtype&&"complex64"===t.dtype)return this.complexSeparableBinaryOp(e,t,di);if(this.shouldExecuteOnCPU([e,t]))return this.cpuBackend.add(e,t);var n=Je(e.dtype,t.dtype);if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,t,di,n);var r=new yi(di,e.shape,t.shape);return this.compileAndRun(r,[e,t],n)},t.prototype.packedUnaryOp=function(e,t,n){var r=new Is(e.shape,t);return this.compileAndRun(r,[e],n)},t.prototype.packedBinaryOp=function(e,t,n,r,o){void 0===o&&(o=!1);var i=new wi(n,e.shape,t.shape,o);return this.compileAndRun(i,[e,t],r)},t.prototype.complexSeparableBinaryOp=function(e,t,n){var r=this,o=this.texData.get(e.dataId),i=this.texData.get(t.dataId),a=[[o.complexTensors.real,i.complexTensors.real],[o.complexTensors.imag,i.complexTensors.imag]].map((function(o){var i=o[0],a=o[1],s=r.makeComplexComponentTensorInfo(e,i),u=r.makeComplexComponentTensorInfo(t,a),c=new yi(n,e.shape,t.shape);return r.compileAndRun(c,[s,u],Je(i.dtype,a.dtype))})),s=a[0],u=a[1],c=this.complex(s,u);return s.dispose(),u.dispose(),c},t.prototype.makeComplexComponentTensorInfo=function(e,t){return{dataId:t.dataId,dtype:t.dtype,shape:e.shape}},t.prototype.addN=function(e){if(1===e.length)return e[0];if(e.length>P().get("WEBGL_MAX_TEXTURES_IN_SHADER")){var t=Math.floor(e.length/2),n=this.addN(e.slice(0,t)),r=this.addN(e.slice(t));return this.addN([n,r])}var o=e.map((function(e){return e.dtype})).reduce((function(e,t){return Je(e,t)})),i=e.map((function(e){return e.shape})),a=P().getBool("WEBGL_PACK")?new zo(e[0].shape,i):new Wo(e[0].shape,i);return this.compileAndRun(a,e,o)},t.prototype.subtract=function(e,t){if("complex64"===e.dtype&&"complex64"===t.dtype)return this.complexSeparableBinaryOp(e,t,mi);if(this.shouldExecuteOnCPU([e,t]))return this.cpuBackend.subtract(e,t);var n=Je(e.dtype,t.dtype);if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,t,mi,e.dtype);var r=new yi(mi,e.shape,t.shape);return this.compileAndRun(r,[e,t],n)},t.prototype.pow=function(e,t){var n=P().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new wi("\n // isModRound1 has 1 for components with round(mod(b, 2.0)) == 1, 0 otherwise.\n vec4 isModRound1 = vec4(equal(round(mod(b, 2.0)), ivec4(1)));\n vec4 multiplier = sign(a) * isModRound1 + (vec4(1.0) - isModRound1);\n vec4 result = multiplier * pow(abs(a), b);\n\n // Ensure that a^0 = 1, including 0^0 = 1 as this correspond to TF and JS\n bvec4 isExpZero = equal(b, vec4(0.0));\n result.r = isExpZero.r ? 1.0 : result.r;\n result.g = isExpZero.g ? 1.0 : result.g;\n result.b = isExpZero.b ? 1.0 : result.b;\n result.a = isExpZero.a ? 1.0 : result.a;\n\n vec4 isNaN = vec4(lessThan(a, vec4(0.0))) * vec4(lessThan(floor(b), b));\n \n result.r = isNaN.r > 0. ? NAN : result.r;\n result.g = isNaN.g > 0. ? NAN : result.g;\n result.b = isNaN.b > 0. ? NAN : result.b;\n result.a = isNaN.a > 0. ? NAN : result.a;\n\n return result;\n",e.shape,t.shape):new yi("\nif(a < 0.0 && floor(b) < b){\n return NAN;\n}\nif (b == 0.0) {\n return 1.0;\n}\nreturn (round(mod(b, 2.0)) != 1) ?\n pow(abs(a), b) : sign(a) * pow(abs(a), b);\n",e.shape,t.shape),r=Je(e.dtype,t.dtype);return this.compileAndRun(n,[e,t],r)},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,ls,e.dtype);var t=new ns(e.shape,ls);return this.compileAndRun(t,[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,fs,e.dtype);var t=new ns(e.shape,fs);return this.compileAndRun(t,[e])},t.prototype.sign=function(e){var t=new ns(e.shape,"\n if (isnan(x)) { return 0.0; }\n return sign(x);\n");return this.compileAndRun(t,[e])},t.prototype.isNaN=function(e){var t=new ns(e.shape,"return float(isnan(x));");return this.compileAndRun(t,[e],"bool")},t.prototype.isInf=function(e){var t=new ns(e.shape,"return float(isinf(x));");return this.compileAndRun(t,[e],"bool")},t.prototype.isFinite=function(e){var t=new ns(e.shape,"return float(!isnan(x) && !isinf(x));");return this.compileAndRun(t,[e],"bool")},t.prototype.round=function(e){var t=new ns(e.shape,"\n // OpenGL ES does not support round function.\n // The algorithm is based on banker's rounding.\n float base = floor(x);\n if ((x - base) < 0.5) {\n return floor(x);\n } else if ((x - base) > 0.5) {\n return ceil(x);\n } else {\n if (mod(base, 2.0) == 0.0) {\n return base;\n } else {\n return base + 1.0;\n }\n }\n");return this.compileAndRun(t,[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,ps,e.dtype);var t=new ns(e.shape,ps);return this.compileAndRun(t,[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,hs,e.dtype);var t=new ns(e.shape,hs);return this.compileAndRun(t,[e])},t.prototype.softmax=function(e,t){var n=se([t],e.shape),r=this.max(e,n),o=An(r.shape,n),i=this.subtract(e,r.reshape(o)),a=this.exp(i),s=this.sum(a,n).reshape(o);return this.realDivide(a,s)},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,"\n vec4 result = log(x);\n vec4 isNaN = vec4(lessThan(x, vec4(0.0)));\n result.r = isNaN.r == 1.0 ? NAN : result.r;\n result.g = isNaN.g == 1.0 ? NAN : result.g;\n result.b = isNaN.b == 1.0 ? NAN : result.b;\n result.a = isNaN.a == 1.0 ? NAN : result.a;\n\n return result;\n",e.dtype);var t=new ns(e.shape,"if (x < 0.0) return NAN;\n return log(x);");return this.compileAndRun(t,[e])},t.prototype.log1p=function(e){var t=new ns(e.shape,"return log(1.0 + x);");return this.compileAndRun(t,[e])},t.prototype.sqrt=function(e){var t=new ns(e.shape,"return sqrt(x);");return this.compileAndRun(t,[e])},t.prototype.rsqrt=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.rsqrt(e);var t=new ns(e.shape,"return inversesqrt(x);");return this.compileAndRun(t,[e])},t.prototype.reciprocal=function(e){var t=new ns(e.shape,"return 1.0 / x;");return this.compileAndRun(t,[e])},t.prototype.relu=function(e){var t;return t=P().getBool("WEBGL_PACK")?new Is(e.shape,Es):new ns(e.shape,is),this.compileAndRun(t,[e])},t.prototype.relu6=function(e){var t;return t=P().getBool("WEBGL_PACK")?new Is(e.shape,Cs):new ns(e.shape,as),this.compileAndRun(t,[e])},t.prototype.prelu=function(e,t){var n=P().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new wi(bi,e.shape,t.shape):new yi(vi,e.shape,t.shape);return this.compileAndRun(n,[e,t])},t.prototype.elu=function(e){if(P().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,ks,e.dtype);var t=new ns(e.shape,ss);return this.compileAndRun(t,[e])},t.prototype.eluDer=function(e,t){var n=P().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new wi("\n vec4 bGTEZero = vec4(greaterThanEqual(b, vec4(0.)));\n return (bGTEZero * a) + ((vec4(1.0) - bGTEZero) * (a * (b + vec4(1.0))));\n",e.shape,t.shape):new yi("return (b >= 1.0) ? a : a * (b + 1.0);",e.shape,t.shape);return this.compileAndRun(n,[e,t])},t.prototype.selu=function(e){var t=new ns(e.shape,us);return this.compileAndRun(t,[e])},t.prototype.int=function(e){var t=new ns(e.shape,"return float(int(x));");return this.compileAndRun(t,[e],"int32")},t.prototype.clip=function(e,t,n){var r,o=(r=P().getBool("WEBGL_PACK_CLIP")?new Ai(e.shape):new xi(e.shape)).getCustomSetupFunc(t,n);return this.compileAndRun(r,[e],null,o)},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,os,e.dtype);var t=new ns(e.shape,os);return this.compileAndRun(t,[e])},t.prototype.complexAbs=function(e){var t=this.texData.get(e.dataId),n=new Ei(e.shape),r=[this.makeComplexComponentTensorInfo(e,t.complexTensors.real),this.makeComplexComponentTensorInfo(e,t.complexTensors.imag)];return this.compileAndRun(n,r)},t.prototype.sigmoid=function(e){var t=new ns(e.shape,"return 1.0 / (1.0 + exp(-1.0 * x));");return this.compileAndRun(t,[e])},t.prototype.softplus=function(e){var t=new ns(e.shape,"\n float epsilon = 1.1920928955078125e-7;\n float threshold = log(epsilon) + 2.0;\n\n bool too_large = x > -threshold;\n bool too_small = x < threshold;\n\n float result;\n float exp_x = exp(x);\n\n if (too_large){\n result = x;\n }\n else if (too_small){\n result = exp_x;\n }\n else{\n result = log(exp_x + 1.0);\n }\n return result;\n");return this.compileAndRun(t,[e])},t.prototype.sin=function(e){var t=new ns(e.shape,ds);return this.compileAndRun(t,[e])},t.prototype.cos=function(e){var t=new ns(e.shape,ms);return this.compileAndRun(t,[e])},t.prototype.tan=function(e){var t=new ns(e.shape,"return tan(x);");return this.compileAndRun(t,[e])},t.prototype.asin=function(e){var t=new ns(e.shape,gs);return this.compileAndRun(t,[e])},t.prototype.acos=function(e){var t=new ns(e.shape,vs);return this.compileAndRun(t,[e])},t.prototype.atan=function(e){var t=new ns(e.shape,ys);return this.compileAndRun(t,[e])},t.prototype.atan2=function(e,t){var n=P().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new wi("\n vec4 result = atan(a, b);\n vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0));\n \n result.r = isNaN.r > 0. ? NAN : result.r;\n result.g = isNaN.g > 0. ? NAN : result.g;\n result.b = isNaN.b > 0. ? NAN : result.b;\n result.a = isNaN.a > 0. ? NAN : result.a;\n\n return result;\n",e.shape,t.shape):new yi("\n if (isnan(a)) return a;\n if (isnan(b)) return b;\n\n return atan(a, b);\n",e.shape,t.shape);return this.compileAndRun(n,[e,t])},t.prototype.sinh=function(e){var t=new ns(e.shape,"\n float e2x = exp(x);\n return (e2x - 1.0 / e2x) / 2.0;\n");return this.compileAndRun(t,[e])},t.prototype.cosh=function(e){var t=new ns(e.shape,"\n float e2x = exp(-x);\n return (e2x + 1.0 / e2x) / 2.0;\n");return this.compileAndRun(t,[e])},t.prototype.tanh=function(e){var t=new ns(e.shape,"\n float e2x = exp(-2.0 * abs(x));\n return sign(x) * (1.0 - e2x) / (1.0 + e2x);\n");return this.compileAndRun(t,[e])},t.prototype.asinh=function(e){var t=new ns(e.shape,bs);return this.compileAndRun(t,[e])},t.prototype.acosh=function(e){var t=new ns(e.shape,ws);return this.compileAndRun(t,[e])},t.prototype.atanh=function(e){var t=new ns(e.shape,xs);return this.compileAndRun(t,[e])},t.prototype.erf=function(e){var t=new ns(e.shape,'\n // Error function is calculated approximately with elementary function.\n // See "Handbook of Mathematical Functions with Formulas,\n // Graphs, and Mathematical Tables", Abramowitz and Stegun.\n float p = 0.3275911;\n float a1 = 0.254829592;\n float a2 = -0.284496736;\n float a3 = 1.421413741;\n float a4 = -1.453152027;\n float a5 = 1.061405429;\n\n float sign = sign(x);\n x = abs(x);\n float t = 1.0 / (1.0 + p * x);\n return sign * (1.0 - (((((a5*t + a4)*t) + a3)*t + a2)*t + a1)*t*exp(-x*x));\n');return this.compileAndRun(t,[e])},t.prototype.step=function(e,t){var n=new ns(e.shape,function(e){return void 0===e&&(e=0),rs+"\n return x > 0.0 ? 1.0 : float("+e+");\n "}(t));return this.compileAndRun(n,[e])},t.prototype.conv2dByMatMul=function(e,t,n,r,o,i){var a=e.shape,s=this.texData.get(e.dataId),u=n.inChannels,c=a[0]*a[1]*a[2],l=n.outChannels,f="channelsLast"===n.dataFormat,p=(1===c||1===l)&&u>1e3,h=a[2]%2!=0&&!!s.isPacked;if(p||!P().getBool("WEBGL_LAZILY_UNPACK")||!P().getBool("WEBGL_PACK_BINARY_OPERATIONS")||!h){var d=f?a[0]*a[1]*a[2]:a[0]*a[2]*a[3],m=this.reshape(e,[1,d,n.inChannels]),g=this.reshape(t,[1,n.inChannels,n.outChannels]);return this.reshape(this.fusedBatchMatMul({a:m,b:g,transposeA:!1,transposeB:!1,bias:r,activation:o,preluActivationWeights:i}),n.outShape)}var v=f?a[0]*a[1]*(a[2]+1):a[0]*a[2]*(a[3]+1),y={dataId:e.dataId,shape:[1,v,n.inChannels],dtype:e.dtype},b=s.shape;s.shape=s.shape.slice(),s.shape[s.shape.length-2]++,Z(Yt(s.shape,y.shape),(function(){return"packed reshape "+s.shape+" to "+y.shape+" isn't free"}));var w=this.reshape(t,[1,n.inChannels,n.outChannels]),x=this.fusedBatchMatMul({a:y,b:w,transposeA:!1,transposeB:!1,bias:r,activation:o,preluActivationWeights:i}),A=this.texData.get(x.dataId);return Z(A.isPacked,(function(){return"batchMatMul result is expected to be packed"})),s.shape=b,A.shape=n.outShape,it.makeTensorFromDataId(x.dataId,n.outShape,x.dtype)},t.prototype.conv2dWithIm2Row=function(e,t,n,r,o,i){var a=n.filterWidth,s=n.filterHeight,u=n.inChannels,c=n.outWidth,l=n.outHeight,f="channelsLast"===n.dataFormat,p=a*s*u,h=l*c,d=[p,h],m=e.squeeze([0]),g=t.reshape([1,p,-1]),v=new ya(d,m.shape,n),y=this.compileAndRun(v,[m]).reshape([1,d[0],d[1]]),b=null!=r,w=null!=i,x=o?Ts(o,!0):null,A=new Ca(y.shape,[1,h,n.outChannels],!0,!1,b,x,w),E=[y,g];r&&E.push(r),w&&E.push(i);var C=this.compileAndRun(A,E);return f?C.reshape([1,l,c,n.outChannels]):C.reshape([1,n.outChannels,l,c])},t.prototype.fusedConv2d=function(e){var t=e.input,n=e.filter,r=e.convInfo,o=e.bias,i=e.activation,a=e.preluActivationWeights;if(1===r.filterHeight&&1===r.filterWidth&&1===r.dilationHeight&&1===r.dilationWidth&&1===r.strideHeight&&1===r.strideWidth&&("SAME"===r.padInfo.type||"VALID"===r.padInfo.type))return this.conv2dByMatMul(t,n,r,o,i,a);if(P().getBool("WEBGL_CONV_IM2COL")&&1===t.shape[0])return this.conv2dWithIm2Row(t,n,r,o,i,a);var s=null!=o,u=null!=a,c=i?Ts(i,!1):null,l=new Bi(r,s,c,u),f=[t,n];return o&&f.push(o),a&&f.push(a),this.compileAndRun(l,f)},t.prototype.conv2d=function(e,t,n){if(1===n.filterHeight&&1===n.filterWidth&&1===n.dilationHeight&&1===n.dilationWidth&&1===n.strideHeight&&1===n.strideWidth&&("SAME"===n.padInfo.type||"VALID"===n.padInfo.type))return this.conv2dByMatMul(e,t,n);if(P().getBool("WEBGL_CONV_IM2COL")&&1===e.shape[0])return this.conv2dWithIm2Row(e,t,n);var r=new Bi(n);return this.compileAndRun(r,[e,t])},t.prototype.conv2dDerInput=function(e,t,n){var r=new ji(n);return this.compileAndRun(r,[e,t])},t.prototype.conv2dDerFilter=function(e,t,n){var r=new Si(n);return this.compileAndRun(r,[e,t])},t.prototype.fusedDepthwiseConv2D=function(e){var t,n=e.input,r=e.filter,o=e.convInfo,i=e.bias,a=e.activation,s=e.preluActivationWeights,u=P().getBool("WEBGL_PACK_DEPTHWISECONV")&&o.strideWidth<=2&&o.outChannels/o.inChannels==1,c=a?Ts(a,u):null,l=[n,r],f=null!=i,p=null!=s;return f&&l.push(i),p&&l.push(s),u?(t=new Pi(o,f,c,p),this.compileAndRun(t,l)):(t=new Ni(o,f,c,p),this.compileAndRun(t,l))},t.prototype.depthwiseConv2D=function(e,t,n){var r;return P().getBool("WEBGL_PACK_DEPTHWISECONV")&&n.strideWidth<=2&&n.outChannels/n.inChannels==1?(r=new Pi(n),this.compileAndRun(r,[e,t])):(r=new Ni(n),this.compileAndRun(r,[e,t]))},t.prototype.depthwiseConv2DDerInput=function(e,t,n){var r=new Di(n);return this.compileAndRun(r,[e,t])},t.prototype.depthwiseConv2DDerFilter=function(e,t,n){var r=new Oi(n);return this.compileAndRun(r,[e,t])},t.prototype.conv3d=function(e,t,n){var r=new _i(n);return this.compileAndRun(r,[e,t])},t.prototype.conv3dDerInput=function(e,t,n){var r=new Ri(n);return this.compileAndRun(r,[e,t])},t.prototype.conv3dDerFilter=function(e,t,n){var r=new Ti(n);return this.compileAndRun(r,[e,t])},t.prototype.maxPool=function(e,t){var n=new Ra(t,"max",!1);return this.compileAndRun(n,[e])},t.prototype.avgPool=function(e,t){var n=new Ra(t,"avg",!1);return this.compileAndRun(n,[e],"float32")},t.prototype.maxPoolBackprop=function(e,t,n,r){var o=new Ra(r,"max",!0),i=this.compileAndRun(o,[t]),a=new Aa(r),s=this.compileAndRun(a,[e,i],t.dtype);return i.dispose(),s},t.prototype.avgPoolBackprop=function(e,t,n){var r=new ci(n);return this.compileAndRun(r,[e],t.dtype)},t.prototype.cast=function(e,t){return Ao(e,t,this)},t.prototype.unstack=function(e,t){for(var n=e.shape[t],r=new Array(e.rank-1),o=0,i=0;i<e.rank;i++)i!==t&&(r[o++]=e.shape[i]);var a=new Array(e.rank).fill(0),s=e.shape.slice();s[t]=1;var u=new Array(n);for(i=0;i<u.length;i++)a[t]=i,u[i]=this.slice(e,a,s).reshape(r);return u},t.prototype.avgPool3d=function(e,t){var n=new Oa(t,"avg",!1);return this.compileAndRun(n,[e],"float32")},t.prototype.avgPool3dBackprop=function(e,t,n){var r=new li(n);return this.compileAndRun(r,[e],t.dtype)},t.prototype.maxPool3d=function(e,t){var n=new Oa(t,"max",!1);return this.compileAndRun(n,[e],"float32")},t.prototype.maxPool3dBackprop=function(e,t,n,r){var o=new Oa(r,"max",!0),i=this.compileAndRun(o,[t]),a=new Ea(r),s=this.compileAndRun(a,[e,i],t.dtype);return i.dispose(),s},t.prototype.reshape=function(e,t){var n=this.texData.get(e.dataId);if(n.isPacked&&!Yt(e.shape,t)&&(null===n.texture||!Yt(n.shape,t))){var r=this.packedReshape(e,t);return it.makeTensorFromDataId(r.dataId,r.shape,r.dtype)}return Eo(e,t)},t.prototype.resizeBilinear=function(e,t,n,r){var o=P().getBool("WEBGL_PACK_IMAGE_OPERATIONS")?new Pa(e.shape,t,n,r):new Na(e.shape,t,n,r);return this.compileAndRun(o,[e],"float32")},t.prototype.resizeBilinearBackprop=function(e,t,n){var r=new _a(e,t,n);return this.compileAndRun(r,[e])},t.prototype.resizeNearestNeighbor=function(e,t,n,r){var o=new Fa(e.shape,t,n,r);return this.compileAndRun(o,[e])},t.prototype.resizeNearestNeighborBackprop=function(e,t,n){var r=new Ma(e,t,n);return this.compileAndRun(r,[e])},t.prototype.multinomial=function(e,t,n,r){var o=t?e:to(e),i=o.shape[0],a=o.shape[1],s=new ka(i,a,n),u=s.getCustomSetupFunc(r);return this.compileAndRun(s,[o],"int32",u)},t.prototype.oneHot=function(e,t,n,r){var o=new Ia(e.size,t,n,r);return this.compileAndRun(o,[e])},t.prototype.diag=function(e){var t=new qi(e.size);return this.compileAndRun(t,[e])},t.prototype.nonMaxSuppression=function(e,t,n,r,o){return dn("tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead"),Oo(e.dataSync(),t.dataSync(),n,r,o)},t.prototype.cropAndResize=function(e,t,n,r,o,i){var a=new Mi(e.shape,t.shape,r,o,i);return this.compileAndRun(a,[e,t,n],"float32")},t.prototype.depthToSpace=function(e,t,n){Z(t>1,(function(){return"blockSize should be > 1 for depthToSpace, but was: "+t}));var r=e.shape[0],o="NHWC"===n?e.shape[1]:e.shape[2],i="NHWC"===n?e.shape[2]:e.shape[3],a="NHWC"===n?e.shape[3]:e.shape[1],s=o*t,u=i*t,c=a/(t*t),l=new zi("NHWC"===n?[r,s,u,c]:[r,c,s,u],t,n);return this.compileAndRun(l,[e])},t.prototype.split=function(e,t,n){return Mo(e,t,n)},t.prototype.scatterND=function(e,t,n){var r=Hr(0,e,n),o=r.sliceRank,i=r.numUpdates,a=r.sliceSize,s=r.strides,u=r.outputSize,c=[u/a,a],l=e.reshape([i,o]),f=t.reshape([i,a]);if(0===u)return Eo(Bn([]),n);var p=Nn(0),h=new Wa(i,o,l.rank,f.rank,s,c);return this.compileAndRun(h,[f,l,p]).reshape(n)},t.prototype.sparseToDense=function(e,t,n,r){var o=Hr(0,e,n),i=o.sliceRank,a=o.numUpdates,s=o.strides,u=o.outputSize,c=new Wa(a,i,e.rank,t.rank,s,[u,1],!1);return this.compileAndRun(c,[t,e,r]).reshape(n)},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,t){var n=this.texData.get(e.dataId),r=new Xi("return real * expR - imag * expI;",e.shape,t),o=new Xi("return real * expI + imag * expR;",e.shape,t),i=[this.makeComplexComponentTensorInfo(e,n.complexTensors.real),this.makeComplexComponentTensorInfo(e,n.complexTensors.imag)],a=this.compileAndRun(r,i),s=this.compileAndRun(o,i),u=this.complex(a,s).as2D(e.shape[0],e.shape[1]);return a.dispose(),s.dispose(),u},t.prototype.gatherND=function(e,t){var n=t.shape,r=n[n.length-1],o=zr(e,t),i=o[0],a=o[1],s=o[2],u=o[3],c=t.reshape([a,r]),l=e.reshape([e.size/s,s]),f=new Ji(r,u,[a,s]);return this.compileAndRun(f,[l,c]).reshape(i)},t.prototype.fill=function(e,t,n){if("string"===(n=n||we(t))){var r=le(n,$(e));return r.fill(t),it.makeTensor(r,e,n,this)}var o=new Zi(e,t),i=o.getCustomSetupFunc(t);return this.compileAndRun(o,[],n,i)},t.prototype.onesLike=function(e){if("string"===e.dtype)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,"string"===e.dtype?"":0,e.dtype)},t.prototype.linspace=function(e,t,n){return Co(e,t,n)},t.prototype.makeTensorInfo=function(e,t){var n=this.write(null,e,t);return this.texData.get(n).usage=null,{dataId:n,shape:e,dtype:t}},t.prototype.makeOutput=function(e,t){var n=this.makeTensorInfo(e,t).dataId;return it.makeTensorFromDataId(n,e,t,this)},t.prototype.unpackTensor=function(e){var t=new Ss(e.shape);return this.runWebGLProgram(t,[e],e.dtype)},t.prototype.packTensor=function(e){var t=new Sa(e.shape);return this.runWebGLProgram(t,[e],e.dtype,null,!0)},t.prototype.packedReshape=function(e,t){var n=[Gt(e.shape)].concat(Xt(e.shape)),r={dtype:e.dtype,shape:n,dataId:e.dataId},o=[Gt(t)].concat(Xt(t)),i=new Ba(o,n),a=this.runWebGLProgram(i,[r],e.dtype,null,!0);return{dataId:a.dataId,shape:t,dtype:a.dtype}},t.prototype.decode=function(e){var t,n=this.texData.get(e),r=n.isPacked,o=n.shape,i=n.dtype,a=Zt(o);return t=r?new Wi(a):new Ui(a),{dtype:i,shape:o,dataId:this.runWebGLProgram(t,[{shape:a,dtype:i,dataId:e}],i,null,!0).dataId}},t.prototype.runWebGLProgram=function(e,t,n,r,o){var i=this;void 0===o&&(o=!1);var a=this.makeTensorInfo(e.outputShape,n),s=this.texData.get(a.dataId);if(e.packedOutput&&(s.isPacked=!0),e.outPackingScheme===ut.DENSE){var u=gt(e.outputShape);s.texShape=u.map((function(e){return 2*e}))}if(null!=e.outTexUsage&&(s.usage=e.outTexUsage),0===$(a.shape))return s.values=ce(a.dtype,0),a;var c=[],l=t.map((function(t){if("complex64"===t.dtype)throw new Error("GPGPUProgram does not support complex64 input. For complex64 dtypes, please separate the program into real and imaginary parts.");var n=i.texData.get(t.dataId);if(null==n.texture){if(!e.packedInputs&&$(t.shape)<=P().getNumber("WEBGL_SIZE_UPLOAD_UNIFORM"))return{shape:t.shape,texData:null,isUniform:!0,uniformValues:n.values};e.packedInputs&&(n.isPacked=!0,n.shape=t.shape)}else if(!!n.isPacked!=!!e.packedInputs)t=n.isPacked?i.unpackTensor(t):i.packTensor(t),c.push(t),n=i.texData.get(t.dataId);else if(n.isPacked&&!Yt(n.shape,t.shape)){var r=t,o=t.shape;t.shape=n.shape,t=i.packedReshape(t,o),c.push(t),n=i.texData.get(t.dataId),r.shape=o}return i.uploadToGPU(t.dataId),{shape:t.shape,texData:n,isUniform:!1}}));this.uploadToGPU(a.dataId);var f,p={shape:a.shape,texData:s,isUniform:!1},h=function(e,t,n){var r="";t.concat(n).forEach((function(e){var t=null!=e.texData&&null!=e.texData.slice&&e.texData.slice.flatOffset>0,n=e.isUniform?"uniform":e.texData.texShape;r+=e.shape+"_"+n+"_"+t}));var o=e.userCode;return e.constructor.name+"_"+r+"_"+o}(e,l,p),d=this.getAndSaveBinary(h,(function(){return function(e,t,n,r){var o=t.userCode,i=n.map((function(e,n){var r={logicalShape:e.shape,texShape:e.isUniform?null:e.texData.texShape,isUniform:e.isUniform,isPacked:!e.isUniform&&e.texData.isPacked,flatOffset:null};return null!=e.texData&&null!=e.texData.slice&&e.texData.slice.flatOffset>0&&(r.flatOffset=e.texData.slice.flatOffset),{name:t.variableNames[n],shapeInfo:r}})),a=i.map((function(e){return e.shapeInfo})),s={logicalShape:r.shape,texShape:r.texData.texShape,isUniform:!1,isPacked:r.texData.isPacked,flatOffset:null},u=Ko(i,s,o,t.packedInputs),c=e.createProgram(u),l=null,f=e.getUniformLocation(c,"NAN",!1);1===P().getNumber("WEBGL_VERSION")&&(l=e.getUniformLocation(c,"INFINITY",!1));for(var p={},h=0;h<t.variableNames.length;h++){var d=t.variableNames[h];p[d]=e.getUniformLocation(c,d,!1),p["offset"+d]=e.getUniformLocation(c,"offset"+d,!1)}return{program:t,source:u,webGLProgram:c,uniformLocations:p,inShapeInfos:a,outShapeInfo:s,infLoc:l,nanLoc:f}}(i.gpgpu,e,l,p)})),m=null!=this.activeTimers;if(m&&(f=this.startTimer()),function(e,t,n,r,o){va(t.inShapeInfos,n),va([t.outShapeInfo],[r]);var i=r.texData.texture,a=r.texData.texShape;r.texData.isPacked?e.setOutputPackedMatrixTexture(i,a[0],a[1]):e.setOutputMatrixTexture(i,a[0],a[1]),e.setProgram(t.webGLProgram),1===P().getNumber("WEBGL_VERSION")&&null!==t.infLoc&&e.gl.uniform1f(t.infLoc,1/0),null!==t.nanLoc&&e.gl.uniform1f(t.nanLoc,NaN),n.forEach((function(n,r){var o=t.program.variableNames[r],i=t.uniformLocations[o],a=t.uniformLocations["offset"+o];if(null!=i)if(n.isUniform)if($(n.shape)<2)e.gl.uniform1f(i,n.uniformValues[0]);else{var s=n.uniformValues;s instanceof Float32Array||(s=new Float32Array(s)),e.gl.uniform1fv(i,s)}else null!=n.texData.slice&&null!=a&&e.gl.uniform1i(a,n.texData.slice.flatOffset),e.setInputMatrixTexture(n.texData.texture,i,r)})),null!=o&&o(e,t.webGLProgram),e.executeProgram()}(this.gpgpu,d,l,p,r),c.forEach((function(e){return i.disposeData(e.dataId)})),m&&(f=this.endTimer(f),this.activeTimers.push({name:e.constructor.name,query:this.getQueryTime(f)})),!P().getBool("WEBGL_LAZILY_UNPACK")&&s.isPacked&&!1===o){var g=this.unpackTensor(a);return this.disposeData(a.dataId),g}return a},t.prototype.compileAndRun=function(e,t,n,r,o){void 0===o&&(o=!1),n=n||t[0].dtype;var i=this.runWebGLProgram(e,t,n,r,o);return it.makeTensorFromDataId(i.dataId,i.shape,i.dtype)},t.prototype.getAndSaveBinary=function(e,t){return e in this.binaryCache||(this.binaryCache[e]=t()),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(t){e.gpgpu.deleteProgram(e.binaryCache[t].webGLProgram),delete e.binaryCache[t]})),this.textureManager.dispose(),null!=this.canvas&&"undefined"!=typeof HTMLCanvasElement&&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 null==this.floatPrecisionValue&&(this.floatPrecisionValue=pn((function(){if(!P().get("WEBGL_RENDER_FLOAT32_ENABLED")){var t=P().getBool("DEBUG");P().set("DEBUG",!1);var n=e.abs(Nn(1e-8)).dataSync()[0];if(P().set("DEBUG",t),n>0)return 32}return 16}))),this.floatPrecisionValue},t.prototype.epsilon=function(){return 32===this.floatPrecision()?1e-7:1e-4},t.prototype.uploadToGPU=function(e){var t,n=this.texData.get(e),r=n.shape,o=n.dtype,i=n.values,a=n.texture,s=n.usage,u=n.isPacked;if(null==a){var c,l=null!=this.activeTimers;l&&(c=je());var f=n.texShape;if(null==f&&(f=Kt(r,u),n.texShape=f),null!=i){var p=Zt(r),h=void 0,d=f[1],m=f[0],g=i instanceof Uint8Array;u?(d=(t=vt(f[0],f[1]))[0],m=t[1],h=new Gi(p,[m,d],g)):h=new Hi(p,[m,d],g);var v=this.makeTensorInfo([m,d],o);this.texData.get(v.dataId).usage=g?ct.PIXELS:ct.UPLOAD,this.gpgpu.uploadDenseMatrixToTexture(this.getTexture(v.dataId),d,m,i);var y=this.runWebGLProgram(h,[v],o,null,!0),b=this.texData.get(y.dataId);n.texture=b.texture,n.texShape=b.texShape,n.isPacked=b.isPacked,n.usage=b.usage,this.disposeData(v.dataId),this.texData.delete(y.dataId),n.values=null,l&&(this.uploadWaitMs+=je()-c)}else{var w=this.acquireTexture(f,s,o,u);n.texture=w}}},t.prototype.convertAndCacheOnCPU=function(e,t){var n=this.texData.get(e),r=n.dtype;return this.releaseGPUData(e),null!=t&&(n.values=function(e,t){if("float32"===t||"complex64"===t)return e;if("int32"===t||"bool"===t){for(var n="int32"===t?new Int32Array(e.length):new Uint8Array(e.length),r=0;r<n.length;++r)n[r]=Math.round(e[r]);return n}throw new Error("Unknown dtype "+t)}(t,r)),n.values},t.prototype.acquireTexture=function(e,t,n,r){if(this.numBytesInGPU+=this.computeBytes(e,n),!this.warnedAboutMemory&&this.numBytesInGPU>1024*this.numMBBeforeWarning*1024){var o=(this.numBytesInGPU/1024/1024).toFixed(2);this.warnedAboutMemory=!0,console.warn("High memory usage in GPU: "+o+" MB, most likely due to a memory leak")}return this.textureManager.acquireTexture(e,t,r)},t.prototype.computeBytes=function(e,t){return e[0]*e[1]*me(t)},t}(oo);at()&&it.registerBackend("webgl",(function(){return new Rs}),2);var Os=Tn({square_:function(e){var t=vn(e,"x","square"),n=[t];return it.runKernelFunc((function(e,n){return n([t]),e.square(t)}),{x:t},null,"Square",{},n,[])}}),Ds="SquaredDifference",Bs=Tn({squaredDifference_:function(e,t){var n,r=vn(e,"a","squaredDifference"),o=vn(t,"b","squaredDifference");n=$e(r,o),r=n[0],o=n[1],uo(r.shape,o.shape);var i={a:r,b:o},a=[r,o];return it.runKernelFunc((function(e,t){var n=e.squaredDifference(r,o);return t([r,o]),n}),i,(function(e,t){var n=t[0],r=t[1],o=Nn(2);return{a:function(){return e.mul(n.sub(r).mul(o))},b:function(){return e.mul(r.sub(n).mul(o))}}}),Ds,{},a,[])}}),_s=Tn({abs_:function(e){var t=vn(e,"x","abs");return"complex64"===t.dtype?it.runKernelFunc((function(e){return e.complexAbs(t)}),{$x:t}):it.runKernelFunc((function(e,n){var r=e.abs(t);return n([t]),r}),{x:t},(function(e,t){var n=t[0];return{x:function(){return e.mul(n.toFloat().step(-1))}}}),"Abs")}}),Ns=Tn({acos_:function(e){var t=vn(e,"x","acos");return it.runKernelFunc((function(e,n){var r=e.acos(t);return n([t]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){return e.divStrict(Nn(1).sub(n.toFloat().square()).sqrt()).neg()}}}))}}),Ps=Tn({acosh_:function(e){var t=vn(e,"x","acosh");return it.runKernelFunc((function(e,n){var r=e.acosh(t);return n([t]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){return e.divStrict(n.toFloat().square().sub(1).sqrt())}}}))}}),Ms=Tn({asin_:function(e){var t=vn(e,"x","asin");return it.runKernelFunc((function(e,n){var r=e.asin(t);return n([t]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){return e.divStrict(Nn(1).sub(n.toFloat().square()).sqrt())}}}))}}),Fs=Tn({asinh_:function(e){var t=vn(e,"x","asinh");return it.runKernelFunc((function(e,n){var r=e.asinh(t);return n([t]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){return e.divStrict(Nn(1).add(n.toFloat().square()).sqrt())}}}))}}),Ls=Tn({atan_:function(e){var t=vn(e,"x","atan");return it.runKernelFunc((function(e,n){var r=e.atan(t);return n([t]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){return e.div(n.toFloat().square().add(1))}}}))}}),Us=Tn({atanh_:function(e){var t=vn(e,"x","atanh");return it.runKernelFunc((function(e,n){var r=e.atanh(t);return n([t]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){return e.div(Nn(1).sub(n.toFloat().square()))}}}))}}),Ws=Tn({ceil_:function(e){var t=vn(e,"x","ceil");return it.runKernelFunc((function(e){return e.ceil(t)}),{$x:t},(function(e){return{$x:function(){return Vn(e)}}}))}}),zs=Tn({clipByValue_:function(e,t,n){var r=vn(e,"x","clipByValue");Z(t<=n,(function(){return"Error in clip: min ("+t+") must be less than or equal to max ("+n+")."}));var o=[r],i={min:t,max:n};return it.runKernelFunc((function(e,o){var i=e.clip(r,t,n);return o([r]),i}),{x:r},(function(e,r){var o=r[0];return{x:function(){return e.where(o.greaterEqual(t).logicalAnd(o.lessEqual(n)),Vn(e))}}}),"ClipByValue",i,o)}}),qs=Tn({cos_:function(e){var t=vn(e,"x","cos"),n=[t];return it.runKernelFunc((function(e,n){var r=e.cos(t);return n([t]),r}),{x:t},(function(e,t){var n=t[0];return{x:function(){return n.toFloat().sin().neg().mul(e)}}}),"Cos",{},n)}}),Qs=Tn({cosh_:function(e){var t=vn(e,"x","cosh");return it.runKernelFunc((function(e,n){var r=e.cosh(t);return n([t]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){return n.toFloat().sinh().mulStrict(e)}}}))}}),Vs=Tn({erf_:function(e){var t=vn(e,"x","erf");return Z("int32"===t.dtype||"float32"===t.dtype,(function(){return"Input dtype must be `int32` or `float32`."})),"int32"===t.dtype&&(t=t.toFloat()),it.runKernelFunc((function(e,n){var r=e.erf(t);return n([t]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){return e.mul(n.square().neg().exp().mul(2/Math.sqrt(Math.PI)))}}}))}}),Hs=Tn({exp_:function(e){var t=vn(e,"x","exp");return it.runKernelFunc((function(e,n){var r=e.exp(t);return n([r]),r}),{x:t},(function(e,t){return{x:function(){return e.mulStrict(t[0])}}}),"Exp",{},[],[!0])}}),Gs=Tn({expm1_:function(e){var t=vn(e,"x","expm1");return it.runKernelFunc((function(e,n){var r=e.expm1(t);return n([t]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){return e.mul(n.exp())}}}))}}),Xs=Tn({floor_:function(e){var t=vn(e,"x","floor");return it.runKernelFunc((function(e){return e.floor(t)}),{$x:t},(function(e){return{$x:function(){return Vn(e)}}}))}}),Zs=Tn({log_:function(e){var t=vn(e,"x","log"),n=[t];return it.runKernelFunc((function(e,n){var r=e.log(t);return n([t]),r}),{x:t},(function(e,t){var n=t[0];return{x:function(){return e.div(n.toFloat())}}}),"Log",{},n)}}),Ks=Tn({log1p_:function(e){var t=vn(e,"x","log1p");return it.runKernelFunc((function(e,n){var r=e.log1p(t);return n([t]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){return e.div(n.add(1))}}}))}}),Js=Tn({logSigmoid_:function(e){var t=vn(e,"x","logSigmoid");return it.runKernelFunc((function(e,n){var r=e.softplus(t.neg()).neg();return n([t]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){return e.mul(n.neg().sigmoid())}}}))}}),Ys=Tn({neg_:function(e){var t=vn(e,"x","neg"),n=[t];return it.runKernelFunc((function(e){return e.neg(t)}),{x:t},(function(e){return{x:function(){return e.neg()}}}),"Neg",{},n)}}),$s=Tn({reciprocal_:function(e){var t=vn(e,"x","reciprocal");return it.runKernelFunc((function(e,n){var r=e.reciprocal(t);return n([t]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){return e.div(n.square().neg())}}}))}}),eu=Tn({round_:function(e){var t=vn(e,"x","round");return it.runKernelFunc((function(e){return e.round(t)}),{$x:t},(function(e){return{$x:function(){return Vn(e)}}}))}}),tu=Tn({rsqrt_:function(e){var t=vn(e,"x","rsqrt"),n=[t];return it.runKernelFunc((function(e,n){var r=e.rsqrt(t);return n([t]),r}),{x:t},(function(e,t){var n=t[0];return{x:function(){return e.div(n.pow(1.5).mul(2)).neg()}}}),"Rsqrt",{},n)}}),nu=Tn({sigmoid_:function(e){var t=vn(e,"x","sigmoid");return it.runKernelFunc((function(e,n){var r=e.sigmoid(t);return n([r]),r}),{x:t},(function(e,t){var n=t[0];return{x:function(){return e.mul(n.mul(Nn(1).sub(n)))}}}),"Sigmoid")}}),ru=Tn({sign_:function(e){var t=vn(e,"x","sign");return it.runKernelFunc((function(e){return e.sign(t)}),{$x:t},(function(e){return{$x:function(){return Vn(e)}}}))}}),ou=Tn({isNaN_:function(e){var t=vn(e,"x","isNaN");return it.runKernelFunc((function(e){return e.isNaN(t)}),{$x:t},(function(e){return{$x:function(){return Vn(e)}}}))}}),iu=Tn({isInf_:function(e){var t=vn(e,"x","isInf");return it.runKernelFunc((function(e){return e.isInf(t)}),{$x:t},(function(e){return{$x:function(){return Vn(e)}}}))}}),au=Tn({isFinite_:function(e){var t=vn(e,"x","isFinite");return it.runKernelFunc((function(e){return e.isFinite(t)}),{$x:t},(function(e){return{$x:function(){return Vn(e)}}}))}}),su=Tn({sin_:function(e){var t=vn(e,"x","sin"),n=[t];return it.runKernelFunc((function(e,n){var r=e.sin(t);return n([t]),r}),{x:t},(function(e,t){var n=t[0];return{x:function(){return n.toFloat().cos().mul(e)}}}),"Sin",{},n)}}),uu=Tn({sinh_:function(e){var t=vn(e,"x","sinh");return it.runKernelFunc((function(e,n){var r=e.sinh(t);return n([t]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){return n.toFloat().cosh().mulStrict(e)}}}))}}),cu=Tn({softplus_:function(e){var t=vn(e,"x","softplus");return it.runKernelFunc((function(e,n){var r=e.softplus(t);return n([t]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){return e.mul(n.sigmoid())}}}))}}),lu=Tn({sqrt_:function(e){var t=vn(e,"x","sqrt");return it.runKernelFunc((function(e,n){var r=e.sqrt(t);return n([t]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){return e.div(n.toFloat().sqrt().mul(2))}}}))}}),fu=Tn({step_:function(e,t){void 0===t&&(t=0);var n=vn(e,"x","step");return it.runKernelFunc((function(e){return e.step(n,t)}),{$x:n},(function(e){return{$x:function(){return Vn(e)}}}))}}),pu=Tn({tan_:function(e){var t=vn(e,"x","tan");return it.runKernelFunc((function(e,n){var r=e.tan(t);return n([t]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){return e.div(n.cos().square())}}}))}}),hu=Tn({tanh_:function(e){var t=vn(e,"x","tanh");return it.runKernelFunc((function(e,n){var r=e.tanh(t);return n([r]),r}),{x:t},(function(e,t){var n=t[0];return{x:function(){return Nn(1).sub(n.square()).mulStrict(e)}}}),"Tanh",{},null,[!0])}});function du(e,t,n,r,o,i){var a,s,u=vn(e,"x","batchNorm"),c=vn(t,"mean","batchNorm"),l=vn(n,"variance","batchNorm");return null!=o&&(a=vn(o,"scale","batchNorm")),null!=r&&(s=vn(r,"offset","batchNorm")),Z(2===u.rank,(function(){return"Error in batchNorm3D: x must be rank 3 but got rank "+u.rank+"."})),Z(2===c.rank||1===c.rank,(function(){return"Error in batchNorm2D: mean must be rank 2 or rank 1 but got rank "+c.rank+"."})),Z(2===l.rank||1===l.rank,(function(){return"Error in batchNorm2D: variance must be rank 2 or rank 1 but got rank "+l.rank+"."})),null!=a&&Z(2===a.rank||1===a.rank,(function(){return"Error in batchNorm2D: scale must be rank 2 or rank 1 but got rank "+a.rank+"."})),null!=s&&Z(2===s.rank||1===s.rank,(function(){return"Error in batchNorm2D: offset must be rank 2 or rank 1 but got rank "+s.rank+"."})),vu(u,c,l,s,a,i)}function mu(e,t,n,r,o,i){var a,s,u=vn(e,"x","batchNorm"),c=vn(t,"mean","batchNorm"),l=vn(n,"variance","batchNorm");return null!=o&&(a=vn(o,"scale","batchNorm")),null!=r&&(s=vn(r,"offset","batchNorm")),Z(3===u.rank,(function(){return"Error in batchNorm3D: x must be rank 3 but got rank "+u.rank+"."})),Z(3===c.rank||1===c.rank,(function(){return"Error in batchNorm3D: mean must be rank 3 or rank 1 but got rank "+c.rank+"."})),Z(3===l.rank||1===l.rank,(function(){return"Error in batchNorm3D: variance must be rank 3 or rank 1 but got rank "+l.rank+"."})),null!=a&&Z(3===a.rank||1===a.rank,(function(){return"Error in batchNorm3D: scale must be rank 3 or rank 1 but got rank "+a.rank+"."})),null!=s&&Z(3===s.rank||1===s.rank,(function(){return"Error in batchNorm3D: offset must be rank 3 or rank 1 but got rank "+s.rank+"."})),vu(u,c,l,s,a,i)}function gu(e,t,n,r,o,i){var a,s,u=vn(e,"x","batchNorm"),c=vn(t,"mean","batchNorm"),l=vn(n,"variance","batchNorm");return null!=o&&(a=vn(o,"scale","batchNorm")),null!=r&&(s=vn(r,"offset","batchNorm")),Z(4===u.rank,(function(){return"Error in batchNorm4D: x must be rank 4 but got rank "+u.rank+"."})),Z(4===c.rank||1===c.rank,(function(){return"Error in batchNorm4D: mean must be rank 4 or rank 1 but got rank "+c.rank+"."})),Z(4===l.rank||1===l.rank,(function(){return"Error in batchNorm4D: variance must be rank 4 or rank 1 but got rank "+l.rank+"."})),null!=a&&Z(4===a.rank||1===a.rank,(function(){return"Error in batchNorm4D: scale must be rank 4 or rank 1 but got rank "+a.rank+"."})),null!=s&&Z(4===s.rank||1===s.rank,(function(){return"Error in batchNorm4D: offset must be rank 4 or rank 1 but got rank "+s.rank+"."})),vu(u,c,l,s,a,i)}function vu(e,t,n,r,o,i){null==i&&(i=.001);var a,s,u,c=vn(e,"x","batchNorm"),l=vn(t,"mean","batchNorm"),f=vn(n,"variance","batchNorm");null!=o&&(a=vn(o,"scale","batchNorm")),null!=r&&(s=vn(r,"offset","batchNorm")),Z(l.rank===f.rank,(function(){return"Batch normalization gradient requires mean and variance to have equal ranks."})),Z(null==s||l.rank===s.rank,(function(){return"Batch normalization gradient requires mean and offset to have equal ranks."})),Z(null==a||l.rank===a.rank,(function(){return"Batch normalization gradient requires mean and scale to have equal ranks."})),u=0===c.rank||1===c.rank?c.as4D(1,1,1,c.size):2===c.rank?c.as4D(1,1,c.shape[0],c.shape[1]):3===c.rank?c.as4D(1,c.shape[0],c.shape[1],c.shape[2]):c;var p=[c,l,f,a];return it.runKernelFunc((function(e,t){var n=e.batchNormalization(u,yu(l),yu(f),i,yu(a),yu(s));return t([c,l,f,a]),n}),{x:c,mean:l,variance:f,scale:a,offset:s},(function(e,t){var n=t,r=n[0],o=n[1],a=n[2],s=n[3],c=null==s?Nn(1):s,l=so(o.shape,u.shape),f=[];if(1===o.rank){for(var p=0;p<u.shape.length-1;++p)f.push(u.shape[p]);f.push(1)}var h=r.sub(o),d=e.mul(c),m=tu(a.add(Nn(i))),g=m.mul(m).mul(m).mul(Nn(-.5));return{x:function(){return 1===o.rank?e.mul(_r(m.as4D(1,1,1,o.shape[0]),f)).mul(c).reshape(r.shape):e.mul(m).mul(c).reshape(r.shape)},mean:function(){var e=m.mul(Nn(-1)).mul(d);return 1===o.rank&&(e=e.sum(l)),e.reshape(o.shape)},variance:function(){var e=g.mul(h).mul(d);return 1===o.rank&&(e=e.sum(l)),e.reshape(o.shape)},scale:function(){var t=h.mul(m),n=e.mul(t);return 1===o.rank&&(n=n.sum(l)),n.reshape(o.shape)},offset:function(){var t=e;return 1===o.rank&&(t=t.sum(l)),t.reshape(o.shape)}}}),"BatchNormalization",{varianceEpsilon:i},p).reshape(c.shape)}function yu(e){return null==e?null:0===e.rank?e.as1D():1===e.rank?e:2===e.rank?e.as4D(1,1,e.shape[0],e.shape[1]):3===e.rank?e.as4D(1,e.shape[0],e.shape[1],e.shape[2]):e}function bu(){fn("tf.batchNormalization() is going away. Use tf.batchNorm() instead, and note the positional argument change of scale, offset, and varianceEpsilon")}var wu=Tn({batchNormalization2d_:function(e,t,n,r,o,i){return void 0===r&&(r=.001),bu(),du(e,t,n,i,o,r)}}),xu=Tn({batchNormalization3d_:function(e,t,n,r,o,i){return void 0===r&&(r=.001),bu(),mu(e,t,n,i,o,r)}}),Au=Tn({batchNormalization4d_:function(e,t,n,r,o,i){return void 0===r&&(r=.001),bu(),gu(e,t,n,i,o,r)}}),Eu=Tn({batchNormalization_:function(e,t,n,r,o,i){return void 0===r&&(r=.001),bu(),vu(e,t,n,i,o,r)}}),Cu=Tn({batchNorm_:vu}),ku=Tn({batchNorm2d_:du}),Iu=Tn({batchNorm3d_:mu}),Su=Tn({batchNorm4d_:gu}),ju=Tn({logicalAnd_:function(e,t){var n=vn(e,"a","logicalAnd","bool"),r=vn(t,"b","logicalAnd","bool");return uo(n.shape,r.shape),it.runKernelFunc((function(e){return e.logicalAnd(n,r)}),{a:n,b:r},null,"LogicalAnd")}}),Tu=Tn({logicalNot_:function(e){var t=vn(e,"x","logicalNot","bool");return it.runKernelFunc((function(e){return e.logicalNot(t)}),{$x:t})}}),Ru=Tn({logicalOr_:function(e,t){var n=vn(e,"a","logicalOr","bool"),r=vn(t,"b","logicalOr","bool");return uo(n.shape,r.shape),it.runKernelFunc((function(e){return e.logicalOr(n,r)}),{$a:n,$b:r})}}),Ou=Tn({logicalXor_:function(e,t){var n=vn(e,"a","logicalXor","bool"),r=vn(t,"b","logicalXor","bool");return uo(n.shape,r.shape),Ru(e,t).logicalAnd(ju(e,t).logicalNot())}}),Du=Tn({where_:function(e,t,n){var r=vn(t,"a","where"),o=vn(n,"b","where"),i=vn(e,"condition","where","bool");return K(r.shape,o.shape,"Error in where: "),1===i.rank?Z(i.shape[0]===r.shape[0],(function(){return"The first dimension of `a` must match the size of `condition`."})):K(i.shape,o.shape,"Error in where: "),it.runKernelFunc((function(e,t){var n=e.select(i,r,o);return t([i]),n}),{$condition:i,$a:r,$b:o},(function(e,t){var n=t[0];return{$condition:function(){return Vn(n).toFloat()},$a:function(){return e.mul(n.cast(e.dtype))},$b:function(){return e.mul(n.logicalNot().cast(e.dtype))}}}))}}),Bu=function(e){return D(this,void 0,void 0,(function(){var t,n,r;return B(this,(function(o){switch(o.label){case 0:return[4,(t=vn(e,"condition","whereAsync","bool")).data()];case 1:return n=o.sent(),r=Uo(t.shape,n),e!==t&&t.dispose(),[2,r]}}))}))},_u=Tn({add_:function(e,t){var n,r=vn(e,"a","add"),o=vn(t,"b","add");n=$e(r,o),r=n[0],o=n[1];var i=uo(r.shape,o.shape);return it.runKernelFunc((function(e){return e.add(r,o)}),{a:r,b:o},(function(e){return{a:function(){var t=e,n=so(r.shape,i);return n.length>0&&(t=t.sum(n)),t.reshape(r.shape)},b:function(){var t=e,n=so(o.shape,i);return n.length>0&&(t=t.sum(n)),t.reshape(o.shape)}}}),"Add")}}),Nu=Tn({addN_:function(e){Z(Array.isArray(e),(function(){return"The argument passed to tf.addN() must be a list of tensors"})),Z(e.length>=1,(function(){return"Must pass at least one tensor to tf.addN(), but got "+e.length}));var t=e.map((function(e,t){return vn(e,"tensors"+t,"addN")})),n=t[0];t.forEach((function(e){if(e.dtype!==n.dtype)throw new Error("All tensors passed to tf.addN() must have the same dtype")})),t.forEach((function(e){if(!ee(e.shape,n.shape))throw new Error("All tensors passed to tf.addN() must have the same shape")}));var r=t;return it.runKernelFunc((function(e){return e.addN(t)}),r,(function(e){var n={};return t.forEach((function(t,r){n[r]=function(){return e.clone()}})),n}),"AddN")}}),Pu=Tn({addStrict_:function(e,t){var n=vn(e,"a","addStrict"),r=vn(t,"b","addStrict");return K(n.shape,r.shape,"Error in addStrict: "),n.add(r)}}),Mu=Tn({atan2_:function(e,t){var n,r=vn(e,"a","atan2"),o=vn(t,"b","atan2");n=$e(r,o),r=n[0],o=n[1];var i=uo(r.shape,o.shape);return it.runKernelFunc((function(e,t){var n=e.atan2(r,o);return t([r,o]),n}),{$a:r,$b:o},(function(e,t){var n=t[0],r=t[1];return{$a:function(){var t=_u(n.square(),r.square()),o=e.mul(r.div(t)),a=so(n.shape,i);return a.length>0&&(o=o.sum(a)),o.reshape(n.shape)},$b:function(){var t=_u(n.square(),r.square()),o=Ys(e.mul(n.div(t))),a=so(r.shape,i);return a.length>0&&(o=o.sum(a)),o.reshape(r.shape)}}}))}}),Fu=Tn({div_:function(e,t){var n,r=vn(e,"a","div"),o=vn(t,"b","div");if(n=$e(r,o),r=n[0],o=n[1],"int32"===r.dtype&&"int32"===o.dtype)return Wu(r,o);var i=uo(r.shape,o.shape);return it.runKernelFunc((function(e,t){var n=e.realDivide(r,o);return t([r,o]),n}),{a:r,b:o},(function(e,t){var n=t[0],r=t[1];return{a:function(){var t=e.div(r.toFloat()),o=so(n.shape,i);return o.length>0?t.sum(o).reshape(n.shape):t},b:function(){var t=e.mul(n.toFloat()),o=so(r.shape,i);o.length>0&&(t=t.sum(o).reshape(r.shape));var a=r.square();return t.div(a.toFloat()).neg()}}}),"Div")}}),Lu=Tn({divNoNan_:function(e,t){var n,r=vn(e,"a","div"),o=vn(t,"b","div");r=(n=$e(r,o))[0],o=n[1];var i=Fu(r,o),a=Vn(i),s=o.equal(a);return Du(s,a,i)}}),Uu=Tn({divStrict_:function(e,t){var n=vn(e,"a","div"),r=vn(t,"b","div");return K(n.shape,r.shape,"Error in divideStrict: "),n.div(r)}}),Wu=Tn({floorDiv_:function(e,t){var n,r=vn(e,"a","floorDiv"),o=vn(t,"b","floorDiv");n=$e(r,o),r=n[0],o=n[1];var i=uo(r.shape,o.shape);return it.runKernelFunc((function(e,t){var n=e.floorDiv(r,o);return t([r,o]),n}),{a:r,b:o},(function(e,t){var n=t[0],r=t[1];return{a:function(){var t=e.div(r.toFloat()),o=so(n.shape,i);return o.length>0?t.sum(o).reshape(n.shape):t},b:function(){var t=e.mul(n.toFloat()),o=so(r.shape,i);o.length>0&&(t=t.sum(o).reshape(r.shape));var a=r.square();return t.div(a.toFloat()).neg()}}}),"FloorDiv")}}),zu=Tn({maximum_:function(e,t){var n,r=vn(e,"a","maximum"),o=vn(t,"b","maximum");return n=$e(r,o),r=n[0],o=n[1],"bool"===r.dtype&&(r=r.toInt(),o=o.toInt()),uo(r.shape,o.shape),it.runKernelFunc((function(e,t){var n=e.maximum(r,o);return t([r,o]),n}),{a:r,b:o},(function(e,t){var n=t[0],r=t[1];return{a:function(){return e.mul(n.greaterEqual(r).toFloat())},b:function(){return e.mul(n.less(r).toFloat())}}}),"Maximum")}}),qu=Tn({maximumStrict_:function(e,t){var n=vn(e,"a","maximumStrict"),r=vn(t,"b","maximumStrict");return K(n.shape,r.shape,"Error in maximumStrict: "),n.maximum(r)}}),Qu=Tn({minimum_:function(e,t){var n,r=vn(e,"a","minimum"),o=vn(t,"b","minimum");return n=$e(r,o),r=n[0],o=n[1],"bool"===r.dtype&&(r=r.toInt(),o=o.toInt()),uo(r.shape,o.shape),it.runKernelFunc((function(e,t){var n=e.minimum(r,o);return t([r,o]),n}),{a:r,b:o},(function(e,t){var n=t[0],r=t[1];return{a:function(){return e.mul(n.lessEqual(r).toFloat())},b:function(){return e.mul(n.greater(r).toFloat())}}}),"Minimum")}}),Vu=Tn({minimumStrict_:function(e,t){var n=vn(e,"a","minimumStrict"),r=vn(t,"b","minimumStrict");return K(n.shape,r.shape,"Error in minimumStrict: "),n.minimum(r)}}),Hu=Tn({mod_:function(e,t){var n,r=vn(e,"a","mod"),o=vn(t,"b","mod");n=$e(r,o),r=n[0],o=n[1];var i=uo(r.shape,o.shape);return it.runKernelFunc((function(e,t){var n=e.mod(r,o);return t([r,o]),n}),{$a:r,$b:o},(function(e,t){var n=t[0],r=t[1];return{$a:function(){var t=so(n.shape,i);return t.length>0?e.sum(t).reshape(n.shape):e},$b:function(){var t=e.mul(n.div(r).floor().neg()),o=so(r.shape,i);return o.length>0?t.sum(o).reshape(r.shape):t}}}))}}),Gu=Tn({modStrict_:function(e,t){var n=vn(e,"a","modStrict"),r=vn(t,"b","modStrict");return K(n.shape,r.shape,"Error in modStrict: "),n.mod(r)}}),Xu=Tn({mul_:function(e,t){var n,r=vn(e,"a","mul"),o=vn(t,"b","mul");n=$e(r,o),r=n[0],o=n[1];var i=uo(r.shape,o.shape);return it.runKernelFunc((function(e,t){var n=e.multiply(r,o);return t([r,o]),n}),{a:r,b:o},(function(e,t){var n=t[0],r=t[1];return{a:function(){var t=e.mul(r.toFloat()),o=so(n.shape,i);return o.length>0?t.sum(o).reshape(n.shape):t},b:function(){var t=e.mul(n.toFloat()),o=so(r.shape,i);return o.length>0?t.sum(o).reshape(r.shape):t}}}),"Mul")}}),Zu=Tn({mulStrict_:function(e,t){var n=vn(e,"a","mul"),r=vn(t,"b","mul");return K(n.shape,r.shape,"Error in multiplyStrict: "),n.mul(r)}}),Ku=Tn({pow_:function(e,t){var n,r=vn(e,"base","pow"),o=vn(t,"exp","pow");n=$e(r,o),r=n[0],o=n[1];var i=uo(r.shape,o.shape),a=[r,o];return it.runKernelFunc((function(e,t){var n=e.pow(r,o);return t([r,o,n]),n}),{a:r,b:o},(function(e,t){var n=t[0],r=t[1],o=t[2];return{a:function(){var t=r.toFloat(),o=e.mul(t.mul(n.pow(t.sub(Nn(1))))),a=so(n.shape,i);return a.length>0&&(o=o.sum(a)),o.reshape(n.shape)},b:function(){var t=n.greater(0),a=n.log().where(t,Vn(n)),s=e.mul(o.mul(a)),u=so(r.shape,i);return u.length>0&&(s=s.sum(u)),s.reshape(r.shape)}}}),"Pow",{},a,[!0])}}),Ju=Tn({powStrict_:function(e,t){return K(e.shape,t.shape,"Error in powStrict: "),e.pow(t)}}),Yu=Tn({squaredDifferenceStrict_:function(e,t){var n=vn(e,"a","squaredDifferenceStrict"),r=vn(t,"b","squaredDifferenceStrict");return K(n.shape,r.shape,"Error in squaredDifferenceStrict: "),n.squaredDifference(r)}}),$u=Tn({sub_:function(e,t){var n,r=vn(e,"a","sub"),o=vn(t,"b","sub");n=$e(r,o),r=n[0],o=n[1];var i=uo(r.shape,o.shape);return it.runKernelFunc((function(e){return e.subtract(r,o)}),{a:r,b:o},(function(e){return{a:function(){var t=e,n=so(r.shape,i);return n.length>0&&(t=t.sum(n)),t.reshape(r.shape)},b:function(){var t=e,n=so(o.shape,i);return n.length>0&&(t=t.sum(n)),t.neg().reshape(o.shape)}}}),"Sub")}}),ec=Tn({subStrict_:function(e,t){var n=vn(e,"a","subStrict"),r=vn(t,"b","subStrict");return K(n.shape,r.shape,"Error in subStrict: "),n.sub(r)}}),tc=Tn({equal_:function(e,t){var n,r=vn(e,"a","equal"),o=vn(t,"b","equal");return n=$e(r,o),r=n[0],o=n[1],uo(r.shape,o.shape),it.runKernelFunc((function(e){return e.equal(r,o)}),{$a:r,$b:o})}}),nc=Tn({equalStrict_:function(e,t){var n=vn(e,"a","equalStrict"),r=vn(t,"b","equalStrict");return K(n.shape,r.shape,"Error in equalStrict: "),n.equal(r)}}),rc=Tn({greater_:function(e,t){var n,r=vn(e,"a","greater"),o=vn(t,"b","greater");return n=$e(r,o),r=n[0],o=n[1],uo(r.shape,o.shape),it.runKernelFunc((function(e){return e.greater(r,o)}),{a:r,b:o},null,"Greater")}}),oc=Tn({greaterEqual_:function(e,t){var n,r=vn(e,"a","greaterEqual"),o=vn(t,"b","greaterEqual");return n=$e(r,o),r=n[0],o=n[1],uo(r.shape,o.shape),it.runKernelFunc((function(e,t){var n=e.greaterEqual(r,o);return t([r,o]),n}),{a:r,b:o},(function(e,t){var n=t[0],r=t[1];return{a:function(){return Vn(n)},b:function(){return Vn(r)}}}),"GreaterEqual")}}),ic=Tn({greaterEqualStrict_:function(e,t){var n=vn(e,"a","greaterEqualStrict"),r=vn(t,"b","greaterEqualStrict");return K(n.shape,r.shape,"Error in greaterEqualStrict: "),n.greaterEqual(r)}}),ac=Tn({greaterStrict_:function(e,t){var n=vn(e,"a","greaterStrict"),r=vn(t,"b","greaterStrict");return K(n.shape,r.shape,"Error in greaterStrict: "),n.greater(r)}}),sc=Tn({less_:function(e,t){var n,r=vn(e,"a","less"),o=vn(t,"b","less");return n=$e(r,o),r=n[0],o=n[1],uo(r.shape,o.shape),it.runKernelFunc((function(e){return e.less(r,o)}),{a:r,b:o},null,"Less")}}),uc=Tn({lessEqual_:function(e,t){var n,r=vn(e,"a","lessEqual"),o=vn(t,"b","lessEqual");return n=$e(r,o),r=n[0],o=n[1],uo(r.shape,o.shape),it.runKernelFunc((function(e,t){var n=e.lessEqual(r,o);return t([r,o]),n}),{a:r,b:o},null,"LessEqual")}}),cc=Tn({lessEqualStrict_:function(e,t){var n=vn(e,"a","lessEqualStrict"),r=vn(t,"b","lessEqualStrict");return K(n.shape,r.shape,"Error in lessEqualStrict: "),n.lessEqual(r)}}),lc=Tn({lessStrict_:function(e,t){var n=vn(e,"a","lessStrict"),r=vn(t,"b","lessStrict");return K(n.shape,r.shape,"Error in lessStrict: "),n.less(r)}}),fc=Tn({notEqual_:function(e,t){var n,r=vn(e,"a","notEqual"),o=vn(t,"b","notEqual");return n=$e(r,o),r=n[0],o=n[1],uo(r.shape,o.shape),it.runKernelFunc((function(e){return e.notEqual(r,o)}),{a:r,b:o},null,"NotEqual")}}),pc=Tn({notEqualStrict_:function(e,t){var n=vn(e,"a","notEqualStrict"),r=vn(t,"b","notEqualStrict");return K(n.shape,r.shape,"Error in notEqualStrict: "),n.notEqual(r)}});function hc(e,t){for(var n=[],r=e;r<t;++r)n.push(r);return n}function dc(e){for(var t=[],n=0;n<e.length;++n)for(var r=0;r<e[n].length;++r)t.push(e[n][r]);return t}var mc=Tn({gather_:function(e,t,n){void 0===n&&(n=0);var r=vn(e,"x","gather"),o=vn(t,"indices","gather","int32");n=se(n,r.shape)[0];var i=function(e,t,n){for(var r=e.shape[n],o=[],i=1,a=1,s=0;s<n;s++)o.push(e.shape[s]),i*=e.shape[s];for(s=0;s<t.rank;s++)o.push(t.shape[s]);for(s=n+1;s<e.rank;s++)o.push(e.shape[s]),a*=e.shape[s];return{batchSize:i,sliceSize:a,dimSize:r,outputShape:o}}(r,o,n);return it.runKernelFunc((function(e,t){var i=e.gather(r,o.flatten(),n);return t([o]),i}),{x:r,indices:o},(function(e,t){var o=t[0];return{x:function(){var t=r.shape,i=o.size,a=t.slice(0,n),s=a.length,u=t.slice(n,t.length).slice(1),c=u.length,l=hc(0,s),f=hc(s+1,s+1+c),p=dc([a,[i],u]),h=e.reshape(p),d=o.reshape([i]),m=dc([[s],l,f]),g=h.transpose(m),v=gc(g,d,r.shape[n]),y=kn(m);return v.transpose(y)},indices:function(){return o}}}),"Gather",{axis:n}).reshape(i.outputShape)}}),gc=Tn({unsortedSegmentSum_:function(e,t,n){var r=vn(e,"x","unsortedSegmentSum"),o=vn(t,"segmentIds","unsortedSegmentSum","int32");return Z(te(n),(function(){return"numSegments must be of dtype int"})),it.runKernelFunc((function(e,t){var i=e.unsortedSegmentSum(r,o,n);return t([o]),i}),{$x:r},(function(e,t){var n=t[0];return{$x:function(){return function(e,t){for(var n=zu(t,Vn(t)),r=mc(e,n),o=oc(t,Nn(0,"int32")),i=r.rank-o.rank,a=0;a<i;++a)o=vr(o,a+1);o=ju(o,Un(r.shape,"bool"));var s=Vn(r);return Du(o,r,s)}(e,n)}}}))}});function vc(e,t,n,r,o,i,a){void 0===i&&(i="NHWC"),Z(e.length===t.rank,(function(){return"Length of inShape ("+e.length+") and rank of dy ("+t.rank+") must match"}));var s=e,u=t,c=!1;3===t.rank&&(c=!0,u=t.as4D(1,t.shape[0],t.shape[1],t.shape[2]),s=[1,e[0],e[1],e[2]]),Z(4===s.length,(function(){return"Error in conv2dDerInput: inShape must be length 4, but got length "+s.length+"."})),Z(4===u.rank,(function(){return"Error in conv2dDerInput: dy must be rank 4, but got rank "+u.rank})),Z(4===n.rank,(function(){return"Error in conv2dDerInput: filter must be rank 4, but got rank "+n.rank}));var l="NHWC"===i?s[3]:s[1],f="NHWC"===i?u.shape[3]:u.shape[1];Z(l===n.shape[2],(function(){return"Error in conv2dDerInput: depth of input ("+l+") must match input depth for filter "+n.shape[2]+"."})),Z(f===n.shape[3],(function(){return"Error in conv2dDerInput: depth of output ("+f+") must match output depth for filter "+n.shape[3]+"."})),null!=a&&Z(te(o),(function(){return"Error in conv2dDerInput: pad must be an integer when using, dimRoundingMode "+a+" but got pad "+o+"."}));var p=xo(i),h=fo(s,n.shape,r,1,o,a,!1,p),d=it.runKernelFunc((function(e,t){var r=e.conv2dDerInput(u,n,h);return t([n,u]),r}),{dy4D:u,filter:n},(function(e,t){var n=t[0],s=t[1];return{dy4D:function(){return xc(e,n,r,o,i,1,a)},filter:function(){return Ec(e,s,n.shape,r,o,i,a)}}}));return c?d.as3D(d.shape[1],d.shape[2],d.shape[3]):d}function yc(e){var t=function(e){return"number"==typeof e?[e,e,e]:2===e.length?[e[0],e[1],1]:e}(e),n=t[0],r=t[1],o=t[2];return 1===n&&1===r&&1===o}function bc(e,t,n,r,o){Z(e.length===t.rank,(function(){return"Length of inShape ("+e.length+") and rank of dy ("+t.rank+") must match"}));var i=e,a=t,s=!1;4===t.rank&&(s=!0,a=t.as5D(1,t.shape[0],t.shape[1],t.shape[2],t.shape[3]),i=[1,e[0],e[1],e[2],e[3]]);var u=i[4],c=a.shape[4];Z(5===i.length,(function(){return"Error in conv3dDerInput: inShape must be length 5, but got length "+i.length+"."})),Z(5===a.rank,(function(){return"Error in conv3dDerInput: dy must be rank 5, but got rank "+a.rank})),Z(5===n.rank,(function(){return"Error in conv3dDerInput: filter must be rank 5, but got rank "+n.rank})),Z(u===n.shape[3],(function(){return"Error in conv3dDerInput: depth of input ("+u+") must match input depth for filter "+n.shape[3]+"."})),Z(c===n.shape[4],(function(){return"Error in conv3dDerInput: depth of output ("+c+") must match output depth for filter "+n.shape[4]+"."}));var l=po(i,n.shape,r,1,o),f=it.runKernelFunc((function(e){return e.conv3dDerInput(a,n,l)}),{dy5D:a});return s?f.as4D(f.shape[1],f.shape[2],f.shape[3],f.shape[4]):f}var wc=Tn({conv1d_:function(e,t,n,r,o,i,a){void 0===o&&(o="NWC"),void 0===i&&(i=1);var s=vn(e,"x","conv1d"),u=vn(t,"filter","conv1d"),c=s,l=!1;2===s.rank&&(l=!0,c=s.as3D(1,s.shape[0],s.shape[1])),Z(3===c.rank,(function(){return"Error in conv1d: input must be rank 3, but got rank "+c.rank+"."})),Z(3===u.rank,(function(){return"Error in conv1d: filter must be rank 3, but got rank "+u.rank+"."})),null!=a&&Z(te(r),(function(){return"Error in conv1d: pad must be an integer when using, dimRoundingMode "+a+" but got pad "+r+"."})),Z(c.shape[2]===u.shape[1],(function(){return"Error in conv1d: depth of input ("+c.shape[2]+") must match input depth for filter "+u.shape[1]+"."})),Z(wo(n,i),(function(){return"Error in conv1D: Either stride or dilation must be 1. Got stride "+n+" and dilation '"+i+"'"})),Z("NWC"===o,(function(){return"Error in conv1d: got dataFormat of "+o+" but only NWC is currently supported."}));var f=u.as4D(1,u.shape[0],u.shape[1],u.shape[2]),p=c.as4D(c.shape[0],1,c.shape[1],c.shape[2]),h=xc(p,f,[1,n],r,"NHWC",[1,i],a);return l?h.as2D(h.shape[2],h.shape[3]):h.as3D(h.shape[0],h.shape[2],h.shape[3])}}),xc=Tn({conv2d_:function(e,t,n,r,o,i,a){void 0===o&&(o="NHWC"),void 0===i&&(i=[1,1]);var s=vn(e,"x","conv2d"),u=vn(t,"filter","conv2d"),c=s,l=!1;3===s.rank&&(l=!0,c=s.as4D(1,s.shape[0],s.shape[1],s.shape[2])),Z(4===c.rank,(function(){return"Error in conv2d: input must be rank 4, but got rank "+c.rank+"."})),Z(4===u.rank,(function(){return"Error in conv2d: filter must be rank 4, but got rank "+u.rank+"."})),null!=a&&Z(te(r),(function(){return"Error in conv2d: pad must be an integer when using, dimRoundingMode "+a+" but got pad "+r+"."}));var f="NHWC"===o?c.shape[3]:c.shape[1];Z(f===u.shape[2],(function(){return"Error in conv2d: depth of input ("+f+") must match input depth for filter "+u.shape[2]+"."})),Z(wo(n,i),(function(){return"Error in conv2D: Either strides or dilations must be 1. Got strides "+n+" and dilations '"+i+"'"}));var p=xo(o),h=fo(c.shape,u.shape,n,i,r,a,!1,p),d=[u,c],m=it.runKernelFunc((function(e,t){var n=e.conv2d(c,u,h);return t([u,c]),n}),{x:c,filter:u},(function(e,t){var a=t,s=a[0],u=a[1];return Z(bo(i),(function(){return"Error in gradient of conv2D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '"+i+"'"})),{x:function(){return Cc(u.shape,e,s,n,r,o)},filter:function(){return Ec(u,e,s.shape,n,r,o)}}}),"Conv2D",h,d);return l?m.as3D(m.shape[1],m.shape[2],m.shape[3]):m}}),Ac=Tn({conv3d_:function(e,t,n,r,o,i){void 0===o&&(o="NDHWC"),void 0===i&&(i=[1,1,1]);var a=vn(e,"x","conv3d"),s=vn(t,"filter","conv3d"),u=a,c=!1;4===a.rank&&(c=!0,u=a.as5D(1,a.shape[0],a.shape[1],a.shape[2],a.shape[3])),Z(5===u.rank,(function(){return"Error in conv3d: input must be rank 5, but got rank "+u.rank+"."})),Z(5===s.rank,(function(){return"Error in conv3d: filter must be rank 5, but got rank "+s.rank+"."})),Z(u.shape[4]===s.shape[3],(function(){return"Error in conv3d: depth of input ("+u.shape[4]+") must match input depth for filter "+s.shape[3]+"."})),Z(function(e,t){return yc(e)||yc(t)}(n,i),(function(){return"Error in conv3D: Either strides or dilations must be 1. Got strides "+n+" and dilations '"+i+"'"})),Z("NDHWC"===o,(function(){return"Error in conv3d: got dataFormat of "+o+" but only NDHWC is currently supported."}));var l=po(u.shape,s.shape,n,i,r),f=it.runKernelFunc((function(e,t){var n=e.conv3d(u,s,l);return t([u,s]),n}),{x:u,$filter:s},(function(e,t){Z(yc(i),(function(){return"Error in gradient of conv3D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '"+i+"'"}));var o=t[0],a=t[1];return{x:function(){return bc(o.shape,e,a,n,r)},$filter:function(){return function(e,t,n,r,o){var i=e;4===e.rank&&(i=e.as5D(1,e.shape[0],e.shape[1],e.shape[2],e.shape[3]));var a=t;4===a.rank&&(a=t.as5D(1,t.shape[0],t.shape[1],t.shape[2],t.shape[3])),Z(5===i.rank,(function(){return"Error in conv3dDerFilter: input must be rank 5, but got shape "+i.shape+"."})),Z(5===a.rank,(function(){return"Error in conv3dDerFilter: dy must be rank 5, but got shape "+a.shape+"."})),Z(5===n.length,(function(){return"Error in conv3dDerFilter: filterShape must be length 5, but got "+n+"."})),Z(i.shape[4]===n[3],(function(){return"Error in conv3dDerFilter: depth of input "+i.shape[4]+") must match input depth in filter ("+n[3]+"."})),Z(a.shape[4]===n[4],(function(){return"Error in conv3dDerFilter: depth of dy ("+a.shape[4]+") must match output depth for filter ("+n[4]+")."}));var s=po(i.shape,n,r,1,o);return it.runKernelFunc((function(e){return e.conv3dDerFilter(i,a,s)}),{x5D:i,dy5D:a})}(o,e,a.shape,n,r)}}}));return c?f.as4D(f.shape[1],f.shape[2],f.shape[3],f.shape[4]):f}}),Ec=Tn({conv2dDerFilter_:function(e,t,n,r,o,i,a){void 0===i&&(i="NHWC");var s=e;3===e.rank&&(s=e.as4D(1,e.shape[0],e.shape[1],e.shape[2]));var u=t;3===u.rank&&(u=t.as4D(1,t.shape[0],t.shape[1],t.shape[2])),Z(4===s.rank,(function(){return"Error in conv2dDerFilter: input must be rank 4, but got shape "+s.shape+"."})),Z(4===u.rank,(function(){return"Error in conv2dDerFilter: dy must be rank 4, but got shape "+u.shape+"."})),Z(4===n.length,(function(){return"Error in conv2dDerFilter: filterShape must be length 4, but got "+n+"."}));var c="NHWC"===i?s.shape[3]:s.shape[1],l="NHWC"===i?u.shape[3]:u.shape[1];Z(c===n[2],(function(){return"Error in conv2dDerFilter: depth of input "+c+") must match input depth in filter ("+n[2]+"."})),Z(l===n[3],(function(){return"Error in conv2dDerFilter: depth of dy ("+l+") must match output depth for filter ("+n[3]+")."})),null!=a&&Z(te(o),(function(){return"Error in conv2dDerFilter: pad must be an integer when using, dimRoundingMode "+a+" but got pad "+o+"."}));var f=xo(i),p=fo(s.shape,n,r,1,o,a,!1,f);return it.runKernelFunc((function(e){return e.conv2dDerFilter(s,u,p)}),{x4D:s,dy4D:u})}}),Cc=Tn({conv2dDerInput_:vc}),kc=Tn({depthwiseConv2d_:function(e,t,n,r,o,i,a){void 0===o&&(o="NHWC"),void 0===i&&(i=[1,1]);var s=vn(e,"x","depthwiseConv2d"),u=vn(t,"filter","depthwiseConv2d"),c=s,l=!1;3===s.rank&&(l=!0,c=s.as4D(1,s.shape[0],s.shape[1],s.shape[2])),Z(4===c.rank,(function(){return"Error in depthwiseConv2d: input must be rank 4, but got rank "+c.rank+"."})),Z(4===u.rank,(function(){return"Error in depthwiseConv2d: filter must be rank 4, but got rank "+u.rank+"."})),Z(c.shape[3]===u.shape[2],(function(){return"Error in depthwiseConv2d: number of input channels ("+c.shape[3]+") must match the inChannels dimension in filter "+u.shape[2]+"."})),null==i&&(i=[1,1]),Z(wo(n,i),(function(){return"Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides "+n+" and dilations '"+i+"'"})),null!=a&&Z(te(r),(function(){return"Error in depthwiseConv2d: pad must be an integer when using, dimRoundingMode "+a+" but got pad "+r+"."}));var f=fo(c.shape,u.shape,n,i,r,a,!0),p=[c,u],h=it.runKernelFunc((function(e,t){var n=e.depthwiseConv2D(c,u,f);return t([c,u]),n}),{x:c,filter:u},(function(e,t){Z(bo(i),(function(){return"Error in gradient of depthwiseConv2d: dilation rates greater than 1 are not yet supported. Got dilations '"+i+"'"}));var n=t[0],r=t[1];return{x:function(){return Ic(n.shape,e,r,f)},filter:function(){return Sc(n,e,r.shape,f)}}}),"DepthwiseConv2dNative",f,p);return l?h.as3D(h.shape[1],h.shape[2],h.shape[3]):h}}),Ic=Tn({depthwiseConv2dDerInput_:function(e,t,n,r){var o=t,i=!1;3===t.rank&&(i=!0,o=t.as4D(1,t.shape[0],t.shape[1],t.shape[2]));var a=it.runKernelFunc((function(e){return e.depthwiseConv2DDerInput(o,n,r)}),{dy4D:o});return i?a.as3D(a.shape[1],a.shape[2],a.shape[3]):a}}),Sc=Tn({depthwiseConv2dDerFilter_:function(e,t,n,r){var o=e;3===e.rank&&(o=e.as4D(1,e.shape[0],e.shape[1],e.shape[2]));var i=t;return 3===i.rank&&(i=t.as4D(1,t.shape[0],t.shape[1],t.shape[2])),it.runKernelFunc((function(e){return e.depthwiseConv2DDerFilter(o,i,r)}),{x4D:o,dy4D:i})}}),jc=Tn({separableConv2d_:function(e,t,n,r,o,i,a){void 0===i&&(i=[1,1]),void 0===a&&(a="NHWC");var s=vn(e,"x","separableConv2d"),u=vn(t,"depthwiseFilter","separableConv2d"),c=vn(n,"pointwiseFilter","separableConv2d"),l=s,f=!1;if(3===s.rank&&(f=!0,l=s.as4D(1,s.shape[0],s.shape[1],s.shape[2])),"NCHW"===a)throw new Error("separableConv2d currently does not support dataFormat NCHW; only NHWC is supported");Z(4===l.rank,(function(){return"Error in separableConv2d: input must be rank 4, but got rank "+l.rank+"."})),Z(4===u.rank,(function(){return"Error in separableConv2d: depthwise filter must be rank 4, but got rank "+u.rank+"."})),Z(4===c.rank,(function(){return"Error in separableConv2d: pointwise filter must be rank 4, but got rank "+u.rank+"."})),Z(1===c.shape[0],(function(){return"Error in separableConv2d: the first dimension of pointwise filter must be 1, but got "+c.shape[0]+"."})),Z(1===c.shape[1],(function(){return"Error in separableConv2d: the second dimension of pointwise filter must be 1, but got "+c.shape[1]+"."}));var p=u.shape[2],h=u.shape[3];Z(c.shape[2]===p*h,(function(){return"Error in separableConv2d: the third dimension of pointwise filter must be "+p*h+", but got "+c.shape[2]+"."}));var d=kc(l,u,r,o,a,i),m=xc(d,c,1,"valid",a);return f?m.as3D(m.shape[1],m.shape[2],m.shape[3]):m}}),Tc=Tn({conv2dTranspose_:function(e,t,n,r,o,i){return vc(n,vn(e,"x","conv2dTranspose"),vn(t,"filter","conv2dTranspose"),r,o,"NHWC",i)}}),Rc=Tn({conv3dTranspose_:function(e,t,n,r,o){return bc(n,vn(e,"x","conv3dTranspose"),vn(t,"filter","conv3dTranspose"),r,o)}}),Oc=Tn({matMul_:function(e,t,n,r){var o;void 0===n&&(n=!1),void 0===r&&(r=!1);var i=vn(e,"a","matMul"),a=vn(t,"b","matMul");o=$e(i,a),i=o[0],a=o[1];var s=n?i.shape[i.rank-2]:i.shape[i.rank-1],u=r?a.shape[a.rank-1]:a.shape[a.rank-2],c=n?i.shape[i.rank-1]:i.shape[i.rank-2],l=r?a.shape[a.rank-2]:a.shape[a.rank-1],f=i.shape.slice(0,-2),p=a.shape.slice(0,-2),h=$(f),d=$(p);Z(i.rank>=2&&a.rank>=2&&i.rank===a.rank,(function(){return"Error in matMul: inputs must have the same rank of at least 2, got ranks "+i.rank+" and "+a.rank+"."})),Z(ee(f,p),(function(){return"Error in matMul: outer dimensions ("+f+") and ("+p+") of Tensors with shapes "+i.shape+" and "+a.shape+" must match."})),Z(s===u,(function(){return"Error in matMul: inner shapes ("+s+") and ("+u+") of Tensors with shapes "+i.shape+" and "+a.shape+" and transposeA="+n+" and transposeB="+r+" must match."}));var m=i.shape.slice(0,-2).concat([c,l]),g=n?i.as3D(h,s,c):i.as3D(h,c,s),v=r?a.as3D(d,l,u):a.as3D(d,u,l),y={transposeA:n,transposeB:r};return it.runKernelFunc((function(e,t){var o=e.batchMatMul(g,v,n,r);return t([g,v]),o}),{a:g,b:v},(function(e,t){var o=t,i=o[0],a=o[1];return n||r?!n&&r?{a:function(){return e.matMul(a,!1,!1)},b:function(){return e.matMul(i,!0,!1)}}:n&&!r?{a:function(){return a.matMul(e,!1,!0)},b:function(){return i.matMul(e,!1,!1)}}:{a:function(){return a.matMul(e,!0,!0)},b:function(){return e.matMul(i,!0,!0)}}:{a:function(){return e.matMul(a,!1,!0)},b:function(){return i.matMul(e,!0,!1)}}}),"BatchMatMul",y).reshape(m)}}),Dc=Tn({dot_:function(e,t){var n=vn(e,"t1","dot"),r=vn(t,"t2","dot");Z(!(1!==n.rank&&2!==n.rank||1!==r.rank&&2!==r.rank),(function(){return"Error in dot: inputs must all be rank 1 or 2, but got ranks "+n.rank+" and "+r.rank+"."}));var o=1===n.rank?n.size:n.shape[1],i=1===r.rank?r.size:r.shape[0];return Z(o===i,(function(){return"Error in dot: inner dimensions of inputs must match, but got "+o+" and "+i+"."})),1===n.rank&&1===r.rank?n.as2D(1,-1).matMul(r.as2D(-1,1)).asScalar():1===n.rank&&2===r.rank?n.as2D(1,-1).matMul(r.as2D(r.shape[0],r.shape[1])).as1D():2===n.rank&&1===r.rank?n.matMul(r.as2D(-1,1)).as1D():n.matMul(r.as2D(r.shape[0],r.shape[1]))}}),Bc=Tn({outerProduct_:function(e,t){var n=vn(e,"v1","outerProduct"),r=vn(t,"v2","outerProduct");return Z(1===n.rank&&1===r.rank,(function(){return"Error in outerProduct: inputs must be rank 1, but got ranks "+n.rank+" and "+r.rank+"."})),n.as2D(-1,1).matMul(r.as2D(1,-1))}}),_c=Tn({reverse_:function(e,t){var n=vn(e,"x","reverse");if(0===n.rank)return n.clone();var r=se(t,n.shape);return it.runKernelFunc((function(e){return e.reverse(n,r)}),{$x:n},(function(e){return{$x:function(){return e.reverse(r)}}})).reshapeAs(n)}}),Nc=Tn({reverse1d_:function(e){var t=vn(e,"x","reverse");return Z(1===t.rank,(function(){return"Error in reverse1D: x must be rank 1 but got rank "+t.rank+"."})),_c(t,0)}}),Pc=Tn({reverse2d_:function(e,t){var n=vn(e,"x","reverse");return Z(2===n.rank,(function(){return"Error in reverse2D: x must be rank 2 but got rank "+n.rank+"."})),_c(n,t)}}),Mc=Tn({reverse3d_:function(e,t){var n=vn(e,"x","reverse");return Z(3===n.rank,(function(){return"Error in reverse3D: x must be rank 3 but got rank "+n.rank+"."})),_c(n,t)}}),Fc=Tn({reverse4d_:function(e,t){var n=vn(e,"x","reverse");return Z(4===n.rank,(function(){return"Error in reverse4D: x must be rank 4 but got rank "+n.rank+"."})),_c(n,t)}});function Lc(e,t,n,r,o,i){var a=vn(e,"x","maxPool"),s=a,u=!1;3===a.rank&&(u=!0,s=a.as4D(1,a.shape[0],a.shape[1],a.shape[2])),null==r&&(r=[1,1]),Z(4===s.rank,(function(){return"Error in maxPool: input must be rank 4 but got rank "+s.rank+"."})),Z(wo(n,r),(function(){return"Error in maxPool: Either strides or dilations must be 1. Got strides "+n+" and dilations '"+r+"'"})),null!=i&&Z(te(o),(function(){return"Error in maxPool: pad must be an integer when using, dimRoundingMode "+i+" but got pad "+o+"."}));var c=co(s.shape,t,n,r,o,i);if(1===c.filterWidth&&1===c.filterHeight&&ee(c.inShape,c.outShape))return a.clone();var l=[s],f=it.runKernelFunc((function(e,t){var n=e.maxPool(s,c);return t([s,n]),n}),{x:s},(function(e,i){var a=i[0],s=i[1];return{x:function(){return function(e,t,n,r,o,i,a,s){var u=vn(e,"dy","maxPoolBackprop"),c=vn(t,"input","maxPoolBackprop"),l=vn(n,"output","maxPoolBackprop");Z(c.rank===u.rank,(function(){return"Rank of input ("+c.rank+") does not match rank of dy ("+u.rank+")"})),null==i&&(i=[1,1]),Z(wo(o,i),(function(){return"Error in maxPoolBackProp: Either strides or dilations must be 1. Got strides "+o+" and dilations '"+i+"'"})),Z(4===u.rank,(function(){return"Error in maxPoolBackprop: dy must be rank 4 but got rank "+u.rank+"."})),Z(4===c.rank,(function(){return"Error in maxPoolBackprop: input must be rank 4 but got rank "+c.rank+"."}));var f=co(c.shape,r,o,i,a,s);return it.runKernelFunc((function(e){return e.maxPoolBackprop(u,c,l,f)}),{$dy:u,$input:c})}(e,a,s,t,n,r,o)}}}),"MaxPool",c,l);return u?f.as3D(f.shape[1],f.shape[2],f.shape[3]):f}function Uc(e,t,n,r,o,i){var a=vn(e,"x","avgPool","float32");null==r&&(r=[1,1]),Z(wo(n,r),(function(){return"Error in avgPool: Either strides or dilations must be 1. Got strides "+n+" and dilations '"+r+"'"}));var s=a,u=!1;3===a.rank&&(u=!0,s=a.as4D(1,a.shape[0],a.shape[1],a.shape[2])),Z(4===s.rank,(function(){return"Error in avgPool: x must be rank 4 but got rank "+s.rank+"."})),null!=i&&Z(te(o),(function(){return"Error in avgPool: pad must be an integer when using, dimRoundingMode "+i+" but got pad "+o+"."}));var c=co(s.shape,t,n,r,o,i);if(1===c.filterWidth&&1===c.filterHeight&&ee(c.inShape,c.outShape))return a.clone();var l=it.runKernelFunc((function(e){return e.avgPool(s,c)}),{x:s},(function(e){return{x:function(){return function(e,t,n,r,o,i){var a=vn(e,"dy","avgPoolBackprop"),s=vn(t,"input","avgPoolBackprop");Z(s.rank===a.rank,(function(){return"Rank of input ("+s.rank+") does not match rank of dy ("+a.rank+")"})),null==o&&(o=[1,1]),Z(wo(r,o),(function(){return"Error in avgPoolBackprop: Either strides or dilations must be 1. Got strides "+r+" and dilations '"+o+"'"}));var u=s,c=a,l=!1;3===s.rank&&(l=!0,u=s.as4D(1,s.shape[0],s.shape[1],s.shape[2]),c=a.as4D(1,a.shape[0],a.shape[1],a.shape[2])),Z(4===c.rank,(function(){return"Error in avgPoolBackprop: dy must be rank 4 but got rank "+c.rank+"."})),Z(4===u.rank,(function(){return"Error in avgPoolBackprop: input must be rank 4 but got rank "+u.rank+"."}));var f=co(u.shape,n,r,o,i),p=it.runKernelFunc((function(e){return e.avgPoolBackprop(c,u,f)}),{dy4D:c,input4D:u});return l?p.as3D(p.shape[1],p.shape[2],p.shape[3]):p}(e,s,t,n,r,o)}}}),"AvgPool",c);return l=l.cast(a.dtype),u?l.as3D(l.shape[1],l.shape[2],l.shape[3]):l}var Wc=Tn({maxPool_:function(e,t,n,r,o){return Lc(e,t,n,1,r,o)}}),zc=Tn({avgPool_:function(e,t,n,r,o){return Uc(e,t,n,1,r,o)}}),qc=Tn({pool_:function(e,t,n,r,o,i){null==o&&(o=[1,1]),null==i&&(i=1),0===r&&(r="valid");var a=vn(e,"x","maxPool"),s=a,u=!1;3===a.rank&&(u=!0,s=a.as4D(1,a.shape[0],a.shape[1],a.shape[2])),Z(wo(i,o),(function(){return"Error in pool: Either strides or dilations must be 1. Got strides "+i+" and dilations '"+o+"'"}));var c,l=co(s.shape,t,i,o,r),f=[l.dilationHeight,l.dilationWidth];c="same"===r?function(e,t){var n=e.map((function(e,n){return e+(e-1)*(t[n]-1)})).map((function(e){return e-1})),r=n.map((function(e){return Math.floor(e/2)})),o=n.map((function(e,t){return e-r[t]}));return n.map((function(e,t){return[r[t],o[t]]}))}([l.filterHeight,l.filterWidth],f):[[0,0],[0,0]];var p=1===f[0]&&1===f[1],h=function(e,t,n){var r=n.map((function(e){return e[0]})),o=n.map((function(e){return e[1]})),i=e.concat(r,o),a=t.map((function(e,t){return(e-i[t]%e)%e})),s=o.map((function(e,t){return e+a[t]}));return[t.map((function(e,t){return[r[t],s[t]]})),t.map((function(e,t){return[0,a[t]]}))]}([l.inHeight,l.inWidth],f,c),d=h[0],m=h[1],g=p?r:"valid",v=p?s:Or(s,f,d),y=("avg"===n?function(){return Uc(v,t,i,1,g)}:function(){return Lc(v,t,i,1,g)})(),b=p?y:fr(y,f,m);return u?b.as3D(b.shape[1],b.shape[2],b.shape[3]):b}}),Qc=Tn({maxPool3d_:function(e,t,n,r,o,i,a){void 0===i&&(i="NDHWC");var s=vn(e,"x","maxPool3d"),u=s,c=!1;4===s.rank&&(c=!0,u=s.as5D(1,s.shape[0],s.shape[1],s.shape[2],s.shape[3])),null==a&&(a=[1,1,1]),Z(5===u.rank,(function(){return"Error in maxPool3d: x must be rank 5 but got rank "+u.rank+"."})),Z("NDHWC"===i,(function(){return"Error in maxPool3d: Only NDHWC is currently supported, but got dataFormat of "+i})),Z(wo(n,a),(function(){return"Error in maxPool3d: Either strides or dilations must be 1. Got strides "+n+" and dilations '"+a+"'"})),null!=o&&Z(te(r),(function(){return"Error in maxPool3d: pad must be an integer when using, dimRoundingMode "+o+" but got pad "+r+"."}));var l=lo(u.shape,t,n,a,r,o,i),f=it.runKernelFunc((function(e,t){var n=e.maxPool3d(u,l);return t([u,n]),n}),{x:u},(function(e,i){var s=i[0],u=i[1];return{x:function(){return function(e,t,n,r,o,i,a,s){var u=vn(e,"dy","maxPool3dBackprop"),c=vn(t,"input","maxPool3dBackprop"),l=vn(n,"output","maxPool3dBackprop"),f=u,p=c,h=l,d=!1;4===c.rank&&(d=!0,f=u.as5D(1,u.shape[0],u.shape[1],u.shape[2],u.shape[3]),p=c.as5D(1,c.shape[0],c.shape[1],c.shape[2],c.shape[3]),h=l.as5D(1,l.shape[0],l.shape[1],l.shape[2],l.shape[3])),Z(5===f.rank,(function(){return"Error in maxPool3dBackprop: dy must be rank 5 but got rank "+f.rank+"."})),Z(5===p.rank,(function(){return"Error in maxPool3dBackprop: input must be rank 5 but got rank "+p.rank+"."})),Z(5===h.rank,(function(){return"Error in maxPool3dBackprop: output must be rank 5 but got rank "+h.rank+"."})),null==i&&(i=[1,1,1]),Z(wo(o,i),(function(){return"Error in maxPool3dBackprop: Either strides or dilations must be 1. Got strides "+o+" and dilations '"+i+"'"})),null!=s&&Z(te(a),(function(){return"Error in maxPool3dBackprop: pad must be an integer when using, dimRoundingMode "+s+" but got pad "+a+"."}));var m=lo(p.shape,r,o,i,a,s),g=it.runKernelFunc((function(e){return e.maxPool3dBackprop(f,p,h,m)}),{dy5D:f,input5D:p});return d?g.as4D(g.shape[1],g.shape[2],g.shape[3],g.shape[4]):g}(e,s,u,t,n,a,r,o)}}}));return c?f.as4D(f.shape[1],f.shape[2],f.shape[3],f.shape[4]):f}}),Vc=Tn({avgPool3d_:function(e,t,n,r,o,i,a){void 0===i&&(i="NDHWC");var s=vn(e,"x","avgPool3d","float32"),u=s,c=!1;4===s.rank&&(c=!0,u=s.as5D(1,s.shape[0],s.shape[1],s.shape[2],s.shape[3])),null==a&&(a=[1,1,1]),Z(5===u.rank,(function(){return"Error in avgPool3d: x must be rank 5 but got rank "+u.rank+"."})),Z("NDHWC"===i,(function(){return"Error in avgPool3d: Only NDHWC is currently supported, but got dataFormat of "+i})),Z(wo(n,a),(function(){return"Error in avgPool3d: Either strides or dilations must be 1. Got strides "+n+" and dilations '"+a+"'"})),null!=o&&Z(te(r),(function(){return"Error in avgPool3d: pad must be an integer when using, dimRoundingMode "+o+" but got pad "+r+"."}));var l=lo(u.shape,t,n,a,r,o,i),f=it.runKernelFunc((function(e){return e.avgPool3d(u,l)}),{x:u},(function(e){return{x:function(){return function(e,t,n,r,o,i,a){var s=vn(e,"dy","avgPool3dBackprop"),u=vn(t,"input","avgPool3dBackprop"),c=s,l=u,f=!1;4===u.rank&&(f=!0,c=s.as5D(1,s.shape[0],s.shape[1],s.shape[2],s.shape[3]),l=u.as5D(1,u.shape[0],u.shape[1],u.shape[2],u.shape[3])),Z(5===c.rank,(function(){return"Error in avgPool3dBackprop: dy must be rank 5 but got rank "+c.rank+"."})),Z(5===l.rank,(function(){return"Error in avgPool3dBackprop: input must be rank 5 but got rank "+l.rank+"."})),null==o&&(o=[1,1,1]),Z(wo(r,o),(function(){return"Error in avgPool3dBackprop: Either strides or dilations must be 1. Got strides "+r+" and dilations '"+o+"'"})),null!=a&&Z(te(i),(function(){return"Error in maxPool3dBackprop: pad must be an integer when using, dimRoundingMode "+a+" but got pad "+i+"."}));var p=lo(l.shape,n,r,o,i,a),h=it.runKernelFunc((function(e){return e.avgPool3dBackprop(c,l,p)}),{dy5D:c,input5D:l});return f?h.as4D(h.shape[1],h.shape[2],h.shape[3],h.shape[4]):h}(e,u,t,n,a,r,o)}}}));return f=f.cast(u.dtype),c?f.as4D(f.shape[1],f.shape[2],f.shape[3],f.shape[4]):f}}),Hc=Tn({slice_:function(e,t,n){var r,o,i=vn(e,"x","slice");if(0===i.rank)throw new Error("Slicing scalar is not possible");(r="number"==typeof t?[t].concat(new Array(i.rank-1).fill(0)):t.length<i.rank?t.concat(new Array(i.rank-t.length).fill(0)):t.slice()).forEach((function(e){Z(-1!==e,(function(){return"slice() does not support negative begin indexing."}))})),o=(o=null==n?new Array(i.rank).fill(-1):"number"==typeof n?[n].concat(new Array(i.rank-1).fill(-1)):n.length<i.rank?n.concat(new Array(i.rank-n.length).fill(-1)):n).map((function(e,t){return e>=0?e:(Z(-1===e,(function(){return"Negative size values should be exactly -1 but got "+e+" for the slice() size at index "+t+"."})),i.shape[t]-r[t])})),Gr(i,r,o);var a=i.shape,s={begin:r,size:o};return it.runKernelFunc((function(e){return e.slice(i,r,o)}),{x:i},(function(e){for(var t=[],n=0;n<e.rank;n++)t.push([r[n],a[n]-r[n]-o[n]]);return{x:function(){return e.pad(t)}}}),"Slice",s)}}),Gc=Tn({slice1d_:function(e,t,n){var r=vn(e,"x","slice1d");return Z(1===r.rank,(function(){return"slice1d expects a rank-1 tensor, but got a rank-"+r.rank+" tensor"})),Hc(r,[t],[n])}}),Xc=Tn({slice2d_:function(e,t,n){var r=vn(e,"x","slice2d");return Z(2===r.rank,(function(){return"slice2d expects a rank-2 tensor, but got a rank-"+r.rank+" tensor"})),Hc(r,t,n)}}),Zc=Tn({slice3d_:function(e,t,n){var r=vn(e,"x","slice3d");return Z(3===r.rank,(function(){return"slice3d expects a rank-3 tensor, but got a rank-"+r.rank+" tensor"})),Hc(r,t,n)}}),Kc=Tn({slice4d_:function(e,t,n){var r=vn(e,"x","slice4d");return Z(4===r.rank,(function(){return"slice4d expects a rank-4 tensor, but got a rank-"+r.rank+" tensor"})),Hc(r,t,n)}});function Jc(e,t,n,r,o){return t.rank<n.rank&&(t=t.reshape(An(t.shape,r))),e.rank<n.rank&&(e=e.reshape(An(e.shape,r))),{x:function(){var r=e.mul(n.equal(t).cast(e.dtype));return null==o?r:r.transpose(o)}}}var Yc=Tn({all_:function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=!1);var r=vn(e,"x","all","bool"),o=se(t,r.shape),i=o,a=Cn(i,r.rank);null!=a&&(r=r.transpose(a),i=In(i.length,r.rank));var s=it.runKernelFunc((function(e){return e.all(r,i)}),{$x:r});if(n){var u=An(s.shape,o);return s.reshape(u)}return s}}),$c=Tn({any_:function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=!1);var r=vn(e,"x","any","bool"),o=se(t,r.shape),i=o,a=Cn(i,r.rank);null!=a&&(r=r.transpose(a),i=In(i.length,r.rank));var s=it.runKernelFunc((function(e){return e.any(r,i)}),{$x:r});if(n){var u=An(s.shape,o);return s.reshape(u)}return s}}),el=Tn({argMax_:function(e,t){void 0===t&&(t=0);var n=vn(e,"x","argMax");null==t&&(t=0);var r=se(t,n.shape),o=Cn(r,n.rank);null!=o&&(n=n.transpose(o),r=In(r.length,n.rank));var i={axis:r[0]},a=[n];return it.runKernelFunc((function(e,t){var o=e.argMax(n,r[0]);return t([n]),o}),{x:n},(function(e,t){var n=t[0];return{x:function(){return Vn(n)}}}),"ArgMax",i,a)}}),tl=Tn({argMin_:function(e,t){void 0===t&&(t=0);var n=vn(e,"x","argMin");null==t&&(t=0);var r=se(t,n.shape),o=Cn(r,n.rank);return null!=o&&(n=n.transpose(o),r=In(r.length,n.rank)),it.runKernelFunc((function(e,t){var o=e.argMin(n,r[0]);return t([n]),o}),{$x:n},(function(e,t){var n=t[0];return{$x:function(){return Vn(n)}}}))}}),nl=Tn({logSumExp_:function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=!1);var r=vn(e,"x","logSumExp"),o=se(t,r.shape),i=r.max(o,!0),a=r.sub(i).exp().sum(o).log(),s=i.reshape(a.shape).add(a);if(n){var u=An(s.shape,o);return s.reshape(u)}return s}}),rl=Tn({max_:function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=!1);var r=vn(e,"x","max"),o=r,i=se(t,r.shape),a=i,s=Cn(a,r.rank);null!=s&&(r=r.transpose(s),a=In(a.length,r.rank));var u=[r],c=it.runKernelFunc((function(e,t){var n=e.max(r,a);return t([o,n]),n}),{x:r},(function(e,t){return Jc(e,t[1],t[0],i,s)}),"Max",{axes:a},u,[!0]);if(n){var l=An(c.shape,i);c=c.reshape(l)}return c}}),ol=Tn({mean_:function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=!1);var r=vn(e,"x","mean"),o=se(t,r.shape),i=$(xn(r.shape,o)[1]);return eo((function(e){var r=Nn(i);return{value:(r.dtype===e.dtype?e:e.cast(r.dtype)).div(r).sum(t,n),gradFunc:function(t){var n=e.shape.slice();return o.forEach((function(e){n[e]=1})),t.reshape(n).mul(Un(e.shape,"float32")).div(i)}}}))(r)}}),il=Tn({min_:function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=!1);var r=vn(e,"x","min"),o=r,i=se(t,r.shape),a=i,s=Cn(a,r.rank);null!=s&&(r=r.transpose(s),a=In(a.length,r.rank));var u=[r],c=it.runKernelFunc((function(e,t){var n=e.min(r,a);return t([o,n]),n}),{x:r},(function(e,t){return Jc(e,t[1],t[0],i,s)}),"Min",{axes:a},u,[!0]);if(n){var l=An(c.shape,i);c=c.reshape(l)}return c}}),al=Tn({moments_:function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=!1);var r=se(t,(e=vn(e,"x","moments")).shape),o=e.mean(r,n),i=o.shape;n||(i=An(o.shape,r));var a=e.toFloat().sub(o.reshape(i)).square();return{mean:o,variance:a.mean(r,n)}}}),sl=Tn({sum_:function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=!1);var r=vn(e,"x","sum");"bool"===r.dtype&&(r=r.toInt());var o=se(t,r.shape);return eo((function(e){var t=Cn(o,e.rank),r=o,i=e;null!=t&&(i=e.transpose(t),r=In(r.length,e.rank));var a=function(t){var n=e.shape.slice();return o.forEach((function(e){n[e]=1})),t.reshape(n).mul(Un(e.shape,"float32"))},s={axes:r},u=it.runKernelFunc((function(e){return e.sum(i,r)}),{x:i},(function(e){return{x:function(){return a(e)}}}),"Sum",s);if(n){var c=An(u.shape,o);u=u.reshape(c)}return{value:u,gradFunc:a}}))(r)}}),ul=Tn({prod_:function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=!1);var r=vn(e,"x","prod");"bool"===r.dtype&&(r=r.toInt());var o=se(t,r.shape),i=Cn(o,r.rank),a=o,s=r;null!=i&&(s=r.transpose(i),a=In(a.length,r.rank));var u=it.runKernelFunc((function(e){return e.prod(s,a)}),{permutedX:s});if(n){var c=An(u.shape,o);u=u.reshape(c)}return u}}),cl=Tn({elu_:function(e){var t=vn(e,"x","elu");return it.runKernelFunc((function(e,n){var r=e.elu(t);return n([r]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){return it.runKernelFunc((function(t){return t.eluDer(e,n)}),{dy:e,y:n})}}}))}}),ll=Tn({leakyRelu_:function(e,t){void 0===t&&(t=.2);var n=vn(e,"x","leakyRelu");return zu(Nn(t).mul(n),n)}}),fl=Tn({prelu_:function(e,t){var n=vn(e,"x","prelu"),r=vn(t,"alpha","prelu");return it.runKernelFunc((function(e,t){var o=e.prelu(n,r);return t([n,r]),o}),{x:n,alpha:r},(function(e,t){var n=t[0],r=t[1],o=n.greater(0);return{x:function(){return Du(o,e,e.mul(r))},alpha:function(){var t=Du(o,Vn(e),e.mul(n)),i=so(r.shape,e.shape);return i.length>0&&(t=t.sum(i)),t.reshape(r.shape)}}}),"Prelu")}}),pl=Tn({relu_:function(e){var t=vn(e,"x","relu");return"bool"===t.dtype?t.toInt():it.runKernelFunc((function(e,n){var r=e.relu(t);return n([t]),r}),{x:t},(function(e,t){var n=t[0];return{x:function(){return e.mulStrict(n.step().toFloat())}}}),"Relu")}}),hl=Tn({relu6_:function(e){var t=vn(e,"x","relu6");return"bool"===t.dtype?t.toInt():it.runKernelFunc((function(e,n){var r=e.relu6(t);return n([t]),r}),{x:t},(function(e,t){var n=t[0],r=n.lessEqual(6).mul(n.step());return{x:function(){return e.mulStrict(r.toFloat())}}}),"Relu6")}}),dl=Tn({selu_:function(e){var t=vn(e,"x","selu");return it.runKernelFunc((function(e,n){var r=e.selu(t);return n([t]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){var t=n.greater(Nn(0)),r=Nn(es),o=Nn(ts),i=e.mul(o),a=e.mul(r).mul(n.toFloat().exp());return Du(t,i,a)}}}))}}),ml=Tn({transpose_:function(e,t){var n=vn(e,"x","transpose");if(null==t&&(t=n.shape.map((function(e,t){return t})).reverse()),Z(n.rank===t.length,(function(){return"Error in transpose: rank of input "+n.rank+" must match length of perm "+t+"."})),t.forEach((function(e){Z(e>=0&&e<n.rank,(function(){return"All entries in 'perm' must be between 0 and "+(n.rank-1)+" but got "+t}))})),n.rank<=1)return n.clone();var r={perm:t};return it.runKernelFunc((function(e){return e.transpose(n,t)}),{x:n},(function(e){var n=kn(t);return{x:function(){return e.transpose(n)}}}),"Transpose",r)}}),gl=Tn({localResponseNormalization_:function(e,t,n,r,o){void 0===t&&(t=5),void 0===n&&(n=1),void 0===r&&(r=1),void 0===o&&(o=.5);var i=vn(e,"x","localResponseNormalization");Z(4===i.rank||3===i.rank,(function(){return"Error in localResponseNormalization: x must be rank 3 or 4 but got\n rank "+i.rank+"."})),Z(te(t),(function(){return"Error in localResponseNormalization: depthRadius must be an integer but got depthRadius "+t+"."}));var a=i,s=!1;3===i.rank&&(s=!0,a=i.as4D(1,i.shape[0],i.shape[1],i.shape[2]));var u=it.runKernelFunc((function(e,i){var s=e.localResponseNormalization4D(a,t,n,r,o);return i([a,s]),s}),{x4D:a},(function(e,i){var a=i[0],s=i[1];return{x4D:function(){return it.runKernelFunc((function(i){return i.LRNGrad(e,a,s,t,n,r,o)}),{})}}}));return s?u.as3D(u.shape[1],u.shape[2],u.shape[3]):u}}),vl=Tn({norm_:function(e,t,n,r){void 0===t&&(t="euclidean"),void 0===n&&(n=null),void 0===r&&(r=!1);var o=function e(t,n,r){if(void 0===r&&(r=null),0===t.rank)return t.abs();if(1!==t.rank&&null===r)return e(t.reshape([-1]),n,r);if(1===t.rank||"number"==typeof r||Array.isArray(r)&&1===r.length){if(1===n)return t.abs().sum(r);if(n===1/0)return t.abs().max(r);if(n===-1/0)return t.abs().min(r);if("euclidean"===n||2===n)return t.abs().pow(Nn(2,"int32")).sum(r).sqrt();throw new Error("Error in norm: invalid ord value: "+n)}if(Array.isArray(r)&&2===r.length){if(1===n)return t.abs().sum(r[0]).max(r[1]-1);if(n===1/0)return t.abs().sum(r[1]).max(r[0]);if(n===-1/0)return t.abs().sum(r[1]).min(r[0]);if("fro"===n||"euclidean"===n)return t.square().sum(r).sqrt();throw new Error("Error in norm: invalid ord value: "+n)}throw new Error("Error in norm: invalid axis: "+r)}(e=vn(e,"x","norm"),t,n),i=o.shape;if(r){var a=se(n,e.shape);i=An(o.shape,a)}return o.reshape(i)}}),yl=Tn({basicLSTMCell_:function(e,t,n,r,o,i){var a=vn(e,"forgetBias","basicLSTMCell"),s=vn(t,"lstmKernel","basicLSTMCell"),u=vn(n,"lstmBias","basicLSTMCell"),c=vn(r,"data","basicLSTMCell"),l=vn(o,"c","basicLSTMCell"),f=vn(i,"h","basicLSTMCell"),p=c.concat(f,1).matMul(s).add(u),h=p.shape[0],d=p.shape[1]/4,m=[h,d],g=p.slice([0,0],m),v=p.slice([0,d],m),y=p.slice([0,2*d],m),b=p.slice([0,3*d],m),w=g.sigmoid().mulStrict(v.tanh()).addStrict(l.mulStrict(a.add(y).sigmoid())),x=w.tanh().mulStrict(b.sigmoid());return[w,x]}}),bl=Tn({multiRNNCell_:function(e,t,n,r){for(var o=vn(t,"data","multiRNNCell"),i=yn(n,"c","multiRNNCell"),a=yn(r,"h","multiRNNCell"),s=o,u=[],c=0;c<e.length;c++){var l=e[c](s,i[c],a[c]);u.push(l[0]),u.push(l[1]),s=l[1]}var f=[],p=[];for(c=0;c<u.length;c+=2)f.push(u[c]),p.push(u[c+1]);return[f,p]}}),wl=Tn({movingAverage_:function(e,t,n,r,o){void 0===o&&(o=!0);var i=vn(e,"v","movingAverage"),a=vn(t,"x","movingAverage"),s=vn(n,"decay","movingAverage");et(i,a),Z(ee(i.shape,a.shape),(function(){return"Shape mismatch in v and x"}));var u=Nn(1),c=u.sub(s),l=a.sub(i).mul(c);if(o){Z(null!=r,(function(){return"When using zeroDebias: true, step is required."}));var f=vn(r,"step","movingAverage");l=l.div(u.sub(Ku(s,f)))}return i.add(l)}}),xl=Tn({stridedSlice_:function(e,t,n,r,o,i,a,s,u){if(void 0===o&&(o=0),void 0===i&&(i=0),void 0===a&&(a=0),void 0===s&&(s=0),void 0===u&&(u=0),null==r&&(r=new Array(t.length)),0!==a)throw new Error("ellipsis mask is not yet supported");var c=vn(e,"x","stridedSlice"),l=Xr(s),f=c.shape.slice();l.forEach((function(e){t[e]=0,n[e]=1,f.splice(e,0,1)})),c=c.reshape(f);for(var p=0;p<c.rank;p++)t[p]=Kr(o,t,r,c.shape,p),n[p]=Jr(i,n,r,c.shape,p),r[p]=r[p]||1;var h=Xr(u);h.forEach((function(e){n[e]=t[e]+1,r[e]=1}));var d=Zr(t,n,r),m=d.filter((function(e,t){return-1===h.indexOf(t)}));return r.every((function(e){return 1===e}))?Hc(c,t,d).reshape(m):it.runKernelFunc((function(e){return e.stridedSlice(c,t,n,r)}),{$x:c}).reshape(m)}}),Al=Tn({topk_:function(e,t,n){void 0===t&&(t=1),void 0===n&&(n=!0);var r=vn(e,"x","topk");if(0===r.rank)throw new Error("topk() expects the input to be of rank 1 or higher");var o=r.shape[r.shape.length-1];if(t>o)throw new Error("'k' passed to topk() must be <= the last dimension ("+o+") but got "+t);var i=it.runKernelFunc((function(e){return e.topk(r,t,n)}),{$x:r});return{values:i[0],indices:i[1]}}}),El=Tn({scatterND_:function(e,t,n){var r=vn(e,"indices","scatterND","int32"),o=vn(t,"updates","scatterND");return Vr(o,r,n),it.runKernelFunc((function(e){return e.scatterND(r,o,n)}),{indices:r,updates:o},null,"ScatterNd",{shape:n})}}),Cl=Tn({fft_:function(e){Z("complex64"===e.dtype,(function(){return"The dtype for tf.spectral.fft() must be complex64 but got "+e.dtype+"."}));var t=e.shape[e.shape.length-1],n=e.size/t,r=e.as2D(n,t);return it.runKernelFunc((function(e){return e.fft(r)}),{input:e}).reshape(e.shape)}}),kl=Tn({ifft_:function(e){Z("complex64"===e.dtype,(function(){return"The dtype for tf.spectral.ifft() must be complex64 but got "+e.dtype+"."}));var t=e.shape[e.shape.length-1],n=e.size/t,r=e.as2D(n,t);return it.runKernelFunc((function(e){return e.ifft(r)}),{input:e}).reshape(e.shape)}}),Il=Tn({rfft_:function(e,t){Z("float32"===e.dtype,(function(){return"The dtype for rfft() must be real value but got "+e.dtype}));var n,r=e.shape[e.shape.length-1],o=e.size/r;if(null!=t&&t<r){var i=e.shape.map((function(e){return 0})),a=e.shape.map((function(e){return e}));a[e.shape.length-1]=t,n=e.slice(i,a),r=t}else if(null!=t&&t>r){var s=e.shape.map((function(e){return e}));s[e.shape.length-1]=t-r,n=e.concat(Wn(s),e.shape.length-1),r=t}else n=e;var u=n.zerosLike(),c=Rn(n,u).as2D(o,r),l=Cl(c),f=Math.floor(r/2)+1,p=On(l),h=Dn(l),d=p.split([f,r-f],p.shape.length-1),m=h.split([f,r-f],h.shape.length-1),g=n.shape.slice();return g[n.shape.length-1]=f,Rn(d[0],m[0]).reshape(g)}}),Sl=Tn({irfft_:function(e){var t=e.shape[e.shape.length-1],n=e.size/t;if(t<=2){var r=e.as2D(n,t),o=kl(r);return On(o)}var i=[n,2*(t-1)],a=On(e).as2D(n,t),s=Dn(e).as2D(n,t),u=a.slice([0,1],[n,t-2]).reverse(1),c=s.slice([0,1],[n,t-2]).reverse(1).mul(Nn(-1)),l=a.concat(u,1),f=s.concat(c,1);return r=Rn(l,f).as2D(i[0],i[1]),o=kl(r),On(o)}}),jl=Object.freeze({fft:Cl,ifft:kl,rfft:Il,irfft:Sl}),Tl=Tn({sparseToDense_:function(e,t,n,r){void 0===r&&(r=0);var o=vn(e,"sparseIndices","sparseToDense","int32"),i=vn(t,"sparseValues","sparseToDense"),a=vn(r,"defaultValue","sparseToDense",i.dtype);return function(e,t,n,r){if("int32"!==e.dtype)throw new Error("tf.sparseToDense() expects the indices to be int32 type, but the dtype was "+e.dtype+".");if(e.rank>2)throw new Error("sparseIndices should be a scalar, vector, or matrix, but got shape "+e.shape+".");var o=e.rank>0?e.shape[0]:1,i=e.rank>1?e.shape[1]:1;if(n.length!==i)throw new Error("outputShape has incorrect number of elements:, "+n.length+", should be: "+i+".");var a=t.size;if(0!==t.rank&&(1!==t.rank||a!==o))throw new Error("sparseValues has incorrect shape "+t.shape+", should be [] or ["+o+"]");if(t.dtype!==r.dtype)throw new Error("sparseValues.dtype must match defaultValues.dtype")}(o,i,n,a),it.runKernelFunc((function(e){return e.sparseToDense(o,i,n,a)}),{$sparseIndices:o,$sparseValues:i,$defaultValue:a})}}),Rl=Tn({gatherND_:function(e,t){var n=vn(t,"indices","gatherND","int32"),r=vn(e,"x","gatherND");return it.runKernelFunc((function(e){return e.gatherND(r,n)}),{x:r,indices:n},null,"GatherNd")}}),Ol=Tn({diag_:function(e){var t=vn(e,"x","diag").flatten(),n=e.shape.concat(e.shape);return it.runKernelFunc((function(e){return e.diag(t)}),{$x:t}).reshape(n)}}),Dl=Tn({dropout_:function(e,t,n,r){var o=vn(e,"x","dropout");if(Z("float32"===o.dtype,(function(){return"x has to be a floating point tensor since it's going to be scaled, but got a "+o.dtype+" tensor instead."})),Z(t>=0&&t<1,(function(){return"rate must be a float in the range [0, 1), but got "+t+"."})),0===t)return e instanceof qe?o.clone():o;var i=function(e,t){if(null==t)return e.shape.slice();if(ee(e.shape,t))return t;if(e.shape.length===t.length){for(var n=[],r=0;r<e.shape.length;r++)null==t[r]&&null!=e.shape[r]?n.push(e.shape[r]):n.push(t[r]);return n}return t}(o,n),a=1-t,s=Tr(i,0,1,"float32",r).add(a).floor().div(a);return o.mul(s)}});function Bl(e,t,n){for(var r=1-e%2,o=new Float32Array(e),i=0;i<e;++i){var a=2*Math.PI*i/(e+r-1);o[i]=t-n*Math.cos(a)}return Pn(o,"float32")}var _l,Nl=Tn({hannWindow_:function(e){return Bl(e,.5,.5)}}),Pl=Tn({hammingWindow_:function(e){return Bl(e,.54,.46)}}),Ml=Tn({frame_:function(e,t,n,r,o){void 0===r&&(r=!1),void 0===o&&(o=0);for(var i=0,a=[];i+t<=e.size;)a.push(Hc(e,i,t)),i+=n;if(r)for(;i<e.size;){var s=i+t-e.size,u=Hn([Hc(e,i,t-s),zn([s],o)]);a.push(u),i+=n}return 0===a.length?Mn([],[0,t]):Hn(a).as2D(a.length,t)}}),Fl=Tn({stft_:function(e,t,n,r,o){var i;void 0===o&&(o=Nl),null==r&&(i=t,r=Math.floor(Math.pow(2,Math.ceil(Math.log(i)/Math.log(2)))));for(var a=Ml(e,t,n),s=Xu(a,o(t)),u=[],c=0;c<a.shape[0];c++)u.push(Il(s.slice([c,0],[1,t]),r));return Hn(u)}}),Ll=Object.freeze({hannWindow:Nl,hammingWindow:Pl,frame:Ml,stft:Fl});!function(e){e[e.NONE=0]="NONE",e[e.MEAN=1]="MEAN",e[e.SUM=2]="SUM",e[e.SUM_BY_NONZERO_WEIGHTS=3]="SUM_BY_NONZERO_WEIGHTS"}(_l||(_l={}));var Ul=Tn({absoluteDifference_:function(e,t,n,r){void 0===r&&(r=_l.SUM_BY_NONZERO_WEIGHTS);var o=vn(e,"labels","absoluteDifference"),i=vn(t,"predictions","absoluteDifference"),a=null;null!=n&&(a=vn(n,"weights","absoluteDifference")),K(o.shape,i.shape,"Error in absoluteDifference: ");var s=o.sub(i).abs();return Wl(s,a,r)}}),Wl=Tn({computeWeightedLoss_:function(e,t,n){void 0===n&&(n=_l.SUM_BY_NONZERO_WEIGHTS);var r=vn(e,"losses","computeWeightedLoss"),o=null;null!=t&&(o=vn(t,"weights","computeWeightedLoss"));var i=null==o?r:r.mul(o);if(n===_l.NONE)return i;if(n===_l.SUM)return i.sum();if(n===_l.MEAN){if(null==o)return i.mean();var a=r.size/o.size,s=i.sum().div(o.sum());return a>1?s.div(Nn(a)):s}if(n===_l.SUM_BY_NONZERO_WEIGHTS){if(null==o)return i.sum().div(Nn(r.size));var u=o.mul(Un(r.shape)).notEqual(Nn(0)).sum().toFloat();return i.sum().div(u)}throw Error("Unknown reduction: "+n)}}),zl=Tn({cosineDistance_:function(e,t,n,r,o){void 0===o&&(o=_l.SUM_BY_NONZERO_WEIGHTS);var i=vn(e,"labels","cosineDistance"),a=vn(t,"predictions","cosineDistance"),s=null;null!=r&&(s=vn(r,"weights","cosineDistance")),K(i.shape,a.shape,"Error in cosineDistance: ");var u=Nn(1).sub(i.mul(a).sum(n,!0));return Wl(u,s,o)}}),ql=Tn({hingeLoss_:function(e,t,n,r){void 0===r&&(r=_l.SUM_BY_NONZERO_WEIGHTS);var o=vn(e,"labels","hingeLoss"),i=vn(t,"predictions","hingeLoss"),a=null;null!=n&&(a=vn(n,"weights","hingeLoss")),K(o.shape,i.shape,"Error in hingeLoss: ");var s=Nn(1);o=Nn(2).mul(o).sub(s);var u=s.sub(o.mul(i)).relu();return Wl(u,a,r)}}),Ql=Tn({huberLoss_:function(e,t,n,r,o){void 0===r&&(r=1),void 0===o&&(o=_l.SUM_BY_NONZERO_WEIGHTS);var i=vn(e,"labels","huberLoss"),a=vn(t,"predictions","huberLoss"),s=null;null!=n&&(s=vn(n,"weights","huberLoss")),K(i.shape,a.shape,"Error in huberLoss: ");var u=Nn(r),c=a.sub(i).abs(),l=Qu(c,u),f=c.sub(l),p=Nn(.5).mul(l.square()).add(u.mul(f));return Wl(p,s,o)}}),Vl=Tn({logLoss_:function(e,t,n,r,o){void 0===r&&(r=1e-7),void 0===o&&(o=_l.SUM_BY_NONZERO_WEIGHTS);var i=vn(e,"labels","logLoss"),a=vn(t,"predictions","logLoss"),s=null;null!=n&&(s=vn(n,"weights","logLoss")),K(i.shape,a.shape,"Error in logLoss: ");var u=Nn(1),c=Nn(r),l=i.mul(a.add(c).log()).neg().sub(u.sub(i).mul(u.sub(a).add(c).log()));return Wl(l,s,o)}}),Hl=Tn({meanSquaredError_:function(e,t,n,r){void 0===r&&(r=_l.SUM_BY_NONZERO_WEIGHTS);var o=vn(e,"labels","meanSquaredError"),i=vn(t,"predictions","meanSquaredError"),a=null;null!=n&&(a=vn(n,"weights","meanSquaredError")),K(o.shape,i.shape,"Error in meanSquaredError: ");var s=o.squaredDifference(i);return Wl(s,a,r)}}),Gl=Tn({sigmoidCrossEntropy_:function(e,t,n,r,o){void 0===r&&(r=0),void 0===o&&(o=_l.SUM_BY_NONZERO_WEIGHTS);var i=vn(e,"multiClassLabels","sigmoidCrossEntropy"),a=vn(t,"logits","sigmoidCrossEntropy"),s=null;if(null!=n&&(s=vn(n,"weights","sigmoidCrossEntropy")),K(i.shape,a.shape,"Error in sigmoidCrossEntropy: "),r>0){var u=Nn(r),c=Nn(1),l=Nn(.5);i=i.mul(c.sub(u)).add(l.mul(u))}var f=function(e,t){var n=vn(e,"labels","sigmoidCrossEntropyWithLogits"),r=vn(t,"logits","sigmoidCrossEntropyWithLogits");K(n.shape,r.shape,"Error in sigmoidCrossEntropyWithLogits: ");var o=r.relu(),i=r.mul(n),a=r.abs().neg().exp().log1p();return o.sub(i).add(a)}(i,a);return Wl(f,s,o)}}),Xl=Tn({softmaxCrossEntropy_:function(e,t,n,r,o){void 0===r&&(r=0),void 0===o&&(o=_l.SUM_BY_NONZERO_WEIGHTS);var i=vn(e,"onehotLabels","softmaxCrossEntropy"),a=vn(t,"logits","softmaxCrossEntropy"),s=null;if(null!=n&&(s=vn(n,"weights","softmaxCrossEntropy")),K(i.shape,a.shape,"Error in softmaxCrossEntropy: "),r>0){var u=Nn(r),c=Nn(1),l=Nn(i.shape[1]);i=i.mul(c.sub(u)).add(u.div(l))}var f=function(e,t,n){if(void 0===n&&(n=-1),-1===n&&(n=t.rank-1),n!==t.rank-1)throw Error("Softmax cross entropy along a non-last dimension is not yet supported. Labels / logits was rank "+t.rank+" and dim was "+n);return eo((function(e,t,r){var o=t.logSumExp([n],!0),i=t.toFloat().sub(o);return r([e,i]),{value:i.mul(e).neg().sum([n]),gradFunc:function(e,t){var r=t[0],o=t[1],i=An(e.shape,[n]);return[e.reshape(i).mul(r.toFloat().sub(o.exp())),e.reshape(i).mul(o.exp().sub(r.toFloat()))]}}}))(e,t)}(i,a);return Wl(f,s,o)}}),Zl=Object.freeze({get Reduction(){return _l},absoluteDifference:Ul,computeWeightedLoss:Wl,cosineDistance:zl,hingeLoss:ql,huberLoss:Ql,logLoss:Vl,meanSquaredError:Hl,sigmoidCrossEntropy:Gl,softmaxCrossEntropy:Xl});function Kl(e,t){return void 0===t&&(t=!1),it.tidy((function(){if(2!==e.shape.length)throw new Error("qr2d() requires a 2D Tensor, but got a "+e.shape.length+"D Tensor.");for(var n=e.shape[0],r=e.shape[1],o=yr(n),i=e.clone(),a=Mn([[1]],[1,1]),s=a.clone(),u=n>=r?r:n,c=function(e){var t,u=i,c=s,l=o;t=it.tidy((function(){var t=i.slice([e,e],[n-e,1]),u=t.norm(),c=i.slice([e,e],[1,1]),l=Mn([[-1]]).where(c.greater(0),Mn([[1]])),f=c.sub(l.mul(u)),p=t.div(f);s=1===p.shape[0]?a.clone():a.concat(p.slice([1,0],[p.shape[0]-1,p.shape[1]]),0);var h=l.matMul(f).div(u).neg(),d=i.slice([e,0],[n-e,r]),m=h.mul(s);if(0===e)i=d.sub(m.matMul(s.transpose().matMul(d)));else{var g=d.sub(m.matMul(s.transpose().matMul(d)));i=i.slice([0,0],[e,r]).concat(g,0)}var v=o.slice([0,e],[n,o.shape[1]-e]);if(0===e)o=v.sub(v.matMul(s).matMul(m.transpose()));else{var y=v.sub(v.matMul(s).matMul(m.transpose()));o=o.slice([0,0],[n,e]).concat(y,1)}return[s,i,o]})),s=t[0],i=t[1],o=t[2],hn([u,c,l])},l=0;l<u;++l)c(l);return!t&&n>r&&(o=o.slice([0,0],[n,r]),i=i.slice([0,0],[r,r])),[o,i]}))}var Jl=Tn({bandPart_:function(e,t,n){if(t%1!=0)throw new Error("bandPart(): numLower must be an integer, got "+t+".");if(n%1!=0)throw new Error("bandPart(): numUpper must be an integer, got "+n+".");var r=vn(e,"a","bandPart");if(r.rank<2)throw new Error("bandPart(): Rank must be at least 2, got "+r.rank+".");var o=r.shape,i=r.shape.slice(-2),a=i[0],s=i[1];if(!(t<=a))throw new Error("bandPart(): numLower ("+t+") must not be greater than the number of rows ("+a+").");if(!(n<=s))throw new Error("bandPart(): numUpper ("+n+") must not be greater than the number of columns ("+s+").");t<0&&(t=a),n<0&&(n=s);var u=qn(0,a,1,"int32").reshape([-1,1]),c=qn(0,s,1,"int32"),l=$u(u,c),f=ju(l.lessEqual(Nn(+t,"int32")),l.greaterEqual(Nn(-n,"int32"))),p=Wn([a,s],r.dtype);return Br(Pr(r.reshape([-1,a,s])).map((function(e){return Du(f,e,p)}))).reshape(o)}}),Yl=Tn({gramSchmidt_:function(e){var t;if(Array.isArray(e)){t=!1,Z(null!=e&&e.length>0,(function(){return"Gram-Schmidt process: input must not be null, undefined, or empty"}));for(var n=e[0].shape[0],r=function(t){Z(e[t].shape[0]===n,(function(){return"Gram-Schmidt: Non-unique lengths found in the input vectors: ("+e[t].shape[0]+" vs. "+n+")"}))},o=1;o<e.length;++o)r(o)}else t=!0,e=Jn(e,e.shape[0],0).map((function(e){return Dr(e,[0])}));Z(e.length<=e[0].shape[0],(function(){return"Gram-Schmidt: Number of vectors ("+e.length+") exceeds number of dimensions ("+e[0].shape[0]+")."}));var i=[],a=e,s=function(e){i.push(it.tidy((function(){var t=a[e];if(e>0)for(var n=0;n<e;++n){var r=sl(i[n].mulStrict(t)).mul(i[n]);t=t.sub(r)}return t.div(vl(t,"euclidean"))})))};for(o=0;o<e.length;++o)s(o);return t?Br(i,0):i}}),$l=Tn({qr_:function(e,t){if(void 0===t&&(t=!1),e.rank<2)throw new Error("qr() requires input tensor to have a rank >= 2, but got rank "+e.rank);if(2===e.rank)return Kl(e,t);var n=e.shape.slice(0,e.shape.length-2).reduce((function(e,t){return e*t})),r=Pr(e.reshape([n,e.shape[e.shape.length-2],e.shape[e.shape.length-1]]),0),o=[],i=[];return r.forEach((function(e){var n=Kl(e,t),r=n[0],a=n[1];o.push(r),i.push(a)})),[Br(o,0).reshape(e.shape),Br(i,0).reshape(e.shape)]}}),ef=Object.freeze({bandPart:Jl,gramSchmidt:Yl,qr:$l});function tf(e,t,n,r,o,i){null==r&&(r=.5),null==o&&(o=Number.NEGATIVE_INFINITY),null==i&&(i=0);var a=e.shape[0];return n=Math.min(n,a),Z(0<=r&&r<=1,(function(){return"iouThreshold must be in [0, 1], but was '"+r+"'"})),Z(2===e.rank,(function(){return"boxes must be a 2D tensor, but was of rank '"+e.rank+"'"})),Z(4===e.shape[1],(function(){return"boxes must have 4 columns, but 2nd dimension was "+e.shape[1]})),Z(1===t.rank,(function(){return"scores must be a 1D tensor"})),Z(t.shape[0]===a,(function(){return"scores has incompatible shape with boxes. Expected "+a+", but was "+t.shape[0]})),Z(0<=i&&i<=1,(function(){return"softNmsSigma must be in [0, 1], but was '"+i+"'"})),{maxOutputSize:n,iouThreshold:r,scoreThreshold:o,softNmsSigma:i}}var nf=Tn({resizeBilinear_:function(e,t,n){void 0===n&&(n=!1);var r=vn(e,"images","resizeBilinear");Z(3===r.rank||4===r.rank,(function(){return"Error in resizeBilinear: x must be rank 3 or 4, but got rank "+r.rank+"."})),Z(2===t.length,(function(){return"Error in resizeBilinear: new shape must 2D, but got shape "+t+"."}));var o=r,i=!1;3===r.rank&&(i=!0,o=r.as4D(1,r.shape[0],r.shape[1],r.shape[2]));var a=t[0],s=t[1],u=it.runKernelFunc((function(e,t){return t([o]),e.resizeBilinear(o,a,s,n)}),{x:o},(function(e,t){return{x:function(){return it.runKernelFunc((function(r){return r.resizeBilinearBackprop(e,t[0],n)}),{})}}}),"ResizeBilinear",{alignCorners:n,newHeight:a,newWidth:s});return i?u.as3D(u.shape[1],u.shape[2],u.shape[3]):u}}),rf=Tn({resizeNearestNeighbor_:function(e,t,n){void 0===n&&(n=!1);var r=vn(e,"images","resizeNearestNeighbor");Z(3===r.rank||4===r.rank,(function(){return"Error in resizeNearestNeighbor: x must be rank 3 or 4, but got rank "+r.rank+"."})),Z(2===t.length,(function(){return"Error in resizeNearestNeighbor: new shape must 2D, but got shape "+t+"."})),Z("float32"===r.dtype||"int32"===r.dtype,(function(){return"`images` must have `int32` or `float32` as dtype"}));var o=r,i=!1;3===r.rank&&(i=!0,o=r.as4D(1,r.shape[0],r.shape[1],r.shape[2]));var a=t[0],s=t[1],u=it.runKernelFunc((function(e,t){return t([o]),e.resizeNearestNeighbor(o,a,s,n)}),{batchImages:o},(function(e,t){return{batchImages:function(){return it.runKernelFunc((function(r){return r.resizeNearestNeighborBackprop(e,t[0],n)}),{})}}}));return i?u.as3D(u.shape[1],u.shape[2],u.shape[3]):u}}),of=Tn({nonMaxSuppression_:function(e,t,n,r,o){void 0===r&&(r=.5),void 0===o&&(o=Number.NEGATIVE_INFINITY);var i=vn(e,"boxes","nonMaxSuppression"),a=vn(t,"scores","nonMaxSuppression"),s=tf(i,a,n,r,o);n=s.maxOutputSize,r=s.iouThreshold,o=s.scoreThreshold;var u={maxOutputSize:n,iouThreshold:r,scoreThreshold:o};return it.runKernelFunc((function(e){return e.nonMaxSuppression(i,a,n,r,o)}),{boxes:i,scores:a},null,"NonMaxSuppressionV3",u)}}),af=Tn({nonMaxSuppressionWithScore_:function(e,t,n,r,o,i){void 0===r&&(r=.5),void 0===o&&(o=Number.NEGATIVE_INFINITY),void 0===i&&(i=0);var a=vn(e,"boxes","nonMaxSuppression"),s=vn(t,"scores","nonMaxSuppression"),u=tf(a,s,n,r,o,i),c={maxOutputSize:n=u.maxOutputSize,iouThreshold:r=u.iouThreshold,scoreThreshold:o=u.scoreThreshold,softNmsSigma:i=u.softNmsSigma},l=it.runKernel("NonMaxSuppressionV5",{boxes:a,scores:s},c);return{selectedIndices:l[0],selectedScores:l[1]}}}),sf=Tn({cropAndResize_:function(e,t,n,r,o,i){var a=vn(e,"image","cropAndResize"),s=vn(t,"boxes","cropAndResize","float32"),u=vn(n,"boxInd","cropAndResize","int32");o=o||"bilinear",i=i||0;var c=s.shape[0];return Z(4===a.rank,(function(){return"Error in cropAndResize: image must be rank 4,but got rank "+a.rank+"."})),Z(2===s.rank&&4===s.shape[1],(function(){return"Error in cropAndResize: boxes must be have size ["+c+",4] but had shape "+s.shape+"."})),Z(1===u.rank&&u.shape[0]===c,(function(){return"Error in cropAndResize: boxInd must be have size ["+c+"] but had shape "+s.shape+"."})),Z(2===r.length,(function(){return"Error in cropAndResize: cropSize must be of length 2, but got length "+r.length+"."})),Z(r[0]>=1&&r[1]>=1,(function(){return"cropSize must be atleast [1,1], but was "+r})),Z("bilinear"===o||"nearest"===o,(function(){return"method must be bilinear or nearest, but was "+o})),it.runKernelFunc((function(e,t){return e.cropAndResize(a,s,u,r,o,i)}),{images:a,boxes:s,boxInd:u},null,"CropAndResize",{method:o,extrapolationValue:i,cropSize:r})}}),uf=Object.freeze({resizeBilinear:nf,resizeNearestNeighbor:rf,nonMaxSuppression:of,nonMaxSuppressionAsync:function(e,t,n,r,o){return void 0===r&&(r=.5),void 0===o&&(o=Number.NEGATIVE_INFINITY),D(this,void 0,void 0,(function(){var i,a,s,u,c,l,f;return B(this,(function(p){switch(p.label){case 0:return i=vn(e,"boxes","nonMaxSuppressionAsync"),a=vn(t,"scores","nonMaxSuppressionAsync"),s=tf(i,a,n,r,o),n=s.maxOutputSize,r=s.iouThreshold,o=s.scoreThreshold,[4,Promise.all([i.data(),a.data()])];case 1:return u=p.sent(),c=u[0],l=u[1],f=Oo(c,l,n,r,o),i!==e&&i.dispose(),a!==t&&a.dispose(),[2,f]}}))}))},nonMaxSuppressionWithScore:af,nonMaxSuppressionWithScoreAsync:function(e,t,n,r,o,i){return void 0===r&&(r=.5),void 0===o&&(o=Number.NEGATIVE_INFINITY),void 0===i&&(i=0),D(this,void 0,void 0,(function(){var a,s,u,c,l,f,p;return B(this,(function(h){switch(h.label){case 0:return a=vn(e,"boxes","nonMaxSuppressionAsync"),s=vn(t,"scores","nonMaxSuppressionAsync"),u=tf(a,s,n,r,o,i),n=u.maxOutputSize,r=u.iouThreshold,o=u.scoreThreshold,i=u.softNmsSigma,[4,Promise.all([a.data(),s.data()])];case 1:return c=h.sent(),l=c[0],f=c[1],p=Do(l,f,n,r,o,i),a!==e&&a.dispose(),s!==t&&s.dispose(),[2,p]}}))}))},cropAndResize:sf}),cf=function(e,t){return!(e>0)||"linear"===t},lf=function(e,t,n){if(null==n||"linear"===n)return e;if("relu"===n)return e.mul(t.step());throw new Error("Gradient for activation "+n+" has not been implemented yet.")},ff=function(e,t){var n=t,r=so(e.shape,t.shape);return r.length>0&&(n=n.sum(r)),n.reshape(e.shape)},pf=function(e,t,n){if("linear"===t)return e;if("relu"===t)return pl(e);if("elu"===t)return cl(e);if("relu6"===t)return hl(e);if("prelu"===t)return fl(e,n);throw new Error("Unknown fused activation "+t+".")},hf=Tn({fusedMatMul_:function(e){var t,n=e.a,r=e.b,o=e.transposeA,i=void 0!==o&&o,a=e.transposeB,s=void 0!==a&&a,u=e.bias,c=e.activation,l=void 0===c?"linear":c,f=e.preluActivationWeights;if(!1===cf(it.state.gradientDepth,l)){var p=Oc(n,r,i,s);return null!=u&&(p=_u(p,u)),pf(p,l,f)}var h=vn(n,"a","fused matMul"),d=vn(r,"b","fused matMul");t=$e(h,d),h=t[0],d=t[1];var m=i?h.shape[h.rank-2]:h.shape[h.rank-1],g=s?d.shape[d.rank-1]:d.shape[d.rank-2],v=i?h.shape[h.rank-1]:h.shape[h.rank-2],y=s?d.shape[d.rank-2]:d.shape[d.rank-1],b=h.shape.slice(0,-2),w=d.shape.slice(0,-2),x=$(b),A=$(w);Z(h.rank>=2&&d.rank>=2&&h.rank===d.rank,(function(){return"Error in fused matMul: inputs must have the same rank of at least 2, got ranks "+h.rank+" and "+d.rank+"."})),Z(ee(b,w),(function(){return"Error in fused matMul: outer dimensions ("+b+") and ("+w+") of Tensors with shapes "+h.shape+" and "+d.shape+" must match."})),Z(m===g,(function(){return"Error in fused matMul: inner shapes ("+m+") and ("+g+") of Tensors with shapes "+h.shape+" and "+d.shape+" and transposeA="+i+" and transposeB="+s+" must match."}));var E,C,k=h.shape.slice(0,-2).concat([v,y]),I=i?h.as3D(x,m,v):h.as3D(x,v,m),S=s?d.as3D(A,y,g):d.as3D(A,g,y);null!=u&&uo(k,(E=$e(E=vn(u,"bias","fused matMul"),h)[0]).shape),null!=f&&(C=vn(f,"prelu weights","fused matMul"));var j={a:I,b:S};null!=u&&(j.bias=E),null!=f&&(j.preluActivationWeights=C);var T=[I,S];return it.runKernelFunc((function(e,t){var n=e.fusedBatchMatMul({a:I,b:S,transposeA:i,transposeB:s,bias:E,activation:l,preluActivationWeights:C});return t([I,S,n]),n}),j,(function(e,t){var n=t[0],r=t[1],o=t[2],a=lf(e,o,l),c={};return null!=u&&(c={bias:function(){return ff(E,a)}}),i||s?!i&&s?Object.assign({a:function(){return a.matMul(r,!1,!1)},b:function(){return a.matMul(n,!0,!1)}},c):i&&!s?Object.assign({a:function(){return r.matMul(a,!1,!0)},b:function(){return n.matMul(a,!1,!1)}},c):Object.assign({a:function(){return r.matMul(a,!0,!0)},b:function(){return a.matMul(n,!0,!0)}},c):Object.assign({a:function(){return a.matMul(r,!1,!0)},b:function(){return n.matMul(a,!0,!1)}},c)}),"_FusedMatMul",{transposeA:i,transposeB:s,activation:l},T,[!0]).reshape(k)}}),df=Tn({fusedConv2d_:function(e){var t=e.x,n=e.filter,r=e.strides,o=e.pad,i=e.dataFormat,a=void 0===i?"NHWC":i,s=e.dilations,u=void 0===s?[1,1]:s,c=e.dimRoundingMode,l=e.bias,f=e.activation,p=void 0===f?"linear":f,h=e.preluActivationWeights;if(p=p||"linear",!1===cf(it.state.gradientDepth,p)){var d=xc(t,n,r,o,a,u,c);return null!=l&&(d=_u(d,l)),pf(d,p,h)}var m=vn(t,"x","conv2d"),g=vn(n,"filter","conv2d"),v=m,y=!1;3===m.rank&&(y=!0,v=m.as4D(1,m.shape[0],m.shape[1],m.shape[2])),Z(4===v.rank,(function(){return"Error in fused conv2d: input must be rank 4, but got rank "+v.rank+"."})),Z(4===g.rank,(function(){return"Error in fused conv2d: filter must be rank 4, but got rank "+g.rank+"."})),null!=c&&Z(te(o),(function(){return"Error in fused conv2d: pad must be an integer when using, dimRoundingMode "+c+" but got pad "+o+"."})),Z(v.shape[3]===g.shape[2],(function(){return"Error in conv2d: depth of input ("+v.shape[3]+") must match input depth for filter "+g.shape[2]+"."})),Z(wo(r,u),(function(){return"Error in conv2D: Either strides or dilations must be 1. Got strides "+r+" and dilations '"+u+"'"})),Z("NHWC"===a,(function(){return"Error in conv2d: got dataFormat of "+a+" but only NHWC is currently supported."}));var b,w,x=fo(v.shape,g.shape,r,u,o,c);null!=l&&(b=$e(b=vn(l,"bias","fused conv2d"),m)[0],uo(x.outShape,b.shape)),null!=h&&(w=vn(h,"prelu weights","fused conv2d"));var A={x:v,filter:g};null!=l&&(A.bias=b),null!=h&&(A.preluActivationWeights=w);var E=[g,v],C=it.runKernelFunc((function(e,t){var n=e.fusedConv2d({input:v,filter:g,convInfo:x,bias:b,activation:p,preluActivationWeights:w});return t([g,v,n]),n}),A,(function(e,t){var n=t,i=n[0],a=n[1],s=n[2],c=lf(e,s,p);Z(bo(u),(function(){return"Error in gradient of fused conv2D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '"+u+"'"}));var f={};return null!=l&&(f={bias:function(){return ff(b,c)}}),Object.assign({x:function(){return Cc(a.shape,c,i,r,o)},filter:function(){return Ec(a,c,i.shape,r,o)}},f)}),"FusedConv2D",{convInfo:x,activation:p},E,[!0]);return y?C.as3D(C.shape[1],C.shape[2],C.shape[3]):C}}),mf=Tn({fusedDepthwiseConv2d_:function(e){var t=e.x,n=e.filter,r=e.strides,o=e.pad,i=e.dataFormat,a=void 0===i?"NHWC":i,s=e.dilations,u=void 0===s?[1,1]:s,c=e.dimRoundingMode,l=e.bias,f=e.activation,p=void 0===f?"linear":f,h=e.preluActivationWeights;if(!1===cf(it.state.gradientDepth,p)){var d=kc(t,n,r,o,a,u,c);return null!=l&&(d=_u(d,l)),pf(d,p,h)}var m=vn(t,"x","depthwiseConv2d"),g=vn(n,"filter","depthwiseConv2d"),v=m,y=!1;3===m.rank&&(y=!0,v=m.as4D(1,m.shape[0],m.shape[1],m.shape[2])),Z(4===v.rank,(function(){return"Error in fused depthwiseConv2d: input must be rank 4, but got rank "+v.rank+"."})),Z(4===g.rank,(function(){return"Error in fused depthwiseConv2d: filter must be rank 4, but got rank "+g.rank+"."})),Z(v.shape[3]===g.shape[2],(function(){return"Error in fused depthwiseConv2d: number of input channels ("+v.shape[3]+") must match the inChannels dimension in filter "+g.shape[2]+"."})),null==u&&(u=[1,1]),Z(wo(r,u),(function(){return"Error in fused depthwiseConv2d: Either strides or dilations must be 1. Got strides "+r+" and dilations '"+u+"'"})),null!=c&&Z(te(o),(function(){return"Error in fused depthwiseConv2d: pad must be an integer when using dimRoundingMode "+c+" but got pad "+o+"."}));var b,w,x=fo(v.shape,g.shape,r,u,o,c,!0);null!=l&&(b=$e(b=vn(l,"bias","fused conv2d"),m)[0],uo(x.outShape,b.shape)),null!=h&&(w=vn(h,"prelu weights","fused depthwiseConv2d"));var A={x:v,filter:g};null!=l&&(A.bias=b),null!=h&&(A.preluActivationWeights=w);var E=[g,v],C=it.runKernelFunc((function(e,t){var n=e.fusedDepthwiseConv2D({input:v,filter:g,convInfo:x,bias:b,activation:p,preluActivationWeights:w});return t([g,v,n]),n}),A,(function(e,t){Z(bo(u),(function(){return"Error in gradient of fused depthwiseConv2d: dilation rates greater than 1 are not yet supported. Got dilations '"+u+"'"}));var n=t[0],r=t[1],o=t[2],i=lf(e,o,p),a={};return null!=l&&(a={bias:function(){return ff(b,i)}}),Object.assign({x:function(){return Ic(r.shape,i,n,x)},filter:function(){return Sc(r,i,n.shape,x)}},a)}),"FusedDepthwiseConv2D",{convInfo:x,activation:p},E,[!0]);return y?C.as3D(C.shape[1],C.shape[2],C.shape[3]):C}}),gf=Object.freeze({matMul:hf,conv2d:df,depthwiseConv2d:mf}),vf=Object.freeze({image:uf,linalg:ef,losses:Zl,spectral:jl,fused:gf,signal:Ll,square:Os,squaredDifference:Bs,conv1d:wc,conv2d:xc,conv3d:Ac,depthwiseConv2d:kc,separableConv2d:jc,conv2dTranspose:Tc,conv3dTranspose:Rc,op:Tn,batchNormalization2d:wu,batchNormalization3d:xu,batchNormalization4d:Au,batchNormalization:Eu,batchNorm:Cu,batchNorm2d:ku,batchNorm3d:Iu,batchNorm4d:Su,booleanMaskAsync:function(e,t,n){return D(this,void 0,void 0,(function(){var r,o,i,a,s,u,c,l,f,p,h,d,m;return B(this,(function(g){switch(g.label){case 0:for(r=vn(e,"tensor","boolMask"),o=vn(t,"mask","boolMask","bool"),i=null==n?0:n,a=o.rank,s=r.shape,Z(a>0,(function(){return"mask cannot be scalar"})),K(s.slice(i,i+a),o.shape,"mask's shape must match the first K dimensions of tensor's shape,"),u=1,c=i;c<i+a;c++)u*=s[c];return l=s.slice(0,i).concat([u],s.slice(i+a)),f=r.reshape(l),p=o.reshape([-1]),[4,Bu(p)];case 1:return h=g.sent(),d=h.squeeze([1]),m=mc(f,d,i),e!==r&&r.dispose(),t!==o&&o.dispose(),d.dispose(),f.dispose(),p.dispose(),h.dispose(),[2,m]}}))}))},complex:Rn,real:On,imag:Dn,concat:Hn,concat1d:Gn,concat2d:Xn,concat3d:Zn,concat4d:Kn,split:Jn,matMul:Oc,dot:Dc,outerProduct:Bc,reverse:_c,reverse1d:Nc,reverse2d:Pc,reverse3d:Mc,reverse4d:Fc,maxPool:Wc,avgPool:zc,pool:qc,maxPool3d:Qc,avgPool3d:Vc,slice:Hc,slice1d:Gc,slice2d:Xc,slice3d:Zc,slice4d:Kc,abs:_s,acos:Ns,acosh:Ps,asin:Ms,asinh:Fs,atan:Ls,atanh:Us,ceil:Ws,clipByValue:zs,cos:qs,cosh:Qs,erf:Vs,exp:Hs,expm1:Gs,floor:Xs,log:Zs,log1p:Ks,logSigmoid:Js,neg:Ys,reciprocal:$s,round:eu,rsqrt:tu,sigmoid:nu,sign:ru,isNaN:ou,isInf:iu,isFinite:au,sin:su,sinh:uu,softplus:cu,sqrt:lu,step:fu,tan:pu,tanh:hu,all:Yc,any:$c,argMax:el,argMin:tl,logSumExp:nl,max:rl,mean:ol,min:il,moments:al,sum:sl,prod:ul,equal:tc,equalStrict:nc,greater:rc,greaterEqual:oc,greaterEqualStrict:ic,greaterStrict:ac,less:sc,lessEqual:uc,lessEqualStrict:cc,lessStrict:lc,notEqual:fc,notEqualStrict:pc,add:_u,addN:Nu,addStrict:Pu,atan2:Mu,div:Fu,divNoNan:Lu,divStrict:Uu,floorDiv:Wu,maximum:zu,maximumStrict:qu,minimum:Qu,minimumStrict:Vu,mod:Hu,modStrict:Gu,mul:Xu,mulStrict:Zu,pow:Ku,powStrict:Ju,squaredDifferenceStrict:Yu,sub:$u,subStrict:ec,elu:cl,leakyRelu:ll,prelu:fl,relu:pl,relu6:hl,selu:dl,logicalAnd:ju,logicalNot:Tu,logicalOr:Ru,logicalXor:Ou,where:Du,whereAsync:Bu,buffer:lr,print:function(e,t){void 0===t&&(t=!1),console.log(e.toString(t))},batchToSpaceND:fr,broadcastTo:pr,cast:hr,clone:dr,cumsum:mr,depthToSpace:gr,expandDims:vr,eye:yr,multinomial:br,oneHot:wr,pad:xr,pad1d:Ar,pad2d:Er,pad3d:Cr,pad4d:kr,rand:Ir,randomNormal:Sr,randomGamma:jr,randomUniform:Tr,reshape:Rr,spaceToBatchND:Or,squeeze:Dr,stack:Br,tile:_r,truncatedNormal:Nr,unstack:Pr,setdiff1dAsync:function(e,t){return D(this,void 0,void 0,(function(){var n,r,o,i,a,s,u,c,l,f;return B(this,(function(p){switch(p.label){case 0:return n=vn(e,"x","setdiff1d"),r=vn(t,"y","setdiff1d"),Z(n.dtype===r.dtype,(function(){return"x and y should have the same dtype, but got x ("+n.dtype+") and y ("+r.dtype+")."})),Z(1===n.rank,(function(){return"x should be 1D tensor, but got x ("+n.shape+")."})),Z(1===r.rank,(function(){return"y should be 1D tensor, but got y ("+r.shape+")."})),[4,n.data()];case 1:return o=p.sent(),[4,r.data()];case 2:for(i=p.sent(),a=new Set(i),s=0,l=0;l<o.length;l++)a.has(o[l])||s++;for(u=new Le([s],n.dtype),c=new Le([s],"int32"),l=0,f=0;l<o.length;l++)a.has(o[l])||(u.values[f]=o[l],c.values[f]=l,f++);return[2,[u.toTensor(),c.toTensor()]]}}))}))},fill:zn,linspace:function(e,t,n){if(n<=0)throw new Error("The number of values should be positive.");return it.runKernelFunc((function(r){return r.linspace(e,t,n)}),{})},ones:Un,range:qn,scalar:Nn,tensor:Bn,tensor1d:Pn,tensor2d:Mn,tensor3d:Fn,tensor4d:Ln,tensor5d:function(e,t,n){if(J(e),null!=t&&5!==t.length)throw new Error("tensor5d() requires shape to have five numbers");var r=mn(e,n);if(5!==r.length&&1!==r.length)throw new Error("tensor5d() requires values to be number[][][][][] or flat/TypedArray");if(1===r.length&&null==t)throw new Error("tensor5d() requires shape to be provided when `values` are a flat array");return _n(e,t,r,n)},tensor6d:function(e,t,n){if(J(e),null!=t&&6!==t.length)throw new Error("tensor6d() requires shape to have six numbers");var r=mn(e,n);if(6!==r.length&&1!==r.length)throw new Error("tensor6d() requires values to be number[][][][][][] or flat/TypedArray");if(1===r.length&&null==t)throw new Error("tensor6d() requires shape to be provided when `values` are a flat array");return _n(e,t=t||r,r,n)},variable:function(e,t,n,r){return void 0===t&&(t=!0),it.makeVariable(e,t,n,r)},zeros:Wn,onesLike:Qn,zerosLike:Vn,transpose:ml,softmax:to,logSoftmax:no,localResponseNormalization:gl,norm:vl,gather:mc,unsortedSegmentSum:gc,basicLSTMCell:yl,multiRNNCell:bl,movingAverage:wl,stridedSlice:xl,topk:Al,scatterND:El,fft:Cl,ifft:kl,rfft:Il,irfft:Sl,sparseToDense:Tl,gatherND:Rl,diag:Ol,dropout:Dl,hannWindow:Nl,hammingWindow:Pl,frame:Ml,stft:Fl,inTopKAsync:function(e,t,n){return void 0===n&&(n=1),D(this,void 0,void 0,(function(){var r,o,i,a,s,u,c,l,f,p,h,d,m,g;return B(this,(function(v){switch(v.label){case 0:return r=vn(e,"predictions","inTopK"),o=vn(t,"targets","inTopK"),Z(r.rank>1,(function(){return"inTopK() expects the predictions to be of rank 2 or higher, but got "+r.rank})),Z(r.rank-1===o.rank,(function(){return"predictions rank should be 1 larger than targets rank, but got predictions rank "+r.rank+" and targets rank "+o.rank})),K(r.shape.slice(0,r.shape.length-1),o.shape,"predictions's shape should be align with the targets' shape, except the last dimension."),i=r.shape[r.shape.length-1],Z(n>0&&n<=i,(function(){return"'k' passed to inTopK() must be > 0 && <= the predictions last dimension ("+i+"), but got "+n})),[4,r.data()];case 1:return a=v.sent(),[4,o.data()];case 2:for(s=v.sent(),u=[a.length/i,i],l=u[1],f=ce("bool",c=u[0]),p=0;p<c;p++){for(h=p*l,d=a.subarray(h,h+l),m=[],g=0;g<d.length;g++)m.push({value:d[g],index:g});for(m.sort((function(e,t){return t.value-e.value})),f[p]=0,g=0;g<n;g++)if(m[g].index===s[p]){f[p]=1;break}}return e!==r&&r.dispose(),t!==o&&o.dispose(),[2,Bn(f,o.shape,"bool")]}}))}))}});function yf(e,t){Array.isArray(e)||(e=[e]),e.forEach((function(e){null!=e&&Z("complex64"!==e.dtype,(function(){return t+" does not support complex64 tensors."}))}))}function bf(e,t,n,r){if("linear"===n)return e.linear(t);if("relu"===n)return e.relu(t);if("elu"===n)return e.elu(t);if("relu6"===n)return e.relu6(t);if("prelu"===n)return e.prelu(t,r);throw new Error("Activation "+n+" has not been implemented for the CPU backend.")}var wf=function(e){function t(){var t=e.call(this)||this;return t.blockSize=48,t.firstUse=!0,t.data=new ro(t,it),t}return O(t,e),t.prototype.write=function(e,t,n){this.firstUse&&(this.firstUse=!1,P().get("IS_NODE")&&dn("\n============================\nHi there 👋. 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.\n============================"));var r={};return this.data.set(r,{values:e,dtype:n}),r},t.prototype.move=function(e,t,n,r){this.data.set(e,{values:t,dtype:r})},t.prototype.numDataIds=function(){return this.data.numDataIds()},t.prototype.read=function(e){return D(this,void 0,void 0,(function(){return B(this,(function(t){return[2,this.readSync(e)]}))}))},t.prototype.readSync=function(e){var t=this.data.get(e),n=t.dtype,r=t.complexTensors;return"complex64"===n?ko(this.readSync(r.real.dataId),this.readSync(r.imag.dataId)):this.data.get(e).values},t.prototype.bufferSync=function(e){var t=this.readSync(e.dataId),n=t;if("string"===e.dtype)try{n=t.map((function(e){return Oe(e)}))}catch(e){throw new Error("Failed to decode encoded string bytes into utf-8")}return lr(e.shape,e.dtype,n)},t.prototype.makeOutput=function(e,t,n){var r=this.write(e,t,n);return it.makeTensorFromDataId(r,t,n,this)},t.prototype.disposeData=function(e){if(this.data.has(e)){var t=this.data.get(e).complexTensors;null!=t&&(t.real.dispose(),t.imag.dispose()),this.data.delete(e)}},t.prototype.time=function(e){return D(this,void 0,void 0,(function(){var t;return B(this,(function(n){return t=je(),e(),[2,{kernelMs:je()-t}]}))}))},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,t){var n=this.makeOutput(null,e.shape,"complex64");return this.data.get(n.dataId).complexTensors={real:it.keep(e.clone()),imag:it.keep(t.clone())},n},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,t,n){if(yf(e,"slice"),Yr(e.shape,t,n)){var r=$r(t,e.strides),o=$(n);return Bn(this.readSync(e.dataId).subarray(r,r+o),n,e.dtype)}for(var i=lr(n,e.dtype),a=this.bufferSync(e),s=0;s<i.size;++s){var u=i.indexToLoc(s).map((function(e,n){return e+t[n]}));i.values[s]=a.get.apply(a,u)}return i.toTensor()},t.prototype.stridedSlice=function(e,t,n,r){yf(e,"stridedSlice");var o=Zr(t,n,r);if(o.some((function(e){return 0===e})))return Bn([],o);for(var i=lr(o,e.dtype),a=this.bufferSync(e),s=0;s<i.size;s++){for(var u=i.indexToLoc(s),c=new Array(u.length),l=0;l<c.length;l++)c[l]=u[l]*r[l]+t[l];i.set.apply(i,[a.get.apply(a,c)].concat(u))}return i.toTensor()},t.prototype.diag=function(e){for(var t=this.readSync(e.dataId),n=lr([e.size,e.size],e.dtype),r=n.values,o=0;o<t.length;o++)r[o*e.size+o]=t[o];return n.toTensor()},t.prototype.unstack=function(e,t){for(var n=e.shape[t],r=new Array(e.rank-1),o=0,i=0;i<e.rank;i++)i!==t&&(r[o++]=e.shape[i]);var a=new Array(e.rank).fill(0),s=e.shape.slice();s[t]=1;var u=new Array(n);for(i=0;i<u.length;i++)a[t]=i,u[i]=this.slice(e,a,s).reshape(r);return u},t.prototype.reverse=function(e,t){yf(e,"reverse");for(var n=lr(e.shape,e.dtype),r=this.bufferSync(e),o=function(o){var i=n.indexToLoc(o),a=i.slice();t.forEach((function(t){return a[t]=e.shape[t]-1-a[t]})),n.set.apply(n,[r.get.apply(r,a)].concat(i))},i=0;i<n.size;i++)o(i);return n.toTensor()},t.prototype.concat=function(e,t){var n=this;if("complex64"===e[0].dtype){var r=e.map((function(e){return On(e)})),o=e.map((function(e){return Dn(e)}));return Rn(this.concat(r,t),this.concat(o,t))}var i=e.map((function(e){var n=$(e.shape.slice(t));return e.as2D(-1,n)})),a=jn(i.map((function(e){return e.shape})),1),s=lr(a,e[0].dtype).values;if(1===i[0].shape[0]){var u=0;i.forEach((function(e){s.set(n.readSync(e.dataId),u),u+=e.size}))}else{var c=0;i.forEach((function(e){for(var t=n.readSync(e.dataId),r=0,o=0;o<e.shape[0];++o)for(var i=o*a[1]+c,u=0;u<e.shape[1];++u)s[i+u]=t[r++];c+=e.shape[1]}))}var l=jn(e.map((function(e){return e.shape})),t);return Bn(s,l,e[0].dtype)},t.prototype.neg=function(e){return yf(e,"neg"),this.multiply(Nn(-1),e)},t.prototype.add=function(e,t){return"complex64"===e.dtype||"complex64"===t.dtype?this.broadcastedBinaryComplexOp(e.cast("complex64"),t.cast("complex64"),(function(e,t,n,r){return{real:e+n,imag:t+r}})):this.broadcastedBinaryOp(e,t,Je(e.dtype,t.dtype),(function(e,t){return e+t}))},t.prototype.addN=function(e){var t=this;yf(e,"addN");for(var n=e.map((function(e){return t.readSync(e.dataId)})),r=lr(e[0].shape,e[0].dtype),o=r.values,i=0;i<e.length;i++)for(var a=n[i],s=0;s<o.length;s++)o[s]+=a[s];return r.toTensor()},t.prototype.softmax=function(e,t){var n=se([t],e.shape),r=this.max(e,n),o=An(r.shape,n),i=this.subtract(e,r.reshape(o)),a=this.exp(i),s=this.sum(a,n).reshape(o);return this.realDivide(a,s)},t.prototype.subtract=function(e,t){return"complex64"===e.dtype||"complex64"===t.dtype?this.broadcastedBinaryComplexOp(e.cast("complex64"),t.cast("complex64"),(function(e,t,n,r){return{real:e-n,imag:t-r}})):this.broadcastedBinaryOp(e,t,Je(e.dtype,t.dtype),(function(e,t){return e-t}))},t.prototype.pow=function(e,t){return yf([e,t],"pow"),this.broadcastedBinaryOp(e,t,e.dtype,(function(e,t){return Math.pow(e,t)}))},t.prototype.batchMatMul=function(e,t,n,r){yf([e,t],"matMul");for(var o=n?e.shape[1]:e.shape[2],i=n?e.shape[2]:e.shape[1],a=r?t.shape[1]:t.shape[2],s=e.shape[0],u=this.readSync(e.dataId),c=this.readSync(t.dataId),l=n?[e.strides[0],1,e.strides[1]]:[e.strides[0],e.strides[1],1],f=l[0],p=l[1],h=l[2],d=r?[1,t.strides[1],t.strides[0]]:[t.strides[1],1,t.strides[0]],m=d[0],g=d[1],v=d[2],y=i*a,b=lr([s,i,a],e.dtype),w=b.values,x=this.blockSize,A=0;A<s;A++)for(var E=0;E<i;E+=x)for(var C=0;C<a;C+=x)for(var k=0;k<o;k+=x)for(var I=Math.min(E+x,i),S=Math.min(C+x,a),j=Math.min(k+x,o),T=E;T<I;T++)for(var R=C;R<S;R++){for(var O=0,D=k;D<j;D++)O+=u[A*f+T*p+D*h]*c[D*m+R*g+A*v];w[A*y+(T*a+R)]+=O}return b.toTensor()},t.prototype.fusedBatchMatMul=function(e){var t=e.a,n=e.b,r=e.transposeA,o=e.transposeB,i=e.bias,a=e.activation,s=e.preluActivationWeights,u=this.batchMatMul(t,n,r,o);return i&&(u=this.add(u,i)),a&&(u=bf(this,u,a,s)),u},t.prototype.multiply=function(e,t){return"complex64"===e.dtype||"complex64"===t.dtype?this.broadcastedBinaryComplexOp(e.cast("complex64"),t.cast("complex64"),(function(e,t,n,r){return{real:e*n-t*r,imag:e*r+t*n}})):this.broadcastedBinaryOp(e,t,Je(e.dtype,t.dtype),(function(e,t){return e*t}))},t.prototype.realDivide=function(e,t){return yf([e,t],"realDivide"),this.broadcastedBinaryOp(e,t,"float32",(function(e,t){return e/t}))},t.prototype.floorDiv=function(e,t){return yf([e,t],"floorDiv"),this.broadcastedBinaryOp(e,t,"int32",(function(e,t){return Math.floor(e/t)}))},t.prototype.sum=function(e,t){yf(e,"sum"),En("sum",t,e.rank);for(var n=xn(e.shape,t),r=n[0],o=n[1],i=Wn(r,Je(e.dtype,"int32")),a=$(o),s=this.readSync(i.dataId),u=this.readSync(e.dataId),c=0;c<s.length;++c){for(var l=c*a,f=0,p=0;p<a;++p)f+=u[l+p];s[c]=f}return i},t.prototype.prod=function(e,t){yf(e,"sum");for(var n=xn(e.shape,t),r=n[0],o=n[1],i=Wn(r,Je(e.dtype,"int32")),a=$(o),s=this.readSync(i.dataId),u=this.readSync(e.dataId),c=0;c<s.length;++c){for(var l=c*a,f=1,p=0;p<a;++p)f*=u[l+p];s[c]=f}return i},t.prototype.unsortedSegmentSum=function(e,t,n){yf(e,"unsortedSegmentSum");for(var r=[],o=e.rank-t.rank,i=0;i<o;++i)t=t.expandDims(i+1);for(i=0;i<n;++i){var a=Nn(i,"int32"),s=tc(a,t).asType("float32").mul(e).sum(0);r.push(s)}return Br(r)},t.prototype.argMin=function(e,t){yf(e,"argMin");var n=[t];En("argMin",n,e.rank);for(var r=xn(e.shape,n),o=r[0],i=r[1],a=Wn(o,"int32"),s=$(i),u=this.readSync(a.dataId),c=this.readSync(e.dataId),l=0;l<u.length;++l){for(var f=l*s,p=c[f],h=0,d=0;d<s;++d){var m=c[f+d];m<p&&(p=m,h=d)}u[l]=h}return a},t.prototype.argMax=function(e,t){yf(e,"argMax");var n=[t];En("argMax",n,e.rank);for(var r=xn(e.shape,n),o=r[0],i=r[1],a=Wn(o,"int32"),s=$(i),u=this.readSync(a.dataId),c=this.readSync(e.dataId),l=0;l<u.length;++l){for(var f=l*s,p=c[f],h=0,d=0;d<s;++d){var m=c[f+d];m>p&&(p=m,h=d)}u[l]=h}return a},t.prototype.cumsum=function(e,t,n,r){if(yf(e,"cumsum"),t!==e.rank-1)throw new Error("backend.cumsum in CPU expects an inner-most axis="+(e.rank-1)+" but got axis="+t);for(var o=Je(e.dtype,"int32"),i=Wn(e.shape,o),a=this.readSync(i.dataId),s=this.readSync(e.dataId),u=e.shape[e.rank-1],c=r?function(e,t){return e+u-t-1}:function(e,t){return e+t},l=0;l<s.length;l+=u)for(var f=0;f<u;f++){var p=c(l,f);if(0===f)a[p]=n?0:s[p];else{var h=c(l,f-1);a[p]=n?s[h]+a[h]:s[p]+a[h]}}return i},t.prototype.equal=function(e,t){return yf([e,t],"equal"),this.broadcastedBinaryOp(e,t,"bool",(function(e,t){return e===t?1:0}))},t.prototype.notEqual=function(e,t){return yf([e,t],"notEqual"),this.broadcastedBinaryOp(e,t,"bool",(function(e,t){return e!==t?1:0}))},t.prototype.less=function(e,t){return yf([e,t],"less"),this.broadcastedBinaryOp(e,t,"bool",(function(e,t){return e<t?1:0}))},t.prototype.lessEqual=function(e,t){return yf([e,t],"lessEqual"),this.broadcastedBinaryOp(e,t,"bool",(function(e,t){return e<=t?1:0}))},t.prototype.greater=function(e,t){return yf([e,t],"greater"),this.broadcastedBinaryOp(e,t,"bool",(function(e,t){return e>t?1:0}))},t.prototype.greaterEqual=function(e,t){return yf([e,t],"greaterEqual"),this.broadcastedBinaryOp(e,t,"bool",(function(e,t){return e>=t?1:0}))},t.prototype.logicalNot=function(e){yf(e,"logicalNot");for(var t=this.readSync(e.dataId),n=new Uint8Array(t.length),r=0;r<t.length;++r)n[r]=t[r]?0:1;return this.makeOutput(n,e.shape,"bool")},t.prototype.logicalAnd=function(e,t){return yf([e,t],"logicalAnd"),this.broadcastedBinaryOp(e,t,"bool",(function(e,t){return e&&t}))},t.prototype.logicalOr=function(e,t){return yf([e,t],"logicalOr"),this.broadcastedBinaryOp(e,t,"bool",(function(e,t){return e||t}))},t.prototype.select=function(e,t,n){yf([e,t,n],"select");for(var r=this.readSync(e.dataId),o=this.readSync(t.dataId),i=this.readSync(n.dataId),a=Wn(t.shape,Je(t.dtype,n.dtype)),s=this.readSync(a.dataId),u=0,c=0===e.rank||e.rank>1||1===t.rank?1:$(t.shape.slice(1)),l=0;l<r.length;l++)for(var f=0;f<c;f++)1===r[l]?s[u++]=o[l]:s[u++]=i[l];return a},t.prototype.where=function(e){yf([e],"where");var t=this.readSync(e.dataId);return Uo(e.shape,t)},t.prototype.topk=function(e,t,n){return yf(e,"topk"),Lo(this.readSync(e.dataId),e.shape,e.dtype,t)},t.prototype.min=function(e,t){yf(e,"min"),En("min",t,e.rank);for(var n=xn(e.shape,t),r=n[0],o=n[1],i=Wn(r,e.dtype),a=$(o),s=this.readSync(i.dataId),u=this.readSync(e.dataId),c=0;c<s.length;++c){for(var l=c*a,f=u[l],p=0;p<a;++p){var h=u[l+p];h<f&&(f=h)}s[c]=f}return i},t.prototype.minimum=function(e,t){return yf([e,t],"minimum"),this.broadcastedBinaryOp(e,t,e.dtype,(function(e,t){return Math.min(e,t)}))},t.prototype.mod=function(e,t){return yf([e,t],"mod"),this.broadcastedBinaryOp(e,t,e.dtype,(function(e,t){var n=e%t;return e<0&&t<0||e>=0&&t>=0?n:(n+t)%t}))},t.prototype.max=function(e,t){yf(e,"max"),En("max",t,e.rank);for(var n=xn(e.shape,t),r=n[0],o=n[1],i=Wn(r,e.dtype),a=$(o),s=this.readSync(i.dataId),u=this.readSync(e.dataId),c=0;c<s.length;++c){for(var l=c*a,f=u[l],p=0;p<a;++p){var h=u[l+p];h>f&&(f=h)}s[c]=f}return i},t.prototype.maximum=function(e,t){return yf([e,t],"maximum"),this.broadcastedBinaryOp(e,t,e.dtype,(function(e,t){return Math.max(e,t)}))},t.prototype.all=function(e,t){yf(e,"all"),En("all",t,e.rank);for(var n=xn(e.shape,t),r=n[0],o=n[1],i=Wn(r,e.dtype),a=$(o),s=this.readSync(i.dataId),u=this.readSync(e.dataId),c=0;c<s.length;++c){for(var l=c*a,f=u[l],p=0;p<a;++p){var h=u[l+p];f=f&&h}s[c]=f}return i},t.prototype.any=function(e,t){yf(e,"any"),En("any",t,e.rank);for(var n=xn(e.shape,t),r=n[0],o=n[1],i=Wn(r,e.dtype),a=$(o),s=this.readSync(i.dataId),u=this.readSync(e.dataId),c=0;c<s.length;++c){for(var l=c*a,f=u[l],p=0;p<a;++p){var h=u[l+p];f=f||h}s[c]=f}return i},t.prototype.squaredDifference=function(e,t){return yf([e,t],"squaredDifference"),this.broadcastedBinaryOp(e,t,e.dtype,(function(e,t){var n=e-t;return n*n}))},t.prototype.ceil=function(e){yf(e,"ceil");for(var t=this.readSync(e.dataId),n=new Float32Array(t.length),r=0;r<t.length;++r)n[r]=Math.ceil(t[r]);return this.makeOutput(n,e.shape,"float32")},t.prototype.floor=function(e){yf(e,"floor");for(var t=this.readSync(e.dataId),n=new Float32Array(t.length),r=0;r<t.length;++r)n[r]=Math.floor(t[r]);return this.makeOutput(n,e.shape,"float32")},t.prototype.sign=function(e){yf(e,"x");for(var t=this.readSync(e.dataId),n=new Float32Array(t.length),r=0;r<t.length;++r)t[r]<0?n[r]=-1:t[r]>0?n[r]=1:n[r]=0;return this.makeOutput(n,e.shape,"float32")},t.prototype.isNaN=function(e){yf(e,"x");for(var t=this.readSync(e.dataId),n=new Uint8Array(t.length),r=0;r<t.length;++r)Number.isNaN(t[r])&&(n[r]=1);return this.makeOutput(n,e.shape,"bool")},t.prototype.isInf=function(e){yf(e,"x");for(var t=this.readSync(e.dataId),n=new Uint8Array(t.length),r=0;r<t.length;++r)Math.abs(t[r])===1/0&&(n[r]=1);return this.makeOutput(n,e.shape,"bool")},t.prototype.isFinite=function(e){yf(e,"x");for(var t=this.readSync(e.dataId),n=new Uint8Array(t.length),r=0;r<t.length;++r)Number.isFinite(t[r])&&(n[r]=1);return this.makeOutput(n,e.shape,"bool")},t.prototype.round=function(e){yf(e,"round");for(var t=this.readSync(e.dataId),n=new Float32Array(t.length),r=0;r<t.length;++r){var o=Math.floor(t[r]);t[r]-o<.5?n[r]=Math.floor(t[r]):t[r]-o>.5?n[r]=Math.ceil(t[r]):n[r]=o%2==0?o:o+1}return this.makeOutput(n,e.shape,"float32")},t.prototype.exp=function(e){yf(e,"exp");for(var t=this.readSync(e.dataId),n=new Float32Array(t.length),r=0;r<t.length;++r)n[r]=Math.exp(t[r]);return this.makeOutput(n,e.shape,"float32")},t.prototype.expm1=function(e){yf(e,"expm1");for(var t=this.readSync(e.dataId),n=new Float32Array(t.length),r=0;r<t.length;++r)n[r]=Math.expm1(t[r]);return this.makeOutput(n,e.shape,"float32")},t.prototype.log=function(e){yf(e,"log");for(var t=this.readSync(e.dataId),n=new Float32Array(t.length),r=0;r<t.length;++r){var o=t[r];n[r]=Math.log(o)}return this.makeOutput(n,e.shape,"float32")},t.prototype.log1p=function(e){yf(e,"log1p");for(var t=this.readSync(e.dataId),n=new Float32Array(t.length),r=0;r<t.length;++r){var o=t[r];n[r]=Math.log1p(o)}return this.makeOutput(n,e.shape,"float32")},t.prototype.sqrt=function(e){yf(e,"sqrt");for(var t=this.readSync(e.dataId),n=new Float32Array(t.length),r=0;r<t.length;++r){var o=t[r];n[r]=Math.sqrt(o)}return this.makeOutput(n,e.shape,"float32")},t.prototype.rsqrt=function(e){yf(e,"rsqrt");for(var t=this.readSync(e.dataId),n=new Float32Array(t.length),r=0;r<t.length;++r){var o=t[r];n[r]=1/Math.sqrt(o)}return this.makeOutput(n,e.shape,"float32")},t.prototype.reciprocal=function(e){yf(e,"reciprocal");for(var t=this.readSync(e.dataId),n=new Float32Array(t.length),r=0;r<t.length;++r)n[r]=1/t[r];return this.makeOutput(n,e.shape,"float32")},t.prototype.linear=function(e){return e},t.prototype.relu=function(e){yf(e,"relu");for(var t=Wn(e.shape,e.dtype),n=this.readSync(t.dataId),r=this.readSync(e.dataId),o=0;o<r.length;++o)n[o]=Math.max(0,r[o]);return t},t.prototype.relu6=function(e){yf(e,"relu");for(var t=Wn(e.shape,e.dtype),n=this.readSync(t.dataId),r=this.readSync(e.dataId),o=0;o<r.length;++o)n[o]=Math.min(Math.max(0,r[o]),6);return t},t.prototype.prelu=function(e,t){return yf([e,t],"prelu"),this.broadcastedBinaryOp(e,t,e.dtype,(function(e,t){return e<0?t*e:e}))},t.prototype.elu=function(e){yf(e,"elu");for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r){var o=n[r];t[r]=o>=0?o:Math.exp(o)-1}return this.makeOutput(t,e.shape,"float32")},t.prototype.eluDer=function(e,t){yf([e,t],"eluDer");for(var n=new Float32Array(t.size),r=this.readSync(t.dataId),o=this.readSync(e.dataId),i=0;i<r.length;++i){var a=r[i];n[i]=a>=1?o[i]:o[i]*(a+1)}return this.makeOutput(n,t.shape,"float32")},t.prototype.selu=function(e){yf(e,"selu");for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r){var o=n[r];t[r]=o>=0?1.0507009873554805*o:1.7580993408473768*(Math.exp(o)-1)}return this.makeOutput(t,e.shape,"float32")},t.prototype.clip=function(e,t,n){yf(e,"clip");for(var r=new Float32Array(e.size),o=this.readSync(e.dataId),i=0;i<o.length;++i){var a=o[i];r[i]=a>n?n:a<t?t:a}return this.makeOutput(r,e.shape,"float32")},t.prototype.abs=function(e){for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r)t[r]=Math.abs(n[r]);return this.makeOutput(t,e.shape,"float32")},t.prototype.complexAbs=function(e){for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<e.size;++r){var o=n[2*r],i=n[2*r+1];t[r]=Math.hypot(o,i)}return this.makeOutput(t,e.shape,"float32")},t.prototype.int=function(e){yf(e,"int");for(var t=new Int32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r)t[r]=n[r];return this.makeOutput(t,e.shape,"int32")},t.prototype.sigmoid=function(e){yf(e,"sigmoid");for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r)t[r]=1/(1+Math.exp(-n[r]));return this.makeOutput(t,e.shape,"float32")},t.prototype.softplus=function(e){yf(e,"softplus");for(var t=Math.log(1.1920928955078125e-7)+2,n=new Float32Array(e.size),r=this.readSync(e.dataId),o=0;o<r.length;++o){var i,a=r[o]>-t,s=r[o]<t,u=Math.exp(r[o]);i=s?u:a?r[o]:Math.log(1+u),n[o]=i}return this.makeOutput(n,e.shape,"float32")},t.prototype.sin=function(e){yf(e,"sin");for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r)t[r]=Math.sin(n[r]);return this.makeOutput(t,e.shape,"float32")},t.prototype.cos=function(e){yf(e,"cos");for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r)t[r]=Math.cos(n[r]);return this.makeOutput(t,e.shape,"float32")},t.prototype.tan=function(e){yf(e,"tan");for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r)t[r]=Math.tan(n[r]);return this.makeOutput(t,e.shape,"float32")},t.prototype.asin=function(e){yf(e,"asin");for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r)t[r]=Math.asin(n[r]);return this.makeOutput(t,e.shape,"float32")},t.prototype.acos=function(e){yf(e,"acos");for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r)t[r]=Math.acos(n[r]);return this.makeOutput(t,e.shape,"float32")},t.prototype.atan=function(e){yf(e,"atan");for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r)t[r]=Math.atan(n[r]);return this.makeOutput(t,e.shape,"float32")},t.prototype.atan2=function(e,t){return yf([e,t],"atan2"),this.broadcastedBinaryOp(e,t,e.dtype,(function(e,t){return Math.atan2(e,t)}))},t.prototype.sinh=function(e){yf(e,"sinh");for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r)t[r]=Math.sinh(n[r]);return this.makeOutput(t,e.shape,"float32")},t.prototype.cosh=function(e){yf(e,"cosh");for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r)t[r]=Math.cosh(n[r]);return this.makeOutput(t,e.shape,"float32")},t.prototype.tanh=function(e){yf(e,"tanh");for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r)t[r]=ne(n[r]);return this.makeOutput(t,e.shape,"float32")},t.prototype.asinh=function(e){yf(e,"asinh");for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r)t[r]=Math.asinh(n[r]);return this.makeOutput(t,e.shape,"float32")},t.prototype.acosh=function(e){yf(e,"acosh");for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r)t[r]=Math.acosh(n[r]);return this.makeOutput(t,e.shape,"float32")},t.prototype.atanh=function(e){yf(e,"atanh");for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r)t[r]=Math.atanh(n[r]);return this.makeOutput(t,e.shape,"float32")},t.prototype.erf=function(e){yf(e,"erf");for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r){var o=Math.sign(n[r]),i=Math.abs(n[r]),a=1/(1+.3275911*i);t[r]=o*(1-((((1.061405429*a-1.453152027)*a+1.421413741)*a-.284496736)*a+.254829592)*a*Math.exp(-i*i))}return this.makeOutput(t,e.shape,"float32")},t.prototype.step=function(e,t){void 0===t&&(t=0),yf(e,"step");for(var n=new Float32Array(e.size),r=this.readSync(e.dataId),o=0;o<r.length;++o){var i=r[o];isNaN(i)?n[o]=NaN:n[o]=i>0?1:t}return this.makeOutput(n,e.shape,"float32")},t.prototype.fusedConv2d=function(e){var t=e.input,n=e.filter,r=e.convInfo,o=e.bias,i=e.activation,a=e.preluActivationWeights,s=this.conv2d(t,n,r);return o&&(s=this.add(s,o)),i&&(s=bf(this,s,i,a)),s},t.prototype.conv2d=function(e,t,n){yf([e,t],"conv2d");for(var r=n.filterHeight,o=n.filterWidth,i=n.dilationHeight,a=n.dilationWidth,s=n.padInfo.left,u=n.padInfo.top,c="channelsLast"===n.dataFormat,l=lr(n.outShape,e.dtype),f=e.strides[0],p=c?e.strides[1]:e.strides[2],h=c?e.strides[2]:1,d=c?1:e.strides[1],m=l.strides[0],g=c?l.strides[1]:l.strides[2],v=c?l.strides[2]:1,y=c?1:l.strides[1],b=this.readSync(e.dataId),w=this.readSync(t.dataId),x=l.values,A=0;A<n.batchSize;++A)for(var E=A*f,C=A*m,k=0;k<n.outHeight;++k)for(var I=C+k*g,S=k*n.strideHeight-u,j=0;j<r;j++){var T=S+j*i;if(!(T<0||T>=n.inHeight))for(var R=j*t.strides[0],O=E+T*p,D=0;D<n.outWidth;++D)for(var B=I+D*v,_=D*n.strideWidth-s,N=0;N<o;N++){var P=_+N*a;if(!(P<0||P>=n.inWidth))for(var M=O+P*h,F=R+N*t.strides[1],L=0;L<n.inChannels;++L){for(var U=b[M+L*d],W=0;W<n.outChannels;++W)x[B+W*y]+=U*w[F+W];F+=n.outChannels}}}return l.toTensor()},t.prototype.conv3d=function(e,t,n){for(var r=n.filterDepth,o=n.filterHeight,i=n.filterWidth,a=n.dilationDepth,s=n.dilationHeight,u=n.dilationWidth,c=n.padInfo.front,l=n.padInfo.left,f=n.padInfo.top,p=lr(n.outShape,e.dtype),h=this.readSync(e.dataId),d=this.readSync(t.dataId),m=p.values,g=0;g<n.batchSize;++g)for(var v=g*e.strides[0],y=g*p.strides[0],b=0;b<n.outDepth;++b)for(var w=y+b*p.strides[1],x=b*n.strideDepth-c,A=0;A<r;A++){var E=x+A*a;if(!(E<0||E>=n.inDepth))for(var C=A*t.strides[0],k=v+E*e.strides[1],I=0;I<n.outHeight;++I)for(var S=w+I*p.strides[2],j=I*n.strideHeight-f,T=0;T<o;T++){var R=j+T*s;if(!(R<0||R>=n.inHeight))for(var O=C+T*t.strides[1],D=k+R*e.strides[2],B=0;B<n.outWidth;++B)for(var _=S+B*n.outChannels,N=B*n.strideWidth-l,P=0;P<i;P++){var M=N+P*u;if(!(M<0||M>=n.inWidth))for(var F=O+P*t.strides[2],L=D+M*n.inChannels,U=F,W=0;W<n.inChannels;++W){for(var z=h[L+W],q=0;q<n.outChannels;++q)m[_+q]+=z*d[U+q];U+=n.outChannels}}}}return p.toTensor()},t.prototype.conv2dDerInput=function(e,t,n){yf([e,t],"conv2dDerInput");for(var r=lr(n.inShape,"float32"),o=r.values,i=this.readSync(e.dataId),a=this.readSync(t.dataId),s=t.strides,u=s[0],c=s[1],l=s[2],f=n.batchSize,p=n.filterHeight,h=n.filterWidth,d=n.inChannels,m=n.inHeight,g=n.inWidth,v=n.outChannels,y=n.outHeight,b=n.outWidth,w=n.strideHeight,x=n.strideWidth,A=n.dataFormat,E=p-1-n.padInfo.top,C=h-1-n.padInfo.left,k="channelsLast"===A,I=r.strides[0],S=k?r.strides[1]:r.strides[2],j=k?r.strides[2]:1,T=k?1:r.strides[1],R=e.strides[0],O=k?e.strides[1]:e.strides[2],D=k?e.strides[2]:1,B=k?1:e.strides[1],_=0;_<f;++_)for(var N=0;N<d;++N)for(var P=0;P<m;++P)for(var M=P-E,F=Math.max(0,Math.ceil(M/w)),L=Math.min(y,(p+M)/w),U=0;U<g;++U){for(var W=U-C,z=Math.max(0,Math.ceil(W/x)),q=Math.min(b,(h+W)/x),Q=0,V=F;V<L;++V)for(var H=V*w-M,G=z;G<q;++G)for(var X=R*_+O*V+D*G,Z=u*(p-1-H)+c*(h-1-(G*x-W))+l*N,K=0;K<v;++K)Q+=i[X+B*K]*a[Z+K];o[I*_+S*P+j*U+T*N]=Q}return r.toTensor()},t.prototype.conv3dDerInput=function(e,t,n){for(var r=lr(n.inShape,"float32"),o=r.values,i=r.strides,a=i[0],s=i[1],u=i[2],c=i[3],l=this.readSync(e.dataId),f=e.strides,p=f[0],h=f[1],d=f[2],m=f[3],g=this.readSync(t.dataId),v=t.strides,y=v[0],b=v[1],w=v[2],x=v[3],A=n.batchSize,E=n.filterDepth,C=n.filterHeight,k=n.filterWidth,I=n.inChannels,S=n.inDepth,j=n.inHeight,T=n.inWidth,R=n.outChannels,O=n.outDepth,D=n.outHeight,B=n.outWidth,_=n.strideDepth,N=n.strideHeight,P=n.strideWidth,M=E-1-n.padInfo.front,F=C-1-n.padInfo.top,L=k-1-n.padInfo.left,U=0;U<A;++U)for(var W=0;W<I;++W)for(var z=0;z<S;++z)for(var q=z-M,Q=Math.max(0,Math.ceil(q/_)),V=Math.min(O,(E+q)/_),H=0;H<j;++H)for(var G=H-F,X=Math.max(0,Math.ceil(G/N)),Z=Math.min(D,(C+G)/N),K=0;K<T;++K){for(var J=K-L,Y=Math.max(0,Math.ceil(J/P)),$=Math.min(B,(k+J)/P),ee=0,te=Q;te<V;++te)for(var ne=te*_-q,re=X;re<Z;++re)for(var oe=re*N-G,ie=Y;ie<$;++ie)for(var ae=p*U+h*te+d*re+m*ie,se=y*(E-1-ne)+b*(C-1-oe)+w*(k-1-(ie*P-J))+x*W,ue=0;ue<R;++ue)ee+=l[ae+ue]*g[se+ue];o[a*U+s*z+u*H+c*K+W]=ee}return r.toTensor()},t.prototype.conv2dDerFilter=function(e,t,n){yf([e,t],"conv2dDerFilter");for(var r=n.strideHeight,o=n.strideWidth,i=n.filterHeight,a=n.filterWidth,s="channelsLast"===n.dataFormat,u=lr(n.filterShape,"float32"),c=n.padInfo.left,l=n.padInfo.top,f=this.bufferSync(e),p=this.bufferSync(t),h=0;h<i;++h)for(var d=Math.max(0,Math.ceil((l-h)/r)),m=Math.min(n.outHeight,(n.inHeight+l-h)/r),g=0;g<a;++g)for(var v=Math.max(0,Math.ceil((c-g)/o)),y=Math.min(n.outWidth,(n.inWidth+c-g)/o),b=0;b<n.inChannels;++b)for(var w=0;w<n.outChannels;++w){for(var x=0,A=0;A<n.batchSize;++A)for(var E=d;E<m;++E)for(var C=h+E*r-l,k=v;k<y;++k){var I=g+k*o-c;x+=s?f.get(A,C,I,b)*p.get(A,E,k,w):f.get(A,b,C,I)*p.get(A,w,E,k)}u.set(x,h,g,b,w)}return u.toTensor()},t.prototype.conv3dDerFilter=function(e,t,n){for(var r=n.strideDepth,o=n.strideHeight,i=n.strideWidth,a=n.filterDepth,s=n.filterHeight,u=n.filterWidth,c=lr(n.filterShape,"float32"),l=c.values,f=c.strides,p=f[0],h=f[1],d=f[2],m=f[3],g=this.readSync(t.dataId),v=t.strides,y=v[0],b=v[1],w=v[2],x=v[3],A=this.readSync(e.dataId),E=e.strides,C=E[0],k=E[1],I=E[2],S=E[3],j=n.padInfo.front,T=n.padInfo.left,R=n.padInfo.top,O=0;O<a;++O)for(var D=Math.max(0,Math.ceil((j-O)/r)),B=Math.min(n.outDepth,(n.inDepth+j-O)/r),_=O*p,N=0;N<s;++N)for(var P=Math.max(0,Math.ceil((R-N)/o)),M=Math.min(n.outHeight,(n.inHeight+R-N)/o),F=N*h+_,L=0;L<u;++L)for(var U=Math.max(0,Math.ceil((T-L)/i)),W=Math.min(n.outWidth,(n.inWidth+T-L)/i),z=L*d+F,q=0;q<n.inChannels;++q)for(var Q=q*m+z,V=0;V<n.outChannels;++V){for(var H=0,G=0;G<n.batchSize;++G)for(var X=G*C,Z=G*y,K=D;K<B;++K)for(var J=(O+K*r-j)*k+X,Y=K*b+Z,$=P;$<M;++$)for(var ee=(N+$*o-R)*I+J,te=$*w+Y,ne=U;ne<W;++ne){var re=ne*x+te;H+=A[(L+ne*i-T)*S+ee+q]*g[re+V]}l[Q+V]=H}return c.toTensor()},t.prototype.fusedDepthwiseConv2D=function(e){var t=e.input,n=e.filter,r=e.convInfo,o=e.bias,i=e.activation,a=e.preluActivationWeights,s=this.depthwiseConv2D(t,n,r);return o&&(s=this.add(s,o)),i&&(s=bf(this,s,i,a)),s},t.prototype.depthwiseConv2D=function(e,t,n){yf([e,t],"depthwiseConv2D");for(var r=n.filterHeight,o=n.filterWidth,i=n.dilationHeight,a=n.dilationWidth,s=n.padInfo.left,u=n.padInfo.top,c=n.outChannels/n.inChannels,l=lr(n.outShape,e.dtype),f=this.readSync(e.dataId),p=this.readSync(t.dataId),h=l.values,d=0;d<n.batchSize;++d)for(var m=d*e.strides[0],g=d*l.strides[0],v=0;v<n.outHeight;++v)for(var y=g+v*l.strides[1],b=v*n.strideHeight-s,w=0;w<r;++w){var x=b+w*i;if(!(x<0||x>=n.inHeight))for(var A=w*t.strides[0],E=m+x*e.strides[1],C=0;C<n.outWidth;++C)for(var k=y+C*l.strides[2],I=C*n.strideWidth-u,S=0;S<o;++S){var j=I+S*a;if(!(j<0||j>=n.inWidth))for(var T=A+S*t.strides[1],R=E+j*n.inChannels,O=k,D=T,B=0;B<n.inChannels;++B){for(var _=f[R+B],N=0;N<c;++N)h[O+N]+=_*p[D+N];O+=c,D+=c}}}return l.toTensor()},t.prototype.depthwiseConv2DDerInput=function(e,t,n){yf([e,t],"depthwiseConv2DDerInput");for(var r=lr(n.inShape,"float32"),o=r.values,i=r.strides,a=i[0],s=i[1],u=i[2],c=this.readSync(e.dataId),l=e.strides,f=l[0],p=l[1],h=l[2],d=this.readSync(t.dataId),m=t.strides,g=m[0],v=m[1],y=m[2],b=n.batchSize,w=n.filterHeight,x=n.filterWidth,A=n.inChannels,E=n.inHeight,C=n.inWidth,k=n.outChannels,I=n.outHeight,S=n.outWidth,j=n.strideHeight,T=n.strideWidth,R=w-1-n.padInfo.top,O=x-1-n.padInfo.left,D=k/A,B=0;B<b;++B)for(var _=0;_<A;++_)for(var N=0;N<E;++N)for(var P=N-R,M=Math.max(0,Math.ceil(P/j)),F=Math.min(I,(w+P)/j),L=0;L<C;++L){for(var U=L-O,W=Math.max(0,Math.ceil(U/T)),z=Math.min(S,(x+U)/T),q=0,Q=M;Q<F;++Q)for(var V=Q*j-P,H=W;H<z;++H)for(var G=f*B+p*Q+h*H,X=g*(w-1-V)+v*(x-1-(H*T-U))+y*_,Z=0;Z<D;++Z)q+=c[G+(_*D+Z)]*d[X+Z];o[a*B+s*N+u*L+_]=q}return r.toTensor()},t.prototype.depthwiseConv2DDerFilter=function(e,t,n){yf([e,t],"depthwiseConv2DDerFilter");for(var r=n.strideHeight,o=n.strideWidth,i=n.filterHeight,a=n.filterWidth,s=lr(n.filterShape,"float32"),u=n.padInfo.left,c=n.padInfo.top,l=n.outChannels/n.inChannels,f=this.bufferSync(e),p=this.bufferSync(t),h=0;h<i;++h)for(var d=Math.max(0,Math.ceil((c-h)/r)),m=Math.min(n.outHeight,(n.inHeight+c-h)/r),g=0;g<a;++g)for(var v=Math.max(0,Math.ceil((u-g)/o)),y=Math.min(n.outWidth,(n.inWidth+u-g)/o),b=0;b<n.outChannels;++b){for(var w=Math.trunc(b/l),x=b%l,A=0,E=0;E<n.batchSize;++E)for(var C=d;C<m;++C)for(var k=h+C*r-c,I=v;I<y;++I){var S=g+I*o-u;A+=f.get(E,k,S,w)*p.get(E,C,I,b)}s.set(A,h,g,w,x)}return s.toTensor()},t.prototype.tile=function(e,t){return yf(e,"tile"),Fo(this.bufferSync(e),t)},t.prototype.pad=function(e,t,n){yf(e,"pad");var r=t.map((function(t,n){return t[0]+e.shape[n]+t[1]})),o=t.map((function(e){return e[0]})),i=this.bufferSync(e),a=lr(r,e.dtype);0!==n&&a.values.fill(n);for(var s=0;s<e.size;s++){var u=i.indexToLoc(s),c=u.map((function(e,t){return e+o[t]}));a.set.apply(a,[i.get.apply(i,u)].concat(c))}return a.toTensor()},t.prototype.transpose=function(e,t){yf(e,"transpose");for(var n=new Array(e.rank),r=0;r<n.length;r++)n[r]=e.shape[t[r]];var o=this.readSync(e.dataId),i=lr(n,e.dtype),a=this.bufferSync(e);for(r=0;r<e.size;++r){for(var s=a.indexToLoc(r),u=new Array(s.length),c=0;c<u.length;c++)u[c]=s[t[c]];var l=i.locToIndex(u);i.values[l]=o[r]}return i.toTensor()},t.prototype.gather=function(e,t,n){yf([e,t],"gather");var r=e.shape.slice(),o=this.readSync(t.dataId);r[n]=o.length;for(var i=lr(r,e.dtype),a=this.bufferSync(e),s=0;s<i.size;++s){var u=i.indexToLoc(s),c=u.slice();c[n]=o[u[n]];var l=a.locToIndex(c);i.values[s]=a.values[l]}return i.toTensor()},t.prototype.batchToSpaceND=function(e,t,n){yf([e],"batchToSpaceND");var r=t.reduce((function(e,t){return e*t})),o=Mr(e.shape,t,r),i=Fr(o.length,t.length),a=Lr(e.shape,t,r),s=Ur(n,t.length),u=Wr(a,n,t.length);return e.reshape(o).transpose(i).reshape(a).slice(s,u)},t.prototype.spaceToBatchND=function(e,t,n){yf([e],"spaceToBatchND");var r=t.reduce((function(e,t){return e*t})),o=[[0,0]];o.push.apply(o,n);for(var i=1+t.length;i<e.shape.length;++i)o.push([0,0]);var a=e.pad(o),s=Mr(a.shape,t,r,!1),u=Fr(s.length,t.length,!1),c=Lr(a.shape,t,r,!1);return a.reshape(s).transpose(u).reshape(c)},t.prototype.pool=function(e,t,n){yf(e,"pool");for(var r=t.strideHeight,o=t.strideWidth,i=t.dilationHeight,a=t.dilationWidth,s=t.effectiveFilterHeight,u=t.effectiveFilterWidth,c=t.padInfo.top,l=t.padInfo.left,f="max"===n?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,p=this.readSync(e.dataId),h=lr(t.outShape,e.dtype),d=h.values,m=t.outShape[1]*t.outShape[2]*t.outShape[3],g=t.outShape[2]*t.outShape[3],v=t.outShape[3],y=0;y<t.batchSize;++y)for(var b=y*m,w=y*e.strides[0],x=0;x<t.inChannels;++x)for(var A=0;A<t.outHeight;++A)for(var E=A*r-c,C=Math.max(0,E),k=Math.min(t.inHeight,s+E),I=b+A*g,S=0;S<t.outWidth;++S){for(var j=S*o-l,T=Math.max(0,j),R=Math.min(t.inWidth,u+j),O=f,D=0,B=0,_=C;_<k;_+=i){for(var N=w+_*e.strides[1],P=T;P<R;P+=a){var M=p[N+P*e.strides[2]+x];"max"===n&&M>O?O=M:"avg"===n&&(D+=M,B++)}if(isNaN(O))break}d[I+S*v+x]="avg"===n?D/B:O}return h.toTensor()},t.prototype.maxPool=function(e,t){return this.pool(e,t,"max")},t.prototype.maxPoolPositions=function(e,t){for(var n=lr(t.outShape,"int32"),r=t.strideHeight,o=t.strideWidth,i=t.dilationHeight,a=t.dilationWidth,s=t.effectiveFilterHeight,u=t.effectiveFilterWidth,c=t.padInfo.top,l=t.padInfo.left,f=this.bufferSync(e),p=0;p<t.batchSize;++p)for(var h=0;h<t.inChannels;++h)for(var d=0;d<t.outHeight;++d){for(var m=d*r-c,g=m;g<0;)g+=i;for(var v=Math.min(t.inHeight,s+m),y=0;y<t.outWidth;++y){for(var b=y*o-l,w=b;w<0;)w+=a;for(var x=Math.min(t.inWidth,u+b),A=Number.NEGATIVE_INFINITY,E=-1,C=g;C<v;C+=i)for(var k=C-m,I=w;I<x;I+=a){var S=I-b,j=f.get(p,C,I,h);j>A&&(A=j,E=k*u+S)}n.set(E,p,d,y,h)}}return n.toTensor()},t.prototype.maxPoolBackprop=function(e,t,n,r){yf([t,n],"maxPoolBackprop");for(var o=this.maxPoolPositions(t,r),i=r.strideHeight,a=r.strideWidth,s=r.dilationHeight,u=r.dilationWidth,c=r.effectiveFilterHeight,l=r.effectiveFilterWidth,f=l-1-r.padInfo.left,p=c-1-r.padInfo.top,h=lr(t.shape,"float32"),d=this.bufferSync(o),m=this.bufferSync(e),g=0;g<r.batchSize;++g)for(var v=0;v<r.inChannels;++v)for(var y=0;y<r.inHeight;++y)for(var b=0;b<r.inWidth;++b){for(var w=y-p,x=b-f,A=0,E=0;E<c;E+=s){var C=(w+E)/i;if(!(C<0||C>=r.outHeight||Math.floor(C)!==C))for(var k=0;k<l;k+=u){var I=(x+k)/a;if(!(I<0||I>=r.outWidth||Math.floor(I)!==I)){var S=c*l-1-d.get(g,C,I,v)===E*l+k?1:0;0!==S&&(A+=m.get(g,C,I,v)*S)}}}h.set(A,g,y,b,v)}return h.toTensor()},t.prototype.avgPoolBackprop=function(e,t,n){yf([e,t],"avgPoolBackprop");for(var r=n.strideHeight,o=n.strideWidth,i=n.filterHeight,a=n.filterWidth,s=n.dilationHeight,u=n.dilationWidth,c=n.effectiveFilterHeight,l=n.effectiveFilterWidth,f=l-1-n.padInfo.left,p=c-1-n.padInfo.top,h=lr(t.shape,"float32"),d=1/(i*a),m=this.bufferSync(e),g=0;g<n.batchSize;++g)for(var v=0;v<n.inChannels;++v)for(var y=0;y<n.inHeight;++y)for(var b=0;b<n.inWidth;++b){for(var w=y-p,x=b-f,A=0,E=0;E<c;E+=s){var C=(w+E)/r;if(!(C<0||C>=n.outHeight||Math.floor(C)!==C))for(var k=0;k<l;k+=u){var I=(x+k)/o;I<0||I>=n.outWidth||Math.floor(I)!==I||(A+=m.get(g,C,I,v))}}h.set(A*d,g,y,b,v)}return h.toTensor()},t.prototype.pool3d=function(e,t,n){yf(e,"pool3d");for(var r=t.strideDepth,o=t.strideHeight,i=t.strideWidth,a=t.dilationDepth,s=t.dilationHeight,u=t.dilationWidth,c=t.effectiveFilterDepth,l=t.effectiveFilterHeight,f=t.effectiveFilterWidth,p=t.padInfo.front,h=t.padInfo.top,d=t.padInfo.left,m="max"===n?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,g=this.readSync(e.dataId),v=lr(t.outShape,e.dtype),y=v.values,b=t.outShape[1]*t.outShape[2]*t.outShape[3]*t.outShape[4],w=t.outShape[2]*t.outShape[3]*t.outShape[4],x=t.outShape[3]*t.outShape[4],A=t.outShape[4],E=0;E<t.batchSize;++E)for(var C=E*b,k=E*e.strides[0],I=0;I<t.inChannels;++I)for(var S=0;S<t.outDepth;++S){for(var j=S*r-p,T=j;T<0;)T+=a;for(var R=Math.min(t.inDepth,c+j),O=C+S*w,D=0;D<t.outHeight;++D){for(var B=D*o-h,_=B;_<0;)_+=s;for(var N=Math.min(t.inHeight,l+B),P=O+D*x,M=0;M<t.outWidth;++M){for(var F=M*i-d,L=F;L<0;)L+=u;for(var U=Math.min(t.inWidth,f+F),W=P+M*A,z=m,q=0,Q=0,V=T;V<R;V+=a){for(var H=k+V*e.strides[1],G=_;G<N;G+=s){for(var X=H+G*e.strides[2],Z=L;Z<U;Z+=u){var K=g[X+Z*e.strides[3]+I];if("max"===n&&K>z?z=K:"avg"===n&&(q+=K,Q++),isNaN(z))break}if(isNaN(z))break}if(isNaN(z))break}y[W+I]="avg"===n?q/Q:z}}}return v.toTensor()},t.prototype.avgPool3d=function(e,t){return yf(e,"avgPool3d"),this.pool3d(e,t,"avg").toFloat()},t.prototype.avgPool3dBackprop=function(e,t,n){yf([e,t],"avgPool3dBackprop");for(var r=n.strideDepth,o=n.strideHeight,i=n.strideWidth,a=n.filterDepth,s=n.filterHeight,u=n.filterWidth,c=n.dilationDepth,l=n.dilationHeight,f=n.dilationWidth,p=n.effectiveFilterDepth,h=n.effectiveFilterHeight,d=n.effectiveFilterWidth,m=p-1-n.padInfo.front,g=d-1-n.padInfo.left,v=h-1-n.padInfo.top,y=lr(t.shape,"float32"),b=1/(a*s*u),w=this.bufferSync(e),x=0;x<n.batchSize;++x)for(var A=0;A<n.inChannels;++A)for(var E=0;E<n.inDepth;++E)for(var C=0;C<n.inHeight;++C)for(var k=0;k<n.inWidth;++k){for(var I=E-m,S=C-v,j=k-g,T=0,R=0;R<p;R+=c){var O=(I+R)/r;if(!(O<0||O>=n.outDepth||Math.floor(O)!==O))for(var D=0;D<h;D+=l){var B=(S+D)/o;if(!(B<0||B>=n.outHeight||Math.floor(B)!==B))for(var _=0;_<d;_+=f){var N=(j+_)/i;N<0||N>=n.outWidth||Math.floor(N)!==N||(T+=w.get(x,O,B,N,A))}}}y.set(T*b,x,E,C,k,A)}return y.toTensor()},t.prototype.maxPool3d=function(e,t){return yf(e,"maxPool3d"),this.pool3d(e,t,"max").toFloat()},t.prototype.maxPool3dPositions=function(e,t){for(var n=lr(t.outShape,"int32"),r=t.strideDepth,o=t.strideHeight,i=t.strideWidth,a=t.dilationDepth,s=t.dilationHeight,u=t.dilationWidth,c=t.effectiveFilterDepth,l=t.effectiveFilterHeight,f=t.effectiveFilterWidth,p=t.padInfo.front,h=t.padInfo.top,d=t.padInfo.left,m=this.bufferSync(e),g=0;g<t.batchSize;++g)for(var v=0;v<t.inChannels;++v)for(var y=0;y<t.outDepth;++y){for(var b=y*r-p,w=b;w<0;)w+=a;for(var x=Math.min(t.inDepth,c+b),A=0;A<t.outHeight;++A){for(var E=A*o-h,C=E;C<0;)C+=s;for(var k=Math.min(t.inHeight,l+E),I=0;I<t.outWidth;++I){for(var S=I*i-d,j=S;j<0;)j+=u;for(var T=Math.min(t.inWidth,f+S),R=Number.NEGATIVE_INFINITY,O=-1,D=w;D<x;D+=a)for(var B=D-b,_=C;_<k;_+=s)for(var N=_-E,P=j;P<T;P+=u){var M=P-S,F=m.get(g,D,_,P,v);F>=R&&(R=F,O=B*l*f+N*l+M)}n.set(O,g,y,A,I,v)}}}return n.toTensor()},t.prototype.maxPool3dBackprop=function(e,t,n,r){yf([t,n],"maxPool3dBackprop");for(var o=this.maxPool3dPositions(t,r),i=r.strideDepth,a=r.strideHeight,s=r.strideWidth,u=r.dilationDepth,c=r.dilationHeight,l=r.dilationWidth,f=r.effectiveFilterDepth,p=r.effectiveFilterHeight,h=r.effectiveFilterWidth,d=f-1-r.padInfo.front,m=h-1-r.padInfo.left,g=p-1-r.padInfo.top,v=lr(t.shape,"float32"),y=this.bufferSync(o),b=this.bufferSync(e),w=0;w<r.batchSize;++w)for(var x=0;x<r.inChannels;++x)for(var A=0;A<r.inDepth;++A)for(var E=0;E<r.inHeight;++E)for(var C=0;C<r.inWidth;++C){for(var k=A-d,I=E-g,S=C-m,j=0,T=0;T<f;T+=u){var R=(k+T)/i;if(!(R<0||R>=r.outDepth||Math.floor(R)!==R))for(var O=0;O<p;O+=c){var D=(I+O)/a;if(!(D<0||D>=r.outHeight||Math.floor(D)!==D))for(var B=0;B<h;B+=l){var _=(S+B)/s;if(!(_<0||_>=r.outWidth||Math.floor(_)!==_)){var N=f*p*h-1-y.get(w,R,D,_,x)===T*p*h+O*h+B?1:0;0!==N&&(j+=b.get(w,R,D,_,x)*N)}}}}v.set(j,w,A,E,C,x)}return v.toTensor()},t.prototype.cast=function(e,t){return Ao(e,t,this)},t.prototype.reshape=function(e,t){return Eo(e,t)},t.prototype.avgPool=function(e,t){return yf(e,"avgPool"),this.pool(e,t,"avg").toFloat()},t.prototype.resizeBilinear=function(e,t,n,r){yf(e,"resizeBilinear");for(var o=e.shape,i=o[0],a=o[1],s=o[2],u=o[3],c=this.readSync(e.dataId),l=new Float32Array($([i,t,n,u])),f=[r&&t>1?a-1:a,r&&n>1?s-1:s],p=[r&&t>1?t-1:t,r&&n>1?n-1:n],h=0,d=f[0]/p[0],m=f[1]/p[1],g=0;g<i;g++)for(var v=0;v<t;v++)for(var y=d*v,b=Math.floor(y),w=y-b,x=Math.min(a-1,Math.ceil(y)),A=g*e.strides[0]+b*e.strides[1],E=g*e.strides[0]+x*e.strides[1],C=0;C<n;C++)for(var k=m*C,I=Math.floor(k),S=k-I,j=Math.min(s-1,Math.ceil(k)),T=A+I*e.strides[2],R=E+I*e.strides[2],O=A+j*e.strides[2],D=E+j*e.strides[2],B=0;B<u;B++){var _=c[T+B],N=c[R+B],P=_+(c[O+B]-_)*S,M=P+(N+(c[D+B]-N)*S-P)*w;l[h++]=M}return Bn(l,[i,t,n,u])},t.prototype.resizeBilinearBackprop=function(e,t,n){yf([e,t],"resizeBilinearBackprop");for(var r=t.shape,o=r[0],i=r[1],a=r[2],s=r[3],u=e.shape,c=u[1],l=u[2],f=new Float32Array(o*i*a*s),p=[n&&c>1?i-1:i,n&&l>1?a-1:a],h=[n&&c>1?c-1:c,n&&l>1?l-1:l],d=p[0]/h[0],m=p[1]/h[1],g=this.readSync(e.dataId),v=0,y=0;y<o;y++)for(var b=y*t.strides[0],w=0;w<c;w++)for(var x=w*d,A=Math.floor(x),E=Math.min(Math.ceil(x),i-1),C=b+A*t.strides[1],k=b+E*t.strides[1],I=x-A,S=1-I,j=0;j<l;j++)for(var T=j*m,R=Math.floor(T),O=Math.min(Math.ceil(T),a-1),D=T-R,B=1-D,_=C+R*t.strides[2],N=C+O*t.strides[2],P=k+R*t.strides[2],M=k+O*t.strides[2],F=S*B,L=S*D,U=I*B,W=I*D,z=0;z<s;z++){var q=g[v++];f[_+z]+=q*F,f[N+z]+=q*L,f[P+z]+=q*U,f[M+z]+=q*W}return Ln(f,[o,a,i,s],t.dtype)},t.prototype.resizeNearestNeighbor=function(e,t,n,r){yf(e,"resizeNearestNeighbor");for(var o=e.shape,i=o[0],a=o[1],s=o[2],u=o[3],c=this.readSync(e.dataId),l=new Float32Array(i*t*n*u),f=[r&&t>1?a-1:a,r&&n>1?s-1:s],p=[r&&t>1?t-1:t,r&&n>1?n-1:n],h=f[0]/p[0],d=f[1]/p[1],m=0,g=0;g<i;g++)for(var v=g*e.strides[0],y=0;y<t;y++)for(var b=h*y,w=v+Math.min(a-1,r?Math.round(b):Math.floor(b))*e.strides[1],x=0;x<n;x++)for(var A=d*x,E=w+Math.min(s-1,r?Math.round(A):Math.floor(A))*e.strides[2],C=0;C<u;C++){var k=c[E+C];l[m++]=k}return Bn(l,[i,t,n,u],e.dtype)},t.prototype.resizeNearestNeighborBackprop=function(e,t,n){yf([e,t],"resizeNearestNeighborBackprop");for(var r=t.shape,o=r[0],i=r[1],a=r[2],s=r[3],u=e.shape,c=u[1],l=u[2],f=new Float32Array(o*i*a*s),p=this.readSync(e.dataId),h=[n&&c>1?i-1:i,n&&l>1?a-1:a],d=[n&&c>1?c-1:c,n&&l>1?l-1:l],m=h[0]/d[0],g=h[1]/d[1],v=1/m,y=1/g,b=2*Math.ceil(v)+2,w=2*Math.ceil(y)+2,x=0;x<o;x++)for(var A=x*t.strides[0],E=0;E<i;E++)for(var C=A+E*t.strides[1],k=Math.floor(E*v),I=Math.floor(k-b/2),S=0;S<a;S++)for(var j=C+S*t.strides[2],T=Math.floor(S*y),R=Math.floor(T-w/2),O=0;O<s;O++){for(var D=0,B=0;B<b;B++){var _=B+I;if(!(_<0||_>=c)){var N=A+_*e.strides[1],P=_*m;if(E===Math.min(i-1,n?Math.round(P):Math.floor(P)))for(var M=0;M<w;M++){var F=M+R;if(!(F<0||F>=l)){var L=N+F*e.strides[2],U=F*g;S===Math.min(a-1,n?Math.round(U):Math.floor(U))&&(D+=p[L+O])}}}}f[j+O]=D}return Ln(f,t.shape,t.dtype)},t.prototype.batchNormalization=function(e,t,n,r,o,i){yf([e,t,n,o,i],"batchNorm");for(var a=this.readSync(e.dataId),s=this.readSync(t.dataId),u=this.readSync(n.dataId),c=o?this.readSync(o.dataId):new Float32Array([1]),l=i?this.readSync(i.dataId):new Float32Array([0]),f=new Float32Array(a.length),p=l.length,h=c.length,d=u.length,m=s.length,g=0,v=0,y=0,b=0,w=0;w<a.length;++w)f[w]=l[g++]+(a[w]-s[v++])*c[y++]/Math.sqrt(u[b++]+r),g>=p&&(g=0),v>=m&&(v=0),y>=h&&(y=0),b>=d&&(b=0);return Ln(f,e.shape)},t.prototype.localResponseNormalization4D=function(e,t,n,r,o){yf(e,"localResponseNormalization4D");var i=e.shape[3],a=i-1,s=this.readSync(e.dataId),u=e.size,c=new Float32Array(u);function l(e){for(var n=e%i,r=e-n+Math.max(0,n-t),o=e-n+Math.min(n+t,a),u=0;r<=o;r++){var c=s[r];u+=c*c}return u}for(var f=0;f<u;f++){var p=l(f),h=s[f]*Math.pow(n+r*p,-o);c[f]=h}return Ln(c,e.shape)},t.prototype.LRNGrad=function(e,t,n,r,o,i,a){yf(e,"LRNGrad");for(var s=e.shape[3],u=this.readSync(e.dataId),c=this.readSync(t.dataId),l=this.readSync(n.dataId),f=new Float32Array(e.size),p=e.size,h=0;h<p;h++){for(var d=h%s,m=h-d+Math.max(0,d-r),g=h-d+Math.min(s,d+r+1),v=0,y=m;y<g;y++)v+=Math.pow(c[y],2);for(v=i*v+o,y=m;y<g;y++){var b=-2*i*a*c[y]*l[h]/v;h===y&&(b+=Math.pow(v,-a)),b*=u[h],f[y]+=b}}return Ln(f,e.shape)},t.prototype.multinomial=function(e,t,n,r){yf(e,"multinomial");for(var o=t?e:to(e),i=o.shape[0],a=o.shape[1],s=Wn([i,n],"int32"),u=this.readSync(s.dataId),c=this.readSync(o.dataId),l=0;l<i;++l){var f=l*a,p=new Float32Array(a-1);p[0]=c[f];for(var h=1;h<p.length;++h)p[h]=p[h-1]+c[f+h];for(var d=ar(r.toString()),m=l*n,g=0;g<n;++g){var v=d();u[m+g]=p.length;for(var y=0;y<p.length;y++)if(v<p[y]){u[m+g]=y;break}}}return s},t.prototype.oneHot=function(e,t,n,r){yf(e,"oneHot");var o=new Float32Array(e.size*t);o.fill(r);for(var i=this.readSync(e.dataId),a=0;a<e.size;++a)i[a]>=0&&i[a]<t&&(o[a*t+i[a]]=n);return Mn(o,[e.size,t],"int32")},t.prototype.nonMaxSuppression=function(e,t,n,r,o){return yf(e,"nonMaxSuppression"),Oo(this.readSync(e.dataId),this.readSync(t.dataId),n,r,o)},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,t){for(var n=e.shape[0],r=e.shape[1],o=lr(e.shape,"float32"),i=lr(e.shape,"float32"),a=On(e).as2D(n,r),s=Dn(e).as2D(n,r),u=0;u<n;u++)for(var c=a.slice([u,0],[1,r]),l=s.slice([u,0],[1,r]),f=Rn(c,l),p=this.readSync(this.fftImpl(f,t).dataId),h=0;h<r;h++){var d=Io(p,h);o.values[u*r+h]=d.real,i.values[u*r+h]=d.imag}return Rn(o.toTensor(),i.toTensor()).as2D(n,r)},t.prototype.fftImpl=function(e,t){var n=e.as1D(),r=n.size;if(this.isExponentOf2(r)){var o=this.fftRadix2(n,r,t).as2D(e.shape[0],e.shape[1]);return t&&(o=Rn(On(o).div(Nn(r)),Dn(o).div(Nn(r)))),o}var i=this.readSync(e.dataId),a=function(e){for(var t=new Float32Array(e.length/2),n=new Float32Array(e.length/2),r=0;r<e.length;r+=2)t[r/2]=e[r],n[r/2]=e[r+1];return{real:t,imag:n}}(this.fourierTransformByMatmul(i,r,t));return Rn(a.real,a.imag).as2D(e.shape[0],e.shape[1])},t.prototype.isExponentOf2=function(e){return 0==(e&e-1)},t.prototype.fftRadix2=function(e,t,n){if(1===t)return e;var r=this.readSync(e.dataId),o=t/2,i=function(e){for(var t=Math.ceil(e.length/4),n=new Float32Array(t),r=new Float32Array(t),o=0;o<e.length;o+=4)n[Math.floor(o/4)]=e[o],r[Math.floor(o/4)]=e[o+1];return{real:n,imag:r}}(r),a=Rn(i.real,i.imag).as1D(),s=function(e){for(var t=Math.floor(e.length/4),n=new Float32Array(t),r=new Float32Array(t),o=2;o<e.length;o+=4)n[Math.floor(o/4)]=e[o],r[Math.floor(o/4)]=e[o+1];return{real:n,imag:r}}(r),u=Rn(s.real,s.imag).as1D();a=this.fftRadix2(a,o,n),u=this.fftRadix2(u,o,n);var c=function(e,t){for(var n=new Float32Array(e/2),r=new Float32Array(e/2),o=0;o<Math.ceil(e/2);o++){var i=(t?2:-2)*Math.PI*(o/e);n[o]=Math.cos(i),r[o]=Math.sin(i)}return{real:n,imag:r}}(t,n),l=Rn(c.real,c.imag).mul(u),f=a.add(l),p=a.sub(l),h=On(f).concat(On(p)),d=Dn(f).concat(Dn(p));return Rn(h,d).as1D()},t.prototype.fourierTransformByMatmul=function(e,t,n){for(var r=new Float32Array(2*t),o=0;o<t;o++){for(var i=0,a=0,s=0;s<t;s++){var u=jo(o*s,t,n),c=Io(e,s);i+=c.real*u.real-c.imag*u.imag,a+=c.real*u.imag+c.imag*u.real}n&&(i/=t,a/=t),So(r,i,a,o)}return r},t.prototype.depthToSpace=function(e,t,n){Z("NHWC"===n,(function(){return"Only NHWC dataFormat supported on CPU for depthToSpace. Got "+n})),Z(t>1,(function(){return"blockSize should be > 1 for depthToSpace, but was: "+t}));for(var r=e.shape[0],o=e.shape[1],i=e.shape[2],a=e.shape[3],s=o*t,u=i*t,c=a/(t*t),l=this.readSync(e.dataId),f=new Float32Array(r*s*u*c),p=0,h=0;h<r;++h)for(var d=0;d<s;++d)for(var m=Math.floor(d/t),g=d%t,v=0;v<u;++v)for(var y=Math.floor(v/t),b=(g*t+v%t)*c,w=0;w<c;++w){var x=w+b+a*(y+i*(m+o*h));f[p++]=l[x]}return Ln(f,[r,s,u,c])},t.prototype.broadcastedBinaryOp=function(e,t,n,r){var o=uo(e.shape,t.shape),i=lr(o,n),a=this.readSync(e.dataId),s=this.readSync(t.dataId),u=ao(e.shape,o),c=ao(t.shape,o),l=i.values;if(u.length+c.length===0)for(var f=0;f<l.length;++f)l[f]=r(a[f%a.length],s[f%s.length]);else{var p=this.bufferSync(e),h=this.bufferSync(t),d=function(n){var o=i.indexToLoc(n),f=o.slice(-e.rank);u.forEach((function(e){return f[e]=0}));var d=p.locToIndex(f),m=o.slice(-t.rank);c.forEach((function(e){return m[e]=0}));var g=h.locToIndex(m);l[n]=r(a[d],s[g])};for(f=0;f<l.length;++f)d(f)}return i.toTensor()},t.prototype.broadcastedBinaryComplexOp=function(e,t,n){var r=uo(e.shape,t.shape),o=lr(r,"float32"),i=lr(r,"float32"),a=this.readSync(e.dataId),s=this.readSync(t.dataId),u=ao(e.shape,r),c=ao(t.shape,r),l=o.values,f=i.values;if(u.length+c.length===0)for(var p=0;p<l.length;p++){var h=p%a.length,d=p%s.length,m=n(a[2*h],a[2*h+1],s[2*d],s[2*d+1]);l[p]=m.real,f[p]=m.imag}else{var g=this.bufferSync(this.data.get(e.dataId).complexTensors.real),v=this.bufferSync(this.data.get(t.dataId).complexTensors.real),y=function(r){var i=o.indexToLoc(r),p=i.slice(-e.rank);u.forEach((function(e){return p[e]=0}));var h=g.locToIndex(p),d=i.slice(-t.rank);c.forEach((function(e){return d[e]=0}));var m=v.locToIndex(d),y=n(a[2*h],a[2*h+1],s[2*m],s[2*m+1]);l[r]=y.real,f[r]=y.imag};for(p=0;p<l.length;p++)y(p)}return this.complex(o.toTensor(),i.toTensor())},t.prototype.split=function(e,t,n){return Mo(e,t,n)},t.prototype.dispose=function(){},t.prototype.floatPrecision=function(){return 32},t.prototype.epsilon=function(){return 1e-7},t.prototype.cropAndResize=function(e,t,n,r,o,i){for(var a=e.shape,s=a[0],u=a[1],c=a[2],l=a[3],f=t.shape[0],p=r[0],h=r[1],d=lr([f,p,h,l],"float32"),m=this.readSync(t.dataId),g=this.readSync(n.dataId),v=this.readSync(e.dataId),y=e.strides,b=d.strides,w=0;w<f;w++){var x=4*w,A=m[x],E=m[x+1],C=m[x+2],k=m[x+3],I=g[w];if(!(I>=s))for(var S=p>1?(C-A)*(u-1)/(p-1):0,j=h>1?(k-E)*(c-1)/(h-1):0,T=0;T<p;T++){var R=p>1?A*(u-1)+T*S:.5*(A+C)*(u-1);if(R<0||R>u-1)for(var O=0;O<h;O++)for(var D=0;D<l;D++){var B=D+O*b[2]+T*b[1]+w*b[0];d.values[B]=i}else if("bilinear"===o){var _=Math.floor(R),N=Math.ceil(R),P=R-_;for(O=0;O<h;O++)if((V=h>1?E*(c-1)+O*j:.5*(E+k)*(c-1))<0||V>c-1)for(D=0;D<l;D++)B=D+O*b[2]+T*b[1]+w*b[0],d.values[B]=i;else{var M=Math.floor(V),F=Math.ceil(V),L=V-M;for(D=0;D<l;D++){var U=v[B=D+M*y[2]+_*y[1]+I*y[0]],W=v[B=D+F*y[2]+_*y[1]+I*y[0]],z=v[B=D+M*y[2]+N*y[1]+I*y[0]],q=U+(W-U)*L,Q=z+(v[B=D+F*y[2]+N*y[1]+I*y[0]]-z)*L;B=D+O*b[2]+T*b[1]+w*b[0],d.values[B]=q+(Q-q)*P}}}else for(O=0;O<h;++O){var V;if((V=h>1?E*(c-1)+O*j:.5*(E+k)*(c-1))<0||V>c-1)for(D=0;D<l;D++)B=D+O*b[2]+T*b[1]+w*b[0],d.values[B]=i;else{var H=Math.round(V),G=Math.round(R);for(D=0;D<l;D++){var X=D+H*y[2]+G*y[1]+I*y[0],Z=D+O*b[2]+T*b[1]+w*b[0];d.values[Z]=v[X]}}}}}return d.toTensor()},t.prototype.sparseToDense=function(e,t,n,r){var o=Hr(0,e,n),i=o.sliceRank,a=o.numUpdates,s=o.sliceSize,u=o.strides,c=o.outputSize;return this.scatter(e,t,n,c,s,a,i,u,r,!1)},t.prototype.gatherND=function(e,t){var n=t.shape,r=n[n.length-1],o=zr(e,t),i=o[0],a=o[1],s=o[2],u=o[3];if(0===a)return Bn([],i,e.dtype);for(var c=new Le([a,s],e.dtype),l=this.readSync(t.dataId),f=this.readSync(e.dataId),p=0;p<a;p++){for(var h=[],d=0,m=0;m<r;m++){var g=l[p*r+m];d+=g*u[m],h.push(g)}if(d<0||d>=e.size/s)throw new Error("Invalid indices: "+h+" does not index into "+e.shape);for(var v=0;v<s;v++)c.values[p*s+v]=f[d*s+v]}return c.toTensor().reshape(i)},t.prototype.scatterND=function(e,t,n){var r=Hr(0,e,n),o=r.sliceRank,i=r.numUpdates,a=r.sliceSize,s=r.strides,u=r.outputSize,c=Nn(0);return this.scatter(e,t,n,u,a,i,o,s,c,!0)},t.prototype.fill=function(e,t,n){var r=le(n=n||we(t),$(e));return r.fill(t),it.makeTensor(r,e,n,this)},t.prototype.onesLike=function(e){if("string"===e.dtype)throw new Error("onesLike is not supported for string tensors");return this.fill(e.shape,1,e.dtype)},t.prototype.zerosLike=function(e){var t=le(e.dtype,$(e.shape));return this.makeOutput(t,e.shape,e.dtype)},t.prototype.linspace=function(e,t,n){return Co(e,t,n)},t.prototype.scatter=function(e,t,n,r,o,i,a,s,u,c){var l=[r/o,o],f=this.readSync(e.dataId),p=this.readSync(t.dataId);if(0===r)return Bn([],n,t.dtype);var h=new Le(l,t.dtype);h.values.fill(this.readSync(u.dataId)[0]);for(var d=0;d<i;d++){for(var m=[],g=0,v=0;v<a;v++){var y=f[d*a+v];m.push(y),g+=y*s[v]}if(g<0||g>=r/o)throw new Error("Invalid indices: "+m+" does not index into "+n);for(var b=0;b<o;b++)c?h.values[g*o+b]+=p[d*o+b]:h.values[g*o+b]=0===t.rank?p[0]:p[d*o+b]}return h.toTensor().reshape(n)},t}(oo);it.registerBackend("cpu",(function(){return new wf}),1);for(var xf=0,Af=[{kernelName:"NonMaxSuppressionV5",backendName:"cpu",kernelFunc:function(e){var t=e.inputs,n=e.backend,r=e.attrs,o=t,i=o.boxes,a=o.scores,s=r,u=s.maxOutputSize,c=s.iouThreshold,l=s.scoreThreshold,f=s.softNmsSigma,p=n;yf(i,"NonMaxSuppressionWithScore");var h=Do(p.data.get(i.dataId).values,p.data.get(a.dataId).values,u,c,l,f);return[h.selectedIndices,h.selectedScores]}},{kernelName:"Square",backendName:"cpu",kernelFunc:function(e){var t=e.inputs,n=e.backend,r=t.x,o=n;yf(r,"square");for(var i=o.data.get(r.dataId).values,a=new Float32Array(i.length),s=0;s<i.length;++s){var u=i[s];a[s]=u*u}return{dataId:o.write(a,r.shape,r.dtype),shape:r.shape,dtype:r.dtype}}},{kernelName:Ds,backendName:"cpu",kernelFunc:function(e){var t=e.inputs,n=e.backend,r=t,o=r.a,i=r.b,a=n;yf([o,i],Ds);var s=a.data.get(o.dataId).values,u=a.data.get(i.dataId).values,c=function(e,t,n,r,o,i){var a=uo(e,t),s=a.length,u=Ee(a),c=ce(o,$(a)),l=e.length,f=t.length,p=Ee(e),h=Ee(t),d=ao(e,a),m=ao(t,a);if(d.length+m.length===0)for(var g=0;g<c.length;++g)c[g]=i(n[g%n.length],r[g%r.length]);else{var v=function(e){var t=Be(e,s,u),o=t.slice(-l);d.forEach((function(e){return o[e]=0}));var a=De(o,l,p),g=t.slice(-f);m.forEach((function(e){return g[e]=0}));var v=De(g,f,h);c[e]=i(n[a],r[v])};for(g=0;g<c.length;++g)v(g)}return[c,a]}(o.shape,i.shape,s,u,o.dtype,(function(e,t){var n=e-t;return n*n})),l=c[0],f=c[1];return{dataId:a.write(l,f,o.dtype),shape:f,dtype:o.dtype}}}];xf<Af.length;xf++)z(Af[xf]);for(var Ef,Cf=function(e){this.variableNames=["A"];var t=Ho(),n=e[0],r=e[1];this.outputShape=e,this.userCode="\n void main() {\n ivec3 coords = getOutputCoords();\n int texR = coords[0];\n int texC = coords[1];\n int depth = coords[2];\n vec2 uv = (vec2(texC, texR) + halfCR) / vec2("+r+".0, "+n+".0);\n\n vec4 values = "+t.texture2D+"(A, uv);\n float value;\n if (depth == 0) {\n value = values.r;\n } else if (depth == 1) {\n value = values.g;\n } else if (depth == 2) {\n value = values.b;\n } else if (depth == 3) {\n value = values.a;\n }\n\n setOutput(floor(value * 255.0 + 0.5));\n }\n "},kf=function(e){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0;var t=Ho(),n=e[0],r=e[1];this.outputShape=e,this.userCode="\n void main() {\n ivec3 coords = getOutputCoords();\n int texR = coords[0];\n int texC = coords[1];\n int depth = coords[2];\n\n vec4 result = vec4(0.);\n\n for(int row=0; row<=1; row++) {\n for(int col=0; col<=1; col++) {\n texC = coords[1] + row;\n depth = coords[2] + col;\n\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2("+r+".0, "+n+".0);\n vec4 values = "+t.texture2D+"(A, uv);\n float value;\n if (depth == 0) {\n value = values.r;\n } else if (depth == 1) {\n value = values.g;\n } else if (depth == 2) {\n value = values.b;\n } else if (depth == 3) {\n value = values.a;\n }\n\n result[row * 2 + col] = floor(value * 255.0 + 0.5);\n }\n }\n\n "+t.output+" = result;\n }\n "},If=0,Sf=[{kernelName:"FromPixels",backendName:"webgl",kernelFunc:function(e){var t=e.inputs,n=e.backend,r=e.attrs,o=t.pixels,i=r.numChannels,a="undefined"!=typeof HTMLVideoElement&&o instanceof HTMLVideoElement,s="undefined"!=typeof HTMLImageElement&&o instanceof HTMLImageElement,u=a?[o.videoWidth,o.videoHeight]:[o.width,o.height],c=u[0],l=u[1],f=[l,c],p=[l,c,i];(s||a)&&(null==Ef&&(Ef=document.createElement("canvas").getContext("2d")),Ef.canvas.width=c,Ef.canvas.height=l,Ef.drawImage(o,0,0,c,l),o=Ef.canvas);var h=n.makeTensorInfo(f,"int32");n.texData.get(h.dataId).usage=ct.PIXELS,n.gpgpu.uploadPixelDataToTexture(n.getTexture(h.dataId),o);var d=P().getBool("WEBGL_PACK")?new kf(p):new Cf(p),m=n.runWebGLProgram(d,[h],"int32");return n.disposeData(h.dataId),m}},{kernelName:"NonMaxSuppressionV5",backendName:"webgl",kernelFunc:function(e){var t=e.inputs,n=e.backend,r=e.attrs;dn("tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead");var o=t,i=o.boxes,a=o.scores,s=r,u=s.maxOutputSize,c=s.iouThreshold,l=s.scoreThreshold,f=s.softNmsSigma,p=n,h=Do(p.readSync(i.dataId),p.readSync(a.dataId),u,c,l,f);return[h.selectedIndices,h.selectedScores]}},{kernelName:"Square",backendName:"webgl",kernelFunc:function(e){var t=e.inputs,n=e.backend,r=t.x,o=n,i=new ns(r.shape,"return x * x;");return o.runWebGLProgram(i,[r],r.dtype)}},{kernelName:Ds,backendName:"webgl",kernelFunc:function(e){var t=e.inputs,n=e.backend,r=t,o=r.a,i=r.b,a=n,s=P().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new wi("return (a - b) * (a - b);",o.shape,i.shape):new yi("return (a - b) * (a - b);",o.shape,i.shape);return a.compileAndRun(s,[o,i])}}];If<Sf.length;If++)z(Sf[If]);for(var jf=0,Tf=[{kernelName:"Square",gradFunc:function(e,t){var n=t[0];return{x:function(){return e.mul(n.toFloat().mul(2))}}}},{kernelName:Ds,gradFunc:function(e,t){var n=t[0],r=t[1],o=Nn(2);return{a:function(){return Xu(e,Xu(o,$u(n,r)))},b:function(){return Xu(e,Xu(o,$u(r,n)))}}}}];jf<Tf.length;jf++)q(Tf[jf]);var Rf=function(){function e(){}return e.prototype.fetch=function(e,t){return fetch(e,t)},e.prototype.now=function(){return performance.now()},e.prototype.encode=function(e,t){if("utf-8"!==t&&"utf8"!==t)throw new Error("Browser's encoder only supports utf-8, but got "+t);return null==this.textEncoder&&(this.textEncoder=new TextEncoder),this.textEncoder.encode(e)},e.prototype.decode=function(e,t){return new TextDecoder(t).decode(e)},e}();P().get("IS_BROWSER")&&P().setPlatform("browser",new Rf);var Of,Df=function(){function e(){this.util=n(24726),this.textEncoder=new this.util.TextEncoder}return e.prototype.fetch=function(e,t){return null!=P().global.fetch?P().global.fetch(e,t):(null==Of&&(Of=n(22591)),Of(e,t))},e.prototype.now=function(){var e=j.hrtime();return 1e3*e[0]+e[1]/1e6},e.prototype.encode=function(e,t){if("utf-8"!==t&&"utf8"!==t)throw new Error("Node built-in encoder only supports utf-8, but got "+t);return this.textEncoder.encode(e)},e.prototype.decode=function(e,t){return 0===e.length?"":new this.util.TextDecoder(t).decode(e)},e}();P().get("IS_NODE")&&P().setPlatform("node",new Df);var Bf={float32:4,int32:4,uint16:2,uint8:1,bool:1};function _f(e,t){for(var n={},r=0,o=function(t){var o=t.name,i=t.dtype,a=t.shape,s=$(a),u=void 0;if("quantization"in t){var c=t.quantization;if("uint8"!==c.dtype&&"uint16"!==c.dtype)throw new Error("Weight "+t.name+" has unknown quantization dtype "+c.dtype+". Supported quantization dtypes are: 'uint8' and 'uint16'.");var l=Bf[c.dtype],f=e.slice(r,r+s*l),p="uint8"===c.dtype?new Uint8Array(f):new Uint16Array(f);if("float32"===i)u=Float32Array.from(p,(function(e){return e*c.scale+c.min}));else{if("int32"!==i)throw new Error("Unsupported dtype in weight '"+o+"': "+i);u=Int32Array.from(p,(function(e){return Math.round(e*c.scale+c.min)}))}r+=s*l}else if("string"===i){var h=$(t.shape);u=[];for(var d=0;d<h;d++){var m=new Uint32Array(e.slice(r,r+4))[0];r+=4;var g=new Uint8Array(e.slice(r,r+m));u.push(g),r+=m}}else{var v=Bf[i];if(f=e.slice(r,r+s*v),"float32"===i)u=new Float32Array(f);else if("int32"===i)u=new Int32Array(f);else{if("bool"!==i)throw new Error("Unsupported dtype in weight '"+o+"': "+i);u=new Uint8Array(f)}r+=s*v}n[o]=Bn(u,a,i)},i=0,a=t;i<a.length;i++)o(a[i]);return n}function Nf(e){if(null===e)throw new Error("Invalid input value: "+JSON.stringify(e));var t=0,n=[];e.forEach((function(e){if(t+=e.byteLength,n.push(e.byteLength===e.buffer.byteLength?e:new e.constructor(e)),!(e instanceof Float32Array||e instanceof Int32Array||e instanceof Uint8Array))throw new Error("Unsupported TypedArray subtype: "+e.constructor.name)}));var r=new Uint8Array(t),o=0;return n.forEach((function(e){r.set(new Uint8Array(e.buffer),o),o+=e.byteLength})),r.buffer}var Pf=void 0!==T&&("undefined"==typeof Blob||"undefined"==typeof atob||"undefined"==typeof btoa);function Mf(e){return Pf?T.byteLength(e):new Blob([e]).size}function Ff(e){var t=0;e.forEach((function(e){t+=e.byteLength}));var n=new Uint8Array(t),r=0;return e.forEach((function(e){n.set(new Uint8Array(e),r),r+=e.byteLength})),n.buffer}function Lf(e){for(e=e.trim();e.endsWith("/");)e=e.slice(0,e.length-1);var t=e.split("/");return t[t.length-1]}function Uf(e){if(e.modelTopology instanceof ArrayBuffer)throw new Error("Expected JSON model topology, received ArrayBuffer.");return{dateSaved:new Date,modelTopologyType:"JSON",modelTopologyBytes:null==e.modelTopology?0:Mf(JSON.stringify(e.modelTopology)),weightSpecsBytes:null==e.weightSpecs?0:Mf(JSON.stringify(e.weightSpecs)),weightDataBytes:null==e.weightData?0:e.weightData.byteLength}}var Wf=function(){function e(){this.saveRouters=[],this.loadRouters=[]}return e.getInstance=function(){return null==e.instance&&(e.instance=new e),e.instance},e.registerSaveRouter=function(t){e.getInstance().saveRouters.push(t)},e.registerLoadRouter=function(t){e.getInstance().loadRouters.push(t)},e.getSaveHandlers=function(t){return e.getHandlers(t,"save")},e.getLoadHandlers=function(t,n){return e.getHandlers(t,"load",n)},e.getHandlers=function(t,n,r){var o=[];return("load"===n?e.getInstance().loadRouters:e.getInstance().saveRouters).forEach((function(e){var n=e(t,r);null!==n&&o.push(n)})),o},e}(),zf="://",qf=function(){function e(){this.managers={}}return e.getInstance=function(){return null==e.instance&&(e.instance=new e),e.instance},e.registerManager=function(t,n){Z(null!=t,(function(){return"scheme must not be undefined or null."})),t.endsWith(zf)&&(t=t.slice(0,t.indexOf(zf))),Z(t.length>0,(function(){return"scheme must not be an empty string."}));var r=e.getInstance();Z(null==r.managers[t],(function(){return"A model store manager is already registered for scheme '"+t+"'."})),r.managers[t]=n},e.getManager=function(e){var t=this.getInstance().managers[e];if(null==t)throw new Error("Cannot find model manager for scheme '"+e+"'");return t},e.getSchemes=function(){return Object.keys(this.getInstance().managers)},e}();function Qf(e){if(-1===e.indexOf(zf))throw new Error("The url string provided does not contain a scheme. Supported schemes are: "+qf.getSchemes().join(","));return{scheme:e.split(zf)[0],path:e.split(zf)[1]}}function Vf(e,t,n){return void 0===n&&(n=!1),D(this,void 0,void 0,(function(){var r,o,i,a,s,u,c,l,f;return B(this,(function(p){switch(p.label){case 0:return Z(e!==t,(function(){return"Old path and new path are the same: '"+e+"'"})),Z((r=Wf.getLoadHandlers(e)).length>0,(function(){return"Copying failed because no load handler is found for source URL "+e+"."})),Z(r.length<2,(function(){return"Copying failed because more than one ("+r.length+") load handlers for source URL "+e+"."})),o=r[0],Z((i=Wf.getSaveHandlers(t)).length>0,(function(){return"Copying failed because no save handler is found for destination URL "+t+"."})),Z(i.length<2,(function(){return"Copying failed because more than one ("+r.length+") save handlers for destination URL "+t+"."})),a=i[0],s=Qf(e).scheme,u=Qf(e).path,c=s===Qf(e).scheme,[4,o.load()];case 1:return l=p.sent(),n&&c?[4,qf.getManager(s).removeModel(u)]:[3,3];case 2:p.sent(),p.label=3;case 3:return[4,a.save(l)];case 4:return f=p.sent(),!n||c?[3,6]:[4,qf.getManager(s).removeModel(u)];case 5:p.sent(),p.label=6;case 6:return[2,f.modelArtifactsInfo]}}))}))}var Hf="models_store",Gf="model_info_store";function Xf(){if(!P().getBool("IS_BROWSER"))throw new Error("Failed to obtain IndexedDB factory because the current environmentis not a web browser.");var e=window||self,t=e.indexedDB||e.mozIndexedDB||e.webkitIndexedDB||e.msIndexedDB||e.shimIndexedDB;if(null==t)throw new Error("The current browser does not appear to support IndexedDB.");return t}function Zf(e){var t=e.result;t.createObjectStore(Hf,{keyPath:"modelPath"}),t.createObjectStore(Gf,{keyPath:"modelPath"})}var Kf=function(){function e(e){if(this.indexedDB=Xf(),null==e||!e)throw new Error("For IndexedDB, modelPath must not be null, undefined or empty.");this.modelPath=e}return e.prototype.save=function(e){return D(this,void 0,void 0,(function(){return B(this,(function(t){if(e.modelTopology instanceof ArrayBuffer)throw new Error("BrowserLocalStorage.save() does not support saving model topology in binary formats yet.");return[2,this.databaseAction(this.modelPath,e)]}))}))},e.prototype.load=function(){return D(this,void 0,void 0,(function(){return B(this,(function(e){return[2,this.databaseAction(this.modelPath)]}))}))},e.prototype.databaseAction=function(e,t){var n=this;return new Promise((function(e,r){var o=n.indexedDB.open("tensorflowjs",1);o.onupgradeneeded=function(){return Zf(o)},o.onsuccess=function(){var i=o.result;if(null==t){var a=i.transaction(Hf,"readonly"),s=a.objectStore(Hf).get(n.modelPath);s.onsuccess=function(){if(null==s.result)return i.close(),r(new Error("Cannot find model with path '"+n.modelPath+"' in IndexedDB."));e(s.result.modelArtifacts)},s.onerror=function(e){return i.close(),r(s.error)},a.oncomplete=function(){return i.close()}}else{var u,c=Uf(t),l=i.transaction(Gf,"readwrite"),f=l.objectStore(Gf),p=f.put({modelPath:n.modelPath,modelArtifactsInfo:c});p.onsuccess=function(){var o=(u=i.transaction(Hf,"readwrite")).objectStore(Hf).put({modelPath:n.modelPath,modelArtifacts:t,modelArtifactsInfo:c});o.onsuccess=function(){return e({modelArtifactsInfo:c})},o.onerror=function(e){var t=(f=l.objectStore(Gf)).delete(n.modelPath);t.onsuccess=function(){return i.close(),r(o.error)},t.onerror=function(e){return i.close(),r(o.error)}}},p.onerror=function(e){return i.close(),r(p.error)},l.oncomplete=function(){null==u?i.close():u.oncomplete=function(){return i.close()}}}},o.onerror=function(e){return r(o.error)}}))},e.URL_SCHEME="indexeddb://",e}(),Jf=function(e){return P().getBool("IS_BROWSER")&&!Array.isArray(e)&&e.startsWith(Kf.URL_SCHEME)?(t=e.slice(Kf.URL_SCHEME.length),new Kf(t)):null;var t};Wf.registerSaveRouter(Jf),Wf.registerLoadRouter(Jf);var Yf=function(){function e(){this.indexedDB=Xf()}return e.prototype.listModels=function(){return D(this,void 0,void 0,(function(){var e=this;return B(this,(function(t){return[2,new Promise((function(t,n){var r=e.indexedDB.open("tensorflowjs",1);r.onupgradeneeded=function(){return Zf(r)},r.onsuccess=function(){var e=r.result,o=e.transaction(Gf,"readonly"),i=o.objectStore(Gf).getAll();i.onsuccess=function(){for(var e={},n=0,r=i.result;n<r.length;n++){var o=r[n];e[o.modelPath]=o.modelArtifactsInfo}t(e)},i.onerror=function(t){return e.close(),n(i.error)},o.oncomplete=function(){return e.close()}},r.onerror=function(e){return n(r.error)}}))]}))}))},e.prototype.removeModel=function(e){return D(this,void 0,void 0,(function(){var t=this;return B(this,(function(n){var r;return e=(r=e).startsWith(Kf.URL_SCHEME)?r.slice(Kf.URL_SCHEME.length):r,[2,new Promise((function(n,r){var o=t.indexedDB.open("tensorflowjs",1);o.onupgradeneeded=function(){return Zf(o)},o.onsuccess=function(){var t,i=o.result,a=i.transaction(Gf,"readwrite"),s=a.objectStore(Gf),u=s.get(e);u.onsuccess=function(){if(null==u.result)return i.close(),r(new Error("Cannot find model with path '"+e+"' in IndexedDB."));var o=s.delete(e),a=function(){var o=(t=i.transaction(Hf,"readwrite")).objectStore(Hf).delete(e);o.onsuccess=function(){return n(u.result.modelArtifactsInfo)},o.onerror=function(e){return r(u.error)}};o.onsuccess=a,o.onerror=function(e){return a(),i.close(),r(u.error)}},u.onerror=function(e){return i.close(),r(u.error)},a.oncomplete=function(){null==t?i.close():t.oncomplete=function(){return i.close()}}},o.onerror=function(e){return r(o.error)}}))]}))}))},e}();if(P().getBool("IS_BROWSER"))try{qf.registerManager(Kf.URL_SCHEME,new Yf)}catch(R){}var $f="/",ep="tensorflowjs_models",tp="info",np="model_topology",rp="weight_specs",op="weight_data",ip="model_metadata";function ap(e){return{info:[ep,e,tp].join($f),topology:[ep,e,np].join($f),weightSpecs:[ep,e,rp].join($f),weightData:[ep,e,op].join($f),modelMetadata:[ep,e,ip].join($f)}}function sp(e){var t=e.split($f);if(t.length<3)throw new Error("Invalid key format: "+e);return t.slice(1,t.length-1).join($f)}var up=function(){function e(e){if(!P().getBool("IS_BROWSER")||"undefined"==typeof window||void 0===window.localStorage)throw new Error("The current environment does not support local storage.");if(this.LS=window.localStorage,null==e||!e)throw new Error("For local storage, modelPath must not be null, undefined or empty.");this.modelPath=e,this.keys=ap(this.modelPath)}return e.prototype.save=function(e){return D(this,void 0,void 0,(function(){var t,n,r;return B(this,(function(o){if(e.modelTopology instanceof ArrayBuffer)throw new Error("BrowserLocalStorage.save() does not support saving model topology in binary formats yet.");t=JSON.stringify(e.modelTopology),n=JSON.stringify(e.weightSpecs),r=Uf(e);try{return this.LS.setItem(this.keys.info,JSON.stringify(r)),this.LS.setItem(this.keys.topology,t),this.LS.setItem(this.keys.weightSpecs,n),this.LS.setItem(this.keys.weightData,function(e){if(Pf)return T.from(e).toString("base64");for(var t=new Uint8Array(e),n="",r=0,o=t.length;r<o;r++)n+=String.fromCharCode(t[r]);return btoa(n)}(e.weightData)),this.LS.setItem(this.keys.modelMetadata,JSON.stringify({format:e.format,generatedBy:e.generatedBy,convertedBy:e.convertedBy,userDefinedMetadata:e.userDefinedMetadata})),[2,{modelArtifactsInfo:r}]}catch(e){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="+r.modelTopologyBytes+", weightSpecsBytes="+r.weightSpecsBytes+", weightDataBytes="+r.weightDataBytes+".")}return[2]}))}))},e.prototype.load=function(){return D(this,void 0,void 0,(function(){var e,t,n,r,o,i,a;return B(this,(function(s){if(null==(e=JSON.parse(this.LS.getItem(this.keys.info))))throw new Error("In local storage, there is no model with name '"+this.modelPath+"'");if("JSON"!==e.modelTopologyType)throw new Error("BrowserLocalStorage does not support loading non-JSON model topology yet.");if(t={},null==(n=JSON.parse(this.LS.getItem(this.keys.topology))))throw new Error("In local storage, the topology of model '"+this.modelPath+"' is missing.");if(t.modelTopology=n,null==(r=JSON.parse(this.LS.getItem(this.keys.weightSpecs))))throw new Error("In local storage, the weight specs of model '"+this.modelPath+"' are missing.");if(t.weightSpecs=r,null!=(o=this.LS.getItem(this.keys.modelMetadata))&&(i=JSON.parse(o),t.format=i.format,t.generatedBy=i.generatedBy,t.convertedBy=i.convertedBy,t.userDefinedMetadata=i.userDefinedMetadata),null==(a=this.LS.getItem(this.keys.weightData)))throw new Error("In local storage, the binary weight values of model '"+this.modelPath+"' are missing.");return t.weightData=function(e){if(Pf){var t=T.from(e,"base64");return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}for(var n=atob(e),r=new Uint8Array(n.length),o=0;o<n.length;++o)r.set([n.charCodeAt(o)],o);return r.buffer}(a),[2,t]}))}))},e.URL_SCHEME="localstorage://",e}(),cp=function(e){return P().getBool("IS_BROWSER")&&!Array.isArray(e)&&e.startsWith(up.URL_SCHEME)?(t=e.slice(up.URL_SCHEME.length),new up(t)):null;var t};Wf.registerSaveRouter(cp),Wf.registerLoadRouter(cp);var lp=function(){function e(){Z(P().getBool("IS_BROWSER"),(function(){return"Current environment is not a web browser"})),Z("undefined"==typeof window||void 0!==window.localStorage,(function(){return"Current browser does not appear to support localStorage"})),this.LS=window.localStorage}return e.prototype.listModels=function(){return D(this,void 0,void 0,(function(){var e,t,n,r,o,i;return B(this,(function(a){for(e={},t=ep+$f,n=$f+tp,r=0;r<this.LS.length;++r)(o=this.LS.key(r)).startsWith(t)&&o.endsWith(n)&&(i=sp(o),e[i]=JSON.parse(this.LS.getItem(o)));return[2,e]}))}))},e.prototype.removeModel=function(e){return D(this,void 0,void 0,(function(){var t,n;return B(this,(function(r){var o;if(e=(o=e).startsWith(up.URL_SCHEME)?o.slice(up.URL_SCHEME.length):o,t=ap(e),null==this.LS.getItem(t.info))throw new Error("Cannot find model at path '"+e+"'");return n=JSON.parse(this.LS.getItem(t.info)),this.LS.removeItem(t.info),this.LS.removeItem(t.topology),this.LS.removeItem(t.weightSpecs),this.LS.removeItem(t.weightData),[2,n]}))}))},e}();if(P().getBool("IS_BROWSER"))try{qf.registerManager(up.URL_SCHEME,new lp)}catch(R){}function fp(e){return new Promise((function(e){return setTimeout(e)})).then(e)}var pp=function(){function e(t){if(!P().getBool("IS_BROWSER"))throw new Error("browserDownloads() cannot proceed because the current environment is not a browser.");t.startsWith(e.URL_SCHEME)&&(t=t.slice(e.URL_SCHEME.length)),null!=t&&0!==t.length||(t="model"),this.modelTopologyFileName=t+".json",this.weightDataFileName=t+".weights.bin"}return e.prototype.save=function(e){return D(this,void 0,void 0,(function(){var t,n,r,o,i,a;return B(this,(function(s){switch(s.label){case 0:if("undefined"==typeof document)throw new Error("Browser downloads are not supported in this environment since `document` is not present");if(t=window.URL.createObjectURL(new Blob([e.weightData],{type:"application/octet-stream"})),!(e.modelTopology instanceof ArrayBuffer))return[3,1];throw new Error("BrowserDownloads.save() does not support saving model topology in binary formats yet.");case 1:return n=[{paths:["./"+this.weightDataFileName],weights:e.weightSpecs}],r={modelTopology:e.modelTopology,format:e.format,generatedBy:e.generatedBy,convertedBy:e.convertedBy,weightsManifest:n},o=window.URL.createObjectURL(new Blob([JSON.stringify(r)],{type:"application/json"})),(i=null==this.jsonAnchor?document.createElement("a"):this.jsonAnchor).download=this.modelTopologyFileName,i.href=o,[4,fp((function(){return i.dispatchEvent(new MouseEvent("click"))}))];case 2:return s.sent(),null==e.weightData?[3,4]:((a=null==this.weightDataAnchor?document.createElement("a"):this.weightDataAnchor).download=this.weightDataFileName,a.href=t,[4,fp((function(){return a.dispatchEvent(new MouseEvent("click"))}))]);case 3:s.sent(),s.label=4;case 4:return[2,{modelArtifactsInfo:Uf(e)}]}}))}))},e.URL_SCHEME="downloads://",e}(),hp=function(){function e(e){if(null==e||e.length<1)throw new Error("When calling browserFiles, at least 1 file is required, but received "+e);this.files=e}return e.prototype.load=function(){return D(this,void 0,void 0,(function(){var e,t,n=this;return B(this,(function(r){return e=this.files[0],t=this.files.slice(1),[2,new Promise((function(r,o){var i=new FileReader;i.onload=function(i){var a=JSON.parse(i.target.result),s=a.modelTopology;if(null!=s){0===t.length&&r({modelTopology:s});var u=a.weightsManifest;if(null!=u){var c;try{c=n.checkManifestAndWeightFiles(u,t)}catch(e){return void o(e)}var l=[],f=[],p=[];u.forEach((function(e){e.paths.forEach((function(e){f.push(e),p.push(null)})),l.push.apply(l,e.weights)})),u.forEach((function(e){e.paths.forEach((function(e){var t=new FileReader;t.onload=function(t){var n=t.target.result,o=f.indexOf(e);p[o]=n,-1===p.indexOf(null)&&r({modelTopology:s,weightSpecs:l,weightData:Ff(p),format:a.format,generatedBy:a.generatedBy,convertedBy:a.convertedBy,userDefinedMetadata:a.userDefinedMetadata})},t.onerror=function(t){return o("Failed to weights data from file of path '"+e+"'.")},t.readAsArrayBuffer(c[e])}))}))}else o(new Error("weightManifest field is missing from file "+e.name))}else o(new Error("modelTopology field is missing from file "+e.name))},i.onerror=function(t){return o("Failed to read model topology and weights manifest JSON from file '"+e.name+"'. BrowserFiles supports loading Keras-style tf.Model artifacts only.")},i.readAsText(e)}))]}))}))},e.prototype.checkManifestAndWeightFiles=function(e,t){for(var n=[],r=t.map((function(e){return Lf(e.name)})),o={},i=0,a=e;i<a.length;i++)a[i].paths.forEach((function(e){var i=Lf(e);if(-1!==n.indexOf(i))throw new Error("Duplicate file basename found in weights manifest: '"+i+"'");if(n.push(i),-1===r.indexOf(i))throw new Error("Weight file with basename '"+i+"' is not provided.");o[e]=t[r.indexOf(i)]}));if(n.length!==t.length)throw new Error("Mismatch in the number of files in weights manifest ("+n.length+") and the number of weight files provided ("+t.length+").");return o},e}();function dp(e,t,n,r){!function(e){Z(null!=e&&Array.isArray(e)&&e.length>0,(function(){return"promises must be a none empty array"}))}(e),function(e,t){Z(e>=0&&e<=1,(function(){return"Progress fraction must be in range [0, 1], but got startFraction "+e})),Z(t>=0&&t<=1,(function(){return"Progress fraction must be in range [0, 1], but got endFraction "+t})),Z(t>=e,(function(){return"startFraction must be no more than endFraction, but got startFraction "+e+" and endFraction "+t}))}(n=null==n?0:n,r=null==r?1:r);var o=0;return Promise.all(e.map((function(i){return i.then((function(i){var a=n+ ++o/e.length*(r-n);return t(a),i})),i})))}function mp(e,t){return D(this,void 0,void 0,(function(){var n,r,o,i,a,s,u,c,l;return B(this,(function(f){switch(f.label){case 0:return null==t&&(t={}),n=null==t.fetchFunc?P().platform.fetch:t.fetchFunc,r=e.map((function(e){return n(e,t.requestInit,{isBinary:!0})})),o=0,i=.5,null!=t.onProgress?[3,2]:[4,Promise.all(r)];case 1:return a=f.sent(),[3,4];case 2:return[4,dp(r,t.onProgress,o,i)];case 3:a=f.sent(),f.label=4;case 4:return s=a.map((function(e){return e.arrayBuffer()})),u=.5,c=1,null!=t.onProgress?[3,6]:[4,Promise.all(s)];case 5:return l=f.sent(),[3,8];case 6:return[4,dp(s,t.onProgress,u,c)];case 7:l=f.sent(),f.label=8;case 8:return[2,l]}}))}))}function gp(e){var t=this;return function(n,r,o){return void 0===r&&(r=""),D(t,void 0,void 0,(function(){var t,i,a,s,u,c,l,f,p,h;return B(this,(function(d){switch(d.label){case 0:if(t=n.map((function(){return!1})),i={},a=null!=o?o.map((function(){return!1})):[],s=[],n.forEach((function(e,n){var r=0;e.weights.forEach((function(e){var u="quantization"in e?e.quantization.dtype:e.dtype,c=Bf[u]*$(e.shape),l=function(){t[n]=!0,null==i[n]&&(i[n]=[]),i[n].push({manifestEntry:e,groupOffset:r,sizeBytes:c})};null!=o?o.forEach((function(t,n){t===e.name&&(l(),a[n]=!0)})):l(),s.push(e.name),r+=c}))})),!a.every((function(e){return e})))throw u=o.filter((function(e,t){return!a[t]})),new Error("Could not find weights in manifest with names: "+u.join(", ")+". \nManifest JSON has weights with names: "+s.join(", ")+".");return c=t.reduce((function(e,t,n){return t&&e.push(n),e}),[]),l=[],c.forEach((function(e){n[e].paths.forEach((function(e){var t=r+(r.endsWith("/")?"":"/")+e;l.push(t)}))})),[4,e(l)];case 1:return f=d.sent(),p={},h=0,c.forEach((function(e){for(var t=n[e].paths.length,r=0,o=0;o<t;o++)r+=f[h+o].byteLength;for(var a=new ArrayBuffer(r),s=new Uint8Array(a),u=0,c=0;c<t;c++){var l=new Uint8Array(f[h+c]);s.set(l,u),u+=l.byteLength}i[e].forEach((function(e){var t=_f(a.slice(e.groupOffset,e.groupOffset+e.sizeBytes),[e.manifestEntry]);for(var n in t)p[n]=t[n]})),h+=t})),[2,p]}}))}))}}Wf.registerSaveRouter((function(e){return P().getBool("IS_BROWSER")&&!Array.isArray(e)&&e.startsWith(pp.URL_SCHEME)?function(e){return void 0===e&&(e="model"),new pp(e)}(e.slice(pp.URL_SCHEME.length)):null}));var vp=function(){function e(e,t){if(this.DEFAULT_METHOD="POST",null==t&&(t={}),this.weightPathPrefix=t.weightPathPrefix,this.onProgress=t.onProgress,null!=t.fetchFunc?(Z("function"==typeof t.fetchFunc,(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=t.fetchFunc):this.fetch=P().platform.fetch,Z(null!=e&&e.length>0,(function(){return"URL path for http must not be null, undefined or empty."})),Array.isArray(e)&&Z(2===e.length,(function(){return"URL paths for http must have a length of 2, (actual length is "+e.length+")."})),this.path=e,null!=t.requestInit&&null!=t.requestInit.body)throw new Error("requestInit is expected to have no pre-existing body, but has one.");this.requestInit=t.requestInit||{}}return e.prototype.save=function(e){return D(this,void 0,void 0,(function(){var t,n,r,o;return B(this,(function(i){switch(i.label){case 0:if(e.modelTopology instanceof ArrayBuffer)throw new Error("BrowserHTTPRequest.save() does not support saving model topology in binary formats yet.");return(t=Object.assign({method:this.DEFAULT_METHOD},this.requestInit)).body=new FormData,n=[{paths:["./model.weights.bin"],weights:e.weightSpecs}],r={modelTopology:e.modelTopology,format:e.format,generatedBy:e.generatedBy,convertedBy:e.convertedBy,userDefinedMetadata:e.userDefinedMetadata,weightsManifest:n},t.body.append("model.json",new Blob([JSON.stringify(r)],{type:"application/json"}),"model.json"),null!=e.weightData&&t.body.append("model.weights.bin",new Blob([e.weightData],{type:"application/octet-stream"}),"model.weights.bin"),[4,this.fetch(this.path,t)];case 1:if((o=i.sent()).ok)return[2,{modelArtifactsInfo:Uf(e),responses:[o]}];throw new Error("BrowserHTTPRequest.save() failed due to HTTP response status "+o.status+".")}}))}))},e.prototype.load=function(){return D(this,void 0,void 0,(function(){var e,t,n,r,o,i,a,s,u,c,l,f;return B(this,(function(p){switch(p.label){case 0:return[4,this.fetch(this.path,this.requestInit)];case 1:if(!(e=p.sent()).ok)throw new Error("Request to "+this.path+" failed with status code "+e.status+". Please verify this URL points to the model JSON of the model to load.");p.label=2;case 2:return p.trys.push([2,4,,5]),[4,e.json()];case 3:return t=p.sent(),[3,5];case 4:throw p.sent(),n="Failed to parse model JSON of response from "+this.path+".",this.path.endsWith(".pb")?n+=" 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.":n+=" Please make sure the server is serving valid JSON for this request.",new Error(n);case 5:if(r=t.modelTopology,o=t.weightsManifest,i=t.generatedBy,a=t.convertedBy,s=t.format,u=t.userDefinedMetadata,null==r&&null==o)throw new Error("The JSON from HTTP path "+this.path+" contains neither model topology or manifest for weights.");return null==o?[3,7]:[4,this.loadWeights(o)];case 6:f=p.sent(),c=f[0],l=f[1],p.label=7;case 7:return[2,{modelTopology:r,weightSpecs:c,weightData:l,userDefinedMetadata:u,generatedBy:i,convertedBy:a,format:s}]}}))}))},e.prototype.loadWeights=function(e){return D(this,void 0,void 0,(function(){var t,n,r,o,i,a,s,u,c,l,f;return B(this,(function(p){switch(p.label){case 0:for(t=Array.isArray(this.path)?this.path[1]:this.path,n=function(e){var t=e.lastIndexOf("/"),n=e.lastIndexOf("?");return[e.substring(0,t)+"/",n>t?e.substring(n):""]}(t),r=n[0],o=n[1],i=this.weightPathPrefix||r,a=[],s=0,u=e;s<u.length;s++)c=u[s],a.push.apply(a,c.weights);return l=[],e.forEach((function(e){e.paths.forEach((function(e){l.push(i+e+o)}))})),[4,mp(l,{requestInit:this.requestInit,fetchFunc:this.fetch,onProgress:this.onProgress})];case 1:return f=p.sent(),[2,[a,Ff(f)]]}}))}))},e.URL_SCHEME_REGEX=/^https?:\/\//,e}();function yp(e){return null!=e.match(vp.URL_SCHEME_REGEX)}var bp=function(e,t){return"undefined"==typeof fetch?null:(Array.isArray(e)?e.every((function(e){return yp(e)})):yp(e))?wp(e,{onProgress:t}):null};function wp(e,t){return new vp(e,t)}Wf.registerSaveRouter(bp),Wf.registerLoadRouter(bp);var xp,Ap=function(){function e(e){this.modelArtifacts=e}return e.prototype.load=function(){return D(this,void 0,void 0,(function(){return B(this,(function(e){return[2,this.modelArtifacts]}))}))},e}(),Ep=function(){function e(e){this.saveHandler=e}return e.prototype.save=function(e){return D(this,void 0,void 0,(function(){return B(this,(function(t){return[2,this.saveHandler(e)]}))}))},e}(),Cp=Object.freeze({browserFiles:function(e){return new hp(e)},browserHTTPRequest:function(e,t){return wp(e,t)},concatenateArrayBuffers:Ff,decodeWeights:_f,encodeWeights:function(e,t){return D(this,void 0,void 0,(function(){var n,r,o,i,a,s=this;return B(this,(function(u){switch(u.label){case 0:for(n=[],r=[],o=Array.isArray(e)?e.map((function(e){return e.name})):Object.keys(e),i=function(i){var a=o[i],u=Array.isArray(e)?e[i].tensor:e[a];if("float32"!==u.dtype&&"int32"!==u.dtype&&"bool"!==u.dtype&&"string"!==u.dtype)throw new Error("Unsupported dtype in weight '"+a+"': "+u.dtype);var c={name:a,shape:u.shape,dtype:u.dtype};if("string"===u.dtype){var l=new Promise((function(e){return D(s,void 0,void 0,(function(){var t,n,r,o,i,a,s;return B(this,(function(c){switch(c.label){case 0:return[4,u.bytes()];case 1:for(t=c.sent(),n=t.reduce((function(e,t){return e+t.length}),0)+4*t.length,r=new Uint8Array(n),o=0,i=0;i<t.length;i++)a=t[i],s=new Uint8Array(new Uint32Array([a.length]).buffer),r.set(s,o),o+=4,r.set(a,o),o+=a.length;return e(r),[2]}}))}))}));r.push(l)}else r.push(u.data());null!=t&&(c.group=t),n.push(c)},a=0;a<o.length;++a)i(a);return[4,Promise.all(r)];case 1:return[2,{data:Nf(u.sent()),specs:n}]}}))}))},fromMemory:function(e,t,n,r){return 1===arguments.length?null!=e.modelTopology||null!=e.weightSpecs?new Ap(e):(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 Ap({modelTopology:e})):(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 Ap({modelTopology:e,weightSpecs:t,weightData:n,trainingConfig:r}))},getLoadHandlers:function(e,t){return Wf.getLoadHandlers(e,t)},getModelArtifactsInfoForJSON:Uf,getSaveHandlers:function(e){return Wf.getSaveHandlers(e)},http:wp,isHTTPScheme:yp,loadWeights:function(e,t,n,r){return void 0===t&&(t=""),D(this,void 0,void 0,(function(){return B(this,(function(o){return[2,gp((function(e){return mp(e,{requestInit:r})}))(e,t,n)]}))}))},registerLoadRouter:function(e){return Wf.registerLoadRouter(e)},registerSaveRouter:function(e){return Wf.registerSaveRouter(e)},weightsLoaderFactory:gp,withSaveHandler:function(e){return new Ep(e)},copyModel:function(e,t){return D(this,void 0,void 0,(function(){return B(this,(function(n){return[2,Vf(e,t,!1)]}))}))},listModels:function(){return D(this,void 0,void 0,(function(){var e,t,n,r,o,i,a;return B(this,(function(s){switch(s.label){case 0:e=qf.getSchemes(),t={},n=0,r=e,s.label=1;case 1:return n<r.length?(o=r[n],[4,qf.getManager(o).listModels()]):[3,4];case 2:for(a in i=s.sent())t[o+zf+a]=i[a];s.label=3;case 3:return n++,[3,1];case 4:return[2,t]}}))}))},moveModel:function(e,t){return D(this,void 0,void 0,(function(){return B(this,(function(n){return[2,Vf(e,t,!0)]}))}))},removeModel:function(e){return D(this,void 0,void 0,(function(){var t;return B(this,(function(n){return t=Qf(e),[2,qf.getManager(t.scheme).removeModel(t.path)]}))}))}}),kp=Tn({confusionMatrix_:function(e,t,n){var r=vn(e,"labels","confusionMatrix"),o=vn(t,"predictions","confusionMatrix");Z(null==n||n>0&&Number.isInteger(n),(function(){return"If provided, numClasses must be a positive integer, but got "+n})),Z(1===r.rank,(function(){return"Expected the rank of labels to be 1, but got "+r.rank})),Z(1===o.rank,(function(){return"Expected the rank of predictions to be 1, but got "+o.rank})),Z(r.shape[0]===o.shape[0],(function(){return"Mismatch in the number of examples: "+r.shape[0]+" vs. "+o.shape[0]+". Labels and predictions should have the same number of elements."})),Z(n>0&&Number.isInteger(n),(function(){return"numClasses is required to be a positive integer, but got "+n}));var i=wr(r.asType("int32"),n),a=wr(o.asType("int32"),n);return i.transpose().matMul(a).asType("int32")}}),Ip=(Object.freeze({confusionMatrix:kp}),Tn({fromPixels_:function(e,t){if(void 0===t&&(t=3),t>4)throw new Error("Cannot construct Tensor with more than 4 channels from pixels.");if(null==e)throw new Error("pixels passed to tf.browser.fromPixels() can not be null");var n=!1,r=!1,o=!1,i=!1,a=!1;if(e.data instanceof Uint8Array)n=!0;else if("undefined"!=typeof ImageData&&e instanceof ImageData)r=!0;else if("undefined"!=typeof HTMLVideoElement&&e instanceof HTMLVideoElement)o=!0;else if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement)i=!0;else{if(null==e.getContext)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 "+e.constructor.name);a=!0}if(o&&o&&e.readyState<2)throw new Error("The video element has not loaded data yet. Please wait for `loadeddata` event on the <video> element.");if(null!=U("FromPixels",it.backendName))return it.runKernel("FromPixels",{pixels:e},{numChannels:t});var s,u,c=o?[e.videoWidth,e.videoHeight]:[e.width,e.height],l=c[0],f=c[1];if(a?s=e.getContext("2d").getImageData(0,0,l,f).data:r||n?s=e.data:(i||o)&&(null==xp&&(xp=document.createElement("canvas").getContext("2d")),xp.canvas.width=l,xp.canvas.height=f,xp.drawImage(e,0,0,l,f),s=xp.getImageData(0,0,l,f).data),4===t)u=new Int32Array(s);else{var p=l*f;u=new Int32Array(p*t);for(var h=0;h<p;h++)for(var d=0;d<t;++d)u[h*t+d]=s[4*h+d]}return Fn(u,[f,l,t],"int32")}})),Sp=Object.freeze({toPixels:function(e,t){return D(this,void 0,void 0,(function(){var n,r,o,i,a,s,u,c,l,f,p,h,d,m,g,v,y,b,w,x,A,E,C;return B(this,(function(k){switch(k.label){case 0:if(n=vn(e,"img","toPixels"),e instanceof qe||(n=n.toInt()),2!==n.rank&&3!==n.rank)throw new Error("toPixels only supports rank 2 or 3 tensors, got rank "+n.rank+".");if(r=n.shape.slice(0,2),o=r[0],i=r[1],(a=2===n.rank?1:n.shape[2])>4||2===a)throw new Error("toPixels only supports depth of size 1, 3 or 4 but got "+a);return[4,n.data()];case 1:return s=k.sent(),u=n.min(),c=n.max(),[4,Promise.all([u.data(),c.data()])];case 2:if(l=k.sent(),f=l[0],p=l[1],h=f[0],d=p[0],u.dispose(),c.dispose(),"float32"===n.dtype){if(h<0||d>1)throw new Error("Tensor values for a float32 Tensor must be in the range [0 - 1] but got range ["+h+" - "+d+"].")}else{if("int32"!==n.dtype)throw new Error("Unsupported type for toPixels: "+n.dtype+". Please use float32 or int32 tensors.");if(h<0||d>255)throw new Error("Tensor values for a int32 Tensor must be in the range [0 - 255] but got range ["+h+" - "+d+"].")}for(m="float32"===n.dtype?255:1,g=new Uint8ClampedArray(i*o*4),v=0;v<o*i;++v)y=void 0,b=void 0,w=void 0,x=void 0,1===a?(y=s[v]*m,b=s[v]*m,w=s[v]*m,x=255):3===a?(y=s[3*v]*m,b=s[3*v+1]*m,w=s[3*v+2]*m,x=255):4===a&&(y=s[4*v]*m,b=s[4*v+1]*m,w=s[4*v+2]*m,x=s[4*v+3]*m),g[0+(A=4*v)]=Math.round(y),g[A+1]=Math.round(b),g[A+2]=Math.round(w),g[A+3]=Math.round(x);return null!=t&&(t.width=i,t.height=o,E=t.getContext("2d"),C=new ImageData(g,i,o),E.putImageData(C,0,0)),n!==e&&n.dispose(),[2,g]}}))}))},fromPixels:Ip}),jp=function(){function e(){}return e.prototype.getClassName=function(){return this.constructor.className},e.fromConfig=function(e,t){return new e(t)},e}(),Tp=function(){function e(){this.classNameMap={}}return e.getMap=function(){return null==e.instance&&(e.instance=new e),e.instance},e.register=function(t){e.getMap().classNameMap[t.className]=[t,t.fromConfig]},e}();function Rp(e){Z(null!=e.className,(function(){return"Class being registered does not have the static className property defined."})),Z("string"==typeof e.className,(function(){return"className is required to be a string, but got type "+typeof e.className})),Z(e.className.length>0,(function(){return"Class being registered has an empty-string as its className, which is disallowed."})),Tp.register(e)}Object.freeze({Serializable:jp,SerializationMap:Tp,registerClass:Rp});function Op(){return 32===it.backend.floatPrecision()?.001:.1}function Dp(e,t,n){var r=!0;if((de(e)||de(t))&&(r=!1),de(e)&&de(t)&&(r=!0),r){var o=e.constructor.name,i=t.constructor.name;if(o!==i)throw new Error("Arrays are of different type. Actual: "+o+". Expected: "+i)}if(Array.isArray(e)&&Array.isArray(t)){var a=mn(e),s=mn(t);if(!ee(a,s))throw new Error("Arrays have different shapes. Actual: ["+a+"]. Expected: ["+s+"]")}var u=de(e)?e:Y(e),c=de(t)?t:Y(t);if(u.length!==c.length)throw new Error("Arrays have different lengths actual: "+u.length+" vs expected: "+c.length+".\nActual: "+u+".\nExpected: "+c+".");for(var l=0;l<c.length;++l){var f=u[l],p=c[l];if(!n(f,p))throw new Error("Arrays differ: actual["+l+"] = "+f+", expected["+l+"] = "+p+".\nActual: "+u+".\nExpected: "+c+".")}}function Bp(e,t,n){return!isFinite(e)&&!isFinite(t)||!(isNaN(e)||isNaN(t)||Math.abs(e-t)>n)}Object.freeze({TEST_EPSILON_FLOAT16:.1,expectArraysClose:function(e,t,n){return null==n&&(n=Op()),Dp(e,t,(function(e,t){return Bp(e,t,n)}))},testEpsilon:Op,expectPromiseToFail:function(e,t){e().then((function(){return t.fail()}),(function(){return t()}))},expectArraysEqual:function(e,t){var n="string"==typeof t||"number"==typeof t||"boolean"==typeof t?[t]:t;return ve(e)||ve(e[0])||ve(t)||ve(t[0])?Dp(e,n,(function(e,t){return e==t})):Dp(e,t,(function(e,t){return Bp(e,t,0)}))},expectNumbersClose:function(e,t,n){if(null==n&&(n=Op()),!Bp(e,t,n))throw new Error("Numbers differ: actual === "+e+", expected === "+t)},expectValuesInRange:function(e,t,n){for(var r=0;r<e.length;r++)if(e[r]<t||e[r]>n)throw new Error("Value out of range:"+e[r]+" low: "+t+", high: "+n)},expectArrayBuffersEqual:function(e,t){expect(new Float32Array(e)).toEqual(new Float32Array(t))}}),Object.freeze({gpgpu_util:ma,webgl_util:cn,forceHalfFloat:function(){P().set("WEBGL_FORCE_F16_TEXTURES",!0)},MathBackendWebGL:Rs,setWebGLContext:ht,GPGPUContext:ga});var _p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return O(t,e),t.prototype.minimize=function(e,t,n){void 0===t&&(t=!1);var r=this.computeGradients(e,n),o=r.value,i=r.grads;if(null!=n){var a=n.map((function(e){return{name:e.name,tensor:i[e.name]}}));this.applyGradients(a)}else this.applyGradients(i);return hn(i),t?o:(o.dispose(),null)},Object.defineProperty(t.prototype,"iterations",{get:function(){return null==this.iterations_&&(this.iterations_=0),this.iterations_},enumerable:!0,configurable:!0}),t.prototype.incrementIterations=function(){this.iterations_=this.iterations+1},t.prototype.computeGradients=function(e,t){return function(e,t){Z(xe(e),(function(){return"The f passed in variableGrads(f) must be a function"})),Z(null==t||Array.isArray(t)&&t.every((function(e){return e instanceof Ze})),(function(){return"The varList passed in variableGrads(f, varList) must be an array of variables"}));var n=null!=t;if(!n)for(var r in t=[],it.registeredVariables)t.push(it.registeredVariables[r]);var o=n?t.filter((function(e){return!e.trainable})):null,i=t.length;Z((t=t.filter((function(e){return e.trainable}))).length>0,(function(){return"variableGrads() expects at least one of the input variables to be trainable, but none of the "+i+" variables is trainable."}));var a=it.gradients(e,t,null,!0),s=a.value,u=a.grads;Z(u.some((function(e){return null!=e})),(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()."})),Z(0===s.rank,(function(){return"The f passed in variableGrads(f) must return a scalar, but it returned a rank-"+s.rank+" tensor"}));var c={};return t.forEach((function(e,t){null!=u[t]&&(c[e.name]=u[t])})),null!=o&&o.forEach((function(e){return c[e.name]=null})),{value:s,grads:c}}(e,t)},t.prototype.dispose=function(){null!=this.iterations_&&hn(this.iterations_)},t.prototype.saveIterations=function(){return D(this,void 0,void 0,(function(){return B(this,(function(e){return null==this.iterations_&&(this.iterations_=0),[2,{name:"iter",tensor:Nn(this.iterations_,"int32")}]}))}))},t.prototype.getWeights=function(){return D(this,void 0,void 0,(function(){return B(this,(function(e){throw new Error("getWeights() is not implemented for this optimizer yet.")}))}))},t.prototype.setWeights=function(e){return D(this,void 0,void 0,(function(){return B(this,(function(e){throw new Error("setWeights() is not implemented for this optimizer class "+this.getClassName())}))}))},t.prototype.extractIterations=function(e){return D(this,void 0,void 0,(function(){var t;return B(this,(function(n){switch(n.label){case 0:return t=this,[4,e[0].tensor.data()];case 1:return t.iterations_=n.sent()[0],[2,e.slice(1)]}}))}))},t}(jp);Object.defineProperty(_p,Symbol.hasInstance,{value:function(e){return null!=e.minimize&&null!=e.computeGradients&&null!=e.applyGradients}});var Np=function(e){function t(t,n,r){void 0===r&&(r=null);var o=e.call(this)||this;return o.learningRate=t,o.rho=n,o.epsilon=r,o.accumulatedGrads=[],o.accumulatedUpdates=[],null==r&&(o.epsilon=it.backend.epsilon()),o}return O(t,e),t.prototype.applyGradients=function(e){var t=this;(Array.isArray(e)?e.map((function(e){return e.name})):Object.keys(e)).forEach((function(n,r){var o=it.registeredVariables[n];null==t.accumulatedGrads[r]&&(t.accumulatedGrads[r]={originalName:n+"/accum_grad",variable:pn((function(){return Vn(o).variable(!1)}))}),null==t.accumulatedUpdates[r]&&(t.accumulatedUpdates[r]={originalName:n+"/accum_var",variable:pn((function(){return Vn(o).variable(!1)}))});var i=Array.isArray(e)?e[r].tensor:e[n];if(null!=i){var a=t.accumulatedGrads[r].variable,s=t.accumulatedUpdates[r].variable;pn((function(){var e=a.mul(t.rho).add(i.square().mul(1-t.rho)),n=s.add(t.epsilon).sqrt().div(a.add(t.epsilon).sqrt()).mul(i),r=s.mul(t.rho).add(n.square().mul(1-t.rho));a.assign(e),s.assign(r);var u=n.mul(-t.learningRate).add(o);o.assign(u)}))}})),this.incrementIterations()},t.prototype.dispose=function(){null!=this.accumulatedUpdates&&(hn(this.accumulatedGrads.map((function(e){return e.variable}))),hn(this.accumulatedUpdates.map((function(e){return e.variable}))))},t.prototype.getWeights=function(){return D(this,void 0,void 0,(function(){var e;return B(this,(function(t){switch(t.label){case 0:return e=this.accumulatedGrads.concat(this.accumulatedUpdates),[4,this.saveIterations()];case 1:return[2,[t.sent()].concat(e.map((function(e){return{name:e.originalName,tensor:e.variable}})))]}}))}))},t.prototype.setWeights=function(e){return D(this,void 0,void 0,(function(){var t;return B(this,(function(n){switch(n.label){case 0:return[4,this.extractIterations(e)];case 1:return e=n.sent(),t=e.length/2,this.accumulatedGrads=e.slice(0,t).map((function(e){return{originalName:e.name,variable:e.tensor.variable(!1)}})),this.accumulatedUpdates=e.slice(t,2*t).map((function(e){return{originalName:e.name,variable:e.tensor.variable(!1)}})),[2]}}))}))},t.prototype.getConfig=function(){return{learningRate:this.learningRate,rho:this.rho,epsilon:this.epsilon}},t.fromConfig=function(e,t){return new e(t.learningRate,t.rho,t.epsilon)},t.className="Adadelta",t}(_p);Rp(Np);var Pp=function(e){function t(t,n){void 0===n&&(n=.1);var r=e.call(this)||this;return r.learningRate=t,r.initialAccumulatorValue=n,r.accumulatedGrads=[],r}return O(t,e),t.prototype.applyGradients=function(e){var t=this;(Array.isArray(e)?e.map((function(e){return e.name})):Object.keys(e)).forEach((function(n,r){var o=it.registeredVariables[n];null==t.accumulatedGrads[r]&&(t.accumulatedGrads[r]={originalName:n+"/accumulator",variable:pn((function(){return zn(o.shape,t.initialAccumulatorValue).variable(!1)}))});var i=Array.isArray(e)?e[r].tensor:e[n];if(null!=i){var a=t.accumulatedGrads[r].variable;pn((function(){var e=a.add(i.square());a.assign(e);var n=i.div(e.add(it.backend.epsilon()).sqrt()).mul(-t.learningRate).add(o);o.assign(n)}))}})),this.incrementIterations()},t.prototype.dispose=function(){null!=this.accumulatedGrads&&hn(this.accumulatedGrads.map((function(e){return e.variable})))},t.prototype.getWeights=function(){return D(this,void 0,void 0,(function(){return B(this,(function(e){switch(e.label){case 0:return[4,this.saveIterations()];case 1:return[2,[e.sent()].concat(this.accumulatedGrads.map((function(e){return{name:e.originalName,tensor:e.variable}})))]}}))}))},t.prototype.setWeights=function(e){return D(this,void 0,void 0,(function(){return B(this,(function(t){switch(t.label){case 0:return[4,this.extractIterations(e)];case 1:return e=t.sent(),this.accumulatedGrads=e.map((function(e){return{originalName:e.name,variable:e.tensor.variable(!1)}})),[2]}}))}))},t.prototype.getConfig=function(){return{learningRate:this.learningRate,initialAccumulatorValue:this.initialAccumulatorValue}},t.fromConfig=function(e,t){return new e(t.learningRate,t.initialAccumulatorValue)},t.className="Adagrad",t}(_p);Rp(Pp);var Mp=function(e){function t(t,n,r,o){void 0===o&&(o=null);var i=e.call(this)||this;return i.learningRate=t,i.beta1=n,i.beta2=r,i.epsilon=o,i.accumulatedFirstMoment=[],i.accumulatedSecondMoment=[],pn((function(){i.accBeta1=Nn(n).variable(),i.accBeta2=Nn(r).variable()})),null==o&&(i.epsilon=it.backend.epsilon()),i}return O(t,e),t.prototype.applyGradients=function(e){var t=this,n=Array.isArray(e)?e.map((function(e){return e.name})):Object.keys(e);pn((function(){var r=$u(1,t.accBeta1),o=$u(1,t.accBeta2);n.forEach((function(n,i){var a=it.registeredVariables[n];null==t.accumulatedFirstMoment[i]&&(t.accumulatedFirstMoment[i]={originalName:n+"/m",variable:pn((function(){return Vn(a).variable(!1)}))}),null==t.accumulatedSecondMoment[i]&&(t.accumulatedSecondMoment[i]={originalName:n+"/v",variable:pn((function(){return Vn(a).variable(!1)}))});var s=Array.isArray(e)?e[i].tensor:e[n];if(null!=s){var u=t.accumulatedFirstMoment[i].variable,c=t.accumulatedSecondMoment[i].variable,l=u.mul(t.beta1).add(s.mul(1-t.beta1)),f=c.mul(t.beta2).add(s.square().mul(1-t.beta2)),p=l.div(r),h=f.div(o);u.assign(l),c.assign(f);var d=p.div(h.sqrt().add(t.epsilon)).mul(-t.learningRate).add(a);a.assign(d)}})),t.accBeta1.assign(t.accBeta1.mul(t.beta1)),t.accBeta2.assign(t.accBeta2.mul(t.beta2))})),this.incrementIterations()},t.prototype.dispose=function(){this.accBeta1.dispose(),this.accBeta2.dispose(),null!=this.accumulatedFirstMoment&&hn(this.accumulatedFirstMoment.map((function(e){return e.variable}))),null!=this.accumulatedSecondMoment&&hn(this.accumulatedSecondMoment.map((function(e){return e.variable})))},t.prototype.getWeights=function(){return D(this,void 0,void 0,(function(){var e;return B(this,(function(t){switch(t.label){case 0:return e=this.accumulatedFirstMoment.concat(this.accumulatedSecondMoment),[4,this.saveIterations()];case 1:return[2,[t.sent()].concat(e.map((function(e){return{name:e.originalName,tensor:e.variable}})))]}}))}))},t.prototype.setWeights=function(e){return D(this,void 0,void 0,(function(){var t,n=this;return B(this,(function(r){switch(r.label){case 0:return[4,this.extractIterations(e)];case 1:return e=r.sent(),pn((function(){n.accBeta1.assign(Ku(n.beta1,n.iterations_+1)),n.accBeta2.assign(Ku(n.beta2,n.iterations_+1))})),t=e.length/2,this.accumulatedFirstMoment=e.slice(0,t).map((function(e){return{originalName:e.name,variable:e.tensor.variable(!1)}})),this.accumulatedSecondMoment=e.slice(t,2*t).map((function(e){return{originalName:e.name,variable:e.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,t){return new e(t.learningRate,t.beta1,t.beta2,t.epsilon)},t.className="Adam",t}(_p);Rp(Mp);var Fp=function(e){function t(t,n,r,o,i){void 0===o&&(o=null),void 0===i&&(i=0);var a=e.call(this)||this;return a.learningRate=t,a.beta1=n,a.beta2=r,a.epsilon=o,a.decay=i,a.accumulatedFirstMoment=[],a.accumulatedWeightedInfNorm=[],pn((function(){a.iteration=Nn(0).variable(),a.accBeta1=Nn(n).variable()})),null==o&&(a.epsilon=it.backend.epsilon()),a}return O(t,e),t.prototype.applyGradients=function(e){var t=this,n=Array.isArray(e)?e.map((function(e){return e.name})):Object.keys(e);pn((function(){var r=$u(1,t.accBeta1),o=Fu(-t.learningRate,t.iteration.mul(t.decay).add(1));n.forEach((function(n,i){var a=it.registeredVariables[n];null==t.accumulatedFirstMoment[i]&&(t.accumulatedFirstMoment[i]={originalName:n+"/m",variable:Vn(a).variable(!1)}),null==t.accumulatedWeightedInfNorm[i]&&(t.accumulatedWeightedInfNorm[i]={originalName:n+"/v",variable:Vn(a).variable(!1)});var s=Array.isArray(e)?e[i].tensor:e[n];if(null!=s){var u=t.accumulatedFirstMoment[i].variable,c=t.accumulatedWeightedInfNorm[i].variable,l=u.mul(t.beta1).add(s.mul(1-t.beta1)),f=c.mul(t.beta2),p=s.abs(),h=f.maximum(p);u.assign(l),c.assign(h);var d=o.div(r).mul(l.div(h.add(t.epsilon))).add(a);a.assign(d)}})),t.iteration.assign(t.iteration.add(1)),t.accBeta1.assign(t.accBeta1.mul(t.beta1))})),this.incrementIterations()},t.prototype.dispose=function(){this.accBeta1.dispose(),this.iteration.dispose(),null!=this.accumulatedFirstMoment&&hn(this.accumulatedFirstMoment.map((function(e){return e.variable}))),null!=this.accumulatedWeightedInfNorm&&hn(this.accumulatedWeightedInfNorm.map((function(e){return e.variable})))},t.prototype.getWeights=function(){return D(this,void 0,void 0,(function(){return B(this,(function(e){throw new Error("getWeights() is not implemented for Adamax yet.")}))}))},t.prototype.setWeights=function(e){return D(this,void 0,void 0,(function(){return B(this,(function(e){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,t){return new e(t.learningRate,t.beta1,t.beta2,t.epsilon,t.decay)},t.className="Adamax",t}(_p);Rp(Fp);var Lp=function(e){function t(t){var n=e.call(this)||this;return n.learningRate=t,n.setLearningRate(t),n}return O(t,e),t.prototype.applyGradients=function(e){var t=this;(Array.isArray(e)?e.map((function(e){return e.name})):Object.keys(e)).forEach((function(n,r){var o=Array.isArray(e)?e[r].tensor:e[n];if(null!=o){var i=it.registeredVariables[n];pn((function(){var e=t.c.mul(o).add(i);i.assign(e)}))}})),this.incrementIterations()},t.prototype.setLearningRate=function(e){this.learningRate=e,null!=this.c&&this.c.dispose(),this.c=function(e){return it.keep(e)}(Nn(-e))},t.prototype.dispose=function(){this.c.dispose()},t.prototype.getWeights=function(){return D(this,void 0,void 0,(function(){return B(this,(function(e){switch(e.label){case 0:return[4,this.saveIterations()];case 1:return[2,[e.sent()]]}}))}))},t.prototype.setWeights=function(e){return D(this,void 0,void 0,(function(){return B(this,(function(t){switch(t.label){case 0:return[4,this.extractIterations(e)];case 1:if(0!==(e=t.sent()).length)throw new Error("SGD optimizer does not have settable weights.");return[2]}}))}))},t.prototype.getConfig=function(){return{learningRate:this.learningRate}},t.fromConfig=function(e,t){return new e(t.learningRate)},t.className="SGD",t}(_p);Rp(Lp);var Up=function(e){function t(t,n,r){void 0===r&&(r=!1);var o=e.call(this,t)||this;return o.learningRate=t,o.momentum=n,o.useNesterov=r,o.accumulations=[],o.m=Nn(o.momentum),o}return O(t,e),t.prototype.applyGradients=function(e){var t=this;(Array.isArray(e)?e.map((function(e){return e.name})):Object.keys(e)).forEach((function(n,r){var o=it.registeredVariables[n];null==t.accumulations[r]&&(t.accumulations[r]={originalName:n+"/momentum",variable:pn((function(){return Vn(o).variable(!1)}))});var i=t.accumulations[r].variable,a=Array.isArray(e)?e[r].tensor:e[n];null!=a&&pn((function(){var e,n=t.m.mul(i).add(a);e=t.useNesterov?t.c.mul(a.add(n.mul(t.m))).add(o):t.c.mul(n).add(o),i.assign(n),o.assign(e)}))})),this.incrementIterations()},t.prototype.dispose=function(){this.m.dispose(),null!=this.accumulations&&hn(this.accumulations.map((function(e){return e.variable})))},t.prototype.setMomentum=function(e){this.momentum=e},t.prototype.getWeights=function(){return D(this,void 0,void 0,(function(){return B(this,(function(e){switch(e.label){case 0:return[4,this.saveIterations()];case 1:return[2,[e.sent()].concat(this.accumulations.map((function(e){return{name:e.originalName,tensor:e.variable}})))]}}))}))},t.prototype.setWeights=function(e){return D(this,void 0,void 0,(function(){return B(this,(function(t){switch(t.label){case 0:return[4,this.extractIterations(e)];case 1:return e=t.sent(),this.accumulations=e.map((function(e){return{originalName:e.name,variable:e.tensor.variable(!1)}})),[2]}}))}))},t.prototype.getConfig=function(){return{learningRate:this.learningRate,momentum:this.momentum,useNesterov:this.useNesterov}},t.fromConfig=function(e,t){return new e(t.learningRate,t.momentum,t.useNesterov)},t.className="Momentum",t}(Lp);Rp(Up);var Wp=function(e){function t(t,n,r,o,i){void 0===n&&(n=.9),void 0===r&&(r=0),void 0===o&&(o=null),void 0===i&&(i=!1);var a=e.call(this)||this;if(a.learningRate=t,a.decay=n,a.momentum=r,a.epsilon=o,a.accumulatedMeanSquares=[],a.accumulatedMoments=[],a.accumulatedMeanGrads=[],a.centered=i,null==o&&(a.epsilon=it.backend.epsilon()),null==t)throw new Error("learningRate for RMSPropOptimizer must be defined.");return a}return O(t,e),t.prototype.applyGradients=function(e){var t=this;(Array.isArray(e)?e.map((function(e){return e.name})):Object.keys(e)).forEach((function(n,r){var o=it.registeredVariables[n];null==t.accumulatedMeanSquares[r]&&(t.accumulatedMeanSquares[r]={originalName:n+"/rms",variable:pn((function(){return Vn(o).variable(!1)}))}),null==t.accumulatedMoments[r]&&(t.accumulatedMoments[r]={originalName:n+"/momentum",variable:pn((function(){return Vn(o).variable(!1)}))}),null==t.accumulatedMeanGrads[r]&&t.centered&&(t.accumulatedMeanGrads[r]={originalName:n+"/mg",variable:pn((function(){return Vn(o).variable(!1)}))});var i=Array.isArray(e)?e[r].tensor:e[n];if(null!=i){var a=t.accumulatedMeanSquares[r].variable,s=t.accumulatedMoments[r].variable;pn((function(){var e=a.mul(t.decay).add(i.square().mul(1-t.decay));if(t.centered){var n=t.accumulatedMeanGrads[r].variable,u=n.mul(t.decay).add(i.mul(1-t.decay)),c=s.mul(t.momentum).add(i.mul(t.learningRate).div(e.sub(u.square().add(t.epsilon)).sqrt()));a.assign(e),n.assign(u),s.assign(c);var l=o.sub(c);o.assign(l)}else{var f=a.mul(t.decay).add(i.square().mul(1-t.decay));c=s.mul(t.momentum).add(i.mul(t.learningRate).div(f.add(t.epsilon).sqrt())),a.assign(f),s.assign(c),l=o.sub(c),o.assign(l)}}))}})),this.incrementIterations()},t.prototype.dispose=function(){null!=this.accumulatedMeanSquares&&hn(this.accumulatedMeanSquares.map((function(e){return e.variable}))),null!=this.accumulatedMeanGrads&&this.centered&&hn(this.accumulatedMeanGrads.map((function(e){return e.variable}))),null!=this.accumulatedMoments&&hn(this.accumulatedMoments.map((function(e){return e.variable})))},t.prototype.getWeights=function(){return D(this,void 0,void 0,(function(){var e;return B(this,(function(t){switch(t.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,[t.sent()].concat(e.map((function(e){return{name:e.originalName,tensor:e.variable}})))]}}))}))},t.prototype.setWeights=function(e){return D(this,void 0,void 0,(function(){var t;return B(this,(function(n){switch(n.label){case 0:return[4,this.extractIterations(e)];case 1:return e=n.sent(),t=this.centered?e.length/3:e.length/2,this.accumulatedMeanSquares=e.slice(0,t).map((function(e){return{originalName:e.name,variable:e.tensor.variable(!1)}})),this.accumulatedMoments=e.slice(t,2*t).map((function(e){return{originalName:e.name,variable:e.tensor.variable(!1)}})),this.centered&&(this.accumulatedMeanGrads=e.slice(2*t,3*t).map((function(e){return{originalName:e.name,variable:e.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,t){return new e(t.learningRate,t.decay,t.momentum,t.epsilon,t.centered)},t.className="RMSProp",t}(_p);Rp(Wp);var zp=function(){function e(){}return e.sgd=function(e){return new Lp(e)},e.momentum=function(e,t,n){return void 0===n&&(n=!1),new Up(e,t,n)},e.rmsprop=function(e,t,n,r,o){return void 0===t&&(t=.9),void 0===n&&(n=0),void 0===r&&(r=null),void 0===o&&(o=!1),new Wp(e,t,n,r,o)},e.adam=function(e,t,n,r){return void 0===e&&(e=.001),void 0===t&&(t=.9),void 0===n&&(n=.999),void 0===r&&(r=null),new Mp(e,t,n,r)},e.adadelta=function(e,t,n){return void 0===e&&(e=.001),void 0===t&&(t=.95),void 0===n&&(n=null),new Np(e,t,n)},e.adamax=function(e,t,n,r,o){return void 0===e&&(e=.002),void 0===t&&(t=.9),void 0===n&&(n=.999),void 0===r&&(r=null),void 0===o&&(o=0),new Fp(e,t,n,r,o)},e.adagrad=function(e,t){return void 0===t&&(t=.1),new Pp(e,t)},e}();zp.sgd,zp.momentum,zp.adadelta,zp.adagrad,zp.rmsprop,zp.adamax,zp.adam,"undefined"!=typeof requestAnimationFrame?requestAnimationFrame:"undefined"!=typeof setImmediate&&setImmediate;function qp(e,t,n){if(void 0===n&&(n=!1),e.beginPath(),t.slice(1).forEach((function(n,r){var o=n.x,i=n.y,a=t[r];e.moveTo(a.x,a.y),e.lineTo(o,i)})),n){var r=t[t.length-1],o=t[0];if(!r||!o)return;e.moveTo(r.x,r.y),e.lineTo(o.x,o.y)}e.stroke()}qe.prototype.squaredDifference=function(e){return Bs(this,e)},We=vf;n(31468);var Qp=function(e,t){return Qp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},Qp(e,t)};function Vp(e,t){function n(){this.constructor=e}Qp(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Hp=function(){return Hp=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Hp.apply(this,arguments)};function Gp(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function Xp(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function Zp(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}var Kp=function(){function e(e,t){if(!ih(e)||!ih(t))throw new Error("Dimensions.constructor - expected width and height to be valid numbers, instead have "+JSON.stringify({width:e,height:t}));this._width=e,this._height=t}return Object.defineProperty(e.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),e.prototype.reverse=function(){return new e(1/this.width,1/this.height)},e}();function Jp(e,t){return e instanceof qe&&e.shape.length===t}function Yp(e){return Jp(e,3)}function $p(e){return Jp(e,4)}function eh(e){return e%2==0}function th(e,t){void 0===t&&(t=2);var n=Math.pow(10,t);return Math.floor(e*n)/n}function nh(e){return e&&e.width&&e.height}function rh(e){return e.reduce((function(e,t){return e.add(t)}),new sh(0,0)).div(new sh(e.length,e.length))}function oh(e,t,n){return Array(e).fill(0).map((function(e,r){return t+r*n}))}function ih(e){return!!e&&e!==1/0&&e!==-1/0&&!isNaN(e)||0===e}function ah(e){return ih(e)&&0<=e&&e<=1}var sh=function(){function e(e,t){this._x=e,this._y=t}return Object.defineProperty(e.prototype,"x",{get:function(){return this._x},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this._y},enumerable:!0,configurable:!0}),e.prototype.add=function(t){return new e(this.x+t.x,this.y+t.y)},e.prototype.sub=function(t){return new e(this.x-t.x,this.y-t.y)},e.prototype.mul=function(t){return new e(this.x*t.x,this.y*t.y)},e.prototype.div=function(t){return new e(this.x/t.x,this.y/t.y)},e.prototype.abs=function(){return new e(Math.abs(this.x),Math.abs(this.y))},e.prototype.magnitude=function(){return Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2))},e.prototype.floor=function(){return new e(Math.floor(this.x),Math.floor(this.y))},e}(),uh=function(){function e(t,n){void 0===n&&(n=!0);var r=t||{},o=[r.left,r.top,r.right,r.bottom].every(ih),i=[r.x,r.y,r.width,r.height].every(ih);if(!i&&!o)throw new Error("Box.constructor - expected box to be IBoundingBox | IRect, instead have "+JSON.stringify(r));var a=i?[r.x,r.y,r.width,r.height]:[r.left,r.top,r.right-r.left,r.bottom-r.top],s=a[0],u=a[1],c=a[2],l=a[3];e.assertIsValidBox({x:s,y:u,width:c,height:l},"Box.constructor",n),this._x=s,this._y=u,this._width=c,this._height=l}return e.isRect=function(e){return!!e&&[e.x,e.y,e.width,e.height].every(ih)},e.assertIsValidBox=function(t,n,r){if(void 0===r&&(r=!1),!e.isRect(t))throw new Error(n+" - invalid box: "+JSON.stringify(t)+", expected object with properties x, y, width, height");if(!r&&(t.width<0||t.height<0))throw new Error(n+" - width ("+t.width+") and height ("+t.height+") must be positive numbers")},Object.defineProperty(e.prototype,"x",{get:function(){return this._x},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this._y},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"left",{get:function(){return this.x},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"top",{get:function(){return this.y},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"right",{get:function(){return this.x+this.width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"area",{get:function(){return this.width*this.height},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"topLeft",{get:function(){return new sh(this.left,this.top)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"topRight",{get:function(){return new sh(this.right,this.top)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bottomLeft",{get:function(){return new sh(this.left,this.bottom)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bottomRight",{get:function(){return new sh(this.right,this.bottom)},enumerable:!0,configurable:!0}),e.prototype.round=function(){var t=[this.x,this.y,this.width,this.height].map((function(e){return Math.round(e)}));return new e({x:t[0],y:t[1],width:t[2],height:t[3]})},e.prototype.floor=function(){var t=[this.x,this.y,this.width,this.height].map((function(e){return Math.floor(e)}));return new e({x:t[0],y:t[1],width:t[2],height:t[3]})},e.prototype.toSquare=function(){var t=this,n=t.x,r=t.y,o=t.width,i=t.height,a=Math.abs(o-i);return o<i&&(n-=a/2,o+=a),i<o&&(r-=a/2,i+=a),new e({x:n,y:r,width:o,height:i})},e.prototype.rescale=function(t){var n=nh(t)?t.width:t,r=nh(t)?t.height:t;return new e({x:this.x*n,y:this.y*r,width:this.width*n,height:this.height*r})},e.prototype.pad=function(t,n){var r=[this.x-t/2,this.y-n/2,this.width+t,this.height+n];return new e({x:r[0],y:r[1],width:r[2],height:r[3]})},e.prototype.clipAtImageBorders=function(t,n){var r=this,o=r.x,i=r.y,a=r.right,s=r.bottom,u=Math.max(o,0),c=Math.max(i,0),l=a-u,f=s-c;return new e({x:u,y:c,width:Math.min(l,t-u),height:Math.min(f,n-c)}).floor()},e.prototype.shift=function(t,n){var r=this.width,o=this.height;return new e({x:this.x+t,y:this.y+n,width:r,height:o})},e.prototype.padAtBorders=function(e,t){var n=this.width+1,r=this.height+1,o=n,i=r,a=this.left,s=this.top,u=this.right,c=this.bottom;return u>t&&(o=-u+t+n,u=t),c>e&&(i=-c+e+r,c=e),a<1&&(i=2-a,a=1),s<1&&(i=2-s,s=1),{dy:1,edy:i,dx:1,edx:o,y:s,ey:c,x:a,ex:u,w:n,h:r}},e.prototype.calibrate=function(t){return new e({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()},e}(),ch=function(e){function t(t,n,r,o,i){return void 0===i&&(i=!1),e.call(this,{left:t,top:n,right:r,bottom:o},i)||this}return Vp(t,e),t}(uh),lh=function(){function e(e,t,n,r,o){this._imageDims=new Kp(o.width,o.height),this._score=e,this._classScore=t,this._className=n,this._box=new uh(r).rescale(this._imageDims)}return Object.defineProperty(e.prototype,"score",{get:function(){return this._score},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"classScore",{get:function(){return this._classScore},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"className",{get:function(){return this._className},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"box",{get:function(){return this._box},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"imageDims",{get:function(){return this._imageDims},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"imageWidth",{get:function(){return this.imageDims.width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"imageHeight",{get:function(){return this.imageDims.height},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"relativeBox",{get:function(){return new uh(this._box).rescale(this.imageDims.reverse())},enumerable:!0,configurable:!0}),e.prototype.forSize=function(t,n){return new e(this.score,this.classScore,this.className,this.relativeBox,{width:t,height:n})},e}(),fh=function(e){function t(t,n,r){return e.call(this,t,t,"",n,r)||this}return Vp(t,e),t.prototype.forSize=function(n,r){var o=e.prototype.forSize.call(this,n,r);return new t(o.score,o.relativeBox,o.imageDims)},t}(lh);function ph(e,t,n){void 0===n&&(n=!0);var r=Math.max(0,Math.min(e.right,t.right)-Math.max(e.left,t.left))*Math.max(0,Math.min(e.bottom,t.bottom)-Math.max(e.top,t.top));return n?r/(e.area+t.area-r):r/Math.min(e.area,t.area)}function hh(e,t,n,r){void 0===r&&(r=!0);for(var o=t.map((function(e,t){return{score:e,boxIndex:t}})).sort((function(e,t){return e.score-t.score})).map((function(e){return e.boxIndex})),i=[],a=function(){var t=o.pop();i.push(t);for(var a=o,s=[],u=0;u<a.length;u++){var c=a[u],l=e[t],f=e[c];s.push(ph(l,f,r))}o=o.filter((function(e,t){return s[t]<=n}))};o.length>0;)a();return i}function dh(e,t){return pn((function(){var n=t[0],r=t[1],o=t[2],i=zn(Zp(e.shape.slice(0,3),[1]),n),a=zn(Zp(e.shape.slice(0,3),[1]),r),s=zn(Zp(e.shape.slice(0,3),[1]),o),u=Hn([i,a,s],3);return $u(e,u)}))}function mh(e){return 1/(1+Math.exp(-e))}var gh=function(e){function t(t,n,r,o,i){return void 0===i&&(i=!1),e.call(this,{x:t,y:n,width:r,height:o},i)||this}return Vp(t,e),t}(uh),vh=function(){function e(e,t,n){void 0===n&&(n=new sh(0,0));var r=t.width,o=t.height;this._imgDims=new Kp(r,o),this._shift=n,this._positions=e.map((function(e){return e.mul(new sh(r,o)).add(n)}))}return Object.defineProperty(e.prototype,"shift",{get:function(){return new sh(this._shift.x,this._shift.y)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"imageWidth",{get:function(){return this._imgDims.width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"imageHeight",{get:function(){return this._imgDims.height},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"positions",{get:function(){return this._positions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"relativePositions",{get:function(){var e=this;return this._positions.map((function(t){return t.sub(e._shift).div(new sh(e.imageWidth,e.imageHeight))}))},enumerable:!0,configurable:!0}),e.prototype.forSize=function(e,t){return new this.constructor(this.relativePositions,{width:e,height:t})},e.prototype.shiftBy=function(e,t){return new this.constructor(this.relativePositions,this._imgDims,new sh(e,t))},e.prototype.shiftByPoint=function(e){return this.shiftBy(e.x,e.y)},e.prototype.align=function(e,t){if(void 0===t&&(t={}),e){var n=e instanceof fh?e.box.floor():new uh(e);return this.shiftBy(n.x,n.y).align(null,t)}var r=Object.assign({},{useDlibAlignment:!1,minBoxPadding:.2},t),o=r.useDlibAlignment,i=r.minBoxPadding;return o?this.alignDlib():this.alignMinBbox(i)},e.prototype.alignDlib=function(){var e=this.getRefPointsForAlignment(),t=e[0],n=e[1],r=e[2],o=function(e){return r.sub(e).magnitude()},i=(o(t)+o(n))/2,a=Math.floor(i/.45),s=rh(e),u=Math.floor(Math.max(0,s.x-.5*a)),c=Math.floor(Math.max(0,s.y-.43*a));return new gh(u,c,Math.min(a,this.imageWidth+u),Math.min(a,this.imageHeight+c))},e.prototype.alignMinBbox=function(e){var t=function(e){var t=e.map((function(e){return e.x})),n=e.map((function(e){return e.y})),r=t.reduce((function(e,t){return t<e?t:e}),1/0),o=n.reduce((function(e,t){return t<e?t:e}),1/0),i=t.reduce((function(e,t){return e<t?t:e}),0),a=n.reduce((function(e,t){return e<t?t:e}),0);return new ch(r,o,i,a)}(this.positions);return t.pad(t.width*e,t.height*e)},e.prototype.getRefPointsForAlignment=function(){throw new Error("getRefPointsForAlignment not implemented by base class")},e}(),yh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vp(t,e),t.prototype.getRefPointsForAlignment=function(){var e=this.positions;return[e[0],e[1],rh([e[3],e[4]])]},t}(vh),bh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vp(t,e),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(rh)},t}(vh),wh=function(){function e(e,t){this._label=e,this._distance=t}return Object.defineProperty(e.prototype,"label",{get:function(){return this._label},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"distance",{get:function(){return this._distance},enumerable:!0,configurable:!0}),e.prototype.toString=function(e){return void 0===e&&(e=!0),this.label+(e?" ("+th(this.distance)+")":"")},e}(),xh=function(e){function t(t,n){var r=e.call(this,t)||this;return r._label=n,r}return Vp(t,e),t.assertIsValidLabeledBox=function(e,t){if(uh.assertIsValidBox(e,t),!ih(e.label))throw new Error(t+" - expected property label ("+e.label+") to be a number")},Object.defineProperty(t.prototype,"label",{get:function(){return this._label},enumerable:!0,configurable:!0}),t}(uh),Ah=function(){function e(e,t){if("string"!=typeof e)throw new Error("LabeledFaceDescriptors - constructor expected label to be a string");if(!Array.isArray(t)||t.some((function(e){return!(e instanceof Float32Array)})))throw new Error("LabeledFaceDescriptors - constructor expected descriptors to be an array of Float32Array");this._label=e,this._descriptors=t}return Object.defineProperty(e.prototype,"label",{get:function(){return this._label},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"descriptors",{get:function(){return this._descriptors},enumerable:!0,configurable:!0}),e.prototype.toJSON=function(){return{label:this.label,descriptors:this.descriptors.map((function(e){return Array.from(e)}))}},e.fromJSON=function(t){var n=t.descriptors.map((function(e){return new Float32Array(e)}));return new e(t.label,n)},e}();!function(e){function t(t,n,r,o){var i=e.call(this,t,n)||this;return i._score=r,i._classScore=o,i}Vp(t,e),t.assertIsValidPredictedBox=function(e,t){if(xh.assertIsValidLabeledBox(e,t),!ah(e.score)||!ah(e.classScore))throw new Error(t+" - 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})}(xh);function Eh(e){return e.detection instanceof fh}function Ch(e,t){var n={detection:t};return Object.assign({},e,n)}function kh(){var e=window.fetch||function(){throw new Error("fetch - missing fetch implementation for browser environment")};return{Canvas:HTMLCanvasElement,CanvasRenderingContext2D:CanvasRenderingContext2D,Image:HTMLImageElement,ImageData:ImageData,Video:HTMLVideoElement,createCanvasElement:function(){return document.createElement("canvas")},createImageElement:function(){return document.createElement("img")},fetch:e,readFile:function(){throw new Error("readFile - filesystem not available for browser environment")}}}function Ih(e){var t="";if(!e)try{e=n(90872)}catch(e){t=e.toString()}return{readFile:e?function(t){return new Promise((function(n,r){e.readFile(t,(function(e,t){return e?r(e):n(t)}))}))}:function(){throw new Error("readFile - failed to require fs in nodejs environment with error: "+t)}}}function Sh(){var e=n.g.Canvas||n.g.HTMLCanvasElement,t=n.g.Image||n.g.HTMLImageElement,r=n.g.fetch||function(){throw new Error("fetch - missing fetch implementation for nodejs environment")},o=Ih();return Hp({Canvas:e||function(){},CanvasRenderingContext2D:n.g.CanvasRenderingContext2D||function(){},Image:t||function(){},ImageData:n.g.ImageData||function(){},Video:n.g.HTMLVideoElement||function(){},createCanvasElement:function(){if(e)return new e;throw new Error("createCanvasElement - missing Canvas implementation for nodejs environment")},createImageElement:function(){if(t)return new t;throw new Error("createImageElement - missing Image implementation for nodejs environment")},fetch:r},o)}function jh(){return"object"==typeof window&&"undefined"!=typeof document&&"undefined"!=typeof HTMLImageElement&&"undefined"!=typeof HTMLCanvasElement&&"undefined"!=typeof HTMLVideoElement&&"undefined"!=typeof ImageData&&"undefined"!=typeof CanvasRenderingContext2D}var Th,Rh=n(97671);function Oh(){return"object"==typeof n.g&&void 0!==Rh&&!!Rh.version}function Dh(e){Th=e}function Bh(){jh()&&Dh(kh()),Oh()&&Dh(Sh())}var _h,Nh={getEnv:function(){if(!Th)throw new Error("getEnv - environment is not defined, check isNodejs() and isBrowser()");return Th},setEnv:Dh,initialize:Bh,createBrowserEnv:kh,createFileSystem:Ih,createNodejsEnv:Sh,monkeyPatch:function(e){if(Th||Bh(),!Th)throw new Error("monkeyPatch - environment is not defined, check isNodejs() and isBrowser()");var t=e.Canvas,n=void 0===t?Th.Canvas:t,r=e.Image,o=void 0===r?Th.Image:r;Th.Canvas=n,Th.Image=o,Th.createCanvasElement=e.createCanvasElement||function(){return new n},Th.createImageElement=e.createImageElement||function(){return new o},Th.ImageData=e.ImageData||Th.ImageData,Th.Video=e.Video||Th.Video,Th.fetch=e.fetch||Th.fetch,Th.readFile=e.readFile||Th.readFile},isBrowser:jh,isNodejs:Oh};function Ph(e){return Nh.isNodejs()||"string"!=typeof e?e:document.getElementById(e)}function Mh(e){var t=Nh.getEnv(),n=t.Canvas;if(e instanceof t.CanvasRenderingContext2D)return e;var r=Ph(e);if(!(r instanceof n))throw new Error("resolveContext2d - expected canvas to be of instance of Canvas");var o=r.getContext("2d");if(!o)throw new Error("resolveContext2d - canvas 2d context is null");return o}Bh(),function(e){e.TOP_LEFT="TOP_LEFT",e.TOP_RIGHT="TOP_RIGHT",e.BOTTOM_LEFT="BOTTOM_LEFT",e.BOTTOM_RIGHT="BOTTOM_RIGHT"}(_h||(_h={}));var Fh=function(e){void 0===e&&(e={});var t=e.anchorPosition,n=e.backgroundColor,r=e.fontColor,o=e.fontSize,i=e.fontStyle,a=e.padding;this.anchorPosition=t||_h.TOP_LEFT,this.backgroundColor=n||"rgba(0, 0, 0, 0.5)",this.fontColor=r||"rgba(255, 255, 255, 1)",this.fontSize=o||14,this.fontStyle=i||"Georgia",this.padding=a||4},Lh=function(){function e(t,n,r){void 0===r&&(r={}),this.text="string"==typeof t?[t]:t instanceof e?t.text:t,this.anchor=n,this.options=new Fh(r)}return e.prototype.measureWidth=function(e){var t=this.options.padding;return this.text.map((function(t){return e.measureText(t).width})).reduce((function(e,t){return e<t?t:e}),0)+2*t},e.prototype.measureHeight=function(){var e=this.options,t=e.fontSize,n=e.padding;return this.text.length*t+2*n},e.prototype.getUpperLeft=function(e,t){var n=this.options.anchorPosition,r=n===_h.BOTTOM_RIGHT||n===_h.TOP_RIGHT,o=n===_h.BOTTOM_LEFT||n===_h.BOTTOM_RIGHT,i=this.measureWidth(e),a=this.measureHeight(),s=r?this.anchor.x-i:this.anchor.x,u=o?this.anchor.y-a:this.anchor.y;if(t){var c=t.width,l=t.height;return{x:Math.max(Math.min(s,c-i),0),y:Math.max(Math.min(u,l-a),0)}}return{x:s,y:u}},e.prototype.draw=function(e){var t=Ph(e),n=Mh(t),r=this.options,o=r.backgroundColor,i=r.fontColor,a=r.fontSize,s=r.fontStyle,u=r.padding;n.font=a+"px "+s;var c=this.measureWidth(n),l=this.measureHeight();n.fillStyle=o;var f=this.getUpperLeft(n,t);n.fillRect(f.x,f.y,c,l),n.fillStyle=i,this.text.forEach((function(e,t){var r=u+f.x,o=u+f.y+(t+1)*a;n.fillText(e,r,o)}))},e}(),Uh=function(e){void 0===e&&(e={});var t=e.boxColor,n=e.lineWidth,r=e.label,o=e.drawLabelOptions;this.boxColor=t||"rgba(0, 0, 255, 1)",this.lineWidth=n||2,this.label=r;var i={anchorPosition:_h.BOTTOM_LEFT,backgroundColor:this.boxColor};this.drawLabelOptions=new Fh(Object.assign({},i,o))},Wh=function(){function e(e,t){void 0===t&&(t={}),this.box=new uh(e),this.options=new Uh(t)}return e.prototype.draw=function(e){var t=Mh(e),n=this.options,r=n.boxColor,o=n.lineWidth,i=this.box,a=i.x,s=i.y,u=i.width,c=i.height;t.strokeStyle=r,t.lineWidth=o,t.strokeRect(a,s,u,c);var l=this.options.label;l&&new Lh([l],{x:a-o/2,y:s},this.options.drawLabelOptions).draw(e)},e}();function zh(e,t){(Array.isArray(t)?t:[t]).forEach((function(t){var n=t instanceof fh?t.score:Eh(t)?t.detection.score:void 0,r=t instanceof fh?t.box:Eh(t)?t.detection.box:new uh(t),o=n?""+th(n):void 0;new Wh(r,{label:o}).draw(e)}))}function qh(e){var t=Nh.getEnv(),n=t.Image,r=t.Video;return e instanceof n&&e.complete||e instanceof r&&e.readyState>=3}function Qh(e){var t=Nh.getEnv(),n=t.Image,r=t.Video;return e instanceof n?new Kp(e.naturalWidth,e.naturalHeight):e instanceof r?new Kp(e.videoWidth,e.videoHeight):new Kp(e.width,e.height)}function Vh(e){var t=e.width,n=e.height,r=(0,Nh.getEnv().createCanvasElement)();return r.width=t,r.height=n,r}function Hh(e,t){var n=Nh.getEnv().ImageData;if(!(e instanceof n||qh(e)))throw new Error("createCanvasFromMedia - media has not finished loading yet");var r=t||Qh(e),o=r.width,i=r.height,a=Vh({width:o,height:i});return e instanceof n?Mh(a).putImageData(e,0,0):Mh(a).drawImage(e,0,0,o,i),a}function Gh(e,t){return Gp(this,void 0,void 0,(function(){var n,r,o,i,a,s;return Xp(this,(function(u){switch(u.label){case 0:return n=t||Nh.getEnv().createCanvasElement(),r=e.shape.slice($p(e)?1:0),o=r[0],i=r[1],a=r[2],s=pn((function(){return e.as3D(o,i,a).toInt()})),[4,Sp.toPixels(s,n)];case 1:return u.sent(),s.dispose(),[2,n]}}))}))}function Xh(e){var t=Nh.getEnv(),n=t.Image,r=t.Canvas,o=t.Video;return e instanceof n||e instanceof r||e instanceof o}var Zh=function(){function e(e,t){var n=this;if(void 0===t&&(t=!1),this._imageTensors=[],this._canvases=[],this._treatAsBatchInput=!1,this._inputDimensions=[],!Array.isArray(e))throw new Error("NetInput.constructor - expected inputs to be an Array of TResolvedNetInput or to be instanceof tf.Tensor4D, instead have "+e);this._treatAsBatchInput=t,this._batchSize=e.length,e.forEach((function(e,t){if(Yp(e))return n._imageTensors[t]=e,void(n._inputDimensions[t]=e.shape);if($p(e)){var r=e.shape[0];if(1!==r)throw new Error("NetInput - tf.Tensor4D with batchSize "+r+" passed, but not supported in input array");return n._imageTensors[t]=e,void(n._inputDimensions[t]=e.shape.slice(1))}var o=e instanceof Nh.getEnv().Canvas?e:Hh(e);n._canvases[t]=o,n._inputDimensions[t]=[o.height,o.width,3]}))}return Object.defineProperty(e.prototype,"imageTensors",{get:function(){return this._imageTensors},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"canvases",{get:function(){return this._canvases},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isBatchInput",{get:function(){return this.batchSize>1||this._treatAsBatchInput},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"batchSize",{get:function(){return this._batchSize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inputDimensions",{get:function(){return this._inputDimensions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inputSize",{get:function(){return this._inputSize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"reshapedInputDimensions",{get:function(){var e=this;return oh(this.batchSize,0,1).map((function(t,n){return e.getReshapedInputDimensions(n)}))},enumerable:!0,configurable:!0}),e.prototype.getInput=function(e){return this.canvases[e]||this.imageTensors[e]},e.prototype.getInputDimensions=function(e){return this._inputDimensions[e]},e.prototype.getInputHeight=function(e){return this._inputDimensions[e][0]},e.prototype.getInputWidth=function(e){return this._inputDimensions[e][1]},e.prototype.getReshapedInputDimensions=function(e){if("number"!=typeof this.inputSize)throw new Error("getReshapedInputDimensions - inputSize not set, toBatchTensor has not been called yet");return function(e,t){var n=e.width,r=e.height,o=t/Math.max(r,n);return new Kp(Math.round(n*o),Math.round(r*o))}({width:this.getInputWidth(e),height:this.getInputHeight(e)},this.inputSize)},e.prototype.toBatchTensor=function(e,t){var n=this;return void 0===t&&(t=!0),this._inputSize=e,pn((function(){var r=oh(n.batchSize,0,1).map((function(r){var o=n.getInput(r);if(o instanceof qe){var i=$p(o)?o:o.expandDims();return i=function(e,t){return void 0===t&&(t=!1),pn((function(){var n=e.shape.slice(1),r=n[0],o=n[1];if(r===o)return e;var i=Math.abs(r-o),a=Math.round(i*(t?.5:1)),s=r>o?2:1,u=function(t){var n=e.shape.slice();return n[s]=t,zn(n,0)},c=u(a),l=i-c.shape[s],f=[t&&l?u(l):null,e,c].filter((function(e){return!!e})).map((function(e){return e.toFloat()}));return Hn(f,s)}))}(i,t),i.shape[1]===e&&i.shape[2]===e||(i=uf.resizeBilinear(i,[e,e])),i.as3D(e,e,3)}if(o instanceof Nh.getEnv().Canvas)return Sp.fromPixels(function(e,t,n){void 0===n&&(n=!1);var r=Nh.getEnv(),o=r.Image,i=r.Canvas;if(!(e instanceof o||e instanceof i))throw new Error("imageToSquare - expected arg0 to be HTMLImageElement | HTMLCanvasElement");var a=Qh(e),s=t/Math.max(a.height,a.width),u=s*a.width,c=s*a.height,l=Vh({width:t,height:t}),f=e instanceof i?e:Hh(e),p=Math.abs(u-c)/2,h=n&&u<c?p:0,d=n&&c<u?p:0;return Mh(l).drawImage(f,h,d,u,c),l}(o,e,t));throw new Error("toBatchTensor - at batchIdx "+r+", expected input to be instanceof tf.Tensor or instanceof HTMLCanvasElement, instead have "+o)})),o=Br(r.map((function(e){return e.toFloat()}))).as4D(n.batchSize,e,e,3);return o}))},e}();function Kh(e){return Gp(this,void 0,void 0,(function(){var t,n,r;return Xp(this,(function(o){switch(o.label){case 0:if(e instanceof Zh)return[2,e];if(!(t=Array.isArray(e)?e:[e]).length)throw new Error("toNetInput - empty array passed as input");return n=function(t){return Array.isArray(e)?" at input index "+t+":":""},(r=t.map(Ph)).forEach((function(e,r){if(!Xh(e)&&!Yp(e)&&!$p(e)){if("string"==typeof t[r])throw new Error("toNetInput -"+n(r)+" string passed, but could not resolve HTMLElement for element id "+t[r]);throw new Error("toNetInput -"+n(r)+" expected media to be of type HTMLImageElement | HTMLVideoElement | HTMLCanvasElement | tf.Tensor3D, or to be an element id")}if($p(e)){var o=e.shape[0];if(1!==o)throw new Error("toNetInput -"+n(r)+" tf.Tensor4D with batchSize "+o+" passed, but not supported in input array")}})),[4,Promise.all(r.map((function(e){return Xh(e)&&(t=e,new Promise((function(e,n){if(t instanceof Nh.getEnv().Canvas||qh(t))return e();function r(t){t.currentTarget&&(t.currentTarget.removeEventListener("load",r),t.currentTarget.removeEventListener("error",o),e(t))}function o(e){e.currentTarget&&(e.currentTarget.removeEventListener("load",r),e.currentTarget.removeEventListener("error",o),n(e))}t.addEventListener("load",r),t.addEventListener("error",o)})));var t})))];case 1:return o.sent(),[2,new Zh(r,Array.isArray(e))]}}))}))}function Jh(e,t){return Gp(this,void 0,void 0,(function(){var n,r,o,i,a,s;return Xp(this,(function(u){switch(u.label){case 0:return n=Nh.getEnv().Canvas,r=e,e instanceof n?[3,5]:[4,Kh(e)];case 1:if((o=u.sent()).batchSize>1)throw new Error("extractFaces - batchSize > 1 not supported");return(i=o.getInput(0))instanceof n?(a=i,[3,4]):[3,2];case 2:return[4,Gh(i)];case 3:a=u.sent(),u.label=4;case 4:r=a,u.label=5;case 5:return s=Mh(r),[2,t.map((function(e){return e instanceof fh?e.forSize(r.width,r.height).box.floor():e})).map((function(e){return e.clipAtImageBorders(r.width,r.height)})).map((function(e){var t=e.x,n=e.y,r=e.width,o=e.height,i=Vh({width:r,height:o});return Mh(i).putImageData(s.getImageData(t,n,r,o),0,0),i}))]}}))}))}function Yh(e,t){return Gp(this,void 0,void 0,(function(){return Xp(this,(function(n){if(!Yp(e)&&!$p(e))throw new Error("extractFaceTensors - expected image tensor to be 3D or 4D");if($p(e)&&e.shape[0]>1)throw new Error("extractFaceTensors - batchSize > 1 not supported");return[2,pn((function(){var n=e.shape.slice($p(e)?1:0),r=n[0],o=n[1],i=n[2],a=t.map((function(e){return e instanceof fh?e.forSize(o,r).box:e})).map((function(e){return e.clipAtImageBorders(o,r)})).map((function(t){var n=t.x,a=t.y,s=t.width,u=t.height;return Zc(e.as3D(r,o,i),[a,n,0],[u,s,i])}));return a}))]}))}))}function $h(e,t){return Gp(this,void 0,void 0,(function(){var n;return Xp(this,(function(r){switch(r.label){case 0:return[4,(0,Nh.getEnv().fetch)(e,t)];case 1:if(!((n=r.sent()).status<400))throw new Error("failed to fetch: ("+n.status+") "+n.statusText+", from url: "+n.url);return[2,n]}}))}))}function ed(e){return Gp(this,void 0,void 0,(function(){return Xp(this,(function(t){switch(t.label){case 0:return[4,$h(e)];case 1:return[2,t.sent().json()]}}))}))}function td(e,t){var n=t+"-weights_manifest.json";if(!e)return{modelBaseUri:"",manifestUri:n};if("/"===e)return{modelBaseUri:"/",manifestUri:"/"+n};var r=e.startsWith("http://")?"http://":e.startsWith("https://")?"https://":"",o=(e=e.replace(r,"")).split("/").filter((function(e){return e})),i=e.endsWith(".json")?o[o.length-1]:n,a=r+(e.endsWith(".json")?o.slice(0,o.length-1):o).join("/");return{modelBaseUri:a=e.startsWith("/")?"/"+a:a,manifestUri:"/"===a?"/"+i:a+"/"+i}}function nd(e,t){return Gp(this,void 0,void 0,(function(){var n,r,o,i;return Xp(this,(function(a){switch(a.label){case 0:return n=td(e,t),r=n.manifestUri,o=n.modelBaseUri,[4,ed(r)];case 1:return i=a.sent(),[2,Cp.loadWeights(i,o)]}}))}))}var rd=function(){function e(e){this._name=e,this._params=void 0,this._paramMappings=[]}return Object.defineProperty(e.prototype,"params",{get:function(){return this._params},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paramMappings",{get:function(){return this._paramMappings},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isLoaded",{get:function(){return!!this.params},enumerable:!0,configurable:!0}),e.prototype.getParamFromPath=function(e){var t=this.traversePropertyPath(e);return t.obj[t.objProp]},e.prototype.reassignParamFromPath=function(e,t){var n=this.traversePropertyPath(e),r=n.obj,o=n.objProp;r[o].dispose(),r[o]=t},e.prototype.getParamList=function(){var e=this;return this._paramMappings.map((function(t){var n=t.paramPath;return{path:n,tensor:e.getParamFromPath(n)}}))},e.prototype.getTrainableParams=function(){return this.getParamList().filter((function(e){return e.tensor instanceof Ze}))},e.prototype.getFrozenParams=function(){return this.getParamList().filter((function(e){return!(e.tensor instanceof Ze)}))},e.prototype.variable=function(){var e=this;this.getFrozenParams().forEach((function(t){var n=t.path,r=t.tensor;e.reassignParamFromPath(n,r.variable())}))},e.prototype.freeze=function(){var e=this;this.getTrainableParams().forEach((function(t){var n=t.path,r=t.tensor,o=Bn(r.dataSync());r.dispose(),e.reassignParamFromPath(n,o)}))},e.prototype.dispose=function(e){void 0===e&&(e=!0),this.getParamList().forEach((function(t){if(e&&t.tensor.isDisposed)throw new Error("param tensor has already been disposed for path "+t.path);t.tensor.dispose()})),this._params=void 0},e.prototype.serializeParams=function(){return new Float32Array(this.getParamList().map((function(e){var t=e.tensor;return Array.from(t.dataSync())})).reduce((function(e,t){return e.concat(t)})))},e.prototype.load=function(e){return Gp(this,void 0,void 0,(function(){return Xp(this,(function(t){switch(t.label){case 0:return e instanceof Float32Array?(this.extractWeights(e),[2]):[4,this.loadFromUri(e)];case 1:return t.sent(),[2]}}))}))},e.prototype.loadFromUri=function(e){return Gp(this,void 0,void 0,(function(){var t;return Xp(this,(function(n){switch(n.label){case 0:if(e&&"string"!=typeof e)throw new Error(this._name+".loadFromUri - expected model uri");return[4,nd(e,this.getDefaultModelName())];case 1:return t=n.sent(),this.loadFromWeightMap(t),[2]}}))}))},e.prototype.loadFromDisk=function(e){return Gp(this,void 0,void 0,(function(){var t,n,r,o,i,a,s,u,c,l;return Xp(this,(function(f){switch(f.label){case 0:if(e&&"string"!=typeof e)throw new Error(this._name+".loadFromDisk - expected model file path");return t=Nh.getEnv().readFile,n=td(e,this.getDefaultModelName()),r=n.manifestUri,o=n.modelBaseUri,i=function(e){return Promise.all(e.map((function(e){return t(e).then((function(e){return e.buffer}))})))},a=Cp.weightsLoaderFactory(i),c=(u=JSON).parse,[4,t(r)];case 1:return s=c.apply(u,[f.sent().toString()]),[4,a(s,o)];case 2:return l=f.sent(),this.loadFromWeightMap(l),[2]}}))}))},e.prototype.loadFromWeightMap=function(e){var t=this.extractParamsFromWeigthMap(e),n=t.paramMappings,r=t.params;this._paramMappings=n,this._params=r},e.prototype.extractWeights=function(e){var t=this.extractParams(e),n=t.paramMappings,r=t.params;this._paramMappings=n,this._params=r},e.prototype.traversePropertyPath=function(e){if(!this.params)throw new Error("traversePropertyPath - model has no loaded params");var t=e.split("/").reduce((function(t,n){if(!t.nextObj.hasOwnProperty(n))throw new Error("traversePropertyPath - object does not have property "+n+", for path "+e);return{obj:t.nextObj,objProp:n,nextObj:t.nextObj[n]}}),{nextObj:this.params}),n=t.obj,r=t.objProp;if(!(n&&r&&n[r]instanceof qe))throw new Error("traversePropertyPath - parameter is not a tensor, for path "+e);return{obj:n,objProp:r}},e}();function od(e,t,n){return pn((function(){var r=jc(e,t.depthwise_filter,t.pointwise_filter,n,"same");return r=_u(r,t.bias)}))}function id(e,t,n){return void 0===n&&(n=!1),pn((function(){var r=pl(n?_u(xc(e,t.conv0.filters,[2,2],"same"),t.conv0.bias):od(e,t.conv0,[2,2])),o=od(r,t.conv1,[1,1]),i=od(pl(_u(r,o)),t.conv2,[1,1]);return pl(_u(r,_u(o,i)))}))}function ad(e,t,n,r){return void 0===n&&(n=!1),void 0===r&&(r=!0),pn((function(){var o=pl(n?_u(xc(e,t.conv0.filters,r?[2,2]:[1,1],"same"),t.conv0.bias):od(e,t.conv0,r?[2,2]:[1,1])),i=od(o,t.conv1,[1,1]),a=od(pl(_u(o,i)),t.conv2,[1,1]),s=od(pl(_u(o,_u(i,a))),t.conv3,[1,1]);return pl(_u(o,_u(i,_u(a,s))))}))}function sd(e,t,n,r){return void 0===n&&(n="same"),void 0===r&&(r=!1),pn((function(){var o=_u(xc(e,t.filters,[1,1],n),t.bias);return r?pl(o):o}))}function ud(e,t){Object.keys(e).forEach((function(n){t.some((function(e){return e.originalPath===n}))||e[n].dispose()}))}function cd(e,t){return function(n,r,o,i){var a=Ln(e(n*r*o*o),[o,o,n,r]),s=Pn(e(r));return t.push({paramPath:i+"/filters"},{paramPath:i+"/bias"}),{filters:a,bias:s}}}function ld(e,t){return function(n,r,o){var i=Mn(e(n*r),[n,r]),a=Pn(e(r));return t.push({paramPath:o+"/weights"},{paramPath:o+"/bias"}),{weights:i,bias:a}}}var fd=function(e,t,n){this.depthwise_filter=e,this.pointwise_filter=t,this.bias=n};function pd(e,t){return function(n,r,o){var i=Ln(e(9*n),[3,3,n,1]),a=Ln(e(n*r),[1,1,n,r]),s=Pn(e(r));return t.push({paramPath:o+"/depthwise_filter"},{paramPath:o+"/pointwise_filter"},{paramPath:o+"/bias"}),new fd(i,a,s)}}function hd(e){return function(t){var n=e(t+"/depthwise_filter",4),r=e(t+"/pointwise_filter",4),o=e(t+"/bias",1);return new fd(n,r,o)}}function dd(e,t){return function(n,r,o){var i=e[n];if(!Jp(i,r))throw new Error("expected weightMap["+n+"] to be a Tensor"+r+"D, instead have "+i);return t.push({originalPath:n,paramPath:o||n}),i}}function md(e){var t=e;return{extractWeights:function(e){var n=t.slice(0,e);return t=t.slice(e),n},getRemainingWeights:function(){return t}}}function gd(e,t){var n=cd(e,t),r=pd(e,t);function o(e,t,o,i){return void 0===i&&(i=!1),{conv0:i?n(e,t,3,o+"/conv0"):r(e,t,o+"/conv0"),conv1:r(t,t,o+"/conv1"),conv2:r(t,t,o+"/conv2")}}return{extractDenseBlock3Params:o,extractDenseBlock4Params:function(e,t,n,i){void 0===i&&(i=!1);var a=o(e,t,n,i);return{conv0:a.conv0,conv1:a.conv1,conv2:a.conv2,conv3:r(t,t,n+"/conv3")}}}}function vd(e){return function(t){return{filters:e(t+"/filters",4),bias:e(t+"/bias",1)}}}function yd(e,t){var n=dd(e,t),r=vd(n),o=hd(n);return{extractDenseBlock3Params:function(e,t){return void 0===t&&(t=!1),{conv0:t?r(e+"/conv0"):o(e+"/conv0"),conv1:o(e+"/conv1"),conv2:o(e+"/conv2")}},extractDenseBlock4Params:function(e,t){return void 0===t&&(t=!1),{conv0:t?r(e+"/conv0"):o(e+"/conv0"),conv1:o(e+"/conv1"),conv2:o(e+"/conv2"),conv3:o(e+"/conv3")}}}}var bd=function(e){function t(){return e.call(this,"FaceFeatureExtractor")||this}return Vp(t,e),t.prototype.forwardInput=function(e){var t=this.params;if(!t)throw new Error("FaceFeatureExtractor - load model before inference");return pn((function(){var n=ad(dh(e.toBatchTensor(112,!0),[122.782,117.001,104.298]).div(Nn(255)),t.dense0,!0);return n=ad(n,t.dense1),n=ad(n,t.dense2),n=ad(n,t.dense3),n=zc(n,[7,7],[2,2],"valid")}))},t.prototype.forward=function(e){return Gp(this,void 0,void 0,(function(){var t;return Xp(this,(function(n){switch(n.label){case 0:return t=this.forwardInput,[4,Kh(e)];case 1:return[2,t.apply(this,[n.sent()])]}}))}))},t.prototype.getDefaultModelName=function(){return"face_feature_extractor_model"},t.prototype.extractParamsFromWeigthMap=function(e){return function(e){var t=[],n=yd(e,t).extractDenseBlock4Params,r={dense0:n("dense0",!0),dense1:n("dense1"),dense2:n("dense2"),dense3:n("dense3")};return ud(e,t),{params:r,paramMappings:t}}(e)},t.prototype.extractParams=function(e){return function(e){var t=[],n=md(e),r=n.extractWeights,o=n.getRemainingWeights,i=gd(r,t).extractDenseBlock4Params,a=i(3,32,"dense0",!0),s=i(32,64,"dense1"),u=i(64,128,"dense2"),c=i(128,256,"dense3");if(0!==o().length)throw new Error("weights remaing after extract: "+o().length);return{paramMappings:t,params:{dense0:a,dense1:s,dense2:u,dense3:c}}}(e)},t}(rd);function wd(e,t){return pn((function(){return _u(Oc(e,t.weights),t.bias)}))}function xd(e){var t={},n={};return Object.keys(e).forEach((function(r){(r.startsWith("fc")?n:t)[r]=e[r]})),{featureExtractorMap:t,classifierMap:n}}var Ad=function(e){function t(t,n){var r=e.call(this,t)||this;return r._faceFeatureExtractor=n,r}return Vp(t,e),Object.defineProperty(t.prototype,"faceFeatureExtractor",{get:function(){return this._faceFeatureExtractor},enumerable:!0,configurable:!0}),t.prototype.runNet=function(e){var t=this,n=this.params;if(!n)throw new Error(this._name+" - load model before inference");return pn((function(){var r=e instanceof Zh?t.faceFeatureExtractor.forwardInput(e):e;return wd(r.as2D(r.shape[0],-1),n.fc)}))},t.prototype.dispose=function(t){void 0===t&&(t=!0),this.faceFeatureExtractor.dispose(t),e.prototype.dispose.call(this,t)},t.prototype.loadClassifierParams=function(e){var t=this.extractClassifierParams(e),n=t.params,r=t.paramMappings;this._params=n,this._paramMappings=r},t.prototype.extractClassifierParams=function(e){return function(e,t,n){var r=[],o=md(e),i=o.extractWeights,a=o.getRemainingWeights,s=ld(i,r)(t,n,"fc");if(0!==a().length)throw new Error("weights remaing after extract: "+a().length);return{paramMappings:r,params:{fc:s}}}(e,this.getClassifierChannelsIn(),this.getClassifierChannelsOut())},t.prototype.extractParamsFromWeigthMap=function(e){var t=xd(e),n=t.featureExtractorMap,r=t.classifierMap;return this.faceFeatureExtractor.loadFromWeightMap(n),function(e){var t,n=[],r=dd(e,n),o={fc:(t="fc",{weights:r(t+"/weights",2),bias:r(t+"/bias",1)})};return ud(e,n),{params:o,paramMappings:n}}(r)},t.prototype.extractParams=function(e){var t=this.getClassifierChannelsIn(),n=this.getClassifierChannelsOut(),r=n*t+n,o=e.slice(0,e.length-r),i=e.slice(e.length-r);return this.faceFeatureExtractor.extractWeights(o),this.extractClassifierParams(i)},t}(rd),Ed=["neutral","happy","sad","angry","fearful","disgusted","surprised"],Cd=function(){function e(e){var t=this;if(7!==e.length)throw new Error("FaceExpressions.constructor - expected probabilities.length to be 7, have: "+e.length);Ed.forEach((function(n,r){t[n]=e[r]}))}return e.prototype.asSortedArray=function(){var e=this;return Ed.map((function(t){return{expression:t,probability:e[t]}})).sort((function(e,t){return t.probability-e.probability}))},e}(),kd=function(e){function t(t){return void 0===t&&(t=new bd),e.call(this,"FaceExpressionNet",t)||this}return Vp(t,e),t.prototype.forwardInput=function(e){var t=this;return pn((function(){return to(t.runNet(e))}))},t.prototype.forward=function(e){return Gp(this,void 0,void 0,(function(){var t;return Xp(this,(function(n){switch(n.label){case 0:return t=this.forwardInput,[4,Kh(e)];case 1:return[2,t.apply(this,[n.sent()])]}}))}))},t.prototype.predictExpressions=function(e){return Gp(this,void 0,void 0,(function(){var t,n,r,o,i=this;return Xp(this,(function(a){switch(a.label){case 0:return[4,Kh(e)];case 1:return t=a.sent(),[4,this.forwardInput(t)];case 2:return n=a.sent(),[4,Promise.all(Pr(n).map((function(e){return Gp(i,void 0,void 0,(function(){var t;return Xp(this,(function(n){switch(n.label){case 0:return[4,e.data()];case 1:return t=n.sent(),e.dispose(),[2,t]}}))}))})))];case 3:return r=a.sent(),n.dispose(),o=r.map((function(e){return new Cd(e)})),[2,t.isBatchInput?o:o[0]]}}))}))},t.prototype.getDefaultModelName=function(){return"face_expression_model"},t.prototype.getClassifierChannelsIn=function(){return 256},t.prototype.getClassifierChannelsOut=function(){return 7},t}(Ad);function Id(e,t){var n={expressions:t};return Object.assign({},e,n)}function Sd(e){return Eh(e)&&e.landmarks instanceof vh&&e.unshiftedLandmarks instanceof vh&&e.alignedRect instanceof fh}function jd(e,t){var n=e.detection.box,r=t.shiftBy(n.x,n.y),o=r.align(),i=e.detection.imageDims,a={landmarks:r,unshiftedLandmarks:t,alignedRect:new fh(e.detection.score,o.rescale(i.reverse()),i)};return Object.assign({},e,a)}var Td=function(e){void 0===e&&(e={});var t=e.drawLines,n=void 0===t||t,r=e.drawPoints,o=void 0===r||r,i=e.lineWidth,a=e.lineColor,s=e.pointSize,u=e.pointColor;this.drawLines=n,this.drawPoints=o,this.lineWidth=i||1,this.pointSize=s||2,this.lineColor=a||"rgba(0, 255, 255, 1)",this.pointColor=u||"rgba(255, 0, 255, 1)"};!function(){function e(e,t){void 0===t&&(t={}),this.faceLandmarks=e,this.options=new Td(t)}e.prototype.draw=function(e){var t=Mh(e),n=this.options,r=n.drawLines,o=n.drawPoints,i=n.lineWidth,a=n.lineColor,s=n.pointSize,u=n.pointColor;if(r&&this.faceLandmarks instanceof bh&&(t.strokeStyle=a,t.lineWidth=i,qp(t,this.faceLandmarks.getJawOutline()),qp(t,this.faceLandmarks.getLeftEyeBrow()),qp(t,this.faceLandmarks.getRightEyeBrow()),qp(t,this.faceLandmarks.getNose()),qp(t,this.faceLandmarks.getLeftEye(),!0),qp(t,this.faceLandmarks.getRightEye(),!0),qp(t,this.faceLandmarks.getMouth(),!0)),o){t.strokeStyle=u,t.fillStyle=u;this.faceLandmarks.positions.forEach((function(e){t.beginPath(),t.arc(e.x,e.y,s,0,2*Math.PI),t.fill()}))}}}();function Rd(e,t){var n=[],r=md(e),o=r.extractWeights,i=r.getRemainingWeights,a=function(e,t){var n=cd(e,t),r=pd(e,t);return{extractConvParams:n,extractSeparableConvParams:r,extractReductionBlockParams:function(e,t,o){return{separable_conv0:r(e,t,o+"/separable_conv0"),separable_conv1:r(t,t,o+"/separable_conv1"),expansion_conv:n(e,t,1,o+"/expansion_conv")}},extractMainBlockParams:function(e,t){return{separable_conv0:r(e,e,t+"/separable_conv0"),separable_conv1:r(e,e,t+"/separable_conv1"),separable_conv2:r(e,e,t+"/separable_conv2")}}}}(o,n),s=a.extractConvParams,u=a.extractSeparableConvParams,c=a.extractReductionBlockParams,l=a.extractMainBlockParams,f={conv_in:s(3,32,3,"entry_flow/conv_in"),reduction_block_0:c(32,64,"entry_flow/reduction_block_0"),reduction_block_1:c(64,128,"entry_flow/reduction_block_1")},p={};oh(t,0,1).forEach((function(e){p["main_block_"+e]=l(128,"middle_flow/main_block_"+e)}));var h={reduction_block:c(128,256,"exit_flow/reduction_block"),separable_conv:u(256,512,"exit_flow/separable_conv")};if(0!==i().length)throw new Error("weights remaing after extract: "+i().length);return{paramMappings:n,params:{entry_flow:f,middle_flow:p,exit_flow:h}}}function Od(e,t){var n=[],r=function(e,t){var n=dd(e,t),r=vd(n),o=hd(n);return{extractConvParams:r,extractSeparableConvParams:o,extractReductionBlockParams:function(e){return{separable_conv0:o(e+"/separable_conv0"),separable_conv1:o(e+"/separable_conv1"),expansion_conv:r(e+"/expansion_conv")}},extractMainBlockParams:function(e){return{separable_conv0:o(e+"/separable_conv0"),separable_conv1:o(e+"/separable_conv1"),separable_conv2:o(e+"/separable_conv2")}}}}(e,n),o=r.extractConvParams,i=r.extractSeparableConvParams,a=r.extractReductionBlockParams,s=r.extractMainBlockParams,u={conv_in:o("entry_flow/conv_in"),reduction_block_0:a("entry_flow/reduction_block_0"),reduction_block_1:a("entry_flow/reduction_block_1")},c={};oh(t,0,1).forEach((function(e){c["main_block_"+e]=s("middle_flow/main_block_"+e)}));var l={reduction_block:a("exit_flow/reduction_block"),separable_conv:i("exit_flow/separable_conv")};return ud(e,n),{params:{entry_flow:u,middle_flow:c,exit_flow:l},paramMappings:n}}function Dd(e,t,n){return _u(xc(e,t.filters,n,"same"),t.bias)}function Bd(e,t,n){void 0===n&&(n=!0);var r=n?pl(e):e;return r=od(r,t.separable_conv0,[1,1]),r=od(pl(r),t.separable_conv1,[1,1]),r=Wc(r,[3,3],[2,2],"same"),r=_u(r,Dd(e,t.expansion_conv,[2,2]))}var _d,Nd=function(e){function t(t){var n=e.call(this,"TinyXception")||this;return n._numMainBlocks=t,n}return Vp(t,e),t.prototype.forwardInput=function(e){var t=this,n=this.params;if(!n)throw new Error("TinyXception - load model before inference");return pn((function(){var r=dh(e.toBatchTensor(112,!0),[122.782,117.001,104.298]).div(Nn(256)),o=pl(Dd(r,n.entry_flow.conv_in,[2,2]));return o=Bd(o,n.entry_flow.reduction_block_0,!1),o=Bd(o,n.entry_flow.reduction_block_1),oh(t._numMainBlocks,0,1).forEach((function(e){o=function(e,t){var n=od(pl(e),t.separable_conv0,[1,1]);return n=od(pl(n),t.separable_conv1,[1,1]),n=od(pl(n),t.separable_conv2,[1,1]),_u(n,e)}(o,n.middle_flow["main_block_"+e])})),o=Bd(o,n.exit_flow.reduction_block),o=pl(od(o,n.exit_flow.separable_conv,[1,1]))}))},t.prototype.forward=function(e){return Gp(this,void 0,void 0,(function(){var t;return Xp(this,(function(n){switch(n.label){case 0:return t=this.forwardInput,[4,Kh(e)];case 1:return[2,t.apply(this,[n.sent()])]}}))}))},t.prototype.getDefaultModelName=function(){return"tiny_xception_model"},t.prototype.extractParamsFromWeigthMap=function(e){return Od(e,this._numMainBlocks)},t.prototype.extractParams=function(e){return Rd(e,this._numMainBlocks)},t}(rd);!function(e){e.FEMALE="female",e.MALE="male"}(_d||(_d={}));var Pd=function(e){function t(t){void 0===t&&(t=new Nd(2));var n=e.call(this,"AgeGenderNet")||this;return n._faceFeatureExtractor=t,n}return Vp(t,e),Object.defineProperty(t.prototype,"faceFeatureExtractor",{get:function(){return this._faceFeatureExtractor},enumerable:!0,configurable:!0}),t.prototype.runNet=function(e){var t=this,n=this.params;if(!n)throw new Error(this._name+" - load model before inference");return pn((function(){var r=e instanceof Zh?t.faceFeatureExtractor.forwardInput(e):e,o=zc(r,[7,7],[2,2],"valid").as2D(r.shape[0],-1);return{age:wd(o,n.fc.age).as1D(),gender:wd(o,n.fc.gender)}}))},t.prototype.forwardInput=function(e){var t=this;return pn((function(){var n=t.runNet(e),r=n.age,o=n.gender;return{age:r,gender:to(o)}}))},t.prototype.forward=function(e){return Gp(this,void 0,void 0,(function(){var t;return Xp(this,(function(n){switch(n.label){case 0:return t=this.forwardInput,[4,Kh(e)];case 1:return[2,t.apply(this,[n.sent()])]}}))}))},t.prototype.predictAgeAndGender=function(e){return Gp(this,void 0,void 0,(function(){var t,n,r,o,i,a,s=this;return Xp(this,(function(u){switch(u.label){case 0:return[4,Kh(e)];case 1:return t=u.sent(),[4,this.forwardInput(t)];case 2:return n=u.sent(),r=Pr(n.age),o=Pr(n.gender),i=r.map((function(e,t){return{ageTensor:e,genderTensor:o[t]}})),[4,Promise.all(i.map((function(e){var t=e.ageTensor,n=e.genderTensor;return Gp(s,void 0,void 0,(function(){var e,r,o,i,a;return Xp(this,(function(s){switch(s.label){case 0:return[4,t.data()];case 1:return e=s.sent()[0],[4,n.data()];case 2:return r=s.sent()[0],i=(o=r>.5)?_d.MALE:_d.FEMALE,a=o?r:1-r,t.dispose(),n.dispose(),[2,{age:e,gender:i,genderProbability:a}]}}))}))})))];case 3:return a=u.sent(),n.age.dispose(),n.gender.dispose(),[2,t.isBatchInput?a:a[0]]}}))}))},t.prototype.getDefaultModelName=function(){return"age_gender_model"},t.prototype.dispose=function(t){void 0===t&&(t=!0),this.faceFeatureExtractor.dispose(t),e.prototype.dispose.call(this,t)},t.prototype.loadClassifierParams=function(e){var t=this.extractClassifierParams(e),n=t.params,r=t.paramMappings;this._params=n,this._paramMappings=r},t.prototype.extractClassifierParams=function(e){return function(e){var t=[],n=md(e),r=n.extractWeights,o=n.getRemainingWeights,i=ld(r,t),a=i(512,1,"fc/age"),s=i(512,2,"fc/gender");if(0!==o().length)throw new Error("weights remaing after extract: "+o().length);return{paramMappings:t,params:{fc:{age:a,gender:s}}}}(e)},t.prototype.extractParamsFromWeigthMap=function(e){var t=xd(e),n=t.featureExtractorMap,r=t.classifierMap;return this.faceFeatureExtractor.loadFromWeightMap(n),function(e){var t=[],n=dd(e,t);function r(e){return{weights:n(e+"/weights",2),bias:n(e+"/bias",1)}}var o={fc:{age:r("fc/age"),gender:r("fc/gender")}};return ud(e,t),{params:o,paramMappings:t}}(r)},t.prototype.extractParams=function(e){var t=e.slice(0,e.length-1539),n=e.slice(e.length-1539);return this.faceFeatureExtractor.extractWeights(t),this.extractClassifierParams(n)},t}(rd),Md=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vp(t,e),t.prototype.postProcess=function(e,t,n){var r=n.map((function(e){var n=e.width,r=e.height,o=t/Math.max(r,n);return{width:n*o,height:r*o}})),o=r.length;return pn((function(){var n=function(e,t){return Br([zn([68],e),zn([68],t)],1).as2D(1,136).as1D()},i=function(e,t){var n=r[e],o=n.width,i=n.height;return t(o,i)?Math.abs(o-i)/2:0},a=e.mul(zn([o,136],t)).sub(Br(Array.from(Array(o),(function(e,t){return n(function(e){return i(e,(function(e,t){return e<t}))}(t),function(e){return i(e,(function(e,t){return t<e}))}(t))})))).div(Br(Array.from(Array(o),(function(e,t){return n(r[t].width,r[t].height)}))));return a}))},t.prototype.forwardInput=function(e){var t=this;return pn((function(){var n=t.runNet(e);return t.postProcess(n,e.inputSize,e.inputDimensions.map((function(e){return{height:e[0],width:e[1]}})))}))},t.prototype.forward=function(e){return Gp(this,void 0,void 0,(function(){var t;return Xp(this,(function(n){switch(n.label){case 0:return t=this.forwardInput,[4,Kh(e)];case 1:return[2,t.apply(this,[n.sent()])]}}))}))},t.prototype.detectLandmarks=function(e){return Gp(this,void 0,void 0,(function(){var t,n,r,o=this;return Xp(this,(function(i){switch(i.label){case 0:return[4,Kh(e)];case 1:return t=i.sent(),n=pn((function(){return Pr(o.forwardInput(t))})),[4,Promise.all(n.map((function(e,n){return Gp(o,void 0,void 0,(function(){var r,o,i,a,s;return Xp(this,(function(u){switch(u.label){case 0:return i=(o=Array).from,[4,e.data()];case 1:return r=i.apply(o,[u.sent()]),a=r.filter((function(e,t){return eh(t)})),s=r.filter((function(e,t){return!eh(t)})),[2,new bh(Array(68).fill(0).map((function(e,t){return new sh(a[t],s[t])})),{height:t.getInputHeight(n),width:t.getInputWidth(n)})]}}))}))})))];case 2:return r=i.sent(),n.forEach((function(e){return e.dispose()})),[2,t.isBatchInput?r:r[0]]}}))}))},t.prototype.getClassifierChannelsOut=function(){return 136},t}(Ad),Fd=function(e){function t(t){return void 0===t&&(t=new bd),e.call(this,"FaceLandmark68Net",t)||this}return Vp(t,e),t.prototype.getDefaultModelName=function(){return"face_landmark_68_model"},t.prototype.getClassifierChannelsIn=function(){return 256},t}(Md);var Ld=function(e){function t(){return e.call(this,"TinyFaceFeatureExtractor")||this}return Vp(t,e),t.prototype.forwardInput=function(e){var t=this.params;if(!t)throw new Error("TinyFaceFeatureExtractor - load model before inference");return pn((function(){var n=id(dh(e.toBatchTensor(112,!0),[122.782,117.001,104.298]).div(Nn(255)),t.dense0,!0);return n=id(n,t.dense1),n=id(n,t.dense2),n=zc(n,[14,14],[2,2],"valid")}))},t.prototype.forward=function(e){return Gp(this,void 0,void 0,(function(){var t;return Xp(this,(function(n){switch(n.label){case 0:return t=this.forwardInput,[4,Kh(e)];case 1:return[2,t.apply(this,[n.sent()])]}}))}))},t.prototype.getDefaultModelName=function(){return"face_feature_extractor_tiny_model"},t.prototype.extractParamsFromWeigthMap=function(e){return function(e){var t=[],n=yd(e,t).extractDenseBlock3Params,r={dense0:n("dense0",!0),dense1:n("dense1"),dense2:n("dense2")};return ud(e,t),{params:r,paramMappings:t}}(e)},t.prototype.extractParams=function(e){return function(e){var t=[],n=md(e),r=n.extractWeights,o=n.getRemainingWeights,i=gd(r,t).extractDenseBlock3Params,a=i(3,32,"dense0",!0),s=i(32,64,"dense1"),u=i(64,128,"dense2");if(0!==o().length)throw new Error("weights remaing after extract: "+o().length);return{paramMappings:t,params:{dense0:a,dense1:s,dense2:u}}}(e)},t}(rd),Ud=function(e){function t(t){return void 0===t&&(t=new Ld),e.call(this,"FaceLandmark68TinyNet",t)||this}return Vp(t,e),t.prototype.getDefaultModelName=function(){return"face_landmark_68_tiny_model"},t.prototype.getClassifierChannelsIn=function(){return 128},t}(Md);!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Vp(t,e)}(Fd);function Wd(e,t,n,r,o){void 0===o&&(o="same");var i=t.conv,a=i.filters,s=i.bias,u=xc(e,a,n,o);return u=function(e,t){return _u(Xu(e,t.weights),t.biases)}(u=_u(u,s),t.scale),r?pl(u):u}function zd(e,t){return Wd(e,t,[1,1],!1)}function qd(e,t){return Wd(e,t,[2,2],!0,"valid")}function Qd(e,t){function n(n,r,o,i){var a=function(t,n,r){var o=e(t),i=o.length/(n*r*r);if(i%1!=0)throw new Error("depth has to be an integer: "+i+", weights.length: "+o.length+", numFilters: "+n+", filterSize: "+r);return pn((function(){return ml(Ln(o,[n,i,r,r]),[2,3,1,0])}))}(n,r,o),s=Pn(e(r));return t.push({paramPath:i+"/filters"},{paramPath:i+"/bias"}),{filters:a,bias:s}}function r(r,o,i,a){var s=n(r,o,i,a+"/conv"),u=function(n,r){var o=Pn(e(n)),i=Pn(e(n));return t.push({paramPath:r+"/weights"},{paramPath:r+"/biases"}),{weights:o,biases:i}}(o,a+"/scale");return{conv:s,scale:u}}return{extractConvLayerParams:r,extractResidualLayerParams:function(e,t,n,o,i){return void 0===i&&(i=!1),{conv1:r((i?.5:1)*e,t,n,o+"/conv1"),conv2:r(e,t,n,o+"/conv2")}}}}function Vd(e,t){var n=dd(e,t);function r(e){var t=n(e+"/conv/filters",4),r=n(e+"/conv/bias",1),o=function(e){return{weights:n(e+"/scale/weights",1),biases:n(e+"/scale/biases",1)}}(e);return{conv:{filters:t,bias:r},scale:o}}return{extractConvLayerParams:r,extractResidualLayerParams:function(e){return{conv1:r(e+"/conv1"),conv2:r(e+"/conv2")}}}}function Hd(e){var t=[],n=Vd(e,t),r=n.extractConvLayerParams,o=n.extractResidualLayerParams,i=r("conv32_down"),a=o("conv32_1"),s=o("conv32_2"),u=o("conv32_3"),c=o("conv64_down"),l=o("conv64_1"),f=o("conv64_2"),p=o("conv64_3"),h=o("conv128_down"),d=o("conv128_1"),m=o("conv128_2"),g=o("conv256_down"),v=o("conv256_1"),y=o("conv256_2"),b=o("conv256_down_out"),w=e.fc;if(t.push({originalPath:"fc",paramPath:"fc"}),!Jp(w,2))throw new Error("expected weightMap[fc] to be a Tensor2D, instead have "+w);var x={conv32_down:i,conv32_1:a,conv32_2:s,conv32_3:u,conv64_down:c,conv64_1:l,conv64_2:f,conv64_3:p,conv128_down:h,conv128_1:d,conv128_2:m,conv256_down:g,conv256_1:v,conv256_2:y,conv256_down_out:b,fc:w};return ud(e,t),{params:x,paramMappings:t}}function Gd(e,t){var n=function(e,t){return Wd(e,t,[1,1],!0)}(e,t.conv1);return n=zd(n,t.conv2),n=_u(n,e),n=pl(n)}function Xd(e,t){var n=qd(e,t.conv1);n=zd(n,t.conv2);var r=zc(e,2,2,"valid"),o=Wn(r.shape),i=r.shape[3]!==n.shape[3];if(r.shape[1]!==n.shape[1]||r.shape[2]!==n.shape[2]){var a=Zp(n.shape);a[1]=1;var s=Wn(a),u=Zp((n=Hn([n,s],1)).shape);u[2]=1;var c=Wn(u);n=Hn([n,c],2)}return r=i?Hn([r,o],3):r,n=_u(r,n),n=pl(n)}var Zd=function(e){function t(){return e.call(this,"FaceRecognitionNet")||this}return Vp(t,e),t.prototype.forwardInput=function(e){var t=this.params;if(!t)throw new Error("FaceRecognitionNet - load model before inference");return pn((function(){var n=qd(dh(e.toBatchTensor(150,!0).toFloat(),[122.782,117.001,104.298]).div(Nn(256)),t.conv32_down);n=Gd(n=Wc(n,3,2,"valid"),t.conv32_1),n=Gd(n,t.conv32_2),n=Gd(n,t.conv32_3),n=Gd(n=Xd(n,t.conv64_down),t.conv64_1),n=Gd(n,t.conv64_2),n=Gd(n,t.conv64_3),n=Gd(n=Xd(n,t.conv128_down),t.conv128_1),n=Gd(n,t.conv128_2),n=Gd(n=Xd(n,t.conv256_down),t.conv256_1);var r=(n=Xd(n=Gd(n,t.conv256_2),t.conv256_down_out)).mean([1,2]);return Oc(r,t.fc)}))},t.prototype.forward=function(e){return Gp(this,void 0,void 0,(function(){var t;return Xp(this,(function(n){switch(n.label){case 0:return t=this.forwardInput,[4,Kh(e)];case 1:return[2,t.apply(this,[n.sent()])]}}))}))},t.prototype.computeFaceDescriptor=function(e){return Gp(this,void 0,void 0,(function(){var t,n,r,o=this;return Xp(this,(function(i){switch(i.label){case 0:return[4,Kh(e)];case 1:return t=i.sent(),n=pn((function(){return Pr(o.forwardInput(t))})),[4,Promise.all(n.map((function(e){return e.data()})))];case 2:return r=i.sent(),n.forEach((function(e){return e.dispose()})),[2,t.isBatchInput?r:r[0]]}}))}))},t.prototype.getDefaultModelName=function(){return"face_recognition_model"},t.prototype.extractParamsFromWeigthMap=function(e){return Hd(e)},t.prototype.extractParams=function(e){return function(e){var t=md(e),n=t.extractWeights,r=t.getRemainingWeights,o=[],i=Qd(n,o),a=i.extractConvLayerParams,s=i.extractResidualLayerParams,u=a(4704,32,7,"conv32_down"),c=s(9216,32,3,"conv32_1"),l=s(9216,32,3,"conv32_2"),f=s(9216,32,3,"conv32_3"),p=s(36864,64,3,"conv64_down",!0),h=s(36864,64,3,"conv64_1"),d=s(36864,64,3,"conv64_2"),m=s(36864,64,3,"conv64_3"),g=s(147456,128,3,"conv128_down",!0),v=s(147456,128,3,"conv128_1"),y=s(147456,128,3,"conv128_2"),b=s(589824,256,3,"conv256_down",!0),w=s(589824,256,3,"conv256_1"),x=s(589824,256,3,"conv256_2"),A=s(589824,256,3,"conv256_down_out"),E=pn((function(){return ml(Mn(n(32768),[128,256]),[1,0])}));if(o.push({paramPath:"fc"}),0!==r().length)throw new Error("weights remaing after extract: "+r().length);return{params:{conv32_down:u,conv32_1:c,conv32_2:l,conv32_3:f,conv64_down:p,conv64_1:h,conv64_2:d,conv64_3:m,conv128_down:g,conv128_1:v,conv128_2:y,conv256_down:b,conv256_1:w,conv256_2:x,conv256_down_out:A,fc:E},paramMappings:o}}(e)},t}(rd);function Kd(e,t,n){var r={gender:t,genderProbability:n};return Object.assign({},e,r)}var Jd=function(){function e(e){var t=void 0===e?{}:e,n=t.minFaceSize,r=t.scaleFactor,o=t.maxNumScales,i=t.scoreThresholds,a=t.scaleSteps;if(this._name="MtcnnOptions",this._minFaceSize=n||20,this._scaleFactor=r||.709,this._maxNumScales=o||10,this._scoreThresholds=i||[.6,.7,.7],this._scaleSteps=a,"number"!=typeof this._minFaceSize||this._minFaceSize<0)throw new Error(this._name+" - expected minFaceSize to be a number > 0");if("number"!=typeof this._scaleFactor||this._scaleFactor<=0||this._scaleFactor>=1)throw new Error(this._name+" - expected scaleFactor to be a number between 0 and 1");if("number"!=typeof this._maxNumScales||this._maxNumScales<0)throw new Error(this._name+" - expected maxNumScales to be a number > 0");if(!Array.isArray(this._scoreThresholds)||3!==this._scoreThresholds.length||this._scoreThresholds.some((function(e){return"number"!=typeof e})))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(e){return"number"!=typeof e}))))throw new Error(this._name+" - expected scaleSteps to be an array of numbers")}return Object.defineProperty(e.prototype,"minFaceSize",{get:function(){return this._minFaceSize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scaleFactor",{get:function(){return this._scaleFactor},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxNumScales",{get:function(){return this._maxNumScales},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scoreThresholds",{get:function(){return this._scoreThresholds},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scaleSteps",{get:function(){return this._scaleSteps},enumerable:!0,configurable:!0}),e}();function Yd(e,t){function n(n,r,o,i,a){var s=Ln(e(n*r*o*o),[o,o,n,r]),u=Pn(e(r));return t.push({paramPath:i+"/filters"},{paramPath:i+"/"+(a?"batch_norm_offset":"bias")}),{filters:s,bias:u}}function r(e,t,r,o){var i=n(e,t,r,o,!0);return{filters:i.filters,batch_norm_offset:i.bias}}function o(n,o,i){var a=function(n,r){var o=Ln(e(9*n),[3,3,n,1]),i=Pn(e(n)),a=Pn(e(n)),s=Pn(e(n)),u=Pn(e(n));return t.push({paramPath:r+"/filters"},{paramPath:r+"/batch_norm_scale"},{paramPath:r+"/batch_norm_offset"},{paramPath:r+"/batch_norm_mean"},{paramPath:r+"/batch_norm_variance"}),{filters:o,batch_norm_scale:i,batch_norm_offset:a,batch_norm_mean:s,batch_norm_variance:u}}(n,i+"/depthwise_conv");return{depthwise_conv:a,pointwise_conv:r(n,o,1,i+"/pointwise_conv")}}return{extractMobilenetV1Params:function(){return{conv_0:r(3,32,3,"mobilenetv1/conv_0"),conv_1:o(32,64,"mobilenetv1/conv_1"),conv_2:o(64,128,"mobilenetv1/conv_2"),conv_3:o(128,128,"mobilenetv1/conv_3"),conv_4:o(128,256,"mobilenetv1/conv_4"),conv_5:o(256,256,"mobilenetv1/conv_5"),conv_6:o(256,512,"mobilenetv1/conv_6"),conv_7:o(512,512,"mobilenetv1/conv_7"),conv_8:o(512,512,"mobilenetv1/conv_8"),conv_9:o(512,512,"mobilenetv1/conv_9"),conv_10:o(512,512,"mobilenetv1/conv_10"),conv_11:o(512,512,"mobilenetv1/conv_11"),conv_12:o(512,1024,"mobilenetv1/conv_12"),conv_13:o(1024,1024,"mobilenetv1/conv_13")}},extractPredictionLayerParams:function(){return{conv_0:r(1024,256,1,"prediction_layer/conv_0"),conv_1:r(256,512,3,"prediction_layer/conv_1"),conv_2:r(512,128,1,"prediction_layer/conv_2"),conv_3:r(128,256,3,"prediction_layer/conv_3"),conv_4:r(256,128,1,"prediction_layer/conv_4"),conv_5:r(128,256,3,"prediction_layer/conv_5"),conv_6:r(256,64,1,"prediction_layer/conv_6"),conv_7:r(64,128,3,"prediction_layer/conv_7"),box_predictor_0:{box_encoding_predictor:n(512,12,1,"prediction_layer/box_predictor_0/box_encoding_predictor"),class_predictor:n(512,9,1,"prediction_layer/box_predictor_0/class_predictor")},box_predictor_1:{box_encoding_predictor:n(1024,24,1,"prediction_layer/box_predictor_1/box_encoding_predictor"),class_predictor:n(1024,18,1,"prediction_layer/box_predictor_1/class_predictor")},box_predictor_2:{box_encoding_predictor:n(512,24,1,"prediction_layer/box_predictor_2/box_encoding_predictor"),class_predictor:n(512,18,1,"prediction_layer/box_predictor_2/class_predictor")},box_predictor_3:{box_encoding_predictor:n(256,24,1,"prediction_layer/box_predictor_3/box_encoding_predictor"),class_predictor:n(256,18,1,"prediction_layer/box_predictor_3/class_predictor")},box_predictor_4:{box_encoding_predictor:n(256,24,1,"prediction_layer/box_predictor_4/box_encoding_predictor"),class_predictor:n(256,18,1,"prediction_layer/box_predictor_4/class_predictor")},box_predictor_5:{box_encoding_predictor:n(128,24,1,"prediction_layer/box_predictor_5/box_encoding_predictor"),class_predictor:n(128,18,1,"prediction_layer/box_predictor_5/class_predictor")}}}}}function $d(e){var t=[],n=function(e,t){var n=dd(e,t);function r(e,t,r){return{filters:n(e+"/Conv2d_"+t+"_pointwise/weights",4,r+"/filters"),batch_norm_offset:n(e+"/Conv2d_"+t+"_pointwise/convolution_bn_offset",1,r+"/batch_norm_offset")}}function o(e){var t="mobilenetv1/conv_"+e,o="MobilenetV1/Conv2d_"+e+"_depthwise",i=t+"/depthwise_conv",a=t+"/pointwise_conv";return{depthwise_conv:{filters:n(o+"/depthwise_weights",4,i+"/filters"),batch_norm_scale:n(o+"/BatchNorm/gamma",1,i+"/batch_norm_scale"),batch_norm_offset:n(o+"/BatchNorm/beta",1,i+"/batch_norm_offset"),batch_norm_mean:n(o+"/BatchNorm/moving_mean",1,i+"/batch_norm_mean"),batch_norm_variance:n(o+"/BatchNorm/moving_variance",1,i+"/batch_norm_variance")},pointwise_conv:r("MobilenetV1",e,a)}}function i(e,t){return{filters:n(e+"/weights",4,t+"/filters"),bias:n(e+"/biases",1,t+"/bias")}}function a(e){return{box_encoding_predictor:i("Prediction/BoxPredictor_"+e+"/BoxEncodingPredictor","prediction_layer/box_predictor_"+e+"/box_encoding_predictor"),class_predictor:i("Prediction/BoxPredictor_"+e+"/ClassPredictor","prediction_layer/box_predictor_"+e+"/class_predictor")}}return{extractMobilenetV1Params:function(){return{conv_0:r("MobilenetV1",0,"mobilenetv1/conv_0"),conv_1:o(1),conv_2:o(2),conv_3:o(3),conv_4:o(4),conv_5:o(5),conv_6:o(6),conv_7:o(7),conv_8:o(8),conv_9:o(9),conv_10:o(10),conv_11:o(11),conv_12:o(12),conv_13:o(13)}},extractPredictionLayerParams:function(){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:a(0),box_predictor_1:a(1),box_predictor_2:a(2),box_predictor_3:a(3),box_predictor_4:a(4),box_predictor_5:a(5)}}}}(e,t),r=n.extractMobilenetV1Params,o=n.extractPredictionLayerParams,i=e["Output/extra_dim"];if(t.push({originalPath:"Output/extra_dim",paramPath:"output_layer/extra_dim"}),!Yp(i))throw new Error("expected weightMap['Output/extra_dim'] to be a Tensor3D, instead have "+i);var a={mobilenetv1:r(),prediction_layer:o(),output_layer:{extra_dim:i}};return ud(e,t),{params:a,paramMappings:t}}function em(e,t,n){return pn((function(){var r=xc(e,t.filters,n,"same");return r=_u(r,t.batch_norm_offset),zs(r,0,6)}))}function tm(e,t){return pn((function(){var n=null,r=em(e,t.conv_0,[2,2]);if([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].forEach((function(e,t){var o=t+1,i=function(e){return[2,4,6,12].some((function(t){return t===e}))?[2,2]:[1,1]}(o);r=function(e,t,n){return pn((function(){var r=kc(e,t.filters,n,"same");return r=Cu(r,t.batch_norm_mean,t.batch_norm_variance,t.batch_norm_offset,t.batch_norm_scale,.0010000000474974513),zs(r,0,6)}))}(r,e.depthwise_conv,i),r=em(r,e.pointwise_conv,[1,1]),11===o&&(n=r)})),null===n)throw new Error("mobileNetV1 - output of conv layer 11 is null");return{out:r,conv11:n}}))}function nm(e,t,n){var r=e.arraySync(),o=Math.min(r[t][0],r[t][2]),i=Math.min(r[t][1],r[t][3]),a=Math.max(r[t][0],r[t][2]),s=Math.max(r[t][1],r[t][3]),u=Math.min(r[n][0],r[n][2]),c=Math.min(r[n][1],r[n][3]),l=Math.max(r[n][0],r[n][2]),f=Math.max(r[n][1],r[n][3]),p=(a-o)*(s-i),h=(l-u)*(f-c);if(p<=0||h<=0)return 0;var d=Math.max(o,u),m=Math.max(i,c),g=Math.min(a,l),v=Math.min(s,f),y=Math.max(g-d,0)*Math.max(v-m,0);return y/(p+h-y)}function rm(e,t){var n=function(e){var t=Pr(ml(e,[1,0])),n=[$u(t[2],t[0]),$u(t[3],t[1])];return{sizes:n,centers:[_u(t[0],Fu(n[0],Nn(2))),_u(t[1],Fu(n[1],Nn(2)))]}}(e),r=n.sizes,o=n.centers,i=Pr(ml(t,[1,0])),a=Fu(Xu(Hs(Fu(i[2],Nn(5))),r[0]),Nn(2)),s=_u(Xu(Fu(i[0],Nn(10)),r[0]),o[0]),u=Fu(Xu(Hs(Fu(i[3],Nn(5))),r[1]),Nn(2)),c=_u(Xu(Fu(i[1],Nn(10)),r[1]),o[1]);return ml(Br([$u(s,a),$u(c,u),_u(s,a),_u(c,u)]),[1,0])}function om(e,t){return pn((function(){var n=e.shape[0];return{boxPredictionEncoding:Rr(sd(e,t.box_encoding_predictor),[n,-1,1,4]),classPrediction:Rr(sd(e,t.class_predictor),[n,-1,3])}}))}var im=function(){function e(e){var t=void 0===e?{}:e,n=t.minConfidence,r=t.maxResults;if(this._name="SsdMobilenetv1Options",this._minConfidence=n||.5,this._maxResults=r||100,"number"!=typeof this._minConfidence||this._minConfidence<=0||this._minConfidence>=1)throw new Error(this._name+" - expected minConfidence to be a number between 0 and 1");if("number"!=typeof this._maxResults)throw new Error(this._name+" - expected maxResults to be a number")}return Object.defineProperty(e.prototype,"minConfidence",{get:function(){return this._minConfidence},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxResults",{get:function(){return this._maxResults},enumerable:!0,configurable:!0}),e}(),am=function(e){function t(){return e.call(this,"SsdMobilenetv1")||this}return Vp(t,e),t.prototype.forwardInput=function(e){var t=this.params;if(!t)throw new Error("SsdMobilenetv1 - load model before inference");return pn((function(){var n=e.toBatchTensor(512,!1).toFloat(),r=tm($u(Xu(n,Nn(.007843137718737125)),Nn(1)),t.mobilenetv1),o=function(e,t,n){return pn((function(){var r=em(e,n.conv_0,[1,1]),o=em(r,n.conv_1,[2,2]),i=em(o,n.conv_2,[1,1]),a=em(i,n.conv_3,[2,2]),s=em(a,n.conv_4,[1,1]),u=em(s,n.conv_5,[2,2]),c=em(u,n.conv_6,[1,1]),l=em(c,n.conv_7,[2,2]),f=om(t,n.box_predictor_0),p=om(e,n.box_predictor_1),h=om(o,n.box_predictor_2),d=om(a,n.box_predictor_3),m=om(u,n.box_predictor_4),g=om(l,n.box_predictor_5);return{boxPredictions:Hn([f.boxPredictionEncoding,p.boxPredictionEncoding,h.boxPredictionEncoding,d.boxPredictionEncoding,m.boxPredictionEncoding,g.boxPredictionEncoding],1),classPredictions:Hn([f.classPrediction,p.classPrediction,h.classPrediction,d.classPrediction,m.classPrediction,g.classPrediction],1)}}))}(r.out,r.conv11,t.prediction_layer);return function(e,t,n){return pn((function(){var r=e.shape[0],o=rm(Rr(_r(n.extra_dim,[r,1,1]),[-1,4]),Rr(e,[-1,4]));o=Rr(o,[r,o.shape[0]/r,4]);var i=nu(Hc(t,[0,0,1],[-1,-1,-1])),a=Hc(i,[0,0,0],[-1,-1,1]);return a=Rr(a,[r,a.shape[1]]),{boxes:Pr(o),scores:Pr(a)}}))}(o.boxPredictions,o.classPredictions,t.output_layer)}))},t.prototype.forward=function(e){return Gp(this,void 0,void 0,(function(){var t;return Xp(this,(function(n){switch(n.label){case 0:return t=this.forwardInput,[4,Kh(e)];case 1:return[2,t.apply(this,[n.sent()])]}}))}))},t.prototype.locateFaces=function(e,t){return void 0===t&&(t={}),Gp(this,void 0,void 0,(function(){var n,r,o,i,a,s,u,c,l,f,p,h,d,m,g,v,y,b,w,x;return Xp(this,(function(A){switch(A.label){case 0:return n=new im(t),r=n.maxResults,o=n.minConfidence,[4,Kh(e)];case 1:for(i=A.sent(),a=this.forwardInput(i),s=a.boxes,u=a.scores,c=s[0],l=u[0],f=1;f<s.length;f++)s[f].dispose(),u[f].dispose();return d=(h=Array).from,[4,l.data()];case 2:return p=d.apply(h,[A.sent()]),.5,m=function(e,t,n,r,o){var i=e.shape[0],a=Math.min(n,i),s=t.map((function(e,t){return{score:e,boxIndex:t}})).filter((function(e){return e.score>o})).sort((function(e,t){return t.score-e.score})),u=function(e){return e<=r?1:0},c=[];return s.forEach((function(t){if(!(c.length>=a)){for(var n=t.score,r=c.length-1;r>=0;--r){var i=nm(e,t.boxIndex,c[r]);if(0!==i&&(t.score*=u(i),t.score<=o))break}n===t.score&&c.push(t.boxIndex)}})),c}(c,p,r,.5,o),g=i.getReshapedInputDimensions(0),v=i.inputSize,y=v/g.width,b=v/g.height,w=c.arraySync(),x=m.map((function(e){var t=[Math.max(0,w[e][0]),Math.min(1,w[e][2])].map((function(e){return e*b})),n=t[0],r=t[1],o=[Math.max(0,w[e][1]),Math.min(1,w[e][3])].map((function(e){return e*y})),a=o[0],s=o[1];return new fh(p[e],new gh(a,n,s-a,r-n),{height:i.getInputHeight(0),width:i.getInputWidth(0)})})),c.dispose(),l.dispose(),[2,x]}}))}))},t.prototype.getDefaultModelName=function(){return"ssd_mobilenetv1_model"},t.prototype.extractParamsFromWeigthMap=function(e){return $d(e)},t.prototype.extractParams=function(e){return function(e){var t=[],n=md(e),r=n.extractWeights,o=n.getRemainingWeights,i=Yd(r,t),a=i.extractMobilenetV1Params,s=i.extractPredictionLayerParams,u=a(),c=s(),l={extra_dim:Fn(r(20472),[1,5118,4])};if(t.push({paramPath:"output_layer/extra_dim"}),0!==o().length)throw new Error("weights remaing after extract: "+o().length);return{params:{mobilenetv1:u,prediction_layer:c,output_layer:l},paramMappings:t}}(e)},t}(rd);!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Vp(t,e)}(am);var sm,um=[new sh(.738768,.874946),new sh(2.42204,2.65704),new sh(4.30971,7.04493),new sh(10.246,4.59428),new sh(12.6868,11.8741)],cm=[new sh(1.603231,2.094468),new sh(6.041143,7.080126),new sh(2.882459,3.518061),new sh(4.266906,5.178857),new sh(9.041765,10.66308)],lm=[117.001,114.697,97.404],fm=function(e){return"number"==typeof e};function pm(e){return pn((function(){var t=Xu(e,Nn(.10000000149011612));return _u(pl($u(e,t)),t)}))}function hm(e,t){return pn((function(){var n=xr(e,[[0,0],[1,1],[1,1],[0,0]]);return n=xc(n,t.conv.filters,[1,1],"valid"),n=$u(n,t.bn.sub),n=Xu(n,t.bn.truediv),pm(n=_u(n,t.conv.bias))}))}function dm(e,t){return pn((function(){var n=xr(e,[[0,0],[1,1],[1,1],[0,0]]);return n=jc(n,t.depthwise_filter,t.pointwise_filter,[1,1],"valid"),pm(n=_u(n,t.bias))}))}function mm(e,t){var n=cd(e,t);var r=pd(e,t);return{extractConvParams:n,extractConvWithBatchNormParams:function(r,o,i){var a=n(r,o,3,i+"/conv"),s=function(n,r){var o=Pn(e(n)),i=Pn(e(n));return t.push({paramPath:r+"/sub"},{paramPath:r+"/truediv"}),{sub:o,truediv:i}}(o,i+"/bn");return{conv:a,bn:s}},extractSeparableConvParams:r}}function gm(e,t){var n=dd(e,t);function r(e){return{filters:n(e+"/filters",4),bias:n(e+"/bias",1)}}return{extractConvParams:r,extractConvWithBatchNormParams:function(e){var t=r(e+"/conv"),o=function(e){return{sub:n(e+"/sub",1),truediv:n(e+"/truediv",1)}}(e+"/bn");return{conv:t,bn:o}},extractSeparableConvParams:hd(n)}}!function(e){e[e.XS=224]="XS",e[e.SM=320]="SM",e[e.MD=416]="MD",e[e.LG=608]="LG"}(sm||(sm={}));var vm=function(){function e(e){var t=void 0===e?{}:e,n=t.inputSize,r=t.scoreThreshold;if(this._name="TinyYolov2Options",this._inputSize=n||416,this._scoreThreshold=r||.5,"number"!=typeof this._inputSize||this._inputSize%32!=0)throw new Error(this._name+" - expected inputSize to be a number divisible by 32");if("number"!=typeof this._scoreThreshold||this._scoreThreshold<=0||this._scoreThreshold>=1)throw new Error(this._name+" - expected scoreThreshold to be a number between 0 and 1")}return Object.defineProperty(e.prototype,"inputSize",{get:function(){return this._inputSize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scoreThreshold",{get:function(){return this._scoreThreshold},enumerable:!0,configurable:!0}),e}(),ym=function(e){function t(t){var n=e.call(this,"TinyYolov2")||this;return function(e){if(!e)throw new Error("invalid config: "+e);if("boolean"!=typeof e.withSeparableConvs)throw new Error("config.withSeparableConvs has to be a boolean, have: "+e.withSeparableConvs);if(!fm(e.iouThreshold)||e.iouThreshold<0||e.iouThreshold>1)throw new Error("config.iouThreshold has to be a number between [0, 1], have: "+e.iouThreshold);if(!Array.isArray(e.classes)||!e.classes.length||!e.classes.every((function(e){return"string"==typeof e})))throw new Error("config.classes has to be an array class names: string[], have: "+JSON.stringify(e.classes));if(!Array.isArray(e.anchors)||!e.anchors.length||!e.anchors.map((function(e){return e||{}})).every((function(e){return fm(e.x)&&fm(e.y)})))throw new Error("config.anchors has to be an array of { x: number, y: number }, have: "+JSON.stringify(e.anchors));if(e.meanRgb&&(!Array.isArray(e.meanRgb)||3!==e.meanRgb.length||!e.meanRgb.every(fm)))throw new Error("config.meanRgb has to be an array of shape [number, number, number], have: "+JSON.stringify(e.meanRgb))}(t),n._config=t,n}return Vp(t,e),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,t){var n=hm(e,t.conv0);return n=hm(n=Wc(n,[2,2],[2,2],"same"),t.conv1),n=hm(n=Wc(n,[2,2],[2,2],"same"),t.conv2),n=hm(n=Wc(n,[2,2],[2,2],"same"),t.conv3),n=hm(n=Wc(n,[2,2],[2,2],"same"),t.conv4),n=hm(n=Wc(n,[2,2],[2,2],"same"),t.conv5),n=hm(n=Wc(n,[2,2],[1,1],"same"),t.conv6),sd(n=hm(n,t.conv7),t.conv8,"valid",!1)},t.prototype.runMobilenet=function(e,t){var n=this.config.isFirstLayerConv2d?pm(sd(e,t.conv0,"valid",!1)):dm(e,t.conv0);return n=dm(n=Wc(n,[2,2],[2,2],"same"),t.conv1),n=dm(n=Wc(n,[2,2],[2,2],"same"),t.conv2),n=dm(n=Wc(n,[2,2],[2,2],"same"),t.conv3),n=dm(n=Wc(n,[2,2],[2,2],"same"),t.conv4),n=dm(n=Wc(n,[2,2],[2,2],"same"),t.conv5),n=Wc(n,[2,2],[1,1],"same"),n=t.conv6?dm(n,t.conv6):n,sd(n=t.conv7?dm(n,t.conv7):n,t.conv8,"valid",!1)},t.prototype.forwardInput=function(e,t){var n=this,r=this.params;if(!r)throw new Error("TinyYolov2 - load model before inference");return pn((function(){var o=e.toBatchTensor(t,!1).toFloat();return o=(o=n.config.meanRgb?dh(o,n.config.meanRgb):o).div(Nn(256)),n.config.withSeparableConvs?n.runMobilenet(o,r):n.runTinyYolov2(o,r)}))},t.prototype.forward=function(e,t){return Gp(this,void 0,void 0,(function(){var n;return Xp(this,(function(r){switch(r.label){case 0:return n=this.forwardInput,[4,Kh(e)];case 1:return[4,n.apply(this,[r.sent(),t])];case 2:return[2,r.sent()]}}))}))},t.prototype.detect=function(e,t){return void 0===t&&(t={}),Gp(this,void 0,void 0,(function(){var n,r,o,i,a,s,u,c,l,f,p,h,d,m=this;return Xp(this,(function(g){switch(g.label){case 0:return n=new vm(t),r=n.inputSize,o=n.scoreThreshold,[4,Kh(e)];case 1:return i=g.sent(),[4,this.forwardInput(i,r)];case 2:return a=g.sent(),s=pn((function(){return Pr(a)[0].expandDims()})),u={width:i.getInputWidth(0),height:i.getInputHeight(0)},[4,this.extractBoxes(s,i.getReshapedInputDimensions(0),o)];case 3:return c=g.sent(),a.dispose(),s.dispose(),l=c.map((function(e){return e.box})),f=c.map((function(e){return e.score})),p=c.map((function(e){return e.classScore})),h=c.map((function(e){return m.config.classes[e.label]})),d=hh(l.map((function(e){return e.rescale(r)})),f,this.config.iouThreshold,!0),[2,d.map((function(e){return new lh(f[e],p[e],h[e],l[e],u)}))]}}))}))},t.prototype.getDefaultModelName=function(){return""},t.prototype.extractParamsFromWeigthMap=function(e){return function(e,t){var n,r=[],o=gm(e,r),i=o.extractConvParams,a=o.extractConvWithBatchNormParams,s=o.extractSeparableConvParams;if(t.withSeparableConvs){var u=t.filterSizes&&t.filterSizes.length||9;n={conv0:t.isFirstLayerConv2d?i("conv0"):s("conv0"),conv1:s("conv1"),conv2:s("conv2"),conv3:s("conv3"),conv4:s("conv4"),conv5:s("conv5"),conv6:u>7?s("conv6"):void 0,conv7:u>8?s("conv7"):void 0,conv8:i("conv8")}}else n={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 ud(e,r),{params:n,paramMappings:r}}(e,this.config)},t.prototype.extractParams=function(e){var n=this.config.filterSizes||t.DEFAULT_FILTER_SIZES,r=n?n.length:void 0;if(7!==r&&8!==r&&9!==r)throw new Error("TinyYolov2 - expected 7 | 8 | 9 convolutional filters, but found "+r+" filterSizes in config");return function(e,t,n,r){var o,i=md(e),a=i.extractWeights,s=i.getRemainingWeights,u=[],c=mm(a,u),l=c.extractConvParams,f=c.extractConvWithBatchNormParams,p=c.extractSeparableConvParams;if(t.withSeparableConvs){var h=r[0],d=r[1],m=r[2],g=r[3],v=r[4],y=r[5],b=r[6],w=r[7],x=r[8];o={conv0:t.isFirstLayerConv2d?l(h,d,3,"conv0"):p(h,d,"conv0"),conv1:p(d,m,"conv1"),conv2:p(m,g,"conv2"),conv3:p(g,v,"conv3"),conv4:p(v,y,"conv4"),conv5:p(y,b,"conv5"),conv6:w?p(b,w,"conv6"):void 0,conv7:x?p(w,x,"conv7"):void 0,conv8:l(x||w||b,5*n,1,"conv8")}}else h=r[0],d=r[1],m=r[2],g=r[3],v=r[4],y=r[5],b=r[6],w=r[7],x=r[8],o={conv0:f(h,d,"conv0"),conv1:f(d,m,"conv1"),conv2:f(m,g,"conv2"),conv3:f(g,v,"conv3"),conv4:f(v,y,"conv4"),conv5:f(y,b,"conv5"),conv6:f(b,w,"conv6"),conv7:f(w,x,"conv7"),conv8:l(x,5*n,1,"conv8")};if(0!==s().length)throw new Error("weights remaing after extract: "+s().length);return{params:o,paramMappings:u}}(e,this.config,this.boxEncodingSize,n)},t.prototype.extractBoxes=function(e,t,n){return Gp(this,void 0,void 0,(function(){var r,o,i,a,s,u,c,l,f,p,h,d,m,g,v,y,b,w,x,A,E,C,k,I,S,j,T,R,O,D=this;return Xp(this,(function(B){switch(B.label){case 0:return r=t.width,o=t.height,i=Math.max(r,o),a=i/r,s=i/o,u=e.shape[1],c=this.config.anchors.length,l=pn((function(){var t=e.reshape([u,u,c,D.boxEncodingSize]);return[t.slice([0,0,0,0],[u,u,c,4]),t.slice([0,0,0,4],[u,u,c,1]),D.withClassScores?to(t.slice([0,0,0,5],[u,u,c,D.config.classes.length]),3):Nn(0)]})),f=l[0],p=l[1],h=l[2],d=[],[4,p.array()];case 1:return m=B.sent(),[4,f.array()];case 2:g=B.sent(),v=0,B.label=3;case 3:if(!(v<u))return[3,12];y=0,B.label=4;case 4:if(!(y<u))return[3,11];b=0,B.label=5;case 5:return b<c?(w=mh(m[v][y][b][0]),!n||w>n?(x=(y+mh(g[v][y][b][0]))/u*a,A=(v+mh(g[v][y][b][1]))/u*s,E=Math.exp(g[v][y][b][2])*this.config.anchors[b].x/u*a,C=Math.exp(g[v][y][b][3])*this.config.anchors[b].y/u*s,k=x-E/2,I=A-C/2,S={row:v,col:y,anchor:b},this.withClassScores?[4,this.extractPredictedClass(h,S)]:[3,7]):[3,9]):[3,10];case 6:return O=B.sent(),[3,8];case 7:O={classScore:1,label:0},B.label=8;case 8:T=(j=O).classScore,R=j.label,d.push(Hp({box:new ch(k,I,k+E,I+C),score:w,classScore:w*T,label:R},S)),B.label=9;case 9:return b++,[3,5];case 10:return y++,[3,4];case 11:return v++,[3,3];case 12:return f.dispose(),p.dispose(),h.dispose(),[2,d]}}))}))},t.prototype.extractPredictedClass=function(e,t){return Gp(this,void 0,void 0,(function(){var n,r,o,i;return Xp(this,(function(a){switch(a.label){case 0:return n=t.row,r=t.col,o=t.anchor,[4,e.array()];case 1:return i=a.sent(),[2,Array(this.config.classes.length).fill(0).map((function(e,t){return i[n][r][o][t]})).map((function(e,t){return{classScore:e,label:t}})).reduce((function(e,t){return e.classScore>t.classScore?e:t}))]}}))}))},t.DEFAULT_FILTER_SIZES=[3,16,32,64,128,256,512,1024,1024],t}(rd),bm=function(e){function t(t){void 0===t&&(t=!0);var n=Object.assign({},{withSeparableConvs:t,iouThreshold:.4,classes:["face"]},t?{anchors:cm,meanRgb:lm}:{anchors:um,withClassScores:!0});return e.call(this,n)||this}return Vp(t,e),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,t){return Gp(this,void 0,void 0,(function(){return Xp(this,(function(n){switch(n.label){case 0:return[4,this.detect(e,t)];case 1:return[2,n.sent().map((function(e){return new fh(e.score,e.relativeBox,{width:e.imageWidth,height:e.imageHeight})}))]}}))}))},t.prototype.getDefaultModelName=function(){return this.withSeparableConvs?"tiny_yolov2_separable_conv_model":"tiny_yolov2_model"},t.prototype.extractParamsFromWeigthMap=function(t){return e.prototype.extractParamsFromWeigthMap.call(this,t)},t}(ym);var wm=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._name="TinyFaceDetectorOptions",t}return Vp(t,e),t}(vm),xm=function(){function e(){}return e.prototype.then=function(e){return Gp(this,void 0,void 0,(function(){var t;return Xp(this,(function(n){switch(n.label){case 0:return t=e,[4,this.run()];case 1:return[2,t.apply(void 0,[n.sent()])]}}))}))},e.prototype.run=function(){return Gp(this,void 0,void 0,(function(){return Xp(this,(function(e){throw new Error("ComposableTask - run is not implemented")}))}))},e}();function Am(e,t){var n={descriptor:t};return Object.assign({},e,n)}function Em(e,t,n,r,o){return void 0===o&&(o=function(e){return e.alignedRect}),Gp(this,void 0,void 0,(function(){var i,a,s,u,c;return Xp(this,(function(l){switch(l.label){case 0:return i=e.map((function(e){return Sd(e)?o(e):e.detection})),(s=r)?[3,5]:t instanceof qe?[4,Yh(t,i)]:[3,2];case 1:return u=l.sent(),[3,4];case 2:return[4,Jh(t,i)];case 3:u=l.sent(),l.label=4;case 4:s=u,l.label=5;case 5:return[4,n(a=s)];case 6:return c=l.sent(),a.forEach((function(e){return e instanceof qe&&e.dispose()})),[2,c]}}))}))}function Cm(e,t,n,r,o){return Gp(this,void 0,void 0,(function(){var i=this;return Xp(this,(function(a){return[2,Em([e],t,(function(e){return Gp(i,void 0,void 0,(function(){return Xp(this,(function(t){return[2,n(e[0])]}))}))}),r,o)]}))}))}function km(e){var t=md(e),n=t.extractWeights,r=t.getRemainingWeights,o=[],i=function(e,t){var n=cd(e,t),r=ld(e,t);function o(n,r){var o=Pn(e(n));return t.push({paramPath:r}),o}function i(e,t,r){return void 0===r&&(r=!1),{conv1:n(e[0],e[1],3,t+"/conv1"),prelu1_alpha:o(e[1],t+"/prelu1_alpha"),conv2:n(e[1],e[2],3,t+"/conv2"),prelu2_alpha:o(e[2],t+"/prelu2_alpha"),conv3:n(e[2],e[3],r?2:3,t+"/conv3"),prelu3_alpha:o(e[3],t+"/prelu3_alpha")}}return{extractPNetParams:function(){var e=i([3,10,16,32],"pnet"),t=n(32,2,1,"pnet/conv4_1"),r=n(32,4,1,"pnet/conv4_2");return Hp(Hp({},e),{conv4_1:t,conv4_2:r})},extractRNetParams:function(){var e=i([3,28,48,64],"rnet",!0),t=r(576,128,"rnet/fc1"),n=o(128,"rnet/prelu4_alpha"),a=r(128,2,"rnet/fc2_1"),s=r(128,4,"rnet/fc2_2");return Hp(Hp({},e),{fc1:t,prelu4_alpha:n,fc2_1:a,fc2_2:s})},extractONetParams:function(){var e=i([3,32,64,64],"onet"),t=n(64,128,2,"onet/conv4"),a=o(128,"onet/prelu4_alpha"),s=r(1152,256,"onet/fc1"),u=o(256,"onet/prelu5_alpha"),c=r(256,2,"onet/fc2_1"),l=r(256,4,"onet/fc2_2"),f=r(256,10,"onet/fc2_3");return Hp(Hp({},e),{conv4:t,prelu4_alpha:a,fc1:s,prelu5_alpha:u,fc2_1:c,fc2_2:l,fc2_3:f})}}}(n,o),a=i.extractPNetParams,s=i.extractRNetParams,u=i.extractONetParams,c=a(),l=s(),f=u();if(0!==r().length)throw new Error("weights remaing after extract: "+r().length);return{params:{pnet:c,rnet:l,onet:f},paramMappings:o}}function Im(e){var t=[],n=function(e,t){var n=dd(e,t);function r(e){return{filters:n(e+"/weights",4,e+"/filters"),bias:n(e+"/bias",1)}}function o(e){return{weights:n(e+"/weights",2),bias:n(e+"/bias",1)}}function i(e){return n(e,1)}function a(e){return{conv1:r(e+"/conv1"),prelu1_alpha:i(e+"/prelu1_alpha"),conv2:r(e+"/conv2"),prelu2_alpha:i(e+"/prelu2_alpha"),conv3:r(e+"/conv3"),prelu3_alpha:i(e+"/prelu3_alpha")}}return{extractPNetParams:function(){var e=a("pnet"),t=r("pnet/conv4_1"),n=r("pnet/conv4_2");return Hp(Hp({},e),{conv4_1:t,conv4_2:n})},extractRNetParams:function(){var e=a("rnet"),t=o("rnet/fc1"),n=i("rnet/prelu4_alpha"),r=o("rnet/fc2_1"),s=o("rnet/fc2_2");return Hp(Hp({},e),{fc1:t,prelu4_alpha:n,fc2_1:r,fc2_2:s})},extractONetParams:function(){var e=a("onet"),t=r("onet/conv4"),n=i("onet/prelu4_alpha"),s=o("onet/fc1"),u=i("onet/prelu5_alpha"),c=o("onet/fc2_1"),l=o("onet/fc2_2"),f=o("onet/fc2_3");return Hp(Hp({},e),{conv4:t,prelu4_alpha:n,fc1:s,prelu5_alpha:u,fc2_1:c,fc2_2:l,fc2_3:f})}}}(e,t),r=n.extractPNetParams,o=n.extractRNetParams,i=n.extractONetParams,a=r(),s=o(),u=i();return ud(e,t),{params:{pnet:a,rnet:s,onet:u},paramMappings:t}}function Sm(e,t){var n=t[0],r=t[1];return{height:Math.floor(n*e),width:Math.floor(r*e)}}var jm=function(e){function t(t,n,r,o){return e.call(this,{left:t,top:n,right:r,bottom:o},!0)||this}return Vp(t,e),t}(uh);function Tm(e){return pn((function(){return Xu($u(e,Nn(127.5)),Nn(.0078125))}))}function Rm(e,t){return pn((function(){return _u(pl(e),Xu(t,Ys(pl(Ys(e)))))}))}function Om(e,t,n){return void 0===n&&(n=!1),pn((function(){var r=sd(e,t.conv1,"valid");return r=Rm(r,t.prelu1_alpha),r=Rm(r=sd(r=Wc(r,n?[2,2]:[3,3],[2,2],"same"),t.conv2,"valid"),t.prelu2_alpha),r=Rm(r=sd(r=n?r:Wc(r,[3,3],[2,2],"valid"),t.conv3,"valid"),t.prelu3_alpha)}))}function Dm(e,t,n,r,o){o.stage1=[];var i=t.map((function(t){return pn((function(){var n={scale:t},o=function(e,t){return pn((function(){var n=Sm(t,e.shape.slice(1)),r=n.height,o=n.width,i=Tm(uf.resizeBilinear(e,[r,o]));return ml(i,[0,2,1,3])}))}(e,t),i=Date.now(),a=function(e,t){return pn((function(){var n=Om(e,t,!0),r=sd(n,t.conv4_1,"valid"),o=vr(rl(r,3),3);return{prob:to($u(r,o),3),regions:sd(n,t.conv4_2,"valid")}}))}(o,r),s=a.prob,u=a.regions;return n.pnet=Date.now()-i,{scoresTensor:Pr(Pr(s,3)[1])[0],regionsTensor:Pr(u)[0],scale:t,statsForScale:n}}))})),a=i.map((function(e){var t=e.scoresTensor,r=e.regionsTensor,i=e.scale,a=e.statsForScale,s=function(e,t,n,r){for(var o=[],i=e.arraySync(),a=0;a<e.shape[0];a++)for(var s=0;s<e.shape[1];s++)i[a][s]>=r&&o.push(new sh(s,a));return o.map((function(e){var r=new ch(Math.round((2*e.y+1)/n),Math.round((2*e.x+1)/n),Math.round((2*e.y+12)/n),Math.round((2*e.x+12)/n)),o=i[e.y][e.x],a=t.arraySync();return{cell:r,score:o,region:new jm(a[e.y][e.x][0],a[e.y][e.x][1],a[e.y][e.x][2],a[e.y][e.x][3])}}))}(t,r,i,n);if(t.dispose(),r.dispose(),!s.length)return o.stage1.push(a),[];var u=Date.now(),c=hh(s.map((function(e){return e.cell})),s.map((function(e){return e.score})),.5);return a.nms=Date.now()-u,a.numBoxes=c.length,o.stage1.push(a),c.map((function(e){return s[e]}))})),s=a.reduce((function(e,t){return e.concat(t)}),[]),u=[],c=[];if(s.length>0){var l=Date.now(),f=hh(s.map((function(e){return e.cell})),s.map((function(e){return e.score})),.7);o.stage1_nms=Date.now()-l,c=f.map((function(e){return s[e].score})),u=f.map((function(e){return s[e]})).map((function(e){var t=e.cell,n=e.region;return new ch(t.left+n.left*t.width,t.top+n.top*t.height,t.right+n.right*t.width,t.bottom+n.bottom*t.height).toSquare().round()}))}return{boxes:u,scores:c}}function Bm(e,t,n){var r=n.width,o=n.height;return Gp(this,void 0,void 0,(function(){var n,i,a,s=this;return Xp(this,(function(u){switch(u.label){case 0:return n=Mh(e),[4,Promise.all(t.map((function(t){return Gp(s,void 0,void 0,(function(){var r,o,i,a,s,u,c,l;return Xp(this,(function(f){return r=t.padAtBorders(e.height,e.width),o=r.y,i=r.ey,a=r.x,s=r.ex,u=a-1,c=o-1,l=n.getImageData(u,c,s-u,i-c),[2,Nh.isNodejs()?Hh(l):createImageBitmap(l)]}))}))})))];case 1:return i=u.sent(),a=[],i.forEach((function(e){var t=Mh(Vh({width:r,height:o}));t.drawImage(e,0,0,r,o);for(var n=t.getImageData(0,0,r,o).data,i=[],s=0;s<n.length;s+=4)i.push(n[s+2]),i.push(n[s+1]),i.push(n[s]);a.push(i)})),[2,a.map((function(e){return pn((function(){return Tm(ml(Ln(e,[1,r,o,3]),[0,2,1,3]).toFloat())}))}))]}}))}))}function _m(e,t,n,r,o){return Gp(this,void 0,void 0,(function(){var i,a,s,u,c,l,f,p,h,d,m,g,v,y;return Xp(this,(function(b){switch(b.label){case 0:return i=Date.now(),[4,Bm(e,t,{width:24,height:24})];case 1:return a=b.sent(),o.stage2_extractImagePatches=Date.now()-i,i=Date.now(),s=a.map((function(e){var t=function(e,t){return pn((function(){var n=Om(e,t),r=Rm(wd(Rr(n,[n.shape[0],t.fc1.weights.shape[0]]),t.fc1),t.prelu4_alpha),o=wd(r,t.fc2_1),i=vr(rl(o,1),1),a=to($u(o,i),1),s=wd(r,t.fc2_2);return{scores:Pr(a,1)[1],regions:s}}))}(e,r);return e.dispose(),t})),o.stage2_rnet=Date.now()-i,u=s.length>1?Hn(s.map((function(e){return e.scores}))):s[0].scores,f=(l=Array).from,[4,u.data()];case 2:return c=f.apply(l,[b.sent()]),u.dispose(),p=c.map((function(e,t){return{score:e,idx:t}})).filter((function(e){return e.score>n})).map((function(e){return e.idx})),h=p.map((function(e){return t[e]})),d=p.map((function(e){return c[e]})),m=[],g=[],h.length>0&&(i=Date.now(),v=hh(h,d,.7),o.stage2_nms=Date.now()-i,y=v.map((function(e){var t=s[p[e]].regions.arraySync();return new jm(t[0][0],t[0][1],t[0][2],t[0][3])})),g=v.map((function(e){return d[e]})),m=v.map((function(e,t){return h[e].calibrate(y[t])}))),s.forEach((function(e){e.regions.dispose(),e.scores.dispose()})),[2,{boxes:m,scores:g}]}}))}))}function Nm(e,t,n,r,o){return Gp(this,void 0,void 0,(function(){var i,a,s,u,c,l,f,p,h,d,m,g,v,y,b;return Xp(this,(function(w){switch(w.label){case 0:return i=Date.now(),[4,Bm(e,t,{width:48,height:48})];case 1:return a=w.sent(),o.stage3_extractImagePatches=Date.now()-i,i=Date.now(),s=a.map((function(e){var t=function(e,t){return pn((function(){var n=Om(e,t);n=Rm(n=sd(n=Wc(n,[2,2],[2,2],"same"),t.conv4,"valid"),t.prelu4_alpha);var r=Rm(wd(Rr(n,[n.shape[0],t.fc1.weights.shape[0]]),t.fc1),t.prelu5_alpha),o=wd(r,t.fc2_1),i=vr(rl(o,1),1),a=to($u(o,i),1),s=wd(r,t.fc2_2),u=wd(r,t.fc2_3);return{scores:Pr(a,1)[1],regions:s,points:u}}))}(e,r);return e.dispose(),t})),o.stage3_onet=Date.now()-i,u=s.length>1?Hn(s.map((function(e){return e.scores}))):s[0].scores,f=(l=Array).from,[4,u.data()];case 2:return c=f.apply(l,[w.sent()]),u.dispose(),p=c.map((function(e,t){return{score:e,idx:t}})).filter((function(e){return e.score>n})).map((function(e){return e.idx})),h=p.map((function(e){var t=s[e].regions.arraySync();return new jm(t[0][0],t[0][1],t[0][2],t[0][3])})),d=p.map((function(e,n){return t[e].calibrate(h[n])})),m=p.map((function(e){return c[e]})),g=[],v=[],y=[],d.length>0&&(i=Date.now(),b=hh(d,m,.7,!1),o.stage3_nms=Date.now()-i,g=b.map((function(e){return d[e]})),v=b.map((function(e){return m[e]})),y=b.map((function(e,t){return Array(5).fill(0).map((function(n,r){var o=s[e].points.arraySync();return new sh(o[0][r]*(g[t].width+1)+g[t].left,o[0][r+5]*(g[t].height+1)+g[t].top)}))}))),s.forEach((function(e){e.regions.dispose(),e.scores.dispose(),e.points.dispose()})),[2,{boxes:g,scores:v,points:y}]}}))}))}var Pm=function(e){function t(){return e.call(this,"Mtcnn")||this}return Vp(t,e),t.prototype.load=function(t){return Gp(this,void 0,void 0,(function(){return Xp(this,(function(n){return console.warn("mtcnn is deprecated and will be removed soon"),[2,e.prototype.load.call(this,t)]}))}))},t.prototype.loadFromDisk=function(t){return Gp(this,void 0,void 0,(function(){return Xp(this,(function(n){return console.warn("mtcnn is deprecated and will be removed soon"),[2,e.prototype.loadFromDisk.call(this,t)]}))}))},t.prototype.forwardInput=function(e,t){return void 0===t&&(t={}),Gp(this,void 0,void 0,(function(){var n,r,o,i,a,s,u,c,l,f,p,h,d,m,g,v,y,b,w,x,A;return Xp(this,(function(E){switch(E.label){case 0:if(!(n=this.params))throw new Error("Mtcnn - load model before inference");if(!(r=e.canvases[0]))throw new Error("Mtcnn - inputCanvas is not defined, note that passing tensors into Mtcnn.forwardInput is not supported yet.");return o={},i=Date.now(),a=pn((function(){return e=vr(Sp.fromPixels(r)).toFloat(),pn((function(){return Br(Pr(e,3).reverse(),3)}));var e})),s=function(e){return a.dispose(),o.total=Date.now()-i,e},u=a.shape.slice(1),c=u[0],l=u[1],f=new Jd(t),p=f.minFaceSize,h=f.scaleFactor,d=f.maxNumScales,m=f.scoreThresholds,g=f.scaleSteps,v=(g||function(e,t,n){for(var r=n[0],o=n[1],i=12/e,a=[],s=Math.min(r,o)*i,u=0;s>=12;)a.push(i*Math.pow(t,u)),s*=t,u+=1;return a}(p,h,[c,l])).filter((function(e){var t=Sm(e,[c,l]);return Math.min(t.width,t.height)>12})).slice(0,d),o.scales=v,o.pyramid=v.map((function(e){return Sm(e,[c,l])})),y=Date.now(),[4,Dm(a,v,m[0],n.pnet,o)];case 1:return b=E.sent(),o.total_stage1=Date.now()-y,b.boxes.length?(o.stage2_numInputBoxes=b.boxes.length,y=Date.now(),[4,_m(r,b.boxes,m[1],n.rnet,o)]):[2,s({results:[],stats:o})];case 2:return w=E.sent(),o.total_stage2=Date.now()-y,w.boxes.length?(o.stage3_numInputBoxes=w.boxes.length,y=Date.now(),[4,Nm(r,w.boxes,m[2],n.onet,o)]):[2,s({results:[],stats:o})];case 3:return x=E.sent(),o.total_stage3=Date.now()-y,A=x.boxes.map((function(e,t){return jd(Ch({},new fh(x.scores[t],new gh(e.left/l,e.top/c,e.width/l,e.height/c),{height:c,width:l})),new yh(x.points[t].map((function(t){return t.sub(new sh(e.left,e.top)).div(new sh(e.width,e.height))})),{width:e.width,height:e.height}))})),[2,s({results:A,stats:o})]}}))}))},t.prototype.forward=function(e,t){return void 0===t&&(t={}),Gp(this,void 0,void 0,(function(){var n;return Xp(this,(function(r){switch(r.label){case 0:return n=this.forwardInput,[4,Kh(e)];case 1:return[4,n.apply(this,[r.sent(),t])];case 2:return[2,r.sent().results]}}))}))},t.prototype.forwardWithStats=function(e,t){return void 0===t&&(t={}),Gp(this,void 0,void 0,(function(){var n;return Xp(this,(function(r){switch(r.label){case 0:return n=this.forwardInput,[4,Kh(e)];case 1:return[2,n.apply(this,[r.sent(),t])]}}))}))},t.prototype.getDefaultModelName=function(){return"mtcnn_model"},t.prototype.extractParamsFromWeigthMap=function(e){return Im(e)},t.prototype.extractParams=function(e){return km(e)},t}(rd),Mm=[new sh(1.603231,2.094468),new sh(6.041143,7.080126),new sh(2.882459,3.518061),new sh(4.266906,5.178857),new sh(9.041765,10.66308)],Fm=[117.001,114.697,97.404],Lm=function(e){function t(){var t={withSeparableConvs:!0,iouThreshold:.4,classes:["face"],anchors:Mm,meanRgb:Fm,isFirstLayerConv2d:!0,filterSizes:[3,16,32,64,128,256,512]};return e.call(this,t)||this}return Vp(t,e),Object.defineProperty(t.prototype,"anchors",{get:function(){return this.config.anchors},enumerable:!0,configurable:!0}),t.prototype.locateFaces=function(e,t){return Gp(this,void 0,void 0,(function(){return Xp(this,(function(n){switch(n.label){case 0:return[4,this.detect(e,t)];case 1:return[2,n.sent().map((function(e){return new fh(e.score,e.relativeBox,{width:e.imageWidth,height:e.imageHeight})}))]}}))}))},t.prototype.getDefaultModelName=function(){return"tiny_face_detector_model"},t.prototype.extractParamsFromWeigthMap=function(t){return e.prototype.extractParamsFromWeigthMap.call(this,t)},t}(ym),Um={ssdMobilenetv1:new am,tinyFaceDetector:new Lm,tinyYolov2:new bm,mtcnn:new Pm,faceLandmark68Net:new Fd,faceLandmark68TinyNet:new Ud,faceRecognitionNet:new Zd,faceExpressionNet:new kd,ageGenderNet:new Pd},Wm=function(e){return Um.faceLandmark68Net.load(e)},zm=function(e){return Um.faceRecognitionNet.load(e)};function qm(e,t){var n={age:t};return Object.assign({},e,n)}var Qm=function(e){function t(t,n,r){var o=e.call(this)||this;return o.parentTask=t,o.input=n,o.extractedFaces=r,o}return Vp(t,e),t}(xm),Vm=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vp(t,e),t.prototype.run=function(){return Gp(this,void 0,void 0,(function(){var e,t,n=this;return Xp(this,(function(r){switch(r.label){case 0:return[4,this.parentTask];case 1:return[4,Em(e=r.sent(),this.input,(function(e){return Gp(n,void 0,void 0,(function(){return Xp(this,(function(t){switch(t.label){case 0:return[4,Promise.all(e.map((function(e){return Um.faceExpressionNet.predictExpressions(e)})))];case 1:return[2,t.sent()]}}))}))}),this.extractedFaces)];case 2:return t=r.sent(),[2,e.map((function(e,n){return Id(e,t[n])}))]}}))}))},t.prototype.withAgeAndGender=function(){return new Km(this,this.input)},t}(Qm),Hm=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vp(t,e),t.prototype.run=function(){return Gp(this,void 0,void 0,(function(){var e,t;return Xp(this,(function(n){switch(n.label){case 0:return[4,this.parentTask];case 1:return(e=n.sent())?[4,Cm(e,this.input,(function(e){return Um.faceExpressionNet.predictExpressions(e)}),this.extractedFaces)]:[2];case 2:return t=n.sent(),[2,Id(e,t)]}}))}))},t.prototype.withAgeAndGender=function(){return new Jm(this,this.input)},t}(Qm),Gm=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vp(t,e),t.prototype.withAgeAndGender=function(){return new Ym(this,this.input)},t.prototype.withFaceDescriptors=function(){return new tg(this,this.input)},t}(Vm),Xm=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vp(t,e),t.prototype.withAgeAndGender=function(){return new $m(this,this.input)},t.prototype.withFaceDescriptor=function(){return new ng(this,this.input)},t}(Hm),Zm=function(e){function t(t,n,r){var o=e.call(this)||this;return o.parentTask=t,o.input=n,o.extractedFaces=r,o}return Vp(t,e),t}(xm),Km=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vp(t,e),t.prototype.run=function(){return Gp(this,void 0,void 0,(function(){var e,t,n=this;return Xp(this,(function(r){switch(r.label){case 0:return[4,this.parentTask];case 1:return[4,Em(e=r.sent(),this.input,(function(e){return Gp(n,void 0,void 0,(function(){return Xp(this,(function(t){switch(t.label){case 0:return[4,Promise.all(e.map((function(e){return Um.ageGenderNet.predictAgeAndGender(e)})))];case 1:return[2,t.sent()]}}))}))}),this.extractedFaces)];case 2:return t=r.sent(),[2,e.map((function(e,n){var r=t[n],o=r.age;return qm(Kd(e,r.gender,r.genderProbability),o)}))]}}))}))},t.prototype.withFaceExpressions=function(){return new Vm(this,this.input)},t}(Zm),Jm=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vp(t,e),t.prototype.run=function(){return Gp(this,void 0,void 0,(function(){var e,t,n,r,o;return Xp(this,(function(i){switch(i.label){case 0:return[4,this.parentTask];case 1:return(e=i.sent())?[4,Cm(e,this.input,(function(e){return Um.ageGenderNet.predictAgeAndGender(e)}),this.extractedFaces)]:[2];case 2:return t=i.sent(),n=t.age,r=t.gender,o=t.genderProbability,[2,qm(Kd(e,r,o),n)]}}))}))},t.prototype.withFaceExpressions=function(){return new Hm(this,this.input)},t}(Zm),Ym=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vp(t,e),t.prototype.withFaceExpressions=function(){return new Gm(this,this.input)},t.prototype.withFaceDescriptors=function(){return new tg(this,this.input)},t}(Km),$m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vp(t,e),t.prototype.withFaceExpressions=function(){return new Xm(this,this.input)},t.prototype.withFaceDescriptor=function(){return new ng(this,this.input)},t}(Jm),eg=function(e){function t(t,n){var r=e.call(this)||this;return r.parentTask=t,r.input=n,r}return Vp(t,e),t}(xm),tg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vp(t,e),t.prototype.run=function(){return Gp(this,void 0,void 0,(function(){var e;return Xp(this,(function(t){switch(t.label){case 0:return[4,this.parentTask];case 1:return[4,Em(e=t.sent(),this.input,(function(e){return Promise.all(e.map((function(e){return Um.faceRecognitionNet.computeFaceDescriptor(e)})))}),null,(function(e){return e.landmarks.align(null,{useDlibAlignment:!0})}))];case 2:return[2,t.sent().map((function(t,n){return Am(e[n],t)}))]}}))}))},t.prototype.withFaceExpressions=function(){return new Gm(this,this.input)},t.prototype.withAgeAndGender=function(){return new Ym(this,this.input)},t}(eg),ng=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vp(t,e),t.prototype.run=function(){return Gp(this,void 0,void 0,(function(){var e,t;return Xp(this,(function(n){switch(n.label){case 0:return[4,this.parentTask];case 1:return(e=n.sent())?[4,Cm(e,this.input,(function(e){return Um.faceRecognitionNet.computeFaceDescriptor(e)}),null,(function(e){return e.landmarks.align(null,{useDlibAlignment:!0})}))]:[2];case 2:return t=n.sent(),[2,Am(e,t)]}}))}))},t.prototype.withFaceExpressions=function(){return new Xm(this,this.input)},t.prototype.withAgeAndGender=function(){return new $m(this,this.input)},t}(eg),rg=function(e){function t(t,n,r){var o=e.call(this)||this;return o.parentTask=t,o.input=n,o.useTinyLandmarkNet=r,o}return Vp(t,e),Object.defineProperty(t.prototype,"landmarkNet",{get:function(){return this.useTinyLandmarkNet?Um.faceLandmark68TinyNet:Um.faceLandmark68Net},enumerable:!0,configurable:!0}),t}(xm),og=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vp(t,e),t.prototype.run=function(){return Gp(this,void 0,void 0,(function(){var e,t,n,r,o,i=this;return Xp(this,(function(a){switch(a.label){case 0:return[4,this.parentTask];case 1:return e=a.sent(),t=e.map((function(e){return e.detection})),this.input instanceof qe?[4,Yh(this.input,t)]:[3,3];case 2:return r=a.sent(),[3,5];case 3:return[4,Jh(this.input,t)];case 4:r=a.sent(),a.label=5;case 5:return n=r,[4,Promise.all(n.map((function(e){return i.landmarkNet.detectLandmarks(e)})))];case 6:return o=a.sent(),n.forEach((function(e){return e instanceof qe&&e.dispose()})),[2,e.map((function(e,t){return jd(e,o[t])}))]}}))}))},t.prototype.withFaceExpressions=function(){return new Gm(this,this.input)},t.prototype.withAgeAndGender=function(){return new Ym(this,this.input)},t.prototype.withFaceDescriptors=function(){return new tg(this,this.input)},t}(rg),ig=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vp(t,e),t.prototype.run=function(){return Gp(this,void 0,void 0,(function(){var e,t,n,r,o;return Xp(this,(function(i){switch(i.label){case 0:return[4,this.parentTask];case 1:return(e=i.sent())?(t=e.detection,this.input instanceof qe?[4,Yh(this.input,[t])]:[3,3]):[2];case 2:return r=i.sent(),[3,5];case 3:return[4,Jh(this.input,[t])];case 4:r=i.sent(),i.label=5;case 5:return n=r,[4,this.landmarkNet.detectLandmarks(n[0])];case 6:return o=i.sent(),n.forEach((function(e){return e instanceof qe&&e.dispose()})),[2,jd(e,o)]}}))}))},t.prototype.withFaceExpressions=function(){return new Xm(this,this.input)},t.prototype.withAgeAndGender=function(){return new $m(this,this.input)},t.prototype.withFaceDescriptor=function(){return new ng(this,this.input)},t}(rg),ag=function(e){function t(t,n){void 0===n&&(n=new im);var r=e.call(this)||this;return r.input=t,r.options=n,r}return Vp(t,e),t}(xm),sg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vp(t,e),t.prototype.run=function(){return Gp(this,void 0,void 0,(function(){var e,t,n,r;return Xp(this,(function(o){switch(o.label){case 0:return t=(e=this).input,(n=e.options)instanceof Jd?[4,Um.mtcnn.forward(t,n)]:[3,2];case 1:return[2,o.sent().map((function(e){return e.detection}))];case 2:if(r=n instanceof wm?function(e){return Um.tinyFaceDetector.locateFaces(e,n)}:n instanceof im?function(e){return Um.ssdMobilenetv1.locateFaces(e,n)}:n instanceof vm?function(e){return Um.tinyYolov2.locateFaces(e,n)}:null,!r)throw new Error("detectFaces - expected options to be instance of TinyFaceDetectorOptions | SsdMobilenetv1Options | MtcnnOptions | TinyYolov2Options");return[2,r(t)]}}))}))},t.prototype.runAndExtendWithFaceDetections=function(){var e=this;return new Promise((function(t){return Gp(e,void 0,void 0,(function(){var e;return Xp(this,(function(n){switch(n.label){case 0:return[4,this.run()];case 1:return e=n.sent(),[2,t(e.map((function(e){return Ch({},e)})))]}}))}))}))},t.prototype.withFaceLandmarks=function(e){return void 0===e&&(e=!1),new og(this.runAndExtendWithFaceDetections(),this.input,e)},t.prototype.withFaceExpressions=function(){return new Vm(this.runAndExtendWithFaceDetections(),this.input)},t.prototype.withAgeAndGender=function(){return new Km(this.runAndExtendWithFaceDetections(),this.input)},t}(ag),ug=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vp(t,e),t.prototype.run=function(){return Gp(this,void 0,void 0,(function(){var e,t;return Xp(this,(function(n){switch(n.label){case 0:return[4,new sg(this.input,this.options)];case 1:return e=n.sent(),t=e[0],e.forEach((function(e){e.score>t.score&&(t=e)})),[2,t]}}))}))},t.prototype.runAndExtendWithFaceDetection=function(){var e=this;return new Promise((function(t){return Gp(e,void 0,void 0,(function(){var e;return Xp(this,(function(n){switch(n.label){case 0:return[4,this.run()];case 1:return e=n.sent(),[2,t(e?Ch({},e):void 0)]}}))}))}))},t.prototype.withFaceLandmarks=function(e){return void 0===e&&(e=!1),new ig(this.runAndExtendWithFaceDetection(),this.input,e)},t.prototype.withFaceExpressions=function(){return new Hm(this.runAndExtendWithFaceDetection(),this.input)},t.prototype.withAgeAndGender=function(){return new Jm(this.runAndExtendWithFaceDetection(),this.input)},t}(ag);function cg(e,t){return void 0===t&&(t=new im),new ug(e,t)}var lg=function(){function e(e,t){void 0===t&&(t=.6),this._distanceThreshold=t;var n=Array.isArray(e)?e:[e];if(!n.length)throw new Error("FaceRecognizer.constructor - expected atleast one input");var r=1,o=function(){return"person "+r++};this._labeledDescriptors=n.map((function(e){if(e instanceof Ah)return e;if(e instanceof Float32Array)return new Ah(o(),[e]);if(e.descriptor&&e.descriptor instanceof Float32Array)return new Ah(o(),[e.descriptor]);throw new Error("FaceRecognizer.constructor - expected inputs to be of type LabeledFaceDescriptors | WithFaceDescriptor<any> | Float32Array | Array<LabeledFaceDescriptors | WithFaceDescriptor<any> | Float32Array>")}))}return Object.defineProperty(e.prototype,"labeledDescriptors",{get:function(){return this._labeledDescriptors},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"distanceThreshold",{get:function(){return this._distanceThreshold},enumerable:!0,configurable:!0}),e.prototype.computeMeanDistance=function(e,t){return t.map((function(t){return function(e,t){if(e.length!==t.length)throw new Error("euclideanDistance: arr1.length !== arr2.length");var n=Array.from(e),r=Array.from(t);return Math.sqrt(n.map((function(e,t){return e-r[t]})).reduce((function(e,t){return e+Math.pow(t,2)}),0))}(t,e)})).reduce((function(e,t){return e+t}),0)/(t.length||1)},e.prototype.matchDescriptor=function(e){var t=this;return this.labeledDescriptors.map((function(n){var r=n.descriptors,o=n.label;return new wh(o,t.computeMeanDistance(e,r))})).reduce((function(e,t){return e.distance<t.distance?e:t}))},e.prototype.findBestMatch=function(e){var t=this.matchDescriptor(e);return t.distance<this.distanceThreshold?t:new wh("unknown",t.distance)},e.prototype.toJSON=function(){return{distanceThreshold:this.distanceThreshold,labeledDescriptors:this.labeledDescriptors.map((function(e){return e.toJSON()}))}},e.fromJSON=function(t){var n=t.labeledDescriptors.map((function(e){return Ah.fromJSON(e)}));return new e(n,t.distanceThreshold)},e}();function fg(e,t){var n=new Kp(t.width,t.height),r=n.width,o=n.height;if(r<=0||o<=0)throw new Error("resizeResults - invalid dimensions: "+JSON.stringify({width:r,height:o}));if(Array.isArray(e))return e.map((function(e){return fg(e,{width:r,height:o})}));if(Sd(e)){var i=e.detection.forSize(r,o),a=e.unshiftedLandmarks.forSize(i.box.width,i.box.height);return jd(Ch(e,i),a)}return Eh(e)?Ch(e,e.detection.forSize(r,o)):e instanceof vh||e instanceof fh?e.forSize(r,o):e}var pg=n(29787),hg=n(47257),dg=n.n(hg),mg=n(1012),gg=n(4146),vg=n(43170),yg="wrp___x6ffm",bg=n(37712),wg=function(e,t){for(var n=e.split(","),r=n[0].match(/:(.*?);/)[1],o=atob(n[1]),i=o.length,a=new Uint8Array(i);i--;)a[i]=o.charCodeAt(i);return new Blob([a],{type:r})},xg=function(){var e=u()(o()().mark((function e(t){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,n){var r=new Image;(null==t?void 0:t.indexOf("educoder.net"))>-1?r.setAttribute("crossOrigin","educoder.net"):r.setAttribute("crossOrigin","aliyuncs.com"),r.onload=function(){var t=document.createElement("canvas");t.width=this.naturalWidth,t.height=this.naturalHeight,t.getContext("2d").drawImage(r,0,0);var n=t.toDataURL("image/png");e(n)},r.src=t,r.onerror=function(){n(new Error("图片流异常")),v.ZP.error("您的身份照片异常,请拍照后提交至人工审核")}})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Ag=(0,h.forwardRef)((function(e,t){var n=e.outputResult,r=e.identity_url,i=e.onCameraReady,a=e.defaultOpen,s=(0,d.useParams)(),c=(0,h.useRef)(),f=(0,h.useRef)(),p=(0,h.useRef)(),m=(0,h.useRef)(!1),g=(0,h.useRef)(),y=(0,h.useState)(!0),b=l()(y,2),w=b[0],x=b[1],A=(0,h.useState)(""),E=l()(A,2),C=E[0],k=E[1],I=(0,h.useState)(""),S=l()(I,2),j=S[0],T=S[1],R=(0,h.useRef)(!1),O=(0,h.useRef)(""),D=(0,h.useState)(!0),B=l()(D,1)[0],_="审核失败",N=(0,h.useMemo)((function(){return new wm({inputSize:224,scoreThreshold:.7})}),[]),P=function(){var e=u()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Um.ssdMobilenetv1.loadFromUri("https://www-cdn.educoder.net/weights/");case 2:return e.next=4,t="https://www-cdn.educoder.net/weights/",Um.tinyFaceDetector.load(t);case 4:return e.next=6,Wm("https://www-cdn.educoder.net/weights/");case 6:return e.next=8,zm("https://www-cdn.educoder.net/weights/");case 8:V(!0);case 9:case"end":return e.stop()}var t}),e)})));return function(){return e.apply(this,arguments)}}();(0,h.useEffect)((function(){a&&P()}),[a]),(0,h.useImperativeHandle)(t,(function(){return{handleStop:Q,handleRemove:q,handlePlay:V,startDiscern:W,handleUploadImage:U}}));var M=function(){var e=u()(o()().mark((function e(t){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c.current){e.next=3;break}return setTimeout((function(){return M(t)})),e.abrupt("return");case 3:navigator.mediaDevices.getUserMedia({video:{width:640,height:360}}).then(function(){var e=u()(o()().mark((function e(n){var i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("srcObject"in c.current?c.current.srcObject=n:c.current.src=window.URL.createObjectURL(n),c.current.onloadedmetadata=function(e){x(!1),c.current.play()},!t){e.next=10;break}return i=document.createElement("img"),e.next=6,xg(r+"?t="+(new Date).getTime());case 6:return i.src=e.sent,e.next=9,cg(i,N).withFaceLandmarks().withFaceDescriptor();case 9:g.current=e.sent;case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){console.log("err:",e,e.message),"Permission denied"===e.message||"NotAllowedError"===e.name?v.ZP.error("您已拒绝了获取摄像头"):"图片流异常"!=e.message&&v.ZP.error("摄像头获取失败,或您已拒绝了获取摄像头")}));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),F=function(){var e=u()(o()().mark((function e(t,n){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=u()(o()().mark((function e(r){var i,a,u,c,l,f,p,h,d,m,g;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,vg.ZP)("/api/buckets/get_upload_token.json",{method:"get"});case 2:(h=e.sent).data=JSON.parse((0,gg.pe)(h.data)),d=(0,mg.Z)(),m=new(dg())({endpoint:null==h||null===(i=h.data)||void 0===i?void 0:i.end_point,region:null==h||null===(a=h.data)||void 0===a?void 0:a.region,accessKeyId:null==h||null===(u=h.data)||void 0===u?void 0:u.access_key_id,accessKeySecret:null==h||null===(c=h.data)||void 0===c?void 0:c.access_key_secret,bucket:null==h||null===(l=h.data)||void 0===l?void 0:l.bucket,stsToken:null==h||null===(f=h.data)||void 0===f?void 0:f.security_token}),g=wg(t),m.multipartUpload("".concat(d,".png"),g,{timeout:1e4,partSize:10485760,callback:{url:null==h||null===(p=h.data)||void 0===p?void 0:p.callback_url,host:null==h?void 0:h.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&login="+s.login+"&container_id="+s.categoryId+"&container_type=ExerciseIdentity&p="+n}}).then((function(e){r(e),console.log("result:",e)})).catch((function(e){console.log("err:",e)}));case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),L=function(){var e=u()(o()().mark((function e(t){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,f.current.width=c.current.videoWidth,f.current.height=360,n=f.current.getContext("2d"),e.next=6,n.drawImage(c.current,0,0,f.current.width,f.current.height);case 6:O.current=f.current.toDataURL("image/png"),1===t&&F(O.current,t),e.next=12;break;case 10:e.prev=10,e.t0=e.catch(0);case 12:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t){return e.apply(this,arguments)}}(),U=function(){var e=u()(o()().mark((function e(t){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=u()(o()().mark((function e(n){var r;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=f.current.getContext("2d"),e.next=3,r.drawImage(c.current,0,0,f.current.width,f.current.height);case 3:return e.next=5,F(O.current,t);case 5:n();case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),W=function(){var e=u()(o()().mark((function e(){var t,r,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m.current=!0,e.next=3,cg(c.current,N).withFaceLandmarks().withFaceDescriptor();case 3:(t=e.sent)&&g.current?(r=new lg(t),i=r.findBestMatch(g.current.descriptor),k(i._distance<.43?"识别成功":_),L(i._distance<.43?1:0),setTimeout((function(){null==n||n({content:i._distance<.43?"识别成功":_,success:i._distance<.43})}),1e3),R.current=!0):(L(0),k(_),setTimeout((function(){null==n||n({content:_,success:!1})}),1e3)),setTimeout((function(){c.current.pause()}),600);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),z=function(){var e=u()(o()().mark((function e(){var t,n,r;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(null!==(t=c.current)&&void 0!==t&&t.paused||null!==(n=c.current)&&void 0!==n&&n.ended)){e.next=2;break}return e.abrupt("return",setTimeout((function(){return z()})));case 2:return e.next=4,cg(c.current,N).withFaceLandmarks().withFaceDescriptor();case 4:r=e.sent,m.current||(m.current=!0,i(!0)),r&&c.current?(T(""),H(c.current,p.current,[r],B)):T("请将脸部移动至取景框内"),R.current||setTimeout((function(){return z()}));case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),q=function(){try{c.current.srcObject.getTracks().forEach((function(e){e.stop()})),m.current=!1}catch(e){}},Q=function(){x(!1);try{m.current=!1}catch(e){}},V=function(e){m.current=!1,R.current=!1,f.current.getContext("2d").clearRect(0,0,640,480),k(""),x(!0);try{M(e||!1)}catch(e){}},H=function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=G(e,t,n);r&&zh(t,o.map((function(e){return e.detection})))},G=function(e,t,n){var r=e instanceof HTMLVideoElement?Qh(e):e,o=r.width,i=r.height;return t.width=o,t.height=i,fg(n,{width:o,height:i})};return(0,bg.jsx)("div",{className:yg,children:(0,bg.jsxs)(pg.Z,{spinning:w,tip:"正在启动摄像头,请稍后...",children:[(0,bg.jsx)("video",{onPlay:z,ref:c,id:"inputVideo",autoPlay:!0,muted:!0}),(0,bg.jsx)("canvas",{style:{zIndex:2},ref:p}),(0,bg.jsx)("canvas",{ref:f}),(0,bg.jsxs)("div",{className:"c-red mt5 tc",style:{height:22},children:[C," ",j]})]})})})),Eg=Ag,Cg=n(89392),kg=["globalSetting","loading","user","exercise","dispatch"],Ig=m.Z.Countdown,Sg=g.Z.Step,jg=(0,d.connect)((function(e){var t=e.loading,n=e.user,r=e.exercise;return{globalSetting:e.globalSetting,user:n,exercise:r,loading:t.effects}}))((function(e){e.globalSetting,e.loading;var t,n=e.user,r=(e.exercise,e.dispatch,p()(e,kg),(0,d.useParams)()),i=(0,h.useState)(0),s=l()(i,2),c=s[0],f=s[1],m=(0,h.useState)(!1),I=l()(m,2),j=I[0],T=I[1],R=(0,h.useState)(!1),O=l()(R,2),D=O[0],B=O[1],_=(0,h.useState)(!1),N=l()(_,2),P=N[0],M=N[1],F=(0,h.useState)(0),L=l()(F,2),U=L[0],W=L[1],z=(0,h.useState)({}),q=l()(z,2),Q=q[0],V=q[1],H=(0,h.useRef)(),G=(0,h.useRef)(!0),X=[{title:"采集照片",content:"First-content"},{title:"审核结果",content:"Second-content"},{title:"开启手机录制",content:"Last-content"}].filter((function(e){return!(null==Q||!Q.open_phone_video_recording)||"Last-content"!==e.content})),Z=function(){var e=u()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=u()(o()().mark((function e(t){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,k.PJ)(a()({},r));case 2:n=e.sent,V(a()({},n)),t(n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),K=function(){var e=u()(o()().mark((function e(){var t,n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Z();case 2:null!=(t=e.sent)&&t.identity_verify||f(2),null!=t&&t.can_start&&0===t.countdown_time?f(2):"rejected"===(null==t?void 0:t.identity_photo_state)?(G.current=!1,W(1)):"passed"===(null==t?void 0:t.identity_photo_state)&&(G.current=!1,null==H||null===(n=H.current)||void 0===n||n.handleStop(),null!=Q&&Q.open_phone_video_recording||f(2));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),J=function(){var e=u()(o()().mark((function e(){var t,n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Z();case 2:"submitted"===(null==(t=e.sent)?void 0:t.identity_photo_state)||("rejected"===(null==t?void 0:t.identity_photo_state)?(G.current=!1,W(2)):"passed"===(null==t?void 0:t.identity_photo_state)&&(G.current=!1,null==H||null===(n=H.current)||void 0===n||n.handleStop(),W(1),null!=Q&&Q.open_phone_video_recording||f(2))),"passed"!==(null==t?void 0:t.identity_photo_state)&&G.current&&setTimeout((function(){J()}),3e4);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,h.useEffect)((function(){return K(),console.log("captureRef:",H),function(){W(0),M(!1),B(!1),f(0)}}),[]),(0,bg.jsxs)("div",{className:"p30 bg-white minHb100 edu-container mt20",children:[(null==Q?void 0:Q.identity_verify)&&(0,bg.jsxs)(bg.Fragment,{children:[(0,bg.jsx)("div",{className:"tc font16 blod",children:"身份验证"}),(0,bg.jsx)("div",{className:A,children:(0,bg.jsx)(g.Z,{current:c,children:X.map((function(e){return(0,bg.jsx)(Sg,{title:e.title},e.title)}))})})]}),(0,bg.jsxs)("div",{className:0===c?"":"hide",children:[(0,bg.jsx)("div",{className:"tc mt50",children:"请保证周围光线充足,五官清晰可见!"}),!D&&(0,bg.jsx)("div",{className:"tc",children:(0,bg.jsx)("img",{width:536,src:"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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",className:"mt30"})}),(0,bg.jsx)("div",{className:D?"":"hide",children:(0,bg.jsx)(Eg,{ref:H,onCameraReady:function(e){T(e)},defaultOpen:null==Q?void 0:Q.identity_verify,identity_url:(0,C.Tv)(null==n||null===(t=n.userInfo)||void 0===t?void 0:t.identity_url),outputResult:function(e){e.success?(v.ZP.success({content:"人脸识别成功",key:"checkapi"}),f(2)):M(!0),T(!1)}})}),D&&(0,bg.jsx)(bg.Fragment,{children:P?(0,bg.jsxs)("div",{className:"tc mb30 mt15",children:[(0,bg.jsx)(y.ZP,{type:"primary",onClick:function(){var e;null==H||null===(e=H.current)||void 0===e||e.handlePlay(),V(a()({},{})),M(!1)},children:"重新识别"}),(0,bg.jsx)(y.ZP,{type:"primary",className:"ml90",onClick:u()(o()().mark((function e(){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null==H||null===(t=H.current)||void 0===t?void 0:t.handleUploadImage(0);case 2:G.current=!0,f(1),W(0),M(!1),J();case 7:case"end":return e.stop()}}),e)}))),children:"人工审核"})]}):j&&(0,bg.jsx)("div",{className:"tc mb30 mt15",children:(0,bg.jsx)(y.ZP,{type:"primary",onClick:(0,Cg.throttle)((function(){var e;T(!1),null==H||null===(e=H.current)||void 0===e||e.startDiscern()}),2e3),children:"开始识别"})})}),!D&&(0,bg.jsx)("div",{className:"tc mb30 mt15",children:(0,bg.jsx)(y.ZP,{type:"primary",onClick:function(){B(!0)},children:"开始采集"})})]}),1===c&&(0,bg.jsxs)("div",{className:"tc",children:[0===U&&(0,bg.jsxs)(bg.Fragment,{children:[(0,bg.jsxs)("div",{className:"tc mt50",children:[(0,bg.jsx)("span",{className:"c-blue font50 iconfont icon-dengdaishenhe"}),(0,bg.jsx)("br",{}),"人工审核中...",(0,bg.jsx)("br",{}),"申请已提交,监控老师审核中,请耐心等待!"]}),(0,bg.jsx)(y.ZP,{type:"primary",className:"mt50",onClick:u()(o()().mark((function e(){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Z();case 2:"submitted"===(null==(t=e.sent)?void 0:t.identity_photo_state)?v.ZP.warning({content:"正在等待老师审核中,请稍后...",key:"sh1"}):"rejected"===(null==t?void 0:t.identity_photo_state)?(W(2),G.current=!1):"passed"===(null==t?void 0:t.identity_photo_state)&&(G.current=!1,W(1),null!=Q&&Q.open_phone_video_recording||f(2));case 4:case"end":return e.stop()}}),e)}))),children:"查看审核结果"})]}),1===U&&(0,bg.jsxs)(bg.Fragment,{children:[(0,bg.jsxs)("div",{className:"tc mt50",children:[(0,bg.jsx)("span",{className:"c-green font50 iconfont icon-tongguo"}),(0,bg.jsx)("br",{}),"身份验证审核通过。"]}),(null==Q?void 0:Q.open_phone_video_recording)&&(0,bg.jsx)(y.ZP,{type:"primary",className:"mt50",onClick:function(){return f(2)},children:"下一步"})]}),2===U&&(0,bg.jsxs)(bg.Fragment,{children:[(0,bg.jsxs)("div",{className:"tc mt50",children:[(0,bg.jsx)("span",{className:"c-red font50 iconfont icon-hongsejingshi"}),(0,bg.jsx)("br",{}),"身份验证审核不通过。请重新拍照验证。"]}),(0,bg.jsxs)("div",{className:"mt20",children:[(0,bg.jsxs)(b.Z,{children:[(0,bg.jsx)(w.Z,{className:"tr",flex:"430px",children:"失败原因:"}),(0,bg.jsx)(w.Z,{children:null==Q?void 0:Q.identity_photo_comment})]}),(0,bg.jsxs)(b.Z,{className:"mt30",children:[(0,bg.jsx)(w.Z,{className:"tr",flex:"430px",children:"采集照片:"}),(0,bg.jsx)(w.Z,{children:(0,bg.jsx)("img",{src:(0,C.Tv)(null==Q?void 0:Q.identity_photo_url),width:200})})]}),(0,bg.jsxs)(b.Z,{children:[(0,bg.jsx)(w.Z,{className:"tr",flex:"430px"}),(0,bg.jsx)(w.Z,{children:(0,bg.jsx)(y.ZP,{type:"primary",className:"mt50",onClick:function(){var e;f(0),T(!1),M(!1),B(!1),null==H||null===(e=H.current)||void 0===e||e.handlePlay()},children:"重新认证"})})]})]})]})]}),2===c&&(0,bg.jsxs)(bg.Fragment,{children:[(0,bg.jsxs)("div",{className:"tc mt50",children:[!(null!=Q&&Q.open_phone_video_recording)&&(0,bg.jsx)(bg.Fragment,{children:(null==Q?void 0:Q.countdown_time)<=0?(0,bg.jsx)(bg.Fragment,{children:(0,bg.jsxs)("div",{className:"tc mt50",children:[(0,bg.jsx)("span",{className:"c-green font50 iconfont icon-tongguo"}),(0,bg.jsx)("br",{}),"身份验证审核通过。"]})}):"考试即将开始,请耐心等待..."}),(null==Q?void 0:Q.open_phone_video_recording)&&(0,bg.jsx)(bg.Fragment,{children:(null==Q?void 0:Q.countdown_time)<=0?(0,bg.jsxs)("div",{className:"tc",children:["根据考试规定,请打开微信扫一扫,扫码下面的二维码开启手机录制视频",(0,bg.jsx)("br",{}),(0,bg.jsx)("span",{className:"c-blue",style:{cursor:"default"},onClick:function(){x.Z.info({icon:null,title:"查看操作指引",className:"custom-modal-divider",width:540,content:(0,bg.jsxs)(b.Z,{children:[(0,bg.jsx)(w.Z,{flex:"178px",children:(0,bg.jsx)("img",{width:148,src:"/images/operation_guidance.png"})}),(0,bg.jsxs)(w.Z,{flex:"1",children:["请点击右上角“…”,选择",(0,bg.jsx)("span",{className:"c-orange",children:"Safari中打开"}),"或者",(0,bg.jsx)("span",{className:"c-orange",children:"“在默认浏览器中打开”"}),"后,浏览器打开后请点击开始录制按钮,可以开启手机录制视频。"]})]})})},children:"如苹果手机微信扫描二维码后,出现点击开始录制无响应,请查看操作指引。"})]}):"考试即将开始,请耐心等待..."})]}),(null==Q?void 0:Q.open_phone_video_recording)&&(0,bg.jsx)("div",{className:E,children:(0,bg.jsx)(S(),{value:"https://".concat(document.domain,"/live-push.html?id=").concat(r.categoryId,"&login=").concat(r.login,"&cookie=").concat((0,C.ej)("_educoder_session"))})}),(null==Q?void 0:Q.countdown_time)>0&&(0,bg.jsx)("div",{className:"tc mt20",children:(0,bg.jsx)(Ig,{value:Date.now()+1e3*(null==Q?void 0:Q.countdown_time),valueStyle:{color:"#cf1322",fontSize:40},onFinish:function(){Z()}})}),(0,bg.jsx)("div",{className:"tc mb30 mt50",children:(0,bg.jsx)(y.ZP,{type:"primary",onClick:u()(o()().mark((function e(){var t,n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Z();case 2:null!=(t=e.sent)&&t.can_start&&(null==t?void 0:t.countdown_time)<=0?(null==H||null===(n=H.current)||void 0===n||n.handleRemove(),null!=Q&&Q.open_phone_video_recording?null!=t&&t.video_url&&setTimeout((function(){location.href="/classrooms/".concat(r.coursesId,"/exercise/").concat(r.categoryId,"/users/").concat(r.login)}),300):setTimeout((function(){location.href="/classrooms/".concat(r.coursesId,"/exercise/").concat(r.categoryId,"/users/").concat(r.login)}),300)):(null==t?void 0:t.countdown_time)>0?v.ZP.warning({content:"考试暂未开始,请稍后..."}):v.ZP.warning({content:"请打开微信扫一扫,开启手机视频录制"});case 4:case"end":return e.stop()}}),e)}))),children:"开始考试"})})]})]})}))},47257:function(e){var t,n;t=window,e.exports=function(){function e(t,n,r){function o(a,s){if(!n[a]){if(!t[a]){if(i)return i(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return o(t[a][1][e]||e)}),c,c.exports,e,t,n,r)}return n[a].exports}for(var i=void 0,a=0;a<r.length;a++)o(r[a]);return o}return e}()({1:[function(e,t,n){"use strict";var r=e("./browser/client");r.Buffer=e("buffer").Buffer,r.urllib=e("../shims/xhr"),r.version=e("./browser/version").version,t.exports=r},{"../shims/xhr":475,"./browser/client":3,"./browser/version":6,buffer:90}],2:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator")),i=r(e("@babel/runtime/helpers/asyncToGenerator"));e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.array.slice.js");var a=e("assert"),s=e("../common/utils/checkBucketName").checkBucketName,u=n;function c(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}function l(e){return e?c(e)?e:[e]:[]}u.useBucket=function(e){return s(e),this.options.bucket=e,this},u.setBucket=function(e){return s(e),this.options.bucket=e,this},u.getBucket=function(){return this.options.bucket},u.deleteBucket=function(){var e=(0,i.default)(o.default.mark((function e(t,n){var r,i;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this._bucketRequestParams("DELETE",t,"",n),e.next=3,this.request(r);case 3:if(200!==(i=e.sent).status&&204!==i.status){e.next=6;break}return e.abrupt("return",{res:i.res});case 6:return e.next=8,this.requestError(i);case 8:throw e.sent;case 9:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}(),u.putBucketACL=function(){var e=(0,i.default)(o.default.mark((function e(t,n,r){var i,a;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(i=this._bucketRequestParams("PUT",t,"acl",r)).headers={"x-oss-acl":n},i.successStatuses=[200],e.next=5,this.request(i);case 5:return a=e.sent,e.abrupt("return",{bucket:a.headers.location&&a.headers.location.substring(1)||null,res:a.res});case 7:case"end":return e.stop()}}),e,this)})));function t(t,n,r){return e.apply(this,arguments)}return t}(),u.getBucketACL=function(){var e=(0,i.default)(o.default.mark((function e(t,n){var r,i;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=this._bucketRequestParams("GET",t,"acl",n)).successStatuses=[200],r.xmlResponse=!0,e.next=5,this.request(r);case 5:return i=e.sent,e.abrupt("return",{acl:i.data.AccessControlList.Grant,owner:{id:i.data.Owner.ID,displayName:i.data.Owner.DisplayName},res:i.res});case 7:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}(),u.putBucketLogging=function(){var e=(0,i.default)(o.default.mark((function e(t,n,r){var i,a,s;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=this._bucketRequestParams("PUT",t,"logging",r),a='<?xml version="1.0" encoding="UTF-8"?>\n<BucketLoggingStatus>\n<LoggingEnabled>\n<TargetBucket>'.concat(t,"</TargetBucket>\n"),n&&(a+="<TargetPrefix>".concat(n,"</TargetPrefix>\n")),a+="</LoggingEnabled>\n</BucketLoggingStatus>",i.content=a,i.mime="xml",i.successStatuses=[200],e.next=9,this.request(i);case 9:return s=e.sent,e.abrupt("return",{res:s.res});case 11:case"end":return e.stop()}}),e,this)})));function t(t,n,r){return e.apply(this,arguments)}return t}(),u.getBucketLogging=function(){var e=(0,i.default)(o.default.mark((function e(t,n){var r,i,a;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=this._bucketRequestParams("GET",t,"logging",n)).successStatuses=[200],r.xmlResponse=!0,e.next=5,this.request(r);case 5:return i=e.sent,a=i.data.LoggingEnabled,e.abrupt("return",{enable:!!a,prefix:a&&a.TargetPrefix||null,res:i.res});case 8:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}(),u.deleteBucketLogging=function(){var e=(0,i.default)(o.default.mark((function e(t,n){var r,i;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=this._bucketRequestParams("DELETE",t,"logging",n)).successStatuses=[204,200],e.next=4,this.request(r);case 4:return i=e.sent,e.abrupt("return",{res:i.res});case 6:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}(),u.putBucketCORS=function(){var e=(0,i.default)(o.default.mark((function e(t,n,r){var i,s,u,c,f,p,h,d,m,g;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(a((n=n||[]).length,"rules is required"),n.forEach((function(e){a(e.allowedOrigin,"allowedOrigin is required"),a(e.allowedMethod,"allowedMethod is required")})),i=this._bucketRequestParams("PUT",t,"cors",r),s='<?xml version="1.0" encoding="UTF-8"?>\n<CORSConfiguration>',u=function(e){s+="<AllowedOrigin>".concat(e,"</AllowedOrigin>")},c=function(e){s+="<AllowedMethod>".concat(e,"</AllowedMethod>")},f=function(e){s+="<AllowedHeader>".concat(e,"</AllowedHeader>")},p=function(e){s+="<ExposeHeader>".concat(e,"</ExposeHeader>")},h=0,d=n.length;h<d;h++)m=n[h],s+="<CORSRule>",l(m.allowedOrigin).forEach(u),l(m.allowedMethod).forEach(c),l(m.allowedHeader).forEach(f),l(m.exposeHeader).forEach(p),m.maxAgeSeconds&&(s+="<MaxAgeSeconds>".concat(m.maxAgeSeconds,"</MaxAgeSeconds>")),s+="</CORSRule>";return s+="</CORSConfiguration>",i.content=s,i.mime="xml",i.successStatuses=[200],e.next=16,this.request(i);case 16:return g=e.sent,e.abrupt("return",{res:g.res});case 18:case"end":return e.stop()}}),e,this)})));function t(t,n,r){return e.apply(this,arguments)}return t}(),u.getBucketCORS=function(){var e=(0,i.default)(o.default.mark((function e(t,n){var r,i,a,s;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=this._bucketRequestParams("GET",t,"cors",n)).successStatuses=[200],r.xmlResponse=!0,e.next=5,this.request(r);case 5:return i=e.sent,a=[],i.data&&i.data.CORSRule&&(c(s=i.data.CORSRule)||(s=[s]),s.forEach((function(e){var t={};Object.keys(e).forEach((function(n){t[n.slice(0,1).toLowerCase()+n.slice(1,n.length)]=e[n]})),a.push(t)}))),e.abrupt("return",{rules:a,res:i.res});case 9:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}(),u.deleteBucketCORS=function(){var e=(0,i.default)(o.default.mark((function e(t,n){var r,i;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=this._bucketRequestParams("DELETE",t,"cors",n)).successStatuses=[204],e.next=4,this.request(r);case 4:return i=e.sent,e.abrupt("return",{res:i.res});case 6:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}(),u.putBucketReferer=function(){var e=(0,i.default)(o.default.mark((function e(t,n,r,i){var a,s,u,c;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=this._bucketRequestParams("PUT",t,"referer",i),s='<?xml version="1.0" encoding="UTF-8"?>\n<RefererConfiguration>\n',s+=" <AllowEmptyReferer>".concat(n?"true":"false","</AllowEmptyReferer>\n"),r&&r.length>0){for(s+=" <RefererList>\n",u=0;u<r.length;u++)s+=" <Referer>".concat(r[u],"</Referer>\n");s+=" </RefererList>\n"}else s+=" <RefererList />\n";return s+="</RefererConfiguration>",a.content=s,a.mime="xml",a.successStatuses=[200],e.next=10,this.request(a);case 10:return c=e.sent,e.abrupt("return",{res:c.res});case 12:case"end":return e.stop()}}),e,this)})));function t(t,n,r,o){return e.apply(this,arguments)}return t}(),u.getBucketReferer=function(){var e=(0,i.default)(o.default.mark((function e(t,n){var r,i,a;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=this._bucketRequestParams("GET",t,"referer",n)).successStatuses=[200],r.xmlResponse=!0,e.next=5,this.request(r);case 5:return i=e.sent,(a=i.data.RefererList.Referer||null)&&(c(a)||(a=[a])),e.abrupt("return",{allowEmpty:"true"===i.data.AllowEmptyReferer,referers:a,res:i.res});case 9:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}(),u.deleteBucketReferer=function(){var e=(0,i.default)(o.default.mark((function e(t,n){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.putBucketReferer(t,!0,null,n);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}(),u._bucketRequestParams=function(e,t,n,r){return{method:e,bucket:t,subres:n,timeout:r&&r.timeout,ctx:r&&r.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(e,t,n){(function(n,r){(function(){"use strict";var o=e("@babel/runtime/helpers/interopRequireDefault"),i=o(e("@babel/runtime/regenerator")),a=o(e("@babel/runtime/helpers/asyncToGenerator"));e("core-js/modules/es.function.name.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.split.js"),e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.array.includes.js"),e("core-js/modules/es.string.replace.js"),e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.symbol.js"),e("core-js/modules/es.symbol.description.js"),e("core-js/modules/es.array.slice.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.promise.js"),e("core-js/modules/es.regexp.to-string.js");var s=e("debug")("ali-oss"),u=e("xml2js"),c=e("agentkeepalive"),l=e("merge-descriptors"),f=e("platform"),p=e("utility"),h=e("urllib"),d=e("./version"),m=e("bowser"),g=e("../common/signUtils"),v=e("../common/client/initOptions"),y=e("../common/utils/createRequest").createRequest,b=e("../common/utils/encoder").encoder,w=e("../common/client/getReqUrl").getReqUrl,x=e("../common/utils/setSTSToken").setSTSToken,A=e("../common/utils/retry").retry,E=e("../common/utils/isFunction").isFunction,C=new c;function k(){var e=f.name,t=f.version;e&&e.toLowerCase&&"ie"===e.toLowerCase()&&t.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function I(){return location&&"https:"===location.protocol}function S(e,t){if(k(),!(this instanceof S))return new S(e,t);e&&e.inited?this.options=e:this.options=S.initOptions(e),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=h,this.agent=this.options.agent||C),this.ctx=t,this.userAgent=this._getUserAgent(),this.stsTokenFreshTime=new Date,this.options.amendTimeSkewed=0}t.exports=S,S.initOptions=function(e){e.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var t=Object.assign({secure:I(),useFetch:!1},e);return v(t)};var j=S.prototype;function T(e){return R.apply(this,arguments)}function R(){return(R=(0,a.default)(i.default.mark((function e(t){var n,r,o,a,s,u;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.options.stsToken||!E(this.options.refreshSTSToken)){e.next=3;break}return e.next=3,x.call(this);case 3:return n=y.call(this,t),this.options.useFetch||(n.params.mode="disable-fetch"),a=!!t.stream,e.prev=6,e.next=9,this.urllib.request(n.url,n.params);case 9:r=e.sent,this.debug("response %s %s, got %s, headers: %j",t.method,n.url,r.status,r.headers,"info"),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(6),o=e.t0;case 16:if(!r||!t.successStatuses||-1!==t.successStatuses.indexOf(r.status)){e.next=28;break}return e.next=19,this.requestError(r);case 19:if("RequestTimeTooSkewed"!==(s=e.sent).code||a){e.next=25;break}return this.options.amendTimeSkewed=+new Date(s.serverTime)-new Date,e.next=24,this.request(t);case 24:return e.abrupt("return",e.sent);case 25:s.params=t,e.next=32;break;case 28:if(!o){e.next=32;break}return e.next=31,this.requestError(o);case 31:s=e.sent;case 32:if(!s){e.next=34;break}throw s;case 34:if(!t.xmlResponse){e.next=39;break}return e.next=37,this.parseXML(r.data);case 37:u=e.sent,r.data=u;case 39:return e.abrupt("return",r);case 40:case"end":return e.stop()}}),e,this,[[6,13]])})))).apply(this,arguments)}j.debug=s,l(j,e("./object")),l(j,e("./bucket")),l(j,e("../common/bucket/getBucketWebsite")),l(j,e("../common/bucket/putBucketWebsite")),l(j,e("../common/bucket/deleteBucketWebsite")),l(j,e("../common/bucket/getBucketLifecycle")),l(j,e("../common/bucket/putBucketLifecycle")),l(j,e("../common/bucket/deleteBucketLifecycle")),l(j,e("../common/bucket/putBucketVersioning")),l(j,e("../common/bucket/getBucketVersioning")),l(j,e("../common/bucket/getBucketInventory")),l(j,e("../common/bucket/deleteBucketInventory")),l(j,e("../common/bucket/listBucketInventory")),l(j,e("../common/bucket/putBucketInventory")),l(j,e("../common/bucket/abortBucketWorm")),l(j,e("../common/bucket/completeBucketWorm")),l(j,e("../common/bucket/extendBucketWorm")),l(j,e("../common/bucket/getBucketWorm")),l(j,e("../common/bucket/initiateBucketWorm")),l(j,e("./managed-upload")),l(j,e("../common/multipart-copy")),l(j,e("../common/multipart")),l(j,e("../common/parallel")),j.signature=function(e){return this.debug("authorization stringToSign: %s",e,"info"),g.computeSignature(this.options.accessKeySecret,e,this.options.headerEncoding)},j._getReqUrl=w,j.authorization=function(e,t,n,r){var o=g.buildCanonicalString(e.toUpperCase(),t,{headers:r,parameters:n});return g.authorization(this.options.accessKeyId,this.options.accessKeySecret,o,this.options.headerEncoding)},j.request=function(){var e=(0,a.default)(i.default.mark((function e(t){var n=this;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.options.retryMax){e.next=6;break}return e.next=3,A(T.bind(this),this.options.retryMax,{errorHandler:function(e){return!!function(e){if(t.stream)return!1;var r=[-1,-2].includes(e.status),o=n.options.requestErrorRetryHandle||function(){return!0};return r&&o(e)}(e)}})(t);case 3:return e.abrupt("return",e.sent);case 6:return e.abrupt("return",T.call(this,t));case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),j._getResource=function(e){var t="/";return e.bucket&&(t+="".concat(e.bucket,"/")),e.object&&(t+=b(e.object,this.options.headerEncoding)),t},j._escape=function(e){return p.encodeURIComponent(e).replace(/%2F/g,"/")},j._getUserAgent=function(){var e=r&&r.browser?"js":"nodejs",t="aliyun-sdk-".concat(e,"/").concat(d.version),n=f.description;return!n&&r&&(n="Node.js ".concat(r.version.slice(1)," on ").concat(r.platform," ").concat(r.arch)),this._checkUserAgent("".concat(t," ").concat(n))},j._checkUserAgent=function(e){return e.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta")},j.checkBrowserAndVersion=function(e,t){return m.name===e&&m.version.split(".")[0]===t},j.parseXML=function(e){return new Promise((function(t,r){n.isBuffer(e)&&(e=e.toString()),u.parseString(e,{explicitRoot:!1,explicitArray:!1},(function(e,n){e?r(e):t(n)}))}))},j.requestError=function(){var e=(0,a.default)(i.default.mark((function e(t){var n,r,o,a;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=null,t.data&&t.data.length){e.next=5;break}-1===t.status||-2===t.status?((n=new Error(t.message)).name=t.name,n.status=t.status,n.code=t.name):(404===t.status?((n=new Error("Object not exists")).name="NoSuchKeyError",n.status=404,n.code="NoSuchKey"):412===t.status?((n=new Error("Pre condition failed")).name="PreconditionFailedError",n.status=412,n.code="PreconditionFailed"):((n=new Error("Unknow error, status: ".concat(t.status))).name="UnknownError",n.status=t.status),n.requestId=t.headers["x-oss-request-id"],n.host=""),e.next=32;break;case 5:return r=String(t.data),this.debug("request response error data: %s",r,"error"),e.prev=7,e.next=10,this.parseXML(r);case 10:if(e.t0=e.sent,e.t0){e.next=13;break}e.t0={};case 13:o=e.t0,e.next=23;break;case 16:return e.prev=16,e.t1=e.catch(7),this.debug(r,"error"),e.t1.message+="\nraw xml: ".concat(r),e.t1.status=t.status,e.t1.requestId=t.headers["x-oss-request-id"],e.abrupt("return",e.t1);case 23:a=o.Message||"unknow request error, status: ".concat(t.status),o.Condition&&(a+=" (condition: ".concat(o.Condition,")")),(n=new Error(a)).name=o.Code?"".concat(o.Code,"Error"):"UnknownError",n.status=t.status,n.code=o.Code,n.requestId=o.RequestId,n.hostId=o.HostId,n.serverTime=o.ServerTime;case 32:return this.debug("generate error %j",n,"error"),e.abrupt("return",n);case 34:case"end":return e.stop()}}),e,this,[[7,16]])})));function t(t){return e.apply(this,arguments)}return t}()}).call(this)}).call(this,{isBuffer:e("../../node_modules/is-buffer/index.js")},e("_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(e,t,n){(function(t){(function(){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.function.name.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.promise.js"),e("core-js/modules/es.array.from.js"),e("core-js/modules/es.string.iterator.js"),e("core-js/modules/es.array.map.js"),e("core-js/modules/es.array.filter.js"),e("core-js/modules/es.array.find.js"),e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.regexp.to-string.js"),e("core-js/modules/es.array.slice.js"),e("core-js/modules/es.array.iterator.js"),e("core-js/modules/es.array-buffer.slice.js"),e("core-js/modules/es.typed-array.uint8-array.js"),e("core-js/modules/es.typed-array.copy-within.js"),e("core-js/modules/es.typed-array.every.js"),e("core-js/modules/es.typed-array.fill.js"),e("core-js/modules/es.typed-array.filter.js"),e("core-js/modules/es.typed-array.find.js"),e("core-js/modules/es.typed-array.find-index.js"),e("core-js/modules/es.typed-array.for-each.js"),e("core-js/modules/es.typed-array.includes.js"),e("core-js/modules/es.typed-array.index-of.js"),e("core-js/modules/es.typed-array.iterator.js"),e("core-js/modules/es.typed-array.join.js"),e("core-js/modules/es.typed-array.last-index-of.js"),e("core-js/modules/es.typed-array.map.js"),e("core-js/modules/es.typed-array.reduce.js"),e("core-js/modules/es.typed-array.reduce-right.js"),e("core-js/modules/es.typed-array.reverse.js"),e("core-js/modules/es.typed-array.set.js"),e("core-js/modules/es.typed-array.slice.js"),e("core-js/modules/es.typed-array.some.js"),e("core-js/modules/es.typed-array.sort.js"),e("core-js/modules/es.typed-array.subarray.js"),e("core-js/modules/es.typed-array.to-locale-string.js"),e("core-js/modules/es.typed-array.to-string.js");var i=r(e("@babel/runtime/helpers/asyncToGenerator")),a=e("util"),s=e("path"),u=e("mime"),c=e("copy-to"),l=e("../common/utils/isBlob").isBlob,f=e("../common/utils/isFile").isFile,p=e("../common/utils/isBuffer").isBuffer,h=n;h.multipartUpload=function(){var e=(0,i.default)(o.default.mark((function e(t,n){var r,i,a,c,h,d,m,g,v,y=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=y.length>2&&void 0!==y[2]?y[2]:{},this.resetCancelFlag(),r.disabledMD5=void 0===r.disabledMD5||!!r.disabledMD5,!r.checkpoint||!r.checkpoint.uploadId){e.next=8;break}return n&&f(n)&&(r.checkpoint.file=n),e.next=7,this._resumeMultipart(r.checkpoint,r);case 7:case 41:return e.abrupt("return",e.sent);case 8:return i=102400,r.mime||(f(n)?r.mime=u.getType(s.extname(n.name)):l(n)?r.mime=n.type:p(n)?r.mime="":r.mime=u.getType(s.extname(n))),r.headers=r.headers||{},this._convertMetaToHeaders(r.meta,r.headers),e.next=14,this._getFileSize(n);case 14:if(!((a=e.sent)<i)){e.next=26;break}return r.contentLength=a,e.next=19,this.put(t,n,r);case 19:if(c=e.sent,!r||!r.progress){e.next=23;break}return e.next=23,r.progress(1);case 23:return h={res:c.res,bucket:this.options.bucket,name:t,etag:c.res.headers.etag},(r.headers&&r.headers["x-oss-callback"]||r.callback)&&(h.data=c.data),e.abrupt("return",h);case 26:if(!r.partSize||parseInt(r.partSize,10)===r.partSize){e.next=28;break}throw new Error("partSize must be int number");case 28:if(!(r.partSize&&r.partSize<i)){e.next=30;break}throw new Error("partSize must not be smaller than ".concat(i));case 30:return e.next=32,this.initMultipartUpload(t,r);case 32:if(d=e.sent,m=d.uploadId,g=this._getPartSize(a,r.partSize),v={file:n,name:t,fileSize:a,partSize:g,uploadId:m,doneParts:[]},!r||!r.progress){e.next=39;break}return e.next=39,r.progress(0,v,d.res);case 39:return e.next=41,this._resumeMultipart(v,r);case 42:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}(),h._resumeMultipart=function(){var e=(0,i.default)(o.default.mark((function e(t,n){var r,a,s,u,l,f,p,h,d,m,g,v,y,b,w,x,A,E,C;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this,!this.isCancel()){e.next=3;break}throw this._makeCancelEvent();case 3:return a=t.file,s=t.fileSize,u=t.partSize,l=t.uploadId,f=t.doneParts,p=t.name,h=[],f.length>0&&c(f).to(h),d=this._divideParts(s,u),m=d.length,g=!1,v=function(e,r){return new Promise(function(){var s=(0,i.default)(o.default.mark((function i(s,u){var h,v,y,b,w;return o.default.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(o.prev=0,e.isCancel()){o.next=29;break}return h=d[r-1],o.next=5,e._createBuffer(a,h.start,h.end);case 5:return v=o.sent,y={content:v,size:h.end-h.start},o.prev=7,o.next=10,e._uploadPart(p,l,r,y,n);case 10:b=o.sent,o.next=18;break;case 13:if(o.prev=13,o.t0=o.catch(7),404!==o.t0.status){o.next=17;break}throw e._makeAbortEvent();case 17:throw o.t0;case 18:if(e.isCancel()||g){o.next=26;break}if(t.doneParts.push({number:r,etag:b.res.headers.etag}),!n.progress){o.next=23;break}return o.next=23,n.progress(f.length/(m+1),t,b.res);case 23:s({number:r,etag:b.res.headers.etag}),o.next=27;break;case 26:s();case 27:o.next=30;break;case 29:s();case 30:o.next=41;break;case 32:o.prev=32,o.t1=o.catch(0),(w=new Error).name=o.t1.name,w.message=o.t1.message,w.stack=o.t1.stack,w.partNum=r,c(o.t1).to(w),u(w);case 41:case"end":return o.stop()}}),i,null,[[0,32],[7,13]])})));return function(e,t){return s.apply(this,arguments)}}())},y=Array.from(new Array(m),(function(e,t){return t+1})),b=h.map((function(e){return e.number})),w=y.filter((function(e){return b.indexOf(e)<0})),x=5,A=n.parallel||x,e.next=17,this._parallel(w,A,(function(e){return new Promise((function(t,n){v(r,e).then((function(e){e&&h.push(e),t()})).catch((function(e){n(e)}))}))}));case 17:if(E=e.sent,g=!0,!(C=E.find((function(e){return"abort"===e.name})))){e.next=22;break}throw C;case 22:if(!this.isCancel()){e.next=25;break}throw v=null,this._makeCancelEvent();case 25:if(!(E&&E.length>0)){e.next=28;break}throw E[0].message="Failed to upload some parts with error: ".concat(E[0].toString()," part_num: ").concat(E[0].partNum),E[0];case 28:return e.next=30,this.completeMultipartUpload(p,l,h,n);case 30:return e.abrupt("return",e.sent);case 31:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}(),h._getFileSize=function(){var e=(0,i.default)(o.default.mark((function e(t){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!p(t)){e.next=4;break}return e.abrupt("return",t.length);case 4:if(!l(t)&&!f(t)){e.next=6;break}return e.abrupt("return",t.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}();var d=e("stream").Readable;function m(e,t){if(!(this instanceof m))return new m(e,t);d.call(this,t),this.file=e,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}function g(e){return e.arrayBuffer?e.arrayBuffer():new Promise((function(t,n){var r=new FileReader;r.onload=function(e){t(e.target.result)},r.onerror=function(e){n(e)},r.readAsArrayBuffer(e)}))}a.inherits(m,d),m.prototype.readFileAndPush=function(e){if(this.fileBuffer)for(var t=!0;t&&this.fileBuffer&&this.start<this.fileBuffer.length;){var n=this.start,r=n+e;r=r>this.fileBuffer.length?this.fileBuffer.length:r,this.start=r,t=this.push(this.fileBuffer.slice(n,r))}},m.prototype._read=function(e){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||0===this.start&&!this.file)return this.finish||(this.fileBuffer=null,this.finish=!0),void this.push(null);e=e||16384;var n=this;this.reader.onload=function(r){n.fileBuffer=t.from(new Uint8Array(r.target.result)),n.file=null,n.readFileAndPush(e)},0===this.start?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(e)},h._createBuffer=function(){var e=(0,i.default)(o.default.mark((function e(n,r,i){var a,s;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!l(n)&&!f(n)){e.next=8;break}return a=n.slice(r,i),e.next=4,g(a);case 4:return s=e.sent,e.abrupt("return",t.from(s));case 8:if(!p(n)){e.next=12;break}return e.abrupt("return",n.subarray(r,i));case 12:throw new Error("_createBuffer requires File/Blob/Buffer.");case 13:case"end":return e.stop()}}),e)})));function n(t,n,r){return e.apply(this,arguments)}return n}(),h._getPartSize=function(e,t){var n=1e4;t||(t=1048576);var r=Math.ceil(e/n);return t<r&&(t=r,console.warn("partSize has been set to ".concat(t,", because the partSize you provided causes partNumber to be greater than 10,000"))),t},h._divideParts=function(e,t){for(var n=Math.ceil(e/t),r=[],o=0;o<n;o++){var i=t*o,a=Math.min(i+t,e);r.push({start:i,end:a})}return r}}).call(this)}).call(this,e("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(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");e("core-js/modules/es.function.name.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.regexp.to-string.js"),e("core-js/modules/es.array.map.js"),e("core-js/modules/es.number.constructor.js"),e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.promise.js");var o=r(e("@babel/runtime/regenerator")),i=r(e("@babel/runtime/helpers/asyncToGenerator")),a=e("fs"),s=e("copy-to"),u=e("path"),c=e("mime"),l=e("../common/callback"),f=e("merge-descriptors"),p=e("../common/utils/isBlob").isBlob,h=e("../common/utils/isFile").isFile,d=e("../common/utils/isBuffer").isBuffer,m=e("../common/utils/obj2xml").obj2xml,g=n;g.append=function(){var e=(0,i.default)(o.default.mark((function e(t,n,r){var i;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===(r=r||{}).position&&(r.position="0"),r.subres={append:"",position:r.position},r.method="POST",e.next=6,this.put(t,n,r);case 6:return(i=e.sent).nextAppendPosition=i.res.headers["x-oss-next-append-position"],e.abrupt("return",i);case 9:case"end":return e.stop()}}),e,this)})));function t(t,n,r){return e.apply(this,arguments)}return t}(),g.put=function(){var e=(0,i.default)(o.default.mark((function e(t,n,r){var i,a,s,f,m;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((r=r||{}).disabledMD5=void 0===r.disabledMD5||!!r.disabledMD5,r.headers=r.headers||{},t=this._objectName(t),!d(n)){e.next=8;break}i=n,e.next=19;break;case 8:if(!p(n)&&!h(n)){e.next=18;break}return r.mime||(h(n)?r.mime=c.getType(u.extname(n.name)):r.mime=n.type),e.next=12,this._createBuffer(n,0,n.size);case 12:return i=e.sent,e.next=15,this._getFileSize(n);case 15:r.contentLength=e.sent,e.next=19;break;case 18:throw new TypeError("Must provide Buffer/Blob/File for put.");case 19:return this._convertMetaToHeaders(r.meta,r.headers),a=r.method||"PUT",s=this._objectRequestParams(a,t,r),l.encodeCallback(s,r),s.mime=r.mime,s.disabledMD5=r.disabledMD5,s.content=i,s.successStatuses=[200],e.next=29,this.request(s);case 29:return f=e.sent,m={name:t,url:this._objectUrl(t),res:f.res},s.headers&&s.headers["x-oss-callback"]&&(m.data=JSON.parse(f.data.toString())),e.abrupt("return",m);case 33:case"end":return e.stop()}}),e,this)})));function t(t,n,r){return e.apply(this,arguments)}return t}(),g.putStream=function(){var e=(0,i.default)(o.default.mark((function e(t,n,r){var i,a,s,u;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=r||{}).headers=r.headers||{},t=this._objectName(t),r.contentLength?r.headers["Content-Length"]=r.contentLength:r.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(r.meta,r.headers),i=r.method||"PUT",a=this._objectRequestParams(i,t,r),l.encodeCallback(a,r),a.mime=r.mime,a.stream=n,a.successStatuses=[200],e.next=13,this.request(a);case 13:return s=e.sent,u={name:t,url:this._objectUrl(t),res:s.res},a.headers&&a.headers["x-oss-callback"]&&(u.data=JSON.parse(s.data.toString())),e.abrupt("return",u);case 17:case"end":return e.stop()}}),e,this)})));function t(t,n,r){return e.apply(this,arguments)}return t}(),f(g,e("../common/object/copyObject")),f(g,e("../common/object/getObjectTagging")),f(g,e("../common/object/putObjectTagging")),f(g,e("../common/object/deleteObjectTagging")),f(g,e("../common/image")),f(g,e("../common/object/getBucketVersions")),f(g,e("../common/object/getACL")),f(g,e("../common/object/putACL")),f(g,e("../common/object/head")),f(g,e("../common/object/delete")),f(g,e("../common/object/get")),f(g,e("../common/object/putSymlink")),f(g,e("../common/object/getSymlink")),f(g,e("../common/object/deleteMulti")),f(g,e("../common/object/getObjectMeta")),f(g,e("../common/object/getObjectUrl")),f(g,e("../common/object/generateObjectUrl")),f(g,e("../common/object/signatureUrl")),f(g,e("../common/object/asyncSignatureUrl")),g.putMeta=function(){var e=(0,i.default)(o.default.mark((function e(t,n,r){var i;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.copy(t,t,{meta:n||{},timeout:r&&r.timeout,ctx:r&&r.ctx});case 2:return i=e.sent,e.abrupt("return",i);case 4:case"end":return e.stop()}}),e,this)})));function t(t,n,r){return e.apply(this,arguments)}return t}(),g.list=function(){var e=(0,i.default)(o.default.mark((function e(t,n){var r,i,a,s,u;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=this._objectRequestParams("GET","",n)).query=t,r.xmlResponse=!0,r.successStatuses=[200],e.next=6,this.request(r);case 6:return i=e.sent,a=i.data.Contents||[],s=this,a&&(Array.isArray(a)||(a=[a]),a=a.map((function(e){return{name:e.Key,url:s._objectUrl(e.Key),lastModified:e.LastModified,etag:e.ETag,type:e.Type,size:Number(e.Size),storageClass:e.StorageClass,owner:{id:e.Owner.ID,displayName:e.Owner.DisplayName}}}))),(u=i.data.CommonPrefixes||null)&&(Array.isArray(u)||(u=[u]),u=u.map((function(e){return e.Prefix}))),e.abrupt("return",{res:i.res,objects:a,prefixes:u,nextMarker:i.data.NextMarker||null,isTruncated:"true"===i.data.IsTruncated});case 13:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}(),g.listV2=function(){var e=(0,i.default)(o.default.mark((function e(t){var n,r,i,a,s,u,c,l=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=l.length>1&&void 0!==l[1]?l[1]:{},(r=t["continuation-token"]||t.continuationToken)&&(n.subres=Object.assign({"continuation-token":r},n.subres)),(i=this._objectRequestParams("GET","",n)).query=Object.assign({"list-type":2},t),delete i.query["continuation-token"],delete i.query.continuationToken,i.xmlResponse=!0,i.successStatuses=[200],e.next=11,this.request(i);case 11:return a=e.sent,s=a.data.Contents||[],u=this,s&&(Array.isArray(s)||(s=[s]),s=s.map((function(e){var t=null;return e.Owner&&(t={id:e.Owner.ID,displayName:e.Owner.DisplayName}),{name:e.Key,url:u._objectUrl(e.Key),lastModified:e.LastModified,etag:e.ETag,type:e.Type,size:Number(e.Size),storageClass:e.StorageClass,owner:t}}))),(c=a.data.CommonPrefixes||null)&&(Array.isArray(c)||(c=[c]),c=c.map((function(e){return e.Prefix}))),e.abrupt("return",{res:a.res,objects:s,prefixes:c,isTruncated:"true"===a.data.IsTruncated,keyCount:+a.data.KeyCount,continuationToken:a.data.ContinuationToken||null,nextContinuationToken:a.data.NextContinuationToken||null});case 18:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),g.restore=function(){var e=(0,i.default)(o.default.mark((function e(t){var n,r,i,a,s=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=(n=s.length>1&&void 0!==s[1]?s[1]:{type:"Archive"})||{}).subres=Object.assign({restore:""},n.subres),n.versionId&&(n.subres.versionId=n.versionId),r=this._objectRequestParams("POST",t,n),"ColdArchive"===n.type&&(i={RestoreRequest:{Days:n.Days?n.Days:2,JobParameters:{Tier:n.JobParameters?n.JobParameters:"Standard"}}},r.content=m(i,{headers:!0}),r.mime="xml"),r.successStatuses=[202],e.next=9,this.request(r);case 9:return a=e.sent,e.abrupt("return",{res:a.res});case 11:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),g._objectUrl=function(e){return this._getReqUrl({bucket:this.options.bucket,object:e})},g._objectRequestParams=function(e,t,n){if(!this.options.bucket&&!this.options.cname)throw new Error("Please create a bucket first");n=n||{};var r={object:t=this._objectName(t),bucket:this.options.bucket,method:e,subres:n&&n.subres,timeout:n&&n.timeout,ctx:n&&n.ctx};return n.headers&&(r.headers={},s(n.headers).to(r.headers)),r},g._objectName=function(e){return e.replace(/^\/+/,"")},g._convertMetaToHeaders=function(e,t){e&&Object.keys(e).forEach((function(n){t["x-oss-meta-".concat(n)]=e[n]}))},g._deleteFileSafe=function(e){var t=this;return new Promise((function(n){a.exists(e,(function(r){r?a.unlink(e,(function(r){r&&t.debug("unlink %j error: %s",e,r,"error"),n()})):n()}))}))}},{"../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(e,t,n){"use strict";n.version="6.18.1"},{}],7:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator")),i=r(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(n,"__esModule",{value:!0}),n.abortBucketWorm=void 0;var a=e("../utils/checkBucketName");function s(e,t){return u.apply(this,arguments)}function u(){return(u=(0,i.default)(o.default.mark((function e(t,n){var r,i;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a.checkBucketName(t),r=this._bucketRequestParams("DELETE",t,"worm",n),e.next=4,this.request(r);case 4:return i=e.sent,e.abrupt("return",{res:i.res,status:i.status});case 6:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}n.abortBucketWorm=s},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],8:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator")),i=r(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(n,"__esModule",{value:!0}),n.completeBucketWorm=void 0;var a=e("../utils/checkBucketName");function s(e,t,n){return u.apply(this,arguments)}function u(){return(u=(0,i.default)(o.default.mark((function e(t,n,r){var i,s;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a.checkBucketName(t),i=this._bucketRequestParams("POST",t,{wormId:n},r),e.next=4,this.request(i);case 4:return s=e.sent,e.abrupt("return",{res:s.res,status:s.status});case 6:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}n.completeBucketWorm=s},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],9:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var i=r(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(n,"__esModule",{value:!0}),n.deleteBucketInventory=void 0;var a=e("../utils/checkBucketName");function s(e,t){return u.apply(this,arguments)}function u(){return u=(0,i.default)(o.default.mark((function e(t,n){var r,i,s,u,c=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=c.length>2&&void 0!==c[2]?c[2]:{},i=Object.assign({inventory:"",inventoryId:n},r.subres),a.checkBucketName(t),(s=this._bucketRequestParams("DELETE",t,i,r)).successStatuses=[204],e.next=7,this.request(s);case 7:return u=e.sent,e.abrupt("return",{status:u.status,res:u.res});case 9:case"end":return e.stop()}}),e,this)}))),u.apply(this,arguments)}n.deleteBucketInventory=s},{"../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(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator")),i=r(e("@babel/runtime/helpers/asyncToGenerator")),a=e("../utils/checkBucketName").checkBucketName;n.deleteBucketLifecycle=function(){var e=(0,i.default)(o.default.mark((function e(t,n){var r,i;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a(t),(r=this._bucketRequestParams("DELETE",t,"lifecycle",n)).successStatuses=[204],e.next=5,this.request(r);case 5:return i=e.sent,e.abrupt("return",{res:i.res});case 7:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],11:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator")),i=r(e("@babel/runtime/helpers/asyncToGenerator")),a=e("../utils/checkBucketName").checkBucketName;n.deleteBucketWebsite=function(){var e=(0,i.default)(o.default.mark((function e(t,n){var r,i;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a(t),(r=this._bucketRequestParams("DELETE",t,"website",n)).successStatuses=[204],e.next=5,this.request(r);case 5:return i=e.sent,e.abrupt("return",{res:i.res});case 7:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],12:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator")),i=r(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(n,"__esModule",{value:!0}),n.extendBucketWorm=void 0;var a=e("../utils/checkBucketName"),s=e("../utils/obj2xml");function u(e,t,n,r){return c.apply(this,arguments)}function c(){return(c=(0,i.default)(o.default.mark((function e(t,n,r,i){var u,c,l;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a.checkBucketName(t),u=this._bucketRequestParams("POST",t,{wormExtend:"",wormId:n},i),c={ExtendWormConfiguration:{RetentionPeriodInDays:r}},u.mime="xml",u.content=s.obj2xml(c,{headers:!0}),u.successStatuses=[200],e.next=8,this.request(u);case 8:return l=e.sent,e.abrupt("return",{res:l.res,status:l.status});case 10:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}n.extendBucketWorm=u},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],13:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var i=r(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(n,"__esModule",{value:!0}),n.getBucketInventory=void 0;var a=e("../utils/checkBucketName"),s=e("../utils/formatInventoryConfig");function u(e,t){return c.apply(this,arguments)}function c(){return c=(0,i.default)(o.default.mark((function e(t,n){var r,i,u,c,l=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=l.length>2&&void 0!==l[2]?l[2]:{},i=Object.assign({inventory:"",inventoryId:n},r.subres),a.checkBucketName(t),(u=this._bucketRequestParams("GET",t,i,r)).successStatuses=[200],u.xmlResponse=!0,e.next=8,this.request(u);case 8:return c=e.sent,e.abrupt("return",{status:c.status,res:c.res,inventory:s.formatInventoryConfig(c.data)});case 10:case"end":return e.stop()}}),e,this)}))),c.apply(this,arguments)}n.getBucketInventory=u},{"../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(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.array.map.js");var i=r(e("@babel/runtime/helpers/asyncToGenerator")),a=e("../utils/checkBucketName").checkBucketName,s=e("../utils/isArray").isArray,u=e("../utils/formatObjKey").formatObjKey;n.getBucketLifecycle=function(){var e=(0,i.default)(o.default.mark((function e(t,n){var r,i,c;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a(t),(r=this._bucketRequestParams("GET",t,"lifecycle",n)).successStatuses=[200],r.xmlResponse=!0,e.next=6,this.request(r);case 6:return i=e.sent,(c=i.data.Rule||null)&&(s(c)||(c=[c]),c=c.map((function(e){return e.ID&&(e.id=e.ID,delete e.ID),e.Tag&&!s(e.Tag)&&(e.Tag=[e.Tag]),u(e,"firstLowerCase")}))),e.abrupt("return",{rules:c,res:i.res});case 10:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.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(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator")),i=r(e("@babel/runtime/helpers/asyncToGenerator")),a=e("../utils/checkBucketName").checkBucketName;n.getBucketVersioning=function(){var e=(0,i.default)(o.default.mark((function e(t,n){var r,i,s;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a(t),(r=this._bucketRequestParams("GET",t,"versioning",n)).xmlResponse=!0,r.successStatuses=[200],e.next=6,this.request(r);case 6:return i=e.sent,s=i.data.Status,e.abrupt("return",{status:i.status,versionStatus:s,res:i.res});case 9:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],16:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator")),i=r(e("@babel/runtime/helpers/asyncToGenerator")),a=e("../utils/checkBucketName").checkBucketName,s=e("../utils/isObject").isObject;n.getBucketWebsite=function(){var e=(0,i.default)(o.default.mark((function e(t,n){var r,i,u;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a(t),(r=this._bucketRequestParams("GET",t,"website",n)).successStatuses=[200],r.xmlResponse=!0,e.next=6,this.request(r);case 6:return i=e.sent,u=[],i.data.RoutingRules&&i.data.RoutingRules.RoutingRule&&(u=s(i.data.RoutingRules.RoutingRule)?[i.data.RoutingRules.RoutingRule]:i.data.RoutingRules.RoutingRule),e.abrupt("return",{index:i.data.IndexDocument&&i.data.IndexDocument.Suffix||"",supportSubDir:i.data.IndexDocument&&i.data.IndexDocument.SupportSubDir||"false",type:i.data.IndexDocument&&i.data.IndexDocument.Type,routingRules:u,error:i.data.ErrorDocument&&i.data.ErrorDocument.Key||null,res:i.res});case 10:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{"../utils/checkBucketName":51,"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],17:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var i=r(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(n,"__esModule",{value:!0}),n.getBucketWorm=void 0;var a=e("../utils/checkBucketName"),s=e("../utils/dataFix");function u(e,t){return c.apply(this,arguments)}function c(){return(c=(0,i.default)(o.default.mark((function e(t,n){var r,i;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a.checkBucketName(t),(r=this._bucketRequestParams("GET",t,"worm",n)).successStatuses=[200],r.xmlResponse=!0,e.next=6,this.request(r);case 6:return i=e.sent,s.dataFix(i.data,{lowerFirst:!0,rename:{RetentionPeriodInDays:"days"}}),e.abrupt("return",Object.assign(Object.assign({},i.data),{res:i.res,status:i.status}));case 9:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}n.getBucketWorm=u},{"../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(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator")),i=r(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(n,"__esModule",{value:!0}),n.initiateBucketWorm=void 0;var a=e("../utils/obj2xml"),s=e("../utils/checkBucketName");function u(e,t,n){return c.apply(this,arguments)}function c(){return(c=(0,i.default)(o.default.mark((function e(t,n,r){var i,u,c;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s.checkBucketName(t),i=this._bucketRequestParams("POST",t,"worm",r),u={InitiateWormConfiguration:{RetentionPeriodInDays:n}},i.mime="xml",i.content=a.obj2xml(u,{headers:!0}),i.successStatuses=[200],e.next=8,this.request(i);case 8:return c=e.sent,e.abrupt("return",{res:c.res,wormId:c.res.headers["x-oss-worm-id"],status:c.status});case 10:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}n.initiateBucketWorm=u},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],19:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var i=r(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(n,"__esModule",{value:!0}),n.listBucketInventory=void 0;var a=e("../utils/checkBucketName"),s=e("../utils/formatInventoryConfig");function u(e){return c.apply(this,arguments)}function c(){return c=(0,i.default)(o.default.mark((function e(t){var n,r,i,u,c,l,f,p,h=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=h.length>1&&void 0!==h[1]?h[1]:{},r=n.continuationToken,i=Object.assign({inventory:""},r&&{"continuation-token":r},n.subres),a.checkBucketName(t),(u=this._bucketRequestParams("GET",t,i,n)).successStatuses=[200],u.xmlResponse=!0,e.next=9,this.request(u);case 9:return c=e.sent,l=c.data,f=c.res,p=c.status,e.abrupt("return",{isTruncated:"true"===l.IsTruncated,nextContinuationToken:l.NextContinuationToken,inventoryList:s.formatInventoryConfig(l.InventoryConfiguration,!0),status:p,res:f});case 12:case"end":return e.stop()}}),e,this)}))),c.apply(this,arguments)}n.listBucketInventory=u},{"../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(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.array.concat.js");var i=r(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(n,"__esModule",{value:!0}),n.putBucketInventory=void 0;var a=e("../utils/checkBucketName"),s=e("../utils/obj2xml");function u(e,t){return c.apply(this,arguments)}function c(){return c=(0,i.default)(o.default.mark((function e(t,n){var r,i,u,c,l,f,p,h,d,m,g,v=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=v.length>2&&void 0!==v[2]?v[2]:{},i=Object.assign({inventory:"",inventoryId:n.id},r.subres),a.checkBucketName(t),u=n.OSSBucketDestination,c=n.optionalFields,l=n.includedObjectVersions,f="acs:oss:::",p="acs:ram::".concat(u.accountId,":role/"),h={InventoryConfiguration:{Id:n.id,IsEnabled:n.isEnabled,Filter:{Prefix:n.prefix||""},Destination:{OSSBucketDestination:{Format:u.format,AccountId:u.accountId,RoleArn:"".concat(p).concat(u.rolename),Bucket:"".concat(f).concat(u.bucket),Prefix:u.prefix||"",Encryption:u.encryption||""}},Schedule:{Frequency:n.frequency},IncludedObjectVersions:l,OptionalFields:{Field:(null==c?void 0:c.field)||[]}}},d=s.obj2xml(h,{headers:!0,firstUpperCase:!0}),(m=this._bucketRequestParams("PUT",t,i,r)).successStatuses=[200],m.mime="xml",m.content=d,e.next=14,this.request(m);case 14:return g=e.sent,e.abrupt("return",{status:g.status,res:g.res});case 16:case"end":return e.stop()}}),e,this)}))),c.apply(this,arguments)}n.putBucketInventory=u},{"../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(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.array.includes.js");var i=r(e("@babel/runtime/helpers/asyncToGenerator")),a=e("../utils/checkBucketName").checkBucketName,s=e("../utils/isArray").isArray,u=e("../utils/deepCopy").deepCopy,c=e("../utils/isObject").isObject,l=e("../utils/obj2xml").obj2xml,f=e("../utils/checkObjectTag").checkObjectTag,p=e("../utils/getStrBytesCount").getStrBytesCount;function h(e){e.days&&(e.expiration={days:e.days}),e.date&&(e.expiration={createdBeforeDate:e.date})}function d(e,t){var n=e.days,r=e.createdBeforeDate;if(!n&&!r)throw new Error("".concat(t," must includes days or createdBeforeDate"));if(n&&!/^[1-9][0-9]*$/.test(n))throw new Error("days must be a positive integer");if(r&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(r))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function m(e){if(!s(e)&&!c(e))throw new Error("tag must be Object or Array");e=c(e)?[e]:e;var t={};u(e).forEach((function(e){t[e.key]=e.value})),f(t)}function g(e){if(e.id&&p(e.id)>255)throw new Error("ID is composed of 255 bytes at most");if(void 0===e.prefix)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(e.status))throw new Error("Status must be Enabled or Disabled");if(e.transition){if(!["IA","Archive"].includes(e.transition.storageClass))throw new Error("StorageClass must be IA or Archive");d(e.transition,"Transition")}if(e.expiration)if(e.expiration.expiredObjectDeleteMarker){if(e.expiration.days||e.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}else d(e.expiration,"Expiration");if(e.abortMultipartUpload&&d(e.abortMultipartUpload,"AbortMultipartUpload"),!(e.expiration||e.abortMultipartUpload||e.transition||e.noncurrentVersionTransition))throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(e.tag){if(e.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");m(e.tag)}}n.putBucketLifecycle=function(){var e=(0,i.default)(o.default.mark((function e(t,n,r){var i,u,c,f,p;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a(t),s(n)){e.next=3;break}throw new Error("rules must be Array");case 3:return i=this._bucketRequestParams("PUT",t,"lifecycle",r),c={LifecycleConfiguration:{Rule:u=[]}},n.forEach((function(e){h(e),g(e),e.id&&(e.ID=e.id,delete e.id),u.push(e)})),f=l(c,{headers:!0,firstUpperCase:!0}),i.content=f,i.mime="xml",i.successStatuses=[200],e.next=13,this.request(i);case 13:return p=e.sent,e.abrupt("return",{res:p.res});case 15:case"end":return e.stop()}}),e,this)})));function t(t,n,r){return e.apply(this,arguments)}return t}()},{"../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(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.array.includes.js");var i=r(e("@babel/runtime/helpers/asyncToGenerator")),a=e("../utils/checkBucketName").checkBucketName,s=e("../utils/obj2xml").obj2xml;n.putBucketVersioning=function(){var e=(0,i.default)(o.default.mark((function e(t,n){var r,i,u,c,l=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=l.length>2&&void 0!==l[2]?l[2]:{},a(t),["Enabled","Suspended"].includes(n)){e.next=4;break}throw new Error("status must be Enabled or Suspended");case 4:return i=this._bucketRequestParams("PUT",t,"versioning",r),u={VersioningConfiguration:{Status:n}},i.mime="xml",i.content=s(u,{headers:!0}),e.next=10,this.request(i);case 10:return c=e.sent,e.abrupt("return",{res:c.res,status:c.status});case 12:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{"../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(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator")),i=r(e("@babel/runtime/helpers/asyncToGenerator")),a=e("../utils/checkBucketName").checkBucketName,s=e("../utils/obj2xml").obj2xml,u=e("../utils/isArray").isArray;n.putBucketWebsite=function(){var e=(0,i.default)(o.default.mark((function e(t){var n,r,i,c,l,f,p,h=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=h.length>1&&void 0!==h[1]?h[1]:{},r=h.length>2?h[2]:void 0,a(t),i=this._bucketRequestParams("PUT",t,"website",r),c={Suffix:n.index||"index.html"},f={WebsiteConfiguration:l={IndexDocument:c}},n.supportSubDir&&(c.SupportSubDir=n.supportSubDir),n.type&&(c.Type=n.type),n.error&&(l.ErrorDocument={Key:n.error}),void 0===n.routingRules){e.next=14;break}if(u(n.routingRules)){e.next=13;break}throw new Error("RoutingRules must be Array");case 13:l.RoutingRules={RoutingRule:n.routingRules};case 14:return f=s(f),i.content=f,i.mime="xml",i.successStatuses=[200],e.next=20,this.request(i);case 20:return p=e.sent,e.abrupt("return",{res:p.res});case 22:case"end":return e.stop()}}),e,this)})));function t(t){return e.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(e,t,n){(function(t){(function(){"use strict";e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.regexp.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js"),n.encodeCallback=function(e,n){if(e.headers=e.headers||{},!Object.prototype.hasOwnProperty.call(e.headers,"x-oss-callback")&&n.callback){var r={callbackUrl:encodeURI(n.callback.url),callbackBody:n.callback.body};n.callback.host&&(r.callbackHost=n.callback.host),n.callback.contentType&&(r.callbackBodyType=n.callback.contentType);var o=t.from(JSON.stringify(r)).toString("base64");if(e.headers["x-oss-callback"]=o,n.callback.customValue){var i={};Object.keys(n.callback.customValue).forEach((function(e){i["x:".concat(e)]=n.callback.customValue[e].toString()})),e.headers["x-oss-callback-var"]=t.from(JSON.stringify(i)).toString("base64")}}}}).call(this)}).call(this,e("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(e,t,n){"use strict";e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js");var r=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.getReqUrl=void 0;var o=r(e("copy-to")),i=r(e("url")),a=r(e("merge-descriptors")),s=r(e("is-type-of")),u=e("../utils/isIP"),c=e("../utils/checkConfigValid");function l(e){var t={},n=this.options.cname;c.checkConfigValid(this.options.endpoint,"endpoint"),o.default(this.options.endpoint,!1).to(t),!e.bucket||n||u.isIP(t.hostname)||this.options.sldEnable||(t.host="".concat(e.bucket,".").concat(t.host));var r="/";e.bucket&&this.options.sldEnable&&(r+="".concat(e.bucket,"/")),e.object&&(r+=this._escape(e.object).replace(/\+/g,"%2B")),t.pathname=r;var l={};if(e.query&&a.default(l,e.query),e.subres){var f={};s.default.string(e.subres)?f[e.subres]="":s.default.array(e.subres)?e.subres.forEach((function(e){f[e]=""})):f=e.subres,a.default(l,f)}return t.query=l,i.default.format(t)}n.getReqUrl=l},{"../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(e,t,n){"use strict";e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.string.trim.js");var r=e("humanize-ms"),o=e("url"),i=e("../utils/checkBucketName").checkBucketName,a=e("../utils/setRegion").setRegion,s=e("../utils/checkConfigValid").checkConfigValid;function u(e,t){s(e,"endpoint");var n=o.parse(e);if(n.protocol||(n=o.parse("http".concat(t?"s":"","://").concat(e))),"http:"!==n.protocol&&"https:"!==n.protocol)throw new Error("Endpoint protocol must be http or https.");return n}t.exports=function(e){if(!e||!e.accessKeyId||!e.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");!e.stsToken||e.refreshSTSToken||e.refreshSTSTokenInterval||console.warn("It's recommended to set 'refreshSTSToken' and 'refreshSTSTokenInterval' to refresh stsToken、accessKeyId、accessKeySecret automatically when sts token has expired"),e.bucket&&i(e.bucket);var t=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:3e5,retryMax:0},e);if(t.accessKeyId=t.accessKeyId.trim(),t.accessKeySecret=t.accessKeySecret.trim(),t.timeout&&(t.timeout=r(t.timeout)),t.endpoint)t.endpoint=u(t.endpoint,t.secure);else{if(!t.region)throw new Error("require options.endpoint or options.region");t.endpoint=a(t.region,t.internal,t.secure)}return t.inited=!0,t}},{"../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(e,t,n){"use strict";e("merge-descriptors")(n,e("./processObjectSave"))},{"./processObjectSave":28,"merge-descriptors":372}],28:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.array.concat.js");var i=r(e("@babel/runtime/helpers/asyncToGenerator")),a=e("../utils/checkBucketName").checkBucketName,s=e("querystring"),u=e("js-base64").Base64.encode;function c(e,t){if(!e)throw new Error("".concat(t," is required"));if("string"!=typeof e)throw new Error("".concat(t," must be String"))}n.processObjectSave=function(){var e=(0,i.default)(o.default.mark((function e(t,n,r,i){var l,f,p,h;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c(t,"sourceObject"),c(n,"targetObject"),c(r,"process"),n=this._objectName(n),i&&a(i),l=this._objectRequestParams("POST",t,{subres:"x-oss-process"}),f=i?",b_".concat(u(i)):"",n=u(n),p={"x-oss-process":"".concat(r,"|sys/saveas,o_").concat(n).concat(f)},l.content=s.stringify(p),e.next=12,this.request(l);case 12:return h=e.sent,e.abrupt("return",{res:h.res,status:h.res.status});case 14:case"end":return e.stop()}}),e,this)})));function t(t,n,r,o){return e.apply(this,arguments)}return t}()},{"../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(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.function.name.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.promise.js"),e("core-js/modules/es.array.from.js"),e("core-js/modules/es.string.iterator.js"),e("core-js/modules/es.array.map.js"),e("core-js/modules/es.array.filter.js"),e("core-js/modules/es.array.find.js"),e("core-js/modules/es.regexp.to-string.js");var i=r(e("@babel/runtime/helpers/asyncToGenerator")),a=e("debug")("ali-oss:multipart-copy"),s=e("copy-to"),u=n;u.uploadPartCopy=function(){var e=(0,i.default)(o.default.mark((function e(t,n,r,i,a){var s,u,c,l,f,p=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(s=p.length>5&&void 0!==p[5]?p[5]:{}).headers=s.headers||{},u=s.versionId||s.subres&&s.subres.versionId||null,c=u?"/".concat(a.sourceBucketName,"/").concat(encodeURIComponent(a.sourceKey),"?versionId=").concat(u):"/".concat(a.sourceBucketName,"/").concat(encodeURIComponent(a.sourceKey)),s.headers["x-oss-copy-source"]=c,i&&(s.headers["x-oss-copy-source-range"]="bytes=".concat(i)),s.subres={partNumber:r,uploadId:n},(l=this._objectRequestParams("PUT",t,s)).mime=s.mime,l.successStatuses=[200],e.next=12,this.request(l);case 12:return f=e.sent,e.abrupt("return",{name:t,etag:f.res.headers.etag,res:f.res});case 14:case"end":return e.stop()}}),e,this)})));function t(t,n,r,o,i){return e.apply(this,arguments)}return t}(),u.multipartUploadCopy=function(){var e=(0,i.default)(o.default.mark((function e(t,n){var r,i,a,s,u,c,l,f,p,h,d,m=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=m.length>2&&void 0!==m[2]?m[2]:{},this.resetCancelFlag(),i=r.versionId,a={versionId:void 0===i?null:i},e.next=6,this._getObjectMeta(n.sourceBucketName,n.sourceKey,a);case 6:if(s=e.sent,u=s.res.headers["content-length"],n.startOffset=n.startOffset||0,n.endOffset=n.endOffset||u,!r.checkpoint||!r.checkpoint.uploadId){e.next=14;break}return e.next=13,this._resumeMultipartCopy(r.checkpoint,n,r);case 13:case 31:return e.abrupt("return",e.sent);case 14:if(c=102400,!((l=n.endOffset-n.startOffset)<c)){e.next=18;break}throw new Error("copySize must not be smaller than ".concat(c));case 18:if(!(r.partSize&&r.partSize<c)){e.next=20;break}throw new Error("partSize must not be smaller than ".concat(c));case 20:return e.next=22,this.initMultipartUpload(t,r);case 22:if(f=e.sent,p=f.uploadId,h=this._getPartSize(l,r.partSize),d={name:t,copySize:l,partSize:h,uploadId:p,doneParts:[]},!r||!r.progress){e.next=29;break}return e.next=29,r.progress(0,d,f.res);case 29:return e.next=31,this._resumeMultipartCopy(d,n,r);case 32:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}(),u._resumeMultipartCopy=function(){var e=(0,i.default)(o.default.mark((function e(t,n,r){var u,c,l,f,p,h,d,m,g,v,y,b,w,x,A,E,C,k,I,S,j;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isCancel()){e.next=2;break}throw this._makeCancelEvent();case 2:if(u=r.versionId,l={versionId:c=void 0===u?null:u},f=t.copySize,p=t.partSize,h=t.uploadId,d=t.doneParts,m=t.name,g=this._divideMultipartCopyParts(f,p,n.startOffset),v=g.length,y={headers:{}},r.copyheaders&&s(r.copyheaders).to(y.headers),c&&s(l).to(y),b=function(e,n,s){return new Promise(function(){var u=(0,i.default)(o.default.mark((function i(u,c){var l,f,p;return o.default.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(o.prev=0,e.isCancel()){o.next=22;break}return l=g[n-1],f="".concat(l.start,"-").concat(l.end-1),o.prev=4,o.next=7,e.uploadPartCopy(m,h,n,f,s,y);case 7:p=o.sent,o.next=15;break;case 10:if(o.prev=10,o.t0=o.catch(4),404!==o.t0.status){o.next=14;break}throw e._makeAbortEvent();case 14:throw o.t0;case 15:if(e.isCancel()){o.next=22;break}if(a("content-range ".concat(p.res.headers["content-range"])),d.push({number:n,etag:p.res.headers.etag}),t.doneParts=d,!r||!r.progress){o.next=22;break}return o.next=22,r.progress(d.length/v,t,p.res);case 22:u(),o.next=29;break;case 25:o.prev=25,o.t1=o.catch(0),o.t1.partNum=n,c(o.t1);case 29:case"end":return o.stop()}}),i,null,[[0,25],[4,10]])})));return function(e,t){return u.apply(this,arguments)}}())},w=Array.from(new Array(v),(function(e,t){return t+1})),x=d.map((function(e){return e.number})),A=w.filter((function(e){return x.indexOf(e)<0})),E=5,C=r.parallel||E,!this.checkBrowserAndVersion("Internet Explorer","10")&&1!==C){e.next=28;break}k=0;case 18:if(!(k<A.length)){e.next=26;break}if(!this.isCancel()){e.next=21;break}throw this._makeCancelEvent();case 21:return e.next=23,b(this,A[k],n);case 23:k++,e.next=18;break;case 26:e.next=40;break;case 28:return e.next=30,this._parallelNode(A,C,b,n);case 30:if(I=e.sent,S=I.find((function(e){return"abort"===e.name})),!S){e.next=34;break}throw S;case 34:if(!this.isCancel()){e.next=36;break}throw this._makeCancelEvent();case 36:if(!(I&&I.length>0)){e.next=40;break}throw(j=I[0]).message="Failed to copy some parts with error: ".concat(j.toString()," part_num: ").concat(j.partNum),j;case 40:return e.next=42,this.completeMultipartUpload(m,h,d,r);case 42:return e.abrupt("return",e.sent);case 43:case"end":return e.stop()}}),e,this)})));function t(t,n,r){return e.apply(this,arguments)}return t}(),u._divideMultipartCopyParts=function(e,t,n){for(var r=Math.ceil(e/t),o=[],i=0;i<r;i++){var a=t*i+n,s=Math.min(a+t,e+n);o.push({start:a,end:s})}return o},u._getObjectMeta=function(){var e=(0,i.default)(o.default.mark((function e(t,n,r){var i,a;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=this.getBucket(),this.setBucket(t),e.next=4,this.head(n,r);case 4:return a=e.sent,this.setBucket(i),e.abrupt("return",a);case 7:case"end":return e.stop()}}),e,this)})));function t(t,n,r){return e.apply(this,arguments)}return t}()},{"@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(e,t,n){(function(t){(function(){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.array.map.js"),e("core-js/modules/es.array.filter.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.array.sort.js"),e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.regexp.to-string.js");var i=r(e("@babel/runtime/helpers/asyncToGenerator")),a=e("copy-to"),s=e("./callback"),u=e("./utils/deepCopy").deepCopyWith,c=e("./utils/isBuffer").isBuffer,l=e("./utils/omit").omit,f=n;f.listUploads=function(){var e=(0,i.default)(o.default.mark((function e(t,n){var r,i,s,u;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={},a(n=n||{}).to(r),r.subres="uploads",(i=this._objectRequestParams("GET","",r)).query=t,i.xmlResponse=!0,i.successStatuses=[200],e.next=10,this.request(i);case 10:return s=e.sent,u=s.data.Upload||[],Array.isArray(u)||(u=[u]),u=u.map((function(e){return{name:e.Key,uploadId:e.UploadId,initiated:e.Initiated}})),e.abrupt("return",{res:s.res,uploads:u,bucket:s.data.Bucket,nextKeyMarker:s.data.NextKeyMarker,nextUploadIdMarker:s.data.NextUploadIdMarker,isTruncated:"true"===s.data.IsTruncated});case 15:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}(),f.listParts=function(){var e=(0,i.default)(o.default.mark((function e(t,n,r,i){var s,u,c;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s={},a(i=i||{}).to(s),s.subres={uploadId:n},(u=this._objectRequestParams("GET",t,s)).query=r,u.xmlResponse=!0,u.successStatuses=[200],e.next=10,this.request(u);case 10:return c=e.sent,e.abrupt("return",{res:c.res,uploadId:c.data.UploadId,bucket:c.data.Bucket,name:c.data.Key,partNumberMarker:c.data.PartNumberMarker,nextPartNumberMarker:c.data.NextPartNumberMarker,maxParts:c.data.MaxParts,isTruncated:c.data.IsTruncated,parts:c.data.Part||[]});case 12:case"end":return e.stop()}}),e,this)})));function t(t,n,r,o){return e.apply(this,arguments)}return t}(),f.abortMultipartUpload=function(){var e=(0,i.default)(o.default.mark((function e(t,n,r){var i,s,u;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._stop(),i={},a(r=r||{}).to(i),i.subres={uploadId:n},(s=this._objectRequestParams("DELETE",t,i)).successStatuses=[204],e.next=9,this.request(s);case 9:return u=e.sent,e.abrupt("return",{res:u.res});case 11:case"end":return e.stop()}}),e,this)})));function t(t,n,r){return e.apply(this,arguments)}return t}(),f.initMultipartUpload=function(){var e=(0,i.default)(o.default.mark((function e(t,n){var r,i,s;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={},a(n=n||{}).to(r),r.headers=r.headers||{},this._convertMetaToHeaders(n.meta,r.headers),r.subres="uploads",(i=this._objectRequestParams("POST",t,r)).mime=n.mime,i.xmlResponse=!0,i.successStatuses=[200],e.next=12,this.request(i);case 12:return s=e.sent,e.abrupt("return",{res:s.res,bucket:s.data.Bucket,name:s.data.Key,uploadId:s.data.UploadId});case 14:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}(),f.uploadPart=function(){var e=(0,i.default)(o.default.mark((function e(n,r,i,a,s,u,c){var l;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l={size:u-s},!t||!t.browser){e.next=8;break}return e.next=5,this._createBuffer(a,s,u);case 5:l.content=e.sent,e.next=11;break;case 8:return e.next=10,this._createStream(a,s,u);case 10:l.stream=e.sent;case 11:return e.next=13,this._uploadPart(n,r,i,l,c);case 13:return e.abrupt("return",e.sent);case 14:case"end":return e.stop()}}),e,this)})));function n(t,n,r,o,i,a,s){return e.apply(this,arguments)}return n}(),f.completeMultipartUpload=function(){var e=(0,i.default)(o.default.mark((function e(t,n,r,i){var a,f,p,h,d,m,g,v;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(a=r.concat().sort((function(e,t){return e.number-t.number})).filter((function(e,t,n){return!t||e.number!==n[t-1].number})),f='<?xml version="1.0" encoding="UTF-8"?>\n<CompleteMultipartUpload>\n',p=0;p<a.length;p++)h=a[p],f+="<Part>\n",f+="<PartNumber>".concat(h.number,"</PartNumber>\n"),f+="<ETag>".concat(h.etag,"</ETag>\n"),f+="</Part>\n";return f+="</CompleteMultipartUpload>",d={},(d=u(i=i||{},(function(e){if(c(e))return null}))).subres={uploadId:n},d.headers=l(d.headers,["x-oss-server-side-encryption","x-oss-storage-class"]),m=this._objectRequestParams("POST",t,d),s.encodeCallback(m,d),m.mime="xml",m.content=f,m.headers&&m.headers["x-oss-callback"]||(m.xmlResponse=!0),m.successStatuses=[200],e.next=17,this.request(m);case 17:if(g=e.sent,!i.progress){e.next=21;break}return e.next=21,i.progress(1,null,g.res);case 21:return v={res:g.res,bucket:m.bucket,name:t,etag:g.res.headers.etag},m.headers&&m.headers["x-oss-callback"]&&(v.data=JSON.parse(g.data.toString())),e.abrupt("return",v);case 24:case"end":return e.stop()}}),e,this)})));function t(t,n,r,o){return e.apply(this,arguments)}return t}(),f._uploadPart=function(){var e=(0,i.default)(o.default.mark((function e(n,r,i,s,u){var c,f,p;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c={},a(u=u||{}).to(c),c.headers=c.headers||{},c.headers["Content-Length"]=s.size,c.headers=l(c.headers,["x-oss-server-side-encryption"]),c.subres={partNumber:i,uploadId:r},(f=this._objectRequestParams("PUT",n,c)).mime=c.mime,t&&t.browser?f.content=s.content:f.stream=s.stream,f.successStatuses=[200],f.disabledMD5=u.disabledMD5,e.next=15,this.request(f);case 15:if((p=e.sent).res.headers.etag){e.next=18;break}throw new Error("Please set the etag of expose-headers in OSS \n https://help.aliyun.com/document_detail/32069.html");case 18:return s.stream&&(s.stream=null,f.stream=null),e.abrupt("return",{name:n,etag:p.res.headers.etag,res:p.res});case 20:case"end":return e.stop()}}),e,this)})));function n(t,n,r,o,i){return e.apply(this,arguments)}return n}()}).call(this)}).call(this,e("_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(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator")),i=r(e("@babel/runtime/helpers/asyncToGenerator")),a=e("url"),s=e("utility"),u=e("copy-to"),c=e("../../common/signUtils"),l=e("../utils/isIP").isIP,f=e("../utils/setSTSToken").setSTSToken,p=e("../utils/isFunction").isFunction;n.asyncSignatureUrl=function(){var e=(0,i.default)(o.default.mark((function e(t,n){var r,i,h,d,m;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!l(this.options.endpoint.hostname)){e.next=2;break}throw new Error("can not get the object URL when endpoint is IP");case 2:if(n=n||{},t=this._objectName(t),n.method=n.method||"GET",r=s.timestamp()+(n.expires||1800),i={bucket:this.options.bucket,object:t},h=this._getResource(i),!this.options.stsToken||!p(this.options.refreshSTSToken)){e.next=11;break}return e.next=11,f.call(this);case 11:return this.options.stsToken&&(n["security-token"]=this.options.stsToken),d=c._signatureForURL(this.options.accessKeySecret,n,h,r),(m=a.parse(this._getReqUrl(i))).query={OSSAccessKeyId:this.options.accessKeyId,Expires:r,Signature:d.Signature},u(d.subResource).to(m.query),e.abrupt("return",m.format());case 17:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{"../../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(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.array.find.js"),e("core-js/modules/es.array.includes.js"),e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js");var i=r(e("@babel/runtime/helpers/typeof")),a=r(e("@babel/runtime/helpers/asyncToGenerator")),s=e("../utils/checkBucketName").checkBucketName,u=n,c=["content-type","content-encoding","content-language","content-disposition","cache-control","expires"];u.copy=function(){var e=(0,a.default)(o.default.mark((function e(t,n,r,a){var s,u,l;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"object"===(0,i.default)(r)&&(a=r),(a=a||{}).headers=a.headers||{},Object.keys(a.headers).forEach((function(e){a.headers["x-oss-copy-source-".concat(e.toLowerCase())]=a.headers[e]})),(a.meta||Object.keys(a.headers).find((function(e){return c.includes(e.toLowerCase())})))&&(a.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(a.meta,a.headers),n=this._getSourceName(n,r),a.versionId&&(n="".concat(n,"?versionId=").concat(a.versionId)),a.headers["x-oss-copy-source"]=n,(s=this._objectRequestParams("PUT",t,a)).xmlResponse=!0,s.successStatuses=[200,304],e.next=14,this.request(s);case 14:return u=e.sent,(l=u.data)&&(l={etag:l.ETag,lastModified:l.LastModified}),e.abrupt("return",{data:l,res:u.res});case 18:case"end":return e.stop()}}),e,this)})));function t(t,n,r,o){return e.apply(this,arguments)}return t}(),u._getSourceName=function(e,t){return"string"==typeof t?e=this._objectName(e):"/"!==e[0]?t=this.options.bucket:(t=e.replace(/\/(.+?)(\/.*)/,"$1"),e=e.replace(/(\/.+?\/)(.*)/,"$2")),s(t),e=encodeURIComponent(e),e="/".concat(t,"/").concat(e)}},{"../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(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var i=r(e("@babel/runtime/helpers/asyncToGenerator"));n.delete=function(){var e=(0,i.default)(o.default.mark((function e(t){var n,r,i,a=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=a.length>1&&void 0!==a[1]?a[1]:{}).subres=Object.assign({},n.subres),n.versionId&&(n.subres.versionId=n.versionId),(r=this._objectRequestParams("DELETE",t,n)).successStatuses=[204],e.next=7,this.request(r);case 7:return i=e.sent,e.abrupt("return",{res:i.res});case 9:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],34:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var i=r(e("@babel/runtime/helpers/asyncToGenerator")),a=e("utility"),s=e("../utils/obj2xml").obj2xml;n.deleteMulti=function(){var e=(0,i.default)(o.default.mark((function e(t){var n,r,i,u,c,l,f,p,h,d,m,g,v,y=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=y.length>1&&void 0!==y[1]?y[1]:{},r=[],t&&t.length){e.next=4;break}throw new Error("names is required");case 4:for(i=0;i<t.length;i++)u={},"string"==typeof t[i]?u.Key=a.escape(this._objectName(t[i])):(c=t[i],l=c.key,f=c.versionId,u.Key=a.escape(this._objectName(l)),u.VersionId=f),r.push(u);return p={Delete:{Quiet:!!n.quiet,Object:r}},h=s(p,{headers:!0}),n.subres=Object.assign({delete:""},n.subres),n.versionId&&(n.subres.versionId=n.versionId),(d=this._objectRequestParams("POST","",n)).mime="xml",d.content=h,d.xmlResponse=!0,d.successStatuses=[200],e.next=16,this.request(d);case 16:return m=e.sent,g=m.data,(v=g&&g.Deleted||null)&&(Array.isArray(v)||(v=[v])),e.abrupt("return",{res:m.res,deleted:v||[]});case 21:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{"../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(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var i=r(e("@babel/runtime/helpers/asyncToGenerator"));n.deleteObjectTagging=function(){var e=(0,i.default)(o.default.mark((function e(t){var n,r,i,a=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=a.length>1&&void 0!==a[1]?a[1]:{}).subres=Object.assign({tagging:""},n.subres),n.versionId&&(n.subres.versionId=n.versionId),t=this._objectName(t),(r=this._objectRequestParams("DELETE",t,n)).successStatuses=[204],e.next=8,this.request(r);case 8:return i=e.sent,e.abrupt("return",{status:i.status,res:i.res});case 10:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],36:[function(e,t,n){"use strict";e("core-js/modules/es.array.concat.js");var r=e("url"),o=e("../utils/isIP").isIP;n.generateObjectUrl=function(e,t){if(o(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");if(t)"/"!==t[t.length-1]&&(t+="/");else{t=this.options.endpoint.format();var n=r.parse(t),i=this.options.bucket;n.hostname="".concat(i,".").concat(n.hostname),n.host="".concat(i,".").concat(n.host),t=n.format()}return t+this._escape(this._objectName(e))}},{"../utils/isIP":69,"core-js/modules/es.array.concat.js":272,url:472}],37:[function(e,t,n){(function(t){(function(){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var i=r(e("@babel/runtime/helpers/asyncToGenerator")),a=e("fs"),s=e("is-type-of");n.get=function(){var e=(0,i.default)(o.default.mark((function e(n,r){var i,u,c,l,f,p,h,d,m=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=m.length>2&&void 0!==m[2]?m[2]:{},u=null,c=!1,s.writableStream(r)?u=r:s.string(r)?(u=a.createWriteStream(r),c=!0):i=r,i=i||{},l=t&&t.browser,f=null===i.responseCacheControl?"":"no-cache",p=l&&f?{"response-cache-control":f}:{},i.subres=Object.assign(p,i.subres),i.versionId&&(i.subres.versionId=i.versionId),i.process&&(i.subres["x-oss-process"]=i.process),e.prev=11,(d=this._objectRequestParams("GET",n,i)).writeStream=u,d.successStatuses=[200,206,304],e.next=17,this.request(d);case 17:h=e.sent,c&&u.destroy(),e.next=28;break;case 21:if(e.prev=21,e.t0=e.catch(11),!c){e.next=27;break}return u.destroy(),e.next=27,this._deleteFileSafe(r);case 27:throw e.t0;case 28:return e.abrupt("return",{res:h.res,content:h.data});case 29:case"end":return e.stop()}}),e,this,[[11,21]])})));function n(t,n){return e.apply(this,arguments)}return n}()}).call(this)}).call(this,e("_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(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var i=r(e("@babel/runtime/helpers/asyncToGenerator"));n.getACL=function(){var e=(0,i.default)(o.default.mark((function e(t){var n,r,i,a=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=a.length>1&&void 0!==a[1]?a[1]:{}).subres=Object.assign({acl:""},n.subres),n.versionId&&(n.subres.versionId=n.versionId),t=this._objectName(t),(r=this._objectRequestParams("GET",t,n)).successStatuses=[200],r.xmlResponse=!0,e.next=9,this.request(r);case 9:return i=e.sent,e.abrupt("return",{acl:i.data.AccessControlList.Grant,owner:{id:i.data.Owner.ID,displayName:i.data.Owner.DisplayName},res:i.res});case 11:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],39:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.array.map.js"),e("core-js/modules/es.number.constructor.js");var i=r(e("@babel/runtime/helpers/asyncToGenerator")),a=n,s=e("../utils/isObject").isObject,u=e("../utils/isArray").isArray;function c(){return l.apply(this,arguments)}function l(){return l=(0,i.default)(o.default.mark((function e(){var t,n,r,i,a,s,c,l,f=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=f.length>0&&void 0!==f[0]?f[0]:{},n=f.length>1&&void 0!==f[1]?f[1]:{},!t.versionIdMarker||void 0!==t.keyMarker){e.next=4;break}throw new Error("A version-id marker cannot be specified without a key marker");case 4:return n.subres=Object.assign({versions:""},n.subres),n.versionId&&(n.subres.versionId=n.versionId),(r=this._objectRequestParams("GET","",n)).xmlResponse=!0,r.successStatuses=[200],r.query=p(t),e.next=12,this.request(r);case 12:return i=e.sent,a=i.data.Version||[],s=i.data.DeleteMarker||[],c=this,a&&(Array.isArray(a)||(a=[a]),a=a.map((function(e){return{name:e.Key,url:c._objectUrl(e.Key),lastModified:e.LastModified,isLatest:"true"===e.IsLatest,versionId:e.VersionId,etag:e.ETag,type:e.Type,size:Number(e.Size),storageClass:e.StorageClass,owner:{id:e.Owner.ID,displayName:e.Owner.DisplayName}}}))),s&&(u(s)||(s=[s]),s=s.map((function(e){return{name:e.Key,lastModified:e.LastModified,versionId:e.VersionId,owner:{id:e.Owner.ID,displayName:e.Owner.DisplayName}}}))),(l=i.data.CommonPrefixes||null)&&(u(l)||(l=[l]),l=l.map((function(e){return e.Prefix}))),e.abrupt("return",{res:i.res,objects:a,deleteMarker:s,prefixes:l,nextMarker:i.data.NextKeyMarker||null,NextVersionIdMarker:i.data.NextVersionIdMarker||null,nextKeyMarker:i.data.NextKeyMarker||null,nextVersionIdMarker:i.data.NextVersionIdMarker||null,isTruncated:"true"===i.data.IsTruncated});case 21:case"end":return e.stop()}}),e,this)}))),l.apply(this,arguments)}function f(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function p(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return s(e)&&Object.keys(e).forEach((function(n){t[f(n)]=e[n]})),t}a.getBucketVersions=c,a.listObjectVersions=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(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var i=r(e("@babel/runtime/helpers/asyncToGenerator"));n.getObjectMeta=function(){var e=(0,i.default)(o.default.mark((function e(t,n){var r,i;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=n||{},t=this._objectName(t),n.subres=Object.assign({objectMeta:""},n.subres),n.versionId&&(n.subres.versionId=n.versionId),(r=this._objectRequestParams("HEAD",t,n)).successStatuses=[200],e.next=8,this.request(r);case 8:return i=e.sent,e.abrupt("return",{status:i.status,res:i.res});case 10:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],41:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js");var i=r(e("@babel/runtime/helpers/asyncToGenerator")),a=n,s=e("../utils/isObject").isObject;a.getObjectTagging=function(){var e=(0,i.default)(o.default.mark((function e(t){var n,r,i,a,u,c,l=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=l.length>1&&void 0!==l[1]?l[1]:{}).subres=Object.assign({tagging:""},n.subres),n.versionId&&(n.subres.versionId=n.versionId),t=this._objectName(t),(r=this._objectRequestParams("GET",t,n)).successStatuses=[200],e.next=8,this.request(r);case 8:return i=e.sent,e.next=11,this.parseXML(i.data);case 11:return a=e.sent,u=(u=a.TagSet.Tag)&&s(u)?[u]:u||[],c={},u.forEach((function(e){c[e.Key]=e.Value})),e.abrupt("return",{status:i.status,res:i.res,tag:c});case 17:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{"../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(e,t,n){"use strict";var r=e("../utils/isIP").isIP;n.getObjectUrl=function(e,t){if(r(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");return t?"/"!==t[t.length-1]&&(t+="/"):t=this.options.endpoint.format(),t+this._escape(this._objectName(e))}},{"../utils/isIP":69}],43:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var i=r(e("@babel/runtime/helpers/asyncToGenerator"));n.getSymlink=function(){var e=(0,i.default)(o.default.mark((function e(t){var n,r,i,a,s=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=s.length>1&&void 0!==s[1]?s[1]:{}).subres=Object.assign({symlink:""},n.subres),n.versionId&&(n.subres.versionId=n.versionId),t=this._objectName(t),(r=this._objectRequestParams("GET",t,n)).successStatuses=[200],e.next=8,this.request(r);case 8:return i=e.sent,a=i.res.headers["x-oss-symlink-target"],e.abrupt("return",{targetName:decodeURIComponent(a),res:i.res});case 11:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],44:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js");var i=r(e("@babel/runtime/helpers/asyncToGenerator")),a=e("../utils/checkEnv").checkEnv;n.head=function(){var e=(0,i.default)(o.default.mark((function e(t){var n,r,i,s,u=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=u.length>1&&void 0!==u[1]?u[1]:{},a("Because HeadObject has gzip enabled, head cannot get the file size correctly. If you need to get the file size, please use getObjectMeta"),n.subres=Object.assign({},n.subres),n.versionId&&(n.subres.versionId=n.versionId),(r=this._objectRequestParams("HEAD",t,n)).successStatuses=[200,304],e.next=8,this.request(r);case 8:return i=e.sent,s={meta:null,res:i.res,status:i.status},200===i.status&&Object.keys(i.headers).forEach((function(e){0===e.indexOf("x-oss-meta-")&&(s.meta||(s.meta={}),s.meta[e.substring(11)]=i.headers[e])})),e.abrupt("return",s);case 12:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{"../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(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var i=r(e("@babel/runtime/helpers/asyncToGenerator"));n.putACL=function(){var e=(0,i.default)(o.default.mark((function e(t,n,r){var i,a;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=r||{}).subres=Object.assign({acl:""},r.subres),r.versionId&&(r.subres.versionId=r.versionId),r.headers=r.headers||{},r.headers["x-oss-object-acl"]=n,t=this._objectName(t),(i=this._objectRequestParams("PUT",t,r)).successStatuses=[200],e.next=10,this.request(i);case 10:return a=e.sent,e.abrupt("return",{res:a.res});case 12:case"end":return e.stop()}}),e,this)})));function t(t,n,r){return e.apply(this,arguments)}return t}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],46:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.array.map.js"),e("core-js/modules/es.object.keys.js");var i=r(e("@babel/runtime/helpers/asyncToGenerator")),a=e("../utils/obj2xml").obj2xml,s=e("../utils/checkObjectTag").checkObjectTag;n.putObjectTagging=function(){var e=(0,i.default)(o.default.mark((function e(t,n){var r,i,u,c,l=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=l.length>2&&void 0!==l[2]?l[2]:{},s(n),r.subres=Object.assign({tagging:""},r.subres),r.versionId&&(r.subres.versionId=r.versionId),t=this._objectName(t),(i=this._objectRequestParams("PUT",t,r)).successStatuses=[200],n=Object.keys(n).map((function(e){return{Key:e,Value:n[e]}})),u={Tagging:{TagSet:{Tag:n}}},i.mime="xml",i.content=a(u),e.next=13,this.request(i);case 13:return c=e.sent,e.abrupt("return",{res:c.res,status:c.status});case 15:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{"../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(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var i=r(e("@babel/runtime/helpers/asyncToGenerator"));n.putSymlink=function(){var e=(0,i.default)(o.default.mark((function e(t,n,r){var i,a;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=r||{}).headers=r.headers||{},n=this._escape(this._objectName(n)),this._convertMetaToHeaders(r.meta,r.headers),r.headers["x-oss-symlink-target"]=n,r.subres=Object.assign({symlink:""},r.subres),r.versionId&&(r.subres.versionId=r.versionId),r.storageClass&&(r.headers["x-oss-storage-class"]=r.storageClass),t=this._objectName(t),(i=this._objectRequestParams("PUT",t,r)).successStatuses=[200],e.next=13,this.request(i);case 13:return a=e.sent,e.abrupt("return",{res:a.res});case 15:case"end":return e.stop()}}),e,this)})));function t(t,n,r){return e.apply(this,arguments)}return t}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],48:[function(e,t,n){"use strict";var r=e("url"),o=e("utility"),i=e("copy-to"),a=e("../../common/signUtils"),s=e("../utils/isIP").isIP;n.signatureUrl=function(e,t){if(s(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");t=t||{},e=this._objectName(e),t.method=t.method||"GET";var n=o.timestamp()+(t.expires||1800),u={bucket:this.options.bucket,object:e},c=this._getResource(u);this.options.stsToken&&(t["security-token"]=this.options.stsToken);var l=a._signatureForURL(this.options.accessKeySecret,t,c,n),f=r.parse(this._getReqUrl(u));return f.query={OSSAccessKeyId:this.options.accessKeyId,Expires:n,Signature:l.Signature},i(l.subResource).to(f.query),f.format()}},{"../../common/signUtils":50,"../utils/isIP":69,"copy-to":94,url:472,utility:474}],49:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.array.iterator.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.promise.js"),e("core-js/modules/es.string.iterator.js"),e("core-js/modules/web.dom-collections.iterator.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.function.name.js");var i=r(e("@babel/runtime/helpers/asyncToGenerator")),a=e("./utils/isArray").isArray,s=n;s._parallelNode=function(){var e=(0,i.default)(o.default.mark((function e(t,n,r,i){var a,s,u,c,l,f,p,h;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=this,s=[],u=[],c=t.length/n,l=t.length%n,f=0===l?c:(t.length-l)/n+1,p=1,h=0;case 8:if(!(h<t.length)){e.next=26;break}if(!a.isCancel()){e.next=11;break}return e.abrupt("break",26);case 11:if(i?u.push(r(a,t[h],i)):u.push(r(a,t[h])),u.length!==n&&(p!==f||h!==t.length-1)){e.next=23;break}return e.prev=13,p+=1,e.next=17,Promise.all(u);case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(13),s.push(e.t0);case 22:u=[];case 23:h++,e.next=8;break;case 26:return e.abrupt("return",s);case 27:case"end":return e.stop()}}),e,this,[[13,19]])})));function t(t,n,r,o){return e.apply(this,arguments)}return t}(),s._parallel=function(e,t,n){var r=this;return new Promise((function(o){var i=[];if(t<=0||!e)o(i);else{var a=f(e),s=!1,u=0,c=!1;d()}function l(e){return function(){if(null===e)throw new Error("Callback was already called.");var t=e;e=null;for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];t.apply(this,r)}}function f(e){var t=-1,n=e.length;return function(){return++t<n&&!r.isCancel()?{value:e[t],key:t}:null}}function p(e){u-=1,e?(s=!0,i.push(e),o(i)):s&&u<=0?(s=!0,o(i)):c||(r.isCancel()?o(i):d())}function h(e,t){n(e).then((function(e){t(null,e)})).catch((function(e){t(e)}))}function d(){for(c=!0;u<t&&!s&&!r.isCancel();){var e=a();if(null===e||i.length>0)return s=!0,void(u<=0&&o(i));u+=1,h(e.value,l(p))}c=!1}}))},s.cancel=function(e){this.options.cancelFlag=!0,a(this.multipartUploadStreams)&&this.multipartUploadStreams.forEach((function(e){if(!1===e.destroyed){var t={name:"cancel",message:"cancel"};e.destroy(t)}})),this.multipartUploadStreams=[],e&&this.abortMultipartUpload(e.name,e.uploadId,e.options)},s.isCancel=function(){return this.options.cancelFlag},s.resetCancelFlag=function(){this.options.cancelFlag=!1},s._stop=function(){this.options.cancelFlag=!0},s._makeCancelEvent=function(){return{status:0,name:"cancel"}},s._makeAbortEvent=function(){return{status:0,name:"abort",message:"upload task has been abort"}}},{"./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(e,t,n){(function(t){(function(){"use strict";e("core-js/modules/es.string.trim.js"),e("core-js/modules/es.array.sort.js"),e("core-js/modules/es.array.join.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.regexp.to-string.js");var r=e("./../../shims/crypto/crypto.js"),o=e("is-type-of"),i=e("./utils/lowercaseKeyHeader").lowercaseKeyHeader;n.buildCanonicalizedResource=function(e,t){var n="".concat(e),r="?";if(o.string(t)&&""!==t.trim())n+=r+t;else if(o.array(t))t.sort(),n+=r+t.join("&");else if(t){var i=function(e,t){return e[0]>t[0]?1:e[0]<t[0]?-1:0},a=function(e){n+=r+e,(t[e]||0===t[e])&&(n+="=".concat(t[e])),r="&"};Object.keys(t).sort(i).forEach(a)}return n},n.buildCanonicalString=function(e,t,n,r){var o=i((n=n||{}).headers),a="x-oss-",s=[],u={},c=[e.toUpperCase(),o["content-md5"]||"",o["content-type"],r||o["x-oss-date"]];return Object.keys(o).forEach((function(e){var t=e.toLowerCase();0===t.indexOf(a)&&(u[t]=String(o[e]).trim())})),Object.keys(u).sort().forEach((function(e){s.push("".concat(e,":").concat(u[e]))})),(c=c.concat(s)).push(this.buildCanonicalizedResource(t,n.parameters)),c.join("\n")},n.computeSignature=function(e,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"utf-8";return r.createHmac("sha1",e).update(t.from(n,o)).digest("base64")},n.authorization=function(e,t,n,r){return"OSS ".concat(e,":").concat(this.computeSignature(t,n,r))},n._signatureForURL=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,a={},s=n.subResource,u=void 0===s?{}:s;if(n.process&&(u["x-oss-process"]=n.process),n.trafficLimit&&(u["x-oss-traffic-limit"]=n.trafficLimit),n.response&&Object.keys(n.response).forEach((function(e){var t="response-".concat(e.toLowerCase());u[t]=n.response[e]})),Object.keys(n).forEach((function(e){var t=e.toLowerCase(),r=n[e];0===t.indexOf("x-oss-")?a[t]=r:(0===t.indexOf("content-md5")||0===t.indexOf("content-type"))&&(a[e]=r)})),Object.prototype.hasOwnProperty.call(n,"security-token")&&(u["security-token"]=n["security-token"]),Object.prototype.hasOwnProperty.call(n,"callback")){var c={callbackUrl:encodeURI(n.callback.url),callbackBody:n.callback.body};if(n.callback.host&&(c.callbackHost=n.callback.host),n.callback.contentType&&(c.callbackBodyType=n.callback.contentType),u.callback=t.from(JSON.stringify(c)).toString("base64"),n.callback.customValue){var l={};Object.keys(n.callback.customValue).forEach((function(e){l["x:".concat(e)]=n.callback.customValue[e]})),u["callback-var"]=t.from(JSON.stringify(l)).toString("base64")}}var f=this.buildCanonicalString(n.method,r,{headers:a,parameters:u},o.toString());return{Signature:this.computeSignature(e,f,i),subResource:u}}}).call(this)}).call(this,e("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(e,t,n){"use strict";e("core-js/modules/es.regexp.exec.js"),Object.defineProperty(n,"__esModule",{value:!0}),n.checkBucketName=void 0,n.checkBucketName=function(e){if(!(arguments.length>1&&void 0!==arguments[1]&&arguments[1]?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/).test(e))throw new Error("The bucket must be conform to the specifications")}},{"core-js/modules/es.regexp.exec.js":300}],52:[function(e,t,n){"use strict";e("core-js/modules/es.regexp.exec.js"),Object.defineProperty(n,"__esModule",{value:!0}),n.checkConfigValid=void 0;var r={endpoint:o,region:/^[a-zA-Z0-9\-_]+$/};function o(e){return"string"==typeof e?/^[a-zA-Z0-9._:/-]+$/.test(e):!!e.host&&/^[a-zA-Z0-9._:/-]+$/.test(e.host)}n.checkConfigValid=function(e,t){if(r[t]&&!(r[t]instanceof Function?r[t](e):r[t].test(e)))throw new Error("The ".concat(t," must be conform to the specifications"))}},{"core-js/modules/es.regexp.exec.js":300}],53:[function(e,t,n){(function(e){(function(){"use strict";function t(t){e.browser&&console.warn(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.checkEnv=void 0,n.checkEnv=t}).call(this)}).call(this,e("_process"))},{_process:467}],54:[function(e,t,n){"use strict";e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.object.entries.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),Object.defineProperty(n,"__esModule",{value:!0}),n.checkObjectTag=void 0;var r=e("./checkValid").checkValid,o=e("./isObject").isObject,i=[{validator:function(e){if("string"!=typeof e)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 (/)"}],a={key:[].concat(i,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(i,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function s(e){if(!o(e))throw new Error("tag must be Object");var t=Object.entries(e);if(t.length>10)throw new Error("maximum of 10 tags for a object");var n=["key","value"];t.forEach((function(e){e.forEach((function(e,t){r(e,a[n[t]])}))}))}n.checkObjectTag=s},{"./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(e,t,n){"use strict";function r(e,t){t.forEach((function(t){if(t.validator)t.validator(e);else if(t.pattern&&!t.pattern.test(e))throw new Error(t.msg)}))}e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.regexp.exec.js"),Object.defineProperty(n,"__esModule",{value:!0}),n.checkValid=void 0,n.checkValid=r},{"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(e,t,n){(function(t){(function(){"use strict";e("core-js/modules/es.array.includes.js"),e("core-js/modules/es.string.includes.js"),e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.array.concat.js"),Object.defineProperty(n,"__esModule",{value:!0}),n.createRequest=void 0;var r=e("./../../../shims/crypto/crypto.js"),o=e("debug")("ali-oss"),i=e("mime"),a=e("dateformat"),s=e("copy-to"),u=e("path"),c=e("./encoder").encoder,l=e("./isIP").isIP,f=e("./setRegion").setRegion,p=e("../client/getReqUrl").getReqUrl,h=e("./isDingTalk").isDingTalk;function d(e,t){return e[t]||e[t.toLowerCase()]}function m(e,t){delete e[t],delete e[t.toLowerCase()]}function g(e){var n=new Date;this.options.amendTimeSkewed&&(n=+new Date+this.options.amendTimeSkewed);var g={"x-oss-date":a(n,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'")};"undefined"!=typeof window&&(g["x-oss-user-agent"]=this.userAgent),this.userAgent.includes("nodejs")&&(g["User-Agent"]=this.userAgent),this.options.isRequestPay&&Object.assign(g,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(g["x-oss-security-token"]=this.options.stsToken),s(e.headers).to(g),d(g,"Content-Type")||(e.mime&&e.mime.indexOf("/")>0?g["Content-Type"]=e.mime:h()?g["Content-Type"]="application/octet-stream":g["Content-Type"]=i.getType(e.mime||u.extname(e.object||""))),d(g,"Content-Type")||m(g,"Content-Type"),e.content&&(e.disabledMD5||(e.headers&&e.headers["Content-MD5"]?g["Content-MD5"]=e.headers["Content-MD5"]:g["Content-MD5"]=r.createHash("md5").update(t.from(e.content,"utf8")).digest("base64")),g["Content-Length"]||(g["Content-Length"]=e.content.length));var v=Object.prototype.hasOwnProperty;for(var y in g)g[y]&&v.call(g,y)&&(g[y]=c(String(g[y]),this.options.headerEncoding));var b=this._getResource(e);if(g.authorization=this.authorization(e.method,b,e.subres,g,this.options.headerEncoding),l(this.options.endpoint.hostname)){var w=this.options,x=w.region,A=w.internal,E=w.secure,C=f(x,A,E);g.host="".concat(e.bucket,".").concat(C.host)}var k=p.bind(this)(e);o("request %s %s, with headers %j, !!stream: %s",e.method,k,g,!!e.stream);var I=e.timeout||this.options.timeout,S={method:e.method,content:e.content,stream:e.stream,headers:g,timeout:I,writeStream:e.writeStream,customResponse:e.customResponse,ctx:e.ctx||this.ctx};return this.agent&&(S.agent=this.agent),this.httpsAgent&&(S.httpsAgent=this.httpsAgent),S.enableProxy=!!this.options.enableProxy,S.proxy=this.options.proxy?this.options.proxy:null,{url:k,params:S}}n.createRequest=g}).call(this)}).call(this,e("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(e,t,n){"use strict";e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.entries.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),e("core-js/modules/es.array.includes.js"),e("core-js/modules/es.object.keys.js"),Object.defineProperty(n,"__esModule",{value:!0}),n.dataFix=void 0;var r=e("./isObject"),o=["true","TRUE","1",1],i=["false","FALSE","0",0];function a(e,t,n){if(r.isObject(e)){var o=t.remove,i=void 0===o?[]:o,c=t.rename,l=void 0===c?{}:c,f=t.camel,p=void 0===f?[]:f,h=t.bool,d=void 0===h?[]:h,m=t.lowerFirst,g=void 0!==m&&m;return i.forEach((function(t){return delete e[t]})),Object.entries(l).forEach((function(t){e[t[0]]&&(e[t[1]]||(e[t[1]]=e[t[0]],delete e[t[0]]))})),p.forEach((function(t){if(e[t]){var n=t.replace(/^(.)/,(function(e){return e.toLowerCase()})).replace(/-(\w)/g,(function(e,t){return t.toUpperCase()}));e[n]||(e[n]=e[t])}})),d.forEach((function(t){e[t]=s(e[t])})),"function"==typeof n&&n(e),u(e,g),a}}function s(e){return!!e&&(!!o.includes(e)||!i.includes(e)&&e)}function u(e,t){t&&Object.keys(e).forEach((function(t){var n=t.replace(/^\w/,(function(e){return e.toLowerCase()}));void 0===e[n]&&(e[n]=e[t],delete e[t])}))}n.dataFix=a},{"./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(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");e("core-js/modules/es.array.slice.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js");var o=r(e("@babel/runtime/helpers/typeof"));Object.defineProperty(n,"__esModule",{value:!0}),n.deepCopyWith=n.deepCopy=void 0;var i=e("./isBuffer");n.deepCopy=function(e){if(null===e||"object"!==(0,o.default)(e))return e;if(i.isBuffer(e))return e.slice();var t=Array.isArray(e)?[]:{};return Object.keys(e).forEach((function(r){t[r]=n.deepCopy(e[r])})),t},n.deepCopyWith=function(e,t){function r(e,n,a){var s=t(e,n,a);if(void 0!==s)return s;if(null===e||"object"!==(0,o.default)(e))return e;if(i.isBuffer(e))return e.slice();var u=Array.isArray(e)?[]:{};return Object.keys(e).forEach((function(t){u[t]=r(e[t],t,e)})),u}return t?r(e,"",null):n.deepCopy(e)}},{"./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(e,t,n){(function(t){(function(){"use strict";function r(e){return"utf-8"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf-8")?e:t.from(e).toString("latin1")}e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(n,"__esModule",{value:!0}),n.encoder=void 0,n.encoder=r}).call(this)}).call(this,e("buffer").Buffer)},{buffer:90,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],60:[function(e,t,n){"use strict";e("core-js/modules/es.array.map.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),Object.defineProperty(n,"__esModule",{value:!0}),n.formatInventoryConfig=void 0;var r=e("../utils/dataFix"),o=e("../utils/isObject"),i=e("../utils/isArray"),a=e("../utils/formatObjKey");function s(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&o.isObject(e)&&(e=[e]),e=i.isArray(e)?e.map(u):u(e)}function u(e){return r.dataFix(e,{bool:["IsEnabled"]},(function(e){var t,n;e.prefix=e.Filter.Prefix,delete e.Filter,e.OSSBucketDestination=e.Destination.OSSBucketDestination,e.OSSBucketDestination.rolename=e.OSSBucketDestination.RoleArn.replace(/.*\//,""),delete e.OSSBucketDestination.RoleArn,e.OSSBucketDestination.bucket=e.OSSBucketDestination.Bucket.replace(/.*:::/,""),delete e.OSSBucketDestination.Bucket,delete e.Destination,e.frequency=e.Schedule.Frequency,delete e.Schedule.Frequency,(null===(t=null==e?void 0:e.OptionalFields)||void 0===t?void 0:t.Field)&&!i.isArray(null===(n=e.OptionalFields)||void 0===n?void 0:n.Field)&&(e.OptionalFields.Field=[e.OptionalFields.Field])})),e=a.formatObjKey(e,"firstLowerCase",{exclude:["OSSBucketDestination","SSE-OSS","SSE-KMS"]})}n.formatInventoryConfig=s},{"../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(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.array.includes.js"),e("core-js/modules/es.string.includes.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js");var o=r(e("@babel/runtime/helpers/typeof"));function i(e,t,n){if(null===e||"object"!==(0,o.default)(e))return e;var r;if(Array.isArray(e)){r=[];for(var s=0;s<e.length;s++)r.push(i(e[s],t,n))}else r={},Object.keys(e).forEach((function(o){r[a(o,t,n)]=i(e[o],t,n)}));return r}function a(e,t,n){return n&&n.exclude&&n.exclude.includes(e)||("firstUpperCase"===t?e=e.replace(/^./,(function(e){return e.toUpperCase()})):"firstLowerCase"===t&&(e=e.replace(/^./,(function(e){return e.toLowerCase()})))),e}Object.defineProperty(n,"__esModule",{value:!0}),n.formatObjKey=void 0,n.formatObjKey=i},{"@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(e,t,n){"use strict";function r(e){for(var t=0,n=0;n<e.length;n++){var r=e.charAt(n);/^[\u00-\uff]$/.test(r)?t+=1:t+=2}return t}e("core-js/modules/es.regexp.exec.js"),Object.defineProperty(n,"__esModule",{value:!0}),n.getStrBytesCount=void 0,n.getStrBytesCount=r},{"core-js/modules/es.regexp.exec.js":300}],63:[function(e,t,n){"use strict";e("core-js/modules/es.object.to-string.js"),Object.defineProperty(n,"__esModule",{value:!0}),n.isArray=void 0,n.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{"core-js/modules/es.object.to-string.js":291}],64:[function(e,t,n){"use strict";function r(e){return"undefined"!=typeof Blob&&e instanceof Blob}Object.defineProperty(n,"__esModule",{value:!0}),n.isBlob=void 0,n.isBlob=r},{}],65:[function(e,t,n){(function(e){(function(){"use strict";function t(t){return e.isBuffer(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.isBuffer=void 0,n.isBuffer=t}).call(this)}).call(this,{isBuffer:e("../../../node_modules/is-buffer/index.js")})},{"../../../node_modules/is-buffer/index.js":366}],66:[function(e,t,n){(function(t){(function(){"use strict";function r(){return!(!t.browser||!window.navigator.userAgent.toLowerCase().includes("aliapp(dingtalk"))}e("core-js/modules/es.array.includes.js"),e("core-js/modules/es.string.includes.js"),Object.defineProperty(n,"__esModule",{value:!0}),n.isDingTalk=void 0,n.isDingTalk=r}).call(this)}).call(this,e("_process"))},{_process:467,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.string.includes.js":302}],67:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isFile=void 0,n.isFile=function(e){return"undefined"!=typeof File&&e instanceof File}},{}],68:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isFunction=void 0,n.isFunction=function(e){return"function"==typeof e}},{}],69:[function(e,t,n){"use strict";e("core-js/modules/es.regexp.exec.js"),Object.defineProperty(n,"__esModule",{value:!0}),n.isIP=void 0,n.isIP=function(e){var t=/^\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/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/.test(e)||t.test(e)}},{"core-js/modules/es.regexp.exec.js":300}],70:[function(e,t,n){"use strict";e("core-js/modules/es.object.to-string.js"),Object.defineProperty(n,"__esModule",{value:!0}),n.isObject=void 0,n.isObject=function(e){return"[object Object]"===Object.prototype.toString.call(e)}},{"core-js/modules/es.object.to-string.js":291}],71:[function(e,t,n){"use strict";e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js"),Object.defineProperty(n,"__esModule",{value:!0}),n.lowercaseKeyHeader=void 0;var r=e("./isObject");function o(e){var t={};return r.isObject(e)&&Object.keys(e).forEach((function(n){t[n.toLowerCase()]=e[n]})),t}n.lowercaseKeyHeader=o},{"./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(e,t,n){"use strict";e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.array.join.js"),e("core-js/modules/es.array.map.js"),e("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(n,"__esModule",{value:!0}),n.obj2xml=void 0;var r=e("./formatObjKey");function o(e){return Object.prototype.toString.call(e).replace(/(.*? |])/g,"").toLowerCase()}function i(e,t){var n="";return t&&t.headers&&(n='<?xml version="1.0" encoding="UTF-8"?>\n'),t&&t.firstUpperCase&&(e=r.formatObjKey(e,"firstUpperCase")),"object"===o(e)?Object.keys(e).forEach((function(t){"undefined"!==o(e[t])&&"null"!==o(e[t])&&("string"===o(e[t])||"number"===o(e[t])?n+="<".concat(t,">").concat(e[t],"</").concat(t,">"):"object"===o(e[t])?n+="<".concat(t,">").concat(i(e[t]),"</").concat(t,">"):"array"===o(e[t])?n+=e[t].map((function(e){return"<".concat(t,">").concat(i(e),"</").concat(t,">")})).join(""):n+="<".concat(t,">").concat(e[t].toString(),"</").concat(t,">"))})):n+=e.toString(),n}n.obj2xml=i},{"./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(e,t,n){"use strict";function r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=o(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function o(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t){var n,o=Object.assign({},e),i=r(t);try{for(i.s();!(n=i.n()).done;)delete o[n.value]}catch(e){i.e(e)}finally{i.f()}return o}e("core-js/modules/es.array.slice.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.function.name.js"),e("core-js/modules/es.array.from.js"),e("core-js/modules/es.string.iterator.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.symbol.js"),e("core-js/modules/es.symbol.description.js"),e("core-js/modules/es.symbol.iterator.js"),e("core-js/modules/es.array.iterator.js"),e("core-js/modules/web.dom-collections.iterator.js"),e("core-js/modules/es.object.assign.js"),Object.defineProperty(n,"__esModule",{value:!0}),n.omit=void 0,n.omit=a},{"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(e,t,n){"use strict";function r(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=0,o=n.retryDelay,i=void 0===o?500:o,a=n.errorHandler,s=void 0===a?function(){return!0}:a,u=function n(){for(var o=arguments.length,a=new Array(o),u=0;u<o;u++)a[u]=arguments[u];return new Promise((function(o,u){e.apply(void 0,a).then((function(e){r=0,o(e)})).catch((function(e){r<t&&s(e)?(r++,setTimeout((function(){o(n.apply(void 0,a))}),i)):(r=0,u(e))}))}))};return u}e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.promise.js"),Object.defineProperty(n,"__esModule",{value:!0}),n.retry=void 0,n.retry=r},{"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295}],75:[function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.setRegion=void 0;var o=r(e("url")),i=e("./checkConfigValid");function a(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];i.checkConfigValid(e,"region");var r=n?"https://":"http://",a=t?"-internal.aliyuncs.com":".aliyuncs.com",s="vpc100-oss-cn-";return e.substr(0,s.length)===s&&(a=".aliyuncs.com"),o.default.parse(r+e+a)}n.setRegion=a},{"./checkConfigValid":52,url:472}],76:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault"),o=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.array.find.js"),e("core-js/modules/es.object.assign.js");var i=r(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(n,"__esModule",{value:!0}),n.checkCredentials=n.setSTSToken=void 0;var a=e("./formatObjKey");function s(){return u.apply(this,arguments)}function u(){return(u=(0,i.default)(o.default.mark((function e(){var t,n;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.options||(this.options={}),t=new Date,!this.stsTokenFreshTime){e.next=14;break}if(!(+t-this.stsTokenFreshTime>=this.options.refreshSTSTokenInterval)){e.next=12;break}return this.stsTokenFreshTime=t,e.next=7,this.options.refreshSTSToken();case 7:n=e.sent,(n=a.formatObjKey(n,"firstLowerCase")).securityToken&&(n.stsToken=n.securityToken),c(n),Object.assign(this.options,n);case 12:e.next=15;break;case 14:this.stsTokenFreshTime=t;case 15:return e.abrupt("return",null);case 16:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}function c(e){var t=["accessKeySecret","accessKeyId","stsToken"],n=Object.keys(e);t.forEach((function(e){if(!n.find((function(t){return t===e})))throw Error("refreshSTSToken must return contains ".concat(e))}))}n.setSTSToken=s,n.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(e,t,n){function r(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var a=e.apply(t,n);function s(e){r(a,o,i,s,u,"next",e)}function u(e){r(a,o,i,s,u,"throw",e)}s(void 0)}))}}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},{}],78:[function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},{}],79:[function(e,t,n){function r(e){return t.exports=r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t.exports.__esModule=!0,t.exports.default=t.exports,r(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},{}],80:[function(e,t,n){t.exports=e("regenerator-runtime")},{"regenerator-runtime":395}],81:[function(e,t,n){function r(){}t.exports=r,t.exports.HttpsAgent=r},{}],82:[function(e,n,r){(function(t){(function(){"use strict";var r=e("object-assign");function o(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0}function i(e){return t.Buffer&&"function"==typeof t.Buffer.isBuffer?t.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}var a=e("util/"),s=Object.prototype.hasOwnProperty,u=Array.prototype.slice,c="foo"===function(){}.name;function l(e){return Object.prototype.toString.call(e)}function f(e){return!i(e)&&"function"==typeof t.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer)))}var p=n.exports=b,h=/\s*function\s+([^\(\s]*)\s*/;function d(e){if(a.isFunction(e)){if(c)return e.name;var t=e.toString().match(h);return t&&t[1]}}function m(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function g(e){if(c||!a.isFunction(e))return a.inspect(e);var t=d(e);return"[Function"+(t?": "+t:"")+"]"}function v(e){return m(g(e.actual),128)+" "+e.operator+" "+m(g(e.expected),128)}function y(e,t,n,r,o){throw new p.AssertionError({message:n,actual:e,expected:t,operator:r,stackStartFunction:o})}function b(e,t){e||y(e,!0,t,"==",p.ok)}function w(e,t,n,r){if(e===t)return!0;if(i(e)&&i(t))return 0===o(e,t);if(a.isDate(e)&&a.isDate(t))return e.getTime()===t.getTime();if(a.isRegExp(e)&&a.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(f(e)&&f(t)&&l(e)===l(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===o(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(i(e)!==i(t))return!1;var s=(r=r||{actual:[],expected:[]}).actual.indexOf(e);return-1!==s&&s===r.expected.indexOf(t)||(r.actual.push(e),r.expected.push(t),A(e,t,n,r))}return n?e===t:e==t}function x(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function A(e,t,n,r){if(null==e||null==t)return!1;if(a.isPrimitive(e)||a.isPrimitive(t))return e===t;if(n&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var o=x(e),i=x(t);if(o&&!i||!o&&i)return!1;if(o)return w(e=u.call(e),t=u.call(t),n);var s,c,l=j(e),f=j(t);if(l.length!==f.length)return!1;for(l.sort(),f.sort(),c=l.length-1;c>=0;c--)if(l[c]!==f[c])return!1;for(c=l.length-1;c>=0;c--)if(!w(e[s=l[c]],t[s],n,r))return!1;return!0}function E(e,t,n){w(e,t,!0)&&y(e,t,n,"notDeepStrictEqual",E)}function C(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function k(e){var t;try{e()}catch(e){t=e}return t}function I(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=k(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&y(o,n,"Missing expected exception"+r);var i="string"==typeof r,s=!e&&o&&!n;if((!e&&a.isError(o)&&i&&C(o,n)||s)&&y(o,n,"Got unwanted exception"+r),e&&o&&n&&!C(o,n)||!e&&o)throw o}function S(e,t){e||y(e,!0,t,"==",S)}p.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=v(this),this.generatedMessage=!0);var t=e.stackStartFunction||y;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,o=d(t),i=r.indexOf("\n"+o);if(i>=0){var a=r.indexOf("\n",i+1);r=r.substring(a+1)}this.stack=r}}},a.inherits(p.AssertionError,Error),p.fail=y,p.ok=b,p.equal=function(e,t,n){e!=t&&y(e,t,n,"==",p.equal)},p.notEqual=function(e,t,n){e==t&&y(e,t,n,"!=",p.notEqual)},p.deepEqual=function(e,t,n){w(e,t,!1)||y(e,t,n,"deepEqual",p.deepEqual)},p.deepStrictEqual=function(e,t,n){w(e,t,!0)||y(e,t,n,"deepStrictEqual",p.deepStrictEqual)},p.notDeepEqual=function(e,t,n){w(e,t,!1)&&y(e,t,n,"notDeepEqual",p.notDeepEqual)},p.notDeepStrictEqual=E,p.strictEqual=function(e,t,n){e!==t&&y(e,t,n,"===",p.strictEqual)},p.notStrictEqual=function(e,t,n){e===t&&y(e,t,n,"!==",p.notStrictEqual)},p.throws=function(e,t,n){I(!0,e,t,n)},p.doesNotThrow=function(e,t,n){I(!1,e,t,n)},p.ifError=function(e){if(e)throw e},p.strict=r(S,p,{equal:p.strictEqual,deepEqual:p.deepStrictEqual,notEqual:p.notStrictEqual,notDeepEqual:p.notDeepStrictEqual}),p.strict.strict=p.strict;var j=Object.keys||function(e){var t=[];for(var n in e)s.call(e,n)&&t.push(n);return t}}).call(this)}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"object-assign":377,"util/":85}],83:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],84:[function(e,t,n){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],85:[function(e,n,r){(function(t,n){(function(){var o=/%[sdj%]/g;r.format=function(e){if(!A(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(s(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,i=r.length,a=String(e).replace(o,(function(e){if("%%"===e)return"%";if(n>=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),u=r[n];n<i;u=r[++n])b(u)||!I(u)?a+=" "+u:a+=" "+s(u);return a},r.deprecate=function(e,o){if(C(n.process))return function(){return r.deprecate(e,o).apply(this,arguments)};if(!0===t.noDeprecation)return e;var i=!1;function a(){if(!i){if(t.throwDeprecation)throw new Error(o);t.traceDeprecation?console.trace(o):console.error(o),i=!0}return e.apply(this,arguments)}return a};var i,a={};function s(e,t){var n={seen:[],stylize:c};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),y(t)?n.showHidden=t:t&&r._extend(n,t),C(n.showHidden)&&(n.showHidden=!1),C(n.depth)&&(n.depth=2),C(n.colors)&&(n.colors=!1),C(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),f(n,e,n.depth)}function u(e,t){var n=s.styles[t];return n?"["+s.colors[n][0]+"m"+e+"["+s.colors[n][1]+"m":e}function c(e,t){return e}function l(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}function f(e,t,n){if(e.customInspect&&t&&T(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var o=t.inspect(n,e);return A(o)||(o=f(e,o,n)),o}var i=p(e,t);if(i)return i;var a=Object.keys(t),s=l(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),j(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return h(t);if(0===a.length){if(T(t)){var u=t.name?": "+t.name:"";return e.stylize("[Function"+u+"]","special")}if(k(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(S(t))return e.stylize(Date.prototype.toString.call(t),"date");if(j(t))return h(t)}var c,y="",b=!1,w=["{","}"];return v(t)&&(b=!0,w=["[","]"]),T(t)&&(y=" [Function"+(t.name?": "+t.name:"")+"]"),k(t)&&(y=" "+RegExp.prototype.toString.call(t)),S(t)&&(y=" "+Date.prototype.toUTCString.call(t)),j(t)&&(y=" "+h(t)),0!==a.length||b&&0!=t.length?n<0?k(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),c=b?d(e,t,n,s,a):a.map((function(r){return m(e,t,n,s,r,b)})),e.seen.pop(),g(c,y,w)):w[0]+y+w[1]}function p(e,t){if(C(t))return e.stylize("undefined","undefined");if(A(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return x(t)?e.stylize(""+t,"number"):y(t)?e.stylize(""+t,"boolean"):b(t)?e.stylize("null","null"):void 0}function h(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,n,r,o){for(var i=[],a=0,s=t.length;a<s;++a)N(t,String(a))?i.push(m(e,t,n,r,String(a),!0)):i.push("");return o.forEach((function(o){o.match(/^\d+$/)||i.push(m(e,t,n,r,o,!0))})),i}function m(e,t,n,r,o,i){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),N(r,o)||(a="["+o+"]"),s||(e.seen.indexOf(u.value)<0?(s=b(n)?f(e,u.value,null):f(e,u.value,n-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),C(a)){if(i&&o.match(/^\d+$/))return s;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function g(e,t,n){return e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function v(e){return Array.isArray(e)}function y(e){return"boolean"==typeof e}function b(e){return null===e}function w(e){return null==e}function x(e){return"number"==typeof e}function A(e){return"string"==typeof e}function E(e){return"symbol"==typeof e}function C(e){return void 0===e}function k(e){return I(e)&&"[object RegExp]"===O(e)}function I(e){return"object"==typeof e&&null!==e}function S(e){return I(e)&&"[object Date]"===O(e)}function j(e){return I(e)&&("[object Error]"===O(e)||e instanceof Error)}function T(e){return"function"==typeof e}function R(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function O(e){return Object.prototype.toString.call(e)}function D(e){return e<10?"0"+e.toString(10):e.toString(10)}r.debuglog=function(e){if(C(i)&&(i=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!a[e])if(new RegExp("\\b"+e+"\\b","i").test(i)){var n=t.pid;a[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else a[e]=function(){};return a[e]},r.inspect=s,s.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]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=v,r.isBoolean=y,r.isNull=b,r.isNullOrUndefined=w,r.isNumber=x,r.isString=A,r.isSymbol=E,r.isUndefined=C,r.isRegExp=k,r.isObject=I,r.isDate=S,r.isError=j,r.isFunction=T,r.isPrimitive=R,r.isBuffer=e("./support/isBuffer");var B=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function _(){var e=new Date,t=[D(e.getHours()),D(e.getMinutes()),D(e.getSeconds())].join(":");return[e.getDate(),B[e.getMonth()],t].join(" ")}function N(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r.log=function(){console.log("%s - %s",_(),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!I(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this)}).call(this,e("_process"),void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":84,_process:467,inherits:83}],86:[function(e,n,r){(function(e){(function(){"use strict";var t=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],r="undefined"==typeof globalThis?e:globalThis;n.exports=function(){for(var e=[],n=0;n<t.length;n++)"function"==typeof r[t[n]]&&(e[e.length]=t[n]);return e}}).call(this)}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],87:[function(e,t,n){"use strict";n.byteLength=l,n.toByteArray=p,n.fromByteArray=m;for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)r[s]=a[s],o[a.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r}function f(e,t,n){return 3*(t+n)/4-n}function p(e){var t,n,r=c(e),a=r[0],s=r[1],u=new i(f(e,a,s)),l=0,p=s>0?a-4:a;for(n=0;n<p;n+=4)t=o[e.charCodeAt(n)]<<18|o[e.charCodeAt(n+1)]<<12|o[e.charCodeAt(n+2)]<<6|o[e.charCodeAt(n+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===s&&(t=o[e.charCodeAt(n)]<<2|o[e.charCodeAt(n+1)]>>4,u[l++]=255&t),1===s&&(t=o[e.charCodeAt(n)]<<10|o[e.charCodeAt(n+1)]<<4|o[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u}function h(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function d(e,t,n){for(var r,o=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(h(r));return o.join("")}function m(e){for(var t,n=e.length,o=n%3,i=[],a=16383,s=0,u=n-o;s<u;s+=a)i.push(d(e,s,s+a>u?u:s+a));return 1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),i.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},{}],88:[function(e,t,r){var o,i,a;o=this,i="bowser",a=function(){var e=!0;function t(t){function n(e){var n=t.match(e);return n&&n.length>1&&n[1]||""}function r(e){var n=t.match(e);return n&&n.length>1&&n[2]||""}var o,a=n(/(ipod|iphone|ipad)/i).toLowerCase(),s=!/like android/i.test(t)&&/android/i.test(t),u=/nexus\s*[0-6]\s*/i.test(t),c=!u&&/nexus\s*[0-9]+/i.test(t),l=/CrOS/.test(t),f=/silk/i.test(t),p=/sailfish/i.test(t),h=/tizen/i.test(t),d=/(web|hpw)(o|0)s/i.test(t),m=/windows phone/i.test(t),g=(/SamsungBrowser/i.test(t),!m&&/windows/i.test(t)),v=!a&&!f&&/macintosh/i.test(t),y=!s&&!p&&!h&&!d&&/linux/i.test(t),b=r(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),w=n(/version\/(\d+(\.\d+)?)/i),x=/tablet/i.test(t)&&!/tablet pc/i.test(t),A=!x&&/[^-]mobi/i.test(t),E=/xbox/i.test(t);function C(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";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}}/opera/i.test(t)?o={name:"Opera",opera:e,version:w||n(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(t)?o={name:"Opera",opera:e,version:n(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||w}:/SamsungBrowser/i.test(t)?o={name:"Samsung Internet for Android",samsungBrowser:e,version:w||n(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(t)?o={name:"NAVER Whale browser",whale:e,version:n(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(t)?o={name:"MZ Browser",mzbrowser:e,version:n(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(t)?o={name:"Opera Coast",coast:e,version:w||n(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(t)?o={name:"Focus",focus:e,version:n(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(t)?o={name:"Yandex Browser",yandexbrowser:e,version:w||n(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(t)?o={name:"UC Browser",ucbrowser:e,version:n(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(t)?o={name:"Maxthon",maxthon:e,version:n(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(t)?o={name:"Epiphany",epiphany:e,version:n(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(t)?o={name:"Puffin",puffin:e,version:n(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(t)?o={name:"Sleipnir",sleipnir:e,version:n(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(t)?o={name:"K-Meleon",kMeleon:e,version:n(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:m?(o={name:"Windows Phone",osname:"Windows Phone",windowsphone:e},b?(o.msedge=e,o.version=b):(o.msie=e,o.version=n(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(t)?o={name:"Internet Explorer",msie:e,version:n(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:l?o={name:"Chrome",osname:"Chrome OS",chromeos:e,chromeBook:e,chrome:e,version:n(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(t)?o={name:"Microsoft Edge",msedge:e,version:b}:/vivaldi/i.test(t)?o={name:"Vivaldi",vivaldi:e,version:n(/vivaldi\/(\d+(\.\d+)?)/i)||w}:p?o={name:"Sailfish",osname:"Sailfish OS",sailfish:e,version:n(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(t)?o={name:"SeaMonkey",seamonkey:e,version:n(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(t)?(o={name:"Firefox",firefox:e,version:n(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(t)&&(o.firefoxos=e,o.osname="Firefox OS")):f?o={name:"Amazon Silk",silk:e,version:n(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(t)?o={name:"PhantomJS",phantom:e,version:n(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(t)?o={name:"SlimerJS",slimer:e,version:n(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(t)||/rim\stablet/i.test(t)?o={name:"BlackBerry",osname:"BlackBerry OS",blackberry:e,version:w||n(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:d?(o={name:"WebOS",osname:"WebOS",webos:e,version:w||n(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(t)&&(o.touchpad=e)):/bada/i.test(t)?o={name:"Bada",osname:"Bada",bada:e,version:n(/dolfin\/(\d+(\.\d+)?)/i)}:h?o={name:"Tizen",osname:"Tizen",tizen:e,version:n(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||w}:/qupzilla/i.test(t)?o={name:"QupZilla",qupzilla:e,version:n(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||w}:/chromium/i.test(t)?o={name:"Chromium",chromium:e,version:n(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||w}:/chrome|crios|crmo/i.test(t)?o={name:"Chrome",chrome:e,version:n(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:s?o={name:"Android",version:w}:/safari|applewebkit/i.test(t)?(o={name:"Safari",safari:e},w&&(o.version=w)):a?(o={name:"iphone"==a?"iPhone":"ipad"==a?"iPad":"iPod"},w&&(o.version=w)):o=/googlebot/i.test(t)?{name:"Googlebot",googlebot:e,version:n(/googlebot\/(\d+(\.\d+))/i)||w}:{name:n(/^(.*)\/(.*) /),version:r(/^(.*)\/(.*) /)},!o.msedge&&/(apple)?webkit/i.test(t)?(/(apple)?webkit\/537\.36/i.test(t)?(o.name=o.name||"Blink",o.blink=e):(o.name=o.name||"Webkit",o.webkit=e),!o.version&&w&&(o.version=w)):!o.opera&&/gecko\//i.test(t)&&(o.name=o.name||"Gecko",o.gecko=e,o.version=o.version||n(/gecko\/(\d+(\.\d+)?)/i)),o.windowsphone||!s&&!o.silk?!o.windowsphone&&a?(o[a]=e,o.ios=e,o.osname="iOS"):v?(o.mac=e,o.osname="macOS"):E?(o.xbox=e,o.osname="Xbox"):g?(o.windows=e,o.osname="Windows"):y&&(o.linux=e,o.osname="Linux"):(o.android=e,o.osname="Android");var k="";o.windows?k=C(n(/Windows ((NT|XP)( \d\d?.\d)?)/i)):o.windowsphone?k=n(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):o.mac?k=(k=n(/Mac OS X (\d+([_\.\s]\d+)*)/i)).replace(/[_\s]/g,"."):a?k=(k=n(/os (\d+([_\s]\d+)*) like mac os x/i)).replace(/[_\s]/g,"."):s?k=n(/android[ \/-](\d+(\.\d+)*)/i):o.webos?k=n(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):o.blackberry?k=n(/rim\stablet\sos\s(\d+(\.\d+)*)/i):o.bada?k=n(/bada\/(\d+(\.\d+)*)/i):o.tizen&&(k=n(/tizen[\/\s](\d+(\.\d+)*)/i)),k&&(o.osversion=k);var I=!o.windows&&k.split(".")[0];return x||c||"ipad"==a||s&&(3==I||I>=4&&!A)||o.silk?o.tablet=e:(A||"iphone"==a||"ipod"==a||s||u||o.blackberry||o.webos||o.bada)&&(o.mobile=e),o.msedge||o.msie&&o.version>=10||o.yandexbrowser&&o.version>=15||o.vivaldi&&o.version>=1||o.chrome&&o.version>=20||o.samsungBrowser&&o.version>=4||o.whale&&1===i([o.version,"1.0"])||o.mzbrowser&&1===i([o.version,"6.0"])||o.focus&&1===i([o.version,"1.0"])||o.firefox&&o.version>=20||o.safari&&o.version>=6||o.opera&&o.version>=10||o.ios&&o.osversion&&o.osversion.split(".")[0]>=6||o.blackberry&&o.version>=10.1||o.chromium&&o.version>=20?o.a=e:o.msie&&o.version<10||o.chrome&&o.version<20||o.firefox&&o.version<20||o.safari&&o.version<6||o.opera&&o.version<10||o.ios&&o.osversion&&o.osversion.split(".")[0]<6||o.chromium&&o.version<20?o.c=e:o.x=e,o}var n=t("undefined"!=typeof navigator&&navigator.userAgent||"");function r(e){return e.split(".").length}function o(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n++)r.push(t(e[n]));return r}function i(e){for(var t=Math.max(r(e[0]),r(e[1])),n=o(e,(function(e){var n=t-r(e);return o((e+=new Array(n+1).join(".0")).split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));--t>=0;){if(n[0][t]>n[1][t])return 1;if(n[0][t]!==n[1][t])return-1;if(0===t)return 0}}function a(e,r,o){var a=n;"string"==typeof r&&(o=r,r=void 0),void 0===r&&(r=!1),o&&(a=t(o));var s=""+a.version;for(var u in e)if(e.hasOwnProperty(u)&&a[u]){if("string"!=typeof e[u])throw new Error("Browser version in the minVersion map should be a string: "+u+": "+String(e));return i([s,e[u]])<0}return r}function s(e,t,n){return!a(e,t,n)}return n.test=function(e){for(var t=0;t<e.length;++t){var r=e[t];if("string"==typeof r&&r in n)return!0}return!1},n.isUnsupportedBrowser=a,n.compareVersions=i,n.check=s,n._detect=t,n.detect=t,n},void 0!==t&&t.exports?t.exports=a():"function"==typeof n&&n.amd?n(i,a):o[i]=a()},{}],89:[function(e,t,n){},{}],90:[function(e,t,n){(function(t){(function(){"use strict";var t=e("base64-js"),r=e("ieee754");n.Buffer=s,n.SlowBuffer=v,n.INSPECT_MAX_BYTES=50;var o=2147483647;function i(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}function a(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=s.prototype,t}function s(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return u(e,t,n)}function u(e,t,n){if("string"==typeof e)return p(e,t);if(ArrayBuffer.isView(e))return h(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(K(e,ArrayBuffer)||e&&K(e.buffer,ArrayBuffer))return d(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return s.from(r,t,n);var o=m(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function l(e,t,n){return c(e),e<=0?a(e):void 0!==t?"string"==typeof n?a(e).fill(t,n):a(e).fill(t):a(e)}function f(e){return c(e),a(e<0?0:0|g(e))}function p(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!s.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|y(e,t),r=a(n),o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function h(e){for(var t=e.length<0?0:0|g(e.length),n=a(t),r=0;r<t;r+=1)n[r]=255&e[r];return n}function d(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');var r;return(r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n)).__proto__=s.prototype,r}function m(e){if(s.isBuffer(e)){var t=0|g(e.length),n=a(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||J(e.length)?a(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}function g(e){if(e>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function v(e){return+e!=e&&(e=0),s.alloc(+e)}function y(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||K(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return X(e).length;default:if(o)return r?-1:V(e).length;t=(""+t).toLowerCase(),o=!0}}function b(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return N(this,t,n);case"utf8":case"utf-8":return R(this,t,n);case"ascii":return B(this,t,n);case"latin1":case"binary":return _(this,t,n);case"base64":return T(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function w(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function x(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),J(n=+n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:A(e,t,n,r,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):A(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function A(e,t,n,r,o){var i,a=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var l=-1;for(i=n;i<s;i++)if(c(e,i)===c(t,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===u)return l*a}else-1!==l&&(i-=i-l),l=-1}else for(n+u>s&&(n=s-u),i=n;i>=0;i--){for(var f=!0,p=0;p<u;p++)if(c(e,i+p)!==c(t,p)){f=!1;break}if(f)return i}return-1}function E(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=t.length;r>i/2&&(r=i/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(J(s))return a;e[n+a]=s}return a}function C(e,t,n,r){return Z(V(t,e.length-n),e,n,r)}function k(e,t,n,r){return Z(H(t),e,n,r)}function I(e,t,n,r){return k(e,t,n,r)}function S(e,t,n,r){return Z(X(t),e,n,r)}function j(e,t,n,r){return Z(G(t,e.length-n),e,n,r)}function T(e,n,r){return 0===n&&r===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(n,r))}function R(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var i,a,s,u,c=e[o],l=null,f=c>239?4:c>223?3:c>191?2:1;if(o+f<=n)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(i=e[o+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(u=(15&c)<<12|(63&i)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}return D(r)}n.kMaxLength=o,s.TYPED_ARRAY_SUPPORT=i(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||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."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),s.poolSize=8192,s.from=function(e,t,n){return u(e,t,n)},s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,s.alloc=function(e,t,n){return l(e,t,n)},s.allocUnsafe=function(e){return f(e)},s.allocUnsafeSlow=function(e){return f(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(K(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),K(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},s.isEncoding=function(e){switch(String(e).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}},s.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=s.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var i=e[n];if(K(i,Uint8Array)&&(i=s.from(i)),!s.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(r,o),o+=i.length}return r},s.byteLength=y,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)w(this,t,t+1);return this},s.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)w(this,t,t+3),w(this,t+1,t+2);return this},s.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)w(this,t,t+7),w(this,t+1,t+6),w(this,t+2,t+5),w(this,t+3,t+4);return this},s.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?R(this,0,e):b.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},s.prototype.compare=function(e,t,n,r,o){if(K(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),u=Math.min(i,a),c=this.slice(r,o),l=e.slice(t,n),f=0;f<u;++f)if(c[f]!==l[f]){i=c[f],a=l[f];break}return i<a?-1:a<i?1:0},s.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},s.prototype.indexOf=function(e,t,n){return x(this,e,t,n,!0)},s.prototype.lastIndexOf=function(e,t,n){return x(this,e,t,n,!1)},s.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return E(this,e,t,n);case"utf8":case"utf-8":return C(this,e,t,n);case"ascii":return k(this,e,t,n);case"latin1":case"binary":return I(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var O=4096;function D(e){var t=e.length;if(t<=O)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=O));return n}function B(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function _(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function N(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=t;i<n;++i)o+=Q(e[i]);return o}function P(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function M(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function F(e,t,n,r,o,i){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function L(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function U(e,t,n,o,i){return t=+t,n>>>=0,i||L(e,t,n,4,34028234663852886e22,-34028234663852886e22),r.write(e,t,n,o,23,4),n+4}function W(e,t,n,o,i){return t=+t,n>>>=0,i||L(e,t,n,8,17976931348623157e292,-17976931348623157e292),r.write(e,t,n,o,52,8),n+8}s.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var r=this.subarray(e,t);return r.__proto__=s.prototype,r},s.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},s.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},s.prototype.readUInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},s.prototype.readInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||M(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){e>>>=0,t||M(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||M(e,4,this.length),r.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||M(e,4,this.length),r.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||M(e,8,this.length),r.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||M(e,8,this.length),r.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||F(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},s.prototype.writeUIntBE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||F(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},s.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var o=Math.pow(2,8*n-1);F(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i<n&&(a*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var o=Math.pow(2,8*n-1);F(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeFloatLE=function(e,t,n){return U(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return U(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return W(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return W(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(!s.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var o=r-n;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,n,r);else if(this===e&&n<t&&t<r)for(var i=o-1;i>=0;--i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,r),t);return o},s.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!s.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){var o=e.charCodeAt(0);("utf8"===r&&o<128||"latin1"===r)&&(e=o)}}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{var a=s.isBuffer(e)?e:s.from(e,r),u=a.length;if(0===u)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<n-t;++i)this[i+t]=a[i%u]}return this};var z=/[^+/0-9A-Za-z-_]/g;function q(e){if((e=(e=e.split("=")[0]).trim().replace(z,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function Q(e){return e<16?"0"+e.toString(16):e.toString(16)}function V(e,t){var n;t=t||1/0;for(var r=e.length,o=null,i=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function H(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function G(e,t){for(var n,r,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)r=(n=e.charCodeAt(a))>>8,o=n%256,i.push(o),i.push(r);return i}function X(e){return t.toByteArray(q(e))}function Z(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function K(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}}).call(this)}).call(this,e("buffer").Buffer)},{"base64-js":87,buffer:90,ieee754:357}],91:[function(e,t,n){t.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(e,t,n){"use strict";var r=e("get-intrinsic"),o=e("./"),i=o(r("String.prototype.indexOf"));t.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},{"./":93,"get-intrinsic":348}],93:[function(e,t,n){"use strict";var r=e("function-bind"),o=e("get-intrinsic"),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||r.call(a,i),u=o("%Object.getOwnPropertyDescriptor%",!0),c=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}t.exports=function(e){var t=s(r,a,arguments);return u&&c&&u(t,"length").configurable&&c(t,"length",{value:1+l(0,e.length-(arguments.length-1))}),t};var f=function(){return s(r,i,arguments)};c?c(t.exports,"apply",{value:f}):t.exports.apply=f},{"function-bind":347,"get-intrinsic":348}],94:[function(e,t,n){"use strict";var r=Array.prototype.slice;function o(e,t){if(!(this instanceof o))return new o(e,t);this.src=e,this._withAccess=t}function i(e,t){return void 0===e[t]&&void 0===e.__lookupGetter__(t)&&void 0===e.__lookupSetter__(t)}t.exports=o,o.prototype.withAccess=function(e){return this._withAccess=!1!==e,this},o.prototype.pick=function(e){return Array.isArray(e)||(e=r.call(arguments)),e.length&&(this.keys=e),this},o.prototype.to=function(e){if(e=e||{},!this.src)return e;var t=this.keys||Object.keys(this.src);if(!this._withAccess){for(var n=0;n<t.length;n++)void 0===e[r=t[n]]&&(e[r]=this.src[r]);return e}for(n=0;n<t.length;n++){var r=t[n];if(i(e,r)){var o=this.src.__lookupGetter__(r),a=this.src.__lookupSetter__(r);o&&e.__defineGetter__(r,o),a&&e.__defineSetter__(r,a),o||a||(e[r]=this.src[r])}}return e},o.prototype.toCover=function(e){for(var t=this.keys||Object.keys(this.src),n=0;n<t.length;n++){var r=t[n];delete e[r];var o=this.src.__lookupGetter__(r),i=this.src.__lookupSetter__(r);o&&e.__defineGetter__(r,o),i&&e.__defineSetter__(r,i),o||i||(e[r]=this.src[r])}},o.prototype.override=o.prototype.toCover,o.prototype.and=function(e){var t={};return this.to(t),this.src=e,this.to(t),this.src=t,this}},{}],95:[function(e,t,n){var r=e("../internals/global"),o=e("../internals/is-callable"),i=e("../internals/try-to-string"),a=r.TypeError;t.exports=function(e){if(o(e))return e;throw a(i(e)+" is not a function")}},{"../internals/global":163,"../internals/is-callable":176,"../internals/try-to-string":257}],96:[function(e,t,n){var r=e("../internals/global"),o=e("../internals/is-constructor"),i=e("../internals/try-to-string"),a=r.TypeError;t.exports=function(e){if(o(e))return e;throw a(i(e)+" is not a constructor")}},{"../internals/global":163,"../internals/is-constructor":177,"../internals/try-to-string":257}],97:[function(e,t,n){var r=e("../internals/global"),o=e("../internals/is-callable"),i=r.String,a=r.TypeError;t.exports=function(e){if("object"==typeof e||o(e))return e;throw a("Can't set "+i(e)+" as a prototype")}},{"../internals/global":163,"../internals/is-callable":176}],98:[function(e,t,n){var r=e("../internals/well-known-symbol"),o=e("../internals/object-create"),i=e("../internals/object-define-property"),a=r("unscopables"),s=Array.prototype;null==s[a]&&i.f(s,a,{configurable:!0,value:o(null)}),t.exports=function(e){s[a][e]=!0}},{"../internals/object-create":196,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],99:[function(e,t,n){"use strict";var r=e("../internals/string-multibyte").charAt;t.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},{"../internals/string-multibyte":239}],100:[function(e,t,n){var r=e("../internals/global"),o=e("../internals/object-is-prototype-of"),i=r.TypeError;t.exports=function(e,t){if(o(t,e))return e;throw i("Incorrect invocation")}},{"../internals/global":163,"../internals/object-is-prototype-of":204}],101:[function(e,t,n){var r=e("../internals/global"),o=e("../internals/is-object"),i=r.String,a=r.TypeError;t.exports=function(e){if(o(e))return e;throw a(i(e)+" is not an object")}},{"../internals/global":163,"../internals/is-object":180}],102:[function(e,t,n){t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},{}],103:[function(e,t,n){"use strict";var r,o,i,a=e("../internals/array-buffer-native"),s=e("../internals/descriptors"),u=e("../internals/global"),c=e("../internals/is-callable"),l=e("../internals/is-object"),f=e("../internals/has-own-property"),p=e("../internals/classof"),h=e("../internals/try-to-string"),d=e("../internals/create-non-enumerable-property"),m=e("../internals/redefine"),g=e("../internals/object-define-property").f,v=e("../internals/object-is-prototype-of"),y=e("../internals/object-get-prototype-of"),b=e("../internals/object-set-prototype-of"),w=e("../internals/well-known-symbol"),x=e("../internals/uid"),A=u.Int8Array,E=A&&A.prototype,C=u.Uint8ClampedArray,k=C&&C.prototype,I=A&&y(A),S=E&&y(E),j=Object.prototype,T=u.TypeError,R=w("toStringTag"),O=x("TYPED_ARRAY_TAG"),D=x("TYPED_ARRAY_CONSTRUCTOR"),B=a&&!!b&&"Opera"!==p(u.opera),_=!1,N={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},P={BigInt64Array:8,BigUint64Array:8},M=function(e){if(!l(e))return!1;var t=p(e);return"DataView"===t||f(N,t)||f(P,t)},F=function(e){if(!l(e))return!1;var t=p(e);return f(N,t)||f(P,t)},L=function(e){if(F(e))return e;throw T("Target is not a typed array")},U=function(e){if(c(e)&&(!b||v(I,e)))return e;throw T(h(e)+" is not a typed array constructor")},W=function(e,t,n,r){if(s){if(n)for(var o in N){var i=u[o];if(i&&f(i.prototype,e))try{delete i.prototype[e]}catch(n){try{i.prototype[e]=t}catch(e){}}}S[e]&&!n||m(S,e,n?t:B&&E[e]||t,r)}},z=function(e,t,n){var r,o;if(s){if(b){if(n)for(r in N)if((o=u[r])&&f(o,e))try{delete o[e]}catch(e){}if(I[e]&&!n)return;try{return m(I,e,n?t:B&&I[e]||t)}catch(e){}}for(r in N)!(o=u[r])||o[e]&&!n||m(o,e,t)}};for(r in N)(i=(o=u[r])&&o.prototype)?d(i,D,o):B=!1;for(r in P)(i=(o=u[r])&&o.prototype)&&d(i,D,o);if((!B||!c(I)||I===Function.prototype)&&(I=function(){throw T("Incorrect invocation")},B))for(r in N)u[r]&&b(u[r],I);if((!B||!S||S===j)&&(S=I.prototype,B))for(r in N)u[r]&&b(u[r].prototype,S);if(B&&y(k)!==S&&b(k,S),s&&!f(S,R))for(r in _=!0,g(S,R,{get:function(){return l(this)?this[O]:void 0}}),N)u[r]&&d(u[r],O,r);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:B,TYPED_ARRAY_CONSTRUCTOR:D,TYPED_ARRAY_TAG:_&&O,aTypedArray:L,aTypedArrayConstructor:U,exportTypedArrayMethod:W,exportTypedArrayStaticMethod:z,isView:M,isTypedArray:F,TypedArray:I,TypedArrayPrototype:S}},{"../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(e,t,n){"use strict";var r=e("../internals/global"),o=e("../internals/function-uncurry-this"),i=e("../internals/descriptors"),a=e("../internals/array-buffer-native"),s=e("../internals/function-name"),u=e("../internals/create-non-enumerable-property"),c=e("../internals/redefine-all"),l=e("../internals/fails"),f=e("../internals/an-instance"),p=e("../internals/to-integer-or-infinity"),h=e("../internals/to-length"),d=e("../internals/to-index"),m=e("../internals/ieee754"),g=e("../internals/object-get-prototype-of"),v=e("../internals/object-set-prototype-of"),y=e("../internals/object-get-own-property-names").f,b=e("../internals/object-define-property").f,w=e("../internals/array-fill"),x=e("../internals/array-slice-simple"),A=e("../internals/set-to-string-tag"),E=e("../internals/internal-state"),C=s.PROPER,k=s.CONFIGURABLE,I=E.get,S=E.set,j="ArrayBuffer",T="DataView",R="prototype",O="Wrong length",D="Wrong index",B=r[j],_=B,N=_&&_[R],P=r[T],M=P&&P[R],F=Object.prototype,L=r.Array,U=r.RangeError,W=o(w),z=o([].reverse),q=m.pack,Q=m.unpack,V=function(e){return[255&e]},H=function(e){return[255&e,e>>8&255]},G=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},X=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},Z=function(e){return q(e,23,4)},K=function(e){return q(e,52,8)},J=function(e,t){b(e[R],t,{get:function(){return I(this)[t]}})},Y=function(e,t,n,r){var o=d(n),i=I(e);if(o+t>i.byteLength)throw U(D);var a=I(i.buffer).bytes,s=o+i.byteOffset,u=x(a,s,s+t);return r?u:z(u)},$=function(e,t,n,r,o,i){var a=d(n),s=I(e);if(a+t>s.byteLength)throw U(D);for(var u=I(s.buffer).bytes,c=a+s.byteOffset,l=r(+o),f=0;f<t;f++)u[c+f]=l[i?f:t-f-1]};if(a){var ee=C&&B.name!==j;if(l((function(){B(1)}))&&l((function(){new B(-1)}))&&!l((function(){return new B,new B(1.5),new B(NaN),ee&&!k})))ee&&k&&u(B,"name",j);else{(_=function(e){return f(this,N),new B(d(e))})[R]=N;for(var te,ne=y(B),re=0;ne.length>re;)(te=ne[re++])in _||u(_,te,B[te]);N.constructor=_}v&&g(M)!==F&&v(M,F);var oe=new P(new _(2)),ie=o(M.setInt8);oe.setInt8(0,2147483648),oe.setInt8(1,2147483649),!oe.getInt8(0)&&oe.getInt8(1)||c(M,{setInt8:function(e,t){ie(this,e,t<<24>>24)},setUint8:function(e,t){ie(this,e,t<<24>>24)}},{unsafe:!0})}else N=(_=function(e){f(this,N);var t=d(e);S(this,{bytes:W(L(t),0),byteLength:t}),i||(this.byteLength=t)})[R],M=(P=function(e,t,n){f(this,M),f(e,N);var r=I(e).byteLength,o=p(t);if(o<0||o>r)throw U("Wrong offset");if(o+(n=void 0===n?r-o:h(n))>r)throw U(O);S(this,{buffer:e,byteLength:n,byteOffset:o}),i||(this.buffer=e,this.byteLength=n,this.byteOffset=o)})[R],i&&(J(_,"byteLength"),J(P,"buffer"),J(P,"byteLength"),J(P,"byteOffset")),c(M,{getInt8:function(e){return Y(this,1,e)[0]<<24>>24},getUint8:function(e){return Y(this,1,e)[0]},getInt16:function(e){var t=Y(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=Y(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return X(Y(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return X(Y(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return Q(Y(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return Q(Y(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){$(this,1,e,V,t)},setUint8:function(e,t){$(this,1,e,V,t)},setInt16:function(e,t){$(this,2,e,H,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){$(this,2,e,H,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){$(this,4,e,G,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){$(this,4,e,G,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){$(this,4,e,Z,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){$(this,8,e,K,t,arguments.length>2?arguments[2]:void 0)}});A(_,j),A(P,T),t.exports={ArrayBuffer:_,DataView:P}},{"../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(e,t,n){"use strict";var r=e("../internals/to-object"),o=e("../internals/to-absolute-index"),i=e("../internals/length-of-array-like"),a=Math.min;t.exports=[].copyWithin||function(e,t){var n=r(this),s=i(n),u=o(e,s),c=o(t,s),l=arguments.length>2?arguments[2]:void 0,f=a((void 0===l?s:o(l,s))-c,s-u),p=1;for(c<u&&u<c+f&&(p=-1,c+=f-1,u+=f-1);f-- >0;)c in n?n[u]=n[c]:delete n[u],u+=p,c+=p;return n}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],106:[function(e,t,n){"use strict";var r=e("../internals/to-object"),o=e("../internals/to-absolute-index"),i=e("../internals/length-of-array-like");t.exports=function(e){for(var t=r(this),n=i(t),a=arguments.length,s=o(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,c=void 0===u?n:o(u,n);c>s;)t[s++]=e;return t}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],107:[function(e,t,n){"use strict";var r=e("../internals/array-iteration").forEach,o=e("../internals/array-method-is-strict")("forEach");t.exports=o?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},{"../internals/array-iteration":111,"../internals/array-method-is-strict":114}],108:[function(e,t,n){var r=e("../internals/length-of-array-like");t.exports=function(e,t){for(var n=0,o=r(t),i=new e(o);o>n;)i[n]=t[n++];return i}},{"../internals/length-of-array-like":188}],109:[function(e,t,n){"use strict";var r=e("../internals/global"),o=e("../internals/function-bind-context"),i=e("../internals/function-call"),a=e("../internals/to-object"),s=e("../internals/call-with-safe-iteration-closing"),u=e("../internals/is-array-iterator-method"),c=e("../internals/is-constructor"),l=e("../internals/length-of-array-like"),f=e("../internals/create-property"),p=e("../internals/get-iterator"),h=e("../internals/get-iterator-method"),d=r.Array;t.exports=function(e){var t=a(e),n=c(this),r=arguments.length,m=r>1?arguments[1]:void 0,g=void 0!==m;g&&(m=o(m,r>2?arguments[2]:void 0));var v,y,b,w,x,A,E=h(t),C=0;if(!E||this==d&&u(E))for(v=l(t),y=n?new this(v):d(v);v>C;C++)A=g?m(t[C],C):t[C],f(y,C,A);else for(x=(w=p(t,E)).next,y=n?new this:[];!(b=i(x,w)).done;C++)A=g?s(w,m,[b.value,C],!0):b.value,f(y,C,A);return y.length=C,y}},{"../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(e,t,n){var r=e("../internals/to-indexed-object"),o=e("../internals/to-absolute-index"),i=e("../internals/length-of-array-like"),a=function(e){return function(t,n,a){var s,u=r(t),c=i(u),l=o(a,c);if(e&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((e||l in u)&&u[l]===n)return e||l||0;return!e&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-indexed-object":247}],111:[function(e,t,n){var r=e("../internals/function-bind-context"),o=e("../internals/function-uncurry-this"),i=e("../internals/indexed-object"),a=e("../internals/to-object"),s=e("../internals/length-of-array-like"),u=e("../internals/array-species-create"),c=o([].push),l=function(e){var t=1==e,n=2==e,o=3==e,l=4==e,f=6==e,p=7==e,h=5==e||f;return function(d,m,g,v){for(var y,b,w=a(d),x=i(w),A=r(m,g),E=s(x),C=0,k=v||u,I=t?k(d,E):n||p?k(d,0):void 0;E>C;C++)if((h||C in x)&&(b=A(y=x[C],C,w),e))if(t)I[C]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return C;case 2:c(I,y)}else switch(e){case 4:return!1;case 7:c(I,y)}return f?-1:o||l?l:I}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(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(e,t,n){"use strict";var r=e("../internals/function-apply"),o=e("../internals/to-indexed-object"),i=e("../internals/to-integer-or-infinity"),a=e("../internals/length-of-array-like"),s=e("../internals/array-method-is-strict"),u=Math.min,c=[].lastIndexOf,l=!!c&&1/[1].lastIndexOf(1,-0)<0,f=s("lastIndexOf"),p=l||!f;t.exports=p?function(e){if(l)return r(c,this,arguments)||0;var t=o(this),n=a(t),s=n-1;for(arguments.length>1&&(s=u(s,i(arguments[1]))),s<0&&(s=n+s);s>=0;s--)if(s in t&&t[s]===e)return s||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(e,t,n){var r=e("../internals/fails"),o=e("../internals/well-known-symbol"),i=e("../internals/engine-v8-version"),a=o("species");t.exports=function(e){return i>=51||!r((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},{"../internals/engine-v8-version":146,"../internals/fails":150,"../internals/well-known-symbol":268}],114:[function(e,t,n){"use strict";var r=e("../internals/fails");t.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){return 1},1)}))}},{"../internals/fails":150}],115:[function(e,t,n){var r=e("../internals/global"),o=e("../internals/a-callable"),i=e("../internals/to-object"),a=e("../internals/indexed-object"),s=e("../internals/length-of-array-like"),u=r.TypeError,c=function(e){return function(t,n,r,c){o(n);var l=i(t),f=a(l),p=s(l),h=e?p-1:0,d=e?-1:1;if(r<2)for(;;){if(h in f){c=f[h],h+=d;break}if(h+=d,e?h<0:p<=h)throw u("Reduce of empty array with no initial value")}for(;e?h>=0:p>h;h+=d)h in f&&(c=n(c,f[h],h,l));return c}};t.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(e,t,n){var r=e("../internals/global"),o=e("../internals/to-absolute-index"),i=e("../internals/length-of-array-like"),a=e("../internals/create-property"),s=r.Array,u=Math.max;t.exports=function(e,t,n){for(var r=i(e),c=o(t,r),l=o(void 0===n?r:n,r),f=s(u(l-c,0)),p=0;c<l;c++,p++)a(f,p,e[c]);return f.length=p,f}},{"../internals/create-property":131,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245}],117:[function(e,t,n){var r=e("../internals/function-uncurry-this");t.exports=r([].slice)},{"../internals/function-uncurry-this":157}],118:[function(e,t,n){var r=e("../internals/array-slice-simple"),o=Math.floor,i=function(e,t){var n=e.length,u=o(n/2);return n<8?a(e,t):s(e,i(r(e,0,u),t),i(r(e,u),t),t)},a=function(e,t){for(var n,r,o=e.length,i=1;i<o;){for(r=i,n=e[i];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==i++&&(e[r]=n)}return e},s=function(e,t,n,r){for(var o=t.length,i=n.length,a=0,s=0;a<o||s<i;)e[a+s]=a<o&&s<i?r(t[a],n[s])<=0?t[a++]:n[s++]:a<o?t[a++]:n[s++];return e};t.exports=i},{"../internals/array-slice-simple":116}],119:[function(e,t,n){var r=e("../internals/global"),o=e("../internals/is-array"),i=e("../internals/is-constructor"),a=e("../internals/is-object"),s=e("../internals/well-known-symbol")("species"),u=r.Array;t.exports=function(e){var t;return o(e)&&(t=e.constructor,(i(t)&&(t===u||o(t.prototype))||a(t)&&null===(t=t[s]))&&(t=void 0)),void 0===t?u:t}},{"../internals/global":163,"../internals/is-array":175,"../internals/is-constructor":177,"../internals/is-object":180,"../internals/well-known-symbol":268}],120:[function(e,t,n){var r=e("../internals/array-species-constructor");t.exports=function(e,t){return new(r(e))(0===t?0:t)}},{"../internals/array-species-constructor":119}],121:[function(e,t,n){var r=e("../internals/an-object"),o=e("../internals/iterator-close");t.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){o(e,"throw",t)}}},{"../internals/an-object":101,"../internals/iterator-close":185}],122:[function(e,t,n){var r=e("../internals/well-known-symbol")("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}t.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(e){}return n}},{"../internals/well-known-symbol":268}],123:[function(e,t,n){var r=e("../internals/function-uncurry-this"),o=r({}.toString),i=r("".slice);t.exports=function(e){return i(o(e),8,-1)}},{"../internals/function-uncurry-this":157}],124:[function(e,t,n){var r=e("../internals/global"),o=e("../internals/to-string-tag-support"),i=e("../internals/is-callable"),a=e("../internals/classof-raw"),s=e("../internals/well-known-symbol")("toStringTag"),u=r.Object,c="Arguments"==a(function(){return arguments}()),l=function(e,t){try{return e[t]}catch(e){}};t.exports=o?a:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=l(t=u(e),s))?n:c?a(t):"Object"==(r=a(t))&&i(t.callee)?"Arguments":r}},{"../internals/classof-raw":123,"../internals/global":163,"../internals/is-callable":176,"../internals/to-string-tag-support":255,"../internals/well-known-symbol":268}],125:[function(e,t,n){var r=e("../internals/has-own-property"),o=e("../internals/own-keys"),i=e("../internals/object-get-own-property-descriptor"),a=e("../internals/object-define-property");t.exports=function(e,t,n){for(var s=o(t),u=a.f,c=i.f,l=0;l<s.length;l++){var f=s[l];r(e,f)||n&&r(n,f)||u(e,f,c(t,f))}}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/own-keys":212}],126:[function(e,t,n){var r=e("../internals/well-known-symbol")("match");t.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(e){}}return!1}},{"../internals/well-known-symbol":268}],127:[function(e,t,n){var r=e("../internals/fails");t.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},{"../internals/fails":150}],128:[function(e,t,n){"use strict";var r=e("../internals/iterators-core").IteratorPrototype,o=e("../internals/object-create"),i=e("../internals/create-property-descriptor"),a=e("../internals/set-to-string-tag"),s=e("../internals/iterators"),u=function(){return this};t.exports=function(e,t,n,c){var l=t+" Iterator";return e.prototype=o(r,{next:i(+!c,n)}),a(e,l,!1,!0),s[l]=u,e}},{"../internals/create-property-descriptor":130,"../internals/iterators":187,"../internals/iterators-core":186,"../internals/object-create":196,"../internals/set-to-string-tag":234}],129:[function(e,t,n){var r=e("../internals/descriptors"),o=e("../internals/object-define-property"),i=e("../internals/create-property-descriptor");t.exports=r?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},{"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/object-define-property":198}],130:[function(e,t,n){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],131:[function(e,t,n){"use strict";var r=e("../internals/to-property-key"),o=e("../internals/object-define-property"),i=e("../internals/create-property-descriptor");t.exports=function(e,t,n){var a=r(t);a in e?o.f(e,a,i(0,n)):e[a]=n}},{"../internals/create-property-descriptor":130,"../internals/object-define-property":198,"../internals/to-property-key":254}],132:[function(e,t,n){"use strict";var r=e("../internals/export"),o=e("../internals/function-call"),i=e("../internals/is-pure"),a=e("../internals/function-name"),s=e("../internals/is-callable"),u=e("../internals/create-iterator-constructor"),c=e("../internals/object-get-prototype-of"),l=e("../internals/object-set-prototype-of"),f=e("../internals/set-to-string-tag"),p=e("../internals/create-non-enumerable-property"),h=e("../internals/redefine"),d=e("../internals/well-known-symbol"),m=e("../internals/iterators"),g=e("../internals/iterators-core"),v=a.PROPER,y=a.CONFIGURABLE,b=g.IteratorPrototype,w=g.BUGGY_SAFARI_ITERATORS,x=d("iterator"),A="keys",E="values",C="entries",k=function(){return this};t.exports=function(e,t,n,a,d,g,I){u(n,t,a);var S,j,T,R=function(e){if(e===d&&N)return N;if(!w&&e in B)return B[e];switch(e){case A:case E:case C:return function(){return new n(this,e)}}return function(){return new n(this)}},O=t+" Iterator",D=!1,B=e.prototype,_=B[x]||B["@@iterator"]||d&&B[d],N=!w&&_||R(d),P="Array"==t&&B.entries||_;if(P&&(S=c(P.call(new e)))!==Object.prototype&&S.next&&(i||c(S)===b||(l?l(S,b):s(S[x])||h(S,x,k)),f(S,O,!0,!0),i&&(m[O]=k)),v&&d==E&&_&&_.name!==E&&(!i&&y?p(B,"name",E):(D=!0,N=function(){return o(_,this)})),d)if(j={values:R(E),keys:g?N:R(A),entries:R(C)},I)for(T in j)(w||D||!(T in B))&&h(B,T,j[T]);else r({target:t,proto:!0,forced:w||D},j);return i&&!I||B[x]===N||h(B,x,N,{name:d}),m[t]=N,j}},{"../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(e,t,n){var r=e("../internals/path"),o=e("../internals/has-own-property"),i=e("../internals/well-known-symbol-wrapped"),a=e("../internals/object-define-property").f;t.exports=function(e){var t=r.Symbol||(r.Symbol={});o(t,e)||a(t,e,{value:i.f(e)})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/path":213,"../internals/well-known-symbol-wrapped":267}],134:[function(e,t,n){var r=e("../internals/fails");t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},{"../internals/fails":150}],135:[function(e,t,n){var r=e("../internals/global"),o=e("../internals/is-object"),i=r.document,a=o(i)&&o(i.createElement);t.exports=function(e){return a?i.createElement(e):{}}},{"../internals/global":163,"../internals/is-object":180}],136:[function(e,t,n){t.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(e,t,n){var r=e("../internals/document-create-element")("span").classList,o=r&&r.constructor&&r.constructor.prototype;t.exports=o===Object.prototype?void 0:o},{"../internals/document-create-element":135}],138:[function(e,t,n){var r=e("../internals/engine-user-agent").match(/firefox\/(\d+)/i);t.exports=!!r&&+r[1]},{"../internals/engine-user-agent":145}],139:[function(e,t,n){t.exports="object"==typeof window&&"object"!=typeof Deno},{}],140:[function(e,t,n){var r=e("../internals/engine-user-agent");t.exports=/MSIE|Trident/.test(r)},{"../internals/engine-user-agent":145}],141:[function(e,t,n){var r=e("../internals/engine-user-agent"),o=e("../internals/global");t.exports=/ipad|iphone|ipod/i.test(r)&&void 0!==o.Pebble},{"../internals/engine-user-agent":145,"../internals/global":163}],142:[function(e,t,n){var r=e("../internals/engine-user-agent");t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},{"../internals/engine-user-agent":145}],143:[function(e,t,n){var r=e("../internals/classof-raw"),o=e("../internals/global");t.exports="process"==r(o.process)},{"../internals/classof-raw":123,"../internals/global":163}],144:[function(e,t,n){var r=e("../internals/engine-user-agent");t.exports=/web0s(?!.*chrome)/i.test(r)},{"../internals/engine-user-agent":145}],145:[function(e,t,n){var r=e("../internals/get-built-in");t.exports=r("navigator","userAgent")||""},{"../internals/get-built-in":158}],146:[function(e,t,n){var r,o,i=e("../internals/global"),a=e("../internals/engine-user-agent"),s=i.process,u=i.Deno,c=s&&s.versions||u&&u.version,l=c&&c.v8;l&&(o=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=+r[1]),t.exports=o},{"../internals/engine-user-agent":145,"../internals/global":163}],147:[function(e,t,n){var r=e("../internals/engine-user-agent").match(/AppleWebKit\/(\d+)\./);t.exports=!!r&&+r[1]},{"../internals/engine-user-agent":145}],148:[function(e,t,n){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],149:[function(e,t,n){var r=e("../internals/global"),o=e("../internals/object-get-own-property-descriptor").f,i=e("../internals/create-non-enumerable-property"),a=e("../internals/redefine"),s=e("../internals/set-global"),u=e("../internals/copy-constructor-properties"),c=e("../internals/is-forced");t.exports=function(e,t){var n,l,f,p,h,d=e.target,m=e.global,g=e.stat;if(n=m?r:g?r[d]||s(d,{}):(r[d]||{}).prototype)for(l in t){if(p=t[l],f=e.noTargetGet?(h=o(n,l))&&h.value:n[l],!c(m?l:d+(g?".":"#")+l,e.forced)&&void 0!==f){if(typeof p==typeof f)continue;u(p,f)}(e.sham||f&&f.sham)&&i(p,"sham",!0),a(n,l,p,e)}}},{"../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(e,t,n){t.exports=function(e){try{return!!e()}catch(e){return!0}}},{}],151:[function(e,t,n){"use strict";e("../modules/es.regexp.exec");var r=e("../internals/function-uncurry-this"),o=e("../internals/redefine"),i=e("../internals/regexp-exec"),a=e("../internals/fails"),s=e("../internals/well-known-symbol"),u=e("../internals/create-non-enumerable-property"),c=s("species"),l=RegExp.prototype;t.exports=function(e,t,n,f){var p=s(e),h=!a((function(){var t={};return t[p]=function(){return 7},7!=""[e](t)})),d=h&&!a((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[c]=function(){return n},n.flags="",n[p]=/./[p]),n.exec=function(){return t=!0,null},n[p](""),!t}));if(!h||!d||n){var m=r(/./[p]),g=t(p,""[e],(function(e,t,n,o,a){var s=r(e),u=t.exec;return u===i||u===l.exec?h&&!a?{done:!0,value:m(t,n,o)}:{done:!0,value:s(n,t,o)}:{done:!1}}));o(String.prototype,e,g[0]),o(l,p,g[1])}f&&u(l[p],"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(e,t,n){var r=e("../internals/function-bind-native"),o=Function.prototype,i=o.apply,a=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(r?a.bind(i):function(){return a.apply(i,arguments)})},{"../internals/function-bind-native":154}],153:[function(e,t,n){var r=e("../internals/function-uncurry-this"),o=e("../internals/a-callable"),i=e("../internals/function-bind-native"),a=r(r.bind);t.exports=function(e,t){return o(e),void 0===t?e:i?a(e,t):function(){return e.apply(t,arguments)}}},{"../internals/a-callable":95,"../internals/function-bind-native":154,"../internals/function-uncurry-this":157}],154:[function(e,t,n){var r=e("../internals/fails");t.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},{"../internals/fails":150}],155:[function(e,t,n){var r=e("../internals/function-bind-native"),o=Function.prototype.call;t.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},{"../internals/function-bind-native":154}],156:[function(e,t,n){var r=e("../internals/descriptors"),o=e("../internals/has-own-property"),i=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,s=o(i,"name"),u=s&&"something"===function(){}.name,c=s&&(!r||r&&a(i,"name").configurable);t.exports={EXISTS:s,PROPER:u,CONFIGURABLE:c}},{"../internals/descriptors":134,"../internals/has-own-property":164}],157:[function(e,t,n){var r=e("../internals/function-bind-native"),o=Function.prototype,i=o.bind,a=o.call,s=r&&i.bind(a,a);t.exports=r?function(e){return e&&s(e)}:function(e){return e&&function(){return a.apply(e,arguments)}}},{"../internals/function-bind-native":154}],158:[function(e,t,n){var r=e("../internals/global"),o=e("../internals/is-callable"),i=function(e){return o(e)?e:void 0};t.exports=function(e,t){return arguments.length<2?i(r[e]):r[e]&&r[e][t]}},{"../internals/global":163,"../internals/is-callable":176}],159:[function(e,t,n){var r=e("../internals/classof"),o=e("../internals/get-method"),i=e("../internals/iterators"),a=e("../internals/well-known-symbol")("iterator");t.exports=function(e){if(null!=e)return o(e,a)||o(e,"@@iterator")||i[r(e)]}},{"../internals/classof":124,"../internals/get-method":161,"../internals/iterators":187,"../internals/well-known-symbol":268}],160:[function(e,t,n){var r=e("../internals/global"),o=e("../internals/function-call"),i=e("../internals/a-callable"),a=e("../internals/an-object"),s=e("../internals/try-to-string"),u=e("../internals/get-iterator-method"),c=r.TypeError;t.exports=function(e,t){var n=arguments.length<2?u(e):t;if(i(n))return a(o(n,e));throw c(s(e)+" 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(e,t,n){var r=e("../internals/a-callable");t.exports=function(e,t){var n=e[t];return null==n?void 0:r(n)}},{"../internals/a-callable":95}],162:[function(e,t,n){var r=e("../internals/function-uncurry-this"),o=e("../internals/to-object"),i=Math.floor,a=r("".charAt),s=r("".replace),u=r("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;t.exports=function(e,t,n,r,f,p){var h=n+e.length,d=r.length,m=l;return void 0!==f&&(f=o(f),m=c),s(p,m,(function(o,s){var c;switch(a(s,0)){case"$":return"$";case"&":return e;case"`":return u(t,0,n);case"'":return u(t,h);case"<":c=f[u(s,1,-1)];break;default:var l=+s;if(0===l)return o;if(l>d){var p=i(l/10);return 0===p?o:p<=d?void 0===r[p-1]?a(s,1):r[p-1]+a(s,1):o}c=r[l-1]}return void 0===c?"":c}))}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],163:[function(e,n,r){(function(e){(function(){var t=function(e){return e&&e.Math==Math&&e};n.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this)}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],164:[function(e,t,n){var r=e("../internals/function-uncurry-this"),o=e("../internals/to-object"),i=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(e,t){return i(o(e),t)}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],165:[function(e,t,n){t.exports={}},{}],166:[function(e,t,n){var r=e("../internals/global");t.exports=function(e,t){var n=r.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))}},{"../internals/global":163}],167:[function(e,t,n){var r=e("../internals/get-built-in");t.exports=r("document","documentElement")},{"../internals/get-built-in":158}],168:[function(e,t,n){var r=e("../internals/descriptors"),o=e("../internals/fails"),i=e("../internals/document-create-element");t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},{"../internals/descriptors":134,"../internals/document-create-element":135,"../internals/fails":150}],169:[function(e,t,n){var r=e("../internals/global").Array,o=Math.abs,i=Math.pow,a=Math.floor,s=Math.log,u=Math.LN2,c=function(e,t,n){var c,l,f,p=r(n),h=8*n-t-1,d=(1<<h)-1,m=d>>1,g=23===t?i(2,-24)-i(2,-77):0,v=e<0||0===e&&1/e<0?1:0,y=0;for((e=o(e))!=e||e===1/0?(l=e!=e?1:0,c=d):(c=a(s(e)/u),e*(f=i(2,-c))<1&&(c--,f*=2),(e+=c+m>=1?g/f:g*i(2,1-m))*f>=2&&(c++,f/=2),c+m>=d?(l=0,c=d):c+m>=1?(l=(e*f-1)*i(2,t),c+=m):(l=e*i(2,m-1)*i(2,t),c=0));t>=8;)p[y++]=255&l,l/=256,t-=8;for(c=c<<t|l,h+=t;h>0;)p[y++]=255&c,c/=256,h-=8;return p[--y]|=128*v,p},l=function(e,t){var n,r=e.length,o=8*r-t-1,a=(1<<o)-1,s=a>>1,u=o-7,c=r-1,l=e[c--],f=127&l;for(l>>=7;u>0;)f=256*f+e[c--],u-=8;for(n=f&(1<<-u)-1,f>>=-u,u+=t;u>0;)n=256*n+e[c--],u-=8;if(0===f)f=1-s;else{if(f===a)return n?NaN:l?-1/0:1/0;n+=i(2,t),f-=s}return(l?-1:1)*n*i(2,f-t)};t.exports={pack:c,unpack:l}},{"../internals/global":163}],170:[function(e,t,n){var r=e("../internals/global"),o=e("../internals/function-uncurry-this"),i=e("../internals/fails"),a=e("../internals/classof-raw"),s=r.Object,u=o("".split);t.exports=i((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"==a(e)?u(e,""):s(e)}:s},{"../internals/classof-raw":123,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],171:[function(e,t,n){var r=e("../internals/is-callable"),o=e("../internals/is-object"),i=e("../internals/object-set-prototype-of");t.exports=function(e,t,n){var a,s;return i&&r(a=t.constructor)&&a!==n&&o(s=a.prototype)&&s!==n.prototype&&i(e,s),e}},{"../internals/is-callable":176,"../internals/is-object":180,"../internals/object-set-prototype-of":208}],172:[function(e,t,n){var r=e("../internals/function-uncurry-this"),o=e("../internals/is-callable"),i=e("../internals/shared-store"),a=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(e){return a(e)}),t.exports=i.inspectSource},{"../internals/function-uncurry-this":157,"../internals/is-callable":176,"../internals/shared-store":236}],173:[function(e,t,n){var r,o,i,a=e("../internals/native-weak-map"),s=e("../internals/global"),u=e("../internals/function-uncurry-this"),c=e("../internals/is-object"),l=e("../internals/create-non-enumerable-property"),f=e("../internals/has-own-property"),p=e("../internals/shared-store"),h=e("../internals/shared-key"),d=e("../internals/hidden-keys"),m="Object already initialized",g=s.TypeError,v=s.WeakMap,y=function(e){return i(e)?o(e):r(e,{})},b=function(e){return function(t){var n;if(!c(t)||(n=o(t)).type!==e)throw g("Incompatible receiver, "+e+" required");return n}};if(a||p.state){var w=p.state||(p.state=new v),x=u(w.get),A=u(w.has),E=u(w.set);r=function(e,t){if(A(w,e))throw new g(m);return t.facade=e,E(w,e,t),t},o=function(e){return x(w,e)||{}},i=function(e){return A(w,e)}}else{var C=h("state");d[C]=!0,r=function(e,t){if(f(e,C))throw new g(m);return t.facade=e,l(e,C,t),t},o=function(e){return f(e,C)?e[C]:{}},i=function(e){return f(e,C)}}t.exports={set:r,get:o,has:i,enforce:y,getterFor:b}},{"../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(e,t,n){var r=e("../internals/well-known-symbol"),o=e("../internals/iterators"),i=r("iterator"),a=Array.prototype;t.exports=function(e){return void 0!==e&&(o.Array===e||a[i]===e)}},{"../internals/iterators":187,"../internals/well-known-symbol":268}],175:[function(e,t,n){var r=e("../internals/classof-raw");t.exports=Array.isArray||function(e){return"Array"==r(e)}},{"../internals/classof-raw":123}],176:[function(e,t,n){t.exports=function(e){return"function"==typeof e}},{}],177:[function(e,t,n){var r=e("../internals/function-uncurry-this"),o=e("../internals/fails"),i=e("../internals/is-callable"),a=e("../internals/classof"),s=e("../internals/get-built-in"),u=e("../internals/inspect-source"),c=function(){},l=[],f=s("Reflect","construct"),p=/^\s*(?:class|function)\b/,h=r(p.exec),d=!p.exec(c),m=function(e){if(!i(e))return!1;try{return f(c,l,e),!0}catch(e){return!1}},g=function(e){if(!i(e))return!1;switch(a(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return d||!!h(p,u(e))}catch(e){return!0}};g.sham=!0,t.exports=!f||o((function(){var e;return m(m.call)||!m(Object)||!m((function(){e=!0}))||e}))?g:m},{"../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(e,t,n){var r=e("../internals/fails"),o=e("../internals/is-callable"),i=/#|\.prototype\./,a=function(e,t){var n=u[s(e)];return n==l||n!=c&&(o(t)?r(t):!!t)},s=a.normalize=function(e){return String(e).replace(i,".").toLowerCase()},u=a.data={},c=a.NATIVE="N",l=a.POLYFILL="P";t.exports=a},{"../internals/fails":150,"../internals/is-callable":176}],179:[function(e,t,n){var r=e("../internals/is-object"),o=Math.floor;t.exports=Number.isInteger||function(e){return!r(e)&&isFinite(e)&&o(e)===e}},{"../internals/is-object":180}],180:[function(e,t,n){var r=e("../internals/is-callable");t.exports=function(e){return"object"==typeof e?null!==e:r(e)}},{"../internals/is-callable":176}],181:[function(e,t,n){t.exports=!1},{}],182:[function(e,t,n){var r=e("../internals/is-object"),o=e("../internals/classof-raw"),i=e("../internals/well-known-symbol")("match");t.exports=function(e){var t;return r(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==o(e))}},{"../internals/classof-raw":123,"../internals/is-object":180,"../internals/well-known-symbol":268}],183:[function(e,t,n){var r=e("../internals/global"),o=e("../internals/get-built-in"),i=e("../internals/is-callable"),a=e("../internals/object-is-prototype-of"),s=e("../internals/use-symbol-as-uid"),u=r.Object;t.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=o("Symbol");return i(t)&&a(t.prototype,u(e))}},{"../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(e,t,n){var r=e("../internals/global"),o=e("../internals/function-bind-context"),i=e("../internals/function-call"),a=e("../internals/an-object"),s=e("../internals/try-to-string"),u=e("../internals/is-array-iterator-method"),c=e("../internals/length-of-array-like"),l=e("../internals/object-is-prototype-of"),f=e("../internals/get-iterator"),p=e("../internals/get-iterator-method"),h=e("../internals/iterator-close"),d=r.TypeError,m=function(e,t){this.stopped=e,this.result=t},g=m.prototype;t.exports=function(e,t,n){var r,v,y,b,w,x,A,E=n&&n.that,C=!(!n||!n.AS_ENTRIES),k=!(!n||!n.IS_ITERATOR),I=!(!n||!n.INTERRUPTED),S=o(t,E),j=function(e){return r&&h(r,"normal",e),new m(!0,e)},T=function(e){return C?(a(e),I?S(e[0],e[1],j):S(e[0],e[1])):I?S(e,j):S(e)};if(k)r=e;else{if(!(v=p(e)))throw d(s(e)+" is not iterable");if(u(v)){for(y=0,b=c(e);b>y;y++)if((w=T(e[y]))&&l(g,w))return w;return new m(!1)}r=f(e,v)}for(x=r.next;!(A=i(x,r)).done;){try{w=T(A.value)}catch(e){h(r,"throw",e)}if("object"==typeof w&&w&&l(g,w))return w}return new m(!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(e,t,n){var r=e("../internals/function-call"),o=e("../internals/an-object"),i=e("../internals/get-method");t.exports=function(e,t,n){var a,s;o(e);try{if(!(a=i(e,"return"))){if("throw"===t)throw n;return n}a=r(a,e)}catch(e){s=!0,a=e}if("throw"===t)throw n;if(s)throw a;return o(a),n}},{"../internals/an-object":101,"../internals/function-call":155,"../internals/get-method":161}],186:[function(e,t,n){"use strict";var r,o,i,a=e("../internals/fails"),s=e("../internals/is-callable"),u=e("../internals/object-create"),c=e("../internals/object-get-prototype-of"),l=e("../internals/redefine"),f=e("../internals/well-known-symbol"),p=e("../internals/is-pure"),h=f("iterator"),d=!1;[].keys&&("next"in(i=[].keys())?(o=c(c(i)))!==Object.prototype&&(r=o):d=!0),null==r||a((function(){var e={};return r[h].call(e)!==e}))?r={}:p&&(r=u(r)),s(r[h])||l(r,h,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:d}},{"../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(e,t,n){arguments[4][165][0].apply(n,arguments)},{dup:165}],188:[function(e,t,n){var r=e("../internals/to-length");t.exports=function(e){return r(e.length)}},{"../internals/to-length":249}],189:[function(e,t,n){var r,o,i,a,s,u,c,l,f=e("../internals/global"),p=e("../internals/function-bind-context"),h=e("../internals/object-get-own-property-descriptor").f,d=e("../internals/task").set,m=e("../internals/engine-is-ios"),g=e("../internals/engine-is-ios-pebble"),v=e("../internals/engine-is-webos-webkit"),y=e("../internals/engine-is-node"),b=f.MutationObserver||f.WebKitMutationObserver,w=f.document,x=f.process,A=f.Promise,E=h(f,"queueMicrotask"),C=E&&E.value;C||(r=function(){var e,t;for(y&&(e=x.domain)&&e.exit();o;){t=o.fn,o=o.next;try{t()}catch(e){throw o?a():i=void 0,e}}i=void 0,e&&e.enter()},m||y||v||!b||!w?!g&&A&&A.resolve?((c=A.resolve(void 0)).constructor=A,l=p(c.then,c),a=function(){l(r)}):y?a=function(){x.nextTick(r)}:(d=p(d,f),a=function(){d(r)}):(s=!0,u=w.createTextNode(""),new b(r).observe(u,{characterData:!0}),a=function(){u.data=s=!s})),t.exports=C||function(e){var t={fn:e,next:void 0};i&&(i.next=t),o||(o=t,a()),i=t}},{"../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(e,t,n){var r=e("../internals/native-symbol");t.exports=r&&!!Symbol.for&&!!Symbol.keyFor},{"../internals/native-symbol":191}],191:[function(e,t,n){var r=e("../internals/engine-v8-version"),o=e("../internals/fails");t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},{"../internals/engine-v8-version":146,"../internals/fails":150}],192:[function(e,t,n){var r=e("../internals/global"),o=e("../internals/is-callable"),i=e("../internals/inspect-source"),a=r.WeakMap;t.exports=o(a)&&/native code/.test(i(a))},{"../internals/global":163,"../internals/inspect-source":172,"../internals/is-callable":176}],193:[function(e,t,n){"use strict";var r=e("../internals/a-callable"),o=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)};t.exports.f=function(e){return new o(e)}},{"../internals/a-callable":95}],194:[function(e,t,n){var r=e("../internals/global"),o=e("../internals/is-regexp"),i=r.TypeError;t.exports=function(e){if(o(e))throw i("The method doesn't accept regular expressions");return e}},{"../internals/global":163,"../internals/is-regexp":182}],195:[function(e,t,n){"use strict";var r=e("../internals/descriptors"),o=e("../internals/function-uncurry-this"),i=e("../internals/function-call"),a=e("../internals/fails"),s=e("../internals/object-keys"),u=e("../internals/object-get-own-property-symbols"),c=e("../internals/object-property-is-enumerable"),l=e("../internals/to-object"),f=e("../internals/indexed-object"),p=Object.assign,h=Object.defineProperty,d=o([].concat);t.exports=!p||a((function(){if(r&&1!==p({b:1},p(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),o="abcdefghijklmnopqrst";return e[n]=7,o.split("").forEach((function(e){t[e]=e})),7!=p({},e)[n]||s(p({},t)).join("")!=o}))?function(e,t){for(var n=l(e),o=arguments.length,a=1,p=u.f,h=c.f;o>a;)for(var m,g=f(arguments[a++]),v=p?d(s(g),p(g)):s(g),y=v.length,b=0;y>b;)m=v[b++],r&&!i(h,g,m)||(n[m]=g[m]);return n}:p},{"../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(e,t,n){var r,o=e("../internals/an-object"),i=e("../internals/object-define-properties"),a=e("../internals/enum-bug-keys"),s=e("../internals/hidden-keys"),u=e("../internals/html"),c=e("../internals/document-create-element"),l=e("../internals/shared-key"),f=">",p="<",h="prototype",d="script",m=l("IE_PROTO"),g=function(){},v=function(e){return p+d+f+e+p+"/"+d+f},y=function(e){e.write(v("")),e.close();var t=e.parentWindow.Object;return e=null,t},b=function(){var e,t=c("iframe"),n="java"+d+":";return t.style.display="none",u.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(v("document.F=Object")),e.close(),e.F},w=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}w="undefined"!=typeof document?document.domain&&r?y(r):b():y(r);for(var e=a.length;e--;)delete w[h][a[e]];return w()};s[m]=!0,t.exports=Object.create||function(e,t){var n;return null!==e?(g[h]=o(e),n=new g,g[h]=null,n[m]=e):n=w(),void 0===t?n:i.f(n,t)}},{"../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(e,t,n){var r=e("../internals/descriptors"),o=e("../internals/v8-prototype-define-bug"),i=e("../internals/object-define-property"),a=e("../internals/an-object"),s=e("../internals/to-indexed-object"),u=e("../internals/object-keys");n.f=r&&!o?Object.defineProperties:function(e,t){a(e);for(var n,r=s(t),o=u(t),c=o.length,l=0;c>l;)i.f(e,n=o[l++],r[n]);return e}},{"../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(e,t,n){var r=e("../internals/global"),o=e("../internals/descriptors"),i=e("../internals/ie8-dom-define"),a=e("../internals/v8-prototype-define-bug"),s=e("../internals/an-object"),u=e("../internals/to-property-key"),c=r.TypeError,l=Object.defineProperty,f=Object.getOwnPropertyDescriptor,p="enumerable",h="configurable",d="writable";n.f=o?a?function(e,t,n){if(s(e),t=u(t),s(n),"function"==typeof e&&"prototype"===t&&"value"in n&&d in n&&!n[d]){var r=f(e,t);r&&r[d]&&(e[t]=n.value,n={configurable:h in n?n[h]:r[h],enumerable:p in n?n[p]:r[p],writable:!1})}return l(e,t,n)}:l:function(e,t,n){if(s(e),t=u(t),s(n),i)try{return l(e,t,n)}catch(e){}if("get"in n||"set"in n)throw c("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},{"../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(e,t,n){var r=e("../internals/descriptors"),o=e("../internals/function-call"),i=e("../internals/object-property-is-enumerable"),a=e("../internals/create-property-descriptor"),s=e("../internals/to-indexed-object"),u=e("../internals/to-property-key"),c=e("../internals/has-own-property"),l=e("../internals/ie8-dom-define"),f=Object.getOwnPropertyDescriptor;n.f=r?f:function(e,t){if(e=s(e),t=u(t),l)try{return f(e,t)}catch(e){}if(c(e,t))return a(!o(i.f,e,t),e[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(e,t,n){var r=e("../internals/classof-raw"),o=e("../internals/to-indexed-object"),i=e("../internals/object-get-own-property-names").f,a=e("../internals/array-slice-simple"),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],u=function(e){try{return i(e)}catch(e){return a(s)}};t.exports.f=function(e){return s&&"Window"==r(e)?u(e):i(o(e))}},{"../internals/array-slice-simple":116,"../internals/classof-raw":123,"../internals/object-get-own-property-names":201,"../internals/to-indexed-object":247}],201:[function(e,t,n){var r=e("../internals/object-keys-internal"),o=e("../internals/enum-bug-keys").concat("length","prototype");n.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],202:[function(e,t,n){n.f=Object.getOwnPropertySymbols},{}],203:[function(e,t,n){var r=e("../internals/global"),o=e("../internals/has-own-property"),i=e("../internals/is-callable"),a=e("../internals/to-object"),s=e("../internals/shared-key"),u=e("../internals/correct-prototype-getter"),c=s("IE_PROTO"),l=r.Object,f=l.prototype;t.exports=u?l.getPrototypeOf:function(e){var t=a(e);if(o(t,c))return t[c];var n=t.constructor;return i(n)&&t instanceof n?n.prototype:t instanceof l?f: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(e,t,n){var r=e("../internals/function-uncurry-this");t.exports=r({}.isPrototypeOf)},{"../internals/function-uncurry-this":157}],205:[function(e,t,n){var r=e("../internals/function-uncurry-this"),o=e("../internals/has-own-property"),i=e("../internals/to-indexed-object"),a=e("../internals/array-includes").indexOf,s=e("../internals/hidden-keys"),u=r([].push);t.exports=function(e,t){var n,r=i(e),c=0,l=[];for(n in r)!o(s,n)&&o(r,n)&&u(l,n);for(;t.length>c;)o(r,n=t[c++])&&(~a(l,n)||u(l,n));return l}},{"../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(e,t,n){var r=e("../internals/object-keys-internal"),o=e("../internals/enum-bug-keys");t.exports=Object.keys||function(e){return r(e,o)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],207:[function(e,t,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);n.f=i?function(e){var t=o(this,e);return!!t&&t.enumerable}:r},{}],208:[function(e,t,n){var r=e("../internals/function-uncurry-this"),o=e("../internals/an-object"),i=e("../internals/a-possible-prototype");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=r(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return o(n),i(r),t?e(n,r):n.__proto__=r,n}}():void 0)},{"../internals/a-possible-prototype":97,"../internals/an-object":101,"../internals/function-uncurry-this":157}],209:[function(e,t,n){var r=e("../internals/descriptors"),o=e("../internals/function-uncurry-this"),i=e("../internals/object-keys"),a=e("../internals/to-indexed-object"),s=o(e("../internals/object-property-is-enumerable").f),u=o([].push),c=function(e){return function(t){for(var n,o=a(t),c=i(o),l=c.length,f=0,p=[];l>f;)n=c[f++],r&&!s(o,n)||u(p,e?[n,o[n]]:o[n]);return p}};t.exports={entries:c(!0),values:c(!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(e,t,n){"use strict";var r=e("../internals/to-string-tag-support"),o=e("../internals/classof");t.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},{"../internals/classof":124,"../internals/to-string-tag-support":255}],211:[function(e,t,n){var r=e("../internals/global"),o=e("../internals/function-call"),i=e("../internals/is-callable"),a=e("../internals/is-object"),s=r.TypeError;t.exports=function(e,t){var n,r;if("string"===t&&i(n=e.toString)&&!a(r=o(n,e)))return r;if(i(n=e.valueOf)&&!a(r=o(n,e)))return r;if("string"!==t&&i(n=e.toString)&&!a(r=o(n,e)))return r;throw s("Can't convert object to primitive value")}},{"../internals/function-call":155,"../internals/global":163,"../internals/is-callable":176,"../internals/is-object":180}],212:[function(e,t,n){var r=e("../internals/get-built-in"),o=e("../internals/function-uncurry-this"),i=e("../internals/object-get-own-property-names"),a=e("../internals/object-get-own-property-symbols"),s=e("../internals/an-object"),u=o([].concat);t.exports=r("Reflect","ownKeys")||function(e){var t=i.f(s(e)),n=a.f;return n?u(t,n(e)):t}},{"../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(e,t,n){var r=e("../internals/global");t.exports=r},{"../internals/global":163}],214:[function(e,t,n){t.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},{}],215:[function(e,t,n){var r=e("../internals/global"),o=e("../internals/promise-native-constructor"),i=e("../internals/is-callable"),a=e("../internals/is-forced"),s=e("../internals/inspect-source"),u=e("../internals/well-known-symbol"),c=e("../internals/engine-is-browser"),l=e("../internals/is-pure"),f=e("../internals/engine-v8-version"),p=o&&o.prototype,h=u("species"),d=!1,m=i(r.PromiseRejectionEvent),g=a("Promise",(function(){var e=s(o),t=e!==String(o);if(!t&&66===f)return!0;if(l&&(!p.catch||!p.finally))return!0;if(f>=51&&/native code/.test(e))return!1;var n=new o((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};return(n.constructor={})[h]=r,!(d=n.then((function(){}))instanceof r)||!t&&c&&!m}));t.exports={CONSTRUCTOR:g,REJECTION_EVENT:m,SUBCLASSING:d}},{"../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(e,t,n){var r=e("../internals/global");t.exports=r.Promise},{"../internals/global":163}],217:[function(e,t,n){var r=e("../internals/an-object"),o=e("../internals/is-object"),i=e("../internals/new-promise-capability");t.exports=function(e,t){if(r(e),o(t)&&t.constructor===e)return t;var n=i.f(e);return(0,n.resolve)(t),n.promise}},{"../internals/an-object":101,"../internals/is-object":180,"../internals/new-promise-capability":193}],218:[function(e,t,n){var r=e("../internals/promise-native-constructor"),o=e("../internals/check-correctness-of-iteration"),i=e("../internals/promise-constructor-detection").CONSTRUCTOR;t.exports=i||!o((function(e){r.all(e).then(void 0,(function(){}))}))},{"../internals/check-correctness-of-iteration":122,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216}],219:[function(e,t,n){var r=e("../internals/object-define-property").f;t.exports=function(e,t,n){n in e||r(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})}},{"../internals/object-define-property":198}],220:[function(e,t,n){var r=function(){this.head=null,this.tail=null};r.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}},t.exports=r},{}],221:[function(e,t,n){var r=e("../internals/redefine");t.exports=function(e,t,n){for(var o in t)r(e,o,t[o],n);return e}},{"../internals/redefine":222}],222:[function(e,t,n){var r=e("../internals/global"),o=e("../internals/is-callable"),i=e("../internals/has-own-property"),a=e("../internals/create-non-enumerable-property"),s=e("../internals/set-global"),u=e("../internals/inspect-source"),c=e("../internals/internal-state"),l=e("../internals/function-name").CONFIGURABLE,f=c.get,p=c.enforce,h=String(String).split("String");(t.exports=function(e,t,n,u){var c,f=!!u&&!!u.unsafe,d=!!u&&!!u.enumerable,m=!!u&&!!u.noTargetGet,g=u&&void 0!==u.name?u.name:t;o(n)&&("Symbol("===String(g).slice(0,7)&&(g="["+String(g).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!i(n,"name")||l&&n.name!==g)&&a(n,"name",g),(c=p(n)).source||(c.source=h.join("string"==typeof g?g:""))),e!==r?(f?!m&&e[t]&&(d=!0):delete e[t],d?e[t]=n:a(e,t,n)):d?e[t]=n:s(t,n)})(Function.prototype,"toString",(function(){return o(this)&&f(this).source||u(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(e,t,n){var r=e("../internals/global"),o=e("../internals/function-call"),i=e("../internals/an-object"),a=e("../internals/is-callable"),s=e("../internals/classof-raw"),u=e("../internals/regexp-exec"),c=r.TypeError;t.exports=function(e,t){var n=e.exec;if(a(n)){var r=o(n,e,t);return null!==r&&i(r),r}if("RegExp"===s(e))return o(u,e,t);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(e,t,n){"use strict";var r,o,i=e("../internals/function-call"),a=e("../internals/function-uncurry-this"),s=e("../internals/to-string"),u=e("../internals/regexp-flags"),c=e("../internals/regexp-sticky-helpers"),l=e("../internals/shared"),f=e("../internals/object-create"),p=e("../internals/internal-state").get,h=e("../internals/regexp-unsupported-dot-all"),d=e("../internals/regexp-unsupported-ncg"),m=l("native-string-replace",String.prototype.replace),g=RegExp.prototype.exec,v=g,y=a("".charAt),b=a("".indexOf),w=a("".replace),x=a("".slice),A=(o=/b*/g,i(g,r=/a/,"a"),i(g,o,"a"),0!==r.lastIndex||0!==o.lastIndex),E=c.BROKEN_CARET,C=void 0!==/()??/.exec("")[1];(A||C||E||h||d)&&(v=function(e){var t,n,r,o,a,c,l,h=this,d=p(h),k=s(e),I=d.raw;if(I)return I.lastIndex=h.lastIndex,t=i(v,I,k),h.lastIndex=I.lastIndex,t;var S=d.groups,j=E&&h.sticky,T=i(u,h),R=h.source,O=0,D=k;if(j&&(T=w(T,"y",""),-1===b(T,"g")&&(T+="g"),D=x(k,h.lastIndex),h.lastIndex>0&&(!h.multiline||h.multiline&&"\n"!==y(k,h.lastIndex-1))&&(R="(?: "+R+")",D=" "+D,O++),n=new RegExp("^(?:"+R+")",T)),C&&(n=new RegExp("^"+R+"$(?!\\s)",T)),A&&(r=h.lastIndex),o=i(g,j?n:h,D),j?o?(o.input=x(o.input,O),o[0]=x(o[0],O),o.index=h.lastIndex,h.lastIndex+=o[0].length):h.lastIndex=0:A&&o&&(h.lastIndex=h.global?o.index+o[0].length:r),C&&o&&o.length>1&&i(m,o[0],n,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(o[a]=void 0)})),o&&S)for(o.groups=c=f(null),a=0;a<S.length;a++)c[(l=S[a])[0]]=o[l[1]];return o}),t.exports=v},{"../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(e,t,n){"use strict";var r=e("../internals/an-object");t.exports=function(){var e=r(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},{"../internals/an-object":101}],226:[function(e,t,n){var r=e("../internals/function-call"),o=e("../internals/has-own-property"),i=e("../internals/object-is-prototype-of"),a=e("../internals/regexp-flags"),s=RegExp.prototype;t.exports=function(e){var t=e.flags;return void 0!==t||"flags"in s||o(e,"flags")||!i(s,e)?t:r(a,e)}},{"../internals/function-call":155,"../internals/has-own-property":164,"../internals/object-is-prototype-of":204,"../internals/regexp-flags":225}],227:[function(e,t,n){var r=e("../internals/fails"),o=e("../internals/global").RegExp,i=r((function(){var e=o("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),a=i||r((function(){return!o("a","y").sticky})),s=i||r((function(){var e=o("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));t.exports={BROKEN_CARET:s,MISSED_STICKY:a,UNSUPPORTED_Y:i}},{"../internals/fails":150,"../internals/global":163}],228:[function(e,t,n){var r=e("../internals/fails"),o=e("../internals/global").RegExp;t.exports=r((function(){var e=o(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}))},{"../internals/fails":150,"../internals/global":163}],229:[function(e,t,n){var r=e("../internals/fails"),o=e("../internals/global").RegExp;t.exports=r((function(){var e=o("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}))},{"../internals/fails":150,"../internals/global":163}],230:[function(e,t,n){var r=e("../internals/global").TypeError;t.exports=function(e){if(null==e)throw r("Can't call method on "+e);return e}},{"../internals/global":163}],231:[function(e,t,n){t.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},{}],232:[function(e,t,n){var r=e("../internals/global"),o=Object.defineProperty;t.exports=function(e,t){try{o(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},{"../internals/global":163}],233:[function(e,t,n){"use strict";var r=e("../internals/get-built-in"),o=e("../internals/object-define-property"),i=e("../internals/well-known-symbol"),a=e("../internals/descriptors"),s=i("species");t.exports=function(e){var t=r(e),n=o.f;a&&t&&!t[s]&&n(t,s,{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(e,t,n){var r=e("../internals/object-define-property").f,o=e("../internals/has-own-property"),i=e("../internals/well-known-symbol")("toStringTag");t.exports=function(e,t,n){e&&!n&&(e=e.prototype),e&&!o(e,i)&&r(e,i,{configurable:!0,value:t})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],235:[function(e,t,n){var r=e("../internals/shared"),o=e("../internals/uid"),i=r("keys");t.exports=function(e){return i[e]||(i[e]=o(e))}},{"../internals/shared":237,"../internals/uid":263}],236:[function(e,t,n){var r=e("../internals/global"),o=e("../internals/set-global"),i="__core-js_shared__",a=r[i]||o(i,{});t.exports=a},{"../internals/global":163,"../internals/set-global":232}],237:[function(e,t,n){var r=e("../internals/is-pure"),o=e("../internals/shared-store");(t.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.22.1",mode:r?"pure":"global",copyright:"© 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(e,t,n){var r=e("../internals/an-object"),o=e("../internals/a-constructor"),i=e("../internals/well-known-symbol")("species");t.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||null==(n=r(a)[i])?t:o(n)}},{"../internals/a-constructor":96,"../internals/an-object":101,"../internals/well-known-symbol":268}],239:[function(e,t,n){var r=e("../internals/function-uncurry-this"),o=e("../internals/to-integer-or-infinity"),i=e("../internals/to-string"),a=e("../internals/require-object-coercible"),s=r("".charAt),u=r("".charCodeAt),c=r("".slice),l=function(e){return function(t,n){var r,l,f=i(a(t)),p=o(n),h=f.length;return p<0||p>=h?e?"":void 0:(r=u(f,p))<55296||r>56319||p+1===h||(l=u(f,p+1))<56320||l>57343?e?s(f,p):r:e?c(f,p,p+2):l-56320+(r-55296<<10)+65536}};t.exports={codeAt:l(!1),charAt:l(!0)}},{"../internals/function-uncurry-this":157,"../internals/require-object-coercible":230,"../internals/to-integer-or-infinity":248,"../internals/to-string":256}],240:[function(e,t,n){var r=e("../internals/function-name").PROPER,o=e("../internals/fails"),i=e("../internals/whitespaces"),a="…";t.exports=function(e){return o((function(){return!!i[e]()||a[e]()!==a||r&&i[e].name!==e}))}},{"../internals/fails":150,"../internals/function-name":156,"../internals/whitespaces":269}],241:[function(e,t,n){var r=e("../internals/function-uncurry-this"),o=e("../internals/require-object-coercible"),i=e("../internals/to-string"),a=e("../internals/whitespaces"),s=r("".replace),u="["+a+"]",c=RegExp("^"+u+u+"*"),l=RegExp(u+u+"*$"),f=function(e){return function(t){var n=i(o(t));return 1&e&&(n=s(n,c,"")),2&e&&(n=s(n,l,"")),n}};t.exports={start:f(1),end:f(2),trim:f(3)}},{"../internals/function-uncurry-this":157,"../internals/require-object-coercible":230,"../internals/to-string":256,"../internals/whitespaces":269}],242:[function(e,t,n){var r=e("../internals/function-call"),o=e("../internals/get-built-in"),i=e("../internals/well-known-symbol"),a=e("../internals/redefine");t.exports=function(){var e=o("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,s=i("toPrimitive");t&&!t[s]&&a(t,s,(function(e){return r(n,this)}))}},{"../internals/function-call":155,"../internals/get-built-in":158,"../internals/redefine":222,"../internals/well-known-symbol":268}],243:[function(e,t,n){var r,o,i,a,s=e("../internals/global"),u=e("../internals/function-apply"),c=e("../internals/function-bind-context"),l=e("../internals/is-callable"),f=e("../internals/has-own-property"),p=e("../internals/fails"),h=e("../internals/html"),d=e("../internals/array-slice"),m=e("../internals/document-create-element"),g=e("../internals/validate-arguments-length"),v=e("../internals/engine-is-ios"),y=e("../internals/engine-is-node"),b=s.setImmediate,w=s.clearImmediate,x=s.process,A=s.Dispatch,E=s.Function,C=s.MessageChannel,k=s.String,I=0,S={},j="onreadystatechange";try{r=s.location}catch(e){}var T=function(e){if(f(S,e)){var t=S[e];delete S[e],t()}},R=function(e){return function(){T(e)}},O=function(e){T(e.data)},D=function(e){s.postMessage(k(e),r.protocol+"//"+r.host)};b&&w||(b=function(e){g(arguments.length,1);var t=l(e)?e:E(e),n=d(arguments,1);return S[++I]=function(){u(t,void 0,n)},o(I),I},w=function(e){delete S[e]},y?o=function(e){x.nextTick(R(e))}:A&&A.now?o=function(e){A.now(R(e))}:C&&!v?(a=(i=new C).port2,i.port1.onmessage=O,o=c(a.postMessage,a)):s.addEventListener&&l(s.postMessage)&&!s.importScripts&&r&&"file:"!==r.protocol&&!p(D)?(o=D,s.addEventListener("message",O,!1)):o=j in m("script")?function(e){h.appendChild(m("script"))[j]=function(){h.removeChild(this),T(e)}}:function(e){setTimeout(R(e),0)}),t.exports={set:b,clear:w}},{"../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(e,t,n){var r=e("../internals/function-uncurry-this");t.exports=r(1..valueOf)},{"../internals/function-uncurry-this":157}],245:[function(e,t,n){var r=e("../internals/to-integer-or-infinity"),o=Math.max,i=Math.min;t.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):i(n,t)}},{"../internals/to-integer-or-infinity":248}],246:[function(e,t,n){var r=e("../internals/global"),o=e("../internals/to-integer-or-infinity"),i=e("../internals/to-length"),a=r.RangeError;t.exports=function(e){if(void 0===e)return 0;var t=o(e),n=i(t);if(t!==n)throw a("Wrong length or index");return n}},{"../internals/global":163,"../internals/to-integer-or-infinity":248,"../internals/to-length":249}],247:[function(e,t,n){var r=e("../internals/indexed-object"),o=e("../internals/require-object-coercible");t.exports=function(e){return r(o(e))}},{"../internals/indexed-object":170,"../internals/require-object-coercible":230}],248:[function(e,t,n){var r=Math.ceil,o=Math.floor;t.exports=function(e){var t=+e;return t!=t||0===t?0:(t>0?o:r)(t)}},{}],249:[function(e,t,n){var r=e("../internals/to-integer-or-infinity"),o=Math.min;t.exports=function(e){return e>0?o(r(e),9007199254740991):0}},{"../internals/to-integer-or-infinity":248}],250:[function(e,t,n){var r=e("../internals/global"),o=e("../internals/require-object-coercible"),i=r.Object;t.exports=function(e){return i(o(e))}},{"../internals/global":163,"../internals/require-object-coercible":230}],251:[function(e,t,n){var r=e("../internals/global"),o=e("../internals/to-positive-integer"),i=r.RangeError;t.exports=function(e,t){var n=o(e);if(n%t)throw i("Wrong offset");return n}},{"../internals/global":163,"../internals/to-positive-integer":252}],252:[function(e,t,n){var r=e("../internals/global"),o=e("../internals/to-integer-or-infinity"),i=r.RangeError;t.exports=function(e){var t=o(e);if(t<0)throw i("The argument can't be less than 0");return t}},{"../internals/global":163,"../internals/to-integer-or-infinity":248}],253:[function(e,t,n){var r=e("../internals/global"),o=e("../internals/function-call"),i=e("../internals/is-object"),a=e("../internals/is-symbol"),s=e("../internals/get-method"),u=e("../internals/ordinary-to-primitive"),c=e("../internals/well-known-symbol"),l=r.TypeError,f=c("toPrimitive");t.exports=function(e,t){if(!i(e)||a(e))return e;var n,r=s(e,f);if(r){if(void 0===t&&(t="default"),n=o(r,e,t),!i(n)||a(n))return n;throw l("Can't convert object to primitive value")}return void 0===t&&(t="number"),u(e,t)}},{"../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(e,t,n){var r=e("../internals/to-primitive"),o=e("../internals/is-symbol");t.exports=function(e){var t=r(e,"string");return o(t)?t:t+""}},{"../internals/is-symbol":183,"../internals/to-primitive":253}],255:[function(e,t,n){var r={};r[e("../internals/well-known-symbol")("toStringTag")]="z",t.exports="[object z]"===String(r)},{"../internals/well-known-symbol":268}],256:[function(e,t,n){var r=e("../internals/global"),o=e("../internals/classof"),i=r.String;t.exports=function(e){if("Symbol"===o(e))throw TypeError("Cannot convert a Symbol value to a string");return i(e)}},{"../internals/classof":124,"../internals/global":163}],257:[function(e,t,n){var r=e("../internals/global").String;t.exports=function(e){try{return r(e)}catch(e){return"Object"}}},{"../internals/global":163}],258:[function(e,t,n){"use strict";var r=e("../internals/export"),o=e("../internals/global"),i=e("../internals/function-call"),a=e("../internals/descriptors"),s=e("../internals/typed-array-constructors-require-wrappers"),u=e("../internals/array-buffer-view-core"),c=e("../internals/array-buffer"),l=e("../internals/an-instance"),f=e("../internals/create-property-descriptor"),p=e("../internals/create-non-enumerable-property"),h=e("../internals/is-integral-number"),d=e("../internals/to-length"),m=e("../internals/to-index"),g=e("../internals/to-offset"),v=e("../internals/to-property-key"),y=e("../internals/has-own-property"),b=e("../internals/classof"),w=e("../internals/is-object"),x=e("../internals/is-symbol"),A=e("../internals/object-create"),E=e("../internals/object-is-prototype-of"),C=e("../internals/object-set-prototype-of"),k=e("../internals/object-get-own-property-names").f,I=e("../internals/typed-array-from"),S=e("../internals/array-iteration").forEach,j=e("../internals/set-species"),T=e("../internals/object-define-property"),R=e("../internals/object-get-own-property-descriptor"),O=e("../internals/internal-state"),D=e("../internals/inherit-if-required"),B=O.get,_=O.set,N=T.f,P=R.f,M=Math.round,F=o.RangeError,L=c.ArrayBuffer,U=L.prototype,W=c.DataView,z=u.NATIVE_ARRAY_BUFFER_VIEWS,q=u.TYPED_ARRAY_CONSTRUCTOR,Q=u.TYPED_ARRAY_TAG,V=u.TypedArray,H=u.TypedArrayPrototype,G=u.aTypedArrayConstructor,X=u.isTypedArray,Z="BYTES_PER_ELEMENT",K="Wrong length",J=function(e,t){G(e);for(var n=0,r=t.length,o=new e(r);r>n;)o[n]=t[n++];return o},Y=function(e,t){N(e,t,{get:function(){return B(this)[t]}})},$=function(e){var t;return E(U,e)||"ArrayBuffer"==(t=b(e))||"SharedArrayBuffer"==t},ee=function(e,t){return X(e)&&!x(t)&&t in e&&h(+t)&&t>=0},te=function(e,t){return t=v(t),ee(e,t)?f(2,e[t]):P(e,t)},ne=function(e,t,n){return t=v(t),!(ee(e,t)&&w(n)&&y(n,"value"))||y(n,"get")||y(n,"set")||n.configurable||y(n,"writable")&&!n.writable||y(n,"enumerable")&&!n.enumerable?N(e,t,n):(e[t]=n.value,e)};a?(z||(R.f=te,T.f=ne,Y(H,"buffer"),Y(H,"byteOffset"),Y(H,"byteLength"),Y(H,"length")),r({target:"Object",stat:!0,forced:!z},{getOwnPropertyDescriptor:te,defineProperty:ne}),t.exports=function(e,t,n){var a=e.match(/\d+$/)[0]/8,u=e+(n?"Clamped":"")+"Array",c="get"+e,f="set"+e,h=o[u],v=h,y=v&&v.prototype,b={},x=function(e,t){var n=B(e);return n.view[c](t*a+n.byteOffset,!0)},E=function(e,t,r){var o=B(e);n&&(r=(r=M(r))<0?0:r>255?255:255&r),o.view[f](t*a+o.byteOffset,r,!0)},T=function(e,t){N(e,t,{get:function(){return x(this,t)},set:function(e){return E(this,t,e)},enumerable:!0})};z?s&&(v=t((function(e,t,n,r){return l(e,y),D(w(t)?$(t)?void 0!==r?new h(t,g(n,a),r):void 0!==n?new h(t,g(n,a)):new h(t):X(t)?J(v,t):i(I,v,t):new h(m(t)),e,v)})),C&&C(v,V),S(k(h),(function(e){e in v||p(v,e,h[e])})),v.prototype=y):(v=t((function(e,t,n,r){l(e,y);var o,s,u,c=0,f=0;if(w(t)){if(!$(t))return X(t)?J(v,t):i(I,v,t);o=t,f=g(n,a);var p=t.byteLength;if(void 0===r){if(p%a)throw F(K);if((s=p-f)<0)throw F(K)}else if((s=d(r)*a)+f>p)throw F(K);u=s/a}else u=m(t),o=new L(s=u*a);for(_(e,{buffer:o,byteOffset:f,byteLength:s,length:u,view:new W(o)});c<u;)T(e,c++)})),C&&C(v,V),y=v.prototype=A(H)),y.constructor!==v&&p(y,"constructor",v),p(y,q,v),Q&&p(y,Q,u),b[u]=v,r({global:!0,forced:v!=h,sham:!z},b),Z in v||p(v,Z,a),Z in y||p(y,Z,a),j(u)}):t.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(e,t,n){var r=e("../internals/global"),o=e("../internals/fails"),i=e("../internals/check-correctness-of-iteration"),a=e("../internals/array-buffer-view-core").NATIVE_ARRAY_BUFFER_VIEWS,s=r.ArrayBuffer,u=r.Int8Array;t.exports=!a||!o((function(){u(1)}))||!o((function(){new u(-1)}))||!i((function(e){new u,new u(null),new u(1.5),new u(e)}),!0)||o((function(){return 1!==new u(new s(2),1,void 0).length}))},{"../internals/array-buffer-view-core":103,"../internals/check-correctness-of-iteration":122,"../internals/fails":150,"../internals/global":163}],260:[function(e,t,n){var r=e("../internals/array-from-constructor-and-list"),o=e("../internals/typed-array-species-constructor");t.exports=function(e,t){return r(o(e),t)}},{"../internals/array-from-constructor-and-list":108,"../internals/typed-array-species-constructor":262}],261:[function(e,t,n){var r=e("../internals/function-bind-context"),o=e("../internals/function-call"),i=e("../internals/a-constructor"),a=e("../internals/to-object"),s=e("../internals/length-of-array-like"),u=e("../internals/get-iterator"),c=e("../internals/get-iterator-method"),l=e("../internals/is-array-iterator-method"),f=e("../internals/array-buffer-view-core").aTypedArrayConstructor;t.exports=function(e){var t,n,p,h,d,m,g=i(this),v=a(e),y=arguments.length,b=y>1?arguments[1]:void 0,w=void 0!==b,x=c(v);if(x&&!l(x))for(m=(d=u(v,x)).next,v=[];!(h=o(m,d)).done;)v.push(h.value);for(w&&y>2&&(b=r(b,arguments[2])),n=s(v),p=new(f(g))(n),t=0;n>t;t++)p[t]=w?b(v[t],t):v[t];return p}},{"../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(e,t,n){var r=e("../internals/array-buffer-view-core"),o=e("../internals/species-constructor"),i=r.TYPED_ARRAY_CONSTRUCTOR,a=r.aTypedArrayConstructor;t.exports=function(e){return a(o(e,e[i]))}},{"../internals/array-buffer-view-core":103,"../internals/species-constructor":238}],263:[function(e,t,n){var r=e("../internals/function-uncurry-this"),o=0,i=Math.random(),a=r(1..toString);t.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++o+i,36)}},{"../internals/function-uncurry-this":157}],264:[function(e,t,n){var r=e("../internals/native-symbol");t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},{"../internals/native-symbol":191}],265:[function(e,t,n){var r=e("../internals/descriptors"),o=e("../internals/fails");t.exports=r&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},{"../internals/descriptors":134,"../internals/fails":150}],266:[function(e,t,n){var r=e("../internals/global").TypeError;t.exports=function(e,t){if(e<t)throw r("Not enough arguments");return e}},{"../internals/global":163}],267:[function(e,t,n){var r=e("../internals/well-known-symbol");n.f=r},{"../internals/well-known-symbol":268}],268:[function(e,t,n){var r=e("../internals/global"),o=e("../internals/shared"),i=e("../internals/has-own-property"),a=e("../internals/uid"),s=e("../internals/native-symbol"),u=e("../internals/use-symbol-as-uid"),c=o("wks"),l=r.Symbol,f=l&&l.for,p=u?l:l&&l.withoutSetter||a;t.exports=function(e){if(!i(c,e)||!s&&"string"!=typeof c[e]){var t="Symbol."+e;s&&i(l,e)?c[e]=l[e]:c[e]=u&&f?f(t):p(t)}return c[e]}},{"../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(e,t,n){t.exports="\t\n\v\f\r    \u2028\u2029\ufeff"},{}],270:[function(e,t,n){"use strict";var r=e("../internals/export"),o=e("../internals/global"),i=e("../internals/array-buffer"),a=e("../internals/set-species"),s="ArrayBuffer",u=i[s];r({global:!0,forced:o[s]!==u},{ArrayBuffer:u}),a(s)},{"../internals/array-buffer":104,"../internals/export":149,"../internals/global":163,"../internals/set-species":233}],271:[function(e,t,n){"use strict";var r=e("../internals/export"),o=e("../internals/function-uncurry-this"),i=e("../internals/fails"),a=e("../internals/array-buffer"),s=e("../internals/an-object"),u=e("../internals/to-absolute-index"),c=e("../internals/to-length"),l=e("../internals/species-constructor"),f=a.ArrayBuffer,p=a.DataView,h=p.prototype,d=o(f.prototype.slice),m=o(h.getUint8),g=o(h.setUint8);r({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:i((function(){return!new f(2).slice(1,void 0).byteLength}))},{slice:function(e,t){if(d&&void 0===t)return d(s(this),e);for(var n=s(this).byteLength,r=u(e,n),o=u(void 0===t?n:t,n),i=new(l(this,f))(c(o-r)),a=new p(this),h=new p(i),v=0;r<o;)g(h,v++,m(a,r++));return i}})},{"../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(e,t,n){"use strict";var r=e("../internals/export"),o=e("../internals/global"),i=e("../internals/fails"),a=e("../internals/is-array"),s=e("../internals/is-object"),u=e("../internals/to-object"),c=e("../internals/length-of-array-like"),l=e("../internals/create-property"),f=e("../internals/array-species-create"),p=e("../internals/array-method-has-species-support"),h=e("../internals/well-known-symbol"),d=e("../internals/engine-v8-version"),m=h("isConcatSpreadable"),g=9007199254740991,v="Maximum allowed index exceeded",y=o.TypeError,b=d>=51||!i((function(){var e=[];return e[m]=!1,e.concat()[0]!==e})),w=p("concat"),x=function(e){if(!s(e))return!1;var t=e[m];return void 0!==t?!!t:a(e)};r({target:"Array",proto:!0,forced:!b||!w},{concat:function(e){var t,n,r,o,i,a=u(this),s=f(a,0),p=0;for(t=-1,r=arguments.length;t<r;t++)if(x(i=-1===t?a:arguments[t])){if(p+(o=c(i))>g)throw y(v);for(n=0;n<o;n++,p++)n in i&&l(s,p,i[n])}else{if(p>=g)throw y(v);l(s,p++,i)}return s.length=p,s}})},{"../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(e,t,n){var r=e("../internals/export"),o=e("../internals/array-fill"),i=e("../internals/add-to-unscopables");r({target:"Array",proto:!0},{fill:o}),i("fill")},{"../internals/add-to-unscopables":98,"../internals/array-fill":106,"../internals/export":149}],274:[function(e,t,n){"use strict";var r=e("../internals/export"),o=e("../internals/array-iteration").filter;r({target:"Array",proto:!0,forced:!e("../internals/array-method-has-species-support")("filter")},{filter:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],275:[function(e,t,n){"use strict";var r=e("../internals/export"),o=e("../internals/array-iteration").find,i=e("../internals/add-to-unscopables"),a="find",s=!0;a in[]&&Array(1)[a]((function(){s=!1})),r({target:"Array",proto:!0,forced:s},{find:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),i(a)},{"../internals/add-to-unscopables":98,"../internals/array-iteration":111,"../internals/export":149}],276:[function(e,t,n){var r=e("../internals/export"),o=e("../internals/array-from");r({target:"Array",stat:!0,forced:!e("../internals/check-correctness-of-iteration")((function(e){Array.from(e)}))},{from:o})},{"../internals/array-from":109,"../internals/check-correctness-of-iteration":122,"../internals/export":149}],277:[function(e,t,n){"use strict";var r=e("../internals/export"),o=e("../internals/array-includes").includes,i=e("../internals/add-to-unscopables");r({target:"Array",proto:!0},{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),i("includes")},{"../internals/add-to-unscopables":98,"../internals/array-includes":110,"../internals/export":149}],278:[function(e,t,n){"use strict";var r=e("../internals/to-indexed-object"),o=e("../internals/add-to-unscopables"),i=e("../internals/iterators"),a=e("../internals/internal-state"),s=e("../internals/object-define-property").f,u=e("../internals/define-iterator"),c=e("../internals/is-pure"),l=e("../internals/descriptors"),f="Array Iterator",p=a.set,h=a.getterFor(f);t.exports=u(Array,"Array",(function(e,t){p(this,{type:f,target:r(e),index:0,kind:t})}),(function(){var e=h(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values");var d=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!c&&l&&"values"!==d.name)try{s(d,"name",{value:"values"})}catch(e){}},{"../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(e,t,n){"use strict";var r=e("../internals/export"),o=e("../internals/function-uncurry-this"),i=e("../internals/indexed-object"),a=e("../internals/to-indexed-object"),s=e("../internals/array-method-is-strict"),u=o([].join),c=i!=Object,l=s("join",",");r({target:"Array",proto:!0,forced:c||!l},{join:function(e){return u(a(this),void 0===e?",":e)}})},{"../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(e,t,n){"use strict";var r=e("../internals/export"),o=e("../internals/array-iteration").map;r({target:"Array",proto:!0,forced:!e("../internals/array-method-has-species-support")("map")},{map:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],281:[function(e,t,n){"use strict";var r=e("../internals/export"),o=e("../internals/global"),i=e("../internals/is-array"),a=e("../internals/is-constructor"),s=e("../internals/is-object"),u=e("../internals/to-absolute-index"),c=e("../internals/length-of-array-like"),l=e("../internals/to-indexed-object"),f=e("../internals/create-property"),p=e("../internals/well-known-symbol"),h=e("../internals/array-method-has-species-support"),d=e("../internals/array-slice"),m=h("slice"),g=p("species"),v=o.Array,y=Math.max;r({target:"Array",proto:!0,forced:!m},{slice:function(e,t){var n,r,o,p=l(this),h=c(p),m=u(e,h),b=u(void 0===t?h:t,h);if(i(p)&&(n=p.constructor,(a(n)&&(n===v||i(n.prototype))||s(n)&&null===(n=n[g]))&&(n=void 0),n===v||void 0===n))return d(p,m,b);for(r=new(void 0===n?v:n)(y(b-m,0)),o=0;m<b;m++,o++)m in p&&f(r,o,p[m]);return r.length=o,r}})},{"../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(e,t,n){"use strict";var r=e("../internals/export"),o=e("../internals/function-uncurry-this"),i=e("../internals/a-callable"),a=e("../internals/to-object"),s=e("../internals/length-of-array-like"),u=e("../internals/to-string"),c=e("../internals/fails"),l=e("../internals/array-sort"),f=e("../internals/array-method-is-strict"),p=e("../internals/engine-ff-version"),h=e("../internals/engine-is-ie-or-edge"),d=e("../internals/engine-v8-version"),m=e("../internals/engine-webkit-version"),g=[],v=o(g.sort),y=o(g.push),b=c((function(){g.sort(void 0)})),w=c((function(){g.sort(null)})),x=f("sort"),A=!c((function(){if(d)return d<70;if(!(p&&p>3)){if(h)return!0;if(m)return m<603;var e,t,n,r,o="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)g.push({k:t+r,v:n})}for(g.sort((function(e,t){return t.v-e.v})),r=0;r<g.length;r++)t=g[r].k.charAt(0),o.charAt(o.length-1)!==t&&(o+=t);return"DGBEFHACIJK"!==o}})),E=function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:u(t)>u(n)?1:-1}};r({target:"Array",proto:!0,forced:b||!w||!x||!A},{sort:function(e){void 0!==e&&i(e);var t=a(this);if(A)return void 0===e?v(t):v(t,e);var n,r,o=[],u=s(t);for(r=0;r<u;r++)r in t&&y(o,t[r]);for(l(o,E(e)),n=o.length,r=0;r<n;)t[r]=o[r++];for(;r<u;)delete t[r++];return t}})},{"../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(e,t,n){"use strict";var r=e("../internals/export"),o=e("../internals/global"),i=e("../internals/to-absolute-index"),a=e("../internals/to-integer-or-infinity"),s=e("../internals/length-of-array-like"),u=e("../internals/to-object"),c=e("../internals/array-species-create"),l=e("../internals/create-property"),f=e("../internals/array-method-has-species-support")("splice"),p=o.TypeError,h=Math.max,d=Math.min,m=9007199254740991,g="Maximum allowed length exceeded";r({target:"Array",proto:!0,forced:!f},{splice:function(e,t){var n,r,o,f,v,y,b=u(this),w=s(b),x=i(e,w),A=arguments.length;if(0===A?n=r=0:1===A?(n=0,r=w-x):(n=A-2,r=d(h(a(t),0),w-x)),w+n-r>m)throw p(g);for(o=c(b,r),f=0;f<r;f++)(v=x+f)in b&&l(o,f,b[v]);if(o.length=r,n<r){for(f=x;f<w-r;f++)y=f+n,(v=f+r)in b?b[y]=b[v]:delete b[y];for(f=w;f>w-r+n;f--)delete b[f-1]}else if(n>r)for(f=w-r;f>x;f--)y=f+n-1,(v=f+r-1)in b?b[y]=b[v]:delete b[y];for(f=0;f<n;f++)b[f+x]=arguments[f+2];return b.length=w-r+n,o}})},{"../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(e,t,n){var r=e("../internals/descriptors"),o=e("../internals/function-name").EXISTS,i=e("../internals/function-uncurry-this"),a=e("../internals/object-define-property").f,s=Function.prototype,u=i(s.toString),c=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,l=i(c.exec);r&&!o&&a(s,"name",{configurable:!0,get:function(){try{return l(c,u(this))[1]}catch(e){return""}}})},{"../internals/descriptors":134,"../internals/function-name":156,"../internals/function-uncurry-this":157,"../internals/object-define-property":198}],285:[function(e,t,n){var r=e("../internals/export"),o=e("../internals/get-built-in"),i=e("../internals/function-apply"),a=e("../internals/function-call"),s=e("../internals/function-uncurry-this"),u=e("../internals/fails"),c=e("../internals/is-array"),l=e("../internals/is-callable"),f=e("../internals/is-object"),p=e("../internals/is-symbol"),h=e("../internals/array-slice"),d=e("../internals/native-symbol"),m=o("JSON","stringify"),g=s(/./.exec),v=s("".charAt),y=s("".charCodeAt),b=s("".replace),w=s(1..toString),x=/[\uD800-\uDFFF]/g,A=/^[\uD800-\uDBFF]$/,E=/^[\uDC00-\uDFFF]$/,C=!d||u((function(){var e=o("Symbol")();return"[null]"!=m([e])||"{}"!=m({a:e})||"{}"!=m(Object(e))})),k=u((function(){return'"\\udf06\\ud834"'!==m("\udf06\ud834")||'"\\udead"'!==m("\udead")})),I=function(e,t){var n=h(arguments),r=t;if((f(t)||void 0!==e)&&!p(e))return c(t)||(t=function(e,t){if(l(r)&&(t=a(r,this,e,t)),!p(t))return t}),n[1]=t,i(m,null,n)},S=function(e,t,n){var r=v(n,t-1),o=v(n,t+1);return g(A,e)&&!g(E,o)||g(E,e)&&!g(A,r)?"\\u"+w(y(e,0),16):e};m&&r({target:"JSON",stat:!0,forced:C||k},{stringify:function(e,t,n){var r=h(arguments),o=i(C?I:m,null,r);return k&&"string"==typeof o?b(o,x,S):o}})},{"../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(e,t,n){"use strict";var r=e("../internals/descriptors"),o=e("../internals/global"),i=e("../internals/function-uncurry-this"),a=e("../internals/is-forced"),s=e("../internals/redefine"),u=e("../internals/has-own-property"),c=e("../internals/inherit-if-required"),l=e("../internals/object-is-prototype-of"),f=e("../internals/is-symbol"),p=e("../internals/to-primitive"),h=e("../internals/fails"),d=e("../internals/object-get-own-property-names").f,m=e("../internals/object-get-own-property-descriptor").f,g=e("../internals/object-define-property").f,v=e("../internals/this-number-value"),y=e("../internals/string-trim").trim,b="Number",w=o[b],x=w.prototype,A=o.TypeError,E=i("".slice),C=i("".charCodeAt),k=function(e){var t=p(e,"number");return"bigint"==typeof t?t:I(t)},I=function(e){var t,n,r,o,i,a,s,u,c=p(e,"number");if(f(c))throw A("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=y(c),43===(t=C(c,0))||45===t){if(88===(n=C(c,2))||120===n)return NaN}else if(48===t){switch(C(c,1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+c}for(a=(i=E(c,2)).length,s=0;s<a;s++)if((u=C(i,s))<48||u>o)return NaN;return parseInt(i,r)}return+c};if(a(b,!w(" 0o1")||!w("0b1")||w("+0x1"))){for(var S,j=function(e){var t=arguments.length<1?0:w(k(e)),n=this;return l(x,n)&&h((function(){v(n)}))?c(Object(t),n,j):t},T=r?d(w):"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(","),R=0;T.length>R;R++)u(w,S=T[R])&&!u(j,S)&&g(j,S,m(w,S));j.prototype=x,x.constructor=j,s(o,b,j)}},{"../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(e,t,n){var r=e("../internals/export"),o=e("../internals/object-assign");r({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},{"../internals/export":149,"../internals/object-assign":195}],288:[function(e,t,n){var r=e("../internals/export"),o=e("../internals/object-to-array").entries;r({target:"Object",stat:!0},{entries:function(e){return o(e)}})},{"../internals/export":149,"../internals/object-to-array":209}],289:[function(e,t,n){var r=e("../internals/export"),o=e("../internals/native-symbol"),i=e("../internals/fails"),a=e("../internals/object-get-own-property-symbols"),s=e("../internals/to-object");r({target:"Object",stat:!0,forced:!o||i((function(){a.f(1)}))},{getOwnPropertySymbols:function(e){var t=a.f;return t?t(s(e)):[]}})},{"../internals/export":149,"../internals/fails":150,"../internals/native-symbol":191,"../internals/object-get-own-property-symbols":202,"../internals/to-object":250}],290:[function(e,t,n){var r=e("../internals/export"),o=e("../internals/to-object"),i=e("../internals/object-keys");r({target:"Object",stat:!0,forced:e("../internals/fails")((function(){i(1)}))},{keys:function(e){return i(o(e))}})},{"../internals/export":149,"../internals/fails":150,"../internals/object-keys":206,"../internals/to-object":250}],291:[function(e,t,n){var r=e("../internals/to-string-tag-support"),o=e("../internals/redefine"),i=e("../internals/object-to-string");r||o(Object.prototype,"toString",i,{unsafe:!0})},{"../internals/object-to-string":210,"../internals/redefine":222,"../internals/to-string-tag-support":255}],292:[function(e,t,n){"use strict";var r=e("../internals/export"),o=e("../internals/function-call"),i=e("../internals/a-callable"),a=e("../internals/new-promise-capability"),s=e("../internals/perform"),u=e("../internals/iterate");r({target:"Promise",stat:!0,forced:e("../internals/promise-statics-incorrect-iteration")},{all:function(e){var t=this,n=a.f(t),r=n.resolve,c=n.reject,l=s((function(){var n=i(t.resolve),a=[],s=0,l=1;u(e,(function(e){var i=s++,u=!1;l++,o(n,t,e).then((function(e){u||(u=!0,a[i]=e,--l||r(a))}),c)})),--l||r(a)}));return l.error&&c(l.value),n.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(e,t,n){"use strict";var r=e("../internals/export"),o=e("../internals/is-pure"),i=e("../internals/promise-constructor-detection").CONSTRUCTOR,a=e("../internals/promise-native-constructor"),s=e("../internals/get-built-in"),u=e("../internals/is-callable"),c=e("../internals/redefine"),l=a&&a.prototype;if(r({target:"Promise",proto:!0,forced:i,real:!0},{catch:function(e){return this.then(void 0,e)}}),!o&&u(a)){var f=s("Promise").prototype.catch;l.catch!==f&&c(l,"catch",f,{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(e,t,n){"use strict";var r,o,i,a,s=e("../internals/export"),u=e("../internals/is-pure"),c=e("../internals/engine-is-node"),l=e("../internals/global"),f=e("../internals/function-call"),p=e("../internals/redefine"),h=e("../internals/redefine-all"),d=e("../internals/object-set-prototype-of"),m=e("../internals/set-to-string-tag"),g=e("../internals/set-species"),v=e("../internals/a-callable"),y=e("../internals/is-callable"),b=e("../internals/is-object"),w=e("../internals/an-instance"),x=e("../internals/species-constructor"),A=e("../internals/task").set,E=e("../internals/microtask"),C=e("../internals/host-report-errors"),k=e("../internals/perform"),I=e("../internals/queue"),S=e("../internals/internal-state"),j=e("../internals/promise-native-constructor"),T=e("../internals/promise-constructor-detection"),R=e("../internals/new-promise-capability"),O="Promise",D=T.CONSTRUCTOR,B=T.REJECTION_EVENT,_=T.SUBCLASSING,N=S.getterFor(O),P=S.set,M=j&&j.prototype,F=j,L=M,U=l.TypeError,W=l.document,z=l.process,q=R.f,Q=q,V=!!(W&&W.createEvent&&l.dispatchEvent),H="unhandledrejection",G="rejectionhandled",X=0,Z=1,K=2,J=1,Y=2,$=function(e){var t;return!(!b(e)||!y(t=e.then))&&t},ee=function(e,t){var n,r,o,i=t.value,a=t.state==Z,s=a?e.ok:e.fail,u=e.resolve,c=e.reject,l=e.domain;try{s?(a||(t.rejection===Y&&ie(t),t.rejection=J),!0===s?n=i:(l&&l.enter(),n=s(i),l&&(l.exit(),o=!0)),n===e.promise?c(U("Promise-chain cycle")):(r=$(n))?f(r,n,u,c):u(n)):c(i)}catch(e){l&&!o&&l.exit(),c(e)}},te=function(e,t){e.notified||(e.notified=!0,E((function(){for(var n,r=e.reactions;n=r.get();)ee(n,e);e.notified=!1,t&&!e.rejection&&re(e)})))},ne=function(e,t,n){var r,o;V?((r=W.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),l.dispatchEvent(r)):r={promise:t,reason:n},!B&&(o=l["on"+e])?o(r):e===H&&C("Unhandled promise rejection",n)},re=function(e){f(A,l,(function(){var t,n=e.facade,r=e.value;if(oe(e)&&(t=k((function(){c?z.emit("unhandledRejection",r,n):ne(H,n,r)})),e.rejection=c||oe(e)?Y:J,t.error))throw t.value}))},oe=function(e){return e.rejection!==J&&!e.parent},ie=function(e){f(A,l,(function(){var t=e.facade;c?z.emit("rejectionHandled",t):ne(G,t,e.value)}))},ae=function(e,t,n){return function(r){e(t,r,n)}},se=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=K,te(e,!0))},ue=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw U("Promise can't be resolved itself");var r=$(t);r?E((function(){var n={done:!1};try{f(r,t,ae(ue,n,e),ae(se,n,e))}catch(t){se(n,t,e)}})):(e.value=t,e.state=Z,te(e,!1))}catch(t){se({done:!1},t,e)}}};if(D&&(L=(F=function(e){w(this,L),v(e),f(r,this);var t=N(this);try{e(ae(ue,t),ae(se,t))}catch(e){se(t,e)}}).prototype,(r=function(e){P(this,{type:O,done:!1,notified:!1,parent:!1,reactions:new I,rejection:!1,state:X,value:void 0})}).prototype=h(L,{then:function(e,t){var n=N(this),r=q(x(this,F));return n.parent=!0,r.ok=!y(e)||e,r.fail=y(t)&&t,r.domain=c?z.domain:void 0,n.state==X?n.reactions.add(r):E((function(){ee(r,n)})),r.promise}}),o=function(){var e=new r,t=N(e);this.promise=e,this.resolve=ae(ue,t),this.reject=ae(se,t)},R.f=q=function(e){return e===F||e===i?new o(e):Q(e)},!u&&y(j)&&M!==Object.prototype)){a=M.then,_||p(M,"then",(function(e,t){var n=this;return new F((function(e,t){f(a,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete M.constructor}catch(e){}d&&d(M,L)}s({global:!0,wrap:!0,forced:D},{Promise:F}),m(F,O,!1,!0),g(O)},{"../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(e,t,n){e("../modules/es.promise.constructor"),e("../modules/es.promise.all"),e("../modules/es.promise.catch"),e("../modules/es.promise.race"),e("../modules/es.promise.reject"),e("../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(e,t,n){"use strict";var r=e("../internals/export"),o=e("../internals/function-call"),i=e("../internals/a-callable"),a=e("../internals/new-promise-capability"),s=e("../internals/perform"),u=e("../internals/iterate");r({target:"Promise",stat:!0,forced:e("../internals/promise-statics-incorrect-iteration")},{race:function(e){var t=this,n=a.f(t),r=n.reject,c=s((function(){var a=i(t.resolve);u(e,(function(e){o(a,t,e).then(n.resolve,r)}))}));return c.error&&r(c.value),n.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(e,t,n){"use strict";var r=e("../internals/export"),o=e("../internals/function-call"),i=e("../internals/new-promise-capability");r({target:"Promise",stat:!0,forced:e("../internals/promise-constructor-detection").CONSTRUCTOR},{reject:function(e){var t=i.f(this);return o(t.reject,void 0,e),t.promise}})},{"../internals/export":149,"../internals/function-call":155,"../internals/new-promise-capability":193,"../internals/promise-constructor-detection":215}],298:[function(e,t,n){"use strict";var r=e("../internals/export"),o=e("../internals/get-built-in"),i=e("../internals/is-pure"),a=e("../internals/promise-native-constructor"),s=e("../internals/promise-constructor-detection").CONSTRUCTOR,u=e("../internals/promise-resolve"),c=o("Promise"),l=i&&!s;r({target:"Promise",stat:!0,forced:i||s},{resolve:function(e){return u(l&&this===c?a:this,e)}})},{"../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(e,t,n){var r=e("../internals/descriptors"),o=e("../internals/global"),i=e("../internals/function-uncurry-this"),a=e("../internals/is-forced"),s=e("../internals/inherit-if-required"),u=e("../internals/create-non-enumerable-property"),c=e("../internals/object-get-own-property-names").f,l=e("../internals/object-is-prototype-of"),f=e("../internals/is-regexp"),p=e("../internals/to-string"),h=e("../internals/regexp-get-flags"),d=e("../internals/regexp-sticky-helpers"),m=e("../internals/proxy-accessor"),g=e("../internals/redefine"),v=e("../internals/fails"),y=e("../internals/has-own-property"),b=e("../internals/internal-state").enforce,w=e("../internals/set-species"),x=e("../internals/well-known-symbol"),A=e("../internals/regexp-unsupported-dot-all"),E=e("../internals/regexp-unsupported-ncg"),C=x("match"),k=o.RegExp,I=k.prototype,S=o.SyntaxError,j=i(I.exec),T=i("".charAt),R=i("".replace),O=i("".indexOf),D=i("".slice),B=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,_=/a/g,N=/a/g,P=new k(_)!==_,M=d.MISSED_STICKY,F=d.UNSUPPORTED_Y,L=r&&(!P||M||A||E||v((function(){return N[C]=!1,k(_)!=_||k(N)==N||"/a/i"!=k(_,"i")}))),U=function(e){for(var t,n=e.length,r=0,o="",i=!1;r<=n;r++)"\\"!==(t=T(e,r))?i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),o+=t):o+="[\\s\\S]":o+=t+T(e,++r);return o},W=function(e){for(var t,n=e.length,r=0,o="",i=[],a={},s=!1,u=!1,c=0,l="";r<=n;r++){if("\\"===(t=T(e,r)))t+=T(e,++r);else if("]"===t)s=!1;else if(!s)switch(!0){case"["===t:s=!0;break;case"("===t:j(B,D(e,r+1))&&(r+=2,u=!0),o+=t,c++;continue;case">"===t&&u:if(""===l||y(a,l))throw new S("Invalid capture group name");a[l]=!0,i[i.length]=[l,c],u=!1,l="";continue}u?l+=t:o+=t}return[o,i]};if(a("RegExp",L)){for(var z=function(e,t){var n,r,o,i,a,c,d=l(I,this),m=f(e),g=void 0===t,v=[],y=e;if(!d&&m&&g&&e.constructor===z)return e;if((m||l(I,e))&&(e=e.source,g&&(t=h(y))),e=void 0===e?"":p(e),t=void 0===t?"":p(t),y=e,A&&"dotAll"in _&&(r=!!t&&O(t,"s")>-1)&&(t=R(t,/s/g,"")),n=t,M&&"sticky"in _&&(o=!!t&&O(t,"y")>-1)&&F&&(t=R(t,/y/g,"")),E&&(e=(i=W(e))[0],v=i[1]),a=s(k(e,t),d?this:I,z),(r||o||v.length)&&(c=b(a),r&&(c.dotAll=!0,c.raw=z(U(e),n)),o&&(c.sticky=!0),v.length&&(c.groups=v)),e!==y)try{u(a,"source",""===y?"(?:)":y)}catch(e){}return a},q=c(k),Q=0;q.length>Q;)m(z,k,q[Q++]);I.constructor=z,z.prototype=I,g(o,"RegExp",z)}w("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(e,t,n){"use strict";var r=e("../internals/export"),o=e("../internals/regexp-exec");r({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},{"../internals/export":149,"../internals/regexp-exec":224}],301:[function(e,t,n){"use strict";var r=e("../internals/function-name").PROPER,o=e("../internals/redefine"),i=e("../internals/an-object"),a=e("../internals/to-string"),s=e("../internals/fails"),u=e("../internals/regexp-get-flags"),c="toString",l=RegExp.prototype[c],f=s((function(){return"/a/b"!=l.call({source:"a",flags:"b"})})),p=r&&l.name!=c;(f||p)&&o(RegExp.prototype,c,(function(){var e=i(this);return"/"+a(e.source)+"/"+a(u(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(e,t,n){"use strict";var r=e("../internals/export"),o=e("../internals/function-uncurry-this"),i=e("../internals/not-a-regexp"),a=e("../internals/require-object-coercible"),s=e("../internals/to-string"),u=e("../internals/correct-is-regexp-logic"),c=o("".indexOf);r({target:"String",proto:!0,forced:!u("includes")},{includes:function(e){return!!~c(s(a(this)),s(i(e)),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(e,t,n){"use strict";var r=e("../internals/string-multibyte").charAt,o=e("../internals/to-string"),i=e("../internals/internal-state"),a=e("../internals/define-iterator"),s="String Iterator",u=i.set,c=i.getterFor(s);a(String,"String",(function(e){u(this,{type:s,string:o(e),index:0})}),(function(){var e,t=c(this),n=t.string,o=t.index;return o>=n.length?{value:void 0,done:!0}:(e=r(n,o),t.index+=e.length,{value:e,done:!1})}))},{"../internals/define-iterator":132,"../internals/internal-state":173,"../internals/string-multibyte":239,"../internals/to-string":256}],304:[function(e,t,n){"use strict";var r=e("../internals/function-call"),o=e("../internals/fix-regexp-well-known-symbol-logic"),i=e("../internals/an-object"),a=e("../internals/to-length"),s=e("../internals/to-string"),u=e("../internals/require-object-coercible"),c=e("../internals/get-method"),l=e("../internals/advance-string-index"),f=e("../internals/regexp-exec-abstract");o("match",(function(e,t,n){return[function(t){var n=u(this),o=null==t?void 0:c(t,e);return o?r(o,t,n):new RegExp(t)[e](s(n))},function(e){var r=i(this),o=s(e),u=n(t,r,o);if(u.done)return u.value;if(!r.global)return f(r,o);var c=r.unicode;r.lastIndex=0;for(var p,h=[],d=0;null!==(p=f(r,o));){var m=s(p[0]);h[d]=m,""===m&&(r.lastIndex=l(o,a(r.lastIndex),c)),d++}return 0===d?null:h}]}))},{"../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(e,t,n){"use strict";var r=e("../internals/function-apply"),o=e("../internals/function-call"),i=e("../internals/function-uncurry-this"),a=e("../internals/fix-regexp-well-known-symbol-logic"),s=e("../internals/fails"),u=e("../internals/an-object"),c=e("../internals/is-callable"),l=e("../internals/to-integer-or-infinity"),f=e("../internals/to-length"),p=e("../internals/to-string"),h=e("../internals/require-object-coercible"),d=e("../internals/advance-string-index"),m=e("../internals/get-method"),g=e("../internals/get-substitution"),v=e("../internals/regexp-exec-abstract"),y=e("../internals/well-known-symbol")("replace"),b=Math.max,w=Math.min,x=i([].concat),A=i([].push),E=i("".indexOf),C=i("".slice),k=function(e){return void 0===e?e:String(e)},I="$0"==="a".replace(/./,"$0"),S=!!/./[y]&&""===/./[y]("a","$0");a("replace",(function(e,t,n){var i=S?"$":"$0";return[function(e,n){var r=h(this),i=null==e?void 0:m(e,y);return i?o(i,e,r,n):o(t,p(r),e,n)},function(e,o){var a=u(this),s=p(e);if("string"==typeof o&&-1===E(o,i)&&-1===E(o,"$<")){var h=n(t,a,s,o);if(h.done)return h.value}var m=c(o);m||(o=p(o));var y=a.global;if(y){var I=a.unicode;a.lastIndex=0}for(var S=[];;){var j=v(a,s);if(null===j)break;if(A(S,j),!y)break;""===p(j[0])&&(a.lastIndex=d(s,f(a.lastIndex),I))}for(var T="",R=0,O=0;O<S.length;O++){j=S[O];for(var D=p(j[0]),B=b(w(l(j.index),s.length),0),_=[],N=1;N<j.length;N++)A(_,k(j[N]));var P=j.groups;if(m){var M=x([D],_,B,s);void 0!==P&&A(M,P);var F=p(r(o,void 0,M))}else F=g(D,s,B,_,P,o);B>=R&&(T+=C(s,R,B)+F,R=B+D.length)}return T+C(s,R)}]}),!!s((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!I||S)},{"../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(e,t,n){"use strict";var r=e("../internals/function-call"),o=e("../internals/fix-regexp-well-known-symbol-logic"),i=e("../internals/an-object"),a=e("../internals/require-object-coercible"),s=e("../internals/same-value"),u=e("../internals/to-string"),c=e("../internals/get-method"),l=e("../internals/regexp-exec-abstract");o("search",(function(e,t,n){return[function(t){var n=a(this),o=null==t?void 0:c(t,e);return o?r(o,t,n):new RegExp(t)[e](u(n))},function(e){var r=i(this),o=u(e),a=n(t,r,o);if(a.done)return a.value;var c=r.lastIndex;s(c,0)||(r.lastIndex=0);var f=l(r,o);return s(r.lastIndex,c)||(r.lastIndex=c),null===f?-1:f.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(e,t,n){"use strict";var r=e("../internals/function-apply"),o=e("../internals/function-call"),i=e("../internals/function-uncurry-this"),a=e("../internals/fix-regexp-well-known-symbol-logic"),s=e("../internals/is-regexp"),u=e("../internals/an-object"),c=e("../internals/require-object-coercible"),l=e("../internals/species-constructor"),f=e("../internals/advance-string-index"),p=e("../internals/to-length"),h=e("../internals/to-string"),d=e("../internals/get-method"),m=e("../internals/array-slice-simple"),g=e("../internals/regexp-exec-abstract"),v=e("../internals/regexp-exec"),y=e("../internals/regexp-sticky-helpers"),b=e("../internals/fails"),w=y.UNSUPPORTED_Y,x=4294967295,A=Math.min,E=[].push,C=i(/./.exec),k=i(E),I=i("".slice),S=!b((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));a("split",(function(e,t,n){var i;return i="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var i=h(c(this)),a=void 0===n?x:n>>>0;if(0===a)return[];if(void 0===e)return[i];if(!s(e))return o(t,i,e,a);for(var u,l,f,p=[],d=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),g=0,y=new RegExp(e.source,d+"g");(u=o(v,y,i))&&!((l=y.lastIndex)>g&&(k(p,I(i,g,u.index)),u.length>1&&u.index<i.length&&r(E,p,m(u,1)),f=u[0].length,g=l,p.length>=a));)y.lastIndex===u.index&&y.lastIndex++;return g===i.length?!f&&C(y,"")||k(p,""):k(p,I(i,g)),p.length>a?m(p,0,a):p}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:o(t,this,e,n)}:t,[function(t,n){var r=c(this),a=null==t?void 0:d(t,e);return a?o(a,t,r,n):o(i,h(r),t,n)},function(e,r){var o=u(this),a=h(e),s=n(i,o,a,r,i!==t);if(s.done)return s.value;var c=l(o,RegExp),d=o.unicode,m=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(w?"g":"y"),v=new c(w?"^(?:"+o.source+")":o,m),y=void 0===r?x:r>>>0;if(0===y)return[];if(0===a.length)return null===g(v,a)?[a]:[];for(var b=0,E=0,C=[];E<a.length;){v.lastIndex=w?0:E;var S,j=g(v,w?I(a,E):a);if(null===j||(S=A(p(v.lastIndex+(w?E:0)),a.length))===b)E=f(a,E,d);else{if(k(C,I(a,b,E)),C.length===y)return C;for(var T=1;T<=j.length-1;T++)if(k(C,j[T]),C.length===y)return C;E=b=S}}return k(C,I(a,b)),C}]}),!S,w)},{"../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(e,t,n){"use strict";var r=e("../internals/export"),o=e("../internals/string-trim").trim;r({target:"String",proto:!0,forced:e("../internals/string-trim-forced")("trim")},{trim:function(){return o(this)}})},{"../internals/export":149,"../internals/string-trim":241,"../internals/string-trim-forced":240}],309:[function(e,t,n){"use strict";var r=e("../internals/export"),o=e("../internals/global"),i=e("../internals/function-call"),a=e("../internals/function-uncurry-this"),s=e("../internals/is-pure"),u=e("../internals/descriptors"),c=e("../internals/native-symbol"),l=e("../internals/fails"),f=e("../internals/has-own-property"),p=e("../internals/object-is-prototype-of"),h=e("../internals/an-object"),d=e("../internals/to-indexed-object"),m=e("../internals/to-property-key"),g=e("../internals/to-string"),v=e("../internals/create-property-descriptor"),y=e("../internals/object-create"),b=e("../internals/object-keys"),w=e("../internals/object-get-own-property-names"),x=e("../internals/object-get-own-property-names-external"),A=e("../internals/object-get-own-property-symbols"),E=e("../internals/object-get-own-property-descriptor"),C=e("../internals/object-define-property"),k=e("../internals/object-define-properties"),I=e("../internals/object-property-is-enumerable"),S=e("../internals/redefine"),j=e("../internals/shared"),T=e("../internals/shared-key"),R=e("../internals/hidden-keys"),O=e("../internals/uid"),D=e("../internals/well-known-symbol"),B=e("../internals/well-known-symbol-wrapped"),_=e("../internals/define-well-known-symbol"),N=e("../internals/symbol-define-to-primitive"),P=e("../internals/set-to-string-tag"),M=e("../internals/internal-state"),F=e("../internals/array-iteration").forEach,L=T("hidden"),U="Symbol",W="prototype",z=M.set,q=M.getterFor(U),Q=Object[W],V=o.Symbol,H=V&&V[W],G=o.TypeError,X=o.QObject,Z=E.f,K=C.f,J=x.f,Y=I.f,$=a([].push),ee=j("symbols"),te=j("op-symbols"),ne=j("wks"),re=!X||!X[W]||!X[W].findChild,oe=u&&l((function(){return 7!=y(K({},"a",{get:function(){return K(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=Z(Q,t);r&&delete Q[t],K(e,t,n),r&&e!==Q&&K(Q,t,r)}:K,ie=function(e,t){var n=ee[e]=y(H);return z(n,{type:U,tag:e,description:t}),u||(n.description=t),n},ae=function(e,t,n){e===Q&&ae(te,t,n),h(e);var r=m(t);return h(n),f(ee,r)?(n.enumerable?(f(e,L)&&e[L][r]&&(e[L][r]=!1),n=y(n,{enumerable:v(0,!1)})):(f(e,L)||K(e,L,v(1,{})),e[L][r]=!0),oe(e,r,n)):K(e,r,n)},se=function(e,t){h(e);var n=d(t),r=b(n).concat(pe(n));return F(r,(function(t){u&&!i(ce,n,t)||ae(e,t,n[t])})),e},ue=function(e,t){return void 0===t?y(e):se(y(e),t)},ce=function(e){var t=m(e),n=i(Y,this,t);return!(this===Q&&f(ee,t)&&!f(te,t))&&(!(n||!f(this,t)||!f(ee,t)||f(this,L)&&this[L][t])||n)},le=function(e,t){var n=d(e),r=m(t);if(n!==Q||!f(ee,r)||f(te,r)){var o=Z(n,r);return!o||!f(ee,r)||f(n,L)&&n[L][r]||(o.enumerable=!0),o}},fe=function(e){var t=J(d(e)),n=[];return F(t,(function(e){f(ee,e)||f(R,e)||$(n,e)})),n},pe=function(e){var t=e===Q,n=J(t?te:d(e)),r=[];return F(n,(function(e){!f(ee,e)||t&&!f(Q,e)||$(r,ee[e])})),r};c||(V=function(){if(p(H,this))throw G("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?g(arguments[0]):void 0,t=O(e),n=function(e){this===Q&&i(n,te,e),f(this,L)&&f(this[L],t)&&(this[L][t]=!1),oe(this,t,v(1,e))};return u&&re&&oe(Q,t,{configurable:!0,set:n}),ie(t,e)},S(H=V[W],"toString",(function(){return q(this).tag})),S(V,"withoutSetter",(function(e){return ie(O(e),e)})),I.f=ce,C.f=ae,k.f=se,E.f=le,w.f=x.f=fe,A.f=pe,B.f=function(e){return ie(D(e),e)},u&&(K(H,"description",{configurable:!0,get:function(){return q(this).description}}),s||S(Q,"propertyIsEnumerable",ce,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!c,sham:!c},{Symbol:V}),F(b(ne),(function(e){_(e)})),r({target:U,stat:!0,forced:!c},{useSetter:function(){re=!0},useSimple:function(){re=!1}}),r({target:"Object",stat:!0,forced:!c,sham:!u},{create:ue,defineProperty:ae,defineProperties:se,getOwnPropertyDescriptor:le}),r({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:fe}),N(),P(V,U),R[L]=!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(e,t,n){"use strict";var r=e("../internals/export"),o=e("../internals/descriptors"),i=e("../internals/global"),a=e("../internals/function-uncurry-this"),s=e("../internals/has-own-property"),u=e("../internals/is-callable"),c=e("../internals/object-is-prototype-of"),l=e("../internals/to-string"),f=e("../internals/object-define-property").f,p=e("../internals/copy-constructor-properties"),h=i.Symbol,d=h&&h.prototype;if(o&&u(h)&&(!("description"in d)||void 0!==h().description)){var m={},g=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),t=c(d,this)?new h(e):void 0===e?h():h(e);return""===e&&(m[t]=!0),t};p(g,h),g.prototype=d,d.constructor=g;var v="Symbol(test)"==String(h("test")),y=a(d.toString),b=a(d.valueOf),w=/^Symbol\((.*)\)[^)]+$/,x=a("".replace),A=a("".slice);f(d,"description",{configurable:!0,get:function(){var e=b(this),t=y(e);if(s(m,e))return"";var n=v?A(t,7,-1):x(t,w,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:g})}},{"../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(e,t,n){var r=e("../internals/export"),o=e("../internals/get-built-in"),i=e("../internals/has-own-property"),a=e("../internals/to-string"),s=e("../internals/shared"),u=e("../internals/native-symbol-registry"),c=s("string-to-symbol-registry"),l=s("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!u},{for:function(e){var t=a(e);if(i(c,t))return c[t];var n=o("Symbol")(t);return c[t]=n,l[n]=t,n}})},{"../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(e,t,n){e("../internals/define-well-known-symbol")("iterator")},{"../internals/define-well-known-symbol":133}],313:[function(e,t,n){e("../modules/es.symbol.constructor"),e("../modules/es.symbol.for"),e("../modules/es.symbol.key-for"),e("../modules/es.json.stringify"),e("../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(e,t,n){var r=e("../internals/export"),o=e("../internals/has-own-property"),i=e("../internals/is-symbol"),a=e("../internals/try-to-string"),s=e("../internals/shared"),u=e("../internals/native-symbol-registry"),c=s("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!u},{keyFor:function(e){if(!i(e))throw TypeError(a(e)+" is not a symbol");if(o(c,e))return c[e]}})},{"../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(e,t,n){"use strict";var r=e("../internals/function-uncurry-this"),o=e("../internals/array-buffer-view-core"),i=r(e("../internals/array-copy-within")),a=o.aTypedArray;(0,o.exportTypedArrayMethod)("copyWithin",(function(e,t){return i(a(this),e,t,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(e,t,n){"use strict";var r=e("../internals/array-buffer-view-core"),o=e("../internals/array-iteration").every,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("every",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],317:[function(e,t,n){"use strict";var r=e("../internals/array-buffer-view-core"),o=e("../internals/function-call"),i=e("../internals/array-fill"),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("fill",(function(e){var t=arguments.length;return o(i,a(this),e,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}))},{"../internals/array-buffer-view-core":103,"../internals/array-fill":106,"../internals/function-call":155}],318:[function(e,t,n){"use strict";var r=e("../internals/array-buffer-view-core"),o=e("../internals/array-iteration").filter,i=e("../internals/typed-array-from-species-and-list"),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("filter",(function(e){var t=o(a(this),e,arguments.length>1?arguments[1]:void 0);return i(this,t)}))},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/typed-array-from-species-and-list":260}],319:[function(e,t,n){"use strict";var r=e("../internals/array-buffer-view-core"),o=e("../internals/array-iteration").findIndex,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("findIndex",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],320:[function(e,t,n){"use strict";var r=e("../internals/array-buffer-view-core"),o=e("../internals/array-iteration").find,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("find",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],321:[function(e,t,n){"use strict";var r=e("../internals/array-buffer-view-core"),o=e("../internals/array-iteration").forEach,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("forEach",(function(e){o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],322:[function(e,t,n){"use strict";var r=e("../internals/array-buffer-view-core"),o=e("../internals/array-includes").includes,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("includes",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],323:[function(e,t,n){"use strict";var r=e("../internals/array-buffer-view-core"),o=e("../internals/array-includes").indexOf,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("indexOf",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],324:[function(e,t,n){"use strict";var r=e("../internals/global"),o=e("../internals/fails"),i=e("../internals/function-uncurry-this"),a=e("../internals/array-buffer-view-core"),s=e("../modules/es.array.iterator"),u=e("../internals/well-known-symbol")("iterator"),c=r.Uint8Array,l=i(s.values),f=i(s.keys),p=i(s.entries),h=a.aTypedArray,d=a.exportTypedArrayMethod,m=c&&c.prototype,g=!o((function(){m[u].call([1])})),v=!!m&&m.values&&m[u]===m.values&&"values"===m.values.name,y=function(){return l(h(this))};d("entries",(function(){return p(h(this))}),g),d("keys",(function(){return f(h(this))}),g),d("values",y,g||!v,{name:"values"}),d(u,y,g||!v,{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(e,t,n){"use strict";var r=e("../internals/array-buffer-view-core"),o=e("../internals/function-uncurry-this"),i=r.aTypedArray,a=r.exportTypedArrayMethod,s=o([].join);a("join",(function(e){return s(i(this),e)}))},{"../internals/array-buffer-view-core":103,"../internals/function-uncurry-this":157}],326:[function(e,t,n){"use strict";var r=e("../internals/array-buffer-view-core"),o=e("../internals/function-apply"),i=e("../internals/array-last-index-of"),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return o(i,a(this),t>1?[e,arguments[1]]:[e])}))},{"../internals/array-buffer-view-core":103,"../internals/array-last-index-of":112,"../internals/function-apply":152}],327:[function(e,t,n){"use strict";var r=e("../internals/array-buffer-view-core"),o=e("../internals/array-iteration").map,i=e("../internals/typed-array-species-constructor"),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("map",(function(e){return o(a(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(i(e))(t)}))}))},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/typed-array-species-constructor":262}],328:[function(e,t,n){"use strict";var r=e("../internals/array-buffer-view-core"),o=e("../internals/array-reduce").right,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return o(i(this),e,t,t>1?arguments[1]:void 0)}))},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],329:[function(e,t,n){"use strict";var r=e("../internals/array-buffer-view-core"),o=e("../internals/array-reduce").left,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return o(i(this),e,t,t>1?arguments[1]:void 0)}))},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],330:[function(e,t,n){"use strict";var r=e("../internals/array-buffer-view-core"),o=r.aTypedArray,i=r.exportTypedArrayMethod,a=Math.floor;i("reverse",(function(){for(var e,t=this,n=o(t).length,r=a(n/2),i=0;i<r;)e=t[i],t[i++]=t[--n],t[n]=e;return t}))},{"../internals/array-buffer-view-core":103}],331:[function(e,t,n){"use strict";var r=e("../internals/global"),o=e("../internals/function-call"),i=e("../internals/array-buffer-view-core"),a=e("../internals/length-of-array-like"),s=e("../internals/to-offset"),u=e("../internals/to-object"),c=e("../internals/fails"),l=r.RangeError,f=r.Int8Array,p=f&&f.prototype,h=p&&p.set,d=i.aTypedArray,m=i.exportTypedArrayMethod,g=!c((function(){var e=new Uint8ClampedArray(2);return o(h,e,{length:1,0:3},1),3!==e[1]})),v=g&&i.NATIVE_ARRAY_BUFFER_VIEWS&&c((function(){var e=new f(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));m("set",(function(e){d(this);var t=s(arguments.length>1?arguments[1]:void 0,1),n=u(e);if(g)return o(h,this,n,t);var r=this.length,i=a(n),c=0;if(i+t>r)throw l("Wrong length");for(;c<i;)this[t+c]=n[c++]}),!g||v)},{"../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(e,t,n){"use strict";var r=e("../internals/array-buffer-view-core"),o=e("../internals/typed-array-species-constructor"),i=e("../internals/fails"),a=e("../internals/array-slice"),s=r.aTypedArray;(0,r.exportTypedArrayMethod)("slice",(function(e,t){for(var n=a(s(this),e,t),r=o(this),i=0,u=n.length,c=new r(u);u>i;)c[i]=n[i++];return c}),i((function(){new Int8Array(1).slice()})))},{"../internals/array-buffer-view-core":103,"../internals/array-slice":117,"../internals/fails":150,"../internals/typed-array-species-constructor":262}],333:[function(e,t,n){"use strict";var r=e("../internals/array-buffer-view-core"),o=e("../internals/array-iteration").some,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("some",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],334:[function(e,t,n){"use strict";var r=e("../internals/global"),o=e("../internals/function-uncurry-this"),i=e("../internals/fails"),a=e("../internals/a-callable"),s=e("../internals/array-sort"),u=e("../internals/array-buffer-view-core"),c=e("../internals/engine-ff-version"),l=e("../internals/engine-is-ie-or-edge"),f=e("../internals/engine-v8-version"),p=e("../internals/engine-webkit-version"),h=u.aTypedArray,d=u.exportTypedArrayMethod,m=r.Uint16Array,g=m&&o(m.prototype.sort),v=!(!g||i((function(){g(new m(2),null)}))&&i((function(){g(new m(2),{})}))),y=!!g&&!i((function(){if(f)return f<74;if(c)return c<67;if(l)return!0;if(p)return p<602;var e,t,n=new m(516),r=Array(516);for(e=0;e<516;e++)t=e%4,n[e]=515-e,r[e]=e-2*t+3;for(g(n,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(n[e]!==r[e])return!0})),b=function(e){return function(t,n){return void 0!==e?+e(t,n)||0:n!=n?-1:t!=t?1:0===t&&0===n?1/t>0&&1/n<0?1:-1:t>n}};d("sort",(function(e){return void 0!==e&&a(e),y?g(this,e):s(h(this),b(e))}),!y||v)},{"../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(e,t,n){"use strict";var r=e("../internals/array-buffer-view-core"),o=e("../internals/to-length"),i=e("../internals/to-absolute-index"),a=e("../internals/typed-array-species-constructor"),s=r.aTypedArray;(0,r.exportTypedArrayMethod)("subarray",(function(e,t){var n=s(this),r=n.length,u=i(e,r);return new(a(n))(n.buffer,n.byteOffset+u*n.BYTES_PER_ELEMENT,o((void 0===t?r:i(t,r))-u))}))},{"../internals/array-buffer-view-core":103,"../internals/to-absolute-index":245,"../internals/to-length":249,"../internals/typed-array-species-constructor":262}],336:[function(e,t,n){"use strict";var r=e("../internals/global"),o=e("../internals/function-apply"),i=e("../internals/array-buffer-view-core"),a=e("../internals/fails"),s=e("../internals/array-slice"),u=r.Int8Array,c=i.aTypedArray,l=i.exportTypedArrayMethod,f=[].toLocaleString,p=!!u&&a((function(){f.call(new u(1))}));l("toLocaleString",(function(){return o(f,p?s(c(this)):c(this),s(arguments))}),a((function(){return[1,2].toLocaleString()!=new u([1,2]).toLocaleString()}))||!a((function(){u.prototype.toLocaleString.call([1,2])})))},{"../internals/array-buffer-view-core":103,"../internals/array-slice":117,"../internals/fails":150,"../internals/function-apply":152,"../internals/global":163}],337:[function(e,t,n){"use strict";var r=e("../internals/array-buffer-view-core").exportTypedArrayMethod,o=e("../internals/fails"),i=e("../internals/global"),a=e("../internals/function-uncurry-this"),s=i.Uint8Array,u=s&&s.prototype||{},c=[].toString,l=a([].join);o((function(){c.call({})}))&&(c=function(){return l(this)});var f=u.toString!=c;r("toString",c,f)},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],338:[function(e,t,n){e("../internals/typed-array-constructor")("Uint8",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},{"../internals/typed-array-constructor":258}],339:[function(e,t,n){var r=e("../internals/global"),o=e("../internals/dom-iterables"),i=e("../internals/dom-token-list-prototype"),a=e("../internals/array-for-each"),s=e("../internals/create-non-enumerable-property"),u=function(e){if(e&&e.forEach!==a)try{s(e,"forEach",a)}catch(t){e.forEach=a}};for(var c in o)o[c]&&u(r[c]&&r[c].prototype);u(i)},{"../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(e,t,n){var r=e("../internals/global"),o=e("../internals/dom-iterables"),i=e("../internals/dom-token-list-prototype"),a=e("../modules/es.array.iterator"),s=e("../internals/create-non-enumerable-property"),u=e("../internals/well-known-symbol"),c=u("iterator"),l=u("toStringTag"),f=a.values,p=function(e,t){if(e){if(e[c]!==f)try{s(e,c,f)}catch(t){e[c]=f}if(e[l]||s(e,l,t),o[t])for(var n in a)if(e[n]!==a[n])try{s(e,n,a[n])}catch(t){e[n]=a[n]}}};for(var h in o)p(r[h]&&r[h].prototype,h);p(i,"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(e,t,n){function r(e){return Array.isArray?Array.isArray(e):"[object Array]"===v(e)}function o(e){return"boolean"==typeof e}function i(e){return null===e}function a(e){return null==e}function s(e){return"number"==typeof e}function u(e){return"string"==typeof e}function c(e){return"symbol"==typeof e}function l(e){return void 0===e}function f(e){return"[object RegExp]"===v(e)}function p(e){return"object"==typeof e&&null!==e}function h(e){return"[object Date]"===v(e)}function d(e){return"[object Error]"===v(e)||e instanceof Error}function m(e){return"function"==typeof e}function g(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function v(e){return Object.prototype.toString.call(e)}n.isArray=r,n.isBoolean=o,n.isNull=i,n.isNullOrUndefined=a,n.isNumber=s,n.isString=u,n.isSymbol=c,n.isUndefined=l,n.isRegExp=f,n.isObject=p,n.isDate=h,n.isError=d,n.isFunction=m,n.isPrimitive=g,n.isBuffer=e("buffer").Buffer.isBuffer},{buffer:90}],342:[function(e,t,r){!function(e){"use strict";var o,i,a,s=(o=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,i=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,a=/[^-+\dA-Z]/g,function(e,t,n,r){if(1!==arguments.length||"string"!==f(e)||/\d/.test(e)||(t=e,e=void 0),(e=e||new Date)instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");var p=(t=String(s.masks[t]||t||s.masks.default)).slice(0,4);"UTC:"!==p&&"GMT:"!==p||(t=t.slice(4),n=!0,"GMT:"===p&&(r=!0));var h=n?"getUTC":"get",d=e[h+"Date"](),m=e[h+"Day"](),g=e[h+"Month"](),v=e[h+"FullYear"](),y=e[h+"Hours"](),b=e[h+"Minutes"](),w=e[h+"Seconds"](),x=e[h+"Milliseconds"](),A=n?0:e.getTimezoneOffset(),E=c(e),C=l(e),k={d:d,dd:u(d),ddd:s.i18n.dayNames[m],dddd:s.i18n.dayNames[m+7],m:g+1,mm:u(g+1),mmm:s.i18n.monthNames[g],mmmm:s.i18n.monthNames[g+12],yy:String(v).slice(2),yyyy:v,h:y%12||12,hh:u(y%12||12),H:y,HH:u(y),M:b,MM:u(b),s:w,ss:u(w),l:u(x,3),L:u(Math.round(x/10)),t:y<12?"a":"p",tt:y<12?"am":"pm",T:y<12?"A":"P",TT:y<12?"AM":"PM",Z:r?"GMT":n?"UTC":(String(e).match(i)||[""]).pop().replace(a,""),o:(A>0?"-":"+")+u(100*Math.floor(Math.abs(A)/60)+Math.abs(A)%60,4),S:["th","st","nd","rd"][d%10>3?0:(d%100-d%10!=10)*d%10],W:E,N:C};return t.replace(o,(function(e){return e in k?k[e]:e.slice(1,e.length-1)}))});function u(e,t){for(e=String(e),t=t||2;e.length<t;)e="0"+e;return e}function c(e){var t=new Date(e.getFullYear(),e.getMonth(),e.getDate());t.setDate(t.getDate()-(t.getDay()+6)%7+3);var n=new Date(t.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=t.getTimezoneOffset()-n.getTimezoneOffset();t.setHours(t.getHours()-r);var o=(t-n)/6048e5;return 1+Math.floor(o)}function l(e){var t=e.getDay();return 0===t&&(t=7),t}function f(e){return null===e?"null":void 0===e?"undefined":"object"!=typeof e?typeof e:Array.isArray(e)?"array":{}.toString.call(e).slice(8,-1).toLowerCase()}s.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"},s.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"==typeof n&&n.amd?n((function(){return s})):"object"==typeof r?t.exports=s:e.dateFormat=s}(this)},{}],343:[function(e,t,n){"use strict";var r=/["'&<>]/;function o(e){var t,n=""+e,o=r.exec(n);if(!o)return n;var i="",a=0,s=0;for(a=o.index;a<n.length;a++){switch(n.charCodeAt(a)){case 34:t="&quot;";break;case 38:t="&amp;";break;case 39:t="&#39;";break;case 60:t="&lt;";break;case 62:t="&gt;";break;default:continue}s!==a&&(i+=n.substring(s,a)),s=a+1,i+=t}return s!==a?i+n.substring(s,a):i}t.exports=o},{}],344:[function(e,t,n){"use strict";var r,o="object"==typeof Reflect?Reflect:null,i=o&&"function"==typeof o.apply?o.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};function a(e){console&&console.warn&&console.warn(e)}r=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function u(){u.init.call(this)}t.exports=u,t.exports.once=w,u.EventEmitter=u,u.prototype._events=void 0,u.prototype._eventsCount=0,u.prototype._maxListeners=void 0;var c=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function f(e){return void 0===e._maxListeners?u.defaultMaxListeners:e._maxListeners}function p(e,t,n,r){var o,i,s;if(l(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),s=i[t]),void 0===s)s=i[t]=n,++e._eventsCount;else if("function"==typeof s?s=i[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(o=f(e))>0&&s.length>o&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,a(u)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=h.bind(r);return o.listener=n,r.wrapFn=o,o}function m(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?b(o):v(o,o.length)}function g(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function v(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function y(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function b(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function w(e,t){return new Promise((function(n,r){function o(n){e.removeListener(t,i),r(n)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}A(e,t,i,{once:!0}),"error"!==t&&x(e,o,{once:!0})}))}function x(e,t,n){"function"==typeof e.on&&A(e,"error",t,n)}function A(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){r.once&&e.removeEventListener(t,o),n(i)}))}}Object.defineProperty(u,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");c=e}}),u.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},u.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},u.prototype.getMaxListeners=function(){return f(this)},u.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)i(u,this,t);else{var c=u.length,l=v(u,c);for(n=0;n<c;++n)i(l[n],this,t)}return!0},u.prototype.addListener=function(e,t){return p(this,e,t,!1)},u.prototype.on=u.prototype.addListener,u.prototype.prependListener=function(e,t){return p(this,e,t,!0)},u.prototype.once=function(e,t){return l(t),this.on(e,d(this,e,t)),this},u.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,d(this,e,t)),this},u.prototype.removeListener=function(e,t){var n,r,o,i,a;if(l(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){a=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():y(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},u.prototype.off=u.prototype.removeListener,u.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},u.prototype.listeners=function(e){return m(this,e,!0)},u.prototype.rawListeners=function(e){return m(this,e,!1)},u.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},u.prototype.listenerCount=g,u.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},{}],345:[function(e,t,n){"use strict";var r=e("is-callable"),o=Object.prototype.toString,i=Object.prototype.hasOwnProperty,a=function(e,t,n){for(var r=0,o=e.length;r<o;r++)i.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))},s=function(e,t,n){for(var r=0,o=e.length;r<o;r++)null==n?t(e.charAt(r),r,e):t.call(n,e.charAt(r),r,e)},u=function(e,t,n){for(var r in e)i.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))},c=function(e,t,n){if(!r(t))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=n),"[object Array]"===o.call(e)?a(e,t,i):"string"==typeof e?s(e,t,i):u(e,t,i)};t.exports=c},{"is-callable":367}],346:[function(e,t,n){"use strict";var r="Function.prototype.bind called on incompatible ",o=Array.prototype.slice,i=Object.prototype.toString,a="[object Function]";t.exports=function(e){var t=this;if("function"!=typeof t||i.call(t)!==a)throw new TypeError(r+t);for(var n,s=o.call(arguments,1),u=function(){if(this instanceof n){var r=t.apply(this,s.concat(o.call(arguments)));return Object(r)===r?r:this}return t.apply(e,s.concat(o.call(arguments)))},c=Math.max(0,t.length-s.length),l=[],f=0;f<c;f++)l.push("$"+f);if(n=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this,arguments); }")(u),t.prototype){var p=function(){};p.prototype=t.prototype,n.prototype=new p,p.prototype=null}return n}},{}],347:[function(e,t,n){"use strict";var r=e("./implementation");t.exports=Function.prototype.bind||r},{"./implementation":346}],348:[function(e,t,n){"use strict";var r,o=SyntaxError,i=Function,a=TypeError,s=function(e){try{return i('"use strict"; return ('+e+").constructor;")()}catch(e){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(e){u=null}var c=function(){throw new a},l=u?function(){try{return c}catch(e){try{return u(arguments,"callee").get}catch(e){return c}}}():c,f=e("has-symbols")(),p=e("has-proto")(),h=Object.getPrototypeOf||(p?function(e){return e.__proto__}:null),d={},m="undefined"!=typeof Uint8Array&&h?h(Uint8Array):r,g={"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":f&&h?h([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":d,"%AsyncGenerator%":d,"%AsyncGeneratorFunction%":d,"%AsyncIteratorPrototype%":d,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":d,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f&&h?h(h([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&f&&h?h((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&f&&h?h((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f&&h?h(""[Symbol.iterator]()):r,"%Symbol%":f?Symbol:r,"%SyntaxError%":o,"%ThrowTypeError%":l,"%TypedArray%":m,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(h)try{null.error}catch(e){var v=h(h(e));g["%Error.prototype%"]=v}var y=function e(t){var n;if("%AsyncFunction%"===t)n=s("async function () {}");else if("%GeneratorFunction%"===t)n=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=s("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&h&&(n=h(o.prototype))}return g[t]=n,n},b={"%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"]},w=e("function-bind"),x=e("has"),A=w.call(Function.call,Array.prototype.concat),E=w.call(Function.apply,Array.prototype.splice),C=w.call(Function.call,String.prototype.replace),k=w.call(Function.call,String.prototype.slice),I=w.call(Function.call,RegExp.prototype.exec),S=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,j=/\\(\\)?/g,T=function(e){var t=k(e,0,1),n=k(e,-1);if("%"===t&&"%"!==n)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new o("invalid intrinsic syntax, expected opening `%`");var r=[];return C(e,S,(function(e,t,n,o){r[r.length]=n?C(o,j,"$1"):t||e})),r},R=function(e,t){var n,r=e;if(x(b,r)&&(r="%"+(n=b[r])[0]+"%"),x(g,r)){var i=g[r];if(i===d&&(i=y(r)),void 0===i&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:i}}throw new o("intrinsic "+e+" does not exist!")};t.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===I(/^%?[^%]*%?$/,e))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=T(e),r=n.length>0?n[0]:"",i=R("%"+r+"%",t),s=i.name,c=i.value,l=!1,f=i.alias;f&&(r=f[0],E(n,A([0,1],f)));for(var p=1,h=!0;p<n.length;p+=1){var d=n[p],m=k(d,0,1),v=k(d,-1);if(('"'===m||"'"===m||"`"===m||'"'===v||"'"===v||"`"===v)&&m!==v)throw new o("property names with quotes must have matching quotes");if("constructor"!==d&&h||(l=!0),x(g,s="%"+(r+="."+d)+"%"))c=g[s];else if(null!=c){if(!(d in c)){if(!t)throw new a("base intrinsic for "+e+" exists, but the property is not available.");return}if(u&&p+1>=n.length){var y=u(c,d);c=(h=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:c[d]}else h=x(c,d),c=c[d];h&&!l&&(g[s]=c)}}return c}},{"function-bind":347,has:354,"has-proto":350,"has-symbols":351}],349:[function(e,t,n){"use strict";var r=e("get-intrinsic")("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(e){r=null}t.exports=r},{"get-intrinsic":348}],350:[function(e,t,n){"use strict";var r={foo:{}},o=Object;t.exports=function(){return{__proto__:r}.foo===r.foo&&!({__proto__:null}instanceof o)}},{}],351:[function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=e("./shams");t.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&o()}},{"./shams":352}],352:[function(e,t,n){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;var r=42;for(t in e[t]=r,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(i.value!==r||!0!==i.enumerable)return!1}return!0}},{}],353:[function(e,t,n){"use strict";var r=e("has-symbols/shams");t.exports=function(){return r()&&!!Symbol.toStringTag}},{"has-symbols/shams":352}],354:[function(e,t,n){"use strict";var r=e("function-bind");t.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},{"function-bind":347}],355:[function(e,t,n){var r=e("http"),o=e("url"),i=t.exports;for(var a in r)r.hasOwnProperty(a)&&(i[a]=r[a]);function s(e){if("string"==typeof e&&(e=o.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}i.request=function(e,t){return e=s(e),r.request.call(this,e,t)},i.get=function(e,t){return e=s(e),r.get.call(this,e,t)}},{http:468,url:472}],356:[function(e,t,n){"use strict";var r=e("util"),o=e("ms");t.exports=function(e){if("number"==typeof e)return e;var t=o(e);if(void 0===t){var n=new Error(r.format("humanize-ms(%j) result undefined",e));console.warn(n.stack)}return t}},{ms:376,util:419}],357:[function(e,t,n){n.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,u=(1<<s)-1,c=u>>1,l=-7,f=n?o-1:0,p=n?-1:1,h=e[t+f];for(f+=p,i=h&(1<<-l)-1,h>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=p,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=p,l-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),i-=c}return(h?-1:1)*a*Math.pow(2,i-r)},n.write=function(e,t,n,r,o,i){var a,s,u,c=8*i-o-1,l=(1<<c)-1,f=l>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,d=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?p/u:p*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[n+h]=255&s,h+=d,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;e[n+h]=255&a,h+=d,a/=256,c-=8);e[n+h-d]|=128*m}},{}],358:[function(e,t,n){"use strict";var r,o,i,a=[e("./nextTick"),e("./queueMicrotask"),e("./mutation.js"),e("./messageChannel"),e("./stateChange"),e("./timeout")],s=-1,u=[],c=!1;function l(){r&&o&&(r=!1,o.length?u=o.concat(u):s=-1,u.length&&f())}function f(){if(!r){c=!1,r=!0;for(var e=u.length,t=setTimeout(l);e;){for(o=u,u=[];o&&++s<e;)o[s].run();s=-1,e=u.length}o=null,s=-1,r=!1,clearTimeout(t)}}for(var p=-1,h=a.length;++p<h;)if(a[p]&&a[p].test&&a[p].test()){i=a[p].install(f);break}function d(e,t){this.fun=e,this.array=t}function m(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new d(e,t)),c||r||(c=!0,i())}d.prototype.run=function(){var e=this.fun,t=this.array;switch(t.length){case 0:return e();case 1:return e(t[0]);case 2:return e(t[0],t[1]);case 3:return e(t[0],t[1],t[2]);default:return e.apply(null,t)}},t.exports=m},{"./messageChannel":359,"./mutation.js":360,"./nextTick":89,"./queueMicrotask":361,"./stateChange":362,"./timeout":363}],359:[function(e,n,r){(function(e){(function(){"use strict";r.test=function(){return!e.setImmediate&&void 0!==e.MessageChannel},r.install=function(t){var n=new e.MessageChannel;return n.port1.onmessage=t,function(){n.port2.postMessage(0)}}}).call(this)}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],360:[function(e,n,r){(function(e){(function(){"use strict";var t=e.MutationObserver||e.WebKitMutationObserver;r.test=function(){return t},r.install=function(n){var r=0,o=new t(n),i=e.document.createTextNode("");return o.observe(i,{characterData:!0}),function(){i.data=r=++r%2}}}).call(this)}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],361:[function(e,n,r){(function(e){(function(){"use strict";r.test=function(){return"function"==typeof e.queueMicrotask},r.install=function(t){return function(){e.queueMicrotask(t)}}}).call(this)}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],362:[function(e,n,r){(function(e){(function(){"use strict";r.test=function(){return"document"in e&&"onreadystatechange"in e.document.createElement("script")},r.install=function(t){return function(){var n=e.document.createElement("script");return n.onreadystatechange=function(){t(),n.onreadystatechange=null,n.parentNode.removeChild(n),n=null},e.document.documentElement.appendChild(n),t}}}).call(this)}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],363:[function(e,t,n){"use strict";n.test=function(){return!0},n.install=function(e){return function(){setTimeout(e,0)}}},{}],364:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},{}],365:[function(e,t,n){"use strict";var r=e("has-tostringtag/shams")(),o=e("call-bind/callBound")("Object.prototype.toString"),i=function(e){return!(r&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===o(e)},a=function(e){return!!i(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==o(e)&&"[object Function]"===o(e.callee)},s=function(){return i(arguments)}();i.isLegacyArguments=a,t.exports=s?i:a},{"call-bind/callBound":92,"has-tostringtag/shams":353}],366:[function(e,t,n){function r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function o(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&r(e.slice(0,0))}t.exports=function(e){return null!=e&&(r(e)||o(e)||!!e._isBuffer)}},{}],367:[function(e,t,n){"use strict";var r,o,i=Function.prototype.toString,a="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof a&&"function"==typeof Object.defineProperty)try{r=Object.defineProperty({},"length",{get:function(){throw o}}),o={},a((function(){throw 42}),null,r)}catch(e){e!==o&&(a=null)}else a=null;var s=/^\s*class\b/,u=function(e){try{var t=i.call(e);return s.test(t)}catch(e){return!1}},c=function(e){try{return!u(e)&&(i.call(e),!0)}catch(e){return!1}},l=Object.prototype.toString,f="[object Object]",p="[object Function]",h="[object GeneratorFunction]",d="[object HTMLAllCollection]",m="[object HTML document.all class]",g="[object HTMLCollection]",v="function"==typeof Symbol&&!!Symbol.toStringTag,y=!(0 in[,]),b=function(){return!1};if("object"==typeof document){var w=document.all;l.call(w)===l.call(document.all)&&(b=function(e){if((y||!e)&&(void 0===e||"object"==typeof e))try{var t=l.call(e);return(t===d||t===m||t===g||t===f)&&null==e("")}catch(e){}return!1})}t.exports=a?function(e){if(b(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{a(e,null,r)}catch(e){if(e!==o)return!1}return!u(e)&&c(e)}:function(e){if(b(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(v)return c(e);if(u(e))return!1;var t=l.call(e);return!(t!==p&&t!==h&&!/^\[object HTML/.test(t))&&c(e)}},{}],368:[function(e,t,n){"use strict";var r,o=Object.prototype.toString,i=Function.prototype.toString,a=/^\s*(?:function)?\*/,s=e("has-tostringtag/shams")(),u=Object.getPrototypeOf,c=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(e){}};t.exports=function(e){if("function"!=typeof e)return!1;if(a.test(i.call(e)))return!0;if(!s)return"[object GeneratorFunction]"===o.call(e);if(!u)return!1;if(void 0===r){var t=c();r=!!t&&u(t)}return u(e)===r}},{"has-tostringtag/shams":353}],369:[function(e,t,n){"use strict";var r=e("which-typed-array");t.exports=function(e){return!!r(e)}},{"which-typed-array":420}],370:[function(e,t,n){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],371:[function(e,r,o){(function(e){(function(){!function(e,t){"object"==typeof o&&void 0!==r?r.exports=t(e):"function"==typeof n&&n.amd?n(t):t(e)}("undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:this,(function(e){"use strict";var t,o=(e=e||{}).Base64,i="2.6.4",a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=function(e){for(var t={},n=0,r=e.length;n<r;n++)t[e.charAt(n)]=n;return t}(a),u=String.fromCharCode,c=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?u(192|t>>>6)+u(128|63&t):u(224|t>>>12&15)+u(128|t>>>6&63)+u(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return u(240|t>>>18&7)+u(128|t>>>12&63)+u(128|t>>>6&63)+u(128|63&t)},l=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,f=function(e){return e.replace(l,c)},p=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[a.charAt(n>>>18),a.charAt(n>>>12&63),t>=2?"=":a.charAt(n>>>6&63),t>=1?"=":a.charAt(63&n)].join("")},h=e.btoa&&"function"==typeof e.btoa?function(t){return e.btoa(t)}:function(e){if(e.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return e.replace(/[\s\S]{1,3}/g,p)},d=function(e){return h(f(String(e)))},m=function(e){return e.replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,"")},g=function(e,t){return t?m(d(e)):d(e)},v=function(e){return g(e,!0)};e.Uint8Array&&(t=function(e,t){for(var n="",r=0,o=e.length;r<o;r+=3){var i=e[r],s=e[r+1],u=e[r+2],c=i<<16|s<<8|u;n+=a.charAt(c>>>18)+a.charAt(c>>>12&63)+(void 0!==s?a.charAt(c>>>6&63):"=")+(void 0!==u?a.charAt(63&c):"=")}return t?m(n):n});var y,b=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,w=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return u(55296+(t>>>10))+u(56320+(1023&t));case 3:return u((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return u((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},x=function(e){return e.replace(b,w)},A=function(e){var t=e.length,n=t%4,r=(t>0?s[e.charAt(0)]<<18:0)|(t>1?s[e.charAt(1)]<<12:0)|(t>2?s[e.charAt(2)]<<6:0)|(t>3?s[e.charAt(3)]:0),o=[u(r>>>16),u(r>>>8&255),u(255&r)];return o.length-=[0,0,2,1][n],o.join("")},E=e.atob&&"function"==typeof e.atob?function(t){return e.atob(t)}:function(e){return e.replace(/\S{1,4}/g,A)},C=function(e){return E(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},k=function(e){return x(E(e))},I=function(e){return String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},S=function(e){return k(I(e))};e.Uint8Array&&(y=function(e){return Uint8Array.from(C(I(e)),(function(e){return e.charCodeAt(0)}))});var j=function(){var t=e.Base64;return e.Base64=o,t};if(e.Base64={VERSION:i,atob:C,btoa:h,fromBase64:S,toBase64:g,utob:f,encode:g,encodeURI:v,btou:x,decode:S,noConflict:j,fromUint8Array:t,toUint8Array:y},"function"==typeof Object.defineProperty){var T=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};e.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",T((function(){return S(this)}))),Object.defineProperty(String.prototype,"toBase64",T((function(e){return g(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",T((function(){return g(this,!0)})))}}return e.Meteor&&(Base64=e.Base64),void 0!==r&&r.exports?r.exports.Base64=e.Base64:"function"==typeof n&&n.amd&&n([],(function(){return e.Base64})),{Base64:e.Base64}}))}).call(this)}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],372:[function(e,t,n){"use strict";t.exports=o;var r=Object.prototype.hasOwnProperty;function o(e,t,n){if(!e)throw new TypeError("argument dest is required");if(!t)throw new TypeError("argument src is required");return void 0===n&&(n=!0),Object.getOwnPropertyNames(t).forEach((function(o){if(n||!r.call(e,o)){var i=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(e,o,i)}})),e}},{}],373:[function(e,t,n){"use strict";function r(){this._types=Object.create(null),this._extensions=Object.create(null);for(var e=0;e<arguments.length;e++)this.define(arguments[e]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}e("core-js/modules/es.array.map.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),e("core-js/modules/es.regexp.constructor.js"),e("core-js/modules/es.regexp.to-string.js"),r.prototype.define=function(e,t){for(var n in e){var r=e[n].map((function(e){return e.toLowerCase()}));n=n.toLowerCase();for(var o=0;o<r.length;o++){var i=r[o];if("*"!==i[0]){if(!t&&i in this._types)throw new Error('Attempt to change mapping for "'+i+'" extension from "'+this._types[i]+'" to "'+n+'". Pass `force=true` to allow this, otherwise remove "'+i+'" from the list of extensions for "'+n+'".');this._types[i]=n}}if(t||!this._extensions[n]){var a=r[0];this._extensions[n]="*"!==a[0]?a:a.substr(1)}}},r.prototype.getType=function(e){var t=(e=String(e)).replace(/^.*[/\\]/,"").toLowerCase(),n=t.replace(/^.*\./,"").toLowerCase(),r=t.length<e.length;return(n.length<t.length-1||!r)&&this._types[n]||null},r.prototype.getExtension=function(e){return(e=/^\s*([^;\s]*)/.test(e)&&RegExp.$1)&&this._extensions[e.toLowerCase()]||null},t.exports=r},{"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(e,t,n){"use strict";var r=e("./Mime");t.exports=new r(e("./types/standard"))},{"./Mime":373,"./types/standard":375}],375:[function(e,t,n){"use strict";t.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(e,t,n){var r=1e3,o=60*r,i=60*o,a=24*i,s=7*a,u=365.25*a;function c(e){if(!((e=String(e)).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(e);if(t){var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return n*u;case"weeks":case"week":case"w":return n*s;case"days":case"day":case"d":return n*a;case"hours":case"hour":case"hrs":case"hr":case"h":return n*i;case"minutes":case"minute":case"mins":case"min":case"m":return n*o;case"seconds":case"second":case"secs":case"sec":case"s":return n*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function l(e){var t=Math.abs(e);return t>=a?Math.round(e/a)+"d":t>=i?Math.round(e/i)+"h":t>=o?Math.round(e/o)+"m":t>=r?Math.round(e/r)+"s":e+"ms"}function f(e){var t=Math.abs(e);return t>=a?p(e,t,a,"day"):t>=i?p(e,t,i,"hour"):t>=o?p(e,t,o,"minute"):t>=r?p(e,t,r,"second"):e+" ms"}function p(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}t.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return c(e);if("number"===n&&isFinite(e))return t.long?f(e):l(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],377:[function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function s(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}t.exports=s()?Object.assign:function(e,t){for(var n,s,u=a(e),c=1;c<arguments.length;c++){for(var l in n=Object(arguments[c]))o.call(n,l)&&(u[l]=n[l]);if(r){s=r(n);for(var f=0;f<s.length;f++)i.call(n,s[f])&&(u[s[f]]=n[s[f]])}}return u}},{}],378:[function(e,t,n){(function(e){(function(){"use strict";function n(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,t){for(var n,r="",o=0,i=-1,a=0,s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(47===n)break;n=47}if(47===n){if(i===s-1||1===a);else if(i!==s-1&&2===a){if(r.length<2||2!==o||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var u=r.lastIndexOf("/");if(u!==r.length-1){-1===u?(r="",o=0):o=(r=r.slice(0,u)).length-1-r.lastIndexOf("/"),i=s,a=0;continue}}else if(2===r.length||1===r.length){r="",o=0,i=s,a=0;continue}t&&(r.length>0?r+="/..":r="..",o=2)}else r.length>0?r+="/"+e.slice(i+1,s):r=e.slice(i+1,s),o=s-i-1;i=s,a=0}else 46===n&&-1!==a?++a:a=-1}return r}function o(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+e+r:r}var i={resolve:function(){for(var t,o="",i=!1,a=arguments.length-1;a>=-1&&!i;a--){var s;a>=0?s=arguments[a]:(void 0===t&&(t=e.cwd()),s=t),n(s),0!==s.length&&(o=s+"/"+o,i=47===s.charCodeAt(0))}return o=r(o,!i),i?o.length>0?"/"+o:"/":o.length>0?o:"."},normalize:function(e){if(n(e),0===e.length)return".";var t=47===e.charCodeAt(0),o=47===e.charCodeAt(e.length-1);return 0!==(e=r(e,!t)).length||t||(e="."),e.length>0&&o&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return n(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var r=arguments[t];n(r),r.length>0&&(void 0===e?e=r:e+="/"+r)}return void 0===e?".":i.normalize(e)},relative:function(e,t){if(n(e),n(t),e===t)return"";if((e=i.resolve(e))===(t=i.resolve(t)))return"";for(var r=1;r<e.length&&47===e.charCodeAt(r);++r);for(var o=e.length,a=o-r,s=1;s<t.length&&47===t.charCodeAt(s);++s);for(var u=t.length-s,c=a<u?a:u,l=-1,f=0;f<=c;++f){if(f===c){if(u>c){if(47===t.charCodeAt(s+f))return t.slice(s+f+1);if(0===f)return t.slice(s+f)}else a>c&&(47===e.charCodeAt(r+f)?l=f:0===f&&(l=0));break}var p=e.charCodeAt(r+f);if(p!==t.charCodeAt(s+f))break;47===p&&(l=f)}var h="";for(f=r+l+1;f<=o;++f)f!==o&&47!==e.charCodeAt(f)||(0===h.length?h+="..":h+="/..");return h.length>0?h+t.slice(s+l):(s+=l,47===t.charCodeAt(s)&&++s,t.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(n(e),0===e.length)return".";for(var t=e.charCodeAt(0),r=47===t,o=-1,i=!0,a=e.length-1;a>=1;--a)if(47===(t=e.charCodeAt(a))){if(!i){o=a;break}}else i=!1;return-1===o?r?"/":".":r&&1===o?"//":e.slice(0,o)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');n(e);var r,o=0,i=-1,a=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var s=t.length-1,u=-1;for(r=e.length-1;r>=0;--r){var c=e.charCodeAt(r);if(47===c){if(!a){o=r+1;break}}else-1===u&&(a=!1,u=r+1),s>=0&&(c===t.charCodeAt(s)?-1==--s&&(i=r):(s=-1,i=u))}return o===i?i=u:-1===i&&(i=e.length),e.slice(o,i)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!a){o=r+1;break}}else-1===i&&(a=!1,i=r+1);return-1===i?"":e.slice(o,i)},extname:function(e){n(e);for(var t=-1,r=0,o=-1,i=!0,a=0,s=e.length-1;s>=0;--s){var u=e.charCodeAt(s);if(47!==u)-1===o&&(i=!1,o=s+1),46===u?-1===t?t=s:1!==a&&(a=1):-1!==t&&(a=-1);else if(!i){r=s+1;break}}return-1===t||-1===o||0===a||1===a&&t===o-1&&t===r+1?"":e.slice(t,o)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return o("/",e)},parse:function(e){n(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var r,o=e.charCodeAt(0),i=47===o;i?(t.root="/",r=1):r=0;for(var a=-1,s=0,u=-1,c=!0,l=e.length-1,f=0;l>=r;--l)if(47!==(o=e.charCodeAt(l)))-1===u&&(c=!1,u=l+1),46===o?-1===a?a=l:1!==f&&(f=1):-1!==a&&(f=-1);else if(!c){s=l+1;break}return-1===a||-1===u||0===f||1===f&&a===u-1&&a===s+1?-1!==u&&(t.base=t.name=0===s&&i?e.slice(1,u):e.slice(s,u)):(0===s&&i?(t.name=e.slice(1,a),t.base=e.slice(1,u)):(t.name=e.slice(s,a),t.base=e.slice(s,u)),t.ext=e.slice(a,u)),s>0?t.dir=e.slice(0,s-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,t.exports=i}).call(this)}).call(this,e("_process"))},{_process:467}],379:[function(e,r,o){(function(e){(function(){(function(){"use strict";var t={function:!0,object:!0},i=t[typeof window]&&window||this,a=t[typeof o]&&o,s=t[typeof r]&&r&&!r.nodeType&&r,u=a&&s&&"object"==typeof e&&e;!u||u.global!==u&&u.window!==u&&u.self!==u||(i=u);var c=Math.pow(2,53)-1,l=/\bOpera/,f=Object.prototype,p=f.hasOwnProperty,h=f.toString;function d(e){return(e=String(e)).charAt(0).toUpperCase()+e.slice(1)}function m(e,t,n){var r={"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 t&&n&&/^Win/i.test(e)&&!/^Windows Phone /i.test(e)&&(r=r[/[\d.]+$/.exec(e)])&&(e="Windows "+r),e=String(e),t&&n&&(e=e.replace(RegExp(t,"i"),n)),e=v(e.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])}function g(e,t){var n=-1,r=e?e.length:0;if("number"==typeof r&&r>-1&&r<=c)for(;++n<r;)t(e[n],n,e);else y(e,t)}function v(e){return e=E(e),/^(?:webOS|i(?:OS|P))/.test(e)?e:d(e)}function y(e,t){for(var n in e)p.call(e,n)&&t(e[n],n,e)}function b(e){return null==e?d(e):h.call(e).slice(8,-1)}function w(e,t){var n=null!=e?typeof e[t]:"number";return!(/^(?:boolean|number|string|undefined)$/.test(n)||"object"==n&&!e[t])}function x(e){return String(e).replace(/([ -])(?!$)/g,"$1?")}function A(e,t){var n=null;return g(e,(function(r,o){n=t(n,r,o,e)})),n}function E(e){return String(e).replace(/^ +| +$/g,"")}function C(e){var t=i,n=e&&"object"==typeof e&&"String"!=b(e);n&&(t=e,e=null);var r=t.navigator||{},o=r.userAgent||"";e||(e=o);var a,s,u=n?!!r.likeChrome:/\bChrome\b/.test(e)&&!/internal|\n/i.test(h.toString()),c="Object",f=n?c:"ScriptBridgingProxyObject",p=n?c:"Environment",d=n&&t.java?"JavaPackage":b(t.java),g=n?c:"RuntimeObject",k=/\bJava/.test(d)&&t.java,I=k&&b(t.environment)==p,S=k?"a":"α",j=k?"b":"β",T=t.document||{},R=t.operamini||t.opera,O=l.test(O=n&&R?R["[[Class]]"]:b(R))?O:R=null,D=e,B=[],_=null,N=e==o,P=N&&R&&"function"==typeof R.version&&R.version(),M=z([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),F=Q(["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"]),L=H([{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"]),U=q({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}}),W=V(["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 z(t){return A(t,(function(t,n){return t||RegExp("\\b"+(n.pattern||x(n))+"\\b","i").exec(e)&&(n.label||n)}))}function q(t){return A(t,(function(t,n,r){return t||(n[L]||n[/^[a-z]+(?: +[a-z]+\b)*/i.exec(L)]||RegExp("\\b"+x(r)+"(?:\\b|\\w*\\d)","i").exec(e))&&r}))}function Q(t){return A(t,(function(t,n){return t||RegExp("\\b"+(n.pattern||x(n))+"\\b","i").exec(e)&&(n.label||n)}))}function V(t){return A(t,(function(t,n){var r=n.pattern||x(n);return!t&&(t=RegExp("\\b"+r+"(?:/[\\d.]+|[ \\w.]*)","i").exec(e))&&(t=m(t,r,n.label||n)),t}))}function H(t){return A(t,(function(t,n){var r=n.pattern||x(n);return!t&&(t=RegExp("\\b"+r+" *\\d+[.\\w_]*","i").exec(e)||RegExp("\\b"+r+" *\\w+-[\\w]*","i").exec(e)||RegExp("\\b"+r+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(e))&&((t=String(n.label&&!RegExp(r,"i").test(n.label)?n.label:t).split("/"))[1]&&!/[\d.]+/.test(t[0])&&(t[0]+=" "+t[1]),n=n.label||n,t=v(t[0].replace(RegExp(r,"i"),n).replace(RegExp("; *(?:"+n+"[_-])?","i")," ").replace(RegExp("("+n+")[-_.]?(\\w)","i"),"$1 $2"))),t}))}function G(t){return A(t,(function(t,n){return t||(RegExp(n+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(e)||0)[1]||null}))}function X(){return this.description||""}if(M&&(M=[M]),/\bAndroid\b/.test(W)&&!L&&(a=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(e))&&(L=E(a[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),U&&!L?L=H([U]):U&&L&&(L=L.replace(RegExp("^("+x(U)+")[-_.\\s]","i"),U+" ").replace(RegExp("^("+x(U)+")[-_.]?(\\w)","i"),U+" $2")),(a=/\bGoogle TV\b/.exec(L))&&(L=a[0]),/\bSimulator\b/i.test(e)&&(L=(L?L+" ":"")+"Simulator"),"Opera Mini"==F&&/\bOPiOS\b/.test(e)&&B.push("running in Turbo/Uncompressed mode"),"IE"==F&&/\blike iPhone OS\b/.test(e)?(U=(a=C(e.replace(/like iPhone OS/,""))).manufacturer,L=a.product):/^iP/.test(L)?(F||(F="Safari"),W="iOS"+((a=/ OS ([\d_]+)/i.exec(e))?" "+a[1].replace(/_/g,"."):"")):"Konqueror"==F&&/^Linux\b/i.test(W)?W="Kubuntu":U&&"Google"!=U&&(/Chrome/.test(F)&&!/\bMobile Safari\b/i.test(e)||/\bVita\b/.test(L))||/\bAndroid\b/.test(W)&&/^Chrome/.test(F)&&/\bVersion\//i.test(e)?(F="Android Browser",W=/\bAndroid\b/.test(W)?W:"Android"):"Silk"==F?(/\bMobi/i.test(e)||(W="Android",B.unshift("desktop mode")),/Accelerated *= *true/i.test(e)&&B.unshift("accelerated")):"UC Browser"==F&&/\bUCWEB\b/.test(e)?B.push("speed mode"):"PaleMoon"==F&&(a=/\bFirefox\/([\d.]+)\b/.exec(e))?B.push("identifying as Firefox "+a[1]):"Firefox"==F&&(a=/\b(Mobile|Tablet|TV)\b/i.exec(e))?(W||(W="Firefox OS"),L||(L=a[1])):!F||(a=!/\bMinefield\b/i.test(e)&&/\b(?:Firefox|Safari)\b/.exec(F))?(F&&!L&&/[\/,]|^[^(]+?\)/.test(e.slice(e.indexOf(a+"/")+8))&&(F=null),(a=L||U||W)&&(L||U||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(W))&&(F=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(W)?W:a)+" Browser")):"Electron"==F&&(a=(/\bChrome\/([\d.]+)\b/.exec(e)||0)[1])&&B.push("Chromium "+a),P||(P=G(["(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)","Version",x(F),"(?:Firefox|Minefield|NetFront)"])),(a=("iCab"==M&&parseFloat(P)>3?"WebKit":/\bOpera\b/.test(F)&&(/\bOPR\b/.test(e)?"Blink":"Presto"))||/\b(?:Midori|Nook|Safari)\b/i.test(e)&&!/^(?:Trident|EdgeHTML)$/.test(M)&&"WebKit"||!M&&/\bMSIE\b/i.test(e)&&("Mac OS"==W?"Tasman":"Trident")||"WebKit"==M&&/\bPlayStation\b(?! Vita\b)/i.test(F)&&"NetFront")&&(M=[a]),"IE"==F&&(a=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(e)||0)[1])?(F+=" Mobile",W="Windows Phone "+(/\+$/.test(a)?a:a+".x"),B.unshift("desktop mode")):/\bWPDesktop\b/i.test(e)?(F="IE Mobile",W="Windows Phone 8.x",B.unshift("desktop mode"),P||(P=(/\brv:([\d.]+)/.exec(e)||0)[1])):"IE"!=F&&"Trident"==M&&(a=/\brv:([\d.]+)/.exec(e))&&(F&&B.push("identifying as "+F+(P?" "+P:"")),F="IE",P=a[1]),N){if(w(t,"global"))if(k&&(D=(a=k.lang.System).getProperty("os.arch"),W=W||a.getProperty("os.name")+" "+a.getProperty("os.version")),I){try{P=t.require("ringo/engine").version.join("."),F="RingoJS"}catch(e){(a=t.system)&&a.global.system==t.system&&(F="Narwhal",W||(W=a[0].os||null))}F||(F="Rhino")}else"object"==typeof t.process&&!t.process.browser&&(a=t.process)&&("object"==typeof a.versions&&("string"==typeof a.versions.electron?(B.push("Node "+a.versions.node),F="Electron",P=a.versions.electron):"string"==typeof a.versions.nw&&(B.push("Chromium "+P,"Node "+a.versions.node),F="NW.js",P=a.versions.nw)),F||(F="Node.js",D=a.arch,W=a.platform,P=(P=/[\d.]+/.exec(a.version))?P[0]:null));else b(a=t.runtime)==f?(F="Adobe AIR",W=a.flash.system.Capabilities.os):b(a=t.phantom)==g?(F="PhantomJS",P=(a=a.version||null)&&a.major+"."+a.minor+"."+a.patch):"number"==typeof T.documentMode&&(a=/\bTrident\/(\d+)/i.exec(e))?(P=[P,T.documentMode],(a=+a[1]+4)!=P[1]&&(B.push("IE "+P[1]+" mode"),M&&(M[1]=""),P[1]=a),P="IE"==F?String(P[1].toFixed(1)):P[0]):"number"==typeof T.documentMode&&/^(?:Chrome|Firefox)\b/.test(F)&&(B.push("masking as "+F+" "+P),F="IE",P="11.0",M=["Trident"],W="Windows");W=W&&v(W)}if(P&&(a=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(P)||/(?:alpha|beta)(?: ?\d)?/i.exec(e+";"+(N&&r.appMinorVersion))||/\bMinefield\b/i.test(e)&&"a")&&(_=/b/i.test(a)?"beta":"alpha",P=P.replace(RegExp(a+"\\+?$"),"")+("beta"==_?j:S)+(/\d+\+?/.exec(a)||"")),"Fennec"==F||"Firefox"==F&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(W))F="Firefox Mobile";else if("Maxthon"==F&&P)P=P.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(L))"Xbox 360"==L&&(W=null),"Xbox 360"==L&&/\bIEMobile\b/.test(e)&&B.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(F)&&(!F||L||/Browser|Mobi/.test(F))||"Windows CE"!=W&&!/Mobi/i.test(e))if("IE"==F&&N)try{null===t.external&&B.unshift("platform preview")}catch(e){B.unshift("embedded")}else(/\bBlackBerry\b/.test(L)||/\bBB10\b/.test(e))&&(a=(RegExp(L.replace(/ +/g," *")+"/([.\\d]+)","i").exec(e)||0)[1]||P)?(W=((a=[a,/BB10/.test(e)])[1]?(L=null,U="BlackBerry"):"Device Software")+" "+a[0],P=null):this!=y&&"Wii"!=L&&(N&&R||/Opera/.test(F)&&/\b(?:MSIE|Firefox)\b/i.test(e)||"Firefox"==F&&/\bOS X (?:\d+\.){2,}/.test(W)||"IE"==F&&(W&&!/^Win/.test(W)&&P>5.5||/\bWindows XP\b/.test(W)&&P>8||8==P&&!/\bTrident\b/.test(e)))&&!l.test(a=C.call(y,e.replace(l,"")+";"))&&a.name&&(a="ing as "+a.name+((a=a.version)?" "+a:""),l.test(F)?(/\bIE\b/.test(a)&&"Mac OS"==W&&(W=null),a="identify"+a):(a="mask"+a,F=O?v(O.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(a)&&(W=null),N||(P=null)),M=["Presto"],B.push(a));else F+=" Mobile";(a=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(e)||0)[1])&&(a=[parseFloat(a.replace(/\.(\d)$/,".0$1")),a],"Safari"==F&&"+"==a[1].slice(-1)?(F="WebKit Nightly",_="alpha",P=a[1].slice(0,-1)):P!=a[1]&&P!=(a[2]=(/\bSafari\/([\d.]+\+?)/i.exec(e)||0)[1])||(P=null),a[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(e)||0)[1],537.36==a[0]&&537.36==a[2]&&parseFloat(a[1])>=28&&"WebKit"==M&&(M=["Blink"]),N&&(u||a[1])?(M&&(M[1]="like Chrome"),a=a[1]||((a=a[0])<530?1:a<532?2:a<532.05?3:a<533?4:a<534.03?5:a<534.07?6:a<534.1?7:a<534.13?8:a<534.16?9:a<534.24?10:a<534.3?11:a<535.01?12:a<535.02?"13+":a<535.07?15:a<535.11?16:a<535.19?17:a<536.05?18:a<536.1?19:a<537.01?20:a<537.11?"21+":a<537.13?23:a<537.18?24:a<537.24?25:a<537.36?26:"Blink"!=M?"27":"28")):(M&&(M[1]="like Safari"),a=(a=a[0])<400?1:a<500?2:a<526?3:a<533?4:a<534?"4+":a<535?5:a<537?6:a<538?7:a<601?8:a<602?9:a<604?10:a<606?11:a<608?12:"12"),M&&(M[1]+=" "+(a+="number"==typeof a?".x":/[.+]/.test(a)?"":"+")),"Safari"==F&&(!P||parseInt(P)>45)?P=a:"Chrome"==F&&/\bHeadlessChrome/i.test(e)&&B.unshift("headless")),"Opera"==F&&(a=/\bzbov|zvav$/.exec(W))?(F+=" ",B.unshift("desktop mode"),"zvav"==a?(F+="Mini",P=null):F+="Mobile",W=W.replace(RegExp(" *"+a+"$"),"")):"Safari"==F&&/\bChrome\b/.exec(M&&M[1])?(B.unshift("desktop mode"),F="Chrome Mobile",P=null,/\bOS X\b/.test(W)?(U="Apple",W="iOS 4.3+"):W=null):/\bSRWare Iron\b/.test(F)&&!P&&(P=G("Chrome")),P&&0==P.indexOf(a=/[\d.]+$/.exec(W))&&e.indexOf("/"+a+"-")>-1&&(W=E(W.replace(a,""))),W&&-1!=W.indexOf(F)&&!RegExp(F+" OS").test(W)&&(W=W.replace(RegExp(" *"+x(F)+" *"),"")),M&&!/\b(?:Avant|Nook)\b/.test(F)&&(/Browser|Lunascape|Maxthon/.test(F)||"Safari"!=F&&/^iOS/.test(W)&&/\bSafari\b/.test(M[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(F)&&M[1])&&(a=M[M.length-1])&&B.push(a),B.length&&(B=["("+B.join("; ")+")"]),U&&L&&L.indexOf(U)<0&&B.push("on "+U),L&&B.push((/^on /.test(B[B.length-1])?"":"on ")+L),W&&(a=/ ([\d.+]+)$/.exec(W),s=a&&"/"==W.charAt(W.length-a[0].length-1),W={architecture:32,family:a&&!s?W.replace(a[0],""):W,version:a?a[1]:null,toString:function(){var e=this.version;return this.family+(e&&!s?" "+e:"")+(64==this.architecture?" 64-bit":"")}}),(a=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(D))&&!/\bi686\b/i.test(D)?(W&&(W.architecture=64,W.family=W.family.replace(RegExp(" *"+a),"")),F&&(/\bWOW64\b/i.test(e)||N&&/\w(?:86|32)$/.test(r.cpuClass||r.platform)&&!/\bWin64; x64\b/i.test(e))&&B.unshift("32-bit")):W&&/^OS X/.test(W.family)&&"Chrome"==F&&parseFloat(P)>=39&&(W.architecture=64),e||(e=null);var Z={};return Z.description=e,Z.layout=M&&M[0],Z.manufacturer=U,Z.name=F,Z.prerelease=_,Z.product=L,Z.ua=e,Z.version=F&&P,Z.os=W||{architecture:null,family:null,version:null,toString:function(){return"null"}},Z.parse=C,Z.toString=X,Z.version&&B.unshift(P),Z.name&&B.unshift(F),W&&F&&(W!=String(W).split(" ")[0]||W!=F.split(" ")[0]&&!L)&&B.push(L?"("+W+")":"on "+W),B.length&&(Z.description=B.join(" ")),Z}var k=C();"function"==typeof n&&"object"==typeof n.amd&&n.amd?(i.platform=k,n((function(){return k}))):a&&s?y(k,(function(e,t){a[t]=e})):i.platform=k}).call(this)}).call(this)}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],380:[function(e,t,n){(function(e){(function(){"use strict";function n(t,n,r,o){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var i,a,s=arguments.length;switch(s){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,n)}));case 3:return e.nextTick((function(){t.call(null,n,r)}));case 4:return e.nextTick((function(){t.call(null,n,r,o)}));default:for(i=new Array(s-1),a=0;a<i.length;)i[a++]=arguments[a];return e.nextTick((function(){t.apply(null,i)}))}}void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:n}:t.exports=e}).call(this)}).call(this,e("_process"))},{_process:467}],381:[function(e,t,n){var r,o,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(e){if(r===setTimeout)return setTimeout(e,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}function c(e){if(o===clearTimeout)return clearTimeout(e);if((o===s||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{return o(e)}catch(t){try{return o.call(null,e)}catch(t){return o.call(this,e)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{o="function"==typeof clearTimeout?clearTimeout:s}catch(e){o=s}}();var l,f=[],p=!1,h=-1;function d(){p&&l&&(p=!1,l.length?f=l.concat(f):h=-1,f.length&&m())}function m(){if(!p){var e=u(d);p=!0;for(var t=f.length;t;){for(l=f,f=[];++h<t;)l&&l[h].run();h=-1,t=f.length}l=null,p=!1,c(e)}}function g(e,t){this.fun=e,this.array=t}function v(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];f.push(new g(e,t)),1!==f.length||p||u(m)},g.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],382:[function(e,r,o){(function(e){(function(){!function(t){var i="object"==typeof o&&o&&!o.nodeType&&o,a="object"==typeof r&&r&&!r.nodeType&&r,s="object"==typeof e&&e;s.global!==s&&s.window!==s&&s.self!==s||(t=s);var u,c,l=2147483647,f=36,p=1,h=26,d=38,m=700,g=72,v=128,y="-",b=/^xn--/,w=/[^\x20-\x7E]/,x=/[\x2E\u3002\uFF0E\uFF61]/g,A={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},E=f-p,C=Math.floor,k=String.fromCharCode;function I(e){throw new RangeError(A[e])}function S(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function j(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+S((e=e.replace(x,".")).split("."),t).join(".")}function T(e){for(var t,n,r=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(n=e.charCodeAt(o++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--):r.push(t);return r}function R(e){return S(e,(function(e){var t="";return e>65535&&(t+=k((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=k(e)})).join("")}function O(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:f}function D(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function B(e,t,n){var r=0;for(e=n?C(e/m):e>>1,e+=C(e/t);e>E*h>>1;r+=f)e=C(e/E);return C(r+(E+1)*e/(e+d))}function _(e){var t,n,r,o,i,a,s,u,c,d,m=[],b=e.length,w=0,x=v,A=g;for((n=e.lastIndexOf(y))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&I("not-basic"),m.push(e.charCodeAt(r));for(o=n>0?n+1:0;o<b;){for(i=w,a=1,s=f;o>=b&&I("invalid-input"),((u=O(e.charCodeAt(o++)))>=f||u>C((l-w)/a))&&I("overflow"),w+=u*a,!(u<(c=s<=A?p:s>=A+h?h:s-A));s+=f)a>C(l/(d=f-c))&&I("overflow"),a*=d;A=B(w-i,t=m.length+1,0==i),C(w/t)>l-x&&I("overflow"),x+=C(w/t),w%=t,m.splice(w++,0,x)}return R(m)}function N(e){var t,n,r,o,i,a,s,u,c,d,m,b,w,x,A,E=[];for(b=(e=T(e)).length,t=v,n=0,i=g,a=0;a<b;++a)(m=e[a])<128&&E.push(k(m));for(r=o=E.length,o&&E.push(y);r<b;){for(s=l,a=0;a<b;++a)(m=e[a])>=t&&m<s&&(s=m);for(s-t>C((l-n)/(w=r+1))&&I("overflow"),n+=(s-t)*w,t=s,a=0;a<b;++a)if((m=e[a])<t&&++n>l&&I("overflow"),m==t){for(u=n,c=f;!(u<(d=c<=i?p:c>=i+h?h:c-i));c+=f)A=u-d,x=f-d,E.push(k(D(d+A%x,0))),u=C(A/x);E.push(k(D(u,0))),i=B(n,w,r==o),n=0,++r}++n,++t}return E.join("")}function P(e){return j(e,(function(e){return b.test(e)?_(e.slice(4).toLowerCase()):e}))}function M(e){return j(e,(function(e){return w.test(e)?"xn--"+N(e):e}))}if(u={version:"1.4.1",ucs2:{decode:T,encode:R},decode:_,encode:N,toASCII:M,toUnicode:P},"function"==typeof n&&"object"==typeof n.amd&&n.amd)n("punycode",(function(){return u}));else if(i&&a)if(r.exports==i)a.exports=u;else for(c in u)u.hasOwnProperty(c)&&(i[c]=u[c]);else t.punycode=u}(this)}).call(this)}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],383:[function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,n,i){t=t||"&",n=n||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var u=1e3;i&&"number"==typeof i.maxKeys&&(u=i.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var l=0;l<c;++l){var f,p,h,d,m=e[l].replace(s,"%20"),g=m.indexOf(n);g>=0?(f=m.substr(0,g),p=m.substr(g+1)):(f=m,p=""),h=decodeURIComponent(f),d=decodeURIComponent(p),r(a,h)?o(a[h])?a[h].push(d):a[h]=[a[h],d]:a[h]=d}return a};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],384:[function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,n,s){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?i(a(e),(function(a){var s=encodeURIComponent(r(a))+n;return o(e[a])?i(e[a],(function(e){return s+encodeURIComponent(r(e))})).join(t):s+encodeURIComponent(r(e[a]))})).join(t):s?encodeURIComponent(r(s))+n+encodeURIComponent(r(e)):""};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function i(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var a=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},{}],385:[function(e,t,n){"use strict";n.decode=n.parse=e("./decode"),n.encode=n.stringify=e("./encode")},{"./decode":383,"./encode":384}],386:[function(e,t,n){"use strict";var r=e("process-nextick-args"),o=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};t.exports=f;var i=Object.create(e("core-util-is"));i.inherits=e("inherits");var a=e("./_stream_readable"),s=e("./_stream_writable");i.inherits(f,a);for(var u=o(s.prototype),c=0;c<u.length;c++){var l=u[c];f.prototype[l]||(f.prototype[l]=s.prototype[l])}function f(e){if(!(this instanceof f))return new f(e);a.call(this,e),s.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",p)}function p(){this.allowHalfOpen||this._writableState.ended||r.nextTick(h,this)}function h(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),f.prototype._destroy=function(e,t){this.push(null),this.end(),r.nextTick(t,e)}},{"./_stream_readable":388,"./_stream_writable":390,"core-util-is":341,inherits:364,"process-nextick-args":380}],387:[function(e,t,n){"use strict";t.exports=i;var r=e("./_stream_transform"),o=Object.create(e("core-util-is"));function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}o.inherits=e("inherits"),o.inherits(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},{"./_stream_transform":389,"core-util-is":341,inherits:364}],388:[function(e,n,r){(function(t,r){(function(){"use strict";var o=e("process-nextick-args");n.exports=A;var i,a=e("isarray");A.ReadableState=x,e("events").EventEmitter;var s=function(e,t){return e.listeners(t).length},u=e("./internal/streams/stream"),c=e("safe-buffer").Buffer,l=r.Uint8Array||function(){};function f(e){return c.from(e)}function p(e){return c.isBuffer(e)||e instanceof l}var h=Object.create(e("core-util-is"));h.inherits=e("inherits");var d=e("util"),m=void 0;m=d&&d.debuglog?d.debuglog("stream"):function(){};var g,v=e("./internal/streams/BufferList"),y=e("./internal/streams/destroy");h.inherits(A,u);var b=["error","close","destroy","pause","resume"];function w(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}function x(t,n){t=t||{};var r=n instanceof(i=i||e("./_stream_duplex"));this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var o=t.highWaterMark,a=t.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:r&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new v,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=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(g||(g=e("string_decoder/").StringDecoder),this.decoder=new g(t.encoding),this.encoding=t.encoding)}function A(t){if(i=i||e("./_stream_duplex"),!(this instanceof A))return new A(t);this._readableState=new x(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function E(e,t,n,r,o){var i,a=e._readableState;return null===t?(a.reading=!1,R(e,a)):(o||(i=k(a,t)),i?e.emit("error",i):a.objectMode||t&&t.length>0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=f(t)),r?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):C(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?C(e,a,t,!1):B(e,a)):C(e,a,t,!1))):r||(a.reading=!1)),I(a)}function C(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&O(e)),B(e,t)}function k(e,t){var n;return p(t)||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function I(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}Object.defineProperty(A.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),A.prototype.destroy=y.destroy,A.prototype._undestroy=y.undestroy,A.prototype._destroy=function(e,t){this.push(null),t(e)},A.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=c.from(e,t),t=""),n=!0),E(this,e,t,!1,n)},A.prototype.unshift=function(e){return E(this,e,null,!0,!1)},A.prototype.isPaused=function(){return!1===this._readableState.flowing},A.prototype.setEncoding=function(t){return g||(g=e("string_decoder/").StringDecoder),this._readableState.decoder=new g(t),this._readableState.encoding=t,this};var S=8388608;function j(e){return e>=S?e=S:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function T(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=j(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function R(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,O(e)}}function O(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(m("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?o.nextTick(D,e):D(e))}function D(e){m("emit readable"),e.emit("readable"),L(e)}function B(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(_,e,t))}function _(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(m("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function N(e){return function(){var t=e._readableState;m("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,L(e))}}function P(e){m("readable nexttick read 0"),e.read(0)}function M(e,t){t.resumeScheduled||(t.resumeScheduled=!0,o.nextTick(F,e,t))}function F(e,t){t.reading||(m("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),L(e),t.flowing&&!t.reading&&e.read(0)}function L(e){var t=e._readableState;for(m("flow",t.flowing);t.flowing&&null!==e.read(););}function U(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=W(e,t.buffer,t.decoder),n);var n}function W(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?z(e,t):q(e,t),r}function z(e,t){var n=t.head,r=1,o=n.data;for(e-=o.length;n=n.next;){var i=n.data,a=e>i.length?i.length:e;if(a===i.length?o+=i:o+=i.slice(0,e),0==(e-=a)){a===i.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(a));break}++r}return t.length-=r,o}function q(e,t){var n=c.allocUnsafe(e),r=t.head,o=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var i=r.data,a=e>i.length?i.length:e;if(i.copy(n,n.length-e,0,a),0==(e-=a)){a===i.length?(++o,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(a));break}++o}return t.length-=o,n}function Q(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,o.nextTick(V,t,e))}function V(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function H(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}A.prototype.read=function(e){m("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return m("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?Q(this):O(this),null;if(0===(e=T(e,t))&&t.ended)return 0===t.length&&Q(this),null;var r,o=t.needReadable;return m("need readable",o),(0===t.length||t.length-e<t.highWaterMark)&&m("length less than watermark",o=!0),t.ended||t.reading?m("reading or ended",o=!1):o&&(m("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=T(n,t))),null===(r=e>0?U(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&Q(this)),null!==r&&this.emit("data",r),r},A.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},A.prototype.pipe=function(e,n){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,m("pipe count=%d opts=%j",i.pipesCount,n);var a=n&&!1===n.end||e===t.stdout||e===t.stderr?b:c;function u(e,t){m("onunpipe"),e===r&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,p())}function c(){m("onend"),e.end()}i.endEmitted?o.nextTick(a):r.once("end",a),e.on("unpipe",u);var l=N(r);e.on("drain",l);var f=!1;function p(){m("cleanup"),e.removeListener("close",v),e.removeListener("finish",y),e.removeListener("drain",l),e.removeListener("error",g),e.removeListener("unpipe",u),r.removeListener("end",c),r.removeListener("end",b),r.removeListener("data",d),f=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||l()}var h=!1;function d(t){m("ondata"),h=!1,!1!==e.write(t)||h||((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==H(i.pipes,e))&&!f&&(m("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,h=!0),r.pause())}function g(t){m("onerror",t),b(),e.removeListener("error",g),0===s(e,"error")&&e.emit("error",t)}function v(){e.removeListener("finish",y),b()}function y(){m("onfinish"),e.removeListener("close",v),b()}function b(){m("unpipe"),r.unpipe(e)}return r.on("data",d),w(e,"error",g),e.once("close",v),e.once("finish",y),e.emit("pipe",r),i.flowing||(m("pipe resume"),r.resume()),e},A.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<o;i++)r[i].emit("unpipe",this,n);return this}var a=H(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},A.prototype.on=function(e,t){var n=u.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&O(this):o.nextTick(P,this))}return n},A.prototype.addListener=A.prototype.on,A.prototype.resume=function(){var e=this._readableState;return e.flowing||(m("resume"),e.flowing=!0,M(this,e)),this},A.prototype.pause=function(){return m("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(m("pause"),this._readableState.flowing=!1,this.emit("pause")),this},A.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var o in e.on("end",(function(){if(m("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(o){m("wrapped data"),n.decoder&&(o=n.decoder.write(o)),n.objectMode&&null==o||(n.objectMode||o&&o.length)&&(t.push(o)||(r=!0,e.pause()))})),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var i=0;i<b.length;i++)e.on(b[i],this.emit.bind(this,b[i]));return this._read=function(t){m("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(A.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),A._fromList=U}).call(this)}).call(this,e("_process"),void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?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(e,t,n){"use strict";t.exports=a;var r=e("./_stream_duplex"),o=Object.create(e("core-util-is"));function i(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);r.call(this,e),this._transformState={afterTransform:i.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",s)}function s(){var e=this;"function"==typeof this._flush?this._flush((function(t,n){u(e,t,n)})):u(this,null,null)}function u(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}o.inherits=e("inherits"),o.inherits(a,r),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,r.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},a.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var o=this._readableState;(r.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},a.prototype._destroy=function(e,t){var n=this;r.prototype._destroy.call(this,e,(function(e){t(e),n.emit("close")}))}},{"./_stream_duplex":386,"core-util-is":341,inherits:364}],390:[function(e,n,r){(function(t,r,o){(function(){"use strict";var i=e("process-nextick-args");function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){M(t,e)}}n.exports=w;var s,u=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?o:i.nextTick;w.WritableState=b;var c=Object.create(e("core-util-is"));c.inherits=e("inherits");var l={deprecate:e("util-deprecate")},f=e("./internal/streams/stream"),p=e("safe-buffer").Buffer,h=r.Uint8Array||function(){};function d(e){return p.from(e)}function m(e){return p.isBuffer(e)||e instanceof h}var g,v=e("./internal/streams/destroy");function y(){}function b(t,n){s=s||e("./_stream_duplex"),t=t||{};var r=n instanceof s;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var o=t.highWaterMark,i=t.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:r&&(i||0===i)?i:u,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 c=!1===t.decodeStrings;this.decodeStrings=!c,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){j(n,e)},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 a(this)}function w(t){if(s=s||e("./_stream_duplex"),!(g.call(w,this)||this instanceof s))return new w(t);this._writableState=new b(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),f.call(this)}function x(e,t){var n=new Error("write after end");e.emit("error",n),i.nextTick(t,n)}function A(e,t,n,r){var o=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),i.nextTick(r,a),o=!1),o}function E(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=p.from(t,n)),t}function C(e,t,n,r,o,i){if(!n){var a=E(t,r,o);r!==a&&(n=!0,o="buffer",r=a)}var s=t.objectMode?1:r.length;t.length+=s;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:o,isBuf:n,callback:i,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else k(e,t,!1,s,r,o,i);return u}function k(e,t,n,r,o,i,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,n?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function I(e,t,n,r,o){--t.pendingcb,n?(i.nextTick(o,r),i.nextTick(N,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(o(r),e._writableState.errorEmitted=!0,e.emit("error",r),N(e,t))}function S(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function j(e,t){var n=e._writableState,r=n.sync,o=n.writecb;if(S(n),t)I(e,n,r,t,o);else{var i=D(n);i||n.corked||n.bufferProcessing||!n.bufferedRequest||O(e,n),r?u(T,e,n,i,o):T(e,n,i,o)}}function T(e,t,n,r){n||R(e,t),t.pendingcb--,r(),N(e,t)}function R(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function O(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,o=new Array(r),i=t.corkedRequestsFree;i.entry=n;for(var s=0,u=!0;n;)o[s]=n,n.isBuf||(u=!1),n=n.next,s+=1;o.allBuffers=u,k(e,t,!0,t.length,o,"",i.finish),t.pendingcb++,t.lastBufferedRequest=null,i.next?(t.corkedRequestsFree=i.next,i.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,l=n.encoding,f=n.callback;if(k(e,t,!1,t.objectMode?1:c.length,c,l,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function D(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function B(e,t){e._final((function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),N(e,t)}))}function _(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(B,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function N(e,t){var n=D(t);return n&&(_(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}function P(e,t,n){t.ending=!0,N(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}function M(e,t,n){var r=e.entry;for(e.entry=null;r;){var o=r.callback;t.pendingcb--,o(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}c.inherits(w,f),b.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(b.prototype,"buffer",{get:l.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(g=Function.prototype[Symbol.hasInstance],Object.defineProperty(w,Symbol.hasInstance,{value:function(e){return!!g.call(this,e)||this===w&&e&&e._writableState instanceof b}})):g=function(e){return e instanceof this},w.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},w.prototype.write=function(e,t,n){var r=this._writableState,o=!1,i=!r.objectMode&&m(e);return i&&!p.isBuffer(e)&&(e=d(e)),"function"==typeof t&&(n=t,t=null),i?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=y),r.ended?x(this,n):(i||A(this,r,e,n))&&(r.pendingcb++,o=C(this,r,i,e,t,n)),o},w.prototype.cork=function(){this._writableState.corked++},w.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||O(this,e))},w.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(w.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),w.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},w.prototype._writev=null,w.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||P(this,r,n)},Object.defineProperty(w.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),w.prototype.destroy=v.destroy,w.prototype._undestroy=v.undestroy,w.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this)}).call(this,e("_process"),void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("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(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=e("safe-buffer").Buffer,i=e("util");function a(e,t,n){e.copy(t,n)}t.exports=function(){function e(){r(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return o.alloc(0);if(1===this.length)return this.head.data;for(var t=o.allocUnsafe(e>>>0),n=this.head,r=0;n;)a(n.data,t,r),r+=n.data.length,n=n.next;return t},e}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},{"safe-buffer":396,util:89}],392:[function(e,t,n){"use strict";var r=e("process-nextick-args");function o(e,t){var n=this,o=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return o||i?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(a,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(r.nextTick(a,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)})),this)}function i(){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 a(e,t){e.emit("error",t)}t.exports={destroy:o,undestroy:i}},{"process-nextick-args":380}],393:[function(e,t,n){t.exports=e("events").EventEmitter},{events:344}],394:[function(e,t,n){(n=t.exports=e("./lib/_stream_readable.js")).Stream=n,n.Readable=n,n.Writable=e("./lib/_stream_writable.js"),n.Duplex=e("./lib/_stream_duplex.js"),n.Transform=e("./lib/_stream_transform.js"),n.PassThrough=e("./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(e,t,n){var r=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),a=new T(r||[]);return i._invoke=k(e,n,a),i}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var f="suspendedStart",p="suspendedYield",h="executing",d="completed",m={};function g(){}function v(){}function y(){}var b={};u(b,i,(function(){return this}));var w=Object.getPrototypeOf,x=w&&w(w(R([])));x&&x!==n&&r.call(x,i)&&(b=x);var A=y.prototype=g.prototype=Object.create(b);function E(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function n(o,i,a,s){var u=l(e[o],e,i);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var o;function i(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}this._invoke=i}function k(e,t,n){var r=f;return function(o,i){if(r===h)throw new Error("Generator is already running");if(r===d){if("throw"===o)throw i;return O()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=I(a,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var u=l(e,t,n);if("normal"===u.type){if(r=n.done?d:p,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=d,n.method="throw",n.arg=u.arg)}}}function I(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,I(e,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var o=l(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function R(e){if(e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}return{next:O}}function O(){return{value:t,done:!0}}return v.prototype=y,u(A,"constructor",y),u(y,"constructor",v),v.displayName=u(y,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,u(e,s,"GeneratorFunction")),e.prototype=Object.create(A),e},e.awrap=function(e){return{__await:e}},E(C.prototype),u(C.prototype,a,(function(){return this})),e.AsyncIterator=C,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new C(c(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(A),u(A,s,"Generator"),u(A,i,(function(){return this})),u(A,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=R,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return s.type="throw",s.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),j(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;j(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:R(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}("object"==typeof t?t.exports:{});try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},{}],396:[function(e,t,n){var r=e("buffer"),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?t.exports=r:(i(r,n),n.Buffer=a),i(o,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},{buffer:90}],397:[function(e,t,n){(function(t){(function(){!function(n){n.parser=function(e,t){return new i(e,t)},n.SAXParser=i,n.SAXStream=f,n.createStream=l,n.MAX_BUFFER_LENGTH=65536;var r,o=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function i(e,t){if(!(this instanceof i))return new i(e,t);var r=this;s(r),r.q=r.c="",r.bufferCheckPosition=n.MAX_BUFFER_LENGTH,r.opt=t||{},r.opt.lowercase=r.opt.lowercase||r.opt.lowercasetags,r.looseCase=r.opt.lowercase?"toLowerCase":"toUpperCase",r.tags=[],r.closed=r.closedRoot=r.sawRoot=!1,r.tag=r.error=null,r.strict=!!e,r.noscript=!(!e&&!r.opt.noscript),r.state=T.BEGIN,r.strictEntities=r.opt.strictEntities,r.ENTITIES=r.strictEntities?Object.create(n.XML_ENTITIES):Object.create(n.ENTITIES),r.attribList=[],r.opt.xmlns&&(r.ns=Object.create(g)),r.trackPosition=!1!==r.opt.position,r.trackPosition&&(r.position=r.line=r.column=0),O(r,"onready")}function a(e){for(var t=Math.max(n.MAX_BUFFER_LENGTH,10),r=0,i=0,a=o.length;i<a;i++){var s=e[o[i]].length;if(s>t)switch(o[i]){case"textNode":B(e);break;case"cdata":D(e,"oncdata",e.cdata),e.cdata="";break;case"script":D(e,"onscript",e.script),e.script="";break;default:N(e,"Max buffer length exceeded: "+o[i])}r=Math.max(r,s)}var u=n.MAX_BUFFER_LENGTH-r;e.bufferCheckPosition=u+e.position}function s(e){for(var t=0,n=o.length;t<n;t++)e[o[t]]=""}function u(e){B(e),""!==e.cdata&&(D(e,"oncdata",e.cdata),e.cdata=""),""!==e.script&&(D(e,"onscript",e.script),e.script="")}n.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(e){function t(){}return t.prototype=e,new t}),Object.keys||(Object.keys=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}),i.prototype={end:function(){P(this)},write:H,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){u(this)}};try{r=e("stream").Stream}catch(e){r=function(){}}var c=n.EVENTS.filter((function(e){return"error"!==e&&"end"!==e}));function l(e,t){return new f(e,t)}function f(e,t){if(!(this instanceof f))return new f(e,t);r.apply(this),this._parser=new i(e,t),this.writable=!0,this.readable=!0;var n=this;this._parser.onend=function(){n.emit("end")},this._parser.onerror=function(e){n.emit("error",e),n._parser.error=null},this._decoder=null,c.forEach((function(e){Object.defineProperty(n,"on"+e,{get:function(){return n._parser["on"+e]},set:function(t){if(!t)return n.removeAllListeners(e),n._parser["on"+e]=t,t;n.on(e,t)},enumerable:!0,configurable:!1})}))}f.prototype=Object.create(r.prototype,{constructor:{value:f}}),f.prototype.write=function(n){if("function"==typeof t&&"function"==typeof t.isBuffer&&t.isBuffer(n)){if(!this._decoder){var r=e("string_decoder").StringDecoder;this._decoder=new r("utf8")}n=this._decoder.write(n)}return this._parser.write(n.toString()),this.emit("data",n),!0},f.prototype.end=function(e){return e&&e.length&&this.write(e),this._parser.end(),!0},f.prototype.on=function(e,t){var n=this;return n._parser["on"+e]||-1===c.indexOf(e)||(n._parser["on"+e]=function(){var t=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),n.emit.apply(n,t)}),r.prototype.on.call(n,e,t)};var p="[CDATA[",h="DOCTYPE",d="http://www.w3.org/XML/1998/namespace",m="http://www.w3.org/2000/xmlns/",g={xml:d,xmlns:m},v=/[:_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]/,y=/[:_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-]/,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]/,w=/[#:_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 x(e){return" "===e||"\n"===e||"\r"===e||"\t"===e}function A(e){return'"'===e||"'"===e}function E(e){return">"===e||x(e)}function C(e,t){return e.test(t)}function k(e,t){return!C(e,t)}var I,S,j,T=0;for(var R in n.STATE={BEGIN:T++,BEGIN_WHITESPACE:T++,TEXT:T++,TEXT_ENTITY:T++,OPEN_WAKA:T++,SGML_DECL:T++,SGML_DECL_QUOTED:T++,DOCTYPE:T++,DOCTYPE_QUOTED:T++,DOCTYPE_DTD:T++,DOCTYPE_DTD_QUOTED:T++,COMMENT_STARTING:T++,COMMENT:T++,COMMENT_ENDING:T++,COMMENT_ENDED:T++,CDATA:T++,CDATA_ENDING:T++,CDATA_ENDING_2:T++,PROC_INST:T++,PROC_INST_BODY:T++,PROC_INST_ENDING:T++,OPEN_TAG:T++,OPEN_TAG_SLASH:T++,ATTRIB:T++,ATTRIB_NAME:T++,ATTRIB_NAME_SAW_WHITE:T++,ATTRIB_VALUE:T++,ATTRIB_VALUE_QUOTED:T++,ATTRIB_VALUE_CLOSED:T++,ATTRIB_VALUE_UNQUOTED:T++,ATTRIB_VALUE_ENTITY_Q:T++,ATTRIB_VALUE_ENTITY_U:T++,CLOSE_TAG:T++,CLOSE_TAG_SAW_WHITE:T++,SCRIPT:T++,SCRIPT_ENDING:T++},n.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},n.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(n.ENTITIES).forEach((function(e){var t=n.ENTITIES[e],r="number"==typeof t?String.fromCharCode(t):t;n.ENTITIES[e]=r})),n.STATE)n.STATE[n.STATE[R]]=R;function O(e,t,n){e[t]&&e[t](n)}function D(e,t,n){e.textNode&&B(e),O(e,t,n)}function B(e){e.textNode=_(e.opt,e.textNode),e.textNode&&O(e,"ontext",e.textNode),e.textNode=""}function _(e,t){return e.trim&&(t=t.trim()),e.normalize&&(t=t.replace(/\s+/g," ")),t}function N(e,t){return B(e),e.trackPosition&&(t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c),t=new Error(t),e.error=t,O(e,"onerror",t),e}function P(e){return e.sawRoot&&!e.closedRoot&&M(e,"Unclosed root tag"),e.state!==T.BEGIN&&e.state!==T.BEGIN_WHITESPACE&&e.state!==T.TEXT&&N(e,"Unexpected end"),B(e),e.c="",e.closed=!0,O(e,"onend"),i.call(e,e.strict,e.opt),e}function M(e,t){if("object"!=typeof e||!(e instanceof i))throw new Error("bad call to strictFail");e.strict&&N(e,t)}function F(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,n=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(n.ns=t.ns),e.attribList.length=0,D(e,"onopentagstart",n)}function L(e,t){var n=e.indexOf(":")<0?["",e]:e.split(":"),r=n[0],o=n[1];return t&&"xmlns"===e&&(r="xmlns",o=""),{prefix:r,local:o}}function U(e){if(e.strict||(e.attribName=e.attribName[e.looseCase]()),-1!==e.attribList.indexOf(e.attribName)||e.tag.attributes.hasOwnProperty(e.attribName))e.attribName=e.attribValue="";else{if(e.opt.xmlns){var t=L(e.attribName,!0),n=t.prefix,r=t.local;if("xmlns"===n)if("xml"===r&&e.attribValue!==d)M(e,"xml: prefix must be bound to "+d+"\nActual: "+e.attribValue);else if("xmlns"===r&&e.attribValue!==m)M(e,"xmlns: prefix must be bound to "+m+"\nActual: "+e.attribValue);else{var o=e.tag,i=e.tags[e.tags.length-1]||e;o.ns===i.ns&&(o.ns=Object.create(i.ns)),o.ns[r]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,D(e,"onattribute",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=""}}function W(e,t){if(e.opt.xmlns){var n=e.tag,r=L(e.tagName);n.prefix=r.prefix,n.local=r.local,n.uri=n.ns[r.prefix]||"",n.prefix&&!n.uri&&(M(e,"Unbound namespace prefix: "+JSON.stringify(e.tagName)),n.uri=r.prefix);var o=e.tags[e.tags.length-1]||e;n.ns&&o.ns!==n.ns&&Object.keys(n.ns).forEach((function(t){D(e,"onopennamespace",{prefix:t,uri:n.ns[t]})}));for(var i=0,a=e.attribList.length;i<a;i++){var s=e.attribList[i],u=s[0],c=s[1],l=L(u,!0),f=l.prefix,p=l.local,h=""===f?"":n.ns[f]||"",d={name:u,value:c,prefix:f,local:p,uri:h};f&&"xmlns"!==f&&!h&&(M(e,"Unbound namespace prefix: "+JSON.stringify(f)),d.uri=f),e.tag.attributes[u]=d,D(e,"onattribute",d)}e.attribList.length=0}e.tag.isSelfClosing=!!t,e.sawRoot=!0,e.tags.push(e.tag),D(e,"onopentag",e.tag),t||(e.noscript||"script"!==e.tagName.toLowerCase()?e.state=T.TEXT:e.state=T.SCRIPT,e.tag=null,e.tagName=""),e.attribName=e.attribValue="",e.attribList.length=0}function z(e){if(!e.tagName)return M(e,"Weird empty close tag."),e.textNode+="</>",void(e.state=T.TEXT);if(e.script){if("script"!==e.tagName)return e.script+="</"+e.tagName+">",e.tagName="",void(e.state=T.SCRIPT);D(e,"onscript",e.script),e.script=""}var t=e.tags.length,n=e.tagName;e.strict||(n=n[e.looseCase]());for(var r=n;t--&&e.tags[t].name!==r;)M(e,"Unexpected close tag");if(t<0)return M(e,"Unmatched closing tag: "+e.tagName),e.textNode+="</"+e.tagName+">",void(e.state=T.TEXT);e.tagName=n;for(var o=e.tags.length;o-- >t;){var i=e.tag=e.tags.pop();e.tagName=e.tag.name,D(e,"onclosetag",e.tagName);var a={};for(var s in i.ns)a[s]=i.ns[s];var u=e.tags[e.tags.length-1]||e;e.opt.xmlns&&i.ns!==u.ns&&Object.keys(i.ns).forEach((function(t){var n=i.ns[t];D(e,"onclosenamespace",{prefix:t,uri:n})}))}0===t&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=T.TEXT}function q(e){var t,n=e.entity,r=n.toLowerCase(),o="";return e.ENTITIES[n]?e.ENTITIES[n]:e.ENTITIES[r]?e.ENTITIES[r]:("#"===(n=r).charAt(0)&&("x"===n.charAt(1)?(n=n.slice(2),o=(t=parseInt(n,16)).toString(16)):(n=n.slice(1),o=(t=parseInt(n,10)).toString(10))),n=n.replace(/^0+/,""),isNaN(t)||o.toLowerCase()!==n?(M(e,"Invalid character entity"),"&"+e.entity+";"):String.fromCodePoint(t))}function Q(e,t){"<"===t?(e.state=T.OPEN_WAKA,e.startTagPosition=e.position):x(t)||(M(e,"Non-whitespace before first tag."),e.textNode=t,e.state=T.TEXT)}function V(e,t){var n="";return t<e.length&&(n=e.charAt(t)),n}function H(e){var t=this;if(this.error)throw this.error;if(t.closed)return N(t,"Cannot write after close. Assign an onready handler.");if(null===e)return P(t);"object"==typeof e&&(e=e.toString());for(var n=0,r="";r=V(e,n++),t.c=r,r;)switch(t.trackPosition&&(t.position++,"\n"===r?(t.line++,t.column=0):t.column++),t.state){case T.BEGIN:if(t.state=T.BEGIN_WHITESPACE,"\ufeff"===r)continue;Q(t,r);continue;case T.BEGIN_WHITESPACE:Q(t,r);continue;case T.TEXT:if(t.sawRoot&&!t.closedRoot){for(var o=n-1;r&&"<"!==r&&"&"!==r;)(r=V(e,n++))&&t.trackPosition&&(t.position++,"\n"===r?(t.line++,t.column=0):t.column++);t.textNode+=e.substring(o,n-1)}"<"!==r||t.sawRoot&&t.closedRoot&&!t.strict?(x(r)||t.sawRoot&&!t.closedRoot||M(t,"Text data outside of root node."),"&"===r?t.state=T.TEXT_ENTITY:t.textNode+=r):(t.state=T.OPEN_WAKA,t.startTagPosition=t.position);continue;case T.SCRIPT:"<"===r?t.state=T.SCRIPT_ENDING:t.script+=r;continue;case T.SCRIPT_ENDING:"/"===r?t.state=T.CLOSE_TAG:(t.script+="<"+r,t.state=T.SCRIPT);continue;case T.OPEN_WAKA:if("!"===r)t.state=T.SGML_DECL,t.sgmlDecl="";else if(x(r));else if(C(v,r))t.state=T.OPEN_TAG,t.tagName=r;else if("/"===r)t.state=T.CLOSE_TAG,t.tagName="";else if("?"===r)t.state=T.PROC_INST,t.procInstName=t.procInstBody="";else{if(M(t,"Unencoded <"),t.startTagPosition+1<t.position){var i=t.position-t.startTagPosition;r=new Array(i).join(" ")+r}t.textNode+="<"+r,t.state=T.TEXT}continue;case T.SGML_DECL:(t.sgmlDecl+r).toUpperCase()===p?(D(t,"onopencdata"),t.state=T.CDATA,t.sgmlDecl="",t.cdata=""):t.sgmlDecl+r==="--"?(t.state=T.COMMENT,t.comment="",t.sgmlDecl=""):(t.sgmlDecl+r).toUpperCase()===h?(t.state=T.DOCTYPE,(t.doctype||t.sawRoot)&&M(t,"Inappropriately located doctype declaration"),t.doctype="",t.sgmlDecl=""):">"===r?(D(t,"onsgmldeclaration",t.sgmlDecl),t.sgmlDecl="",t.state=T.TEXT):A(r)?(t.state=T.SGML_DECL_QUOTED,t.sgmlDecl+=r):t.sgmlDecl+=r;continue;case T.SGML_DECL_QUOTED:r===t.q&&(t.state=T.SGML_DECL,t.q=""),t.sgmlDecl+=r;continue;case T.DOCTYPE:">"===r?(t.state=T.TEXT,D(t,"ondoctype",t.doctype),t.doctype=!0):(t.doctype+=r,"["===r?t.state=T.DOCTYPE_DTD:A(r)&&(t.state=T.DOCTYPE_QUOTED,t.q=r));continue;case T.DOCTYPE_QUOTED:t.doctype+=r,r===t.q&&(t.q="",t.state=T.DOCTYPE);continue;case T.DOCTYPE_DTD:t.doctype+=r,"]"===r?t.state=T.DOCTYPE:A(r)&&(t.state=T.DOCTYPE_DTD_QUOTED,t.q=r);continue;case T.DOCTYPE_DTD_QUOTED:t.doctype+=r,r===t.q&&(t.state=T.DOCTYPE_DTD,t.q="");continue;case T.COMMENT:"-"===r?t.state=T.COMMENT_ENDING:t.comment+=r;continue;case T.COMMENT_ENDING:"-"===r?(t.state=T.COMMENT_ENDED,t.comment=_(t.opt,t.comment),t.comment&&D(t,"oncomment",t.comment),t.comment=""):(t.comment+="-"+r,t.state=T.COMMENT);continue;case T.COMMENT_ENDED:">"!==r?(M(t,"Malformed comment"),t.comment+="--"+r,t.state=T.COMMENT):t.state=T.TEXT;continue;case T.CDATA:"]"===r?t.state=T.CDATA_ENDING:t.cdata+=r;continue;case T.CDATA_ENDING:"]"===r?t.state=T.CDATA_ENDING_2:(t.cdata+="]"+r,t.state=T.CDATA);continue;case T.CDATA_ENDING_2:">"===r?(t.cdata&&D(t,"oncdata",t.cdata),D(t,"onclosecdata"),t.cdata="",t.state=T.TEXT):"]"===r?t.cdata+="]":(t.cdata+="]]"+r,t.state=T.CDATA);continue;case T.PROC_INST:"?"===r?t.state=T.PROC_INST_ENDING:x(r)?t.state=T.PROC_INST_BODY:t.procInstName+=r;continue;case T.PROC_INST_BODY:if(!t.procInstBody&&x(r))continue;"?"===r?t.state=T.PROC_INST_ENDING:t.procInstBody+=r;continue;case T.PROC_INST_ENDING:">"===r?(D(t,"onprocessinginstruction",{name:t.procInstName,body:t.procInstBody}),t.procInstName=t.procInstBody="",t.state=T.TEXT):(t.procInstBody+="?"+r,t.state=T.PROC_INST_BODY);continue;case T.OPEN_TAG:C(y,r)?t.tagName+=r:(F(t),">"===r?W(t):"/"===r?t.state=T.OPEN_TAG_SLASH:(x(r)||M(t,"Invalid character in tag name"),t.state=T.ATTRIB));continue;case T.OPEN_TAG_SLASH:">"===r?(W(t,!0),z(t)):(M(t,"Forward-slash in opening tag not followed by >"),t.state=T.ATTRIB);continue;case T.ATTRIB:if(x(r))continue;">"===r?W(t):"/"===r?t.state=T.OPEN_TAG_SLASH:C(v,r)?(t.attribName=r,t.attribValue="",t.state=T.ATTRIB_NAME):M(t,"Invalid attribute name");continue;case T.ATTRIB_NAME:"="===r?t.state=T.ATTRIB_VALUE:">"===r?(M(t,"Attribute without value"),t.attribValue=t.attribName,U(t),W(t)):x(r)?t.state=T.ATTRIB_NAME_SAW_WHITE:C(y,r)?t.attribName+=r:M(t,"Invalid attribute name");continue;case T.ATTRIB_NAME_SAW_WHITE:if("="===r)t.state=T.ATTRIB_VALUE;else{if(x(r))continue;M(t,"Attribute without value"),t.tag.attributes[t.attribName]="",t.attribValue="",D(t,"onattribute",{name:t.attribName,value:""}),t.attribName="",">"===r?W(t):C(v,r)?(t.attribName=r,t.state=T.ATTRIB_NAME):(M(t,"Invalid attribute name"),t.state=T.ATTRIB)}continue;case T.ATTRIB_VALUE:if(x(r))continue;A(r)?(t.q=r,t.state=T.ATTRIB_VALUE_QUOTED):(M(t,"Unquoted attribute value"),t.state=T.ATTRIB_VALUE_UNQUOTED,t.attribValue=r);continue;case T.ATTRIB_VALUE_QUOTED:if(r!==t.q){"&"===r?t.state=T.ATTRIB_VALUE_ENTITY_Q:t.attribValue+=r;continue}U(t),t.q="",t.state=T.ATTRIB_VALUE_CLOSED;continue;case T.ATTRIB_VALUE_CLOSED:x(r)?t.state=T.ATTRIB:">"===r?W(t):"/"===r?t.state=T.OPEN_TAG_SLASH:C(v,r)?(M(t,"No whitespace between attributes"),t.attribName=r,t.attribValue="",t.state=T.ATTRIB_NAME):M(t,"Invalid attribute name");continue;case T.ATTRIB_VALUE_UNQUOTED:if(!E(r)){"&"===r?t.state=T.ATTRIB_VALUE_ENTITY_U:t.attribValue+=r;continue}U(t),">"===r?W(t):t.state=T.ATTRIB;continue;case T.CLOSE_TAG:if(t.tagName)">"===r?z(t):C(y,r)?t.tagName+=r:t.script?(t.script+="</"+t.tagName,t.tagName="",t.state=T.SCRIPT):(x(r)||M(t,"Invalid tagname in closing tag"),t.state=T.CLOSE_TAG_SAW_WHITE);else{if(x(r))continue;k(v,r)?t.script?(t.script+="</"+r,t.state=T.SCRIPT):M(t,"Invalid tagname in closing tag."):t.tagName=r}continue;case T.CLOSE_TAG_SAW_WHITE:if(x(r))continue;">"===r?z(t):M(t,"Invalid characters in closing tag");continue;case T.TEXT_ENTITY:case T.ATTRIB_VALUE_ENTITY_Q:case T.ATTRIB_VALUE_ENTITY_U:var s,u;switch(t.state){case T.TEXT_ENTITY:s=T.TEXT,u="textNode";break;case T.ATTRIB_VALUE_ENTITY_Q:s=T.ATTRIB_VALUE_QUOTED,u="attribValue";break;case T.ATTRIB_VALUE_ENTITY_U:s=T.ATTRIB_VALUE_UNQUOTED,u="attribValue"}";"===r?(t[u]+=q(t),t.entity="",t.state=s):C(t.entity.length?w:b,r)?t.entity+=r:(M(t,"Invalid character in entity name"),t[u]+="&"+t.entity+r,t.entity="",t.state=s);continue;default:throw new Error(t,"Unknown state: "+t.state)}return t.position>=t.bufferCheckPosition&&a(t),t}T=n.STATE,String.fromCodePoint||(I=String.fromCharCode,S=Math.floor,j=function(){var e,t,n=16384,r=[],o=-1,i=arguments.length;if(!i)return"";for(var a="";++o<i;){var s=Number(arguments[o]);if(!isFinite(s)||s<0||s>1114111||S(s)!==s)throw RangeError("Invalid code point: "+s);s<=65535?r.push(s):(e=55296+((s-=65536)>>10),t=s%1024+56320,r.push(e,t)),(o+1===i||r.length>n)&&(a+=I.apply(null,r),r.length=0)}return a},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:j,configurable:!0,writable:!0}):String.fromCodePoint=j)}(void 0===n?this.sax={}:n)}).call(this)}).call(this,e("buffer").Buffer)},{buffer:90,stream:398,string_decoder:413}],398:[function(e,t,n){t.exports=o;var r=e("events").EventEmitter;function o(){r.call(this)}e("inherits")(o,r),o.Readable=e("readable-stream/lib/_stream_readable.js"),o.Writable=e("readable-stream/lib/_stream_writable.js"),o.Duplex=e("readable-stream/lib/_stream_duplex.js"),o.Transform=e("readable-stream/lib/_stream_transform.js"),o.PassThrough=e("readable-stream/lib/_stream_passthrough.js"),o.finished=e("readable-stream/lib/internal/streams/end-of-stream.js"),o.pipeline=e("readable-stream/lib/internal/streams/pipeline.js"),o.Stream=o,o.prototype.pipe=function(e,t){var n=this;function o(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function i(){n.readable&&n.resume&&n.resume()}n.on("data",o),e.on("drain",i),e._isStdio||t&&!1===t.end||(n.on("end",s),n.on("close",u));var a=!1;function s(){a||(a=!0,e.end())}function u(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(l(),0===r.listenerCount(this,"error"))throw e}function l(){n.removeListener("data",o),e.removeListener("drain",i),n.removeListener("end",s),n.removeListener("close",u),n.removeListener("error",c),e.removeListener("error",c),n.removeListener("end",l),n.removeListener("close",l),e.removeListener("close",l)}return n.on("error",c),e.on("error",c),n.on("end",l),n.on("close",l),e.on("close",l),e.emit("pipe",n),e}},{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(e,t,n){"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var o={};function i(e,t,n){function i(e,n,r){return"string"==typeof t?t:t(e,n,r)}n||(n=Error);var a=function(e){function t(t,n,r){return e.call(this,i(t,n,r))||this}return r(t,e),t}(n);a.prototype.name=n.name,a.prototype.code=e,o[e]=a}function a(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}function s(e,t,n){return e.substr(!n||n<0?0:+n,t.length)===t}function u(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}function c(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}i("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,o;if("string"==typeof t&&s(t,"not ")?(r="must not be",t=t.replace(/^not /,"")):r="must be",u(e," argument"))o="The ".concat(e," ").concat(r," ").concat(a(t,"type"));else{var i=c(e,".")?"property":"argument";o='The "'.concat(e,'" ').concat(i," ").concat(r," ").concat(a(t,"type"))}return o+=". Received type ".concat(typeof n)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=o},{}],400:[function(e,t,n){(function(n){(function(){"use strict";var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};t.exports=c;var o=e("./_stream_readable"),i=e("./_stream_writable");e("inherits")(c,o);for(var a=r(i.prototype),s=0;s<a.length;s++){var u=a[s];c.prototype[u]||(c.prototype[u]=i.prototype[u])}function c(e){if(!(this instanceof c))return new c(e);o.call(this,e),i.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||n.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this)}).call(this,e("_process"))},{"./_stream_readable":402,"./_stream_writable":404,_process:467,inherits:364}],401:[function(e,t,n){"use strict";t.exports=o;var r=e("./_stream_transform");function o(e){if(!(this instanceof o))return new o(e);r.call(this,e)}e("inherits")(o,r),o.prototype._transform=function(e,t,n){n(null,e)}},{"./_stream_transform":403,inherits:364}],402:[function(e,n,r){(function(t,r){(function(){"use strict";var o;n.exports=j,j.ReadableState=S,e("events").EventEmitter;var i=function(e,t){return e.listeners(t).length},a=e("./internal/streams/stream"),s=e("buffer").Buffer,u=(void 0!==r?r:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};function c(e){return s.from(e)}function l(e){return s.isBuffer(e)||e instanceof u}var f,p=e("util");f=p&&p.debuglog?p.debuglog("stream"):function(){};var h,d,m,g=e("./internal/streams/buffer_list"),v=e("./internal/streams/destroy"),y=e("./internal/streams/state").getHighWaterMark,b=e("../errors").codes,w=b.ERR_INVALID_ARG_TYPE,x=b.ERR_STREAM_PUSH_AFTER_EOF,A=b.ERR_METHOD_NOT_IMPLEMENTED,E=b.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;e("inherits")(j,a);var C=v.errorOrDestroy,k=["error","close","destroy","pause","resume"];function I(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}function S(t,n,r){o=o||e("./_stream_duplex"),t=t||{},"boolean"!=typeof r&&(r=n instanceof o),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=y(this,t,"readableHighWaterMark",r),this.buffer=new g,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=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=e("string_decoder/").StringDecoder),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function j(t){if(o=o||e("./_stream_duplex"),!(this instanceof j))return new j(t);var n=this instanceof o;this._readableState=new S(t,this,n),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),a.call(this)}function T(e,t,n,r,o){f("readableAddChunk",t);var i,a=e._readableState;if(null===t)a.reading=!1,N(e,a);else if(o||(i=O(a,t)),i)C(e,i);else if(a.objectMode||t&&t.length>0)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=c(t)),r)a.endEmitted?C(e,new E):R(e,a,t,!0);else if(a.ended)C(e,new x);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?R(e,a,t,!1):F(e,a)):R(e,a,t,!1)}else r||(a.reading=!1,F(e,a));return!a.ended&&(a.length<a.highWaterMark||0===a.length)}function R(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&P(e)),F(e,t)}function O(e,t){var n;return l(t)||"string"==typeof t||void 0===t||e.objectMode||(n=new w("chunk",["string","Buffer","Uint8Array"],t)),n}Object.defineProperty(j.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),j.prototype.destroy=v.destroy,j.prototype._undestroy=v.undestroy,j.prototype._destroy=function(e,t){t(e)},j.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=s.from(e,t),t=""),n=!0),T(this,e,t,!1,n)},j.prototype.unshift=function(e){return T(this,e,null,!0,!1)},j.prototype.isPaused=function(){return!1===this._readableState.flowing},j.prototype.setEncoding=function(t){h||(h=e("string_decoder/").StringDecoder);var n=new h(t);this._readableState.decoder=n,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,o="";null!==r;)o+=n.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==o&&this._readableState.buffer.push(o),this._readableState.length=o.length,this};var D=1073741824;function B(e){return e>=D?e=D:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function _(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=B(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function N(e,t){if(f("onEofChunk"),!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?P(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,M(e)))}}function P(e){var n=e._readableState;f("emitReadable",n.needReadable,n.emittedReadable),n.needReadable=!1,n.emittedReadable||(f("emitReadable",n.flowing),n.emittedReadable=!0,t.nextTick(M,e))}function M(e){var t=e._readableState;f("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,V(e)}function F(e,n){n.readingMore||(n.readingMore=!0,t.nextTick(L,e,n))}function L(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(f("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function U(e){return function(){var t=e._readableState;f("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&i(e,"data")&&(t.flowing=!0,V(e))}}function W(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function z(e){f("readable nexttick read 0"),e.read(0)}function q(e,n){n.resumeScheduled||(n.resumeScheduled=!0,t.nextTick(Q,e,n))}function Q(e,t){f("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),V(e),t.flowing&&!t.reading&&e.read(0)}function V(e){var t=e._readableState;for(f("flow",t.flowing);t.flowing&&null!==e.read(););}function H(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function G(e){var n=e._readableState;f("endReadable",n.endEmitted),n.endEmitted||(n.ended=!0,t.nextTick(X,n,e))}function X(e,t){if(f("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function Z(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}j.prototype.read=function(e){f("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return f("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?G(this):P(this),null;if(0===(e=_(e,t))&&t.ended)return 0===t.length&&G(this),null;var r,o=t.needReadable;return f("need readable",o),(0===t.length||t.length-e<t.highWaterMark)&&f("length less than watermark",o=!0),t.ended||t.reading?f("reading or ended",o=!1):o&&(f("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=_(n,t))),null===(r=e>0?H(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&G(this)),null!==r&&this.emit("data",r),r},j.prototype._read=function(e){C(this,new A("_read()"))},j.prototype.pipe=function(e,n){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,f("pipe count=%d opts=%j",o.pipesCount,n);var a=n&&!1===n.end||e===t.stdout||e===t.stderr?v:u;function s(e,t){f("onunpipe"),e===r&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,p())}function u(){f("onend"),e.end()}o.endEmitted?t.nextTick(a):r.once("end",a),e.on("unpipe",s);var c=U(r);e.on("drain",c);var l=!1;function p(){f("cleanup"),e.removeListener("close",m),e.removeListener("finish",g),e.removeListener("drain",c),e.removeListener("error",d),e.removeListener("unpipe",s),r.removeListener("end",u),r.removeListener("end",v),r.removeListener("data",h),l=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||c()}function h(t){f("ondata");var n=e.write(t);f("dest.write",n),!1===n&&((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==Z(o.pipes,e))&&!l&&(f("false write response, pause",o.awaitDrain),o.awaitDrain++),r.pause())}function d(t){f("onerror",t),v(),e.removeListener("error",d),0===i(e,"error")&&C(e,t)}function m(){e.removeListener("finish",g),v()}function g(){f("onfinish"),e.removeListener("close",m),v()}function v(){f("unpipe"),r.unpipe(e)}return r.on("data",h),I(e,"error",d),e.once("close",m),e.once("finish",g),e.emit("pipe",r),o.flowing||(f("pipe resume"),r.resume()),e},j.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<o;i++)r[i].emit("unpipe",this,{hasUnpiped:!1});return this}var a=Z(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},j.prototype.on=function(e,n){var r=a.prototype.on.call(this,e,n),o=this._readableState;return"data"===e?(o.readableListening=this.listenerCount("readable")>0,!1!==o.flowing&&this.resume()):"readable"===e&&(o.endEmitted||o.readableListening||(o.readableListening=o.needReadable=!0,o.flowing=!1,o.emittedReadable=!1,f("on readable",o.length,o.reading),o.length?P(this):o.reading||t.nextTick(z,this))),r},j.prototype.addListener=j.prototype.on,j.prototype.removeListener=function(e,n){var r=a.prototype.removeListener.call(this,e,n);return"readable"===e&&t.nextTick(W,this),r},j.prototype.removeAllListeners=function(e){var n=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||t.nextTick(W,this),n},j.prototype.resume=function(){var e=this._readableState;return e.flowing||(f("resume"),e.flowing=!e.readableListening,q(this,e)),e.paused=!1,this},j.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},j.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var o in e.on("end",(function(){if(f("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(o){f("wrapped data"),n.decoder&&(o=n.decoder.write(o)),n.objectMode&&null==o||(n.objectMode||o&&o.length)&&(t.push(o)||(r=!0,e.pause()))})),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var i=0;i<k.length;i++)e.on(k[i],this.emit.bind(this,k[i]));return this._read=function(t){f("wrapped _read",t),r&&(r=!1,e.resume())},this},"function"==typeof Symbol&&(j.prototype[Symbol.asyncIterator]=function(){return void 0===d&&(d=e("./internal/streams/async_iterator")),d(this)}),Object.defineProperty(j.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(j.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(j.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),j._fromList=H,Object.defineProperty(j.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(j.from=function(t,n){return void 0===m&&(m=e("./internal/streams/from")),m(j,t,n)})}).call(this)}).call(this,e("_process"),void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?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(e,t,n){"use strict";t.exports=l;var r=e("../errors").codes,o=r.ERR_METHOD_NOT_IMPLEMENTED,i=r.ERR_MULTIPLE_CALLBACK,a=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,u=e("./_stream_duplex");function c(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new i);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function l(e){if(!(this instanceof l))return new l(e);u.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",f)}function f(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?p(this,null,null):this._flush((function(t,n){p(e,t,n)}))}function p(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new s;if(e._transformState.transforming)throw new a;return e.push(null)}e("inherits")(l,u),l.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},l.prototype._transform=function(e,t,n){n(new o("_transform()"))},l.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var o=this._readableState;(r.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},l.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},l.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,(function(e){t(e)}))}},{"../errors":399,"./_stream_duplex":400,inherits:364}],404:[function(e,n,r){(function(t,r){(function(){"use strict";function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){Q(t,e)}}var i;n.exports=S,S.WritableState=I;var a={deprecate:e("util-deprecate")},s=e("./internal/streams/stream"),u=e("buffer").Buffer,c=(void 0!==r?r:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};function l(e){return u.from(e)}function f(e){return u.isBuffer(e)||e instanceof c}var p,h=e("./internal/streams/destroy"),d=e("./internal/streams/state").getHighWaterMark,m=e("../errors").codes,g=m.ERR_INVALID_ARG_TYPE,v=m.ERR_METHOD_NOT_IMPLEMENTED,y=m.ERR_MULTIPLE_CALLBACK,b=m.ERR_STREAM_CANNOT_PIPE,w=m.ERR_STREAM_DESTROYED,x=m.ERR_STREAM_NULL_VALUES,A=m.ERR_STREAM_WRITE_AFTER_END,E=m.ERR_UNKNOWN_ENCODING,C=h.errorOrDestroy;function k(){}function I(t,n,r){i=i||e("./_stream_duplex"),t=t||{},"boolean"!=typeof r&&(r=n instanceof i),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=d(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){N(n,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function S(t){var n=this instanceof(i=i||e("./_stream_duplex"));if(!n&&!p.call(S,this))return new S(t);this._writableState=new I(t,this,n),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),s.call(this)}function j(e,n){var r=new A;C(e,r),t.nextTick(n,r)}function T(e,n,r,o){var i;return null===r?i=new x:"string"==typeof r||n.objectMode||(i=new g("chunk",["string","Buffer"],r)),!i||(C(e,i),t.nextTick(o,i),!1)}function R(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=u.from(t,n)),t}function O(e,t,n,r,o,i){if(!n){var a=R(t,r,o);r!==a&&(n=!0,o="buffer",r=a)}var s=t.objectMode?1:r.length;t.length+=s;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:o,isBuf:n,callback:i,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else D(e,t,!1,s,r,o,i);return u}function D(e,t,n,r,o,i,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new w("write")):n?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function B(e,n,r,o,i){--n.pendingcb,r?(t.nextTick(i,o),t.nextTick(z,e,n),e._writableState.errorEmitted=!0,C(e,o)):(i(o),e._writableState.errorEmitted=!0,C(e,o),z(e,n))}function _(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function N(e,n){var r=e._writableState,o=r.sync,i=r.writecb;if("function"!=typeof i)throw new y;if(_(r),n)B(e,r,o,n,i);else{var a=L(r)||e.destroyed;a||r.corked||r.bufferProcessing||!r.bufferedRequest||F(e,r),o?t.nextTick(P,e,r,a,i):P(e,r,a,i)}}function P(e,t,n,r){n||M(e,t),t.pendingcb--,r(),z(e,t)}function M(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function F(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),a=t.corkedRequestsFree;a.entry=n;for(var s=0,u=!0;n;)i[s]=n,n.isBuf||(u=!1),n=n.next,s+=1;i.allBuffers=u,D(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,l=n.encoding,f=n.callback;if(D(e,t,!1,t.objectMode?1:c.length,c,l,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function L(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function U(e,t){e._final((function(n){t.pendingcb--,n&&C(e,n),t.prefinished=!0,e.emit("prefinish"),z(e,t)}))}function W(e,n){n.prefinished||n.finalCalled||("function"!=typeof e._final||n.destroyed?(n.prefinished=!0,e.emit("prefinish")):(n.pendingcb++,n.finalCalled=!0,t.nextTick(U,e,n)))}function z(e,t){var n=L(t);if(n&&(W(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var r=e._readableState;(!r||r.autoDestroy&&r.endEmitted)&&e.destroy()}return n}function q(e,n,r){n.ending=!0,z(e,n),r&&(n.finished?t.nextTick(r):e.once("finish",r)),n.ended=!0,e.writable=!1}function Q(e,t,n){var r=e.entry;for(e.entry=null;r;){var o=r.callback;t.pendingcb--,o(n),r=r.next}t.corkedRequestsFree.next=e}e("inherits")(S,s),I.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(I.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(S,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===S&&e&&e._writableState instanceof I}})):p=function(e){return e instanceof this},S.prototype.pipe=function(){C(this,new b)},S.prototype.write=function(e,t,n){var r=this._writableState,o=!1,i=!r.objectMode&&f(e);return i&&!u.isBuffer(e)&&(e=l(e)),"function"==typeof t&&(n=t,t=null),i?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=k),r.ending?j(this,n):(i||T(this,r,e,n))&&(r.pendingcb++,o=O(this,r,i,e,t,n)),o},S.prototype.cork=function(){this._writableState.corked++},S.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||F(this,e))},S.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new E(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(S.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(e,t,n){n(new v("_write()"))},S.prototype._writev=null,S.prototype.end=function(e,t,n){var r=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||q(this,r,n),this},Object.defineProperty(S.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),S.prototype.destroy=h.destroy,S.prototype._undestroy=h.undestroy,S.prototype._destroy=function(e,t){t(e)}}).call(this)}).call(this,e("_process"),void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?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(e,t,n){(function(n){(function(){"use strict";var r;function o(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){var t=a(e,"string");return"symbol"==typeof t?t:String(t)}function a(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var s=e("./end-of-stream"),u=Symbol("lastResolve"),c=Symbol("lastReject"),l=Symbol("error"),f=Symbol("ended"),p=Symbol("lastPromise"),h=Symbol("handlePromise"),d=Symbol("stream");function m(e,t){return{value:e,done:t}}function g(e){var t=e[u];if(null!==t){var n=e[d].read();null!==n&&(e[p]=null,e[u]=null,e[c]=null,t(m(n,!1)))}}function v(e){n.nextTick(g,e)}function y(e,t){return function(n,r){e.then((function(){t[f]?n(m(void 0,!0)):t[h](n,r)}),r)}}var b=Object.getPrototypeOf((function(){})),w=Object.setPrototypeOf((o(r={get stream(){return this[d]},next:function(){var e=this,t=this[l];if(null!==t)return Promise.reject(t);if(this[f])return Promise.resolve(m(void 0,!0));if(this[d].destroyed)return new Promise((function(t,r){n.nextTick((function(){e[l]?r(e[l]):t(m(void 0,!0))}))}));var r,o=this[p];if(o)r=new Promise(y(o,this));else{var i=this[d].read();if(null!==i)return Promise.resolve(m(i,!1));r=new Promise(this[h])}return this[p]=r,r}},Symbol.asyncIterator,(function(){return this})),o(r,"return",(function(){var e=this;return new Promise((function(t,n){e[d].destroy(null,(function(e){e?n(e):t(m(void 0,!0))}))}))})),r),b),x=function(e){var t,n=Object.create(w,(o(t={},d,{value:e,writable:!0}),o(t,u,{value:null,writable:!0}),o(t,c,{value:null,writable:!0}),o(t,l,{value:null,writable:!0}),o(t,f,{value:e._readableState.endEmitted,writable:!0}),o(t,h,{value:function(e,t){var r=n[d].read();r?(n[p]=null,n[u]=null,n[c]=null,e(m(r,!1))):(n[u]=e,n[c]=t)},writable:!0}),t));return n[p]=null,s(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[c];return null!==t&&(n[p]=null,n[u]=null,n[c]=null,t(e)),void(n[l]=e)}var r=n[u];null!==r&&(n[p]=null,n[u]=null,n[c]=null,r(m(void 0,!0))),n[f]=!0})),e.on("readable",v.bind(null,n)),n};t.exports=x}).call(this)}).call(this,e("_process"))},{"./end-of-stream":408,_process:467}],406:[function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return(t=c(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,c(r.key),r)}}function u(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e){var t=l(e,"string");return"symbol"==typeof t?t:String(t)}function l(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var f=e("buffer").Buffer,p=e("util").inspect,h=p&&p.custom||"inspect";function d(e,t,n){f.prototype.copy.call(e,t,n)}t.exports=function(){function e(){a(this,e),this.head=null,this.tail=null,this.length=0}return u(e,[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return f.alloc(0);for(var t=f.allocUnsafe(e>>>0),n=this.head,r=0;n;)d(n.data,t,r),r+=n.data.length,n=n.next;return t}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,r=t.data;for(e-=r.length;t=t.next;){var o=t.data,i=e>o.length?o.length:e;if(i===o.length?r+=o:r+=o.slice(0,e),0==(e-=i)){i===o.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=o.slice(i));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=f.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var o=n.data,i=e>o.length?o.length:e;if(o.copy(t,t.length-e,0,i),0==(e-=i)){i===o.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(i));break}++r}return this.length-=r,t}},{key:h,value:function(e,t){return p(this,o(o({},t),{},{depth:0,customInspect:!1}))}}]),e}()},{buffer:90,util:89}],407:[function(e,t,n){(function(e){(function(){"use strict";function n(t,n){var i=this,s=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return s||u?(n?n(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(a,this,t)):e.nextTick(a,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!n&&t?i._writableState?i._writableState.errorEmitted?e.nextTick(o,i):(i._writableState.errorEmitted=!0,e.nextTick(r,i,t)):e.nextTick(r,i,t):n?(e.nextTick(o,i),n(t)):e.nextTick(o,i)})),this)}function r(e,t){a(e,t),o(e)}function o(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function i(){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 a(e,t){e.emit("error",t)}function s(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}t.exports={destroy:n,undestroy:i,errorOrDestroy:s}}).call(this)}).call(this,e("_process"))},{_process:467}],408:[function(e,t,n){"use strict";var r=e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function o(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];e.apply(this,r)}}}function i(){}function a(e){return e.setHeader&&"function"==typeof e.abort}function s(e,t,n){if("function"==typeof t)return s(e,null,t);t||(t={}),n=o(n||i);var u=t.readable||!1!==t.readable&&e.readable,c=t.writable||!1!==t.writable&&e.writable,l=function(){e.writable||p()},f=e._writableState&&e._writableState.finished,p=function(){c=!1,f=!0,u||n.call(e)},h=e._readableState&&e._readableState.endEmitted,d=function(){u=!1,h=!0,c||n.call(e)},m=function(t){n.call(e,t)},g=function(){var t;return u&&!h?(e._readableState&&e._readableState.ended||(t=new r),n.call(e,t)):c&&!f?(e._writableState&&e._writableState.ended||(t=new r),n.call(e,t)):void 0},v=function(){e.req.on("finish",p)};return a(e)?(e.on("complete",p),e.on("abort",g),e.req?v():e.on("request",v)):c&&!e._writableState&&(e.on("end",l),e.on("close",l)),e.on("end",d),e.on("finish",p),!1!==t.error&&e.on("error",m),e.on("close",g),function(){e.removeListener("complete",p),e.removeListener("abort",g),e.removeListener("request",v),e.req&&e.req.removeListener("finish",p),e.removeListener("end",l),e.removeListener("close",l),e.removeListener("finish",p),e.removeListener("end",d),e.removeListener("error",m),e.removeListener("close",g)}}t.exports=s},{"../../../errors":399}],409:[function(e,t,n){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],410:[function(e,t,n){"use strict";var r;function o(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var i=e("../../../errors").codes,a=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function u(e){if(e)throw e}function c(e){return e.setHeader&&"function"==typeof e.abort}function l(t,n,i,a){a=o(a);var u=!1;t.on("close",(function(){u=!0})),void 0===r&&(r=e("./end-of-stream")),r(t,{readable:n,writable:i},(function(e){if(e)return a(e);u=!0,a()}));var l=!1;return function(e){if(!u&&!l)return l=!0,c(t)?t.abort():"function"==typeof t.destroy?t.destroy():void a(e||new s("pipe"))}}function f(e){e()}function p(e,t){return e.pipe(t)}function h(e){return e.length?"function"!=typeof e[e.length-1]?u:e.pop():u}function d(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o=h(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new a("streams");var i=t.map((function(e,n){var a=n<t.length-1;return l(e,a,n>0,(function(e){r||(r=e),e&&i.forEach(f),a||(i.forEach(f),o(r))}))}));return t.reduce(p)}t.exports=d},{"../../../errors":399,"./end-of-stream":408}],411:[function(e,t,n){"use strict";var r=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;function o(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}function i(e,t,n,i){var a=o(t,i,n);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new r(i?n:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}t.exports={getHighWaterMark:i}},{"../../../errors":399}],412:[function(e,t,n){arguments[4][393][0].apply(n,arguments)},{dup:393,events:344}],413:[function(e,t,n){"use strict";var r=e("safe-buffer").Buffer,o=r.isEncoding||function(e){switch((e=""+e)&&e.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 i(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function a(e){var t=i(e);if("string"!=typeof t&&(r.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}function s(e){var t;switch(this.encoding=a(e),this.encoding){case"utf16le":this.text=d,this.end=m,t=4;break;case"utf8":this.fillLast=f,t=4;break;case"base64":this.text=g,this.end=v,t=3;break;default:return this.write=y,void(this.end=b)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function u(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function c(e,t,n){var r=t.length-1;if(r<n)return 0;var o=u(t[r]);return o>=0?(o>0&&(e.lastNeed=o-1),o):--r<n||-2===o?0:(o=u(t[r]))>=0?(o>0&&(e.lastNeed=o-2),o):--r<n||-2===o?0:(o=u(t[r]))>=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):0}function l(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"<22>";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"<22>";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"<22>"}}function f(e){var t=this.lastTotal-this.lastNeed,n=l(this,e,t);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function p(e,t){var n=c(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"<22>":t}function d(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function m(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function g(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function v(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function y(e){return e.toString(this.encoding)}function b(e){return e&&e.length?this.write(e):""}n.StringDecoder=s,s.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},s.prototype.end=h,s.prototype.text=p,s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":396}],414:[function(e,t,n){(function(t,r){(function(){var o=e("process/browser.js").nextTick,i=Function.prototype.apply,a=Array.prototype.slice,s={},u=0;function c(e,t){this._id=e,this._clearFn=t}n.setTimeout=function(){return new c(i.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new c(i.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(e){e.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},n.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},n._unrefActive=n.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n.setImmediate="function"==typeof t?t:function(e){var t=u++,r=!(arguments.length<2)&&a.call(arguments,1);return s[t]=!0,o((function(){s[t]&&(r?e.apply(null,r):e.call(null),n.clearImmediate(t))})),t},n.clearImmediate="function"==typeof r?r:function(e){delete s[e]}}).call(this)}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":381,timers:414}],415:[function(e,t,n){var r=e("buffer").Buffer;t.exports=function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(r.isBuffer(e)){for(var t=new Uint8Array(e.length),n=e.length,o=0;o<n;o++)t[o]=e[o];return t.buffer}throw new Error("Argument must be a Buffer")}},{buffer:90}],416:[function(e,n,r){(function(e){(function(){function t(e,t){if(r("noDeprecation"))return e;var n=!1;function o(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}return o}function r(t){try{if(!e.localStorage)return!1}catch(e){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}n.exports=t}).call(this)}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],417:[function(e,t,n){arguments[4][84][0].apply(n,arguments)},{dup:84}],418:[function(e,t,n){"use strict";var r=e("is-arguments"),o=e("is-generator-function"),i=e("which-typed-array"),a=e("is-typed-array");function s(e){return e.call.bind(e)}var u="undefined"!=typeof BigInt,c="undefined"!=typeof Symbol,l=s(Object.prototype.toString),f=s(Number.prototype.valueOf),p=s(String.prototype.valueOf),h=s(Boolean.prototype.valueOf);if(u)var d=s(BigInt.prototype.valueOf);if(c)var m=s(Symbol.prototype.valueOf);function g(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function v(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch}function y(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):a(e)||W(e)}function b(e){return"Uint8Array"===i(e)}function w(e){return"Uint8ClampedArray"===i(e)}function x(e){return"Uint16Array"===i(e)}function A(e){return"Uint32Array"===i(e)}function E(e){return"Int8Array"===i(e)}function C(e){return"Int16Array"===i(e)}function k(e){return"Int32Array"===i(e)}function I(e){return"Float32Array"===i(e)}function S(e){return"Float64Array"===i(e)}function j(e){return"BigInt64Array"===i(e)}function T(e){return"BigUint64Array"===i(e)}function R(e){return"[object Map]"===l(e)}function O(e){return"undefined"!=typeof Map&&(R.working?R(e):e instanceof Map)}function D(e){return"[object Set]"===l(e)}function B(e){return"undefined"!=typeof Set&&(D.working?D(e):e instanceof Set)}function _(e){return"[object WeakMap]"===l(e)}function N(e){return"undefined"!=typeof WeakMap&&(_.working?_(e):e instanceof WeakMap)}function P(e){return"[object WeakSet]"===l(e)}function M(e){return P(e)}function F(e){return"[object ArrayBuffer]"===l(e)}function L(e){return"undefined"!=typeof ArrayBuffer&&(F.working?F(e):e instanceof ArrayBuffer)}function U(e){return"[object DataView]"===l(e)}function W(e){return"undefined"!=typeof DataView&&(U.working?U(e):e instanceof DataView)}n.isArgumentsObject=r,n.isGeneratorFunction=o,n.isTypedArray=a,n.isPromise=v,n.isArrayBufferView=y,n.isUint8Array=b,n.isUint8ClampedArray=w,n.isUint16Array=x,n.isUint32Array=A,n.isInt8Array=E,n.isInt16Array=C,n.isInt32Array=k,n.isFloat32Array=I,n.isFloat64Array=S,n.isBigInt64Array=j,n.isBigUint64Array=T,R.working="undefined"!=typeof Map&&R(new Map),n.isMap=O,D.working="undefined"!=typeof Set&&D(new Set),n.isSet=B,_.working="undefined"!=typeof WeakMap&&_(new WeakMap),n.isWeakMap=N,P.working="undefined"!=typeof WeakSet&&P(new WeakSet),n.isWeakSet=M,F.working="undefined"!=typeof ArrayBuffer&&F(new ArrayBuffer),n.isArrayBuffer=L,U.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&U(new DataView(new ArrayBuffer(1),0,1)),n.isDataView=W;var z="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function q(e){return"[object SharedArrayBuffer]"===l(e)}function Q(e){return void 0!==z&&(void 0===q.working&&(q.working=q(new z)),q.working?q(e):e instanceof z)}function V(e){return"[object AsyncFunction]"===l(e)}function H(e){return"[object Map Iterator]"===l(e)}function G(e){return"[object Set Iterator]"===l(e)}function X(e){return"[object Generator]"===l(e)}function Z(e){return"[object WebAssembly.Module]"===l(e)}function K(e){return g(e,f)}function J(e){return g(e,p)}function Y(e){return g(e,h)}function $(e){return u&&g(e,d)}function ee(e){return c&&g(e,m)}function te(e){return K(e)||J(e)||Y(e)||$(e)||ee(e)}function ne(e){return"undefined"!=typeof Uint8Array&&(L(e)||Q(e))}n.isSharedArrayBuffer=Q,n.isAsyncFunction=V,n.isMapIterator=H,n.isSetIterator=G,n.isGeneratorObject=X,n.isWebAssemblyCompiledModule=Z,n.isNumberObject=K,n.isStringObject=J,n.isBooleanObject=Y,n.isBigIntObject=$,n.isSymbolObject=ee,n.isBoxedPrimitive=te,n.isAnyArrayBuffer=ne,["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(n,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})}))},{"is-arguments":365,"is-generator-function":368,"is-typed-array":369,"which-typed-array":420}],419:[function(e,t,n){(function(t){(function(){var r=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++)n[t[r]]=Object.getOwnPropertyDescriptor(e,t[r]);return n},o=/%[sdj%]/g;n.format=function(e){if(!E(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(u(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,i=r.length,a=String(e).replace(o,(function(e){if("%%"===e)return"%";if(n>=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),s=r[n];n<i;s=r[++n])w(s)||!S(s)?a+=" "+s:a+=" "+u(s);return a},n.deprecate=function(e,r){if(void 0!==t&&!0===t.noDeprecation)return e;if(void 0===t)return function(){return n.deprecate(e,r).apply(this,arguments)};var o=!1;function i(){if(!o){if(t.throwDeprecation)throw new Error(r);t.traceDeprecation?console.trace(r):console.error(r),o=!0}return e.apply(this,arguments)}return i};var i={},a=/^$/;if(t.env.NODE_DEBUG){var s=t.env.NODE_DEBUG;s=s.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),a=new RegExp("^"+s+"$","i")}function u(e,t){var r={seen:[],stylize:l};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),b(t)?r.showHidden=t:t&&n._extend(r,t),k(r.showHidden)&&(r.showHidden=!1),k(r.depth)&&(r.depth=2),k(r.colors)&&(r.colors=!1),k(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=c),p(r,e,r.depth)}function c(e,t){var n=u.styles[t];return n?"["+u.colors[n][0]+"m"+e+"["+u.colors[n][1]+"m":e}function l(e,t){return e}function f(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}function p(e,t,r){if(e.customInspect&&t&&R(t.inspect)&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var o=t.inspect(r,e);return E(o)||(o=p(e,o,r)),o}var i=h(e,t);if(i)return i;var a=Object.keys(t),s=f(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),T(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return d(t);if(0===a.length){if(R(t)){var u=t.name?": "+t.name:"";return e.stylize("[Function"+u+"]","special")}if(I(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(j(t))return e.stylize(Date.prototype.toString.call(t),"date");if(T(t))return d(t)}var c,l="",b=!1,w=["{","}"];return y(t)&&(b=!0,w=["[","]"]),R(t)&&(l=" [Function"+(t.name?": "+t.name:"")+"]"),I(t)&&(l=" "+RegExp.prototype.toString.call(t)),j(t)&&(l=" "+Date.prototype.toUTCString.call(t)),T(t)&&(l=" "+d(t)),0!==a.length||b&&0!=t.length?r<0?I(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),c=b?m(e,t,r,s,a):a.map((function(n){return g(e,t,r,s,n,b)})),e.seen.pop(),v(c,l,w)):w[0]+l+w[1]}function h(e,t){if(k(t))return e.stylize("undefined","undefined");if(E(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return A(t)?e.stylize(""+t,"number"):b(t)?e.stylize(""+t,"boolean"):w(t)?e.stylize("null","null"):void 0}function d(e){return"["+Error.prototype.toString.call(e)+"]"}function m(e,t,n,r,o){for(var i=[],a=0,s=t.length;a<s;++a)P(t,String(a))?i.push(g(e,t,n,r,String(a),!0)):i.push("");return o.forEach((function(o){o.match(/^\d+$/)||i.push(g(e,t,n,r,o,!0))})),i}function g(e,t,n,r,o,i){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),P(r,o)||(a="["+o+"]"),s||(e.seen.indexOf(u.value)<0?(s=w(n)?p(e,u.value,null):p(e,u.value,n-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map((function(e){return" "+e})).join("\n").slice(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),k(a)){if(i&&o.match(/^\d+$/))return s;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function v(e,t,n){return e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function y(e){return Array.isArray(e)}function b(e){return"boolean"==typeof e}function w(e){return null===e}function x(e){return null==e}function A(e){return"number"==typeof e}function E(e){return"string"==typeof e}function C(e){return"symbol"==typeof e}function k(e){return void 0===e}function I(e){return S(e)&&"[object RegExp]"===D(e)}function S(e){return"object"==typeof e&&null!==e}function j(e){return S(e)&&"[object Date]"===D(e)}function T(e){return S(e)&&("[object Error]"===D(e)||e instanceof Error)}function R(e){return"function"==typeof e}function O(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function D(e){return Object.prototype.toString.call(e)}function B(e){return e<10?"0"+e.toString(10):e.toString(10)}n.debuglog=function(e){if(e=e.toUpperCase(),!i[e])if(a.test(e)){var r=t.pid;i[e]=function(){var t=n.format.apply(n,arguments);console.error("%s %d: %s",e,r,t)}}else i[e]=function(){};return i[e]},n.inspect=u,u.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]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},n.types=e("./support/types"),n.isArray=y,n.isBoolean=b,n.isNull=w,n.isNullOrUndefined=x,n.isNumber=A,n.isString=E,n.isSymbol=C,n.isUndefined=k,n.isRegExp=I,n.types.isRegExp=I,n.isObject=S,n.isDate=j,n.types.isDate=j,n.isError=T,n.types.isNativeError=T,n.isFunction=R,n.isPrimitive=O,n.isBuffer=e("./support/isBuffer");var _=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function N(){var e=new Date,t=[B(e.getHours()),B(e.getMinutes()),B(e.getSeconds())].join(":");return[e.getDate(),_[e.getMonth()],t].join(" ")}function P(e,t){return Object.prototype.hasOwnProperty.call(e,t)}n.log=function(){console.log("%s - %s",N(),n.format.apply(n,arguments))},n.inherits=e("inherits"),n._extend=function(e,t){if(!t||!S(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var M="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function F(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}function L(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function n(){for(var n=[],r=0;r<arguments.length;r++)n.push(arguments[r]);var o=n.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var i=this,a=function(){return o.apply(i,arguments)};e.apply(this,n).then((function(e){t.nextTick(a.bind(null,null,e))}),(function(e){t.nextTick(F.bind(null,e,a))}))}return Object.setPrototypeOf(n,Object.getPrototypeOf(e)),Object.defineProperties(n,r(e)),n}n.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(M&&e[M]){var t;if("function"!=typeof(t=e[M]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,M,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise((function(e,r){t=e,n=r})),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push((function(e,r){e?n(e):t(r)}));try{e.apply(this,o)}catch(e){n(e)}return r}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),M&&Object.defineProperty(t,M,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,r(e))},n.promisify.custom=M,n.callbackify=L}).call(this)}).call(this,e("_process"))},{"./support/isBuffer":417,"./support/types":418,_process:467,inherits:364}],420:[function(e,n,r){(function(t){(function(){"use strict";var r=e("for-each"),o=e("available-typed-arrays"),i=e("call-bind"),a=e("call-bind/callBound"),s=e("gopd"),u=a("Object.prototype.toString"),c=e("has-tostringtag/shams")(),l="undefined"==typeof globalThis?t:globalThis,f=o(),p=a("String.prototype.slice"),h=Object.getPrototypeOf,d=a("Array.prototype.indexOf",!0)||function(e,t){for(var n=0;n<e.length;n+=1)if(e[n]===t)return n;return-1},m={__proto__:null};r(f,c&&s&&h?function(e){var t=new l[e];if(Symbol.toStringTag in t){var n=h(t),r=s(n,Symbol.toStringTag);if(!r){var o=h(n);r=s(o,Symbol.toStringTag)}m["$"+e]=i(r.get)}}:function(e){var t=new l[e];m["$"+e]=i(t.slice)});var g=function(e){var t=!1;return r(m,(function(n,r){if(!t)try{"$"+n(e)===r&&(t=p(r,1))}catch(e){}})),t},v=function(e){var t=!1;return r(m,(function(n,r){if(!t)try{n(e),t=p(r,1)}catch(e){}})),t};n.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!c){var t=p(u(e),8,-1);return d(f,t)>-1?t:"Object"===t&&v(e)}return s?g(e):null}}).call(this)}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"available-typed-arrays":86,"call-bind":93,"call-bind/callBound":92,"for-each":345,gopd:349,"has-tostringtag/shams":353}],421:[function(e,t,n){(function(){"use strict";n.stripBOM=function(e){return"\ufeff"===e[0]?e.substring(1):e}}).call(this)},{}],422:[function(e,t,n){(function(){"use strict";var t,r,o,i,a,s={}.hasOwnProperty;t=e("xmlbuilder"),r=e("./defaults").defaults,i=function(e){return"string"==typeof e&&(e.indexOf("&")>=0||e.indexOf(">")>=0||e.indexOf("<")>=0)},a=function(e){return"<![CDATA["+o(e)+"]]>"},o=function(e){return e.replace("]]>","]]]]><![CDATA[>")},n.Builder=function(){function e(e){var t,n,o;for(t in this.options={},n=r[.2])s.call(n,t)&&(o=n[t],this.options[t]=o);for(t in e)s.call(e,t)&&(o=e[t],this.options[t]=o)}return e.prototype.buildObject=function(e){var n,o,u,c,l,f;return n=this.options.attrkey,o=this.options.charkey,1===Object.keys(e).length&&this.options.rootName===r[.2].rootName?e=e[l=Object.keys(e)[0]]:l=this.options.rootName,f=this,u=function(e,t){var r,c,l,p,h,d;if("object"!=typeof t)f.options.cdata&&i(t)?e.raw(a(t)):e.txt(t);else if(Array.isArray(t)){for(p in t)if(s.call(t,p))for(h in c=t[p])l=c[h],e=u(e.ele(h),l).up()}else for(h in t)if(s.call(t,h))if(c=t[h],h===n){if("object"==typeof c)for(r in c)d=c[r],e=e.att(r,d)}else if(h===o)e=f.options.cdata&&i(c)?e.raw(a(c)):e.txt(c);else if(Array.isArray(c))for(p in c)s.call(c,p)&&(e="string"==typeof(l=c[p])?f.options.cdata&&i(l)?e.ele(h).raw(a(l)).up():e.ele(h,l).up():u(e.ele(h),l).up());else"object"==typeof c?e=u(e.ele(h),c).up():"string"==typeof c&&f.options.cdata&&i(c)?e=e.ele(h).raw(a(c)).up():(null==c&&(c=""),e=e.ele(h,c.toString()).up());return e},c=t.create(l,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),u(c,e).end(this.options.renderOpts)},e}()}).call(this)},{"./defaults":423,xmlbuilder:459}],423:[function(e,t,n){(function(){n.defaults={.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:""},.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:"\n"},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(this)},{}],424:[function(e,t,n){(function(){"use strict";var t,r,o,i,a,s,u,c,l,f=function(e,t){return function(){return e.apply(t,arguments)}},p=function(e,t){for(var n in t)h.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},h={}.hasOwnProperty;c=e("sax"),i=e("events"),t=e("./bom"),u=e("./processors"),l=e("timers").setImmediate,r=e("./defaults").defaults,a=function(e){return"object"==typeof e&&null!=e&&0===Object.keys(e).length},s=function(e,t,n){var r,o;for(r=0,o=e.length;r<o;r++)t=(0,e[r])(t,n);return t},o=function(e,t,n){var r;return(r=Object.create(null)).value=n,r.writable=!0,r.enumerable=!0,r.configurable=!0,Object.defineProperty(e,t,r)},n.Parser=function(e){function i(e){var t,o,i;if(this.parseStringPromise=f(this.parseStringPromise,this),this.parseString=f(this.parseString,this),this.reset=f(this.reset,this),this.assignOrPush=f(this.assignOrPush,this),this.processAsync=f(this.processAsync,this),!(this instanceof n.Parser))return new n.Parser(e);for(t in this.options={},o=r[.2])h.call(o,t)&&(i=o[t],this.options[t]=i);for(t in e)h.call(e,t)&&(i=e[t],this.options[t]=i);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(u.normalize)),this.reset()}return p(i,e),i.prototype.processAsync=function(){var e,t;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),l(this.processAsync))}catch(e){if(t=e,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(t)}},i.prototype.assignOrPush=function(e,t,n){return t in e?(e[t]instanceof Array||o(e,t,[e[t]]),e[t].push(n)):this.options.explicitArray?o(e,t,[n]):o(e,t,n)},i.prototype.reset=function(){var e,t,n,r,i;return this.removeAllListeners(),this.saxParser=c.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=(i=this,function(e){if(i.saxParser.resume(),!i.saxParser.errThrown)return i.saxParser.errThrown=!0,i.emit("error",e)}),this.saxParser.onend=function(e){return function(){if(!e.saxParser.ended)return e.saxParser.ended=!0,e.emit("end",e.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,r=[],e=this.options.attrkey,t=this.options.charkey,this.saxParser.onopentag=function(n){return function(i){var a,u,c,l,f;if((c={})[t]="",!n.options.ignoreAttrs)for(a in f=i.attributes)h.call(f,a)&&(e in c||n.options.mergeAttrs||(c[e]={}),u=n.options.attrValueProcessors?s(n.options.attrValueProcessors,i.attributes[a],a):i.attributes[a],l=n.options.attrNameProcessors?s(n.options.attrNameProcessors,a):a,n.options.mergeAttrs?n.assignOrPush(c,l,u):o(c[e],l,u));return c["#name"]=n.options.tagNameProcessors?s(n.options.tagNameProcessors,i.name):i.name,n.options.xmlns&&(c[n.options.xmlnskey]={uri:i.uri,local:i.local}),r.push(c)}}(this),this.saxParser.onclosetag=function(e){return function(){var n,i,u,c,l,f,p,d,m,g;if(f=r.pop(),l=f["#name"],e.options.explicitChildren&&e.options.preserveChildrenOrder||delete f["#name"],!0===f.cdata&&(n=f.cdata,delete f.cdata),m=r[r.length-1],f[t].match(/^\s*$/)&&!n?(i=f[t],delete f[t]):(e.options.trim&&(f[t]=f[t].trim()),e.options.normalize&&(f[t]=f[t].replace(/\s{2,}/g," ").trim()),f[t]=e.options.valueProcessors?s(e.options.valueProcessors,f[t],l):f[t],1===Object.keys(f).length&&t in f&&!e.EXPLICIT_CHARKEY&&(f=f[t])),a(f)&&(f="function"==typeof e.options.emptyTag?e.options.emptyTag():""!==e.options.emptyTag?e.options.emptyTag:i),null!=e.options.validator&&(g="/"+function(){var e,t,n;for(n=[],e=0,t=r.length;e<t;e++)c=r[e],n.push(c["#name"]);return n}().concat(l).join("/"),function(){var t;try{f=e.options.validator(g,m&&m[l],f)}catch(n){return t=n,e.emit("error",t)}}()),e.options.explicitChildren&&!e.options.mergeAttrs&&"object"==typeof f)if(e.options.preserveChildrenOrder){if(m){for(u in m[e.options.childkey]=m[e.options.childkey]||[],p={},f)h.call(f,u)&&o(p,u,f[u]);m[e.options.childkey].push(p),delete f["#name"],1===Object.keys(f).length&&t in f&&!e.EXPLICIT_CHARKEY&&(f=f[t])}}else c={},e.options.attrkey in f&&(c[e.options.attrkey]=f[e.options.attrkey],delete f[e.options.attrkey]),!e.options.charsAsChildren&&e.options.charkey in f&&(c[e.options.charkey]=f[e.options.charkey],delete f[e.options.charkey]),Object.getOwnPropertyNames(f).length>0&&(c[e.options.childkey]=f),f=c;return r.length>0?e.assignOrPush(m,l,f):(e.options.explicitRoot&&(d=f,o(f={},l,d)),e.resultObject=f,e.saxParser.ended=!0,e.emit("end",e.resultObject))}}(this),n=function(e){return function(n){var o,i;if(i=r[r.length-1])return i[t]+=n,e.options.explicitChildren&&e.options.preserveChildrenOrder&&e.options.charsAsChildren&&(e.options.includeWhiteChars||""!==n.replace(/\\n/g,"").trim())&&(i[e.options.childkey]=i[e.options.childkey]||[],(o={"#name":"__text__"})[t]=n,e.options.normalize&&(o[t]=o[t].replace(/\s{2,}/g," ").trim()),i[e.options.childkey].push(o)),i}}(this),this.saxParser.ontext=n,this.saxParser.oncdata=function(e){var t;if(t=n(e))return t.cdata=!0}},i.prototype.parseString=function(e,n){var r;null!=n&&"function"==typeof n&&(this.on("end",(function(e){return this.reset(),n(null,e)})),this.on("error",(function(e){return this.reset(),n(e)})));try{return""===(e=e.toString()).trim()?(this.emit("end",null),!0):(e=t.stripBOM(e),this.options.async?(this.remaining=e,l(this.processAsync),this.saxParser):this.saxParser.write(e).close())}catch(e){if(r=e,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",r),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw r}},i.prototype.parseStringPromise=function(e){return new Promise((t=this,function(n,r){return t.parseString(e,(function(e,t){return e?r(e):n(t)}))}));var t},i}(i),n.parseString=function(e,t,r){var o,i;return null!=r?("function"==typeof r&&(o=r),"object"==typeof t&&(i=t)):("function"==typeof t&&(o=t),i={}),new n.Parser(i).parseString(e,o)},n.parseStringPromise=function(e,t){var r;return"object"==typeof t&&(r=t),new n.Parser(r).parseStringPromise(e)}}).call(this)},{"./bom":421,"./defaults":423,"./processors":425,events:344,sax:397,timers:414}],425:[function(e,t,n){(function(){"use strict";var e;e=new RegExp(/(?!xmlns)^.*:/),n.normalize=function(e){return e.toLowerCase()},n.firstCharLowerCase=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},n.stripPrefix=function(t){return t.replace(e,"")},n.parseNumbers=function(e){return isNaN(e)||(e=e%1==0?parseInt(e,10):parseFloat(e)),e},n.parseBooleans=function(e){return/^(?:true|false)$/i.test(e)&&(e="true"===e.toLowerCase()),e}}).call(this)},{}],426:[function(e,t,n){(function(){"use strict";var t,r,o,i,a=function(e,t){for(var n in t)s.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},s={}.hasOwnProperty;r=e("./defaults"),t=e("./builder"),o=e("./parser"),i=e("./processors"),n.defaults=r.defaults,n.processors=i,n.ValidationError=function(e){function t(e){this.message=e}return a(t,e),t}(Error),n.Builder=t.Builder,n.Parser=o.Parser,n.parseString=o.parseString,n.parseStringPromise=o.parseStringPromise}).call(this)},{"./builder":422,"./defaults":423,"./parser":424,"./processors":425}],427:[function(e,t,n){(function(){t.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(this)},{}],428:[function(e,t,n){(function(){t.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(e,t,n){(function(){var e,n,r,o,i,a,s,u=[].slice,c={}.hasOwnProperty;e=function(){var e,t,n,r,o,a;if(a=arguments[0],o=2<=arguments.length?u.call(arguments,1):[],i(Object.assign))Object.assign.apply(null,arguments);else for(e=0,n=o.length;e<n;e++)if(null!=(r=o[e]))for(t in r)c.call(r,t)&&(a[t]=r[t]);return a},i=function(e){return!!e&&"[object Function]"===Object.prototype.toString.call(e)},a=function(e){var t;return!!e&&("function"==(t=typeof e)||"object"===t)},r=function(e){return i(Array.isArray)?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)},o=function(e){var t;if(r(e))return!e.length;for(t in e)if(c.call(e,t))return!1;return!0},s=function(e){var t,n;return a(e)&&(n=Object.getPrototypeOf(e))&&(t=n.constructor)&&"function"==typeof t&&t instanceof t&&Function.prototype.toString.call(t)===Function.prototype.toString.call(Object)},n=function(e){return i(e.valueOf)?e.valueOf():e},t.exports.assign=e,t.exports.isFunction=i,t.exports.isObject=a,t.exports.isArray=r,t.exports.isEmpty=o,t.exports.isPlainObject=s,t.exports.getValue=n}).call(this)},{}],430:[function(e,t,n){(function(){t.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(this)},{}],431:[function(e,t,n){(function(){var n;n=e("./NodeType"),e("./XMLNode"),t.exports=function(){function e(e,t,r){if(this.parent=e,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),null==t)throw new Error("Missing attribute name. "+this.debugInfo(t));this.name=this.stringify.name(t),this.value=this.stringify.attValue(r),this.type=n.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(e.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(e.prototype,"textContent",{get:function(){return this.value},set:function(e){return this.value=e||""}}),Object.defineProperty(e.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(e.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(e.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(e.prototype,"specified",{get:function(){return!0}}),e.prototype.clone=function(){return Object.create(this)},e.prototype.toString=function(e){return this.options.writer.attribute(this,this.options.writer.filterOptions(e))},e.prototype.debugInfo=function(e){return null==(e=e||this.name)?"parent: <"+this.parent.name+">":"attribute: {"+e+"}, parent: <"+this.parent.name+">"},e.prototype.isEqualNode=function(e){return e.namespaceURI===this.namespaceURI&&e.prefix===this.prefix&&e.localName===this.localName&&e.value===this.value},e}()}).call(this)},{"./NodeType":428,"./XMLNode":450}],432:[function(e,t,n){(function(){var n,r,o=function(e,t){for(var n in t)i.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i={}.hasOwnProperty;n=e("./NodeType"),r=e("./XMLCharacterData"),t.exports=function(e){function t(e,r){if(t.__super__.constructor.call(this,e),null==r)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=n.CData,this.value=this.stringify.cdata(r)}return o(t,e),t.prototype.clone=function(){return Object.create(this)},t.prototype.toString=function(e){return this.options.writer.cdata(this,this.options.writer.filterOptions(e))},t}(r)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],433:[function(e,t,n){(function(){var n,r=function(e,t){for(var n in t)o.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},o={}.hasOwnProperty;n=e("./XMLNode"),t.exports=function(e){function t(e){t.__super__.constructor.call(this,e),this.value=""}return r(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return this.value},set:function(e){return this.value=e||""}}),Object.defineProperty(t.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(t.prototype,"textContent",{get:function(){return this.value},set:function(e){return this.value=e||""}}),t.prototype.clone=function(){return Object.create(this)},t.prototype.substringData=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.appendData=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.insertData=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.deleteData=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.replaceData=function(e,t,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.isEqualNode=function(e){return!!t.__super__.isEqualNode.apply(this,arguments).isEqualNode(e)&&e.data===this.data},t}(n)}).call(this)},{"./XMLNode":450}],434:[function(e,t,n){(function(){var n,r,o=function(e,t){for(var n in t)i.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i={}.hasOwnProperty;n=e("./NodeType"),r=e("./XMLCharacterData"),t.exports=function(e){function t(e,r){if(t.__super__.constructor.call(this,e),null==r)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=n.Comment,this.value=this.stringify.comment(r)}return o(t,e),t.prototype.clone=function(){return Object.create(this)},t.prototype.toString=function(e){return this.options.writer.comment(this,this.options.writer.filterOptions(e))},t}(r)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],435:[function(e,t,n){(function(){var n,r;n=e("./XMLDOMErrorHandler"),r=e("./XMLDOMStringList"),t.exports=function(){function e(){this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new n,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=Object.create(this.defaultParams)}return Object.defineProperty(e.prototype,"parameterNames",{get:function(){return new r(Object.keys(this.defaultParams))}}),e.prototype.getParameter=function(e){return this.params.hasOwnProperty(e)?this.params[e]:null},e.prototype.canSetParameter=function(e,t){return!0},e.prototype.setParameter=function(e,t){return null!=t?this.params[e]=t:delete this.params[e]},e}()}).call(this)},{"./XMLDOMErrorHandler":436,"./XMLDOMStringList":438}],436:[function(e,t,n){(function(){t.exports=function(){function e(){}return e.prototype.handleError=function(e){throw new Error(e)},e}()}).call(this)},{}],437:[function(e,t,n){(function(){t.exports=function(){function e(){}return e.prototype.hasFeature=function(e,t){return!0},e.prototype.createDocumentType=function(e,t,n){throw new Error("This DOM method is not implemented.")},e.prototype.createDocument=function(e,t,n){throw new Error("This DOM method is not implemented.")},e.prototype.createHTMLDocument=function(e){throw new Error("This DOM method is not implemented.")},e.prototype.getFeature=function(e,t){throw new Error("This DOM method is not implemented.")},e}()}).call(this)},{}],438:[function(e,t,n){(function(){t.exports=function(){function e(e){this.arr=e||[]}return Object.defineProperty(e.prototype,"length",{get:function(){return this.arr.length}}),e.prototype.item=function(e){return this.arr[e]||null},e.prototype.contains=function(e){return-1!==this.arr.indexOf(e)},e}()}).call(this)},{}],439:[function(e,t,n){(function(){var n,r,o=function(e,t){for(var n in t)i.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i={}.hasOwnProperty;r=e("./XMLNode"),n=e("./NodeType"),t.exports=function(e){function t(e,r,o,i,a,s){if(t.__super__.constructor.call(this,e),null==r)throw new Error("Missing DTD element name. "+this.debugInfo());if(null==o)throw new Error("Missing DTD attribute name. "+this.debugInfo(r));if(!i)throw new Error("Missing DTD attribute type. "+this.debugInfo(r));if(!a)throw new Error("Missing DTD attribute default. "+this.debugInfo(r));if(0!==a.indexOf("#")&&(a="#"+a),!a.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(r));if(s&&!a.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(r));this.elementName=this.stringify.name(r),this.type=n.AttributeDeclaration,this.attributeName=this.stringify.name(o),this.attributeType=this.stringify.dtdAttType(i),s&&(this.defaultValue=this.stringify.dtdAttDefault(s)),this.defaultValueType=a}return o(t,e),t.prototype.toString=function(e){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(e))},t}(r)}).call(this)},{"./NodeType":428,"./XMLNode":450}],440:[function(e,t,n){(function(){var n,r,o=function(e,t){for(var n in t)i.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i={}.hasOwnProperty;r=e("./XMLNode"),n=e("./NodeType"),t.exports=function(e){function t(e,r,o){if(t.__super__.constructor.call(this,e),null==r)throw new Error("Missing DTD element name. "+this.debugInfo());o||(o="(#PCDATA)"),Array.isArray(o)&&(o="("+o.join(",")+")"),this.name=this.stringify.name(r),this.type=n.ElementDeclaration,this.value=this.stringify.dtdElementValue(o)}return o(t,e),t.prototype.toString=function(e){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(e))},t}(r)}).call(this)},{"./NodeType":428,"./XMLNode":450}],441:[function(e,t,n){(function(){var n,r,o,i=function(e,t){for(var n in t)a.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},a={}.hasOwnProperty;o=e("./Utility").isObject,r=e("./XMLNode"),n=e("./NodeType"),t.exports=function(e){function t(e,r,i,a){if(t.__super__.constructor.call(this,e),null==i)throw new Error("Missing DTD entity name. "+this.debugInfo(i));if(null==a)throw new Error("Missing DTD entity value. "+this.debugInfo(i));if(this.pe=!!r,this.name=this.stringify.name(i),this.type=n.EntityDeclaration,o(a)){if(!a.pubID&&!a.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(i));if(a.pubID&&!a.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(i));if(this.internal=!1,null!=a.pubID&&(this.pubID=this.stringify.dtdPubID(a.pubID)),null!=a.sysID&&(this.sysID=this.stringify.dtdSysID(a.sysID)),null!=a.nData&&(this.nData=this.stringify.dtdNData(a.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(i))}else this.value=this.stringify.dtdEntityValue(a),this.internal=!0}return i(t,e),Object.defineProperty(t.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(t.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(t.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(t.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(t.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(t.prototype,"xmlVersion",{get:function(){return null}}),t.prototype.toString=function(e){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(e))},t}(r)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],442:[function(e,t,n){(function(){var n,r,o=function(e,t){for(var n in t)i.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i={}.hasOwnProperty;r=e("./XMLNode"),n=e("./NodeType"),t.exports=function(e){function t(e,r,o){if(t.__super__.constructor.call(this,e),null==r)throw new Error("Missing DTD notation name. "+this.debugInfo(r));if(!o.pubID&&!o.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(r));this.name=this.stringify.name(r),this.type=n.NotationDeclaration,null!=o.pubID&&(this.pubID=this.stringify.dtdPubID(o.pubID)),null!=o.sysID&&(this.sysID=this.stringify.dtdSysID(o.sysID))}return o(t,e),Object.defineProperty(t.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(t.prototype,"systemId",{get:function(){return this.sysID}}),t.prototype.toString=function(e){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(e))},t}(r)}).call(this)},{"./NodeType":428,"./XMLNode":450}],443:[function(e,t,n){(function(){var n,r,o,i=function(e,t){for(var n in t)a.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},a={}.hasOwnProperty;o=e("./Utility").isObject,r=e("./XMLNode"),n=e("./NodeType"),t.exports=function(e){function t(e,r,i,a){var s;t.__super__.constructor.call(this,e),o(r)&&(r=(s=r).version,i=s.encoding,a=s.standalone),r||(r="1.0"),this.type=n.Declaration,this.version=this.stringify.xmlVersion(r),null!=i&&(this.encoding=this.stringify.xmlEncoding(i)),null!=a&&(this.standalone=this.stringify.xmlStandalone(a))}return i(t,e),t.prototype.toString=function(e){return this.options.writer.declaration(this,this.options.writer.filterOptions(e))},t}(r)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],444:[function(e,t,n){(function(){var n,r,o,i,a,s,u,c,l=function(e,t){for(var n in t)f.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},f={}.hasOwnProperty;c=e("./Utility").isObject,u=e("./XMLNode"),n=e("./NodeType"),r=e("./XMLDTDAttList"),i=e("./XMLDTDEntity"),o=e("./XMLDTDElement"),a=e("./XMLDTDNotation"),s=e("./XMLNamedNodeMap"),t.exports=function(e){function t(e,r,o){var i,a,s,u,l,f;if(t.__super__.constructor.call(this,e),this.type=n.DocType,e.children)for(a=0,s=(u=e.children).length;a<s;a++)if((i=u[a]).type===n.Element){this.name=i.name;break}this.documentObject=e,c(r)&&(r=(l=r).pubID,o=l.sysID),null==o&&(o=(f=[r,o])[0],r=f[1]),null!=r&&(this.pubID=this.stringify.dtdPubID(r)),null!=o&&(this.sysID=this.stringify.dtdSysID(o))}return l(t,e),Object.defineProperty(t.prototype,"entities",{get:function(){var e,t,r,o,i;for(o={},t=0,r=(i=this.children).length;t<r;t++)(e=i[t]).type!==n.EntityDeclaration||e.pe||(o[e.name]=e);return new s(o)}}),Object.defineProperty(t.prototype,"notations",{get:function(){var e,t,r,o,i;for(o={},t=0,r=(i=this.children).length;t<r;t++)(e=i[t]).type===n.NotationDeclaration&&(o[e.name]=e);return new s(o)}}),Object.defineProperty(t.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(t.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(t.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),t.prototype.element=function(e,t){var n;return n=new o(this,e,t),this.children.push(n),this},t.prototype.attList=function(e,t,n,o,i){var a;return a=new r(this,e,t,n,o,i),this.children.push(a),this},t.prototype.entity=function(e,t){var n;return n=new i(this,!1,e,t),this.children.push(n),this},t.prototype.pEntity=function(e,t){var n;return n=new i(this,!0,e,t),this.children.push(n),this},t.prototype.notation=function(e,t){var n;return n=new a(this,e,t),this.children.push(n),this},t.prototype.toString=function(e){return this.options.writer.docType(this,this.options.writer.filterOptions(e))},t.prototype.ele=function(e,t){return this.element(e,t)},t.prototype.att=function(e,t,n,r,o){return this.attList(e,t,n,r,o)},t.prototype.ent=function(e,t){return this.entity(e,t)},t.prototype.pent=function(e,t){return this.pEntity(e,t)},t.prototype.not=function(e,t){return this.notation(e,t)},t.prototype.up=function(){return this.root()||this.documentObject},t.prototype.isEqualNode=function(e){return!!t.__super__.isEqualNode.apply(this,arguments).isEqualNode(e)&&e.name===this.name&&e.publicId===this.publicId&&e.systemId===this.systemId},t}(u)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLNamedNodeMap":449,"./XMLNode":450}],445:[function(e,t,n){(function(){var n,r,o,i,a,s,u,c=function(e,t){for(var n in t)l.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},l={}.hasOwnProperty;u=e("./Utility").isPlainObject,o=e("./XMLDOMImplementation"),r=e("./XMLDOMConfiguration"),i=e("./XMLNode"),n=e("./NodeType"),s=e("./XMLStringifier"),a=e("./XMLStringWriter"),t.exports=function(e){function t(e){t.__super__.constructor.call(this,null),this.name="#document",this.type=n.Document,this.documentURI=null,this.domConfig=new r,e||(e={}),e.writer||(e.writer=new a),this.options=e,this.stringify=new s(e)}return c(t,e),Object.defineProperty(t.prototype,"implementation",{value:new o}),Object.defineProperty(t.prototype,"doctype",{get:function(){var e,t,r,o;for(t=0,r=(o=this.children).length;t<r;t++)if((e=o[t]).type===n.DocType)return e;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 0!==this.children.length&&this.children[0].type===n.Declaration?this.children[0].encoding:null}}),Object.defineProperty(t.prototype,"xmlStandalone",{get:function(){return 0!==this.children.length&&this.children[0].type===n.Declaration&&"yes"===this.children[0].standalone}}),Object.defineProperty(t.prototype,"xmlVersion",{get:function(){return 0!==this.children.length&&this.children[0].type===n.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(e){var t;return t={},e?u(e)&&(t=e,e=this.options.writer):e=this.options.writer,e.document(this,e.filterOptions(t))},t.prototype.toString=function(e){return this.options.writer.document(this,this.options.writer.filterOptions(e))},t.prototype.createElement=function(e){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(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.createComment=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.createCDATASection=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.createProcessingInstruction=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.createAttribute=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.createEntityReference=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.getElementsByTagName=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.importNode=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.createElementNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.createAttributeNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.getElementsByTagNameNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.getElementById=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.adoptNode=function(e){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(e,t,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.getElementsByClassName=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.createEvent=function(e){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(e,t,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.createTreeWalker=function(e,t,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},t}(i)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLDOMConfiguration":435,"./XMLDOMImplementation":437,"./XMLNode":450,"./XMLStringWriter":455,"./XMLStringifier":456}],446:[function(e,t,n){(function(){var n,r,o,i,a,s,u,c,l,f,p,h,d,m,g,v,y,b,w,x,A,E,C,k={}.hasOwnProperty;C=e("./Utility"),A=C.isObject,x=C.isFunction,E=C.isPlainObject,w=C.getValue,n=e("./NodeType"),h=e("./XMLDocument"),d=e("./XMLElement"),i=e("./XMLCData"),a=e("./XMLComment"),g=e("./XMLRaw"),b=e("./XMLText"),m=e("./XMLProcessingInstruction"),f=e("./XMLDeclaration"),p=e("./XMLDocType"),s=e("./XMLDTDAttList"),c=e("./XMLDTDEntity"),u=e("./XMLDTDElement"),l=e("./XMLDTDNotation"),o=e("./XMLAttribute"),y=e("./XMLStringifier"),v=e("./XMLStringWriter"),r=e("./WriterState"),t.exports=function(){function e(e,t,r){var o;this.name="?xml",this.type=n.Document,e||(e={}),o={},e.writer?E(e.writer)&&(o=e.writer,e.writer=new v):e.writer=new v,this.options=e,this.writer=e.writer,this.writerOptions=this.writer.filterOptions(o),this.stringify=new y(e),this.onDataCallback=t||function(){},this.onEndCallback=r||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return e.prototype.createChildNode=function(e){var t,r,o,i,a,s,u,c;switch(e.type){case n.CData:this.cdata(e.value);break;case n.Comment:this.comment(e.value);break;case n.Element:for(r in o={},u=e.attribs)k.call(u,r)&&(t=u[r],o[r]=t.value);this.node(e.name,o);break;case n.Dummy:this.dummy();break;case n.Raw:this.raw(e.value);break;case n.Text:this.text(e.value);break;case n.ProcessingInstruction:this.instruction(e.target,e.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+e.constructor.name)}for(a=0,s=(c=e.children).length;a<s;a++)i=c[a],this.createChildNode(i),i.type===n.Element&&this.up();return this},e.prototype.dummy=function(){return this},e.prototype.node=function(e,t,n){var r;if(null==e)throw new Error("Missing node name.");if(this.root&&-1===this.currentLevel)throw new Error("Document can only have one root node. "+this.debugInfo(e));return this.openCurrent(),e=w(e),null==t&&(t={}),t=w(t),A(t)||(n=(r=[t,n])[0],t=r[1]),this.currentNode=new d(this,e,t),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,null!=n&&this.text(n),this},e.prototype.element=function(e,t,r){var o,i,a,s,u,c;if(this.currentNode&&this.currentNode.type===n.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(e)||A(e)||x(e))for(s=this.options.noValidation,this.options.noValidation=!0,(c=new h(this.options).element("TEMP_ROOT")).element(e),this.options.noValidation=s,i=0,a=(u=c.children).length;i<a;i++)o=u[i],this.createChildNode(o),o.type===n.Element&&this.up();else this.node(e,t,r);return this},e.prototype.attribute=function(e,t){var n,r;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(e));if(null!=e&&(e=w(e)),A(e))for(n in e)k.call(e,n)&&(r=e[n],this.attribute(n,r));else x(t)&&(t=t.apply()),this.options.keepNullAttributes&&null==t?this.currentNode.attribs[e]=new o(this,e,""):null!=t&&(this.currentNode.attribs[e]=new o(this,e,t));return this},e.prototype.text=function(e){var t;return this.openCurrent(),t=new b(this,e),this.onData(this.writer.text(t,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.cdata=function(e){var t;return this.openCurrent(),t=new i(this,e),this.onData(this.writer.cdata(t,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.comment=function(e){var t;return this.openCurrent(),t=new a(this,e),this.onData(this.writer.comment(t,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.raw=function(e){var t;return this.openCurrent(),t=new g(this,e),this.onData(this.writer.raw(t,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.instruction=function(e,t){var n,r,o,i,a;if(this.openCurrent(),null!=e&&(e=w(e)),null!=t&&(t=w(t)),Array.isArray(e))for(n=0,i=e.length;n<i;n++)r=e[n],this.instruction(r);else if(A(e))for(r in e)k.call(e,r)&&(o=e[r],this.instruction(r,o));else x(t)&&(t=t.apply()),a=new m(this,e,t),this.onData(this.writer.processingInstruction(a,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},e.prototype.declaration=function(e,t,n){var r;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return r=new f(this,e,t,n),this.onData(this.writer.declaration(r,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.doctype=function(e,t,n){if(this.openCurrent(),null==e)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new p(this,t,n),this.currentNode.rootNodeName=e,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},e.prototype.dtdElement=function(e,t){var n;return this.openCurrent(),n=new u(this,e,t),this.onData(this.writer.dtdElement(n,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.attList=function(e,t,n,r,o){var i;return this.openCurrent(),i=new s(this,e,t,n,r,o),this.onData(this.writer.dtdAttList(i,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.entity=function(e,t){var n;return this.openCurrent(),n=new c(this,!1,e,t),this.onData(this.writer.dtdEntity(n,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.pEntity=function(e,t){var n;return this.openCurrent(),n=new c(this,!0,e,t),this.onData(this.writer.dtdEntity(n,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.notation=function(e,t){var n;return this.openCurrent(),n=new l(this,e,t),this.onData(this.writer.dtdNotation(n,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.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},e.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},e.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},e.prototype.openNode=function(e){var t,o,i,a;if(!e.isOpen){if(this.root||0!==this.currentLevel||e.type!==n.Element||(this.root=e),o="",e.type===n.Element){for(i in this.writerOptions.state=r.OpenTag,o=this.writer.indent(e,this.writerOptions,this.currentLevel)+"<"+e.name,a=e.attribs)k.call(a,i)&&(t=a[i],o+=this.writer.attribute(t,this.writerOptions,this.currentLevel));o+=(e.children?">":"/>")+this.writer.endline(e,this.writerOptions,this.currentLevel),this.writerOptions.state=r.InsideTag}else this.writerOptions.state=r.OpenTag,o=this.writer.indent(e,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+e.rootNodeName,e.pubID&&e.sysID?o+=' PUBLIC "'+e.pubID+'" "'+e.sysID+'"':e.sysID&&(o+=' SYSTEM "'+e.sysID+'"'),e.children?(o+=" [",this.writerOptions.state=r.InsideTag):(this.writerOptions.state=r.CloseTag,o+=">"),o+=this.writer.endline(e,this.writerOptions,this.currentLevel);return this.onData(o,this.currentLevel),e.isOpen=!0}},e.prototype.closeNode=function(e){var t;if(!e.isClosed)return t="",this.writerOptions.state=r.CloseTag,t=e.type===n.Element?this.writer.indent(e,this.writerOptions,this.currentLevel)+"</"+e.name+">"+this.writer.endline(e,this.writerOptions,this.currentLevel):this.writer.indent(e,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(e,this.writerOptions,this.currentLevel),this.writerOptions.state=r.None,this.onData(t,this.currentLevel),e.isClosed=!0},e.prototype.onData=function(e,t){return this.documentStarted=!0,this.onDataCallback(e,t+1)},e.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},e.prototype.debugInfo=function(e){return null==e?"":"node: <"+e+">"},e.prototype.ele=function(){return this.element.apply(this,arguments)},e.prototype.nod=function(e,t,n){return this.node(e,t,n)},e.prototype.txt=function(e){return this.text(e)},e.prototype.dat=function(e){return this.cdata(e)},e.prototype.com=function(e){return this.comment(e)},e.prototype.ins=function(e,t){return this.instruction(e,t)},e.prototype.dec=function(e,t,n){return this.declaration(e,t,n)},e.prototype.dtd=function(e,t,n){return this.doctype(e,t,n)},e.prototype.e=function(e,t,n){return this.element(e,t,n)},e.prototype.n=function(e,t,n){return this.node(e,t,n)},e.prototype.t=function(e){return this.text(e)},e.prototype.d=function(e){return this.cdata(e)},e.prototype.c=function(e){return this.comment(e)},e.prototype.r=function(e){return this.raw(e)},e.prototype.i=function(e,t){return this.instruction(e,t)},e.prototype.att=function(){return this.currentNode&&this.currentNode.type===n.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},e.prototype.a=function(){return this.currentNode&&this.currentNode.type===n.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},e.prototype.ent=function(e,t){return this.entity(e,t)},e.prototype.pent=function(e,t){return this.pEntity(e,t)},e.prototype.not=function(e,t){return this.notation(e,t)},e}()}).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(e,t,n){(function(){var n,r,o=function(e,t){for(var n in t)i.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i={}.hasOwnProperty;r=e("./XMLNode"),n=e("./NodeType"),t.exports=function(e){function t(e){t.__super__.constructor.call(this,e),this.type=n.Dummy}return o(t,e),t.prototype.clone=function(){return Object.create(this)},t.prototype.toString=function(e){return""},t}(r)}).call(this)},{"./NodeType":428,"./XMLNode":450}],448:[function(e,t,n){(function(){var n,r,o,i,a,s,u,c,l=function(e,t){for(var n in t)f.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},f={}.hasOwnProperty;c=e("./Utility"),u=c.isObject,s=c.isFunction,a=c.getValue,i=e("./XMLNode"),n=e("./NodeType"),r=e("./XMLAttribute"),o=e("./XMLNamedNodeMap"),t.exports=function(e){function t(e,r,o){var i,a,s,u;if(t.__super__.constructor.call(this,e),null==r)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(r),this.type=n.Element,this.attribs={},this.schemaTypeInfo=null,null!=o&&this.attribute(o),e.type===n.Document&&(this.isRoot=!0,this.documentObject=e,e.rootObject=this,e.children))for(a=0,s=(u=e.children).length;a<s;a++)if((i=u[a]).type===n.DocType){i.name=this.name;break}}return l(t,e),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(t.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(t.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(t.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(t.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(t.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(t.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(t.prototype,"attributes",{get:function(){return this.attributeMap&&this.attributeMap.nodes||(this.attributeMap=new o(this.attribs)),this.attributeMap}}),t.prototype.clone=function(){var e,t,n,r;for(t in(n=Object.create(this)).isRoot&&(n.documentObject=null),n.attribs={},r=this.attribs)f.call(r,t)&&(e=r[t],n.attribs[t]=e.clone());return n.children=[],this.children.forEach((function(e){var t;return(t=e.clone()).parent=n,n.children.push(t)})),n},t.prototype.attribute=function(e,t){var n,o;if(null!=e&&(e=a(e)),u(e))for(n in e)f.call(e,n)&&(o=e[n],this.attribute(n,o));else s(t)&&(t=t.apply()),this.options.keepNullAttributes&&null==t?this.attribs[e]=new r(this,e,""):null!=t&&(this.attribs[e]=new r(this,e,t));return this},t.prototype.removeAttribute=function(e){var t,n,r;if(null==e)throw new Error("Missing attribute name. "+this.debugInfo());if(e=a(e),Array.isArray(e))for(n=0,r=e.length;n<r;n++)t=e[n],delete this.attribs[t];else delete this.attribs[e];return this},t.prototype.toString=function(e){return this.options.writer.element(this,this.options.writer.filterOptions(e))},t.prototype.att=function(e,t){return this.attribute(e,t)},t.prototype.a=function(e,t){return this.attribute(e,t)},t.prototype.getAttribute=function(e){return this.attribs.hasOwnProperty(e)?this.attribs[e].value:null},t.prototype.setAttribute=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.getAttributeNode=function(e){return this.attribs.hasOwnProperty(e)?this.attribs[e]:null},t.prototype.setAttributeNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.removeAttributeNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.getElementsByTagName=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.getAttributeNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.setAttributeNS=function(e,t,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.removeAttributeNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.getAttributeNodeNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.setAttributeNodeNS=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.getElementsByTagNameNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.hasAttribute=function(e){return this.attribs.hasOwnProperty(e)},t.prototype.hasAttributeNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.setIdAttribute=function(e,t){return this.attribs.hasOwnProperty(e)?this.attribs[e].isId:t},t.prototype.setIdAttributeNS=function(e,t,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.setIdAttributeNode=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.getElementsByTagName=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.getElementsByTagNameNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.getElementsByClassName=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.isEqualNode=function(e){var n,r,o;if(!t.__super__.isEqualNode.apply(this,arguments).isEqualNode(e))return!1;if(e.namespaceURI!==this.namespaceURI)return!1;if(e.prefix!==this.prefix)return!1;if(e.localName!==this.localName)return!1;if(e.attribs.length!==this.attribs.length)return!1;for(n=r=0,o=this.attribs.length-1;0<=o?r<=o:r>=o;n=0<=o?++r:--r)if(!this.attribs[n].isEqualNode(e.attribs[n]))return!1;return!0},t}(i)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLAttribute":431,"./XMLNamedNodeMap":449,"./XMLNode":450}],449:[function(e,t,n){(function(){t.exports=function(){function e(e){this.nodes=e}return Object.defineProperty(e.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),e.prototype.clone=function(){return this.nodes=null},e.prototype.getNamedItem=function(e){return this.nodes[e]},e.prototype.setNamedItem=function(e){var t;return t=this.nodes[e.nodeName],this.nodes[e.nodeName]=e,t||null},e.prototype.removeNamedItem=function(e){var t;return t=this.nodes[e],delete this.nodes[e],t||null},e.prototype.item=function(e){return this.nodes[Object.keys(this.nodes)[e]]||null},e.prototype.getNamedItemNS=function(e,t){throw new Error("This DOM method is not implemented.")},e.prototype.setNamedItemNS=function(e){throw new Error("This DOM method is not implemented.")},e.prototype.removeNamedItemNS=function(e,t){throw new Error("This DOM method is not implemented.")},e}()}).call(this)},{}],450:[function(e,t,n){(function(){var n,r,o,i,a,s,u,c,l,f,p,h,d,m,g,v,y,b={}.hasOwnProperty;y=e("./Utility"),v=y.isObject,g=y.isFunction,m=y.isEmpty,d=y.getValue,c=null,o=null,i=null,a=null,s=null,p=null,h=null,f=null,u=null,r=null,l=null,n=null,t.exports=function(){function t(t){this.parent=t,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,c||(c=e("./XMLElement"),o=e("./XMLCData"),i=e("./XMLComment"),a=e("./XMLDeclaration"),s=e("./XMLDocType"),p=e("./XMLRaw"),h=e("./XMLText"),f=e("./XMLProcessingInstruction"),u=e("./XMLDummy"),r=e("./NodeType"),l=e("./XMLNodeList"),e("./XMLNamedNodeMap"),n=e("./DocumentPosition"))}return Object.defineProperty(t.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(t.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.childNodeList&&this.childNodeList.nodes||(this.childNodeList=new l(this.children)),this.childNodeList}}),Object.defineProperty(t.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(t.prototype,"previousSibling",{get:function(){var e;return e=this.parent.children.indexOf(this),this.parent.children[e-1]||null}}),Object.defineProperty(t.prototype,"nextSibling",{get:function(){var e;return e=this.parent.children.indexOf(this),this.parent.children[e+1]||null}}),Object.defineProperty(t.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(t.prototype,"textContent",{get:function(){var e,t,n,o,i;if(this.nodeType===r.Element||this.nodeType===r.DocumentFragment){for(i="",t=0,n=(o=this.children).length;t<n;t++)(e=o[t]).textContent&&(i+=e.textContent);return i}return null},set:function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),t.prototype.setParent=function(e){var t,n,r,o,i;for(this.parent=e,e&&(this.options=e.options,this.stringify=e.stringify),i=[],n=0,r=(o=this.children).length;n<r;n++)t=o[n],i.push(t.setParent(this));return i},t.prototype.element=function(e,t,n){var r,o,i,a,s,u,c,l,f,p,h;if(u=null,null===t&&null==n&&(t=(f=[{},null])[0],n=f[1]),null==t&&(t={}),t=d(t),v(t)||(n=(p=[t,n])[0],t=p[1]),null!=e&&(e=d(e)),Array.isArray(e))for(i=0,c=e.length;i<c;i++)o=e[i],u=this.element(o);else if(g(e))u=this.element(e.apply());else if(v(e)){for(s in e)if(b.call(e,s))if(h=e[s],g(h)&&(h=h.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&0===s.indexOf(this.stringify.convertAttKey))u=this.attribute(s.substr(this.stringify.convertAttKey.length),h);else if(!this.options.separateArrayItems&&Array.isArray(h)&&m(h))u=this.dummy();else if(v(h)&&m(h))u=this.element(s);else if(this.options.keepNullNodes||null!=h)if(!this.options.separateArrayItems&&Array.isArray(h))for(a=0,l=h.length;a<l;a++)o=h[a],(r={})[s]=o,u=this.element(r);else v(h)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&0===s.indexOf(this.stringify.convertTextKey)?u=this.element(h):(u=this.element(s)).element(h):u=this.element(s,h);else u=this.dummy()}else u=this.options.keepNullNodes||null!==n?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&0===e.indexOf(this.stringify.convertTextKey)?this.text(n):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&0===e.indexOf(this.stringify.convertCDataKey)?this.cdata(n):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&0===e.indexOf(this.stringify.convertCommentKey)?this.comment(n):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&0===e.indexOf(this.stringify.convertRawKey)?this.raw(n):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&0===e.indexOf(this.stringify.convertPIKey)?this.instruction(e.substr(this.stringify.convertPIKey.length),n):this.node(e,t,n):this.dummy();if(null==u)throw new Error("Could not create any elements with: "+e+". "+this.debugInfo());return u},t.prototype.insertBefore=function(e,t,n){var r,o,i,a,s;if(null!=e?e.type:void 0)return a=t,(i=e).setParent(this),a?(o=children.indexOf(a),s=children.splice(o),children.push(i),Array.prototype.push.apply(children,s)):children.push(i),i;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(e));return o=this.parent.children.indexOf(this),s=this.parent.children.splice(o),r=this.parent.element(e,t,n),Array.prototype.push.apply(this.parent.children,s),r},t.prototype.insertAfter=function(e,t,n){var r,o,i;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(e));return o=this.parent.children.indexOf(this),i=this.parent.children.splice(o+1),r=this.parent.element(e,t,n),Array.prototype.push.apply(this.parent.children,i),r},t.prototype.remove=function(){var e;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return e=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[e,e-e+1].concat([])),this.parent},t.prototype.node=function(e,t,n){var r,o;return null!=e&&(e=d(e)),t||(t={}),t=d(t),v(t)||(n=(o=[t,n])[0],t=o[1]),r=new c(this,e,t),null!=n&&r.text(n),this.children.push(r),r},t.prototype.text=function(e){var t;return v(e)&&this.element(e),t=new h(this,e),this.children.push(t),this},t.prototype.cdata=function(e){var t;return t=new o(this,e),this.children.push(t),this},t.prototype.comment=function(e){var t;return t=new i(this,e),this.children.push(t),this},t.prototype.commentBefore=function(e){var t,n;return t=this.parent.children.indexOf(this),n=this.parent.children.splice(t),this.parent.comment(e),Array.prototype.push.apply(this.parent.children,n),this},t.prototype.commentAfter=function(e){var t,n;return t=this.parent.children.indexOf(this),n=this.parent.children.splice(t+1),this.parent.comment(e),Array.prototype.push.apply(this.parent.children,n),this},t.prototype.raw=function(e){var t;return t=new p(this,e),this.children.push(t),this},t.prototype.dummy=function(){return new u(this)},t.prototype.instruction=function(e,t){var n,r,o,i,a;if(null!=e&&(e=d(e)),null!=t&&(t=d(t)),Array.isArray(e))for(i=0,a=e.length;i<a;i++)n=e[i],this.instruction(n);else if(v(e))for(n in e)b.call(e,n)&&(r=e[n],this.instruction(n,r));else g(t)&&(t=t.apply()),o=new f(this,e,t),this.children.push(o);return this},t.prototype.instructionBefore=function(e,t){var n,r;return n=this.parent.children.indexOf(this),r=this.parent.children.splice(n),this.parent.instruction(e,t),Array.prototype.push.apply(this.parent.children,r),this},t.prototype.instructionAfter=function(e,t){var n,r;return n=this.parent.children.indexOf(this),r=this.parent.children.splice(n+1),this.parent.instruction(e,t),Array.prototype.push.apply(this.parent.children,r),this},t.prototype.declaration=function(e,t,n){var o,i;return o=this.document(),i=new a(o,e,t,n),0===o.children.length?o.children.unshift(i):o.children[0].type===r.Declaration?o.children[0]=i:o.children.unshift(i),o.root()||o},t.prototype.dtd=function(e,t){var n,o,i,a,u,c,l,f,p;for(n=this.document(),o=new s(n,e,t),i=a=0,c=(f=n.children).length;a<c;i=++a)if(f[i].type===r.DocType)return n.children[i]=o,o;for(i=u=0,l=(p=n.children).length;u<l;i=++u)if(p[i].isRoot)return n.children.splice(i,0,o),o;return n.children.push(o),o},t.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},t.prototype.root=function(){var e;for(e=this;e;){if(e.type===r.Document)return e.rootObject;if(e.isRoot)return e;e=e.parent}},t.prototype.document=function(){var e;for(e=this;e;){if(e.type===r.Document)return e;e=e.parent}},t.prototype.end=function(e){return this.document().end(e)},t.prototype.prev=function(){var e;if((e=this.parent.children.indexOf(this))<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[e-1]},t.prototype.next=function(){var e;if(-1===(e=this.parent.children.indexOf(this))||e===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[e+1]},t.prototype.importDocument=function(e){var t;return(t=e.root().clone()).parent=this,t.isRoot=!1,this.children.push(t),this},t.prototype.debugInfo=function(e){var t,n;return null!=(e=e||this.name)||(null!=(t=this.parent)?t.name:void 0)?null==e?"parent: <"+this.parent.name+">":(null!=(n=this.parent)?n.name:void 0)?"node: <"+e+">, parent: <"+this.parent.name+">":"node: <"+e+">":""},t.prototype.ele=function(e,t,n){return this.element(e,t,n)},t.prototype.nod=function(e,t,n){return this.node(e,t,n)},t.prototype.txt=function(e){return this.text(e)},t.prototype.dat=function(e){return this.cdata(e)},t.prototype.com=function(e){return this.comment(e)},t.prototype.ins=function(e,t){return this.instruction(e,t)},t.prototype.doc=function(){return this.document()},t.prototype.dec=function(e,t,n){return this.declaration(e,t,n)},t.prototype.e=function(e,t,n){return this.element(e,t,n)},t.prototype.n=function(e,t,n){return this.node(e,t,n)},t.prototype.t=function(e){return this.text(e)},t.prototype.d=function(e){return this.cdata(e)},t.prototype.c=function(e){return this.comment(e)},t.prototype.r=function(e){return this.raw(e)},t.prototype.i=function(e,t){return this.instruction(e,t)},t.prototype.u=function(){return this.up()},t.prototype.importXMLBuilder=function(e){return this.importDocument(e)},t.prototype.replaceChild=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.removeChild=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.appendChild=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.hasChildNodes=function(){return 0!==this.children.length},t.prototype.cloneNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.isSupported=function(e,t){return!0},t.prototype.hasAttributes=function(){return 0!==this.attribs.length},t.prototype.compareDocumentPosition=function(e){var t,r;return(t=this)===e?0:this.document()!==e.document()?(r=n.Disconnected|n.ImplementationSpecific,Math.random()<.5?r|=n.Preceding:r|=n.Following,r):t.isAncestor(e)?n.Contains|n.Preceding:t.isDescendant(e)?n.Contains|n.Following:t.isPreceding(e)?n.Preceding:n.Following},t.prototype.isSameNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.lookupPrefix=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.isDefaultNamespace=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.lookupNamespaceURI=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.isEqualNode=function(e){var t,n,r;if(e.nodeType!==this.nodeType)return!1;if(e.children.length!==this.children.length)return!1;for(t=n=0,r=this.children.length-1;0<=r?n<=r:n>=r;t=0<=r?++n:--n)if(!this.children[t].isEqualNode(e.children[t]))return!1;return!0},t.prototype.getFeature=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.setUserData=function(e,t,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.getUserData=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.contains=function(e){return!!e&&(e===this||this.isDescendant(e))},t.prototype.isDescendant=function(e){var t,n,r,o;for(n=0,r=(o=this.children).length;n<r;n++){if(e===(t=o[n]))return!0;if(t.isDescendant(e))return!0}return!1},t.prototype.isAncestor=function(e){return e.isDescendant(this)},t.prototype.isPreceding=function(e){var t,n;return t=this.treePosition(e),n=this.treePosition(this),-1!==t&&-1!==n&&t<n},t.prototype.isFollowing=function(e){var t,n;return t=this.treePosition(e),n=this.treePosition(this),-1!==t&&-1!==n&&t>n},t.prototype.treePosition=function(e){var t,n;return n=0,t=!1,this.foreachTreeNode(this.document(),(function(r){if(n++,!t&&r===e)return t=!0})),t?n:-1},t.prototype.foreachTreeNode=function(e,t){var n,r,o,i,a;for(e||(e=this.document()),r=0,o=(i=e.children).length;r<o;r++){if(a=t(n=i[r]))return a;if(a=this.foreachTreeNode(n,t))return a}},t}()}).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(e,t,n){(function(){t.exports=function(){function e(e){this.nodes=e}return Object.defineProperty(e.prototype,"length",{get:function(){return this.nodes.length||0}}),e.prototype.clone=function(){return this.nodes=null},e.prototype.item=function(e){return this.nodes[e]||null},e}()}).call(this)},{}],452:[function(e,t,n){(function(){var n,r,o=function(e,t){for(var n in t)i.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i={}.hasOwnProperty;n=e("./NodeType"),r=e("./XMLCharacterData"),t.exports=function(e){function t(e,r,o){if(t.__super__.constructor.call(this,e),null==r)throw new Error("Missing instruction target. "+this.debugInfo());this.type=n.ProcessingInstruction,this.target=this.stringify.insTarget(r),this.name=this.target,o&&(this.value=this.stringify.insValue(o))}return o(t,e),t.prototype.clone=function(){return Object.create(this)},t.prototype.toString=function(e){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(e))},t.prototype.isEqualNode=function(e){return!!t.__super__.isEqualNode.apply(this,arguments).isEqualNode(e)&&e.target===this.target},t}(r)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],453:[function(e,t,n){(function(){var n,r,o=function(e,t){for(var n in t)i.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i={}.hasOwnProperty;n=e("./NodeType"),r=e("./XMLNode"),t.exports=function(e){function t(e,r){if(t.__super__.constructor.call(this,e),null==r)throw new Error("Missing raw text. "+this.debugInfo());this.type=n.Raw,this.value=this.stringify.raw(r)}return o(t,e),t.prototype.clone=function(){return Object.create(this)},t.prototype.toString=function(e){return this.options.writer.raw(this,this.options.writer.filterOptions(e))},t}(r)}).call(this)},{"./NodeType":428,"./XMLNode":450}],454:[function(e,t,n){(function(){var n,r,o,i=function(e,t){for(var n in t)a.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},a={}.hasOwnProperty;n=e("./NodeType"),o=e("./XMLWriterBase"),r=e("./WriterState"),t.exports=function(e){function t(e,n){this.stream=e,t.__super__.constructor.call(this,n)}return i(t,e),t.prototype.endline=function(e,n,o){return e.isLastRootNode&&n.state===r.CloseTag?"":t.__super__.endline.call(this,e,n,o)},t.prototype.document=function(e,t){var n,r,o,i,a,s,u,c,l;for(r=o=0,a=(u=e.children).length;o<a;r=++o)(n=u[r]).isLastRootNode=r===e.children.length-1;for(t=this.filterOptions(t),l=[],i=0,s=(c=e.children).length;i<s;i++)n=c[i],l.push(this.writeChildNode(n,t,0));return l},t.prototype.attribute=function(e,n,r){return this.stream.write(t.__super__.attribute.call(this,e,n,r))},t.prototype.cdata=function(e,n,r){return this.stream.write(t.__super__.cdata.call(this,e,n,r))},t.prototype.comment=function(e,n,r){return this.stream.write(t.__super__.comment.call(this,e,n,r))},t.prototype.declaration=function(e,n,r){return this.stream.write(t.__super__.declaration.call(this,e,n,r))},t.prototype.docType=function(e,t,n){var o,i,a,s;if(n||(n=0),this.openNode(e,t,n),t.state=r.OpenTag,this.stream.write(this.indent(e,t,n)),this.stream.write("<!DOCTYPE "+e.root().name),e.pubID&&e.sysID?this.stream.write(' PUBLIC "'+e.pubID+'" "'+e.sysID+'"'):e.sysID&&this.stream.write(' SYSTEM "'+e.sysID+'"'),e.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(e,t,n)),t.state=r.InsideTag,i=0,a=(s=e.children).length;i<a;i++)o=s[i],this.writeChildNode(o,t,n+1);t.state=r.CloseTag,this.stream.write("]")}return t.state=r.CloseTag,this.stream.write(t.spaceBeforeSlash+">"),this.stream.write(this.endline(e,t,n)),t.state=r.None,this.closeNode(e,t,n)},t.prototype.element=function(e,t,o){var i,s,u,c,l,f,p,h,d;for(p in o||(o=0),this.openNode(e,t,o),t.state=r.OpenTag,this.stream.write(this.indent(e,t,o)+"<"+e.name),h=e.attribs)a.call(h,p)&&(i=h[p],this.attribute(i,t,o));if(c=0===(u=e.children.length)?null:e.children[0],0===u||e.children.every((function(e){return(e.type===n.Text||e.type===n.Raw)&&""===e.value})))t.allowEmpty?(this.stream.write(">"),t.state=r.CloseTag,this.stream.write("</"+e.name+">")):(t.state=r.CloseTag,this.stream.write(t.spaceBeforeSlash+"/>"));else if(!t.pretty||1!==u||c.type!==n.Text&&c.type!==n.Raw||null==c.value){for(this.stream.write(">"+this.endline(e,t,o)),t.state=r.InsideTag,l=0,f=(d=e.children).length;l<f;l++)s=d[l],this.writeChildNode(s,t,o+1);t.state=r.CloseTag,this.stream.write(this.indent(e,t,o)+"</"+e.name+">")}else this.stream.write(">"),t.state=r.InsideTag,t.suppressPrettyCount++,this.writeChildNode(c,t,o+1),t.suppressPrettyCount--,t.state=r.CloseTag,this.stream.write("</"+e.name+">");return this.stream.write(this.endline(e,t,o)),t.state=r.None,this.closeNode(e,t,o)},t.prototype.processingInstruction=function(e,n,r){return this.stream.write(t.__super__.processingInstruction.call(this,e,n,r))},t.prototype.raw=function(e,n,r){return this.stream.write(t.__super__.raw.call(this,e,n,r))},t.prototype.text=function(e,n,r){return this.stream.write(t.__super__.text.call(this,e,n,r))},t.prototype.dtdAttList=function(e,n,r){return this.stream.write(t.__super__.dtdAttList.call(this,e,n,r))},t.prototype.dtdElement=function(e,n,r){return this.stream.write(t.__super__.dtdElement.call(this,e,n,r))},t.prototype.dtdEntity=function(e,n,r){return this.stream.write(t.__super__.dtdEntity.call(this,e,n,r))},t.prototype.dtdNotation=function(e,n,r){return this.stream.write(t.__super__.dtdNotation.call(this,e,n,r))},t}(o)}).call(this)},{"./NodeType":428,"./WriterState":430,"./XMLWriterBase":458}],455:[function(e,t,n){(function(){var n,r=function(e,t){for(var n in t)o.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},o={}.hasOwnProperty;n=e("./XMLWriterBase"),t.exports=function(e){function t(e){t.__super__.constructor.call(this,e)}return r(t,e),t.prototype.document=function(e,t){var n,r,o,i,a;for(t=this.filterOptions(t),i="",r=0,o=(a=e.children).length;r<o;r++)n=a[r],i+=this.writeChildNode(n,t,0);return t.pretty&&i.slice(-t.newline.length)===t.newline&&(i=i.slice(0,-t.newline.length)),i},t}(n)}).call(this)},{"./XMLWriterBase":458}],456:[function(e,t,n){(function(){var e=function(e,t){return function(){return e.apply(t,arguments)}},n={}.hasOwnProperty;t.exports=function(){function t(t){var r,o,i;for(r in this.assertLegalName=e(this.assertLegalName,this),this.assertLegalChar=e(this.assertLegalChar,this),t||(t={}),this.options=t,this.options.version||(this.options.version="1.0"),o=t.stringify||{})n.call(o,r)&&(i=o[r],this[r]=i)}return t.prototype.name=function(e){return this.options.noValidation?e:this.assertLegalName(""+e||"")},t.prototype.text=function(e){return this.options.noValidation?e:this.assertLegalChar(this.textEscape(""+e||""))},t.prototype.cdata=function(e){return this.options.noValidation?e:(e=(e=""+e||"").replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(e))},t.prototype.comment=function(e){if(this.options.noValidation)return e;if((e=""+e||"").match(/--/))throw new Error("Comment text cannot contain double-hypen: "+e);return this.assertLegalChar(e)},t.prototype.raw=function(e){return this.options.noValidation?e:""+e||""},t.prototype.attValue=function(e){return this.options.noValidation?e:this.assertLegalChar(this.attEscape(e=""+e||""))},t.prototype.insTarget=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},t.prototype.insValue=function(e){if(this.options.noValidation)return e;if((e=""+e||"").match(/\?>/))throw new Error("Invalid processing instruction value: "+e);return this.assertLegalChar(e)},t.prototype.xmlVersion=function(e){if(this.options.noValidation)return e;if(!(e=""+e||"").match(/1\.[0-9]+/))throw new Error("Invalid version number: "+e);return e},t.prototype.xmlEncoding=function(e){if(this.options.noValidation)return e;if(!(e=""+e||"").match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+e);return this.assertLegalChar(e)},t.prototype.xmlStandalone=function(e){return this.options.noValidation?e:e?"yes":"no"},t.prototype.dtdPubID=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},t.prototype.dtdSysID=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},t.prototype.dtdElementValue=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},t.prototype.dtdAttType=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},t.prototype.dtdAttDefault=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},t.prototype.dtdEntityValue=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},t.prototype.dtdNData=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},t.prototype.convertAttKey="@",t.prototype.convertPIKey="?",t.prototype.convertTextKey="#text",t.prototype.convertCDataKey="#cdata",t.prototype.convertCommentKey="#comment",t.prototype.convertRawKey="#raw",t.prototype.assertLegalChar=function(e){var t,n;if(this.options.noValidation)return e;if(t="","1.0"===this.options.version){if(t=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,n=e.match(t))throw new Error("Invalid character in string: "+e+" at index "+n.index)}else if("1.1"===this.options.version&&(t=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,n=e.match(t)))throw new Error("Invalid character in string: "+e+" at index "+n.index);return e},t.prototype.assertLegalName=function(e){var t;if(this.options.noValidation)return e;if(this.assertLegalChar(e),t=/^([: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])*$/,!e.match(t))throw new Error("Invalid character in name");return e},t.prototype.textEscape=function(e){var t;return this.options.noValidation?e:(t=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,e.replace(t,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))},t.prototype.attEscape=function(e){var t;return this.options.noValidation?e:(t=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,e.replace(t,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))},t}()}).call(this)},{}],457:[function(e,t,n){(function(){var n,r,o=function(e,t){for(var n in t)i.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i={}.hasOwnProperty;n=e("./NodeType"),r=e("./XMLCharacterData"),t.exports=function(e){function t(e,r){if(t.__super__.constructor.call(this,e),null==r)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=n.Text,this.value=this.stringify.text(r)}return o(t,e),Object.defineProperty(t.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(t.prototype,"wholeText",{get:function(){var e,t,n;for(n="",t=this.previousSibling;t;)n=t.data+n,t=t.previousSibling;for(n+=this.data,e=this.nextSibling;e;)n+=e.data,e=e.nextSibling;return n}}),t.prototype.clone=function(){return Object.create(this)},t.prototype.toString=function(e){return this.options.writer.text(this,this.options.writer.filterOptions(e))},t.prototype.splitText=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.replaceWholeText=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t}(r)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],458:[function(e,t,n){(function(){var n,r,o,i={}.hasOwnProperty;o=e("./Utility").assign,n=e("./NodeType"),e("./XMLDeclaration"),e("./XMLDocType"),e("./XMLCData"),e("./XMLComment"),e("./XMLElement"),e("./XMLRaw"),e("./XMLText"),e("./XMLProcessingInstruction"),e("./XMLDummy"),e("./XMLDTDAttList"),e("./XMLDTDElement"),e("./XMLDTDEntity"),e("./XMLDTDNotation"),r=e("./WriterState"),t.exports=function(){function e(e){var t,n,r;for(t in e||(e={}),this.options=e,n=e.writer||{})i.call(n,t)&&(r=n[t],this["_"+t]=this[t],this[t]=r)}return e.prototype.filterOptions=function(e){var t,n,i,a,s,u,c,l;return e||(e={}),e=o({},this.options,e),(t={writer:this}).pretty=e.pretty||!1,t.allowEmpty=e.allowEmpty||!1,t.indent=null!=(n=e.indent)?n:" ",t.newline=null!=(i=e.newline)?i:"\n",t.offset=null!=(a=e.offset)?a:0,t.dontPrettyTextNodes=null!=(s=null!=(u=e.dontPrettyTextNodes)?u:e.dontprettytextnodes)?s:0,t.spaceBeforeSlash=null!=(c=null!=(l=e.spaceBeforeSlash)?l:e.spacebeforeslash)?c:"",!0===t.spaceBeforeSlash&&(t.spaceBeforeSlash=" "),t.suppressPrettyCount=0,t.user={},t.state=r.None,t},e.prototype.indent=function(e,t,n){var r;return!t.pretty||t.suppressPrettyCount?"":t.pretty&&(r=(n||0)+t.offset+1)>0?new Array(r).join(t.indent):""},e.prototype.endline=function(e,t,n){return!t.pretty||t.suppressPrettyCount?"":t.newline},e.prototype.attribute=function(e,t,n){var r;return this.openAttribute(e,t,n),r=" "+e.name+'="'+e.value+'"',this.closeAttribute(e,t,n),r},e.prototype.cdata=function(e,t,n){var o;return this.openNode(e,t,n),t.state=r.OpenTag,o=this.indent(e,t,n)+"<![CDATA[",t.state=r.InsideTag,o+=e.value,t.state=r.CloseTag,o+="]]>"+this.endline(e,t,n),t.state=r.None,this.closeNode(e,t,n),o},e.prototype.comment=function(e,t,n){var o;return this.openNode(e,t,n),t.state=r.OpenTag,o=this.indent(e,t,n)+"\x3c!-- ",t.state=r.InsideTag,o+=e.value,t.state=r.CloseTag,o+=" --\x3e"+this.endline(e,t,n),t.state=r.None,this.closeNode(e,t,n),o},e.prototype.declaration=function(e,t,n){var o;return this.openNode(e,t,n),t.state=r.OpenTag,o=this.indent(e,t,n)+"<?xml",t.state=r.InsideTag,o+=' version="'+e.version+'"',null!=e.encoding&&(o+=' encoding="'+e.encoding+'"'),null!=e.standalone&&(o+=' standalone="'+e.standalone+'"'),t.state=r.CloseTag,o+=t.spaceBeforeSlash+"?>",o+=this.endline(e,t,n),t.state=r.None,this.closeNode(e,t,n),o},e.prototype.docType=function(e,t,n){var o,i,a,s,u;if(n||(n=0),this.openNode(e,t,n),t.state=r.OpenTag,s=this.indent(e,t,n),s+="<!DOCTYPE "+e.root().name,e.pubID&&e.sysID?s+=' PUBLIC "'+e.pubID+'" "'+e.sysID+'"':e.sysID&&(s+=' SYSTEM "'+e.sysID+'"'),e.children.length>0){for(s+=" [",s+=this.endline(e,t,n),t.state=r.InsideTag,i=0,a=(u=e.children).length;i<a;i++)o=u[i],s+=this.writeChildNode(o,t,n+1);t.state=r.CloseTag,s+="]"}return t.state=r.CloseTag,s+=t.spaceBeforeSlash+">",s+=this.endline(e,t,n),t.state=r.None,this.closeNode(e,t,n),s},e.prototype.element=function(e,t,o){var a,s,u,c,l,f,p,h,d,m,g,v,y,b;for(d in o||(o=0),m=!1,g="",this.openNode(e,t,o),t.state=r.OpenTag,g+=this.indent(e,t,o)+"<"+e.name,v=e.attribs)i.call(v,d)&&(a=v[d],g+=this.attribute(a,t,o));if(c=0===(u=e.children.length)?null:e.children[0],0===u||e.children.every((function(e){return(e.type===n.Text||e.type===n.Raw)&&""===e.value})))t.allowEmpty?(g+=">",t.state=r.CloseTag,g+="</"+e.name+">"+this.endline(e,t,o)):(t.state=r.CloseTag,g+=t.spaceBeforeSlash+"/>"+this.endline(e,t,o));else if(!t.pretty||1!==u||c.type!==n.Text&&c.type!==n.Raw||null==c.value){if(t.dontPrettyTextNodes)for(l=0,p=(y=e.children).length;l<p;l++)if(((s=y[l]).type===n.Text||s.type===n.Raw)&&null!=s.value){t.suppressPrettyCount++,m=!0;break}for(g+=">"+this.endline(e,t,o),t.state=r.InsideTag,f=0,h=(b=e.children).length;f<h;f++)s=b[f],g+=this.writeChildNode(s,t,o+1);t.state=r.CloseTag,g+=this.indent(e,t,o)+"</"+e.name+">",m&&t.suppressPrettyCount--,g+=this.endline(e,t,o),t.state=r.None}else g+=">",t.state=r.InsideTag,t.suppressPrettyCount++,m=!0,g+=this.writeChildNode(c,t,o+1),t.suppressPrettyCount--,m=!1,t.state=r.CloseTag,g+="</"+e.name+">"+this.endline(e,t,o);return this.closeNode(e,t,o),g},e.prototype.writeChildNode=function(e,t,r){switch(e.type){case n.CData:return this.cdata(e,t,r);case n.Comment:return this.comment(e,t,r);case n.Element:return this.element(e,t,r);case n.Raw:return this.raw(e,t,r);case n.Text:return this.text(e,t,r);case n.ProcessingInstruction:return this.processingInstruction(e,t,r);case n.Dummy:return"";case n.Declaration:return this.declaration(e,t,r);case n.DocType:return this.docType(e,t,r);case n.AttributeDeclaration:return this.dtdAttList(e,t,r);case n.ElementDeclaration:return this.dtdElement(e,t,r);case n.EntityDeclaration:return this.dtdEntity(e,t,r);case n.NotationDeclaration:return this.dtdNotation(e,t,r);default:throw new Error("Unknown XML node type: "+e.constructor.name)}},e.prototype.processingInstruction=function(e,t,n){var o;return this.openNode(e,t,n),t.state=r.OpenTag,o=this.indent(e,t,n)+"<?",t.state=r.InsideTag,o+=e.target,e.value&&(o+=" "+e.value),t.state=r.CloseTag,o+=t.spaceBeforeSlash+"?>",o+=this.endline(e,t,n),t.state=r.None,this.closeNode(e,t,n),o},e.prototype.raw=function(e,t,n){var o;return this.openNode(e,t,n),t.state=r.OpenTag,o=this.indent(e,t,n),t.state=r.InsideTag,o+=e.value,t.state=r.CloseTag,o+=this.endline(e,t,n),t.state=r.None,this.closeNode(e,t,n),o},e.prototype.text=function(e,t,n){var o;return this.openNode(e,t,n),t.state=r.OpenTag,o=this.indent(e,t,n),t.state=r.InsideTag,o+=e.value,t.state=r.CloseTag,o+=this.endline(e,t,n),t.state=r.None,this.closeNode(e,t,n),o},e.prototype.dtdAttList=function(e,t,n){var o;return this.openNode(e,t,n),t.state=r.OpenTag,o=this.indent(e,t,n)+"<!ATTLIST",t.state=r.InsideTag,o+=" "+e.elementName+" "+e.attributeName+" "+e.attributeType,"#DEFAULT"!==e.defaultValueType&&(o+=" "+e.defaultValueType),e.defaultValue&&(o+=' "'+e.defaultValue+'"'),t.state=r.CloseTag,o+=t.spaceBeforeSlash+">"+this.endline(e,t,n),t.state=r.None,this.closeNode(e,t,n),o},e.prototype.dtdElement=function(e,t,n){var o;return this.openNode(e,t,n),t.state=r.OpenTag,o=this.indent(e,t,n)+"<!ELEMENT",t.state=r.InsideTag,o+=" "+e.name+" "+e.value,t.state=r.CloseTag,o+=t.spaceBeforeSlash+">"+this.endline(e,t,n),t.state=r.None,this.closeNode(e,t,n),o},e.prototype.dtdEntity=function(e,t,n){var o;return this.openNode(e,t,n),t.state=r.OpenTag,o=this.indent(e,t,n)+"<!ENTITY",t.state=r.InsideTag,e.pe&&(o+=" %"),o+=" "+e.name,e.value?o+=' "'+e.value+'"':(e.pubID&&e.sysID?o+=' PUBLIC "'+e.pubID+'" "'+e.sysID+'"':e.sysID&&(o+=' SYSTEM "'+e.sysID+'"'),e.nData&&(o+=" NDATA "+e.nData)),t.state=r.CloseTag,o+=t.spaceBeforeSlash+">"+this.endline(e,t,n),t.state=r.None,this.closeNode(e,t,n),o},e.prototype.dtdNotation=function(e,t,n){var o;return this.openNode(e,t,n),t.state=r.OpenTag,o=this.indent(e,t,n)+"<!NOTATION",t.state=r.InsideTag,o+=" "+e.name,e.pubID&&e.sysID?o+=' PUBLIC "'+e.pubID+'" "'+e.sysID+'"':e.pubID?o+=' PUBLIC "'+e.pubID+'"':e.sysID&&(o+=' SYSTEM "'+e.sysID+'"'),t.state=r.CloseTag,o+=t.spaceBeforeSlash+">"+this.endline(e,t,n),t.state=r.None,this.closeNode(e,t,n),o},e.prototype.openNode=function(e,t,n){},e.prototype.closeNode=function(e,t,n){},e.prototype.openAttribute=function(e,t,n){},e.prototype.closeAttribute=function(e,t,n){},e}()}).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(e,t,n){(function(){var n,r,o,i,a,s,u,c,l,f;f=e("./Utility"),c=f.assign,l=f.isFunction,o=e("./XMLDOMImplementation"),i=e("./XMLDocument"),a=e("./XMLDocumentCB"),u=e("./XMLStringWriter"),s=e("./XMLStreamWriter"),n=e("./NodeType"),r=e("./WriterState"),t.exports.create=function(e,t,n,r){var o,a;if(null==e)throw new Error("Root element needs a name.");return r=c({},t,n,r),a=(o=new i(r)).element(e),r.headless||(o.declaration(r),null==r.pubID&&null==r.sysID||o.dtd(r)),a},t.exports.begin=function(e,t,n){var r;return l(e)&&(t=(r=[e,t])[0],n=r[1],e={}),t?new a(e,t,n):new i(e)},t.exports.stringWriter=function(e){return new u(e)},t.exports.streamWriter=function(e,t){return new s(e,t)},t.exports.implementation=new o,t.exports.nodeType=n,t.exports.writerState=r}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLDOMImplementation":437,"./XMLDocument":445,"./XMLDocumentCB":446,"./XMLStreamWriter":454,"./XMLStringWriter":455}],460:[function(e,t,n){t.exports=o;var r=Object.prototype.hasOwnProperty;function o(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var o in n)r.call(n,o)&&(e[o]=n[o])}return e}},{}],461:[function(e,t,n){"use strict";e("core-js/modules/es.array.fill.js"),e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.regexp.to-string.js"),e("core-js/modules/es.array.join.js"),e("core-js/modules/es.array.slice.js");var r=e("buffer").Buffer,o={sha1:e("./sha"),md5:e("./md5")},i=64,a=r.alloc(i);function s(e,t,n){r.isBuffer(t)||(t=r.from(t)),r.isBuffer(n)||(n=r.from(n)),t.length>i?t=e(t):t.length<i&&(t=r.concat([t,a],i));for(var o=r.alloc(i),s=r.alloc(i),u=0;u<i;u++)o[u]=54^t[u],s[u]=92^t[u];var c=e(r.concat([o,n]));return e(r.concat([s,c]))}function u(e,t){var n=o[e=e||"sha1"],i=[];return n||c("algorithm:",e,"is not yet supported"),{update:function(e){return r.isBuffer(e)||(e=r.from(e)),i.push(e),e.length,this},digest:function(e){var o=r.concat(i),a=t?s(n,t,o):n(o);return i=null,e?a.toString(e):a}}}function c(){var e=[].slice.call(arguments).join(" ");throw new Error([e,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}a.fill(0),n.createHash=function(e){return u(e)},n.createHmac=function(e,t){return u(e,t)},n.createCredentials=function(){c("sorry,createCredentials is not implemented yet")},n.createCipher=function(){c("sorry,createCipher is not implemented yet")},n.createCipheriv=function(){c("sorry,createCipheriv is not implemented yet")},n.createDecipher=function(){c("sorry,createDecipher is not implemented yet")},n.createDecipheriv=function(){c("sorry,createDecipheriv is not implemented yet")},n.createSign=function(){c("sorry,createSign is not implemented yet")},n.createVerify=function(){c("sorry,createVerify is not implemented yet")},n.createDiffieHellman=function(){c("sorry,createDiffieHellman is not implemented yet")},n.pbkdf2=function(){c("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(e,t,n){"use strict";e("core-js/modules/es.array.fill.js"),e("core-js/modules/es.array.concat.js");var r=e("buffer").Buffer,o=4,i=r.alloc(o);i.fill(0);var a=8;function s(e,t){if(e.length%o!=0){var n=e.length+(o-e.length%o);e=r.concat([e,i],n)}for(var a=[],s=t?e.readInt32BE:e.readInt32LE,u=0;u<e.length;u+=o)a.push(s.call(e,u));return a}function u(e,t,n){for(var o=r.alloc(t),i=n?o.writeInt32BE:o.writeInt32LE,a=0;a<e.length;a++)i.call(o,e[a],4*a,!0);return o}function c(e,t,n,o){return r.isBuffer(e)||(e=r.from(e)),u(t(s(e,o),e.length*a),n,o)}t.exports={hash:c}},{buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.fill.js":273}],463:[function(e,t,n){"use strict";var r=e("./helpers");function o(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;for(var n=1732584193,r=-271733879,o=-1732584194,i=271733878,f=0;f<e.length;f+=16){var p=n,h=r,d=o,m=i;n=a(n,r,o,i,e[f+0],7,-680876936),i=a(i,n,r,o,e[f+1],12,-389564586),o=a(o,i,n,r,e[f+2],17,606105819),r=a(r,o,i,n,e[f+3],22,-1044525330),n=a(n,r,o,i,e[f+4],7,-176418897),i=a(i,n,r,o,e[f+5],12,1200080426),o=a(o,i,n,r,e[f+6],17,-1473231341),r=a(r,o,i,n,e[f+7],22,-45705983),n=a(n,r,o,i,e[f+8],7,1770035416),i=a(i,n,r,o,e[f+9],12,-1958414417),o=a(o,i,n,r,e[f+10],17,-42063),r=a(r,o,i,n,e[f+11],22,-1990404162),n=a(n,r,o,i,e[f+12],7,1804603682),i=a(i,n,r,o,e[f+13],12,-40341101),o=a(o,i,n,r,e[f+14],17,-1502002290),n=s(n,r=a(r,o,i,n,e[f+15],22,1236535329),o,i,e[f+1],5,-165796510),i=s(i,n,r,o,e[f+6],9,-1069501632),o=s(o,i,n,r,e[f+11],14,643717713),r=s(r,o,i,n,e[f+0],20,-373897302),n=s(n,r,o,i,e[f+5],5,-701558691),i=s(i,n,r,o,e[f+10],9,38016083),o=s(o,i,n,r,e[f+15],14,-660478335),r=s(r,o,i,n,e[f+4],20,-405537848),n=s(n,r,o,i,e[f+9],5,568446438),i=s(i,n,r,o,e[f+14],9,-1019803690),o=s(o,i,n,r,e[f+3],14,-187363961),r=s(r,o,i,n,e[f+8],20,1163531501),n=s(n,r,o,i,e[f+13],5,-1444681467),i=s(i,n,r,o,e[f+2],9,-51403784),o=s(o,i,n,r,e[f+7],14,1735328473),n=u(n,r=s(r,o,i,n,e[f+12],20,-1926607734),o,i,e[f+5],4,-378558),i=u(i,n,r,o,e[f+8],11,-2022574463),o=u(o,i,n,r,e[f+11],16,1839030562),r=u(r,o,i,n,e[f+14],23,-35309556),n=u(n,r,o,i,e[f+1],4,-1530992060),i=u(i,n,r,o,e[f+4],11,1272893353),o=u(o,i,n,r,e[f+7],16,-155497632),r=u(r,o,i,n,e[f+10],23,-1094730640),n=u(n,r,o,i,e[f+13],4,681279174),i=u(i,n,r,o,e[f+0],11,-358537222),o=u(o,i,n,r,e[f+3],16,-722521979),r=u(r,o,i,n,e[f+6],23,76029189),n=u(n,r,o,i,e[f+9],4,-640364487),i=u(i,n,r,o,e[f+12],11,-421815835),o=u(o,i,n,r,e[f+15],16,530742520),n=c(n,r=u(r,o,i,n,e[f+2],23,-995338651),o,i,e[f+0],6,-198630844),i=c(i,n,r,o,e[f+7],10,1126891415),o=c(o,i,n,r,e[f+14],15,-1416354905),r=c(r,o,i,n,e[f+5],21,-57434055),n=c(n,r,o,i,e[f+12],6,1700485571),i=c(i,n,r,o,e[f+3],10,-1894986606),o=c(o,i,n,r,e[f+10],15,-1051523),r=c(r,o,i,n,e[f+1],21,-2054922799),n=c(n,r,o,i,e[f+8],6,1873313359),i=c(i,n,r,o,e[f+15],10,-30611744),o=c(o,i,n,r,e[f+6],15,-1560198380),r=c(r,o,i,n,e[f+13],21,1309151649),n=c(n,r,o,i,e[f+4],6,-145523070),i=c(i,n,r,o,e[f+11],10,-1120210379),o=c(o,i,n,r,e[f+2],15,718787259),r=c(r,o,i,n,e[f+9],21,-343485551),n=l(n,p),r=l(r,h),o=l(o,d),i=l(i,m)}return Array(n,r,o,i)}function i(e,t,n,r,o,i){return l(f(l(l(t,e),l(r,i)),o),n)}function a(e,t,n,r,o,a,s){return i(t&n|~t&r,e,t,o,a,s)}function s(e,t,n,r,o,a,s){return i(t&r|n&~r,e,t,o,a,s)}function u(e,t,n,r,o,a,s){return i(t^n^r,e,t,o,a,s)}function c(e,t,n,r,o,a,s){return i(n^(t|~r),e,t,o,a,s)}function l(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function f(e,t){return e<<t|e>>>32-t}t.exports=function(e){return r.hash(e,o,16)}},{"./helpers":462}],464:[function(e,t,n){"use strict";var r=e("./helpers");function o(e,t){e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var n=Array(80),r=1732584193,o=-271733879,c=-1732584194,l=271733878,f=-1009589776,p=0;p<e.length;p+=16){for(var h=r,d=o,m=c,g=l,v=f,y=0;y<80;y++){n[y]=y<16?e[p+y]:u(n[y-3]^n[y-8]^n[y-14]^n[y-16],1);var b=s(s(u(r,5),i(y,o,c,l)),s(s(f,n[y]),a(y)));f=l,l=c,c=u(o,30),o=r,r=b}r=s(r,h),o=s(o,d),c=s(c,m),l=s(l,g),f=s(f,v)}return Array(r,o,c,l,f)}function i(e,t,n,r){return e<20?t&n|~t&r:e<40?t^n^r:e<60?t&n|t&r|n&r:t^n^r}function a(e){return e<20?1518500249:e<40?1859775393:e<60?-1894007588:-899497514}function s(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function u(e,t){return e<<t|e>>>32-t}t.exports=function(e){return r.hash(e,o,20,!0)}},{"./helpers":462}],465:[function(e,t,n){"use strict";t.exports=function(){return function(){}}},{}],466:[function(e,t,n){(function(n){(function(){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault")(e("@babel/runtime/helpers/typeof")),o=e("stream").Stream,i=e("../lib/common/utils/isArray").isArray;function a(e){return e instanceof o}t.exports.string=function(e){return"string"==typeof e},t.exports.array=i,t.exports.buffer=n.isBuffer,t.exports.writableStream=function(e){return a(e)&&"function"==typeof e._write&&"object"===(0,r.default)(e._writableState)}}).call(this)}).call(this,{isBuffer:e("../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(e,t,n){"use strict";var r=e("immediate"),o=t.exports={};function i(){}o.nextTick=r,o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=i,o.addListener=i,o.once=i,o.off=i,o.removeListener=i,o.removeAllListeners=i,o.emit=i,o.prependListener=i,o.prependOnceListener=i,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{immediate:358}],468:[function(e,n,r){(function(t){(function(){"use strict";e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.search.js");var n=e("./lib/request"),o=e("./lib/response"),i=e("xtend"),a=e("builtin-status-codes"),s=e("url"),u=r;u.request=function(e,r){e="string"==typeof e?s.parse(e):i(e);var o=-1===t.location.protocol.search(/^https?:$/)?"http:":"",a=e.protocol||o,u=e.hostname||e.host,c=e.port,l=e.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),e.url=(u?a+"//"+u:"")+(c?":"+c:"")+l,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var f=new n(e);return r&&f.on("response",r),f},u.get=function(e,t){var n=u.request(e,t);return n.end(),n},u.ClientRequest=n,u.IncomingMessage=o.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=a,u.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,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?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(e,n,r){(function(t){(function(){"use strict";e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.promise.js"),e("core-js/modules/es.array-buffer.constructor.js"),e("core-js/modules/es.array-buffer.slice.js"),e("core-js/modules/es.array.slice.js"),r.fetch=u(t.fetch)&&u(t.ReadableStream),r.writableStream=u(t.WritableStream),r.abortController=u(t.AbortController),r.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),r.blobConstructor=!0}catch(e){}var n;function o(){if(void 0!==n)return n;if(t.XMLHttpRequest){n=new t.XMLHttpRequest;try{n.open("GET",t.XDomainRequest?"/":"https://example.com")}catch(e){n=null}}else n=null;return n}function i(e){var t=o();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}var a=void 0!==t.ArrayBuffer,s=a&&u(t.ArrayBuffer.prototype.slice);function u(e){return"function"==typeof e}r.arraybuffer=r.fetch||a&&i("arraybuffer"),r.msstream=!r.fetch&&s&&i("ms-stream"),r.mozchunkedarraybuffer=!r.fetch&&a&&i("moz-chunked-arraybuffer"),r.overrideMimeType=r.fetch||!!o()&&u(o().overrideMimeType),r.vbArray=u(t.VBArray),n=null}).call(this)}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?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(e,n,r){(function(t,r,o){(function(){"use strict";e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.regexp.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.array.map.js"),e("core-js/modules/es.function.name.js"),e("core-js/modules/es.promise.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.split.js");var i=e("./capability"),a=e("inherits"),s=e("./response"),u=e("readable-stream"),c=e("to-arraybuffer"),l=s.IncomingMessage,f=s.readyStates;function p(e,t){return i.fetch&&t?"fetch":i.mozchunkedarraybuffer?"moz-chunked-arraybuffer":i.msstream?"ms-stream":i.arraybuffer&&e?"arraybuffer":i.vbArray&&e?"text:vbarray":"text"}var h=n.exports=function(e){var t,n=this;u.Writable.call(n),n._opts=e,n._body=[],n._headers={},e.auth&&n.setHeader("Authorization","Basic "+new o(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){n.setHeader(t,e.headers[t])}));var r=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!i.abortController)r=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!i.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}n._mode=p(t,r),n._fetchTimer=null,n.on("finish",(function(){n._onFinish()}))};function d(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}a(h,u.Writable),h.prototype.setHeader=function(e,t){var n=this,r=e.toLowerCase();-1===m.indexOf(r)&&(n._headers[r]={name:e,value:t})},h.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},h.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},h.prototype._onFinish=function(){var e=this;if(!e._destroyed){var n=e._opts,a=e._headers,s=null;"GET"!==n.method&&"HEAD"!==n.method&&(s=i.arraybuffer?c(o.concat(e._body)):i.blobConstructor?new r.Blob(e._body.map((function(e){return c(e)})),{type:(a["content-type"]||{}).value||""}):o.concat(e._body).toString());var u=[];if(Object.keys(a).forEach((function(e){var t=a[e].name,n=a[e].value;Array.isArray(n)?n.forEach((function(e){u.push([t,e])})):u.push([t,n])})),"fetch"===e._mode){var l=null;if(i.abortController){var p=new AbortController;l=p.signal,e._fetchAbortController=p,"requestTimeout"in n&&0!==n.requestTimeout&&(e._fetchTimer=r.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),n.requestTimeout))}r.fetch(e._opts.url,{method:e._opts.method,headers:u,body:s||void 0,mode:"cors",credentials:n.withCredentials?"include":"same-origin",signal:l}).then((function(t){e._fetchResponse=t,e._connect()}),(function(t){r.clearTimeout(e._fetchTimer),e._destroyed||e.emit("error",t)}))}else{var h=e._xhr=new r.XMLHttpRequest;try{h.open(e._opts.method,e._opts.url,!0)}catch(n){return void t.nextTick((function(){e.emit("error",n)}))}"responseType"in h&&(h.responseType=e._mode.split(":")[0]),"withCredentials"in h&&(h.withCredentials=!!n.withCredentials),"text"===e._mode&&"overrideMimeType"in h&&h.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in n&&(h.timeout=n.requestTimeout,h.ontimeout=function(){e.emit("requestTimeout")}),u.forEach((function(e){h.setRequestHeader(e[0],e[1])})),e._response=null,h.onreadystatechange=function(){switch(h.readyState){case f.LOADING:case f.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(h.onprogress=function(){e._onXHRProgress()}),h.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))};try{h.send(s)}catch(n){return void t.nextTick((function(){e.emit("error",n)}))}}}},h.prototype._onXHRProgress=function(){var e=this;d(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress())},h.prototype._connect=function(){var e=this;e._destroyed||(e._response=new l(e._xhr,e._fetchResponse,e._mode,e._fetchTimer),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},h.prototype._write=function(e,t,n){this._body.push(e),n()},h.prototype.abort=h.prototype.destroy=function(){var e=this;e._destroyed=!0,r.clearTimeout(e._fetchTimer),e._response&&(e._response._destroyed=!0),e._xhr?e._xhr.abort():e._fetchAbortController&&e._fetchAbortController.abort()},h.prototype.end=function(e,t,n){var r=this;"function"==typeof e&&(n=e,e=void 0),u.Writable.prototype.end.call(r,e,t,n)},h.prototype.flushHeaders=function(){},h.prototype.setTimeout=function(){},h.prototype.setNoDelay=function(){},h.prototype.setSocketKeepAlive=function(){};var m=["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,e("_process"),void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("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(e,n,r){(function(t,n,o){(function(){"use strict";e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.promise.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.split.js"),e("core-js/modules/es.string.match.js"),e("core-js/modules/es.array.iterator.js"),e("core-js/modules/es.array-buffer.slice.js"),e("core-js/modules/es.typed-array.uint8-array.js"),e("core-js/modules/es.typed-array.copy-within.js"),e("core-js/modules/es.typed-array.every.js"),e("core-js/modules/es.typed-array.fill.js"),e("core-js/modules/es.typed-array.filter.js"),e("core-js/modules/es.typed-array.find.js"),e("core-js/modules/es.typed-array.find-index.js"),e("core-js/modules/es.typed-array.for-each.js"),e("core-js/modules/es.typed-array.includes.js"),e("core-js/modules/es.typed-array.index-of.js"),e("core-js/modules/es.typed-array.iterator.js"),e("core-js/modules/es.typed-array.join.js"),e("core-js/modules/es.typed-array.last-index-of.js"),e("core-js/modules/es.typed-array.map.js"),e("core-js/modules/es.typed-array.reduce.js"),e("core-js/modules/es.typed-array.reduce-right.js"),e("core-js/modules/es.typed-array.reverse.js"),e("core-js/modules/es.typed-array.set.js"),e("core-js/modules/es.typed-array.slice.js"),e("core-js/modules/es.typed-array.some.js"),e("core-js/modules/es.typed-array.sort.js"),e("core-js/modules/es.typed-array.subarray.js"),e("core-js/modules/es.typed-array.to-locale-string.js"),e("core-js/modules/es.typed-array.to-string.js"),e("core-js/modules/es.array.slice.js");var i=e("./capability"),a=e("inherits"),s=e("readable-stream"),u=r.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=r.IncomingMessage=function(e,r,a,u){var c=this;if(s.Readable.call(c),c._mode=a,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",(function(){t.nextTick((function(){c.emit("close")}))})),"fetch"===a){var l=function e(){p.read().then((function(t){if(!c._destroyed){if(t.done)return n.clearTimeout(u),void c.push(null);c.push(new o(t.value)),e()}})).catch((function(e){n.clearTimeout(u),c._destroyed||c.emit("error",e)}))};if(c._fetchResponse=r,c.url=r.url,c.statusCode=r.status,c.statusMessage=r.statusText,r.headers.forEach((function(e,t){c.headers[t.toLowerCase()]=e,c.rawHeaders.push(t,e)})),i.writableStream){var f=new WritableStream({write:function(e){return new Promise((function(t,n){c._destroyed?n():c.push(new o(e))?t():c._resumeFetch=t}))},close:function(){n.clearTimeout(u),c._destroyed||c.push(null)},abort:function(e){c._destroyed||c.emit("error",e)}});try{return void r.body.pipeTo(f).catch((function(e){n.clearTimeout(u),c._destroyed||c.emit("error",e)}))}catch(e){}}var p=r.body.getReader();l()}else if(c._xhr=e,c._pos=0,c.url=e.responseURL,c.statusCode=e.status,c.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var n=t[1].toLowerCase();"set-cookie"===n?(void 0===c.headers[n]&&(c.headers[n]=[]),c.headers[n].push(t[2])):void 0!==c.headers[n]?c.headers[n]+=", "+t[2]:c.headers[n]=t[2],c.rawHeaders.push(t[1],t[2])}})),c._charset="x-user-defined",!i.overrideMimeType){var h=c.rawHeaders["mime-type"];if(h){var d=h.match(/;\s*charset=([^;])(;|$)/);d&&(c._charset=d[1].toLowerCase())}c._charset||(c._charset="utf-8")}};a(c,s.Readable),c.prototype._read=function(){var e=this,t=e._resumeFetch;t&&(e._resumeFetch=null,t())},c.prototype._onXHRProgress=function(){var e=this,t=e._xhr,r=null;switch(e._mode){case"text:vbarray":if(t.readyState!==u.DONE)break;try{r=new n.VBArray(t.responseBody).toArray()}catch(e){}if(null!==r){e.push(new o(r));break}case"text":try{r=t.responseText}catch(t){e._mode="text:vbarray";break}if(r.length>e._pos){var i=r.substr(e._pos);if("x-user-defined"===e._charset){for(var a=new o(i.length),s=0;s<i.length;s++)a[s]=255&i.charCodeAt(s);e.push(a)}else e.push(i,e._charset);e._pos=r.length}break;case"arraybuffer":if(t.readyState!==u.DONE||!t.response)break;r=t.response,e.push(new o(new Uint8Array(r)));break;case"moz-chunked-arraybuffer":if(r=t.response,t.readyState!==u.LOADING||!r)break;e.push(new o(new Uint8Array(r)));break;case"ms-stream":if(r=t.response,t.readyState!==u.LOADING)break;var c=new n.MSStreamReader;c.onprogress=function(){c.result.byteLength>e._pos&&(e.push(new o(new Uint8Array(c.result.slice(e._pos)))),e._pos=c.result.byteLength)},c.onload=function(){e.push(null)},c.readAsArrayBuffer(r)}e._xhr.readyState===u.DONE&&"ms-stream"!==e._mode&&e.push(null)}}).call(this)}).call(this,e("_process"),void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("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(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault")(e("@babel/runtime/helpers/typeof"));e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.search.js"),e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.string.split.js"),e("core-js/modules/es.string.replace.js"),e("core-js/modules/es.array.join.js"),e("core-js/modules/es.string.trim.js"),e("core-js/modules/es.string.match.js"),e("core-js/modules/es.array.slice.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.array.splice.js");var o=e("punycode"),i=e("./util");function a(){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}n.parse=x,n.resolve=E,n.resolveObject=C,n.format=A,n.Url=a;var s=/^([a-z0-9.+-]+:)/i,u=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,l=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),f=["'"].concat(l),p=["%","/","?",";","#"].concat(f),h=["/","?","#"],d=255,m=/^[+a-z0-9A-Z_-]{0,63}$/,g=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},b={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},w=e("querystring");function x(e,t,n){if(e&&i.isObject(e)&&e instanceof a)return e;var r=new a;return r.parse(e,t,n),r}function A(e){return i.isString(e)&&(e=x(e)),e instanceof a?e.format():a.prototype.format.call(e)}function E(e,t){return x(e,!1,!0).resolve(t)}function C(e,t){return e?x(e,!1,!0).resolveObject(t):t}a.prototype.parse=function(e,t,n){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+(0,r.default)(e));var a=e.indexOf("?"),u=-1!==a&&a<e.indexOf("#")?"?":"#",l=e.split(u),x=/\\/g;l[0]=l[0].replace(x,"/");var A=e=l.join(u);if(A=A.trim(),!n&&1===e.split("#").length){var E=c.exec(A);if(E)return this.path=A,this.href=A,this.pathname=E[1],E[2]?(this.search=E[2],this.query=t?w.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var C=s.exec(A);if(C){var k=(C=C[0]).toLowerCase();this.protocol=k,A=A.substr(C.length)}if(n||C||A.match(/^\/\/[^@\/]+@[^@\/]+/)){var I="//"===A.substr(0,2);!I||C&&y[C]||(A=A.substr(2),this.slashes=!0)}if(!y[C]&&(I||C&&!b[C])){for(var S,j,T=-1,R=0;R<h.length;R++)-1!==(O=A.indexOf(h[R]))&&(-1===T||O<T)&&(T=O);for(-1!==(j=-1===T?A.lastIndexOf("@"):A.lastIndexOf("@",T))&&(S=A.slice(0,j),A=A.slice(j+1),this.auth=decodeURIComponent(S)),T=-1,R=0;R<p.length;R++){var O;-1!==(O=A.indexOf(p[R]))&&(-1===T||O<T)&&(T=O)}-1===T&&(T=A.length),this.host=A.slice(0,T),A=A.slice(T),this.parseHost(),this.hostname=this.hostname||"";var D="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!D)for(var B=this.hostname.split("."),_=(R=0,B.length);R<_;R++){var N=B[R];if(N&&!N.match(m)){for(var P="",M=0,F=N.length;M<F;M++)N.charCodeAt(M)>127?P+="x":P+=N[M];if(!P.match(m)){var L=B.slice(0,R),U=B.slice(R+1),W=N.match(g);W&&(L.push(W[1]),U.unshift(W[2])),U.length&&(A="/"+U.join(".")+A),this.hostname=L.join(".");break}}}this.hostname.length>d?this.hostname="":this.hostname=this.hostname.toLowerCase(),D||(this.hostname=o.toASCII(this.hostname));var z=this.port?":"+this.port:"",q=this.hostname||"";this.host=q+z,this.href+=this.host,D&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==A[0]&&(A="/"+A))}if(!v[k])for(R=0,_=f.length;R<_;R++){var Q=f[R];if(-1!==A.indexOf(Q)){var V=encodeURIComponent(Q);V===Q&&(V=escape(Q)),A=A.split(Q).join(V)}}var H=A.indexOf("#");-1!==H&&(this.hash=A.substr(H),A=A.slice(0,H));var G=A.indexOf("?");if(-1!==G?(this.search=A.substr(G),this.query=A.substr(G+1),t&&(this.query=w.parse(this.query)),A=A.slice(0,G)):t&&(this.search="",this.query={}),A&&(this.pathname=A),b[k]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){z=this.pathname||"";var X=this.search||"";this.path=z+X}return this.href=this.format(),this},a.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,a="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(a=w.stringify(this.query));var s=this.search||a&&"?"+a||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||b[t])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),t+o+(n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+r},a.prototype.resolve=function(e){return this.resolveObject(x(e,!1,!0)).format()},a.prototype.resolveObject=function(e){if(i.isString(e)){var t=new a;t.parse(e,!1,!0),e=t}for(var n=new a,r=Object.keys(this),o=0;o<r.length;o++){var s=r[o];n[s]=this[s]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var u=Object.keys(e),c=0;c<u.length;c++){var l=u[c];"protocol"!==l&&(n[l]=e[l])}return b[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!b[e.protocol]){for(var f=Object.keys(e),p=0;p<f.length;p++){var h=f[p];n[h]=e[h]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||y[e.protocol])n.pathname=e.pathname;else{for(var d=(e.pathname||"").split("/");d.length&&!(e.host=d.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==d[0]&&d.unshift(""),d.length<2&&d.unshift(""),n.pathname=d.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var m=n.pathname||"",g=n.search||"";n.path=m+g}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var v=n.pathname&&"/"===n.pathname.charAt(0),w=e.host||e.pathname&&"/"===e.pathname.charAt(0),x=w||v||n.host&&e.pathname,A=x,E=n.pathname&&n.pathname.split("/")||[],C=(d=e.pathname&&e.pathname.split("/")||[],n.protocol&&!b[n.protocol]);if(C&&(n.hostname="",n.port=null,n.host&&(""===E[0]?E[0]=n.host:E.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===d[0]?d[0]=e.host:d.unshift(e.host)),e.host=null),x=x&&(""===d[0]||""===E[0])),w)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,E=d;else if(d.length)E||(E=[]),E.pop(),E=E.concat(d),n.search=e.search,n.query=e.query;else if(!i.isNullOrUndefined(e.search))return C&&(n.hostname=n.host=E.shift(),(T=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=T.shift(),n.host=n.hostname=T.shift())),n.search=e.search,n.query=e.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n;if(!E.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var k=E.slice(-1)[0],I=(n.host||e.host||E.length>1)&&("."===k||".."===k)||""===k,S=0,j=E.length;j>=0;j--)"."===(k=E[j])?E.splice(j,1):".."===k?(E.splice(j,1),S++):S&&(E.splice(j,1),S--);if(!x&&!A)for(;S--;S)E.unshift("..");!x||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),I&&"/"!==E.join("/").substr(-1)&&E.push("");var T,R=""===E[0]||E[0]&&"/"===E[0].charAt(0);return C&&(n.hostname=n.host=R?"":E.length?E.shift():"",(T=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=T.shift(),n.host=n.hostname=T.shift())),(x=x||n.host&&E.length)&&!R&&E.unshift(""),E.length?n.pathname=E.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},a.prototype.parseHost=function(){var e=this.host,t=u.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{"./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(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault")(e("@babel/runtime/helpers/typeof"));t.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"===(0,r.default)(e)&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79}],474:[function(e,t,n){"use strict";e("core-js/modules/es.number.constructor.js"),n.encodeURIComponent=function(e){try{return encodeURIComponent(e)}catch(t){return e}},n.escape=e("escape-html"),n.timestamp=function(e){if(e){var t=e;return"string"==typeof t&&(t=Number(t)),10===String(e).length&&(t*=1e3),new Date(t)}return Math.round(Date.now()/1e3)}},{"core-js/modules/es.number.constructor.js":286,"escape-html":343}],475:[function(e,t,n){(function(t,r){(function(){"use strict";var o=e("@babel/runtime/helpers/interopRequireDefault")(e("@babel/runtime/helpers/typeof"));e("core-js/modules/es.string.trim.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.split.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.promise.js"),e("core-js/modules/es.function.name.js"),e("core-js/modules/es.array.concat.js");var i=e("util"),a=e("url"),s=e("http"),u=e("https"),c=e("debug")("urllib"),l=e("humanize-ms"),f=0,p=Math.pow(2,31)-10,h=/^https?:\/\//i;function d(e,t){return void 0===e?t:e}function m(e){return e?e.split(";")[0].trim().toLowerCase():""}function g(e,t){return function(n,r,o){if(n)return t(n);e({data:r,status:o.statusCode,headers:o.headers,res:o})}}n.TIMEOUTS=[l("300s"),l("300s")];var v=["json","text"];n.request=function(e,t,r){return 2===arguments.length&&"function"==typeof t&&(r=t,t=null),"function"==typeof r?n.requestWithCallback(e,t,r):new Promise((function(r,o){n.requestWithCallback(e,t,g(r,o))}))},n.requestWithCallback=function(e,g,y){if(!e||"string"!=typeof e&&"object"!==(0,o.default)(e)){var b=i.format("expect request url to be a string or a http request options, but got %j",e);throw new Error(b)}2===arguments.length&&"function"==typeof g&&(y=g,g=null),f>=p&&(f=0);var w=++f;(g=g||{}).requestUrls=g.requestUrls||[];var x={requestId:w,url:e,args:g,ctx:g.ctx};g.emitter&&g.emitter.emit("request",x),g.timeout=g.timeout||n.TIMEOUTS,g.maxRedirects=g.maxRedirects||10,g.streaming=g.streaming||g.customResponse;var A,E=Date.now();"string"==typeof e?(h.test(e)||(e="https://"+e),A=a.parse(e)):A=e;var C=(g.type||g.method||A.method||"GET").toUpperCase(),k=A.port||80,I=s,S=d(g.agent,n.agent),j=g.fixJSONCtlChars;"https:"===A.protocol&&(I=u,S=d(g.httpsAgent,n.httpsAgent),A.port||(k=443));var T={host:A.hostname||A.host||"localhost",path:A.path||"/",method:C,port:k,agent:S,headers:g.headers||{},lookup:g.lookup};Array.isArray(g.timeout)?T.requestTimeout=g.timeout[g.timeout.length-1]:void 0!==g.timeout&&(T.requestTimeout=g.timeout);var R=g.auth||A.auth;R&&(T.auth=R);var O=g.content||g.data,D="GET"===C||"HEAD"===C||g.dataAsQueryString;if(!g.content&&O&&"string"!=typeof O&&!r.isBuffer(O))if(D)O=g.nestedQuerystring?qs.stringify(O):querystring.stringify(O);else{var B=T.headers["Content-Type"]||T.headers["content-type"];B||(B="json"===g.contentType?"application/json":"application/x-www-form-urlencoded",T.headers["Content-Type"]=B),O="application/json"===m(B)?JSON.stringify(O):g.nestedQuerystring?qs.stringify(O):querystring.stringify(O)}D&&O&&(T.path+=(A.query?"&":"?")+O,O=null);var _=0;if(O){var N=O.length;r.isBuffer(O)||(N=r.byteLength(O)),_=T.headers["Content-Length"]=N}"json"===g.dataType&&(T.headers.Accept="application/json"),"function"==typeof g.beforeRequest&&g.beforeRequest(T);var P=null,M=null,F=null,L=!1,U=!1,W=0,z=-1,q=!1,Q="",V="",H=null;function G(){P&&(clearTimeout(P),P=null)}function X(){M&&(clearTimeout(M),M=null)}function Z(n,r,o){if(X(),!y)return console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),w,t.pid,T.method,e),void(n&&console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s: %s\nstack: %s",Date(),w,t.pid,n.name,n.message,n.stack));var i=y;y=null;var a={};o&&(z=o.statusCode,a=o.headers);var s=Date.now()-E;H&&(H.contentDownload=s),c("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",s,W,z,T.method,T.host,T.path,U,H);var u={status:z,statusCode:z,headers:a,size:W,aborted:q,rt:s,keepAliveSocket:U,data:r,requestUrls:g.requestUrls,timing:H,remoteAddress:Q,remotePort:V};if(n){var l="";S&&"function"==typeof S.getCurrentStatus&&(l=", agent status: "+JSON.stringify(S.getCurrentStatus())),n.message+=", "+T.method+" "+e+" "+z+" (connected: "+L+", keepalive socket: "+U+l+")\nheaders: "+JSON.stringify(a),n.data=r,n.path=T.path,n.status=z,n.headers=a,n.res=u}i(n,r,g.streaming?o:u),g.emitter&&(x.url=e,x.socket=ee&&ee.connection,x.options=T,x.size=_,g.emitter.emit("response",{requestId:w,error:n,ctx:g.ctx,req:x,res:u}))}function K(t){var r=null;if(g.followRedirect&&statuses.redirect[t.statusCode]){g._followRedirectCount=(g._followRedirectCount||0)+1;var o=t.headers.location;if(o){if(!(g._followRedirectCount>g.maxRedirects)){var i=g.formatRedirectUrl?g.formatRedirectUrl(e,o):a.resolve(e,o);c("Request#%d %s: `redirected` from %s to %s",w,T.path,e,i),X(),g.headers&&g.headers.Host&&h.test(o)&&(g.headers.Host=null);var s=y;return y=null,n.requestWithCallback(i,g,s),{redirect:!0,error:null}}(r=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+e)).name="MaxRedirectError"}else(r=new Error("Got statusCode "+t.statusCode+" but cannot resolve next location from headers")).name="FollowRedirectError"}return{redirect:!1,error:r}}function J(e,t,n){return n(null,t,e.headers["content-encoding"])}g.timing&&(H={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0}),g.gzip&&(T.headers["Accept-Encoding"]||T.headers["accept-encoding"]||(T.headers["Accept-Encoding"]="gzip"));var Y,$,ee,te=g.writeStream;function ne(t){if(H&&(H.waiting=Date.now()-E),c("Request#%d %s `req response` event emit: status %d, headers: %j",w,e,t.statusCode,t.headers),g.streaming){var n=K(t);return n.redirect?void t.resume():n.error?(t.resume(),Z(n.error,null,t)):Z(null,null,t)}if(t.on("close",(function(){c("Request#%d %s: `res close` event emit, total size %d",w,e,W)})),t.on("error",(function(){c("Request#%d %s: `res error` event emit, total size %d",w,e,W)})),t.on("aborted",(function(){q=!0,c("Request#%d %s: `res aborted` event emit, total size %d",w,e,W)})),te){var o=K(t);return o.redirect?void t.resume():o.error?(t.resume(),te.end(),Z(o.error,null,t)):(!1===g.consumeWriteStream?t.on("end",Z.bind(null,null,null,t)):te.on("close",(function(){c("Request#%d %s: writeStream close event emitted",w,e),Z(F||null,null,t)})),t.pipe(te))}var i=[];t.on("data",(function(t){c("Request#%d %s: `res data` event emit, size %d",w,e,t.length),W+=t.length,i.push(t)})),t.on("end",(function(){var n=r.concat(i,W);if(c("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",w,e,W,t._dumped),F)return Z(F,n,t);var o=K(t);if(o.error)return Z(o.error,n,t);o.redirect||J(t,n,(function(r,o,i){if(r)return Z(r,n,t);if(!i&&v.indexOf(g.dataType)>=0){try{o=decodeBodyByCharset(o,t)}catch(e){return c("decodeBodyByCharset error: %s",e),Z(null,o,t)}if("json"===g.dataType)if(0===W)o=null;else{var a=parseJSON(o,j);a.error?r=a.error:o=a.data}}q&&c("Request#%d %s: Remote socket was terminated before `response.end()` was called",w,e),Z(r,o,t)}))}))}function re(){c("Connect timer ticking, timeout: %d",Y),P=setTimeout((function(){P=null,-1===z&&(z=-2);var t="Connect timeout for "+Y+"ms",n="ConnectionTimeoutError";ee.socket||(n="SocketAssignTimeoutError",t+=", working sockets is full"),(F=new Error(t)).name=n,F.requestId=w,c("ConnectTimeout: Request#%d %s %s: %s, connected: %s",w,e,F.name,t,L),ie()}),Y)}function oe(){c("Response timer ticking, timeout: %d",$),M=setTimeout((function(){M=null;var t="Response timeout for "+$+"ms",n="ResponseTimeoutError";(F=new Error(t)).name=n,F.requestId=w,c("ResponseTimeout: Request#%d %s %s: %s, connected: %s",w,e,F.name,t,L),ie()}),$)}c("Request#%d %s %s with headers %j, options.path: %s",w,C,e,T.headers,T.path),g.requestUrls.push(e),Array.isArray(g.timeout)?(Y=l(g.timeout[0]),$=l(g.timeout[1])):Y=$=l(g.timeout),c("ConnectTimeout: %d, ResponseTimeout: %d",Y,$),T.mode=g.mode?g.mode:"";try{ee=I.request(T,ne)}catch(e){return Z(e)}function ie(){c("Request#%d %s abort, connected: %s",w,e,L),ee.socket||(F.noSocket=!0,Z(F)),ee.abort()}return"undefined"==typeof window?re():ee.on("requestTimeout",(function(){-1===z&&(z=-2);var e="ConnectionTimeoutError";(F=new Error("Connect timeout for "+Y+"ms")).name=e,F.requestId=w,ie()})),H&&ee.on("finish",(function(){H.requestSent=Date.now()-E})),ee.once("socket",(function(t){H&&(H.queuing=Date.now()-E);var n=t.readyState;if("opening"===n)return t.once("lookup",(function(t,n,r){c("Request#%d %s lookup: %s, %s, %s",w,e,t,n,r),H&&(H.dnslookup=Date.now()-E),n&&(Q=n)})),void t.once("connect",(function(){H&&(H.connected=Date.now()-E),G(),oe(),c("Request#%d %s new socket connected",w,e),L=!0,Q||(Q=t.remoteAddress),V=t.remotePort}));c("Request#%d %s reuse socket connected, readyState: %s",w,e,n),L=!0,U=!0,Q||(Q=t.remoteAddress),V=t.remotePort,G(),oe()})),ee.on("error",(function(t){"Error"!==t.name&&"TypeError"!==t.name||(t.name=L?"ResponseError":"RequestError"),t.message+=' (req "error")',c("Request#%d %s `req error` event emit, %s: %s",w,e,t.name,t.message),Z(F||t)})),te&&te.once("error",(function(t){t.message+=' (writeStream "error")',F=t,c("Request#%d %s `writeStream error` event emit, %s: %s",w,e,t.name,t.message),ie()})),g.stream?(g.stream.pipe(ee),g.stream.once("error",(function(t){t.message+=' (stream "error")',F=t,c("Request#%d %s `readStream error` event emit, %s: %s",w,e,t.name,t.message),ie()}))):ee.end(O),ee.requestId=w,ee}}).call(this)}).call(this,e("_process"),e("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)},10846:function(e,t,n){"use strict";n.d(t,{Z:function(){return H}});var r=n(59301),o=n(40001),i=n(99267),a=n(92310),s=n.n(a),u=n(54476),c=n(33885),l=n(20068),f=n(75931),p=n(10228),h=["className","prefixCls","style","active","status","iconPrefix","icon","wrapperStyle","stepNumber","disabled","description","title","subTitle","progressDot","stepIcon","tailContent","icons","stepIndex","onStepClick","onClick","render"];function d(e){return"string"==typeof e}var m=function(e){var t,n=e.className,o=e.prefixCls,i=e.style,a=e.active,m=e.status,g=e.iconPrefix,v=e.icon,y=(e.wrapperStyle,e.stepNumber),b=e.disabled,w=e.description,x=e.title,A=e.subTitle,E=e.progressDot,C=e.stepIcon,k=e.tailContent,I=e.icons,S=e.stepIndex,j=e.onStepClick,T=e.onClick,R=e.render,O=(0,f.Z)(e,h),D={};!!j&&!b&&(D.role="button",D.tabIndex=0,D.onClick=function(e){null==T||T(e),j(S)},D.onKeyDown=function(e){var t=e.which;t!==p.Z.ENTER&&t!==p.Z.SPACE||j(S)});var B,_,N,P,M=m||"wait",F=s()("".concat(o,"-item"),"".concat(o,"-item-").concat(M),n,(t={},(0,l.Z)(t,"".concat(o,"-item-custom"),v),(0,l.Z)(t,"".concat(o,"-item-active"),a),(0,l.Z)(t,"".concat(o,"-item-disabled"),!0===b),t)),L=(0,c.Z)({},i),U=r.createElement("div",(0,u.Z)({},O,{className:F,style:L}),r.createElement("div",(0,u.Z)({onClick:T},D,{className:"".concat(o,"-item-container")}),r.createElement("div",{className:"".concat(o,"-item-tail")},k),r.createElement("div",{className:"".concat(o,"-item-icon")},(N=s()("".concat(o,"-icon"),"".concat(g,"icon"),(B={},(0,l.Z)(B,"".concat(g,"icon-").concat(v),v&&d(v)),(0,l.Z)(B,"".concat(g,"icon-check"),!v&&"finish"===m&&(I&&!I.finish||!I)),(0,l.Z)(B,"".concat(g,"icon-cross"),!v&&"error"===m&&(I&&!I.error||!I)),B)),P=r.createElement("span",{className:"".concat(o,"-icon-dot")}),_=E?"function"==typeof E?r.createElement("span",{className:"".concat(o,"-icon")},E(P,{index:y-1,status:m,title:x,description:w})):r.createElement("span",{className:"".concat(o,"-icon")},P):v&&!d(v)?r.createElement("span",{className:"".concat(o,"-icon")},v):I&&I.finish&&"finish"===m?r.createElement("span",{className:"".concat(o,"-icon")},I.finish):I&&I.error&&"error"===m?r.createElement("span",{className:"".concat(o,"-icon")},I.error):v||"finish"===m||"error"===m?r.createElement("span",{className:N}):r.createElement("span",{className:"".concat(o,"-icon")},y),C&&(_=C({index:y-1,status:m,title:x,description:w,node:_})),_)),r.createElement("div",{className:"".concat(o,"-item-content")},r.createElement("div",{className:"".concat(o,"-item-title")},x,A&&r.createElement("div",{title:"string"==typeof A?A:void 0,className:"".concat(o,"-item-subtitle")},A)),w&&r.createElement("div",{className:"".concat(o,"-item-description")},w))));return R&&(U=R(U)||null),U},g=["prefixCls","style","className","children","direction","type","labelPlacement","iconPrefix","status","size","current","progressDot","stepIcon","initial","icons","onChange","itemRender","items"];function v(e){var t,n=e.prefixCls,o=void 0===n?"rc-steps":n,i=e.style,a=void 0===i?{}:i,p=e.className,h=(e.children,e.direction),d=void 0===h?"horizontal":h,v=e.type,y=void 0===v?"default":v,b=e.labelPlacement,w=void 0===b?"horizontal":b,x=e.iconPrefix,A=void 0===x?"rc":x,E=e.status,C=void 0===E?"process":E,k=e.size,I=e.current,S=void 0===I?0:I,j=e.progressDot,T=void 0!==j&&j,R=e.stepIcon,O=e.initial,D=void 0===O?0:O,B=e.icons,_=e.onChange,N=e.itemRender,P=e.items,M=void 0===P?[]:P,F=(0,f.Z)(e,g),L="navigation"===y,U="inline"===y,W=U||T,z=U?"horizontal":d,q=U?void 0:k,Q=W?"vertical":w,V=s()(o,"".concat(o,"-").concat(z),p,(t={},(0,l.Z)(t,"".concat(o,"-").concat(q),q),(0,l.Z)(t,"".concat(o,"-label-").concat(Q),"horizontal"===z),(0,l.Z)(t,"".concat(o,"-dot"),!!W),(0,l.Z)(t,"".concat(o,"-navigation"),L),(0,l.Z)(t,"".concat(o,"-inline"),U),t)),H=function(e){_&&S!==e&&_(e)};return r.createElement("div",(0,u.Z)({className:V,style:a},F),M.filter((function(e){return e})).map((function(e,t){var n=(0,c.Z)({},e),i=D+t;return"error"===C&&t===S-1&&(n.className="".concat(o,"-next-error")),n.status||(n.status=i===S?C:i<S?"finish":"wait"),U&&(n.icon=void 0,n.subTitle=void 0),!n.render&&N&&(n.render=function(e){return N(n,e)}),r.createElement(m,(0,u.Z)({},n,{active:i===S,stepNumber:i+1,stepIndex:i,key:i,prefixCls:o,iconPrefix:A,wrapperStyle:a,progressDot:W,stepIcon:R,icons:B,onStepClick:_&&H}))})))}v.Step=m;var y=v,b=n(48755),w=n(31756),x=n(13783),A=n(60242),E=n(25399),C=n(36237),k=n(63356),I=n(16931),S=n(51636);var j=e=>{const{componentCls:t,customIconTop:n,customIconSize:r,customIconFontSize:o}=e;return{[`${t}-item-custom`]:{[`> ${t}-item-container > ${t}-item-icon`]:{height:"auto",background:"none",border:0,[`> ${t}-icon`]:{top:n,width:r,height:r,fontSize:o,lineHeight:(0,C.unit)(r)}}},[`&:not(${t}-vertical)`]:{[`${t}-item-custom`]:{[`${t}-item-icon`]:{width:"auto",background:"none"}}}}};var T=e=>{const{componentCls:t}=e;return{[`${t}-horizontal`]:{[`${`${t}-item`}-tail`]:{transform:"translateY(-50%)"}}}};var R=e=>{const{componentCls:t,inlineDotSize:n,inlineTitleColor:r,inlineTailColor:o}=e,i=e.calc(e.paddingXS).add(e.lineWidth).equal(),a={[`${t}-item-container ${t}-item-content ${t}-item-title`]:{color:r}};return{[`&${t}-inline`]:{width:"auto",display:"inline-flex",[`${t}-item`]:{flex:"none","&-container":{padding:`${(0,C.unit)(i)} ${(0,C.unit)(e.paddingXXS)} 0`,margin:`0 ${(0,C.unit)(e.calc(e.marginXXS).div(2).equal())}`,borderRadius:e.borderRadiusSM,cursor:"pointer",transition:`background-color ${e.motionDurationMid}`,"&:hover":{background:e.controlItemBgHover},"&[role='button']:hover":{opacity:1}},"&-icon":{width:n,height:n,marginInlineStart:`calc(50% - ${(0,C.unit)(e.calc(n).div(2).equal())})`,[`> ${t}-icon`]:{top:0},[`${t}-icon-dot`]:{borderRadius:e.calc(e.fontSizeSM).div(4).equal(),"&::after":{display:"none"}}},"&-content":{width:"auto",marginTop:e.calc(e.marginXS).sub(e.lineWidth).equal()},"&-title":{color:r,fontSize:e.fontSizeSM,lineHeight:e.lineHeightSM,fontWeight:"normal",marginBottom:e.calc(e.marginXXS).div(2).equal()},"&-description":{display:"none"},"&-tail":{marginInlineStart:0,top:e.calc(n).div(2).add(i).equal(),transform:"translateY(-50%)","&:after":{width:"100%",height:e.lineWidth,borderRadius:0,marginInlineStart:0,background:o}},[`&:first-child ${t}-item-tail`]:{width:"50%",marginInlineStart:"50%"},[`&:last-child ${t}-item-tail`]:{display:"block",width:"50%"},"&-wait":Object.assign({[`${t}-item-icon ${t}-icon ${t}-icon-dot`]:{backgroundColor:e.colorBorderBg,border:`${(0,C.unit)(e.lineWidth)} ${e.lineType} ${o}`}},a),"&-finish":Object.assign({[`${t}-item-tail::after`]:{backgroundColor:o},[`${t}-item-icon ${t}-icon ${t}-icon-dot`]:{backgroundColor:o,border:`${(0,C.unit)(e.lineWidth)} ${e.lineType} ${o}`}},a),"&-error":a,"&-active, &-process":Object.assign({[`${t}-item-icon`]:{width:n,height:n,marginInlineStart:`calc(50% - ${(0,C.unit)(e.calc(n).div(2).equal())})`,top:0}},a),[`&:not(${t}-item-active) > ${t}-item-container[role='button']:hover`]:{[`${t}-item-title`]:{color:r}}}}}};var O=e=>{const{componentCls:t,iconSize:n,lineHeight:r,iconSizeSM:o}=e;return{[`&${t}-label-vertical`]:{[`${t}-item`]:{overflow:"visible","&-tail":{marginInlineStart:e.calc(n).div(2).add(e.controlHeightLG).equal(),padding:`0 ${(0,C.unit)(e.paddingLG)}`},"&-content":{display:"block",width:e.calc(n).div(2).add(e.controlHeightLG).mul(2).equal(),marginTop:e.marginSM,textAlign:"center"},"&-icon":{display:"inline-block",marginInlineStart:e.controlHeightLG},"&-title":{paddingInlineEnd:0,paddingInlineStart:0,"&::after":{display:"none"}},"&-subtitle":{display:"block",marginBottom:e.marginXXS,marginInlineStart:0,lineHeight:r}},[`&${t}-small:not(${t}-dot)`]:{[`${t}-item`]:{"&-icon":{marginInlineStart:e.calc(n).sub(o).div(2).add(e.controlHeightLG).equal()}}}}}};var D=e=>{const{componentCls:t,navContentMaxWidth:n,navArrowColor:r,stepsNavActiveColor:o,motionDurationSlow:i}=e;return{[`&${t}-navigation`]:{paddingTop:e.paddingSM,[`&${t}-small`]:{[`${t}-item`]:{"&-container":{marginInlineStart:e.calc(e.marginSM).mul(-1).equal()}}},[`${t}-item`]:{overflow:"visible",textAlign:"center","&-container":{display:"inline-block",height:"100%",marginInlineStart:e.calc(e.margin).mul(-1).equal(),paddingBottom:e.paddingSM,textAlign:"start",transition:`opacity ${i}`,[`${t}-item-content`]:{maxWidth:n},[`${t}-item-title`]:Object.assign(Object.assign({maxWidth:"100%",paddingInlineEnd:0},k.vS),{"&::after":{display:"none"}})},[`&:not(${t}-item-active)`]:{[`${t}-item-container[role='button']`]:{cursor:"pointer","&:hover":{opacity:.85}}},"&:last-child":{flex:1,"&::after":{display:"none"}},"&::after":{position:"absolute",top:`calc(50% - ${(0,C.unit)(e.calc(e.paddingSM).div(2).equal())})`,insetInlineStart:"100%",display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,borderTop:`${(0,C.unit)(e.lineWidth)} ${e.lineType} ${r}`,borderBottom:"none",borderInlineStart:"none",borderInlineEnd:`${(0,C.unit)(e.lineWidth)} ${e.lineType} ${r}`,transform:"translateY(-50%) translateX(-50%) rotate(45deg)",content:'""'},"&::before":{position:"absolute",bottom:0,insetInlineStart:"50%",display:"inline-block",width:0,height:e.lineWidthBold,backgroundColor:o,transition:`width ${i}, inset-inline-start ${i}`,transitionTimingFunction:"ease-out",content:'""'}},[`${t}-item${t}-item-active::before`]:{insetInlineStart:0,width:"100%"}},[`&${t}-navigation${t}-vertical`]:{[`> ${t}-item`]:{marginInlineEnd:0,"&::before":{display:"none"},[`&${t}-item-active::before`]:{top:0,insetInlineEnd:0,insetInlineStart:"unset",display:"block",width:e.calc(e.lineWidth).mul(3).equal(),height:`calc(100% - ${(0,C.unit)(e.marginLG)})`},"&::after":{position:"relative",insetInlineStart:"50%",display:"block",width:e.calc(e.controlHeight).mul(.25).equal(),height:e.calc(e.controlHeight).mul(.25).equal(),marginBottom:e.marginXS,textAlign:"center",transform:"translateY(-50%) translateX(-50%) rotate(135deg)"},"&:last-child":{"&::after":{display:"none"}},[`> ${t}-item-container > ${t}-item-tail`]:{visibility:"hidden"}}},[`&${t}-navigation${t}-horizontal`]:{[`> ${t}-item > ${t}-item-container > ${t}-item-tail`]:{visibility:"hidden"}}}};var B=e=>{const{antCls:t,componentCls:n,iconSize:r,iconSizeSM:o,processIconColor:i,marginXXS:a,lineWidthBold:s,lineWidth:u,paddingXXS:c}=e,l=e.calc(r).add(e.calc(s).mul(4).equal()).equal(),f=e.calc(o).add(e.calc(e.lineWidth).mul(4).equal()).equal();return{[`&${n}-with-progress`]:{[`${n}-item`]:{paddingTop:c,[`&-process ${n}-item-container ${n}-item-icon ${n}-icon`]:{color:i}},[`&${n}-vertical > ${n}-item `]:{paddingInlineStart:c,[`> ${n}-item-container > ${n}-item-tail`]:{top:a,insetInlineStart:e.calc(r).div(2).sub(u).add(c).equal()}},[`&, &${n}-small`]:{[`&${n}-horizontal ${n}-item:first-child`]:{paddingBottom:c,paddingInlineStart:c}},[`&${n}-small${n}-vertical > ${n}-item > ${n}-item-container > ${n}-item-tail`]:{insetInlineStart:e.calc(o).div(2).sub(u).add(c).equal()},[`&${n}-label-vertical ${n}-item ${n}-item-tail`]:{top:e.calc(r).div(2).add(c).equal()},[`${n}-item-icon`]:{position:"relative",[`${t}-progress`]:{position:"absolute",insetInlineStart:"50%",top:"50%",transform:"translate(-50%, -50%)","&-inner":{width:`${(0,C.unit)(l)} !important`,height:`${(0,C.unit)(l)} !important`}}},[`&${n}-small`]:{[`&${n}-label-vertical ${n}-item ${n}-item-tail`]:{top:e.calc(o).div(2).add(c).equal()},[`${n}-item-icon ${t}-progress-inner`]:{width:`${(0,C.unit)(f)} !important`,height:`${(0,C.unit)(f)} !important`}}}}};var _=e=>{const{componentCls:t,descriptionMaxWidth:n,lineHeight:r,dotCurrentSize:o,dotSize:i,motionDurationSlow:a}=e;return{[`&${t}-dot, &${t}-dot${t}-small`]:{[`${t}-item`]:{"&-title":{lineHeight:r},"&-tail":{top:e.calc(e.dotSize).sub(e.calc(e.lineWidth).mul(3).equal()).div(2).equal(),width:"100%",marginTop:0,marginBottom:0,marginInline:`${(0,C.unit)(e.calc(n).div(2).equal())} 0`,padding:0,"&::after":{width:`calc(100% - ${(0,C.unit)(e.calc(e.marginSM).mul(2).equal())})`,height:e.calc(e.lineWidth).mul(3).equal(),marginInlineStart:e.marginSM}},"&-icon":{width:i,height:i,marginInlineStart:e.calc(e.descriptionMaxWidth).sub(i).div(2).equal(),paddingInlineEnd:0,lineHeight:(0,C.unit)(i),background:"transparent",border:0,[`${t}-icon-dot`]:{position:"relative",float:"left",width:"100%",height:"100%",borderRadius:100,transition:`all ${a}`,"&::after":{position:"absolute",top:e.calc(e.marginSM).mul(-1).equal(),insetInlineStart:e.calc(i).sub(e.calc(e.controlHeightLG).mul(1.5).equal()).div(2).equal(),width:e.calc(e.controlHeightLG).mul(1.5).equal(),height:e.controlHeight,background:"transparent",content:'""'}}},"&-content":{width:n},[`&-process ${t}-item-icon`]:{position:"relative",top:e.calc(i).sub(o).div(2).equal(),width:o,height:o,lineHeight:(0,C.unit)(o),background:"none",marginInlineStart:e.calc(e.descriptionMaxWidth).sub(o).div(2).equal()},[`&-process ${t}-icon`]:{[`&:first-child ${t}-icon-dot`]:{insetInlineStart:0}}}},[`&${t}-vertical${t}-dot`]:{[`${t}-item-icon`]:{marginTop:e.calc(e.controlHeight).sub(i).div(2).equal(),marginInlineStart:0,background:"none"},[`${t}-item-process ${t}-item-icon`]:{marginTop:e.calc(e.controlHeight).sub(o).div(2).equal(),top:0,insetInlineStart:e.calc(i).sub(o).div(2).equal(),marginInlineStart:0},[`${t}-item > ${t}-item-container > ${t}-item-tail`]:{top:e.calc(e.controlHeight).sub(i).div(2).equal(),insetInlineStart:0,margin:0,padding:`${(0,C.unit)(e.calc(i).add(e.paddingXS).equal())} 0 ${(0,C.unit)(e.paddingXS)}`,"&::after":{marginInlineStart:e.calc(i).sub(e.lineWidth).div(2).equal()}},[`&${t}-small`]:{[`${t}-item-icon`]:{marginTop:e.calc(e.controlHeightSM).sub(i).div(2).equal()},[`${t}-item-process ${t}-item-icon`]:{marginTop:e.calc(e.controlHeightSM).sub(o).div(2).equal()},[`${t}-item > ${t}-item-container > ${t}-item-tail`]:{top:e.calc(e.controlHeightSM).sub(i).div(2).equal()}},[`${t}-item:first-child ${t}-icon-dot`]:{insetInlineStart:0},[`${t}-item-content`]:{width:"inherit"}}}};var N=e=>{const{componentCls:t}=e;return{[`&${t}-rtl`]:{direction:"rtl",[`${t}-item`]:{"&-subtitle":{float:"left"}},[`&${t}-navigation`]:{[`${t}-item::after`]:{transform:"rotate(-45deg)"}},[`&${t}-vertical`]:{[`> ${t}-item`]:{"&::after":{transform:"rotate(225deg)"},[`${t}-item-icon`]:{float:"right"}}},[`&${t}-dot`]:{[`${t}-item-icon ${t}-icon-dot, &${t}-small ${t}-item-icon ${t}-icon-dot`]:{float:"right"}}}}};var P=e=>{const{componentCls:t,iconSizeSM:n,fontSizeSM:r,fontSize:o,colorTextDescription:i}=e;return{[`&${t}-small`]:{[`&${t}-horizontal:not(${t}-label-vertical) ${t}-item`]:{paddingInlineStart:e.paddingSM,"&:first-child":{paddingInlineStart:0}},[`${t}-item-icon`]:{width:n,height:n,marginTop:0,marginBottom:0,marginInline:`0 ${(0,C.unit)(e.marginXS)}`,fontSize:r,lineHeight:(0,C.unit)(n),textAlign:"center",borderRadius:n},[`${t}-item-title`]:{paddingInlineEnd:e.paddingSM,fontSize:o,lineHeight:(0,C.unit)(n),"&::after":{top:e.calc(n).div(2).equal()}},[`${t}-item-description`]:{color:i,fontSize:o},[`${t}-item-tail`]:{top:e.calc(n).div(2).sub(e.paddingXXS).equal()},[`${t}-item-custom ${t}-item-icon`]:{width:"inherit",height:"inherit",lineHeight:"inherit",background:"none",border:0,borderRadius:0,[`> ${t}-icon`]:{fontSize:n,lineHeight:(0,C.unit)(n),transform:"none"}}}}};var M=e=>{const{componentCls:t,iconSizeSM:n,iconSize:r}=e;return{[`&${t}-vertical`]:{display:"flex",flexDirection:"column",[`> ${t}-item`]:{display:"block",flex:"1 0 auto",paddingInlineStart:0,overflow:"visible",[`${t}-item-icon`]:{float:"left",marginInlineEnd:e.margin},[`${t}-item-content`]:{display:"block",minHeight:e.calc(e.controlHeight).mul(1.5).equal(),overflow:"hidden"},[`${t}-item-title`]:{lineHeight:(0,C.unit)(r)},[`${t}-item-description`]:{paddingBottom:e.paddingSM}},[`> ${t}-item > ${t}-item-container > ${t}-item-tail`]:{position:"absolute",top:0,insetInlineStart:e.calc(r).div(2).sub(e.lineWidth).equal(),width:e.lineWidth,height:"100%",padding:`${(0,C.unit)(e.calc(e.marginXXS).mul(1.5).add(r).equal())} 0 ${(0,C.unit)(e.calc(e.marginXXS).mul(1.5).equal())}`,"&::after":{width:e.lineWidth,height:"100%"}},[`> ${t}-item:not(:last-child) > ${t}-item-container > ${t}-item-tail`]:{display:"block"},[` > ${t}-item > ${t}-item-container > ${t}-item-content > ${t}-item-title`]:{"&::after":{display:"none"}},[`&${t}-small ${t}-item-container`]:{[`${t}-item-tail`]:{position:"absolute",top:0,insetInlineStart:e.calc(n).div(2).sub(e.lineWidth).equal(),padding:`${(0,C.unit)(e.calc(e.marginXXS).mul(1.5).add(n).equal())} 0 ${(0,C.unit)(e.calc(e.marginXXS).mul(1.5).equal())}`},[`${t}-item-title`]:{lineHeight:(0,C.unit)(n)}}}}};const F=(e,t)=>{const n=`${t.componentCls}-item`,r=`${e}IconColor`,o=`${e}TitleColor`,i=`${e}DescriptionColor`,a=`${e}TailColor`,s=`${e}IconBorderColor`,u=`${e}DotColor`;return{[`${n}-${e} ${n}-icon`]:{backgroundColor:t[`${e}IconBgColor`],borderColor:t[s],[`> ${t.componentCls}-icon`]:{color:t[r],[`${t.componentCls}-icon-dot`]:{background:t[u]}}},[`${n}-${e}${n}-custom ${n}-icon`]:{[`> ${t.componentCls}-icon`]:{color:t[u]}},[`${n}-${e} > ${n}-container > ${n}-content > ${n}-title`]:{color:t[o],"&::after":{backgroundColor:t[a]}},[`${n}-${e} > ${n}-container > ${n}-content > ${n}-description`]:{color:t[i]},[`${n}-${e} > ${n}-container > ${n}-tail::after`]:{backgroundColor:t[a]}}},L=e=>{const{componentCls:t,motionDurationSlow:n}=e,r=`${t}-item`,o=`${r}-icon`;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[r]:{position:"relative",display:"inline-block",flex:1,overflow:"hidden",verticalAlign:"top","&:last-child":{flex:"none",[`> ${r}-container > ${r}-tail, > ${r}-container > ${r}-content > ${r}-title::after`]:{display:"none"}}},[`${r}-container`]:{outline:"none","&:focus-visible":{[o]:Object.assign({},(0,k.oN)(e))}},[`${o}, ${r}-content`]:{display:"inline-block",verticalAlign:"top"},[o]:{width:e.iconSize,height:e.iconSize,marginTop:0,marginBottom:0,marginInlineStart:0,marginInlineEnd:e.marginXS,fontSize:e.iconFontSize,fontFamily:e.fontFamily,lineHeight:(0,C.unit)(e.iconSize),textAlign:"center",borderRadius:e.iconSize,border:`${(0,C.unit)(e.lineWidth)} ${e.lineType} transparent`,transition:`background-color ${n}, border-color ${n}`,[`${t}-icon`]:{position:"relative",top:e.iconTop,color:e.colorPrimary,lineHeight:1}},[`${r}-tail`]:{position:"absolute",top:e.calc(e.iconSize).div(2).equal(),insetInlineStart:0,width:"100%","&::after":{display:"inline-block",width:"100%",height:e.lineWidth,background:e.colorSplit,borderRadius:e.lineWidth,transition:`background ${n}`,content:'""'}},[`${r}-title`]:{position:"relative",display:"inline-block",paddingInlineEnd:e.padding,color:e.colorText,fontSize:e.fontSizeLG,lineHeight:(0,C.unit)(e.titleLineHeight),"&::after":{position:"absolute",top:e.calc(e.titleLineHeight).div(2).equal(),insetInlineStart:"100%",display:"block",width:9999,height:e.lineWidth,background:e.processTailColor,content:'""'}},[`${r}-subtitle`]:{display:"inline",marginInlineStart:e.marginXS,color:e.colorTextDescription,fontWeight:"normal",fontSize:e.fontSize},[`${r}-description`]:{color:e.colorTextDescription,fontSize:e.fontSize}},F("wait",e)),F("process",e)),{[`${r}-process > ${r}-container > ${r}-title`]:{fontWeight:e.fontWeightStrong}}),F("finish",e)),F("error",e)),{[`${r}${t}-next-error > ${t}-item-title::after`]:{background:e.colorError},[`${r}-disabled`]:{cursor:"not-allowed"}})},U=e=>{const{componentCls:t,motionDurationSlow:n}=e;return{[`& ${t}-item`]:{[`&:not(${t}-item-active)`]:{[`& > ${t}-item-container[role='button']`]:{cursor:"pointer",[`${t}-item`]:{[`&-title, &-subtitle, &-description, &-icon ${t}-icon`]:{transition:`color ${n}`}},"&:hover":{[`${t}-item`]:{"&-title, &-subtitle, &-description":{color:e.colorPrimary}}}},[`&:not(${t}-item-process)`]:{[`& > ${t}-item-container[role='button']:hover`]:{[`${t}-item`]:{"&-icon":{borderColor:e.colorPrimary,[`${t}-icon`]:{color:e.colorPrimary}}}}}}},[`&${t}-horizontal:not(${t}-label-vertical)`]:{[`${t}-item`]:{paddingInlineStart:e.padding,whiteSpace:"nowrap","&:first-child":{paddingInlineStart:0},[`&:last-child ${t}-item-title`]:{paddingInlineEnd:0},"&-tail":{display:"none"},"&-description":{maxWidth:e.descriptionMaxWidth,whiteSpace:"normal"}}}}},W=e=>{const{componentCls:t}=e;return{[t]: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,k.Wf)(e)),{display:"flex",width:"100%",fontSize:0,textAlign:"initial"}),L(e)),U(e)),j(e)),P(e)),M(e)),T(e)),O(e)),_(e)),D(e)),N(e)),B(e)),R(e))}};var z=(0,I.I$)("Steps",(e=>{const{colorTextDisabled:t,controlHeightLG:n,colorTextLightSolid:r,colorText:o,colorPrimary:i,colorTextDescription:a,colorTextQuaternary:s,colorError:u,colorBorderSecondary:c,colorSplit:l}=e,f=(0,S.mergeToken)(e,{processIconColor:r,processTitleColor:o,processDescriptionColor:o,processIconBgColor:i,processIconBorderColor:i,processDotColor:i,processTailColor:l,waitTitleColor:a,waitDescriptionColor:a,waitTailColor:l,waitDotColor:t,finishIconColor:i,finishTitleColor:o,finishDescriptionColor:a,finishTailColor:i,finishDotColor:i,errorIconColor:r,errorTitleColor:u,errorDescriptionColor:u,errorTailColor:l,errorIconBgColor:u,errorIconBorderColor:u,errorDotColor:u,stepsNavActiveColor:i,stepsProgressSize:n,inlineDotSize:6,inlineTitleColor:s,inlineTailColor:c});return[W(f)]}),(e=>({titleLineHeight:e.controlHeight,customIconSize:e.controlHeight,customIconTop:0,customIconFontSize:e.controlHeightSM,iconSize:e.controlHeight,iconTop:-.5,iconFontSize:e.fontSize,iconSizeSM:e.fontSizeHeading3,dotSize:e.controlHeight/4,dotCurrentSize:e.controlHeightLG/4,navArrowColor:e.colorTextDisabled,navContentMaxWidth:"unset",descriptionMaxWidth:140,waitIconColor:e.wireframe?e.colorTextDisabled:e.colorTextLabel,waitIconBgColor:e.wireframe?e.colorBgContainer:e.colorFillContent,waitIconBorderColor:e.wireframe?e.colorTextDisabled:"transparent",finishIconBgColor:e.wireframe?e.colorBgContainer:e.controlItemBgActive,finishIconBorderColor:e.wireframe?e.colorPrimary:e.controlItemBgActive}))),q=n(11592);var Q=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const V=e=>{const{percent:t,size:n,className:a,rootClassName:u,direction:c,items:l,responsive:f=!0,current:p=0,children:h,style:d}=e,m=Q(e,["percent","size","className","rootClassName","direction","items","responsive","current","children","style"]),{xs:g}=(0,x.Z)(f),{getPrefixCls:v,direction:C,className:k,style:I}=(0,b.dj)("steps"),S=r.useMemo((()=>f&&g?"vertical":c),[g,c]),j=(0,w.Z)(n),T=v("steps",e.prefixCls),[R,O,D]=z(T),B="inline"===e.type,_=v("",e.iconPrefix),N=function(e,t){return e||function(e){return e.filter((e=>e))}((0,q.Z)(t).map((e=>{if(r.isValidElement(e)){const{props:t}=e;return Object.assign({},t)}return null})))}(l,h),P=B?void 0:t,M=Object.assign(Object.assign({},I),d),F=s()(k,{[`${T}-rtl`]:"rtl"===C,[`${T}-with-progress`]:void 0!==P},a,u,O,D),L={finish:r.createElement(o.Z,{className:`${T}-finish-icon`}),error:r.createElement(i.Z,{className:`${T}-error-icon`})};return R(r.createElement(y,Object.assign({icons:L},m,{style:M,current:p,size:j,items:N,itemRender:B?(e,t)=>e.description?r.createElement(E.Z,{title:e.description},t):t:void 0,stepIcon:e=>{let{node:t,status:n}=e;if("process"===n&&void 0!==P){const e="small"===j?32:40;return r.createElement("div",{className:`${T}-progress-icon`},r.createElement(A.Z,{type:"circle",percent:P,size:e,strokeWidth:4,format:()=>null}),t)}return t},direction:S,prefixCls:T,iconPrefix:_,className:F})))};V.Step=y.Step;var H=V},86251:function(e,t){"use strict";t.byteLength=function(e){var t=u(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=u(e),a=i[0],s=i[1],c=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),l=0,f=s>0?a-4:a;for(n=0;n<f;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;2===s&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,c[l++]=255&t);1===s&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t);return c},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=16383,s=0,u=r-o;s<u;s+=a)i.push(c(e,s,s+a>u?u:s+a));1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=i.length;a<s;++a)n[a]=i[a],r[i.charCodeAt(a)]=a;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,r){for(var o,i,a=[],s=t;s<r;s+=3)o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},19208:function(e,t,n){"use strict";var r=n(86251),o=n(67467),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.lW=u,t.h2=50;var a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return c(e,t,n)}function c(e,t,n){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|m(e,t),r=s(n),o=r.write(e,t);o!==n&&(r=r.slice(0,o));return r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(W(e,Uint8Array)){var t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return p(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(W(e,ArrayBuffer)||e&&W(e.buffer,ArrayBuffer))return h(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(W(e,SharedArrayBuffer)||e&&W(e.buffer,SharedArrayBuffer)))return h(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return u.from(r,t,n);var o=function(e){if(u.isBuffer(e)){var t=0|d(e.length),n=s(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!=typeof e.length||z(e.length)?s(0):p(e);if("Buffer"===e.type&&Array.isArray(e.data))return p(e.data)}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return l(e),s(e<0?0:0|d(e))}function p(e){for(var t=e.length<0?0:0|d(e.length),n=s(t),r=0;r<t;r+=1)n[r]=255&e[r];return n}function h(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');var r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,u.prototype),r}function d(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function m(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||W(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return L(e).length;default:if(o)return r?-1:F(e).length;t=(""+t).toLowerCase(),o=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,n);case"utf8":case"utf-8":return I(this,t,n);case"ascii":return j(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return k(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function v(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),z(n=+n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,o){var i,a=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var l=-1;for(i=n;i<s;i++)if(c(e,i)===c(t,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===u)return l*a}else-1!==l&&(i-=i-l),l=-1}else for(n+u>s&&(n=s-u),i=n;i>=0;i--){for(var f=!0,p=0;p<u;p++)if(c(e,i+p)!==c(t,p)){f=!1;break}if(f)return i}return-1}function w(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=t.length;r>i/2&&(r=i/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(z(s))return a;e[n+a]=s}return a}function x(e,t,n,r){return U(F(t,e.length-n),e,n,r)}function A(e,t,n,r){return U(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function E(e,t,n,r){return U(L(t),e,n,r)}function C(e,t,n,r){return U(function(e,t){for(var n,r,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)r=(n=e.charCodeAt(a))>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function k(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function I(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var i,a,s,u,c=e[o],l=null,f=c>239?4:c>223?3:c>191?2:1;if(o+f<=n)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(i=e[o+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(u=(15&c)<<12|(63&i)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}return function(e){var t=e.length;if(t<=S)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=S));return n}(r)}u.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||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."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,n){return c(e,t,n)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,n){return function(e,t,n){return l(e),e<=0?s(e):void 0!==t?"string"==typeof n?s(e).fill(t,n):s(e).fill(t):s(e)}(e,t,n)},u.allocUnsafe=function(e){return f(e)},u.allocUnsafeSlow=function(e){return f(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(W(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),W(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},u.isEncoding=function(e){switch(String(e).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}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=u.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var i=e[n];if(W(i,Uint8Array))o+i.length>r.length?u.from(i).copy(r,o):Uint8Array.prototype.set.call(r,i,o);else{if(!u.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(r,o)}o+=i.length}return r},u.byteLength=m,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)v(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},u.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?I(this,0,e):g.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",n=t.h2;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},i&&(u.prototype[i]=u.prototype.inspect),u.prototype.compare=function(e,t,n,r,o){if(W(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(i,a),c=this.slice(r,o),l=e.slice(t,n),f=0;f<s;++f)if(c[f]!==l[f]){i=c[f],a=l[f];break}return i<a?-1:a<i?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},u.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return w(this,e,t,n);case"utf8":case"utf-8":return x(this,e,t,n);case"ascii":case"latin1":case"binary":return A(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var S=4096;function j(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function T(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function R(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=t;i<n;++i)o+=q[e[i]];return o}function O(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length-1;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function D(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function B(e,t,n,r,o,i){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function _(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(e,t,n,r,i){return t=+t,n>>>=0,i||_(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function P(e,t,n,r,i){return t=+t,n>>>=0,i||_(e,0,n,8),o.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var r=this.subarray(e,t);return Object.setPrototypeOf(r,u.prototype),r},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||D(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||D(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||D(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||D(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},u.prototype.readInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||D(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){e>>>=0,t||D(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return e>>>=0,t||D(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||D(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||D(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||D(e,8,this.length),o.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||B(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||B(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var o=Math.pow(2,8*n-1);B(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i<n&&(a*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var o=Math.pow(2,8*n-1);B(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeFloatLE=function(e,t,n){return N(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return N(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return P(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return P(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var o=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),o},u.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){var o=e.charCodeAt(0);("utf8"===r&&o<128||"latin1"===r)&&(e=o)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{var a=u.isBuffer(e)?e:u.from(e,r),s=a.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<n-t;++i)this[i+t]=a[i%s]}return this};var M=/[^+/0-9A-Za-z-_]/g;function F(e,t){var n;t=t||1/0;for(var r=e.length,o=null,i=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function L(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(M,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function U(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function W(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function z(e){return e!=e}var q=function(){for(var e="0123456789abcdef",t=new Array(256),n=0;n<16;++n)for(var r=16*n,o=0;o<16;++o)t[r+o]=e[n]+e[o];return t}()},67467:function(e,t){t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,u=(1<<s)-1,c=u>>1,l=-7,f=n?o-1:0,p=n?-1:1,h=e[t+f];for(f+=p,i=h&(1<<-l)-1,h>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=p,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=p,l-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),i-=c}return(h?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,u,c=8*i-o-1,l=(1<<c)-1,f=l>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,d=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?p/u:p*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[n+h]=255&s,h+=d,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;e[n+h]=255&a,h+=d,a/=256,c-=8);e[n+h-d]|=128*m}},31193:function(e,t,n){var r=n(48955);function o(e){this.mode=r.MODE_8BIT_BYTE,this.data=e}o.prototype={getLength:function(e){return this.data.length},write:function(e){for(var t=0;t<this.data.length;t++)e.put(this.data.charCodeAt(t),8)}},e.exports=o},31144:function(e){function t(){this.buffer=new Array,this.length=0}t.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},78485:function(e){e.exports={L:1,M:0,Q:3,H:2}},13679:function(e,t,n){var r=n(87532);function o(e,t){if(null==e.length)throw new Error(e.length+"/"+t);for(var n=0;n<e.length&&0==e[n];)n++;this.num=new Array(e.length-n+t);for(var r=0;r<e.length-n;r++)this.num[r]=e[r+n]}o.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=new Array(this.getLength()+e.getLength()-1),n=0;n<this.getLength();n++)for(var i=0;i<e.getLength();i++)t[n+i]^=r.gexp(r.glog(this.get(n))+r.glog(e.get(i)));return new o(t,0)},mod:function(e){if(this.getLength()-e.getLength()<0)return this;for(var t=r.glog(this.get(0))-r.glog(e.get(0)),n=new Array(this.getLength()),i=0;i<this.getLength();i++)n[i]=this.get(i);for(i=0;i<e.getLength();i++)n[i]^=r.gexp(r.glog(e.get(i))+t);return new o(n,0).mod(e)}},e.exports=o},86397:function(e,t,n){var r=n(31193),o=n(84590),i=n(31144),a=n(28688),s=n(13679);function u(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var c=u.prototype;c.addData=function(e){var t=new r(e);this.dataList.push(t),this.dataCache=null},c.isDark=function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]},c.getModuleCount=function(){return this.moduleCount},c.make=function(){if(this.typeNumber<1){var e=1;for(e=1;e<40;e++){for(var t=o.getRSBlocks(e,this.errorCorrectLevel),n=new i,r=0,s=0;s<t.length;s++)r+=t[s].dataCount;for(s=0;s<this.dataList.length;s++){var u=this.dataList[s];n.put(u.mode,4),n.put(u.getLength(),a.getLengthInBits(u.mode,e)),u.write(n)}if(n.getLengthInBits()<=8*r)break}this.typeNumber=e}this.makeImpl(!1,this.getBestMaskPattern())},c.makeImpl=function(e,t){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++){this.modules[n]=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++)this.modules[n][r]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=u.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},c.setupPositionProbePattern=function(e,t){for(var n=-1;n<=7;n++)if(!(e+n<=-1||this.moduleCount<=e+n))for(var r=-1;r<=7;r++)t+r<=-1||this.moduleCount<=t+r||(this.modules[e+n][t+r]=0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4)},c.getBestMaskPattern=function(){for(var e=0,t=0,n=0;n<8;n++){this.makeImpl(!0,n);var r=a.getLostPoint(this);(0==n||e>r)&&(e=r,t=n)}return t},c.createMovieClip=function(e,t,n){var r=e.createEmptyMovieClip(t,n);this.make();for(var o=0;o<this.modules.length;o++)for(var i=1*o,a=0;a<this.modules[o].length;a++){var s=1*a;this.modules[o][a]&&(r.beginFill(0,100),r.moveTo(s,i),r.lineTo(s+1,i),r.lineTo(s+1,i+1),r.lineTo(s,i+1),r.endFill())}return r},c.setupTimingPattern=function(){for(var e=8;e<this.moduleCount-8;e++)null==this.modules[e][6]&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)null==this.modules[6][t]&&(this.modules[6][t]=t%2==0)},c.setupPositionAdjustPattern=function(){for(var e=a.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var n=0;n<e.length;n++){var r=e[t],o=e[n];if(null==this.modules[r][o])for(var i=-2;i<=2;i++)for(var s=-2;s<=2;s++)this.modules[r+i][o+s]=-2==i||2==i||-2==s||2==s||0==i&&0==s}},c.setupTypeNumber=function(e){for(var t=a.getBCHTypeNumber(this.typeNumber),n=0;n<18;n++){var r=!e&&1==(t>>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=r}for(n=0;n<18;n++){r=!e&&1==(t>>n&1);this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=r}},c.setupTypeInfo=function(e,t){for(var n=this.errorCorrectLevel<<3|t,r=a.getBCHTypeInfo(n),o=0;o<15;o++){var i=!e&&1==(r>>o&1);o<6?this.modules[o][8]=i:o<8?this.modules[o+1][8]=i:this.modules[this.moduleCount-15+o][8]=i}for(o=0;o<15;o++){i=!e&&1==(r>>o&1);o<8?this.modules[8][this.moduleCount-o-1]=i:o<9?this.modules[8][15-o-1+1]=i:this.modules[8][15-o-1]=i}this.modules[this.moduleCount-8][8]=!e},c.mapData=function(e,t){for(var n=-1,r=this.moduleCount-1,o=7,i=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var u=0;u<2;u++)if(null==this.modules[r][s-u]){var c=!1;i<e.length&&(c=1==(e[i]>>>o&1)),a.getMask(t,r,s-u)&&(c=!c),this.modules[r][s-u]=c,-1==--o&&(i++,o=7)}if((r+=n)<0||this.moduleCount<=r){r-=n,n=-n;break}}},u.PAD0=236,u.PAD1=17,u.createData=function(e,t,n){for(var r=o.getRSBlocks(e,t),s=new i,c=0;c<n.length;c++){var l=n[c];s.put(l.mode,4),s.put(l.getLength(),a.getLengthInBits(l.mode,e)),l.write(s)}var f=0;for(c=0;c<r.length;c++)f+=r[c].dataCount;if(s.getLengthInBits()>8*f)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+8*f+")");for(s.getLengthInBits()+4<=8*f&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;!(s.getLengthInBits()>=8*f||(s.put(u.PAD0,8),s.getLengthInBits()>=8*f));)s.put(u.PAD1,8);return u.createBytes(s,r)},u.createBytes=function(e,t){for(var n=0,r=0,o=0,i=new Array(t.length),u=new Array(t.length),c=0;c<t.length;c++){var l=t[c].dataCount,f=t[c].totalCount-l;r=Math.max(r,l),o=Math.max(o,f),i[c]=new Array(l);for(var p=0;p<i[c].length;p++)i[c][p]=255&e.buffer[p+n];n+=l;var h=a.getErrorCorrectPolynomial(f),d=new s(i[c],h.getLength()-1).mod(h);u[c]=new Array(h.getLength()-1);for(p=0;p<u[c].length;p++){var m=p+d.getLength()-u[c].length;u[c][p]=m>=0?d.get(m):0}}var g=0;for(p=0;p<t.length;p++)g+=t[p].totalCount;var v=new Array(g),y=0;for(p=0;p<r;p++)for(c=0;c<t.length;c++)p<i[c].length&&(v[y++]=i[c][p]);for(p=0;p<o;p++)for(c=0;c<t.length;c++)p<u[c].length&&(v[y++]=u[c][p]);return v},e.exports=u},84590:function(e,t,n){var r=n(78485);function o(e,t){this.totalCount=e,this.dataCount=t}o.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]],o.getRSBlocks=function(e,t){var n=o.getRsBlockTable(e,t);if(null==n)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);for(var r=n.length/3,i=new Array,a=0;a<r;a++)for(var s=n[3*a+0],u=n[3*a+1],c=n[3*a+2],l=0;l<s;l++)i.push(new o(u,c));return i},o.getRsBlockTable=function(e,t){switch(t){case r.L:return o.RS_BLOCK_TABLE[4*(e-1)+0];case r.M:return o.RS_BLOCK_TABLE[4*(e-1)+1];case r.Q:return o.RS_BLOCK_TABLE[4*(e-1)+2];case r.H:return o.RS_BLOCK_TABLE[4*(e-1)+3];default:return}},e.exports=o},87532:function(e){for(var t={glog:function(e){if(e<1)throw new Error("glog("+e+")");return t.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return t.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},n=0;n<8;n++)t.EXP_TABLE[n]=1<<n;for(n=8;n<256;n++)t.EXP_TABLE[n]=t.EXP_TABLE[n-4]^t.EXP_TABLE[n-5]^t.EXP_TABLE[n-6]^t.EXP_TABLE[n-8];for(n=0;n<255;n++)t.LOG_TABLE[t.EXP_TABLE[n]]=n;e.exports=t},48955:function(e){e.exports={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}},28688:function(e,t,n){var r=n(48955),o=n(13679),i=n(87532),a=0,s=1,u=2,c=3,l=4,f=5,p=6,h=7,d={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(e){for(var t=e<<10;d.getBCHDigit(t)-d.getBCHDigit(d.G15)>=0;)t^=d.G15<<d.getBCHDigit(t)-d.getBCHDigit(d.G15);return(e<<10|t)^d.G15_MASK},getBCHTypeNumber:function(e){for(var t=e<<12;d.getBCHDigit(t)-d.getBCHDigit(d.G18)>=0;)t^=d.G18<<d.getBCHDigit(t)-d.getBCHDigit(d.G18);return e<<12|t},getBCHDigit:function(e){for(var t=0;0!=e;)t++,e>>>=1;return t},getPatternPosition:function(e){return d.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,n){switch(e){case a:return(t+n)%2==0;case s:return t%2==0;case u:return n%3==0;case c:return(t+n)%3==0;case l:return(Math.floor(t/2)+Math.floor(n/3))%2==0;case f:return t*n%2+t*n%3==0;case p:return(t*n%2+t*n%3)%2==0;case h:return(t*n%3+(t+n)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new o([1],0),n=0;n<e;n++)t=t.multiply(new o([1,i.gexp(n)],0));return t},getLengthInBits:function(e,t){if(1<=t&&t<10)switch(e){case r.MODE_NUMBER:return 10;case r.MODE_ALPHA_NUM:return 9;case r.MODE_8BIT_BYTE:case r.MODE_KANJI:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case r.MODE_NUMBER:return 12;case r.MODE_ALPHA_NUM:return 11;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 10;default:throw new Error("mode:"+e)}else{if(!(t<41))throw new Error("type:"+t);switch(e){case r.MODE_NUMBER:return 14;case r.MODE_ALPHA_NUM:return 13;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 12;default:throw new Error("mode:"+e)}}},getLostPoint:function(e){for(var t=e.getModuleCount(),n=0,r=0;r<t;r++)for(var o=0;o<t;o++){for(var i=0,a=e.isDark(r,o),s=-1;s<=1;s++)if(!(r+s<0||t<=r+s))for(var u=-1;u<=1;u++)o+u<0||t<=o+u||0==s&&0==u||a==e.isDark(r+s,o+u)&&i++;i>5&&(n+=3+i-5)}for(r=0;r<t-1;r++)for(o=0;o<t-1;o++){var c=0;e.isDark(r,o)&&c++,e.isDark(r+1,o)&&c++,e.isDark(r,o+1)&&c++,e.isDark(r+1,o+1)&&c++,0!=c&&4!=c||(n+=3)}for(r=0;r<t;r++)for(o=0;o<t-6;o++)e.isDark(r,o)&&!e.isDark(r,o+1)&&e.isDark(r,o+2)&&e.isDark(r,o+3)&&e.isDark(r,o+4)&&!e.isDark(r,o+5)&&e.isDark(r,o+6)&&(n+=40);for(o=0;o<t;o++)for(r=0;r<t-6;r++)e.isDark(r,o)&&!e.isDark(r+1,o)&&e.isDark(r+2,o)&&e.isDark(r+3,o)&&e.isDark(r+4,o)&&!e.isDark(r+5,o)&&e.isDark(r+6,o)&&(n+=40);var l=0;for(o=0;o<t;o++)for(r=0;r<t;r++)e.isDark(r,o)&&l++;return n+=10*(Math.abs(100*l/t/t-50)/5)}};e.exports=d},15845:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(this,arguments)}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(n,!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}function f(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?h(e):t}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}function m(e,t){return m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},m(e,t)}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=n(59301),y=(n(12708),n(86397)),b=n(78485);function w(e){for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t+=String.fromCharCode(r):r<2048?(t+=String.fromCharCode(192|r>>6),t+=String.fromCharCode(128|63&r)):r<55296||r>=57344?(t+=String.fromCharCode(224|r>>12),t+=String.fromCharCode(128|r>>6&63),t+=String.fromCharCode(128|63&r)):(n++,r=65536+((1023&r)<<10|1023&e.charCodeAt(n)),t+=String.fromCharCode(240|r>>18),t+=String.fromCharCode(128|r>>12&63),t+=String.fromCharCode(128|r>>6&63),t+=String.fromCharCode(128|63&r))}return t}var x={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000",includeMargin:!1};function A(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[];return e.forEach((function(e,r){var o=null;e.forEach((function(i,a){if(!i&&null!==o)return n.push("M".concat(o+t," ").concat(r+t,"h").concat(a-o,"v1H").concat(o+t,"z")),void(o=null);if(a!==e.length-1)i&&null===o&&(o=a);else{if(!i)return;null===o?n.push("M".concat(a+t,",").concat(r+t," h1v1H").concat(a+t,"z")):n.push("M".concat(o+t,",").concat(r+t," h").concat(a+1-o,"v1H").concat(o+t,"z"))}}))})),n.join("")}function E(e,t){return e.slice().map((function(e,n){return n<t.y||n>=t.y+t.h?e:e.map((function(e,n){return(n<t.x||n>=t.x+t.w)&&e}))}))}function C(e,t){var n=e.imageSettings,r=e.size,o=e.includeMargin;if(null==n)return null;var i=o?4:0,a=t.length+2*i,s=Math.floor(.1*r),u=a/r,c=(n.width||s)*u,l=(n.height||s)*u,f=null==n.x?t.length/2-c/2:n.x*u,p=null==n.y?t.length/2-l/2:n.y*u,h=null;if(n.excavate){var d=Math.floor(f),m=Math.floor(p);h={x:d,y:m,w:Math.ceil(c+f-d),h:Math.ceil(l+p-m)}}return{x:f,y:p,h:l,w:c,excavation:h}}var k=function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}return!0}(),I=function(e){function t(){var e,n;u(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return g(h(n=f(this,(e=p(t)).call.apply(e,[this].concat(o)))),"_canvas",void 0),g(h(n),"_image",void 0),g(h(n),"state",{imgLoaded:!1}),g(h(n),"handleImageLoad",(function(){n.setState({imgLoaded:!0})})),n}return d(t,e),l(t,[{key:"componentDidMount",value:function(){this.update()}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var e=this.props,t=e.value,n=e.size,r=e.level,o=e.bgColor,i=e.fgColor,a=e.includeMargin,s=e.imageSettings,u=new y(-1,b[r]);if(u.addData(w(t)),u.make(),null!=this._canvas){var c=this._canvas,l=c.getContext("2d");if(!l)return;var f=u.modules;if(null===f)return;var p=a?4:0,h=f.length+2*p,d=C(this.props,f);null!=s&&null!=d&&null!=d.excavation&&(f=E(f,d.excavation));var m=window.devicePixelRatio||1;c.height=c.width=n*m;var g=n/h*m;l.scale(g,g),l.fillStyle=o,l.fillRect(0,0,h,h),l.fillStyle=i,k?l.fill(new Path2D(A(f,p))):f.forEach((function(e,t){e.forEach((function(e,n){e&&l.fillRect(n+p,t+p,1,1)}))})),this.state.imgLoaded&&this._image&&null!=d&&l.drawImage(this._image,d.x+p,d.y+p,d.w,d.h)}}},{key:"render",value:function(){var e=this,t=this.props,n=(t.value,t.size),r=(t.level,t.bgColor,t.fgColor,t.style),i=(t.includeMargin,t.imageSettings),u=s(t,["value","size","level","bgColor","fgColor","style","includeMargin","imageSettings"]),c=a({height:n,width:n},r),l=null,f=i&&i.src;return null!=i&&null!=f&&(l=v.createElement("img",{src:f,style:{display:"none"},onLoad:this.handleImageLoad,ref:function(t){return e._image=t}})),v.createElement(v.Fragment,null,v.createElement("canvas",o({style:c,height:n,width:n,ref:function(t){return e._canvas=t}},u)),l)}}]),t}(v.PureComponent);g(I,"defaultProps",x);var S=function(e){function t(){return u(this,t),f(this,p(t).apply(this,arguments))}return d(t,e),l(t,[{key:"render",value:function(){var e=this.props,t=e.value,n=e.size,r=e.level,i=e.bgColor,a=e.fgColor,u=e.includeMargin,c=e.imageSettings,l=s(e,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]),f=new y(-1,b[r]);f.addData(w(t)),f.make();var p=f.modules;if(null===p)return null;var h=u?4:0,d=p.length+2*h,m=C(this.props,p),g=null;null!=c&&null!=m&&(null!=m.excavation&&(p=E(p,m.excavation)),g=v.createElement("image",{xlinkHref:c.src,height:m.h,width:m.w,x:m.x+h,y:m.y+h,preserveAspectRatio:"none"}));var x=A(p,h);return v.createElement("svg",o({shapeRendering:"crispEdges",height:n,width:n,viewBox:"0 0 ".concat(d," ").concat(d)},l),v.createElement("path",{fill:i,d:"M0,0 h".concat(d,"v").concat(d,"H0z")}),v.createElement("path",{fill:a,d:x}),g)}}]),t}(v.PureComponent);g(S,"defaultProps",x);var j=function(e){var t=e.renderAs,n=s(e,["renderAs"]),r="svg"===t?S:I;return v.createElement(r,n)};j.defaultProps=a({renderAs:"canvas"},x),e.exports=j},25930:function(e,t,n){"use strict";n.d(t,{Cd:function(){return C}});var r=n(54476),o=n(33885),i=n(75931),a=n(59301),s=n(92310),u=n.n(s),c={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},l=function(){var e=(0,a.useRef)([]),t=(0,a.useRef)(null);return(0,a.useEffect)((function(){var n=Date.now(),r=!1;e.current.forEach((function(e){if(e){r=!0;var o=e.style;o.transitionDuration=".3s, .3s, .3s, .06s",t.current&&n-t.current<100&&(o.transitionDuration="0s, 0s")}})),r&&(t.current=Date.now())})),e.current};var f=n(76190),p=n(42978),h=n(47273),d=0,m=(0,h.Z)();var g=function(e){var t=a.useState(),n=(0,p.Z)(t,2),r=n[0],o=n[1];return a.useEffect((function(){var e;o("rc_progress_".concat((m?(e=d,d+=1):e="TEST_OR_SSR",e)))}),[]),e||r},v=function(e){var t=e.bg,n=e.children;return a.createElement("div",{style:{width:"100%",height:"100%",background:t}},n)};function y(e,t){return Object.keys(e).map((function(n){var r=parseFloat(n),o="".concat(Math.floor(r*t),"%");return"".concat(e[n]," ").concat(o)}))}var b=a.forwardRef((function(e,t){var n=e.prefixCls,r=e.color,o=e.gradientId,i=e.radius,s=e.style,u=e.ptg,c=e.strokeLinecap,l=e.strokeWidth,p=e.size,h=e.gapDegree,d=r&&"object"===(0,f.Z)(r),m=d?"#FFF":void 0,g=p/2,b=a.createElement("circle",{className:"".concat(n,"-circle-path"),r:i,cx:g,cy:g,stroke:m,strokeLinecap:c,strokeWidth:l,opacity:0===u?0:1,style:s,ref:t});if(!d)return b;var w="".concat(o,"-conic"),x=h?"".concat(180+h/2,"deg"):"0deg",A=y(r,(360-h)/360),E=y(r,1),C="conic-gradient(from ".concat(x,", ").concat(A.join(", "),")"),k="linear-gradient(to ".concat(h?"bottom":"top",", ").concat(E.join(", "),")");return a.createElement(a.Fragment,null,a.createElement("mask",{id:w},b),a.createElement("foreignObject",{x:0,y:0,width:p,height:p,mask:"url(#".concat(w,")")},a.createElement(v,{bg:k},a.createElement(v,{bg:C}))))})),w=100,x=function(e,t,n,r,o,i,a,s,u,c){var l=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,f=n/100*360*((360-i)/360),p=0===i?0:{bottom:0,top:180,left:90,right:-90}[a],h=(100-r)/100*t;"round"===u&&100!==r&&(h+=c/2)>=t&&(h=t-.01);var d=50;return{stroke:"string"==typeof s?s:void 0,strokeDasharray:"".concat(t,"px ").concat(e),strokeDashoffset:h+l,transform:"rotate(".concat(o+f+p,"deg)"),transformOrigin:"".concat(d,"px ").concat(d,"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}},A=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function E(e){var t=null!=e?e:[];return Array.isArray(t)?t:[t]}var C=function(e){var t,n,s,p=(0,o.Z)((0,o.Z)({},c),e),h=p.id,d=p.prefixCls,m=p.steps,v=p.strokeWidth,y=p.trailWidth,C=p.gapDegree,k=void 0===C?0:C,I=p.gapPosition,S=p.trailColor,j=p.strokeLinecap,T=p.style,R=p.className,O=p.strokeColor,D=p.percent,B=(0,i.Z)(p,A),_=g(h),N="".concat(_,"-gradient"),P=50-v/2,M=2*Math.PI*P,F=k>0?90+k/2:-90,L=M*((360-k)/360),U="object"===(0,f.Z)(m)?m:{count:m,gap:2},W=U.count,z=U.gap,q=E(D),Q=E(O),V=Q.find((function(e){return e&&"object"===(0,f.Z)(e)})),H=V&&"object"===(0,f.Z)(V)?"butt":j,G=x(M,L,0,100,F,k,I,S,H,v),X=l();return a.createElement("svg",(0,r.Z)({className:u()("".concat(d,"-circle"),R),viewBox:"0 0 ".concat(w," ").concat(w),style:T,id:h,role:"presentation"},B),!W&&a.createElement("circle",{className:"".concat(d,"-circle-trail"),r:P,cx:50,cy:50,stroke:S,strokeLinecap:H,strokeWidth:y||v,style:G}),W?(t=Math.round(W*(q[0]/100)),n=100/W,s=0,new Array(W).fill(null).map((function(e,r){var o=r<=t-1?Q[0]:S,i=o&&"object"===(0,f.Z)(o)?"url(#".concat(N,")"):void 0,u=x(M,L,s,n,F,k,I,o,"butt",v,z);return s+=100*(L-u.strokeDashoffset+z)/L,a.createElement("circle",{key:r,className:"".concat(d,"-circle-path"),r:P,cx:50,cy:50,stroke:i,strokeWidth:v,opacity:1,style:u,ref:function(e){X[r]=e}})}))):function(){var e=0;return q.map((function(t,n){var r=Q[n]||Q[Q.length-1],o=x(M,L,e,t,F,k,I,r,H,v);return e+=t,a.createElement(b,{key:n,color:r,ptg:t,radius:P,prefixCls:d,gradientId:N,style:o,strokeLinecap:H,strokeWidth:v,gapDegree:k,ref:function(e){X[n]=e},size:w})})).reverse()}())}},29301:function(e,t,n){"use strict";n.d(t,{Z:function(){return E}});var r=n(54476),o=n(59301),i=n(11592),a=(n(48736),n(33885)),s=n(76190),u=n(76846),c=n(8654),l=o.createContext(null);var f=n(76374),p=new Map;var h=new f.Z((function(e){e.forEach((function(e){var t,n=e.target;null===(t=p.get(n))||void 0===t||t.forEach((function(e){return e(n)}))}))}));var d=n(67732),m=n(83652),g=n(42403),v=n(158),y=function(e){(0,g.Z)(n,e);var t=(0,v.Z)(n);function n(){return(0,d.Z)(this,n),t.apply(this,arguments)}return(0,m.Z)(n,[{key:"render",value:function(){return this.props.children}}]),n}(o.Component);function b(e,t){var n=e.children,r=e.disabled,i=o.useRef(null),f=o.useRef(null),d=o.useContext(l),m="function"==typeof n,g=m?n(i):n,v=o.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),b=!m&&o.isValidElement(g)&&(0,c.Yr)(g),w=b?(0,c.C4)(g):null,x=(0,c.x1)(w,i),A=function(){var e;return(0,u.ZP)(i.current)||(i.current&&"object"===(0,s.Z)(i.current)?(0,u.ZP)(null===(e=i.current)||void 0===e?void 0:e.nativeElement):null)||(0,u.ZP)(f.current)};o.useImperativeHandle(t,(function(){return A()}));var E=o.useRef(e);E.current=e;var C=o.useCallback((function(e){var t=E.current,n=t.onResize,r=t.data,o=e.getBoundingClientRect(),i=o.width,s=o.height,u=e.offsetWidth,c=e.offsetHeight,l=Math.floor(i),f=Math.floor(s);if(v.current.width!==l||v.current.height!==f||v.current.offsetWidth!==u||v.current.offsetHeight!==c){var p={width:l,height:f,offsetWidth:u,offsetHeight:c};v.current=p;var h=u===Math.round(i)?i:u,m=c===Math.round(s)?s:c,g=(0,a.Z)((0,a.Z)({},p),{},{offsetWidth:h,offsetHeight:m});null==d||d(g,e,r),n&&Promise.resolve().then((function(){n(g,e)}))}}),[]);return o.useEffect((function(){var e,t,n=A();return n&&!r&&(e=n,t=C,p.has(e)||(p.set(e,new Set),h.observe(e)),p.get(e).add(t)),function(){return function(e,t){p.has(e)&&(p.get(e).delete(t),p.get(e).size||(h.unobserve(e),p.delete(e)))}(n,C)}}),[i.current,r]),o.createElement(y,{ref:f},b?o.cloneElement(g,{ref:x}):g)}var w=o.forwardRef(b);function x(e,t){var n=e.children;return("function"==typeof n?[n]:(0,i.Z)(n)).map((function(n,i){var a=(null==n?void 0:n.key)||"".concat("rc-observer-key","-").concat(i);return o.createElement(w,(0,r.Z)({},e,{key:a,ref:0===i?t:void 0}),n)}))}var A=o.forwardRef(x);A.Collection=function(e){var t=e.children,n=e.onBatchResize,r=o.useRef(0),i=o.useRef([]),a=o.useContext(l),s=o.useCallback((function(e,t,o){r.current+=1;var s=r.current;i.current.push({size:e,element:t,data:o}),Promise.resolve().then((function(){s===r.current&&(null==n||n(i.current),i.current=[])})),null==a||a(e,t,o)}),[n,a]);return o.createElement(l.Provider,{value:s},t)};var E=A},29125:function(e,t,n){"use strict";n.d(t,{G:function(){return a},Z:function(){return y}});var r=n(92310),o=n.n(r),i=n(59301);function a(e){var t=e.children,n=e.prefixCls,r=e.id,a=e.overlayInnerStyle,s=e.bodyClassName,u=e.className,c=e.style;return i.createElement("div",{className:o()("".concat(n,"-content"),u),style:c},i.createElement("div",{className:o()("".concat(n,"-inner"),s),id:r,role:"tooltip",style:a},"function"==typeof t?t():t))}var s=n(54476),u=n(33885),c=n(75931),l=n(65030),f={shiftX:64,adjustY:1},p={adjustX:1,shiftY:!0},h=[0,0],d={left:{points:["cr","cl"],overflow:p,offset:[-4,0],targetOffset:h},right:{points:["cl","cr"],overflow:p,offset:[4,0],targetOffset:h},top:{points:["bc","tc"],overflow:f,offset:[0,-4],targetOffset:h},bottom:{points:["tc","bc"],overflow:f,offset:[0,4],targetOffset:h},topLeft:{points:["bl","tl"],overflow:f,offset:[0,-4],targetOffset:h},leftTop:{points:["tr","tl"],overflow:p,offset:[-4,0],targetOffset:h},topRight:{points:["br","tr"],overflow:f,offset:[0,-4],targetOffset:h},rightTop:{points:["tl","tr"],overflow:p,offset:[4,0],targetOffset:h},bottomRight:{points:["tr","br"],overflow:f,offset:[0,4],targetOffset:h},rightBottom:{points:["bl","br"],overflow:p,offset:[4,0],targetOffset:h},bottomLeft:{points:["tl","bl"],overflow:f,offset:[0,4],targetOffset:h},leftBottom:{points:["br","bl"],overflow:p,offset:[-4,0],targetOffset:h}},m=n(80402),g=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],v=function(e,t){var n=e.overlayClassName,r=e.trigger,f=void 0===r?["hover"]:r,p=e.mouseEnterDelay,h=void 0===p?0:p,v=e.mouseLeaveDelay,y=void 0===v?.1:v,b=e.overlayStyle,w=e.prefixCls,x=void 0===w?"rc-tooltip":w,A=e.children,E=e.onVisibleChange,C=e.afterVisibleChange,k=e.transitionName,I=e.animation,S=e.motion,j=e.placement,T=void 0===j?"right":j,R=e.align,O=void 0===R?{}:R,D=e.destroyTooltipOnHide,B=void 0!==D&&D,_=e.defaultVisible,N=e.getTooltipContainer,P=e.overlayInnerStyle,M=(e.arrowContent,e.overlay),F=e.id,L=e.showArrow,U=void 0===L||L,W=e.classNames,z=e.styles,q=(0,c.Z)(e,g),Q=(0,m.Z)(F),V=(0,i.useRef)(null);(0,i.useImperativeHandle)(t,(function(){return V.current}));var H=(0,u.Z)({},q);"visible"in e&&(H.popupVisible=e.visible);var G,X,Z;return i.createElement(l.Z,(0,s.Z)({popupClassName:o()(n,null==W?void 0:W.root),prefixCls:x,popup:function(){return i.createElement(a,{key:"content",prefixCls:x,id:Q,bodyClassName:null==W?void 0:W.body,overlayInnerStyle:(0,u.Z)((0,u.Z)({},P),null==z?void 0:z.body)},M)},action:f,builtinPlacements:d,popupPlacement:T,ref:V,popupAlign:O,getPopupContainer:N,onPopupVisibleChange:E,afterPopupVisibleChange:C,popupTransitionName:k,popupAnimation:I,popupMotion:S,defaultPopupVisible:_,autoDestroy:B,mouseLeaveDelay:y,popupStyle:(0,u.Z)((0,u.Z)({},b),null==z?void 0:z.root),mouseEnterDelay:h,arrow:U},H),(G=i.Children.only(A),X=(null==G?void 0:G.props)||{},Z=(0,u.Z)((0,u.Z)({},X),{},{"aria-describedby":M?Q:null}),i.cloneElement(A,Z)))},y=(0,i.forwardRef)(v)},90472:function(e,t,n){"use strict";n.d(t,{Z:function(){return _}});var r=n(54476),o=n(67732),i=n(83652),a=n(31226),s=n(42403),u=n(158),c=n(20068),l=n(59301),f=n(33885),p=n(75931),h=n(76190),d=n(75044),m=n(3202),g=n(94480),v=n(92310),y=n.n(v),b=n(26112),w=n(48736),x=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=e.type||"",i=o.replace(/\/.*$/,"");return n.some((function(e){var t=e.trim();if(/^\*(\/\*)?$/.test(e))return!0;if("."===t.charAt(0)){var n=r.toLowerCase(),a=t.toLowerCase(),s=[a];return".jpg"!==a&&".jpeg"!==a||(s=[".jpg",".jpeg"]),s.some((function(e){return n.endsWith(e)}))}return/\/\*$/.test(t)?i===t.replace(/\/.*$/,""):o===t||!!/^\w+$/.test(t)&&((0,w.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(t,"'.Skip for check.")),!0)}))}return!0};function A(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(e){return t}}function E(e){var t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(t){t.total>0&&(t.percent=t.loaded/t.total*100),e.onProgress(t)});var n=new FormData;e.data&&Object.keys(e.data).forEach((function(t){var r=e.data[t];Array.isArray(r)?r.forEach((function(e){n.append("".concat(t,"[]"),e)})):n.append(t,r)})),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(t){e.onError(t)},t.onload=function(){return t.status<200||t.status>=300?e.onError(function(e,t){var n="cannot ".concat(e.method," ").concat(e.action," ").concat(t.status,"'"),r=new Error(n);return r.status=t.status,r.method=e.method,r.url=e.action,r}(e,t),A(t)):e.onSuccess(A(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);var r=e.headers||{};return null!==r["X-Requested-With"]&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(r).forEach((function(e){null!==r[e]&&t.setRequestHeader(e,r[e])})),t.send(n),{abort:function(){t.abort()}}}var C=function(){var e=(0,m.Z)((0,d.Z)().mark((function e(t,n){var r,o,i,a,s,u,c,l;return(0,d.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:u=function(){return(u=(0,m.Z)((0,d.Z)().mark((function e(t){return(0,d.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){t.file((function(r){n(r)?(t.fullPath&&!r.webkitRelativePath&&(Object.defineProperties(r,{webkitRelativePath:{writable:!0}}),r.webkitRelativePath=t.fullPath.replace(/^\//,""),Object.defineProperties(r,{webkitRelativePath:{writable:!1}})),e(r)):e(null)}))})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)},s=function(e){return u.apply(this,arguments)},a=function(){return(a=(0,m.Z)((0,d.Z)().mark((function e(t){var n,r,o,i,a;return(0,d.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.createReader(),r=[];case 2:return e.next=5,new Promise((function(e){n.readEntries(e,(function(){return e([])}))}));case 5:if(o=e.sent,i=o.length){e.next=9;break}return e.abrupt("break",12);case 9:for(a=0;a<i;a++)r.push(o[a]);e.next=2;break;case 12:return e.abrupt("return",r);case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)},i=function(e){return a.apply(this,arguments)},r=[],o=[],t.forEach((function(e){return o.push(e.webkitGetAsEntry())})),c=function(){var e=(0,m.Z)((0,d.Z)().mark((function e(t,n){var a,u;return(0,d.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:if(t.path=n||"",!t.isFile){e.next=10;break}return e.next=6,s(t);case 6:(a=e.sent)&&r.push(a),e.next=15;break;case 10:if(!t.isDirectory){e.next=15;break}return e.next=13,i(t);case 13:u=e.sent,o.push.apply(o,(0,g.Z)(u));case 15:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),l=0;case 9:if(!(l<o.length)){e.next=15;break}return e.next=12,c(o[l]);case 12:l++,e.next=9;break;case 15:return e.abrupt("return",r);case 16:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),k=C,I=+new Date,S=0;function j(){return"rc-upload-".concat(I,"-").concat(++S)}var T=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],R=function(e){(0,s.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;(0,o.Z)(this,n);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return e=t.call.apply(t,[this].concat(i)),(0,c.Z)((0,a.Z)(e),"state",{uid:j()}),(0,c.Z)((0,a.Z)(e),"reqs",{}),(0,c.Z)((0,a.Z)(e),"fileInput",void 0),(0,c.Z)((0,a.Z)(e),"_isMounted",void 0),(0,c.Z)((0,a.Z)(e),"onChange",(function(t){var n=e.props,r=n.accept,o=n.directory,i=t.target.files,a=(0,g.Z)(i).filter((function(e){return!o||x(e,r)}));e.uploadFiles(a),e.reset()})),(0,c.Z)((0,a.Z)(e),"onClick",(function(t){var n=e.fileInput;if(n){var r=t.target,o=e.props.onClick;if(r&&"BUTTON"===r.tagName)n.parentNode.focus(),r.blur();n.click(),o&&o(t)}})),(0,c.Z)((0,a.Z)(e),"onKeyDown",(function(t){"Enter"===t.key&&e.onClick(t)})),(0,c.Z)((0,a.Z)(e),"onFileDrop",function(){var t=(0,m.Z)((0,d.Z)().mark((function t(n){var r,o,i;return(0,d.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.props.multiple,n.preventDefault(),"dragover"!==n.type){t.next=4;break}return t.abrupt("return");case 4:if(!e.props.directory){t.next=11;break}return t.next=7,k(Array.prototype.slice.call(n.dataTransfer.items),(function(t){return x(t,e.props.accept)}));case 7:o=t.sent,e.uploadFiles(o),t.next=14;break;case 11:i=(0,g.Z)(n.dataTransfer.files).filter((function(t){return x(t,e.props.accept)})),!1===r&&(i=i.slice(0,1)),e.uploadFiles(i);case 14:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),(0,c.Z)((0,a.Z)(e),"uploadFiles",(function(t){var n=(0,g.Z)(t),r=n.map((function(t){return t.uid=j(),e.processFile(t,n)}));Promise.all(r).then((function(t){var n=e.props.onBatchStart;null==n||n(t.map((function(e){return{file:e.origin,parsedFile:e.parsedFile}}))),t.filter((function(e){return null!==e.parsedFile})).forEach((function(t){e.post(t)}))}))})),(0,c.Z)((0,a.Z)(e),"processFile",function(){var t=(0,m.Z)((0,d.Z)().mark((function t(n,r){var o,i,a,s,u,c,l,f,p;return(0,d.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e.props.beforeUpload,i=n,!o){t.next=14;break}return t.prev=3,t.next=6,o(n,r);case 6:i=t.sent,t.next=12;break;case 9:t.prev=9,t.t0=t.catch(3),i=!1;case 12:if(!1!==i){t.next=14;break}return t.abrupt("return",{origin:n,parsedFile:null,action:null,data:null});case 14:if("function"!=typeof(a=e.props.action)){t.next=21;break}return t.next=18,a(n);case 18:s=t.sent,t.next=22;break;case 21:s=a;case 22:if("function"!=typeof(u=e.props.data)){t.next=29;break}return t.next=26,u(n);case 26:c=t.sent,t.next=30;break;case 29:c=u;case 30:return l="object"!==(0,h.Z)(i)&&"string"!=typeof i||!i?n:i,f=l instanceof File?l:new File([l],n.name,{type:n.type}),(p=f).uid=n.uid,t.abrupt("return",{origin:n,data:c,parsedFile:p,action:s});case 35:case"end":return t.stop()}}),t,null,[[3,9]])})));return function(e,n){return t.apply(this,arguments)}}()),(0,c.Z)((0,a.Z)(e),"saveFileInput",(function(t){e.fileInput=t})),e}return(0,i.Z)(n,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(e){var t=this,n=e.data,r=e.origin,o=e.action,i=e.parsedFile;if(this._isMounted){var a=this.props,s=a.onStart,u=a.customRequest,c=a.name,l=a.headers,f=a.withCredentials,p=a.method,h=r.uid,d=u||E,m={action:o,filename:c,data:n,file:i,headers:l,withCredentials:f,method:p||"post",onProgress:function(e){var n=t.props.onProgress;null==n||n(e,i)},onSuccess:function(e,n){var r=t.props.onSuccess;null==r||r(e,i,n),delete t.reqs[h]},onError:function(e,n){var r=t.props.onError;null==r||r(e,n,i),delete t.reqs[h]}};s(r),this.reqs[h]=d(m)}}},{key:"reset",value:function(){this.setState({uid:j()})}},{key:"abort",value:function(e){var t=this.reqs;if(e){var n=e.uid?e.uid:e;t[n]&&t[n].abort&&t[n].abort(),delete t[n]}else Object.keys(t).forEach((function(e){t[e]&&t[e].abort&&t[e].abort(),delete t[e]}))}},{key:"render",value:function(){var e=this.props,t=e.component,n=e.prefixCls,o=e.className,i=e.classNames,a=void 0===i?{}:i,s=e.disabled,u=e.id,h=e.name,d=e.style,m=e.styles,g=void 0===m?{}:m,v=e.multiple,w=e.accept,x=e.capture,A=e.children,E=e.directory,C=e.openFileDialogOnClick,k=e.onMouseEnter,I=e.onMouseLeave,S=e.hasControlInside,j=(0,p.Z)(e,T),R=y()((0,c.Z)((0,c.Z)((0,c.Z)({},n,!0),"".concat(n,"-disabled"),s),o,o)),O=E?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},D=s?{}:{onClick:C?this.onClick:function(){},onKeyDown:C?this.onKeyDown:function(){},onMouseEnter:k,onMouseLeave:I,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:S?void 0:"0"};return l.createElement(t,(0,r.Z)({},D,{className:R,role:S?void 0:"button",style:d}),l.createElement("input",(0,r.Z)({},(0,b.Z)(j,{aria:!0,data:!0}),{id:u,name:h,disabled:s,type:"file",ref:this.saveFileInput,onClick:function(e){return e.stopPropagation()},key:this.state.uid,style:(0,f.Z)({display:"none"},g.input),className:a.input,accept:w},O,{multiple:v,onChange:this.onChange},null!=x?{capture:x}:{})),A)}}]),n}(l.Component),O=R;function D(){}var B=function(e){(0,s.Z)(n,e);var t=(0,u.Z)(n);function n(){var e;(0,o.Z)(this,n);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return e=t.call.apply(t,[this].concat(i)),(0,c.Z)((0,a.Z)(e),"uploader",void 0),(0,c.Z)((0,a.Z)(e),"saveUploader",(function(t){e.uploader=t})),e}return(0,i.Z)(n,[{key:"abort",value:function(e){this.uploader.abort(e)}},{key:"render",value:function(){return l.createElement(O,(0,r.Z)({},this.props,{ref:this.saveUploader}))}}]),n}(l.Component);(0,c.Z)(B,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:D,onError:D,onSuccess:D,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});var _=B},49658:function(e,t){"use strict";t.Z=function(){if("undefined"==typeof navigator||"undefined"==typeof window)return!1;var e=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(e)||/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(null==e?void 0:e.substr(0,4))}},76374:function(e,t,n){"use strict";var r=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var o=r[n];e.call(t,o[1],o[0])}},t}()}(),o="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,i=void 0!==n.g&&n.g.Math===Math?n.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),a="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(i):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var s=["top","right","bottom","left","width","height","size","weight"],u="undefined"!=typeof MutationObserver,c=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,o=0;function i(){n&&(n=!1,e()),r&&u()}function s(){a(i)}function u(){var e=Date.now();if(n){if(e-o<2)return;r=!0}else n=!0,r=!1,setTimeout(s,t);o=e}return u}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){o&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),u?(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)},e.prototype.disconnect_=function(){o&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;s.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),l=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var o=r[n];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e},f=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||i},p=y(0,0,0,0);function h(e){return parseFloat(e)||0}function d(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+h(e["border-"+n+"-width"])}),0)}function m(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return p;var r=f(e).getComputedStyle(e),o=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var o=r[n],i=e["padding-"+o];t[o]=h(i)}return t}(r),i=o.left+o.right,a=o.top+o.bottom,s=h(r.width),u=h(r.height);if("border-box"===r.boxSizing&&(Math.round(s+i)!==t&&(s-=d(r,"left","right")+i),Math.round(u+a)!==n&&(u-=d(r,"top","bottom")+a)),!function(e){return e===f(e).document.documentElement}(e)){var c=Math.round(s+i)-t,l=Math.round(u+a)-n;1!==Math.abs(c)&&(s-=c),1!==Math.abs(l)&&(u-=l)}return y(o.left,o.top,s,u)}var g="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof f(e).SVGGraphicsElement}:function(e){return e instanceof f(e).SVGElement&&"function"==typeof e.getBBox};function v(e){return o?g(e)?function(e){var t=e.getBBox();return y(0,0,t.width,t.height)}(e):m(e):p}function y(e,t,n,r){return{x:e,y:t,width:n,height:r}}var b=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=y(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=v(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),w=function(e,t){var n,r,o,i,a,s,u,c=(r=(n=t).x,o=n.y,i=n.width,a=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(s.prototype),l(u,{x:r,y:o,width:i,height:a,top:o,right:r+i,bottom:a+o,left:r}),u);l(this,{target:e,contentRect:c})},x=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new r,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof f(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new b(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof f(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new w(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),A="undefined"!=typeof WeakMap?new WeakMap:new r,E=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=c.getInstance(),r=new x(t,n,this);A.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){E.prototype[e]=function(){var t;return(t=A.get(this))[e].apply(t,arguments)}}));var C=void 0!==i.ResizeObserver?i.ResizeObserver:E;t.Z=C},91423:function(){},22591:function(){},24726:function(){},90872:function(){}}]);