| Server IP : 185.208.173.17 / Your IP : 87.236.161.98 Web Server : Microsoft-IIS/10.0 System : Windows NT SRV8576125506 10.0 build 26100 (Windows Server 2016) AMD64 User : IUSR ( 0) PHP Version : 7.4.13 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/inetpub/wwwroot/parsmega.nuxt/node_modules/hookable/dist/ |
Upload File : |
!function(o,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(o="undefined"!=typeof globalThis?globalThis:o||self).Hookable=e()}(this,(function(){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(e)}function e(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")}function t(o,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(o,n.key,n)}}function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;for(var i in e){var u=e[i],c=r?"".concat(r,":").concat(i):i;"object"===o(u)&&null!==u?n(u,t,c):"function"==typeof u&&(t[c]=u)}return t}function r(){for(var o={},e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(var u=0,c=t;u<c.length;u++){var a=c[u];for(var f in a=n(a))o[f]?o[f].push(a[f]):o[f]=[a[f]]}for(var s in o)o[s].length>1?function(){var e=o[s];o[s]=function(){for(var o=arguments.length,t=new Array(o),n=0;n<o;n++)t[n]=arguments[n];return i(e,(function(o){return o.apply(void 0,t)}))}}():o[s]=o[s][0];return o}function i(o,e){return o.reduce((function(o,t){return o.then((function(){return e(t)}))}),Promise.resolve(null))}function u(){}function c(o,e){if(!e)return o&&o.then?o.then(u):Promise.resolve()}function a(o,e){var t=o();return t&&t.then?t.then(e):e(t)}function f(o,e){try{var t=o()}catch(o){return e(o)}return t&&t.then?t.then(void 0,e):t}function s(o){if(o&&o.then)return o.then(u)}var l=function(){function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:console;e(this,o),this._logger=t,this._hooks={},this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this)}var r,u,l;return r=o,(u=[{key:"hook",value:function(o,e){var t=this;if(!o||"function"!=typeof e)return function(){};for(var n,r=o;this._deprecatedHooks[o];)"string"==typeof(n=this._deprecatedHooks[o])&&(n={to:n}),o=n.to;return n&&this._logger&&(n.message?this._logger.warn(n.message):this._logger.warn("".concat(r," hook has been deprecated")+(n.to?", please use ".concat(n.to):""))),this._hooks[o]=this._hooks[o]||[],this._hooks[o].push(e),function(){e&&(t.removeHook(o,e),e=null)}}},{key:"hookOnce",value:function(o,e){var t,n=function(){return t(),t=null,n=null,e.apply(void 0,arguments)};return t=this.hook(o,n)}},{key:"removeHook",value:function(o,e){if(this._hooks[o]){var t=this._hooks[o].indexOf(e);-1!==t&&this._hooks[o].splice(t,1),0===this._hooks[o].length&&delete this._hooks[o]}}},{key:"deprecateHook",value:function(o,e){this._deprecatedHooks[o]=e}},{key:"deprecateHooks",value:function(o){Object.assign(this._deprecatedHooks,o)}},{key:"addHooks",value:function(o){var e=this,t=n(o),r=Object.keys(t).map((function(o){return e.hook(o,t[o])}));return function(){r.splice(0,r.length).forEach((function(o){return o()}))}}},{key:"removeHooks",value:function(o){var e=n(o);for(var t in e)this.removeHook(t,e[t])}},{key:"callHook",value:function(o){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];try{var r=this;if(!r._hooks[o])return;return s(f((function(){return c(i(r._hooks[o],(function(o){return o.apply(void 0,t)})))}),(function(e){return a((function(){if("error"!==o)return c(r.callHook("error",e))}),(function(){r._logger&&(r._logger.fatal?r._logger.fatal(e):r._logger.error(e))}))})))}catch(o){return Promise.reject(o)}}}])&&t(r.prototype,u),l&&t(r,l),o}();return l.mergeHooks=r,l.prototype.mergeHooks=r,l}));
//# sourceMappingURL=hookable.umd.js.map