-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path680-4b78e15d1a65893897ef.js.map
1 lines (1 loc) · 39.4 KB
/
680-4b78e15d1a65893897ef.js.map
1
{"version":3,"file":"680-4b78e15d1a65893897ef.js","mappings":";wHAAA,IAAIA,EAAU,aAEd,SAASC,IACP,aAGAC,EAAOC,QAAUF,EAAsB,WACrC,OAAOE,GACND,EAAOC,QAAQC,YAAa,EAAMF,EAAOC,QAAiB,QAAID,EAAOC,QACxE,IAAIA,EAAU,GACVE,EAAKC,OAAOC,UACZC,EAASH,EAAGI,eACZC,EAAU,mBAAqBC,OAASA,OAAS,GACjDC,EAAiBF,EAAQG,UAAY,aACrCC,EAAsBJ,EAAQK,eAAiB,kBAC/CC,EAAoBN,EAAQO,aAAe,gBAE/C,SAASC,EAAOC,EAAKC,EAAKC,GACxB,OAAOf,OAAOgB,eAAeH,EAAKC,EAAK,CACrCC,MAAOA,EACPE,YAAY,EACZC,cAAc,EACdC,UAAU,IACRN,EAAIC,GAGV,IACEF,EAAO,GAAI,IACX,MAAOQ,GACPR,EAAS,SAAgBC,EAAKC,EAAKC,GACjC,OAAOF,EAAIC,GAAOC,GAItB,SAASM,EAAKC,EAASC,EAASC,EAAMC,GACpC,IAAIC,EAAiBH,GAAWA,EAAQtB,qBAAqB0B,EAAYJ,EAAUI,EAC/EC,EAAY5B,OAAO6B,OAAOH,EAAezB,WACzC6B,EAAU,IAAIC,EAAQN,GAAe,IACzC,OAAOG,EAAUI,QAAU,SAAUV,EAASE,EAAMM,GAClD,IAAIG,EAAQ,iBACZ,OAAO,SAAUC,EAAQC,GACvB,GAAI,cAAgBF,EAAO,MAAM,IAAIG,MAAM,gCAE3C,GAAI,cAAgBH,EAAO,CACzB,GAAI,UAAYC,EAAQ,MAAMC,EAC9B,OAAOE,IAGT,IAAKP,EAAQI,OAASA,EAAQJ,EAAQK,IAAMA,IAAO,CACjD,IAAIG,EAAWR,EAAQQ,SAEvB,GAAIA,EAAU,CACZ,IAAIC,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RU,UAAWf,IACPgB,EAAAA,EAAAA,GAAalB,EAAWC,EAAUQ,EAAQV,EAASI","sources":["webpack://gatsby-starter-default/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://gatsby-starter-default/./node_modules/@babel/runtime/helpers/typeof.js","webpack://gatsby-starter-default/./node_modules/@babel/runtime/regenerator/index.js","webpack://gatsby-starter-default/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://gatsby-starter-default/../src/components/intersection-observer.ts","webpack://gatsby-starter-default/../src/components/lazy-hydrate.tsx"],"sourcesContent":["var _typeof = require(\"./typeof.js\")[\"default\"];\n\nfunction _regeneratorRuntime() {\n \"use strict\";\n /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return exports;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var exports = {},\n Op = Object.prototype,\n hasOwn = Op.hasOwnProperty,\n $Symbol = \"function\" == typeof Symbol ? Symbol : {},\n iteratorSymbol = $Symbol.iterator || \"@@iterator\",\n asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\",\n toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n return Object.defineProperty(obj, key, {\n value: value,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), obj[key];\n }\n\n try {\n define({}, \"\");\n } catch (err) {\n define = function define(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,\n generator = Object.create(protoGenerator.prototype),\n context = new Context(tryLocsList || []);\n return generator._invoke = function (innerFn, self, context) {\n var state = \"suspendedStart\";\n return function (method, arg) {\n if (\"executing\" === state) throw new Error(\"Generator is already running\");\n\n if (\"completed\" === state) {\n if (\"throw\" === method) throw arg;\n return doneResult();\n }\n\n for (context.method = method, context.arg = arg;;) {\n var delegate = context.delegate;\n\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (\"next\" === context.method) context.sent = context._sent = context.arg;else if (\"throw\" === context.method) {\n if (\"suspendedStart\" === state) throw state = \"completed\", context.arg;\n context.dispatchException(context.arg);\n } else \"return\" === context.method && context.abrupt(\"return\", context.arg);\n state = \"executing\";\n var record = tryCatch(innerFn, self, context);\n\n if (\"normal\" === record.type) {\n if (state = context.done ? \"completed\" : \"suspendedYield\", record.arg === ContinueSentinel) continue;\n return {\n value: record.arg,\n done: context.done\n };\n }\n\n \"throw\" === record.type && (state = \"completed\", context.method = \"throw\", context.arg = record.arg);\n }\n };\n }(innerFn, self, context), generator;\n }\n\n function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }\n\n exports.wrap = wrap;\n var ContinueSentinel = {};\n\n function Generator() {}\n\n function GeneratorFunction() {}\n\n function GeneratorFunctionPrototype() {}\n\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n var getProto = Object.getPrototypeOf,\n NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);\n var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);\n\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function (method) {\n define(prototype, method, function (arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n\n if (\"throw\" !== record.type) {\n var result = record.arg,\n value = result.value;\n return value && \"object\" == _typeof(value) && hasOwn.call(value, \"__await\") ? PromiseImpl.resolve(value.__await).then(function (value) {\n invoke(\"next\", value, resolve, reject);\n }, function (err) {\n invoke(\"throw\", err, resolve, reject);\n }) : PromiseImpl.resolve(value).then(function (unwrapped) {\n result.value = unwrapped, resolve(result);\n }, function (error) {\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n\n reject(record.arg);\n }\n\n var previousPromise;\n\n this._invoke = function (method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function (resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n };\n }\n\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n\n if (undefined === method) {\n if (context.delegate = null, \"throw\" === context.method) {\n if (delegate.iterator[\"return\"] && (context.method = \"return\", context.arg = undefined, maybeInvokeDelegate(delegate, context), \"throw\" === context.method)) return ContinueSentinel;\n context.method = \"throw\", context.arg = new TypeError(\"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n if (\"throw\" === record.type) return context.method = \"throw\", context.arg = record.arg, context.delegate = null, ContinueSentinel;\n var info = record.arg;\n return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, \"return\" !== context.method && (context.method = \"next\", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = \"throw\", context.arg = new TypeError(\"iterator result is not an object\"), context.delegate = null, ContinueSentinel);\n }\n\n function pushTryEntry(locs) {\n var entry = {\n tryLoc: locs[0]\n };\n 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\", delete record.arg, entry.completion = record;\n }\n\n function Context(tryLocsList) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);\n }\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) return iteratorMethod.call(iterable);\n if (\"function\" == typeof iterable.next) return iterable;\n\n if (!isNaN(iterable.length)) {\n var i = -1,\n next = function next() {\n for (; ++i < iterable.length;) {\n if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;\n }\n\n return next.value = undefined, next.done = !0, next;\n };\n\n return next.next = next;\n }\n }\n\n return {\n next: doneResult\n };\n }\n\n function doneResult() {\n return {\n value: undefined,\n done: !0\n };\n }\n\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, \"constructor\", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\"), exports.isGeneratorFunction = function (genFun) {\n var ctor = \"function\" == typeof genFun && genFun.constructor;\n return !!ctor && (ctor === GeneratorFunction || \"GeneratorFunction\" === (ctor.displayName || ctor.name));\n }, exports.mark = function (genFun) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, \"GeneratorFunction\")), genFun.prototype = Object.create(Gp), genFun;\n }, exports.awrap = function (arg) {\n return {\n __await: arg\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n void 0 === PromiseImpl && (PromiseImpl = Promise);\n var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {\n return result.done ? result.value : iter.next();\n });\n }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, \"Generator\"), define(Gp, iteratorSymbol, function () {\n return this;\n }), define(Gp, \"toString\", function () {\n return \"[object Generator]\";\n }), exports.keys = function (object) {\n var keys = [];\n\n for (var key in object) {\n keys.push(key);\n }\n\n return keys.reverse(), function next() {\n for (; keys.length;) {\n var key = keys.pop();\n if (key in object) return next.value = key, next.done = !1, next;\n }\n\n return next.done = !0, next;\n };\n }, exports.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(skipTempReset) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {\n \"t\" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);\n }\n },\n stop: function stop() {\n this.done = !0;\n var rootRecord = this.tryEntries[0].completion;\n if (\"throw\" === rootRecord.type) throw rootRecord.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(exception) {\n if (this.done) throw exception;\n var context = this;\n\n function handle(loc, caught) {\n return record.type = \"throw\", record.arg = exception, context.next = loc, caught && (context.method = \"next\", context.arg = undefined), !!caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i],\n record = entry.completion;\n if (\"root\" === entry.tryLoc) return handle(\"end\");\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\"),\n hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n } else {\n if (!hasFinally) throw new Error(\"try statement without catch or finally\");\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n\n if (entry.tryLoc <= this.prev && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n finallyEntry && (\"break\" === type || \"continue\" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);\n var record = finallyEntry ? finallyEntry.completion : {};\n return record.type = type, record.arg = arg, finallyEntry ? (this.method = \"next\", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);\n },\n complete: function complete(record, afterLoc) {\n if (\"throw\" === record.type) throw record.arg;\n return \"break\" === record.type || \"continue\" === record.type ? this.next = record.arg : \"return\" === record.type ? (this.rval = this.arg = record.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;\n },\n finish: function finish(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;\n }\n },\n \"catch\": function _catch(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n\n if (\"throw\" === record.type) {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n\n return thrown;\n }\n }\n\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(iterable, resultName, nextLoc) {\n return this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n }, \"next\" === this.method && (this.arg = undefined), ContinueSentinel;\n }\n }, exports;\n}\n\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\n\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}","let intersectionObserver: IntersectionObserver\n\nexport type Unobserver = () => void\n\nconst ioEntryMap = new WeakMap<HTMLElement, () => void>()\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst connection =\n (navigator as any).connection ||\n (navigator as any).mozConnection ||\n (navigator as any).webkitConnection\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\n// These match the thresholds used in Chrome's native lazy loading\n// @see https://web.dev/browser-level-image-lazy-loading/#distance-from-viewport-thresholds\nconst FAST_CONNECTION_THRESHOLD = `1250px`\nconst SLOW_CONNECTION_THRESHOLD = `2500px`\n\nexport function createIntersectionObserver(\n callback: () => void\n): (element: HTMLElement) => Unobserver {\n const connectionType = connection?.effectiveType\n\n // if we don't support intersectionObserver we don't lazy load (Sorry IE 11).\n if (!(`IntersectionObserver` in window)) {\n return function observe(): Unobserver {\n callback()\n return function unobserve(): void {}\n }\n }\n\n if (!intersectionObserver) {\n intersectionObserver = new IntersectionObserver(\n entries => {\n entries.forEach(entry => {\n if (entry.isIntersecting) {\n // Get the matching entry's callback and call it\n ioEntryMap.get(entry.target as HTMLElement)?.()\n // We only need to call it once\n ioEntryMap.delete(entry.target as HTMLElement)\n }\n })\n },\n {\n rootMargin:\n connectionType === `4g` && !connection?.saveData\n ? FAST_CONNECTION_THRESHOLD\n : SLOW_CONNECTION_THRESHOLD,\n }\n )\n }\n\n return function observe(element: HTMLElement): Unobserver {\n // Store a reference to the callback mapped to the element being watched\n ioEntryMap.set(element, callback)\n intersectionObserver.observe(element)\n\n return function unobserve(): void {\n if (intersectionObserver && element) {\n ioEntryMap.delete(element)\n intersectionObserver.unobserve(element)\n }\n }\n }\n}\n","import React from \"react\"\nimport { renderToStaticMarkup } from \"react-dom/server\"\nimport { LayoutWrapper } from \"./layout-wrapper\"\nimport { Placeholder } from \"./placeholder\"\nimport { MainImage } from \"./main-image\"\nimport {\n hasNativeLazyLoadSupport,\n getMainProps,\n getPlaceholderProps,\n} from \"./hooks\"\nimport { createIntersectionObserver } from \"./intersection-observer\"\nimport type { MainImageProps } from \"./main-image\"\nimport type { GatsbyImageProps } from \"./gatsby-image.browser\"\n\ntype LazyHydrateProps = Omit<GatsbyImageProps, \"as\" | \"style\" | \"className\"> & {\n isLoading: boolean\n isLoaded: boolean\n}\n\nasync function applyPolyfill(element: HTMLImageElement): Promise<void> {\n if (!(`objectFitPolyfill` in window)) {\n await import(\n // @ts-ignore typescript can't find the module for some reason ¯\\_(ツ)_/¯\n /* webpackChunkName: \"gatsby-plugin-image-objectfit-polyfill\" */ `objectFitPolyfill`\n )\n }\n ;(window as any).objectFitPolyfill(element)\n}\n\nfunction toggleLoaded(\n mainImage: HTMLElement,\n placeholderImage: HTMLElement\n): void {\n mainImage.style.opacity = `1`\n\n if (placeholderImage) {\n placeholderImage.style.opacity = `0`\n }\n}\n\nfunction startLoading(\n element: HTMLElement,\n cacheKey: string,\n imageCache: Set<string>,\n onStartLoad: GatsbyImageProps[\"onStartLoad\"],\n onLoad: GatsbyImageProps[\"onLoad\"],\n onError: GatsbyImageProps[\"onError\"]\n): () => void {\n const mainImage = element.querySelector(\n `[data-main-image]`\n ) as HTMLImageElement\n const placeholderImage = element.querySelector<HTMLElement>(\n `[data-placeholder-image]`\n )\n const isCached = imageCache.has(cacheKey)\n\n function onImageLoaded(e): void {\n // eslint-disable-next-line @babel/no-invalid-this\n this.removeEventListener(`load`, onImageLoaded)\n\n const target = e.currentTarget\n const img = new Image()\n img.src = target.currentSrc\n\n if (img.decode) {\n // Decode the image through javascript to support our transition\n img\n .decode()\n .then(() => {\n // eslint-disable-next-line @babel/no-invalid-this\n toggleLoaded(this, placeholderImage)\n onLoad?.({\n wasCached: isCached,\n })\n })\n .catch(e => {\n // eslint-disable-next-line @babel/no-invalid-this\n toggleLoaded(this, placeholderImage)\n onError?.(e)\n })\n } else {\n // eslint-disable-next-line @babel/no-invalid-this\n toggleLoaded(this, placeholderImage)\n onLoad?.({\n wasCached: isCached,\n })\n }\n }\n\n mainImage.addEventListener(`load`, onImageLoaded)\n\n onStartLoad?.({\n wasCached: isCached,\n })\n Array.from(mainImage.parentElement.children).forEach(child => {\n const src = child.getAttribute(`data-src`)\n const srcSet = child.getAttribute(`data-srcset`)\n if (src) {\n child.removeAttribute(`data-src`)\n child.setAttribute(`src`, src)\n }\n if (srcSet) {\n child.removeAttribute(`data-srcset`)\n child.setAttribute(`srcset`, srcSet)\n }\n })\n\n imageCache.add(cacheKey)\n\n // Load times not always fires - mostly when it's a 304\n // We check if the image is already completed and if so we trigger onload.\n if (mainImage.complete) {\n onImageLoaded.call(mainImage, {\n currentTarget: mainImage,\n })\n }\n\n return (): void => {\n if (mainImage) {\n mainImage.removeEventListener(`load`, onImageLoaded)\n }\n }\n}\n\nexport function swapPlaceholderImage(\n element: HTMLElement,\n cacheKey: string,\n imageCache: Set<string>,\n style: React.CSSProperties,\n onStartLoad: GatsbyImageProps[\"onStartLoad\"],\n onLoad: GatsbyImageProps[\"onLoad\"],\n onError: GatsbyImageProps[\"onError\"]\n): () => void {\n if (!hasNativeLazyLoadSupport()) {\n let cleanup\n const io = createIntersectionObserver(() => {\n cleanup = startLoading(\n element,\n cacheKey,\n imageCache,\n onStartLoad,\n onLoad,\n onError\n )\n })\n const unobserve = io(element)\n\n // Polyfill \"object-fit\" if unsupported (mostly IE)\n if (!(`objectFit` in document.documentElement.style)) {\n element.dataset.objectFit = style.objectFit ?? `cover`\n element.dataset.objectPosition = `${style.objectPosition ?? `50% 50%`}`\n applyPolyfill(element as HTMLImageElement)\n }\n\n return (): void => {\n if (cleanup) {\n cleanup()\n }\n\n unobserve()\n }\n }\n\n return startLoading(\n element,\n cacheKey,\n imageCache,\n onStartLoad,\n onLoad,\n onError\n )\n}\n\nexport function renderImageToString({\n image,\n loading = `lazy`,\n isLoading,\n isLoaded,\n imgClassName,\n imgStyle = {},\n objectPosition,\n backgroundColor,\n objectFit = `cover`,\n ...props\n}: LazyHydrateProps): string {\n const {\n width,\n height,\n layout,\n images,\n placeholder,\n backgroundColor: wrapperBackgroundColor,\n } = image\n\n imgStyle = {\n objectFit,\n objectPosition,\n backgroundColor,\n ...imgStyle,\n }\n\n return renderToStaticMarkup(\n <LayoutWrapper layout={layout} width={width} height={height}>\n <Placeholder\n {...getPlaceholderProps(\n placeholder,\n isLoaded,\n layout,\n width,\n height,\n wrapperBackgroundColor,\n objectFit,\n objectPosition\n )}\n />\n\n <MainImage\n {...(props as Omit<\n MainImageProps,\n \"images\" | \"fallback\" | \"onLoad\" | \"onError\"\n >)}\n width={width}\n height={height}\n className={imgClassName}\n {...getMainProps(isLoading, isLoaded, images, loading, imgStyle)}\n />\n </LayoutWrapper>\n )\n}\n"],"names":["_typeof","_regeneratorRuntime","module","exports","__esModule","Op","Object","prototype","hasOwn","hasOwnProperty","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","obj","key","value","defineProperty","enumerable","configurable","writable","err","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","create","context","Context","_invoke","state","method","arg","Error","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","type","done","fn","call","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","this","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","AsyncIterator","PromiseImpl","invoke","resolve","reject","result","__await","then","unwrapped","error","previousPromise","callInvokeWithMethodAndArg","undefined","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","length","i","displayName","isGeneratorFunction","genFun","ctor","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","keys","object","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","runtime","regeneratorRuntime","accidentalStrictMode","globalThis","Function","asyncGeneratorStep","gen","_next","_throw","WeakMap","m","navigator","connection","mozConnection","webkitConnection","mainImage","placeholderImage","style","opacity","element","cacheKey","imageCache","onStartLoad","onLoad","onError","querySelector","has","e","removeEventListener","onImageLoaded","currentTarget","Image","img","src","target","currentSrc","decode","toggleLoaded","wasCached","isCached","catch","addEventListener","Array","from","parentElement","children","child","getAttribute","removeAttribute","setAttribute","srcSet","add","hasNativeLazyLoadSupport","callback","cleanup","startLoading","intersectionObserver","IntersectionObserver","entries","isIntersecting","ioEntryMap","get","delete","rootMargin","effectiveType","saveData","set","observe","unobserve","io","documentElement","dataset","objectFit","objectPosition","window","objectFitPolyfill","args","arguments","apply","image","loading","isLoading","isLoaded","imgClassName","imgStyle","backgroundColor","props","width","height","layout","images","placeholder","wrapperBackgroundColor","React","LayoutWrapper","Placeholder","getPlaceholderProps","MainImage","className","getMainProps"],"sourceRoot":""}