Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

@sanity/client

Package Overview
Dependencies
Maintainers
7
Versions
986
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sanity/client - npm Package Compare versions

Comparing version 0.112.0 to 0.113.0-alpha.f6d0f98d

4

lib/data/listen.js

@@ -10,5 +10,5 @@ 'use strict';

var EventSource = typeof window !== 'undefined' && window.EventSource ? window.EventSource // Native browser EventSource
: require('@sanity/eventsource' // Node.js, IE etc
: require('@sanity/eventsource'); // Node.js, IE etc
);var possibleOptions = ['includePreviousRevision', 'includeResult'];
var possibleOptions = ['includePreviousRevision', 'includeResult'];
var defaultOptions = {

@@ -15,0 +15,0 @@ includeResult: true

@@ -49,4 +49,3 @@ 'use strict';

validateObject('replace', props);
return this._set('set', { $: props } // eslint-disable-line id-length
);
return this._set('set', { $: props }); // eslint-disable-line id-length
},

@@ -53,0 +52,0 @@ inc: function inc(props) {

'use strict';
var debug = require('get-it/lib/middleware/debug');
var headers = require('get-it/lib/middleware/headers');
var retry = require('get-it/lib-node/middleware/retry');
var debug = require('get-it/lib-node/middleware/debug');
var headers = require('get-it/lib-node/middleware/headers');
var pkg = require('../../package.json');
var middleware = [debug({ verbose: true, namespace: 'sanity:client' }), headers({ 'User-Agent': pkg.name + ' ' + pkg.version })];
var middleware = [debug({ verbose: true, namespace: 'sanity:client' }), headers({ 'User-Agent': pkg.name + ' ' + pkg.version }), retry({ maxRetries: 3 })];
module.exports = middleware;

@@ -86,6 +86,6 @@ 'use strict';

}
}
});
// Merge http options and headers
);function mergeOptions() {
function mergeOptions() {
for (var _len = arguments.length, opts = Array(_len), _key = 0; _key < _len; _key++) {

@@ -92,0 +92,0 @@ opts[_key] = arguments[_key];

{
"name": "@sanity/client",
"version": "0.112.0",
"version": "0.113.0-alpha.f6d0f98d",
"description": "Client for retrieving data from Sanity",

@@ -24,7 +24,7 @@ "main": "lib/sanityClient.js",

"dependencies": {
"@sanity/eventsource": "^0.112.0",
"@sanity/generate-help-url": "^0.112.0",
"@sanity/observable": "^0.112.0",
"@sanity/eventsource": "^0.113.0-alpha.f6d0f98d",
"@sanity/generate-help-url": "^0.113.0-alpha.f6d0f98d",
"@sanity/observable": "^0.113.0-alpha.f6d0f98d",
"deep-assign": "^2.0.0",
"get-it": "^2.0.2",
"get-it": "^3.0.0",
"in-publish": "^2.0.0",

@@ -35,3 +35,3 @@ "make-error": "^1.3.0",

"devDependencies": {
"boxen": "^1.0.0",
"boxen": "^1.1.0",
"browserify": "^14.3.0",

@@ -41,4 +41,4 @@ "chalk": "^1.1.3",

"envify": "^4.0.0",
"eslint": "^3.19.0",
"eslint-config-sanity": "^2.1.4",
"eslint": "^4.6.1",
"eslint-config-sanity": "^3.0.1",
"gzip-size": "^3.0.0",

@@ -45,0 +45,0 @@ "hard-rejection": "^1.0.0",

@@ -1,2 +0,2 @@

!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.SanityClient=t()}}(function(){return function t(e,r,n){function o(s,a){if(!r[s]){if(!e[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[s]={exports:{}};e[s][0].call(l.exports,function(t){var r=e[s][1][t];return o(r||t)},l,l.exports,t,e,r,n)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;s<n.length;s++)o(n[s]);return o}({1:[function(t,e,r){"use strict";function n(t){this.client=t}function o(t){return t.filter(function(t){return"response"===t.type}).map(function(t){return t.body}).toPromise()}function i(t,e){return"undefined"!=typeof window&&e instanceof window.File?a({filename:!1===t.preserveFilename?void 0:e.name,contentType:e.type},t):t}var s=function(){function t(t,e){var r=[],n=!0,o=!1,i=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{!n&&a.return&&a.return()}finally{if(o)throw i}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=t("object-assign"),u=t("../http/queryString"),c=t("../validators");a(n.prototype,{upload:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};c.validateAssetType(t);var n=c.hasDataset(this.client.clientConfig),s="image"===t?"images":"files",a=i(r,e),u=a.id,l=a.label,f=a.filename,p=a.meta,h={id:u,label:l,filename:f,meta:p},d=this.client._requestObservable({method:"POST",timeout:a.timeout||0,uri:"/assets/"+s+"/"+n,headers:a.contentType?{"Content-Type":a.contentType}:{},query:h,body:e});return this.client.isPromiseAPI()?o(d):d},delete:function(t,e){var r=t,n=e;t._type&&(r=t._type.replace(/(^sanity\.|Asset$)/g,""),n=t._id);var o=c.hasDataset(this.client.clientConfig);c.validateAssetType(r),c.validateDocumentId("delete",n);var i="image"===r?"images":"files";return this.client.request({method:"DELETE",uri:"/assets/"+i+"/"+o+"/"+n})},getImageUrl:function(t,e){var r=t._ref||t;if("string"!=typeof r)throw new Error("getImageUrl() needs either an object with a _ref, or a string with an asset document ID");if(!/^image-[A-Za-z0-9]+-\d+x\d+-[a-z]{1,5}$/.test(r))throw new Error('Unsupported asset ID "'+r+'". URL generation only works for auto-generated IDs.');var n=r.split("-"),o=s(n,4),i=o[1],a=o[2],l=o[3];c.hasDataset(this.client.clientConfig);var f=this.client.clientConfig;return"https://cdn.sanity.io/images/"+f.projectId+"/"+f.dataset+"/"+i+"-"+a+"."+l+(e?u(e):"")}}),e.exports=n},{"../http/queryString":12,"../validators":21,"object-assign":42}],2:[function(t,e,r){"use strict";function n(t){this.client=t}t("object-assign")(n.prototype,{getLoginProviders:function(){return this.client.request({uri:"/auth/providers"})},logout:function(){return this.client.request({uri:"/auth/logout",method:"POST"})}}),e.exports=n},{"object-assign":42}],3:[function(t,e,r){"use strict";var n=t("@sanity/generate-help-url"),o=t("object-assign"),i=t("./validators"),s={apiHost:"https://api.sanity.io",useProjectHostname:!0,gradientMode:!1,isPromiseAPI:!0},a=["You are not using the Sanity CDN. That means your data is always fresh, but the CDN is faster and","cheaper. Think about it! For more info, see "+n("js-client-cdn-configuration")+".","To hide this warning, please set the `useCdn` option to either `true` or `false` when creating","the client."],u=function(){var t=!1;return function(){t||(console.warn(a.join(" ")),t=!0)}}();r.defaultConfig=s,r.initConfig=function(t,e){var r=o({},s,e,t),n=r.gradientMode,a=!n&&r.useProjectHostname;if("undefined"==typeof Promise)throw new Error("No native `Promise`-implementation found, polyfill needed");if(n&&!r.namespace)throw new Error("Configuration must contain `namespace` when running in gradient mode");if(a&&!r.projectId)throw new Error("Configuration must contain `projectId`");if(void 0===r.useCdn&&u(),a&&i.projectId(r.projectId),!n&&r.dataset&&i.dataset(r.dataset,r.gradientMode),r.isDefaultApi=r.apiHost===s.apiHost,r.useCdn=Boolean(r.useCdn)&&!r.token&&!r.withCredentials,r.gradientMode)r.url=r.apiHost,r.cdnUrl=r.apiHost;else{var c=r.apiHost.split("://",2),l=c[0],f=c[1],p=r.isDefaultApi?"apicdn.sanity.io":f;r.useProjectHostname?(r.url=l+"://"+r.projectId+"."+f+"/v1",r.cdnUrl=l+"://"+r.projectId+"."+p+"/v1"):(r.url=r.apiHost+"/v1",r.cdnUrl=r.url)}return r}},{"./validators":21,"@sanity/generate-help-url":52,"object-assign":42}],4:[function(t,e,r){"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=t("object-assign"),i=t("../validators"),s=t("../util/getSelection"),a=t("./encodeQueryString"),u=t("./transaction"),c=t("./patch"),l=t("./listen"),f=function(t,e){var r=void 0===t?e:t;return!1===t?void 0:r},p=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{returnIds:!0,returnDocuments:f(t.returnDocuments,!0),visibility:t.visibility||"sync"}},h=function(t){return"response"===t.type},d=function(t){return t.body},b=function(t){return t.toPromise()};e.exports={listen:l,getDataUrl:function(t,e){var r=this.clientConfig,n=r.gradientMode?r.namespace:i.hasDataset(r),o="/"+t+"/"+n,s=e?o+"/"+e:o;return(this.clientConfig.gradientMode?s:"/data"+s).replace(/\/($|\?)/,"$1")},fetch:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=!1===r.filterResponse?function(t){return t}:function(t){return t.result},o=this._dataRequest("query",{query:t,params:e}).map(n);return this.isPromiseAPI()?b(o):o},getDocument:function(t){var e={uri:this.getDataUrl("doc",t),json:!0},r=this._requestObservable(e).filter(h).map(function(t){return t.body.documents&&t.body.documents[0]});return this.isPromiseAPI()?b(r):r},create:function(t,e){return this._create(t,"create",e)},createIfNotExists:function(t,e){return i.requireDocumentId("createIfNotExists",t),this._create(t,"createIfNotExists",e)},createOrReplace:function(t,e){return i.requireDocumentId("createOrReplace",t),this._create(t,"createOrReplace",e)},patch:function(t,e){return new c(t,e,this)},delete:function(t,e){return this.dataRequest("mutate",{mutations:[{delete:s(t)}]},e)},mutate:function(t,e){var r=t instanceof c?t.serialize():t,n=Array.isArray(r)?r:[r];return this.dataRequest("mutate",{mutations:n},e)},transaction:function(t){return new u(t,this)},dataRequest:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this._dataRequest(t,e,r);return this.isPromiseAPI()?b(n):n},_dataRequest:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o="mutate"===t,i=!o&&a(e),s=!o&&i.length<1948,u=s?i:"",c=r.returnFirst,l=this.getDataUrl(t,u),f={method:s?"GET":"POST",uri:l,json:!0,body:s?void 0:e,query:o&&p(r)};return this._requestObservable(f).filter(h).map(d).map(function(t){if(!o)return t;var e=t.results||[];if(r.returnDocuments)return c?e[0]&&e[0].document:e.map(function(t){return t.document});var i=c?"documentId":"documentIds",s=c?e[0]&&e[0].id:e.map(function(t){return t.id});return n({transactionId:t.transactionId,results:e},i,s)})},_create:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n({},e,t),s=o({returnFirst:!0,returnDocuments:!0},r);return this.dataRequest("mutate",{mutations:[i]},s)}}},{"../util/getSelection":19,"../validators":21,"./encodeQueryString":5,"./listen":6,"./patch":7,"./transaction":8,"object-assign":42}],5:[function(t,e,r){"use strict";var n=encodeURIComponent;e.exports=function(t){var e=t.query,r=t.params,o=void 0===r?{}:r,i=t.options,s=void 0===i?{}:i,a=Object.keys(o).reduce(function(t,e){return t+"&"+n("$"+e)+"="+n(JSON.stringify(o[e]))},"?query="+n(e));return Object.keys(s).reduce(function(t,e){return s[e]?t+"&"+n(e)+"="+n(s[e]):t},a)}},{}],6:[function(t,e,r){"use strict";function n(t){try{var e=t.data&&JSON.parse(t.data)||{};return s({type:t.type},e)}catch(t){return t}}function o(t){if(t instanceof Error)return t;var e=n(t);return e instanceof Error?e:new Error(i(e))}function i(t){return t.error?t.error.description?t.error.description:"string"==typeof t.error?t.error:JSON.stringify(t.error,null,2):t.message||"Unknown listener error"}var s=t("object-assign"),a=t("@sanity/observable/minimal"),u=t("./encodeQueryString"),c=t("../util/pick"),l=t("../util/defaults"),f="undefined"!=typeof window&&window.EventSource?window.EventSource:t("@sanity/eventsource"),p=["includePreviousRevision","includeResult"],h={includeResult:!0};e.exports=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=l(r,h),s=c(i,p),d=u({query:t,params:e,options:s}),b=this.clientConfig,y=b.url,v=b.token,m=b.withCredentials,g=""+y+this.getDataUrl("listen",d),w=i.events?i.events:["mutation"],O=-1!==w.indexOf("reconnect"),j={};return(v||m)&&(j.withCredentials=!0),v&&(j.headers={Authorization:"Bearer "+v}),new a(function(t){function e(){c.readyState===f.CLOSED?t.complete():c.readyState===f.CONNECTING&&u()}function r(e){t.error(o(e))}function i(e){var r=n(e);return r instanceof Error?t.error(r):t.next(r)}function s(e){t.complete(),a()}function a(){w.forEach(function(t){return c.removeEventListener(t,i,!1)}),c.removeEventListener("error",e,!1),c.removeEventListener("channelError",r,!1),c.removeEventListener("disconnect",s,!1),c.close()}function u(){O&&t.next({type:"reconnect"})}var c=new f(g,j);return c.addEventListener("error",e,!1),c.addEventListener("channelError",r,!1),c.addEventListener("disconnect",s,!1),w.forEach(function(t){return c.addEventListener(t,i,!1)}),a})}},{"../util/defaults":18,"../util/pick":20,"./encodeQueryString":5,"@sanity/eventsource":50,"@sanity/observable/minimal":54,"object-assign":42}],7:[function(t,e,r){"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.selection=t,this.operations=s({},e),this.client=r}var i=t("deep-assign"),s=t("object-assign"),a=t("../util/getSelection"),u=t("../validators"),c=u.validateObject,l=u.validateInsert;s(o.prototype,{clone:function(){return new o(this.selection,s({},this.operations),this.client)},merge:function(t){return c("merge",t),this._assign("merge",i(this.operations.merge||{},t))},set:function(t){return this._assign("set",t)},diffMatchPatch:function(t){return c("diffMatchPatch",t),this._assign("diffMatchPatch",t)},unset:function(t){if(!Array.isArray(t))throw new Error("unset(attrs) takes an array of attributes to unset, non-array given");return this.operations=s({},this.operations,{unset:t}),this},setIfMissing:function(t){return this._assign("setIfMissing",t)},replace:function(t){return c("replace",t),this._set("set",{$:t})},inc:function(t){return this._assign("inc",t)},dec:function(t){return this._assign("dec",t)},insert:function(t,e,r){var o;return l(t,e,r),this._assign("insert",(o={},n(o,t,e),n(o,"items",r),o))},append:function(t,e){return this.insert("after",t+"[-1]",e)},prepend:function(t,e){return this.insert("before",t+"[0]",e)},splice:function(t,e,r,n){var o=void 0===r||-1===r,i=e<0?e-1:e,s=o?-1:Math.max(0,e+r),a=i<0&&s>=0?"":s,u=t+"["+i+":"+a+"]";return this.insert("replace",u,n||[])},serialize:function(){return s(a(this.selection),this.operations)},toJSON:function(){return this.serialize()},commit:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.client)throw new Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");var e="string"==typeof this.selection,r=s({returnFirst:e,returnDocuments:!0},t);return this.client.mutate({patch:this.serialize()},r)},reset:function(){return this.operations={},this},_set:function(t,e){return this._assign(t,e,!1)},_assign:function(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return c(t,e),this.operations=s({},this.operations,n({},t,s({},r&&this.operations[t]||{},e))),this}}),e.exports=o},{"../util/getSelection":19,"../validators":21,"deep-assign":22,"object-assign":42}],8:[function(t,e,r){"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments[1];this.operations=t,this.client=e}var i=t("object-assign"),s=t("../validators"),a=t("./patch"),u={returnDocuments:!1};i(o.prototype,{clone:function(){return new o(this.operations.slice(0),this.client)},create:function(t){return s.validateObject("create",t),this._add({create:t})},createIfNotExists:function(t){var e="createIfNotExists";return s.validateObject(e,t),s.requireDocumentId(e,t),this._add(n({},e,t))},createOrReplace:function(t){var e="createOrReplace";return s.validateObject(e,t),s.requireDocumentId(e,t),this._add(n({},e,t))},delete:function(t){return s.validateDocumentId("delete",t),this._add({delete:{id:t}})},patch:function(t,e){var r="function"==typeof e;if(t instanceof a)return this._add({patch:t.serialize()});if(r){var n=e(new a(t,{},this.client));if(!(n instanceof a))throw new Error("function passed to `patch()` must return the patch");return this._add({patch:n.serialize()})}return this._add({patch:i({id:t},e)})},serialize:function(){return this.operations.slice()},toJSON:function(){return this.serialize()},commit:function(t){if(!this.client)throw new Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return this.client.mutate(this.serialize(),i({},u,t||{}))},reset:function(){return this.operations=[],this},_add:function(t){return this.operations.push(t),this}}),e.exports=o},{"../validators":21,"./patch":7,"object-assign":42}],9:[function(t,e,r){"use strict";function n(t){this.request=t.request.bind(t)}var o=t("object-assign"),i=t("../validators");o(n.prototype,{create:function(t){return this._modify("PUT",t)},delete:function(t){return this._modify("DELETE",t)},list:function(){return this.request({uri:"/datasets"})},_modify:function(t,e){return i.dataset(e),this.request({method:t,uri:"/datasets/"+e})}}),e.exports=n},{"../validators":21,"object-assign":42}],10:[function(t,e,r){"use strict";e.exports=[]},{}],11:[function(t,e,r){"use strict";function n(t){var e=i(t);n.super.call(this,e.message),c(this,e)}function o(t){var e=i(t);o.super.call(this,e.message),c(this,e)}function i(t){var e=t.body,r={response:t,statusCode:t.statusCode,responseBody:a(e,t)};return e.error&&e.message?(r.message=e.error+" - "+e.message,r):e.error&&e.error.description?(r.message=e.error.description,r.details=e.error,r):(r.message=e.error||e.message||s(t),r)}function s(t){var e=t.statusMessage?" "+t.statusMessage:"";return t.method+"-request to "+t.url+" resulted in HTTP "+t.statusCode+e}function a(t,e){return-1!==(e.headers["content-type"]||"").toLowerCase().indexOf("application/json")?JSON.stringify(t,null,2):t}var u=t("make-error"),c=t("object-assign");u(n),u(o),r.ClientError=n,r.ServerError=o},{"make-error":40,"object-assign":42}],12:[function(t,e,r){"use strict";e.exports=function(t){var e=[];for(var r in t)t.hasOwnProperty(r)&&e.push(encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e.length>0?"?"+e.join("&"):""}},{}],13:[function(t,e,r){"use strict";function n(t){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:v)(i({maxRedirects:0},t))}var o=t("get-it"),i=t("object-assign"),s=t("get-it/lib/middleware/observable"),a=t("get-it/lib/middleware/jsonRequest"),u=t("get-it/lib/middleware/jsonResponse"),c=t("@sanity/observable/minimal"),l=t("get-it/lib/middleware/progress"),f=t("./errors"),p=f.ClientError,h=f.ServerError,d={onResponse:function(t){if(t.statusCode>=500)throw new h(t);if(t.statusCode>=400)throw new p(t);return t}},b=t("./nodeMiddleware"),y=b.concat([a(),u(),l(),d,s({implementation:c})]),v=o(y);n.defaultRequester=v,n.ClientError=p,n.ServerError=h,e.exports=n},{"./errors":11,"./nodeMiddleware":10,"@sanity/observable/minimal":54,"get-it":24,"get-it/lib/middleware/jsonRequest":27,"get-it/lib/middleware/jsonResponse":28,"get-it/lib/middleware/observable":29,"get-it/lib/middleware/progress":31,"object-assign":42}],14:[function(t,e,r){"use strict";e.exports=function(t){var e={};return t.token&&(e.Authorization="Bearer "+t.token),!t.useProjectHostname&&t.projectId&&(e["X-Sanity-Project-ID"]=t.projectId),{headers:e,timeout:"timeout"in t?t.timeout:3e4,json:!0,withCredentials:Boolean(t.token||t.withCredentials)}}},{}],15:[function(t,e,r){"use strict";function n(t){this.client=t}t("object-assign")(n.prototype,{list:function(){return this.client.request({uri:"/projects"})},getById:function(t){return this.client.request({uri:"/projects/"+t})}}),e.exports=n},{"object-assign":42}],16:[function(t,e,r){"use strict";function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v;if(!(this instanceof n))return new n(t);if(this.config(t),this.assets=new f(this),this.datasets=new c(this),this.projects=new l(this),this.users=new p(this),this.auth=new h(this),this.clientConfig.isPromiseAPI){var e=i({},this.clientConfig,{isPromiseAPI:!1});this.observable=new n(e)}}function o(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=e.reduce(function(t,e){return t||e.headers?i(t||{},e.headers||{}):null},null);return i.apply(void 0,e.concat([n?{headers:n}:{}]))}var i=t("object-assign"),s=t("./data/patch"),a=t("./data/transaction"),u=t("./data/dataMethods"),c=t("./datasets/datasetsClient"),l=t("./projects/projectsClient"),f=t("./assets/assetsClient"),p=t("./users/usersClient"),h=t("./auth/authClient"),d=t("./http/request"),b=t("./http/requestOptions"),y=t("./config"),v=y.defaultConfig,m=y.initConfig,g=function(t){return t.toPromise()};i(n.prototype,u),i(n.prototype,{clone:function(){return new n(this.config())},config:function(t){if(void 0===t)return i({},this.clientConfig);if(this.observable){var e=i({},t,{isPromiseAPI:!1});this.observable.config(e)}return this.clientConfig=m(t,this.clientConfig||{}),this},getUrl:function(t){return(arguments.length>1&&void 0!==arguments[1]&&arguments[1]?this.clientConfig.cdnUrl:this.clientConfig.url)+"/"+t.replace(/^\//,"")},isPromiseAPI:function(){return this.clientConfig.isPromiseAPI},_requestObservable:function(t){var e=t.url||t.uri,r=this.clientConfig.useCdn&&["GET","HEAD"].indexOf(t.method||"GET")>=0&&0===e.indexOf("/data/");return d(o(b(this.clientConfig),t,{url:this.getUrl(e,r)}),this.clientConfig.requester)},request:function(t){var e=this._requestObservable(t).filter(function(t){return"response"===t.type}).map(function(t){return t.body});return this.isPromiseAPI()?g(e):e}}),n.Patch=s,n.Transaction=a,n.ClientError=d.ClientError,n.ServerError=d.ServerError,n.requester=d.defaultRequester,e.exports=n},{"./assets/assetsClient":1,"./auth/authClient":2,"./config":3,"./data/dataMethods":4,"./data/patch":7,"./data/transaction":8,"./datasets/datasetsClient":9,"./http/request":13,"./http/requestOptions":14,"./projects/projectsClient":15,"./users/usersClient":17,"object-assign":42}],17:[function(t,e,r){"use strict";function n(t){this.client=t}t("object-assign")(n.prototype,{getById:function(t){return this.client.request({uri:"/users/"+t})}}),e.exports=n},{"object-assign":42}],18:[function(t,e,r){"use strict";e.exports=function(t,e){return Object.keys(e).concat(Object.keys(t)).reduce(function(r,n){return r[n]=void 0===t[n]?e[n]:t[n],r},{})}},{}],19:[function(t,e,r){"use strict";e.exports=function(t){if("string"==typeof t||Array.isArray(t))return{id:t};if(t&&t.query)return{query:t.query};var e=["* Document ID (<docId>)","* Array of document IDs","* Object containing `query`"].join("\n");throw new Error("Unknown selection - must be one of:\n\n"+e)}},{}],20:[function(t,e,r){"use strict";e.exports=function(t,e){return e.reduce(function(e,r){return void 0===t[r]?e:(e[r]=t[r],e)},{})}},{}],21:[function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=["image","file"],i=["before","after","replace"];r.dataset=function(t){if(!/^[-\w]{1,128}$/.test(t))throw new Error("Datasets can only contain lowercase characters, numbers, underscores and dashes")},r.projectId=function(t){if(!/^[-a-z0-9]+$/i.test(t))throw new Error("`projectId` can only contain only a-z, 0-9 and dashes")},r.validateAssetType=function(t){if(-1===o.indexOf(t))throw new Error("Invalid asset type: "+t+". Must be one of "+o.join(", "))},r.validateObject=function(t,e){if(null===e||"object"!==(void 0===e?"undefined":n(e))||Array.isArray(e))throw new Error(t+"() takes an object of properties")},r.requireDocumentId=function(t,e){if(!e._id)throw new Error(t+'() requires that the document contains an ID ("_id" property)');r.validateDocumentId(t,e._id)},r.validateDocumentId=function(t,e){if("string"!=typeof e||!/^[a-z0-9_.-]+$/i.test(e))throw new Error(t+'(): "'+e+'" is not a valid document ID')},r.validateInsert=function(t,e,r){var n="insert(at, selector, items)";if(-1===i.indexOf(t)){var o=i.map(function(t){return'"'+t+'"'}).join(", ");throw new Error(n+' takes an "at"-argument which is one of: '+o)}if("string"!=typeof e)throw new Error(n+' takes a "selector"-argument which must be a string');if(!Array.isArray(r))throw new Error(n+' takes an "items"-argument which must be an array')},r.hasDataset=function(t){if(!t.gradientMode&&!t.dataset)throw new Error("`dataset` must be provided to perform queries");return t.dataset||""}},{}],22:[function(t,e,r){"use strict";function n(t){if(null===t||void 0===t)throw new TypeError("Sources cannot be null or undefined");return Object(t)}function o(t,e,r){var n=e[r];if(void 0!==n&&null!==n){if(a.call(t,r)&&(void 0===t[r]||null===t[r]))throw new TypeError("Cannot convert undefined or null to object ("+r+")");a.call(t,r)&&s(n)?t[r]=i(Object(t[r]),e[r]):t[r]=n}}function i(t,e){if(t===e)return t;e=Object(e);for(var r in e)a.call(e,r)&&o(t,e,r);if(Object.getOwnPropertySymbols)for(var n=Object.getOwnPropertySymbols(e),i=0;i<n.length;i++)u.call(e,n[i])&&o(t,e,n[i]);return t}var s=t("is-obj"),a=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable;e.exports=function(t){t=n(t);for(var e=1;e<arguments.length;e++)i(t,arguments[e]);return t}},{"is-obj":37}],23:[function(t,e,r){function n(t,e,r){if(!a(e))throw new TypeError("iterator must be a function");arguments.length<3&&(r=this),"[object Array]"===u.call(t)?o(t,e,r):"string"==typeof t?i(t,e,r):s(t,e,r)}function o(t,e,r){for(var n=0,o=t.length;n<o;n++)c.call(t,n)&&e.call(r,t[n],n,t)}function i(t,e,r){for(var n=0,o=t.length;n<o;n++)e.call(r,t.charAt(n),n,t)}function s(t,e,r){for(var n in t)c.call(t,n)&&e.call(r,t[n],n,t)}var a=t("is-function");e.exports=n;var u=Object.prototype.toString,c=Object.prototype.hasOwnProperty},{"is-function":36}],24:[function(t,e,r){e.exports=t("./lib-node")},{"./lib-node":25}],25:[function(t,e,r){"use strict";var n=t("nano-pubsub"),o=t("./util/middlewareReducer"),i=t("./middleware/defaultOptionsProcessor"),s=t("./request"),a=["request","response","progress","error","abort"],u=["processOptions","interceptRequest","onRequest","onResponse","onError","onReturn","onHeaders"];e.exports=function t(){function e(t){function e(t,e,n){var o=t,s=e;if(!o)try{s=i("onResponse",e,n)}catch(t){s=null,o=t}o=o&&i("onError",o,n),o?r.error.publish(o):s&&r.response.publish(s)}var r=a.reduce(function(t,e){return t[e]=n(),t},{}),i=o(l),u=i("processOptions",t),c={options:u,channels:r,applyMiddleware:i},f=null,p=r.request.subscribe(function(t){f=s(t,function(r,n){return e(r,n,t)})});r.abort.subscribe(function(){p(),f&&f.abort()});var h=i("onReturn",r,c);return h===r&&r.request.publish(c),h}var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],c=[],l=u.reduce(function(t,e){return t[e]=t[e]||[],t},{processOptions:[i]});return e.use=function(t){if(!t)throw new Error("Tried to add middleware that resolved to falsey value");if("function"==typeof t)throw new Error("Tried to add middleware that was a function. It probably expects you to pass options to it.");if(t.onReturn&&l.onReturn.length>0)throw new Error("Tried to add new middleware with `onReturn` handler, but another handler has already been registered for this event");u.forEach(function(e){t[e]&&l[e].push(t[e])}),c.push(t)},e.clone=function(){return t(c)},r.forEach(e.use),e}},{"./middleware/defaultOptionsProcessor":26,"./request":33,"./util/middlewareReducer":35,"nano-pubsub":41}],26:[function(t,e,r){"use strict";function n(t){function e(t,n){Array.isArray(n)?n.forEach(function(r){return e(t,r)}):r.push([t,n].map(encodeURIComponent).join("="))}var r=[];for(var n in t)u.call(t,n)&&e(n,t[n]);return r.length?r.join("&"):""}function o(t){if(!1===t||0===t)return!1;if(t.connect||t.socket)return t;var e=Number(t);return isNaN(e)?o(c.timeout):{connect:e,socket:e}}function i(t){var e={};for(var r in t)void 0!==t[r]&&(e[r]=t[r]);return e}var s=t("object-assign"),a=t("url-parse"),u=Object.prototype.hasOwnProperty,c={timeout:12e4};e.exports=function(t){var e="string"==typeof t?s({url:t},c):s({},c,t),r=a(e.url,{},!0);return e.timeout=o(e.timeout),e.query&&(r.query=s({},r.query,i(e.query))),e.method=e.body&&!e.method?"POST":(e.method||"GET").toUpperCase(),e.url=r.toString(n),e}},{"object-assign":42,"url-parse":49}],27:[function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=t("object-assign"),i=t("is-plain-object"),s=["boolean","string","number"],a=function(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)};e.exports=function(){return{processOptions:function(t){var e=t.body;return e&&!a(e)&&(-1!==s.indexOf(void 0===e?"undefined":n(e))||Array.isArray(e)||i(e)||e&&"function"==typeof e.toJSON)?o({},t,{body:JSON.stringify(t.body),headers:o({},t.headers,{"Content-Type":"application/json"})}):t}}}},{"is-plain-object":38,"object-assign":42}],28:[function(t,e,r){"use strict";function n(t){try{return JSON.parse(t)}catch(t){throw t.message="Failed to parsed response body as JSON: "+t.message,t}}var o=t("object-assign");e.exports=function(){return{onResponse:function(t){var e=t.headers["content-type"];return t.body&&e&&-1!==e.indexOf("application/json")?o({},t,{body:n(t.body)}):t},processOptions:function(t){return o({},t,{headers:o({Accept:"application/json"},t.headers)})}}}},{"object-assign":42}],29:[function(t,e,r){"use strict";var n=t("../util/global"),o=t("object-assign");e.exports=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.implementation||n.Observable;if(!e)throw new Error("`Observable` is not available in global scope, and no implementation was passed");return{onReturn:function(t,r){return new e(function(e){return t.error.subscribe(function(t){return e.error(t)}),t.progress.subscribe(function(t){return e.next(o({type:"progress"},t))}),t.response.subscribe(function(t){e.next(o({type:"response"},t)),e.complete()}),t.request.publish(r),function(){return t.abort.publish()}})}}}},{"../util/global":34,"object-assign":42}],30:[function(t,e,r){"use strict";e.exports=function(){return{onRequest:function(t){function e(t){return function(e){var r=e.lengthComputable?e.loaded/e.total*100:-1;n.channels.progress.publish({stage:t,percent:r,total:e.total,loaded:e.loaded,lengthComputable:e.lengthComputable})}}if("xhr"===t.adapter){var r=t.request,n=t.context;"upload"in r&&"onprogress"in r.upload&&(r.upload.onprogress=e("upload")),"onprogress"in r&&(r.onprogress=e("download"))}}}}},{}],31:[function(t,e,r){"use strict";e.exports=t("./node-progress")},{"./node-progress":30}],32:[function(t,e,r){"use strict";var n=t("same-origin"),o=t("parse-headers"),i=function(){},s=window,a=s.XMLHttpRequest||i,u="withCredentials"in new a,c=u?a:s.XDomainRequest;e.exports=function(t,e){function r(){j=!0,g&&g.abort()}function i(e){_=!0,g.abort();var r=new Error("ESOCKETTIMEDOUT"===e?"Socket timed out on request to "+d.url:"Connection timed out on request to "+d.url);r.code=e,t.channels.error.publish(r)}function u(){S&&(l(),y.socket=setTimeout(function(){return i("ESOCKETTIMEDOUT")},S.socket))}function l(){(j||g.readyState>=2&&y.connect)&&clearTimeout(y.connect),y.socket&&clearTimeout(y.socket)}function f(){if(!E){l(),E=!0,g=null;var t=new Error("Network error while attempting to reach "+d.url);t.isNetworkError=!0,t.request=d,e(t)}}function p(){var t=g.status,e=g.statusText;if(w&&void 0===t)t=200;else{if(t>12e3&&t<12156)return f();t=1223===g.status?204:g.status,e=1223===g.status?"No Content":e}return{body:g.response||g.responseText,url:d.url,method:d.method,headers:w?{}:o(g.getAllResponseHeaders()),statusCode:t,statusMessage:e}}function h(){if(!(j||E||_)){if(0===g.status)return void f(new Error("Unknown XHR error"));l(),E=!0,e(null,p())}}var d=t.options,b=!n(s.location.href,d.url),y={},v=t.applyMiddleware("interceptRequest",void 0,{adapter:"xhr",context:t});if(v){var m=setTimeout(e,0,null,v);return{abort:function(){return clearTimeout(m)}}}var g=b?new c:new a,w=s.XDomainRequest&&g instanceof s.XDomainRequest,O=d.headers,j=!1,E=!1,_=!1;if(g.onerror=f,g.ontimeout=f,g.onabort=function(){j=!0},g.onprogress=function(){},g[w?"onload":"onreadystatechange"]=function(){u(),j||4!==g.readyState&&!w||0!==g.status&&h()},g.open(d.method,d.url,!0),g.withCredentials=!!d.withCredentials,O&&g.setRequestHeader)for(var x in O)O.hasOwnProperty(x)&&g.setRequestHeader(x,O[x]);else if(O&&w)throw new Error("Headers cannot be set on an XDomainRequest object");d.rawBody&&(g.responseType="arraybuffer"),t.applyMiddleware("onRequest",{options:d,adapter:"xhr",request:g,context:t}),g.send(d.body||null);var S=d.timeout;return S&&(y.connect=setTimeout(function(){return i("ETIMEDOUT")},S.connect)),{abort:r}}},{"parse-headers":43,"same-origin":46}],33:[function(t,e,r){"use strict";e.exports=t("./node-request")},{"./node-request":32}],34:[function(t,e,r){(function(t){"use strict";"undefined"!=typeof window?e.exports=window:void 0!==t?e.exports=t:"undefined"!=typeof self?e.exports=self:e.exports={}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],35:[function(t,e,r){"use strict";e.exports=function(t){return function(e,r){for(var n=arguments.length,o=Array(n>2?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];return t[e].reduce(function(t,e){return e.apply(void 0,[t].concat(o))},r)}}},{}],36:[function(t,e,r){function n(t){var e=o.call(t);return"[object Function]"===e||"function"==typeof t&&"[object RegExp]"!==e||"undefined"!=typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)}e.exports=n;var o=Object.prototype.toString},{}],37:[function(t,e,r){"use strict";e.exports=function(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}},{}],38:[function(t,e,r){"use strict";function n(t){return!0===o(t)&&"[object Object]"===Object.prototype.toString.call(t)}var o=t("isobject");e.exports=function(t){var e,r;return!1!==n(t)&&"function"==typeof(e=t.constructor)&&(r=e.prototype,!1!==n(r)&&!1!==r.hasOwnProperty("isPrototypeOf"))}},{isobject:39}],39:[function(t,e,r){"use strict";e.exports=function(t){return null!=t&&"object"==typeof t&&!1===Array.isArray(t)}},{}],40:[function(t,e,r){"use strict";function n(t){t&&i(this,"message",{configurable:!0,value:t,writable:!0});var e=this.constructor.name;e&&e!==this.name&&i(this,"name",{configurable:!0,value:e,
writable:!0}),s(this,this.constructor)}function o(t,e){if(null==e||e===Error)e=n;else if("function"!=typeof e)throw new TypeError("super_ should be a function");var r;if("string"==typeof t)r=t,t=function(){e.apply(this,arguments)},a&&(a(t,r),r=null);else if("function"!=typeof t)throw new TypeError("constructor should be either a string or a function");t.super_=t.super=e;var o={constructor:{configurable:!0,value:t,writable:!0}};return null!=r&&(o.name={configurable:!0,value:r,writable:!0}),t.prototype=Object.create(e.prototype,o),t}var i=Object.defineProperty,s=Error.captureStackTrace;s||(s=function(t){var e=new Error;i(t,"stack",{configurable:!0,get:function(){var t=e.stack;return i(this,"stack",{value:t}),t},set:function(e){i(t,"stack",{configurable:!0,value:e,writable:!0})}})}),n.prototype=Object.create(Error.prototype,{constructor:{configurable:!0,value:n,writable:!0}});var a=function(){function t(t,e){return i(t,"name",{configurable:!0,value:e})}try{var e=function(){};if(t(e,"foo"),"foo"===e.name)return t}catch(t){}}();r=e.exports=o,r.BaseError=n},{}],41:[function(t,e,r){e.exports=function(){function t(t){return r.push(t),function(){var e=r.indexOf(t);e>-1&&r.splice(e,1)}}function e(){for(var t=0;t<r.length;t++)r[t].apply(null,arguments)}var r=[];return{subscribe:t,publish:e}}},{}],42:[function(t,e,r){"use strict";function n(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,a,u=n(t),c=1;c<arguments.length;c++){r=Object(arguments[c]);for(var l in r)i.call(r,l)&&(u[l]=r[l]);if(o){a=o(r);for(var f=0;f<a.length;f++)s.call(r,a[f])&&(u[a[f]]=r[a[f]])}}return u}},{}],43:[function(t,e,r){var n=t("trim"),o=t("for-each"),i=function(t){return"[object Array]"===Object.prototype.toString.call(t)};e.exports=function(t){if(!t)return{};var e={};return o(n(t).split("\n"),function(t){var r=t.indexOf(":"),o=n(t.slice(0,r)).toLowerCase(),s=n(t.slice(r+1));void 0===e[o]?e[o]=s:i(e[o])?e[o].push(s):e[o]=[e[o],s]}),e}},{"for-each":23,trim:48}],44:[function(t,e,r){"use strict";function n(t){return decodeURIComponent(t.replace(/\+/g," "))}function o(t){for(var e,r=/([^=?&]+)=?([^&]*)/g,o={};e=r.exec(t);o[n(e[1])]=n(e[2]));return o}function i(t,e){e=e||"";var r=[];"string"!=typeof e&&(e="?");for(var n in t)s.call(t,n)&&r.push(encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return r.length?e+r.join("&"):""}var s=Object.prototype.hasOwnProperty;r.stringify=i,r.parse=o},{}],45:[function(t,e,r){"use strict";e.exports=function(t,e){if(e=e.split(":")[0],!(t=+t))return!1;switch(e){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t}},{}],46:[function(t,e,r){"use strict";var n=t("url");e.exports=function(t,e,r){if(t===e)return!0;var o=n.parse(t,!1,!0),i=n.parse(e,!1,!0),s=0|o.port||("https"===o.protocol?443:80),a=0|i.port||("https"===i.protocol?443:80),u={proto:o.protocol===i.protocol,hostname:o.hostname===i.hostname,port:s===a};return u.proto&&u.hostname&&(u.port||r)}},{url:47}],47:[function(t,e,r){"use strict";var n=/^(?:(?:(?:([^:\/#\?]+:)?(?:(?:\/\/)((?:((?:[^:@\/#\?]+)(?:\:(?:[^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((?:\/?(?:[^\/\?#]+\/+)*)(?:[^\?#]*)))?(\?[^#]+)?)(#.*)?/;e.exports={regex:n,parse:function(t){var e=n.exec(t);return e?{protocol:(e[1]||"").toLowerCase()||void 0,hostname:(e[5]||"").toLowerCase()||void 0,port:e[6]||void 0}:{}}}},{}],48:[function(t,e,r){function n(t){return t.replace(/^\s*|\s*$/g,"")}r=e.exports=n,r.left=function(t){return t.replace(/^\s*/,"")},r.right=function(t){return t.replace(/\s*$/,"")}},{}],49:[function(t,e,r){(function(r){"use strict";function n(t){t=t||r.location||{};var e,n={},o=typeof t;if("blob:"===t.protocol)n=new s(unescape(t.pathname),{});else if("string"===o){n=new s(t,{});for(e in d)delete n[e]}else if("object"===o){for(e in t)e in d||(n[e]=t[e]);void 0===n.slashes&&(n.slashes=p.test(t.href))}return n}function o(t){var e=f.exec(t);return{protocol:e[1]?e[1].toLowerCase():"",slashes:!!e[2],rest:e[3]}}function i(t,e){for(var r=(e||"/").split("/").slice(0,-1).concat(t.split("/")),n=r.length,o=r[n-1],i=!1,s=0;n--;)"."===r[n]?r.splice(n,1):".."===r[n]?(r.splice(n,1),s++):s&&(0===n&&(i=!0),r.splice(n,1),s--);return i&&r.unshift(""),"."!==o&&".."!==o||r.push(""),r.join("/")}function s(t,e,r){if(!(this instanceof s))return new s(t,e,r);var a,u,f,p,d,b,y=h.slice(),v=typeof e,m=this,g=0;for("object"!==v&&"string"!==v&&(r=e,e=null),r&&"function"!=typeof r&&(r=l.parse),e=n(e),u=o(t||""),a=!u.protocol&&!u.slashes,m.slashes=u.slashes||a&&e.slashes,m.protocol=u.protocol||e.protocol||"",t=u.rest,u.slashes||(y[2]=[/(.*)/,"pathname"]);g<y.length;g++)p=y[g],f=p[0],b=p[1],f!==f?m[b]=t:"string"==typeof f?~(d=t.indexOf(f))&&("number"==typeof p[2]?(m[b]=t.slice(0,d),t=t.slice(d+p[2])):(m[b]=t.slice(d),t=t.slice(0,d))):(d=f.exec(t))&&(m[b]=d[1],t=t.slice(0,d.index)),m[b]=m[b]||(a&&p[3]?e[b]||"":""),p[4]&&(m[b]=m[b].toLowerCase());r&&(m.query=r(m.query)),a&&e.slashes&&"/"!==m.pathname.charAt(0)&&(""!==m.pathname||""!==e.pathname)&&(m.pathname=i(m.pathname,e.pathname)),c(m.port,m.protocol)||(m.host=m.hostname,m.port=""),m.username=m.password="",m.auth&&(p=m.auth.split(":"),m.username=p[0]||"",m.password=p[1]||""),m.origin=m.protocol&&m.host&&"file:"!==m.protocol?m.protocol+"//"+m.host:"null",m.href=m.toString()}function a(t,e,r){var n=this;switch(t){case"query":"string"==typeof e&&e.length&&(e=(r||l.parse)(e)),n[t]=e;break;case"port":n[t]=e,c(e,n.protocol)?e&&(n.host=n.hostname+":"+e):(n.host=n.hostname,n[t]="");break;case"hostname":n[t]=e,n.port&&(e+=":"+n.port),n.host=e;break;case"host":n[t]=e,/:\d+$/.test(e)?(e=e.split(":"),n.port=e.pop(),n.hostname=e.join(":")):(n.hostname=e,n.port="");break;case"protocol":n.protocol=e.toLowerCase(),n.slashes=!r;break;case"pathname":n.pathname=e.length&&"/"!==e.charAt(0)?"/"+e:e;break;default:n[t]=e}for(var o=0;o<h.length;o++){var i=h[o];i[4]&&(n[i[1]]=n[i[1]].toLowerCase())}return n.origin=n.protocol&&n.host&&"file:"!==n.protocol?n.protocol+"//"+n.host:"null",n.href=n.toString(),n}function u(t){t&&"function"==typeof t||(t=l.stringify);var e,r=this,n=r.protocol;n&&":"!==n.charAt(n.length-1)&&(n+=":");var o=n+(r.slashes?"//":"");return r.username&&(o+=r.username,r.password&&(o+=":"+r.password),o+="@"),o+=r.host+r.pathname,e="object"==typeof r.query?t(r.query):r.query,e&&(o+="?"!==e.charAt(0)?"?"+e:e),r.hash&&(o+=r.hash),o}var c=t("requires-port"),l=t("querystringify"),f=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i,p=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,h=[["#","hash"],["?","query"],["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],d={hash:1,query:1};s.prototype={set:a,toString:u},s.extractProtocol=o,s.location=n,s.qs=l,e.exports=s}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{querystringify:44,"requires-port":45}],50:[function(t,e,r){var n=t("eventsource-polyfill/dist/eventsource");e.exports=window.EventSource||n.EventSource},{"eventsource-polyfill/dist/eventsource":51}],51:[function(t,e,r){!function(t){function e(t,e,r,n){this.bubbles=!1,this.cancelBubble=!1,this.cancelable=!1,this.data=e||null,this.origin=r||"",this.lastEventId=n||"",this.type=t||"message"}if(!t.EventSource||t._eventSourceImportPrefix){var r=(t._eventSourceImportPrefix||"")+"EventSource",n=function(t,e){if(!t||"string"!=typeof t)throw new SyntaxError("Not enough arguments");this.URL=t,this.setOptions(e);var r=this;setTimeout(function(){r.poll()},0)};if(n.prototype={CONNECTING:0,OPEN:1,CLOSED:2,defaultOptions:{loggingEnabled:!1,loggingPrefix:"eventsource",interval:500,bufferSizeLimit:262144,silentTimeout:3e5,getArgs:{evs_buffer_size_limit:262144},xhrHeaders:{Accept:"text/event-stream","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"}},setOptions:function(t){var e,r=this.defaultOptions;for(e in r)r.hasOwnProperty(e)&&(this[e]=r[e]);for(e in t)e in r&&t.hasOwnProperty(e)&&(this[e]=t[e]);this.getArgs&&this.bufferSizeLimit&&(this.getArgs.evs_buffer_size_limit=this.bufferSizeLimit),"undefined"!=typeof console&&void 0!==console.log||(this.loggingEnabled=!1)},log:function(t){this.loggingEnabled&&console.log("["+this.loggingPrefix+"]:"+t)},poll:function(){try{if(this.readyState==this.CLOSED)return;this.cleanup(),this.readyState=this.CONNECTING,this.cursor=0,this.cache="",this._xhr=new this.XHR(this),this.resetNoActivityTimer()}catch(t){this.log("There were errors inside the pool try-catch"),this.dispatchEvent("error",{type:"error",data:t.message})}},pollAgain:function(t){var e=this;e.readyState=e.CONNECTING,e.dispatchEvent("error",{type:"error",data:"Reconnecting "}),this._pollTimer=setTimeout(function(){e.poll()},t||0)},cleanup:function(){this.log("evs cleaning up"),this._pollTimer&&(clearInterval(this._pollTimer),this._pollTimer=null),this._noActivityTimer&&(clearInterval(this._noActivityTimer),this._noActivityTimer=null),this._xhr&&(this._xhr.abort(),this._xhr=null)},resetNoActivityTimer:function(){if(this.silentTimeout){this._noActivityTimer&&clearInterval(this._noActivityTimer);var t=this;this._noActivityTimer=setTimeout(function(){t.log("Timeout! silentTImeout:"+t.silentTimeout),t.pollAgain()},this.silentTimeout)}},close:function(){this.readyState=this.CLOSED,this.log("Closing connection. readyState: "+this.readyState),this.cleanup()},ondata:function(){var t=this._xhr;if(t.isReady()&&!t.hasError()){this.resetNoActivityTimer(),this.readyState==this.CONNECTING&&(this.readyState=this.OPEN,this.dispatchEvent("open",{type:"open"}));var e=t.getBuffer();e.length>this.bufferSizeLimit&&(this.log("buffer.length > this.bufferSizeLimit"),this.pollAgain()),0==this.cursor&&e.length>0&&"\ufeff"==e.substring(0,1)&&(this.cursor=1);var r=this.lastMessageIndex(e);if(r[0]>=this.cursor){var n=r[1],o=e.substring(this.cursor,n);this.parseStream(o),this.cursor=n}t.isDone()&&(this.log("request.isDone(). reopening the connection"),this.pollAgain(this.interval))}else this.readyState!==this.CLOSED&&(this.log("this.readyState !== this.CLOSED"),this.pollAgain(this.interval))},parseStream:function(t){t=this.cache+this.normalizeToLF(t);var r,n,o,i,s,a,u=t.split("\n\n");for(r=0;r<u.length-1;r++){for(o="message",i=[],parts=u[r].split("\n"),n=0;n<parts.length;n++)s=this.trimWhiteSpace(parts[n]),0==s.indexOf("event")?o=s.replace(/event:?\s*/,""):0==s.indexOf("retry")?(a=parseInt(s.replace(/retry:?\s*/,"")),isNaN(a)||(this.interval=a)):0==s.indexOf("data")?i.push(s.replace(/data:?\s*/,"")):0==s.indexOf("id:")?this.lastEventId=s.replace(/id:?\s*/,""):0==s.indexOf("id")&&(this.lastEventId=null);if(i.length){var c=new e(o,i.join("\n"),window.location.origin,this.lastEventId);this.dispatchEvent(o,c)}}this.cache=u[u.length-1]},dispatchEvent:function(t,e){var r=this["_"+t+"Handlers"];if(r)for(var n=0;n<r.length;n++)r[n].call(this,e);this["on"+t]&&this["on"+t].call(this,e)},addEventListener:function(t,e){this["_"+t+"Handlers"]||(this["_"+t+"Handlers"]=[]),this["_"+t+"Handlers"].push(e)},removeEventListener:function(t,e){var r=this["_"+t+"Handlers"];if(r)for(var n=r.length-1;n>=0;--n)if(r[n]===e){r.splice(n,1);break}},_pollTimer:null,_noactivityTimer:null,_xhr:null,lastEventId:null,cache:"",cursor:0,onerror:null,onmessage:null,onopen:null,readyState:0,urlWithParams:function(t,e){var r=[];if(e){var n,o,i=encodeURIComponent;for(n in e)e.hasOwnProperty(n)&&(o=i(n)+"="+i(e[n]),r.push(o))}return r.length>0?-1==t.indexOf("?")?t+"?"+r.join("&"):t+"&"+r.join("&"):t},lastMessageIndex:function(t){var e=t.lastIndexOf("\n\n"),r=t.lastIndexOf("\r\r"),n=t.lastIndexOf("\r\n\r\n");return n>Math.max(e,r)?[n,n+4]:[Math.max(e,r),Math.max(e,r)+2]},trimWhiteSpace:function(t){var e=/^(\s|\u00A0)+|(\s|\u00A0)+$/g;return t.replace(e,"")},normalizeToLF:function(t){return t.replace(/\r\n|\r/g,"\n")}},function(){return!(!window.XDomainRequest||!window.XMLHttpRequest||void 0!==(new XMLHttpRequest).responseType)}()){n.isPolyfill="IE_8-9";var o=n.prototype.defaultOptions;o.xhrHeaders=null,o.getArgs.evs_preamble=2056,n.prototype.XHR=function(t){request=new XDomainRequest,this._request=request,request.onprogress=function(){request._ready=!0,t.ondata()},request.onload=function(){this._loaded=!0,t.ondata()},request.onerror=function(){this._failed=!0,t.readyState=t.CLOSED,t.dispatchEvent("error",{type:"error",data:"XDomainRequest error"})},request.ontimeout=function(){this._failed=!0,t.readyState=t.CLOSED,t.dispatchEvent("error",{type:"error",data:"XDomainRequest timed out"})};var e={};if(t.getArgs){var r=t.getArgs;for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n]);t.lastEventId&&(e.evs_last_event_id=t.lastEventId)}request.open("GET",t.urlWithParams(t.URL,e)),request.send()},n.prototype.XHR.prototype={useXDomainRequest:!0,_request:null,_ready:!1,_loaded:!1,_failed:!1,isReady:function(){return this._request._ready},isDone:function(){return this._request._loaded},hasError:function(){return this._request._failed},getBuffer:function(){var t="";try{t=this._request.responseText||""}catch(t){}return t},abort:function(){this._request&&this._request.abort()}}}else n.isPolyfill="XHR",n.prototype.XHR=function(t){request=new XMLHttpRequest,this._request=request,t._xhr=this,request.onreadystatechange=function(){request.readyState>1&&t.readyState!=t.CLOSED&&(200==request.status||request.status>=300&&request.status<400?t.ondata():(request._failed=!0,t.readyState=t.CLOSED,t.dispatchEvent("error",{type:"error",data:"The server responded with "+request.status}),t.close()))},request.onprogress=function(){},request.open("GET",t.urlWithParams(t.URL,t.getArgs),!0);var e=t.xhrHeaders;for(var r in e)e.hasOwnProperty(r)&&request.setRequestHeader(r,e[r]);t.lastEventId&&request.setRequestHeader("Last-Event-Id",t.lastEventId),request.send()},n.prototype.XHR.prototype={useXDomainRequest:!1,_request:null,_failed:!1,isReady:function(){return this._request.readyState>=2},isDone:function(){return 4==this._request.readyState},hasError:function(){return this._failed||this._request.status>=400},getBuffer:function(){var t="";try{t=this._request.responseText||""}catch(t){}return t},abort:function(){this._request&&this._request.abort()}};t[r]=n}}(this)},{}],52:[function(t,e,r){e.exports=function(t){return"https://docs.sanity.io/help/"+t}},{}],53:[function(t,e,r){"use strict";function n(){i.apply(this,arguments)}var o=t("rxjs/Observable"),i=o.Observable,s=t("rxjs/operator/map"),a=s.map,u=t("rxjs/operator/filter"),c=u.filter,l=t("rxjs/operator/reduce"),f=l.reduce,p=t("rxjs/operator/toPromise"),h=p.toPromise,d=t("object-assign");n.prototype=Object.create(d(Object.create(null),i.prototype)),Object.defineProperty(n.prototype,"constructor",{value:n,enumerable:!1,writable:!0,configurable:!0}),n.prototype.lift=function(t){var e=new n;return e.source=this,e.operator=t,e},n.prototype.map=a,n.prototype.filter=c,n.prototype.reduce=f,n.prototype.toPromise=h,e.exports=n},{"object-assign":55,"rxjs/Observable":56,"rxjs/operator/filter":60,"rxjs/operator/map":61,"rxjs/operator/reduce":62,"rxjs/operator/toPromise":63}],54:[function(t,e,r){e.exports=t("./lib/SanityObservableMinimal")},{"./lib/SanityObservableMinimal":53}],55:[function(t,e,r){arguments[4][42][0].apply(r,arguments)},{dup:42}],56:[function(t,e,r){"use strict";var n=t("./util/root"),o=t("./util/toSubscriber"),i=t("./symbol/observable"),s=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(t,e,r){var n=this.operator,i=o.toSubscriber(t,e,r);if(n?n.call(i,this.source):i.add(this._subscribe(i)),i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},t.prototype.forEach=function(t,e){var r=this;if(e||(n.root.Rx&&n.root.Rx.config&&n.root.Rx.config.Promise?e=n.root.Rx.config.Promise:n.root.Promise&&(e=n.root.Promise)),!e)throw new Error("no Promise impl found");return new e(function(e,n){var o=r.subscribe(function(e){if(o)try{t(e)}catch(t){n(t),o.unsubscribe()}else t(e)},n,e)})},t.prototype._subscribe=function(t){return this.source.subscribe(t)},t.prototype[i.$$observable]=function(){return this},t.create=function(e){return new t(e)},t}();r.Observable=s},{"./symbol/observable":64,"./util/root":71,"./util/toSubscriber":72}],57:[function(t,e,r){"use strict";r.empty={closed:!0,next:function(t){},error:function(t){throw t},complete:function(){}}},{}],58:[function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=t("./util/isFunction"),i=t("./Subscription"),s=t("./Observer"),a=t("./symbol/rxSubscriber"),u=function(t){function e(r,n,o){switch(t.call(this),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=s.empty;break;case 1:if(!r){this.destination=s.empty;break}if("object"==typeof r){r instanceof e?(this.destination=r,this.destination.add(this)):(this.syncErrorThrowable=!0,this.destination=new c(this,r));break}default:this.syncErrorThrowable=!0,this.destination=new c(this,r,n,o)}}return n(e,t),e.prototype[a.$$rxSubscriber]=function(){return this},e.create=function(t,r,n){var o=new e(t,r,n);return o.syncErrorThrowable=!1,o},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e}(i.Subscription);r.Subscriber=u;var c=function(t){function e(e,r,n,i){t.call(this),this._parent=e;var s,a=this;o.isFunction(r)?s=r:r&&(a=r,s=r.next,n=r.error,i=r.complete,o.isFunction(a.unsubscribe)&&this.add(a.unsubscribe.bind(a)),a.unsubscribe=this.unsubscribe.bind(this)),this._context=a,this._next=s,this._error=n,this._complete=i}return n(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parent;e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parent;if(this._error)e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else{if(!e.syncErrorThrowable)throw this.unsubscribe(),t;e.syncErrorValue=t,e.syncErrorThrown=!0,this.unsubscribe()}}},e.prototype.complete=function(){if(!this.isStopped){var t=this._parent;this._complete?t.syncErrorThrowable?(this.__tryOrSetError(t,this._complete),this.unsubscribe()):(this.__tryOrUnsub(this._complete),this.unsubscribe()):this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){throw this.unsubscribe(),t}},e.prototype.__tryOrSetError=function(t,e,r){try{e.call(this._context,r)}catch(e){return t.syncErrorValue=e,t.syncErrorThrown=!0,!0}return!1},e.prototype._unsubscribe=function(){var t=this._parent;this._context=null,this._parent=null,t.unsubscribe()},e}(u)},{"./Observer":57,"./Subscription":59,"./symbol/rxSubscriber":65,"./util/isFunction":69}],59:[function(t,e,r){"use strict";function n(t){return t.reduce(function(t,e){return t.concat(e instanceof l.UnsubscriptionError?e.errors:e)},[])}var o=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("./util/isArray"),s=t("./util/isObject"),a=t("./util/isFunction"),u=t("./util/tryCatch"),c=t("./util/errorObject"),l=t("./util/UnsubscriptionError"),f=function(){function t(t){this.closed=!1,t&&(this._unsubscribe=t)}return t.prototype.unsubscribe=function(){var t,e=!1;if(!this.closed){this.closed=!0;var r=this,o=r._unsubscribe,f=r._subscriptions;if(this._subscriptions=null,a.isFunction(o)){var p=u.tryCatch(o).call(this);p===c.errorObject&&(e=!0,t=t||(c.errorObject.e instanceof l.UnsubscriptionError?n(c.errorObject.e.errors):[c.errorObject.e]))}if(i.isArray(f))for(var h=-1,d=f.length;++h<d;){var b=f[h];if(s.isObject(b)){var p=u.tryCatch(b.unsubscribe).call(b);if(p===c.errorObject){e=!0,t=t||[];var y=c.errorObject.e;y instanceof l.UnsubscriptionError?t=t.concat(n(y.errors)):t.push(y)}}}if(e)throw new l.UnsubscriptionError(t)}},t.prototype.add=function(e){if(!e||e===t.EMPTY)return t.EMPTY;if(e===this)return this;var r=e;switch(typeof e){case"function":r=new t(e);case"object":if(r.closed||"function"!=typeof r.unsubscribe)return r;if(this.closed)return r.unsubscribe(),r;break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var n=new p(r,this);return this._subscriptions=this._subscriptions||[],this._subscriptions.push(n),n},t.prototype.remove=function(e){if(null!=e&&e!==this&&e!==t.EMPTY){var r=this._subscriptions;if(r){var n=r.indexOf(e);-1!==n&&r.splice(n,1)}}},t.EMPTY=function(t){return t.closed=!0,t}(new t),t}();r.Subscription=f;var p=function(t){function e(e,r){t.call(this),this._innerSub=e,this._parent=r}return o(e,t),e.prototype._unsubscribe=function(){var t=this,e=t._innerSub;t._parent.remove(this),e.unsubscribe()},e}(f);r.ChildSubscription=p},{"./util/UnsubscriptionError":66,"./util/errorObject":67,"./util/isArray":68,"./util/isFunction":69,"./util/isObject":70,"./util/tryCatch":73}],60:[function(t,e,r){"use strict";function n(t,e){return this.lift(new s(t,e))}var o=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../Subscriber");r.filter=n;var s=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.predicate,this.thisArg))},t}(),a=function(t){function e(e,r,n){t.call(this,e),this.predicate=r,this.thisArg=n,this.count=0,this.predicate=r}return o(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}e&&this.destination.next(t)},e}(i.Subscriber)},{"../Subscriber":58}],61:[function(t,e,r){"use strict";function n(t,e){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return this.lift(new s(t,e))}var o=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../Subscriber");r.map=n;var s=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.project,this.thisArg))},t}();r.MapOperator=s;var a=function(t){function e(e,r,n){t.call(this,e),this.project=r,this.count=0,this.thisArg=n||this}return o(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(i.Subscriber)},{"../Subscriber":58}],62:[function(t,e,r){"use strict";function n(t,e){var r=!1;return arguments.length>=2&&(r=!0),this.lift(new s(t,e,r))}var o=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../Subscriber");r.reduce=n;var s=function(){function t(t,e,r){void 0===r&&(r=!1),this.accumulator=t,this.seed=e,this.hasSeed=r}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.accumulator,this.seed,this.hasSeed))},t}();r.ReduceOperator=s;var a=function(t){function e(e,r,n,o){t.call(this,e),this.accumulator=r,this.hasSeed=o,this.hasValue=!1,this.acc=n}return o(e,t),e.prototype._next=function(t){this.hasValue||(this.hasValue=this.hasSeed)?this._tryReduce(t):(this.acc=t,this.hasValue=!0)},e.prototype._tryReduce=function(t){var e;try{e=this.accumulator(this.acc,t)}catch(t){return void this.destination.error(t)}this.acc=e},e.prototype._complete=function(){(this.hasValue||this.hasSeed)&&this.destination.next(this.acc),this.destination.complete()},e}(i.Subscriber);r.ReduceSubscriber=a},{"../Subscriber":58}],63:[function(t,e,r){"use strict";function n(t){var e=this;if(t||(o.root.Rx&&o.root.Rx.config&&o.root.Rx.config.Promise?t=o.root.Rx.config.Promise:o.root.Promise&&(t=o.root.Promise)),!t)throw new Error("no Promise impl found");return new t(function(t,r){var n;e.subscribe(function(t){return n=t},function(t){return r(t)},function(){return t(n)})})}var o=t("../util/root");r.toPromise=n},{"../util/root":71}],64:[function(t,e,r){"use strict";function n(t){var e,r=t.Symbol;return"function"==typeof r?r.observable?e=r.observable:(e=r("observable"),r.observable=e):e="@@observable",e}var o=t("../util/root");r.getSymbolObservable=n,r.$$observable=n(o.root)},{"../util/root":71}],65:[function(t,e,r){"use strict";var n=t("../util/root"),o=n.root.Symbol;r.$$rxSubscriber="function"==typeof o&&"function"==typeof o.for?o.for("rxSubscriber"):"@@rxSubscriber"},{"../util/root":71}],66:[function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=function(t){function e(e){t.call(this),this.errors=e;var r=Error.call(this,e?e.length+" errors occurred during unsubscription:\n "+e.map(function(t,e){return e+1+") "+t.toString()}).join("\n "):"");this.name=r.name="UnsubscriptionError",this.stack=r.stack,this.message=r.message}return n(e,t),e}(Error);r.UnsubscriptionError=o},{}],67:[function(t,e,r){"use strict";r.errorObject={e:{}}},{}],68:[function(t,e,r){"use strict";r.isArray=Array.isArray||function(t){return t&&"number"==typeof t.length}},{}],69:[function(t,e,r){"use strict";function n(t){return"function"==typeof t}r.isFunction=n},{}],70:[function(t,e,r){"use strict";function n(t){return null!=t&&"object"==typeof t}r.isObject=n},{}],71:[function(t,e,r){(function(t){"use strict";if(r.root="object"==typeof window&&window.window===window&&window||"object"==typeof self&&self.self===self&&self||"object"==typeof t&&t.global===t&&t,!r.root)throw new Error("RxJS could not find any global context (window, self, global)")}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],72:[function(t,e,r){"use strict";function n(t,e,r){if(t){if(t instanceof o.Subscriber)return t;if(t[i.$$rxSubscriber])return t[i.$$rxSubscriber]()}return t||e||r?new o.Subscriber(t,e,r):new o.Subscriber(s.empty)}var o=t("../Subscriber"),i=t("../symbol/rxSubscriber"),s=t("../Observer");r.toSubscriber=n},{"../Observer":57,"../Subscriber":58,"../symbol/rxSubscriber":65}],73:[function(t,e,r){"use strict";function n(){try{return i.apply(this,arguments)}catch(t){return s.errorObject.e=t,s.errorObject}}function o(t){return i=t,n}var i,s=t("./errorObject");r.tryCatch=o},{"./errorObject":67}]},{},[16])(16)});
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.SanityClient=t()}}(function(){return function t(e,r,n){function o(s,a){if(!r[s]){if(!e[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[s]={exports:{}};e[s][0].call(l.exports,function(t){var r=e[s][1][t];return o(r||t)},l,l.exports,t,e,r,n)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;s<n.length;s++)o(n[s]);return o}({1:[function(t,e,r){"use strict";function n(t){this.client=t}function o(t){return t.filter(function(t){return"response"===t.type}).map(function(t){return t.body}).toPromise()}function i(t,e){return"undefined"!=typeof window&&e instanceof window.File?a({filename:!1===t.preserveFilename?void 0:e.name,contentType:e.type},t):t}var s=function(){function t(t,e){var r=[],n=!0,o=!1,i=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{!n&&a.return&&a.return()}finally{if(o)throw i}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=t("object-assign"),u=t("../http/queryString"),c=t("../validators");a(n.prototype,{upload:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};c.validateAssetType(t);var n=c.hasDataset(this.client.clientConfig),s="image"===t?"images":"files",a=i(r,e),u=a.id,l=a.label,f=a.filename,p=a.meta,h={id:u,label:l,filename:f,meta:p},d=this.client._requestObservable({method:"POST",timeout:a.timeout||0,uri:"/assets/"+s+"/"+n,headers:a.contentType?{"Content-Type":a.contentType}:{},query:h,body:e});return this.client.isPromiseAPI()?o(d):d},delete:function(t,e){var r=t,n=e;t._type&&(r=t._type.replace(/(^sanity\.|Asset$)/g,""),n=t._id);var o=c.hasDataset(this.client.clientConfig);c.validateAssetType(r),c.validateDocumentId("delete",n);var i="image"===r?"images":"files";return this.client.request({method:"DELETE",uri:"/assets/"+i+"/"+o+"/"+n})},getImageUrl:function(t,e){var r=t._ref||t;if("string"!=typeof r)throw new Error("getImageUrl() needs either an object with a _ref, or a string with an asset document ID");if(!/^image-[A-Za-z0-9]+-\d+x\d+-[a-z]{1,5}$/.test(r))throw new Error('Unsupported asset ID "'+r+'". URL generation only works for auto-generated IDs.');var n=r.split("-"),o=s(n,4),i=o[1],a=o[2],l=o[3];c.hasDataset(this.client.clientConfig);var f=this.client.clientConfig;return"https://cdn.sanity.io/images/"+f.projectId+"/"+f.dataset+"/"+i+"-"+a+"."+l+(e?u(e):"")}}),e.exports=n},{"../http/queryString":12,"../validators":21,"object-assign":43}],2:[function(t,e,r){"use strict";function n(t){this.client=t}t("object-assign")(n.prototype,{getLoginProviders:function(){return this.client.request({uri:"/auth/providers"})},logout:function(){return this.client.request({uri:"/auth/logout",method:"POST"})}}),e.exports=n},{"object-assign":43}],3:[function(t,e,r){"use strict";var n=t("@sanity/generate-help-url"),o=t("object-assign"),i=t("./validators"),s={apiHost:"https://api.sanity.io",useProjectHostname:!0,gradientMode:!1,isPromiseAPI:!0},a=["You are not using the Sanity CDN. That means your data is always fresh, but the CDN is faster and","cheaper. Think about it! For more info, see "+n("js-client-cdn-configuration")+".","To hide this warning, please set the `useCdn` option to either `true` or `false` when creating","the client."],u=function(){var t=!1;return function(){t||(console.warn(a.join(" ")),t=!0)}}();r.defaultConfig=s,r.initConfig=function(t,e){var r=o({},s,e,t),n=r.gradientMode,a=!n&&r.useProjectHostname;if("undefined"==typeof Promise)throw new Error("No native `Promise`-implementation found, polyfill needed");if(n&&!r.namespace)throw new Error("Configuration must contain `namespace` when running in gradient mode");if(a&&!r.projectId)throw new Error("Configuration must contain `projectId`");if(void 0===r.useCdn&&u(),a&&i.projectId(r.projectId),!n&&r.dataset&&i.dataset(r.dataset,r.gradientMode),r.isDefaultApi=r.apiHost===s.apiHost,r.useCdn=Boolean(r.useCdn)&&!r.token&&!r.withCredentials,r.gradientMode)r.url=r.apiHost,r.cdnUrl=r.apiHost;else{var c=r.apiHost.split("://",2),l=c[0],f=c[1],p=r.isDefaultApi?"apicdn.sanity.io":f;r.useProjectHostname?(r.url=l+"://"+r.projectId+"."+f+"/v1",r.cdnUrl=l+"://"+r.projectId+"."+p+"/v1"):(r.url=r.apiHost+"/v1",r.cdnUrl=r.url)}return r}},{"./validators":21,"@sanity/generate-help-url":53,"object-assign":43}],4:[function(t,e,r){"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=t("object-assign"),i=t("../validators"),s=t("../util/getSelection"),a=t("./encodeQueryString"),u=t("./transaction"),c=t("./patch"),l=t("./listen"),f=function(t,e){var r=void 0===t?e:t;return!1===t?void 0:r},p=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{returnIds:!0,returnDocuments:f(t.returnDocuments,!0),visibility:t.visibility||"sync"}},h=function(t){return"response"===t.type},d=function(t){return t.body},b=function(t){return t.toPromise()};e.exports={listen:l,getDataUrl:function(t,e){var r=this.clientConfig,n=r.gradientMode?r.namespace:i.hasDataset(r),o="/"+t+"/"+n,s=e?o+"/"+e:o;return(this.clientConfig.gradientMode?s:"/data"+s).replace(/\/($|\?)/,"$1")},fetch:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=!1===r.filterResponse?function(t){return t}:function(t){return t.result},o=this._dataRequest("query",{query:t,params:e}).map(n);return this.isPromiseAPI()?b(o):o},getDocument:function(t){var e={uri:this.getDataUrl("doc",t),json:!0},r=this._requestObservable(e).filter(h).map(function(t){return t.body.documents&&t.body.documents[0]});return this.isPromiseAPI()?b(r):r},create:function(t,e){return this._create(t,"create",e)},createIfNotExists:function(t,e){return i.requireDocumentId("createIfNotExists",t),this._create(t,"createIfNotExists",e)},createOrReplace:function(t,e){return i.requireDocumentId("createOrReplace",t),this._create(t,"createOrReplace",e)},patch:function(t,e){return new c(t,e,this)},delete:function(t,e){return this.dataRequest("mutate",{mutations:[{delete:s(t)}]},e)},mutate:function(t,e){var r=t instanceof c?t.serialize():t,n=Array.isArray(r)?r:[r];return this.dataRequest("mutate",{mutations:n},e)},transaction:function(t){return new u(t,this)},dataRequest:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this._dataRequest(t,e,r);return this.isPromiseAPI()?b(n):n},_dataRequest:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o="mutate"===t,i=!o&&a(e),s=!o&&i.length<1948,u=s?i:"",c=r.returnFirst,l=this.getDataUrl(t,u),f={method:s?"GET":"POST",uri:l,json:!0,body:s?void 0:e,query:o&&p(r)};return this._requestObservable(f).filter(h).map(d).map(function(t){if(!o)return t;var e=t.results||[];if(r.returnDocuments)return c?e[0]&&e[0].document:e.map(function(t){return t.document});var i=c?"documentId":"documentIds",s=c?e[0]&&e[0].id:e.map(function(t){return t.id});return n({transactionId:t.transactionId,results:e},i,s)})},_create:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n({},e,t),s=o({returnFirst:!0,returnDocuments:!0},r);return this.dataRequest("mutate",{mutations:[i]},s)}}},{"../util/getSelection":19,"../validators":21,"./encodeQueryString":5,"./listen":6,"./patch":7,"./transaction":8,"object-assign":43}],5:[function(t,e,r){"use strict";var n=encodeURIComponent;e.exports=function(t){var e=t.query,r=t.params,o=void 0===r?{}:r,i=t.options,s=void 0===i?{}:i,a=Object.keys(o).reduce(function(t,e){return t+"&"+n("$"+e)+"="+n(JSON.stringify(o[e]))},"?query="+n(e));return Object.keys(s).reduce(function(t,e){return s[e]?t+"&"+n(e)+"="+n(s[e]):t},a)}},{}],6:[function(t,e,r){"use strict";function n(t){try{var e=t.data&&JSON.parse(t.data)||{};return s({type:t.type},e)}catch(t){return t}}function o(t){if(t instanceof Error)return t;var e=n(t);return e instanceof Error?e:new Error(i(e))}function i(t){return t.error?t.error.description?t.error.description:"string"==typeof t.error?t.error:JSON.stringify(t.error,null,2):t.message||"Unknown listener error"}var s=t("object-assign"),a=t("@sanity/observable/minimal"),u=t("./encodeQueryString"),c=t("../util/pick"),l=t("../util/defaults"),f="undefined"!=typeof window&&window.EventSource?window.EventSource:t("@sanity/eventsource"),p=["includePreviousRevision","includeResult"],h={includeResult:!0};e.exports=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=l(r,h),s=c(i,p),d=u({query:t,params:e,options:s}),b=this.clientConfig,y=b.url,v=b.token,m=b.withCredentials,g=""+y+this.getDataUrl("listen",d),w=i.events?i.events:["mutation"],O=-1!==w.indexOf("reconnect"),j={};return(v||m)&&(j.withCredentials=!0),v&&(j.headers={Authorization:"Bearer "+v}),new a(function(t){function e(){c.readyState===f.CLOSED?t.complete():c.readyState===f.CONNECTING&&u()}function r(e){t.error(o(e))}function i(e){var r=n(e);return r instanceof Error?t.error(r):t.next(r)}function s(e){t.complete(),a()}function a(){w.forEach(function(t){return c.removeEventListener(t,i,!1)}),c.removeEventListener("error",e,!1),c.removeEventListener("channelError",r,!1),c.removeEventListener("disconnect",s,!1),c.close()}function u(){O&&t.next({type:"reconnect"})}var c=new f(g,j);return c.addEventListener("error",e,!1),c.addEventListener("channelError",r,!1),c.addEventListener("disconnect",s,!1),w.forEach(function(t){return c.addEventListener(t,i,!1)}),a})}},{"../util/defaults":18,"../util/pick":20,"./encodeQueryString":5,"@sanity/eventsource":51,"@sanity/observable/minimal":55,"object-assign":43}],7:[function(t,e,r){"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.selection=t,this.operations=s({},e),this.client=r}var i=t("deep-assign"),s=t("object-assign"),a=t("../util/getSelection"),u=t("../validators"),c=u.validateObject,l=u.validateInsert;s(o.prototype,{clone:function(){return new o(this.selection,s({},this.operations),this.client)},merge:function(t){return c("merge",t),this._assign("merge",i(this.operations.merge||{},t))},set:function(t){return this._assign("set",t)},diffMatchPatch:function(t){return c("diffMatchPatch",t),this._assign("diffMatchPatch",t)},unset:function(t){if(!Array.isArray(t))throw new Error("unset(attrs) takes an array of attributes to unset, non-array given");return this.operations=s({},this.operations,{unset:t}),this},setIfMissing:function(t){return this._assign("setIfMissing",t)},replace:function(t){return c("replace",t),this._set("set",{$:t})},inc:function(t){return this._assign("inc",t)},dec:function(t){return this._assign("dec",t)},insert:function(t,e,r){var o;return l(t,e,r),this._assign("insert",(o={},n(o,t,e),n(o,"items",r),o))},append:function(t,e){return this.insert("after",t+"[-1]",e)},prepend:function(t,e){return this.insert("before",t+"[0]",e)},splice:function(t,e,r,n){var o=void 0===r||-1===r,i=e<0?e-1:e,s=o?-1:Math.max(0,e+r),a=i<0&&s>=0?"":s,u=t+"["+i+":"+a+"]";return this.insert("replace",u,n||[])},serialize:function(){return s(a(this.selection),this.operations)},toJSON:function(){return this.serialize()},commit:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.client)throw new Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");var e="string"==typeof this.selection,r=s({returnFirst:e,returnDocuments:!0},t);return this.client.mutate({patch:this.serialize()},r)},reset:function(){return this.operations={},this},_set:function(t,e){return this._assign(t,e,!1)},_assign:function(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return c(t,e),this.operations=s({},this.operations,n({},t,s({},r&&this.operations[t]||{},e))),this}}),e.exports=o},{"../util/getSelection":19,"../validators":21,"deep-assign":22,"object-assign":43}],8:[function(t,e,r){"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments[1];this.operations=t,this.client=e}var i=t("object-assign"),s=t("../validators"),a=t("./patch"),u={returnDocuments:!1};i(o.prototype,{clone:function(){return new o(this.operations.slice(0),this.client)},create:function(t){return s.validateObject("create",t),this._add({create:t})},createIfNotExists:function(t){var e="createIfNotExists";return s.validateObject(e,t),s.requireDocumentId(e,t),this._add(n({},e,t))},createOrReplace:function(t){var e="createOrReplace";return s.validateObject(e,t),s.requireDocumentId(e,t),this._add(n({},e,t))},delete:function(t){return s.validateDocumentId("delete",t),this._add({delete:{id:t}})},patch:function(t,e){var r="function"==typeof e;if(t instanceof a)return this._add({patch:t.serialize()});if(r){var n=e(new a(t,{},this.client));if(!(n instanceof a))throw new Error("function passed to `patch()` must return the patch");return this._add({patch:n.serialize()})}return this._add({patch:i({id:t},e)})},serialize:function(){return this.operations.slice()},toJSON:function(){return this.serialize()},commit:function(t){if(!this.client)throw new Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return this.client.mutate(this.serialize(),i({},u,t||{}))},reset:function(){return this.operations=[],this},_add:function(t){return this.operations.push(t),this}}),e.exports=o},{"../validators":21,"./patch":7,"object-assign":43}],9:[function(t,e,r){"use strict";function n(t){this.request=t.request.bind(t)}var o=t("object-assign"),i=t("../validators");o(n.prototype,{create:function(t){return this._modify("PUT",t)},delete:function(t){return this._modify("DELETE",t)},list:function(){return this.request({uri:"/datasets"})},_modify:function(t,e){return i.dataset(e),this.request({method:t,uri:"/datasets/"+e})}}),e.exports=n},{"../validators":21,"object-assign":43}],10:[function(t,e,r){"use strict";e.exports=[]},{}],11:[function(t,e,r){"use strict";function n(t){var e=i(t);n.super.call(this,e.message),c(this,e)}function o(t){var e=i(t);o.super.call(this,e.message),c(this,e)}function i(t){var e=t.body,r={response:t,statusCode:t.statusCode,responseBody:a(e,t)};return e.error&&e.message?(r.message=e.error+" - "+e.message,r):e.error&&e.error.description?(r.message=e.error.description,r.details=e.error,r):(r.message=e.error||e.message||s(t),r)}function s(t){var e=t.statusMessage?" "+t.statusMessage:"";return t.method+"-request to "+t.url+" resulted in HTTP "+t.statusCode+e}function a(t,e){return-1!==(e.headers["content-type"]||"").toLowerCase().indexOf("application/json")?JSON.stringify(t,null,2):t}var u=t("make-error"),c=t("object-assign");u(n),u(o),r.ClientError=n,r.ServerError=o},{"make-error":41,"object-assign":43}],12:[function(t,e,r){"use strict";e.exports=function(t){var e=[];for(var r in t)t.hasOwnProperty(r)&&e.push(encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e.length>0?"?"+e.join("&"):""}},{}],13:[function(t,e,r){"use strict";function n(t){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:v)(i({maxRedirects:0},t))}var o=t("get-it"),i=t("object-assign"),s=t("get-it/lib/middleware/observable"),a=t("get-it/lib/middleware/jsonRequest"),u=t("get-it/lib/middleware/jsonResponse"),c=t("@sanity/observable/minimal"),l=t("get-it/lib/middleware/progress"),f=t("./errors"),p=f.ClientError,h=f.ServerError,d={onResponse:function(t){if(t.statusCode>=500)throw new h(t);if(t.statusCode>=400)throw new p(t);return t}},b=t("./nodeMiddleware"),y=b.concat([a(),u(),l(),d,s({implementation:c})]),v=o(y);n.defaultRequester=v,n.ClientError=p,n.ServerError=h,e.exports=n},{"./errors":11,"./nodeMiddleware":10,"@sanity/observable/minimal":55,"get-it":24,"get-it/lib/middleware/jsonRequest":28,"get-it/lib/middleware/jsonResponse":29,"get-it/lib/middleware/observable":30,"get-it/lib/middleware/progress":32,"object-assign":43}],14:[function(t,e,r){"use strict";e.exports=function(t){var e={};return t.token&&(e.Authorization="Bearer "+t.token),!t.useProjectHostname&&t.projectId&&(e["X-Sanity-Project-ID"]=t.projectId),{headers:e,timeout:"timeout"in t?t.timeout:3e4,json:!0,withCredentials:Boolean(t.token||t.withCredentials)}}},{}],15:[function(t,e,r){"use strict";function n(t){this.client=t}t("object-assign")(n.prototype,{list:function(){return this.client.request({uri:"/projects"})},getById:function(t){return this.client.request({uri:"/projects/"+t})}}),e.exports=n},{"object-assign":43}],16:[function(t,e,r){"use strict";function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v;if(!(this instanceof n))return new n(t);if(this.config(t),this.assets=new f(this),this.datasets=new c(this),this.projects=new l(this),this.users=new p(this),this.auth=new h(this),this.clientConfig.isPromiseAPI){var e=i({},this.clientConfig,{isPromiseAPI:!1});this.observable=new n(e)}}function o(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=e.reduce(function(t,e){return t||e.headers?i(t||{},e.headers||{}):null},null);return i.apply(void 0,e.concat([n?{headers:n}:{}]))}var i=t("object-assign"),s=t("./data/patch"),a=t("./data/transaction"),u=t("./data/dataMethods"),c=t("./datasets/datasetsClient"),l=t("./projects/projectsClient"),f=t("./assets/assetsClient"),p=t("./users/usersClient"),h=t("./auth/authClient"),d=t("./http/request"),b=t("./http/requestOptions"),y=t("./config"),v=y.defaultConfig,m=y.initConfig,g=function(t){return t.toPromise()};i(n.prototype,u),i(n.prototype,{clone:function(){return new n(this.config())},config:function(t){if(void 0===t)return i({},this.clientConfig);if(this.observable){var e=i({},t,{isPromiseAPI:!1});this.observable.config(e)}return this.clientConfig=m(t,this.clientConfig||{}),this},getUrl:function(t){return(arguments.length>1&&void 0!==arguments[1]&&arguments[1]?this.clientConfig.cdnUrl:this.clientConfig.url)+"/"+t.replace(/^\//,"")},isPromiseAPI:function(){return this.clientConfig.isPromiseAPI},_requestObservable:function(t){var e=t.url||t.uri,r=this.clientConfig.useCdn&&["GET","HEAD"].indexOf(t.method||"GET")>=0&&0===e.indexOf("/data/");return d(o(b(this.clientConfig),t,{url:this.getUrl(e,r)}),this.clientConfig.requester)},request:function(t){var e=this._requestObservable(t).filter(function(t){return"response"===t.type}).map(function(t){return t.body});return this.isPromiseAPI()?g(e):e}}),n.Patch=s,n.Transaction=a,n.ClientError=d.ClientError,n.ServerError=d.ServerError,n.requester=d.defaultRequester,e.exports=n},{"./assets/assetsClient":1,"./auth/authClient":2,"./config":3,"./data/dataMethods":4,"./data/patch":7,"./data/transaction":8,"./datasets/datasetsClient":9,"./http/request":13,"./http/requestOptions":14,"./projects/projectsClient":15,"./users/usersClient":17,"object-assign":43}],17:[function(t,e,r){"use strict";function n(t){this.client=t}t("object-assign")(n.prototype,{getById:function(t){return this.client.request({uri:"/users/"+t})}}),e.exports=n},{"object-assign":43}],18:[function(t,e,r){"use strict";e.exports=function(t,e){return Object.keys(e).concat(Object.keys(t)).reduce(function(r,n){return r[n]=void 0===t[n]?e[n]:t[n],r},{})}},{}],19:[function(t,e,r){"use strict";e.exports=function(t){if("string"==typeof t||Array.isArray(t))return{id:t};if(t&&t.query)return{query:t.query};var e=["* Document ID (<docId>)","* Array of document IDs","* Object containing `query`"].join("\n");throw new Error("Unknown selection - must be one of:\n\n"+e)}},{}],20:[function(t,e,r){"use strict";e.exports=function(t,e){return e.reduce(function(e,r){return void 0===t[r]?e:(e[r]=t[r],e)},{})}},{}],21:[function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=["image","file"],i=["before","after","replace"];r.dataset=function(t){if(!/^[-\w]{1,128}$/.test(t))throw new Error("Datasets can only contain lowercase characters, numbers, underscores and dashes")},r.projectId=function(t){if(!/^[-a-z0-9]+$/i.test(t))throw new Error("`projectId` can only contain only a-z, 0-9 and dashes")},r.validateAssetType=function(t){if(-1===o.indexOf(t))throw new Error("Invalid asset type: "+t+". Must be one of "+o.join(", "))},r.validateObject=function(t,e){if(null===e||"object"!==(void 0===e?"undefined":n(e))||Array.isArray(e))throw new Error(t+"() takes an object of properties")},r.requireDocumentId=function(t,e){if(!e._id)throw new Error(t+'() requires that the document contains an ID ("_id" property)');r.validateDocumentId(t,e._id)},r.validateDocumentId=function(t,e){if("string"!=typeof e||!/^[a-z0-9_.-]+$/i.test(e))throw new Error(t+'(): "'+e+'" is not a valid document ID')},r.validateInsert=function(t,e,r){var n="insert(at, selector, items)";if(-1===i.indexOf(t)){var o=i.map(function(t){return'"'+t+'"'}).join(", ");throw new Error(n+' takes an "at"-argument which is one of: '+o)}if("string"!=typeof e)throw new Error(n+' takes a "selector"-argument which must be a string');if(!Array.isArray(r))throw new Error(n+' takes an "items"-argument which must be an array')},r.hasDataset=function(t){if(!t.gradientMode&&!t.dataset)throw new Error("`dataset` must be provided to perform queries");return t.dataset||""}},{}],22:[function(t,e,r){"use strict";function n(t){if(null===t||void 0===t)throw new TypeError("Sources cannot be null or undefined");return Object(t)}function o(t,e,r){var n=e[r];if(void 0!==n&&null!==n){if(a.call(t,r)&&(void 0===t[r]||null===t[r]))throw new TypeError("Cannot convert undefined or null to object ("+r+")");a.call(t,r)&&s(n)?t[r]=i(Object(t[r]),e[r]):t[r]=n}}function i(t,e){if(t===e)return t;e=Object(e);for(var r in e)a.call(e,r)&&o(t,e,r);if(Object.getOwnPropertySymbols)for(var n=Object.getOwnPropertySymbols(e),i=0;i<n.length;i++)u.call(e,n[i])&&o(t,e,n[i]);return t}var s=t("is-obj"),a=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable;e.exports=function(t){t=n(t);for(var e=1;e<arguments.length;e++)i(t,arguments[e]);return t}},{"is-obj":38}],23:[function(t,e,r){function n(t,e,r){if(!a(e))throw new TypeError("iterator must be a function");arguments.length<3&&(r=this),"[object Array]"===u.call(t)?o(t,e,r):"string"==typeof t?i(t,e,r):s(t,e,r)}function o(t,e,r){for(var n=0,o=t.length;n<o;n++)c.call(t,n)&&e.call(r,t[n],n,t)}function i(t,e,r){for(var n=0,o=t.length;n<o;n++)e.call(r,t.charAt(n),n,t)}function s(t,e,r){for(var n in t)c.call(t,n)&&e.call(r,t[n],n,t)}var a=t("is-function");e.exports=n;var u=Object.prototype.toString,c=Object.prototype.hasOwnProperty},{"is-function":37}],24:[function(t,e,r){e.exports=t("./lib-node")},{"./lib-node":25}],25:[function(t,e,r){"use strict";var n=t("nano-pubsub"),o=t("./util/middlewareReducer"),i=t("./middleware/defaultOptionsProcessor"),s=t("./middleware/defaultOptionsValidator"),a=t("./request"),u=["request","response","progress","error","abort"],c=["processOptions","validateOptions","interceptRequest","onRequest","onResponse","onError","onReturn","onHeaders"];e.exports=function t(){function e(t){function e(t,e,n){var o=t,s=e;if(!o)try{s=i("onResponse",e,n)}catch(t){s=null,o=t}o=o&&i("onError",o,n),o?r.error.publish(o):s&&r.response.publish(s)}var r=u.reduce(function(t,e){return t[e]=n(),t},{}),i=o(f),s=i("processOptions",t);i("validateOptions",s);var c={options:s,channels:r,applyMiddleware:i},l=null,p=r.request.subscribe(function(t){l=a(t,function(r,n){return e(r,n,t)})});r.abort.subscribe(function(){p(),l&&l.abort()});var h=i("onReturn",r,c);return h===r&&r.request.publish(c),h}var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],l=[],f=c.reduce(function(t,e){return t[e]=t[e]||[],t},{processOptions:[i],validateOptions:[s]});return e.use=function(t){if(!t)throw new Error("Tried to add middleware that resolved to falsey value");if("function"==typeof t)throw new Error("Tried to add middleware that was a function. It probably expects you to pass options to it.");if(t.onReturn&&f.onReturn.length>0)throw new Error("Tried to add new middleware with `onReturn` handler, but another handler has already been registered for this event");return c.forEach(function(e){t[e]&&f[e].push(t[e])}),l.push(t),e},e.clone=function(){return t(l)},r.forEach(e.use),e}},{"./middleware/defaultOptionsProcessor":26,"./middleware/defaultOptionsValidator":27,"./request":34,"./util/middlewareReducer":36,"nano-pubsub":42}],26:[function(t,e,r){"use strict";function n(t){function e(t,n){Array.isArray(n)?n.forEach(function(r){return e(t,r)}):r.push([t,n].map(encodeURIComponent).join("="))}var r=[];for(var n in t)u.call(t,n)&&e(n,t[n]);return r.length?r.join("&"):""}function o(t){if(!1===t||0===t)return!1;if(t.connect||t.socket)return t;var e=Number(t);return isNaN(e)?o(c.timeout):{connect:e,socket:e}}function i(t){var e={};for(var r in t)void 0!==t[r]&&(e[r]=t[r]);return e}var s=t("object-assign"),a=t("url-parse"),u=Object.prototype.hasOwnProperty,c={timeout:12e4};e.exports=function(t){var e="string"==typeof t?s({url:t},c):s({},c,t),r=a(e.url,{},!0);return e.timeout=o(e.timeout),e.query&&(r.query=s({},r.query,i(e.query))),e.method=e.body&&!e.method?"POST":(e.method||"GET").toUpperCase(),e.url=r.toString(n),e}},{"object-assign":43,"url-parse":50}],27:[function(t,e,r){"use strict";var n=/^https?:\/\//i;e.exports=function(t){if(!n.test(t.url))throw new Error('"'+t.url+'" is not a valid URL')}},{}],28:[function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=t("object-assign"),i=t("is-plain-object"),s=["boolean","string","number"],a=function(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)};e.exports=function(){return{processOptions:function(t){var e=t.body;return e&&!a(e)&&(-1!==s.indexOf(void 0===e?"undefined":n(e))||Array.isArray(e)||i(e)||e&&"function"==typeof e.toJSON)?o({},t,{body:JSON.stringify(t.body),headers:o({},t.headers,{"Content-Type":"application/json"})}):t}}}},{"is-plain-object":39,"object-assign":43}],29:[function(t,e,r){"use strict";function n(t){try{return JSON.parse(t)}catch(t){throw t.message="Failed to parsed response body as JSON: "+t.message,t}}var o=t("object-assign");e.exports=function(){return{onResponse:function(t){var e=t.headers["content-type"];return t.body&&e&&-1!==e.indexOf("application/json")?o({},t,{body:n(t.body)}):t},processOptions:function(t){return o({},t,{headers:o({Accept:"application/json"},t.headers)})}}}},{"object-assign":43}],30:[function(t,e,r){"use strict";var n=t("../util/global"),o=t("object-assign");e.exports=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.implementation||n.Observable;if(!e)throw new Error("`Observable` is not available in global scope, and no implementation was passed");return{onReturn:function(t,r){return new e(function(e){return t.error.subscribe(function(t){return e.error(t)}),t.progress.subscribe(function(t){return e.next(o({type:"progress"},t))}),t.response.subscribe(function(t){e.next(o({type:"response"},t)),e.complete()}),t.request.publish(r),function(){return t.abort.publish()}})}}}},{"../util/global":35,"object-assign":43}],31:[function(t,e,r){"use strict";e.exports=function(){return{onRequest:function(t){function e(t){return function(e){var r=e.lengthComputable?e.loaded/e.total*100:-1;n.channels.progress.publish({stage:t,percent:r,total:e.total,loaded:e.loaded,lengthComputable:e.lengthComputable})}}if("xhr"===t.adapter){var r=t.request,n=t.context;"upload"in r&&"onprogress"in r.upload&&(r.upload.onprogress=e("upload")),"onprogress"in r&&(r.onprogress=e("download"))}}}}},{}],32:[function(t,e,r){"use strict";e.exports=t("./node-progress")},{"./node-progress":31}],33:[function(t,e,r){"use strict";var n=t("same-origin"),o=t("parse-headers"),i=function(){},s=window,a=s.XMLHttpRequest||i,u="withCredentials"in new a,c=u?a:s.XDomainRequest;e.exports=function(t,e){function r(){j=!0,g&&g.abort()}function i(e){_=!0,g.abort();var r=new Error("ESOCKETTIMEDOUT"===e?"Socket timed out on request to "+d.url:"Connection timed out on request to "+d.url);r.code=e,t.channels.error.publish(r)}function u(){S&&(l(),y.socket=setTimeout(function(){return i("ESOCKETTIMEDOUT")},S.socket))}function l(){(j||g.readyState>=2&&y.connect)&&clearTimeout(y.connect),y.socket&&clearTimeout(y.socket)}function f(){if(!E){l(),E=!0,g=null;var t=new Error("Network error while attempting to reach "+d.url);t.isNetworkError=!0,t.request=d,e(t)}}function p(){var t=g.status,e=g.statusText;if(w&&void 0===t)t=200;else{if(t>12e3&&t<12156)return f();t=1223===g.status?204:g.status,e=1223===g.status?"No Content":e}return{body:g.response||g.responseText,url:d.url,method:d.method,headers:w?{}:o(g.getAllResponseHeaders()),statusCode:t,statusMessage:e}}function h(){if(!(j||E||_)){if(0===g.status)return void f(new Error("Unknown XHR error"));l(),E=!0,e(null,p())}}var d=t.options,b=!n(s.location.href,d.url),y={},v=t.applyMiddleware("interceptRequest",void 0,{adapter:"xhr",context:t});if(v){var m=setTimeout(e,0,null,v);return{abort:function(){return clearTimeout(m)}}}var g=b?new c:new a,w=s.XDomainRequest&&g instanceof s.XDomainRequest,O=d.headers,j=!1,E=!1,_=!1;if(g.onerror=f,g.ontimeout=f,g.onabort=function(){j=!0},g.onprogress=function(){},g[w?"onload":"onreadystatechange"]=function(){u(),j||4!==g.readyState&&!w||0!==g.status&&h()},g.open(d.method,d.url,!0),g.withCredentials=!!d.withCredentials,O&&g.setRequestHeader)for(var x in O)O.hasOwnProperty(x)&&g.setRequestHeader(x,O[x]);else if(O&&w)throw new Error("Headers cannot be set on an XDomainRequest object");d.rawBody&&(g.responseType="arraybuffer"),t.applyMiddleware("onRequest",{options:d,adapter:"xhr",request:g,context:t}),g.send(d.body||null);var S=d.timeout;return S&&(y.connect=setTimeout(function(){return i("ETIMEDOUT")},S.connect)),{abort:r}}},{"parse-headers":44,"same-origin":47}],34:[function(t,e,r){"use strict";e.exports=t("./node-request")},{"./node-request":33}],35:[function(t,e,r){(function(t){"use strict";"undefined"!=typeof window?e.exports=window:void 0!==t?e.exports=t:"undefined"!=typeof self?e.exports=self:e.exports={}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],36:[function(t,e,r){"use strict";e.exports=function(t){return function(e,r){for(var n=arguments.length,o=Array(n>2?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];return t[e].reduce(function(t,e){return e.apply(void 0,[t].concat(o))},r)}}},{}],37:[function(t,e,r){function n(t){var e=o.call(t);return"[object Function]"===e||"function"==typeof t&&"[object RegExp]"!==e||"undefined"!=typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)}e.exports=n;var o=Object.prototype.toString},{}],38:[function(t,e,r){"use strict";e.exports=function(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}},{}],39:[function(t,e,r){"use strict";function n(t){return!0===o(t)&&"[object Object]"===Object.prototype.toString.call(t)}var o=t("isobject");e.exports=function(t){var e,r;return!1!==n(t)&&"function"==typeof(e=t.constructor)&&(r=e.prototype,!1!==n(r)&&!1!==r.hasOwnProperty("isPrototypeOf"))}},{isobject:40}],
40:[function(t,e,r){"use strict";e.exports=function(t){return null!=t&&"object"==typeof t&&!1===Array.isArray(t)}},{}],41:[function(t,e,r){"use strict";function n(t){t&&i(this,"message",{configurable:!0,value:t,writable:!0});var e=this.constructor.name;e&&e!==this.name&&i(this,"name",{configurable:!0,value:e,writable:!0}),s(this,this.constructor)}function o(t,e){if(null==e||e===Error)e=n;else if("function"!=typeof e)throw new TypeError("super_ should be a function");var r;if("string"==typeof t)r=t,t=function(){e.apply(this,arguments)},a&&(a(t,r),r=null);else if("function"!=typeof t)throw new TypeError("constructor should be either a string or a function");t.super_=t.super=e;var o={constructor:{configurable:!0,value:t,writable:!0}};return null!=r&&(o.name={configurable:!0,value:r,writable:!0}),t.prototype=Object.create(e.prototype,o),t}var i=Object.defineProperty,s=Error.captureStackTrace;s||(s=function(t){var e=new Error;i(t,"stack",{configurable:!0,get:function(){var t=e.stack;return i(this,"stack",{value:t}),t},set:function(e){i(t,"stack",{configurable:!0,value:e,writable:!0})}})}),n.prototype=Object.create(Error.prototype,{constructor:{configurable:!0,value:n,writable:!0}});var a=function(){function t(t,e){return i(t,"name",{configurable:!0,value:e})}try{var e=function(){};if(t(e,"foo"),"foo"===e.name)return t}catch(t){}}();r=e.exports=o,r.BaseError=n},{}],42:[function(t,e,r){e.exports=function(){function t(t){return r.push(t),function(){var e=r.indexOf(t);e>-1&&r.splice(e,1)}}function e(){for(var t=0;t<r.length;t++)r[t].apply(null,arguments)}var r=[];return{subscribe:t,publish:e}}},{}],43:[function(t,e,r){"use strict";function n(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,a,u=n(t),c=1;c<arguments.length;c++){r=Object(arguments[c]);for(var l in r)i.call(r,l)&&(u[l]=r[l]);if(o){a=o(r);for(var f=0;f<a.length;f++)s.call(r,a[f])&&(u[a[f]]=r[a[f]])}}return u}},{}],44:[function(t,e,r){var n=t("trim"),o=t("for-each"),i=function(t){return"[object Array]"===Object.prototype.toString.call(t)};e.exports=function(t){if(!t)return{};var e={};return o(n(t).split("\n"),function(t){var r=t.indexOf(":"),o=n(t.slice(0,r)).toLowerCase(),s=n(t.slice(r+1));void 0===e[o]?e[o]=s:i(e[o])?e[o].push(s):e[o]=[e[o],s]}),e}},{"for-each":23,trim:49}],45:[function(t,e,r){"use strict";function n(t){return decodeURIComponent(t.replace(/\+/g," "))}function o(t){for(var e,r=/([^=?&]+)=?([^&]*)/g,o={};e=r.exec(t);o[n(e[1])]=n(e[2]));return o}function i(t,e){e=e||"";var r=[];"string"!=typeof e&&(e="?");for(var n in t)s.call(t,n)&&r.push(encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return r.length?e+r.join("&"):""}var s=Object.prototype.hasOwnProperty;r.stringify=i,r.parse=o},{}],46:[function(t,e,r){"use strict";e.exports=function(t,e){if(e=e.split(":")[0],!(t=+t))return!1;switch(e){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t}},{}],47:[function(t,e,r){"use strict";var n=t("url");e.exports=function(t,e,r){if(t===e)return!0;var o=n.parse(t,!1,!0),i=n.parse(e,!1,!0),s=0|o.port||("https"===o.protocol?443:80),a=0|i.port||("https"===i.protocol?443:80),u={proto:o.protocol===i.protocol,hostname:o.hostname===i.hostname,port:s===a};return u.proto&&u.hostname&&(u.port||r)}},{url:48}],48:[function(t,e,r){"use strict";var n=/^(?:(?:(?:([^:\/#\?]+:)?(?:(?:\/\/)((?:((?:[^:@\/#\?]+)(?:\:(?:[^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((?:\/?(?:[^\/\?#]+\/+)*)(?:[^\?#]*)))?(\?[^#]+)?)(#.*)?/;e.exports={regex:n,parse:function(t){var e=n.exec(t);return e?{protocol:(e[1]||"").toLowerCase()||void 0,hostname:(e[5]||"").toLowerCase()||void 0,port:e[6]||void 0}:{}}}},{}],49:[function(t,e,r){function n(t){return t.replace(/^\s*|\s*$/g,"")}r=e.exports=n,r.left=function(t){return t.replace(/^\s*/,"")},r.right=function(t){return t.replace(/\s*$/,"")}},{}],50:[function(t,e,r){(function(r){"use strict";function n(t){t=t||r.location||{};var e,n={},o=typeof t;if("blob:"===t.protocol)n=new s(unescape(t.pathname),{});else if("string"===o){n=new s(t,{});for(e in d)delete n[e]}else if("object"===o){for(e in t)e in d||(n[e]=t[e]);void 0===n.slashes&&(n.slashes=p.test(t.href))}return n}function o(t){var e=f.exec(t);return{protocol:e[1]?e[1].toLowerCase():"",slashes:!!e[2],rest:e[3]}}function i(t,e){for(var r=(e||"/").split("/").slice(0,-1).concat(t.split("/")),n=r.length,o=r[n-1],i=!1,s=0;n--;)"."===r[n]?r.splice(n,1):".."===r[n]?(r.splice(n,1),s++):s&&(0===n&&(i=!0),r.splice(n,1),s--);return i&&r.unshift(""),"."!==o&&".."!==o||r.push(""),r.join("/")}function s(t,e,r){if(!(this instanceof s))return new s(t,e,r);var a,u,f,p,d,b,y=h.slice(),v=typeof e,m=this,g=0;for("object"!==v&&"string"!==v&&(r=e,e=null),r&&"function"!=typeof r&&(r=l.parse),e=n(e),u=o(t||""),a=!u.protocol&&!u.slashes,m.slashes=u.slashes||a&&e.slashes,m.protocol=u.protocol||e.protocol||"",t=u.rest,u.slashes||(y[2]=[/(.*)/,"pathname"]);g<y.length;g++)p=y[g],f=p[0],b=p[1],f!==f?m[b]=t:"string"==typeof f?~(d=t.indexOf(f))&&("number"==typeof p[2]?(m[b]=t.slice(0,d),t=t.slice(d+p[2])):(m[b]=t.slice(d),t=t.slice(0,d))):(d=f.exec(t))&&(m[b]=d[1],t=t.slice(0,d.index)),m[b]=m[b]||(a&&p[3]?e[b]||"":""),p[4]&&(m[b]=m[b].toLowerCase());r&&(m.query=r(m.query)),a&&e.slashes&&"/"!==m.pathname.charAt(0)&&(""!==m.pathname||""!==e.pathname)&&(m.pathname=i(m.pathname,e.pathname)),c(m.port,m.protocol)||(m.host=m.hostname,m.port=""),m.username=m.password="",m.auth&&(p=m.auth.split(":"),m.username=p[0]||"",m.password=p[1]||""),m.origin=m.protocol&&m.host&&"file:"!==m.protocol?m.protocol+"//"+m.host:"null",m.href=m.toString()}function a(t,e,r){var n=this;switch(t){case"query":"string"==typeof e&&e.length&&(e=(r||l.parse)(e)),n[t]=e;break;case"port":n[t]=e,c(e,n.protocol)?e&&(n.host=n.hostname+":"+e):(n.host=n.hostname,n[t]="");break;case"hostname":n[t]=e,n.port&&(e+=":"+n.port),n.host=e;break;case"host":n[t]=e,/:\d+$/.test(e)?(e=e.split(":"),n.port=e.pop(),n.hostname=e.join(":")):(n.hostname=e,n.port="");break;case"protocol":n.protocol=e.toLowerCase(),n.slashes=!r;break;case"pathname":n.pathname=e.length&&"/"!==e.charAt(0)?"/"+e:e;break;default:n[t]=e}for(var o=0;o<h.length;o++){var i=h[o];i[4]&&(n[i[1]]=n[i[1]].toLowerCase())}return n.origin=n.protocol&&n.host&&"file:"!==n.protocol?n.protocol+"//"+n.host:"null",n.href=n.toString(),n}function u(t){t&&"function"==typeof t||(t=l.stringify);var e,r=this,n=r.protocol;n&&":"!==n.charAt(n.length-1)&&(n+=":");var o=n+(r.slashes?"//":"");return r.username&&(o+=r.username,r.password&&(o+=":"+r.password),o+="@"),o+=r.host+r.pathname,e="object"==typeof r.query?t(r.query):r.query,e&&(o+="?"!==e.charAt(0)?"?"+e:e),r.hash&&(o+=r.hash),o}var c=t("requires-port"),l=t("querystringify"),f=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i,p=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,h=[["#","hash"],["?","query"],["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],d={hash:1,query:1};s.prototype={set:a,toString:u},s.extractProtocol=o,s.location=n,s.qs=l,e.exports=s}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{querystringify:45,"requires-port":46}],51:[function(t,e,r){var n=t("eventsource-polyfill/dist/eventsource");e.exports=window.EventSource||n.EventSource},{"eventsource-polyfill/dist/eventsource":52}],52:[function(t,e,r){!function(t){function e(t,e,r,n){this.bubbles=!1,this.cancelBubble=!1,this.cancelable=!1,this.data=e||null,this.origin=r||"",this.lastEventId=n||"",this.type=t||"message"}if(!t.EventSource||t._eventSourceImportPrefix){var r=(t._eventSourceImportPrefix||"")+"EventSource",n=function(t,e){if(!t||"string"!=typeof t)throw new SyntaxError("Not enough arguments");this.URL=t,this.setOptions(e);var r=this;setTimeout(function(){r.poll()},0)};if(n.prototype={CONNECTING:0,OPEN:1,CLOSED:2,defaultOptions:{loggingEnabled:!1,loggingPrefix:"eventsource",interval:500,bufferSizeLimit:262144,silentTimeout:3e5,getArgs:{evs_buffer_size_limit:262144},xhrHeaders:{Accept:"text/event-stream","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"}},setOptions:function(t){var e,r=this.defaultOptions;for(e in r)r.hasOwnProperty(e)&&(this[e]=r[e]);for(e in t)e in r&&t.hasOwnProperty(e)&&(this[e]=t[e]);this.getArgs&&this.bufferSizeLimit&&(this.getArgs.evs_buffer_size_limit=this.bufferSizeLimit),"undefined"!=typeof console&&void 0!==console.log||(this.loggingEnabled=!1)},log:function(t){this.loggingEnabled&&console.log("["+this.loggingPrefix+"]:"+t)},poll:function(){try{if(this.readyState==this.CLOSED)return;this.cleanup(),this.readyState=this.CONNECTING,this.cursor=0,this.cache="",this._xhr=new this.XHR(this),this.resetNoActivityTimer()}catch(t){this.log("There were errors inside the pool try-catch"),this.dispatchEvent("error",{type:"error",data:t.message})}},pollAgain:function(t){var e=this;e.readyState=e.CONNECTING,e.dispatchEvent("error",{type:"error",data:"Reconnecting "}),this._pollTimer=setTimeout(function(){e.poll()},t||0)},cleanup:function(){this.log("evs cleaning up"),this._pollTimer&&(clearInterval(this._pollTimer),this._pollTimer=null),this._noActivityTimer&&(clearInterval(this._noActivityTimer),this._noActivityTimer=null),this._xhr&&(this._xhr.abort(),this._xhr=null)},resetNoActivityTimer:function(){if(this.silentTimeout){this._noActivityTimer&&clearInterval(this._noActivityTimer);var t=this;this._noActivityTimer=setTimeout(function(){t.log("Timeout! silentTImeout:"+t.silentTimeout),t.pollAgain()},this.silentTimeout)}},close:function(){this.readyState=this.CLOSED,this.log("Closing connection. readyState: "+this.readyState),this.cleanup()},ondata:function(){var t=this._xhr;if(t.isReady()&&!t.hasError()){this.resetNoActivityTimer(),this.readyState==this.CONNECTING&&(this.readyState=this.OPEN,this.dispatchEvent("open",{type:"open"}));var e=t.getBuffer();e.length>this.bufferSizeLimit&&(this.log("buffer.length > this.bufferSizeLimit"),this.pollAgain()),0==this.cursor&&e.length>0&&"\ufeff"==e.substring(0,1)&&(this.cursor=1);var r=this.lastMessageIndex(e);if(r[0]>=this.cursor){var n=r[1],o=e.substring(this.cursor,n);this.parseStream(o),this.cursor=n}t.isDone()&&(this.log("request.isDone(). reopening the connection"),this.pollAgain(this.interval))}else this.readyState!==this.CLOSED&&(this.log("this.readyState !== this.CLOSED"),this.pollAgain(this.interval))},parseStream:function(t){t=this.cache+this.normalizeToLF(t);var r,n,o,i,s,a,u=t.split("\n\n");for(r=0;r<u.length-1;r++){for(o="message",i=[],parts=u[r].split("\n"),n=0;n<parts.length;n++)s=this.trimWhiteSpace(parts[n]),0==s.indexOf("event")?o=s.replace(/event:?\s*/,""):0==s.indexOf("retry")?(a=parseInt(s.replace(/retry:?\s*/,"")),isNaN(a)||(this.interval=a)):0==s.indexOf("data")?i.push(s.replace(/data:?\s*/,"")):0==s.indexOf("id:")?this.lastEventId=s.replace(/id:?\s*/,""):0==s.indexOf("id")&&(this.lastEventId=null);if(i.length){var c=new e(o,i.join("\n"),window.location.origin,this.lastEventId);this.dispatchEvent(o,c)}}this.cache=u[u.length-1]},dispatchEvent:function(t,e){var r=this["_"+t+"Handlers"];if(r)for(var n=0;n<r.length;n++)r[n].call(this,e);this["on"+t]&&this["on"+t].call(this,e)},addEventListener:function(t,e){this["_"+t+"Handlers"]||(this["_"+t+"Handlers"]=[]),this["_"+t+"Handlers"].push(e)},removeEventListener:function(t,e){var r=this["_"+t+"Handlers"];if(r)for(var n=r.length-1;n>=0;--n)if(r[n]===e){r.splice(n,1);break}},_pollTimer:null,_noactivityTimer:null,_xhr:null,lastEventId:null,cache:"",cursor:0,onerror:null,onmessage:null,onopen:null,readyState:0,urlWithParams:function(t,e){var r=[];if(e){var n,o,i=encodeURIComponent;for(n in e)e.hasOwnProperty(n)&&(o=i(n)+"="+i(e[n]),r.push(o))}return r.length>0?-1==t.indexOf("?")?t+"?"+r.join("&"):t+"&"+r.join("&"):t},lastMessageIndex:function(t){var e=t.lastIndexOf("\n\n"),r=t.lastIndexOf("\r\r"),n=t.lastIndexOf("\r\n\r\n");return n>Math.max(e,r)?[n,n+4]:[Math.max(e,r),Math.max(e,r)+2]},trimWhiteSpace:function(t){var e=/^(\s|\u00A0)+|(\s|\u00A0)+$/g;return t.replace(e,"")},normalizeToLF:function(t){return t.replace(/\r\n|\r/g,"\n")}},function(){return!(!window.XDomainRequest||!window.XMLHttpRequest||void 0!==(new XMLHttpRequest).responseType)}()){n.isPolyfill="IE_8-9";var o=n.prototype.defaultOptions;o.xhrHeaders=null,o.getArgs.evs_preamble=2056,n.prototype.XHR=function(t){request=new XDomainRequest,this._request=request,request.onprogress=function(){request._ready=!0,t.ondata()},request.onload=function(){this._loaded=!0,t.ondata()},request.onerror=function(){this._failed=!0,t.readyState=t.CLOSED,t.dispatchEvent("error",{type:"error",data:"XDomainRequest error"})},request.ontimeout=function(){this._failed=!0,t.readyState=t.CLOSED,t.dispatchEvent("error",{type:"error",data:"XDomainRequest timed out"})};var e={};if(t.getArgs){var r=t.getArgs;for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n]);t.lastEventId&&(e.evs_last_event_id=t.lastEventId)}request.open("GET",t.urlWithParams(t.URL,e)),request.send()},n.prototype.XHR.prototype={useXDomainRequest:!0,_request:null,_ready:!1,_loaded:!1,_failed:!1,isReady:function(){return this._request._ready},isDone:function(){return this._request._loaded},hasError:function(){return this._request._failed},getBuffer:function(){var t="";try{t=this._request.responseText||""}catch(t){}return t},abort:function(){this._request&&this._request.abort()}}}else n.isPolyfill="XHR",n.prototype.XHR=function(t){request=new XMLHttpRequest,this._request=request,t._xhr=this,request.onreadystatechange=function(){request.readyState>1&&t.readyState!=t.CLOSED&&(200==request.status||request.status>=300&&request.status<400?t.ondata():(request._failed=!0,t.readyState=t.CLOSED,t.dispatchEvent("error",{type:"error",data:"The server responded with "+request.status}),t.close()))},request.onprogress=function(){},request.open("GET",t.urlWithParams(t.URL,t.getArgs),!0);var e=t.xhrHeaders;for(var r in e)e.hasOwnProperty(r)&&request.setRequestHeader(r,e[r]);t.lastEventId&&request.setRequestHeader("Last-Event-Id",t.lastEventId),request.send()},n.prototype.XHR.prototype={useXDomainRequest:!1,_request:null,_failed:!1,isReady:function(){return this._request.readyState>=2},isDone:function(){return 4==this._request.readyState},hasError:function(){return this._failed||this._request.status>=400},getBuffer:function(){var t="";try{t=this._request.responseText||""}catch(t){}return t},abort:function(){this._request&&this._request.abort()}};t[r]=n}}(this)},{}],53:[function(t,e,r){e.exports=function(t){return"https://docs.sanity.io/help/"+t}},{}],54:[function(t,e,r){"use strict";function n(){i.apply(this,arguments)}var o=t("rxjs/Observable"),i=o.Observable,s=t("rxjs/operator/map"),a=s.map,u=t("rxjs/operator/filter"),c=u.filter,l=t("rxjs/operator/reduce"),f=l.reduce,p=t("rxjs/operator/toPromise"),h=p.toPromise,d=t("object-assign");n.prototype=Object.create(d(Object.create(null),i.prototype)),Object.defineProperty(n.prototype,"constructor",{value:n,enumerable:!1,writable:!0,configurable:!0}),n.prototype.lift=function(t){var e=new n;return e.source=this,e.operator=t,e},n.prototype.map=a,n.prototype.filter=c,n.prototype.reduce=f,n.prototype.toPromise=h,e.exports=n},{"object-assign":56,"rxjs/Observable":57,"rxjs/operator/filter":61,"rxjs/operator/map":62,"rxjs/operator/reduce":63,"rxjs/operator/toPromise":64}],55:[function(t,e,r){e.exports=t("./lib/SanityObservableMinimal")},{"./lib/SanityObservableMinimal":54}],56:[function(t,e,r){arguments[4][43][0].apply(r,arguments)},{dup:43}],57:[function(t,e,r){"use strict";var n=t("./util/root"),o=t("./util/toSubscriber"),i=t("./symbol/observable"),s=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(t,e,r){var n=this.operator,i=o.toSubscriber(t,e,r);if(n?n.call(i,this.source):i.add(this._subscribe(i)),i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},t.prototype.forEach=function(t,e){var r=this;if(e||(n.root.Rx&&n.root.Rx.config&&n.root.Rx.config.Promise?e=n.root.Rx.config.Promise:n.root.Promise&&(e=n.root.Promise)),!e)throw new Error("no Promise impl found");return new e(function(e,n){var o=r.subscribe(function(e){if(o)try{t(e)}catch(t){n(t),o.unsubscribe()}else t(e)},n,e)})},t.prototype._subscribe=function(t){return this.source.subscribe(t)},t.prototype[i.$$observable]=function(){return this},t.create=function(e){return new t(e)},t}();r.Observable=s},{"./symbol/observable":65,"./util/root":72,"./util/toSubscriber":73}],58:[function(t,e,r){"use strict";r.empty={closed:!0,next:function(t){},error:function(t){throw t},complete:function(){}}},{}],59:[function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=t("./util/isFunction"),i=t("./Subscription"),s=t("./Observer"),a=t("./symbol/rxSubscriber"),u=function(t){function e(r,n,o){switch(t.call(this),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=s.empty;break;case 1:if(!r){this.destination=s.empty;break}if("object"==typeof r){r instanceof e?(this.destination=r,this.destination.add(this)):(this.syncErrorThrowable=!0,this.destination=new c(this,r));break}default:this.syncErrorThrowable=!0,this.destination=new c(this,r,n,o)}}return n(e,t),e.prototype[a.$$rxSubscriber]=function(){return this},e.create=function(t,r,n){var o=new e(t,r,n);return o.syncErrorThrowable=!1,o},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e}(i.Subscription);r.Subscriber=u;var c=function(t){function e(e,r,n,i){t.call(this),this._parent=e;var s,a=this;o.isFunction(r)?s=r:r&&(a=r,s=r.next,n=r.error,i=r.complete,o.isFunction(a.unsubscribe)&&this.add(a.unsubscribe.bind(a)),a.unsubscribe=this.unsubscribe.bind(this)),this._context=a,this._next=s,this._error=n,this._complete=i}return n(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parent;e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parent;if(this._error)e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else{if(!e.syncErrorThrowable)throw this.unsubscribe(),t;e.syncErrorValue=t,e.syncErrorThrown=!0,this.unsubscribe()}}},e.prototype.complete=function(){if(!this.isStopped){var t=this._parent;this._complete?t.syncErrorThrowable?(this.__tryOrSetError(t,this._complete),this.unsubscribe()):(this.__tryOrUnsub(this._complete),this.unsubscribe()):this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){throw this.unsubscribe(),t}},e.prototype.__tryOrSetError=function(t,e,r){try{e.call(this._context,r)}catch(e){return t.syncErrorValue=e,t.syncErrorThrown=!0,!0}return!1},e.prototype._unsubscribe=function(){var t=this._parent;this._context=null,this._parent=null,t.unsubscribe()},e}(u)},{"./Observer":58,"./Subscription":60,"./symbol/rxSubscriber":66,"./util/isFunction":70}],60:[function(t,e,r){"use strict";function n(t){return t.reduce(function(t,e){return t.concat(e instanceof l.UnsubscriptionError?e.errors:e)},[])}var o=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("./util/isArray"),s=t("./util/isObject"),a=t("./util/isFunction"),u=t("./util/tryCatch"),c=t("./util/errorObject"),l=t("./util/UnsubscriptionError"),f=function(){function t(t){this.closed=!1,t&&(this._unsubscribe=t)}return t.prototype.unsubscribe=function(){var t,e=!1;if(!this.closed){this.closed=!0;var r=this,o=r._unsubscribe,f=r._subscriptions;if(this._subscriptions=null,a.isFunction(o)){var p=u.tryCatch(o).call(this);p===c.errorObject&&(e=!0,t=t||(c.errorObject.e instanceof l.UnsubscriptionError?n(c.errorObject.e.errors):[c.errorObject.e]))}if(i.isArray(f))for(var h=-1,d=f.length;++h<d;){var b=f[h];if(s.isObject(b)){var p=u.tryCatch(b.unsubscribe).call(b);if(p===c.errorObject){e=!0,t=t||[];var y=c.errorObject.e;y instanceof l.UnsubscriptionError?t=t.concat(n(y.errors)):t.push(y)}}}if(e)throw new l.UnsubscriptionError(t)}},t.prototype.add=function(e){if(!e||e===t.EMPTY)return t.EMPTY;if(e===this)return this;var r=e;switch(typeof e){case"function":r=new t(e);case"object":if(r.closed||"function"!=typeof r.unsubscribe)return r;if(this.closed)return r.unsubscribe(),r;break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var n=new p(r,this);return this._subscriptions=this._subscriptions||[],this._subscriptions.push(n),n},t.prototype.remove=function(e){if(null!=e&&e!==this&&e!==t.EMPTY){var r=this._subscriptions;if(r){var n=r.indexOf(e);-1!==n&&r.splice(n,1)}}},t.EMPTY=function(t){return t.closed=!0,t}(new t),t}();r.Subscription=f;var p=function(t){function e(e,r){t.call(this),this._innerSub=e,this._parent=r}return o(e,t),e.prototype._unsubscribe=function(){var t=this,e=t._innerSub;t._parent.remove(this),e.unsubscribe()},e}(f);r.ChildSubscription=p},{"./util/UnsubscriptionError":67,"./util/errorObject":68,"./util/isArray":69,"./util/isFunction":70,"./util/isObject":71,"./util/tryCatch":74}],61:[function(t,e,r){"use strict";function n(t,e){return this.lift(new s(t,e))}var o=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../Subscriber");r.filter=n;var s=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.predicate,this.thisArg))},t}(),a=function(t){function e(e,r,n){t.call(this,e),this.predicate=r,this.thisArg=n,this.count=0,this.predicate=r}return o(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}e&&this.destination.next(t)},e}(i.Subscriber)},{"../Subscriber":59}],62:[function(t,e,r){"use strict";function n(t,e){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return this.lift(new s(t,e))}var o=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../Subscriber");r.map=n;var s=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.project,this.thisArg))},t}();r.MapOperator=s;var a=function(t){function e(e,r,n){t.call(this,e),this.project=r,this.count=0,this.thisArg=n||this}return o(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(i.Subscriber)},{"../Subscriber":59}],63:[function(t,e,r){"use strict";function n(t,e){var r=!1;return arguments.length>=2&&(r=!0),this.lift(new s(t,e,r))}var o=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("../Subscriber");r.reduce=n;var s=function(){function t(t,e,r){void 0===r&&(r=!1),this.accumulator=t,this.seed=e,this.hasSeed=r}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.accumulator,this.seed,this.hasSeed))},t}();r.ReduceOperator=s;var a=function(t){function e(e,r,n,o){t.call(this,e),this.accumulator=r,this.hasSeed=o,this.hasValue=!1,this.acc=n}return o(e,t),e.prototype._next=function(t){this.hasValue||(this.hasValue=this.hasSeed)?this._tryReduce(t):(this.acc=t,this.hasValue=!0)},e.prototype._tryReduce=function(t){var e;try{e=this.accumulator(this.acc,t)}catch(t){return void this.destination.error(t)}this.acc=e},e.prototype._complete=function(){(this.hasValue||this.hasSeed)&&this.destination.next(this.acc),this.destination.complete()},e}(i.Subscriber);r.ReduceSubscriber=a},{"../Subscriber":59}],64:[function(t,e,r){"use strict";function n(t){var e=this;if(t||(o.root.Rx&&o.root.Rx.config&&o.root.Rx.config.Promise?t=o.root.Rx.config.Promise:o.root.Promise&&(t=o.root.Promise)),!t)throw new Error("no Promise impl found");return new t(function(t,r){var n;e.subscribe(function(t){return n=t},function(t){return r(t)},function(){return t(n)})})}var o=t("../util/root");r.toPromise=n},{"../util/root":72}],65:[function(t,e,r){"use strict";function n(t){var e,r=t.Symbol;return"function"==typeof r?r.observable?e=r.observable:(e=r("observable"),r.observable=e):e="@@observable",e}var o=t("../util/root");r.getSymbolObservable=n,r.$$observable=n(o.root)},{"../util/root":72}],66:[function(t,e,r){"use strict";var n=t("../util/root"),o=n.root.Symbol;r.$$rxSubscriber="function"==typeof o&&"function"==typeof o.for?o.for("rxSubscriber"):"@@rxSubscriber"},{"../util/root":72}],67:[function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=function(t){function e(e){t.call(this),this.errors=e;var r=Error.call(this,e?e.length+" errors occurred during unsubscription:\n "+e.map(function(t,e){return e+1+") "+t.toString()}).join("\n "):"");this.name=r.name="UnsubscriptionError",this.stack=r.stack,this.message=r.message}return n(e,t),e}(Error);r.UnsubscriptionError=o},{}],68:[function(t,e,r){"use strict";r.errorObject={e:{}}},{}],69:[function(t,e,r){"use strict";r.isArray=Array.isArray||function(t){return t&&"number"==typeof t.length}},{}],70:[function(t,e,r){"use strict";function n(t){return"function"==typeof t}r.isFunction=n},{}],71:[function(t,e,r){"use strict";function n(t){return null!=t&&"object"==typeof t}r.isObject=n},{}],72:[function(t,e,r){(function(t){"use strict";if(r.root="object"==typeof window&&window.window===window&&window||"object"==typeof self&&self.self===self&&self||"object"==typeof t&&t.global===t&&t,!r.root)throw new Error("RxJS could not find any global context (window, self, global)")}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],73:[function(t,e,r){"use strict";function n(t,e,r){if(t){if(t instanceof o.Subscriber)return t;if(t[i.$$rxSubscriber])return t[i.$$rxSubscriber]()}return t||e||r?new o.Subscriber(t,e,r):new o.Subscriber(s.empty)}var o=t("../Subscriber"),i=t("../symbol/rxSubscriber"),s=t("../Observer");r.toSubscriber=n},{"../Observer":58,"../Subscriber":59,"../symbol/rxSubscriber":66}],74:[function(t,e,r){"use strict";function n(){try{return i.apply(this,arguments)}catch(t){return s.errorObject.e=t,s.errorObject}}function o(t){return i=t,n}var i,s=t("./errorObject");r.tryCatch=o},{"./errorObject":68}]},{},[16])(16)});

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc