UNPKG

@atlassian/bitbucket-server

Version:

Bitbucket Server API client for Browser and Node.js

278 lines (228 loc) 89.8 kB
var BitbucketServer = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = "./src/index.js"); /******/ }) /************************************************************************/ /******/ ({ /***/ "./node_modules/before-after-hook/index.js": /*!*************************************************!*\ !*** ./node_modules/before-after-hook/index.js ***! \*************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { eval("var register = __webpack_require__(/*! ./lib/register */ \"./node_modules/before-after-hook/lib/register.js\")\nvar addHook = __webpack_require__(/*! ./lib/add */ \"./node_modules/before-after-hook/lib/add.js\")\nvar removeHook = __webpack_require__(/*! ./lib/remove */ \"./node_modules/before-after-hook/lib/remove.js\")\n\n// bind with array of arguments: https://stackoverflow.com/a/21792913\nvar bind = Function.bind\nvar bindable = bind.bind(bind)\n\nfunction bindApi (hook, state, name) {\n var removeHookRef = bindable(removeHook, null).apply(null, name ? [state, null, name] : [state, null])\n hook.api = { remove: removeHookRef }\n hook.remove = removeHookRef\n\n ;['before', 'error', 'after', 'wrap'].forEach(function (kind) {\n var args = name ? [state, kind, name] : [state, kind]\n hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args)\n hook.remove[kind] = hook.api.remove[kind] = bindable(removeHook, null).apply(null, args)\n })\n}\n\nfunction HookSingular () {\n var singularHookName = 'h'\n var singularHookState = {\n registry: {}\n }\n var singularHook = register.bind(null, singularHookState, singularHookName)\n bindApi(singularHook, singularHookState, singularHookName)\n return singularHook\n}\n\nfunction HookCollection () {\n var state = {\n registry: {}\n }\n\n var hook = register.bind(null, state)\n bindApi(hook, state)\n\n return hook\n}\n\nvar collectionHookDeprecationMessageDisplayed = false\nfunction Hook () {\n if (!collectionHookDeprecationMessageDisplayed) {\n console.warn('[before-after-hook]: \"Hook()\" repurposing warning, use \"Hook.Collection()\". Read more: https://git.io/upgrade-before-after-hook-to-1.4')\n collectionHookDeprecationMessageDisplayed = true\n }\n return HookCollection()\n}\n\nHook.Singular = HookSingular.bind()\nHook.Collection = HookCollection.bind()\n\nmodule.exports = Hook\n// expose constructors as a named property for TypeScript\nmodule.exports.Hook = Hook\nmodule.exports.Singular = Hook.Singular\nmodule.exports.Collection = Hook.Collection\n\n\n//# sourceURL=webpack://BitbucketServer/./node_modules/before-after-hook/index.js?"); /***/ }), /***/ "./node_modules/before-after-hook/lib/add.js": /*!***************************************************!*\ !*** ./node_modules/before-after-hook/lib/add.js ***! \***************************************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("module.exports = addHook\n\nfunction addHook (state, kind, name, hook) {\n var orig = hook\n if (!state.registry[name]) {\n state.registry[name] = []\n }\n\n if (kind === 'before') {\n hook = function (method, options) {\n return Promise.resolve()\n .then(orig.bind(null, options))\n .then(method.bind(null, options))\n }\n }\n\n if (kind === 'after') {\n hook = function (method, options) {\n var result\n return Promise.resolve()\n .then(method.bind(null, options))\n .then(function (result_) {\n result = result_\n return orig(result, options)\n })\n .then(function () {\n return result\n })\n }\n }\n\n if (kind === 'error') {\n hook = function (method, options) {\n return Promise.resolve()\n .then(method.bind(null, options))\n .catch(function (error) {\n return orig(error, options)\n })\n }\n }\n\n state.registry[name].push({\n hook: hook,\n orig: orig\n })\n}\n\n\n//# sourceURL=webpack://BitbucketServer/./node_modules/before-after-hook/lib/add.js?"); /***/ }), /***/ "./node_modules/before-after-hook/lib/register.js": /*!********************************************************!*\ !*** ./node_modules/before-after-hook/lib/register.js ***! \********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("module.exports = register\n\nfunction register (state, name, options, method) {\n if (arguments.length === 3) {\n method = options\n options = {}\n }\n\n if (typeof method !== 'function') {\n throw new Error('method for before hook must be a function')\n }\n\n if (typeof options !== 'object') {\n throw new Error('options for before hook must be an object')\n }\n\n if (Array.isArray(name)) {\n return name.reverse().reduce(function (callback, name) {\n return register.bind(null, state, name, options, callback)\n }, method)()\n }\n\n return Promise.resolve()\n .then(function () {\n if (!state.registry[name]) {\n return method(options)\n }\n\n return (state.registry[name]).reduce(function (method, registered) {\n return registered.hook.bind(null, method, options)\n }, method)()\n })\n}\n\n\n//# sourceURL=webpack://BitbucketServer/./node_modules/before-after-hook/lib/register.js?"); /***/ }), /***/ "./node_modules/before-after-hook/lib/remove.js": /*!******************************************************!*\ !*** ./node_modules/before-after-hook/lib/remove.js ***! \******************************************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("module.exports = removeHook\n\nfunction removeHook (state, kind, name, method) {\n if (kind) {\n console.warn(\n 'hook.remove.%s(name, method) is deprecated, use hook.remove(name, method)',\n kind\n )\n }\n if (!state.registry[name]) {\n return\n }\n\n var index = state.registry[name]\n .map(function (registered) { return registered.orig })\n .indexOf(method)\n\n if (index === -1) {\n return\n }\n\n state.registry[name].splice(index, 1)\n}\n\n\n//# sourceURL=webpack://BitbucketServer/./node_modules/before-after-hook/lib/remove.js?"); /***/ }), /***/ "./node_modules/btoa-lite/btoa-browser.js": /*!************************************************!*\ !*** ./node_modules/btoa-lite/btoa-browser.js ***! \************************************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("module.exports = function _btoa(str) {\n return btoa(str)\n}\n\n\n//# sourceURL=webpack://BitbucketServer/./node_modules/btoa-lite/btoa-browser.js?"); /***/ }), /***/ "./node_modules/debug/src/browser.js": /*!*******************************************!*\ !*** ./node_modules/debug/src/browser.js ***! \*******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("/* WEBPACK VAR INJECTION */(function(process) {\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\n/**\n * Colors.\n */\n\nexports.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'];\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n// eslint-disable-next-line complexity\n\nfunction useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n return true;\n } // Internet Explorer and Edge do not support colors.\n\n\n if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n return false;\n } // Is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\n\n return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773\n typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker\n typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/);\n}\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\n\nfunction formatArgs(args) {\n args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);\n\n if (!this.useColors) {\n return;\n }\n\n var c = 'color: ' + this.color;\n args.splice(1, 0, c, 'color: inherit'); // The final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-zA-Z%]/g, function (match) {\n if (match === '%%') {\n return;\n }\n\n index++;\n\n if (match === '%c') {\n // We only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n args.splice(lastC, 0, c);\n}\n/**\n * Invokes `console.log()` when available.\n * No-op when `console.log` is not a \"function\".\n *\n * @api public\n */\n\n\nfunction log() {\n var _console;\n\n // This hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return (typeof console === \"undefined\" ? \"undefined\" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments);\n}\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\n\n\nfunction save(namespaces) {\n try {\n if (namespaces) {\n exports.storage.setItem('debug', namespaces);\n } else {\n exports.storage.removeItem('debug');\n }\n } catch (error) {// Swallow\n // XXX (@Qix-) should we be logging these?\n }\n}\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\n\nfunction load() {\n var r;\n\n try {\n r = exports.storage.getItem('debug');\n } catch (error) {} // Swallow\n // XXX (@Qix-) should we be logging these?\n // If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\n\n if (!r && typeof process !== 'undefined' && 'env' in process) {\n r = process.env.DEBUG;\n }\n\n return r;\n}\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\n\nfunction localstorage() {\n try {\n // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n // The Browser also has localStorage in the global context.\n return localStorage;\n } catch (error) {// Swallow\n // XXX (@Qix-) should we be logging these?\n }\n}\n\nmodule.exports = __webpack_require__(/*! ./common */ \"./node_modules/debug/src/common.js\")(exports);\nvar formatters = module.exports.formatters;\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n try {\n return JSON.stringify(v);\n } catch (error) {\n return '[UnexpectedJSONParseError]: ' + error.message;\n }\n};\n\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack://BitbucketServer/./node_modules/debug/src/browser.js?"); /***/ }), /***/ "./node_modules/debug/src/common.js": /*!******************************************!*\ !*** ./node_modules/debug/src/common.js ***! \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\nfunction setup(env) {\n createDebug.debug = createDebug;\n createDebug.default = createDebug;\n createDebug.coerce = coerce;\n createDebug.disable = disable;\n createDebug.enable = enable;\n createDebug.enabled = enabled;\n createDebug.humanize = __webpack_require__(/*! ms */ \"./node_modules/ms/index.js\");\n Object.keys(env).forEach(function (key) {\n createDebug[key] = env[key];\n });\n /**\n * Active `debug` instances.\n */\n\n createDebug.instances = [];\n /**\n * The currently active debug mode names, and names to skip.\n */\n\n createDebug.names = [];\n createDebug.skips = [];\n /**\n * Map of special \"%n\" handling functions, for the debug \"format\" argument.\n *\n * Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n */\n\n createDebug.formatters = {};\n /**\n * Selects a color for a debug namespace\n * @param {String} namespace The namespace string for the for the debug instance to be colored\n * @return {Number|String} An ANSI color code for the given namespace\n * @api private\n */\n\n function selectColor(namespace) {\n var hash = 0;\n\n for (var i = 0; i < namespace.length; i++) {\n hash = (hash << 5) - hash + namespace.charCodeAt(i);\n hash |= 0; // Convert to 32bit integer\n }\n\n return createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n }\n\n createDebug.selectColor = selectColor;\n /**\n * Create a debugger with the given `namespace`.\n *\n * @param {String} namespace\n * @return {Function}\n * @api public\n */\n\n function createDebug(namespace) {\n var prevTime;\n\n function debug() {\n // Disabled?\n if (!debug.enabled) {\n return;\n }\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var self = debug; // Set `diff` timestamp\n\n var curr = Number(new Date());\n var ms = curr - (prevTime || curr);\n self.diff = ms;\n self.prev = prevTime;\n self.curr = curr;\n prevTime = curr;\n args[0] = createDebug.coerce(args[0]);\n\n if (typeof args[0] !== 'string') {\n // Anything else let's inspect with %O\n args.unshift('%O');\n } // Apply any `formatters` transformations\n\n\n var index = 0;\n args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {\n // If we encounter an escaped % then don't increase the array index\n if (match === '%%') {\n return match;\n }\n\n index++;\n var formatter = createDebug.formatters[format];\n\n if (typeof formatter === 'function') {\n var val = args[index];\n match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format`\n\n args.splice(index, 1);\n index--;\n }\n\n return match;\n }); // Apply env-specific formatting (colors, etc.)\n\n createDebug.formatArgs.call(self, args);\n var logFn = self.log || createDebug.log;\n logFn.apply(self, args);\n }\n\n debug.namespace = namespace;\n debug.enabled = createDebug.enabled(namespace);\n debug.useColors = createDebug.useColors();\n debug.color = selectColor(namespace);\n debug.destroy = destroy;\n debug.extend = extend; // Debug.formatArgs = formatArgs;\n // debug.rawLog = rawLog;\n // env-specific initialization logic for debug instances\n\n if (typeof createDebug.init === 'function') {\n createDebug.init(debug);\n }\n\n createDebug.instances.push(debug);\n return debug;\n }\n\n function destroy() {\n var index = createDebug.instances.indexOf(this);\n\n if (index !== -1) {\n createDebug.instances.splice(index, 1);\n return true;\n }\n\n return false;\n }\n\n function extend(namespace, delimiter) {\n return createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n }\n /**\n * Enables a debug mode by namespaces. This can include modes\n * separated by a colon and wildcards.\n *\n * @param {String} namespaces\n * @api public\n */\n\n\n function enable(namespaces) {\n createDebug.save(namespaces);\n createDebug.names = [];\n createDebug.skips = [];\n var i;\n var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n var len = split.length;\n\n for (i = 0; i < len; i++) {\n if (!split[i]) {\n // ignore empty strings\n continue;\n }\n\n namespaces = split[i].replace(/\\*/g, '.*?');\n\n if (namespaces[0] === '-') {\n createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n } else {\n createDebug.names.push(new RegExp('^' + namespaces + '$'));\n }\n }\n\n for (i = 0; i < createDebug.instances.length; i++) {\n var instance = createDebug.instances[i];\n instance.enabled = createDebug.enabled(instance.namespace);\n }\n }\n /**\n * Disable debug output.\n *\n * @api public\n */\n\n\n function disable() {\n createDebug.enable('');\n }\n /**\n * Returns true if the given mode name is enabled, false otherwise.\n *\n * @param {String} name\n * @return {Boolean}\n * @api public\n */\n\n\n function enabled(name) {\n if (name[name.length - 1] === '*') {\n return true;\n }\n\n var i;\n var len;\n\n for (i = 0, len = createDebug.skips.length; i < len; i++) {\n if (createDebug.skips[i].test(name)) {\n return false;\n }\n }\n\n for (i = 0, len = createDebug.names.length; i < len; i++) {\n if (createDebug.names[i].test(name)) {\n return true;\n }\n }\n\n return false;\n }\n /**\n * Coerce `val`.\n *\n * @param {Mixed} val\n * @return {Mixed}\n * @api private\n */\n\n\n function coerce(val) {\n if (val instanceof Error) {\n return val.stack || val.message;\n }\n\n return val;\n }\n\n createDebug.enable(createDebug.load());\n return createDebug;\n}\n\nmodule.exports = setup;\n\n\n\n//# sourceURL=webpack://BitbucketServer/./node_modules/debug/src/common.js?"); /***/ }), /***/ "./node_modules/is-plain-object/index.js": /*!***********************************************!*\ !*** ./node_modules/is-plain-object/index.js ***! \***********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("/*!\n * is-plain-object <https://github.com/jonschlinkert/is-plain-object>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n\n\nvar isObject = __webpack_require__(/*! isobject */ \"./node_modules/isobject/index.js\");\n\nfunction isObjectObject(o) {\n return isObject(o) === true\n && Object.prototype.toString.call(o) === '[object Object]';\n}\n\nmodule.exports = function isPlainObject(o) {\n var ctor,prot;\n\n if (isObjectObject(o) === false) return false;\n\n // If has modified constructor\n ctor = o.constructor;\n if (typeof ctor !== 'function') return false;\n\n // If has modified prototype\n prot = ctor.prototype;\n if (isObjectObject(prot) === false) return false;\n\n // If constructor does not have an Object-specific method\n if (prot.hasOwnProperty('isPrototypeOf') === false) {\n return false;\n }\n\n // Most likely a plain Object\n return true;\n};\n\n\n//# sourceURL=webpack://BitbucketServer/./node_modules/is-plain-object/index.js?"); /***/ }), /***/ "./node_modules/isobject/index.js": /*!****************************************!*\ !*** ./node_modules/isobject/index.js ***! \****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n\n\nmodule.exports = function isObject(val) {\n return val != null && typeof val === 'object' && Array.isArray(val) === false;\n};\n\n\n//# sourceURL=webpack://BitbucketServer/./node_modules/isobject/index.js?"); /***/ }), /***/ "./node_modules/ms/index.js": /*!**********************************!*\ !*** ./node_modules/ms/index.js ***! \**********************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n\n\n//# sourceURL=webpack://BitbucketServer/./node_modules/ms/index.js?"); /***/ }), /***/ "./node_modules/node-fetch/browser.js": /*!********************************************!*\ !*** ./node_modules/node-fetch/browser.js ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\n// ref: https://github.com/tc39/proposal-global\nvar getGlobal = function () {\n\t// the only reliable means to get the global object is\n\t// `Function('return this')()`\n\t// However, this causes CSP violations in Chrome apps.\n\tif (typeof self !== 'undefined') { return self; }\n\tif (typeof window !== 'undefined') { return window; }\n\tif (typeof global !== 'undefined') { return global; }\n\tthrow new Error('unable to locate global object');\n}\n\nvar global = getGlobal();\n\nmodule.exports = exports = global.fetch;\n\n// Needed for TypeScript and Webpack.\nexports.default = global.fetch.bind(global);\n\nexports.Headers = global.Headers;\nexports.Request = global.Request;\nexports.Response = global.Response;\n\n//# sourceURL=webpack://BitbucketServer/./node_modules/node-fetch/browser.js?"); /***/ }), /***/ "./node_modules/process/browser.js": /*!*****************************************!*\ !*** ./node_modules/process/browser.js ***! \*****************************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n//# sourceURL=webpack://BitbucketServer/./node_modules/process/browser.js?"); /***/ }), /***/ "./node_modules/url-template/lib/url-template.js": /*!*******************************************************!*\ !*** ./node_modules/url-template/lib/url-template.js ***! \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { eval("(function (root, factory) {\n if (true) {\n module.exports = factory();\n } else {}\n}(this, function () {\n /**\n * @constructor\n */\n function UrlTemplate() {\n }\n\n /**\n * @private\n * @param {string} str\n * @return {string}\n */\n UrlTemplate.prototype.encodeReserved = function (str) {\n return str.split(/(%[0-9A-Fa-f]{2})/g).map(function (part) {\n if (!/%[0-9A-Fa-f]/.test(part)) {\n part = encodeURI(part).replace(/%5B/g, '[').replace(/%5D/g, ']');\n }\n return part;\n }).join('');\n };\n\n /**\n * @private\n * @param {string} str\n * @return {string}\n */\n UrlTemplate.prototype.encodeUnreserved = function (str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase();\n });\n }\n\n /**\n * @private\n * @param {string} operator\n * @param {string} value\n * @param {string} key\n * @return {string}\n */\n UrlTemplate.prototype.encodeValue = function (operator, value, key) {\n value = (operator === '+' || operator === '#') ? this.encodeReserved(value) : this.encodeUnreserved(value);\n\n if (key) {\n return this.encodeUnreserved(key) + '=' + value;\n } else {\n return value;\n }\n };\n\n /**\n * @private\n * @param {*} value\n * @return {boolean}\n */\n UrlTemplate.prototype.isDefined = function (value) {\n return value !== undefined && value !== null;\n };\n\n /**\n * @private\n * @param {string}\n * @return {boolean}\n */\n UrlTemplate.prototype.isKeyOperator = function (operator) {\n return operator === ';' || operator === '&' || operator === '?';\n };\n\n /**\n * @private\n * @param {Object} context\n * @param {string} operator\n * @param {string} key\n * @param {string} modifier\n */\n UrlTemplate.prototype.getValues = function (context, operator, key, modifier) {\n var value = context[key],\n result = [];\n\n if (this.isDefined(value) && value !== '') {\n if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n value = value.toString();\n\n if (modifier && modifier !== '*') {\n value = value.substring(0, parseInt(modifier, 10));\n }\n\n result.push(this.encodeValue(operator, value, this.isKeyOperator(operator) ? key : null));\n } else {\n if (modifier === '*') {\n if (Array.isArray(value)) {\n value.filter(this.isDefined).forEach(function (value) {\n result.push(this.encodeValue(operator, value, this.isKeyOperator(operator) ? key : null));\n }, this);\n } else {\n Object.keys(value).forEach(function (k) {\n if (this.isDefined(value[k])) {\n result.push(this.encodeValue(operator, value[k], k));\n }\n }, this);\n }\n } else {\n var tmp = [];\n\n if (Array.isArray(value)) {\n value.filter(this.isDefined).forEach(function (value) {\n tmp.push(this.encodeValue(operator, value));\n }, this);\n } else {\n Object.keys(value).forEach(function (k) {\n if (this.isDefined(value[k])) {\n tmp.push(this.encodeUnreserved(k));\n tmp.push(this.encodeValue(operator, value[k].toString()));\n }\n }, this);\n }\n\n if (this.isKeyOperator(operator)) {\n result.push(this.encodeUnreserved(key) + '=' + tmp.join(','));\n } else if (tmp.length !== 0) {\n result.push(tmp.join(','));\n }\n }\n }\n } else {\n if (operator === ';') {\n if (this.isDefined(value)) {\n result.push(this.encodeUnreserved(key));\n }\n } else if (value === '' && (operator === '&' || operator === '?')) {\n result.push(this.encodeUnreserved(key) + '=');\n } else if (value === '') {\n result.push('');\n }\n }\n return result;\n };\n\n /**\n * @param {string} template\n * @return {function(Object):string}\n */\n UrlTemplate.prototype.parse = function (template) {\n var that = this;\n var operators = ['+', '#', '.', '/', ';', '?', '&'];\n\n return {\n expand: function (context) {\n return template.replace(/\\{([^\\{\\}]+)\\}|([^\\{\\}]+)/g, function (_, expression, literal) {\n if (expression) {\n var operator = null,\n values = [];\n\n if (operators.indexOf(expression.charAt(0)) !== -1) {\n operator = expression.charAt(0);\n expression = expression.substr(1);\n }\n\n expression.split(/,/g).forEach(function (variable) {\n var tmp = /([^:\\*]*)(?::(\\d+)|(\\*))?/.exec(variable);\n values.push.apply(values, that.getValues(context, operator, tmp[1], tmp[2] || tmp[3]));\n });\n\n if (operator && operator !== '+') {\n var separator = ',';\n\n if (operator === '?') {\n separator = '&';\n } else if (operator !== '#') {\n separator = operator;\n }\n return (values.length !== 0 ? operator : '') + values.join(separator);\n } else {\n return values.join(',');\n }\n } else {\n return that.encodeReserved(literal);\n }\n });\n }\n };\n };\n\n return new UrlTemplate();\n}));\n\n\n//# sourceURL=webpack://BitbucketServer/./node_modules/url-template/lib/url-template.js?"); /***/ }), /***/ "./package.json": /*!**********************!*\ !*** ./package.json ***! \**********************/ /*! exports provided: name, version, description, keywords, homepage, bugs, license, author, files, main, types, browser, repository, scripts, dependencies, devDependencies, default */ /***/ (function(module) { eval("module.exports = {\"name\":\"@atlassian/bitbucket-server\",\"version\":\"0.0.6\",\"description\":\"Bitbucket Server API client for Browser and Node.js\",\"keywords\":[\"bitbucket-server\",\"api-client\",\"rest\"],\"homepage\":\"https://bitbucket.org/atlassianlabs/bitbucket-server\",\"bugs\":\"https://bitbucket.org/atlassianlabs/bitbucket-server/issues\",\"license\":\"MIT\",\"author\":\"Atlassian\",\"files\":[\"src\",\"dist/*.js\"],\"main\":\"src/index.js\",\"types\":\"src/index.d.ts\",\"browser\":{\"./src/utils/get-buffer-response.js\":\"./src/utils/get-buffer-response-browser.js\"},\"repository\":\"https://bitbucket.org/atlassianlabs/bitbucket-server\",\"scripts\":{\"build\":\"npm-run-all -p build:*\",\"prebuild:browser\":\"mkdirp dist\",\"build:browser\":\"npm-run-all -p build:browser:*\",\"build:browser:development\":\"webpack --mode development\",\"build:browser:production\":\"webpack --mode production --output-filename=bitbucker-server.min.js\",\"prebuild:docs\":\"mkdirp docs\",\"build:docs\":\"npm run generate:api-docs\",\"postbuild:docs\":\"apidoc -i docs -o docs\",\"generate:specification\":\"node scripts/generate-specification.js\",\"generate:api-names\":\"node scripts/generate-api-names.js\",\"generate:routes\":\"node scripts/generate-routes.js\",\"generate:api-docs\":\"node scripts/generate-api-docs.js\",\"generate:type-defs\":\"node scripts/generate-type-defs.js\",\"generate:types\":\"npm-run-all -p generate:types:*\",\"generate:types:ts\":\"node scripts/generate-types-ts.js\",\"validate\":\"npm-run-all -p validate:*\",\"validate:types\":\"npm-run-all -p validate:types:*\",\"prevalidate:types:ts\":\"npm run generate:types:ts\",\"validate:types:ts\":\"tsc --target es6 src/index.d.ts\",\"prepare\":\"npm-run-all -s build:browser generate:types\",\"reset:routes\":\"node scripts/reset-routes.js\",\"reset:api-names\":\"node scripts/reset-api-names.js\",\"reset:spec\":\"node scripts/reset-spec.js\",\"reset:types\":\"node scripts/reset-types.js\",\"reset:type-defs\":\"node scripts/reset-type-defs.js\",\"reset\":\"npm-run-all -p reset:*\",\"regenerate\":\"npm run reset && npm run generate:specification && npm run generate:api-names && npm run generate:routes && npm run generate:type-defs && npm run generate:types\",\"regen:routes\":\"npm run reset:routes && npm run generate:routes\",\"regen:api-names\":\"npm run reset:api-names && npm run generate:api-names\",\"regen:spec\":\"npm run reset:spec && npm run generate:specification\",\"regen:types\":\"npm run reset:types && npm run generate:types\",\"regen:type-defs\":\"npm run reset:type-defs && npm run generate:type-defs\",\"test\":\"jest\"},\"dependencies\":{\"before-after-hook\":\"^1.1.0\",\"btoa-lite\":\"^1.0.0\",\"debug\":\"^3.1.0\",\"is-plain-object\":\"^2.0.4\",\"node-fetch\":\"^2.1.2\",\"url-template\":\"^2.0.8\"},\"devDependencies\":{\"apidoc\":\"^0.17.6\",\"clean-deep\":\"^3.0.2\",\"deep-sort-object\":\"^1.0.2\",\"eslint\":\"^4.19.1\",\"eslint-config-prettier\":\"^2.9.0\",\"eslint-config-standard\":\"^11.0.0\",\"eslint-plugin-import\":\"^2.12.0\",\"eslint-plugin-jest\":\"^21.15.2\",\"eslint-plugin-node\":\"^6.0.1\",\"eslint-plugin-prettier\":\"^2.6.0\",\"eslint-plugin-promise\":\"^3.8.0\",\"eslint-plugin-standard\":\"^3.1.0\",\"form-data\":\"^2.3.2\",\"jest\":\"^23.0.0\",\"json-schema-to-typescript\":\"^6.0.1\",\"lodash\":\"^4.17.10\",\"mkdirp\":\"^0.5.1\",\"mustache\":\"^2.3.0\",\"npm-run-all\":\"^4.1.3\",\"prettier\":\"^1.12.1\",\"typescript\":\"^2.8.3\",\"webpack\":\"^4.33.0\",\"webpack-cli\":\"^3.3.4\"}};\n\n//# sourceURL=webpack://BitbucketServer/./package.json?"); /***/ }), /***/ "./src/index.js": /*!**********************!*\ !*** ./src/index.js ***! \**********************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { eval("const Hook = __webpack_require__( /*! before-after-hook */ \"./node_modules/before-after-hook/index.js\" )\n\nconst deepmerge = __webpack_require__( /*! ./utils/deepmerge.js */ \"./src/utils/deepmerge.js\" )\nconst request = __webpack_require__( /*! ./request/index.js */ \"./src/request/index.js\" )\n\nconst Plugins = [\n __webpack_require__( /*! ./plugins/authentication/index.js */ \"./src/plugins/authentication/index.js\" ),\n __webpack_require__( /*! ./plugins/endpoint-methods/index.js */ \"./src/plugins/endpoint-methods/index.js\" ),\n __webpack_require__( /*! ./plugins/pagination/index.js */ \"./src/plugins/pagination/index.js\" )\n]\n\nconst clientDefaults = {\n headers: {},\n options: {\n timeout: 0\n }\n}\n\nclass BitbucketServer {\n constructor( options = {} ) {\n this.options = deepmerge( clientDefaults, options )\n\n this.hook = new Hook()\n\n this.request = this.request.bind( this )\n\n Plugins.forEach( Plugin => this.addPlugin( Plugin ) )\n }\n\n addPlugin( Plugin ) {\n new Plugin( this ).inject()\n }\n\n request( options = {} ) {\n return this.hook( 'request', deepmerge( this.options, options ), request )\n }\n}\n\nmodule.exports = BitbucketServer\n\n\n\n\n//# sourceURL=webpack://BitbucketServer/./src/index.js?"); /***/ }), /***/ "./src/plugins/authentication/authenticate.js": /*!****************************************************!*\ !*** ./src/plugins/authentication/authenticate.js ***! \****************************************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("/**\n * Updates Authentication State\n * @param {Object} state - Authentication State\n * @param {Object} options\n */\nconst authenticate = (state, options = {}) => {\n if (!options.type) {\n state.auth = false\n return\n }\n\n switch (options.type) {\n case 'basic':\n case 'apppassword':\n if (!options.username || !options.password) {\n throw new Error(\n 'Basic authentication requires both a username and password to be set'\n )\n }\n break\n\n case 'oauth':\n if (!options.token && !(options.key && options.secret)) {\n throw new Error(\n 'OAuth2 authentication requires a token or key & secret to be set'\n )\n }\n break\n\n case 'token':\n if (!options.token) {\n throw new Error('Token authentication requires a token to be set')\n }\n break\n\n default:\n throw new Error(\n \"Invalid authentication type, must be 'basic', 'oauth' or 'token'\"\n )\n }\n\n state.auth = options\n}\n\nmodule.exports = authenticate\n\n\n//# sourceURL=webpack://BitbucketServer/./src/plugins/authentication/authenticate.js?"); /***/ }), /***/ "./src/plugins/authentication/before-request.js": /*!******************************************************!*\ !*** ./src/plugins/authentication/before-request.js ***! \******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { eval("const btoa = __webpack_require__(/*! btoa-lite */ \"./node_modules/btoa-lite/btoa-browser.js\")\n\n/**\n * Prepares Authentication Options before Request\n * @param {Object} state - Authentication State\n * @param {Object} options\n */\