Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@twilio/operation-retrier

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@twilio/operation-retrier - npm Package Compare versions

Comparing version 4.0.5-rc.1 to 4.0.5-rc.2

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

### [4.0.5-rc.2](https://github.com/twilio/operation-retrier.ts/compare/@twilio/operation-retrier@4.0.5-rc.1...@twilio/operation-retrier@4.0.5-rc.2) (2021-09-10)
**Note:** Version bump only for package @twilio/operation-retrier
### [4.0.5-rc.1](https://github.com/twilio/operation-retrier.ts/compare/@twilio/operation-retrier@4.0.5-rc.0...@twilio/operation-retrier@4.0.5-rc.1) (2021-09-09)

@@ -8,0 +16,0 @@

2

dist/operation-retrier.min.js

@@ -18,2 +18,2 @@ /*

*/
var Retrier=function(t){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=function(t){return t&&t.Math==Math&&t},r=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||Function("return this")(),o={},i=function(t){try{return!!t()}catch(t){return!0}},u=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),a={},c={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,f=s&&!c.call({1:2},1);a.f=f?function(t){var e=s(this,t);return!!e&&e.enumerable}:c;var l=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},h={}.toString,p=function(t){return h.call(t).slice(8,-1)},m=p,y="".split,v=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},d=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==m(t)?y.call(t,""):Object(t)}:Object,b=v,g=function(t){return d(b(t))},w=function(t){return"object"==typeof t?null!==t:"function"==typeof t},x=w,j=function(t,e){if(!x(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!x(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!x(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!x(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},O=v,E=function(t){return Object(O(t))},D={}.hasOwnProperty,_=Object.hasOwn||function(t,e){return D.call(E(t),e)},k=w,T=r.document,S=k(T)&&k(T.createElement),P=function(t){return S?T.createElement(t):{}},L=P,M=!u&&!i((function(){return 7!=Object.defineProperty(L("div"),"a",{get:function(){return 7}}).a})),A=u,R=a,C=l,N=g,I=j,F=_,B=M,z=Object.getOwnPropertyDescriptor;o.f=A?z:function(t,e){if(t=N(t),e=I(e,!0),B)try{return z(t,e)}catch(t){}if(F(t,e))return C(!R.f.call(t,e),t[e])};var U={},W=w,q=function(t){if(!W(t))throw TypeError(String(t)+" is not an object");return t},K=u,G=M,H=q,V=j,X=Object.defineProperty;U.f=K?X:function(t,e,n){if(H(t),e=V(e,!0),H(n),G)try{return X(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t};var Y=U,J=l,Q=u?function(t,e,n){return Y.f(t,e,J(1,n))}:function(t,e,n){return t[e]=n,t},Z={exports:{}},$=r,tt=Q,et=function(t,e){try{tt($,t,e)}catch(n){$[t]=e}return e},nt=et,rt="__core-js_shared__",ot=r[rt]||nt(rt,{}),it=ot,ut=Function.toString;"function"!=typeof it.inspectSource&&(it.inspectSource=function(t){return ut.call(t)});var at=it.inspectSource,ct=at,st=r.WeakMap,ft="function"==typeof st&&/native code/.test(ct(st)),lt={exports:{}},ht=ot;(lt.exports=function(t,e){return ht[t]||(ht[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.15.2",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var pt,mt,yt,vt=0,dt=Math.random(),bt=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++vt+dt).toString(36)},gt=lt.exports,wt=bt,xt=gt("keys"),jt=function(t){return xt[t]||(xt[t]=wt(t))},Ot={},Et=ft,Dt=w,_t=Q,kt=_,Tt=ot,St=jt,Pt=Ot,Lt="Object already initialized",Mt=r.WeakMap;if(Et||Tt.state){var At=Tt.state||(Tt.state=new Mt),Rt=At.get,Ct=At.has,Nt=At.set;pt=function(t,e){if(Ct.call(At,t))throw new TypeError(Lt);return e.facade=t,Nt.call(At,t,e),e},mt=function(t){return Rt.call(At,t)||{}},yt=function(t){return Ct.call(At,t)}}else{var It=St("state");Pt[It]=!0,pt=function(t,e){if(kt(t,It))throw new TypeError(Lt);return e.facade=t,_t(t,It,e),e},mt=function(t){return kt(t,It)?t[It]:{}},yt=function(t){return kt(t,It)}}var Ft={set:pt,get:mt,has:yt,enforce:function(t){return yt(t)?mt(t):pt(t,{})},getterFor:function(t){return function(e){var n;if(!Dt(e)||(n=mt(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}},Bt=r,zt=Q,Ut=_,Wt=et,qt=at,Kt=Ft.get,Gt=Ft.enforce,Ht=String(String).split("String");(Z.exports=function(t,e,n,r){var o,i=!!r&&!!r.unsafe,u=!!r&&!!r.enumerable,a=!!r&&!!r.noTargetGet;"function"==typeof n&&("string"!=typeof e||Ut(n,"name")||zt(n,"name",e),(o=Gt(n)).source||(o.source=Ht.join("string"==typeof e?e:""))),t!==Bt?(i?!a&&t[e]&&(u=!0):delete t[e],u?t[e]=n:zt(t,e,n)):u?t[e]=n:Wt(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&Kt(this).source||qt(this)}));var Vt=r,Xt=r,Yt=function(t){return"function"==typeof t?t:void 0},Jt=function(t,e){return arguments.length<2?Yt(Vt[t])||Yt(Xt[t]):Vt[t]&&Vt[t][e]||Xt[t]&&Xt[t][e]},Qt={},Zt=Math.ceil,$t=Math.floor,te=function(t){return isNaN(t=+t)?0:(t>0?$t:Zt)(t)},ee=te,ne=Math.min,re=function(t){return t>0?ne(ee(t),9007199254740991):0},oe=te,ie=Math.max,ue=Math.min,ae=g,ce=re,se=function(t,e){var n=oe(t);return n<0?ie(n+e,0):ue(n,e)},fe=function(t){return function(e,n,r){var o,i=ae(e),u=ce(i.length),a=se(r,u);if(t&&n!=n){for(;u>a;)if((o=i[a++])!=o)return!0}else for(;u>a;a++)if((t||a in i)&&i[a]===n)return t||a||0;return!t&&-1}},le={includes:fe(!0),indexOf:fe(!1)},he=_,pe=g,me=le.indexOf,ye=Ot,ve=function(t,e){var n,r=pe(t),o=0,i=[];for(n in r)!he(ye,n)&&he(r,n)&&i.push(n);for(;e.length>o;)he(r,n=e[o++])&&(~me(i,n)||i.push(n));return i},de=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],be=ve,ge=de.concat("length","prototype");Qt.f=Object.getOwnPropertyNames||function(t){return be(t,ge)};var we={};we.f=Object.getOwnPropertySymbols;var xe,je=Qt,Oe=we,Ee=q,De=Jt("Reflect","ownKeys")||function(t){var e=je.f(Ee(t)),n=Oe.f;return n?e.concat(n(t)):e},_e=_,ke=De,Te=o,Se=U,Pe=i,Le=/#|\.prototype\./,Me=function(t,e){var n=Re[Ae(t)];return n==Ne||n!=Ce&&("function"==typeof e?Pe(e):!!e)},Ae=Me.normalize=function(t){return String(t).replace(Le,".").toLowerCase()},Re=Me.data={},Ce=Me.NATIVE="N",Ne=Me.POLYFILL="P",Ie=Me,Fe=r,Be=o.f,ze=Q,Ue=Z.exports,We=et,qe=function(t,e){for(var n=ke(e),r=Se.f,o=Te.f,i=0;i<n.length;i++){var u=n[i];_e(t,u)||r(t,u,o(e,u))}},Ke=Ie,Ge=function(t,e){var n,r,o,i,u,a=t.target,c=t.global,s=t.stat;if(n=c?Fe:s?Fe[a]||We(a,{}):(Fe[a]||{}).prototype)for(r in e){if(i=e[r],o=t.noTargetGet?(u=Be(n,r))&&u.value:n[r],!Ke(c?r:a+(s?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;qe(i,o)}(t.sham||o&&o.sham)&&ze(i,"sham",!0),Ue(n,r,i,t)}},He=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},Ve=ve,Xe=de,Ye=Object.keys||function(t){return Ve(t,Xe)},Je=U,Qe=q,Ze=Ye,$e=u?Object.defineProperties:function(t,e){Qe(t);for(var n,r=Ze(e),o=r.length,i=0;o>i;)Je.f(t,n=r[i++],e[n]);return t},tn=Jt("document","documentElement"),en=q,nn=$e,rn=de,on=Ot,un=tn,an=P,cn=jt("IE_PROTO"),sn=function(){},fn=function(t){return"<script>"+t+"</"+"script>"},ln=function(){try{xe=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;ln=xe?function(t){t.write(fn("")),t.close();var e=t.parentWindow.Object;return t=null,e}(xe):((e=an("iframe")).style.display="none",un.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(fn("document.F=Object")),t.close(),t.F);for(var n=rn.length;n--;)delete ln.prototype[rn[n]];return ln()};on[cn]=!0;var hn=Object.create||function(t,e){var n;return null!==t?(sn.prototype=en(t),n=new sn,sn.prototype=null,n[cn]=t):n=ln(),void 0===e?n:nn(n,e)},pn=He,mn=w,yn=[].slice,vn={},dn=function(t,e,n){if(!(e in vn)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";vn[e]=Function("C,a","return new C("+r.join(",")+")")}return vn[e](t,n)},bn=Function.bind||function(t){var e=pn(this),n=yn.call(arguments,1),r=function(){var o=n.concat(yn.call(arguments));return this instanceof r?dn(e,o.length,o):e.apply(t,o)};return mn(e.prototype)&&(r.prototype=e.prototype),r},gn=Ge,wn=He,xn=q,jn=w,On=hn,En=bn,Dn=i,_n=Jt("Reflect","construct"),kn=Dn((function(){function t(){}return!(_n((function(){}),[],t)instanceof t)})),Tn=!Dn((function(){_n((function(){}))})),Sn=kn||Tn;function Pn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ln(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Mn(t,e,n){return e&&Ln(t.prototype,e),n&&Ln(t,n),t}function An(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Rn(t,e){return(Rn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Cn(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Rn(t,e)}function Nn(t){return(Nn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function In(t,e){return!e||"object"!==Nn(e)&&"function"!=typeof e?An(t):e}function Fn(t){return(Fn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Bn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}gn({target:"Reflect",stat:!0,forced:Sn,sham:Sn},{construct:function(t,e){wn(t),xn(e);var n=arguments.length<3?t:wn(arguments[2]);if(Tn&&!kn)return _n(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return r.push.apply(r,e),new(En.apply(t,r))}var o=n.prototype,i=On(jn(o)?o:Object.prototype),u=Function.apply.call(t,i,e);return jn(u)?u:i}});var zn,Un,Wn=Jt("navigator","userAgent")||"",qn=Wn,Kn=r.process,Gn=Kn&&Kn.versions,Hn=Gn&&Gn.v8;Hn?Un=(zn=Hn.split("."))[0]<4?1:zn[0]+zn[1]:qn&&(!(zn=qn.match(/Edge\/(\d+)/))||zn[1]>=74)&&(zn=qn.match(/Chrome\/(\d+)/))&&(Un=zn[1]);var Vn=Un&&+Un,Xn=Vn,Yn=i,Jn=!!Object.getOwnPropertySymbols&&!Yn((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Xn&&Xn<41})),Qn=Jn&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Zn=r,$n=lt.exports,tr=_,er=bt,nr=Jn,rr=Qn,or=$n("wks"),ir=Zn.Symbol,ur=rr?ir:ir&&ir.withoutSetter||er,ar=function(t){return tr(or,t)&&(nr||"string"==typeof or[t])||(nr&&tr(ir,t)?or[t]=ir[t]:or[t]=ur("Symbol."+t)),or[t]},cr={};cr[ar("toStringTag")]="z";var sr="[object z]"===String(cr),fr=sr,lr=p,hr=ar("toStringTag"),pr="Arguments"==lr(function(){return arguments}()),mr=fr?lr:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),hr))?n:pr?lr(e):"Object"==(r=lr(e))&&"function"==typeof e.callee?"Arguments":r},yr=mr,vr=sr?{}.toString:function(){return"[object "+yr(this)+"]"},dr=sr,br=Z.exports,gr=vr;dr||br(Object.prototype,"toString",gr,{unsafe:!0});var wr=r.Promise,xr=Z.exports,jr=w,Or=q,Er=function(t){if(!jr(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t},Dr=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return Or(n),Er(r),e?t.call(n,r):n.__proto__=r,n}}():void 0),_r=U.f,kr=_,Tr=ar("toStringTag"),Sr=Jt,Pr=U,Lr=u,Mr=ar("species"),Ar={},Rr=Ar,Cr=ar("iterator"),Nr=Array.prototype,Ir=He,Fr=function(t,e,n){if(Ir(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}},Br=mr,zr=Ar,Ur=ar("iterator"),Wr=q,qr=q,Kr=function(t){return void 0!==t&&(Rr.Array===t||Nr[Cr]===t)},Gr=re,Hr=Fr,Vr=function(t){if(null!=t)return t[Ur]||t["@@iterator"]||zr[Br(t)]},Xr=function(t){var e=t.return;if(void 0!==e)return Wr(e.call(t)).value},Yr=function(t,e){this.stopped=t,this.result=e},Jr=ar("iterator"),Qr=!1;try{var Zr=0,$r={next:function(){return{done:!!Zr++}},return:function(){Qr=!0}};$r[Jr]=function(){return this},Array.from($r,(function(){throw 2}))}catch(t){}var to,eo,no,ro=q,oo=He,io=ar("species"),uo=/(?:iphone|ipod|ipad).*applewebkit/i.test(Wn),ao="process"==p(r.process),co=r,so=i,fo=Fr,lo=tn,ho=P,po=uo,mo=ao,yo=co.location,vo=co.setImmediate,bo=co.clearImmediate,go=co.process,wo=co.MessageChannel,xo=co.Dispatch,jo=0,Oo={},Eo="onreadystatechange",Do=function(t){if(Oo.hasOwnProperty(t)){var e=Oo[t];delete Oo[t],e()}},_o=function(t){return function(){Do(t)}},ko=function(t){Do(t.data)},To=function(t){co.postMessage(t+"",yo.protocol+"//"+yo.host)};vo&&bo||(vo=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return Oo[++jo]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},to(jo),jo},bo=function(t){delete Oo[t]},mo?to=function(t){go.nextTick(_o(t))}:xo&&xo.now?to=function(t){xo.now(_o(t))}:wo&&!po?(no=(eo=new wo).port2,eo.port1.onmessage=ko,to=fo(no.postMessage,no,1)):co.addEventListener&&"function"==typeof postMessage&&!co.importScripts&&yo&&"file:"!==yo.protocol&&!so(To)?(to=To,co.addEventListener("message",ko,!1)):to=Eo in ho("script")?function(t){lo.appendChild(ho("script")).onreadystatechange=function(){lo.removeChild(this),Do(t)}}:function(t){setTimeout(_o(t),0)});var So,Po,Lo,Mo,Ao,Ro,Co,No,Io={set:vo,clear:bo},Fo=/web0s(?!.*chrome)/i.test(Wn),Bo=r,zo=o.f,Uo=Io.set,Wo=uo,qo=Fo,Ko=ao,Go=Bo.MutationObserver||Bo.WebKitMutationObserver,Ho=Bo.document,Vo=Bo.process,Xo=Bo.Promise,Yo=zo(Bo,"queueMicrotask"),Jo=Yo&&Yo.value;Jo||(So=function(){var t,e;for(Ko&&(t=Vo.domain)&&t.exit();Po;){e=Po.fn,Po=Po.next;try{e()}catch(t){throw Po?Mo():Lo=void 0,t}}Lo=void 0,t&&t.enter()},Wo||Ko||qo||!Go||!Ho?Xo&&Xo.resolve?((Co=Xo.resolve(void 0)).constructor=Xo,No=Co.then,Mo=function(){No.call(Co,So)}):Mo=Ko?function(){Vo.nextTick(So)}:function(){Uo.call(Bo,So)}:(Ao=!0,Ro=Ho.createTextNode(""),new Go(So).observe(Ro,{characterData:!0}),Mo=function(){Ro.data=Ao=!Ao}));var Qo=Jo||function(t){var e={fn:t,next:void 0};Lo&&(Lo.next=e),Po||(Po=e,Mo()),Lo=e},Zo={},$o=He,ti=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=$o(e),this.reject=$o(n)};Zo.f=function(t){return new ti(t)};var ei,ni,ri,oi,ii=q,ui=w,ai=Zo,ci=r,si="object"==typeof window,fi=Ge,li=r,hi=Jt,pi=wr,mi=Z.exports,yi=function(t,e,n){for(var r in e)xr(t,r,e[r],n);return t},vi=Dr,di=function(t,e,n){t&&!kr(t=n?t:t.prototype,Tr)&&_r(t,Tr,{configurable:!0,value:e})},bi=function(t){var e=Sr(t),n=Pr.f;Lr&&e&&!e[Mr]&&n(e,Mr,{configurable:!0,get:function(){return this}})},gi=w,wi=He,xi=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t},ji=at,Oi=function(t,e,n){var r,o,i,u,a,c,s,f=n&&n.that,l=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),m=Hr(e,f,1+l+p),y=function(t){return r&&Xr(r),new Yr(!0,t)},v=function(t){return l?(qr(t),p?m(t[0],t[1],y):m(t[0],t[1])):p?m(t,y):m(t)};if(h)r=t;else{if("function"!=typeof(o=Vr(t)))throw TypeError("Target is not iterable");if(Kr(o)){for(i=0,u=Gr(t.length);u>i;i++)if((a=v(t[i]))&&a instanceof Yr)return a;return new Yr(!1)}r=o.call(t)}for(c=r.next;!(s=c.call(r)).done;){try{a=v(s.value)}catch(t){throw Xr(r),t}if("object"==typeof a&&a&&a instanceof Yr)return a}return new Yr(!1)},Ei=function(t,e){if(!e&&!Qr)return!1;var n=!1;try{var r={};r[Jr]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n},Di=function(t,e){var n,r=ro(t).constructor;return void 0===r||null==(n=ro(r)[io])?e:oo(n)},_i=Io.set,ki=Qo,Ti=function(t,e){if(ii(t),ui(e)&&e.constructor===t)return e;var n=ai.f(t);return(0,n.resolve)(e),n.promise},Si=function(t,e){var n=ci.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))},Pi=Zo,Li=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Mi=Ft,Ai=Ie,Ri=si,Ci=ao,Ni=Vn,Ii=ar("species"),Fi="Promise",Bi=Mi.get,zi=Mi.set,Ui=Mi.getterFor(Fi),Wi=pi&&pi.prototype,qi=pi,Ki=Wi,Gi=li.TypeError,Hi=li.document,Vi=li.process,Xi=Pi.f,Yi=Xi,Ji=!!(Hi&&Hi.createEvent&&li.dispatchEvent),Qi="function"==typeof PromiseRejectionEvent,Zi="unhandledrejection",$i=!1,tu=Ai(Fi,(function(){var t=ji(qi),e=t!==String(qi);if(!e&&66===Ni)return!0;if(Ni>=51&&/native code/.test(t))return!1;var n=new qi((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};return(n.constructor={})[Ii]=r,!($i=n.then((function(){}))instanceof r)||!e&&Ri&&!Qi})),eu=tu||!Ei((function(t){qi.all(t).catch((function(){}))})),nu=function(t){var e;return!(!gi(t)||"function"!=typeof(e=t.then))&&e},ru=function(t,e){if(!t.notified){t.notified=!0;var n=t.reactions;ki((function(){for(var r=t.value,o=1==t.state,i=0;n.length>i;){var u,a,c,s=n[i++],f=o?s.ok:s.fail,l=s.resolve,h=s.reject,p=s.domain;try{f?(o||(2===t.rejection&&au(t),t.rejection=1),!0===f?u=r:(p&&p.enter(),u=f(r),p&&(p.exit(),c=!0)),u===s.promise?h(Gi("Promise-chain cycle")):(a=nu(u))?a.call(u,l,h):l(u)):h(r)}catch(t){p&&!c&&p.exit(),h(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&iu(t)}))}},ou=function(t,e,n){var r,o;Ji?((r=Hi.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),li.dispatchEvent(r)):r={promise:e,reason:n},!Qi&&(o=li["on"+t])?o(r):t===Zi&&Si("Unhandled promise rejection",n)},iu=function(t){_i.call(li,(function(){var e,n=t.facade,r=t.value;if(uu(t)&&(e=Li((function(){Ci?Vi.emit("unhandledRejection",r,n):ou(Zi,n,r)})),t.rejection=Ci||uu(t)?2:1,e.error))throw e.value}))},uu=function(t){return 1!==t.rejection&&!t.parent},au=function(t){_i.call(li,(function(){var e=t.facade;Ci?Vi.emit("rejectionHandled",e):ou("rejectionhandled",e,t.value)}))},cu=function(t,e,n){return function(r){t(e,r,n)}},su=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,ru(t,!0))},fu=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw Gi("Promise can't be resolved itself");var r=nu(e);r?ki((function(){var n={done:!1};try{r.call(e,cu(fu,n,t),cu(su,n,t))}catch(e){su(n,e,t)}})):(t.value=e,t.state=1,ru(t,!1))}catch(e){su({done:!1},e,t)}}};if(tu&&(Ki=(qi=function(t){xi(this,qi,Fi),wi(t),ei.call(this);var e=Bi(this);try{t(cu(fu,e),cu(su,e))}catch(t){su(e,t)}}).prototype,(ei=function(t){zi(this,{type:Fi,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=yi(Ki,{then:function(t,e){var n=Ui(this),r=Xi(Di(this,qi));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=Ci?Vi.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&ru(n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),ni=function(){var t=new ei,e=Bi(t);this.promise=t,this.resolve=cu(fu,e),this.reject=cu(su,e)},Pi.f=Xi=function(t){return t===qi||t===ri?new ni(t):Yi(t)},"function"==typeof pi&&Wi!==Object.prototype)){oi=Wi.then,$i||(mi(Wi,"then",(function(t,e){var n=this;return new qi((function(t,e){oi.call(n,t,e)})).then(t,e)}),{unsafe:!0}),mi(Wi,"catch",Ki.catch,{unsafe:!0}));try{delete Wi.constructor}catch(t){}vi&&vi(Wi,Ki)}function lu(){}function hu(){hu.init.call(this)}function pu(t){return void 0===t._maxListeners?hu.defaultMaxListeners:t._maxListeners}function mu(t,e,n){if(e)t.call(n);else for(var r=t.length,o=ju(t,r),i=0;i<r;++i)o[i].call(n)}function yu(t,e,n,r){if(e)t.call(n,r);else for(var o=t.length,i=ju(t,o),u=0;u<o;++u)i[u].call(n,r)}function vu(t,e,n,r,o){if(e)t.call(n,r,o);else for(var i=t.length,u=ju(t,i),a=0;a<i;++a)u[a].call(n,r,o)}function du(t,e,n,r,o,i){if(e)t.call(n,r,o,i);else for(var u=t.length,a=ju(t,u),c=0;c<u;++c)a[c].call(n,r,o,i)}function bu(t,e,n,r){if(e)t.apply(n,r);else for(var o=t.length,i=ju(t,o),u=0;u<o;++u)i[u].apply(n,r)}function gu(t,e,n,r){var o,i,u,a;if("function"!=typeof n)throw new TypeError('"listener" argument must be a function');if((i=t._events)?(i.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),i=t._events),u=i[e]):(i=t._events=new lu,t._eventsCount=0),u){if("function"==typeof u?u=i[e]=r?[n,u]:[u,n]:r?u.unshift(n):u.push(n),!u.warned&&(o=pu(t))&&o>0&&u.length>o){u.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+u.length+" "+e+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=u.length,a=c,"function"==typeof console.warn?console.warn(a):console.log(a)}}else u=i[e]=n,++t._eventsCount;return t}function wu(t,e,n){var r=!1;function o(){t.removeListener(e,o),r||(r=!0,n.apply(t,arguments))}return o.listener=n,o}function xu(t){var e=this._events;if(e){var n=e[t];if("function"==typeof n)return 1;if(n)return n.length}return 0}function ju(t,e){for(var n=new Array(e);e--;)n[e]=t[e];return n}function Ou(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Fn(t);if(e){var o=Fn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return In(this,n)}}fi({global:!0,wrap:!0,forced:tu},{Promise:qi}),di(qi,Fi,!1),bi(Fi),ri=hi(Fi),fi({target:Fi,stat:!0,forced:tu},{reject:function(t){var e=Xi(this);return e.reject.call(void 0,t),e.promise}}),fi({target:Fi,stat:!0,forced:tu},{resolve:function(t){return Ti(this,t)}}),fi({target:Fi,stat:!0,forced:eu},{all:function(t){var e=this,n=Xi(e),r=n.resolve,o=n.reject,i=Li((function(){var n=wi(e.resolve),i=[],u=0,a=1;Oi(t,(function(t){var c=u++,s=!1;i.push(void 0),a++,n.call(e,t).then((function(t){s||(s=!0,i[c]=t,--a||r(i))}),o)})),--a||r(i)}));return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=Xi(e),r=n.reject,o=Li((function(){var o=wi(e.resolve);Oi(t,(function(t){o.call(e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}}),lu.prototype=Object.create(null),hu.EventEmitter=hu,hu.usingDomains=!1,hu.prototype.domain=void 0,hu.prototype._events=void 0,hu.prototype._maxListeners=void 0,hu.defaultMaxListeners=10,hu.init=function(){this.domain=null,hu.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new lu,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},hu.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this},hu.prototype.getMaxListeners=function(){return pu(this)},hu.prototype.emit=function(t){var e,n,r,o,i,u,a,c="error"===t;if(u=this._events)c=c&&null==u.error;else if(!c)return!1;if(a=this.domain,c){if(e=arguments[1],!a){if(e instanceof Error)throw e;var s=new Error('Uncaught, unspecified "error" event. ('+e+")");throw s.context=e,s}return e||(e=new Error('Uncaught, unspecified "error" event')),e.domainEmitter=this,e.domain=a,e.domainThrown=!1,a.emit("error",e),!1}if(!(n=u[t]))return!1;var f="function"==typeof n;switch(r=arguments.length){case 1:mu(n,f,this);break;case 2:yu(n,f,this,arguments[1]);break;case 3:vu(n,f,this,arguments[1],arguments[2]);break;case 4:du(n,f,this,arguments[1],arguments[2],arguments[3]);break;default:for(o=new Array(r-1),i=1;i<r;i++)o[i-1]=arguments[i];bu(n,f,this,o)}return!0},hu.prototype.addListener=function(t,e){return gu(this,t,e,!1)},hu.prototype.on=hu.prototype.addListener,hu.prototype.prependListener=function(t,e){return gu(this,t,e,!0)},hu.prototype.once=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.on(t,wu(this,t,e)),this},hu.prototype.prependOnceListener=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.prependListener(t,wu(this,t,e)),this},hu.prototype.removeListener=function(t,e){var n,r,o,i,u;if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');if(!(r=this._events))return this;if(!(n=r[t]))return this;if(n===e||n.listener&&n.listener===e)0==--this._eventsCount?this._events=new lu:(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(o=-1,i=n.length;i-- >0;)if(n[i]===e||n[i].listener&&n[i].listener===e){u=n[i].listener,o=i;break}if(o<0)return this;if(1===n.length){if(n[0]=void 0,0==--this._eventsCount)return this._events=new lu,this;delete r[t]}else!function(t,e){for(var n=e,r=n+1,o=t.length;r<o;n+=1,r+=1)t[n]=t[r];t.pop()}(n,o);r.removeListener&&this.emit("removeListener",t,u||e)}return this},hu.prototype.off=function(t,e){return this.removeListener(t,e)},hu.prototype.removeAllListeners=function(t){var e,n;if(!(n=this._events))return this;if(!n.removeListener)return 0===arguments.length?(this._events=new lu,this._eventsCount=0):n[t]&&(0==--this._eventsCount?this._events=new lu:delete n[t]),this;if(0===arguments.length){for(var r,o=Object.keys(n),i=0;i<o.length;++i)"removeListener"!==(r=o[i])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=new lu,this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(e)do{this.removeListener(t,e[e.length-1])}while(e[0]);return this},hu.prototype.listeners=function(t){var e,n=this._events;return n&&(e=n[t])?"function"==typeof e?[e.listener||e]:function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(e):[]},hu.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):xu.call(t,e)},hu.prototype.listenerCount=xu,hu.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var Eu=function(t){Cn(n,t);var e=Ou(n);function n(t){var r;return Pn(this,n),Bn(An(r=e.call(this)),"timeout",null),Bn(An(r),"startTimestamp",-1),r.minDelay=t.min,r.maxDelay=t.max,r.initialDelay=t.initial||0,r.maxAttemptsCount=t.maxAttemptsCount||0,r.maxAttemptsTime=t.maxAttemptsTime||0,r.randomness=t.randomness||0,r.inProgress=!1,r.attemptNum=0,r.prevDelay=0,r.currDelay=0,r}return Mn(n,[{key:"attempt",value:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.attemptNum++,this.emit("attempt",this)}},{key:"nextDelay",value:function(t){if("number"==typeof t)return this.prevDelay=0,this.currDelay=t,t;if(0==this.attemptNum)return this.initialDelay;if(1==this.attemptNum)return this.currDelay=this.minDelay,this.currDelay;this.prevDelay=this.currDelay;var e=this.currDelay+this.prevDelay;return this.maxDelay&&e>this.maxDelay&&(this.currDelay=this.maxDelay,e=this.maxDelay),this.currDelay=e,e}},{key:"randomize",value:function(t){var e=t*this.randomness,n=Math.round(Math.random()*e*2-e);return Math.max(0,t+n)}},{key:"scheduleAttempt",value:function(t){var e=this;if(this.maxAttemptsCount&&this.attemptNum>=this.maxAttemptsCount)return this.cleanup(),void this.emit("failed",new Error("Maximum attempt count limit reached"));var n=this.nextDelay(t);if(n=this.randomize(n),this.maxAttemptsTime&&this.startTimestamp+this.maxAttemptsTime<Date.now()+n)return this.cleanup(),void this.emit("failed",new Error("Maximum attempt time limit reached"));this.timeout=setTimeout((function(){return e.attempt()}),n)}},{key:"cleanup",value:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.inProgress=!1,this.attemptNum=0,this.prevDelay=0,this.currDelay=0}},{key:"start",value:function(){if(this.inProgress)throw new Error("Retrier is already in progress");this.inProgress=!0,this.startTimestamp=Date.now(),this.scheduleAttempt(this.initialDelay)}},{key:"cancel",value:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null,this.inProgress=!1,this.emit("cancelled"))}},{key:"succeeded",value:function(t){this.emit("succeeded",t)}},{key:"failed",value:function(t,e){if(this.timeout)throw new Error("Retrier attempt is already in progress");this.scheduleAttempt(e)}}]),n}(hu),Du=function(t){Cn(n,t);var e=Ou(n);function n(t){var r;return Pn(this,n),Bn(An(r=e.call(this)),"resolve",(function(){})),Bn(An(r),"reject",(function(){})),r.retrier=new Eu(t),r}return Mn(n,[{key:"run",value:function(t){var e=this;return this.retrier.on("attempt",(function(){t().then((function(t){return e.retrier.succeeded(t)})).catch((function(t){return e.retrier.failed(t)}))})),this.retrier.on("succeeded",(function(t){return e.resolve(t)})),this.retrier.on("cancelled",(function(){return e.reject(new Error("Cancelled"))})),this.retrier.on("failed",(function(t){return e.reject(t)})),new Promise((function(t,n){e.resolve=t,e.reject=n,e.retrier.start()}))}},{key:"cancel",value:function(){this.retrier.cancel()}}]),n}(hu);function _u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Fn(t);if(e){var o=Fn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return In(this,n)}}function ku(t){return null!=t}var Tu=function(t){Cn(n,t);var e=_u(n);function n(t){var r;Pn(this,n),Bn(An(r=e.call(this)),"backoffDelay",0),Bn(An(r),"nextBackoffDelay",0),Bn(An(r),"backoffNumber",0),Bn(An(r),"timeoutID",null),Bn(An(r),"maxNumberOfRetry",-1);var o=t=t||{},i=o.initialDelay,u=o.maxDelay,a=o.randomisationFactor,c=o.factor;if(ku(i)&&i<1)throw new Error("The initial timeout must be equal to or greater than 1.");if(ku(u)&&u<=1)throw new Error("The maximal timeout must be greater than 1.");if(ku(a)&&(a<0||a>1))throw new Error("The randomisation factor must be between 0 and 1.");if(ku(c)&&c<=1)throw new Error("Exponential factor should be greater than 1.");if(r.initialDelay=i||100,r.maxDelay=u||1e4,r.maxDelay<=r.initialDelay)throw new Error("The maximal backoff delay must be greater than the initial backoff delay.");return r.randomisationFactor=a||0,r.factor=c||2,r.reset(),r}return Mn(n,[{key:"backoff",value:function(t){null==this.timeoutID&&(this.backoffNumber===this.maxNumberOfRetry?(this.emit("fail",t),this.reset()):(this.backoffDelay=this.next(),this.timeoutID=setTimeout(this.onBackoff.bind(this),this.backoffDelay),this.emit("backoff",this.backoffNumber,this.backoffDelay,t)))}},{key:"reset",value:function(){this.backoffDelay=0,this.nextBackoffDelay=this.initialDelay,this.backoffNumber=0,this.timeoutID&&clearTimeout(this.timeoutID),this.timeoutID=null}},{key:"failAfter",value:function(t){if(t<=0)throw new Error("Expected a maximum number of retry greater than 0 but got ".concat(t));this.maxNumberOfRetry=t}},{key:"next",value:function(){this.backoffDelay=Math.min(this.nextBackoffDelay,this.maxDelay),this.nextBackoffDelay=this.backoffDelay*this.factor;var t=1+Math.random()*this.randomisationFactor;return Math.min(this.maxDelay,Math.round(this.backoffDelay*t))}},{key:"onBackoff",value:function(){this.timeoutID=null,this.emit("ready",this.backoffNumber,this.backoffDelay),this.backoffNumber++}}],[{key:"exponential",value:function(t){return new n(t)}}]),n}(hu);return t.AsyncRetrier=Du,t.Backoff=Tu,t.Retrier=Eu,Object.defineProperty(t,"__esModule",{value:!0}),t}({});
var Retrier=function(t){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=function(t){return t&&t.Math==Math&&t},r=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||Function("return this")(),o={},i=function(t){try{return!!t()}catch(t){return!0}},u=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),a={},c={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,f=s&&!c.call({1:2},1);a.f=f?function(t){var e=s(this,t);return!!e&&e.enumerable}:c;var l,h,p=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},v={}.toString,y=function(t){return v.call(t).slice(8,-1)},m=y,d="".split,b=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},g=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==m(t)?d.call(t,""):Object(t)}:Object,w=b,j=function(t){return g(w(t))},x=function(t){return"object"==typeof t?null!==t:"function"==typeof t},O=r,E=function(t){return"function"==typeof t?t:void 0},D=function(t,e){return arguments.length<2?E(O[t]):O[t]&&O[t][e]},_=D("navigator","userAgent")||"",k=r,T=_,S=k.process,P=k.Deno,L=S&&S.versions||P&&P.version,M=L&&L.v8;M?h=(l=M.split("."))[0]<4?1:l[0]+l[1]:T&&(!(l=T.match(/Edge\/(\d+)/))||l[1]>=74)&&(l=T.match(/Chrome\/(\d+)/))&&(h=l[1]);var A=h&&+h,C=A,R=i,N=!!Object.getOwnPropertySymbols&&!R((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&C&&C<41})),I=N&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,F=D,B=I?function(t){return"symbol"==typeof t}:function(t){var e=F("Symbol");return"function"==typeof e&&Object(t)instanceof e},z=x,U={exports:{}},W=r,q=function(t,e){try{Object.defineProperty(W,t,{value:e,configurable:!0,writable:!0})}catch(n){W[t]=e}return e},K=q,G="__core-js_shared__",H=r[G]||K(G,{}),V=H;(U.exports=function(t,e){return V[t]||(V[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.17.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var X=b,Y=function(t){return Object(X(t))},J={}.hasOwnProperty,Q=Object.hasOwn||function(t,e){return J.call(Y(t),e)},Z=0,$=Math.random(),tt=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++Z+$).toString(36)},et=r,nt=U.exports,rt=Q,ot=tt,it=N,ut=I,at=nt("wks"),ct=et.Symbol,st=ut?ct:ct&&ct.withoutSetter||ot,ft=function(t){return rt(at,t)&&(it||"string"==typeof at[t])||(it&&rt(ct,t)?at[t]=ct[t]:at[t]=st("Symbol."+t)),at[t]},lt=x,ht=B,pt=function(t,e){var n,r;if("string"===e&&"function"==typeof(n=t.toString)&&!z(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!z(r=n.call(t)))return r;if("string"!==e&&"function"==typeof(n=t.toString)&&!z(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},vt=ft("toPrimitive"),yt=function(t,e){if(!lt(t)||ht(t))return t;var n,r=t[vt];if(void 0!==r){if(void 0===e&&(e="default"),n=r.call(t,e),!lt(n)||ht(n))return n;throw TypeError("Can't convert object to primitive value")}return void 0===e&&(e="number"),pt(t,e)},mt=B,dt=function(t){var e=yt(t,"string");return mt(e)?e:String(e)},bt=x,gt=r.document,wt=bt(gt)&&bt(gt.createElement),jt=function(t){return wt?gt.createElement(t):{}},xt=jt,Ot=!u&&!i((function(){return 7!=Object.defineProperty(xt("div"),"a",{get:function(){return 7}}).a})),Et=u,Dt=a,_t=p,kt=j,Tt=dt,St=Q,Pt=Ot,Lt=Object.getOwnPropertyDescriptor;o.f=Et?Lt:function(t,e){if(t=kt(t),e=Tt(e),Pt)try{return Lt(t,e)}catch(t){}if(St(t,e))return _t(!Dt.f.call(t,e),t[e])};var Mt={},At=x,Ct=function(t){if(!At(t))throw TypeError(String(t)+" is not an object");return t},Rt=u,Nt=Ot,It=Ct,Ft=dt,Bt=Object.defineProperty;Mt.f=Rt?Bt:function(t,e,n){if(It(t),e=Ft(e),It(n),Nt)try{return Bt(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t};var zt=Mt,Ut=p,Wt=u?function(t,e,n){return zt.f(t,e,Ut(1,n))}:function(t,e,n){return t[e]=n,t},qt={exports:{}},Kt=H,Gt=Function.toString;"function"!=typeof Kt.inspectSource&&(Kt.inspectSource=function(t){return Gt.call(t)});var Ht,Vt,Xt,Yt=Kt.inspectSource,Jt=Yt,Qt=r.WeakMap,Zt="function"==typeof Qt&&/native code/.test(Jt(Qt)),$t=U.exports,te=tt,ee=$t("keys"),ne=function(t){return ee[t]||(ee[t]=te(t))},re={},oe=Zt,ie=x,ue=Wt,ae=Q,ce=H,se=ne,fe=re,le="Object already initialized",he=r.WeakMap;if(oe||ce.state){var pe=ce.state||(ce.state=new he),ve=pe.get,ye=pe.has,me=pe.set;Ht=function(t,e){if(ye.call(pe,t))throw new TypeError(le);return e.facade=t,me.call(pe,t,e),e},Vt=function(t){return ve.call(pe,t)||{}},Xt=function(t){return ye.call(pe,t)}}else{var de=se("state");fe[de]=!0,Ht=function(t,e){if(ae(t,de))throw new TypeError(le);return e.facade=t,ue(t,de,e),e},Vt=function(t){return ae(t,de)?t[de]:{}},Xt=function(t){return ae(t,de)}}var be={set:Ht,get:Vt,has:Xt,enforce:function(t){return Xt(t)?Vt(t):Ht(t,{})},getterFor:function(t){return function(e){var n;if(!ie(e)||(n=Vt(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}},ge=r,we=Wt,je=Q,xe=q,Oe=Yt,Ee=be.get,De=be.enforce,_e=String(String).split("String");(qt.exports=function(t,e,n,r){var o,i=!!r&&!!r.unsafe,u=!!r&&!!r.enumerable,a=!!r&&!!r.noTargetGet;"function"==typeof n&&("string"!=typeof e||je(n,"name")||we(n,"name",e),(o=De(n)).source||(o.source=_e.join("string"==typeof e?e:""))),t!==ge?(i?!a&&t[e]&&(u=!0):delete t[e],u?t[e]=n:we(t,e,n)):u?t[e]=n:xe(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&Ee(this).source||Oe(this)}));var ke={},Te=Math.ceil,Se=Math.floor,Pe=function(t){return isNaN(t=+t)?0:(t>0?Se:Te)(t)},Le=Pe,Me=Math.min,Ae=function(t){return t>0?Me(Le(t),9007199254740991):0},Ce=Pe,Re=Math.max,Ne=Math.min,Ie=j,Fe=Ae,Be=function(t,e){var n=Ce(t);return n<0?Re(n+e,0):Ne(n,e)},ze=function(t){return function(e,n,r){var o,i=Ie(e),u=Fe(i.length),a=Be(r,u);if(t&&n!=n){for(;u>a;)if((o=i[a++])!=o)return!0}else for(;u>a;a++)if((t||a in i)&&i[a]===n)return t||a||0;return!t&&-1}},Ue={includes:ze(!0),indexOf:ze(!1)},We=Q,qe=j,Ke=Ue.indexOf,Ge=re,He=function(t,e){var n,r=qe(t),o=0,i=[];for(n in r)!We(Ge,n)&&We(r,n)&&i.push(n);for(;e.length>o;)We(r,n=e[o++])&&(~Ke(i,n)||i.push(n));return i},Ve=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Xe=He,Ye=Ve.concat("length","prototype");ke.f=Object.getOwnPropertyNames||function(t){return Xe(t,Ye)};var Je={};Je.f=Object.getOwnPropertySymbols;var Qe,Ze=ke,$e=Je,tn=Ct,en=D("Reflect","ownKeys")||function(t){var e=Ze.f(tn(t)),n=$e.f;return n?e.concat(n(t)):e},nn=Q,rn=en,on=o,un=Mt,an=i,cn=/#|\.prototype\./,sn=function(t,e){var n=ln[fn(t)];return n==pn||n!=hn&&("function"==typeof e?an(e):!!e)},fn=sn.normalize=function(t){return String(t).replace(cn,".").toLowerCase()},ln=sn.data={},hn=sn.NATIVE="N",pn=sn.POLYFILL="P",vn=sn,yn=r,mn=o.f,dn=Wt,bn=qt.exports,gn=q,wn=function(t,e){for(var n=rn(e),r=un.f,o=on.f,i=0;i<n.length;i++){var u=n[i];nn(t,u)||r(t,u,o(e,u))}},jn=vn,xn=function(t,e){var n,r,o,i,u,a=t.target,c=t.global,s=t.stat;if(n=c?yn:s?yn[a]||gn(a,{}):(yn[a]||{}).prototype)for(r in e){if(i=e[r],o=t.noTargetGet?(u=mn(n,r))&&u.value:n[r],!jn(c?r:a+(s?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;wn(i,o)}(t.sham||o&&o.sham)&&dn(i,"sham",!0),bn(n,r,i,t)}},On=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},En=He,Dn=Ve,_n=Object.keys||function(t){return En(t,Dn)},kn=Mt,Tn=Ct,Sn=_n,Pn=u?Object.defineProperties:function(t,e){Tn(t);for(var n,r=Sn(e),o=r.length,i=0;o>i;)kn.f(t,n=r[i++],e[n]);return t},Ln=D("document","documentElement"),Mn=Ct,An=Pn,Cn=Ve,Rn=re,Nn=Ln,In=jt,Fn=ne("IE_PROTO"),Bn=function(){},zn=function(t){return"<script>"+t+"</"+"script>"},Un=function(t){t.write(zn("")),t.close();var e=t.parentWindow.Object;return t=null,e},Wn=function(){try{Qe=new ActiveXObject("htmlfile")}catch(t){}var t,e;Wn="undefined"!=typeof document?document.domain&&Qe?Un(Qe):((e=In("iframe")).style.display="none",Nn.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(zn("document.F=Object")),t.close(),t.F):Un(Qe);for(var n=Cn.length;n--;)delete Wn.prototype[Cn[n]];return Wn()};Rn[Fn]=!0;var qn=Object.create||function(t,e){var n;return null!==t?(Bn.prototype=Mn(t),n=new Bn,Bn.prototype=null,n[Fn]=t):n=Wn(),void 0===e?n:An(n,e)},Kn=On,Gn=x,Hn=[].slice,Vn={},Xn=function(t,e,n){if(!(e in Vn)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";Vn[e]=Function("C,a","return new C("+r.join(",")+")")}return Vn[e](t,n)},Yn=Function.bind||function(t){var e=Kn(this),n=Hn.call(arguments,1),r=function(){var o=n.concat(Hn.call(arguments));return this instanceof r?Xn(e,o.length,o):e.apply(t,o)};return Gn(e.prototype)&&(r.prototype=e.prototype),r},Jn=xn,Qn=On,Zn=Ct,$n=x,tr=qn,er=Yn,nr=i,rr=D("Reflect","construct"),or=nr((function(){function t(){}return!(rr((function(){}),[],t)instanceof t)})),ir=!nr((function(){rr((function(){}))})),ur=or||ir;function ar(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function sr(t,e,n){return e&&cr(t.prototype,e),n&&cr(t,n),t}function fr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function lr(t,e){return(lr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function hr(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&lr(t,e)}function pr(t){return(pr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function vr(t,e){return!e||"object"!==pr(e)&&"function"!=typeof e?fr(t):e}function yr(t){return(yr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function mr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Jn({target:"Reflect",stat:!0,forced:ur,sham:ur},{construct:function(t,e){Qn(t),Zn(e);var n=arguments.length<3?t:Qn(arguments[2]);if(ir&&!or)return rr(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return r.push.apply(r,e),new(er.apply(t,r))}var o=n.prototype,i=tr($n(o)?o:Object.prototype),u=Function.apply.call(t,i,e);return $n(u)?u:i}});var dr={};dr[ft("toStringTag")]="z";var br="[object z]"===String(dr),gr=br,wr=y,jr=ft("toStringTag"),xr="Arguments"==wr(function(){return arguments}()),Or=gr?wr:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),jr))?n:xr?wr(e):"Object"==(r=wr(e))&&"function"==typeof e.callee?"Arguments":r},Er=Or,Dr=br?{}.toString:function(){return"[object "+Er(this)+"]"},_r=br,kr=qt.exports,Tr=Dr;_r||kr(Object.prototype,"toString",Tr,{unsafe:!0});var Sr=r.Promise,Pr=qt.exports,Lr=x,Mr=Ct,Ar=function(t){if(!Lr(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t},Cr=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return Mr(n),Ar(r),e?t.call(n,r):n.__proto__=r,n}}():void 0),Rr=Mt.f,Nr=Q,Ir=ft("toStringTag"),Fr=D,Br=Mt,zr=u,Ur=ft("species"),Wr={},qr=Wr,Kr=ft("iterator"),Gr=Array.prototype,Hr=On,Vr=function(t,e,n){if(Hr(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}},Xr=Or,Yr=Wr,Jr=ft("iterator"),Qr=function(t){if(null!=t)return t[Jr]||t["@@iterator"]||Yr[Xr(t)]},Zr=Ct,$r=Qr,to=Ct,eo=Ct,no=function(t){return void 0!==t&&(qr.Array===t||Gr[Kr]===t)},ro=Ae,oo=Vr,io=function(t,e){var n=arguments.length<2?$r(t):e;if("function"!=typeof n)throw TypeError(String(t)+" is not iterable");return Zr(n.call(t))},uo=Qr,ao=function(t,e,n){var r,o;to(t);try{if(void 0===(r=t.return)){if("throw"===e)throw n;return n}r=r.call(t)}catch(t){o=!0,r=t}if("throw"===e)throw n;if(o)throw r;return to(r),n},co=function(t,e){this.stopped=t,this.result=e},so=ft("iterator"),fo=!1;try{var lo=0,ho={next:function(){return{done:!!lo++}},return:function(){fo=!0}};ho[so]=function(){return this},Array.from(ho,(function(){throw 2}))}catch(t){}var po,vo,yo,mo,bo=Ct,go=On,wo=ft("species"),jo=/(?:ipad|iphone|ipod).*applewebkit/i.test(_),xo="process"==y(r.process),Oo=r,Eo=i,Do=Vr,_o=Ln,ko=jt,To=jo,So=xo,Po=Oo.setImmediate,Lo=Oo.clearImmediate,Mo=Oo.process,Ao=Oo.MessageChannel,Co=Oo.Dispatch,Ro=0,No={},Io="onreadystatechange";try{po=Oo.location}catch(t){}var Fo=function(t){if(No.hasOwnProperty(t)){var e=No[t];delete No[t],e()}},Bo=function(t){return function(){Fo(t)}},zo=function(t){Fo(t.data)},Uo=function(t){Oo.postMessage(String(t),po.protocol+"//"+po.host)};Po&&Lo||(Po=function(t){for(var e=[],n=arguments.length,r=1;n>r;)e.push(arguments[r++]);return No[++Ro]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},vo(Ro),Ro},Lo=function(t){delete No[t]},So?vo=function(t){Mo.nextTick(Bo(t))}:Co&&Co.now?vo=function(t){Co.now(Bo(t))}:Ao&&!To?(mo=(yo=new Ao).port2,yo.port1.onmessage=zo,vo=Do(mo.postMessage,mo,1)):Oo.addEventListener&&"function"==typeof postMessage&&!Oo.importScripts&&po&&"file:"!==po.protocol&&!Eo(Uo)?(vo=Uo,Oo.addEventListener("message",zo,!1)):vo=Io in ko("script")?function(t){_o.appendChild(ko("script")).onreadystatechange=function(){_o.removeChild(this),Fo(t)}}:function(t){setTimeout(Bo(t),0)});var Wo,qo,Ko,Go,Ho,Vo,Xo,Yo,Jo={set:Po,clear:Lo},Qo=r,Zo=/ipad|iphone|ipod/i.test(_)&&void 0!==Qo.Pebble,$o=/web0s(?!.*chrome)/i.test(_),ti=r,ei=o.f,ni=Jo.set,ri=jo,oi=Zo,ii=$o,ui=xo,ai=ti.MutationObserver||ti.WebKitMutationObserver,ci=ti.document,si=ti.process,fi=ti.Promise,li=ei(ti,"queueMicrotask"),hi=li&&li.value;hi||(Wo=function(){var t,e;for(ui&&(t=si.domain)&&t.exit();qo;){e=qo.fn,qo=qo.next;try{e()}catch(t){throw qo?Go():Ko=void 0,t}}Ko=void 0,t&&t.enter()},ri||ui||ii||!ai||!ci?!oi&&fi&&fi.resolve?((Xo=fi.resolve(void 0)).constructor=fi,Yo=Xo.then,Go=function(){Yo.call(Xo,Wo)}):Go=ui?function(){si.nextTick(Wo)}:function(){ni.call(ti,Wo)}:(Ho=!0,Vo=ci.createTextNode(""),new ai(Wo).observe(Vo,{characterData:!0}),Go=function(){Vo.data=Ho=!Ho}));var pi=hi||function(t){var e={fn:t,next:void 0};Ko&&(Ko.next=e),qo||(qo=e,Go()),Ko=e},vi={},yi=On,mi=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=yi(e),this.reject=yi(n)};vi.f=function(t){return new mi(t)};var di,bi,gi,wi,ji=Ct,xi=x,Oi=vi,Ei=r,Di="object"==typeof window,_i=xn,ki=r,Ti=D,Si=Sr,Pi=qt.exports,Li=function(t,e,n){for(var r in e)Pr(t,r,e[r],n);return t},Mi=Cr,Ai=function(t,e,n){t&&!Nr(t=n?t:t.prototype,Ir)&&Rr(t,Ir,{configurable:!0,value:e})},Ci=function(t){var e=Fr(t),n=Br.f;zr&&e&&!e[Ur]&&n(e,Ur,{configurable:!0,get:function(){return this}})},Ri=x,Ni=On,Ii=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t},Fi=Yt,Bi=function(t,e,n){var r,o,i,u,a,c,s,f=n&&n.that,l=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),v=oo(e,f,1+l+p),y=function(t){return r&&ao(r,"normal",t),new co(!0,t)},m=function(t){return l?(eo(t),p?v(t[0],t[1],y):v(t[0],t[1])):p?v(t,y):v(t)};if(h)r=t;else{if("function"!=typeof(o=uo(t)))throw TypeError("Target is not iterable");if(no(o)){for(i=0,u=ro(t.length);u>i;i++)if((a=m(t[i]))&&a instanceof co)return a;return new co(!1)}r=io(t,o)}for(c=r.next;!(s=c.call(r)).done;){try{a=m(s.value)}catch(t){ao(r,"throw",t)}if("object"==typeof a&&a&&a instanceof co)return a}return new co(!1)},zi=function(t,e){if(!e&&!fo)return!1;var n=!1;try{var r={};r[so]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n},Ui=function(t,e){var n,r=bo(t).constructor;return void 0===r||null==(n=bo(r)[wo])?e:go(n)},Wi=Jo.set,qi=pi,Ki=function(t,e){if(ji(t),xi(e)&&e.constructor===t)return e;var n=Oi.f(t);return(0,n.resolve)(e),n.promise},Gi=function(t,e){var n=Ei.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))},Hi=vi,Vi=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Xi=be,Yi=vn,Ji=Di,Qi=xo,Zi=A,$i=ft("species"),tu="Promise",eu=Xi.get,nu=Xi.set,ru=Xi.getterFor(tu),ou=Si&&Si.prototype,iu=Si,uu=ou,au=ki.TypeError,cu=ki.document,su=ki.process,fu=Hi.f,lu=fu,hu=!!(cu&&cu.createEvent&&ki.dispatchEvent),pu="function"==typeof PromiseRejectionEvent,vu="unhandledrejection",yu=!1,mu=Yi(tu,(function(){var t=Fi(iu),e=t!==String(iu);if(!e&&66===Zi)return!0;if(Zi>=51&&/native code/.test(t))return!1;var n=new iu((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};return(n.constructor={})[$i]=r,!(yu=n.then((function(){}))instanceof r)||!e&&Ji&&!pu})),du=mu||!zi((function(t){iu.all(t).catch((function(){}))})),bu=function(t){var e;return!(!Ri(t)||"function"!=typeof(e=t.then))&&e},gu=function(t,e){if(!t.notified){t.notified=!0;var n=t.reactions;qi((function(){for(var r=t.value,o=1==t.state,i=0;n.length>i;){var u,a,c,s=n[i++],f=o?s.ok:s.fail,l=s.resolve,h=s.reject,p=s.domain;try{f?(o||(2===t.rejection&&Ou(t),t.rejection=1),!0===f?u=r:(p&&p.enter(),u=f(r),p&&(p.exit(),c=!0)),u===s.promise?h(au("Promise-chain cycle")):(a=bu(u))?a.call(u,l,h):l(u)):h(r)}catch(t){p&&!c&&p.exit(),h(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&ju(t)}))}},wu=function(t,e,n){var r,o;hu?((r=cu.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),ki.dispatchEvent(r)):r={promise:e,reason:n},!pu&&(o=ki["on"+t])?o(r):t===vu&&Gi("Unhandled promise rejection",n)},ju=function(t){Wi.call(ki,(function(){var e,n=t.facade,r=t.value;if(xu(t)&&(e=Vi((function(){Qi?su.emit("unhandledRejection",r,n):wu(vu,n,r)})),t.rejection=Qi||xu(t)?2:1,e.error))throw e.value}))},xu=function(t){return 1!==t.rejection&&!t.parent},Ou=function(t){Wi.call(ki,(function(){var e=t.facade;Qi?su.emit("rejectionHandled",e):wu("rejectionhandled",e,t.value)}))},Eu=function(t,e,n){return function(r){t(e,r,n)}},Du=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,gu(t,!0))},_u=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw au("Promise can't be resolved itself");var r=bu(e);r?qi((function(){var n={done:!1};try{r.call(e,Eu(_u,n,t),Eu(Du,n,t))}catch(e){Du(n,e,t)}})):(t.value=e,t.state=1,gu(t,!1))}catch(e){Du({done:!1},e,t)}}};if(mu&&(uu=(iu=function(t){Ii(this,iu,tu),Ni(t),di.call(this);var e=eu(this);try{t(Eu(_u,e),Eu(Du,e))}catch(t){Du(e,t)}}).prototype,(di=function(t){nu(this,{type:tu,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=Li(uu,{then:function(t,e){var n=ru(this),r=fu(Ui(this,iu));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=Qi?su.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&gu(n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),bi=function(){var t=new di,e=eu(t);this.promise=t,this.resolve=Eu(_u,e),this.reject=Eu(Du,e)},Hi.f=fu=function(t){return t===iu||t===gi?new bi(t):lu(t)},"function"==typeof Si&&ou!==Object.prototype)){wi=ou.then,yu||(Pi(ou,"then",(function(t,e){var n=this;return new iu((function(t,e){wi.call(n,t,e)})).then(t,e)}),{unsafe:!0}),Pi(ou,"catch",uu.catch,{unsafe:!0}));try{delete ou.constructor}catch(t){}Mi&&Mi(ou,uu)}function ku(){}function Tu(){Tu.init.call(this)}function Su(t){return void 0===t._maxListeners?Tu.defaultMaxListeners:t._maxListeners}function Pu(t,e,n){if(e)t.call(n);else for(var r=t.length,o=Fu(t,r),i=0;i<r;++i)o[i].call(n)}function Lu(t,e,n,r){if(e)t.call(n,r);else for(var o=t.length,i=Fu(t,o),u=0;u<o;++u)i[u].call(n,r)}function Mu(t,e,n,r,o){if(e)t.call(n,r,o);else for(var i=t.length,u=Fu(t,i),a=0;a<i;++a)u[a].call(n,r,o)}function Au(t,e,n,r,o,i){if(e)t.call(n,r,o,i);else for(var u=t.length,a=Fu(t,u),c=0;c<u;++c)a[c].call(n,r,o,i)}function Cu(t,e,n,r){if(e)t.apply(n,r);else for(var o=t.length,i=Fu(t,o),u=0;u<o;++u)i[u].apply(n,r)}function Ru(t,e,n,r){var o,i,u,a;if("function"!=typeof n)throw new TypeError('"listener" argument must be a function');if((i=t._events)?(i.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),i=t._events),u=i[e]):(i=t._events=new ku,t._eventsCount=0),u){if("function"==typeof u?u=i[e]=r?[n,u]:[u,n]:r?u.unshift(n):u.push(n),!u.warned&&(o=Su(t))&&o>0&&u.length>o){u.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+u.length+" "+e+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=u.length,a=c,"function"==typeof console.warn?console.warn(a):console.log(a)}}else u=i[e]=n,++t._eventsCount;return t}function Nu(t,e,n){var r=!1;function o(){t.removeListener(e,o),r||(r=!0,n.apply(t,arguments))}return o.listener=n,o}function Iu(t){var e=this._events;if(e){var n=e[t];if("function"==typeof n)return 1;if(n)return n.length}return 0}function Fu(t,e){for(var n=new Array(e);e--;)n[e]=t[e];return n}function Bu(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=yr(t);if(e){var o=yr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return vr(this,n)}}_i({global:!0,wrap:!0,forced:mu},{Promise:iu}),Ai(iu,tu,!1),Ci(tu),gi=Ti(tu),_i({target:tu,stat:!0,forced:mu},{reject:function(t){var e=fu(this);return e.reject.call(void 0,t),e.promise}}),_i({target:tu,stat:!0,forced:mu},{resolve:function(t){return Ki(this,t)}}),_i({target:tu,stat:!0,forced:du},{all:function(t){var e=this,n=fu(e),r=n.resolve,o=n.reject,i=Vi((function(){var n=Ni(e.resolve),i=[],u=0,a=1;Bi(t,(function(t){var c=u++,s=!1;i.push(void 0),a++,n.call(e,t).then((function(t){s||(s=!0,i[c]=t,--a||r(i))}),o)})),--a||r(i)}));return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=fu(e),r=n.reject,o=Vi((function(){var o=Ni(e.resolve);Bi(t,(function(t){o.call(e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}}),ku.prototype=Object.create(null),Tu.EventEmitter=Tu,Tu.usingDomains=!1,Tu.prototype.domain=void 0,Tu.prototype._events=void 0,Tu.prototype._maxListeners=void 0,Tu.defaultMaxListeners=10,Tu.init=function(){this.domain=null,Tu.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new ku,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Tu.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this},Tu.prototype.getMaxListeners=function(){return Su(this)},Tu.prototype.emit=function(t){var e,n,r,o,i,u,a,c="error"===t;if(u=this._events)c=c&&null==u.error;else if(!c)return!1;if(a=this.domain,c){if(e=arguments[1],!a){if(e instanceof Error)throw e;var s=new Error('Uncaught, unspecified "error" event. ('+e+")");throw s.context=e,s}return e||(e=new Error('Uncaught, unspecified "error" event')),e.domainEmitter=this,e.domain=a,e.domainThrown=!1,a.emit("error",e),!1}if(!(n=u[t]))return!1;var f="function"==typeof n;switch(r=arguments.length){case 1:Pu(n,f,this);break;case 2:Lu(n,f,this,arguments[1]);break;case 3:Mu(n,f,this,arguments[1],arguments[2]);break;case 4:Au(n,f,this,arguments[1],arguments[2],arguments[3]);break;default:for(o=new Array(r-1),i=1;i<r;i++)o[i-1]=arguments[i];Cu(n,f,this,o)}return!0},Tu.prototype.addListener=function(t,e){return Ru(this,t,e,!1)},Tu.prototype.on=Tu.prototype.addListener,Tu.prototype.prependListener=function(t,e){return Ru(this,t,e,!0)},Tu.prototype.once=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.on(t,Nu(this,t,e)),this},Tu.prototype.prependOnceListener=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.prependListener(t,Nu(this,t,e)),this},Tu.prototype.removeListener=function(t,e){var n,r,o,i,u;if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');if(!(r=this._events))return this;if(!(n=r[t]))return this;if(n===e||n.listener&&n.listener===e)0==--this._eventsCount?this._events=new ku:(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(o=-1,i=n.length;i-- >0;)if(n[i]===e||n[i].listener&&n[i].listener===e){u=n[i].listener,o=i;break}if(o<0)return this;if(1===n.length){if(n[0]=void 0,0==--this._eventsCount)return this._events=new ku,this;delete r[t]}else!function(t,e){for(var n=e,r=n+1,o=t.length;r<o;n+=1,r+=1)t[n]=t[r];t.pop()}(n,o);r.removeListener&&this.emit("removeListener",t,u||e)}return this},Tu.prototype.off=function(t,e){return this.removeListener(t,e)},Tu.prototype.removeAllListeners=function(t){var e,n;if(!(n=this._events))return this;if(!n.removeListener)return 0===arguments.length?(this._events=new ku,this._eventsCount=0):n[t]&&(0==--this._eventsCount?this._events=new ku:delete n[t]),this;if(0===arguments.length){for(var r,o=Object.keys(n),i=0;i<o.length;++i)"removeListener"!==(r=o[i])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=new ku,this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(e)do{this.removeListener(t,e[e.length-1])}while(e[0]);return this},Tu.prototype.listeners=function(t){var e,n=this._events;return n&&(e=n[t])?"function"==typeof e?[e.listener||e]:function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(e):[]},Tu.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):Iu.call(t,e)},Tu.prototype.listenerCount=Iu,Tu.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var zu=function(t){hr(n,t);var e=Bu(n);function n(t){var r;return ar(this,n),mr(fr(r=e.call(this)),"timeout",null),mr(fr(r),"startTimestamp",-1),r.minDelay=t.min,r.maxDelay=t.max,r.initialDelay=t.initial||0,r.maxAttemptsCount=t.maxAttemptsCount||0,r.maxAttemptsTime=t.maxAttemptsTime||0,r.randomness=t.randomness||0,r.inProgress=!1,r.attemptNum=0,r.prevDelay=0,r.currDelay=0,r}return sr(n,[{key:"attempt",value:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.attemptNum++,this.emit("attempt",this)}},{key:"nextDelay",value:function(t){if("number"==typeof t)return this.prevDelay=0,this.currDelay=t,t;if(0==this.attemptNum)return this.initialDelay;if(1==this.attemptNum)return this.currDelay=this.minDelay,this.currDelay;this.prevDelay=this.currDelay;var e=this.currDelay+this.prevDelay;return this.maxDelay&&e>this.maxDelay&&(this.currDelay=this.maxDelay,e=this.maxDelay),this.currDelay=e,e}},{key:"randomize",value:function(t){var e=t*this.randomness,n=Math.round(Math.random()*e*2-e);return Math.max(0,t+n)}},{key:"scheduleAttempt",value:function(t){var e=this;if(this.maxAttemptsCount&&this.attemptNum>=this.maxAttemptsCount)return this.cleanup(),void this.emit("failed",new Error("Maximum attempt count limit reached"));var n=this.nextDelay(t);if(n=this.randomize(n),this.maxAttemptsTime&&this.startTimestamp+this.maxAttemptsTime<Date.now()+n)return this.cleanup(),void this.emit("failed",new Error("Maximum attempt time limit reached"));this.timeout=setTimeout((function(){return e.attempt()}),n)}},{key:"cleanup",value:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.inProgress=!1,this.attemptNum=0,this.prevDelay=0,this.currDelay=0}},{key:"start",value:function(){if(this.inProgress)throw new Error("Retrier is already in progress");this.inProgress=!0,this.startTimestamp=Date.now(),this.scheduleAttempt(this.initialDelay)}},{key:"cancel",value:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null,this.inProgress=!1,this.emit("cancelled"))}},{key:"succeeded",value:function(t){this.emit("succeeded",t)}},{key:"failed",value:function(t,e){if(this.timeout)throw new Error("Retrier attempt is already in progress");this.scheduleAttempt(e)}}]),n}(Tu),Uu=function(t){hr(n,t);var e=Bu(n);function n(t){var r;return ar(this,n),mr(fr(r=e.call(this)),"resolve",(function(){})),mr(fr(r),"reject",(function(){})),r.retrier=new zu(t),r}return sr(n,[{key:"run",value:function(t){var e=this;return this.retrier.on("attempt",(function(){t().then((function(t){return e.retrier.succeeded(t)})).catch((function(t){return e.retrier.failed(t)}))})),this.retrier.on("succeeded",(function(t){return e.resolve(t)})),this.retrier.on("cancelled",(function(){return e.reject(new Error("Cancelled"))})),this.retrier.on("failed",(function(t){return e.reject(t)})),new Promise((function(t,n){e.resolve=t,e.reject=n,e.retrier.start()}))}},{key:"cancel",value:function(){this.retrier.cancel()}}]),n}(Tu);function Wu(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=yr(t);if(e){var o=yr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return vr(this,n)}}function qu(t){return null!=t}var Ku=function(t){hr(n,t);var e=Wu(n);function n(t){var r;ar(this,n),mr(fr(r=e.call(this)),"backoffDelay",0),mr(fr(r),"nextBackoffDelay",0),mr(fr(r),"backoffNumber",0),mr(fr(r),"timeoutID",null),mr(fr(r),"maxNumberOfRetry",-1);var o=t=t||{},i=o.initialDelay,u=o.maxDelay,a=o.randomisationFactor,c=o.factor;if(qu(i)&&i<1)throw new Error("The initial timeout must be equal to or greater than 1.");if(qu(u)&&u<=1)throw new Error("The maximal timeout must be greater than 1.");if(qu(a)&&(a<0||a>1))throw new Error("The randomisation factor must be between 0 and 1.");if(qu(c)&&c<=1)throw new Error("Exponential factor should be greater than 1.");if(r.initialDelay=i||100,r.maxDelay=u||1e4,r.maxDelay<=r.initialDelay)throw new Error("The maximal backoff delay must be greater than the initial backoff delay.");return r.randomisationFactor=a||0,r.factor=c||2,r.reset(),r}return sr(n,[{key:"backoff",value:function(t){null==this.timeoutID&&(this.backoffNumber===this.maxNumberOfRetry?(this.emit("fail",t),this.reset()):(this.backoffDelay=this.next(),this.timeoutID=setTimeout(this.onBackoff.bind(this),this.backoffDelay),this.emit("backoff",this.backoffNumber,this.backoffDelay,t)))}},{key:"reset",value:function(){this.backoffDelay=0,this.nextBackoffDelay=this.initialDelay,this.backoffNumber=0,this.timeoutID&&clearTimeout(this.timeoutID),this.timeoutID=null}},{key:"failAfter",value:function(t){if(t<=0)throw new Error("Expected a maximum number of retry greater than 0 but got ".concat(t));this.maxNumberOfRetry=t}},{key:"next",value:function(){this.backoffDelay=Math.min(this.nextBackoffDelay,this.maxDelay),this.nextBackoffDelay=this.backoffDelay*this.factor;var t=1+Math.random()*this.randomisationFactor;return Math.min(this.maxDelay,Math.round(this.backoffDelay*t))}},{key:"onBackoff",value:function(){this.timeoutID=null,this.emit("ready",this.backoffNumber,this.backoffDelay),this.backoffNumber++}}],[{key:"exponential",value:function(t){return new n(t)}}]),n}(Tu);return t.AsyncRetrier=Uu,t.Backoff=Ku,t.Retrier=zu,Object.defineProperty(t,"__esModule",{value:!0}),t}({});
{
"name": "@twilio/operation-retrier",
"version": "4.0.5-rc.1",
"version": "4.0.5-rc.2",
"description": "RTD retrier",

@@ -33,3 +33,3 @@ "author": "Sergei Chertkov",

"@babel/runtime": "^7.14.5",
"core-js": "^3.14.0"
"core-js": "^3.17.3"
},

@@ -36,0 +36,0 @@ "devDependencies": {

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc