@forbespro/lead-agent
Version:
Lead Chat Agent React Component
2 lines (1 loc) • 899 B
JavaScript
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function d(){const f=[],u={run:c,use:p};return u;function c(...n){let h=-1;const t=n.pop();if(typeof t!="function")throw new TypeError("Expected function as last argument, not "+t);o(null,...n);function o(e,...i){const r=f[++h];let l=-1;if(e){t(e);return}for(;++l<n.length;)(i[l]===null||i[l]===void 0)&&(i[l]=n[l]);n=i,r?s(r,o)(...i):t(null,...i)}}function p(n){if(typeof n!="function")throw new TypeError("Expected `middelware` to be a function, not "+n);return f.push(n),u}}function s(f,u){let c;return p;function p(...t){const o=f.length>t.length;let e;o&&t.push(n);try{e=f.apply(this,t)}catch(i){const r=i;if(o&&c)throw r;return n(r)}o||(e&&e.then&&typeof e.then=="function"?e.then(h,n):e instanceof Error?n(e):h(e))}function n(t,...o){c||(c=!0,u(t,...o))}function h(t){n(null,t)}}exports.trough=d;exports.wrap=s;