var doipFetchers=function(e){"use strict";function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var r={exports:{}},n=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n1)for(var r=1;r=0)return;a[n]="set-cookie"===n?(a[n]?a[n]:[]).concat([o]):a[n]?a[n]+", "+o:o}})),a):a}}function Ee(){if(ie)return oe;ie=1;var e=p;return oe=e.isStandardBrowserEnv()?function(){var t,r=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var t=e;return r&&(n.setAttribute("href",t),t=n.href),n.setAttribute("href",t),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=o(window.location.href),function(r){var n=e.isString(r)?o(r):r;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}}function Te(){if(se)return ae;function e(e){this.message=e}return se=1,e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,ae=e}function je(){if(ce)return ue;ce=1;var e=p,t=ge(),r=ye(),n=v,o=_e(),i=xe(),a=Ee(),s=ve(),u=Se(),c=Te();return ue=function(l){return new Promise((function(f,d){var p,h=l.data,m=l.headers,v=l.responseType;function g(){l.cancelToken&&l.cancelToken.unsubscribe(p),l.signal&&l.signal.removeEventListener("abort",p)}e.isFormData(h)&&delete m["Content-Type"];var y=new XMLHttpRequest;if(l.auth){var w=l.auth.username||"",b=l.auth.password?unescape(encodeURIComponent(l.auth.password)):"";m.Authorization="Basic "+btoa(w+":"+b)}var _=o(l.baseURL,l.url);function x(){if(y){var e="getAllResponseHeaders"in y?i(y.getAllResponseHeaders()):null,r={data:v&&"text"!==v&&"json"!==v?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:e,config:l,request:y};t((function(e){f(e),g()}),(function(e){d(e),g()}),r),y=null}}if(y.open(l.method.toUpperCase(),n(_,l.params,l.paramsSerializer),!0),y.timeout=l.timeout,"onloadend"in y?y.onloadend=x:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(x)},y.onabort=function(){y&&(d(s("Request aborted",l,"ECONNABORTED",y)),y=null)},y.onerror=function(){d(s("Network Error",l,null,y)),y=null},y.ontimeout=function(){var e=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded",t=l.transitional||u.transitional;l.timeoutErrorMessage&&(e=l.timeoutErrorMessage),d(s(e,l,t.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",y)),y=null},e.isStandardBrowserEnv()){var E=(l.withCredentials||a(_))&&l.xsrfCookieName?r.read(l.xsrfCookieName):void 0;E&&(m[l.xsrfHeaderName]=E)}"setRequestHeader"in y&&e.forEach(m,(function(e,t){void 0===h&&"content-type"===t.toLowerCase()?delete m[t]:y.setRequestHeader(t,e)})),e.isUndefined(l.withCredentials)||(y.withCredentials=!!l.withCredentials),v&&"json"!==v&&(y.responseType=l.responseType),"function"==typeof l.onDownloadProgress&&y.addEventListener("progress",l.onDownloadProgress),"function"==typeof l.onUploadProgress&&y.upload&&y.upload.addEventListener("progress",l.onUploadProgress),(l.cancelToken||l.signal)&&(p=function(e){y&&(d(!e||e&&e.type?new c("canceled"):e),y.abort(),y=null)},l.cancelToken&&l.cancelToken.subscribe(p),l.signal&&(l.signal.aborted?p():l.signal.addEventListener("abort",p))),h||(h=null),y.send(h)}))},ue}function Se(){if(fe)return le;fe=1;var e=p,t=he,r=me,n={"Content-Type":"application/x-www-form-urlencoded"};function o(t,r){!e.isUndefined(t)&&e.isUndefined(t["Content-Type"])&&(t["Content-Type"]=r)}var i,a={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==de&&"[object process]"===Object.prototype.toString.call(de))&&(i=je()),i),transformRequest:[function(r,n){return t(n,"Accept"),t(n,"Content-Type"),e.isFormData(r)||e.isArrayBuffer(r)||e.isBuffer(r)||e.isStream(r)||e.isFile(r)||e.isBlob(r)?r:e.isArrayBufferView(r)?r.buffer:e.isURLSearchParams(r)?(o(n,"application/x-www-form-urlencoded;charset=utf-8"),r.toString()):e.isObject(r)||n&&"application/json"===n["Content-Type"]?(o(n,"application/json"),function(t,r,n){if(e.isString(t))try{return(r||JSON.parse)(t),e.trim(t)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(t)}(r)):r}],transformResponse:[function(t){var n=this.transitional||a.transitional,o=n&&n.silentJSONParsing,i=n&&n.forcedJSONParsing,s=!o&&"json"===this.responseType;if(s||i&&e.isString(t)&&t.length)try{return JSON.parse(t)}catch(e){if(s){if("SyntaxError"===e.name)throw r(e,this,"E_JSON_PARSE");throw e}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};return e.forEach(["delete","get","head"],(function(e){a.headers[e]={}})),e.forEach(["post","put","patch"],(function(t){a.headers[t]=e.merge(n)})),le=a}var Oe,Ae,Pe=p,Ne=Se();function Re(){return Ae?Oe:(Ae=1,Oe=function(e){return!(!e||!e.__CANCEL__)})}var Ce=p,qe=function(e,t,r){var n=this||Ne;return Pe.forEach(r,(function(r){e=r.call(n,e,t)})),e},ke=Re(),Ue=Se(),$e=Te();function Le(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new $e("canceled")}var Be,De,Fe=p,Me=function(e,t){t=t||{};var r={};function n(e,t){return Fe.isPlainObject(e)&&Fe.isPlainObject(t)?Fe.merge(e,t):Fe.isPlainObject(t)?Fe.merge({},t):Fe.isArray(t)?t.slice():t}function o(r){return Fe.isUndefined(t[r])?Fe.isUndefined(e[r])?void 0:n(void 0,e[r]):n(e[r],t[r])}function i(e){if(!Fe.isUndefined(t[e]))return n(void 0,t[e])}function a(r){return Fe.isUndefined(t[r])?Fe.isUndefined(e[r])?void 0:n(void 0,e[r]):n(void 0,t[r])}function s(r){return r in t?n(e[r],t[r]):r in e?n(void 0,e[r]):void 0}var u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s};return Fe.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=u[e]||o,n=t(e);Fe.isUndefined(n)&&t!==s||(r[e]=n)})),r};function Ie(){return De?Be:(De=1,Be={version:"0.25.0"})}var ze=Ie().version,Je={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){Je[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var He={};Je.transitional=function(e,t,r){function n(e,t){return"[Axios v"+ze+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,o,i){if(!1===e)throw new Error(n(o," has been removed"+(t?" in "+t:"")));return t&&!He[o]&&(He[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}};var We,Xe,Ve,Ge,Ke,Qe,Ze={assertOptions:function(e,t,r){if("object"!=typeof e)throw new TypeError("options must be an object");for(var n=Object.keys(e),o=n.length;o-- >0;){var i=n[o],a=t[i];if(a){var s=e[i],u=void 0===s||a(s,i,e);if(!0!==u)throw new TypeError("option "+i+" must be "+u)}else if(!0!==r)throw Error("Unknown option "+i)}},validators:Je},Ye=p,et=v,tt=w,rt=function(e){return Le(e),e.headers=e.headers||{},e.data=qe.call(e,e.data,e.headers,e.transformRequest),e.headers=Ce.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),Ce.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||Ue.adapter)(e).then((function(t){return Le(e),t.data=qe.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return ke(t)||(Le(e),t&&t.response&&(t.response.data=qe.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},nt=Me,ot=Ze,it=ot.validators;function at(e){this.defaults=e,this.interceptors={request:new tt,response:new tt}}at.prototype.request=function(e,t){if("string"==typeof e?(t=t||{}).url=e:t=e||{},!t.url)throw new Error("Provided config url is not valid");(t=nt(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;void 0!==r&&ot.assertOptions(r,{silentJSONParsing:it.transitional(it.boolean),forcedJSONParsing:it.transitional(it.boolean),clarifyTimeoutError:it.transitional(it.boolean)},!1);var n=[],o=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(o=o&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var i,a=[];if(this.interceptors.response.forEach((function(e){a.push(e.fulfilled,e.rejected)})),!o){var s=[rt,void 0];for(Array.prototype.unshift.apply(s,n),s=s.concat(a),i=Promise.resolve(t);s.length;)i=i.then(s.shift(),s.shift());return i}for(var u=t;n.length;){var c=n.shift(),l=n.shift();try{u=c(u)}catch(e){l(e);break}}try{i=rt(u)}catch(e){return Promise.reject(e)}for(;a.length;)i=i.then(a.shift(),a.shift());return i},at.prototype.getUri=function(e){if(!e.url)throw new Error("Provided config url is not valid");return e=nt(this.defaults,e),et(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},Ye.forEach(["delete","get","head","options"],(function(e){at.prototype[e]=function(t,r){return this.request(nt(r||{},{method:e,url:t,data:(r||{}).data}))}})),Ye.forEach(["post","put","patch"],(function(e){at.prototype[e]=function(t,r,n){return this.request(nt(n||{},{method:e,url:t,data:r}))}}));var st=p,ut=n,ct=at,lt=Me;var ft=function e(t){var r=new ct(t),n=ut(ct.prototype.request,r);return st.extend(n,ct.prototype,r),st.extend(n,r),n.create=function(r){return e(lt(t,r))},n}(Se());ft.Axios=ct,ft.Cancel=Te(),ft.CancelToken=function(){if(Xe)return We;Xe=1;var e=Te();function t(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var r;this.promise=new Promise((function(e){r=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;for(var r in t)void 0===e[r]&&(e[r]=t[r]);return e},e.exports=t.default,e.exports.default=t.default}(gt,gt.exports);var yt=gt.exports;!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)(e),(t=(0,n.default)(t,i)).allow_trailing_dot&&"."===e[e.length-1]&&(e=e.substring(0,e.length-1));!0===t.allow_wildcard&&0===e.indexOf("*.")&&(e=e.substring(2));var o=e.split("."),a=o[o.length-1];if(t.require_tld){if(o.length<2)return!1;if(!t.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(a))return!1;if(/\s/.test(a))return!1}if(!t.allow_numeric_tld&&/^\d+$/.test(a))return!1;return o.every((function(e){return!(e.length>63&&!t.ignore_max_length)&&(!!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(e)&&(!/[\uff01-\uff5e]/.test(e)&&(!/^-|-$/.test(e)&&!(!t.allow_underscores&&/_/.test(e)))))}))};var r=o(mt),n=o(yt);function o(e){return e&&e.__esModule?e:{default:e}}var i={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};e.exports=t.default,e.exports.default=t.default}(vt,vt.exports);var wt=vt.exports,bt=t(wt),_t={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if((0,n.default)(t),r=String(r),!r)return e(t,4)||e(t,6);if("4"===r)return a.test(t);if("6"===r)return u.test(t);return!1};var r,n=(r=mt)&&r.__esModule?r:{default:r};var o="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",i="(".concat(o,"[.]){3}").concat(o),a=new RegExp("^".concat(i,"$")),s="(?:[0-9a-fA-F]{1,4})",u=new RegExp("^("+"(?:".concat(s,":){7}(?:").concat(s,"|:)|")+"(?:".concat(s,":){6}(?:").concat(i,"|:").concat(s,"|:)|")+"(?:".concat(s,":){5}(?::").concat(i,"|(:").concat(s,"){1,2}|:)|")+"(?:".concat(s,":){4}(?:(:").concat(s,"){0,1}:").concat(i,"|(:").concat(s,"){1,3}|:)|")+"(?:".concat(s,":){3}(?:(:").concat(s,"){0,2}:").concat(i,"|(:").concat(s,"){1,4}|:)|")+"(?:".concat(s,":){2}(?:(:").concat(s,"){0,3}:").concat(i,"|(:").concat(s,"){1,5}|:)|")+"(?:".concat(s,":){1}(?:(:").concat(s,"){0,4}:").concat(i,"|(:").concat(s,"){1,6}|:)|")+"(?::((?::".concat(s,"){0,5}:").concat(i,"|(?::").concat(s,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");e.exports=t.default,e.exports.default=t.default}(_t,_t.exports);var xt=_t.exports;!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,r.default)(e),!e||/[\s<>]/.test(e))return!1;if(0===e.indexOf("mailto:"))return!1;if((t=(0,i.default)(t,u)).validate_length&&e.length>=2083)return!1;if(!t.allow_fragments&&e.includes("#"))return!1;if(!t.allow_query_components&&(e.includes("?")||e.includes("&")))return!1;var a,f,d,p,h,m,v,g;if(v=e.split("#"),e=v.shift(),v=e.split("?"),e=v.shift(),(v=e.split("://")).length>1){if(a=v.shift().toLowerCase(),t.require_valid_protocol&&-1===t.protocols.indexOf(a))return!1}else{if(t.require_protocol)return!1;if("//"===e.slice(0,2)){if(!t.allow_protocol_relative_urls)return!1;v[0]=e.slice(2)}}if(""===(e=v.join("://")))return!1;if(v=e.split("/"),""===(e=v.shift())&&!t.require_host)return!0;if((v=e.split("@")).length>1){if(t.disallow_auth)return!1;if(""===v[0])return!1;if((f=v.shift()).indexOf(":")>=0&&f.split(":").length>2)return!1;var y=f.split(":"),w=(E=2,function(e){if(Array.isArray(e))return e}(x=y)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(o)throw i}}return r}}(x,E)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(x,E)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),b=w[0],_=w[1];if(""===b&&""===_)return!1}var x,E;p=v.join("@"),m=null,g=null;var T=p.match(c);T?(d="",g=T[1],m=T[2]||null):(d=(v=p.split(":")).shift(),v.length&&(m=v.join(":")));if(null!==m&&m.length>0){if(h=parseInt(m,10),!/^[0-9]+$/.test(m)||h<=0||h>65535)return!1}else if(t.require_port)return!1;if(t.host_whitelist)return l(d,t.host_whitelist);if(""===d&&!t.require_host)return!0;if(!((0,o.default)(d)||(0,n.default)(d,t)||g&&(0,o.default)(g,6)))return!1;if(d=d||g,t.host_blacklist&&l(d,t.host_blacklist))return!1;return!0};var r=a(mt),n=a(wt),o=a(xt),i=a(yt);function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{r=setTimeout((()=>n(new Error("Request was timed out"))),e.fetcherTimeout?e.fetcherTimeout:Ct)})),o=new Promise(((r,n)=>{(async()=>{let o=!1;try{Et(t.claims.activitypub.url),o=!0}catch(e){}const i=new Date,{host:a,pathname:s,search:u}=new URL(e.url),c={host:a,date:i.toUTCString(),accept:"application/activity+json","User-Agent":`doipjs/${Rt}`};if(o&&Pt){const e=`(request-target): get ${s}${u}\nhost: ${a}\ndate: ${i.toUTCString()}`,r=Nt.createSign("SHA256");r.write(e),r.end();const n=r.sign(t.claims.activitypub.privateKey.replace(/\\n/g,"\n"),"base64");c.signature=`keyId="${t.claims.activitypub.url}#main-key",headers="(request-target) host date",signature="${n}",algorithm="rsa-sha256"`}dt.get(e.url,{headers:c}).then((e=>e.data)).then((e=>{r(e)})).catch((e=>{n(e)}))})()}));return Promise.race([o,n]).then((e=>(clearTimeout(r),e)))},timeout:Ct});const kt=5e3;var Ut=Object.freeze({__proto__:null,fn:async function(e,t){let r;const n=new Promise(((t,n)=>{r=setTimeout((()=>n(new Error("Request was timed out"))),e.fetcherTimeout?e.fetcherTimeout:kt)})),o=new Promise(((t,r)=>{if(!e.url)return void r(new Error("No valid URI provided"));let n;try{n=JSON.parse(e.query)}catch(e){r(new Error("Invalid GraphQL query object"))}dt.post(e.url,n,{headers:{"Content-Type":"application/json","User-Agent":`doipjs/${Rt}`},validateStatus:function(e){return e>=200&&e<400}}).then((e=>{t(e.data)})).catch((e=>{r(e)}))}));return Promise.race([o,n]).then((e=>(clearTimeout(r),e)))},timeout:kt});const $t={JSON:"json",TEXT:"text"},Lt=5e3;var Bt=Object.freeze({__proto__:null,fn:async function(e,t){let r;const n=new Promise(((t,n)=>{r=setTimeout((()=>n(new Error("Request was timed out"))),e.fetcherTimeout?e.fetcherTimeout:Lt)})),o=new Promise(((t,r)=>{if(e.url)switch(e.format){case $t.JSON:dt.get(e.url,{headers:{Accept:"application/json","User-Agent":`doipjs/${Rt}`},validateStatus:function(e){return e>=200&&e<400}}).then((e=>{t(e.data)})).catch((e=>{r(e)}));break;case $t.TEXT:dt.get(e.url,{validateStatus:function(e){return e>=200&&e<400},responseType:"text"}).then((e=>{t(e.data)})).catch((e=>{r(e)}));break;default:r(new Error("No specified data format"))}else r(new Error("No valid URI provided"))}));return Promise.race([o,n]).then((e=>(clearTimeout(r),e)))},timeout:Lt}),Dt={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e),o.test(e)};var r,n=(r=mt)&&r.__esModule?r:{default:r};var o=/^[\x00-\x7F]+$/;e.exports=t.default,e.exports.default=t.default}(Dt,Dt.exports);var Ft=t(Dt.exports);const Mt=5e3;var It=Object.freeze({__proto__:null,fn:async function(e,t){let r;const n=new Promise(((t,n)=>{r=setTimeout((()=>n(new Error("Request was timed out"))),e.fetcherTimeout?e.fetcherTimeout:Mt)})),o=new Promise(((r,n)=>{try{bt(t.claims.matrix.instance),Ft(t.claims.matrix.accessToken)}catch(e){throw new Error(`Matrix fetcher was not set up properly (${e.message})`)}const o=`https://${t.claims.matrix.instance}/_matrix/client/r0/rooms/${e.roomId}/event/${e.eventId}?access_token=${t.claims.matrix.accessToken}`;dt.get(o,{headers:{Accept:"application/json","User-Agent":`doipjs/${Rt}`}}).then((e=>e.data)).then((e=>{r(e)})).catch((e=>{n(e)}))}));return Promise.race([o,n]).then((e=>(clearTimeout(r),e)))},timeout:Mt});const zt=5e3;var Jt=Object.freeze({__proto__:null,fn:async function(e,t){let r;const n=new Promise(((t,n)=>{r=setTimeout((()=>n(new Error("Request was timed out"))),e.fetcherTimeout?e.fetcherTimeout:zt)})),o=r=>new Promise(((n,o)=>{try{Ft(t.claims.telegram.token)}catch(e){throw new Error(`Telegram fetcher was not set up properly (${e.message})`)}if(!e.chat||!e.user)return void o(new Error("Both chat name and user name must be provided"));const i=`https://api.telegram.org/bot${t.claims.telegram.token}/${r}?chat_id=@${e.chat}`;dt.get(i,{headers:{Accept:"application/json","User-Agent":`doipjs/${Rt}`},validateStatus:e=>200===e}).then((e=>n(e.data))).catch((e=>o(e)))})),i=o("getChatAdministrators").then((t=>{if(!t.ok)throw new Error("Request to get chat administrators failed");return o("getChat").then((r=>{if(!r.ok)throw new Error("Request to get chat info failed");let n;for(const e of t.result)"creator"===e.status&&(n=e.user.username);if(!r.result.description)throw new Error("There is no chat description");if(n!==e.user)throw new Error("User doesn't match");return{user:n,text:r.result.description}}))}));return Promise.race([i,n]).then((e=>(clearTimeout(r),e)))},timeout:zt});return e.activitypub=qt,e.graphql=Ut,e.http=Bt,e.matrix=It,e.telegram=Jt,e}({});