@feathersjs/client 4.5.9 → 4.5.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://feathers/webpack/universalModuleDefinition","webpack://feathers/webpack/bootstrap","webpack://feathers//Users/daffl/Development/feathersjs/feathers/node_modules/debug/src/browser.js","webpack://feathers//Users/daffl/Development/feathersjs/feathers/node_modules/debug/src/common.js","webpack://feathers//Users/daffl/Development/feathersjs/feathers/node_modules/ms/index.js","webpack://feathers//Users/daffl/Development/feathersjs/feathers/node_modules/process/browser.js","webpack://feathers/../errors/lib/index.js","webpack://feathers/../primus-client/lib/index.js","webpack://feathers/../transport-commons/client.js","webpack://feathers/../src/client.ts","webpack://feathers/./src/primus.js"],"names":["exports","formatArgs","save","load","useColors","storage","localstorage","colors","window","process","type","__nwjs","navigator","userAgent","toLowerCase","match","document","documentElement","style","WebkitAppearance","console","firebug","exception","table","parseInt","RegExp","$1","args","namespace","module","humanize","diff","c","color","splice","index","lastC","replace","log","debug","namespaces","setItem","removeItem","error","r","getItem","env","DEBUG","localStorage","require","formatters","j","v","JSON","stringify","message","setup","createDebug","default","coerce","disable","enable","enabled","Object","keys","forEach","key","instances","names","skips","selectColor","hash","i","length","charCodeAt","Math","abs","prevTime","self","curr","Number","Date","ms","prev","unshift","format","formatter","val","call","logFn","apply","destroy","extend","init","push","indexOf","delimiter","newDebug","split","len","substr","instance","map","toNamespace","join","name","test","regexp","toString","substring","Error","stack","FeathersError","msg","code","className","data","errors","newData","parse","captureStackTrace","inheritsFrom","Child","Parent","prototype","create","constructor","defineProperty","value","BadRequest","NotAuthenticated","PaymentError","Forbidden","NotFound","MethodNotAllowed","NotAcceptable","Timeout","Conflict","Gone","LengthRequired","Unprocessable","TooManyRequests","GeneralError","NotImplemented","BadGateway","Unavailable","convert","result","assign","Service","primusClient","connection","options","defaultService","method","initialize","app","primus","service"],"mappings":"AAAA;AACA;AACA;A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gC,GAAP;AACA;;AAED9B,aAAW,CAACI,MAAZ,CAAmBJ,WAAW,CAACtD,IAAZ,EAAnB;AAEA,SAAOsD,WAAP;AACA;;AAED5B,MAAM,CAAC7B,OAAP,GAAiBwD,KAAjB,C;;;;;;;;;;;ACvQA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,YAAY,MAAM;AAClB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;ACjKA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qCAAqC;;AAErC;AACA;AACA;;AAEA,2BAA2B;AAC3B;AACA;AACA;AACA,4BAA4B,UAAU;;;;;;;;;;;;;;ACvLtC,IAAMjB,KAAK,GAAGU,mBAAO,CAAC,sDAAD,CAAP,CAAiB,oBAAjB,CAAd;;AAEA,SAAS+D,aAAT,CAAwBC,GAAxB,EAA6BR,IAA7B,EAAmCS,IAAnC,EAAyCC,SAAzC,EAAoDC,IAApD,EAA0D;AACxDH,KAAG,GAAGA,GAAG,IAAI,OAAb;AAEA,MAAII,MAAJ;AACA,MAAI9D,OAAJ;AACA,MAAI+D,OAAJ;;AAEA,MAAIL,GAAG,YAAYH,KAAnB,EAA0B;AACxBvD,WAAO,GAAG0D,GAAG,CAAC1D,OAAJ,IAAe,OAAzB,CADwB,CAGxB;;AACA,QAAI0D,GAAG,CAACI,MAAR,EAAgB;A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,MAA3C;AACD,OAJD,MAIO,IAAI,IAAI,CAAC,MAAL,KAAgB,CAApB,EAAuB;AAC5B;AACA,eAAO,KAAK,kBAAL,CAAwB,IAAxB,CAAP;AACD,OAR8B,CAU/B;;;AACA,aAAO,KAAK,cAAL,cAAoB,IAApB,SAA6B,IAA7B,EAAP;AACD;;;;;;AAhFH,0B;;;;;;;;;;;AC9DAxH,MAAM,CAAC7B,OAAP,GAAiBiD,mBAAO,CAAC,gEAAD,CAAxB,C","file":"primus.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"feathers\"] = factory();\n\telse\n\t\troot[\"feathers\"] = factory();\n})(this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/primus.js\");\n","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\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\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug');\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\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\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* Active `debug` instances.\n\t*/\n\tcreateDebug.instances = [];\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn match;\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.enabled = createDebug.enabled(namespace);\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.destroy = destroy;\n\t\tdebug.extend = extend;\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\tcreateDebug.instances.push(debug);\n\n\t\treturn debug;\n\t}\n\n\tfunction destroy() {\n\t\tconst index = createDebug.instances.indexOf(this);\n\t\tif (index !== -1) {\n\t\t\tcreateDebug.instances.splice(index, 1);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0; i < createDebug.instances.length; i++) {\n\t\t\tconst instance = createDebug.instances[i];\n\t\t\tinstance.enabled = createDebug.enabled(instance.namespace);\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","/**\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","// 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","const debug = require('debug')('@feathersjs/errors');\n\nfunction FeathersError (msg, name, code, className, data) {\n msg = msg || 'Error';\n\n let errors;\n let message;\n let newData;\n\n if (msg instanceof Error) {\n message = msg.message || 'Error';\n\n // NOTE (EK): This is typically to handle validation errors\n if (msg.errors) {\n errors = msg.errors;\n }\n } else if (typeof msg === 'object') { // Support plain old objects\n message = msg.message || 'Error';\n data = msg;\n } else { // message is just a string\n message = msg;\n }\n\n if (data) {\n // NOTE(EK): To make sure that we are not messing\n // with immutable data, just make a copy.\n // https://github.com/feathersjs/errors/issues/19\n newData = JSON.parse(JSON.stringify(data));\n\n if (newData.errors) {\n errors = newData.errors;\n delete newData.errors;\n } else if (data.errors) {\n // The errors property from data could be\n // stripped away while cloning resulting newData not to have it\n // For example: when cloning arrays this property\n errors = JSON.parse(JSON.stringify(data.errors));\n }\n }\n\n // NOTE (EK): Babel doesn't support this so\n // we have to pass in the class name manually.\n // this.name = this.constructor.name;\n this.type = 'FeathersError';\n this.name = name;\n this.message = message;\n this.code = code;\n this.className = className;\n this.data = newData;\n this.errors = errors || {};\n\n debug(`${this.name}(${this.code}): ${this.message}`);\n debug(this.errors);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, FeathersError);\n } else {\n this.stack = (new Error()).stack;\n }\n}\n\nfunction inheritsFrom (Child, Parent) {\n Child.prototype = Object.create(Parent.prototype);\n Child.prototype.constructor = Child;\n}\n\ninheritsFrom(FeathersError, Error);\n\n// NOTE (EK): A little hack to get around `message` not\n// being included in the default toJSON call.\nObject.defineProperty(FeathersError.prototype, 'toJSON', {\n value: function () {\n return {\n name: this.name,\n message: this.message,\n code: this.code,\n className: this.className,\n data: this.data,\n errors: this.errors\n };\n }\n});\n\n// 400 - Bad Request\nfunction BadRequest (message, data) {\n FeathersError.call(this, message, 'BadRequest', 400, 'bad-request', data);\n}\n\ninheritsFrom(BadRequest, FeathersError);\n\n// 401 - Not Authenticated\nfunction NotAuthenticated (message, data) {\n FeathersError.call(this, message, 'NotAuthenticated', 401, 'not-authenticated', data);\n}\n\ninheritsFrom(NotAuthenticated, FeathersError);\n\n// 402 - Payment Error\nfunction PaymentError (message, data) {\n FeathersError.call(this, message, 'PaymentError', 402, 'payment-error', data);\n}\n\ninheritsFrom(PaymentError, FeathersError);\n\n// 403 - Forbidden\nfunction Forbidden (message, data) {\n FeathersError.call(this, message, 'Forbidden', 403, 'forbidden', data);\n}\n\ninheritsFrom(Forbidden, FeathersError);\n\n// 404 - Not Found\nfunction NotFound (message, data) {\n FeathersError.call(this, message, 'NotFound', 404, 'not-found', data);\n}\n\ninheritsFrom(NotFound, FeathersError);\n\n// 405 - Method Not Allowed\nfunction MethodNotAllowed (message, data) {\n FeathersError.call(this, message, 'MethodNotAllowed', 405, 'method-not-allowed', data);\n}\n\ninheritsFrom(MethodNotAllowed, FeathersError);\n\n// 406 - Not Acceptable\nfunction NotAcceptable (message, data) {\n FeathersError.call(this, message, 'NotAcceptable', 406, 'not-acceptable', data);\n}\n\ninheritsFrom(NotAcceptable, FeathersError);\n\n// 408 - Timeout\nfunction Timeout (message, data) {\n FeathersError.call(this, message, 'Timeout', 408, 'timeout', data);\n}\n\ninheritsFrom(Timeout, FeathersError);\n\n// 409 - Conflict\nfunction Conflict (message, data) {\n FeathersError.call(this, message, 'Conflict', 409, 'conflict', data);\n}\n\ninheritsFrom(Conflict, FeathersError);\n\n// 410 - Gone\nfunction Gone (message, data) {\n FeathersError(this, message, 'Gone', 410, 'gone', data);\n}\n\ninheritsFrom(Gone, FeathersError);\n\n// 411 - Length Required\nfunction LengthRequired (message, data) {\n FeathersError.call(this, message, 'LengthRequired', 411, 'length-required', data);\n}\n\ninheritsFrom(LengthRequired, FeathersError);\n\n// 422 Unprocessable\nfunction Unprocessable (message, data) {\n FeathersError.call(this, message, 'Unprocessable', 422, 'unprocessable', data);\n}\n\ninheritsFrom(Unprocessable, FeathersError);\n\n// 429 Too Many Requests\nfunction TooManyRequests (message, data) {\n FeathersError.call(this, message, 'TooManyRequests', 429, 'too-many-requests', data);\n}\n\ninheritsFrom(TooManyRequests, FeathersError);\n\n// 500 - General Error\nfunction GeneralError (message, data) {\n FeathersError.call(this, message, 'GeneralError', 500, 'general-error', data);\n}\n\ninheritsFrom(GeneralError, FeathersError);\n\n// 501 - Not Implemented\nfunction NotImplemented (message, data) {\n FeathersError.call(this, message, 'NotImplemented', 501, 'not-implemented', data);\n}\n\ninheritsFrom(NotImplemented, FeathersError);\n\n// 502 - Bad Gateway\nfunction BadGateway (message, data) {\n FeathersError.call(this, message, 'BadGateway', 502, 'bad-gateway', data);\n}\n\ninheritsFrom(BadGateway, FeathersError);\n\n// 503 - Unavailable\nfunction Unavailable (message, data) {\n FeathersError.call(this, message, 'Unavailable', 503, 'unavailable', data);\n}\n\ninheritsFrom(Unavailable, FeathersError);\n\nconst errors = {\n FeathersError,\n BadRequest,\n NotAuthenticated,\n PaymentError,\n Forbidden,\n NotFound,\n MethodNotAllowed,\n NotAcceptable,\n Timeout,\n Conflict,\n Gone,\n LengthRequired,\n Unprocessable,\n TooManyRequests,\n GeneralError,\n NotImplemented,\n BadGateway,\n Unavailable,\n 400: BadRequest,\n 401: NotAuthenticated,\n 402: PaymentError,\n 403: Forbidden,\n 404: NotFound,\n 405: MethodNotAllowed,\n 406: NotAcceptable,\n 408: Timeout,\n 409: Conflict,\n 410: Gone,\n 411: LengthRequired,\n 422: Unprocessable,\n 429: TooManyRequests,\n 500: GeneralError,\n 501: NotImplemented,\n 502: BadGateway,\n 503: Unavailable\n};\n\nfunction convert (error) {\n if (!error) {\n return error;\n }\n\n const FeathersError = errors[error.name];\n const result = FeathersError\n ? new FeathersError(error.message, error.data)\n : new Error(error.message || error);\n\n if (typeof error === 'object') {\n Object.assign(result, error);\n }\n\n return result;\n}\n\nmodule.exports = Object.assign({ convert }, errors);\n","const Service = require('@feathersjs/transport-commons/client');\n\nfunction primusClient (connection, options) {\n if (!connection) {\n throw new Error('Primus connection needs to be provided');\n }\n\n const defaultService = function (name) {\n return new Service(Object.assign({}, options, {\n name,\n connection,\n method: 'send'\n }));\n };\n\n const initialize = function (app) {\n if (typeof app.defaultService === 'function') {\n throw new Error('Only one default client provider can be configured');\n }\n\n app.primus = connection;\n app.defaultService = defaultService;\n };\n\n initialize.Service = Service;\n initialize.service = defaultService;\n\n return initialize;\n}\n\nmodule.exports = primusClient;\nmodule.exports.default = primusClient;\n","module.exports = require('./lib/client').Service;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Service = void 0;\nconst debug_1 = __importDefault(require(\"debug\"));\nconst errors_1 = require(\"@feathersjs/errors\");\nconst debug = debug_1.default('@feathersjs/transport-commons/client');\nconst namespacedEmitterMethods = [\n 'addListener',\n 'emit',\n 'listenerCount',\n 'listeners',\n 'on',\n 'once',\n 'prependListener',\n 'prependOnceListener',\n 'removeAllListeners',\n 'removeListener'\n];\nconst otherEmitterMethods = [\n 'eventNames',\n 'getMaxListeners',\n 'setMaxListeners'\n];\nconst addEmitterMethods = (service) => {\n otherEmitterMethods.forEach(method => {\n service[method] = function (...args) {\n if (typeof this.connection[method] !== 'function') {\n throw new Error(`Can not call '${method}' on the client service connection`);\n }\n return this.connection[method](...args);\n };\n });\n // Methods that should add the namespace (service path)\n namespacedEmitterMethods.forEach(method => {\n service[method] = function (name, ...args) {\n if (typeof this.connection[method] !== 'function') {\n throw new Error(`Can not call '${method}' on the client service connection`);\n }\n const eventName = `${this.path} ${name}`;\n debug(`Calling emitter method ${method} with ` +\n `namespaced event '${eventName}'`);\n const result = this.connection[method](eventName, ...args);\n return result === this.connection ? this : result;\n };\n });\n};\nclass Service {\n constructor(options) {\n this.events = options.events;\n this.path = options.name;\n this.connection = options.connection;\n this.method = options.method;\n this.timeout = options.timeout || 5000;\n addEmitterMethods(this);\n }\n send(method, ...args) {\n return new Promise((resolve, reject) => {\n const timeoutId = setTimeout(() => reject(new errors_1.Timeout(`Timeout of ${this.timeout}ms exceeded calling ${method} on ${this.path}`, {\n timeout: this.timeout,\n method,\n path: this.path\n })), this.timeout);\n args.unshift(method, this.path);\n args.push(function (error, data) {\n error = errors_1.convert(error);\n clearTimeout(timeoutId);\n return error ? reject(error) : resolve(data);\n });\n debug(`Sending socket.${this.method}`, args);\n this.connection[this.method](...args);\n });\n }\n find(params = {}) {\n return this.send('find', params.query || {});\n }\n get(id, params = {}) {\n return this.send('get', id, params.query || {});\n }\n create(data, params = {}) {\n return this.send('create', data, params.query || {});\n }\n update(id, data, params = {}) {\n return this.send('update', id, data, params.query || {});\n }\n patch(id, data, params = {}) {\n return this.send('patch', id, data, params.query || {});\n }\n remove(id, params = {}) {\n return this.send('remove', id, params.query || {});\n }\n // `off` is actually not part of the Node event emitter spec\n // but we are adding it since everybody is expecting it because\n // of the emitter-component Socket.io is using\n off(name, ...args) {\n if (typeof this.connection.off === 'function') {\n const result = this.connection.off(`${this.path} ${name}`, ...args);\n return result === this.connection ? this : result;\n }\n else if (args.length === 0) {\n // @ts-ignore\n return this.removeAllListeners(name);\n }\n // @ts-ignore\n return this.removeListener(name, ...args);\n }\n}\nexports.Service = Service;\n//# sourceMappingURL=client.js.map","module.exports = require('@feathersjs/primus-client');\n"],"sourceRoot":""}
1
+ {"version":3,"file":"primus.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;ACVA;;AAEA;AACA;AACA;AAEAA,kBAAA,GAAqBC,UAArB;AACAD,YAAA,GAAeE,IAAf;AACAF,YAAA,GAAeG,IAAf;AACAH,iBAAA,GAAoBI,SAApB;AACAJ,eAAA,GAAkBM,YAAY,EAA9B;;AACAN,eAAA,GAAmB,YAAM;AACxB,MAAIQ,MAAM,GAAG,KAAb;AAEA,SAAO,YAAM;AACZ,QA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A,eAAO,KAAK,kBAAL,CAAwB,IAAxB,CAAP;AACD,OAR8B,CAU/B;;;AACA,aAAO,KAAK,cAAL,cAAoB,IAApB,SAA6B,IAA7B,EAAP;AACD;;;;;;AAhFH;;;;;;;;;;AC9DA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,eAAe;AAC1B,WAAW,QAAQ;AACnB,YAAY,OAAO;AACnB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;UCjKA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;UEtBA;UACA;UACA;UACA","sources":["webpack://feathers/webpack/universalModuleDefinition","webpack://feathers/../../node_modules/debug/src/browser.js","webpack://feathers/../../node_modules/debug/src/common.js","webpack://feathers/./src/primus.js","webpack://feathers/../errors/lib/index.js","webpack://feathers/../primus-client/lib/index.js","webpack://feathers/../transport-commons/client.js","webpack://feathers/../src/client.ts","webpack://feathers/../../node_modules/ms/index.js","webpack://feathers/webpack/bootstrap","webpack://feathers/webpack/before-startup","webpack://feathers/webpack/startup","webpack://feathers/webpack/after-startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"feathers\"] = factory();\n\telse\n\t\troot[\"feathers\"] = factory();\n})(this, function() {\nreturn ","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\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\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug');\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\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\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","module.exports = require('@feathersjs/primus-client');\n","const debug = require('debug')('@feathersjs/errors');\n\nfunction FeathersError (msg, name, code, className, data) {\n msg = msg || 'Error';\n\n let errors;\n let message;\n let newData;\n\n if (msg instanceof Error) {\n message = msg.message || 'Error';\n\n // NOTE (EK): This is typically to handle validation errors\n if (msg.errors) {\n errors = msg.errors;\n }\n } else if (typeof msg === 'object') { // Support plain old objects\n message = msg.message || 'Error';\n data = msg;\n } else { // message is just a string\n message = msg;\n }\n\n if (data) {\n // NOTE(EK): To make sure that we are not messing\n // with immutable data, just make a copy.\n // https://github.com/feathersjs/errors/issues/19\n newData = JSON.parse(JSON.stringify(data));\n\n if (newData.errors) {\n errors = newData.errors;\n delete newData.errors;\n } else if (data.errors) {\n // The errors property from data could be\n // stripped away while cloning resulting newData not to have it\n // For example: when cloning arrays this property\n errors = JSON.parse(JSON.stringify(data.errors));\n }\n }\n\n // NOTE (EK): Babel doesn't support this so\n // we have to pass in the class name manually.\n // this.name = this.constructor.name;\n this.type = 'FeathersError';\n this.name = name;\n this.message = message;\n this.code = code;\n this.className = className;\n this.data = newData;\n this.errors = errors || {};\n\n debug(`${this.name}(${this.code}): ${this.message}`);\n debug(this.errors);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, FeathersError);\n } else {\n this.stack = (new Error()).stack;\n }\n}\n\nfunction inheritsFrom (Child, Parent) {\n Child.prototype = Object.create(Parent.prototype);\n Child.prototype.constructor = Child;\n}\n\ninheritsFrom(FeathersError, Error);\n\n// NOTE (EK): A little hack to get around `message` not\n// being included in the default toJSON call.\nObject.defineProperty(FeathersError.prototype, 'toJSON', {\n value: function () {\n return {\n name: this.name,\n message: this.message,\n code: this.code,\n className: this.className,\n data: this.data,\n errors: this.errors\n };\n }\n});\n\n// 400 - Bad Request\nfunction BadRequest (message, data) {\n FeathersError.call(this, message, 'BadRequest', 400, 'bad-request', data);\n}\n\ninheritsFrom(BadRequest, FeathersError);\n\n// 401 - Not Authenticated\nfunction NotAuthenticated (message, data) {\n FeathersError.call(this, message, 'NotAuthenticated', 401, 'not-authenticated', data);\n}\n\ninheritsFrom(NotAuthenticated, FeathersError);\n\n// 402 - Payment Error\nfunction PaymentError (message, data) {\n FeathersError.call(this, message, 'PaymentError', 402, 'payment-error', data);\n}\n\ninheritsFrom(PaymentError, FeathersError);\n\n// 403 - Forbidden\nfunction Forbidden (message, data) {\n FeathersError.call(this, message, 'Forbidden', 403, 'forbidden', data);\n}\n\ninheritsFrom(Forbidden, FeathersError);\n\n// 404 - Not Found\nfunction NotFound (message, data) {\n FeathersError.call(this, message, 'NotFound', 404, 'not-found', data);\n}\n\ninheritsFrom(NotFound, FeathersError);\n\n// 405 - Method Not Allowed\nfunction MethodNotAllowed (message, data) {\n FeathersError.call(this, message, 'MethodNotAllowed', 405, 'method-not-allowed', data);\n}\n\ninheritsFrom(MethodNotAllowed, FeathersError);\n\n// 406 - Not Acceptable\nfunction NotAcceptable (message, data) {\n FeathersError.call(this, message, 'NotAcceptable', 406, 'not-acceptable', data);\n}\n\ninheritsFrom(NotAcceptable, FeathersError);\n\n// 408 - Timeout\nfunction Timeout (message, data) {\n FeathersError.call(this, message, 'Timeout', 408, 'timeout', data);\n}\n\ninheritsFrom(Timeout, FeathersError);\n\n// 409 - Conflict\nfunction Conflict (message, data) {\n FeathersError.call(this, message, 'Conflict', 409, 'conflict', data);\n}\n\ninheritsFrom(Conflict, FeathersError);\n\n// 410 - Gone\nfunction Gone (message, data) {\n FeathersError(this, message, 'Gone', 410, 'gone', data);\n}\n\ninheritsFrom(Gone, FeathersError);\n\n// 411 - Length Required\nfunction LengthRequired (message, data) {\n FeathersError.call(this, message, 'LengthRequired', 411, 'length-required', data);\n}\n\ninheritsFrom(LengthRequired, FeathersError);\n\n// 422 Unprocessable\nfunction Unprocessable (message, data) {\n FeathersError.call(this, message, 'Unprocessable', 422, 'unprocessable', data);\n}\n\ninheritsFrom(Unprocessable, FeathersError);\n\n// 429 Too Many Requests\nfunction TooManyRequests (message, data) {\n FeathersError.call(this, message, 'TooManyRequests', 429, 'too-many-requests', data);\n}\n\ninheritsFrom(TooManyRequests, FeathersError);\n\n// 500 - General Error\nfunction GeneralError (message, data) {\n FeathersError.call(this, message, 'GeneralError', 500, 'general-error', data);\n}\n\ninheritsFrom(GeneralError, FeathersError);\n\n// 501 - Not Implemented\nfunction NotImplemented (message, data) {\n FeathersError.call(this, message, 'NotImplemented', 501, 'not-implemented', data);\n}\n\ninheritsFrom(NotImplemented, FeathersError);\n\n// 502 - Bad Gateway\nfunction BadGateway (message, data) {\n FeathersError.call(this, message, 'BadGateway', 502, 'bad-gateway', data);\n}\n\ninheritsFrom(BadGateway, FeathersError);\n\n// 503 - Unavailable\nfunction Unavailable (message, data) {\n FeathersError.call(this, message, 'Unavailable', 503, 'unavailable', data);\n}\n\ninheritsFrom(Unavailable, FeathersError);\n\nconst errors = {\n FeathersError,\n BadRequest,\n NotAuthenticated,\n PaymentError,\n Forbidden,\n NotFound,\n MethodNotAllowed,\n NotAcceptable,\n Timeout,\n Conflict,\n Gone,\n LengthRequired,\n Unprocessable,\n TooManyRequests,\n GeneralError,\n NotImplemented,\n BadGateway,\n Unavailable,\n 400: BadRequest,\n 401: NotAuthenticated,\n 402: PaymentError,\n 403: Forbidden,\n 404: NotFound,\n 405: MethodNotAllowed,\n 406: NotAcceptable,\n 408: Timeout,\n 409: Conflict,\n 410: Gone,\n 411: LengthRequired,\n 422: Unprocessable,\n 429: TooManyRequests,\n 500: GeneralError,\n 501: NotImplemented,\n 502: BadGateway,\n 503: Unavailable\n};\n\nfunction convert (error) {\n if (!error) {\n return error;\n }\n\n const FeathersError = errors[error.name];\n const result = FeathersError\n ? new FeathersError(error.message, error.data)\n : new Error(error.message || error);\n\n if (typeof error === 'object') {\n Object.assign(result, error);\n }\n\n return result;\n}\n\nmodule.exports = Object.assign({ convert }, errors);\n","const Service = require('@feathersjs/transport-commons/client');\n\nfunction primusClient (connection, options) {\n if (!connection) {\n throw new Error('Primus connection needs to be provided');\n }\n\n const defaultService = function (name) {\n return new Service(Object.assign({}, options, {\n name,\n connection,\n method: 'send'\n }));\n };\n\n const initialize = function (app) {\n if (typeof app.defaultService === 'function') {\n throw new Error('Only one default client provider can be configured');\n }\n\n app.primus = connection;\n app.defaultService = defaultService;\n };\n\n initialize.Service = Service;\n initialize.service = defaultService;\n\n return initialize;\n}\n\nmodule.exports = primusClient;\nmodule.exports.default = primusClient;\n","module.exports = require('./lib/client').Service;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Service = void 0;\nconst debug_1 = __importDefault(require(\"debug\"));\nconst errors_1 = require(\"@feathersjs/errors\");\nconst debug = (0, debug_1.default)('@feathersjs/transport-commons/client');\nconst namespacedEmitterMethods = [\n 'addListener',\n 'emit',\n 'listenerCount',\n 'listeners',\n 'on',\n 'once',\n 'prependListener',\n 'prependOnceListener',\n 'removeAllListeners',\n 'removeListener'\n];\nconst otherEmitterMethods = [\n 'eventNames',\n 'getMaxListeners',\n 'setMaxListeners'\n];\nconst addEmitterMethods = (service) => {\n otherEmitterMethods.forEach(method => {\n service[method] = function (...args) {\n if (typeof this.connection[method] !== 'function') {\n throw new Error(`Can not call '${method}' on the client service connection`);\n }\n return this.connection[method](...args);\n };\n });\n // Methods that should add the namespace (service path)\n namespacedEmitterMethods.forEach(method => {\n service[method] = function (name, ...args) {\n if (typeof this.connection[method] !== 'function') {\n throw new Error(`Can not call '${method}' on the client service connection`);\n }\n const eventName = `${this.path} ${name}`;\n debug(`Calling emitter method ${method} with ` +\n `namespaced event '${eventName}'`);\n const result = this.connection[method](eventName, ...args);\n return result === this.connection ? this : result;\n };\n });\n};\nclass Service {\n constructor(options) {\n this.events = options.events;\n this.path = options.name;\n this.connection = options.connection;\n this.method = options.method;\n this.timeout = options.timeout || 5000;\n addEmitterMethods(this);\n }\n send(method, ...args) {\n return new Promise((resolve, reject) => {\n const timeoutId = setTimeout(() => reject(new errors_1.Timeout(`Timeout of ${this.timeout}ms exceeded calling ${method} on ${this.path}`, {\n timeout: this.timeout,\n method,\n path: this.path\n })), this.timeout);\n args.unshift(method, this.path);\n args.push(function (error, data) {\n error = (0, errors_1.convert)(error);\n clearTimeout(timeoutId);\n return error ? reject(error) : resolve(data);\n });\n debug(`Sending socket.${this.method}`, args);\n this.connection[this.method](...args);\n });\n }\n find(params = {}) {\n return this.send('find', params.query || {});\n }\n get(id, params = {}) {\n return this.send('get', id, params.query || {});\n }\n create(data, params = {}) {\n return this.send('create', data, params.query || {});\n }\n update(id, data, params = {}) {\n return this.send('update', id, data, params.query || {});\n }\n patch(id, data, params = {}) {\n return this.send('patch', id, data, params.query || {});\n }\n remove(id, params = {}) {\n return this.send('remove', id, params.query || {});\n }\n // `off` is actually not part of the Node event emitter spec\n // but we are adding it since everybody is expecting it because\n // of the emitter-component Socket.io is using\n off(name, ...args) {\n if (typeof this.connection.off === 'function') {\n const result = this.connection.off(`${this.path} ${name}`, ...args);\n return result === this.connection ? this : result;\n }\n else if (args.length === 0) {\n // @ts-ignore\n return this.removeAllListeners(name);\n }\n // @ts-ignore\n return this.removeListener(name, ...args);\n }\n}\nexports.Service = Service;\n//# sourceMappingURL=client.js.map","/**\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","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","","// startup\n// Load entry module and return exports\n// This entry module used 'module' so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(\"./src/primus.js\");\n",""],"names":["exports","formatArgs","save","load","useColors","storage","localstorage","destroy","warned","console","warn","colors","window","process","type","__nwjs","navigator","userAgent","toLowerCase","match","document","documentElement","style","WebkitAppearance","firebug","exception","table","parseInt","RegExp","$1","args","namespace","module","humanize","diff","c","color","splice","index","lastC","replace","log","debug","namespaces","setItem","removeItem","error","r","getItem","env","DEBUG","localStorage","require","formatters","j","v","JSON","stringify","message","setup","createDebug","default","coerce","disable","enable","enabled","Object","keys","forEach","key","names","skips","selectColor","hash","i","length","charCodeAt","Math","abs","prevTime","enableOverride","namespacesCache","enabledCache","self","curr","Number","Date","ms","prev","unshift","format","formatter","val","call","logFn","apply","extend","defineProperty","enumerable","configurable","get","set","init","delimiter","newDebug","split","len","push","substr","map","toNamespace","join","name","test","regexp","toString","substring","Error","stack","FeathersError","msg","code","className","data","errors","newData","parse","captureStackTrace","inheritsFrom","Child","Parent","prototype","create","constructor","value","BadRequest","NotAuthenticated","PaymentError","Forbidden","NotFound","MethodNotAllowed","NotAcceptable","Timeout","Conflict","Gone","LengthRequired","Unprocessable","TooManyRequests","GeneralError","NotImplemented","BadGateway","Unavailable","convert","result","assign","Service","primusClient","connection","options","defaultService","method","initialize","app","primus","service"],"sourceRoot":""}
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.feathers=t():e.feathers=t()}(this,(function(){return n={},e.m=t=[function(e,t,n){(function(r){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),this.useColors){var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)}},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.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"],t.log=console.debug||console.log||function(){},e.exports=n(6)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,n(5))},function(e,t,n){e.exports=n(2)},function(e,t,n){var r=n(3);function o(e,t){if(!e)throw new Error("Primus connection needs to be provided");function n(n){return new r(Object.assign({},t,{name:n,connection:e,method:"send"}))}function o(t){if("function"==typeof t.defaultService)throw new Error("Only one default client provider can be configured");t.primus=e,t.defaultService=n}return o.Service=r,o.service=n,o}e.exports=o,e.exports.default=o},function(e,t,n){e.exports=n(4).Service},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Service=void 0;var i=o(n(0)),s=n(8),a=i.default("@feathersjs/transport-commons/client"),c=["addListener","emit","listenerCount","listeners","on","once","prependListener","prependOnceListener","removeAllListeners","removeListener"],u=["eventNames","getMaxListeners","setMaxListeners"],l=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.events=t.events,this.path=t.name,this.connection=t.connection,this.method=t.method,this.timeout=t.timeout||5e3,function(e){u.forEach((function(t){e[t]=function(){var e;if("function"!=typeof this.connection[t])throw new Error("Can not call '".concat(t,"' on the client service connection"));return(e=this.connection)[t].apply(e,arguments)}})),c.forEach((function(t){e[t]=function(e){var n;if("function"!=typeof this.connection[t])throw new Error("Can not call '".concat(t,"' on the client service connection"));var r="".concat(this.path," ").concat(e);a("Calling emitter method ".concat(t," with ")+"namespaced event '".concat(r,"'"));for(var o=arguments.length,i=new Array(1<o?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];var c=(n=this.connection)[t].apply(n,[r].concat(i));return c===this.connection?this:c}}))}(this)}var t,n;return t=e,(n=[{key:"send",value:function(e){for(var t=this,n=arguments.length,r=new Array(1<n?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return new Promise((function(n,o){var i,c=setTimeout((function(){return o(new s.Timeout("Timeout of ".concat(t.timeout,"ms exceeded calling ").concat(e," on ").concat(t.path),{timeout:t.timeout,method:e,path:t.path}))}),t.timeout);r.unshift(e,t.path),r.push((function(e,t){return e=s.convert(e),clearTimeout(c),e?o(e):n(t)})),a("Sending socket.".concat(t.method),r),(i=t.connection)[t.method].apply(i,r)}))}},{key:"find",value:function(e){var t=0<arguments.length&&void 0!==e?e:{};return this.send("find",t.query||{})}},{key:"get",value:function(e,t){var n=1<arguments.length&&void 0!==t?t:{};return this.send("get",e,n.query||{})}},{key:"create",value:function(e,t){var n=1<arguments.length&&void 0!==t?t:{};return this.send("create",e,n.query||{})}},{key:"update",value:function(e,t,n){var r=2<arguments.length&&void 0!==n?n:{};return this.send("update",e,t,r.query||{})}},{key:"patch",value:function(e,t,n){var r=2<arguments.length&&void 0!==n?n:{};return this.send("patch",e,t,r.query||{})}},{key:"remove",value:function(e,t){var n=1<arguments.length&&void 0!==t?t:{};return this.send("remove",e,n.query||{})}},{key:"off",value:function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if("function"!=typeof this.connection.off)return 0===n.length?this.removeAllListeners(e):this.removeListener.apply(this,[e].concat(n));var o,i=(o=this.connection).off.apply(o,["".concat(this.path," ").concat(e)].concat(n));return i===this.connection?this:i}}])&&r(t.prototype,n),e}();t.Service=l},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var c,u=[],l=!1,f=-1;function d(){l&&c&&(l=!1,c.length?u=c.concat(u):f=-1,u.length&&h())}function h(){if(!l){var e=a(d);l=!0;for(var t=u.length;t;){for(c=u,u=[];++f<t;)c&&c[f].run();f=-1,t=u.length}c=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new p(e,t)),1!==u.length||l||a(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){function r(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}e.exports=function(e){function t(e){var n;function r(){for(var e,o,i,s,a=arguments.length,c=new Array(a),u=0;u<a;u++)c[u]=arguments[u];r.enabled&&(e=r,i=(o=Number(new Date))-(n||o),e.diff=i,e.prev=n,e.curr=o,n=o,c[0]=t.coerce(c[0]),"string"!=typeof c[0]&&c.unshift("%O"),c[s=0]=c[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;s++;var o,i=t.formatters[r];return"function"==typeof i&&(o=c[s],n=i.call(e,o),c.splice(s,1),s--),n})),t.formatArgs.call(e,c),(e.log||t.log).apply(e,c))}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=t.selectColor(e),r.destroy=o,r.extend=i,"function"==typeof t.init&&t.init(r),t.instances.push(r),r}function o(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}function i(e,n){var r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function s(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return((t.debug=t).default=t).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){var e=[].concat(r(t.names.map(s)),r(t.skips.map(s).map((function(e){return"-"+e})))).join(",");return t.enable(""),e},t.enable=function(e){var n;t.save(e),t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){var i=t.instances[n];i.enabled=t.enabled(i.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(7),Object.keys(e).forEach((function(n){t[n]=e[n]})),t.instances=[],t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){for(var n=0,r=0;r<e.length;r++)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},function(e,t){var n=36e5,r=864e5;function o(e,t,n,r){var o=1.5*n<=t;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,t){t=t||{};var i=typeof e;if("string"==i&&0<e.length)return function(e){if(!(100<(e=String(e)).length)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var o=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"weeks":case"week":case"w":return 6048e5*o;case"days":case"day":case"d":return o*r;case"hours":case"hour":case"hrs":case"hr":case"h":return o*n;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*o;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*o;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}(e);if("number"==i&&isFinite(e))return(t.long?function(e){var t=Math.abs(e);return r<=t?o(e,t,r,"day"):n<=t?o(e,t,n,"hour"):6e4<=t?o(e,t,6e4,"minute"):1e3<=t?o(e,t,1e3,"second"):e+" ms"}:function(e){var t=Math.abs(e);return r<=t?Math.round(e/r)+"d":n<=t?Math.round(e/n)+"h":6e4<=t?Math.round(e/6e4)+"m":1e3<=t?Math.round(e/1e3)+"s":e+"ms"})(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(0)("@feathersjs/errors");function i(e,t,n,s,a){var c,u,l;(e=e||"Error")instanceof Error?(u=e.message||"Error",e.errors&&(c=e.errors)):"object"===r(e)?(u=e.message||"Error",a=e):u=e,a&&((l=JSON.parse(JSON.stringify(a))).errors?(c=l.errors,delete l.errors):a.errors&&(c=JSON.parse(JSON.stringify(a.errors)))),this.type="FeathersError",this.name=t,this.message=u,this.code=n,this.className=s,this.data=l,this.errors=c||{},o("".concat(this.name,"(").concat(this.code,"): ").concat(this.message)),o(this.errors),Error.captureStackTrace?Error.captureStackTrace(this,i):this.stack=(new Error).stack}function s(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e}function a(e,t){i.call(this,e,"BadRequest",400,"bad-request",t)}function c(e,t){i.call(this,e,"NotAuthenticated",401,"not-authenticated",t)}function u(e,t){i.call(this,e,"PaymentError",402,"payment-error",t)}function l(e,t){i.call(this,e,"Forbidden",403,"forbidden",t)}function f(e,t){i.call(this,e,"NotFound",404,"not-found",t)}function d(e,t){i.call(this,e,"MethodNotAllowed",405,"method-not-allowed",t)}function h(e,t){i.call(this,e,"NotAcceptable",406,"not-acceptable",t)}function p(e,t){i.call(this,e,"Timeout",408,"timeout",t)}function m(e,t){i.call(this,e,"Conflict",409,"conflict",t)}function y(e,t){i(this,e,"Gone",410,"gone")}function v(e,t){i.call(this,e,"LengthRequired",411,"length-required",t)}function C(e,t){i.call(this,e,"Unprocessable",422,"unprocessable",t)}function g(e,t){i.call(this,e,"TooManyRequests",429,"too-many-requests",t)}function b(e,t){i.call(this,e,"GeneralError",500,"general-error",t)}function w(e,t){i.call(this,e,"NotImplemented",501,"not-implemented",t)}function F(e,t){i.call(this,e,"BadGateway",502,"bad-gateway",t)}function E(e,t){i.call(this,e,"Unavailable",503,"unavailable",t)}s(i,Error),Object.defineProperty(i.prototype,"toJSON",{value:function(){return{name:this.name,message:this.message,code:this.code,className:this.className,data:this.data,errors:this.errors}}}),s(a,i),s(c,i),s(u,i),s(l,i),s(f,i),s(d,i),s(h,i),s(p,i),s(m,i),s(y,i),s(v,i),s(C,i),s(g,i),s(b,i),s(w,i),s(F,i),s(E,i);var S={FeathersError:i,BadRequest:a,NotAuthenticated:c,PaymentError:u,Forbidden:l,NotFound:f,MethodNotAllowed:d,NotAcceptable:h,Timeout:p,Conflict:m,Gone:y,LengthRequired:v,Unprocessable:C,TooManyRequests:g,GeneralError:b,NotImplemented:w,BadGateway:F,Unavailable:E,400:a,401:c,402:u,403:l,404:f,405:d,406:h,408:p,409:m,410:y,411:v,422:C,429:g,500:b,501:w,502:F,503:E};e.exports=Object.assign({convert:function(e){if(!e)return e;var t=S[e.name],n=t?new t(e.message,e.data):new Error(e.message||e);return"object"===r(e)&&Object.assign(n,e),n}},S)}],e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(e){return t[e]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},e.p="",e(e.s=1);function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var t,n}));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.feathers=t():e.feathers=t()}(this,(function(){return e={898:function(e,t,n){var r;t.formatArgs=function(t){var n,r,o;t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),this.useColors&&(n="color: "+this.color,t.splice(1,0,n,"color: inherit"),t[o=r=0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n))},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(r=!1,function(){r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}),t.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"],t.log=console.debug||console.log||function(){},e.exports=n(604)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},604:function(e,t,n){function r(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}e.exports=function(e){function t(e){var n,r,s,a=null;function i(){for(var e,r,o,s,a=arguments.length,c=new Array(a),u=0;u<a;u++)c[u]=arguments[u];i.enabled&&(e=i,o=(r=Number(new Date))-(n||r),e.diff=o,e.prev=n,e.curr=r,n=r,c[0]=t.coerce(c[0]),"string"!=typeof c[0]&&c.unshift("%O"),c[s=0]=c[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return"%";s++;var o=t.formatters[r];return"function"==typeof o&&(r=c[s],n=o.call(e,r),c.splice(s,1),s--),n})),t.formatArgs.call(e,c),(e.log||t.log).apply(e,c))}return i.namespace=e,i.useColors=t.useColors(),i.color=t.selectColor(e),i.extend=o,i.destroy=t.destroy,Object.defineProperty(i,"enabled",{enumerable:!0,configurable:!1,get:function(){return null!==a?a:(r!==t.namespaces&&(r=t.namespaces,s=t.enabled(e)),s)},set:function(e){a=e}}),"function"==typeof t.init&&t.init(i),i}function o(e,n){return(e=t(this.namespace+(void 0===n?":":n)+e)).log=this.log,e}function s(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return((t.debug=t).default=t).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){var e=[].concat(r(t.names.map(s)),r(t.skips.map(s).map((function(e){return"-"+e})))).join(",");return t.enable(""),e},t.enable=function(e){var n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(378),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((function(n){t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){for(var n=0,r=0;r<e.length;r++)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},285:function(e,t,n){e.exports=n(849)},441:function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(898)("@feathersjs/errors");function s(e,t,n,a,i){var c,u,l;(e=e||"Error")instanceof Error?(u=e.message||"Error",e.errors&&(c=e.errors)):"object"===r(e)?(u=e.message||"Error",i=e):u=e,i&&((l=JSON.parse(JSON.stringify(i))).errors?(c=l.errors,delete l.errors):i.errors&&(c=JSON.parse(JSON.stringify(i.errors)))),this.type="FeathersError",this.name=t,this.message=u,this.code=n,this.className=a,this.data=l,this.errors=c||{},o("".concat(this.name,"(").concat(this.code,"): ").concat(this.message)),o(this.errors),Error.captureStackTrace?Error.captureStackTrace(this,s):this.stack=(new Error).stack}function a(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e}function i(e,t){s.call(this,e,"BadRequest",400,"bad-request",t)}function c(e,t){s.call(this,e,"NotAuthenticated",401,"not-authenticated",t)}function u(e,t){s.call(this,e,"PaymentError",402,"payment-error",t)}function l(e,t){s.call(this,e,"Forbidden",403,"forbidden",t)}function f(e,t){s.call(this,e,"NotFound",404,"not-found",t)}function d(e,t){s.call(this,e,"MethodNotAllowed",405,"method-not-allowed",t)}function h(e,t){s.call(this,e,"NotAcceptable",406,"not-acceptable",t)}function p(e,t){s.call(this,e,"Timeout",408,"timeout",t)}function m(e,t){s.call(this,e,"Conflict",409,"conflict",t)}function C(e,t){s(this,e,"Gone",410,"gone")}function y(e,t){s.call(this,e,"LengthRequired",411,"length-required",t)}function g(e,t){s.call(this,e,"Unprocessable",422,"unprocessable",t)}function v(e,t){s.call(this,e,"TooManyRequests",429,"too-many-requests",t)}function b(e,t){s.call(this,e,"GeneralError",500,"general-error",t)}function F(e,t){s.call(this,e,"NotImplemented",501,"not-implemented",t)}function w(e,t){s.call(this,e,"BadGateway",502,"bad-gateway",t)}function E(e,t){s.call(this,e,"Unavailable",503,"unavailable",t)}a(s,Error),Object.defineProperty(s.prototype,"toJSON",{value:function(){return{name:this.name,message:this.message,code:this.code,className:this.className,data:this.data,errors:this.errors}}}),a(i,s),a(c,s),a(u,s),a(l,s),a(f,s),a(d,s),a(h,s),a(p,s),a(m,s),a(C,s),a(y,s),a(g,s),a(v,s),a(b,s),a(F,s),a(w,s),a(E,s);var x={FeathersError:s,BadRequest:i,NotAuthenticated:c,PaymentError:u,Forbidden:l,NotFound:f,MethodNotAllowed:d,NotAcceptable:h,Timeout:p,Conflict:m,Gone:C,LengthRequired:y,Unprocessable:g,TooManyRequests:v,GeneralError:b,NotImplemented:F,BadGateway:w,Unavailable:E,400:i,401:c,402:u,403:l,404:f,405:d,406:h,408:p,409:m,410:C,411:y,422:g,429:v,500:b,501:F,502:w,503:E};e.exports=Object.assign({convert:function(e){if(!e)return e;var t=(t=x[e.name])?new t(e.message,e.data):new Error(e.message||e);return"object"===r(e)&&Object.assign(t,e),t}},x)},849:function(e,t,n){var r=n(910);function o(e,t){if(!e)throw new Error("Primus connection needs to be provided");function n(n){return new r(Object.assign({},t,{name:n,connection:e,method:"send"}))}function o(t){if("function"==typeof t.defaultService)throw new Error("Only one default client provider can be configured");t.primus=e,t.defaultService=n}return o.Service=r,o.service=n,o}e.exports=o,e.exports.default=o},910:function(e,t,n){e.exports=n(4).Service},4:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Service=void 0,r=r(n(898));var o=n(441),s=(0,r.default)("@feathersjs/transport-commons/client"),a=["addListener","emit","listenerCount","listeners","on","once","prependListener","prependOnceListener","removeAllListeners","removeListener"],i=["eventNames","getMaxListeners","setMaxListeners"];r=function(){function e(t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.events=t.events,this.path=t.name,this.connection=t.connection,this.method=t.method,this.timeout=t.timeout||5e3,n=this,i.forEach((function(e){n[e]=function(){var t;if("function"!=typeof this.connection[e])throw new Error("Can not call '".concat(e,"' on the client service connection"));return(t=this.connection)[e].apply(t,arguments)}})),a.forEach((function(e){n[e]=function(t){if("function"!=typeof this.connection[e])throw new Error("Can not call '".concat(e,"' on the client service connection"));var n="".concat(this.path," ").concat(t);s("Calling emitter method ".concat(e," with ")+"namespaced event '".concat(n,"'"));for(var r=arguments.length,o=new Array(1<r?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];return(n=(t=this.connection)[e].apply(t,[n].concat(o)))===this.connection?this:n}}))}var t,n;return t=e,(n=[{key:"send",value:function(e){for(var t=this,n=arguments.length,r=new Array(1<n?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return new Promise((function(n,a){var i,c=setTimeout((function(){return a(new o.Timeout("Timeout of ".concat(t.timeout,"ms exceeded calling ").concat(e," on ").concat(t.path),{timeout:t.timeout,method:e,path:t.path}))}),t.timeout);r.unshift(e,t.path),r.push((function(e,t){return e=(0,o.convert)(e),clearTimeout(c),e?a(e):n(t)})),s("Sending socket.".concat(t.method),r),(i=t.connection)[t.method].apply(i,r)}))}},{key:"find",value:function(){return this.send("find",(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).query||{})}},{key:"get",value:function(e){return this.send("get",e,(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).query||{})}},{key:"create",value:function(e){return this.send("create",e,(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).query||{})}},{key:"update",value:function(e,t){return this.send("update",e,t,(2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}).query||{})}},{key:"patch",value:function(e,t){return this.send("patch",e,t,(2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}).query||{})}},{key:"remove",value:function(e){return this.send("remove",e,(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).query||{})}},{key:"off",value:function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"!=typeof this.connection.off?0===n.length?this.removeAllListeners(e):this.removeListener.apply(this,[e].concat(n)):(e=(o=this.connection).off.apply(o,["".concat(this.path," ").concat(e)].concat(n)))===this.connection?this:e;var o}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),t.Service=r},378:function(e){var t=36e5,n=864e5;function r(e,t,n,r){return t=1.5*n<=t,Math.round(e/n)+" "+r+(t?"s":"")}e.exports=function(e,o){o=o||{};var s=typeof e;if("string"==s&&0<e.length)return function(e){if(!(100<(e=String(e)).length)&&(e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e))){var r=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*r;case"weeks":case"week":case"w":return 6048e5*r;case"days":case"day":case"d":return r*n;case"hours":case"hour":case"hrs":case"hr":case"h":return r*t;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*r;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}(e);if("number"==s&&isFinite(e))return(o.long?function(e){var o=Math.abs(e);return n<=o?r(e,o,n,"day"):t<=o?r(e,o,t,"hour"):6e4<=o?r(e,o,6e4,"minute"):1e3<=o?r(e,o,1e3,"second"):e+" ms"}:function(e){var r=Math.abs(e);return n<=r?Math.round(e/n)+"d":t<=r?Math.round(e/t)+"h":6e4<=r?Math.round(e/6e4)+"m":1e3<=r?Math.round(e/1e3)+"s":e+"ms"})(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}},t={},function n(r){var o=t[r];return void 0!==o||(o=t[r]={exports:{}},e[r].call(o.exports,o,o.exports,n)),o.exports}(285);var e,t}));