1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8272],{42171:function(e,t,r){"use strict";r.d(t,{s:function(){return Z}});let n=[0,2e3,1e4,3e4,null];class o{constructor(e){this._retryDelays=void 0!==e?[...e,null]:n}nextRetryDelayInMilliseconds(e){return this._retryDelays[e.previousRetryCount]}}class i extends Error{constructor(e,t){let r=new.target.prototype;super(`${e}: Status code '${t}'`),this.statusCode=t,this.__proto__=r}}class s extends Error{constructor(e="A timeout occurred."){let t=new.target.prototype;super(e),this.__proto__=t}}class a extends Error{constructor(e="An abort occurred."){let t=new.target.prototype;super(e),this.__proto__=t}}class c extends Error{constructor(e,t){let r=new.target.prototype;super(e),this.transport=t,this.errorType="UnsupportedTransportError",this.__proto__=r}}class l extends Error{constructor(e,t){let r=new.target.prototype;super(e),this.transport=t,this.errorType="DisabledTransportError",this.__proto__=r}}class h extends Error{constructor(e,t){let r=new.target.prototype;super(e),this.transport=t,this.errorType="FailedToStartTransportError",this.__proto__=r}}class u extends Error{constructor(e){let t=new.target.prototype;super(e),this.errorType="FailedToNegotiateWithServerError",this.__proto__=t}}class d extends Error{constructor(e,t){let r=new.target.prototype;super(e),this.innerErrors=t,this.__proto__=r}}class g{constructor(e,t,r){this.statusCode=e,this.statusText=t,this.content=r}}class p{get(e,t){return this.send({...t,method:"GET",url:e})}post(e,t){return this.send({...t,method:"POST",url:e})}delete(e,t){return this.send({...t,method:"DELETE",url:e})}getCookieString(e){return""}}var _,f,m,v,y,b,w,C,S=r(90808);class E{constructor(){}log(e,t){}}E.instance=new E;var k=r(40257);class T{static isRequired(e,t){if(null==e)throw Error(`The '${t}' argument is required.`)}static isNotEmpty(e,t){if(!e||e.match(/^\s*$/))throw Error(`The '${t}' argument should not be empty.`)}static isIn(e,t,r){if(!(e in t))throw Error(`Unknown ${r} value: ${e}.`)}}class I{static get isBrowser(){return"object"==typeof window&&"object"==typeof window.document}static get isWebWorker(){return"object"==typeof self&&"importScripts"in self}static get isReactNative(){return"object"==typeof window&&void 0===window.document}static get isNode(){return!this.isBrowser&&!this.isWebWorker&&!this.isReactNative}}function P(e,t){let r="";return R(e)?(r=`Binary data of length ${e.byteLength}`,t&&(r+=`. Content: '${function(e){let t=new Uint8Array(e),r="";return t.forEach(e=>{r+=`0x${e<16?"0":""}${e.toString(16)} `}),r.substr(0,r.length-1)}(e)}'`)):"string"==typeof e&&(r=`String data of length ${e.length}`,t&&(r+=`. Content: '${e}'`)),r}function R(e){return e&&"undefined"!=typeof ArrayBuffer&&(e instanceof ArrayBuffer||e.constructor&&"ArrayBuffer"===e.constructor.name)}async function $(e,t,r,n,o,i,s){let a={};if(o){let e=await o();e&&(a={Authorization:`Bearer ${e}`})}let[c,l]=N();a[c]=l,e.log(S.i.Trace,`(${t} transport) sending data. ${P(i,s.logMessageContent)}.`);let h=R(i)?"arraybuffer":"text",u=await r.post(n,{content:i,headers:{...a,...s.headers},responseType:h,timeout:s.timeout,withCredentials:s.withCredentials});e.log(S.i.Trace,`(${t} transport) request complete. Response status: ${u.statusCode}.`)}class D{constructor(e,t){this._subject=e,this._observer=t}dispose(){let e=this._subject.observers.indexOf(this._observer);e>-1&&this._subject.observers.splice(e,1),0===this._subject.observers.length&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(e=>{})}}class x{constructor(e){this._minLevel=e,this.out=console}log(e,t){if(e>=this._minLevel){let r=`[${new Date().toISOString()}] ${S.i[e]}: ${t}`;switch(e){case S.i.Critical:case S.i.Error:this.out.error(r);break;case S.i.Warning:this.out.warn(r);break;case S.i.Information:this.out.info(r);break;default:this.out.log(r)}}}}function N(){let e="X-SignalR-User-Agent";return I.isNode&&(e="User-Agent"),[e,function(e,t,r,n){let o="Microsoft SignalR/",i=e.split(".");return o+=`${i[0]}.${i[1]} (${e}; `,t&&""!==t?o+=`${t}; `:o+="Unknown OS; ",o+=`${r}`,n?o+=`; ${n}`:o+="; Unknown Runtime Version",o+=")"}("6.0.25",function(){if(!I.isNode)return"";switch(k.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return k.platform}}(),I.isNode?"NodeJS":"Browser",function(){if(I.isNode)return k.versions.node}())]}
1function A(e){return e.stack?e.stack:e.message?e.message:`${e}`}class M extends p{constructor(e){if(super(),this._logger=e,"undefined"==typeof fetch){let e=require;this._jar=new(e("tough-cookie")).CookieJar,this._fetchType=e("node-fetch"),this._fetchType=e("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw Error("could not find global")}());if("undefined"==typeof AbortController){let e=require;this._abortControllerType=e("abort-controller")}else this._abortControllerType=AbortController}async send(e){let t,r;if(e.abortSignal&&e.abortSignal.aborted)throw new a;if(!e.method)throw Error("No method defined.");if(!e.url)throw Error("No url defined.");let n=new this._abortControllerType;e.abortSignal&&(e.abortSignal.onabort=()=>{n.abort(),t=new a});let o=null;e.timeout&&(o=setTimeout(()=>{n.abort(),this._logger.log(S.i.Warning,"Timeout from HTTP request."),t=new s}
1,e.timeout));try{r=await this._fetchType(e.url,{body:e.content,cache:"no-cache",credentials:!0===e.withCredentials?"include":"same-origin",headers:{"Content-Type":"text/plain;charset=UTF-8","X-Requested-With":"XMLHttpRequest",...e.headers},method:e.method,mode:"cors",redirect:"follow",signal:n.signal})}catch(e){if(t)throw t;throw this._logger.log(S.i.Warning,`Error from HTTP request. ${e}.`),e}finally{o&&clearTimeout(o),e.abortSignal&&(e.abortSignal.onabort=null)}if(!r.ok)throw new i(await j(r,"text")||r.statusText,r.status);let c=j(r,e.responseType),l=await c;return new g(r.status,r.statusText,l)}getCookieString(e){let t="";return I.isNode&&this._jar&&this._jar.getCookies(e,(e,r)=>t=r.join("; ")),t}}function j(e,t){let r;switch(t){case"arraybuffer":r=e.arrayBuffer();break;case"text":default:r=e.text();break;case"blob":case"document":case"json":throw Error(`${t} is not supported.`)}return r}class H extends p{constructor(e){super(),this._logger=e}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new a):e.method?e.url?new Promise((t,r)=>{let n=new XMLHttpRequest;n.open(e.method,e.url,!0),n.withCredentials=void 0===e.withCredentials||e.withCredentials,n.setRequestHeader("X-Requested-With","XMLHttpRequest"),n.setRequestHeader("Content-Type","text/plain;charset=UTF-8");let o=e.headers;o&&Object.keys(o).forEach(e=>{n.setRequestHeader(e,o[e])}),e.responseType&&(n.responseType=e.responseType),e.abortSignal&&(e.abortSignal.onabort=()=>{n.abort(),r(new a)}),e.timeout&&(n.timeout=e.timeout),n.onload=()=>{e.abortSignal&&(e.abortSignal.onabort=null),n.status>=200&&n.status<300?t(new g(n.status,n.statusText,n.response||n.responseText)):r(new i(n.response||n.responseText||n.statusText,n.status))},n.onerror=()=>{this._logger.log(S.i.Warning,`Error from HTTP request. ${n.status}: ${n.statusText}.`),r(new i(n.statusText,n.status))},n.ontimeout=()=>{this._logger.log(S.i.Warning,"Timeout from HTTP request."),r(new s)},n.send(e.content||"")}):Promise.reject(Error("No url defined.")):Promise.reject(Error("No method defined."))}}class O extends p{constructor(e){if(super(),"undefined"!=typeof fetch||I.isNode)this._httpClient=new M(e);else if("undefined"!=typeof XMLHttpRequest)this._httpClient=new H(e);else throw Error("No usable HttpClient found.")}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new a):e.method?e.url?this._httpClient.send(e):Promise.reject(Error("No url defined.")):Promise.reject(Error("No method defined."))}getCookieString(e){return this._httpClient.getCookieString(e)}}class L{}L.Authorization="Authorization",L.Cookie="Cookie",(_=y||(y={}))[_.None=0]="None",_[_.WebSockets=1]="WebSockets",_[_.ServerSentEvents=2]="ServerSentEvents",_[_.LongPolling=4]="LongPolling",(f=b||(b={}))[f.Text=1]="Text",f[f.Binary=2]="Binary";class W{constructor(){this._isAborted=!1,this.onabort=null}abort(){!this._isAborted&&(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}}class U{constructor(e,t,r,n){this._httpClient=e,this._accessTokenFactory=t,this._logger=r,this._pollAbort=new W,this._options=n,this._running=!1,this.onreceive=null,this.onclose=null}get pollAborted(){return this._pollAbort.aborted}async connect(e,t){if(T.isRequired(e,"url"),T.isRequired(t,"transferFormat"),T.isIn(t,b,"transferFormat"),this._url=e,this._logger.log(S.i.Trace,"(LongPolling transport) Connecting."),t===b.Binary&&"undefined"!=typeof XMLHttpRequest&&"string"!=typeof new XMLHttpRequest().responseType)throw Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");let[r,n]=N(),o={[r]:n,...this._options.headers},s={abortSignal:this._pollAbort.signal,headers:o,timeout:1e5,withCredentials:this._options.withCredentials};t===b.Binary&&(s.responseType="arraybuffer");let a=await this._getAccessToken();this._updateHeaderToken(s,a);let c=`${e}&_=${Date.now()}`;this._logger.log(S.i.Trace,`(LongPolling transport) polling: ${c}.`);let l=await this._httpClient.get(c,s);200!==l.statusCode?(this._logger.log(S.i.Error,`(LongPolling transport) Unexpected response code: ${l.statusCode}.`),this._closeError=new i(l.statusText||"",l.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,s)}async _getAccessToken(){return this._accessTokenFactory?await this._accessTokenFactory():null}_updateHeaderToken(e,t){if(e.headers||(e.headers={}),t){e.headers[L.Authorization]=`Bearer ${t}`;return}e.headers[L.Authorization]&&delete e.headers[L.Authorization]}async _poll(e,t){try{for(;this._running;){let r=await this._getAccessToken();this._updateHeaderToken(t,r);try{let r=`${e}&_=${Date.now()}`;this._logger.log(S.i.Trace,`(LongPolling transport) polling: ${r}.`);let n=await this._httpClient.get(r,t);204===n.statusCode?(this._logger.log(S.i.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):200!==n.statusCode?(this._logger.log(S.i.Error,`(LongPolling transport) Unexpected response code: ${n.statusCode}.`),this._closeError=new i(n.statusText||"",n.statusCode),this._running=!1):n.content?(this._logger.log(S.i.Trace,`(LongPolling transport) data received. ${P(n.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(n.content)):this._logger.log(S.i.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(e){this._running?e instanceof s?this._logger.log(S.i.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=e,this._running=!1):this._logger.log(S.i.Trace,`(LongPolling transport) Poll errored after shutdown: ${e.message}`)}}}finally{this._logger.log(S.i.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(e){return this._running?$(this._logger,"LongPolling",this._httpClient,this._url,this._accessTokenFactory,e,this._options):Promise.reject(Error("Cannot send until the transport is connected"))}async stop(){this._logger.log(S.i.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(S.i.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);let e={},[t,r]=N();e[t]=r;let n={headers:{...e,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials},o=await this._getAccessToken();this._updateHeaderToken(n,o),await this._httpClient.delete(this._url,n),this._logger.log(S.i.Trace,"(LongPolling transport) DELETE request sent.")}finally{this._logger.log(S.i.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}}_raiseOnClose(){if(this.onclose){let e="(LongPolling transport) Firing onclose event.";this._closeError&&(e+=" Error: "+this._closeError),this._logger.log(S.i.Trace,e),this.onclose(this._closeError)}}}class q{constructor(e,t,r,n){this._httpClient=e,this._accessTokenFactory=t,this._logger=r,this._options=n,this.onreceive=null,this.onclose
1=null}async connect(e,t){if(T.isRequired(e,"url"),T.isRequired(t,"transferFormat"),T.isIn(t,b,"transferFormat"),this._logger.log(S.i.Trace,"(SSE transport) Connecting."),this._url=e,this._accessTokenFactory){let t=await this._accessTokenFactory();t&&(e+=(0>e.indexOf("?")?"?":"&")+`access_token=${encodeURIComponent(t)}`)}return new Promise((r,n)=>{let o,i=!1;if(t!==b.Text){n(Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}if(I.isBrowser||I.isWebWorker)o=new this._options.EventSource(e,{withCredentials:this._options.withCredentials});else{let t=this._httpClient.getCookieString(e),r={};r.Cookie=t;let[n,i]=N();r[n]=i,o=new this._options.EventSource(e,{withCredentials:this._options.withCredentials,headers:{...r,...this._options.headers}})}try{o.onmessage=e=>{if(this.onreceive)try{this._logger.log(S.i.Trace,`(SSE transport) data received. ${P(e.data,this._options.logMessageContent)}.`),this.onreceive(e.data)}catch(e){this._close(e);return}},o.onerror=e=>{i?this._close():n(Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},o.onopen=()=>{this._logger.log(S.i.Information,`SSE connected to ${this._url}`),this._eventSource=o,i=!0,r()}}catch(e){n(e);return}})}async send(e){return this._eventSource?$(this._logger,"SSE",this._httpClient,this._url,this._accessTokenFactory,e,this._options):Promise.reject(Error("Cannot send until the transport is connected"))}stop(){return this._close(),Promise.resolve()}_close(e){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(e))}}class B{constructor(e,t,r,n,o,i){this._logger=r,this._accessTokenFactory=t,this._logMessageContent=n,this._webSocketConstructor=o,this._httpClient=e,this.onreceive=null,this.onclose=null,this._headers=i}async connect(e,t){if(T.isRequired(e,"url"),T.isRequired(t,"transferFormat"),T.isIn(t,b,"transferFormat"),this._logger.log(S.i.Trace,"(WebSockets transport) Connecting."),this._accessTokenFactory){let t=await this._accessTokenFactory();t&&(e+=(0>e.indexOf("?")?"?":"&")+`access_token=${encodeURIComponent(t)}`)}return new Promise((r,n)=>{let o;e=e.replace(/^http/,"ws");let i=this._httpClient.getCookieString(e),s=!1;if(I.isNode){let t={},[r,n]=N();t[r]=n,i&&(t[L.Cookie]=`${i}`),o=new this._webSocketConstructor(e,void 0,{headers:{...t,...this._headers}})}o||(o=new this._webSocketConstructor(e)),t===b.Binary&&(o.binaryType="arraybuffer"),o.onopen=t=>{this._logger.log(S.i.Information,`WebSocket connected to ${e}.`),this._webSocket=o,s=!0,r()},o.onerror=e=>{let t=null;"undefined"!=typeof ErrorEvent&&e instanceof ErrorEvent?t=e.error:t="There was an error with the transport",this._logger.log(S.i.Information,`(WebSockets transport) ${t}.`)},o.onmessage=e=>{if(this._logger.log(S.i.Trace,`(WebSockets transport) data received. ${P(e.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(e.data)}catch(e){this._close(e);return}},o.onclose=e=>{if(s)this._close(e);else{let t=null;"undefined"!=typeof ErrorEvent&&e instanceof ErrorEvent?t=e.error:t="WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",n(Error(t))}}})}send(e){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(S.i.Trace,`(WebSockets transport) sending data. ${P(e,this._logMessageContent)}.`),this._webSocket.send(e),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(e){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(S.i.Trace,"(WebSockets transport) socket closed."),this.onclose&&(this._isCloseEvent(e)&&(!1===e.wasClean||1e3!==e.code)?this.onclose(Error(`WebSocket closed with status code: ${e.code} (${e.reason||"no reason given"}).`)):e instanceof Error?this.onclose(e):this.onclose())}_isCloseEvent(e){return e&&"boolean"==typeof e.wasClean&&"number"==typeof e.code}}class F{constructor(e,t={}){var r;if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,T.isRequired(e,"url"),this._logger=void 0===(r=t.logger)?new x(S.i.Information):null===r?E.instance:void 0!==r.log?r:new x(r),this.baseUrl=this._resolveUrl(e),(t=t||{}).logMessageContent=void 0!==t.logMessageContent&&t.logMessageContent,"boolean"==typeof t.withCredentials||void 0===t.withCredentials)t.withCredentials=void 0===t.withCredentials||t.withCredentials;else throw Error("withCredentials option was not a 'boolean' or 'undefined' value");t.timeout=void 0===t.timeout?1e5:t.timeout;let n=null,o=null;if(I.isNode){let e=require;n=e("ws"),o=e("eventsource")}I.isNode||"undefined"==typeof WebSocket||t.WebSocket?I.isNode&&!t.WebSocket&&n&&(t.WebSocket=n):t.WebSocket=WebSocket,I.isNode||"undefined"==typeof EventSource||t.EventSource?I.isNode&&!t.EventSource&&void 0!==o&&(t.EventSource=o):t.EventSource=EventSource,this._httpClient=t.httpClient||new O(this._logger),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=t,this.onreceive=null,this.onclose
1=null}async start(e){if(e=e||b.Binary,T.isIn(e,b,"transferFormat"),this._logger.log(S.i.Debug,`Starting connection with transfer format '${b[e]}'.`),"Disconnected"!==this._connectionState)return Promise.reject(Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(e),await this._startInternalPromise,"Disconnecting"===this._connectionState){let e="Failed to start the HttpConnection before stop() was called.";return this._logger.log(S.i.Error,e),await this._stopPromise,Promise.reject(Error(e))}if("Connected"!==this._connectionState){let e="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(S.i.Error,e),Promise.reject(Error(e))}this._connectionStarted=!0}send(e){return"Connected"!==this._connectionState?Promise.reject(Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new V(this.transport)),this._sendQueue.send(e))}async stop(e){return"Disconnected"===this._connectionState?(this._logger.log(S.i.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnected state.`),Promise.resolve()):"Disconnecting"===this._connectionState?(this._logger.log(S.i.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise):void(this._connectionState="Disconnecting",this._stopPromise=new Promise(e=>{this._stopPromiseResolver=e}),await this._stopInternal(e),await this._stopPromise)}async _stopInternal(e){this._stopError=e;try{await this._startInternalPromise}catch(e){}if(this.transport){try{await this.transport.stop()}catch(e){this._logger.log(S.i.Error,`HttpConnection.transport.stop() threw error '${e}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(S.i.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async _startInternal(e){let t=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory;try{if(this._options.skipNegotiation){if(this._options.transport===y.WebSockets)this.transport=this._constructTransport(y.WebSockets),await this._startTransport(t,e);else throw Error("Negotiation can only be skipped when using the WebSocket transport directly.")}else{let r=null,n=0;do{if(r=await this._getNegotiationResponse(t),"Disconnecting"===this._connectionState||"Disconnected"===this._connectionState)throw Error("The connection was stopped during negotiation.");if(r.error)throw Error(r.error);if(r.ProtocolVersion)throw Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(r.url&&(t=r.url),r.accessToken){let e=r.accessToken;this._accessTokenFactory=()=>e}n++}while(r.url&&n<100);if(100===n&&r.url)throw Error("Negotiate redirection limit exceeded.");await this._createTransport(t,this._options.transport,r,e)}this.transport instanceof U&&(this.features.inherentKeepAlive=!0),"Connecting"===this._connectionState&&(this._logger.log(S.i.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(e){return this._logger.log(S.i.Error,"Failed to start the connection: "+e),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(e)}}async _getNegotiationResponse(e){let t={};if(this._accessTokenFactory){let e=await this._accessTokenFactory();e&&(t[L.Authorization]=`Bearer ${e}`)}let[r,n]=N();t[r]=n;let o=this._resolveNegotiateUrl(e);this._logger.log(S.i.Debug,`Sending negotiation request: ${o}.`);try{let e=await this._httpClient.post(o,{content:"",headers:{...t,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(200!==e.statusCode)return Promise.reject(Error(`Unexpected status code returned from negotiate '${e.statusCode}'`));let r=JSON.parse(e.content);return(!r.negotiateVersion||r.negotiateVersion<1)&&(r.connectionToken=r.connectionId),r}catch(t){let e="Failed to complete negotiation with the server: "+t;return t instanceof i&&404===t.statusCode&&(e+=" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(S.i.Error,e),Promise.reject(new u(e))}}_createConnectUrl(e,t){return t?e+(-1===e.indexOf("?")?"?":"&")+`id=${t}`:e}async _createTransport(e,t,r,n){let o=this._createConnectUrl(e,r.connectionToken);if(this._isITransport(t)){this._logger.log(S.i.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=t,await this._startTransport(o,n),this.connectionId=r.connectionId;return}let i=[],s=r.availableTransports||[],a=r;for(let r of s){let s=this._resolveTransportOrError(r,t,n);if(s instanceof Error)i.push(`${r.transport} failed:`),i.push(s);else if(this._isITransport(s)){if(this.transport=s,!a){try{a=await this._getNegotiationResponse(e)}catch(e){return Promise.reject(e)}o=this._createConnectUrl(e,a.connectionToken)}try{await this._startTransport(o,n),this.connectionId=a.connectionId;return}catch(e){if(this._logger.log(S.i.Error,`Failed to start the transport '${r.transport}': ${e}`),a=void 0,i.push(new h(`${r.transport} failed: ${e}`,y[r.transport])),"Connecting"!==this._connectionState){let e="Failed to select transport before stop() was called.";return this._logger.log(S.i.Debug,e),Promise.reject(Error(e))}}}}return i.length>0?Promise.reject(new d(`Unable to connect to the server with any of the available transports. ${i.join(" ")}`,i)):Promise.reject(Error("None of the transports supported by the client are supported by the server."))}
1_constructTransport(e){switch(e){case y.WebSockets:if(!this._options.WebSocket)throw Error("'WebSocket' is not supported in your environment.");return new B(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case y.ServerSentEvents:if(!this._options.EventSource)throw Error("'EventSource' is not supported in your environment.");return new q(this._httpClient,this._accessTokenFactory,this._logger,this._options);case y.LongPolling:return new U(this._httpClient,this._accessTokenFactory,this._logger,this._options);default:throw Error(`Unknown transport: ${e}.`)}}_startTransport(e,t){return this.transport.onreceive=this.onreceive,this.transport.onclose=e=>this._stopConnection(e),this.transport.connect(e,t)}_resolveTransportOrError(e,t,r){let n=y[e.transport];if(null==n)return this._logger.log(S.i.Debug,`Skipping transport '${e.transport}' because it is not supported by this client.`),Error(`Skipping transport '${e.transport}' because it is not supported by this client.`);if(t&&(n&t)==0)return this._logger.log(S.i.Debug,`Skipping transport '${y[n]}' because it was disabled by the client.`),new l(`'${y[n]}' is disabled by the client.`,n);if(!(e.transferFormats.map(e=>b[e]).indexOf(r)>=0))return this._logger.log(S.i.Debug,`Skipping transport '${y[n]}' because it does not support the requested transfer format '${b[r]}'.`),Error(`'${y[n]}' does not support ${b[r]}.`);if(n===y.WebSockets&&!this._options.WebSocket||n===y.ServerSentEvents&&!this._options.EventSource)return this._logger.log(S.i.Debug,`Skipping transport '${y[n]}' because it is not supported in your environment.'`),new c(`'${y[n]}' is not supported in your environment.`,n);this._logger.log(S.i.Debug,`Selecting transport '${y[n]}'.`);try{return this._constructTransport(n)}catch(e){return e}}_isITransport(e){return e&&"object"==typeof e&&"connect"in e}_stopConnection(e){if(this._logger.log(S.i.Debug,`HttpConnection.stopConnection(${e}) called while in state ${this._connectionState}.`),this.transport=void 0,e=this._stopError||e,this._stopError=void 0,"Disconnected"===this._connectionState){this._logger.log(S.i.Debug,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is already in the disconnected state.`);return}if("Connecting"===this._connectionState)throw this._logger.log(S.i.Warning,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is still in the connecting state.`),Error(`HttpConnection.stopConnection(${e}) was called while the connection is still in the connecting state.`);if("Disconnecting"===this._connectionState&&this._stopPromiseResolver(),e?this._logger.log(S.i.Error,`Connection disconnected with error '${e}'.`):this._logger.log(S.i.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(e=>{this._logger.log(S.i.Error,`TransportSendQueue.stop() threw error '${e}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(e)}catch(t){this._logger.log(S.i.Error,`HttpConnection.onclose(${e}) threw error '${t}'.`)}}}_resolveUrl(e){if(0===e.lastIndexOf("https://",0)||0===e.lastIndexOf("http://",0))return e;if(!I.isBrowser)throw Error(`Cannot resolve '${e}'.`);let t=window.document.createElement("a");return t.href=e,this._logger.log(S.i.Information,`Normalizing '${e}' to '${t.href}'.`),t.href}_resolveNegotiateUrl(e){let t=e.indexOf("?"),r=e.substring(0,-1===t?e.length:t);return"/"!==r[r.length-1]&&(r+="/"),-1===(r+="negotiate"+(-1===t?"":e.substring(t))).indexOf("negotiateVersion")&&(r+=(-1===t?"?":"&")+"negotiateVersion="+this._negotiateVersion),r}}class V{constructor(e){this._transport=e,this._buffer=[],this._executing=!0,this._sendBufferedData=new z,this._transportResult=new z,this._sendLoopPromise=this._sendLoop()}send(e){return this._bufferData(e),this._transportResult||(this._transportResult=new z),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(e){if(this._buffer.length&&typeof this._buffer[0]!=typeof e)throw Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof e}`);this._buffer.push(e),this._sendBufferedData.resolve()}async _sendLoop(){for(;;){if(await this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new z;let e=this._transportResult;this._transportResult=void 0;let t="string"==typeof this._buffer[0]?this._buffer.join(""):V._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(t),e.resolve()}catch(t){e.reject(t)}}}static _concatBuffers(e){let t=new Uint8Array(e.map(e=>e.byteLength).reduce((e,t)=>
1e+t)),r=0;for(let n of e)t.set(new Uint8Array(n),r),r+=n.byteLength;return t.buffer}}class z{constructor(){this.promise=new Promise((e,t)=>([this._resolver,this._rejecter]=[e,t]))}resolve(){this._resolver()}reject(e){this._rejecter(e)}}class J{static write(e){return`${e}${J.RecordSeparator}`}static parse(e){if(e[e.length-1]!==J.RecordSeparator)throw Error("Message is incomplete.");let t=e.split(J.RecordSeparator);return t.pop(),t}}J.RecordSeparatorCode=30,J.RecordSeparator=String.fromCharCode(J.RecordSeparatorCode);class X{writeHandshakeRequest(e){return J.write(JSON.stringify(e))}parseHandshakeResponse(e){let t,r;if(R(e)){let n=new Uint8Array(e),o=n.indexOf(J.RecordSeparatorCode);if(-1===o)throw Error("Message is incomplete.");let i=o+1;t=String.fromCharCode.apply(null,Array.prototype.slice.call(n.slice(0,i))),r=n.byteLength>i?n.slice(i).buffer:null}else{let n=e.indexOf(J.RecordSeparator);if(-1===n)throw Error("Message is incomplete.");let o=n+1;t=e.substring(0,o),r=e.length>o?e.substring(o):null}let n=JSON.parse(J.parse(t)[0]);if(n.type)throw Error("Expected a handshake response from the server.");return[r,n]}}(m=w||(w={}))[m.Invocation=1]="Invocation",m[m.StreamItem=2]="StreamItem",m[m.Completion=3]="Completion",m[m.StreamInvocation=4]="StreamInvocation",m[m.CancelInvocation=5]="CancelInvocation",m[m.Ping=6]="Ping",m[m.Close=7]="Close";class K{constructor(){this.observers=[]}next(e){for(let t of this.observers)t.next(e)}error(e){for(let t of this.observers)t.error&&t.error(e)}complete(){for(let e of this.observers)e.complete&&e.complete()}subscribe(e){return this.observers.push(e),new D(this,e)}}(v=C||(C={})).Disconnected="Disconnected",v.Connecting="Connecting",v.Connected="Connected",v.Disconnecting="Disconnecting",v.Reconnecting="Reconnecting";class Q{constructor(e,t,r,n){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(S.i.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://docs.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},T.isRequired(e,"connection"),T.isRequired(t,"logger"),T.isRequired(r,"protocol"),this.serverTimeoutInMilliseconds=3e4,this.keepAliveIntervalInMilliseconds=15e3,this._logger=t,this._protocol=r,this.connection=e,this._reconnectPolicy=n,this._handshakeProtocol=new X,this.connection.onreceive=e=>this._processIncomingData(e),this.connection.onclose=e=>this._connectionClosed(e),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=C.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:w.Ping})}static create(e,t,r,n){return new Q(e,t,r,n)}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(e){if(this._connectionState!==C.Disconnected&&this._connectionState!==C.Reconnecting)throw Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!e)throw Error("The HubConnection url must be a valid url.");this.connection.baseUrl=e}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}async _startWithStateTransitions(){if(this._connectionState!==C.Disconnected)return Promise.reject(Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=C.Connecting,this._logger.log(S.i.Debug,"Starting HubConnection.");try{await this._startInternal(),I.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=C.Connected,this._connectionStarted=!0,this._logger.log(S.i.Debug,"HubConnection connected successfully.")}catch(e){return this._connectionState=C.Disconnected,this._logger.log(S.i.Debug,`HubConnection failed to start successfully because of error '${e}'.`),Promise.reject(e)}}async _startInternal(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;let e=new Promise((e,t)=>
1{this._handshakeResolver=e,this._handshakeRejecter=t});await this.connection.start(this._protocol.transferFormat);try{let t={protocol:this._protocol.name,version:this._protocol.version};if(this._logger.log(S.i.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(t)),this._logger.log(S.i.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await e,this._stopDuringStartError)throw this._stopDuringStartError}catch(e){throw this._logger.log(S.i.Debug,`Hub handshake failed with error '${e}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(e),e}}async stop(){let e=this._startPromise;this._stopPromise=this._stopInternal(),await this._stopPromise;try{await e}catch(e){}}_stopInternal(e){return this._connectionState===C.Disconnected?(this._logger.log(S.i.Debug,`Call to HubConnection.stop(${e}) ignored because it is already in the disconnected state.`),Promise.resolve()):this._connectionState===C.Disconnecting?(this._logger.log(S.i.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise):(this._connectionState=C.Disconnecting,this._logger.log(S.i.Debug,"Stopping HubConnection."),this._reconnectDelayHandle)?(this._logger.log(S.i.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=e||Error("The connection was stopped before the hub handshake could complete."),this.connection.stop(e))}stream(e,...t){let r;let[n,o]=this._replaceStreamingParams(t),i=this._createStreamInvocation(e,t,o),s=new K;return s.cancelCallback=()=>{let e=this._createCancelInvocation(i.invocationId);return delete this._callbacks[i.invocationId],r.then(()=>this._sendWithProtocol(e))},this._callbacks[i.invocationId]=(e,t)=>{if(t){s.error(t);return}e&&(e.type===w.Completion?e.error?s.error(Error(e.error)):s.complete():s.next(e.item))},r=this._sendWithProtocol(i).catch(e=>{s.error(e),delete this._callbacks[i.invocationId]}),this._launchStreams(n,r),s}_sendMessage(e){return this._resetKeepAliveInterval(),this.connection.send(e)}_sendWithProtocol(e){return this._sendMessage(this._protocol.writeMessage(e))}send(e,...t){let[r,n]=this._replaceStreamingParams(t),o=this._sendWithProtocol(this._createInvocation(e,t,!0,n));return this._launchStreams(r,o),o}invoke(e,...t){let[r,n]=this._replaceStreamingParams(t),o=this._createInvocation(e,t,!1,n);return new Promise((e,t)=>{this._callbacks[o.invocationId]=(r,n)=>{if(n){t(n);return}r&&(r.type===w.Completion?r.error?t(Error(r.error)):e(r.result):t(Error(`Unexpected message type: ${r.type}`)))};let n=this._sendWithProtocol(o).catch(e=>{t(e),delete this._callbacks[o.invocationId]});this._launchStreams(r,n)})}on(e,t){e&&t&&(e=e.toLowerCase(),this._methods[e]||(this._methods[e]=[]),-1===this._methods[e].indexOf(t)&&this._methods[e].push(t))}off(e,t){if(!e)return;e=e.toLowerCase();let r=this._methods[e];if(r){if(t){let n=r.indexOf(t);-1!==n&&(r.splice(n,1),0===r.length&&delete this._methods[e])}else delete this._methods[e]}}onclose(e){e&&this._closedCallbacks.push(e)}onreconnecting(e){e&&this._reconnectingCallbacks.push(e)}onreconnected(e){e&&this._reconnectedCallbacks.push(e)}_processIncomingData(e){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(e=this._processHandshakeResponse(e),this._receivedHandshakeResponse=!0),e)for(let t of this._protocol.parseMessages(e,this._logger))switch(t.type){case w.Invocation:this._invokeClientMethod(t);break;case w.StreamItem:case w.Completion:{let e=this._callbacks[t.invocationId];if(e){t.type===w.Completion&&delete this._callbacks[t.invocationId];try{e(t)}catch(e){this._logger.log(S.i.Error,`Stream callback threw error: ${A(e)}`)}}break}case w.Ping:break;case w.Close:{this._logger.log(S.i.Information,"Close message received from server.");let e=t.error?Error("Server returned an error on close: "+t.error):void 0;!0===t.allowReconnect?this.connection.stop(e):this._stopPromise=this._stopInternal(e);break}default:this._logger.log(S.i.Warning,`Invalid message type: ${t.type}.`)}this._resetTimeoutPeriod()}_processHandshakeResponse(e){let t,r;try{[r,t]=this._handshakeProtocol.parseHandshakeResponse(e)}catch(r){let e="Error parsing handshake response: "+r;this._logger.log(S.i.Error,e);let t=Error(e);throw this._handshakeRejecter(t),t}if(t.error){let e="Server returned handshake error: "+t.error;this._logger.log(S.i.Error,e);let r=Error(e);throw this._handshakeRejecter(r),r}return this._logger.log(S.i.Debug,"Server handshake complete."),this._handshakeResolver(),r}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}
1_resetTimeoutPeriod(){if((!this.connection.features||!this.connection.features.inherentKeepAlive)&&(this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds),void 0===this._pingServerHandle)){let e=this._nextKeepAlive-new Date().getTime();e<0&&(e=0),this._pingServerHandle=setTimeout(async()=>{if(this._connectionState===C.Connected)try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}},e)}}serverTimeout(){this.connection.stop(Error("Server timeout elapsed without receiving a message from the server."))}_invokeClientMethod(e){let t=this._methods[e.target.toLowerCase()];if(t){try{t.forEach(t=>t.apply(this,e.arguments))}catch(t){this._logger.log(S.i.Error,`A callback for the method ${e.target.toLowerCase()} threw error '${t}'.`)}if(e.invocationId){let e="Server requested a response, which is not supported in this version of the client.";this._logger.log(S.i.Error,e),this._stopPromise=this._stopInternal(Error(e))}}else this._logger.log(S.i.Warning,`No client method with the name '${e.target}' found.`)}_connectionClosed(e){this._logger.log(S.i.Debug,`HubConnection.connectionClosed(${e}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||e||Error("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(e||Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===C.Disconnecting?this._completeClose(e):this._connectionState===C.Connected&&this._reconnectPolicy?this._reconnect(e):this._connectionState===C.Connected&&this._completeClose(e)}_completeClose(e){if(this._connectionStarted){this._connectionState=C.Disconnected,this._connectionStarted=!1,I.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(t=>t.apply(this,[e]))}catch(t){this._logger.log(S.i.Error,`An onclose callback called with error '${e}' threw error '${t}'.`)}}}async _reconnect(e){let t=Date.now(),r=0,n=void 0!==e?e:Error("Attempting to reconnect due to a unknown error."),o=this._getNextRetryDelay(r++,0,n);if(null===o){this._logger.log(S.i.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(e);return}if(this._connectionState=C.Reconnecting,e?this._logger.log(S.i.Information,`Connection reconnecting because of error '${e}'.`):this._logger.log(S.i.Information,"Connection reconnecting."),0!==this._reconnectingCallbacks.length){try{this._reconnectingCallbacks.forEach(t=>t.apply(this,[e]))}catch(t){this._logger.log(S.i.Error,`An onreconnecting callback called with error '${e}' threw error '${t}'.`)}if(this._connectionState!==C.Reconnecting){this._logger.log(S.i.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;null!==o;){if(this._logger.log(S.i.Information,`Reconnect attempt number ${r} will start in ${o} ms.`),await new Promise(e=>{this._reconnectDelayHandle=setTimeout(e,o)}),this._reconnectDelayHandle=void 0,this._connectionState!==C.Reconnecting){this._logger.log(S.i.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(await this._startInternal(),this._connectionState=C.Connected,this._logger.log(S.i.Information,"HubConnection reconnected successfully."),0!==this._reconnectedCallbacks.length)try{this._reconnectedCallbacks.forEach(e=>e.apply(this,[this.connection.connectionId]))}catch(e){this._logger.log(S.i.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${e}'.`)}return}catch(e){if(this._logger.log(S.i.Information,`Reconnect attempt failed because of error '${e}'.`),this._connectionState!==C.Reconnecting){this._logger.log(S.i.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===C.Disconnecting&&this._completeClose();return}n=e instanceof Error?e:Error(e.toString()),o=this._getNextRetryDelay(r++,Date.now()-t,n)}}this._logger.log(S.i.Information,`Reconnect retries have been exhausted after ${Date.now()-t} ms and ${r} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(e,t,r){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:t,previousRetryCount:e,retryReason:r})}catch(r){return this._logger.log(S.i.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${e}, ${t}) threw error '${r}'.`),null}}_cancelCallbacksWithError(e){let t=this._callbacks;this._callbacks={},Object.keys(t).forEach(r=>{let n=t[r];try{n(null,e)}catch(t){this._logger.log(S.i.Error,`Stream 'error' callback called with '${e}' threw error: ${A(t)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(e,t,r,n){if(r)return 0!==n.length?{arguments:t,streamIds:n,target:e,type:w.Invocation}:{arguments:t,target:e,type:w.Invocation};{let r=this._invocationId;
1return(this._invocationId++,0!==n.length)?{arguments:t,invocationId:r.toString(),streamIds:n,target:e,type:w.Invocation}:{arguments:t,invocationId:r.toString(),target:e,type:w.Invocation}}}_launchStreams(e,t){if(0!==e.length)for(let r in t||(t=Promise.resolve()),e)e[r].subscribe({complete:()=>{t=t.then(()=>this._sendWithProtocol(this._createCompletionMessage(r)))},error:e=>{let n;n=e instanceof Error?e.message:e&&e.toString?e.toString():"Unknown error",t=t.then(()=>this._sendWithProtocol(this._createCompletionMessage(r,n)))},next:e=>{t=t.then(()=>this._sendWithProtocol(this._createStreamItemMessage(r,e)))}})}_replaceStreamingParams(e){let t=[],r=[];for(let n=0;n<e.length;n++){let o=e[n];if(this._isObservable(o)){let i=this._invocationId;this._invocationId++,t[i]=o,r.push(i.toString()),e.splice(n,1)}}return[t,r]}_isObservable(e){return e&&e.subscribe&&"function"==typeof e.subscribe}_createStreamInvocation(e,t,r){let n=this._invocationId;return(this._invocationId++,0!==r.length)?{arguments:t,invocationId:n.toString(),streamIds:r,target:e,type:w.StreamInvocation}:{arguments:t,invocationId:n.toString(),target:e,type:w.StreamInvocation}}_createCancelInvocation(e){return{invocationId:e,type:w.CancelInvocation}}_createStreamItemMessage(e,t){return{invocationId:e,item:t,type:w.StreamItem}}_createCompletionMessage(e,t,r){return t?{error:t,invocationId:e,type:w.Completion}:{invocationId:e,result:r,type:w.Completion}}}class Y{constructor(){this.name="json",this.version=1,this.transferFormat=b.Text}parseMessages(e,t){if("string"!=typeof e)throw Error("Invalid input for JSON hub protocol. Expected a string.");if(!e)return[];null===t&&(t=E.instance);let r=J.parse(e),n=[];for(let e of r){let r=JSON.parse(e);if("number"!=typeof r.type)throw Error("Invalid payload.");switch(r.type){case w.Invocation:this._isInvocationMessage(r);break;case w.StreamItem:this._isStreamItemMessage(r);break;case w.Completion:this._isCompletionMessage(r);break;case w.Ping:case w.Close:break;default:t.log(S.i.Information,"Unknown message type '"+r.type+"' ignored.");continue}n.push(r)}return n}writeMessage(e){return J.write(JSON.stringify(e))}_isInvocationMessage(e){this._assertNotEmptyString(e.target,"Invalid payload for Invocation message."),void 0!==e.invocationId&&this._assertNotEmptyString(e.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(e){if(this._assertNotEmptyString(e.invocationId,"Invalid payload for StreamItem message."),void 0===e.item)throw Error("Invalid payload for StreamItem message.")}_isCompletionMessage(e){if(e.result&&e.error)throw Error("Invalid payload for Completion message.");!e.result&&e.error&&this._assertNotEmptyString(e.error,"Invalid payload for Completion message."),this._assertNotEmptyString(e.invocationId,"Invalid payload for Completion message.")}_assertNotEmptyString(e,t){if("string"!=typeof e||""===e)throw Error(t)}}let G={trace:S.i.Trace,debug:S.i.Debug,info:S.i.Information,information:S.i.Information,warn:S.i.Warning,warning:S.i.Warning,error:S.i.Error,critical:S.i.Critical,none:S.i.None};class Z{configureLogging(e){if(T.isRequired(e,"logging"),void 0!==e.log)this.logger=e;else if("string"==typeof e){let t=function(e){let t=G[e.toLowerCase()];if(void 0!==t)return t;throw Error(`Unknown log level: ${e}`)}(e);this.logger=new x(t)}else this.logger=new x(e);return this}withUrl(e,t){return T.isRequired(e,"url"),T.isNotEmpty(e,"url"),this.url=e,"object"==typeof t?this.httpConnectionOptions={...this.httpConnectionOptions,...t}:this.httpConnectionOptions={...this.httpConnectionOptions,transport:t},this}withHubProtocol(e){return T.isRequired(e,"protocol"),this.protocol=e,this}withAutomaticReconnect(e){if(this.reconnectPolicy)throw Error("A reconnectPolicy has already been set.");return e?Array.isArray(e)?this.reconnectPolicy=new o(e):this.reconnectPolicy=e:this.reconnectPolicy=new o,this}build(){let e=this.httpConnectionOptions||{};if(void 0===e.logger&&(e.logger=this.logger),!this.url)throw Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");let t=new F(this.url,e);return Q.create(t,this.logger||E.instance,this.protocol||new Y,this.reconnectPolicy)}}},90808:function(e,t,r){"use strict";var n,o;r.d(t,{i:function(){return n}}),(o=n||(n={}))[o.Trace=0]="Trace",o[o.Debug=1]="Debug",o[o.Information=2]="Information",o[o.Warning=3]="Warning",o[o.Error=4]="Error",o[o.Critical=5]="Critical",o[o.None=6]="None"},18229:function(e,t,r){"use strict";r.d(t,{kZ:function(){return a},rg:function(){return i}});var n=r(2265);let o=(0,n.createContext)(null);function i({clientId:e,onScriptLoadSuccess:t,onScriptLoadError:r,children:i}){let s=function(e={}){let{onScriptLoadSuccess:t,onScriptLoadError:r}
1=e,[o,i]=(0,n.useState)(!1),s=(0,n.useRef)(t);s.current=t;let a=(0,n.useRef)(r);return a.current=r,(0,n.useEffect)(()=>{let e=document.createElement("script");return e.src="https://accounts.google.com/gsi/client",e.async=!0,e.defer=!0,e.onload=()=>{var e;i(!0),null===(e=s.current)||void 0===e||e.call(s)},e.onerror=()=>{var e;i(!1),null===(e=a.current)||void 0===e||e.call(a)},document.body.appendChild(e),()=>{document.body.removeChild(e)}},[]),o}({onScriptLoadSuccess:t,onScriptLoadError:r}),a=(0,n.useMemo)(()=>({clientId:e,scriptLoadedSuccessfully:s}),[e,s]);return n.createElement(o.Provider,{value:a},i)}let s={large:40,medium:32,small:20};function a({onSuccess:e,onError:t,useOneTap:r,promptMomentNotification:i,type:a="standard",theme:c="outline",size:l="large",text:h,shape:u,logo_alignment:d,width:g,locale:p,click_listener:_,...f}){let m=(0,n.useRef)(null),{clientId:v,scriptLoadedSuccessfully:y}=function(){let e=(0,n.useContext)(o);if(!e)throw Error("Google OAuth components must be used within GoogleOAuthProvider");return e}(),b=(0,n.useRef)(e);b.current=e;let w=(0,n.useRef)(t);w.current=t;let C=(0,n.useRef)(i);return C.current=i,(0,n.useEffect)(()=>{var e,t,n;if(y)return null===(e=window.google)||void 0===e||e.accounts.id.initialize({client_id:v,callback:e=>{var t,r;if(!(null==e?void 0:e.credential))return null===(t=w.current)||void 0===t?void 0:t.call(w);let{credential:n,select_by:o}=e;b.current({credential:n,clientId:null!==(r=null==e?void 0:e.clientId)&&void 0!==r?r:null==e?void 0:e.client_id,select_by:o})},...f}),null===(t=window.google)||void 0===t||t.accounts.id.renderButton(m.current,{type:a,theme:c,size:l,text:h,shape:u,logo_alignment:d,width:g,locale:p,click_listener:_}),r&&(null===(n=window.google)||void 0===n||n.accounts.id.prompt(C.current)),()=>{var e;r&&(null===(e=window.google)||void 0===e||e.accounts.id.cancel())}},[v,y,r,a,c,l,h,u,d,g,p]),n.createElement("div",{ref:m,style:{height:s[l]}})}},55037:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.destroyCookie=t.setCookie=t.parseCookies=void 0;var o=r(98774),i=r(63508),s=r(21562);function a(e,t){var r,n;return(null===(n=null===(r=null==e?void 0:e.req)||void 0===r?void 0:r.headers)||void 0===n?void 0:n.cookie)?o.parse(e.req.headers.cookie,t):s.isBrowser()?o.parse(document.cookie,t):{}}function c(e,t,r,a){var c,l;if(void 0===a&&(a={}),(null===(c=null==e?void 0:e.res)||void 0===c?void 0:c.getHeader)&&e.res.setHeader){if(null===(l=null==e?void 0:e.res)||void 0===l?void 0:l.finished)return console.warn('Not setting "'+t+'" cookie. Response has finished.'),console.warn("You should set cookie before res.send()"),{};var h=e.res.getHeader("Set-Cookie")||[];"string"==typeof h&&(h=[h]),"number"==typeof h&&(h=[]);var u=i.parse(h,{decodeValues:!1}),d=s.createCookie(t,r,a),g=[];u.forEach(function(e){if(!s.areCookiesEqual(e,d)){var t=o.serialize(e.name,e.value,n({encode:function(e){return e}},e));g.push(t)}}),g.push(o.serialize(t,r,a)),e.res.setHeader("Set-Cookie",g)}if(s.isBrowser()){if(a&&a.httpOnly)throw Error("Can not set a httpOnly cookie in the browser.");document.cookie=o.serialize(t,r,a)}return{}}function l(e,t,r){return c(e,t,"",n(n({},r||{}),{maxAge:-1}))}t.parseCookies=a,t.setCookie=c,t.destroyCookie=l,t.default={set:c,get:a,destroy:l}},21562:function(e,t){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function n(e,t){var r=Object.getOwnPropertyNames(e),n=Object.getOwnPropertyNames(t);if(r.length!==n.length)return!1;for(var o=0;o<r.length;o++){var i=r[o];if(e[i]!==t[i])return!1}return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.areCookiesEqual=t.hasSameProperties=t.createCookie=t.isBrowser=void 0,t.isBrowser=function(){return"undefined"!=typeof window},t.createCookie=function(e,t,n){var o=n.sameSite;!0===o&&(o="strict"),(void 0===o||!1===o)&&(o="lax");var i=r(r({},n),{sameSite:o});return delete i.encode,r({name:e,value:t},i)},t.hasSameProperties=n,t.areCookiesEqual=function(e,t){var o=e.sameSite===t.sameSite;return"string"==typeof e.sameSite&&"string"==typeof t.sameSite&&(o=e.sameSite.toLowerCase()===t.sameSite.toLowerCase()),n(r(r({},e),{sameSite:void 0}),r(r({},t),{sameSite:void 0}))&&o}},98774:function(e,t){"use strict";t.parse=function(e,t){if("string"!=typeof e)throw TypeError("argument str must be a string");for(var n={},o=e.split(";"),i=(t||{}).decode||r,s=0;s<o.length;s++){var a=o[s],c=a.indexOf("=");if(!(c<0)){var l=a.substring(0,c).trim();if(void 0==n[l]){var h=a.substring(c+1,a.length).trim();'"'===h[0]&&(h=h.slice(1,-1)),n[l]=function(e,t){try{return t(e)}catch(t){return e}}(h,i)}}}return n},t.serialize=function(e,t,r){var i=r||{},s=i.encode||n;if("function"!=typeof s)throw TypeError("option encode is invali
1d");if(!o.test(e))throw TypeError("argument name is invalid");var a=s(t);if(a&&!o.test(a))throw TypeError("argument val is invalid");var c=e+"="+a;if(null!=i.maxAge){var l=i.maxAge-0;if(isNaN(l)||!isFinite(l))throw TypeError("option maxAge is invalid");c+="; Max-Age="+Math.floor(l)}if(i.domain){if(!o.test(i.domain))throw TypeError("option domain is invalid");c+="; Domain="+i.domain}if(i.path){if(!o.test(i.path))throw TypeError("option path is invalid");c+="; Path="+i.path}if(i.expires){if("function"!=typeof i.expires.toUTCString)throw TypeError("option expires is invalid");c+="; Expires="+i.expires.toUTCString()}if(i.httpOnly&&(c+="; HttpOnly"),i.secure&&(c+="; Secure"),i.sameSite)switch("string"==typeof i.sameSite?i.sameSite.toLowerCase():i.sameSite){case!0:case"strict":c+="; SameSite=Strict";break;case"lax":c+="; SameSite=Lax";break;case"none":c+="; SameSite=None";break;default:throw TypeError("option sameSite is invalid")}return c};var r=decodeURIComponent,n=encodeURIComponent,o=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/},10797:function(e,t,r){"use strict";r.d(t,{Z:function(){return T}});var n=r(2265),o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{},i={},s={};Object.defineProperty(s,"__esModule",{value:!0}),s.clone=void 0,s.clone=function(e){return e?JSON.parse(JSON.stringify(e)):null};var a={};Object.defineProperty(a,"__esModule",{value:!0}),a.matches=void 0,a.matches=function(e,t){var r,n,o,i,s,a;return Array.isArray(t)?(r=t[0],n=t[1],o=String(r).length,s=parseInt(i=e.substr(0,o),10),r=parseInt(String(r).substr(0,i.length),10),n=parseInt(String(n).substr(0,i.length),10),s>=r&&s<=n):(a=String(a=t)).substring(0,e.length)===e.substring(0,a.length)},Object.defineProperty(i,"__esModule",{value:!0}),i.addMatchingCardsToResults=void 0,i.addMatchingCardsToResults=function(e,t,r){var n,o;for(n=0;n<t.patterns.length;n++){var i=t.patterns[n];if(a.matches(e,i)){var c=s.clone(t);o=Array.isArray(i)?String(i[0]).length:String(i).length,e.length>=o&&(c.matchStrength=o),r.push(c);break}}};var c={};Object.defineProperty(c,"__esModule",{value:!0}),c.isValidInputType=void 0,c.isValidInputType=function(e){return"string"==typeof e||e instanceof String};var l={};Object.defineProperty(l,"__esModule",{value:!0}),l.findBestMatch=void 0,l.findBestMatch=function(e){var t;return(t=e.filter(function(e){return e.matchStrength}).length)>0&&t===e.length?e.reduce(function(e,t){return e?Number(e.matchStrength)<Number(t.matchStrength)?t:e:t}):null};var h=o&&o.__assign||function(){return(h=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},u={visa:{niceType:"Visa",type:"visa",patterns:[4],gaps:[4,8,12],lengths:[16,18,19],code:{name:"CVV",size:3}},mastercard:{niceType:"Mastercard",type:"mastercard",patterns:[[51,55],[2221,2229],[223,229],[23,26],[270,271],2720],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}},"american-express":{niceType:"American Express",type:"american-express",patterns:[34,37],gaps:[4,10],lengths:[15],code:{name:"CID",size:4}},"diners-club":{niceType:"Diners Club",type:"diners-club",patterns:[[300,305],36,38,39],gaps:[4,10],lengths:[14,16,19],code:{name:"CVV",size:3}},discover:{niceType:"Discover",type:"discover",patterns:[6011,[644,649],65],gaps:[4,8,12],lengths:[16,19],code:{name:"CID",size:3}},jcb:{niceType:"JCB",type:"jcb",patterns:[2131,1800,[3528,3589]],gaps:[4,8,12],lengths:[16,17,18,19],code:{name:"CVV",size:3}},unionpay:{niceType:"UnionPay",type:"unionpay",patterns:[620,[624,626],[62100,62182],[62184,62187],[62185,62197],[62200,62205],[622010,622999],622018,[622019,622999],[62207,62209],[622126,622925],[623,626],6270,6272,6276,[627700,627779],[627781,627799],[6282,6289],6291,6292,810,[8110,8131],[8132,8151],[8152,8163],[8164,8171]],gaps:[4,8,12],lengths:[14,15,16,17,18,19],code:{name:"CVN",size:3}},maestro:{niceType:"Maestro",type:"maestro",patterns:[493698,[5e5,504174],[504176,506698],[506779,508999],[56,59],63,67,6],gaps:[4,8,12],lengths:[12,13,14,15,16,17,18,19],code:{name:"CVC",size:3}},elo:{niceType:"Elo",type:"elo",patterns:[401178,401179,438935,457631,457632,431274,451416,457393,504175,[506699,506778],[509e3,509999],627780,636297,636368,[650031,650033],[650035,650051],[650405,650439],[650485,650538],[650541,650598],[650700,650718],[650720,650727],[650901,650978],[651652,651679],[655e3,655019],[655021,655058]],gaps:[4,8,12],lengths:[16],code:{name:"CVE",size:3}},mir:{niceType:"Mir",type:"mir",patterns:[[2200,2204]],gaps:[4,8,12],lengths:[16,17,18,19],code:{name:"CVP2",size:3}}
1,hiper:{niceType:"Hiper",type:"hiper",patterns:[637095,63737423,63743358,637568,637599,637609,637612],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}},hipercard:{niceType:"Hipercard",type:"hipercard",patterns:[606282],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}}},d={},g={VISA:"visa",MASTERCARD:"mastercard",AMERICAN_EXPRESS:"american-express",DINERS_CLUB:"diners-club",DISCOVER:"discover",JCB:"jcb",UNIONPAY:"unionpay",MAESTRO:"maestro",ELO:"elo",MIR:"mir",HIPER:"hiper",HIPERCARD:"hipercard"},p=[g.VISA,g.MASTERCARD,g.AMERICAN_EXPRESS,g.DINERS_CLUB,g.DISCOVER,g.JCB,g.UNIONPAY,g.MAESTRO,g.ELO,g.MIR,g.HIPER,g.HIPERCARD],_=s.clone(p);function f(e){return d[e]||u[e]}function m(e,t){void 0===t&&(t=!1);var r=_.indexOf(e);if(!t&&-1===r)throw Error('"'+e+'" is not a supported card type.');return r}function v(e){var t=[];if(!c.isValidInputType(e))return t;if(0===e.length)return _.map(function(e){return s.clone(f(e))});_.forEach(function(r){var n=f(r);i.addMatchingCardsToResults(e,n,t)});var r=l.findBestMatch(t);return r?[r]:t}v.getTypeInfo=function(e){return s.clone(f(e))},v.removeCard=function(e){var t=m(e);_.splice(t,1)},v.addCard=function(e){var t=m(e.type,!0);d[e.type]=e,-1===t&&_.push(e.type)},v.updateCard=function(e,t){var r=d[e]||u[e];if(!r)throw Error('"'+e+"\" is not a recognized type. Use `addCard` instead.'");if(t.type&&r.type!==t.type)throw Error("Cannot overwrite type parameter.");var n=s.clone(r);d[(n=h(h({},n),t)).type]=n},v.changeOrder=function(e,t){var r=m(e);_.splice(r,1),_.splice(t,0,e)},v.resetModifications=function(){_=s.clone(p),d={}},v.types=g;var y={niceType:"Dankort",type:"dankort",patterns:[5019],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}},b={niceType:"Laser",type:"laser",patterns:[6706,6771,6709],gaps:[4,8,12],lengths:[16,19],code:{name:"CVV",size:3}},w={niceType:"Visa Electron",type:"visa-electron",patterns:[4026,417500,4405,4508,4844,49137],gaps:[4,8,12],lengths:[16],code:{name:"CVV",size:3}},C=function(e){var t,r,n=String(e).replace(/[\s]/g,""),o=n.length,i=!1,s=0;if(!/^[0-9]+$/.test(n))return!1;for(var a=o;a>0;a--){if(t=parseInt(n.charAt(a-1)),i){switch(r=2*t){case 10:r=1;break;case 12:r=3;break;case 14:r=5;break;case 16:r=7;break;case 18:r=9}s+=r}else s+=t;i=!i}return 0!==s&&s%10==0},S=function(e){var t=v(e.toString().trim().replace(" ",""));if(1===t.length){var r=t.shift();return(null==r?void 0:r.type)||"unknown"}return"unknown"},E=function(){return v.updateCard(v.types.MAESTRO,{patterns:[493698,[5e3,5018],[502e3,506698],[506779,508999],[56,59],63,67,6]}),v.updateCard(v.types.HIPERCARD,{patterns:[384100,384140,384160,606282,637095,637568]}),v.addCard(y),v.addCard(b),v.addCard(w),Object.values(v.types).concat(["dankort","laser","visa-electron"])},k={amex:["amex","americanexpress","american-express"],dinersclub:["diners","dinersclub","diners-club"]};function T(e){var t=e.acceptedCards,r=void 0===t?[]:t,o=e.number,i=e.issuer,s=e.preview,a=void 0!==s&&s,c=e.expiry,l=e.cvc,h=e.focused,u=e.locale,d=e.name,g=e.placeholders,p=e.callback,_=n.useState(E()),f=_[0],m=_[1],v=n.useMemo(function(){return(null==r?void 0:r.length)?f.filter(function(e){return r.includes(e)}):f},[r,f]),y=n.useMemo(function(){var e="unknown";if(o){var t=S(o);v.includes(t)&&(e=t)}var r=16;return k.amex.includes(e)?r=15:(null==k?void 0:k.dinersclub.includes(e))?r=14:["hipercard","mastercard","visa"].includes(e)&&(r=19),{issuer:e,maxLength:r}},[o,v]),b=n.useMemo(function(){return a&&i?i.toLowerCase():y.issuer},[y.issuer,i,a]),w=n.useMemo(function(){var e=a?19:y.maxLength,t="number"==typeof o?o.toString():String(o).replace(/[A-Za-z]| /g,"");for(isNaN(parseInt(t,10))&&!a&&(t=""),e>16&&(e=t.length<=16?16:e),t.length>e&&(t=t.slice(0,e));t.length<e;)t+="â¢";if(k.amex.includes(b)||k.dinersclub.includes(b)){var r=[0,4,10],n=[4,6,5];t="".concat(t.substr(r[0],n[0])," ").concat(t.substr(r[1],n[1])," ").concat(t.substr(r[2],n[2]))}else if(t.length>16)r=[0,4,8,12],n=[4,7],t="".concat(t.substr(r[0],n[0])," ").concat(t.substr(r[1],n[0])," ").concat(t.substr(r[2],n[0])," ").concat(t.substr(r[3],n[1]));else for(var i=1;i<e/4;i++){var s=4*i+(i-1);t="".concat(t.slice(0,s)," ").concat(t.slice(s))}return t},[y.maxLength,b,o,a]),T=n.useMemo(function(){var e,t="number"==typeof c?c.toString():c,r="",n="";for(t.includes("/")?(r=(e=t.split("/"))[0],n=e[1]):t.length&&(r=t.substr(0,2),n=t.substr(2,6));r.length<2;)r+="â¢";for(n.length>2&&(n=n.substr(2,4));n.length<2;)n+="â¢";return"".concat(r,"/").concat(n)},[c]),I=n.useCallback(function(e){e.length?m(f.filter(function(t){return e.includes(t)})):m(E())},[f]);return n.useEffect(function(){w!==o&&"function"==typeof p&&p(y,C(String(o))),E().toString()!==f.toString()&&I(r)},[r,p,y,w,I,o,f]),n.createElement("div",{key:"Cards",className:"rccs","data-testid":"rccs"},n.createElement("div",{"data-testid":"rccs__card",className:["rccs__card","rccs__card--".concat(b),"cvc"===h&&"american-express"!==b?"rccs__card--flipped":""].join(" ").trim()},n.createElement("div",{className:"rccs__card--front"},n.createElement("div",{className:"rccs__card__background"}),n.createElement("div",{className:"rccs__issuer"}),n.createElement("div",{className:["rccs__cvc__front","cvc"===h?"rccs--focused":""].join(" ").trim()},l),n.createElement("div",{className:["rccs__number",w.replace(/ /g,"").length>16?"rccs__number--large":"","number"===h?"rccs--focused":"","â¢"!==w.substr(0,1)?"rccs--filled":""].join(" ").trim()},w),n.createElement("div",{className:["rccs__name","name"===h?"rccs--focused":"",d?"rccs--filled":""].join(" ").trim()},d||(void 0===g?{name:"YOUR NAME HERE"}:g).name),n.createElement("div",{className:["rccs__expiry","expiry"===h?"rccs--focused":"","â¢"!==T.substr(0,1)?"rccs--filled":""].join(" ").trim()},n.createElement("div",{className:"rccs__expiry__valid"},(void 0===u?{valid:"valid thru"}:u).valid),n.createElement("div",{className:"rccs__expiry__value"},T)),n.createElement("div",{className:"rccs__chip"})),n.createElement("div",{className:"rccs__card--back"},n.createElement("div",{className:"rccs__card__background"}),n.createElement("div",{className:"rccs__stripe"}),n.createElement("div",{className:"rccs__signature"}),n.createElement("div",{className:["rccs__cvc","cvc"===h?"rccs--focused":""].join(" ").trim()},l),n.createElement("div",{className:"rccs__issuer"}))))}},63508:function(e){"use strict";var t={decodeValues:!0,map:!1,silent:!1};function r(e){return"string"==typeof e&&!!e.trim()}function n(e,n){var o,i,s,a,c=e.split(";").filter(r),l=(o=c.shift(),i="",s="",(a=o.split("=")).length>1?(i=a.shift(),s=a.join("=")):s=o,{name:i,value:s}),h=l.name,u=l.value;n=n?Object.assign({},t,n):t;try{u=n.decodeValues?decodeURIComponent(u):u}catch(e){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+u+"'. Set options.decodeValues to false to disable this feature.",e)}var d={name:h,value:u};
1return c.forEach(function(e){var t=e.split("="),r=t.shift().trimLeft().toLowerCase(),n=t.join("=");"expires"===r?d.expires=new Date(n):"max-age"===r?d.maxAge=parseInt(n,10):"secure"===r?d.secure=!0:"httponly"===r?d.httpOnly=!0:"samesite"===r?d.sameSite=n:"partitioned"===r?d.partitioned=!0:d[r]=n}),d}function o(e,o){if(o=o?Object.assign({},t,o):t,!e)return o.map?{}:[];if(e.headers){if("function"==typeof e.headers.getSetCookie)e=e.headers.getSetCookie();else if(e.headers["set-cookie"])e=e.headers["set-cookie"];else{var i=e.headers[Object.keys(e.headers).find(function(e){return"set-cookie"===e.toLowerCase()})];i||!e.headers.cookie||o.silent||console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),e=i}}return(Array.isArray(e)||(e=[e]),o.map)?e.filter(r).reduce(function(e,t){var r=n(t,o);return e[r.name]=r,e},{}):e.filter(r).map(function(e){return n(e,o)})}e.exports=o,e.exports.parse=o,e.exports.parseString=n,e.exports.splitCookiesString=function(e){if(Array.isArray(e))return e;if("string"!=typeof e)return[];var t,r,n,o,i,s=[],a=0;function c(){for(;a<e.length&&/\s/.test(e.charAt(a));)a+=1;return a<e.length}for(;a<e.length;){for(t=a,i=!1;c();)if(","===(r=e.charAt(a))){for(n=a,a+=1,c(),o=a;a<e.length&&"="!==(r=e.charAt(a))&&";"!==r&&","!==r;)a+=1;a<e.length&&"="===e.charAt(a)?(i=!0,a=o,s.push(e.substring(t,n)),t=a):a=n+1}else a+=1;(!i||a>=e.length)&&s.push(e.substring(t,e.length))}return s}},18117:function(){},76889:function(){}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.