text: import e,{Fragment as t,forwardRef as a,createRef as i,Component as r,useEffect as n}from"react";import{stripIndent as o}from"common-tags";import s from"camelcase";import l,{string as d,bool as u,exact as c,arrayOf as h,oneOfType as p}from"prop-types";import{render as g}from"react-dom";function f(){return(f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e}).apply(this,arguments)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e,t){if(null==e)return{};var a,i,r={},n=Object.keys(e);for(i=0;i<n.length;i++)t.indexOf(a=n[i])>=0||(r[a]=e[a]);return r}var y,w=[.25,.5,1,2],b=[750,1080,1366,1920],E=[320,654,768,1024,1366,1600,1920,2048,2560,3440,3840,4096],S=function(e){return console.warn(e)},M=function(e,t){return e-t},_=function(e){return e.map(function(e){return e.src+" "+e.width+"w"}).join(",\n")};function j(e){var t=e.lastIndexOf(".");if(-1!==t){var a=e.substr(t+1);if("jpeg"===a)return"jpg";if(3===a.length||4===a.length)return a}}function L(e){var t=e.layout,a=void 0===t?"constrained":t,i=e.width,r=e.height,n=e.sourceMetadata,o=e.breakpoints,l=e.aspectRatio,d=e.formats,u=void 0===d?["auto","webp"]:d;return u=u.map(function(e){return e.toLowerCase()}),a=s(a),i&&r?f({},e,{formats:u,layout:a}):(n.width&&n.height&&!l&&(l=n.width/n.height),"fullWidth"===a?(i=i||n.width||o[o.length-1],r=r||Math.round(i/(l||1.3333333333333333))):(i||(i=r&&l?r*l:n.width?n.width:r?Math.round(r/1.3333333333333333):800),l&&!r?r=Math.round(i/l):l||(l=i/r)),f({},e,{width:i,height:r,aspectRatio:l,layout:a,formats:u}))}function k(e,t){var a;return void 0===t&&(t=20),null==(a=(0,(e=L(e)).generateImageSource)(e.filename,t,Math.round(t/e.aspectRatio),e.sourceMetadata.format||"jpg",e.fit,e.options))?void 0:a.src}function O(e){var t,a=(e=L(e)).pluginName,i=e.sourceMetadata,r=e.generateImageSource,n=e.layout,s=e.fit,l=e.options,d=e.width,u=e.height,c=e.filename,h=e.reporter,p=void 0===h?{warn:S}:h,g=e.backgroundColor,m=e.placeholderURL;if(a||p.warn('[gatsby-plugin-image] "generateImageData" was not passed a plugin name'),"function"!=typeof r)throw new Error("generateImageSource must be a function");i&&(i.width||i.height)?i.format||(i.format=j(c)):i={width:d,height:u,format:(null==(t=i)?void 0:t.format)||j(c)||"auto"};var v=new Set(e.formats);(0===v.size||v.has("auto")||v.has(""))&&(v.delete("auto"),v.delete(""),v.add(i.format)),v.has("jpg")&&v.has("png")&&(p.warn("["+a+"] Specifying both 'jpg' and 'png' formats is not supported. Using 'auto' instead"),v.delete("jpg"===i.format?"png":"jpg"));var E=function(e){var t=e.filename,a=e.layout,i=void 0===a?"constrained":a,r=e.sourceMetadata,n=e.reporter,s=void 0===n?{warn:S}:n,l=e.breakpoints,d=void 0===l?b:l,u=Object.entries({width:e.width,height:e.height}).filter(function(e){var t=e[1];return"number"==typeof t&&t<1});if(u.length)throw new Error("Specified dimensions for images must be positive numbers (> 0). Problem dimensions you have are "+u.map(function(e){return e.join(": ")}).join(", "));return"fixed"===i?function(e){var t=e.filename,a=e.sourceMetadata,i=e.width,r=e.height,n=e.fit,s=void 0===n?"cover":n,l=e.outputPixelDensities,d=e.reporter,u=void 0===d?{warn:S}:d,c=a.width/a.height,h=I(void 0===l?w:l);if(i&&r){var p=N(a,{width:i,height:r,fit:s});i=p.width,r=p.height,c=p.aspectRatio}i?r||(r=Math.round(i/c)):i=r?Math.round(r*c):800;var g,f,m=i;if(a.width<i||a.height<r){var v=a.width<i?"width":"height";u.warn(o(y||(g=["\n    The requested ",' "','px" for the image '," was larger than the actual image "," of ","px. If possible, replace the current image with a larger one."],f||(f=g.slice(0)),g.raw=f,y=g),v,"width"===v?i:r,t,v,a[v])),"width"===v?(i=a.width,r=Math.round(i/c)):i=(r=a.height)*c}return{sizes:h.filter(function(e){return e>=1}).map(function(e){return Math.round(e*i)}).filter(function(e){return e<=a.width}),aspectRatio:c,presentationWidth:m,presentationHeight:Math.round(m/c),unscaledWidth:i}}(e):"constrained"===i?R(e):"fullWidth"===i?R(f({breakpoints:d},e)):(s.warn("No valid layout was provided for the image at "+t+". Valid image layouts are fixed, fullWidth, and constrained. Found "+i),{sizes:[r.width],presentationWidth:r.width,presentationHeight:r.height,aspectRatio:r.width/r.height,unscaledWidth:r.width})}(f({},e,{sourceMetadata:i})),M={sources:[]},k=e.sizes;k||(k=function(e,t){switch(t){case"constrained":return"(min-width: "+e+"px) "+e+"px, 100vw";case"fixed":return e+"px";case"fullWidth":return"100vw";default:return}}(E.presentationWidth,n)),v.forEach(function(e){var t=E.sizes.map(function(t){var i=r(c,t,Math.round(t/E.aspectRatio),e,s,l);if(null!=i&&i.width&&i.height&&i.src&&i.format)return i;p.warn("["+a+"] The resolver for image "+c+" returned an invalid value.")}).filter(Boolean);if("jpg"===e||"png"===e||"auto"===e){var i=t.find(function(e){return e.width===E.unscaledWidth})||t[0];i&&(M.fallback={src:i.src,srcSet:_(t),sizes:k})}else{var n;null==(n=M.sources)||n.push({srcSet:_(t),sizes:k,type:"image/"+e})}});var O={images:M,layout:n,backgroundColor:g};switch(m&&(O.placeholder={fallback:m}),n){case"fixed":O.width=E.presentationWidth,O.height=E.presentationHeight;break;case"fullWidth":O.width=1,O.height=1/E.aspectRatio;break;case"constrained":O.width=e.width||E.presentationWidth||1,O.height=(O.width||1)/E.aspectRatio}return O}var I=function(e){return Array.from(new Set([1].concat(e))).sort(M)};function R(e){var t,a=e.sourceMetadata,i=e.width,r=e.height,n=e.fit,o=void 0===n?"cover":n,s=e.outputPixelDensities,l=e.breakpoints,d=e.layout,u=a.width/a.height,c=I(void 0===s?w:s);if(i&&r){var h=N(a,{width:i,height:r,fit:o});i=h.width,r=h.height,u=h.aspectRatio}i=i&&Math.min(i,a.width),r=r&&Math.min(r,a.height),i||r||(r=(i=Math.min(800,a.width))/u),i||(i=r*u);var p=i;return(a.width<i||a.height<r)&&(i=a.width,r=a.height),i=Math.round(i),(null==l?void 0:l.length)>0?(t=l.filter(function(e){return e<=a.width})).length<l.length&&!t.includes(a.width)&&t.push(a.width):t=(t=c.map(function(e){return Math.round(e*i)})).filter(function(e){return e<=a.width}),"constrained"!==d||t.includes(i)||t.push(i),{sizes:t=t.sort(M),aspectRatio:u,presentationWidth:p,presentationHeight:Math.round(p/u),unscaledWidth:i}}function N(e,t){var a=e.width/e.height,i=t.width,r=t.height;switch(t.fit){case"fill":i=t.width?t.width:e.width,r=t.height?t.height:e.height;break;case"inside":var n=t.width?t.width:Number.MAX_SAFE_INTEGER,o=t.height?t.height:Number.MAX_SAFE_INTEGER;i=Math.min(n,Math.round(o*a)),r=Math.min(o,Math.round(n/a));break;case"outside":var s=t.width?t.width:0,l=t.height?t.height:0;i=Math.max(s,Math.round(l*a)),r=Math.max(l,Math.round(s/a));break;default:t.width&&!t.height&&(i=t.width,r=Math.round(t.width/a)),t.height&&!t.width&&(i=Math.round(t.height*a),r=t.height)}return{width:i,height:r,aspectRatio:i/r}}var x=new Set,W=function(){return"undefined"!=typeof HTMLImageElement&&"loading"in HTMLImageElement.prototype};function z(e){e&&x.add(e)}function T(e){return x.has(e)}var A=function(e){var t;return function(e){var t,a;return Boolean(null==e||null==(t=e.images)||null==(a=t.fallback)?void 0:a.src)}(e)?e:function(e){return Boolean(null==e?void 0:e.gatsbyImageData)}(e)?e.gatsbyImageData:null==e||null==(t=e.childImageSharp)?void 0:t.gatsbyImageData},H=function(e){var t,a,i;return null==(t=A(e))||null==(a=t.images)||null==(i=a.fallback)?void 0:i.src},P=function(e){var t,a,i;return null==(t=A(e))||null==(a=t.images)||null==(i=a.fallback)?void 0:i.srcSet};function D(e){var t,a=e.baseUrl,i=e.urlBuilder,r=e.sourceWidth,n=e.sourceHeight,o=e.pluginName,s=void 0===o?"getImageData":o,l=e.formats,d=void 0===l?["auto"]:l,u=e.breakpoints,c=e.options,h=v(e,["baseUrl","urlBuilder","sourceWidth","sourceHeight","pluginName","formats","breakpoints","options"]);return null!=(t=u)&&t.length||"fullWidth"!==h.layout&&"FULL_WIDTH"!==h.layout||(u=E),O(f({},h,{pluginName:s,generateImageSource:function(e,t,a,r){return{width:t,height:a,format:r,src:i({baseUrl:e,width:t,height:a,options:c,format:r})}},filename:a,formats:d,breakpoints:u,sourceMetadata:{width:r,height:n,format:"auto"}}))}function G(e,t,a,i,r,n,o,s){var l,d;return void 0===s&&(s={}),null!=o&&o.current&&!("objectFit"in document.documentElement.style)&&(o.current.dataset.objectFit=null!=(l=s.objectFit)?l:"cover",o.current.dataset.objectPosition=""+(null!=(d=s.objectPosition)?d:"50% 50%"),function(e){try{var t=function(){window.objectFitPolyfill(e.current)},a=function(){if(!("objectFitPolyfill"in window))return Promise.resolve(import("objectFitPolyfill")).then(function(){})}();Promise.resolve(a&&a.then?a.then(t):t())}catch(e){return Promise.reject(e)}}(o)),global.GATSBY___IMAGE||(s=f({height:"100%",left:0,position:"absolute",top:0,transform:"translateZ(0)",transition:"opacity 250ms linear",width:"100%",willChange:"opacity"},s)),f({},a,{loading:i,shouldLoad:e,"data-main-image":"",style:f({},s,{opacity:t?1:0}),onLoad:function(e){if(!t){z(n);var a=e.currentTarget,i=new Image;i.src=a.currentSrc,i.decode?i.decode().catch(function(){}).then(function(){r(!0)}):r(!0)}},ref:o})}function C(e,t,a,i,r,n){var o={};n&&(o.backgroundColor=n,"fixed"===a?(o.width=i,o.height=r,o.backgroundColor=n,o.position="relative"):("constrained"===a||"fullWidth"===a)&&(o.position="absolute",o.top=0,o.left=0,o.bottom=0,o.right=0));var s=f({},e,{"aria-hidden":!0,"data-placeholder-image":"",style:f({opacity:t?0:1,transition:"opacity 500ms linear"},o)});return global.GATSBY___IMAGE||(s.style={height:"100%",left:0,position:"absolute",top:0,width:"100%"}),s}function q(e,t){var a,i,r,n=e.images,o=e.placeholder,s=f({},v(e,["images","placeholder"]),{images:f({},n,{sources:[]}),placeholder:o&&f({},o,{sources:[]})});return t.forEach(function(t){var a,i=t.media,r=t.image;i?(r.layout!==e.layout&&"development"===process.env.NODE_ENV&&console.warn('[gatsby-plugin-image] Mismatched image layout: expected "'+e.layout+'" but received "'+r.layout+'". All art-directed images use the same layout as the default image'),(a=s.images.sources).push.apply(a,r.images.sources.map(function(e){return f({},e,{media:i})}).concat([{media:i,srcSet:r.images.fallback.srcSet}])),s.placeholder&&s.placeholder.sources.push({media:i,srcSet:r.placeholder.fallback})):"development"===process.env.NODE_ENV&&console.warn("[gatsby-plugin-image] All art-directed images passed to must have a value set for `media`. Skipping.")}),(a=s.images.sources).push.apply(a,n.sources),null!=o&&o.sources&&(null==(i=s.placeholder)||(r=i.sources).push.apply(r,o.sources)),s}var B,F=function(t){var a=t.layout,i=t.width,r=t.height;return"fullWidth"===a?e.createElement("div",{"aria-hidden":!0,style:{paddingTop:r/i*100+"%"}}):"constrained"===a?e.createElement("div",{style:{maxWidth:i,display:"block"}},e.createElement("img",{alt:"",role:"presentation","aria-hidden":"true",src:"data:image/svg+xml;charset=utf-8,%3Csvg height='"+r+"' width='"+i+"' xmlns='http://www.w3.org/2000/svg' version='1.1'%3E%3C/svg%3E",style:{maxWidth:"100%",display:"block",position:"static"}})):null},V=function(a){var i=a.children,r=v(a,["children"]);return e.createElement(t,null,e.createElement(F,Object.assign({},r)),i,!1)},U=function(t){var a=t.src,i=t.srcSet,r=t.loading,n=t.alt,o=void 0===n?"":n,s=t.shouldLoad,l=t.innerRef,d=v(t,["src","srcSet","loading","alt","shouldLoad","innerRef"]);return e.createElement("img",Object.assign({},d,{decoding:"async",loading:r,src:s?a:void 0,"data-src":s?void 0:a,srcSet:s?i:void 0,"data-srcset":s?void 0:i,alt:o,ref:l}))},Y=a(function(t,a){var i=t.fallback,r=t.sources,n=void 0===r?[]:r,o=t.shouldLoad,s=void 0===o||o,l=v(t,["fallback","sources","shouldLoad"]),d=l.sizes||(null==i?void 0:i.sizes),u=e.createElement(U,Object.assign({},l,i,{sizes:d,shouldLoad:s,innerRef:a}));return n.length?e.createElement("picture",null,n.map(function(t){var a=t.media,i=t.srcSet,r=t.type;return e.createElement("source",{key:a+"-"+r+"-"+i,type:r,media:a,srcSet:s?i:void 0,"data-srcset":s?void 0:i,sizes:d})}),u):u});U.propTypes={src:d.isRequired,alt:d.isRequired,sizes:d,srcSet:d,shouldLoad:u},Y.displayName="Picture",Y.propTypes={alt:d.isRequired,shouldLoad:u,fallback:c({src:d.isRequired,srcSet:d,sizes:d}),sources:h(p([c({media:d.isRequired,type:d,sizes:d,srcSet:d.isRequired}),c({media:d,type:d.isRequired,sizes:d,srcSet:d.isRequired})]))};var J=function(t){var a=t.fallback,i=v(t,["fallback"]);return a?e.createElement(Y,Object.assign({},i,{fallback:{src:a},"aria-hidden":!0,alt:""})):e.createElement("div",Object.assign({},i))};J.displayName="Placeholder",J.propTypes={fallback:d,sources:null==(B=Y.propTypes)?void 0:B.sources,alt:function(e,t,a){return e[t]?new Error("Invalid prop `"+t+"` supplied to `"+a+"`. Validation failed."):null}};var X=a(function(t,a){return e.createElement(e.Fragment,null,e.createElement(Y,Object.assign({ref:a},t)),e.createElement("noscript",null,e.createElement(Y,Object.assign({},t,{shouldLoad:!0}))))});X.displayName="MainImage",X.propTypes=Y.propTypes;var Z=function(e,t,a){return e.alt||""===e.alt?l.string.apply(l,[e,t,a].concat([].slice.call(arguments,3))):new Error('The "alt" prop is required in '+a+'. 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')},K={image:l.object.isRequired,alt:Z},Q=function(t){var a,r;function n(e){var a;return(a=t.call(this,e)||this).root=i(),a.hydrated={current:!1},a.forceRender={current:"development"===process.env.NODE_ENV},a.lazyHydrator=null,a.ref=i(),a.state={isLoading:W(),isLoaded:!1},a}r=t,(a=n).prototype=Object.create(r.prototype),a.prototype.constructor=a,m(a,r);var o=n.prototype;return o._lazyHydrate=function(e,t){var a=this,i=this.root.current.querySelector("[data-gatsby-image-ssr]");return W()&&i&&!this.hydrated.current?(this.hydrated.current=!0,Promise.resolve()):import("./lazy-hydrate-597ad922.js").then(function(i){a.lazyHydrator=(0,i.lazyHydrate)(f({image:e.image.images,isLoading:t.isLoading,isLoaded:t.isLoaded,toggleIsLoaded:function(){null==e.onLoad||e.onLoad(),a.setState({isLoaded:!0})},ref:a.ref},e),a.root,a.hydrated,a.forceRender)})},o._setupIntersectionObserver=function(e){var t=this;void 0===e&&(e=!0),import("./intersection-observer-6b794dd8.js").then(function(a){var i=(0,a.createIntersectionObserver)(function(){if(t.root.current){var a=JSON.stringify(t.props.image.images);null==t.props.onStartLoad||t.props.onStartLoad({wasCached:e&&T(a)}),t.setState({isLoading:!0,isLoaded:e&&T(a)})}});t.root.current&&(t.unobserveRef=i(t.root))})},o.shouldComponentUpdate=function(e,t){var a=this,i=!1;return this.state.isLoading||!t.isLoading||t.isLoaded||(this.forceRender.current=!0),this.props.image.images!==e.image.images&&(this.unobserveRef&&(this.unobserveRef(),this.hydrated.current&&this.lazyHydrator&&g(null,this.root.current)),this.setState({isLoading:!1,isLoaded:!1},function(){a._setupIntersectionObserver(!1)}),i=!0),this.root.current&&!i&&this._lazyHydrate(e,t),!1},o.componentDidMount=function(){if(this.root.current){var e=this.root.current.querySelector("[data-gatsby-image-ssr]"),t=JSON.stringify(this.props.image.images);if(W()&&e&&global.GATSBY___IMAGE){var a,i;if(null==(a=(i=this.props).onStartLoad)||a.call(i,{wasCached:!1}),e.complete){var r,n;null==(r=(n=this.props).onLoad)||r.call(n),z(t)}else{var o=this;e.addEventListener("load",function a(){e.removeEventListener("load",a),null==o.props.onLoad||o.props.onLoad(),z(t)})}return}this._setupIntersectionObserver(!0)}},o.componentWillUnmount=function(){this.unobserveRef&&(this.unobserveRef(),this.hydrated.current&&this.lazyHydrator&&this.lazyHydrator())},o.render=function(){var t=this.props.as||"div",a=this.props.image,i=a.width,r=a.height,n=a.layout,o=function(e,t,a){var i={},r="gatsby-image-wrapper";return global.GATSBY___IMAGE||(i.position="relative",i.overflow="hidden"),"fixed"===a?(i.width=e,i.height=t):"constrained"===a&&(global.GATSBY___IMAGE||(i.display="inline-block"),r="gatsby-image-wrapper gatsby-image-wrapper-constrained"),{className:r,"data-gatsby-image-wrapper":"",style:i}}(i,r,n),s=o.style,l=o.className,d=v(o,["style","className"]),u=this.props.className;this.props.class&&(u=this.props.class);var c=function(e,t,a){var i=null;return"fullWidth"===e&&(i='<div aria-hidden="true" style="padding-top: '+a/t*100+'%;"></div>'),"constrained"===e&&(i='<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=\''+a+"' 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>"),i}(n,i,r);return e.createElement(t,Object.assign({},d,{style:f({},s,this.props.style,{backgroundColor:this.props.backgroundColor}),className:l+(u?" "+u:""),ref:this.root,dangerouslySetInnerHTML:{__html:c},suppressHydrationWarning:!0}))},n}(r),$=function(t){if(!t.image)return"development"===process.env.NODE_ENV&&console.warn("[gatsby-plugin-image] Missing image prop"),null;global.GATSBY___IMAGE||console.warn('[gatsby-plugin-image] You\'re missing out on some cool performance features. Please add "gatsby-plugin-image" to your gatsby-config.js');var a=t.image,i=JSON.stringify([a.width,a.height,a.layout,t.className,t.class,t.backgroundColor]);return e.createElement(Q,Object.assign({key:i},t))};$.propTypes=K,$.displayName="GatsbyImage";var ee=function(e,t){return"fullWidth"!==e.layout||"width"!==t&&"height"!==t||!e[t]?l.number.apply(l,[e,t].concat([].slice.call(arguments,2))):new Error('"'+t+'" '+e[t]+" may not be passed when layout is fullWidth.")},te=new Set(["fixed","fullWidth","constrained"]),ae={src:l.string.isRequired,alt:Z,width:ee,height:ee,sizes:l.string,layout:function(e){if(void 0!==e.layout&&!te.has(e.layout))return new Error("Invalid value "+e.layout+'" provided for prop "layout". Defaulting to "constrained". Valid values are "fixed", "fullWidth" or "constrained".')}},ie=function(t){return function(a){var i=a.src,r=a.__imageData,n=a.__error,o=v(a,["src","__imageData","__error","width","height","aspectRatio","tracedSVGOptions","placeholder","formats","quality","transformOptions","jpgOptions","pngOptions","webpOptions","avifOptions","blurredOptions"]);return n&&console.warn(n),r?e.createElement(t,Object.assign({image:r},o)):(console.warn("Image not loaded",i),n||"development"!==process.env.NODE_ENV||console.warn('Please ensure that "gatsby-plugin-image" is included in the plugins array in gatsby-config.js, and that your version of gatsby is at least 2.24.78'),null)}}($);function re(e){var t=e.children;return n(function(){import("./lazy-hydrate-597ad922.js")},[]),t}ie.displayName="StaticImage",ie.propTypes=ae;export{$ as G,V as L,X as M,J as P,ie as S,v as _,f as a,G as b,re as c,A as d,H as e,P as f,C as g,D as h,O as i,k as j,q as w};
  //# sourceMappingURL=index.browser-dbab2abc.js.map
  