text: !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["vuex-orm-axios"]=e():t["vuex-orm-axios"]=e()}(global,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=210)}([function(t,e,n){"use strict";var r=n(56),o=n(181),i=Object.prototype.toString;function s(t){return"[object Array]"===i.call(t)}function a(t){return null!==t&&"object"==typeof t}function u(t){return"[object Function]"===i.call(t)}function c(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),s(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}t.exports={isArray:s,isArrayBuffer:function(t){return"[object ArrayBuffer]"===i.call(t)},isBuffer:o,isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:a,isUndefined:function(t){return void 0===t},isDate:function(t){return"[object Date]"===i.call(t)},isFile:function(t){return"[object File]"===i.call(t)},isBlob:function(t){return"[object Blob]"===i.call(t)},isFunction:u,isStream:function(t){return a(t)&&u(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:c,merge:function t(){var e={};function n(n,r){"object"==typeof e[r]&&"object"==typeof n?e[r]=t(e[r],n):e[r]=n}for(var r=0,o=arguments.length;r<o;r++)c(arguments[r],n);return e},extend:function(t,e,n){return c(e,function(e,o){t[o]=n&&"function"==typeof e?r(e,n):e}),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){var r=n(37),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r=n(147),o=n(162)(function(t,e,n){r(t,e,n)});t.exports=o},function(t,e,n){var r=n(83),o=n(88);t.exports=function(t,e){var n=o(t,e);return r(n)?n:void 0}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){var r=n(23),o=n(30);t.exports=function(t){return null!=t&&o(t.length)&&!r(t)}},function(t,e,n){var r=n(12),o=n(84),i=n(85),s="[object Null]",a="[object Undefined]",u=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?a:s:u&&u in Object(t)?o(t):i(t)}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(73),o=n(74),i=n(75),s=n(76),a=n(77);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=s,u.prototype.set=a,t.exports=u},function(t,e,n){var r=n(9);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},function(t,e,n){var r=n(2).Symbol;t.exports=r},function(t,e,n){var r=n(5)(Object,"create");t.exports=r},function(t,e,n){var r=n(97);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},function(t,e,n){var r=n(42),o=n(123),i=n(7);t.exports=function(t){return i(t)?r(t):o(t)}},function(t,e,n){var r=n(8),o=n(6),i="[object Symbol]";t.exports=function(t){return"symbol"==typeof t||o(t)&&r(t)==i}},function(t,e,n){var r=n(16),o=1/0;t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-o?"-0":e}},function(t,e){t.exports=function(t){return t}},function(t,e,n){var r=n(36),o=n(20),i=n(143),s=n(1);t.exports=function(t,e){return(s(t)?r:i)(t,o(e,3))}},function(t,e,n){var r=n(71),o=n(131),i=n(18),s=n(1),a=n(140);t.exports=function(t){return"function"==typeof t?t:null==t?i:"object"==typeof t?s(t)?o(t[0],t[1]):r(t):a(t)}},function(t,e,n){var r=n(10),o=n(78),i=n(79),s=n(80),a=n(81),u=n(82);function c(t){var e=this.__data__=new r(t);this.size=e.size}c.prototype.clear=o,c.prototype.delete=i,c.prototype.get=s,c.prototype.has=a,c.prototype.set=u,t.exports=c},function(t,e,n){var r=n(5)(n(2),"Map");t.exports=r},function(t,e,n){var r=n(8),o=n(3),i="[object AsyncFunction]",s="[object Function]",a="[object GeneratorFunction]",u="[object Proxy]";t.exports=function(t){if(!o(t))return!1;var e=r(t);return e==s||e==a||e==i||e==u}},function(t,e,n){var r=n(89),o=n(96),i=n(98),s=n(99),a=n(100);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=s,u.prototype.set=a,t.exports=u},function(t,e,n){var r=n(118),o=n(6),i=Object.prototype,s=i.hasOwnProperty,a=i.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(t){return o(t)&&s.call(t,"callee")&&!a.call(t,"callee")};t.exports=u},function(t,e,n){(function(t){var r=n(2),o=n(119),i=e&&!e.nodeType&&e,s=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=s&&s.exports===i?r.Buffer:void 0,u=(a?a.isBuffer:void 0)||o;t.exports=u}).call(this,n(27)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var o=typeof t;return!!(e=null==e?n:e)&&("number"==o||"symbol"!=o&&r.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e,n){var r=n(120),o=n(121),i=n(122),s=i&&i.isTypedArray,a=s?o(s):r;t.exports=a},function(t,e){var n=9007199254740991;t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=n}},function(t,e){var n=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},function(t,e,n){var r=n(1),o=n(16),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!o(t))||s.test(t)||!i.test(t)||null!=e&&t in Object(e)}},function(t,e,n){var r=n(52);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},function(t,e,n){"use strict";var r=n(0),o=n(183),i={"Content-Type":"application/x-www-form-urlencoded"};function s(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var a,u={adapter:("undefined"!=typeof XMLHttpRequest?a=n(184):"undefined"!=typeof process&&(a=n(189)),a),transformRequest:[function(t,e){return o(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(s(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)?(s(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],function(t){u.headers[t]={}}),r.forEach(["post","put","patch"],function(t){u.headers[t]=r.merge(i)}),t.exports=u},function(t,e,n){"use strict";var r=n(58);t.exports=function(t,e,n,o,i){var s=new Error(t);return r(s,e,n,o,i)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}},function(t,e){var n="object"==typeof global&&global&&global.Object===Object&&global;t.exports=n},function(t,e){var n=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e,n){var r=n(101),o=n(6);t.exports=function t(e,n,i,s,a){return e===n||(null==e||null==n||!o(e)&&!o(n)?e!=e&&n!=n:r(e,n,i,s,t,a))}},function(t,e,n){var r=n(102),o=n(105),i=n(106),s=1,a=2;t.exports=function(t,e,n,u,c,f){var p=n&s,l=t.length,h=e.length;if(l!=h&&!(p&&h>l))return!1;var d=f.get(t);if(d&&f.get(e))return d==e;var y=-1,v=!0,m=n&a?new r:void 0;for(f.set(t,e),f.set(e,t);++y<l;){var g=t[y],b=e[y];if(u)var w=p?u(b,g,y,e,t,f):u(g,b,y,t,e,f);if(void 0!==w){if(w)continue;v=!1;break}if(m){if(!o(e,function(t,e){if(!i(m,e)&&(g===t||c(g,t,n,u,f)))return m.push(e)})){v=!1;break}}else if(g!==b&&!c(g,b,n,u,f)){v=!1;break}}return f.delete(t),f.delete(e),v}},function(t,e,n){var r=n(2).Uint8Array;t.exports=r},function(t,e,n){var r=n(117),o=n(25),i=n(1),s=n(26),a=n(28),u=n(29),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=i(t),f=!n&&o(t),p=!n&&!f&&s(t),l=!n&&!f&&!p&&u(t),h=n||f||p||l,d=h?r(t.length,String):[],y=d.length;for(var v in t)!e&&!c.call(t,v)||h&&("length"==v||p&&("offset"==v||"parent"==v)||l&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||a(v,y))||d.push(v);return d}},function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},function(t,e,n){var r=n(3);t.exports=function(t){return t==t&&!r(t)}},function(t,e){t.exports=function(t,e){return function(n){return null!=n&&n[t]===e&&(void 0!==e||t in Object(n))}}},function(t,e,n){var r=n(47),o=n(17);t.exports=function(t,e){for(var n=0,i=(e=r(e,t)).length;null!=t&&n<i;)t=t[o(e[n++])];return n&&n==i?t:void 0}},function(t,e,n){var r=n(1),o=n(32),i=n(133),s=n(136);t.exports=function(t,e){return r(t)?t:o(t,e)?[t]:i(s(t))}},function(t,e,n){var r=n(47),o=n(25),i=n(1),s=n(28),a=n(30),u=n(17);t.exports=function(t,e,n){for(var c=-1,f=(e=r(e,t)).length,p=!1;++c<f;){var l=u(e[c]);if(!(p=null!=t&&n(t,l)))break;t=t[l]}return p||++c!=f?p:!!(f=null==t?0:t.length)&&a(f)&&s(l,f)&&(i(t)||o(t))}},function(t,e,n){var r=n(144),o=n(146)(r);t.exports=o},function(t,e,n){var r=n(145)();t.exports=r},function(t,e,n){var r=n(33),o=n(9);t.exports=function(t,e,n){(void 0===n||o(t[e],n))&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(5),o=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},function(t,e,n){var r=n(43)(Object.getPrototypeOf,Object);t.exports=r},function(t,e){t.exports=function(t,e){if("__proto__"!=e)return t[e]}},function(t,e,n){var r=n(42),o=n(160),i=n(7);t.exports=function(t){return i(t)?r(t,!0):o(t)}},function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},function(t,e,n){"use strict";var r=n(35);t.exports=function(t,e,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},function(t,e,n){"use strict";t.exports=function(t,e,n,r,o){return t.config=e,n&&(t.code=n),t.request=r,t.response=o,t}},function(t,e,n){"use strict";var r=n(0);function o(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var i;if(n)i=n(e);else if(r.isURLSearchParams(e))i=e.toString();else{var s=[];r.forEach(e,function(t,e){null!=t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),s.push(o(e)+"="+o(t))}))}),i=s.join("&")}return i&&(t+=(-1===t.indexOf("?")?"?":"&")+i),t}},function(t,e){t.exports=require("http")},function(t,e){t.exports=require("https")},function(t,e,n){var r=n(63),o=r.URL,i=n(60),s=n(61),a=n(190),u=n(191).Writable,c=n(192)("follow-redirects"),f={GET:!0,HEAD:!0,OPTIONS:!0,TRACE:!0},p=Object.create(null);function l(t,e){u.call(this),t.headers=t.headers||{},this._options=t,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t.host&&(t.hostname||(t.hostname=t.host),delete t.host),e&&this.on("response",e);var n=this;if(this._onNativeResponse=function(t){n._processResponse(t)},!t.pathname&&t.path){var r=t.path.indexOf("?");r<0?t.pathname=t.path:(t.pathname=t.path.substring(0,r),t.search=t.path.substring(r))}this._performRequest()}function h(t,e){clearTimeout(t._timeout),t._timeout=setTimeout(function(){t.emit("timeout")},e)}function d(){clearTimeout(this._timeout)}function y(t){var e={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(t).forEach(function(i){var s=i+":",u=n[s]=t[i],f=e[i]=Object.create(u);f.request=function(t,i,u){if("string"==typeof t){var f=t;try{t=m(new o(f))}catch(e){t=r.parse(f)}}else o&&t instanceof o?t=m(t):(u=i,i=t,t={protocol:s});return"function"==typeof i&&(u=i,i=null),(i=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},t,i)).nativeProtocols=n,a.equal(i.protocol,s,"protocol mismatch"),c("options",i),new l(i,u)},f.get=function(t,e,n){var r=f.request(t,e,n);return r.end(),r}}),e}function v(){}function m(t){var e={protocol:t.protocol,hostname:t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,hash:t.hash,search:t.search,pathname:t.pathname,path:t.pathname+t.search,href:t.href};return""!==t.port&&(e.port=Number(t.port)),e}["abort","aborted","error","socket","timeout"].forEach(function(t){p[t]=function(e){this._redirectable.emit(t,e)}}),l.prototype=Object.create(u.prototype),l.prototype.write=function(t,e,n){if(this._ending)throw new Error("write after end");if(!("string"==typeof t||"object"==typeof t&&"length"in t))throw new Error("data should be a string, Buffer or Uint8Array");"function"==typeof e&&(n=e,e=null),0!==t.length?this._requestBodyLength+t.length<=this._options.maxBodyLength?(this._requestBodyLength+=t.length,this._requestBodyBuffers.push({data:t,encoding:e}),this._currentRequest.write(t,e,n)):(this.emit("error",new Error("Request body larger than maxBodyLength limit")),this.abort()):n&&n()},l.prototype.end=function(t,e,n){if("function"==typeof t?(n=t,t=e=null):"function"==typeof e&&(n=e,e=null),t){var r=this,o=this._currentRequest;this.write(t,e,function(){r._ended=!0,o.end(null,null,n)}),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,n)},l.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e)},l.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t)},l.prototype.setTimeout=function(t,e){if(e&&this.once("timeout",e),this.socket)h(this,t);else{var n=this;this._currentRequest.once("socket",function(){h(n,t)})}return this.once("response",d),this.once("error",d),this},["abort","flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(t){l.prototype[t]=function(e,n){return this._currentRequest[t](e,n)}}),["aborted","connection","socket"].forEach(function(t){Object.defineProperty(l.prototype,t,{get:function(){return this._currentRequest[t]}})}),l.prototype._performRequest=function(){var t=this._options.protocol,e=this._options.nativeProtocols[t];if(e){if(this._options.agents){var n=t.substr(0,t.length-1);this._options.agent=this._options.agents[n]}var o=this._currentRequest=e.request(this._options,this._onNativeResponse);for(var i in this._currentUrl=r.format(this._options),o._redirectable=this,p)i&&o.on(i,p[i]);if(this._isRedirect){var s=0,a=this,u=this._requestBodyBuffers;!function t(e){if(o===a._currentRequest)if(e)a.emit("error",e);else if(s<u.length){var n=u[s++];o.finished||o.write(n.data,n.encoding,t)}else a._ended&&o.end()}()}}else this.emit("error",new Error("Unsupported protocol "+t))},l.prototype._processResponse=function(t){this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:t.headers,statusCode:t.statusCode});var e=t.headers.location;if(e&&!1!==this._options.followRedirects&&t.statusCode>=300&&t.statusCode<400){if(this._currentRequest.removeAllListeners(),this._currentRequest.on("error",v),this._currentRequest.abort(),++this._redirectCount>this._options.maxRedirects)return void this.emit("error",new Error("Max redirects exceeded."));var n,o=this._options.headers;if(307!==t.statusCode&&!(this._options.method in f))for(n in this._options.method="GET",this._requestBodyBuffers=[],o)/^content-/i.test(n)&&delete o[n];if(!this._isRedirect)for(n in o)/^host$/i.test(n)&&delete o[n];var i=r.resolve(this._currentUrl,e);c("redirecting to",i),Object.assign(this._options,r.parse(i)),this._isRedirect=!0,this._performRequest(),t.destroy()}else t.responseUrl=this._currentUrl,t.redirects=this._redirects,this.emit("response",t),this._requestBodyBuffers=[]},t.exports=y({http:i,https:s}),t.exports.wrap=y},function(t,e){t.exports=require("url")},function(t,e,n){"use strict";t.exports=function(t){function e(t){for(var e=0,n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n),e|=0;return r.colors[Math.abs(e)%r.colors.length]}function r(t){var n;function s(){if(s.enabled){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];var i=s,a=Number(new Date),u=a-(n||a);i.diff=u,i.prev=n,i.curr=a,n=a,e[0]=r.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");var c=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,function(t,n){if("%%"===t)return t;c++;var o=r.formatters[n];if("function"==typeof o){var s=e[c];t=o.call(i,s),e.splice(c,1),c--}return t}),r.formatArgs.call(i,e),(i.log||r.log).apply(i,e)}}return s.namespace=t,s.enabled=r.enabled(t),s.useColors=r.useColors(),s.color=e(t),s.destroy=o,s.extend=i,"function"==typeof r.init&&r.init(s),r.instances.push(s),s}function o(){var t=r.instances.indexOf(this);return-1!==t&&(r.instances.splice(t,1),!0)}function i(t,e){return r(this.namespace+(void 0===e?":":e)+t)}return r.debug=r,r.default=r,r.coerce=function(t){return t instanceof Error?t.stack||t.message:t},r.disable=function(){r.enable("")},r.enable=function(t){var e;r.save(t),r.names=[],r.skips=[];var n=("string"==typeof t?t:"").split(/[\s,]+/),o=n.length;for(e=0;e<o;e++)n[e]&&("-"===(t=n[e].replace(/\*/g,".*?"))[0]?r.skips.push(new RegExp("^"+t.substr(1)+"$")):r.names.push(new RegExp("^"+t+"$")));for(e=0;e<r.instances.length;e++){var i=r.instances[e];i.enabled=r.enabled(i.namespace)}},r.enabled=function(t){if("*"===t[t.length-1])return!0;var e,n;for(e=0,n=r.skips.length;e<n;e++)if(r.skips[e].test(t))return!1;for(e=0,n=r.names.length;e<n;e++)if(r.names[e].test(t))return!0;return!1},r.humanize=n(194),Object.keys(t).forEach(function(e){r[e]=t[e]}),r.instances=[],r.names=[],r.skips=[],r.formatters={},r.selectColor=e,r.enable(r.load()),r}},function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,n){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},function(t,e,n){var r=n(171)(n(172));t.exports=r},function(t,e,n){var r=n(177),o=n(49),i=n(178),s=n(1);t.exports=function(t,e){return(s(t)?r:o)(t,i(e))}},function(t,e,n){var r=n(179),o=n(48);t.exports=function(t,e){return null!=t&&o(t,e,r)}},function(t,e,n){t.exports=n(180)},function(t,e,n){var r=n(72),o=n(130),i=n(45);t.exports=function(t){var e=o(t);return 1==e.length&&e[0][2]?i(e[0][0],e[0][1]):function(n){return n===t||r(n,t,e)}}},function(t,e,n){var r=n(21),o=n(39),i=1,s=2;t.exports=function(t,e,n,a){var u=n.length,c=u,f=!a;if(null==t)return!c;for(t=Object(t);u--;){var p=n[u];if(f&&p[2]?p[1]!==t[p[0]]:!(p[0]in t))return!1}for(;++u<c;){var l=(p=n[u])[0],h=t[l],d=p[1];if(f&&p[2]){if(void 0===h&&!(l in t))return!1}else{var y=new r;if(a)var v=a(h,d,l,t,e,y);if(!(void 0===v?o(d,h,i|s,a,y):v))return!1}}return!0}},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,n){var r=n(11),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0||(n==e.length-1?e.pop():o.call(e,n,1),--this.size,0))}},function(t,e,n){var r=n(11);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},function(t,e,n){var r=n(11);t.exports=function(t){return r(this.__data__,t)>-1}},function(t,e,n){var r=n(11);t.exports=function(t,e){var n=this.__data__,o=r(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}},function(t,e,n){var r=n(10);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var r=n(10),o=n(22),i=n(24),s=200;t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<s-1)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(t,e),this.size=n.size,this}},function(t,e,n){var r=n(23),o=n(86),i=n(3),s=n(38),a=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,f=u.toString,p=c.hasOwnProperty,l=RegExp("^"+f.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||o(t))&&(r(t)?l:a).test(s(t))}},function(t,e,n){var r=n(12),o=Object.prototype,i=o.hasOwnProperty,s=o.toString,a=r?r.toStringTag:void 0;t.exports=function(t){var e=i.call(t,a),n=t[a];try{t[a]=void 0;var r=!0}catch(t){}var o=s.call(t);return r&&(e?t[a]=n:delete t[a]),o}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){var r,o=n(87),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!i&&i in t}},function(t,e,n){var r=n(2)["__core-js_shared__"];t.exports=r},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,n){var r=n(90),o=n(10),i=n(22);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(t,e,n){var r=n(91),o=n(92),i=n(93),s=n(94),a=n(95);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=s,u.prototype.set=a,t.exports=u},function(t,e,n){var r=n(13);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,n){var r=n(13),o="__lodash_hash_undefined__",i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return n===o?void 0:n}return i.call(e,t)?e[t]:void 0}},function(t,e,n){var r=n(13),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:o.call(e,t)}},function(t,e,n){var r=n(13),o="__lodash_hash_undefined__";t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?o:e,this}},function(t,e,n){var r=n(14);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,n){var r=n(14);t.exports=function(t){return r(this,t).get(t)}},function(t,e,n){var r=n(14);t.exports=function(t){return r(this,t).has(t)}},function(t,e,n){var r=n(14);t.exports=function(t,e){var n=r(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this}},function(t,e,n){var r=n(21),o=n(40),i=n(107),s=n(110),a=n(125),u=n(1),c=n(26),f=n(29),p=1,l="[object Arguments]",h="[object Array]",d="[object Object]",y=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,v,m,g){var b=u(t),w=u(e),x=b?h:a(t),O=w?h:a(e),_=(x=x==l?d:x)==d,C=(O=O==l?d:O)==d,j=x==O;if(j&&c(t)){if(!c(e))return!1;b=!0,_=!1}if(j&&!_)return g||(g=new r),b||f(t)?o(t,e,n,v,m,g):i(t,e,x,n,v,m,g);if(!(n&p)){var k=_&&y.call(t,"__wrapped__"),E=C&&y.call(e,"__wrapped__");if(k||E){var R=k?t.value():t,F=E?e.value():e;return g||(g=new r),m(R,F,n,v,g)}}return!!j&&(g||(g=new r),s(t,e,n,v,m,g))}},function(t,e,n){var r=n(24),o=n(103),i=n(104);function s(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e])}s.prototype.add=s.prototype.push=o,s.prototype.has=i,t.exports=s},function(t,e){var n="__lodash_hash_undefined__";t.exports=function(t){return this.__data__.set(t,n),this}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},function(t,e){t.exports=function(t,e){return t.has(e)}},function(t,e,n){var r=n(12),o=n(41),i=n(9),s=n(40),a=n(108),u=n(109),c=1,f=2,p="[object Boolean]",l="[object Date]",h="[object Error]",d="[object Map]",y="[object Number]",v="[object RegExp]",m="[object Set]",g="[object String]",b="[object Symbol]",w="[object ArrayBuffer]",x="[object DataView]",O=r?r.prototype:void 0,_=O?O.valueOf:void 0;t.exports=function(t,e,n,r,O,C,j){switch(n){case x:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case w:return!(t.byteLength!=e.byteLength||!C(new o(t),new o(e)));case p:case l:case y:return i(+t,+e);case h:return t.name==e.name&&t.message==e.message;case v:case g:return t==e+"";case d:var k=a;case m:var E=r&c;if(k||(k=u),t.size!=e.size&&!E)return!1;var R=j.get(t);if(R)return R==e;r|=f,j.set(t,e);var F=s(k(t),k(e),r,O,C,j);return j.delete(t),F;case b:if(_)return _.call(t)==_.call(e)}return!1}},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}},function(t,e,n){var r=n(111),o=1,i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,s,a,u){var c=n&o,f=r(t),p=f.length;if(p!=r(e).length&&!c)return!1;for(var l=p;l--;){var h=f[l];if(!(c?h in e:i.call(e,h)))return!1}var d=u.get(t);if(d&&u.get(e))return d==e;var y=!0;u.set(t,e),u.set(e,t);for(var v=c;++l<p;){var m=t[h=f[l]],g=e[h];if(s)var b=c?s(g,m,h,e,t,u):s(m,g,h,t,e,u);if(!(void 0===b?m===g||a(m,g,n,s,u):b)){y=!1;break}v||(v="constructor"==h)}if(y&&!v){var w=t.constructor,x=e.constructor;w!=x&&"constructor"in t&&"constructor"in e&&!("function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x)&&(y=!1)}return u.delete(t),u.delete(e),y}},function(t,e,n){var r=n(112),o=n(114),i=n(15);t.exports=function(t){return r(t,i,o)}},function(t,e,n){var r=n(113),o=n(1);t.exports=function(t,e,n){var i=e(t);return o(t)?i:r(i,n(t))}},function(t,e){t.exports=function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}},function(t,e,n){var r=n(115),o=n(116),i=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(t){return null==t?[]:(t=Object(t),r(s(t),function(e){return i.call(t,e)}))}:o;t.exports=a},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var s=t[n];e(s,n,t)&&(i[o++]=s)}return i}},function(t,e){t.exports=function(){return[]}},function(t,e){t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},function(t,e,n){var r=n(8),o=n(6),i="[object Arguments]";t.exports=function(t){return o(t)&&r(t)==i}},function(t,e){t.exports=function(){return!1}},function(t,e,n){var r=n(8),o=n(30),i=n(6),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,t.exports=function(t){return i(t)&&o(t.length)&&!!s[r(t)]}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,n){(function(t){var r=n(37),o=e&&!e.nodeType&&e,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,s=i&&i.exports===o&&r.process,a=function(){try{var t=i&&i.require&&i.require("util").types;return t||s&&s.binding&&s.binding("util")}catch(t){}}();t.exports=a}).call(this,n(27)(t))},function(t,e,n){var r=n(31),o=n(124),i=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return o(t);var e=[];for(var n in Object(t))i.call(t,n)&&"constructor"!=n&&e.push(n);return e}},function(t,e,n){var r=n(43)(Object.keys,Object);t.exports=r},function(t,e,n){var r=n(126),o=n(22),i=n(127),s=n(128),a=n(129),u=n(8),c=n(38),f=c(r),p=c(o),l=c(i),h=c(s),d=c(a),y=u;(r&&"[object DataView]"!=y(new r(new ArrayBuffer(1)))||o&&"[object Map]"!=y(new o)||i&&"[object Promise]"!=y(i.resolve())||s&&"[object Set]"!=y(new s)||a&&"[object WeakMap]"!=y(new a))&&(y=function(t){var e=u(t),n="[object Object]"==e?t.constructor:void 0,r=n?c(n):"";if(r)switch(r){case f:return"[object DataView]";case p:return"[object Map]";case l:return"[object Promise]";case h:return"[object Set]";case d:return"[object WeakMap]"}return e}),t.exports=y},function(t,e,n){var r=n(5)(n(2),"DataView");t.exports=r},function(t,e,n){var r=n(5)(n(2),"Promise");t.exports=r},function(t,e,n){var r=n(5)(n(2),"Set");t.exports=r},function(t,e,n){var r=n(5)(n(2),"WeakMap");t.exports=r},function(t,e,n){var r=n(44),o=n(15);t.exports=function(t){for(var e=o(t),n=e.length;n--;){var i=e[n],s=t[i];e[n]=[i,s,r(s)]}return e}},function(t,e,n){var r=n(39),o=n(132),i=n(138),s=n(32),a=n(44),u=n(45),c=n(17),f=1,p=2;t.exports=function(t,e){return s(t)&&a(e)?u(c(t),e):function(n){var s=o(n,t);return void 0===s&&s===e?i(n,t):r(e,s,f|p)}}},function(t,e,n){var r=n(46);t.exports=function(t,e,n){var o=null==t?void 0:r(t,e);return void 0===o?n:o}},function(t,e,n){var r=n(134),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,s=r(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(o,function(t,n,r,o){e.push(r?o.replace(i,"$1"):n||t)}),e});t.exports=s},function(t,e,n){var r=n(135),o=500;t.exports=function(t){var e=r(t,function(t){return n.size===o&&n.clear(),t}),n=e.cache;return e}},function(t,e,n){var r=n(24),o="Expected a function";function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(o);var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=t.apply(this,r);return n.cache=i.set(o,s)||i,s};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i},function(t,e,n){var r=n(137);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){var r=n(12),o=n(36),i=n(1),s=n(16),a=1/0,u=r?r.prototype:void 0,c=u?u.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(i(e))return o(e,t)+"";if(s(e))return c?c.call(e):"";var n=e+"";return"0"==n&&1/e==-a?"-0":n}},function(t,e,n){var r=n(139),o=n(48);t.exports=function(t,e){return null!=t&&o(t,e,r)}},function(t,e){t.exports=function(t,e){return null!=t&&e in Object(t)}},function(t,e,n){var r=n(141),o=n(142),i=n(32),s=n(17);t.exports=function(t){return i(t)?r(s(t)):o(t)}},function(t,e){t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},function(t,e,n){var r=n(46);t.exports=function(t){return function(e){return r(e,t)}}},function(t,e,n){var r=n(49),o=n(7);t.exports=function(t,e){var n=-1,i=o(t)?Array(t.length):[];return r(t,function(t,r,o){i[++n]=e(t,r,o)}),i}},function(t,e,n){var r=n(50),o=n(15);t.exports=function(t,e){return t&&r(t,e,o)}},function(t,e){t.exports=function(t){return function(e,n,r){for(var o=-1,i=Object(e),s=r(e),a=s.length;a--;){var u=s[t?a:++o];if(!1===n(i[u],u,i))break}return e}}},function(t,e,n){var r=n(7);t.exports=function(t,e){return function(n,o){if(null==n)return n;if(!r(n))return t(n,o);for(var i=n.length,s=e?i:-1,a=Object(n);(e?s--:++s<i)&&!1!==o(a[s],s,a););return n}}},function(t,e,n){var r=n(21),o=n(51),i=n(50),s=n(148),a=n(3),u=n(55),c=n(54);t.exports=function t(e,n,f,p,l){e!==n&&i(n,function(i,u){if(a(i))l||(l=new r),s(e,n,u,f,t,p,l);else{var h=p?p(c(e,u),i,u+"",e,n,l):void 0;void 0===h&&(h=i),o(e,u,h)}},u)}},function(t,e,n){var r=n(51),o=n(149),i=n(150),s=n(152),a=n(153),u=n(25),c=n(1),f=n(155),p=n(26),l=n(23),h=n(3),d=n(156),y=n(29),v=n(54),m=n(157);t.exports=function(t,e,n,g,b,w,x){var O=v(t,n),_=v(e,n),C=x.get(_);if(C)r(t,n,C);else{var j=w?w(O,_,n+"",t,e,x):void 0,k=void 0===j;if(k){var E=c(_),R=!E&&p(_),F=!E&&!R&&y(_);j=_,E||R||F?c(O)?j=O:f(O)?j=s(O):R?(k=!1,j=o(_,!0)):F?(k=!1,j=i(_,!0)):j=[]:d(_)||u(_)?(j=O,u(O)?j=m(O):h(O)&&!l(O)||(j=a(_))):k=!1}k&&(x.set(_,j),b(j,_,g,w,x),x.delete(_)),r(t,n,j)}}},function(t,e,n){(function(t){var r=n(2),o=e&&!e.nodeType&&e,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,s=i&&i.exports===o?r.Buffer:void 0,a=s?s.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=a?a(n):new t.constructor(n);return t.copy(r),r}}).call(this,n(27)(t))},function(t,e,n){var r=n(151);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},function(t,e,n){var r=n(41);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},function(t,e){t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}},function(t,e,n){var r=n(154),o=n(53),i=n(31);t.exports=function(t){return"function"!=typeof t.constructor||i(t)?{}:r(o(t))}},function(t,e,n){var r=n(3),o=Object.create,i=function(){function t(){}return function(e){if(!r(e))return{};if(o)return o(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=i},function(t,e,n){var r=n(7),o=n(6);t.exports=function(t){return o(t)&&r(t)}},function(t,e,n){var r=n(8),o=n(53),i=n(6),s="[object Object]",a=Function.prototype,u=Object.prototype,c=a.toString,f=u.hasOwnProperty,p=c.call(Object);t.exports=function(t){if(!i(t)||r(t)!=s)return!1;var e=o(t);if(null===e)return!0;var n=f.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==p}},function(t,e,n){var r=n(158),o=n(55);t.exports=function(t){return r(t,o(t))}},function(t,e,n){var r=n(159),o=n(33);t.exports=function(t,e,n,i){var s=!n;n||(n={});for(var a=-1,u=e.length;++a<u;){var c=e[a],f=i?i(n[c],t[c],c,n,t):void 0;void 0===f&&(f=t[c]),s?o(n,c,f):r(n,c,f)}return n}},function(t,e,n){var r=n(33),o=n(9),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var s=t[e];i.call(t,e)&&o(s,n)&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(3),o=n(31),i=n(161),s=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=o(t),n=[];for(var a in t)("constructor"!=a||!e&&s.call(t,a))&&n.push(a);return n}},function(t,e){t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},function(t,e,n){var r=n(163),o=n(170);t.exports=function(t){return r(function(e,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(s=t.length>3&&"function"==typeof s?(i--,s):void 0,a&&o(n[0],n[1],a)&&(s=i<3?void 0:s,i=1),e=Object(e);++r<i;){var u=n[r];u&&t(e,u,r,s)}return e})}},function(t,e,n){var r=n(18),o=n(164),i=n(166);t.exports=function(t,e){return i(o(t,e,r),t+"")}},function(t,e,n){var r=n(165),o=Math.max;t.exports=function(t,e,n){return e=o(void 0===e?t.length-1:e,0),function(){for(var i=arguments,s=-1,a=o(i.length-e,0),u=Array(a);++s<a;)u[s]=i[e+s];s=-1;for(var c=Array(e+1);++s<e;)c[s]=i[s];return c[e]=n(u),r(t,this,c)}}},function(t,e){t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},function(t,e,n){var r=n(167),o=n(169)(r);t.exports=o},function(t,e,n){var r=n(168),o=n(52),i=n(18),s=o?function(t,e){return o(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:i;t.exports=s},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e){var n=800,r=16,o=Date.now;t.exports=function(t){var e=0,i=0;return function(){var s=o(),a=r-(s-i);if(i=s,a>0){if(++e>=n)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,n){var r=n(9),o=n(7),i=n(28),s=n(3);t.exports=function(t,e,n){if(!s(n))return!1;var a=typeof e;return!!("number"==a?o(n)&&i(e,n.length):"string"==a&&e in n)&&r(n[e],t)}},function(t,e,n){var r=n(20),o=n(7),i=n(15);t.exports=function(t){return function(e,n,s){var a=Object(e);if(!o(e)){var u=r(n,3);e=i(e),n=function(t){return u(a[t],t,a)}}var c=t(e,n,s);return c>-1?a[u?e[c]:c]:void 0}}},function(t,e,n){var r=n(173),o=n(20),i=n(174),s=Math.max;t.exports=function(t,e,n){var a=null==t?0:t.length;if(!a)return-1;var u=null==n?0:i(n);return u<0&&(u=s(a+u,0)),r(t,o(e,3),u)}},function(t,e){t.exports=function(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1}},function(t,e,n){var r=n(175);t.exports=function(t){var e=r(t),n=e%1;return e==e?n?e-n:e:0}},function(t,e,n){var r=n(176),o=1/0,i=1.7976931348623157e308;t.exports=function(t){return t?(t=r(t))===o||t===-o?(t<0?-1:1)*i:t==t?t:0:0===t?t:0}},function(t,e,n){var r=n(3),o=n(16),i=NaN,s=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,f=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(o(t))return i;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(s,"");var n=u.test(t);return n||c.test(t)?f(t.slice(2),n?2:8):a.test(t)?i:+t}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}},function(t,e,n){var r=n(18);t.exports=function(t){return"function"==typeof t?t:r}},function(t,e){var n=Object.prototype.hasOwnProperty;t.exports=function(t,e){return null!=t&&n.call(t,e)}},function(t,e,n){"use strict";var r=n(0),o=n(56),i=n(182),s=n(34);function a(t){var e=new i(t),n=o(i.prototype.request,e);return r.extend(n,i.prototype,e),r.extend(n,e),n}var u=a(s);u.Axios=i,u.create=function(t){return a(r.merge(s,t))},u.Cancel=n(66),u.CancelToken=n(208),u.isCancel=n(65),u.all=function(t){return Promise.all(t)},u.spread=n(209),t.exports=u,t.exports.default=u},function(t,e){function n(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}
  /*!
   * Determine if an object is a Buffer
   *
   * @author   Feross Aboukhadijeh <https://feross.org>
   * @license  MIT
   */
  t.exports=function(t){return null!=t&&(n(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&n(t.slice(0,0))}(t)||!!t._isBuffer)}},function(t,e,n){"use strict";var r=n(34),o=n(0),i=n(203),s=n(204);function a(t){this.defaults=t,this.interceptors={request:new i,response:new i}}a.prototype.request=function(t){"string"==typeof t&&(t=o.merge({url:arguments[0]},arguments[1])),(t=o.merge(r,{method:"get"},this.defaults,t)).method=t.method.toLowerCase();var e=[s,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach(function(t){e.unshift(t.fulfilled,t.rejected)}),this.interceptors.response.forEach(function(t){e.push(t.fulfilled,t.rejected)});e.length;)n=n.then(e.shift(),e.shift());return n},o.forEach(["delete","get","head","options"],function(t){a.prototype[t]=function(e,n){return this.request(o.merge(n||{},{method:t,url:e}))}}),o.forEach(["post","put","patch"],function(t){a.prototype[t]=function(e,n,r){return this.request(o.merge(r||{},{method:t,url:e,data:n}))}}),t.exports=a},function(t,e,n){"use strict";var r=n(0);t.exports=function(t,e){r.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})}},function(t,e,n){"use strict";var r=n(0),o=n(57),i=n(59),s=n(185),a=n(186),u=n(35),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(187);t.exports=function(t){return new Promise(function(e,f){var p=t.data,l=t.headers;r.isFormData(p)&&delete l["Content-Type"];var h=new XMLHttpRequest,d="onreadystatechange",y=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in h||a(t.url)||(h=new window.XDomainRequest,d="onload",y=!0,h.onprogress=function(){},h.ontimeout=function(){}),t.auth){var v=t.auth.username||"",m=t.auth.password||"";l.Authorization="Basic "+c(v+":"+m)}if(h.open(t.method.toUpperCase(),i(t.url,t.params,t.paramsSerializer),!0),h.timeout=t.timeout,h[d]=function(){if(h&&(4===h.readyState||y)&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in h?s(h.getAllResponseHeaders()):null,r={data:t.responseType&&"text"!==t.responseType?h.response:h.responseText,status:1223===h.status?204:h.status,statusText:1223===h.status?"No Content":h.statusText,headers:n,config:t,request:h};o(e,f,r),h=null}},h.onerror=function(){f(u("Network Error",t,null,h)),h=null},h.ontimeout=function(){f(u("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",h)),h=null},r.isStandardBrowserEnv()){var g=n(188),b=(t.withCredentials||a(t.url))&&t.xsrfCookieName?g.read(t.xsrfCookieName):void 0;b&&(l[t.xsrfHeaderName]=b)}if("setRequestHeader"in h&&r.forEach(l,function(t,e){void 0===p&&"content-type"===e.toLowerCase()?delete l[e]:h.setRequestHeader(e,t)}),t.withCredentials&&(h.withCredentials=!0),t.responseType)try{h.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&h.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){h&&(h.abort(),f(t),h=null)}),void 0===p&&(p=null),h.send(p)})}},function(t,e,n){"use strict";var r=n(0),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,i,s={};return t?(r.forEach(t.split("\n"),function(t){if(i=t.indexOf(":"),e=r.trim(t.substr(0,i)).toLowerCase(),n=r.trim(t.substr(i+1)),e){if(s[e]&&o.indexOf(e)>=0)return;s[e]="set-cookie"===e?(s[e]?s[e]:[]).concat([n]):s[e]?s[e]+", "+n:n}}),s):s}},function(t,e,n){"use strict";var r=n(0);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=o(window.location.href),function(e){var n=r.isString(e)?o(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},function(t,e,n){"use strict";var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function o(){this.message="String contains an invalid character"}o.prototype=new Error,o.prototype.code=5,o.prototype.name="InvalidCharacterError",t.exports=function(t){for(var e,n,i=String(t),s="",a=0,u=r;i.charAt(0|a)||(u="=",a%1);s+=u.charAt(63&e>>8-a%1*8)){if((n=i.charCodeAt(a+=.75))>255)throw new o;e=e<<8|n}return s}},function(t,e,n){"use strict";var r=n(0);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,o,i,s){var a=[];a.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(o)&&a.push("path="+o),r.isString(i)&&a.push("domain="+i),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,n){"use strict";var r=n(0),o=n(57),i=n(59),s=n(60),a=n(61),u=n(62).http,c=n(62).https,f=n(63),p=n(201),l=n(202),h=n(35),d=n(58);t.exports=function(t){return new Promise(function(e,n){var y,v=t.data,m=t.headers;if(m["User-Agent"]||m["user-agent"]||(m["User-Agent"]="axios/"+l.version),v&&!r.isStream(v)){if(Buffer.isBuffer(v));else if(r.isArrayBuffer(v))v=new Buffer(new Uint8Array(v));else{if(!r.isString(v))return n(h("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",t));v=new Buffer(v,"utf-8")}m["Content-Length"]=v.length}var g=void 0;t.auth&&(g=(t.auth.username||"")+":"+(t.auth.password||""));var b=f.parse(t.url),w=b.protocol||"http:";if(!g&&b.auth){var x=b.auth.split(":");g=(x[0]||"")+":"+(x[1]||"")}g&&delete m.Authorization;var O="https:"===w,_=O?t.httpsAgent:t.httpAgent,C={path:i(b.path,t.params,t.paramsSerializer).replace(/^\?/,""),method:t.method,headers:m,agent:_,auth:g};t.socketPath?C.socketPath=t.socketPath:(C.hostname=b.hostname,C.port=b.port);var j,k=t.proxy;if(!k&&!1!==k){var E=w.slice(0,-1)+"_proxy",R=process.env[E]||process.env[E.toUpperCase()];if(R){var F=f.parse(R);if(k={host:F.hostname,port:F.port},F.auth){var A=F.auth.split(":");k.auth={username:A[0],password:A[1]}}}}if(k&&(C.hostname=k.host,C.host=k.host,C.headers.host=b.hostname+(b.port?":"+b.port:""),C.port=k.port,C.path=w+"//"+b.hostname+(b.port?":"+b.port:"")+C.path,k.auth)){var S=new Buffer(k.auth.username+":"+k.auth.password,"utf8").toString("base64");C.headers["Proxy-Authorization"]="Basic "+S}t.transport?j=t.transport:0===t.maxRedirects?j=O?a:s:(t.maxRedirects&&(C.maxRedirects=t.maxRedirects),j=O?c:u),t.maxContentLength&&t.maxContentLength>-1&&(C.maxBodyLength=t.maxContentLength);var $=j.request(C,function(r){if(!$.aborted){clearTimeout(y),y=null;var i=r;switch(r.headers["content-encoding"]){case"gzip":case"compress":case"deflate":i=i.pipe(p.createUnzip()),delete r.headers["content-encoding"]}var s=r.req||$,a={status:r.statusCode,statusText:r.statusMessage,headers:r.headers,config:t,request:s};if("stream"===t.responseType)a.data=i,o(e,n,a);else{var u=[];i.on("data",function(e){u.push(e),t.maxContentLength>-1&&Buffer.concat(u).length>t.maxContentLength&&n(h("maxContentLength size of "+t.maxContentLength+" exceeded",t,null,s))}),i.on("error",function(e){$.aborted||n(d(e,t,null,s))}),i.on("end",function(){var r=Buffer.concat(u);"arraybuffer"!==t.responseType&&(r=r.toString("utf8")),a.data=r,o(e,n,a)})}}});$.on("error",function(e){$.aborted||n(d(e,t,null,$))}),t.timeout&&!y&&(y=setTimeout(function(){$.abort(),n(h("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",$))},t.timeout)),t.cancelToken&&t.cancelToken.promise.then(function(t){$.aborted||($.abort(),n(t))}),r.isStream(v)?v.pipe($):$.end(v)})}},function(t,e){t.exports=require("assert")},function(t,e){t.exports=require("stream")},function(t,e,n){"use strict";"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?t.exports=n(193):t.exports=n(195)},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}e.log=function(){var t;return"object"===("undefined"==typeof console?"undefined":r(console))&&console.log&&(t=console).log.apply(t,arguments)},e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var r=0,o=0;e[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&(r++,"%c"===t&&(o=r))}),e.splice(o,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){var t;try{t=e.storage.getItem("debug")}catch(t){}!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG);return t},e.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.exports=n(64)(e),t.exports.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},function(t,e){var n=1e3,r=60*n,o=60*r,i=24*o,s=7*i,a=365.25*i;function u(t,e,n,r){var o=e>=1.5*n;return Math.round(t/n)+" "+r+(o?"s":"")}t.exports=function(t,e){e=e||{};var c=typeof t;if("string"===c&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!e)return;var u=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*a;case"weeks":case"week":case"w":return u*s;case"days":case"day":case"d":return u*i;case"hours":case"hour":case"hrs":case"hr":case"h":return u*o;case"minutes":case"minute":case"mins":case"min":case"m":return u*r;case"seconds":case"second":case"secs":case"sec":case"s":return u*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}(t);if("number"===c&&!1===isNaN(t))return e.long?function(t){var e=Math.abs(t);if(e>=i)return u(t,e,i,"day");if(e>=o)return u(t,e,o,"hour");if(e>=r)return u(t,e,r,"minute");if(e>=n)return u(t,e,n,"second");return t+" ms"}(t):function(t){var e=Math.abs(t);if(e>=i)return Math.round(t/i)+"d";if(e>=o)return Math.round(t/o)+"h";if(e>=r)return Math.round(t/r)+"m";if(e>=n)return Math.round(t/n)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,n){"use strict";var r=n(196),o=n(197);e.init=function(t){t.inspectOpts={};for(var n=Object.keys(e.inspectOpts),r=0;r<n.length;r++)t.inspectOpts[n[r]]=e.inspectOpts[n[r]]},e.log=function(){return process.stderr.write(o.format.apply(o,arguments)+"\n")},e.formatArgs=function(n){var r=this.namespace;if(this.useColors){var o=this.color,i="[3"+(o<8?o:"8;5;"+o),s="  ".concat(i,";1m").concat(r," [0m");n[0]=s+n[0].split("\n").join("\n"+s),n.push(i+"m+"+t.exports.humanize(this.diff)+"[0m")}else n[0]=function(){if(e.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+r+" "+n[0]},e.save=function(t){t?process.env.DEBUG=t:delete process.env.DEBUG},e.load=function(){return process.env.DEBUG},e.useColors=function(){return"colors"in e.inspectOpts?Boolean(e.inspectOpts.colors):r.isatty(process.stderr.fd)},e.colors=[6,2,3,4,5,1];try{var i=n(198);i&&(i.stderr||i).level>=2&&(e.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(t){}e.inspectOpts=Object.keys(process.env).filter(function(t){return/^debug_/i.test(t)}).reduce(function(t,e){var n=e.substring(6).toLowerCase().replace(/_([a-z])/g,function(t,e){return e.toUpperCase()}),r=process.env[e];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),t[n]=r,t},{}),t.exports=n(64)(e);var s=t.exports.formatters;s.o=function(t){return this.inspectOpts.colors=this.useColors,o.inspect(t,this.inspectOpts).replace(/\s*\n\s*/g," ")},s.O=function(t){return this.inspectOpts.colors=this.useColors,o.inspect(t,this.inspectOpts)}},function(t,e){t.exports=require("tty")},function(t,e){t.exports=require("util")},function(t,e,n){"use strict";const r=n(199),o=n(200),i=process.env;let s;function a(t){return function(t){return 0!==t&&{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}(function(t){if(!1===s)return 0;if(o("color=16m")||o("color=full")||o("color=truecolor"))return 3;if(o("color=256"))return 2;if(t&&!t.isTTY&&!0!==s)return 0;const e=s?1:0;if("win32"===process.platform){const t=r.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in i)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(t=>t in i)||"codeship"===i.CI_NAME?1:e;if("TEAMCITY_VERSION"in i)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(i.TEAMCITY_VERSION)?1:0;if("truecolor"===i.COLORTERM)return 3;if("TERM_PROGRAM"in i){const t=parseInt((i.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(i.TERM_PROGRAM){case"iTerm.app":return t>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(i.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM)?1:"COLORTERM"in i?1:(i.TERM,e)}(t))}o("no-color")||o("no-colors")||o("color=false")?s=!1:(o("color")||o("colors")||o("color=true")||o("color=always"))&&(s=!0),"FORCE_COLOR"in i&&(s=0===i.FORCE_COLOR.length||0!==parseInt(i.FORCE_COLOR,10)),t.exports={supportsColor:a,stdout:a(process.stdout),stderr:a(process.stderr)}},function(t,e){t.exports=require("os")},function(t,e,n){"use strict";t.exports=((t,e)=>{e=e||process.argv;const n=t.startsWith("-")?"":1===t.length?"-":"--",r=e.indexOf(n+t),o=e.indexOf("--");return-1!==r&&(-1===o||r<o)})},function(t,e){t.exports=require("zlib")},function(t){t.exports={name:"axios",version:"0.18.0",description:"Promise based HTTP client for the browser and node.js",main:"index.js",scripts:{test:"grunt test && bundlesize",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"},repository:{type:"git",url:"https://github.com/axios/axios.git"},keywords:["xhr","http","ajax","promise","node"],author:"Matt Zabriskie",license:"MIT",bugs:{url:"https://github.com/axios/axios/issues"},homepage:"https://github.com/axios/axios",devDependencies:{bundlesize:"^0.5.7",coveralls:"^2.11.9","es6-promise":"^4.0.5",grunt:"^1.0.1","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.0.0","grunt-contrib-nodeunit":"^1.0.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^19.0.0","grunt-karma":"^2.0.0","grunt-ts":"^6.0.0-beta.3","grunt-webpack":"^1.0.18","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^1.3.0","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-firefox-launcher":"^1.0.0","karma-jasmine":"^1.0.2","karma-jasmine-ajax":"^0.1.13","karma-opera-launcher":"^1.0.0","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^1.7.0","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",sinon:"^1.17.4",webpack:"^1.13.1","webpack-dev-server":"^1.14.1","url-search-params":"^0.6.1",typescript:"^2.0.3"},browser:{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},typings:"./index.d.ts",dependencies:{"follow-redirects":"^1.3.0","is-buffer":"^1.1.5"},bundlesize:[{path:"./dist/axios.min.js",threshold:"5kB"}]}},function(t,e,n){"use strict";var r=n(0);function o(){this.handlers=[]}o.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},o.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},o.prototype.forEach=function(t){r.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=o},function(t,e,n){"use strict";var r=n(0),o=n(205),i=n(65),s=n(34),a=n(206),u=n(207);function c(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return c(t),t.baseURL&&!a(t.url)&&(t.url=u(t.baseURL,t.url)),t.headers=t.headers||{},t.data=o(t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),r.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||s.adapter)(t).then(function(e){return c(t),e.data=o(e.data,e.headers,t.transformResponse),e},function(e){return i(e)||(c(t),e&&e.response&&(e.response.data=o(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},function(t,e,n){"use strict";var r=n(0);t.exports=function(t,e,n){return r.forEach(n,function(n){t=n(t,e)}),t}},function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,n){"use strict";var r=n(66);function o(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var n=this;t(function(t){n.reason||(n.reason=new r(t),e(n.reason))})}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var t;return{token:new o(function(e){t=e}),cancel:t}},t.exports=o},function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,n){"use strict";n.r(e);var r=n(19),o=n.n(r),i=n(4),s=n.n(i),a=n(67),u=n.n(a);if(String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return this.substr(!e||e<0?0:+e,t.length)===t}),Array.prototype.includes||(Array.prototype.includes=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=Object(this),o=parseInt(r.length,10)||0;if(0===o)return!1;var i,s,a=e[1]||0;for(a>=0?i=a:(i=o+a)<0&&(i=0);i<o;){if(t===(s=r[i])||t!=t&&s!=s)return!0;i++}return!1}),!Object.values||!Object.entries){var c=Function.bind.call(Function.call,Array.prototype.reduce),f=Function.bind.call(Function.call,Object.prototype.propertyIsEnumerable),p=Function.bind.call(Function.call,Array.prototype.concat),l=Reflect.ownKeys;Object.values||(Object.values=function(t){return c(l(t),function(e,n){return p(e,"string"==typeof n&&f(t,n)?[t[n]]:[])},[])}),Object.entries||(Object.entries=function(t){return c(l(t),function(e,n){return p(e,"string"==typeof n&&f(t,n)?[[n,t[n]]]:[])},[])})}var h=function(){function t(){}return t.register=function(t){this.database=t},t}(),d=function(t,e){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function y(t,e){function n(){this.constructor=t}d(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var v=function(){return(v=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function m(t,e,n,r){return new(n||(n=Promise))(function(o,i){function s(t){try{u(r.next(t))}catch(t){i(t)}}function a(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(s,a)}u((r=r.apply(t,e||[])).next())})}function g(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}function b(t,e){if(t!==e){if(t>e)return 1;if(t<e)return-1}return 0}var w={isEmpty:function(t){return Array.isArray(t)?0===t.length:0===Object.keys(t).length},forOwn:function(t,e){Object.keys(t).forEach(function(n){return e(t[n],n,t)})},groupBy:function(t,e){return t.reduce(function(t,n){var r=e(n);return void 0===t[r]&&(t[r]=[]),t[r].push(n),t},{})},map:function(t,e){return Object.keys(t).map(function(n){return e(t[n],n,t)})},mapValues:function(t,e){var n=Object.assign({},t);return Object.keys(t).reduce(function(n,r){return n[r]=e(t[r],r,t),n},n)},orderBy:function(t,e,n){var r=-1;return function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(t.map(function(t){return{criteria:e.map(function(e){return t[e]}),index:++r,value:t}}),function(t,e){return function(t,e,n){for(var r=t.criteria,o=e.criteria,i=r.length,s=n.length,a=-1;++a<i;){var u=b(r[a],o[a]);if(u){if(a>=s)return u;var c=n[a];return u*("desc"===c?-1:1)}}return t.index-e.index}(t,e,n)})},pickBy:function(t,e){return Object.keys(t).reduce(function(n,r){var o=t[r];return e(o,r)&&(n[r]=o),n},{})}},x=function(){return function(t){this.model=t}}(),O=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.isNullable=!1,o.value=n,o.mutator=r,o}return y(e,t),e.prototype.nullable=function(){return this.isNullable=!0,this},e.prototype.mutate=function(t,e){var n=this.mutator||this.model.mutators()[e];return n?n(t):t},e}(x),_=function(t){function e(e,n,r){var o=t.call(this,e,n,r)||this;return o.value=n,o}return y(e,t),e.prototype.make=function(t,e,n){return t=void 0!==t?t:this.value,this.mutate(t,n)},e}(O),C=function(t){function e(e){return t.call(this,e,null)||this}return y(e,t),e.prototype.make=function(t,e,n){return"number"==typeof t?t:null},e}(O),j=function(t){function e(e,n,r){return t.call(this,e,n,r)||this}return y(e,t),e.prototype.make=function(t,e,n){return this.mutate(this.fix(t),n)},e.prototype.fix=function(t){return void 0===t?this.value:"string"==typeof t?t:null===t&&this.isNullable?t:t+""},e}(O),k=function(t){function e(e,n,r){return t.call(this,e,n,r)||this}return y(e,t),e.prototype.make=function(t,e,n){return this.mutate(this.fix(t),n)},e.prototype.fix=function(t){return void 0===t?this.value:"number"==typeof t?t:"string"==typeof t?parseFloat(t):"boolean"==typeof t?t?1:0:null===t&&this.isNullable?t:0},e}(O),E=function(t){function e(e,n,r){return t.call(this,e,n,r)||this}return y(e,t),e.prototype.make=function(t,e,n){return this.mutate(this.fix(t),n)},e.prototype.fix=function(t){if(void 0===t)return this.value;if("boolean"==typeof t)return t;if("string"==typeof t){if(0===t.length)return!1;var e=parseInt(t,0);return!!isNaN(e)||!!e}return"number"==typeof t?!!t:!(null!==t||!this.isNullable)&&t},e}(O),R=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return y(e,t),e.prototype.getRelation=function(t,e,n){var r=t.newQuery(e);return n.forEach(function(t){t(r)}),r},e.prototype.getKeys=function(t,e){return t.map(function(t){return t[e]})},e.prototype.mapSingleRelations=function(t,e){return t.reduce(function(t,n){return t[n[e]]=n,t},{})},e.prototype.mapManyRelations=function(t,e){return t.reduce(function(t,n){var r=n[e];return t[r]||(t[r]=[]),t[r].push(n),t},{})},e.prototype.isOneRelation=function(t){return!Array.isArray(t)&&null!==t&&"object"==typeof t},e.prototype.isManyRelation=function(t){return!!Array.isArray(t)&&!(t.length<1)},e.prototype.makeManyRelation=function(t,e){var n=this;return this.isManyRelation(t)?t.filter(function(t){return n.isOneRelation(t)}).map(function(t){return new e(t)}):[]},e}(x),F=function(t){function e(e,n,r,o){var i=t.call(this,e)||this;return i.related=i.model.relation(n),i.foreignKey=r,i.localKey=o,i}return y(e,t),e.prototype.define=function(t){return t.one(this.related)},e.prototype.attach=function(t,e,n){var r=n[this.related.entity];r&&r[t]&&void 0===r[t][this.foreignKey]&&(e[this.localKey]||(e[this.localKey]=e.$id),r[t][this.foreignKey]=e[this.localKey])},e.prototype.make=function(t,e,n){return this.isOneRelation(t)?new this.related(t):null},e.prototype.load=function(t,e,n,r){var o=this.getRelation(t,this.related.entity,r);this.addEagerConstraints(o,e),this.match(e,o.get(),n)},e.prototype.addEagerConstraints=function(t,e){t.whereFk(this.foreignKey,this.getKeys(e,this.localKey))},e.prototype.match=function(t,e,n){var r=this,o=this.buildDictionary(e);t.forEach(function(t){var e=t[r.localKey],i=o[e];t[n]=i||null})},e.prototype.buildDictionary=function(t){var e=this;return t.reduce(function(t,n){return t[n[e.foreignKey]]=n,t},{})},e}(R),A=function(t){function e(e,n,r,o){var i=t.call(this,e)||this;return i.parent=i.model.relation(n),i.foreignKey=r,i.ownerKey=o,i}return y(e,t),e.prototype.define=function(t){return t.one(this.parent)},e.prototype.attach=function(t,e,n){void 0===e[this.foreignKey]&&(e[this.foreignKey]=t)},e.prototype.make=function(t,e,n){return this.isOneRelation(t)?new this.parent(t):null},e.prototype.load=function(t,e,n,r){var o=this.getRelation(t,this.parent.entity,r);this.addEagerConstraints(o,e),this.match(e,o.get(),n)},e.prototype.addEagerConstraints=function(t,e){t.whereFk(this.ownerKey,this.getKeys(e,this.foreignKey))},e.prototype.match=function(t,e,n){var r=this,o=this.buildDictionary(e);t.forEach(function(t){var e=t[r.foreignKey],i=null!==e?o[e]:null;t[n]=i||null})},e.prototype.buildDictionary=function(t){var e=this;return t.reduce(function(t,n){return t[n[e.ownerKey]]=n,t},{})},e}(R),S=function(t){function e(e,n,r,o){var i=t.call(this,e)||this;return i.related=i.model.relation(n),i.foreignKey=r,i.localKey=o,i}return y(e,t),e.prototype.define=function(t){return t.many(this.related)},e.prototype.attach=function(t,e,n){var r=this;Array.isArray(t)&&t.forEach(function(t){var o=n[r.related.entity];o&&o[t]&&void 0===o[t][r.foreignKey]&&(o[t][r.foreignKey]=e[r.localKey])})},e.prototype.make=function(t,e,n){return this.makeManyRelation(t,this.related)},e.prototype.load=function(t,e,n,r){var o=this.getRelation(t,this.related.entity,r);this.addEagerConstraints(o,e),this.match(e,o.get(),n)},e.prototype.addEagerConstraints=function(t,e){t.whereFk(this.foreignKey,this.getKeys(e,this.localKey))},e.prototype.match=function(t,e,n){var r=this,o=this.buildDictionary(e);t.forEach(function(t){var e=t[r.localKey],i=o[e];t[n]=i||[]})},e.prototype.buildDictionary=function(t){var e=this;return t.reduce(function(t,n){var r=n[e.foreignKey];return t[r]||(t[r]=[]),t[r].push(n),t},{})},e}(R),$=function(t){function e(e,n,r,o){var i=t.call(this,e)||this;return i.parent=i.model.relation(n),i.foreignKey=r,i.ownerKey=o,i}return y(e,t),e.prototype.define=function(t){return t.many(this.parent)},e.prototype.attach=function(t,e,n){0!==t.length&&void 0===e[this.foreignKey]&&(e[this.foreignKey]=t)},e.prototype.make=function(t,e,n){return this.makeManyRelation(t,this.parent)},e.prototype.load=function(t,e,n,r){var o=this,i=this.getRelation(t,this.parent.entity,r);this.addConstraintForHasManyBy(i,e);var s=this.mapSingleRelations(i.get(),this.ownerKey);e.forEach(function(t){var e=o.getRelatedRecords(s,t[o.foreignKey]);t[n]=e})},e.prototype.addConstraintForHasManyBy=function(t,e){var n=this,r=e.reduce(function(t,e){return t.concat(e[n.foreignKey])},[]);t.where(this.ownerKey,r)},e.prototype.getRelatedRecords=function(t,e){return e.reduce(function(e,n){var r=t[n];return r&&e.push(r),e},[])},e}(R),M=function(t){function e(e,n,r,o,i,s,a){var u=t.call(this,e)||this;return u.related=u.model.relation(n),u.through=u.model.relation(r),u.firstKey=o,u.secondKey=i,u.localKey=s,u.secondLocalKey=a,u}return y(e,t),e.prototype.define=function(t){return t.many(this.related)},e.prototype.attach=function(t,e,n){},e.prototype.make=function(t,e,n){return this.makeManyRelation(t,this.related)},e.prototype.load=function(t,e,n,r){var o=this,i=this.getRelation(t,this.related.entity,r),s=t.newQuery(this.through.entity);this.addEagerConstraintForThrough(s,e);var a=s.get();this.addEagerConstraintForRelated(i,a);var u=this.mapThroughRelations(a,i);e.forEach(function(t){var e=u[t[o.localKey]];t[n]=e||[]})},e.prototype.addEagerConstraintForThrough=function(t,e){t.where(this.firstKey,this.getKeys(e,this.localKey))},e.prototype.addEagerConstraintForRelated=function(t,e){t.where(this.secondKey,this.getKeys(e,this.secondLocalKey))},e.prototype.mapThroughRelations=function(t,e){var n=this,r=this.mapManyRelations(e.get(),this.secondKey);return t.reduce(function(t,e){var o=e[n.firstKey];t[o]||(t[o]=[]);var i=r[e[n.secondLocalKey]];return t[o]=t[o].concat(i),t},{})},e}(R),K=function(t){function e(e,n,r,o,i,s,a){var u=t.call(this,e)||this;return u.related=u.model.relation(n),u.pivot=u.model.relation(r),u.foreignPivotKey=o,u.relatedPivotKey=i,u.parentKey=s,u.relatedKey=a,u}return y(e,t),e.prototype.define=function(t){return t.many(this.related)},e.prototype.attach=function(t,e,n){},e.prototype.make=function(t,e,n){return this.makeManyRelation(t,this.related)},e.prototype.load=function(t,e,n,r){var o=this,i=this.getRelation(t,this.related.entity,r),s=t.newQuery(this.pivot.entity);this.addEagerConstraintForPivot(s,e);var a=s.get();this.addEagerConstraintForRelated(i,a);var u=this.mapPivotRelations(a,i);e.forEach(function(t){var e=u[t[o.parentKey]];t[n]=e||[]})},e.prototype.addEagerConstraintForPivot=function(t,e){t.whereFk(this.foreignPivotKey,this.getKeys(e,this.parentKey))},e.prototype.addEagerConstraintForRelated=function(t,e){t.whereFk(this.relatedKey,this.getKeys(e,this.relatedPivotKey))},e.prototype.mapPivotRelations=function(t,e){var n=this,r=this.mapManyRelations(e.get(),this.relatedKey);return t.reduce(function(t,e){var o=e[n.foreignPivotKey];t[o]||(t[o]=[]);var i=r[e[n.relatedPivotKey]];return i&&(t[o]=t[o].concat(i)),t},{})},e.prototype.createPivots=function(t,e,n){var r=this;return this.pivot.primaryKey instanceof Array==!1?e:(w.forOwn(e[t.entity],function(t){var o=t[n];void 0!==o&&0!==o.length&&r.createPivotRecord(e,t,o)}),e)},e.prototype.createPivotRecord=function(t,e,n){var r=this;n.forEach(function(n){var o,i,s=e[r.parentKey]+"_"+n;t[r.pivot.entity]=v({},t[r.pivot.entity],((o={})[s]=((i={$id:s})[r.foreignPivotKey]=e[r.parentKey],i[r.relatedPivotKey]=n,i),o))})},e}(R),P=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.id=n,o.type=r,o}return y(e,t),e.prototype.define=function(t){var e=this;return t.union(function(t,n){return n[e.type]})},e.prototype.attach=function(t,e,n){},e.prototype.make=function(t,e,n){if(!this.isOneRelation(t))return null;var r=e[this.type],o=this.model.relation(r);return o?new o(t):null},e.prototype.load=function(t,e,n,r){var o=this,i=this.getTypes(e).reduce(function(e,n){var i=o.getRelation(t,n,r);return e[n]=o.mapSingleRelations(i.get(),"$id"),e},{});e.forEach(function(t){var e=t[o.id],r=t[o.type],s=i[r][e];t[n]=s||null})},e.prototype.getTypes=function(t){var e=this;return t.reduce(function(t,n){var r=n[e.type];return!t.includes(r)&&t.push(r),t},[])},e}(R),I=function(t){function e(e,n,r,o,i){var s=t.call(this,e)||this;return s.related=s.model.relation(n),s.id=r,s.type=o,s.localKey=i,s}return y(e,t),e.prototype.define=function(t){return t.one(this.related)},e.prototype.attach=function(t,e,n){var r=n[this.related.entity]&&n[this.related.entity][t];r&&(r[this.id]=r[this.id]||e.$id,r[this.type]=r[this.type]||this.model.entity)},e.prototype.make=function(t,e,n){return this.isOneRelation(t)?new this.related(t):null},e.prototype.load=function(t,e,n,r){var o=this,i=this.getRelation(t,this.related.entity,r);this.addEagerConstraintForMorphOne(i,e,t.entity);var s=this.mapSingleRelations(i.get(),this.id);e.forEach(function(t){var e=s[t[o.localKey]];t[n]=e||null})},e.prototype.addEagerConstraintForMorphOne=function(t,e,n){t.whereFk(this.type,n).whereFk(this.id,this.getKeys(e,this.localKey))},e}(R),B=function(t){function e(e,n,r,o,i){var s=t.call(this,e)||this;return s.related=s.model.relation(n),s.id=r,s.type=o,s.localKey=i,s}return y(e,t),e.prototype.define=function(t){return t.many(this.related)},e.prototype.attach=function(t,e,n){var r=this;if(Array.isArray(t)){var o=n[this.related.entity];t.forEach(function(t){var n=o[t];n[r.id]=n[r.id]||e.$id,n[r.type]=n[r.type]||r.model.entity})}},e.prototype.make=function(t,e,n){return this.makeManyRelation(t,this.related)},e.prototype.load=function(t,e,n,r){var o=this,i=this.getRelation(t,this.related.entity,r);this.addEagerConstraintForMorphMany(i,e,t.entity);var s=this.mapManyRelations(i.get(),this.id);e.forEach(function(t){var e=s[t[o.localKey]];t[n]=e||[]})},e.prototype.addEagerConstraintForMorphMany=function(t,e,n){t.whereFk(this.type,n).whereFk(this.id,this.getKeys(e,this.localKey))},e}(R),q=function(t){function e(e,n,r,o,i,s,a,u){var c=t.call(this,e)||this;return c.related=c.model.relation(n),c.pivot=c.model.relation(r),c.relatedId=o,c.id=i,c.type=s,c.parentKey=a,c.relatedKey=u,c}return y(e,t),e.prototype.define=function(t){return t.many(this.related)},e.prototype.attach=function(t,e,n){},e.prototype.make=function(t,e,n){return this.makeManyRelation(t,this.related)},e.prototype.load=function(t,e,n,r){var o=this,i=this.getRelation(t,this.related.entity,r),s=t.newQuery(this.pivot.entity);this.addEagerConstraintForPivot(s,e,t.entity);var a=s.get();this.addEagerConstraintForRelated(i,a);var u=this.mapPivotRelations(a,i);e.forEach(function(t){var e=u[t[o.parentKey]];t[n]=e||[]})},e.prototype.addEagerConstraintForPivot=function(t,e,n){t.whereFk(this.type,n).whereFk(this.id,this.getKeys(e,this.parentKey))},e.prototype.addEagerConstraintForRelated=function(t,e){t.whereFk(this.relatedKey,this.getKeys(e,this.relatedId))},e.prototype.mapPivotRelations=function(t,e){var n=this,r=this.mapManyRelations(e.get(),this.relatedKey);return t.reduce(function(t,e){var o=e[n.id];t[o]||(t[o]=[]);var i=r[e[n.relatedId]];return t[o]=t[o].concat(i),t},{})},e.prototype.createPivots=function(t,e,n){var r=this;return w.forOwn(e[t.entity],function(o){var i=t.query().newQuery(r.pivot.entity).where(r.id,o[r.parentKey]).where(r.type,t.entity).get().map(function(t){return t[r.parentKey]}),s=(o[n]||[]).filter(function(t){return!i.includes(t)});Array.isArray(s)&&0!==s.length&&r.createPivotRecord(t,e,o,s)}),e},e.prototype.createPivotRecord=function(t,e,n,r){var o=this;r.forEach(function(r){var i,s,a=n[o.parentKey],u=a+"_"+r+"_"+t.entity;e[o.pivot.entity]=v({},e[o.pivot.entity],((i={})[u]=((s={$id:u})[o.relatedId]=r,s[o.id]=a,s[o.type]=t.entity,s),i))})},e}(R),T=function(t){function e(e,n,r,o,i,s,a,u){var c=t.call(this,e)||this;return c.related=c.model.relation(n),c.pivot=c.model.relation(r),c.relatedId=o,c.id=i,c.type=s,c.parentKey=a,c.relatedKey=u,c}return y(e,t),e.prototype.define=function(t){return t.many(this.related)},e.prototype.attach=function(t,e,n){},e.prototype.make=function(t,e,n){return this.makeManyRelation(t,this.related)},e.prototype.load=function(t,e,n,r){var o=this,i=this.getRelation(t,this.related.entity,r),s=t.newQuery(this.pivot.entity);this.addEagerConstraintForPivot(s,e,this.related.entity);var a=s.get();this.addEagerConstraintForRelated(i,a);var u=this.mapPivotRelations(a,i);e.forEach(function(t){var e=u[t[o.parentKey]];t[n]=e||[]})},e.prototype.addEagerConstraintForPivot=function(t,e,n){t.whereFk(this.type,n).whereFk(this.relatedId,this.getKeys(e,this.parentKey))},e.prototype.addEagerConstraintForRelated=function(t,e){t.whereFk(this.relatedKey,this.getKeys(e,this.id))},e.prototype.mapPivotRelations=function(t,e){var n=this,r=this.mapManyRelations(e.get(),this.relatedKey);return t.reduce(function(t,e){var o=e[n.relatedId];t[o]||(t[o]=[]);var i=r[e[n.id]];return t[o]=t[o].concat(i),t},{})},e.prototype.createPivots=function(t,e,n){var r=this;return w.forOwn(e[t.entity],function(t){var o=t[n];Array.isArray(o)&&r.createPivotRecord(e,t,o)}),e},e.prototype.createPivotRecord=function(t,e,n){var r=this;n.forEach(function(n){var o,i,s=e[r.parentKey],a=n+"_"+s+"_"+r.related.entity;t[r.pivot.entity]=v({},t[r.pivot.entity],((o={})[a]=((i={$id:a})[r.relatedId]=s,i[r.id]=n,i[r.type]=r.related.entity,i),o))})},e}(R),U=function(){function t(){}return t.serialize=function(t){var e=this,n=t.$fields();return Object.keys(n).reduce(function(n,r){var o=t[r];return n[r]=e.serializeValue(o),n},{})},t.serializeValue=function(t){return t instanceof z?this.serializeItem(t):Array.isArray(t)?this.serializeCollection(t):t},t.serializeItem=function(t){return t.$toJson()},t.serializeCollection=function(t){return t.map(function(t){return t instanceof z?t.$toJson():t})},t}(),z=function(){function t(t){this.$id=null,this.$fill(t)}return t.fields=function(){return{}},t.getFields=function(){return this.cachedFields?this.cachedFields:(this.cachedFields=this.fields(),this.cachedFields)},t.attr=function(t,e){return new _(this,t,e)},t.string=function(t,e){return new j(this,t,e)},t.number=function(t,e){return new k(this,t,e)},t.boolean=function(t,e){return new E(this,t,e)},t.increment=function(){return new C(this)},t.hasOne=function(t,e,n){return new F(this,t,e,this.localKey(n))},t.belongsTo=function(t,e,n){return new A(this,t,e,this.relation(t).localKey(n))},t.hasMany=function(t,e,n){return new S(this,t,e,this.localKey(n))},t.hasManyBy=function(t,e,n){return new $(this,t,e,this.relation(t).localKey(n))},t.hasManyThrough=function(t,e,n,r,o,i){return new M(this,t,e,n,r,this.localKey(o),this.relation(e).localKey(i))},t.belongsToMany=function(t,e,n,r,o,i){return new K(this,t,e,n,r,this.localKey(o),this.relation(t).localKey(i))},t.morphTo=function(t,e){return new P(this,t,e)},t.morphOne=function(t,e,n,r){return new I(this,t,e,n,this.localKey(r))},t.morphMany=function(t,e,n,r){return new B(this,t,e,n,this.localKey(r))},t.morphToMany=function(t,e,n,r,o,i,s){return new q(this,t,e,n,r,o,this.localKey(i),this.relation(t).localKey(s))},t.morphedByMany=function(t,e,n,r,o,i,s){return new T(this,t,e,n,r,o,this.localKey(i),this.relation(t).localKey(s))},t.mutators=function(){return{}},t.database=function(){return h.database},t.store=function(){return this.database().store},t.namespace=function(t){return this.database().namespace+"/"+this.entity+"/"+t},t.getters=function(t){return this.store().getters[this.namespace(t)]},t.dispatch=function(t,e){return this.store().dispatch(this.namespace(t),e)},t.commit=function(t){this.store().commit(this.database().namespace+"/$mutate",{entity:this.entity,callback:t})},t.all=function(){return this.getters("all")()},t.find=function(t){return this.getters("find")(t)},t.findIn=function(t){return this.getters("findIn")(t)},t.query=function(){return this.getters("query")()},t.new=function(){return this.dispatch("new")},t.create=function(t){return this.dispatch("create",t)},t.insert=function(t){return this.dispatch("insert",t)},t.update=function(t){return this.dispatch("update",t)},t.insertOrUpdate=function(t){return this.dispatch("insertOrUpdate",t)},t.delete=function(t){return this.dispatch("delete",t)},t.deleteAll=function(){return this.dispatch("deleteAll")},t.id=function(t){var e=this.primaryKey;return"string"==typeof e?t[e]:e.map(function(e){return t[e]}).join("_")},t.localKey=function(t){return t||("string"==typeof this.primaryKey?this.primaryKey:"id")},t.relation=function(t){return"string"!=typeof t?t:this.database().model(t)},t.getAttributeClass=function(t){switch(t){case"increment":return C;default:throw Error('The attribute name "'+t+"\" doesn't exists.")}},t.getFieldsByAttribute=function(t){var e=this.getAttributeClass(t),n=this.fields();return Object.keys(n).reduce(function(t,r){var o=n[r];return o instanceof e&&(t[r]=o),t},{})},t.getIncrementFields=function(){return this.getFieldsByAttribute("increment")},t.hasIncrementFields=function(){return Object.keys(this.getIncrementFields()).length>0},t.pivotFields=function(){var t=[];return w.forOwn(this.fields(),function(e,n){var r;(e instanceof K||e instanceof q||e instanceof T)&&t.push(((r={})[n]=e,r))}),t},t.hasPivotFields=function(){return this.pivotFields().length>0},t.hydrate=function(t){return new this(t).$toJson()},t.prototype.$self=function(){return this.constructor},t.prototype.$fields=function(){return this.$self().getFields()},t.prototype.$store=function(){return this.$self().store()},t.prototype.$namespace=function(t){return this.$self().namespace(t)},t.prototype.$getters=function(t){return this.$self().getters(t)},t.prototype.$dispatch=function(t,e){return m(this,void 0,void 0,function(){return g(this,function(n){return[2,this.$self().dispatch(t,e)]})})},t.prototype.$all=function(){return this.$getters("all")()},t.prototype.$find=function(t){return this.$getters("find")(t)},t.prototype.$findIn=function(t){return this.$getters("findIn")(t)},t.prototype.$query=function(){return this.$getters("query")()},t.prototype.$create=function(t){return m(this,void 0,void 0,function(){return g(this,function(e){return[2,this.$dispatch("create",t)]})})},t.prototype.$insert=function(t){return m(this,void 0,void 0,function(){return g(this,function(e){return[2,this.$dispatch("insert",t)]})})},t.prototype.$update=function(t){return m(this,void 0,void 0,function(){return g(this,function(e){return Array.isArray(t)?[2,this.$dispatch("update",t)]:void 0!==t.where?[2,this.$dispatch("update",t)]:void 0===this.$self().id(t)?[2,this.$dispatch("update",{where:this.$id,data:t})]:[2,this.$dispatch("update",t)]})})},t.prototype.$insertOrUpdate=function(t){return m(this,void 0,void 0,function(){return g(this,function(e){return[2,this.$dispatch("insertOrUpdate",t)]})})},t.prototype.$save=function(){return m(this,void 0,void 0,function(){var t,e,n,r=this;return g(this,function(o){switch(o.label){case 0:return t=this.$self().getFields(),e=Object.keys(t).reduce(function(e,n){return t[n]instanceof O&&(e[n]=r[n]),e},{}),[4,this.$dispatch("insertOrUpdate",{data:e})];case 1:return n=o.sent(),this.$fill(n[this.$self().entity][0]),[2,this]}})})},t.prototype.$delete=function(t){return m(this,void 0,void 0,function(){return g(this,function(e){return t?[2,this.$dispatch("delete",t)]:null===this.$id?[2,null]:[2,this.$dispatch("delete",this.$id)]})})},t.prototype.$deleteAll=function(){return m(this,void 0,void 0,function(){return g(this,function(t){return[2,this.$dispatch("deleteAll")]})})},t.prototype.$fill=function(t){var e=this,n=t||{},r=this.$fields();Object.keys(r).forEach(function(t){var o=r[t],i=n[t];e[t]=o.make(i,n,t)}),void 0!==n.$id&&(this.$id=n.$id)},t.prototype.$toJson=function(){return U.serialize(this)},t.prototype.toJSON=function(){return this.$toJson()},t.primaryKey="id",t.state={},t}();function L(t){return!(!t||"function"!=typeof t.hasOwnProperty||!(t.hasOwnProperty("__ownerID")||t._map&&t._map.hasOwnProperty("__ownerID")))}function N(t,e,n){return Object.keys(t).reduce(function(e,r){var o=""+r;return e.has(o)?e.set(o,n(e.get(o),t[o])):e},e)}var H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},D=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},V=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),G=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},W=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},J=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},Q=function(t){return function(e){return L(e)?e.get(t):e[t]}},Y=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(D(this,t),!e||"string"!=typeof e)throw new Error("Expected a string key for Entity, but found "+e+".");var o=r.idAttribute,i=void 0===o?"id":o,s=r.mergeStrategy,a=void 0===s?function(t,e){return G({},t,e)}:s,u=r.processStrategy,c=void 0===u?function(t){return G({},t)}:u;this._key=e,this._getId="function"==typeof i?i:Q(i),this._idAttribute=i,this._mergeStrategy=a,this._processStrategy=c,this.define(n)}return t.prototype.define=function(t){this.schema=Object.keys(t).reduce(function(e,n){var r,o=t[n];return G({},e,((r={})[n]=o,r))},this.schema||{})},t.prototype.getId=function(t,e,n){return this._getId(t,e,n)},t.prototype.merge=function(t,e){return this._mergeStrategy(t,e)},t.prototype.normalize=function(t,e,n,r,o){var i=this,s=this._processStrategy(t,e,n);return Object.keys(this.schema).forEach(function(t){if(s.hasOwnProperty(t)&&"object"===H(s[t])){var e=i.schema[t];s[t]=r(s[t],s,t,e,o)}}),o(this,s,t,e,n),this.getId(t,e,n)},t.prototype.denormalize=function(t,e){var n=this;return L(t)?N(this.schema,t,e):(Object.keys(this.schema).forEach(function(r){if(t.hasOwnProperty(r)){var o=n.schema[r];t[r]=e(t[r],o)}}),t)},V(t,[{key:"key",get:function(){return this._key}},{key:"idAttribute",get:function(){return this._idAttribute}}]),t}(),X=function(){function t(e,n){D(this,t),n&&(this._schemaAttribute="string"==typeof n?function(t){return t[n]}:n),this.define(e)}return t.prototype.define=function(t){this.schema=t},t.prototype.getSchemaAttribute=function(t,e,n){return!this.isSingleSchema&&this._schemaAttribute(t,e,n)},t.prototype.inferSchema=function(t,e,n){if(this.isSingleSchema)return this.schema;var r=this.getSchemaAttribute(t,e,n);return this.schema[r]},t.prototype.normalizeValue=function(t,e,n,r,o){var i=this.inferSchema(t,e,n);if(!i)return t;var s=r(t,e,n,i,o);return this.isSingleSchema||null==s?s:{id:s,schema:this.getSchemaAttribute(t,e,n)}},t.prototype.denormalizeValue=function(t,e){var n=L(t)?t.get("schema"):t.schema;return this.isSingleSchema||n?e((L(t)?t.get("id"):t.id)||t,this.isSingleSchema?this.schema:this.schema[n]):t},V(t,[{key:"isSingleSchema",get:function(){return!this._schemaAttribute}}]),t}(),Z=function(t){function e(n,r){if(D(this,e),!r)throw new Error('Expected option "schemaAttribute" not found on UnionSchema.');return J(this,t.call(this,n,r))}return W(e,t),e.prototype.normalize=function(t,e,n,r,o){return this.normalizeValue(t,e,n,r,o)},e.prototype.denormalize=function(t,e){return this.denormalizeValue(t,e)},e}(X),tt=function(t){function e(){return D(this,e),J(this,t.apply(this,arguments))}return W(e,t),e.prototype.normalize=function(t,e,n,r,o){var i=this;return Object.keys(t).reduce(function(e,n,s){var a,u=t[n];return null!=u?G({},e,((a={})[n]=i.normalizeValue(u,t,n,r,o),a)):e},{})},e.prototype.denormalize=function(t,e){var n=this;return Object.keys(t).reduce(function(r,o){var i,s=t[o];return G({},r,((i={})[o]=n.denormalizeValue(s,e),i))},{})},e}(X),et=function(t){return Array.isArray(t)?t:Object.keys(t).map(function(e){return t[e]})},nt=function(t,e,n,r,o,i){return t=function(t){if(Array.isArray(t)&&t.length>1)throw new Error("Expected schema definition to be a single schema, but found "+t.length+".");return t[0]}(t),et(e).map(function(e,s){return o(e,n,r,t,i)})},rt=function(t){function e(){return D(this,e),J(this,t.apply(this,arguments))}return W(e,t),e.prototype.normalize=function(t,e,n,r,o){var i=this;return et(t).map(function(t,s){return i.normalizeValue(t,e,n,r,o)}).filter(function(t){return null!=t})},e.prototype.denormalize=function(t,e){var n=this;return t&&t.map?t.map(function(t){return n.denormalizeValue(t,e)}):t},e}(X),ot=function(t,e,n,r,o,i){var s=G({},e);return Object.keys(t).forEach(function(n){var r=t[n],a=o(e[n],e,n,r,i);null==a?delete s[n]:s[n]=a}),s},it=function(){function t(e){D(this,t),this.define(e)}return t.prototype.define=function(t){this.schema=Object.keys(t).reduce(function(e,n){var r,o=t[n];return G({},e,((r={})[n]=o,r))},this.schema||{})},t.prototype.normalize=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return ot.apply(void 0,[this.schema].concat(e))},t.prototype.denormalize=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t,e,n){if(L(e))return N(t,e,n);var r=G({},e);return Object.keys(t).forEach(function(e){r[e]&&(r[e]=n(r[e],t[e]))}),r}.apply(void 0,[this.schema].concat(e))},t}(),st={Array:rt,Entity:Y,Object:it,Union:Z,Values:tt},at=function(t,e){if(!t||"object"!==(void 0===t?"undefined":H(t)))throw new Error('Unexpected input given to normalize. Expected type to be "object", found "'+(void 0===t?"undefined":H(t))+'".');var n={},r=function(t){return function(e,n,r,o,i){var s=e.key,a=e.getId(r,o,i);s in t||(t[s]={});var u=t[s][a];t[s][a]=u?e.merge(u,n):n}}(n);return{entities:n,result:function t(e,n,r,o,i){return"object"===(void 0===e?"undefined":H(e))&&e?"object"!==(void 0===o?"undefined":H(o))||o.normalize&&"function"==typeof o.normalize?o.normalize(e,n,r,t,i):(Array.isArray(o)?nt:ot)(o,e,n,r,t,i):e}(t,t,null,e,r)}},ut=function(){function t(){}return t.process=function(t,e){if(w.isEmpty(e))return{};var n=t.database().schemas[t.model.entity],r=Array.isArray(e)?[n]:n;return at(e,r).entities},t}(),ct=function(){function t(){}return t.process=function(t,e){return Object.keys(e).forEach(function(n){var r=t.getModel(n);r.hasPivotFields()&&w.forOwn(r.pivotFields(),function(t){w.forOwn(t,function(t,n){t.createPivots(r,e,n)})})}),e},t}(),ft=function(){function t(){}return t.process=function(t,e){var n=this;return w.mapValues(e,function(e,r){var o=t.newQuery(r);return o.model.hasIncrementFields()?(n.processRecordsByFields(e,o),e):e})},t.processRecordsByFields=function(t,e){var n=this,r=e.model.getIncrementFields();w.forOwn(r,function(r,o){n.processRecords(t,e,o)})},t.processRecords=function(t,e,n){var r=this.max(t,e,n);w.forOwn(t,function(t){"number"!=typeof t[n]&&(t[n]=++r)})},t.max=function(t,e,n){var r=e.max(n),o=Math.max.apply(Math,w.map(t,function(t){var e=t[n];return"number"==typeof e?e:0}));return Math.max(o,r)},t}(),pt=function(){function t(){}return t.process=function(t,e){return w.forOwn(e,function(n,r){var o=t.getModel(r).fields();w.forOwn(n,function(t){w.forOwn(t,function(n,r){var i=o[r];i instanceof R&&i.attach(n,t,e)})})}),e},t}(),lt=function(){function t(){}return t.process=function(t,e){var n=this;return w.mapValues(e,function(e,r){var o=t.newQuery(r);return n.processRecords(e,o)})},t.processRecords=function(t,e){return Object.keys(t).reduce(function(n,r){var o=t[r],i=e.model.id(o),s=isNaN(i)?i:i.toString();return void 0===i||r===s?(n[r]=o,n):(n[s]=v({},o,{$id:i}),n)},{})},t}(),ht=function(){function t(){}return t.normalize=function(t,e){var n=ut.process(t,e);return n=ct.process(t,n),n=ft.process(t,n),n=pt.process(t,n),n=lt.process(t,n)},t}(),dt=function(){function t(){}return t.filter=function(t,e){var n=this;return 0===t.wheres.length?e:e.filter(function(e){return n.check(t,e)})},t.check=function(t,e){var n=w.groupBy(t.wheres,function(t){return t.boolean}),r=this.getComparator(t,e),o=[];return n.and&&o.push(n.and.every(r)),n.or&&o.push(n.or.some(r)),-1!==o.indexOf(!0)},t.getComparator=function(t,e){var n=this;return function(r){if("function"==typeof r.field){var o=new xt(t.rootState,t.entity),i=n.executeWhereClosure(o,e,r.field);if("boolean"==typeof i)return i;var s=o.get();return!w.isEmpty(s.filter(function(t){return t.$id===e.$id}))}return"function"==typeof r.value?r.value(e[r.field]):Array.isArray(r.value)?-1!==r.value.indexOf(e[r.field]):e[r.field]===r.value}},t.executeWhereClosure=function(t,e,n){if(3!==n.length)return n(e,t);var r=new t.model(e);return n(e,t,r)},t}(),yt=function(){function t(){}return t.filter=function(t,e){if(0===t.orders.length)return e;var n=t.orders.map(function(t){return t.field}),r=t.orders.map(function(t){return t.direction});return w.orderBy(e,n,r)},t}(),vt=function(){function t(){}return t.filter=function(t,e){return e.slice(t.offsetNumber,t.offsetNumber+t.limitNumber)},t}(),mt=function(){function t(){}return t.where=function(t,e){return dt.filter(t,e)},t.orderBy=function(t,e){return yt.filter(t,e)},t.limit=function(t,e){return vt.filter(t,e)},t}(),gt=function(){function t(){}return t.with=function(t,e,n){"*"!==e?this.parseWithRelations(t,e.split("."),n):this.withAll(t)},t.withAll=function(t,e){void 0===e&&(e=function(){return null});var n=t.model.getFields();for(var r in n)n[r]instanceof R&&this.with(t,r,e)},t.withAllRecursive=function(t,e){this.withAll(t,function(t){e>0&&t.withAllRecursive(e-1)})},t.setEagerLoad=function(t,e,n){void 0===n&&(n=null),t.load[e]||(t.load[e]=[]),n&&t.load[e].push(n)},t.parseWithRelations=function(t,e,n){var r=this,o=e[0];o.split("|").forEach(function(o){1!==e.length?r.setEagerLoad(t,o):r.setEagerLoad(t,o,n)}),1!==e.length&&(e.shift(),this.addNestedWiths(t,o,e,n))},t.addNestedWiths=function(t,e,n,r){this.setEagerLoad(t,e,function(t){t.with(n.join("."),r)})},t.eagerLoadRelations=function(t,e){var n=t.model.getFields();for(var r in t.load){var o=t.load[r],i=n[r];i instanceof R&&i.load(t,e,r,o)}},t}(),bt=function(){function t(){}return t.has=function(t,e,n,r){this.setHas(t,e,"exists",n,r)},t.hasNot=function(t,e,n,r){this.setHas(t,e,"doesntExist",n,r)},t.whereHas=function(t,e,n){this.setHas(t,e,"exists",void 0,void 0,n)},t.whereHasNot=function(t,e,n){this.setHas(t,e,"doesntExist",void 0,void 0,n)},t.setHas=function(t,e,n,r,o,i){void 0===r&&(r=">="),void 0===o&&(o=1),void 0===i&&(i=null),"number"!=typeof r?t.have.push({relation:e,type:n,operator:r,count:o,constraint:i}):t.have.push({relation:e,type:n,operator:">=",count:r,constraint:i})},t.applyConstraints=function(t){if(0!==t.have.length){var e=t.newQuery();this.addHasWhereConstraints(t,e),this.addHasConstraints(t,e.get())}},t.addHasWhereConstraints=function(t,e){t.have.forEach(function(t){e.with(t.relation,t.constraint)})},t.addHasConstraints=function(t,e){var n=this.getComparators(t),r=[];e.forEach(function(t){n.every(function(e){return e(t)})&&r.push(t.$id)}),t.whereIdIn(r)},t.getComparators=function(t){var e=this;return t.have.map(function(t){return e.getComparator(t)})},t.getComparator=function(t){var e=this,n=this.getCountComparator(t.operator);return function(r){var o=e.getRelationshipCount(r[t.relation]),i=n(o,t.count);return"exists"===t.type?i:!i}},t.getRelationshipCount=function(t){return Array.isArray(t)?t.length:t?1:0},t.getCountComparator=function(t){switch(t){case"=":return function(t,e){return t===e};case">":return function(t,e){return t>e};case">=":return function(t,e){return t>=e};case"<":return function(t,e){return t>0&&t<e};case"<=":return function(t,e){return t>0&&t<=e};default:return function(t,e){return t===e}}},t}(),wt=function(){function t(t){this.indexToBeDeleted=[],this.query=t}return t.on=function(t,e,n){void 0===n&&(n=!1);var r=this.lastHookId+1;return this.lastHookId=r,this.hooks[t]||(this.hooks[t]=[]),this.hooks[t].push({callback:e,once:n,uid:r}),r},t.off=function(t){var e=this,n=!1;return Object.keys(this.hooks).some(function(r){var o=e.hooks[r],i=o.findIndex(function(e){return e.uid===t});return-1!==i&&(o.splice(i,1),n=!0),n}),n},t.prototype.self=function(){return this.constructor},t.prototype.getHook=function(t){return this.query.model[t]||null},t.prototype.getGlobalHook=function(t){return this.self().hooks[t]||null},t.prototype.has=function(t){return!!this.getHook(t)||!!this.getGlobalHook(t)},t.prototype.executeSelectHook=function(t,e){return this.has(t)?(e=this.executeLocalSelectHook(t,e),e=this.executeGlobalSelectHook(t,e)):e},t.prototype.executeLocalSelectHook=function(t,e){var n=this.getHook(t);return n?n(e,this.query.entity):e},t.prototype.executeGlobalSelectHook=function(t,e){var n=this,r=this.getGlobalHook(t);if(!r)return e;var o=[];return r.forEach(function(t,r){var i=t.callback,s=t.once;e=i.call(n.query,e,n.query.entity),s&&o.push(r)}),o.reverse().forEach(function(t){r.splice(t,1)}),e},t.prototype.executeMutationHookOnRecords=function(t,e){var n=this;this.has(t)&&(Object.keys(e).forEach(function(r){!1===n.executeMutationHook(t,e[r])&&delete e[r]}),this.removeGlobalHook(t))},t.prototype.executeMutationHook=function(t,e){return!1!==this.executeLocalMutationHook(t,e)&&(!1!==this.executeGlobalMutationHook(t,e)&&void 0)},t.prototype.executeLocalMutationHook=function(t,e){var n=this.getHook(t);if(n)return n(e,this.query.entity)},t.prototype.executeGlobalMutationHook=function(t,e){var n=this,r=this.getGlobalHook(t);if(r){var o=[];return r.forEach(function(t,r){o.push(t.callback.call(n.query,e,n.query.entity)),t.once&&n.indexToBeDeleted.push(r)}),!o.includes(!1)&&void 0}},t.prototype.removeGlobalHook=function(t){var e=this.getGlobalHook(t);e&&this.indexToBeDeleted.reverse().forEach(function(t){e.splice(t,1)})},t.hooks={},t.lastHookId=0,t}(),xt=function(){function t(t,e){this.idFilter=null,this.cancelIdFilter=!1,this.joinedIdFilter=null,this.wheres=[],this.have=[],this.orders=[],this.offsetNumber=0,this.limitNumber=Math.pow(2,53)-1,this.load={},this.rootState=t,this.state=t[e],this.entity=e,this.model=this.getModel(e),this.module=this.getModule(e),this.hook=new wt(this)}return t.database=function(){return h.database},t.getModel=function(t){return this.database().model(t)},t.getModels=function(){return this.database().models()},t.getModule=function(t){return this.database().module(t)},t.getModules=function(){return this.database().modules()},t.deleteAll=function(t){var e=this,n=this.getModels();w.forOwn(n,function(n,r){t[r]&&new e(t,r).deleteAll()})},t.on=function(t,e,n){return wt.on(t,e,n)},t.off=function(t){return wt.off(t)},t.prototype.self=function(){return this.constructor},t.prototype.newQuery=function(e){return e=e||this.entity,new t(this.rootState,e)},t.prototype.database=function(){return this.self().database()},t.prototype.getModel=function(t){var e=t||this.entity;return this.self().getModel(e)},t.prototype.getModels=function(){return this.self().getModels()},t.prototype.getModule=function(t){var e=t||this.entity;return this.self().getModule(e)},t.prototype.getModules=function(){return this.self().getModules()},t.prototype.all=function(){return this.get()},t.prototype.find=function(t){return this.item(this.state.data[t])},t.prototype.findIn=function(t){var e=this;return t.map(function(t){return e.state.data[t]}).filter(function(t){return t})},t.prototype.get=function(){var t=this.select();return this.collect(t)},t.prototype.first=function(){var t=this.select();return this.item(t[0])},t.prototype.last=function(){var t=this.select();return this.item(t[t.length-1])},t.prototype.where=function(t,e){return this.isIdfilterable(t)&&this.setIdFilter(e),this.wheres.push({field:t,value:e,boolean:"and"}),this},t.prototype.orWhere=function(t,e){return this.cancelIdFilter=!0,this.wheres.push({field:t,value:e,boolean:"or"}),this},t.prototype.whereId=function(t){return this.where(this.model.primaryKey,t)},t.prototype.whereIdIn=function(t){return this.where(this.model.primaryKey,t)},t.prototype.whereFk=function(t,e){var n=Array.isArray(e)?e:[e];return t===this.model.primaryKey?(this.setJoinedIdFilter(n),this):(this.where(t,n),this)},t.prototype.isIdfilterable=function(t){return t===this.model.primaryKey&&!this.cancelIdFilter},t.prototype.setIdFilter=function(t){var e=this,n=Array.isArray(t)?t:[t];null!==this.idFilter?this.idFilter=new Set(n.filter(function(t){return e.idFilter.has(t)})):this.idFilter=new Set(n)},t.prototype.setJoinedIdFilter=function(t){var e=this;null!==this.joinedIdFilter?this.joinedIdFilter=new Set(t.filter(function(t){return e.joinedIdFilter.has(t)})):this.joinedIdFilter=new Set(t)},t.prototype.orderBy=function(t,e){return void 0===e&&(e="asc"),this.orders.push({field:t,direction:e}),this},t.prototype.offset=function(t){return this.offsetNumber=t,this},t.prototype.limit=function(t){return this.limitNumber=t,this},t.prototype.with=function(t,e){return void 0===e&&(e=null),gt.with(this,t,e),this},t.prototype.withAll=function(){return gt.withAll(this),this},t.prototype.withAllRecursive=function(t){return void 0===t&&(t=3),gt.withAllRecursive(this,t),this},t.prototype.has=function(t,e,n){return bt.has(this,t,e,n),this},t.prototype.hasNot=function(t,e,n){return bt.hasNot(this,t,e,n),this},t.prototype.whereHas=function(t,e){return bt.whereHas(this,t,e),this},t.prototype.whereHasNot=function(t,e){return bt.whereHasNot(this,t,e),this},t.prototype.records=function(){var t=this;return this.finalizeIdFilter(),this.getIdsToLookup().map(function(e){var n=t.state.data[e];return n instanceof z?n:t.hydrate(n)})},t.prototype.finalizeIdFilter=function(){this.cancelIdFilter&&null!==this.idFilter&&(this.where(this.model.primaryKey,Array.from(this.idFilter.values())),this.idFilter=null)},t.prototype.getIdsToLookup=function(){var t=this;return this.idFilter&&this.joinedIdFilter?Array.from(this.idFilter.values()).filter(function(e){return t.joinedIdFilter.has(e)}):this.idFilter||this.joinedIdFilter?Array.from((this.idFilter||this.joinedIdFilter).values()):Object.keys(this.state.data)},t.prototype.select=function(){bt.applyConstraints(this);var t=this.records();return t=this.hook.executeSelectHook("beforeSelect",t),t=this.filterWhere(t),t=this.hook.executeSelectHook("afterWhere",t),t=this.filterOrderBy(t),t=this.hook.executeSelectHook("afterOrderBy",t),t=this.filterLimit(t),t=this.hook.executeSelectHook("afterLimit",t)},t.prototype.filterWhere=function(t){return mt.where(this,t)},t.prototype.filterOrderBy=function(t){return mt.orderBy(this,t)},t.prototype.filterLimit=function(t){return mt.limit(this,t)},t.prototype.count=function(){return this.get().length},t.prototype.max=function(t){var e=this.get().reduce(function(e,n){return"number"==typeof n[t]&&e.push(n[t]),e},[]);return 0===e.length?0:Math.max.apply(Math,e)},t.prototype.min=function(t){var e=this.get().reduce(function(e,n){return"number"==typeof n[t]&&e.push(n[t]),e},[]);return 0===e.length?0:Math.min.apply(Math,e)},t.prototype.sum=function(t){return this.get().reduce(function(e,n){return"number"==typeof n[t]&&(e+=n[t]),e},0)},t.prototype.item=function(t){if(!t)return null;if(Object.keys(this.load).length>0){t=new this.model(t);var e=this.hook.executeSelectHook("beforeRelations",[t]);t=e[0],gt.eagerLoadRelations(this,[t]),t=(e=this.hook.executeSelectHook("afterRelations",[t]))[0]}return t},t.prototype.collect=function(t){var e=this;return t.length<1?[]:(Object.keys(this.load).length>0&&(t=t.map(function(t){return new e.model(t)}),t=this.hook.executeSelectHook("beforeRelations",t),gt.eagerLoadRelations(this,t),t=this.hook.executeSelectHook("afterRelations",t)),t)},t.prototype.new=function(){var t=(new this.model).$toJson();return this.insert(t,{})[this.entity][0]},t.prototype.create=function(t,e){return this.persist(t,"create",e)},t.prototype.createMany=function(t){var e=this,n=this.hydrateMany(t);return this.commit("create",n,function(){e.state.data=n}),this.map(n)},t.prototype.insert=function(t,e){return this.persist(t,"insert",e)},t.prototype.insertMany=function(t){var e=this,n=this.hydrateMany(t);return this.commit("create",n,function(){e.state.data=v({},e.state.data,n)}),this.map(n)},t.prototype.update=function(t,e,n){if(Array.isArray(t))return this.persist(t,"update",n);if("function"==typeof t){if(!e)throw new Error("You must specify `where` to update records by specifying `data` as a closure.");return"function"==typeof e?this.updateByCondition(t,e):this.updateById(t,e)}if("function"==typeof e)return this.updateByCondition(t,e);if(!e)return this.persist(t,"update",n);if(Array.isArray(this.model.primaryKey))throw new Error("\n        You can't specify `where` value as `string` or `number` when you\n        have a composite key defined in your model. Please include composite\n        keys to the `data` fields.\n      ");return this.updateById(t,e)},t.prototype.updateMany=function(t){var e=this.combine(t);return this.commitUpdate(e)},t.prototype.updateById=function(t,e){var n;e="number"==typeof e?e.toString():e;var r=this.state.data[e];if(!r)return null;var o=((n={})[e]=this.processUpdate(t,r),n);return this.commitUpdate(o),o[e]},t.prototype.updateByCondition=function(t,e){var n=this,r=Object.keys(this.state.data).reduce(function(r,o){var i=n.state.data[o];return e(i)?(r[o]=n.processUpdate(t,i),r):r},{});return this.commitUpdate(r)},t.prototype.processUpdate=function(t,e){return"function"==typeof t?(t(e),e):this.hydrate(v({},e,t))},t.prototype.commitUpdate=function(t){var e=this;return t=this.updateIndexes(t),this.commit("update",t,function(){e.state.data=v({},e.state.data,t)}),this.map(t)},t.prototype.updateIndexes=function(t){var e=this;return Object.keys(t).reduce(function(t,n){var r=t[n],o=String(e.model.id(r));return n!==o&&(r.$id=o,t[o]=r,delete t[n]),t},t)},t.prototype.insertOrUpdate=function(t,e){return this.persist(t,"insertOrUpdate",e)},t.prototype.insertOrUpdateMany=function(t){var e=this,n={},r={};return Object.keys(t).forEach(function(o){var i=t[o];e.state.data[o]?r[o]=i:n[o]=i}),this.insertMany(n).concat(this.updateMany(r))},t.prototype.persist=function(t,e,n){var r=this;return t=this.normalize(t),w.isEmpty(t)?("create"===e&&(this.state.data={}),{}):Object.keys(t).reduce(function(o,i){var s=r.newQuery(i)[r.getPersistMethod(i,e,n)+"Many"](t[i]);return s.length>0&&(o[i]=s),o},{})},t.prototype.getPersistMethod=function(t,e,n){return n.create&&n.create.includes(t)?"create":n.insert&&n.insert.includes(t)?"insert":n.update&&n.update.includes(t)?"update":n.insertOrUpdate&&n.insertOrUpdate.includes(t)?"insertOrUpdate":e},t.prototype.delete=function(t){return"function"==typeof t?this.deleteByCondition(t):this.deleteById(t)},t.prototype.deleteById=function(t){var e;t="number"==typeof t?t.toString():t;var n=this.state.data[t];if(!n)return null;var r=((e={})[t]=n,e);return this.commitDelete(r)[0]},t.prototype.deleteByCondition=function(t){var e=this,n=Object.keys(this.state.data).reduce(function(n,r){var o=e.state.data[r];return t(o)?(n[r]=o,n):n},{});return this.commitDelete(n)},t.prototype.deleteAll=function(){var t=this.state.data;this.commitDelete(t)},t.prototype.commitDelete=function(t){var e=this;return this.commit("delete",t,function(){var n=Object.keys(t);e.state.data=Object.keys(e.state.data).reduce(function(t,r){return n.includes(r)||(t[r]=e.state.data[r]),t},{})}),this.map(t)},t.prototype.normalize=function(t){return ht.normalize(this,t)},t.prototype.hydrate=function(t){return new(0,this.model)(t)},t.prototype.hydrateMany=function(t){var e=this;return Object.keys(t).reduce(function(n,r){var o=t[r];return n[r]=e.hydrate(o),n},{})},t.prototype.combine=function(t){var e=this;return Object.keys(t).reduce(function(n,r){var o=e.state.data[r];if(!o)return n;var i=t[r];return n[r]=e.hydrate(v({},o,i)),n},{})},t.prototype.map=function(t){return Object.keys(t).map(function(e){return t[e]})},t.prototype.commit=function(t,e,n){var r=""+t.charAt(0).toUpperCase()+t.slice(1);this.hook.executeMutationHookOnRecords("before"+r,e),n(),this.hook.executeMutationHookOnRecords("after"+r,e)},t}(),Ot={query:function(t,e,n,r){return function(){return r[t.$connection+"/query"](t.$name)}},all:function(t,e,n,r){return function(){return r[t.$connection+"/all"](t.$name)}},find:function(t,e,n,r){return function(e){return r[t.$connection+"/find"](t.$name,e)}},findIn:function(t,e,n,r){return function(e){return r[t.$connection+"/findIn"](t.$name,e)}}},_t={new:function(t){var e=t.state,n=e.$name;return t.dispatch(e.$connection+"/new",{entity:n},{root:!0})},create:function(t,e){var n=t.state,r=n.$name;return t.dispatch(n.$connection+"/create",v({},e,{entity:r}),{root:!0})},insert:function(t,e){var n=t.state,r=n.$name;return t.dispatch(n.$connection+"/insert",v({},e,{entity:r}),{root:!0})},update:function(t,e){var n=t.state,r=n.$name;return Array.isArray(e)?t.dispatch(n.$connection+"/update",{entity:r,data:e},{root:!0}):void 0===e.data?t.dispatch(n.$connection+"/update",{entity:r,data:e},{root:!0}):t.dispatch(n.$connection+"/update",v({entity:r},e),{root:!0})},insertOrUpdate:function(t,e){var n=t.state,r=n.$name;return t.dispatch(n.$connection+"/insertOrUpdate",v({entity:r},e),{root:!0})},delete:function(t,e){var n=t.state,r=n.$name,o="object"==typeof e?e.where:e;return t.dispatch(n.$connection+"/delete",{entity:r,where:o},{root:!0})},deleteAll:function(t){var e=t.state,n=e.$name;return t.dispatch(e.$connection+"/deleteAll",{entity:n},{root:!0})}},Ct={query:function(t){return function(e){return new xt(t,e)}},all:function(t){return function(e){return new xt(t,e).all()}},find:function(t){return function(e,n){return new xt(t,e).find(n)}},findIn:function(t){return function(e,n){return new xt(t,e).findIn(n)}}},jt={new:function(t,e){var n={data:{}};return t.commit("new",v({},e,{result:n})),n.data},create:function(t,e){return m(this,void 0,void 0,function(){var n;return g(this,function(r){return n={data:{}},t.commit("create",v({},e,{result:n})),[2,n.data]})})},insert:function(t,e){return m(this,void 0,void 0,function(){var n;return g(this,function(r){return n={data:{}},t.commit("insert",v({},e,{result:n})),[2,n.data]})})},update:function(t,e){return m(this,void 0,void 0,function(){var n;return g(this,function(r){return n={data:{}},t.commit("update",v({},e,{result:n})),[2,n.data]})})},insertOrUpdate:function(t,e){return m(this,void 0,void 0,function(){var n;return g(this,function(r){return n={data:{}},t.commit("insertOrUpdate",v({},e,{result:n})),[2,n.data]})})},delete:function(t,e){return m(this,void 0,void 0,function(){var n;return g(this,function(r){return n={data:{}},t.commit("delete",v({},e,{result:n})),[2,n.data]})})},deleteAll:function(t,e){return m(this,void 0,void 0,function(){return g(this,function(n){return e&&e.entity?(t.commit("deleteAll",{entity:e.entity}),[2]):(t.commit("deleteAll"),[2])})})}},kt=function(){function t(){}return t.createPersistOptions=function(t){return{create:t.create,insert:t.insert,update:t.update,insertOrUpdate:t.insertOrUpdate}},t}(),Et={$mutate:function(t,e){e.callback(t[e.entity])},new:function(t,e){var n=e.entity;e.result.data=new xt(t,n).new()},create:function(t,e){var n=e.entity,r=e.data,o=kt.createPersistOptions(e);e.result.data=new xt(t,n).create(r,o)},insert:function(t,e){var n=e.entity,r=e.data,o=kt.createPersistOptions(e);e.result.data=new xt(t,n).insert(r,o)},update:function(t,e){var n=e.entity,r=e.data,o=e.where||null,i=kt.createPersistOptions(e);e.result.data=new xt(t,n).update(r,o,i)},insertOrUpdate:function(t,e){var n=e.entity,r=e.data,o=kt.createPersistOptions(e);e.result.data=new xt(t,n).insertOrUpdate(r,o)},delete:function(t,e){var n=e.entity,r=e.where;e.result.data=new xt(t,n).delete(r)},deleteAll:function(t,e){e&&e.entity?new xt(t,e.entity).deleteAll():xt.deleteAll(t)}};var Rt=function(){function t(){}return t.set=function(){this.value=""+this.prefix+this.count},t.get=function(){return this.value},t.increment=function(){return this.count++,this.set(),this.get()},t.count=0,t.prefix="_no_key_",t.value="",t}(),Ft=function(){function t(){}return t.create=function(t){return function(e,n,r){var o=t.id(e);return null==o||""===o?Rt.get():o}},t}(),At=function(){function t(){}return t.create=function(t){var e=this;return function(n,r,o){var i=e.getId(t,n);return v({},n,{$id:i})}},t.getId=function(t,e){var n=t.id(e);return null==n||""===n?Rt.increment():n},t}(),St=function(){function t(t){var e=this;this.schemas={},this.model=t;var n=t.database().models();Object.keys(n).forEach(function(t){e.one(n[t])})}return t.create=function(t){return new this(t).one()},t.prototype.one=function(t){if(t=t||this.model,this.schemas[t.entity])return this.schemas[t.entity];var e=new st.Entity(t.entity,{},{idAttribute:Ft.create(t),processStrategy:At.create(t)});this.schemas[t.entity]=e;var n=this.definition(t);return e.define(n),e},t.prototype.many=function(t){return new st.Array(this.one(t))},t.prototype.union=function(t){return new st.Union(this.schemas,t)},t.prototype.definition=function(t){var e=this,n=t.fields();return Object.keys(n).reduce(function(t,r){var o=n[r];return o instanceof R&&(t[r]=o.define(e)),t},{})},t}(),$t=function(){function t(){}return t.create=function(t,e,n){var r={namespaced:!0,state:{$name:t},getters:Ct,actions:jt,mutations:Et,modules:{}};return this.createModules(r,t,e,n)},t.createModules=function(t,e,n,r){var o=this;return Object.keys(r).forEach(function(i){var s=n[i],a=r[i];t.modules[i]={namespaced:!0},t.modules[i].state=o.createState(e,i,s,a),t.getters[i]=function(t,e,n,r){return function(){return e.query(i)}},t.modules[i].getters=v({},Ot,a.getters),t.modules[i].actions=v({},_t,a.actions),t.modules[i].mutations=a.mutations||{}}),t},t.createState=function(t,e,n,r){var o="function"==typeof n.state?n.state():n.state,i="function"==typeof r.state?r.state():r.state;return v({},o,i,{$connection:t,$name:e,data:{}})},t}(),Mt=function(){function t(){this.entities=[],this.schemas={}}return t.prototype.start=function(t,e){this.store=t,this.namespace=e,this.registerModules(),this.createSchema()},t.prototype.register=function(t,e){void 0===e&&(e={}),this.entities.push({name:t.entity,model:t,module:e})},t.prototype.model=function(t){return this.models()[t]},t.prototype.models=function(){return this.entities.reduce(function(t,e){return t[e.name]=e.model,t},{})},t.prototype.module=function(t){return this.modules()[t]},t.prototype.modules=function(){return this.entities.reduce(function(t,e){return t[e.name]=e.module,t},{})},t.prototype.registerModules=function(){var t=$t.create(this.namespace,this.models(),this.modules());this.store.registerModule(this.namespace,t)},t.prototype.createSchema=function(){var t=this;this.entities.forEach(function(e){t.schemas[e.name]=St.create(e.model)})},t}();const Kt={axios:void 0,baseURL:"http://localhost:3000",url:"/",method:"get",access_token:"",headers:{"Content-Type":"application/json",Accept:"application/json"},data:{},timeout:0,withCredentials:!1,responseType:"json",responseEncoding:"utf8",validateStatus:t=>t>=200&&t<300,maxRedirects:5,socketPath:null,proxy:{},onResponse:t=>t.data,onUnauthorised(t){},onNotFound(t){},onServerError(t){},onGenericError(t){},onValidationError(t){},onError(t){const{response:e}=t,n={401:this.onUnauthorised,404:this.onNotFound,422:this.onValidationError,500:this.onServerError};return e&&e.status in n?n[e.status](t):this.onGenericError(t),Promise.reject(t)}},Pt={database:new Mt,http:Kt},It={getters:{loading:t=>t.loading,errors:t=>t.errors},mutations:{onRequest(t){t.loading=!0,t.errors=[]},onError(t,e){t.loading=!1,t.errors=e.data},onSuccess(t){t.loading=!1,t.errors=[]}},state:{loading:!1,errors:[]}},Bt={http:Kt,methods:{$fetch:{name:"fetch",http:{url:"",method:"get"}},$get:{name:"get",http:{url:"/:id",method:"get"}},$create:{name:"create",alias:["insert"],http:{url:"",method:"post"}},$update:{name:"update",http:{url:"/:id",method:"put"}},$delete:{name:"delete",http:{url:"/:id",method:"delete"}}}};class qt{constructor(t,e){if(this.components=t,this.options=s()({},Pt,e),this.database=e.database,!e.database)throw new Error("database option is required to initialise!")}static setup(t,e){return this.instance=new qt(t,e),this.instance}static getInstance(){return this.instance}getModelFromState(t){return u()(this.database.entities,{name:t.$name}).model}}var Tt=n(68),Ut=n.n(Tt),zt=n(69),Lt=n.n(zt);class Nt{static transformModule(t){return s()({},It,t)}static transformModel(t){const e=qt.getInstance();return Bt.http=s()({},Bt.http,e.options.http),t.methodConf=s()({},Bt,t.methodConf),t.methodConf.http.url="/"===t.methodConf.http.url?`/${t.entity}`:t.methodConf.http.url,t.getFields=(()=>(t.cachedFields||(t.cachedFields=s()({},{$id:t.attr(void 0),$isUpdating:t.boolean(!1),$updateErrors:t.attr([]),$isDeleting:t.boolean(!1),$deleteErrors:t.attr([])},t.fields())),t.cachedFields)),t}static transformParams(t,e,n={}){let r=`${e.methodConf.http.url}${e.methodConf.methods[t].http.url}`;const i=o()(r.match(/(\/?)(\:)([A-z]*)/gm),t=>t.replace("/",""));return Ut()(i,t=>{const e=Lt()(n.params,t.replace(":",""))?n.params[t.replace(":","")]:"";r=r.replace(t,e).replace("//","/")}),n.query&&(r+=`?${Object.keys(n.query).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(n.query[t])}`).join("&")}`),r}static getMethod(t,e,n){const r=e.methodConf.methods[t].http.method;return r||n}}var Ht=n(70),Dt=n.n(Ht);class Vt{constructor(t){return this.instance=t.axios||Dt.a.create(t),this.setAuthentication(t.access_token),this.instance.interceptors.response.use(e=>t.onResponse(e,this.instance),e=>t.onError(e,this.instance)),this.instance}setAuthentication(t){if(!t)return;const e=typeof t?t():t;this.instance.defaults.headers.common.Authorization=`Bearer ${e}`}async head(t,e={}){return this.instance.head(t,e)}async get(t,e={}){return this.instance.get(t,e)}async post(t,e={},n={}){return this.instance.post(t,e,n)}async patch(t,e={},n={}){return this.instance.patch(t,e,n)}async put(t,e={},n={}){return this.instance.put(t,e,n)}async delete(t,e={}){return this.instance.delete(t,e)}}class Gt extends Nt{static async call({state:t,commit:e},n={}){const r=qt.getInstance().getModelFromState(t),o=Nt.transformParams("$fetch",r,n),i=new Vt(r.methodConf.http)[Nt.getMethod("$fetch",r,"get")](o);return this.onRequest(e),i.then(t=>this.onSuccess(e,r,t)).catch(t=>this.onError(e,t)),i}static onRequest(t){t("onRequest")}static onSuccess(t,e,n){t("onSuccess"),e.insertOrUpdate({data:n})}static onError(t,e){t("onError",e)}}class Wt extends Nt{static async call({state:t,commit:e},n={}){const r=qt.getInstance().getModelFromState(t),o=Nt.transformParams("$get",r,n),i=new Vt(r.methodConf.http)[Nt.getMethod("$get",r,"get")](o);return this.onRequest(e),i.then(t=>this.onSuccess(e,r,t)).catch(t=>this.onError(e,t)),i}static onRequest(t){t("onRequest")}static onSuccess(t,e,n){t("onSuccess"),e.insertOrUpdate({data:n})}static onError(t,e){t("onError",e)}}class Jt extends Nt{static async call({state:t,commit:e},n={}){if(!n.data||"object"!=typeof n)throw new TypeError("You must include a data object in the params to send a POST request",n);const r=qt.getInstance().getModelFromState(t),o=Nt.transformParams("$create",r,n),i=new Vt(r.methodConf.http)[Nt.getMethod("$create",r,"post")](o,n.data);return this.onRequest(e),i.then(t=>this.onSuccess(e,r,t)).catch(t=>this.onError(e,t)),i}static onRequest(t){t("onRequest")}static onSuccess(t,e,n){t("onSuccess"),e.insertOrUpdate({data:n})}static onError(t,e){t("onError",e)}}class Qt extends Nt{static async call({state:t,commit:e},n={}){if(!n.data||"object"!=typeof n)throw new TypeError("You must include a data object in the params to send a POST request",n);const r=qt.getInstance().getModelFromState(t),o=Nt.transformParams("$update",r,n),i=new Vt(r.methodConf.http)[Nt.getMethod("$update",r,"put")](o,n.data);return this.onRequest(r,n),i.then(t=>this.onSuccess(r,n,t)).catch(t=>this.onError(r,n,t)),i}static onRequest(t,e){t.update({where:e.params.id,data:{$isUpdating:!0,$updateErrors:[]}})}static onSuccess(t,e,n){t.update({where:e.params.id||n.id,data:s()({},n,{$isUpdating:!1,$updateErrors:[]})})}static onError(t,e,n){t.update({where:e.params.id,data:{$isUpdating:!1,$updateErrors:n}})}}class Yt extends Nt{static async call({state:t,commit:e},n={}){const r=qt.getInstance().getModelFromState(t),o=Nt.transformParams("$delete",r,n),i=new Vt(r.methodConf.http)[Nt.getMethod("$delete",r,"delete")](o);return this.onRequest(r,n),i.then(t=>this.onSuccess(r,n,t)).catch(t=>this.onError(r,n,t)),i}static onRequest(t,e){t.update({where:e.params.id,data:{$isDeleting:!0,$deleteErrors:[]}})}static onSuccess(t,e,n){t.delete({where:e.params.id||n.id})}static onError(t,e,n){t.update({where:e.params.id,data:{$isDeleting:!1,$deleteErrors:n}})}}class Xt{constructor(t,e){qt.setup(t,e),this.setupActions(),this.setupModels()}setupActions(){const t=qt.getInstance();t.components.Actions.$fetch=Gt.call.bind(Gt),t.components.Actions.$get=Wt.call.bind(Wt),t.components.Actions.$create=Jt.call.bind(Jt),t.components.Actions.$update=Qt.call.bind(Qt),t.components.Actions.$delete=Yt.call.bind(Yt)}setupModels(){const t=qt.getInstance();o()(t.database.entities,t=>(t.module=Nt.transformModule(t.module),t.model=Nt.transformModel(t.model),t)),t.components.Model.$fetch=function(t={}){return this.dispatch("$fetch",t)},t.components.Model.$get=function(t={}){return this.dispatch("$get",t)},t.components.Model.$create=function(t={}){return this.dispatch("$create",t)},t.components.Model.$update=function(t={}){return this.dispatch("$update",t)},t.components.Model.$delete=function(t={}){return this.dispatch("$delete",t)}}}n.d(e,"default",function(){return Zt});class Zt{static install(t,e){return new Xt(t,e)}}}])});