UNPKG

@zklogic/draw.io

Version:

Draw.IO - Graph Editor integration in Angular-cli

2 lines 44.9 kB
/*! For license information please see Dropbox-sdk.min.js.LICENSE.txt */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Dropbox=t():e.Dropbox=t()}(this,(function(){return function(e){function t(s){if(r[s])return r[s].exports;var i=r[s]={exports:{},id:s,loaded:!1};return e[s].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){var s=r(14);e.exports=s},function(e,t,r){(function(t,s){!function(t,r){e.exports=r()}(0,(function(){"use strict";function e(e){return"function"==typeof e}function i(){var e=setTimeout;return function(){return e(n,1)}}function n(){for(var e=0;e<x;e+=2)(0,D[e])(D[e+1]),D[e]=void 0,D[e+1]=void 0;x=0}function o(e,t){var r=arguments,s=this,i=new this.constructor(a);void 0===i[U]&&v(i);var n=s._state;return n?function(){var e=r[n-1];E((function(){return g(n,i,e,s._result)}))}():_(s,i,e,t),i}function u(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(a);return l(t,e),t}function a(){}function c(e){try{return e.then}catch(e){return G.error=e,G}}function p(t,r,s){r.constructor===t.constructor&&s===o&&r.constructor.resolve===u?function(e,t){t._state===M?f(e,t._result):t._state===j?d(e,t._result):_(t,void 0,(function(t){return l(e,t)}),(function(t){return d(e,t)}))}(t,r):s===G?(d(t,G.error),G.error=null):void 0===s?f(t,r):e(s)?function(e,t,r){E((function(e){var s=!1,i=function(e,t,r,s){try{e.call(t,r,s)}catch(e){return e}}(r,t,(function(r){s||(s=!0,t!==r?l(e,r):f(e,r))}),(function(t){s||(s=!0,d(e,t))}),e._label);!s&&i&&(s=!0,d(e,i))}),e)}(t,r,s):f(t,r)}function l(e,t){e===t?d(e,new TypeError("You cannot resolve a promise with itself")):function(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}(t)?p(e,t,c(t)):f(e,t)}function h(e){e._onerror&&e._onerror(e._result),m(e)}function f(e,t){e._state===F&&(e._result=t,e._state=M,0!==e._subscribers.length&&E(m,e))}function d(e,t){e._state===F&&(e._state=j,e._result=t,E(h,e))}function _(e,t,r,s){var i=e._subscribers,n=i.length;e._onerror=null,i[n]=t,i[n+M]=r,i[n+j]=s,0===n&&e._state&&E(m,e)}function m(e){var t=e._subscribers,r=e._state;if(0!==t.length){for(var s=void 0,i=void 0,n=e._result,o=0;o<t.length;o+=3)s=t[o],i=t[o+r],s?g(r,s,i,n):i(n);e._subscribers.length=0}}function y(){this.error=null}function g(t,r,s,i){var n=e(s),o=void 0,u=void 0,a=void 0,c=void 0;if(n){if(o=function(e,t){try{return e(t)}catch(e){return I.error=e,I}}(s,i),o===I?(c=!0,u=o.error,o.error=null):a=!0,r===o)return void d(r,new TypeError("A promises callback cannot return that same promise."))}else o=i,a=!0;r._state!==F||(n&&a?l(r,o):c?d(r,u):t===M?f(r,o):t===j&&d(r,o))}function v(e){e[U]=H++,e._state=void 0,e._result=void 0,e._subscribers=[]}function b(e,t){this._instanceConstructor=e,this.promise=new e(a),this.promise[U]||v(this.promise),T(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?f(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&f(this.promise,this._result))):d(this.promise,new Error("Array Methods must be provided an Array"))}function q(e){this[U]=H++,this._result=this._state=void 0,this._subscribers=[],a!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof q?function(e,t){try{t((function(t){l(e,t)}),(function(t){d(e,t)}))}catch(t){d(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}var w;w=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var T=w,x=0,k=void 0,A=void 0,E=function(e,t){D[x]=e,D[x+1]=t,2===(x+=2)&&(A?A(n):O())},C="undefined"!=typeof window?window:void 0,R=C||{},L=R.MutationObserver||R.WebKitMutationObserver,P="undefined"==typeof self&&void 0!==t&&"[object process]"==={}.toString.call(t),S="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,D=new Array(1e3),O=void 0;O=P?function(){return t.nextTick(n)}:L?function(){var e=0,t=new L(n),r=document.createTextNode("");return t.observe(r,{characterData:!0}),function(){r.data=e=++e%2}}():S?function(){var e=new MessageChannel;return e.port1.onmessage=n,function(){return e.port2.postMessage(0)}}():void 0===C?function(){try{var e=r(20);return void 0!==(k=e.runOnLoop||e.runOnContext)?function(){k(n)}:i()}catch(e){return i()}}():i();var U=Math.random().toString(36).substring(16),F=void 0,M=1,j=2,G=new y,I=new y,H=0;return b.prototype._enumerate=function(e){for(var t=0;this._state===F&&t<e.length;t++)this._eachEntry(e[t],t)},b.prototype._eachEntry=function(e,t){var r=this._instanceConstructor,s=r.resolve;if(s===u){var i=c(e);if(i===o&&e._state!==F)this._settledAt(e._state,t,e._result);else if("function"!=typeof i)this._remaining--,this._result[t]=e;else if(r===q){var n=new r(a);p(n,e,i),this._willSettleAt(n,t)}else this._willSettleAt(new r((function(t){return t(e)})),t)}else this._willSettleAt(s(e),t)},b.prototype._settledAt=function(e,t,r){var s=this.promise;s._state===F&&(this._remaining--,e===j?d(s,r):this._result[t]=r),0===this._remaining&&f(s,this._result)},b.prototype._willSettleAt=function(e,t){var r=this;_(e,void 0,(function(e){return r._settledAt(M,t,e)}),(function(e){return r._settledAt(j,t,e)}))},q.all=function(e){return new b(this,e).promise},q.race=function(e){var t=this;return new t(T(e)?function(r,s){for(var i=e.length,n=0;n<i;n++)t.resolve(e[n]).then(r,s)}:function(e,t){return t(new TypeError("You must pass an array to race."))})},q.resolve=u,q.reject=function(e){var t=new this(a);return d(t,e),t},q._setScheduler=function(e){A=e},q._setAsap=function(e){E=e},q._asap=E,q.prototype={constructor:q,then:o,catch:function(e){return this.then(null,e)}},q.polyfill=function(){var e=void 0;if(void 0!==s)e=s;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var r=null;try{r=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===r&&!t.cast)return}e.Promise=q},q.Promise=q,q}))}).call(t,r(8),function(){return this}())},function(e,t,r){function s(){}function i(e){if(!d(e))return e;var t=[];for(var r in e)n(t,r,e[r]);return t.join("&")}function n(e,t,r){if(null!=r)if(Array.isArray(r))r.forEach((function(r){n(e,t,r)}));else if(d(r))for(var s in r)n(e,t+"["+s+"]",r[s]);else e.push(encodeURIComponent(t)+"="+encodeURIComponent(r));else null===r&&e.push(encodeURIComponent(t))}function o(e){for(var t,r,s={},i=e.split("&"),n=0,o=i.length;n<o;++n)-1==(r=(t=i[n]).indexOf("="))?s[decodeURIComponent(t)]="":s[decodeURIComponent(t.slice(0,r))]=decodeURIComponent(t.slice(r+1));return s}function u(e){return/[\/+]json($|[^-\w])/.test(e)}function a(e){this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var t=this.xhr.status;1223===t&&(t=204),this._setStatusProperties(t),this.header=this.headers=function(e){for(var t,r,s,i,n=e.split(/\r?\n/),o={},u=0,a=n.length;u<a;++u)-1!==(t=(r=n[u]).indexOf(":"))&&(s=r.slice(0,t).toLowerCase(),i=g(r.slice(t+1)),o[s]=i);return o}(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&e._responseType?this.body=this.xhr.response:this.body="HEAD"!=this.req.method?this._parseBody(this.text?this.text:this.xhr.response):null}function c(e,t){var r=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",(function(){var e,t=null,s=null;try{s=new a(r)}catch(s){return(t=new Error("Parser is unable to parse the response")).parse=!0,t.original=s,r.xhr?(t.rawResponse=void 0===r.xhr.responseType?r.xhr.responseText:r.xhr.response,t.status=r.xhr.status?r.xhr.status:null,t.statusCode=t.status):(t.rawResponse=null,t.status=null),r.callback(t)}r.emit("response",s);try{r._isResponseOK(s)||(e=new Error(s.statusText||"Unsuccessful HTTP response"))}catch(t){e=t}e?(e.original=t,e.response=s,e.status=s.status,r.callback(e,s)):r.callback(null,s)}))}function p(e,t,r){var s=y("DELETE",e);return"function"==typeof t&&(r=t,t=null),t&&s.send(t),r&&s.end(r),s}var l;"undefined"!=typeof window?l=window:"undefined"!=typeof self?l=self:(console.warn("Using browser-only version of superagent in non-browser environment"),l=this);var h=r(7),f=r(10),d=r(4),_=r(11),m=r(9),y=t=e.exports=function(e,r){return"function"==typeof r?new t.Request("GET",e).end(r):1==arguments.length?new t.Request("GET",e):new t.Request(e,r)};t.Request=c,y.getXHR=function(){if(!(!l.XMLHttpRequest||l.location&&"file:"==l.location.protocol&&l.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw Error("Browser-only version of superagent could not find XHR")};var g="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};y.serializeObject=i,y.parseString=o,y.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},y.serialize={"application/x-www-form-urlencoded":i,"application/json":JSON.stringify},y.parse={"application/x-www-form-urlencoded":o,"application/json":JSON.parse},_(a.prototype),a.prototype._parseBody=function(e){var t=y.parse[this.type];return this.req._parser?this.req._parser(this,e):(!t&&u(this.type)&&(t=y.parse["application/json"]),t&&e&&(e.length||e instanceof Object)?t(e):null)},a.prototype.toError=function(){var e=this.req,t=e.method,r=e.url,s="cannot "+t+" "+r+" ("+this.status+")",i=new Error(s);return i.status=this.status,i.method=t,i.url=r,i},y.Response=a,h(c.prototype),f(c.prototype),c.prototype.type=function(e){return this.set("Content-Type",y.types[e]||e),this},c.prototype.accept=function(e){return this.set("Accept",y.types[e]||e),this},c.prototype.auth=function(e,t,r){1===arguments.length&&(t=""),"object"==typeof t&&null!==t&&(r=t,t=""),r||(r={type:"function"==typeof btoa?"basic":"auto"});var s=function(e){if("function"==typeof btoa)return btoa(e);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(e,t,r,s)},c.prototype.query=function(e){return"string"!=typeof e&&(e=i(e)),e&&this._query.push(e),this},c.prototype.attach=function(e,t,r){if(t){if(this._data)throw Error("superagent can't mix .send() and .attach()");this._getFormData().append(e,t,r||t.name)}return this},c.prototype._getFormData=function(){return this._formData||(this._formData=new l.FormData),this._formData},c.prototype.callback=function(e,t){if(this._shouldRetry(e,t))return this._retry();var r=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),r(e,t)},c.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},c.prototype.buffer=c.prototype.ca=c.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},c.prototype.pipe=c.prototype.write=function(){throw Error("Streaming is not supported in browser version of superagent")},c.prototype._isHost=function(e){return e&&"object"==typeof e&&!Array.isArray(e)&&"[object Object]"!==Object.prototype.toString.call(e)},c.prototype.end=function(e){return this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=e||s,this._finalizeQueryString(),this._end()},c.prototype._end=function(){var e=this,t=this.xhr=y.getXHR(),r=this._formData||this._data;this._setTimeouts(),t.onreadystatechange=function(){var r=t.readyState;if(r>=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4==r){var s;try{s=t.status}catch(e){s=0}if(!s){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var s=function(t,r){r.total>0&&(r.percent=r.loaded/r.total*100),r.direction=t,e.emit("progress",r)};if(this.hasListeners("progress"))try{t.onprogress=s.bind(null,"download"),t.upload&&(t.upload.onprogress=s.bind(null,"upload"))}catch(e){}try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof r&&!this._isHost(r)){var i=this._header["content-type"],n=this._serializer||y.serialize[i?i.split(";")[0]:""];!n&&u(i)&&(n=y.serialize["application/json"]),n&&(r=n(r))}for(var o in this.header)null!=this.header[o]&&this.header.hasOwnProperty(o)&&t.setRequestHeader(o,this.header[o]);return this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send(void 0!==r?r:null),this},y.agent=function(){return new m},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach((function(e){m.prototype[e.toLowerCase()]=function(t,r){var s=new y.Request(e,t);return this._setDefaults(s),r&&s.end(r),s}})),m.prototype.del=m.prototype.delete,y.get=function(e,t,r){var s=y("GET",e);return"function"==typeof t&&(r=t,t=null),t&&s.query(t),r&&s.end(r),s},y.head=function(e,t,r){var s=y("HEAD",e);return"function"==typeof t&&(r=t,t=null),t&&s.query(t),r&&s.end(r),s},y.options=function(e,t,r){var s=y("OPTIONS",e);return"function"==typeof t&&(r=t,t=null),t&&s.send(t),r&&s.end(r),s},y.del=p,y.delete=p,y.patch=function(e,t,r){var s=y("PATCH",e);return"function"==typeof t&&(r=t,t=null),t&&s.send(t),r&&s.end(r),s},y.post=function(e,t,r){var s=y("POST",e);return"function"==typeof t&&(r=t,t=null),t&&s.send(t),r&&s.end(r),s},y.put=function(e,t,r){var s=y("PUT",e);return"function"==typeof t&&(r=t,t=null),t&&s.send(t),r&&s.end(r),s}},function(e,t){e.exports=function(e){return"https://"+e+".dropboxapi.com/2/"}},function(e,t){"use strict";e.exports=function(e){return null!==e&&"object"==typeof e}},function(e,t){var r=/[\u007f-\uffff]/g;e.exports=function(e){return JSON.stringify(e).replace(r,(function(e){return"\\u"+("000"+e.charCodeAt(0).toString(16)).slice(-4)}))}},function(e,t,r){var s,i=r(16);r(15),s=function(e){e=e||{},this.accessToken=e.accessToken,this.clientId=e.clientId,this.selectUser=e.selectUser},s.prototype.setAccessToken=function(e){this.accessToken=e},s.prototype.getAccessToken=function(){return this.accessToken},s.prototype.setClientId=function(e){this.clientId=e},s.prototype.getClientId=function(){return this.clientId},s.prototype.getAuthenticationUrl=function(e,t){var r,s=this.getClientId();if(!s)throw new Error("A client id is required. You can set the client id using .setClientId().");if(!e)throw new Error("A redirect uri is required.");return r="https://www.dropbox.com/oauth2/authorize?response_type=token&client_id="+s,e&&(r=r+"&redirect_uri="+e),t&&(r=r+"&state="+t),r},s.prototype.authenticateWithCordova=function(e,t){var r=this.getAuthenticationUrl("https://www.dropbox.com/1/oauth2/redirect_receiver"),s=window.open(r,"_blank"),i=!1,n=function(e){window.setTimeout((function(){s.close()}),10),t()},o=function(r){if(r.url.indexOf("&error=")>-1)window.setTimeout((function(){s.close()}),10),t();else{var i="#access_token=",n=r.url.indexOf(i),o=r.url.indexOf("&token_type=");if(n>-1){n+=i.length,window.setTimeout((function(){s.close()}),10);var u=r.url.substring(n,o);e(u)}}},u=function(e){i||(s.removeEventListener("loaderror",n),s.removeEventListener("loadstop",o),s.removeEventListener("exit",u),i=!0)};s.addEventListener("loaderror",n),s.addEventListener("loadstop",o),s.addEventListener("exit",u)},s.prototype.request=function(e,t,r,s,n){var o=null;switch(n){case i.RPC:o=this.getRpcRequest();break;case i.DOWNLOAD:o=this.getDownloadRequest();break;case i.UPLOAD:o=this.getUploadRequest();break;default:throw new Error("Invalid request style: "+n)}return o(e,t,r,s,this.getAccessToken(),this.selectUser)},s.prototype.setRpcRequest=function(e){s.prototype.rpcRequest=e},s.prototype.getRpcRequest=function(){return void 0===s.prototype.rpcRequest&&(s.prototype.rpcRequest=r(18)),s.prototype.rpcRequest},s.prototype.setDownloadRequest=function(e){s.prototype.downloadRequest=e},s.prototype.getDownloadRequest=function(){return void 0===s.prototype.downloadRequest&&(s.prototype.downloadRequest=r(13)),s.prototype.downloadRequest},s.prototype.setUploadRequest=function(e){s.prototype.uploadRequest=e},s.prototype.getUploadRequest=function(){return void 0===s.prototype.uploadRequest&&(s.prototype.uploadRequest=r(19)),s.prototype.uploadRequest},e.exports=s},function(e,t,r){function s(e){if(e)return function(e){for(var t in s.prototype)e[t]=s.prototype[t];return e}(e)}e.exports=s,s.prototype.on=s.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},s.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this},s.prototype.off=s.prototype.removeListener=s.prototype.removeAllListeners=s.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var s,i=0;i<r.length;i++)if((s=r[i])===t||s.fn===t){r.splice(i,1);break}return this},s.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),r=this._callbacks["$"+e];if(r)for(var s=0,i=(r=r.slice(0)).length;s<i;++s)r[s].apply(this,t);return this},s.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},s.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t){function r(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function i(e){if(c===setTimeout)return setTimeout(e,0);if((c===r||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function n(){d&&h&&(d=!1,h.length?f=h.concat(f):_=-1,f.length&&o())}function o(){if(!d){var e=i(n);d=!0;for(var t=f.length;t;){for(h=f,f=[];++_<t;)h&&h[_].run();_=-1,t=f.length}h=null,d=!1,function(e){if(p===clearTimeout)return clearTimeout(e);if((p===s||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}(e)}}function u(e,t){this.fun=e,this.array=t}function a(){}var c,p,l=e.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:r}catch(e){c=r}try{p="function"==typeof clearTimeout?clearTimeout:s}catch(e){p=s}}();var h,f=[],d=!1,_=-1;l.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];f.push(new u(e,t)),1!==f.length||d||i(o)},u.prototype.run=function(){this.fun.apply(null,this.array)},l.title="browser",l.browser=!0,l.env={},l.argv=[],l.version="",l.versions={},l.on=a,l.addListener=a,l.once=a,l.off=a,l.removeListener=a,l.removeAllListeners=a,l.emit=a,l.prependListener=a,l.prependOnceListener=a,l.listeners=function(e){return[]},l.binding=function(e){throw new Error("process.binding is not supported")},l.cwd=function(){return"/"},l.chdir=function(e){throw new Error("process.chdir is not supported")},l.umask=function(){return 0}},function(e,t){function r(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert"].forEach((function(e){r.prototype[e]=function(){return this._defaults.push({fn:e,arguments}),this}})),r.prototype._setDefaults=function(e){this._defaults.forEach((function(t){e[t.fn].apply(e,t.arguments)}))},e.exports=r},function(e,t,r){"use strict";function s(e){if(e)return function(e){for(var t in s.prototype)e[t]=s.prototype[t];return e}(e)}var i=r(4);e.exports=s,s.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,this},s.prototype.parse=function(e){return this._parser=e,this},s.prototype.responseType=function(e){return this._responseType=e,this},s.prototype.serialize=function(e){return this._serializer=e,this},s.prototype.timeout=function(e){if(!e||"object"!=typeof e)return this._timeout=e,this._responseTimeout=0,this;for(var t in e)switch(t){case"deadline":this._timeout=e.deadline;break;case"response":this._responseTimeout=e.response;break;default:console.warn("Unknown timeout option",t)}return this},s.prototype.retry=function(e,t){return 0!==arguments.length&&!0!==e||(e=1),e<=0&&(e=0),this._maxRetries=e,this._retries=0,this._retryCallback=t,this};var n=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];s.prototype._shouldRetry=function(e,t){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var r=this._retryCallback(e,t);if(!0===r)return!0;if(!1===r)return!1}catch(e){console.error(e)}if(t&&t.status&&t.status>=500&&501!=t.status)return!0;if(e){if(e.code&&~n.indexOf(e.code))return!0;if(e.timeout&&"ECONNABORTED"==e.code)return!0;if(e.crossDomain)return!0}return!1},s.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},s.prototype.then=function(e,t){if(!this._fullfilledPromise){var r=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise((function(e,t){r.end((function(r,s){r?t(r):e(s)}))}))}return this._fullfilledPromise.then(e,t)},s.prototype.catch=function(e){return this.then(void 0,e)},s.prototype.use=function(e){return e(this),this},s.prototype.ok=function(e){if("function"!=typeof e)throw Error("Callback required");return this._okCallback=e,this},s.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},s.prototype.get=function(e){return this._header[e.toLowerCase()]},s.prototype.getHeader=s.prototype.get,s.prototype.set=function(e,t){if(i(e)){for(var r in e)this.set(r,e[r]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},s.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},s.prototype.field=function(e,t){if(null==e)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),i(e)){for(var r in e)this.field(r,e[r]);return this}if(Array.isArray(t)){for(var s in t)this.field(e,t[s]);return this}if(null==t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=""+t),this._getFormData().append(e,t),this},s.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},s.prototype._auth=function(e,t,r,s){switch(r.type){case"basic":this.set("Authorization","Basic "+s(e+":"+t));break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization","Bearer "+e)}return this},s.prototype.withCredentials=function(e){return null==e&&(e=!0),this._withCredentials=e,this},s.prototype.redirects=function(e){return this._maxRedirects=e,this},s.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw TypeError("Invalid argument");return this._maxResponseSize=e,this},s.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},s.prototype.send=function(e){var t=i(e),r=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(t&&i(this._data))for(var s in e)this._data[s]=e[s];else"string"==typeof e?(r||this.type("form"),r=this._header["content-type"],this._data="application/x-www-form-urlencoded"==r?this._data?this._data+"&"+e:e:(this._data||"")+e):this._data=e;return!t||this._isHost(e)||r||this.type("json"),this},s.prototype.sortQuery=function(e){return this._sort=void 0===e||e,this},s.prototype._finalizeQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.indexOf("?")>=0?"&":"?")+e),this._query.length=0,this._sort){var t=this.url.indexOf("?");if(t>=0){var r=this.url.substring(t+1).split("&");"function"==typeof this._sort?r.sort(this._sort):r.sort(),this.url=this.url.substring(0,t)+"?"+r.join("&")}}},s.prototype._appendQueryString=function(){console.trace("Unsupported")},s.prototype._timeoutError=function(e,t,r){if(!this._aborted){var s=new Error(e+t+"ms exceeded");s.timeout=t,s.code="ECONNABORTED",s.errno=r,this.timedout=!0,this.abort(),this.callback(s)}},s.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout((function(){e._timeoutError("Timeout of ",e._timeout,"ETIME")}),this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout((function(){e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")}),this._responseTimeout))}},function(e,t,r){"use strict";function s(e){if(e)return function(e){for(var t in s.prototype)e[t]=s.prototype[t];return e}(e)}var i=r(12);e.exports=s,s.prototype.get=function(e){return this.header[e.toLowerCase()]},s.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=i.type(t);var r=i.params(t);for(var s in r)this[s]=r[s];this.links={};try{e.link&&(this.links=i.parseLinks(e.link))}catch(e){}},s.prototype._setStatusProperties=function(e){var t=e/100|0;this.status=this.statusCode=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.redirect=3==t,this.clientError=4==t,this.serverError=5==t,this.error=(4==t||5==t)&&this.toError(),this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.forbidden=403==e,this.notFound=404==e}},function(e,t){"use strict";t.type=function(e){return e.split(/ *; */).shift()},t.params=function(e){return e.split(/ *; */).reduce((function(e,t){var r=t.split(/ *= */),s=r.shift(),i=r.shift();return s&&i&&(e[s]=i),e}),{})},t.parseLinks=function(e){return e.split(/ *, */).reduce((function(e,t){var r=t.split(/ *; */),s=r[0].slice(1,-1);return e[r[1].split(/ *= */)[1].slice(1,-1)]=s,e}),{})},t.cleanHeader=function(e,t){return delete e["content-type"],delete e["content-length"],delete e["transfer-encoding"],delete e.host,t&&(delete e.authorization,delete e.cookie),e}},function(e,t,r){var s,i,n,o=r(2),u=r(1).Promise,a=r(3),c=r(5);o.parse["application/octect-stream"]=function(e){return e},s=function(e,t){return{status:e.status,error:(t?t.text:null)||e.toString(),response:t}},n=function(e,t){e.text="",e.setEncoding("binary"),e.on("data",(function(t){e.text+=t})),e.on("end",(function(){t()}))},i=function(e,t,r,i,p,l){if("user"!==r)throw new Error("Unexpected auth type: "+r);return new u((function(r,u){function h(e){r&&r(e)}function f(e,t){var r;e?function(e){u&&u(e)}(s(e,t)):(r=JSON.parse(t.headers["dropbox-api-result"]),t.xhr?r.fileBlob=t.xhr.response:r.fileBinary=t.res.text,h(r))}var d;d=o.post(a(i)+e).set("Authorization","Bearer "+p).set("Dropbox-API-Arg",c(t)).on("request",(function(){this.xhr&&(this.xhr.responseType="blob")})),l&&(d=d.set("Dropbox-API-Select-User",l)),"undefined"==typeof window?d.buffer(!0).parse(n).end(f):d.end(f)}))},e.exports=i},function(e,t,r){var s,i=r(6),n=r(17);s=function(e){i.call(this,e)},(s.prototype=Object.create(i.prototype)).constructor=s,(s.prototype=Object.assign(s.prototype,n)).filesGetSharedLinkFile=function(e){return this.request("sharing/get_shared_link_file",e,"api","download")},e.exports=s},function(e,t){"function"!=typeof Object.assign&&(Object.assign=function(e){"use strict";var t,r,s,i;if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(t=Object(e),r=1;r<arguments.length;r++)if(null!=(s=arguments[r]))for(i in s)s.hasOwnProperty(i)&&(t[i]=s[i]);return t})},function(e,t){e.exports={RPC:"rpc",DOWNLOAD:"download",UPLOAD:"upload"}},function(e,t){e.exports={authTokenFromOauth1:function(e){return this.request("auth/token/from_oauth1",e,"app","api","rpc")},authTokenRevoke:function(e){return this.request("auth/token/revoke",e,"user","api","rpc")},filePropertiesPropertiesAdd:function(e){return this.request("file_properties/properties/add",e,"user","api","rpc")},filePropertiesPropertiesOverwrite:function(e){return this.request("file_properties/properties/overwrite",e,"user","api","rpc")},filePropertiesPropertiesRemove:function(e){return this.request("file_properties/properties/remove",e,"user","api","rpc")},filePropertiesPropertiesSearch:function(e){return this.request("file_properties/properties/search",e,"user","api","rpc")},filePropertiesPropertiesSearchContinue:function(e){return this.request("file_properties/properties/search/continue",e,"user","api","rpc")},filePropertiesPropertiesUpdate:function(e){return this.request("file_properties/properties/update",e,"user","api","rpc")},filePropertiesTemplatesAddForTeam:function(e){return this.request("file_properties/templates/add_for_team",e,"team","api","rpc")},filePropertiesTemplatesAddForUser:function(e){return this.request("file_properties/templates/add_for_user",e,"user","api","rpc")},filePropertiesTemplatesGetForTeam:function(e){return this.request("file_properties/templates/get_for_team",e,"team","api","rpc")},filePropertiesTemplatesGetForUser:function(e){return this.request("file_properties/templates/get_for_user",e,"user","api","rpc")},filePropertiesTemplatesListForTeam:function(e){return this.request("file_properties/templates/list_for_team",e,"team","api","rpc")},filePropertiesTemplatesListForUser:function(e){return this.request("file_properties/templates/list_for_user",e,"user","api","rpc")},filePropertiesTemplatesRemoveForTeam:function(e){return this.request("file_properties/templates/remove_for_team",e,"team","api","rpc")},filePropertiesTemplatesRemoveForUser:function(e){return this.request("file_properties/templates/remove_for_user",e,"user","api","rpc")},filePropertiesTemplatesUpdateForTeam:function(e){return this.request("file_properties/templates/update_for_team",e,"team","api","rpc")},filePropertiesTemplatesUpdateForUser:function(e){return this.request("file_properties/templates/update_for_user",e,"user","api","rpc")},fileRequestsCreate:function(e){return this.request("file_requests/create",e,"user","api","rpc")},fileRequestsGet:function(e){return this.request("file_requests/get",e,"user","api","rpc")},fileRequestsList:function(e){return this.request("file_requests/list",e,"user","api","rpc")},fileRequestsUpdate:function(e){return this.request("file_requests/update",e,"user","api","rpc")},filesAlphaGetMetadata:function(e){return this.request("files/alpha/get_metadata",e,"user","api","rpc")},filesAlphaUpload:function(e){return this.request("files/alpha/upload",e,"user","content","upload")},filesCopy:function(e){return this.request("files/copy",e,"user","api","rpc")},filesCopyBatch:function(e){return this.request("files/copy_batch",e,"user","api","rpc")},filesCopyBatchCheck:function(e){return this.request("files/copy_batch/check",e,"user","api","rpc")},filesCopyReferenceGet:function(e){return this.request("files/copy_reference/get",e,"user","api","rpc")},filesCopyReferenceSave:function(e){return this.request("files/copy_reference/save",e,"user","api","rpc")},filesCopyV2:function(e){return this.request("files/copy_v2",e,"user","api","rpc")},filesCreateFolder:function(e){return this.request("files/create_folder",e,"user","api","rpc")},filesCreateFolderV2:function(e){return this.request("files/create_folder_v2",e,"user","api","rpc")},filesDelete:function(e){return this.request("files/delete",e,"user","api","rpc")},filesDeleteBatch:function(e){return this.request("files/delete_batch",e,"user","api","rpc")},filesDeleteBatchCheck:function(e){return this.request("files/delete_batch/check",e,"user","api","rpc")},filesDeleteV2:function(e){return this.request("files/delete_v2",e,"user","api","rpc")},filesDownload:function(e){return this.request("files/download",e,"user","content","download")},filesDownloadZip:function(e){return this.request("files/download_zip",e,"user","content","download")},filesGetMetadata:function(e){return this.request("files/get_metadata",e,"user","api","rpc")},filesGetPreview:function(e){return this.request("files/get_preview",e,"user","content","download")},filesGetTemporaryLink:function(e){return this.request("files/get_temporary_link",e,"user","api","rpc")},filesGetThumbnail:function(e){return this.request("files/get_thumbnail",e,"user","content","download")},filesGetThumbnailBatch:function(e){return this.request("files/get_thumbnail_batch",e,"user","content","rpc")},filesListFolder:function(e){return this.request("files/list_folder",e,"user","api","rpc")},filesListFolderContinue:function(e){return this.request("files/list_folder/continue",e,"user","api","rpc")},filesListFolderGetLatestCursor:function(e){return this.request("files/list_folder/get_latest_cursor",e,"user","api","rpc")},filesListFolderLongpoll:function(e){return this.request("files/list_folder/longpoll",e,"noauth","notify","rpc")},filesListRevisions:function(e){return this.request("files/list_revisions",e,"user","api","rpc")},filesMove:function(e){return this.request("files/move",e,"user","api","rpc")},filesMoveBatch:function(e){return this.request("files/move_batch",e,"user","api","rpc")},filesMoveBatchCheck:function(e){return this.request("files/move_batch/check",e,"user","api","rpc")},filesMoveV2:function(e){return this.request("files/move_v2",e,"user","api","rpc")},filesPermanentlyDelete:function(e){return this.request("files/permanently_delete",e,"user","api","rpc")},filesPropertiesAdd:function(e){return this.request("files/properties/add",e,"user","api","rpc")},filesPropertiesOverwrite:function(e){return this.request("files/properties/overwrite",e,"user","api","rpc")},filesPropertiesRemove:function(e){return this.request("files/properties/remove",e,"user","api","rpc")},filesPropertiesTemplateGet:function(e){return this.request("files/properties/template/get",e,"user","api","rpc")},filesPropertiesTemplateList:function(e){return this.request("files/properties/template/list",e,"user","api","rpc")},filesPropertiesUpdate:function(e){return this.request("files/properties/update",e,"user","api","rpc")},filesRestore:function(e){return this.request("files/restore",e,"user","api","rpc")},filesSaveUrl:function(e){return this.request("files/save_url",e,"user","api","rpc")},filesSaveUrlCheckJobStatus:function(e){return this.request("files/save_url/check_job_status",e,"user","api","rpc")},filesSearch:function(e){return this.request("files/search",e,"user","api","rpc")},filesUpload:function(e){return this.request("files/upload",e,"user","content","upload")},filesUploadSessionAppend:function(e){return this.request("files/upload_session/append",e,"user","content","upload")},filesUploadSessionAppendV2:function(e){return this.request("files/upload_session/append_v2",e,"user","content","upload")},filesUploadSessionFinish:function(e){return this.request("files/upload_session/finish",e,"user","content","upload")},filesUploadSessionFinishBatch:function(e){return this.request("files/upload_session/finish_batch",e,"user","api","rpc")},filesUploadSessionFinishBatchCheck:function(e){return this.request("files/upload_session/finish_batch/check",e,"user","api","rpc")},filesUploadSessionStart:function(e){return this.request("files/upload_session/start",e,"user","content","upload")},paperDocsArchive:function(e){return this.request("paper/docs/archive",e,"user","api","rpc")},paperDocsCreate:function(e){return this.request("paper/docs/create",e,"user","api","upload")},paperDocsDownload:function(e){return this.request("paper/docs/download",e,"user","api","download")},paperDocsFolderUsersList:function(e){return this.request("paper/docs/folder_users/list",e,"user","api","rpc")},paperDocsFolderUsersListContinue:function(e){return this.request("paper/docs/folder_users/list/continue",e,"user","api","rpc")},paperDocsGetFolderInfo:function(e){return this.request("paper/docs/get_folder_info",e,"user","api","rpc")},paperDocsList:function(e){return this.request("paper/docs/list",e,"user","api","rpc")},paperDocsListContinue:function(e){return this.request("paper/docs/list/continue",e,"user","api","rpc")},paperDocsPermanentlyDelete:function(e){return this.request("paper/docs/permanently_delete",e,"user","api","rpc")},paperDocsSharingPolicyGet:function(e){return this.request("paper/docs/sharing_policy/get",e,"user","api","rpc")},paperDocsSharingPolicySet:function(e){return this.request("paper/docs/sharing_policy/set",e,"user","api","rpc")},paperDocsUpdate:function(e){return this.request("paper/docs/update",e,"user","api","upload")},paperDocsUsersAdd:function(e){return this.request("paper/docs/users/add",e,"user","api","rpc")},paperDocsUsersList:function(e){return this.request("paper/docs/users/list",e,"user","api","rpc")},paperDocsUsersListContinue:function(e){return this.request("paper/docs/users/list/continue",e,"user","api","rpc")},paperDocsUsersRemove:function(e){return this.request("paper/docs/users/remove",e,"user","api","rpc")},sharingAddFileMember:function(e){return this.request("sharing/add_file_member",e,"user","api","rpc")},sharingAddFolderMember:function(e){return this.request("sharing/add_folder_member",e,"user","api","rpc")},sharingChangeFileMemberAccess:function(e){return this.request("sharing/change_file_member_access",e,"user","api","rpc")},sharingCheckJobStatus:function(e){return this.request("sharing/check_job_status",e,"user","api","rpc")},sharingCheckRemoveMemberJobStatus:function(e){return this.request("sharing/check_remove_member_job_status",e,"user","api","rpc")},sharingCheckShareJobStatus:function(e){return this.request("sharing/check_share_job_status",e,"user","api","rpc")},sharingCreateSharedLink:function(e){return this.request("sharing/create_shared_link",e,"user","api","rpc")},sharingCreateSharedLinkWithSettings:function(e){return this.request("sharing/create_shared_link_with_settings",e,"user","api","rpc")},sharingGetFileMetadata:function(e){return this.request("sharing/get_file_metadata",e,"user","api","rpc")},sharingGetFileMetadataBatch:function(e){return this.request("sharing/get_file_metadata/batch",e,"user","api","rpc")},sharingGetFolderMetadata:function(e){return this.request("sharing/get_folder_metadata",e,"user","api","rpc")},sharingGetSharedLinkFile:function(e){return this.request("sharing/get_shared_link_file",e,"user","content","download")},sharingGetSharedLinkMetadata:function(e){return this.request("sharing/get_shared_link_metadata",e,"user","api","rpc")},sharingGetSharedLinks:function(e){return this.request("sharing/get_shared_links",e,"user","api","rpc")},sharingListFileMembers:function(e){return this.request("sharing/list_file_members",e,"user","api","rpc")},sharingListFileMembersBatch:function(e){return this.request("sharing/list_file_members/batch",e,"user","api","rpc")},sharingListFileMembersContinue:function(e){return this.request("sharing/list_file_members/continue",e,"user","api","rpc")},sharingListFolderMembers:function(e){return this.request("sharing/list_folder_members",e,"user","api","rpc")},sharingListFolderMembersContinue:function(e){return this.request("sharing/list_folder_members/continue",e,"user","api","rpc")},sharingListFolders:function(e){return this.request("sharing/list_folders",e,"user","api","rpc")},sharingListFoldersContinue:function(e){return this.request("sharing/list_folders/continue",e,"user","api","rpc")},sharingListMountableFolders:function(e){return this.request("sharing/list_mountable_folders",e,"user","api","rpc")},sharingListMountableFoldersContinue:function(e){return this.request("sharing/list_mountable_folders/continue",e,"user","api","rpc")},sharingListReceivedFiles:function(e){return this.request("sharing/list_received_files",e,"user","api","rpc")},sharingListReceivedFilesContinue:function(e){return this.request("sharing/list_received_files/continue",e,"user","api","rpc")},sharingListSharedLinks:function(e){return this.request("sharing/list_shared_links",e,"user","api","rpc")},sharingModifySharedLinkSettings:function(e){return this.request("sharing/modify_shared_link_settings",e,"user","api","rpc")},sharingMountFolder:function(e){return this.request("sharing/mount_folder",e,"user","api","rpc")},sharingRelinquishFileMembership:function(e){return this.request("sharing/relinquish_file_membership",e,"user","api","rpc")},sharingRelinquishFolderMembership:function(e){return this.request("sharing/relinquish_folder_membership",e,"user","api","rpc")},sharingRemoveFileMember:function(e){return this.request("sharing/remove_file_member",e,"user","api","rpc")},sharingRemoveFileMember2:function(e){return this.request("sharing/remove_file_member_2",e,"user","api","rpc")},sharingRemoveFolderMember:function(e){return this.request("sharing/remove_folder_member",e,"user","api","rpc")},sharingRevokeSharedLink:function(e){return this.request("sharing/revoke_shared_link",e,"user","api","rpc")},sharingShareFolder:function(e){return this.request("sharing/share_folder",e,"user","api","rpc")},sharingTransferFolder:function(e){return this.request("sharing/transfer_folder",e,"user","api","rpc")},sharingUnmountFolder:function(e){return this.request("sharing/unmount_folder",e,"user","api","rpc")},sharingUnshareFile:function(e){return this.request("sharing/unshare_file",e,"user","api","rpc")},sharingUnshareFolder:function(e){return this.request("sharing/unshare_folder",e,"user","api","rpc")},sharingUpdateFileMember:function(e){return this.request("sharing/update_file_member",e,"user","api","rpc")},sharingUpdateFolderMember:function(e){return this.request("sharing/update_folder_member",e,"user","api","rpc")},sharingUpdateFolderPolicy:function(e){return this.request("sharing/update_folder_policy",e,"user","api","rpc")},teamLogGetEvents:function(e){return this.request("team_log/get_events",e,"team","api","rpc")},teamLogGetEventsContinue:function(e){return this.request("team_log/get_events/continue",e,"team","api","rpc")},usersGetAccount:function(e){return this.request("users/get_account",e,"user","api","rpc")},usersGetAccountBatch:function(e){return this.request("users/get_account_batch",e,"user","api","rpc")},usersGetCurrentAccount:function(e){return this.request("users/get_current_account",e,"user","api","rpc")},usersGetSpaceUsage:function(e){return this.request("users/get_space_usage",e,"user","api","rpc")}}},function(e,t,r){var s=r(2),i=r(1).Promise,n=r(3);e.exports=function(e,t,r,o,u,a){return new i((function(i,c){var p;switch(t||(t=null),p=s.post(n(o)+e).type("application/json"),r){case"team":case"user":p.set("Authorization","Bearer "+u);break;case"noauth":break;default:throw new Error("Unhandled auth type: "+r)}a&&(p=p.set("Dropbox-API-Select-User",a)),p.send(t).end((function(e,t){e?function(e){c&&c(e)}(function(e,t){var r;if(t)try{r=JSON.parse(t.text)}catch(e){r=t.text}return{status:e.status,error:r||e,response:t}}(e,t)):function(e){i&&i(e)}(t.body)}))}))}},function(e,t,r){var s=r(2),i=r(1).Promise,n=r(3),o=r(5);e.exports=function(e,t,r,u,a,c){if("user"!==r)throw new Error("Unexpected auth type: "+r);return new i((function(r,i){var p,l=t.contents;delete t.contents,p=s.post(n(u)+e).type("application/octet-stream").set("Authorization","Bearer "+a).set("Dropbox-API-Arg",o(t)),c&&(p=p.set("Dropbox-API-Select-User",c)),p.send(l).end((function(e,t){e?function(e){i&&i(e)}(function(e,t){return{status:e.status,error:(t?t.text:null)||e.toString(),response:t}}(e,t)):function(e){r&&r(e)}(t.body)}))}))}},function(e,t){}])}));