UNPKG

datapackage

Version:

Utilities to work with Data Packages as defined on specs.frictionlessdata.io

7 lines 701 kB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.datapackage=t():e.datapackage=t()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var r={};return t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=173)}([function(e,t,r){function n(e){return"string"==typeof e||!a(e)&&o(e)&&i(e)==s}var i=r(7),a=r(1),o=r(4),s="[object String]";e.exports=n},function(e,t){var r=Array.isArray;e.exports=r},function(e,t,r){"use strict";var n=[""],i="undefined"!=typeof window;e.exports={ERROR:"tableschema.error",INFER_THRESHOLD:10,INFER_CONFIDENCE:.75,DEFAULT_FORMAT:"csv",DEFAULT_ENCODING:"utf-8",DEFAULT_FIELD_TYPE:"string",DEFAULT_FIELD_FORMAT:"default",DEFAULT_MISSING_VALUES:n,IS_BROWSER:i}},function(e,t,r){var n=r(117),i="object"==typeof self&&self&&self.Object===Object&&self,a=n||i||Function("return this")();e.exports=a},function(e,t){function r(e){return null!=e&&"object"==typeof e}e.exports=r},function(e,t,r){"use strict";function n(e){return"[object Array]"===A.call(e)}function i(e){return void 0===e}function a(e){return null!==e&&!i(e)&&null!==e.constructor&&!i(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function o(e){return"[object ArrayBuffer]"===A.call(e)}function s(e){return"undefined"!=typeof FormData&&e instanceof FormData}function c(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer}function l(e){return"string"==typeof e}function u(e){return"number"==typeof e}function p(e){return null!==e&&"object"==typeof e}function d(e){if("[object Object]"!==A.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function f(e){return"[object Date]"===A.call(e)}function h(e){return"[object File]"===A.call(e)}function m(e){return"[object Blob]"===A.call(e)}function y(e){return"[object Function]"===A.call(e)}function g(e){return p(e)&&y(e.pipe)}function v(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams}function b(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function w(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function _(e,t){if(null!==e&&void 0!==e)if("object"!=typeof e&&(e=[e]),n(e))for(var r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.call(null,e[a],a,e)}function x(){function e(e,r){d(t[r])&&d(e)?t[r]=x(t[r],e):d(e)?t[r]=x({},e):n(e)?t[r]=e.slice():t[r]=e}for(var t={},r=0,i=arguments.length;r<i;r++)_(arguments[r],e);return t}function T(e,t,r){return _(t,function(t,n){e[n]=r&&"function"==typeof t?S(t,r):t}),e}function k(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}var S=r(92),A=Object.prototype.toString;e.exports={isArray:n,isArrayBuffer:o,isBuffer:a,isFormData:s,isArrayBufferView:c,isString:l,isNumber:u,isObject:p,isPlainObject:d,isUndefined:i,isDate:f,isFile:h,isBlob:m,isFunction:y,isStream:g,isURLSearchParams:v,isStandardBrowserEnv:w,forEach:_,merge:x,extend:T,trim:b,stripBOM:k}},function(e,t){function r(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}e.exports=r},function(e,t,r){function n(e){return null==e?void 0===e?c:s:l&&l in Object(e)?a(e):o(e)}var i=r(18),a=r(244),o=r(278),s="[object Null]",c="[object Undefined]",l=i?i.toStringTag:void 0;e.exports=n},function(e,t){function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function i(e){if(u===setTimeout)return setTimeout(e,0);if((u===r||!u)&&setTimeout)return u=setTimeout,setTimeout(e,0);try{return u(e,0)}catch(t){try{return u.call(null,e,0)}catch(t){return u.call(this,e,0)}}}function a(e){if(p===clearTimeout)return clearTimeout(e);if((p===n||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function o(){m&&f&&(m=!1,f.length?h=f.concat(h):y=-1,h.length&&s())}function s(){if(!m){var e=i(o);m=!0;for(var t=h.length;t;){for(f=h,h=[];++y<t;)f&&f[y].run();y=-1,t=h.length}f=null,m=!1,a(e)}}function c(e,t){this.fun=e,this.array=t}function l(){}var u,p,d=e.exports={};!function(){try{u="function"==typeof setTimeout?setTimeout:r}catch(e){u=r}try{p="function"==typeof clearTimeout?clearTimeout:n}catch(e){p=n}}();var f,h=[],m=!1,y=-1;d.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];h.push(new c(e,t)),1!==h.length||m||i(s)},c.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=l,d.addListener=l,d.once=l,d.off=l,d.removeListener=l,d.removeAllListeners=l,d.emit=l,d.prependListener=l,d.prependOnceListener=l,d.listeners=function(e){return[]},d.binding=function(e){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(e){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},function(e,t){},function(e,t){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";var n=r(148),i=n.errors.DataPackageError,a=n.errors.TableSchemaError;e.exports={DataPackageError:i,TableSchemaError:a}},function(e,t,r){"use strict";(function(e){function n(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(e,t){if(n()<t)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=a.prototype):(null===e&&(e=new a(t)),e.length=t),e}function a(e,t,r){if(!(a.TYPED_ARRAY_SUPPORT||this instanceof a))return new a(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return l(this,e)}return o(this,e,t,r)}function o(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?d(e,t,r,n):"string"==typeof t?u(e,t,r):f(e,t)}function s(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function c(e,t,r,n){return s(t),t<=0?i(e,t):void 0!==r?"string"==typeof n?i(e,t).fill(r,n):i(e,t).fill(r):i(e,t)}function l(e,t){if(s(t),e=i(e,t<0?0:0|h(t)),!a.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function u(e,t,r){if("string"==typeof r&&""!==r||(r="utf8"),!a.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|y(t,r);e=i(e,n);var o=e.write(t,r);return o!==n&&(e=e.slice(0,o)),e}function p(e,t){var r=t.length<0?0:0|h(t.length);e=i(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function d(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n),a.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=a.prototype):e=p(e,t),e}function f(e,t){if(a.isBuffer(t)){var r=0|h(t.length);return e=i(e,r),0===e.length?e:(t.copy(e,0,0,r),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||$(t.length)?i(e,0):p(e,t);if("Buffer"===t.type&&X(t.data))return p(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function h(e){if(e>=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|e}function m(e){return+e!=e&&(e=0),a.alloc(+e)}function y(e,t){if(a.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return W(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return V(e).length;default:if(n)return W(e).length;t=(""+t).toLowerCase(),n=!0}}function g(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return D(this,t,r);case"utf8":case"utf-8":return M(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return j(this,t,r);case"base64":return O(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function v(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:w(e,t,r,n,i);if("number"==typeof t)return t&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):w(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function w(e,t,r,n,i){function a(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,s=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,c/=2,r/=2}var l;if(i){var u=-1;for(l=r;l<s;l++)if(a(e,l)===a(t,-1===u?0:l-u)){if(-1===u&&(u=l),l-u+1===c)return u*o}else-1!==u&&(l-=l-u),u=-1}else for(r+c>s&&(r=s-c),l=r;l>=0;l--){for(var p=!0,d=0;d<c;d++)if(a(e,l+d)!==a(t,d)){p=!1;break}if(p)return l}return-1}function _(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o<n;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[r+o]=s}return o}function x(e,t,r,n){return J(W(t,e.length-r),e,r,n)}function T(e,t,r,n){return J(H(t),e,r,n)}function k(e,t,r,n){return T(e,t,r,n)}function S(e,t,r,n){return J(V(t),e,r,n)}function A(e,t,r,n){return J(G(t,e.length-r),e,r,n)}function O(e,t,r){return 0===t&&r===e.length?K.fromByteArray(e):K.fromByteArray(e.slice(t,r))}function M(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var a=e[i],o=null,s=a>239?4:a>223?3:a>191?2:1;if(i+s<=r){var c,l,u,p;switch(s){case 1:a<128&&(o=a);break;case 2:c=e[i+1],128==(192&c)&&(p=(31&a)<<6|63&c)>127&&(o=p);break;case 3:c=e[i+1],l=e[i+2],128==(192&c)&&128==(192&l)&&(p=(15&a)<<12|(63&c)<<6|63&l)>2047&&(p<55296||p>57343)&&(o=p);break;case 4:c=e[i+1],l=e[i+2],u=e[i+3],128==(192&c)&&128==(192&l)&&128==(192&u)&&(p=(15&a)<<18|(63&c)<<12|(63&l)<<6|63&u)>65535&&p<1114112&&(o=p)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return E(n)}function E(e){var t=e.length;if(t<=Q)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=Q));return r}function I(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function j(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function D(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",a=t;a<r;++a)i+=B(e[a]);return i}function P(e,t,r){for(var n=e.slice(t,r),i="",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+256*n[a+1]);return i}function R(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,r,n,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function C(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-r,2);i<a;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function U(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-r,4);i<a;++i)e[r+i]=t>>>8*(n?i:3-i)&255}function q(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function F(e,t,r,n,i){return i||q(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(e,t,r,n,23,4),r+4}function L(e,t,r,n,i){return i||q(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(e,t,r,n,52,8),r+8}function Y(e){if(e=z(e).replace(ee,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function z(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function B(e){return e<16?"0"+e.toString(16):e.toString(16)}function W(e,t){t=t||1/0;for(var r,n=e.length,i=null,a=[],o=0;o<n;++o){if((r=e.charCodeAt(o))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function H(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function G(e,t){for(var r,n,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)r=e.charCodeAt(o),n=r>>8,i=r%256,a.push(i),a.push(n);return a}function V(e){return K.toByteArray(Y(e))}function J(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function $(e){return e!==e}/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh <http://feross.org> * @license MIT */ var K=r(174),Z=r(179),X=r(95);t.Buffer=a,t.SlowBuffer=m,t.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=n(),a.poolSize=8192,a._augment=function(e){return e.__proto__=a.prototype,e},a.from=function(e,t,r){return o(null,e,t,r)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(e,t,r){return c(null,e,t,r)},a.allocUnsafe=function(e){return l(null,e)},a.allocUnsafeSlow=function(e){return l(null,e)},a.isBuffer=function(e){return!(null==e||!e._isBuffer)},a.compare=function(e,t){if(!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!X(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=a.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var o=e[r];if(!a.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},a.byteLength=y,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)v(this,t,t+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},a.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},a.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?M(this,0,e):g.apply(this,arguments)},a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},a.prototype.compare=function(e,t,r,n,i){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var o=i-n,s=r-t,c=Math.min(o,s),l=this.slice(n,i),u=e.slice(t,r),p=0;p<c;++p)if(l[p]!==u[p]){o=l[p],s=u[p];break}return o<s?-1:s<o?1:0},a.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},a.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},a.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},a.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return _(this,e,t,r);case"utf8":case"utf-8":return x(this,e,t,r);case"ascii":return T(this,e,t,r);case"latin1":case"binary":return k(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;a.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n;if(a.TYPED_ARRAY_SUPPORT)n=this.subarray(e,t),n.__proto__=a.prototype;else{var i=t-e;n=new a(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},a.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||R(e,t,this.length);for(var n=this[e],i=1,a=0;++a<t&&(i*=256);)n+=this[e+a]*i;return n},a.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||R(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},a.prototype.readUInt8=function(e,t){return t||R(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return t||R(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return t||R(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||R(e,t,this.length);for(var n=this[e],i=1,a=0;++a<t&&(i*=256);)n+=this[e+a]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},a.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||R(e,t,this.length);for(var n=t,i=1,a=this[e+--n];n>0&&(i*=256);)a+=this[e+--n]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},a.prototype.readInt8=function(e,t){return t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){t||R(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(e,t){t||R(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(e,t){return t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return t||R(e,4,this.length),Z.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return t||R(e,4,this.length),Z.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return t||R(e,8,this.length),Z.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return t||R(e,8,this.length),Z.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t|=0,r|=0,!n){N(this,e,t,r,Math.pow(2,8*r)-1,0)}var i=1,a=0;for(this[t]=255&e;++a<r&&(i*=256);)this[t+a]=e/i&255;return t+r},a.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t|=0,r|=0,!n){N(this,e,t,r,Math.pow(2,8*r)-1,0)}var i=r-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+r},a.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,1,255,0),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):C(this,e,t,!0),t+2},a.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):C(this,e,t,!1),t+2},a.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):U(this,e,t,!0),t+4},a.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):U(this,e,t,!1),t+4},a.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);N(this,e,t,r,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a<r&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},a.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);N(this,e,t,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,1,127,-128),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):C(this,e,t,!0),t+2},a.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):C(this,e,t,!1),t+2},a.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):U(this,e,t,!0),t+4},a.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):U(this,e,t,!1),t+4},a.prototype.writeFloatLE=function(e,t,r){return F(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return F(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i,o=n-r;if(this===e&&r<t&&t<n)for(i=o-1;i>=0;--i)e[i+t]=this[i+r];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+o),t);return o},a.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{var s=a.isBuffer(e)?e:W(new a(e,n).toString()),c=s.length;for(o=0;o<r-t;++o)this[o+t]=s[o%c]}return this};var ee=/[^+\/0-9A-Za-z-_]/g}).call(t,r(10))},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},function(e,t,r){function n(e,t){var r=a(e,t);return i(r)?r:void 0}var i=r(210),a=r(245);e.exports=n},function(e,t,r){"use strict";function n(e){if(!(this instanceof n))return new n(e);l.call(this,e),u.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",i)}function i(){this.allowHalfOpen||this._writableState.ended||o.nextTick(a,this)}function a(e){e.end()}var o=r(46),s=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=n;var c=Object.create(r(23));c.inherits=r(13);var l=r(141),u=r(80);c.inherits(n,l);for(var p=s(u.prototype),d=0;d<p.length;d++){var f=p[d];n.prototype[f]||(n.prototype[f]=u.prototype[f])}Object.defineProperty(n.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(n.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),n.prototype._destroy=function(e,t){this.push(null),this.end(),o.nextTick(t,e)}},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=r(94).default||r(94),c=function(e){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];n(this,t);var a=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return a._errors=r,a}return a(t,e),o(t,[{key:"multiple",get:function(){return!!this._errors.length}},{key:"errors",get:function(){return this._errors}}]),t}(s),l=function(e){function t(){return n(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),t}(c);e.exports={DataPackageError:c,TableSchemaError:l}},function(e,t,r){"use strict";function n(e){"@babel/helpers - typeof";return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e){if(!("string"==typeof e||e instanceof String)){var t=n(e);throw null===e?t="null":"object"===t&&(t=e.constructor.name),new TypeError("Expected a string but received a ".concat(t))}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i,e.exports=t.default,e.exports.default=t.default},function(e,t,r){var n=r(3),i=n.Symbol;e.exports=i},function(e,t,r){function n(e,t,r,n){var o=!r;r||(r={});for(var s=-1,c=t.length;++s<c;){var l=t[s],u=n?n(r[l],e[l],l,r,e):void 0;void 0===u&&(u=e[l]),o?a(r,l,u):i(r,l,u)}return r}var i=r(30),a=r(104);e.exports=n},function(e,t,r){function n(e){return i(e,a|o)}var i=r(105),a=1,o=4;e.exports=n},function(e,t,r){"use strict";function n(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,r){function n(i,a){try{var o=t[i](a),s=o.value}catch(e){return void r(e)}if(!o.done)return Promise.resolve(s).then(function(e){n("next",e)},function(e){n("throw",e)});e(s)}return n("next")})}}function i(e){var t=!0,r=!1,n=void 0;try{for(var i,o=(e.fields||[])[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){a(i.value)}}catch(e){r=!0,n=e}finally{try{!t&&o.return&&o.return()}finally{if(r)throw n}}return e.missingValues||(e.missingValues=m.DEFAULT_MISSING_VALUES),e}function a(e){return e instanceof Object&&(e.type||(e.type=m.DEFAULT_FIELD_TYPE),e.format||(e.format=m.DEFAULT_FIELD_FORMAT)),e}function o(e){for(var t in y)e=e.split(t).join(y[t]);return e}function s(e){return e.startsWith("http")}var c=function(){var e=n(regeneratorRuntime.mark(function e(t){var r;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!d(t)){e.next=4;break}t=p(t),e.next=24;break;case 4:if(!s(t)){e.next=13;break}return e.next=7,u.get(t);case 7:if(r=e.sent,t=r.data,!(r.status>=400)){e.next=11;break}throw new h("Can't load descriptor at \""+t+'"');case 11:e.next=24;break;case 13:if(!m.IS_BROWSER){e.next=15;break}throw new h("Local paths are not supported in browser");case 15:return e.prev=15,e.next=18,new Promise(function(e,r){l.readFile(t,"utf-8",function(t,n){t&&r(t);try{e(JSON.parse(n))}catch(t){r(t)}})});case 18:t=e.sent,e.next=24;break;case 21:throw e.prev=21,e.t0=e.catch(15),new h("Can't load descriptor at \""+t+'"');case 24:return e.abrupt("return",t);case 25:case"end":return e.stop()}},e,this,[[15,21]])}));return function(t){return e.apply(this,arguments)}}(),l=r(9),u=r(22),p=r(20),d=r(25),f=r(16),h=f.TableSchemaError,m=r(2),y=Object.freeze({"%A":"dddd","%a":"ddd","%B":"MMMM","%b":"MMM","%c":"ddd MMM DD HH:mm:ss YYYY","%d":"DD","%f":"SSS","%H":"HH","%I":"hh","%j":"DDDD","%M":"mm","%m":"MM","%p":"A","%S":"ss","%U":"ww","%W":"ww","%w":"d","%X":"HH:mm:ss","%x":"MM/DD/YYYY","%Y":"YYYY","%y":"YY","%Z":"z","%z":"ZZ","%%":"%"});e.exports={retrieveDescriptor:c,expandSchemaDescriptor:i,expandFieldDescriptor:a,convertDatetimeFormatFromFDtoJS:o,isRemotePath:s}},function(e,t,r){e.exports=r(156)},function(e,t,r){(function(e){function r(e){return Array.isArray?Array.isArray(e):"[object Array]"===y(e)}function n(e){return"boolean"==typeof e}function i(e){return null===e}function a(e){return null==e}function o(e){return"number"==typeof e}function s(e){return"string"==typeof e}function c(e){return"symbol"==typeof e}function l(e){return void 0===e}function u(e){return"[object RegExp]"===y(e)}function p(e){return"object"==typeof e&&null!==e}function d(e){return"[object Date]"===y(e)}function f(e){return"[object Error]"===y(e)||e instanceof Error}function h(e){return"function"==typeof e}function m(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function y(e){return Object.prototype.toString.call(e)}t.isArray=r,t.isBoolean=n,t.isNull=i,t.isNullOrUndefined=a,t.isNumber=o,t.isString=s,t.isSymbol=c,t.isUndefined=l,t.isRegExp=u,t.isObject=p,t.isDate=d,t.isError=f,t.isFunction=h,t.isPrimitive=m,t.isBuffer=e.isBuffer}).call(t,r(12).Buffer)},function(e,t,r){function n(e){return null!=e&&a(e.length)&&!i(e)}var i=r(75),a=r(132);e.exports=n},function(e,t,r){function n(e){if(!o(e)||i(e)!=s)return!1;var t=a(e);if(null===t)return!0;var r=p.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&u.call(r)==d}var i=r(7),a=r(69),o=r(4),s="[object Object]",c=Function.prototype,l=Object.prototype,u=c.toString,p=l.hasOwnProperty,d=u.call(Object);e.exports=n},function(e,t,r){function n(e){return"symbol"==typeof e||a(e)&&i(e)==o}var i=r(7),a=r(4),o="[object Symbol]";e.exports=n},function(e,t,r){function n(e){return o(e)?i(e):a(e)}var i=r(103),a=r(213),o=r(24);e.exports=n},function(e,t,r){(function(e){!function(t,r){e.exports=r()}(0,function(){"use strict";function t(){return jn.apply(null,arguments)}function r(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function n(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function i(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}function a(e){return void 0===e}function o(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function s(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function c(e,t){var r,n=[];for(r=0;r<e.length;++r)n.push(t(e[r],r));return n}function l(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function u(e,t){for(var r in t)l(t,r)&&(e[r]=t[r]);return l(t,"toString")&&(e.toString=t.toString),l(t,"valueOf")&&(e.valueOf=t.valueOf),e}function p(e,t,r,n){return St(e,t,r,n,!0).utc()}function d(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function f(e){return null==e._pf&&(e._pf=d()),e._pf}function h(e){if(null==e._isValid){var t=f(e),r=Dn.call(t.parsedDateParts,function(e){return null!=e}),n=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r);if(e._strict&&(n=n&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return n;e._isValid=n}return e._isValid}function m(e){var t=p(NaN);return null!=e?u(f(t),e):f(t).userInvalidated=!0,t}function y(e,t){var r,n,i;if(a(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),a(t._i)||(e._i=t._i),a(t._f)||(e._f=t._f),a(t._l)||(e._l=t._l),a(t._strict)||(e._strict=t._strict),a(t._tzm)||(e._tzm=t._tzm),a(t._isUTC)||(e._isUTC=t._isUTC),a(t._offset)||(e._offset=t._offset),a(t._pf)||(e._pf=f(t)),a(t._locale)||(e._locale=t._locale),Pn.length>0)for(r=0;r<Pn.length;r++)n=Pn[r],i=t[n],a(i)||(e[n]=i);return e}function g(e){y(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===Rn&&(Rn=!0,t.updateOffset(this),Rn=!1)}function v(e){return e instanceof g||null!=e&&null!=e._isAMomentObject}function b(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function w(e){var t=+e,r=0;return 0!==t&&isFinite(t)&&(r=b(t)),r}function _(e,t,r){var n,i=Math.min(e.length,t.length),a=Math.abs(e.length-t.length),o=0;for(n=0;n<i;n++)(r&&e[n]!==t[n]||!r&&w(e[n])!==w(t[n]))&&o++;return o+a}function x(e){!1===t.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function T(e,r){var n=!0;return u(function(){if(null!=t.deprecationHandler&&t.deprecationHandler(null,e),n){for(var i,a=[],o=0;o<arguments.length;o++){if(i="","object"==typeof arguments[o]){i+="\n["+o+"] ";for(var s in arguments[0])i+=s+": "+arguments[0][s]+", ";i=i.slice(0,-2)}else i=arguments[o];a.push(i)}x(e+"\nArguments: "+Array.prototype.slice.call(a).join("")+"\n"+(new Error).stack),n=!1}return r.apply(this,arguments)},r)}function k(e,r){null!=t.deprecationHandler&&t.deprecationHandler(e,r),Nn[e]||(x(r),Nn[e]=!0)}function S(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function A(e){var t,r;for(r in e)t=e[r],S(t)?this[r]=t:this["_"+r]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function O(e,t){var r,i=u({},e);for(r in t)l(t,r)&&(n(e[r])&&n(t[r])?(i[r]={},u(i[r],e[r]),u(i[r],t[r])):null!=t[r]?i[r]=t[r]:delete i[r]);for(r in e)l(e,r)&&!l(t,r)&&n(e[r])&&(i[r]=u({},i[r]));return i}function M(e){null!=e&&this.set(e)}function E(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return S(n)?n.call(t,r):n}function I(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])}function j(){return this._invalidDate}function D(e){return this._ordinal.replace("%d",e)}function P(e,t,r,n){var i=this._relativeTime[r];return S(i)?i(e,t,r,n):i.replace(/%d/i,e)}function R(e,t){var r=this._relativeTime[e>0?"future":"past"];return S(r)?r(t):r.replace(/%s/i,t)}function N(e,t){var r=e.toLowerCase();Yn[r]=Yn[r+"s"]=Yn[t]=e}function C(e){return"string"==typeof e?Yn[e]||Yn[e.toLowerCase()]:void 0}function U(e){var t,r,n={};for(r in e)l(e,r)&&(t=C(r))&&(n[t]=e[r]);return n}function q(e,t){zn[e]=t}function F(e){var t=[];for(var r in e)t.push({unit:r,priority:zn[r]});return t.sort(function(e,t){return e.priority-t.priority}),t}function L(e,t,r){var n=""+Math.abs(e),i=t-n.length;return(e>=0?r?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+n}function Y(e,t,r,n){var i=n;"string"==typeof n&&(i=function(){return this[n]()}),e&&(Gn[e]=i),t&&(Gn[t[0]]=function(){return L(i.apply(this,arguments),t[1],t[2])}),r&&(Gn[r]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function z(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function B(e){var t,r,n=e.match(Bn);for(t=0,r=n.length;t<r;t++)Gn[n[t]]?n[t]=Gn[n[t]]:n[t]=z(n[t]);return function(t){var i,a="";for(i=0;i<r;i++)a+=S(n[i])?n[i].call(t,e):n[i];return a}}function W(e,t){return e.isValid()?(t=H(t,e.localeData()),Hn[t]=Hn[t]||B(t),Hn[t](e)):e.localeData().invalidDate()}function H(e,t){function r(e){return t.longDateFormat(e)||e}var n=5;for(Wn.lastIndex=0;n>=0&&Wn.test(e);)e=e.replace(Wn,r),Wn.lastIndex=0,n-=1;return e}function G(e,t,r){ui[e]=S(t)?t:function(e,n){return e&&r?r:t}}function V(e,t){return l(ui,e)?ui[e](t._strict,t._locale):new RegExp(J(e))}function J(e){return $(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,r,n,i){return t||r||n||i}))}function $(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function K(e,t){var r,n=t;for("string"==typeof e&&(e=[e]),o(t)&&(n=function(e,r){r[t]=w(e)}),r=0;r<e.length;r++)pi[e[r]]=n}function Z(e,t){K(e,function(e,r,n,i){n._w=n._w||{},t(e,n._w,n,i)})}function X(e,t,r){null!=t&&l(pi,e)&&pi[e](t,r._a,r,e)}function Q(e){return ee(e)?366:365}function ee(e){return e%4==0&&e%100!=0||e%400==0}function te(){return ee(this.year())}function re(e,r){return function(n){return null!=n?(ie(this,e,n),t.updateOffset(this,r),this):ne(this,e)}}function ne(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function ie(e,t,r){e.isValid()&&!isNaN(r)&&("FullYear"===t&&ee(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](r,e.month(),ce(r,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](r))}function ae(e){return e=C(e),S(this[e])?this[e]():this}function oe(e,t){if("object"==typeof e){e=U(e);for(var r=F(e),n=0;n<r.length;n++)this[r[n].unit](e[r[n].unit])}else if(e=C(e),S(this[e]))return this[e](t);return this}function se(e,t){return(e%t+t)%t}function ce(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=se(t,12);return e+=(t-r)/12,1===r?ee(e)?29:28:31-r%7%2}function le(e,t){return e?r(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Ti).test(t)?"format":"standalone"][e.month()]:r(this._months)?this._months:this._months.standalone}function ue(e,t){return e?r(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Ti.test(t)?"format":"standalone"][e.month()]:r(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function pe(e,t,r){var n,i,a,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)a=p([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(a,"").toLocaleLowerCase();return r?"MMM"===t?(i=_i.call(this._shortMonthsParse,o),-1!==i?i:null):(i=_i.call(this._longMonthsParse,o),-1!==i?i:null):"MMM"===t?-1!==(i=_i.call(this._shortMonthsParse,o))?i:(i=_i.call(this._longMonthsParse,o),-1!==i?i:null):-1!==(i=_i.call(this._longMonthsParse,o))?i:(i=_i.call(this._shortMonthsParse,o),-1!==i?i:null)}function de(e,t,r){var n,i,a;if(this._monthsParseExact)return pe.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(i=p([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),r||this._monthsParse[n]||(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[n]=new RegExp(a.replace(".",""),"i")),r&&"MMMM"===t&&this._longMonthsParse[n].test(e))return n;if(r&&"MMM"===t&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}}function fe(e,t){var r;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=w(t);else if(t=e.localeData().monthsParse(t),!o(t))return e;return r=Math.min(e.date(),ce(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,r),e}function he(e){return null!=e?(fe(this,e),t.updateOffset(this,!0),this):ne(this,"Month")}function me(){return ce(this.year(),this.month())}function ye(e){return this._monthsParseExact?(l(this,"_monthsRegex")||ve.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(l(this,"_monthsShortRegex")||(this._monthsShortRegex=Ai),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function ge(e){return this._monthsParseExact?(l(this,"_monthsRegex")||ve.call(this),e?this._monthsStrictRegex:this._monthsRegex):(l(this,"_monthsRegex")||(this._monthsRegex=Oi),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function ve(){function e(e,t){return t.length-e.length}var t,r,n=[],i=[],a=[];for(t=0;t<12;t++)r=p([2e3,t]),n.push(this.monthsShort(r,"")),i.push(this.months(r,"")),a.push(this.months(r,"")),a.push(this.monthsShort(r,""));for(n.sort(e),i.sort(e),a.sort(e),t=0;t<12;t++)n[t]=$(n[t]),i[t]=$(i[t]);for(t=0;t<24;t++)a[t]=$(a[t]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function be(e,t,r,n,i,a,o){var s;return e<100&&e>=0?(s=new Date(e+400,t,r,n,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,r,n,i,a,o),s}function we(e){var t;if(e<100&&e>=0){var r=Array.prototype.slice.call(arguments);r[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function _e(e,t,r){var n=7+t-r;return-(7+we(e,0,n).getUTCDay()-t)%7+n-1}function xe(e,t,r,n,i){var a,o,s=(7+r-n)%7,c=_e(e,n,i),l=1+7*(t-1)+s+c;return l<=0?(a=e-1,o=Q(a)+l):l>Q(e)?(a=e+1,o=l-Q(e)):(a=e,o=l),{year:a,dayOfYear:o}}function Te(e,t,r){var n,i,a=_e(e.year(),t,r),o=Math.floor((e.dayOfYear()-a-1)/7)+1;return o<1?(i=e.year()-1,n=o+ke(i,t,r)):o>ke(e.year(),t,r)?(n=o-ke(e.year(),t,r),i=e.year()+1):(i=e.year(),n=o),{week:n,year:i}}function ke(e,t,r){var n=_e(e,t,r),i=_e(e+1,t,r);return(Q(e)-n+i)/7}function Se(e){return Te(e,this._week.dow,this._week.doy).week}function Ae(){return this._week.dow}function Oe(){return this._week.doy}function Me(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Ee(e){var t=Te(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Ie(e,t){return"string"!=typeof e?e:isNaN(e)?(e=t.weekdaysParse(e),"number"==typeof e?e:null):parseInt(e,10)}function je(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function De(e,t){return e.slice(t,7).concat(e.slice(0,t))}function Pe(e,t){var n=r(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?De(n,this._week.dow):e?n[e.day()]:n}function Re(e){return!0===e?De(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Ne(e){return!0===e?De(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Ce(e,t,r){var n,i,a,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)a=p([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(a,"").toLocaleLowerCase();return r?"dddd"===t?(i=_i.call(this._weekdaysParse,o),-1!==i?i:null):"ddd"===t?(i=_i.call(this._shortWeekdaysParse,o),-1!==i?i:null):(i=_i.call(this._minWeekdaysParse,o),-1!==i?i:null):"dddd"===t?-1!==(i=_i.call(this._weekdaysParse,o))?i:-1!==(i=_i.call(this._shortWeekdaysParse,o))?i:(i=_i.call(this._minWeekdaysParse,o),-1!==i?i:null):"ddd"===t?-1!==(i=_i.call(this._shortWeekdaysParse,o))?i:-1!==(i=_i.call(this._weekdaysParse,o))?i:(i=_i.call(this._minWeekdaysParse,o),-1!==i?i:null):-1!==(i=_i.call(this._minWeekdaysParse,o))?i:-1!==(i=_i.call(this._weekdaysParse,o))?i:(i=_i.call(this._shortWeekdaysParse,o),-1!==i?i:null)}function Ue(e,t,r){var n,i,a;if(this._weekdaysParseExact)return Ce.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(i=p([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[n]=new RegExp(a.replace(".",""),"i")),r&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(r&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(r&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function qe(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=Ie(e,this.localeData()),this.add(e-t,"d")):t}function Fe(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Le(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=je(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Ye(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||We.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(l(this,"_weekdaysRegex")||(this._weekdaysRegex=Di),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function ze(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||We.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(l(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Pi),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Be(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||We.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(l(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ri),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function We(){function e(e,t){return t.length-e.length}var t,r,n,i,a,o=[],s=[],c=[],l=[];for(t=0;t<7;t++)r=p([2e3,1]).day(t),n=this.weekdaysMin(r,""),i=this.weekdaysShort(r,""),a=this.weekdays(r,""),o.push(n),s.push(i),c.push(a),l.push(n),l.push(i),l.push(a);for(o.sort(e),s.sort(e),c.sort(e),l.sort(e),t=0;t<7;t++)s[t]=$(s[t]),c[t]=$(c[t]),l[t]=$(l[t]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new Re