@feathersjs/client 4.5.17 → 4.5.19

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
- !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){var n;if(e)return"string"==typeof e?o(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&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,i=null;function a(){for(var e,r,o,s,i=arguments.length,c=new Array(i),u=0;u<i;u++)c[u]=arguments[u];a.enabled&&(e=a,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){return"%%"===n?"%":(s++,"function"==typeof(r=t.formatters[r])&&(o=c[s],n=r.call(e,o),c.splice(s,1),s--),n);var o})),t.formatArgs.call(e,c),(e.log||t.log).apply(e,c))}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=o,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:function(){return null!==i?i:(r!==t.namespaces&&(r=t.namespaces,s=t.enabled(e)),s)},set:function(e){i=e}}),"function"==typeof t.init&&t.init(a),a}function o(e,n){return(n=t(this.namespace+(void 0===n?":":n)+e)).log=this.log,n}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){t.save(e),t.namespaces=e,t.names=[],t.skips=[];var n,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.slice(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,i,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=i,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 i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e}function a(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 y(e,t){s(this,e,"Gone",410,"gone")}function C(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 S(e,t){s.call(this,e,"Unavailable",503,"unavailable",t)}i(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}}}),i(a,s),i(c,s),i(u,s),i(l,s),i(f,s),i(d,s),i(h,s),i(p,s),i(m,s),i(y,s),i(C,s),i(g,s),i(v,s),i(b,s),i(F,s),i(w,s),i(S,s);var E={FeathersError:s,BadRequest:a,NotAuthenticated:c,PaymentError:u,Forbidden:l,NotFound:f,MethodNotAllowed:d,NotAcceptable:h,Timeout:p,Conflict:m,Gone:y,LengthRequired:C,Unprocessable:g,TooManyRequests:v,GeneralError:b,NotImplemented:F,BadGateway:w,Unavailable:S,400:a,401:c,402:u,403:l,404:f,405:d,406:h,408:p,409:m,410:y,411:C,422:g,429:v,500:b,501:F,502:w,503:S};e.exports=Object.assign({convert:function(e){var t;return e&&(t=(t=E[e.name])?new t(e.message,e.data):new Error(e.message||e),"object"===r(e)&&Object.assign(t,e),t)}},E)},849:function(e,t,n){var r=n(910);function o(e,t){var n,o;if(e)return n=function(n){return new r(Object.assign({},t,{name:n,connection:e,method:"send"}))},(o=function(t){if("function"==typeof t.defaultService)throw new Error("Only one default client provider can be configured");t.primus=e,t.defaultService=n}).Service=r,o.service=n,o;throw new Error("Primus connection needs to be provided")}e.exports=o,e.exports.default=o},910:function(e,t,n){e.exports=n(4).Service},4:function(e,t,n){"use strict";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=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},s=(Object.defineProperty(t,"__esModule",{value:!0}),t.Service=void 0,o=o(n(898)),n(441)),i=(0,o.default)("@feathersjs/transport-commons/client"),a=["addListener","emit","listenerCount","listeners","on","once","prependListener","prependOnceListener","removeAllListeners","removeListener"],c=["eventNames","getMaxListeners","setMaxListeners"];n=function(){function e(t){var n;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.events=t.events,this.path=t.name,this.connection=t.connection,this.method=t.method,this.timeout=t.timeout||5e3,n=this,c.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"));t="".concat(this.path," ").concat(t),i("Calling emitter method ".concat(e," with ")+"namespaced event '".concat(t,"'"));for(var n=arguments.length,r=new Array(1<n?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var s=(s=this.connection)[e].apply(s,[t].concat(r));return s===this.connection?this:s}}))}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 a,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=(0,s.convert)(e),clearTimeout(c),e?o(e):n(t)})),i("Sending socket.".concat(t.method),r),(a=t.connection)[t.method].apply(a,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,n=arguments.length,r=new Array(1<n?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return"function"==typeof this.connection.off?(t=(t=this.connection).off.apply(t,["".concat(this.path," ").concat(e)].concat(r)))===this.connection?this:t:0===r.length?this.removeAllListeners(e):this.removeListener.apply(this,[e].concat(r))}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,function(e){return e=function(e,t){if("object"!==r(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return String(e);if("object"!==r(n=n.call(e,"string")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e),"symbol"===r(e)?e:String(e)}(o.key),o)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),t.Service=n},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)){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))}if(s=e,!(100<(s=String(s)).length)&&(s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(s))){var i=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*i;case"weeks":case"week":case"w":return 6048e5*i;case"days":case"day":case"d":return i*n;case"hours":case"hour":case"hrs":case"hr":case"h":return i*t;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*i;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*i;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}}}},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}));
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={500: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")||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&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&31<=parseInt(e[1],10)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));var e},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(451)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},451:function(e,t,n){function r(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||i(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){var n,r,o,a,s="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(s)return o=!(r=!0),{s:function(){s=s.call(e)},n:function(){var e=s.next();return r=e.done,e},e:function(e){o=!0,n=e},f:function(){try{r||null==s.return||s.return()}finally{if(o)throw n}}};if(Array.isArray(e)||(s=i(e))||t&&e&&"number"==typeof e.length)return s&&(e=s),a=0,{s:t=function(){},n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(e,t){var n;if(e)return"string"==typeof e?a(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}e.exports=function(e){function t(e){var n,r,o,a=null;function s(){for(var e,r,o,i,a=arguments.length,c=new Array(a),u=0;u<a;u++)c[u]=arguments[u];s.enabled&&(e=s,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[i=0]=c[0].replace(/%([a-zA-Z%])/g,function(n,r){return"%%"===n?"%":(i++,"function"==typeof(r=t.formatters[r])&&(o=c[i],n=r.call(e,o),c.splice(i,1),i--),n);var o}),t.formatArgs.call(e,c),(e.log||t.log).apply(e,c))}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=i,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:function(){return null!==a?a:(r!==t.namespaces&&(r=t.namespaces,o=t.enabled(e)),o)},set:function(e){a=e}}),"function"==typeof t.init&&t.init(s),s}function i(e,n){return(n=t(this.namespace+(void 0===n?":":n)+e)).log=this.log,n}function a(e,t){for(var n=0,r=0,o=-1,i=0;n<e.length;)if(r<t.length&&(t[r]===e[n]||"*"===t[r]))"*"===t[r]?(o=r,i=n):n++,r++;else{if(-1===o)return;r=o+1,n=++i}for(;r<t.length&&"*"===t[r];)r++;return r===t.length}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),r(t.skips.map(function(e){return"-"+e}))).join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];var n,r=o(("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean));try{for(r.s();!(n=r.n()).done;){var i=n.value;"-"===i[0]?t.skips.push(i.slice(1)):t.names.push(i)}}catch(e){r.e(e)}finally{r.f()}},t.enabled=function(e){var n,r=o(t.skips);try{for(r.s();!(n=r.n()).done;)if(a(e,n.value))return!1}catch(e){r.e(e)}finally{r.f()}var i,s=o(t.names);try{for(s.s();!(i=s.n()).done;)if(a(e,i.value))return!0}catch(e){s.e(e)}finally{s.f()}return!1},t.humanize=n(437),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}},293: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(500)("@feathersjs/errors");function i(e,t,n,a,s){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",s=e):u=e,s&&((l=JSON.parse(JSON.stringify(s))).errors?(c=l.errors,delete l.errors):s.errors&&(c=JSON.parse(JSON.stringify(s.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,i):this.stack=(new Error).stack}function a(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e}function s(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 m(e,t){i.call(this,e,"Timeout",408,"timeout",t)}function p(e,t){i.call(this,e,"Conflict",409,"conflict",t)}function y(e,t){i(this,e,"Gone",410,"gone")}function C(e,t){i.call(this,e,"LengthRequired",411,"length-required",t)}function v(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 F(e,t){i.call(this,e,"NotImplemented",501,"not-implemented",t)}function w(e,t){i.call(this,e,"BadGateway",502,"bad-gateway",t)}function S(e,t){i.call(this,e,"Unavailable",503,"unavailable",t)}a(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}}}),a(s,i),a(c,i),a(u,i),a(l,i),a(f,i),a(d,i),a(h,i),a(m,i),a(p,i),a(y,i),a(C,i),a(v,i),a(g,i),a(b,i),a(F,i),a(w,i),a(S,i);var E={FeathersError:i,BadRequest:s,NotAuthenticated:c,PaymentError:u,Forbidden:l,NotFound:f,MethodNotAllowed:d,NotAcceptable:h,Timeout:m,Conflict:p,Gone:y,LengthRequired:C,Unprocessable:v,TooManyRequests:g,GeneralError:b,NotImplemented:F,BadGateway:w,Unavailable:S,400:s,401:c,402:u,403:l,404:f,405:d,406:h,408:m,409:p,410:y,411:C,422:v,429:g,500:b,501:F,502:w,503:S};e.exports=Object.assign({convert:function(e){var t;return e&&(t=(t=E[e.name])?new t(e.message,e.data):new Error(e.message||e),"object"===r(e)&&Object.assign(t,e),t)}},E)},746:function(e,t,n){var r=n(637);function o(e,t){var n,o;if(e)return n=function(n){return new r(Object.assign({},t,{name:n,connection:e,method:"send"}))},(o=function(t){if("function"==typeof t.defaultService)throw new Error("Only one default client provider can be configured");t.primus=e,t.defaultService=n}).Service=r,o.service=n,o;throw new Error("Primus connection needs to be provided")}e.exports=o,e.exports.default=o},637:function(e,t,n){e.exports=n(969).Service},969:function(e,t,n){"use strict";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=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},i=(Object.defineProperty(t,"__esModule",{value:!0}),t.Service=void 0,o=o(n(500)),n(293)),a=(0,o.default)("@feathersjs/transport-commons/client"),s=["addListener","emit","listenerCount","listeners","on","once","prependListener","prependOnceListener","removeAllListeners","removeListener"],c=["eventNames","getMaxListeners","setMaxListeners"];n=function(){return e=function e(t){var n;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.events=t.events,this.path=t.name,this.connection=t.connection,this.method=t.method,this.timeout=t.timeout||5e3,n=this,c.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)}}),s.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"));t="".concat(this.path," ").concat(t),a("Calling emitter method ".concat(e," with ")+"namespaced event '".concat(t,"'"));for(var n=arguments.length,r=new Array(1<n?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var i=(i=this.connection)[e].apply(i,[t].concat(r));return i===this.connection?this:i}})},(t=[{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 s,c=setTimeout(function(){return o(new i.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,i.convert)(e),clearTimeout(c),e?o(e):n(t)}),a("Sending socket.".concat(t.method),r),(s=t.connection)[t.method].apply(s,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,n=arguments.length,r=new Array(1<n?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return"function"==typeof this.connection.off?(t=(t=this.connection).off.apply(t,["".concat(this.path," ").concat(e)].concat(r)))===this.connection?this:t:0===r.length?this.removeAllListeners(e):this.removeListener.apply(this,[e].concat(r))}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,function(e){return e=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);if("object"!=r(t=t.call(e,"string")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(e),"symbol"==r(e)?e:e+""}(o.key),o)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),t.Service=n},814:function(e,t,n){e.exports=n(746)},437: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 i=typeof e;if(!("string"==i&&0<e.length)){if("number"==i&&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))}if(i=e,!(100<(i=String(i)).length)&&(i=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i))){var a=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return 6048e5*a;case"days":case"day":case"d":return a*n;case"hours":case"hour":case"hrs":case"hr":case"h":return a*t;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*a;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*a;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}},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}(814);var e,t});