diff options
Diffstat (limited to 'public')
18 files changed, 24 insertions, 24 deletions
diff --git a/public/223-fe0f4bb868fe9f43618b.js.map b/public/223-fe0f4bb868fe9f43618b.js.map deleted file mode 100644 index 58f49c5..0000000 --- a/public/223-fe0f4bb868fe9f43618b.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"223-fe0f4bb868fe9f43618b.js","mappings":"8PAAA,IAAI,EAIJ,MAAM,EAAa,IAAIA,QAAJ,EAGhBC,UAAkBC,YAClBD,UAAkBE,eAClBF,UAAkBG,iBAAAA,EAAAA,CAAAA,QAAAA,UAAAA,YAAAA,WAAAA,eAAAA,WAAAA,iBAAAA,kBAAAA,aCoBrB,SAAS,EACPC,EACAC,GAEAD,EAAUE,MAAMC,QAAAA,IAEZF,IACFA,EAAiBC,MAAMC,QAAAA,IAAAA,CAI3B,SAAS,EACPC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEA,MAAM,EAAYL,EAAQM,cAAc,qBAAdA,EAGDN,EAAQM,cAAAA,4BAAAA,EAGhBJ,EAAWK,IAAIN,GAEhC,SAAS,EAAcO,GAErBC,KAAKC,oBAAoB,OAAQC,GAEjC,MAAMC,EAASJ,EAAEK,cAAAA,EACL,IAAIC,MAChBC,EAAIC,IAAMC,EAAOC,WAEbH,EAAII,OAENJ,EACGI,SACAC,MAAK,KAEJC,EAAaZ,KAAMZ,GAAAA,MACnBO,GAAAA,EAAS,CACPkB,UAAWC,GAAAA,IAGdC,OAAMhB,IAELa,EAAaZ,KAAMZ,GAAAA,MACnBQ,GAAAA,EAAUG,EAAE,KAIhBa,EAAaZ,KAAMZ,GAAAA,MACnBO,GAAAA,EAAS,CACPkB,UAAWC,IAAAA,CAiCjB,OA5BA3B,EAAU6B,iBAAiB,OAAQd,GAAAA,MAEnCR,GAAAA,EAAc,CACZmB,UAAWC,IAEbG,MAAMC,KAAK/B,EAAUgC,cAAcC,UAAUC,SAAQC,IACnD,MAAM,EAAMA,EAAMC,aAAa,YAAbA,EACHD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AAAA,EAAAA,WAnIhDC,eAA6B9D,GAAAA,sBAAAA,cAAAA,EAAAA,EAAAA,KAAAA,KAAAA,EAAAA,EAAAA,KAAAA,EAAAA,KAAAA,KAOzB+D,OAAeC,kBAAkBhE,EAAAA,CAPrC8D,CAoIoB9D,IAGT,KACDyC,GACFA,IAGFe,GAAAA,CAAAA,CAAAA,ID7IJhB,ECiJA,OAAO,EACLxC,EACAC,EACAC,EACAC,EACAC,EACAC,EAAAA,CAAAA,SAAAA,EAAAA,GAAAA,IAIgC4D,MAClCA,EADkCC,QAElCA,EAAAA,OAFkCC,UAGlCA,EAHkCC,SAIlCA,EAJkCC,aAKlCA,EALkCC,SAMlCA,EAAW,CAAC,EANsBT,eAOlCA,EAPkCU,gBAQlCA,EARkCX,UASlCA,EAAAA,SAAAA,EACGY,GAAAA,EAAAA,EAAAA,GAAAA,EAAAA,GAEH,MAAMC,MACJA,EADIC,OAEJA,EAFIC,OAGJA,EAHIC,OAIJA,EAJIC,YAKJA,EACAN,gBAAiBO,GACfb,EASJ,OAPAK,GAAAA,EAAAA,EAAAA,GAAAA,CACEV,UAAAA,EACAC,eAAAA,EACAU,gBAAAA,GACGD,IAAAA,EAAAA,EAAAA,IAIHS,EAAAA,cAACC,EAAAA,EAAAA,CAAcL,OAAQA,EAAQF,MAAOA,EAAOC,OAAQA,GACnDK,EAAAA,cAACE,EAAAA,GAAAA,EAAAA,EAAAA,GAAAA,CAAAA,GACKC,EAAAA,EAAAA,GACFL,EACAT,EACAO,EACAF,EACAC,EACAI,EACAlB,EACAC,KAIJkB,EAAAA,cAACI,EAAAA,GAAAA,EAAAA,EAAAA,GAAAA,CAAAA,EACMX,EAAAA,CAILC,MAAOA,EACPC,OAAQA,EACRU,UAAWf,IACPgB,EAAAA,EAAAA,GAAalB,EAAWC,EAAUQ,EAAQV,EAASI,MAAAA,C","sources":["webpack://submelon.dev/../src/components/intersection-observer.ts","webpack://submelon.dev/../src/components/lazy-hydrate.tsx"],"sourcesContent":["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":["WeakMap","navigator","connection","mozConnection","webkitConnection","mainImage","placeholderImage","style","opacity","element","cacheKey","imageCache","onStartLoad","onLoad","onError","querySelector","has","e","this","removeEventListener","onImageLoaded","t","currentTarget","Image","img","src","target","currentSrc","decode","then","toggleLoaded","wasCached","isCached","catch","addEventListener","Array","from","parentElement","children","forEach","child","getAttribute","removeAttribute","setAttribute","srcSet","add","complete","call","hasNativeLazyLoadSupport","callback","cleanup","startLoading","intersectionObserver","IntersectionObserver","entries","entry","isIntersecting","ioEntryMap","get","delete","rootMargin","effectiveType","saveData","set","observe","unobserve","io","documentElement","dataset","objectFit","objectPosition","async","window","objectFitPolyfill","image","loading","isLoading","isLoaded","imgClassName","imgStyle","backgroundColor","props","width","height","layout","images","placeholder","wrapperBackgroundColor","React","LayoutWrapper","Placeholder","getPlaceholderProps","MainImage","className","getMainProps"],"sourceRoot":""}
\ No newline at end of file diff --git a/public/404.html b/public/404.html index 9d80c8c..5cbc85d 100644 --- a/public/404.html +++ b/public/404.html @@ -21,6 +21,6 @@ data-styled.g5[id="Footer-sc-1as233t-0"]{content:"jVEOXb,"}/*!sc*/ <script id="gatsby-chunk-mapping" > - window.___chunkMapping="{\"app\":[\"/app-ab8ccc4e8dafa3ca248d.js\"],\"component---cache-caches-gatsby-plugin-offline-app-shell-js\":[\"/component---cache-caches-gatsby-plugin-offline-app-shell-js-56599e2012c5599fcb23.js\"],\"component---src-pages-404-tsx\":[\"/component---src-pages-404-tsx-d29fb8ea3e32c047febf.js\"],\"component---src-pages-index-tsx\":[\"/component---src-pages-index-tsx-804d0ec6dbe442b6f0a6.js\"]}"; + window.___chunkMapping="{\"app\":[\"/app-ab8ccc4e8dafa3ca248d.js\"],\"component---cache-caches-gatsby-plugin-offline-app-shell-js\":[\"/component---cache-caches-gatsby-plugin-offline-app-shell-js-56599e2012c5599fcb23.js\"],\"component---src-pages-404-tsx\":[\"/component---src-pages-404-tsx-d29fb8ea3e32c047febf.js\"],\"component---src-pages-index-tsx\":[\"/component---src-pages-index-tsx-da364fa77bec8c0827e2.js\"]}"; </script> - <script>window.___webpackCompilationHash="23918f8f21bb6101b377";</script><script src="/webpack-runtime-60ec0dc7d54ced5e6199.js" async></script><script src="/framework-9d7199247c4ea55ff463.js" async></script><script src="/app-ab8ccc4e8dafa3ca248d.js" async></script><!-- slice-end id="_gatsby-scripts-1" --></body></html>
\ No newline at end of file + <script>window.___webpackCompilationHash="7826ab2ae305ca4a1863";</script><script src="/webpack-runtime-6a26673e502124aa4f70.js" async></script><script src="/framework-9d7199247c4ea55ff463.js" async></script><script src="/app-ab8ccc4e8dafa3ca248d.js" async></script><!-- slice-end id="_gatsby-scripts-1" --></body></html>
\ No newline at end of file diff --git a/public/404/index.html b/public/404/index.html index 9911c73..99dea4e 100644 --- a/public/404/index.html +++ b/public/404/index.html @@ -21,6 +21,6 @@ data-styled.g5[id="Footer-sc-1as233t-0"]{content:"jVEOXb,"}/*!sc*/ <script id="gatsby-chunk-mapping" > - window.___chunkMapping="{\"app\":[\"/app-ab8ccc4e8dafa3ca248d.js\"],\"component---cache-caches-gatsby-plugin-offline-app-shell-js\":[\"/component---cache-caches-gatsby-plugin-offline-app-shell-js-56599e2012c5599fcb23.js\"],\"component---src-pages-404-tsx\":[\"/component---src-pages-404-tsx-d29fb8ea3e32c047febf.js\"],\"component---src-pages-index-tsx\":[\"/component---src-pages-index-tsx-804d0ec6dbe442b6f0a6.js\"]}"; + window.___chunkMapping="{\"app\":[\"/app-ab8ccc4e8dafa3ca248d.js\"],\"component---cache-caches-gatsby-plugin-offline-app-shell-js\":[\"/component---cache-caches-gatsby-plugin-offline-app-shell-js-56599e2012c5599fcb23.js\"],\"component---src-pages-404-tsx\":[\"/component---src-pages-404-tsx-d29fb8ea3e32c047febf.js\"],\"component---src-pages-index-tsx\":[\"/component---src-pages-index-tsx-da364fa77bec8c0827e2.js\"]}"; </script> - <script>window.___webpackCompilationHash="23918f8f21bb6101b377";</script><script src="/webpack-runtime-60ec0dc7d54ced5e6199.js" async></script><script src="/framework-9d7199247c4ea55ff463.js" async></script><script src="/app-ab8ccc4e8dafa3ca248d.js" async></script><!-- slice-end id="_gatsby-scripts-1" --></body></html>
\ No newline at end of file + <script>window.___webpackCompilationHash="7826ab2ae305ca4a1863";</script><script src="/webpack-runtime-6a26673e502124aa4f70.js" async></script><script src="/framework-9d7199247c4ea55ff463.js" async></script><script src="/app-ab8ccc4e8dafa3ca248d.js" async></script><!-- slice-end id="_gatsby-scripts-1" --></body></html>
\ No newline at end of file diff --git a/public/223-fe0f4bb868fe9f43618b.js b/public/731-7568b946592606042710.js index 1e38b89..ae70d51 100644 --- a/public/223-fe0f4bb868fe9f43618b.js +++ b/public/731-7568b946592606042710.js @@ -1,2 +1,2 @@ -"use strict";(self.webpackChunksubmelon_dev=self.webpackChunksubmelon_dev||[]).push([[223],{8223:function(e,t,n){n.r(t),n.d(t,{renderImageToString:function(){return b},swapPlaceholderImage:function(){return g}});var o=n(3723),a=n(7294),i=n(7762);n(2369);let r;const c=new WeakMap,l=navigator.connection||navigator.mozConnection||navigator.webkitConnection,s=["image","loading","isLoading","isLoaded","imgClassName","imgStyle","objectPosition","backgroundColor","objectFit"];function u(e,t){e.style.opacity="1",t&&(t.style.opacity="0")}function d(e,t,n,o,a,i){const r=e.querySelector("[data-main-image]"),c=e.querySelector("[data-placeholder-image]"),l=n.has(t);function s(e){this.removeEventListener("load",s);const t=e.currentTarget,n=new Image;n.src=t.currentSrc,n.decode?n.decode().then((()=>{u(this,c),null==a||a({wasCached:l})})).catch((e=>{u(this,c),null==i||i(e)})):(u(this,c),null==a||a({wasCached:l}))}return r.addEventListener("load",s),null==o||o({wasCached:l}),Array.from(r.parentElement.children).forEach((e=>{const t=e.getAttribute("data-src"),n=e.getAttribute("data-srcset");t&&(e.removeAttribute("data-src"),e.setAttribute("src",t)),n&&(e.removeAttribute("data-srcset"),e.setAttribute("srcset",n))})),n.add(t),r.complete&&s.call(r,{currentTarget:r}),()=>{r&&r.removeEventListener("load",s)}}function g(e,t,a,i,s,u,g){if(!(0,o.h)()){let o;const v=(h=()=>{o=d(e,t,a,s,u,g)},"IntersectionObserver"in window?(r||(r=new IntersectionObserver((e=>{e.forEach((e=>{var t;e.isIntersecting&&(null==(t=c.get(e.target))||t(),c.delete(e.target))}))}),{rootMargin:"4g"!==(null==l?void 0:l.effectiveType)||null!=l&&l.saveData?"2500px":"1250px"})),function(e){return c.set(e,h),r.observe(e),function(){r&&e&&(c.delete(e),r.unobserve(e))}}):function(){return h(),function(){}}),f=v(e);var b,m;return"objectFit"in document.documentElement.style||(e.dataset.objectFit=null!=(b=i.objectFit)?b:"cover",e.dataset.objectPosition=""+(null!=(m=i.objectPosition)?m:"50% 50%"),async function(e){"objectFitPolyfill"in window||await n.e(843).then(n.t.bind(n,4843,23)),window.objectFitPolyfill(e)}(e)),()=>{o&&o(),f()}}var h;return d(e,t,a,s,u,g)}function b(e){let{image:t,loading:n="lazy",isLoading:r,isLoaded:c,imgClassName:l,imgStyle:u={},objectPosition:d,backgroundColor:g,objectFit:b="cover"}=e,m=(0,o._)(e,s);const{width:h,height:v,layout:f,images:w,placeholder:y,backgroundColor:p}=t;return u=(0,o.a)({objectFit:b,objectPosition:d,backgroundColor:g},u),(0,i.uS)(a.createElement(o.L,{layout:f,width:h,height:v},a.createElement(o.P,(0,o.a)({},(0,o.g)(y,c,f,h,v,p,b,d))),a.createElement(o.M,(0,o.a)({},m,{width:h,height:v,className:l},(0,o.b)(r,c,w,n,u)))))}}}]); -//# sourceMappingURL=223-fe0f4bb868fe9f43618b.js.map
\ No newline at end of file +"use strict";(self.webpackChunksubmelon_dev=self.webpackChunksubmelon_dev||[]).push([[731],{6731:function(e,t,n){n.r(t),n.d(t,{renderImageToString:function(){return b},swapPlaceholderImage:function(){return g}});var o=n(8032),a=n(7294),i=n(7762);n(2369);let r;const c=new WeakMap,l=navigator.connection||navigator.mozConnection||navigator.webkitConnection,s=["image","loading","isLoading","isLoaded","imgClassName","imgStyle","objectPosition","backgroundColor","objectFit"];function u(e,t){e.style.opacity="1",t&&(t.style.opacity="0")}function d(e,t,n,o,a,i){const r=e.querySelector("[data-main-image]"),c=e.querySelector("[data-placeholder-image]"),l=n.has(t);function s(e){this.removeEventListener("load",s);const t=e.currentTarget,n=new Image;n.src=t.currentSrc,n.decode?n.decode().then((()=>{u(this,c),null==a||a({wasCached:l})})).catch((e=>{u(this,c),null==i||i(e)})):(u(this,c),null==a||a({wasCached:l}))}return r.addEventListener("load",s),null==o||o({wasCached:l}),Array.from(r.parentElement.children).forEach((e=>{const t=e.getAttribute("data-src"),n=e.getAttribute("data-srcset");t&&(e.removeAttribute("data-src"),e.setAttribute("src",t)),n&&(e.removeAttribute("data-srcset"),e.setAttribute("srcset",n))})),n.add(t),r.complete&&s.call(r,{currentTarget:r}),()=>{r&&r.removeEventListener("load",s)}}function g(e,t,a,i,s,u,g){if(!(0,o.h)()){let o;const v=(h=()=>{o=d(e,t,a,s,u,g)},"IntersectionObserver"in window?(r||(r=new IntersectionObserver((e=>{e.forEach((e=>{var t;e.isIntersecting&&(null==(t=c.get(e.target))||t(),c.delete(e.target))}))}),{rootMargin:"4g"!==(null==l?void 0:l.effectiveType)||null!=l&&l.saveData?"2500px":"1250px"})),function(e){return c.set(e,h),r.observe(e),function(){r&&e&&(c.delete(e),r.unobserve(e))}}):function(){return h(),function(){}}),f=v(e);var b,m;return"objectFit"in document.documentElement.style||(e.dataset.objectFit=null!=(b=i.objectFit)?b:"cover",e.dataset.objectPosition=""+(null!=(m=i.objectPosition)?m:"50% 50%"),async function(e){"objectFitPolyfill"in window||await n.e(843).then(n.t.bind(n,4843,23)),window.objectFitPolyfill(e)}(e)),()=>{o&&o(),f()}}var h;return d(e,t,a,s,u,g)}function b(e){let{image:t,loading:n="lazy",isLoading:r,isLoaded:c,imgClassName:l,imgStyle:u={},objectPosition:d,backgroundColor:g,objectFit:b="cover"}=e,m=(0,o._)(e,s);const{width:h,height:v,layout:f,images:w,placeholder:y,backgroundColor:p}=t;return u=(0,o.a)({objectFit:b,objectPosition:d,backgroundColor:g},u),(0,i.uS)(a.createElement(o.L,{layout:f,width:h,height:v},a.createElement(o.P,(0,o.a)({},(0,o.g)(y,c,f,h,v,p,b,d))),a.createElement(o.M,(0,o.a)({},m,{width:h,height:v,className:l},(0,o.b)(r,c,w,n,u)))))}}}]); +//# sourceMappingURL=731-7568b946592606042710.js.map
\ No newline at end of file diff --git a/public/731-7568b946592606042710.js.map b/public/731-7568b946592606042710.js.map new file mode 100644 index 0000000..18b7d7a --- /dev/null +++ b/public/731-7568b946592606042710.js.map @@ -0,0 +1 @@ +{"version":3,"file":"731-7568b946592606042710.js","mappings":"8PAAA,IAAIA,EAIJ,MAAMC,EAAa,IAAIC,QAEjBC,EACHC,UAAkBD,YAClBC,UAAkBC,eAClBD,UAAkBE,iBCTrBC,EAAAA,CAAAA,QAAAA,UAAAA,YAAAA,WAAAA,eAAAA,WAAAA,iBAAAA,kBAAAA,aA6BA,SAAqBC,EACnBC,EACAC,GAEAD,EAAUE,MAAMC,QAAAA,IAEZF,IACFA,EAAiBC,MAAMC,QAAAA,IAE3B,CAEA,SAAqBC,EACnBC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEA,MAAgB,EAAEL,EAAQM,cACxB,uBAEuBN,EAAQM,cAC/B,8BAEeJ,EAAWK,IAAIN,GAEhC,SAASO,EAAc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A,GACnDK,EAAAA,cAACC,EAAAA,GAAAA,EAAAA,EAAAA,GAAAA,CAAAA,GACKC,EAAAA,EAAAA,GACFJ,EACAX,EACAS,EACAF,EACAC,EACAI,EACAvB,EACAE,KAIJsB,EAAAA,cAACG,EAAAA,GAAAA,EAAAA,EAAAA,GAAAA,CAAAA,EACMX,EAGH,CACFE,MAAOA,EACPC,OAAQA,EACRS,UAAWhB,IACPiB,EAAAA,EAAAA,GAAanB,EAAWC,EAAUU,EAAQZ,EAASI,MAI/D,C","sources":["webpack://submelon.dev/../src/components/intersection-observer.ts","webpack://submelon.dev/../src/components/lazy-hydrate.tsx"],"sourcesContent":["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":["intersectionObserver","ioEntryMap","WeakMap","connection","navigator","mozConnection","webkitConnection","_excluded","toggleLoaded","mainImage","placeholderImage","style","opacity","startLoading","element","cacheKey","imageCache","onStartLoad","onLoad","onError","querySelector","has","onImageLoaded","e","this","removeEventListener","currentTarget","img","Image","src","target","currentSrc","decode","then","wasCached","isCached","catch","addEventListener","Array","from","parentElement","children","forEach","child","getAttribute","srcSet","removeAttribute","setAttribute","add","complete","call","hasNativeLazyLoadSupport","cleanup","callback","IntersectionObserver","entries","entry","isIntersecting","get","_ioEntryMap$get","delete","rootMargin","effectiveType","saveData","set","observe","unobserve","io","document","documentElement","dataset","objectFit","_style$objectFit","objectPosition","async","window","import","objectFitPolyfill","renderImageToString","image","loading","isLoading","isLoaded","imgClassName","imgStyle","backgroundColor","_ref","props","_objectWithoutPropertiesLoose","width","height","layout","images","placeholder","wrapperBackgroundColor","React","createElement","getPlaceholderProps","MainImage","className","getMainProps"],"sourceRoot":""}
\ No newline at end of file diff --git a/public/_gatsby/slices/_gatsby-scripts-1.html b/public/_gatsby/slices/_gatsby-scripts-1.html index f01847c..75b93bd 100644 --- a/public/_gatsby/slices/_gatsby-scripts-1.html +++ b/public/_gatsby/slices/_gatsby-scripts-1.html @@ -2,6 +2,6 @@ <script id="gatsby-chunk-mapping" > - window.___chunkMapping="{\"app\":[\"/app-ab8ccc4e8dafa3ca248d.js\"],\"component---cache-caches-gatsby-plugin-offline-app-shell-js\":[\"/component---cache-caches-gatsby-plugin-offline-app-shell-js-56599e2012c5599fcb23.js\"],\"component---src-pages-404-tsx\":[\"/component---src-pages-404-tsx-d29fb8ea3e32c047febf.js\"],\"component---src-pages-index-tsx\":[\"/component---src-pages-index-tsx-804d0ec6dbe442b6f0a6.js\"]}"; + window.___chunkMapping="{\"app\":[\"/app-ab8ccc4e8dafa3ca248d.js\"],\"component---cache-caches-gatsby-plugin-offline-app-shell-js\":[\"/component---cache-caches-gatsby-plugin-offline-app-shell-js-56599e2012c5599fcb23.js\"],\"component---src-pages-404-tsx\":[\"/component---src-pages-404-tsx-d29fb8ea3e32c047febf.js\"],\"component---src-pages-index-tsx\":[\"/component---src-pages-index-tsx-da364fa77bec8c0827e2.js\"]}"; </script> - <script>window.___webpackCompilationHash="23918f8f21bb6101b377";</script><script src="/webpack-runtime-60ec0dc7d54ced5e6199.js" async></script><script src="/framework-9d7199247c4ea55ff463.js" async></script><script src="/app-ab8ccc4e8dafa3ca248d.js" async></script>
\ No newline at end of file + <script>window.___webpackCompilationHash="7826ab2ae305ca4a1863";</script><script src="/webpack-runtime-6a26673e502124aa4f70.js" async></script><script src="/framework-9d7199247c4ea55ff463.js" async></script><script src="/app-ab8ccc4e8dafa3ca248d.js" async></script>
\ No newline at end of file diff --git a/public/chunk-map.json b/public/chunk-map.json index 8d8dbbf..6acc7cf 100644 --- a/public/chunk-map.json +++ b/public/chunk-map.json @@ -1 +1 @@ -{"app":["/app-ab8ccc4e8dafa3ca248d.js"],"component---cache-caches-gatsby-plugin-offline-app-shell-js":["/component---cache-caches-gatsby-plugin-offline-app-shell-js-56599e2012c5599fcb23.js"],"component---src-pages-404-tsx":["/component---src-pages-404-tsx-d29fb8ea3e32c047febf.js"],"component---src-pages-index-tsx":["/component---src-pages-index-tsx-804d0ec6dbe442b6f0a6.js"]}
\ No newline at end of file +{"app":["/app-ab8ccc4e8dafa3ca248d.js"],"component---cache-caches-gatsby-plugin-offline-app-shell-js":["/component---cache-caches-gatsby-plugin-offline-app-shell-js-56599e2012c5599fcb23.js"],"component---src-pages-404-tsx":["/component---src-pages-404-tsx-d29fb8ea3e32c047febf.js"],"component---src-pages-index-tsx":["/component---src-pages-index-tsx-da364fa77bec8c0827e2.js"]}
\ No newline at end of file diff --git a/public/component---src-pages-index-tsx-804d0ec6dbe442b6f0a6.js b/public/component---src-pages-index-tsx-804d0ec6dbe442b6f0a6.js deleted file mode 100644 index 5145bc4..0000000 --- a/public/component---src-pages-index-tsx-804d0ec6dbe442b6f0a6.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";(self.webpackChunksubmelon_dev=self.webpackChunksubmelon_dev||[]).push([[691],{3723:function(e,t,n){n.d(t,{L:function(){return m},M:function(){return E},P:function(){return b},S:function(){return j},_:function(){return l},a:function(){return o},b:function(){return c},g:function(){return d},h:function(){return s}});var r=n(7294),a=(n(2369),n(5697)),i=n.n(a);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(this,arguments)}function l(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(a[n]=e[n]);return a}const s=()=>"undefined"!=typeof HTMLImageElement&&"loading"in HTMLImageElement.prototype;function c(e,t,n,r,a){return void 0===a&&(a={}),o({},n,{loading:r,shouldLoad:e,"data-main-image":"",style:o({},a,{opacity:t?1:0})})}function d(e,t,n,r,a,i,l,s){const c={};i&&(c.backgroundColor=i,"fixed"===n?(c.width=r,c.height=a,c.backgroundColor=i,c.position="relative"):("constrained"===n||"fullWidth"===n)&&(c.position="absolute",c.top=0,c.left=0,c.bottom=0,c.right=0)),l&&(c.objectFit=l),s&&(c.objectPosition=s);const d=o({},e,{"aria-hidden":!0,"data-placeholder-image":"",style:o({opacity:t?0:1,transition:"opacity 500ms linear"},c)});return d}const u=["children"],p=function(e){let{layout:t,width:n,height:a}=e;return"fullWidth"===t?r.createElement("div",{"aria-hidden":!0,style:{paddingTop:a/n*100+"%"}}):"constrained"===t?r.createElement("div",{style:{maxWidth:n,display:"block"}},r.createElement("img",{alt:"",role:"presentation","aria-hidden":"true",src:"data:image/svg+xml;charset=utf-8,%3Csvg height='"+a+"' width='"+n+"' xmlns='http://www.w3.org/2000/svg' version='1.1'%3E%3C/svg%3E",style:{maxWidth:"100%",display:"block",position:"static"}})):null},m=function(e){let{children:t}=e,n=l(e,u);return r.createElement(r.Fragment,null,r.createElement(p,o({},n)),t,null)},g=["src","srcSet","loading","alt","shouldLoad"],f=["fallback","sources","shouldLoad"],h=function(e){let{src:t,srcSet:n,loading:a,alt:i="",shouldLoad:s}=e,c=l(e,g);return r.createElement("img",o({},c,{decoding:"async",loading:a,src:s?t:void 0,"data-src":s?void 0:t,srcSet:s?n:void 0,"data-srcset":s?void 0:n,alt:i}))},y=function(e){let{fallback:t,sources:n=[],shouldLoad:a=!0}=e,i=l(e,f);const s=i.sizes||(null==t?void 0:t.sizes),c=r.createElement(h,o({},i,t,{sizes:s,shouldLoad:a}));return n.length?r.createElement("picture",null,n.map((e=>{let{media:t,srcSet:n,type:i}=e;return r.createElement("source",{key:t+"-"+i+"-"+n,type:i,media:t,srcSet:a?n:void 0,"data-srcset":a?void 0:n,sizes:s})})),c):c};var w;h.propTypes={src:a.string.isRequired,alt:a.string.isRequired,sizes:a.string,srcSet:a.string,shouldLoad:a.bool},y.displayName="Picture",y.propTypes={alt:a.string.isRequired,shouldLoad:a.bool,fallback:a.exact({src:a.string.isRequired,srcSet:a.string,sizes:a.string}),sources:a.arrayOf(a.oneOfType([a.exact({media:a.string.isRequired,type:a.string,sizes:a.string,srcSet:a.string.isRequired}),a.exact({media:a.string,type:a.string.isRequired,sizes:a.string,srcSet:a.string.isRequired})]))};const v=["fallback"],b=function(e){let{fallback:t}=e,n=l(e,v);return t?r.createElement(y,o({},n,{fallback:{src:t},"aria-hidden":!0,alt:""})):r.createElement("div",o({},n))};b.displayName="Placeholder",b.propTypes={fallback:a.string,sources:null==(w=y.propTypes)?void 0:w.sources,alt:function(e,t,n){return e[t]?new Error("Invalid prop `"+t+"` supplied to `"+n+"`. Validation failed."):null}};const E=function(e){return r.createElement(r.Fragment,null,r.createElement(y,o({},e)),r.createElement("noscript",null,r.createElement(y,o({},e,{shouldLoad:!0}))))};E.displayName="MainImage",E.propTypes=y.propTypes;const x=function(e,t,n){for(var r=arguments.length,a=new Array(r>3?r-3:0),o=3;o<r;o++)a[o-3]=arguments[o];return e.alt||""===e.alt?i().string.apply(i(),[e,t,n].concat(a)):new Error('The "alt" prop is required in '+n+'. If the image is purely presentational then pass an empty string: e.g. alt="". Learn more: https://a11y-style-guide.com/style-guide/section-media.html')},C={image:i().object.isRequired,alt:x},A=["as","image","style","backgroundColor","className","class","onStartLoad","onLoad","onError"],k=["style","className"],R=new Set;let S,N;const L=function(e){let{as:t="div",image:a,style:i,backgroundColor:c,className:d,class:u,onStartLoad:p,onLoad:m,onError:g}=e,f=l(e,A);const{width:h,height:y,layout:w}=a,v=function(e,t,n){const r={};let a="gatsby-image-wrapper";return"fixed"===n?(r.width=e,r.height=t):"constrained"===n&&(a="gatsby-image-wrapper gatsby-image-wrapper-constrained"),{className:a,"data-gatsby-image-wrapper":"",style:r}}(h,y,w),{style:b,className:E}=v,x=l(v,k),C=(0,r.useRef)(),L=(0,r.useMemo)((()=>JSON.stringify(a.images)),[a.images]);u&&(d=u);const O=function(e,t,n){let r="";return"fullWidth"===e&&(r='<div aria-hidden="true" style="padding-top: '+n/t*100+'%;"></div>'),"constrained"===e&&(r='<div style="max-width: '+t+'px; display: block;"><img alt="" role="presentation" aria-hidden="true" src="data:image/svg+xml;charset=utf-8,%3Csvg height=\''+n+"' width='"+t+"' xmlns='http://www.w3.org/2000/svg' version='1.1'%3E%3C/svg%3E\" style=\"max-width: 100%; display: block; position: static;\"></div>"),r}(w,h,y);return(0,r.useEffect)((()=>{S||(S=Promise.all([n.e(774),n.e(223)]).then(n.bind(n,8223)).then((e=>{let{renderImageToString:t,swapPlaceholderImage:n}=e;return N=t,{renderImageToString:t,swapPlaceholderImage:n}})));const e=C.current.querySelector("[data-gatsby-image-ssr]");if(e&&s())return e.complete?(null==p||p({wasCached:!0}),null==m||m({wasCached:!0}),setTimeout((()=>{e.removeAttribute("data-gatsby-image-ssr")}),0)):(null==p||p({wasCached:!0}),e.addEventListener("load",(function t(){e.removeEventListener("load",t),null==m||m({wasCached:!0}),setTimeout((()=>{e.removeAttribute("data-gatsby-image-ssr")}),0)}))),void R.add(L);if(N&&R.has(L))return;let t,r;return S.then((e=>{let{renderImageToString:n,swapPlaceholderImage:l}=e;C.current&&(C.current.innerHTML=n(o({isLoading:!0,isLoaded:R.has(L),image:a},f)),R.has(L)||(t=requestAnimationFrame((()=>{C.current&&(r=l(C.current,L,R,i,p,m,g))}))))})),()=>{t&&cancelAnimationFrame(t),r&&r()}}),[a]),(0,r.useLayoutEffect)((()=>{R.has(L)&&N&&(C.current.innerHTML=N(o({isLoading:R.has(L),isLoaded:R.has(L),image:a},f)),null==p||p({wasCached:!0}),null==m||m({wasCached:!0}))}),[a]),(0,r.createElement)(t,o({},x,{style:o({},b,i,{backgroundColor:c}),className:E+(d?" "+d:""),ref:C,dangerouslySetInnerHTML:{__html:O},suppressHydrationWarning:!0}))},O=(0,r.memo)((function(e){return e.image?(0,r.createElement)(L,e):null}));O.propTypes=C,O.displayName="GatsbyImage";const T=["src","__imageData","__error","width","height","aspectRatio","tracedSVGOptions","placeholder","formats","quality","transformOptions","jpgOptions","pngOptions","webpOptions","avifOptions","blurredOptions","breakpoints","outputPixelDensities"],M=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];return"fullWidth"!==e.layout||"width"!==t&&"height"!==t||!e[t]?i().number.apply(i(),[e,t].concat(r)):new Error('"'+t+'" '+e[t]+" may not be passed when layout is fullWidth.")},H=new Set(["fixed","fullWidth","constrained"]),I={src:i().string.isRequired,alt:x,width:M,height:M,sizes:i().string,layout:e=>{if(void 0!==e.layout&&!H.has(e.layout))return new Error("Invalid value "+e.layout+'" provided for prop "layout". Defaulting to "constrained". Valid values are "fixed", "fullWidth" or "constrained".')}},j=(z=O,function(e){let{src:t,__imageData:n,__error:a}=e,i=l(e,T);return a&&console.warn(a),n?r.createElement(z,o({image:n},i)):(console.warn("Image not loaded",t),null)});var z;j.displayName="StaticImage",j.propTypes=I},2369:function(e){const t=(e,t)=>{if("string"!=typeof e&&!Array.isArray(e))throw new TypeError("Expected the input to be `string | string[]`");t=Object.assign({pascalCase:!1},t);if(e=Array.isArray(e)?e.map((e=>e.trim())).filter((e=>e.length)).join("-"):e.trim(),0===e.length)return"";if(1===e.length)return t.pascalCase?e.toUpperCase():e.toLowerCase();return e!==e.toLowerCase()&&(e=(e=>{let t=!1,n=!1,r=!1;for(let a=0;a<e.length;a++){const i=e[a];t&&/[a-zA-Z]/.test(i)&&i.toUpperCase()===i?(e=e.slice(0,a)+"-"+e.slice(a),t=!1,r=n,n=!0,a++):n&&r&&/[a-zA-Z]/.test(i)&&i.toLowerCase()===i?(e=e.slice(0,a-1)+"-"+e.slice(a-1),r=n,n=!1,t=!0):(t=i.toLowerCase()===i&&i.toUpperCase()!==i,r=n,n=i.toUpperCase()===i&&i.toLowerCase()!==i)}return e})(e)),e=e.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,((e,t)=>t.toUpperCase())).replace(/\d+(\w|$)/g,(e=>e.toUpperCase())),n=e,t.pascalCase?n.charAt(0).toUpperCase()+n.slice(1):n;var n};e.exports=t,e.exports.default=t},4690:function(e,t,n){n.d(t,{F:function(){return i}});var r=n(7294),a=n(1980);function i(){const{author:e,description:t,title:n}=(0,a.$)();return r.createElement(r.Fragment,null,r.createElement("meta",{name:"twitter:description",content:null!=t?t:""}),r.createElement("meta",{name:"twitter:title",content:null!=n?n:""}),r.createElement("meta",{name:"twitter:creator",content:null!=e?e:""}),r.createElement("meta",{name:"twitter:card",content:"summary"}),r.createElement("meta",{name:"description",content:null!=t?t:""}),r.createElement("title",null,n))}},955:function(e,t,n){n.d(t,{y:function(){return i},A:function(){return d}});var r=n(7294),a=n(1693);var i=e=>{let{children:t,...n}=e;return r.createElement(a.gp,{theme:{link:!0}},r.createElement(a.Jo,n,t))},o=n(4405),l=n(1980);const s="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");function c(e){let t="";for(;e>0;)t=s[e%62 |
