@feathersjs/client 5.0.31 → 5.0.33
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.
- package/CHANGELOG.md +10 -0
- package/dist/core.js +1374 -1374
- package/dist/core.js.map +1 -1
- package/dist/core.min.js +1 -1
- package/dist/feathers.js +6035 -5590
- package/dist/feathers.js.map +1 -1
- package/dist/feathers.min.js +1 -1
- package/package.json +18 -18
package/dist/core.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see core.min.js.LICENSE.txt */
|
|
2
|
-
!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 function(){"use strict";var e={792:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.noopDebug=n,t.setDebug=function(e){o=e,Object.keys(r).forEach((function(t){r[t]=e(t)}))},t.createDebug=function(e){return r[e]||(r[e]=o(e)),function(){return r[e].apply(r,arguments)}};var r={};function n(){return function(){}}var o=n},271:function(e,t,r){function n(e,t,r){return(t=function(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e){return o="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},o(e)}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,u,a=[],c=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(s)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var a=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),c=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||a(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t._=void 0,t.stripSlashes=function(e){return e.replace(/^(\/+)|(\/+)$/g,"")},t.isPromise=function(e){return t._.isObject(e)&&"function"==typeof e.then},t.createSymbol=function(e){return"undefined"!=typeof Symbol?Symbol.for(e):e},t._={each:function(e,r){e&&"function"==typeof e.forEach?e.forEach(r):t._.isObject(e)&&Object.keys(e).forEach((function(t){return r(e[t],t)}))},some:function(e,t){return Object.keys(e).map((function(t){return[e[t],t]})).some((function(e){var r=i(e,2),n=r[0],o=r[1];return t(n,o)}))},every:function(e,t){return Object.keys(e).map((function(t){return[e[t],t]})).every((function(e){var r=i(e,2),n=r[0],o=r[1];return t(n,o)}))},keys:function(e){return Object.keys(e)},values:function(e){return t._.keys(e).map((function(t){return e[t]}))},isMatch:function(e,r){return t._.keys(r).every((function(t){return e[t]===r[t]}))},isEmpty:function(e){return 0===t._.keys(e).length},isObject:function(e){return"object"===o(e)&&!Array.isArray(e)&&null!==e},isObjectOrArray:function(e){return"object"===o(e)&&null!==e},extend:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return Object.assign.apply(Object,[e].concat(r))},omit:function(e){for(var r=t._.extend({},e),n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return o.forEach((function(e){return delete r[e]})),r},pick:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return r.reduce((function(t,r){return void 0!==e[r]&&(t[r]=e[r]),t}),{})},merge:function(e,r){return t._.isObject(e)&&t._.isObject(r)&&Object.keys(r).forEach((function(o){t._.isObject(r[o])?(e[o]||Object.assign(e,n({},o,{})),t._.merge(e[o],r[o])):Object.assign(e,n({},o,r[o]))})),e}},c(r(792),t)},205:function(e,t,r){function n(e){return n="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},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,u=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",f=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),a=new C(n||[]);return u(i,"_invoke",{value:A(e,r,a)}),i}function y(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var v="suspendedStart",h="suspendedYield",d="executing",b="completed",m={};function g(){}function w(){}function O(){}var j={};l(j,c,(function(){return this}));var _=Object.getPrototypeOf,S=_&&_(_(H([])));S&&S!==r&&i.call(S,c)&&(j=S);var P=O.prototype=g.prototype=Object.create(j);function k(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(o,u,a,c){var s=y(e[o],e,u);if("throw"!==s.type){var f=s.arg,l=f.value;return l&&"object"==n(l)&&i.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(l).then((function(e){f.value=e,a(f)}),(function(e){return r("throw",e,a,c)}))}c(s.arg)}var o;u(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function A(t,r,n){var o=v;return function(i,u){if(o===d)throw Error("Generator is already running");if(o===b){if("throw"===i)throw u;return{value:e,done:!0}}for(n.method=i,n.arg=u;;){var a=n.delegate;if(a){var c=x(a,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=y(t,r,n);if("normal"===s.type){if(o=n.done?b:h,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=b,n.method="throw",n.arg=s.arg)}}}function x(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,x(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=y(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var u=i.arg;return u?u.done?(r[t.resultName]=u.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):u:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function M(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(M,this),this.reset(!0)}function H(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,u=function r(){for(;++o<t.length;)if(i.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return u.next=u}}throw new TypeError(n(t)+" is not iterable")}return w.prototype=O,u(P,"constructor",{value:O,configurable:!0}),u(O,"constructor",{value:w,configurable:!0}),w.displayName=l(O,f,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,O):(e.__proto__=O,l(e,f,"GeneratorFunction")),e.prototype=Object.create(P),e},t.awrap=function(e){return{__await:e}},k(E.prototype),l(E.prototype,s,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var u=new E(p(e,r,n,o),i);return t.isGeneratorFunction(r)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},k(P),l(P,f,"Generator"),l(P,c,(function(){return this})),l(P,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=H,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return a.type="throw",a.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var u=this.tryEntries[o],a=u.completion;if("root"===u.tryLoc)return n("end");if(u.tryLoc<=this.prev){var c=i.call(u,"catchLoc"),s=i.call(u,"finallyLoc");if(c&&s){if(this.prev<u.catchLoc)return n(u.catchLoc,!0);if(this.prev<u.finallyLoc)return n(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return n(u.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return n(u.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var u=o?o.completion:{};return u.type=e,u.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(u)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:H(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function i(e,t,r,n,o,i,u){try{var a=e[i](u),c=a.value}catch(e){return void r(e)}a.done?t(c):Promise.resolve(c).then(n,o)}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function c(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(s=function(){return!!e})()}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}var p=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Feathers=void 0;var y=p(r(871)),v=r(46),h=r(271),d=r(226),b=r(694),m=r(751),g=r(452),w=r(751),O=(0,h.createDebug)("@feathersjs/feathers"),j=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,r){return t=f(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,s()?Reflect.construct(t,r||[],f(e).constructor):t.apply(e,r))}(this,t)).services={},e.settings={},e.mixins=[m.hookMixin,b.eventMixin],e.version=y.default,e._isSetup=!1,e.registerHooks=(0,w.enableHooks)(e),e.registerHooks({around:[b.eventHook]}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(t,e),r=t,c=[{key:"get",value:function(e){return this.settings[e]}},{key:"set",value:function(e,t){return this.settings[e]=t,this}},{key:"configure",value:function(e){return e.call(this,this),this}},{key:"defaultService",value:function(e){throw new Error("Can not find service '".concat(e,"'"))}},{key:"service",value:function(e){var t=(0,h.stripSlashes)(e)||"/",r=this.services.hasOwnProperty(t)?this.services[t]:void 0;return void 0===r?(this.use(t,this.defaultService(t)),this.service(t)):r}},{key:"_setup",value:function(){var e=this;return this._isSetup=!0,Object.keys(this.services).reduce((function(t,r){return t.then((function(){var t=e.service(r);if("function"==typeof t.setup)return O("Setting up service for `".concat(r,"`")),t.setup(e,r)}))}),Promise.resolve()).then((function(){return e}))}},{key:"setup",get:function(){return this._setup},set:function(e){this._setup=e[d.HOOKS]?e:(0,d.hooks)(e,(0,d.middleware)().params("server").props({app:this}))}},{key:"_teardown",value:function(){var e=this;return this._isSetup=!1,Object.keys(this.services).reduce((function(t,r){return t.then((function(){var t=e.service(r);if("function"==typeof t.teardown)return O("Tearing down service for `".concat(r,"`")),t.teardown(e,r)}))}),Promise.resolve()).then((function(){return e}))}},{key:"teardown",get:function(){return this._teardown},set:function(e){this._teardown=e[d.HOOKS]?e:(0,d.hooks)(e,(0,d.middleware)().params("server").props({app:this}))}},{key:"use",value:function(e,t,r){var n=this;if("string"!=typeof e)throw new Error("'".concat(e,"' is not a valid service path."));var o=(0,h.stripSlashes)(e)||"/",i=t;if("function"==typeof i.service&&i.services)return Object.keys(i.services).forEach((function(e){return n.use("".concat(o,"/").concat(e),i.service(e))})),this;var a,c=(0,g.wrapService)(o,t,r),s=(0,g.getServiceOptions)(c),f=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}(g.protectedMethods);try{for(f.s();!(a=f.n()).done;){var l=a.value;if(s.methods.includes(l))throw new Error("'".concat(l,"' on service '").concat(o,"' is not allowed as a custom method name"))}}catch(e){f.e(e)}finally{f.f()}return O("Registering new service at `".concat(o,"`")),this.mixins.forEach((function(e){return e.call(n,c,o,s)})),this.services[o]=c,this._isSetup&&"function"==typeof c.setup&&(O("Setting up service for `".concat(o,"`")),c.setup(this,o)),this}},{key:"unuse",value:(p=o().mark((function e(t){var r,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(0,h.stripSlashes)(t)||"/",!(n=this.services[r])||"function"!=typeof n.teardown){e.next=5;break}return e.next=5,n.teardown(this,r);case 5:return delete this.services[r],e.abrupt("return",n);case 7:case"end":return e.stop()}}),e,this)})),v=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=p.apply(e,t);function u(e){i(o,r,n,u,a,"next",e)}function a(e){i(o,r,n,u,a,"throw",e)}u(void 0)}))},function(e){return v.apply(this,arguments)})},{key:"hooks",value:function(e){var t=e;return t.before||t.after||t.error||t.around?this.registerHooks(t):t.setup||t.teardown?(0,d.hooks)(this,t):this.registerHooks({around:t}),this}}],c&&a(r.prototype,c),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,c,p,v}(v.EventEmitter);t.Feathers=j},986:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},694:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.eventHook=function(e,t){var r=(0,o.getServiceOptions)(e.self).events,n=o.defaultEventMap[e.method]||null;return e.event=n,t().then((function(){"string"!=typeof e.event||r.includes(e.event)||(Array.isArray(e.result)?e.result:[e.result]).forEach((function(t){return e.self.emit(e.event,t,e)}))}))},t.eventMixin=function(e){return"function"==typeof e.on&&"function"==typeof e.emit||Object.assign(e,n.EventEmitter.prototype),e};var n=r(46),o=r(452)},751:function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}function o(e){var t=function(e){if("object"!=p(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==p(t)?t:t+""}function i(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(i=function(){return!!e})()}function u(e,t,r,n){var o=a(c(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof o?function(e){return o.apply(r,e)}:o}function a(){return a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=c(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},a.apply(null,arguments)}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function f(e){return function(e){if(Array.isArray(e))return l(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 l(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(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 l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function p(e){return p="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},p(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.FeathersHookManager=void 0,t.convertHookData=b,t.collectHooks=m,t.enableHooks=g,t.createContext=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=e[t].createContext;if("function"!=typeof n)throw new Error("Can not create context for method ".concat(t));return n(r)},t.hookMixin=function(e,t,r){var n=this;if("function"==typeof e.hooks)return e;var o=(0,v.getHookMethods)(e,r).reduce((function(r,o){var i,u=v.defaultServiceArguments[o]||["data","params"];return r[o]=(i=new w(n,o)).params.apply(i,f(u)).props({app:n,path:t,method:o,service:e,event:null,type:"around",get statusCode(){var e;return null===(e=this.http)||void 0===e?void 0:e.status},set statusCode(e){this.http=this.http||{},this.http.status=e}}),r}),{}),i=g(e);return(0,y.hooks)(e,o),e.hooks=function(e){var t=this;return e.before||e.after||e.error||e.around?i.call(this,e):Array.isArray(e)?(0,y.hooks)(this,e):(Object.keys(e).forEach((function(r){var n=(0,y.getManager)(t[r]);if(!(n instanceof w))throw new Error("Method ".concat(r," is not a Feathers hooks enabled service method"));n.middleware(e[r])})),this)},e};var y=r(226),v=r(452),h=["before","after","error","around"],d=function(e){return h.includes(e)};function b(e){var t={};if(Array.isArray(e))t.all=e;else if("object"!==p(e))t.all=[e];else for(var r=0,n=Object.keys(e);r<n.length;r++){var o=n[r],i=e[o];t[o]=Array.isArray(i)?i:[i]}return t}function m(e,t){var r=e.__hooks,n=r.collected,o=r.collectedAll,i=r.around;return[].concat(f(i.all||[]),f(i[t]||[]),f(o.before||[]),f(n[t]||[]),f(o.after||[]))}function g(e){return Object.defineProperty(e,"__hooks",{configurable:!0,value:{around:{},before:{},after:{},error:{},collected:{},collectedAll:{}},writable:!0}),function(e){var t=this.__hooks,r=Object.keys(e).reduce((function(t,r){if(!d(r))throw new Error("'".concat(r,"' is not a valid hook type"));return t[r]=b(e[r]),t}),{});return Object.keys(r).forEach((function(e){return Object.keys(r[e]).forEach((function(n){var o,i=r[e][n],u=(o=t[e])[n]||(o[n]=[]);if(u.push.apply(u,f(i)),"all"===n){if(t.before[n]||t.error[n]){var a=(0,y.collect)({before:t.before[n]||[],error:t.error[n]||[]});t.collectedAll.before=[a]}if(t.after[n]){var c=(0,y.collect)({after:t.after[n]||[]});t.collectedAll.after=[c]}}else if(t.before[n]||t.after[n]||t.error[n]){var s=(0,y.collect)({before:t.before[n]||[],after:t.after[n]||[],error:t.error[n]||[]});t.collected[n]=[s]}}))})),this}}var w=function(e){function t(e,r){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,r){return t=c(t),function(e,t){if(t&&("object"==p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,i()?Reflect.construct(t,r||[],c(e).constructor):t.apply(e,r))}(this,t)).app=e,n.method=r,n._middleware=[],n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(t,e),r=t,(o=[{key:"collectMiddleware",value:function(e,r){var n=m(this.app,this.method),o=u(t,"collectMiddleware",this,3)([e,r]),i=m(e,this.method);return[].concat(f(n),f(o),f(i))}},{key:"initializeContext",value:function(e,r,n){var o=u(t,"initializeContext",this,3)([e,r,n]);return o.params=o.params||{},o}},{key:"middleware",value:function(e){var t;return(t=this._middleware).push.apply(t,f(e)),this}}])&&n(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(y.HookManager);t.FeathersHookManager=w},295:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Feathers=t.version=void 0,t.feathers=s;var u=r(271),a=i(r(871));t.version=a.default;var c=r(205);function s(){return new c.Feathers}Object.defineProperty(t,"Feathers",{enumerable:!0,get:function(){return c.Feathers}}),s.setDebug=u.setDebug,o(r(751),t),o(r(986),t),o(r(452),t),e.exports=Object.assign(s,e.exports)},452:function(e,t,r){function n(e){return n="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},n(e)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return(t=function(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeServiceOptions=t.protectedMethods=t.defaultServiceEvents=t.defaultEventMap=t.defaultServiceMethods=t.defaultServiceArguments=t.SERVICE=void 0,t.getHookMethods=function(e,r){var n=r.methods;return t.defaultServiceMethods.filter((function(t){return"function"==typeof e[t]&&!n.includes(t)})).concat(n)},t.getServiceOptions=function(e){return e[t.SERVICE]},t.wrapService=function(e,r,n){if(r[t.SERVICE])return r;var i,u=Object.create(r),a=(0,t.normalizeServiceOptions)(r,n);if(0===Object.keys(a.methods).length&&![].concat((i=t.defaultServiceMethods,function(e){if(Array.isArray(e))return o(e)}(i)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(i)||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.")}()),["setup","teardown"]).some((function(e){return"function"==typeof r[e]})))throw new Error("Invalid service object passed for path `".concat(e,"`"));return Object.defineProperty(u,t.SERVICE,{value:a}),u};var c=r(46),s=r(271);t.SERVICE=(0,s.createSymbol)("@feathersjs/service"),t.defaultServiceArguments={find:["params"],get:["id","params"],create:["data","params"],update:["id","data","params"],patch:["id","data","params"],remove:["id","params"]},t.defaultServiceMethods=["find","get","create","update","patch","remove"],t.defaultEventMap={create:"created",update:"updated",patch:"patched",remove:"removed"},t.defaultServiceEvents=Object.values(t.defaultEventMap),t.protectedMethods=Object.keys(Object.prototype).concat(Object.keys(c.EventEmitter.prototype)).concat(["all","around","before","after","error","hooks","setup","teardown","publish"]),t.normalizeServiceOptions=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.methods,o=void 0===n?t.defaultServiceMethods.filter((function(t){return"function"==typeof e[t]})):n,i=r.events,a=void 0===i?e.events||[]:i,c=r.serviceEvents||t.defaultServiceEvents.concat(a);return u(u({},r),{},{events:a,methods:o,serviceEvents:c})}},871:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default="development"},46:function(e){var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(r,n){function o(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),r([].slice.call(arguments))}h(e,t,i,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&h(e,"error",t,{once:!0})}(e,o)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var u=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function s(e,t,r,n){var o,i,u,s;if(a(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),u=i[t]),void 0===u)u=i[t]=r,++e._eventsCount;else if("function"==typeof u?u=i[t]=n?[r,u]:[u,r]:n?u.unshift(r):u.push(r),(o=c(e))>0&&u.length>o&&!u.warned){u.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+u.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=e,f.type=t,f.count=u.length,s=f,console&&console.warn&&console.warn(s)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=f.bind(n);return o.listener=r,n.wrapFn=o,o}function p(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(o):v(o,o.length)}function y(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function v(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function h(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){n.once&&e.removeEventListener(t,o),r(i)}))}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");u=e}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return c(this)},i.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var o="error"===e,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){var u;if(t.length>0&&(u=t[0]),u instanceof Error)throw u;var a=new Error("Unhandled error."+(u?" ("+u.message+")":""));throw a.context=u,a}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var s=c.length,f=v(c,s);for(r=0;r<s;++r)n(f[r],this,t)}return!0},i.prototype.addListener=function(e,t){return s(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return s(this,e,t,!0)},i.prototype.once=function(e,t){return a(t),this.on(e,l(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,l(this,e,t)),this},i.prototype.removeListener=function(e,t){var r,n,o,i,u;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){u=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,o),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,u||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var o,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},i.prototype.listeners=function(e){return p(this,e,!0)},i.prototype.rawListeners=function(e){return p(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):y.call(e,t)},i.prototype.listenerCount=y,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},748:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(295),t)},745:function(e,t,r){function n(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(n=function(){return!!e})()}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}function u(e){return u="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},u(e)}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function f(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e){var t=function(e){if("object"!=u(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==u(t)?t:t+""}Object.defineProperty(t,"__esModule",{value:!0}),t.setMiddleware=t.getMiddleware=t.setManager=t.getManager=t.convertOptions=t.HookManager=t.BaseHookContext=t.HOOKS=void 0;var p=r(539);t.HOOKS=Symbol.for("@feathersjs/hooks");var y=function(){return f((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};c(this,e),Object.defineProperty(this,"self",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.assign(this,t)}),[{key:"toJSON",value:function(){for(var e=this,t=Object.keys(this),r=Object.getPrototypeOf(this);r;)t.push.apply(t,function(e){if(Array.isArray(e))return a(e)}(n=Object.keys(r))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(n)||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.")}()),r=Object.getPrototypeOf(r);var n;return t.reduce((function(t,r){return t[r]=e[r],t}),{})}}])}();t.BaseHookContext=y;var v=function(){return f((function e(){c(this,e),Object.defineProperty(this,"_parent",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"_params",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"_middleware",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"_props",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"_defaults",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}),[{key:"parent",value:function(e){return this._parent=e,this}},{key:"middleware",value:function(e){return this._middleware=null!=e&&e.length?e:null,this}},{key:"getMiddleware",value:function(){var e,t=null===(e=this._parent)||void 0===e?void 0:e.getMiddleware();return t&&this._middleware?t.concat(this._middleware):t||this._middleware}},{key:"collectMiddleware",value:function(e,t){var r=b(e),n=this.getMiddleware();return r&&n?r.concat(n):r||n||[]}},{key:"props",value:function(e){return this._props||(this._props={}),(0,p.copyProperties)(this._props,e),this}},{key:"getProps",value:function(){var e,t=null===(e=this._parent)||void 0===e?void 0:e.getProps();return t&&this._props?(0,p.copyProperties)({},t,this._props):t||this._props||null}},{key:"params",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this._params=t,this}},{key:"getParams",value:function(){var e,t=null===(e=this._parent)||void 0===e?void 0:e.getParams();return t&&this._params?t.concat(this._params):t||this._params}},{key:"defaults",value:function(e){return this._defaults=e,this}},{key:"getDefaults",value:function(e,t,r){var n,o="function"==typeof this._defaults?this._defaults(e,t,r):null,i=null===(n=this._parent)||void 0===n?void 0:n.getDefaults(e,t,r);return i&&o?Object.assign({},i,o):i||o}},{key:"getContextClass",value:function(){var e=function(e){function t(e){return c(this,t),r=this,a=[e],i=o(i=t),function(e,t){if(t&&("object"==u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,n()?Reflect.construct(i,a||[],o(r).constructor):i.apply(r,a));var r,i,a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&i(e,t)}(t,e),f(t)}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:y),t=this.getParams(),r=this.getProps();return t&&t.forEach((function(t,n){if(void 0!==(null==r?void 0:r[t]))throw new Error("Hooks can not have a property and param named '".concat(t,"'. Use .defaults instead."));Object.defineProperty(e.prototype,t,{enumerable:!0,get:function(){return null==this?void 0:this.arguments[n]},set:function(e){this.arguments[n]=e}})})),r&&(0,p.copyProperties)(e.prototype,r),e}},{key:"initializeContext",value:function(e,t,r){var n=this._parent?this._parent.initializeContext(e,t,r):r,o=this.getDefaults(e,t,n);if(e&&(n.self=e),n.arguments=t,o)for(var i=0,u=Object.keys(o);i<u.length;i++){var a=u[i];void 0===n[a]&&(n[a]=o[a])}return n}}])}();function h(e){return e&&e[t.HOOKS]||null}function d(e,r){var n=h(e);return e[t.HOOKS]=r.parent(n),e}function b(e){var t=h(e);return t?t.getMiddleware():null}t.HookManager=v,t.convertOptions=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?Array.isArray(e)?(new v).middleware(e):e:new v},t.getManager=h,t.setManager=d,t.getMiddleware=b,t.setMiddleware=function(e,t){return d(e,(new v).middleware(t))}},54:function(e,t){function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0}),t.compose=void 0,t.compose=function(e){if(!Array.isArray(e))throw new TypeError("Middleware stack must be an array!");var t,n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.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)?r(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,u=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw u}}}}(e);try{for(n.s();!(t=n.n()).done;)if("function"!=typeof t.value)throw new TypeError("Middleware must be composed of functions!")}catch(e){n.e(e)}finally{n.f()}return function(t,r){var n=-1;return function o(i){if(i<=n)return Promise.reject(new Error("next() called multiple times"));n=i;var u=e[i];if(i===e.length&&(u=r),!u)return Promise.resolve();try{return Promise.resolve(u.call(this,t,o.bind(this,i+1)))}catch(e){return Promise.reject(e)}}.call(this,0)}}},110:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.legacyDecorator=t.hookDecorator=t.objectHooks=t.functionHooks=t.getOriginal=void 0;var n=r(54),o=r(745),i=r(539);function u(e){return"function"==typeof e.original?u(e.original):e}function a(e,t){if("function"!=typeof e)throw new Error("Can not apply hooks to non-function");var r=(0,o.convertOptions)(t),a=function(){for(var e=this,t=a.Context,o=a.original,i=arguments.length,u=new Array(i),c=0;c<i;c++)u[c]=arguments[c];var s=u[u.length-1]instanceof t,f=s?u.pop():new t,l=r.initializeContext(this,u,f),p=[function(e,t){return t().then((function(){return s?e:e.result}))}],y=r.collectMiddleware(this,u);return y&&Array.prototype.push.apply(p,y),p.push((function(t,r){return Object.prototype.hasOwnProperty.call(l,"result")?r():Promise.resolve(o.apply(e,t.arguments)).then((function(e){return t.result=e,r()}))})),(0,n.compose)(p).call(this,l)};return(0,i.copyFnProperties)(a,e),(0,i.copyProperties)(a,e),(0,o.setManager)(a,r),Object.assign(a,{original:u(e),Context:r.getContextClass(),createContext:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new a.Context(e)}})}t.getOriginal=u,t.functionHooks=a,t.objectHooks=function(e,t){if(Array.isArray(t))return(0,o.setMiddleware)(e,t);for(var r=0,n=Object.keys(t);r<n.length;r++){var i=n[r],u="function"==typeof e[i]?e:e.prototype,c=u&&u[i];if("function"!=typeof c)throw new Error("Can not apply hooks. '".concat(i,"' is not a function"));var s=(0,o.convertOptions)(t[i]);u[i]=a(c,s.props({method:i}))}return e},t.hookDecorator=function(e){return function(t,r){var n=(0,o.convertOptions)(e);if("class"===r.kind)return(0,o.setManager)(t.prototype,n),t;if("method"===r.kind){var i=String(r.name);return a(t,n.props({method:i}))}throw new Error("Can not apply hooks.")}},t.legacyDecorator=function(e){return function(t,r,n){var i=(0,o.convertOptions)(e);if(!n)return(0,o.setManager)(t.prototype,i),t;var u=n.value;if("function"!=typeof u)throw new Error("Can not apply hooks. '".concat(r,"' is not a function"));return n.value=a(u,i.props({method:r})),n}}},226:function(e,t,r){function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||o(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.hooks=t.middleware=void 0;var u=r(745),a=r(110);i(r(110),t),i(r(54),t),i(r(745),t),i(r(302),t),t.middleware=function(e,t){var r,o=(new u.HookManager).middleware(e);return t&&(t.params&&o.params.apply(o,function(e){if(Array.isArray(e))return n(e)}(r=t.params)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(r)||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.")}()),t.defaults&&o.defaults(t.defaults),t.props&&o.props(t.props)),o},t.hooks=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t[0],o=t[1];return"function"==typeof n&&(o instanceof u.HookManager||Array.isArray(o)||1===t.length)?(0,a.functionHooks)(n,o):2===t.length?(0,a.objectHooks)(n,o):(0,a.hookDecorator)(n)}},302:function(e,t,r){function n(e){return n="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},n(e)}function o(e){return function(e){if(Array.isArray(e))return i(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 i(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(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 i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e,t,r){return(t=function(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0}),t.collect=t.fromErrorHook=t.fromAfterHook=t.fromBeforeHook=t.runHooks=t.runHook=void 0;var c=r(54);function s(e){return function(r,n){return(0,t.runHook)(e,r,"before").then(n)}}function f(e){return function(r,n){return n().then((function(){return(0,t.runHook)(e,r,"after")}))}}function l(e){return function(r,n){return n().catch((function(n){return r.error===n&&void 0===r.result||(r.original=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},r),r.error=n,delete r.result),(0,t.runHook)(e,r,"error").then((function(){if(void 0===r.result&&void 0!==r.error)throw r.error})).catch((function(e){throw r.error=e,r.error}))}))}}t.runHook=function(e,t,r){var n=t.type;return r&&(t.type=r),Promise.resolve(e.call(t.self,t)).then((function(e){r&&(t.type=n),e&&e!==t&&Object.assign(t,e)}))},t.runHooks=function(e){return function(r){return e.reduce((function(e,n){return e.then((function(){return(0,t.runHook)(n,r)}))}),Promise.resolve(r))}},t.fromBeforeHook=s,t.fromAfterHook=f,t.fromErrorHook=l,t.collect=function(e){var r=e.before,n=void 0===r?[]:r,i=e.after,u=void 0===i?[]:i,a=e.error,p=void 0===a?[]:a,y=n.map(s),v=o(u).reverse().map(f),h=p.length?[l((0,t.runHooks)(p))]:[];return(0,c.compose)([].concat(h,o(y),o(v)))}},539:function(e,t){function r(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,u=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw u}}}}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0}),t.copyFnProperties=t.copyProperties=void 0,t.copyProperties=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];for(var i=0,u=n;i<u.length;i++){var a,c=u[i],s=r(Object.keys(c).concat(Object.getOwnPropertySymbols(c)));try{for(s.s();!(a=s.n()).done;){var f=a.value,l=Object.getOwnPropertyDescriptor(c,f);l&&!Object.prototype.hasOwnProperty.call(e,f)&&Object.defineProperty(e,f,l)}}catch(e){s.e(e)}finally{s.f()}}return e},t.copyFnProperties=function(e,t){try{for(var r=0,n=["name","length"];r<n.length;r++){var o=n[r],i=t[o];Object.defineProperty(e,o,{value:i})}}catch(e){}return e}}},t={};return function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}(748)}()}));
|
|
2
|
+
!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 function(){"use strict";var e={46:function(e){var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(r,n){function o(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),r([].slice.call(arguments))}h(e,t,i,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&h(e,"error",t,{once:!0})}(e,o)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var u=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function s(e,t,r,n){var o,i,u,s;if(a(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),u=i[t]),void 0===u)u=i[t]=r,++e._eventsCount;else if("function"==typeof u?u=i[t]=n?[r,u]:[u,r]:n?u.unshift(r):u.push(r),(o=c(e))>0&&u.length>o&&!u.warned){u.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+u.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=e,f.type=t,f.count=u.length,s=f,console&&console.warn&&console.warn(s)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=f.bind(n);return o.listener=r,n.wrapFn=o,o}function p(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(o):v(o,o.length)}function y(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function v(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function h(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){n.once&&e.removeEventListener(t,o),r(i)}))}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");u=e}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return c(this)},i.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var o="error"===e,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){var u;if(t.length>0&&(u=t[0]),u instanceof Error)throw u;var a=new Error("Unhandled error."+(u?" ("+u.message+")":""));throw a.context=u,a}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var s=c.length,f=v(c,s);for(r=0;r<s;++r)n(f[r],this,t)}return!0},i.prototype.addListener=function(e,t){return s(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return s(this,e,t,!0)},i.prototype.once=function(e,t){return a(t),this.on(e,l(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,l(this,e,t)),this},i.prototype.removeListener=function(e,t){var r,n,o,i,u;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){u=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,o),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,u||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var o,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},i.prototype.listeners=function(e){return p(this,e,!0)},i.prototype.rawListeners=function(e){return p(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):y.call(e,t)},i.prototype.listenerCount=y,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},54:function(e,t){function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0}),t.compose=void 0,t.compose=function(e){if(!Array.isArray(e))throw new TypeError("Middleware stack must be an array!");var t,n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.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)?r(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,u=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw u}}}}(e);try{for(n.s();!(t=n.n()).done;)if("function"!=typeof t.value)throw new TypeError("Middleware must be composed of functions!")}catch(e){n.e(e)}finally{n.f()}return function(t,r){var n=-1;return function o(i){if(i<=n)return Promise.reject(new Error("next() called multiple times"));n=i;var u=e[i];if(i===e.length&&(u=r),!u)return Promise.resolve();try{return Promise.resolve(u.call(this,t,o.bind(this,i+1)))}catch(e){return Promise.reject(e)}}.call(this,0)}}},110:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.legacyDecorator=t.hookDecorator=t.objectHooks=t.functionHooks=t.getOriginal=void 0;var n=r(54),o=r(745),i=r(539);function u(e){return"function"==typeof e.original?u(e.original):e}function a(e,t){if("function"!=typeof e)throw new Error("Can not apply hooks to non-function");var r=(0,o.convertOptions)(t),a=function(){for(var e=this,t=a.Context,o=a.original,i=arguments.length,u=new Array(i),c=0;c<i;c++)u[c]=arguments[c];var s=u[u.length-1]instanceof t,f=s?u.pop():new t,l=r.initializeContext(this,u,f),p=[function(e,t){return t().then((function(){return s?e:e.result}))}],y=r.collectMiddleware(this,u);return y&&Array.prototype.push.apply(p,y),p.push((function(t,r){return Object.prototype.hasOwnProperty.call(l,"result")?r():Promise.resolve(o.apply(e,t.arguments)).then((function(e){return t.result=e,r()}))})),(0,n.compose)(p).call(this,l)};return(0,i.copyFnProperties)(a,e),(0,i.copyProperties)(a,e),(0,o.setManager)(a,r),Object.assign(a,{original:u(e),Context:r.getContextClass(),createContext:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new a.Context(e)}})}t.getOriginal=u,t.functionHooks=a,t.objectHooks=function(e,t){if(Array.isArray(t))return(0,o.setMiddleware)(e,t);for(var r=0,n=Object.keys(t);r<n.length;r++){var i=n[r],u="function"==typeof e[i]?e:e.prototype,c=u&&u[i];if("function"!=typeof c)throw new Error("Can not apply hooks. '".concat(i,"' is not a function"));var s=(0,o.convertOptions)(t[i]);u[i]=a(c,s.props({method:i}))}return e},t.hookDecorator=function(e){return function(t,r){var n=(0,o.convertOptions)(e);if("class"===r.kind)return(0,o.setManager)(t.prototype,n),t;if("method"===r.kind){var i=String(r.name);return a(t,n.props({method:i}))}throw new Error("Can not apply hooks.")}},t.legacyDecorator=function(e){return function(t,r,n){var i=(0,o.convertOptions)(e);if(!n)return(0,o.setManager)(t.prototype,i),t;var u=n.value;if("function"!=typeof u)throw new Error("Can not apply hooks. '".concat(r,"' is not a function"));return n.value=a(u,i.props({method:r})),n}}},205:function(e,t,r){function n(e){return n="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},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,u=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",f=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),a=new C(n||[]);return u(i,"_invoke",{value:A(e,r,a)}),i}function y(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var v="suspendedStart",h="suspendedYield",d="executing",b="completed",m={};function g(){}function w(){}function O(){}var j={};l(j,c,(function(){return this}));var _=Object.getPrototypeOf,S=_&&_(_(H([])));S&&S!==r&&i.call(S,c)&&(j=S);var P=O.prototype=g.prototype=Object.create(j);function k(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(o,u,a,c){var s=y(e[o],e,u);if("throw"!==s.type){var f=s.arg,l=f.value;return l&&"object"==n(l)&&i.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(l).then((function(e){f.value=e,a(f)}),(function(e){return r("throw",e,a,c)}))}c(s.arg)}var o;u(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function A(t,r,n){var o=v;return function(i,u){if(o===d)throw Error("Generator is already running");if(o===b){if("throw"===i)throw u;return{value:e,done:!0}}for(n.method=i,n.arg=u;;){var a=n.delegate;if(a){var c=x(a,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=y(t,r,n);if("normal"===s.type){if(o=n.done?b:h,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=b,n.method="throw",n.arg=s.arg)}}}function x(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,x(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=y(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var u=i.arg;return u?u.done?(r[t.resultName]=u.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):u:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function M(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(M,this),this.reset(!0)}function H(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,u=function r(){for(;++o<t.length;)if(i.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return u.next=u}}throw new TypeError(n(t)+" is not iterable")}return w.prototype=O,u(P,"constructor",{value:O,configurable:!0}),u(O,"constructor",{value:w,configurable:!0}),w.displayName=l(O,f,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,O):(e.__proto__=O,l(e,f,"GeneratorFunction")),e.prototype=Object.create(P),e},t.awrap=function(e){return{__await:e}},k(E.prototype),l(E.prototype,s,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var u=new E(p(e,r,n,o),i);return t.isGeneratorFunction(r)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},k(P),l(P,f,"Generator"),l(P,c,(function(){return this})),l(P,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=H,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return a.type="throw",a.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var u=this.tryEntries[o],a=u.completion;if("root"===u.tryLoc)return n("end");if(u.tryLoc<=this.prev){var c=i.call(u,"catchLoc"),s=i.call(u,"finallyLoc");if(c&&s){if(this.prev<u.catchLoc)return n(u.catchLoc,!0);if(this.prev<u.finallyLoc)return n(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return n(u.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return n(u.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var u=o?o.completion:{};return u.type=e,u.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(u)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:H(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function i(e,t,r,n,o,i,u){try{var a=e[i](u),c=a.value}catch(e){return void r(e)}a.done?t(c):Promise.resolve(c).then(n,o)}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function c(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(s=function(){return!!e})()}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}var p=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Feathers=void 0;var y=p(r(871)),v=r(46),h=r(271),d=r(226),b=r(694),m=r(751),g=r(452),w=r(751),O=(0,h.createDebug)("@feathersjs/feathers"),j=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,r){return t=f(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,s()?Reflect.construct(t,r||[],f(e).constructor):t.apply(e,r))}(this,t)).services={},e.settings={},e.mixins=[m.hookMixin,b.eventMixin],e.version=y.default,e._isSetup=!1,e.registerHooks=(0,w.enableHooks)(e),e.registerHooks({around:[b.eventHook]}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(t,e),r=t,c=[{key:"get",value:function(e){return this.settings[e]}},{key:"set",value:function(e,t){return this.settings[e]=t,this}},{key:"configure",value:function(e){return e.call(this,this),this}},{key:"defaultService",value:function(e){throw new Error("Can not find service '".concat(e,"'"))}},{key:"service",value:function(e){var t=(0,h.stripSlashes)(e)||"/",r=this.services.hasOwnProperty(t)?this.services[t]:void 0;return void 0===r?(this.use(t,this.defaultService(t)),this.service(t)):r}},{key:"_setup",value:function(){var e=this;return this._isSetup=!0,Object.keys(this.services).reduce((function(t,r){return t.then((function(){var t=e.service(r);if("function"==typeof t.setup)return O("Setting up service for `".concat(r,"`")),t.setup(e,r)}))}),Promise.resolve()).then((function(){return e}))}},{key:"setup",get:function(){return this._setup},set:function(e){this._setup=e[d.HOOKS]?e:(0,d.hooks)(e,(0,d.middleware)().params("server").props({app:this}))}},{key:"_teardown",value:function(){var e=this;return this._isSetup=!1,Object.keys(this.services).reduce((function(t,r){return t.then((function(){var t=e.service(r);if("function"==typeof t.teardown)return O("Tearing down service for `".concat(r,"`")),t.teardown(e,r)}))}),Promise.resolve()).then((function(){return e}))}},{key:"teardown",get:function(){return this._teardown},set:function(e){this._teardown=e[d.HOOKS]?e:(0,d.hooks)(e,(0,d.middleware)().params("server").props({app:this}))}},{key:"use",value:function(e,t,r){var n=this;if("string"!=typeof e)throw new Error("'".concat(e,"' is not a valid service path."));var o=(0,h.stripSlashes)(e)||"/",i=t;if("function"==typeof i.service&&i.services)return Object.keys(i.services).forEach((function(e){return n.use("".concat(o,"/").concat(e),i.service(e))})),this;var a,c=(0,g.wrapService)(o,t,r),s=(0,g.getServiceOptions)(c),f=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}(g.protectedMethods);try{for(f.s();!(a=f.n()).done;){var l=a.value;if(s.methods.includes(l))throw new Error("'".concat(l,"' on service '").concat(o,"' is not allowed as a custom method name"))}}catch(e){f.e(e)}finally{f.f()}return O("Registering new service at `".concat(o,"`")),this.mixins.forEach((function(e){return e.call(n,c,o,s)})),this.services[o]=c,this._isSetup&&"function"==typeof c.setup&&(O("Setting up service for `".concat(o,"`")),c.setup(this,o)),this}},{key:"unuse",value:(p=o().mark((function e(t){var r,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(0,h.stripSlashes)(t)||"/",!(n=this.services[r])||"function"!=typeof n.teardown){e.next=5;break}return e.next=5,n.teardown(this,r);case 5:return delete this.services[r],e.abrupt("return",n);case 7:case"end":return e.stop()}}),e,this)})),v=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=p.apply(e,t);function u(e){i(o,r,n,u,a,"next",e)}function a(e){i(o,r,n,u,a,"throw",e)}u(void 0)}))},function(e){return v.apply(this,arguments)})},{key:"hooks",value:function(e){var t=e;return t.before||t.after||t.error||t.around?this.registerHooks(t):t.setup||t.teardown?(0,d.hooks)(this,t):this.registerHooks({around:t}),this}}],c&&a(r.prototype,c),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,c,p,v}(v.EventEmitter);t.Feathers=j},226:function(e,t,r){function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||o(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.hooks=t.middleware=void 0;var u=r(745),a=r(110);i(r(110),t),i(r(54),t),i(r(745),t),i(r(302),t),t.middleware=function(e,t){var r,o=(new u.HookManager).middleware(e);return t&&(t.params&&o.params.apply(o,function(e){if(Array.isArray(e))return n(e)}(r=t.params)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(r)||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.")}()),t.defaults&&o.defaults(t.defaults),t.props&&o.props(t.props)),o},t.hooks=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t[0],o=t[1];return"function"==typeof n&&(o instanceof u.HookManager||Array.isArray(o)||1===t.length)?(0,a.functionHooks)(n,o):2===t.length?(0,a.objectHooks)(n,o):(0,a.hookDecorator)(n)}},271:function(e,t,r){function n(e,t,r){return(t=function(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e){return o="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},o(e)}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,u,a=[],c=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(s)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var a=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),c=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||a(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t._=void 0,t.stripSlashes=function(e){return e.replace(/^(\/+)|(\/+)$/g,"")},t.isPromise=function(e){return t._.isObject(e)&&"function"==typeof e.then},t.createSymbol=function(e){return"undefined"!=typeof Symbol?Symbol.for(e):e},t._={each:function(e,r){e&&"function"==typeof e.forEach?e.forEach(r):t._.isObject(e)&&Object.keys(e).forEach((function(t){return r(e[t],t)}))},some:function(e,t){return Object.keys(e).map((function(t){return[e[t],t]})).some((function(e){var r=i(e,2),n=r[0],o=r[1];return t(n,o)}))},every:function(e,t){return Object.keys(e).map((function(t){return[e[t],t]})).every((function(e){var r=i(e,2),n=r[0],o=r[1];return t(n,o)}))},keys:function(e){return Object.keys(e)},values:function(e){return t._.keys(e).map((function(t){return e[t]}))},isMatch:function(e,r){return t._.keys(r).every((function(t){return e[t]===r[t]}))},isEmpty:function(e){return 0===t._.keys(e).length},isObject:function(e){return"object"===o(e)&&!Array.isArray(e)&&null!==e},isObjectOrArray:function(e){return"object"===o(e)&&null!==e},extend:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return Object.assign.apply(Object,[e].concat(r))},omit:function(e){for(var r=t._.extend({},e),n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return o.forEach((function(e){return delete r[e]})),r},pick:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return r.reduce((function(t,r){return void 0!==e[r]&&(t[r]=e[r]),t}),{})},merge:function(e,r){return t._.isObject(e)&&t._.isObject(r)&&Object.keys(r).forEach((function(o){t._.isObject(r[o])?(e[o]||Object.assign(e,n({},o,{})),t._.merge(e[o],r[o])):Object.assign(e,n({},o,r[o]))})),e}},c(r(792),t)},295:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Feathers=t.version=void 0,t.feathers=s;var u=r(271),a=i(r(871));t.version=a.default;var c=r(205);function s(){return new c.Feathers}Object.defineProperty(t,"Feathers",{enumerable:!0,get:function(){return c.Feathers}}),s.setDebug=u.setDebug,o(r(751),t),o(r(986),t),o(r(452),t),e.exports=Object.assign(s,e.exports)},302:function(e,t,r){function n(e){return n="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},n(e)}function o(e){return function(e){if(Array.isArray(e))return i(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 i(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(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 i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e,t,r){return(t=function(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0}),t.collect=t.fromErrorHook=t.fromAfterHook=t.fromBeforeHook=t.runHooks=t.runHook=void 0;var c=r(54);function s(e){return function(r,n){return(0,t.runHook)(e,r,"before").then(n)}}function f(e){return function(r,n){return n().then((function(){return(0,t.runHook)(e,r,"after")}))}}function l(e){return function(r,n){return n().catch((function(n){return r.error===n&&void 0===r.result||(r.original=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},r),r.error=n,delete r.result),(0,t.runHook)(e,r,"error").then((function(){if(void 0===r.result&&void 0!==r.error)throw r.error})).catch((function(e){throw r.error=e,r.error}))}))}}t.runHook=function(e,t,r){var n=t.type;return r&&(t.type=r),Promise.resolve(e.call(t.self,t)).then((function(e){r&&(t.type=n),e&&e!==t&&Object.assign(t,e)}))},t.runHooks=function(e){return function(r){return e.reduce((function(e,n){return e.then((function(){return(0,t.runHook)(n,r)}))}),Promise.resolve(r))}},t.fromBeforeHook=s,t.fromAfterHook=f,t.fromErrorHook=l,t.collect=function(e){var r=e.before,n=void 0===r?[]:r,i=e.after,u=void 0===i?[]:i,a=e.error,p=void 0===a?[]:a,y=n.map(s),v=o(u).reverse().map(f),h=p.length?[l((0,t.runHooks)(p))]:[];return(0,c.compose)([].concat(h,o(y),o(v)))}},452:function(e,t,r){function n(e){return n="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},n(e)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return(t=function(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeServiceOptions=t.protectedMethods=t.defaultServiceEvents=t.defaultEventMap=t.defaultServiceMethods=t.defaultServiceArguments=t.SERVICE=void 0,t.getHookMethods=function(e,r){var n=r.methods;return t.defaultServiceMethods.filter((function(t){return"function"==typeof e[t]&&!n.includes(t)})).concat(n)},t.getServiceOptions=function(e){return e[t.SERVICE]},t.wrapService=function(e,r,n){if(r[t.SERVICE])return r;var i,u=Object.create(r),a=(0,t.normalizeServiceOptions)(r,n);if(0===Object.keys(a.methods).length&&![].concat((i=t.defaultServiceMethods,function(e){if(Array.isArray(e))return o(e)}(i)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(i)||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.")}()),["setup","teardown"]).some((function(e){return"function"==typeof r[e]})))throw new Error("Invalid service object passed for path `".concat(e,"`"));return Object.defineProperty(u,t.SERVICE,{value:a}),u};var c=r(46),s=r(271);t.SERVICE=(0,s.createSymbol)("@feathersjs/service"),t.defaultServiceArguments={find:["params"],get:["id","params"],create:["data","params"],update:["id","data","params"],patch:["id","data","params"],remove:["id","params"]},t.defaultServiceMethods=["find","get","create","update","patch","remove"],t.defaultEventMap={create:"created",update:"updated",patch:"patched",remove:"removed"},t.defaultServiceEvents=Object.values(t.defaultEventMap),t.protectedMethods=Object.keys(Object.prototype).concat(Object.keys(c.EventEmitter.prototype)).concat(["all","around","before","after","error","hooks","setup","teardown","publish"]),t.normalizeServiceOptions=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.methods,o=void 0===n?t.defaultServiceMethods.filter((function(t){return"function"==typeof e[t]})):n,i=r.events,a=void 0===i?e.events||[]:i,c=r.serviceEvents||t.defaultServiceEvents.concat(a);return u(u({},r),{},{events:a,methods:o,serviceEvents:c})}},539:function(e,t){function r(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,u=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw u}}}}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0}),t.copyFnProperties=t.copyProperties=void 0,t.copyProperties=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];for(var i=0,u=n;i<u.length;i++){var a,c=u[i],s=r(Object.keys(c).concat(Object.getOwnPropertySymbols(c)));try{for(s.s();!(a=s.n()).done;){var f=a.value,l=Object.getOwnPropertyDescriptor(c,f);l&&!Object.prototype.hasOwnProperty.call(e,f)&&Object.defineProperty(e,f,l)}}catch(e){s.e(e)}finally{s.f()}}return e},t.copyFnProperties=function(e,t){try{for(var r=0,n=["name","length"];r<n.length;r++){var o=n[r],i=t[o];Object.defineProperty(e,o,{value:i})}}catch(e){}return e}},694:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.eventHook=function(e,t){var r=(0,o.getServiceOptions)(e.self).events,n=o.defaultEventMap[e.method]||null;return e.event=n,t().then((function(){"string"!=typeof e.event||r.includes(e.event)||(Array.isArray(e.result)?e.result:[e.result]).forEach((function(t){return e.self.emit(e.event,t,e)}))}))},t.eventMixin=function(e){return"function"==typeof e.on&&"function"==typeof e.emit||Object.assign(e,n.EventEmitter.prototype),e};var n=r(46),o=r(452)},745:function(e,t,r){function n(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(n=function(){return!!e})()}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}function u(e){return u="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},u(e)}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function f(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e){var t=function(e){if("object"!=u(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==u(t)?t:t+""}Object.defineProperty(t,"__esModule",{value:!0}),t.setMiddleware=t.getMiddleware=t.setManager=t.getManager=t.convertOptions=t.HookManager=t.BaseHookContext=t.HOOKS=void 0;var p=r(539);t.HOOKS=Symbol.for("@feathersjs/hooks");var y=function(){return f((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};c(this,e),Object.defineProperty(this,"self",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.assign(this,t)}),[{key:"toJSON",value:function(){for(var e=this,t=Object.keys(this),r=Object.getPrototypeOf(this);r;)t.push.apply(t,function(e){if(Array.isArray(e))return a(e)}(n=Object.keys(r))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(n)||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.")}()),r=Object.getPrototypeOf(r);var n;return t.reduce((function(t,r){return t[r]=e[r],t}),{})}}])}();t.BaseHookContext=y;var v=function(){return f((function e(){c(this,e),Object.defineProperty(this,"_parent",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"_params",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"_middleware",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"_props",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"_defaults",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}),[{key:"parent",value:function(e){return this._parent=e,this}},{key:"middleware",value:function(e){return this._middleware=null!=e&&e.length?e:null,this}},{key:"getMiddleware",value:function(){var e,t=null===(e=this._parent)||void 0===e?void 0:e.getMiddleware();return t&&this._middleware?t.concat(this._middleware):t||this._middleware}},{key:"collectMiddleware",value:function(e,t){var r=b(e),n=this.getMiddleware();return r&&n?r.concat(n):r||n||[]}},{key:"props",value:function(e){return this._props||(this._props={}),(0,p.copyProperties)(this._props,e),this}},{key:"getProps",value:function(){var e,t=null===(e=this._parent)||void 0===e?void 0:e.getProps();return t&&this._props?(0,p.copyProperties)({},t,this._props):t||this._props||null}},{key:"params",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this._params=t,this}},{key:"getParams",value:function(){var e,t=null===(e=this._parent)||void 0===e?void 0:e.getParams();return t&&this._params?t.concat(this._params):t||this._params}},{key:"defaults",value:function(e){return this._defaults=e,this}},{key:"getDefaults",value:function(e,t,r){var n,o="function"==typeof this._defaults?this._defaults(e,t,r):null,i=null===(n=this._parent)||void 0===n?void 0:n.getDefaults(e,t,r);return i&&o?Object.assign({},i,o):i||o}},{key:"getContextClass",value:function(){var e=function(e){function t(e){return c(this,t),r=this,a=[e],i=o(i=t),function(e,t){if(t&&("object"==u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,n()?Reflect.construct(i,a||[],o(r).constructor):i.apply(r,a));var r,i,a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&i(e,t)}(t,e),f(t)}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:y),t=this.getParams(),r=this.getProps();return t&&t.forEach((function(t,n){if(void 0!==(null==r?void 0:r[t]))throw new Error("Hooks can not have a property and param named '".concat(t,"'. Use .defaults instead."));Object.defineProperty(e.prototype,t,{enumerable:!0,get:function(){return null==this?void 0:this.arguments[n]},set:function(e){this.arguments[n]=e}})})),r&&(0,p.copyProperties)(e.prototype,r),e}},{key:"initializeContext",value:function(e,t,r){var n=this._parent?this._parent.initializeContext(e,t,r):r,o=this.getDefaults(e,t,n);if(e&&(n.self=e),n.arguments=t,o)for(var i=0,u=Object.keys(o);i<u.length;i++){var a=u[i];void 0===n[a]&&(n[a]=o[a])}return n}}])}();function h(e){return e&&e[t.HOOKS]||null}function d(e,r){var n=h(e);return e[t.HOOKS]=r.parent(n),e}function b(e){var t=h(e);return t?t.getMiddleware():null}t.HookManager=v,t.convertOptions=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?Array.isArray(e)?(new v).middleware(e):e:new v},t.getManager=h,t.setManager=d,t.getMiddleware=b,t.setMiddleware=function(e,t){return d(e,(new v).middleware(t))}},748:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(295),t)},751:function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}function o(e){var t=function(e){if("object"!=p(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==p(t)?t:t+""}function i(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(i=function(){return!!e})()}function u(e,t,r,n){var o=a(c(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof o?function(e){return o.apply(r,e)}:o}function a(){return a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=c(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},a.apply(null,arguments)}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function f(e){return function(e){if(Array.isArray(e))return l(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 l(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(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 l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function p(e){return p="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},p(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.FeathersHookManager=void 0,t.convertHookData=b,t.collectHooks=m,t.enableHooks=g,t.createContext=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=e[t].createContext;if("function"!=typeof n)throw new Error("Can not create context for method ".concat(t));return n(r)},t.hookMixin=function(e,t,r){var n=this;if("function"==typeof e.hooks)return e;var o=(0,v.getHookMethods)(e,r).reduce((function(r,o){var i,u=v.defaultServiceArguments[o]||["data","params"];return r[o]=(i=new w(n,o)).params.apply(i,f(u)).props({app:n,path:t,method:o,service:e,event:null,type:"around",get statusCode(){var e;return null===(e=this.http)||void 0===e?void 0:e.status},set statusCode(e){this.http=this.http||{},this.http.status=e}}),r}),{}),i=g(e);return(0,y.hooks)(e,o),e.hooks=function(e){var t=this;return e.before||e.after||e.error||e.around?i.call(this,e):Array.isArray(e)?(0,y.hooks)(this,e):(Object.keys(e).forEach((function(r){var n=(0,y.getManager)(t[r]);if(!(n instanceof w))throw new Error("Method ".concat(r," is not a Feathers hooks enabled service method"));n.middleware(e[r])})),this)},e};var y=r(226),v=r(452),h=["before","after","error","around"],d=function(e){return h.includes(e)};function b(e){var t={};if(Array.isArray(e))t.all=e;else if("object"!==p(e))t.all=[e];else for(var r=0,n=Object.keys(e);r<n.length;r++){var o=n[r],i=e[o];t[o]=Array.isArray(i)?i:[i]}return t}function m(e,t){var r=e.__hooks,n=r.collected,o=r.collectedAll,i=r.around;return[].concat(f(i.all||[]),f(i[t]||[]),f(o.before||[]),f(n[t]||[]),f(o.after||[]))}function g(e){return Object.defineProperty(e,"__hooks",{configurable:!0,value:{around:{},before:{},after:{},error:{},collected:{},collectedAll:{}},writable:!0}),function(e){var t=this.__hooks,r=Object.keys(e).reduce((function(t,r){if(!d(r))throw new Error("'".concat(r,"' is not a valid hook type"));return t[r]=b(e[r]),t}),{});return Object.keys(r).forEach((function(e){return Object.keys(r[e]).forEach((function(n){var o,i=r[e][n],u=(o=t[e])[n]||(o[n]=[]);if(u.push.apply(u,f(i)),"all"===n){if(t.before[n]||t.error[n]){var a=(0,y.collect)({before:t.before[n]||[],error:t.error[n]||[]});t.collectedAll.before=[a]}if(t.after[n]){var c=(0,y.collect)({after:t.after[n]||[]});t.collectedAll.after=[c]}}else if(t.before[n]||t.after[n]||t.error[n]){var s=(0,y.collect)({before:t.before[n]||[],after:t.after[n]||[],error:t.error[n]||[]});t.collected[n]=[s]}}))})),this}}var w=function(e){function t(e,r){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,r){return t=c(t),function(e,t){if(t&&("object"==p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,i()?Reflect.construct(t,r||[],c(e).constructor):t.apply(e,r))}(this,t)).app=e,n.method=r,n._middleware=[],n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(t,e),r=t,(o=[{key:"collectMiddleware",value:function(e,r){var n=m(this.app,this.method),o=u(t,"collectMiddleware",this,3)([e,r]),i=m(e,this.method);return[].concat(f(n),f(o),f(i))}},{key:"initializeContext",value:function(e,r,n){var o=u(t,"initializeContext",this,3)([e,r,n]);return o.params=o.params||{},o}},{key:"middleware",value:function(e){var t;return(t=this._middleware).push.apply(t,f(e)),this}}])&&n(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(y.HookManager);t.FeathersHookManager=w},792:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.noopDebug=n,t.setDebug=function(e){o=e,Object.keys(r).forEach((function(t){r[t]=e(t)}))},t.createDebug=function(e){return r[e]||(r[e]=o(e)),function(){return r[e].apply(r,arguments)}};var r={};function n(){return function(){}}var o=n},871:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default="development"},986:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})}},t={};return function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}(748)}()}));
|