@sanity/client 3.3.3-esm.9 → 3.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).SanityClient=e()}}((function(){return function e(t,r,n){function o(s,a){if(!r[s]){if(!t[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:{}};t[s][0].call(l.exports,(function(e){return o(t[s][1][e]||e)}),l,l.exports,e,t,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(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o,i=e("../util/observable"),s=(o=e("../http/queryString"))&&o.__esModule?o:{default:o},a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=u(t);if(r&&r.has(e))return r.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var a=i?Object.getOwnPropertyDescriptor(e,s):null;a&&(a.get||a.set)?Object.defineProperty(o,s,a):o[s]=e[s]}return o.default=e,r&&r.set(e,o),o}(e("../validators"));function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(u=function(e){return e?r:t})(e)}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],s=!0,a=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==r.return||r.return()}finally{if(a)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(){return(f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function d(e){this.client=e}function p(e,t){return"undefined"!=typeof window&&t instanceof window.File?f({filename:!1===e.preserveFilename?void 0:t.name,contentType:t.type},e):e}f(d.prototype,{upload:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};a.validateAssetType(e);var n=r.extract||void 0;n&&!n.length&&(n=["none"]);var o=a.hasDataset(this.client.clientConfig),s="image"===e?"images":"files",u=p(r,t),c=u.tag,l=u.label,f=u.title,d=u.description,h=u.creditLine,y=u.filename,b=u.source,v={label:l,title:f,description:d,filename:y,meta:n,creditLine:h};b&&(v.sourceId=b.id,v.sourceName=b.name,v.sourceUrl=b.url);var g=this.client._requestObservable({tag:c,method:"POST",timeout:u.timeout||0,uri:"/assets/".concat(s,"/").concat(o),headers:u.contentType?{"Content-Type":u.contentType}:{},query:v,body:t});return this.client.isPromiseAPI()?g.pipe((0,i.filter)((function(e){return"response"===e.type})),(0,i.map)((function(e){return e.body.document}))).toPromise():g},delete:function(e,t){console.warn("client.assets.delete() is deprecated, please use client.delete(<document-id>)");var r=t||"";return/^(image|file)-/.test(r)?e._id&&(r=e._id):r="".concat(e,"-").concat(r),a.hasDataset(this.client.clientConfig),this.client.delete(r)},getImageUrl:function(e,t){var r=e._ref||e;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 "'.concat(r,'". URL generation only works for auto-generated IDs.'));var n=c(r.split("-"),4),o=n[1],i=n[2],u=n[3];a.hasDataset(this.client.clientConfig);var l=this.client.clientConfig,f=l.projectId,d=l.dataset,p=t?(0,s.default)(t):"";return"https://cdn.sanity.io/images/".concat(f,"/").concat(d,"/").concat(o,"-").concat(i,".").concat(u).concat(p)}});var h=d;r.default=h,t.exports=r.default},{"../http/queryString":13,"../util/observable":21,"../validators":24}],2:[function(e,t,r){"use strict";function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function o(e){this.client=e}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,n(o.prototype,{getLoginProviders:function(){return this.client.request({uri:"/auth/providers"})},logout:function(){return this.client.request({uri:"/auth/logout",method:"POST"})}});var i=o;r.default=i,t.exports=r.default},{}],3:[function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.validateApiVersion=r.initConfig=r.defaultConfig=void 0;var o,i=(o=e("./generateHelpUrl"))&&o.__esModule?o:{default:o},s=c(e("./validators")),a=c(e("./warnings"));function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(u=function(e){return e?r:t})(e)}function c(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=u(t);if(r&&r.has(e))return r.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var a=i?Object.getOwnPropertyDescriptor(e,s):null;a&&(a.get||a.set)?Object.defineProperty(o,s,a):o[s]=e[s]}return o.default=e,r&&r.set(e,o),o}function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var f={apiHost:"https://api.sanity.io",apiVersion:"1",useProjectHostname:!0,isPromiseAPI:!0};r.defaultConfig=f;var d=["localhost","127.0.0.1","0.0.0.0"],p=function(e){if("1"!==e&&"X"!==e){var t=new Date(e);if(!(/^\d{4}-\d{2}-\d{2}$/.test(e)&&t instanceof Date&&t.getTime()>0))throw new Error("Invalid API version string, expected `1` or date in format `YYYY-MM-DD`")}};r.validateApiVersion=p;r.initConfig=function(e,t){var r=l({},t,e);r.apiVersion||a.printNoApiVersionSpecifiedWarning();var n=l({},f,r),o=n.useProjectHostname;if("undefined"==typeof Promise){var u=(0,i.default)("js-client-promise-polyfill");throw new Error("No native Promise-implementation found, polyfill needed - see ".concat(u))}if(o&&!n.projectId)throw new Error("Configuration must contain `projectId`");var c="undefined"!=typeof window&&window.location&&window.location.hostname,h=c&&function(e){return-1!==d.indexOf(e)}(window.location.hostname);c&&h&&n.token&&!0!==n.ignoreBrowserTokenWarning?a.printBrowserTokenWarning():void 0===n.useCdn&&a.printCdnWarning(),o&&s.projectId(n.projectId),n.dataset&&s.dataset(n.dataset),"requestTagPrefix"in n&&(n.requestTagPrefix=n.requestTagPrefix?s.requestTag(n.requestTagPrefix).replace(/\.+$/,""):void 0),n.apiVersion="".concat(n.apiVersion).replace(/^v/,""),n.isDefaultApi=n.apiHost===f.apiHost,n.useCdn=Boolean(n.useCdn)&&!n.withCredentials,p(n.apiVersion);var y=n.apiHost.split("://",2),b=y[0],v=y[1],g=n.isDefaultApi?"apicdn.sanity.io":v;return n.useProjectHostname?(n.url="".concat(b,"://").concat(n.projectId,".").concat(v,"/v").concat(n.apiVersion),n.cdnUrl="".concat(b,"://").concat(n.projectId,".").concat(g,"/v").concat(n.apiVersion)):(n.url="".concat(n.apiHost,"/v").concat(n.apiVersion),n.cdnUrl=n.url),n}},{"./generateHelpUrl":10,"./validators":24,"./warnings":25}],4:[function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=e("../util/observable"),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=d(t);if(r&&r.has(e))return r.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var a=i?Object.getOwnPropertyDescriptor(e,s):null;a&&(a.get||a.set)?Object.defineProperty(o,s,a):o[s]=e[s]}return o.default=e,r&&r.set(e,o),o}(e("../validators")),s=f(e("../util/getSelection")),a=f(e("./encodeQueryString")),u=f(e("./transaction")),c=f(e("./patch")),l=f(e("./listen"));function f(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(d=function(e){return e?r:t})(e)}function p(){return(p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function h(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var y=function(e,t){return!1===e?void 0:void 0===e?t:e},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{dryRun:e.dryRun,returnIds:!0,returnDocuments:y(e.returnDocuments,!0),visibility:e.visibility||"sync",autoGenerateArrayKeys:e.autoGenerateArrayKeys,skipCrossDatasetReferenceValidation:e.skipCrossDatasetReferenceValidation}},v=function(e){return"response"===e.type},g=function(e){return e.body},m=function(e,t){return e.reduce((function(e,r){return e[t(r)]=r,e}),Object.create(null))},w=function(e){return e.toPromise()},O={listen:l.default,getDataUrl:function(e,t){var r=this.clientConfig,n=i.hasDataset(r),o="/".concat(e,"/").concat(n),s=t?"".concat(o,"/").concat(t):o;return"/data".concat(s).replace(/\/($|\?)/,"$1")},fetch:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=!1===r.filterResponse?function(e){return e}:function(e){return e.result},i=this._dataRequest("query",{query:e,params:t},r).pipe((0,o.map)(n));return this.isPromiseAPI()?w(i):i},getDocument:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={uri:this.getDataUrl("doc",e),json:!0,tag:t.tag},n=this._requestObservable(r).pipe((0,o.filter)(v),(0,o.map)((function(e){return e.body.documents&&e.body.documents[0]})));return this.isPromiseAPI()?w(n):n},getDocuments:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={uri:this.getDataUrl("doc",e.join(",")),json:!0,tag:t.tag},n=this._requestObservable(r).pipe((0,o.filter)(v),(0,o.map)((function(t){var r=m(t.body.documents||[],(function(e){return e._id}));return e.map((function(e){return r[e]||null}))})));return this.isPromiseAPI()?w(n):n},create:function(e,t){return this._create(e,"create",t)},createIfNotExists:function(e,t){return i.requireDocumentId("createIfNotExists",e),this._create(e,"createIfNotExists",t)},createOrReplace:function(e,t){return i.requireDocumentId("createOrReplace",e),this._create(e,"createOrReplace",t)},patch:function(e,t){return new c.default(e,t,this)},delete:function(e,t){return this.dataRequest("mutate",{mutations:[{delete:(0,s.default)(e)}]},t)},mutate:function(e,t){var r=e instanceof c.default||e instanceof u.default?e.serialize():e,n=Array.isArray(r)?r:[r],o=t&&t.transactionId;return this.dataRequest("mutate",{mutations:n,transactionId:o},t)},transaction:function(e){return new u.default(e,this)},dataRequest:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this._dataRequest(e,t,r);return this.isPromiseAPI()?w(n):n},_dataRequest:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n="mutate"===e,i="query"===e,s=!n&&(0,a.default)(t),u=!n&&s.length<11264,c=u?s:"",l=r.returnFirst,f=r.timeout,d=r.token,p=r.tag,y=r.headers,m={method:u?"GET":"POST",uri:this.getDataUrl(e,c),json:!0,body:u?void 0:t,query:n&&b(r),timeout:f,headers:y,token:d,tag:p,canUseCdn:i};return this._requestObservable(m).pipe((0,o.filter)(v),(0,o.map)(g),(0,o.map)((function(e){if(!n)return e;var t=e.results||[];if(r.returnDocuments)return l?t[0]&&t[0].document:t.map((function(e){return e.document}));var o=l?"documentId":"documentIds",i=l?t[0]&&t[0].id:t.map((function(e){return e.id}));return h({transactionId:e.transactionId,results:t},o,i)})))},_create:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=h({},t,e),o=p({returnFirst:!0,returnDocuments:!0},r);return this.dataRequest("mutate",{mutations:[n]},o)}};r.default=O,t.exports=r.default},{"../util/getSelection":20,"../util/observable":21,"../validators":24,"./encodeQueryString":5,"./listen":6,"./patch":7,"./transaction":8}],5:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=["tag"];function o(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var i=encodeURIComponent;r.default=function(e){var t=e.query,r=e.params,s=void 0===r?{}:r,a=e.options,u=void 0===a?{}:a,c=u.tag,l=o(u,n),f="query=".concat(i(t)),d=c?"?tag=".concat(i(c),"&").concat(f):"?".concat(f),p=Object.keys(s).reduce((function(e,t){return"".concat(e,"&").concat(i("$".concat(t)),"=").concat(i(JSON.stringify(s[t])))}),d);return Object.keys(l).reduce((function(e,t){return u[t]?"".concat(e,"&").concat(i(t),"=").concat(i(u[t])):e}),p)},t.exports=r.default},{}],6:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=this.clientConfig,u=o.url,c=o.token,l=o.withCredentials,d=o.requestTagPrefix,g=r.tag&&d?[d,r.tag].join("."):r.tag,m=f(f({},(0,s.default)(r,y)),{},{tag:g}),w=(0,i.default)(m,h),O=(0,a.default)({query:e,params:t,options:w,tag:g}),_="".concat(u).concat(this.getDataUrl("listen",O));if(_.length>14800)return new n.Observable((function(e){return e.error(new Error("Query too large for listener"))}));var j=m.events?m.events:["mutation"],C=-1!==j.indexOf("reconnect"),P={};return(c||l)&&(P.withCredentials=!0),c&&(P.headers={Authorization:"Bearer ".concat(c)}),new n.Observable((function(e){var t,r=c(),n=!1;function o(){n||(C&&e.next({type:"reconnect"}),n||r.readyState===p.CLOSED&&(u(),clearTimeout(t),t=setTimeout(l,100)))}function i(t){e.error(v(t))}function s(t){var r=b(t);return r instanceof Error?e.error(r):e.next(r)}function a(t){n=!0,u(),e.complete()}function u(){r.removeEventListener("error",o,!1),r.removeEventListener("channelError",i,!1),r.removeEventListener("disconnect",a,!1),j.forEach((function(e){return r.removeEventListener(e,s,!1)})),r.close()}function c(){var e=new p(_,P);return e.addEventListener("error",o,!1),e.addEventListener("channelError",i,!1),e.addEventListener("disconnect",a,!1),j.forEach((function(t){return e.addEventListener(t,s,!1)})),e}function l(){r=c()}return function(){n=!0,u()}}))};var n=e("../util/observable"),o=u(e("@sanity/eventsource")),i=u(e("../util/pick")),s=u(e("../util/defaults")),a=u(e("./encodeQueryString"));function u(e){return e&&e.__esModule?e:{default:e}}function c(){return(c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){d(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var p=o.default,h=["includePreviousRevision","includeResult","visibility","effectFormat","tag"],y={includeResult:!0};function b(e){try{var t=e.data&&JSON.parse(e.data)||{};return c({type:e.type},t)}catch(e){return e}}function v(e){if(e instanceof Error)return e;var t=b(e);return t instanceof Error?t:new Error(function(e){return e.error?e.error.description?e.error.description:"string"==typeof e.error?e.error:JSON.stringify(e.error,null,2):e.message||"Unknown listener error"}(t))}t.exports=r.default},{"../util/defaults":19,"../util/observable":21,"../util/pick":23,"./encodeQueryString":5,"@sanity/eventsource":26}],7:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,o=(n=e("../util/getSelection"))&&n.__esModule?n:{default:n},i=e("../validators");function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.selection=e,this.operations=a({},t),this.client=r}a(u.prototype,{clone:function(){return new u(this.selection,a({},this.operations),this.client)},set:function(e){return this.assign("set",e)},diffMatchPatch:function(e){return(0,i.validateObject)("diffMatchPatch",e),this.assign("diffMatchPatch",e)},unset:function(e){if(!Array.isArray(e))throw new Error("unset(attrs) takes an array of attributes to unset, non-array given");return this.operations=a({},this.operations,{unset:e}),this},setIfMissing:function(e){return this.assign("setIfMissing",e)},replace:function(e){return(0,i.validateObject)("replace",e),this._set("set",{$:e})},inc:function(e){return this.assign("inc",e)},dec:function(e){return this.assign("dec",e)},insert:function(e,t,r){var n;return(0,i.validateInsert)(e,t,r),this.assign("insert",(s(n={},e,t),s(n,"items",r),n))},append:function(e,t){return this.insert("after","".concat(e,"[-1]"),t)},prepend:function(e,t){return this.insert("before","".concat(e,"[0]"),t)},splice:function(e,t,r,n){var o=t<0?t-1:t,i=void 0===r||-1===r?-1:Math.max(0,t+r),s=o<0&&i>=0?"":i,a="".concat(e,"[").concat(o,":").concat(s,"]");return this.insert("replace",a,n||[])},ifRevisionId:function(e){return this.operations.ifRevisionID=e,this},serialize:function(){return a((0,o.default)(this.selection),this.operations)},toJSON:function(){return this.serialize()},commit:function(){var e=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 t=a({returnFirst:"string"==typeof this.selection,returnDocuments:!0},e);return this.client.mutate({patch:this.serialize()},t)},reset:function(){return this.operations={},this},_set:function(e,t){return this.assign(e,t,!1)},assign:function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return(0,i.validateObject)(e,t),this.operations=a({},this.operations,s({},e,a({},r&&this.operations[e]||{},t))),this}});var c=u;r.default=c,t.exports=r.default},{"../util/getSelection":20,"../validators":24}],8:[function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o,i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var u=i?Object.getOwnPropertyDescriptor(e,s):null;u&&(u.get||u.set)?Object.defineProperty(o,s,u):o[s]=e[s]}return o.default=e,r&&r.set(e,o),o}(e("../validators")),s=(o=e("./patch"))&&o.__esModule?o:{default:o};function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(){return(c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var l={returnDocuments:!1};function f(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;this.trxId=r,this.operations=e,this.client=t}c(f.prototype,{clone:function(){return new f(this.operations.slice(0),this.client,this.trxId)},create:function(e){return i.validateObject("create",e),this._add({create:e})},createIfNotExists:function(e){var t="createIfNotExists";return i.validateObject(t,e),i.requireDocumentId(t,e),this._add(u({},t,e))},createOrReplace:function(e){var t="createOrReplace";return i.validateObject(t,e),i.requireDocumentId(t,e),this._add(u({},t,e))},delete:function(e){return i.validateDocumentId("delete",e),this._add({delete:{id:e}})},patch:function(e,t){var r="function"==typeof t;if(e instanceof s.default)return this._add({patch:e.serialize()});if(r){var n=t(new s.default(e,{},this.client));if(!(n instanceof s.default))throw new Error("function passed to `patch()` must return the patch");return this._add({patch:n.serialize()})}return this._add({patch:c({id:e},t)})},transactionId:function(e){return e?(this.trxId=e,this):this.trxId},serialize:function(){return this.operations.slice()},toJSON:function(){return this.serialize()},commit:function(e){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(),c({transactionId:this.trxId},l,e||{}))},reset:function(){return this.operations=[],this},_add:function(e){return this.operations.push(e),this}});var d=f;r.default=d,t.exports=r.default},{"../validators":24,"./patch":7}],9:[function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var o={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var u=s?Object.getOwnPropertyDescriptor(e,a):null;u&&(u.get||u.set)?Object.defineProperty(o,a,u):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}(e("../validators"));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function a(e){this.request=e.request.bind(e)}s(a.prototype,{create:function(e,t){return this._modify("PUT",e,t)},edit:function(e,t){return this._modify("PATCH",e,t)},delete:function(e){return this._modify("DELETE",e)},list:function(){return this.request({uri:"/datasets"})},_modify:function(e,t,r){return o.dataset(t),this.request({method:e,uri:"/datasets/".concat(t),body:r})}});var u=a;r.default=u,t.exports=r.default},{"../validators":24}],10:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){return"https://docs.sanity.io/help/"+e};t.exports=r.default},{}],11:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;r.default=[],t.exports=r.default},{}],12:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ClientError=s,r.ServerError=a;var n,o=(n=e("make-error"))&&n.__esModule?n:{default:n};function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function s(e){var t=u(e);s.super.call(this,t.message),i(this,t)}function a(e){var t=u(e);a.super.call(this,t.message),i(this,t)}function u(e){var t=e.body,r={response:e,statusCode:e.statusCode,responseBody:c(t,e)};return t.error&&t.message?(r.message="".concat(t.error," - ").concat(t.message),r):t.error&&t.error.description?(r.message=t.error.description,r.details=t.error,r):(r.message=t.error||t.message||function(e){var t=e.statusMessage?" ".concat(e.statusMessage):"";return"".concat(e.method,"-request to ").concat(e.url," resulted in HTTP ").concat(e.statusCode).concat(t)}(e),r)}function c(e,t){return-1!==(t.headers["content-type"]||"").toLowerCase().indexOf("application/json")?JSON.stringify(e,null,2):e}(0,o.default)(s),(0,o.default)(a)},{"make-error":65}],13:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;r.default=function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push("".concat(encodeURIComponent(r),"=").concat(encodeURIComponent(e[r])));return t.length>0?"?".concat(t.join("&")):""},t.exports=r.default},{}],14:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=a(e("get-it")),o=e("get-it/middleware"),i=e("../util/observable"),s=e("./errors");function a(e){return e&&e.__esModule?e:{default:e}}function u(){return(u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var c={onResponse:function(e){if(e.statusCode>=500)throw new s.ServerError(e);if(e.statusCode>=400)throw new s.ClientError(e);return e}},l={onResponse:function(e){var t=e.headers["x-sanity-warning"];return(Array.isArray(t)?t:[t]).filter(Boolean).forEach((function(e){return console.warn(e)})),e}},f=a(e("./nodeMiddleware")).default.concat([l,(0,o.jsonRequest)(),(0,o.jsonResponse)(),(0,o.progress)(),c,(0,o.observable)({implementation:i.Observable})]),d=(0,n.default)(f);function p(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:d)(u({maxRedirects:0},e))}p.defaultRequester=d,p.ClientError=s.ClientError,p.ServerError=s.ServerError;var h=p;r.default=h,t.exports=r.default},{"../util/observable":21,"./errors":12,"./nodeMiddleware":11,"get-it":33,"get-it/middleware":63}],15:[function(e,t,r){"use strict";function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o="X-Sanity-Project-ID";r.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},i=t.token||e.token;i&&(r.Authorization="Bearer ".concat(i)),t.useGlobalApi||e.useProjectHostname||!e.projectId||(r[o]=e.projectId);var s=Boolean(void 0===t.withCredentials?e.token||e.withCredentials:t.withCredentials),a=void 0===t.timeout?e.timeout:t.timeout;return n({},t,{headers:n({},r,t.headers||{}),timeout:void 0===a?3e5:a,proxy:t.proxy||e.proxy,json:!0,withCredentials:s})},t.exports=r.default},{}],16:[function(e,t,r){"use strict";function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function o(e){this.client=e}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,n(o.prototype,{list:function(){return this.client.request({uri:"/projects"})},getById:function(e){return this.client.request({uri:"/projects/".concat(e)})}});var i=o;r.default=i,t.exports=r.default},{}],17:[function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=e("./util/observable"),i=g(e("./data/patch")),s=g(e("./data/transaction")),a=g(e("./data/dataMethods")),u=g(e("./datasets/datasetsClient")),c=g(e("./projects/projectsClient")),l=g(e("./assets/assetsClient")),f=g(e("./users/usersClient")),d=g(e("./auth/authClient")),p=g(e("./http/request")),h=g(e("./http/requestOptions")),y=e("./config"),b=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=v(t);if(r&&r.has(e))return r.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var a=i?Object.getOwnPropertyDescriptor(e,s):null;a&&(a.get||a.set)?Object.defineProperty(o,s,a):o[s]=e[s]}return o.default=e,r&&r.set(e,o),o}(e("./validators"));function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(v=function(e){return e?r:t})(e)}function g(e){return e&&e.__esModule?e:{default:e}}function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function w(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function O(){return(O=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function _(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y.defaultConfig;if(!(this instanceof _))return new _(e);if(this.config(e),this.assets=new l.default(this),this.datasets=new u.default(this),this.projects=new c.default(this),this.users=new f.default(this),this.auth=new d.default(this),this.clientConfig.isPromiseAPI){var t=O({},this.clientConfig,{isPromiseAPI:!1});this.observable=new _(t)}}O(_.prototype,a.default),O(_.prototype,{clone:function(){return new _(this.config())},config:function(e){if(void 0===e)return O({},this.clientConfig);if(this.observable){var t=O({},e,{isPromiseAPI:!1});this.observable.config(t)}return this.clientConfig=(0,y.initConfig)(e,this.clientConfig||{}),this},withConfig:function(e){return this.clone().config(e)},getUrl:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1]?this.clientConfig.cdnUrl:this.clientConfig.url;return"".concat(t,"/").concat(e.replace(/^\//,""))},isPromiseAPI:function(){return this.clientConfig.isPromiseAPI},_requestObservable:function(e){var t=this,r=e.url||e.uri,n=void 0===e.canUseCdn?["GET","HEAD"].indexOf(e.method||"GET")>=0&&0===r.indexOf("/data/"):e.canUseCdn,i=this.clientConfig.useCdn&&n,s=e.tag&&this.clientConfig.requestTagPrefix?[this.clientConfig.requestTagPrefix,e.tag].join("."):e.tag||this.clientConfig.requestTagPrefix;s&&(e.query=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){w(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({tag:b.requestTag(s)},e.query));var a=(0,h.default)(this.clientConfig,O({},e,{url:this.getUrl(r,i)}));return new o.Observable((function(e){return(0,p.default)(a,t.clientConfig.requester).subscribe(e)}))},request:function(e){var t=this._requestObservable(e).pipe((0,o.filter)((function(e){return"response"===e.type})),(0,o.map)((function(e){return e.body})));return this.isPromiseAPI()?function(e){return e.toPromise()}(t):t}}),_.Patch=i.default,_.Transaction=s.default,_.ClientError=p.default.ClientError,_.ServerError=p.default.ServerError,_.requester=p.default.defaultRequester;var j=_;r.default=j,t.exports=r.default},{"./assets/assetsClient":1,"./auth/authClient":2,"./config":3,"./data/dataMethods":4,"./data/patch":7,"./data/transaction":8,"./datasets/datasetsClient":9,"./http/request":14,"./http/requestOptions":15,"./projects/projectsClient":16,"./users/usersClient":18,"./util/observable":21,"./validators":24}],18:[function(e,t,r){"use strict";function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function o(e){this.client=e}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,n(o.prototype,{getById:function(e){return this.client.request({uri:"/users/".concat(e)})}});var i=o;r.default=i,t.exports=r.default},{}],19:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;r.default=function(e,t){return Object.keys(t).concat(Object.keys(e)).reduce((function(r,n){return r[n]=void 0===e[n]?t[n]:e[n],r}),{})},t.exports=r.default},{}],20:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){if("string"==typeof e||Array.isArray(e))return{id:e};if(e&&e.query)return"params"in e?{query:e.query,params:e.params}:{query:e.query};var t=["* Document ID (<docId>)","* Array of document IDs","* Object containing `query`"].join("\n");throw new Error("Unknown selection - must be one of:\n\n".concat(t))},t.exports=r.default},{}],21:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"Observable",{enumerable:!0,get:function(){return n.Observable}}),Object.defineProperty(r,"filter",{enumerable:!0,get:function(){return o.filter}}),Object.defineProperty(r,"map",{enumerable:!0,get:function(){return i.map}});var n=e("rxjs/internal/Observable"),o=e("rxjs/internal/operators/filter"),i=e("rxjs/internal/operators/map")},{"rxjs/internal/Observable":72,"rxjs/internal/operators/filter":77,"rxjs/internal/operators/map":78}],22:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;r.default=function(e){var t,r=!1;return function(){return r||(t=e.apply(void 0,arguments),r=!0),t}},t.exports=r.default},{}],23:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;r.default=function(e,t){return t.reduce((function(t,r){return void 0===e[r]||(t[r]=e[r]),t}),{})},t.exports=r.default},{}],24:[function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.validateObject=r.validateInsert=r.validateDocumentId=r.validateAssetType=r.requireDocumentId=r.requestTag=r.projectId=r.hasDataset=r.dataset=void 0;var o=["image","file"],i=["before","after","replace"];r.dataset=function(e){if(!/^(~[a-z0-9]{1}[-\w]{0,63}|[a-z0-9]{1}[-\w]{0,63})$/.test(e))throw new Error("Datasets can only contain lowercase characters, numbers, underscores and dashes, and start with tilde, and be maximum 64 characters")};r.projectId=function(e){if(!/^[-a-z0-9]+$/i.test(e))throw new Error("`projectId` can only contain only a-z, 0-9 and dashes")};r.validateAssetType=function(e){if(-1===o.indexOf(e))throw new Error("Invalid asset type: ".concat(e,". Must be one of ").concat(o.join(", ")))};r.validateObject=function(e,t){if(null===t||"object"!==n(t)||Array.isArray(t))throw new Error("".concat(e,"() takes an object of properties"))};var s=function(e,t){if("string"!=typeof t||!/^[a-z0-9_.-]+$/i.test(t))throw new Error("".concat(e,'(): "').concat(t,'" is not a valid document ID'))};r.validateDocumentId=s;r.requireDocumentId=function(e,t){if(!t._id)throw new Error("".concat(e,'() requires that the document contains an ID ("_id" property)'));s(e,t._id)};r.validateInsert=function(e,t,r){var n="insert(at, selector, items)";if(-1===i.indexOf(e)){var o=i.map((function(e){return'"'.concat(e,'"')})).join(", ");throw new Error("".concat(n,' takes an "at"-argument which is one of: ').concat(o))}if("string"!=typeof t)throw new Error("".concat(n,' takes a "selector"-argument which must be a string'));if(!Array.isArray(r))throw new Error("".concat(n,' takes an "items"-argument which must be an array'))};r.hasDataset=function(e){if(!e.dataset)throw new Error("`dataset` must be provided to perform queries");return e.dataset||""};r.requestTag=function(e){if("string"!=typeof e||!/^[a-z0-9._-]{1,75}$/i.test(e))throw new Error("Tag can only contain alphanumeric characters, underscores, dashes and dots, and be between one and 75 characters long.");return e}},{}],25:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.printNoApiVersionSpecifiedWarning=r.printCdnWarning=r.printBrowserTokenWarning=void 0;var n=i(e("./generateHelpUrl")),o=i(e("./util/once"));function i(e){return e&&e.__esModule?e:{default:e}}var s=function(e){return(0,o.default)((function(){for(var t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(t=console).warn.apply(t,[e.join(" ")].concat(n))}))},a=s(["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 ".concat((0,n.default)("js-client-cdn-configuration"),"."),"To hide this warning, please set the `useCdn` option to either `true` or `false` when creating","the client."]);r.printCdnWarning=a;var u=s(["You have configured Sanity client to use a token in the browser. This may cause unintentional security issues.","See ".concat((0,n.default)("js-client-browser-token")," for more information and how to hide this warning.")]);r.printBrowserTokenWarning=u;var c=s(["Using the Sanity client without specifying an API version is deprecated.","See ".concat((0,n.default)("js-client-api-version"))]);r.printNoApiVersionSpecifiedWarning=c},{"./generateHelpUrl":10,"./util/once":22}],26:[function(e,t,r){var n=e("event-source-polyfill");t.exports=n.EventSourcePolyfill},{"event-source-polyfill":31}],27:[function(e,t,r){"use strict";t.exports=Error.captureStackTrace||function(e){var t=new Error;Object.defineProperty(e,"stack",{configurable:!0,get:function(){var e=t.stack;return Object.defineProperty(this,"stack",{value:e}),e}})}},{}],28:[function(e,t,r){"use strict";var n=e("capture-stack-trace");t.exports=function(e,t){if("string"!=typeof e)throw new TypeError("Expected className to be a string");if(/[^0-9a-zA-Z_$]/.test(e))throw new Error("className contains invalid characters");t=t||function(e){this.message=e};var r=function(){Object.defineProperty(this,"name",{configurable:!0,value:e,writable:!0}),n(this,this.constructor),t.apply(this,arguments)};return function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}(r,Error),r}},{"capture-stack-trace":27}],29:[function(e,t,r){(function(n){(function(){r.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;e.splice(1,0,r,"color: inherit");let n=0,o=0;e[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))})),e.splice(o,0,r)},r.save=function(e){try{e?r.storage.setItem("debug",e):r.storage.removeItem("debug")}catch(e){}},r.load=function(){let e;try{e=r.storage.getItem("debug")}catch(e){}return!e&&void 0!==n&&"env"in n&&(e=n.env.DEBUG),e},r.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},r.storage=function(){try{return localStorage}catch(e){}}(),r.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),r.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],r.log=console.debug||console.log||(()=>{}),t.exports=e("./common")(r);const{formatters:o}=t.exports;o.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this)}).call(this,e("_process"))},{"./common":30,_process:69}],30:[function(e,t,r){t.exports=function(t){function r(e){let t,o,i,s=null;function a(...e){if(!a.enabled)return;const n=a,o=Number(new Date),i=o-(t||o);n.diff=i,n.prev=t,n.curr=o,t=o,e[0]=r.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((t,o)=>{if("%%"===t)return"%";s++;const i=r.formatters[o];if("function"==typeof i){const r=e[s];t=i.call(n,r),e.splice(s,1),s--}return t})),r.formatArgs.call(n,e),(n.log||r.log).apply(n,e)}return a.namespace=e,a.useColors=r.useColors(),a.color=r.selectColor(e),a.extend=n,a.destroy=r.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(o!==r.namespaces&&(o=r.namespaces,i=r.enabled(e)),i),set:e=>{s=e}}),"function"==typeof r.init&&r.init(a),a}function n(e,t){const n=r(this.namespace+(void 0===t?":":t)+e);return n.log=this.log,n}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return r.debug=r,r.default=r,r.coerce=function(e){return e instanceof Error?e.stack||e.message:e},r.disable=function(){const e=[...r.names.map(o),...r.skips.map(o).map((e=>"-"+e))].join(",");return r.enable(""),e},r.enable=function(e){let t;r.save(e),r.namespaces=e,r.names=[],r.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(t=0;t<o;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?r.skips.push(new RegExp("^"+e.slice(1)+"$")):r.names.push(new RegExp("^"+e+"$")))},r.enabled=function(e){if("*"===e[e.length-1])return!0;let t,n;for(t=0,n=r.skips.length;t<n;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;t<n;t++)if(r.names[t].test(e))return!0;return!1},r.humanize=e("ms"),r.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach((e=>{r[e]=t[e]})),r.names=[],r.skips=[],r.formatters={},r.selectColor=function(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return r.colors[Math.abs(t)%r.colors.length]},r.enable(r.load()),r}},{ms:66}],31:[function(e,t,r){!function(e){"use strict";var n=e.setTimeout,o=e.clearTimeout,i=e.XMLHttpRequest,s=e.XDomainRequest,a=e.ActiveXObject,u=e.EventSource,c=e.document,l=e.Promise,f=e.fetch,d=e.Response,p=e.TextDecoder,h=e.TextEncoder,y=e.AbortController;if("undefined"==typeof window||void 0===c||"readyState"in c||null!=c.body||(c.readyState="loading",window.addEventListener("load",(function(e){c.readyState="complete"}),!1)),null==i&&null!=a&&(i=function(){return new a("Microsoft.XMLHTTP")}),null==Object.create&&(Object.create=function(e){function t(){}return t.prototype=e,new t}),Date.now||(Date.now=function(){return(new Date).getTime()}),null==y){var b=f;f=function(e,t){var r=t.signal;return b(e,{headers:t.headers,credentials:t.credentials,cache:t.cache}).then((function(e){var t=e.body.getReader();return r._reader=t,r._aborted&&r._reader.cancel(),{status:e.status,statusText:e.statusText,headers:e.headers,body:{getReader:function(){return t}}}}))},y=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){null!=this.signal._reader&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function v(){this.bitsNeeded=0,this.codePoint=0}v.prototype.decode=function(e){function t(e,t,r){if(1===r)return e>=128>>t&&e<<t<=2047;if(2===r)return e>=2048>>t&&e<<t<=55295||e>=57344>>t&&e<<t<=65535;if(3===r)return e>=65536>>t&&e<<t<=1114111;throw new Error}function r(e,t){if(6===e)return t>>6>15?3:t>31?2:1;if(12===e)return t>15?3:2;if(18===e)return 3;throw new Error}for(var n="",o=this.bitsNeeded,i=this.codePoint,s=0;s<e.length;s+=1){var a=e[s];0!==o&&(a<128||a>191||!t(i<<6|63&a,o-6,r(o,i)))&&(o=0,i=65533,n+=String.fromCharCode(i)),0===o?(a>=0&&a<=127?(o=0,i=a):a>=192&&a<=223?(o=6,i=31&a):a>=224&&a<=239?(o=12,i=15&a):a>=240&&a<=247?(o=18,i=7&a):(o=0,i=65533),0===o||t(i,o,r(o,i))||(o=0,i=65533)):(o-=6,i=i<<6|63&a),0===o&&(i<=65535?n+=String.fromCharCode(i):(n+=String.fromCharCode(55296+(i-65535-1>>10)),n+=String.fromCharCode(56320+(i-65535-1&1023))))}return this.bitsNeeded=o,this.codePoint=i,n},null!=p&&null!=h&&function(){try{return"test"===(new p).decode((new h).encode("test"),{stream:!0})}catch(e){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+e)}return!1}()||(p=v);var g=function(){};function m(e){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=g,this.onload=g,this.onerror=g,this.onreadystatechange=g,this._contentType="",this._xhr=e,this._sendTimeout=0,this._abort=g}function w(e){return e.replace(/[A-Z]/g,(function(e){return String.fromCharCode(e.charCodeAt(0)+32)}))}function O(e){for(var t=Object.create(null),r=e.split("\r\n"),n=0;n<r.length;n+=1){var o=r[n].split(": "),i=o.shift(),s=o.join(": ");t[w(i)]=s}this._map=t}function _(){}function j(e){this._headers=e}function C(){}function P(){this._listeners=Object.create(null)}function E(e){n((function(){throw e}),0)}function S(e){this.type=e,this.target=void 0}function x(e,t){S.call(this,e),this.data=t.data,this.lastEventId=t.lastEventId}function T(e,t){S.call(this,e),this.status=t.status,this.statusText=t.statusText,this.headers=t.headers}function M(e,t){S.call(this,e),this.error=t.error}m.prototype.open=function(e,t){this._abort(!0);var r=this,s=this._xhr,a=1,u=0;this._abort=function(e){0!==r._sendTimeout&&(o(r._sendTimeout),r._sendTimeout=0),1!==a&&2!==a&&3!==a||(a=4,s.onload=g,s.onerror=g,s.onabort=g,s.onprogress=g,s.onreadystatechange=g,s.abort(),0!==u&&(o(u),u=0),e||(r.readyState=4,r.onabort(null),r.onreadystatechange())),a=0};var c=function(){if(1===a){var e=0,t="",n=void 0;if("contentType"in s)e=200,t="OK",n=s.contentType;else try{e=s.status,t=s.statusText,n=s.getResponseHeader("Content-Type")}catch(r){e=0,t="",n=void 0}0!==e&&(a=2,r.readyState=2,r.status=e,r.statusText=t,r._contentType=n,r.onreadystatechange())}},l=function(){if(c(),2===a||3===a){a=3;var e="";try{e=s.responseText}catch(e){}r.readyState=3,r.responseText=e,r.onprogress()}},f=function(e,t){if(null!=t&&null!=t.preventDefault||(t={preventDefault:g}),l(),1===a||2===a||3===a){if(a=4,0!==u&&(o(u),u=0),r.readyState=4,"load"===e)r.onload(t);else if("error"===e)r.onerror(t);else{if("abort"!==e)throw new TypeError;r.onabort(t)}r.onreadystatechange()}},d=function(){u=n((function(){d()}),500),3===s.readyState&&l()};"onload"in s&&(s.onload=function(e){f("load",e)}),"onerror"in s&&(s.onerror=function(e){f("error",e)}),"onabort"in s&&(s.onabort=function(e){f("abort",e)}),"onprogress"in s&&(s.onprogress=l),"onreadystatechange"in s&&(s.onreadystatechange=function(e){!function(e){null!=s&&(4===s.readyState?"onload"in s&&"onerror"in s&&"onabort"in s||f(""===s.responseText?"error":"load",e):3===s.readyState?"onprogress"in s||l():2===s.readyState&&c())}(e)}),!("contentType"in s)&&"ontimeout"in i.prototype||(t+=(-1===t.indexOf("?")?"?":"&")+"padding=true"),s.open(e,t,!0),"readyState"in s&&(u=n((function(){d()}),0))},m.prototype.abort=function(){this._abort(!1)},m.prototype.getResponseHeader=function(e){return this._contentType},m.prototype.setRequestHeader=function(e,t){var r=this._xhr;"setRequestHeader"in r&&r.setRequestHeader(e,t)},m.prototype.getAllResponseHeaders=function(){return null!=this._xhr.getAllResponseHeaders&&this._xhr.getAllResponseHeaders()||""},m.prototype.send=function(){if("ontimeout"in i.prototype&&("sendAsBinary"in i.prototype||"mozAnon"in i.prototype)||null==c||null==c.readyState||"complete"===c.readyState){var e=this._xhr;"withCredentials"in e&&(e.withCredentials=this.withCredentials);try{e.send(void 0)}catch(e){throw e}}else{var t=this;t._sendTimeout=n((function(){t._sendTimeout=0,t.send()}),4)}},O.prototype.get=function(e){return this._map[w(e)]},null!=i&&null==i.HEADERS_RECEIVED&&(i.HEADERS_RECEIVED=2),_.prototype.open=function(e,t,r,n,o,s,a){e.open("GET",o);var u=0;for(var c in e.onprogress=function(){var t=e.responseText.slice(u);u+=t.length,r(t)},e.onerror=function(e){e.preventDefault(),n(new Error("NetworkError"))},e.onload=function(){n(null)},e.onabort=function(){n(null)},e.onreadystatechange=function(){if(e.readyState===i.HEADERS_RECEIVED){var r=e.status,n=e.statusText,o=e.getResponseHeader("Content-Type"),s=e.getAllResponseHeaders();t(r,n,o,new O(s))}},e.withCredentials=s,a)Object.prototype.hasOwnProperty.call(a,c)&&e.setRequestHeader(c,a[c]);return e.send(),e},j.prototype.get=function(e){return this._headers.get(e)},C.prototype.open=function(e,t,r,n,o,i,s){var a=null,u=new y,c=u.signal,d=new p;return f(o,{headers:s,credentials:i?"include":"same-origin",signal:c,cache:"no-store"}).then((function(e){return a=e.body.getReader(),t(e.status,e.statusText,e.headers.get("Content-Type"),new j(e.headers)),new l((function(e,t){var n=function(){a.read().then((function(t){if(t.done)e(void 0);else{var o=d.decode(t.value,{stream:!0});r(o),n()}})).catch((function(e){t(e)}))};n()}))})).catch((function(e){return"AbortError"===e.name?void 0:e})).then((function(e){n(e)})),{abort:function(){null!=a&&a.cancel(),u.abort()}}},P.prototype.dispatchEvent=function(e){e.target=this;var t=this._listeners[e.type];if(null!=t)for(var r=t.length,n=0;n<r;n+=1){var o=t[n];try{"function"==typeof o.handleEvent?o.handleEvent(e):o.call(this,e)}catch(e){E(e)}}},P.prototype.addEventListener=function(e,t){e=String(e);var r=this._listeners,n=r[e];null==n&&(n=[],r[e]=n);for(var o=!1,i=0;i<n.length;i+=1)n[i]===t&&(o=!0);o||n.push(t)},P.prototype.removeEventListener=function(e,t){e=String(e);var r=this._listeners,n=r[e];if(null!=n){for(var o=[],i=0;i<n.length;i+=1)n[i]!==t&&o.push(n[i]);0===o.length?delete r[e]:r[e]=o}},x.prototype=Object.create(S.prototype),T.prototype=Object.create(S.prototype),M.prototype=Object.create(S.prototype);var R=/^text\/event\-stream(;.*)?$/i,q=function(e,t){var r=null==e?t:parseInt(e,10);return r!=r&&(r=t),A(r)},A=function(e){return Math.min(Math.max(e,1e3),18e6)},D=function(e,t,r){try{"function"==typeof t&&t.call(e,r)}catch(e){E(e)}};function I(e,t){P.call(this),t=t||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,function(e,t,r){t=String(t);var a=Boolean(r.withCredentials),u=r.lastEventIdQueryParameterName||"lastEventId",c=A(1e3),l=q(r.heartbeatTimeout,45e3),f="",d=c,p=!1,h=0,y=r.headers||{},b=r.Transport,v=k&&null==b?void 0:new m(null!=b?new b:null!=i&&"withCredentials"in i.prototype||null==s?new i:new s),g=null!=b&&"string"!=typeof b?new b:null==v?new C:new _,w=void 0,O=0,j=-1,P="",E="",S="",I="",F=0,U=0,N=0,H=function(t,r,n,o){if(0===j)if(200===t&&null!=n&&R.test(n)){j=1,p=Date.now(),d=c,e.readyState=1;var i=new T("open",{status:t,statusText:r,headers:o});e.dispatchEvent(i),D(e,e.onopen,i)}else{var s="";200!==t?(r&&(r=r.replace(/\s+/g," ")),s="EventSource's response has a status "+t+" "+r+" that is not 200. Aborting the connection."):s="EventSource's response has a Content-Type specifying an unsupported type: "+(null==n?"-":n.replace(/\s+/g," "))+". Aborting the connection.",B();i=new T("error",{status:t,statusText:r,headers:o});e.dispatchEvent(i),D(e,e.onerror,i),console.error(s)}},L=function(t){if(1===j){for(var r=-1,i=0;i<t.length;i+=1){(u=t.charCodeAt(i))!=="\n".charCodeAt(0)&&u!=="\r".charCodeAt(0)||(r=i)}var s=(-1!==r?I:"")+t.slice(0,r+1);I=(-1===r?I:"")+t.slice(r+1),""!==t&&(p=Date.now(),h+=t.length);for(var a=0;a<s.length;a+=1){var u=s.charCodeAt(a);if(-1===F&&u==="\n".charCodeAt(0))F=0;else if(-1===F&&(F=0),u==="\r".charCodeAt(0)||u==="\n".charCodeAt(0)){if(0!==F){1===F&&(N=a+1);var y=s.slice(U,N-1),b=s.slice(N+(N<a&&s.charCodeAt(N)===" ".charCodeAt(0)?1:0),a);"data"===y?(P+="\n",P+=b):"id"===y?E=b:"event"===y?S=b:"retry"===y?(c=q(b,c),d=c):"heartbeatTimeout"===y&&(l=q(b,l),0!==O&&(o(O),O=n((function(){W()}),l)))}if(0===F){if(""!==P){f=E,""===S&&(S="message");var v=new x(S,{data:P.slice(1),lastEventId:E});if(e.dispatchEvent(v),"open"===S?D(e,e.onopen,v):"message"===S?D(e,e.onmessage,v):"error"===S&&D(e,e.onerror,v),2===j)return}P="",S=""}F=u==="\r".charCodeAt(0)?-1:0}else 0===F&&(U=a,F=1),1===F?u===":".charCodeAt(0)&&(N=a+1,F=2):2===F&&(F=3)}}},z=function(t){if(1===j||0===j){j=-1,0!==O&&(o(O),O=0),O=n((function(){W()}),d),d=A(Math.min(16*c,2*d)),e.readyState=0;var r=new M("error",{error:t});e.dispatchEvent(r),D(e,e.onerror,r),null!=t&&console.error(t)}},B=function(){j=2,null!=w&&(w.abort(),w=void 0),0!==O&&(o(O),O=0),e.readyState=2},W=function(){if(O=0,-1===j){p=!1,h=0,O=n((function(){W()}),l),j=0,P="",S="",E=f,I="",U=0,N=0,F=0;var r=t;if("data:"!==t.slice(0,5)&&"blob:"!==t.slice(0,5)&&""!==f){var o=t.indexOf("?");r=-1===o?t:t.slice(0,o+1)+t.slice(o+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,(function(e,t){return t===u?"":e})),r+=(-1===t.indexOf("?")?"?":"&")+u+"="+encodeURIComponent(f)}var i=e.withCredentials,s={Accept:"text/event-stream"},a=e.headers;if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(s[c]=a[c]);try{w=g.open(v,H,L,z,r,i,s)}catch(e){throw B(),e}}else if(p||null==w){var d=Math.max((p||Date.now())+l-Date.now(),1);p=!1,O=n((function(){W()}),d)}else z(new Error("No activity within "+l+" milliseconds. "+(0===j?"No response received.":h+" chars received.")+" Reconnecting.")),null!=w&&(w.abort(),w=void 0)};e.url=t,e.readyState=0,e.withCredentials=a,e.headers=y,e._close=B,W()}(this,e,t)}var k=null!=f&&null!=d&&"body"in d.prototype;I.prototype=Object.create(P.prototype),I.prototype.CONNECTING=0,I.prototype.OPEN=1,I.prototype.CLOSED=2,I.prototype.close=function(){this._close()},I.CONNECTING=0,I.OPEN=1,I.CLOSED=2,I.prototype.withCredentials=void 0;var F=u;null==i||null!=u&&"withCredentials"in u.prototype||(F=I),function(n){if("object"==typeof t&&"object"==typeof t.exports){var o=n(r);void 0!==o&&(t.exports=o)}else n(e)}((function(e){e.EventSourcePolyfill=I,e.NativeEventSource=u,e.EventSource=F}))}("undefined"==typeof globalThis?"undefined"!=typeof window?window:"undefined"!=typeof self?self:this:globalThis)},{}],32:[function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Boolean(t.sorted),o=Boolean(t.skipIndex),i=Boolean(t.ignorenull),s=function(e){return String(e).replace(/(?:[\0-\x1F"-&\+-\}\x7F-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,encodeURIComponent).replace(/ /g,"+").replace(/[!'()~\*]/g,(function(e){return"%"+e.charCodeAt().toString(16).slice(-2).toUpperCase()}))},a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object.keys(e);return r?t.sort():t},u=function(e){return e.filter((function(e){return e})).join("&")},c=function(e,t){return u(a(t).map((function(r){return f(e+"["+r+"]",t[r])})))},l=function(e,t){return t.length?u(t.map((function(t,r){return f(o?e+"[]":e+"["+r+"]",t)}))):s(e+"[]")},f=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0===t?"undefined":n(t),o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return t===o?o=i?o:s(e)+"="+o:/string|number|boolean/.test(r)?o=s(e)+"="+s(t):Array.isArray(t)?o=l(e,t):"object"===r&&(o=c(e,t)),o};return e&&u(a(e).map((function(t){return f(t,e[t])})))}},{}],33:[function(e,t,r){t.exports=e("./lib-node")},{"./lib-node":34}],34:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default,u=[],f=l.reduce((function(e,t){return e[t]=e[t]||[],e}),{processOptions:[i.default],validateOptions:[s.default]});function d(e){var t=c.reduce((function(e,t){return e[t]=(0,n.default)(),e}),{}),i=(0,o.default)(f),s=i("processOptions",e);i("validateOptions",s);var a={options:s,channels:t,applyMiddleware:i},u=null,l=t.request.subscribe((function(e){u=r(e,(function(r,n){return function(e,r,n){var o=e,s=r;if(!o)try{s=i("onResponse",r,n)}catch(e){s=null,o=e}(o=o&&i("onError",o,n))?t.error.publish(o):s&&t.response.publish(s)}(r,n,e)}))}));t.abort.subscribe((function(){l(),u&&u.abort()}));var d=i("onReturn",t,a);return d===t&&t.request.publish(a),d}return d.use=function(e){if(!e)throw new Error("Tried to add middleware that resolved to falsey value");if("function"==typeof e)throw new Error("Tried to add middleware that was a function. It probably expects you to pass options to it.");if(e.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 l.forEach((function(t){e[t]&&f[t].push(e[t])})),u.push(e),d},d.clone=function(){return e(u)},t.forEach(d.use),d};var n=u(e("nano-pubsub")),o=u(e("./util/middlewareReducer")),i=u(e("./middleware/defaultOptionsProcessor")),s=u(e("./middleware/defaultOptionsValidator")),a=u(e("./request"));function u(e){return e&&e.__esModule?e:{default:e}}var c=["request","response","progress","error","abort"],l=["processOptions","validateOptions","interceptRequest","finalizeOptions","onRequest","onResponse","onError","onReturn","onHeaders"];t.exports=r.default},{"./middleware/defaultOptionsProcessor":40,"./middleware/defaultOptionsValidator":41,"./request":59,"./util/middlewareReducer":62,"nano-pubsub":67}],35:[function(e,t,r){"use strict";function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=/^\//,i=/\/$/;r.default=function(e){var t=e.replace(i,"");return{processOptions:function(e){if(/^https?:\/\//i.test(e.url))return e;var r=[t,e.url.replace(o,"")].join("/");return n({},e,{url:r})}}},t.exports=r.default},{}],36:[function(e,t,r){"use strict";function n(e){this.message=e}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,n.prototype.toString=function(){return"Cancel".concat(this.message?": ".concat(this.message):"")},n.prototype.__CANCEL__=!0;var o=n;r.default=o,t.exports=r.default},{}],37:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("./Cancel");function o(e){var t=this;if("function"!=typeof e)throw new TypeError("executor must be a function.");var r=null;this.promise=new Promise((function(e){r=e})),e((function(e){t.reason||(t.reason=new n(e),r(t.reason))}))}o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}};var i=o;r.default=i,t.exports=r.default},{"./Cancel":36}],38:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;r.default=function(e){return!(!e||!e.__CANCEL__)},t.exports=r.default},{}],39:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,o=(n=e("debug"))&&n.__esModule?n:{default:n};var i=["cookie","authorization"],s=Object.prototype.hasOwnProperty,a=function(e,t){var r={};for(var n in e)s.call(e,n)&&(r[n]=t.indexOf(n.toLowerCase())>-1?"<redacted>":e[n]);return r};function u(e){return-1!==(e.headers["content-type"]||"").toLowerCase().indexOf("application/json")?function(e){try{var t="string"==typeof e?JSON.parse(e):e;return JSON.stringify(t,null,2)}catch(t){return e}}(e.body):e.body}r.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.verbose,r=e.namespace||"get-it",n=(0,o.default)(r),s=e.log||n,c=s===n&&!o.default.enabled(r),l=0;return{processOptions:function(e){return e.debug=s,e.requestId=e.requestId||++l,e},onRequest:function(r){if(c||!r)return r;var n=r.options;if(s("[%s] HTTP %s %s",n.requestId,n.method,n.url),t&&n.body&&"string"==typeof n.body&&s("[%s] Request body: %s",n.requestId,n.body),t&&n.headers){var o=!1===e.redactSensitiveHeaders?n.headers:a(n.headers,i);s("[%s] Request headers: %s",n.requestId,JSON.stringify(o,null,2))}return r},onResponse:function(e,r){if(c||!e)return e;var n=r.options.requestId;return s("[%s] Response code: %s %s",n,e.statusCode,e.statusMessage),t&&e.body&&s("[%s] Response body: %s",n,u(e)),e},onError:function(e,t){var r=t.options.requestId;return e?(s("[%s] ERROR: %s",r,e.message),e):(s("[%s] Error encountered, but handled by an earlier middleware",r),e)}}},t.exports=r.default},{debug:29}],40:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,o=(n=e("url-parse"))&&n.__esModule?n:{default:n};function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var s="undefined"!=typeof navigator&&"ReactNative"===navigator.product,a=Object.prototype.hasOwnProperty,u={timeout:s?6e4:12e4};function c(e){var t=[];for(var r in e)a.call(e,r)&&n(r,e[r]);return t.length?t.join("&"):"";function n(e,r){Array.isArray(r)?r.forEach((function(t){return n(e,t)})):t.push([e,r].map(encodeURIComponent).join("="))}}function l(e){if(!1===e||0===e)return!1;if(e.connect||e.socket)return e;var t=Number(e);return isNaN(t)?l(u.timeout):{connect:t,socket:t}}r.default=function(e){var t="string"==typeof e?i({url:e},u):i({},u,e),r=(0,o.default)(t.url,{},!0);return t.timeout=l(t.timeout),t.query&&(r.query=i({},r.query,function(e){var t={};for(var r in e)void 0!==e[r]&&(t[r]=e[r]);return t}(t.query))),t.method=t.body&&!t.method?"POST":(t.method||"GET").toUpperCase(),t.url=r.toString(c),t},t.exports=r.default},{"url-parse":92}],41:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=/^https?:\/\//i;r.default=function(e){if(!n.test(e.url))throw new Error('"'.concat(e.url,'" is not a valid URL'))},t.exports=r.default},{}],42:[function(e,t,r){"use strict";function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;r.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{processOptions:function(r){var o=r.headers||{};return r.headers=t.override?n({},o,e):n({},e,o),r}}},t.exports=r.default},{}],43:[function(e,t,r){"use strict";var n;Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=(0,((n=e("create-error-class"))&&n.__esModule?n:{default:n}).default)("HttpError",(function(e,t){var r=e.url.length>400?"".concat(e.url.slice(0,399),"…"):e.url,n="".concat(e.method,"-request to ").concat(r," resulted in ");n+="HTTP ".concat(e.statusCode," ").concat(e.statusMessage),this.message=n.trim(),this.response=e,this.request=t.options}));r.default=function(){return{onResponse:function(e,t){if(!(e.statusCode>=400))return e;throw new o(e,t)}}},t.exports=r.default},{"create-error-class":28}],44:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"base",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(r,"debug",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(r,"headers",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(r,"httpErrors",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(r,"injectResponse",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(r,"jsonRequest",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(r,"jsonResponse",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(r,"keepAlive",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(r,"mtls",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(r,"observable",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(r,"progress",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(r,"promise",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(r,"proxy",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(r,"retry",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(r,"urlEncoded",{enumerable:!0,get:function(){return h.default}});var n=g(e("./base")),o=g(e("./debug")),i=g(e("./jsonRequest")),s=g(e("./jsonResponse")),a=g(e("./httpErrors")),u=g(e("./retry")),c=g(e("./promise")),l=g(e("./observable")),f=g(e("./progress")),d=g(e("./headers")),p=g(e("./injectResponse")),h=g(e("./urlEncoded")),y=g(e("./proxy")),b=g(e("./keepAlive")),v=g(e("./mtls"));function g(e){return e&&e.__esModule?e:{default:e}}},{"./base":35,"./debug":39,"./headers":42,"./httpErrors":43,"./injectResponse":45,"./jsonRequest":46,"./jsonResponse":47,"./keepAlive":48,"./mtls":49,"./observable":50,"./progress":52,"./promise":53,"./proxy":54,"./retry":55,"./urlEncoded":56}],45:[function(e,t,r){"use strict";function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;r.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("function"!=typeof e.inject)throw new Error("`injectResponse` middleware requires a `inject` function");return{interceptRequest:function(t,r){var o=e.inject(r,t);if(!o)return t;var i=r.context.options;return n({},{body:"",url:i.url,method:i.method,headers:{},statusCode:200,statusMessage:"OK"},o)}}},t.exports=r.default},{}],46:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("is-plain-object");function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var s=["boolean","string","number"];r.default=function(){return{processOptions:function(e){var t=e.body;return t&&"function"!=typeof t.pipe&&!function(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}(t)&&(-1!==s.indexOf(i(t))||Array.isArray(t)||(0,n.isPlainObject)(t))?o({},e,{body:JSON.stringify(e.body),headers:o({},e.headers,{"Content-Type":"application/json"})}):e}}},t.exports=r.default},{"is-plain-object":64}],47:[function(e,t,r){"use strict";function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;function o(e){try{return JSON.parse(e)}catch(e){throw e.message="Failed to parsed response body as JSON: ".concat(e.message),e}}r.default=function(e){return{onResponse:function(t){var r=t.headers["content-type"]||"",i=e&&e.force||-1!==r.indexOf("application/json");return t.body&&r&&i?n({},t,{body:o(t.body)}):t},processOptions:function(e){return n({},e,{headers:n({Accept:"application/json"},e.headers)})}}},t.exports=r.default},{}],48:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;r.default=function(){},t.exports=r.default},{}],49:[function(e,t,r){"use strict";function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;r.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e.ca)throw new Error('Required mtls option "ca" is missing');if(!e.cert)throw new Error('Required mtls option "cert" is missing');if(!e.key)throw new Error('Required mtls option "key" is missing');return{finalizeOptions:function(t){return n({},t,{cert:e.cert,key:e.key,ca:e.ca})}}},t.exports=r.default},{}],50:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,o=(n=e("../util/global"))&&n.__esModule?n:{default:n};function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}r.default=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).implementation||o.default.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(i({type:"progress"},t))})),t.response.subscribe((function(t){e.next(i({type:"response"},t)),e.complete()})),t.request.publish(r),function(){return t.abort.publish()}}))}}},t.exports=r.default},{"../util/global":61}],51:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;r.default=function(){return{onRequest:function(e){if("xhr"===e.adapter){var t=e.request,r=e.context;"upload"in t&&"onprogress"in t.upload&&(t.upload.onprogress=n("upload")),"onprogress"in t&&(t.onprogress=n("download"))}function n(e){return function(t){var n=t.lengthComputable?t.loaded/t.total*100:-1;r.channels.progress.publish({stage:e,percent:n,total:t.total,loaded:t.loaded,lengthComputable:t.lengthComputable})}}}}},t.exports=r.default},{}],52:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return o.default}});var n,o=(n=e("./node-progress"))&&n.__esModule?n:{default:n};t.exports=r.default},{"./node-progress":51}],53:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=s(e("./cancel/Cancel")),o=s(e("./cancel/CancelToken")),i=s(e("./cancel/isCancel"));function s(e){return e&&e.__esModule?e:{default:e}}var a="function"==typeof Promise&&Promise,u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.implementation||a;if(!t)throw new Error("`Promise` is not available in global scope, and no implementation was passed");return{onReturn:function(r,n){return new t((function(t,o){var i=n.options.cancelToken;i&&i.promise.then((function(e){r.abort.publish(e),o(e)})),r.error.subscribe(o),r.response.subscribe((function(r){t(e.onlyBody?r.body:r)})),setTimeout((function(){try{r.request.publish(n)}catch(e){o(e)}}),0)}))}}};u.Cancel=n.default,u.CancelToken=o.default,u.isCancel=i.default;var c=u;r.default=c,t.exports=r.default},{"./cancel/Cancel":36,"./cancel/CancelToken":37,"./cancel/isCancel":38}],54:[function(e,t,r){"use strict";function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;r.default=function(e){if(!(!1===e||e&&e.host))throw new Error("Proxy middleware takes an object of host, port and auth properties");return{processOptions:function(t){return n({proxy:e},t)}}},t.exports=r.default},{}],55:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,o=(n=e("../util/node-shouldRetry"))&&n.__esModule?n:{default:n};function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var a=function(e){return null!==e&&"object"===s(e)&&"function"==typeof e.pipe},u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.maxRetries||5,r=e.retryDelay||l,n=e.shouldRetry||o.default;return{onError:function(e,o){var s=o.options,u=s.maxRetries||t,c=s.shouldRetry||n,l=s.attemptNumber||0;if(a(s.body))return e;if(!c(e,l,s)||l>=u)return e;var f=i({},o,{options:i({},s,{attemptNumber:l+1})});return setTimeout((function(){return o.channels.request.publish(f)}),r(l)),null}}};u.shouldRetry=o.default;var c=u;function l(e){return 100*Math.pow(2,e)+100*Math.random()}r.default=c,t.exports=r.default},{"../util/node-shouldRetry":60}],56:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,o=e("is-plain-object"),i=(n=e("form-urlencoded"))&&n.__esModule?n:{default:n};function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var a=i.default.default||i.default;r.default=function(){return{processOptions:function(e){var t=e.body;return t&&"function"!=typeof t.pipe&&!function(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}(t)&&(0,o.isPlainObject)(t)?s({},e,{body:a(e.body),headers:s({},e.headers,{"Content-Type":"application/x-www-form-urlencoded"})}):e}}},t.exports=r.default},{"form-urlencoded":32,"is-plain-object":64}],57:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=s(e("same-origin")),o=s(e("parse-headers")),i=s(e("./browser/fetchXhr"));function s(e){return e&&e.__esModule?e:{default:e}}var a="undefined"==typeof document||"undefined"==typeof window?void 0:window,u=a?"xhr":"fetch",c="function"==typeof XMLHttpRequest?XMLHttpRequest:function(){},l="withCredentials"in new c,f="undefined"==typeof XDomainRequest?void 0:XDomainRequest,d=l?c:f;a||(c=i.default,d=i.default);r.default=function(e,t){var r=e.options,i=e.applyMiddleware("finalizeOptions",r),s={},l=a&&a.location&&!(0,n.default)(a.location.href,i.url),f=e.applyMiddleware("interceptRequest",void 0,{adapter:u,context:e});if(f){var p=setTimeout(t,0,null,f);return{abort:function(){return clearTimeout(p)}}}var h=l?new d:new c,y=a&&a.XDomainRequest&&h instanceof a.XDomainRequest,b=i.headers,v=i.timeout,g=!1,m=!1,w=!1;if(h.onerror=C,h.ontimeout=C,h.onabort=function(){j(!0),g=!0},h.onprogress=function(){},h[y?"onload":"onreadystatechange"]=function(){v&&(j(),s.socket=setTimeout((function(){return _("ESOCKETTIMEDOUT")}),v.socket)),g||4!==h.readyState&&!y||0!==h.status&&(g||m||w||(0!==h.status?(j(),m=!0,t(null,function(){var e=h.status,t=h.statusText;if(y&&void 0===e)e=200;else{if(e>12e3&&e<12156)return C();e=1223===h.status?204:h.status,t=1223===h.status?"No Content":t}return{body:h.response||h.responseText,url:i.url,method:i.method,headers:y?{}:(0,o.default)(h.getAllResponseHeaders()),statusCode:e,statusMessage:t}}())):C(new Error("Unknown XHR error"))))},h.open(i.method,i.url,!0),h.withCredentials=!!i.withCredentials,b&&h.setRequestHeader)for(var O in b)b.hasOwnProperty(O)&&h.setRequestHeader(O,b[O]);else if(b&&y)throw new Error("Headers cannot be set on an XDomainRequest object");return i.rawBody&&(h.responseType="arraybuffer"),e.applyMiddleware("onRequest",{options:i,adapter:u,request:h,context:e}),h.send(i.body||null),v&&(s.connect=setTimeout((function(){return _("ETIMEDOUT")}),v.connect)),{abort:function(){g=!0,h&&h.abort()}};function _(t){w=!0,h.abort();var r=new Error("ESOCKETTIMEDOUT"===t?"Socket timed out on request to ".concat(i.url):"Connection timed out on request to ".concat(i.url));r.code=t,e.channels.error.publish(r)}function j(e){(e||g||h.readyState>=2&&s.connect)&&clearTimeout(s.connect),s.socket&&clearTimeout(s.socket)}function C(e){if(!m){j(!0),m=!0,h=null;var r=e||new Error("Network error while attempting to reach ".concat(i.url));r.isNetworkError=!0,r.request=i,t(r)}}},t.exports=r.default},{"./browser/fetchXhr":58,"parse-headers":68,"same-origin":90}],58:[function(e,t,r){"use strict";function n(){this.readyState=0}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,n.prototype.open=function(e,t){this._method=e,this._url=t,this._resHeaders="",this.readyState=1,this.onreadystatechange()},n.prototype.abort=function(){this._controller&&this._controller.abort()},n.prototype.getAllResponseHeaders=function(){return this._resHeaders},n.prototype.setRequestHeader=function(e,t){this._headers=this._headers||{},this._headers[e]=t},n.prototype.send=function(e){var t=this,r=this._controller="function"==typeof AbortController&&new AbortController,n="arraybuffer"!==this.responseType,o={method:this._method,headers:this._headers,signal:r&&r.signal||void 0,body:e};"undefined"!=typeof document&&(o.credentials=this.withCredentials?"include":"omit"),fetch(this._url,o).then((function(e){return e.headers.forEach((function(e,r){t._resHeaders+="".concat(r,": ").concat(e,"\r\n")})),t.status=e.status,t.statusText=e.statusText,t.readyState=3,n?e.text():e.arrayBuffer()})).then((function(e){n?t.responseText=e:t.response=e,t.readyState=4,t.onreadystatechange()})).catch((function(e){"AbortError"!==e.name?t.onerror(e):t.onabort()}))};var o=n;r.default=o,t.exports=r.default},{}],59:[function(e,t,r){"use strict";var n;Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=((n=e("./node-request"))&&n.__esModule?n:{default:n}).default;r.default=o,t.exports=r.default},{"./node-request":57}],60:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;r.default=function(e,t,r){return("GET"===r.method||"HEAD"===r.method)&&(e.isNetworkError||!1)},t.exports=r.default},{}],61:[function(e,t,r){(function(e){(function(){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};r.default=n,t.exports=r.default}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],62:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;r.default=function(e){return function(t,r){for(var n="onError"===t,o=r,i=arguments.length,s=new Array(i>2?i-2:0),a=2;a<i;a++)s[a-2]=arguments[a];for(var u=0;u<e[t].length&&(o=e[t][u].apply(void 0,[o].concat(s)),!n||o);u++);return o}},t.exports=r.default},{}],63:[function(e,t,r){t.exports=e("./lib/middleware")},{"./lib/middleware":44}],64:[function(e,t,r){"use strict";function n(e){return"[object Object]"===Object.prototype.toString.call(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.isPlainObject=function(e){var t,r;return!1!==n(e)&&(void 0===(t=e.constructor)||!1!==n(r=t.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf"))}},{}],65:[function(e,t,r){"use strict";var n="undefined"!=typeof Reflect?Reflect.construct:void 0,o=Object.defineProperty,i=Error.captureStackTrace;function s(e){void 0!==e&&o(this,"message",{configurable:!0,value:e,writable:!0});var t=this.constructor.name;void 0!==t&&t!==this.name&&o(this,"name",{configurable:!0,value:t,writable:!0}),i(this,this.constructor)}void 0===i&&(i=function(e){var t=new Error;o(e,"stack",{configurable:!0,get:function(){var e=t.stack;return o(this,"stack",{configurable:!0,value:e,writable:!0}),e},set:function(t){o(e,"stack",{configurable:!0,value:t,writable:!0})}})}),s.prototype=Object.create(Error.prototype,{constructor:{configurable:!0,value:s,writable:!0}});var a=function(){function e(e,t){return o(e,"name",{configurable:!0,value:t})}try{var t=function(){};if(e(t,"foo"),"foo"===t.name)return e}catch(e){}}();r=t.exports=function(e,t){if(null==t||t===Error)t=s;else if("function"!=typeof t)throw new TypeError("super_ should be a function");var r;if("string"==typeof e)r=e,e=void 0!==n?function(){return n(t,arguments,this.constructor)}:function(){t.apply(this,arguments)},void 0!==a&&(a(e,r),r=void 0);else if("function"!=typeof e)throw new TypeError("constructor should be either a string or a function");e.super_=e.super=t;var o={constructor:{configurable:!0,value:e,writable:!0}};return void 0!==r&&(o.name={configurable:!0,value:r,writable:!0}),e.prototype=Object.create(t.prototype,o),e},r.BaseError=s},{}],66:[function(e,t,r){var n=1e3,o=60*n,i=60*o,s=24*i;function a(e){if(!((e=String(e)).length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*r;case"weeks":case"week":case"w":return 6048e5*r;case"days":case"day":case"d":return r*s;case"hours":case"hour":case"hrs":case"hr":case"h":return r*i;case"minutes":case"minute":case"mins":case"min":case"m":return r*o;case"seconds":case"second":case"secs":case"sec":case"s":return r*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function u(e){var t=Math.abs(e);return t>=s?Math.round(e/s)+"d":t>=i?Math.round(e/i)+"h":t>=o?Math.round(e/o)+"m":t>=n?Math.round(e/n)+"s":e+"ms"}function c(e){var t=Math.abs(e);return t>=s?l(e,t,s,"day"):t>=i?l(e,t,i,"hour"):t>=o?l(e,t,o,"minute"):t>=n?l(e,t,n,"second"):e+" ms"}function l(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}t.exports=function(e,t){t=t||{};var r=typeof e;if("string"===r&&e.length>0)return a(e);if("number"===r&&isFinite(e))return t.long?c(e):u(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],67:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(){var e=Object.create(null),t=0;return{publish:function(t){for(var r in e)e[r](t)},subscribe:function(r){var n=t++;return e[n]=r,function(){delete e[n]}}}}},{}],68:[function(e,t,r){var n=function(e){return e.replace(/^\s+|\s+$/g,"")},o=function(e){return"[object Array]"===Object.prototype.toString.call(e)};t.exports=function(e){if(!e)return{};for(var t={},r=n(e).split("\n"),i=0;i<r.length;i++){var s=r[i],a=s.indexOf(":"),u=n(s.slice(0,a)).toLowerCase(),c=n(s.slice(a+1));void 0===t[u]?t[u]=c:o(t[u])?t[u].push(c):t[u]=[t[u],c]}return t}},{}],69:[function(e,t,r){var n,o,i=t.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:s}catch(e){n=s}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(e){o=a}}();var c,l=[],f=!1,d=-1;function p(){f&&c&&(f=!1,c.length?l=c.concat(l):d=-1,l.length&&h())}function h(){if(!f){var e=u(p);f=!0;for(var t=l.length;t;){for(c=l,l=[];++d<t;)c&&c[d].run();d=-1,t=l.length}c=null,f=!1,function(e){if(o===clearTimeout)return clearTimeout(e);if((o===a||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{o(e)}catch(t){try{return o.call(null,e)}catch(t){return o.call(this,e)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function b(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new y(e,t)),1!==l.length||f||u(h)},y.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=b,i.addListener=b,i.once=b,i.off=b,i.removeListener=b,i.removeAllListeners=b,i.emit=b,i.prependListener=b,i.prependOnceListener=b,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],70:[function(e,t,r){"use strict";var n=Object.prototype.hasOwnProperty;function o(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function i(e){try{return encodeURIComponent(e)}catch(e){return null}}r.stringify=function(e,t){t=t||"";var r,o,s=[];for(o in"string"!=typeof t&&(t="?"),e)if(n.call(e,o)){if((r=e[o])||null!=r&&!isNaN(r)||(r=""),o=i(o),r=i(r),null===o||null===r)continue;s.push(o+"="+r)}return s.length?t+s.join("&"):""},r.parse=function(e){for(var t,r=/([^=?#&]+)=?([^&]*)/g,n={};t=r.exec(e);){var i=o(t[1]),s=o(t[2]);null===i||null===s||i in n||(n[i]=s)}return n}},{}],71:[function(e,t,r){"use strict";t.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},{}],72:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("./util/canReportError"),o=e("./util/toSubscriber"),i=e("./symbol/observable"),s=e("./util/pipe"),a=e("./config"),u=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n=this.operator,i=o.toSubscriber(e,t,r);if(n?i.add(n.call(i,this.source)):i.add(this.source||a.config.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),a.config.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){a.config.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),n.canReportError(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=c(t))((function(t,n){var o;o=r.subscribe((function(t){try{e(t)}catch(e){n(e),o&&o.unsubscribe()}}),n,t)}))},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[i.observable]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:s.pipeFromArray(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=c(e))((function(e,r){var n;t.subscribe((function(e){return n=e}),(function(e){return r(e)}),(function(){return e(n)}))}))},e.create=function(t){return new e(t)},e}();function c(e){if(e||(e=a.config.Promise||Promise),!e)throw new Error("no Promise impl found");return e}r.Observable=u},{"./config":76,"./symbol/observable":79,"./util/canReportError":82,"./util/pipe":88,"./util/toSubscriber":89}],73:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("./config"),o=e("./util/hostReportError");r.empty={closed:!0,next:function(e){},error:function(e){if(n.config.useDeprecatedSynchronousErrorHandling)throw e;o.hostReportError(e)},complete:function(){}}},{"./config":76,"./util/hostReportError":83}],74:[function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=e("./util/isFunction"),s=e("./Observer"),a=e("./Subscription"),u=e("../internal/symbol/rxSubscriber"),c=e("./config"),l=e("./util/hostReportError"),f=function(e){function t(r,n,o){var i=e.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=s.empty;break;case 1:if(!r){i.destination=s.empty;break}if("object"==typeof r){r instanceof t?(i.syncErrorThrowable=r.syncErrorThrowable,i.destination=r,r.add(i)):(i.syncErrorThrowable=!0,i.destination=new d(i,r));break}default:i.syncErrorThrowable=!0,i.destination=new d(i,r,n,o)}return i}return o(t,e),t.prototype[u.rxSubscriber]=function(){return this},t.create=function(e,r,n){var o=new t(e,r,n);return o.syncErrorThrowable=!1,o},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},t}(a.Subscription);r.Subscriber=f;var d=function(e){function t(t,r,n,o){var a,u=e.call(this)||this;u._parentSubscriber=t;var c=u;return i.isFunction(r)?a=r:r&&(a=r.next,n=r.error,o=r.complete,r!==s.empty&&(c=Object.create(r),i.isFunction(c.unsubscribe)&&u.add(c.unsubscribe.bind(c)),c.unsubscribe=u.unsubscribe.bind(u))),u._context=c,u._next=a,u._error=n,u._complete=o,u}return o(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;c.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,r=c.config.useDeprecatedSynchronousErrorHandling;if(this._error)r&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)r?(t.syncErrorValue=e,t.syncErrorThrown=!0):l.hostReportError(e),this.unsubscribe();else{if(this.unsubscribe(),r)throw e;l.hostReportError(e)}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var r=function(){return e._complete.call(e._context)};c.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,r),this.unsubscribe()):(this.__tryOrUnsub(r),this.unsubscribe())}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),c.config.useDeprecatedSynchronousErrorHandling)throw e;l.hostReportError(e)}},t.prototype.__tryOrSetError=function(e,t,r){if(!c.config.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,r)}catch(t){return c.config.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(l.hostReportError(t),!0)}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(f);r.SafeSubscriber=d},{"../internal/symbol/rxSubscriber":80,"./Observer":73,"./Subscription":75,"./config":76,"./util/hostReportError":83,"./util/isFunction":86}],75:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("./util/isArray"),o=e("./util/isObject"),i=e("./util/isFunction"),s=e("./util/UnsubscriptionError"),a=function(){function e(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}var t;return e.prototype.unsubscribe=function(){var t;if(!this.closed){var r=this._parentOrParents,a=this._ctorUnsubscribe,c=this._unsubscribe,l=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r instanceof e)r.remove(this);else if(null!==r)for(var f=0;f<r.length;++f)r[f].remove(this);if(i.isFunction(c)){a&&(this._unsubscribe=void 0);try{c.call(this)}catch(e){t=e instanceof s.UnsubscriptionError?u(e.errors):[e]}}if(n.isArray(l)){f=-1;for(var d=l.length;++f<d;){var p=l[f];if(o.isObject(p))try{p.unsubscribe()}catch(e){t=t||[],e instanceof s.UnsubscriptionError?t=t.concat(u(e.errors)):t.push(e)}}}if(t)throw new s.UnsubscriptionError(t)}},e.prototype.add=function(t){var r=t;if(!t)return e.EMPTY;switch(typeof t){case"function":r=new e(t);case"object":if(r===this||r.closed||"function"!=typeof r.unsubscribe)return r;if(this.closed)return r.unsubscribe(),r;if(!(r instanceof e)){var n=r;(r=new e)._subscriptions=[n]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var o=r._parentOrParents;if(null===o)r._parentOrParents=this;else if(o instanceof e){if(o===this)return r;r._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return r;o.push(this)}var i=this._subscriptions;return null===i?this._subscriptions=[r]:i.push(r),r},e.prototype.remove=function(e){var t=this._subscriptions;if(t){var r=t.indexOf(e);-1!==r&&t.splice(r,1)}},e.EMPTY=((t=new e).closed=!0,t),e}();function u(e){return e.reduce((function(e,t){return e.concat(t instanceof s.UnsubscriptionError?t.errors:t)}),[])}r.Subscription=a},{"./util/UnsubscriptionError":81,"./util/isArray":85,"./util/isFunction":86,"./util/isObject":87}],76:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=!1;r.config={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){if(e){var t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}else n&&console.log("RxJS: Back to a better error behavior. Thank you. <3");n=e},get useDeprecatedSynchronousErrorHandling(){return n}}},{}],77:[function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=e("../Subscriber");r.filter=function(e,t){return function(r){return r.lift(new s(e,t))}};var s=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.predicate,this.thisArg))},e}(),a=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.predicate=r,o.thisArg=n,o.count=0,o}return o(t,e),t.prototype._next=function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}t&&this.destination.next(e)},t}(i.Subscriber)},{"../Subscriber":74}],78:[function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=e("../Subscriber");r.map=function(e,t){return function(r){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return r.lift(new s(e,t))}};var s=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.project,this.thisArg))},e}();r.MapOperator=s;var a=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.project=r,o.count=0,o.thisArg=n||o,o}return o(t,e),t.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(i.Subscriber)},{"../Subscriber":74}],79:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},{}],80:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.rxSubscriber="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),r.$$rxSubscriber=r.rxSubscriber},{}],81:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}();r.UnsubscriptionError=n},{}],82:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("../Subscriber");r.canReportError=function(e){for(;e;){var t=e,r=t.closed,o=t.destination,i=t.isStopped;if(r||i)return!1;e=o&&o instanceof n.Subscriber?o:null}return!0}},{"../Subscriber":74}],83:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.hostReportError=function(e){setTimeout((function(){throw e}),0)}},{}],84:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.identity=function(e){return e}},{}],85:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isArray=Array.isArray||function(e){return e&&"number"==typeof e.length}},{}],86:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isFunction=function(e){return"function"==typeof e}},{}],87:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isObject=function(e){return null!==e&&"object"==typeof e}},{}],88:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("./identity");function o(e){return 0===e.length?n.identity:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}r.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o(e)},r.pipeFromArray=o},{"./identity":84}],89:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("../Subscriber"),o=e("../symbol/rxSubscriber"),i=e("../Observer");r.toSubscriber=function(e,t,r){if(e){if(e instanceof n.Subscriber)return e;if(e[o.rxSubscriber])return e[o.rxSubscriber]()}return e||t||r?new n.Subscriber(e,t,r):new n.Subscriber(i.empty)}},{"../Observer":73,"../Subscriber":74,"../symbol/rxSubscriber":80}],90:[function(e,t,r){"use strict";var n=e("url");t.exports=function(e,t,r){if(e===t)return!0;var o=n.parse(e,!1,!0),i=n.parse(t,!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:91}],91:[function(e,t,r){"use strict";var n=/^(?:(?:(?:([^:\/#\?]+:)?(?:(?:\/\/)((?:((?:[^:@\/#\?]+)(?:\:(?:[^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((?:\/?(?:[^\/\?#]+\/+)*)(?:[^\?#]*)))?(\?[^#]+)?)(#.*)?/;t.exports={regex:n,parse:function(e){var t=n.exec(e);return t?{protocol:(t[1]||"").toLowerCase()||void 0,hostname:(t[5]||"").toLowerCase()||void 0,port:t[6]||void 0}:{}}}},{}],92:[function(e,t,r){(function(r){(function(){"use strict";var n=e("requires-port"),o=e("querystringify"),i=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,s=/[\n\r\t]/g,a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,u=/:\d+$/,c=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,l=/^[a-zA-Z]:/;function f(e){return(e||"").toString().replace(i,"")}var d=[["#","hash"],["?","query"],function(e,t){return y(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],p={hash:1,query:1};function h(e){var t,n=("undefined"!=typeof window?window:void 0!==r?r:"undefined"!=typeof self?self:{}).location||{},o={},i=typeof(e=e||n);if("blob:"===e.protocol)o=new v(unescape(e.pathname),{});else if("string"===i)for(t in o=new v(e,{}),p)delete o[t];else if("object"===i){for(t in e)t in p||(o[t]=e[t]);void 0===o.slashes&&(o.slashes=a.test(e.href))}return o}function y(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function b(e,t){e=(e=f(e)).replace(s,""),t=t||{};var r,n=c.exec(e),o=n[1]?n[1].toLowerCase():"",i=!!n[2],a=!!n[3],u=0;return i?a?(r=n[2]+n[3]+n[4],u=n[2].length+n[3].length):(r=n[2]+n[4],u=n[2].length):a?(r=n[3]+n[4],u=n[3].length):r=n[4],"file:"===o?u>=2&&(r=r.slice(2)):y(o)?r=n[4]:o?i&&(r=r.slice(2)):u>=2&&y(t.protocol)&&(r=n[4]),{protocol:o,slashes:i||y(o),slashesCount:u,rest:r}}function v(e,t,r){if(e=(e=f(e)).replace(s,""),!(this instanceof v))return new v(e,t,r);var i,a,u,c,p,g,m=d.slice(),w=typeof t,O=this,_=0;for("object"!==w&&"string"!==w&&(r=t,t=null),r&&"function"!=typeof r&&(r=o.parse),i=!(a=b(e||"",t=h(t))).protocol&&!a.slashes,O.slashes=a.slashes||i&&t.slashes,O.protocol=a.protocol||t.protocol||"",e=a.rest,("file:"===a.protocol&&(2!==a.slashesCount||l.test(e))||!a.slashes&&(a.protocol||a.slashesCount<2||!y(O.protocol)))&&(m[3]=[/(.*)/,"pathname"]);_<m.length;_++)"function"!=typeof(c=m[_])?(u=c[0],g=c[1],u!=u?O[g]=e:"string"==typeof u?~(p="@"===u?e.lastIndexOf(u):e.indexOf(u))&&("number"==typeof c[2]?(O[g]=e.slice(0,p),e=e.slice(p+c[2])):(O[g]=e.slice(p),e=e.slice(0,p))):(p=u.exec(e))&&(O[g]=p[1],e=e.slice(0,p.index)),O[g]=O[g]||i&&c[3]&&t[g]||"",c[4]&&(O[g]=O[g].toLowerCase())):e=c(e,O);r&&(O.query=r(O.query)),i&&t.slashes&&"/"!==O.pathname.charAt(0)&&(""!==O.pathname||""!==t.pathname)&&(O.pathname=function(e,t){if(""===e)return t;for(var r=(t||"/").split("/").slice(0,-1).concat(e.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("/")}(O.pathname,t.pathname)),"/"!==O.pathname.charAt(0)&&y(O.protocol)&&(O.pathname="/"+O.pathname),n(O.port,O.protocol)||(O.host=O.hostname,O.port=""),O.username=O.password="",O.auth&&(~(p=O.auth.indexOf(":"))?(O.username=O.auth.slice(0,p),O.username=encodeURIComponent(decodeURIComponent(O.username)),O.password=O.auth.slice(p+1),O.password=encodeURIComponent(decodeURIComponent(O.password))):O.username=encodeURIComponent(decodeURIComponent(O.auth)),O.auth=O.password?O.username+":"+O.password:O.username),O.origin="file:"!==O.protocol&&y(O.protocol)&&O.host?O.protocol+"//"+O.host:"null",O.href=O.toString()}v.prototype={set:function(e,t,r){var i=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(r||o.parse)(t)),i[e]=t;break;case"port":i[e]=t,n(t,i.protocol)?t&&(i.host=i.hostname+":"+t):(i.host=i.hostname,i[e]="");break;case"hostname":i[e]=t,i.port&&(t+=":"+i.port),i.host=t;break;case"host":i[e]=t,u.test(t)?(t=t.split(":"),i.port=t.pop(),i.hostname=t.join(":")):(i.hostname=t,i.port="");break;case"protocol":i.protocol=t.toLowerCase(),i.slashes=!r;break;case"pathname":case"hash":if(t){var s="pathname"===e?"/":"#";i[e]=t.charAt(0)!==s?s+t:t}else i[e]=t;break;case"username":case"password":i[e]=encodeURIComponent(t);break;case"auth":var a=t.indexOf(":");~a?(i.username=t.slice(0,a),i.username=encodeURIComponent(decodeURIComponent(i.username)),i.password=t.slice(a+1),i.password=encodeURIComponent(decodeURIComponent(i.password))):i.username=encodeURIComponent(decodeURIComponent(t))}for(var c=0;c<d.length;c++){var l=d[c];l[4]&&(i[l[1]]=i[l[1]].toLowerCase())}return i.auth=i.password?i.username+":"+i.password:i.username,i.origin="file:"!==i.protocol&&y(i.protocol)&&i.host?i.protocol+"//"+i.host:"null",i.href=i.toString(),i},toString:function(e){e&&"function"==typeof e||(e=o.stringify);var t,r=this,n=r.host,i=r.protocol;i&&":"!==i.charAt(i.length-1)&&(i+=":");var s=i+(r.protocol&&r.slashes||y(r.protocol)?"//":"");return r.username?(s+=r.username,r.password&&(s+=":"+r.password),s+="@"):r.password?(s+=":"+r.password,s+="@"):"file:"!==r.protocol&&y(r.protocol)&&!n&&"/"!==r.pathname&&(s+="@"),(":"===n[n.length-1]||u.test(r.hostname)&&!r.port)&&(n+=":"),s+=n+r.pathname,(t="object"==typeof r.query?e(r.query):r.query)&&(s+="?"!==t.charAt(0)?"?"+t:t),r.hash&&(s+=r.hash),s}},v.extractProtocol=b,v.location=h,v.trimLeft=f,v.qs=o,t.exports=v}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{querystringify:70,"requires-port":71}]},{},[17])(17)}));
1
+ !function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).SanityClient=t()}}((function(){return function t(e,r,n){function o(s,a){if(!r[s]){if(!e[s]){var c="function"==typeof require&&require;if(!a&&c)return c(s,!0);if(i)return i(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var l=r[s]={exports:{}};e[s][0].call(l.exports,(function(t){return o(e[s][1][t]||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,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],s=!0,a=!1;try{for(r=r.call(t);!(s=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);s=!0);}catch(t){a=!0,o=t}finally{try{s||null==r.return||r.return()}finally{if(a)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var i=t("object-assign"),s=t("../util/observable"),a=s.map,c=s.filter,u=t("../http/queryString"),l=t("../validators");function f(t){this.client=t}function p(t,e){return"undefined"!=typeof window&&e instanceof window.File?i({filename:!1===t.preserveFilename?void 0:e.name,contentType:e.type},t):t}i(f.prototype,{upload:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};l.validateAssetType(t);var n=r.extract||void 0;n&&!n.length&&(n=["none"]);var o=l.hasDataset(this.client.clientConfig),i="image"===t?"images":"files",s=p(r,e),u=s.tag,f=s.label,d=s.title,h=s.description,b=s.creditLine,y=s.filename,v=s.source,g={label:f,title:d,description:h,filename:y,meta:n,creditLine:b};v&&(g.sourceId=v.id,g.sourceName=v.name,g.sourceUrl=v.url);var m=this.client._requestObservable({tag:u,method:"POST",timeout:s.timeout||0,uri:"/assets/".concat(i,"/").concat(o),headers:s.contentType?{"Content-Type":s.contentType}:{},query:g,body:e});return this.client.isPromiseAPI()?m.pipe(c((function(t){return"response"===t.type})),a((function(t){return t.body.document}))).toPromise():m},delete:function(t,e){console.warn("client.assets.delete() is deprecated, please use client.delete(<document-id>)");var r=e||"";return/^(image|file)-/.test(r)?t._id&&(r=t._id):r="".concat(t,"-").concat(r),l.hasDataset(this.client.clientConfig),this.client.delete(r)},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 "'.concat(r,'". URL generation only works for auto-generated IDs.'));var o=n(r.split("-"),4),i=o[1],s=o[2],a=o[3];l.hasDataset(this.client.clientConfig);var c=this.client.clientConfig,f=c.projectId,p=c.dataset,d=e?u(e):"";return"https://cdn.sanity.io/images/".concat(f,"/").concat(p,"/").concat(i,"-").concat(s,".").concat(a).concat(d)}}),e.exports=f},{"../http/queryString":13,"../util/observable":21,"../validators":24,"object-assign":46}],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":46}],3:[function(t,e,r){"use strict";var n=t("object-assign"),o=t("./generateHelpUrl"),i=t("./validators"),s=t("./warnings"),a={apiHost:"https://api.sanity.io",apiVersion:"1",useProjectHostname:!0,isPromiseAPI:!0},c=["localhost","127.0.0.1","0.0.0.0"];r.defaultConfig=a,r.initConfig=function(t,e){var u=n({},e,t);u.apiVersion||s.printNoApiVersionSpecifiedWarning();var l=n({},a,u),f=l.useProjectHostname;if("undefined"==typeof Promise){var p=o("js-client-promise-polyfill");throw new Error("No native Promise-implementation found, polyfill needed - see ".concat(p))}if(f&&!l.projectId)throw new Error("Configuration must contain `projectId`");var d="undefined"!=typeof window&&window.location&&window.location.hostname,h=d&&function(t){return-1!==c.indexOf(t)}(window.location.hostname);d&&h&&l.token&&!0!==l.ignoreBrowserTokenWarning?s.printBrowserTokenWarning():void 0===l.useCdn&&s.printCdnWarning(),f&&i.projectId(l.projectId),l.dataset&&i.dataset(l.dataset),"requestTagPrefix"in l&&(l.requestTagPrefix=l.requestTagPrefix?i.requestTag(l.requestTagPrefix).replace(/\.+$/,""):void 0),l.apiVersion="".concat(l.apiVersion).replace(/^v/,""),l.isDefaultApi=l.apiHost===a.apiHost,l.useCdn=Boolean(l.useCdn)&&!l.withCredentials,r.validateApiVersion(l.apiVersion);var b=l.apiHost.split("://",2),y=b[0],v=b[1],g=l.isDefaultApi?"apicdn.sanity.io":v;return l.useProjectHostname?(l.url="".concat(y,"://").concat(l.projectId,".").concat(v,"/v").concat(l.apiVersion),l.cdnUrl="".concat(y,"://").concat(l.projectId,".").concat(g,"/v").concat(l.apiVersion)):(l.url="".concat(l.apiHost,"/v").concat(l.apiVersion),l.cdnUrl=l.url),l},r.validateApiVersion=function(t){if("1"!==t&&"X"!==t){var e=new Date(t);if(!(/^\d{4}-\d{2}-\d{2}$/.test(t)&&e instanceof Date&&e.getTime()>0))throw new Error("Invalid API version string, expected `1` or date in format `YYYY-MM-DD`")}}},{"./generateHelpUrl":10,"./validators":24,"./warnings":25,"object-assign":46}],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("../util/observable"),s=i.map,a=i.filter,c=t("../validators"),u=t("../util/getSelection"),l=t("./encodeQueryString"),f=t("./transaction"),p=t("./patch"),d=t("./listen"),h=function(t,e){return!1===t?void 0:void 0===t?e:t},b=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{dryRun:t.dryRun,returnIds:!0,returnDocuments:h(t.returnDocuments,!0),visibility:t.visibility||"sync",autoGenerateArrayKeys:t.autoGenerateArrayKeys,skipCrossDatasetReferenceValidation:t.skipCrossDatasetReferenceValidation}},y=function(t){return"response"===t.type},v=function(t){return t.body},g=function(t,e){return t.reduce((function(t,r){return t[e(r)]=r,t}),Object.create(null))},m=function(t){return t.toPromise()};e.exports={listen:d,getDataUrl:function(t,e){var r=this.clientConfig,n=c.hasDataset(r),o="/".concat(t,"/").concat(n),i=e?"".concat(o,"/").concat(e):o;return"/data".concat(i).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},r).pipe(s(n));return this.isPromiseAPI()?m(o):o},getDocument:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={uri:this.getDataUrl("doc",t),json:!0,tag:e.tag},n=this._requestObservable(r).pipe(a(y),s((function(t){return t.body.documents&&t.body.documents[0]})));return this.isPromiseAPI()?m(n):n},getDocuments:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={uri:this.getDataUrl("doc",t.join(",")),json:!0,tag:e.tag},n=this._requestObservable(r).pipe(a(y),s((function(e){var r=g(e.body.documents||[],(function(t){return t._id}));return t.map((function(t){return r[t]||null}))})));return this.isPromiseAPI()?m(n):n},create:function(t,e){return this._create(t,"create",e)},createIfNotExists:function(t,e){return c.requireDocumentId("createIfNotExists",t),this._create(t,"createIfNotExists",e)},createOrReplace:function(t,e){return c.requireDocumentId("createOrReplace",t),this._create(t,"createOrReplace",e)},patch:function(t,e){return new p(t,e,this)},delete:function(t,e){return this.dataRequest("mutate",{mutations:[{delete:u(t)}]},e)},mutate:function(t,e){var r=t instanceof p||t instanceof f?t.serialize():t,n=Array.isArray(r)?r:[r],o=e&&e.transactionId;return this.dataRequest("mutate",{mutations:n,transactionId:o},e)},transaction:function(t){return new f(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()?m(n):n},_dataRequest:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o="mutate"===t,i="query"===t,c=!o&&l(e),u=!o&&c.length<11264,f=u?c:"",p=r.returnFirst,d=r.timeout,h=r.token,g=r.tag,m=r.headers,w={method:u?"GET":"POST",uri:this.getDataUrl(t,f),json:!0,body:u?void 0:e,query:o&&b(r),timeout:d,headers:m,token:h,tag:g,canUseCdn:i};return this._requestObservable(w).pipe(a(y),s(v),s((function(t){if(!o)return t;var e=t.results||[];if(r.returnDocuments)return p?e[0]&&e[0].document:e.map((function(t){return t.document}));var i=p?"documentId":"documentIds",s=p?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":20,"../util/observable":21,"../validators":24,"./encodeQueryString":5,"./listen":6,"./patch":7,"./transaction":8,"object-assign":46}],5:[function(t,e,r){"use strict";var n=["tag"];function o(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var i=encodeURIComponent;e.exports=function(t){var e=t.query,r=t.params,s=void 0===r?{}:r,a=t.options,c=void 0===a?{}:a,u=c.tag,l=o(c,n),f="query=".concat(i(e)),p=u?"?tag=".concat(i(u),"&").concat(f):"?".concat(f),d=Object.keys(s).reduce((function(t,e){return"".concat(t,"&").concat(i("$".concat(e)),"=").concat(i(JSON.stringify(s[e])))}),p);return Object.keys(l).reduce((function(t,e){return c[e]?"".concat(t,"&").concat(i(e),"=").concat(i(c[e])):t}),d)}},{}],6:[function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function o(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var s=t("object-assign"),a=t("../util/observable").Observable,c=t("@sanity/eventsource"),u=t("../util/pick"),l=t("../util/defaults"),f=t("./encodeQueryString"),p=c,d=["includePreviousRevision","includeResult","visibility","effectFormat","tag"],h={includeResult:!0};function b(t){try{var e=t.data&&JSON.parse(t.data)||{};return s({type:t.type},e)}catch(t){return t}}function y(t){if(t instanceof Error)return t;var e=b(t);return e instanceof Error?e:new Error(function(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"}(e))}e.exports=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.clientConfig,i=n.url,s=n.token,c=n.withCredentials,v=n.requestTagPrefix,g=r.tag&&v?[v,r.tag].join("."):r.tag,m=o(o({},l(r,h)),{},{tag:g}),w=u(m,d),_=f({query:t,params:e,options:w,tag:g}),O="".concat(i).concat(this.getDataUrl("listen",_));if(O.length>14800)return new a((function(t){return t.error(new Error("Query too large for listener"))}));var E=m.events?m.events:["mutation"],j=-1!==E.indexOf("reconnect"),x={};return(s||c)&&(x.withCredentials=!0),s&&(x.headers={Authorization:"Bearer ".concat(s)}),new a((function(t){var e,r=u(),n=!1;function o(){n||(j&&t.next({type:"reconnect"}),n||r.readyState===p.CLOSED&&(c(),clearTimeout(e),e=setTimeout(l,100)))}function i(e){t.error(y(e))}function s(e){var r=b(e);return r instanceof Error?t.error(r):t.next(r)}function a(e){n=!0,c(),t.complete()}function c(){r.removeEventListener("error",o,!1),r.removeEventListener("channelError",i,!1),r.removeEventListener("disconnect",a,!1),E.forEach((function(t){return r.removeEventListener(t,s,!1)})),r.close()}function u(){var t=new p(O,x);return t.addEventListener("error",o,!1),t.addEventListener("channelError",i,!1),t.addEventListener("disconnect",a,!1),E.forEach((function(e){return t.addEventListener(e,s,!1)})),t}function l(){r=u()}return function(){n=!0,c()}}))}},{"../util/defaults":19,"../util/observable":21,"../util/pick":23,"./encodeQueryString":5,"@sanity/eventsource":26,"object-assign":46}],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}var o=t("object-assign"),i=t("../util/getSelection"),s=t("../validators"),a=s.validateObject,c=s.validateInsert;function u(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=o({},e),this.client=r}o(u.prototype,{clone:function(){return new u(this.selection,o({},this.operations),this.client)},set:function(t){return this._assign("set",t)},diffMatchPatch:function(t){return a("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=o({},this.operations,{unset:t}),this},setIfMissing:function(t){return this._assign("setIfMissing",t)},replace:function(t){return a("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 c(t,e,r),this._assign("insert",(n(o={},t,e),n(o,"items",r),o))},append:function(t,e){return this.insert("after","".concat(t,"[-1]"),e)},prepend:function(t,e){return this.insert("before","".concat(t,"[0]"),e)},splice:function(t,e,r,n){var o=e<0?e-1:e,i=void 0===r||-1===r?-1:Math.max(0,e+r),s=o<0&&i>=0?"":i,a="".concat(t,"[").concat(o,":").concat(s,"]");return this.insert("replace",a,n||[])},ifRevisionId:function(t){return this.operations.ifRevisionID=t,this},serialize:function(){return o(i(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=o({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 a(t,e),this.operations=o({},this.operations,n({},t,o({},r&&this.operations[t]||{},e))),this}}),e.exports=u},{"../util/getSelection":20,"../validators":24,"object-assign":46}],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}var o=t("object-assign"),i=t("../validators"),s=t("./patch"),a={returnDocuments:!1};function c(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;this.trxId=r,this.operations=t,this.client=e}o(c.prototype,{clone:function(){return new c(this.operations.slice(0),this.client,this.trxId)},create:function(t){return i.validateObject("create",t),this._add({create:t})},createIfNotExists:function(t){var e="createIfNotExists";return i.validateObject(e,t),i.requireDocumentId(e,t),this._add(n({},e,t))},createOrReplace:function(t){var e="createOrReplace";return i.validateObject(e,t),i.requireDocumentId(e,t),this._add(n({},e,t))},delete:function(t){return i.validateDocumentId("delete",t),this._add({delete:{id:t}})},patch:function(t,e){var r="function"==typeof e;if(t instanceof s)return this._add({patch:t.serialize()});if(r){var n=e(new s(t,{},this.client));if(!(n instanceof s))throw new Error("function passed to `patch()` must return the patch");return this._add({patch:n.serialize()})}return this._add({patch:o({id:t},e)})},transactionId:function(t){return t?(this.trxId=t,this):this.trxId},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(),o({transactionId:this.trxId},a,t||{}))},reset:function(){return this.operations=[],this},_add:function(t){return this.operations.push(t),this}}),e.exports=c},{"../validators":24,"./patch":7,"object-assign":46}],9:[function(t,e,r){"use strict";var n=t("object-assign"),o=t("../validators");function i(t){this.request=t.request.bind(t)}n(i.prototype,{create:function(t,e){return this._modify("PUT",t,e)},edit:function(t,e){return this._modify("PATCH",t,e)},delete:function(t){return this._modify("DELETE",t)},list:function(){return this.request({uri:"/datasets"})},_modify:function(t,e,r){return o.dataset(e),this.request({method:t,uri:"/datasets/".concat(e),body:r})}}),e.exports=i},{"../validators":24,"object-assign":46}],10:[function(t,e,r){"use strict";e.exports=function(t){return"https://docs.sanity.io/help/"+t}},{}],11:[function(t,e,r){"use strict";e.exports=[]},{}],12:[function(t,e,r){"use strict";var n=t("make-error"),o=t("object-assign");function i(t){var e=a(t);i.super.call(this,e.message),o(this,e)}function s(t){var e=a(t);s.super.call(this,e.message),o(this,e)}function a(t){var e=t.body,r={response:t,statusCode:t.statusCode,responseBody:c(e,t)};return e.error&&e.message?(r.message="".concat(e.error," - ").concat(e.message),r):e.error&&e.error.description?(r.message=e.error.description,r.details=e.error,r):(r.message=e.error||e.message||function(t){var e=t.statusMessage?" ".concat(t.statusMessage):"";return"".concat(t.method,"-request to ").concat(t.url," resulted in HTTP ").concat(t.statusCode).concat(e)}(t),r)}function c(t,e){return-1!==(e.headers["content-type"]||"").toLowerCase().indexOf("application/json")?JSON.stringify(t,null,2):t}n(i),n(s),r.ClientError=i,r.ServerError=s},{"make-error":44,"object-assign":46}],13:[function(t,e,r){"use strict";e.exports=function(t){var e=[];for(var r in t)t.hasOwnProperty(r)&&e.push("".concat(encodeURIComponent(r),"=").concat(encodeURIComponent(t[r])));return e.length>0?"?".concat(e.join("&")):""}},{}],14:[function(t,e,r){"use strict";var n=t("get-it"),o=t("object-assign"),i=t("get-it/lib/middleware/observable"),s=t("get-it/lib/middleware/jsonRequest"),a=t("get-it/lib/middleware/jsonResponse"),c=t("get-it/lib/middleware/progress"),u=t("../util/observable").Observable,l=t("./errors"),f=l.ClientError,p=l.ServerError,d={onResponse:function(t){if(t.statusCode>=500)throw new p(t);if(t.statusCode>=400)throw new f(t);return t}},h={onResponse:function(t){var e=t.headers["x-sanity-warning"];return(Array.isArray(e)?e:[e]).filter(Boolean).forEach((function(t){return console.warn(t)})),t}},b=n(t("./nodeMiddleware").concat([h,s(),a(),c(),d,i({implementation:u})]));function y(t){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:b)(o({maxRedirects:0},t))}y.defaultRequester=b,y.ClientError=f,y.ServerError=p,e.exports=y},{"../util/observable":21,"./errors":12,"./nodeMiddleware":11,"get-it":28,"get-it/lib/middleware/jsonRequest":32,"get-it/lib/middleware/jsonResponse":33,"get-it/lib/middleware/observable":34,"get-it/lib/middleware/progress":36,"object-assign":46}],15:[function(t,e,r){"use strict";var n=t("object-assign"),o="X-Sanity-Project-ID";e.exports=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},i=e.token||t.token;i&&(r.Authorization="Bearer ".concat(i)),e.useGlobalApi||t.useProjectHostname||!t.projectId||(r[o]=t.projectId);var s=Boolean(void 0===e.withCredentials?t.token||t.withCredentials:e.withCredentials),a=void 0===e.timeout?t.timeout:e.timeout;return n({},e,{headers:n({},r,e.headers||{}),timeout:void 0===a?3e5:a,proxy:e.proxy||t.proxy,json:!0,withCredentials:s})}},{"object-assign":46}],16:[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/".concat(t)})}}),e.exports=n},{"object-assign":46}],17:[function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var i=t("object-assign"),s=t("./util/observable"),a=s.Observable,c=s.map,u=s.filter,l=t("./data/patch"),f=t("./data/transaction"),p=t("./data/dataMethods"),d=t("./datasets/datasetsClient"),h=t("./projects/projectsClient"),b=t("./assets/assetsClient"),y=t("./users/usersClient"),v=t("./auth/authClient"),g=t("./http/request"),m=t("./http/requestOptions"),w=t("./config"),_=w.defaultConfig,O=w.initConfig,E=t("./validators");function j(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_;if(!(this instanceof j))return new j(t);if(this.config(t),this.assets=new b(this),this.datasets=new d(this),this.projects=new h(this),this.users=new y(this),this.auth=new v(this),this.clientConfig.isPromiseAPI){var e=i({},this.clientConfig,{isPromiseAPI:!1});this.observable=new j(e)}}i(j.prototype,p),i(j.prototype,{clone:function(){return new j(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=O(t,this.clientConfig||{}),this},withConfig:function(t){return this.clone().config(t)},getUrl:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1]?this.clientConfig.cdnUrl:this.clientConfig.url;return"".concat(e,"/").concat(t.replace(/^\//,""))},isPromiseAPI:function(){return this.clientConfig.isPromiseAPI},_requestObservable:function(t){var e=this,r=t.url||t.uri,s=void 0===t.canUseCdn?["GET","HEAD"].indexOf(t.method||"GET")>=0&&0===r.indexOf("/data/"):t.canUseCdn,c=this.clientConfig.useCdn&&s,u=t.tag&&this.clientConfig.requestTagPrefix?[this.clientConfig.requestTagPrefix,t.tag].join("."):t.tag||this.clientConfig.requestTagPrefix;u&&(t.query=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){o(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({tag:E.requestTag(u)},t.query));var l=m(this.clientConfig,i({},t,{url:this.getUrl(r,c)}));return new a((function(t){return g(l,e.clientConfig.requester).subscribe(t)}))},request:function(t){var e=this._requestObservable(t).pipe(u((function(t){return"response"===t.type})),c((function(t){return t.body})));return this.isPromiseAPI()?function(t){return t.toPromise()}(e):e}}),j.Patch=l,j.Transaction=f,j.ClientError=g.ClientError,j.ServerError=g.ServerError,j.requester=g.defaultRequester,e.exports=j},{"./assets/assetsClient":1,"./auth/authClient":2,"./config":3,"./data/dataMethods":4,"./data/patch":7,"./data/transaction":8,"./datasets/datasetsClient":9,"./http/request":14,"./http/requestOptions":15,"./projects/projectsClient":16,"./users/usersClient":18,"./util/observable":21,"./validators":24,"object-assign":46}],18:[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/".concat(t)})}}),e.exports=n},{"object-assign":46}],19:[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}),{})}},{}],20:[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"params"in t?{query:t.query,params:t.params}:{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".concat(e))}},{}],21:[function(t,e,r){"use strict";var n=t("rxjs/internal/Observable").Observable,o=t("rxjs/internal/operators/filter").filter,i=t("rxjs/internal/operators/map").map;e.exports={Observable:n,filter:o,map:i}},{"rxjs/internal/Observable":50,"rxjs/internal/operators/filter":55,"rxjs/internal/operators/map":56}],22:[function(t,e,r){"use strict";e.exports=function(t){var e,r=!1;return function(){return r||(e=t.apply(void 0,arguments),r=!0),e}}},{}],23:[function(t,e,r){"use strict";e.exports=function(t,e){return e.reduce((function(e,r){return void 0===t[r]||(e[r]=t[r]),e}),{})}},{}],24:[function(t,e,r){"use strict";function n(t){return(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})(t)}var o=["image","file"],i=["before","after","replace"];r.dataset=function(t){if(!/^(~[a-z0-9]{1}[-\w]{0,63}|[a-z0-9]{1}[-\w]{0,63})$/.test(t))throw new Error("Datasets can only contain lowercase characters, numbers, underscores and dashes, and start with tilde, and be maximum 64 characters")},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: ".concat(t,". Must be one of ").concat(o.join(", ")))},r.validateObject=function(t,e){if(null===e||"object"!==n(e)||Array.isArray(e))throw new Error("".concat(t,"() takes an object of properties"))},r.requireDocumentId=function(t,e){if(!e._id)throw new Error("".concat(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("".concat(t,'(): "').concat(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'"'.concat(t,'"')})).join(", ");throw new Error("".concat(n,' takes an "at"-argument which is one of: ').concat(o))}if("string"!=typeof e)throw new Error("".concat(n,' takes a "selector"-argument which must be a string'));if(!Array.isArray(r))throw new Error("".concat(n,' takes an "items"-argument which must be an array'))},r.hasDataset=function(t){if(!t.dataset)throw new Error("`dataset` must be provided to perform queries");return t.dataset||""},r.requestTag=function(t){if("string"!=typeof t||!/^[a-z0-9._-]{1,75}$/i.test(t))throw new Error("Tag can only contain alphanumeric characters, underscores, dashes and dots, and be between one and 75 characters long.");return t}},{}],25:[function(t,e,r){"use strict";var n=t("./generateHelpUrl"),o=t("./util/once"),i=function(t){return o((function(){for(var e,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(e=console).warn.apply(e,[t.join(" ")].concat(n))}))};r.printCdnWarning=i(["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 ".concat(n("js-client-cdn-configuration"),"."),"To hide this warning, please set the `useCdn` option to either `true` or `false` when creating","the client."]),r.printBrowserTokenWarning=i(["You have configured Sanity client to use a token in the browser. This may cause unintentional security issues.","See ".concat(n("js-client-browser-token")," for more information and how to hide this warning.")]),r.printNoApiVersionSpecifiedWarning=i(["Using the Sanity client without specifying an API version is deprecated.","See ".concat(n("js-client-api-version"))])},{"./generateHelpUrl":10,"./util/once":22}],26:[function(t,e,r){var n=t("event-source-polyfill");e.exports=n.EventSourcePolyfill},{"event-source-polyfill":27}],27:[function(t,e,r){!function(t){"use strict";var n=t.setTimeout,o=t.clearTimeout,i=t.XMLHttpRequest,s=t.XDomainRequest,a=t.ActiveXObject,c=t.EventSource,u=t.document,l=t.Promise,f=t.fetch,p=t.Response,d=t.TextDecoder,h=t.TextEncoder,b=t.AbortController;if("undefined"==typeof window||void 0===u||"readyState"in u||null!=u.body||(u.readyState="loading",window.addEventListener("load",(function(t){u.readyState="complete"}),!1)),null==i&&null!=a&&(i=function(){return new a("Microsoft.XMLHTTP")}),null==Object.create&&(Object.create=function(t){function e(){}return e.prototype=t,new e}),Date.now||(Date.now=function(){return(new Date).getTime()}),null==b){var y=f;f=function(t,e){var r=e.signal;return y(t,{headers:e.headers,credentials:e.credentials,cache:e.cache}).then((function(t){var e=t.body.getReader();return r._reader=e,r._aborted&&r._reader.cancel(),{status:t.status,statusText:t.statusText,headers:t.headers,body:{getReader:function(){return e}}}}))},b=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){null!=this.signal._reader&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function v(){this.bitsNeeded=0,this.codePoint=0}v.prototype.decode=function(t){function e(t,e,r){if(1===r)return t>=128>>e&&t<<e<=2047;if(2===r)return t>=2048>>e&&t<<e<=55295||t>=57344>>e&&t<<e<=65535;if(3===r)return t>=65536>>e&&t<<e<=1114111;throw new Error}function r(t,e){if(6===t)return e>>6>15?3:e>31?2:1;if(12===t)return e>15?3:2;if(18===t)return 3;throw new Error}for(var n="",o=this.bitsNeeded,i=this.codePoint,s=0;s<t.length;s+=1){var a=t[s];0!==o&&(a<128||a>191||!e(i<<6|63&a,o-6,r(o,i)))&&(o=0,i=65533,n+=String.fromCharCode(i)),0===o?(a>=0&&a<=127?(o=0,i=a):a>=192&&a<=223?(o=6,i=31&a):a>=224&&a<=239?(o=12,i=15&a):a>=240&&a<=247?(o=18,i=7&a):(o=0,i=65533),0===o||e(i,o,r(o,i))||(o=0,i=65533)):(o-=6,i=i<<6|63&a),0===o&&(i<=65535?n+=String.fromCharCode(i):(n+=String.fromCharCode(55296+(i-65535-1>>10)),n+=String.fromCharCode(56320+(i-65535-1&1023))))}return this.bitsNeeded=o,this.codePoint=i,n},null!=d&&null!=h&&function(){try{return"test"===(new d).decode((new h).encode("test"),{stream:!0})}catch(t){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+t)}return!1}()||(d=v);var g=function(){};function m(t){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=g,this.onload=g,this.onerror=g,this.onreadystatechange=g,this._contentType="",this._xhr=t,this._sendTimeout=0,this._abort=g}function w(t){return t.replace(/[A-Z]/g,(function(t){return String.fromCharCode(t.charCodeAt(0)+32)}))}function _(t){for(var e=Object.create(null),r=t.split("\r\n"),n=0;n<r.length;n+=1){var o=r[n].split(": "),i=o.shift(),s=o.join(": ");e[w(i)]=s}this._map=e}function O(){}function E(t){this._headers=t}function j(){}function x(){this._listeners=Object.create(null)}function S(t){n((function(){throw t}),0)}function C(t){this.type=t,this.target=void 0}function T(t,e){C.call(this,t),this.data=e.data,this.lastEventId=e.lastEventId}function P(t,e){C.call(this,t),this.status=e.status,this.statusText=e.statusText,this.headers=e.headers}function q(t,e){C.call(this,t),this.error=e.error}m.prototype.open=function(t,e){this._abort(!0);var r=this,s=this._xhr,a=1,c=0;this._abort=function(t){0!==r._sendTimeout&&(o(r._sendTimeout),r._sendTimeout=0),1!==a&&2!==a&&3!==a||(a=4,s.onload=g,s.onerror=g,s.onabort=g,s.onprogress=g,s.onreadystatechange=g,s.abort(),0!==c&&(o(c),c=0),t||(r.readyState=4,r.onabort(null),r.onreadystatechange())),a=0};var u=function(){if(1===a){var t=0,e="",n=void 0;if("contentType"in s)t=200,e="OK",n=s.contentType;else try{t=s.status,e=s.statusText,n=s.getResponseHeader("Content-Type")}catch(r){t=0,e="",n=void 0}0!==t&&(a=2,r.readyState=2,r.status=t,r.statusText=e,r._contentType=n,r.onreadystatechange())}},l=function(){if(u(),2===a||3===a){a=3;var t="";try{t=s.responseText}catch(t){}r.readyState=3,r.responseText=t,r.onprogress()}},f=function(t,e){if(null!=e&&null!=e.preventDefault||(e={preventDefault:g}),l(),1===a||2===a||3===a){if(a=4,0!==c&&(o(c),c=0),r.readyState=4,"load"===t)r.onload(e);else if("error"===t)r.onerror(e);else{if("abort"!==t)throw new TypeError;r.onabort(e)}r.onreadystatechange()}},p=function(){c=n((function(){p()}),500),3===s.readyState&&l()};"onload"in s&&(s.onload=function(t){f("load",t)}),"onerror"in s&&(s.onerror=function(t){f("error",t)}),"onabort"in s&&(s.onabort=function(t){f("abort",t)}),"onprogress"in s&&(s.onprogress=l),"onreadystatechange"in s&&(s.onreadystatechange=function(t){!function(t){null!=s&&(4===s.readyState?"onload"in s&&"onerror"in s&&"onabort"in s||f(""===s.responseText?"error":"load",t):3===s.readyState?"onprogress"in s||l():2===s.readyState&&u())}(t)}),!("contentType"in s)&&"ontimeout"in i.prototype||(e+=(-1===e.indexOf("?")?"?":"&")+"padding=true"),s.open(t,e,!0),"readyState"in s&&(c=n((function(){p()}),0))},m.prototype.abort=function(){this._abort(!1)},m.prototype.getResponseHeader=function(t){return this._contentType},m.prototype.setRequestHeader=function(t,e){var r=this._xhr;"setRequestHeader"in r&&r.setRequestHeader(t,e)},m.prototype.getAllResponseHeaders=function(){return null!=this._xhr.getAllResponseHeaders&&this._xhr.getAllResponseHeaders()||""},m.prototype.send=function(){if("ontimeout"in i.prototype&&("sendAsBinary"in i.prototype||"mozAnon"in i.prototype)||null==u||null==u.readyState||"complete"===u.readyState){var t=this._xhr;"withCredentials"in t&&(t.withCredentials=this.withCredentials);try{t.send(void 0)}catch(t){throw t}}else{var e=this;e._sendTimeout=n((function(){e._sendTimeout=0,e.send()}),4)}},_.prototype.get=function(t){return this._map[w(t)]},null!=i&&null==i.HEADERS_RECEIVED&&(i.HEADERS_RECEIVED=2),O.prototype.open=function(t,e,r,n,o,s,a){t.open("GET",o);var c=0;for(var u in t.onprogress=function(){var e=t.responseText.slice(c);c+=e.length,r(e)},t.onerror=function(t){t.preventDefault(),n(new Error("NetworkError"))},t.onload=function(){n(null)},t.onabort=function(){n(null)},t.onreadystatechange=function(){if(t.readyState===i.HEADERS_RECEIVED){var r=t.status,n=t.statusText,o=t.getResponseHeader("Content-Type"),s=t.getAllResponseHeaders();e(r,n,o,new _(s))}},t.withCredentials=s,a)Object.prototype.hasOwnProperty.call(a,u)&&t.setRequestHeader(u,a[u]);return t.send(),t},E.prototype.get=function(t){return this._headers.get(t)},j.prototype.open=function(t,e,r,n,o,i,s){var a=null,c=new b,u=c.signal,p=new d;return f(o,{headers:s,credentials:i?"include":"same-origin",signal:u,cache:"no-store"}).then((function(t){return a=t.body.getReader(),e(t.status,t.statusText,t.headers.get("Content-Type"),new E(t.headers)),new l((function(t,e){var n=function(){a.read().then((function(e){if(e.done)t(void 0);else{var o=p.decode(e.value,{stream:!0});r(o),n()}})).catch((function(t){e(t)}))};n()}))})).catch((function(t){return"AbortError"===t.name?void 0:t})).then((function(t){n(t)})),{abort:function(){null!=a&&a.cancel(),c.abort()}}},x.prototype.dispatchEvent=function(t){t.target=this;var e=this._listeners[t.type];if(null!=e)for(var r=e.length,n=0;n<r;n+=1){var o=e[n];try{"function"==typeof o.handleEvent?o.handleEvent(t):o.call(this,t)}catch(t){S(t)}}},x.prototype.addEventListener=function(t,e){t=String(t);var r=this._listeners,n=r[t];null==n&&(n=[],r[t]=n);for(var o=!1,i=0;i<n.length;i+=1)n[i]===e&&(o=!0);o||n.push(e)},x.prototype.removeEventListener=function(t,e){t=String(t);var r=this._listeners,n=r[t];if(null!=n){for(var o=[],i=0;i<n.length;i+=1)n[i]!==e&&o.push(n[i]);0===o.length?delete r[t]:r[t]=o}},T.prototype=Object.create(C.prototype),P.prototype=Object.create(C.prototype),q.prototype=Object.create(C.prototype);var R=/^text\/event\-stream(;.*)?$/i,A=function(t,e){var r=null==t?e:parseInt(t,10);return r!=r&&(r=e),I(r)},I=function(t){return Math.min(Math.max(t,1e3),18e6)},D=function(t,e,r){try{"function"==typeof e&&e.call(t,r)}catch(t){S(t)}};function U(t,e){x.call(this),e=e||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,function(t,e,r){e=String(e);var a=Boolean(r.withCredentials),c=r.lastEventIdQueryParameterName||"lastEventId",u=I(1e3),l=A(r.heartbeatTimeout,45e3),f="",p=u,d=!1,h=0,b=r.headers||{},y=r.Transport,v=k&&null==y?void 0:new m(null!=y?new y:null!=i&&"withCredentials"in i.prototype||null==s?new i:new s),g=null!=y&&"string"!=typeof y?new y:null==v?new j:new O,w=void 0,_=0,E=-1,x="",S="",C="",U="",H=0,M=0,N=0,L=function(e,r,n,o){if(0===E)if(200===e&&null!=n&&R.test(n)){E=1,d=Date.now(),p=u,t.readyState=1;var i=new P("open",{status:e,statusText:r,headers:o});t.dispatchEvent(i),D(t,t.onopen,i)}else{var s="";200!==e?(r&&(r=r.replace(/\s+/g," ")),s="EventSource's response has a status "+e+" "+r+" that is not 200. Aborting the connection."):s="EventSource's response has a Content-Type specifying an unsupported type: "+(null==n?"-":n.replace(/\s+/g," "))+". Aborting the connection.",B();i=new P("error",{status:e,statusText:r,headers:o});t.dispatchEvent(i),D(t,t.onerror,i),console.error(s)}},z=function(e){if(1===E){for(var r=-1,i=0;i<e.length;i+=1){(c=e.charCodeAt(i))!=="\n".charCodeAt(0)&&c!=="\r".charCodeAt(0)||(r=i)}var s=(-1!==r?U:"")+e.slice(0,r+1);U=(-1===r?U:"")+e.slice(r+1),""!==e&&(d=Date.now(),h+=e.length);for(var a=0;a<s.length;a+=1){var c=s.charCodeAt(a);if(-1===H&&c==="\n".charCodeAt(0))H=0;else if(-1===H&&(H=0),c==="\r".charCodeAt(0)||c==="\n".charCodeAt(0)){if(0!==H){1===H&&(N=a+1);var b=s.slice(M,N-1),y=s.slice(N+(N<a&&s.charCodeAt(N)===" ".charCodeAt(0)?1:0),a);"data"===b?(x+="\n",x+=y):"id"===b?S=y:"event"===b?C=y:"retry"===b?(u=A(y,u),p=u):"heartbeatTimeout"===b&&(l=A(y,l),0!==_&&(o(_),_=n((function(){F()}),l)))}if(0===H){if(""!==x){f=S,""===C&&(C="message");var v=new T(C,{data:x.slice(1),lastEventId:S});if(t.dispatchEvent(v),"open"===C?D(t,t.onopen,v):"message"===C?D(t,t.onmessage,v):"error"===C&&D(t,t.onerror,v),2===E)return}x="",C=""}H=c==="\r".charCodeAt(0)?-1:0}else 0===H&&(M=a,H=1),1===H?c===":".charCodeAt(0)&&(N=a+1,H=2):2===H&&(H=3)}}},V=function(e){if(1===E||0===E){E=-1,0!==_&&(o(_),_=0),_=n((function(){F()}),p),p=I(Math.min(16*u,2*p)),t.readyState=0;var r=new q("error",{error:e});t.dispatchEvent(r),D(t,t.onerror,r),null!=e&&console.error(e)}},B=function(){E=2,null!=w&&(w.abort(),w=void 0),0!==_&&(o(_),_=0),t.readyState=2},F=function(){if(_=0,-1===E){d=!1,h=0,_=n((function(){F()}),l),E=0,x="",C="",S=f,U="",M=0,N=0,H=0;var r=e;if("data:"!==e.slice(0,5)&&"blob:"!==e.slice(0,5)&&""!==f){var o=e.indexOf("?");r=-1===o?e:e.slice(0,o+1)+e.slice(o+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,(function(t,e){return e===c?"":t})),r+=(-1===e.indexOf("?")?"?":"&")+c+"="+encodeURIComponent(f)}var i=t.withCredentials,s={Accept:"text/event-stream"},a=t.headers;if(null!=a)for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&(s[u]=a[u]);try{w=g.open(v,L,z,V,r,i,s)}catch(t){throw B(),t}}else if(d||null==w){var p=Math.max((d||Date.now())+l-Date.now(),1);d=!1,_=n((function(){F()}),p)}else V(new Error("No activity within "+l+" milliseconds. "+(0===E?"No response received.":h+" chars received.")+" Reconnecting.")),null!=w&&(w.abort(),w=void 0)};t.url=e,t.readyState=0,t.withCredentials=a,t.headers=b,t._close=B,F()}(this,t,e)}var k=null!=f&&null!=p&&"body"in p.prototype;U.prototype=Object.create(x.prototype),U.prototype.CONNECTING=0,U.prototype.OPEN=1,U.prototype.CLOSED=2,U.prototype.close=function(){this._close()},U.CONNECTING=0,U.OPEN=1,U.CLOSED=2,U.prototype.withCredentials=void 0;var H=c;null==i||null!=c&&"withCredentials"in c.prototype||(H=U),function(n){if("object"==typeof e&&"object"==typeof e.exports){var o=n(r);void 0!==o&&(e.exports=o)}else n(t)}((function(t){t.EventSourcePolyfill=U,t.NativeEventSource=c,t.EventSource=H}))}("undefined"==typeof globalThis?"undefined"!=typeof window?window:"undefined"!=typeof self?self:this:globalThis)},{}],28:[function(t,e,r){e.exports=t("./lib-node")},{"./lib-node":29}],29:[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"),c=["request","response","progress","error","abort"],u=["processOptions","validateOptions","interceptRequest","finalizeOptions","onRequest","onResponse","onError","onReturn","onHeaders"];e.exports=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a,l=[],f=u.reduce((function(t,e){return t[e]=t[e]||[],t}),{processOptions:[i],validateOptions:[s]});function p(t){var e=c.reduce((function(t,e){return t[e]=n(),t}),{}),i=o(f),s=i("processOptions",t);i("validateOptions",s);var a={options:s,channels:e,applyMiddleware:i},u=null,l=e.request.subscribe((function(t){u=r(t,(function(r,n){return function(t,r,n){var o=t,s=r;if(!o)try{s=i("onResponse",r,n)}catch(t){s=null,o=t}(o=o&&i("onError",o,n))?e.error.publish(o):s&&e.response.publish(s)}(r,n,t)}))}));e.abort.subscribe((function(){l(),u&&u.abort()}));var p=i("onReturn",e,a);return p===e&&e.request.publish(a),p}return p.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 u.forEach((function(e){t[e]&&f[e].push(t[e])})),l.push(t),p},p.clone=function(){return t(l)},e.forEach(p.use),p}},{"./middleware/defaultOptionsProcessor":30,"./middleware/defaultOptionsValidator":31,"./request":39,"./util/middlewareReducer":41,"nano-pubsub":45}],30:[function(t,e,r){"use strict";var n=t("object-assign"),o=t("url-parse"),i="undefined"!=typeof navigator&&"ReactNative"===navigator.product,s=Object.prototype.hasOwnProperty,a={timeout:i?6e4:12e4};function c(t){var e=[];for(var r in t)s.call(t,r)&&n(r,t[r]);return e.length?e.join("&"):"";function n(t,r){Array.isArray(r)?r.forEach((function(e){return n(t,e)})):e.push([t,r].map(encodeURIComponent).join("="))}}function u(t){if(!1===t||0===t)return!1;if(t.connect||t.socket)return t;var e=Number(t);return isNaN(e)?u(a.timeout):{connect:e,socket:e}}e.exports=function(t){var e="string"==typeof t?n({url:t},a):n({},a,t),r=o(e.url,{},!0);return e.timeout=u(e.timeout),e.query&&(r.query=n({},r.query,function(t){var e={};for(var r in t)void 0!==t[r]&&(e[r]=t[r]);return e}(e.query))),e.method=e.body&&!e.method?"POST":(e.method||"GET").toUpperCase(),e.url=r.toString(c),e}},{"object-assign":46,"url-parse":70}],31:[function(t,e,r){"use strict";var n=/^https?:\/\//i;e.exports=function(t){if(!n.test(t.url))throw new Error('"'.concat(t.url,'" is not a valid URL'))}},{}],32:[function(t,e,r){"use strict";function n(t){return(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})(t)}var o=t("object-assign"),i=t("is-plain-object"),s=["boolean","string","number"];e.exports=function(){return{processOptions:function(t){var e=t.body;return e&&"function"!=typeof e.pipe&&!function(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}(e)&&(-1!==s.indexOf(n(e))||Array.isArray(e)||i(e))?o({},t,{body:JSON.stringify(t.body),headers:o({},t.headers,{"Content-Type":"application/json"})}):t}}}},{"is-plain-object":42,"object-assign":46}],33:[function(t,e,r){"use strict";var n=t("object-assign");function o(t){try{return JSON.parse(t)}catch(t){throw t.message="Failed to parsed response body as JSON: ".concat(t.message),t}}e.exports=function(t){return{onResponse:function(e){var r=e.headers["content-type"]||"",i=t&&t.force||-1!==r.indexOf("application/json");return e.body&&r&&i?n({},e,{body:o(e.body)}):e},processOptions:function(t){return n({},t,{headers:n({Accept:"application/json"},t.headers)})}}}},{"object-assign":46}],34:[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]:{}).implementation||n.Observable;if(!t)throw new Error("`Observable` is not available in global scope, and no implementation was passed");return{onReturn:function(e,r){return new t((function(t){return e.error.subscribe((function(e){return t.error(e)})),e.progress.subscribe((function(e){return t.next(o({type:"progress"},e))})),e.response.subscribe((function(e){t.next(o({type:"response"},e)),t.complete()})),e.request.publish(r),function(){return e.abort.publish()}}))}}}},{"../util/global":40,"object-assign":46}],35:[function(t,e,r){"use strict";e.exports=function(){return{onRequest:function(t){if("xhr"===t.adapter){var e=t.request,r=t.context;"upload"in e&&"onprogress"in e.upload&&(e.upload.onprogress=n("upload")),"onprogress"in e&&(e.onprogress=n("download"))}function n(t){return function(e){var n=e.lengthComputable?e.loaded/e.total*100:-1;r.channels.progress.publish({stage:t,percent:n,total:e.total,loaded:e.loaded,lengthComputable:e.lengthComputable})}}}}}},{}],36:[function(t,e,r){"use strict";e.exports=t("./node-progress")},{"./node-progress":35}],37:[function(t,e,r){"use strict";var n=t("same-origin"),o=t("parse-headers"),i=t("./browser/fetchXhr"),s="undefined"==typeof window?void 0:window,a=s?"xhr":"fetch",c="function"==typeof XMLHttpRequest?XMLHttpRequest:function(){},u="withCredentials"in new c,l="undefined"==typeof XDomainRequest?void 0:XDomainRequest,f=u?c:l;s||(c=i,f=i),e.exports=function(t,e){var r=t.options,i=t.applyMiddleware("finalizeOptions",r),u={},l=s&&s.location&&!n(s.location.href,i.url),p=t.applyMiddleware("interceptRequest",void 0,{adapter:a,context:t});if(p){var d=setTimeout(e,0,null,p);return{abort:function(){return clearTimeout(d)}}}var h=l?new f:new c,b=s&&s.XDomainRequest&&h instanceof s.XDomainRequest,y=i.headers,v=i.timeout,g=!1,m=!1,w=!1;if(h.onerror=j,h.ontimeout=j,h.onabort=function(){E(!0),g=!0},h.onprogress=function(){},h[b?"onload":"onreadystatechange"]=function(){v&&(E(),u.socket=setTimeout((function(){return O("ESOCKETTIMEDOUT")}),v.socket)),g||4!==h.readyState&&!b||0!==h.status&&(g||m||w||(0!==h.status?(E(),m=!0,e(null,function(){var t=h.status,e=h.statusText;if(b&&void 0===t)t=200;else{if(t>12e3&&t<12156)return j();t=1223===h.status?204:h.status,e=1223===h.status?"No Content":e}return{body:h.response||h.responseText,url:i.url,method:i.method,headers:b?{}:o(h.getAllResponseHeaders()),statusCode:t,statusMessage:e}}())):j(new Error("Unknown XHR error"))))},h.open(i.method,i.url,!0),h.withCredentials=!!i.withCredentials,y&&h.setRequestHeader)for(var _ in y)y.hasOwnProperty(_)&&h.setRequestHeader(_,y[_]);else if(y&&b)throw new Error("Headers cannot be set on an XDomainRequest object");return i.rawBody&&(h.responseType="arraybuffer"),t.applyMiddleware("onRequest",{options:i,adapter:a,request:h,context:t}),h.send(i.body||null),v&&(u.connect=setTimeout((function(){return O("ETIMEDOUT")}),v.connect)),{abort:function(){g=!0,h&&h.abort()}};function O(e){w=!0,h.abort();var r=new Error("ESOCKETTIMEDOUT"===e?"Socket timed out on request to ".concat(i.url):"Connection timed out on request to ".concat(i.url));r.code=e,t.channels.error.publish(r)}function E(t){(t||g||h.readyState>=2&&u.connect)&&clearTimeout(u.connect),u.socket&&clearTimeout(u.socket)}function j(t){if(!m){E(!0),m=!0,h=null;var r=t||new Error("Network error while attempting to reach ".concat(i.url));r.isNetworkError=!0,r.request=i,e(r)}}}},{"./browser/fetchXhr":38,"parse-headers":47,"same-origin":68}],38:[function(t,e,r){"use strict";function n(){this.readyState=0}n.prototype.open=function(t,e){this._method=t,this._url=e,this._resHeaders="",this.readyState=1,this.onreadystatechange()},n.prototype.abort=function(){this._controller&&this._controller.abort()},n.prototype.getAllResponseHeaders=function(){return this._resHeaders},n.prototype.setRequestHeader=function(t,e){this._headers=this._headers||{},this._headers[t]=e},n.prototype.send=function(t){var e=this,r=this._controller="function"==typeof AbortController&&new AbortController,n="arraybuffer"!==this.responseType,o={method:this._method,headers:this._headers,signal:r&&r.signal,body:t};"undefined"!=typeof window&&(o.credentials=this.withCredentials?"include":"omit"),fetch(this._url,o).then((function(t){return t.headers.forEach((function(t,r){e._resHeaders+="".concat(r,": ").concat(t,"\r\n")})),e.status=t.status,e.statusText=t.statusText,e.readyState=3,n?t.text():t.arrayBuffer()})).then((function(t){n?e.responseText=t:e.response=t,e.readyState=4,e.onreadystatechange()})).catch((function(t){"AbortError"!==t.name?e.onerror(t):e.onabort()}))},e.exports=n},{}],39:[function(t,e,r){"use strict";e.exports=t("./node-request")},{"./node-request":37}],40:[function(t,e,r){(function(t){(function(){"use strict";"undefined"!=typeof globalThis?e.exports=globalThis:"undefined"!=typeof window?e.exports=window:void 0!==t?e.exports=t:"undefined"!=typeof self?e.exports=self:e.exports={}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],41:[function(t,e,r){"use strict";e.exports=function(t){return function(e,r){for(var n="onError"===e,o=r,i=arguments.length,s=new Array(i>2?i-2:0),a=2;a<i;a++)s[a-2]=arguments[a];for(var c=0;c<t[e].length&&(o=t[e][c].apply(void 0,[o].concat(s)),!n||o);c++);return o}}},{}],42:[function(t,e,r){"use strict";var n=t("isobject");function o(t){return!0===n(t)&&"[object Object]"===Object.prototype.toString.call(t)}e.exports=function(t){var e,r;return!1!==o(t)&&"function"==typeof(e=t.constructor)&&!1!==o(r=e.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf")}},{isobject:43}],43:[function(t,e,r){"use strict";e.exports=function(t){return null!=t&&"object"==typeof t&&!1===Array.isArray(t)}},{}],44:[function(t,e,r){"use strict";var n="undefined"!=typeof Reflect?Reflect.construct:void 0,o=Object.defineProperty,i=Error.captureStackTrace;function s(t){void 0!==t&&o(this,"message",{configurable:!0,value:t,writable:!0});var e=this.constructor.name;void 0!==e&&e!==this.name&&o(this,"name",{configurable:!0,value:e,writable:!0}),i(this,this.constructor)}void 0===i&&(i=function(t){var e=new Error;o(t,"stack",{configurable:!0,get:function(){var t=e.stack;return o(this,"stack",{configurable:!0,value:t,writable:!0}),t},set:function(e){o(t,"stack",{configurable:!0,value:e,writable:!0})}})}),s.prototype=Object.create(Error.prototype,{constructor:{configurable:!0,value:s,writable:!0}});var a=function(){function t(t,e){return o(t,"name",{configurable:!0,value:e})}try{var e=function(){};if(t(e,"foo"),"foo"===e.name)return t}catch(t){}}();r=e.exports=function(t,e){if(null==e||e===Error)e=s;else if("function"!=typeof e)throw new TypeError("super_ should be a function");var r;if("string"==typeof t)r=t,t=void 0!==n?function(){return n(e,arguments,this.constructor)}:function(){e.apply(this,arguments)},void 0!==a&&(a(t,r),r=void 0);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 void 0!==r&&(o.name={configurable:!0,value:r,writable:!0}),t.prototype=Object.create(e.prototype,o),t},r.BaseError=s},{}],45:[function(t,e,r){e.exports=function(){var t=[];return{subscribe:function(e){return t.push(e),function(){var r=t.indexOf(e);r>-1&&t.splice(r,1)}},publish:function(){for(var e=0;e<t.length;e++)t[e].apply(null,arguments)}}}},{}],46:[function(t,e,r){"use strict";var n=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function s(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}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,c=s(t),u=1;u<arguments.length;u++){for(var l in r=Object(arguments[u]))o.call(r,l)&&(c[l]=r[l]);if(n){a=n(r);for(var f=0;f<a.length;f++)i.call(r,a[f])&&(c[a[f]]=r[a[f]])}}return c}},{}],47:[function(t,e,r){var n=function(t){return t.replace(/^\s+|\s+$/g,"")},o=function(t){return"[object Array]"===Object.prototype.toString.call(t)};e.exports=function(t){if(!t)return{};for(var e={},r=n(t).split("\n"),i=0;i<r.length;i++){var s=r[i],a=s.indexOf(":"),c=n(s.slice(0,a)).toLowerCase(),u=n(s.slice(a+1));void 0===e[c]?e[c]=u:o(e[c])?e[c].push(u):e[c]=[e[c],u]}return e}},{}],48:[function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty;function o(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function i(t){try{return encodeURIComponent(t)}catch(t){return null}}r.stringify=function(t,e){e=e||"";var r,o,s=[];for(o in"string"!=typeof e&&(e="?"),t)if(n.call(t,o)){if((r=t[o])||null!=r&&!isNaN(r)||(r=""),o=i(o),r=i(r),null===o||null===r)continue;s.push(o+"="+r)}return s.length?e+s.join("&"):""},r.parse=function(t){for(var e,r=/([^=?#&]+)=?([^&]*)/g,n={};e=r.exec(t);){var i=o(e[1]),s=o(e[2]);null===i||null===s||i in n||(n[i]=s)}return n}},{}],49:[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}},{}],50:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./util/canReportError"),o=t("./util/toSubscriber"),i=t("./symbol/observable"),s=t("./util/pipe"),a=t("./config"),c=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?i.add(n.call(i,this.source)):i.add(this.source||a.config.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),a.config.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){a.config.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),n.canReportError(t)?t.error(e):console.warn(e)}},t.prototype.forEach=function(t,e){var r=this;return new(e=u(e))((function(e,n){var o;o=r.subscribe((function(e){try{t(e)}catch(t){n(t),o&&o.unsubscribe()}}),n,e)}))},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[i.observable]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:s.pipeFromArray(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=u(t))((function(t,r){var n;e.subscribe((function(t){return n=t}),(function(t){return r(t)}),(function(){return t(n)}))}))},t.create=function(e){return new t(e)},t}();function u(t){if(t||(t=a.config.Promise||Promise),!t)throw new Error("no Promise impl found");return t}r.Observable=c},{"./config":54,"./symbol/observable":57,"./util/canReportError":60,"./util/pipe":66,"./util/toSubscriber":67}],51:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./config"),o=t("./util/hostReportError");r.empty={closed:!0,next:function(t){},error:function(t){if(n.config.useDeprecatedSynchronousErrorHandling)throw t;o.hostReportError(t)},complete:function(){}}},{"./config":54,"./util/hostReportError":61}],52:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("./util/isFunction"),s=t("./Observer"),a=t("./Subscription"),c=t("../internal/symbol/rxSubscriber"),u=t("./config"),l=t("./util/hostReportError"),f=function(t){function e(r,n,o){var i=t.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=s.empty;break;case 1:if(!r){i.destination=s.empty;break}if("object"==typeof r){r instanceof e?(i.syncErrorThrowable=r.syncErrorThrowable,i.destination=r,r.add(i)):(i.syncErrorThrowable=!0,i.destination=new p(i,r));break}default:i.syncErrorThrowable=!0,i.destination=new p(i,r,n,o)}return i}return o(e,t),e.prototype[c.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.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},e}(a.Subscription);r.Subscriber=f;var p=function(t){function e(e,r,n,o){var a,c=t.call(this)||this;c._parentSubscriber=e;var u=c;return i.isFunction(r)?a=r:r&&(a=r.next,n=r.error,o=r.complete,r!==s.empty&&(u=Object.create(r),i.isFunction(u.unsubscribe)&&c.add(u.unsubscribe.bind(u)),u.unsubscribe=c.unsubscribe.bind(c))),c._context=u,c._next=a,c._error=n,c._complete=o,c}return o(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;u.config.useDeprecatedSynchronousErrorHandling&&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._parentSubscriber,r=u.config.useDeprecatedSynchronousErrorHandling;if(this._error)r&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)r?(e.syncErrorValue=t,e.syncErrorThrown=!0):l.hostReportError(t),this.unsubscribe();else{if(this.unsubscribe(),r)throw t;l.hostReportError(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var r=function(){return t._complete.call(t._context)};u.config.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,r),this.unsubscribe()):(this.__tryOrUnsub(r),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),u.config.useDeprecatedSynchronousErrorHandling)throw t;l.hostReportError(t)}},e.prototype.__tryOrSetError=function(t,e,r){if(!u.config.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,r)}catch(e){return u.config.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):(l.hostReportError(e),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(f);r.SafeSubscriber=p},{"../internal/symbol/rxSubscriber":58,"./Observer":51,"./Subscription":53,"./config":54,"./util/hostReportError":61,"./util/isFunction":64}],53:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./util/isArray"),o=t("./util/isObject"),i=t("./util/isFunction"),s=t("./util/UnsubscriptionError"),a=function(){function t(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}var e;return t.prototype.unsubscribe=function(){var e;if(!this.closed){var r=this._parentOrParents,a=this._ctorUnsubscribe,u=this._unsubscribe,l=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r instanceof t)r.remove(this);else if(null!==r)for(var f=0;f<r.length;++f)r[f].remove(this);if(i.isFunction(u)){a&&(this._unsubscribe=void 0);try{u.call(this)}catch(t){e=t instanceof s.UnsubscriptionError?c(t.errors):[t]}}if(n.isArray(l)){f=-1;for(var p=l.length;++f<p;){var d=l[f];if(o.isObject(d))try{d.unsubscribe()}catch(t){e=e||[],t instanceof s.UnsubscriptionError?e=e.concat(c(t.errors)):e.push(t)}}}if(e)throw new s.UnsubscriptionError(e)}},t.prototype.add=function(e){var r=e;if(!e)return t.EMPTY;switch(typeof e){case"function":r=new t(e);case"object":if(r===this||r.closed||"function"!=typeof r.unsubscribe)return r;if(this.closed)return r.unsubscribe(),r;if(!(r instanceof t)){var n=r;(r=new t)._subscriptions=[n]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var o=r._parentOrParents;if(null===o)r._parentOrParents=this;else if(o instanceof t){if(o===this)return r;r._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return r;o.push(this)}var i=this._subscriptions;return null===i?this._subscriptions=[r]:i.push(r),r},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var r=e.indexOf(t);-1!==r&&e.splice(r,1)}},t.EMPTY=((e=new t).closed=!0,e),t}();function c(t){return t.reduce((function(t,e){return t.concat(e instanceof s.UnsubscriptionError?e.errors:e)}),[])}r.Subscription=a},{"./util/UnsubscriptionError":59,"./util/isArray":63,"./util/isFunction":64,"./util/isObject":65}],54:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=!1;r.config={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){var e=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+e.stack)}else n&&console.log("RxJS: Back to a better error behavior. Thank you. <3");n=t},get useDeprecatedSynchronousErrorHandling(){return n}}},{}],55:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscriber");r.filter=function(t,e){return function(r){return r.lift(new s(t,e))}};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){var o=t.call(this,e)||this;return o.predicate=r,o.thisArg=n,o.count=0,o}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":52}],56:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=t("../Subscriber");r.map=function(t,e){return function(r){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return r.lift(new s(t,e))}};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){var o=t.call(this,e)||this;return o.project=r,o.count=0,o.thisArg=n||o,o}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":52}],57:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},{}],58:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.rxSubscriber="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),r.$$rxSubscriber=r.rxSubscriber},{}],59:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function t(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t}();r.UnsubscriptionError=n},{}],60:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../Subscriber");r.canReportError=function(t){for(;t;){var e=t,r=e.closed,o=e.destination,i=e.isStopped;if(r||i)return!1;t=o&&o instanceof n.Subscriber?o:null}return!0}},{"../Subscriber":52}],61:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.hostReportError=function(t){setTimeout((function(){throw t}),0)}},{}],62:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.identity=function(t){return t}},{}],63:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isArray=Array.isArray||function(t){return t&&"number"==typeof t.length}},{}],64:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isFunction=function(t){return"function"==typeof t}},{}],65:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isObject=function(t){return null!==t&&"object"==typeof t}},{}],66:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./identity");function o(t){return 0===t.length?n.identity:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}r.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return o(t)},r.pipeFromArray=o},{"./identity":62}],67:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../Subscriber"),o=t("../symbol/rxSubscriber"),i=t("../Observer");r.toSubscriber=function(t,e,r){if(t){if(t instanceof n.Subscriber)return t;if(t[o.rxSubscriber])return t[o.rxSubscriber]()}return t||e||r?new n.Subscriber(t,e,r):new n.Subscriber(i.empty)}},{"../Observer":51,"../Subscriber":52,"../symbol/rxSubscriber":58}],68:[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),c={proto:o.protocol===i.protocol,hostname:o.hostname===i.hostname,port:s===a};return c.proto&&c.hostname&&(c.port||r)}},{url:69}],69:[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}:{}}}},{}],70:[function(t,e,r){(function(r){(function(){"use strict";var n=t("requires-port"),o=t("querystringify"),i=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,s=/[\n\r\t]/g,a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,c=/:\d+$/,u=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,l=/^[a-zA-Z]:/;function f(t){return(t||"").toString().replace(i,"")}var p=[["#","hash"],["?","query"],function(t,e){return b(e.protocol)?t.replace(/\\/g,"/"):t},["/","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};function h(t){var e,n=("undefined"!=typeof window?window:void 0!==r?r:"undefined"!=typeof self?self:{}).location||{},o={},i=typeof(t=t||n);if("blob:"===t.protocol)o=new v(unescape(t.pathname),{});else if("string"===i)for(e in o=new v(t,{}),d)delete o[e];else if("object"===i){for(e in t)e in d||(o[e]=t[e]);void 0===o.slashes&&(o.slashes=a.test(t.href))}return o}function b(t){return"file:"===t||"ftp:"===t||"http:"===t||"https:"===t||"ws:"===t||"wss:"===t}function y(t,e){t=(t=f(t)).replace(s,""),e=e||{};var r,n=u.exec(t),o=n[1]?n[1].toLowerCase():"",i=!!n[2],a=!!n[3],c=0;return i?a?(r=n[2]+n[3]+n[4],c=n[2].length+n[3].length):(r=n[2]+n[4],c=n[2].length):a?(r=n[3]+n[4],c=n[3].length):r=n[4],"file:"===o?c>=2&&(r=r.slice(2)):b(o)?r=n[4]:o?i&&(r=r.slice(2)):c>=2&&b(e.protocol)&&(r=n[4]),{protocol:o,slashes:i||b(o),slashesCount:c,rest:r}}function v(t,e,r){if(t=(t=f(t)).replace(s,""),!(this instanceof v))return new v(t,e,r);var i,a,c,u,d,g,m=p.slice(),w=typeof e,_=this,O=0;for("object"!==w&&"string"!==w&&(r=e,e=null),r&&"function"!=typeof r&&(r=o.parse),i=!(a=y(t||"",e=h(e))).protocol&&!a.slashes,_.slashes=a.slashes||i&&e.slashes,_.protocol=a.protocol||e.protocol||"",t=a.rest,("file:"===a.protocol&&(2!==a.slashesCount||l.test(t))||!a.slashes&&(a.protocol||a.slashesCount<2||!b(_.protocol)))&&(m[3]=[/(.*)/,"pathname"]);O<m.length;O++)"function"!=typeof(u=m[O])?(c=u[0],g=u[1],c!=c?_[g]=t:"string"==typeof c?~(d="@"===c?t.lastIndexOf(c):t.indexOf(c))&&("number"==typeof u[2]?(_[g]=t.slice(0,d),t=t.slice(d+u[2])):(_[g]=t.slice(d),t=t.slice(0,d))):(d=c.exec(t))&&(_[g]=d[1],t=t.slice(0,d.index)),_[g]=_[g]||i&&u[3]&&e[g]||"",u[4]&&(_[g]=_[g].toLowerCase())):t=u(t,_);r&&(_.query=r(_.query)),i&&e.slashes&&"/"!==_.pathname.charAt(0)&&(""!==_.pathname||""!==e.pathname)&&(_.pathname=function(t,e){if(""===t)return 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("/")}(_.pathname,e.pathname)),"/"!==_.pathname.charAt(0)&&b(_.protocol)&&(_.pathname="/"+_.pathname),n(_.port,_.protocol)||(_.host=_.hostname,_.port=""),_.username=_.password="",_.auth&&(~(d=_.auth.indexOf(":"))?(_.username=_.auth.slice(0,d),_.username=encodeURIComponent(decodeURIComponent(_.username)),_.password=_.auth.slice(d+1),_.password=encodeURIComponent(decodeURIComponent(_.password))):_.username=encodeURIComponent(decodeURIComponent(_.auth)),_.auth=_.password?_.username+":"+_.password:_.username),_.origin="file:"!==_.protocol&&b(_.protocol)&&_.host?_.protocol+"//"+_.host:"null",_.href=_.toString()}v.prototype={set:function(t,e,r){var i=this;switch(t){case"query":"string"==typeof e&&e.length&&(e=(r||o.parse)(e)),i[t]=e;break;case"port":i[t]=e,n(e,i.protocol)?e&&(i.host=i.hostname+":"+e):(i.host=i.hostname,i[t]="");break;case"hostname":i[t]=e,i.port&&(e+=":"+i.port),i.host=e;break;case"host":i[t]=e,c.test(e)?(e=e.split(":"),i.port=e.pop(),i.hostname=e.join(":")):(i.hostname=e,i.port="");break;case"protocol":i.protocol=e.toLowerCase(),i.slashes=!r;break;case"pathname":case"hash":if(e){var s="pathname"===t?"/":"#";i[t]=e.charAt(0)!==s?s+e:e}else i[t]=e;break;case"username":case"password":i[t]=encodeURIComponent(e);break;case"auth":var a=e.indexOf(":");~a?(i.username=e.slice(0,a),i.username=encodeURIComponent(decodeURIComponent(i.username)),i.password=e.slice(a+1),i.password=encodeURIComponent(decodeURIComponent(i.password))):i.username=encodeURIComponent(decodeURIComponent(e))}for(var u=0;u<p.length;u++){var l=p[u];l[4]&&(i[l[1]]=i[l[1]].toLowerCase())}return i.auth=i.password?i.username+":"+i.password:i.username,i.origin="file:"!==i.protocol&&b(i.protocol)&&i.host?i.protocol+"//"+i.host:"null",i.href=i.toString(),i},toString:function(t){t&&"function"==typeof t||(t=o.stringify);var e,r=this,n=r.host,i=r.protocol;i&&":"!==i.charAt(i.length-1)&&(i+=":");var s=i+(r.protocol&&r.slashes||b(r.protocol)?"//":"");return r.username?(s+=r.username,r.password&&(s+=":"+r.password),s+="@"):r.password?(s+=":"+r.password,s+="@"):"file:"!==r.protocol&&b(r.protocol)&&!n&&"/"!==r.pathname&&(s+="@"),(":"===n[n.length-1]||c.test(r.hostname)&&!r.port)&&(n+=":"),s+=n+r.pathname,(e="object"==typeof r.query?t(r.query):r.query)&&(s+="?"!==e.charAt(0)?"?"+e:e),r.hash&&(s+=r.hash),s}},v.extractProtocol=y,v.location=h,v.trimLeft=f,v.qs=o,e.exports=v}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{querystringify:48,"requires-port":49}]},{},[17])(17)}));
@@ -1,29 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "Observable", {
7
- enumerable: true,
8
- get: function get() {
9
- return _Observable.Observable;
10
- }
11
- });
12
- Object.defineProperty(exports, "filter", {
13
- enumerable: true,
14
- get: function get() {
15
- return _filter.filter;
16
- }
17
- });
18
- Object.defineProperty(exports, "map", {
19
- enumerable: true,
20
- get: function get() {
21
- return _map.map;
22
- }
23
- });
24
-
25
- var _Observable = require("rxjs-v7/internal/Observable");
26
-
27
- var _filter = require("rxjs-v7/internal/operators/filter");
28
-
29
- var _map = require("rxjs-v7/internal/operators/map");