roam-js
Version:
Roam Javascript SDK to listen to location updates.
1 lines • 696 kB
JavaScript
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){"use strict";const mqtt=require("mqtt");class AsyncClient{constructor(client){this._client=client}set handleMessage(newHandler){this._client.handleMessage=newHandler}get handleMessage(){return this._client.handleMessage}get connected(){return this._client.connected}get reconnecting(){return this._client.reconnecting}publish(...args){return new Promise((resolve,reject)=>{this._client.publish(...args,(err,result)=>{if(err)reject(err);else resolve(result)})})}subscribe(...args){return new Promise((resolve,reject)=>{this._client.subscribe(...args,(err,result)=>{if(err)reject(err);else resolve(result)})})}unsubscribe(...args){return new Promise((resolve,reject)=>{this._client.unsubscribe(...args,(err,result)=>{if(err)reject(err);else resolve(result)})})}end(...args){return new Promise((resolve,reject)=>{this._client.end(...args,(err,result)=>{if(err)reject(err);else resolve(result)})})}reconnect(...args){return this._client.reconnect(...args)}addListener(...args){return this._client.addListener(...args)}emit(...args){return this._client.emit(...args)}eventNames(...args){return this._client.eventNames(...args)}getLastMessageId(...args){return this._client.getLastMessageId(...args)}getMaxListeners(...args){return this._client.getMaxListeners(...args)}listenerCount(...args){return this._client.listenerCount(...args)}listeners(...args){return this._client.listeners(...args)}off(...args){return this._client.off(...args)}on(...args){return this._client.on(...args)}once(...args){return this._client.once(...args)}prependListener(...args){return this._client.prependListener(...args)}prependOnceListener(...args){return this._client.prependOnceListener(...args)}rawListeners(...args){return this._client.rawListeners(...args)}removeAllListeners(...args){return this._client.removeAllListeners(...args)}removeListener(...args){return this._client.removeListener(...args)}removeOutgoingMessage(...args){return this._client.removeOutgoingMessage(...args)}setMaxListeners(...args){return this._client.setMaxListeners(...args)}}module.exports={connect(brokerURL,opts){const client=mqtt.connect(brokerURL,opts);const asyncClient=new AsyncClient(client);return asyncClient},connectAsync(brokerURL,opts,allowRetries=true){const client=mqtt.connect(brokerURL,opts);const asyncClient=new AsyncClient(client);return new Promise((resolve,reject)=>{const promiseResolutionListeners={connect:connack=>{removePromiseResolutionListeners();resolve(asyncClient)},end:()=>{removePromiseResolutionListeners();resolve(asyncClient)},error:err=>{removePromiseResolutionListeners();client.end();reject(err)}};if(false===allowRetries){promiseResolutionListeners.close=()=>{promiseResolutionListeners.error("Couldn't connect to server")}}function removePromiseResolutionListeners(){Object.keys(promiseResolutionListeners).forEach(eventName=>{client.removeListener(eventName,promiseResolutionListeners[eventName])})}Object.keys(promiseResolutionListeners).forEach(eventName=>{client.on(eventName,promiseResolutionListeners[eventName])})})},AsyncClient:AsyncClient}},{mqtt:47}],2:[function(require,module,exports){module.exports=require("./lib/axios")},{"./lib/axios":4}],3:[function(require,module,exports){"use strict";var utils=require("./../utils");var settle=require("./../core/settle");var cookies=require("./../helpers/cookies");var buildURL=require("./../helpers/buildURL");var buildFullPath=require("../core/buildFullPath");var parseHeaders=require("./../helpers/parseHeaders");var isURLSameOrigin=require("./../helpers/isURLSameOrigin");var createError=require("../core/createError");module.exports=function xhrAdapter(config){return new Promise(function dispatchXhrRequest(resolve,reject){var requestData=config.data;var requestHeaders=config.headers;var responseType=config.responseType;if(utils.isFormData(requestData)){delete requestHeaders["Content-Type"]}var request=new XMLHttpRequest;if(config.auth){var username=config.auth.username||"";var password=config.auth.password?unescape(encodeURIComponent(config.auth.password)):"";requestHeaders.Authorization="Basic "+btoa(username+":"+password)}var fullPath=buildFullPath(config.baseURL,config.url);request.open(config.method.toUpperCase(),buildURL(fullPath,config.params,config.paramsSerializer),true);request.timeout=config.timeout;function onloadend(){if(!request){return}var responseHeaders="getAllResponseHeaders"in request?parseHeaders(request.getAllResponseHeaders()):null;var responseData=!responseType||responseType==="text"||responseType==="json"?request.responseText:request.response;var response={data:responseData,status:request.status,statusText:request.statusText,headers:responseHeaders,config:config,request:request};settle(resolve,reject,response);request=null}if("onloadend"in request){request.onloadend=onloadend}else{request.onreadystatechange=function handleLoad(){if(!request||request.readyState!==4){return}if(request.status===0&&!(request.responseURL&&request.responseURL.indexOf("file:")===0)){return}setTimeout(onloadend)}}request.onabort=function handleAbort(){if(!request){return}reject(createError("Request aborted",config,"ECONNABORTED",request));request=null};request.onerror=function handleError(){reject(createError("Network Error",config,null,request));request=null};request.ontimeout=function handleTimeout(){var timeoutErrorMessage="timeout of "+config.timeout+"ms exceeded";if(config.timeoutErrorMessage){timeoutErrorMessage=config.timeoutErrorMessage}reject(createError(timeoutErrorMessage,config,config.transitional&&config.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",request));request=null};if(utils.isStandardBrowserEnv()){var xsrfValue=(config.withCredentials||isURLSameOrigin(fullPath))&&config.xsrfCookieName?cookies.read(config.xsrfCookieName):undefined;if(xsrfValue){requestHeaders[config.xsrfHeaderName]=xsrfValue}}if("setRequestHeader"in request){utils.forEach(requestHeaders,function setRequestHeader(val,key){if(typeof requestData==="undefined"&&key.toLowerCase()==="content-type"){delete requestHeaders[key]}else{request.setRequestHeader(key,val)}})}if(!utils.isUndefined(config.withCredentials)){request.withCredentials=!!config.withCredentials}if(responseType&&responseType!=="json"){request.responseType=config.responseType}if(typeof config.onDownloadProgress==="function"){request.addEventListener("progress",config.onDownloadProgress)}if(typeof config.onUploadProgress==="function"&&request.upload){request.upload.addEventListener("progress",config.onUploadProgress)}if(config.cancelToken){config.cancelToken.promise.then(function onCanceled(cancel){if(!request){return}request.abort();reject(cancel);request=null})}if(!requestData){requestData=null}request.send(requestData)})}},{"../core/buildFullPath":10,"../core/createError":11,"./../core/settle":15,"./../helpers/buildURL":19,"./../helpers/cookies":21,"./../helpers/isURLSameOrigin":24,"./../helpers/parseHeaders":26,"./../utils":29}],4:[function(require,module,exports){"use strict";var utils=require("./utils");var bind=require("./helpers/bind");var Axios=require("./core/Axios");var mergeConfig=require("./core/mergeConfig");var defaults=require("./defaults");function createInstance(defaultConfig){var context=new Axios(defaultConfig);var instance=bind(Axios.prototype.request,context);utils.extend(instance,Axios.prototype,context);utils.extend(instance,context);return instance}var axios=createInstance(defaults);axios.Axios=Axios;axios.create=function create(instanceConfig){return createInstance(mergeConfig(axios.defaults,instanceConfig))};axios.Cancel=require("./cancel/Cancel");axios.CancelToken=require("./cancel/CancelToken");axios.isCancel=require("./cancel/isCancel");axios.all=function all(promises){return Promise.all(promises)};axios.spread=require("./helpers/spread");axios.isAxiosError=require("./helpers/isAxiosError");module.exports=axios;module.exports.default=axios},{"./cancel/Cancel":5,"./cancel/CancelToken":6,"./cancel/isCancel":7,"./core/Axios":8,"./core/mergeConfig":14,"./defaults":17,"./helpers/bind":18,"./helpers/isAxiosError":23,"./helpers/spread":27,"./utils":29}],5:[function(require,module,exports){"use strict";function Cancel(message){this.message=message}Cancel.prototype.toString=function toString(){return"Cancel"+(this.message?": "+this.message:"")};Cancel.prototype.__CANCEL__=true;module.exports=Cancel},{}],6:[function(require,module,exports){"use strict";var Cancel=require("./Cancel");function CancelToken(executor){if(typeof executor!=="function"){throw new TypeError("executor must be a function.")}var resolvePromise;this.promise=new Promise(function promiseExecutor(resolve){resolvePromise=resolve});var token=this;executor(function cancel(message){if(token.reason){return}token.reason=new Cancel(message);resolvePromise(token.reason)})}CancelToken.prototype.throwIfRequested=function throwIfRequested(){if(this.reason){throw this.reason}};CancelToken.source=function source(){var cancel;var token=new CancelToken(function executor(c){cancel=c});return{token:token,cancel:cancel}};module.exports=CancelToken},{"./Cancel":5}],7:[function(require,module,exports){"use strict";module.exports=function isCancel(value){return!!(value&&value.__CANCEL__)}},{}],8:[function(require,module,exports){"use strict";var utils=require("./../utils");var buildURL=require("../helpers/buildURL");var InterceptorManager=require("./InterceptorManager");var dispatchRequest=require("./dispatchRequest");var mergeConfig=require("./mergeConfig");var validator=require("../helpers/validator");var validators=validator.validators;function Axios(instanceConfig){this.defaults=instanceConfig;this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}Axios.prototype.request=function request(config){if(typeof config==="string"){config=arguments[1]||{};config.url=arguments[0]}else{config=config||{}}config=mergeConfig(this.defaults,config);if(config.method){config.method=config.method.toLowerCase()}else if(this.defaults.method){config.method=this.defaults.method.toLowerCase()}else{config.method="get"}var transitional=config.transitional;if(transitional!==undefined){validator.assertOptions(transitional,{silentJSONParsing:validators.transitional(validators.boolean,"1.0.0"),forcedJSONParsing:validators.transitional(validators.boolean,"1.0.0"),clarifyTimeoutError:validators.transitional(validators.boolean,"1.0.0")},false)}var requestInterceptorChain=[];var synchronousRequestInterceptors=true;this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor){if(typeof interceptor.runWhen==="function"&&interceptor.runWhen(config)===false){return}synchronousRequestInterceptors=synchronousRequestInterceptors&&interceptor.synchronous;requestInterceptorChain.unshift(interceptor.fulfilled,interceptor.rejected)});var responseInterceptorChain=[];this.interceptors.response.forEach(function pushResponseInterceptors(interceptor){responseInterceptorChain.push(interceptor.fulfilled,interceptor.rejected)});var promise;if(!synchronousRequestInterceptors){var chain=[dispatchRequest,undefined];Array.prototype.unshift.apply(chain,requestInterceptorChain);chain=chain.concat(responseInterceptorChain);promise=Promise.resolve(config);while(chain.length){promise=promise.then(chain.shift(),chain.shift())}return promise}var newConfig=config;while(requestInterceptorChain.length){var onFulfilled=requestInterceptorChain.shift();var onRejected=requestInterceptorChain.shift();try{newConfig=onFulfilled(newConfig)}catch(error){onRejected(error);break}}try{promise=dispatchRequest(newConfig)}catch(error){return Promise.reject(error)}while(responseInterceptorChain.length){promise=promise.then(responseInterceptorChain.shift(),responseInterceptorChain.shift())}return promise};Axios.prototype.getUri=function getUri(config){config=mergeConfig(this.defaults,config);return buildURL(config.url,config.params,config.paramsSerializer).replace(/^\?/,"")};utils.forEach(["delete","get","head","options"],function forEachMethodNoData(method){Axios.prototype[method]=function(url,config){return this.request(mergeConfig(config||{},{method:method,url:url,data:(config||{}).data}))}});utils.forEach(["post","put","patch"],function forEachMethodWithData(method){Axios.prototype[method]=function(url,data,config){return this.request(mergeConfig(config||{},{method:method,url:url,data:data}))}});module.exports=Axios},{"../helpers/buildURL":19,"../helpers/validator":28,"./../utils":29,"./InterceptorManager":9,"./dispatchRequest":12,"./mergeConfig":14}],9:[function(require,module,exports){"use strict";var utils=require("./../utils");function InterceptorManager(){this.handlers=[]}InterceptorManager.prototype.use=function use(fulfilled,rejected,options){this.handlers.push({fulfilled:fulfilled,rejected:rejected,synchronous:options?options.synchronous:false,runWhen:options?options.runWhen:null});return this.handlers.length-1};InterceptorManager.prototype.eject=function eject(id){if(this.handlers[id]){this.handlers[id]=null}};InterceptorManager.prototype.forEach=function forEach(fn){utils.forEach(this.handlers,function forEachHandler(h){if(h!==null){fn(h)}})};module.exports=InterceptorManager},{"./../utils":29}],10:[function(require,module,exports){"use strict";var isAbsoluteURL=require("../helpers/isAbsoluteURL");var combineURLs=require("../helpers/combineURLs");module.exports=function buildFullPath(baseURL,requestedURL){if(baseURL&&!isAbsoluteURL(requestedURL)){return combineURLs(baseURL,requestedURL)}return requestedURL}},{"../helpers/combineURLs":20,"../helpers/isAbsoluteURL":22}],11:[function(require,module,exports){"use strict";var enhanceError=require("./enhanceError");module.exports=function createError(message,config,code,request,response){var error=new Error(message);return enhanceError(error,config,code,request,response)}},{"./enhanceError":13}],12:[function(require,module,exports){"use strict";var utils=require("./../utils");var transformData=require("./transformData");var isCancel=require("../cancel/isCancel");var defaults=require("../defaults");function throwIfCancellationRequested(config){if(config.cancelToken){config.cancelToken.throwIfRequested()}}module.exports=function dispatchRequest(config){throwIfCancellationRequested(config);config.headers=config.headers||{};config.data=transformData.call(config,config.data,config.headers,config.transformRequest);config.headers=utils.merge(config.headers.common||{},config.headers[config.method]||{},config.headers);utils.forEach(["delete","get","head","post","put","patch","common"],function cleanHeaderConfig(method){delete config.headers[method]});var adapter=config.adapter||defaults.adapter;return adapter(config).then(function onAdapterResolution(response){throwIfCancellationRequested(config);response.data=transformData.call(config,response.data,response.headers,config.transformResponse);return response},function onAdapterRejection(reason){if(!isCancel(reason)){throwIfCancellationRequested(config);if(reason&&reason.response){reason.response.data=transformData.call(config,reason.response.data,reason.response.headers,config.transformResponse)}}return Promise.reject(reason)})}},{"../cancel/isCancel":7,"../defaults":17,"./../utils":29,"./transformData":16}],13:[function(require,module,exports){"use strict";module.exports=function enhanceError(error,config,code,request,response){error.config=config;if(code){error.code=code}error.request=request;error.response=response;error.isAxiosError=true;error.toJSON=function toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}};return error}},{}],14:[function(require,module,exports){"use strict";var utils=require("../utils");module.exports=function mergeConfig(config1,config2){config2=config2||{};var config={};var valueFromConfig2Keys=["url","method","data"];var mergeDeepPropertiesKeys=["headers","auth","proxy","params"];var defaultToConfig2Keys=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"];var directMergeKeys=["validateStatus"];function getMergedValue(target,source){if(utils.isPlainObject(target)&&utils.isPlainObject(source)){return utils.merge(target,source)}else if(utils.isPlainObject(source)){return utils.merge({},source)}else if(utils.isArray(source)){return source.slice()}return source}function mergeDeepProperties(prop){if(!utils.isUndefined(config2[prop])){config[prop]=getMergedValue(config1[prop],config2[prop])}else if(!utils.isUndefined(config1[prop])){config[prop]=getMergedValue(undefined,config1[prop])}}utils.forEach(valueFromConfig2Keys,function valueFromConfig2(prop){if(!utils.isUndefined(config2[prop])){config[prop]=getMergedValue(undefined,config2[prop])}});utils.forEach(mergeDeepPropertiesKeys,mergeDeepProperties);utils.forEach(defaultToConfig2Keys,function defaultToConfig2(prop){if(!utils.isUndefined(config2[prop])){config[prop]=getMergedValue(undefined,config2[prop])}else if(!utils.isUndefined(config1[prop])){config[prop]=getMergedValue(undefined,config1[prop])}});utils.forEach(directMergeKeys,function merge(prop){if(prop in config2){config[prop]=getMergedValue(config1[prop],config2[prop])}else if(prop in config1){config[prop]=getMergedValue(undefined,config1[prop])}});var axiosKeys=valueFromConfig2Keys.concat(mergeDeepPropertiesKeys).concat(defaultToConfig2Keys).concat(directMergeKeys);var otherKeys=Object.keys(config1).concat(Object.keys(config2)).filter(function filterAxiosKeys(key){return axiosKeys.indexOf(key)===-1});utils.forEach(otherKeys,mergeDeepProperties);return config}},{"../utils":29}],15:[function(require,module,exports){"use strict";var createError=require("./createError");module.exports=function settle(resolve,reject,response){var validateStatus=response.config.validateStatus;if(!response.status||!validateStatus||validateStatus(response.status)){resolve(response)}else{reject(createError("Request failed with status code "+response.status,response.config,null,response.request,response))}}},{"./createError":11}],16:[function(require,module,exports){"use strict";var utils=require("./../utils");var defaults=require("./../defaults");module.exports=function transformData(data,headers,fns){var context=this||defaults;utils.forEach(fns,function transform(fn){data=fn.call(context,data,headers)});return data}},{"./../defaults":17,"./../utils":29}],17:[function(require,module,exports){(function(process){(function(){"use strict";var utils=require("./utils");var normalizeHeaderName=require("./helpers/normalizeHeaderName");var enhanceError=require("./core/enhanceError");var DEFAULT_CONTENT_TYPE={"Content-Type":"application/x-www-form-urlencoded"};function setContentTypeIfUnset(headers,value){if(!utils.isUndefined(headers)&&utils.isUndefined(headers["Content-Type"])){headers["Content-Type"]=value}}function getDefaultAdapter(){var adapter;if(typeof XMLHttpRequest!=="undefined"){adapter=require("./adapters/xhr")}else if(typeof process!=="undefined"&&Object.prototype.toString.call(process)==="[object process]"){adapter=require("./adapters/http")}return adapter}function stringifySafely(rawValue,parser,encoder){if(utils.isString(rawValue)){try{(parser||JSON.parse)(rawValue);return utils.trim(rawValue)}catch(e){if(e.name!=="SyntaxError"){throw e}}}return(encoder||JSON.stringify)(rawValue)}var defaults={transitional:{silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false},adapter:getDefaultAdapter(),transformRequest:[function transformRequest(data,headers){normalizeHeaderName(headers,"Accept");normalizeHeaderName(headers,"Content-Type");if(utils.isFormData(data)||utils.isArrayBuffer(data)||utils.isBuffer(data)||utils.isStream(data)||utils.isFile(data)||utils.isBlob(data)){return data}if(utils.isArrayBufferView(data)){return data.buffer}if(utils.isURLSearchParams(data)){setContentTypeIfUnset(headers,"application/x-www-form-urlencoded;charset=utf-8");return data.toString()}if(utils.isObject(data)||headers&&headers["Content-Type"]==="application/json"){setContentTypeIfUnset(headers,"application/json");return stringifySafely(data)}return data}],transformResponse:[function transformResponse(data){var transitional=this.transitional;var silentJSONParsing=transitional&&transitional.silentJSONParsing;var forcedJSONParsing=transitional&&transitional.forcedJSONParsing;var strictJSONParsing=!silentJSONParsing&&this.responseType==="json";if(strictJSONParsing||forcedJSONParsing&&utils.isString(data)&&data.length){try{return JSON.parse(data)}catch(e){if(strictJSONParsing){if(e.name==="SyntaxError"){throw enhanceError(e,this,"E_JSON_PARSE")}throw e}}}return data}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function validateStatus(status){return status>=200&&status<300}};defaults.headers={common:{Accept:"application/json, text/plain, */*"}};utils.forEach(["delete","get","head"],function forEachMethodNoData(method){defaults.headers[method]={}});utils.forEach(["post","put","patch"],function forEachMethodWithData(method){defaults.headers[method]=utils.merge(DEFAULT_CONTENT_TYPE)});module.exports=defaults}).call(this)}).call(this,require("_process"))},{"./adapters/http":3,"./adapters/xhr":3,"./core/enhanceError":13,"./helpers/normalizeHeaderName":25,"./utils":29,_process:244}],18:[function(require,module,exports){"use strict";module.exports=function bind(fn,thisArg){return function wrap(){var args=new Array(arguments.length);for(var i=0;i<args.length;i++){args[i]=arguments[i]}return fn.apply(thisArg,args)}}},{}],19:[function(require,module,exports){"use strict";var utils=require("./../utils");function encode(val){return encodeURIComponent(val).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}module.exports=function buildURL(url,params,paramsSerializer){if(!params){return url}var serializedParams;if(paramsSerializer){serializedParams=paramsSerializer(params)}else if(utils.isURLSearchParams(params)){serializedParams=params.toString()}else{var parts=[];utils.forEach(params,function serialize(val,key){if(val===null||typeof val==="undefined"){return}if(utils.isArray(val)){key=key+"[]"}else{val=[val]}utils.forEach(val,function parseValue(v){if(utils.isDate(v)){v=v.toISOString()}else if(utils.isObject(v)){v=JSON.stringify(v)}parts.push(encode(key)+"="+encode(v))})});serializedParams=parts.join("&")}if(serializedParams){var hashmarkIndex=url.indexOf("#");if(hashmarkIndex!==-1){url=url.slice(0,hashmarkIndex)}url+=(url.indexOf("?")===-1?"?":"&")+serializedParams}return url}},{"./../utils":29}],20:[function(require,module,exports){"use strict";module.exports=function combineURLs(baseURL,relativeURL){return relativeURL?baseURL.replace(/\/+$/,"")+"/"+relativeURL.replace(/^\/+/,""):baseURL}},{}],21:[function(require,module,exports){"use strict";var utils=require("./../utils");module.exports=utils.isStandardBrowserEnv()?function standardBrowserEnv(){return{write:function write(name,value,expires,path,domain,secure){var cookie=[];cookie.push(name+"="+encodeURIComponent(value));if(utils.isNumber(expires)){cookie.push("expires="+new Date(expires).toGMTString())}if(utils.isString(path)){cookie.push("path="+path)}if(utils.isString(domain)){cookie.push("domain="+domain)}if(secure===true){cookie.push("secure")}document.cookie=cookie.join("; ")},read:function read(name){var match=document.cookie.match(new RegExp("(^|;\\s*)("+name+")=([^;]*)"));return match?decodeURIComponent(match[3]):null},remove:function remove(name){this.write(name,"",Date.now()-864e5)}}}():function nonStandardBrowserEnv(){return{write:function write(){},read:function read(){return null},remove:function remove(){}}}()},{"./../utils":29}],22:[function(require,module,exports){"use strict";module.exports=function isAbsoluteURL(url){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url)}},{}],23:[function(require,module,exports){"use strict";module.exports=function isAxiosError(payload){return typeof payload==="object"&&payload.isAxiosError===true}},{}],24:[function(require,module,exports){"use strict";var utils=require("./../utils");module.exports=utils.isStandardBrowserEnv()?function standardBrowserEnv(){var msie=/(msie|trident)/i.test(navigator.userAgent);var urlParsingNode=document.createElement("a");var originURL;function resolveURL(url){var href=url;if(msie){urlParsingNode.setAttribute("href",href);href=urlParsingNode.href}urlParsingNode.setAttribute("href",href);return{href:urlParsingNode.href,protocol:urlParsingNode.protocol?urlParsingNode.protocol.replace(/:$/,""):"",host:urlParsingNode.host,search:urlParsingNode.search?urlParsingNode.search.replace(/^\?/,""):"",hash:urlParsingNode.hash?urlParsingNode.hash.replace(/^#/,""):"",hostname:urlParsingNode.hostname,port:urlParsingNode.port,pathname:urlParsingNode.pathname.charAt(0)==="/"?urlParsingNode.pathname:"/"+urlParsingNode.pathname}}originURL=resolveURL(window.location.href);return function isURLSameOrigin(requestURL){var parsed=utils.isString(requestURL)?resolveURL(requestURL):requestURL;return parsed.protocol===originURL.protocol&&parsed.host===originURL.host}}():function nonStandardBrowserEnv(){return function isURLSameOrigin(){return true}}()},{"./../utils":29}],25:[function(require,module,exports){"use strict";var utils=require("../utils");module.exports=function normalizeHeaderName(headers,normalizedName){utils.forEach(headers,function processHeader(value,name){if(name!==normalizedName&&name.toUpperCase()===normalizedName.toUpperCase()){headers[normalizedName]=value;delete headers[name]}})}},{"../utils":29}],26:[function(require,module,exports){"use strict";var utils=require("./../utils");var ignoreDuplicateOf=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];module.exports=function parseHeaders(headers){var parsed={};var key;var val;var i;if(!headers){return parsed}utils.forEach(headers.split("\n"),function parser(line){i=line.indexOf(":");key=utils.trim(line.substr(0,i)).toLowerCase();val=utils.trim(line.substr(i+1));if(key){if(parsed[key]&&ignoreDuplicateOf.indexOf(key)>=0){return}if(key==="set-cookie"){parsed[key]=(parsed[key]?parsed[key]:[]).concat([val])}else{parsed[key]=parsed[key]?parsed[key]+", "+val:val}}});return parsed}},{"./../utils":29}],27:[function(require,module,exports){"use strict";module.exports=function spread(callback){return function wrap(arr){return callback.apply(null,arr)}}},{}],28:[function(require,module,exports){"use strict";var pkg=require("./../../package.json");var validators={};["object","boolean","number","function","string","symbol"].forEach(function(type,i){validators[type]=function validator(thing){return typeof thing===type||"a"+(i<1?"n ":" ")+type}});var deprecatedWarnings={};var currentVerArr=pkg.version.split(".");function isOlderVersion(version,thanVersion){var pkgVersionArr=thanVersion?thanVersion.split("."):currentVerArr;var destVer=version.split(".");for(var i=0;i<3;i++){if(pkgVersionArr[i]>destVer[i]){return true}else if(pkgVersionArr[i]<destVer[i]){return false}}return false}validators.transitional=function transitional(validator,version,message){var isDeprecated=version&&isOlderVersion(version);function formatMessage(opt,desc){return"[Axios v"+pkg.version+"] Transitional option '"+opt+"'"+desc+(message?". "+message:"")}return function(value,opt,opts){if(validator===false){throw new Error(formatMessage(opt," has been removed in "+version))}if(isDeprecated&&!deprecatedWarnings[opt]){deprecatedWarnings[opt]=true;console.warn(formatMessage(opt," has been deprecated since v"+version+" and will be removed in the near future"))}return validator?validator(value,opt,opts):true}};function assertOptions(options,schema,allowUnknown){if(typeof options!=="object"){throw new TypeError("options must be an object")}var keys=Object.keys(options);var i=keys.length;while(i-- >0){var opt=keys[i];var validator=schema[opt];if(validator){var value=options[opt];var result=value===undefined||validator(value,opt,options);if(result!==true){throw new TypeError("option "+opt+" must be "+result)}continue}if(allowUnknown!==true){throw Error("Unknown option "+opt)}}}module.exports={isOlderVersion:isOlderVersion,assertOptions:assertOptions,validators:validators}},{"./../../package.json":30}],29:[function(require,module,exports){"use strict";var bind=require("./helpers/bind");var toString=Object.prototype.toString;function isArray(val){return toString.call(val)==="[object Array]"}function isUndefined(val){return typeof val==="undefined"}function isBuffer(val){return val!==null&&!isUndefined(val)&&val.constructor!==null&&!isUndefined(val.constructor)&&typeof val.constructor.isBuffer==="function"&&val.constructor.isBuffer(val)}function isArrayBuffer(val){return toString.call(val)==="[object ArrayBuffer]"}function isFormData(val){return typeof FormData!=="undefined"&&val instanceof FormData}function isArrayBufferView(val){var result;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){result=ArrayBuffer.isView(val)}else{result=val&&val.buffer&&val.buffer instanceof ArrayBuffer}return result}function isString(val){return typeof val==="string"}function isNumber(val){return typeof val==="number"}function isObject(val){return val!==null&&typeof val==="object"}function isPlainObject(val){if(toString.call(val)!=="[object Object]"){return false}var prototype=Object.getPrototypeOf(val);return prototype===null||prototype===Object.prototype}function isDate(val){return toString.call(val)==="[object Date]"}function isFile(val){return toString.call(val)==="[object File]"}function isBlob(val){return toString.call(val)==="[object Blob]"}function isFunction(val){return toString.call(val)==="[object Function]"}function isStream(val){return isObject(val)&&isFunction(val.pipe)}function isURLSearchParams(val){return typeof URLSearchParams!=="undefined"&&val instanceof URLSearchParams}function trim(str){return str.trim?str.trim():str.replace(/^\s+|\s+$/g,"")}function isStandardBrowserEnv(){if(typeof navigator!=="undefined"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")){return false}return typeof window!=="undefined"&&typeof document!=="undefined"}function forEach(obj,fn){if(obj===null||typeof obj==="undefined"){return}if(typeof obj!=="object"){obj=[obj]}if(isArray(obj)){for(var i=0,l=obj.length;i<l;i++){fn.call(null,obj[i],i,obj)}}else{for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){fn.call(null,obj[key],key,obj)}}}}function merge(){var result={};function assignValue(val,key){if(isPlainObject(result[key])&&isPlainObject(val)){result[key]=merge(result[key],val)}else if(isPlainObject(val)){result[key]=merge({},val)}else if(isArray(val)){result[key]=val.slice()}else{result[key]=val}}for(var i=0,l=arguments.length;i<l;i++){forEach(arguments[i],assignValue)}return result}function extend(a,b,thisArg){forEach(b,function assignValue(val,key){if(thisArg&&typeof val==="function"){a[key]=bind(val,thisArg)}else{a[key]=val}});return a}function stripBOM(content){if(content.charCodeAt(0)===65279){content=content.slice(1)}return content}module.exports={isArray:isArray,isArrayBuffer:isArrayBuffer,isBuffer:isBuffer,isFormData:isFormData,isArrayBufferView:isArrayBufferView,isString:isString,isNumber:isNumber,isObject:isObject,isPlainObject:isPlainObject,isUndefined:isUndefined,isDate:isDate,isFile:isFile,isBlob:isBlob,isFunction:isFunction,isStream:isStream,isURLSearchParams:isURLSearchParams,isStandardBrowserEnv:isStandardBrowserEnv,forEach:forEach,merge:merge,extend:extend,trim:trim,stripBOM:stripBOM}},{"./helpers/bind":18}],30:[function(require,module,exports){module.exports={_from:"axios@^0.21.1",_id:"axios@0.21.4",_inBundle:false,_integrity:"sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",_location:"/axios",_phantomChildren:{},_requested:{type:"range",registry:true,raw:"axios@^0.21.1",name:"axios",escapedName:"axios",rawSpec:"^0.21.1",saveSpec:null,fetchSpec:"^0.21.1"},_requiredBy:["/"],_resolved:"https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",_shasum:"c67b90dc0568e5c1cf2b0b858c43ba28e2eda575",_spec:"axios@^0.21.1",_where:"/Users/joe/Desktop/roam-ai/roam-js",author:{name:"Matt Zabriskie"},browser:{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},bugs:{url:"https://github.com/axios/axios/issues"},bundleDependencies:false,bundlesize:[{path:"./dist/axios.min.js",threshold:"5kB"}],dependencies:{"follow-redirects":"^1.14.0"},deprecated:false,description:"Promise based HTTP client for the browser and node.js",devDependencies:{coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},homepage:"https://axios-http.com",jsdelivr:"dist/axios.min.js",keywords:["xhr","http","ajax","promise","node"],license:"MIT",main:"index.js",name:"axios",repository:{type:"git",url:"git+https://github.com/axios/axios.git"},scripts:{build:"NODE_ENV=production grunt build",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",examples:"node ./examples/server.js",fix:"eslint --fix lib/**/*.js",postversion:"git push && git push --tags",preversion:"npm test",start:"node ./sandbox/server.js",test:"grunt test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"},typings:"./index.d.ts",unpkg:"dist/axios.min.js",version:"0.21.4"}},{}],31:[function(require,module,exports){"use strict";const{Buffer}=require("buffer");const symbol=Symbol.for("BufferList");function BufferList(buf){if(!(this instanceof BufferList)){return new BufferList(buf)}BufferList._init.call(this,buf)}BufferList._init=function _init(buf){Object.defineProperty(this,symbol,{value:true});this._bufs=[];this.length=0;if(buf){this.append(buf)}};BufferList.prototype._new=function _new(buf){return new BufferList(buf)};BufferList.prototype._offset=function _offset(offset){if(offset===0){return[0,0]}let tot=0;for(let i=0;i<this._bufs.length;i++){const _t=tot+this._bufs[i].length;if(offset<_t||i===this._bufs.length-1){return[i,offset-tot]}tot=_t}};BufferList.prototype._reverseOffset=function(blOffset){const bufferId=blOffset[0];let offset=blOffset[1];for(let i=0;i<bufferId;i++){offset+=this._bufs[i].length}return offset};BufferList.prototype.get=function get(index){if(index>this.length||index<0){return undefined}const offset=this._offset(index);return this._bufs[offset[0]][offset[1]]};BufferList.prototype.slice=function slice(start,end){if(typeof start==="number"&&start<0){start+=this.length}if(typeof end==="number"&&end<0){end+=this.length}return this.copy(null,0,start,end)};BufferList.prototype.copy=function copy(dst,dstStart,srcStart,srcEnd){if(typeof srcStart!=="number"||srcStart<0){srcStart=0}if(typeof srcEnd!=="number"||srcEnd>this.length){srcEnd=this.length}if(srcStart>=this.length){return dst||Buffer.alloc(0)}if(srcEnd<=0){return dst||Buffer.alloc(0)}const copy=!!dst;const off=this._offset(srcStart);const len=srcEnd-srcStart;let bytes=len;let bufoff=copy&&dstStart||0;let start=off[1];if(srcStart===0&&srcEnd===this.length){if(!copy){return this._bufs.length===1?this._bufs[0]:Buffer.concat(this._bufs,this.length)}for(let i=0;i<this._bufs.length;i++){this._bufs[i].copy(dst,bufoff);bufoff+=this._bufs[i].length}return dst}if(bytes<=this._bufs[off[0]].length-start){return copy?this._bufs[off[0]].copy(dst,dstStart,start,start+bytes):this._bufs[off[0]].slice(start,start+bytes)}if(!copy){dst=Buffer.allocUnsafe(len)}for(let i=off[0];i<this._bufs.length;i++){const l=this._bufs[i].length-start;if(bytes>l){this._bufs[i].copy(dst,bufoff,start);bufoff+=l}else{this._bufs[i].copy(dst,bufoff,start,start+bytes);bufoff+=l;break}bytes-=l;if(start){start=0}}if(dst.length>bufoff)return dst.slice(0,bufoff);return dst};BufferList.prototype.shallowSlice=function shallowSlice(start,end){start=start||0;end=typeof end!=="number"?this.length:end;if(start<0){start+=this.length}if(end<0){end+=this.length}if(start===end){return this._new()}const startOffset=this._offset(start);const endOffset=this._offset(end);const buffers=this._bufs.slice(startOffset[0],endOffset[0]+1);if(endOffset[1]===0){buffers.pop()}else{buffers[buffers.length-1]=buffers[buffers.length-1].slice(0,endOffset[1])}if(startOffset[1]!==0){buffers[0]=buffers[0].slice(startOffset[1])}return this._new(buffers)};BufferList.prototype.toString=function toString(encoding,start,end){return this.slice(start,end).toString(encoding)};BufferList.prototype.consume=function consume(bytes){bytes=Math.trunc(bytes);if(Number.isNaN(bytes)||bytes<=0)return this;while(this._bufs.length){if(bytes>=this._bufs[0].length){bytes-=this._bufs[0].length;this.length-=this._bufs[0].length;this._bufs.shift()}else{this._bufs[0]=this._bufs[0].slice(bytes);this.length-=bytes;break}}return this};BufferList.prototype.duplicate=function duplicate(){const copy=this._new();for(let i=0;i<this._bufs.length;i++){copy.append(this._bufs[i])}return copy};BufferList.prototype.append=function append(buf){if(buf==null){return this}if(buf.buffer){this._appendBuffer(Buffer.from(buf.buffer,buf.byteOffset,buf.byteLength))}else if(Array.isArray(buf)){for(let i=0;i<buf.length;i++){this.append(buf[i])}}else if(this._isBufferList(buf)){for(let i=0;i<buf._bufs.length;i++){this.append(buf._bufs[i])}}else{if(typeof buf==="number"){buf=buf.toString()}this._appendBuffer(Buffer.from(buf))}return this};BufferList.prototype._appendBuffer=function appendBuffer(buf){this._bufs.push(buf);this.length+=buf.length};BufferList.prototype.indexOf=function(search,offset,encoding){if(encoding===undefined&&typeof offset==="string"){encoding=offset;offset=undefined}if(typeof search==="function"||Array.isArray(search)){throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.')}else if(typeof search==="number"){search=Buffer.from([search])}else if(typeof search==="string"){search=Buffer.from(search,encoding)}else if(this._isBufferList(search)){search=search.slice()}else if(Array.isArray(search.buffer)){search=Buffer.from(search.buffer,search.byteOffset,search.byteLength)}else if(!Buffer.isBuffer(search)){search=Buffer.from(search)}offset=Number(offset||0);if(isNaN(offset)){offset=0}if(offset<0){offset=this.length+offset}if(offset<0){offset=0}if(search.length===0){return offset>this.length?this.length:offset}const blOffset=this._offset(offset);let blIndex=blOffset[0];let buffOffset=blOffset[1];for(;blIndex<this._bufs.length;blIndex++){const buff=this._bufs[blIndex];while(buffOffset<buff.length){const availableWindow=buff.length-buffOffset;if(availableWindow>=search.length){const nativeSearchResult=buff.indexOf(search,buffOffset);if(nativeSearchResult!==-1){return this._reverseOffset([blIndex,nativeSearchResult])}buffOffset=buff.length-search.length+1}else{const revOffset=this._reverseOffset([blIndex,buffOffset]);if(this._match(revOffset,search)){return revOffset}buffOffset++}}buffOffset=0}return-1};BufferList.prototype._match=function(offset,search){if(this.length-offset<search.length){return false}for(let searchOffset=0;searchOffset<search.length;searchOffset++){if(this.get(offset+searchOffset)!==search[searchOffset]){return false}}return true};(function(){const methods={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(const m in methods){(function(m){if(methods[m]===null){BufferList.prototype[m]=function(offset,byteLength){return this.slice(offset,offset+byteLength)[m](0,byteLength)}}else{BufferList.prototype[m]=function(offset=0){return this.slice(offset,offset+methods[m])[m](0)}}})(m)}})();BufferList.prototype._isBufferList=function _isBufferList(b){return b instanceof BufferList||BufferList.isBufferList(b)};BufferList.isBufferList=function isBufferList(b){return b!=null&&b[symbol]};module.exports=BufferList},{buffer:158}],32:[function(require,module,exports){"use strict";const DuplexStream=require("readable-stream").Duplex;const inherits=require("inherits");const BufferList=require("./BufferList");function BufferListStream(callback){if(!(this instanceof BufferListStream)){return new BufferListStream(callback)}if(typeof callback==="function"){this._callback=callback;const piper=function piper(err){if(this._callback){this._callback(err);this._callback=null}}.bind(this);this.on("pipe",function onPipe(src){src.on("error",piper)});this.on("unpipe",function onUnpipe(src){src.removeListener("error",piper)});callback=null}BufferList._init.call(this,callback);DuplexStream.call(this)}inherits(BufferListStream,DuplexStream);Object.assign(BufferListStream.prototype,BufferList.prototype);BufferListStream.prototype._new=function _new(callback){return new BufferListStream(callback)};BufferListStream.prototype._write=function _write(buf,encoding,callback){this._appendBuffer(buf);if(typeof callback==="function"){callback()}};BufferListStream.prototype._read=function _read(size){if(!this.length){return this.push(null)}size=Math.min(size,this.length);this.push(this.slice(0,size));this.consume(size)};BufferListStream.prototype.end=function end(chunk){DuplexStream.prototype.end.call(this,chunk);if(this._callback){this._callback(null,this.slice());this._callback=null}};BufferListStream.prototype._destroy=function _destroy(err,cb){this._bufs.length=0;this.length=0;cb(err)};BufferListStream.prototype._isBufferList=function _isBufferList(b){return b instanceof BufferListStream||b instanceof BufferList||BufferListStream.isBufferList(b)};BufferListStream.isBufferList=BufferList.isBufferList;module.exports=BufferListStream;module.exports.BufferListStream=BufferListStream;module.exports.BufferList=BufferList},{"./BufferList":31,inherits:37,"readable-stream":71}],33:[function(require,module,exports){(function(process){(function(){exports.formatArgs=formatArgs;exports.save=save;exports.load=load;exports.useColors=useColors;exports.storage=localstorage();exports.destroy=(()=>{let warned=false;return()=>{if(!warned){warned=true;console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}}})();exports.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function useColors(){if(typeof window!=="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)){return true}if(typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)){return false}return typeof document!=="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!=="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function formatArgs(args){args[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+args[0]+(this.useColors?"%c ":" ")+"+"+module.exports.humanize(this.diff);if(!this.useColors){return}const c="color: "+this.color;args.splice(1,0,c,"color: inherit");let index=0;let lastC=0;args[0].replace(/%[a-zA-Z%]/g,match=>{if(match==="%%"){return}index++;if(match==="%c"){lastC=index}});args.splice(lastC,0,c)}exports.log=console.debug||console.log||(()=>{});function save(namespaces){try{if(namespaces){exports.storage.setItem("debug",namespaces)}else{exports.storage.removeItem("debug")}}catch(error){}}function load(){let r;try{r=exports.storage.getItem("debug")}catch(error){}if(!r&&typeof process!=="undefined"&&"env"in process){r=process.env.DEBUG}return r}function localstorage(){try{return localStorage}catch(error){}}module.exports=require("./common")(exports);const{formatters}=module.exports;formatters.j=function(v){try{return JSON.stringify(v)}catch(error){return"[UnexpectedJSONParseError]: "+error.message}}}).call(this)}).call(this,require("_process"))},{"./common":34,_process:244}],34:[function(require,module,exports){function setup(env){createDebug.debug=createDebug;createDebug.default=createDebug;createDebug.coerce=coerce;createDebug.disable=disable;createDebug.enable=enable;createDebug.enabled=enabled;createDebug.humanize=require("ms");createDebug.destroy=destroy;Object.keys(env).forEach(key=>{createDebug[key]=env[key]});createDebug.names=[];createDebug.skips=[];createDebug.formatters={};function selectColor(namespace){let hash=0;for(let i=0;i<namespace.length;i++){hash=(hash<<5)-hash+namespace.charCodeAt(i);hash|=0}return createDebug.colors[Math.abs(hash)%createDebug.colors.length]}createDebug.selectColor=selectColor;function createDebug(namespace){let prevTime;let enableOverride=null;let namespacesCache;let enabledCache;function debug(...args){if(!debug.enabled){return}const self=debug;const curr=Number(new Date);const ms=curr-(prevTime||curr);self.diff=ms;self.prev=prevTime;self.curr=curr;prevTime=curr;args[0]=createDebug.coerce(args[0]);if(typeof args[0]!=="string"){args.unshift("%O")}let index=0;args[0]=args[0].replace(/%([a-zA-Z%])/g,(match,format)=>{if(match==="%%"){return"%"}index++;const formatter=createDebug.formatters[format];if(typeof formatter==="function"){const val=args[index];match=formatter.call(self,val);args.splice(index,1);index--}return match});createDebug.formatArgs.call(self,args);const logFn=self.log||createDebug.log;logFn.apply(self,args)}debug.namespace=namespace;debug.useColors=createDebug.useColors();debug.color=createDebug.selectColor(namespace);debug.extend=extend;debug.destroy=createDebug.destroy;Object.defineProperty(debug,"enabled",{enumerable:true,configurable:false,get:()=>{if(enableOverride!==null){return enableOverride}if(namespacesCache!==createDebug.namespaces){namespacesCache=createDebug.namespaces;enabledCache=createDebug.enabled(namespace)}return enabledCache},set:v=>{enableOverride=v}});if(typeof createDebug.init==="function"){createDebug.init(debug)}return debug}function extend(namespace,delimiter){const newDebug=createDebug(this.namespace+(typeof delimiter==="undefined"?":":delimiter)+namespace);newDebug.log=this.log;return newDebug}function enable(namespaces){createDebug.save(namespaces);createDebug.namespaces=namespaces;createDebug.names=[];createDebug.skips=[];let i;const split=(typeof namespaces==="string"?namespaces:"").split(/[\s,]+/);const len=split.length;for(i=0;i<len;i++){if(!split[i]){continue}namespaces=split[i].replace(/\*/g,".*?");if(namespaces[0]==="-"){createDebug.skips.push(new RegExp("^"+namespaces.substr(1)+"$"))}else{createDebug.names.push(new RegExp("^"+namespaces+"$"))}}}function disable(){const namespaces=[...createDebug.names.map(toNamespace),...createDebug.skips.map(toNamespace).map(namespace=>"-"+namespace)].join(",");createDebug.enable("");return namespaces}function enabled(name){if(name[name.length-1]==="*"){return true}let i;let len;for(i=0,len=createDebug.skips.length;i<len;i++){if(createDebug.skips[i].test(name)){return false}}for(i=0,len=createDebug.names.length;i<len;i++){if(createDebug.names[i].test(name)){return true}}return false}function toNamespace(regexp){return regexp.toString().substring(2,regexp.toString().length-2).replace(/\.\*\?$/,"*")}function coerce(val){if(val instanceof Error){return val.stack||val.message}return val}function destroy(){console.warn("