@sanity/cli 3.36.4 → 3.36.5-canary.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/lib/_chunks-cjs/cli.js +1779 -1317
  2. package/lib/_chunks-cjs/cli.js.map +1 -1
  3. package/lib/_chunks-cjs/journeyConfig.js +11 -11
  4. package/lib/_chunks-cjs/journeyConfig.js.map +1 -1
  5. package/lib/_chunks-cjs/loadEnv.js +105 -2719
  6. package/lib/_chunks-cjs/loadEnv.js.map +1 -1
  7. package/lib/cli.d.ts +10 -0
  8. package/lib/index.d.ts +448 -0
  9. package/lib/index.esm.js +449 -5
  10. package/lib/index.esm.js.map +1 -1
  11. package/lib/index.js +3 -3
  12. package/lib/index.js.map +1 -1
  13. package/lib/index.mjs +452 -0
  14. package/lib/index.mjs.map +1 -0
  15. package/lib/run.d.ts +1 -0
  16. package/lib/workers/getAndWriteJourneySchema.d.ts +1 -0
  17. package/lib/workers/getCliConfig.d.ts +1 -0
  18. package/lib/workers/typegenGenerate.d.ts +37 -0
  19. package/lib/workers/typegenGenerate.js +6 -2
  20. package/lib/workers/typegenGenerate.js.map +1 -1
  21. package/package.json +18 -21
  22. package/src/actions/init-project/templates/shopify.ts +7 -0
  23. package/src/util/journeyConfig.ts +5 -5
  24. package/templates/ecommerce/plugins/barcode-input/BarcodeInput.js +1 -1
  25. package/templates/get-started/plugins/sanity-plugin-tutorial/GetStartedTutorial.tsx +1 -1
  26. package/templates/shared/tsconfig.json +2 -4
  27. package/templates/shopify/README.md +3 -3
  28. package/templates/shopify/components/hotspots/ProductTooltip.tsx +1 -1
  29. package/templates/shopify/components/icons/Shopify.tsx +1 -1
  30. package/templates/shopify/components/inputs/CollectionHidden.tsx +1 -1
  31. package/templates/shopify/components/media/ColorTheme.tsx +1 -1
  32. package/templates/shopify/components/studio/Navbar.tsx +29 -0
  33. package/templates/shopify/constants.ts +31 -1
  34. package/templates/shopify/docs/features.md +6 -7
  35. package/templates/shopify/schemaTypes/documents/collection.tsx +11 -47
  36. package/templates/shopify/schemaTypes/documents/colorTheme.tsx +2 -17
  37. package/templates/shopify/schemaTypes/documents/page.ts +10 -37
  38. package/templates/shopify/schemaTypes/documents/product.tsx +4 -27
  39. package/templates/shopify/schemaTypes/documents/productVariant.tsx +4 -13
  40. package/templates/shopify/schemaTypes/index.ts +97 -126
  41. package/templates/shopify/schemaTypes/objects/collection/{group.ts → collectionGroupType.ts} +7 -10
  42. package/templates/shopify/schemaTypes/objects/collection/{links.ts → collectionLinksType.ts} +4 -4
  43. package/templates/shopify/schemaTypes/objects/customProductOption/{colorObject.tsx → customProductOptionColorObjectType.tsx} +3 -6
  44. package/templates/shopify/schemaTypes/objects/customProductOption/{color.tsx → customProductOptionColorType.tsx} +2 -10
  45. package/templates/shopify/schemaTypes/objects/customProductOption/{sizeObject.ts → customProductOptionSizeObjectType.ts} +3 -7
  46. package/templates/shopify/schemaTypes/objects/customProductOption/{size.ts → customProductOptionSizeType.ts} +3 -12
  47. package/templates/shopify/schemaTypes/objects/global/footerType.ts +22 -0
  48. package/templates/shopify/schemaTypes/objects/global/menuLinksType.ts +21 -0
  49. package/templates/shopify/schemaTypes/objects/global/{menu.ts → menuType.ts} +2 -4
  50. package/templates/shopify/schemaTypes/objects/global/{notFoundPage.ts → notFoundPageType.ts} +1 -6
  51. package/templates/shopify/schemaTypes/objects/hotspot/{imageWithProductHotspots.ts → imageWithProductHotspotsType.ts} +4 -6
  52. package/templates/shopify/schemaTypes/objects/hotspot/{productHotspots.tsx → productHotspotsType.tsx} +3 -5
  53. package/templates/shopify/schemaTypes/objects/hotspot/{spot.tsx → spotType.tsx} +1 -3
  54. package/templates/shopify/schemaTypes/{annotations/linkEmail.tsx → objects/link/linkEmailType.tsx} +5 -13
  55. package/templates/shopify/schemaTypes/{annotations/linkExternal.tsx → objects/link/linkExternalType.tsx} +6 -13
  56. package/templates/shopify/schemaTypes/{annotations/linkInternal.tsx → objects/link/linkInternalType.tsx} +5 -12
  57. package/templates/shopify/schemaTypes/{annotations/product.tsx → objects/link/linkProductType.tsx} +4 -16
  58. package/templates/shopify/schemaTypes/objects/module/{accordionGroup.ts → accordionGroupType.ts} +6 -9
  59. package/templates/shopify/schemaTypes/objects/module/{accordion.ts → accordionType.ts} +4 -11
  60. package/templates/shopify/schemaTypes/objects/module/{callToAction.tsx → callToActionType.tsx} +10 -23
  61. package/templates/shopify/schemaTypes/objects/module/{callout.ts → calloutType.ts} +4 -10
  62. package/templates/shopify/schemaTypes/objects/module/{collection.tsx → collectionReferenceType.tsx} +4 -9
  63. package/templates/shopify/schemaTypes/objects/module/gridItemType.ts +41 -0
  64. package/templates/shopify/schemaTypes/objects/module/{grid.ts → gridType.ts} +7 -15
  65. package/templates/shopify/schemaTypes/objects/{hero/home.tsx → module/heroType.tsx} +14 -17
  66. package/templates/shopify/schemaTypes/objects/module/{imageCallToAction.tsx → imageCallToActionType.tsx} +6 -10
  67. package/templates/shopify/schemaTypes/objects/module/{image.ts → imageFeatureType.ts} +6 -18
  68. package/templates/shopify/schemaTypes/objects/module/{images.tsx → imageFeaturesType.tsx} +7 -25
  69. package/templates/shopify/schemaTypes/objects/module/{instagram.ts → instagramType.ts} +2 -2
  70. package/templates/shopify/schemaTypes/objects/module/{products.tsx → productFeaturesType.tsx} +6 -11
  71. package/templates/shopify/schemaTypes/objects/module/{product.tsx → productReferenceType.tsx} +6 -8
  72. package/templates/shopify/schemaTypes/objects/{seo/seo.ts → seoType.ts} +7 -6
  73. package/templates/shopify/schemaTypes/objects/shopify/{shopifyCollectionRule.tsx → collectionRuleType.tsx} +2 -10
  74. package/templates/shopify/schemaTypes/objects/shopify/{inventory.ts → inventoryType.ts} +7 -12
  75. package/templates/shopify/schemaTypes/objects/shopify/{option.tsx → optionType.tsx} +6 -12
  76. package/templates/shopify/schemaTypes/objects/shopify/{placeholderString.ts → placeholderStringType.ts} +3 -1
  77. package/templates/shopify/schemaTypes/objects/shopify/{priceRange.ts → priceRangeType.ts} +5 -7
  78. package/templates/shopify/schemaTypes/objects/shopify/{productWithVariant.tsx → productWithVariantType.tsx} +2 -2
  79. package/templates/shopify/schemaTypes/objects/shopify/{proxyString.ts → proxyStringType.ts} +1 -1
  80. package/templates/shopify/schemaTypes/objects/shopify/{shopifyCollection.ts → shopifyCollectionType.ts} +4 -25
  81. package/templates/shopify/schemaTypes/objects/shopify/{shopifyProduct.ts → shopifyProductType.ts} +5 -35
  82. package/templates/shopify/schemaTypes/objects/shopify/{shopifyProductVariant.ts → shopifyProductVariantType.ts} +1 -27
  83. package/templates/shopify/schemaTypes/portableText/portableTextSimpleType.tsx +45 -0
  84. package/templates/shopify/schemaTypes/portableText/portableTextType.tsx +52 -0
  85. package/templates/shopify/schemaTypes/singletons/homeType.ts +49 -0
  86. package/templates/shopify/schemaTypes/singletons/{settings.ts → settingsType.ts} +7 -9
  87. package/templates/shopify/utils/shopifyUrls.ts +3 -3
  88. package/templates/shopify/utils/validateSlug.ts +3 -7
  89. package/lib/_chunks-cjs/index.js +0 -547
  90. package/lib/_chunks-cjs/index.js.map +0 -1
  91. package/lib/_chunks-cjs/node.js +0 -213
  92. package/lib/_chunks-cjs/node.js.map +0 -1
  93. package/lib/_chunks-cjs/stegaEncodeSourceMap.js +0 -357
  94. package/lib/_chunks-cjs/stegaEncodeSourceMap.js.map +0 -1
  95. package/lib/_chunks-es/index.js +0 -3336
  96. package/lib/_chunks-es/index.js.map +0 -1
  97. package/lib/_chunks-es/node.js +0 -216
  98. package/lib/_chunks-es/node.js.map +0 -1
  99. package/lib/_chunks-es/stegaEncodeSourceMap.js +0 -358
  100. package/lib/_chunks-es/stegaEncodeSourceMap.js.map +0 -1
  101. package/lib/index.cjs.mjs +0 -7
  102. package/templates/shopify/schemaTypes/blocks/body.tsx +0 -70
  103. package/templates/shopify/schemaTypes/objects/global/footer.ts +0 -57
  104. package/templates/shopify/schemaTypes/objects/global/linkExternal.ts +0 -52
  105. package/templates/shopify/schemaTypes/objects/global/linkInternal.ts +0 -65
  106. package/templates/shopify/schemaTypes/objects/global/links.ts +0 -16
  107. package/templates/shopify/schemaTypes/objects/hero/collection.tsx +0 -42
  108. package/templates/shopify/schemaTypes/objects/hero/page.tsx +0 -35
  109. package/templates/shopify/schemaTypes/objects/module/accordionBody.ts +0 -45
  110. package/templates/shopify/schemaTypes/objects/module/gridItem.ts +0 -91
  111. package/templates/shopify/schemaTypes/objects/seo/description.tsx +0 -10
  112. package/templates/shopify/schemaTypes/objects/seo/home.tsx +0 -31
  113. package/templates/shopify/schemaTypes/objects/seo/page.tsx +0 -37
  114. package/templates/shopify/schemaTypes/objects/seo/shopify.tsx +0 -40
  115. package/templates/shopify/schemaTypes/singletons/home.ts +0 -62
  116. /package/lib/{dts/src/index.d.ts → index.d.mts} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.mjs","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/isFunction.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/Subscription.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/config.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/noop.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/errorContext.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/Subscriber.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/symbol/observable.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/identity.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/pipe.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/Observable.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/lift.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/args.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/isPromise.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/isInteropObservable.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/throwUnobservableError.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/symbol/iterator.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/isIterable.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/observeOn.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduled/schedulePromise.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleArray.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduled/scheduled.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/from.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/EmptyError.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/lastValueFrom.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/map.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/combineLatest.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/argsOrArgArray.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/filter.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/combineLatest.js","../../../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/combineLatestWith.js","../../../../../node_modules/.pnpm/@sanity+client@6.15.7/node_modules/@sanity/client/dist/_chunks-es/nodeMiddleware.js","../../../../../node_modules/.pnpm/@sanity+client@6.15.7/node_modules/@sanity/client/dist/index.js","../../src/util/dynamicRequire.ts","../../src/util/getCliConfig.ts","../../../../../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js","../../../../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/common.js","../../../../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/browser.js","../../../../../node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js","../../../../../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js","../../../../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/node.js","../../../../../node_modules/.pnpm/debug@4.3.4_supports-color@5.5.0/node_modules/debug/src/index.js","../../src/debug.ts","../../src/util/resolveRootDir.ts","../../src/cliClient.ts","../../src/config.ts","../../../../../node_modules/.pnpm/dotenv@16.3.2/node_modules/dotenv/lib/main.js","../../../../../node_modules/.pnpm/dotenv-expand@9.0.0/node_modules/dotenv-expand/lib/main.js","../../src/util/loadEnv.ts"],"sourcesContent":["/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n function next() {\n while (env.stack.length) {\n var rec = env.stack.pop();\n try {\n var result = rec.dispose && rec.dispose.call(rec.value);\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n catch (e) {\n fail(e);\n }\n }\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\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","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 function noop() { }\n//# sourceMappingURL=noop.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","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 { 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 { isFunction } from './isFunction';\nimport { isScheduler } from './isScheduler';\nfunction last(arr) {\n return arr[arr.length - 1];\n}\nexport function popResultSelector(args) {\n return isFunction(last(args)) ? args.pop() : undefined;\n}\nexport function popScheduler(args) {\n return isScheduler(last(args)) ? args.pop() : undefined;\n}\nexport function popNumber(args, defaultValue) {\n return typeof last(args) === 'number' ? args.pop() : defaultValue;\n}\n//# sourceMappingURL=args.js.map","export var isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; });\n//# sourceMappingURL=isArrayLike.js.map","import { isFunction } from \"./isFunction\";\nexport function isPromise(value) {\n return isFunction(value === null || value === void 0 ? void 0 : value.then);\n}\n//# sourceMappingURL=isPromise.js.map","import { observable as Symbol_observable } from '../symbol/observable';\nimport { isFunction } from './isFunction';\nexport function isInteropObservable(input) {\n return isFunction(input[Symbol_observable]);\n}\n//# sourceMappingURL=isInteropObservable.js.map","import { isFunction } from './isFunction';\nexport function isAsyncIterable(obj) {\n return Symbol.asyncIterator && isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]);\n}\n//# sourceMappingURL=isAsyncIterable.js.map","export function createInvalidObservableTypeError(input) {\n return new TypeError(\"You provided \" + (input !== null && typeof input === 'object' ? 'an invalid object' : \"'\" + input + \"'\") + \" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.\");\n}\n//# sourceMappingURL=throwUnobservableError.js.map","export function getSymbolIterator() {\n if (typeof Symbol !== 'function' || !Symbol.iterator) {\n return '@@iterator';\n }\n return Symbol.iterator;\n}\nexport var iterator = getSymbolIterator();\n//# sourceMappingURL=iterator.js.map","import { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from './isFunction';\nexport function isIterable(input) {\n return isFunction(input === null || input === void 0 ? void 0 : input[Symbol_iterator]);\n}\n//# sourceMappingURL=isIterable.js.map","import { __asyncGenerator, __await, __generator } from \"tslib\";\nimport { isFunction } from './isFunction';\nexport function readableStreamLikeToAsyncGenerator(readableStream) {\n return __asyncGenerator(this, arguments, function readableStreamLikeToAsyncGenerator_1() {\n var reader, _a, value, done;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n reader = readableStream.getReader();\n _b.label = 1;\n case 1:\n _b.trys.push([1, , 9, 10]);\n _b.label = 2;\n case 2:\n if (!true) return [3, 8];\n return [4, __await(reader.read())];\n case 3:\n _a = _b.sent(), value = _a.value, done = _a.done;\n if (!done) return [3, 5];\n return [4, __await(void 0)];\n case 4: return [2, _b.sent()];\n case 5: return [4, __await(value)];\n case 6: return [4, _b.sent()];\n case 7:\n _b.sent();\n return [3, 2];\n case 8: return [3, 10];\n case 9:\n reader.releaseLock();\n return [7];\n case 10: return [2];\n }\n });\n });\n}\nexport function isReadableStreamLike(obj) {\n return isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader);\n}\n//# sourceMappingURL=isReadableStreamLike.js.map","import { __asyncValues, __awaiter, __generator, __values } from \"tslib\";\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isPromise } from '../util/isPromise';\nimport { Observable } from '../Observable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isAsyncIterable } from '../util/isAsyncIterable';\nimport { createInvalidObservableTypeError } from '../util/throwUnobservableError';\nimport { isIterable } from '../util/isIterable';\nimport { isReadableStreamLike, readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike';\nimport { isFunction } from '../util/isFunction';\nimport { reportUnhandledError } from '../util/reportUnhandledError';\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport function innerFrom(input) {\n if (input instanceof Observable) {\n return input;\n }\n if (input != null) {\n if (isInteropObservable(input)) {\n return fromInteropObservable(input);\n }\n if (isArrayLike(input)) {\n return fromArrayLike(input);\n }\n if (isPromise(input)) {\n return fromPromise(input);\n }\n if (isAsyncIterable(input)) {\n return fromAsyncIterable(input);\n }\n if (isIterable(input)) {\n return fromIterable(input);\n }\n if (isReadableStreamLike(input)) {\n return fromReadableStreamLike(input);\n }\n }\n throw createInvalidObservableTypeError(input);\n}\nexport function fromInteropObservable(obj) {\n return new Observable(function (subscriber) {\n var obs = obj[Symbol_observable]();\n if (isFunction(obs.subscribe)) {\n return obs.subscribe(subscriber);\n }\n throw new TypeError('Provided object does not correctly implement Symbol.observable');\n });\n}\nexport function fromArrayLike(array) {\n return new Observable(function (subscriber) {\n for (var i = 0; i < array.length && !subscriber.closed; i++) {\n subscriber.next(array[i]);\n }\n subscriber.complete();\n });\n}\nexport function fromPromise(promise) {\n return new Observable(function (subscriber) {\n promise\n .then(function (value) {\n if (!subscriber.closed) {\n subscriber.next(value);\n subscriber.complete();\n }\n }, function (err) { return subscriber.error(err); })\n .then(null, reportUnhandledError);\n });\n}\nexport function fromIterable(iterable) {\n return new Observable(function (subscriber) {\n var e_1, _a;\n try {\n for (var iterable_1 = __values(iterable), iterable_1_1 = iterable_1.next(); !iterable_1_1.done; iterable_1_1 = iterable_1.next()) {\n var value = iterable_1_1.value;\n subscriber.next(value);\n if (subscriber.closed) {\n return;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (iterable_1_1 && !iterable_1_1.done && (_a = iterable_1.return)) _a.call(iterable_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n subscriber.complete();\n });\n}\nexport function fromAsyncIterable(asyncIterable) {\n return new Observable(function (subscriber) {\n process(asyncIterable, subscriber).catch(function (err) { return subscriber.error(err); });\n });\n}\nexport function fromReadableStreamLike(readableStream) {\n return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream));\n}\nfunction process(asyncIterable, subscriber) {\n var asyncIterable_1, asyncIterable_1_1;\n var e_2, _a;\n return __awaiter(this, void 0, void 0, function () {\n var value, e_2_1;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n _b.trys.push([0, 5, 6, 11]);\n asyncIterable_1 = __asyncValues(asyncIterable);\n _b.label = 1;\n case 1: return [4, asyncIterable_1.next()];\n case 2:\n if (!(asyncIterable_1_1 = _b.sent(), !asyncIterable_1_1.done)) return [3, 4];\n value = asyncIterable_1_1.value;\n subscriber.next(value);\n if (subscriber.closed) {\n return [2];\n }\n _b.label = 3;\n case 3: return [3, 1];\n case 4: return [3, 11];\n case 5:\n e_2_1 = _b.sent();\n e_2 = { error: e_2_1 };\n return [3, 11];\n case 6:\n _b.trys.push([6, , 9, 10]);\n if (!(asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return))) return [3, 8];\n return [4, _a.call(asyncIterable_1)];\n case 7:\n _b.sent();\n _b.label = 8;\n case 8: return [3, 10];\n case 9:\n if (e_2) throw e_2.error;\n return [7];\n case 10: return [7];\n case 11:\n subscriber.complete();\n return [2];\n }\n });\n });\n}\n//# sourceMappingURL=innerFrom.js.map","export function executeSchedule(parentSubscription, scheduler, work, delay, repeat) {\n if (delay === void 0) { delay = 0; }\n if (repeat === void 0) { repeat = false; }\n var scheduleSubscription = scheduler.schedule(function () {\n work();\n if (repeat) {\n parentSubscription.add(this.schedule(null, delay));\n }\n else {\n this.unsubscribe();\n }\n }, delay);\n parentSubscription.add(scheduleSubscription);\n if (!repeat) {\n return scheduleSubscription;\n }\n}\n//# sourceMappingURL=executeSchedule.js.map","import { executeSchedule } from '../util/executeSchedule';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function observeOn(scheduler, delay) {\n if (delay === void 0) { delay = 0; }\n return operate(function (source, subscriber) {\n source.subscribe(createOperatorSubscriber(subscriber, function (value) { return executeSchedule(subscriber, scheduler, function () { return subscriber.next(value); }, delay); }, function () { return executeSchedule(subscriber, scheduler, function () { return subscriber.complete(); }, delay); }, function (err) { return executeSchedule(subscriber, scheduler, function () { return subscriber.error(err); }, delay); }));\n });\n}\n//# sourceMappingURL=observeOn.js.map","import { operate } from '../util/lift';\nexport function subscribeOn(scheduler, delay) {\n if (delay === void 0) { delay = 0; }\n return operate(function (source, subscriber) {\n subscriber.add(scheduler.schedule(function () { return source.subscribe(subscriber); }, delay));\n });\n}\n//# sourceMappingURL=subscribeOn.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { observeOn } from '../operators/observeOn';\nimport { subscribeOn } from '../operators/subscribeOn';\nexport function scheduleObservable(input, scheduler) {\n return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));\n}\n//# sourceMappingURL=scheduleObservable.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { observeOn } from '../operators/observeOn';\nimport { subscribeOn } from '../operators/subscribeOn';\nexport function schedulePromise(input, scheduler) {\n return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));\n}\n//# sourceMappingURL=schedulePromise.js.map","import { Observable } from '../Observable';\nexport function scheduleArray(input, scheduler) {\n return new Observable(function (subscriber) {\n var i = 0;\n return scheduler.schedule(function () {\n if (i === input.length) {\n subscriber.complete();\n }\n else {\n subscriber.next(input[i++]);\n if (!subscriber.closed) {\n this.schedule();\n }\n }\n });\n });\n}\n//# sourceMappingURL=scheduleArray.js.map","import { Observable } from '../Observable';\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from '../util/isFunction';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function scheduleIterable(input, scheduler) {\n return new Observable(function (subscriber) {\n var iterator;\n executeSchedule(subscriber, scheduler, function () {\n iterator = input[Symbol_iterator]();\n executeSchedule(subscriber, scheduler, function () {\n var _a;\n var value;\n var done;\n try {\n (_a = iterator.next(), value = _a.value, done = _a.done);\n }\n catch (err) {\n subscriber.error(err);\n return;\n }\n if (done) {\n subscriber.complete();\n }\n else {\n subscriber.next(value);\n }\n }, 0, true);\n });\n return function () { return isFunction(iterator === null || iterator === void 0 ? void 0 : iterator.return) && iterator.return(); };\n });\n}\n//# sourceMappingURL=scheduleIterable.js.map","import { Observable } from '../Observable';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function scheduleAsyncIterable(input, scheduler) {\n if (!input) {\n throw new Error('Iterable cannot be null');\n }\n return new Observable(function (subscriber) {\n executeSchedule(subscriber, scheduler, function () {\n var iterator = input[Symbol.asyncIterator]();\n executeSchedule(subscriber, scheduler, function () {\n iterator.next().then(function (result) {\n if (result.done) {\n subscriber.complete();\n }\n else {\n subscriber.next(result.value);\n }\n });\n }, 0, true);\n });\n });\n}\n//# sourceMappingURL=scheduleAsyncIterable.js.map","import { scheduleAsyncIterable } from './scheduleAsyncIterable';\nimport { readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike';\nexport function scheduleReadableStreamLike(input, scheduler) {\n return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input), scheduler);\n}\n//# sourceMappingURL=scheduleReadableStreamLike.js.map","import { scheduleObservable } from './scheduleObservable';\nimport { schedulePromise } from './schedulePromise';\nimport { scheduleArray } from './scheduleArray';\nimport { scheduleIterable } from './scheduleIterable';\nimport { scheduleAsyncIterable } from './scheduleAsyncIterable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isPromise } from '../util/isPromise';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isIterable } from '../util/isIterable';\nimport { isAsyncIterable } from '../util/isAsyncIterable';\nimport { createInvalidObservableTypeError } from '../util/throwUnobservableError';\nimport { isReadableStreamLike } from '../util/isReadableStreamLike';\nimport { scheduleReadableStreamLike } from './scheduleReadableStreamLike';\nexport function scheduled(input, scheduler) {\n if (input != null) {\n if (isInteropObservable(input)) {\n return scheduleObservable(input, scheduler);\n }\n if (isArrayLike(input)) {\n return scheduleArray(input, scheduler);\n }\n if (isPromise(input)) {\n return schedulePromise(input, scheduler);\n }\n if (isAsyncIterable(input)) {\n return scheduleAsyncIterable(input, scheduler);\n }\n if (isIterable(input)) {\n return scheduleIterable(input, scheduler);\n }\n if (isReadableStreamLike(input)) {\n return scheduleReadableStreamLike(input, scheduler);\n }\n }\n throw createInvalidObservableTypeError(input);\n}\n//# sourceMappingURL=scheduled.js.map","import { scheduled } from '../scheduled/scheduled';\nimport { innerFrom } from './innerFrom';\nexport function from(input, scheduler) {\n return scheduler ? scheduled(input, scheduler) : innerFrom(input);\n}\n//# sourceMappingURL=from.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 { 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 { __read, __spreadArray } from \"tslib\";\nimport { map } from \"../operators/map\";\nvar isArray = Array.isArray;\nfunction callOrApply(fn, args) {\n return isArray(args) ? fn.apply(void 0, __spreadArray([], __read(args))) : fn(args);\n}\nexport function mapOneOrManyArgs(fn) {\n return map(function (args) { return callOrApply(fn, args); });\n}\n//# sourceMappingURL=mapOneOrManyArgs.js.map","import { Observable } from '../Observable';\nimport { argsArgArrayOrObject } from '../util/argsArgArrayOrObject';\nimport { from } from './from';\nimport { identity } from '../util/identity';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { popResultSelector, popScheduler } from '../util/args';\nimport { createObject } from '../util/createObject';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function combineLatest() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var scheduler = popScheduler(args);\n var resultSelector = popResultSelector(args);\n var _a = argsArgArrayOrObject(args), observables = _a.args, keys = _a.keys;\n if (observables.length === 0) {\n return from([], scheduler);\n }\n var result = new Observable(combineLatestInit(observables, scheduler, keys\n ?\n function (values) { return createObject(keys, values); }\n :\n identity));\n return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result;\n}\nexport function combineLatestInit(observables, scheduler, valueTransform) {\n if (valueTransform === void 0) { valueTransform = identity; }\n return function (subscriber) {\n maybeSchedule(scheduler, function () {\n var length = observables.length;\n var values = new Array(length);\n var active = length;\n var remainingFirstValues = length;\n var _loop_1 = function (i) {\n maybeSchedule(scheduler, function () {\n var source = from(observables[i], scheduler);\n var hasFirstValue = false;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n values[i] = value;\n if (!hasFirstValue) {\n hasFirstValue = true;\n remainingFirstValues--;\n }\n if (!remainingFirstValues) {\n subscriber.next(valueTransform(values.slice()));\n }\n }, function () {\n if (!--active) {\n subscriber.complete();\n }\n }));\n }, subscriber);\n };\n for (var i = 0; i < length; i++) {\n _loop_1(i);\n }\n }, subscriber);\n };\n}\nfunction maybeSchedule(scheduler, execute, subscription) {\n if (scheduler) {\n executeSchedule(subscription, scheduler, execute);\n }\n else {\n execute();\n }\n}\n//# sourceMappingURL=combineLatest.js.map","var isArray = Array.isArray;\nexport function argsOrArgArray(args) {\n return args.length === 1 && isArray(args[0]) ? args[0] : args;\n}\n//# sourceMappingURL=argsOrArgArray.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 { __read, __spreadArray } from \"tslib\";\nimport { combineLatestInit } from '../observable/combineLatest';\nimport { operate } from '../util/lift';\nimport { argsOrArgArray } from '../util/argsOrArgArray';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { pipe } from '../util/pipe';\nimport { popResultSelector } from '../util/args';\nexport function combineLatest() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var resultSelector = popResultSelector(args);\n return resultSelector\n ? pipe(combineLatest.apply(void 0, __spreadArray([], __read(args))), mapOneOrManyArgs(resultSelector))\n : operate(function (source, subscriber) {\n combineLatestInit(__spreadArray([source], __read(argsOrArgArray(args))))(subscriber);\n });\n}\n//# sourceMappingURL=combineLatest.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { combineLatest } from './combineLatest';\nexport function combineLatestWith() {\n var otherSources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n otherSources[_i] = arguments[_i];\n }\n return combineLatest.apply(void 0, __spreadArray([], __read(otherSources)));\n}\n//# sourceMappingURL=combineLatestWith.js.map","import { getIt } from \"get-it\";\nimport { retry, jsonRequest, jsonResponse, progress, observable, debug, headers, agent } from \"get-it/middleware\";\nimport { Observable, from, lastValueFrom } from \"rxjs\";\nimport { combineLatestWith, map, filter } from \"rxjs/operators\";\nclass ClientError extends Error {\n constructor(res) {\n const props = extractErrorProps(res);\n super(props.message), this.statusCode = 400, Object.assign(this, props);\n }\n}\nclass ServerError extends Error {\n constructor(res) {\n const props = extractErrorProps(res);\n super(props.message), this.statusCode = 500, Object.assign(this, props);\n }\n}\nfunction extractErrorProps(res) {\n const body = res.body, 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 return props.message = `${body.error} - ${body.message}`, props;\n if (isMutationError(body)) {\n const allItems = body.error.items || [], items = allItems.slice(0, 5).map((item) => {\n var _a;\n return (_a = item.error) == null ? void 0 : _a.description;\n }).filter(Boolean);\n let itemsStr = items.length ? `:\n- ${items.join(`\n- `)}` : \"\";\n return allItems.length > 5 && (itemsStr += `\n...and ${allItems.length - 5} more`), props.message = `${body.error.description}${itemsStr}`, props.details = body.error, props;\n }\n return body.error && body.error.description ? (props.message = body.error.description, props.details = body.error, props) : (props.message = body.error || body.message || httpErrorMessage(res), 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 ? ` ${res.statusMessage}` : \"\";\n return `${res.method}-request to ${res.url} resulted in HTTP ${res.statusCode}${statusMessage}`;\n}\nfunction stringifyBody(body, res) {\n return (res.headers[\"content-type\"] || \"\").toLowerCase().indexOf(\"application/json\") !== -1 ? JSON.stringify(body, null, 2) : body;\n}\nconst httpError = {\n onResponse: (res) => {\n if (res.statusCode >= 500)\n throw new ServerError(res);\n if (res.statusCode >= 400)\n throw new ClientError(res);\n return res;\n }\n}, printWarnings = {\n onResponse: (res) => {\n const warn = res.headers[\"x-sanity-warning\"];\n return (Array.isArray(warn) ? warn : [warn]).filter(Boolean).forEach((msg) => console.warn(msg)), res;\n }\n};\nfunction defineHttpRequest(envMiddleware, {\n maxRetries = 5,\n retryDelay\n}) {\n const request = getIt([\n maxRetries > 0 ? retry({\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n retryDelay,\n // This option is typed incorrectly in get-it.\n maxRetries,\n shouldRetry\n }) : {},\n ...envMiddleware,\n printWarnings,\n jsonRequest(),\n jsonResponse(),\n progress(),\n httpError,\n observable({ implementation: Observable })\n ]);\n function httpRequest(options, requester = request) {\n return requester({ maxRedirects: 0, ...options });\n }\n return httpRequest.defaultRequester = request, httpRequest;\n}\nfunction shouldRetry(err, attempt, options) {\n const isSafe = options.method === \"GET\" || options.method === \"HEAD\", isQuery = (options.uri || options.url).startsWith(\"/data/query\"), isRetriableResponse = err.response && (err.response.statusCode === 429 || err.response.statusCode === 502 || err.response.statusCode === 503);\n return (isSafe || isQuery) && isRetriableResponse ? !0 : retry.shouldRetry(err, attempt, options);\n}\nfunction getSelection(sel) {\n if (typeof sel == \"string\")\n return { id: sel };\n if (Array.isArray(sel))\n return { query: \"*[_id in $ids]\", params: { ids: sel } };\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 ? { query: sel.query, params: sel.params } : { query: sel.query };\n const selectionOpts = [\n \"* Document ID (<docId>)\",\n \"* Array of document IDs\",\n \"* Object containing `query`\"\n ].join(`\n`);\n throw new Error(`Unknown selection - must be one of:\n\n${selectionOpts}`);\n}\nconst VALID_ASSET_TYPES = [\"image\", \"file\"], VALID_INSERT_LOCATIONS = [\"before\", \"after\", \"replace\"], dataset = (name2) => {\n if (!/^(~[a-z0-9]{1}[-\\w]{0,63}|[a-z0-9]{1}[-\\w]{0,63})$/.test(name2))\n throw new Error(\n \"Datasets can only contain lowercase characters, numbers, underscores and dashes, and start with tilde, and be maximum 64 characters\"\n );\n}, 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}, validateAssetType = (type) => {\n if (VALID_ASSET_TYPES.indexOf(type) === -1)\n throw new Error(`Invalid asset type: ${type}. Must be one of ${VALID_ASSET_TYPES.join(\", \")}`);\n}, validateObject = (op, val) => {\n if (val === null || typeof val != \"object\" || Array.isArray(val))\n throw new Error(`${op}() takes an object of properties`);\n}, 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(`${op}(): \"${id}\" is not a valid document ID`);\n}, requireDocumentId = (op, doc) => {\n if (!doc._id)\n throw new Error(`${op}() requires that the document contains an ID (\"_id\" property)`);\n validateDocumentId(op, doc._id);\n}, 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) => `\"${loc}\"`).join(\", \");\n throw new Error(`${signature} takes an \"at\"-argument which is one of: ${valid}`);\n }\n if (typeof selector != \"string\")\n throw new Error(`${signature} takes a \"selector\"-argument which must be a string`);\n if (!Array.isArray(items))\n throw new Error(`${signature} takes an \"items\"-argument which must be an array`);\n}, hasDataset = (config) => {\n if (!config.dataset)\n throw new Error(\"`dataset` must be provided to perform queries\");\n return config.dataset || \"\";\n}, requestTag = (tag) => {\n if (typeof tag != \"string\" || !/^[a-z0-9._-]{1,75}$/i.test(tag))\n throw new Error(\n \"Tag can only contain alphanumeric characters, underscores, dashes and dots, and be between one and 75 characters long.\"\n );\n return tag;\n};\nvar __accessCheck$6 = (obj, member, msg) => {\n if (!member.has(obj))\n throw TypeError(\"Cannot \" + msg);\n}, __privateGet$6 = (obj, member, getter) => (__accessCheck$6(obj, member, \"read from private field\"), getter ? getter.call(obj) : member.get(obj)), __privateAdd$6 = (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$6 = (obj, member, value, setter) => (__accessCheck$6(obj, member, \"write to private field\"), setter ? setter.call(obj, value) : member.set(obj, value), value);\nclass BasePatch {\n constructor(selection, operations = {}) {\n this.selection = selection, 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 return validateObject(\"diffMatchPatch\", attrs), 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 return this.operations = Object.assign({}, this.operations, { unset: attrs }), 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 return validateInsert(at, selector, items), this._assign(\"insert\", { [at]: selector, items });\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\", `${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\", `${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 > \"u\" || deleteCount === -1, startIndex = start < 0 ? start - 1 : start, delCount = delAll ? -1 : Math.max(0, start + deleteCount), delRange = startIndex < 0 && delCount >= 0 ? \"\" : delCount, rangeSelector = `${selector}[${startIndex}:${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 return this.operations.ifRevisionID = rev, this;\n }\n /**\n * Return a plain JSON representation of the patch\n */\n serialize() {\n return { ...getSelection(this.selection), ...this.operations };\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 return this.operations = {}, this;\n }\n _assign(op, props, merge = !0) {\n return validateObject(op, props), this.operations = Object.assign({}, this.operations, {\n [op]: Object.assign({}, merge && this.operations[op] || {}, props)\n }), this;\n }\n _set(op, props) {\n return this._assign(op, props, !1);\n }\n}\nvar _client$5;\nconst _ObservablePatch = class _ObservablePatch2 extends BasePatch {\n constructor(selection, operations, client) {\n super(selection, operations), __privateAdd$6(this, _client$5, void 0), __privateSet$6(this, _client$5, client);\n }\n /**\n * Clones the patch\n */\n clone() {\n return new _ObservablePatch2(this.selection, { ...this.operations }, __privateGet$6(this, _client$5));\n }\n commit(options) {\n if (!__privateGet$6(this, _client$5))\n throw new Error(\n \"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\", opts = Object.assign({ returnFirst, returnDocuments: !0 }, options);\n return __privateGet$6(this, _client$5).mutate({ patch: this.serialize() }, opts);\n }\n};\n_client$5 = /* @__PURE__ */ new WeakMap();\nlet ObservablePatch = _ObservablePatch;\nvar _client2$5;\nconst _Patch = class _Patch2 extends BasePatch {\n constructor(selection, operations, client) {\n super(selection, operations), __privateAdd$6(this, _client2$5, void 0), __privateSet$6(this, _client2$5, client);\n }\n /**\n * Clones the patch\n */\n clone() {\n return new _Patch2(this.selection, { ...this.operations }, __privateGet$6(this, _client2$5));\n }\n commit(options) {\n if (!__privateGet$6(this, _client2$5))\n throw new Error(\n \"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\", opts = Object.assign({ returnFirst, returnDocuments: !0 }, options);\n return __privateGet$6(this, _client2$5).mutate({ patch: this.serialize() }, opts);\n }\n};\n_client2$5 = /* @__PURE__ */ new WeakMap();\nlet Patch = _Patch;\nvar __accessCheck$5 = (obj, member, msg) => {\n if (!member.has(obj))\n throw TypeError(\"Cannot \" + msg);\n}, __privateGet$5 = (obj, member, getter) => (__accessCheck$5(obj, member, \"read from private field\"), getter ? getter.call(obj) : member.get(obj)), __privateAdd$5 = (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$5 = (obj, member, value, setter) => (__accessCheck$5(obj, member, \"write to private field\"), setter ? setter.call(obj, value) : member.set(obj, value), value);\nconst defaultMutateOptions = { returnDocuments: !1 };\nclass BaseTransaction {\n constructor(operations = [], transactionId) {\n this.operations = operations, 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 return validateObject(\"create\", doc), this._add({ create: doc });\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 return validateObject(op, doc), requireDocumentId(op, doc), this._add({ [op]: doc });\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 return validateObject(op, doc), requireDocumentId(op, doc), this._add({ [op]: doc });\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 return validateDocumentId(\"delete\", documentId), this._add({ delete: { id: documentId } });\n }\n transactionId(id) {\n return id ? (this.trxId = id, this) : this.trxId;\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 return this.operations = [], this;\n }\n _add(mut) {\n return this.operations.push(mut), this;\n }\n}\nvar _client$4;\nconst _Transaction = class _Transaction2 extends BaseTransaction {\n constructor(operations, client, transactionId) {\n super(operations, transactionId), __privateAdd$5(this, _client$4, void 0), __privateSet$5(this, _client$4, client);\n }\n /**\n * Clones the transaction\n */\n clone() {\n return new _Transaction2([...this.operations], __privateGet$5(this, _client$4), this.trxId);\n }\n commit(options) {\n if (!__privateGet$5(this, _client$4))\n throw new Error(\n \"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(\n this.serialize(),\n Object.assign({ transactionId: this.trxId }, defaultMutateOptions, options || {})\n );\n }\n patch(patchOrDocumentId, patchOps) {\n const isBuilder = typeof patchOps == \"function\";\n if (typeof patchOrDocumentId != \"string\" && patchOrDocumentId instanceof Patch)\n return this._add({ patch: patchOrDocumentId.serialize() });\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 return this._add({ patch: patch.serialize() });\n }\n return this._add({ patch: { id: patchOrDocumentId, ...patchOps } });\n }\n};\n_client$4 = /* @__PURE__ */ new WeakMap();\nlet Transaction = _Transaction;\nvar _client2$4;\nconst _ObservableTransaction = class _ObservableTransaction2 extends BaseTransaction {\n constructor(operations, client, transactionId) {\n super(operations, transactionId), __privateAdd$5(this, _client2$4, void 0), __privateSet$5(this, _client2$4, client);\n }\n /**\n * Clones the transaction\n */\n clone() {\n return new _ObservableTransaction2([...this.operations], __privateGet$5(this, _client2$4), this.trxId);\n }\n commit(options) {\n if (!__privateGet$5(this, _client2$4))\n throw new Error(\n \"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(\n this.serialize(),\n Object.assign({ transactionId: this.trxId }, defaultMutateOptions, options || {})\n );\n }\n patch(patchOrDocumentId, patchOps) {\n const isBuilder = typeof patchOps == \"function\";\n if (typeof patchOrDocumentId != \"string\" && patchOrDocumentId instanceof ObservablePatch)\n return this._add({ patch: patchOrDocumentId.serialize() });\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 return this._add({ patch: patch.serialize() });\n }\n return this._add({ patch: { id: patchOrDocumentId, ...patchOps } });\n }\n};\n_client2$4 = /* @__PURE__ */ new WeakMap();\nlet ObservableTransaction = _ObservableTransaction;\nconst BASE_URL = \"https://www.sanity.io/help/\";\nfunction generateHelpUrl(slug) {\n return BASE_URL + slug;\n}\nfunction once(fn) {\n let didCall = !1, returnValue;\n return (...args) => (didCall || (returnValue = fn(...args), didCall = !0), returnValue);\n}\nconst createWarningPrinter = (message) => (\n // eslint-disable-next-line no-console\n once((...args) => console.warn(message.join(\" \"), ...args))\n), printCdnWarning = createWarningPrinter([\n \"Since you haven't set a value for `useCdn`, we will deliver content using our\",\n \"global, edge-cached API-CDN. If you wish to have content delivered faster, set\",\n \"`useCdn: false` to use the Live API. Note: You may incur higher costs using the live API.\"\n]), printCdnPreviewDraftsWarning = createWarningPrinter([\n \"The Sanity client is configured with the `perspective` set to `previewDrafts`, which doesn't support the API-CDN.\",\n \"The Live API will be used instead. Set `useCdn: false` in your configuration to hide this warning.\"\n]), printBrowserTokenWarning = createWarningPrinter([\n \"You have configured Sanity client to use a token in the browser. This may cause unintentional security issues.\",\n `See ${generateHelpUrl(\n \"js-client-browser-token\"\n )} for more information and how to hide this warning.`\n]), printNoApiVersionSpecifiedWarning = createWarningPrinter([\n \"Using the Sanity client without specifying an API version is deprecated.\",\n `See ${generateHelpUrl(\"js-client-api-version\")}`\n]), printNoDefaultExport = createWarningPrinter([\n \"The default export of @sanity/client has been deprecated. Use the named export `createClient` instead.\"\n]), defaultCdnHost = \"apicdn.sanity.io\", defaultConfig = {\n apiHost: \"https://api.sanity.io\",\n apiVersion: \"1\",\n useProjectHostname: !0,\n stega: { enabled: !1 }\n}, LOCALHOSTS = [\"localhost\", \"127.0.0.1\", \"0.0.0.0\"], isLocal = (host) => LOCALHOSTS.indexOf(host) !== -1;\nfunction validateApiVersion(apiVersion) {\n if (apiVersion === \"1\" || apiVersion === \"X\")\n return;\n const apiDate = new Date(apiVersion);\n if (!(/^\\d{4}-\\d{2}-\\d{2}$/.test(apiVersion) && apiDate instanceof Date && apiDate.getTime() > 0))\n throw new Error(\"Invalid API version string, expected `1` or date in format `YYYY-MM-DD`\");\n}\nconst validateApiPerspective = function(perspective) {\n switch (perspective) {\n case \"previewDrafts\":\n case \"published\":\n case \"raw\":\n return;\n default:\n throw new TypeError(\n \"Invalid API perspective string, expected `published`, `previewDrafts` or `raw`\"\n );\n }\n}, initConfig = (config, prevConfig) => {\n const specifiedConfig = {\n ...prevConfig,\n ...config,\n stega: {\n ...typeof prevConfig.stega == \"boolean\" ? { enabled: prevConfig.stega } : prevConfig.stega || defaultConfig.stega,\n ...typeof config.stega == \"boolean\" ? { enabled: config.stega } : config.stega || {}\n }\n };\n specifiedConfig.apiVersion || printNoApiVersionSpecifiedWarning();\n const newConfig = {\n ...defaultConfig,\n ...specifiedConfig\n }, projectBased = newConfig.useProjectHostname;\n if (typeof Promise > \"u\") {\n const helpUrl = generateHelpUrl(\"js-client-promise-polyfill\");\n throw new Error(`No native Promise-implementation found, polyfill needed - see ${helpUrl}`);\n }\n if (projectBased && !newConfig.projectId)\n throw new Error(\"Configuration must contain `projectId`\");\n if (typeof newConfig.perspective == \"string\" && validateApiPerspective(newConfig.perspective), \"encodeSourceMap\" in newConfig)\n throw new Error(\n \"It looks like you're using options meant for '@sanity/preview-kit/client'. 'encodeSourceMap' is not supported in '@sanity/client'. Did you mean 'stega.enabled'?\"\n );\n if (\"encodeSourceMapAtPath\" in newConfig)\n throw new Error(\n \"It looks like you're using options meant for '@sanity/preview-kit/client'. 'encodeSourceMapAtPath' is not supported in '@sanity/client'. Did you mean 'stega.filter'?\"\n );\n if (typeof newConfig.stega.enabled != \"boolean\")\n throw new Error(`stega.enabled must be a boolean, received ${newConfig.stega.enabled}`);\n if (newConfig.stega.enabled && newConfig.stega.studioUrl === void 0)\n throw new Error(\"stega.studioUrl must be defined when stega.enabled is true\");\n if (newConfig.stega.enabled && typeof newConfig.stega.studioUrl != \"string\" && typeof newConfig.stega.studioUrl != \"function\")\n throw new Error(\n `stega.studioUrl must be a string or a function, received ${newConfig.stega.studioUrl}`\n );\n const isBrowser = typeof window < \"u\" && window.location && window.location.hostname, isLocalhost = isBrowser && isLocal(window.location.hostname);\n isBrowser && isLocalhost && newConfig.token && newConfig.ignoreBrowserTokenWarning !== !0 ? printBrowserTokenWarning() : typeof newConfig.useCdn > \"u\" && printCdnWarning(), projectBased && projectId(newConfig.projectId), newConfig.dataset && dataset(newConfig.dataset), \"requestTagPrefix\" in newConfig && (newConfig.requestTagPrefix = newConfig.requestTagPrefix ? requestTag(newConfig.requestTagPrefix).replace(/\\.+$/, \"\") : void 0), newConfig.apiVersion = `${newConfig.apiVersion}`.replace(/^v/, \"\"), newConfig.isDefaultApi = newConfig.apiHost === defaultConfig.apiHost, newConfig.useCdn = newConfig.useCdn !== !1 && !newConfig.withCredentials, validateApiVersion(newConfig.apiVersion);\n const hostParts = newConfig.apiHost.split(\"://\", 2), protocol = hostParts[0], host = hostParts[1], cdnHost = newConfig.isDefaultApi ? defaultCdnHost : host;\n return newConfig.useProjectHostname ? (newConfig.url = `${protocol}://${newConfig.projectId}.${host}/v${newConfig.apiVersion}`, newConfig.cdnUrl = `${protocol}://${newConfig.projectId}.${cdnHost}/v${newConfig.apiVersion}`) : (newConfig.url = `${newConfig.apiHost}/v${newConfig.apiVersion}`, newConfig.cdnUrl = newConfig.url), newConfig;\n}, projectHeader = \"X-Sanity-Project-ID\";\nfunction requestOptions(config, overrides = {}) {\n const headers2 = {}, token = overrides.token || config.token;\n token && (headers2.Authorization = `Bearer ${token}`), !overrides.useGlobalApi && !config.useProjectHostname && config.projectId && (headers2[projectHeader] = config.projectId);\n const withCredentials = !!(typeof overrides.withCredentials > \"u\" ? config.token || config.withCredentials : overrides.withCredentials), timeout = typeof overrides.timeout > \"u\" ? config.timeout : overrides.timeout;\n return Object.assign({}, overrides, {\n headers: Object.assign({}, headers2, overrides.headers || {}),\n timeout: typeof timeout > \"u\" ? 5 * 60 * 1e3 : timeout,\n proxy: overrides.proxy || config.proxy,\n json: !0,\n withCredentials,\n fetch: typeof overrides.fetch == \"object\" && typeof config.fetch == \"object\" ? { ...config.fetch, ...overrides.fetch } : overrides.fetch || config.fetch\n });\n}\nvar s = { 0: 8203, 1: 8204, 2: 8205, 3: 8290, 4: 8291, 5: 8288, 6: 65279, 7: 8289, 8: 119155, 9: 119156, a: 119157, b: 119158, c: 119159, d: 119160, e: 119161, f: 119162 }, c = { 0: 8203, 1: 8204, 2: 8205, 3: 65279 }, d = new Array(4).fill(String.fromCodePoint(c[0])).join(\"\");\nfunction E(t) {\n let e = JSON.stringify(t);\n return `${d}${Array.from(e).map((r) => {\n let n = r.charCodeAt(0);\n if (n > 255)\n throw new Error(`Only ASCII edit info can be encoded. Error attempting to encode ${e} on character ${r} (${n})`);\n return Array.from(n.toString(4).padStart(4, \"0\")).map((o) => String.fromCodePoint(c[o])).join(\"\");\n }).join(\"\")}`;\n}\nfunction I(t) {\n return Number.isNaN(Number(t)) ? !!Date.parse(t) : !1;\n}\nfunction x(t) {\n try {\n new URL(t, t.startsWith(\"/\") ? \"https://acme.com\" : void 0);\n } catch {\n return !1;\n }\n return !0;\n}\nfunction b(t, e, r = \"auto\") {\n return r === !0 || r === \"auto\" && (I(t) || x(t)) ? t : `${t}${E(e)}`;\n}\nObject.fromEntries(Object.entries(c).map((t) => t.reverse()));\nObject.fromEntries(Object.entries(s).map((t) => t.reverse()));\nvar S = `${Object.values(s).map((t) => `\\\\u{${t.toString(16)}}`).join(\"\")}`, f = new RegExp(`[${S}]{4,}`, \"gu\");\nfunction X(t) {\n var e;\n return { cleaned: t.replace(f, \"\"), encoded: ((e = t.match(f)) == null ? void 0 : e[0]) || \"\" };\n}\nfunction vercelStegaCleanAll(result) {\n try {\n return JSON.parse(\n JSON.stringify(result, (key, value) => typeof value != \"string\" ? value : X(value).cleaned)\n );\n } catch {\n return result;\n }\n}\nconst encodeQueryString = ({\n query,\n params = {},\n options = {}\n}) => {\n const searchParams = new URLSearchParams(), { tag, returnQuery, ...opts } = options;\n tag && searchParams.append(\"tag\", tag), searchParams.append(\"query\", query);\n for (const [key, value] of Object.entries(params))\n searchParams.append(`$${key}`, JSON.stringify(value));\n for (const [key, value] of Object.entries(opts))\n value && searchParams.append(key, `${value}`);\n return returnQuery === !1 && searchParams.append(\"returnQuery\", \"false\"), `?${searchParams}`;\n}, excludeFalsey = (param, defValue) => param === !1 ? void 0 : typeof param > \"u\" ? defValue : param, getMutationQuery = (options = {}) => ({\n dryRun: options.dryRun,\n returnIds: !0,\n returnDocuments: excludeFalsey(options.returnDocuments, !0),\n visibility: options.visibility || \"sync\",\n autoGenerateArrayKeys: options.autoGenerateArrayKeys,\n skipCrossDatasetReferenceValidation: options.skipCrossDatasetReferenceValidation\n}), isResponse = (event) => event.type === \"response\", getBody = (event) => event.body, indexBy = (docs, attr) => docs.reduce((indexed, doc) => (indexed[attr(doc)] = doc, indexed), /* @__PURE__ */ Object.create(null)), getQuerySizeLimit = 11264;\nfunction _fetch(client, httpRequest, _stega, query, _params = {}, options = {}) {\n const stega = \"stega\" in options ? {\n ..._stega || {},\n ...typeof options.stega == \"boolean\" ? { enabled: options.stega } : options.stega || {}\n } : _stega, params = stega.enabled ? vercelStegaCleanAll(_params) : _params, mapResponse = options.filterResponse === !1 ? (res) => res : (res) => res.result, { cache, next, ...opts } = {\n // Opt out of setting a `signal` on an internal `fetch` if one isn't provided.\n // This is necessary in React Server Components to avoid opting out of Request Memoization.\n useAbortSignal: typeof options.signal < \"u\",\n // Set `resultSourceMap' when stega is enabled, as it's required for encoding.\n resultSourceMap: stega.enabled ? \"withKeyArraySelector\" : options.resultSourceMap,\n ...options,\n // Default to not returning the query, unless `filterResponse` is `false`,\n // or `returnQuery` is explicitly set. `true` is the default in Content Lake, so skip if truthy\n returnQuery: options.filterResponse === !1 && options.returnQuery !== !1\n }, reqOpts = typeof cache < \"u\" || typeof next < \"u\" ? { ...opts, fetch: { cache, next } } : opts, $request = _dataRequest(client, httpRequest, \"query\", { query, params }, reqOpts);\n return stega.enabled ? $request.pipe(\n combineLatestWith(\n from(\n import(\"./stegaEncodeSourceMap.js\").then(function(n) {\n return n.a;\n }).then(\n ({ stegaEncodeSourceMap }) => stegaEncodeSourceMap\n )\n )\n ),\n map(\n ([res, stegaEncodeSourceMap]) => {\n const result = stegaEncodeSourceMap(res.result, res.resultSourceMap, stega);\n return mapResponse({ ...res, result });\n }\n )\n ) : $request.pipe(map(mapResponse));\n}\nfunction _getDocument(client, httpRequest, id, opts = {}) {\n const options = { uri: _getDataUrl(client, \"doc\", id), json: !0, tag: opts.tag };\n return _requestObservable(client, httpRequest, options).pipe(\n filter(isResponse),\n map((event) => event.body.documents && event.body.documents[0])\n );\n}\nfunction _getDocuments(client, httpRequest, ids, opts = {}) {\n const options = { uri: _getDataUrl(client, \"doc\", ids.join(\",\")), json: !0, tag: opts.tag };\n return _requestObservable(client, httpRequest, options).pipe(\n filter(isResponse),\n map((event) => {\n const indexed = indexBy(event.body.documents || [], (doc) => doc._id);\n return ids.map((id) => indexed[id] || null);\n })\n );\n}\nfunction _createIfNotExists(client, httpRequest, doc, options) {\n return requireDocumentId(\"createIfNotExists\", doc), _create(client, httpRequest, doc, \"createIfNotExists\", options);\n}\nfunction _createOrReplace(client, httpRequest, doc, options) {\n return requireDocumentId(\"createOrReplace\", doc), _create(client, httpRequest, doc, \"createOrReplace\", options);\n}\nfunction _delete(client, httpRequest, selection, options) {\n return _dataRequest(\n client,\n httpRequest,\n \"mutate\",\n { mutations: [{ delete: getSelection(selection) }] },\n options\n );\n}\nfunction _mutate(client, httpRequest, mutations, options) {\n let mut;\n mutations instanceof Patch || mutations instanceof ObservablePatch ? mut = { patch: mutations.serialize() } : mutations instanceof Transaction || mutations instanceof ObservableTransaction ? mut = mutations.serialize() : mut = mutations;\n const muts = Array.isArray(mut) ? mut : [mut], transactionId = options && options.transactionId || void 0;\n return _dataRequest(client, httpRequest, \"mutate\", { mutations: muts, transactionId }, options);\n}\nfunction _dataRequest(client, httpRequest, endpoint, body, options = {}) {\n const isMutation = endpoint === \"mutate\", isQuery = endpoint === \"query\", strQuery = isMutation ? \"\" : encodeQueryString(body), useGet = !isMutation && strQuery.length < getQuerySizeLimit, stringQuery = useGet ? strQuery : \"\", returnFirst = options.returnFirst, { timeout, token, tag, headers: headers2, returnQuery } = options, uri = _getDataUrl(client, endpoint, stringQuery), reqOptions = {\n method: useGet ? \"GET\" : \"POST\",\n uri,\n json: !0,\n body: useGet ? void 0 : body,\n query: isMutation && getMutationQuery(options),\n timeout,\n headers: headers2,\n token,\n tag,\n returnQuery,\n perspective: options.perspective,\n resultSourceMap: options.resultSourceMap,\n canUseCdn: isQuery,\n signal: options.signal,\n fetch: options.fetch,\n useAbortSignal: options.useAbortSignal,\n useCdn: options.useCdn\n };\n return _requestObservable(client, httpRequest, reqOptions).pipe(\n filter(isResponse),\n map(getBody),\n map((res) => {\n if (!isMutation)\n return res;\n const results = res.results || [];\n if (options.returnDocuments)\n return returnFirst ? results[0] && results[0].document : results.map((mut) => mut.document);\n const key = returnFirst ? \"documentId\" : \"documentIds\", 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 );\n}\nfunction _create(client, httpRequest, doc, op, options = {}) {\n const mutation = { [op]: doc }, opts = Object.assign({ returnFirst: !0, returnDocuments: !0 }, options);\n return _dataRequest(client, httpRequest, \"mutate\", { mutations: [mutation] }, opts);\n}\nfunction _requestObservable(client, httpRequest, options) {\n var _a, _b;\n const uri = options.url || options.uri, config = client.config(), canUseCdn = typeof options.canUseCdn > \"u\" ? [\"GET\", \"HEAD\"].indexOf(options.method || \"GET\") >= 0 && uri.indexOf(\"/data/\") === 0 : options.canUseCdn;\n let useCdn = ((_a = options.useCdn) != null ? _a : config.useCdn) && canUseCdn;\n const tag = options.tag && config.requestTagPrefix ? [config.requestTagPrefix, options.tag].join(\".\") : options.tag || config.requestTagPrefix;\n if (tag && options.tag !== null && (options.query = { tag: requestTag(tag), ...options.query }), [\"GET\", \"HEAD\", \"POST\"].indexOf(options.method || \"GET\") >= 0 && uri.indexOf(\"/data/query/\") === 0) {\n const resultSourceMap = (_b = options.resultSourceMap) != null ? _b : config.resultSourceMap;\n resultSourceMap !== void 0 && resultSourceMap !== !1 && (options.query = { resultSourceMap, ...options.query });\n const perspective = options.perspective || config.perspective;\n typeof perspective == \"string\" && perspective !== \"raw\" && (validateApiPerspective(perspective), options.query = { perspective, ...options.query }, perspective === \"previewDrafts\" && useCdn && (useCdn = !1, printCdnPreviewDraftsWarning())), options.returnQuery === !1 && (options.query = { returnQuery: \"false\", ...options.query });\n }\n const reqOptions = requestOptions(\n config,\n Object.assign({}, options, {\n url: _getUrl(client, uri, useCdn)\n })\n ), request = new Observable(\n (subscriber) => httpRequest(reqOptions, config.requester).subscribe(subscriber)\n );\n return options.signal ? request.pipe(_withAbortSignal(options.signal)) : request;\n}\nfunction _request(client, httpRequest, options) {\n return _requestObservable(client, httpRequest, options).pipe(\n filter((event) => event.type === \"response\"),\n map((event) => event.body)\n );\n}\nfunction _getDataUrl(client, operation, path) {\n const config = client.config(), catalog = hasDataset(config), baseUri = `/${operation}/${catalog}`;\n return `/data${path ? `${baseUri}/${path}` : baseUri}`.replace(/\\/($|\\?)/, \"$1\");\n}\nfunction _getUrl(client, uri, canUseCdn = !1) {\n const { url, cdnUrl } = client.config();\n return `${canUseCdn ? cdnUrl : url}/${uri.replace(/^\\//, \"\")}`;\n}\nfunction _withAbortSignal(signal) {\n return (input) => 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 return signal.addEventListener(\"abort\", abort), () => {\n signal.removeEventListener(\"abort\", abort), subscription.unsubscribe();\n };\n });\n}\nconst isDomExceptionSupported = !!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 const error = new Error((_b = signal == null ? void 0 : signal.reason) != null ? _b : \"The operation was aborted.\");\n return error.name = \"AbortError\", error;\n}\nvar __accessCheck$4 = (obj, member, msg) => {\n if (!member.has(obj))\n throw TypeError(\"Cannot \" + msg);\n}, __privateGet$4 = (obj, member, getter) => (__accessCheck$4(obj, member, \"read from private field\"), getter ? getter.call(obj) : member.get(obj)), __privateAdd$4 = (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$4 = (obj, member, value, setter) => (__accessCheck$4(obj, member, \"write to private field\"), setter ? setter.call(obj, value) : member.set(obj, value), value), _client$3, _httpRequest$4;\nclass ObservableAssetsClient {\n constructor(client, httpRequest) {\n __privateAdd$4(this, _client$3, void 0), __privateAdd$4(this, _httpRequest$4, void 0), __privateSet$4(this, _client$3, client), __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 = /* @__PURE__ */ new WeakMap(), _httpRequest$4 = /* @__PURE__ */ new WeakMap();\nvar _client2$3, _httpRequest2$4;\nclass AssetsClient {\n constructor(client, httpRequest) {\n __privateAdd$4(this, _client2$3, void 0), __privateAdd$4(this, _httpRequest2$4, void 0), __privateSet$4(this, _client2$3, client), __privateSet$4(this, _httpRequest2$4, httpRequest);\n }\n upload(assetType, body, options) {\n const observable2 = _upload(__privateGet$4(this, _client2$3), __privateGet$4(this, _httpRequest2$4), assetType, body, options);\n return lastValueFrom(\n observable2.pipe(\n filter((event) => event.type === \"response\"),\n map(\n (event) => event.body.document\n )\n )\n );\n }\n}\n_client2$3 = /* @__PURE__ */ new WeakMap(), _httpRequest2$4 = /* @__PURE__ */ new WeakMap();\nfunction _upload(client, httpRequest, assetType, body, opts = {}) {\n validateAssetType(assetType);\n let meta = opts.extract || void 0;\n meta && !meta.length && (meta = [\"none\"]);\n const dataset2 = hasDataset(client.config()), assetEndpoint = assetType === \"image\" ? \"images\" : \"files\", options = optionsFromFile(opts, body), { tag, label, title, description, creditLine, filename, source } = options, query = {\n label,\n title,\n description,\n filename,\n meta,\n creditLine\n };\n return source && (query.sourceId = source.id, query.sourceName = source.name, query.sourceUrl = source.url), _requestObservable(client, httpRequest, {\n tag,\n method: \"POST\",\n timeout: options.timeout || 0,\n uri: `/assets/${assetEndpoint}/${dataset2}`,\n headers: options.contentType ? { \"Content-Type\": options.contentType } : {},\n query,\n body\n });\n}\nfunction optionsFromFile(opts, file) {\n return typeof File > \"u\" || !(file instanceof File) ? opts : Object.assign(\n {\n filename: opts.preserveFilename === !1 ? void 0 : file.name,\n contentType: file.type\n },\n opts\n );\n}\nvar defaults = (obj, defaults2) => Object.keys(defaults2).concat(Object.keys(obj)).reduce((target, prop) => (target[prop] = typeof obj[prop] > \"u\" ? defaults2[prop] : obj[prop], target), {});\nconst pick = (obj, props) => props.reduce((selection, prop) => (typeof obj[prop] > \"u\" || (selection[prop] = obj[prop]), selection), {}), MAX_URL_LENGTH = 14800, possibleOptions = [\n \"includePreviousRevision\",\n \"includeResult\",\n \"visibility\",\n \"effectFormat\",\n \"tag\"\n], defaultOptions = {\n includeResult: !0\n};\nfunction _listen(query, params, opts = {}) {\n const { url, token, withCredentials, requestTagPrefix } = this.config(), tag = opts.tag && requestTagPrefix ? [requestTagPrefix, opts.tag].join(\".\") : opts.tag, options = { ...defaults(opts, defaultOptions), tag }, listenOpts = pick(options, possibleOptions), qs = encodeQueryString({ query, params, options: { tag, ...listenOpts } }), uri = `${url}${_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 const listenFor = options.events ? options.events : [\"mutation\"], shouldEmitReconnect = listenFor.indexOf(\"reconnect\") !== -1, esOptions = {};\n return (token || withCredentials) && (esOptions.withCredentials = !0), token && (esOptions.headers = {\n Authorization: `Bearer ${token}`\n }), new Observable((observer) => {\n let es;\n getEventSource().then((eventSource) => {\n es = eventSource;\n }).catch((reason) => {\n observer.error(reason), stop();\n });\n let reconnectTimer, stopped = !1;\n function onError() {\n stopped || (emitReconnect(), !stopped && es.readyState === es.CLOSED && (unsubscribe(), clearTimeout(reconnectTimer), reconnectTimer = setTimeout(open, 100)));\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 = !0, unsubscribe(), observer.complete();\n }\n function unsubscribe() {\n es && (es.removeEventListener(\"error\", onError), es.removeEventListener(\"channelError\", onChannelError), es.removeEventListener(\"disconnect\", onDisconnect), listenFor.forEach((type) => es.removeEventListener(type, onMessage)), es.close());\n }\n function emitReconnect() {\n shouldEmitReconnect && observer.next({ type: \"reconnect\" });\n }\n async function getEventSource() {\n const { default: EventSource } = await import(\"@sanity/eventsource\"), evs = new EventSource(uri, esOptions);\n return evs.addEventListener(\"error\", onError), evs.addEventListener(\"channelError\", onChannelError), evs.addEventListener(\"disconnect\", onDisconnect), listenFor.forEach((type) => evs.addEventListener(type, onMessage)), evs;\n }\n function open() {\n getEventSource().then((eventSource) => {\n es = eventSource;\n }).catch((reason) => {\n observer.error(reason), stop();\n });\n }\n function stop() {\n stopped = !0, 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({ type: event.type }, data);\n } catch (err) {\n return err;\n }\n}\nfunction cooerceError(err) {\n if (err instanceof Error)\n return err;\n const evt = parseEvent(err);\n return evt instanceof Error ? evt : new Error(extractErrorMessage(evt));\n}\nfunction extractErrorMessage(err) {\n return err.error ? err.error.description ? err.error.description : typeof err.error == \"string\" ? err.error : JSON.stringify(err.error, null, 2) : err.message || \"Unknown listener error\";\n}\nvar __accessCheck$3 = (obj, member, msg) => {\n if (!member.has(obj))\n throw TypeError(\"Cannot \" + msg);\n}, __privateGet$3 = (obj, member, getter) => (__accessCheck$3(obj, member, \"read from private field\"), getter ? getter.call(obj) : member.get(obj)), __privateAdd$3 = (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$3 = (obj, member, value, setter) => (__accessCheck$3(obj, member, \"write to private field\"), setter ? setter.call(obj, value) : member.set(obj, value), value), _client$2, _httpRequest$3;\nclass ObservableDatasetsClient {\n constructor(client, httpRequest) {\n __privateAdd$3(this, _client$2, void 0), __privateAdd$3(this, _httpRequest$3, void 0), __privateSet$3(this, _client$2, client), __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(name2, options) {\n return _modify(__privateGet$3(this, _client$2), __privateGet$3(this, _httpRequest$3), \"PUT\", name2, 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(name2, options) {\n return _modify(__privateGet$3(this, _client$2), __privateGet$3(this, _httpRequest$3), \"PATCH\", name2, options);\n }\n /**\n * Delete a dataset with the given name\n *\n * @param name - Name of the dataset to delete\n */\n delete(name2) {\n return _modify(__privateGet$3(this, _client$2), __privateGet$3(this, _httpRequest$3), \"DELETE\", name2);\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 tag: null\n });\n }\n}\n_client$2 = /* @__PURE__ */ new WeakMap(), _httpRequest$3 = /* @__PURE__ */ new WeakMap();\nvar _client2$2, _httpRequest2$3;\nclass DatasetsClient {\n constructor(client, httpRequest) {\n __privateAdd$3(this, _client2$2, void 0), __privateAdd$3(this, _httpRequest2$3, void 0), __privateSet$3(this, _client2$2, client), __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(name2, options) {\n return lastValueFrom(\n _modify(__privateGet$3(this, _client2$2), __privateGet$3(this, _httpRequest2$3), \"PUT\", name2, options)\n );\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(name2, options) {\n return lastValueFrom(\n _modify(__privateGet$3(this, _client2$2), __privateGet$3(this, _httpRequest2$3), \"PATCH\", name2, options)\n );\n }\n /**\n * Delete a dataset with the given name\n *\n * @param name - Name of the dataset to delete\n */\n delete(name2) {\n return lastValueFrom(_modify(__privateGet$3(this, _client2$2), __privateGet$3(this, _httpRequest2$3), \"DELETE\", name2));\n }\n /**\n * Fetch a list of datasets for the configured project\n */\n list() {\n return lastValueFrom(\n _request(__privateGet$3(this, _client2$2), __privateGet$3(this, _httpRequest2$3), { uri: \"/datasets\", tag: null })\n );\n }\n}\n_client2$2 = /* @__PURE__ */ new WeakMap(), _httpRequest2$3 = /* @__PURE__ */ new WeakMap();\nfunction _modify(client, httpRequest, method, name2, options) {\n return dataset(name2), _request(client, httpRequest, {\n method,\n uri: `/datasets/${name2}`,\n body: options,\n tag: null\n });\n}\nvar __accessCheck$2 = (obj, member, msg) => {\n if (!member.has(obj))\n throw TypeError(\"Cannot \" + msg);\n}, __privateGet$2 = (obj, member, getter) => (__accessCheck$2(obj, member, \"read from private field\"), getter ? getter.call(obj) : member.get(obj)), __privateAdd$2 = (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$2 = (obj, member, value, setter) => (__accessCheck$2(obj, member, \"write to private field\"), setter ? setter.call(obj, value) : member.set(obj, value), value), _client$1, _httpRequest$2;\nclass ObservableProjectsClient {\n constructor(client, httpRequest) {\n __privateAdd$2(this, _client$1, void 0), __privateAdd$2(this, _httpRequest$2, void 0), __privateSet$2(this, _client$1, client), __privateSet$2(this, _httpRequest$2, httpRequest);\n }\n list(options) {\n const uri = (options == null ? void 0 : options.includeMembers) === !1 ? \"/projects?includeMembers=false\" : \"/projects\";\n return _request(__privateGet$2(this, _client$1), __privateGet$2(this, _httpRequest$2), { uri });\n }\n /**\n * Fetch a project by project ID\n *\n * @param projectId - ID of the project to fetch\n */\n getById(projectId2) {\n return _request(__privateGet$2(this, _client$1), __privateGet$2(this, _httpRequest$2), { uri: `/projects/${projectId2}` });\n }\n}\n_client$1 = /* @__PURE__ */ new WeakMap(), _httpRequest$2 = /* @__PURE__ */ new WeakMap();\nvar _client2$1, _httpRequest2$2;\nclass ProjectsClient {\n constructor(client, httpRequest) {\n __privateAdd$2(this, _client2$1, void 0), __privateAdd$2(this, _httpRequest2$2, void 0), __privateSet$2(this, _client2$1, client), __privateSet$2(this, _httpRequest2$2, httpRequest);\n }\n list(options) {\n const uri = (options == null ? void 0 : options.includeMembers) === !1 ? \"/projects?includeMembers=false\" : \"/projects\";\n return lastValueFrom(_request(__privateGet$2(this, _client2$1), __privateGet$2(this, _httpRequest2$2), { uri }));\n }\n /**\n * Fetch a project by project ID\n *\n * @param projectId - ID of the project to fetch\n */\n getById(projectId2) {\n return lastValueFrom(\n _request(__privateGet$2(this, _client2$1), __privateGet$2(this, _httpRequest2$2), { uri: `/projects/${projectId2}` })\n );\n }\n}\n_client2$1 = /* @__PURE__ */ new WeakMap(), _httpRequest2$2 = /* @__PURE__ */ new WeakMap();\nvar __accessCheck$1 = (obj, member, msg) => {\n if (!member.has(obj))\n throw TypeError(\"Cannot \" + msg);\n}, __privateGet$1 = (obj, member, getter) => (__accessCheck$1(obj, member, \"read from private field\"), getter ? getter.call(obj) : member.get(obj)), __privateAdd$1 = (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$1 = (obj, member, value, setter) => (__accessCheck$1(obj, member, \"write to private field\"), setter ? setter.call(obj, value) : member.set(obj, value), value), _client, _httpRequest$1;\nclass ObservableUsersClient {\n constructor(client, httpRequest) {\n __privateAdd$1(this, _client, void 0), __privateAdd$1(this, _httpRequest$1, void 0), __privateSet$1(this, _client, client), __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(\n __privateGet$1(this, _client),\n __privateGet$1(this, _httpRequest$1),\n { uri: `/users/${id}` }\n );\n }\n}\n_client = /* @__PURE__ */ new WeakMap(), _httpRequest$1 = /* @__PURE__ */ new WeakMap();\nvar _client2, _httpRequest2$1;\nclass UsersClient {\n constructor(client, httpRequest) {\n __privateAdd$1(this, _client2, void 0), __privateAdd$1(this, _httpRequest2$1, void 0), __privateSet$1(this, _client2, client), __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(\n _request(__privateGet$1(this, _client2), __privateGet$1(this, _httpRequest2$1), {\n uri: `/users/${id}`\n })\n );\n }\n}\n_client2 = /* @__PURE__ */ new WeakMap(), _httpRequest2$1 = /* @__PURE__ */ new WeakMap();\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), _clientConfig, _httpRequest;\nconst _ObservableSanityClient = class _ObservableSanityClient2 {\n constructor(httpRequest, config = defaultConfig) {\n __privateAdd(this, _clientConfig, void 0), __privateAdd(this, _httpRequest, void 0), this.listen = _listen, this.config(config), __privateSet(this, _httpRequest, httpRequest), this.assets = new ObservableAssetsClient(this, __privateGet(this, _httpRequest)), this.datasets = new ObservableDatasetsClient(this, __privateGet(this, _httpRequest)), this.projects = new ObservableProjectsClient(this, __privateGet(this, _httpRequest)), this.users = new ObservableUsersClient(this, __privateGet(this, _httpRequest));\n }\n /**\n * Clone the client - returns a new instance\n */\n clone() {\n return new _ObservableSanityClient2(__privateGet(this, _httpRequest), this.config());\n }\n config(newConfig) {\n if (newConfig === void 0)\n return { ...__privateGet(this, _clientConfig) };\n if (__privateGet(this, _clientConfig) && __privateGet(this, _clientConfig).allowReconfigure === !1)\n throw new Error(\n \"Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client\"\n );\n return __privateSet(this, _clientConfig, initConfig(newConfig, __privateGet(this, _clientConfig) || {})), 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 const thisConfig = this.config();\n return new _ObservableSanityClient2(__privateGet(this, _httpRequest), {\n ...thisConfig,\n ...newConfig,\n stega: {\n ...thisConfig.stega || {},\n ...typeof (newConfig == null ? void 0 : newConfig.stega) == \"boolean\" ? { enabled: newConfig.stega } : (newConfig == null ? void 0 : newConfig.stega) || {}\n }\n });\n }\n fetch(query, params, options) {\n return _fetch(\n this,\n __privateGet(this, _httpRequest),\n __privateGet(this, _clientConfig).stega,\n query,\n params,\n options\n );\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 selection - Document ID, an array of document IDs, or an object with `query` and optional `params`, defining which document(s) to patch\n * @param operations - Optional object of patch operations to initialize the patch instance with\n * @returns Patch instance - call `.commit()` to perform the operations defined\n */\n patch(selection, operations) {\n return new ObservablePatch(selection, 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 * Perform an HTTP request against the Sanity API\n *\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};\n_clientConfig = /* @__PURE__ */ new WeakMap(), _httpRequest = /* @__PURE__ */ new WeakMap();\nlet ObservableSanityClient = _ObservableSanityClient;\nvar _clientConfig2, _httpRequest2;\nconst _SanityClient = class _SanityClient2 {\n constructor(httpRequest, config = defaultConfig) {\n __privateAdd(this, _clientConfig2, void 0), __privateAdd(this, _httpRequest2, void 0), this.listen = _listen, this.config(config), __privateSet(this, _httpRequest2, httpRequest), this.assets = new AssetsClient(this, __privateGet(this, _httpRequest2)), this.datasets = new DatasetsClient(this, __privateGet(this, _httpRequest2)), this.projects = new ProjectsClient(this, __privateGet(this, _httpRequest2)), this.users = new UsersClient(this, __privateGet(this, _httpRequest2)), this.observable = new ObservableSanityClient(httpRequest, config);\n }\n /**\n * Clone the client - returns a new instance\n */\n clone() {\n return new _SanityClient2(__privateGet(this, _httpRequest2), this.config());\n }\n config(newConfig) {\n if (newConfig === void 0)\n return { ...__privateGet(this, _clientConfig2) };\n if (__privateGet(this, _clientConfig2) && __privateGet(this, _clientConfig2).allowReconfigure === !1)\n throw new Error(\n \"Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client\"\n );\n return this.observable && this.observable.config(newConfig), __privateSet(this, _clientConfig2, initConfig(newConfig, __privateGet(this, _clientConfig2) || {})), 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 const thisConfig = this.config();\n return new _SanityClient2(__privateGet(this, _httpRequest2), {\n ...thisConfig,\n ...newConfig,\n stega: {\n ...thisConfig.stega || {},\n ...typeof (newConfig == null ? void 0 : newConfig.stega) == \"boolean\" ? { enabled: newConfig.stega } : (newConfig == null ? void 0 : newConfig.stega) || {}\n }\n });\n }\n fetch(query, params, options) {\n return lastValueFrom(\n _fetch(\n this,\n __privateGet(this, _httpRequest2),\n __privateGet(this, _clientConfig2).stega,\n query,\n params,\n options\n )\n );\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(\n _create(this, __privateGet(this, _httpRequest2), document, \"create\", options)\n );\n }\n createIfNotExists(document, options) {\n return lastValueFrom(\n _createIfNotExists(this, __privateGet(this, _httpRequest2), document, options)\n );\n }\n createOrReplace(document, options) {\n return lastValueFrom(\n _createOrReplace(this, __privateGet(this, _httpRequest2), document, options)\n );\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 selection - Document ID, an array of document IDs, or an object with `query` and optional `params`, defining which document(s) to patch\n * @param operations - Optional object of patch operations to initialize the patch instance with\n * @returns Patch instance - call `.commit()` to perform the operations defined\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 * Perform a request against the Sanity API\n * NOTE: Only use this for Sanity API endpoints, not for your own APIs!\n *\n * @param options - Request options\n * @returns Promise resolving to the response body\n */\n request(options) {\n return lastValueFrom(_request(this, __privateGet(this, _httpRequest2), options));\n }\n /**\n * Perform an HTTP request a `/data` sub-endpoint\n * NOTE: Considered internal, thus marked as deprecated. Use `request` instead.\n *\n * @deprecated - Use `request()` or your own HTTP library instead\n * @param endpoint - Endpoint to hit (mutate, query etc)\n * @param body - Request body\n * @param options - Request options\n * @internal\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};\n_clientConfig2 = /* @__PURE__ */ new WeakMap(), _httpRequest2 = /* @__PURE__ */ new WeakMap();\nlet SanityClient = _SanityClient;\nfunction defineCreateClientExports(envMiddleware, ClassConstructor) {\n return { requester: defineHttpRequest(envMiddleware, {}).defaultRequester, createClient: (config) => new ClassConstructor(\n defineHttpRequest(envMiddleware, {\n maxRetries: config.maxRetries,\n retryDelay: config.retryDelay\n }),\n config\n ) };\n}\nvar name = \"@sanity/client\", version = \"6.15.7\";\nconst middleware = [\n debug({ verbose: !0, namespace: \"sanity:client\" }),\n headers({ \"User-Agent\": `${name} ${version}` }),\n // Enable keep-alive, and in addition limit the number of sockets that can be opened.\n // This avoids opening too many connections to the server if someone tries to execute\n // a bunch of requests in parallel. It's recommended to have a concurrency limit\n // at a \"higher limit\" (i.e. you shouldn't actually execute hundreds of requests in parallel),\n // and this is mainly to minimize the impact for the network and server.\n //\n // We're currently matching the same defaults as browsers:\n // https://stackoverflow.com/questions/26003756/is-there-a-limit-practical-or-otherwise-to-the-number-of-web-sockets-a-page-op\n agent({\n keepAlive: !0,\n maxSockets: 30,\n maxTotalSockets: 256\n })\n];\nexport {\n BasePatch as B,\n ClientError as C,\n ObservablePatch as O,\n Patch as P,\n SanityClient as S,\n Transaction as T,\n ServerError as a,\n BaseTransaction as b,\n ObservableTransaction as c,\n defineCreateClientExports as d,\n ObservableSanityClient as e,\n b as f,\n middleware as m,\n printNoDefaultExport as p,\n vercelStegaCleanAll as v\n};\n//# sourceMappingURL=nodeMiddleware.js.map\n","import { p as printNoDefaultExport, d as defineCreateClientExports, S as SanityClient, m as middleware } from \"./_chunks-es/nodeMiddleware.js\";\nimport { B, b, C, O, e, c, P, a, T } from \"./_chunks-es/nodeMiddleware.js\";\nimport { adapter, environment } from \"get-it\";\nfunction defineDeprecatedCreateClient(createClient2) {\n return function(config) {\n return printNoDefaultExport(), createClient2(config);\n };\n}\nconst exp = defineCreateClientExports(middleware, SanityClient), requester = exp.requester, createClient = exp.createClient, deprecatedCreateClient = defineDeprecatedCreateClient(createClient);\nexport {\n B as BasePatch,\n b as BaseTransaction,\n C as ClientError,\n O as ObservablePatch,\n e as ObservableSanityClient,\n c as ObservableTransaction,\n P as Patch,\n SanityClient,\n a as ServerError,\n T as Transaction,\n createClient,\n deprecatedCreateClient as default,\n requester,\n adapter as unstable__adapter,\n environment as unstable__environment\n};\n//# sourceMappingURL=index.js.map\n","// Prevent webpack from bundling in webpack context,\n// use regular node require for unbundled context\n\n/* eslint-disable camelcase, no-undef */\ndeclare const __webpack_require__: boolean\ndeclare const __non_webpack_require__: typeof require\n\nconst requireFunc: typeof require =\n typeof __webpack_require__ === 'function' ? __non_webpack_require__ : require\n/* eslint-enable camelcase, no-undef */\n\nexport function dynamicRequire<T = any>(request: string): T {\n const mod = requireFunc(request)\n return mod.__esModule && mod.default ? mod.default : mod\n}\n\ndynamicRequire.resolve = requireFunc.resolve\n","/* eslint-disable no-sync */\n\n/**\n * Reads the Sanity CLI config from one of the following files (in preferred order):\n * - sanity.cli.js\n * - sanity.cli.ts\n *\n * Note: There are two ways of using this:\n * a) `getCliConfig(cwd)`\n * b) `getCliConfig(cwd, {forked: true})`\n *\n * Approach a is generally a bit faster as it avoids the forking startup time, while\n * approach b could be considered \"safer\" since any side-effects of running the config\n * file will not bleed into the current CLI process directly.\n */\nimport fs from 'fs'\nimport path from 'path'\nimport {Worker} from 'worker_threads'\n\nimport {type CliConfig, type SanityJson} from '../types'\nimport {getCliWorkerPath} from './cliWorker'\nimport {dynamicRequire} from './dynamicRequire'\n\nexport type CliMajorVersion = 2 | 3\n\nexport type CliConfigResult =\n | {config: SanityJson; path: string; version: 2}\n | {config: CliConfig; path: string; version: 3}\n | {config: null; path: string; version: CliMajorVersion}\n\nexport async function getCliConfig(\n cwd: string,\n {forked}: {forked?: boolean} = {},\n): Promise<CliConfigResult | null> {\n if (forked) {\n try {\n return await getCliConfigForked(cwd)\n } catch (err) {\n // Intentional noop - try unforked variant\n }\n }\n\n const {unregister} = __DEV__\n ? {unregister: () => undefined}\n : require('esbuild-register/dist/node').register()\n\n try {\n const v3Config = getSanityCliConfig(cwd)\n if (v3Config) {\n return v3Config\n }\n\n return getSanityJsonConfig(cwd)\n } catch (err) {\n throw err\n } finally {\n unregister()\n }\n}\n\nexport function getCliConfigSync(cwd: string): CliConfigResult | null {\n const v3Config = getSanityCliConfig(cwd)\n return v3Config ? v3Config : getSanityJsonConfig(cwd)\n}\n\nasync function getCliConfigForked(cwd: string): Promise<CliConfigResult | null> {\n const workerPath = await getCliWorkerPath('getCliConfig')\n return new Promise((resolve, reject) => {\n const worker = new Worker(workerPath, {\n workerData: cwd,\n // eslint-disable-next-line no-process-env\n env: process.env,\n })\n worker.on('message', (message) => {\n if (message.type === 'config') {\n resolve(message.config)\n } else {\n const error = new Error(message.error)\n ;(error as any).type = message.errorType\n reject(new Error(message.error))\n }\n })\n worker.on('error', reject)\n worker.on('exit', (code) => {\n if (code !== 0) {\n reject(new Error(`Worker stopped with exit code ${code}`))\n }\n })\n })\n}\n\nfunction getSanityJsonConfig(cwd: string): CliConfigResult | null {\n const configPath = path.join(cwd, 'sanity.json')\n\n if (!fs.existsSync(configPath)) {\n return null\n }\n\n return {\n config: loadJsonConfig(configPath),\n path: configPath,\n version: 2,\n }\n}\n\nfunction getSanityCliConfig(cwd: string): CliConfigResult | null {\n const jsConfigPath = path.join(cwd, 'sanity.cli.js')\n const tsConfigPath = path.join(cwd, 'sanity.cli.ts')\n\n const [js, ts] = [fs.existsSync(jsConfigPath), fs.existsSync(tsConfigPath)]\n\n if (!js && !ts) {\n return null\n }\n\n if (!js && ts) {\n return {\n config: importConfig(tsConfigPath),\n path: tsConfigPath,\n version: 3,\n }\n }\n\n if (js && ts) {\n warn('Found both `sanity.cli.js` and `sanity.cli.ts` - using sanity.cli.js')\n }\n\n return {\n config: importConfig(jsConfigPath),\n path: jsConfigPath,\n version: 3,\n }\n}\n\nfunction loadJsonConfig(filePath: string): SanityJson | null {\n try {\n const content = fs.readFileSync(filePath, 'utf8')\n return JSON.parse(content)\n } catch (err) {\n console.error(`Error reading \"${filePath}\": ${err.message}`)\n return null\n }\n}\n\nfunction importConfig(filePath: string): CliConfig | null {\n try {\n const config = dynamicRequire<CliConfig | {default: CliConfig} | null>(filePath)\n if (config === null || typeof config !== 'object') {\n throw new Error('Module export is not a configuration object')\n }\n\n return 'default' in config ? config.default : config\n } catch (err) {\n // If attempting to import `defineCliConfig` or similar from `sanity/cli`,\n // accept the fact that it might not be installed. Instead, let the CLI\n // give a warning about the `sanity` module not being installed\n if (err.code === 'MODULE_NOT_FOUND' && err.message.includes('sanity/cli')) {\n return null\n }\n\n console.error(`Error reading \"${filePath}\": ${err.message}`)\n return null\n }\n}\n\nfunction warn(warning: string) {\n if (typeof process.send === 'function') {\n process.send({type: 'warning', warning})\n } else {\n console.warn(warning)\n }\n}\n","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug');\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","'use strict';\nmodule.exports = (flag, argv) => {\n\targv = argv || process.argv;\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst pos = argv.indexOf(prefix + flag);\n\tconst terminatorPos = argv.indexOf('--');\n\treturn pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);\n};\n","'use strict';\nconst os = require('os');\nconst hasFlag = require('has-flag');\n\nconst env = process.env;\n\nlet forceColor;\nif (hasFlag('no-color') ||\n\thasFlag('no-colors') ||\n\thasFlag('color=false')) {\n\tforceColor = false;\n} else if (hasFlag('color') ||\n\thasFlag('colors') ||\n\thasFlag('color=true') ||\n\thasFlag('color=always')) {\n\tforceColor = true;\n}\nif ('FORCE_COLOR' in env) {\n\tforceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3\n\t};\n}\n\nfunction supportsColor(stream) {\n\tif (forceColor === false) {\n\t\treturn 0;\n\t}\n\n\tif (hasFlag('color=16m') ||\n\t\thasFlag('color=full') ||\n\t\thasFlag('color=truecolor')) {\n\t\treturn 3;\n\t}\n\n\tif (hasFlag('color=256')) {\n\t\treturn 2;\n\t}\n\n\tif (stream && !stream.isTTY && forceColor !== true) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor ? 1 : 0;\n\n\tif (process.platform === 'win32') {\n\t\t// Node.js 7.5.0 is the first version of Node.js to include a patch to\n\t\t// libuv that enables 256 color output on Windows. Anything earlier and it\n\t\t// won't work. However, here we target Node.js 8 at minimum as it is an LTS\n\t\t// release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows\n\t\t// release that supports 256 colors. Windows 10 build 14931 is the first release\n\t\t// that supports 16m/TrueColor.\n\t\tconst osRelease = os.release().split('.');\n\t\tif (\n\t\t\tNumber(process.versions.node.split('.')[0]) >= 8 &&\n\t\t\tNumber(osRelease[0]) >= 10 &&\n\t\t\tNumber(osRelease[2]) >= 10586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn min;\n\t}\n\n\tif ('TEAMCITY_VERSION' in env) {\n\t\treturn /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;\n\t}\n\n\tif (env.COLORTERM === 'truecolor') {\n\t\treturn 3;\n\t}\n\n\tif ('TERM_PROGRAM' in env) {\n\t\tconst version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n\t\tswitch (env.TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app':\n\t\t\t\treturn version >= 3 ? 3 : 2;\n\t\t\tcase 'Apple_Terminal':\n\t\t\t\treturn 2;\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (/-256(color)?$/i.test(env.TERM)) {\n\t\treturn 2;\n\t}\n\n\tif (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n\t\treturn 1;\n\t}\n\n\tif ('COLORTERM' in env) {\n\t\treturn 1;\n\t}\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\treturn min;\n}\n\nfunction getSupportLevel(stream) {\n\tconst level = supportsColor(stream);\n\treturn translateLevel(level);\n}\n\nmodule.exports = {\n\tsupportsColor: getSupportLevel,\n\tstdout: getSupportLevel(process.stdout),\n\tstderr: getSupportLevel(process.stderr)\n};\n","/**\n * Module dependencies.\n */\n\nconst tty = require('tty');\nconst util = require('util');\n\n/**\n * This is the Node.js implementation of `debug()`.\n */\n\nexports.init = init;\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.destroy = util.deprecate(\n\t() => {},\n\t'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'\n);\n\n/**\n * Colors.\n */\n\nexports.colors = [6, 2, 3, 4, 5, 1];\n\ntry {\n\t// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)\n\t// eslint-disable-next-line import/no-extraneous-dependencies\n\tconst supportsColor = require('supports-color');\n\n\tif (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {\n\t\texports.colors = [\n\t\t\t20,\n\t\t\t21,\n\t\t\t26,\n\t\t\t27,\n\t\t\t32,\n\t\t\t33,\n\t\t\t38,\n\t\t\t39,\n\t\t\t40,\n\t\t\t41,\n\t\t\t42,\n\t\t\t43,\n\t\t\t44,\n\t\t\t45,\n\t\t\t56,\n\t\t\t57,\n\t\t\t62,\n\t\t\t63,\n\t\t\t68,\n\t\t\t69,\n\t\t\t74,\n\t\t\t75,\n\t\t\t76,\n\t\t\t77,\n\t\t\t78,\n\t\t\t79,\n\t\t\t80,\n\t\t\t81,\n\t\t\t92,\n\t\t\t93,\n\t\t\t98,\n\t\t\t99,\n\t\t\t112,\n\t\t\t113,\n\t\t\t128,\n\t\t\t129,\n\t\t\t134,\n\t\t\t135,\n\t\t\t148,\n\t\t\t149,\n\t\t\t160,\n\t\t\t161,\n\t\t\t162,\n\t\t\t163,\n\t\t\t164,\n\t\t\t165,\n\t\t\t166,\n\t\t\t167,\n\t\t\t168,\n\t\t\t169,\n\t\t\t170,\n\t\t\t171,\n\t\t\t172,\n\t\t\t173,\n\t\t\t178,\n\t\t\t179,\n\t\t\t184,\n\t\t\t185,\n\t\t\t196,\n\t\t\t197,\n\t\t\t198,\n\t\t\t199,\n\t\t\t200,\n\t\t\t201,\n\t\t\t202,\n\t\t\t203,\n\t\t\t204,\n\t\t\t205,\n\t\t\t206,\n\t\t\t207,\n\t\t\t208,\n\t\t\t209,\n\t\t\t214,\n\t\t\t215,\n\t\t\t220,\n\t\t\t221\n\t\t];\n\t}\n} catch (error) {\n\t// Swallow - we only care if `supports-color` is available; it doesn't have to be.\n}\n\n/**\n * Build up the default `inspectOpts` object from the environment variables.\n *\n * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js\n */\n\nexports.inspectOpts = Object.keys(process.env).filter(key => {\n\treturn /^debug_/i.test(key);\n}).reduce((obj, key) => {\n\t// Camel-case\n\tconst prop = key\n\t\t.substring(6)\n\t\t.toLowerCase()\n\t\t.replace(/_([a-z])/g, (_, k) => {\n\t\t\treturn k.toUpperCase();\n\t\t});\n\n\t// Coerce string value into JS value\n\tlet val = process.env[key];\n\tif (/^(yes|on|true|enabled)$/i.test(val)) {\n\t\tval = true;\n\t} else if (/^(no|off|false|disabled)$/i.test(val)) {\n\t\tval = false;\n\t} else if (val === 'null') {\n\t\tval = null;\n\t} else {\n\t\tval = Number(val);\n\t}\n\n\tobj[prop] = val;\n\treturn obj;\n}, {});\n\n/**\n * Is stdout a TTY? Colored output is enabled when `true`.\n */\n\nfunction useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}\n\n/**\n * Adds ANSI color escape codes if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\tconst {namespace: name, useColors} = this;\n\n\tif (useColors) {\n\t\tconst c = this.color;\n\t\tconst colorCode = '\\u001B[3' + (c < 8 ? c : '8;5;' + c);\n\t\tconst prefix = ` ${colorCode};1m${name} \\u001B[0m`;\n\n\t\targs[0] = prefix + args[0].split('\\n').join('\\n' + prefix);\n\t\targs.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\\u001B[0m');\n\t} else {\n\t\targs[0] = getDate() + name + ' ' + args[0];\n\t}\n}\n\nfunction getDate() {\n\tif (exports.inspectOpts.hideDate) {\n\t\treturn '';\n\t}\n\treturn new Date().toISOString() + ' ';\n}\n\n/**\n * Invokes `util.format()` with the specified arguments and writes to stderr.\n */\n\nfunction log(...args) {\n\treturn process.stderr.write(util.format(...args) + '\\n');\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\tif (namespaces) {\n\t\tprocess.env.DEBUG = namespaces;\n\t} else {\n\t\t// If you set a process.env field to null or undefined, it gets cast to the\n\t\t// string 'null' or 'undefined'. Just delete instead.\n\t\tdelete process.env.DEBUG;\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n\treturn process.env.DEBUG;\n}\n\n/**\n * Init logic for `debug` instances.\n *\n * Create a new `inspectOpts` object in case `useColors` is set\n * differently for a particular `debug` instance.\n */\n\nfunction init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %o to `util.inspect()`, all on a single line.\n */\n\nformatters.o = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts)\n\t\t.split('\\n')\n\t\t.map(str => str.trim())\n\t\t.join(' ');\n};\n\n/**\n * Map %O to `util.inspect()`, allowing multiple lines if needed.\n */\n\nformatters.O = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts);\n};\n","/**\n * Detect Electron renderer / nwjs process, which is node, but we should\n * treat as a browser.\n */\n\nif (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {\n\tmodule.exports = require('./browser.js');\n} else {\n\tmodule.exports = require('./node.js');\n}\n","import debugIt from 'debug'\n\nexport const debug = debugIt('sanity:cli')\n","/* eslint-disable no-sync */\nimport fs from 'fs'\nimport path from 'path'\n\nimport {debug} from '../debug'\n\n/**\n * Resolve project root directory, falling back to cwd if it cannot be found\n */\nexport function resolveRootDir(cwd: string): string {\n try {\n return resolveProjectRoot(cwd) || cwd\n } catch (err) {\n throw new Error(`Error occurred trying to resolve project root:\\n${err.message}`)\n }\n}\n\nfunction hasStudioConfig(basePath: string): boolean {\n const buildConfigs = [\n fileExists(path.join(basePath, 'sanity.config.js')),\n fileExists(path.join(basePath, 'sanity.config.ts')),\n isSanityV2StudioRoot(basePath),\n ]\n\n return buildConfigs.some(Boolean)\n}\n\nfunction resolveProjectRoot(basePath: string, iterations = 0): string | false {\n if (hasStudioConfig(basePath)) {\n return basePath\n }\n\n const parentDir = path.resolve(basePath, '..')\n if (parentDir === basePath || iterations > 30) {\n // Reached root (or max depth), give up\n return false\n }\n\n return resolveProjectRoot(parentDir, iterations + 1)\n}\n\nfunction isSanityV2StudioRoot(basePath: string): boolean {\n try {\n const content = fs.readFileSync(path.join(basePath, 'sanity.json'), 'utf8')\n const sanityJson = JSON.parse(content)\n const isRoot = Boolean(sanityJson?.root)\n if (isRoot) {\n debug('Found Sanity v2 studio root at %s', basePath)\n }\n return isRoot\n } catch (err) {\n return false\n }\n}\n\nfunction fileExists(filePath: string): boolean {\n return fs.existsSync(filePath)\n}\n","import {createClient, type SanityClient} from '@sanity/client'\n\nimport {getCliConfigSync} from './util/getCliConfig'\nimport {resolveRootDir} from './util/resolveRootDir'\n\nexport interface CliClientOptions {\n cwd?: string\n\n projectId?: string\n dataset?: string\n useCdn?: boolean\n token?: string\n apiVersion?: string\n}\n\nexport function getCliClient(options: CliClientOptions = {}): SanityClient {\n if (typeof process !== 'object') {\n throw new Error('getCliClient() should only be called from node.js scripts')\n }\n\n const {\n // eslint-disable-next-line no-process-env\n cwd = process.env.SANITY_BASE_PATH || process.cwd(),\n useCdn = false,\n apiVersion = '2022-06-06',\n projectId,\n dataset,\n token = getCliClient.__internal__getToken(),\n } = options\n\n if (projectId && dataset) {\n return createClient({projectId, dataset, apiVersion, useCdn, token})\n }\n\n const rootDir = resolveRootDir(cwd)\n const {config} = getCliConfigSync(rootDir) || {}\n if (!config) {\n throw new Error('Unable to resolve CLI configuration')\n }\n\n const apiConfig = config?.api || {}\n if (!apiConfig.projectId || !apiConfig.dataset) {\n throw new Error('Unable to resolve project ID/dataset from CLI configuration')\n }\n\n return createClient({\n projectId: apiConfig.projectId,\n dataset: apiConfig.dataset,\n apiVersion,\n useCdn,\n token,\n })\n}\n\n/* eslint-disable camelcase */\n/**\n * @internal\n * @deprecated This is only for INTERNAL use, and should not be relied upon outside of official Sanity modules\n * @returns A token to use when constructing a client without a `token` explicitly defined, or undefined\n */\ngetCliClient.__internal__getToken = (): string | undefined => undefined\n/* eslint-enable camelcase */\n","import {type CliConfig} from './types'\n\n/** @beta */\nexport function defineCliConfig(config: CliConfig): CliConfig {\n return config\n}\n\n/**\n * @deprecated Use `defineCliConfig` instead\n * @beta\n */\nexport function createCliConfig(config: CliConfig): CliConfig {\n return config\n}\n","const fs = require('fs')\nconst path = require('path')\nconst os = require('os')\nconst crypto = require('crypto')\nconst packageJson = require('../package.json')\n\nconst version = packageJson.version\n\nconst LINE = /(?:^|^)\\s*(?:export\\s+)?([\\w.-]+)(?:\\s*=\\s*?|:\\s+?)(\\s*'(?:\\\\'|[^'])*'|\\s*\"(?:\\\\\"|[^\"])*\"|\\s*`(?:\\\\`|[^`])*`|[^#\\r\\n]+)?\\s*(?:#.*)?(?:$|$)/mg\n\n// Parse src into an Object\nfunction parse (src) {\n const obj = {}\n\n // Convert buffer to string\n let lines = src.toString()\n\n // Convert line breaks to same format\n lines = lines.replace(/\\r\\n?/mg, '\\n')\n\n let match\n while ((match = LINE.exec(lines)) != null) {\n const key = match[1]\n\n // Default undefined or null to empty string\n let value = (match[2] || '')\n\n // Remove whitespace\n value = value.trim()\n\n // Check if double quoted\n const maybeQuote = value[0]\n\n // Remove surrounding quotes\n value = value.replace(/^(['\"`])([\\s\\S]*)\\1$/mg, '$2')\n\n // Expand newlines if double quoted\n if (maybeQuote === '\"') {\n value = value.replace(/\\\\n/g, '\\n')\n value = value.replace(/\\\\r/g, '\\r')\n }\n\n // Add to object\n obj[key] = value\n }\n\n return obj\n}\n\nfunction _parseVault (options) {\n const vaultPath = _vaultPath(options)\n\n // Parse .env.vault\n const result = DotenvModule.configDotenv({ path: vaultPath })\n if (!result.parsed) {\n throw new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`)\n }\n\n // handle scenario for comma separated keys - for use with key rotation\n // example: DOTENV_KEY=\"dotenv://:key_1234@dotenv.org/vault/.env.vault?environment=prod,dotenv://:key_7890@dotenv.org/vault/.env.vault?environment=prod\"\n const keys = _dotenvKey(options).split(',')\n const length = keys.length\n\n let decrypted\n for (let i = 0; i < length; i++) {\n try {\n // Get full key\n const key = keys[i].trim()\n\n // Get instructions for decrypt\n const attrs = _instructions(result, key)\n\n // Decrypt\n decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key)\n\n break\n } catch (error) {\n // last key\n if (i + 1 >= length) {\n throw error\n }\n // try next key\n }\n }\n\n // Parse decrypted .env string\n return DotenvModule.parse(decrypted)\n}\n\nfunction _log (message) {\n console.log(`[dotenv@${version}][INFO] ${message}`)\n}\n\nfunction _warn (message) {\n console.log(`[dotenv@${version}][WARN] ${message}`)\n}\n\nfunction _debug (message) {\n console.log(`[dotenv@${version}][DEBUG] ${message}`)\n}\n\nfunction _dotenvKey (options) {\n // prioritize developer directly setting options.DOTENV_KEY\n if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) {\n return options.DOTENV_KEY\n }\n\n // secondary infra already contains a DOTENV_KEY environment variable\n if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) {\n return process.env.DOTENV_KEY\n }\n\n // fallback to empty string\n return ''\n}\n\nfunction _instructions (result, dotenvKey) {\n // Parse DOTENV_KEY. Format is a URI\n let uri\n try {\n uri = new URL(dotenvKey)\n } catch (error) {\n if (error.code === 'ERR_INVALID_URL') {\n throw new Error('INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenv.org/vault/.env.vault?environment=development')\n }\n\n throw error\n }\n\n // Get decrypt key\n const key = uri.password\n if (!key) {\n throw new Error('INVALID_DOTENV_KEY: Missing key part')\n }\n\n // Get environment\n const environment = uri.searchParams.get('environment')\n if (!environment) {\n throw new Error('INVALID_DOTENV_KEY: Missing environment part')\n }\n\n // Get ciphertext payload\n const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`\n const ciphertext = result.parsed[environmentKey] // DOTENV_VAULT_PRODUCTION\n if (!ciphertext) {\n throw new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`)\n }\n\n return { ciphertext, key }\n}\n\nfunction _vaultPath (options) {\n let dotenvPath = path.resolve(process.cwd(), '.env')\n\n if (options && options.path && options.path.length > 0) {\n dotenvPath = options.path\n }\n\n // Locate .env.vault\n return dotenvPath.endsWith('.vault') ? dotenvPath : `${dotenvPath}.vault`\n}\n\nfunction _resolveHome (envPath) {\n return envPath[0] === '~' ? path.join(os.homedir(), envPath.slice(1)) : envPath\n}\n\nfunction _configVault (options) {\n _log('Loading env from encrypted .env.vault')\n\n const parsed = DotenvModule._parseVault(options)\n\n let processEnv = process.env\n if (options && options.processEnv != null) {\n processEnv = options.processEnv\n }\n\n DotenvModule.populate(processEnv, parsed, options)\n\n return { parsed }\n}\n\nfunction configDotenv (options) {\n let dotenvPath = path.resolve(process.cwd(), '.env')\n let encoding = 'utf8'\n const debug = Boolean(options && options.debug)\n\n if (options) {\n if (options.path != null) {\n dotenvPath = _resolveHome(options.path)\n }\n if (options.encoding != null) {\n encoding = options.encoding\n } else {\n if (debug) {\n _debug('No encoding is specified. UTF-8 is used by default')\n }\n }\n }\n\n try {\n // Specifying an encoding returns a string instead of a buffer\n const parsed = DotenvModule.parse(fs.readFileSync(dotenvPath, { encoding }))\n\n let processEnv = process.env\n if (options && options.processEnv != null) {\n processEnv = options.processEnv\n }\n\n DotenvModule.populate(processEnv, parsed, options)\n\n return { parsed }\n } catch (e) {\n if (debug) {\n _debug(`Failed to load ${dotenvPath} ${e.message}`)\n }\n\n return { error: e }\n }\n}\n\n// Populates process.env from .env file\nfunction config (options) {\n const vaultPath = _vaultPath(options)\n\n // fallback to original dotenv if DOTENV_KEY is not set\n if (_dotenvKey(options).length === 0) {\n return DotenvModule.configDotenv(options)\n }\n\n // dotenvKey exists but .env.vault file does not exist\n if (!fs.existsSync(vaultPath)) {\n _warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`)\n\n return DotenvModule.configDotenv(options)\n }\n\n return DotenvModule._configVault(options)\n}\n\nfunction decrypt (encrypted, keyStr) {\n const key = Buffer.from(keyStr.slice(-64), 'hex')\n let ciphertext = Buffer.from(encrypted, 'base64')\n\n const nonce = ciphertext.subarray(0, 12)\n const authTag = ciphertext.subarray(-16)\n ciphertext = ciphertext.subarray(12, -16)\n\n try {\n const aesgcm = crypto.createDecipheriv('aes-256-gcm', key, nonce)\n aesgcm.setAuthTag(authTag)\n return `${aesgcm.update(ciphertext)}${aesgcm.final()}`\n } catch (error) {\n const isRange = error instanceof RangeError\n const invalidKeyLength = error.message === 'Invalid key length'\n const decryptionFailed = error.message === 'Unsupported state or unable to authenticate data'\n\n if (isRange || invalidKeyLength) {\n const msg = 'INVALID_DOTENV_KEY: It must be 64 characters long (or more)'\n throw new Error(msg)\n } else if (decryptionFailed) {\n const msg = 'DECRYPTION_FAILED: Please check your DOTENV_KEY'\n throw new Error(msg)\n } else {\n console.error('Error: ', error.code)\n console.error('Error: ', error.message)\n throw error\n }\n }\n}\n\n// Populate process.env with parsed values\nfunction populate (processEnv, parsed, options = {}) {\n const debug = Boolean(options && options.debug)\n const override = Boolean(options && options.override)\n\n if (typeof parsed !== 'object') {\n throw new Error('OBJECT_REQUIRED: Please check the processEnv argument being passed to populate')\n }\n\n // Set process.env\n for (const key of Object.keys(parsed)) {\n if (Object.prototype.hasOwnProperty.call(processEnv, key)) {\n if (override === true) {\n processEnv[key] = parsed[key]\n }\n\n if (debug) {\n if (override === true) {\n _debug(`\"${key}\" is already defined and WAS overwritten`)\n } else {\n _debug(`\"${key}\" is already defined and was NOT overwritten`)\n }\n }\n } else {\n processEnv[key] = parsed[key]\n }\n }\n}\n\nconst DotenvModule = {\n configDotenv,\n _configVault,\n _parseVault,\n config,\n decrypt,\n parse,\n populate\n}\n\nmodule.exports.configDotenv = DotenvModule.configDotenv\nmodule.exports._configVault = DotenvModule._configVault\nmodule.exports._parseVault = DotenvModule._parseVault\nmodule.exports.config = DotenvModule.config\nmodule.exports.decrypt = DotenvModule.decrypt\nmodule.exports.parse = DotenvModule.parse\nmodule.exports.populate = DotenvModule.populate\n\nmodule.exports = DotenvModule\n","'use strict'\n\nfunction _interpolate (envValue, environment, config) {\n const matches = envValue.match(/(.?\\${*[\\w]*(?::-[\\w/]*)?}*)/g) || []\n\n return matches.reduce(function (newEnv, match, index) {\n const parts = /(.?)\\${*([\\w]*(?::-[\\w/]*)?)?}*/g.exec(match)\n if (!parts || parts.length === 0) {\n return newEnv\n }\n\n const prefix = parts[1]\n\n let value, replacePart\n\n if (prefix === '\\\\') {\n replacePart = parts[0]\n value = replacePart.replace('\\\\$', '$')\n } else {\n const keyParts = parts[2].split(':-')\n const key = keyParts[0]\n replacePart = parts[0].substring(prefix.length)\n // process.env value 'wins' over .env file's value\n value = Object.prototype.hasOwnProperty.call(environment, key)\n ? environment[key]\n : (config.parsed[key] || keyParts[1] || '')\n\n // If the value is found, remove nested expansions.\n if (keyParts.length > 1 && value) {\n const replaceNested = matches[index + 1]\n matches[index + 1] = ''\n\n newEnv = newEnv.replace(replaceNested, '')\n }\n // Resolve recursive interpolations\n value = _interpolate(value, environment, config)\n }\n\n return newEnv.replace(replacePart, value)\n }, envValue)\n}\n\nfunction expand (config) {\n // if ignoring process.env, use a blank object\n const environment = config.ignoreProcessEnv ? {} : process.env\n\n for (const configKey in config.parsed) {\n const value = Object.prototype.hasOwnProperty.call(environment, configKey) ? environment[configKey] : config.parsed[configKey]\n\n config.parsed[configKey] = _interpolate(value, environment, config)\n }\n\n for (const processKey in config.parsed) {\n environment[processKey] = config.parsed[processKey]\n }\n\n return config\n}\n\nmodule.exports.expand = expand\n","/**\n * This is an \"inlined\" version of Vite's `loadEnv` function,\n * simplified somewhat to only support our use case.\n *\n * Ideally we'd just use `loadEnv` from Vite, but importing it\n * causes bundling issues due to node APIs and downstream dependencies.\n *\n * Vite is MIT licensed, copyright (c) Yuxi (Evan) You and Vite contributors.\n */\n\n/* eslint-disable no-process-env */\nimport fs from 'node:fs'\nimport path from 'node:path'\n\nimport {parse} from 'dotenv'\nimport {expand} from 'dotenv-expand'\n\nexport function loadEnv(\n mode: string,\n envDir: string,\n prefixes: string[] = ['VITE_'],\n): Record<string, string> {\n if (mode === 'local') {\n throw new Error(\n `\"local\" cannot be used as a mode name because it conflicts with ` +\n `the .local postfix for .env files.`,\n )\n }\n\n const env: Record<string, string> = {}\n const envFiles = [\n /** default file */ `.env`,\n /** local file */ `.env.local`,\n /** mode file */ `.env.${mode}`,\n /** mode local file */ `.env.${mode}.local`,\n ]\n\n const parsed = Object.fromEntries(\n envFiles.flatMap((file) => {\n const envPath = lookupFile(envDir, [file], {\n rootDir: envDir,\n })\n if (!envPath) return []\n return Object.entries(parse(fs.readFileSync(envPath)))\n }),\n )\n\n // test NODE_ENV override before expand as otherwise process.env.NODE_ENV would override this\n if (parsed.NODE_ENV && process.env.VITE_USER_NODE_ENV === undefined) {\n process.env.VITE_USER_NODE_ENV = parsed.NODE_ENV\n }\n // support BROWSER and BROWSER_ARGS env variables\n if (parsed.BROWSER && process.env.BROWSER === undefined) {\n process.env.BROWSER = parsed.BROWSER\n }\n if (parsed.BROWSER_ARGS && process.env.BROWSER_ARGS === undefined) {\n process.env.BROWSER_ARGS = parsed.BROWSER_ARGS\n }\n\n try {\n // let environment variables use each other\n expand({parsed})\n } catch (e) {\n // custom error handling until https://github.com/motdotla/dotenv-expand/issues/65 is fixed upstream\n // check for message \"TypeError: Cannot read properties of undefined (reading 'split')\"\n if (e.message.includes('split')) {\n throw new Error('dotenv-expand failed to expand env vars. Maybe you need to escape `$`?')\n }\n throw e\n }\n\n // only keys that start with prefix are exposed to client\n for (const [key, value] of Object.entries(parsed)) {\n if (prefixes.some((prefix) => key.startsWith(prefix))) {\n env[key] = value\n }\n }\n\n // check if there are actual env variables starting with VITE_*\n // these are typically provided inline and should be prioritized\n for (const key in process.env) {\n if (prefixes.some((prefix) => key.startsWith(prefix))) {\n env[key] = process.env[key] as string\n }\n }\n\n return env\n}\n\nfunction lookupFile(\n dir: string,\n formats: string[],\n options?: {\n rootDir?: string\n },\n): string | undefined {\n for (const format of formats) {\n const fullPath = path.join(dir, format)\n // eslint-disable-next-line no-sync\n if (fs.existsSync(fullPath) && fs.statSync(fullPath).isFile()) {\n return fullPath\n }\n }\n const parentDir = path.dirname(dir)\n if (parentDir !== dir && (!options?.rootDir || parentDir.startsWith(options?.rootDir))) {\n return lookupFile(parentDir, formats, options)\n }\n\n return undefined\n}\n"],"names":["d","b","f","s","from","v","Subscription","config","Subscriber","ConsumerObserver","SafeSubscriber","Observable","observable","Symbol_observable","OperatorSubscriber","err","Symbol_iterator","process","iterator","isArray","i","warn","path","description","document","name","version","debug","fs","parse","ms","require$$0","exports","c","os","hasFlag","require$$1","require$$2","useColors","require$$3","srcModule","projectId","dataset","src","mainModule","expand"],"mappings":";;;;;;;;;;;;AAgBA,IAAI,gBAAgB,SAAS,GAAG,GAAG;AACjC,yBAAgB,OAAO,kBAClB,EAAE,WAAW,CAAA,eAAgB,SAAS,SAAUA,IAAGC,IAAG;AAAE,IAAAD,GAAE,YAAYC;AAAA,EAAE,KACzE,SAAUD,IAAGC,IAAG;AAAE,aAAS,KAAKA;AAAG,MAAI,OAAO,UAAU,eAAe,KAAKA,IAAG,CAAC,MAAGD,GAAE,CAAC,IAAIC,GAAE,CAAC;AAAA,KAC1F,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