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BhG,EAAMgG,oBAT9B,WAAYN,GAAO,eAAgBA,EAAIqX,SAAWrX,EAAIqX,OAAO8I,WAAaH,EAAe,WAAY,eAAgBhgB,IAAQA,EAAImgB,WAAaH,EAAe,euB/F9D/S,GAAWzK,EAAW,CACvHE,eAAgBD,OAElB,SAAS7I,EAAYzJ,GACnB,IAAI4lB,EAAYtqB,UAAUC,OAAS,QAAsBgW,IAAjBjW,UAAU,GAAmBA,UAAU,GAAKuO,EACpF,OAAO+b,EAAU,CACfqK,aAAc,KACXjwB,IAIP,OADAyJ,EAAYymB,iBAAmBrmB,EACxBJ,EA4nDW0mB,CA9tDA,IAguDdC,IADY3mB,GAAYymB,iBACT7sB,GAAU,IAAIosB,GAAahmB,GAAapG,K,mCCruD9C,SAASgtB,EAAuBzpB,EAAS0pB,GAKtD,OAJKA,IACHA,EAAM1pB,EAAQvK,MAAM,IAGfnB,OAAOq1B,OAAOr1B,OAAOs1B,iBAAiB5pB,EAAS,CACpD0pB,IAAK,CACH/yB,MAAOrC,OAAOq1B,OAAOD,O","sources":["webpack://_N_E/./node_modules/@sanity/image-url/lib/browser/image-url.umd.js","webpack://_N_E/./node_modules/groq/lib/groq.esm.js","webpack://_N_E/./node_modules/parse-headers/parse-headers.js","webpack://_N_E/./node_modules/get-it/dist/_chunks/defaultOptionsValidator-DdN0wke7.js","webpack://_N_E/./node_modules/get-it/dist/index.browser.js","webpack://_N_E/./node_modules/is-plain-object/dist/is-plain-object.mjs","webpack://_N_E/./node_modules/get-it/dist/middleware.browser.js","webpack://_N_E/./node_modules/rxjs/dist/esm5/internal/util/isFunction.js","webpack://_N_E/./node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js","webpack://_N_E/./node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js","webpack://_N_E/./node_modules/rxjs/dist/esm5/internal/util/arrRemove.js","webpack://_N_E/./node_modules/rxjs/dist/esm5/internal/Subscription.js","webpack://_N_E/./node_modules/rxjs/dist/esm5/internal/config.js","webpack://_N_E/./node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js","webpack://_N_E/./node_modules/rxjs/dist/esm5/internal/util/noop.js","webpack://_N_E/./node_modules/rxjs/dist/esm5/internal/NotificationFactories.js","webpack://_N_E/./node_modules/rxjs/dist/esm5/internal/util/errorContext.js","webpack://_N_E/./node_modules/rxjs/dist/esm5/internal/Subscriber.js","webpack://_N_E/./node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js","webpack://_N_E/./node_modules/rxjs/dist/esm5/internal/symbol/observable.js","webpack://_N_E/./node_modules/rxjs/dist/esm5/internal/util/identity.js","webpack://_N_E/./node_modules/rxjs/dist/esm5/internal/util/pipe.js","webpack://_N_E/./node_modules/rxjs/dist/esm5/internal/Observable.js","webpack://_N_E/./node_modules/rxjs/dist/esm5/internal/util/EmptyError.js","webpack://_N_E/./node_modules/rxjs/dist/esm5/internal/lastValueFrom.js","webpack://_N_E/./node_modules/rxjs/dist/esm5/internal/util/lift.js","webpack://_N_E/./node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js","webpack://_N_E/./node_modules/rxjs/dist/esm5/internal/operators/map.js","webpack://_N_E/./node_modules/rxjs/dist/esm5/internal/operators/filter.js","webpack://_N_E/./node_modules/@sanity/client/dist/index.browser.js","webpack://_N_E/./node_modules/@swc/helpers/src/_tagged_template_literal.mjs"],"sourcesContent":["(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = global || self, global.SanityImageUrlBuilder = factory());\n})(this, (function () {\n function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n }\n\n function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n }\n\n function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n\n function _createForOfIteratorHelperLoose(o, allowArrayLike) {\n var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n if (it) return (it = it.call(o)).next.bind(it);\n\n if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n return function () {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n var example = 'image-Tb9Ew8CXIwaY6R1kjMvI0uRR-2000x3000-jpg';\n function parseAssetId(ref) {\n var _ref$split = ref.split('-'),\n id = _ref$split[1],\n dimensionString = _ref$split[2],\n format = _ref$split[3];\n\n if (!id || !dimensionString || !format) {\n throw new Error(\"Malformed asset _ref '\" + ref + \"'. Expected an id like \\\"\" + example + \"\\\".\");\n }\n\n var _dimensionString$spli = dimensionString.split('x'),\n imgWidthStr = _dimensionString$spli[0],\n imgHeightStr = _dimensionString$spli[1];\n\n var width = +imgWidthStr;\n var height = +imgHeightStr;\n var isValidAssetId = isFinite(width) && isFinite(height);\n\n if (!isValidAssetId) {\n throw new Error(\"Malformed asset _ref '\" + ref + \"'. Expected an id like \\\"\" + example + \"\\\".\");\n }\n\n return {\n id: id,\n width: width,\n height: height,\n format: format\n };\n }\n\n var isRef = function isRef(src) {\n var source = src;\n return source ? typeof source._ref === 'string' : false;\n };\n\n var isAsset = function isAsset(src) {\n var source = src;\n return source ? typeof source._id === 'string' : false;\n };\n\n var isAssetStub = function isAssetStub(src) {\n var source = src;\n return source && source.asset ? typeof source.asset.url === 'string' : false;\n }; // Convert an asset-id, asset or image to an image record suitable for processing\n // eslint-disable-next-line complexity\n\n\n function parseSource(source) {\n if (!source) {\n return null;\n }\n\n var image;\n\n if (typeof source === 'string' && isUrl(source)) {\n // Someone passed an existing image url?\n image = {\n asset: {\n _ref: urlToId(source)\n }\n };\n } else if (typeof source === 'string') {\n // Just an asset id\n image = {\n asset: {\n _ref: source\n }\n };\n } else if (isRef(source)) {\n // We just got passed an asset directly\n image = {\n asset: source\n };\n } else if (isAsset(source)) {\n // If we were passed an image asset document\n image = {\n asset: {\n _ref: source._id || ''\n }\n };\n } else if (isAssetStub(source)) {\n // If we were passed a partial asset (`url`, but no `_id`)\n image = {\n asset: {\n _ref: urlToId(source.asset.url)\n }\n };\n } else if (typeof source.asset === 'object') {\n // Probably an actual image with materialized asset\n image = _extends({}, source);\n } else {\n // We got something that does not look like an image, or it is an image\n // that currently isn't sporting an asset.\n return null;\n }\n\n var img = source;\n\n if (img.crop) {\n image.crop = img.crop;\n }\n\n if (img.hotspot) {\n image.hotspot = img.hotspot;\n }\n\n return applyDefaults(image);\n }\n\n function isUrl(url) {\n return /^https?:\\/\\//.test(\"\" + url);\n }\n\n function urlToId(url) {\n var parts = url.split('/').slice(-1);\n return (\"image-\" + parts[0]).replace(/\\.([a-z]+)$/, '-$1');\n } // Mock crop and hotspot if image lacks it\n\n\n function applyDefaults(image) {\n if (image.crop && image.hotspot) {\n return image;\n } // We need to pad in default values for crop or hotspot\n\n\n var result = _extends({}, image);\n\n if (!result.crop) {\n result.crop = {\n left: 0,\n top: 0,\n bottom: 0,\n right: 0\n };\n }\n\n if (!result.hotspot) {\n result.hotspot = {\n x: 0.5,\n y: 0.5,\n height: 1.0,\n width: 1.0\n };\n }\n\n return result;\n }\n\n var SPEC_NAME_TO_URL_NAME_MAPPINGS = [['width', 'w'], ['height', 'h'], ['format', 'fm'], ['download', 'dl'], ['blur', 'blur'], ['sharpen', 'sharp'], ['invert', 'invert'], ['orientation', 'or'], ['minHeight', 'min-h'], ['maxHeight', 'max-h'], ['minWidth', 'min-w'], ['maxWidth', 'max-w'], ['quality', 'q'], ['fit', 'fit'], ['crop', 'crop'], ['saturation', 'sat'], ['auto', 'auto'], ['dpr', 'dpr'], ['pad', 'pad']];\n function urlForImage(options) {\n var spec = _extends({}, options || {});\n\n var source = spec.source;\n delete spec.source;\n var image = parseSource(source);\n\n if (!image) {\n throw new Error(\"Unable to resolve image URL from source (\" + JSON.stringify(source) + \")\");\n }\n\n var id = image.asset._ref || image.asset._id || '';\n var asset = parseAssetId(id); // Compute crop rect in terms of pixel coordinates in the raw source image\n\n var cropLeft = Math.round(image.crop.left * asset.width);\n var cropTop = Math.round(image.crop.top * asset.height);\n var crop = {\n left: cropLeft,\n top: cropTop,\n width: Math.round(asset.width - image.crop.right * asset.width - cropLeft),\n height: Math.round(asset.height - image.crop.bottom * asset.height - cropTop)\n }; // Compute hot spot rect in terms of pixel coordinates\n\n var hotSpotVerticalRadius = image.hotspot.height * asset.height / 2;\n var hotSpotHorizontalRadius = image.hotspot.width * asset.width / 2;\n var hotSpotCenterX = image.hotspot.x * asset.width;\n var hotSpotCenterY = image.hotspot.y * asset.height;\n var hotspot = {\n left: hotSpotCenterX - hotSpotHorizontalRadius,\n top: hotSpotCenterY - hotSpotVerticalRadius,\n right: hotSpotCenterX + hotSpotHorizontalRadius,\n bottom: hotSpotCenterY + hotSpotVerticalRadius\n }; // If irrelevant, or if we are requested to: don't perform crop/fit based on\n // the crop/hotspot.\n\n if (!(spec.rect || spec.focalPoint || spec.ignoreImageParams || spec.crop)) {\n spec = _extends({}, spec, fit({\n crop: crop,\n hotspot: hotspot\n }, spec));\n }\n\n return specToImageUrl(_extends({}, spec, {\n asset: asset\n }));\n } // eslint-disable-next-line complexity\n\n function specToImageUrl(spec) {\n var cdnUrl = (spec.baseUrl || 'https://cdn.sanity.io').replace(/\\/+$/, '');\n var filename = spec.asset.id + \"-\" + spec.asset.width + \"x\" + spec.asset.height + \".\" + spec.asset.format;\n var baseUrl = cdnUrl + \"/images/\" + spec.projectId + \"/\" + spec.dataset + \"/\" + filename;\n var params = [];\n\n if (spec.rect) {\n // Only bother url with a crop if it actually crops anything\n var _spec$rect = spec.rect,\n left = _spec$rect.left,\n top = _spec$rect.top,\n width = _spec$rect.width,\n height = _spec$rect.height;\n var isEffectiveCrop = left !== 0 || top !== 0 || height !== spec.asset.height || width !== spec.asset.width;\n\n if (isEffectiveCrop) {\n params.push(\"rect=\" + left + \",\" + top + \",\" + width + \",\" + height);\n }\n }\n\n if (spec.bg) {\n params.push(\"bg=\" + spec.bg);\n }\n\n if (spec.focalPoint) {\n params.push(\"fp-x=\" + spec.focalPoint.x);\n params.push(\"fp-y=\" + spec.focalPoint.y);\n }\n\n var flip = [spec.flipHorizontal && 'h', spec.flipVertical && 'v'].filter(Boolean).join('');\n\n if (flip) {\n params.push(\"flip=\" + flip);\n } // Map from spec name to url param name, and allow using the actual param name as an alternative\n\n\n SPEC_NAME_TO_URL_NAME_MAPPINGS.forEach(function (mapping) {\n var specName = mapping[0],\n param = mapping[1];\n\n if (typeof spec[specName] !== 'undefined') {\n params.push(param + \"=\" + encodeURIComponent(spec[specName]));\n } else if (typeof spec[param] !== 'undefined') {\n params.push(param + \"=\" + encodeURIComponent(spec[param]));\n }\n });\n\n if (params.length === 0) {\n return baseUrl;\n }\n\n return baseUrl + \"?\" + params.join('&');\n }\n\n function fit(source, spec) {\n var cropRect;\n var imgWidth = spec.width;\n var imgHeight = spec.height; // If we are not constraining the aspect ratio, we'll just use the whole crop\n\n if (!(imgWidth && imgHeight)) {\n return {\n width: imgWidth,\n height: imgHeight,\n rect: source.crop\n };\n }\n\n var crop = source.crop;\n var hotspot = source.hotspot; // If we are here, that means aspect ratio is locked and fitting will be a bit harder\n\n var desiredAspectRatio = imgWidth / imgHeight;\n var cropAspectRatio = crop.width / crop.height;\n\n if (cropAspectRatio > desiredAspectRatio) {\n // The crop is wider than the desired aspect ratio. That means we are cutting from the sides\n var height = Math.round(crop.height);\n var width = Math.round(height * desiredAspectRatio);\n var top = Math.max(0, Math.round(crop.top)); // Center output horizontally over hotspot\n\n var hotspotXCenter = Math.round((hotspot.right - hotspot.left) / 2 + hotspot.left);\n var left = Math.max(0, Math.round(hotspotXCenter - width / 2)); // Keep output within crop\n\n if (left < crop.left) {\n left = crop.left;\n } else if (left + width > crop.left + crop.width) {\n left = crop.left + crop.width - width;\n }\n\n cropRect = {\n left: left,\n top: top,\n width: width,\n height: height\n };\n } else {\n // The crop is taller than the desired ratio, we are cutting from top and bottom\n var _width = crop.width;\n\n var _height = Math.round(_width / desiredAspectRatio);\n\n var _left = Math.max(0, Math.round(crop.left)); // Center output vertically over hotspot\n\n\n var hotspotYCenter = Math.round((hotspot.bottom - hotspot.top) / 2 + hotspot.top);\n\n var _top = Math.max(0, Math.round(hotspotYCenter - _height / 2)); // Keep output rect within crop\n\n\n if (_top < crop.top) {\n _top = crop.top;\n } else if (_top + _height > crop.top + crop.height) {\n _top = crop.top + crop.height - _height;\n }\n\n cropRect = {\n left: _left,\n top: _top,\n width: _width,\n height: _height\n };\n }\n\n return {\n width: imgWidth,\n height: imgHeight,\n rect: cropRect\n };\n } // For backwards-compatibility\n\n var validFits = ['clip', 'crop', 'fill', 'fillmax', 'max', 'scale', 'min'];\n var validCrops = ['top', 'bottom', 'left', 'right', 'center', 'focalpoint', 'entropy'];\n var validAutoModes = ['format'];\n\n function isSanityModernClientLike(client) {\n return client && 'config' in client ? typeof client.config === 'function' : false;\n }\n\n function isSanityClientLike(client) {\n return client && 'clientConfig' in client ? typeof client.clientConfig === 'object' : false;\n }\n\n function rewriteSpecName(key) {\n var specs = SPEC_NAME_TO_URL_NAME_MAPPINGS;\n\n for (var _iterator = _createForOfIteratorHelperLoose(specs), _step; !(_step = _iterator()).done;) {\n var entry = _step.value;\n var specName = entry[0],\n param = entry[1];\n\n if (key === specName || key === param) {\n return specName;\n }\n }\n\n return key;\n }\n\n function urlBuilder(options) {\n // Did we get a modernish client?\n if (isSanityModernClientLike(options)) {\n // Inherit config from client\n var _options$config = options.config(),\n apiUrl = _options$config.apiHost,\n projectId = _options$config.projectId,\n dataset = _options$config.dataset;\n\n var apiHost = apiUrl || 'https://api.sanity.io';\n return new ImageUrlBuilder(null, {\n baseUrl: apiHost.replace(/^https:\\/\\/api\\./, 'https://cdn.'),\n projectId: projectId,\n dataset: dataset\n });\n } // Did we get a SanityClient?\n\n\n var client = options;\n\n if (isSanityClientLike(client)) {\n // Inherit config from client\n var _client$clientConfig = client.clientConfig,\n _apiUrl = _client$clientConfig.apiHost,\n _projectId = _client$clientConfig.projectId,\n _dataset = _client$clientConfig.dataset;\n\n var _apiHost = _apiUrl || 'https://api.sanity.io';\n\n return new ImageUrlBuilder(null, {\n baseUrl: _apiHost.replace(/^https:\\/\\/api\\./, 'https://cdn.'),\n projectId: _projectId,\n dataset: _dataset\n });\n } // Or just accept the options as given\n\n\n return new ImageUrlBuilder(null, options);\n }\n var ImageUrlBuilder = /*#__PURE__*/function () {\n function ImageUrlBuilder(parent, options) {\n this.options = void 0;\n this.options = parent ? _extends({}, parent.options || {}, options || {}) // Merge parent options\n : _extends({}, options || {}); // Copy options\n }\n\n var _proto = ImageUrlBuilder.prototype;\n\n _proto.withOptions = function withOptions(options) {\n var baseUrl = options.baseUrl || this.options.baseUrl;\n var newOptions = {\n baseUrl: baseUrl\n };\n\n for (var key in options) {\n if (options.hasOwnProperty(key)) {\n var specKey = rewriteSpecName(key);\n newOptions[specKey] = options[key];\n }\n }\n\n return new ImageUrlBuilder(this, _extends({\n baseUrl: baseUrl\n }, newOptions));\n } // The image to be represented. Accepts a Sanity 'image'-document, 'asset'-document or\n // _id of asset. To get the benefit of automatic hot-spot/crop integration with the content\n // studio, the 'image'-document must be provided.\n ;\n\n _proto.image = function image(source) {\n return this.withOptions({\n source: source\n });\n } // Specify the dataset\n ;\n\n _proto.dataset = function dataset(_dataset2) {\n return this.withOptions({\n dataset: _dataset2\n });\n } // Specify the projectId\n ;\n\n _proto.projectId = function projectId(_projectId2) {\n return this.withOptions({\n projectId: _projectId2\n });\n } // Specify background color\n ;\n\n _proto.bg = function bg(_bg) {\n return this.withOptions({\n bg: _bg\n });\n } // Set DPR scaling factor\n ;\n\n _proto.dpr = function dpr(_dpr) {\n // A DPR of 1 is the default - so only include it if we have a different value\n return this.withOptions(_dpr && _dpr !== 1 ? {\n dpr: _dpr\n } : {});\n } // Specify the width of the image in pixels\n ;\n\n _proto.width = function width(_width) {\n return this.withOptions({\n width: _width\n });\n } // Specify the height of the image in pixels\n ;\n\n _proto.height = function height(_height) {\n return this.withOptions({\n height: _height\n });\n } // Specify focal point in fraction of image dimensions. Each component 0.0-1.0\n ;\n\n _proto.focalPoint = function focalPoint(x, y) {\n return this.withOptions({\n focalPoint: {\n x: x,\n y: y\n }\n });\n };\n\n _proto.maxWidth = function maxWidth(_maxWidth) {\n return this.withOptions({\n maxWidth: _maxWidth\n });\n };\n\n _proto.minWidth = function minWidth(_minWidth) {\n return this.withOptions({\n minWidth: _minWidth\n });\n };\n\n _proto.maxHeight = function maxHeight(_maxHeight) {\n return this.withOptions({\n maxHeight: _maxHeight\n });\n };\n\n _proto.minHeight = function minHeight(_minHeight) {\n return this.withOptions({\n minHeight: _minHeight\n });\n } // Specify width and height in pixels\n ;\n\n _proto.size = function size(width, height) {\n return this.withOptions({\n width: width,\n height: height\n });\n } // Specify blur between 0 and 100\n ;\n\n _proto.blur = function blur(_blur) {\n return this.withOptions({\n blur: _blur\n });\n };\n\n _proto.sharpen = function sharpen(_sharpen) {\n return this.withOptions({\n sharpen: _sharpen\n });\n } // Specify the desired rectangle of the image\n ;\n\n _proto.rect = function rect(left, top, width, height) {\n return this.withOptions({\n rect: {\n left: left,\n top: top,\n width: width,\n height: height\n }\n });\n } // Specify the image format of the image. 'jpg', 'pjpg', 'png', 'webp'\n ;\n\n _proto.format = function format(_format) {\n return this.withOptions({\n format: _format\n });\n };\n\n _proto.invert = function invert(_invert) {\n return this.withOptions({\n invert: _invert\n });\n } // Rotation in degrees 0, 90, 180, 270\n ;\n\n _proto.orientation = function orientation(_orientation) {\n return this.withOptions({\n orientation: _orientation\n });\n } // Compression quality 0-100\n ;\n\n _proto.quality = function quality(_quality) {\n return this.withOptions({\n quality: _quality\n });\n } // Make it a download link. Parameter is default filename.\n ;\n\n _proto.forceDownload = function forceDownload(download) {\n return this.withOptions({\n download: download\n });\n } // Flip image horizontally\n ;\n\n _proto.flipHorizontal = function flipHorizontal() {\n return this.withOptions({\n flipHorizontal: true\n });\n } // Flip image vertically\n ;\n\n _proto.flipVertical = function flipVertical() {\n return this.withOptions({\n flipVertical: true\n });\n } // Ignore crop/hotspot from image record, even when present\n ;\n\n _proto.ignoreImageParams = function ignoreImageParams() {\n return this.withOptions({\n ignoreImageParams: true\n });\n };\n\n _proto.fit = function fit(value) {\n if (validFits.indexOf(value) === -1) {\n throw new Error(\"Invalid fit mode \\\"\" + value + \"\\\"\");\n }\n\n return this.withOptions({\n fit: value\n });\n };\n\n _proto.crop = function crop(value) {\n if (validCrops.indexOf(value) === -1) {\n throw new Error(\"Invalid crop mode \\\"\" + value + \"\\\"\");\n }\n\n return this.withOptions({\n crop: value\n });\n } // Saturation\n ;\n\n _proto.saturation = function saturation(_saturation) {\n return this.withOptions({\n saturation: _saturation\n });\n };\n\n _proto.auto = function auto(value) {\n if (validAutoModes.indexOf(value) === -1) {\n throw new Error(\"Invalid auto mode \\\"\" + value + \"\\\"\");\n }\n\n return this.withOptions({\n auto: value\n });\n } // Specify the number of pixels to pad the image\n ;\n\n _proto.pad = function pad(_pad) {\n return this.withOptions({\n pad: _pad\n });\n } // Gets the url based on the submitted parameters\n ;\n\n _proto.url = function url() {\n return urlForImage(this.options);\n } // Alias for url()\n ;\n\n _proto.toString = function toString() {\n return this.url();\n };\n\n return ImageUrlBuilder;\n }();\n\n return urlBuilder;\n\n}));\n//# sourceMappingURL=image-url.umd.js.map\n","function groq(strings) {\n for (var _len = arguments.length, keys = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n keys[_key - 1] = arguments[_key];\n }\n const lastIndex = strings.length - 1;\n return strings.slice(0, lastIndex).reduce((acc, str, i) => {\n return acc + str + keys[i];\n }, \"\") + strings[lastIndex];\n}\nexport { groq as default };\n//# sourceMappingURL=groq.esm.js.map\n","var trim = function(string) {\n return string.replace(/^\\s+|\\s+$/g, '');\n}\n , isArray = function(arg) {\n return Object.prototype.toString.call(arg) === '[object Array]';\n }\n\nmodule.exports = function (headers) {\n if (!headers)\n return {}\n\n var result = {}\n\n var headersArr = trim(headers).split('\\n')\n\n for (var i = 0; i < headersArr.length; i++) {\n var row = headersArr[i]\n var index = row.indexOf(':')\n , key = trim(row.slice(0, index)).toLowerCase()\n , value = trim(row.slice(index + 1))\n\n if (typeof(result[key]) === 'undefined') {\n result[key] = value\n } else if (isArray(result[key])) {\n result[key].push(value)\n } else {\n result[key] = [ result[key], value ]\n }\n }\n\n return result\n}\n","const isReactNative = typeof navigator > \"u\" ? !1 : navigator.product === \"ReactNative\", defaultOptions = { timeout: isReactNative ? 6e4 : 12e4 }, processOptions = function(opts) {\n const options = {\n ...defaultOptions,\n ...typeof opts == \"string\" ? { url: opts } : opts\n }, { searchParams } = new URL(options.url, \"http://localhost\");\n if (options.timeout = normalizeTimeout(options.timeout), options.query) {\n for (const [key, value] of Object.entries(options.query))\n if (value !== void 0)\n if (Array.isArray(value))\n for (const v of value)\n searchParams.append(key, v);\n else\n searchParams.append(key, value);\n }\n const [url] = options.url.split(\"?\"), search = searchParams.toString();\n return search && (options.url = `${url}?${search}`), options.method = options.body && !options.method ? \"POST\" : (options.method || \"GET\").toUpperCase(), options;\n};\nfunction normalizeTimeout(time) {\n if (time === !1 || time === 0)\n return !1;\n if (time.connect || time.socket)\n return time;\n const delay = Number(time);\n return isNaN(delay) ? normalizeTimeout(defaultOptions.timeout) : { connect: delay, socket: delay };\n}\nconst validUrl = /^https?:\\/\\//i, validateOptions = function(options) {\n if (!validUrl.test(options.url))\n throw new Error(`\"${options.url}\" is not a valid URL`);\n};\nexport {\n processOptions,\n validateOptions\n};\n//# sourceMappingURL=defaultOptionsValidator-DdN0wke7.js.map\n","import { processOptions, validateOptions } from \"./_chunks/defaultOptionsValidator-DdN0wke7.js\";\nimport parseHeaders from \"parse-headers\";\nconst middlewareReducer = (middleware) => function(hook, defaultValue, ...args) {\n const bailEarly = hook === \"onError\";\n let value = defaultValue;\n for (let i = 0; i < middleware[hook].length; i++) {\n const handler = middleware[hook][i];\n if (value = handler(value, ...args), bailEarly && !value)\n break;\n }\n return value;\n};\nfunction createPubSub() {\n const subscribers = /* @__PURE__ */ Object.create(null);\n let nextId = 0;\n function subscribe(subscriber) {\n const id = nextId++;\n return subscribers[id] = subscriber, function() {\n delete subscribers[id];\n };\n }\n function publish(event) {\n for (const id in subscribers)\n subscribers[id](event);\n }\n return {\n publish,\n subscribe\n };\n}\nconst channelNames = [\n \"request\",\n \"response\",\n \"progress\",\n \"error\",\n \"abort\"\n], middlehooks = [\n \"processOptions\",\n \"validateOptions\",\n \"interceptRequest\",\n \"finalizeOptions\",\n \"onRequest\",\n \"onResponse\",\n \"onError\",\n \"onReturn\",\n \"onHeaders\"\n];\nfunction createRequester(initMiddleware, httpRequest) {\n const loadedMiddleware = [], middleware = middlehooks.reduce(\n (ware, name) => (ware[name] = ware[name] || [], ware),\n {\n processOptions: [processOptions],\n validateOptions: [validateOptions]\n }\n );\n function request(opts) {\n const onResponse = (reqErr, res, ctx) => {\n let error = reqErr, response = res;\n if (!error)\n try {\n response = applyMiddleware(\"onResponse\", res, ctx);\n } catch (err) {\n response = null, error = err;\n }\n error = error && applyMiddleware(\"onError\", error, ctx), error ? channels.error.publish(error) : response && channels.response.publish(response);\n }, channels = channelNames.reduce((target, name) => (target[name] = createPubSub(), target), {}), applyMiddleware = middlewareReducer(middleware), options = applyMiddleware(\"processOptions\", opts);\n applyMiddleware(\"validateOptions\", options);\n const context = { options, channels, applyMiddleware };\n let ongoingRequest;\n const unsubscribe = channels.request.subscribe((ctx) => {\n ongoingRequest = httpRequest(ctx, (err, res) => onResponse(err, res, ctx));\n });\n channels.abort.subscribe(() => {\n unsubscribe(), ongoingRequest && ongoingRequest.abort();\n });\n const returnValue = applyMiddleware(\"onReturn\", channels, context);\n return returnValue === channels && channels.request.publish(context), returnValue;\n }\n return request.use = function(newMiddleware) {\n if (!newMiddleware)\n throw new Error(\"Tried to add middleware that resolved to falsey value\");\n if (typeof newMiddleware == \"function\")\n throw new Error(\n \"Tried to add middleware that was a function. It probably expects you to pass options to it.\"\n );\n if (newMiddleware.onReturn && middleware.onReturn.length > 0)\n throw new Error(\n \"Tried to add new middleware with `onReturn` handler, but another handler has already been registered for this event\"\n );\n return middlehooks.forEach((key) => {\n newMiddleware[key] && middleware[key].push(newMiddleware[key]);\n }), loadedMiddleware.push(newMiddleware), request;\n }, request.clone = () => createRequester(loadedMiddleware, httpRequest), initMiddleware.forEach(request.use), request;\n}\nvar __accessCheck = (obj, member, msg) => {\n if (!member.has(obj))\n throw TypeError(\"Cannot \" + msg);\n}, __privateGet = (obj, member, getter) => (__accessCheck(obj, member, \"read from private field\"), getter ? getter.call(obj) : member.get(obj)), __privateAdd = (obj, member, value) => {\n if (member.has(obj))\n throw TypeError(\"Cannot add the same private member more than once\");\n member instanceof WeakSet ? member.add(obj) : member.set(obj, value);\n}, __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, \"write to private field\"), setter ? setter.call(obj, value) : member.set(obj, value), value), _method, _url, _resHeaders, _headers, _controller, _init, _useAbortSignal;\nclass FetchXhr {\n constructor() {\n this.readyState = 0, this.responseType = \"\", __privateAdd(this, _method, void 0), __privateAdd(this, _url, void 0), __privateAdd(this, _resHeaders, void 0), __privateAdd(this, _headers, {}), __privateAdd(this, _controller, void 0), __privateAdd(this, _init, {}), __privateAdd(this, _useAbortSignal, void 0);\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars -- _async is only declared for typings compatibility\n open(method, url, _async) {\n __privateSet(this, _method, method), __privateSet(this, _url, url), __privateSet(this, _resHeaders, \"\"), this.readyState = 1, this.onreadystatechange(), __privateSet(this, _controller, void 0);\n }\n abort() {\n __privateGet(this, _controller) && __privateGet(this, _controller).abort();\n }\n getAllResponseHeaders() {\n return __privateGet(this, _resHeaders);\n }\n setRequestHeader(name, value) {\n __privateGet(this, _headers)[name] = value;\n }\n // Allow setting extra fetch init options, needed for runtimes such as Vercel Edge to set `cache` and other options in React Server Components\n setInit(init, useAbortSignal = !0) {\n __privateSet(this, _init, init), __privateSet(this, _useAbortSignal, useAbortSignal);\n }\n send(body) {\n const textBody = this.responseType !== \"arraybuffer\", options = {\n ...__privateGet(this, _init),\n method: __privateGet(this, _method),\n headers: __privateGet(this, _headers),\n body\n };\n typeof AbortController == \"function\" && __privateGet(this, _useAbortSignal) && (__privateSet(this, _controller, new AbortController()), typeof EventTarget < \"u\" && __privateGet(this, _controller).signal instanceof EventTarget && (options.signal = __privateGet(this, _controller).signal)), typeof document < \"u\" && (options.credentials = this.withCredentials ? \"include\" : \"omit\"), fetch(__privateGet(this, _url), options).then((res) => (res.headers.forEach((value, key) => {\n __privateSet(this, _resHeaders, __privateGet(this, _resHeaders) + `${key}: ${value}\\r\n`);\n }), this.status = res.status, this.statusText = res.statusText, this.readyState = 3, textBody ? res.text() : res.arrayBuffer())).then((resBody) => {\n typeof resBody == \"string\" ? this.responseText = resBody : this.response = resBody, this.readyState = 4, this.onreadystatechange();\n }).catch((err) => {\n var _a;\n if (err.name === \"AbortError\") {\n this.onabort();\n return;\n }\n (_a = this.onerror) == null || _a.call(this, err);\n });\n }\n}\n_method = /* @__PURE__ */ new WeakMap(), _url = /* @__PURE__ */ new WeakMap(), _resHeaders = /* @__PURE__ */ new WeakMap(), _headers = /* @__PURE__ */ new WeakMap(), _controller = /* @__PURE__ */ new WeakMap(), _init = /* @__PURE__ */ new WeakMap(), _useAbortSignal = /* @__PURE__ */ new WeakMap();\nconst adapter = typeof XMLHttpRequest == \"function\" ? \"xhr\" : \"fetch\", XmlHttpRequest = adapter === \"xhr\" ? XMLHttpRequest : FetchXhr, httpRequester = (context, callback) => {\n var _a;\n const opts = context.options, options = context.applyMiddleware(\"finalizeOptions\", opts), timers = {}, injectedResponse = context.applyMiddleware(\"interceptRequest\", void 0, {\n adapter,\n context\n });\n if (injectedResponse) {\n const cbTimer = setTimeout(callback, 0, null, injectedResponse);\n return { abort: () => clearTimeout(cbTimer) };\n }\n let xhr = new XmlHttpRequest();\n xhr instanceof FetchXhr && typeof options.fetch == \"object\" && xhr.setInit(options.fetch, (_a = options.useAbortSignal) != null ? _a : !0);\n const headers = options.headers, delays = options.timeout;\n let aborted = !1, loaded = !1, timedOut = !1;\n if (xhr.onerror = (event) => {\n onError(\n new Error(\n `Request error while attempting to reach ${options.url}${event.lengthComputable ? `(${event.loaded} of ${event.total} bytes transferred)` : \"\"}`\n )\n );\n }, xhr.ontimeout = (event) => {\n onError(\n new Error(\n `Request timeout while attempting to reach ${options.url}${event.lengthComputable ? `(${event.loaded} of ${event.total} bytes transferred)` : \"\"}`\n )\n );\n }, xhr.onabort = () => {\n stopTimers(!0), aborted = !0;\n }, xhr.onreadystatechange = () => {\n resetTimers(), !(aborted || xhr.readyState !== 4) && xhr.status !== 0 && onLoad();\n }, xhr.open(\n options.method,\n options.url,\n !0\n // Always async\n ), xhr.withCredentials = !!options.withCredentials, headers && xhr.setRequestHeader)\n for (const key in headers)\n headers.hasOwnProperty(key) && xhr.setRequestHeader(key, headers[key]);\n return options.rawBody && (xhr.responseType = \"arraybuffer\"), context.applyMiddleware(\"onRequest\", { options, adapter, request: xhr, context }), xhr.send(options.body || null), delays && (timers.connect = setTimeout(() => timeoutRequest(\"ETIMEDOUT\"), delays.connect)), { abort };\n function abort() {\n aborted = !0, xhr && xhr.abort();\n }\n function timeoutRequest(code) {\n timedOut = !0, xhr.abort();\n const error = new Error(\n code === \"ESOCKETTIMEDOUT\" ? `Socket timed out on request to ${options.url}` : `Connection timed out on request to ${options.url}`\n );\n error.code = code, context.channels.error.publish(error);\n }\n function resetTimers() {\n delays && (stopTimers(), timers.socket = setTimeout(() => timeoutRequest(\"ESOCKETTIMEDOUT\"), delays.socket));\n }\n function stopTimers(force) {\n (force || aborted || xhr.readyState >= 2 && timers.connect) && clearTimeout(timers.connect), timers.socket && clearTimeout(timers.socket);\n }\n function onError(error) {\n if (loaded)\n return;\n stopTimers(!0), loaded = !0, xhr = null;\n const err = error || new Error(`Network error while attempting to reach ${options.url}`);\n err.isNetworkError = !0, err.request = options, callback(err);\n }\n function reduceResponse() {\n return {\n body: xhr.response || (xhr.responseType === \"\" || xhr.responseType === \"text\" ? xhr.responseText : \"\"),\n url: options.url,\n method: options.method,\n headers: parseHeaders(xhr.getAllResponseHeaders()),\n statusCode: xhr.status,\n statusMessage: xhr.statusText\n };\n }\n function onLoad() {\n if (!(aborted || loaded || timedOut)) {\n if (xhr.status === 0) {\n onError(new Error(\"Unknown XHR error\"));\n return;\n }\n stopTimers(), loaded = !0, callback(null, reduceResponse());\n }\n }\n}, getIt = (initMiddleware = [], httpRequest = httpRequester) => createRequester(initMiddleware, httpRequest), environment = \"browser\";\nexport {\n adapter,\n environment,\n getIt\n};\n//# sourceMappingURL=index.browser.js.map\n","/*!\n * is-plain-object <https://github.com/jonschlinkert/is-plain-object>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\nfunction isObject(o) {\n return Object.prototype.toString.call(o) === '[object Object]';\n}\n\nfunction isPlainObject(o) {\n var ctor,prot;\n\n if (isObject(o) === false) return false;\n\n // If has modified constructor\n ctor = o.constructor;\n if (ctor === undefined) return true;\n\n // If has modified prototype\n prot = ctor.prototype;\n if (isObject(prot) === false) return false;\n\n // If constructor does not have an Object-specific method\n if (prot.hasOwnProperty('isPrototypeOf') === false) {\n return false;\n }\n\n // Most likely a plain Object\n return true;\n}\n\nexport { isPlainObject };\n","import debugIt from \"debug\";\nimport { processOptions, validateOptions } from \"./_chunks/defaultOptionsValidator-DdN0wke7.js\";\nimport { isPlainObject } from \"is-plain-object\";\nfunction agent(opts) {\n return {};\n}\nconst leadingSlash = /^\\//, trailingSlash = /\\/$/;\nfunction base(baseUrl) {\n const baseUri = baseUrl.replace(trailingSlash, \"\");\n return {\n processOptions: (options) => {\n if (/^https?:\\/\\//i.test(options.url))\n return options;\n const url = [baseUri, options.url.replace(leadingSlash, \"\")].join(\"/\");\n return Object.assign({}, options, { url });\n }\n };\n}\nconst SENSITIVE_HEADERS = [\"cookie\", \"authorization\"], hasOwn = Object.prototype.hasOwnProperty, redactKeys = (source, redacted) => {\n const target = {};\n for (const key in source)\n hasOwn.call(source, key) && (target[key] = redacted.indexOf(key.toLowerCase()) > -1 ? \"<redacted>\" : source[key]);\n return target;\n};\nfunction debug(opts = {}) {\n const verbose = opts.verbose, namespace = opts.namespace || \"get-it\", defaultLogger = debugIt(namespace), log = opts.log || defaultLogger, shortCircuit = log === defaultLogger && !debugIt.enabled(namespace);\n let requestId = 0;\n return {\n processOptions: (options) => (options.debug = log, options.requestId = options.requestId || ++requestId, options),\n onRequest: (event) => {\n if (shortCircuit || !event)\n return event;\n const options = event.options;\n if (log(\"[%s] HTTP %s %s\", options.requestId, options.method, options.url), verbose && options.body && typeof options.body == \"string\" && log(\"[%s] Request body: %s\", options.requestId, options.body), verbose && options.headers) {\n const headers2 = opts.redactSensitiveHeaders === !1 ? options.headers : redactKeys(options.headers, SENSITIVE_HEADERS);\n log(\"[%s] Request headers: %s\", options.requestId, JSON.stringify(headers2, null, 2));\n }\n return event;\n },\n onResponse: (res, context) => {\n if (shortCircuit || !res)\n return res;\n const reqId = context.options.requestId;\n return log(\"[%s] Response code: %s %s\", reqId, res.statusCode, res.statusMessage), verbose && res.body && log(\"[%s] Response body: %s\", reqId, stringifyBody(res)), res;\n },\n onError: (err, context) => {\n const reqId = context.options.requestId;\n return err ? (log(\"[%s] ERROR: %s\", reqId, err.message), err) : (log(\"[%s] Error encountered, but handled by an earlier middleware\", reqId), err);\n }\n };\n}\nfunction stringifyBody(res) {\n return (res.headers[\"content-type\"] || \"\").toLowerCase().indexOf(\"application/json\") !== -1 ? tryFormat(res.body) : res.body;\n}\nfunction tryFormat(body) {\n try {\n const parsed = typeof body == \"string\" ? JSON.parse(body) : body;\n return JSON.stringify(parsed, null, 2);\n } catch {\n return body;\n }\n}\nfunction headers(_headers, opts = {}) {\n return {\n processOptions: (options) => {\n const existing = options.headers || {};\n return options.headers = opts.override ? Object.assign({}, existing, _headers) : Object.assign({}, _headers, existing), options;\n }\n };\n}\nclass HttpError extends Error {\n constructor(res, ctx) {\n super();\n const truncatedUrl = res.url.length > 400 ? `${res.url.slice(0, 399)}\\u2026` : res.url;\n let msg = `${res.method}-request to ${truncatedUrl} resulted in `;\n msg += `HTTP ${res.statusCode} ${res.statusMessage}`, this.message = msg.trim(), this.response = res, this.request = ctx.options;\n }\n}\nfunction httpErrors() {\n return {\n onResponse: (res, ctx) => {\n if (!(res.statusCode >= 400))\n return res;\n throw new HttpError(res, ctx);\n }\n };\n}\nfunction injectResponse(opts = {}) {\n if (typeof opts.inject != \"function\")\n throw new Error(\"`injectResponse` middleware requires a `inject` function\");\n return { interceptRequest: function(prevValue, event) {\n const response = opts.inject(event, prevValue);\n if (!response)\n return prevValue;\n const options = event.context.options;\n return {\n body: \"\",\n url: options.url,\n method: options.method,\n headers: {},\n statusCode: 200,\n statusMessage: \"OK\",\n ...response\n };\n } };\n}\nconst isBuffer = typeof Buffer > \"u\" ? () => !1 : (obj) => Buffer.isBuffer(obj), serializeTypes = [\"boolean\", \"string\", \"number\"];\nfunction jsonRequest() {\n return {\n processOptions: (options) => {\n const body = options.body;\n return !body || !(typeof body.pipe != \"function\" && !isBuffer(body) && (serializeTypes.indexOf(typeof body) !== -1 || Array.isArray(body) || isPlainObject(body))) ? options : Object.assign({}, options, {\n body: JSON.stringify(options.body),\n headers: Object.assign({}, options.headers, {\n \"Content-Type\": \"application/json\"\n })\n });\n }\n };\n}\nfunction jsonResponse(opts) {\n return {\n onResponse: (response) => {\n const contentType = response.headers[\"content-type\"] || \"\", shouldDecode = opts && opts.force || contentType.indexOf(\"application/json\") !== -1;\n return !response.body || !contentType || !shouldDecode ? response : Object.assign({}, response, { body: tryParse(response.body) });\n },\n processOptions: (options) => Object.assign({}, options, {\n headers: Object.assign({ Accept: \"application/json\" }, options.headers)\n })\n };\n function tryParse(body) {\n try {\n return JSON.parse(body);\n } catch (err) {\n throw err.message = `Failed to parsed response body as JSON: ${err.message}`, err;\n }\n }\n}\nfunction isBrowserOptions(options) {\n return typeof options == \"object\" && options !== null && !(\"protocol\" in options);\n}\nfunction mtls(config = {}) {\n if (!config.ca)\n throw new Error('Required mtls option \"ca\" is missing');\n if (!config.cert)\n throw new Error('Required mtls option \"cert\" is missing');\n if (!config.key)\n throw new Error('Required mtls option \"key\" is missing');\n return {\n finalizeOptions: (options) => {\n if (isBrowserOptions(options))\n return options;\n const mtlsOpts = {\n cert: config.cert,\n key: config.key,\n ca: config.ca\n };\n return Object.assign({}, options, mtlsOpts);\n }\n };\n}\nlet actualGlobal = {};\ntypeof globalThis < \"u\" ? actualGlobal = globalThis : typeof window < \"u\" ? actualGlobal = window : typeof global < \"u\" ? actualGlobal = global : typeof self < \"u\" && (actualGlobal = self);\nvar global$1 = actualGlobal;\nfunction observable(opts = {}) {\n const Observable = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- @TODO consider dropping checking for a global Observable since it's not on a standards track\n opts.implementation || global$1.Observable\n );\n if (!Observable)\n throw new Error(\n \"`Observable` is not available in global scope, and no implementation was passed\"\n );\n return {\n onReturn: (channels, context) => new Observable((observer) => (channels.error.subscribe((err) => observer.error(err)), channels.progress.subscribe(\n (event) => observer.next(Object.assign({ type: \"progress\" }, event))\n ), channels.response.subscribe((response) => {\n observer.next(Object.assign({ type: \"response\" }, response)), observer.complete();\n }), channels.request.publish(context), () => channels.abort.publish()))\n };\n}\nfunction progress() {\n return {\n onRequest: (evt) => {\n if (evt.adapter !== \"xhr\")\n return;\n const xhr = evt.request, context = evt.context;\n \"upload\" in xhr && \"onprogress\" in xhr.upload && (xhr.upload.onprogress = handleProgress(\"upload\")), \"onprogress\" in xhr && (xhr.onprogress = handleProgress(\"download\"));\n function handleProgress(stage) {\n return (event) => {\n const percent = event.lengthComputable ? event.loaded / event.total * 100 : -1;\n context.channels.progress.publish({\n stage,\n percent,\n total: event.total,\n loaded: event.loaded,\n lengthComputable: event.lengthComputable\n });\n };\n }\n }\n };\n}\nconst promise = (options = {}) => {\n const PromiseImplementation = options.implementation || Promise;\n if (!PromiseImplementation)\n throw new Error(\"`Promise` is not available in global scope, and no implementation was passed\");\n return {\n onReturn: (channels, context) => new PromiseImplementation((resolve, reject) => {\n const cancel = context.options.cancelToken;\n cancel && cancel.promise.then((reason) => {\n channels.abort.publish(reason), reject(reason);\n }), channels.error.subscribe(reject), channels.response.subscribe((response) => {\n resolve(options.onlyBody ? response.body : response);\n }), setTimeout(() => {\n try {\n channels.request.publish(context);\n } catch (err) {\n reject(err);\n }\n }, 0);\n })\n };\n};\nclass Cancel {\n constructor(message) {\n this.__CANCEL__ = !0, this.message = message;\n }\n toString() {\n return `Cancel${this.message ? `: ${this.message}` : \"\"}`;\n }\n}\nconst _CancelToken = class {\n constructor(executor) {\n if (typeof executor != \"function\")\n throw new TypeError(\"executor must be a function.\");\n let resolvePromise = null;\n this.promise = new Promise((resolve) => {\n resolvePromise = resolve;\n }), executor((message) => {\n this.reason || (this.reason = new Cancel(message), resolvePromise(this.reason));\n });\n }\n};\n_CancelToken.source = () => {\n let cancel;\n return {\n token: new _CancelToken((can) => {\n cancel = can;\n }),\n cancel\n };\n};\nlet CancelToken = _CancelToken;\nconst isCancel = (value) => !!(value && value != null && value.__CANCEL__);\npromise.Cancel = Cancel;\npromise.CancelToken = CancelToken;\npromise.isCancel = isCancel;\nfunction proxy(_proxy) {\n if (_proxy !== !1 && (!_proxy || !_proxy.host))\n throw new Error(\"Proxy middleware takes an object of host, port and auth properties\");\n return {\n processOptions: (options) => Object.assign({ proxy: _proxy }, options)\n };\n}\nvar defaultShouldRetry = (err, attempt, options) => options.method !== \"GET\" && options.method !== \"HEAD\" ? !1 : err.isNetworkError || !1;\nconst isStream = (stream) => stream !== null && typeof stream == \"object\" && typeof stream.pipe == \"function\";\nvar sharedRetry = (opts) => {\n const maxRetries = opts.maxRetries || 5, retryDelay = opts.retryDelay || getRetryDelay, allowRetry = opts.shouldRetry;\n return {\n onError: (err, context) => {\n const options = context.options, max = options.maxRetries || maxRetries, shouldRetry = options.shouldRetry || allowRetry, attemptNumber = options.attemptNumber || 0;\n if (isStream(options.body) || !shouldRetry(err, attemptNumber, options) || attemptNumber >= max)\n return err;\n const newContext = Object.assign({}, context, {\n options: Object.assign({}, options, { attemptNumber: attemptNumber + 1 })\n });\n return setTimeout(() => context.channels.request.publish(newContext), retryDelay(attemptNumber)), null;\n }\n };\n};\nfunction getRetryDelay(attemptNum) {\n return 100 * Math.pow(2, attemptNum) + Math.random() * 100;\n}\nconst retry = (opts = {}) => sharedRetry({ shouldRetry: defaultShouldRetry, ...opts });\nretry.shouldRetry = defaultShouldRetry;\nfunction encode(data) {\n const query = new URLSearchParams(), nest = (name, _value) => {\n const value = _value instanceof Set ? Array.from(_value) : _value;\n if (Array.isArray(value))\n if (value.length)\n for (const index in value)\n nest(`${name}[${index}]`, value[index]);\n else\n query.append(`${name}[]`, \"\");\n else if (typeof value == \"object\" && value !== null)\n for (const [key, obj] of Object.entries(value))\n nest(`${name}[${key}]`, obj);\n else\n query.append(name, value);\n };\n for (const [key, value] of Object.entries(data))\n nest(key, value);\n return query.toString();\n}\nfunction urlEncoded() {\n return {\n processOptions: (options) => {\n const body = options.body;\n return !body || !(typeof body.pipe != \"function\" && !isBuffer(body) && isPlainObject(body)) ? options : {\n ...options,\n body: encode(options.body),\n headers: {\n ...options.headers,\n \"Content-Type\": \"application/x-www-form-urlencoded\"\n }\n };\n }\n };\n}\nfunction buildKeepAlive(agent2) {\n return function(config = {}) {\n const ms = config.ms || 1e3, maxFree = config.maxFree || 256;\n return agent2({\n keepAlive: !0,\n keepAliveMsecs: ms,\n maxFreeSockets: maxFree\n });\n };\n}\nconst keepAlive = buildKeepAlive(agent);\nexport {\n Cancel,\n CancelToken,\n agent,\n base,\n debug,\n headers,\n httpErrors,\n injectResponse,\n jsonRequest,\n jsonResponse,\n keepAlive,\n mtls,\n observable,\n processOptions,\n progress,\n promise,\n proxy,\n retry,\n urlEncoded,\n validateOptions\n};\n//# sourceMappingURL=middleware.browser.js.map\n","export function isFunction(value) {\n return typeof value === 'function';\n}\n//# sourceMappingURL=isFunction.js.map","export function createErrorClass(createImpl) {\n var _super = function (instance) {\n Error.call(instance);\n instance.stack = new Error().stack;\n };\n var ctorFunc = createImpl(_super);\n ctorFunc.prototype = Object.create(Error.prototype);\n ctorFunc.prototype.constructor = ctorFunc;\n return ctorFunc;\n}\n//# sourceMappingURL=createErrorClass.js.map","import { createErrorClass } from './createErrorClass';\nexport var UnsubscriptionError = createErrorClass(function (_super) {\n return function UnsubscriptionErrorImpl(errors) {\n _super(this);\n this.message = errors\n ? errors.length + \" errors occurred during unsubscription:\\n\" + errors.map(function (err, i) { return i + 1 + \") \" + err.toString(); }).join('\\n ')\n : '';\n this.name = 'UnsubscriptionError';\n this.errors = errors;\n };\n});\n//# sourceMappingURL=UnsubscriptionError.js.map","export function arrRemove(arr, item) {\n if (arr) {\n var index = arr.indexOf(item);\n 0 <= index && arr.splice(index, 1);\n }\n}\n//# sourceMappingURL=arrRemove.js.map","import { __read, __spreadArray, __values } from \"tslib\";\nimport { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nimport { arrRemove } from './util/arrRemove';\nvar Subscription = (function () {\n function Subscription(initialTeardown) {\n this.initialTeardown = initialTeardown;\n this.closed = false;\n this._parentage = null;\n this._finalizers = null;\n }\n Subscription.prototype.unsubscribe = function () {\n var e_1, _a, e_2, _b;\n var errors;\n if (!this.closed) {\n this.closed = true;\n var _parentage = this._parentage;\n if (_parentage) {\n this._parentage = null;\n if (Array.isArray(_parentage)) {\n try {\n for (var _parentage_1 = __values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) {\n var parent_1 = _parentage_1_1.value;\n parent_1.remove(this);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) _a.call(_parentage_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n else {\n _parentage.remove(this);\n }\n }\n var initialFinalizer = this.initialTeardown;\n if (isFunction(initialFinalizer)) {\n try {\n initialFinalizer();\n }\n catch (e) {\n errors = e instanceof UnsubscriptionError ? e.errors : [e];\n }\n }\n var _finalizers = this._finalizers;\n if (_finalizers) {\n this._finalizers = null;\n try {\n for (var _finalizers_1 = __values(_finalizers), _finalizers_1_1 = _finalizers_1.next(); !_finalizers_1_1.done; _finalizers_1_1 = _finalizers_1.next()) {\n var finalizer = _finalizers_1_1.value;\n try {\n execFinalizer(finalizer);\n }\n catch (err) {\n errors = errors !== null && errors !== void 0 ? errors : [];\n if (err instanceof UnsubscriptionError) {\n errors = __spreadArray(__spreadArray([], __read(errors)), __read(err.errors));\n }\n else {\n errors.push(err);\n }\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_finalizers_1_1 && !_finalizers_1_1.done && (_b = _finalizers_1.return)) _b.call(_finalizers_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n if (errors) {\n throw new UnsubscriptionError(errors);\n }\n }\n };\n Subscription.prototype.add = function (teardown) {\n var _a;\n if (teardown && teardown !== this) {\n if (this.closed) {\n execFinalizer(teardown);\n }\n else {\n if (teardown instanceof Subscription) {\n if (teardown.closed || teardown._hasParent(this)) {\n return;\n }\n teardown._addParent(this);\n }\n (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown);\n }\n }\n };\n Subscription.prototype._hasParent = function (parent) {\n var _parentage = this._parentage;\n return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));\n };\n Subscription.prototype._addParent = function (parent) {\n var _parentage = this._parentage;\n this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;\n };\n Subscription.prototype._removeParent = function (parent) {\n var _parentage = this._parentage;\n if (_parentage === parent) {\n this._parentage = null;\n }\n else if (Array.isArray(_parentage)) {\n arrRemove(_parentage, parent);\n }\n };\n Subscription.prototype.remove = function (teardown) {\n var _finalizers = this._finalizers;\n _finalizers && arrRemove(_finalizers, teardown);\n if (teardown instanceof Subscription) {\n teardown._removeParent(this);\n }\n };\n Subscription.EMPTY = (function () {\n var empty = new Subscription();\n empty.closed = true;\n return empty;\n })();\n return Subscription;\n}());\nexport { Subscription };\nexport var EMPTY_SUBSCRIPTION = Subscription.EMPTY;\nexport function isSubscription(value) {\n return (value instanceof Subscription ||\n (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe)));\n}\nfunction execFinalizer(finalizer) {\n if (isFunction(finalizer)) {\n finalizer();\n }\n else {\n finalizer.unsubscribe();\n }\n}\n//# sourceMappingURL=Subscription.js.map","export var config = {\n onUnhandledError: null,\n onStoppedNotification: null,\n Promise: undefined,\n useDeprecatedSynchronousErrorHandling: false,\n useDeprecatedNextContext: false,\n};\n//# sourceMappingURL=config.js.map","import { __read, __spreadArray } from \"tslib\";\nexport var timeoutProvider = {\n setTimeout: function (handler, timeout) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n var delegate = timeoutProvider.delegate;\n if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) {\n return delegate.setTimeout.apply(delegate, __spreadArray([handler, timeout], __read(args)));\n }\n return setTimeout.apply(void 0, __spreadArray([handler, timeout], __read(args)));\n },\n clearTimeout: function (handle) {\n var delegate = timeoutProvider.delegate;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);\n },\n delegate: undefined,\n};\n//# sourceMappingURL=timeoutProvider.js.map","export function noop() { }\n//# sourceMappingURL=noop.js.map","export var COMPLETE_NOTIFICATION = (function () { return createNotification('C', undefined, undefined); })();\nexport function errorNotification(error) {\n return createNotification('E', undefined, error);\n}\nexport function nextNotification(value) {\n return createNotification('N', value, undefined);\n}\nexport function createNotification(kind, value, error) {\n return {\n kind: kind,\n value: value,\n error: error,\n };\n}\n//# sourceMappingURL=NotificationFactories.js.map","import { config } from '../config';\nvar context = null;\nexport function errorContext(cb) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n var isRoot = !context;\n if (isRoot) {\n context = { errorThrown: false, error: null };\n }\n cb();\n if (isRoot) {\n var _a = context, errorThrown = _a.errorThrown, error = _a.error;\n context = null;\n if (errorThrown) {\n throw error;\n }\n }\n }\n else {\n cb();\n }\n}\nexport function captureError(err) {\n if (config.useDeprecatedSynchronousErrorHandling && context) {\n context.errorThrown = true;\n context.error = err;\n }\n}\n//# sourceMappingURL=errorContext.js.map","import { __extends } from \"tslib\";\nimport { isFunction } from './util/isFunction';\nimport { isSubscription, Subscription } from './Subscription';\nimport { config } from './config';\nimport { reportUnhandledError } from './util/reportUnhandledError';\nimport { noop } from './util/noop';\nimport { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories';\nimport { timeoutProvider } from './scheduler/timeoutProvider';\nimport { captureError } from './util/errorContext';\nvar Subscriber = (function (_super) {\n __extends(Subscriber, _super);\n function Subscriber(destination) {\n var _this = _super.call(this) || this;\n _this.isStopped = false;\n if (destination) {\n _this.destination = destination;\n if (isSubscription(destination)) {\n destination.add(_this);\n }\n }\n else {\n _this.destination = EMPTY_OBSERVER;\n }\n return _this;\n }\n Subscriber.create = function (next, error, complete) {\n return new SafeSubscriber(next, error, complete);\n };\n Subscriber.prototype.next = function (value) {\n if (this.isStopped) {\n handleStoppedNotification(nextNotification(value), this);\n }\n else {\n this._next(value);\n }\n };\n Subscriber.prototype.error = function (err) {\n if (this.isStopped) {\n handleStoppedNotification(errorNotification(err), this);\n }\n else {\n this.isStopped = true;\n this._error(err);\n }\n };\n Subscriber.prototype.complete = function () {\n if (this.isStopped) {\n handleStoppedNotification(COMPLETE_NOTIFICATION, this);\n }\n else {\n this.isStopped = true;\n this._complete();\n }\n };\n Subscriber.prototype.unsubscribe = function () {\n if (!this.closed) {\n this.isStopped = true;\n _super.prototype.unsubscribe.call(this);\n this.destination = null;\n }\n };\n Subscriber.prototype._next = function (value) {\n this.destination.next(value);\n };\n Subscriber.prototype._error = function (err) {\n try {\n this.destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n };\n Subscriber.prototype._complete = function () {\n try {\n this.destination.complete();\n }\n finally {\n this.unsubscribe();\n }\n };\n return Subscriber;\n}(Subscription));\nexport { Subscriber };\nvar _bind = Function.prototype.bind;\nfunction bind(fn, thisArg) {\n return _bind.call(fn, thisArg);\n}\nvar ConsumerObserver = (function () {\n function ConsumerObserver(partialObserver) {\n this.partialObserver = partialObserver;\n }\n ConsumerObserver.prototype.next = function (value) {\n var partialObserver = this.partialObserver;\n if (partialObserver.next) {\n try {\n partialObserver.next(value);\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n };\n ConsumerObserver.prototype.error = function (err) {\n var partialObserver = this.partialObserver;\n if (partialObserver.error) {\n try {\n partialObserver.error(err);\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n else {\n handleUnhandledError(err);\n }\n };\n ConsumerObserver.prototype.complete = function () {\n var partialObserver = this.partialObserver;\n if (partialObserver.complete) {\n try {\n partialObserver.complete();\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n };\n return ConsumerObserver;\n}());\nvar SafeSubscriber = (function (_super) {\n __extends(SafeSubscriber, _super);\n function SafeSubscriber(observerOrNext, error, complete) {\n var _this = _super.call(this) || this;\n var partialObserver;\n if (isFunction(observerOrNext) || !observerOrNext) {\n partialObserver = {\n next: (observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined),\n error: error !== null && error !== void 0 ? error : undefined,\n complete: complete !== null && complete !== void 0 ? complete : undefined,\n };\n }\n else {\n var context_1;\n if (_this && config.useDeprecatedNextContext) {\n context_1 = Object.create(observerOrNext);\n context_1.unsubscribe = function () { return _this.unsubscribe(); };\n partialObserver = {\n next: observerOrNext.next && bind(observerOrNext.next, context_1),\n error: observerOrNext.error && bind(observerOrNext.error, context_1),\n complete: observerOrNext.complete && bind(observerOrNext.complete, context_1),\n };\n }\n else {\n partialObserver = observerOrNext;\n }\n }\n _this.destination = new ConsumerObserver(partialObserver);\n return _this;\n }\n return SafeSubscriber;\n}(Subscriber));\nexport { SafeSubscriber };\nfunction handleUnhandledError(error) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n captureError(error);\n }\n else {\n reportUnhandledError(error);\n }\n}\nfunction defaultErrorHandler(err) {\n throw err;\n}\nfunction handleStoppedNotification(notification, subscriber) {\n var onStoppedNotification = config.onStoppedNotification;\n onStoppedNotification && timeoutProvider.setTimeout(function () { return onStoppedNotification(notification, subscriber); });\n}\nexport var EMPTY_OBSERVER = {\n closed: true,\n next: noop,\n error: defaultErrorHandler,\n complete: noop,\n};\n//# sourceMappingURL=Subscriber.js.map","import { config } from '../config';\nimport { timeoutProvider } from '../scheduler/timeoutProvider';\nexport function reportUnhandledError(err) {\n timeoutProvider.setTimeout(function () {\n var onUnhandledError = config.onUnhandledError;\n if (onUnhandledError) {\n onUnhandledError(err);\n }\n else {\n throw err;\n }\n });\n}\n//# sourceMappingURL=reportUnhandledError.js.map","export var observable = (function () { return (typeof Symbol === 'function' && Symbol.observable) || '@@observable'; })();\n//# sourceMappingURL=observable.js.map","export function identity(x) {\n return x;\n}\n//# sourceMappingURL=identity.js.map","import { identity } from './identity';\nexport function pipe() {\n var fns = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fns[_i] = arguments[_i];\n }\n return pipeFromArray(fns);\n}\nexport function pipeFromArray(fns) {\n if (fns.length === 0) {\n return identity;\n }\n if (fns.length === 1) {\n return fns[0];\n }\n return function piped(input) {\n return fns.reduce(function (prev, fn) { return fn(prev); }, input);\n };\n}\n//# sourceMappingURL=pipe.js.map","import { SafeSubscriber, Subscriber } from './Subscriber';\nimport { isSubscription } from './Subscription';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nimport { isFunction } from './util/isFunction';\nimport { errorContext } from './util/errorContext';\nvar Observable = (function () {\n function Observable(subscribe) {\n if (subscribe) {\n this._subscribe = subscribe;\n }\n }\n Observable.prototype.lift = function (operator) {\n var observable = new Observable();\n observable.source = this;\n observable.operator = operator;\n return observable;\n };\n Observable.prototype.subscribe = function (observerOrNext, error, complete) {\n var _this = this;\n var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);\n errorContext(function () {\n var _a = _this, operator = _a.operator, source = _a.source;\n subscriber.add(operator\n ?\n operator.call(subscriber, source)\n : source\n ?\n _this._subscribe(subscriber)\n :\n _this._trySubscribe(subscriber));\n });\n return subscriber;\n };\n Observable.prototype._trySubscribe = function (sink) {\n try {\n return this._subscribe(sink);\n }\n catch (err) {\n sink.error(err);\n }\n };\n Observable.prototype.forEach = function (next, promiseCtor) {\n var _this = this;\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor(function (resolve, reject) {\n var subscriber = new SafeSubscriber({\n next: function (value) {\n try {\n next(value);\n }\n catch (err) {\n reject(err);\n subscriber.unsubscribe();\n }\n },\n error: reject,\n complete: resolve,\n });\n _this.subscribe(subscriber);\n });\n };\n Observable.prototype._subscribe = function (subscriber) {\n var _a;\n return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);\n };\n Observable.prototype[Symbol_observable] = function () {\n return this;\n };\n Observable.prototype.pipe = function () {\n var operations = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n operations[_i] = arguments[_i];\n }\n return pipeFromArray(operations)(this);\n };\n Observable.prototype.toPromise = function (promiseCtor) {\n var _this = this;\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor(function (resolve, reject) {\n var value;\n _this.subscribe(function (x) { return (value = x); }, function (err) { return reject(err); }, function () { return resolve(value); });\n });\n };\n Observable.create = function (subscribe) {\n return new Observable(subscribe);\n };\n return Observable;\n}());\nexport { Observable };\nfunction getPromiseCtor(promiseCtor) {\n var _a;\n return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;\n}\nfunction isObserver(value) {\n return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);\n}\nfunction isSubscriber(value) {\n return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));\n}\n//# sourceMappingURL=Observable.js.map","import { createErrorClass } from './createErrorClass';\nexport var EmptyError = createErrorClass(function (_super) { return function EmptyErrorImpl() {\n _super(this);\n this.name = 'EmptyError';\n this.message = 'no elements in sequence';\n}; });\n//# sourceMappingURL=EmptyError.js.map","import { EmptyError } from './util/EmptyError';\nexport function lastValueFrom(source, config) {\n var hasConfig = typeof config === 'object';\n return new Promise(function (resolve, reject) {\n var _hasValue = false;\n var _value;\n source.subscribe({\n next: function (value) {\n _value = value;\n _hasValue = true;\n },\n error: reject,\n complete: function () {\n if (_hasValue) {\n resolve(_value);\n }\n else if (hasConfig) {\n resolve(config.defaultValue);\n }\n else {\n reject(new EmptyError());\n }\n },\n });\n });\n}\n//# sourceMappingURL=lastValueFrom.js.map","import { isFunction } from './isFunction';\nexport function hasLift(source) {\n return isFunction(source === null || source === void 0 ? void 0 : source.lift);\n}\nexport function operate(init) {\n return function (source) {\n if (hasLift(source)) {\n return source.lift(function (liftedSource) {\n try {\n return init(liftedSource, this);\n }\n catch (err) {\n this.error(err);\n }\n });\n }\n throw new TypeError('Unable to lift unknown Observable type');\n };\n}\n//# sourceMappingURL=lift.js.map","import { __extends } from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) {\n return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize);\n}\nvar OperatorSubscriber = (function (_super) {\n __extends(OperatorSubscriber, _super);\n function OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) {\n var _this = _super.call(this, destination) || this;\n _this.onFinalize = onFinalize;\n _this.shouldUnsubscribe = shouldUnsubscribe;\n _this._next = onNext\n ? function (value) {\n try {\n onNext(value);\n }\n catch (err) {\n destination.error(err);\n }\n }\n : _super.prototype._next;\n _this._error = onError\n ? function (err) {\n try {\n onError(err);\n }\n catch (err) {\n destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n }\n : _super.prototype._error;\n _this._complete = onComplete\n ? function () {\n try {\n onComplete();\n }\n catch (err) {\n destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n }\n : _super.prototype._complete;\n return _this;\n }\n OperatorSubscriber.prototype.unsubscribe = function () {\n var _a;\n if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {\n var closed_1 = this.closed;\n _super.prototype.unsubscribe.call(this);\n !closed_1 && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this));\n }\n };\n return OperatorSubscriber;\n}(Subscriber));\nexport { OperatorSubscriber };\n//# sourceMappingURL=OperatorSubscriber.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function map(project, thisArg) {\n return operate(function (source, subscriber) {\n var index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n subscriber.next(project.call(thisArg, value, index++));\n }));\n });\n}\n//# sourceMappingURL=map.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function filter(predicate, thisArg) {\n return operate(function (source, subscriber) {\n var index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) { return predicate.call(thisArg, value, index++) && subscriber.next(value); }));\n });\n}\n//# sourceMappingURL=filter.js.map","import { getIt } from 'get-it';\nexport { adapter as unstable__adapter, environment as unstable__environment } from 'get-it';\nimport { jsonRequest, jsonResponse, progress, observable } from 'get-it/middleware';\nimport { Observable, lastValueFrom } from 'rxjs';\nimport { map, filter } from 'rxjs/operators';\nvar envMiddleware = [];\nconst MAX_ITEMS_IN_ERROR_MESSAGE = 5;\nclass ClientError extends Error {\n constructor(res) {\n const props = extractErrorProps(res);\n super(props.message);\n this.statusCode = 400;\n Object.assign(this, props);\n }\n}\nclass ServerError extends Error {\n constructor(res) {\n const props = extractErrorProps(res);\n super(props.message);\n this.statusCode = 500;\n Object.assign(this, props);\n }\n}\nfunction extractErrorProps(res) {\n const body = res.body;\n const props = {\n response: res,\n statusCode: res.statusCode,\n responseBody: stringifyBody(body, res),\n message: \"\",\n details: void 0\n };\n if (body.error && body.message) {\n props.message = \"\".concat(body.error, \" - \").concat(body.message);\n return props;\n }\n if (isMutationError(body)) {\n const allItems = body.error.items || [];\n const items = allItems.slice(0, MAX_ITEMS_IN_ERROR_MESSAGE).map(item => {\n var _a;\n return (_a = item.error) == null ? void 0 : _a.description;\n }).filter(Boolean);\n let itemsStr = items.length ? \":\\n- \".concat(items.join(\"\\n- \")) : \"\";\n if (allItems.length > MAX_ITEMS_IN_ERROR_MESSAGE) {\n itemsStr += \"\\n...and \".concat(allItems.length - MAX_ITEMS_IN_ERROR_MESSAGE, \" more\");\n }\n props.message = \"\".concat(body.error.description).concat(itemsStr);\n props.details = body.error;\n return props;\n }\n if (body.error && body.error.description) {\n props.message = body.error.description;\n props.details = body.error;\n return props;\n }\n props.message = body.error || body.message || httpErrorMessage(res);\n return props;\n}\nfunction isMutationError(body) {\n return isPlainObject(body) && isPlainObject(body.error) && body.error.type === \"mutationError\" && typeof body.error.description === \"string\";\n}\nfunction isPlainObject(obj) {\n return typeof obj === \"object\" && obj !== null && !Array.isArray(obj);\n}\nfunction httpErrorMessage(res) {\n const statusMessage = res.statusMessage ? \" \".concat(res.statusMessage) : \"\";\n return \"\".concat(res.method, \"-request to \").concat(res.url, \" resulted in HTTP \").concat(res.statusCode).concat(statusMessage);\n}\nfunction stringifyBody(body, res) {\n const contentType = (res.headers[\"content-type\"] || \"\").toLowerCase();\n const isJson = contentType.indexOf(\"application/json\") !== -1;\n return isJson ? JSON.stringify(body, null, 2) : body;\n}\nconst httpError = {\n onResponse: res => {\n if (res.statusCode >= 500) {\n throw new ServerError(res);\n } else if (res.statusCode >= 400) {\n throw new ClientError(res);\n }\n return res;\n }\n};\nconst printWarnings = {\n onResponse: res => {\n const warn = res.headers[\"x-sanity-warning\"];\n const warnings = Array.isArray(warn) ? warn : [warn];\n warnings.filter(Boolean).forEach(msg => console.warn(msg));\n return res;\n }\n};\nfunction defineHttpRequest(envMiddleware) {\n const request = getIt([...envMiddleware, printWarnings, jsonRequest(), jsonResponse(), progress(), httpError, observable({\n implementation: Observable\n })]);\n function httpRequest(options) {\n let requester = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : request;\n return requester({\n maxRedirects: 0,\n ...options\n });\n }\n httpRequest.defaultRequester = request;\n return httpRequest;\n}\nconst projectHeader = \"X-Sanity-Project-ID\";\nfunction requestOptions(config) {\n let overrides = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n const headers = {};\n const token = overrides.token || config.token;\n if (token) {\n headers.Authorization = \"Bearer \".concat(token);\n }\n if (!overrides.useGlobalApi && !config.useProjectHostname && config.projectId) {\n headers[projectHeader] = config.projectId;\n }\n const withCredentials = Boolean(typeof overrides.withCredentials === \"undefined\" ? config.token || config.withCredentials : overrides.withCredentials);\n const timeout = typeof overrides.timeout === \"undefined\" ? config.timeout : overrides.timeout;\n return Object.assign({}, overrides, {\n headers: Object.assign({}, headers, overrides.headers || {}),\n timeout: typeof timeout === \"undefined\" ? 5 * 60 * 1e3 : timeout,\n proxy: overrides.proxy || config.proxy,\n json: true,\n withCredentials\n });\n}\nfunction getSelection(sel) {\n if (typeof sel === \"string\" || Array.isArray(sel)) {\n return {\n id: sel\n };\n }\n if (typeof sel === \"object\" && sel !== null && \"query\" in sel && typeof sel.query === \"string\") {\n return \"params\" in sel && typeof sel.params === \"object\" && sel.params !== null ? {\n query: sel.query,\n params: sel.params\n } : {\n query: sel.query\n };\n }\n const selectionOpts = [\"* Document ID (<docId>)\", \"* Array of document IDs\", \"* Object containing `query`\"].join(\"\\n\");\n throw new Error(\"Unknown selection - must be one of:\\n\\n\".concat(selectionOpts));\n}\nconst VALID_ASSET_TYPES = [\"image\", \"file\"];\nconst VALID_INSERT_LOCATIONS = [\"before\", \"after\", \"replace\"];\nconst dataset = name => {\n if (!/^(~[a-z0-9]{1}[-\\w]{0,63}|[a-z0-9]{1}[-\\w]{0,63})$/.test(name)) {\n throw new Error(\"Datasets can only contain lowercase characters, numbers, underscores and dashes, and start with tilde, and be maximum 64 characters\");\n }\n};\nconst projectId = id => {\n if (!/^[-a-z0-9]+$/i.test(id)) {\n throw new Error(\"`projectId` can only contain only a-z, 0-9 and dashes\");\n }\n};\nconst validateAssetType = type => {\n if (VALID_ASSET_TYPES.indexOf(type) === -1) {\n throw new Error(\"Invalid asset type: \".concat(type, \". Must be one of \").concat(VALID_ASSET_TYPES.join(\", \")));\n }\n};\nconst validateObject = (op, val) => {\n if (val === null || typeof val !== \"object\" || Array.isArray(val)) {\n throw new Error(\"\".concat(op, \"() takes an object of properties\"));\n }\n};\nconst validateDocumentId = (op, id) => {\n if (typeof id !== \"string\" || !/^[a-z0-9_][a-z0-9_.-]{0,127}$/i.test(id) || id.includes(\"..\")) {\n throw new Error(\"\".concat(op, \"(): \\\"\").concat(id, \"\\\" is not a valid document ID\"));\n }\n};\nconst requireDocumentId = (op, doc) => {\n if (!doc._id) {\n throw new Error(\"\".concat(op, \"() requires that the document contains an ID (\\\"_id\\\" property)\"));\n }\n validateDocumentId(op, doc._id);\n};\nconst validateInsert = (at, selector, items) => {\n const signature = \"insert(at, selector, items)\";\n if (VALID_INSERT_LOCATIONS.indexOf(at) === -1) {\n const valid = VALID_INSERT_LOCATIONS.map(loc => \"\\\"\".concat(loc, \"\\\"\")).join(\", \");\n throw new Error(\"\".concat(signature, \" takes an \\\"at\\\"-argument which is one of: \").concat(valid));\n }\n if (typeof selector !== \"string\") {\n throw new Error(\"\".concat(signature, \" takes a \\\"selector\\\"-argument which must be a string\"));\n }\n if (!Array.isArray(items)) {\n throw new Error(\"\".concat(signature, \" takes an \\\"items\\\"-argument which must be an array\"));\n }\n};\nconst hasDataset = config => {\n if (!config.dataset) {\n throw new Error(\"`dataset` must be provided to perform queries\");\n }\n return config.dataset || \"\";\n};\nconst requestTag = tag => {\n if (typeof tag !== \"string\" || !/^[a-z0-9._-]{1,75}$/i.test(tag)) {\n throw new Error(\"Tag can only contain alphanumeric characters, underscores, dashes and dots, and be between one and 75 characters long.\");\n }\n return tag;\n};\nconst encodeQueryString = _ref => {\n let {\n query,\n params = {},\n options = {}\n } = _ref;\n const searchParams = new URLSearchParams();\n const {\n tag,\n ...opts\n } = options;\n if (tag) searchParams.set(\"tag\", tag);\n searchParams.set(\"query\", query);\n for (const [key, value] of Object.entries(params)) {\n searchParams.set(\"$\".concat(key), JSON.stringify(value));\n }\n for (const [key, value] of Object.entries(opts)) {\n if (value) searchParams.set(key, \"\".concat(value));\n }\n return \"?\".concat(searchParams);\n};\nvar __accessCheck$6 = (obj, member, msg) => {\n if (!member.has(obj)) throw TypeError(\"Cannot \" + msg);\n};\nvar __privateGet$6 = (obj, member, getter) => {\n __accessCheck$6(obj, member, \"read from private field\");\n return getter ? getter.call(obj) : member.get(obj);\n};\nvar __privateAdd$6 = (obj, member, value) => {\n if (member.has(obj)) throw TypeError(\"Cannot add the same private member more than once\");\n member instanceof WeakSet ? member.add(obj) : member.set(obj, value);\n};\nvar __privateSet$6 = (obj, member, value, setter) => {\n __accessCheck$6(obj, member, \"write to private field\");\n setter ? setter.call(obj, value) : member.set(obj, value);\n return value;\n};\nvar _client$5, _client2$5;\nclass BasePatch {\n constructor(selection) {\n let operations = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n this.selection = selection;\n this.operations = operations;\n }\n /**\n * Sets the given attributes to the document. Does NOT merge objects.\n * The operation is added to the current patch, ready to be commited by `commit()`\n *\n * @param attrs - Attributes to set. To set a deep attribute, use JSONMatch, eg: \\{\"nested.prop\": \"value\"\\}\n */\n set(attrs) {\n return this._assign(\"set\", attrs);\n }\n /**\n * Sets the given attributes to the document if they are not currently set. Does NOT merge objects.\n * The operation is added to the current patch, ready to be commited by `commit()`\n *\n * @param attrs - Attributes to set. To set a deep attribute, use JSONMatch, eg: \\{\"nested.prop\": \"value\"\\}\n */\n setIfMissing(attrs) {\n return this._assign(\"setIfMissing\", attrs);\n }\n /**\n * Performs a \"diff-match-patch\" operation on the string attributes provided.\n * The operation is added to the current patch, ready to be commited by `commit()`\n *\n * @param attrs - Attributes to perform operation on. To set a deep attribute, use JSONMatch, eg: \\{\"nested.prop\": \"dmp\"\\}\n */\n diffMatchPatch(attrs) {\n validateObject(\"diffMatchPatch\", attrs);\n return this._assign(\"diffMatchPatch\", attrs);\n }\n /**\n * Unsets the attribute paths provided.\n * The operation is added to the current patch, ready to be commited by `commit()`\n *\n * @param attrs - Attribute paths to unset.\n */\n unset(attrs) {\n if (!Array.isArray(attrs)) {\n throw new Error(\"unset(attrs) takes an array of attributes to unset, non-array given\");\n }\n this.operations = Object.assign({}, this.operations, {\n unset: attrs\n });\n return this;\n }\n /**\n * Increment a numeric value. Each entry in the argument is either an attribute or a JSON path. The value may be a positive or negative integer or floating-point value. The operation will fail if target value is not a numeric value, or doesn't exist.\n *\n * @param attrs - Object of attribute paths to increment, values representing the number to increment by.\n */\n inc(attrs) {\n return this._assign(\"inc\", attrs);\n }\n /**\n * Decrement a numeric value. Each entry in the argument is either an attribute or a JSON path. The value may be a positive or negative integer or floating-point value. The operation will fail if target value is not a numeric value, or doesn't exist.\n *\n * @param attrs - Object of attribute paths to decrement, values representing the number to decrement by.\n */\n dec(attrs) {\n return this._assign(\"dec\", attrs);\n }\n /**\n * Provides methods for modifying arrays, by inserting, appending and replacing elements via a JSONPath expression.\n *\n * @param at - Location to insert at, relative to the given selector, or 'replace' the matched path\n * @param selector - JSONPath expression, eg `comments[-1]` or `blocks[_key==\"abc123\"]`\n * @param items - Array of items to insert/replace\n */\n insert(at, selector, items) {\n validateInsert(at, selector, items);\n return this._assign(\"insert\", {\n [at]: selector,\n items\n });\n }\n /**\n * Append the given items to the array at the given JSONPath\n *\n * @param selector - Attribute/path to append to, eg `comments` or `person.hobbies`\n * @param items - Array of items to append to the array\n */\n append(selector, items) {\n return this.insert(\"after\", \"\".concat(selector, \"[-1]\"), items);\n }\n /**\n * Prepend the given items to the array at the given JSONPath\n *\n * @param selector - Attribute/path to prepend to, eg `comments` or `person.hobbies`\n * @param items - Array of items to prepend to the array\n */\n prepend(selector, items) {\n return this.insert(\"before\", \"\".concat(selector, \"[0]\"), items);\n }\n /**\n * Change the contents of an array by removing existing elements and/or adding new elements.\n *\n * @param selector - Attribute or JSONPath expression for array\n * @param start - Index at which to start changing the array (with origin 0). If greater than the length of the array, actual starting index will be set to the length of the array. If negative, will begin that many elements from the end of the array (with origin -1) and will be set to 0 if absolute value is greater than the length of the array.x\n * @param deleteCount - An integer indicating the number of old array elements to remove.\n * @param items - The elements to add to the array, beginning at the start index. If you don't specify any elements, splice() will only remove elements from the array.\n */\n splice(selector, start, deleteCount, items) {\n const delAll = typeof deleteCount === \"undefined\" || deleteCount === -1;\n const startIndex = start < 0 ? start - 1 : start;\n const delCount = delAll ? -1 : Math.max(0, start + deleteCount);\n const delRange = startIndex < 0 && delCount >= 0 ? \"\" : delCount;\n const rangeSelector = \"\".concat(selector, \"[\").concat(startIndex, \":\").concat(delRange, \"]\");\n return this.insert(\"replace\", rangeSelector, items || []);\n }\n /**\n * Adds a revision clause, preventing the document from being patched if the `_rev` property does not match the given value\n *\n * @param rev - Revision to lock the patch to\n */\n ifRevisionId(rev) {\n this.operations.ifRevisionID = rev;\n return this;\n }\n /**\n * Return a plain JSON representation of the patch\n */\n serialize() {\n return {\n ...getSelection(this.selection),\n ...this.operations\n };\n }\n /**\n * Return a plain JSON representation of the patch\n */\n toJSON() {\n return this.serialize();\n }\n /**\n * Clears the patch of all operations\n */\n reset() {\n this.operations = {};\n return this;\n }\n _assign(op, props) {\n let merge = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n validateObject(op, props);\n this.operations = Object.assign({}, this.operations, {\n [op]: Object.assign({}, merge && this.operations[op] || {}, props)\n });\n return this;\n }\n _set(op, props) {\n return this._assign(op, props, false);\n }\n}\nconst _ObservablePatch = class extends BasePatch {\n constructor(selection, operations, client) {\n super(selection, operations);\n __privateAdd$6(this, _client$5, void 0);\n __privateSet$6(this, _client$5, client);\n }\n /**\n * Clones the patch\n */\n clone() {\n return new _ObservablePatch(this.selection, {\n ...this.operations\n }, __privateGet$6(this, _client$5));\n }\n commit(options) {\n if (!__privateGet$6(this, _client$5)) {\n throw new Error(\"No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method\");\n }\n const returnFirst = typeof this.selection === \"string\";\n const opts = Object.assign({\n returnFirst,\n returnDocuments: true\n }, options);\n return __privateGet$6(this, _client$5).mutate({\n patch: this.serialize()\n }, opts);\n }\n};\nlet ObservablePatch = _ObservablePatch;\n_client$5 = new WeakMap();\nconst _Patch = class extends BasePatch {\n constructor(selection, operations, client) {\n super(selection, operations);\n __privateAdd$6(this, _client2$5, void 0);\n __privateSet$6(this, _client2$5, client);\n }\n /**\n * Clones the patch\n */\n clone() {\n return new _Patch(this.selection, {\n ...this.operations\n }, __privateGet$6(this, _client2$5));\n }\n commit(options) {\n if (!__privateGet$6(this, _client2$5)) {\n throw new Error(\"No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method\");\n }\n const returnFirst = typeof this.selection === \"string\";\n const opts = Object.assign({\n returnFirst,\n returnDocuments: true\n }, options);\n return __privateGet$6(this, _client2$5).mutate({\n patch: this.serialize()\n }, opts);\n }\n};\nlet Patch = _Patch;\n_client2$5 = new WeakMap();\nvar __accessCheck$5 = (obj, member, msg) => {\n if (!member.has(obj)) throw TypeError(\"Cannot \" + msg);\n};\nvar __privateGet$5 = (obj, member, getter) => {\n __accessCheck$5(obj, member, \"read from private field\");\n return getter ? getter.call(obj) : member.get(obj);\n};\nvar __privateAdd$5 = (obj, member, value) => {\n if (member.has(obj)) throw TypeError(\"Cannot add the same private member more than once\");\n member instanceof WeakSet ? member.add(obj) : member.set(obj, value);\n};\nvar __privateSet$5 = (obj, member, value, setter) => {\n __accessCheck$5(obj, member, \"write to private field\");\n setter ? setter.call(obj, value) : member.set(obj, value);\n return value;\n};\nvar _client$4, _client2$4;\nconst defaultMutateOptions = {\n returnDocuments: false\n};\nclass BaseTransaction {\n constructor() {\n let operations = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n let transactionId = arguments.length > 1 ? arguments[1] : undefined;\n this.operations = operations;\n this.trxId = transactionId;\n }\n /**\n * Creates a new Sanity document. If `_id` is provided and already exists, the mutation will fail. If no `_id` is given, one will automatically be generated by the database.\n * The operation is added to the current transaction, ready to be commited by `commit()`\n *\n * @param doc - Document to create. Requires a `_type` property.\n */\n create(doc) {\n validateObject(\"create\", doc);\n return this._add({\n create: doc\n });\n }\n /**\n * Creates a new Sanity document. If a document with the same `_id` already exists, the create operation will be ignored.\n * The operation is added to the current transaction, ready to be commited by `commit()`\n *\n * @param doc - Document to create if it does not already exist. Requires `_id` and `_type` properties.\n */\n createIfNotExists(doc) {\n const op = \"createIfNotExists\";\n validateObject(op, doc);\n requireDocumentId(op, doc);\n return this._add({\n [op]: doc\n });\n }\n /**\n * Creates a new Sanity document, or replaces an existing one if the same `_id` is already used.\n * The operation is added to the current transaction, ready to be commited by `commit()`\n *\n * @param doc - Document to create or replace. Requires `_id` and `_type` properties.\n */\n createOrReplace(doc) {\n const op = \"createOrReplace\";\n validateObject(op, doc);\n requireDocumentId(op, doc);\n return this._add({\n [op]: doc\n });\n }\n /**\n * Deletes the document with the given document ID\n * The operation is added to the current transaction, ready to be commited by `commit()`\n *\n * @param documentId - Document ID to delete\n */\n delete(documentId) {\n validateDocumentId(\"delete\", documentId);\n return this._add({\n delete: {\n id: documentId\n }\n });\n }\n transactionId(id) {\n if (!id) {\n return this.trxId;\n }\n this.trxId = id;\n return this;\n }\n /**\n * Return a plain JSON representation of the transaction\n */\n serialize() {\n return [...this.operations];\n }\n /**\n * Return a plain JSON representation of the transaction\n */\n toJSON() {\n return this.serialize();\n }\n /**\n * Clears the transaction of all operations\n */\n reset() {\n this.operations = [];\n return this;\n }\n _add(mut) {\n this.operations.push(mut);\n return this;\n }\n}\nconst _Transaction = class extends BaseTransaction {\n constructor(operations, client, transactionId) {\n super(operations, transactionId);\n __privateAdd$5(this, _client$4, void 0);\n __privateSet$5(this, _client$4, client);\n }\n /**\n * Clones the transaction\n */\n clone() {\n return new _Transaction([...this.operations], __privateGet$5(this, _client$4), this.trxId);\n }\n commit(options) {\n if (!__privateGet$5(this, _client$4)) {\n throw new Error(\"No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method\");\n }\n return __privateGet$5(this, _client$4).mutate(this.serialize(), Object.assign({\n transactionId: this.trxId\n }, defaultMutateOptions, options || {}));\n }\n patch(patchOrDocumentId, patchOps) {\n const isBuilder = typeof patchOps === \"function\";\n const isPatch = typeof patchOrDocumentId !== \"string\" && patchOrDocumentId instanceof Patch;\n if (isPatch) {\n return this._add({\n patch: patchOrDocumentId.serialize()\n });\n }\n if (isBuilder) {\n const patch = patchOps(new Patch(patchOrDocumentId, {}, __privateGet$5(this, _client$4)));\n if (!(patch instanceof Patch)) {\n throw new Error(\"function passed to `patch()` must return the patch\");\n }\n return this._add({\n patch: patch.serialize()\n });\n }\n return this._add({\n patch: {\n id: patchOrDocumentId,\n ...patchOps\n }\n });\n }\n};\nlet Transaction = _Transaction;\n_client$4 = new WeakMap();\nconst _ObservableTransaction = class extends BaseTransaction {\n constructor(operations, client, transactionId) {\n super(operations, transactionId);\n __privateAdd$5(this, _client2$4, void 0);\n __privateSet$5(this, _client2$4, client);\n }\n /**\n * Clones the transaction\n */\n clone() {\n return new _ObservableTransaction([...this.operations], __privateGet$5(this, _client2$4), this.trxId);\n }\n commit(options) {\n if (!__privateGet$5(this, _client2$4)) {\n throw new Error(\"No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method\");\n }\n return __privateGet$5(this, _client2$4).mutate(this.serialize(), Object.assign({\n transactionId: this.trxId\n }, defaultMutateOptions, options || {}));\n }\n patch(patchOrDocumentId, patchOps) {\n const isBuilder = typeof patchOps === \"function\";\n const isPatch = typeof patchOrDocumentId !== \"string\" && patchOrDocumentId instanceof ObservablePatch;\n if (isPatch) {\n return this._add({\n patch: patchOrDocumentId.serialize()\n });\n }\n if (isBuilder) {\n const patch = patchOps(new ObservablePatch(patchOrDocumentId, {}, __privateGet$5(this, _client2$4)));\n if (!(patch instanceof ObservablePatch)) {\n throw new Error(\"function passed to `patch()` must return the patch\");\n }\n return this._add({\n patch: patch.serialize()\n });\n }\n return this._add({\n patch: {\n id: patchOrDocumentId,\n ...patchOps\n }\n });\n }\n};\nlet ObservableTransaction = _ObservableTransaction;\n_client2$4 = new WeakMap();\nconst excludeFalsey = (param, defValue) => {\n const value = typeof param === \"undefined\" ? defValue : param;\n return param === false ? void 0 : value;\n};\nconst getMutationQuery = function () {\n let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return {\n dryRun: options.dryRun,\n returnIds: true,\n returnDocuments: excludeFalsey(options.returnDocuments, true),\n visibility: options.visibility || \"sync\",\n autoGenerateArrayKeys: options.autoGenerateArrayKeys,\n skipCrossDatasetReferenceValidation: options.skipCrossDatasetReferenceValidation\n };\n};\nconst isResponse = event => event.type === \"response\";\nconst getBody = event => event.body;\nconst indexBy = (docs, attr) => docs.reduce((indexed, doc) => {\n indexed[attr(doc)] = doc;\n return indexed;\n}, /* @__PURE__ */Object.create(null));\nconst getQuerySizeLimit = 11264;\nfunction _fetch(client, httpRequest, query, params) {\n let options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};\n const mapResponse = options.filterResponse === false ? res => res : res => res.result;\n return _dataRequest(client, httpRequest, \"query\", {\n query,\n params\n }, options).pipe(map(mapResponse));\n}\nfunction _getDocument(client, httpRequest, id) {\n let opts = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n const options = {\n uri: _getDataUrl(client, \"doc\", id),\n json: true,\n tag: opts.tag\n };\n return _requestObservable(client, httpRequest, options).pipe(filter(isResponse), map(event => event.body.documents && event.body.documents[0]));\n}\nfunction _getDocuments(client, httpRequest, ids) {\n let opts = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n const options = {\n uri: _getDataUrl(client, \"doc\", ids.join(\",\")),\n json: true,\n tag: opts.tag\n };\n return _requestObservable(client, httpRequest, options).pipe(filter(isResponse), map(event => {\n const indexed = indexBy(event.body.documents || [], doc => doc._id);\n return ids.map(id => indexed[id] || null);\n }));\n}\nfunction _createIfNotExists(client, httpRequest, doc, options) {\n requireDocumentId(\"createIfNotExists\", doc);\n return _create(client, httpRequest, doc, \"createIfNotExists\", options);\n}\nfunction _createOrReplace(client, httpRequest, doc, options) {\n requireDocumentId(\"createOrReplace\", doc);\n return _create(client, httpRequest, doc, \"createOrReplace\", options);\n}\nfunction _delete(client, httpRequest, selection, options) {\n return _dataRequest(client, httpRequest, \"mutate\", {\n mutations: [{\n delete: getSelection(selection)\n }]\n }, options);\n}\nfunction _mutate(client, httpRequest, mutations, options) {\n let mut;\n if (mutations instanceof Patch || mutations instanceof ObservablePatch) {\n mut = {\n patch: mutations.serialize()\n };\n } else if (mutations instanceof Transaction || mutations instanceof ObservableTransaction) {\n mut = mutations.serialize();\n } else {\n mut = mutations;\n }\n const muts = Array.isArray(mut) ? mut : [mut];\n const transactionId = options && options.transactionId || void 0;\n return _dataRequest(client, httpRequest, \"mutate\", {\n mutations: muts,\n transactionId\n }, options);\n}\nfunction _dataRequest(client, httpRequest, endpoint, body) {\n let options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};\n const isMutation = endpoint === \"mutate\";\n const isQuery = endpoint === \"query\";\n const strQuery = isMutation ? \"\" : encodeQueryString(body);\n const useGet = !isMutation && strQuery.length < getQuerySizeLimit;\n const stringQuery = useGet ? strQuery : \"\";\n const returnFirst = options.returnFirst;\n const {\n timeout,\n token,\n tag,\n headers\n } = options;\n const uri = _getDataUrl(client, endpoint, stringQuery);\n const reqOptions = {\n method: useGet ? \"GET\" : \"POST\",\n uri,\n json: true,\n body: useGet ? void 0 : body,\n query: isMutation && getMutationQuery(options),\n timeout,\n headers,\n token,\n tag,\n canUseCdn: isQuery,\n signal: options.signal\n };\n return _requestObservable(client, httpRequest, reqOptions).pipe(filter(isResponse), map(getBody), map(res => {\n if (!isMutation) {\n return res;\n }\n const results = res.results || [];\n if (options.returnDocuments) {\n return returnFirst ? results[0] && results[0].document : results.map(mut => mut.document);\n }\n const key = returnFirst ? \"documentId\" : \"documentIds\";\n const ids = returnFirst ? results[0] && results[0].id : results.map(mut => mut.id);\n return {\n transactionId: res.transactionId,\n results,\n [key]: ids\n };\n }));\n}\nfunction _create(client, httpRequest, doc, op) {\n let options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};\n const mutation = {\n [op]: doc\n };\n const opts = Object.assign({\n returnFirst: true,\n returnDocuments: true\n }, options);\n return _dataRequest(client, httpRequest, \"mutate\", {\n mutations: [mutation]\n }, opts);\n}\nfunction _requestObservable(client, httpRequest, options) {\n const uri = options.url || options.uri;\n const config = client.config();\n const canUseCdn = typeof options.canUseCdn === \"undefined\" ? [\"GET\", \"HEAD\"].indexOf(options.method || \"GET\") >= 0 && uri.indexOf(\"/data/\") === 0 : options.canUseCdn;\n const useCdn = config.useCdn && canUseCdn;\n const tag = options.tag && config.requestTagPrefix ? [config.requestTagPrefix, options.tag].join(\".\") : options.tag || config.requestTagPrefix;\n if (tag) {\n options.query = {\n tag: requestTag(tag),\n ...options.query\n };\n }\n const reqOptions = requestOptions(config, Object.assign({}, options, {\n url: _getUrl(client, uri, useCdn)\n }));\n const request = new Observable(subscriber =>\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- the typings thinks it's optional because it's not required to specify it when calling createClient, but it's always defined in practice since SanityClient provides a default\n httpRequest(reqOptions, config.requester).subscribe(subscriber));\n return options.signal ? request.pipe(_withAbortSignal(options.signal)) : request;\n}\nfunction _request(client, httpRequest, options) {\n const observable = _requestObservable(client, httpRequest, options).pipe(filter(event => event.type === \"response\"), map(event => event.body));\n return observable;\n}\nfunction _getDataUrl(client, operation, path) {\n const config = client.config();\n const catalog = hasDataset(config);\n const baseUri = \"/\".concat(operation, \"/\").concat(catalog);\n const uri = path ? \"\".concat(baseUri, \"/\").concat(path) : baseUri;\n return \"/data\".concat(uri).replace(/\\/($|\\?)/, \"$1\");\n}\nfunction _getUrl(client, uri) {\n let canUseCdn = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n const {\n url,\n cdnUrl\n } = client.config();\n const base = canUseCdn ? cdnUrl : url;\n return \"\".concat(base, \"/\").concat(uri.replace(/^\\//, \"\"));\n}\nfunction _withAbortSignal(signal) {\n return input => {\n return new Observable(observer => {\n const abort = () => observer.error(_createAbortError(signal));\n if (signal && signal.aborted) {\n abort();\n return;\n }\n const subscription = input.subscribe(observer);\n signal.addEventListener(\"abort\", abort);\n return () => {\n signal.removeEventListener(\"abort\", abort);\n subscription.unsubscribe();\n };\n });\n };\n}\nconst isDomExceptionSupported = Boolean(globalThis.DOMException);\nfunction _createAbortError(signal) {\n var _a, _b;\n if (isDomExceptionSupported) {\n return new DOMException((_a = signal == null ? void 0 : signal.reason) != null ? _a : \"The operation was aborted.\", \"AbortError\");\n }\n const error = new Error((_b = signal == null ? void 0 : signal.reason) != null ? _b : \"The operation was aborted.\");\n error.name = \"AbortError\";\n return error;\n}\nvar __accessCheck$4 = (obj, member, msg) => {\n if (!member.has(obj)) throw TypeError(\"Cannot \" + msg);\n};\nvar __privateGet$4 = (obj, member, getter) => {\n __accessCheck$4(obj, member, \"read from private field\");\n return getter ? getter.call(obj) : member.get(obj);\n};\nvar __privateAdd$4 = (obj, member, value) => {\n if (member.has(obj)) throw TypeError(\"Cannot add the same private member more than once\");\n member instanceof WeakSet ? member.add(obj) : member.set(obj, value);\n};\nvar __privateSet$4 = (obj, member, value, setter) => {\n __accessCheck$4(obj, member, \"write to private field\");\n setter ? setter.call(obj, value) : member.set(obj, value);\n return value;\n};\nvar _client$3, _httpRequest$4, _client2$3, _httpRequest2$4;\nclass ObservableAssetsClient {\n constructor(client, httpRequest) {\n __privateAdd$4(this, _client$3, void 0);\n __privateAdd$4(this, _httpRequest$4, void 0);\n __privateSet$4(this, _client$3, client);\n __privateSet$4(this, _httpRequest$4, httpRequest);\n }\n upload(assetType, body, options) {\n return _upload(__privateGet$4(this, _client$3), __privateGet$4(this, _httpRequest$4), assetType, body, options);\n }\n}\n_client$3 = new WeakMap();\n_httpRequest$4 = new WeakMap();\nclass AssetsClient {\n constructor(client, httpRequest) {\n __privateAdd$4(this, _client2$3, void 0);\n __privateAdd$4(this, _httpRequest2$4, void 0);\n __privateSet$4(this, _client2$3, client);\n __privateSet$4(this, _httpRequest2$4, httpRequest);\n }\n upload(assetType, body, options) {\n const observable = _upload(__privateGet$4(this, _client2$3), __privateGet$4(this, _httpRequest2$4), assetType, body, options);\n return lastValueFrom(observable.pipe(filter(event => event.type === \"response\"), map(event => event.body.document)));\n }\n}\n_client2$3 = new WeakMap();\n_httpRequest2$4 = new WeakMap();\nfunction _upload(client, httpRequest, assetType, body) {\n let opts = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};\n validateAssetType(assetType);\n let meta = opts.extract || void 0;\n if (meta && !meta.length) {\n meta = [\"none\"];\n }\n const dataset = hasDataset(client.config());\n const assetEndpoint = assetType === \"image\" ? \"images\" : \"files\";\n const options = optionsFromFile(opts, body);\n const {\n tag,\n label,\n title,\n description,\n creditLine,\n filename,\n source\n } = options;\n const query = {\n label,\n title,\n description,\n filename,\n meta,\n creditLine\n };\n if (source) {\n query.sourceId = source.id;\n query.sourceName = source.name;\n query.sourceUrl = source.url;\n }\n return _requestObservable(client, httpRequest, {\n tag,\n method: \"POST\",\n timeout: options.timeout || 0,\n uri: \"/assets/\".concat(assetEndpoint, \"/\").concat(dataset),\n headers: options.contentType ? {\n \"Content-Type\": options.contentType\n } : {},\n query,\n body\n });\n}\nfunction optionsFromFile(opts, file) {\n if (typeof File === \"undefined\" || !(file instanceof File)) {\n return opts;\n }\n return Object.assign({\n filename: opts.preserveFilename === false ? void 0 : file.name,\n contentType: file.type\n }, opts);\n}\nconst BASE_URL = \"https://www.sanity.io/help/\";\nfunction generateHelpUrl(slug) {\n return BASE_URL + slug;\n}\nfunction once(fn) {\n let didCall = false;\n let returnValue;\n return function () {\n if (didCall) {\n return returnValue;\n }\n returnValue = fn(...arguments);\n didCall = true;\n return returnValue;\n };\n}\nconst createWarningPrinter = message =>\n// eslint-disable-next-line no-console\nonce(function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return console.warn(message.join(\" \"), ...args);\n});\nconst printCdnWarning = createWarningPrinter([\"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(generateHelpUrl(\"js-client-cdn-configuration\"), \" \"), \"To hide this warning, please set the `useCdn` option to either `true` or `false` when creating\", \"the client.\"]);\nconst printBrowserTokenWarning = createWarningPrinter([\"You have configured Sanity client to use a token in the browser. This may cause unintentional security issues.\", \"See \".concat(generateHelpUrl(\"js-client-browser-token\"), \" for more information and how to hide this warning.\")]);\nconst printNoApiVersionSpecifiedWarning = createWarningPrinter([\"Using the Sanity client without specifying an API version is deprecated.\", \"See \".concat(generateHelpUrl(\"js-client-api-version\"))]);\nconst printNoDefaultExport = createWarningPrinter([\"The default export of @sanity/client has been deprecated. Use the named export `createClient` instead\"]);\nconst defaultCdnHost = \"apicdn.sanity.io\";\nconst defaultConfig = {\n apiHost: \"https://api.sanity.io\",\n apiVersion: \"1\",\n useProjectHostname: true\n};\nconst LOCALHOSTS = [\"localhost\", \"127.0.0.1\", \"0.0.0.0\"];\nconst isLocal = host => LOCALHOSTS.indexOf(host) !== -1;\nconst validateApiVersion = function validateApiVersion2(apiVersion) {\n if (apiVersion === \"1\" || apiVersion === \"X\") {\n return;\n }\n const apiDate = new Date(apiVersion);\n const apiVersionValid = /^\\d{4}-\\d{2}-\\d{2}$/.test(apiVersion) && apiDate instanceof Date && apiDate.getTime() > 0;\n if (!apiVersionValid) {\n throw new Error(\"Invalid API version string, expected `1` or date in format `YYYY-MM-DD`\");\n }\n};\nconst initConfig = (config, prevConfig) => {\n const specifiedConfig = Object.assign({}, prevConfig, config);\n if (!specifiedConfig.apiVersion) {\n printNoApiVersionSpecifiedWarning();\n }\n const newConfig = Object.assign({}, defaultConfig, specifiedConfig);\n const projectBased = newConfig.useProjectHostname;\n if (typeof Promise === \"undefined\") {\n const helpUrl = generateHelpUrl(\"js-client-promise-polyfill\");\n throw new Error(\"No native Promise-implementation found, polyfill needed - see \".concat(helpUrl));\n }\n if (projectBased && !newConfig.projectId) {\n throw new Error(\"Configuration must contain `projectId`\");\n }\n const isBrowser = typeof window !== \"undefined\" && window.location && window.location.hostname;\n const isLocalhost = isBrowser && isLocal(window.location.hostname);\n if (isBrowser && isLocalhost && newConfig.token && newConfig.ignoreBrowserTokenWarning !== true) {\n printBrowserTokenWarning();\n } else if (typeof newConfig.useCdn === \"undefined\") {\n printCdnWarning();\n }\n if (projectBased) {\n projectId(newConfig.projectId);\n }\n if (newConfig.dataset) {\n dataset(newConfig.dataset);\n }\n if (\"requestTagPrefix\" in newConfig) {\n newConfig.requestTagPrefix = newConfig.requestTagPrefix ? requestTag(newConfig.requestTagPrefix).replace(/\\.+$/, \"\") : void 0;\n }\n newConfig.apiVersion = \"\".concat(newConfig.apiVersion).replace(/^v/, \"\");\n newConfig.isDefaultApi = newConfig.apiHost === defaultConfig.apiHost;\n newConfig.useCdn = Boolean(newConfig.useCdn) && !newConfig.withCredentials;\n validateApiVersion(newConfig.apiVersion);\n const hostParts = newConfig.apiHost.split(\"://\", 2);\n const protocol = hostParts[0];\n const host = hostParts[1];\n const cdnHost = newConfig.isDefaultApi ? defaultCdnHost : host;\n if (newConfig.useProjectHostname) {\n newConfig.url = \"\".concat(protocol, \"://\").concat(newConfig.projectId, \".\").concat(host, \"/v\").concat(newConfig.apiVersion);\n newConfig.cdnUrl = \"\".concat(protocol, \"://\").concat(newConfig.projectId, \".\").concat(cdnHost, \"/v\").concat(newConfig.apiVersion);\n } else {\n newConfig.url = \"\".concat(newConfig.apiHost, \"/v\").concat(newConfig.apiVersion);\n newConfig.cdnUrl = newConfig.url;\n }\n return newConfig;\n};\nvar defaults = (obj, defaults) => Object.keys(defaults).concat(Object.keys(obj)).reduce((target, prop) => {\n target[prop] = typeof obj[prop] === \"undefined\" ? defaults[prop] : obj[prop];\n return target;\n}, {});\nconst pick = (obj, props) => props.reduce((selection, prop) => {\n if (typeof obj[prop] === \"undefined\") {\n return selection;\n }\n selection[prop] = obj[prop];\n return selection;\n}, {});\nconst MAX_URL_LENGTH = 16e3 - 1200;\nconst possibleOptions = [\"includePreviousRevision\", \"includeResult\", \"visibility\", \"effectFormat\", \"tag\"];\nconst defaultOptions = {\n includeResult: true\n};\nfunction _listen(query, params) {\n let opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n const {\n url,\n token,\n withCredentials,\n requestTagPrefix\n } = this.config();\n const tag = opts.tag && requestTagPrefix ? [requestTagPrefix, opts.tag].join(\".\") : opts.tag;\n const options = {\n ...defaults(opts, defaultOptions),\n tag\n };\n const listenOpts = pick(options, possibleOptions);\n const qs = encodeQueryString({\n query,\n params,\n options: {\n tag,\n ...listenOpts\n }\n });\n const uri = \"\".concat(url).concat(_getDataUrl(this, \"listen\", qs));\n if (uri.length > MAX_URL_LENGTH) {\n return new Observable(observer => observer.error(new Error(\"Query too large for listener\")));\n }\n const listenFor = options.events ? options.events : [\"mutation\"];\n const shouldEmitReconnect = listenFor.indexOf(\"reconnect\") !== -1;\n const esOptions = {};\n if (token || withCredentials) {\n esOptions.withCredentials = true;\n }\n if (token) {\n esOptions.headers = {\n Authorization: \"Bearer \".concat(token)\n };\n }\n return new Observable(observer => {\n let es;\n getEventSource().then(eventSource => {\n es = eventSource;\n }).catch(reason => {\n observer.error(reason);\n stop();\n });\n let reconnectTimer;\n let stopped = false;\n function onError() {\n if (stopped) {\n return;\n }\n emitReconnect();\n if (stopped) {\n return;\n }\n if (es.readyState === es.CLOSED) {\n unsubscribe();\n clearTimeout(reconnectTimer);\n reconnectTimer = setTimeout(open, 100);\n }\n }\n function onChannelError(err) {\n observer.error(cooerceError(err));\n }\n function onMessage(evt) {\n const event = parseEvent(evt);\n return event instanceof Error ? observer.error(event) : observer.next(event);\n }\n function onDisconnect() {\n stopped = true;\n unsubscribe();\n observer.complete();\n }\n function unsubscribe() {\n if (!es) return;\n es.removeEventListener(\"error\", onError);\n es.removeEventListener(\"channelError\", onChannelError);\n es.removeEventListener(\"disconnect\", onDisconnect);\n listenFor.forEach(type => es.removeEventListener(type, onMessage));\n es.close();\n }\n function emitReconnect() {\n if (shouldEmitReconnect) {\n observer.next({\n type: \"reconnect\"\n });\n }\n }\n async function getEventSource() {\n const {\n default: EventSource\n } = await import('@sanity/eventsource');\n const evs = new EventSource(uri, esOptions);\n evs.addEventListener(\"error\", onError);\n evs.addEventListener(\"channelError\", onChannelError);\n evs.addEventListener(\"disconnect\", onDisconnect);\n listenFor.forEach(type => evs.addEventListener(type, onMessage));\n return evs;\n }\n function open() {\n getEventSource().then(eventSource => {\n es = eventSource;\n }).catch(reason => {\n observer.error(reason);\n stop();\n });\n }\n function stop() {\n stopped = true;\n unsubscribe();\n }\n return stop;\n });\n}\nfunction parseEvent(event) {\n try {\n const data = event.data && JSON.parse(event.data) || {};\n return Object.assign({\n type: event.type\n }, data);\n } catch (err) {\n return err;\n }\n}\nfunction cooerceError(err) {\n if (err instanceof Error) {\n return err;\n }\n const evt = parseEvent(err);\n return evt instanceof Error ? evt : new Error(extractErrorMessage(evt));\n}\nfunction extractErrorMessage(err) {\n if (!err.error) {\n return err.message || \"Unknown listener error\";\n }\n if (err.error.description) {\n return err.error.description;\n }\n return typeof err.error === \"string\" ? err.error : JSON.stringify(err.error, null, 2);\n}\nvar __accessCheck$3 = (obj, member, msg) => {\n if (!member.has(obj)) throw TypeError(\"Cannot \" + msg);\n};\nvar __privateGet$3 = (obj, member, getter) => {\n __accessCheck$3(obj, member, \"read from private field\");\n return getter ? getter.call(obj) : member.get(obj);\n};\nvar __privateAdd$3 = (obj, member, value) => {\n if (member.has(obj)) throw TypeError(\"Cannot add the same private member more than once\");\n member instanceof WeakSet ? member.add(obj) : member.set(obj, value);\n};\nvar __privateSet$3 = (obj, member, value, setter) => {\n __accessCheck$3(obj, member, \"write to private field\");\n setter ? setter.call(obj, value) : member.set(obj, value);\n return value;\n};\nvar _client$2, _httpRequest$3, _client2$2, _httpRequest2$3;\nclass ObservableDatasetsClient {\n constructor(client, httpRequest) {\n __privateAdd$3(this, _client$2, void 0);\n __privateAdd$3(this, _httpRequest$3, void 0);\n __privateSet$3(this, _client$2, client);\n __privateSet$3(this, _httpRequest$3, httpRequest);\n }\n /**\n * Create a new dataset with the given name\n *\n * @param name - Name of the dataset to create\n * @param options - Options for the dataset\n */\n create(name, options) {\n return _modify(__privateGet$3(this, _client$2), __privateGet$3(this, _httpRequest$3), \"PUT\", name, options);\n }\n /**\n * Edit a dataset with the given name\n *\n * @param name - Name of the dataset to edit\n * @param options - New options for the dataset\n */\n edit(name, options) {\n return _modify(__privateGet$3(this, _client$2), __privateGet$3(this, _httpRequest$3), \"PATCH\", name, options);\n }\n /**\n * Delete a dataset with the given name\n *\n * @param name - Name of the dataset to delete\n */\n delete(name) {\n return _modify(__privateGet$3(this, _client$2), __privateGet$3(this, _httpRequest$3), \"DELETE\", name);\n }\n /**\n * Fetch a list of datasets for the configured project\n */\n list() {\n return _request(__privateGet$3(this, _client$2), __privateGet$3(this, _httpRequest$3), {\n uri: \"/datasets\"\n });\n }\n}\n_client$2 = new WeakMap();\n_httpRequest$3 = new WeakMap();\nclass DatasetsClient {\n constructor(client, httpRequest) {\n __privateAdd$3(this, _client2$2, void 0);\n __privateAdd$3(this, _httpRequest2$3, void 0);\n __privateSet$3(this, _client2$2, client);\n __privateSet$3(this, _httpRequest2$3, httpRequest);\n }\n /**\n * Create a new dataset with the given name\n *\n * @param name - Name of the dataset to create\n * @param options - Options for the dataset\n */\n create(name, options) {\n return lastValueFrom(_modify(__privateGet$3(this, _client2$2), __privateGet$3(this, _httpRequest2$3), \"PUT\", name, options));\n }\n /**\n * Edit a dataset with the given name\n *\n * @param name - Name of the dataset to edit\n * @param options - New options for the dataset\n */\n edit(name, options) {\n return lastValueFrom(_modify(__privateGet$3(this, _client2$2), __privateGet$3(this, _httpRequest2$3), \"PATCH\", name, options));\n }\n /**\n * Delete a dataset with the given name\n *\n * @param name - Name of the dataset to delete\n */\n delete(name) {\n return lastValueFrom(_modify(__privateGet$3(this, _client2$2), __privateGet$3(this, _httpRequest2$3), \"DELETE\", name));\n }\n /**\n * Fetch a list of datasets for the configured project\n */\n list() {\n return lastValueFrom(_request(__privateGet$3(this, _client2$2), __privateGet$3(this, _httpRequest2$3), {\n uri: \"/datasets\"\n }));\n }\n}\n_client2$2 = new WeakMap();\n_httpRequest2$3 = new WeakMap();\nfunction _modify(client, httpRequest, method, name, options) {\n dataset(name);\n return _request(client, httpRequest, {\n method,\n uri: \"/datasets/\".concat(name),\n body: options\n });\n}\nvar __accessCheck$2 = (obj, member, msg) => {\n if (!member.has(obj)) throw TypeError(\"Cannot \" + msg);\n};\nvar __privateGet$2 = (obj, member, getter) => {\n __accessCheck$2(obj, member, \"read from private field\");\n return getter ? getter.call(obj) : member.get(obj);\n};\nvar __privateAdd$2 = (obj, member, value) => {\n if (member.has(obj)) throw TypeError(\"Cannot add the same private member more than once\");\n member instanceof WeakSet ? member.add(obj) : member.set(obj, value);\n};\nvar __privateSet$2 = (obj, member, value, setter) => {\n __accessCheck$2(obj, member, \"write to private field\");\n setter ? setter.call(obj, value) : member.set(obj, value);\n return value;\n};\nvar _client$1, _httpRequest$2, _client2$1, _httpRequest2$2;\nclass ObservableProjectsClient {\n constructor(client, httpRequest) {\n __privateAdd$2(this, _client$1, void 0);\n __privateAdd$2(this, _httpRequest$2, void 0);\n __privateSet$2(this, _client$1, client);\n __privateSet$2(this, _httpRequest$2, httpRequest);\n }\n /**\n * Fetch a list of projects the authenticated user has access to\n */\n list() {\n return _request(__privateGet$2(this, _client$1), __privateGet$2(this, _httpRequest$2), {\n uri: \"/projects\"\n });\n }\n /**\n * Fetch a project by project ID\n *\n * @param projectId - ID of the project to fetch\n */\n getById(projectId) {\n return _request(__privateGet$2(this, _client$1), __privateGet$2(this, _httpRequest$2), {\n uri: \"/projects/\".concat(projectId)\n });\n }\n}\n_client$1 = new WeakMap();\n_httpRequest$2 = new WeakMap();\nclass ProjectsClient {\n constructor(client, httpRequest) {\n __privateAdd$2(this, _client2$1, void 0);\n __privateAdd$2(this, _httpRequest2$2, void 0);\n __privateSet$2(this, _client2$1, client);\n __privateSet$2(this, _httpRequest2$2, httpRequest);\n }\n /**\n * Fetch a list of projects the authenticated user has access to\n */\n list() {\n return lastValueFrom(_request(__privateGet$2(this, _client2$1), __privateGet$2(this, _httpRequest2$2), {\n uri: \"/projects\"\n }));\n }\n /**\n * Fetch a project by project ID\n *\n * @param projectId - ID of the project to fetch\n */\n getById(projectId) {\n return lastValueFrom(_request(__privateGet$2(this, _client2$1), __privateGet$2(this, _httpRequest2$2), {\n uri: \"/projects/\".concat(projectId)\n }));\n }\n}\n_client2$1 = new WeakMap();\n_httpRequest2$2 = new WeakMap();\nvar __accessCheck$1 = (obj, member, msg) => {\n if (!member.has(obj)) throw TypeError(\"Cannot \" + msg);\n};\nvar __privateGet$1 = (obj, member, getter) => {\n __accessCheck$1(obj, member, \"read from private field\");\n return getter ? getter.call(obj) : member.get(obj);\n};\nvar __privateAdd$1 = (obj, member, value) => {\n if (member.has(obj)) throw TypeError(\"Cannot add the same private member more than once\");\n member instanceof WeakSet ? member.add(obj) : member.set(obj, value);\n};\nvar __privateSet$1 = (obj, member, value, setter) => {\n __accessCheck$1(obj, member, \"write to private field\");\n setter ? setter.call(obj, value) : member.set(obj, value);\n return value;\n};\nvar _client, _httpRequest$1, _client2, _httpRequest2$1;\nclass ObservableUsersClient {\n constructor(client, httpRequest) {\n __privateAdd$1(this, _client, void 0);\n __privateAdd$1(this, _httpRequest$1, void 0);\n __privateSet$1(this, _client, client);\n __privateSet$1(this, _httpRequest$1, httpRequest);\n }\n /**\n * Fetch a user by user ID\n *\n * @param id - User ID of the user to fetch. If `me` is provided, a minimal response including the users role is returned.\n */\n getById(id) {\n return _request(__privateGet$1(this, _client), __privateGet$1(this, _httpRequest$1), {\n uri: \"/users/\".concat(id)\n });\n }\n}\n_client = new WeakMap();\n_httpRequest$1 = new WeakMap();\nclass UsersClient {\n constructor(client, httpRequest) {\n __privateAdd$1(this, _client2, void 0);\n __privateAdd$1(this, _httpRequest2$1, void 0);\n __privateSet$1(this, _client2, client);\n __privateSet$1(this, _httpRequest2$1, httpRequest);\n }\n /**\n * Fetch a user by user ID\n *\n * @param id - User ID of the user to fetch. If `me` is provided, a minimal response including the users role is returned.\n */\n getById(id) {\n return lastValueFrom(_request(__privateGet$1(this, _client2), __privateGet$1(this, _httpRequest2$1), {\n uri: \"/users/\".concat(id)\n }));\n }\n}\n_client2 = new WeakMap();\n_httpRequest2$1 = new WeakMap();\nvar __accessCheck = (obj, member, msg) => {\n if (!member.has(obj)) throw TypeError(\"Cannot \" + msg);\n};\nvar __privateGet = (obj, member, getter) => {\n __accessCheck(obj, member, \"read from private field\");\n return getter ? getter.call(obj) : member.get(obj);\n};\nvar __privateAdd = (obj, member, value) => {\n if (member.has(obj)) throw TypeError(\"Cannot add the same private member more than once\");\n member instanceof WeakSet ? member.add(obj) : member.set(obj, value);\n};\nvar __privateSet = (obj, member, value, setter) => {\n __accessCheck(obj, member, \"write to private field\");\n setter ? setter.call(obj, value) : member.set(obj, value);\n return value;\n};\nvar _clientConfig, _httpRequest, _clientConfig2, _httpRequest2;\nconst _ObservableSanityClient = class {\n constructor(httpRequest) {\n let config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultConfig;\n /**\n * Private properties\n */\n __privateAdd(this, _clientConfig, void 0);\n __privateAdd(this, _httpRequest, void 0);\n /**\n * Instance properties\n */\n this.listen = _listen;\n this.config(config);\n __privateSet(this, _httpRequest, httpRequest);\n this.assets = new ObservableAssetsClient(this, __privateGet(this, _httpRequest));\n this.datasets = new ObservableDatasetsClient(this, __privateGet(this, _httpRequest));\n this.projects = new ObservableProjectsClient(this, __privateGet(this, _httpRequest));\n this.users = new ObservableUsersClient(this, __privateGet(this, _httpRequest));\n }\n /**\n * Clone the client - returns a new instance\n */\n clone() {\n return new _ObservableSanityClient(__privateGet(this, _httpRequest), this.config());\n }\n config(newConfig) {\n if (newConfig === void 0) {\n return {\n ...__privateGet(this, _clientConfig)\n };\n }\n if (__privateGet(this, _clientConfig) && __privateGet(this, _clientConfig).allowReconfigure === false) {\n throw new Error(\"Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client\");\n }\n __privateSet(this, _clientConfig, initConfig(newConfig, __privateGet(this, _clientConfig) || {}));\n return this;\n }\n /**\n * Clone the client with a new (partial) configuration.\n *\n * @param newConfig - New client configuration properties, shallowly merged with existing configuration\n */\n withConfig(newConfig) {\n return new _ObservableSanityClient(__privateGet(this, _httpRequest), {\n ...this.config(),\n ...newConfig\n });\n }\n fetch(query, params) {\n let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n return _fetch(this, __privateGet(this, _httpRequest), query, params, options);\n }\n /**\n * Fetch a single document with the given ID.\n *\n * @param id - Document ID to fetch\n * @param options - Request options\n */\n getDocument(id, options) {\n return _getDocument(this, __privateGet(this, _httpRequest), id, options);\n }\n /**\n * Fetch multiple documents in one request.\n * Should be used sparingly - performing a query is usually a better option.\n * The order/position of documents is preserved based on the original array of IDs.\n * If any of the documents are missing, they will be replaced by a `null` entry in the returned array\n *\n * @param ids - Document IDs to fetch\n * @param options - Request options\n */\n getDocuments(ids, options) {\n return _getDocuments(this, __privateGet(this, _httpRequest), ids, options);\n }\n create(document, options) {\n return _create(this, __privateGet(this, _httpRequest), document, \"create\", options);\n }\n createIfNotExists(document, options) {\n return _createIfNotExists(this, __privateGet(this, _httpRequest), document, options);\n }\n createOrReplace(document, options) {\n return _createOrReplace(this, __privateGet(this, _httpRequest), document, options);\n }\n delete(selection, options) {\n return _delete(this, __privateGet(this, _httpRequest), selection, options);\n }\n mutate(operations, options) {\n return _mutate(this, __privateGet(this, _httpRequest), operations, options);\n }\n /**\n * Create a new buildable patch of operations to perform\n *\n * @param documentId - Document ID(s) to patch\n * @param operations - Optional object of patch operations to initialize the patch instance with\n */\n patch(documentId, operations) {\n return new ObservablePatch(documentId, operations, this);\n }\n /**\n * Create a new transaction of mutations\n *\n * @param operations - Optional array of mutation operations to initialize the transaction instance with\n */\n transaction(operations) {\n return new ObservableTransaction(operations, this);\n }\n /**\n * DEPRECATED: Perform an HTTP request against the Sanity API\n *\n * @deprecated Use your own request library!\n * @param options - Request options\n */\n request(options) {\n return _request(this, __privateGet(this, _httpRequest), options);\n }\n /**\n * Get a Sanity API URL for the URI provided\n *\n * @param uri - URI/path to build URL for\n * @param canUseCdn - Whether or not to allow using the API CDN for this route\n */\n getUrl(uri, canUseCdn) {\n return _getUrl(this, uri, canUseCdn);\n }\n /**\n * Get a Sanity API URL for the data operation and path provided\n *\n * @param operation - Data operation (eg `query`, `mutate`, `listen` or similar)\n * @param path - Path to append after the operation\n */\n getDataUrl(operation, path) {\n return _getDataUrl(this, operation, path);\n }\n};\nlet ObservableSanityClient = _ObservableSanityClient;\n_clientConfig = new WeakMap();\n_httpRequest = new WeakMap();\nconst _SanityClient = class {\n constructor(httpRequest) {\n let config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultConfig;\n /**\n * Private properties\n */\n __privateAdd(this, _clientConfig2, void 0);\n __privateAdd(this, _httpRequest2, void 0);\n /**\n * Instance properties\n */\n this.listen = _listen;\n this.config(config);\n __privateSet(this, _httpRequest2, httpRequest);\n this.assets = new AssetsClient(this, __privateGet(this, _httpRequest2));\n this.datasets = new DatasetsClient(this, __privateGet(this, _httpRequest2));\n this.projects = new ProjectsClient(this, __privateGet(this, _httpRequest2));\n this.users = new UsersClient(this, __privateGet(this, _httpRequest2));\n this.observable = new ObservableSanityClient(httpRequest, config);\n }\n /**\n * Clone the client - returns a new instance\n */\n clone() {\n return new _SanityClient(__privateGet(this, _httpRequest2), this.config());\n }\n config(newConfig) {\n if (newConfig === void 0) {\n return {\n ...__privateGet(this, _clientConfig2)\n };\n }\n if (__privateGet(this, _clientConfig2) && __privateGet(this, _clientConfig2).allowReconfigure === false) {\n throw new Error(\"Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client\");\n }\n if (this.observable) {\n this.observable.config(newConfig);\n }\n __privateSet(this, _clientConfig2, initConfig(newConfig, __privateGet(this, _clientConfig2) || {}));\n return this;\n }\n /**\n * Clone the client with a new (partial) configuration.\n *\n * @param newConfig - New client configuration properties, shallowly merged with existing configuration\n */\n withConfig(newConfig) {\n return new _SanityClient(__privateGet(this, _httpRequest2), {\n ...this.config(),\n ...newConfig\n });\n }\n fetch(query, params) {\n let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n return lastValueFrom(_fetch(this, __privateGet(this, _httpRequest2), query, params, options));\n }\n /**\n * Fetch a single document with the given ID.\n *\n * @param id - Document ID to fetch\n * @param options - Request options\n */\n getDocument(id, options) {\n return lastValueFrom(_getDocument(this, __privateGet(this, _httpRequest2), id, options));\n }\n /**\n * Fetch multiple documents in one request.\n * Should be used sparingly - performing a query is usually a better option.\n * The order/position of documents is preserved based on the original array of IDs.\n * If any of the documents are missing, they will be replaced by a `null` entry in the returned array\n *\n * @param ids - Document IDs to fetch\n * @param options - Request options\n */\n getDocuments(ids, options) {\n return lastValueFrom(_getDocuments(this, __privateGet(this, _httpRequest2), ids, options));\n }\n create(document, options) {\n return lastValueFrom(_create(this, __privateGet(this, _httpRequest2), document, \"create\", options));\n }\n createIfNotExists(document, options) {\n return lastValueFrom(_createIfNotExists(this, __privateGet(this, _httpRequest2), document, options));\n }\n createOrReplace(document, options) {\n return lastValueFrom(_createOrReplace(this, __privateGet(this, _httpRequest2), document, options));\n }\n delete(selection, options) {\n return lastValueFrom(_delete(this, __privateGet(this, _httpRequest2), selection, options));\n }\n mutate(operations, options) {\n return lastValueFrom(_mutate(this, __privateGet(this, _httpRequest2), operations, options));\n }\n /**\n * Create a new buildable patch of operations to perform\n *\n * @param documentId - Document ID(s)to patch\n * @param operations - Optional object of patch operations to initialize the patch instance with\n */\n patch(documentId, operations) {\n return new Patch(documentId, operations, this);\n }\n /**\n * Create a new transaction of mutations\n *\n * @param operations - Optional array of mutation operations to initialize the transaction instance with\n */\n transaction(operations) {\n return new Transaction(operations, this);\n }\n /**\n * DEPRECATED: Perform an HTTP request against the Sanity API\n *\n * @deprecated Use your own request library!\n * @param options - Request options\n */\n request(options) {\n return lastValueFrom(_request(this, __privateGet(this, _httpRequest2), options));\n }\n /**\n * DEPRECATED: Perform an HTTP request a `/data` sub-endpoint\n *\n * @deprecated Use your own request library!\n * @param endpoint - Endpoint to hit (mutate, query etc)\n * @param body - Request body\n * @param options - Request options\n */\n dataRequest(endpoint, body, options) {\n return lastValueFrom(_dataRequest(this, __privateGet(this, _httpRequest2), endpoint, body, options));\n }\n /**\n * Get a Sanity API URL for the URI provided\n *\n * @param uri - URI/path to build URL for\n * @param canUseCdn - Whether or not to allow using the API CDN for this route\n */\n getUrl(uri, canUseCdn) {\n return _getUrl(this, uri, canUseCdn);\n }\n /**\n * Get a Sanity API URL for the data operation and path provided\n *\n * @param operation - Data operation (eg `query`, `mutate`, `listen` or similar)\n * @param path - Path to append after the operation\n */\n getDataUrl(operation, path) {\n return _getDataUrl(this, operation, path);\n }\n};\nlet SanityClient = _SanityClient;\n_clientConfig2 = new WeakMap();\n_httpRequest2 = new WeakMap();\nconst httpRequest = defineHttpRequest(envMiddleware);\nconst requester = httpRequest.defaultRequester;\nconst createClient = config => new SanityClient(httpRequest, config);\nfunction deprecatedCreateClient(config) {\n printNoDefaultExport();\n return new SanityClient(httpRequest, config);\n}\nexport { BasePatch, BaseTransaction, ClientError, ObservablePatch, ObservableSanityClient, ObservableTransaction, Patch, SanityClient, ServerError, Transaction, createClient, deprecatedCreateClient as default, requester };\n//# sourceMappingURL=index.browser.js.map\n","export default function _taggedTemplateLiteral(strings, raw) {\n if (!raw) {\n raw = strings.slice(0);\n }\n\n return Object.freeze(Object.defineProperties(strings, {\n raw: {\n value: Object.freeze(raw)\n }\n }));\n}\n"],"names":["module","exports","_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","_unsupportedIterableToArray","o","minLen","_arrayLikeToArray","n","toString","slice","constructor","name","Array","from","test","arr","len","arr2","_createForOfIteratorHelperLoose","allowArrayLike","it","Symbol","iterator","next","bind","isArray","done","value","TypeError","example","parseAssetId","ref","_ref$split","split","id","dimensionString","format","Error","_dimensionString$spli","width","height","isFinite","isRef","src","_ref","isAsset","_id","isAssetStub","asset","url","parseSource","image","isUrl","urlToId","img","crop","hotspot","applyDefaults","replace","result","left","top","bottom","right","x","y","SPEC_NAME_TO_URL_NAME_MAPPINGS","urlForImage","options","spec","JSON","stringify","cropLeft","Math","round","cropTop","hotSpotVerticalRadius","hotSpotHorizontalRadius","hotSpotCenterX","hotSpotCenterY","rect","focalPoint","ignoreImageParams","fit","specToImageUrl","cdnUrl","baseUrl","filename","projectId","dataset","params","_spec$rect","push","bg","flip","flipHorizontal","flipVertical","filter","Boolean","join","forEach","mapping","specName","param","encodeURIComponent","cropRect","imgWidth","imgHeight","desiredAspectRatio","max","hotspotXCenter","_width","_height","_left","hotspotYCenter","_top","validFits","validCrops","validAutoModes","isSanityModernClientLike","client","config","isSanityClientLike","clientConfig","rewriteSpecName","_step","_iterator","entry","urlBuilder","_options$config","apiUrl","apiHost","ImageUrlBuilder","_client$clientConfig","_apiUrl","_projectId","_dataset","parent","_proto","withOptions","newOptions","_dataset2","_projectId2","_bg","dpr","_dpr","maxWidth","_maxWidth","minWidth","_minWidth","maxHeight","_maxHeight","minHeight","_minHeight","size","blur","_blur","sharpen","_sharpen","_format","invert","_invert","orientation","_orientation","quality","_quality","forceDownload","download","indexOf","saturation","_saturation","auto","pad","_pad","factory","groq","strings","_len","keys","_key","lastIndex","reduce","acc","str","trim","string","headers","arg","headersArr","row","index","toLowerCase","defaultOptions","timeout","navigator","product","processOptions","opts","searchParams","URL","normalizeTimeout","query","entries","v","append","search","method","body","toUpperCase","time","connect","socket","delay","Number","isNaN","validUrl","validateOptions","channelNames","middlehooks","createRequester","initMiddleware","httpRequest","loadedMiddleware","middleware","ware","request","channels","subscribers","create","nextId","publish","event","subscribe","subscriber","createPubSub","applyMiddleware","hook","defaultValue","args","bailEarly","handler","middlewareReducer","context","ongoingRequest","unsubscribe","ctx","err","res","reqErr","error","response","onResponse","abort","returnValue","use","newMiddleware","onReturn","clone","_method","_url","_resHeaders","_headers","_controller","_init","_useAbortSignal","__accessCheck","obj","member","msg","has","__privateGet","getter","get","__privateAdd","WeakSet","add","set","__privateSet","setter","FetchXhr","readyState","responseType","open","_async","onreadystatechange","getAllResponseHeaders","setRequestHeader","setInit","init","useAbortSignal","send","textBody","AbortController","EventTarget","signal","document","credentials","withCredentials","fetch","then","status","statusText","text","arrayBuffer","resBody","responseText","catch","_a","onerror","onabort","WeakMap","adapter","XMLHttpRequest","XmlHttpRequest","httpRequester","callback","timers","injectedResponse","cbTimer","setTimeout","clearTimeout","xhr","delays","aborted","loaded","timedOut","onError","lengthComputable","total","ontimeout","stopTimers","timeoutRequest","statusCode","statusMessage","onLoad","rawBody","code","force","isNetworkError","isObject","isBuffer","Buffer","serializeTypes","jsonRequest","pipe","ctor","prot","undefined","jsonResponse","contentType","shouldDecode","tryParse","Accept","parse","message","actualGlobal","globalThis","window","global","self","global$1","observable","Observable","implementation","observer","progress","type","complete","promise","PromiseImplementation","Promise","resolve","reject","cancel","cancelToken","reason","onlyBody","Cancel","__CANCEL__","_CancelToken","executor","resolvePromise","token","can","CancelToken","isCancel","defaultShouldRetry","attempt","getRetryDelay","attemptNum","pow","random","maxRetries","retryDelay","allowRetry","shouldRetry","attemptNumber","stream","newContext","sharedRetry","agent2","isFunction","createErrorClass","createImpl","ctorFunc","instance","stack","UnsubscriptionError","_super","errors","map","arrRemove","item","splice","Subscription","initialTeardown","closed","_parentage","_finalizers","e_1","e_2","_b","_parentage_1","__values","_parentage_1_1","remove","e_1_1","return","initialFinalizer","e","_finalizers_1","_finalizers_1_1","finalizer","execFinalizer","__spreadArray","__read","e_2_1","teardown","_hasParent","_addParent","includes","_removeParent","EMPTY","empty","isSubscription","onUnhandledError","onStoppedNotification","useDeprecatedSynchronousErrorHandling","useDeprecatedNextContext","timeoutProvider","_i","delegate","handle","noop","COMPLETE_NOTIFICATION","createNotification","kind","Subscriber","destination","_this","isStopped","EMPTY_OBSERVER","__extends","SafeSubscriber","handleStoppedNotification","nextNotification","_next","_error","_complete","_bind","Function","fn","thisArg","ConsumerObserver","partialObserver","handleUnhandledError","observerOrNext","context_1","errorThrown","reportUnhandledError","notification","identity","pipeFromArray","fns","input","prev","_subscribe","lift","operator","isObserver","cb","isRoot","errorContext","_trySubscribe","sink","promiseCtor","getPromiseCtor","operations","toPromise","EmptyError","lastValueFrom","hasConfig","_value","_hasValue","operate","hasLift","liftedSource","createOperatorSubscriber","onNext","onComplete","onFinalize","OperatorSubscriber","shouldUnsubscribe","closed_1","project","predicate","ClientError","props","extractErrorProps","super","ServerError","responseBody","details","concat","description","isMutationError","allItems","items","itemsStr","httpErrorMessage","httpError","printWarnings","warn","console","projectHeader","getSelection","sel","selectionOpts","VALID_ASSET_TYPES","VALID_INSERT_LOCATIONS","validateAssetType","validateObject","op","val","validateDocumentId","requireDocumentId","doc","hasDataset","requestTag","tag","encodeQueryString","URLSearchParams","_client$5","_client2$5","__accessCheck$6","__privateGet$6","__privateAdd$6","__privateSet$6","BasePatch","selection","attrs","_assign","setIfMissing","diffMatchPatch","unset","inc","dec","insert","at","selector","signature","valid","loc","validateInsert","prepend","start","deleteCount","startIndex","delCount","delRange","rangeSelector","ifRevisionId","rev","ifRevisionID","serialize","toJSON","reset","merge","_set","_ObservablePatch","commit","returnFirst","returnDocuments","mutate","patch","ObservablePatch","_Patch","Patch","_client$4","_client2$4","__accessCheck$5","__privateGet$5","__privateAdd$5","__privateSet$5","defaultMutateOptions","BaseTransaction","transactionId","trxId","_add","createIfNotExists","createOrReplace","delete","documentId","mut","_Transaction","patchOrDocumentId","patchOps","isBuilder","Transaction","_ObservableTransaction","ObservableTransaction","excludeFalsey","defValue","getMutationQuery","dryRun","returnIds","visibility","autoGenerateArrayKeys","skipCrossDatasetReferenceValidation","isResponse","getBody","indexBy","docs","attr","indexed","_fetch","mapResponse","filterResponse","_dataRequest","_getDocument","uri","_getDataUrl","json","_requestObservable","documents","_getDocuments","ids","_createIfNotExists","_create","_createOrReplace","_delete","mutations","_mutate","endpoint","isMutation","isQuery","strQuery","useGet","stringQuery","reqOptions","canUseCdn","results","mutation","useCdn","requestTagPrefix","overrides","Authorization","useGlobalApi","useProjectHostname","proxy","requestOptions","_getUrl","requester","isDomExceptionSupported","DOMException","_createAbortError","subscription","addEventListener","removeEventListener","_request","operation","path","catalog","baseUri","base","_client$3","_httpRequest$4","_client2$3","_httpRequest2$4","__accessCheck$4","__privateGet$4","__privateAdd$4","__privateSet$4","ObservableAssetsClient","upload","assetType","_upload","AssetsClient","meta","extract","assetEndpoint","optionsFromFile","label","title","creditLine","sourceId","sourceName","sourceUrl","file","File","preserveFilename","generateHelpUrl","slug","createWarningPrinter","didCall","once","printCdnWarning","printBrowserTokenWarning","printNoApiVersionSpecifiedWarning","defaultConfig","apiVersion","LOCALHOSTS","initConfig","prevConfig","specifiedConfig","newConfig","projectBased","helpUrl","isBrowser","location","hostname","isLocalhost","host","isLocal","ignoreBrowserTokenWarning","isDefaultApi","apiDate","Date","getTime","validateApiVersion","hostParts","protocol","cdnHost","defaults","prop","pick","possibleOptions","includeResult","_listen","listenOpts","qs","listenFor","events","shouldEmitReconnect","esOptions","es","reconnectTimer","getEventSource","eventSource","stop","stopped","CLOSED","onChannelError","cooerceError","onMessage","evt","parseEvent","onDisconnect","close","async","default","EventSource","evs","data","extractErrorMessage","_client$2","_httpRequest$3","_client2$2","_httpRequest2$3","__accessCheck$3","__privateGet$3","__privateAdd$3","__privateSet$3","ObservableDatasetsClient","_modify","edit","list","DatasetsClient","_client$1","_httpRequest$2","_client2$1","_httpRequest2$2","__accessCheck$2","__privateGet$2","__privateAdd$2","__privateSet$2","ObservableProjectsClient","getById","ProjectsClient","_client","_httpRequest$1","_client2","_httpRequest2$1","__accessCheck$1","__privateGet$1","__privateAdd$1","__privateSet$1","ObservableUsersClient","UsersClient","_clientConfig","_httpRequest","_clientConfig2","_httpRequest2","_ObservableSanityClient","listen","assets","datasets","projects","users","allowReconfigure","withConfig","getDocument","getDocuments","transaction","getUrl","getDataUrl","ObservableSanityClient","_SanityClient","dataRequest","SanityClient","envMiddleware","getIt","onRequest","handleProgress","stage","percent","onprogress","maxRedirects","defaultRequester","defineHttpRequest","createClient","_taggedTemplateLiteral","raw","freeze","defineProperties"],"sourceRoot":""}