botframework-directlinejs 0.15.9 → 0.15.10-master.9739039

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see directline.js.LICENSE.txt */
2
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.DirectLine=e():t.DirectLine=e()}(self,function(){return function(){var t={2258:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default=function(){var t={};return t.promise=new Promise(function(e,r){t.reject=r,t.resolve=e}),t}},842:function(t,e,r){"use strict";var n=r(4994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=[];return t.forEach(function(t){for(var r=(0,i.default)(t),n=r.extname,o=r.name,s=0,u=t;e.includes(u);)u=[o,"(".concat(++s,")")].filter(function(t){return t}).join(" ")+n;e.push(u)}),e};var i=n(r(4227))},3822:function(t,e,r){"use strict";var n=r(4994),i=r(3738);Object.defineProperty(e,"__esModule",{value:!0}),e.DirectLine=e.ConnectionStatus=void 0,Object.defineProperty(e,"DirectLineStreaming",{enumerable:!0,get:function(){return d.DirectLineStreaming}});var o=n(r(1847)),s=n(r(7383)),u=n(r(4579)),a=n(r(3693));r(5781),r(8318);var c=r(3114),f=r(9707),l=r(1518),h=function(t){if("function"==typeof WeakMap){var e=new WeakMap;new WeakMap}return function(t){if(t&&t.__esModule)return t;var r,n,o={__proto__:null,default:t};if(null===t||"object"!=i(t)&&"function"!=typeof t)return o;if(r=e){if(r.has(t))return r.get(t);r.set(t,o)}for(var s in t)"default"!==s&&{}.hasOwnProperty.call(t,s)&&((n=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(t,s))&&(n.get||n.set)?r(o,s,n):o[s]=t[s]);return o}(t)}(r(6765));r(3690),r(3071),r(2166),r(298),r(3576),r(1239),r(4359),r(2639),r(4983),r(731),r(1734),r(4166),r(4553),r(7033),r(7694),r(5103),r(3783),r(8540);var p=n(r(842)),d=r(5592),y=["contentUrl"];function v(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function b(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?v(Object(r),!0).forEach(function(e){(0,a.default)(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}var g=e.ConnectionStatus=function(t){return t[t.Uninitialized=0]="Uninitialized",t[t.Connecting=1]="Connecting",t[t.Online=2]="Online",t[t.ExpiredToken=3]="ExpiredToken",t[t.FailedToConnect=4]="FailedToConnect",t[t.Ended=5]="Ended",t}({}),m=function(t,e){var r=function(){throw new Error("not implemented")};return Object.assign(function(r){return t(r).catch(function(t){if(429===t.status){var r=t.xhr.getResponseHeader("Retry-After"),n=Number(r);if(!isNaN(n))return f.Observable.timer(n,e).flatMap(function(r){return f.Observable.throw(t,e)})}return f.Observable.throw(t,e)})},{get:function(t,e){return r()},post:function(t,e,n){return r()},put:function(t,e,n){return r()},patch:function(t,e,n){return r()},delete:function(t,e){return r()},getJSON:function(t,e){return r()}})},w=new Error("expired token"),x=new Error("conversation ended"),_=new Error("failed to connect"),S=function(t){for(var e,r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];"undefined"!=typeof window&&window.botchatDebug&&t&&(e=console).log.apply(e,[t].concat(n))};e.DirectLine=function(){return(0,u.default)(function t(e){var r,n;(0,s.default)(this,t),(0,a.default)(this,"connectionStatus$",new c.BehaviorSubject(g.Uninitialized)),(0,a.default)(this,"domain","https://directline.botframework.com/v3/directline"),(0,a.default)(this,"watermark",""),(0,a.default)(this,"_botAgent",""),(0,a.default)(this,"timeout",2e4),(0,a.default)(this,"pollingInterval",1e3),this.secret=e.secret,this.token=e.secret||e.token,this.webSocket=(void 0===e.webSocket||e.webSocket)&&"undefined"!=typeof WebSocket&&void 0!==WebSocket,e.streaming&&(this.streaming=e.streaming),e.conversationStartProperties&&e.conversationStartProperties.locale&&("[object String]"===Object.prototype.toString.call(e.conversationStartProperties.locale)?this.localeOnStartConversation=e.conversationStartProperties.locale:console.warn("DirectLineJS: conversationStartProperties.locale was ignored: the locale name may be a BCP 47 language tag")),e.domain&&(this.domain=e.domain),e.conversationId&&(this.conversationId=e.conversationId),e.watermark&&(this.watermark=e.watermark),e.streamUrl&&(e.token&&e.conversationId?this.streamUrl=e.streamUrl:console.warn("DirectLineJS: streamUrl was ignored: you need to provide a token and a conversationid")),void 0!==e.timeout&&(this.timeout=e.timeout),this.retries=9e5/this.timeout,this._botAgent=this.getBotAgent(e.botAgent),this.services={scheduler:n=(r=e).scheduler||l.async,ajax:m(r.ajax||f.Observable.ajax,n),WebSocket:r.WebSocket||WebSocket,random:r.random||Math.random};var i=~~e.pollingInterval;i<200?void 0!==e.pollingInterval&&console.warn("DirectLineJS: provided pollingInterval (".concat(e.pollingInterval,") is under lower bound (200ms), using default of 1000ms")):this.pollingInterval=i,this.expiredTokenExhaustion=this.setConnectionStatusFallback(g.ExpiredToken,g.FailedToConnect,5),this.activity$=(this.webSocket?this.webSocketActivity$():this.pollingGetActivity$()).share()},[{key:"checkConnection",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=this.connectionStatus$.flatMap(function(e){return e===g.Uninitialized?(t.connectionStatus$.next(g.Connecting),t.token&&t.streamUrl?(t.connectionStatus$.next(g.Online),f.Observable.of(e,t.services.scheduler)):t.startConversation().do(function(e){t.conversationId=e.conversationId,t.token=t.secret||e.token,t.streamUrl=e.streamUrl,t.referenceGrammarId=e.referenceGrammarId,t.secret||t.refreshTokenLoop(),t.connectionStatus$.next(g.Online)},function(e){t.connectionStatus$.next(g.FailedToConnect)}).map(function(t){return e})):f.Observable.of(e,t.services.scheduler)}).filter(function(t){return t!=g.Uninitialized&&t!=g.Connecting}).flatMap(function(e){switch(e){case g.Ended:return f.Observable.throw(x,t.services.scheduler);case g.FailedToConnect:return f.Observable.throw(_,t.services.scheduler);case g.ExpiredToken:default:return f.Observable.of(e,t.services.scheduler)}});return e?r.take(1):r}},{key:"setConnectionStatusFallback",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5;r--;var n=0,i=null;return function(o){return o===t&&i===o&&n>=r?(n=0,e):(n++,i=o,o)}}},{key:"expiredToken",value:function(){var t=this.connectionStatus$.getValue();t!=g.Ended&&t!=g.FailedToConnect&&this.connectionStatus$.next(g.ExpiredToken);var e=this.expiredTokenExhaustion(this.connectionStatus$.getValue());this.connectionStatus$.next(e)}},{key:"startConversation",value:function(){var t=this,e=this.conversationId?"".concat(this.domain,"/conversations/").concat(this.conversationId,"?watermark=").concat(this.watermark):"".concat(this.domain,"/conversations"),r=this.conversationId?"GET":"POST",n=this.conversationId?void 0:{user:{id:this.userIdOnStartConversation},locale:this.localeOnStartConversation};return this.services.ajax({method:r,url:e,body:n,timeout:this.timeout,headers:b({Accept:"application/json","Content-Type":"application/json"},this.commonHeaders())}).map(function(t){return t.response}).retryWhen(function(e){return e.mergeMap(function(e){return e.status>=400&&e.status<600?f.Observable.throw(e,t.services.scheduler):f.Observable.of(e,t.services.scheduler)}).delay(t.timeout,t.services.scheduler).take(t.retries)})}},{key:"refreshTokenLoop",value:function(){var t=this;this.tokenRefreshSubscription=f.Observable.interval(9e5,this.services.scheduler).flatMap(function(e){return t.refreshToken()}).subscribe(function(e){S("refreshing token",e,"at",new Date),t.token=e})}},{key:"refreshToken",value:function(){var t=this;return this.checkConnection(!0).flatMap(function(e){return t.services.ajax({method:"POST",url:"".concat(t.domain,"/tokens/refresh"),timeout:t.timeout,headers:b({},t.commonHeaders())}).map(function(t){return t.response.token}).retryWhen(function(e){return e.mergeMap(function(e){return 403===e.status?(t.expiredToken(),f.Observable.throw(e,t.services.scheduler)):404===e.status?f.Observable.throw(e,t.services.scheduler):f.Observable.of(e,t.services.scheduler)}).delay(t.timeout,t.services.scheduler).take(t.retries)})})}},{key:"reconnect",value:function(t){this.token=t.token,this.streamUrl=t.streamUrl,this.connectionStatus$.getValue()===g.ExpiredToken&&this.connectionStatus$.next(g.Online)}},{key:"end",value:function(){this.tokenRefreshSubscription&&this.tokenRefreshSubscription.unsubscribe();try{this.connectionStatus$.next(g.Ended)}catch(t){if(t===x)return;throw t}}},{key:"getSessionId",value:function(){var t=this;return S("getSessionId"),this.checkConnection(!0).flatMap(function(e){return t.services.ajax({method:"GET",url:"".concat(t.domain,"/session/getsessionid"),withCredentials:!0,timeout:t.timeout,headers:b({"Content-Type":"application/json"},t.commonHeaders())}).map(function(t){return t&&t.response&&t.response.sessionId?(S("getSessionId response: "+t.response.sessionId),t.response.sessionId):""}).catch(function(e){return S("getSessionId error: "+e.status),f.Observable.of("",t.services.scheduler)})}).catch(function(e){return t.catchExpiredToken(e)})}},{key:"postActivity",value:function(t){var e=this;return this.streaming&&(t.deliveryMode="stream"),this.userIdOnStartConversation&&t.from&&t.from.id!==this.userIdOnStartConversation&&(console.warn("DirectLineJS: Activity.from.id does not match with user id, ignoring activity.from.id"),t.from.id=this.userIdOnStartConversation),"message"===t.type&&t.attachments&&t.attachments.length>0?this.postMessageWithAttachments(t):(S("postActivity",t),this.checkConnection(!0).flatMap(function(r){return e.services.ajax({method:"POST",url:"".concat(e.domain,"/conversations/").concat(e.conversationId,"/activities"),body:t,timeout:e.timeout,headers:b({"Content-Type":"application/json"},e.commonHeaders())}).map(function(t){return t.response.id}).catch(function(t){return e.catchPostError(t)})}).catch(function(t){return e.catchExpiredToken(t)}))}},{key:"postMessageWithAttachments",value:function(t){var e,r=this,n=t.attachments,i=(0,p.default)(n.map(function(t){return t.name||"blob"})),s=n.map(function(t,e){return b(b({},t),{},{name:i[e]})});return this.checkConnection(!0).flatMap(function(n){return(e=new FormData).append("activity",new Blob([JSON.stringify(b(b({},t),{},{attachments:s.map(function(t){return t.contentUrl,b({},(0,o.default)(t,y))})}))],{type:"application/vnd.microsoft.activity"})),f.Observable.from(s,r.services.scheduler).flatMap(function(t){return r.services.ajax({method:"GET",url:t.contentUrl,responseType:"arraybuffer"}).do(function(r){return e.append("file",new Blob([r.response],{type:t.contentType}),t.name)})}).count()}).flatMap(function(n){return r.services.ajax({method:"POST",url:"".concat(r.domain,"/conversations/").concat(r.conversationId,"/upload?userId=").concat(t.from.id),body:e,timeout:r.timeout,headers:b({},r.commonHeaders())}).map(function(t){return t.response.id}).catch(function(t){return r.catchPostError(t)})}).catch(function(t){return r.catchPostError(t)})}},{key:"catchPostError",value:function(t){if(403===t.status)this.expiredToken();else if(t.status>=400&&t.status<500)return f.Observable.throw(t,this.services.scheduler);return f.Observable.of("retry",this.services.scheduler)}},{key:"catchExpiredToken",value:function(t){return t===w?f.Observable.of("retry",this.services.scheduler):f.Observable.throw(t,this.services.scheduler)}},{key:"pollingGetActivity$",value:function(){var t=this,e=f.Observable.create(function(e){var r=new c.BehaviorSubject({});r.subscribe(function(){if(t.connectionStatus$.getValue()===g.Online){var n=Date.now();t.services.ajax({headers:b({Accept:"application/json"},t.commonHeaders()),method:"GET",url:"".concat(t.domain,"/conversations/").concat(t.conversationId,"/activities?watermark=").concat(t.watermark),timeout:t.timeout}).subscribe(function(i){e.next(i),setTimeout(function(){return r.next(null)},Math.max(0,t.pollingInterval-Date.now()+n))},function(n){switch(n.status){case 403:t.connectionStatus$.next(g.ExpiredToken),setTimeout(function(){return r.next(null)},t.pollingInterval);break;case 404:t.connectionStatus$.next(g.Ended);break;default:e.error(n)}})}})});return this.checkConnection().flatMap(function(r){return e.catch(function(){return f.Observable.empty()}).map(function(t){return t.response}).flatMap(function(e){return t.observableFromActivityGroup(e)})})}},{key:"observableFromActivityGroup",value:function(t){return t.watermark&&(this.watermark=t.watermark),f.Observable.from(t.activities,this.services.scheduler)}},{key:"webSocketActivity$",value:function(){var t=this;return this.checkConnection().flatMap(function(e){return t.observableWebSocket().retryWhen(function(e){return e.delay(t.getRetryDelay(),t.services.scheduler).mergeMap(function(e){return t.reconnectToConversation()})})}).flatMap(function(e){return t.observableFromActivityGroup(e)})}},{key:"getRetryDelay",value:function(){return Math.floor(3e3+12e3*this.services.random())}},{key:"observableWebSocket",value:function(){var t=this;return f.Observable.create(function(e){S("creating WebSocket",t.streamUrl);var r,n,i=new t.services.WebSocket(t.streamUrl);return i.onopen=function(e){S("WebSocket open",e),r=f.Observable.interval(t.timeout,t.services.scheduler).subscribe(function(t){try{i.send("")}catch(t){S("Ping error",t)}})},i.onclose=function(t){S("WebSocket close",t),r&&r.unsubscribe(),n||e.error(t),n=!0},i.onerror=function(t){S("WebSocket error",t),r&&r.unsubscribe(),n||e.error(t),n=!0},i.onmessage=function(t){return t.data&&e.next(JSON.parse(t.data))},function(){0!==i.readyState&&1!==i.readyState||i.close()}})}},{key:"reconnectToConversation",value:function(){var t=this;return this.checkConnection(!0).flatMap(function(e){return t.services.ajax({method:"GET",url:"".concat(t.domain,"/conversations/").concat(t.conversationId,"?watermark=").concat(t.watermark),timeout:t.timeout,headers:b({Accept:"application/json"},t.commonHeaders())}).do(function(e){t.secret||(t.token=e.response.token),t.streamUrl=e.response.streamUrl}).map(function(t){return null}).retryWhen(function(e){return e.mergeMap(function(e){if(403===e.status)t.expiredToken();else if(404===e.status)return f.Observable.throw(x,t.services.scheduler);return f.Observable.of(e,t.services.scheduler)}).delay(t.timeout,t.services.scheduler).take(t.retries)})})}},{key:"commonHeaders",value:function(){return{Authorization:"Bearer ".concat(this.token),"x-ms-bot-agent":this._botAgent}}},{key:"getBotAgent",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e="directlinejs";return t&&(e+="; ".concat(t)),"".concat("DirectLine/3.0"," (").concat(e," ").concat("0.15.9",")")}},{key:"setUserId",value:function(t){if(this.connectionStatus$.getValue()===g.Online)throw new Error("DirectLineJS: It is connected, we cannot set user id.");return this.parseToken(this.token)?console.warn("DirectLineJS: user id is already set in token, will ignore this user id."):/^dl_/.test(t)?console.warn('DirectLineJS: user id prefixed with "dl_" is reserved and must be embedded into the Direct Line token to prevent forgery.'):void(this.userIdOnStartConversation=t)}},{key:"parseToken",value:function(t){try{return(0,h.default)(t).user}catch(t){if(t instanceof h.InvalidTokenError)return}}}])}()},5592:function(t,e,r){"use strict";var n=r(4994),i=r(3738);Object.defineProperty(e,"__esModule",{value:!0}),e.DirectLineStreaming=void 0;var o=n(r(1847)),s=n(r(4756)),u=n(r(1132)),a=n(r(9293)),c=n(r(7383)),f=n(r(4579)),l=n(r(3693)),h=r(3114),p=r(1545),d=r(9707),y=function(t){if("function"==typeof WeakMap){var e=new WeakMap;new WeakMap}return function(t){if(t&&t.__esModule)return t;var r,n,o={__proto__:null,default:t};if(null===t||"object"!=i(t)&&"function"!=typeof t)return o;if(r=e){if(r.has(t))return r.get(t);r.set(t,o)}for(var s in t)"default"!==s&&{}.hasOwnProperty.call(t,s)&&((n=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(t,s))&&(n.get||n.set)?r(o,s,n):o[s]=t[s]);return o}(t)}(r(8296)),v=n(r(2258)),b=n(r(4945)),g=r(3822),m=n(r(3266)),w=["attachments"];function x(t,e){return t.get(_(t,e))}function _(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}var S=function(){return(0,f.default)(function t(e,r,n){(0,c.default)(this,t),(0,l.default)(this,"activityQueue",[]),this.subscriber=e,this.connectionStatus$=r,this.shouldQueue=n},[{key:"setSubscriber",value:function(t){this.subscriber=t}},{key:"processRequest",value:(t=(0,a.default)(s.default.mark(function t(e,r){var n,i,o,a,c,f,l,h,p;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=(0,u.default)(e.streams),i=n.shift(),t.next=1,i.readAsString();case 1:if(o=t.sent,1===(a=JSON.parse(o)).activities.length){t.next=2;break}return this.subscriber.error(new Error("there should be exactly one activity")),t.abrupt("return",y.StreamingResponse.create(500));case 2:if(c=a.activities[0],!(n.length>0)){t.next=6;break}f=(0,u.default)(c.attachments);case 3:if(!(l=n.shift())){t.next=5;break}return t.next=4,l.readAsString();case 4:h=t.sent,p="data:text/plain;base64,"+h,f.push({contentType:l.contentType,contentUrl:p}),t.next=3;break;case 5:c.attachments=f;case 6:return this.shouldQueue()?this.activityQueue.push(c):this.subscriber.next(c),t.abrupt("return",y.StreamingResponse.create(200));case 7:case"end":return t.stop()}},t,this)})),function(e,r){return t.apply(this,arguments)})},{key:"flush",value:function(){var t=this;this.connectionStatus$.subscribe(function(){}),this.activityQueue.forEach(function(e){return t.subscriber.next(e)}),this.activityQueue=[]}},{key:"end",value:function(){this.subscriber.complete()}}]);var t}(),O=new WeakMap;e.DirectLineStreaming=function(){return(0,f.default)(function t(e){var r=this;(0,c.default)(this,t),(0,l.default)(this,"connectionStatus$",new h.BehaviorSubject(g.ConnectionStatus.Uninitialized)),(0,l.default)(this,"_botAgent",""),function(t,e,r){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,r)}(this,O,void 0);var n,i,o=null==e?void 0:e.networkInformation;void 0===o||"function"==typeof o.addEventListener&&"function"==typeof o.removeEventListener&&"string"==typeof o.type?(i=o,(n=O).set(_(n,this),i)):console.warn('botframework-directlinejs: "networkInformation" option specified must be a `NetworkInformation`-like instance extending `EventTarget` interface with a `type` property returning a string.'),this.token=e.token,this.refreshToken().catch(function(){r.connectionStatus$.next(g.ConnectionStatus.ExpiredToken)}),this.domain=e.domain,e.conversationId&&(this.conversationId=e.conversationId),this._botAgent=this.getBotAgent(e.botAgent),this.queueActivities=!0,this.activity$=d.Observable.create(function(){var t=(0,a.default)(s.default.mark(function t(e){return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r.activitySubscriber=e,r.theStreamHandler=new S(e,r.connectionStatus$,function(){return r.queueActivities}),r.connectDeferred.resolve();case 1:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()).share(),this.connectWithRetryAsync()},[{key:"reconnect",value:function(t){var e=t.conversationId,r=t.token;if(this.connectionStatus$.getValue()===g.ConnectionStatus.Ended)throw new Error("Connection has ended.");this.conversationId=e,this.token=r,this.connectDeferred.resolve()}},{key:"end",value:function(){this.activitySubscriber.complete(),this.connectionStatus$.next(g.ConnectionStatus.Ended),this.connectionStatus$.complete(),this.streamConnection.disconnect()}},{key:"commonHeaders",value:function(){return{Authorization:"Bearer ".concat(this.token),"x-ms-bot-agent":this._botAgent}}},{key:"getBotAgent",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e="directlineStreaming";return t&&(e+="; ".concat(t)),"".concat("DirectLine/3.0"," (").concat(e,")")}},{key:"refreshToken",value:(n=(0,a.default)(s.default.mark(function t(){var e,r,n,i,o;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,this.waitUntilOnline();case 1:e=0;case 2:if(!(e<3)){t.next=10;break}return e++,t.next=3,new Promise(function(t){return setTimeout(t,9e5)});case 3:return t.prev=3,t.next=4,(0,b.default)("".concat(this.domain,"/tokens/refresh"),{method:"POST",headers:this.commonHeaders()});case 4:if(!(r=t.sent).ok){t.next=6;break}return e=0,t.next=5,r.json();case 5:n=t.sent,i=n.token,this.token=i,t.next=7;break;case 6:403===r.status||403===r.status?(console.error("Fatal error while refreshing the token: ".concat(r.status," ").concat(r.statusText)),this.streamConnection.disconnect()):console.warn("Refresh attempt #".concat(e," failed: ").concat(r.status," ").concat(r.statusText));case 7:t.next=9;break;case 8:t.prev=8,o=t.catch(3),console.warn("Refresh attempt #".concat(e," threw an exception: ").concat(o));case 9:t.next=2;break;case 10:console.error("Retries exhausted"),this.streamConnection.disconnect();case 11:case"end":return t.stop()}},t,this,[[3,8]])})),function(){return n.apply(this,arguments)})},{key:"postActivity",value:function(t){var e=this;if(this.connectionStatus$.value===g.ConnectionStatus.Ended||this.connectionStatus$.value===g.ConnectionStatus.FailedToConnect)return d.Observable.throw(new Error("Connection is closed"));if("message"===t.type&&t.attachments&&t.attachments.length>0)return this.postMessageWithAttachments(t);var r=d.Observable.create(function(){var r=(0,a.default)(s.default.mark(function r(n){var i,o,u,a,c,f,l;return s.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return(i=y.StreamingRequest.create("POST","/v3/directline/conversations/"+e.conversationId+"/activities")).setBody(JSON.stringify(t)),r.prev=1,r.next=2,e.streamConnection.send(i);case 2:if(200===(o=r.sent).statusCode){r.next=3;break}throw new Error("PostActivity returned "+o.statusCode);case 3:if(1===(u=o.streams.length)){r.next=4;break}throw new Error("Expected one stream but got "+u);case 4:return r.next=5,o.streams[0].readAsString();case 5:return a=r.sent,c=JSON.parse(a),f=c.Id,n.next(f),r.abrupt("return",n.complete());case 6:return r.prev=6,l=r.catch(1),console.warn(l),e.streamConnection.disconnect(),r.abrupt("return",n.error(l));case 7:case"end":return r.stop()}},r,null,[[1,6]])}));return function(t){return r.apply(this,arguments)}}());return r}},{key:"postMessageWithAttachments",value:function(t){var e=this,r=t.attachments,n=(0,o.default)(t,w);return d.Observable.create(function(t){var i=[];(0,a.default)(s.default.mark(function o(){var u,c,f,l,h,d,v;return s.default.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,o.next=1,Promise.all(r.map(function(){var t=(0,a.default)(s.default.mark(function t(e){var r,n,i,o;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=e,t.next=1,(0,b.default)(r.contentUrl);case 1:if(!(n=t.sent).ok){t.next=3;break}return t.next=2,n.arrayBuffer();case 2:return i=t.sent,o=r,t.abrupt("return",{arrayBuffer:i,media:o});case 3:throw new Error("...");case 4:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()));case 1:return o.sent.forEach(function(t){var e=t.arrayBuffer,r=t.media,n=p.Buffer.from(e),o=new y.SubscribableStream;o.write(n);var s=new y.HttpContent({type:r.contentType,contentLength:n.length},o);i.push(s)}),u="/v3/directline/conversations/".concat(e.conversationId,"/users/").concat(n.from.id,"/upload"),c=y.StreamingRequest.create("PUT",u),(f=new y.SubscribableStream).write(JSON.stringify(n),"utf-8"),c.addStream(new y.HttpContent({type:"application/vnd.microsoft.activity",contentLength:f.length},f)),i.forEach(function(t){return c.addStream(t)}),o.next=2,e.streamConnection.send(c);case 2:if(!(l=o.sent).streams||1===l.streams.length){o.next=3;break}t.error(new Error("Invalid stream count ".concat(l.streams.length))),o.next=5;break;case 3:return o.next=4,l.streams[0].readAsJson();case 4:h=o.sent,d=h.Id,t.next(d),t.complete();case 5:o.next=7;break;case 6:o.prev=6,v=o.catch(0),t.error(v);case 7:case"end":return o.stop()}},o,null,[[0,6]])}))()})}},{key:"waitUntilOnline",value:(r=(0,a.default)(s.default.mark(function t(){var e=this;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(t,r){e.connectionStatus$.subscribe(function(e){if(e===g.ConnectionStatus.Online)return t()},function(t){return r(t)})}));case 1:case"end":return t.stop()}},t)})),function(){return r.apply(this,arguments)})},{key:"connectAsync",value:(e=(0,a.default)(s.default.mark(function t(){var e,r,n,i,o,u=this;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=new RegExp("^http(s?)")).test(this.domain)){t.next=1;break}throw"Domain must begin with http or https";case 1:return r={token:this.token},this.conversationId&&(r.conversationId=this.conversationId),n=new AbortController,i=new URLSearchParams(r).toString(),o="".concat(this.domain.replace(e,"ws$1"),"/conversations/connect?").concat(i),t.abrupt("return",new Promise(function(){var t=(0,a.default)(s.default.mark(function t(e,r){var i,a,c,f,l;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,u.streamConnection=new m.default({disconnectionHandler:e,networkInformation:x(O,u),requestHandler:{processRequest:function(t){if(n.signal.aborted)throw new Error("Cannot process streaming request, `streamingConnection` should be disconnected.");return u.theStreamHandler.processRequest(t)}},url:o}),u.queueActivities=!0,t.next=1,u.streamConnection.connect();case 1:return i=y.StreamingRequest.create("POST","/v3/directline/conversations"),t.next=2,u.streamConnection.send(i);case 2:if(200===(a=t.sent).statusCode){t.next=3;break}throw new Error("Connection response code "+a.statusCode);case 3:if(1===a.streams.length){t.next=4;break}throw new Error("Expected 1 stream but got "+a.streams.length);case 4:return t.next=5,a.streams[0].readAsString();case 5:return c=t.sent,f=JSON.parse(c),u.conversationId=f.conversationId,u.connectionStatus$.next(g.ConnectionStatus.Online),t.next=6,u.waitUntilOnline();case 6:u.theStreamHandler.flush(),u.queueActivities=!1,t.next=8;break;case 7:t.prev=7,l=t.catch(0),r(l);case 8:case"end":return t.stop()}},t,null,[[0,7]])}));return function(e,r){return t.apply(this,arguments)}}()).finally(function(){return n.abort()}));case 2:case"end":return t.stop()}},t,this)})),function(){return e.apply(this,arguments)})},{key:"connectWithRetryAsync",value:(t=(0,a.default)(s.default.mark(function t(){var e,r,n,i=this;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,(this.connectDeferred=(0,v.default)()).promise;case 1:e=3,this.connectionStatus$.next(g.ConnectionStatus.Connecting);case 2:if(!(e>0)){t.next=10;break}return e--,r=Date.now(),t.prev=3,t.next=4,this.connectAsync();case 4:t.next=6;break;case 5:t.prev=5,n=t.catch(3),console.error(n);case 6:if(this.connectionStatus$.getValue()!==g.ConnectionStatus.Ended){t.next=7;break}return t.abrupt("return");case 7:if(this.connectionStatus$.getValue()!==g.ConnectionStatus.Connecting&&this.connectionStatus$.next(g.ConnectionStatus.Connecting),!(6e4<Date.now()-r)){t.next=8;break}e=3,t.next=9;break;case 8:if(!(e>0)){t.next=9;break}return t.next=9,new Promise(function(t){return setTimeout(t,i.getRetryDelay())});case 9:t.next=2;break;case 10:this.connectionStatus$.next(g.ConnectionStatus.FailedToConnect);case 11:t.next=0;break;case 12:case"end":return t.stop()}},t,this,[[3,5]])})),function(){return t.apply(this,arguments)})},{key:"getRetryDelay",value:function(){return Math.floor(3e3+12e3*Math.random())}}]);var t,e,r,n}()},4227:function(t,e,r){"use strict";var n=r(4994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if(t){if(~t.indexOf(".")){var e=t.split(".").reverse(),r=(0,i.default)(e);return{extname:"."+r[0],name:function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}(r).slice(1).reverse().join(".")}}return{extname:"",name:t}}return{extname:"",name:""}};var i=n(r(8053))},3266:function(t,e,r){"use strict";var n=r(4994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(r(7383)),o=n(r(4579)),s=n(r(8452)),u=n(r(3072)),a=n(r(2395)),c=n(r(9511)),f=r(8296);function l(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(l=function(){return!!t})()}function h(t,e,r,n){var i=(0,a.default)((0,u.default)(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof i?function(t){return i.apply(r,t)}:i}function p(t,e,r){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,r)}function d(t,e){return t.get(v(t,e))}function y(t,e,r){return t.set(v(t,e),r),r}function v(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}var b=new WeakMap,g=new WeakMap,m=new WeakMap,w=new WeakMap;e.default=function(t){function e(t){var r,n,o,a,c=t.disconnectionHandler,f=t.networkInformation,h=t.requestHandler,v=t.url;return(0,i.default)(this,e),n=this,o=e,a=[{disconnectionHandler:c,requestHandler:h,url:v}],o=(0,u.default)(o),p(r=(0,s.default)(n,l()?Reflect.construct(o,a||[],(0,u.default)(n).constructor):o.apply(n,a)),b,!1),p(r,g,function(){return d(m,r)===d(w,r).type||r.disconnect()}),p(r,m,void 0),p(r,w,void 0),y(w,r,f),r}return(0,c.default)(e,t),(0,o.default)(e,[{key:"connect",value:function(){if(d(b,this))return console.warn("botframework-directlinejs: connect() can only be called once."),Promise.resolve();if(y(b,this,!0),d(w,this)){var t=d(w,this).type;if(y(m,this,t),"none"===t)return console.warn("botframework-directlinejs: Failed to connect while offline."),Promise.reject(new Error("botframework-directlinejs: Failed to connect while offline."));d(w,this).addEventListener("change",d(g,this))}return h(e,"connect",this,3)([])}},{key:"disconnect",value:function(){var t;null===(t=d(w,this))||void 0===t||t.removeEventListener("change",d(g,this)),h(e,"disconnect",this,3)([])}}])}(f.WebSocketClient)},8296:function(t,e,r){"use strict";var n=r(4994),i=n(r(4756)),o=n(r(5715)),s=n(r(3693)),u=n(r(7383)),a=n(r(4579)),c=n(r(2475)),f=n(r(8452)),l=n(r(3072)),h=n(r(9511)),p=n(r(3738));function d(t,e,r){return e=(0,l.default)(e),(0,f.default)(t,y()?Reflect.construct(e,r||[],(0,l.default)(t).constructor):e.apply(t,r))}function y(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(y=function(){return!!t})()}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var b,g,m=Object.create,w=Object.defineProperty,x=Object.getOwnPropertyDescriptor,_=Object.getOwnPropertyNames,S=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty,E=Math.pow,k=function(t,e){return function(){return t&&(e=t(t=0)),e}},T=function(t,e){return function(){return e||t((e={exports:{}}).exports,e),e.exports}},j=function(t,e){for(var r in e)w(t,r,{get:e[r],enumerable:!0})},A=function(t,e,r,n){if(e&&"object"==(0,p.default)(e)||"function"==typeof e){var i,o=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return v(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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 o,s=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){u=!0,o=t},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw o}}}}(_(e));try{var s=function(){var o=i.value;!O.call(t,o)&&o!==r&&w(t,o,{get:function(){return e[o]},enumerable:!(n=x(e,o))||n.enumerable})};for(o.s();!(i=o.n()).done;)s()}catch(t){o.e(t)}finally{o.f()}}return t},R=function(t,e,r){return r=null!=t?m(S(t)):{},A(!e&&t&&t.__esModule?r:w(r,"default",{value:t,enumerable:!0}),t)},P=function(t){return A(w({},"__esModule",{value:!0}),t)},M=function(t,e,r){return new Promise(function(n,i){var o=function(t){try{u(r.next(t))}catch(t){i(t)}},s=function(t){try{u(r.throw(t))}catch(t){i(t)}},u=function(t){return t.done?n(t.value):Promise.resolve(t.value).then(o,s)};u((r=r.apply(t,e)).next())})},I=k(function(){}),B=k(function(){R(D(),1)}),C=T(function(t,e){F(),I(),B(),L();var r,n,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(t){n=s}}();var a,c=[],f=!1,l=-1;function h(){!f||!a||(f=!1,a.length?c=a.concat(c):l=-1,c.length&&p())}function p(){if(!f){var t=u(h);f=!0;for(var e=c.length;e;){for(a=c,c=[];++l<e;)a&&a[l].run();l=-1,e=c.length}a=null,f=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{return n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function y(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new d(t,e)),1===c.length&&!f&&u(p)},d.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=y,i.addListener=y,i.once=y,i.off=y,i.removeListener=y,i.removeAllListeners=y,i.emit=y,i.prependListener=y,i.prependOnceListener=y,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}}),L=k(function(){b=R(C(),1)}),U=T(function(t){F(),I(),B(),L(),t.byteLength=function(t){var e=s(t),r=e[0],n=e[1];return 3*(r+n)/4-n},t.toByteArray=function(t){var e,r,o=s(t),u=o[0],a=o[1],c=new i(function(t,e,r){return 3*(e+r)/4-r}(0,u,a)),f=0,l=a>0?u-4:u;for(r=0;r<l;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],c[f++]=e>>16&255,c[f++]=e>>8&255,c[f++]=255&e;return 2===a&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[f++]=255&e),1===a&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[f++]=e>>8&255,c[f++]=255&e),c},t.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=16383,u=0,c=n-i;u<c;u+=s)o.push(a(t,u,u+s>c?c:u+s));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};var e,r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(e=0;e<64;++e)r[e]=o[e],n[o.charCodeAt(e)]=e;function s(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function u(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function a(t,e,r){for(var n,i=[],o=e;o<r;o+=3)n=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),i.push(u(n));return i.join("")}n[45]=62,n[95]=63}),N=T(function(t){F(),I(),B(),L(),t.read=function(t,e,r,n,i){var o,s,u=8*i-n-1,a=(1<<u)-1,c=a>>1,f=-7,l=r?i-1:0,h=r?-1:1,p=t[e+l];for(l+=h,o=p&(1<<-f)-1,p>>=-f,f+=u;f>0;o=256*o+t[e+l],l+=h,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+t[e+l],l+=h,f-=8);if(0===o)o=1-c;else{if(o===a)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=c}return(p?-1:1)*s*Math.pow(2,o-n)},t.write=function(t,e,r,n,i,o){var s,u,a,c=8*o-i-1,f=(1<<c)-1,l=f>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(a=Math.pow(2,-s))<1&&(s--,a*=2),(e+=s+l>=1?h/a:h*Math.pow(2,1-l))*a>=2&&(s++,a/=2),s+l>=f?(u=0,s=f):s+l>=1?(u=(e*a-1)*Math.pow(2,i),s+=l):(u=e*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&u,p+=d,u/=256,i-=8);for(s=s<<i|u,c+=i;c>0;t[r+p]=255&s,p+=d,s/=256,c-=8);t[r+p-d]|=128*y}}),D=T(function(t){F(),I(),B(),L();var e=U(),r=N(),n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=s,t.SlowBuffer=function(t){return+t!=t&&(t=0),s.alloc(+t)},t.INSPECT_MAX_BYTES=50;var i=2147483647;function o(t){if(t>i)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,s.prototype),e}function s(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return y(t)}return f(t,e,r)}function f(t,e,r){if("string"==typeof t)return function(t,e){if(("string"!=typeof e||""===e)&&(e="utf8"),!s.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|m(t,e),n=o(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(st(t,Uint8Array)){var e=new Uint8Array(t);return b(e.buffer,e.byteOffset,e.byteLength)}return v(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(0,p.default)(t));if(st(t,ArrayBuffer)||t&&st(t.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(st(t,SharedArrayBuffer)||t&&st(t.buffer,SharedArrayBuffer)))return b(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return s.from(n,e,r);var i=function(t){if(s.isBuffer(t)){var e=0|g(t.length),r=o(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||ut(t.length)?o(0):v(t):"Buffer"===t.type&&Array.isArray(t.data)?v(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return s.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(0,p.default)(t))}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function y(t){return l(t),o(t<0?0:0|g(t))}function v(t){for(var e=t.length<0?0:0|g(t.length),r=o(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function b(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,s.prototype),n}function g(t){if(t>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|t}function m(t,e){if(s.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||st(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+(0,p.default)(t));var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return nt(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return it(t).length;default:if(i)return n?-1:nt(t).length;e=(""+e).toLowerCase(),i=!0}}function w(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0)||(r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return q(this,e,r);case"utf8":case"utf-8":return P(this,e,r);case"ascii":return C(this,e,r);case"latin1":case"binary":return D(this,e,r);case"base64":return R(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return W(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function x(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function _(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),ut(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=s.from(e,n)),s.isBuffer(e))return 0===e.length?-1:S(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):S(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function S(t,e,r,n,i){var o,s=1,u=t.length,a=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,u/=2,a/=2,r/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var f=-1;for(o=r;o<u;o++)if(c(t,o)===c(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===a)return f*s}else-1!==f&&(o-=o-f),f=-1}else for(r+a>u&&(r=u-a),o=r;o>=0;o--){for(var l=!0,h=0;h<a;h++)if(c(t,o+h)!==c(e,h)){l=!1;break}if(l)return o}return-1}function O(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o,s=e.length;for(n>s/2&&(n=s/2),o=0;o<n;++o){var u=parseInt(e.substr(2*o,2),16);if(ut(u))return o;t[r+o]=u}return o}function k(t,e,r,n){return ot(nt(e,t.length-r),t,r,n)}function T(t,e,r,n){return ot(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function j(t,e,r,n){return ot(it(e),t,r,n)}function A(t,e,r,n){return ot(function(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)n=(r=t.charCodeAt(s))>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function R(t,r,n){return 0===r&&n===t.length?e.fromByteArray(t):e.fromByteArray(t.slice(r,n))}function P(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o=t[i],s=null,u=o>239?4:o>223?3:o>191?2:1;if(i+u<=r){var a=void 0,c=void 0,f=void 0,l=void 0;switch(u){case 1:o<128&&(s=o);break;case 2:128==(192&(a=t[i+1]))&&(l=(31&o)<<6|63&a)>127&&(s=l);break;case 3:a=t[i+1],c=t[i+2],128==(192&a)&&128==(192&c)&&(l=(15&o)<<12|(63&a)<<6|63&c)>2047&&(l<55296||l>57343)&&(s=l);break;case 4:a=t[i+1],c=t[i+2],f=t[i+3],128==(192&a)&&128==(192&c)&&128==(192&f)&&(l=(15&o)<<18|(63&a)<<12|(63&c)<<6|63&f)>65535&&l<1114112&&(s=l)}}null===s?(s=65533,u=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),i+=u}return function(t){var e=t.length;if(e<=M)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=M));return r}(n)}t.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),!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}}),s.poolSize=8192,s.from=function(t,e,r){return f(t,e,r)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(t,e,r){return function(t,e,r){return l(t),t<=0?o(t):void 0!==e?"string"==typeof r?o(t).fill(e,r):o(t).fill(e):o(t)}(t,e,r)},s.allocUnsafe=function(t){return y(t)},s.allocUnsafeSlow=function(t){return y(t)},s.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==s.prototype},s.compare=function(t,e){if(st(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),st(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},s.isEncoding=function(t){switch(String(t).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(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=s.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var o=t[r];if(st(o,Uint8Array))i+o.length>n.length?(s.isBuffer(o)||(o=s.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else{if(!s.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i)}i+=o.length}return n},s.byteLength=m,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)x(this,e,e+1);return this},s.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)x(this,e,e+3),x(this,e+1,e+2);return this},s.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)x(this,e,e+7),x(this,e+1,e+6),x(this,e+2,e+5),x(this,e+3,e+4);return this},s.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?P(this,0,t):w.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},n&&(s.prototype[n]=s.prototype.inspect),s.prototype.compare=function(t,e,r,n,i){if(st(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+(0,p.default)(t));if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),u=(r>>>=0)-(e>>>=0),a=Math.min(o,u),c=this.slice(n,i),f=t.slice(e,r),l=0;l<a;++l)if(c[l]!==f[l]){o=c[l],u=f[l];break}return o<u?-1:u<o?1:0},s.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},s.prototype.indexOf=function(t,e,r){return _(this,t,e,r,!0)},s.prototype.lastIndexOf=function(t,e,r){return _(this,t,e,r,!1)},s.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return O(this,t,e,r);case"utf8":case"utf-8":return k(this,t,e,r);case"ascii":case"latin1":case"binary":return T(this,t,e,r);case"base64":return j(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var M=4096;function C(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function D(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function q(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=at[t[o]];return i}function W(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function H(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function G(t,e,r,n,i,o){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function z(t,e,r,n,i){Z(e,n,i,t,r,7);var o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;var s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,r}function V(t,e,r,n,i){Z(e,n,i,t,r,7);var o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;var s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s>>=8,t[r+2]=s,s>>=8,t[r+1]=s,s>>=8,t[r]=s,r+8}function $(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Y(t,e,n,i,o){return e=+e,n>>>=0,o||$(t,0,n,4),r.write(t,e,n,i,23,4),n+4}function J(t,e,n,i,o){return e=+e,n>>>=0,o||$(t,0,n,8),r.write(t,e,n,i,52,8),n+8}s.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var n=this.subarray(t,e);return Object.setPrototypeOf(n,s.prototype),n},s.prototype.readUintLE=s.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||H(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},s.prototype.readUintBE=s.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||H(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},s.prototype.readUint8=s.prototype.readUInt8=function(t,e){return t>>>=0,e||H(t,1,this.length),this[t]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(t,e){return t>>>=0,e||H(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(t,e){return t>>>=0,e||H(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(t,e){return t>>>=0,e||H(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(t,e){return t>>>=0,e||H(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readBigUInt64LE=ct(function(t){tt(t>>>=0,"offset");var e=this[t],r=this[t+7];(void 0===e||void 0===r)&&et(t,this.length-8);var n=e+this[++t]*E(2,8)+this[++t]*E(2,16)+this[++t]*E(2,24),i=this[++t]+this[++t]*E(2,8)+this[++t]*E(2,16)+r*E(2,24);return BigInt(n)+(BigInt(i)<<BigInt(32))}),s.prototype.readBigUInt64BE=ct(function(t){tt(t>>>=0,"offset");var e=this[t],r=this[t+7];(void 0===e||void 0===r)&&et(t,this.length-8);var n=e*E(2,24)+this[++t]*E(2,16)+this[++t]*E(2,8)+this[++t],i=this[++t]*E(2,24)+this[++t]*E(2,16)+this[++t]*E(2,8)+r;return(BigInt(n)<<BigInt(32))+BigInt(i)}),s.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||H(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},s.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||H(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},s.prototype.readInt8=function(t,e){return t>>>=0,e||H(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){t>>>=0,e||H(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(t,e){t>>>=0,e||H(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(t,e){return t>>>=0,e||H(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return t>>>=0,e||H(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readBigInt64LE=ct(function(t){tt(t>>>=0,"offset");var e=this[t],r=this[t+7];(void 0===e||void 0===r)&&et(t,this.length-8);var n=this[t+4]+this[t+5]*E(2,8)+this[t+6]*E(2,16)+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+this[++t]*E(2,8)+this[++t]*E(2,16)+this[++t]*E(2,24))}),s.prototype.readBigInt64BE=ct(function(t){tt(t>>>=0,"offset");var e=this[t],r=this[t+7];(void 0===e||void 0===r)&&et(t,this.length-8);var n=(e<<24)+this[++t]*E(2,16)+this[++t]*E(2,8)+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*E(2,24)+this[++t]*E(2,16)+this[++t]*E(2,8)+r)}),s.prototype.readFloatLE=function(t,e){return t>>>=0,e||H(t,4,this.length),r.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return t>>>=0,e||H(t,4,this.length),r.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return t>>>=0,e||H(t,8,this.length),r.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return t>>>=0,e||H(t,8,this.length),r.read(this,t,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||G(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||G(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},s.prototype.writeUint8=s.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||G(this,t,e,1,255,0),this[e]=255&t,e+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||G(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||G(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||G(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||G(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeBigUInt64LE=ct(function(t){return z(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=ct(function(t){return V(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);G(this,t,e,r,i-1,-i)}var o=0,s=1,u=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===u&&0!==this[e+o-1]&&(u=1),this[e+o]=(t/s|0)-u&255;return e+r},s.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);G(this,t,e,r,i-1,-i)}var o=r-1,s=1,u=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===u&&0!==this[e+o+1]&&(u=1),this[e+o]=(t/s|0)-u&255;return e+r},s.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||G(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||G(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||G(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||G(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},s.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||G(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeBigInt64LE=ct(function(t){return z(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=ct(function(t){return V(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeFloatLE=function(t,e,r){return Y(this,t,e,!0,r)},s.prototype.writeFloatBE=function(t,e,r){return Y(this,t,e,!1,r)},s.prototype.writeDoubleLE=function(t,e,r){return J(this,t,e,!0,r)},s.prototype.writeDoubleBE=function(t,e,r){return J(this,t,e,!1,r)},s.prototype.copy=function(t,e,r,n){if(!s.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&0!==n&&(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r||0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},s.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var i=t.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(t=i)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var u=s.isBuffer(t)?t:s.from(t,n),a=u.length;if(0===a)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<r-e;++o)this[o+e]=u[o%a]}return this};var X={};function K(t,e,r){X[t]=function(r){function n(){var r;return(0,u.default)(this,n),r=d(this,n),Object.defineProperty((0,c.default)(r),"message",{value:e.apply((0,c.default)(r),arguments),writable:!0,configurable:!0}),r.name="".concat(r.name," [").concat(t,"]"),r.stack,delete r.name,r}return(0,h.default)(n,r),(0,a.default)(n,[{key:"code",get:function(){return t},set:function(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}},{key:"toString",value:function(){return"".concat(this.name," [").concat(t,"]: ").concat(this.message)}}])}(r)}function Q(t){for(var e="",r=t.length,n="-"===t[0]?1:0;r>=n+4;r-=3)e="_".concat(t.slice(r-3,r)).concat(e);return"".concat(t.slice(0,r)).concat(e)}function Z(t,e,r,n,i,o){if(t>r||t<e){var s,u="bigint"==typeof e?"n":"";throw s=0===e||e===BigInt(0)?">= 0".concat(u," and < 2").concat(u," ** ").concat(8*(o+1)).concat(u):">= -(2".concat(u," ** ").concat(8*(o+1)-1).concat(u,") and < 2 ** ").concat(8*(o+1)-1).concat(u),new X.ERR_OUT_OF_RANGE("value",s,t)}!function(t,e,r){tt(e,"offset"),(void 0===t[e]||void 0===t[e+r])&&et(e,t.length-(r+1))}(n,i,o)}function tt(t,e){if("number"!=typeof t)throw new X.ERR_INVALID_ARG_TYPE(e,"number",t)}function et(t,e,r){throw Math.floor(t)!==t?(tt(t,r),new X.ERR_OUT_OF_RANGE("offset","an integer",t)):e<0?new X.ERR_BUFFER_OUT_OF_BOUNDS:new X.ERR_OUT_OF_RANGE("offset",">= ".concat(0," and <= ",e),t)}K("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?"".concat(t," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),K("ERR_INVALID_ARG_TYPE",function(t,e){return'The "'.concat(t,'" argument must be of type number. Received type ').concat((0,p.default)(e))},TypeError),K("ERR_OUT_OF_RANGE",function(t,e,r){var n='The value of "'.concat(t,'" is out of range.'),i=r;return Number.isInteger(r)&&Math.abs(r)>E(2,32)?i=Q(String(r)):"bigint"==typeof r&&(i=String(r),(r>E(BigInt(2),BigInt(32))||r<-E(BigInt(2),BigInt(32)))&&(i=Q(i)),i+="n"),n+" It must be ".concat(e,". Received ").concat(i)},RangeError);var rt=/[^+/0-9A-Za-z-_]/g;function nt(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function it(t){return e.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(rt,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function ot(t,e,r,n){var i;for(i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function st(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function ut(t){return t!=t}var at=function(){for(var t="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)e[n+i]=t[r]+t[i];return e}();function ct(t){return"undefined"==typeof BigInt?ft:t}function ft(){throw new Error("BigInt not supported")}}),F=k(function(){g=R(D())});function q(){q.init.call(this)}function W(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+(0,p.default)(t))}function H(t){return void 0===t._maxListeners?q.defaultMaxListeners:t._maxListeners}function G(t,e,r,n){var i,o,s,u;if(W(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),s=o[e]),void 0===s)s=o[e]=r,++t._eventsCount;else if("function"==typeof s?s=o[e]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=H(t))>0&&s.length>i&&!s.warned){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=t,a.type=e,a.count=s.length,u=a,console&&console.warn&&console.warn(u)}return t}function z(){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 V(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=z.bind(n);return i.listener=r,n.wrapFn=i,i}function $(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):X(i,i.length)}function J(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function X(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}var K,Q,Z,tt,et,rt,nt,it=k(function(){F(),I(),B(),L(),Z="object"==("undefined"==typeof Reflect?"undefined":(0,p.default)(Reflect))?Reflect:null,tt=Z&&"function"==typeof Z.apply?Z.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)},Q=Z&&"function"==typeof Z.ownKeys?Z.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)},et=Number.isNaN||function(t){return t!=t},K=q,q.EventEmitter=q,q.prototype._events=void 0,q.prototype._eventsCount=0,q.prototype._maxListeners=void 0,rt=10,Object.defineProperty(q,"defaultMaxListeners",{enumerable:!0,get:function(){return rt},set:function(t){if("number"!=typeof t||t<0||et(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");rt=t}}),q.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},q.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||et(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},q.prototype.getMaxListeners=function(){return H(this)},q.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var n="error"===t,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var u=i[t];if(void 0===u)return!1;if("function"==typeof u)tt(u,this,e);else{var a=u.length,c=X(u,a);for(r=0;r<a;++r)tt(c[r],this,e)}return!0},q.prototype.addListener=function(t,e){return G(this,t,e,!1)},q.prototype.on=q.prototype.addListener,q.prototype.prependListener=function(t,e){return G(this,t,e,!0)},q.prototype.once=function(t,e){return W(e),this.on(t,V(this,t,e)),this},q.prototype.prependOnceListener=function(t,e){return W(e),this.prependListener(t,V(this,t,e)),this},q.prototype.removeListener=function(t,e){var r,n,i,o,s;if(W(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,s||e)}return this},q.prototype.off=q.prototype.removeListener,q.prototype.removeAllListeners=function(t){var e,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},q.prototype.listeners=function(t){return $(this,t,!0)},q.prototype.rawListeners=function(t){return $(this,t,!1)},q.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):J.call(t,e)},q.prototype.listenerCount=J,q.prototype.eventNames=function(){return this._eventsCount>0?Q(this._events):[]},(nt=K).EventEmitter,nt.defaultMaxListeners,nt.init,nt.listenerCount,nt.EventEmitter,nt.defaultMaxListeners,nt.init,nt.listenerCount}),ot={};j(ot,{EventEmitter:function(){return st},default:function(){return nt},defaultMaxListeners:function(){return ut},init:function(){return at},listenerCount:function(){return ct},on:function(){return ft},once:function(){return lt}});var st,ut,at,ct,ft,lt,ht=k(function(){F(),I(),B(),L(),it(),it(),nt.once=function(t,e){return new Promise(function(r,n){function i(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];void 0!==o&&t.removeListener("error",o),r(n)}var o;"error"!==e&&(o=function(e){t.removeListener(name,i),n(e)},t.once("error",o)),t.once(e,i)})},nt.on=function(t,e){var r=[],n=[],o=null,u=!1,a=(0,s.default)({next:function(){return M(this,null,i.default.mark(function t(){var e,s;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e=r.shift())){t.next=1;break}return t.abrupt("return",createIterResult(e,!1));case 1:if(!o){t.next=2;break}return s=Promise.reject(o),t.abrupt("return",(o=null,s));case 2:return t.abrupt("return",u?createIterResult(void 0,!0):new Promise(function(t,e){return n.push({resolve:t,reject:e})}));case 3:case"end":return t.stop()}},t)}))},return:function(){return M(this,null,i.default.mark(function r(){var o,s;return i.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:for(t.removeListener(e,c),t.removeListener("error",f),u=!0,o=0,s=n;o<s.length;o++)s[o].resolve(createIterResult(void 0,!0));return r.abrupt("return",createIterResult(void 0,!0));case 1:case"end":return r.stop()}},r)}))},throw:function(r){o=r,t.removeListener(e,c),t.removeListener("error",f)}},Symbol.asyncIterator,function(){return this});return t.on(e,c),t.on("error",f),a;function c(){for(var t=n.shift(),e=arguments.length,i=new Array(e),o=0;o<e;o++)i[o]=arguments[o];t?t.resolve(createIterResult(i,!1)):r.push(i)}function f(t){u=!0;var e=n.shift();e?e.reject(t):o=t,a.return()}};var t=nt;st=t.EventEmitter,ut=t.defaultMaxListeners,at=t.init,ct=t.listenerCount,ft=t.on,lt=t.once}),pt=T(function(t,e){F(),I(),B(),L(),"function"==typeof Object.create?e.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}}),dt=T(function(t,e){F(),I(),B(),L(),e.exports=(ht(),P(ot)).EventEmitter});function yt(){throw new Error("setTimeout has not been defined")}function vt(){throw new Error("clearTimeout has not been defined")}function bt(t){if(St===setTimeout)return setTimeout(t,0);if((St===yt||!St)&&setTimeout)return St=setTimeout,setTimeout(t,0);try{return St(t,0)}catch(e){try{return St.call(null,t,0)}catch(e){return St.call(this||Et,t,0)}}}function gt(){At&&Tt&&(At=!1,Tt.length?jt=Tt.concat(jt):Rt=-1,jt.length&&mt())}function mt(){if(!At){var t=bt(gt);At=!0;for(var e=jt.length;e;){for(Tt=jt,jt=[];++Rt<e;)Tt&&Tt[Rt].run();Rt=-1,e=jt.length}Tt=null,At=!1,function(t){if(Ot===clearTimeout)return clearTimeout(t);if((Ot===vt||!Ot)&&clearTimeout)return Ot=clearTimeout,clearTimeout(t);try{Ot(t)}catch(e){try{return Ot.call(null,t)}catch(e){return Ot.call(this||Et,t)}}}(t)}}function wt(t,e){(this||Et).fun=t,(this||Et).array=e}function xt(){}var _t,St,Ot,Et,kt,Tt,jt,At,Rt,Pt,Mt=k(function(){F(),I(),B(),L(),Et="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:globalThis,kt=_t={},function(){try{St="function"==typeof setTimeout?setTimeout:yt}catch(t){St=yt}try{Ot="function"==typeof clearTimeout?clearTimeout:vt}catch(t){Ot=vt}}(),jt=[],At=!1,Rt=-1,kt.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];jt.push(new wt(t,e)),1!==jt.length||At||bt(mt)},wt.prototype.run=function(){(this||Et).fun.apply(null,(this||Et).array)},kt.title="browser",kt.browser=!0,kt.env={},kt.argv=[],kt.version="",kt.versions={},kt.on=xt,kt.addListener=xt,kt.once=xt,kt.off=xt,kt.removeListener=xt,kt.removeAllListeners=xt,kt.emit=xt,kt.prependListener=xt,kt.prependOnceListener=xt,kt.listeners=function(t){return[]},kt.binding=function(t){throw new Error("process.binding is not supported")},kt.cwd=function(){return"/"},kt.chdir=function(t){throw new Error("process.chdir is not supported")},kt.umask=function(){return 0},(Pt=_t).argv,Pt.binding,Pt.browser,Pt.chdir,Pt.cwd,Pt.emit,Pt.env,Pt.listeners,Pt.nextTick,Pt.off,Pt.on,Pt.once,Pt.prependListener,Pt.prependOnceListener,Pt.removeAllListeners,Pt.removeListener,Pt.title,Pt.umask,Pt.version,Pt.versions});function It(t){return t.call.bind(t)}function Bt(t,e){if("object"!=(0,p.default)(t))return!1;try{return e(t),!0}catch(t){return!1}}function Ct(t){return Qe&&Ke?void 0!==Y(t):Lt(t)||Ut(t)||Nt(t)||Dt(t)||Ft(t)||qt(t)||Wt(t)||Ht(t)||Gt(t)||zt(t)||Vt(t)}function Lt(t){return Qe&&Ke?"Uint8Array"===Y(t):"[object Uint8Array]"===tr(t)||Ve(t)&&void 0!==t.buffer}function Ut(t){return Qe&&Ke?"Uint8ClampedArray"===Y(t):"[object Uint8ClampedArray]"===tr(t)}function Nt(t){return Qe&&Ke?"Uint16Array"===Y(t):"[object Uint16Array]"===tr(t)}function Dt(t){return Qe&&Ke?"Uint32Array"===Y(t):"[object Uint32Array]"===tr(t)}function Ft(t){return Qe&&Ke?"Int8Array"===Y(t):"[object Int8Array]"===tr(t)}function qt(t){return Qe&&Ke?"Int16Array"===Y(t):"[object Int16Array]"===tr(t)}function Wt(t){return Qe&&Ke?"Int32Array"===Y(t):"[object Int32Array]"===tr(t)}function Ht(t){return Qe&&Ke?"Float32Array"===Y(t):"[object Float32Array]"===tr(t)}function Gt(t){return Qe&&Ke?"Float64Array"===Y(t):"[object Float64Array]"===tr(t)}function zt(t){return Qe&&Ke?"BigInt64Array"===Y(t):"[object BigInt64Array]"===tr(t)}function Vt(t){return Qe&&Ke?"BigUint64Array"===Y(t):"[object BigUint64Array]"===tr(t)}function $t(t){return"[object Map]"===tr(t)}function Yt(t){return"[object Set]"===tr(t)}function Jt(t){return"[object WeakMap]"===tr(t)}function Xt(t){return"[object WeakSet]"===tr(t)}function Kt(t){return"[object ArrayBuffer]"===tr(t)}function Qt(t){return"undefined"!=typeof ArrayBuffer&&(Kt.working?Kt(t):t instanceof ArrayBuffer)}function Zt(t){return"[object DataView]"===tr(t)}function te(t){return"undefined"!=typeof DataView&&(Zt.working?Zt(t):t instanceof DataView)}function ee(t){return"[object SharedArrayBuffer]"===tr(t)}function re(t){return"undefined"!=typeof SharedArrayBuffer&&(ee.working?ee(t):t instanceof SharedArrayBuffer)}function ne(t){return Bt(t,er)}function ie(t){return Bt(t,rr)}function oe(t){return Bt(t,nr)}function se(t){return Je&&Bt(t,ms)}function ue(t){return Xe&&Bt(t,ys)}function ae(t,e){var r={seen:[],stylize:fe};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),ye(e)?r.showHidden=e:e&&or._extend(r,e),me(r.showHidden)&&(r.showHidden=!1),me(r.depth)&&(r.depth=2),me(r.colors)&&(r.colors=!1),me(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=ce),le(r,t,r.depth)}function ce(t,e){var r=ae.styles[e];return r?"["+ae.colors[r][0]+"m"+t+"["+ae.colors[r][1]+"m":t}function fe(t,e){return t}function le(t,e,r){if(t.customInspect&&e&&Oe(e.inspect)&&e.inspect!==or.inspect&&(!e.constructor||e.constructor.prototype!==e)){var n=e.inspect(r,t);return ge(n)||(n=le(t,n,r)),n}var i=function(t,e){if(me(e))return t.stylize("undefined","undefined");if(ge(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return be(e)?t.stylize(""+e,"number"):ye(e)?t.stylize(""+e,"boolean"):ve(e)?t.stylize("null","null"):void 0}(t,e);if(i)return i;var o,s=Object.keys(e),u=(o={},s.forEach(function(t,e){o[t]=!0}),o);if(t.showHidden&&(s=Object.getOwnPropertyNames(e)),Se(e)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return he(e);if(0===s.length){if(Oe(e)){var a=e.name?": "+e.name:"";return t.stylize("[Function"+a+"]","special")}if(we(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(_e(e))return t.stylize(Date.prototype.toString.call(e),"date");if(Se(e))return he(e)}var c,f="",l=!1,h=["{","}"];return de(e)&&(l=!0,h=["[","]"]),Oe(e)&&(f=" [Function"+(e.name?": "+e.name:"")+"]"),we(e)&&(f=" "+RegExp.prototype.toString.call(e)),_e(e)&&(f=" "+Date.prototype.toUTCString.call(e)),Se(e)&&(f=" "+he(e)),0!==s.length||l&&0!=e.length?r<0?we(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),c=l?function(t,e,r,n,i){for(var o=[],s=0,u=e.length;s<u;++s)Te(e,String(s))?o.push(pe(t,e,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(pe(t,e,r,n,i,!0))}),o}(t,e,r,u,s):s.map(function(n){return pe(t,e,r,u,n,l)}),t.seen.pop(),function(t,e,r){return t.reduce(function(t,e){return e.indexOf("\n"),t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}(c,f,h)):h[0]+f+h[1]}function he(t){return"["+Error.prototype.toString.call(t)+"]"}function pe(t,e,r,n,i,o){var s,u,a;if((a=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?u=a.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):a.set&&(u=t.stylize("[Setter]","special")),Te(n,i)||(s="["+i+"]"),u||(t.seen.indexOf(a.value)<0?(u=ve(r)?le(t,a.value,null):le(t,a.value,r-1)).indexOf("\n")>-1&&(u=o?u.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+u.split("\n").map(function(t){return" "+t}).join("\n")):u=t.stylize("[Circular]","special")),me(s)){if(o&&i.match(/^\d+$/))return u;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+u}function de(t){return Array.isArray(t)}function ye(t){return"boolean"==typeof t}function ve(t){return null===t}function be(t){return"number"==typeof t}function ge(t){return"string"==typeof t}function me(t){return void 0===t}function we(t){return xe(t)&&"[object RegExp]"===Ee(t)}function xe(t){return"object"==(0,p.default)(t)&&null!==t}function _e(t){return xe(t)&&"[object Date]"===Ee(t)}function Se(t){return xe(t)&&("[object Error]"===Ee(t)||t instanceof Error)}function Oe(t){return"function"==typeof t}function Ee(t){return Object.prototype.toString.call(t)}function ke(t){return t<10?"0"+t.toString(10):t.toString(10)}function Te(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function je(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}var Ae,Re,Pe,Me,Ie,Be,Ce,Le,Ue,Ne,De,Fe,qe,We,He,Ge,ze,Ve,$e,Ye,Je,Xe,Ke,Qe,Ze,tr,er,rr,nr,ir,or,sr,ur,ar,cr,fr,lr,hr,pr,dr=k(function(){if(F(),I(),B(),L(),Mt(),Ae="function"==typeof Symbol&&"symbol"==(0,p.default)(Symbol.toStringTag),Re=Object.prototype.toString,Pe=function(t){return!(Ae&&t&&"object"==(0,p.default)(t)&&Symbol.toStringTag in t)&&"[object Arguments]"===Re.call(t)},Me=function(t){return!!Pe(t)||null!==t&&"object"==(0,p.default)(t)&&"number"==typeof t.length&&t.length>=0&&"[object Array]"!==Re.call(t)&&"[object Function]"===Re.call(t.callee)},Ie=function(){return Pe(arguments)}(),Pe.isLegacyArguments=Me,Be=Ie?Pe:Me,Ce=Object.prototype.toString,Le=Function.prototype.toString,Ue=/^\s*(?:function)?\*/,Ne="function"==typeof Symbol&&"symbol"==(0,p.default)(Symbol.toStringTag),De=Object.getPrototypeOf,Fe=function(){if(!Ne)return!1;try{return Function("return function*() {}")()}catch(t){}}(),qe=Fe?De(Fe):{},We=function(t){return"function"==typeof t&&(!!Ue.test(Le.call(t))||(Ne?De(t)===qe:"[object GeneratorFunction]"===Ce.call(t)))},He="function"==typeof Object.create?function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},ze={},Ve=Ge=function(t){return t&&"object"==(0,p.default)(t)&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8},$e=Be,Ye=We,Je="undefined"!=typeof BigInt,Xe="undefined"!=typeof Symbol,Ke=Xe&&void 0!==Symbol.toStringTag,Qe="undefined"!=typeof Uint8Array,Ze="undefined"!=typeof ArrayBuffer,Qe&&Ke){var t=Object.getPrototypeOf(Uint8Array.prototype);It(Object.getOwnPropertyDescriptor(t,Symbol.toStringTag).get)}tr=It(Object.prototype.toString),er=It(Number.prototype.valueOf),rr=It(String.prototype.valueOf),nr=It(Boolean.prototype.valueOf),Je&&It(BigInt.prototype.valueOf),Xe&&It(Symbol.prototype.valueOf),ze.isArgumentsObject=$e,ze.isGeneratorFunction=Ye,ze.isPromise=function(t){return"undefined"!=typeof Promise&&t instanceof Promise||null!==t&&"object"==(0,p.default)(t)&&"function"==typeof t.then&&"function"==typeof t.catch},ze.isArrayBufferView=function(t){return Ze&&ArrayBuffer.isView?ArrayBuffer.isView(t):Ct(t)||te(t)},ze.isTypedArray=Ct,ze.isUint8Array=Lt,ze.isUint8ClampedArray=Ut,ze.isUint16Array=Nt,ze.isUint32Array=Dt,ze.isInt8Array=Ft,ze.isInt16Array=qt,ze.isInt32Array=Wt,ze.isFloat32Array=Ht,ze.isFloat64Array=Gt,ze.isBigInt64Array=zt,ze.isBigUint64Array=Vt,$t.working="undefined"!=typeof Map&&$t(new Map),ze.isMap=function(t){return"undefined"!=typeof Map&&($t.working?$t(t):t instanceof Map)},Yt.working="undefined"!=typeof Set&&Yt(new Set),ze.isSet=function(t){return"undefined"!=typeof Set&&(Yt.working?Yt(t):t instanceof Set)},Jt.working="undefined"!=typeof WeakMap&&Jt(new WeakMap),ze.isWeakMap=function(t){return"undefined"!=typeof WeakMap&&(Jt.working?Jt(t):t instanceof WeakMap)},Xt.working="undefined"!=typeof WeakSet&&Xt(new WeakSet),ze.isWeakSet=function(t){return Xt(t)},Kt.working="undefined"!=typeof ArrayBuffer&&Kt(new ArrayBuffer),ze.isArrayBuffer=Qt,Zt.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&Zt(new DataView(new ArrayBuffer(1),0,1)),ze.isDataView=te,ee.working="undefined"!=typeof SharedArrayBuffer&&ee(new SharedArrayBuffer),ze.isSharedArrayBuffer=re,ze.isAsyncFunction=function(t){return"[object AsyncFunction]"===tr(t)},ze.isMapIterator=function(t){return"[object Map Iterator]"===tr(t)},ze.isSetIterator=function(t){return"[object Set Iterator]"===tr(t)},ze.isGeneratorObject=function(t){return"[object Generator]"===tr(t)},ze.isWebAssemblyCompiledModule=function(t){return"[object WebAssembly.Module]"===tr(t)},ze.isNumberObject=ne,ze.isStringObject=ie,ze.isBooleanObject=oe,ze.isBigIntObject=se,ze.isSymbolObject=ue,ze.isBoxedPrimitive=function(t){return ne(t)||ie(t)||oe(t)||se(t)||ue(t)},ze.isAnyArrayBuffer=function(t){return Qe&&(Qt(t)||re(t))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(t){Object.defineProperty(ze,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})}),ir="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:globalThis,or={},sr=Pt,ur=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++)r[e[n]]=Object.getOwnPropertyDescriptor(t,e[n]);return r},ar=/%[sdj%]/g,or.format=function(t){if(!ge(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(ae(arguments[r]));return e.join(" ")}r=1;for(var n=arguments,i=n.length,o=String(t).replace(ar,function(t){if("%%"===t)return"%";if(r>=i)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}}),s=n[r];r<i;s=n[++r])ve(s)||!xe(s)?o+=" "+s:o+=" "+ae(s);return o},or.deprecate=function(t,e){if(void 0!==sr&&!0===sr.noDeprecation)return t;if(void 0===sr)return function(){return or.deprecate(t,e).apply(this||ir,arguments)};var r=!1;return function(){if(!r){if(sr.throwDeprecation)throw new Error(e);sr.traceDeprecation?console.trace(e):console.error(e),r=!0}return t.apply(this||ir,arguments)}},cr={},fr=/^$/,sr.env.NODE_DEBUG&&(lr=(lr=sr.env.NODE_DEBUG).replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),fr=new RegExp("^"+lr+"$","i")),or.debuglog=function(t){if(t=t.toUpperCase(),!cr[t])if(fr.test(t)){var e=sr.pid;cr[t]=function(){var r=or.format.apply(or,arguments);console.error("%s %d: %s",t,e,r)}}else cr[t]=function(){};return cr[t]},or.inspect=ae,ae.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]},ae.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},or.types=ze,or.isArray=de,or.isBoolean=ye,or.isNull=ve,or.isNullOrUndefined=function(t){return null==t},or.isNumber=be,or.isString=ge,or.isSymbol=function(t){return"symbol"==(0,p.default)(t)},or.isUndefined=me,or.isRegExp=we,or.types.isRegExp=we,or.isObject=xe,or.isDate=_e,or.types.isDate=_e,or.isError=Se,or.types.isNativeError=Se,or.isFunction=Oe,or.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==(0,p.default)(t)||void 0===t},or.isBuffer=Ge,hr=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],or.log=function(){var t,e;console.log("%s - %s",(e=[ke((t=new Date).getHours()),ke(t.getMinutes()),ke(t.getSeconds())].join(":"),[t.getDate(),hr[t.getMonth()],e].join(" ")),or.format.apply(or,arguments))},or.inherits=He,or._extend=function(t,e){if(!e||!xe(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t},pr="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0,or.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(pr&&t[pr]){var e;if("function"!=typeof(e=t[pr]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,pr,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise(function(t,n){e=t,r=n}),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push(function(t,n){t?r(t):e(n)});try{t.apply(this||ir,i)}catch(t){r(t)}return n}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),pr&&Object.defineProperty(e,pr,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,ur(t))},or.promisify.custom=pr,or.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function e(){for(var e=[],r=0;r<arguments.length;r++)e.push(arguments[r]);var n=e.pop();if("function"!=typeof n)throw new TypeError("The last argument must be of type Function");var i=this||ir,o=function(){return n.apply(i,arguments)};t.apply(this||ir,e).then(function(t){sr.nextTick(o.bind(null,null,t))},function(t){sr.nextTick(je.bind(null,t,o))})}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),Object.defineProperties(e,ur(t)),e}}),yr=k(function(){F(),I(),B(),L(),dr(),Mt(),or._extend,or.callbackify,or.debuglog,or.deprecate,or.format,or.inherits,or.inspect,or.isArray,or.isBoolean,or.isBuffer,or.isDate,or.isError,or.isFunction,or.isNull,or.isNullOrUndefined,or.isNumber,or.isObject,or.isPrimitive,or.isRegExp,or.isString,or.isSymbol,or.isUndefined,or.log,or.promisify,or._extend,or.callbackify,or.debuglog,or.deprecate,or.format,or.inherits,or.inspect,or.isArray,or.isBoolean,or.isBuffer,or.isDate,or.isError,or.isFunction,or.isNull,or.isNullOrUndefined,or.isNumber,or.isObject,or.isPrimitive,or.isRegExp,or.isString,or.isSymbol,or.isUndefined,or.log,or.promisify,or.types}),vr={};j(vr,{TextDecoder:function(){return Hr},TextEncoder:function(){return Wr},_extend:function(){return br},callbackify:function(){return gr},debuglog:function(){return mr},default:function(){return or},deprecate:function(){return wr},format:function(){return xr},inherits:function(){return _r},inspect:function(){return Sr},isArray:function(){return Or},isBoolean:function(){return Er},isBuffer:function(){return kr},isDate:function(){return Tr},isError:function(){return jr},isFunction:function(){return Ar},isNull:function(){return Rr},isNullOrUndefined:function(){return Pr},isNumber:function(){return Mr},isObject:function(){return Ir},isPrimitive:function(){return Br},isRegExp:function(){return Cr},isString:function(){return Lr},isSymbol:function(){return Ur},isUndefined:function(){return Nr},log:function(){return Dr},promisify:function(){return Fr},types:function(){return qr}});var br,gr,mr,wr,xr,_r,Sr,Or,Er,kr,Tr,jr,Ar,Rr,Pr,Mr,Ir,Br,Cr,Lr,Ur,Nr,Dr,Fr,qr,Wr,Hr,Gr=k(function(){F(),I(),B(),L(),yr(),dr(),dr(),Mt(),br=or._extend,gr=or.callbackify,mr=or.debuglog,wr=or.deprecate,xr=or.format,_r=or.inherits,Sr=or.inspect,Or=or.isArray,Er=or.isBoolean,kr=or.isBuffer,Tr=or.isDate,jr=or.isError,Ar=or.isFunction,Rr=or.isNull,Pr=or.isNullOrUndefined,Mr=or.isNumber,Ir=or.isObject,Br=or.isPrimitive,Cr=or.isRegExp,Lr=or.isString,Ur=or.isSymbol,Nr=or.isUndefined,Dr=or.log,Fr=or.promisify,qr=or.types,Wr=or.TextEncoder=globalThis.TextEncoder,Hr=or.TextDecoder=globalThis.TextDecoder}),zr=T(function(t,e){function r(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}F(),I(),B(),L();var i=D().Buffer,o=(Gr(),P(vr)).inspect,s=o&&o.custom||"inspect";function u(t,e,r){i.prototype.copy.call(t,e,r)}e.exports=function(){function t(){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.head=null,this.tail=null,this.length=0}return function(t,e){e&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(t.prototype,e)}(t,[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return i.alloc(0);for(var e=i.allocUnsafe(t>>>0),r=this.head,n=0;r;)u(r.data,e,n),n+=r.data.length,r=r.next;return e}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,n=e.data;for(t-=n.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0===(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=i.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var o=r.data,s=t>o.length?o.length:t;if(o.copy(e,e.length-t,0,s),0===(t-=s)){s===o.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=o.slice(s));break}++n}return this.length-=n,e}},{key:s,value:function(t,e){return o(this,function(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?r(Object(i),!0).forEach(function(e){n(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}({},e,{depth:0,customInspect:!1}))}}]),t}()}),Vr=T(function(t,e){function r(t,e){i(t,e),n(t)}function n(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function i(t,e){t.emit("error",e)}F(),I(),B(),L(),e.exports={destroy:function(t,e){var o=this,s=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return s||u?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,b.nextTick(i,this,t)):b.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!e&&t?o._writableState?o._writableState.errorEmitted?b.nextTick(n,o):(o._writableState.errorEmitted=!0,b.nextTick(r,o,t)):b.nextTick(r,o,t):e?(b.nextTick(n,o),e(t)):b.nextTick(n,o)}),this)},undestroy:function(){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)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}}),$r=T(function(t,e){F(),I(),B(),L();var r={};function n(t,e,n){n||(n=Error);var i=function(t){function r(r,n,i){return t.call(this,function(t,r,n){return"string"==typeof e?e:e(t,r,n)}(r,n,i))||this}return function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(r,t),r}(n);i.prototype.name=n.name,i.prototype.code=t,r[t]=i}function i(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map(function(t){return String(t)}),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}n("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError),n("ERR_INVALID_ARG_TYPE",function(t,e,r){var n,o;if("string"==typeof e&&function(t,e){return t.substr(0,4)===e}(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-9,r)===e}(t," argument"))o="The ".concat(t," ").concat(n," ").concat(i(e,"type"));else{var s=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+1>t.length)&&-1!==t.indexOf(".",r)}(t)?"property":"argument";o='The "'.concat(t,'" ').concat(s," ").concat(n," ").concat(i(e,"type"))}return o+". Received type ".concat((0,p.default)(r))},TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"}),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"}),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=r}),Yr=T(function(t,e){F(),I(),B(),L();var r=$r().codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(t,e,n,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,n);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new r(i?n:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}}),Jr=T(function(t,e){function r(t){try{if(!globalThis.localStorage)return!1}catch(t){return!1}var e=globalThis.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}F(),I(),B(),L(),e.exports=function(t,e){if(r("noDeprecation"))return t;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(e);r("traceDeprecation")?console.trace(e):console.warn(e),n=!0}return t.apply(this,arguments)}}}),Xr=T(function(t,e){function r(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e){var r=t.entry;for(t.entry=null;r;){var n=r.callback;e.pendingcb--,n(void 0),r=r.next}e.corkedRequestsFree.next=t}(e,t)}}var n;F(),I(),B(),L(),e.exports=O,O.WritableState=S;var i,o={deprecate:Jr()},s=dt(),u=D().Buffer,a=globalThis.Uint8Array||function(){},c=Vr(),f=Yr().getHighWaterMark,l=$r().codes,h=l.ERR_INVALID_ARG_TYPE,p=l.ERR_METHOD_NOT_IMPLEMENTED,d=l.ERR_MULTIPLE_CALLBACK,y=l.ERR_STREAM_CANNOT_PIPE,v=l.ERR_STREAM_DESTROYED,g=l.ERR_STREAM_NULL_VALUES,m=l.ERR_STREAM_WRITE_AFTER_END,w=l.ERR_UNKNOWN_ENCODING,x=c.errorOrDestroy;function _(){}function S(t,e,i){n=n||Kr(),t=t||{},"boolean"!=typeof i&&(i=e instanceof n),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=f(this,t,"writableHighWaterMark",i),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===t.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new d;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,i){--e.pendingcb,r?(b.nextTick(i,n),b.nextTick(R,t,e),t._writableState.errorEmitted=!0,x(t,n)):(i(n),t._writableState.errorEmitted=!0,x(t,n),R(t,e))}(t,r,n,e,i);else{var o=j(r)||t.destroyed;!o&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&T(t,r),n?b.nextTick(k,t,r,o,i):k(t,r,o,i)}}(e,t)},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 r(this)}function O(t){var e=this instanceof(n=n||Kr());if(!e&&!i.call(O,this))return new O(t);this._writableState=new S(t,this,e),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 E(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new v("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function k(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),R(t,e)}function T(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var i=e.bufferedRequestCount,o=new Array(i),s=e.corkedRequestsFree;s.entry=n;for(var u=0,a=!0;n;)o[u]=n,n.isBuf||(a=!1),n=n.next,u+=1;o.allBuffers=a,E(t,e,!0,e.length,o,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new r(e),e.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,f=n.encoding,l=n.callback;if(E(t,e,!1,e.objectMode?1:c.length,c,f,l),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function j(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function A(t,e){t._final(function(r){e.pendingcb--,r&&x(t,r),e.prefinished=!0,t.emit("prefinish"),R(t,e)})}function R(t,e){var r=j(e);if(r&&(function(t,e){!e.prefinished&&!e.finalCalled&&("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,b.nextTick(A,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return r}pt()(O,s),S.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(S.prototype,"buffer",{get:o.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(i=Function.prototype[Symbol.hasInstance],Object.defineProperty(O,Symbol.hasInstance,{value:function(t){return!!i.call(this,t)||this===O&&t&&t._writableState instanceof S}})):i=function(t){return t instanceof this},O.prototype.pipe=function(){x(this,new y)},O.prototype.write=function(t,e,r){var n=this._writableState,i=!1,o=!n.objectMode&&function(t){return u.isBuffer(t)||t instanceof a}(t);return o&&!u.isBuffer(t)&&(t=function(t){return u.from(t)}(t)),"function"==typeof e&&(r=e,e=null),o?e="buffer":e||(e=n.defaultEncoding),"function"!=typeof r&&(r=_),n.ending?function(t,e){var r=new m;x(t,r),b.nextTick(e,r)}(this,r):(o||function(t,e,r,n){var i;return null===r?i=new g:"string"!=typeof r&&!e.objectMode&&(i=new h("chunk",["string","Buffer"],r)),!i||(x(t,i),b.nextTick(n,i),!1)}(this,n,t,r))&&(n.pendingcb++,i=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){return!t.objectMode&&!1!==t.decodeStrings&&"string"==typeof e&&(e=u.from(e,r)),e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var c=e.length<e.highWaterMark;if(c||(e.needDrain=!0),e.writing||e.corked){var f=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},f?f.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else E(t,e,!1,a,n,i,o);return c}(this,n,o,t,e,r)),i},O.prototype.cork=function(){this._writableState.corked++},O.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&T(this,t))},O.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new w(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(O.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(O.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),O.prototype._write=function(t,e,r){r(new p("_write()"))},O.prototype._writev=null,O.prototype.end=function(t,e,r){var n=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,r){e.ending=!0,R(t,e),r&&(e.finished?b.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}(this,n,r),this},Object.defineProperty(O.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(O.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),O.prototype.destroy=c.destroy,O.prototype._undestroy=c.undestroy,O.prototype._destroy=function(t,e){e(t)}}),Kr=T(function(t,e){F(),I(),B(),L();var r=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};e.exports=a;var n,i,o,s=nn(),u=Xr();for(pt()(a,s),n=r(u.prototype),o=0;o<n.length;o++)i=n[o],a.prototype[i]||(a.prototype[i]=u.prototype[i]);function a(t){if(!(this instanceof a))return new a(t);s.call(this,t),u.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",c)))}function c(){this._writableState.ended||b.nextTick(f,this)}function f(t){t.end()}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(t){void 0===this._readableState||void 0===this._writableState||(this._readableState.destroyed=t,this._writableState.destroyed=t)}})}),Qr=T(function(t,e){F(),I(),B(),L();var r=D(),n=r.Buffer;function i(t,e){for(var r in t)e[r]=t[r]}function o(t,e,r){return n(t,e,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=o),o.prototype=Object.create(n.prototype),i(n,o),o.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return n(t,e,r)},o.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var i=n(t);return void 0!==e?"string"==typeof r?i.fill(e,r):i.fill(e):i.fill(0),i},o.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n(t)},o.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}}),Zr=T(function(t){F(),I(),B(),L();var e=Qr().Buffer,r=e.isEncoding||function(t){switch((t=""+t)&&t.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 n(t){var n;switch(this.encoding=function(t){var n=function(t){if(!t)return"utf8";for(var e;;)switch(t){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 t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof n&&(e.isEncoding===r||!r(t)))throw new Error("Unknown encoding: "+t);return n||t}(t),this.encoding){case"utf16le":this.text=s,this.end=u,n=4;break;case"utf8":this.fillLast=o,n=4;break;case"base64":this.text=a,this.end=c,n=3;break;default:return this.write=f,void(this.end=l)}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(n)}function i(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function o(t){var e=this.lastTotal-this.lastNeed,r=function(t,e){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function s(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function u(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function a(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function c(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function f(t){return t.toString(this.encoding)}function l(t){return t&&t.length?this.write(t):""}t.StringDecoder=n,n.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},n.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},n.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var o=i(e[n]);return o>=0?(o>0&&(t.lastNeed=o-1),o):--n<r||-2===o?0:(o=i(e[n]))>=0?(o>0&&(t.lastNeed=o-2),o):--n<r||-2===o?0:(o=i(e[n]))>=0?(o>0&&(2===o?o=0:t.lastNeed=o-3),o):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},n.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}}),tn=T(function(t,e){F(),I(),B(),L();var r=$r().codes.ERR_STREAM_PREMATURE_CLOSE;function n(){}e.exports=function t(e,i,o){if("function"==typeof i)return t(e,null,i);i||(i={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}(o||n);var s=i.readable||!1!==i.readable&&e.readable,u=i.writable||!1!==i.writable&&e.writable,a=function(){e.writable||f()},c=e._writableState&&e._writableState.finished,f=function(){u=!1,c=!0,s||o.call(e)},l=e._readableState&&e._readableState.endEmitted,h=function(){s=!1,l=!0,u||o.call(e)},p=function(t){o.call(e,t)},d=function(){var t;return s&&!l?((!e._readableState||!e._readableState.ended)&&(t=new r),o.call(e,t)):u&&!c?((!e._writableState||!e._writableState.ended)&&(t=new r),o.call(e,t)):void 0},y=function(){e.req.on("finish",f)};return function(t){return t.setHeader&&"function"==typeof t.abort}(e)?(e.on("complete",f),e.on("abort",d),e.req?y():e.on("request",y)):u&&!e._writableState&&(e.on("end",a),e.on("close",a)),e.on("end",h),e.on("finish",f),!1!==i.error&&e.on("error",p),e.on("close",d),function(){e.removeListener("complete",f),e.removeListener("abort",d),e.removeListener("request",y),e.req&&e.req.removeListener("finish",f),e.removeListener("end",a),e.removeListener("close",a),e.removeListener("finish",f),e.removeListener("end",h),e.removeListener("error",p),e.removeListener("close",d)}}}),en=T(function(t,e){var r;function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}F(),I(),B(),L();var i=tn(),o=Symbol("lastResolve"),s=Symbol("lastReject"),u=Symbol("error"),a=Symbol("ended"),c=Symbol("lastPromise"),f=Symbol("handlePromise"),l=Symbol("stream");function h(t,e){return{value:t,done:e}}function p(t){var e=t[o];if(null!==e){var r=t[l].read();null!==r&&(t[c]=null,t[o]=null,t[s]=null,e(h(r,!1)))}}function d(t){b.nextTick(p,t)}var y=Object.getPrototypeOf(function(){}),v=Object.setPrototypeOf((n(r={get stream(){return this[l]},next:function(){var t=this,e=this[u];if(null!==e)return Promise.reject(e);if(this[a])return Promise.resolve(h(void 0,!0));if(this[l].destroyed)return new Promise(function(e,r){b.nextTick(function(){t[u]?r(t[u]):e(h(void 0,!0))})});var r,n=this[c];if(n)r=new Promise(function(t,e){return function(r,n){t.then(function(){e[a]?r(h(void 0,!0)):e[f](r,n)},n)}}(n,this));else{var i=this[l].read();if(null!==i)return Promise.resolve(h(i,!1));r=new Promise(this[f])}return this[c]=r,r}},Symbol.asyncIterator,function(){return this}),n(r,"return",function(){var t=this;return new Promise(function(e,r){t[l].destroy(null,function(t){t?r(t):e(h(void 0,!0))})})}),r),y);e.exports=function(t){var e,r=Object.create(v,(n(e={},l,{value:t,writable:!0}),n(e,o,{value:null,writable:!0}),n(e,s,{value:null,writable:!0}),n(e,u,{value:null,writable:!0}),n(e,a,{value:t._readableState.endEmitted,writable:!0}),n(e,f,{value:function(t,e){var n=r[l].read();n?(r[c]=null,r[o]=null,r[s]=null,t(h(n,!1))):(r[o]=t,r[s]=e)},writable:!0}),e));return r[c]=null,i(t,function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[s];return null!==e&&(r[c]=null,r[o]=null,r[s]=null,e(t)),void(r[u]=t)}var n=r[o];null!==n&&(r[c]=null,r[o]=null,r[s]=null,n(h(void 0,!0))),r[a]=!0}),t.on("readable",d.bind(null,r)),r}}),rn=T(function(t,e){F(),I(),B(),L(),e.exports=function(){throw new Error("Readable.from is not available in the browser")}}),nn=T(function(t,e){var r;F(),I(),B(),L(),e.exports=O,O.ReadableState=S,(ht(),P(ot)).EventEmitter;var n,i=function(t,e){return t.listeners(e).length},o=dt(),s=D().Buffer,u=globalThis.Uint8Array||function(){},a=(Gr(),P(vr));n=a&&a.debuglog?a.debuglog("stream"):function(){};var c,f,l,h=zr(),p=Vr(),d=Yr().getHighWaterMark,y=$r().codes,v=y.ERR_INVALID_ARG_TYPE,g=y.ERR_STREAM_PUSH_AFTER_EOF,m=y.ERR_METHOD_NOT_IMPLEMENTED,w=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;pt()(O,o);var x=p.errorOrDestroy,_=["error","close","destroy","pause","resume"];function S(t,e,n){r=r||Kr(),t=t||{},"boolean"!=typeof n&&(n=e instanceof r),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=d(this,t,"readableHighWaterMark",n),this.buffer=new h,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&&(c||(c=Zr().StringDecoder),this.decoder=new c(t.encoding),this.encoding=t.encoding)}function O(t){if(r=r||Kr(),!(this instanceof O))return new O(t);var e=this instanceof r;this._readableState=new S(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),o.call(this)}function E(t,e,r,i,o){n("readableAddChunk",e);var a,c=t._readableState;if(null===e)c.reading=!1,function(t,e){if(n("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?A(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,R(t)))}}(t,c);else if(o||(a=function(t,e){var r;return!function(t){return s.isBuffer(t)||t instanceof u}(e)&&"string"!=typeof e&&void 0!==e&&!t.objectMode&&(r=new v("chunk",["string","Buffer","Uint8Array"],e)),r}(c,e)),a)x(t,a);else if(c.objectMode||e&&e.length>0)if("string"!=typeof e&&!c.objectMode&&Object.getPrototypeOf(e)!==s.prototype&&(e=function(t){return s.from(t)}(e)),i)c.endEmitted?x(t,new w):k(t,c,e,!0);else if(c.ended)x(t,new g);else{if(c.destroyed)return!1;c.reading=!1,c.decoder&&!r?(e=c.decoder.write(e),c.objectMode||0!==e.length?k(t,c,e,!1):M(t,c)):k(t,c,e,!1)}else i||(c.reading=!1,M(t,c));return!c.ended&&(c.length<c.highWaterMark||0===c.length)}function k(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&A(t)),M(t,e)}Object.defineProperty(O.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),O.prototype.destroy=p.destroy,O.prototype._undestroy=p.undestroy,O.prototype._destroy=function(t,e){e(t)},O.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=s.from(t,e),e=""),r=!0),E(this,t,e,!1,r)},O.prototype.unshift=function(t){return E(this,t,null,!0,!1)},O.prototype.isPaused=function(){return!1===this._readableState.flowing},O.prototype.setEncoding=function(t){c||(c=Zr().StringDecoder);var e=new c(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";null!==r;)n+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==n&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var T=1073741824;function j(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=T?t=T:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function A(t){var e=t._readableState;n("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(n("emitReadable",e.flowing),e.emittedReadable=!0,b.nextTick(R,t))}function R(t){var e=t._readableState;n("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,W(t)}function M(t,e){e.readingMore||(e.readingMore=!0,b.nextTick(C,t,e))}function C(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(n("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function U(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function N(t){n("readable nexttick read 0"),t.read(0)}function q(t,e){n("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),W(t),e.flowing&&!e.reading&&t.read(0)}function W(t){var e=t._readableState;for(n("flow",e.flowing);e.flowing&&null!==t.read(););}function H(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function G(t){var e=t._readableState;n("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,b.nextTick(z,e,t))}function z(t,e){if(n("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function V(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}O.prototype.read=function(t){n("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return n("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?G(this):A(this),null;if(0===(t=j(t,e))&&e.ended)return 0===e.length&&G(this),null;var i,o=e.needReadable;return n("need readable",o),(0===e.length||e.length-t<e.highWaterMark)&&n("length less than watermark",o=!0),e.ended||e.reading?n("reading or ended",o=!1):o&&(n("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=j(r,e))),null===(i=t>0?H(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&G(this)),null!==i&&this.emit("data",i),i},O.prototype._read=function(t){x(this,new m("_read()"))},O.prototype.pipe=function(t,e){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,n("pipe count=%d opts=%j",o.pipesCount,e);var s=e&&!1===e.end||t===b.stdout||t===b.stderr?d:u;function u(){n("onend"),t.end()}o.endEmitted?b.nextTick(s):r.once("end",s),t.on("unpipe",function e(i,s){n("onunpipe"),i===r&&s&&!1===s.hasUnpiped&&(s.hasUnpiped=!0,n("cleanup"),t.removeListener("close",h),t.removeListener("finish",p),t.removeListener("drain",a),t.removeListener("error",l),t.removeListener("unpipe",e),r.removeListener("end",u),r.removeListener("end",d),r.removeListener("data",f),c=!0,o.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&a())});var a=function(t){return function(){var e=t._readableState;n("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&i(t,"data")&&(e.flowing=!0,W(t))}}(r);t.on("drain",a);var c=!1;function f(e){n("ondata");var i=t.write(e);n("dest.write",i),!1===i&&((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==V(o.pipes,t))&&!c&&(n("false write response, pause",o.awaitDrain),o.awaitDrain++),r.pause())}function l(e){n("onerror",e),d(),t.removeListener("error",l),0===i(t,"error")&&x(t,e)}function h(){t.removeListener("finish",p),d()}function p(){n("onfinish"),t.removeListener("close",h),d()}function d(){n("unpipe"),r.unpipe(t)}return r.on("data",f),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",l),t.once("close",h),t.once("finish",p),t.emit("pipe",r),o.flowing||(n("pipe resume"),r.resume()),t},O.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=V(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},O.prototype.on=function(t,e){var r=o.prototype.on.call(this,t,e),i=this._readableState;return"data"===t?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===t&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,n("on readable",i.length,i.reading),i.length?A(this):i.reading||b.nextTick(N,this)),r},O.prototype.addListener=O.prototype.on,O.prototype.removeListener=function(t,e){var r=o.prototype.removeListener.call(this,t,e);return"readable"===t&&b.nextTick(U,this),r},O.prototype.removeAllListeners=function(t){var e=o.prototype.removeAllListeners.apply(this,arguments);return("readable"===t||void 0===t)&&b.nextTick(U,this),e},O.prototype.resume=function(){var t=this._readableState;return t.flowing||(n("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,b.nextTick(q,t,e))}(this,t)),t.paused=!1,this},O.prototype.pause=function(){return n("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(n("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},O.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;for(var o in t.on("end",function(){if(n("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)}),t.on("data",function(o){n("wrapped data"),r.decoder&&(o=r.decoder.write(o)),r.objectMode&&null==o||!(r.objectMode||o&&o.length)||e.push(o)||(i=!0,t.pause())}),t)void 0===this[o]&&"function"==typeof t[o]&&(this[o]=function(e){return function(){return t[e].apply(t,arguments)}}(o));for(var s=0;s<_.length;s++)t.on(_[s],this.emit.bind(this,_[s]));return this._read=function(e){n("wrapped _read",e),i&&(i=!1,t.resume())},this},"function"==typeof Symbol&&(O.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=en()),f(this)}),Object.defineProperty(O.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(O.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(O.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),O._fromList=H,Object.defineProperty(O.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(O.from=function(t,e){return void 0===l&&(l=rn()),l(O,t,e)})}),on=T(function(t,e){F(),I(),B(),L(),e.exports=c;var r=$r().codes,n=r.ERR_METHOD_NOT_IMPLEMENTED,i=r.ERR_MULTIPLE_CALLBACK,o=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,u=Kr();function a(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new i);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function c(t){if(!(this instanceof c))return new c(t);u.call(this,t),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",f)}function f(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?l(this,null,null):this._flush(function(e,r){l(t,e,r)})}function l(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new s;if(t._transformState.transforming)throw new o;return t.push(null)}pt()(c,u),c.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},c.prototype._transform=function(t,e,r){r(new n("_transform()"))},c.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},c.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},c.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,function(t){e(t)})}}),sn=T(function(t,e){F(),I(),B(),L(),e.exports=n;var r=on();function n(t){if(!(this instanceof n))return new n(t);r.call(this,t)}pt()(n,r),n.prototype._transform=function(t,e,r){r(null,t)}}),un=T(function(t,e){var r;F(),I(),B(),L();var n=$r().codes,i=n.ERR_MISSING_ARGS,o=n.ERR_STREAM_DESTROYED;function s(t){if(t)throw t}function u(t){t()}function a(t,e){return t.pipe(e)}e.exports=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var c=function(t){return t.length&&"function"==typeof t[t.length-1]?t.pop():s}(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new i("streams");var f,l=e.map(function(t,n){var i=n<e.length-1;return function(t,e,n,i){i=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(i);var s=!1;t.on("close",function(){s=!0}),void 0===r&&(r=tn()),r(t,{readable:e,writable:n},function(t){if(t)return i(t);s=!0,i()});var u=!1;return function(e){if(!s&&!u){if(u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t))return t.abort();if("function"==typeof t.destroy)return t.destroy();i(e||new o("pipe"))}}}(t,i,n>0,function(t){f||(f=t),t&&l.forEach(u),!i&&(l.forEach(u),c(f))})});return e.reduce(a)}}),an=T(function(t,e){F(),I(),B(),L(),e.exports=n;var r=(ht(),P(ot)).EventEmitter;function n(){r.call(this)}pt()(n,r),n.Readable=nn(),n.Writable=Xr(),n.Duplex=Kr(),n.Transform=on(),n.PassThrough=sn(),n.finished=tn(),n.pipeline=un(),n.Stream=n,n.prototype.pipe=function(t,e){var n=this;function i(e){t.writable&&!1===t.write(e)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",i),t.on("drain",o),!t._isStdio&&(!e||!1!==e.end)&&(n.on("end",u),n.on("close",a));var s=!1;function u(){s||(s=!0,t.end())}function a(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function c(t){if(f(),0===r.listenerCount(this,"error"))throw t}function f(){n.removeListener("data",i),t.removeListener("drain",o),n.removeListener("end",u),n.removeListener("close",a),n.removeListener("error",c),t.removeListener("error",c),n.removeListener("end",f),n.removeListener("close",f),t.removeListener("close",f)}return n.on("error",c),t.on("error",c),n.on("end",f),n.on("close",f),t.on("close",f),t.emit("pipe",n),t}});F(),I(),B(),L(),F(),I(),B(),L();var cn=function(){return(0,a.default)(function t(e,r){if((0,u.default)(this,t),!r)throw Error("Null Argument Exception");this.id=e,this.assembler=r},[{key:"contentType",get:function(){return this.assembler.payloadType}},{key:"length",get:function(){return this.assembler.contentLength}},{key:"getStream",value:function(){return this.stream||(this.stream=this.assembler.getPayloadStream()),this.stream}},{key:"cancel",value:function(){this.assembler.close()}},{key:"readAsString",value:function(){return M(this,null,i.default.mark(function t(){var e,r;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,this.readAll();case 1:return e=t.sent,r=e.bufferArray,t.abrupt("return",(r||[]).map(function(t){return t.toString("utf8")}).join(""));case 2:case"end":return t.stop()}},t,this)}))}},{key:"readAsJson",value:function(){return M(this,null,i.default.mark(function t(){var e;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,this.readAsString();case 1:return e=t.sent,t.abrupt("return",JSON.parse(e));case 2:case"end":return t.stop()}},t,this)}))}},{key:"readAll",value:function(){return M(this,null,i.default.mark(function t(){var e,r,n,o,s=this;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:for(e=[],r=0,n=this.getStream();r<n.length;)o=n.read(n.length),e.push(o),r+=o.length;if(!(r<this.length)){t.next=1;break}return t.next=1,new Promise(function(t){var i;n.subscribe((i=s,function(n){e.push(n),(r+=n.length)===i.length&&t(!0)}))});case 1:return t.abrupt("return",{bufferArray:e,size:r});case 2:case"end":return t.stop()}},t,this)}))}}])}();F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L();var fn,ln=[];for(fn=0;fn<256;++fn)ln.push((fn+256).toString(16).slice(1));F(),I(),B(),L();var hn,pn=new Uint8Array(16);function dn(){if(!hn&&!(hn="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return hn(pn)}F(),I(),B(),L(),F(),I(),B(),L();var yn={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},vn=function(t,e,r){if(yn.randomUUID&&!e&&!t)return yn.randomUUID();var n=(t=t||{}).random||(t.rng||dn)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){r=r||0;for(var i=0;i<16;++i)e[r+i]=n[i];return e}return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(ln[t[e+0]]+ln[t[e+1]]+ln[t[e+2]]+ln[t[e+3]]+"-"+ln[t[e+4]]+ln[t[e+5]]+"-"+ln[t[e+6]]+ln[t[e+7]]+"-"+ln[t[e+8]]+ln[t[e+9]]+"-"+ln[t[e+10]]+ln[t[e+11]]+ln[t[e+12]]+ln[t[e+13]]+ln[t[e+14]]+ln[t[e+15]]).toLowerCase()}(n)};function bn(){return vn()}var gn=(0,a.default)(function t(e){var r,n,i,o,s,a;(0,u.default)(this,t),this.content=e,this.id=bn(),this.description={id:this.id,type:null!=(i=null==(n=null==(r=this.content)?void 0:r.headers)?void 0:n.type)?i:"unknown",length:null!=(a=null==(s=null==(o=this.content)?void 0:o.headers)?void 0:s.contentLength)?a:0}}),mn=function(){return(0,a.default)(function t(e,r){(0,u.default)(this,t),this.headers=e,this.stream=r},[{key:"getStream",value:function(){return this.stream}}])}();F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L();var wn=(0,a.default)(function t(){(0,u.default)(this,t)});F(),I(),B(),L(),F(),I(),B(),L();var xn=function(t){function e(t){var r;return(0,u.default)(this,e),(r=d(this,e,[t])).length=0,r.bufferList=[],r}return(0,h.default)(e,t),(0,a.default)(e,[{key:"_write",value:function(t,e,r){var n=g.Buffer.from(t);this.bufferList.push(n),this.length+=t.length,this._onData&&this._onData(n),r()}},{key:"_read",value:function(t){if(0===this.bufferList.length)this.push(null);else for(var e=0;e<t&&this.bufferList.length>0;){var r=this.bufferList[0];this.push(r),this.bufferList.splice(0,1),e+=r.length}}},{key:"subscribe",value:function(t){this._onData=t}}])}(R(an()).Duplex),_n=function(){function t(){(0,u.default)(this,t),this.streams=[]}return(0,a.default)(t,[{key:"addStream",value:function(t){if(!t)throw new Error("Argument Undefined Exception: content undefined.");this.streams.push(new gn(t))}},{key:"setBody",value:function(t){if("string"==typeof t){var e=new xn;e.write(t,"utf8"),this.addStream(new mn({type:"application/json; charset=utf-8",contentLength:e.length},e))}else"object"==(0,p.default)(t)&&this.addStream(t)}}],[{key:"create",value:function(e,r,n){var i=new t;return i.verb=e,i.path=r,n&&i.setBody(n),i}}])}();F(),I(),B(),L();var Sn=function(){function t(){(0,u.default)(this,t),this.streams=[]}return(0,a.default)(t,[{key:"addStream",value:function(t){this.streams.push(new gn(t))}},{key:"setBody",value:function(t){var e=new xn;e.write(JSON.stringify(t),"utf8"),this.addStream(new mn({type:"application/json; charset=utf-8",contentLength:e.length},e))}}],[{key:"create",value:function(e,r){var n=new t;return n.statusCode=e,r&&n.addStream(r),n}}])}();F(),I(),B(),L(),F(),I(),B(),L();var On=function(){return(0,a.default)(function t(e){(0,u.default)(this,t),e&&(this.webSocket=e)},[{key:"connect",value:function(t){return M(this,null,i.default.mark(function e(){var r,n;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(this.webSocket||(this.webSocket=new WebSocket(t)),this.webSocket.onerror=function(t){n(t)},this.webSocket.onopen=function(t){r(t)},new Promise(function(t,e){r=t,n=e})));case 1:case"end":return e.stop()}},e,this)}))}},{key:"isConnected",get:function(){return 1===this.webSocket.readyState}},{key:"write",value:function(t){this.webSocket.send(t)}},{key:"close",value:function(){this.webSocket.close()}},{key:"setOnMessageHandler",value:function(t){var e="buffer",r=[];this.webSocket.onmessage=function(n){var i=new FileReader,o={buffer:null};r.push(o),i.onload=function(n){var i=n.target;if(o[e]=i.result,r[0]===o)for(;0<r.length&&r[0][e];)t(r[0][e]),r.splice(0,1)},i.readAsArrayBuffer(n.data)}}},{key:"setOnErrorHandler",value:function(t){this.webSocket.onerror=function(e){e&&t(e)}}},{key:"setOnCloseHandler",value:function(t){this.webSocket.onclose=t}}])}();F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L();var En=function(){return(0,a.default)(function t(){(0,u.default)(this,t)},null,[{key:"serialize",value:function(t,e){e.write(t.payloadType,this.TypeOffset,1,this.Encoding),e.write(this.Delimiter,this.TypeDelimiterOffset,1,this.Encoding),e.write(this.headerLengthPadder(t.payloadLength,this.LengthLength,"0"),this.LengthOffset,this.LengthLength,this.Encoding),e.write(this.Delimiter,this.LengthDelimeterOffset,1,this.Encoding),e.write(t.id,this.IdOffset),e.write(this.Delimiter,this.IdDelimeterOffset,1,this.Encoding),e.write(t.end?this.End:this.NotEnd,this.EndOffset),e.write(this.Terminator,this.TerminatorOffset)}},{key:"deserialize",value:function(t){var e=t.toString(this.Encoding),r=e.split(this.Delimiter);if(4!==r.length)throw Error("Cannot parse header, header is malformed. Header: ".concat(e));var n=(0,o.default)(r,4),i=n[0],s=n[1],u=n[2],a=n[3],c={end:"1\n"===a,payloadLength:Number(s),payloadType:i,id:u};if(!(c.payloadLength<=4096&&c.payloadLength>=0))throw Error("Header length of ".concat(c.payloadLength," is missing or malformed"));if(c.payloadType.length!==this.TypeDelimiterOffset)throw Error("Header type '".concat(c.payloadType.length,"' is missing or malformed."));if(!c.id||!c.id.match(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i)||c.id.length!==this.IdLength)throw Error("Header ID '".concat(c.id,"' is missing or malformed."));if("0\n"!==a&&"1\n"!==a)throw Error("Header End is missing or not a valid value. Header end: '".concat(a,"'"));return c}},{key:"headerLengthPadder",value:function(t,e,r){var n=Array(e+1).join(r),i=t.toString();return(n+i).slice(i.length)}}])}();En.Delimiter=".",En.Terminator="\n",En.End="1",En.NotEnd="0",En.TypeOffset=0,En.TypeDelimiterOffset=1,En.LengthOffset=2,En.LengthLength=6,En.LengthDelimeterOffset=8,En.IdOffset=9,En.IdLength=36,En.IdDelimeterOffset=45,En.EndOffset=46,En.TerminatorOffset=47,En.Encoding="utf8",F(),I(),B(),L();var kn=(0,a.default)(function t(e){(0,u.default)(this,t),this.reason=e});kn.Empty=new kn;var Tn=kn,jn=function(){return(0,a.default)(function t(){(0,u.default)(this,t)},[{key:"isConnected",get:function(){return null!=this._receiver}},{key:"connect",value:function(t){return this._receiver=t,this.receivePackets()}},{key:"subscribe",value:function(t,e){this._getStream=t,this._receiveAction=e}},{key:"disconnect",value:function(){var t,e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Tn.Empty;if(this.isConnected)try{this._receiver.close(),null==(t=this.disconnected)||t.call(this,this,r)}catch(t){null==(e=this.disconnected)||e.call(this,this,new Tn(t.message))}finally{this._receiver=null}}},{key:"receivePackets",value:function(){return M(this,null,i.default.mark(function t(){var e,r,n,o,s,u,a;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.isConnected){t.next=13;break}t.prev=1,e=0;case 2:if(!(e<48)){t.next=5;break}return t.next=3,this._receiver.receive(48-e);case 3:this._receiveHeaderBuffer=t.sent,this._receiveHeaderBuffer&&(e+=this._receiveHeaderBuffer.length);case 4:t.next=2;break;case 5:if(r=En.deserialize(this._receiveHeaderBuffer),n="S"===r.payloadType,!(r.payloadLength>0)){t.next=10;break}o=0,s=this._getStream(r);case 6:if(!(o<r.payloadLength&&o<4096)){t.next=9;break}return u=Math.min(r.payloadLength-o,4096),t.next=7,this._receiver.receive(u);case 7:this._receivePayloadBuffer=t.sent,o+=this._receivePayloadBuffer.byteLength,s.write(this._receivePayloadBuffer),n&&this._receiveAction(r,s,o);case 8:t.next=6;break;case 9:n||this._receiveAction(r,s,o);case 10:t.next=12;break;case 11:t.prev=11,a=t.catch(1),this.disconnect(new Tn(a.message));case 12:t.next=0;break;case 13:case"end":return t.stop()}},t,this,[[1,11]])}))}}])}();F(),I(),B(),L();var An=function(){return(0,a.default)(function t(){(0,u.default)(this,t)},[{key:"isConnected",get:function(){return null!=this._sender}},{key:"connect",value:function(t){this._sender=t}},{key:"sendPayload",value:function(t,e,r){var n={header:t,payload:e,sentCallback:r};this.writePacket(n)}},{key:"disconnect",value:function(){var t,e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Tn.Empty;if(this.isConnected)try{this._sender.close(),null==(t=this.disconnected)||t.call(this,this,r)}catch(t){null==(e=this.disconnected)||e.call(this,this,new Tn(t.message))}finally{this._sender=null}}},{key:"writePacket",value:function(t){try{if(t.header.payloadLength>0&&t.payload){for(var e=t.header.payloadLength;e>0;){var r=e<=4096?e:4096,n=t.payload.read(r),i=t.header;i.payloadLength=r,i.end=e<=4096;var o=g.Buffer.alloc(48);En.serialize(i,o),this._sender.send(o),this._sender.send(n),e-=n.length}t.sentCallback&&t.sentCallback()}}catch(e){this.disconnect(new Tn(e.message))}}}])}();F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L();var Rn=function(){return(0,a.default)(function t(e){(0,u.default)(this,t),this.onCancelStream=e,this.activeAssemblers=[]},[{key:"getPayloadAssembler",value:function(t){if(this.activeAssemblers[t])return this.activeAssemblers[t];var e=new Dn(this,{id:t});return this.activeAssemblers[t]=e,e}},{key:"getPayloadStream",value:function(t){return this.getPayloadAssembler(t.id).getPayloadStream()}},{key:"onReceive",value:function(t,e,r){this.activeAssemblers[t.id]&&this.activeAssemblers[t.id].onReceive(t,e,r)}},{key:"closeStream",value:function(t){if(this.activeAssemblers[t]){var e=this.activeAssemblers[t];this.activeAssemblers.splice(this.activeAssemblers.indexOf(t),1);var r=e.getPayloadStream();(e.contentLength&&r.length<e.contentLength||!e.end)&&this.onCancelStream(e)}}}])}();F(),I(),B(),L();var Pn=(0,a.default)(function t(){(0,u.default)(this,t)}),Mn=function(){return(0,a.default)(function t(){(0,u.default)(this,t),this._pendingRequests={}},[{key:"pendingRequestCount",value:function(){return Object.keys(this._pendingRequests).length}},{key:"signalResponse",value:function(t,e){return M(this,null,i.default.mark(function r(){var n;return i.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return n=this._pendingRequests[t],r.abrupt("return",!!n&&(n.resolve(e),delete this._pendingRequests[t],!0));case 1:case"end":return r.stop()}},r,this)}))}},{key:"getResponse",value:function(t){var e=this._pendingRequests[t];if(e)return Promise.reject("requestId '".concat(t,"' already exists in RequestManager"));(e=new Pn).requestId=t;var r=new Promise(function(t,r){e.resolve=t,e.reject=r});return this._pendingRequests[t]=e,r}},{key:"rejectAllResponses",value:function(t){var e=this;Object.entries(this._pendingRequests).forEach(function(r){var n=(0,o.default)(r,2),i=n[0];(0,n[1].reject)(t),delete e._pendingRequests[i]})}}])}();F(),I(),B(),L(),F(),I(),B(),L();var In=function(){return(0,a.default)(function t(e,r,n){(0,u.default)(this,t),this.sender=e,this.id=r,this.payloadType=n},[{key:"disassemble",value:function(){var t={payloadType:this.payloadType,payloadLength:0,id:this.id,end:!0};this.sender.sendPayload(t)}}])}();F(),I(),B(),L(),F(),I(),B(),L();var Bn=function(){return(0,a.default)(function t(e,r){(0,u.default)(this,t),this.sender=e,this.id=r},[{key:"disassemble",value:function(){return M(this,null,i.default.mark(function t(){var e,r,n;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,this.getStream();case 1:return e=t.sent,r=e.stream,n=e.streamLength,t.abrupt("return",(this.stream=r,this.streamLength=n,this.send()));case 2:case"end":return t.stop()}},t,this)}))}},{key:"send",value:function(){return M(this,null,i.default.mark(function t(){var e;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:e={payloadType:this.payloadType,payloadLength:this.streamLength,id:this.id,end:!0},this.sender.sendPayload(e,this.stream);case 1:case"end":return t.stop()}},t,this)}))}}],[{key:"serialize",value:function(t){var e=new xn;return e.write(JSON.stringify(t)),e.end(),{stream:e,streamLength:e.length}}}])}(),Cn=function(t){function e(t,r){var n;return(0,u.default)(this,e),(n=d(this,e,[t,r.id])).payloadType="S",n.contentStream=r,n}return(0,h.default)(e,t),(0,a.default)(e,[{key:"getStream",value:function(){return M(this,null,i.default.mark(function t(){var e;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.contentStream.content.getStream(),t.abrupt("return",{stream:e,streamLength:e.length});case 1:case"end":return t.stop()}},t,this)}))}}])}(Bn);F(),I(),B(),L();var Ln=function(t){function e(t,r,n){var i;return(0,u.default)(this,e),(i=d(this,e,[t,r])).request=n,i.payloadType="A",i}return(0,h.default)(e,t),(0,a.default)(e,[{key:"getStream",value:function(){return M(this,null,i.default.mark(function t(){var e,r,n,o,s;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s={verb:null==(e=this.request)?void 0:e.verb,path:null==(r=this.request)?void 0:r.path,streams:[]},t.abrupt("return",(null==(o=null==(n=this.request)?void 0:n.streams)||o.forEach(function(t){s.streams.push(t.description)}),Bn.serialize(s)));case 1:case"end":return t.stop()}},t,this)}))}}])}(Bn);F(),I(),B(),L();var Un=function(t){function e(t,r,n){var i;return(0,u.default)(this,e),(i=d(this,e,[t,r])).payloadType="B",i.response=n,i}return(0,h.default)(e,t),(0,a.default)(e,[{key:"getStream",value:function(){return M(this,null,i.default.mark(function t(){var e,r;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r={statusCode:this.response.statusCode,streams:[]},t.abrupt("return",(null==(e=this.response.streams)||e.forEach(function(t){var e=t.description;r.streams.push({id:e.id,contentType:e.type,length:e.length})}),Bn.serialize(r)));case 1:case"end":return t.stop()}},t,this)}))}}])}(Bn),Nn=function(){return(0,a.default)(function t(e){(0,u.default)(this,t),this.payloadSender=e},[{key:"sendRequest",value:function(t,e){return M(this,null,i.default.mark(function r(){var n=this;return i.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=1,new Ln(this.payloadSender,t,e).disassemble();case 1:e.streams&&e.streams.forEach(function(t){return M(n,null,i.default.mark(function e(){return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,new Cn(this.payloadSender,t).disassemble();case 1:case"end":return e.stop()}},e,this)}))});case 2:case"end":return r.stop()}},r,this)}))}},{key:"sendResponse",value:function(t,e){return M(this,null,i.default.mark(function r(){var n=this;return i.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=1,new Un(this.payloadSender,t,e).disassemble();case 1:e.streams&&e.streams.forEach(function(t){return M(n,null,i.default.mark(function e(){return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,new Cn(this.payloadSender,t).disassemble();case 1:case"end":return e.stop()}},e,this)}))});case 2:case"end":return r.stop()}},r,this)}))}},{key:"sendCancelStream",value:function(t){return M(this,null,i.default.mark(function e(){return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:new In(this.payloadSender,t,"C").disassemble();case 1:case"end":return e.stop()}},e,this)}))}}])}(),Dn=function(){return(0,a.default)(function t(e,r){if((0,u.default)(this,t),this.streamManager=e,this._byteOrderMark=65279,this._utf="utf8",r.header?(this.id=r.header.id,this.payloadType=r.header.payloadType,this.contentLength=r.header.payloadLength,this.end=r.header.end):this.id=r.id,!this.id)throw Error("An ID must be supplied when creating an assembler.");this._onCompleted=r.onCompleted},[{key:"getPayloadStream",value:function(){return this.stream||(this.stream=this.createPayloadStream()),this.stream}},{key:"onReceive",value:function(t,e,r){this.end=t.end,"B"===t.payloadType||"A"===t.payloadType?this.process(e).then().catch():t.end&&e.end()}},{key:"close",value:function(){this.streamManager.closeStream(this.id)}},{key:"createPayloadStream",value:function(){return new xn}},{key:"payloadFromJson",value:function(t){return JSON.parse(t.charCodeAt(0)===this._byteOrderMark?t.slice(1):t)}},{key:"stripBOM",value:function(t){return t.charCodeAt(0)===this._byteOrderMark?t.slice(1):t}},{key:"process",value:function(t){return M(this,null,i.default.mark(function e(){var r,n;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.read(t.length)){e.next=1;break}return e.abrupt("return");case 1:if(n=r.toString(this._utf),"A"!==this.payloadType){e.next=3;break}return e.next=2,this.processRequest(n);case 2:e.next=4;break;case 3:if("B"!==this.payloadType){e.next=4;break}return e.next=4,this.processResponse(n);case 4:case"end":return e.stop()}},e,this)}))}},{key:"processResponse",value:function(t){return M(this,null,i.default.mark(function e(){var r,n;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.payloadFromJson(this.stripBOM(t)),n={streams:[],statusCode:r.statusCode},e.next=1,this.processStreams(r,n);case 1:case"end":return e.stop()}},e,this)}))}},{key:"processRequest",value:function(t){return M(this,null,i.default.mark(function e(){var r,n;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.payloadFromJson(t),n={streams:[],path:r.path,verb:r.verb},e.next=1,this.processStreams(r,n);case 1:case"end":return e.stop()}},e,this)}))}},{key:"processStreams",value:function(t,e){return M(this,null,i.default.mark(function r(){var n,o=this;return i.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return null==(n=t.streams)||n.forEach(function(t){var r,n=null!=(r=t.type)?r:t.contentType,i=o.streamManager.getPayloadAssembler(t.id);i.payloadType=n,i.contentLength=t.length,e.streams.push(new cn(t.id,i))}),r.next=1,this._onCompleted(this.id,e);case 1:case"end":return r.stop()}},r,this)}))}}])}(),Fn=function(){return(0,a.default)(function t(e,r,n){(0,u.default)(this,t),this.streamManager=e,this.onReceiveResponse=r,this.onReceiveRequest=n,this.activeAssemblers={}},[{key:"getPayloadStream",value:function(t){if("S"===t.payloadType)return this.streamManager.getPayloadStream(t);if(!this.activeAssemblers[t.id]){var e=this.createPayloadAssembler(t);if(e)return this.activeAssemblers[t.id]=e,e.getPayloadStream()}}},{key:"onReceive",value:function(t,e,r){"S"===t.payloadType?this.streamManager.onReceive(t,e,r):(this.activeAssemblers&&this.activeAssemblers[t.id]&&this.activeAssemblers[t.id].onReceive(t,e,r),t.end&&delete this.activeAssemblers[t.id])}},{key:"createPayloadAssembler",value:function(t){return"A"===t.payloadType?new Dn(this.streamManager,{header:t,onCompleted:this.onReceiveRequest}):"B"===t.payloadType?new Dn(this.streamManager,{header:t,onCompleted:this.onReceiveResponse}):void 0}}])}(),qn=function(){return(0,a.default)(function t(e,r,n,i){var o=this;(0,u.default)(this,t),this.requestHandler=e,this.requestManager=r,this.payloadSender=n,this.payloadReceiver=i,this.sendOperations=new Nn(this.payloadSender),this.streamManager=new Rn(this.onCancelStream),this.assemblerManager=new Fn(this.streamManager,function(t,e){return o.onReceiveResponse(t,e)},function(t,e){return o.onReceiveRequest(t,e)}),this.payloadReceiver.subscribe(function(t){return o.assemblerManager.getPayloadStream(t)},function(t,e,r){return o.assemblerManager.onReceive(t,e,r)})},[{key:"sendRequest",value:function(t){return M(this,null,i.default.mark(function e(){var r,n;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=bn(),n=this.requestManager.getResponse(r),e.next=1,this.sendOperations.sendRequest(r,t);case 1:return e.abrupt("return",n);case 2:case"end":return e.stop()}},e,this)}))}},{key:"onReceiveRequest",value:function(t,e){return M(this,null,i.default.mark(function r(){var n;return i.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(!this.requestHandler){r.next=2;break}return r.next=1,this.requestHandler.processRequest(e);case 1:if(!(n=r.sent)){r.next=2;break}return r.next=2,this.sendOperations.sendResponse(t,n);case 2:case"end":return r.stop()}},r,this)}))}},{key:"onReceiveResponse",value:function(t,e){return M(this,null,i.default.mark(function r(){return i.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=1,this.requestManager.signalResponse(t,e);case 1:case"end":return r.stop()}},r,this)}))}},{key:"onCancelStream",value:function(t){this.sendOperations.sendCancelStream(t.id).catch()}}])}();F(),I(),B(),L();var Wn=function(){return(0,a.default)(function t(e){var r=this;(0,u.default)(this,t),this.ws=e,this._queue=[],this._activeOffset=0,this._activeReceiveCount=0,this.ws.setOnMessageHandler(function(t){r.onReceive(t)}),this.ws.setOnErrorHandler(function(t){r.onError(t)}),this.ws.setOnCloseHandler(function(){r.onClose()})},[{key:"send",value:function(t){var e;return null!=(e=this.ws)&&e.isConnected?(this.ws.write(t),t.length):0}},{key:"isConnected",get:function(){var t;return!(null==(t=this.ws)||!t.isConnected)}},{key:"close",value:function(){var t;null!=(t=this.ws)&&t.isConnected&&this.ws.close()}},{key:"receive",value:function(t){return M(this,null,i.default.mark(function e(){var r,n=this;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._activeReceiveResolve){e.next=1;break}throw new Error("Cannot call receive more than once before it has returned.");case 1:return this._activeReceiveCount=t,r=new Promise(function(t,e){n._activeReceiveResolve=t,n._activeReceiveReject=e}),e.abrupt("return",(this.trySignalData(),r));case 2:case"end":return e.stop()}},e,this)}))}},{key:"onReceive",value:function(t){this._queue&&t&&t.byteLength>0&&(this._queue.push(g.Buffer.from(t)),this.trySignalData())}},{key:"onClose",value:function(){this._activeReceiveReject&&this._activeReceiveReject(new Error("Socket was closed.")),this._active=null,this._activeOffset=0,this._activeReceiveResolve=null,this._activeReceiveReject=null,this._activeReceiveCount=0,this.ws=null}},{key:"onError",value:function(t){this._activeReceiveReject&&this._activeReceiveReject(t),this.onClose()}},{key:"trySignalData",value:function(){if(this._activeReceiveResolve&&(!this._active&&this._queue.length>0&&(this._active=this._queue.shift(),this._activeOffset=0),this._active)){if(0===this._activeOffset&&this._active.length===this._activeReceiveCount){var t=this._active;this._active=null,this._activeReceiveResolve(t)}else{var e=Math.min(this._activeReceiveCount,this._active.length-this._activeOffset),r=g.Buffer.alloc(e);this._active.copy(r,0,this._activeOffset,this._activeOffset+e),this._activeOffset+=e,this._activeOffset>=this._active.length&&(this._active=null,this._activeOffset=0),this._activeReceiveResolve(r)}this._activeReceiveCount=0,this._activeReceiveReject=null,this._activeReceiveResolve=null}}}])}(),Hn=function(){return(0,a.default)(function t(e){var r=e.url,n=e.requestHandler,i=e.disconnectionHandler,o=void 0===i?null:i;(0,u.default)(this,t),this._url=r,this._requestHandler=n,this._disconnectionHandler=o,this._requestManager=new Mn,this._sender=new An,this._sender.disconnected=this.onConnectionDisconnected.bind(this),this._receiver=new jn,this._receiver.disconnected=this.onConnectionDisconnected.bind(this),this._protocolAdapter=new qn(this._requestHandler,this._requestManager,this._sender,this._receiver)},[{key:"connect",value:function(){return M(this,null,i.default.mark(function t(){var e,r;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=new On,t.next=1,e.connect(this._url);case 1:r=new Wn(e),this._sender.connect(r),this._receiver.connect(r);case 2:case"end":return t.stop()}},t,this)}))}},{key:"disconnect",value:function(){this._sender.disconnect(new Tn("Disconnect was called.")),this._receiver.disconnect(new Tn("Disconnect was called."))}},{key:"send",value:function(t){return M(this,null,i.default.mark(function e(){return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._protocolAdapter.sendRequest(t));case 1:case"end":return e.stop()}},e,this)}))}},{key:"onConnectionDisconnected",value:function(t,e){if(this._requestManager.rejectAllResponses(new Error("Disconnect was called.")),null==this._disconnectionHandler)throw new Error("Unable to re-connect client to transport for url ".concat(this._url,". Sender: '").concat(JSON.stringify(t),"'. Args:' ").concat(JSON.stringify(e)));this._disconnectionHandler("Disconnected")}}])}();e.BrowserWebSocket=On,e.ContentStream=cn,e.HttpContent=mn,e.RequestHandler=wn,e.StreamingRequest=_n,e.StreamingResponse=Sn,e.SubscribableStream=xn,e.WebSocketClient=Hn},1545:function(t,e,r){"use strict";var n=r(4994),i=n(r(7383)),o=n(r(4579)),s=n(r(8452)),u=n(r(3072)),a=n(r(9511)),c=n(r(3738));function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(f=function(){return!!t})()}var l=r(7526),h=r(251),p="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=v,e.SlowBuffer=function(t){return+t!=t&&(t=0),v.alloc(+t)},e.INSPECT_MAX_BYTES=50;var d=2147483647;function y(t){if(t>d)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,v.prototype),e}function v(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return m(t)}return b(t,e,r)}function b(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!v.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|S(t,e),n=y(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(nt(t,Uint8Array)){var e=new Uint8Array(t);return x(e.buffer,e.byteOffset,e.byteLength)}return w(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(0,c.default)(t));if(nt(t,ArrayBuffer)||t&&nt(t.buffer,ArrayBuffer))return x(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(nt(t,SharedArrayBuffer)||t&&nt(t.buffer,SharedArrayBuffer)))return x(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return v.from(n,e,r);var i=function(t){if(v.isBuffer(t)){var e=0|_(t.length),r=y(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||it(t.length)?y(0):w(t):"Buffer"===t.type&&Array.isArray(t.data)?w(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return v.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(0,c.default)(t))}function g(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function m(t){return g(t),y(t<0?0:0|_(t))}function w(t){for(var e=t.length<0?0:0|_(t.length),r=y(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function x(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,v.prototype),n}function _(t){if(t>=d)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d.toString(16)+" bytes");return 0|t}function S(t,e){if(v.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||nt(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+(0,c.default)(t));var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return tt(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return et(t).length;default:if(i)return n?-1:tt(t).length;e=(""+e).toLowerCase(),i=!0}}function O(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return N(this,e,r);case"utf8":case"utf-8":return B(this,e,r);case"ascii":return L(this,e,r);case"latin1":case"binary":return U(this,e,r);case"base64":return I(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function E(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function k(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),it(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=v.from(e,n)),v.isBuffer(e))return 0===e.length?-1:T(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):T(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function T(t,e,r,n,i){var o,s=1,u=t.length,a=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,u/=2,a/=2,r/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var f=-1;for(o=r;o<u;o++)if(c(t,o)===c(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===a)return f*s}else-1!==f&&(o-=o-f),f=-1}else for(r+a>u&&(r=u-a),o=r;o>=0;o--){for(var l=!0,h=0;h<a;h++)if(c(t,o+h)!==c(e,h)){l=!1;break}if(l)return o}return-1}function j(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o,s=e.length;for(n>s/2&&(n=s/2),o=0;o<n;++o){var u=parseInt(e.substr(2*o,2),16);if(it(u))return o;t[r+o]=u}return o}function A(t,e,r,n){return rt(tt(e,t.length-r),t,r,n)}function R(t,e,r,n){return rt(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function P(t,e,r,n){return rt(et(e),t,r,n)}function M(t,e,r,n){return rt(function(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)n=(r=t.charCodeAt(s))>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function I(t,e,r){return 0===e&&r===t.length?l.fromByteArray(t):l.fromByteArray(t.slice(e,r))}function B(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o=t[i],s=null,u=o>239?4:o>223?3:o>191?2:1;if(i+u<=r){var a=void 0,c=void 0,f=void 0,l=void 0;switch(u){case 1:o<128&&(s=o);break;case 2:128==(192&(a=t[i+1]))&&(l=(31&o)<<6|63&a)>127&&(s=l);break;case 3:a=t[i+1],c=t[i+2],128==(192&a)&&128==(192&c)&&(l=(15&o)<<12|(63&a)<<6|63&c)>2047&&(l<55296||l>57343)&&(s=l);break;case 4:a=t[i+1],c=t[i+2],f=t[i+3],128==(192&a)&&128==(192&c)&&128==(192&f)&&(l=(15&o)<<18|(63&a)<<12|(63&c)<<6|63&f)>65535&&l<1114112&&(s=l)}}null===s?(s=65533,u=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),i+=u}return function(t){var e=t.length;if(e<=C)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=C));return r}(n)}e.kMaxLength=d,v.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),v.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(v.prototype,"parent",{enumerable:!0,get:function(){if(v.isBuffer(this))return this.buffer}}),Object.defineProperty(v.prototype,"offset",{enumerable:!0,get:function(){if(v.isBuffer(this))return this.byteOffset}}),v.poolSize=8192,v.from=function(t,e,r){return b(t,e,r)},Object.setPrototypeOf(v.prototype,Uint8Array.prototype),Object.setPrototypeOf(v,Uint8Array),v.alloc=function(t,e,r){return function(t,e,r){return g(t),t<=0?y(t):void 0!==e?"string"==typeof r?y(t).fill(e,r):y(t).fill(e):y(t)}(t,e,r)},v.allocUnsafe=function(t){return m(t)},v.allocUnsafeSlow=function(t){return m(t)},v.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==v.prototype},v.compare=function(t,e){if(nt(t,Uint8Array)&&(t=v.from(t,t.offset,t.byteLength)),nt(e,Uint8Array)&&(e=v.from(e,e.offset,e.byteLength)),!v.isBuffer(t)||!v.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},v.isEncoding=function(t){switch(String(t).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}},v.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return v.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=v.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var o=t[r];if(nt(o,Uint8Array))i+o.length>n.length?(v.isBuffer(o)||(o=v.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else{if(!v.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i)}i+=o.length}return n},v.byteLength=S,v.prototype._isBuffer=!0,v.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)E(this,e,e+1);return this},v.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)E(this,e,e+3),E(this,e+1,e+2);return this},v.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)E(this,e,e+7),E(this,e+1,e+6),E(this,e+2,e+5),E(this,e+3,e+4);return this},v.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?B(this,0,t):O.apply(this,arguments)},v.prototype.toLocaleString=v.prototype.toString,v.prototype.equals=function(t){if(!v.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===v.compare(this,t)},v.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},p&&(v.prototype[p]=v.prototype.inspect),v.prototype.compare=function(t,e,r,n,i){if(nt(t,Uint8Array)&&(t=v.from(t,t.offset,t.byteLength)),!v.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+(0,c.default)(t));if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),u=Math.min(o,s),a=this.slice(n,i),f=t.slice(e,r),l=0;l<u;++l)if(a[l]!==f[l]){o=a[l],s=f[l];break}return o<s?-1:s<o?1:0},v.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},v.prototype.indexOf=function(t,e,r){return k(this,t,e,r,!0)},v.prototype.lastIndexOf=function(t,e,r){return k(this,t,e,r,!1)},v.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return j(this,t,e,r);case"utf8":case"utf-8":return A(this,t,e,r);case"ascii":case"latin1":case"binary":return R(this,t,e,r);case"base64":return P(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},v.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;function L(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function U(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function N(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=ot[t[o]];return i}function D(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function F(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function q(t,e,r,n,i,o){if(!v.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function W(t,e,r,n,i){X(e,n,i,t,r,7);var o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;var s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,r}function H(t,e,r,n,i){X(e,n,i,t,r,7);var o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;var s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s>>=8,t[r+2]=s,s>>=8,t[r+1]=s,s>>=8,t[r]=s,r+8}function G(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function z(t,e,r,n,i){return e=+e,r>>>=0,i||G(t,0,r,4),h.write(t,e,r,n,23,4),r+4}function V(t,e,r,n,i){return e=+e,r>>>=0,i||G(t,0,r,8),h.write(t,e,r,n,52,8),r+8}v.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var n=this.subarray(t,e);return Object.setPrototypeOf(n,v.prototype),n},v.prototype.readUintLE=v.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||F(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},v.prototype.readUintBE=v.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||F(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},v.prototype.readUint8=v.prototype.readUInt8=function(t,e){return t>>>=0,e||F(t,1,this.length),this[t]},v.prototype.readUint16LE=v.prototype.readUInt16LE=function(t,e){return t>>>=0,e||F(t,2,this.length),this[t]|this[t+1]<<8},v.prototype.readUint16BE=v.prototype.readUInt16BE=function(t,e){return t>>>=0,e||F(t,2,this.length),this[t]<<8|this[t+1]},v.prototype.readUint32LE=v.prototype.readUInt32LE=function(t,e){return t>>>=0,e||F(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},v.prototype.readUint32BE=v.prototype.readUInt32BE=function(t,e){return t>>>=0,e||F(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},v.prototype.readBigUInt64LE=st(function(t){K(t>>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||Q(t,this.length-8);var n=e+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,24),i=this[++t]+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+r*Math.pow(2,24);return BigInt(n)+(BigInt(i)<<BigInt(32))}),v.prototype.readBigUInt64BE=st(function(t){K(t>>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||Q(t,this.length-8);var n=e*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+this[++t],i=this[++t]*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+r;return(BigInt(n)<<BigInt(32))+BigInt(i)}),v.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||F(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},v.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||F(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},v.prototype.readInt8=function(t,e){return t>>>=0,e||F(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},v.prototype.readInt16LE=function(t,e){t>>>=0,e||F(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},v.prototype.readInt16BE=function(t,e){t>>>=0,e||F(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},v.prototype.readInt32LE=function(t,e){return t>>>=0,e||F(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},v.prototype.readInt32BE=function(t,e){return t>>>=0,e||F(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},v.prototype.readBigInt64LE=st(function(t){K(t>>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||Q(t,this.length-8);var n=this[t+4]+this[t+5]*Math.pow(2,8)+this[t+6]*Math.pow(2,16)+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,24))}),v.prototype.readBigInt64BE=st(function(t){K(t>>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||Q(t,this.length-8);var n=(e<<24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+r)}),v.prototype.readFloatLE=function(t,e){return t>>>=0,e||F(t,4,this.length),h.read(this,t,!0,23,4)},v.prototype.readFloatBE=function(t,e){return t>>>=0,e||F(t,4,this.length),h.read(this,t,!1,23,4)},v.prototype.readDoubleLE=function(t,e){return t>>>=0,e||F(t,8,this.length),h.read(this,t,!0,52,8)},v.prototype.readDoubleBE=function(t,e){return t>>>=0,e||F(t,8,this.length),h.read(this,t,!1,52,8)},v.prototype.writeUintLE=v.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||q(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},v.prototype.writeUintBE=v.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||q(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},v.prototype.writeUint8=v.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||q(this,t,e,1,255,0),this[e]=255&t,e+1},v.prototype.writeUint16LE=v.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||q(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},v.prototype.writeUint16BE=v.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||q(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},v.prototype.writeUint32LE=v.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||q(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},v.prototype.writeUint32BE=v.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||q(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},v.prototype.writeBigUInt64LE=st(function(t){return W(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))}),v.prototype.writeBigUInt64BE=st(function(t){return H(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))}),v.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);q(this,t,e,r,i-1,-i)}var o=0,s=1,u=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===u&&0!==this[e+o-1]&&(u=1),this[e+o]=(t/s|0)-u&255;return e+r},v.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);q(this,t,e,r,i-1,-i)}var o=r-1,s=1,u=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===u&&0!==this[e+o+1]&&(u=1),this[e+o]=(t/s|0)-u&255;return e+r},v.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||q(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},v.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||q(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},v.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||q(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},v.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||q(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},v.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||q(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},v.prototype.writeBigInt64LE=st(function(t){return W(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),v.prototype.writeBigInt64BE=st(function(t){return H(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),v.prototype.writeFloatLE=function(t,e,r){return z(this,t,e,!0,r)},v.prototype.writeFloatBE=function(t,e,r){return z(this,t,e,!1,r)},v.prototype.writeDoubleLE=function(t,e,r){return V(this,t,e,!0,r)},v.prototype.writeDoubleBE=function(t,e,r){return V(this,t,e,!1,r)},v.prototype.copy=function(t,e,r,n){if(!v.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},v.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!v.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var i=t.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(t=i)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var s=v.isBuffer(t)?t:v.from(t,n),u=s.length;if(0===u)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<r-e;++o)this[o+e]=s[o%u]}return this};var $={};function Y(t,e,r){$[t]=function(r){function n(){var r,o,a,c;return(0,i.default)(this,n),o=this,a=n,a=(0,u.default)(a),r=(0,s.default)(o,f()?Reflect.construct(a,[],(0,u.default)(o).constructor):a.apply(o,c)),Object.defineProperty(r,"message",{value:e.apply(r,arguments),writable:!0,configurable:!0}),r.name="".concat(r.name," [").concat(t,"]"),r.stack,delete r.name,r}return(0,a.default)(n,r),(0,o.default)(n,[{key:"code",get:function(){return t},set:function(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}},{key:"toString",value:function(){return"".concat(this.name," [").concat(t,"]: ").concat(this.message)}}])}(r)}function J(t){for(var e="",r=t.length,n="-"===t[0]?1:0;r>=n+4;r-=3)e="_".concat(t.slice(r-3,r)).concat(e);return"".concat(t.slice(0,r)).concat(e)}function X(t,e,r,n,i,o){if(t>r||t<e){var s,u="bigint"==typeof e?"n":"";throw s=o>3?0===e||e===BigInt(0)?">= 0".concat(u," and < 2").concat(u," ** ").concat(8*(o+1)).concat(u):">= -(2".concat(u," ** ").concat(8*(o+1)-1).concat(u,") and < 2 ** ")+"".concat(8*(o+1)-1).concat(u):">= ".concat(e).concat(u," and <= ").concat(r).concat(u),new $.ERR_OUT_OF_RANGE("value",s,t)}!function(t,e,r){K(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||Q(e,t.length-(r+1))}(n,i,o)}function K(t,e){if("number"!=typeof t)throw new $.ERR_INVALID_ARG_TYPE(e,"number",t)}function Q(t,e,r){if(Math.floor(t)!==t)throw K(t,r),new $.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new $.ERR_BUFFER_OUT_OF_BOUNDS;throw new $.ERR_OUT_OF_RANGE(r||"offset",">= ".concat(r?1:0," and <= ").concat(e),t)}Y("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?"".concat(t," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),Y("ERR_INVALID_ARG_TYPE",function(t,e){return'The "'.concat(t,'" argument must be of type number. Received type ').concat((0,c.default)(e))},TypeError),Y("ERR_OUT_OF_RANGE",function(t,e,r){var n='The value of "'.concat(t,'" is out of range.'),i=r;return Number.isInteger(r)&&Math.abs(r)>Math.pow(2,32)?i=J(String(r)):"bigint"==typeof r&&(i=String(r),(r>Math.pow(BigInt(2),BigInt(32))||r<-Math.pow(BigInt(2),BigInt(32)))&&(i=J(i)),i+="n"),n+" It must be ".concat(e,". Received ").concat(i)},RangeError);var Z=/[^+/0-9A-Za-z-_]/g;function tt(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function et(t){return l.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(Z,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function rt(t,e,r,n){var i;for(i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function nt(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function it(t){return t!=t}var ot=function(){for(var t="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)e[n+i]=t[r]+t[i];return e}();function st(t){return"undefined"==typeof BigInt?ut:t}function ut(){throw new Error("BigInt not supported")}},7526:function(t,e){"use strict";e.byteLength=function(t){var e=u(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,o=u(t),s=o[0],a=o[1],c=new i(function(t,e,r){return 3*(e+r)/4-r}(0,s,a)),f=0,l=a>0?s-4:s;for(r=0;r<l;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],c[f++]=e>>16&255,c[f++]=e>>8&255,c[f++]=255&e;return 2===a&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[f++]=255&e),1===a&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[f++]=e>>8&255,c[f++]=255&e),c},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=16383,u=0,a=n-i;u<a;u+=s)o.push(c(t,u,u+s>a?a:u+s));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function u(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function a(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function c(t,e,r){for(var n,i=[],o=e;o<r;o+=3)n=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),i.push(a(n));return i.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},4945:function(t,e){var r="undefined"!=typeof self?self:this,n=function(){function t(){this.fetch=!1,this.DOMException=r.DOMException}return t.prototype=r,new t}();!function(t){!function(e){var r="URLSearchParams"in t,n="Symbol"in t&&"iterator"in Symbol,i="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),o="FormData"in t,s="ArrayBuffer"in t;if(s)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],a=ArrayBuffer.isView||function(t){return t&&u.indexOf(Object.prototype.toString.call(t))>-1};function c(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function f(t){return"string"!=typeof t&&(t=String(t)),t}function l(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return n&&(e[Symbol.iterator]=function(){return e}),e}function h(t){this.map={},t instanceof h?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function p(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function d(t){return new Promise(function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}})}function y(t){var e=new FileReader,r=d(e);return e.readAsArrayBuffer(t),r}function v(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:i&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:o&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:r&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():s&&i&&(e=t)&&DataView.prototype.isPrototypeOf(e)?(this._bodyArrayBuffer=v(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(t)||a(t))?this._bodyArrayBuffer=v(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var t=p(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var t,e,r,n=p(this);if(n)return n;if(this._bodyBlob)return t=this._bodyBlob,r=d(e=new FileReader),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n<e.length;n++)r[n]=String.fromCharCode(e[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then(w)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(t,e){t=c(t),e=f(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},h.prototype.delete=function(t){delete this.map[c(t)]},h.prototype.get=function(t){return t=c(t),this.has(t)?this.map[t]:null},h.prototype.has=function(t){return this.map.hasOwnProperty(c(t))},h.prototype.set=function(t,e){this.map[c(t)]=f(e)},h.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},h.prototype.keys=function(){var t=[];return this.forEach(function(e,r){t.push(r)}),l(t)},h.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),l(t)},h.prototype.entries=function(){var t=[];return this.forEach(function(e,r){t.push([r,e])}),l(t)},n&&(h.prototype[Symbol.iterator]=h.prototype.entries);var g=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function m(t,e){var r,n,i=(e=e||{}).body;if(t instanceof m){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new h(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,i||null==t._bodyInit||(i=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new h(e.headers)),this.method=(n=(r=e.method||this.method||"GET").toUpperCase(),g.indexOf(n)>-1?n:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function w(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(i))}}),e}function x(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new h(e.headers),this.url=e.url||"",this._initBody(t)}m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},b.call(m.prototype),b.call(x.prototype),x.prototype.clone=function(){return new x(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},x.error=function(){var t=new x(null,{status:0,statusText:""});return t.type="error",t};var _=[301,302,303,307,308];x.redirect=function(t,e){if(-1===_.indexOf(e))throw new RangeError("Invalid status code");return new x(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function S(t,r){return new Promise(function(n,o){var s=new m(t,r);if(s.signal&&s.signal.aborted)return o(new e.DOMException("Aborted","AbortError"));var u=new XMLHttpRequest;function a(){u.abort()}u.onload=function(){var t,e,r={status:u.status,statusText:u.statusText,headers:(t=u.getAllResponseHeaders()||"",e=new h,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(t){var r=t.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();e.append(n,i)}}),e)};r.url="responseURL"in u?u.responseURL:r.headers.get("X-Request-URL");var i="response"in u?u.response:u.responseText;n(new x(i,r))},u.onerror=function(){o(new TypeError("Network request failed"))},u.ontimeout=function(){o(new TypeError("Network request failed"))},u.onabort=function(){o(new e.DOMException("Aborted","AbortError"))},u.open(s.method,s.url,!0),"include"===s.credentials?u.withCredentials=!0:"omit"===s.credentials&&(u.withCredentials=!1),"responseType"in u&&i&&(u.responseType="blob"),s.headers.forEach(function(t,e){u.setRequestHeader(e,t)}),s.signal&&(s.signal.addEventListener("abort",a),u.onreadystatechange=function(){4===u.readyState&&s.signal.removeEventListener("abort",a)}),u.send(void 0===s._bodyInit?null:s._bodyInit)})}S.polyfill=!0,t.fetch||(t.fetch=S,t.Headers=h,t.Request=m,t.Response=x),e.Headers=h,e.Request=m,e.Response=x,e.fetch=S,Object.defineProperty(e,"__esModule",{value:!0})}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;(e=i.fetch).default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e},251:function(t,e){e.read=function(t,e,r,n,i){var o,s,u=8*i-n-1,a=(1<<u)-1,c=a>>1,f=-7,l=r?i-1:0,h=r?-1:1,p=t[e+l];for(l+=h,o=p&(1<<-f)-1,p>>=-f,f+=u;f>0;o=256*o+t[e+l],l+=h,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+t[e+l],l+=h,f-=8);if(0===o)o=1-c;else{if(o===a)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=c}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,u,a,c=8*o-i-1,f=(1<<c)-1,l=f>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(a=Math.pow(2,-s))<1&&(s--,a*=2),(e+=s+l>=1?h/a:h*Math.pow(2,1-l))*a>=2&&(s++,a/=2),s+l>=f?(u=0,s=f):s+l>=1?(u=(e*a-1)*Math.pow(2,i),s+=l):(u=e*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&u,p+=d,u/=256,i-=8);for(s=s<<i|u,c+=i;c>0;t[r+p]=255&s,p+=d,s/=256,c-=8);t[r+p-d]|=128*y}},6765:function(t,e,r){"use strict";function n(t){this.message=t}r.r(e),r.d(e,{InvalidTokenError:function(){return s}}),n.prototype=new Error,n.prototype.name="InvalidCharacterError";var i="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(t){var e=String(t).replace(/=+$/,"");if(e.length%4==1)throw new n("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,i,o=0,s=0,u="";i=e.charAt(s++);~i&&(r=o%4?64*r+i:i,o++%4)?u+=String.fromCharCode(255&r>>(-2*o&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return u};function o(t){var e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}try{return function(t){return decodeURIComponent(i(t).replace(/(.)/g,function(t,e){var r=e.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}(e)}catch(t){return i(e)}}function s(t){this.message=t}s.prototype=new Error,s.prototype.name="InvalidTokenError",e.default=function(t,e){if("string"!=typeof t)throw new s("Invalid token specified");var r=!0===(e=e||{}).header?0:1;try{return JSON.parse(o(t.split(".")[r]))}catch(t){throw new s("Invalid token specified: "+t.message)}}},3114:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(1920),o=r(703),s=function(t){function e(e){t.call(this),this._value=e}return n(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var r=t.prototype._subscribe.call(this,e);return r&&!r.closed&&e.next(this._value),r},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new o.ObjectUnsubscribedError;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},e}(i.Subject);e.BehaviorSubject=s},3246:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=function(t){function e(e,r,n){t.call(this),this.parent=e,this.outerValue=r,this.outerIndex=n,this.index=0}return n(e,t),e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(r(1308).Subscriber);e.InnerSubscriber=i},8037:function(t,e,r){"use strict";var n=r(9707),i=function(){function t(t,e,r){this.kind=t,this.value=e,this.error=r,this.hasValue="N"===t}return t.prototype.observe=function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}},t.prototype.do=function(t,e,r){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return r&&r()}},t.prototype.accept=function(t,e,r){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,r)},t.prototype.toObservable=function(){switch(this.kind){case"N":return n.Observable.of(this.value);case"E":return n.Observable.throw(this.error);case"C":return n.Observable.empty()}throw new Error("unexpected notification kind value")},t.createNext=function(e){return void 0!==e?new t("N",e):t.undefinedValueNotification},t.createError=function(e){return new t("E",void 0,e)},t.createComplete=function(){return t.completeNotification},t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}();e.Notification=i},9707:function(t,e,r){"use strict";var n=r(2901),i=r(5518),o=r(9404),s=r(4053),u=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(t,e,r){var n=this.operator,o=i.toSubscriber(t,e,r);if(n?n.call(o,this.source):o.add(this.source||!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.syncErrorThrown=!0,t.syncErrorValue=e,t.error(e)}},t.prototype.forEach=function(t,e){var r=this;if(e||(n.root.Rx&&n.root.Rx.config&&n.root.Rx.config.Promise?e=n.root.Rx.config.Promise:n.root.Promise&&(e=n.root.Promise)),!e)throw new Error("no Promise impl found");return new e(function(e,n){var i;i=r.subscribe(function(e){if(i)try{t(e)}catch(t){n(t),i.unsubscribe()}else t(e)},n,e)})},t.prototype._subscribe=function(t){return this.source.subscribe(t)},t.prototype[o.observable]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return 0===t.length?this:s.pipeFromArray(t)(this)},t.prototype.toPromise=function(t){var e=this;if(t||(n.root.Rx&&n.root.Rx.config&&n.root.Rx.config.Promise?t=n.root.Rx.config.Promise:n.root.Promise&&(t=n.root.Promise)),!t)throw new Error("no Promise impl found");return new t(function(t,r){var n;e.subscribe(function(t){return n=t},function(t){return r(t)},function(){return t(n)})})},t.create=function(e){return new t(e)},t}();e.Observable=u},5432:function(t,e){"use strict";e.empty={closed:!0,next:function(t){},error:function(t){throw t},complete:function(){}}},7737:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=function(t){function e(){t.apply(this,arguments)}return n(e,t),e.prototype.notifyNext=function(t,e,r,n,i){this.destination.next(e)},e.prototype.notifyError=function(t,e){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(r(1308).Subscriber);e.OuterSubscriber=i},3857:function(t,e){"use strict";var r=function(){function t(e,r){void 0===r&&(r=t.now),this.SchedulerAction=e,this.now=r}return t.prototype.schedule=function(t,e,r){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(r,e)},t.now=Date.now?Date.now:function(){return+new Date},t}();e.Scheduler=r},1920:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(9707),o=r(1308),s=r(8303),u=r(703),a=r(4169),c=r(4429),f=function(t){function e(e){t.call(this,e),this.destination=e}return n(e,t),e}(o.Subscriber);e.SubjectSubscriber=f;var l=function(t){function e(){t.call(this),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}return n(e,t),e.prototype[c.rxSubscriber]=function(){return new f(this)},e.prototype.lift=function(t){var e=new h(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new u.ObjectUnsubscribedError;if(!this.isStopped)for(var e=this.observers,r=e.length,n=e.slice(),i=0;i<r;i++)n[i].next(t)},e.prototype.error=function(t){if(this.closed)throw new u.ObjectUnsubscribedError;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,r=e.length,n=e.slice(),i=0;i<r;i++)n[i].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new u.ObjectUnsubscribedError;this.isStopped=!0;for(var t=this.observers,e=t.length,r=t.slice(),n=0;n<e;n++)r[n].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(e){if(this.closed)throw new u.ObjectUnsubscribedError;return t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){if(this.closed)throw new u.ObjectUnsubscribedError;return this.hasError?(t.error(this.thrownError),s.Subscription.EMPTY):this.isStopped?(t.complete(),s.Subscription.EMPTY):(this.observers.push(t),new a.SubjectSubscription(this,t))},e.prototype.asObservable=function(){var t=new i.Observable;return t.source=this,t},e.create=function(t,e){return new h(t,e)},e}(i.Observable);e.Subject=l;var h=function(t){function e(e,r){t.call(this),this.destination=e,this.source=r}return n(e,t),e.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},e.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):s.Subscription.EMPTY},e}(l);e.AnonymousSubject=h},4169:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=function(t){function e(e,r){t.call(this),this.subject=e,this.subscriber=r,this.closed=!1}return n(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var r=e.indexOf(this.subscriber);-1!==r&&e.splice(r,1)}}},e}(r(8303).Subscription);e.SubjectSubscription=i},1308:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(2497),o=r(8303),s=r(5432),u=r(4429),a=function(t){function e(e,r,n){switch(t.call(this),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=s.empty;break;case 1:if(!e){this.destination=s.empty;break}if("object"==typeof e){if(f(e)){var i=e[u.rxSubscriber]();this.syncErrorThrowable=i.syncErrorThrowable,this.destination=i,i.add(this)}else this.syncErrorThrowable=!0,this.destination=new c(this,e);break}default:this.syncErrorThrowable=!0,this.destination=new c(this,e,r,n)}}return n(e,t),e.prototype[u.rxSubscriber]=function(){return this},e.create=function(t,r,n){var i=new e(t,r,n);return i.syncErrorThrowable=!1,i},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parent,e=this._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=t,this._parents=e,this},e}(o.Subscription);e.Subscriber=a;var c=function(t){function e(e,r,n,o){var u;t.call(this),this._parentSubscriber=e;var a=this;i.isFunction(r)?u=r:r&&(u=r.next,n=r.error,o=r.complete,r!==s.empty&&(a=Object.create(r),i.isFunction(a.unsubscribe)&&this.add(a.unsubscribe.bind(a)),a.unsubscribe=this.unsubscribe.bind(this))),this._context=a,this._next=u,this._error=n,this._complete=o}return n(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber;if(this._error)e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else{if(!e.syncErrorThrowable)throw this.unsubscribe(),t;e.syncErrorValue=t,e.syncErrorThrown=!0,this.unsubscribe()}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var r=function(){return t._complete.call(t._context)};e.syncErrorThrowable?(this.__tryOrSetError(e,r),this.unsubscribe()):(this.__tryOrUnsub(r),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){throw this.unsubscribe(),t}},e.prototype.__tryOrSetError=function(t,e,r){try{e.call(this._context,r)}catch(e){return t.syncErrorValue=e,t.syncErrorThrown=!0,!0}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(a);function f(t){return t instanceof a||"syncErrorThrowable"in t&&t[u.rxSubscriber]}},8303:function(t,e,r){"use strict";var n=r(2208),i=r(9690),o=r(2497),s=r(4181),u=r(7036),a=r(6229),c=function(){function t(t){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}var e;return t.prototype.unsubscribe=function(){var t,e=!1;if(!this.closed){var r=this,c=r._parent,l=r._parents,h=r._unsubscribe,p=r._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var d=-1,y=l?l.length:0;c;)c.remove(this),c=++d<y&&l[d]||null;if(o.isFunction(h)&&s.tryCatch(h).call(this)===u.errorObject&&(e=!0,t=t||(u.errorObject.e instanceof a.UnsubscriptionError?f(u.errorObject.e.errors):[u.errorObject.e])),n.isArray(p))for(d=-1,y=p.length;++d<y;){var v=p[d];if(i.isObject(v)&&s.tryCatch(v.unsubscribe).call(v)===u.errorObject){e=!0,t=t||[];var b=u.errorObject.e;b instanceof a.UnsubscriptionError?t=t.concat(f(b.errors)):t.push(b)}}if(e)throw new a.UnsubscriptionError(t)}},t.prototype.add=function(e){if(!e||e===t.EMPTY)return t.EMPTY;if(e===this)return this;var r=e;switch(typeof e){case"function":r=new t(e);case"object":if(r.closed||"function"!=typeof r.unsubscribe)return r;if(this.closed)return r.unsubscribe(),r;if("function"!=typeof r._addParent){var n=r;(r=new t)._subscriptions=[n]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}return(this._subscriptions||(this._subscriptions=[])).push(r),r._addParent(this),r},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var r=e.indexOf(t);-1!==r&&e.splice(r,1)}},t.prototype._addParent=function(t){var e=this._parent,r=this._parents;e&&e!==t?r?-1===r.indexOf(t)&&r.push(t):this._parents=[t]:this._parent=t},t.EMPTY=((e=new t).closed=!0,e),t}();function f(t){return t.reduce(function(t,e){return t.concat(e instanceof a.UnsubscriptionError?e.errors:e)},[])}e.Subscription=c},4553:function(t,e,r){"use strict";var n=r(9707),i=r(5885);n.Observable.ajax=i.ajax},7033:function(t,e,r){"use strict";var n=r(9707),i=r(8557);n.Observable.empty=i.empty},7694:function(t,e,r){"use strict";var n=r(9707),i=r(8858);n.Observable.from=i.from},5103:function(t,e,r){"use strict";var n=r(9707),i=r(1531);n.Observable.interval=i.interval},3783:function(t,e,r){"use strict";var n=r(9707),i=r(5723);n.Observable.of=i.of},8540:function(t,e,r){"use strict";var n=r(9707),i=r(8867);n.Observable.throw=i._throw},3690:function(t,e,r){"use strict";var n=r(9707),i=r(7046);n.Observable.prototype.catch=i._catch,n.Observable.prototype._catch=i._catch},3071:function(t,e,r){"use strict";var n=r(9707),i=r(3123);n.Observable.prototype.combineLatest=i.combineLatest},4983:function(t,e,r){"use strict";var n=r(9707),i=r(4891);n.Observable.prototype.concatMap=i.concatMap},2166:function(t,e,r){"use strict";var n=r(9707),i=r(970);n.Observable.prototype.count=i.count},298:function(t,e,r){"use strict";var n=r(9707),i=r(4950);n.Observable.prototype.delay=i.delay},3576:function(t,e,r){"use strict";var n=r(9707),i=r(9028);n.Observable.prototype.do=i._do,n.Observable.prototype._do=i._do},1239:function(t,e,r){"use strict";var n=r(9707),i=r(8371);n.Observable.prototype.filter=i.filter},4359:function(t,e,r){"use strict";var n=r(9707),i=r(947);n.Observable.prototype.map=i.map},2639:function(t,e,r){"use strict";var n=r(9707),i=r(8387);n.Observable.prototype.mergeMap=i.mergeMap,n.Observable.prototype.flatMap=i.mergeMap},731:function(t,e,r){"use strict";var n=r(9707),i=r(7015);n.Observable.prototype.retryWhen=i.retryWhen},1734:function(t,e,r){"use strict";var n=r(9707),i=r(8706);n.Observable.prototype.share=i.share},4166:function(t,e,r){"use strict";var n=r(9707),i=r(9618);n.Observable.prototype.take=i.take},3603:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(9707),o=r(3171),s=r(1248),u=function(t){function e(e,r){t.call(this),this.arrayLike=e,this.scheduler=r,r||1!==e.length||(this._isScalar=!0,this.value=e[0])}return n(e,t),e.create=function(t,r){var n=t.length;return 0===n?new s.EmptyObservable:1===n?new o.ScalarObservable(t[0],r):new e(t,r)},e.dispatch=function(t){var e=t.arrayLike,r=t.index,n=t.length,i=t.subscriber;i.closed||(r>=n?i.complete():(i.next(e[r]),t.index=r+1,this.schedule(t)))},e.prototype._subscribe=function(t){var r=this.arrayLike,n=this.scheduler,i=r.length;if(n)return n.schedule(e.dispatch,0,{arrayLike:r,index:0,length:i,subscriber:t});for(var o=0;o<i&&!t.closed;o++)t.next(r[o]);t.complete()},e}(i.Observable);e.ArrayLikeObservable=u},4459:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(9707),o=r(3171),s=r(1248),u=r(7452),a=function(t){function e(e,r){t.call(this),this.array=e,this.scheduler=r,r||1!==e.length||(this._isScalar=!0,this.value=e[0])}return n(e,t),e.create=function(t,r){return new e(t,r)},e.of=function(){for(var t=[],r=0;r<arguments.length;r++)t[r-0]=arguments[r];var n=t[t.length-1];u.isScheduler(n)?t.pop():n=null;var i=t.length;return i>1?new e(t,n):1===i?new o.ScalarObservable(t[0],n):new s.EmptyObservable(n)},e.dispatch=function(t){var e=t.array,r=t.index,n=t.count,i=t.subscriber;r>=n?i.complete():(i.next(e[r]),i.closed||(t.index=r+1,this.schedule(t)))},e.prototype._subscribe=function(t){var r=this.array,n=r.length,i=this.scheduler;if(i)return i.schedule(e.dispatch,0,{array:r,index:0,count:n,subscriber:t});for(var o=0;o<n&&!t.closed;o++)t.next(r[o]);t.complete()},e}(i.Observable);e.ArrayObservable=a},8495:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(1920),o=r(9707),s=r(1308),u=r(8303),a=r(1152),c=function(t){function e(e,r){t.call(this),this.source=e,this.subjectFactory=r,this._refCount=0,this._isComplete=!1}return n(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new u.Subscription).add(this.source.subscribe(new l(this.getSubject(),this))),t.closed?(this._connection=null,t=u.Subscription.EMPTY):this._connection=t),t},e.prototype.refCount=function(){return a.refCount()(this)},e}(o.Observable);e.ConnectableObservable=c;var f=c.prototype;e.connectableObservableDescriptor={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:f._subscribe},_isComplete:{value:f._isComplete,writable:!0},getSubject:{value:f.getSubject},connect:{value:f.connect},refCount:{value:f.refCount}};var l=function(t){function e(e,r){t.call(this,e),this.connectable=r}return n(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(i.SubjectSubscriber);!function(t){function e(e,r){t.call(this,e),this.connectable=r}n(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var r=this.connection,n=t._connection;this.connection=null,!n||r&&n!==r||n.unsubscribe()}}else this.connection=null}}(s.Subscriber)},1248:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=function(t){function e(e){t.call(this),this.scheduler=e}return n(e,t),e.create=function(t){return new e(t)},e.dispatch=function(t){t.subscriber.complete()},e.prototype._subscribe=function(t){var r=this.scheduler;if(r)return r.schedule(e.dispatch,0,{subscriber:t});t.complete()},e}(r(9707).Observable);e.EmptyObservable=i},4631:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=function(t){function e(e,r){t.call(this),this.error=e,this.scheduler=r}return n(e,t),e.create=function(t,r){return new e(t,r)},e.dispatch=function(t){var e=t.error;t.subscriber.error(e)},e.prototype._subscribe=function(t){var r=this.error,n=this.scheduler;if(t.syncErrorThrowable=!0,n)return n.schedule(e.dispatch,0,{error:r,subscriber:t});t.error(r)},e}(r(9707).Observable);e.ErrorObservable=i},7691:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(2208),o=r(8871),s=r(456),u=r(3172),a=r(6529),c=r(4459),f=r(3603),l=r(3763),h=r(9707),p=r(8767),d=r(9404),y=function(t){function e(e,r){t.call(this,null),this.ish=e,this.scheduler=r}return n(e,t),e.create=function(t,r){if(null!=t){if("function"==typeof t[d.observable])return t instanceof h.Observable&&!r?t:new e(t,r);if(i.isArray(t))return new c.ArrayObservable(t,r);if(s.isPromise(t))return new u.PromiseObservable(t,r);if("function"==typeof t[l.iterator]||"string"==typeof t)return new a.IteratorObservable(t,r);if(o.isArrayLike(t))return new f.ArrayLikeObservable(t,r)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")},e.prototype._subscribe=function(t){var e=this.ish,r=this.scheduler;return null==r?e[d.observable]().subscribe(t):e[d.observable]().subscribe(new p.ObserveOnSubscriber(t,r,0))},e}(h.Observable);e.FromObservable=y},502:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(8454),o=r(9707),s=r(1518),u=function(t){function e(e,r){void 0===e&&(e=0),void 0===r&&(r=s.async),t.call(this),this.period=e,this.scheduler=r,(!i.isNumeric(e)||e<0)&&(this.period=0),r&&"function"==typeof r.schedule||(this.scheduler=s.async)}return n(e,t),e.create=function(t,r){return void 0===t&&(t=0),void 0===r&&(r=s.async),new e(t,r)},e.dispatch=function(t){var e=t.index,r=t.subscriber,n=t.period;r.next(e),r.closed||(t.index+=1,this.schedule(t,n))},e.prototype._subscribe=function(t){var r=this.period,n=this.scheduler;t.add(n.schedule(e.dispatch,r,{index:0,subscriber:t,period:r}))},e}(o.Observable);e.IntervalObservable=u},6529:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(2901),o=r(9707),s=r(3763),u=function(t){function e(e,r){if(t.call(this),this.scheduler=r,null==e)throw new Error("iterator cannot be null.");this.iterator=function(t){var e=t[s.iterator];if(!e&&"string"==typeof t)return new a(t);if(!e&&void 0!==t.length)return new c(t);if(!e)throw new TypeError("object is not iterable");return t[s.iterator]()}(e)}return n(e,t),e.create=function(t,r){return new e(t,r)},e.dispatch=function(t){var e=t.index,r=t.hasError,n=t.iterator,i=t.subscriber;if(r)i.error(t.error);else{var o=n.next();o.done?i.complete():(i.next(o.value),t.index=e+1,i.closed?"function"==typeof n.return&&n.return():this.schedule(t))}},e.prototype._subscribe=function(t){var r=this.iterator,n=this.scheduler;if(n)return n.schedule(e.dispatch,0,{index:0,iterator:r,subscriber:t});for(;;){var i=r.next();if(i.done){t.complete();break}if(t.next(i.value),t.closed){"function"==typeof r.return&&r.return();break}}},e}(o.Observable);e.IteratorObservable=u;var a=function(){function t(t,e,r){void 0===e&&(e=0),void 0===r&&(r=t.length),this.str=t,this.idx=e,this.len=r}return t.prototype[s.iterator]=function(){return this},t.prototype.next=function(){return this.idx<this.len?{done:!1,value:this.str.charAt(this.idx++)}:{done:!0,value:void 0}},t}(),c=function(){function t(t,e,r){void 0===e&&(e=0),void 0===r&&(r=function(t){var e,r=+t.length;return isNaN(r)?0:0!==r&&("number"==typeof(e=r)&&i.root.isFinite(e))?(r=function(t){var e=+t;return 0===e||isNaN(e)?e:e<0?-1:1}(r)*Math.floor(Math.abs(r)),r<=0?0:r>f?f:r):r}(t)),this.arr=t,this.idx=e,this.len=r}return t.prototype[s.iterator]=function(){return this},t.prototype.next=function(){return this.idx<this.len?{done:!1,value:this.arr[this.idx++]}:{done:!0,value:void 0}},t}(),f=Math.pow(2,53)-1},3172:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(2901),o=function(t){function e(e,r){t.call(this),this.promise=e,this.scheduler=r}return n(e,t),e.create=function(t,r){return new e(t,r)},e.prototype._subscribe=function(t){var e=this,r=this.promise,n=this.scheduler;if(null==n)this._isScalar?t.closed||(t.next(this.value),t.complete()):r.then(function(r){e.value=r,e._isScalar=!0,t.closed||(t.next(r),t.complete())},function(e){t.closed||t.error(e)}).then(null,function(t){i.root.setTimeout(function(){throw t})});else if(this._isScalar){if(!t.closed)return n.schedule(s,0,{value:this.value,subscriber:t})}else r.then(function(r){e.value=r,e._isScalar=!0,t.closed||t.add(n.schedule(s,0,{value:r,subscriber:t}))},function(e){t.closed||t.add(n.schedule(u,0,{err:e,subscriber:t}))}).then(null,function(t){i.root.setTimeout(function(){throw t})})},e}(r(9707).Observable);function s(t){var e=t.value,r=t.subscriber;r.closed||(r.next(e),r.complete())}function u(t){var e=t.err,r=t.subscriber;r.closed||r.error(e)}e.PromiseObservable=o},3171:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=function(t){function e(e,r){t.call(this),this.value=e,this.scheduler=r,this._isScalar=!0,r&&(this._isScalar=!1)}return n(e,t),e.create=function(t,r){return new e(t,r)},e.dispatch=function(t){var e=t.done,r=t.value,n=t.subscriber;e?n.complete():(n.next(r),n.closed||(t.done=!0,this.schedule(t)))},e.prototype._subscribe=function(t){var r=this.value,n=this.scheduler;if(n)return n.schedule(e.dispatch,0,{done:!1,value:r,subscriber:t});t.next(r),t.closed||t.complete()},e}(r(9707).Observable);e.ScalarObservable=i},6144:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(2901),o=r(4181),s=r(7036),u=r(9707),a=r(1308),c=r(720);function f(){if(i.root.XMLHttpRequest)return new i.root.XMLHttpRequest;if(i.root.XDomainRequest)return new i.root.XDomainRequest;throw new Error("CORS is not supported by your browser")}function l(t,e){return void 0===e&&(e=null),new g({method:"GET",url:t,headers:e})}function h(t,e,r){return new g({method:"POST",url:t,body:e,headers:r})}function p(t,e){return new g({method:"DELETE",url:t,headers:e})}function d(t,e,r){return new g({method:"PUT",url:t,body:e,headers:r})}function y(t,e,r){return new g({method:"PATCH",url:t,body:e,headers:r})}e.ajaxGet=l,e.ajaxPost=h,e.ajaxDelete=p,e.ajaxPut=d,e.ajaxPatch=y;var v=c.map(function(t,e){return t.response});function b(t,e){return v(new g({method:"GET",url:t,responseType:"json",headers:e}))}e.ajaxGetJSON=b;var g=function(t){function e(e){t.call(this);var r={async:!0,createXHR:function(){return this.crossDomain?f.call(this):function(){if(i.root.XMLHttpRequest)return new i.root.XMLHttpRequest;var t=void 0;try{for(var e=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],r=0;r<3;r++)try{if(t=e[r],new i.root.ActiveXObject(t))break}catch(t){}return new i.root.ActiveXObject(t)}catch(t){throw new Error("XMLHttpRequest is not supported by your browser")}}()},crossDomain:!1,withCredentials:!1,headers:{},method:"GET",responseType:"json",timeout:0};if("string"==typeof e)r.url=e;else for(var n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);this.request=r}var r;return n(e,t),e.prototype._subscribe=function(t){return new m(t,this.request)},e.create=((r=function(t){return new e(t)}).get=l,r.post=h,r.delete=p,r.put=d,r.patch=y,r.getJSON=b,r),e}(u.Observable);e.AjaxObservable=g;var m=function(t){function e(e,r){t.call(this,e),this.request=r,this.done=!1;var n=r.headers=r.headers||{};r.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest"),"Content-Type"in n||i.root.FormData&&r.body instanceof i.root.FormData||void 0===r.body||(n["Content-Type"]="application/x-www-form-urlencoded; charset=UTF-8"),r.body=this.serializeBody(r.body,r.headers["Content-Type"]),this.send()}return n(e,t),e.prototype.next=function(t){this.done=!0;var e=this,r=e.xhr,n=e.request,i=e.destination,o=new w(t,r,n);i.next(o)},e.prototype.send=function(){var t=this.request,e=this.request,r=e.user,n=e.method,i=e.url,u=e.async,a=e.password,c=e.headers,f=e.body,l=t.createXHR,h=o.tryCatch(l).call(t);if(h===s.errorObject)this.error(s.errorObject.e);else{if(this.xhr=h,this.setupEvents(h,t),(r?o.tryCatch(h.open).call(h,n,i,u,r,a):o.tryCatch(h.open).call(h,n,i,u))===s.errorObject)return this.error(s.errorObject.e),null;if(u&&(h.timeout=t.timeout,h.responseType=t.responseType),"withCredentials"in h&&(h.withCredentials=!!t.withCredentials),this.setHeaders(h,c),(f?o.tryCatch(h.send).call(h,f):o.tryCatch(h.send).call(h))===s.errorObject)return this.error(s.errorObject.e),null}return h},e.prototype.serializeBody=function(t,e){if(!t||"string"==typeof t)return t;if(i.root.FormData&&t instanceof i.root.FormData)return t;if(e){var r=e.indexOf(";");-1!==r&&(e=e.substring(0,r))}switch(e){case"application/x-www-form-urlencoded":return Object.keys(t).map(function(e){return encodeURIComponent(e)+"="+encodeURIComponent(t[e])}).join("&");case"application/json":return JSON.stringify(t);default:return t}},e.prototype.setHeaders=function(t,e){for(var r in e)e.hasOwnProperty(r)&&t.setRequestHeader(r,e[r])},e.prototype.setupEvents=function(t,e){var r,n,o=e.progressSubscriber;function s(t){var e=s,r=e.subscriber,n=e.progressSubscriber,i=e.request;n&&n.error(t),r.error(new S(this,i))}(t.ontimeout=s,s.request=e,s.subscriber=this,s.progressSubscriber=o,t.upload&&"withCredentials"in t)&&(o&&(r=function(t){r.progressSubscriber.next(t)},i.root.XDomainRequest?t.onprogress=r:t.upload.onprogress=r,r.progressSubscriber=o),n=function(t){var e=n,r=e.progressSubscriber,i=e.subscriber,o=e.request;r&&r.error(t),i.error(new x("ajax error",this,o))},t.onerror=n,n.request=e,n.subscriber=this,n.progressSubscriber=o);function u(t){var e=u,r=e.subscriber,n=e.progressSubscriber,i=e.request;if(4===this.readyState){var o=1223===this.status?204:this.status,s="text"===this.responseType?this.response||this.responseText:this.response;0===o&&(o=s?200:0),200<=o&&o<300?(n&&n.complete(),r.next(t),r.complete()):(n&&n.error(t),r.error(new x("ajax error "+o,this,i)))}}t.onreadystatechange=u,u.subscriber=this,u.progressSubscriber=o,u.request=e},e.prototype.unsubscribe=function(){var e=this.done,r=this.xhr;!e&&r&&4!==r.readyState&&"function"==typeof r.abort&&r.abort(),t.prototype.unsubscribe.call(this)},e}(a.Subscriber);e.AjaxSubscriber=m;var w=function(t,e,r){this.originalEvent=t,this.xhr=e,this.request=r,this.status=e.status,this.responseType=e.responseType||r.responseType,this.response=_(this.responseType,e)};e.AjaxResponse=w;var x=function(t){function e(e,r,n){t.call(this,e),this.message=e,this.xhr=r,this.request=n,this.status=r.status,this.responseType=r.responseType||n.responseType,this.response=_(this.responseType,r)}return n(e,t),e}(Error);function _(t,e){switch(t){case"json":return"response"in e?e.responseType?e.response:JSON.parse(e.response||e.responseText||"null"):JSON.parse(e.responseText||"null");case"xml":return e.responseXML;default:return"response"in e?e.response:e.responseText}}e.AjaxError=x;var S=function(t){function e(e,r){t.call(this,"ajax timeout",e,r)}return n(e,t),e}(x);e.AjaxTimeoutError=S},5885:function(t,e,r){"use strict";var n=r(6144);e.ajax=n.AjaxObservable.create},8557:function(t,e,r){"use strict";var n=r(1248);e.empty=n.EmptyObservable.create},8858:function(t,e,r){"use strict";var n=r(7691);e.from=n.FromObservable.create},1531:function(t,e,r){"use strict";var n=r(502);e.interval=n.IntervalObservable.create},5723:function(t,e,r){"use strict";var n=r(4459);e.of=n.ArrayObservable.of},8867:function(t,e,r){"use strict";var n=r(4631);e._throw=n.ErrorObservable.create},7046:function(t,e,r){"use strict";var n=r(4903);e._catch=function(t){return n.catchError(t)(this)}},3123:function(t,e,r){"use strict";var n=r(8652);e.combineLatest=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return n.combineLatest.apply(void 0,t)(this)}},4891:function(t,e,r){"use strict";var n=r(7024);e.concatMap=function(t,e){return n.concatMap(t,e)(this)}},970:function(t,e,r){"use strict";var n=r(6581);e.count=function(t){return n.count(t)(this)}},4950:function(t,e,r){"use strict";var n=r(1518),i=r(909);e.delay=function(t,e){return void 0===e&&(e=n.async),i.delay(t,e)(this)}},9028:function(t,e,r){"use strict";var n=r(4995);e._do=function(t,e,r){return n.tap(t,e,r)(this)}},8371:function(t,e,r){"use strict";var n=r(9014);e.filter=function(t,e){return n.filter(t,e)(this)}},947:function(t,e,r){"use strict";var n=r(720);e.map=function(t,e){return n.map(t,e)(this)}},8387:function(t,e,r){"use strict";var n=r(9982);e.mergeMap=function(t,e,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),n.mergeMap(t,e,r)(this)}},7015:function(t,e,r){"use strict";var n=r(1020);e.retryWhen=function(t){return n.retryWhen(t)(this)}},8706:function(t,e,r){"use strict";var n=r(5221);e.share=function(){return n.share()(this)}},9618:function(t,e,r){"use strict";var n=r(7207);e.take=function(t){return n.take(t)(this)}},4903:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(7737),o=r(8497);e.catchError=function(t){return function(e){var r=new s(t),n=e.lift(r);return r.caught=n}};var s=function(){function t(t){this.selector=t}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.selector,this.caught))},t}(),u=function(t){function e(e,r,n){t.call(this,e),this.selector=r,this.caught=n}return n(e,t),e.prototype.error=function(e){if(!this.isStopped){var r=void 0;try{r=this.selector(e,this.caught)}catch(e){return void t.prototype.error.call(this,e)}this._unsubscribeAndRecycle(),this.add(o.subscribeToResult(this,r))}},e}(i.OuterSubscriber)},8652:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(4459),o=r(2208),s=r(7737),u=r(8497),a={};e.combineLatest=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];var r=null;return"function"==typeof t[t.length-1]&&(r=t.pop()),1===t.length&&o.isArray(t[0])&&(t=t[0].slice()),function(e){return e.lift.call(new i.ArrayObservable([e].concat(t)),new c(r))}};var c=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new f(t,this.project))},t}();e.CombineLatestOperator=c;var f=function(t){function e(e,r){t.call(this,e),this.project=r,this.active=0,this.values=[],this.observables=[]}return n(e,t),e.prototype._next=function(t){this.values.push(a),this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(var r=0;r<e;r++){var n=t[r];this.add(u.subscribeToResult(this,n,n,r))}}},e.prototype.notifyComplete=function(t){0==(this.active-=1)&&this.destination.complete()},e.prototype.notifyNext=function(t,e,r,n,i){var o=this.values,s=o[r],u=this.toRespond?s===a?--this.toRespond:this.toRespond:0;o[r]=e,0===u&&(this.project?this._tryProject(o):this.destination.next(o.slice()))},e.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(s.OuterSubscriber);e.CombineLatestSubscriber=f},7024:function(t,e,r){"use strict";var n=r(9982);e.concatMap=function(t,e){return n.mergeMap(t,e,1)}},6581:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(1308);e.count=function(t){return function(e){return e.lift(new o(t,e))}};var o=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.predicate,this.source))},t}(),s=function(t){function e(e,r,n){t.call(this,e),this.predicate=r,this.source=n,this.count=0,this.index=0}return n(e,t),e.prototype._next=function(t){this.predicate?this._tryPredicate(t):this.count++},e.prototype._tryPredicate=function(t){var e;try{e=this.predicate(t,this.index++,this.source)}catch(t){return void this.destination.error(t)}e&&this.count++},e.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},e}(i.Subscriber)},909:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(1518),o=r(8697),s=r(1308),u=r(8037);e.delay=function(t,e){void 0===e&&(e=i.async);var r=o.isDate(t)?+t-e.now():Math.abs(t);return function(t){return t.lift(new a(r,e))}};var a=function(){function t(t,e){this.delay=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.delay,this.scheduler))},t}(),c=function(t){function e(e,r,n){t.call(this,e),this.delay=r,this.scheduler=n,this.queue=[],this.active=!1,this.errored=!1}return n(e,t),e.dispatch=function(t){for(var e=t.source,r=e.queue,n=t.scheduler,i=t.destination;r.length>0&&r[0].time-n.now()<=0;)r.shift().notification.observe(i);if(r.length>0){var o=Math.max(0,r[0].time-n.now());this.schedule(t,o)}else this.unsubscribe(),e.active=!1},e.prototype._schedule=function(t){this.active=!0,this.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},e.prototype.scheduleNotification=function(t){if(!0!==this.errored){var e=this.scheduler,r=new f(e.now()+this.delay,t);this.queue.push(r),!1===this.active&&this._schedule(e)}},e.prototype._next=function(t){this.scheduleNotification(u.Notification.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t)},e.prototype._complete=function(){this.scheduleNotification(u.Notification.createComplete())},e}(s.Subscriber),f=function(t,e){this.time=t,this.notification=e}},9014:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(1308);e.filter=function(t,e){return function(r){return r.lift(new o(t,e))}};var o=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.predicate,this.thisArg))},t}(),s=function(t){function e(e,r,n){t.call(this,e),this.predicate=r,this.thisArg=n,this.count=0}return n(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}e&&this.destination.next(t)},e}(i.Subscriber)},720:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(1308);e.map=function(t,e){return function(r){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return r.lift(new o(t,e))}};var o=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.project,this.thisArg))},t}();e.MapOperator=o;var s=function(t){function e(e,r,n){t.call(this,e),this.project=r,this.count=0,this.thisArg=n||this}return n(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(i.Subscriber)},9982:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(8497),o=r(7737);e.mergeMap=function(t,e,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),function(n){return"number"==typeof e&&(r=e,e=null),n.lift(new s(t,e,r))}};var s=function(){function t(t,e,r){void 0===r&&(r=Number.POSITIVE_INFINITY),this.project=t,this.resultSelector=e,this.concurrent=r}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.project,this.resultSelector,this.concurrent))},t}();e.MergeMapOperator=s;var u=function(t){function e(e,r,n,i){void 0===i&&(i=Number.POSITIVE_INFINITY),t.call(this,e),this.project=r,this.resultSelector=n,this.concurrent=i,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}return n(e,t),e.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)},e.prototype._tryNext=function(t){var e,r=this.index++;try{e=this.project(t,r)}catch(t){return void this.destination.error(t)}this.active++,this._innerSub(e,t,r)},e.prototype._innerSub=function(t,e,r){this.add(i.subscribeToResult(this,t,e,r))},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete()},e.prototype.notifyNext=function(t,e,r,n,i){this.resultSelector?this._notifyResultSelector(t,e,r,n):this.destination.next(e)},e.prototype._notifyResultSelector=function(t,e,r,n){var i;try{i=this.resultSelector(t,e,r,n)}catch(t){return void this.destination.error(t)}this.destination.next(i)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(o.OuterSubscriber);e.MergeMapSubscriber=u},6040:function(t,e,r){"use strict";var n=r(8495);e.multicast=function(t,e){return function(r){var o;if(o="function"==typeof t?t:function(){return t},"function"==typeof e)return r.lift(new i(o,e));var s=Object.create(r,n.connectableObservableDescriptor);return s.source=r,s.subjectFactory=o,s}};var i=function(){function t(t,e){this.subjectFactory=t,this.selector=e}return t.prototype.call=function(t,e){var r=this.selector,n=this.subjectFactory(),i=r(n).subscribe(t);return i.add(e.subscribe(n)),i},t}();e.MulticastOperator=i},8767:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(1308),o=r(8037);e.observeOn=function(t,e){return void 0===e&&(e=0),function(r){return r.lift(new s(t,e))}};var s=function(){function t(t,e){void 0===e&&(e=0),this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.scheduler,this.delay))},t}();e.ObserveOnOperator=s;var u=function(t){function e(e,r,n){void 0===n&&(n=0),t.call(this,e),this.scheduler=r,this.delay=n}return n(e,t),e.dispatch=function(t){var e=t.notification,r=t.destination;e.observe(r),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.add(this.scheduler.schedule(e.dispatch,this.delay,new a(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(o.Notification.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(o.Notification.createError(t))},e.prototype._complete=function(){this.scheduleMessage(o.Notification.createComplete())},e}(i.Subscriber);e.ObserveOnSubscriber=u;var a=function(t,e){this.notification=t,this.destination=e};e.ObserveOnMessage=a},1152:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(1308);e.refCount=function(){return function(t){return t.lift(new o(t))}};var o=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var r=this.connectable;r._refCount++;var n=new s(t,r),i=e.subscribe(n);return n.closed||(n.connection=r.connect()),i},t}(),s=function(t){function e(e,r){t.call(this,e),this.connectable=r}return n(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var r=this.connection,n=t._connection;this.connection=null,!n||r&&n!==r||n.unsubscribe()}}else this.connection=null},e}(i.Subscriber)},1020:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(1920),o=r(4181),s=r(7036),u=r(7737),a=r(8497);e.retryWhen=function(t){return function(e){return e.lift(new c(t,e))}};var c=function(){function t(t,e){this.notifier=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new f(t,this.notifier,this.source))},t}(),f=function(t){function e(e,r,n){t.call(this,e),this.notifier=r,this.source=n}return n(e,t),e.prototype.error=function(e){if(!this.isStopped){var r=this.errors,n=this.retries,u=this.retriesSubscription;if(n)this.errors=null,this.retriesSubscription=null;else{if(r=new i.Subject,(n=o.tryCatch(this.notifier)(r))===s.errorObject)return t.prototype.error.call(this,s.errorObject.e);u=a.subscribeToResult(this,n)}this._unsubscribeAndRecycle(),this.errors=r,this.retries=n,this.retriesSubscription=u,r.next(e)}},e.prototype._unsubscribe=function(){var t=this.errors,e=this.retriesSubscription;t&&(t.unsubscribe(),this.errors=null),e&&(e.unsubscribe(),this.retriesSubscription=null),this.retries=null},e.prototype.notifyNext=function(t,e,r,n,i){var o=this,s=o.errors,u=o.retries,a=o.retriesSubscription;this.errors=null,this.retries=null,this.retriesSubscription=null,this._unsubscribeAndRecycle(),this.errors=s,this.retries=u,this.retriesSubscription=a,this.source.subscribe(this)},e}(u.OuterSubscriber)},5221:function(t,e,r){"use strict";var n=r(6040),i=r(1152),o=r(1920);function s(){return new o.Subject}e.share=function(){return function(t){return i.refCount()(n.multicast(s)(t))}}},7207:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(1308),o=r(6280),s=r(1248);e.take=function(t){return function(e){return 0===t?new s.EmptyObservable:e.lift(new u(t))}};var u=function(){function t(t){if(this.total=t,this.total<0)throw new o.ArgumentOutOfRangeError}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.total))},t}(),a=function(t){function e(e,r){t.call(this,e),this.total=r,this.count=0}return n(e,t),e.prototype._next=function(t){var e=this.total,r=++this.count;r<=e&&(this.destination.next(t),r===e&&(this.destination.complete(),this.unsubscribe()))},e}(i.Subscriber)},4995:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(1308);e.tap=function(t,e,r){return function(n){return n.lift(new o(t,e,r))}};var o=function(){function t(t,e,r){this.nextOrObserver=t,this.error=e,this.complete=r}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.nextOrObserver,this.error,this.complete))},t}(),s=function(t){function e(e,r,n,o){t.call(this,e);var s=new i.Subscriber(r,n,o);s.syncErrorThrowable=!0,this.add(s),this.safeSubscriber=s}return n(e,t),e.prototype._next=function(t){var e=this.safeSubscriber;e.next(t),e.syncErrorThrown?this.destination.error(e.syncErrorValue):this.destination.next(t)},e.prototype._error=function(t){var e=this.safeSubscriber;e.error(t),e.syncErrorThrown?this.destination.error(e.syncErrorValue):this.destination.error(t)},e.prototype._complete=function(){var t=this.safeSubscriber;t.complete(),t.syncErrorThrown?this.destination.error(t.syncErrorValue):this.destination.complete()},e}(i.Subscriber)},1578:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=function(t){function e(e,r){t.call(this)}return n(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(r(8303).Subscription);e.Action=i},668:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(2901),o=function(t){function e(e,r){t.call(this,e,r),this.scheduler=e,this.pending=!1,this.work=r}return n(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t,this.pending=!0;var r=this.id,n=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(n,r,e)),this.delay=e,this.id=this.id||this.requestAsyncId(n,this.id,e),this},e.prototype.requestAsyncId=function(t,e,r){return void 0===r&&(r=0),i.root.setInterval(t.flush.bind(t,this),r)},e.prototype.recycleAsyncId=function(t,e,r){if(void 0===r&&(r=0),null!==r&&this.delay===r&&!1===this.pending)return e;i.root.clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(t,e);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var r=!1,n=void 0;try{this.work(t)}catch(t){r=!0,n=!!t&&t||new Error(t)}if(r)return this.unsubscribe(),n},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,r=e.actions,n=r.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==n&&r.splice(n,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(r(1578).Action);e.AsyncAction=o},4853:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=function(t){function e(){t.apply(this,arguments),this.actions=[],this.active=!1,this.scheduled=void 0}return n(e,t),e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var r;this.active=!0;do{if(r=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,r){for(;t=e.shift();)t.unsubscribe();throw r}}},e}(r(3857).Scheduler);e.AsyncScheduler=i},1518:function(t,e,r){"use strict";var n=r(668),i=r(4853);e.async=new i.AsyncScheduler(n.AsyncAction)},3763:function(t,e,r){"use strict";var n=r(2901);function i(t){var e=t.Symbol;if("function"==typeof e)return e.iterator||(e.iterator=e("iterator polyfill")),e.iterator;var r=t.Set;if(r&&"function"==typeof(new r)["@@iterator"])return"@@iterator";var n=t.Map;if(n)for(var i=Object.getOwnPropertyNames(n.prototype),o=0;o<i.length;++o){var s=i[o];if("entries"!==s&&"size"!==s&&n.prototype[s]===n.prototype.entries)return s}return"@@iterator"}e.symbolIteratorPonyfill=i,e.iterator=i(n.root),e.$$iterator=e.iterator},9404:function(t,e,r){"use strict";var n=r(2901);function i(t){var e,r=t.Symbol;return"function"==typeof r?r.observable?e=r.observable:(e=r("observable"),r.observable=e):e="@@observable",e}e.getSymbolObservable=i,e.observable=i(n.root),e.$$observable=e.observable},4429:function(t,e,r){"use strict";var n=r(2901).root.Symbol;e.rxSubscriber="function"==typeof n&&"function"==typeof n.for?n.for("rxSubscriber"):"@@rxSubscriber",e.$$rxSubscriber=e.rxSubscriber},6280:function(t,e){"use strict";var r=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},n=function(t){function e(){var e=t.call(this,"argument out of range");this.name=e.name="ArgumentOutOfRangeError",this.stack=e.stack,this.message=e.message}return r(e,t),e}(Error);e.ArgumentOutOfRangeError=n},703:function(t,e){"use strict";var r=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},n=function(t){function e(){var e=t.call(this,"object unsubscribed");this.name=e.name="ObjectUnsubscribedError",this.stack=e.stack,this.message=e.message}return r(e,t),e}(Error);e.ObjectUnsubscribedError=n},6229:function(t,e){"use strict";var r=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},n=function(t){function e(e){t.call(this),this.errors=e;var r=Error.call(this,e?e.length+" errors occurred during unsubscription:\n "+e.map(function(t,e){return e+1+") "+t.toString()}).join("\n "):"");this.name=r.name="UnsubscriptionError",this.stack=r.stack,this.message=r.message}return r(e,t),e}(Error);e.UnsubscriptionError=n},7036:function(t,e){"use strict";e.errorObject={e:{}}},2208:function(t,e){"use strict";e.isArray=Array.isArray||function(t){return t&&"number"==typeof t.length}},8871:function(t,e){"use strict";e.isArrayLike=function(t){return t&&"number"==typeof t.length}},8697:function(t,e){"use strict";e.isDate=function(t){return t instanceof Date&&!isNaN(+t)}},2497:function(t,e){"use strict";e.isFunction=function(t){return"function"==typeof t}},8454:function(t,e,r){"use strict";var n=r(2208);e.isNumeric=function(t){return!n.isArray(t)&&t-parseFloat(t)+1>=0}},9690:function(t,e){"use strict";e.isObject=function(t){return null!=t&&"object"==typeof t}},456:function(t,e){"use strict";e.isPromise=function(t){return t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}},7452:function(t,e){"use strict";e.isScheduler=function(t){return t&&"function"==typeof t.schedule}},893:function(t,e){"use strict";e.noop=function(){}},4053:function(t,e,r){"use strict";var n=r(893);function i(t){return t?1===t.length?t[0]:function(e){return t.reduce(function(t,e){return e(t)},e)}:n.noop}e.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return i(t)},e.pipeFromArray=i},2901:function(t,e,r){"use strict";var n="undefined"!=typeof window&&window,i="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,o=void 0!==r.g&&r.g,s=n||o||i;e.root=s,function(){if(!s)throw new Error("RxJS could not find any global context (window, self, global)")}()},8497:function(t,e,r){"use strict";var n=r(2901),i=r(8871),o=r(456),s=r(9690),u=r(9707),a=r(3763),c=r(3246),f=r(9404);e.subscribeToResult=function(t,e,r,l){var h=new c.InnerSubscriber(t,r,l);if(h.closed)return null;if(e instanceof u.Observable)return e._isScalar?(h.next(e.value),h.complete(),null):(h.syncErrorThrowable=!0,e.subscribe(h));if(i.isArrayLike(e)){for(var p=0,d=e.length;p<d&&!h.closed;p++)h.next(e[p]);h.closed||h.complete()}else{if(o.isPromise(e))return e.then(function(t){h.closed||(h.next(t),h.complete())},function(t){return h.error(t)}).then(null,function(t){n.root.setTimeout(function(){throw t})}),h;if(e&&"function"==typeof e[a.iterator])for(var y=e[a.iterator]();;){var v=y.next();if(v.done){h.complete();break}if(h.next(v.value),h.closed)break}else if(e&&"function"==typeof e[f.observable]){var b=e[f.observable]();if("function"==typeof b.subscribe)return b.subscribe(new c.InnerSubscriber(t,r,l));h.error(new TypeError("Provided object does not correctly implement Symbol.observable"))}else{var g="You provided "+(s.isObject(e)?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.";h.error(new TypeError(g))}}return null}},5518:function(t,e,r){"use strict";var n=r(1308),i=r(4429),o=r(5432);e.toSubscriber=function(t,e,r){if(t){if(t instanceof n.Subscriber)return t;if(t[i.rxSubscriber])return t[i.rxSubscriber]()}return t||e||r?new n.Subscriber(t,e,r):new n.Subscriber(o.empty)}},4181:function(t,e,r){"use strict";var n,i=r(7036);function o(){try{return n.apply(this,arguments)}catch(t){return i.errorObject.e=t,i.errorObject}}e.tryCatch=function(t){return n=t,o}},8318:function(t,e,r){!function(t){"use strict";var e,r=function(){try{if(t.URLSearchParams&&"bar"===new t.URLSearchParams("foo=bar").get("foo"))return t.URLSearchParams}catch(t){}return null}(),n=r&&"a=1"===new r({a:1}).toString(),i=r&&"+"===new r("s=%2B").get("s"),o=r&&"size"in r.prototype,s="__URLSearchParams__",u=!r||((e=new r).append("s"," &"),"s=+%26"===e.toString()),a=p.prototype,c=!(!t.Symbol||!t.Symbol.iterator);if(!(r&&n&&i&&u&&o)){a.append=function(t,e){g(this[s],t,e)},a.delete=function(t){delete this[s][t]},a.get=function(t){var e=this[s];return this.has(t)?e[t][0]:null},a.getAll=function(t){var e=this[s];return this.has(t)?e[t].slice(0):[]},a.has=function(t){return w(this[s],t)},a.set=function(t,e){this[s][t]=[""+e]},a.toString=function(){var t,e,r,n,i=this[s],o=[];for(e in i)for(r=d(e),t=0,n=i[e];t<n.length;t++)o.push(r+"="+d(n[t]));return o.join("&")};var f,l=t.Proxy&&r&&(!i||!u||!n||!o);l?(f=new Proxy(r,{construct:function(t,e){return new t(new p(e[0]).toString())}})).toString=Function.prototype.toString.bind(p):f=p,Object.defineProperty(t,"URLSearchParams",{value:f});var h=t.URLSearchParams.prototype;h.polyfill=!0,!l&&t.Symbol&&(h[t.Symbol.toStringTag]="URLSearchParams"),"forEach"in h||(h.forEach=function(t,e){var r=b(this.toString());Object.getOwnPropertyNames(r).forEach(function(n){r[n].forEach(function(r){t.call(e,r,n,this)},this)},this)}),"sort"in h||(h.sort=function(){var t,e,r,n=b(this.toString()),i=[];for(t in n)i.push(t);for(i.sort(),e=0;e<i.length;e++)this.delete(i[e]);for(e=0;e<i.length;e++){var o=i[e],s=n[o];for(r=0;r<s.length;r++)this.append(o,s[r])}}),"keys"in h||(h.keys=function(){var t=[];return this.forEach(function(e,r){t.push(r)}),v(t)}),"values"in h||(h.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),v(t)}),"entries"in h||(h.entries=function(){var t=[];return this.forEach(function(e,r){t.push([r,e])}),v(t)}),c&&(h[t.Symbol.iterator]=h[t.Symbol.iterator]||h.entries),"size"in h||Object.defineProperty(h,"size",{get:function(){var t=b(this.toString());if(h===this)throw new TypeError("Illegal invocation at URLSearchParams.invokeGetter");return Object.keys(t).reduce(function(e,r){return e+t[r].length},0)}})}function p(t){((t=t||"")instanceof URLSearchParams||t instanceof p)&&(t=t.toString()),this[s]=b(t)}function d(t){var e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'\(\)~]|%20|%00/g,function(t){return e[t]})}function y(t){return t.replace(/[ +]/g,"%20").replace(/(%[a-f0-9]{2})+/gi,function(t){return decodeURIComponent(t)})}function v(e){var r={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return c&&(r[t.Symbol.iterator]=function(){return r}),r}function b(t){var e={};if("object"==typeof t)if(m(t))for(var r=0;r<t.length;r++){var n=t[r];if(!m(n)||2!==n.length)throw new TypeError("Failed to construct 'URLSearchParams': Sequence initializer must only contain pair elements");g(e,n[0],n[1])}else for(var i in t)t.hasOwnProperty(i)&&g(e,i,t[i]);else{0===t.indexOf("?")&&(t=t.slice(1));for(var o=t.split("&"),s=0;s<o.length;s++){var u=o[s],a=u.indexOf("=");-1<a?g(e,y(u.slice(0,a)),y(u.slice(a+1))):u&&g(e,y(u),"")}}return e}function g(t,e,r){var n="string"==typeof r?r:null!=r&&"function"==typeof r.toString?r.toString():JSON.stringify(r);w(t,e)?t[e].push(n):t[e]=[n]}function m(t){return!!t&&"[object Array]"===Object.prototype.toString.call(t)}function w(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}(void 0!==r.g?r.g:"undefined"!=typeof window?window:this)},5172:function(t){t.exports=function(t,e){this.v=t,this.k=e},t.exports.__esModule=!0,t.exports.default=t.exports},79:function(t){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n},t.exports.__esModule=!0,t.exports.default=t.exports},2987:function(t){t.exports=function(t){if(Array.isArray(t))return t},t.exports.__esModule=!0,t.exports.default=t.exports},5901:function(t,e,r){var n=r(79);t.exports=function(t){if(Array.isArray(t))return n(t)},t.exports.__esModule=!0,t.exports.default=t.exports},2475:function(t){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.__esModule=!0,t.exports.default=t.exports},9293:function(t){function e(t,e,r,n,i,o,s){try{var u=t[o](s),a=u.value}catch(t){return void r(t)}u.done?e(a):Promise.resolve(a).then(n,i)}t.exports=function(t){return function(){var r=this,n=arguments;return new Promise(function(i,o){var s=t.apply(r,n);function u(t){e(s,i,o,u,a,"next",t)}function a(t){e(s,i,o,u,a,"throw",t)}u(void 0)})}},t.exports.__esModule=!0,t.exports.default=t.exports},7383:function(t){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports},4579:function(t,e,r){var n=r(7736);function i(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,n(i.key),i)}}t.exports=function(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports},3693:function(t,e,r){var n=r(7736);t.exports=function(t,e,r){return(e=n(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},t.exports.__esModule=!0,t.exports.default=t.exports},2395:function(t,e,r){var n=r(9552);function i(){return t.exports=i="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var i=n(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},t.exports.__esModule=!0,t.exports.default=t.exports,i.apply(null,arguments)}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},3072:function(t){function e(r){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},9511:function(t,e,r){var n=r(5636);t.exports=function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&n(t,e)},t.exports.__esModule=!0,t.exports.default=t.exports},4994:function(t){t.exports=function(t){return t&&t.__esModule?t:{default:t}},t.exports.__esModule=!0,t.exports.default=t.exports},9291:function(t){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.__esModule=!0,t.exports.default=t.exports},1156:function(t){t.exports=function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,s,u=[],a=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;a=!1}else for(;!(a=(n=o.call(r)).done)&&(u.push(n.value),u.length!==e);a=!0);}catch(t){c=!0,i=t}finally{try{if(!a&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw i}}return u}},t.exports.__esModule=!0,t.exports.default=t.exports},7752:function(t){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},1869:function(t){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},1847:function(t,e,r){var n=r(4893);t.exports=function(t,e){if(null==t)return{};var r,i,o=n(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],-1===e.indexOf(r)&&{}.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o},t.exports.__esModule=!0,t.exports.default=t.exports},4893:function(t){t.exports=function(t,e){if(null==t)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(-1!==e.indexOf(n))continue;r[n]=t[n]}return r},t.exports.__esModule=!0,t.exports.default=t.exports},8452:function(t,e,r){var n=r(3738).default,i=r(2475);t.exports=function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return i(t)},t.exports.__esModule=!0,t.exports.default=t.exports},6993:function(t,e,r){var n=r(5546);function i(){var e,r,o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",u=o.toStringTag||"@@toStringTag";function a(t,i,o,s){var u=i&&i.prototype instanceof f?i:f,a=Object.create(u.prototype);return n(a,"_invoke",function(t,n,i){var o,s,u,a=0,f=i||[],l=!1,h={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return o=t,s=0,u=e,h.n=r,c}};function p(t,n){for(s=t,u=n,r=0;!l&&a&&!i&&r<f.length;r++){var i,o=f[r],p=h.p,d=o[2];t>3?(i=d===n)&&(u=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=t<2&&p<o[1])?(s=0,h.v=n,h.n=o[1]):p<d&&(i=t<3||o[0]>n||n>d)&&(o[4]=t,o[5]=n,h.n=d,s=0))}if(i||t>1)return c;throw l=!0,n}return function(i,f,d){if(a>1)throw TypeError("Generator is already running");for(l&&1===f&&p(f,d),s=f,u=d;(r=s<2?e:u)||!l;){o||(s?s<3?(s>1&&(h.n=-1),p(s,u)):h.n=u:h.v=u);try{if(a=2,o){if(s||(i="next"),r=o[i]){if(!(r=r.call(o,u)))throw TypeError("iterator result is not an object");if(!r.done)return r;u=r.value,s<2&&(s=0)}else 1===s&&(r=o.return)&&r.call(o),s<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((r=(l=h.n<0)?u:t.call(n,h))!==c)break}catch(t){o=e,s=1,u=t}finally{a=1}}return{value:r,done:l}}}(t,o,s),!0),a}var c={};function f(){}function l(){}function h(){}r=Object.getPrototypeOf;var p=[][s]?r(r([][s]())):(n(r={},s,function(){return this}),r),d=h.prototype=f.prototype=Object.create(p);function y(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,n(t,u,"GeneratorFunction")),t.prototype=Object.create(d),t}return l.prototype=h,n(d,"constructor",h),n(h,"constructor",l),l.displayName="GeneratorFunction",n(h,u,"GeneratorFunction"),n(d),n(d,u,"Generator"),n(d,s,function(){return this}),n(d,"toString",function(){return"[object Generator]"}),(t.exports=i=function(){return{w:a,m:y}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},5869:function(t,e,r){var n=r(887);t.exports=function(t,e,r,i,o){var s=n(t,e,r,i,o);return s.next().then(function(t){return t.done?t.value:s.next()})},t.exports.__esModule=!0,t.exports.default=t.exports},887:function(t,e,r){var n=r(6993),i=r(1791);t.exports=function(t,e,r,o,s){return new i(n().w(t,e,r,o),s||Promise)},t.exports.__esModule=!0,t.exports.default=t.exports},1791:function(t,e,r){var n=r(5172),i=r(5546);t.exports=function t(e,r){function o(t,i,s,u){try{var a=e[t](i),c=a.value;return c instanceof n?r.resolve(c.v).then(function(t){o("next",t,s,u)},function(t){o("throw",t,s,u)}):r.resolve(c).then(function(t){a.value=t,s(a)},function(t){return o("throw",t,s,u)})}catch(t){u(t)}}var s;this.next||(i(t.prototype),i(t.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),i(this,"_invoke",function(t,e,n){function i(){return new r(function(e,r){o(t,n,e,r)})}return s=s?s.then(i,i):i()},!0)},t.exports.__esModule=!0,t.exports.default=t.exports},5546:function(t){function e(r,n,i,o){var s=Object.defineProperty;try{s({},"",{})}catch(r){s=0}t.exports=e=function(t,r,n,i){function o(r,n){e(t,r,function(t){return this._invoke(r,n,t)})}r?s?s(t,r,{value:n,enumerable:!i,configurable:!i,writable:!i}):t[r]=n:(o("next",0),o("throw",1),o("return",2))},t.exports.__esModule=!0,t.exports.default=t.exports,e(r,n,i,o)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},4373:function(t){t.exports=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},t.exports.__esModule=!0,t.exports.default=t.exports},4633:function(t,e,r){var n=r(5172),i=r(6993),o=r(5869),s=r(887),u=r(1791),a=r(4373),c=r(579);function f(){"use strict";var e=i(),r=e.m(f),l=(Object.getPrototypeOf?Object.getPrototypeOf(r):r.__proto__).constructor;function h(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===l||"GeneratorFunction"===(e.displayName||e.name))}var p={throw:1,return:2,break:3,continue:3};function d(t){var e,r;return function(n){e||(e={stop:function(){return r(n.a,2)},catch:function(){return n.v},abrupt:function(t,e){return r(n.a,p[t],e)},delegateYield:function(t,i,o){return e.resultName=i,r(n.d,c(t),o)},finish:function(t){return r(n.f,t)}},r=function(t,r,i){n.p=e.prev,n.n=e.next;try{return t(r,i)}finally{e.next=n.n}}),e.resultName&&(e[e.resultName]=n.v,e.resultName=void 0),e.sent=n.v,e.next=n.n;try{return t.call(this,e)}finally{n.p=e.prev,n.n=e.next}}}return(t.exports=f=function(){return{wrap:function(t,r,n,i){return e.w(d(t),r,n,i&&i.reverse())},isGeneratorFunction:h,mark:e.m,awrap:function(t,e){return new n(t,e)},AsyncIterator:u,async:function(t,e,r,n,i){return(h(e)?s:o)(d(t),e,r,n,i)},keys:a,values:c}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=f,t.exports.__esModule=!0,t.exports.default=t.exports},579:function(t,e,r){var n=r(3738).default;t.exports=function(t){if(null!=t){var e=t["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}}throw new TypeError(n(t)+" is not iterable")},t.exports.__esModule=!0,t.exports.default=t.exports},5636:function(t){function e(r,n){return t.exports=e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r,n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},5715:function(t,e,r){var n=r(2987),i=r(1156),o=r(7122),s=r(7752);t.exports=function(t,e){return n(t)||i(t,e)||o(t,e)||s()},t.exports.__esModule=!0,t.exports.default=t.exports},9552:function(t,e,r){var n=r(3072);t.exports=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=n(t)););return t},t.exports.__esModule=!0,t.exports.default=t.exports},8053:function(t,e,r){var n=r(2987),i=r(9291),o=r(7122),s=r(7752);t.exports=function(t){return n(t)||i(t)||o(t)||s()},t.exports.__esModule=!0,t.exports.default=t.exports},1132:function(t,e,r){var n=r(5901),i=r(9291),o=r(7122),s=r(1869);t.exports=function(t){return n(t)||i(t)||o(t)||s()},t.exports.__esModule=!0,t.exports.default=t.exports},9045:function(t,e,r){var n=r(3738).default;t.exports=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)},t.exports.__esModule=!0,t.exports.default=t.exports},7736:function(t,e,r){var n=r(3738).default,i=r(9045);t.exports=function(t){var e=i(t,"string");return"symbol"==n(e)?e:e+""},t.exports.__esModule=!0,t.exports.default=t.exports},3738:function(t){function e(r){return t.exports=e="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.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},7122:function(t,e,r){var n=r(79);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports},4756:function(t,e,r){var n=r(4633)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},780:function(t,e,r){"use strict";var n=r(2473);r(7628),r(3799),t.exports=n},6398:function(t,e,r){"use strict";r(67),r(3792),r(6099),r(3362),r(6167),r(3518),r(1689),r(4628),r(9391),r(7764);var n=r(9167);t.exports=n.Promise},5781:function(t,e,r){"use strict";t.exports=r(911)},911:function(t,e,r){"use strict";var n=r(780);r(9806),r(5874),r(7575),t.exports=n},9306:function(t,e,r){"use strict";var n=r(4901),i=r(6823),o=TypeError;t.exports=function(t){if(n(t))return t;throw new o(i(t)+" is not a function")}},5548:function(t,e,r){"use strict";var n=r(3517),i=r(6823),o=TypeError;t.exports=function(t){if(n(t))return t;throw new o(i(t)+" is not a constructor")}},3506:function(t,e,r){"use strict";var n=r(3925),i=String,o=TypeError;t.exports=function(t){if(n(t))return t;throw new o("Can't set "+i(t)+" as a prototype")}},6469:function(t,e,r){"use strict";var n=r(8227),i=r(2360),o=r(4913).f,s=n("unscopables"),u=Array.prototype;void 0===u[s]&&o(u,s,{configurable:!0,value:i(null)}),t.exports=function(t){u[s][t]=!0}},679:function(t,e,r){"use strict";var n=r(1625),i=TypeError;t.exports=function(t,e){if(n(e,t))return t;throw new i("Incorrect invocation")}},8551:function(t,e,r){"use strict";var n=r(34),i=String,o=TypeError;t.exports=function(t){if(n(t))return t;throw new o(i(t)+" is not an object")}},9617:function(t,e,r){"use strict";var n=r(5397),i=r(5610),o=r(6198),s=function(t){return function(e,r,s){var u=n(e),a=o(u);if(0===a)return!t&&-1;var c,f=i(s,a);if(t&&r!=r){for(;a>f;)if((c=u[f++])!=c)return!0}else for(;a>f;f++)if((t||f in u)&&u[f]===r)return t||f||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},7680:function(t,e,r){"use strict";var n=r(9504);t.exports=n([].slice)},4428:function(t,e,r){"use strict";var n=r(8227)("iterator"),i=!1;try{var o=0,s={next:function(){return{done:!!o++}},return:function(){i=!0}};s[n]=function(){return this},Array.from(s,function(){throw 2})}catch(t){}t.exports=function(t,e){try{if(!e&&!i)return!1}catch(t){return!1}var r=!1;try{var o={};o[n]=function(){return{next:function(){return{done:r=!0}}}},t(o)}catch(t){}return r}},2195:function(t,e,r){"use strict";var n=r(9504),i=n({}.toString),o=n("".slice);t.exports=function(t){return o(i(t),8,-1)}},6955:function(t,e,r){"use strict";var n=r(2140),i=r(4901),o=r(2195),s=r(8227)("toStringTag"),u=Object,a="Arguments"===o(function(){return arguments}());t.exports=n?o:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=u(t),s))?r:a?o(e):"Object"===(n=o(e))&&i(e.callee)?"Arguments":n}},7740:function(t,e,r){"use strict";var n=r(9297),i=r(5031),o=r(7347),s=r(4913);t.exports=function(t,e,r){for(var u=i(e),a=s.f,c=o.f,f=0;f<u.length;f++){var l=u[f];n(t,l)||r&&n(r,l)||a(t,l,c(e,l))}}},2211:function(t,e,r){"use strict";var n=r(9039);t.exports=!n(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})},2529:function(t){"use strict";t.exports=function(t,e){return{value:t,done:e}}},6699:function(t,e,r){"use strict";var n=r(3724),i=r(4913),o=r(6980);t.exports=n?function(t,e,r){return i.f(t,e,o(1,r))}:function(t,e,r){return t[e]=r,t}},6980:function(t){"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},2106:function(t,e,r){"use strict";var n=r(283),i=r(4913);t.exports=function(t,e,r){return r.get&&n(r.get,e,{getter:!0}),r.set&&n(r.set,e,{setter:!0}),i.f(t,e,r)}},6840:function(t,e,r){"use strict";var n=r(4901),i=r(4913),o=r(283),s=r(9433);t.exports=function(t,e,r,u){u||(u={});var a=u.enumerable,c=void 0!==u.name?u.name:e;if(n(r)&&o(r,c,u),u.global)a?t[e]=r:s(e,r);else{try{u.unsafe?t[e]&&(a=!0):delete t[e]}catch(t){}a?t[e]=r:i.f(t,e,{value:r,enumerable:!1,configurable:!u.nonConfigurable,writable:!u.nonWritable})}return t}},9433:function(t,e,r){"use strict";var n=r(4576),i=Object.defineProperty;t.exports=function(t,e){try{i(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},3724:function(t,e,r){"use strict";var n=r(9039);t.exports=!n(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},4055:function(t,e,r){"use strict";var n=r(4576),i=r(34),o=n.document,s=i(o)&&i(o.createElement);t.exports=function(t){return s?o.createElement(t):{}}},7400:function(t){"use strict";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}},9296:function(t,e,r){"use strict";var n=r(4055)("span").classList,i=n&&n.constructor&&n.constructor.prototype;t.exports=i===Object.prototype?void 0:i},8727:function(t){"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},4265:function(t,e,r){"use strict";var n=r(2839);t.exports=/ipad|iphone|ipod/i.test(n)&&"undefined"!=typeof Pebble},9544:function(t,e,r){"use strict";var n=r(2839);t.exports=/ipad|iphone|ipod/i.test(n)&&/applewebkit/i.test(n)},8574:function(t,e,r){"use strict";var n=r(4215);t.exports="NODE"===n},7860:function(t,e,r){"use strict";var n=r(2839);t.exports=/web0s(?!.*chrome)/i.test(n)},2839:function(t,e,r){"use strict";var n=r(4576).navigator,i=n&&n.userAgent;t.exports=i?String(i):""},9519:function(t,e,r){"use strict";var n,i,o=r(4576),s=r(2839),u=o.process,a=o.Deno,c=u&&u.versions||a&&a.version,f=c&&c.v8;f&&(i=(n=f.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&s&&(!(n=s.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=s.match(/Chrome\/(\d+)/))&&(i=+n[1]),t.exports=i},4215:function(t,e,r){"use strict";var n=r(4576),i=r(2839),o=r(2195),s=function(t){return i.slice(0,t.length)===t};t.exports=s("Bun/")?"BUN":s("Cloudflare-Workers")?"CLOUDFLARE":s("Deno/")?"DENO":s("Node.js/")?"NODE":n.Bun&&"string"==typeof Bun.version?"BUN":n.Deno&&"object"==typeof Deno.version?"DENO":"process"===o(n.process)?"NODE":n.window&&n.document?"BROWSER":"REST"},6193:function(t,e,r){"use strict";var n=r(9504),i=Error,o=n("".replace),s=String(new i("zxcasd").stack),u=/\n\s*at [^:]*:[^\n]*/,a=u.test(s);t.exports=function(t,e){if(a&&"string"==typeof t&&!i.prepareStackTrace)for(;e--;)t=o(t,u,"");return t}},747:function(t,e,r){"use strict";var n=r(6699),i=r(6193),o=r(4659),s=Error.captureStackTrace;t.exports=function(t,e,r,u){o&&(s?s(t,e):n(t,"stack",i(r,u)))}},4659:function(t,e,r){"use strict";var n=r(9039),i=r(6980);t.exports=!n(function(){var t=new Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",i(1,7)),7!==t.stack)})},6518:function(t,e,r){"use strict";var n=r(4576),i=r(7347).f,o=r(6699),s=r(6840),u=r(9433),a=r(7740),c=r(2796);t.exports=function(t,e){var r,f,l,h,p,d=t.target,y=t.global,v=t.stat;if(r=y?n:v?n[d]||u(d,{}):n[d]&&n[d].prototype)for(f in e){if(h=e[f],l=t.dontCallGetSet?(p=i(r,f))&&p.value:r[f],!c(y?f:d+(v?".":"#")+f,t.forced)&&void 0!==l){if(typeof h==typeof l)continue;a(h,l)}(t.sham||l&&l.sham)&&o(h,"sham",!0),s(r,f,h,t)}}},9039:function(t){"use strict";t.exports=function(t){try{return!!t()}catch(t){return!0}}},8745:function(t,e,r){"use strict";var n=r(616),i=Function.prototype,o=i.apply,s=i.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?s.bind(o):function(){return s.apply(o,arguments)})},6080:function(t,e,r){"use strict";var n=r(7476),i=r(9306),o=r(616),s=n(n.bind);t.exports=function(t,e){return i(t),void 0===e?t:o?s(t,e):function(){return t.apply(e,arguments)}}},616:function(t,e,r){"use strict";var n=r(9039);t.exports=!n(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})},9565:function(t,e,r){"use strict";var n=r(616),i=Function.prototype.call;t.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},350:function(t,e,r){"use strict";var n=r(3724),i=r(9297),o=Function.prototype,s=n&&Object.getOwnPropertyDescriptor,u=i(o,"name"),a=u&&"something"===function(){}.name,c=u&&(!n||n&&s(o,"name").configurable);t.exports={EXISTS:u,PROPER:a,CONFIGURABLE:c}},6706:function(t,e,r){"use strict";var n=r(9504),i=r(9306);t.exports=function(t,e,r){try{return n(i(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}}},7476:function(t,e,r){"use strict";var n=r(2195),i=r(9504);t.exports=function(t){if("Function"===n(t))return i(t)}},9504:function(t,e,r){"use strict";var n=r(616),i=Function.prototype,o=i.call,s=n&&i.bind.bind(o,o);t.exports=n?s:function(t){return function(){return o.apply(t,arguments)}}},7751:function(t,e,r){"use strict";var n=r(4576),i=r(4901);t.exports=function(t,e){return arguments.length<2?(r=n[t],i(r)?r:void 0):n[t]&&n[t][e];var r}},851:function(t,e,r){"use strict";var n=r(6955),i=r(5966),o=r(4117),s=r(6269),u=r(8227)("iterator");t.exports=function(t){if(!o(t))return i(t,u)||i(t,"@@iterator")||s[n(t)]}},81:function(t,e,r){"use strict";var n=r(9565),i=r(9306),o=r(8551),s=r(6823),u=r(851),a=TypeError;t.exports=function(t,e){var r=arguments.length<2?u(t):e;if(i(r))return o(n(r,t));throw new a(s(t)+" is not iterable")}},5966:function(t,e,r){"use strict";var n=r(9306),i=r(4117);t.exports=function(t,e){var r=t[e];return i(r)?void 0:n(r)}},4576:function(t,e,r){"use strict";var n=function(t){return t&&t.Math===Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9297:function(t,e,r){"use strict";var n=r(9504),i=r(8981),o=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},421:function(t){"use strict";t.exports={}},3138:function(t){"use strict";t.exports=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}}},397:function(t,e,r){"use strict";var n=r(7751);t.exports=n("document","documentElement")},5917:function(t,e,r){"use strict";var n=r(3724),i=r(9039),o=r(4055);t.exports=!n&&!i(function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a})},7055:function(t,e,r){"use strict";var n=r(9504),i=r(9039),o=r(2195),s=Object,u=n("".split);t.exports=i(function(){return!s("z").propertyIsEnumerable(0)})?function(t){return"String"===o(t)?u(t,""):s(t)}:s},3706:function(t,e,r){"use strict";var n=r(9504),i=r(4901),o=r(7629),s=n(Function.toString);i(o.inspectSource)||(o.inspectSource=function(t){return s(t)}),t.exports=o.inspectSource},7584:function(t,e,r){"use strict";var n=r(34),i=r(6699);t.exports=function(t,e){n(e)&&"cause"in e&&i(t,"cause",e.cause)}},1181:function(t,e,r){"use strict";var n,i,o,s=r(8622),u=r(4576),a=r(34),c=r(6699),f=r(9297),l=r(7629),h=r(6119),p=r(421),d="Object already initialized",y=u.TypeError,v=u.WeakMap;if(s||l.state){var b=l.state||(l.state=new v);b.get=b.get,b.has=b.has,b.set=b.set,n=function(t,e){if(b.has(t))throw new y(d);return e.facade=t,b.set(t,e),e},i=function(t){return b.get(t)||{}},o=function(t){return b.has(t)}}else{var g=h("state");p[g]=!0,n=function(t,e){if(f(t,g))throw new y(d);return e.facade=t,c(t,g,e),e},i=function(t){return f(t,g)?t[g]:{}},o=function(t){return f(t,g)}}t.exports={set:n,get:i,has:o,enforce:function(t){return o(t)?i(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!a(e)||(r=i(e)).type!==t)throw new y("Incompatible receiver, "+t+" required");return r}}}},4209:function(t,e,r){"use strict";var n=r(8227),i=r(6269),o=n("iterator"),s=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||s[o]===t)}},4901:function(t){"use strict";var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},3517:function(t,e,r){"use strict";var n=r(9504),i=r(9039),o=r(4901),s=r(6955),u=r(7751),a=r(3706),c=function(){},f=u("Reflect","construct"),l=/^\s*(?:class|function)\b/,h=n(l.exec),p=!l.test(c),d=function(t){if(!o(t))return!1;try{return f(c,[],t),!0}catch(t){return!1}},y=function(t){if(!o(t))return!1;switch(s(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!h(l,a(t))}catch(t){return!0}};y.sham=!0,t.exports=!f||i(function(){var t;return d(d.call)||!d(Object)||!d(function(){t=!0})||t})?y:d},2796:function(t,e,r){"use strict";var n=r(9039),i=r(4901),o=/#|\.prototype\./,s=function(t,e){var r=a[u(t)];return r===f||r!==c&&(i(e)?n(e):!!e)},u=s.normalize=function(t){return String(t).replace(o,".").toLowerCase()},a=s.data={},c=s.NATIVE="N",f=s.POLYFILL="P";t.exports=s},4117:function(t){"use strict";t.exports=function(t){return null==t}},34:function(t,e,r){"use strict";var n=r(4901);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},3925:function(t,e,r){"use strict";var n=r(34);t.exports=function(t){return n(t)||null===t}},6395:function(t){"use strict";t.exports=!1},757:function(t,e,r){"use strict";var n=r(7751),i=r(4901),o=r(1625),s=r(7040),u=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return i(e)&&o(e.prototype,u(t))}},2652:function(t,e,r){"use strict";var n=r(6080),i=r(9565),o=r(8551),s=r(6823),u=r(4209),a=r(6198),c=r(1625),f=r(81),l=r(851),h=r(9539),p=TypeError,d=function(t,e){this.stopped=t,this.result=e},y=d.prototype;t.exports=function(t,e,r){var v,b,g,m,w,x,_,S=r&&r.that,O=!(!r||!r.AS_ENTRIES),E=!(!r||!r.IS_RECORD),k=!(!r||!r.IS_ITERATOR),T=!(!r||!r.INTERRUPTED),j=n(e,S),A=function(t){var e=v;return v=void 0,e&&h(e,"normal"),new d(!0,t)},R=function(t){return O?(o(t),T?j(t[0],t[1],A):j(t[0],t[1])):T?j(t,A):j(t)};if(E)v=t.iterator;else if(k)v=t;else{if(!(b=l(t)))throw new p(s(t)+" is not iterable");if(u(b)){for(g=0,m=a(t);m>g;g++)if((w=R(t[g]))&&c(y,w))return w;return new d(!1)}v=f(t,b)}for(x=E?t.next:v.next;!(_=i(x,v)).done;){var P=_.value;try{w=R(P)}catch(t){if(!v)throw t;h(v,"throw",t)}if("object"==typeof w&&w&&c(y,w))return w}return new d(!1)}},9539:function(t,e,r){"use strict";var n=r(9565),i=r(8551),o=r(5966);t.exports=function(t,e,r){var s,u;i(t);try{if(!(s=o(t,"return"))){if("throw"===e)throw r;return r}s=n(s,t)}catch(t){u=!0,s=t}if("throw"===e)throw r;if(u)throw s;return i(s),r}},3994:function(t,e,r){"use strict";var n=r(7657).IteratorPrototype,i=r(2360),o=r(6980),s=r(687),u=r(6269),a=function(){return this};t.exports=function(t,e,r,c){var f=e+" Iterator";return t.prototype=i(n,{next:o(+!c,r)}),s(t,f,!1,!0),u[f]=a,t}},1088:function(t,e,r){"use strict";var n=r(6518),i=r(9565),o=r(6395),s=r(350),u=r(4901),a=r(3994),c=r(2787),f=r(2967),l=r(687),h=r(6699),p=r(6840),d=r(8227),y=r(6269),v=r(7657),b=s.PROPER,g=s.CONFIGURABLE,m=v.IteratorPrototype,w=v.BUGGY_SAFARI_ITERATORS,x=d("iterator"),_="keys",S="values",O="entries",E=function(){return this};t.exports=function(t,e,r,s,d,v,k){a(r,e,s);var T,j,A,R=function(t){if(t===d&&C)return C;if(!w&&t&&t in I)return I[t];switch(t){case _:case S:case O:return function(){return new r(this,t)}}return function(){return new r(this)}},P=e+" Iterator",M=!1,I=t.prototype,B=I[x]||I["@@iterator"]||d&&I[d],C=!w&&B||R(d),L="Array"===e&&I.entries||B;if(L&&(T=c(L.call(new t)))!==Object.prototype&&T.next&&(o||c(T)===m||(f?f(T,m):u(T[x])||p(T,x,E)),l(T,P,!0,!0),o&&(y[P]=E)),b&&d===S&&B&&B.name!==S&&(!o&&g?h(I,"name",S):(M=!0,C=function(){return i(B,this)})),d)if(j={values:R(S),keys:v?C:R(_),entries:R(O)},k)for(A in j)(w||M||!(A in I))&&p(I,A,j[A]);else n({target:e,proto:!0,forced:w||M},j);return o&&!k||I[x]===C||p(I,x,C,{name:d}),y[e]=C,j}},7657:function(t,e,r){"use strict";var n,i,o,s=r(9039),u=r(4901),a=r(34),c=r(2360),f=r(2787),l=r(6840),h=r(8227),p=r(6395),d=h("iterator"),y=!1;[].keys&&("next"in(o=[].keys())?(i=f(f(o)))!==Object.prototype&&(n=i):y=!0),!a(n)||s(function(){var t={};return n[d].call(t)!==t})?n={}:p&&(n=c(n)),u(n[d])||l(n,d,function(){return this}),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:y}},6269:function(t){"use strict";t.exports={}},6198:function(t,e,r){"use strict";var n=r(8014);t.exports=function(t){return n(t.length)}},283:function(t,e,r){"use strict";var n=r(9504),i=r(9039),o=r(4901),s=r(9297),u=r(3724),a=r(350).CONFIGURABLE,c=r(3706),f=r(1181),l=f.enforce,h=f.get,p=String,d=Object.defineProperty,y=n("".slice),v=n("".replace),b=n([].join),g=u&&!i(function(){return 8!==d(function(){},"length",{value:8}).length}),m=String(String).split("String"),w=t.exports=function(t,e,r){"Symbol("===y(p(e),0,7)&&(e="["+v(p(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!s(t,"name")||a&&t.name!==e)&&(u?d(t,"name",{value:e,configurable:!0}):t.name=e),g&&r&&s(r,"arity")&&t.length!==r.arity&&d(t,"length",{value:r.arity});try{r&&s(r,"constructor")&&r.constructor?u&&d(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=l(t);return s(n,"source")||(n.source=b(m,"string"==typeof e?e:"")),t};Function.prototype.toString=w(function(){return o(this)&&h(this).source||c(this)},"toString")},741:function(t){"use strict";var e=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?r:e)(n)}},1955:function(t,e,r){"use strict";var n,i,o,s,u,a=r(4576),c=r(3389),f=r(6080),l=r(9225).set,h=r(8265),p=r(9544),d=r(4265),y=r(7860),v=r(8574),b=a.MutationObserver||a.WebKitMutationObserver,g=a.document,m=a.process,w=a.Promise,x=c("queueMicrotask");if(!x){var _=new h,S=function(){var t,e;for(v&&(t=m.domain)&&t.exit();e=_.get();)try{e()}catch(t){throw _.head&&n(),t}t&&t.enter()};p||v||y||!b||!g?!d&&w&&w.resolve?((s=w.resolve(void 0)).constructor=w,u=f(s.then,s),n=function(){u(S)}):v?n=function(){m.nextTick(S)}:(l=f(l,a),n=function(){l(S)}):(i=!0,o=g.createTextNode(""),new b(S).observe(o,{characterData:!0}),n=function(){o.data=i=!i}),x=function(t){_.head||n(),_.add(t)}}t.exports=x},6043:function(t,e,r){"use strict";var n=r(9306),i=TypeError,o=function(t){var e,r;this.promise=new t(function(t,n){if(void 0!==e||void 0!==r)throw new i("Bad Promise constructor");e=t,r=n}),this.resolve=n(e),this.reject=n(r)};t.exports.f=function(t){return new o(t)}},2603:function(t,e,r){"use strict";var n=r(655);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:n(t)}},2360:function(t,e,r){"use strict";var n,i=r(8551),o=r(6801),s=r(8727),u=r(421),a=r(397),c=r(4055),f=r(6119),l="prototype",h="script",p=f("IE_PROTO"),d=function(){},y=function(t){return"<"+h+">"+t+"</"+h+">"},v=function(t){t.write(y("")),t.close();var e=t.parentWindow.Object;return t=null,e},b=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;b="undefined"!=typeof document?document.domain&&n?v(n):(e=c("iframe"),r="java"+h+":",e.style.display="none",a.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(y("document.F=Object")),t.close(),t.F):v(n);for(var i=s.length;i--;)delete b[l][s[i]];return b()};u[p]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(d[l]=i(t),r=new d,d[l]=null,r[p]=t):r=b(),void 0===e?r:o.f(r,e)}},6801:function(t,e,r){"use strict";var n=r(3724),i=r(8686),o=r(4913),s=r(8551),u=r(5397),a=r(1072);e.f=n&&!i?Object.defineProperties:function(t,e){s(t);for(var r,n=u(e),i=a(e),c=i.length,f=0;c>f;)o.f(t,r=i[f++],n[r]);return t}},4913:function(t,e,r){"use strict";var n=r(3724),i=r(5917),o=r(8686),s=r(8551),u=r(6969),a=TypeError,c=Object.defineProperty,f=Object.getOwnPropertyDescriptor,l="enumerable",h="configurable",p="writable";e.f=n?o?function(t,e,r){if(s(t),e=u(e),s(r),"function"==typeof t&&"prototype"===e&&"value"in r&&p in r&&!r[p]){var n=f(t,e);n&&n[p]&&(t[e]=r.value,r={configurable:h in r?r[h]:n[h],enumerable:l in r?r[l]:n[l],writable:!1})}return c(t,e,r)}:c:function(t,e,r){if(s(t),e=u(e),s(r),i)try{return c(t,e,r)}catch(t){}if("get"in r||"set"in r)throw new a("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},7347:function(t,e,r){"use strict";var n=r(3724),i=r(9565),o=r(8773),s=r(6980),u=r(5397),a=r(6969),c=r(9297),f=r(5917),l=Object.getOwnPropertyDescriptor;e.f=n?l:function(t,e){if(t=u(t),e=a(e),f)try{return l(t,e)}catch(t){}if(c(t,e))return s(!i(o.f,t,e),t[e])}},8480:function(t,e,r){"use strict";var n=r(1828),i=r(8727).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,i)}},3717:function(t,e){"use strict";e.f=Object.getOwnPropertySymbols},2787:function(t,e,r){"use strict";var n=r(9297),i=r(4901),o=r(8981),s=r(6119),u=r(2211),a=s("IE_PROTO"),c=Object,f=c.prototype;t.exports=u?c.getPrototypeOf:function(t){var e=o(t);if(n(e,a))return e[a];var r=e.constructor;return i(r)&&e instanceof r?r.prototype:e instanceof c?f:null}},1625:function(t,e,r){"use strict";var n=r(9504);t.exports=n({}.isPrototypeOf)},1828:function(t,e,r){"use strict";var n=r(9504),i=r(9297),o=r(5397),s=r(9617).indexOf,u=r(421),a=n([].push);t.exports=function(t,e){var r,n=o(t),c=0,f=[];for(r in n)!i(u,r)&&i(n,r)&&a(f,r);for(;e.length>c;)i(n,r=e[c++])&&(~s(f,r)||a(f,r));return f}},1072:function(t,e,r){"use strict";var n=r(1828),i=r(8727);t.exports=Object.keys||function(t){return n(t,i)}},8773:function(t,e){"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,i=n&&!r.call({1:2},1);e.f=i?function(t){var e=n(this,t);return!!e&&e.enumerable}:r},2967:function(t,e,r){"use strict";var n=r(6706),i=r(34),o=r(7750),s=r(3506);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=n(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return o(r),s(n),i(r)?(e?t(r,n):r.__proto__=n,r):r}}():void 0)},3179:function(t,e,r){"use strict";var n=r(2140),i=r(6955);t.exports=n?{}.toString:function(){return"[object "+i(this)+"]"}},4270:function(t,e,r){"use strict";var n=r(9565),i=r(4901),o=r(34),s=TypeError;t.exports=function(t,e){var r,u;if("string"===e&&i(r=t.toString)&&!o(u=n(r,t)))return u;if(i(r=t.valueOf)&&!o(u=n(r,t)))return u;if("string"!==e&&i(r=t.toString)&&!o(u=n(r,t)))return u;throw new s("Can't convert object to primitive value")}},5031:function(t,e,r){"use strict";var n=r(7751),i=r(9504),o=r(8480),s=r(3717),u=r(8551),a=i([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=o.f(u(t)),r=s.f;return r?a(e,r(t)):e}},9167:function(t,e,r){"use strict";var n=r(4576);t.exports=n},1103:function(t){"use strict";t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},916:function(t,e,r){"use strict";var n=r(4576),i=r(550),o=r(4901),s=r(2796),u=r(3706),a=r(8227),c=r(4215),f=r(6395),l=r(9519),h=i&&i.prototype,p=a("species"),d=!1,y=o(n.PromiseRejectionEvent),v=s("Promise",function(){var t=u(i),e=t!==String(i);if(!e&&66===l)return!0;if(f&&(!h.catch||!h.finally))return!0;if(!l||l<51||!/native code/.test(t)){var r=new i(function(t){t(1)}),n=function(t){t(function(){},function(){})};if((r.constructor={})[p]=n,!(d=r.then(function(){})instanceof n))return!0}return!(e||"BROWSER"!==c&&"DENO"!==c||y)});t.exports={CONSTRUCTOR:v,REJECTION_EVENT:y,SUBCLASSING:d}},550:function(t,e,r){"use strict";var n=r(4576);t.exports=n.Promise},3438:function(t,e,r){"use strict";var n=r(8551),i=r(34),o=r(6043);t.exports=function(t,e){if(n(t),i(e)&&e.constructor===t)return e;var r=o.f(t);return(0,r.resolve)(e),r.promise}},537:function(t,e,r){"use strict";var n=r(550),i=r(4428),o=r(916).CONSTRUCTOR;t.exports=o||!i(function(t){n.all(t).then(void 0,function(){})})},8265:function(t){"use strict";var e=function(){this.head=null,this.tail=null};e.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}},t.exports=e},7750:function(t,e,r){"use strict";var n=r(4117),i=TypeError;t.exports=function(t){if(n(t))throw new i("Can't call method on "+t);return t}},3389:function(t,e,r){"use strict";var n=r(4576),i=r(3724),o=Object.getOwnPropertyDescriptor;t.exports=function(t){if(!i)return n[t];var e=o(n,t);return e&&e.value}},7633:function(t,e,r){"use strict";var n=r(7751),i=r(2106),o=r(8227),s=r(3724),u=o("species");t.exports=function(t){var e=n(t);s&&e&&!e[u]&&i(e,u,{configurable:!0,get:function(){return this}})}},687:function(t,e,r){"use strict";var n=r(4913).f,i=r(9297),o=r(8227)("toStringTag");t.exports=function(t,e,r){t&&!r&&(t=t.prototype),t&&!i(t,o)&&n(t,o,{configurable:!0,value:e})}},6119:function(t,e,r){"use strict";var n=r(5745),i=r(3392),o=n("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},7629:function(t,e,r){"use strict";var n=r(6395),i=r(4576),o=r(9433),s="__core-js_shared__",u=t.exports=i[s]||o(s,{});(u.versions||(u.versions=[])).push({version:"3.49.0",mode:n?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"})},5745:function(t,e,r){"use strict";var n=r(7629);t.exports=function(t,e){return n[t]||(n[t]=e||{})}},2293:function(t,e,r){"use strict";var n=r(8551),i=r(5548),o=r(4117),s=r(8227)("species");t.exports=function(t,e){var r,u=n(t).constructor;return void 0===u||o(r=n(u)[s])?e:i(r)}},8183:function(t,e,r){"use strict";var n=r(9504),i=r(1291),o=r(655),s=r(7750),u=n("".charAt),a=n("".charCodeAt),c=n("".slice),f=function(t){return function(e,r){var n,f,l=o(s(e)),h=i(r),p=l.length;return h<0||h>=p?t?"":void 0:(n=a(l,h))<55296||n>56319||h+1===p||(f=a(l,h+1))<56320||f>57343?t?u(l,h):n:t?c(l,h,h+2):f-56320+(n-55296<<10)+65536}};t.exports={codeAt:f(!1),charAt:f(!0)}},4495:function(t,e,r){"use strict";var n=r(9519),i=r(9039),o=r(4576).String;t.exports=!!Object.getOwnPropertySymbols&&!i(function(){var t=Symbol("symbol detection");return!o(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41})},9225:function(t,e,r){"use strict";var n,i,o,s,u=r(4576),a=r(8745),c=r(6080),f=r(4901),l=r(9297),h=r(9039),p=r(397),d=r(7680),y=r(4055),v=r(2812),b=r(9544),g=r(8574),m=u.setImmediate,w=u.clearImmediate,x=u.process,_=u.Dispatch,S=u.Function,O=u.MessageChannel,E=u.String,k=0,T={},j="onreadystatechange";h(function(){n=u.location});var A=function(t){if(l(T,t)){var e=T[t];delete T[t],e()}},R=function(t){return function(){A(t)}},P=function(t){A(t.data)},M=function(t){u.postMessage(E(t),n.protocol+"//"+n.host)};m&&w||(m=function(t){v(arguments.length,1);var e=f(t)?t:S(t),r=d(arguments,1);return T[++k]=function(){a(e,void 0,r)},i(k),k},w=function(t){delete T[t]},g?i=function(t){x.nextTick(R(t))}:_&&_.now?i=function(t){_.now(R(t))}:O&&!b?(s=(o=new O).port2,o.port1.onmessage=P,i=c(s.postMessage,s)):u.addEventListener&&f(u.postMessage)&&!u.importScripts&&n&&"file:"!==n.protocol&&!h(M)?(i=M,u.addEventListener("message",P,!1)):i=j in y("script")?function(t){p.appendChild(y("script"))[j]=function(){p.removeChild(this),A(t)}}:function(t){setTimeout(R(t),0)}),t.exports={set:m,clear:w}},5610:function(t,e,r){"use strict";var n=r(1291),i=Math.max,o=Math.min;t.exports=function(t,e){var r=n(t);return r<0?i(r+e,0):o(r,e)}},5397:function(t,e,r){"use strict";var n=r(7055),i=r(7750);t.exports=function(t){return n(i(t))}},1291:function(t,e,r){"use strict";var n=r(741);t.exports=function(t){var e=+t;return e!=e||0===e?0:n(e)}},8014:function(t,e,r){"use strict";var n=r(1291),i=Math.min;t.exports=function(t){var e=n(t);return e>0?i(e,9007199254740991):0}},8981:function(t,e,r){"use strict";var n=r(7750),i=Object;t.exports=function(t){return i(n(t))}},2777:function(t,e,r){"use strict";var n=r(9565),i=r(34),o=r(757),s=r(5966),u=r(4270),a=r(8227),c=TypeError,f=a("toPrimitive");t.exports=function(t,e){if(!i(t)||o(t))return t;var r,a=s(t,f);if(a){if(void 0===e&&(e="default"),r=n(a,t,e),!i(r)||o(r))return r;throw new c("Can't convert object to primitive value")}return void 0===e&&(e="number"),u(t,e)}},6969:function(t,e,r){"use strict";var n=r(2777),i=r(757);t.exports=function(t){var e=n(t,"string");return i(e)?e:e+""}},2140:function(t,e,r){"use strict";var n={};n[r(8227)("toStringTag")]="z",t.exports="[object z]"===String(n)},655:function(t,e,r){"use strict";var n=r(6955),i=String;t.exports=function(t){if("Symbol"===n(t))throw new TypeError("Cannot convert a Symbol value to a string");return i(t)}},6823:function(t){"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},3392:function(t,e,r){"use strict";var n=r(9504),i=0,o=Math.random(),s=n(1.1.toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++i+o,36)}},7040:function(t,e,r){"use strict";var n=r(4495);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8686:function(t,e,r){"use strict";var n=r(3724),i=r(9039);t.exports=n&&i(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},2812:function(t){"use strict";var e=TypeError;t.exports=function(t,r){if(t<r)throw new e("Not enough arguments");return t}},8622:function(t,e,r){"use strict";var n=r(4576),i=r(4901),o=n.WeakMap;t.exports=i(o)&&/native code/.test(String(o))},8227:function(t,e,r){"use strict";var n=r(4576),i=r(5745),o=r(9297),s=r(3392),u=r(4495),a=r(7040),c=n.Symbol,f=i("wks"),l=a?c.for||c:c&&c.withoutSetter||s;t.exports=function(t){return o(f,t)||(f[t]=u&&o(c,t)?c[t]:l("Symbol."+t)),f[t]}},7145:function(t,e,r){"use strict";var n=r(6518),i=r(1625),o=r(2787),s=r(2967),u=r(7740),a=r(2360),c=r(6699),f=r(6980),l=r(7584),h=r(747),p=r(2652),d=r(2603),y=r(8227)("toStringTag"),v=Error,b=[].push,g=function(t,e){var r,n=i(m,this);s?r=s(new v,n?o(this):m):(r=n?this:a(m),c(r,y,"Error")),void 0!==e&&c(r,"message",d(e)),h(r,g,r.stack,1),arguments.length>2&&l(r,arguments[2]);var u=[];return p(t,b,{that:u}),c(r,"errors",u),r};s?s(g,v):u(g,v,{name:!0});var m=g.prototype=a(v.prototype,{constructor:f(1,g),message:f(1,""),name:f(1,"AggregateError")});n({global:!0,constructor:!0,arity:2},{AggregateError:g})},67:function(t,e,r){"use strict";r(7145)},3792:function(t,e,r){"use strict";var n=r(5397),i=r(6469),o=r(6269),s=r(1181),u=r(4913).f,a=r(1088),c=r(2529),f=r(6395),l=r(3724),h="Array Iterator",p=s.set,d=s.getterFor(h);t.exports=a(Array,"Array",function(t,e){p(this,{type:h,target:n(t),index:0,kind:e})},function(){var t=d(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=null,c(void 0,!0);switch(t.kind){case"keys":return c(r,!1);case"values":return c(e[r],!1)}return c([r,e[r]],!1)},"values");var y=o.Arguments=o.Array;if(i("keys"),i("values"),i("entries"),!f&&l&&"values"!==y.name)try{u(y,"name",{value:"values"})}catch(t){}},6099:function(t,e,r){"use strict";var n=r(2140),i=r(6840),o=r(3179);n||i(Object.prototype,"toString",o,{unsafe:!0})},6167:function(t,e,r){"use strict";var n=r(6518),i=r(9565),o=r(9306),s=r(6043),u=r(1103),a=r(2652);n({target:"Promise",stat:!0,forced:r(537)},{allSettled:function(t){var e=this,r=s.f(e),n=r.resolve,c=r.reject,f=u(function(){var r=o(e.resolve),s=[],u=0,c=1;a(t,function(t){var o=u++,a=!1;c++,i(r,e,t).then(function(t){a||(a=!0,s[o]={status:"fulfilled",value:t},--c||n(s))},function(t){a||(a=!0,s[o]={status:"rejected",reason:t},--c||n(s))})}),--c||n(s)});return f.error&&c(f.value),r.promise}})},6499:function(t,e,r){"use strict";var n=r(6518),i=r(9565),o=r(9306),s=r(6043),u=r(1103),a=r(2652);n({target:"Promise",stat:!0,forced:r(537)},{all:function(t){var e=this,r=s.f(e),n=r.resolve,c=r.reject,f=u(function(){var r=o(e.resolve),s=[],u=0,f=1;a(t,function(t){var o=u++,a=!1;f++,i(r,e,t).then(function(t){a||(a=!0,s[o]=t,--f||n(s))},c)}),--f||n(s)});return f.error&&c(f.value),r.promise}})},3518:function(t,e,r){"use strict";var n=r(6518),i=r(9565),o=r(9306),s=r(7751),u=r(6043),a=r(1103),c=r(2652),f=r(537),l="No one promise resolved";n({target:"Promise",stat:!0,forced:f},{any:function(t){var e=this,r=s("AggregateError"),n=u.f(e),f=n.resolve,h=n.reject,p=a(function(){var n=o(e.resolve),s=[],u=0,a=1,p=!1;c(t,function(t){var o=u++,c=!1;a++,i(n,e,t).then(function(t){c||p||(p=!0,f(t))},function(t){c||p||(c=!0,s[o]=t,--a||h(new r(s,l)))})}),--a||h(new r(s,l))});return p.error&&h(p.value),n.promise}})},2003:function(t,e,r){"use strict";var n=r(6518),i=r(6395),o=r(916).CONSTRUCTOR,s=r(550),u=r(7751),a=r(4901),c=r(6840),f=s&&s.prototype;if(n({target:"Promise",proto:!0,forced:o,real:!0},{catch:function(t){return this.then(void 0,t)}}),!i&&a(s)){var l=u("Promise").prototype.catch;f.catch!==l&&c(f,"catch",l,{unsafe:!0})}},436:function(t,e,r){"use strict";var n,i,o,s,u=r(6518),a=r(6395),c=r(8574),f=r(4576),l=r(9167),h=r(9565),p=r(6840),d=r(2967),y=r(687),v=r(7633),b=r(9306),g=r(4901),m=r(34),w=r(679),x=r(2293),_=r(9225).set,S=r(1955),O=r(3138),E=r(1103),k=r(8265),T=r(1181),j=r(550),A=r(916),R=r(6043),P="Promise",M=A.CONSTRUCTOR,I=A.REJECTION_EVENT,B=A.SUBCLASSING,C=T.getterFor(P),L=T.set,U=j&&j.prototype,N=j,D=U,F=f.TypeError,q=f.document,W=f.process,H=R.f,G=H,z=!!(q&&q.createEvent&&f.dispatchEvent),V="unhandledrejection",$=function(t){var e;return!(!m(t)||!g(e=t.then))&&e},Y=function(t,e){var r,n,i,o=e.value,s=1===e.state,u=s?t.ok:t.fail,a=t.resolve,c=t.reject,f=t.domain;try{u?(s||(2===e.rejection&&Z(e),e.rejection=1),!0===u?r=o:(f&&f.enter(),r=u(o),f&&(f.exit(),i=!0)),r===t.promise?c(new F("Promise-chain cycle")):(n=$(r))?h(n,r,a,c):a(r)):c(o)}catch(t){f&&!i&&f.exit(),c(t)}},J=function(t,e){t.notified||(t.notified=!0,S(function(){for(var r,n=t.reactions;r=n.get();)Y(r,t);t.notified=!1,e&&!t.rejection&&K(t)}))},X=function(t,e,r){var n,i;z?((n=q.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),f.dispatchEvent(n)):n={promise:e,reason:r},!I&&(i=f["on"+t])?i(n):t===V&&O("Unhandled promise rejection",r)},K=function(t){h(_,f,function(){var e,r=t.facade,n=t.value;if(Q(t)&&(e=E(function(){c?W.emit("unhandledRejection",n,r):X(V,r,n)}),t.rejection=c||Q(t)?2:1,e.error))throw e.value})},Q=function(t){return 1!==t.rejection&&!t.parent},Z=function(t){h(_,f,function(){var e=t.facade;c?W.emit("rejectionHandled",e):X("rejectionhandled",e,t.value)})},tt=function(t,e,r){return function(n){t(e,n,r)}},et=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,J(t,!0))},rt=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw new F("Promise can't be resolved itself");var n=$(e);n?S(function(){var r={done:!1};try{h(n,e,tt(rt,r,t),tt(et,r,t))}catch(e){et(r,e,t)}}):(t.value=e,t.state=1,J(t,!1))}catch(e){et({done:!1},e,t)}}};if(M&&(D=(N=function(t){w(this,D),b(t),h(n,this);var e=C(this);try{t(tt(rt,e),tt(et,e))}catch(t){et(e,t)}}).prototype,(n=function(t){L(this,{type:P,done:!1,notified:!1,parent:!1,reactions:new k,rejection:!1,state:0,value:null})}).prototype=p(D,"then",function(t,e){var r=C(this),n=H(x(this,N));return r.parent=!0,n.ok=!g(t)||t,n.fail=g(e)&&e,n.domain=c?W.domain:void 0,0===r.state?r.reactions.add(n):S(function(){Y(n,r)}),n.promise}),i=function(){var t=new n,e=C(t);this.promise=t,this.resolve=tt(rt,e),this.reject=tt(et,e)},R.f=H=function(t){return t===N||t===o?new i(t):G(t)},!a&&g(j)&&U!==Object.prototype)){s=U.then,B||p(U,"then",function(t,e){var r=this;return new N(function(t,e){h(s,r,t,e)}).then(t,e)},{unsafe:!0});try{delete U.constructor}catch(t){}d&&d(U,D)}u({global:!0,constructor:!0,wrap:!0,forced:M},{Promise:N}),o=l.Promise,y(N,P,!1,!0),v(P)},9391:function(t,e,r){"use strict";var n=r(6518),i=r(6395),o=r(550),s=r(9039),u=r(7751),a=r(4901),c=r(2293),f=r(3438),l=r(6840),h=o&&o.prototype;if(n({target:"Promise",proto:!0,real:!0,forced:!!o&&s(function(){h.finally.call({then:function(){}},function(){})})},{finally:function(t){var e=c(this,u("Promise")),r=a(t);return this.then(r?function(r){return f(e,t()).then(function(){return r})}:t,r?function(r){return f(e,t()).then(function(){throw r})}:t)}}),!i&&a(o)){var p=u("Promise").prototype.finally;h.finally!==p&&l(h,"finally",p,{unsafe:!0})}},3362:function(t,e,r){"use strict";r(436),r(6499),r(2003),r(7743),r(1481),r(280)},7743:function(t,e,r){"use strict";var n=r(6518),i=r(9565),o=r(9306),s=r(6043),u=r(1103),a=r(2652);n({target:"Promise",stat:!0,forced:r(537)},{race:function(t){var e=this,r=s.f(e),n=r.reject,c=u(function(){var s=o(e.resolve);a(t,function(t){i(s,e,t).then(r.resolve,n)})});return c.error&&n(c.value),r.promise}})},1481:function(t,e,r){"use strict";var n=r(6518),i=r(6043);n({target:"Promise",stat:!0,forced:r(916).CONSTRUCTOR},{reject:function(t){var e=i.f(this);return(0,e.reject)(t),e.promise}})},280:function(t,e,r){"use strict";var n=r(6518),i=r(7751),o=r(6395),s=r(550),u=r(916).CONSTRUCTOR,a=r(3438),c=i("Promise"),f=o&&!u;n({target:"Promise",stat:!0,forced:o||u},{resolve:function(t){return a(f&&this===c?s:this,t)}})},1689:function(t,e,r){"use strict";var n=r(6518),i=r(4576),o=r(8745),s=r(7680),u=r(6043),a=r(9306),c=r(1103),f=i.Promise,l=!1;n({target:"Promise",stat:!0,forced:!f||!f.try||c(function(){f.try(function(t){l=8===t},8)}).error||!l},{try:function(t){var e=arguments.length>1?s(arguments,1):[],r=u.f(this),n=c(function(){return o(a(t),void 0,e)});return(n.error?r.reject:r.resolve)(n.value),r.promise}})},4628:function(t,e,r){"use strict";var n=r(6518),i=r(6043);n({target:"Promise",stat:!0},{withResolvers:function(){var t=i.f(this);return{promise:t.promise,resolve:t.resolve,reject:t.reject}}})},7764:function(t,e,r){"use strict";var n=r(8183).charAt,i=r(655),o=r(1181),s=r(1088),u=r(2529),a="String Iterator",c=o.set,f=o.getterFor(a);s(String,"String",function(t){c(this,{type:a,string:i(t),index:0})},function(){var t,e=f(this),r=e.string,i=e.index;return i>=r.length?u(void 0,!0):(t=n(r,i),e.index+=t.length,u(t,!1))})},9806:function(t,e,r){"use strict";r(67)},5874:function(t,e,r){"use strict";r(6167)},7575:function(t,e,r){"use strict";r(3518)},7628:function(t,e,r){"use strict";r(1689)},3799:function(t,e,r){"use strict";r(4628)},2953:function(t,e,r){"use strict";var n=r(4576),i=r(7400),o=r(9296),s=r(3792),u=r(6699),a=r(687),c=r(8227)("iterator"),f=s.values,l=function(t,e){if(t){if(t[c]!==f)try{u(t,c,f)}catch(e){t[c]=f}if(a(t,e,!0),i[e])for(var r in s)if(t[r]!==s[r])try{u(t,r,s[r])}catch(e){t[r]=s[r]}}};for(var h in i)l(n[h]&&n[h].prototype,h);l(o,"DOMTokenList")},2473:function(t,e,r){"use strict";var n=r(6398);r(2953),t.exports=n}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}return r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r(3822)}()});
2
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.DirectLine=e():t.DirectLine=e()}(self,function(){return function(){var t={2258:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default=function(){var t={};return t.promise=new Promise(function(e,r){t.reject=r,t.resolve=e}),t}},842:function(t,e,r){"use strict";var n=r(4994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=[];return t.forEach(function(t){for(var r=(0,i.default)(t),n=r.extname,o=r.name,s=0,u=t;e.includes(u);)u=[o,"(".concat(++s,")")].filter(function(t){return t}).join(" ")+n;e.push(u)}),e};var i=n(r(4227))},3822:function(t,e,r){"use strict";var n=r(4994),i=r(3738);Object.defineProperty(e,"__esModule",{value:!0}),e.DirectLine=e.ConnectionStatus=void 0,Object.defineProperty(e,"DirectLineStreaming",{enumerable:!0,get:function(){return d.DirectLineStreaming}});var o=n(r(1847)),s=n(r(7383)),u=n(r(4579)),a=n(r(3693));r(5781),r(8318);var c=r(3114),f=r(9707),l=r(1518),h=function(t){if("function"==typeof WeakMap){var e=new WeakMap;new WeakMap}return function(t){if(t&&t.__esModule)return t;var r,n,o={__proto__:null,default:t};if(null===t||"object"!=i(t)&&"function"!=typeof t)return o;if(r=e){if(r.has(t))return r.get(t);r.set(t,o)}for(var s in t)"default"!==s&&{}.hasOwnProperty.call(t,s)&&((n=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(t,s))&&(n.get||n.set)?r(o,s,n):o[s]=t[s]);return o}(t)}(r(6765));r(3690),r(3071),r(2166),r(298),r(3576),r(1239),r(4359),r(2639),r(4983),r(731),r(1734),r(4166),r(4553),r(7033),r(7694),r(5103),r(3783),r(8540);var p=n(r(842)),d=r(5592),y=["contentUrl"];function v(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function b(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?v(Object(r),!0).forEach(function(e){(0,a.default)(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}var g=e.ConnectionStatus=function(t){return t[t.Uninitialized=0]="Uninitialized",t[t.Connecting=1]="Connecting",t[t.Online=2]="Online",t[t.ExpiredToken=3]="ExpiredToken",t[t.FailedToConnect=4]="FailedToConnect",t[t.Ended=5]="Ended",t}({}),m=function(t,e){var r=function(){throw new Error("not implemented")};return Object.assign(function(r){return t(r).catch(function(t){if(429===t.status){var r=t.xhr.getResponseHeader("Retry-After"),n=Number(r);if(!isNaN(n))return f.Observable.timer(n,e).flatMap(function(r){return f.Observable.throw(t,e)})}return f.Observable.throw(t,e)})},{get:function(t,e){return r()},post:function(t,e,n){return r()},put:function(t,e,n){return r()},patch:function(t,e,n){return r()},delete:function(t,e){return r()},getJSON:function(t,e){return r()}})},w=new Error("expired token"),x=new Error("conversation ended"),_=new Error("failed to connect"),S=function(t){for(var e,r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];"undefined"!=typeof window&&window.botchatDebug&&t&&(e=console).log.apply(e,[t].concat(n))};e.DirectLine=function(){return(0,u.default)(function t(e){var r,n;(0,s.default)(this,t),(0,a.default)(this,"connectionStatus$",new c.BehaviorSubject(g.Uninitialized)),(0,a.default)(this,"domain","https://directline.botframework.com/v3/directline"),(0,a.default)(this,"watermark",""),(0,a.default)(this,"_botAgent",""),(0,a.default)(this,"timeout",2e4),(0,a.default)(this,"pollingInterval",1e3),this.secret=e.secret,this.token=e.secret||e.token,this.webSocket=(void 0===e.webSocket||e.webSocket)&&"undefined"!=typeof WebSocket&&void 0!==WebSocket,e.streaming&&(this.streaming=e.streaming),e.conversationStartProperties&&e.conversationStartProperties.locale&&("[object String]"===Object.prototype.toString.call(e.conversationStartProperties.locale)?this.localeOnStartConversation=e.conversationStartProperties.locale:console.warn("DirectLineJS: conversationStartProperties.locale was ignored: the locale name may be a BCP 47 language tag")),e.domain&&(this.domain=e.domain),e.conversationId&&(this.conversationId=e.conversationId),e.watermark&&(this.watermark=e.watermark),e.streamUrl&&(e.token&&e.conversationId?this.streamUrl=e.streamUrl:console.warn("DirectLineJS: streamUrl was ignored: you need to provide a token and a conversationid")),void 0!==e.timeout&&(this.timeout=e.timeout),this.retries=9e5/this.timeout,this._botAgent=this.getBotAgent(e.botAgent),this.services={scheduler:n=(r=e).scheduler||l.async,ajax:m(r.ajax||f.Observable.ajax,n),WebSocket:r.WebSocket||WebSocket,random:r.random||Math.random};var i=~~e.pollingInterval;i<200?void 0!==e.pollingInterval&&console.warn("DirectLineJS: provided pollingInterval (".concat(e.pollingInterval,") is under lower bound (200ms), using default of 1000ms")):this.pollingInterval=i,this.expiredTokenExhaustion=this.setConnectionStatusFallback(g.ExpiredToken,g.FailedToConnect,5),this.activity$=(this.webSocket?this.webSocketActivity$():this.pollingGetActivity$()).share()},[{key:"checkConnection",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=this.connectionStatus$.flatMap(function(e){return e===g.Uninitialized?(t.connectionStatus$.next(g.Connecting),t.token&&t.streamUrl?(t.connectionStatus$.next(g.Online),f.Observable.of(e,t.services.scheduler)):t.startConversation().do(function(e){t.conversationId=e.conversationId,t.token=t.secret||e.token,t.streamUrl=e.streamUrl,t.referenceGrammarId=e.referenceGrammarId,t.secret||t.refreshTokenLoop(),t.connectionStatus$.next(g.Online)},function(e){t.connectionStatus$.next(g.FailedToConnect)}).map(function(t){return e})):f.Observable.of(e,t.services.scheduler)}).filter(function(t){return t!=g.Uninitialized&&t!=g.Connecting}).flatMap(function(e){switch(e){case g.Ended:return f.Observable.throw(x,t.services.scheduler);case g.FailedToConnect:return f.Observable.throw(_,t.services.scheduler);case g.ExpiredToken:default:return f.Observable.of(e,t.services.scheduler)}});return e?r.take(1):r}},{key:"setConnectionStatusFallback",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5;r--;var n=0,i=null;return function(o){return o===t&&i===o&&n>=r?(n=0,e):(n++,i=o,o)}}},{key:"expiredToken",value:function(){var t=this.connectionStatus$.getValue();t!=g.Ended&&t!=g.FailedToConnect&&this.connectionStatus$.next(g.ExpiredToken);var e=this.expiredTokenExhaustion(this.connectionStatus$.getValue());this.connectionStatus$.next(e)}},{key:"startConversation",value:function(){var t=this,e=this.conversationId?"".concat(this.domain,"/conversations/").concat(this.conversationId,"?watermark=").concat(this.watermark):"".concat(this.domain,"/conversations"),r=this.conversationId?"GET":"POST",n=this.conversationId?void 0:{user:{id:this.userIdOnStartConversation},locale:this.localeOnStartConversation};return this.services.ajax({method:r,url:e,body:n,timeout:this.timeout,headers:b({Accept:"application/json","Content-Type":"application/json"},this.commonHeaders())}).map(function(t){return t.response}).retryWhen(function(e){return e.mergeMap(function(e){return e.status>=400&&e.status<600?f.Observable.throw(e,t.services.scheduler):f.Observable.of(e,t.services.scheduler)}).delay(t.timeout,t.services.scheduler).take(t.retries)})}},{key:"refreshTokenLoop",value:function(){var t=this;this.tokenRefreshSubscription=f.Observable.interval(9e5,this.services.scheduler).flatMap(function(e){return t.refreshToken()}).subscribe(function(e){S("refreshing token",e,"at",new Date),t.token=e})}},{key:"refreshToken",value:function(){var t=this;return this.checkConnection(!0).flatMap(function(e){return t.services.ajax({method:"POST",url:"".concat(t.domain,"/tokens/refresh"),timeout:t.timeout,headers:b({},t.commonHeaders())}).map(function(t){return t.response.token}).retryWhen(function(e){return e.mergeMap(function(e){return 403===e.status?(t.expiredToken(),f.Observable.throw(e,t.services.scheduler)):404===e.status?f.Observable.throw(e,t.services.scheduler):f.Observable.of(e,t.services.scheduler)}).delay(t.timeout,t.services.scheduler).take(t.retries)})})}},{key:"reconnect",value:function(t){this.token=t.token,this.streamUrl=t.streamUrl,this.connectionStatus$.getValue()===g.ExpiredToken&&this.connectionStatus$.next(g.Online)}},{key:"end",value:function(){this.tokenRefreshSubscription&&this.tokenRefreshSubscription.unsubscribe();try{this.connectionStatus$.next(g.Ended)}catch(t){if(t===x)return;throw t}}},{key:"getSessionId",value:function(){var t=this;return S("getSessionId"),this.checkConnection(!0).flatMap(function(e){return t.services.ajax({method:"GET",url:"".concat(t.domain,"/session/getsessionid"),withCredentials:!0,timeout:t.timeout,headers:b({"Content-Type":"application/json"},t.commonHeaders())}).map(function(t){return t&&t.response&&t.response.sessionId?(S("getSessionId response: "+t.response.sessionId),t.response.sessionId):""}).catch(function(e){return S("getSessionId error: "+e.status),f.Observable.of("",t.services.scheduler)})}).catch(function(e){return t.catchExpiredToken(e)})}},{key:"postActivity",value:function(t){var e=this;return this.streaming&&(t.deliveryMode="stream"),this.userIdOnStartConversation&&t.from&&t.from.id!==this.userIdOnStartConversation&&(console.warn("DirectLineJS: Activity.from.id does not match with user id, ignoring activity.from.id"),t.from.id=this.userIdOnStartConversation),"message"===t.type&&t.attachments&&t.attachments.length>0?this.postMessageWithAttachments(t):(S("postActivity",t),this.checkConnection(!0).flatMap(function(r){return e.services.ajax({method:"POST",url:"".concat(e.domain,"/conversations/").concat(e.conversationId,"/activities"),body:t,timeout:e.timeout,headers:b({"Content-Type":"application/json"},e.commonHeaders())}).map(function(t){return t.response.id}).catch(function(t){return e.catchPostError(t)})}).catch(function(t){return e.catchExpiredToken(t)}))}},{key:"postMessageWithAttachments",value:function(t){var e,r=this,n=t.attachments,i=(0,p.default)(n.map(function(t){return t.name||"blob"})),s=n.map(function(t,e){return b(b({},t),{},{name:i[e]})});return this.checkConnection(!0).flatMap(function(n){return(e=new FormData).append("activity",new Blob([JSON.stringify(b(b({},t),{},{attachments:s.map(function(t){return t.contentUrl,b({},(0,o.default)(t,y))})}))],{type:"application/vnd.microsoft.activity"})),f.Observable.from(s,r.services.scheduler).flatMap(function(t){return r.services.ajax({method:"GET",url:t.contentUrl,responseType:"arraybuffer"}).do(function(r){return e.append("file",new Blob([r.response],{type:t.contentType}),t.name)})}).count()}).flatMap(function(n){return r.services.ajax({method:"POST",url:"".concat(r.domain,"/conversations/").concat(r.conversationId,"/upload?userId=").concat(t.from.id),body:e,timeout:r.timeout,headers:b({},r.commonHeaders())}).map(function(t){return t.response.id}).catch(function(t){return r.catchPostError(t)})}).catch(function(t){return r.catchPostError(t)})}},{key:"catchPostError",value:function(t){if(403===t.status)this.expiredToken();else if(t.status>=400&&t.status<500)return f.Observable.throw(t,this.services.scheduler);return f.Observable.of("retry",this.services.scheduler)}},{key:"catchExpiredToken",value:function(t){return t===w?f.Observable.of("retry",this.services.scheduler):f.Observable.throw(t,this.services.scheduler)}},{key:"pollingGetActivity$",value:function(){var t=this,e=f.Observable.create(function(e){var r=new c.BehaviorSubject({});r.subscribe(function(){if(t.connectionStatus$.getValue()===g.Online){var n=Date.now();t.services.ajax({headers:b({Accept:"application/json"},t.commonHeaders()),method:"GET",url:"".concat(t.domain,"/conversations/").concat(t.conversationId,"/activities?watermark=").concat(t.watermark),timeout:t.timeout}).subscribe(function(i){e.next(i),setTimeout(function(){return r.next(null)},Math.max(0,t.pollingInterval-Date.now()+n))},function(n){switch(n.status){case 403:t.connectionStatus$.next(g.ExpiredToken),setTimeout(function(){return r.next(null)},t.pollingInterval);break;case 404:t.connectionStatus$.next(g.Ended);break;default:e.error(n)}})}})});return this.checkConnection().flatMap(function(r){return e.catch(function(){return f.Observable.empty()}).map(function(t){return t.response}).flatMap(function(e){return t.observableFromActivityGroup(e)})})}},{key:"observableFromActivityGroup",value:function(t){return t.watermark&&(this.watermark=t.watermark),f.Observable.from(t.activities,this.services.scheduler)}},{key:"webSocketActivity$",value:function(){var t=this;return this.checkConnection().flatMap(function(e){return t.observableWebSocket().retryWhen(function(e){return e.delay(t.getRetryDelay(),t.services.scheduler).mergeMap(function(e){return t.reconnectToConversation()})})}).flatMap(function(e){return t.observableFromActivityGroup(e)})}},{key:"getRetryDelay",value:function(){return Math.floor(3e3+12e3*this.services.random())}},{key:"observableWebSocket",value:function(){var t=this;return f.Observable.create(function(e){S("creating WebSocket",t.streamUrl);var r,n,i=new t.services.WebSocket(t.streamUrl);return i.onopen=function(e){S("WebSocket open",e),r=f.Observable.interval(t.timeout,t.services.scheduler).subscribe(function(t){try{i.send("")}catch(t){S("Ping error",t)}})},i.onclose=function(t){S("WebSocket close",t),r&&r.unsubscribe(),n||e.error(t),n=!0},i.onerror=function(t){S("WebSocket error",t),r&&r.unsubscribe(),n||e.error(t),n=!0},i.onmessage=function(t){return t.data&&e.next(JSON.parse(t.data))},function(){0!==i.readyState&&1!==i.readyState||i.close()}})}},{key:"reconnectToConversation",value:function(){var t=this;return this.checkConnection(!0).flatMap(function(e){return t.services.ajax({method:"GET",url:"".concat(t.domain,"/conversations/").concat(t.conversationId,"?watermark=").concat(t.watermark),timeout:t.timeout,headers:b({Accept:"application/json"},t.commonHeaders())}).do(function(e){t.secret||(t.token=e.response.token),t.streamUrl=e.response.streamUrl}).map(function(t){return null}).retryWhen(function(e){return e.mergeMap(function(e){if(403===e.status)t.expiredToken();else if(404===e.status)return f.Observable.throw(x,t.services.scheduler);return f.Observable.of(e,t.services.scheduler)}).delay(t.timeout,t.services.scheduler).take(t.retries)})})}},{key:"commonHeaders",value:function(){return{Authorization:"Bearer ".concat(this.token),"x-ms-bot-agent":this._botAgent}}},{key:"getBotAgent",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e="directlinejs";return t&&(e+="; ".concat(t)),"".concat("DirectLine/3.0"," (").concat(e," ").concat("0.15.10-master.9739039",")")}},{key:"setUserId",value:function(t){if(this.connectionStatus$.getValue()===g.Online)throw new Error("DirectLineJS: It is connected, we cannot set user id.");return this.parseToken(this.token)?console.warn("DirectLineJS: user id is already set in token, will ignore this user id."):/^dl_/.test(t)?console.warn('DirectLineJS: user id prefixed with "dl_" is reserved and must be embedded into the Direct Line token to prevent forgery.'):void(this.userIdOnStartConversation=t)}},{key:"parseToken",value:function(t){try{return(0,h.default)(t).user}catch(t){if(t instanceof h.InvalidTokenError)return}}}])}()},5592:function(t,e,r){"use strict";var n=r(4994),i=r(3738);Object.defineProperty(e,"__esModule",{value:!0}),e.DirectLineStreaming=void 0;var o=n(r(1847)),s=n(r(4756)),u=n(r(1132)),a=n(r(9293)),c=n(r(7383)),f=n(r(4579)),l=n(r(3693)),h=r(3114),p=r(1545),d=r(9707),y=function(t){if("function"==typeof WeakMap){var e=new WeakMap;new WeakMap}return function(t){if(t&&t.__esModule)return t;var r,n,o={__proto__:null,default:t};if(null===t||"object"!=i(t)&&"function"!=typeof t)return o;if(r=e){if(r.has(t))return r.get(t);r.set(t,o)}for(var s in t)"default"!==s&&{}.hasOwnProperty.call(t,s)&&((n=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(t,s))&&(n.get||n.set)?r(o,s,n):o[s]=t[s]);return o}(t)}(r(8296)),v=n(r(2258)),b=n(r(4945)),g=r(3822),m=n(r(3266)),w=["attachments"];function x(t,e){return t.get(_(t,e))}function _(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}var S=function(){return(0,f.default)(function t(e,r,n){(0,c.default)(this,t),(0,l.default)(this,"activityQueue",[]),this.subscriber=e,this.connectionStatus$=r,this.shouldQueue=n},[{key:"setSubscriber",value:function(t){this.subscriber=t}},{key:"processRequest",value:(t=(0,a.default)(s.default.mark(function t(e,r){var n,i,o,a,c,f,l,h,p;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=(0,u.default)(e.streams),i=n.shift(),t.next=1,i.readAsString();case 1:if(o=t.sent,1===(a=JSON.parse(o)).activities.length){t.next=2;break}return this.subscriber.error(new Error("there should be exactly one activity")),t.abrupt("return",y.StreamingResponse.create(500));case 2:if(c=a.activities[0],!(n.length>0)){t.next=6;break}f=(0,u.default)(c.attachments);case 3:if(!(l=n.shift())){t.next=5;break}return t.next=4,l.readAsString();case 4:h=t.sent,p="data:text/plain;base64,"+h,f.push({contentType:l.contentType,contentUrl:p}),t.next=3;break;case 5:c.attachments=f;case 6:return this.shouldQueue()?this.activityQueue.push(c):this.subscriber.next(c),t.abrupt("return",y.StreamingResponse.create(200));case 7:case"end":return t.stop()}},t,this)})),function(e,r){return t.apply(this,arguments)})},{key:"flush",value:function(){var t=this;this.connectionStatus$.subscribe(function(){}),this.activityQueue.forEach(function(e){return t.subscriber.next(e)}),this.activityQueue=[]}},{key:"end",value:function(){this.subscriber.complete()}}]);var t}(),O=new WeakMap;e.DirectLineStreaming=function(){return(0,f.default)(function t(e){var r=this;(0,c.default)(this,t),(0,l.default)(this,"connectionStatus$",new h.BehaviorSubject(g.ConnectionStatus.Uninitialized)),(0,l.default)(this,"_botAgent",""),function(t,e,r){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,r)}(this,O,void 0);var n,i,o=null==e?void 0:e.networkInformation;void 0===o||"function"==typeof o.addEventListener&&"function"==typeof o.removeEventListener&&"string"==typeof o.type?(i=o,(n=O).set(_(n,this),i)):console.warn('botframework-directlinejs: "networkInformation" option specified must be a `NetworkInformation`-like instance extending `EventTarget` interface with a `type` property returning a string.'),this.token=e.token,this.refreshToken().catch(function(){r.connectionStatus$.next(g.ConnectionStatus.ExpiredToken)}),this.domain=e.domain,e.conversationId&&(this.conversationId=e.conversationId),this._botAgent=this.getBotAgent(e.botAgent),this.queueActivities=!0,this.activity$=d.Observable.create(function(){var t=(0,a.default)(s.default.mark(function t(e){return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r.activitySubscriber=e,r.theStreamHandler=new S(e,r.connectionStatus$,function(){return r.queueActivities}),r.connectDeferred.resolve();case 1:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()).share(),this.connectWithRetryAsync()},[{key:"reconnect",value:function(t){var e=t.conversationId,r=t.token;if(this.connectionStatus$.getValue()===g.ConnectionStatus.Ended)throw new Error("Connection has ended.");this.conversationId=e,this.token=r,this.connectDeferred.resolve()}},{key:"end",value:function(){this.activitySubscriber.complete(),this.connectionStatus$.next(g.ConnectionStatus.Ended),this.connectionStatus$.complete(),this.streamConnection.disconnect()}},{key:"commonHeaders",value:function(){return{Authorization:"Bearer ".concat(this.token),"x-ms-bot-agent":this._botAgent}}},{key:"getBotAgent",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e="directlineStreaming";return t&&(e+="; ".concat(t)),"".concat("DirectLine/3.0"," (").concat(e,")")}},{key:"refreshToken",value:(n=(0,a.default)(s.default.mark(function t(){var e,r,n,i,o;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,this.waitUntilOnline();case 1:e=0;case 2:if(!(e<3)){t.next=10;break}return e++,t.next=3,new Promise(function(t){return setTimeout(t,9e5)});case 3:return t.prev=3,t.next=4,(0,b.default)("".concat(this.domain,"/tokens/refresh"),{method:"POST",headers:this.commonHeaders()});case 4:if(!(r=t.sent).ok){t.next=6;break}return e=0,t.next=5,r.json();case 5:n=t.sent,i=n.token,this.token=i,t.next=7;break;case 6:403===r.status||403===r.status?(console.error("Fatal error while refreshing the token: ".concat(r.status," ").concat(r.statusText)),this.streamConnection.disconnect()):console.warn("Refresh attempt #".concat(e," failed: ").concat(r.status," ").concat(r.statusText));case 7:t.next=9;break;case 8:t.prev=8,o=t.catch(3),console.warn("Refresh attempt #".concat(e," threw an exception: ").concat(o));case 9:t.next=2;break;case 10:console.error("Retries exhausted"),this.streamConnection.disconnect();case 11:case"end":return t.stop()}},t,this,[[3,8]])})),function(){return n.apply(this,arguments)})},{key:"postActivity",value:function(t){var e=this;if(this.connectionStatus$.value===g.ConnectionStatus.Ended||this.connectionStatus$.value===g.ConnectionStatus.FailedToConnect)return d.Observable.throw(new Error("Connection is closed"));if("message"===t.type&&t.attachments&&t.attachments.length>0)return this.postMessageWithAttachments(t);var r=d.Observable.create(function(){var r=(0,a.default)(s.default.mark(function r(n){var i,o,u,a,c,f,l;return s.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return(i=y.StreamingRequest.create("POST","/v3/directline/conversations/"+e.conversationId+"/activities")).setBody(JSON.stringify(t)),r.prev=1,r.next=2,e.streamConnection.send(i);case 2:if(200===(o=r.sent).statusCode){r.next=3;break}throw new Error("PostActivity returned "+o.statusCode);case 3:if(1===(u=o.streams.length)){r.next=4;break}throw new Error("Expected one stream but got "+u);case 4:return r.next=5,o.streams[0].readAsString();case 5:return a=r.sent,c=JSON.parse(a),f=c.Id,n.next(f),r.abrupt("return",n.complete());case 6:return r.prev=6,l=r.catch(1),console.warn(l),e.streamConnection.disconnect(),r.abrupt("return",n.error(l));case 7:case"end":return r.stop()}},r,null,[[1,6]])}));return function(t){return r.apply(this,arguments)}}());return r}},{key:"postMessageWithAttachments",value:function(t){var e=this,r=t.attachments,n=(0,o.default)(t,w);return d.Observable.create(function(t){var i=[];(0,a.default)(s.default.mark(function o(){var u,c,f,l,h,d,v;return s.default.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,o.next=1,Promise.all(r.map(function(){var t=(0,a.default)(s.default.mark(function t(e){var r,n,i,o;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=e,t.next=1,(0,b.default)(r.contentUrl);case 1:if(!(n=t.sent).ok){t.next=3;break}return t.next=2,n.arrayBuffer();case 2:return i=t.sent,o=r,t.abrupt("return",{arrayBuffer:i,media:o});case 3:throw new Error("...");case 4:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()));case 1:return o.sent.forEach(function(t){var e=t.arrayBuffer,r=t.media,n=p.Buffer.from(e),o=new y.SubscribableStream;o.write(n);var s=new y.HttpContent({type:r.contentType,contentLength:n.length},o);i.push(s)}),u="/v3/directline/conversations/".concat(e.conversationId,"/users/").concat(n.from.id,"/upload"),c=y.StreamingRequest.create("PUT",u),(f=new y.SubscribableStream).write(JSON.stringify(n),"utf-8"),c.addStream(new y.HttpContent({type:"application/vnd.microsoft.activity",contentLength:f.length},f)),i.forEach(function(t){return c.addStream(t)}),o.next=2,e.streamConnection.send(c);case 2:if(!(l=o.sent).streams||1===l.streams.length){o.next=3;break}t.error(new Error("Invalid stream count ".concat(l.streams.length))),o.next=5;break;case 3:return o.next=4,l.streams[0].readAsJson();case 4:h=o.sent,d=h.Id,t.next(d),t.complete();case 5:o.next=7;break;case 6:o.prev=6,v=o.catch(0),t.error(v);case 7:case"end":return o.stop()}},o,null,[[0,6]])}))()})}},{key:"waitUntilOnline",value:(r=(0,a.default)(s.default.mark(function t(){var e=this;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(t,r){e.connectionStatus$.subscribe(function(e){if(e===g.ConnectionStatus.Online)return t()},function(t){return r(t)})}));case 1:case"end":return t.stop()}},t)})),function(){return r.apply(this,arguments)})},{key:"connectAsync",value:(e=(0,a.default)(s.default.mark(function t(){var e,r,n,i,o,u=this;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=new RegExp("^http(s?)")).test(this.domain)){t.next=1;break}throw"Domain must begin with http or https";case 1:return r={token:this.token},this.conversationId&&(r.conversationId=this.conversationId),n=new AbortController,i=new URLSearchParams(r).toString(),o="".concat(this.domain.replace(e,"ws$1"),"/conversations/connect?").concat(i),t.abrupt("return",new Promise(function(){var t=(0,a.default)(s.default.mark(function t(e,r){var i,a,c,f,l;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,u.streamConnection=new m.default({disconnectionHandler:e,networkInformation:x(O,u),requestHandler:{processRequest:function(t){if(n.signal.aborted)throw new Error("Cannot process streaming request, `streamingConnection` should be disconnected.");return u.theStreamHandler.processRequest(t)}},url:o}),u.queueActivities=!0,t.next=1,u.streamConnection.connect();case 1:return i=y.StreamingRequest.create("POST","/v3/directline/conversations"),t.next=2,u.streamConnection.send(i);case 2:if(200===(a=t.sent).statusCode){t.next=3;break}throw new Error("Connection response code "+a.statusCode);case 3:if(1===a.streams.length){t.next=4;break}throw new Error("Expected 1 stream but got "+a.streams.length);case 4:return t.next=5,a.streams[0].readAsString();case 5:return c=t.sent,f=JSON.parse(c),u.conversationId=f.conversationId,u.connectionStatus$.next(g.ConnectionStatus.Online),t.next=6,u.waitUntilOnline();case 6:u.theStreamHandler.flush(),u.queueActivities=!1,t.next=8;break;case 7:t.prev=7,l=t.catch(0),r(l);case 8:case"end":return t.stop()}},t,null,[[0,7]])}));return function(e,r){return t.apply(this,arguments)}}()).finally(function(){return n.abort()}));case 2:case"end":return t.stop()}},t,this)})),function(){return e.apply(this,arguments)})},{key:"connectWithRetryAsync",value:(t=(0,a.default)(s.default.mark(function t(){var e,r,n,i=this;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,(this.connectDeferred=(0,v.default)()).promise;case 1:e=3,this.connectionStatus$.next(g.ConnectionStatus.Connecting);case 2:if(!(e>0)){t.next=10;break}return e--,r=Date.now(),t.prev=3,t.next=4,this.connectAsync();case 4:t.next=6;break;case 5:t.prev=5,n=t.catch(3),console.error(n);case 6:if(this.connectionStatus$.getValue()!==g.ConnectionStatus.Ended){t.next=7;break}return t.abrupt("return");case 7:if(this.connectionStatus$.getValue()!==g.ConnectionStatus.Connecting&&this.connectionStatus$.next(g.ConnectionStatus.Connecting),!(6e4<Date.now()-r)){t.next=8;break}e=3,t.next=9;break;case 8:if(!(e>0)){t.next=9;break}return t.next=9,new Promise(function(t){return setTimeout(t,i.getRetryDelay())});case 9:t.next=2;break;case 10:this.connectionStatus$.next(g.ConnectionStatus.FailedToConnect);case 11:t.next=0;break;case 12:case"end":return t.stop()}},t,this,[[3,5]])})),function(){return t.apply(this,arguments)})},{key:"getRetryDelay",value:function(){return Math.floor(3e3+12e3*Math.random())}}]);var t,e,r,n}()},4227:function(t,e,r){"use strict";var n=r(4994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if(t){if(~t.indexOf(".")){var e=t.split(".").reverse(),r=(0,i.default)(e);return{extname:"."+r[0],name:function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}(r).slice(1).reverse().join(".")}}return{extname:"",name:t}}return{extname:"",name:""}};var i=n(r(8053))},3266:function(t,e,r){"use strict";var n=r(4994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(r(7383)),o=n(r(4579)),s=n(r(8452)),u=n(r(3072)),a=n(r(2395)),c=n(r(9511)),f=r(8296);function l(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(l=function(){return!!t})()}function h(t,e,r,n){var i=(0,a.default)((0,u.default)(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof i?function(t){return i.apply(r,t)}:i}function p(t,e,r){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,r)}function d(t,e){return t.get(v(t,e))}function y(t,e,r){return t.set(v(t,e),r),r}function v(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}var b=new WeakMap,g=new WeakMap,m=new WeakMap,w=new WeakMap;e.default=function(t){function e(t){var r,n,o,a,c=t.disconnectionHandler,f=t.networkInformation,h=t.requestHandler,v=t.url;return(0,i.default)(this,e),n=this,o=e,a=[{disconnectionHandler:c,requestHandler:h,url:v}],o=(0,u.default)(o),p(r=(0,s.default)(n,l()?Reflect.construct(o,a||[],(0,u.default)(n).constructor):o.apply(n,a)),b,!1),p(r,g,function(){return d(m,r)===d(w,r).type||r.disconnect()}),p(r,m,void 0),p(r,w,void 0),y(w,r,f),r}return(0,c.default)(e,t),(0,o.default)(e,[{key:"connect",value:function(){if(d(b,this))return console.warn("botframework-directlinejs: connect() can only be called once."),Promise.resolve();if(y(b,this,!0),d(w,this)){var t=d(w,this).type;if(y(m,this,t),"none"===t)return console.warn("botframework-directlinejs: Failed to connect while offline."),Promise.reject(new Error("botframework-directlinejs: Failed to connect while offline."));d(w,this).addEventListener("change",d(g,this))}return h(e,"connect",this,3)([])}},{key:"disconnect",value:function(){var t;null===(t=d(w,this))||void 0===t||t.removeEventListener("change",d(g,this)),h(e,"disconnect",this,3)([])}}])}(f.WebSocketClient)},8296:function(t,e,r){"use strict";var n=r(4994),i=n(r(4756)),o=n(r(5715)),s=n(r(3693)),u=n(r(7383)),a=n(r(4579)),c=n(r(2475)),f=n(r(8452)),l=n(r(3072)),h=n(r(9511)),p=n(r(3738));function d(t,e,r){return e=(0,l.default)(e),(0,f.default)(t,y()?Reflect.construct(e,r||[],(0,l.default)(t).constructor):e.apply(t,r))}function y(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(y=function(){return!!t})()}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var b,g,m=Object.create,w=Object.defineProperty,x=Object.getOwnPropertyDescriptor,_=Object.getOwnPropertyNames,S=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty,E=Math.pow,k=function(t,e){return function(){return t&&(e=t(t=0)),e}},T=function(t,e){return function(){return e||t((e={exports:{}}).exports,e),e.exports}},j=function(t,e){for(var r in e)w(t,r,{get:e[r],enumerable:!0})},A=function(t,e,r,n){if(e&&"object"==(0,p.default)(e)||"function"==typeof e){var i,o=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return v(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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 o,s=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){u=!0,o=t},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw o}}}}(_(e));try{var s=function(){var o=i.value;!O.call(t,o)&&o!==r&&w(t,o,{get:function(){return e[o]},enumerable:!(n=x(e,o))||n.enumerable})};for(o.s();!(i=o.n()).done;)s()}catch(t){o.e(t)}finally{o.f()}}return t},R=function(t,e,r){return r=null!=t?m(S(t)):{},A(!e&&t&&t.__esModule?r:w(r,"default",{value:t,enumerable:!0}),t)},P=function(t){return A(w({},"__esModule",{value:!0}),t)},M=function(t,e,r){return new Promise(function(n,i){var o=function(t){try{u(r.next(t))}catch(t){i(t)}},s=function(t){try{u(r.throw(t))}catch(t){i(t)}},u=function(t){return t.done?n(t.value):Promise.resolve(t.value).then(o,s)};u((r=r.apply(t,e)).next())})},I=k(function(){}),B=k(function(){R(D(),1)}),C=T(function(t,e){F(),I(),B(),L();var r,n,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(t){n=s}}();var a,c=[],f=!1,l=-1;function h(){!f||!a||(f=!1,a.length?c=a.concat(c):l=-1,c.length&&p())}function p(){if(!f){var t=u(h);f=!0;for(var e=c.length;e;){for(a=c,c=[];++l<e;)a&&a[l].run();l=-1,e=c.length}a=null,f=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{return n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function y(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new d(t,e)),1===c.length&&!f&&u(p)},d.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=y,i.addListener=y,i.once=y,i.off=y,i.removeListener=y,i.removeAllListeners=y,i.emit=y,i.prependListener=y,i.prependOnceListener=y,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}}),L=k(function(){b=R(C(),1)}),U=T(function(t){F(),I(),B(),L(),t.byteLength=function(t){var e=s(t),r=e[0],n=e[1];return 3*(r+n)/4-n},t.toByteArray=function(t){var e,r,o=s(t),u=o[0],a=o[1],c=new i(function(t,e,r){return 3*(e+r)/4-r}(0,u,a)),f=0,l=a>0?u-4:u;for(r=0;r<l;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],c[f++]=e>>16&255,c[f++]=e>>8&255,c[f++]=255&e;return 2===a&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[f++]=255&e),1===a&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[f++]=e>>8&255,c[f++]=255&e),c},t.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=16383,u=0,c=n-i;u<c;u+=s)o.push(a(t,u,u+s>c?c:u+s));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};var e,r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(e=0;e<64;++e)r[e]=o[e],n[o.charCodeAt(e)]=e;function s(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function u(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function a(t,e,r){for(var n,i=[],o=e;o<r;o+=3)n=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),i.push(u(n));return i.join("")}n[45]=62,n[95]=63}),N=T(function(t){F(),I(),B(),L(),t.read=function(t,e,r,n,i){var o,s,u=8*i-n-1,a=(1<<u)-1,c=a>>1,f=-7,l=r?i-1:0,h=r?-1:1,p=t[e+l];for(l+=h,o=p&(1<<-f)-1,p>>=-f,f+=u;f>0;o=256*o+t[e+l],l+=h,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+t[e+l],l+=h,f-=8);if(0===o)o=1-c;else{if(o===a)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=c}return(p?-1:1)*s*Math.pow(2,o-n)},t.write=function(t,e,r,n,i,o){var s,u,a,c=8*o-i-1,f=(1<<c)-1,l=f>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(a=Math.pow(2,-s))<1&&(s--,a*=2),(e+=s+l>=1?h/a:h*Math.pow(2,1-l))*a>=2&&(s++,a/=2),s+l>=f?(u=0,s=f):s+l>=1?(u=(e*a-1)*Math.pow(2,i),s+=l):(u=e*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&u,p+=d,u/=256,i-=8);for(s=s<<i|u,c+=i;c>0;t[r+p]=255&s,p+=d,s/=256,c-=8);t[r+p-d]|=128*y}}),D=T(function(t){F(),I(),B(),L();var e=U(),r=N(),n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=s,t.SlowBuffer=function(t){return+t!=t&&(t=0),s.alloc(+t)},t.INSPECT_MAX_BYTES=50;var i=2147483647;function o(t){if(t>i)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,s.prototype),e}function s(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return y(t)}return f(t,e,r)}function f(t,e,r){if("string"==typeof t)return function(t,e){if(("string"!=typeof e||""===e)&&(e="utf8"),!s.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|m(t,e),n=o(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(st(t,Uint8Array)){var e=new Uint8Array(t);return b(e.buffer,e.byteOffset,e.byteLength)}return v(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(0,p.default)(t));if(st(t,ArrayBuffer)||t&&st(t.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(st(t,SharedArrayBuffer)||t&&st(t.buffer,SharedArrayBuffer)))return b(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return s.from(n,e,r);var i=function(t){if(s.isBuffer(t)){var e=0|g(t.length),r=o(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||ut(t.length)?o(0):v(t):"Buffer"===t.type&&Array.isArray(t.data)?v(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return s.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(0,p.default)(t))}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function y(t){return l(t),o(t<0?0:0|g(t))}function v(t){for(var e=t.length<0?0:0|g(t.length),r=o(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function b(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,s.prototype),n}function g(t){if(t>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|t}function m(t,e){if(s.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||st(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+(0,p.default)(t));var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return nt(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return it(t).length;default:if(i)return n?-1:nt(t).length;e=(""+e).toLowerCase(),i=!0}}function w(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0)||(r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return q(this,e,r);case"utf8":case"utf-8":return P(this,e,r);case"ascii":return C(this,e,r);case"latin1":case"binary":return D(this,e,r);case"base64":return R(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return W(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function x(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function _(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),ut(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=s.from(e,n)),s.isBuffer(e))return 0===e.length?-1:S(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):S(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function S(t,e,r,n,i){var o,s=1,u=t.length,a=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,u/=2,a/=2,r/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var f=-1;for(o=r;o<u;o++)if(c(t,o)===c(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===a)return f*s}else-1!==f&&(o-=o-f),f=-1}else for(r+a>u&&(r=u-a),o=r;o>=0;o--){for(var l=!0,h=0;h<a;h++)if(c(t,o+h)!==c(e,h)){l=!1;break}if(l)return o}return-1}function O(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o,s=e.length;for(n>s/2&&(n=s/2),o=0;o<n;++o){var u=parseInt(e.substr(2*o,2),16);if(ut(u))return o;t[r+o]=u}return o}function k(t,e,r,n){return ot(nt(e,t.length-r),t,r,n)}function T(t,e,r,n){return ot(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function j(t,e,r,n){return ot(it(e),t,r,n)}function A(t,e,r,n){return ot(function(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)n=(r=t.charCodeAt(s))>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function R(t,r,n){return 0===r&&n===t.length?e.fromByteArray(t):e.fromByteArray(t.slice(r,n))}function P(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o=t[i],s=null,u=o>239?4:o>223?3:o>191?2:1;if(i+u<=r){var a=void 0,c=void 0,f=void 0,l=void 0;switch(u){case 1:o<128&&(s=o);break;case 2:128==(192&(a=t[i+1]))&&(l=(31&o)<<6|63&a)>127&&(s=l);break;case 3:a=t[i+1],c=t[i+2],128==(192&a)&&128==(192&c)&&(l=(15&o)<<12|(63&a)<<6|63&c)>2047&&(l<55296||l>57343)&&(s=l);break;case 4:a=t[i+1],c=t[i+2],f=t[i+3],128==(192&a)&&128==(192&c)&&128==(192&f)&&(l=(15&o)<<18|(63&a)<<12|(63&c)<<6|63&f)>65535&&l<1114112&&(s=l)}}null===s?(s=65533,u=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),i+=u}return function(t){var e=t.length;if(e<=M)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=M));return r}(n)}t.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),!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}}),s.poolSize=8192,s.from=function(t,e,r){return f(t,e,r)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(t,e,r){return function(t,e,r){return l(t),t<=0?o(t):void 0!==e?"string"==typeof r?o(t).fill(e,r):o(t).fill(e):o(t)}(t,e,r)},s.allocUnsafe=function(t){return y(t)},s.allocUnsafeSlow=function(t){return y(t)},s.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==s.prototype},s.compare=function(t,e){if(st(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),st(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},s.isEncoding=function(t){switch(String(t).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(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=s.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var o=t[r];if(st(o,Uint8Array))i+o.length>n.length?(s.isBuffer(o)||(o=s.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else{if(!s.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i)}i+=o.length}return n},s.byteLength=m,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)x(this,e,e+1);return this},s.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)x(this,e,e+3),x(this,e+1,e+2);return this},s.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)x(this,e,e+7),x(this,e+1,e+6),x(this,e+2,e+5),x(this,e+3,e+4);return this},s.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?P(this,0,t):w.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},n&&(s.prototype[n]=s.prototype.inspect),s.prototype.compare=function(t,e,r,n,i){if(st(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+(0,p.default)(t));if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),u=(r>>>=0)-(e>>>=0),a=Math.min(o,u),c=this.slice(n,i),f=t.slice(e,r),l=0;l<a;++l)if(c[l]!==f[l]){o=c[l],u=f[l];break}return o<u?-1:u<o?1:0},s.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},s.prototype.indexOf=function(t,e,r){return _(this,t,e,r,!0)},s.prototype.lastIndexOf=function(t,e,r){return _(this,t,e,r,!1)},s.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return O(this,t,e,r);case"utf8":case"utf-8":return k(this,t,e,r);case"ascii":case"latin1":case"binary":return T(this,t,e,r);case"base64":return j(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var M=4096;function C(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function D(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function q(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=at[t[o]];return i}function W(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function H(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function G(t,e,r,n,i,o){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function z(t,e,r,n,i){Z(e,n,i,t,r,7);var o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;var s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,r}function V(t,e,r,n,i){Z(e,n,i,t,r,7);var o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;var s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s>>=8,t[r+2]=s,s>>=8,t[r+1]=s,s>>=8,t[r]=s,r+8}function $(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Y(t,e,n,i,o){return e=+e,n>>>=0,o||$(t,0,n,4),r.write(t,e,n,i,23,4),n+4}function J(t,e,n,i,o){return e=+e,n>>>=0,o||$(t,0,n,8),r.write(t,e,n,i,52,8),n+8}s.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var n=this.subarray(t,e);return Object.setPrototypeOf(n,s.prototype),n},s.prototype.readUintLE=s.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||H(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},s.prototype.readUintBE=s.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||H(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},s.prototype.readUint8=s.prototype.readUInt8=function(t,e){return t>>>=0,e||H(t,1,this.length),this[t]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(t,e){return t>>>=0,e||H(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(t,e){return t>>>=0,e||H(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(t,e){return t>>>=0,e||H(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(t,e){return t>>>=0,e||H(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readBigUInt64LE=ct(function(t){tt(t>>>=0,"offset");var e=this[t],r=this[t+7];(void 0===e||void 0===r)&&et(t,this.length-8);var n=e+this[++t]*E(2,8)+this[++t]*E(2,16)+this[++t]*E(2,24),i=this[++t]+this[++t]*E(2,8)+this[++t]*E(2,16)+r*E(2,24);return BigInt(n)+(BigInt(i)<<BigInt(32))}),s.prototype.readBigUInt64BE=ct(function(t){tt(t>>>=0,"offset");var e=this[t],r=this[t+7];(void 0===e||void 0===r)&&et(t,this.length-8);var n=e*E(2,24)+this[++t]*E(2,16)+this[++t]*E(2,8)+this[++t],i=this[++t]*E(2,24)+this[++t]*E(2,16)+this[++t]*E(2,8)+r;return(BigInt(n)<<BigInt(32))+BigInt(i)}),s.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||H(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},s.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||H(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},s.prototype.readInt8=function(t,e){return t>>>=0,e||H(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){t>>>=0,e||H(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(t,e){t>>>=0,e||H(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(t,e){return t>>>=0,e||H(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return t>>>=0,e||H(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readBigInt64LE=ct(function(t){tt(t>>>=0,"offset");var e=this[t],r=this[t+7];(void 0===e||void 0===r)&&et(t,this.length-8);var n=this[t+4]+this[t+5]*E(2,8)+this[t+6]*E(2,16)+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+this[++t]*E(2,8)+this[++t]*E(2,16)+this[++t]*E(2,24))}),s.prototype.readBigInt64BE=ct(function(t){tt(t>>>=0,"offset");var e=this[t],r=this[t+7];(void 0===e||void 0===r)&&et(t,this.length-8);var n=(e<<24)+this[++t]*E(2,16)+this[++t]*E(2,8)+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*E(2,24)+this[++t]*E(2,16)+this[++t]*E(2,8)+r)}),s.prototype.readFloatLE=function(t,e){return t>>>=0,e||H(t,4,this.length),r.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return t>>>=0,e||H(t,4,this.length),r.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return t>>>=0,e||H(t,8,this.length),r.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return t>>>=0,e||H(t,8,this.length),r.read(this,t,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||G(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||G(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},s.prototype.writeUint8=s.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||G(this,t,e,1,255,0),this[e]=255&t,e+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||G(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||G(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||G(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||G(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeBigUInt64LE=ct(function(t){return z(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=ct(function(t){return V(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);G(this,t,e,r,i-1,-i)}var o=0,s=1,u=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===u&&0!==this[e+o-1]&&(u=1),this[e+o]=(t/s|0)-u&255;return e+r},s.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);G(this,t,e,r,i-1,-i)}var o=r-1,s=1,u=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===u&&0!==this[e+o+1]&&(u=1),this[e+o]=(t/s|0)-u&255;return e+r},s.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||G(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||G(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||G(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||G(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},s.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||G(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeBigInt64LE=ct(function(t){return z(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=ct(function(t){return V(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeFloatLE=function(t,e,r){return Y(this,t,e,!0,r)},s.prototype.writeFloatBE=function(t,e,r){return Y(this,t,e,!1,r)},s.prototype.writeDoubleLE=function(t,e,r){return J(this,t,e,!0,r)},s.prototype.writeDoubleBE=function(t,e,r){return J(this,t,e,!1,r)},s.prototype.copy=function(t,e,r,n){if(!s.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&0!==n&&(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r||0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},s.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var i=t.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(t=i)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var u=s.isBuffer(t)?t:s.from(t,n),a=u.length;if(0===a)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<r-e;++o)this[o+e]=u[o%a]}return this};var X={};function K(t,e,r){X[t]=function(r){function n(){var r;return(0,u.default)(this,n),r=d(this,n),Object.defineProperty((0,c.default)(r),"message",{value:e.apply((0,c.default)(r),arguments),writable:!0,configurable:!0}),r.name="".concat(r.name," [").concat(t,"]"),r.stack,delete r.name,r}return(0,h.default)(n,r),(0,a.default)(n,[{key:"code",get:function(){return t},set:function(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}},{key:"toString",value:function(){return"".concat(this.name," [").concat(t,"]: ").concat(this.message)}}])}(r)}function Q(t){for(var e="",r=t.length,n="-"===t[0]?1:0;r>=n+4;r-=3)e="_".concat(t.slice(r-3,r)).concat(e);return"".concat(t.slice(0,r)).concat(e)}function Z(t,e,r,n,i,o){if(t>r||t<e){var s,u="bigint"==typeof e?"n":"";throw s=0===e||e===BigInt(0)?">= 0".concat(u," and < 2").concat(u," ** ").concat(8*(o+1)).concat(u):">= -(2".concat(u," ** ").concat(8*(o+1)-1).concat(u,") and < 2 ** ").concat(8*(o+1)-1).concat(u),new X.ERR_OUT_OF_RANGE("value",s,t)}!function(t,e,r){tt(e,"offset"),(void 0===t[e]||void 0===t[e+r])&&et(e,t.length-(r+1))}(n,i,o)}function tt(t,e){if("number"!=typeof t)throw new X.ERR_INVALID_ARG_TYPE(e,"number",t)}function et(t,e,r){throw Math.floor(t)!==t?(tt(t,r),new X.ERR_OUT_OF_RANGE("offset","an integer",t)):e<0?new X.ERR_BUFFER_OUT_OF_BOUNDS:new X.ERR_OUT_OF_RANGE("offset",">= ".concat(0," and <= ",e),t)}K("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?"".concat(t," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),K("ERR_INVALID_ARG_TYPE",function(t,e){return'The "'.concat(t,'" argument must be of type number. Received type ').concat((0,p.default)(e))},TypeError),K("ERR_OUT_OF_RANGE",function(t,e,r){var n='The value of "'.concat(t,'" is out of range.'),i=r;return Number.isInteger(r)&&Math.abs(r)>E(2,32)?i=Q(String(r)):"bigint"==typeof r&&(i=String(r),(r>E(BigInt(2),BigInt(32))||r<-E(BigInt(2),BigInt(32)))&&(i=Q(i)),i+="n"),n+" It must be ".concat(e,". Received ").concat(i)},RangeError);var rt=/[^+/0-9A-Za-z-_]/g;function nt(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function it(t){return e.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(rt,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function ot(t,e,r,n){var i;for(i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function st(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function ut(t){return t!=t}var at=function(){for(var t="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)e[n+i]=t[r]+t[i];return e}();function ct(t){return"undefined"==typeof BigInt?ft:t}function ft(){throw new Error("BigInt not supported")}}),F=k(function(){g=R(D())});function q(){q.init.call(this)}function W(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+(0,p.default)(t))}function H(t){return void 0===t._maxListeners?q.defaultMaxListeners:t._maxListeners}function G(t,e,r,n){var i,o,s,u;if(W(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),s=o[e]),void 0===s)s=o[e]=r,++t._eventsCount;else if("function"==typeof s?s=o[e]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=H(t))>0&&s.length>i&&!s.warned){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=t,a.type=e,a.count=s.length,u=a,console&&console.warn&&console.warn(u)}return t}function z(){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 V(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=z.bind(n);return i.listener=r,n.wrapFn=i,i}function $(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):X(i,i.length)}function J(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function X(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}var K,Q,Z,tt,et,rt,nt,it=k(function(){F(),I(),B(),L(),Z="object"==("undefined"==typeof Reflect?"undefined":(0,p.default)(Reflect))?Reflect:null,tt=Z&&"function"==typeof Z.apply?Z.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)},Q=Z&&"function"==typeof Z.ownKeys?Z.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)},et=Number.isNaN||function(t){return t!=t},K=q,q.EventEmitter=q,q.prototype._events=void 0,q.prototype._eventsCount=0,q.prototype._maxListeners=void 0,rt=10,Object.defineProperty(q,"defaultMaxListeners",{enumerable:!0,get:function(){return rt},set:function(t){if("number"!=typeof t||t<0||et(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");rt=t}}),q.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},q.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||et(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},q.prototype.getMaxListeners=function(){return H(this)},q.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var n="error"===t,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var u=i[t];if(void 0===u)return!1;if("function"==typeof u)tt(u,this,e);else{var a=u.length,c=X(u,a);for(r=0;r<a;++r)tt(c[r],this,e)}return!0},q.prototype.addListener=function(t,e){return G(this,t,e,!1)},q.prototype.on=q.prototype.addListener,q.prototype.prependListener=function(t,e){return G(this,t,e,!0)},q.prototype.once=function(t,e){return W(e),this.on(t,V(this,t,e)),this},q.prototype.prependOnceListener=function(t,e){return W(e),this.prependListener(t,V(this,t,e)),this},q.prototype.removeListener=function(t,e){var r,n,i,o,s;if(W(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,s||e)}return this},q.prototype.off=q.prototype.removeListener,q.prototype.removeAllListeners=function(t){var e,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},q.prototype.listeners=function(t){return $(this,t,!0)},q.prototype.rawListeners=function(t){return $(this,t,!1)},q.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):J.call(t,e)},q.prototype.listenerCount=J,q.prototype.eventNames=function(){return this._eventsCount>0?Q(this._events):[]},(nt=K).EventEmitter,nt.defaultMaxListeners,nt.init,nt.listenerCount,nt.EventEmitter,nt.defaultMaxListeners,nt.init,nt.listenerCount}),ot={};j(ot,{EventEmitter:function(){return st},default:function(){return nt},defaultMaxListeners:function(){return ut},init:function(){return at},listenerCount:function(){return ct},on:function(){return ft},once:function(){return lt}});var st,ut,at,ct,ft,lt,ht=k(function(){F(),I(),B(),L(),it(),it(),nt.once=function(t,e){return new Promise(function(r,n){function i(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];void 0!==o&&t.removeListener("error",o),r(n)}var o;"error"!==e&&(o=function(e){t.removeListener(name,i),n(e)},t.once("error",o)),t.once(e,i)})},nt.on=function(t,e){var r=[],n=[],o=null,u=!1,a=(0,s.default)({next:function(){return M(this,null,i.default.mark(function t(){var e,s;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e=r.shift())){t.next=1;break}return t.abrupt("return",createIterResult(e,!1));case 1:if(!o){t.next=2;break}return s=Promise.reject(o),t.abrupt("return",(o=null,s));case 2:return t.abrupt("return",u?createIterResult(void 0,!0):new Promise(function(t,e){return n.push({resolve:t,reject:e})}));case 3:case"end":return t.stop()}},t)}))},return:function(){return M(this,null,i.default.mark(function r(){var o,s;return i.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:for(t.removeListener(e,c),t.removeListener("error",f),u=!0,o=0,s=n;o<s.length;o++)s[o].resolve(createIterResult(void 0,!0));return r.abrupt("return",createIterResult(void 0,!0));case 1:case"end":return r.stop()}},r)}))},throw:function(r){o=r,t.removeListener(e,c),t.removeListener("error",f)}},Symbol.asyncIterator,function(){return this});return t.on(e,c),t.on("error",f),a;function c(){for(var t=n.shift(),e=arguments.length,i=new Array(e),o=0;o<e;o++)i[o]=arguments[o];t?t.resolve(createIterResult(i,!1)):r.push(i)}function f(t){u=!0;var e=n.shift();e?e.reject(t):o=t,a.return()}};var t=nt;st=t.EventEmitter,ut=t.defaultMaxListeners,at=t.init,ct=t.listenerCount,ft=t.on,lt=t.once}),pt=T(function(t,e){F(),I(),B(),L(),"function"==typeof Object.create?e.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}}),dt=T(function(t,e){F(),I(),B(),L(),e.exports=(ht(),P(ot)).EventEmitter});function yt(){throw new Error("setTimeout has not been defined")}function vt(){throw new Error("clearTimeout has not been defined")}function bt(t){if(St===setTimeout)return setTimeout(t,0);if((St===yt||!St)&&setTimeout)return St=setTimeout,setTimeout(t,0);try{return St(t,0)}catch(e){try{return St.call(null,t,0)}catch(e){return St.call(this||Et,t,0)}}}function gt(){At&&Tt&&(At=!1,Tt.length?jt=Tt.concat(jt):Rt=-1,jt.length&&mt())}function mt(){if(!At){var t=bt(gt);At=!0;for(var e=jt.length;e;){for(Tt=jt,jt=[];++Rt<e;)Tt&&Tt[Rt].run();Rt=-1,e=jt.length}Tt=null,At=!1,function(t){if(Ot===clearTimeout)return clearTimeout(t);if((Ot===vt||!Ot)&&clearTimeout)return Ot=clearTimeout,clearTimeout(t);try{Ot(t)}catch(e){try{return Ot.call(null,t)}catch(e){return Ot.call(this||Et,t)}}}(t)}}function wt(t,e){(this||Et).fun=t,(this||Et).array=e}function xt(){}var _t,St,Ot,Et,kt,Tt,jt,At,Rt,Pt,Mt=k(function(){F(),I(),B(),L(),Et="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:globalThis,kt=_t={},function(){try{St="function"==typeof setTimeout?setTimeout:yt}catch(t){St=yt}try{Ot="function"==typeof clearTimeout?clearTimeout:vt}catch(t){Ot=vt}}(),jt=[],At=!1,Rt=-1,kt.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];jt.push(new wt(t,e)),1!==jt.length||At||bt(mt)},wt.prototype.run=function(){(this||Et).fun.apply(null,(this||Et).array)},kt.title="browser",kt.browser=!0,kt.env={},kt.argv=[],kt.version="",kt.versions={},kt.on=xt,kt.addListener=xt,kt.once=xt,kt.off=xt,kt.removeListener=xt,kt.removeAllListeners=xt,kt.emit=xt,kt.prependListener=xt,kt.prependOnceListener=xt,kt.listeners=function(t){return[]},kt.binding=function(t){throw new Error("process.binding is not supported")},kt.cwd=function(){return"/"},kt.chdir=function(t){throw new Error("process.chdir is not supported")},kt.umask=function(){return 0},(Pt=_t).argv,Pt.binding,Pt.browser,Pt.chdir,Pt.cwd,Pt.emit,Pt.env,Pt.listeners,Pt.nextTick,Pt.off,Pt.on,Pt.once,Pt.prependListener,Pt.prependOnceListener,Pt.removeAllListeners,Pt.removeListener,Pt.title,Pt.umask,Pt.version,Pt.versions});function It(t){return t.call.bind(t)}function Bt(t,e){if("object"!=(0,p.default)(t))return!1;try{return e(t),!0}catch(t){return!1}}function Ct(t){return Qe&&Ke?void 0!==Y(t):Lt(t)||Ut(t)||Nt(t)||Dt(t)||Ft(t)||qt(t)||Wt(t)||Ht(t)||Gt(t)||zt(t)||Vt(t)}function Lt(t){return Qe&&Ke?"Uint8Array"===Y(t):"[object Uint8Array]"===tr(t)||Ve(t)&&void 0!==t.buffer}function Ut(t){return Qe&&Ke?"Uint8ClampedArray"===Y(t):"[object Uint8ClampedArray]"===tr(t)}function Nt(t){return Qe&&Ke?"Uint16Array"===Y(t):"[object Uint16Array]"===tr(t)}function Dt(t){return Qe&&Ke?"Uint32Array"===Y(t):"[object Uint32Array]"===tr(t)}function Ft(t){return Qe&&Ke?"Int8Array"===Y(t):"[object Int8Array]"===tr(t)}function qt(t){return Qe&&Ke?"Int16Array"===Y(t):"[object Int16Array]"===tr(t)}function Wt(t){return Qe&&Ke?"Int32Array"===Y(t):"[object Int32Array]"===tr(t)}function Ht(t){return Qe&&Ke?"Float32Array"===Y(t):"[object Float32Array]"===tr(t)}function Gt(t){return Qe&&Ke?"Float64Array"===Y(t):"[object Float64Array]"===tr(t)}function zt(t){return Qe&&Ke?"BigInt64Array"===Y(t):"[object BigInt64Array]"===tr(t)}function Vt(t){return Qe&&Ke?"BigUint64Array"===Y(t):"[object BigUint64Array]"===tr(t)}function $t(t){return"[object Map]"===tr(t)}function Yt(t){return"[object Set]"===tr(t)}function Jt(t){return"[object WeakMap]"===tr(t)}function Xt(t){return"[object WeakSet]"===tr(t)}function Kt(t){return"[object ArrayBuffer]"===tr(t)}function Qt(t){return"undefined"!=typeof ArrayBuffer&&(Kt.working?Kt(t):t instanceof ArrayBuffer)}function Zt(t){return"[object DataView]"===tr(t)}function te(t){return"undefined"!=typeof DataView&&(Zt.working?Zt(t):t instanceof DataView)}function ee(t){return"[object SharedArrayBuffer]"===tr(t)}function re(t){return"undefined"!=typeof SharedArrayBuffer&&(ee.working?ee(t):t instanceof SharedArrayBuffer)}function ne(t){return Bt(t,er)}function ie(t){return Bt(t,rr)}function oe(t){return Bt(t,nr)}function se(t){return Je&&Bt(t,ms)}function ue(t){return Xe&&Bt(t,ys)}function ae(t,e){var r={seen:[],stylize:fe};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),ye(e)?r.showHidden=e:e&&or._extend(r,e),me(r.showHidden)&&(r.showHidden=!1),me(r.depth)&&(r.depth=2),me(r.colors)&&(r.colors=!1),me(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=ce),le(r,t,r.depth)}function ce(t,e){var r=ae.styles[e];return r?"["+ae.colors[r][0]+"m"+t+"["+ae.colors[r][1]+"m":t}function fe(t,e){return t}function le(t,e,r){if(t.customInspect&&e&&Oe(e.inspect)&&e.inspect!==or.inspect&&(!e.constructor||e.constructor.prototype!==e)){var n=e.inspect(r,t);return ge(n)||(n=le(t,n,r)),n}var i=function(t,e){if(me(e))return t.stylize("undefined","undefined");if(ge(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return be(e)?t.stylize(""+e,"number"):ye(e)?t.stylize(""+e,"boolean"):ve(e)?t.stylize("null","null"):void 0}(t,e);if(i)return i;var o,s=Object.keys(e),u=(o={},s.forEach(function(t,e){o[t]=!0}),o);if(t.showHidden&&(s=Object.getOwnPropertyNames(e)),Se(e)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return he(e);if(0===s.length){if(Oe(e)){var a=e.name?": "+e.name:"";return t.stylize("[Function"+a+"]","special")}if(we(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(_e(e))return t.stylize(Date.prototype.toString.call(e),"date");if(Se(e))return he(e)}var c,f="",l=!1,h=["{","}"];return de(e)&&(l=!0,h=["[","]"]),Oe(e)&&(f=" [Function"+(e.name?": "+e.name:"")+"]"),we(e)&&(f=" "+RegExp.prototype.toString.call(e)),_e(e)&&(f=" "+Date.prototype.toUTCString.call(e)),Se(e)&&(f=" "+he(e)),0!==s.length||l&&0!=e.length?r<0?we(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),c=l?function(t,e,r,n,i){for(var o=[],s=0,u=e.length;s<u;++s)Te(e,String(s))?o.push(pe(t,e,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(pe(t,e,r,n,i,!0))}),o}(t,e,r,u,s):s.map(function(n){return pe(t,e,r,u,n,l)}),t.seen.pop(),function(t,e,r){return t.reduce(function(t,e){return e.indexOf("\n"),t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}(c,f,h)):h[0]+f+h[1]}function he(t){return"["+Error.prototype.toString.call(t)+"]"}function pe(t,e,r,n,i,o){var s,u,a;if((a=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?u=a.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):a.set&&(u=t.stylize("[Setter]","special")),Te(n,i)||(s="["+i+"]"),u||(t.seen.indexOf(a.value)<0?(u=ve(r)?le(t,a.value,null):le(t,a.value,r-1)).indexOf("\n")>-1&&(u=o?u.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+u.split("\n").map(function(t){return" "+t}).join("\n")):u=t.stylize("[Circular]","special")),me(s)){if(o&&i.match(/^\d+$/))return u;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+u}function de(t){return Array.isArray(t)}function ye(t){return"boolean"==typeof t}function ve(t){return null===t}function be(t){return"number"==typeof t}function ge(t){return"string"==typeof t}function me(t){return void 0===t}function we(t){return xe(t)&&"[object RegExp]"===Ee(t)}function xe(t){return"object"==(0,p.default)(t)&&null!==t}function _e(t){return xe(t)&&"[object Date]"===Ee(t)}function Se(t){return xe(t)&&("[object Error]"===Ee(t)||t instanceof Error)}function Oe(t){return"function"==typeof t}function Ee(t){return Object.prototype.toString.call(t)}function ke(t){return t<10?"0"+t.toString(10):t.toString(10)}function Te(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function je(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}var Ae,Re,Pe,Me,Ie,Be,Ce,Le,Ue,Ne,De,Fe,qe,We,He,Ge,ze,Ve,$e,Ye,Je,Xe,Ke,Qe,Ze,tr,er,rr,nr,ir,or,sr,ur,ar,cr,fr,lr,hr,pr,dr=k(function(){if(F(),I(),B(),L(),Mt(),Ae="function"==typeof Symbol&&"symbol"==(0,p.default)(Symbol.toStringTag),Re=Object.prototype.toString,Pe=function(t){return!(Ae&&t&&"object"==(0,p.default)(t)&&Symbol.toStringTag in t)&&"[object Arguments]"===Re.call(t)},Me=function(t){return!!Pe(t)||null!==t&&"object"==(0,p.default)(t)&&"number"==typeof t.length&&t.length>=0&&"[object Array]"!==Re.call(t)&&"[object Function]"===Re.call(t.callee)},Ie=function(){return Pe(arguments)}(),Pe.isLegacyArguments=Me,Be=Ie?Pe:Me,Ce=Object.prototype.toString,Le=Function.prototype.toString,Ue=/^\s*(?:function)?\*/,Ne="function"==typeof Symbol&&"symbol"==(0,p.default)(Symbol.toStringTag),De=Object.getPrototypeOf,Fe=function(){if(!Ne)return!1;try{return Function("return function*() {}")()}catch(t){}}(),qe=Fe?De(Fe):{},We=function(t){return"function"==typeof t&&(!!Ue.test(Le.call(t))||(Ne?De(t)===qe:"[object GeneratorFunction]"===Ce.call(t)))},He="function"==typeof Object.create?function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},ze={},Ve=Ge=function(t){return t&&"object"==(0,p.default)(t)&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8},$e=Be,Ye=We,Je="undefined"!=typeof BigInt,Xe="undefined"!=typeof Symbol,Ke=Xe&&void 0!==Symbol.toStringTag,Qe="undefined"!=typeof Uint8Array,Ze="undefined"!=typeof ArrayBuffer,Qe&&Ke){var t=Object.getPrototypeOf(Uint8Array.prototype);It(Object.getOwnPropertyDescriptor(t,Symbol.toStringTag).get)}tr=It(Object.prototype.toString),er=It(Number.prototype.valueOf),rr=It(String.prototype.valueOf),nr=It(Boolean.prototype.valueOf),Je&&It(BigInt.prototype.valueOf),Xe&&It(Symbol.prototype.valueOf),ze.isArgumentsObject=$e,ze.isGeneratorFunction=Ye,ze.isPromise=function(t){return"undefined"!=typeof Promise&&t instanceof Promise||null!==t&&"object"==(0,p.default)(t)&&"function"==typeof t.then&&"function"==typeof t.catch},ze.isArrayBufferView=function(t){return Ze&&ArrayBuffer.isView?ArrayBuffer.isView(t):Ct(t)||te(t)},ze.isTypedArray=Ct,ze.isUint8Array=Lt,ze.isUint8ClampedArray=Ut,ze.isUint16Array=Nt,ze.isUint32Array=Dt,ze.isInt8Array=Ft,ze.isInt16Array=qt,ze.isInt32Array=Wt,ze.isFloat32Array=Ht,ze.isFloat64Array=Gt,ze.isBigInt64Array=zt,ze.isBigUint64Array=Vt,$t.working="undefined"!=typeof Map&&$t(new Map),ze.isMap=function(t){return"undefined"!=typeof Map&&($t.working?$t(t):t instanceof Map)},Yt.working="undefined"!=typeof Set&&Yt(new Set),ze.isSet=function(t){return"undefined"!=typeof Set&&(Yt.working?Yt(t):t instanceof Set)},Jt.working="undefined"!=typeof WeakMap&&Jt(new WeakMap),ze.isWeakMap=function(t){return"undefined"!=typeof WeakMap&&(Jt.working?Jt(t):t instanceof WeakMap)},Xt.working="undefined"!=typeof WeakSet&&Xt(new WeakSet),ze.isWeakSet=function(t){return Xt(t)},Kt.working="undefined"!=typeof ArrayBuffer&&Kt(new ArrayBuffer),ze.isArrayBuffer=Qt,Zt.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&Zt(new DataView(new ArrayBuffer(1),0,1)),ze.isDataView=te,ee.working="undefined"!=typeof SharedArrayBuffer&&ee(new SharedArrayBuffer),ze.isSharedArrayBuffer=re,ze.isAsyncFunction=function(t){return"[object AsyncFunction]"===tr(t)},ze.isMapIterator=function(t){return"[object Map Iterator]"===tr(t)},ze.isSetIterator=function(t){return"[object Set Iterator]"===tr(t)},ze.isGeneratorObject=function(t){return"[object Generator]"===tr(t)},ze.isWebAssemblyCompiledModule=function(t){return"[object WebAssembly.Module]"===tr(t)},ze.isNumberObject=ne,ze.isStringObject=ie,ze.isBooleanObject=oe,ze.isBigIntObject=se,ze.isSymbolObject=ue,ze.isBoxedPrimitive=function(t){return ne(t)||ie(t)||oe(t)||se(t)||ue(t)},ze.isAnyArrayBuffer=function(t){return Qe&&(Qt(t)||re(t))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(t){Object.defineProperty(ze,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})}),ir="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:globalThis,or={},sr=Pt,ur=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++)r[e[n]]=Object.getOwnPropertyDescriptor(t,e[n]);return r},ar=/%[sdj%]/g,or.format=function(t){if(!ge(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(ae(arguments[r]));return e.join(" ")}r=1;for(var n=arguments,i=n.length,o=String(t).replace(ar,function(t){if("%%"===t)return"%";if(r>=i)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}}),s=n[r];r<i;s=n[++r])ve(s)||!xe(s)?o+=" "+s:o+=" "+ae(s);return o},or.deprecate=function(t,e){if(void 0!==sr&&!0===sr.noDeprecation)return t;if(void 0===sr)return function(){return or.deprecate(t,e).apply(this||ir,arguments)};var r=!1;return function(){if(!r){if(sr.throwDeprecation)throw new Error(e);sr.traceDeprecation?console.trace(e):console.error(e),r=!0}return t.apply(this||ir,arguments)}},cr={},fr=/^$/,sr.env.NODE_DEBUG&&(lr=(lr=sr.env.NODE_DEBUG).replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),fr=new RegExp("^"+lr+"$","i")),or.debuglog=function(t){if(t=t.toUpperCase(),!cr[t])if(fr.test(t)){var e=sr.pid;cr[t]=function(){var r=or.format.apply(or,arguments);console.error("%s %d: %s",t,e,r)}}else cr[t]=function(){};return cr[t]},or.inspect=ae,ae.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]},ae.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},or.types=ze,or.isArray=de,or.isBoolean=ye,or.isNull=ve,or.isNullOrUndefined=function(t){return null==t},or.isNumber=be,or.isString=ge,or.isSymbol=function(t){return"symbol"==(0,p.default)(t)},or.isUndefined=me,or.isRegExp=we,or.types.isRegExp=we,or.isObject=xe,or.isDate=_e,or.types.isDate=_e,or.isError=Se,or.types.isNativeError=Se,or.isFunction=Oe,or.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==(0,p.default)(t)||void 0===t},or.isBuffer=Ge,hr=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],or.log=function(){var t,e;console.log("%s - %s",(e=[ke((t=new Date).getHours()),ke(t.getMinutes()),ke(t.getSeconds())].join(":"),[t.getDate(),hr[t.getMonth()],e].join(" ")),or.format.apply(or,arguments))},or.inherits=He,or._extend=function(t,e){if(!e||!xe(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t},pr="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0,or.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(pr&&t[pr]){var e;if("function"!=typeof(e=t[pr]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,pr,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise(function(t,n){e=t,r=n}),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push(function(t,n){t?r(t):e(n)});try{t.apply(this||ir,i)}catch(t){r(t)}return n}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),pr&&Object.defineProperty(e,pr,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,ur(t))},or.promisify.custom=pr,or.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function e(){for(var e=[],r=0;r<arguments.length;r++)e.push(arguments[r]);var n=e.pop();if("function"!=typeof n)throw new TypeError("The last argument must be of type Function");var i=this||ir,o=function(){return n.apply(i,arguments)};t.apply(this||ir,e).then(function(t){sr.nextTick(o.bind(null,null,t))},function(t){sr.nextTick(je.bind(null,t,o))})}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),Object.defineProperties(e,ur(t)),e}}),yr=k(function(){F(),I(),B(),L(),dr(),Mt(),or._extend,or.callbackify,or.debuglog,or.deprecate,or.format,or.inherits,or.inspect,or.isArray,or.isBoolean,or.isBuffer,or.isDate,or.isError,or.isFunction,or.isNull,or.isNullOrUndefined,or.isNumber,or.isObject,or.isPrimitive,or.isRegExp,or.isString,or.isSymbol,or.isUndefined,or.log,or.promisify,or._extend,or.callbackify,or.debuglog,or.deprecate,or.format,or.inherits,or.inspect,or.isArray,or.isBoolean,or.isBuffer,or.isDate,or.isError,or.isFunction,or.isNull,or.isNullOrUndefined,or.isNumber,or.isObject,or.isPrimitive,or.isRegExp,or.isString,or.isSymbol,or.isUndefined,or.log,or.promisify,or.types}),vr={};j(vr,{TextDecoder:function(){return Hr},TextEncoder:function(){return Wr},_extend:function(){return br},callbackify:function(){return gr},debuglog:function(){return mr},default:function(){return or},deprecate:function(){return wr},format:function(){return xr},inherits:function(){return _r},inspect:function(){return Sr},isArray:function(){return Or},isBoolean:function(){return Er},isBuffer:function(){return kr},isDate:function(){return Tr},isError:function(){return jr},isFunction:function(){return Ar},isNull:function(){return Rr},isNullOrUndefined:function(){return Pr},isNumber:function(){return Mr},isObject:function(){return Ir},isPrimitive:function(){return Br},isRegExp:function(){return Cr},isString:function(){return Lr},isSymbol:function(){return Ur},isUndefined:function(){return Nr},log:function(){return Dr},promisify:function(){return Fr},types:function(){return qr}});var br,gr,mr,wr,xr,_r,Sr,Or,Er,kr,Tr,jr,Ar,Rr,Pr,Mr,Ir,Br,Cr,Lr,Ur,Nr,Dr,Fr,qr,Wr,Hr,Gr=k(function(){F(),I(),B(),L(),yr(),dr(),dr(),Mt(),br=or._extend,gr=or.callbackify,mr=or.debuglog,wr=or.deprecate,xr=or.format,_r=or.inherits,Sr=or.inspect,Or=or.isArray,Er=or.isBoolean,kr=or.isBuffer,Tr=or.isDate,jr=or.isError,Ar=or.isFunction,Rr=or.isNull,Pr=or.isNullOrUndefined,Mr=or.isNumber,Ir=or.isObject,Br=or.isPrimitive,Cr=or.isRegExp,Lr=or.isString,Ur=or.isSymbol,Nr=or.isUndefined,Dr=or.log,Fr=or.promisify,qr=or.types,Wr=or.TextEncoder=globalThis.TextEncoder,Hr=or.TextDecoder=globalThis.TextDecoder}),zr=T(function(t,e){function r(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}F(),I(),B(),L();var i=D().Buffer,o=(Gr(),P(vr)).inspect,s=o&&o.custom||"inspect";function u(t,e,r){i.prototype.copy.call(t,e,r)}e.exports=function(){function t(){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.head=null,this.tail=null,this.length=0}return function(t,e){e&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(t.prototype,e)}(t,[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return i.alloc(0);for(var e=i.allocUnsafe(t>>>0),r=this.head,n=0;r;)u(r.data,e,n),n+=r.data.length,r=r.next;return e}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,n=e.data;for(t-=n.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0===(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=i.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var o=r.data,s=t>o.length?o.length:t;if(o.copy(e,e.length-t,0,s),0===(t-=s)){s===o.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=o.slice(s));break}++n}return this.length-=n,e}},{key:s,value:function(t,e){return o(this,function(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?r(Object(i),!0).forEach(function(e){n(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}({},e,{depth:0,customInspect:!1}))}}]),t}()}),Vr=T(function(t,e){function r(t,e){i(t,e),n(t)}function n(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function i(t,e){t.emit("error",e)}F(),I(),B(),L(),e.exports={destroy:function(t,e){var o=this,s=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return s||u?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,b.nextTick(i,this,t)):b.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!e&&t?o._writableState?o._writableState.errorEmitted?b.nextTick(n,o):(o._writableState.errorEmitted=!0,b.nextTick(r,o,t)):b.nextTick(r,o,t):e?(b.nextTick(n,o),e(t)):b.nextTick(n,o)}),this)},undestroy:function(){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)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}}),$r=T(function(t,e){F(),I(),B(),L();var r={};function n(t,e,n){n||(n=Error);var i=function(t){function r(r,n,i){return t.call(this,function(t,r,n){return"string"==typeof e?e:e(t,r,n)}(r,n,i))||this}return function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(r,t),r}(n);i.prototype.name=n.name,i.prototype.code=t,r[t]=i}function i(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map(function(t){return String(t)}),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}n("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError),n("ERR_INVALID_ARG_TYPE",function(t,e,r){var n,o;if("string"==typeof e&&function(t,e){return t.substr(0,4)===e}(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-9,r)===e}(t," argument"))o="The ".concat(t," ").concat(n," ").concat(i(e,"type"));else{var s=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+1>t.length)&&-1!==t.indexOf(".",r)}(t)?"property":"argument";o='The "'.concat(t,'" ').concat(s," ").concat(n," ").concat(i(e,"type"))}return o+". Received type ".concat((0,p.default)(r))},TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"}),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"}),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=r}),Yr=T(function(t,e){F(),I(),B(),L();var r=$r().codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(t,e,n,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,n);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new r(i?n:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}}),Jr=T(function(t,e){function r(t){try{if(!globalThis.localStorage)return!1}catch(t){return!1}var e=globalThis.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}F(),I(),B(),L(),e.exports=function(t,e){if(r("noDeprecation"))return t;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(e);r("traceDeprecation")?console.trace(e):console.warn(e),n=!0}return t.apply(this,arguments)}}}),Xr=T(function(t,e){function r(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e){var r=t.entry;for(t.entry=null;r;){var n=r.callback;e.pendingcb--,n(void 0),r=r.next}e.corkedRequestsFree.next=t}(e,t)}}var n;F(),I(),B(),L(),e.exports=O,O.WritableState=S;var i,o={deprecate:Jr()},s=dt(),u=D().Buffer,a=globalThis.Uint8Array||function(){},c=Vr(),f=Yr().getHighWaterMark,l=$r().codes,h=l.ERR_INVALID_ARG_TYPE,p=l.ERR_METHOD_NOT_IMPLEMENTED,d=l.ERR_MULTIPLE_CALLBACK,y=l.ERR_STREAM_CANNOT_PIPE,v=l.ERR_STREAM_DESTROYED,g=l.ERR_STREAM_NULL_VALUES,m=l.ERR_STREAM_WRITE_AFTER_END,w=l.ERR_UNKNOWN_ENCODING,x=c.errorOrDestroy;function _(){}function S(t,e,i){n=n||Kr(),t=t||{},"boolean"!=typeof i&&(i=e instanceof n),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=f(this,t,"writableHighWaterMark",i),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===t.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new d;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,i){--e.pendingcb,r?(b.nextTick(i,n),b.nextTick(R,t,e),t._writableState.errorEmitted=!0,x(t,n)):(i(n),t._writableState.errorEmitted=!0,x(t,n),R(t,e))}(t,r,n,e,i);else{var o=j(r)||t.destroyed;!o&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&T(t,r),n?b.nextTick(k,t,r,o,i):k(t,r,o,i)}}(e,t)},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 r(this)}function O(t){var e=this instanceof(n=n||Kr());if(!e&&!i.call(O,this))return new O(t);this._writableState=new S(t,this,e),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 E(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new v("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function k(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),R(t,e)}function T(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var i=e.bufferedRequestCount,o=new Array(i),s=e.corkedRequestsFree;s.entry=n;for(var u=0,a=!0;n;)o[u]=n,n.isBuf||(a=!1),n=n.next,u+=1;o.allBuffers=a,E(t,e,!0,e.length,o,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new r(e),e.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,f=n.encoding,l=n.callback;if(E(t,e,!1,e.objectMode?1:c.length,c,f,l),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function j(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function A(t,e){t._final(function(r){e.pendingcb--,r&&x(t,r),e.prefinished=!0,t.emit("prefinish"),R(t,e)})}function R(t,e){var r=j(e);if(r&&(function(t,e){!e.prefinished&&!e.finalCalled&&("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,b.nextTick(A,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return r}pt()(O,s),S.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(S.prototype,"buffer",{get:o.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(i=Function.prototype[Symbol.hasInstance],Object.defineProperty(O,Symbol.hasInstance,{value:function(t){return!!i.call(this,t)||this===O&&t&&t._writableState instanceof S}})):i=function(t){return t instanceof this},O.prototype.pipe=function(){x(this,new y)},O.prototype.write=function(t,e,r){var n=this._writableState,i=!1,o=!n.objectMode&&function(t){return u.isBuffer(t)||t instanceof a}(t);return o&&!u.isBuffer(t)&&(t=function(t){return u.from(t)}(t)),"function"==typeof e&&(r=e,e=null),o?e="buffer":e||(e=n.defaultEncoding),"function"!=typeof r&&(r=_),n.ending?function(t,e){var r=new m;x(t,r),b.nextTick(e,r)}(this,r):(o||function(t,e,r,n){var i;return null===r?i=new g:"string"!=typeof r&&!e.objectMode&&(i=new h("chunk",["string","Buffer"],r)),!i||(x(t,i),b.nextTick(n,i),!1)}(this,n,t,r))&&(n.pendingcb++,i=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){return!t.objectMode&&!1!==t.decodeStrings&&"string"==typeof e&&(e=u.from(e,r)),e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var c=e.length<e.highWaterMark;if(c||(e.needDrain=!0),e.writing||e.corked){var f=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},f?f.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else E(t,e,!1,a,n,i,o);return c}(this,n,o,t,e,r)),i},O.prototype.cork=function(){this._writableState.corked++},O.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&T(this,t))},O.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new w(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(O.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(O.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),O.prototype._write=function(t,e,r){r(new p("_write()"))},O.prototype._writev=null,O.prototype.end=function(t,e,r){var n=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,r){e.ending=!0,R(t,e),r&&(e.finished?b.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}(this,n,r),this},Object.defineProperty(O.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(O.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),O.prototype.destroy=c.destroy,O.prototype._undestroy=c.undestroy,O.prototype._destroy=function(t,e){e(t)}}),Kr=T(function(t,e){F(),I(),B(),L();var r=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};e.exports=a;var n,i,o,s=nn(),u=Xr();for(pt()(a,s),n=r(u.prototype),o=0;o<n.length;o++)i=n[o],a.prototype[i]||(a.prototype[i]=u.prototype[i]);function a(t){if(!(this instanceof a))return new a(t);s.call(this,t),u.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",c)))}function c(){this._writableState.ended||b.nextTick(f,this)}function f(t){t.end()}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(t){void 0===this._readableState||void 0===this._writableState||(this._readableState.destroyed=t,this._writableState.destroyed=t)}})}),Qr=T(function(t,e){F(),I(),B(),L();var r=D(),n=r.Buffer;function i(t,e){for(var r in t)e[r]=t[r]}function o(t,e,r){return n(t,e,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=o),o.prototype=Object.create(n.prototype),i(n,o),o.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return n(t,e,r)},o.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var i=n(t);return void 0!==e?"string"==typeof r?i.fill(e,r):i.fill(e):i.fill(0),i},o.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n(t)},o.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}}),Zr=T(function(t){F(),I(),B(),L();var e=Qr().Buffer,r=e.isEncoding||function(t){switch((t=""+t)&&t.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 n(t){var n;switch(this.encoding=function(t){var n=function(t){if(!t)return"utf8";for(var e;;)switch(t){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 t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof n&&(e.isEncoding===r||!r(t)))throw new Error("Unknown encoding: "+t);return n||t}(t),this.encoding){case"utf16le":this.text=s,this.end=u,n=4;break;case"utf8":this.fillLast=o,n=4;break;case"base64":this.text=a,this.end=c,n=3;break;default:return this.write=f,void(this.end=l)}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(n)}function i(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function o(t){var e=this.lastTotal-this.lastNeed,r=function(t,e){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function s(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function u(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function a(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function c(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function f(t){return t.toString(this.encoding)}function l(t){return t&&t.length?this.write(t):""}t.StringDecoder=n,n.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},n.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},n.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var o=i(e[n]);return o>=0?(o>0&&(t.lastNeed=o-1),o):--n<r||-2===o?0:(o=i(e[n]))>=0?(o>0&&(t.lastNeed=o-2),o):--n<r||-2===o?0:(o=i(e[n]))>=0?(o>0&&(2===o?o=0:t.lastNeed=o-3),o):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},n.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}}),tn=T(function(t,e){F(),I(),B(),L();var r=$r().codes.ERR_STREAM_PREMATURE_CLOSE;function n(){}e.exports=function t(e,i,o){if("function"==typeof i)return t(e,null,i);i||(i={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}(o||n);var s=i.readable||!1!==i.readable&&e.readable,u=i.writable||!1!==i.writable&&e.writable,a=function(){e.writable||f()},c=e._writableState&&e._writableState.finished,f=function(){u=!1,c=!0,s||o.call(e)},l=e._readableState&&e._readableState.endEmitted,h=function(){s=!1,l=!0,u||o.call(e)},p=function(t){o.call(e,t)},d=function(){var t;return s&&!l?((!e._readableState||!e._readableState.ended)&&(t=new r),o.call(e,t)):u&&!c?((!e._writableState||!e._writableState.ended)&&(t=new r),o.call(e,t)):void 0},y=function(){e.req.on("finish",f)};return function(t){return t.setHeader&&"function"==typeof t.abort}(e)?(e.on("complete",f),e.on("abort",d),e.req?y():e.on("request",y)):u&&!e._writableState&&(e.on("end",a),e.on("close",a)),e.on("end",h),e.on("finish",f),!1!==i.error&&e.on("error",p),e.on("close",d),function(){e.removeListener("complete",f),e.removeListener("abort",d),e.removeListener("request",y),e.req&&e.req.removeListener("finish",f),e.removeListener("end",a),e.removeListener("close",a),e.removeListener("finish",f),e.removeListener("end",h),e.removeListener("error",p),e.removeListener("close",d)}}}),en=T(function(t,e){var r;function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}F(),I(),B(),L();var i=tn(),o=Symbol("lastResolve"),s=Symbol("lastReject"),u=Symbol("error"),a=Symbol("ended"),c=Symbol("lastPromise"),f=Symbol("handlePromise"),l=Symbol("stream");function h(t,e){return{value:t,done:e}}function p(t){var e=t[o];if(null!==e){var r=t[l].read();null!==r&&(t[c]=null,t[o]=null,t[s]=null,e(h(r,!1)))}}function d(t){b.nextTick(p,t)}var y=Object.getPrototypeOf(function(){}),v=Object.setPrototypeOf((n(r={get stream(){return this[l]},next:function(){var t=this,e=this[u];if(null!==e)return Promise.reject(e);if(this[a])return Promise.resolve(h(void 0,!0));if(this[l].destroyed)return new Promise(function(e,r){b.nextTick(function(){t[u]?r(t[u]):e(h(void 0,!0))})});var r,n=this[c];if(n)r=new Promise(function(t,e){return function(r,n){t.then(function(){e[a]?r(h(void 0,!0)):e[f](r,n)},n)}}(n,this));else{var i=this[l].read();if(null!==i)return Promise.resolve(h(i,!1));r=new Promise(this[f])}return this[c]=r,r}},Symbol.asyncIterator,function(){return this}),n(r,"return",function(){var t=this;return new Promise(function(e,r){t[l].destroy(null,function(t){t?r(t):e(h(void 0,!0))})})}),r),y);e.exports=function(t){var e,r=Object.create(v,(n(e={},l,{value:t,writable:!0}),n(e,o,{value:null,writable:!0}),n(e,s,{value:null,writable:!0}),n(e,u,{value:null,writable:!0}),n(e,a,{value:t._readableState.endEmitted,writable:!0}),n(e,f,{value:function(t,e){var n=r[l].read();n?(r[c]=null,r[o]=null,r[s]=null,t(h(n,!1))):(r[o]=t,r[s]=e)},writable:!0}),e));return r[c]=null,i(t,function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[s];return null!==e&&(r[c]=null,r[o]=null,r[s]=null,e(t)),void(r[u]=t)}var n=r[o];null!==n&&(r[c]=null,r[o]=null,r[s]=null,n(h(void 0,!0))),r[a]=!0}),t.on("readable",d.bind(null,r)),r}}),rn=T(function(t,e){F(),I(),B(),L(),e.exports=function(){throw new Error("Readable.from is not available in the browser")}}),nn=T(function(t,e){var r;F(),I(),B(),L(),e.exports=O,O.ReadableState=S,(ht(),P(ot)).EventEmitter;var n,i=function(t,e){return t.listeners(e).length},o=dt(),s=D().Buffer,u=globalThis.Uint8Array||function(){},a=(Gr(),P(vr));n=a&&a.debuglog?a.debuglog("stream"):function(){};var c,f,l,h=zr(),p=Vr(),d=Yr().getHighWaterMark,y=$r().codes,v=y.ERR_INVALID_ARG_TYPE,g=y.ERR_STREAM_PUSH_AFTER_EOF,m=y.ERR_METHOD_NOT_IMPLEMENTED,w=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;pt()(O,o);var x=p.errorOrDestroy,_=["error","close","destroy","pause","resume"];function S(t,e,n){r=r||Kr(),t=t||{},"boolean"!=typeof n&&(n=e instanceof r),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=d(this,t,"readableHighWaterMark",n),this.buffer=new h,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&&(c||(c=Zr().StringDecoder),this.decoder=new c(t.encoding),this.encoding=t.encoding)}function O(t){if(r=r||Kr(),!(this instanceof O))return new O(t);var e=this instanceof r;this._readableState=new S(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),o.call(this)}function E(t,e,r,i,o){n("readableAddChunk",e);var a,c=t._readableState;if(null===e)c.reading=!1,function(t,e){if(n("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?A(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,R(t)))}}(t,c);else if(o||(a=function(t,e){var r;return!function(t){return s.isBuffer(t)||t instanceof u}(e)&&"string"!=typeof e&&void 0!==e&&!t.objectMode&&(r=new v("chunk",["string","Buffer","Uint8Array"],e)),r}(c,e)),a)x(t,a);else if(c.objectMode||e&&e.length>0)if("string"!=typeof e&&!c.objectMode&&Object.getPrototypeOf(e)!==s.prototype&&(e=function(t){return s.from(t)}(e)),i)c.endEmitted?x(t,new w):k(t,c,e,!0);else if(c.ended)x(t,new g);else{if(c.destroyed)return!1;c.reading=!1,c.decoder&&!r?(e=c.decoder.write(e),c.objectMode||0!==e.length?k(t,c,e,!1):M(t,c)):k(t,c,e,!1)}else i||(c.reading=!1,M(t,c));return!c.ended&&(c.length<c.highWaterMark||0===c.length)}function k(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&A(t)),M(t,e)}Object.defineProperty(O.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),O.prototype.destroy=p.destroy,O.prototype._undestroy=p.undestroy,O.prototype._destroy=function(t,e){e(t)},O.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=s.from(t,e),e=""),r=!0),E(this,t,e,!1,r)},O.prototype.unshift=function(t){return E(this,t,null,!0,!1)},O.prototype.isPaused=function(){return!1===this._readableState.flowing},O.prototype.setEncoding=function(t){c||(c=Zr().StringDecoder);var e=new c(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";null!==r;)n+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==n&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var T=1073741824;function j(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=T?t=T:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function A(t){var e=t._readableState;n("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(n("emitReadable",e.flowing),e.emittedReadable=!0,b.nextTick(R,t))}function R(t){var e=t._readableState;n("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,W(t)}function M(t,e){e.readingMore||(e.readingMore=!0,b.nextTick(C,t,e))}function C(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(n("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function U(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function N(t){n("readable nexttick read 0"),t.read(0)}function q(t,e){n("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),W(t),e.flowing&&!e.reading&&t.read(0)}function W(t){var e=t._readableState;for(n("flow",e.flowing);e.flowing&&null!==t.read(););}function H(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function G(t){var e=t._readableState;n("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,b.nextTick(z,e,t))}function z(t,e){if(n("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function V(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}O.prototype.read=function(t){n("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return n("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?G(this):A(this),null;if(0===(t=j(t,e))&&e.ended)return 0===e.length&&G(this),null;var i,o=e.needReadable;return n("need readable",o),(0===e.length||e.length-t<e.highWaterMark)&&n("length less than watermark",o=!0),e.ended||e.reading?n("reading or ended",o=!1):o&&(n("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=j(r,e))),null===(i=t>0?H(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&G(this)),null!==i&&this.emit("data",i),i},O.prototype._read=function(t){x(this,new m("_read()"))},O.prototype.pipe=function(t,e){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,n("pipe count=%d opts=%j",o.pipesCount,e);var s=e&&!1===e.end||t===b.stdout||t===b.stderr?d:u;function u(){n("onend"),t.end()}o.endEmitted?b.nextTick(s):r.once("end",s),t.on("unpipe",function e(i,s){n("onunpipe"),i===r&&s&&!1===s.hasUnpiped&&(s.hasUnpiped=!0,n("cleanup"),t.removeListener("close",h),t.removeListener("finish",p),t.removeListener("drain",a),t.removeListener("error",l),t.removeListener("unpipe",e),r.removeListener("end",u),r.removeListener("end",d),r.removeListener("data",f),c=!0,o.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&a())});var a=function(t){return function(){var e=t._readableState;n("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&i(t,"data")&&(e.flowing=!0,W(t))}}(r);t.on("drain",a);var c=!1;function f(e){n("ondata");var i=t.write(e);n("dest.write",i),!1===i&&((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==V(o.pipes,t))&&!c&&(n("false write response, pause",o.awaitDrain),o.awaitDrain++),r.pause())}function l(e){n("onerror",e),d(),t.removeListener("error",l),0===i(t,"error")&&x(t,e)}function h(){t.removeListener("finish",p),d()}function p(){n("onfinish"),t.removeListener("close",h),d()}function d(){n("unpipe"),r.unpipe(t)}return r.on("data",f),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",l),t.once("close",h),t.once("finish",p),t.emit("pipe",r),o.flowing||(n("pipe resume"),r.resume()),t},O.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=V(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},O.prototype.on=function(t,e){var r=o.prototype.on.call(this,t,e),i=this._readableState;return"data"===t?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===t&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,n("on readable",i.length,i.reading),i.length?A(this):i.reading||b.nextTick(N,this)),r},O.prototype.addListener=O.prototype.on,O.prototype.removeListener=function(t,e){var r=o.prototype.removeListener.call(this,t,e);return"readable"===t&&b.nextTick(U,this),r},O.prototype.removeAllListeners=function(t){var e=o.prototype.removeAllListeners.apply(this,arguments);return("readable"===t||void 0===t)&&b.nextTick(U,this),e},O.prototype.resume=function(){var t=this._readableState;return t.flowing||(n("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,b.nextTick(q,t,e))}(this,t)),t.paused=!1,this},O.prototype.pause=function(){return n("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(n("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},O.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;for(var o in t.on("end",function(){if(n("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)}),t.on("data",function(o){n("wrapped data"),r.decoder&&(o=r.decoder.write(o)),r.objectMode&&null==o||!(r.objectMode||o&&o.length)||e.push(o)||(i=!0,t.pause())}),t)void 0===this[o]&&"function"==typeof t[o]&&(this[o]=function(e){return function(){return t[e].apply(t,arguments)}}(o));for(var s=0;s<_.length;s++)t.on(_[s],this.emit.bind(this,_[s]));return this._read=function(e){n("wrapped _read",e),i&&(i=!1,t.resume())},this},"function"==typeof Symbol&&(O.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=en()),f(this)}),Object.defineProperty(O.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(O.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(O.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),O._fromList=H,Object.defineProperty(O.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(O.from=function(t,e){return void 0===l&&(l=rn()),l(O,t,e)})}),on=T(function(t,e){F(),I(),B(),L(),e.exports=c;var r=$r().codes,n=r.ERR_METHOD_NOT_IMPLEMENTED,i=r.ERR_MULTIPLE_CALLBACK,o=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,u=Kr();function a(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new i);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function c(t){if(!(this instanceof c))return new c(t);u.call(this,t),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",f)}function f(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?l(this,null,null):this._flush(function(e,r){l(t,e,r)})}function l(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new s;if(t._transformState.transforming)throw new o;return t.push(null)}pt()(c,u),c.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},c.prototype._transform=function(t,e,r){r(new n("_transform()"))},c.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},c.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},c.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,function(t){e(t)})}}),sn=T(function(t,e){F(),I(),B(),L(),e.exports=n;var r=on();function n(t){if(!(this instanceof n))return new n(t);r.call(this,t)}pt()(n,r),n.prototype._transform=function(t,e,r){r(null,t)}}),un=T(function(t,e){var r;F(),I(),B(),L();var n=$r().codes,i=n.ERR_MISSING_ARGS,o=n.ERR_STREAM_DESTROYED;function s(t){if(t)throw t}function u(t){t()}function a(t,e){return t.pipe(e)}e.exports=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var c=function(t){return t.length&&"function"==typeof t[t.length-1]?t.pop():s}(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new i("streams");var f,l=e.map(function(t,n){var i=n<e.length-1;return function(t,e,n,i){i=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(i);var s=!1;t.on("close",function(){s=!0}),void 0===r&&(r=tn()),r(t,{readable:e,writable:n},function(t){if(t)return i(t);s=!0,i()});var u=!1;return function(e){if(!s&&!u){if(u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t))return t.abort();if("function"==typeof t.destroy)return t.destroy();i(e||new o("pipe"))}}}(t,i,n>0,function(t){f||(f=t),t&&l.forEach(u),!i&&(l.forEach(u),c(f))})});return e.reduce(a)}}),an=T(function(t,e){F(),I(),B(),L(),e.exports=n;var r=(ht(),P(ot)).EventEmitter;function n(){r.call(this)}pt()(n,r),n.Readable=nn(),n.Writable=Xr(),n.Duplex=Kr(),n.Transform=on(),n.PassThrough=sn(),n.finished=tn(),n.pipeline=un(),n.Stream=n,n.prototype.pipe=function(t,e){var n=this;function i(e){t.writable&&!1===t.write(e)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",i),t.on("drain",o),!t._isStdio&&(!e||!1!==e.end)&&(n.on("end",u),n.on("close",a));var s=!1;function u(){s||(s=!0,t.end())}function a(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function c(t){if(f(),0===r.listenerCount(this,"error"))throw t}function f(){n.removeListener("data",i),t.removeListener("drain",o),n.removeListener("end",u),n.removeListener("close",a),n.removeListener("error",c),t.removeListener("error",c),n.removeListener("end",f),n.removeListener("close",f),t.removeListener("close",f)}return n.on("error",c),t.on("error",c),n.on("end",f),n.on("close",f),t.on("close",f),t.emit("pipe",n),t}});F(),I(),B(),L(),F(),I(),B(),L();var cn=function(){return(0,a.default)(function t(e,r){if((0,u.default)(this,t),!r)throw Error("Null Argument Exception");this.id=e,this.assembler=r},[{key:"contentType",get:function(){return this.assembler.payloadType}},{key:"length",get:function(){return this.assembler.contentLength}},{key:"getStream",value:function(){return this.stream||(this.stream=this.assembler.getPayloadStream()),this.stream}},{key:"cancel",value:function(){this.assembler.close()}},{key:"readAsString",value:function(){return M(this,null,i.default.mark(function t(){var e,r;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,this.readAll();case 1:return e=t.sent,r=e.bufferArray,t.abrupt("return",(r||[]).map(function(t){return t.toString("utf8")}).join(""));case 2:case"end":return t.stop()}},t,this)}))}},{key:"readAsJson",value:function(){return M(this,null,i.default.mark(function t(){var e;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,this.readAsString();case 1:return e=t.sent,t.abrupt("return",JSON.parse(e));case 2:case"end":return t.stop()}},t,this)}))}},{key:"readAll",value:function(){return M(this,null,i.default.mark(function t(){var e,r,n,o,s=this;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:for(e=[],r=0,n=this.getStream();r<n.length;)o=n.read(n.length),e.push(o),r+=o.length;if(!(r<this.length)){t.next=1;break}return t.next=1,new Promise(function(t){var i;n.subscribe((i=s,function(n){e.push(n),(r+=n.length)===i.length&&t(!0)}))});case 1:return t.abrupt("return",{bufferArray:e,size:r});case 2:case"end":return t.stop()}},t,this)}))}}])}();F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L();var fn,ln=[];for(fn=0;fn<256;++fn)ln.push((fn+256).toString(16).slice(1));F(),I(),B(),L();var hn,pn=new Uint8Array(16);function dn(){if(!hn&&!(hn="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return hn(pn)}F(),I(),B(),L(),F(),I(),B(),L();var yn={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},vn=function(t,e,r){if(yn.randomUUID&&!e&&!t)return yn.randomUUID();var n=(t=t||{}).random||(t.rng||dn)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){r=r||0;for(var i=0;i<16;++i)e[r+i]=n[i];return e}return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(ln[t[e+0]]+ln[t[e+1]]+ln[t[e+2]]+ln[t[e+3]]+"-"+ln[t[e+4]]+ln[t[e+5]]+"-"+ln[t[e+6]]+ln[t[e+7]]+"-"+ln[t[e+8]]+ln[t[e+9]]+"-"+ln[t[e+10]]+ln[t[e+11]]+ln[t[e+12]]+ln[t[e+13]]+ln[t[e+14]]+ln[t[e+15]]).toLowerCase()}(n)};function bn(){return vn()}var gn=(0,a.default)(function t(e){var r,n,i,o,s,a;(0,u.default)(this,t),this.content=e,this.id=bn(),this.description={id:this.id,type:null!=(i=null==(n=null==(r=this.content)?void 0:r.headers)?void 0:n.type)?i:"unknown",length:null!=(a=null==(s=null==(o=this.content)?void 0:o.headers)?void 0:s.contentLength)?a:0}}),mn=function(){return(0,a.default)(function t(e,r){(0,u.default)(this,t),this.headers=e,this.stream=r},[{key:"getStream",value:function(){return this.stream}}])}();F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L();var wn=(0,a.default)(function t(){(0,u.default)(this,t)});F(),I(),B(),L(),F(),I(),B(),L();var xn=function(t){function e(t){var r;return(0,u.default)(this,e),(r=d(this,e,[t])).length=0,r.bufferList=[],r}return(0,h.default)(e,t),(0,a.default)(e,[{key:"_write",value:function(t,e,r){var n=g.Buffer.from(t);this.bufferList.push(n),this.length+=t.length,this._onData&&this._onData(n),r()}},{key:"_read",value:function(t){if(0===this.bufferList.length)this.push(null);else for(var e=0;e<t&&this.bufferList.length>0;){var r=this.bufferList[0];this.push(r),this.bufferList.splice(0,1),e+=r.length}}},{key:"subscribe",value:function(t){this._onData=t}}])}(R(an()).Duplex),_n=function(){function t(){(0,u.default)(this,t),this.streams=[]}return(0,a.default)(t,[{key:"addStream",value:function(t){if(!t)throw new Error("Argument Undefined Exception: content undefined.");this.streams.push(new gn(t))}},{key:"setBody",value:function(t){if("string"==typeof t){var e=new xn;e.write(t,"utf8"),this.addStream(new mn({type:"application/json; charset=utf-8",contentLength:e.length},e))}else"object"==(0,p.default)(t)&&this.addStream(t)}}],[{key:"create",value:function(e,r,n){var i=new t;return i.verb=e,i.path=r,n&&i.setBody(n),i}}])}();F(),I(),B(),L();var Sn=function(){function t(){(0,u.default)(this,t),this.streams=[]}return(0,a.default)(t,[{key:"addStream",value:function(t){this.streams.push(new gn(t))}},{key:"setBody",value:function(t){var e=new xn;e.write(JSON.stringify(t),"utf8"),this.addStream(new mn({type:"application/json; charset=utf-8",contentLength:e.length},e))}}],[{key:"create",value:function(e,r){var n=new t;return n.statusCode=e,r&&n.addStream(r),n}}])}();F(),I(),B(),L(),F(),I(),B(),L();var On=function(){return(0,a.default)(function t(e){(0,u.default)(this,t),e&&(this.webSocket=e)},[{key:"connect",value:function(t){return M(this,null,i.default.mark(function e(){var r,n;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(this.webSocket||(this.webSocket=new WebSocket(t)),this.webSocket.onerror=function(t){n(t)},this.webSocket.onopen=function(t){r(t)},new Promise(function(t,e){r=t,n=e})));case 1:case"end":return e.stop()}},e,this)}))}},{key:"isConnected",get:function(){return 1===this.webSocket.readyState}},{key:"write",value:function(t){this.webSocket.send(t)}},{key:"close",value:function(){this.webSocket.close()}},{key:"setOnMessageHandler",value:function(t){var e="buffer",r=[];this.webSocket.onmessage=function(n){var i=new FileReader,o={buffer:null};r.push(o),i.onload=function(n){var i=n.target;if(o[e]=i.result,r[0]===o)for(;0<r.length&&r[0][e];)t(r[0][e]),r.splice(0,1)},i.readAsArrayBuffer(n.data)}}},{key:"setOnErrorHandler",value:function(t){this.webSocket.onerror=function(e){e&&t(e)}}},{key:"setOnCloseHandler",value:function(t){this.webSocket.onclose=t}}])}();F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L();var En=function(){return(0,a.default)(function t(){(0,u.default)(this,t)},null,[{key:"serialize",value:function(t,e){e.write(t.payloadType,this.TypeOffset,1,this.Encoding),e.write(this.Delimiter,this.TypeDelimiterOffset,1,this.Encoding),e.write(this.headerLengthPadder(t.payloadLength,this.LengthLength,"0"),this.LengthOffset,this.LengthLength,this.Encoding),e.write(this.Delimiter,this.LengthDelimeterOffset,1,this.Encoding),e.write(t.id,this.IdOffset),e.write(this.Delimiter,this.IdDelimeterOffset,1,this.Encoding),e.write(t.end?this.End:this.NotEnd,this.EndOffset),e.write(this.Terminator,this.TerminatorOffset)}},{key:"deserialize",value:function(t){var e=t.toString(this.Encoding),r=e.split(this.Delimiter);if(4!==r.length)throw Error("Cannot parse header, header is malformed. Header: ".concat(e));var n=(0,o.default)(r,4),i=n[0],s=n[1],u=n[2],a=n[3],c={end:"1\n"===a,payloadLength:Number(s),payloadType:i,id:u};if(!(c.payloadLength<=4096&&c.payloadLength>=0))throw Error("Header length of ".concat(c.payloadLength," is missing or malformed"));if(c.payloadType.length!==this.TypeDelimiterOffset)throw Error("Header type '".concat(c.payloadType.length,"' is missing or malformed."));if(!c.id||!c.id.match(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i)||c.id.length!==this.IdLength)throw Error("Header ID '".concat(c.id,"' is missing or malformed."));if("0\n"!==a&&"1\n"!==a)throw Error("Header End is missing or not a valid value. Header end: '".concat(a,"'"));return c}},{key:"headerLengthPadder",value:function(t,e,r){var n=Array(e+1).join(r),i=t.toString();return(n+i).slice(i.length)}}])}();En.Delimiter=".",En.Terminator="\n",En.End="1",En.NotEnd="0",En.TypeOffset=0,En.TypeDelimiterOffset=1,En.LengthOffset=2,En.LengthLength=6,En.LengthDelimeterOffset=8,En.IdOffset=9,En.IdLength=36,En.IdDelimeterOffset=45,En.EndOffset=46,En.TerminatorOffset=47,En.Encoding="utf8",F(),I(),B(),L();var kn=(0,a.default)(function t(e){(0,u.default)(this,t),this.reason=e});kn.Empty=new kn;var Tn=kn,jn=function(){return(0,a.default)(function t(){(0,u.default)(this,t)},[{key:"isConnected",get:function(){return null!=this._receiver}},{key:"connect",value:function(t){return this._receiver=t,this.receivePackets()}},{key:"subscribe",value:function(t,e){this._getStream=t,this._receiveAction=e}},{key:"disconnect",value:function(){var t,e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Tn.Empty;if(this.isConnected)try{this._receiver.close(),null==(t=this.disconnected)||t.call(this,this,r)}catch(t){null==(e=this.disconnected)||e.call(this,this,new Tn(t.message))}finally{this._receiver=null}}},{key:"receivePackets",value:function(){return M(this,null,i.default.mark(function t(){var e,r,n,o,s,u,a;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.isConnected){t.next=13;break}t.prev=1,e=0;case 2:if(!(e<48)){t.next=5;break}return t.next=3,this._receiver.receive(48-e);case 3:this._receiveHeaderBuffer=t.sent,this._receiveHeaderBuffer&&(e+=this._receiveHeaderBuffer.length);case 4:t.next=2;break;case 5:if(r=En.deserialize(this._receiveHeaderBuffer),n="S"===r.payloadType,!(r.payloadLength>0)){t.next=10;break}o=0,s=this._getStream(r);case 6:if(!(o<r.payloadLength&&o<4096)){t.next=9;break}return u=Math.min(r.payloadLength-o,4096),t.next=7,this._receiver.receive(u);case 7:this._receivePayloadBuffer=t.sent,o+=this._receivePayloadBuffer.byteLength,s.write(this._receivePayloadBuffer),n&&this._receiveAction(r,s,o);case 8:t.next=6;break;case 9:n||this._receiveAction(r,s,o);case 10:t.next=12;break;case 11:t.prev=11,a=t.catch(1),this.disconnect(new Tn(a.message));case 12:t.next=0;break;case 13:case"end":return t.stop()}},t,this,[[1,11]])}))}}])}();F(),I(),B(),L();var An=function(){return(0,a.default)(function t(){(0,u.default)(this,t)},[{key:"isConnected",get:function(){return null!=this._sender}},{key:"connect",value:function(t){this._sender=t}},{key:"sendPayload",value:function(t,e,r){var n={header:t,payload:e,sentCallback:r};this.writePacket(n)}},{key:"disconnect",value:function(){var t,e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Tn.Empty;if(this.isConnected)try{this._sender.close(),null==(t=this.disconnected)||t.call(this,this,r)}catch(t){null==(e=this.disconnected)||e.call(this,this,new Tn(t.message))}finally{this._sender=null}}},{key:"writePacket",value:function(t){try{if(t.header.payloadLength>0&&t.payload){for(var e=t.header.payloadLength;e>0;){var r=e<=4096?e:4096,n=t.payload.read(r),i=t.header;i.payloadLength=r,i.end=e<=4096;var o=g.Buffer.alloc(48);En.serialize(i,o),this._sender.send(o),this._sender.send(n),e-=n.length}t.sentCallback&&t.sentCallback()}}catch(e){this.disconnect(new Tn(e.message))}}}])}();F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L(),F(),I(),B(),L();var Rn=function(){return(0,a.default)(function t(e){(0,u.default)(this,t),this.onCancelStream=e,this.activeAssemblers=[]},[{key:"getPayloadAssembler",value:function(t){if(this.activeAssemblers[t])return this.activeAssemblers[t];var e=new Dn(this,{id:t});return this.activeAssemblers[t]=e,e}},{key:"getPayloadStream",value:function(t){return this.getPayloadAssembler(t.id).getPayloadStream()}},{key:"onReceive",value:function(t,e,r){this.activeAssemblers[t.id]&&this.activeAssemblers[t.id].onReceive(t,e,r)}},{key:"closeStream",value:function(t){if(this.activeAssemblers[t]){var e=this.activeAssemblers[t];this.activeAssemblers.splice(this.activeAssemblers.indexOf(t),1);var r=e.getPayloadStream();(e.contentLength&&r.length<e.contentLength||!e.end)&&this.onCancelStream(e)}}}])}();F(),I(),B(),L();var Pn=(0,a.default)(function t(){(0,u.default)(this,t)}),Mn=function(){return(0,a.default)(function t(){(0,u.default)(this,t),this._pendingRequests={}},[{key:"pendingRequestCount",value:function(){return Object.keys(this._pendingRequests).length}},{key:"signalResponse",value:function(t,e){return M(this,null,i.default.mark(function r(){var n;return i.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return n=this._pendingRequests[t],r.abrupt("return",!!n&&(n.resolve(e),delete this._pendingRequests[t],!0));case 1:case"end":return r.stop()}},r,this)}))}},{key:"getResponse",value:function(t){var e=this._pendingRequests[t];if(e)return Promise.reject("requestId '".concat(t,"' already exists in RequestManager"));(e=new Pn).requestId=t;var r=new Promise(function(t,r){e.resolve=t,e.reject=r});return this._pendingRequests[t]=e,r}},{key:"rejectAllResponses",value:function(t){var e=this;Object.entries(this._pendingRequests).forEach(function(r){var n=(0,o.default)(r,2),i=n[0];(0,n[1].reject)(t),delete e._pendingRequests[i]})}}])}();F(),I(),B(),L(),F(),I(),B(),L();var In=function(){return(0,a.default)(function t(e,r,n){(0,u.default)(this,t),this.sender=e,this.id=r,this.payloadType=n},[{key:"disassemble",value:function(){var t={payloadType:this.payloadType,payloadLength:0,id:this.id,end:!0};this.sender.sendPayload(t)}}])}();F(),I(),B(),L(),F(),I(),B(),L();var Bn=function(){return(0,a.default)(function t(e,r){(0,u.default)(this,t),this.sender=e,this.id=r},[{key:"disassemble",value:function(){return M(this,null,i.default.mark(function t(){var e,r,n;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,this.getStream();case 1:return e=t.sent,r=e.stream,n=e.streamLength,t.abrupt("return",(this.stream=r,this.streamLength=n,this.send()));case 2:case"end":return t.stop()}},t,this)}))}},{key:"send",value:function(){return M(this,null,i.default.mark(function t(){var e;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:e={payloadType:this.payloadType,payloadLength:this.streamLength,id:this.id,end:!0},this.sender.sendPayload(e,this.stream);case 1:case"end":return t.stop()}},t,this)}))}}],[{key:"serialize",value:function(t){var e=new xn;return e.write(JSON.stringify(t)),e.end(),{stream:e,streamLength:e.length}}}])}(),Cn=function(t){function e(t,r){var n;return(0,u.default)(this,e),(n=d(this,e,[t,r.id])).payloadType="S",n.contentStream=r,n}return(0,h.default)(e,t),(0,a.default)(e,[{key:"getStream",value:function(){return M(this,null,i.default.mark(function t(){var e;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.contentStream.content.getStream(),t.abrupt("return",{stream:e,streamLength:e.length});case 1:case"end":return t.stop()}},t,this)}))}}])}(Bn);F(),I(),B(),L();var Ln=function(t){function e(t,r,n){var i;return(0,u.default)(this,e),(i=d(this,e,[t,r])).request=n,i.payloadType="A",i}return(0,h.default)(e,t),(0,a.default)(e,[{key:"getStream",value:function(){return M(this,null,i.default.mark(function t(){var e,r,n,o,s;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s={verb:null==(e=this.request)?void 0:e.verb,path:null==(r=this.request)?void 0:r.path,streams:[]},t.abrupt("return",(null==(o=null==(n=this.request)?void 0:n.streams)||o.forEach(function(t){s.streams.push(t.description)}),Bn.serialize(s)));case 1:case"end":return t.stop()}},t,this)}))}}])}(Bn);F(),I(),B(),L();var Un=function(t){function e(t,r,n){var i;return(0,u.default)(this,e),(i=d(this,e,[t,r])).payloadType="B",i.response=n,i}return(0,h.default)(e,t),(0,a.default)(e,[{key:"getStream",value:function(){return M(this,null,i.default.mark(function t(){var e,r;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r={statusCode:this.response.statusCode,streams:[]},t.abrupt("return",(null==(e=this.response.streams)||e.forEach(function(t){var e=t.description;r.streams.push({id:e.id,contentType:e.type,length:e.length})}),Bn.serialize(r)));case 1:case"end":return t.stop()}},t,this)}))}}])}(Bn),Nn=function(){return(0,a.default)(function t(e){(0,u.default)(this,t),this.payloadSender=e},[{key:"sendRequest",value:function(t,e){return M(this,null,i.default.mark(function r(){var n=this;return i.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=1,new Ln(this.payloadSender,t,e).disassemble();case 1:e.streams&&e.streams.forEach(function(t){return M(n,null,i.default.mark(function e(){return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,new Cn(this.payloadSender,t).disassemble();case 1:case"end":return e.stop()}},e,this)}))});case 2:case"end":return r.stop()}},r,this)}))}},{key:"sendResponse",value:function(t,e){return M(this,null,i.default.mark(function r(){var n=this;return i.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=1,new Un(this.payloadSender,t,e).disassemble();case 1:e.streams&&e.streams.forEach(function(t){return M(n,null,i.default.mark(function e(){return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,new Cn(this.payloadSender,t).disassemble();case 1:case"end":return e.stop()}},e,this)}))});case 2:case"end":return r.stop()}},r,this)}))}},{key:"sendCancelStream",value:function(t){return M(this,null,i.default.mark(function e(){return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:new In(this.payloadSender,t,"C").disassemble();case 1:case"end":return e.stop()}},e,this)}))}}])}(),Dn=function(){return(0,a.default)(function t(e,r){if((0,u.default)(this,t),this.streamManager=e,this._byteOrderMark=65279,this._utf="utf8",r.header?(this.id=r.header.id,this.payloadType=r.header.payloadType,this.contentLength=r.header.payloadLength,this.end=r.header.end):this.id=r.id,!this.id)throw Error("An ID must be supplied when creating an assembler.");this._onCompleted=r.onCompleted},[{key:"getPayloadStream",value:function(){return this.stream||(this.stream=this.createPayloadStream()),this.stream}},{key:"onReceive",value:function(t,e,r){this.end=t.end,"B"===t.payloadType||"A"===t.payloadType?this.process(e).then().catch():t.end&&e.end()}},{key:"close",value:function(){this.streamManager.closeStream(this.id)}},{key:"createPayloadStream",value:function(){return new xn}},{key:"payloadFromJson",value:function(t){return JSON.parse(t.charCodeAt(0)===this._byteOrderMark?t.slice(1):t)}},{key:"stripBOM",value:function(t){return t.charCodeAt(0)===this._byteOrderMark?t.slice(1):t}},{key:"process",value:function(t){return M(this,null,i.default.mark(function e(){var r,n;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.read(t.length)){e.next=1;break}return e.abrupt("return");case 1:if(n=r.toString(this._utf),"A"!==this.payloadType){e.next=3;break}return e.next=2,this.processRequest(n);case 2:e.next=4;break;case 3:if("B"!==this.payloadType){e.next=4;break}return e.next=4,this.processResponse(n);case 4:case"end":return e.stop()}},e,this)}))}},{key:"processResponse",value:function(t){return M(this,null,i.default.mark(function e(){var r,n;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.payloadFromJson(this.stripBOM(t)),n={streams:[],statusCode:r.statusCode},e.next=1,this.processStreams(r,n);case 1:case"end":return e.stop()}},e,this)}))}},{key:"processRequest",value:function(t){return M(this,null,i.default.mark(function e(){var r,n;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.payloadFromJson(t),n={streams:[],path:r.path,verb:r.verb},e.next=1,this.processStreams(r,n);case 1:case"end":return e.stop()}},e,this)}))}},{key:"processStreams",value:function(t,e){return M(this,null,i.default.mark(function r(){var n,o=this;return i.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return null==(n=t.streams)||n.forEach(function(t){var r,n=null!=(r=t.type)?r:t.contentType,i=o.streamManager.getPayloadAssembler(t.id);i.payloadType=n,i.contentLength=t.length,e.streams.push(new cn(t.id,i))}),r.next=1,this._onCompleted(this.id,e);case 1:case"end":return r.stop()}},r,this)}))}}])}(),Fn=function(){return(0,a.default)(function t(e,r,n){(0,u.default)(this,t),this.streamManager=e,this.onReceiveResponse=r,this.onReceiveRequest=n,this.activeAssemblers={}},[{key:"getPayloadStream",value:function(t){if("S"===t.payloadType)return this.streamManager.getPayloadStream(t);if(!this.activeAssemblers[t.id]){var e=this.createPayloadAssembler(t);if(e)return this.activeAssemblers[t.id]=e,e.getPayloadStream()}}},{key:"onReceive",value:function(t,e,r){"S"===t.payloadType?this.streamManager.onReceive(t,e,r):(this.activeAssemblers&&this.activeAssemblers[t.id]&&this.activeAssemblers[t.id].onReceive(t,e,r),t.end&&delete this.activeAssemblers[t.id])}},{key:"createPayloadAssembler",value:function(t){return"A"===t.payloadType?new Dn(this.streamManager,{header:t,onCompleted:this.onReceiveRequest}):"B"===t.payloadType?new Dn(this.streamManager,{header:t,onCompleted:this.onReceiveResponse}):void 0}}])}(),qn=function(){return(0,a.default)(function t(e,r,n,i){var o=this;(0,u.default)(this,t),this.requestHandler=e,this.requestManager=r,this.payloadSender=n,this.payloadReceiver=i,this.sendOperations=new Nn(this.payloadSender),this.streamManager=new Rn(this.onCancelStream),this.assemblerManager=new Fn(this.streamManager,function(t,e){return o.onReceiveResponse(t,e)},function(t,e){return o.onReceiveRequest(t,e)}),this.payloadReceiver.subscribe(function(t){return o.assemblerManager.getPayloadStream(t)},function(t,e,r){return o.assemblerManager.onReceive(t,e,r)})},[{key:"sendRequest",value:function(t){return M(this,null,i.default.mark(function e(){var r,n;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=bn(),n=this.requestManager.getResponse(r),e.next=1,this.sendOperations.sendRequest(r,t);case 1:return e.abrupt("return",n);case 2:case"end":return e.stop()}},e,this)}))}},{key:"onReceiveRequest",value:function(t,e){return M(this,null,i.default.mark(function r(){var n;return i.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(!this.requestHandler){r.next=2;break}return r.next=1,this.requestHandler.processRequest(e);case 1:if(!(n=r.sent)){r.next=2;break}return r.next=2,this.sendOperations.sendResponse(t,n);case 2:case"end":return r.stop()}},r,this)}))}},{key:"onReceiveResponse",value:function(t,e){return M(this,null,i.default.mark(function r(){return i.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=1,this.requestManager.signalResponse(t,e);case 1:case"end":return r.stop()}},r,this)}))}},{key:"onCancelStream",value:function(t){this.sendOperations.sendCancelStream(t.id).catch()}}])}();F(),I(),B(),L();var Wn=function(){return(0,a.default)(function t(e){var r=this;(0,u.default)(this,t),this.ws=e,this._queue=[],this._activeOffset=0,this._activeReceiveCount=0,this.ws.setOnMessageHandler(function(t){r.onReceive(t)}),this.ws.setOnErrorHandler(function(t){r.onError(t)}),this.ws.setOnCloseHandler(function(){r.onClose()})},[{key:"send",value:function(t){var e;return null!=(e=this.ws)&&e.isConnected?(this.ws.write(t),t.length):0}},{key:"isConnected",get:function(){var t;return!(null==(t=this.ws)||!t.isConnected)}},{key:"close",value:function(){var t;null!=(t=this.ws)&&t.isConnected&&this.ws.close()}},{key:"receive",value:function(t){return M(this,null,i.default.mark(function e(){var r,n=this;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._activeReceiveResolve){e.next=1;break}throw new Error("Cannot call receive more than once before it has returned.");case 1:return this._activeReceiveCount=t,r=new Promise(function(t,e){n._activeReceiveResolve=t,n._activeReceiveReject=e}),e.abrupt("return",(this.trySignalData(),r));case 2:case"end":return e.stop()}},e,this)}))}},{key:"onReceive",value:function(t){this._queue&&t&&t.byteLength>0&&(this._queue.push(g.Buffer.from(t)),this.trySignalData())}},{key:"onClose",value:function(){this._activeReceiveReject&&this._activeReceiveReject(new Error("Socket was closed.")),this._active=null,this._activeOffset=0,this._activeReceiveResolve=null,this._activeReceiveReject=null,this._activeReceiveCount=0,this.ws=null}},{key:"onError",value:function(t){this._activeReceiveReject&&this._activeReceiveReject(t),this.onClose()}},{key:"trySignalData",value:function(){if(this._activeReceiveResolve&&(!this._active&&this._queue.length>0&&(this._active=this._queue.shift(),this._activeOffset=0),this._active)){if(0===this._activeOffset&&this._active.length===this._activeReceiveCount){var t=this._active;this._active=null,this._activeReceiveResolve(t)}else{var e=Math.min(this._activeReceiveCount,this._active.length-this._activeOffset),r=g.Buffer.alloc(e);this._active.copy(r,0,this._activeOffset,this._activeOffset+e),this._activeOffset+=e,this._activeOffset>=this._active.length&&(this._active=null,this._activeOffset=0),this._activeReceiveResolve(r)}this._activeReceiveCount=0,this._activeReceiveReject=null,this._activeReceiveResolve=null}}}])}(),Hn=function(){return(0,a.default)(function t(e){var r=e.url,n=e.requestHandler,i=e.disconnectionHandler,o=void 0===i?null:i;(0,u.default)(this,t),this._url=r,this._requestHandler=n,this._disconnectionHandler=o,this._requestManager=new Mn,this._sender=new An,this._sender.disconnected=this.onConnectionDisconnected.bind(this),this._receiver=new jn,this._receiver.disconnected=this.onConnectionDisconnected.bind(this),this._protocolAdapter=new qn(this._requestHandler,this._requestManager,this._sender,this._receiver)},[{key:"connect",value:function(){return M(this,null,i.default.mark(function t(){var e,r;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=new On,t.next=1,e.connect(this._url);case 1:r=new Wn(e),this._sender.connect(r),this._receiver.connect(r);case 2:case"end":return t.stop()}},t,this)}))}},{key:"disconnect",value:function(){this._sender.disconnect(new Tn("Disconnect was called.")),this._receiver.disconnect(new Tn("Disconnect was called."))}},{key:"send",value:function(t){return M(this,null,i.default.mark(function e(){return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._protocolAdapter.sendRequest(t));case 1:case"end":return e.stop()}},e,this)}))}},{key:"onConnectionDisconnected",value:function(t,e){if(this._requestManager.rejectAllResponses(new Error("Disconnect was called.")),null==this._disconnectionHandler)throw new Error("Unable to re-connect client to transport for url ".concat(this._url,". Sender: '").concat(JSON.stringify(t),"'. Args:' ").concat(JSON.stringify(e)));this._disconnectionHandler("Disconnected")}}])}();e.BrowserWebSocket=On,e.ContentStream=cn,e.HttpContent=mn,e.RequestHandler=wn,e.StreamingRequest=_n,e.StreamingResponse=Sn,e.SubscribableStream=xn,e.WebSocketClient=Hn},1545:function(t,e,r){"use strict";var n=r(4994),i=n(r(7383)),o=n(r(4579)),s=n(r(8452)),u=n(r(3072)),a=n(r(9511)),c=n(r(3738));function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(f=function(){return!!t})()}var l=r(7526),h=r(251),p="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=v,e.SlowBuffer=function(t){return+t!=t&&(t=0),v.alloc(+t)},e.INSPECT_MAX_BYTES=50;var d=2147483647;function y(t){if(t>d)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,v.prototype),e}function v(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return m(t)}return b(t,e,r)}function b(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!v.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|S(t,e),n=y(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(nt(t,Uint8Array)){var e=new Uint8Array(t);return x(e.buffer,e.byteOffset,e.byteLength)}return w(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(0,c.default)(t));if(nt(t,ArrayBuffer)||t&&nt(t.buffer,ArrayBuffer))return x(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(nt(t,SharedArrayBuffer)||t&&nt(t.buffer,SharedArrayBuffer)))return x(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return v.from(n,e,r);var i=function(t){if(v.isBuffer(t)){var e=0|_(t.length),r=y(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||it(t.length)?y(0):w(t):"Buffer"===t.type&&Array.isArray(t.data)?w(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return v.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(0,c.default)(t))}function g(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function m(t){return g(t),y(t<0?0:0|_(t))}function w(t){for(var e=t.length<0?0:0|_(t.length),r=y(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function x(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,v.prototype),n}function _(t){if(t>=d)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d.toString(16)+" bytes");return 0|t}function S(t,e){if(v.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||nt(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+(0,c.default)(t));var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return tt(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return et(t).length;default:if(i)return n?-1:tt(t).length;e=(""+e).toLowerCase(),i=!0}}function O(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return N(this,e,r);case"utf8":case"utf-8":return B(this,e,r);case"ascii":return L(this,e,r);case"latin1":case"binary":return U(this,e,r);case"base64":return I(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function E(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function k(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),it(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=v.from(e,n)),v.isBuffer(e))return 0===e.length?-1:T(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):T(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function T(t,e,r,n,i){var o,s=1,u=t.length,a=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,u/=2,a/=2,r/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var f=-1;for(o=r;o<u;o++)if(c(t,o)===c(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===a)return f*s}else-1!==f&&(o-=o-f),f=-1}else for(r+a>u&&(r=u-a),o=r;o>=0;o--){for(var l=!0,h=0;h<a;h++)if(c(t,o+h)!==c(e,h)){l=!1;break}if(l)return o}return-1}function j(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o,s=e.length;for(n>s/2&&(n=s/2),o=0;o<n;++o){var u=parseInt(e.substr(2*o,2),16);if(it(u))return o;t[r+o]=u}return o}function A(t,e,r,n){return rt(tt(e,t.length-r),t,r,n)}function R(t,e,r,n){return rt(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function P(t,e,r,n){return rt(et(e),t,r,n)}function M(t,e,r,n){return rt(function(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)n=(r=t.charCodeAt(s))>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function I(t,e,r){return 0===e&&r===t.length?l.fromByteArray(t):l.fromByteArray(t.slice(e,r))}function B(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o=t[i],s=null,u=o>239?4:o>223?3:o>191?2:1;if(i+u<=r){var a=void 0,c=void 0,f=void 0,l=void 0;switch(u){case 1:o<128&&(s=o);break;case 2:128==(192&(a=t[i+1]))&&(l=(31&o)<<6|63&a)>127&&(s=l);break;case 3:a=t[i+1],c=t[i+2],128==(192&a)&&128==(192&c)&&(l=(15&o)<<12|(63&a)<<6|63&c)>2047&&(l<55296||l>57343)&&(s=l);break;case 4:a=t[i+1],c=t[i+2],f=t[i+3],128==(192&a)&&128==(192&c)&&128==(192&f)&&(l=(15&o)<<18|(63&a)<<12|(63&c)<<6|63&f)>65535&&l<1114112&&(s=l)}}null===s?(s=65533,u=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),i+=u}return function(t){var e=t.length;if(e<=C)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=C));return r}(n)}e.kMaxLength=d,v.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),v.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(v.prototype,"parent",{enumerable:!0,get:function(){if(v.isBuffer(this))return this.buffer}}),Object.defineProperty(v.prototype,"offset",{enumerable:!0,get:function(){if(v.isBuffer(this))return this.byteOffset}}),v.poolSize=8192,v.from=function(t,e,r){return b(t,e,r)},Object.setPrototypeOf(v.prototype,Uint8Array.prototype),Object.setPrototypeOf(v,Uint8Array),v.alloc=function(t,e,r){return function(t,e,r){return g(t),t<=0?y(t):void 0!==e?"string"==typeof r?y(t).fill(e,r):y(t).fill(e):y(t)}(t,e,r)},v.allocUnsafe=function(t){return m(t)},v.allocUnsafeSlow=function(t){return m(t)},v.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==v.prototype},v.compare=function(t,e){if(nt(t,Uint8Array)&&(t=v.from(t,t.offset,t.byteLength)),nt(e,Uint8Array)&&(e=v.from(e,e.offset,e.byteLength)),!v.isBuffer(t)||!v.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},v.isEncoding=function(t){switch(String(t).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}},v.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return v.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=v.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var o=t[r];if(nt(o,Uint8Array))i+o.length>n.length?(v.isBuffer(o)||(o=v.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else{if(!v.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i)}i+=o.length}return n},v.byteLength=S,v.prototype._isBuffer=!0,v.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)E(this,e,e+1);return this},v.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)E(this,e,e+3),E(this,e+1,e+2);return this},v.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)E(this,e,e+7),E(this,e+1,e+6),E(this,e+2,e+5),E(this,e+3,e+4);return this},v.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?B(this,0,t):O.apply(this,arguments)},v.prototype.toLocaleString=v.prototype.toString,v.prototype.equals=function(t){if(!v.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===v.compare(this,t)},v.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},p&&(v.prototype[p]=v.prototype.inspect),v.prototype.compare=function(t,e,r,n,i){if(nt(t,Uint8Array)&&(t=v.from(t,t.offset,t.byteLength)),!v.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+(0,c.default)(t));if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),u=Math.min(o,s),a=this.slice(n,i),f=t.slice(e,r),l=0;l<u;++l)if(a[l]!==f[l]){o=a[l],s=f[l];break}return o<s?-1:s<o?1:0},v.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},v.prototype.indexOf=function(t,e,r){return k(this,t,e,r,!0)},v.prototype.lastIndexOf=function(t,e,r){return k(this,t,e,r,!1)},v.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return j(this,t,e,r);case"utf8":case"utf-8":return A(this,t,e,r);case"ascii":case"latin1":case"binary":return R(this,t,e,r);case"base64":return P(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},v.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;function L(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function U(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function N(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=ot[t[o]];return i}function D(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function F(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function q(t,e,r,n,i,o){if(!v.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function W(t,e,r,n,i){X(e,n,i,t,r,7);var o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;var s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,r}function H(t,e,r,n,i){X(e,n,i,t,r,7);var o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;var s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s>>=8,t[r+2]=s,s>>=8,t[r+1]=s,s>>=8,t[r]=s,r+8}function G(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function z(t,e,r,n,i){return e=+e,r>>>=0,i||G(t,0,r,4),h.write(t,e,r,n,23,4),r+4}function V(t,e,r,n,i){return e=+e,r>>>=0,i||G(t,0,r,8),h.write(t,e,r,n,52,8),r+8}v.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var n=this.subarray(t,e);return Object.setPrototypeOf(n,v.prototype),n},v.prototype.readUintLE=v.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||F(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},v.prototype.readUintBE=v.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||F(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},v.prototype.readUint8=v.prototype.readUInt8=function(t,e){return t>>>=0,e||F(t,1,this.length),this[t]},v.prototype.readUint16LE=v.prototype.readUInt16LE=function(t,e){return t>>>=0,e||F(t,2,this.length),this[t]|this[t+1]<<8},v.prototype.readUint16BE=v.prototype.readUInt16BE=function(t,e){return t>>>=0,e||F(t,2,this.length),this[t]<<8|this[t+1]},v.prototype.readUint32LE=v.prototype.readUInt32LE=function(t,e){return t>>>=0,e||F(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},v.prototype.readUint32BE=v.prototype.readUInt32BE=function(t,e){return t>>>=0,e||F(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},v.prototype.readBigUInt64LE=st(function(t){K(t>>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||Q(t,this.length-8);var n=e+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,24),i=this[++t]+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+r*Math.pow(2,24);return BigInt(n)+(BigInt(i)<<BigInt(32))}),v.prototype.readBigUInt64BE=st(function(t){K(t>>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||Q(t,this.length-8);var n=e*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+this[++t],i=this[++t]*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+r;return(BigInt(n)<<BigInt(32))+BigInt(i)}),v.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||F(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},v.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||F(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},v.prototype.readInt8=function(t,e){return t>>>=0,e||F(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},v.prototype.readInt16LE=function(t,e){t>>>=0,e||F(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},v.prototype.readInt16BE=function(t,e){t>>>=0,e||F(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},v.prototype.readInt32LE=function(t,e){return t>>>=0,e||F(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},v.prototype.readInt32BE=function(t,e){return t>>>=0,e||F(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},v.prototype.readBigInt64LE=st(function(t){K(t>>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||Q(t,this.length-8);var n=this[t+4]+this[t+5]*Math.pow(2,8)+this[t+6]*Math.pow(2,16)+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,24))}),v.prototype.readBigInt64BE=st(function(t){K(t>>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||Q(t,this.length-8);var n=(e<<24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+r)}),v.prototype.readFloatLE=function(t,e){return t>>>=0,e||F(t,4,this.length),h.read(this,t,!0,23,4)},v.prototype.readFloatBE=function(t,e){return t>>>=0,e||F(t,4,this.length),h.read(this,t,!1,23,4)},v.prototype.readDoubleLE=function(t,e){return t>>>=0,e||F(t,8,this.length),h.read(this,t,!0,52,8)},v.prototype.readDoubleBE=function(t,e){return t>>>=0,e||F(t,8,this.length),h.read(this,t,!1,52,8)},v.prototype.writeUintLE=v.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||q(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},v.prototype.writeUintBE=v.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||q(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},v.prototype.writeUint8=v.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||q(this,t,e,1,255,0),this[e]=255&t,e+1},v.prototype.writeUint16LE=v.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||q(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},v.prototype.writeUint16BE=v.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||q(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},v.prototype.writeUint32LE=v.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||q(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},v.prototype.writeUint32BE=v.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||q(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},v.prototype.writeBigUInt64LE=st(function(t){return W(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))}),v.prototype.writeBigUInt64BE=st(function(t){return H(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))}),v.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);q(this,t,e,r,i-1,-i)}var o=0,s=1,u=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===u&&0!==this[e+o-1]&&(u=1),this[e+o]=(t/s|0)-u&255;return e+r},v.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);q(this,t,e,r,i-1,-i)}var o=r-1,s=1,u=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===u&&0!==this[e+o+1]&&(u=1),this[e+o]=(t/s|0)-u&255;return e+r},v.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||q(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},v.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||q(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},v.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||q(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},v.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||q(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},v.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||q(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},v.prototype.writeBigInt64LE=st(function(t){return W(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),v.prototype.writeBigInt64BE=st(function(t){return H(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),v.prototype.writeFloatLE=function(t,e,r){return z(this,t,e,!0,r)},v.prototype.writeFloatBE=function(t,e,r){return z(this,t,e,!1,r)},v.prototype.writeDoubleLE=function(t,e,r){return V(this,t,e,!0,r)},v.prototype.writeDoubleBE=function(t,e,r){return V(this,t,e,!1,r)},v.prototype.copy=function(t,e,r,n){if(!v.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},v.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!v.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var i=t.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(t=i)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var s=v.isBuffer(t)?t:v.from(t,n),u=s.length;if(0===u)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<r-e;++o)this[o+e]=s[o%u]}return this};var $={};function Y(t,e,r){$[t]=function(r){function n(){var r,o,a,c;return(0,i.default)(this,n),o=this,a=n,a=(0,u.default)(a),r=(0,s.default)(o,f()?Reflect.construct(a,[],(0,u.default)(o).constructor):a.apply(o,c)),Object.defineProperty(r,"message",{value:e.apply(r,arguments),writable:!0,configurable:!0}),r.name="".concat(r.name," [").concat(t,"]"),r.stack,delete r.name,r}return(0,a.default)(n,r),(0,o.default)(n,[{key:"code",get:function(){return t},set:function(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}},{key:"toString",value:function(){return"".concat(this.name," [").concat(t,"]: ").concat(this.message)}}])}(r)}function J(t){for(var e="",r=t.length,n="-"===t[0]?1:0;r>=n+4;r-=3)e="_".concat(t.slice(r-3,r)).concat(e);return"".concat(t.slice(0,r)).concat(e)}function X(t,e,r,n,i,o){if(t>r||t<e){var s,u="bigint"==typeof e?"n":"";throw s=o>3?0===e||e===BigInt(0)?">= 0".concat(u," and < 2").concat(u," ** ").concat(8*(o+1)).concat(u):">= -(2".concat(u," ** ").concat(8*(o+1)-1).concat(u,") and < 2 ** ")+"".concat(8*(o+1)-1).concat(u):">= ".concat(e).concat(u," and <= ").concat(r).concat(u),new $.ERR_OUT_OF_RANGE("value",s,t)}!function(t,e,r){K(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||Q(e,t.length-(r+1))}(n,i,o)}function K(t,e){if("number"!=typeof t)throw new $.ERR_INVALID_ARG_TYPE(e,"number",t)}function Q(t,e,r){if(Math.floor(t)!==t)throw K(t,r),new $.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new $.ERR_BUFFER_OUT_OF_BOUNDS;throw new $.ERR_OUT_OF_RANGE(r||"offset",">= ".concat(r?1:0," and <= ").concat(e),t)}Y("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?"".concat(t," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),Y("ERR_INVALID_ARG_TYPE",function(t,e){return'The "'.concat(t,'" argument must be of type number. Received type ').concat((0,c.default)(e))},TypeError),Y("ERR_OUT_OF_RANGE",function(t,e,r){var n='The value of "'.concat(t,'" is out of range.'),i=r;return Number.isInteger(r)&&Math.abs(r)>Math.pow(2,32)?i=J(String(r)):"bigint"==typeof r&&(i=String(r),(r>Math.pow(BigInt(2),BigInt(32))||r<-Math.pow(BigInt(2),BigInt(32)))&&(i=J(i)),i+="n"),n+" It must be ".concat(e,". Received ").concat(i)},RangeError);var Z=/[^+/0-9A-Za-z-_]/g;function tt(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function et(t){return l.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(Z,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function rt(t,e,r,n){var i;for(i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function nt(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function it(t){return t!=t}var ot=function(){for(var t="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)e[n+i]=t[r]+t[i];return e}();function st(t){return"undefined"==typeof BigInt?ut:t}function ut(){throw new Error("BigInt not supported")}},7526:function(t,e){"use strict";e.byteLength=function(t){var e=u(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,o=u(t),s=o[0],a=o[1],c=new i(function(t,e,r){return 3*(e+r)/4-r}(0,s,a)),f=0,l=a>0?s-4:s;for(r=0;r<l;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],c[f++]=e>>16&255,c[f++]=e>>8&255,c[f++]=255&e;return 2===a&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[f++]=255&e),1===a&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[f++]=e>>8&255,c[f++]=255&e),c},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=16383,u=0,a=n-i;u<a;u+=s)o.push(c(t,u,u+s>a?a:u+s));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function u(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function a(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function c(t,e,r){for(var n,i=[],o=e;o<r;o+=3)n=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),i.push(a(n));return i.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},4945:function(t,e){var r="undefined"!=typeof self?self:this,n=function(){function t(){this.fetch=!1,this.DOMException=r.DOMException}return t.prototype=r,new t}();!function(t){!function(e){var r="URLSearchParams"in t,n="Symbol"in t&&"iterator"in Symbol,i="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),o="FormData"in t,s="ArrayBuffer"in t;if(s)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],a=ArrayBuffer.isView||function(t){return t&&u.indexOf(Object.prototype.toString.call(t))>-1};function c(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function f(t){return"string"!=typeof t&&(t=String(t)),t}function l(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return n&&(e[Symbol.iterator]=function(){return e}),e}function h(t){this.map={},t instanceof h?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function p(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function d(t){return new Promise(function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}})}function y(t){var e=new FileReader,r=d(e);return e.readAsArrayBuffer(t),r}function v(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:i&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:o&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:r&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():s&&i&&(e=t)&&DataView.prototype.isPrototypeOf(e)?(this._bodyArrayBuffer=v(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(t)||a(t))?this._bodyArrayBuffer=v(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var t=p(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var t,e,r,n=p(this);if(n)return n;if(this._bodyBlob)return t=this._bodyBlob,r=d(e=new FileReader),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n<e.length;n++)r[n]=String.fromCharCode(e[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then(w)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(t,e){t=c(t),e=f(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},h.prototype.delete=function(t){delete this.map[c(t)]},h.prototype.get=function(t){return t=c(t),this.has(t)?this.map[t]:null},h.prototype.has=function(t){return this.map.hasOwnProperty(c(t))},h.prototype.set=function(t,e){this.map[c(t)]=f(e)},h.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},h.prototype.keys=function(){var t=[];return this.forEach(function(e,r){t.push(r)}),l(t)},h.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),l(t)},h.prototype.entries=function(){var t=[];return this.forEach(function(e,r){t.push([r,e])}),l(t)},n&&(h.prototype[Symbol.iterator]=h.prototype.entries);var g=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function m(t,e){var r,n,i=(e=e||{}).body;if(t instanceof m){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new h(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,i||null==t._bodyInit||(i=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new h(e.headers)),this.method=(n=(r=e.method||this.method||"GET").toUpperCase(),g.indexOf(n)>-1?n:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function w(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(i))}}),e}function x(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new h(e.headers),this.url=e.url||"",this._initBody(t)}m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},b.call(m.prototype),b.call(x.prototype),x.prototype.clone=function(){return new x(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},x.error=function(){var t=new x(null,{status:0,statusText:""});return t.type="error",t};var _=[301,302,303,307,308];x.redirect=function(t,e){if(-1===_.indexOf(e))throw new RangeError("Invalid status code");return new x(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function S(t,r){return new Promise(function(n,o){var s=new m(t,r);if(s.signal&&s.signal.aborted)return o(new e.DOMException("Aborted","AbortError"));var u=new XMLHttpRequest;function a(){u.abort()}u.onload=function(){var t,e,r={status:u.status,statusText:u.statusText,headers:(t=u.getAllResponseHeaders()||"",e=new h,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(t){var r=t.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();e.append(n,i)}}),e)};r.url="responseURL"in u?u.responseURL:r.headers.get("X-Request-URL");var i="response"in u?u.response:u.responseText;n(new x(i,r))},u.onerror=function(){o(new TypeError("Network request failed"))},u.ontimeout=function(){o(new TypeError("Network request failed"))},u.onabort=function(){o(new e.DOMException("Aborted","AbortError"))},u.open(s.method,s.url,!0),"include"===s.credentials?u.withCredentials=!0:"omit"===s.credentials&&(u.withCredentials=!1),"responseType"in u&&i&&(u.responseType="blob"),s.headers.forEach(function(t,e){u.setRequestHeader(e,t)}),s.signal&&(s.signal.addEventListener("abort",a),u.onreadystatechange=function(){4===u.readyState&&s.signal.removeEventListener("abort",a)}),u.send(void 0===s._bodyInit?null:s._bodyInit)})}S.polyfill=!0,t.fetch||(t.fetch=S,t.Headers=h,t.Request=m,t.Response=x),e.Headers=h,e.Request=m,e.Response=x,e.fetch=S,Object.defineProperty(e,"__esModule",{value:!0})}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;(e=i.fetch).default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e},251:function(t,e){e.read=function(t,e,r,n,i){var o,s,u=8*i-n-1,a=(1<<u)-1,c=a>>1,f=-7,l=r?i-1:0,h=r?-1:1,p=t[e+l];for(l+=h,o=p&(1<<-f)-1,p>>=-f,f+=u;f>0;o=256*o+t[e+l],l+=h,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+t[e+l],l+=h,f-=8);if(0===o)o=1-c;else{if(o===a)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=c}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,u,a,c=8*o-i-1,f=(1<<c)-1,l=f>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(a=Math.pow(2,-s))<1&&(s--,a*=2),(e+=s+l>=1?h/a:h*Math.pow(2,1-l))*a>=2&&(s++,a/=2),s+l>=f?(u=0,s=f):s+l>=1?(u=(e*a-1)*Math.pow(2,i),s+=l):(u=e*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&u,p+=d,u/=256,i-=8);for(s=s<<i|u,c+=i;c>0;t[r+p]=255&s,p+=d,s/=256,c-=8);t[r+p-d]|=128*y}},6765:function(t,e,r){"use strict";function n(t){this.message=t}r.r(e),r.d(e,{InvalidTokenError:function(){return s}}),n.prototype=new Error,n.prototype.name="InvalidCharacterError";var i="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(t){var e=String(t).replace(/=+$/,"");if(e.length%4==1)throw new n("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,i,o=0,s=0,u="";i=e.charAt(s++);~i&&(r=o%4?64*r+i:i,o++%4)?u+=String.fromCharCode(255&r>>(-2*o&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return u};function o(t){var e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}try{return function(t){return decodeURIComponent(i(t).replace(/(.)/g,function(t,e){var r=e.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}(e)}catch(t){return i(e)}}function s(t){this.message=t}s.prototype=new Error,s.prototype.name="InvalidTokenError",e.default=function(t,e){if("string"!=typeof t)throw new s("Invalid token specified");var r=!0===(e=e||{}).header?0:1;try{return JSON.parse(o(t.split(".")[r]))}catch(t){throw new s("Invalid token specified: "+t.message)}}},3114:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(1920),o=r(703),s=function(t){function e(e){t.call(this),this._value=e}return n(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var r=t.prototype._subscribe.call(this,e);return r&&!r.closed&&e.next(this._value),r},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new o.ObjectUnsubscribedError;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},e}(i.Subject);e.BehaviorSubject=s},3246:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=function(t){function e(e,r,n){t.call(this),this.parent=e,this.outerValue=r,this.outerIndex=n,this.index=0}return n(e,t),e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(r(1308).Subscriber);e.InnerSubscriber=i},8037:function(t,e,r){"use strict";var n=r(9707),i=function(){function t(t,e,r){this.kind=t,this.value=e,this.error=r,this.hasValue="N"===t}return t.prototype.observe=function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}},t.prototype.do=function(t,e,r){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return r&&r()}},t.prototype.accept=function(t,e,r){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,r)},t.prototype.toObservable=function(){switch(this.kind){case"N":return n.Observable.of(this.value);case"E":return n.Observable.throw(this.error);case"C":return n.Observable.empty()}throw new Error("unexpected notification kind value")},t.createNext=function(e){return void 0!==e?new t("N",e):t.undefinedValueNotification},t.createError=function(e){return new t("E",void 0,e)},t.createComplete=function(){return t.completeNotification},t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}();e.Notification=i},9707:function(t,e,r){"use strict";var n=r(2901),i=r(5518),o=r(9404),s=r(4053),u=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(t,e,r){var n=this.operator,o=i.toSubscriber(t,e,r);if(n?n.call(o,this.source):o.add(this.source||!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.syncErrorThrown=!0,t.syncErrorValue=e,t.error(e)}},t.prototype.forEach=function(t,e){var r=this;if(e||(n.root.Rx&&n.root.Rx.config&&n.root.Rx.config.Promise?e=n.root.Rx.config.Promise:n.root.Promise&&(e=n.root.Promise)),!e)throw new Error("no Promise impl found");return new e(function(e,n){var i;i=r.subscribe(function(e){if(i)try{t(e)}catch(t){n(t),i.unsubscribe()}else t(e)},n,e)})},t.prototype._subscribe=function(t){return this.source.subscribe(t)},t.prototype[o.observable]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return 0===t.length?this:s.pipeFromArray(t)(this)},t.prototype.toPromise=function(t){var e=this;if(t||(n.root.Rx&&n.root.Rx.config&&n.root.Rx.config.Promise?t=n.root.Rx.config.Promise:n.root.Promise&&(t=n.root.Promise)),!t)throw new Error("no Promise impl found");return new t(function(t,r){var n;e.subscribe(function(t){return n=t},function(t){return r(t)},function(){return t(n)})})},t.create=function(e){return new t(e)},t}();e.Observable=u},5432:function(t,e){"use strict";e.empty={closed:!0,next:function(t){},error:function(t){throw t},complete:function(){}}},7737:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=function(t){function e(){t.apply(this,arguments)}return n(e,t),e.prototype.notifyNext=function(t,e,r,n,i){this.destination.next(e)},e.prototype.notifyError=function(t,e){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(r(1308).Subscriber);e.OuterSubscriber=i},3857:function(t,e){"use strict";var r=function(){function t(e,r){void 0===r&&(r=t.now),this.SchedulerAction=e,this.now=r}return t.prototype.schedule=function(t,e,r){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(r,e)},t.now=Date.now?Date.now:function(){return+new Date},t}();e.Scheduler=r},1920:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(9707),o=r(1308),s=r(8303),u=r(703),a=r(4169),c=r(4429),f=function(t){function e(e){t.call(this,e),this.destination=e}return n(e,t),e}(o.Subscriber);e.SubjectSubscriber=f;var l=function(t){function e(){t.call(this),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}return n(e,t),e.prototype[c.rxSubscriber]=function(){return new f(this)},e.prototype.lift=function(t){var e=new h(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new u.ObjectUnsubscribedError;if(!this.isStopped)for(var e=this.observers,r=e.length,n=e.slice(),i=0;i<r;i++)n[i].next(t)},e.prototype.error=function(t){if(this.closed)throw new u.ObjectUnsubscribedError;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,r=e.length,n=e.slice(),i=0;i<r;i++)n[i].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new u.ObjectUnsubscribedError;this.isStopped=!0;for(var t=this.observers,e=t.length,r=t.slice(),n=0;n<e;n++)r[n].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(e){if(this.closed)throw new u.ObjectUnsubscribedError;return t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){if(this.closed)throw new u.ObjectUnsubscribedError;return this.hasError?(t.error(this.thrownError),s.Subscription.EMPTY):this.isStopped?(t.complete(),s.Subscription.EMPTY):(this.observers.push(t),new a.SubjectSubscription(this,t))},e.prototype.asObservable=function(){var t=new i.Observable;return t.source=this,t},e.create=function(t,e){return new h(t,e)},e}(i.Observable);e.Subject=l;var h=function(t){function e(e,r){t.call(this),this.destination=e,this.source=r}return n(e,t),e.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},e.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):s.Subscription.EMPTY},e}(l);e.AnonymousSubject=h},4169:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=function(t){function e(e,r){t.call(this),this.subject=e,this.subscriber=r,this.closed=!1}return n(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var r=e.indexOf(this.subscriber);-1!==r&&e.splice(r,1)}}},e}(r(8303).Subscription);e.SubjectSubscription=i},1308:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(2497),o=r(8303),s=r(5432),u=r(4429),a=function(t){function e(e,r,n){switch(t.call(this),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=s.empty;break;case 1:if(!e){this.destination=s.empty;break}if("object"==typeof e){if(f(e)){var i=e[u.rxSubscriber]();this.syncErrorThrowable=i.syncErrorThrowable,this.destination=i,i.add(this)}else this.syncErrorThrowable=!0,this.destination=new c(this,e);break}default:this.syncErrorThrowable=!0,this.destination=new c(this,e,r,n)}}return n(e,t),e.prototype[u.rxSubscriber]=function(){return this},e.create=function(t,r,n){var i=new e(t,r,n);return i.syncErrorThrowable=!1,i},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parent,e=this._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=t,this._parents=e,this},e}(o.Subscription);e.Subscriber=a;var c=function(t){function e(e,r,n,o){var u;t.call(this),this._parentSubscriber=e;var a=this;i.isFunction(r)?u=r:r&&(u=r.next,n=r.error,o=r.complete,r!==s.empty&&(a=Object.create(r),i.isFunction(a.unsubscribe)&&this.add(a.unsubscribe.bind(a)),a.unsubscribe=this.unsubscribe.bind(this))),this._context=a,this._next=u,this._error=n,this._complete=o}return n(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber;if(this._error)e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else{if(!e.syncErrorThrowable)throw this.unsubscribe(),t;e.syncErrorValue=t,e.syncErrorThrown=!0,this.unsubscribe()}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var r=function(){return t._complete.call(t._context)};e.syncErrorThrowable?(this.__tryOrSetError(e,r),this.unsubscribe()):(this.__tryOrUnsub(r),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){throw this.unsubscribe(),t}},e.prototype.__tryOrSetError=function(t,e,r){try{e.call(this._context,r)}catch(e){return t.syncErrorValue=e,t.syncErrorThrown=!0,!0}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(a);function f(t){return t instanceof a||"syncErrorThrowable"in t&&t[u.rxSubscriber]}},8303:function(t,e,r){"use strict";var n=r(2208),i=r(9690),o=r(2497),s=r(4181),u=r(7036),a=r(6229),c=function(){function t(t){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}var e;return t.prototype.unsubscribe=function(){var t,e=!1;if(!this.closed){var r=this,c=r._parent,l=r._parents,h=r._unsubscribe,p=r._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var d=-1,y=l?l.length:0;c;)c.remove(this),c=++d<y&&l[d]||null;if(o.isFunction(h)&&s.tryCatch(h).call(this)===u.errorObject&&(e=!0,t=t||(u.errorObject.e instanceof a.UnsubscriptionError?f(u.errorObject.e.errors):[u.errorObject.e])),n.isArray(p))for(d=-1,y=p.length;++d<y;){var v=p[d];if(i.isObject(v)&&s.tryCatch(v.unsubscribe).call(v)===u.errorObject){e=!0,t=t||[];var b=u.errorObject.e;b instanceof a.UnsubscriptionError?t=t.concat(f(b.errors)):t.push(b)}}if(e)throw new a.UnsubscriptionError(t)}},t.prototype.add=function(e){if(!e||e===t.EMPTY)return t.EMPTY;if(e===this)return this;var r=e;switch(typeof e){case"function":r=new t(e);case"object":if(r.closed||"function"!=typeof r.unsubscribe)return r;if(this.closed)return r.unsubscribe(),r;if("function"!=typeof r._addParent){var n=r;(r=new t)._subscriptions=[n]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}return(this._subscriptions||(this._subscriptions=[])).push(r),r._addParent(this),r},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var r=e.indexOf(t);-1!==r&&e.splice(r,1)}},t.prototype._addParent=function(t){var e=this._parent,r=this._parents;e&&e!==t?r?-1===r.indexOf(t)&&r.push(t):this._parents=[t]:this._parent=t},t.EMPTY=((e=new t).closed=!0,e),t}();function f(t){return t.reduce(function(t,e){return t.concat(e instanceof a.UnsubscriptionError?e.errors:e)},[])}e.Subscription=c},4553:function(t,e,r){"use strict";var n=r(9707),i=r(5885);n.Observable.ajax=i.ajax},7033:function(t,e,r){"use strict";var n=r(9707),i=r(8557);n.Observable.empty=i.empty},7694:function(t,e,r){"use strict";var n=r(9707),i=r(8858);n.Observable.from=i.from},5103:function(t,e,r){"use strict";var n=r(9707),i=r(1531);n.Observable.interval=i.interval},3783:function(t,e,r){"use strict";var n=r(9707),i=r(5723);n.Observable.of=i.of},8540:function(t,e,r){"use strict";var n=r(9707),i=r(8867);n.Observable.throw=i._throw},3690:function(t,e,r){"use strict";var n=r(9707),i=r(7046);n.Observable.prototype.catch=i._catch,n.Observable.prototype._catch=i._catch},3071:function(t,e,r){"use strict";var n=r(9707),i=r(3123);n.Observable.prototype.combineLatest=i.combineLatest},4983:function(t,e,r){"use strict";var n=r(9707),i=r(4891);n.Observable.prototype.concatMap=i.concatMap},2166:function(t,e,r){"use strict";var n=r(9707),i=r(970);n.Observable.prototype.count=i.count},298:function(t,e,r){"use strict";var n=r(9707),i=r(4950);n.Observable.prototype.delay=i.delay},3576:function(t,e,r){"use strict";var n=r(9707),i=r(9028);n.Observable.prototype.do=i._do,n.Observable.prototype._do=i._do},1239:function(t,e,r){"use strict";var n=r(9707),i=r(8371);n.Observable.prototype.filter=i.filter},4359:function(t,e,r){"use strict";var n=r(9707),i=r(947);n.Observable.prototype.map=i.map},2639:function(t,e,r){"use strict";var n=r(9707),i=r(8387);n.Observable.prototype.mergeMap=i.mergeMap,n.Observable.prototype.flatMap=i.mergeMap},731:function(t,e,r){"use strict";var n=r(9707),i=r(7015);n.Observable.prototype.retryWhen=i.retryWhen},1734:function(t,e,r){"use strict";var n=r(9707),i=r(8706);n.Observable.prototype.share=i.share},4166:function(t,e,r){"use strict";var n=r(9707),i=r(9618);n.Observable.prototype.take=i.take},3603:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(9707),o=r(3171),s=r(1248),u=function(t){function e(e,r){t.call(this),this.arrayLike=e,this.scheduler=r,r||1!==e.length||(this._isScalar=!0,this.value=e[0])}return n(e,t),e.create=function(t,r){var n=t.length;return 0===n?new s.EmptyObservable:1===n?new o.ScalarObservable(t[0],r):new e(t,r)},e.dispatch=function(t){var e=t.arrayLike,r=t.index,n=t.length,i=t.subscriber;i.closed||(r>=n?i.complete():(i.next(e[r]),t.index=r+1,this.schedule(t)))},e.prototype._subscribe=function(t){var r=this.arrayLike,n=this.scheduler,i=r.length;if(n)return n.schedule(e.dispatch,0,{arrayLike:r,index:0,length:i,subscriber:t});for(var o=0;o<i&&!t.closed;o++)t.next(r[o]);t.complete()},e}(i.Observable);e.ArrayLikeObservable=u},4459:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(9707),o=r(3171),s=r(1248),u=r(7452),a=function(t){function e(e,r){t.call(this),this.array=e,this.scheduler=r,r||1!==e.length||(this._isScalar=!0,this.value=e[0])}return n(e,t),e.create=function(t,r){return new e(t,r)},e.of=function(){for(var t=[],r=0;r<arguments.length;r++)t[r-0]=arguments[r];var n=t[t.length-1];u.isScheduler(n)?t.pop():n=null;var i=t.length;return i>1?new e(t,n):1===i?new o.ScalarObservable(t[0],n):new s.EmptyObservable(n)},e.dispatch=function(t){var e=t.array,r=t.index,n=t.count,i=t.subscriber;r>=n?i.complete():(i.next(e[r]),i.closed||(t.index=r+1,this.schedule(t)))},e.prototype._subscribe=function(t){var r=this.array,n=r.length,i=this.scheduler;if(i)return i.schedule(e.dispatch,0,{array:r,index:0,count:n,subscriber:t});for(var o=0;o<n&&!t.closed;o++)t.next(r[o]);t.complete()},e}(i.Observable);e.ArrayObservable=a},8495:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(1920),o=r(9707),s=r(1308),u=r(8303),a=r(1152),c=function(t){function e(e,r){t.call(this),this.source=e,this.subjectFactory=r,this._refCount=0,this._isComplete=!1}return n(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new u.Subscription).add(this.source.subscribe(new l(this.getSubject(),this))),t.closed?(this._connection=null,t=u.Subscription.EMPTY):this._connection=t),t},e.prototype.refCount=function(){return a.refCount()(this)},e}(o.Observable);e.ConnectableObservable=c;var f=c.prototype;e.connectableObservableDescriptor={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:f._subscribe},_isComplete:{value:f._isComplete,writable:!0},getSubject:{value:f.getSubject},connect:{value:f.connect},refCount:{value:f.refCount}};var l=function(t){function e(e,r){t.call(this,e),this.connectable=r}return n(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(i.SubjectSubscriber);!function(t){function e(e,r){t.call(this,e),this.connectable=r}n(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var r=this.connection,n=t._connection;this.connection=null,!n||r&&n!==r||n.unsubscribe()}}else this.connection=null}}(s.Subscriber)},1248:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=function(t){function e(e){t.call(this),this.scheduler=e}return n(e,t),e.create=function(t){return new e(t)},e.dispatch=function(t){t.subscriber.complete()},e.prototype._subscribe=function(t){var r=this.scheduler;if(r)return r.schedule(e.dispatch,0,{subscriber:t});t.complete()},e}(r(9707).Observable);e.EmptyObservable=i},4631:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=function(t){function e(e,r){t.call(this),this.error=e,this.scheduler=r}return n(e,t),e.create=function(t,r){return new e(t,r)},e.dispatch=function(t){var e=t.error;t.subscriber.error(e)},e.prototype._subscribe=function(t){var r=this.error,n=this.scheduler;if(t.syncErrorThrowable=!0,n)return n.schedule(e.dispatch,0,{error:r,subscriber:t});t.error(r)},e}(r(9707).Observable);e.ErrorObservable=i},7691:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(2208),o=r(8871),s=r(456),u=r(3172),a=r(6529),c=r(4459),f=r(3603),l=r(3763),h=r(9707),p=r(8767),d=r(9404),y=function(t){function e(e,r){t.call(this,null),this.ish=e,this.scheduler=r}return n(e,t),e.create=function(t,r){if(null!=t){if("function"==typeof t[d.observable])return t instanceof h.Observable&&!r?t:new e(t,r);if(i.isArray(t))return new c.ArrayObservable(t,r);if(s.isPromise(t))return new u.PromiseObservable(t,r);if("function"==typeof t[l.iterator]||"string"==typeof t)return new a.IteratorObservable(t,r);if(o.isArrayLike(t))return new f.ArrayLikeObservable(t,r)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")},e.prototype._subscribe=function(t){var e=this.ish,r=this.scheduler;return null==r?e[d.observable]().subscribe(t):e[d.observable]().subscribe(new p.ObserveOnSubscriber(t,r,0))},e}(h.Observable);e.FromObservable=y},502:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(8454),o=r(9707),s=r(1518),u=function(t){function e(e,r){void 0===e&&(e=0),void 0===r&&(r=s.async),t.call(this),this.period=e,this.scheduler=r,(!i.isNumeric(e)||e<0)&&(this.period=0),r&&"function"==typeof r.schedule||(this.scheduler=s.async)}return n(e,t),e.create=function(t,r){return void 0===t&&(t=0),void 0===r&&(r=s.async),new e(t,r)},e.dispatch=function(t){var e=t.index,r=t.subscriber,n=t.period;r.next(e),r.closed||(t.index+=1,this.schedule(t,n))},e.prototype._subscribe=function(t){var r=this.period,n=this.scheduler;t.add(n.schedule(e.dispatch,r,{index:0,subscriber:t,period:r}))},e}(o.Observable);e.IntervalObservable=u},6529:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(2901),o=r(9707),s=r(3763),u=function(t){function e(e,r){if(t.call(this),this.scheduler=r,null==e)throw new Error("iterator cannot be null.");this.iterator=function(t){var e=t[s.iterator];if(!e&&"string"==typeof t)return new a(t);if(!e&&void 0!==t.length)return new c(t);if(!e)throw new TypeError("object is not iterable");return t[s.iterator]()}(e)}return n(e,t),e.create=function(t,r){return new e(t,r)},e.dispatch=function(t){var e=t.index,r=t.hasError,n=t.iterator,i=t.subscriber;if(r)i.error(t.error);else{var o=n.next();o.done?i.complete():(i.next(o.value),t.index=e+1,i.closed?"function"==typeof n.return&&n.return():this.schedule(t))}},e.prototype._subscribe=function(t){var r=this.iterator,n=this.scheduler;if(n)return n.schedule(e.dispatch,0,{index:0,iterator:r,subscriber:t});for(;;){var i=r.next();if(i.done){t.complete();break}if(t.next(i.value),t.closed){"function"==typeof r.return&&r.return();break}}},e}(o.Observable);e.IteratorObservable=u;var a=function(){function t(t,e,r){void 0===e&&(e=0),void 0===r&&(r=t.length),this.str=t,this.idx=e,this.len=r}return t.prototype[s.iterator]=function(){return this},t.prototype.next=function(){return this.idx<this.len?{done:!1,value:this.str.charAt(this.idx++)}:{done:!0,value:void 0}},t}(),c=function(){function t(t,e,r){void 0===e&&(e=0),void 0===r&&(r=function(t){var e,r=+t.length;return isNaN(r)?0:0!==r&&("number"==typeof(e=r)&&i.root.isFinite(e))?(r=function(t){var e=+t;return 0===e||isNaN(e)?e:e<0?-1:1}(r)*Math.floor(Math.abs(r)),r<=0?0:r>f?f:r):r}(t)),this.arr=t,this.idx=e,this.len=r}return t.prototype[s.iterator]=function(){return this},t.prototype.next=function(){return this.idx<this.len?{done:!1,value:this.arr[this.idx++]}:{done:!0,value:void 0}},t}(),f=Math.pow(2,53)-1},3172:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(2901),o=function(t){function e(e,r){t.call(this),this.promise=e,this.scheduler=r}return n(e,t),e.create=function(t,r){return new e(t,r)},e.prototype._subscribe=function(t){var e=this,r=this.promise,n=this.scheduler;if(null==n)this._isScalar?t.closed||(t.next(this.value),t.complete()):r.then(function(r){e.value=r,e._isScalar=!0,t.closed||(t.next(r),t.complete())},function(e){t.closed||t.error(e)}).then(null,function(t){i.root.setTimeout(function(){throw t})});else if(this._isScalar){if(!t.closed)return n.schedule(s,0,{value:this.value,subscriber:t})}else r.then(function(r){e.value=r,e._isScalar=!0,t.closed||t.add(n.schedule(s,0,{value:r,subscriber:t}))},function(e){t.closed||t.add(n.schedule(u,0,{err:e,subscriber:t}))}).then(null,function(t){i.root.setTimeout(function(){throw t})})},e}(r(9707).Observable);function s(t){var e=t.value,r=t.subscriber;r.closed||(r.next(e),r.complete())}function u(t){var e=t.err,r=t.subscriber;r.closed||r.error(e)}e.PromiseObservable=o},3171:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=function(t){function e(e,r){t.call(this),this.value=e,this.scheduler=r,this._isScalar=!0,r&&(this._isScalar=!1)}return n(e,t),e.create=function(t,r){return new e(t,r)},e.dispatch=function(t){var e=t.done,r=t.value,n=t.subscriber;e?n.complete():(n.next(r),n.closed||(t.done=!0,this.schedule(t)))},e.prototype._subscribe=function(t){var r=this.value,n=this.scheduler;if(n)return n.schedule(e.dispatch,0,{done:!1,value:r,subscriber:t});t.next(r),t.closed||t.complete()},e}(r(9707).Observable);e.ScalarObservable=i},6144:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(2901),o=r(4181),s=r(7036),u=r(9707),a=r(1308),c=r(720);function f(){if(i.root.XMLHttpRequest)return new i.root.XMLHttpRequest;if(i.root.XDomainRequest)return new i.root.XDomainRequest;throw new Error("CORS is not supported by your browser")}function l(t,e){return void 0===e&&(e=null),new g({method:"GET",url:t,headers:e})}function h(t,e,r){return new g({method:"POST",url:t,body:e,headers:r})}function p(t,e){return new g({method:"DELETE",url:t,headers:e})}function d(t,e,r){return new g({method:"PUT",url:t,body:e,headers:r})}function y(t,e,r){return new g({method:"PATCH",url:t,body:e,headers:r})}e.ajaxGet=l,e.ajaxPost=h,e.ajaxDelete=p,e.ajaxPut=d,e.ajaxPatch=y;var v=c.map(function(t,e){return t.response});function b(t,e){return v(new g({method:"GET",url:t,responseType:"json",headers:e}))}e.ajaxGetJSON=b;var g=function(t){function e(e){t.call(this);var r={async:!0,createXHR:function(){return this.crossDomain?f.call(this):function(){if(i.root.XMLHttpRequest)return new i.root.XMLHttpRequest;var t=void 0;try{for(var e=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],r=0;r<3;r++)try{if(t=e[r],new i.root.ActiveXObject(t))break}catch(t){}return new i.root.ActiveXObject(t)}catch(t){throw new Error("XMLHttpRequest is not supported by your browser")}}()},crossDomain:!1,withCredentials:!1,headers:{},method:"GET",responseType:"json",timeout:0};if("string"==typeof e)r.url=e;else for(var n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);this.request=r}var r;return n(e,t),e.prototype._subscribe=function(t){return new m(t,this.request)},e.create=((r=function(t){return new e(t)}).get=l,r.post=h,r.delete=p,r.put=d,r.patch=y,r.getJSON=b,r),e}(u.Observable);e.AjaxObservable=g;var m=function(t){function e(e,r){t.call(this,e),this.request=r,this.done=!1;var n=r.headers=r.headers||{};r.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest"),"Content-Type"in n||i.root.FormData&&r.body instanceof i.root.FormData||void 0===r.body||(n["Content-Type"]="application/x-www-form-urlencoded; charset=UTF-8"),r.body=this.serializeBody(r.body,r.headers["Content-Type"]),this.send()}return n(e,t),e.prototype.next=function(t){this.done=!0;var e=this,r=e.xhr,n=e.request,i=e.destination,o=new w(t,r,n);i.next(o)},e.prototype.send=function(){var t=this.request,e=this.request,r=e.user,n=e.method,i=e.url,u=e.async,a=e.password,c=e.headers,f=e.body,l=t.createXHR,h=o.tryCatch(l).call(t);if(h===s.errorObject)this.error(s.errorObject.e);else{if(this.xhr=h,this.setupEvents(h,t),(r?o.tryCatch(h.open).call(h,n,i,u,r,a):o.tryCatch(h.open).call(h,n,i,u))===s.errorObject)return this.error(s.errorObject.e),null;if(u&&(h.timeout=t.timeout,h.responseType=t.responseType),"withCredentials"in h&&(h.withCredentials=!!t.withCredentials),this.setHeaders(h,c),(f?o.tryCatch(h.send).call(h,f):o.tryCatch(h.send).call(h))===s.errorObject)return this.error(s.errorObject.e),null}return h},e.prototype.serializeBody=function(t,e){if(!t||"string"==typeof t)return t;if(i.root.FormData&&t instanceof i.root.FormData)return t;if(e){var r=e.indexOf(";");-1!==r&&(e=e.substring(0,r))}switch(e){case"application/x-www-form-urlencoded":return Object.keys(t).map(function(e){return encodeURIComponent(e)+"="+encodeURIComponent(t[e])}).join("&");case"application/json":return JSON.stringify(t);default:return t}},e.prototype.setHeaders=function(t,e){for(var r in e)e.hasOwnProperty(r)&&t.setRequestHeader(r,e[r])},e.prototype.setupEvents=function(t,e){var r,n,o=e.progressSubscriber;function s(t){var e=s,r=e.subscriber,n=e.progressSubscriber,i=e.request;n&&n.error(t),r.error(new S(this,i))}(t.ontimeout=s,s.request=e,s.subscriber=this,s.progressSubscriber=o,t.upload&&"withCredentials"in t)&&(o&&(r=function(t){r.progressSubscriber.next(t)},i.root.XDomainRequest?t.onprogress=r:t.upload.onprogress=r,r.progressSubscriber=o),n=function(t){var e=n,r=e.progressSubscriber,i=e.subscriber,o=e.request;r&&r.error(t),i.error(new x("ajax error",this,o))},t.onerror=n,n.request=e,n.subscriber=this,n.progressSubscriber=o);function u(t){var e=u,r=e.subscriber,n=e.progressSubscriber,i=e.request;if(4===this.readyState){var o=1223===this.status?204:this.status,s="text"===this.responseType?this.response||this.responseText:this.response;0===o&&(o=s?200:0),200<=o&&o<300?(n&&n.complete(),r.next(t),r.complete()):(n&&n.error(t),r.error(new x("ajax error "+o,this,i)))}}t.onreadystatechange=u,u.subscriber=this,u.progressSubscriber=o,u.request=e},e.prototype.unsubscribe=function(){var e=this.done,r=this.xhr;!e&&r&&4!==r.readyState&&"function"==typeof r.abort&&r.abort(),t.prototype.unsubscribe.call(this)},e}(a.Subscriber);e.AjaxSubscriber=m;var w=function(t,e,r){this.originalEvent=t,this.xhr=e,this.request=r,this.status=e.status,this.responseType=e.responseType||r.responseType,this.response=_(this.responseType,e)};e.AjaxResponse=w;var x=function(t){function e(e,r,n){t.call(this,e),this.message=e,this.xhr=r,this.request=n,this.status=r.status,this.responseType=r.responseType||n.responseType,this.response=_(this.responseType,r)}return n(e,t),e}(Error);function _(t,e){switch(t){case"json":return"response"in e?e.responseType?e.response:JSON.parse(e.response||e.responseText||"null"):JSON.parse(e.responseText||"null");case"xml":return e.responseXML;default:return"response"in e?e.response:e.responseText}}e.AjaxError=x;var S=function(t){function e(e,r){t.call(this,"ajax timeout",e,r)}return n(e,t),e}(x);e.AjaxTimeoutError=S},5885:function(t,e,r){"use strict";var n=r(6144);e.ajax=n.AjaxObservable.create},8557:function(t,e,r){"use strict";var n=r(1248);e.empty=n.EmptyObservable.create},8858:function(t,e,r){"use strict";var n=r(7691);e.from=n.FromObservable.create},1531:function(t,e,r){"use strict";var n=r(502);e.interval=n.IntervalObservable.create},5723:function(t,e,r){"use strict";var n=r(4459);e.of=n.ArrayObservable.of},8867:function(t,e,r){"use strict";var n=r(4631);e._throw=n.ErrorObservable.create},7046:function(t,e,r){"use strict";var n=r(4903);e._catch=function(t){return n.catchError(t)(this)}},3123:function(t,e,r){"use strict";var n=r(8652);e.combineLatest=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return n.combineLatest.apply(void 0,t)(this)}},4891:function(t,e,r){"use strict";var n=r(7024);e.concatMap=function(t,e){return n.concatMap(t,e)(this)}},970:function(t,e,r){"use strict";var n=r(6581);e.count=function(t){return n.count(t)(this)}},4950:function(t,e,r){"use strict";var n=r(1518),i=r(909);e.delay=function(t,e){return void 0===e&&(e=n.async),i.delay(t,e)(this)}},9028:function(t,e,r){"use strict";var n=r(4995);e._do=function(t,e,r){return n.tap(t,e,r)(this)}},8371:function(t,e,r){"use strict";var n=r(9014);e.filter=function(t,e){return n.filter(t,e)(this)}},947:function(t,e,r){"use strict";var n=r(720);e.map=function(t,e){return n.map(t,e)(this)}},8387:function(t,e,r){"use strict";var n=r(9982);e.mergeMap=function(t,e,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),n.mergeMap(t,e,r)(this)}},7015:function(t,e,r){"use strict";var n=r(1020);e.retryWhen=function(t){return n.retryWhen(t)(this)}},8706:function(t,e,r){"use strict";var n=r(5221);e.share=function(){return n.share()(this)}},9618:function(t,e,r){"use strict";var n=r(7207);e.take=function(t){return n.take(t)(this)}},4903:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(7737),o=r(8497);e.catchError=function(t){return function(e){var r=new s(t),n=e.lift(r);return r.caught=n}};var s=function(){function t(t){this.selector=t}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.selector,this.caught))},t}(),u=function(t){function e(e,r,n){t.call(this,e),this.selector=r,this.caught=n}return n(e,t),e.prototype.error=function(e){if(!this.isStopped){var r=void 0;try{r=this.selector(e,this.caught)}catch(e){return void t.prototype.error.call(this,e)}this._unsubscribeAndRecycle(),this.add(o.subscribeToResult(this,r))}},e}(i.OuterSubscriber)},8652:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(4459),o=r(2208),s=r(7737),u=r(8497),a={};e.combineLatest=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];var r=null;return"function"==typeof t[t.length-1]&&(r=t.pop()),1===t.length&&o.isArray(t[0])&&(t=t[0].slice()),function(e){return e.lift.call(new i.ArrayObservable([e].concat(t)),new c(r))}};var c=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new f(t,this.project))},t}();e.CombineLatestOperator=c;var f=function(t){function e(e,r){t.call(this,e),this.project=r,this.active=0,this.values=[],this.observables=[]}return n(e,t),e.prototype._next=function(t){this.values.push(a),this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(var r=0;r<e;r++){var n=t[r];this.add(u.subscribeToResult(this,n,n,r))}}},e.prototype.notifyComplete=function(t){0==(this.active-=1)&&this.destination.complete()},e.prototype.notifyNext=function(t,e,r,n,i){var o=this.values,s=o[r],u=this.toRespond?s===a?--this.toRespond:this.toRespond:0;o[r]=e,0===u&&(this.project?this._tryProject(o):this.destination.next(o.slice()))},e.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(s.OuterSubscriber);e.CombineLatestSubscriber=f},7024:function(t,e,r){"use strict";var n=r(9982);e.concatMap=function(t,e){return n.mergeMap(t,e,1)}},6581:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(1308);e.count=function(t){return function(e){return e.lift(new o(t,e))}};var o=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.predicate,this.source))},t}(),s=function(t){function e(e,r,n){t.call(this,e),this.predicate=r,this.source=n,this.count=0,this.index=0}return n(e,t),e.prototype._next=function(t){this.predicate?this._tryPredicate(t):this.count++},e.prototype._tryPredicate=function(t){var e;try{e=this.predicate(t,this.index++,this.source)}catch(t){return void this.destination.error(t)}e&&this.count++},e.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},e}(i.Subscriber)},909:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(1518),o=r(8697),s=r(1308),u=r(8037);e.delay=function(t,e){void 0===e&&(e=i.async);var r=o.isDate(t)?+t-e.now():Math.abs(t);return function(t){return t.lift(new a(r,e))}};var a=function(){function t(t,e){this.delay=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.delay,this.scheduler))},t}(),c=function(t){function e(e,r,n){t.call(this,e),this.delay=r,this.scheduler=n,this.queue=[],this.active=!1,this.errored=!1}return n(e,t),e.dispatch=function(t){for(var e=t.source,r=e.queue,n=t.scheduler,i=t.destination;r.length>0&&r[0].time-n.now()<=0;)r.shift().notification.observe(i);if(r.length>0){var o=Math.max(0,r[0].time-n.now());this.schedule(t,o)}else this.unsubscribe(),e.active=!1},e.prototype._schedule=function(t){this.active=!0,this.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},e.prototype.scheduleNotification=function(t){if(!0!==this.errored){var e=this.scheduler,r=new f(e.now()+this.delay,t);this.queue.push(r),!1===this.active&&this._schedule(e)}},e.prototype._next=function(t){this.scheduleNotification(u.Notification.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t)},e.prototype._complete=function(){this.scheduleNotification(u.Notification.createComplete())},e}(s.Subscriber),f=function(t,e){this.time=t,this.notification=e}},9014:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(1308);e.filter=function(t,e){return function(r){return r.lift(new o(t,e))}};var o=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.predicate,this.thisArg))},t}(),s=function(t){function e(e,r,n){t.call(this,e),this.predicate=r,this.thisArg=n,this.count=0}return n(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}e&&this.destination.next(t)},e}(i.Subscriber)},720:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(1308);e.map=function(t,e){return function(r){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return r.lift(new o(t,e))}};var o=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.project,this.thisArg))},t}();e.MapOperator=o;var s=function(t){function e(e,r,n){t.call(this,e),this.project=r,this.count=0,this.thisArg=n||this}return n(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(i.Subscriber)},9982:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(8497),o=r(7737);e.mergeMap=function(t,e,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),function(n){return"number"==typeof e&&(r=e,e=null),n.lift(new s(t,e,r))}};var s=function(){function t(t,e,r){void 0===r&&(r=Number.POSITIVE_INFINITY),this.project=t,this.resultSelector=e,this.concurrent=r}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.project,this.resultSelector,this.concurrent))},t}();e.MergeMapOperator=s;var u=function(t){function e(e,r,n,i){void 0===i&&(i=Number.POSITIVE_INFINITY),t.call(this,e),this.project=r,this.resultSelector=n,this.concurrent=i,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}return n(e,t),e.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)},e.prototype._tryNext=function(t){var e,r=this.index++;try{e=this.project(t,r)}catch(t){return void this.destination.error(t)}this.active++,this._innerSub(e,t,r)},e.prototype._innerSub=function(t,e,r){this.add(i.subscribeToResult(this,t,e,r))},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete()},e.prototype.notifyNext=function(t,e,r,n,i){this.resultSelector?this._notifyResultSelector(t,e,r,n):this.destination.next(e)},e.prototype._notifyResultSelector=function(t,e,r,n){var i;try{i=this.resultSelector(t,e,r,n)}catch(t){return void this.destination.error(t)}this.destination.next(i)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(o.OuterSubscriber);e.MergeMapSubscriber=u},6040:function(t,e,r){"use strict";var n=r(8495);e.multicast=function(t,e){return function(r){var o;if(o="function"==typeof t?t:function(){return t},"function"==typeof e)return r.lift(new i(o,e));var s=Object.create(r,n.connectableObservableDescriptor);return s.source=r,s.subjectFactory=o,s}};var i=function(){function t(t,e){this.subjectFactory=t,this.selector=e}return t.prototype.call=function(t,e){var r=this.selector,n=this.subjectFactory(),i=r(n).subscribe(t);return i.add(e.subscribe(n)),i},t}();e.MulticastOperator=i},8767:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(1308),o=r(8037);e.observeOn=function(t,e){return void 0===e&&(e=0),function(r){return r.lift(new s(t,e))}};var s=function(){function t(t,e){void 0===e&&(e=0),this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.scheduler,this.delay))},t}();e.ObserveOnOperator=s;var u=function(t){function e(e,r,n){void 0===n&&(n=0),t.call(this,e),this.scheduler=r,this.delay=n}return n(e,t),e.dispatch=function(t){var e=t.notification,r=t.destination;e.observe(r),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.add(this.scheduler.schedule(e.dispatch,this.delay,new a(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(o.Notification.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(o.Notification.createError(t))},e.prototype._complete=function(){this.scheduleMessage(o.Notification.createComplete())},e}(i.Subscriber);e.ObserveOnSubscriber=u;var a=function(t,e){this.notification=t,this.destination=e};e.ObserveOnMessage=a},1152:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(1308);e.refCount=function(){return function(t){return t.lift(new o(t))}};var o=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var r=this.connectable;r._refCount++;var n=new s(t,r),i=e.subscribe(n);return n.closed||(n.connection=r.connect()),i},t}(),s=function(t){function e(e,r){t.call(this,e),this.connectable=r}return n(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var r=this.connection,n=t._connection;this.connection=null,!n||r&&n!==r||n.unsubscribe()}}else this.connection=null},e}(i.Subscriber)},1020:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(1920),o=r(4181),s=r(7036),u=r(7737),a=r(8497);e.retryWhen=function(t){return function(e){return e.lift(new c(t,e))}};var c=function(){function t(t,e){this.notifier=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new f(t,this.notifier,this.source))},t}(),f=function(t){function e(e,r,n){t.call(this,e),this.notifier=r,this.source=n}return n(e,t),e.prototype.error=function(e){if(!this.isStopped){var r=this.errors,n=this.retries,u=this.retriesSubscription;if(n)this.errors=null,this.retriesSubscription=null;else{if(r=new i.Subject,(n=o.tryCatch(this.notifier)(r))===s.errorObject)return t.prototype.error.call(this,s.errorObject.e);u=a.subscribeToResult(this,n)}this._unsubscribeAndRecycle(),this.errors=r,this.retries=n,this.retriesSubscription=u,r.next(e)}},e.prototype._unsubscribe=function(){var t=this.errors,e=this.retriesSubscription;t&&(t.unsubscribe(),this.errors=null),e&&(e.unsubscribe(),this.retriesSubscription=null),this.retries=null},e.prototype.notifyNext=function(t,e,r,n,i){var o=this,s=o.errors,u=o.retries,a=o.retriesSubscription;this.errors=null,this.retries=null,this.retriesSubscription=null,this._unsubscribeAndRecycle(),this.errors=s,this.retries=u,this.retriesSubscription=a,this.source.subscribe(this)},e}(u.OuterSubscriber)},5221:function(t,e,r){"use strict";var n=r(6040),i=r(1152),o=r(1920);function s(){return new o.Subject}e.share=function(){return function(t){return i.refCount()(n.multicast(s)(t))}}},7207:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(1308),o=r(6280),s=r(1248);e.take=function(t){return function(e){return 0===t?new s.EmptyObservable:e.lift(new u(t))}};var u=function(){function t(t){if(this.total=t,this.total<0)throw new o.ArgumentOutOfRangeError}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.total))},t}(),a=function(t){function e(e,r){t.call(this,e),this.total=r,this.count=0}return n(e,t),e.prototype._next=function(t){var e=this.total,r=++this.count;r<=e&&(this.destination.next(t),r===e&&(this.destination.complete(),this.unsubscribe()))},e}(i.Subscriber)},4995:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(1308);e.tap=function(t,e,r){return function(n){return n.lift(new o(t,e,r))}};var o=function(){function t(t,e,r){this.nextOrObserver=t,this.error=e,this.complete=r}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.nextOrObserver,this.error,this.complete))},t}(),s=function(t){function e(e,r,n,o){t.call(this,e);var s=new i.Subscriber(r,n,o);s.syncErrorThrowable=!0,this.add(s),this.safeSubscriber=s}return n(e,t),e.prototype._next=function(t){var e=this.safeSubscriber;e.next(t),e.syncErrorThrown?this.destination.error(e.syncErrorValue):this.destination.next(t)},e.prototype._error=function(t){var e=this.safeSubscriber;e.error(t),e.syncErrorThrown?this.destination.error(e.syncErrorValue):this.destination.error(t)},e.prototype._complete=function(){var t=this.safeSubscriber;t.complete(),t.syncErrorThrown?this.destination.error(t.syncErrorValue):this.destination.complete()},e}(i.Subscriber)},1578:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=function(t){function e(e,r){t.call(this)}return n(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(r(8303).Subscription);e.Action=i},668:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=r(2901),o=function(t){function e(e,r){t.call(this,e,r),this.scheduler=e,this.pending=!1,this.work=r}return n(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t,this.pending=!0;var r=this.id,n=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(n,r,e)),this.delay=e,this.id=this.id||this.requestAsyncId(n,this.id,e),this},e.prototype.requestAsyncId=function(t,e,r){return void 0===r&&(r=0),i.root.setInterval(t.flush.bind(t,this),r)},e.prototype.recycleAsyncId=function(t,e,r){if(void 0===r&&(r=0),null!==r&&this.delay===r&&!1===this.pending)return e;i.root.clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(t,e);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var r=!1,n=void 0;try{this.work(t)}catch(t){r=!0,n=!!t&&t||new Error(t)}if(r)return this.unsubscribe(),n},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,r=e.actions,n=r.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==n&&r.splice(n,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(r(1578).Action);e.AsyncAction=o},4853:function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=function(t){function e(){t.apply(this,arguments),this.actions=[],this.active=!1,this.scheduled=void 0}return n(e,t),e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var r;this.active=!0;do{if(r=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,r){for(;t=e.shift();)t.unsubscribe();throw r}}},e}(r(3857).Scheduler);e.AsyncScheduler=i},1518:function(t,e,r){"use strict";var n=r(668),i=r(4853);e.async=new i.AsyncScheduler(n.AsyncAction)},3763:function(t,e,r){"use strict";var n=r(2901);function i(t){var e=t.Symbol;if("function"==typeof e)return e.iterator||(e.iterator=e("iterator polyfill")),e.iterator;var r=t.Set;if(r&&"function"==typeof(new r)["@@iterator"])return"@@iterator";var n=t.Map;if(n)for(var i=Object.getOwnPropertyNames(n.prototype),o=0;o<i.length;++o){var s=i[o];if("entries"!==s&&"size"!==s&&n.prototype[s]===n.prototype.entries)return s}return"@@iterator"}e.symbolIteratorPonyfill=i,e.iterator=i(n.root),e.$$iterator=e.iterator},9404:function(t,e,r){"use strict";var n=r(2901);function i(t){var e,r=t.Symbol;return"function"==typeof r?r.observable?e=r.observable:(e=r("observable"),r.observable=e):e="@@observable",e}e.getSymbolObservable=i,e.observable=i(n.root),e.$$observable=e.observable},4429:function(t,e,r){"use strict";var n=r(2901).root.Symbol;e.rxSubscriber="function"==typeof n&&"function"==typeof n.for?n.for("rxSubscriber"):"@@rxSubscriber",e.$$rxSubscriber=e.rxSubscriber},6280:function(t,e){"use strict";var r=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},n=function(t){function e(){var e=t.call(this,"argument out of range");this.name=e.name="ArgumentOutOfRangeError",this.stack=e.stack,this.message=e.message}return r(e,t),e}(Error);e.ArgumentOutOfRangeError=n},703:function(t,e){"use strict";var r=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},n=function(t){function e(){var e=t.call(this,"object unsubscribed");this.name=e.name="ObjectUnsubscribedError",this.stack=e.stack,this.message=e.message}return r(e,t),e}(Error);e.ObjectUnsubscribedError=n},6229:function(t,e){"use strict";var r=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},n=function(t){function e(e){t.call(this),this.errors=e;var r=Error.call(this,e?e.length+" errors occurred during unsubscription:\n "+e.map(function(t,e){return e+1+") "+t.toString()}).join("\n "):"");this.name=r.name="UnsubscriptionError",this.stack=r.stack,this.message=r.message}return r(e,t),e}(Error);e.UnsubscriptionError=n},7036:function(t,e){"use strict";e.errorObject={e:{}}},2208:function(t,e){"use strict";e.isArray=Array.isArray||function(t){return t&&"number"==typeof t.length}},8871:function(t,e){"use strict";e.isArrayLike=function(t){return t&&"number"==typeof t.length}},8697:function(t,e){"use strict";e.isDate=function(t){return t instanceof Date&&!isNaN(+t)}},2497:function(t,e){"use strict";e.isFunction=function(t){return"function"==typeof t}},8454:function(t,e,r){"use strict";var n=r(2208);e.isNumeric=function(t){return!n.isArray(t)&&t-parseFloat(t)+1>=0}},9690:function(t,e){"use strict";e.isObject=function(t){return null!=t&&"object"==typeof t}},456:function(t,e){"use strict";e.isPromise=function(t){return t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}},7452:function(t,e){"use strict";e.isScheduler=function(t){return t&&"function"==typeof t.schedule}},893:function(t,e){"use strict";e.noop=function(){}},4053:function(t,e,r){"use strict";var n=r(893);function i(t){return t?1===t.length?t[0]:function(e){return t.reduce(function(t,e){return e(t)},e)}:n.noop}e.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return i(t)},e.pipeFromArray=i},2901:function(t,e,r){"use strict";var n="undefined"!=typeof window&&window,i="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,o=void 0!==r.g&&r.g,s=n||o||i;e.root=s,function(){if(!s)throw new Error("RxJS could not find any global context (window, self, global)")}()},8497:function(t,e,r){"use strict";var n=r(2901),i=r(8871),o=r(456),s=r(9690),u=r(9707),a=r(3763),c=r(3246),f=r(9404);e.subscribeToResult=function(t,e,r,l){var h=new c.InnerSubscriber(t,r,l);if(h.closed)return null;if(e instanceof u.Observable)return e._isScalar?(h.next(e.value),h.complete(),null):(h.syncErrorThrowable=!0,e.subscribe(h));if(i.isArrayLike(e)){for(var p=0,d=e.length;p<d&&!h.closed;p++)h.next(e[p]);h.closed||h.complete()}else{if(o.isPromise(e))return e.then(function(t){h.closed||(h.next(t),h.complete())},function(t){return h.error(t)}).then(null,function(t){n.root.setTimeout(function(){throw t})}),h;if(e&&"function"==typeof e[a.iterator])for(var y=e[a.iterator]();;){var v=y.next();if(v.done){h.complete();break}if(h.next(v.value),h.closed)break}else if(e&&"function"==typeof e[f.observable]){var b=e[f.observable]();if("function"==typeof b.subscribe)return b.subscribe(new c.InnerSubscriber(t,r,l));h.error(new TypeError("Provided object does not correctly implement Symbol.observable"))}else{var g="You provided "+(s.isObject(e)?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.";h.error(new TypeError(g))}}return null}},5518:function(t,e,r){"use strict";var n=r(1308),i=r(4429),o=r(5432);e.toSubscriber=function(t,e,r){if(t){if(t instanceof n.Subscriber)return t;if(t[i.rxSubscriber])return t[i.rxSubscriber]()}return t||e||r?new n.Subscriber(t,e,r):new n.Subscriber(o.empty)}},4181:function(t,e,r){"use strict";var n,i=r(7036);function o(){try{return n.apply(this,arguments)}catch(t){return i.errorObject.e=t,i.errorObject}}e.tryCatch=function(t){return n=t,o}},8318:function(t,e,r){!function(t){"use strict";var e,r=function(){try{if(t.URLSearchParams&&"bar"===new t.URLSearchParams("foo=bar").get("foo"))return t.URLSearchParams}catch(t){}return null}(),n=r&&"a=1"===new r({a:1}).toString(),i=r&&"+"===new r("s=%2B").get("s"),o=r&&"size"in r.prototype,s="__URLSearchParams__",u=!r||((e=new r).append("s"," &"),"s=+%26"===e.toString()),a=p.prototype,c=!(!t.Symbol||!t.Symbol.iterator);if(!(r&&n&&i&&u&&o)){a.append=function(t,e){g(this[s],t,e)},a.delete=function(t){delete this[s][t]},a.get=function(t){var e=this[s];return this.has(t)?e[t][0]:null},a.getAll=function(t){var e=this[s];return this.has(t)?e[t].slice(0):[]},a.has=function(t){return w(this[s],t)},a.set=function(t,e){this[s][t]=[""+e]},a.toString=function(){var t,e,r,n,i=this[s],o=[];for(e in i)for(r=d(e),t=0,n=i[e];t<n.length;t++)o.push(r+"="+d(n[t]));return o.join("&")};var f,l=t.Proxy&&r&&(!i||!u||!n||!o);l?(f=new Proxy(r,{construct:function(t,e){return new t(new p(e[0]).toString())}})).toString=Function.prototype.toString.bind(p):f=p,Object.defineProperty(t,"URLSearchParams",{value:f});var h=t.URLSearchParams.prototype;h.polyfill=!0,!l&&t.Symbol&&(h[t.Symbol.toStringTag]="URLSearchParams"),"forEach"in h||(h.forEach=function(t,e){var r=b(this.toString());Object.getOwnPropertyNames(r).forEach(function(n){r[n].forEach(function(r){t.call(e,r,n,this)},this)},this)}),"sort"in h||(h.sort=function(){var t,e,r,n=b(this.toString()),i=[];for(t in n)i.push(t);for(i.sort(),e=0;e<i.length;e++)this.delete(i[e]);for(e=0;e<i.length;e++){var o=i[e],s=n[o];for(r=0;r<s.length;r++)this.append(o,s[r])}}),"keys"in h||(h.keys=function(){var t=[];return this.forEach(function(e,r){t.push(r)}),v(t)}),"values"in h||(h.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),v(t)}),"entries"in h||(h.entries=function(){var t=[];return this.forEach(function(e,r){t.push([r,e])}),v(t)}),c&&(h[t.Symbol.iterator]=h[t.Symbol.iterator]||h.entries),"size"in h||Object.defineProperty(h,"size",{get:function(){var t=b(this.toString());if(h===this)throw new TypeError("Illegal invocation at URLSearchParams.invokeGetter");return Object.keys(t).reduce(function(e,r){return e+t[r].length},0)}})}function p(t){((t=t||"")instanceof URLSearchParams||t instanceof p)&&(t=t.toString()),this[s]=b(t)}function d(t){var e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'\(\)~]|%20|%00/g,function(t){return e[t]})}function y(t){return t.replace(/[ +]/g,"%20").replace(/(%[a-f0-9]{2})+/gi,function(t){return decodeURIComponent(t)})}function v(e){var r={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return c&&(r[t.Symbol.iterator]=function(){return r}),r}function b(t){var e={};if("object"==typeof t)if(m(t))for(var r=0;r<t.length;r++){var n=t[r];if(!m(n)||2!==n.length)throw new TypeError("Failed to construct 'URLSearchParams': Sequence initializer must only contain pair elements");g(e,n[0],n[1])}else for(var i in t)t.hasOwnProperty(i)&&g(e,i,t[i]);else{0===t.indexOf("?")&&(t=t.slice(1));for(var o=t.split("&"),s=0;s<o.length;s++){var u=o[s],a=u.indexOf("=");-1<a?g(e,y(u.slice(0,a)),y(u.slice(a+1))):u&&g(e,y(u),"")}}return e}function g(t,e,r){var n="string"==typeof r?r:null!=r&&"function"==typeof r.toString?r.toString():JSON.stringify(r);w(t,e)?t[e].push(n):t[e]=[n]}function m(t){return!!t&&"[object Array]"===Object.prototype.toString.call(t)}function w(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}(void 0!==r.g?r.g:"undefined"!=typeof window?window:this)},5172:function(t){t.exports=function(t,e){this.v=t,this.k=e},t.exports.__esModule=!0,t.exports.default=t.exports},79:function(t){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n},t.exports.__esModule=!0,t.exports.default=t.exports},2987:function(t){t.exports=function(t){if(Array.isArray(t))return t},t.exports.__esModule=!0,t.exports.default=t.exports},5901:function(t,e,r){var n=r(79);t.exports=function(t){if(Array.isArray(t))return n(t)},t.exports.__esModule=!0,t.exports.default=t.exports},2475:function(t){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.__esModule=!0,t.exports.default=t.exports},9293:function(t){function e(t,e,r,n,i,o,s){try{var u=t[o](s),a=u.value}catch(t){return void r(t)}u.done?e(a):Promise.resolve(a).then(n,i)}t.exports=function(t){return function(){var r=this,n=arguments;return new Promise(function(i,o){var s=t.apply(r,n);function u(t){e(s,i,o,u,a,"next",t)}function a(t){e(s,i,o,u,a,"throw",t)}u(void 0)})}},t.exports.__esModule=!0,t.exports.default=t.exports},7383:function(t){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports},4579:function(t,e,r){var n=r(7736);function i(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,n(i.key),i)}}t.exports=function(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports},3693:function(t,e,r){var n=r(7736);t.exports=function(t,e,r){return(e=n(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},t.exports.__esModule=!0,t.exports.default=t.exports},2395:function(t,e,r){var n=r(9552);function i(){return t.exports=i="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var i=n(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},t.exports.__esModule=!0,t.exports.default=t.exports,i.apply(null,arguments)}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},3072:function(t){function e(r){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},9511:function(t,e,r){var n=r(5636);t.exports=function(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&n(t,e)},t.exports.__esModule=!0,t.exports.default=t.exports},4994:function(t){t.exports=function(t){return t&&t.__esModule?t:{default:t}},t.exports.__esModule=!0,t.exports.default=t.exports},9291:function(t){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.__esModule=!0,t.exports.default=t.exports},1156:function(t){t.exports=function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,s,u=[],a=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;a=!1}else for(;!(a=(n=o.call(r)).done)&&(u.push(n.value),u.length!==e);a=!0);}catch(t){c=!0,i=t}finally{try{if(!a&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw i}}return u}},t.exports.__esModule=!0,t.exports.default=t.exports},7752:function(t){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},1869:function(t){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},1847:function(t,e,r){var n=r(4893);t.exports=function(t,e){if(null==t)return{};var r,i,o=n(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],-1===e.indexOf(r)&&{}.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o},t.exports.__esModule=!0,t.exports.default=t.exports},4893:function(t){t.exports=function(t,e){if(null==t)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(-1!==e.indexOf(n))continue;r[n]=t[n]}return r},t.exports.__esModule=!0,t.exports.default=t.exports},8452:function(t,e,r){var n=r(3738).default,i=r(2475);t.exports=function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return i(t)},t.exports.__esModule=!0,t.exports.default=t.exports},6993:function(t,e,r){var n=r(5546);function i(){var e,r,o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",u=o.toStringTag||"@@toStringTag";function a(t,i,o,s){var u=i&&i.prototype instanceof f?i:f,a=Object.create(u.prototype);return n(a,"_invoke",function(t,n,i){var o,s,u,a=0,f=i||[],l=!1,h={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return o=t,s=0,u=e,h.n=r,c}};function p(t,n){for(s=t,u=n,r=0;!l&&a&&!i&&r<f.length;r++){var i,o=f[r],p=h.p,d=o[2];t>3?(i=d===n)&&(u=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=t<2&&p<o[1])?(s=0,h.v=n,h.n=o[1]):p<d&&(i=t<3||o[0]>n||n>d)&&(o[4]=t,o[5]=n,h.n=d,s=0))}if(i||t>1)return c;throw l=!0,n}return function(i,f,d){if(a>1)throw TypeError("Generator is already running");for(l&&1===f&&p(f,d),s=f,u=d;(r=s<2?e:u)||!l;){o||(s?s<3?(s>1&&(h.n=-1),p(s,u)):h.n=u:h.v=u);try{if(a=2,o){if(s||(i="next"),r=o[i]){if(!(r=r.call(o,u)))throw TypeError("iterator result is not an object");if(!r.done)return r;u=r.value,s<2&&(s=0)}else 1===s&&(r=o.return)&&r.call(o),s<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((r=(l=h.n<0)?u:t.call(n,h))!==c)break}catch(t){o=e,s=1,u=t}finally{a=1}}return{value:r,done:l}}}(t,o,s),!0),a}var c={};function f(){}function l(){}function h(){}r=Object.getPrototypeOf;var p=[][s]?r(r([][s]())):(n(r={},s,function(){return this}),r),d=h.prototype=f.prototype=Object.create(p);function y(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,n(t,u,"GeneratorFunction")),t.prototype=Object.create(d),t}return l.prototype=h,n(d,"constructor",h),n(h,"constructor",l),l.displayName="GeneratorFunction",n(h,u,"GeneratorFunction"),n(d),n(d,u,"Generator"),n(d,s,function(){return this}),n(d,"toString",function(){return"[object Generator]"}),(t.exports=i=function(){return{w:a,m:y}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},5869:function(t,e,r){var n=r(887);t.exports=function(t,e,r,i,o){var s=n(t,e,r,i,o);return s.next().then(function(t){return t.done?t.value:s.next()})},t.exports.__esModule=!0,t.exports.default=t.exports},887:function(t,e,r){var n=r(6993),i=r(1791);t.exports=function(t,e,r,o,s){return new i(n().w(t,e,r,o),s||Promise)},t.exports.__esModule=!0,t.exports.default=t.exports},1791:function(t,e,r){var n=r(5172),i=r(5546);t.exports=function t(e,r){function o(t,i,s,u){try{var a=e[t](i),c=a.value;return c instanceof n?r.resolve(c.v).then(function(t){o("next",t,s,u)},function(t){o("throw",t,s,u)}):r.resolve(c).then(function(t){a.value=t,s(a)},function(t){return o("throw",t,s,u)})}catch(t){u(t)}}var s;this.next||(i(t.prototype),i(t.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),i(this,"_invoke",function(t,e,n){function i(){return new r(function(e,r){o(t,n,e,r)})}return s=s?s.then(i,i):i()},!0)},t.exports.__esModule=!0,t.exports.default=t.exports},5546:function(t){function e(r,n,i,o){var s=Object.defineProperty;try{s({},"",{})}catch(r){s=0}t.exports=e=function(t,r,n,i){function o(r,n){e(t,r,function(t){return this._invoke(r,n,t)})}r?s?s(t,r,{value:n,enumerable:!i,configurable:!i,writable:!i}):t[r]=n:(o("next",0),o("throw",1),o("return",2))},t.exports.__esModule=!0,t.exports.default=t.exports,e(r,n,i,o)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},4373:function(t){t.exports=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},t.exports.__esModule=!0,t.exports.default=t.exports},4633:function(t,e,r){var n=r(5172),i=r(6993),o=r(5869),s=r(887),u=r(1791),a=r(4373),c=r(579);function f(){"use strict";var e=i(),r=e.m(f),l=(Object.getPrototypeOf?Object.getPrototypeOf(r):r.__proto__).constructor;function h(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===l||"GeneratorFunction"===(e.displayName||e.name))}var p={throw:1,return:2,break:3,continue:3};function d(t){var e,r;return function(n){e||(e={stop:function(){return r(n.a,2)},catch:function(){return n.v},abrupt:function(t,e){return r(n.a,p[t],e)},delegateYield:function(t,i,o){return e.resultName=i,r(n.d,c(t),o)},finish:function(t){return r(n.f,t)}},r=function(t,r,i){n.p=e.prev,n.n=e.next;try{return t(r,i)}finally{e.next=n.n}}),e.resultName&&(e[e.resultName]=n.v,e.resultName=void 0),e.sent=n.v,e.next=n.n;try{return t.call(this,e)}finally{n.p=e.prev,n.n=e.next}}}return(t.exports=f=function(){return{wrap:function(t,r,n,i){return e.w(d(t),r,n,i&&i.reverse())},isGeneratorFunction:h,mark:e.m,awrap:function(t,e){return new n(t,e)},AsyncIterator:u,async:function(t,e,r,n,i){return(h(e)?s:o)(d(t),e,r,n,i)},keys:a,values:c}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=f,t.exports.__esModule=!0,t.exports.default=t.exports},579:function(t,e,r){var n=r(3738).default;t.exports=function(t){if(null!=t){var e=t["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}}throw new TypeError(n(t)+" is not iterable")},t.exports.__esModule=!0,t.exports.default=t.exports},5636:function(t){function e(r,n){return t.exports=e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r,n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},5715:function(t,e,r){var n=r(2987),i=r(1156),o=r(7122),s=r(7752);t.exports=function(t,e){return n(t)||i(t,e)||o(t,e)||s()},t.exports.__esModule=!0,t.exports.default=t.exports},9552:function(t,e,r){var n=r(3072);t.exports=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=n(t)););return t},t.exports.__esModule=!0,t.exports.default=t.exports},8053:function(t,e,r){var n=r(2987),i=r(9291),o=r(7122),s=r(7752);t.exports=function(t){return n(t)||i(t)||o(t)||s()},t.exports.__esModule=!0,t.exports.default=t.exports},1132:function(t,e,r){var n=r(5901),i=r(9291),o=r(7122),s=r(1869);t.exports=function(t){return n(t)||i(t)||o(t)||s()},t.exports.__esModule=!0,t.exports.default=t.exports},9045:function(t,e,r){var n=r(3738).default;t.exports=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)},t.exports.__esModule=!0,t.exports.default=t.exports},7736:function(t,e,r){var n=r(3738).default,i=r(9045);t.exports=function(t){var e=i(t,"string");return"symbol"==n(e)?e:e+""},t.exports.__esModule=!0,t.exports.default=t.exports},3738:function(t){function e(r){return t.exports=e="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.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},7122:function(t,e,r){var n=r(79);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports},4756:function(t,e,r){var n=r(4633)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},780:function(t,e,r){"use strict";var n=r(2473);r(7628),r(3799),t.exports=n},6398:function(t,e,r){"use strict";r(67),r(3792),r(6099),r(3362),r(6167),r(3518),r(1689),r(4628),r(9391),r(7764);var n=r(9167);t.exports=n.Promise},5781:function(t,e,r){"use strict";t.exports=r(911)},911:function(t,e,r){"use strict";var n=r(780);r(9806),r(5874),r(7575),t.exports=n},9306:function(t,e,r){"use strict";var n=r(4901),i=r(6823),o=TypeError;t.exports=function(t){if(n(t))return t;throw new o(i(t)+" is not a function")}},5548:function(t,e,r){"use strict";var n=r(3517),i=r(6823),o=TypeError;t.exports=function(t){if(n(t))return t;throw new o(i(t)+" is not a constructor")}},3506:function(t,e,r){"use strict";var n=r(3925),i=String,o=TypeError;t.exports=function(t){if(n(t))return t;throw new o("Can't set "+i(t)+" as a prototype")}},6469:function(t,e,r){"use strict";var n=r(8227),i=r(2360),o=r(4913).f,s=n("unscopables"),u=Array.prototype;void 0===u[s]&&o(u,s,{configurable:!0,value:i(null)}),t.exports=function(t){u[s][t]=!0}},679:function(t,e,r){"use strict";var n=r(1625),i=TypeError;t.exports=function(t,e){if(n(e,t))return t;throw new i("Incorrect invocation")}},8551:function(t,e,r){"use strict";var n=r(34),i=String,o=TypeError;t.exports=function(t){if(n(t))return t;throw new o(i(t)+" is not an object")}},9617:function(t,e,r){"use strict";var n=r(5397),i=r(5610),o=r(6198),s=function(t){return function(e,r,s){var u=n(e),a=o(u);if(0===a)return!t&&-1;var c,f=i(s,a);if(t&&r!=r){for(;a>f;)if((c=u[f++])!=c)return!0}else for(;a>f;f++)if((t||f in u)&&u[f]===r)return t||f||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},7680:function(t,e,r){"use strict";var n=r(9504);t.exports=n([].slice)},4428:function(t,e,r){"use strict";var n=r(8227)("iterator"),i=!1;try{var o=0,s={next:function(){return{done:!!o++}},return:function(){i=!0}};s[n]=function(){return this},Array.from(s,function(){throw 2})}catch(t){}t.exports=function(t,e){try{if(!e&&!i)return!1}catch(t){return!1}var r=!1;try{var o={};o[n]=function(){return{next:function(){return{done:r=!0}}}},t(o)}catch(t){}return r}},2195:function(t,e,r){"use strict";var n=r(9504),i=n({}.toString),o=n("".slice);t.exports=function(t){return o(i(t),8,-1)}},6955:function(t,e,r){"use strict";var n=r(2140),i=r(4901),o=r(2195),s=r(8227)("toStringTag"),u=Object,a="Arguments"===o(function(){return arguments}());t.exports=n?o:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=u(t),s))?r:a?o(e):"Object"===(n=o(e))&&i(e.callee)?"Arguments":n}},7740:function(t,e,r){"use strict";var n=r(9297),i=r(5031),o=r(7347),s=r(4913);t.exports=function(t,e,r){for(var u=i(e),a=s.f,c=o.f,f=0;f<u.length;f++){var l=u[f];n(t,l)||r&&n(r,l)||a(t,l,c(e,l))}}},2211:function(t,e,r){"use strict";var n=r(9039);t.exports=!n(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})},2529:function(t){"use strict";t.exports=function(t,e){return{value:t,done:e}}},6699:function(t,e,r){"use strict";var n=r(3724),i=r(4913),o=r(6980);t.exports=n?function(t,e,r){return i.f(t,e,o(1,r))}:function(t,e,r){return t[e]=r,t}},6980:function(t){"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},2106:function(t,e,r){"use strict";var n=r(283),i=r(4913);t.exports=function(t,e,r){return r.get&&n(r.get,e,{getter:!0}),r.set&&n(r.set,e,{setter:!0}),i.f(t,e,r)}},6840:function(t,e,r){"use strict";var n=r(4901),i=r(4913),o=r(283),s=r(9433);t.exports=function(t,e,r,u){u||(u={});var a=u.enumerable,c=void 0!==u.name?u.name:e;if(n(r)&&o(r,c,u),u.global)a?t[e]=r:s(e,r);else{try{u.unsafe?t[e]&&(a=!0):delete t[e]}catch(t){}a?t[e]=r:i.f(t,e,{value:r,enumerable:!1,configurable:!u.nonConfigurable,writable:!u.nonWritable})}return t}},9433:function(t,e,r){"use strict";var n=r(4576),i=Object.defineProperty;t.exports=function(t,e){try{i(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},3724:function(t,e,r){"use strict";var n=r(9039);t.exports=!n(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},4055:function(t,e,r){"use strict";var n=r(4576),i=r(34),o=n.document,s=i(o)&&i(o.createElement);t.exports=function(t){return s?o.createElement(t):{}}},7400:function(t){"use strict";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}},9296:function(t,e,r){"use strict";var n=r(4055)("span").classList,i=n&&n.constructor&&n.constructor.prototype;t.exports=i===Object.prototype?void 0:i},8727:function(t){"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},4265:function(t,e,r){"use strict";var n=r(2839);t.exports=/ipad|iphone|ipod/i.test(n)&&"undefined"!=typeof Pebble},9544:function(t,e,r){"use strict";var n=r(2839);t.exports=/ipad|iphone|ipod/i.test(n)&&/applewebkit/i.test(n)},8574:function(t,e,r){"use strict";var n=r(4215);t.exports="NODE"===n},7860:function(t,e,r){"use strict";var n=r(2839);t.exports=/web0s(?!.*chrome)/i.test(n)},2839:function(t,e,r){"use strict";var n=r(4576).navigator,i=n&&n.userAgent;t.exports=i?String(i):""},9519:function(t,e,r){"use strict";var n,i,o=r(4576),s=r(2839),u=o.process,a=o.Deno,c=u&&u.versions||a&&a.version,f=c&&c.v8;f&&(i=(n=f.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&s&&(!(n=s.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=s.match(/Chrome\/(\d+)/))&&(i=+n[1]),t.exports=i},4215:function(t,e,r){"use strict";var n=r(4576),i=r(2839),o=r(2195),s=function(t){return i.slice(0,t.length)===t};t.exports=s("Bun/")?"BUN":s("Cloudflare-Workers")?"CLOUDFLARE":s("Deno/")?"DENO":s("Node.js/")?"NODE":n.Bun&&"string"==typeof Bun.version?"BUN":n.Deno&&"object"==typeof Deno.version?"DENO":"process"===o(n.process)?"NODE":n.window&&n.document?"BROWSER":"REST"},6193:function(t,e,r){"use strict";var n=r(9504),i=Error,o=n("".replace),s=String(new i("zxcasd").stack),u=/\n\s*at [^:]*:[^\n]*/,a=u.test(s);t.exports=function(t,e){if(a&&"string"==typeof t&&!i.prepareStackTrace)for(;e--;)t=o(t,u,"");return t}},747:function(t,e,r){"use strict";var n=r(6699),i=r(6193),o=r(4659),s=Error.captureStackTrace;t.exports=function(t,e,r,u){o&&(s?s(t,e):n(t,"stack",i(r,u)))}},4659:function(t,e,r){"use strict";var n=r(9039),i=r(6980);t.exports=!n(function(){var t=new Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",i(1,7)),7!==t.stack)})},6518:function(t,e,r){"use strict";var n=r(4576),i=r(7347).f,o=r(6699),s=r(6840),u=r(9433),a=r(7740),c=r(2796);t.exports=function(t,e){var r,f,l,h,p,d=t.target,y=t.global,v=t.stat;if(r=y?n:v?n[d]||u(d,{}):n[d]&&n[d].prototype)for(f in e){if(h=e[f],l=t.dontCallGetSet?(p=i(r,f))&&p.value:r[f],!c(y?f:d+(v?".":"#")+f,t.forced)&&void 0!==l){if(typeof h==typeof l)continue;a(h,l)}(t.sham||l&&l.sham)&&o(h,"sham",!0),s(r,f,h,t)}}},9039:function(t){"use strict";t.exports=function(t){try{return!!t()}catch(t){return!0}}},8745:function(t,e,r){"use strict";var n=r(616),i=Function.prototype,o=i.apply,s=i.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?s.bind(o):function(){return s.apply(o,arguments)})},6080:function(t,e,r){"use strict";var n=r(7476),i=r(9306),o=r(616),s=n(n.bind);t.exports=function(t,e){return i(t),void 0===e?t:o?s(t,e):function(){return t.apply(e,arguments)}}},616:function(t,e,r){"use strict";var n=r(9039);t.exports=!n(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})},9565:function(t,e,r){"use strict";var n=r(616),i=Function.prototype.call;t.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},350:function(t,e,r){"use strict";var n=r(3724),i=r(9297),o=Function.prototype,s=n&&Object.getOwnPropertyDescriptor,u=i(o,"name"),a=u&&"something"===function(){}.name,c=u&&(!n||n&&s(o,"name").configurable);t.exports={EXISTS:u,PROPER:a,CONFIGURABLE:c}},6706:function(t,e,r){"use strict";var n=r(9504),i=r(9306);t.exports=function(t,e,r){try{return n(i(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}}},7476:function(t,e,r){"use strict";var n=r(2195),i=r(9504);t.exports=function(t){if("Function"===n(t))return i(t)}},9504:function(t,e,r){"use strict";var n=r(616),i=Function.prototype,o=i.call,s=n&&i.bind.bind(o,o);t.exports=n?s:function(t){return function(){return o.apply(t,arguments)}}},7751:function(t,e,r){"use strict";var n=r(4576),i=r(4901);t.exports=function(t,e){return arguments.length<2?(r=n[t],i(r)?r:void 0):n[t]&&n[t][e];var r}},851:function(t,e,r){"use strict";var n=r(6955),i=r(5966),o=r(4117),s=r(6269),u=r(8227)("iterator");t.exports=function(t){if(!o(t))return i(t,u)||i(t,"@@iterator")||s[n(t)]}},81:function(t,e,r){"use strict";var n=r(9565),i=r(9306),o=r(8551),s=r(6823),u=r(851),a=TypeError;t.exports=function(t,e){var r=arguments.length<2?u(t):e;if(i(r))return o(n(r,t));throw new a(s(t)+" is not iterable")}},5966:function(t,e,r){"use strict";var n=r(9306),i=r(4117);t.exports=function(t,e){var r=t[e];return i(r)?void 0:n(r)}},4576:function(t,e,r){"use strict";var n=function(t){return t&&t.Math===Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9297:function(t,e,r){"use strict";var n=r(9504),i=r(8981),o=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},421:function(t){"use strict";t.exports={}},3138:function(t){"use strict";t.exports=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}}},397:function(t,e,r){"use strict";var n=r(7751);t.exports=n("document","documentElement")},5917:function(t,e,r){"use strict";var n=r(3724),i=r(9039),o=r(4055);t.exports=!n&&!i(function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a})},7055:function(t,e,r){"use strict";var n=r(9504),i=r(9039),o=r(2195),s=Object,u=n("".split);t.exports=i(function(){return!s("z").propertyIsEnumerable(0)})?function(t){return"String"===o(t)?u(t,""):s(t)}:s},3706:function(t,e,r){"use strict";var n=r(9504),i=r(4901),o=r(7629),s=n(Function.toString);i(o.inspectSource)||(o.inspectSource=function(t){return s(t)}),t.exports=o.inspectSource},7584:function(t,e,r){"use strict";var n=r(34),i=r(6699);t.exports=function(t,e){n(e)&&"cause"in e&&i(t,"cause",e.cause)}},1181:function(t,e,r){"use strict";var n,i,o,s=r(8622),u=r(4576),a=r(34),c=r(6699),f=r(9297),l=r(7629),h=r(6119),p=r(421),d="Object already initialized",y=u.TypeError,v=u.WeakMap;if(s||l.state){var b=l.state||(l.state=new v);b.get=b.get,b.has=b.has,b.set=b.set,n=function(t,e){if(b.has(t))throw new y(d);return e.facade=t,b.set(t,e),e},i=function(t){return b.get(t)||{}},o=function(t){return b.has(t)}}else{var g=h("state");p[g]=!0,n=function(t,e){if(f(t,g))throw new y(d);return e.facade=t,c(t,g,e),e},i=function(t){return f(t,g)?t[g]:{}},o=function(t){return f(t,g)}}t.exports={set:n,get:i,has:o,enforce:function(t){return o(t)?i(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!a(e)||(r=i(e)).type!==t)throw new y("Incompatible receiver, "+t+" required");return r}}}},4209:function(t,e,r){"use strict";var n=r(8227),i=r(6269),o=n("iterator"),s=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||s[o]===t)}},4901:function(t){"use strict";var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},3517:function(t,e,r){"use strict";var n=r(9504),i=r(9039),o=r(4901),s=r(6955),u=r(7751),a=r(3706),c=function(){},f=u("Reflect","construct"),l=/^\s*(?:class|function)\b/,h=n(l.exec),p=!l.test(c),d=function(t){if(!o(t))return!1;try{return f(c,[],t),!0}catch(t){return!1}},y=function(t){if(!o(t))return!1;switch(s(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!h(l,a(t))}catch(t){return!0}};y.sham=!0,t.exports=!f||i(function(){var t;return d(d.call)||!d(Object)||!d(function(){t=!0})||t})?y:d},2796:function(t,e,r){"use strict";var n=r(9039),i=r(4901),o=/#|\.prototype\./,s=function(t,e){var r=a[u(t)];return r===f||r!==c&&(i(e)?n(e):!!e)},u=s.normalize=function(t){return String(t).replace(o,".").toLowerCase()},a=s.data={},c=s.NATIVE="N",f=s.POLYFILL="P";t.exports=s},4117:function(t){"use strict";t.exports=function(t){return null==t}},34:function(t,e,r){"use strict";var n=r(4901);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},3925:function(t,e,r){"use strict";var n=r(34);t.exports=function(t){return n(t)||null===t}},6395:function(t){"use strict";t.exports=!1},757:function(t,e,r){"use strict";var n=r(7751),i=r(4901),o=r(1625),s=r(7040),u=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return i(e)&&o(e.prototype,u(t))}},2652:function(t,e,r){"use strict";var n=r(6080),i=r(9565),o=r(8551),s=r(6823),u=r(4209),a=r(6198),c=r(1625),f=r(81),l=r(851),h=r(9539),p=TypeError,d=function(t,e){this.stopped=t,this.result=e},y=d.prototype;t.exports=function(t,e,r){var v,b,g,m,w,x,_,S=r&&r.that,O=!(!r||!r.AS_ENTRIES),E=!(!r||!r.IS_RECORD),k=!(!r||!r.IS_ITERATOR),T=!(!r||!r.INTERRUPTED),j=n(e,S),A=function(t){var e=v;return v=void 0,e&&h(e,"normal"),new d(!0,t)},R=function(t){return O?(o(t),T?j(t[0],t[1],A):j(t[0],t[1])):T?j(t,A):j(t)};if(E)v=t.iterator;else if(k)v=t;else{if(!(b=l(t)))throw new p(s(t)+" is not iterable");if(u(b)){for(g=0,m=a(t);m>g;g++)if((w=R(t[g]))&&c(y,w))return w;return new d(!1)}v=f(t,b)}for(x=E?t.next:v.next;!(_=i(x,v)).done;){var P=_.value;try{w=R(P)}catch(t){if(!v)throw t;h(v,"throw",t)}if("object"==typeof w&&w&&c(y,w))return w}return new d(!1)}},9539:function(t,e,r){"use strict";var n=r(9565),i=r(8551),o=r(5966);t.exports=function(t,e,r){var s,u;i(t);try{if(!(s=o(t,"return"))){if("throw"===e)throw r;return r}s=n(s,t)}catch(t){u=!0,s=t}if("throw"===e)throw r;if(u)throw s;return i(s),r}},3994:function(t,e,r){"use strict";var n=r(7657).IteratorPrototype,i=r(2360),o=r(6980),s=r(687),u=r(6269),a=function(){return this};t.exports=function(t,e,r,c){var f=e+" Iterator";return t.prototype=i(n,{next:o(+!c,r)}),s(t,f,!1,!0),u[f]=a,t}},1088:function(t,e,r){"use strict";var n=r(6518),i=r(9565),o=r(6395),s=r(350),u=r(4901),a=r(3994),c=r(2787),f=r(2967),l=r(687),h=r(6699),p=r(6840),d=r(8227),y=r(6269),v=r(7657),b=s.PROPER,g=s.CONFIGURABLE,m=v.IteratorPrototype,w=v.BUGGY_SAFARI_ITERATORS,x=d("iterator"),_="keys",S="values",O="entries",E=function(){return this};t.exports=function(t,e,r,s,d,v,k){a(r,e,s);var T,j,A,R=function(t){if(t===d&&C)return C;if(!w&&t&&t in I)return I[t];switch(t){case _:case S:case O:return function(){return new r(this,t)}}return function(){return new r(this)}},P=e+" Iterator",M=!1,I=t.prototype,B=I[x]||I["@@iterator"]||d&&I[d],C=!w&&B||R(d),L="Array"===e&&I.entries||B;if(L&&(T=c(L.call(new t)))!==Object.prototype&&T.next&&(o||c(T)===m||(f?f(T,m):u(T[x])||p(T,x,E)),l(T,P,!0,!0),o&&(y[P]=E)),b&&d===S&&B&&B.name!==S&&(!o&&g?h(I,"name",S):(M=!0,C=function(){return i(B,this)})),d)if(j={values:R(S),keys:v?C:R(_),entries:R(O)},k)for(A in j)(w||M||!(A in I))&&p(I,A,j[A]);else n({target:e,proto:!0,forced:w||M},j);return o&&!k||I[x]===C||p(I,x,C,{name:d}),y[e]=C,j}},7657:function(t,e,r){"use strict";var n,i,o,s=r(9039),u=r(4901),a=r(34),c=r(2360),f=r(2787),l=r(6840),h=r(8227),p=r(6395),d=h("iterator"),y=!1;[].keys&&("next"in(o=[].keys())?(i=f(f(o)))!==Object.prototype&&(n=i):y=!0),!a(n)||s(function(){var t={};return n[d].call(t)!==t})?n={}:p&&(n=c(n)),u(n[d])||l(n,d,function(){return this}),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:y}},6269:function(t){"use strict";t.exports={}},6198:function(t,e,r){"use strict";var n=r(8014);t.exports=function(t){return n(t.length)}},283:function(t,e,r){"use strict";var n=r(9504),i=r(9039),o=r(4901),s=r(9297),u=r(3724),a=r(350).CONFIGURABLE,c=r(3706),f=r(1181),l=f.enforce,h=f.get,p=String,d=Object.defineProperty,y=n("".slice),v=n("".replace),b=n([].join),g=u&&!i(function(){return 8!==d(function(){},"length",{value:8}).length}),m=String(String).split("String"),w=t.exports=function(t,e,r){"Symbol("===y(p(e),0,7)&&(e="["+v(p(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!s(t,"name")||a&&t.name!==e)&&(u?d(t,"name",{value:e,configurable:!0}):t.name=e),g&&r&&s(r,"arity")&&t.length!==r.arity&&d(t,"length",{value:r.arity});try{r&&s(r,"constructor")&&r.constructor?u&&d(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=l(t);return s(n,"source")||(n.source=b(m,"string"==typeof e?e:"")),t};Function.prototype.toString=w(function(){return o(this)&&h(this).source||c(this)},"toString")},741:function(t){"use strict";var e=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?r:e)(n)}},1955:function(t,e,r){"use strict";var n,i,o,s,u,a=r(4576),c=r(3389),f=r(6080),l=r(9225).set,h=r(8265),p=r(9544),d=r(4265),y=r(7860),v=r(8574),b=a.MutationObserver||a.WebKitMutationObserver,g=a.document,m=a.process,w=a.Promise,x=c("queueMicrotask");if(!x){var _=new h,S=function(){var t,e;for(v&&(t=m.domain)&&t.exit();e=_.get();)try{e()}catch(t){throw _.head&&n(),t}t&&t.enter()};p||v||y||!b||!g?!d&&w&&w.resolve?((s=w.resolve(void 0)).constructor=w,u=f(s.then,s),n=function(){u(S)}):v?n=function(){m.nextTick(S)}:(l=f(l,a),n=function(){l(S)}):(i=!0,o=g.createTextNode(""),new b(S).observe(o,{characterData:!0}),n=function(){o.data=i=!i}),x=function(t){_.head||n(),_.add(t)}}t.exports=x},6043:function(t,e,r){"use strict";var n=r(9306),i=TypeError,o=function(t){var e,r;this.promise=new t(function(t,n){if(void 0!==e||void 0!==r)throw new i("Bad Promise constructor");e=t,r=n}),this.resolve=n(e),this.reject=n(r)};t.exports.f=function(t){return new o(t)}},2603:function(t,e,r){"use strict";var n=r(655);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:n(t)}},2360:function(t,e,r){"use strict";var n,i=r(8551),o=r(6801),s=r(8727),u=r(421),a=r(397),c=r(4055),f=r(6119),l="prototype",h="script",p=f("IE_PROTO"),d=function(){},y=function(t){return"<"+h+">"+t+"</"+h+">"},v=function(t){t.write(y("")),t.close();var e=t.parentWindow.Object;return t=null,e},b=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;b="undefined"!=typeof document?document.domain&&n?v(n):(e=c("iframe"),r="java"+h+":",e.style.display="none",a.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(y("document.F=Object")),t.close(),t.F):v(n);for(var i=s.length;i--;)delete b[l][s[i]];return b()};u[p]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(d[l]=i(t),r=new d,d[l]=null,r[p]=t):r=b(),void 0===e?r:o.f(r,e)}},6801:function(t,e,r){"use strict";var n=r(3724),i=r(8686),o=r(4913),s=r(8551),u=r(5397),a=r(1072);e.f=n&&!i?Object.defineProperties:function(t,e){s(t);for(var r,n=u(e),i=a(e),c=i.length,f=0;c>f;)o.f(t,r=i[f++],n[r]);return t}},4913:function(t,e,r){"use strict";var n=r(3724),i=r(5917),o=r(8686),s=r(8551),u=r(6969),a=TypeError,c=Object.defineProperty,f=Object.getOwnPropertyDescriptor,l="enumerable",h="configurable",p="writable";e.f=n?o?function(t,e,r){if(s(t),e=u(e),s(r),"function"==typeof t&&"prototype"===e&&"value"in r&&p in r&&!r[p]){var n=f(t,e);n&&n[p]&&(t[e]=r.value,r={configurable:h in r?r[h]:n[h],enumerable:l in r?r[l]:n[l],writable:!1})}return c(t,e,r)}:c:function(t,e,r){if(s(t),e=u(e),s(r),i)try{return c(t,e,r)}catch(t){}if("get"in r||"set"in r)throw new a("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},7347:function(t,e,r){"use strict";var n=r(3724),i=r(9565),o=r(8773),s=r(6980),u=r(5397),a=r(6969),c=r(9297),f=r(5917),l=Object.getOwnPropertyDescriptor;e.f=n?l:function(t,e){if(t=u(t),e=a(e),f)try{return l(t,e)}catch(t){}if(c(t,e))return s(!i(o.f,t,e),t[e])}},8480:function(t,e,r){"use strict";var n=r(1828),i=r(8727).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,i)}},3717:function(t,e){"use strict";e.f=Object.getOwnPropertySymbols},2787:function(t,e,r){"use strict";var n=r(9297),i=r(4901),o=r(8981),s=r(6119),u=r(2211),a=s("IE_PROTO"),c=Object,f=c.prototype;t.exports=u?c.getPrototypeOf:function(t){var e=o(t);if(n(e,a))return e[a];var r=e.constructor;return i(r)&&e instanceof r?r.prototype:e instanceof c?f:null}},1625:function(t,e,r){"use strict";var n=r(9504);t.exports=n({}.isPrototypeOf)},1828:function(t,e,r){"use strict";var n=r(9504),i=r(9297),o=r(5397),s=r(9617).indexOf,u=r(421),a=n([].push);t.exports=function(t,e){var r,n=o(t),c=0,f=[];for(r in n)!i(u,r)&&i(n,r)&&a(f,r);for(;e.length>c;)i(n,r=e[c++])&&(~s(f,r)||a(f,r));return f}},1072:function(t,e,r){"use strict";var n=r(1828),i=r(8727);t.exports=Object.keys||function(t){return n(t,i)}},8773:function(t,e){"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,i=n&&!r.call({1:2},1);e.f=i?function(t){var e=n(this,t);return!!e&&e.enumerable}:r},2967:function(t,e,r){"use strict";var n=r(6706),i=r(34),o=r(7750),s=r(3506);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=n(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return o(r),s(n),i(r)?(e?t(r,n):r.__proto__=n,r):r}}():void 0)},3179:function(t,e,r){"use strict";var n=r(2140),i=r(6955);t.exports=n?{}.toString:function(){return"[object "+i(this)+"]"}},4270:function(t,e,r){"use strict";var n=r(9565),i=r(4901),o=r(34),s=TypeError;t.exports=function(t,e){var r,u;if("string"===e&&i(r=t.toString)&&!o(u=n(r,t)))return u;if(i(r=t.valueOf)&&!o(u=n(r,t)))return u;if("string"!==e&&i(r=t.toString)&&!o(u=n(r,t)))return u;throw new s("Can't convert object to primitive value")}},5031:function(t,e,r){"use strict";var n=r(7751),i=r(9504),o=r(8480),s=r(3717),u=r(8551),a=i([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=o.f(u(t)),r=s.f;return r?a(e,r(t)):e}},9167:function(t,e,r){"use strict";var n=r(4576);t.exports=n},1103:function(t){"use strict";t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},916:function(t,e,r){"use strict";var n=r(4576),i=r(550),o=r(4901),s=r(2796),u=r(3706),a=r(8227),c=r(4215),f=r(6395),l=r(9519),h=i&&i.prototype,p=a("species"),d=!1,y=o(n.PromiseRejectionEvent),v=s("Promise",function(){var t=u(i),e=t!==String(i);if(!e&&66===l)return!0;if(f&&(!h.catch||!h.finally))return!0;if(!l||l<51||!/native code/.test(t)){var r=new i(function(t){t(1)}),n=function(t){t(function(){},function(){})};if((r.constructor={})[p]=n,!(d=r.then(function(){})instanceof n))return!0}return!(e||"BROWSER"!==c&&"DENO"!==c||y)});t.exports={CONSTRUCTOR:v,REJECTION_EVENT:y,SUBCLASSING:d}},550:function(t,e,r){"use strict";var n=r(4576);t.exports=n.Promise},3438:function(t,e,r){"use strict";var n=r(8551),i=r(34),o=r(6043);t.exports=function(t,e){if(n(t),i(e)&&e.constructor===t)return e;var r=o.f(t);return(0,r.resolve)(e),r.promise}},537:function(t,e,r){"use strict";var n=r(550),i=r(4428),o=r(916).CONSTRUCTOR;t.exports=o||!i(function(t){n.all(t).then(void 0,function(){})})},8265:function(t){"use strict";var e=function(){this.head=null,this.tail=null};e.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}},t.exports=e},7750:function(t,e,r){"use strict";var n=r(4117),i=TypeError;t.exports=function(t){if(n(t))throw new i("Can't call method on "+t);return t}},3389:function(t,e,r){"use strict";var n=r(4576),i=r(3724),o=Object.getOwnPropertyDescriptor;t.exports=function(t){if(!i)return n[t];var e=o(n,t);return e&&e.value}},7633:function(t,e,r){"use strict";var n=r(7751),i=r(2106),o=r(8227),s=r(3724),u=o("species");t.exports=function(t){var e=n(t);s&&e&&!e[u]&&i(e,u,{configurable:!0,get:function(){return this}})}},687:function(t,e,r){"use strict";var n=r(4913).f,i=r(9297),o=r(8227)("toStringTag");t.exports=function(t,e,r){t&&!r&&(t=t.prototype),t&&!i(t,o)&&n(t,o,{configurable:!0,value:e})}},6119:function(t,e,r){"use strict";var n=r(5745),i=r(3392),o=n("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},7629:function(t,e,r){"use strict";var n=r(6395),i=r(4576),o=r(9433),s="__core-js_shared__",u=t.exports=i[s]||o(s,{});(u.versions||(u.versions=[])).push({version:"3.49.0",mode:n?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"})},5745:function(t,e,r){"use strict";var n=r(7629);t.exports=function(t,e){return n[t]||(n[t]=e||{})}},2293:function(t,e,r){"use strict";var n=r(8551),i=r(5548),o=r(4117),s=r(8227)("species");t.exports=function(t,e){var r,u=n(t).constructor;return void 0===u||o(r=n(u)[s])?e:i(r)}},8183:function(t,e,r){"use strict";var n=r(9504),i=r(1291),o=r(655),s=r(7750),u=n("".charAt),a=n("".charCodeAt),c=n("".slice),f=function(t){return function(e,r){var n,f,l=o(s(e)),h=i(r),p=l.length;return h<0||h>=p?t?"":void 0:(n=a(l,h))<55296||n>56319||h+1===p||(f=a(l,h+1))<56320||f>57343?t?u(l,h):n:t?c(l,h,h+2):f-56320+(n-55296<<10)+65536}};t.exports={codeAt:f(!1),charAt:f(!0)}},4495:function(t,e,r){"use strict";var n=r(9519),i=r(9039),o=r(4576).String;t.exports=!!Object.getOwnPropertySymbols&&!i(function(){var t=Symbol("symbol detection");return!o(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41})},9225:function(t,e,r){"use strict";var n,i,o,s,u=r(4576),a=r(8745),c=r(6080),f=r(4901),l=r(9297),h=r(9039),p=r(397),d=r(7680),y=r(4055),v=r(2812),b=r(9544),g=r(8574),m=u.setImmediate,w=u.clearImmediate,x=u.process,_=u.Dispatch,S=u.Function,O=u.MessageChannel,E=u.String,k=0,T={},j="onreadystatechange";h(function(){n=u.location});var A=function(t){if(l(T,t)){var e=T[t];delete T[t],e()}},R=function(t){return function(){A(t)}},P=function(t){A(t.data)},M=function(t){u.postMessage(E(t),n.protocol+"//"+n.host)};m&&w||(m=function(t){v(arguments.length,1);var e=f(t)?t:S(t),r=d(arguments,1);return T[++k]=function(){a(e,void 0,r)},i(k),k},w=function(t){delete T[t]},g?i=function(t){x.nextTick(R(t))}:_&&_.now?i=function(t){_.now(R(t))}:O&&!b?(s=(o=new O).port2,o.port1.onmessage=P,i=c(s.postMessage,s)):u.addEventListener&&f(u.postMessage)&&!u.importScripts&&n&&"file:"!==n.protocol&&!h(M)?(i=M,u.addEventListener("message",P,!1)):i=j in y("script")?function(t){p.appendChild(y("script"))[j]=function(){p.removeChild(this),A(t)}}:function(t){setTimeout(R(t),0)}),t.exports={set:m,clear:w}},5610:function(t,e,r){"use strict";var n=r(1291),i=Math.max,o=Math.min;t.exports=function(t,e){var r=n(t);return r<0?i(r+e,0):o(r,e)}},5397:function(t,e,r){"use strict";var n=r(7055),i=r(7750);t.exports=function(t){return n(i(t))}},1291:function(t,e,r){"use strict";var n=r(741);t.exports=function(t){var e=+t;return e!=e||0===e?0:n(e)}},8014:function(t,e,r){"use strict";var n=r(1291),i=Math.min;t.exports=function(t){var e=n(t);return e>0?i(e,9007199254740991):0}},8981:function(t,e,r){"use strict";var n=r(7750),i=Object;t.exports=function(t){return i(n(t))}},2777:function(t,e,r){"use strict";var n=r(9565),i=r(34),o=r(757),s=r(5966),u=r(4270),a=r(8227),c=TypeError,f=a("toPrimitive");t.exports=function(t,e){if(!i(t)||o(t))return t;var r,a=s(t,f);if(a){if(void 0===e&&(e="default"),r=n(a,t,e),!i(r)||o(r))return r;throw new c("Can't convert object to primitive value")}return void 0===e&&(e="number"),u(t,e)}},6969:function(t,e,r){"use strict";var n=r(2777),i=r(757);t.exports=function(t){var e=n(t,"string");return i(e)?e:e+""}},2140:function(t,e,r){"use strict";var n={};n[r(8227)("toStringTag")]="z",t.exports="[object z]"===String(n)},655:function(t,e,r){"use strict";var n=r(6955),i=String;t.exports=function(t){if("Symbol"===n(t))throw new TypeError("Cannot convert a Symbol value to a string");return i(t)}},6823:function(t){"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},3392:function(t,e,r){"use strict";var n=r(9504),i=0,o=Math.random(),s=n(1.1.toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++i+o,36)}},7040:function(t,e,r){"use strict";var n=r(4495);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8686:function(t,e,r){"use strict";var n=r(3724),i=r(9039);t.exports=n&&i(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},2812:function(t){"use strict";var e=TypeError;t.exports=function(t,r){if(t<r)throw new e("Not enough arguments");return t}},8622:function(t,e,r){"use strict";var n=r(4576),i=r(4901),o=n.WeakMap;t.exports=i(o)&&/native code/.test(String(o))},8227:function(t,e,r){"use strict";var n=r(4576),i=r(5745),o=r(9297),s=r(3392),u=r(4495),a=r(7040),c=n.Symbol,f=i("wks"),l=a?c.for||c:c&&c.withoutSetter||s;t.exports=function(t){return o(f,t)||(f[t]=u&&o(c,t)?c[t]:l("Symbol."+t)),f[t]}},7145:function(t,e,r){"use strict";var n=r(6518),i=r(1625),o=r(2787),s=r(2967),u=r(7740),a=r(2360),c=r(6699),f=r(6980),l=r(7584),h=r(747),p=r(2652),d=r(2603),y=r(8227)("toStringTag"),v=Error,b=[].push,g=function(t,e){var r,n=i(m,this);s?r=s(new v,n?o(this):m):(r=n?this:a(m),c(r,y,"Error")),void 0!==e&&c(r,"message",d(e)),h(r,g,r.stack,1),arguments.length>2&&l(r,arguments[2]);var u=[];return p(t,b,{that:u}),c(r,"errors",u),r};s?s(g,v):u(g,v,{name:!0});var m=g.prototype=a(v.prototype,{constructor:f(1,g),message:f(1,""),name:f(1,"AggregateError")});n({global:!0,constructor:!0,arity:2},{AggregateError:g})},67:function(t,e,r){"use strict";r(7145)},3792:function(t,e,r){"use strict";var n=r(5397),i=r(6469),o=r(6269),s=r(1181),u=r(4913).f,a=r(1088),c=r(2529),f=r(6395),l=r(3724),h="Array Iterator",p=s.set,d=s.getterFor(h);t.exports=a(Array,"Array",function(t,e){p(this,{type:h,target:n(t),index:0,kind:e})},function(){var t=d(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=null,c(void 0,!0);switch(t.kind){case"keys":return c(r,!1);case"values":return c(e[r],!1)}return c([r,e[r]],!1)},"values");var y=o.Arguments=o.Array;if(i("keys"),i("values"),i("entries"),!f&&l&&"values"!==y.name)try{u(y,"name",{value:"values"})}catch(t){}},6099:function(t,e,r){"use strict";var n=r(2140),i=r(6840),o=r(3179);n||i(Object.prototype,"toString",o,{unsafe:!0})},6167:function(t,e,r){"use strict";var n=r(6518),i=r(9565),o=r(9306),s=r(6043),u=r(1103),a=r(2652);n({target:"Promise",stat:!0,forced:r(537)},{allSettled:function(t){var e=this,r=s.f(e),n=r.resolve,c=r.reject,f=u(function(){var r=o(e.resolve),s=[],u=0,c=1;a(t,function(t){var o=u++,a=!1;c++,i(r,e,t).then(function(t){a||(a=!0,s[o]={status:"fulfilled",value:t},--c||n(s))},function(t){a||(a=!0,s[o]={status:"rejected",reason:t},--c||n(s))})}),--c||n(s)});return f.error&&c(f.value),r.promise}})},6499:function(t,e,r){"use strict";var n=r(6518),i=r(9565),o=r(9306),s=r(6043),u=r(1103),a=r(2652);n({target:"Promise",stat:!0,forced:r(537)},{all:function(t){var e=this,r=s.f(e),n=r.resolve,c=r.reject,f=u(function(){var r=o(e.resolve),s=[],u=0,f=1;a(t,function(t){var o=u++,a=!1;f++,i(r,e,t).then(function(t){a||(a=!0,s[o]=t,--f||n(s))},c)}),--f||n(s)});return f.error&&c(f.value),r.promise}})},3518:function(t,e,r){"use strict";var n=r(6518),i=r(9565),o=r(9306),s=r(7751),u=r(6043),a=r(1103),c=r(2652),f=r(537),l="No one promise resolved";n({target:"Promise",stat:!0,forced:f},{any:function(t){var e=this,r=s("AggregateError"),n=u.f(e),f=n.resolve,h=n.reject,p=a(function(){var n=o(e.resolve),s=[],u=0,a=1,p=!1;c(t,function(t){var o=u++,c=!1;a++,i(n,e,t).then(function(t){c||p||(p=!0,f(t))},function(t){c||p||(c=!0,s[o]=t,--a||h(new r(s,l)))})}),--a||h(new r(s,l))});return p.error&&h(p.value),n.promise}})},2003:function(t,e,r){"use strict";var n=r(6518),i=r(6395),o=r(916).CONSTRUCTOR,s=r(550),u=r(7751),a=r(4901),c=r(6840),f=s&&s.prototype;if(n({target:"Promise",proto:!0,forced:o,real:!0},{catch:function(t){return this.then(void 0,t)}}),!i&&a(s)){var l=u("Promise").prototype.catch;f.catch!==l&&c(f,"catch",l,{unsafe:!0})}},436:function(t,e,r){"use strict";var n,i,o,s,u=r(6518),a=r(6395),c=r(8574),f=r(4576),l=r(9167),h=r(9565),p=r(6840),d=r(2967),y=r(687),v=r(7633),b=r(9306),g=r(4901),m=r(34),w=r(679),x=r(2293),_=r(9225).set,S=r(1955),O=r(3138),E=r(1103),k=r(8265),T=r(1181),j=r(550),A=r(916),R=r(6043),P="Promise",M=A.CONSTRUCTOR,I=A.REJECTION_EVENT,B=A.SUBCLASSING,C=T.getterFor(P),L=T.set,U=j&&j.prototype,N=j,D=U,F=f.TypeError,q=f.document,W=f.process,H=R.f,G=H,z=!!(q&&q.createEvent&&f.dispatchEvent),V="unhandledrejection",$=function(t){var e;return!(!m(t)||!g(e=t.then))&&e},Y=function(t,e){var r,n,i,o=e.value,s=1===e.state,u=s?t.ok:t.fail,a=t.resolve,c=t.reject,f=t.domain;try{u?(s||(2===e.rejection&&Z(e),e.rejection=1),!0===u?r=o:(f&&f.enter(),r=u(o),f&&(f.exit(),i=!0)),r===t.promise?c(new F("Promise-chain cycle")):(n=$(r))?h(n,r,a,c):a(r)):c(o)}catch(t){f&&!i&&f.exit(),c(t)}},J=function(t,e){t.notified||(t.notified=!0,S(function(){for(var r,n=t.reactions;r=n.get();)Y(r,t);t.notified=!1,e&&!t.rejection&&K(t)}))},X=function(t,e,r){var n,i;z?((n=q.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),f.dispatchEvent(n)):n={promise:e,reason:r},!I&&(i=f["on"+t])?i(n):t===V&&O("Unhandled promise rejection",r)},K=function(t){h(_,f,function(){var e,r=t.facade,n=t.value;if(Q(t)&&(e=E(function(){c?W.emit("unhandledRejection",n,r):X(V,r,n)}),t.rejection=c||Q(t)?2:1,e.error))throw e.value})},Q=function(t){return 1!==t.rejection&&!t.parent},Z=function(t){h(_,f,function(){var e=t.facade;c?W.emit("rejectionHandled",e):X("rejectionhandled",e,t.value)})},tt=function(t,e,r){return function(n){t(e,n,r)}},et=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,J(t,!0))},rt=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw new F("Promise can't be resolved itself");var n=$(e);n?S(function(){var r={done:!1};try{h(n,e,tt(rt,r,t),tt(et,r,t))}catch(e){et(r,e,t)}}):(t.value=e,t.state=1,J(t,!1))}catch(e){et({done:!1},e,t)}}};if(M&&(D=(N=function(t){w(this,D),b(t),h(n,this);var e=C(this);try{t(tt(rt,e),tt(et,e))}catch(t){et(e,t)}}).prototype,(n=function(t){L(this,{type:P,done:!1,notified:!1,parent:!1,reactions:new k,rejection:!1,state:0,value:null})}).prototype=p(D,"then",function(t,e){var r=C(this),n=H(x(this,N));return r.parent=!0,n.ok=!g(t)||t,n.fail=g(e)&&e,n.domain=c?W.domain:void 0,0===r.state?r.reactions.add(n):S(function(){Y(n,r)}),n.promise}),i=function(){var t=new n,e=C(t);this.promise=t,this.resolve=tt(rt,e),this.reject=tt(et,e)},R.f=H=function(t){return t===N||t===o?new i(t):G(t)},!a&&g(j)&&U!==Object.prototype)){s=U.then,B||p(U,"then",function(t,e){var r=this;return new N(function(t,e){h(s,r,t,e)}).then(t,e)},{unsafe:!0});try{delete U.constructor}catch(t){}d&&d(U,D)}u({global:!0,constructor:!0,wrap:!0,forced:M},{Promise:N}),o=l.Promise,y(N,P,!1,!0),v(P)},9391:function(t,e,r){"use strict";var n=r(6518),i=r(6395),o=r(550),s=r(9039),u=r(7751),a=r(4901),c=r(2293),f=r(3438),l=r(6840),h=o&&o.prototype;if(n({target:"Promise",proto:!0,real:!0,forced:!!o&&s(function(){h.finally.call({then:function(){}},function(){})})},{finally:function(t){var e=c(this,u("Promise")),r=a(t);return this.then(r?function(r){return f(e,t()).then(function(){return r})}:t,r?function(r){return f(e,t()).then(function(){throw r})}:t)}}),!i&&a(o)){var p=u("Promise").prototype.finally;h.finally!==p&&l(h,"finally",p,{unsafe:!0})}},3362:function(t,e,r){"use strict";r(436),r(6499),r(2003),r(7743),r(1481),r(280)},7743:function(t,e,r){"use strict";var n=r(6518),i=r(9565),o=r(9306),s=r(6043),u=r(1103),a=r(2652);n({target:"Promise",stat:!0,forced:r(537)},{race:function(t){var e=this,r=s.f(e),n=r.reject,c=u(function(){var s=o(e.resolve);a(t,function(t){i(s,e,t).then(r.resolve,n)})});return c.error&&n(c.value),r.promise}})},1481:function(t,e,r){"use strict";var n=r(6518),i=r(6043);n({target:"Promise",stat:!0,forced:r(916).CONSTRUCTOR},{reject:function(t){var e=i.f(this);return(0,e.reject)(t),e.promise}})},280:function(t,e,r){"use strict";var n=r(6518),i=r(7751),o=r(6395),s=r(550),u=r(916).CONSTRUCTOR,a=r(3438),c=i("Promise"),f=o&&!u;n({target:"Promise",stat:!0,forced:o||u},{resolve:function(t){return a(f&&this===c?s:this,t)}})},1689:function(t,e,r){"use strict";var n=r(6518),i=r(4576),o=r(8745),s=r(7680),u=r(6043),a=r(9306),c=r(1103),f=i.Promise,l=!1;n({target:"Promise",stat:!0,forced:!f||!f.try||c(function(){f.try(function(t){l=8===t},8)}).error||!l},{try:function(t){var e=arguments.length>1?s(arguments,1):[],r=u.f(this),n=c(function(){return o(a(t),void 0,e)});return(n.error?r.reject:r.resolve)(n.value),r.promise}})},4628:function(t,e,r){"use strict";var n=r(6518),i=r(6043);n({target:"Promise",stat:!0},{withResolvers:function(){var t=i.f(this);return{promise:t.promise,resolve:t.resolve,reject:t.reject}}})},7764:function(t,e,r){"use strict";var n=r(8183).charAt,i=r(655),o=r(1181),s=r(1088),u=r(2529),a="String Iterator",c=o.set,f=o.getterFor(a);s(String,"String",function(t){c(this,{type:a,string:i(t),index:0})},function(){var t,e=f(this),r=e.string,i=e.index;return i>=r.length?u(void 0,!0):(t=n(r,i),e.index+=t.length,u(t,!1))})},9806:function(t,e,r){"use strict";r(67)},5874:function(t,e,r){"use strict";r(6167)},7575:function(t,e,r){"use strict";r(3518)},7628:function(t,e,r){"use strict";r(1689)},3799:function(t,e,r){"use strict";r(4628)},2953:function(t,e,r){"use strict";var n=r(4576),i=r(7400),o=r(9296),s=r(3792),u=r(6699),a=r(687),c=r(8227)("iterator"),f=s.values,l=function(t,e){if(t){if(t[c]!==f)try{u(t,c,f)}catch(e){t[c]=f}if(a(t,e,!0),i[e])for(var r in s)if(t[r]!==s[r])try{u(t,r,s[r])}catch(e){t[r]=s[r]}}};for(var h in i)l(n[h]&&n[h].prototype,h);l(o,"DOMTokenList")},2473:function(t,e,r){"use strict";var n=r(6398);r(2953),t.exports=n}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}return r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r(3822)}()});