@univerjs/network 0.3.0-alpha.0 → 0.3.0-nightly.202410101606

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.
package/lib/cjs/index.js CHANGED
@@ -1,2 +1 @@
1
- "use strict";var __defProp=Object.defineProperty;var __defNormalProp=(obj,key,value)=>key in obj?__defProp(obj,key,{enumerable:!0,configurable:!0,writable:!0,value}):obj[key]=value;var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __publicField=(obj,key,value)=>__defNormalProp(obj,typeof key!="symbol"?key+"":key,value);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const core=require("@univerjs/core"),rxjs=require("rxjs"),operators=require("rxjs/operators"),ApplicationJSONType="application/json",_HTTPHeaders=class _HTTPHeaders{constructor(headers){__publicField(this,"_headers",new Map);typeof headers=="string"?this._handleHeadersString(headers):headers instanceof Headers?this._handleHeaders(headers):headers&&this._handleHeadersConstructorProps(headers)}forEach(callback){this._headers.forEach((v,key)=>callback(key,v))}has(key){return!!this._headers.has(key.toLowerCase())}get(key){const k=key.toLowerCase();return this._headers.has(k)?this._headers.get(k):null}set(key,value){this._setHeader(key,value)}toHeadersInit(){var _a2,_b;const headers={};return this._headers.forEach((values,key)=>{headers[key]=values.join(",")}),(_a2=headers.accept)!=null||(headers.accept="application/json, text/plain, */*"),(_b=headers["content-type"])!=null||(headers["content-type"]="application/json;charset=UTF-8"),headers}_setHeader(name,value){const lowerCase=name.toLowerCase();this._headers.has(lowerCase)?this._headers.get(lowerCase).push(value.toString()):this._headers.set(lowerCase,[value.toString()])}_handleHeadersString(headers){headers.split(`
2
- `).forEach(header=>{const[name,value]=header.split(":");name&&value&&this._setHeader(name,value)})}_handleHeadersConstructorProps(headers){Object.entries(headers).forEach(([name,value])=>this._setHeader(name,value))}_handleHeaders(headers){headers.forEach((value,name)=>this._setHeader(name,value))}};__name(_HTTPHeaders,"HTTPHeaders");let HTTPHeaders=_HTTPHeaders;const IHTTPImplementation=core.createIdentifier("network.http-implementation"),_HTTPParams=class _HTTPParams{constructor(params){this.params=params}toString(){return this.params?Object.keys(this.params).map(key=>`${key}=${this.params[key]}`).join("&"):""}};__name(_HTTPParams,"HTTPParams");let HTTPParams=_HTTPParams,HTTPRequestUID=0;const _HTTPRequest=class _HTTPRequest{constructor(method,url,requestParams){__publicField(this,"uid",HTTPRequestUID++);this.method=method,this.url=url,this.requestParams=requestParams}get headers(){return this.requestParams.headers}get withCredentials(){return this.requestParams.withCredentials}get responseType(){return this.requestParams.responseType}getUrlWithParams(){var _a2,_b;const params=(_b=(_a2=this.requestParams)==null?void 0:_a2.params)==null?void 0:_b.toString();return params?`${this.url}${this.url.includes("?")?"&":"?"}${params}`:this.url}getBody(){var _a2,_b;const contentType=(_a2=this.headers.get("Content-Type"))!=null?_a2:ApplicationJSONType,body=(_b=this.requestParams)==null?void 0:_b.body;return contentType===ApplicationJSONType&&body&&typeof body=="object"?JSON.stringify(body):body?`${body}`:null}getHeadersInit(){return this.headers.toHeadersInit()}};__name(_HTTPRequest,"HTTPRequest");let HTTPRequest=_HTTPRequest;var __defProp2=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__decorateClass=__name((decorators,target,key,kind)=>{for(var result=kind>1?void 0:kind?__getOwnPropDesc(target,key):target,i=decorators.length-1,decorator;i>=0;i--)(decorator=decorators[i])&&(result=(kind?decorator(target,key,result):decorator(result))||result);return kind&&result&&__defProp2(target,key,result),result},"__decorateClass"),__decorateParam=__name((index,decorator)=>(target,key)=>decorator(target,key,index),"__decorateParam"),_a;exports.HTTPService=(_a=class extends core.Disposable{constructor(_http){super();__publicField(this,"_interceptors",[]);__publicField(this,"_pipe");this._http=_http}registerHTTPInterceptor(interceptor){if(this._interceptors.indexOf(interceptor)!==-1)throw new Error("[HTTPService]: The interceptor has already been registered!");return this._interceptors.push(interceptor),this._interceptors=this._interceptors.sort((a,b)=>{var _a2,_b;return((_a2=a.priority)!=null?_a2:0)-((_b=b.priority)!=null?_b:0)}),this._pipe=null,core.toDisposable(()=>core.remove(this._interceptors,interceptor))}get(url,params){return this._request("GET",url,params)}post(url,params){return this._request("POST",url,params)}put(url,params){return this._request("PUT",url,params)}delete(url,params){return this._request("DELETE",url,params)}patch(url,options){return this._request("PATCH",url,options)}getSSE(method,url,options){var _a2,_b;const headers=new HTTPHeaders(options==null?void 0:options.headers),params=new HTTPParams(options==null?void 0:options.params),request=new HTTPRequest(method,url,{headers,params,withCredentials:(_a2=options==null?void 0:options.withCredentials)!=null?_a2:!1,reportProgress:!0,responseType:(_b=options==null?void 0:options.responseType)!=null?_b:"json",body:["GET","DELETE"].includes(method)||options==null?void 0:options.body});return rxjs.of(request).pipe(operators.concatMap(request2=>this._runInterceptorsAndImplementation(request2)))}async _request(method,url,options){var _a2,_b;const headers=new HTTPHeaders(options==null?void 0:options.headers),params=new HTTPParams(options==null?void 0:options.params),request=new HTTPRequest(method,url,{headers,params,withCredentials:(_a2=options==null?void 0:options.withCredentials)!=null?_a2:!1,responseType:(_b=options==null?void 0:options.responseType)!=null?_b:"json",body:["GET","DELETE"].includes(method)||options==null?void 0:options.body}),events$=rxjs.of(request).pipe(operators.concatMap(request2=>this._runInterceptorsAndImplementation(request2)));return await rxjs.firstValueFrom(events$)}_runInterceptorsAndImplementation(request){return this._pipe||(this._pipe=this._interceptors.map(handler=>handler.interceptor).reduceRight((nextHandlerFunction,interceptorFunction)=>chainInterceptorFn(nextHandlerFunction,interceptorFunction),(requestFromPrevInterceptor,finalHandler)=>finalHandler(requestFromPrevInterceptor))),this._pipe(request,requestToNext=>this._http.send(requestToNext))}},__name(_a,"HTTPService"),_a);exports.HTTPService=__decorateClass([__decorateParam(0,IHTTPImplementation)],exports.HTTPService);function chainInterceptorFn(afterInterceptorChain,currentInterceptorFn){return(prevRequest,nextHandlerFn)=>currentInterceptorFn(prevRequest,nextRequest=>afterInterceptorChain(nextRequest,nextHandlerFn))}__name(chainInterceptorFn,"chainInterceptorFn");var HTTPEventType=(HTTPEventType2=>(HTTPEventType2[HTTPEventType2.DownloadProgress=0]="DownloadProgress",HTTPEventType2[HTTPEventType2.Response=1]="Response",HTTPEventType2))(HTTPEventType||{});const _HTTPResponse=class _HTTPResponse{constructor({body,headers,status,statusText}){__publicField(this,"type",1);__publicField(this,"body");__publicField(this,"headers");__publicField(this,"status");__publicField(this,"statusText");this.body=body,this.headers=headers,this.status=status,this.statusText=statusText}};__name(_HTTPResponse,"HTTPResponse");let HTTPResponse=_HTTPResponse;const _HTTPProgress=class _HTTPProgress{constructor(total,loaded,partialText){__publicField(this,"type",0);this.total=total,this.loaded=loaded,this.partialText=partialText}};__name(_HTTPProgress,"HTTPProgress");let HTTPProgress=_HTTPProgress;const _ResponseHeader=class _ResponseHeader{constructor(headers,status,statusText){this.headers=headers,this.status=status,this.statusText=statusText}};__name(_ResponseHeader,"ResponseHeader");let ResponseHeader=_ResponseHeader;const _HTTPResponseError=class _HTTPResponseError{constructor({headers,status,statusText,error}){__publicField(this,"headers");__publicField(this,"status");__publicField(this,"statusText");__publicField(this,"error");this.headers=headers,this.status=status,this.statusText=statusText,this.error=error}};__name(_HTTPResponseError,"HTTPResponseError");let HTTPResponseError=_HTTPResponseError;const SuccessStatusCodeLowerBound=200,ErrorStatusCodeLowerBound=300;var HTTPStatusCode=(HTTPStatusCode2=>(HTTPStatusCode2[HTTPStatusCode2.Continue=100]="Continue",HTTPStatusCode2[HTTPStatusCode2.SwitchingProtocols=101]="SwitchingProtocols",HTTPStatusCode2[HTTPStatusCode2.Processing=102]="Processing",HTTPStatusCode2[HTTPStatusCode2.EarlyHints=103]="EarlyHints",HTTPStatusCode2[HTTPStatusCode2.Ok=200]="Ok",HTTPStatusCode2[HTTPStatusCode2.Created=201]="Created",HTTPStatusCode2[HTTPStatusCode2.Accepted=202]="Accepted",HTTPStatusCode2[HTTPStatusCode2.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",HTTPStatusCode2[HTTPStatusCode2.NoContent=204]="NoContent",HTTPStatusCode2[HTTPStatusCode2.ResetContent=205]="ResetContent",HTTPStatusCode2[HTTPStatusCode2.PartialContent=206]="PartialContent",HTTPStatusCode2[HTTPStatusCode2.MultiStatus=207]="MultiStatus",HTTPStatusCode2[HTTPStatusCode2.AlreadyReported=208]="AlreadyReported",HTTPStatusCode2[HTTPStatusCode2.ImUsed=226]="ImUsed",HTTPStatusCode2[HTTPStatusCode2.MultipleChoices=300]="MultipleChoices",HTTPStatusCode2[HTTPStatusCode2.MovedPermanently=301]="MovedPermanently",HTTPStatusCode2[HTTPStatusCode2.Found=302]="Found",HTTPStatusCode2[HTTPStatusCode2.SeeOther=303]="SeeOther",HTTPStatusCode2[HTTPStatusCode2.NotModified=304]="NotModified",HTTPStatusCode2[HTTPStatusCode2.UseProxy=305]="UseProxy",HTTPStatusCode2[HTTPStatusCode2.Unused=306]="Unused",HTTPStatusCode2[HTTPStatusCode2.TemporaryRedirect=307]="TemporaryRedirect",HTTPStatusCode2[HTTPStatusCode2.PermanentRedirect=308]="PermanentRedirect",HTTPStatusCode2[HTTPStatusCode2.BadRequest=400]="BadRequest",HTTPStatusCode2[HTTPStatusCode2.Unauthorized=401]="Unauthorized",HTTPStatusCode2[HTTPStatusCode2.PaymentRequired=402]="PaymentRequired",HTTPStatusCode2[HTTPStatusCode2.Forbidden=403]="Forbidden",HTTPStatusCode2[HTTPStatusCode2.NotFound=404]="NotFound",HTTPStatusCode2[HTTPStatusCode2.MethodNotAllowed=405]="MethodNotAllowed",HTTPStatusCode2[HTTPStatusCode2.NotAcceptable=406]="NotAcceptable",HTTPStatusCode2[HTTPStatusCode2.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",HTTPStatusCode2[HTTPStatusCode2.RequestTimeout=408]="RequestTimeout",HTTPStatusCode2[HTTPStatusCode2.Conflict=409]="Conflict",HTTPStatusCode2[HTTPStatusCode2.Gone=410]="Gone",HTTPStatusCode2[HTTPStatusCode2.LengthRequired=411]="LengthRequired",HTTPStatusCode2[HTTPStatusCode2.PreconditionFailed=412]="PreconditionFailed",HTTPStatusCode2[HTTPStatusCode2.PayloadTooLarge=413]="PayloadTooLarge",HTTPStatusCode2[HTTPStatusCode2.UriTooLong=414]="UriTooLong",HTTPStatusCode2[HTTPStatusCode2.UnsupportedMediaType=415]="UnsupportedMediaType",HTTPStatusCode2[HTTPStatusCode2.RangeNotSatisfiable=416]="RangeNotSatisfiable",HTTPStatusCode2[HTTPStatusCode2.ExpectationFailed=417]="ExpectationFailed",HTTPStatusCode2[HTTPStatusCode2.ImATeapot=418]="ImATeapot",HTTPStatusCode2[HTTPStatusCode2.MisdirectedRequest=421]="MisdirectedRequest",HTTPStatusCode2[HTTPStatusCode2.UnprocessableEntity=422]="UnprocessableEntity",HTTPStatusCode2[HTTPStatusCode2.Locked=423]="Locked",HTTPStatusCode2[HTTPStatusCode2.FailedDependency=424]="FailedDependency",HTTPStatusCode2[HTTPStatusCode2.TooEarly=425]="TooEarly",HTTPStatusCode2[HTTPStatusCode2.UpgradeRequired=426]="UpgradeRequired",HTTPStatusCode2[HTTPStatusCode2.PreconditionRequired=428]="PreconditionRequired",HTTPStatusCode2[HTTPStatusCode2.TooManyRequests=429]="TooManyRequests",HTTPStatusCode2[HTTPStatusCode2.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",HTTPStatusCode2[HTTPStatusCode2.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",HTTPStatusCode2[HTTPStatusCode2.InternalServerError=500]="InternalServerError",HTTPStatusCode2[HTTPStatusCode2.NotImplemented=501]="NotImplemented",HTTPStatusCode2[HTTPStatusCode2.BadGateway=502]="BadGateway",HTTPStatusCode2[HTTPStatusCode2.ServiceUnavailable=503]="ServiceUnavailable",HTTPStatusCode2[HTTPStatusCode2.GatewayTimeout=504]="GatewayTimeout",HTTPStatusCode2[HTTPStatusCode2.HttpVersionNotSupported=505]="HttpVersionNotSupported",HTTPStatusCode2[HTTPStatusCode2.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",HTTPStatusCode2[HTTPStatusCode2.InsufficientStorage=507]="InsufficientStorage",HTTPStatusCode2[HTTPStatusCode2.LoopDetected=508]="LoopDetected",HTTPStatusCode2[HTTPStatusCode2.NotExtended=510]="NotExtended",HTTPStatusCode2[HTTPStatusCode2.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired",HTTPStatusCode2))(HTTPStatusCode||{});const _FetchHTTPImplementation=class _FetchHTTPImplementation{send(request){return new rxjs.Observable(subscriber=>{const abortController=new AbortController;return this._send(request,subscriber,abortController).then(()=>{},error=>{subscriber.error(new HTTPResponseError({error}))}),()=>abortController.abort()})}async _send(request,subscriber,abortController){var _a2,_b;let response;try{const fetchParams=this._parseFetchParamsFromRequest(request);response=await fetch(request.getUrlWithParams(),{signal:abortController.signal,...fetchParams})}catch(error){subscriber.error(new HTTPResponseError({error,status:(_a2=error.status)!=null?_a2:0,statusText:(_b=error.statusText)!=null?_b:"Unknown Error",headers:error.headers}));return}const responseHeaders=new HTTPHeaders(response.headers),status=response.status,statusText=response.statusText;let body=null;response.body&&(body=await this._readBody(request,response,subscriber)),status>=HTTPStatusCode.Ok&&status<HTTPStatusCode.MultipleChoices?subscriber.next(new HTTPResponse({body,headers:responseHeaders,status,statusText})):subscriber.error(new HTTPResponseError({error:body,status,statusText,headers:responseHeaders})),subscriber.complete()}async _readBody(request,response,subscriber){var _a2,_b;const chunks=[],reader=response.body.getReader(),contentLength=response.headers.get("content-length");let receivedLength=0;const reportProgress=(_a2=request.requestParams)==null?void 0:_a2.reportProgress,responseType=request.responseType;let partialText,decoder;for(;;){const{done,value}=await reader.read();if(done)break;chunks.push(value),receivedLength+=value.length,reportProgress&&responseType==="text"&&(partialText=(partialText!=null?partialText:"")+(decoder!=null?decoder:decoder=new TextDecoder).decode(value,{stream:!0}),subscriber.next(new HTTPProgress(contentLength?Number.parseInt(contentLength,10):void 0,receivedLength,partialText)))}const all=mergeChunks(chunks,receivedLength);try{const contentType=(_b=response.headers.get("content-type"))!=null?_b:"";return deserialize(request,all,contentType)}catch(error){return subscriber.error(new HTTPResponseError({error,status:response.status,statusText:response.statusText,headers:new HTTPHeaders(response.headers)})),null}}_parseFetchParamsFromRequest(request){return{method:request.method,headers:request.getHeadersInit(),body:request.getBody(),credentials:request.withCredentials?"include":void 0}}};__name(_FetchHTTPImplementation,"FetchHTTPImplementation");let FetchHTTPImplementation=_FetchHTTPImplementation;function mergeChunks(chunks,totalLength){const all=new Uint8Array(totalLength);let position=0;for(const chunk of chunks)all.set(chunk,position),position+=chunk.length;return all}__name(mergeChunks,"mergeChunks");const XSSI_PREFIX=/^\)\]\}',?\n/;function deserialize(request,bin,contentType){switch(request.responseType){case"json":const text=new TextDecoder().decode(bin).replace(XSSI_PREFIX,"");return text===""?null:JSON.parse(text);case"text":return new TextDecoder().decode(bin);case"blob":return new Blob([bin],{type:contentType});case"arraybuffer":return bin.buffer;default:throw new Error(`[FetchHTTPImplementation]: unknown response type: ${request.responseType}.`)}}__name(deserialize,"deserialize");const _XHRHTTPImplementation=class _XHRHTTPImplementation{send(request){return new rxjs.Observable(observer=>{const xhr=new XMLHttpRequest;xhr.open(request.method,request.getUrlWithParams()),request.withCredentials&&(xhr.withCredentials=!0),request.headers.forEach((key,value)=>xhr.setRequestHeader(key,value.join(","))),request.headers.has("Accept")||xhr.setRequestHeader("Accept","application/json, text/plain, */*"),request.headers.has("Content-Type")||xhr.setRequestHeader("Content-Type","application/json;charset=UTF-8");const buildResponseHeader=__name(()=>{const statusText=xhr.statusText||"OK",headers=new HTTPHeaders(xhr.getAllResponseHeaders());return new ResponseHeader(headers,xhr.status,statusText)},"buildResponseHeader"),onLoadHandler=__name(()=>{const{headers,statusText,status}=buildResponseHeader(),{responseType}=request;let body2=null,error=null;status!==HTTPStatusCode.NoContent&&(body2=typeof xhr.response>"u"?xhr.responseText:xhr.response);let success=status>=SuccessStatusCodeLowerBound&&status<ErrorStatusCodeLowerBound;if(responseType==="json"&&typeof body2=="string"){const originalBody=body2;try{body2=body2?JSON.parse(body2):null}catch(e){success=!1,body2=originalBody,error=e}}success?observer.next(new HTTPResponse({body:body2,headers,status,statusText})):observer.error(new HTTPResponseError({error,headers,status,statusText}))},"onLoadHandler"),onErrorHandler=__name(error=>{const res=new HTTPResponseError({error,status:xhr.status||0,statusText:xhr.statusText||"Unknown Error",headers:buildResponseHeader().headers});observer.error(res)},"onErrorHandler");xhr.addEventListener("load",onLoadHandler),xhr.addEventListener("error",onErrorHandler),xhr.addEventListener("abort",onErrorHandler),xhr.addEventListener("timeout",onErrorHandler);const body=request.getBody();return xhr.send(body),()=>{xhr.readyState!==xhr.DONE&&xhr.abort(),xhr.removeEventListener("load",onLoadHandler),xhr.removeEventListener("error",onErrorHandler),xhr.removeEventListener("abort",onErrorHandler),xhr.removeEventListener("timeout",onErrorHandler)}})}};__name(_XHRHTTPImplementation,"XHRHTTPImplementation");let XHRHTTPImplementation=_XHRHTTPImplementation;const ISocketService=core.createIdentifier("univer.socket"),_WebSocketService=class _WebSocketService extends core.Disposable{createSocket(URL){try{const connection=new WebSocket(URL),disposables=new core.DisposableCollection;return{URL,close:__name((code,reason)=>{connection.close(code,reason),disposables.dispose()},"close"),send:__name(data=>{connection.send(data)},"send"),open$:new rxjs.Observable(subscriber=>{const callback=__name(event=>subscriber.next(event),"callback");connection.addEventListener("open",callback),disposables.add(core.toDisposable(()=>connection.removeEventListener("open",callback)))}).pipe(operators.share()),close$:new rxjs.Observable(subscriber=>{const callback=__name(event=>subscriber.next(event),"callback");connection.addEventListener("close",callback),disposables.add(core.toDisposable(()=>connection.removeEventListener("close",callback)))}).pipe(operators.share()),error$:new rxjs.Observable(subscriber=>{const callback=__name(event=>subscriber.next(event),"callback");connection.addEventListener("error",callback),disposables.add(core.toDisposable(()=>connection.removeEventListener("error",callback)))}).pipe(operators.share()),message$:new rxjs.Observable(subscriber=>{const callback=__name(event=>subscriber.next(event),"callback");connection.addEventListener("message",callback),disposables.add(core.toDisposable(()=>connection.removeEventListener("message",callback)))}).pipe(operators.share())}}catch(e){return console.error(e),null}}};__name(_WebSocketService,"WebSocketService");let WebSocketService=_WebSocketService;const DEFAULT_MAX_RETRY_ATTEMPTS=3,DELAY_INTERVAL=1e3,RetryInterceptorFactory=__name(params=>{var _a2,_b;const maxRetryAttempts=(_a2=params==null?void 0:params.maxRetryAttempts)!=null?_a2:DEFAULT_MAX_RETRY_ATTEMPTS,delayInterval=(_b=params==null?void 0:params.delayInterval)!=null?_b:DELAY_INTERVAL;return(request,next)=>next(request).pipe(operators.retry({delay:delayInterval,count:maxRetryAttempts}))},"RetryInterceptorFactory"),ThresholdInterceptorFactory=__name(params=>{const handlers=[],ongoingHandlers=new Set,tick=__name(()=>{var _a2;for(;ongoingHandlers.size<((_a2=params==null?void 0:params.maxParallel)!=null?_a2:1)&&handlers.length>0;){const handler=handlers.shift();ongoingHandlers.add(handler),handler()}},"tick");return(request,next)=>new rxjs.Observable(observer=>{const handler=__name(()=>next(request).subscribe({next:__name(event=>observer.next(event),"next"),error:__name(err=>observer.error(err),"error"),complete:__name(()=>observer.complete(),"complete")}),"handler"),teardown=__name(()=>{ongoingHandlers.delete(handler),core.remove(handlers,handler),tick()},"teardown");return handlers.push(handler),tick(),teardown})},"ThresholdInterceptorFactory"),AuthInterceptorFactory=__name(params=>{const{errorStatusCodes,onAuthError}=params;return __name((request,next)=>next(request).pipe(rxjs.catchError(error=>(error instanceof HTTPResponseError&&errorStatusCodes.some(c=>c===error.status)&&onAuthError(),rxjs.throwError(()=>error)))),"authInterceptor")},"AuthInterceptorFactory"),createDefaultFetchCheck=__name((time=300)=>{let cancel=__name(()=>{},"noop");return _currentConfig=>new Promise(res=>{cancel();const t=setTimeout(()=>{res(!0)},time);cancel=__name(()=>{clearTimeout(t),res(!1)},"cancel")})},"createDefaultFetchCheck"),createDistributeResult=__name(()=>(result,list)=>list.map(config=>({config,result})),"createDistributeResult"),MergeInterceptorFactory=__name((config,options={})=>{const{isMatch,getParamsFromRequest,mergeParamsToRequest}=config,{fetchCheck=createDefaultFetchCheck(300),distributeResult=createDistributeResult()}=options,hookList=[],getPlainList=__name(_list=>_list.map(item=>item.config),"getPlainList");return(requestConfig,next)=>isMatch(requestConfig)?new rxjs.Observable(observer=>{const params=getParamsFromRequest(requestConfig);hookList.push({next:__name(v=>observer.next(v),"next"),error:__name(error=>observer.error(error),"error"),config:params});const list=getPlainList(hookList);fetchCheck(requestConfig).then(isFetch=>{if(isFetch){const currentHookList=[];list.forEach(config2=>{const index=hookList.findIndex(item=>item.config===config2);if(index>=0){const[hook]=hookList.splice(index,1);currentHookList.push(hook)}}),next(mergeParamsToRequest(list,requestConfig)).subscribe({next:__name(e=>{if(e.type===HTTPEventType.Response){const body=e.body,configList=distributeResult(body,list);currentHookList.forEach(hookItem=>{const res=configList.find(item=>item.config===hookItem.config);if(res){const response=new HTTPResponse({body:res.result,headers:e.headers,status:e.status,statusText:e.statusText});hookItem.next(response)}else hookItem.error("batch error")})}},"next"),complete:__name(()=>observer.complete(),"complete"),error:__name(e=>observer.error(e),"error")})}})}):next(requestConfig)},"MergeInterceptorFactory");exports.AuthInterceptorFactory=AuthInterceptorFactory;exports.FetchHTTPImplementation=FetchHTTPImplementation;exports.HTTPEventType=HTTPEventType;exports.HTTPHeaders=HTTPHeaders;exports.HTTPProgress=HTTPProgress;exports.HTTPRequest=HTTPRequest;exports.HTTPResponse=HTTPResponse;exports.HTTPResponseError=HTTPResponseError;exports.HTTPStatusCode=HTTPStatusCode;exports.IHTTPImplementation=IHTTPImplementation;exports.ISocketService=ISocketService;exports.MergeInterceptorFactory=MergeInterceptorFactory;exports.ResponseHeader=ResponseHeader;exports.RetryInterceptorFactory=RetryInterceptorFactory;exports.ThresholdInterceptorFactory=ThresholdInterceptorFactory;exports.WebSocketService=WebSocketService;exports.XHRHTTPImplementation=XHRHTTPImplementation;
1
+ 'use strict';const _0x10b7e5=_0x3e00;(function(_0x402d44,_0x2f071b){const _0x436753=_0x3e00,_0x3490b8=_0x402d44();while(!![]){try{const _0xa707af=-parseInt(_0x436753(0x195))/0x1+-parseInt(_0x436753(0x247))/0x2+-parseInt(_0x436753(0x207))/0x3+-parseInt(_0x436753(0x1af))/0x4+-parseInt(_0x436753(0x1e0))/0x5+parseInt(_0x436753(0x1f7))/0x6+-parseInt(_0x436753(0x1cf))/0x7*(-parseInt(_0x436753(0x214))/0x8);if(_0xa707af===_0x2f071b)break;else _0x3490b8['push'](_0x3490b8['shift']());}catch(_0x4714db){_0x3490b8['push'](_0x3490b8['shift']());}}}(_0x5276,0xe5248));var __defProp=Object[_0x10b7e5(0x235)],__defNormalProp=(_0x1ca113,_0x46bbc4,_0x46be2a)=>_0x46bbc4 in _0x1ca113?__defProp(_0x1ca113,_0x46bbc4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x46be2a}):_0x1ca113[_0x46bbc4]=_0x46be2a,__name=(_0x3b7ece,_0x25d107)=>__defProp(_0x3b7ece,_0x10b7e5(0x17e),{'value':_0x25d107,'configurable':!0x0}),__publicField=(_0xf56bbf,_0x35fda3,_0x1fd225)=>__defNormalProp(_0xf56bbf,typeof _0x35fda3!=_0x10b7e5(0x178)?_0x35fda3+'':_0x35fda3,_0x1fd225);Object[_0x10b7e5(0x235)](exports,Symbol[_0x10b7e5(0x202)],{'value':_0x10b7e5(0x1f2)});const core=require(_0x10b7e5(0x1bd)),rxjs=require(_0x10b7e5(0x173)),operators=require(_0x10b7e5(0x1c4)),ApplicationJSONType='application/json',_HTTPHeaders=class _HTTPHeaders{constructor(_0x53818d){const _0x11c0fd=_0x10b7e5;__publicField(this,_0x11c0fd(0x210),new Map()),typeof _0x53818d==_0x11c0fd(0x1d2)?this[_0x11c0fd(0x23a)](_0x53818d):_0x53818d instanceof Headers?this[_0x11c0fd(0x1ea)](_0x53818d):_0x53818d&&this['_handleHeadersConstructorProps'](_0x53818d);}['forEach'](_0x110ea3){const _0x395bff=_0x10b7e5;this['_headers'][_0x395bff(0x1b6)]((_0x1906cc,_0x12f3b7)=>_0x110ea3(_0x12f3b7,_0x1906cc));}[_0x10b7e5(0x1b7)](_0x4d28b3){const _0x3256d3=_0x10b7e5;return!!this[_0x3256d3(0x210)][_0x3256d3(0x1b7)](_0x4d28b3[_0x3256d3(0x1fa)]());}[_0x10b7e5(0x1b5)](_0x37978b){const _0x2372d=_0x10b7e5,_0x2433bd=_0x37978b[_0x2372d(0x1fa)]();return this[_0x2372d(0x210)][_0x2372d(0x1b7)](_0x2433bd)?this[_0x2372d(0x210)]['get'](_0x2433bd):null;}[_0x10b7e5(0x1c3)](_0x203b44,_0x5a98ae){this['_setHeader'](_0x203b44,_0x5a98ae);}[_0x10b7e5(0x21f)](){const _0x265db5=_0x10b7e5;var _0x426cf0,_0x24b88b;const _0xcae922={};return this[_0x265db5(0x210)][_0x265db5(0x1b6)]((_0x2ff2e3,_0xdab77e)=>{const _0x442266=_0x265db5;_0xcae922[_0xdab77e]=_0x2ff2e3[_0x442266(0x1ca)](',');}),(_0x426cf0=_0xcae922[_0x265db5(0x196)])!=null||(_0xcae922[_0x265db5(0x196)]=_0x265db5(0x1df)),(_0x24b88b=_0xcae922[_0x265db5(0x181)])!=null||(_0xcae922[_0x265db5(0x181)]=_0x265db5(0x1e6)),_0xcae922;}['_setHeader'](_0x414b8d,_0x1ddd4b){const _0x2519b7=_0x10b7e5,_0x27ce9c=_0x414b8d[_0x2519b7(0x1fa)]();this[_0x2519b7(0x210)][_0x2519b7(0x1b7)](_0x27ce9c)?this[_0x2519b7(0x210)][_0x2519b7(0x1b5)](_0x27ce9c)[_0x2519b7(0x219)](_0x1ddd4b[_0x2519b7(0x175)]()):this[_0x2519b7(0x210)]['set'](_0x27ce9c,[_0x1ddd4b[_0x2519b7(0x175)]()]);}[_0x10b7e5(0x23a)](_0x317808){const _0x5a0cf7=_0x10b7e5;_0x317808[_0x5a0cf7(0x252)]('\x0a')['forEach'](_0x4868cd=>{const _0x9ce4b8=_0x5a0cf7,[_0x2671c9,_0x40130c]=_0x4868cd['split'](':');_0x2671c9&&_0x40130c&&this[_0x9ce4b8(0x251)](_0x2671c9,_0x40130c);});}[_0x10b7e5(0x208)](_0x321f07){Object['entries'](_0x321f07)['forEach'](([_0x336100,_0x31465e])=>this['_setHeader'](_0x336100,_0x31465e));}['_handleHeaders'](_0x3d91f4){const _0x2771e4=_0x10b7e5;_0x3d91f4[_0x2771e4(0x1b6)]((_0xa1b6dd,_0x17394a)=>this[_0x2771e4(0x251)](_0x17394a,_0xa1b6dd));}};__name(_HTTPHeaders,_0x10b7e5(0x19f));let HTTPHeaders=_HTTPHeaders;const IHTTPImplementation=core['createIdentifier'](_0x10b7e5(0x21b)),_HTTPParams=class _HTTPParams{constructor(_0x566d42){const _0x1c4923=_0x10b7e5;this[_0x1c4923(0x189)]=_0x566d42;}['toString'](){const _0xb1659f=_0x10b7e5;return this[_0xb1659f(0x189)]?Object[_0xb1659f(0x24a)](this[_0xb1659f(0x189)])['map'](_0x4fead2=>_0x4fead2+'='+this[_0xb1659f(0x189)][_0x4fead2])[_0xb1659f(0x1ca)]('&'):'';}};__name(_HTTPParams,_0x10b7e5(0x22f));function _0x3e00(_0x2e05d8,_0xc367e2){const _0x527621=_0x5276();return _0x3e00=function(_0x3e00e0,_0x57fa6d){_0x3e00e0=_0x3e00e0-0x169;let _0x15d289=_0x527621[_0x3e00e0];return _0x15d289;},_0x3e00(_0x2e05d8,_0xc367e2);}let HTTPParams=_HTTPParams,HTTPRequestUID=0x0;const _HTTPRequest=class _HTTPRequest{constructor(_0x195f7b,_0x2ae866,_0x129cab){const _0x1db173=_0x10b7e5;__publicField(this,_0x1db173(0x249),HTTPRequestUID++),(this[_0x1db173(0x1bb)]=_0x195f7b,this['url']=_0x2ae866,this[_0x1db173(0x206)]=_0x129cab);}get[_0x10b7e5(0x213)](){const _0x2b9d57=_0x10b7e5;return this[_0x2b9d57(0x206)][_0x2b9d57(0x213)];}get[_0x10b7e5(0x1d9)](){const _0x38defb=_0x10b7e5;return this[_0x38defb(0x206)][_0x38defb(0x1d9)];}get['responseType'](){const _0x514e19=_0x10b7e5;return this[_0x514e19(0x206)][_0x514e19(0x1c5)];}[_0x10b7e5(0x1b9)](){const _0x5883b6=_0x10b7e5;var _0x37a136,_0x1b99f2;const _0xb1a320=(_0x1b99f2=(_0x37a136=this[_0x5883b6(0x206)])==null?void 0x0:_0x37a136[_0x5883b6(0x189)])==null?void 0x0:_0x1b99f2[_0x5883b6(0x175)]();return _0xb1a320?''+this[_0x5883b6(0x246)]+(this['url'][_0x5883b6(0x193)]('?')?'&':'?')+_0xb1a320:this[_0x5883b6(0x246)];}[_0x10b7e5(0x217)](){const _0x275dd9=_0x10b7e5;var _0x57f4d2,_0x41363e;const _0x1fe4dc=(_0x57f4d2=this[_0x275dd9(0x213)][_0x275dd9(0x1b5)](_0x275dd9(0x1de)))!=null?_0x57f4d2:ApplicationJSONType,_0xf7f5df=(_0x41363e=this[_0x275dd9(0x206)])==null?void 0x0:_0x41363e[_0x275dd9(0x17c)];return _0x1fe4dc===ApplicationJSONType&&_0xf7f5df&&typeof _0xf7f5df==_0x275dd9(0x190)?JSON[_0x275dd9(0x1a3)](_0xf7f5df):_0xf7f5df?''+_0xf7f5df:null;}[_0x10b7e5(0x199)](){const _0x121ac9=_0x10b7e5;return this[_0x121ac9(0x213)][_0x121ac9(0x21f)]();}};__name(_HTTPRequest,_0x10b7e5(0x1da));let HTTPRequest=_HTTPRequest;var __defProp2=Object[_0x10b7e5(0x235)],__getOwnPropDesc=Object[_0x10b7e5(0x1db)],__decorateClass=__name((_0x5445f0,_0x41f26f,_0x3a6dfb,_0x58d597)=>{const _0x22c5b3=_0x10b7e5;for(var _0xb0fc29=_0x58d597>0x1?void 0x0:_0x58d597?__getOwnPropDesc(_0x41f26f,_0x3a6dfb):_0x41f26f,_0x1975f5=_0x5445f0[_0x22c5b3(0x1ba)]-0x1,_0x37ae59;_0x1975f5>=0x0;_0x1975f5--)(_0x37ae59=_0x5445f0[_0x1975f5])&&(_0xb0fc29=(_0x58d597?_0x37ae59(_0x41f26f,_0x3a6dfb,_0xb0fc29):_0x37ae59(_0xb0fc29))||_0xb0fc29);return _0x58d597&&_0xb0fc29&&__defProp2(_0x41f26f,_0x3a6dfb,_0xb0fc29),_0xb0fc29;},_0x10b7e5(0x185)),__decorateParam=__name((_0x2b32a1,_0x24d3e8)=>(_0x492c8a,_0x2fdbf5)=>_0x24d3e8(_0x492c8a,_0x2fdbf5,_0x2b32a1),_0x10b7e5(0x1d6)),_a;exports[_0x10b7e5(0x204)]=(_a=class extends core[_0x10b7e5(0x1f8)]{constructor(_0xf24e03){const _0x187b64=_0x10b7e5;super(),__publicField(this,_0x187b64(0x1e9),[]),__publicField(this,_0x187b64(0x218)),this[_0x187b64(0x1f5)]=_0xf24e03;}[_0x10b7e5(0x1d8)](_0x1b3968){const _0x5f4fee=_0x10b7e5;if(this[_0x5f4fee(0x1e9)][_0x5f4fee(0x23c)](_0x1b3968)!==-0x1)throw new Error(_0x5f4fee(0x1f0));return this[_0x5f4fee(0x1e9)][_0x5f4fee(0x219)](_0x1b3968),this[_0x5f4fee(0x1e9)]=this[_0x5f4fee(0x1e9)][_0x5f4fee(0x1aa)]((_0x1549dd,_0x18aa9f)=>{const _0x46bfb7=_0x5f4fee;var _0x12b068,_0x4ea3fb;return((_0x12b068=_0x1549dd[_0x46bfb7(0x1c1)])!=null?_0x12b068:0x0)-((_0x4ea3fb=_0x18aa9f[_0x46bfb7(0x1c1)])!=null?_0x4ea3fb:0x0);}),this['_pipe']=null,core[_0x5f4fee(0x19d)](()=>core[_0x5f4fee(0x183)](this[_0x5f4fee(0x1e9)],_0x1b3968));}[_0x10b7e5(0x1b5)](_0x422829,_0x2ca79c){const _0x145d1f=_0x10b7e5;return this[_0x145d1f(0x1ec)]('GET',_0x422829,_0x2ca79c);}['post'](_0x280102,_0x291ed1){const _0x151f21=_0x10b7e5;return this[_0x151f21(0x1ec)](_0x151f21(0x23b),_0x280102,_0x291ed1);}[_0x10b7e5(0x216)](_0x2ad72e,_0x2e04ec){const _0x568b57=_0x10b7e5;return this[_0x568b57(0x1ec)](_0x568b57(0x230),_0x2ad72e,_0x2e04ec);}['delete'](_0x6c7ae7,_0x5f0c9a){const _0x44c979=_0x10b7e5;return this['_request'](_0x44c979(0x240),_0x6c7ae7,_0x5f0c9a);}['patch'](_0x1a63cd,_0x425f7c){const _0x15c84b=_0x10b7e5;return this[_0x15c84b(0x1ec)](_0x15c84b(0x1ab),_0x1a63cd,_0x425f7c);}[_0x10b7e5(0x21e)](_0x20ad8a,_0x5e3c7d,_0x541d15){const _0x11b3c0=_0x10b7e5;var _0x3a3ac5,_0x4ee30f;const _0x355854=new HTTPHeaders(_0x541d15==null?void 0x0:_0x541d15[_0x11b3c0(0x213)]),_0x2c8609=new HTTPParams(_0x541d15==null?void 0x0:_0x541d15['params']),_0x3b5e46=new HTTPRequest(_0x20ad8a,_0x5e3c7d,{'headers':_0x355854,'params':_0x2c8609,'withCredentials':(_0x3a3ac5=_0x541d15==null?void 0x0:_0x541d15[_0x11b3c0(0x1d9)])!=null?_0x3a3ac5:!0x1,'reportProgress':!0x0,'responseType':(_0x4ee30f=_0x541d15==null?void 0x0:_0x541d15[_0x11b3c0(0x1c5)])!=null?_0x4ee30f:'json','body':[_0x11b3c0(0x254),'DELETE'][_0x11b3c0(0x193)](_0x20ad8a)||_0x541d15==null?void 0x0:_0x541d15[_0x11b3c0(0x17c)]});return rxjs['of'](_0x3b5e46)['pipe'](operators[_0x11b3c0(0x1be)](_0x5df1ef=>this[_0x11b3c0(0x18c)](_0x5df1ef)));}async['_request'](_0x423d30,_0x3b38f5,_0x466e53){const _0x51a114=_0x10b7e5;var _0x18d30f,_0x1b0338;const _0x291df0=new HTTPHeaders(_0x466e53==null?void 0x0:_0x466e53['headers']),_0x2f0db6=new HTTPParams(_0x466e53==null?void 0x0:_0x466e53['params']),_0x369be9=new HTTPRequest(_0x423d30,_0x3b38f5,{'headers':_0x291df0,'params':_0x2f0db6,'withCredentials':(_0x18d30f=_0x466e53==null?void 0x0:_0x466e53[_0x51a114(0x1d9)])!=null?_0x18d30f:!0x1,'responseType':(_0x1b0338=_0x466e53==null?void 0x0:_0x466e53[_0x51a114(0x1c5)])!=null?_0x1b0338:_0x51a114(0x1a2),'body':[_0x51a114(0x254),_0x51a114(0x240)][_0x51a114(0x193)](_0x423d30)||_0x466e53==null?void 0x0:_0x466e53[_0x51a114(0x17c)]}),_0x171edb=rxjs['of'](_0x369be9)[_0x51a114(0x186)](operators['concatMap'](_0x1e494b=>this[_0x51a114(0x18c)](_0x1e494b)));return await rxjs['firstValueFrom'](_0x171edb);}[_0x10b7e5(0x18c)](_0x500a1c){const _0x13ebc3=_0x10b7e5;return this[_0x13ebc3(0x218)]||(this[_0x13ebc3(0x218)]=this[_0x13ebc3(0x1e9)][_0x13ebc3(0x1c0)](_0x21f240=>_0x21f240[_0x13ebc3(0x1d7)])[_0x13ebc3(0x1ed)]((_0x2ce99e,_0x569f2c)=>chainInterceptorFn(_0x2ce99e,_0x569f2c),(_0x48a43c,_0x895042)=>_0x895042(_0x48a43c))),this[_0x13ebc3(0x218)](_0x500a1c,_0x1ac3f2=>this[_0x13ebc3(0x1f5)][_0x13ebc3(0x169)](_0x1ac3f2));}},__name(_a,_0x10b7e5(0x204)),_a),exports['HTTPService']=__decorateClass([__decorateParam(0x0,IHTTPImplementation)],exports[_0x10b7e5(0x204)]);function chainInterceptorFn(_0x18e4a3,_0x308b29){return(_0x2a0b9b,_0x3966d0)=>_0x308b29(_0x2a0b9b,_0xc2474b=>_0x18e4a3(_0xc2474b,_0x3966d0));}__name(chainInterceptorFn,_0x10b7e5(0x1ac));var HTTPEventType=(_0x52d925=>(_0x52d925[_0x52d925[_0x10b7e5(0x1d1)]=0x0]=_0x10b7e5(0x1d1),_0x52d925[_0x52d925[_0x10b7e5(0x1f3)]=0x1]=_0x10b7e5(0x1f3),_0x52d925))(HTTPEventType||{});const _HTTPResponse=class _HTTPResponse{constructor({body:_0x168eb5,headers:_0x5a8c44,status:_0x15e51d,statusText:_0x5b26e9}){const _0x1a004b=_0x10b7e5;__publicField(this,_0x1a004b(0x1fb),0x1),__publicField(this,_0x1a004b(0x17c)),__publicField(this,_0x1a004b(0x213)),__publicField(this,'status'),__publicField(this,'statusText'),(this['body']=_0x168eb5,this[_0x1a004b(0x213)]=_0x5a8c44,this[_0x1a004b(0x188)]=_0x15e51d,this[_0x1a004b(0x1ad)]=_0x5b26e9);}};__name(_HTTPResponse,_0x10b7e5(0x24b));let HTTPResponse=_HTTPResponse;const _HTTPProgress=class _HTTPProgress{constructor(_0x2b25b7,_0x4ef1eb,_0x15d9bf){const _0x4822a0=_0x10b7e5;__publicField(this,'type',0x0),(this[_0x4822a0(0x184)]=_0x2b25b7,this[_0x4822a0(0x1ce)]=_0x4ef1eb,this[_0x4822a0(0x1c6)]=_0x15d9bf);}};__name(_HTTPProgress,_0x10b7e5(0x229));let HTTPProgress=_HTTPProgress;const _ResponseHeader=class _ResponseHeader{constructor(_0x3ff4c6,_0x188165,_0x432de7){const _0x32b5fd=_0x10b7e5;this[_0x32b5fd(0x213)]=_0x3ff4c6,this[_0x32b5fd(0x188)]=_0x188165,this[_0x32b5fd(0x1ad)]=_0x432de7;}};__name(_ResponseHeader,_0x10b7e5(0x18a));let ResponseHeader=_ResponseHeader;const _HTTPResponseError=class _HTTPResponseError{constructor({headers:_0x73a456,status:_0x1849eb,statusText:_0x23982a,error:_0xa41112}){const _0x37bfc3=_0x10b7e5;__publicField(this,_0x37bfc3(0x213)),__publicField(this,_0x37bfc3(0x188)),__publicField(this,_0x37bfc3(0x1ad)),__publicField(this,_0x37bfc3(0x1a8)),(this[_0x37bfc3(0x213)]=_0x73a456,this[_0x37bfc3(0x188)]=_0x1849eb,this[_0x37bfc3(0x1ad)]=_0x23982a,this[_0x37bfc3(0x1a8)]=_0xa41112);}};__name(_HTTPResponseError,_0x10b7e5(0x1b3));let HTTPResponseError=_HTTPResponseError;const SuccessStatusCodeLowerBound=0xc8,ErrorStatusCodeLowerBound=0x12c;var HTTPStatusCode=(_0x52e6b6=>(_0x52e6b6[_0x52e6b6['Continue']=0x64]=_0x10b7e5(0x212),_0x52e6b6[_0x52e6b6['SwitchingProtocols']=0x65]='SwitchingProtocols',_0x52e6b6[_0x52e6b6['Processing']=0x66]=_0x10b7e5(0x1e2),_0x52e6b6[_0x52e6b6['EarlyHints']=0x67]=_0x10b7e5(0x241),_0x52e6b6[_0x52e6b6['Ok']=0xc8]='Ok',_0x52e6b6[_0x52e6b6[_0x10b7e5(0x19b)]=0xc9]=_0x10b7e5(0x19b),_0x52e6b6[_0x52e6b6['Accepted']=0xca]='Accepted',_0x52e6b6[_0x52e6b6[_0x10b7e5(0x1b2)]=0xcb]=_0x10b7e5(0x1b2),_0x52e6b6[_0x52e6b6[_0x10b7e5(0x242)]=0xcc]=_0x10b7e5(0x242),_0x52e6b6[_0x52e6b6[_0x10b7e5(0x1a6)]=0xcd]=_0x10b7e5(0x1a6),_0x52e6b6[_0x52e6b6[_0x10b7e5(0x23d)]=0xce]=_0x10b7e5(0x23d),_0x52e6b6[_0x52e6b6[_0x10b7e5(0x1b8)]=0xcf]='MultiStatus',_0x52e6b6[_0x52e6b6['AlreadyReported']=0xd0]=_0x10b7e5(0x233),_0x52e6b6[_0x52e6b6['ImUsed']=0xe2]=_0x10b7e5(0x1a4),_0x52e6b6[_0x52e6b6['MultipleChoices']=0x12c]=_0x10b7e5(0x1e4),_0x52e6b6[_0x52e6b6['MovedPermanently']=0x12d]=_0x10b7e5(0x17d),_0x52e6b6[_0x52e6b6['Found']=0x12e]=_0x10b7e5(0x21c),_0x52e6b6[_0x52e6b6['SeeOther']=0x12f]=_0x10b7e5(0x203),_0x52e6b6[_0x52e6b6[_0x10b7e5(0x17b)]=0x130]=_0x10b7e5(0x17b),_0x52e6b6[_0x52e6b6[_0x10b7e5(0x177)]=0x131]='UseProxy',_0x52e6b6[_0x52e6b6[_0x10b7e5(0x18e)]=0x132]=_0x10b7e5(0x18e),_0x52e6b6[_0x52e6b6[_0x10b7e5(0x1ef)]=0x133]='TemporaryRedirect',_0x52e6b6[_0x52e6b6[_0x10b7e5(0x1e1)]=0x134]=_0x10b7e5(0x1e1),_0x52e6b6[_0x52e6b6[_0x10b7e5(0x1eb)]=0x190]='BadRequest',_0x52e6b6[_0x52e6b6[_0x10b7e5(0x16e)]=0x191]=_0x10b7e5(0x16e),_0x52e6b6[_0x52e6b6[_0x10b7e5(0x228)]=0x192]=_0x10b7e5(0x228),_0x52e6b6[_0x52e6b6[_0x10b7e5(0x223)]=0x193]=_0x10b7e5(0x223),_0x52e6b6[_0x52e6b6[_0x10b7e5(0x226)]=0x194]='NotFound',_0x52e6b6[_0x52e6b6['MethodNotAllowed']=0x195]=_0x10b7e5(0x21d),_0x52e6b6[_0x52e6b6[_0x10b7e5(0x16b)]=0x196]=_0x10b7e5(0x16b),_0x52e6b6[_0x52e6b6[_0x10b7e5(0x18f)]=0x197]=_0x10b7e5(0x18f),_0x52e6b6[_0x52e6b6['RequestTimeout']=0x198]=_0x10b7e5(0x1cc),_0x52e6b6[_0x52e6b6[_0x10b7e5(0x171)]=0x199]=_0x10b7e5(0x171),_0x52e6b6[_0x52e6b6[_0x10b7e5(0x1d3)]=0x19a]=_0x10b7e5(0x1d3),_0x52e6b6[_0x52e6b6[_0x10b7e5(0x198)]=0x19b]=_0x10b7e5(0x198),_0x52e6b6[_0x52e6b6[_0x10b7e5(0x1f9)]=0x19c]=_0x10b7e5(0x1f9),_0x52e6b6[_0x52e6b6[_0x10b7e5(0x255)]=0x19d]=_0x10b7e5(0x255),_0x52e6b6[_0x52e6b6[_0x10b7e5(0x1d0)]=0x19e]='UriTooLong',_0x52e6b6[_0x52e6b6[_0x10b7e5(0x1f6)]=0x19f]='UnsupportedMediaType',_0x52e6b6[_0x52e6b6[_0x10b7e5(0x238)]=0x1a0]=_0x10b7e5(0x238),_0x52e6b6[_0x52e6b6['ExpectationFailed']=0x1a1]=_0x10b7e5(0x22e),_0x52e6b6[_0x52e6b6[_0x10b7e5(0x20f)]=0x1a2]='ImATeapot',_0x52e6b6[_0x52e6b6[_0x10b7e5(0x20b)]=0x1a5]='MisdirectedRequest',_0x52e6b6[_0x52e6b6[_0x10b7e5(0x16a)]=0x1a6]='UnprocessableEntity',_0x52e6b6[_0x52e6b6[_0x10b7e5(0x20d)]=0x1a7]='Locked',_0x52e6b6[_0x52e6b6[_0x10b7e5(0x237)]=0x1a8]=_0x10b7e5(0x237),_0x52e6b6[_0x52e6b6[_0x10b7e5(0x250)]=0x1a9]=_0x10b7e5(0x250),_0x52e6b6[_0x52e6b6[_0x10b7e5(0x215)]=0x1aa]=_0x10b7e5(0x215),_0x52e6b6[_0x52e6b6[_0x10b7e5(0x1e8)]=0x1ac]=_0x10b7e5(0x1e8),_0x52e6b6[_0x52e6b6[_0x10b7e5(0x187)]=0x1ad]='TooManyRequests',_0x52e6b6[_0x52e6b6[_0x10b7e5(0x1e7)]=0x1af]=_0x10b7e5(0x1e7),_0x52e6b6[_0x52e6b6[_0x10b7e5(0x22c)]=0x1c3]=_0x10b7e5(0x22c),_0x52e6b6[_0x52e6b6['InternalServerError']=0x1f4]=_0x10b7e5(0x16d),_0x52e6b6[_0x52e6b6[_0x10b7e5(0x24e)]=0x1f5]=_0x10b7e5(0x24e),_0x52e6b6[_0x52e6b6[_0x10b7e5(0x24d)]=0x1f6]=_0x10b7e5(0x24d),_0x52e6b6[_0x52e6b6['ServiceUnavailable']=0x1f7]=_0x10b7e5(0x1fc),_0x52e6b6[_0x52e6b6[_0x10b7e5(0x170)]=0x1f8]='GatewayTimeout',_0x52e6b6[_0x52e6b6[_0x10b7e5(0x1ae)]=0x1f9]=_0x10b7e5(0x1ae),_0x52e6b6[_0x52e6b6[_0x10b7e5(0x1cd)]=0x1fa]=_0x10b7e5(0x1cd),_0x52e6b6[_0x52e6b6[_0x10b7e5(0x221)]=0x1fb]='InsufficientStorage',_0x52e6b6[_0x52e6b6[_0x10b7e5(0x248)]=0x1fc]=_0x10b7e5(0x248),_0x52e6b6[_0x52e6b6[_0x10b7e5(0x1b4)]=0x1fe]=_0x10b7e5(0x1b4),_0x52e6b6[_0x52e6b6[_0x10b7e5(0x225)]=0x1ff]=_0x10b7e5(0x225),_0x52e6b6))(HTTPStatusCode||{});const _FetchHTTPImplementation=class _FetchHTTPImplementation{[_0x10b7e5(0x169)](_0x307c6f){const _0x17f7ae=_0x10b7e5;return new rxjs[(_0x17f7ae(0x1e5))](_0x138d31=>{const _0x3b422e=_0x17f7ae,_0x528753=new AbortController();return this[_0x3b422e(0x1a0)](_0x307c6f,_0x138d31,_0x528753)['then'](()=>{},_0x40d5ac=>{const _0xc7d540=_0x3b422e;_0x138d31[_0xc7d540(0x1a8)](new HTTPResponseError({'error':_0x40d5ac}));}),()=>_0x528753[_0x3b422e(0x1fe)]();});}async[_0x10b7e5(0x1a0)](_0x3c2ef1,_0x488e35,_0x6bd232){const _0xde5d7=_0x10b7e5;var _0x12f3ca,_0x3576a7;let _0x41aacb;try{const _0x411add=this['_parseFetchParamsFromRequest'](_0x3c2ef1);_0x41aacb=await fetch(_0x3c2ef1[_0xde5d7(0x1b9)](),{'signal':_0x6bd232[_0xde5d7(0x232)],..._0x411add});}catch(_0x861a59){_0x488e35[_0xde5d7(0x1a8)](new HTTPResponseError({'error':_0x861a59,'status':(_0x12f3ca=_0x861a59[_0xde5d7(0x188)])!=null?_0x12f3ca:0x0,'statusText':(_0x3576a7=_0x861a59[_0xde5d7(0x1ad)])!=null?_0x3576a7:_0xde5d7(0x227),'headers':_0x861a59[_0xde5d7(0x213)]}));return;}const _0x291307=new HTTPHeaders(_0x41aacb[_0xde5d7(0x213)]),_0xfdcd6e=_0x41aacb[_0xde5d7(0x188)],_0x2b0fda=_0x41aacb[_0xde5d7(0x1ad)];let _0x4cb0aa=null;_0x41aacb['body']&&(_0x4cb0aa=await this[_0xde5d7(0x17a)](_0x3c2ef1,_0x41aacb,_0x488e35)),_0xfdcd6e>=HTTPStatusCode['Ok']&&_0xfdcd6e<HTTPStatusCode[_0xde5d7(0x1e4)]?_0x488e35[_0xde5d7(0x1ee)](new HTTPResponse({'body':_0x4cb0aa,'headers':_0x291307,'status':_0xfdcd6e,'statusText':_0x2b0fda})):_0x488e35[_0xde5d7(0x1a8)](new HTTPResponseError({'error':_0x4cb0aa,'status':_0xfdcd6e,'statusText':_0x2b0fda,'headers':_0x291307})),_0x488e35[_0xde5d7(0x19c)]();}async[_0x10b7e5(0x17a)](_0x10da99,_0x3f5c80,_0x549bcd){const _0x4afdb4=_0x10b7e5;var _0x4e68ca,_0x47a5d5;const _0x19159e=[],_0x1653a1=_0x3f5c80['body']['getReader'](),_0xed9f30=_0x3f5c80[_0x4afdb4(0x213)]['get'](_0x4afdb4(0x182));let _0x4403f5=0x0;const _0x116499=(_0x4e68ca=_0x10da99['requestParams'])==null?void 0x0:_0x4e68ca[_0x4afdb4(0x1f1)],_0x1f29b4=_0x10da99[_0x4afdb4(0x1c5)];let _0x3bf327,_0x59fe11;for(;;){const {done:_0x5c49d1,value:_0x158152}=await _0x1653a1[_0x4afdb4(0x23e)]();if(_0x5c49d1)break;_0x19159e['push'](_0x158152),_0x4403f5+=_0x158152[_0x4afdb4(0x1ba)],_0x116499&&_0x1f29b4===_0x4afdb4(0x20e)&&(_0x3bf327=(_0x3bf327!=null?_0x3bf327:'')+(_0x59fe11!=null?_0x59fe11:_0x59fe11=new TextDecoder())[_0x4afdb4(0x201)](_0x158152,{'stream':!0x0}),_0x549bcd[_0x4afdb4(0x1ee)](new HTTPProgress(_0xed9f30?Number[_0x4afdb4(0x22b)](_0xed9f30,0xa):void 0x0,_0x4403f5,_0x3bf327)));}const _0x19415e=mergeChunks(_0x19159e,_0x4403f5);try{const _0x3f3945=(_0x47a5d5=_0x3f5c80[_0x4afdb4(0x213)][_0x4afdb4(0x1b5)](_0x4afdb4(0x181)))!=null?_0x47a5d5:'';return deserialize(_0x10da99,_0x19415e,_0x3f3945);}catch(_0x135e38){return _0x549bcd[_0x4afdb4(0x1a8)](new HTTPResponseError({'error':_0x135e38,'status':_0x3f5c80['status'],'statusText':_0x3f5c80[_0x4afdb4(0x1ad)],'headers':new HTTPHeaders(_0x3f5c80[_0x4afdb4(0x213)])})),null;}}['_parseFetchParamsFromRequest'](_0x5f26b1){const _0x1ec18d=_0x10b7e5;return{'method':_0x5f26b1[_0x1ec18d(0x1bb)],'headers':_0x5f26b1['getHeadersInit'](),'body':_0x5f26b1[_0x1ec18d(0x217)](),'credentials':_0x5f26b1[_0x1ec18d(0x1d9)]?_0x1ec18d(0x24c):void 0x0};}};__name(_FetchHTTPImplementation,'FetchHTTPImplementation');function _0x5276(){const _0x524379=['get','forEach','has','MultiStatus','getUrlWithParams','length','method','share','@univerjs/core','concatMap','Accept','map','priority','ISocketService','set','rxjs/operators','responseType','partialText','subscribe','timeout','addEventListener','join','batch\x20error','RequestTimeout','VariantAlsoNegotiates','loaded','10003966JJcNfA','UriTooLong','DownloadProgress','string','Gone','find','RetryInterceptorFactory','__decorateParam','interceptor','registerHTTPInterceptor','withCredentials','HTTPRequest','getOwnPropertyDescriptor','createDefaultFetchCheck','callback','Content-Type','application/json,\x20text/plain,\x20*/*','5703960xCkqyu','PermanentRedirect','Processing','size','MultipleChoices','Observable','application/json;charset=UTF-8','RequestHeaderFieldsTooLarge','PreconditionRequired','_interceptors','_handleHeaders','BadRequest','_request','reduceRight','next','TemporaryRedirect','[HTTPService]:\x20The\x20interceptor\x20has\x20already\x20been\x20registered!','reportProgress','Module','Response','handler','_http','UnsupportedMediaType','1917126dUZnNo','Disposable','PreconditionFailed','toLowerCase','type','ServiceUnavailable','then','abort','dispose','result','decode','toStringTag','SeeOther','HTTPService','AuthInterceptorFactory','requestParams','3719094SjMPYZ','_handleHeadersConstructorProps','open','XHRHTTPImplementation','MisdirectedRequest','noop','Locked','text','ImATeapot','_headers','HTTPStatusCode','Continue','headers','32nfhsGO','UpgradeRequired','put','getBody','_pipe','push','readyState','network.http-implementation','Found','MethodNotAllowed','getSSE','toHeadersInit','setRequestHeader','InsufficientStorage','responseText','Forbidden','DONE','NetworkAuthenticationRequired','NotFound','Unknown\x20Error','PaymentRequired','HTTPProgress','close','parseInt','UnavailableForLegalReasons','authInterceptor','ExpectationFailed','HTTPParams','PUT','maxRetryAttempts','signal','AlreadyReported','splice','defineProperty','teardown','FailedDependency','RangeNotSatisfiable','response','_handleHeadersString','POST','indexOf','PartialContent','read','WebSocketService','DELETE','EarlyHints','NoContent','parse','findIndex','mergeChunks','url','1581994ZCksoV','LoopDetected','uid','keys','HTTPResponse','include','BadGateway','NotImplemented','HTTPEventType','TooEarly','_setHeader','split','load','GET','PayloadTooLarge','send','UnprocessableEntity','NotAcceptable','removeEventListener','InternalServerError','Unauthorized','replace','GatewayTimeout','Conflict','add','rxjs','createIdentifier','toString','ThresholdInterceptorFactory','UseProxy','symbol','createSocket','_readBody','NotModified','body','MovedPermanently','name','onLoadHandler','config','content-type','content-length','remove','total','__decorateClass','pipe','TooManyRequests','status','params','ResponseHeader','message','_runInterceptorsAndImplementation','createDistributeResult','Unused','ProxyAuthenticationRequired','object','[FetchHTTPImplementation]:\x20unknown\x20response\x20type:\x20','throwError','includes','delete','752897HxjkHg','accept','MergeInterceptorFactory','LengthRequired','getHeadersInit','shift','Created','complete','toDisposable','FetchHTTPImplementation','HTTPHeaders','_send','tick','json','stringify','ImUsed','DisposableCollection','ResetContent','deserialize','error','univer.socket','sort','PATCH','chainInterceptorFn','statusText','HttpVersionNotSupported','4692484MZfNSM','getPlainList','catchError','NonAuthoritativeInformation','HTTPResponseError','NotExtended'];_0x5276=function(){return _0x524379;};return _0x5276();}let FetchHTTPImplementation=_FetchHTTPImplementation;function mergeChunks(_0x23b8bc,_0x4246a8){const _0x1c6204=_0x10b7e5,_0x550e81=new Uint8Array(_0x4246a8);let _0x16abc6=0x0;for(const _0x163b3a of _0x23b8bc)_0x550e81[_0x1c6204(0x1c3)](_0x163b3a,_0x16abc6),_0x16abc6+=_0x163b3a[_0x1c6204(0x1ba)];return _0x550e81;}__name(mergeChunks,_0x10b7e5(0x245));const XSSI_PREFIX=/^\)\]\}',?\n/;function deserialize(_0x483d4b,_0x2c3029,_0x174a44){const _0xce152d=_0x10b7e5;switch(_0x483d4b[_0xce152d(0x1c5)]){case _0xce152d(0x1a2):const _0x1389d6=new TextDecoder()[_0xce152d(0x201)](_0x2c3029)[_0xce152d(0x16f)](XSSI_PREFIX,'');return _0x1389d6===''?null:JSON[_0xce152d(0x243)](_0x1389d6);case _0xce152d(0x20e):return new TextDecoder()['decode'](_0x2c3029);case'blob':return new Blob([_0x2c3029],{'type':_0x174a44});case'arraybuffer':return _0x2c3029['buffer'];default:throw new Error(_0xce152d(0x191)+_0x483d4b['responseType']+'.');}}__name(deserialize,_0x10b7e5(0x1a7));const _XHRHTTPImplementation=class _XHRHTTPImplementation{[_0x10b7e5(0x169)](_0x2b9002){const _0x2f698f=_0x10b7e5;return new rxjs[(_0x2f698f(0x1e5))](_0x520770=>{const _0x2703a3=_0x2f698f,_0x2cb06a=new XMLHttpRequest();_0x2cb06a[_0x2703a3(0x209)](_0x2b9002['method'],_0x2b9002[_0x2703a3(0x1b9)]()),_0x2b9002[_0x2703a3(0x1d9)]&&(_0x2cb06a['withCredentials']=!0x0),_0x2b9002[_0x2703a3(0x213)][_0x2703a3(0x1b6)]((_0x22a4c3,_0x5cc77a)=>_0x2cb06a[_0x2703a3(0x220)](_0x22a4c3,_0x5cc77a[_0x2703a3(0x1ca)](','))),_0x2b9002[_0x2703a3(0x213)][_0x2703a3(0x1b7)](_0x2703a3(0x1bf))||_0x2cb06a[_0x2703a3(0x220)](_0x2703a3(0x1bf),_0x2703a3(0x1df)),_0x2b9002['headers'][_0x2703a3(0x1b7)](_0x2703a3(0x1de))||_0x2cb06a[_0x2703a3(0x220)]('Content-Type',_0x2703a3(0x1e6));const _0x32215b=__name(()=>{const _0x5b9695=_0x2703a3,_0x3e12f6=_0x2cb06a[_0x5b9695(0x1ad)]||'OK',_0x459ca6=new HTTPHeaders(_0x2cb06a['getAllResponseHeaders']());return new ResponseHeader(_0x459ca6,_0x2cb06a['status'],_0x3e12f6);},'buildResponseHeader'),_0x21c634=__name(()=>{const _0x5dc4ce=_0x2703a3,{headers:_0x5df072,statusText:_0x1d6d1c,status:_0x150222}=_0x32215b(),{responseType:_0x1edf60}=_0x2b9002;let _0x5dc586=null,_0x1577df=null;_0x150222!==HTTPStatusCode[_0x5dc4ce(0x242)]&&(_0x5dc586=typeof _0x2cb06a[_0x5dc4ce(0x239)]>'u'?_0x2cb06a[_0x5dc4ce(0x222)]:_0x2cb06a[_0x5dc4ce(0x239)]);let _0x11f8ab=_0x150222>=SuccessStatusCodeLowerBound&&_0x150222<ErrorStatusCodeLowerBound;if(_0x1edf60===_0x5dc4ce(0x1a2)&&typeof _0x5dc586=='string'){const _0x53987f=_0x5dc586;try{_0x5dc586=_0x5dc586?JSON['parse'](_0x5dc586):null;}catch(_0x42051f){_0x11f8ab=!0x1,_0x5dc586=_0x53987f,_0x1577df=_0x42051f;}}_0x11f8ab?_0x520770['next'](new HTTPResponse({'body':_0x5dc586,'headers':_0x5df072,'status':_0x150222,'statusText':_0x1d6d1c})):_0x520770[_0x5dc4ce(0x1a8)](new HTTPResponseError({'error':_0x1577df,'headers':_0x5df072,'status':_0x150222,'statusText':_0x1d6d1c}));},_0x2703a3(0x17f)),_0x1abb4a=__name(_0x5c3385=>{const _0x40983a=_0x2703a3,_0x3acc43=new HTTPResponseError({'error':_0x5c3385,'status':_0x2cb06a[_0x40983a(0x188)]||0x0,'statusText':_0x2cb06a[_0x40983a(0x1ad)]||'Unknown\x20Error','headers':_0x32215b()['headers']});_0x520770[_0x40983a(0x1a8)](_0x3acc43);},'onErrorHandler');_0x2cb06a[_0x2703a3(0x1c9)](_0x2703a3(0x253),_0x21c634),_0x2cb06a[_0x2703a3(0x1c9)](_0x2703a3(0x1a8),_0x1abb4a),_0x2cb06a['addEventListener']('abort',_0x1abb4a),_0x2cb06a['addEventListener']('timeout',_0x1abb4a);const _0x35c85b=_0x2b9002['getBody']();return _0x2cb06a[_0x2703a3(0x169)](_0x35c85b),()=>{const _0x3fef65=_0x2703a3;_0x2cb06a[_0x3fef65(0x21a)]!==_0x2cb06a[_0x3fef65(0x224)]&&_0x2cb06a[_0x3fef65(0x1fe)](),_0x2cb06a[_0x3fef65(0x16c)](_0x3fef65(0x253),_0x21c634),_0x2cb06a['removeEventListener'](_0x3fef65(0x1a8),_0x1abb4a),_0x2cb06a[_0x3fef65(0x16c)](_0x3fef65(0x1fe),_0x1abb4a),_0x2cb06a[_0x3fef65(0x16c)](_0x3fef65(0x1c8),_0x1abb4a);};});}};__name(_XHRHTTPImplementation,'XHRHTTPImplementation');let XHRHTTPImplementation=_XHRHTTPImplementation;const ISocketService=core[_0x10b7e5(0x174)](_0x10b7e5(0x1a9)),_WebSocketService=class _WebSocketService extends core[_0x10b7e5(0x1f8)]{[_0x10b7e5(0x179)](_0x4f0b16){const _0x3e2171=_0x10b7e5;try{const _0x1ab47f=new WebSocket(_0x4f0b16),_0x4e3208=new core[(_0x3e2171(0x1a5))]();return{'URL':_0x4f0b16,'close':__name((_0x12233b,_0x1d1fc2)=>{const _0x21b41e=_0x3e2171;_0x1ab47f[_0x21b41e(0x22a)](_0x12233b,_0x1d1fc2),_0x4e3208[_0x21b41e(0x1ff)]();},'close'),'send':__name(_0x2e14fb=>{const _0xff6366=_0x3e2171;_0x1ab47f[_0xff6366(0x169)](_0x2e14fb);},_0x3e2171(0x169)),'open$':new rxjs[(_0x3e2171(0x1e5))](_0x1421bb=>{const _0x3abe08=_0x3e2171,_0x337a54=__name(_0x524021=>_0x1421bb[_0x3abe08(0x1ee)](_0x524021),_0x3abe08(0x1dd));_0x1ab47f[_0x3abe08(0x1c9)](_0x3abe08(0x209),_0x337a54),_0x4e3208[_0x3abe08(0x172)](core[_0x3abe08(0x19d)](()=>_0x1ab47f[_0x3abe08(0x16c)](_0x3abe08(0x209),_0x337a54)));})[_0x3e2171(0x186)](operators[_0x3e2171(0x1bc)]()),'close$':new rxjs['Observable'](_0x5f42f7=>{const _0x10621e=_0x3e2171,_0x21a2f9=__name(_0xda4dc4=>_0x5f42f7[_0x10621e(0x1ee)](_0xda4dc4),'callback');_0x1ab47f[_0x10621e(0x1c9)]('close',_0x21a2f9),_0x4e3208[_0x10621e(0x172)](core[_0x10621e(0x19d)](()=>_0x1ab47f[_0x10621e(0x16c)]('close',_0x21a2f9)));})[_0x3e2171(0x186)](operators['share']()),'error$':new rxjs[(_0x3e2171(0x1e5))](_0xa3717f=>{const _0x507af7=_0x3e2171,_0x33705b=__name(_0x34aff8=>_0xa3717f[_0x507af7(0x1ee)](_0x34aff8),'callback');_0x1ab47f[_0x507af7(0x1c9)](_0x507af7(0x1a8),_0x33705b),_0x4e3208['add'](core[_0x507af7(0x19d)](()=>_0x1ab47f[_0x507af7(0x16c)](_0x507af7(0x1a8),_0x33705b)));})[_0x3e2171(0x186)](operators[_0x3e2171(0x1bc)]()),'message$':new rxjs[(_0x3e2171(0x1e5))](_0x1e9ffd=>{const _0x42ee15=_0x3e2171,_0x398680=__name(_0x18b7e9=>_0x1e9ffd[_0x42ee15(0x1ee)](_0x18b7e9),'callback');_0x1ab47f[_0x42ee15(0x1c9)](_0x42ee15(0x18b),_0x398680),_0x4e3208[_0x42ee15(0x172)](core['toDisposable'](()=>_0x1ab47f['removeEventListener'](_0x42ee15(0x18b),_0x398680)));})[_0x3e2171(0x186)](operators[_0x3e2171(0x1bc)]())};}catch(_0x4e2a4f){return console[_0x3e2171(0x1a8)](_0x4e2a4f),null;}}};__name(_WebSocketService,_0x10b7e5(0x23f));let WebSocketService=_WebSocketService;const DEFAULT_MAX_RETRY_ATTEMPTS=0x3,DELAY_INTERVAL=0x3e8,RetryInterceptorFactory=__name(_0x36e488=>{const _0x5c7547=_0x10b7e5;var _0x3f485f,_0x43802a;const _0xb2ef68=(_0x3f485f=_0x36e488==null?void 0x0:_0x36e488[_0x5c7547(0x231)])!=null?_0x3f485f:DEFAULT_MAX_RETRY_ATTEMPTS,_0x11d0a2=(_0x43802a=_0x36e488==null?void 0x0:_0x36e488['delayInterval'])!=null?_0x43802a:DELAY_INTERVAL;return(_0x371ce4,_0x1ba2db)=>_0x1ba2db(_0x371ce4)[_0x5c7547(0x186)](operators['retry']({'delay':_0x11d0a2,'count':_0xb2ef68}));},_0x10b7e5(0x1d5)),ThresholdInterceptorFactory=__name(_0x2a5bf0=>{const _0x5e25c0=_0x10b7e5,_0x320895=[],_0x365d0a=new Set(),_0x59c4a0=__name(()=>{const _0x23285a=_0x3e00;var _0x2d4c5b;for(;_0x365d0a[_0x23285a(0x1e3)]<((_0x2d4c5b=_0x2a5bf0==null?void 0x0:_0x2a5bf0['maxParallel'])!=null?_0x2d4c5b:0x1)&&_0x320895[_0x23285a(0x1ba)]>0x0;){const _0x2982f0=_0x320895[_0x23285a(0x19a)]();_0x365d0a[_0x23285a(0x172)](_0x2982f0),_0x2982f0();}},_0x5e25c0(0x1a1));return(_0x2628bc,_0xc34194)=>new rxjs[(_0x5e25c0(0x1e5))](_0x467029=>{const _0x317e35=_0x5e25c0,_0xd791b2=__name(()=>_0xc34194(_0x2628bc)[_0x317e35(0x1c7)]({'next':__name(_0x176dcf=>_0x467029[_0x317e35(0x1ee)](_0x176dcf),_0x317e35(0x1ee)),'error':__name(_0x556683=>_0x467029[_0x317e35(0x1a8)](_0x556683),_0x317e35(0x1a8)),'complete':__name(()=>_0x467029['complete'](),_0x317e35(0x19c))}),_0x317e35(0x1f4)),_0xb71d46=__name(()=>{const _0x58c67d=_0x317e35;_0x365d0a[_0x58c67d(0x194)](_0xd791b2),core[_0x58c67d(0x183)](_0x320895,_0xd791b2),_0x59c4a0();},_0x317e35(0x236));return _0x320895[_0x317e35(0x219)](_0xd791b2),_0x59c4a0(),_0xb71d46;});},_0x10b7e5(0x176)),AuthInterceptorFactory=__name(_0xd9ef65=>{const _0x169b1a=_0x10b7e5,{errorStatusCodes:_0x278b1a,onAuthError:_0x241ff8}=_0xd9ef65;return __name((_0x4128cc,_0x23fca7)=>_0x23fca7(_0x4128cc)[_0x169b1a(0x186)](rxjs[_0x169b1a(0x1b1)](_0x26c2d9=>(_0x26c2d9 instanceof HTTPResponseError&&_0x278b1a['some'](_0x33a228=>_0x33a228===_0x26c2d9[_0x169b1a(0x188)])&&_0x241ff8(),rxjs[_0x169b1a(0x192)](()=>_0x26c2d9)))),_0x169b1a(0x22d));},_0x10b7e5(0x205)),createDefaultFetchCheck=__name((_0x1f7fba=0x12c)=>{const _0x38e578=_0x10b7e5;let _0x252b5c=__name(()=>{},_0x38e578(0x20c));return _0xaa0550=>new Promise(_0x49292a=>{_0x252b5c();const _0x213947=setTimeout(()=>{_0x49292a(!0x0);},_0x1f7fba);_0x252b5c=__name(()=>{clearTimeout(_0x213947),_0x49292a(!0x1);},'cancel');});},_0x10b7e5(0x1dc)),createDistributeResult=__name(()=>(_0x299902,_0x3126ce)=>_0x3126ce[_0x10b7e5(0x1c0)](_0x27236a=>({'config':_0x27236a,'result':_0x299902})),_0x10b7e5(0x18d)),MergeInterceptorFactory=__name((_0x3240a3,_0x4c22d4={})=>{const _0x5989a8=_0x10b7e5,{isMatch:_0x2d715a,getParamsFromRequest:_0x4a74fb,mergeParamsToRequest:_0x353905}=_0x3240a3,{fetchCheck:fetchCheck=createDefaultFetchCheck(0x12c),distributeResult:distributeResult=createDistributeResult()}=_0x4c22d4,_0x4f0a79=[],_0x11243e=__name(_0x13c3ea=>_0x13c3ea[_0x5989a8(0x1c0)](_0x54e142=>_0x54e142[_0x5989a8(0x180)]),_0x5989a8(0x1b0));return(_0xd26116,_0x10571e)=>_0x2d715a(_0xd26116)?new rxjs[(_0x5989a8(0x1e5))](_0x1daa7b=>{const _0x52e78d=_0x5989a8,_0x4233cc=_0x4a74fb(_0xd26116);_0x4f0a79['push']({'next':__name(_0x1e26a4=>_0x1daa7b[_0x52e78d(0x1ee)](_0x1e26a4),_0x52e78d(0x1ee)),'error':__name(_0x51236f=>_0x1daa7b['error'](_0x51236f),_0x52e78d(0x1a8)),'config':_0x4233cc});const _0xa970cf=_0x11243e(_0x4f0a79);fetchCheck(_0xd26116)[_0x52e78d(0x1fd)](_0x478d72=>{const _0x4a9404=_0x52e78d;if(_0x478d72){const _0x404d50=[];_0xa970cf[_0x4a9404(0x1b6)](_0x308963=>{const _0x5be44d=_0x4a9404,_0x59f9c0=_0x4f0a79[_0x5be44d(0x244)](_0x2b56cf=>_0x2b56cf['config']===_0x308963);if(_0x59f9c0>=0x0){const [_0x2474e7]=_0x4f0a79[_0x5be44d(0x234)](_0x59f9c0,0x1);_0x404d50[_0x5be44d(0x219)](_0x2474e7);}}),_0x10571e(_0x353905(_0xa970cf,_0xd26116))[_0x4a9404(0x1c7)]({'next':__name(_0xf4a483=>{const _0x13c7f8=_0x4a9404;if(_0xf4a483['type']===HTTPEventType[_0x13c7f8(0x1f3)]){const _0x397138=_0xf4a483['body'],_0x1f8a84=distributeResult(_0x397138,_0xa970cf);_0x404d50[_0x13c7f8(0x1b6)](_0x5ea820=>{const _0x527566=_0x13c7f8,_0x5f02f0=_0x1f8a84[_0x527566(0x1d4)](_0x3b33b1=>_0x3b33b1[_0x527566(0x180)]===_0x5ea820['config']);if(_0x5f02f0){const _0x511a3c=new HTTPResponse({'body':_0x5f02f0[_0x527566(0x200)],'headers':_0xf4a483[_0x527566(0x213)],'status':_0xf4a483[_0x527566(0x188)],'statusText':_0xf4a483[_0x527566(0x1ad)]});_0x5ea820[_0x527566(0x1ee)](_0x511a3c);}else _0x5ea820[_0x527566(0x1a8)](_0x527566(0x1cb));});}},_0x4a9404(0x1ee)),'complete':__name(()=>_0x1daa7b[_0x4a9404(0x19c)](),_0x4a9404(0x19c)),'error':__name(_0x496e75=>_0x1daa7b[_0x4a9404(0x1a8)](_0x496e75),_0x4a9404(0x1a8))});}});}):_0x10571e(_0xd26116);},_0x10b7e5(0x197));exports[_0x10b7e5(0x205)]=AuthInterceptorFactory,exports[_0x10b7e5(0x19e)]=FetchHTTPImplementation,exports[_0x10b7e5(0x24f)]=HTTPEventType,exports[_0x10b7e5(0x19f)]=HTTPHeaders,exports[_0x10b7e5(0x229)]=HTTPProgress,exports[_0x10b7e5(0x1da)]=HTTPRequest,exports[_0x10b7e5(0x24b)]=HTTPResponse,exports[_0x10b7e5(0x1b3)]=HTTPResponseError,exports[_0x10b7e5(0x211)]=HTTPStatusCode,exports['IHTTPImplementation']=IHTTPImplementation,exports[_0x10b7e5(0x1c2)]=ISocketService,exports[_0x10b7e5(0x197)]=MergeInterceptorFactory,exports[_0x10b7e5(0x18a)]=ResponseHeader,exports[_0x10b7e5(0x1d5)]=RetryInterceptorFactory,exports[_0x10b7e5(0x176)]=ThresholdInterceptorFactory,exports[_0x10b7e5(0x23f)]=WebSocketService,exports[_0x10b7e5(0x20a)]=XHRHTTPImplementation;
package/lib/es/index.js CHANGED
@@ -1,534 +1 @@
1
- var __defProp = Object.defineProperty;
2
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key] = value;
3
- var __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
4
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key != "symbol" ? key + "" : key, value);
5
- import { createIdentifier, Disposable, toDisposable, remove, DisposableCollection } from "@univerjs/core";
6
- import { of, firstValueFrom, Observable, catchError, throwError } from "rxjs";
7
- import { concatMap, share, retry } from "rxjs/operators";
8
- const ApplicationJSONType = "application/json", _HTTPHeaders = class _HTTPHeaders {
9
- constructor(headers) {
10
- __publicField(this, "_headers", /* @__PURE__ */ new Map());
11
- typeof headers == "string" ? this._handleHeadersString(headers) : headers instanceof Headers ? this._handleHeaders(headers) : headers && this._handleHeadersConstructorProps(headers);
12
- }
13
- forEach(callback) {
14
- this._headers.forEach((v, key) => callback(key, v));
15
- }
16
- has(key) {
17
- return !!this._headers.has(key.toLowerCase());
18
- }
19
- get(key) {
20
- const k = key.toLowerCase();
21
- return this._headers.has(k) ? this._headers.get(k) : null;
22
- }
23
- set(key, value) {
24
- this._setHeader(key, value);
25
- }
26
- toHeadersInit() {
27
- var _a2, _b;
28
- const headers = {};
29
- return this._headers.forEach((values, key) => {
30
- headers[key] = values.join(",");
31
- }), (_a2 = headers.accept) != null || (headers.accept = "application/json, text/plain, */*"), (_b = headers["content-type"]) != null || (headers["content-type"] = "application/json;charset=UTF-8"), headers;
32
- }
33
- _setHeader(name, value) {
34
- const lowerCase = name.toLowerCase();
35
- this._headers.has(lowerCase) ? this._headers.get(lowerCase).push(value.toString()) : this._headers.set(lowerCase, [value.toString()]);
36
- }
37
- _handleHeadersString(headers) {
38
- headers.split(`
39
- `).forEach((header) => {
40
- const [name, value] = header.split(":");
41
- name && value && this._setHeader(name, value);
42
- });
43
- }
44
- _handleHeadersConstructorProps(headers) {
45
- Object.entries(headers).forEach(([name, value]) => this._setHeader(name, value));
46
- }
47
- _handleHeaders(headers) {
48
- headers.forEach((value, name) => this._setHeader(name, value));
49
- }
50
- };
51
- __name(_HTTPHeaders, "HTTPHeaders");
52
- let HTTPHeaders = _HTTPHeaders;
53
- const IHTTPImplementation = createIdentifier("network.http-implementation"), _HTTPParams = class _HTTPParams {
54
- constructor(params) {
55
- this.params = params;
56
- }
57
- toString() {
58
- return this.params ? Object.keys(this.params).map((key) => `${key}=${this.params[key]}`).join("&") : "";
59
- }
60
- };
61
- __name(_HTTPParams, "HTTPParams");
62
- let HTTPParams = _HTTPParams, HTTPRequestUID = 0;
63
- const _HTTPRequest = class _HTTPRequest {
64
- constructor(method, url, requestParams) {
65
- __publicField(this, "uid", HTTPRequestUID++);
66
- this.method = method, this.url = url, this.requestParams = requestParams;
67
- }
68
- get headers() {
69
- return this.requestParams.headers;
70
- }
71
- get withCredentials() {
72
- return this.requestParams.withCredentials;
73
- }
74
- get responseType() {
75
- return this.requestParams.responseType;
76
- }
77
- getUrlWithParams() {
78
- var _a2, _b;
79
- const params = (_b = (_a2 = this.requestParams) == null ? void 0 : _a2.params) == null ? void 0 : _b.toString();
80
- return params ? `${this.url}${this.url.includes("?") ? "&" : "?"}${params}` : this.url;
81
- }
82
- getBody() {
83
- var _a2, _b;
84
- const contentType = (_a2 = this.headers.get("Content-Type")) != null ? _a2 : ApplicationJSONType, body = (_b = this.requestParams) == null ? void 0 : _b.body;
85
- return contentType === ApplicationJSONType && body && typeof body == "object" ? JSON.stringify(body) : body ? `${body}` : null;
86
- }
87
- getHeadersInit() {
88
- return this.headers.toHeadersInit();
89
- }
90
- };
91
- __name(_HTTPRequest, "HTTPRequest");
92
- let HTTPRequest = _HTTPRequest;
93
- var __defProp2 = Object.defineProperty, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __decorateClass = /* @__PURE__ */ __name((decorators, target, key, kind) => {
94
- for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--)
95
- (decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result);
96
- return kind && result && __defProp2(target, key, result), result;
97
- }, "__decorateClass"), __decorateParam = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam"), _a;
98
- let HTTPService = (_a = class extends Disposable {
99
- constructor(_http) {
100
- super();
101
- __publicField(this, "_interceptors", []);
102
- // eslint-disable-next-line ts/no-explicit-any
103
- __publicField(this, "_pipe");
104
- this._http = _http;
105
- }
106
- /**
107
- * Register an HTTP interceptor.
108
- *
109
- * @param interceptor the http interceptor
110
- * @returns a disposable handler to remove the interceptor
111
- */
112
- registerHTTPInterceptor(interceptor) {
113
- if (this._interceptors.indexOf(interceptor) !== -1)
114
- throw new Error("[HTTPService]: The interceptor has already been registered!");
115
- return this._interceptors.push(interceptor), this._interceptors = this._interceptors.sort((a, b) => {
116
- var _a2, _b;
117
- return ((_a2 = a.priority) != null ? _a2 : 0) - ((_b = b.priority) != null ? _b : 0);
118
- }), this._pipe = null, toDisposable(() => remove(this._interceptors, interceptor));
119
- }
120
- get(url, params) {
121
- return this._request("GET", url, params);
122
- }
123
- post(url, params) {
124
- return this._request("POST", url, params);
125
- }
126
- put(url, params) {
127
- return this._request("PUT", url, params);
128
- }
129
- delete(url, params) {
130
- return this._request("DELETE", url, params);
131
- }
132
- patch(url, options) {
133
- return this._request("PATCH", url, options);
134
- }
135
- getSSE(method, url, options) {
136
- var _a2, _b;
137
- const headers = new HTTPHeaders(options == null ? void 0 : options.headers), params = new HTTPParams(options == null ? void 0 : options.params), request = new HTTPRequest(method, url, {
138
- headers,
139
- params,
140
- withCredentials: (_a2 = options == null ? void 0 : options.withCredentials) != null ? _a2 : !1,
141
- reportProgress: !0,
142
- responseType: (_b = options == null ? void 0 : options.responseType) != null ? _b : "json",
143
- body: ["GET", "DELETE"].includes(method) || options == null ? void 0 : options.body
144
- });
145
- return of(request).pipe(concatMap((request2) => this._runInterceptorsAndImplementation(request2)));
146
- }
147
- /** The HTTP request implementations */
148
- async _request(method, url, options) {
149
- var _a2, _b;
150
- const headers = new HTTPHeaders(options == null ? void 0 : options.headers), params = new HTTPParams(options == null ? void 0 : options.params), request = new HTTPRequest(method, url, {
151
- headers,
152
- params,
153
- withCredentials: (_a2 = options == null ? void 0 : options.withCredentials) != null ? _a2 : !1,
154
- // default value for withCredentials is false by MDN
155
- responseType: (_b = options == null ? void 0 : options.responseType) != null ? _b : "json",
156
- body: ["GET", "DELETE"].includes(method) || options == null ? void 0 : options.body
157
- }), events$ = of(request).pipe(
158
- concatMap((request2) => this._runInterceptorsAndImplementation(request2))
159
- );
160
- return await firstValueFrom(events$);
161
- }
162
- // eslint-disable-next-line ts/no-explicit-any
163
- _runInterceptorsAndImplementation(request) {
164
- return this._pipe || (this._pipe = this._interceptors.map((handler) => handler.interceptor).reduceRight(
165
- (nextHandlerFunction, interceptorFunction) => chainInterceptorFn(nextHandlerFunction, interceptorFunction),
166
- (requestFromPrevInterceptor, finalHandler) => finalHandler(requestFromPrevInterceptor)
167
- )), this._pipe(
168
- request,
169
- (requestToNext) => this._http.send(requestToNext)
170
- /* final handler */
171
- );
172
- }
173
- }, __name(_a, "HTTPService"), _a);
174
- HTTPService = __decorateClass([
175
- __decorateParam(0, IHTTPImplementation)
176
- ], HTTPService);
177
- function chainInterceptorFn(afterInterceptorChain, currentInterceptorFn) {
178
- return (prevRequest, nextHandlerFn) => currentInterceptorFn(prevRequest, (nextRequest) => afterInterceptorChain(nextRequest, nextHandlerFn));
179
- }
180
- __name(chainInterceptorFn, "chainInterceptorFn");
181
- var HTTPEventType = /* @__PURE__ */ ((HTTPEventType2) => (HTTPEventType2[HTTPEventType2.DownloadProgress = 0] = "DownloadProgress", HTTPEventType2[HTTPEventType2.Response = 1] = "Response", HTTPEventType2))(HTTPEventType || {});
182
- const _HTTPResponse = class _HTTPResponse {
183
- constructor({
184
- body,
185
- headers,
186
- status,
187
- statusText
188
- }) {
189
- __publicField(this, "type", 1);
190
- __publicField(this, "body");
191
- __publicField(this, "headers");
192
- __publicField(this, "status");
193
- __publicField(this, "statusText");
194
- this.body = body, this.headers = headers, this.status = status, this.statusText = statusText;
195
- }
196
- };
197
- __name(_HTTPResponse, "HTTPResponse");
198
- let HTTPResponse = _HTTPResponse;
199
- const _HTTPProgress = class _HTTPProgress {
200
- constructor(total, loaded, partialText) {
201
- __publicField(this, "type", 0);
202
- this.total = total, this.loaded = loaded, this.partialText = partialText;
203
- }
204
- };
205
- __name(_HTTPProgress, "HTTPProgress");
206
- let HTTPProgress = _HTTPProgress;
207
- const _ResponseHeader = class _ResponseHeader {
208
- constructor(headers, status, statusText) {
209
- this.headers = headers, this.status = status, this.statusText = statusText;
210
- }
211
- };
212
- __name(_ResponseHeader, "ResponseHeader");
213
- let ResponseHeader = _ResponseHeader;
214
- const _HTTPResponseError = class _HTTPResponseError {
215
- constructor({
216
- headers,
217
- status,
218
- statusText,
219
- error
220
- }) {
221
- __publicField(this, "headers");
222
- __publicField(this, "status");
223
- __publicField(this, "statusText");
224
- __publicField(this, "error");
225
- this.headers = headers, this.status = status, this.statusText = statusText, this.error = error;
226
- }
227
- };
228
- __name(_HTTPResponseError, "HTTPResponseError");
229
- let HTTPResponseError = _HTTPResponseError;
230
- const SuccessStatusCodeLowerBound = 200, ErrorStatusCodeLowerBound = 300;
231
- var HTTPStatusCode = /* @__PURE__ */ ((HTTPStatusCode2) => (HTTPStatusCode2[HTTPStatusCode2.Continue = 100] = "Continue", HTTPStatusCode2[HTTPStatusCode2.SwitchingProtocols = 101] = "SwitchingProtocols", HTTPStatusCode2[HTTPStatusCode2.Processing = 102] = "Processing", HTTPStatusCode2[HTTPStatusCode2.EarlyHints = 103] = "EarlyHints", HTTPStatusCode2[HTTPStatusCode2.Ok = 200] = "Ok", HTTPStatusCode2[HTTPStatusCode2.Created = 201] = "Created", HTTPStatusCode2[HTTPStatusCode2.Accepted = 202] = "Accepted", HTTPStatusCode2[HTTPStatusCode2.NonAuthoritativeInformation = 203] = "NonAuthoritativeInformation", HTTPStatusCode2[HTTPStatusCode2.NoContent = 204] = "NoContent", HTTPStatusCode2[HTTPStatusCode2.ResetContent = 205] = "ResetContent", HTTPStatusCode2[HTTPStatusCode2.PartialContent = 206] = "PartialContent", HTTPStatusCode2[HTTPStatusCode2.MultiStatus = 207] = "MultiStatus", HTTPStatusCode2[HTTPStatusCode2.AlreadyReported = 208] = "AlreadyReported", HTTPStatusCode2[HTTPStatusCode2.ImUsed = 226] = "ImUsed", HTTPStatusCode2[HTTPStatusCode2.MultipleChoices = 300] = "MultipleChoices", HTTPStatusCode2[HTTPStatusCode2.MovedPermanently = 301] = "MovedPermanently", HTTPStatusCode2[HTTPStatusCode2.Found = 302] = "Found", HTTPStatusCode2[HTTPStatusCode2.SeeOther = 303] = "SeeOther", HTTPStatusCode2[HTTPStatusCode2.NotModified = 304] = "NotModified", HTTPStatusCode2[HTTPStatusCode2.UseProxy = 305] = "UseProxy", HTTPStatusCode2[HTTPStatusCode2.Unused = 306] = "Unused", HTTPStatusCode2[HTTPStatusCode2.TemporaryRedirect = 307] = "TemporaryRedirect", HTTPStatusCode2[HTTPStatusCode2.PermanentRedirect = 308] = "PermanentRedirect", HTTPStatusCode2[HTTPStatusCode2.BadRequest = 400] = "BadRequest", HTTPStatusCode2[HTTPStatusCode2.Unauthorized = 401] = "Unauthorized", HTTPStatusCode2[HTTPStatusCode2.PaymentRequired = 402] = "PaymentRequired", HTTPStatusCode2[HTTPStatusCode2.Forbidden = 403] = "Forbidden", HTTPStatusCode2[HTTPStatusCode2.NotFound = 404] = "NotFound", HTTPStatusCode2[HTTPStatusCode2.MethodNotAllowed = 405] = "MethodNotAllowed", HTTPStatusCode2[HTTPStatusCode2.NotAcceptable = 406] = "NotAcceptable", HTTPStatusCode2[HTTPStatusCode2.ProxyAuthenticationRequired = 407] = "ProxyAuthenticationRequired", HTTPStatusCode2[HTTPStatusCode2.RequestTimeout = 408] = "RequestTimeout", HTTPStatusCode2[HTTPStatusCode2.Conflict = 409] = "Conflict", HTTPStatusCode2[HTTPStatusCode2.Gone = 410] = "Gone", HTTPStatusCode2[HTTPStatusCode2.LengthRequired = 411] = "LengthRequired", HTTPStatusCode2[HTTPStatusCode2.PreconditionFailed = 412] = "PreconditionFailed", HTTPStatusCode2[HTTPStatusCode2.PayloadTooLarge = 413] = "PayloadTooLarge", HTTPStatusCode2[HTTPStatusCode2.UriTooLong = 414] = "UriTooLong", HTTPStatusCode2[HTTPStatusCode2.UnsupportedMediaType = 415] = "UnsupportedMediaType", HTTPStatusCode2[HTTPStatusCode2.RangeNotSatisfiable = 416] = "RangeNotSatisfiable", HTTPStatusCode2[HTTPStatusCode2.ExpectationFailed = 417] = "ExpectationFailed", HTTPStatusCode2[HTTPStatusCode2.ImATeapot = 418] = "ImATeapot", HTTPStatusCode2[HTTPStatusCode2.MisdirectedRequest = 421] = "MisdirectedRequest", HTTPStatusCode2[HTTPStatusCode2.UnprocessableEntity = 422] = "UnprocessableEntity", HTTPStatusCode2[HTTPStatusCode2.Locked = 423] = "Locked", HTTPStatusCode2[HTTPStatusCode2.FailedDependency = 424] = "FailedDependency", HTTPStatusCode2[HTTPStatusCode2.TooEarly = 425] = "TooEarly", HTTPStatusCode2[HTTPStatusCode2.UpgradeRequired = 426] = "UpgradeRequired", HTTPStatusCode2[HTTPStatusCode2.PreconditionRequired = 428] = "PreconditionRequired", HTTPStatusCode2[HTTPStatusCode2.TooManyRequests = 429] = "TooManyRequests", HTTPStatusCode2[HTTPStatusCode2.RequestHeaderFieldsTooLarge = 431] = "RequestHeaderFieldsTooLarge", HTTPStatusCode2[HTTPStatusCode2.UnavailableForLegalReasons = 451] = "UnavailableForLegalReasons", HTTPStatusCode2[HTTPStatusCode2.InternalServerError = 500] = "InternalServerError", HTTPStatusCode2[HTTPStatusCode2.NotImplemented = 501] = "NotImplemented", HTTPStatusCode2[HTTPStatusCode2.BadGateway = 502] = "BadGateway", HTTPStatusCode2[HTTPStatusCode2.ServiceUnavailable = 503] = "ServiceUnavailable", HTTPStatusCode2[HTTPStatusCode2.GatewayTimeout = 504] = "GatewayTimeout", HTTPStatusCode2[HTTPStatusCode2.HttpVersionNotSupported = 505] = "HttpVersionNotSupported", HTTPStatusCode2[HTTPStatusCode2.VariantAlsoNegotiates = 506] = "VariantAlsoNegotiates", HTTPStatusCode2[HTTPStatusCode2.InsufficientStorage = 507] = "InsufficientStorage", HTTPStatusCode2[HTTPStatusCode2.LoopDetected = 508] = "LoopDetected", HTTPStatusCode2[HTTPStatusCode2.NotExtended = 510] = "NotExtended", HTTPStatusCode2[HTTPStatusCode2.NetworkAuthenticationRequired = 511] = "NetworkAuthenticationRequired", HTTPStatusCode2))(HTTPStatusCode || {});
232
- const _FetchHTTPImplementation = class _FetchHTTPImplementation {
233
- send(request) {
234
- return new Observable((subscriber) => {
235
- const abortController = new AbortController();
236
- return this._send(request, subscriber, abortController).then(() => {
237
- }, (error) => {
238
- subscriber.error(new HTTPResponseError({
239
- error
240
- }));
241
- }), () => abortController.abort();
242
- });
243
- }
244
- async _send(request, subscriber, abortController) {
245
- var _a2, _b;
246
- let response;
247
- try {
248
- const fetchParams = this._parseFetchParamsFromRequest(request);
249
- response = await fetch(request.getUrlWithParams(), {
250
- signal: abortController.signal,
251
- ...fetchParams
252
- });
253
- } catch (error) {
254
- subscriber.error(new HTTPResponseError({
255
- error,
256
- status: (_a2 = error.status) != null ? _a2 : 0,
257
- statusText: (_b = error.statusText) != null ? _b : "Unknown Error",
258
- headers: error.headers
259
- }));
260
- return;
261
- }
262
- const responseHeaders = new HTTPHeaders(response.headers), status = response.status, statusText = response.statusText;
263
- let body = null;
264
- response.body && (body = await this._readBody(request, response, subscriber)), status >= HTTPStatusCode.Ok && status < HTTPStatusCode.MultipleChoices ? subscriber.next(new HTTPResponse({
265
- body,
266
- headers: responseHeaders,
267
- status,
268
- statusText
269
- })) : subscriber.error(new HTTPResponseError({
270
- error: body,
271
- status,
272
- statusText,
273
- headers: responseHeaders
274
- })), subscriber.complete();
275
- }
276
- async _readBody(request, response, subscriber) {
277
- var _a2, _b;
278
- const chunks = [], reader = response.body.getReader(), contentLength = response.headers.get("content-length");
279
- let receivedLength = 0;
280
- const reportProgress = (_a2 = request.requestParams) == null ? void 0 : _a2.reportProgress, responseType = request.responseType;
281
- let partialText, decoder;
282
- for (; ; ) {
283
- const { done, value } = await reader.read();
284
- if (done) break;
285
- chunks.push(value), receivedLength += value.length, reportProgress && responseType === "text" && (partialText = (partialText != null ? partialText : "") + (decoder != null ? decoder : decoder = new TextDecoder()).decode(value, { stream: !0 }), subscriber.next(new HTTPProgress(
286
- contentLength ? Number.parseInt(contentLength, 10) : void 0,
287
- receivedLength,
288
- partialText
289
- )));
290
- }
291
- const all = mergeChunks(chunks, receivedLength);
292
- try {
293
- const contentType = (_b = response.headers.get("content-type")) != null ? _b : "";
294
- return deserialize(request, all, contentType);
295
- } catch (error) {
296
- return subscriber.error(new HTTPResponseError({
297
- error,
298
- status: response.status,
299
- statusText: response.statusText,
300
- headers: new HTTPHeaders(response.headers)
301
- })), null;
302
- }
303
- }
304
- _parseFetchParamsFromRequest(request) {
305
- return {
306
- method: request.method,
307
- headers: request.getHeadersInit(),
308
- body: request.getBody(),
309
- credentials: request.withCredentials ? "include" : void 0
310
- };
311
- }
312
- };
313
- __name(_FetchHTTPImplementation, "FetchHTTPImplementation");
314
- let FetchHTTPImplementation = _FetchHTTPImplementation;
315
- function mergeChunks(chunks, totalLength) {
316
- const all = new Uint8Array(totalLength);
317
- let position = 0;
318
- for (const chunk of chunks)
319
- all.set(chunk, position), position += chunk.length;
320
- return all;
321
- }
322
- __name(mergeChunks, "mergeChunks");
323
- const XSSI_PREFIX = /^\)\]\}',?\n/;
324
- function deserialize(request, bin, contentType) {
325
- switch (request.responseType) {
326
- case "json":
327
- const text = new TextDecoder().decode(bin).replace(XSSI_PREFIX, "");
328
- return text === "" ? null : JSON.parse(text);
329
- case "text":
330
- return new TextDecoder().decode(bin);
331
- case "blob":
332
- return new Blob([bin], { type: contentType });
333
- case "arraybuffer":
334
- return bin.buffer;
335
- default:
336
- throw new Error(`[FetchHTTPImplementation]: unknown response type: ${request.responseType}.`);
337
- }
338
- }
339
- __name(deserialize, "deserialize");
340
- const _XHRHTTPImplementation = class _XHRHTTPImplementation {
341
- send(request) {
342
- return new Observable((observer) => {
343
- const xhr = new XMLHttpRequest();
344
- xhr.open(request.method, request.getUrlWithParams()), request.withCredentials && (xhr.withCredentials = !0), request.headers.forEach((key, value) => xhr.setRequestHeader(key, value.join(","))), request.headers.has("Accept") || xhr.setRequestHeader("Accept", "application/json, text/plain, */*"), request.headers.has("Content-Type") || xhr.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
345
- const buildResponseHeader = /* @__PURE__ */ __name(() => {
346
- const statusText = xhr.statusText || "OK", headers = new HTTPHeaders(xhr.getAllResponseHeaders());
347
- return new ResponseHeader(headers, xhr.status, statusText);
348
- }, "buildResponseHeader"), onLoadHandler = /* @__PURE__ */ __name(() => {
349
- const { headers, statusText, status } = buildResponseHeader(), { responseType } = request;
350
- let body2 = null, error = null;
351
- status !== HTTPStatusCode.NoContent && (body2 = typeof xhr.response > "u" ? xhr.responseText : xhr.response);
352
- let success = status >= SuccessStatusCodeLowerBound && status < ErrorStatusCodeLowerBound;
353
- if (responseType === "json" && typeof body2 == "string") {
354
- const originalBody = body2;
355
- try {
356
- body2 = body2 ? JSON.parse(body2) : null;
357
- } catch (e) {
358
- success = !1, body2 = originalBody, error = e;
359
- }
360
- }
361
- success ? observer.next(
362
- new HTTPResponse({
363
- body: body2,
364
- headers,
365
- status,
366
- statusText
367
- })
368
- ) : observer.error(
369
- new HTTPResponseError({
370
- error,
371
- headers,
372
- status,
373
- statusText
374
- })
375
- );
376
- }, "onLoadHandler"), onErrorHandler = /* @__PURE__ */ __name((error) => {
377
- const res = new HTTPResponseError({
378
- error,
379
- status: xhr.status || 0,
380
- statusText: xhr.statusText || "Unknown Error",
381
- headers: buildResponseHeader().headers
382
- });
383
- observer.error(res);
384
- }, "onErrorHandler");
385
- xhr.addEventListener("load", onLoadHandler), xhr.addEventListener("error", onErrorHandler), xhr.addEventListener("abort", onErrorHandler), xhr.addEventListener("timeout", onErrorHandler);
386
- const body = request.getBody();
387
- return xhr.send(body), () => {
388
- xhr.readyState !== xhr.DONE && xhr.abort(), xhr.removeEventListener("load", onLoadHandler), xhr.removeEventListener("error", onErrorHandler), xhr.removeEventListener("abort", onErrorHandler), xhr.removeEventListener("timeout", onErrorHandler);
389
- };
390
- });
391
- }
392
- };
393
- __name(_XHRHTTPImplementation, "XHRHTTPImplementation");
394
- let XHRHTTPImplementation = _XHRHTTPImplementation;
395
- const ISocketService = createIdentifier("univer.socket"), _WebSocketService = class _WebSocketService extends Disposable {
396
- createSocket(URL) {
397
- try {
398
- const connection = new WebSocket(URL), disposables = new DisposableCollection();
399
- return {
400
- URL,
401
- close: /* @__PURE__ */ __name((code, reason) => {
402
- connection.close(code, reason), disposables.dispose();
403
- }, "close"),
404
- send: /* @__PURE__ */ __name((data) => {
405
- connection.send(data);
406
- }, "send"),
407
- open$: new Observable((subscriber) => {
408
- const callback = /* @__PURE__ */ __name((event) => subscriber.next(event), "callback");
409
- connection.addEventListener("open", callback), disposables.add(toDisposable(() => connection.removeEventListener("open", callback)));
410
- }).pipe(share()),
411
- close$: new Observable((subscriber) => {
412
- const callback = /* @__PURE__ */ __name((event) => subscriber.next(event), "callback");
413
- connection.addEventListener("close", callback), disposables.add(toDisposable(() => connection.removeEventListener("close", callback)));
414
- }).pipe(share()),
415
- error$: new Observable((subscriber) => {
416
- const callback = /* @__PURE__ */ __name((event) => subscriber.next(event), "callback");
417
- connection.addEventListener("error", callback), disposables.add(toDisposable(() => connection.removeEventListener("error", callback)));
418
- }).pipe(share()),
419
- message$: new Observable((subscriber) => {
420
- const callback = /* @__PURE__ */ __name((event) => subscriber.next(event), "callback");
421
- connection.addEventListener("message", callback), disposables.add(toDisposable(() => connection.removeEventListener("message", callback)));
422
- }).pipe(share())
423
- };
424
- } catch (e) {
425
- return console.error(e), null;
426
- }
427
- }
428
- };
429
- __name(_WebSocketService, "WebSocketService");
430
- let WebSocketService = _WebSocketService;
431
- const DEFAULT_MAX_RETRY_ATTEMPTS = 3, DELAY_INTERVAL = 1e3, RetryInterceptorFactory = /* @__PURE__ */ __name((params) => {
432
- var _a2, _b;
433
- const maxRetryAttempts = (_a2 = params == null ? void 0 : params.maxRetryAttempts) != null ? _a2 : DEFAULT_MAX_RETRY_ATTEMPTS, delayInterval = (_b = params == null ? void 0 : params.delayInterval) != null ? _b : DELAY_INTERVAL;
434
- return (request, next) => next(request).pipe(retry({ delay: delayInterval, count: maxRetryAttempts }));
435
- }, "RetryInterceptorFactory"), ThresholdInterceptorFactory = /* @__PURE__ */ __name((params) => {
436
- const handlers = [], ongoingHandlers = /* @__PURE__ */ new Set(), tick = /* @__PURE__ */ __name(() => {
437
- var _a2;
438
- for (; ongoingHandlers.size < ((_a2 = params == null ? void 0 : params.maxParallel) != null ? _a2 : 1) && handlers.length > 0; ) {
439
- const handler = handlers.shift();
440
- ongoingHandlers.add(handler), handler();
441
- }
442
- }, "tick");
443
- return (request, next) => new Observable((observer) => {
444
- const handler = /* @__PURE__ */ __name(() => next(request).subscribe({
445
- next: /* @__PURE__ */ __name((event) => observer.next(event), "next"),
446
- error: /* @__PURE__ */ __name((err) => observer.error(err), "error"),
447
- complete: /* @__PURE__ */ __name(() => observer.complete(), "complete")
448
- }), "handler"), teardown = /* @__PURE__ */ __name(() => {
449
- ongoingHandlers.delete(handler), remove(handlers, handler), tick();
450
- }, "teardown");
451
- return handlers.push(handler), tick(), teardown;
452
- });
453
- }, "ThresholdInterceptorFactory"), AuthInterceptorFactory = /* @__PURE__ */ __name((params) => {
454
- const { errorStatusCodes, onAuthError } = params;
455
- return /* @__PURE__ */ __name((request, next) => next(request).pipe(
456
- catchError((error) => (error instanceof HTTPResponseError && errorStatusCodes.some((c) => c === error.status) && onAuthError(), throwError(() => error)))
457
- ), "authInterceptor");
458
- }, "AuthInterceptorFactory"), createDefaultFetchCheck = /* @__PURE__ */ __name((time = 300) => {
459
- let cancel = /* @__PURE__ */ __name(() => {
460
- }, "noop");
461
- return (_currentConfig) => new Promise((res) => {
462
- cancel();
463
- const t = setTimeout(() => {
464
- res(!0);
465
- }, time);
466
- cancel = /* @__PURE__ */ __name(() => {
467
- clearTimeout(t), res(!1);
468
- }, "cancel");
469
- });
470
- }, "createDefaultFetchCheck"), createDistributeResult = /* @__PURE__ */ __name(() => (result, list) => list.map((config) => ({ config, result })), "createDistributeResult"), MergeInterceptorFactory = /* @__PURE__ */ __name((config, options = {}) => {
471
- const { isMatch, getParamsFromRequest, mergeParamsToRequest } = config, { fetchCheck = createDefaultFetchCheck(300), distributeResult = createDistributeResult() } = options, hookList = [], getPlainList = /* @__PURE__ */ __name((_list) => _list.map((item) => item.config), "getPlainList");
472
- return (requestConfig, next) => isMatch(requestConfig) ? new Observable((observer) => {
473
- const params = getParamsFromRequest(requestConfig);
474
- hookList.push({
475
- next: /* @__PURE__ */ __name((v) => observer.next(v), "next"),
476
- error: /* @__PURE__ */ __name((error) => observer.error(error), "error"),
477
- config: params
478
- });
479
- const list = getPlainList(hookList);
480
- fetchCheck(requestConfig).then((isFetch) => {
481
- if (isFetch) {
482
- const currentHookList = [];
483
- list.forEach((config2) => {
484
- const index = hookList.findIndex((item) => item.config === config2);
485
- if (index >= 0) {
486
- const [hook] = hookList.splice(index, 1);
487
- currentHookList.push(hook);
488
- }
489
- }), next(mergeParamsToRequest(list, requestConfig)).subscribe({
490
- next: /* @__PURE__ */ __name((e) => {
491
- if (e.type === HTTPEventType.Response) {
492
- const body = e.body, configList = distributeResult(body, list);
493
- currentHookList.forEach((hookItem) => {
494
- const res = configList.find((item) => item.config === hookItem.config);
495
- if (res) {
496
- const response = new HTTPResponse({
497
- body: res.result,
498
- headers: e.headers,
499
- status: e.status,
500
- statusText: e.statusText
501
- });
502
- hookItem.next(response);
503
- } else
504
- hookItem.error("batch error");
505
- });
506
- }
507
- }, "next"),
508
- complete: /* @__PURE__ */ __name(() => observer.complete(), "complete"),
509
- error: /* @__PURE__ */ __name((e) => observer.error(e), "error")
510
- });
511
- }
512
- });
513
- }) : next(requestConfig);
514
- }, "MergeInterceptorFactory");
515
- export {
516
- AuthInterceptorFactory,
517
- FetchHTTPImplementation,
518
- HTTPEventType,
519
- HTTPHeaders,
520
- HTTPProgress,
521
- HTTPRequest,
522
- HTTPResponse,
523
- HTTPResponseError,
524
- HTTPService,
525
- HTTPStatusCode,
526
- IHTTPImplementation,
527
- ISocketService,
528
- MergeInterceptorFactory,
529
- ResponseHeader,
530
- RetryInterceptorFactory,
531
- ThresholdInterceptorFactory,
532
- WebSocketService,
533
- XHRHTTPImplementation
534
- };
1
+ const _0x26e5b2=_0x472e;(function(_0x26597d,_0x5025b9){const _0x4a98ac=_0x472e,_0x4570a5=_0x26597d();while(!![]){try{const _0x47a190=-parseInt(_0x4a98ac(0x265))/0x1+-parseInt(_0x4a98ac(0x1f2))/0x2*(-parseInt(_0x4a98ac(0x268))/0x3)+-parseInt(_0x4a98ac(0x1f1))/0x4+parseInt(_0x4a98ac(0x263))/0x5*(parseInt(_0x4a98ac(0x287))/0x6)+parseInt(_0x4a98ac(0x213))/0x7*(-parseInt(_0x4a98ac(0x227))/0x8)+parseInt(_0x4a98ac(0x201))/0x9*(parseInt(_0x4a98ac(0x1c7))/0xa)+-parseInt(_0x4a98ac(0x253))/0xb*(-parseInt(_0x4a98ac(0x259))/0xc);if(_0x47a190===_0x5025b9)break;else _0x4570a5['push'](_0x4570a5['shift']());}catch(_0x494323){_0x4570a5['push'](_0x4570a5['shift']());}}}(_0x3915,0x7f3ad));var __defProp=Object[_0x26e5b2(0x26f)],__defNormalProp=(_0x18c35c,_0x5dcda6,_0x121c47)=>_0x5dcda6 in _0x18c35c?__defProp(_0x18c35c,_0x5dcda6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x121c47}):_0x18c35c[_0x5dcda6]=_0x121c47,__name=(_0x329aff,_0xd5ff1)=>__defProp(_0x329aff,_0x26e5b2(0x25d),{'value':_0xd5ff1,'configurable':!0x0}),__publicField=(_0xfd74f9,_0x4b901b,_0xf59003)=>__defNormalProp(_0xfd74f9,typeof _0x4b901b!=_0x26e5b2(0x228)?_0x4b901b+'':_0x4b901b,_0xf59003);function _0x3915(){const _0x2d7182=['read','config','UnavailableForLegalReasons','pipe','responseType','noop','TooEarly','ServiceUnavailable','ResponseHeader','Unauthorized','status','VariantAlsoNegotiates','PUT','_http','tick','cancel','UnprocessableEntity','8TeZHwF','symbol','splice','requestParams','_setHeader','LengthRequired','handler','headers','message','UseProxy','complete','text','ImATeapot','addEventListener','entries','teardown','interceptor','WebSocketService','some','add','GET','close','has','_readBody','Unknown\x20Error','length','MovedPermanently','toHeadersInit','getReader','next','content-type','HTTPProgress','abort','Content-Type','getSSE','_handleHeaders','getBody','statusText','accept','method','load','readyState','PaymentRequired','toLowerCase','651112iXyTtX','total','NotModified','indexOf','ResetContent','[HTTPService]:\x20The\x20interceptor\x20has\x20already\x20been\x20registered!','312uyQVhO','_handleHeadersConstructorProps','removeEventListener','params','name','json','RangeNotSatisfiable','MergeInterceptorFactory','keys','_send','10lkJDUQ','MultiStatus','989327ZRSXrq','url','EarlyHints','712446kJqRyb','parseInt','timeout','InsufficientStorage','PermanentRedirect','DownloadProgress','type','defineProperty','NotAcceptable','BadGateway','RequestHeaderFieldsTooLarge','HTTPRequest','onLoadHandler','replace','toString','ProxyAuthenticationRequired','Continue','responseText','put','callback','Processing','ImUsed','send','delete','Conflict','deserialize','registerHTTPInterceptor','__decorateClass','PreconditionRequired','includes','Locked','698436wrvlYG','find','SeeOther','ExpectationFailed','network.http-implementation','content-length','PartialContent','string','map','reduceRight','join','univer.socket','sort','LoopDetected','parse','body','7390vfcvYg','_pipe','onErrorHandler','NotExtended','mergeChunks','BadRequest','then','DELETE','_handleHeadersString','getUrlWithParams','chainInterceptorFn','POST','RequestTimeout','NoContent','Accepted','forEach','TemporaryRedirect','patch','_runInterceptorsAndImplementation','_parseFetchParamsFromRequest','PayloadTooLarge','NonAuthoritativeInformation','withCredentials','include','push','getAllResponseHeaders','SwitchingProtocols','GatewayTimeout','NotFound','arraybuffer','ThresholdInterceptorFactory','createDistributeResult','_headers','buildResponseHeader','subscribe','Created','RetryInterceptorFactory','createSocket','MisdirectedRequest','getOwnPropertyDescriptor','HTTPParams','UriTooLong','376912SHjlYJ','2DhTTsq','findIndex','UpgradeRequired','DONE','InternalServerError','split','NotImplemented','MethodNotAllowed','AuthInterceptorFactory','decode','HTTPService','FetchHTTPImplementation','UnsupportedMediaType','setRequestHeader','Forbidden','5769rjQRct','_interceptors','set','Response','maxParallel','Unused','__decorateParam','maxRetryAttempts','[FetchHTTPImplementation]:\x20unknown\x20response\x20type:\x20','blob','HttpVersionNotSupported','buffer','_request','open','application/json','get','HTTPResponse','MultipleChoices','6148079gmOIhN','error','result'];_0x3915=function(){return _0x2d7182;};return _0x3915();}import{createIdentifier,Disposable,toDisposable,remove,DisposableCollection}from'@univerjs/core';import{of,firstValueFrom,Observable,catchError,throwError}from'rxjs';import{concatMap,share,retry}from'rxjs/operators';const ApplicationJSONType=_0x26e5b2(0x20f),_HTTPHeaders=class _HTTPHeaders{constructor(_0x4efa5b){const _0x10dc94=_0x26e5b2;__publicField(this,_0x10dc94(0x1e7),new Map()),typeof _0x4efa5b==_0x10dc94(0x1be)?this[_0x10dc94(0x1cf)](_0x4efa5b):_0x4efa5b instanceof Headers?this[_0x10dc94(0x24a)](_0x4efa5b):_0x4efa5b&&this[_0x10dc94(0x25a)](_0x4efa5b);}['forEach'](_0x15770d){const _0x4c190c=_0x26e5b2;this[_0x4c190c(0x1e7)][_0x4c190c(0x1d6)]((_0x34b09b,_0x59bff8)=>_0x15770d(_0x59bff8,_0x34b09b));}[_0x26e5b2(0x23d)](_0x24e0d1){const _0x22b508=_0x26e5b2;return!!this['_headers'][_0x22b508(0x23d)](_0x24e0d1[_0x22b508(0x252)]());}[_0x26e5b2(0x210)](_0x56a652){const _0x2a216d=_0x26e5b2,_0x531a8f=_0x56a652[_0x2a216d(0x252)]();return this['_headers'][_0x2a216d(0x23d)](_0x531a8f)?this[_0x2a216d(0x1e7)]['get'](_0x531a8f):null;}['set'](_0x553e94,_0x166cff){const _0x43db79=_0x26e5b2;this[_0x43db79(0x22b)](_0x553e94,_0x166cff);}[_0x26e5b2(0x242)](){const _0x3beb5d=_0x26e5b2;var _0xb267ca,_0x236cbb;const _0x5290b8={};return this[_0x3beb5d(0x1e7)]['forEach']((_0x25496c,_0x5cf78f)=>{const _0x430b8a=_0x3beb5d;_0x5290b8[_0x5cf78f]=_0x25496c[_0x430b8a(0x1c1)](',');}),(_0xb267ca=_0x5290b8[_0x3beb5d(0x24d)])!=null||(_0x5290b8[_0x3beb5d(0x24d)]='application/json,\x20text/plain,\x20*/*'),(_0x236cbb=_0x5290b8['content-type'])!=null||(_0x5290b8[_0x3beb5d(0x245)]='application/json;charset=UTF-8'),_0x5290b8;}['_setHeader'](_0x3eda05,_0x482993){const _0x33102f=_0x26e5b2,_0x4341b0=_0x3eda05[_0x33102f(0x252)]();this['_headers'][_0x33102f(0x23d)](_0x4341b0)?this['_headers'][_0x33102f(0x210)](_0x4341b0)[_0x33102f(0x1df)](_0x482993['toString']()):this[_0x33102f(0x1e7)][_0x33102f(0x203)](_0x4341b0,[_0x482993[_0x33102f(0x276)]()]);}['_handleHeadersString'](_0x507c5a){const _0x427c72=_0x26e5b2;_0x507c5a[_0x427c72(0x1f7)]('\x0a')['forEach'](_0x26fc68=>{const _0x5f0cba=_0x427c72,[_0x38645a,_0x2861f5]=_0x26fc68[_0x5f0cba(0x1f7)](':');_0x38645a&&_0x2861f5&&this[_0x5f0cba(0x22b)](_0x38645a,_0x2861f5);});}[_0x26e5b2(0x25a)](_0x4e4cca){const _0x4fed73=_0x26e5b2;Object[_0x4fed73(0x235)](_0x4e4cca)['forEach'](([_0x3c4591,_0x11e6d3])=>this[_0x4fed73(0x22b)](_0x3c4591,_0x11e6d3));}['_handleHeaders'](_0x25b4fe){const _0x118da3=_0x26e5b2;_0x25b4fe[_0x118da3(0x1d6)]((_0x4e9130,_0x5f0860)=>this[_0x118da3(0x22b)](_0x5f0860,_0x4e9130));}};__name(_HTTPHeaders,'HTTPHeaders');let HTTPHeaders=_HTTPHeaders;const IHTTPImplementation=createIdentifier(_0x26e5b2(0x28b)),_HTTPParams=class _HTTPParams{constructor(_0x38e3e5){const _0x4739a4=_0x26e5b2;this[_0x4739a4(0x25c)]=_0x38e3e5;}[_0x26e5b2(0x276)](){const _0x16850c=_0x26e5b2;return this[_0x16850c(0x25c)]?Object[_0x16850c(0x261)](this['params'])['map'](_0x4f70b9=>_0x4f70b9+'='+this[_0x16850c(0x25c)][_0x4f70b9])['join']('&'):'';}};__name(_HTTPParams,_0x26e5b2(0x1ef));let HTTPParams=_HTTPParams,HTTPRequestUID=0x0;function _0x472e(_0x2eeaa2,_0x13becd){const _0x391558=_0x3915();return _0x472e=function(_0x472e8f,_0x9e5a57){_0x472e8f=_0x472e8f-0x1bd;let _0x11146c=_0x391558[_0x472e8f];return _0x11146c;},_0x472e(_0x2eeaa2,_0x13becd);}const _HTTPRequest=class _HTTPRequest{constructor(_0x22b336,_0x4e10cd,_0x19d96d){const _0x52b5e0=_0x26e5b2;__publicField(this,'uid',HTTPRequestUID++),(this[_0x52b5e0(0x24e)]=_0x22b336,this[_0x52b5e0(0x266)]=_0x4e10cd,this[_0x52b5e0(0x22a)]=_0x19d96d);}get[_0x26e5b2(0x22e)](){const _0x528f18=_0x26e5b2;return this[_0x528f18(0x22a)][_0x528f18(0x22e)];}get['withCredentials'](){const _0x57a738=_0x26e5b2;return this[_0x57a738(0x22a)]['withCredentials'];}get[_0x26e5b2(0x21a)](){const _0x2fe4e2=_0x26e5b2;return this[_0x2fe4e2(0x22a)]['responseType'];}[_0x26e5b2(0x1d0)](){const _0x40bcff=_0x26e5b2;var _0x5e6cf1,_0x8a20fa;const _0x161ee2=(_0x8a20fa=(_0x5e6cf1=this['requestParams'])==null?void 0x0:_0x5e6cf1[_0x40bcff(0x25c)])==null?void 0x0:_0x8a20fa['toString']();return _0x161ee2?''+this[_0x40bcff(0x266)]+(this[_0x40bcff(0x266)][_0x40bcff(0x285)]('?')?'&':'?')+_0x161ee2:this['url'];}[_0x26e5b2(0x24b)](){const _0x38b4f2=_0x26e5b2;var _0x1deb46,_0x3afa02;const _0x14bede=(_0x1deb46=this[_0x38b4f2(0x22e)][_0x38b4f2(0x210)](_0x38b4f2(0x248)))!=null?_0x1deb46:ApplicationJSONType,_0x39b803=(_0x3afa02=this[_0x38b4f2(0x22a)])==null?void 0x0:_0x3afa02[_0x38b4f2(0x1c6)];return _0x14bede===ApplicationJSONType&&_0x39b803&&typeof _0x39b803=='object'?JSON['stringify'](_0x39b803):_0x39b803?''+_0x39b803:null;}['getHeadersInit'](){const _0x2e8b77=_0x26e5b2;return this[_0x2e8b77(0x22e)][_0x2e8b77(0x242)]();}};__name(_HTTPRequest,_0x26e5b2(0x273));let HTTPRequest=_HTTPRequest;var __defProp2=Object[_0x26e5b2(0x26f)],__getOwnPropDesc=Object[_0x26e5b2(0x1ee)],__decorateClass=__name((_0x543aaa,_0x596b01,_0x53ece5,_0x13a913)=>{const _0x52d8d7=_0x26e5b2;for(var _0x3cd6e8=_0x13a913>0x1?void 0x0:_0x13a913?__getOwnPropDesc(_0x596b01,_0x53ece5):_0x596b01,_0x404eab=_0x543aaa[_0x52d8d7(0x240)]-0x1,_0x5bb555;_0x404eab>=0x0;_0x404eab--)(_0x5bb555=_0x543aaa[_0x404eab])&&(_0x3cd6e8=(_0x13a913?_0x5bb555(_0x596b01,_0x53ece5,_0x3cd6e8):_0x5bb555(_0x3cd6e8))||_0x3cd6e8);return _0x13a913&&_0x3cd6e8&&__defProp2(_0x596b01,_0x53ece5,_0x3cd6e8),_0x3cd6e8;},_0x26e5b2(0x283)),__decorateParam=__name((_0x1e4bc3,_0x7636a7)=>(_0x264e89,_0xd3ce5a)=>_0x7636a7(_0x264e89,_0xd3ce5a,_0x1e4bc3),_0x26e5b2(0x207)),_a;let HTTPService=(_a=class extends Disposable{constructor(_0x220613){const _0x408680=_0x26e5b2;super(),__publicField(this,_0x408680(0x202),[]),__publicField(this,_0x408680(0x1c8)),this['_http']=_0x220613;}[_0x26e5b2(0x282)](_0x1dd593){const _0x5e6390=_0x26e5b2;if(this[_0x5e6390(0x202)][_0x5e6390(0x256)](_0x1dd593)!==-0x1)throw new Error(_0x5e6390(0x258));return this[_0x5e6390(0x202)][_0x5e6390(0x1df)](_0x1dd593),this[_0x5e6390(0x202)]=this[_0x5e6390(0x202)][_0x5e6390(0x1c3)]((_0x295229,_0x489aad)=>{var _0x353342,_0x35b2ab;return((_0x353342=_0x295229['priority'])!=null?_0x353342:0x0)-((_0x35b2ab=_0x489aad['priority'])!=null?_0x35b2ab:0x0);}),this[_0x5e6390(0x1c8)]=null,toDisposable(()=>remove(this['_interceptors'],_0x1dd593));}['get'](_0x53732c,_0x29ded2){const _0x129e1b=_0x26e5b2;return this[_0x129e1b(0x20d)](_0x129e1b(0x23b),_0x53732c,_0x29ded2);}['post'](_0x1ff959,_0xc81329){const _0x1e3c40=_0x26e5b2;return this[_0x1e3c40(0x20d)](_0x1e3c40(0x1d2),_0x1ff959,_0xc81329);}[_0x26e5b2(0x27a)](_0x3b8e5b,_0xd7c7cb){const _0x39b6d9=_0x26e5b2;return this['_request'](_0x39b6d9(0x222),_0x3b8e5b,_0xd7c7cb);}[_0x26e5b2(0x27f)](_0x39466c,_0x4de51){const _0xe653c1=_0x26e5b2;return this[_0xe653c1(0x20d)](_0xe653c1(0x1ce),_0x39466c,_0x4de51);}[_0x26e5b2(0x1d8)](_0x23187e,_0x3e9588){const _0x6ff8f=_0x26e5b2;return this[_0x6ff8f(0x20d)]('PATCH',_0x23187e,_0x3e9588);}[_0x26e5b2(0x249)](_0x18dca4,_0x224d21,_0x4f708a){const _0x40b91a=_0x26e5b2;var _0x5d894e,_0x2f99f0;const _0x228677=new HTTPHeaders(_0x4f708a==null?void 0x0:_0x4f708a[_0x40b91a(0x22e)]),_0x23888e=new HTTPParams(_0x4f708a==null?void 0x0:_0x4f708a[_0x40b91a(0x25c)]),_0x3c5b07=new HTTPRequest(_0x18dca4,_0x224d21,{'headers':_0x228677,'params':_0x23888e,'withCredentials':(_0x5d894e=_0x4f708a==null?void 0x0:_0x4f708a['withCredentials'])!=null?_0x5d894e:!0x1,'reportProgress':!0x0,'responseType':(_0x2f99f0=_0x4f708a==null?void 0x0:_0x4f708a[_0x40b91a(0x21a)])!=null?_0x2f99f0:_0x40b91a(0x25e),'body':[_0x40b91a(0x23b),_0x40b91a(0x1ce)][_0x40b91a(0x285)](_0x18dca4)||_0x4f708a==null?void 0x0:_0x4f708a['body']});return of(_0x3c5b07)[_0x40b91a(0x219)](concatMap(_0x199c94=>this[_0x40b91a(0x1d9)](_0x199c94)));}async['_request'](_0x4c1f8a,_0x5cae30,_0x52d8db){const _0x47ca47=_0x26e5b2;var _0x2a5b17,_0x22da30;const _0x223299=new HTTPHeaders(_0x52d8db==null?void 0x0:_0x52d8db[_0x47ca47(0x22e)]),_0x34d736=new HTTPParams(_0x52d8db==null?void 0x0:_0x52d8db['params']),_0x720fd4=new HTTPRequest(_0x4c1f8a,_0x5cae30,{'headers':_0x223299,'params':_0x34d736,'withCredentials':(_0x2a5b17=_0x52d8db==null?void 0x0:_0x52d8db['withCredentials'])!=null?_0x2a5b17:!0x1,'responseType':(_0x22da30=_0x52d8db==null?void 0x0:_0x52d8db[_0x47ca47(0x21a)])!=null?_0x22da30:_0x47ca47(0x25e),'body':[_0x47ca47(0x23b),_0x47ca47(0x1ce)][_0x47ca47(0x285)](_0x4c1f8a)||_0x52d8db==null?void 0x0:_0x52d8db[_0x47ca47(0x1c6)]}),_0x20f40b=of(_0x720fd4)[_0x47ca47(0x219)](concatMap(_0x4490da=>this[_0x47ca47(0x1d9)](_0x4490da)));return await firstValueFrom(_0x20f40b);}['_runInterceptorsAndImplementation'](_0x40f39b){const _0xc210bd=_0x26e5b2;return this['_pipe']||(this[_0xc210bd(0x1c8)]=this[_0xc210bd(0x202)][_0xc210bd(0x1bf)](_0x12deb2=>_0x12deb2[_0xc210bd(0x237)])[_0xc210bd(0x1c0)]((_0x3f2b18,_0x3f61fe)=>chainInterceptorFn(_0x3f2b18,_0x3f61fe),(_0x49fe6c,_0x4d28ad)=>_0x4d28ad(_0x49fe6c))),this[_0xc210bd(0x1c8)](_0x40f39b,_0xc1ed93=>this[_0xc210bd(0x223)]['send'](_0xc1ed93));}},__name(_a,_0x26e5b2(0x1fc)),_a);HTTPService=__decorateClass([__decorateParam(0x0,IHTTPImplementation)],HTTPService);function chainInterceptorFn(_0x13563b,_0x5960f1){return(_0x3e7bf9,_0x10631a)=>_0x5960f1(_0x3e7bf9,_0x4c98d6=>_0x13563b(_0x4c98d6,_0x10631a));}__name(chainInterceptorFn,_0x26e5b2(0x1d1));var HTTPEventType=(_0x591d3d=>(_0x591d3d[_0x591d3d[_0x26e5b2(0x26d)]=0x0]=_0x26e5b2(0x26d),_0x591d3d[_0x591d3d[_0x26e5b2(0x204)]=0x1]=_0x26e5b2(0x204),_0x591d3d))(HTTPEventType||{});const _HTTPResponse=class _HTTPResponse{constructor({body:_0x3c72b0,headers:_0x344b0f,status:_0x1e7cc5,statusText:_0x138583}){const _0x2a0858=_0x26e5b2;__publicField(this,'type',0x1),__publicField(this,_0x2a0858(0x1c6)),__publicField(this,_0x2a0858(0x22e)),__publicField(this,_0x2a0858(0x220)),__publicField(this,_0x2a0858(0x24c)),(this['body']=_0x3c72b0,this[_0x2a0858(0x22e)]=_0x344b0f,this[_0x2a0858(0x220)]=_0x1e7cc5,this[_0x2a0858(0x24c)]=_0x138583);}};__name(_HTTPResponse,_0x26e5b2(0x211));let HTTPResponse=_HTTPResponse;const _HTTPProgress=class _HTTPProgress{constructor(_0xe39ef1,_0x22ce3c,_0x4777bf){const _0x3fe64b=_0x26e5b2;__publicField(this,_0x3fe64b(0x26e),0x0),(this[_0x3fe64b(0x254)]=_0xe39ef1,this['loaded']=_0x22ce3c,this['partialText']=_0x4777bf);}};__name(_HTTPProgress,_0x26e5b2(0x246));let HTTPProgress=_HTTPProgress;const _ResponseHeader=class _ResponseHeader{constructor(_0x1540a3,_0x4d66f4,_0x2d879b){const _0x1dc93b=_0x26e5b2;this[_0x1dc93b(0x22e)]=_0x1540a3,this[_0x1dc93b(0x220)]=_0x4d66f4,this['statusText']=_0x2d879b;}};__name(_ResponseHeader,_0x26e5b2(0x21e));let ResponseHeader=_ResponseHeader;const _HTTPResponseError=class _HTTPResponseError{constructor({headers:_0x49a8fd,status:_0x11bb4a,statusText:_0x34a7de,error:_0x1f0dca}){const _0x287f5d=_0x26e5b2;__publicField(this,'headers'),__publicField(this,_0x287f5d(0x220)),__publicField(this,_0x287f5d(0x24c)),__publicField(this,'error'),(this[_0x287f5d(0x22e)]=_0x49a8fd,this[_0x287f5d(0x220)]=_0x11bb4a,this[_0x287f5d(0x24c)]=_0x34a7de,this[_0x287f5d(0x214)]=_0x1f0dca);}};__name(_HTTPResponseError,'HTTPResponseError');let HTTPResponseError=_HTTPResponseError;const SuccessStatusCodeLowerBound=0xc8,ErrorStatusCodeLowerBound=0x12c;var HTTPStatusCode=(_0x3e1baf=>(_0x3e1baf[_0x3e1baf[_0x26e5b2(0x278)]=0x64]='Continue',_0x3e1baf[_0x3e1baf[_0x26e5b2(0x1e1)]=0x65]='SwitchingProtocols',_0x3e1baf[_0x3e1baf['Processing']=0x66]=_0x26e5b2(0x27c),_0x3e1baf[_0x3e1baf[_0x26e5b2(0x267)]=0x67]=_0x26e5b2(0x267),_0x3e1baf[_0x3e1baf['Ok']=0xc8]='Ok',_0x3e1baf[_0x3e1baf['Created']=0xc9]=_0x26e5b2(0x1ea),_0x3e1baf[_0x3e1baf[_0x26e5b2(0x1d5)]=0xca]=_0x26e5b2(0x1d5),_0x3e1baf[_0x3e1baf[_0x26e5b2(0x1dc)]=0xcb]=_0x26e5b2(0x1dc),_0x3e1baf[_0x3e1baf['NoContent']=0xcc]=_0x26e5b2(0x1d4),_0x3e1baf[_0x3e1baf[_0x26e5b2(0x257)]=0xcd]=_0x26e5b2(0x257),_0x3e1baf[_0x3e1baf[_0x26e5b2(0x1bd)]=0xce]=_0x26e5b2(0x1bd),_0x3e1baf[_0x3e1baf[_0x26e5b2(0x264)]=0xcf]=_0x26e5b2(0x264),_0x3e1baf[_0x3e1baf['AlreadyReported']=0xd0]='AlreadyReported',_0x3e1baf[_0x3e1baf[_0x26e5b2(0x27d)]=0xe2]=_0x26e5b2(0x27d),_0x3e1baf[_0x3e1baf[_0x26e5b2(0x212)]=0x12c]=_0x26e5b2(0x212),_0x3e1baf[_0x3e1baf[_0x26e5b2(0x241)]=0x12d]=_0x26e5b2(0x241),_0x3e1baf[_0x3e1baf['Found']=0x12e]='Found',_0x3e1baf[_0x3e1baf[_0x26e5b2(0x289)]=0x12f]='SeeOther',_0x3e1baf[_0x3e1baf[_0x26e5b2(0x255)]=0x130]=_0x26e5b2(0x255),_0x3e1baf[_0x3e1baf[_0x26e5b2(0x230)]=0x131]='UseProxy',_0x3e1baf[_0x3e1baf[_0x26e5b2(0x206)]=0x132]=_0x26e5b2(0x206),_0x3e1baf[_0x3e1baf[_0x26e5b2(0x1d7)]=0x133]='TemporaryRedirect',_0x3e1baf[_0x3e1baf[_0x26e5b2(0x26c)]=0x134]='PermanentRedirect',_0x3e1baf[_0x3e1baf[_0x26e5b2(0x1cc)]=0x190]=_0x26e5b2(0x1cc),_0x3e1baf[_0x3e1baf['Unauthorized']=0x191]=_0x26e5b2(0x21f),_0x3e1baf[_0x3e1baf[_0x26e5b2(0x251)]=0x192]=_0x26e5b2(0x251),_0x3e1baf[_0x3e1baf[_0x26e5b2(0x200)]=0x193]=_0x26e5b2(0x200),_0x3e1baf[_0x3e1baf[_0x26e5b2(0x1e3)]=0x194]=_0x26e5b2(0x1e3),_0x3e1baf[_0x3e1baf[_0x26e5b2(0x1f9)]=0x195]=_0x26e5b2(0x1f9),_0x3e1baf[_0x3e1baf[_0x26e5b2(0x270)]=0x196]=_0x26e5b2(0x270),_0x3e1baf[_0x3e1baf[_0x26e5b2(0x277)]=0x197]=_0x26e5b2(0x277),_0x3e1baf[_0x3e1baf[_0x26e5b2(0x1d3)]=0x198]=_0x26e5b2(0x1d3),_0x3e1baf[_0x3e1baf['Conflict']=0x199]=_0x26e5b2(0x280),_0x3e1baf[_0x3e1baf['Gone']=0x19a]='Gone',_0x3e1baf[_0x3e1baf[_0x26e5b2(0x22c)]=0x19b]=_0x26e5b2(0x22c),_0x3e1baf[_0x3e1baf['PreconditionFailed']=0x19c]='PreconditionFailed',_0x3e1baf[_0x3e1baf[_0x26e5b2(0x1db)]=0x19d]=_0x26e5b2(0x1db),_0x3e1baf[_0x3e1baf['UriTooLong']=0x19e]=_0x26e5b2(0x1f0),_0x3e1baf[_0x3e1baf['UnsupportedMediaType']=0x19f]=_0x26e5b2(0x1fe),_0x3e1baf[_0x3e1baf[_0x26e5b2(0x25f)]=0x1a0]=_0x26e5b2(0x25f),_0x3e1baf[_0x3e1baf['ExpectationFailed']=0x1a1]=_0x26e5b2(0x28a),_0x3e1baf[_0x3e1baf['ImATeapot']=0x1a2]=_0x26e5b2(0x233),_0x3e1baf[_0x3e1baf[_0x26e5b2(0x1ed)]=0x1a5]='MisdirectedRequest',_0x3e1baf[_0x3e1baf['UnprocessableEntity']=0x1a6]=_0x26e5b2(0x226),_0x3e1baf[_0x3e1baf[_0x26e5b2(0x286)]=0x1a7]=_0x26e5b2(0x286),_0x3e1baf[_0x3e1baf['FailedDependency']=0x1a8]='FailedDependency',_0x3e1baf[_0x3e1baf[_0x26e5b2(0x21c)]=0x1a9]=_0x26e5b2(0x21c),_0x3e1baf[_0x3e1baf[_0x26e5b2(0x1f4)]=0x1aa]=_0x26e5b2(0x1f4),_0x3e1baf[_0x3e1baf['PreconditionRequired']=0x1ac]=_0x26e5b2(0x284),_0x3e1baf[_0x3e1baf['TooManyRequests']=0x1ad]='TooManyRequests',_0x3e1baf[_0x3e1baf[_0x26e5b2(0x272)]=0x1af]=_0x26e5b2(0x272),_0x3e1baf[_0x3e1baf[_0x26e5b2(0x218)]=0x1c3]=_0x26e5b2(0x218),_0x3e1baf[_0x3e1baf[_0x26e5b2(0x1f6)]=0x1f4]='InternalServerError',_0x3e1baf[_0x3e1baf[_0x26e5b2(0x1f8)]=0x1f5]=_0x26e5b2(0x1f8),_0x3e1baf[_0x3e1baf[_0x26e5b2(0x271)]=0x1f6]='BadGateway',_0x3e1baf[_0x3e1baf[_0x26e5b2(0x21d)]=0x1f7]=_0x26e5b2(0x21d),_0x3e1baf[_0x3e1baf[_0x26e5b2(0x1e2)]=0x1f8]=_0x26e5b2(0x1e2),_0x3e1baf[_0x3e1baf[_0x26e5b2(0x20b)]=0x1f9]='HttpVersionNotSupported',_0x3e1baf[_0x3e1baf[_0x26e5b2(0x221)]=0x1fa]=_0x26e5b2(0x221),_0x3e1baf[_0x3e1baf[_0x26e5b2(0x26b)]=0x1fb]='InsufficientStorage',_0x3e1baf[_0x3e1baf['LoopDetected']=0x1fc]=_0x26e5b2(0x1c4),_0x3e1baf[_0x3e1baf[_0x26e5b2(0x1ca)]=0x1fe]='NotExtended',_0x3e1baf[_0x3e1baf['NetworkAuthenticationRequired']=0x1ff]='NetworkAuthenticationRequired',_0x3e1baf))(HTTPStatusCode||{});const _FetchHTTPImplementation=class _FetchHTTPImplementation{['send'](_0x37d774){return new Observable(_0x2c5a40=>{const _0x2a217a=_0x472e,_0x56f9fd=new AbortController();return this[_0x2a217a(0x262)](_0x37d774,_0x2c5a40,_0x56f9fd)[_0x2a217a(0x1cd)](()=>{},_0x54aa13=>{_0x2c5a40['error'](new HTTPResponseError({'error':_0x54aa13}));}),()=>_0x56f9fd['abort']();});}async[_0x26e5b2(0x262)](_0x438c9c,_0x1fc124,_0xae97b0){const _0x280aaf=_0x26e5b2;var _0x3749db,_0x2afb14;let _0x74b76f;try{const _0x5b07f8=this[_0x280aaf(0x1da)](_0x438c9c);_0x74b76f=await fetch(_0x438c9c[_0x280aaf(0x1d0)](),{'signal':_0xae97b0['signal'],..._0x5b07f8});}catch(_0x50f41d){_0x1fc124['error'](new HTTPResponseError({'error':_0x50f41d,'status':(_0x3749db=_0x50f41d['status'])!=null?_0x3749db:0x0,'statusText':(_0x2afb14=_0x50f41d[_0x280aaf(0x24c)])!=null?_0x2afb14:_0x280aaf(0x23f),'headers':_0x50f41d[_0x280aaf(0x22e)]}));return;}const _0x57948a=new HTTPHeaders(_0x74b76f[_0x280aaf(0x22e)]),_0x1de0cd=_0x74b76f[_0x280aaf(0x220)],_0x13defc=_0x74b76f[_0x280aaf(0x24c)];let _0x49c3a3=null;_0x74b76f[_0x280aaf(0x1c6)]&&(_0x49c3a3=await this[_0x280aaf(0x23e)](_0x438c9c,_0x74b76f,_0x1fc124)),_0x1de0cd>=HTTPStatusCode['Ok']&&_0x1de0cd<HTTPStatusCode[_0x280aaf(0x212)]?_0x1fc124[_0x280aaf(0x244)](new HTTPResponse({'body':_0x49c3a3,'headers':_0x57948a,'status':_0x1de0cd,'statusText':_0x13defc})):_0x1fc124[_0x280aaf(0x214)](new HTTPResponseError({'error':_0x49c3a3,'status':_0x1de0cd,'statusText':_0x13defc,'headers':_0x57948a})),_0x1fc124[_0x280aaf(0x231)]();}async[_0x26e5b2(0x23e)](_0x4cc1ca,_0x1f9d96,_0x4d72fe){const _0x47c028=_0x26e5b2;var _0x1f8526,_0x4bb4da;const _0x3d721d=[],_0x38c42f=_0x1f9d96[_0x47c028(0x1c6)][_0x47c028(0x243)](),_0x35697a=_0x1f9d96[_0x47c028(0x22e)]['get'](_0x47c028(0x28c));let _0x458fee=0x0;const _0x35c821=(_0x1f8526=_0x4cc1ca['requestParams'])==null?void 0x0:_0x1f8526['reportProgress'],_0x576f62=_0x4cc1ca[_0x47c028(0x21a)];let _0x3a2112,_0x226493;for(;;){const {done:_0x2a9a32,value:_0x54125d}=await _0x38c42f[_0x47c028(0x216)]();if(_0x2a9a32)break;_0x3d721d[_0x47c028(0x1df)](_0x54125d),_0x458fee+=_0x54125d[_0x47c028(0x240)],_0x35c821&&_0x576f62===_0x47c028(0x232)&&(_0x3a2112=(_0x3a2112!=null?_0x3a2112:'')+(_0x226493!=null?_0x226493:_0x226493=new TextDecoder())['decode'](_0x54125d,{'stream':!0x0}),_0x4d72fe['next'](new HTTPProgress(_0x35697a?Number[_0x47c028(0x269)](_0x35697a,0xa):void 0x0,_0x458fee,_0x3a2112)));}const _0x37f419=mergeChunks(_0x3d721d,_0x458fee);try{const _0x1d425c=(_0x4bb4da=_0x1f9d96['headers']['get'](_0x47c028(0x245)))!=null?_0x4bb4da:'';return deserialize(_0x4cc1ca,_0x37f419,_0x1d425c);}catch(_0x13ed66){return _0x4d72fe[_0x47c028(0x214)](new HTTPResponseError({'error':_0x13ed66,'status':_0x1f9d96[_0x47c028(0x220)],'statusText':_0x1f9d96['statusText'],'headers':new HTTPHeaders(_0x1f9d96[_0x47c028(0x22e)])})),null;}}['_parseFetchParamsFromRequest'](_0x3c3eff){const _0x5b7028=_0x26e5b2;return{'method':_0x3c3eff[_0x5b7028(0x24e)],'headers':_0x3c3eff['getHeadersInit'](),'body':_0x3c3eff['getBody'](),'credentials':_0x3c3eff[_0x5b7028(0x1dd)]?_0x5b7028(0x1de):void 0x0};}};__name(_FetchHTTPImplementation,_0x26e5b2(0x1fd));let FetchHTTPImplementation=_FetchHTTPImplementation;function mergeChunks(_0xb29454,_0x5c7d01){const _0x2807ed=_0x26e5b2,_0x39b099=new Uint8Array(_0x5c7d01);let _0x53cdd0=0x0;for(const _0x38e4b8 of _0xb29454)_0x39b099[_0x2807ed(0x203)](_0x38e4b8,_0x53cdd0),_0x53cdd0+=_0x38e4b8[_0x2807ed(0x240)];return _0x39b099;}__name(mergeChunks,_0x26e5b2(0x1cb));const XSSI_PREFIX=/^\)\]\}',?\n/;function deserialize(_0x18da05,_0x4a6a1d,_0x2b5f4e){const _0x424f2e=_0x26e5b2;switch(_0x18da05[_0x424f2e(0x21a)]){case _0x424f2e(0x25e):const _0x1bcb97=new TextDecoder()['decode'](_0x4a6a1d)[_0x424f2e(0x275)](XSSI_PREFIX,'');return _0x1bcb97===''?null:JSON['parse'](_0x1bcb97);case _0x424f2e(0x232):return new TextDecoder()[_0x424f2e(0x1fb)](_0x4a6a1d);case _0x424f2e(0x20a):return new Blob([_0x4a6a1d],{'type':_0x2b5f4e});case _0x424f2e(0x1e4):return _0x4a6a1d[_0x424f2e(0x20c)];default:throw new Error(_0x424f2e(0x209)+_0x18da05[_0x424f2e(0x21a)]+'.');}}__name(deserialize,_0x26e5b2(0x281));const _XHRHTTPImplementation=class _XHRHTTPImplementation{[_0x26e5b2(0x27e)](_0x20c74a){return new Observable(_0x27882e=>{const _0x4fcdca=_0x472e,_0x26e778=new XMLHttpRequest();_0x26e778[_0x4fcdca(0x20e)](_0x20c74a['method'],_0x20c74a[_0x4fcdca(0x1d0)]()),_0x20c74a[_0x4fcdca(0x1dd)]&&(_0x26e778['withCredentials']=!0x0),_0x20c74a[_0x4fcdca(0x22e)][_0x4fcdca(0x1d6)]((_0x2a17ed,_0x47ba61)=>_0x26e778[_0x4fcdca(0x1ff)](_0x2a17ed,_0x47ba61[_0x4fcdca(0x1c1)](','))),_0x20c74a[_0x4fcdca(0x22e)][_0x4fcdca(0x23d)]('Accept')||_0x26e778[_0x4fcdca(0x1ff)]('Accept','application/json,\x20text/plain,\x20*/*'),_0x20c74a[_0x4fcdca(0x22e)][_0x4fcdca(0x23d)]('Content-Type')||_0x26e778['setRequestHeader'](_0x4fcdca(0x248),'application/json;charset=UTF-8');const _0x4d2c35=__name(()=>{const _0x1d0f2e=_0x4fcdca,_0xcce12=_0x26e778['statusText']||'OK',_0x121e5e=new HTTPHeaders(_0x26e778[_0x1d0f2e(0x1e0)]());return new ResponseHeader(_0x121e5e,_0x26e778['status'],_0xcce12);},_0x4fcdca(0x1e8)),_0x2a427b=__name(()=>{const _0x4ee7c2=_0x4fcdca,{headers:_0x47cb27,statusText:_0x45ec2b,status:_0x50fc08}=_0x4d2c35(),{responseType:_0x3a298a}=_0x20c74a;let _0x4e2ae6=null,_0x1b48ba=null;_0x50fc08!==HTTPStatusCode['NoContent']&&(_0x4e2ae6=typeof _0x26e778['response']>'u'?_0x26e778[_0x4ee7c2(0x279)]:_0x26e778['response']);let _0x1ff19b=_0x50fc08>=SuccessStatusCodeLowerBound&&_0x50fc08<ErrorStatusCodeLowerBound;if(_0x3a298a===_0x4ee7c2(0x25e)&&typeof _0x4e2ae6=='string'){const _0x3d73ee=_0x4e2ae6;try{_0x4e2ae6=_0x4e2ae6?JSON[_0x4ee7c2(0x1c5)](_0x4e2ae6):null;}catch(_0xd5a93c){_0x1ff19b=!0x1,_0x4e2ae6=_0x3d73ee,_0x1b48ba=_0xd5a93c;}}_0x1ff19b?_0x27882e[_0x4ee7c2(0x244)](new HTTPResponse({'body':_0x4e2ae6,'headers':_0x47cb27,'status':_0x50fc08,'statusText':_0x45ec2b})):_0x27882e['error'](new HTTPResponseError({'error':_0x1b48ba,'headers':_0x47cb27,'status':_0x50fc08,'statusText':_0x45ec2b}));},_0x4fcdca(0x274)),_0x4b814a=__name(_0x36c74e=>{const _0x464e22=_0x4fcdca,_0x1e9a9a=new HTTPResponseError({'error':_0x36c74e,'status':_0x26e778[_0x464e22(0x220)]||0x0,'statusText':_0x26e778[_0x464e22(0x24c)]||_0x464e22(0x23f),'headers':_0x4d2c35()[_0x464e22(0x22e)]});_0x27882e[_0x464e22(0x214)](_0x1e9a9a);},_0x4fcdca(0x1c9));_0x26e778[_0x4fcdca(0x234)](_0x4fcdca(0x24f),_0x2a427b),_0x26e778[_0x4fcdca(0x234)]('error',_0x4b814a),_0x26e778[_0x4fcdca(0x234)](_0x4fcdca(0x247),_0x4b814a),_0x26e778[_0x4fcdca(0x234)]('timeout',_0x4b814a);const _0x24e3e5=_0x20c74a[_0x4fcdca(0x24b)]();return _0x26e778['send'](_0x24e3e5),()=>{const _0x1754b8=_0x4fcdca;_0x26e778[_0x1754b8(0x250)]!==_0x26e778[_0x1754b8(0x1f5)]&&_0x26e778[_0x1754b8(0x247)](),_0x26e778['removeEventListener'](_0x1754b8(0x24f),_0x2a427b),_0x26e778[_0x1754b8(0x25b)](_0x1754b8(0x214),_0x4b814a),_0x26e778[_0x1754b8(0x25b)](_0x1754b8(0x247),_0x4b814a),_0x26e778['removeEventListener'](_0x1754b8(0x26a),_0x4b814a);};});}};__name(_XHRHTTPImplementation,'XHRHTTPImplementation');let XHRHTTPImplementation=_XHRHTTPImplementation;const ISocketService=createIdentifier(_0x26e5b2(0x1c2)),_WebSocketService=class _WebSocketService extends Disposable{[_0x26e5b2(0x1ec)](_0x565871){const _0x507dfe=_0x26e5b2;try{const _0x5af702=new WebSocket(_0x565871),_0x3040f3=new DisposableCollection();return{'URL':_0x565871,'close':__name((_0x2fad70,_0x2e8245)=>{const _0x443640=_0x472e;_0x5af702[_0x443640(0x23c)](_0x2fad70,_0x2e8245),_0x3040f3['dispose']();},_0x507dfe(0x23c)),'send':__name(_0xffa6f5=>{const _0x460c7e=_0x507dfe;_0x5af702[_0x460c7e(0x27e)](_0xffa6f5);},'send'),'open$':new Observable(_0x5c20ee=>{const _0x45a397=_0x507dfe,_0x34e641=__name(_0x41a49c=>_0x5c20ee[_0x45a397(0x244)](_0x41a49c),'callback');_0x5af702['addEventListener'](_0x45a397(0x20e),_0x34e641),_0x3040f3[_0x45a397(0x23a)](toDisposable(()=>_0x5af702[_0x45a397(0x25b)](_0x45a397(0x20e),_0x34e641)));})[_0x507dfe(0x219)](share()),'close$':new Observable(_0x2c36e5=>{const _0x141f68=_0x507dfe,_0x2e1f7f=__name(_0x408a21=>_0x2c36e5[_0x141f68(0x244)](_0x408a21),_0x141f68(0x27b));_0x5af702['addEventListener']('close',_0x2e1f7f),_0x3040f3[_0x141f68(0x23a)](toDisposable(()=>_0x5af702[_0x141f68(0x25b)]('close',_0x2e1f7f)));})[_0x507dfe(0x219)](share()),'error$':new Observable(_0x451ce2=>{const _0x4383a2=_0x507dfe,_0x371cdd=__name(_0x43bbdc=>_0x451ce2[_0x4383a2(0x244)](_0x43bbdc),_0x4383a2(0x27b));_0x5af702[_0x4383a2(0x234)](_0x4383a2(0x214),_0x371cdd),_0x3040f3[_0x4383a2(0x23a)](toDisposable(()=>_0x5af702[_0x4383a2(0x25b)]('error',_0x371cdd)));})[_0x507dfe(0x219)](share()),'message$':new Observable(_0x2b7d8c=>{const _0x225a03=_0x507dfe,_0x55b1c4=__name(_0x30dd94=>_0x2b7d8c['next'](_0x30dd94),'callback');_0x5af702[_0x225a03(0x234)](_0x225a03(0x22f),_0x55b1c4),_0x3040f3[_0x225a03(0x23a)](toDisposable(()=>_0x5af702[_0x225a03(0x25b)](_0x225a03(0x22f),_0x55b1c4)));})[_0x507dfe(0x219)](share())};}catch(_0x50c692){return console[_0x507dfe(0x214)](_0x50c692),null;}}};__name(_WebSocketService,_0x26e5b2(0x238));let WebSocketService=_WebSocketService;const DEFAULT_MAX_RETRY_ATTEMPTS=0x3,DELAY_INTERVAL=0x3e8,RetryInterceptorFactory=__name(_0x4518d5=>{const _0x3705ad=_0x26e5b2;var _0x86f931,_0x45f49c;const _0x37cfb5=(_0x86f931=_0x4518d5==null?void 0x0:_0x4518d5[_0x3705ad(0x208)])!=null?_0x86f931:DEFAULT_MAX_RETRY_ATTEMPTS,_0x50601d=(_0x45f49c=_0x4518d5==null?void 0x0:_0x4518d5['delayInterval'])!=null?_0x45f49c:DELAY_INTERVAL;return(_0x386a55,_0x3b063a)=>_0x3b063a(_0x386a55)['pipe'](retry({'delay':_0x50601d,'count':_0x37cfb5}));},_0x26e5b2(0x1eb)),ThresholdInterceptorFactory=__name(_0x73a827=>{const _0x29ef26=_0x26e5b2,_0x18f2b7=[],_0xa8ceed=new Set(),_0x9ef57f=__name(()=>{const _0x9e9926=_0x472e;var _0x3a4ca5;for(;_0xa8ceed['size']<((_0x3a4ca5=_0x73a827==null?void 0x0:_0x73a827[_0x9e9926(0x205)])!=null?_0x3a4ca5:0x1)&&_0x18f2b7[_0x9e9926(0x240)]>0x0;){const _0x1560b6=_0x18f2b7['shift']();_0xa8ceed[_0x9e9926(0x23a)](_0x1560b6),_0x1560b6();}},_0x29ef26(0x224));return(_0x51d1f1,_0xa68f21)=>new Observable(_0x278822=>{const _0x273e49=_0x29ef26,_0x544b88=__name(()=>_0xa68f21(_0x51d1f1)[_0x273e49(0x1e9)]({'next':__name(_0x51b9e1=>_0x278822['next'](_0x51b9e1),_0x273e49(0x244)),'error':__name(_0x21d52a=>_0x278822[_0x273e49(0x214)](_0x21d52a),_0x273e49(0x214)),'complete':__name(()=>_0x278822[_0x273e49(0x231)](),_0x273e49(0x231))}),_0x273e49(0x22d)),_0xf3fab=__name(()=>{const _0x43145d=_0x273e49;_0xa8ceed[_0x43145d(0x27f)](_0x544b88),remove(_0x18f2b7,_0x544b88),_0x9ef57f();},_0x273e49(0x236));return _0x18f2b7[_0x273e49(0x1df)](_0x544b88),_0x9ef57f(),_0xf3fab;});},_0x26e5b2(0x1e5)),AuthInterceptorFactory=__name(_0x243132=>{const _0x126fed=_0x26e5b2,{errorStatusCodes:_0x31bfb3,onAuthError:_0x2ad42f}=_0x243132;return __name((_0x3ffca6,_0x6921dc)=>_0x6921dc(_0x3ffca6)[_0x126fed(0x219)](catchError(_0x4394ef=>(_0x4394ef instanceof HTTPResponseError&&_0x31bfb3[_0x126fed(0x239)](_0x436a90=>_0x436a90===_0x4394ef[_0x126fed(0x220)])&&_0x2ad42f(),throwError(()=>_0x4394ef)))),'authInterceptor');},_0x26e5b2(0x1fa)),createDefaultFetchCheck=__name((_0xd9d4d4=0x12c)=>{const _0xd0fb=_0x26e5b2;let _0x5c53a1=__name(()=>{},_0xd0fb(0x21b));return _0x2a274c=>new Promise(_0x578ae1=>{const _0x5b4d28=_0xd0fb;_0x5c53a1();const _0x1f3555=setTimeout(()=>{_0x578ae1(!0x0);},_0xd9d4d4);_0x5c53a1=__name(()=>{clearTimeout(_0x1f3555),_0x578ae1(!0x1);},_0x5b4d28(0x225));});},'createDefaultFetchCheck'),createDistributeResult=__name(()=>(_0x19a497,_0x5aabf6)=>_0x5aabf6[_0x26e5b2(0x1bf)](_0x177c5c=>({'config':_0x177c5c,'result':_0x19a497})),_0x26e5b2(0x1e6)),MergeInterceptorFactory=__name((_0x549d28,_0x589da3={})=>{const _0x27c03d=_0x26e5b2,{isMatch:_0x31140b,getParamsFromRequest:_0x315651,mergeParamsToRequest:_0x2d27e7}=_0x549d28,{fetchCheck:fetchCheck=createDefaultFetchCheck(0x12c),distributeResult:distributeResult=createDistributeResult()}=_0x589da3,_0xbaf36f=[],_0x1afd63=__name(_0x1126f3=>_0x1126f3['map'](_0x3a93fd=>_0x3a93fd[_0x27c03d(0x217)]),'getPlainList');return(_0x4d4da2,_0x4ba79a)=>_0x31140b(_0x4d4da2)?new Observable(_0x3b9ca0=>{const _0x4bbb7f=_0x27c03d,_0x691eb2=_0x315651(_0x4d4da2);_0xbaf36f[_0x4bbb7f(0x1df)]({'next':__name(_0xd8088e=>_0x3b9ca0[_0x4bbb7f(0x244)](_0xd8088e),'next'),'error':__name(_0x1c6023=>_0x3b9ca0[_0x4bbb7f(0x214)](_0x1c6023),_0x4bbb7f(0x214)),'config':_0x691eb2});const _0xaa3f07=_0x1afd63(_0xbaf36f);fetchCheck(_0x4d4da2)[_0x4bbb7f(0x1cd)](_0x4b378a=>{const _0x408ca1=_0x4bbb7f;if(_0x4b378a){const _0x588914=[];_0xaa3f07[_0x408ca1(0x1d6)](_0x5624e2=>{const _0x24a991=_0x408ca1,_0x335751=_0xbaf36f[_0x24a991(0x1f3)](_0x1050f0=>_0x1050f0[_0x24a991(0x217)]===_0x5624e2);if(_0x335751>=0x0){const [_0x383e77]=_0xbaf36f[_0x24a991(0x229)](_0x335751,0x1);_0x588914[_0x24a991(0x1df)](_0x383e77);}}),_0x4ba79a(_0x2d27e7(_0xaa3f07,_0x4d4da2))['subscribe']({'next':__name(_0x5ee6f3=>{const _0x3d9e61=_0x408ca1;if(_0x5ee6f3[_0x3d9e61(0x26e)]===HTTPEventType[_0x3d9e61(0x204)]){const _0x10250a=_0x5ee6f3['body'],_0x3b8d5c=distributeResult(_0x10250a,_0xaa3f07);_0x588914[_0x3d9e61(0x1d6)](_0x1669a4=>{const _0x13e13b=_0x3d9e61,_0x5aef0c=_0x3b8d5c[_0x13e13b(0x288)](_0x302611=>_0x302611[_0x13e13b(0x217)]===_0x1669a4[_0x13e13b(0x217)]);if(_0x5aef0c){const _0x1b725a=new HTTPResponse({'body':_0x5aef0c[_0x13e13b(0x215)],'headers':_0x5ee6f3[_0x13e13b(0x22e)],'status':_0x5ee6f3[_0x13e13b(0x220)],'statusText':_0x5ee6f3[_0x13e13b(0x24c)]});_0x1669a4[_0x13e13b(0x244)](_0x1b725a);}else _0x1669a4['error']('batch\x20error');});}},_0x408ca1(0x244)),'complete':__name(()=>_0x3b9ca0['complete'](),_0x408ca1(0x231)),'error':__name(_0x4f1448=>_0x3b9ca0['error'](_0x4f1448),'error')});}});}):_0x4ba79a(_0x4d4da2);},_0x26e5b2(0x260));export{AuthInterceptorFactory,FetchHTTPImplementation,HTTPEventType,HTTPHeaders,HTTPProgress,HTTPRequest,HTTPResponse,HTTPResponseError,HTTPService,HTTPStatusCode,IHTTPImplementation,ISocketService,MergeInterceptorFactory,ResponseHeader,RetryInterceptorFactory,ThresholdInterceptorFactory,WebSocketService,XHRHTTPImplementation};
package/lib/umd/index.js CHANGED
@@ -1,2 +1 @@
1
- (function(global,factory){typeof exports=="object"&&typeof module<"u"?factory(exports,require("@univerjs/core"),require("rxjs"),require("rxjs/operators")):typeof define=="function"&&define.amd?define(["exports","@univerjs/core","rxjs","rxjs/operators"],factory):(global=typeof globalThis<"u"?globalThis:global||self,factory(global.UniverNetwork={},global.UniverCore,global.rxjs,global.rxjs.operators))})(this,function(exports2,core,rxjs,operators){"use strict";var __defProp=Object.defineProperty;var __defNormalProp=(obj,key,value)=>key in obj?__defProp(obj,key,{enumerable:!0,configurable:!0,writable:!0,value}):obj[key]=value;var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __publicField=(obj,key,value)=>__defNormalProp(obj,typeof key!="symbol"?key+"":key,value);var _a;const ApplicationJSONType="application/json",_HTTPHeaders=class _HTTPHeaders{constructor(headers){__publicField(this,"_headers",new Map);typeof headers=="string"?this._handleHeadersString(headers):headers instanceof Headers?this._handleHeaders(headers):headers&&this._handleHeadersConstructorProps(headers)}forEach(callback){this._headers.forEach((v,key)=>callback(key,v))}has(key){return!!this._headers.has(key.toLowerCase())}get(key){const k=key.toLowerCase();return this._headers.has(k)?this._headers.get(k):null}set(key,value){this._setHeader(key,value)}toHeadersInit(){var _a2,_b;const headers={};return this._headers.forEach((values,key)=>{headers[key]=values.join(",")}),(_a2=headers.accept)!=null||(headers.accept="application/json, text/plain, */*"),(_b=headers["content-type"])!=null||(headers["content-type"]="application/json;charset=UTF-8"),headers}_setHeader(name,value){const lowerCase=name.toLowerCase();this._headers.has(lowerCase)?this._headers.get(lowerCase).push(value.toString()):this._headers.set(lowerCase,[value.toString()])}_handleHeadersString(headers){headers.split(`
2
- `).forEach(header=>{const[name,value]=header.split(":");name&&value&&this._setHeader(name,value)})}_handleHeadersConstructorProps(headers){Object.entries(headers).forEach(([name,value])=>this._setHeader(name,value))}_handleHeaders(headers){headers.forEach((value,name)=>this._setHeader(name,value))}};__name(_HTTPHeaders,"HTTPHeaders");let HTTPHeaders=_HTTPHeaders;const IHTTPImplementation=core.createIdentifier("network.http-implementation"),_HTTPParams=class _HTTPParams{constructor(params){this.params=params}toString(){return this.params?Object.keys(this.params).map(key=>`${key}=${this.params[key]}`).join("&"):""}};__name(_HTTPParams,"HTTPParams");let HTTPParams=_HTTPParams,HTTPRequestUID=0;const _HTTPRequest=class _HTTPRequest{constructor(method,url,requestParams){__publicField(this,"uid",HTTPRequestUID++);this.method=method,this.url=url,this.requestParams=requestParams}get headers(){return this.requestParams.headers}get withCredentials(){return this.requestParams.withCredentials}get responseType(){return this.requestParams.responseType}getUrlWithParams(){var _a2,_b;const params=(_b=(_a2=this.requestParams)==null?void 0:_a2.params)==null?void 0:_b.toString();return params?`${this.url}${this.url.includes("?")?"&":"?"}${params}`:this.url}getBody(){var _a2,_b;const contentType=(_a2=this.headers.get("Content-Type"))!=null?_a2:ApplicationJSONType,body=(_b=this.requestParams)==null?void 0:_b.body;return contentType===ApplicationJSONType&&body&&typeof body=="object"?JSON.stringify(body):body?`${body}`:null}getHeadersInit(){return this.headers.toHeadersInit()}};__name(_HTTPRequest,"HTTPRequest");let HTTPRequest=_HTTPRequest;var __defProp2=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__decorateClass=__name((decorators,target,key,kind)=>{for(var result=kind>1?void 0:kind?__getOwnPropDesc(target,key):target,i=decorators.length-1,decorator;i>=0;i--)(decorator=decorators[i])&&(result=(kind?decorator(target,key,result):decorator(result))||result);return kind&&result&&__defProp2(target,key,result),result},"__decorateClass"),__decorateParam=__name((index,decorator)=>(target,key)=>decorator(target,key,index),"__decorateParam");exports2.HTTPService=(_a=class extends core.Disposable{constructor(_http){super();__publicField(this,"_interceptors",[]);__publicField(this,"_pipe");this._http=_http}registerHTTPInterceptor(interceptor){if(this._interceptors.indexOf(interceptor)!==-1)throw new Error("[HTTPService]: The interceptor has already been registered!");return this._interceptors.push(interceptor),this._interceptors=this._interceptors.sort((a,b)=>{var _a2,_b;return((_a2=a.priority)!=null?_a2:0)-((_b=b.priority)!=null?_b:0)}),this._pipe=null,core.toDisposable(()=>core.remove(this._interceptors,interceptor))}get(url,params){return this._request("GET",url,params)}post(url,params){return this._request("POST",url,params)}put(url,params){return this._request("PUT",url,params)}delete(url,params){return this._request("DELETE",url,params)}patch(url,options){return this._request("PATCH",url,options)}getSSE(method,url,options){var _a2,_b;const headers=new HTTPHeaders(options==null?void 0:options.headers),params=new HTTPParams(options==null?void 0:options.params),request=new HTTPRequest(method,url,{headers,params,withCredentials:(_a2=options==null?void 0:options.withCredentials)!=null?_a2:!1,reportProgress:!0,responseType:(_b=options==null?void 0:options.responseType)!=null?_b:"json",body:["GET","DELETE"].includes(method)||options==null?void 0:options.body});return rxjs.of(request).pipe(operators.concatMap(request2=>this._runInterceptorsAndImplementation(request2)))}async _request(method,url,options){var _a2,_b;const headers=new HTTPHeaders(options==null?void 0:options.headers),params=new HTTPParams(options==null?void 0:options.params),request=new HTTPRequest(method,url,{headers,params,withCredentials:(_a2=options==null?void 0:options.withCredentials)!=null?_a2:!1,responseType:(_b=options==null?void 0:options.responseType)!=null?_b:"json",body:["GET","DELETE"].includes(method)||options==null?void 0:options.body}),events$=rxjs.of(request).pipe(operators.concatMap(request2=>this._runInterceptorsAndImplementation(request2)));return await rxjs.firstValueFrom(events$)}_runInterceptorsAndImplementation(request){return this._pipe||(this._pipe=this._interceptors.map(handler=>handler.interceptor).reduceRight((nextHandlerFunction,interceptorFunction)=>chainInterceptorFn(nextHandlerFunction,interceptorFunction),(requestFromPrevInterceptor,finalHandler)=>finalHandler(requestFromPrevInterceptor))),this._pipe(request,requestToNext=>this._http.send(requestToNext))}},__name(_a,"HTTPService"),_a),exports2.HTTPService=__decorateClass([__decorateParam(0,IHTTPImplementation)],exports2.HTTPService);function chainInterceptorFn(afterInterceptorChain,currentInterceptorFn){return(prevRequest,nextHandlerFn)=>currentInterceptorFn(prevRequest,nextRequest=>afterInterceptorChain(nextRequest,nextHandlerFn))}__name(chainInterceptorFn,"chainInterceptorFn");var HTTPEventType=(HTTPEventType2=>(HTTPEventType2[HTTPEventType2.DownloadProgress=0]="DownloadProgress",HTTPEventType2[HTTPEventType2.Response=1]="Response",HTTPEventType2))(HTTPEventType||{});const _HTTPResponse=class _HTTPResponse{constructor({body,headers,status,statusText}){__publicField(this,"type",1);__publicField(this,"body");__publicField(this,"headers");__publicField(this,"status");__publicField(this,"statusText");this.body=body,this.headers=headers,this.status=status,this.statusText=statusText}};__name(_HTTPResponse,"HTTPResponse");let HTTPResponse=_HTTPResponse;const _HTTPProgress=class _HTTPProgress{constructor(total,loaded,partialText){__publicField(this,"type",0);this.total=total,this.loaded=loaded,this.partialText=partialText}};__name(_HTTPProgress,"HTTPProgress");let HTTPProgress=_HTTPProgress;const _ResponseHeader=class _ResponseHeader{constructor(headers,status,statusText){this.headers=headers,this.status=status,this.statusText=statusText}};__name(_ResponseHeader,"ResponseHeader");let ResponseHeader=_ResponseHeader;const _HTTPResponseError=class _HTTPResponseError{constructor({headers,status,statusText,error}){__publicField(this,"headers");__publicField(this,"status");__publicField(this,"statusText");__publicField(this,"error");this.headers=headers,this.status=status,this.statusText=statusText,this.error=error}};__name(_HTTPResponseError,"HTTPResponseError");let HTTPResponseError=_HTTPResponseError;const SuccessStatusCodeLowerBound=200,ErrorStatusCodeLowerBound=300;var HTTPStatusCode=(HTTPStatusCode2=>(HTTPStatusCode2[HTTPStatusCode2.Continue=100]="Continue",HTTPStatusCode2[HTTPStatusCode2.SwitchingProtocols=101]="SwitchingProtocols",HTTPStatusCode2[HTTPStatusCode2.Processing=102]="Processing",HTTPStatusCode2[HTTPStatusCode2.EarlyHints=103]="EarlyHints",HTTPStatusCode2[HTTPStatusCode2.Ok=200]="Ok",HTTPStatusCode2[HTTPStatusCode2.Created=201]="Created",HTTPStatusCode2[HTTPStatusCode2.Accepted=202]="Accepted",HTTPStatusCode2[HTTPStatusCode2.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",HTTPStatusCode2[HTTPStatusCode2.NoContent=204]="NoContent",HTTPStatusCode2[HTTPStatusCode2.ResetContent=205]="ResetContent",HTTPStatusCode2[HTTPStatusCode2.PartialContent=206]="PartialContent",HTTPStatusCode2[HTTPStatusCode2.MultiStatus=207]="MultiStatus",HTTPStatusCode2[HTTPStatusCode2.AlreadyReported=208]="AlreadyReported",HTTPStatusCode2[HTTPStatusCode2.ImUsed=226]="ImUsed",HTTPStatusCode2[HTTPStatusCode2.MultipleChoices=300]="MultipleChoices",HTTPStatusCode2[HTTPStatusCode2.MovedPermanently=301]="MovedPermanently",HTTPStatusCode2[HTTPStatusCode2.Found=302]="Found",HTTPStatusCode2[HTTPStatusCode2.SeeOther=303]="SeeOther",HTTPStatusCode2[HTTPStatusCode2.NotModified=304]="NotModified",HTTPStatusCode2[HTTPStatusCode2.UseProxy=305]="UseProxy",HTTPStatusCode2[HTTPStatusCode2.Unused=306]="Unused",HTTPStatusCode2[HTTPStatusCode2.TemporaryRedirect=307]="TemporaryRedirect",HTTPStatusCode2[HTTPStatusCode2.PermanentRedirect=308]="PermanentRedirect",HTTPStatusCode2[HTTPStatusCode2.BadRequest=400]="BadRequest",HTTPStatusCode2[HTTPStatusCode2.Unauthorized=401]="Unauthorized",HTTPStatusCode2[HTTPStatusCode2.PaymentRequired=402]="PaymentRequired",HTTPStatusCode2[HTTPStatusCode2.Forbidden=403]="Forbidden",HTTPStatusCode2[HTTPStatusCode2.NotFound=404]="NotFound",HTTPStatusCode2[HTTPStatusCode2.MethodNotAllowed=405]="MethodNotAllowed",HTTPStatusCode2[HTTPStatusCode2.NotAcceptable=406]="NotAcceptable",HTTPStatusCode2[HTTPStatusCode2.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",HTTPStatusCode2[HTTPStatusCode2.RequestTimeout=408]="RequestTimeout",HTTPStatusCode2[HTTPStatusCode2.Conflict=409]="Conflict",HTTPStatusCode2[HTTPStatusCode2.Gone=410]="Gone",HTTPStatusCode2[HTTPStatusCode2.LengthRequired=411]="LengthRequired",HTTPStatusCode2[HTTPStatusCode2.PreconditionFailed=412]="PreconditionFailed",HTTPStatusCode2[HTTPStatusCode2.PayloadTooLarge=413]="PayloadTooLarge",HTTPStatusCode2[HTTPStatusCode2.UriTooLong=414]="UriTooLong",HTTPStatusCode2[HTTPStatusCode2.UnsupportedMediaType=415]="UnsupportedMediaType",HTTPStatusCode2[HTTPStatusCode2.RangeNotSatisfiable=416]="RangeNotSatisfiable",HTTPStatusCode2[HTTPStatusCode2.ExpectationFailed=417]="ExpectationFailed",HTTPStatusCode2[HTTPStatusCode2.ImATeapot=418]="ImATeapot",HTTPStatusCode2[HTTPStatusCode2.MisdirectedRequest=421]="MisdirectedRequest",HTTPStatusCode2[HTTPStatusCode2.UnprocessableEntity=422]="UnprocessableEntity",HTTPStatusCode2[HTTPStatusCode2.Locked=423]="Locked",HTTPStatusCode2[HTTPStatusCode2.FailedDependency=424]="FailedDependency",HTTPStatusCode2[HTTPStatusCode2.TooEarly=425]="TooEarly",HTTPStatusCode2[HTTPStatusCode2.UpgradeRequired=426]="UpgradeRequired",HTTPStatusCode2[HTTPStatusCode2.PreconditionRequired=428]="PreconditionRequired",HTTPStatusCode2[HTTPStatusCode2.TooManyRequests=429]="TooManyRequests",HTTPStatusCode2[HTTPStatusCode2.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",HTTPStatusCode2[HTTPStatusCode2.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",HTTPStatusCode2[HTTPStatusCode2.InternalServerError=500]="InternalServerError",HTTPStatusCode2[HTTPStatusCode2.NotImplemented=501]="NotImplemented",HTTPStatusCode2[HTTPStatusCode2.BadGateway=502]="BadGateway",HTTPStatusCode2[HTTPStatusCode2.ServiceUnavailable=503]="ServiceUnavailable",HTTPStatusCode2[HTTPStatusCode2.GatewayTimeout=504]="GatewayTimeout",HTTPStatusCode2[HTTPStatusCode2.HttpVersionNotSupported=505]="HttpVersionNotSupported",HTTPStatusCode2[HTTPStatusCode2.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",HTTPStatusCode2[HTTPStatusCode2.InsufficientStorage=507]="InsufficientStorage",HTTPStatusCode2[HTTPStatusCode2.LoopDetected=508]="LoopDetected",HTTPStatusCode2[HTTPStatusCode2.NotExtended=510]="NotExtended",HTTPStatusCode2[HTTPStatusCode2.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired",HTTPStatusCode2))(HTTPStatusCode||{});const _FetchHTTPImplementation=class _FetchHTTPImplementation{send(request){return new rxjs.Observable(subscriber=>{const abortController=new AbortController;return this._send(request,subscriber,abortController).then(()=>{},error=>{subscriber.error(new HTTPResponseError({error}))}),()=>abortController.abort()})}async _send(request,subscriber,abortController){var _a2,_b;let response;try{const fetchParams=this._parseFetchParamsFromRequest(request);response=await fetch(request.getUrlWithParams(),{signal:abortController.signal,...fetchParams})}catch(error){subscriber.error(new HTTPResponseError({error,status:(_a2=error.status)!=null?_a2:0,statusText:(_b=error.statusText)!=null?_b:"Unknown Error",headers:error.headers}));return}const responseHeaders=new HTTPHeaders(response.headers),status=response.status,statusText=response.statusText;let body=null;response.body&&(body=await this._readBody(request,response,subscriber)),status>=HTTPStatusCode.Ok&&status<HTTPStatusCode.MultipleChoices?subscriber.next(new HTTPResponse({body,headers:responseHeaders,status,statusText})):subscriber.error(new HTTPResponseError({error:body,status,statusText,headers:responseHeaders})),subscriber.complete()}async _readBody(request,response,subscriber){var _a2,_b;const chunks=[],reader=response.body.getReader(),contentLength=response.headers.get("content-length");let receivedLength=0;const reportProgress=(_a2=request.requestParams)==null?void 0:_a2.reportProgress,responseType=request.responseType;let partialText,decoder;for(;;){const{done,value}=await reader.read();if(done)break;chunks.push(value),receivedLength+=value.length,reportProgress&&responseType==="text"&&(partialText=(partialText!=null?partialText:"")+(decoder!=null?decoder:decoder=new TextDecoder).decode(value,{stream:!0}),subscriber.next(new HTTPProgress(contentLength?Number.parseInt(contentLength,10):void 0,receivedLength,partialText)))}const all=mergeChunks(chunks,receivedLength);try{const contentType=(_b=response.headers.get("content-type"))!=null?_b:"";return deserialize(request,all,contentType)}catch(error){return subscriber.error(new HTTPResponseError({error,status:response.status,statusText:response.statusText,headers:new HTTPHeaders(response.headers)})),null}}_parseFetchParamsFromRequest(request){return{method:request.method,headers:request.getHeadersInit(),body:request.getBody(),credentials:request.withCredentials?"include":void 0}}};__name(_FetchHTTPImplementation,"FetchHTTPImplementation");let FetchHTTPImplementation=_FetchHTTPImplementation;function mergeChunks(chunks,totalLength){const all=new Uint8Array(totalLength);let position=0;for(const chunk of chunks)all.set(chunk,position),position+=chunk.length;return all}__name(mergeChunks,"mergeChunks");const XSSI_PREFIX=/^\)\]\}',?\n/;function deserialize(request,bin,contentType){switch(request.responseType){case"json":const text=new TextDecoder().decode(bin).replace(XSSI_PREFIX,"");return text===""?null:JSON.parse(text);case"text":return new TextDecoder().decode(bin);case"blob":return new Blob([bin],{type:contentType});case"arraybuffer":return bin.buffer;default:throw new Error(`[FetchHTTPImplementation]: unknown response type: ${request.responseType}.`)}}__name(deserialize,"deserialize");const _XHRHTTPImplementation=class _XHRHTTPImplementation{send(request){return new rxjs.Observable(observer=>{const xhr=new XMLHttpRequest;xhr.open(request.method,request.getUrlWithParams()),request.withCredentials&&(xhr.withCredentials=!0),request.headers.forEach((key,value)=>xhr.setRequestHeader(key,value.join(","))),request.headers.has("Accept")||xhr.setRequestHeader("Accept","application/json, text/plain, */*"),request.headers.has("Content-Type")||xhr.setRequestHeader("Content-Type","application/json;charset=UTF-8");const buildResponseHeader=__name(()=>{const statusText=xhr.statusText||"OK",headers=new HTTPHeaders(xhr.getAllResponseHeaders());return new ResponseHeader(headers,xhr.status,statusText)},"buildResponseHeader"),onLoadHandler=__name(()=>{const{headers,statusText,status}=buildResponseHeader(),{responseType}=request;let body2=null,error=null;status!==HTTPStatusCode.NoContent&&(body2=typeof xhr.response>"u"?xhr.responseText:xhr.response);let success=status>=SuccessStatusCodeLowerBound&&status<ErrorStatusCodeLowerBound;if(responseType==="json"&&typeof body2=="string"){const originalBody=body2;try{body2=body2?JSON.parse(body2):null}catch(e){success=!1,body2=originalBody,error=e}}success?observer.next(new HTTPResponse({body:body2,headers,status,statusText})):observer.error(new HTTPResponseError({error,headers,status,statusText}))},"onLoadHandler"),onErrorHandler=__name(error=>{const res=new HTTPResponseError({error,status:xhr.status||0,statusText:xhr.statusText||"Unknown Error",headers:buildResponseHeader().headers});observer.error(res)},"onErrorHandler");xhr.addEventListener("load",onLoadHandler),xhr.addEventListener("error",onErrorHandler),xhr.addEventListener("abort",onErrorHandler),xhr.addEventListener("timeout",onErrorHandler);const body=request.getBody();return xhr.send(body),()=>{xhr.readyState!==xhr.DONE&&xhr.abort(),xhr.removeEventListener("load",onLoadHandler),xhr.removeEventListener("error",onErrorHandler),xhr.removeEventListener("abort",onErrorHandler),xhr.removeEventListener("timeout",onErrorHandler)}})}};__name(_XHRHTTPImplementation,"XHRHTTPImplementation");let XHRHTTPImplementation=_XHRHTTPImplementation;const ISocketService=core.createIdentifier("univer.socket"),_WebSocketService=class _WebSocketService extends core.Disposable{createSocket(URL){try{const connection=new WebSocket(URL),disposables=new core.DisposableCollection;return{URL,close:__name((code,reason)=>{connection.close(code,reason),disposables.dispose()},"close"),send:__name(data=>{connection.send(data)},"send"),open$:new rxjs.Observable(subscriber=>{const callback=__name(event=>subscriber.next(event),"callback");connection.addEventListener("open",callback),disposables.add(core.toDisposable(()=>connection.removeEventListener("open",callback)))}).pipe(operators.share()),close$:new rxjs.Observable(subscriber=>{const callback=__name(event=>subscriber.next(event),"callback");connection.addEventListener("close",callback),disposables.add(core.toDisposable(()=>connection.removeEventListener("close",callback)))}).pipe(operators.share()),error$:new rxjs.Observable(subscriber=>{const callback=__name(event=>subscriber.next(event),"callback");connection.addEventListener("error",callback),disposables.add(core.toDisposable(()=>connection.removeEventListener("error",callback)))}).pipe(operators.share()),message$:new rxjs.Observable(subscriber=>{const callback=__name(event=>subscriber.next(event),"callback");connection.addEventListener("message",callback),disposables.add(core.toDisposable(()=>connection.removeEventListener("message",callback)))}).pipe(operators.share())}}catch(e){return console.error(e),null}}};__name(_WebSocketService,"WebSocketService");let WebSocketService=_WebSocketService;const DEFAULT_MAX_RETRY_ATTEMPTS=3,DELAY_INTERVAL=1e3,RetryInterceptorFactory=__name(params=>{var _a2,_b;const maxRetryAttempts=(_a2=params==null?void 0:params.maxRetryAttempts)!=null?_a2:DEFAULT_MAX_RETRY_ATTEMPTS,delayInterval=(_b=params==null?void 0:params.delayInterval)!=null?_b:DELAY_INTERVAL;return(request,next)=>next(request).pipe(operators.retry({delay:delayInterval,count:maxRetryAttempts}))},"RetryInterceptorFactory"),ThresholdInterceptorFactory=__name(params=>{const handlers=[],ongoingHandlers=new Set,tick=__name(()=>{var _a2;for(;ongoingHandlers.size<((_a2=params==null?void 0:params.maxParallel)!=null?_a2:1)&&handlers.length>0;){const handler=handlers.shift();ongoingHandlers.add(handler),handler()}},"tick");return(request,next)=>new rxjs.Observable(observer=>{const handler=__name(()=>next(request).subscribe({next:__name(event=>observer.next(event),"next"),error:__name(err=>observer.error(err),"error"),complete:__name(()=>observer.complete(),"complete")}),"handler"),teardown=__name(()=>{ongoingHandlers.delete(handler),core.remove(handlers,handler),tick()},"teardown");return handlers.push(handler),tick(),teardown})},"ThresholdInterceptorFactory"),AuthInterceptorFactory=__name(params=>{const{errorStatusCodes,onAuthError}=params;return __name((request,next)=>next(request).pipe(rxjs.catchError(error=>(error instanceof HTTPResponseError&&errorStatusCodes.some(c=>c===error.status)&&onAuthError(),rxjs.throwError(()=>error)))),"authInterceptor")},"AuthInterceptorFactory"),createDefaultFetchCheck=__name((time=300)=>{let cancel=__name(()=>{},"noop");return _currentConfig=>new Promise(res=>{cancel();const t=setTimeout(()=>{res(!0)},time);cancel=__name(()=>{clearTimeout(t),res(!1)},"cancel")})},"createDefaultFetchCheck"),createDistributeResult=__name(()=>(result,list)=>list.map(config=>({config,result})),"createDistributeResult"),MergeInterceptorFactory=__name((config,options={})=>{const{isMatch,getParamsFromRequest,mergeParamsToRequest}=config,{fetchCheck=createDefaultFetchCheck(300),distributeResult=createDistributeResult()}=options,hookList=[],getPlainList=__name(_list=>_list.map(item=>item.config),"getPlainList");return(requestConfig,next)=>isMatch(requestConfig)?new rxjs.Observable(observer=>{const params=getParamsFromRequest(requestConfig);hookList.push({next:__name(v=>observer.next(v),"next"),error:__name(error=>observer.error(error),"error"),config:params});const list=getPlainList(hookList);fetchCheck(requestConfig).then(isFetch=>{if(isFetch){const currentHookList=[];list.forEach(config2=>{const index=hookList.findIndex(item=>item.config===config2);if(index>=0){const[hook]=hookList.splice(index,1);currentHookList.push(hook)}}),next(mergeParamsToRequest(list,requestConfig)).subscribe({next:__name(e=>{if(e.type===HTTPEventType.Response){const body=e.body,configList=distributeResult(body,list);currentHookList.forEach(hookItem=>{const res=configList.find(item=>item.config===hookItem.config);if(res){const response=new HTTPResponse({body:res.result,headers:e.headers,status:e.status,statusText:e.statusText});hookItem.next(response)}else hookItem.error("batch error")})}},"next"),complete:__name(()=>observer.complete(),"complete"),error:__name(e=>observer.error(e),"error")})}})}):next(requestConfig)},"MergeInterceptorFactory");exports2.AuthInterceptorFactory=AuthInterceptorFactory,exports2.FetchHTTPImplementation=FetchHTTPImplementation,exports2.HTTPEventType=HTTPEventType,exports2.HTTPHeaders=HTTPHeaders,exports2.HTTPProgress=HTTPProgress,exports2.HTTPRequest=HTTPRequest,exports2.HTTPResponse=HTTPResponse,exports2.HTTPResponseError=HTTPResponseError,exports2.HTTPStatusCode=HTTPStatusCode,exports2.IHTTPImplementation=IHTTPImplementation,exports2.ISocketService=ISocketService,exports2.MergeInterceptorFactory=MergeInterceptorFactory,exports2.ResponseHeader=ResponseHeader,exports2.RetryInterceptorFactory=RetryInterceptorFactory,exports2.ThresholdInterceptorFactory=ThresholdInterceptorFactory,exports2.WebSocketService=WebSocketService,exports2.XHRHTTPImplementation=XHRHTTPImplementation,Object.defineProperty(exports2,Symbol.toStringTag,{value:"Module"})});
1
+ (function(_0x1e4f35,_0x3cf3c4){const _0x4a6e15=_0xf2fe,_0x1080a6=_0x1e4f35();while(!![]){try{const _0x30a970=parseInt(_0x4a6e15(0xa5))/0x1+parseInt(_0x4a6e15(0x161))/0x2*(parseInt(_0x4a6e15(0x133))/0x3)+parseInt(_0x4a6e15(0x14d))/0x4*(-parseInt(_0x4a6e15(0x85))/0x5)+parseInt(_0x4a6e15(0x9a))/0x6+parseInt(_0x4a6e15(0xda))/0x7+parseInt(_0x4a6e15(0xa9))/0x8*(parseInt(_0x4a6e15(0x11c))/0x9)+-parseInt(_0x4a6e15(0x12a))/0xa;if(_0x30a970===_0x3cf3c4)break;else _0x1080a6['push'](_0x1080a6['shift']());}catch(_0x5b7057){_0x1080a6['push'](_0x1080a6['shift']());}}}(_0x165b,0x267ab),function(_0x51f9c5,_0x554af2){const _0x57fc78=_0xf2fe;typeof exports==_0x57fc78(0x156)&&typeof module<'u'?_0x554af2(exports,require(_0x57fc78(0x146)),require(_0x57fc78(0xa0)),require(_0x57fc78(0x162))):typeof define==_0x57fc78(0xbc)&&define['amd']?define([_0x57fc78(0x120),_0x57fc78(0x146),_0x57fc78(0xa0),_0x57fc78(0x162)],_0x554af2):(_0x51f9c5=typeof globalThis<'u'?globalThis:_0x51f9c5||self,_0x554af2(_0x51f9c5[_0x57fc78(0xa2)]={},_0x51f9c5[_0x57fc78(0xed)],_0x51f9c5[_0x57fc78(0xa0)],_0x51f9c5[_0x57fc78(0xa0)][_0x57fc78(0x122)]));}(this,function(_0xe745b5,_0x7576f2,_0x197358,_0x287593){'use strict';const _0xc8ec0e=_0xf2fe;var _0x4b1123=Object[_0xc8ec0e(0x93)],_0x95bdc7=(_0xccda51,_0x26b112,_0x443383)=>_0x26b112 in _0xccda51?_0x4b1123(_0xccda51,_0x26b112,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x443383}):_0xccda51[_0x26b112]=_0x443383,_0x400b0f=(_0x7e2de5,_0x14d39b)=>_0x4b1123(_0x7e2de5,_0xc8ec0e(0x11a),{'value':_0x14d39b,'configurable':!0x0}),_0x6b6ad8=(_0x4ad27a,_0x58f2a7,_0x27f3ea)=>_0x95bdc7(_0x4ad27a,typeof _0x58f2a7!=_0xc8ec0e(0x145)?_0x58f2a7+'':_0x58f2a7,_0x27f3ea),_0x16fef2;const _0x54c1f9=_0xc8ec0e(0x128),_0x9201b8=class _0x58408c{constructor(_0x250a07){const _0x2015c2=_0xc8ec0e;_0x6b6ad8(this,_0x2015c2(0x9d),new Map()),typeof _0x250a07=='string'?this[_0x2015c2(0xbe)](_0x250a07):_0x250a07 instanceof Headers?this[_0x2015c2(0x9e)](_0x250a07):_0x250a07&&this[_0x2015c2(0x110)](_0x250a07);}[_0xc8ec0e(0xe9)](_0x2aa011){const _0x2ad7e1=_0xc8ec0e;this['_headers'][_0x2ad7e1(0xe9)]((_0x1ba70e,_0x265661)=>_0x2aa011(_0x265661,_0x1ba70e));}['has'](_0x366bbb){const _0x3de281=_0xc8ec0e;return!!this[_0x3de281(0x9d)][_0x3de281(0xe7)](_0x366bbb[_0x3de281(0xd0)]());}[_0xc8ec0e(0x9f)](_0x673aac){const _0x44cbf0=_0xc8ec0e,_0x12288d=_0x673aac[_0x44cbf0(0xd0)]();return this[_0x44cbf0(0x9d)][_0x44cbf0(0xe7)](_0x12288d)?this['_headers'][_0x44cbf0(0x9f)](_0x12288d):null;}['set'](_0x37a56a,_0x291219){const _0x139d38=_0xc8ec0e;this[_0x139d38(0x112)](_0x37a56a,_0x291219);}[_0xc8ec0e(0x9c)](){const _0x111188=_0xc8ec0e;var _0x2e07b7,_0x4cb11c;const _0x475f6b={};return this[_0x111188(0x9d)]['forEach']((_0x50a60d,_0x16558b)=>{const _0x3edde3=_0x111188;_0x475f6b[_0x16558b]=_0x50a60d[_0x3edde3(0xe3)](',');}),(_0x2e07b7=_0x475f6b[_0x111188(0x15f)])!=null||(_0x475f6b['accept']=_0x111188(0x101)),(_0x4cb11c=_0x475f6b[_0x111188(0x91)])!=null||(_0x475f6b[_0x111188(0x91)]=_0x111188(0xbb)),_0x475f6b;}[_0xc8ec0e(0x112)](_0x5ba899,_0x48d94b){const _0x2991a2=_0xc8ec0e,_0x104f40=_0x5ba899[_0x2991a2(0xd0)]();this[_0x2991a2(0x9d)][_0x2991a2(0xe7)](_0x104f40)?this[_0x2991a2(0x9d)][_0x2991a2(0x9f)](_0x104f40)[_0x2991a2(0xe4)](_0x48d94b['toString']()):this[_0x2991a2(0x9d)][_0x2991a2(0xaa)](_0x104f40,[_0x48d94b[_0x2991a2(0x13c)]()]);}[_0xc8ec0e(0xbe)](_0x10e6a1){const _0x4be51b=_0xc8ec0e;_0x10e6a1[_0x4be51b(0xd1)]('\x0a')['forEach'](_0x5aaf41=>{const _0x32c415=_0x4be51b,[_0x4d4d90,_0x488752]=_0x5aaf41[_0x32c415(0xd1)](':');_0x4d4d90&&_0x488752&&this['_setHeader'](_0x4d4d90,_0x488752);});}['_handleHeadersConstructorProps'](_0x54c4cb){const _0x363454=_0xc8ec0e;Object[_0x363454(0x153)](_0x54c4cb)[_0x363454(0xe9)](([_0x37f9f0,_0x43e407])=>this[_0x363454(0x112)](_0x37f9f0,_0x43e407));}[_0xc8ec0e(0x9e)](_0x3b84f0){const _0x562622=_0xc8ec0e;_0x3b84f0[_0x562622(0xe9)]((_0x49350,_0x576d75)=>this['_setHeader'](_0x576d75,_0x49350));}};_0x400b0f(_0x9201b8,_0xc8ec0e(0x82));let _0x137e8e=_0x9201b8;const _0x1c231c=_0x7576f2[_0xc8ec0e(0x14e)]('network.http-implementation'),_0x338c12=class _0xcfd053{constructor(_0x3568e6){const _0x545b7e=_0xc8ec0e;this[_0x545b7e(0xf1)]=_0x3568e6;}[_0xc8ec0e(0x13c)](){const _0x490c5c=_0xc8ec0e;return this[_0x490c5c(0xf1)]?Object[_0x490c5c(0x114)](this[_0x490c5c(0xf1)])['map'](_0x60dc0d=>_0x60dc0d+'='+this[_0x490c5c(0xf1)][_0x60dc0d])['join']('&'):'';}};_0x400b0f(_0x338c12,_0xc8ec0e(0xaf));let _0x2d4a46=_0x338c12,_0x351cd6=0x0;const _0xacf73c=class _0x1cdcd9{constructor(_0x16c078,_0x30ea9a,_0x28418e){const _0x56d8db=_0xc8ec0e;_0x6b6ad8(this,_0x56d8db(0xee),_0x351cd6++),(this[_0x56d8db(0x150)]=_0x16c078,this[_0x56d8db(0x118)]=_0x30ea9a,this[_0x56d8db(0xfa)]=_0x28418e);}get[_0xc8ec0e(0xf0)](){const _0x17c135=_0xc8ec0e;return this[_0x17c135(0xfa)][_0x17c135(0xf0)];}get[_0xc8ec0e(0x109)](){const _0x712cae=_0xc8ec0e;return this[_0x712cae(0xfa)]['withCredentials'];}get[_0xc8ec0e(0x105)](){const _0x541702=_0xc8ec0e;return this[_0x541702(0xfa)]['responseType'];}['getUrlWithParams'](){const _0x1e33b5=_0xc8ec0e;var _0x56b97d,_0x310b17;const _0x2af24b=(_0x310b17=(_0x56b97d=this[_0x1e33b5(0xfa)])==null?void 0x0:_0x56b97d[_0x1e33b5(0xf1)])==null?void 0x0:_0x310b17['toString']();return _0x2af24b?''+this[_0x1e33b5(0x118)]+(this[_0x1e33b5(0x118)][_0x1e33b5(0x11d)]('?')?'&':'?')+_0x2af24b:this[_0x1e33b5(0x118)];}[_0xc8ec0e(0x158)](){const _0x3236b8=_0xc8ec0e;var _0x4b5f2a,_0x4e00dd;const _0x1f9938=(_0x4b5f2a=this[_0x3236b8(0xf0)][_0x3236b8(0x9f)]('Content-Type'))!=null?_0x4b5f2a:_0x54c1f9,_0x3394e4=(_0x4e00dd=this[_0x3236b8(0xfa)])==null?void 0x0:_0x4e00dd[_0x3236b8(0x168)];return _0x1f9938===_0x54c1f9&&_0x3394e4&&typeof _0x3394e4==_0x3236b8(0x156)?JSON['stringify'](_0x3394e4):_0x3394e4?''+_0x3394e4:null;}['getHeadersInit'](){const _0x4bb29c=_0xc8ec0e;return this[_0x4bb29c(0xf0)][_0x4bb29c(0x9c)]();}};_0x400b0f(_0xacf73c,_0xc8ec0e(0x96));let _0x4b184e=_0xacf73c;var _0x3d0840=Object[_0xc8ec0e(0x93)],_0x2ef478=Object[_0xc8ec0e(0xf3)],_0x484b13=_0x400b0f((_0x2b6c8f,_0x58c95f,_0x333ed0,_0x598885)=>{const _0x4db1d6=_0xc8ec0e;for(var _0x37fd00=_0x598885>0x1?void 0x0:_0x598885?_0x2ef478(_0x58c95f,_0x333ed0):_0x58c95f,_0x435e55=_0x2b6c8f[_0x4db1d6(0xb6)]-0x1,_0x4141c6;_0x435e55>=0x0;_0x435e55--)(_0x4141c6=_0x2b6c8f[_0x435e55])&&(_0x37fd00=(_0x598885?_0x4141c6(_0x58c95f,_0x333ed0,_0x37fd00):_0x4141c6(_0x37fd00))||_0x37fd00);return _0x598885&&_0x37fd00&&_0x3d0840(_0x58c95f,_0x333ed0,_0x37fd00),_0x37fd00;},_0xc8ec0e(0x125)),_0x47b04d=_0x400b0f((_0x4e114d,_0x3435d8)=>(_0xdbe50f,_0x355644)=>_0x3435d8(_0xdbe50f,_0x355644,_0x4e114d),_0xc8ec0e(0xd3));_0xe745b5['HTTPService']=(_0x16fef2=class extends _0x7576f2[_0xc8ec0e(0xdb)]{constructor(_0x1bd34c){const _0x352f0b=_0xc8ec0e;super(),_0x6b6ad8(this,_0x352f0b(0x139),[]),_0x6b6ad8(this,_0x352f0b(0x14a)),this[_0x352f0b(0xc7)]=_0x1bd34c;}[_0xc8ec0e(0x130)](_0x4feb1b){const _0x1e649c=_0xc8ec0e;if(this[_0x1e649c(0x139)][_0x1e649c(0x7f)](_0x4feb1b)!==-0x1)throw new Error('[HTTPService]:\x20The\x20interceptor\x20has\x20already\x20been\x20registered!');return this['_interceptors'][_0x1e649c(0xe4)](_0x4feb1b),this['_interceptors']=this[_0x1e649c(0x139)][_0x1e649c(0xf8)]((_0x42214d,_0x234960)=>{const _0x26b7b7=_0x1e649c;var _0x2c4c74,_0x335171;return((_0x2c4c74=_0x42214d['priority'])!=null?_0x2c4c74:0x0)-((_0x335171=_0x234960[_0x26b7b7(0xd9)])!=null?_0x335171:0x0);}),this['_pipe']=null,_0x7576f2['toDisposable'](()=>_0x7576f2[_0x1e649c(0x12d)](this['_interceptors'],_0x4feb1b));}[_0xc8ec0e(0x9f)](_0x1485fd,_0x2bee0e){const _0x45a8bc=_0xc8ec0e;return this[_0x45a8bc(0x13e)](_0x45a8bc(0x169),_0x1485fd,_0x2bee0e);}[_0xc8ec0e(0xeb)](_0x257f07,_0x568029){const _0x11f058=_0xc8ec0e;return this[_0x11f058(0x13e)](_0x11f058(0x148),_0x257f07,_0x568029);}[_0xc8ec0e(0x13f)](_0x125d55,_0x535dd1){return this['_request']('PUT',_0x125d55,_0x535dd1);}[_0xc8ec0e(0x10a)](_0x3e386b,_0x5bdc99){const _0x5037f2=_0xc8ec0e;return this[_0x5037f2(0x13e)](_0x5037f2(0x100),_0x3e386b,_0x5bdc99);}['patch'](_0x193578,_0x4032cb){const _0x384f9e=_0xc8ec0e;return this[_0x384f9e(0x13e)](_0x384f9e(0xa1),_0x193578,_0x4032cb);}[_0xc8ec0e(0x121)](_0x508296,_0x20b16d,_0x2ac838){const _0x332b88=_0xc8ec0e;var _0x47cbef,_0xb1f8cb;const _0x22aeeb=new _0x137e8e(_0x2ac838==null?void 0x0:_0x2ac838[_0x332b88(0xf0)]),_0x4661bf=new _0x2d4a46(_0x2ac838==null?void 0x0:_0x2ac838[_0x332b88(0xf1)]),_0x3dd32d=new _0x4b184e(_0x508296,_0x20b16d,{'headers':_0x22aeeb,'params':_0x4661bf,'withCredentials':(_0x47cbef=_0x2ac838==null?void 0x0:_0x2ac838[_0x332b88(0x109)])!=null?_0x47cbef:!0x1,'reportProgress':!0x0,'responseType':(_0xb1f8cb=_0x2ac838==null?void 0x0:_0x2ac838['responseType'])!=null?_0xb1f8cb:'json','body':[_0x332b88(0x169),_0x332b88(0x100)][_0x332b88(0x11d)](_0x508296)||_0x2ac838==null?void 0x0:_0x2ac838[_0x332b88(0x168)]});return _0x197358['of'](_0x3dd32d)[_0x332b88(0xb1)](_0x287593[_0x332b88(0xef)](_0x413349=>this['_runInterceptorsAndImplementation'](_0x413349)));}async['_request'](_0x47f0bb,_0x147fa6,_0x434000){const _0x19561c=_0xc8ec0e;var _0x30f86a,_0x82a132;const _0x4f9e3d=new _0x137e8e(_0x434000==null?void 0x0:_0x434000['headers']),_0x57af28=new _0x2d4a46(_0x434000==null?void 0x0:_0x434000[_0x19561c(0xf1)]),_0x28a166=new _0x4b184e(_0x47f0bb,_0x147fa6,{'headers':_0x4f9e3d,'params':_0x57af28,'withCredentials':(_0x30f86a=_0x434000==null?void 0x0:_0x434000[_0x19561c(0x109)])!=null?_0x30f86a:!0x1,'responseType':(_0x82a132=_0x434000==null?void 0x0:_0x434000[_0x19561c(0x105)])!=null?_0x82a132:_0x19561c(0x12f),'body':[_0x19561c(0x169),'DELETE']['includes'](_0x47f0bb)||_0x434000==null?void 0x0:_0x434000['body']}),_0x1b2bf7=_0x197358['of'](_0x28a166)[_0x19561c(0xb1)](_0x287593[_0x19561c(0xef)](_0x58cc8c=>this['_runInterceptorsAndImplementation'](_0x58cc8c)));return await _0x197358[_0x19561c(0x15c)](_0x1b2bf7);}[_0xc8ec0e(0xd7)](_0x5872a1){const _0x58e5cd=_0xc8ec0e;return this['_pipe']||(this['_pipe']=this[_0x58e5cd(0x139)][_0x58e5cd(0x136)](_0xd36b67=>_0xd36b67[_0x58e5cd(0xea)])[_0x58e5cd(0x102)]((_0x38c20,_0x700a8e)=>_0x245811(_0x38c20,_0x700a8e),(_0x5c0fd2,_0xab1f5a)=>_0xab1f5a(_0x5c0fd2))),this[_0x58e5cd(0x14a)](_0x5872a1,_0x5937a1=>this[_0x58e5cd(0xc7)][_0x58e5cd(0x166)](_0x5937a1));}},_0x400b0f(_0x16fef2,'HTTPService'),_0x16fef2),_0xe745b5[_0xc8ec0e(0xb4)]=_0x484b13([_0x47b04d(0x0,_0x1c231c)],_0xe745b5[_0xc8ec0e(0xb4)]);function _0x245811(_0x5e836c,_0x228096){return(_0xa833a5,_0x50d286)=>_0x228096(_0xa833a5,_0x3e880b=>_0x5e836c(_0x3e880b,_0x50d286));}_0x400b0f(_0x245811,'chainInterceptorFn');var _0x4051a4=(_0xd96d18=>(_0xd96d18[_0xd96d18[_0xc8ec0e(0x16b)]=0x0]=_0xc8ec0e(0x16b),_0xd96d18[_0xd96d18[_0xc8ec0e(0xad)]=0x1]=_0xc8ec0e(0xad),_0xd96d18))(_0x4051a4||{});const _0x6b5a0f=class _0x3d0400{constructor({body:_0x415937,headers:_0x523b83,status:_0x5b21b4,statusText:_0x499e9c}){const _0x3a598f=_0xc8ec0e;_0x6b6ad8(this,_0x3a598f(0x126),0x1),_0x6b6ad8(this,_0x3a598f(0x168)),_0x6b6ad8(this,_0x3a598f(0xf0)),_0x6b6ad8(this,'status'),_0x6b6ad8(this,_0x3a598f(0x15d)),(this[_0x3a598f(0x168)]=_0x415937,this[_0x3a598f(0xf0)]=_0x523b83,this[_0x3a598f(0x113)]=_0x5b21b4,this[_0x3a598f(0x15d)]=_0x499e9c);}};_0x400b0f(_0x6b5a0f,_0xc8ec0e(0x99));let _0x3480a7=_0x6b5a0f;const _0x5d4484=class _0x27a394{constructor(_0x12e2a9,_0x39872b,_0x551322){const _0x5e0ddc=_0xc8ec0e;_0x6b6ad8(this,_0x5e0ddc(0x126),0x0),(this[_0x5e0ddc(0x88)]=_0x12e2a9,this[_0x5e0ddc(0x115)]=_0x39872b,this[_0x5e0ddc(0x129)]=_0x551322);}};_0x400b0f(_0x5d4484,'HTTPProgress');let _0x534801=_0x5d4484;const _0x591e56=class _0x4c1832{constructor(_0x37675a,_0x1599c8,_0x38569e){const _0x20ccbb=_0xc8ec0e;this[_0x20ccbb(0xf0)]=_0x37675a,this['status']=_0x1599c8,this['statusText']=_0x38569e;}};_0x400b0f(_0x591e56,_0xc8ec0e(0xdc));let _0x2d13aa=_0x591e56;const _0x2aacfd=class _0x349b40{constructor({headers:_0xb99e8f,status:_0x453314,statusText:_0xbce633,error:_0x553213}){const _0x19a8d4=_0xc8ec0e;_0x6b6ad8(this,_0x19a8d4(0xf0)),_0x6b6ad8(this,_0x19a8d4(0x113)),_0x6b6ad8(this,_0x19a8d4(0x15d)),_0x6b6ad8(this,_0x19a8d4(0x151)),(this[_0x19a8d4(0xf0)]=_0xb99e8f,this[_0x19a8d4(0x113)]=_0x453314,this[_0x19a8d4(0x15d)]=_0xbce633,this[_0x19a8d4(0x151)]=_0x553213);}};_0x400b0f(_0x2aacfd,'HTTPResponseError');let _0x1f3f62=_0x2aacfd;const _0x4aaf66=0xc8,_0x5a33ff=0x12c;var _0x3b5a56=(_0x48cba7=>(_0x48cba7[_0x48cba7[_0xc8ec0e(0xd4)]=0x64]=_0xc8ec0e(0xd4),_0x48cba7[_0x48cba7[_0xc8ec0e(0x13d)]=0x65]=_0xc8ec0e(0x13d),_0x48cba7[_0x48cba7[_0xc8ec0e(0x89)]=0x66]=_0xc8ec0e(0x89),_0x48cba7[_0x48cba7[_0xc8ec0e(0xf5)]=0x67]=_0xc8ec0e(0xf5),_0x48cba7[_0x48cba7['Ok']=0xc8]='Ok',_0x48cba7[_0x48cba7[_0xc8ec0e(0x12e)]=0xc9]=_0xc8ec0e(0x12e),_0x48cba7[_0x48cba7[_0xc8ec0e(0xf4)]=0xca]=_0xc8ec0e(0xf4),_0x48cba7[_0x48cba7[_0xc8ec0e(0xdd)]=0xcb]=_0xc8ec0e(0xdd),_0x48cba7[_0x48cba7['NoContent']=0xcc]=_0xc8ec0e(0x8e),_0x48cba7[_0x48cba7['ResetContent']=0xcd]=_0xc8ec0e(0x149),_0x48cba7[_0x48cba7[_0xc8ec0e(0x9b)]=0xce]=_0xc8ec0e(0x9b),_0x48cba7[_0x48cba7[_0xc8ec0e(0x83)]=0xcf]='MultiStatus',_0x48cba7[_0x48cba7[_0xc8ec0e(0x103)]=0xd0]=_0xc8ec0e(0x103),_0x48cba7[_0x48cba7['ImUsed']=0xe2]=_0xc8ec0e(0xde),_0x48cba7[_0x48cba7[_0xc8ec0e(0xe1)]=0x12c]='MultipleChoices',_0x48cba7[_0x48cba7[_0xc8ec0e(0x144)]=0x12d]=_0xc8ec0e(0x144),_0x48cba7[_0x48cba7['Found']=0x12e]=_0xc8ec0e(0xba),_0x48cba7[_0x48cba7[_0xc8ec0e(0x14b)]=0x12f]=_0xc8ec0e(0x14b),_0x48cba7[_0x48cba7[_0xc8ec0e(0xb9)]=0x130]=_0xc8ec0e(0xb9),_0x48cba7[_0x48cba7['UseProxy']=0x131]='UseProxy',_0x48cba7[_0x48cba7[_0xc8ec0e(0xa7)]=0x132]=_0xc8ec0e(0xa7),_0x48cba7[_0x48cba7['TemporaryRedirect']=0x133]=_0xc8ec0e(0xc1),_0x48cba7[_0x48cba7[_0xc8ec0e(0x141)]=0x134]=_0xc8ec0e(0x141),_0x48cba7[_0x48cba7[_0xc8ec0e(0x7d)]=0x190]='BadRequest',_0x48cba7[_0x48cba7[_0xc8ec0e(0x160)]=0x191]=_0xc8ec0e(0x160),_0x48cba7[_0x48cba7['PaymentRequired']=0x192]='PaymentRequired',_0x48cba7[_0x48cba7[_0xc8ec0e(0xae)]=0x193]=_0xc8ec0e(0xae),_0x48cba7[_0x48cba7[_0xc8ec0e(0x167)]=0x194]=_0xc8ec0e(0x167),_0x48cba7[_0x48cba7['MethodNotAllowed']=0x195]='MethodNotAllowed',_0x48cba7[_0x48cba7[_0xc8ec0e(0x13a)]=0x196]=_0xc8ec0e(0x13a),_0x48cba7[_0x48cba7['ProxyAuthenticationRequired']=0x197]=_0xc8ec0e(0xcc),_0x48cba7[_0x48cba7['RequestTimeout']=0x198]=_0xc8ec0e(0x165),_0x48cba7[_0x48cba7[_0xc8ec0e(0xc8)]=0x199]=_0xc8ec0e(0xc8),_0x48cba7[_0x48cba7[_0xc8ec0e(0xc2)]=0x19a]=_0xc8ec0e(0xc2),_0x48cba7[_0x48cba7[_0xc8ec0e(0x8c)]=0x19b]='LengthRequired',_0x48cba7[_0x48cba7[_0xc8ec0e(0x97)]=0x19c]=_0xc8ec0e(0x97),_0x48cba7[_0x48cba7[_0xc8ec0e(0x16c)]=0x19d]=_0xc8ec0e(0x16c),_0x48cba7[_0x48cba7[_0xc8ec0e(0x15b)]=0x19e]=_0xc8ec0e(0x15b),_0x48cba7[_0x48cba7[_0xc8ec0e(0x80)]=0x19f]='UnsupportedMediaType',_0x48cba7[_0x48cba7['RangeNotSatisfiable']=0x1a0]=_0xc8ec0e(0xf6),_0x48cba7[_0x48cba7[_0xc8ec0e(0xfd)]=0x1a1]=_0xc8ec0e(0xfd),_0x48cba7[_0x48cba7[_0xc8ec0e(0xc4)]=0x1a2]=_0xc8ec0e(0xc4),_0x48cba7[_0x48cba7[_0xc8ec0e(0x15e)]=0x1a5]=_0xc8ec0e(0x15e),_0x48cba7[_0x48cba7[_0xc8ec0e(0xdf)]=0x1a6]=_0xc8ec0e(0xdf),_0x48cba7[_0x48cba7[_0xc8ec0e(0x11e)]=0x1a7]=_0xc8ec0e(0x11e),_0x48cba7[_0x48cba7['FailedDependency']=0x1a8]='FailedDependency',_0x48cba7[_0x48cba7[_0xc8ec0e(0x90)]=0x1a9]=_0xc8ec0e(0x90),_0x48cba7[_0x48cba7[_0xc8ec0e(0x131)]=0x1aa]=_0xc8ec0e(0x131),_0x48cba7[_0x48cba7[_0xc8ec0e(0x137)]=0x1ac]=_0xc8ec0e(0x137),_0x48cba7[_0x48cba7[_0xc8ec0e(0x12b)]=0x1ad]=_0xc8ec0e(0x12b),_0x48cba7[_0x48cba7['RequestHeaderFieldsTooLarge']=0x1af]=_0xc8ec0e(0xcd),_0x48cba7[_0x48cba7[_0xc8ec0e(0xca)]=0x1c3]=_0xc8ec0e(0xca),_0x48cba7[_0x48cba7['InternalServerError']=0x1f4]=_0xc8ec0e(0xc0),_0x48cba7[_0x48cba7['NotImplemented']=0x1f5]=_0xc8ec0e(0x123),_0x48cba7[_0x48cba7[_0xc8ec0e(0x7e)]=0x1f6]='BadGateway',_0x48cba7[_0x48cba7[_0xc8ec0e(0xd6)]=0x1f7]=_0xc8ec0e(0xd6),_0x48cba7[_0x48cba7[_0xc8ec0e(0xd2)]=0x1f8]='GatewayTimeout',_0x48cba7[_0x48cba7[_0xc8ec0e(0xff)]=0x1f9]='HttpVersionNotSupported',_0x48cba7[_0x48cba7[_0xc8ec0e(0x10d)]=0x1fa]='VariantAlsoNegotiates',_0x48cba7[_0x48cba7[_0xc8ec0e(0xab)]=0x1fb]=_0xc8ec0e(0xab),_0x48cba7[_0x48cba7[_0xc8ec0e(0x142)]=0x1fc]=_0xc8ec0e(0x142),_0x48cba7[_0x48cba7[_0xc8ec0e(0xd5)]=0x1fe]=_0xc8ec0e(0xd5),_0x48cba7[_0x48cba7[_0xc8ec0e(0xe0)]=0x1ff]=_0xc8ec0e(0xe0),_0x48cba7))(_0x3b5a56||{});const _0x42179a=class _0xfe2593{[_0xc8ec0e(0x166)](_0x4fa9e8){return new _0x197358['Observable'](_0x3c66e1=>{const _0x596c3b=_0xf2fe,_0x9e29db=new AbortController();return this[_0x596c3b(0x11b)](_0x4fa9e8,_0x3c66e1,_0x9e29db)[_0x596c3b(0x155)](()=>{},_0x59fb5c=>{const _0x2de2dc=_0x596c3b;_0x3c66e1[_0x2de2dc(0x151)](new _0x1f3f62({'error':_0x59fb5c}));}),()=>_0x9e29db[_0x596c3b(0x8b)]();});}async[_0xc8ec0e(0x11b)](_0x50143a,_0x2fcf20,_0x2ee64e){const _0x20ed13=_0xc8ec0e;var _0x5dc267,_0x246ecd;let _0x5ece4e;try{const _0x7393d0=this[_0x20ed13(0x127)](_0x50143a);_0x5ece4e=await fetch(_0x50143a[_0x20ed13(0x87)](),{'signal':_0x2ee64e['signal'],..._0x7393d0});}catch(_0x5a647d){_0x2fcf20[_0x20ed13(0x151)](new _0x1f3f62({'error':_0x5a647d,'status':(_0x5dc267=_0x5a647d[_0x20ed13(0x113)])!=null?_0x5dc267:0x0,'statusText':(_0x246ecd=_0x5a647d['statusText'])!=null?_0x246ecd:_0x20ed13(0xc3),'headers':_0x5a647d[_0x20ed13(0xf0)]}));return;}const _0x1a8ee9=new _0x137e8e(_0x5ece4e['headers']),_0x1bcfe5=_0x5ece4e[_0x20ed13(0x113)],_0x38e5fa=_0x5ece4e[_0x20ed13(0x15d)];let _0x25e8fd=null;_0x5ece4e[_0x20ed13(0x168)]&&(_0x25e8fd=await this[_0x20ed13(0xe6)](_0x50143a,_0x5ece4e,_0x2fcf20)),_0x1bcfe5>=_0x3b5a56['Ok']&&_0x1bcfe5<_0x3b5a56[_0x20ed13(0xe1)]?_0x2fcf20[_0x20ed13(0x84)](new _0x3480a7({'body':_0x25e8fd,'headers':_0x1a8ee9,'status':_0x1bcfe5,'statusText':_0x38e5fa})):_0x2fcf20[_0x20ed13(0x151)](new _0x1f3f62({'error':_0x25e8fd,'status':_0x1bcfe5,'statusText':_0x38e5fa,'headers':_0x1a8ee9})),_0x2fcf20[_0x20ed13(0x98)]();}async[_0xc8ec0e(0xe6)](_0x13ab0a,_0x407164,_0xb7e2fc){const _0x3e2201=_0xc8ec0e;var _0x226499,_0x2dc201;const _0x3087e5=[],_0x98c7ca=_0x407164['body'][_0x3e2201(0xb2)](),_0xb5a23=_0x407164[_0x3e2201(0xf0)][_0x3e2201(0x9f)]('content-length');let _0x464967=0x0;const _0xebbf47=(_0x226499=_0x13ab0a[_0x3e2201(0xfa)])==null?void 0x0:_0x226499[_0x3e2201(0x106)],_0x272bc6=_0x13ab0a[_0x3e2201(0x105)];let _0x36dbde,_0x560862;for(;;){const {done:_0x97454d,value:_0x455fc5}=await _0x98c7ca[_0x3e2201(0x15a)]();if(_0x97454d)break;_0x3087e5[_0x3e2201(0xe4)](_0x455fc5),_0x464967+=_0x455fc5['length'],_0xebbf47&&_0x272bc6==='text'&&(_0x36dbde=(_0x36dbde!=null?_0x36dbde:'')+(_0x560862!=null?_0x560862:_0x560862=new TextDecoder())['decode'](_0x455fc5,{'stream':!0x0}),_0xb7e2fc[_0x3e2201(0x84)](new _0x534801(_0xb5a23?Number[_0x3e2201(0x119)](_0xb5a23,0xa):void 0x0,_0x464967,_0x36dbde)));}const _0x199373=_0x239a8e(_0x3087e5,_0x464967);try{const _0x554302=(_0x2dc201=_0x407164['headers'][_0x3e2201(0x9f)](_0x3e2201(0x91)))!=null?_0x2dc201:'';return _0xe80b33(_0x13ab0a,_0x199373,_0x554302);}catch(_0x4aa9cc){return _0xb7e2fc[_0x3e2201(0x151)](new _0x1f3f62({'error':_0x4aa9cc,'status':_0x407164['status'],'statusText':_0x407164['statusText'],'headers':new _0x137e8e(_0x407164['headers'])})),null;}}[_0xc8ec0e(0x127)](_0x1de4f8){const _0x48ea54=_0xc8ec0e;return{'method':_0x1de4f8['method'],'headers':_0x1de4f8[_0x48ea54(0xb5)](),'body':_0x1de4f8[_0x48ea54(0x158)](),'credentials':_0x1de4f8['withCredentials']?_0x48ea54(0xe8):void 0x0};}};_0x400b0f(_0x42179a,_0xc8ec0e(0x8a));let _0x39b431=_0x42179a;function _0x239a8e(_0x3fc9a9,_0x3c5037){const _0x569a09=new Uint8Array(_0x3c5037);let _0x1ee5d2=0x0;for(const _0xd882c3 of _0x3fc9a9)_0x569a09['set'](_0xd882c3,_0x1ee5d2),_0x1ee5d2+=_0xd882c3['length'];return _0x569a09;}_0x400b0f(_0x239a8e,_0xc8ec0e(0xb8));const _0x5c93ab=/^\)\]\}',?\n/;function _0xe80b33(_0x5e68a3,_0x5c8744,_0x4abad1){const _0x48636f=_0xc8ec0e;switch(_0x5e68a3[_0x48636f(0x105)]){case'json':const _0x3f2ba7=new TextDecoder()[_0x48636f(0xf2)](_0x5c8744)[_0x48636f(0x135)](_0x5c93ab,'');return _0x3f2ba7===''?null:JSON['parse'](_0x3f2ba7);case'text':return new TextDecoder()[_0x48636f(0xf2)](_0x5c8744);case'blob':return new Blob([_0x5c8744],{'type':_0x4abad1});case _0x48636f(0xce):return _0x5c8744[_0x48636f(0x159)];default:throw new Error(_0x48636f(0x117)+_0x5e68a3['responseType']+'.');}}_0x400b0f(_0xe80b33,'deserialize');const _0x51b5aa=class _0x354d50{[_0xc8ec0e(0x166)](_0x1755df){const _0x432280=_0xc8ec0e;return new _0x197358[(_0x432280(0x138))](_0x5201fa=>{const _0xb5be39=_0x432280,_0x25d220=new XMLHttpRequest();_0x25d220['open'](_0x1755df['method'],_0x1755df['getUrlWithParams']()),_0x1755df[_0xb5be39(0x109)]&&(_0x25d220[_0xb5be39(0x109)]=!0x0),_0x1755df[_0xb5be39(0xf0)][_0xb5be39(0xe9)]((_0x46fb22,_0xe8bf82)=>_0x25d220[_0xb5be39(0xb0)](_0x46fb22,_0xe8bf82[_0xb5be39(0xe3)](','))),_0x1755df['headers']['has'](_0xb5be39(0x164))||_0x25d220[_0xb5be39(0xb0)](_0xb5be39(0x164),_0xb5be39(0x101)),_0x1755df[_0xb5be39(0xf0)][_0xb5be39(0xe7)](_0xb5be39(0xec))||_0x25d220[_0xb5be39(0xb0)](_0xb5be39(0xec),_0xb5be39(0xbb));const _0x8527d1=_0x400b0f(()=>{const _0x47c703=_0xb5be39,_0x40c35f=_0x25d220[_0x47c703(0x15d)]||'OK',_0x5c77ac=new _0x137e8e(_0x25d220[_0x47c703(0x134)]());return new _0x2d13aa(_0x5c77ac,_0x25d220[_0x47c703(0x113)],_0x40c35f);},_0xb5be39(0x8f)),_0x50d8eb=_0x400b0f(()=>{const _0xab4db8=_0xb5be39,{headers:_0x3c81af,statusText:_0x207ef1,status:_0xbc92fa}=_0x8527d1(),{responseType:_0x471898}=_0x1755df;let _0x994e30=null,_0x2c8975=null;_0xbc92fa!==_0x3b5a56['NoContent']&&(_0x994e30=typeof _0x25d220[_0xab4db8(0x14c)]>'u'?_0x25d220[_0xab4db8(0x163)]:_0x25d220['response']);let _0x224d2b=_0xbc92fa>=_0x4aaf66&&_0xbc92fa<_0x5a33ff;if(_0x471898===_0xab4db8(0x12f)&&typeof _0x994e30=='string'){const _0x5c99ec=_0x994e30;try{_0x994e30=_0x994e30?JSON[_0xab4db8(0x152)](_0x994e30):null;}catch(_0x5ae4e0){_0x224d2b=!0x1,_0x994e30=_0x5c99ec,_0x2c8975=_0x5ae4e0;}}_0x224d2b?_0x5201fa[_0xab4db8(0x84)](new _0x3480a7({'body':_0x994e30,'headers':_0x3c81af,'status':_0xbc92fa,'statusText':_0x207ef1})):_0x5201fa[_0xab4db8(0x151)](new _0x1f3f62({'error':_0x2c8975,'headers':_0x3c81af,'status':_0xbc92fa,'statusText':_0x207ef1}));},_0xb5be39(0x95)),_0x459c59=_0x400b0f(_0xce0b63=>{const _0x4cd7c4=_0xb5be39,_0x289c97=new _0x1f3f62({'error':_0xce0b63,'status':_0x25d220[_0x4cd7c4(0x113)]||0x0,'statusText':_0x25d220[_0x4cd7c4(0x15d)]||_0x4cd7c4(0xc3),'headers':_0x8527d1()[_0x4cd7c4(0xf0)]});_0x5201fa[_0x4cd7c4(0x151)](_0x289c97);},'onErrorHandler');_0x25d220[_0xb5be39(0x147)](_0xb5be39(0x143),_0x50d8eb),_0x25d220['addEventListener'](_0xb5be39(0x151),_0x459c59),_0x25d220[_0xb5be39(0x147)]('abort',_0x459c59),_0x25d220[_0xb5be39(0x147)](_0xb5be39(0x7c),_0x459c59);const _0x413884=_0x1755df[_0xb5be39(0x158)]();return _0x25d220[_0xb5be39(0x166)](_0x413884),()=>{const _0x29edb7=_0xb5be39;_0x25d220['readyState']!==_0x25d220[_0x29edb7(0xe5)]&&_0x25d220[_0x29edb7(0x8b)](),_0x25d220[_0x29edb7(0xa6)](_0x29edb7(0x143),_0x50d8eb),_0x25d220[_0x29edb7(0xa6)](_0x29edb7(0x151),_0x459c59),_0x25d220[_0x29edb7(0xa6)](_0x29edb7(0x8b),_0x459c59),_0x25d220[_0x29edb7(0xa6)](_0x29edb7(0x7c),_0x459c59);};});}};_0x400b0f(_0x51b5aa,_0xc8ec0e(0xc5));let _0x2bab6b=_0x51b5aa;const _0x84f2a8=_0x7576f2[_0xc8ec0e(0x14e)](_0xc8ec0e(0xbf)),_0x4e8051=class _0x18ed6a extends _0x7576f2['Disposable']{[_0xc8ec0e(0x10e)](_0x15d353){const _0x5d40f9=_0xc8ec0e;try{const _0x59cb04=new WebSocket(_0x15d353),_0x418498=new _0x7576f2[(_0x5d40f9(0x92))]();return{'URL':_0x15d353,'close':_0x400b0f((_0x3896a6,_0xa7a74a)=>{const _0x4854f9=_0x5d40f9;_0x59cb04[_0x4854f9(0x13b)](_0x3896a6,_0xa7a74a),_0x418498[_0x4854f9(0xa4)]();},_0x5d40f9(0x13b)),'send':_0x400b0f(_0x1b9e76=>{const _0x5f043f=_0x5d40f9;_0x59cb04[_0x5f043f(0x166)](_0x1b9e76);},_0x5d40f9(0x166)),'open$':new _0x197358[(_0x5d40f9(0x138))](_0x153d4b=>{const _0x6951d4=_0x5d40f9,_0x14d6d4=_0x400b0f(_0x510f29=>_0x153d4b[_0x6951d4(0x84)](_0x510f29),'callback');_0x59cb04['addEventListener'](_0x6951d4(0x14f),_0x14d6d4),_0x418498['add'](_0x7576f2[_0x6951d4(0xf7)](()=>_0x59cb04[_0x6951d4(0xa6)](_0x6951d4(0x14f),_0x14d6d4)));})[_0x5d40f9(0xb1)](_0x287593[_0x5d40f9(0x154)]()),'close$':new _0x197358[(_0x5d40f9(0x138))](_0x324ca9=>{const _0x219ce8=_0x5d40f9,_0xbd3961=_0x400b0f(_0x1cb811=>_0x324ca9['next'](_0x1cb811),_0x219ce8(0xb7));_0x59cb04['addEventListener'](_0x219ce8(0x13b),_0xbd3961),_0x418498[_0x219ce8(0x104)](_0x7576f2[_0x219ce8(0xf7)](()=>_0x59cb04[_0x219ce8(0xa6)](_0x219ce8(0x13b),_0xbd3961)));})[_0x5d40f9(0xb1)](_0x287593[_0x5d40f9(0x154)]()),'error$':new _0x197358['Observable'](_0x59afe6=>{const _0x5ab701=_0x5d40f9,_0x54ace5=_0x400b0f(_0x39300c=>_0x59afe6[_0x5ab701(0x84)](_0x39300c),_0x5ab701(0xb7));_0x59cb04[_0x5ab701(0x147)]('error',_0x54ace5),_0x418498[_0x5ab701(0x104)](_0x7576f2['toDisposable'](()=>_0x59cb04[_0x5ab701(0xa6)](_0x5ab701(0x151),_0x54ace5)));})[_0x5d40f9(0xb1)](_0x287593['share']()),'message$':new _0x197358[(_0x5d40f9(0x138))](_0x2fba99=>{const _0x103998=_0x5d40f9,_0x32de45=_0x400b0f(_0x404e70=>_0x2fba99[_0x103998(0x84)](_0x404e70),_0x103998(0xb7));_0x59cb04[_0x103998(0x147)](_0x103998(0xac),_0x32de45),_0x418498[_0x103998(0x104)](_0x7576f2[_0x103998(0xf7)](()=>_0x59cb04[_0x103998(0xa6)](_0x103998(0xac),_0x32de45)));})[_0x5d40f9(0xb1)](_0x287593['share']())};}catch(_0x1d7211){return console['error'](_0x1d7211),null;}}};_0x400b0f(_0x4e8051,'WebSocketService');let _0x28c1b6=_0x4e8051;const _0x1f5188=0x3,_0x48c9b4=0x3e8,_0x1ddd4e=_0x400b0f(_0xe5daa5=>{const _0x236d4d=_0xc8ec0e;var _0xb4c6c9,_0x514f0a;const _0x170c21=(_0xb4c6c9=_0xe5daa5==null?void 0x0:_0xe5daa5['maxRetryAttempts'])!=null?_0xb4c6c9:_0x1f5188,_0x4b6a9a=(_0x514f0a=_0xe5daa5==null?void 0x0:_0xe5daa5[_0x236d4d(0xc6)])!=null?_0x514f0a:_0x48c9b4;return(_0x467e44,_0xe954fe)=>_0xe954fe(_0x467e44)[_0x236d4d(0xb1)](_0x287593[_0x236d4d(0x124)]({'delay':_0x4b6a9a,'count':_0x170c21}));},_0xc8ec0e(0xa8)),_0x5b2fe2=_0x400b0f(_0x5b07b4=>{const _0x2bf48b=_0xc8ec0e,_0x8e86e3=[],_0x40e3ad=new Set(),_0x18f466=_0x400b0f(()=>{const _0x16ee5f=_0xf2fe;var _0x3ef81f;for(;_0x40e3ad['size']<((_0x3ef81f=_0x5b07b4==null?void 0x0:_0x5b07b4['maxParallel'])!=null?_0x3ef81f:0x1)&&_0x8e86e3[_0x16ee5f(0xb6)]>0x0;){const _0x5960ce=_0x8e86e3[_0x16ee5f(0xfe)]();_0x40e3ad[_0x16ee5f(0x104)](_0x5960ce),_0x5960ce();}},_0x2bf48b(0x81));return(_0x5373cf,_0x378c24)=>new _0x197358[(_0x2bf48b(0x138))](_0x488713=>{const _0x63477d=_0x2bf48b,_0xdace6b=_0x400b0f(()=>_0x378c24(_0x5373cf)[_0x63477d(0xc9)]({'next':_0x400b0f(_0x52b624=>_0x488713['next'](_0x52b624),'next'),'error':_0x400b0f(_0x3f28ed=>_0x488713['error'](_0x3f28ed),_0x63477d(0x151)),'complete':_0x400b0f(()=>_0x488713['complete'](),_0x63477d(0x98))}),_0x63477d(0x94)),_0x37fe79=_0x400b0f(()=>{const _0x55dc58=_0x63477d;_0x40e3ad[_0x55dc58(0x10a)](_0xdace6b),_0x7576f2[_0x55dc58(0x12d)](_0x8e86e3,_0xdace6b),_0x18f466();},_0x63477d(0x116));return _0x8e86e3[_0x63477d(0xe4)](_0xdace6b),_0x18f466(),_0x37fe79;});},_0xc8ec0e(0x16a)),_0xa3cd91=_0x400b0f(_0x10f937=>{const _0x394d0b=_0xc8ec0e,{errorStatusCodes:_0x14e850,onAuthError:_0x1f3b49}=_0x10f937;return _0x400b0f((_0x4d4751,_0x4bc8c6)=>_0x4bc8c6(_0x4d4751)[_0x394d0b(0xb1)](_0x197358[_0x394d0b(0xcf)](_0x47b637=>(_0x47b637 instanceof _0x1f3f62&&_0x14e850[_0x394d0b(0x132)](_0x2e2178=>_0x2e2178===_0x47b637[_0x394d0b(0x113)])&&_0x1f3b49(),_0x197358[_0x394d0b(0x12c)](()=>_0x47b637)))),_0x394d0b(0x11f));},_0xc8ec0e(0x111)),_0x39d5a2=_0x400b0f((_0x2dfb1c=0x12c)=>{let _0x3a7876=_0x400b0f(()=>{},'noop');return _0x127f0e=>new Promise(_0x2dbea3=>{const _0x4d161f=_0xf2fe;_0x3a7876();const _0xdb16dd=setTimeout(()=>{_0x2dbea3(!0x0);},_0x2dfb1c);_0x3a7876=_0x400b0f(()=>{clearTimeout(_0xdb16dd),_0x2dbea3(!0x1);},_0x4d161f(0x10b));});},_0xc8ec0e(0xf9)),_0x3b3969=_0x400b0f(()=>(_0x4be674,_0x112996)=>_0x112996[_0xc8ec0e(0x136)](_0x1bf38b=>({'config':_0x1bf38b,'result':_0x4be674})),_0xc8ec0e(0xfb)),_0x18eddc=_0x400b0f((_0x1fe5a5,_0x4b8aa7={})=>{const _0x1124b7=_0xc8ec0e,{isMatch:_0x51065e,getParamsFromRequest:_0x4d2db2,mergeParamsToRequest:_0x269693}=_0x1fe5a5,{fetchCheck:fetchCheck=_0x39d5a2(0x12c),distributeResult:distributeResult=_0x3b3969()}=_0x4b8aa7,_0x21ca8b=[],_0x36a2e5=_0x400b0f(_0x1e4a10=>_0x1e4a10[_0x1124b7(0x136)](_0x306034=>_0x306034['config']),_0x1124b7(0x108));return(_0x5764eb,_0x1dd519)=>_0x51065e(_0x5764eb)?new _0x197358['Observable'](_0x264816=>{const _0x5b2b5e=_0x1124b7,_0x387000=_0x4d2db2(_0x5764eb);_0x21ca8b[_0x5b2b5e(0xe4)]({'next':_0x400b0f(_0x8b6f28=>_0x264816[_0x5b2b5e(0x84)](_0x8b6f28),'next'),'error':_0x400b0f(_0x32cdb3=>_0x264816[_0x5b2b5e(0x151)](_0x32cdb3),_0x5b2b5e(0x151)),'config':_0x387000});const _0x12ab20=_0x36a2e5(_0x21ca8b);fetchCheck(_0x5764eb)['then'](_0x14fd28=>{const _0x4aaacc=_0x5b2b5e;if(_0x14fd28){const _0xff8232=[];_0x12ab20[_0x4aaacc(0xe9)](_0x555b44=>{const _0x1d2ff6=_0x4aaacc,_0x33b68c=_0x21ca8b['findIndex'](_0x27e9ca=>_0x27e9ca['config']===_0x555b44);if(_0x33b68c>=0x0){const [_0x3f5a2a]=_0x21ca8b[_0x1d2ff6(0x10c)](_0x33b68c,0x1);_0xff8232[_0x1d2ff6(0xe4)](_0x3f5a2a);}}),_0x1dd519(_0x269693(_0x12ab20,_0x5764eb))[_0x4aaacc(0xc9)]({'next':_0x400b0f(_0x5b89f5=>{const _0x32438a=_0x4aaacc;if(_0x5b89f5[_0x32438a(0x126)]===_0x4051a4[_0x32438a(0xad)]){const _0x5dcf5d=_0x5b89f5[_0x32438a(0x168)],_0x3a4560=distributeResult(_0x5dcf5d,_0x12ab20);_0xff8232[_0x32438a(0xe9)](_0x15cbbc=>{const _0x43f7c0=_0x32438a,_0x4f5ccf=_0x3a4560[_0x43f7c0(0xe2)](_0x47ec45=>_0x47ec45['config']===_0x15cbbc[_0x43f7c0(0x10f)]);if(_0x4f5ccf){const _0x39b7b1=new _0x3480a7({'body':_0x4f5ccf[_0x43f7c0(0xa3)],'headers':_0x5b89f5[_0x43f7c0(0xf0)],'status':_0x5b89f5[_0x43f7c0(0x113)],'statusText':_0x5b89f5['statusText']});_0x15cbbc['next'](_0x39b7b1);}else _0x15cbbc[_0x43f7c0(0x151)](_0x43f7c0(0xb3));});}},_0x4aaacc(0x84)),'complete':_0x400b0f(()=>_0x264816[_0x4aaacc(0x98)](),_0x4aaacc(0x98)),'error':_0x400b0f(_0x1de8d2=>_0x264816['error'](_0x1de8d2),_0x4aaacc(0x151))});}});}):_0x1dd519(_0x5764eb);},_0xc8ec0e(0x140));_0xe745b5[_0xc8ec0e(0x111)]=_0xa3cd91,_0xe745b5[_0xc8ec0e(0x8a)]=_0x39b431,_0xe745b5[_0xc8ec0e(0xbd)]=_0x4051a4,_0xe745b5[_0xc8ec0e(0x82)]=_0x137e8e,_0xe745b5[_0xc8ec0e(0x107)]=_0x534801,_0xe745b5[_0xc8ec0e(0x96)]=_0x4b184e,_0xe745b5[_0xc8ec0e(0x99)]=_0x3480a7,_0xe745b5[_0xc8ec0e(0xd8)]=_0x1f3f62,_0xe745b5[_0xc8ec0e(0xcb)]=_0x3b5a56,_0xe745b5[_0xc8ec0e(0x157)]=_0x1c231c,_0xe745b5[_0xc8ec0e(0xfc)]=_0x84f2a8,_0xe745b5[_0xc8ec0e(0x140)]=_0x18eddc,_0xe745b5[_0xc8ec0e(0xdc)]=_0x2d13aa,_0xe745b5[_0xc8ec0e(0xa8)]=_0x1ddd4e,_0xe745b5['ThresholdInterceptorFactory']=_0x5b2fe2,_0xe745b5['WebSocketService']=_0x28c1b6,_0xe745b5[_0xc8ec0e(0xc5)]=_0x2bab6b,Object['defineProperty'](_0xe745b5,Symbol[_0xc8ec0e(0x8d)],{'value':_0xc8ec0e(0x86)});}));function _0xf2fe(_0x4bfc57,_0x4c095d){const _0x165be2=_0x165b();return _0xf2fe=function(_0xf2fe49,_0xc48fc4){_0xf2fe49=_0xf2fe49-0x7c;let _0x460379=_0x165be2[_0xf2fe49];return _0x460379;},_0xf2fe(_0x4bfc57,_0x4c095d);}function _0x165b(){const _0x513445=['result','dispose','150331KavrrX','removeEventListener','Unused','RetryInterceptorFactory','120hsfIFS','set','InsufficientStorage','message','Response','Forbidden','HTTPParams','setRequestHeader','pipe','getReader','batch\x20error','HTTPService','getHeadersInit','length','callback','mergeChunks','NotModified','Found','application/json;charset=UTF-8','function','HTTPEventType','_handleHeadersString','univer.socket','InternalServerError','TemporaryRedirect','Gone','Unknown\x20Error','ImATeapot','XHRHTTPImplementation','delayInterval','_http','Conflict','subscribe','UnavailableForLegalReasons','HTTPStatusCode','ProxyAuthenticationRequired','RequestHeaderFieldsTooLarge','arraybuffer','catchError','toLowerCase','split','GatewayTimeout','__decorateParam','Continue','NotExtended','ServiceUnavailable','_runInterceptorsAndImplementation','HTTPResponseError','priority','1473598ScyFCX','Disposable','ResponseHeader','NonAuthoritativeInformation','ImUsed','UnprocessableEntity','NetworkAuthenticationRequired','MultipleChoices','find','join','push','DONE','_readBody','has','include','forEach','interceptor','post','Content-Type','UniverCore','uid','concatMap','headers','params','decode','getOwnPropertyDescriptor','Accepted','EarlyHints','RangeNotSatisfiable','toDisposable','sort','createDefaultFetchCheck','requestParams','createDistributeResult','ISocketService','ExpectationFailed','shift','HttpVersionNotSupported','DELETE','application/json,\x20text/plain,\x20*/*','reduceRight','AlreadyReported','add','responseType','reportProgress','HTTPProgress','getPlainList','withCredentials','delete','cancel','splice','VariantAlsoNegotiates','createSocket','config','_handleHeadersConstructorProps','AuthInterceptorFactory','_setHeader','status','keys','loaded','teardown','[FetchHTTPImplementation]:\x20unknown\x20response\x20type:\x20','url','parseInt','name','_send','134595lvjFlL','includes','Locked','authInterceptor','exports','getSSE','operators','NotImplemented','retry','__decorateClass','type','_parseFetchParamsFromRequest','application/json','partialText','6327020gikyyB','TooManyRequests','throwError','remove','Created','json','registerHTTPInterceptor','UpgradeRequired','some','783Fzjkfg','getAllResponseHeaders','replace','map','PreconditionRequired','Observable','_interceptors','NotAcceptable','close','toString','SwitchingProtocols','_request','put','MergeInterceptorFactory','PermanentRedirect','LoopDetected','load','MovedPermanently','symbol','@univerjs/core','addEventListener','POST','ResetContent','_pipe','SeeOther','response','8pYekAw','createIdentifier','open','method','error','parse','entries','share','then','object','IHTTPImplementation','getBody','buffer','read','UriTooLong','firstValueFrom','statusText','MisdirectedRequest','accept','Unauthorized','676kjSURH','rxjs/operators','responseText','Accept','RequestTimeout','send','NotFound','body','GET','ThresholdInterceptorFactory','DownloadProgress','PayloadTooLarge','timeout','BadRequest','BadGateway','indexOf','UnsupportedMediaType','tick','HTTPHeaders','MultiStatus','next','16890MUgMOV','Module','getUrlWithParams','total','Processing','FetchHTTPImplementation','abort','LengthRequired','toStringTag','NoContent','buildResponseHeader','TooEarly','content-type','DisposableCollection','defineProperty','handler','onLoadHandler','HTTPRequest','PreconditionFailed','complete','HTTPResponse','742086KACVLe','PartialContent','toHeadersInit','_headers','_handleHeaders','get','rxjs','PATCH','UniverNetwork'];_0x165b=function(){return _0x513445;};return _0x165b();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs/network",
3
- "version": "0.3.0-alpha.0",
3
+ "version": "0.3.0-nightly.202410101606",
4
4
  "private": false,
5
5
  "author": "DreamNum <developer@univer.ai>",
6
6
  "license": "Apache-2.0",
@@ -46,17 +46,17 @@
46
46
  ],
47
47
  "peerDependencies": {
48
48
  "rxjs": ">=7.0.0",
49
- "@univerjs/core": "0.3.0-alpha.0"
49
+ "@univerjs/core": "0.3.0-nightly.202410101606"
50
50
  },
51
51
  "dependencies": {
52
- "@univerjs/core": "0.3.0-alpha.0"
52
+ "@univerjs/core": "0.3.0-nightly.202410101606"
53
53
  },
54
54
  "devDependencies": {
55
55
  "rxjs": "^7.8.1",
56
56
  "typescript": "^5.6.2",
57
57
  "vite": "^5.4.8",
58
58
  "vitest": "^2.1.1",
59
- "@univerjs-infra/shared": "0.3.0-alpha.0"
59
+ "@univerjs-infra/shared": "0.3.0"
60
60
  },
61
61
  "univerSpace": {
62
62
  ".": {
@@ -76,7 +76,6 @@
76
76
  "test:watch": "vitest",
77
77
  "coverage": "vitest run --coverage",
78
78
  "lint:types": "tsc --noEmit",
79
- "build": "tsc && vite build",
80
- "sync:cnpm": "cnpm sync"
79
+ "build": "tsc && vite build"
81
80
  }
82
81
  }
package/LICENSE DELETED
@@ -1,176 +0,0 @@
1
- Apache License
2
- Version 2.0, January 2004
3
- http://www.apache.org/licenses/
4
-
5
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
-
7
- 1. Definitions.
8
-
9
- "License" shall mean the terms and conditions for use, reproduction,
10
- and distribution as defined by Sections 1 through 9 of this document.
11
-
12
- "Licensor" shall mean the copyright owner or entity authorized by
13
- the copyright owner that is granting the License.
14
-
15
- "Legal Entity" shall mean the union of the acting entity and all
16
- other entities that control, are controlled by, or are under common
17
- control with that entity. For the purposes of this definition,
18
- "control" means (i) the power, direct or indirect, to cause the
19
- direction or management of such entity, whether by contract or
20
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
- outstanding shares, or (iii) beneficial ownership of such entity.
22
-
23
- "You" (or "Your") shall mean an individual or Legal Entity
24
- exercising permissions granted by this License.
25
-
26
- "Source" form shall mean the preferred form for making modifications,
27
- including but not limited to software source code, documentation
28
- source, and configuration files.
29
-
30
- "Object" form shall mean any form resulting from mechanical
31
- transformation or translation of a Source form, including but
32
- not limited to compiled object code, generated documentation,
33
- and conversions to other media types.
34
-
35
- "Work" shall mean the work of authorship, whether in Source or
36
- Object form, made available under the License, as indicated by a
37
- copyright notice that is included in or attached to the work
38
- (an example is provided in the Appendix below).
39
-
40
- "Derivative Works" shall mean any work, whether in Source or Object
41
- form, that is based on (or derived from) the Work and for which the
42
- editorial revisions, annotations, elaborations, or other modifications
43
- represent, as a whole, an original work of authorship. For the purposes
44
- of this License, Derivative Works shall not include works that remain
45
- separable from, or merely link (or bind by name) to the interfaces of,
46
- the Work and Derivative Works thereof.
47
-
48
- "Contribution" shall mean any work of authorship, including
49
- the original version of the Work and any modifications or additions
50
- to that Work or Derivative Works thereof, that is intentionally
51
- submitted to Licensor for inclusion in the Work by the copyright owner
52
- or by an individual or Legal Entity authorized to submit on behalf of
53
- the copyright owner. For the purposes of this definition, "submitted"
54
- means any form of electronic, verbal, or written communication sent
55
- to the Licensor or its representatives, including but not limited to
56
- communication on electronic mailing lists, source code control systems,
57
- and issue tracking systems that are managed by, or on behalf of, the
58
- Licensor for the purpose of discussing and improving the Work, but
59
- excluding communication that is conspicuously marked or otherwise
60
- designated in writing by the copyright owner as "Not a Contribution."
61
-
62
- "Contributor" shall mean Licensor and any individual or Legal Entity
63
- on behalf of whom a Contribution has been received by Licensor and
64
- subsequently incorporated within the Work.
65
-
66
- 2. Grant of Copyright License. Subject to the terms and conditions of
67
- this License, each Contributor hereby grants to You a perpetual,
68
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
- copyright license to reproduce, prepare Derivative Works of,
70
- publicly display, publicly perform, sublicense, and distribute the
71
- Work and such Derivative Works in Source or Object form.
72
-
73
- 3. Grant of Patent License. Subject to the terms and conditions of
74
- this License, each Contributor hereby grants to You a perpetual,
75
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
- (except as stated in this section) patent license to make, have made,
77
- use, offer to sell, sell, import, and otherwise transfer the Work,
78
- where such license applies only to those patent claims licensable
79
- by such Contributor that are necessarily infringed by their
80
- Contribution(s) alone or by combination of their Contribution(s)
81
- with the Work to which such Contribution(s) was submitted. If You
82
- institute patent litigation against any entity (including a
83
- cross-claim or counterclaim in a lawsuit) alleging that the Work
84
- or a Contribution incorporated within the Work constitutes direct
85
- or contributory patent infringement, then any patent licenses
86
- granted to You under this License for that Work shall terminate
87
- as of the date such litigation is filed.
88
-
89
- 4. Redistribution. You may reproduce and distribute copies of the
90
- Work or Derivative Works thereof in any medium, with or without
91
- modifications, and in Source or Object form, provided that You
92
- meet the following conditions:
93
-
94
- (a) You must give any other recipients of the Work or
95
- Derivative Works a copy of this License; and
96
-
97
- (b) You must cause any modified files to carry prominent notices
98
- stating that You changed the files; and
99
-
100
- (c) You must retain, in the Source form of any Derivative Works
101
- that You distribute, all copyright, patent, trademark, and
102
- attribution notices from the Source form of the Work,
103
- excluding those notices that do not pertain to any part of
104
- the Derivative Works; and
105
-
106
- (d) If the Work includes a "NOTICE" text file as part of its
107
- distribution, then any Derivative Works that You distribute must
108
- include a readable copy of the attribution notices contained
109
- within such NOTICE file, excluding those notices that do not
110
- pertain to any part of the Derivative Works, in at least one
111
- of the following places: within a NOTICE text file distributed
112
- as part of the Derivative Works; within the Source form or
113
- documentation, if provided along with the Derivative Works; or,
114
- within a display generated by the Derivative Works, if and
115
- wherever such third-party notices normally appear. The contents
116
- of the NOTICE file are for informational purposes only and
117
- do not modify the License. You may add Your own attribution
118
- notices within Derivative Works that You distribute, alongside
119
- or as an addendum to the NOTICE text from the Work, provided
120
- that such additional attribution notices cannot be construed
121
- as modifying the License.
122
-
123
- You may add Your own copyright statement to Your modifications and
124
- may provide additional or different license terms and conditions
125
- for use, reproduction, or distribution of Your modifications, or
126
- for any such Derivative Works as a whole, provided Your use,
127
- reproduction, and distribution of the Work otherwise complies with
128
- the conditions stated in this License.
129
-
130
- 5. Submission of Contributions. Unless You explicitly state otherwise,
131
- any Contribution intentionally submitted for inclusion in the Work
132
- by You to the Licensor shall be under the terms and conditions of
133
- this License, without any additional terms or conditions.
134
- Notwithstanding the above, nothing herein shall supersede or modify
135
- the terms of any separate license agreement you may have executed
136
- with Licensor regarding such Contributions.
137
-
138
- 6. Trademarks. This License does not grant permission to use the trade
139
- names, trademarks, service marks, or product names of the Licensor,
140
- except as required for reasonable and customary use in describing the
141
- origin of the Work and reproducing the content of the NOTICE file.
142
-
143
- 7. Disclaimer of Warranty. Unless required by applicable law or
144
- agreed to in writing, Licensor provides the Work (and each
145
- Contributor provides its Contributions) on an "AS IS" BASIS,
146
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
- implied, including, without limitation, any warranties or conditions
148
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
- PARTICULAR PURPOSE. You are solely responsible for determining the
150
- appropriateness of using or redistributing the Work and assume any
151
- risks associated with Your exercise of permissions under this License.
152
-
153
- 8. Limitation of Liability. In no event and under no legal theory,
154
- whether in tort (including negligence), contract, or otherwise,
155
- unless required by applicable law (such as deliberate and grossly
156
- negligent acts) or agreed to in writing, shall any Contributor be
157
- liable to You for damages, including any direct, indirect, special,
158
- incidental, or consequential damages of any character arising as a
159
- result of this License or out of the use or inability to use the
160
- Work (including but not limited to damages for loss of goodwill,
161
- work stoppage, computer failure or malfunction, or any and all
162
- other commercial damages or losses), even if such Contributor
163
- has been advised of the possibility of such damages.
164
-
165
- 9. Accepting Warranty or Additional Liability. While redistributing
166
- the Work or Derivative Works thereof, You may choose to offer,
167
- and charge a fee for, acceptance of support, warranty, indemnity,
168
- or other liability obligations and/or rights consistent with this
169
- License. However, in accepting such obligations, You may act only
170
- on Your own behalf and on Your sole responsibility, not on behalf
171
- of any other Contributor, and only if You agree to indemnify,
172
- defend, and hold each Contributor harmless for any liability
173
- incurred by, or claims asserted against, such Contributor by reason
174
- of your accepting any such warranty or additional liability.
175
-
176
- END OF TERMS AND CONDITIONS