directus-sdk-javascript
Advanced tools
Comparing version 2.4.0 to 2.5.1
@@ -1,1 +0,1 @@ | ||
"use strict";var bind=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}},isBuffer_1=function(e){return null!=e&&(isBuffer(e)||isSlowBuffer(e)||!!e._isBuffer)};function isBuffer(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function isSlowBuffer(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&isBuffer(e.slice(0,0))}var toString=Object.prototype.toString;function isArray(e){return"[object Array]"===toString.call(e)}function isArrayBuffer(e){return"[object ArrayBuffer]"===toString.call(e)}function isFormData(e){return"undefined"!=typeof FormData&&e instanceof FormData}function isArrayBufferView(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer}function isString(e){return"string"==typeof e}function isNumber(e){return"number"==typeof e}function isUndefined(e){return void 0===e}function isObject(e){return null!==e&&"object"==typeof e}function isDate(e){return"[object Date]"===toString.call(e)}function isFile(e){return"[object File]"===toString.call(e)}function isBlob(e){return"[object Blob]"===toString.call(e)}function isFunction(e){return"[object Function]"===toString.call(e)}function isStream(e){return isObject(e)&&isFunction(e.pipe)}function isURLSearchParams(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams}function trim(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function isStandardBrowserEnv(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function forEach(e,t){if(null!==e&&void 0!==e)if("object"==typeof e||isArray(e)||(e=[e]),isArray(e))for(var r=0,n=e.length;r<n;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 merge(){var e={};function t(t,r){"object"==typeof e[r]&&"object"==typeof t?e[r]=merge(e[r],t):e[r]=t}for(var r=0,n=arguments.length;r<n;r++)forEach(arguments[r],t);return e}function extend(e,t,r){return forEach(t,function(t,n){e[n]=r&&"function"==typeof t?bind(t,r):t}),e}var utils={isArray:isArray,isArrayBuffer:isArrayBuffer,isBuffer:isBuffer_1,isFormData:isFormData,isArrayBufferView:isArrayBufferView,isString:isString,isNumber:isNumber,isObject:isObject,isUndefined:isUndefined,isDate:isDate,isFile:isFile,isBlob:isBlob,isFunction:isFunction,isStream:isStream,isURLSearchParams:isURLSearchParams,isStandardBrowserEnv:isStandardBrowserEnv,forEach:forEach,merge:merge,extend:extend,trim:trim},normalizeHeaderName=function(e,t){utils.forEach(e,function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])})},enhanceError=function(e,t,r,n,a){return e.config=t,r&&(e.code=r),e.request=n,e.response=a,e},createError=function(e,t,r,n,a){var o=new Error(e);return enhanceError(o,t,r,n,a)},settle=function(e,t,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(createError("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)};function encode(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var buildURL=function(e,t,r){if(!t)return e;var n;if(r)n=r(t);else if(utils.isURLSearchParams(t))n=t.toString();else{var a=[];utils.forEach(t,function(e,t){null!==e&&void 0!==e&&(utils.isArray(e)&&(t+="[]"),utils.isArray(e)||(e=[e]),utils.forEach(e,function(e){utils.isDate(e)?e=e.toISOString():utils.isObject(e)&&(e=JSON.stringify(e)),a.push(encode(t)+"="+encode(e))}))}),n=a.join("&")}return n&&(e+=(-1===e.indexOf("?")?"?":"&")+n),e},parseHeaders=function(e){var t,r,n,a={};return e?(utils.forEach(e.split("\n"),function(e){n=e.indexOf(":"),t=utils.trim(e.substr(0,n)).toLowerCase(),r=utils.trim(e.substr(n+1)),t&&(a[t]=a[t]?a[t]+", "+r:r)}),a):a},isURLSameOrigin=utils.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=n(window.location.href),function(t){var r=utils.isString(t)?n(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0},chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function E(){this.message="String contains an invalid character"}E.prototype=new Error,E.prototype.code=5,E.prototype.name="InvalidCharacterError";function btoa$1(e){for(var t,r,n=String(e),a="",o=0,i=chars;n.charAt(0|o)||(i="=",o%1);a+=i.charAt(63&t>>8-o%1*8)){if((r=n.charCodeAt(o+=.75))>255)throw new E;t=t<<8|r}return a}var btoa_1=btoa$1,cookies=utils.isStandardBrowserEnv()?{write:function(e,t,r,n,a,o){var i=[];i.push(e+"="+encodeURIComponent(t)),utils.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),utils.isString(n)&&i.push("path="+n),utils.isString(a)&&i.push("domain="+a),!0===o&&i.push("secure"),document.cookie=i.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},btoa="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||btoa_1,xhr=function(e){return new Promise(function(t,r){var n=e.data,a=e.headers;utils.isFormData(n)&&delete a["Content-Type"];var o=new XMLHttpRequest,i="onreadystatechange",s=!1;if("test"===process.env.NODE_ENV||"undefined"==typeof window||!window.XDomainRequest||"withCredentials"in o||isURLSameOrigin(e.url)||(o=new window.XDomainRequest,i="onload",s=!0,o.onprogress=function(){},o.ontimeout=function(){}),e.auth){var u=e.auth.username||"",l=e.auth.password||"";a.Authorization="Basic "+btoa(u+":"+l)}if(o.open(e.method.toUpperCase(),buildURL(e.url,e.params,e.paramsSerializer),!0),o.timeout=e.timeout,o[i]=function(){if(o&&(4===o.readyState||s)&&(0!==o.status||o.responseURL&&0===o.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in o?parseHeaders(o.getAllResponseHeaders()):null,a={data:e.responseType&&"text"!==e.responseType?o.response:o.responseText,status:1223===o.status?204:o.status,statusText:1223===o.status?"No Content":o.statusText,headers:n,config:e,request:o};settle(t,r,a),o=null}},o.onerror=function(){r(createError("Network Error",e,null,o)),o=null},o.ontimeout=function(){r(createError("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",o)),o=null},utils.isStandardBrowserEnv()){var c=cookies,f=(e.withCredentials||isURLSameOrigin(e.url))&&e.xsrfCookieName?c.read(e.xsrfCookieName):void 0;f&&(a[e.xsrfHeaderName]=f)}if("setRequestHeader"in o&&utils.forEach(a,function(e,t){void 0===n&&"content-type"===t.toLowerCase()?delete a[t]:o.setRequestHeader(t,e)}),e.withCredentials&&(o.withCredentials=!0),e.responseType)try{o.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&o.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&o.upload&&o.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){o&&(o.abort(),r(e),o=null)}),void 0===n&&(n=null),o.send(n)})},DEFAULT_CONTENT_TYPE={"Content-Type":"application/x-www-form-urlencoded"};function setContentTypeIfUnset(e,t){!utils.isUndefined(e)&&utils.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function getDefaultAdapter(){var e;return"undefined"!=typeof XMLHttpRequest?e=xhr:"undefined"!=typeof process&&(e=xhr),e}var defaults={adapter:getDefaultAdapter(),transformRequest:[function(e,t){return normalizeHeaderName(t,"Content-Type"),utils.isFormData(e)||utils.isArrayBuffer(e)||utils.isBuffer(e)||utils.isStream(e)||utils.isFile(e)||utils.isBlob(e)?e:utils.isArrayBufferView(e)?e.buffer:utils.isURLSearchParams(e)?(setContentTypeIfUnset(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):utils.isObject(e)?(setContentTypeIfUnset(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};defaults.headers={common:{Accept:"application/json, text/plain, */*"}},utils.forEach(["delete","get","head"],function(e){defaults.headers[e]={}}),utils.forEach(["post","put","patch"],function(e){defaults.headers[e]=utils.merge(DEFAULT_CONTENT_TYPE)});var defaults_1=defaults;function InterceptorManager(){this.handlers=[]}InterceptorManager.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},InterceptorManager.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},InterceptorManager.prototype.forEach=function(e){utils.forEach(this.handlers,function(t){null!==t&&e(t)})};var InterceptorManager_1=InterceptorManager,transformData=function(e,t,r){return utils.forEach(r,function(r){e=r(e,t)}),e},isCancel=function(e){return!(!e||!e.__CANCEL__)};function throwIfCancellationRequested(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var dispatchRequest=function(e){throwIfCancellationRequested(e),e.headers=e.headers||{},e.data=transformData(e.data,e.headers,e.transformRequest),e.headers=utils.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),utils.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]});return(e.adapter||defaults_1.adapter)(e).then(function(t){return throwIfCancellationRequested(e),t.data=transformData(t.data,t.headers,e.transformResponse),t},function(t){return isCancel(t)||(throwIfCancellationRequested(e),t&&t.response&&(t.response.data=transformData(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})},isAbsoluteURL=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)},combineURLs=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e};function Axios(e){this.defaults=e,this.interceptors={request:new InterceptorManager_1,response:new InterceptorManager_1}}Axios.prototype.request=function(e){"string"==typeof e&&(e=utils.merge({url:arguments[0]},arguments[1])),(e=utils.merge(defaults_1,this.defaults,{method:"get"},e)).method=e.method.toLowerCase(),e.baseURL&&!isAbsoluteURL(e.url)&&(e.url=combineURLs(e.baseURL,e.url));var t=[dispatchRequest,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)r=r.then(t.shift(),t.shift());return r},utils.forEach(["delete","get","head","options"],function(e){Axios.prototype[e]=function(t,r){return this.request(utils.merge(r||{},{method:e,url:t}))}}),utils.forEach(["post","put","patch"],function(e){Axios.prototype[e]=function(t,r,n){return this.request(utils.merge(n||{},{method:e,url:t,data:r}))}});var Axios_1=Axios;function Cancel(e){this.message=e}Cancel.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},Cancel.prototype.__CANCEL__=!0;var Cancel_1=Cancel;function CancelToken(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var r=this;e(function(e){r.reason||(r.reason=new Cancel_1(e),t(r.reason))})}CancelToken.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},CancelToken.source=function(){var e;return{token:new CancelToken(function(t){e=t}),cancel:e}};var CancelToken_1=CancelToken,spread=function(e){return function(t){return e.apply(null,t)}};function createInstance(e){var t=new Axios_1(e),r=bind(Axios_1.prototype.request,t);return utils.extend(r,Axios_1.prototype,t),utils.extend(r,t),r}var axios$2=createInstance(defaults_1);axios$2.Axios=Axios_1,axios$2.create=function(e){return createInstance(utils.merge(defaults_1,e))},axios$2.Cancel=Cancel_1,axios$2.CancelToken=CancelToken_1,axios$2.isCancel=isCancel,axios$2.all=function(e){return Promise.all(e)},axios$2.spread=spread;var axios_1=axios$2,default_1=axios$2;axios_1.default=default_1;var axios=axios_1;function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}var utils$3=createCommonjsModule(function(e,t){var r=Object.prototype.hasOwnProperty,n=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}();t.arrayToObject=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},t.merge=function(e,n,a){if(!n)return e;if("object"!=typeof n){if(Array.isArray(e))e.push(n);else{if("object"!=typeof e)return[e,n];(a.plainObjects||a.allowPrototypes||!r.call(Object.prototype,n))&&(e[n]=!0)}return e}if("object"!=typeof e)return[e].concat(n);var o=e;return Array.isArray(e)&&!Array.isArray(n)&&(o=t.arrayToObject(e,a)),Array.isArray(e)&&Array.isArray(n)?(n.forEach(function(n,o){r.call(e,o)?e[o]&&"object"==typeof e[o]?e[o]=t.merge(e[o],n,a):e.push(n):e[o]=n}),e):Object.keys(n).reduce(function(e,o){var i=n[o];return r.call(e,o)?e[o]=t.merge(e[o],i,a):e[o]=i,e},o)},t.assign=function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},t.decode=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},t.encode=function(e){if(0===e.length)return e;for(var t="string"==typeof e?e:String(e),r="",a=0;a<t.length;++a){var o=t.charCodeAt(a);45===o||46===o||95===o||126===o||o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122?r+=t.charAt(a):o<128?r+=n[o]:o<2048?r+=n[192|o>>6]+n[128|63&o]:o<55296||o>=57344?r+=n[224|o>>12]+n[128|o>>6&63]+n[128|63&o]:(a+=1,o=65536+((1023&o)<<10|1023&t.charCodeAt(a)),r+=n[240|o>>18]+n[128|o>>12&63]+n[128|o>>6&63]+n[128|63&o])}return r},t.compact=function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var a=t[n],o=a.obj[a.prop],i=Object.keys(o),s=0;s<i.length;++s){var u=i[s],l=o[u];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(t.push({obj:o,prop:u}),r.push(l))}return function(e){for(var t;e.length;){var r=e.pop();if(t=r.obj[r.prop],Array.isArray(t)){for(var n=[],a=0;a<t.length;++a)void 0!==t[a]&&n.push(t[a]);r.obj[r.prop]=n}}return t}(t)},t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.isBuffer=function(e){return null!==e&&void 0!==e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}}),replace=String.prototype.replace,percentTwenties=/%20/g,formats={default:"RFC3986",formatters:{RFC1738:function(e){return replace.call(e,percentTwenties,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"},arrayPrefixGenerators={brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},toISO=Date.prototype.toISOString,defaults$2={delimiter:"&",encode:!0,encoder:utils$3.encode,encodeValuesOnly:!1,serializeDate:function(e){return toISO.call(e)},skipNulls:!1,strictNullHandling:!1},stringify=function e(t,r,n,a,o,i,s,u,l,c,f,d){var p=t;if("function"==typeof s)p=s(r,p);else if(p instanceof Date)p=c(p);else if(null===p){if(a)return i&&!d?i(r,defaults$2.encoder):r;p=""}if("string"==typeof p||"number"==typeof p||"boolean"==typeof p||utils$3.isBuffer(p)){if(i){return[f(d?r:i(r,defaults$2.encoder))+"="+f(i(p,defaults$2.encoder))]}return[f(r)+"="+f(String(p))]}var h=[];if(void 0===p)return h;var v;if(Array.isArray(s))v=s;else{var m=Object.keys(p);v=u?m.sort(u):m}for(var g=0;g<v.length;++g){var y=v[g];o&&null===p[y]||(h=Array.isArray(p)?h.concat(e(p[y],n(r,y),n,a,o,i,s,u,l,c,f,d)):h.concat(e(p[y],r+(l?"."+y:"["+y+"]"),n,a,o,i,s,u,l,c,f,d)))}return h},stringify_1=function(e,t){var r=e,n=t?utils$3.assign({},t):{};if(null!==n.encoder&&void 0!==n.encoder&&"function"!=typeof n.encoder)throw new TypeError("Encoder has to be a function.");var a=void 0===n.delimiter?defaults$2.delimiter:n.delimiter,o="boolean"==typeof n.strictNullHandling?n.strictNullHandling:defaults$2.strictNullHandling,i="boolean"==typeof n.skipNulls?n.skipNulls:defaults$2.skipNulls,s="boolean"==typeof n.encode?n.encode:defaults$2.encode,u="function"==typeof n.encoder?n.encoder:defaults$2.encoder,l="function"==typeof n.sort?n.sort:null,c=void 0!==n.allowDots&&n.allowDots,f="function"==typeof n.serializeDate?n.serializeDate:defaults$2.serializeDate,d="boolean"==typeof n.encodeValuesOnly?n.encodeValuesOnly:defaults$2.encodeValuesOnly;if(void 0===n.format)n.format=formats.default;else if(!Object.prototype.hasOwnProperty.call(formats.formatters,n.format))throw new TypeError("Unknown format option provided.");var p,h,v=formats.formatters[n.format];"function"==typeof n.filter?r=(h=n.filter)("",r):Array.isArray(n.filter)&&(p=h=n.filter);var m=[];if("object"!=typeof r||null===r)return"";var g;g=n.arrayFormat in arrayPrefixGenerators?n.arrayFormat:"indices"in n?n.indices?"indices":"repeat":"indices";var y=arrayPrefixGenerators[g];p||(p=Object.keys(r)),l&&p.sort(l);for(var b=0;b<p.length;++b){var w=p[b];i&&null===r[w]||(m=m.concat(stringify(r[w],w,y,o,i,s?u:null,h,l,c,f,v,d)))}var k=m.join(a),P=!0===n.addQueryPrefix?"?":"";return k.length>0?P+k:""},has=Object.prototype.hasOwnProperty,defaults$3={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:utils$3.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},parseValues=function(e,t){for(var r={},n=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,a=t.parameterLimit===1/0?void 0:t.parameterLimit,o=n.split(t.delimiter,a),i=0;i<o.length;++i){var s,u,l=o[i],c=l.indexOf("]="),f=-1===c?l.indexOf("="):c+1;-1===f?(s=t.decoder(l,defaults$3.decoder),u=t.strictNullHandling?null:""):(s=t.decoder(l.slice(0,f),defaults$3.decoder),u=t.decoder(l.slice(f+1),defaults$3.decoder)),has.call(r,s)?r[s]=[].concat(r[s]).concat(u):r[s]=u}return r},parseObject=function(e,t,r){for(var n=t,a=e.length-1;a>=0;--a){var o,i=e[a];if("[]"===i)o=(o=[]).concat(n);else{o=r.plainObjects?Object.create(null):{};var s="["===i.charAt(0)&&"]"===i.charAt(i.length-1)?i.slice(1,-1):i,u=parseInt(s,10);!isNaN(u)&&i!==s&&String(u)===s&&u>=0&&r.parseArrays&&u<=r.arrayLimit?(o=[])[u]=n:o[s]=n}n=o}return n},parseKeys=function(e,t,r){if(e){var n=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,o=/(\[[^[\]]*])/.exec(n),i=o?n.slice(0,o.index):n,s=[];if(i){if(!r.plainObjects&&has.call(Object.prototype,i)&&!r.allowPrototypes)return;s.push(i)}for(var u=0;null!==(o=a.exec(n))&&u<r.depth;){if(u+=1,!r.plainObjects&&has.call(Object.prototype,o[1].slice(1,-1))&&!r.allowPrototypes)return;s.push(o[1])}return o&&s.push("["+n.slice(o.index)+"]"),parseObject(s,t,r)}},parse=function(e,t){var r=t?utils$3.assign({},t):{};if(null!==r.decoder&&void 0!==r.decoder&&"function"!=typeof r.decoder)throw new TypeError("Decoder has to be a function.");if(r.ignoreQueryPrefix=!0===r.ignoreQueryPrefix,r.delimiter="string"==typeof r.delimiter||utils$3.isRegExp(r.delimiter)?r.delimiter:defaults$3.delimiter,r.depth="number"==typeof r.depth?r.depth:defaults$3.depth,r.arrayLimit="number"==typeof r.arrayLimit?r.arrayLimit:defaults$3.arrayLimit,r.parseArrays=!1!==r.parseArrays,r.decoder="function"==typeof r.decoder?r.decoder:defaults$3.decoder,r.allowDots="boolean"==typeof r.allowDots?r.allowDots:defaults$3.allowDots,r.plainObjects="boolean"==typeof r.plainObjects?r.plainObjects:defaults$3.plainObjects,r.allowPrototypes="boolean"==typeof r.allowPrototypes?r.allowPrototypes:defaults$3.allowPrototypes,r.parameterLimit="number"==typeof r.parameterLimit?r.parameterLimit:defaults$3.parameterLimit,r.strictNullHandling="boolean"==typeof r.strictNullHandling?r.strictNullHandling:defaults$3.strictNullHandling,""===e||null===e||void 0===e)return r.plainObjects?Object.create(null):{};for(var n="string"==typeof e?parseValues(e,r):e,a=r.plainObjects?Object.create(null):{},o=Object.keys(n),i=0;i<o.length;++i){var s=o[i],u=parseKeys(s,n[s],r);a=utils$3.merge(a,u,r)}return utils$3.compact(a)},lib={formats:formats,parse:parse,stringify:stringify_1},asyncGenerator=function(){function e(e){this.value=e}function t(t){var r,n;function a(r,n){try{var i=t[r](n),s=i.value;s instanceof e?Promise.resolve(s.value).then(function(e){a("next",e)},function(e){a("throw",e)}):o(i.done?"return":"normal",i.value)}catch(e){o("throw",e)}}function o(e,t){switch(e){case"return":r.resolve({value:t,done:!0});break;case"throw":r.reject(t);break;default:r.resolve({value:t,done:!1})}(r=r.next)?a(r.key,r.arg):n=null}this._invoke=function(e,t){return new Promise(function(o,i){var s={key:e,arg:t,resolve:o,reject:i,next:null};n?n=n.next=s:(r=n=s,a(e,t))})},"function"!=typeof t.return&&(this.return=void 0)}return"function"==typeof Symbol&&Symbol.asyncIterator&&(t.prototype[Symbol.asyncIterator]=function(){return this}),t.prototype.next=function(e){return this._invoke("next",e)},t.prototype.throw=function(e){return this._invoke("throw",e)},t.prototype.return=function(e){return this._invoke("return",e)},{wrap:function(e){return function(){return new t(e.apply(this,arguments))}},await:function(t){return new e(t)}}}(),classCallCheck=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},createClass=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}}(),RemoteInstance=function(){function e(t){classCallCheck(this,e);var r=t.accessToken,n=t.url,a=t.headers;if(this.accessToken=r,this.headers=a||{},!n)throw new Error("No Directus URL provided");this.url=n}return createClass(e,[{key:"_get",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this._requestHeaders;return new Promise(function(a,o){axios.get(t.url+e,{params:r,headers:n,paramsSerializer:function(e){return lib.stringify(e,{arrayFormat:"brackets"})}}).then(function(e){return a(e.data)}).catch(function(e){return e.response&&e.response.data?o(e.response.data):o(e)})})}},{key:"_post",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this._requestHeaders;return new Promise(function(a,o){axios.post(t.url+e,r,{headers:n}).then(function(e){return a(e.data)}).catch(function(e){return e.response&&e.response.data?o(e.response.data):o(e)})})}},{key:"_put",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this._requestHeaders;return new Promise(function(a,o){axios.put(t.url+e,r,{headers:n}).then(function(e){return a(e.data)}).catch(function(e){return e.response&&e.response.data?o(e.response.data):o(e)})})}},{key:"_delete",value:function(e){var t=this,r=this._requestHeaders;return new Promise(function(n,a){axios.delete(t.url+e,{headers:r}).then(function(e){return n(e.data)}).catch(function(e){return e.response&&e.response.data?a(e.response.data):a(e)})})}},{key:"authenticate",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:requiredParam("email"),r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:requiredParam("password");return new Promise(function(n,a){e._post("auth/request-token",{email:t,password:r}).then(function(t){return t.success?(e.accessToken=t.data.token,n(t)):a(t)}).catch(function(e){return a(e)})})}},{key:"createItem",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:requiredParam("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._post("tables/"+e+"/rows",t)}},{key:"getItems",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:requiredParam("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._get("tables/"+e+"/rows",t)}},{key:"getItem",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:requiredParam("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:requiredParam("id"),r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._get("tables/"+e+"/rows/"+t,r)}},{key:"updateItem",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:requiredParam("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:requiredParam("id"),r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:requiredParam("data");return this._put("tables/"+e+"/rows/"+t,r)}},{key:"deleteItem",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:requiredParam("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:requiredParam("id");return this._delete("tables/"+e+"/rows/"+t)}},{key:"createBulk",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:requiredParam("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:requiredParam("data");if(!1===Array.isArray(t))throw new TypeError("Parameter data should be an array of objects");return this._post("tables/"+e+"/rows/bulk",{rows:t})}},{key:"updateBulk",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:requiredParam("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:requiredParam("data");if(!1===Array.isArray(t))throw new TypeError("Parameter data should be an array of objects");return this._put("tables/"+e+"/rows/bulk",{rows:t})}},{key:"deleteBulk",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:requiredParam("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:requiredParam("data");if(!1===Array.isArray(t))throw new TypeError("Parameter data should be an array of objects");return this._delete("tables/"+e+"/rows/bulk",{rows:t})}},{key:"createFile",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._post("files",e)}},{key:"getFiles",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._get("files",e)}},{key:"getFile",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:requiredParam("id");return this._get("files/"+e)}},{key:"updateFile",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:requiredParam("id"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:requiredParam("data");return this._put("files/"+e,t)}},{key:"createTable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:requiredParam("name");return this._post("tables",{name:e})}},{key:"getTables",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._get("tables",e)}},{key:"getTable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:requiredParam("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._get("tables/"+e,t)}},{key:"createColumn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:requiredParam("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._post("tables/"+e+"/columns",t)}},{key:"getColumns",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:requiredParam("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._get("tables/"+e+"/columns",t)}},{key:"getColumn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:requiredParam("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:requiredParam("column");return this._get("tables/"+e+"/columns/"+t)}},{key:"updateColumn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:requiredParam("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:requiredParam("column"),r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._put("tables/"+e+"/columns/"+t,r)}},{key:"deleteColumn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:requiredParam("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:requiredParam("column");return this._delete("tables/"+e+"/columns/"+t)}},{key:"createGroup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:requiredParam("name");return this._post("groups",{name:e})}},{key:"getGroups",value:function(){return this._get("groups")}},{key:"getGroup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:requiredParam("id");return this._get("groups/"+e)}},{key:"createPrivileges",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:requiredParam("id"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._post("privileges/"+e,t)}},{key:"getPrivileges",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:requiredParam("id");return this._get("privileges/"+e)}},{key:"getTablePrivileges",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:requiredParam("id"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:requiredParam("table");return this._get("privileges/"+e+"/"+t)}},{key:"updatePrivileges",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:requiredParam("id"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:requiredParam("table");return this._get("privileges/"+e+"/"+t)}},{key:"getPreferences",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:requiredParam("table");return this._get("tables/"+e+"/preferences")}},{key:"updatePreference",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:requiredParam("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._update("tables/"+e+"/preferences",t)}},{key:"getMessages",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._get("messages/rows",e)}},{key:"getMessage",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:requiredParam("id");return this._get("messages/rows/"+e)}},{key:"getActivity",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._get("activity",e)}},{key:"getBookmarks",value:function(){return this._get("bookmarks")}},{key:"getUserBookmarks",value:function(){return this._get("bookmarks/self")}},{key:"getBookmark",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:requiredParam("id");return this._get("bookmarks/"+e)}},{key:"createBookmark",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:requiredParam("data");return this._post("bookmarks",e)}},{key:"deleteBookmark",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:requiredParam("id");return this._delete("bookmarks/"+e)}},{key:"getSettings",value:function(){return this._get("settings")}},{key:"getSettingsByCollection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:requiredParam("name");return this._get("settings/"+e)}},{key:"updateSettings",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:requiredParam("name"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._put("settings/"+e,t)}},{key:"getUsers",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._get("users",e)}},{key:"getUser",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:requiredParam("id");return this._get("users/"+e)}},{key:"getHash",value:function(){arguments.length>0&&void 0!==arguments[0]?arguments[0]:requiredParam("string");var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._post("hash",e)}},{key:"getRandom",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._post("random",e)}},{key:"_requestHeaders",get:function(){var e=this.headers||{};return this.accessToken&&(e.Authorization="Bearer "+this.accessToken),e}}]),e}();function requiredParam(e){throw new Error("Missing parameter ["+e+"]")}var remote=RemoteInstance;module.exports=remote; | ||
var RemoteInstance=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=10)}([function(e,t,r){"use strict";var n=r(2),o=r(13),i=Object.prototype.toString;function a(e){return"[object Array]"===i.call(e)}function s(e){return null!==e&&"object"==typeof e}function u(e){return"[object Function]"===i.call(e)}function c(e,t){if(null!==e&&void 0!==e)if("object"==typeof e||a(e)||(e=[e]),a(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:a,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:o,isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isUndefined:function(e){return void 0===e},isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:u,isStream:function(e){return s(e)&&u(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:c,merge:function e(){var t={};function r(r,n){"object"==typeof t[n]&&"object"==typeof r?t[n]=e(t[n],r):t[n]=r}for(var n=0,o=arguments.length;n<o;n++)c(arguments[n],r);return t},extend:function(e,t,r){return c(t,function(t,o){e[o]=r&&"function"==typeof t?n(t,r):t}),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(e,t,r){"use strict";(function(t){var n=r(0),o=r(15),i={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s={adapter:function(){var e;return"undefined"!=typeof XMLHttpRequest?e=r(4):void 0!==t&&(e=r(4)),e}(),transformRequest:[function(e,t){return o(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)?(a(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};s.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],function(e){s.headers[e]={}}),n.forEach(["post","put","patch"],function(e){s.headers[e]=n.merge(i)}),e.exports=s}).call(t,r(3))},function(e,t,r){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},function(e,t){var r,n,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}var u,c=[],l=!1,f=-1;function d(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&p())}function p(){if(!l){var e=s(d);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}o.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];c.push(new h(e,t)),1!==c.length||l||s(p)};function h(e,t){this.fun=e,this.array=t}h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={};function v(){}o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,r){"use strict";(function(t){var n=r(0),o=r(16),i=r(18),a=r(19),s=r(20),u=r(5),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||r(21);e.exports=function(e){return new Promise(function(l,f){var d=e.data,p=e.headers;n.isFormData(d)&&delete p["Content-Type"];var h=new XMLHttpRequest,v="onreadystatechange",g=!1;if("test"===t.env.NODE_ENV||"undefined"==typeof window||!window.XDomainRequest||"withCredentials"in h||s(e.url)||(h=new window.XDomainRequest,v="onload",g=!0,h.onprogress=function(){},h.ontimeout=function(){}),e.auth){var y=e.auth.username||"",m=e.auth.password||"";p.Authorization="Basic "+c(y+":"+m)}if(h.open(e.method.toUpperCase(),i(e.url,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,h[v]=function(){if(h&&(4===h.readyState||g)&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var t="getAllResponseHeaders"in h?a(h.getAllResponseHeaders()):null,r={data:e.responseType&&"text"!==e.responseType?h.response:h.responseText,status:1223===h.status?204:h.status,statusText:1223===h.status?"No Content":h.statusText,headers:t,config:e,request:h};o(l,f,r),h=null}},h.onerror=function(){f(u("Network Error",e,null,h)),h=null},h.ontimeout=function(){f(u("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",h)),h=null},n.isStandardBrowserEnv()){var b=r(22),w=(e.withCredentials||s(e.url))&&e.xsrfCookieName?b.read(e.xsrfCookieName):void 0;w&&(p[e.xsrfHeaderName]=w)}if("setRequestHeader"in h&&n.forEach(p,function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete p[t]:h.setRequestHeader(t,e)}),e.withCredentials&&(h.withCredentials=!0),e.responseType)try{h.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){h&&(h.abort(),f(e),h=null)}),void 0===d&&(d=null),h.send(d)})}}).call(t,r(3))},function(e,t,r){"use strict";var n=r(17);e.exports=function(e,t,r,o,i){var a=new Error(e);return n(a,t,r,o,i)}},function(e,t,r){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,r){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,r){"use strict";var n=Object.prototype.hasOwnProperty,o=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}();t.arrayToObject=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},t.merge=function(e,r,o){if(!r)return e;if("object"!=typeof r){if(Array.isArray(e))e.push(r);else{if("object"!=typeof e)return[e,r];(o.plainObjects||o.allowPrototypes||!n.call(Object.prototype,r))&&(e[r]=!0)}return e}if("object"!=typeof e)return[e].concat(r);var i=e;return Array.isArray(e)&&!Array.isArray(r)&&(i=t.arrayToObject(e,o)),Array.isArray(e)&&Array.isArray(r)?(r.forEach(function(r,i){n.call(e,i)?e[i]&&"object"==typeof e[i]?e[i]=t.merge(e[i],r,o):e.push(r):e[i]=r}),e):Object.keys(r).reduce(function(e,i){var a=r[i];return n.call(e,i)?e[i]=t.merge(e[i],a,o):e[i]=a,e},i)},t.assign=function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},t.decode=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},t.encode=function(e){if(0===e.length)return e;for(var t="string"==typeof e?e:String(e),r="",n=0;n<t.length;++n){var i=t.charCodeAt(n);45===i||46===i||95===i||126===i||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?r+=t.charAt(n):i<128?r+=o[i]:i<2048?r+=o[192|i>>6]+o[128|63&i]:i<55296||i>=57344?r+=o[224|i>>12]+o[128|i>>6&63]+o[128|63&i]:(n+=1,i=65536+((1023&i)<<10|1023&t.charCodeAt(n)),r+=o[240|i>>18]+o[128|i>>12&63]+o[128|i>>6&63]+o[128|63&i])}return r},t.compact=function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],i=o.obj[o.prop],a=Object.keys(i),s=0;s<a.length;++s){var u=a[s],c=i[u];"object"==typeof c&&null!==c&&-1===r.indexOf(c)&&(t.push({obj:i,prop:u}),r.push(c))}return function(e){for(var t;e.length;){var r=e.pop();if(t=r.obj[r.prop],Array.isArray(t)){for(var n=[],o=0;o<t.length;++o)void 0!==t[o]&&n.push(t[o]);r.obj[r.prop]=n}}return t}(t)},t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.isBuffer=function(e){return null!==e&&void 0!==e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}},function(e,t,r){"use strict";var n=String.prototype.replace,o=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return n.call(e,o,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},function(e,t,r){function n(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)}}var o=r(11),i=r(30),a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var r=t.accessToken,n=t.url,o=t.headers;if(this.accessToken=r,this.headers=o||{},!n)throw new Error("No Directus URL provided");this.url=n}t=e,a=void 0,(r=[{key:"_get",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this._requestHeaders;return new Promise(function(a,s){o.get(t.url+e,{params:r,headers:n,paramsSerializer:function(e){return i.stringify(e,{arrayFormat:"brackets"})}}).then(function(e){return a(e.data)}).catch(function(e){return e.response&&e.response.data?s(e.response.data):s(e)})})}},{key:"_post",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this._requestHeaders;return new Promise(function(i,a){o.post(t.url+e,r,{headers:n}).then(function(e){return i(e.data)}).catch(function(e){return e.response&&e.response.data?a(e.response.data):a(e)})})}},{key:"_put",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this._requestHeaders;return new Promise(function(i,a){o.put(t.url+e,r,{headers:n}).then(function(e){return i(e.data)}).catch(function(e){return e.response&&e.response.data?a(e.response.data):a(e)})})}},{key:"_delete",value:function(e){var t=this,r=this._requestHeaders;return new Promise(function(n,i){o.delete(t.url+e,{headers:r}).then(function(e){return n(e.data)}).catch(function(e){return e.response&&e.response.data?i(e.response.data):i(e)})})}},{key:"authenticate",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("email"),r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("password");return new Promise(function(n,o){e._post("auth/request-token",{email:t,password:r}).then(function(t){return t.success?(e.accessToken=t.data.token,n(t)):o(t)}).catch(function(e){return o(e)})})}},{key:"createItem",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._post("tables/".concat(e,"/rows"),t)}},{key:"getItems",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._get("tables/".concat(e,"/rows"),t)}},{key:"getItem",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("id"),r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._get("tables/".concat(e,"/rows/").concat(t),r)}},{key:"updateItem",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("id"),r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s("data");return this._put("tables/".concat(e,"/rows/").concat(t),r)}},{key:"deleteItem",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("id");return this._delete("tables/".concat(e,"/rows/").concat(t))}},{key:"createBulk",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("data");if(!1===Array.isArray(t))throw new TypeError("Parameter data should be an array of objects");return this._post("tables/".concat(e,"/rows/bulk"),{rows:t})}},{key:"updateBulk",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("data");if(!1===Array.isArray(t))throw new TypeError("Parameter data should be an array of objects");return this._put("tables/".concat(e,"/rows/bulk"),{rows:t})}},{key:"deleteBulk",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("data");if(!1===Array.isArray(t))throw new TypeError("Parameter data should be an array of objects");return this._delete("tables/".concat(e,"/rows/bulk"),{rows:t})}},{key:"createFile",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._post("files",e)}},{key:"getFiles",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._get("files",e)}},{key:"getFile",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id");return this._get("files/".concat(e))}},{key:"updateFile",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("data");return this._put("files/".concat(e),t)}},{key:"createTable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("name");return this._post("tables",{name:e})}},{key:"getTables",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._get("tables",e)}},{key:"getTable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._get("tables/".concat(e),t)}},{key:"createColumn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._post("tables/".concat(e,"/columns"),t)}},{key:"getColumns",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._get("tables/".concat(e,"/columns"),t)}},{key:"getColumn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("column");return this._get("tables/".concat(e,"/columns/").concat(t))}},{key:"updateColumn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("column"),r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._put("tables/".concat(e,"/columns/").concat(t),r)}},{key:"deleteColumn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("column");return this._delete("tables/".concat(e,"/columns/").concat(t))}},{key:"createGroup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("name");return this._post("groups",{name:e})}},{key:"getGroups",value:function(){return this._get("groups")}},{key:"getGroup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id");return this._get("groups/".concat(e))}},{key:"createPrivileges",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._post("privileges/".concat(e),t)}},{key:"getPrivileges",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id");return this._get("privileges/".concat(e))}},{key:"getTablePrivileges",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("table");return this._get("privileges/".concat(e,"/").concat(t))}},{key:"updatePrivileges",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s("table");return this._get("privileges/".concat(e,"/").concat(t))}},{key:"getPreferences",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table");return this._get("tables/".concat(e,"/preferences"))}},{key:"updatePreference",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("table"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._update("tables/".concat(e,"/preferences"),t)}},{key:"getMessages",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._get("messages/rows",e)}},{key:"getMessage",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id");return this._get("messages/rows/".concat(e))}},{key:"getActivity",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._get("activity",e)}},{key:"getBookmarks",value:function(){return this._get("bookmarks")}},{key:"getUserBookmarks",value:function(){return this._get("bookmarks/self")}},{key:"getBookmark",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id");return this._get("bookmarks/".concat(e))}},{key:"createBookmark",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("data");return this._post("bookmarks",e)}},{key:"deleteBookmark",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id");return this._delete("bookmarks/".concat(e))}},{key:"getSettings",value:function(){return this._get("settings")}},{key:"getSettingsByCollection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("name");return this._get("settings/".concat(e))}},{key:"updateSettings",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("name"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._put("settings/".concat(e),t)}},{key:"getUsers",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._get("users",e)}},{key:"getUser",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("id");return this._get("users/".concat(e))}},{key:"getHash",value:function(){arguments.length>0&&void 0!==arguments[0]?arguments[0]:s("string");var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._post("hash",e)}},{key:"getRandom",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._post("random",e)}},{key:"_requestHeaders",get:function(){var e=this.headers||{};return this.accessToken&&(e.Authorization="Bearer "+this.accessToken),e}}])&&n(t.prototype,r),a&&n(t,a);var t,r,a;return e}();function s(e){throw new Error("Missing parameter [".concat(e,"]"))}e.exports=a},function(e,t,r){e.exports=r(12)},function(e,t,r){"use strict";var n=r(0),o=r(2),i=r(14),a=r(1);function s(e){var t=new i(e),r=o(i.prototype.request,t);return n.extend(r,i.prototype,t),n.extend(r,t),r}var u=s(a);u.Axios=i,u.create=function(e){return s(n.merge(a,e))},u.Cancel=r(7),u.CancelToken=r(28),u.isCancel=r(6),u.all=function(e){return Promise.all(e)},u.spread=r(29),e.exports=u,e.exports.default=u},function(e,t){e.exports=function(e){return null!=e&&(r(e)||(t=e,"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&r(t.slice(0,0)))||!!e._isBuffer);var t};function r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},function(e,t,r){"use strict";var n=r(1),o=r(0),i=r(23),a=r(24),s=r(26),u=r(27);function c(e){this.defaults=e,this.interceptors={request:new i,response:new i}}c.prototype.request=function(e){"string"==typeof e&&(e=o.merge({url:arguments[0]},arguments[1])),(e=o.merge(n,this.defaults,{method:"get"},e)).method=e.method.toLowerCase(),e.baseURL&&!s(e.url)&&(e.url=u(e.baseURL,e.url));var t=[a,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)r=r.then(t.shift(),t.shift());return r},o.forEach(["delete","get","head","options"],function(e){c.prototype[e]=function(t,r){return this.request(o.merge(r||{},{method:e,url:t}))}}),o.forEach(["post","put","patch"],function(e){c.prototype[e]=function(t,r,n){return this.request(o.merge(n||{},{method:e,url:t,data:r}))}}),e.exports=c},function(e,t,r){"use strict";var n=r(0);e.exports=function(e,t){n.forEach(e,function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])})}},function(e,t,r){"use strict";var n=r(5);e.exports=function(e,t,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},function(e,t,r){"use strict";e.exports=function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e}},function(e,t,r){"use strict";var n=r(0);function o(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var i;if(r)i=r(t);else if(n.isURLSearchParams(t))i=t.toString();else{var a=[];n.forEach(t,function(e,t){null!==e&&void 0!==e&&(n.isArray(e)&&(t+="[]"),n.isArray(e)||(e=[e]),n.forEach(e,function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),a.push(o(t)+"="+o(e))}))}),i=a.join("&")}return i&&(e+=(-1===e.indexOf("?")?"?":"&")+i),e}},function(e,t,r){"use strict";var n=r(0);e.exports=function(e){var t,r,o,i={};return e?(n.forEach(e.split("\n"),function(e){o=e.indexOf(":"),t=n.trim(e.substr(0,o)).toLowerCase(),r=n.trim(e.substr(o+1)),t&&(i[t]=i[t]?i[t]+", "+r:r)}),i):i}},function(e,t,r){"use strict";var n=r(0);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=o(window.location.href),function(t){var r=n.isString(t)?o(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},function(e,t,r){"use strict";var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function o(){this.message="String contains an invalid character"}o.prototype=new Error,o.prototype.code=5,o.prototype.name="InvalidCharacterError";e.exports=function(e){for(var t,r,i=String(e),a="",s=0,u=n;i.charAt(0|s)||(u="=",s%1);a+=u.charAt(63&t>>8-s%1*8)){if((r=i.charCodeAt(s+=.75))>255)throw new o;t=t<<8|r}return a}},function(e,t,r){"use strict";var n=r(0);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,o,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(o)&&s.push("path="+o),n.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,r){"use strict";var n=r(0);function o(){this.handlers=[]}o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){n.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=o},function(e,t,r){"use strict";var n=r(0),o=r(25),i=r(6),a=r(1);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){s(e),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),n.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]});return(e.adapter||a.adapter)(e).then(function(t){return s(e),t.data=o(t.data,t.headers,e.transformResponse),t},function(t){return i(t)||(s(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,r){"use strict";var n=r(0);e.exports=function(e,t,r){return n.forEach(r,function(r){e=r(e,t)}),e}},function(e,t,r){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,r){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,r){"use strict";var n=r(7);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var r=this;e(function(e){r.reason||(r.reason=new n(e),t(r.reason))})}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o(function(t){e=t}),cancel:e}},e.exports=o},function(e,t,r){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,r){"use strict";var n=r(31),o=r(32),i=r(9);e.exports={formats:i,parse:o,stringify:n}},function(e,t,r){"use strict";var n=r(8),o=r(9),i={brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},a=Date.prototype.toISOString,s={delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,serializeDate:function(e){return a.call(e)},skipNulls:!1,strictNullHandling:!1},u=function e(t,r,o,i,a,u,c,l,f,d,p,h){var v=t;if("function"==typeof c)v=c(r,v);else if(v instanceof Date)v=d(v);else if(null===v){if(i)return u&&!h?u(r,s.encoder):r;v=""}if("string"==typeof v||"number"==typeof v||"boolean"==typeof v||n.isBuffer(v)){if(u){return[p(h?r:u(r,s.encoder))+"="+p(u(v,s.encoder))]}return[p(r)+"="+p(String(v))]}var g=[];if(void 0===v)return g;var y;if(Array.isArray(c))y=c;else{var m=Object.keys(v);y=l?m.sort(l):m}for(var b=0;b<y.length;++b){var w=y[b];a&&null===v[w]||(g=Array.isArray(v)?g.concat(e(v[w],o(r,w),o,i,a,u,c,l,f,d,p,h)):g.concat(e(v[w],r+(f?"."+w:"["+w+"]"),o,i,a,u,c,l,f,d,p,h)))}return g};e.exports=function(e,t){var r=e,a=t?n.assign({},t):{};if(null!==a.encoder&&void 0!==a.encoder&&"function"!=typeof a.encoder)throw new TypeError("Encoder has to be a function.");var c=void 0===a.delimiter?s.delimiter:a.delimiter,l="boolean"==typeof a.strictNullHandling?a.strictNullHandling:s.strictNullHandling,f="boolean"==typeof a.skipNulls?a.skipNulls:s.skipNulls,d="boolean"==typeof a.encode?a.encode:s.encode,p="function"==typeof a.encoder?a.encoder:s.encoder,h="function"==typeof a.sort?a.sort:null,v=void 0!==a.allowDots&&a.allowDots,g="function"==typeof a.serializeDate?a.serializeDate:s.serializeDate,y="boolean"==typeof a.encodeValuesOnly?a.encodeValuesOnly:s.encodeValuesOnly;if(void 0===a.format)a.format=o.default;else if(!Object.prototype.hasOwnProperty.call(o.formatters,a.format))throw new TypeError("Unknown format option provided.");var m,b,w=o.formatters[a.format];"function"==typeof a.filter?r=(b=a.filter)("",r):Array.isArray(a.filter)&&(m=b=a.filter);var k=[];if("object"!=typeof r||null===r)return"";var x;x=a.arrayFormat in i?a.arrayFormat:"indices"in a?a.indices?"indices":"repeat":"indices";var j=i[x];m||(m=Object.keys(r)),h&&m.sort(h);for(var A=0;A<m.length;++A){var O=m[A];f&&null===r[O]||(k=k.concat(u(r[O],O,j,l,f,d?p:null,b,h,v,g,w,y)))}var _=k.join(c),T=!0===a.addQueryPrefix?"?":"";return _.length>0?T+_:""}},function(e,t,r){"use strict";var n=r(8),o=Object.prototype.hasOwnProperty,i={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:n.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},a=function(e,t,r){if(e){var n=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,a=/(\[[^[\]]*])/.exec(n),s=a?n.slice(0,a.index):n,u=[];if(s){if(!r.plainObjects&&o.call(Object.prototype,s)&&!r.allowPrototypes)return;u.push(s)}for(var c=0;null!==(a=i.exec(n))&&c<r.depth;){if(c+=1,!r.plainObjects&&o.call(Object.prototype,a[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(a[1])}return a&&u.push("["+n.slice(a.index)+"]"),function(e,t,r){for(var n=t,o=e.length-1;o>=0;--o){var i,a=e[o];if("[]"===a)i=(i=[]).concat(n);else{i=r.plainObjects?Object.create(null):{};var s="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,u=parseInt(s,10);!isNaN(u)&&a!==s&&String(u)===s&&u>=0&&r.parseArrays&&u<=r.arrayLimit?(i=[])[u]=n:i[s]=n}n=i}return n}(u,t,r)}};e.exports=function(e,t){var r=t?n.assign({},t):{};if(null!==r.decoder&&void 0!==r.decoder&&"function"!=typeof r.decoder)throw new TypeError("Decoder has to be a function.");if(r.ignoreQueryPrefix=!0===r.ignoreQueryPrefix,r.delimiter="string"==typeof r.delimiter||n.isRegExp(r.delimiter)?r.delimiter:i.delimiter,r.depth="number"==typeof r.depth?r.depth:i.depth,r.arrayLimit="number"==typeof r.arrayLimit?r.arrayLimit:i.arrayLimit,r.parseArrays=!1!==r.parseArrays,r.decoder="function"==typeof r.decoder?r.decoder:i.decoder,r.allowDots="boolean"==typeof r.allowDots?r.allowDots:i.allowDots,r.plainObjects="boolean"==typeof r.plainObjects?r.plainObjects:i.plainObjects,r.allowPrototypes="boolean"==typeof r.allowPrototypes?r.allowPrototypes:i.allowPrototypes,r.parameterLimit="number"==typeof r.parameterLimit?r.parameterLimit:i.parameterLimit,r.strictNullHandling="boolean"==typeof r.strictNullHandling?r.strictNullHandling:i.strictNullHandling,""===e||null===e||void 0===e)return r.plainObjects?Object.create(null):{};for(var s="string"==typeof e?function(e,t){for(var r={},n=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,a=t.parameterLimit===1/0?void 0:t.parameterLimit,s=n.split(t.delimiter,a),u=0;u<s.length;++u){var c,l,f=s[u],d=f.indexOf("]="),p=-1===d?f.indexOf("="):d+1;-1===p?(c=t.decoder(f,i.decoder),l=t.strictNullHandling?null:""):(c=t.decoder(f.slice(0,p),i.decoder),l=t.decoder(f.slice(p+1),i.decoder)),o.call(r,c)?r[c]=[].concat(r[c]).concat(l):r[c]=l}return r}(e,r):e,u=r.plainObjects?Object.create(null):{},c=Object.keys(s),l=0;l<c.length;++l){var f=c[l],d=a(f,s[f],r);u=n.merge(u,d,r)}return n.compact(u)}}]); |
{ | ||
"name": "directus-sdk-javascript", | ||
"version": "2.4.0", | ||
"version": "2.5.1", | ||
"description": "WIP - Directus SDK for JavaScript (Node and Browser)", | ||
"main": "dist/index.js", | ||
"scripts": { | ||
"build": "rollup -c", | ||
"version": "npm run build" | ||
"build": "webpack" | ||
}, | ||
@@ -34,10 +33,7 @@ "repository": { | ||
"devDependencies": { | ||
"babel-core": "^6.26.0", | ||
"babel-plugin-external-helpers": "^6.22.0", | ||
"babel-preset-es2015": "^6.24.1", | ||
"rollup": "^0.50.0", | ||
"rollup-plugin-babel": "^3.0.2", | ||
"rollup-plugin-commonjs": "^8.2.6", | ||
"rollup-plugin-node-resolve": "^3.0.0", | ||
"rollup-plugin-uglify": "^2.0.1", | ||
"@babel/core": "^7.0.0-beta.36", | ||
"@babel/preset-env": "^7.0.0-beta.36", | ||
"babel-loader": "^8.0.0-beta.0", | ||
"uglifyjs-webpack-plugin": "^1.1.6", | ||
"webpack": "^3.10.0", | ||
"xo": "^0.18.2" | ||
@@ -44,0 +40,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6
79435
8
298