<commit_before>/*!
 * Mappersmith 2.0.0-rc1
 * https://github.com/tulios/mappersmith
 */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.mappersmith=t():e.mappersmith=t()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=10)}([function(module,exports,__webpack_require__){"use strict";function toQueryString(e){return isPlainObject(e)?validKeys(e).map(function(t){return buildRecursive(t,e[t])}).join("&").replace(R20,"+"):e}function performanceNow(){return hasProcessHrtime()?(getNanoSeconds()-loadTime)/1e6:performance.now()}function parseResponseHeaders(e){var t={};if(!e)return t;for(var r=e.split("\r\n"),n=0;n<r.length;n++){var o=r[n],s=o.indexOf(": ");if(s>0){var i=o.substring(0,s).toLowerCase(),a=o.substring(s+2).trim();t[i]=a}}return t}function lowerCaseObjectKeys(e){return Object.keys(e).reduce(function(t,r){return t[r.toLowerCase()]=e[r],t},{})}function isPlainObject(e){return"[object Object]"===toString.call(e)&&Object.getPrototypeOf(e)===Object.getPrototypeOf({})}var _typeof2="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};Object.defineProperty(exports,"__esModule",{value:!0});var _typeof="function"==typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)?function(e){return"undefined"==typeof e?"undefined":_typeof2(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":"undefined"==typeof e?"undefined":_typeof2(e)};exports.toQueryString=toQueryString,exports.performanceNow=performanceNow,exports.parseResponseHeaders=parseResponseHeaders,exports.lowerCaseObjectKeys=lowerCaseObjectKeys,exports.isPlainObject=isPlainObject,"undefined"!=typeof window&&null!==window&&(window.performance||(window.performance={}),performance.now=function(){return performance.now||performance.mozNow||performance.msNow||performance.oNow||performance.webkitNow||function(){return(new Date).getTime()}}());var _process=void 0,getNanoSeconds=void 0,loadTime=void 0;try{_process=eval("process")}catch(e){}var hasProcessHrtime=function(){return"undefined"!=typeof _process&&null!==_process&&_process.hrtime};hasProcessHrtime()&&(getNanoSeconds=function(){var e=_process.hrtime();return 1e9*e[0]+e[1]},loadTime=getNanoSeconds());var R20=/%20/g,validKeys=function(e){return Object.keys(e).filter(function(t){return void 0!==e[t]&&null!==e[t]})},buildRecursive=function e(t,r,n){n=n||"";var o=Array.isArray(r),s="object"===("undefined"==typeof r?"undefined":_typeof(r));return o||s?o?r.map(function(r){return e(t,r,n+"[]")}).join("&"):validKeys(r).map(function(o){return e(t,r[o],n+"["+o+"]")}).join("&"):encodeURIComponent(t+n)+"="+encodeURIComponent(r)},hasOwnProperty=Object.prototype.hasOwnProperty,assign=exports.assign=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},toString=Object.prototype.toString},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){return new i.default(e,a.gateway).build()}Object.defineProperty(t,"__esModule",{value:!0}),t.configs=void 0,t.default=o;var s=r(6),i=n(s),a=t.configs={Promise:"function"==typeof Promise?Promise:null,gateway:null,gatewayConfigs:{emulateHTTP:!1,XHR:{withCredentials:!1,configure:null}}}},function(e,t,r){"use strict";function n(e){this.host=e.host,this.path=e.path,this.method=e.method||"get",this.headers=e.headers,this.params=e.params,this.bodyAttr=e.bodyAttr||"body",this.headersAttr=e.headersAttr||"headers"}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},function(e,t,r){"use strict";function n(e,t,r,n){this.originalRequest=e,this.responseStatus=t,this.responseData=r,this.responseHeaders=n||{},this.timeElapsed=null}Object.defineProperty(t,"__esModule",{value:!0});var o=r(0);n.prototype={request:function(){return this.originalRequest},status:function(){return 1223===this.responseStatus?204:this.responseStatus},success:function(){var e=this.status();return e>=200&&e<400},headers:function(){return(0,o.lowerCaseObjectKeys)(this.responseHeaders)},rawData:function(){return this.responseData},data:function e(){var e=this.responseData;if(this.isContentTypeJSON())try{e=JSON.parse(this.responseData)}catch(e){}return e},isContentTypeJSON:function(){return/application\/json/.test(this.headers()["content-type"])},enhance:function(e){return new n(this.request(),e.status||this.status(),e.rawData||this.rawData(),(0,o.assign)({},this.headers(),e.headers))}},t.default=n},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){i.default.apply(this,arguments)}Object.defineProperty(t,"__esModule",{value:!0});var s=r(7),i=n(s),a=r(3),u=n(a),c=r(0);o.prototype=i.default.extends({get:function(){var e=new XMLHttpRequest;this.configureCallbacks(e),e.open("get",this.request.url(),!0),this.setHeaders(e,{}),e.send()},post:function(){this.performRequest("post")},put:function(){this.performRequest("put")},patch:function(){this.performRequest("patch")},delete:function(){this.performRequest("delete")},configureCallbacks:function(e){var t=this;e.addEventListener("load",function(){t.dispatchResponse(t.createResponse(e))}),e.addEventListener("error",function(){t.dispatchClientError("Network error")});var r=this.options().XHR;r.withCredentials&&(e.withCredentials=!0),r.configure&&r.configure(e)},performRequest:function(e){var t=this.shouldEmulateHTTP()?"post":e,r=new XMLHttpRequest;this.configureCallbacks(r),r.open(t,this.request.url(),!0);var n={},o=this.prepareBody(e,n);this.setHeaders(r,n);var s=[];o&&s.push(o),r.send.apply(r,s)},createResponse:function(e){var t=e.status,r=e.responseText,n=(0,c.parseResponseHeaders)(e.getAllResponseHeaders());return new u.default(this.request,t,r,n)},setHeaders:function(e,t){var r=(0,c.assign)(t,this.request.headers());Object.keys(r).forEach(function(t){e.setRequestHeader(t,r[t])})}}),t.default=o},function(e,t){},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){if(!e)throw new Error("[Mappersmith] invalid manifest ("+e+")");if(!t)throw new Error("[Mappersmith] gateway class not configured (configs.gateway)");this.manifest=new a.default(e),this.GatewayClass=t}Object.defineProperty(t,"__esModule",{value:!0});var i=r(8),a=n(i),u=r(2),c=(n(u),r(9)),f=n(c),p=r(0);s.prototype={build:function(){var e=this,t={_manifest:this.manifest};return this.manifest.eachResource(function(r,n){t[r]=e.buildResource(n)}),t},buildResource:function(e){var t=this;return e.reduce(function(e,r){return(0,p.assign)(e,o({},r.name,function(e){var n=new f.default(r.descriptor,e);return t.invokeMiddlewares(n)}))},{})},invokeMiddlewares:function(e){var t=this,r=this.manifest.createMiddlewares(),n=r.reduce(function(e,t){return t.request(e)},e),o=function(){return new t.GatewayClass(n).call()},s=r.reduce(function(e,t){return function(){return t.response(e)}},o);return s()}},t.default=s},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){this.request=e,this.successCallback=function(){},this.failCallback=function(){}}Object.defineProperty(t,"__esModule",{value:!0});var s=r(0),i=r(1),a=r(3),u=n(a);o.extends=function(e){return(0,s.assign)({},o.prototype,e)},o.prototype={options:function(){return i.configs.gatewayConfigs},shouldEmulateHTTP:function(){return this.options().emulateHTTP&&/^(delete|put|patch)/i.test(this.request.method())},call:function(){var e=this,t=arguments,r=(0,s.performanceNow)();return new i.configs.Promise(function(n,o){e.successCallback=function(e){e.timeElapsed=(0,s.performanceNow)()-r,n(e)},e.failCallback=function(e){e.timeElapsed=(0,s.performanceNow)()-r,o(e)};try{e[e.request.method()].apply(e,t)}catch(t){e.dispatchClientError(t.message)}})},dispatchResponse:function(e){e.success()?this.successCallback(e):this.failCallback(e)},dispatchClientError:function(e){this.failCallback(new u.default(this.request,400,e))},prepareBody:function(e,t){var r=this.request.body();this.shouldEmulateHTTP()&&(r=r||{},(0,s.isPlainObject)(r)&&(r._method=e),t["x-http-method-override"]=e);var n=(0,s.toQueryString)(r);return n&&("number"==typeof n.length&&(t["content-length"]=n.length),(0,s.isPlainObject)(r)&&(t["content-type"]="application/x-www-form-urlencoded;charset=utf-8")),n}},t.default=o},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){this.host=e.host,this.resources=e.resources||{},this.middlewares=e.middlewares||[]}Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),i=n(s),a=r(0);o.prototype={eachResource:function(e){var t=this;Object.keys(this.resources).forEach(function(r){var n=t.eachMethod(r,function(e){return{name:e,descriptor:t.createMethodDescriptor(r,e)}});e(r,n)})},eachMethod:function(e,t){return Object.keys(this.resources[e]).map(function(e){return t(e)})},createMethodDescriptor:function(e,t){var r=this.resources[e][t];if(!r||!r.path)throw new Error('[Mappersmith] path is undefined for resource "'+e+'" method "'+t+'"');return new i.default((0,a.assign)({host:this.host},r))},createMiddlewares:function(){var e=function(e){return(0,a.assign)({request:function(e){return e},response:function(e){return e()}},e())};return this.middlewares.map(function(t){return e(t)})}},t.default=o},function(e,t,r){"use strict";function n(e,t){this.methodDescriptor=e,this.requestParams=t||{}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),s=new RegExp("{([^}]+)}");n.prototype={params:function e(){var t=this,e=(0,o.assign)({},this.methodDescriptor.params,this.requestParams),r=function(e){return e!==t.methodDescriptor.headersAttr&&e!==t.methodDescriptor.bodyAttr};return Object.keys(e).reduce(function(t,n){return r(n)&&(t[n]=e[n]),t},{})},method:function(){return this.methodDescriptor.method.toLowerCase()},host:function(){return(this.methodDescriptor.host||"").replace(/\/$/,"")},path:function e(){var e=this.methodDescriptor.path,t=this.methodDescriptor;t.headersAttr,t.bodyAttr;"/"!==this.methodDescriptor.path[0]&&(e="/"+this.methodDescriptor.path);var r=this.params();Object.keys(r).forEach(function(t){var n=r[t],o="{"+t+"}";new RegExp(o).test(e)&&(e=e.replace("{"+t+"}",n),delete r[t])});var n=e.match(s);if(n)throw new Error("[Mappersmith] required parameter missing ("+n[1]+'), "'+e+'" cannot be resolved');var i=(0,o.toQueryString)(r);return 0!==i.length&&(e+="?"+i),e},url:function(){return""+this.host()+this.path()},headers:function(){return(0,o.lowerCaseObjectKeys)((0,o.assign)({},this.methodDescriptor.headers,this.requestParams[this.methodDescriptor.headersAttr]))},body:function(){return this.requestParams[this.methodDescriptor.bodyAttr]},enhance:function(e){var t=this.methodDescriptor.headersAttr,r=this.methodDescriptor.bodyAttr,s=(0,o.assign)({},this.requestParams,e.params);return s[t]=(0,o.assign)({},this.requestParams[t],e.headers),s[r]=e.body,new n(this.methodDescriptor,s)}},t.default=n},function(module,exports,__webpack_require__){"use strict";var lib=__webpack_require__(1),_process,defaultGateway;try{_process=eval("process")}catch(e){}"undefined"!=typeof XMLHttpRequest?defaultGateway=__webpack_require__(4).default:"undefined"!=typeof _process&&(defaultGateway=__webpack_require__(5).default),lib.configs.gateway=defaultGateway,module.exports=lib}])});
//# sourceMappingURL=mappersmith.map<commit_msg>update precompiled bundle<commit_after>/*!
 * Mappersmith 2.0.0-rc2
 * https://github.com/tulios/mappersmith
 */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.mappersmith=t():e.mappersmith=t()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var s=r[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,t),s.l=!0,s.exports}var r={};return t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=10)}([function(module,exports,__webpack_require__){"use strict";function toQueryString(e){return isPlainObject(e)?validKeys(e).map(function(t){return buildRecursive(t,e[t])}).join("&").replace(R20,"+"):e}function performanceNow(){return hasProcessHrtime()?(getNanoSeconds()-loadTime)/1e6:performance.now()}function parseResponseHeaders(e){var t={};if(!e)return t;for(var r=e.split("\r\n"),n=0;n<r.length;n++){var s=r[n],o=s.indexOf(": ");if(o>0){var i=s.substring(0,o).toLowerCase(),a=s.substring(o+2).trim();t[i]=a}}return t}function lowerCaseObjectKeys(e){return Object.keys(e).reduce(function(t,r){return t[r.toLowerCase()]=e[r],t},{})}function isPlainObject(e){return"[object Object]"===toString.call(e)&&Object.getPrototypeOf(e)===Object.getPrototypeOf({})}var _typeof2="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};Object.defineProperty(exports,"__esModule",{value:!0});var _typeof="function"==typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)?function(e){return"undefined"==typeof e?"undefined":_typeof2(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":"undefined"==typeof e?"undefined":_typeof2(e)};exports.toQueryString=toQueryString,exports.performanceNow=performanceNow,exports.parseResponseHeaders=parseResponseHeaders,exports.lowerCaseObjectKeys=lowerCaseObjectKeys,exports.isPlainObject=isPlainObject,"undefined"!=typeof window&&null!==window&&(window.performance||(window.performance={}),performance.now=function(){return performance.now||performance.mozNow||performance.msNow||performance.oNow||performance.webkitNow||function(){return(new Date).getTime()}}());var _process=void 0,getNanoSeconds=void 0,loadTime=void 0;try{_process=eval("process")}catch(e){}var hasProcessHrtime=function(){return"undefined"!=typeof _process&&null!==_process&&_process.hrtime};hasProcessHrtime()&&(getNanoSeconds=function(){var e=_process.hrtime();return 1e9*e[0]+e[1]},loadTime=getNanoSeconds());var R20=/%20/g,validKeys=function(e){return Object.keys(e).filter(function(t){return void 0!==e[t]&&null!==e[t]})},buildRecursive=function e(t,r,n){n=n||"";var s=Array.isArray(r),o="object"===("undefined"==typeof r?"undefined":_typeof(r));return s||o?s?r.map(function(r){return e(t,r,n+"[]")}).join("&"):validKeys(r).map(function(s){return e(t,r[s],n+"["+s+"]")}).join("&"):encodeURIComponent(t+n)+"="+encodeURIComponent(r)},hasOwnProperty=Object.prototype.hasOwnProperty,assign=exports.assign=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},toString=Object.prototype.toString},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function s(e){return new i.default(e,a.gateway).build()}Object.defineProperty(t,"__esModule",{value:!0}),t.configs=void 0,t.default=s;var o=r(6),i=n(o),a=t.configs={Promise:"function"==typeof Promise?Promise:null,gateway:null,gatewayConfigs:{emulateHTTP:!1,XHR:{withCredentials:!1,configure:null}}}},function(e,t,r){"use strict";function n(e){this.host=e.host,this.path=e.path,this.method=e.method||"get",this.headers=e.headers,this.params=e.params,this.bodyAttr=e.bodyAttr||"body",this.headersAttr=e.headersAttr||"headers"}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},function(e,t,r){"use strict";function n(e,t,r,n){this.originalRequest=e,this.responseStatus=t,this.responseData=r,this.responseHeaders=n||{},this.timeElapsed=null}Object.defineProperty(t,"__esModule",{value:!0});var s=r(0);n.prototype={request:function(){return this.originalRequest},status:function(){return 1223===this.responseStatus?204:this.responseStatus},success:function(){var e=this.status();return e>=200&&e<400},headers:function(){return(0,s.lowerCaseObjectKeys)(this.responseHeaders)},rawData:function(){return this.responseData},data:function e(){var e=this.responseData;if(this.isContentTypeJSON())try{e=JSON.parse(this.responseData)}catch(e){}return e},isContentTypeJSON:function(){return/application\/json/.test(this.headers()["content-type"])},enhance:function(e){return new n(this.request(),e.status||this.status(),e.rawData||this.rawData(),(0,s.assign)({},this.headers(),e.headers))}},t.default=n},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function s(e){i.default.apply(this,arguments)}Object.defineProperty(t,"__esModule",{value:!0});var o=r(7),i=n(o),a=r(3),u=n(a),c=r(0);s.prototype=i.default.extends({get:function(){var e=new XMLHttpRequest;this.configureCallbacks(e),e.open("get",this.request.url(),!0),this.setHeaders(e,{}),e.send()},post:function(){this.performRequest("post")},put:function(){this.performRequest("put")},patch:function(){this.performRequest("patch")},delete:function(){this.performRequest("delete")},configureCallbacks:function(e){var t=this;e.addEventListener("load",function(){t.dispatchResponse(t.createResponse(e))}),e.addEventListener("error",function(){t.dispatchClientError("Network error")});var r=this.options().XHR;r.withCredentials&&(e.withCredentials=!0),r.configure&&r.configure(e)},performRequest:function(e){var t=this.shouldEmulateHTTP()?"post":e,r=new XMLHttpRequest;this.configureCallbacks(r),r.open(t,this.request.url(),!0);var n={},s=this.prepareBody(e,n);this.setHeaders(r,n);var o=[];s&&o.push(s),r.send.apply(r,o)},createResponse:function(e){var t=e.status,r=e.responseText,n=(0,c.parseResponseHeaders)(e.getAllResponseHeaders());return new u.default(this.request,t,r,n)},setHeaders:function(e,t){var r=(0,c.assign)(t,this.request.headers());Object.keys(r).forEach(function(t){e.setRequestHeader(t,r[t])})}}),t.default=s},function(e,t){},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){if(!e)throw new Error("[Mappersmith] invalid manifest ("+e+")");if(!t)throw new Error("[Mappersmith] gateway class not configured (configs.gateway)");this.manifest=new a.default(e),this.GatewayClass=t}Object.defineProperty(t,"__esModule",{value:!0});var i=r(8),a=n(i),u=r(2),c=(n(u),r(9)),f=n(c),p=r(0);o.prototype={build:function(){var e=this,t={_manifest:this.manifest};return this.manifest.eachResource(function(r,n){t[r]=e.buildResource(n)}),t},buildResource:function(e){var t=this;return e.reduce(function(e,r){return(0,p.assign)(e,s({},r.name,function(e){var n=new f.default(r.descriptor,e);return t.invokeMiddlewares(n)}))},{})},invokeMiddlewares:function(e){var t=this,r=this.manifest.createMiddlewares(),n=r.reduce(function(e,t){return t.request(e)},e),s=function(){return new t.GatewayClass(n).call()},o=r.reduce(function(e,t){return function(){return t.response(e)}},s);return o()}},t.default=o},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function s(e){this.request=e,this.successCallback=function(){},this.failCallback=function(){}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),i=r(1),a=r(3),u=n(a);s.extends=function(e){return(0,o.assign)({},s.prototype,e)},s.prototype={options:function(){return i.configs.gatewayConfigs},shouldEmulateHTTP:function(){return this.options().emulateHTTP&&/^(delete|put|patch)/i.test(this.request.method())},call:function(){var e=this,t=arguments,r=(0,o.performanceNow)();return new i.configs.Promise(function(n,s){e.successCallback=function(e){e.timeElapsed=(0,o.performanceNow)()-r,n(e)},e.failCallback=function(e){e.timeElapsed=(0,o.performanceNow)()-r,s(e)};try{e[e.request.method()].apply(e,t)}catch(t){e.dispatchClientError(t.message)}})},dispatchResponse:function(e){e.success()?this.successCallback(e):this.failCallback(e)},dispatchClientError:function(e){this.failCallback(new u.default(this.request,400,e))},prepareBody:function(e,t){var r=this.request.body();this.shouldEmulateHTTP()&&(r=r||{},(0,o.isPlainObject)(r)&&(r._method=e),t["x-http-method-override"]=e);var n=(0,o.toQueryString)(r);return n&&(0,o.isPlainObject)(r)&&(t["content-type"]="application/x-www-form-urlencoded;charset=utf-8"),n}},t.default=s},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function s(e){this.host=e.host,this.resources=e.resources||{},this.middlewares=e.middlewares||[]}Object.defineProperty(t,"__esModule",{value:!0});var o=r(2),i=n(o),a=r(0);s.prototype={eachResource:function(e){var t=this;Object.keys(this.resources).forEach(function(r){var n=t.eachMethod(r,function(e){return{name:e,descriptor:t.createMethodDescriptor(r,e)}});e(r,n)})},eachMethod:function(e,t){return Object.keys(this.resources[e]).map(function(e){return t(e)})},createMethodDescriptor:function(e,t){var r=this.resources[e][t];if(!r||!r.path)throw new Error('[Mappersmith] path is undefined for resource "'+e+'" method "'+t+'"');return new i.default((0,a.assign)({host:this.host},r))},createMiddlewares:function(){var e=function(e){return(0,a.assign)({request:function(e){return e},response:function(e){return e()}},e())};return this.middlewares.map(function(t){return e(t)})}},t.default=s},function(e,t,r){"use strict";function n(e,t){this.methodDescriptor=e,this.requestParams=t||{}}Object.defineProperty(t,"__esModule",{value:!0});var s=r(0),o=new RegExp("{([^}]+)}");n.prototype={params:function e(){var t=this,e=(0,s.assign)({},this.methodDescriptor.params,this.requestParams),r=function(e){return e!==t.methodDescriptor.headersAttr&&e!==t.methodDescriptor.bodyAttr};return Object.keys(e).reduce(function(t,n){return r(n)&&(t[n]=e[n]),t},{})},method:function(){return this.methodDescriptor.method.toLowerCase()},host:function(){return(this.methodDescriptor.host||"").replace(/\/$/,"")},path:function e(){var e=this.methodDescriptor.path,t=this.methodDescriptor;t.headersAttr,t.bodyAttr;"/"!==this.methodDescriptor.path[0]&&(e="/"+this.methodDescriptor.path);var r=this.params();Object.keys(r).forEach(function(t){var n=r[t],s="{"+t+"}";new RegExp(s).test(e)&&(e=e.replace("{"+t+"}",n),delete r[t])});var n=e.match(o);if(n)throw new Error("[Mappersmith] required parameter missing ("+n[1]+'), "'+e+'" cannot be resolved');var i=(0,s.toQueryString)(r);return 0!==i.length&&(e+="?"+i),e},url:function(){return""+this.host()+this.path()},headers:function(){return(0,s.lowerCaseObjectKeys)((0,s.assign)({},this.methodDescriptor.headers,this.requestParams[this.methodDescriptor.headersAttr]))},body:function(){return this.requestParams[this.methodDescriptor.bodyAttr]},enhance:function(e){var t=this.methodDescriptor.headersAttr,r=this.methodDescriptor.bodyAttr,o=(0,s.assign)({},this.requestParams,e.params);return o[t]=(0,s.assign)({},this.requestParams[t],e.headers),o[r]=e.body,new n(this.methodDescriptor,o)}},t.default=n},function(module,exports,__webpack_require__){"use strict";var lib=__webpack_require__(1),_process,defaultGateway;try{_process=eval("process")}catch(e){}"undefined"!=typeof XMLHttpRequest?defaultGateway=__webpack_require__(4).default:"undefined"!=typeof _process&&(defaultGateway=__webpack_require__(5).default),lib.configs.gateway=defaultGateway,module.exports=lib}])});
//# sourceMappingURL=mappersmith.map
{'fraction_non_alphanumeric': 0.23941623945758228, 'fraction_numerical': 0.009178104845377873, 'mean_word_length': 17.882903981264636, 'pattern_counts': {'":': 14, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6468448', 'n_tokens_mistral': 8735, 'n_tokens_neox': 8682, 'n_words': 482}