-
Notifications
You must be signed in to change notification settings - Fork 0
/
component---src-pages-works-js-a2328d785a55db0b0c26.js
2 lines (2 loc) · 17.2 KB
/
component---src-pages-works-js-a2328d785a55db0b0c26.js
1
2
(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{"0mN4":function(e,t,r){"use strict";r("OGtf")("fixed",(function(e){return function(){return e(this,"tt","","")}}))},"2RVH":function(e,t,r){"use strict";r.r(t);r("KKXr"),r("f3/d");var a=r("q1tI"),i=r.n(a),n=(r("Wbzz"),r("ciIH")),o=r.n(n),s=r("Bl7J"),l=r("jNNy"),c=(r("91GP"),function(e){return i.a.createElement("svg",Object.assign({width:"48px",height:"48px",viewBox:"0 0 48 48"},e),i.a.createElement("g",{stroke:"none",strokeWidth:1,fill:"#000",fillRule:"evenodd"},i.a.createElement("path",{d:"M21 7v4H5v32h32V27h4v20H1V7h20z",fillRule:"nonzero"}),i.a.createElement("path",{d:"M47 1v20h-4V7.828L30.343 20.485l-2.828-2.828L40.17 5H27V1h20z"})))});r.d(t,"pageQuery",(function(){return d}));var u=function(e){var t,r;function a(){return e.apply(this,arguments)||this}return r=e,(t=a).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,a.prototype.render=function(){var e=this.props.data,t=e.site.siteMetadata.title,r=e.images.edges.map((function(e){var t=e.node;return[t.name,t.childImageSharp.fluid]})).reduce((function(e,t){return e[t[0]]=t[1],e}),{});return i.a.createElement(s.a,{location:this.props.location,title:t},i.a.createElement(l.a,{title:"Works - Kuokoa Studio"}),i.a.createElement("article",{className:"works"},i.a.createElement("h1",null,"Recent Work"),e.works.edges.map((function(e){var t=e.node,a=t.childMarkdownRemark.frontmatter,n=a.tags.split(",");return a.display&&i.a.createElement("section",{className:"project "+a.branch,key:t.id},r.hasOwnProperty(t.name)&&i.a.createElement("aside",null,i.a.createElement(o.a,{fluid:r[t.name],objectPosition:"top center"})),i.a.createElement("section",{className:"content"},i.a.createElement("h2",null,a.url?i.a.createElement("a",{href:a.url},a.project," ",i.a.createElement(c,null)):a.project),i.a.createElement("h3",null,a.tagline),i.a.createElement("hr",null),i.a.createElement("section",{className:"description",dangerouslySetInnerHTML:{__html:t.childMarkdownRemark.html}}),i.a.createElement("ul",null,i.a.createElement("li",{className:a.branch},"Kuokoa ",a.branch[0].toUpperCase()+a.branch.slice(1)),!!a.client&&i.a.createElement("li",{className:"client"},a.client),n.map((function(e){return i.a.createElement("li",null,e)})))))}))))},a}(i.a.Component),d=(t.default=u,"4061619724")},"9eSz":function(e,t,r){"use strict";r("rGqo"),r("yt8O"),r("Btvt"),r("XfO3"),r("EK0E"),r("0mN4");var a=r("5NKs");t.__esModule=!0,t.default=void 0;var i,n=a(r("v06X")),o=a(r("XEEL")),s=a(r("uDP2")),l=a(r("j8BX")),c=a(r("q1tI")),u=a(r("17x9")),d=function(e){var t=(0,l.default)({},e),r=t.resolutions,a=t.sizes,i=t.critical;return r&&(t.fixed=r,delete t.resolutions),a&&(t.fluid=a,delete t.sizes),i&&(t.loading="eager"),t.fluid&&(t.fluid=S([].concat(t.fluid))),t.fixed&&(t.fixed=S([].concat(t.fixed))),t},f=function(e){var t=e.fluid,r=e.fixed;return(t&&t[0]||r&&r[0]).src},p=Object.create({}),g=function(e){var t=d(e),r=f(t);return p[r]||!1},m="undefined"!=typeof HTMLImageElement&&"loading"in HTMLImageElement.prototype,h="undefined"!=typeof window,b=h&&window.IntersectionObserver,y=new WeakMap;function v(e){return e.map((function(e){var t=e.src,r=e.srcSet,a=e.srcSetWebp,i=e.media,n=e.sizes;return c.default.createElement(c.default.Fragment,{key:t},a&&c.default.createElement("source",{type:"image/webp",media:i,srcSet:a,sizes:n}),c.default.createElement("source",{media:i,srcSet:r,sizes:n}))}))}function S(e){var t=[],r=[];return e.forEach((function(e){return(e.media?t:r).push(e)})),[].concat(t,r)}function w(e){return e.map((function(e){var t=e.src,r=e.media,a=e.tracedSVG;return c.default.createElement("source",{key:t,media:r,srcSet:a})}))}function E(e){return e.map((function(e){var t=e.src,r=e.media,a=e.base64;return c.default.createElement("source",{key:t,media:r,srcSet:a})}))}function j(e,t){var r=e.srcSet,a=e.srcSetWebp,i=e.media,n=e.sizes;return"<source "+(t?"type='image/webp' ":"")+(i?'media="'+i+'" ':"")+'srcset="'+(t?a:r)+'" '+(n?'sizes="'+n+'" ':"")+"/>"}var O=function(e,t){var r=(void 0===i&&"undefined"!=typeof window&&window.IntersectionObserver&&(i=new window.IntersectionObserver((function(e){e.forEach((function(e){if(y.has(e.target)){var t=y.get(e.target);(e.isIntersecting||e.intersectionRatio>0)&&(i.unobserve(e.target),y.delete(e.target),t())}}))}),{rootMargin:"200px"})),i);return r&&(r.observe(e),y.set(e,t)),function(){r.unobserve(e),y.delete(e)}},k=function(e){var t=e.src?'src="'+e.src+'" ':'src="" ',r=e.sizes?'sizes="'+e.sizes+'" ':"",a=e.srcSet?'srcset="'+e.srcSet+'" ':"",i=e.title?'title="'+e.title+'" ':"",n=e.alt?'alt="'+e.alt+'" ':'alt="" ',o=e.width?'width="'+e.width+'" ':"",s=e.height?'height="'+e.height+'" ':"",l=e.crossOrigin?'crossorigin="'+e.crossOrigin+'" ':"",c=e.loading?'loading="'+e.loading+'" ':"",u=e.draggable?'draggable="'+e.draggable+'" ':"";return"<picture>"+e.imageVariants.map((function(e){return(e.srcSetWebp?j(e,!0):"")+j(e)})).join("")+"<img "+c+o+s+r+a+t+n+i+l+u+'style="position:absolute;top:0;left:0;opacity:1;width:100%;height:100%;object-fit:cover;object-position:center"/></picture>'},I=function(e){var t=e.src,r=e.imageVariants,a=e.generateSources,i=e.spreadProps,n=c.default.createElement(L,(0,l.default)({src:t},i));return r.length>1?c.default.createElement("picture",null,a(r),n):n},L=c.default.forwardRef((function(e,t){var r=e.sizes,a=e.srcSet,i=e.src,n=e.style,o=e.onLoad,u=e.onError,d=e.loading,f=e.draggable,p=(0,s.default)(e,["sizes","srcSet","src","style","onLoad","onError","loading","draggable"]);return c.default.createElement("img",(0,l.default)({sizes:r,srcSet:a,src:i},p,{onLoad:o,onError:u,ref:t,loading:d,draggable:f,style:(0,l.default)({position:"absolute",top:0,left:0,width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"},n)}))}));L.propTypes={style:u.default.object,onError:u.default.func,onLoad:u.default.func};var R=function(e){function t(t){var r;(r=e.call(this,t)||this).seenBefore=h&&g(t),r.isCritical="eager"===t.loading||t.critical,r.addNoScript=!(r.isCritical&&!t.fadeIn),r.useIOSupport=!m&&b&&!r.isCritical&&!r.seenBefore;var a=r.isCritical||h&&(m||!r.useIOSupport);return r.state={isVisible:a,imgLoaded:!1,imgCached:!1,fadeIn:!r.seenBefore&&t.fadeIn},r.imageRef=c.default.createRef(),r.handleImageLoaded=r.handleImageLoaded.bind((0,n.default)(r)),r.handleRef=r.handleRef.bind((0,n.default)(r)),r}(0,o.default)(t,e);var r=t.prototype;return r.componentDidMount=function(){if(this.state.isVisible&&"function"==typeof this.props.onStartLoad&&this.props.onStartLoad({wasCached:g(this.props)}),this.isCritical){var e=this.imageRef.current;e&&e.complete&&this.handleImageLoaded()}},r.componentWillUnmount=function(){this.cleanUpListeners&&this.cleanUpListeners()},r.handleRef=function(e){var t=this;this.useIOSupport&&e&&(this.cleanUpListeners=O(e,(function(){var e=g(t.props);t.state.isVisible||"function"!=typeof t.props.onStartLoad||t.props.onStartLoad({wasCached:e}),t.setState({isVisible:!0},(function(){return t.setState({imgLoaded:e,imgCached:!!t.imageRef.current.currentSrc})}))})))},r.handleImageLoaded=function(){var e,t,r;e=this.props,t=d(e),r=f(t),p[r]=!0,this.setState({imgLoaded:!0}),this.props.onLoad&&this.props.onLoad()},r.render=function(){var e=d(this.props),t=e.title,r=e.alt,a=e.className,i=e.style,n=void 0===i?{}:i,o=e.imgStyle,s=void 0===o?{}:o,u=e.placeholderStyle,f=void 0===u?{}:u,p=e.placeholderClassName,g=e.fluid,m=e.fixed,h=e.backgroundColor,b=e.durationFadeIn,y=e.Tag,S=e.itemProp,j=e.loading,O=e.draggable,R=!1===this.state.fadeIn||this.state.imgLoaded,P=!0===this.state.fadeIn&&!this.state.imgCached,z=(0,l.default)({opacity:R?1:0,transition:P?"opacity "+b+"ms":"none"},s),V="boolean"==typeof h?"lightgray":h,T={transitionDelay:b+"ms"},C=(0,l.default)({opacity:this.state.imgLoaded?0:1},P&&T,{},s,{},f),N={title:t,alt:this.state.isVisible?"":r,style:C,className:p,itemProp:S};if(g){var x=g,M=x[0];return c.default.createElement(y,{className:(a||"")+" gatsby-image-wrapper",style:(0,l.default)({position:"relative",overflow:"hidden"},n),ref:this.handleRef,key:"fluid-"+JSON.stringify(M.srcSet)},c.default.createElement(y,{style:{width:"100%",paddingBottom:100/M.aspectRatio+"%"}}),V&&c.default.createElement(y,{title:t,style:(0,l.default)({backgroundColor:V,position:"absolute",top:0,bottom:0,opacity:this.state.imgLoaded?0:1,right:0,left:0},P&&T)}),M.base64&&c.default.createElement(I,{src:M.base64,spreadProps:N,imageVariants:x,generateSources:E}),M.tracedSVG&&c.default.createElement(I,{src:M.tracedSVG,spreadProps:N,imageVariants:x,generateSources:w}),this.state.isVisible&&c.default.createElement("picture",null,v(x),c.default.createElement(L,{alt:r,title:t,sizes:M.sizes,src:M.src,crossOrigin:this.props.crossOrigin,srcSet:M.srcSet,style:z,ref:this.imageRef,onLoad:this.handleImageLoaded,onError:this.props.onError,itemProp:S,loading:j,draggable:O})),this.addNoScript&&c.default.createElement("noscript",{dangerouslySetInnerHTML:{__html:k((0,l.default)({alt:r,title:t,loading:j},M,{imageVariants:x}))}}))}if(m){var W=m,F=W[0],H=(0,l.default)({position:"relative",overflow:"hidden",display:"inline-block",width:F.width,height:F.height},n);return"inherit"===n.display&&delete H.display,c.default.createElement(y,{className:(a||"")+" gatsby-image-wrapper",style:H,ref:this.handleRef,key:"fixed-"+JSON.stringify(F.srcSet)},V&&c.default.createElement(y,{title:t,style:(0,l.default)({backgroundColor:V,width:F.width,opacity:this.state.imgLoaded?0:1,height:F.height},P&&T)}),F.base64&&c.default.createElement(I,{src:F.base64,spreadProps:N,imageVariants:W,generateSources:E}),F.tracedSVG&&c.default.createElement(I,{src:F.tracedSVG,spreadProps:N,imageVariants:W,generateSources:w}),this.state.isVisible&&c.default.createElement("picture",null,v(W),c.default.createElement(L,{alt:r,title:t,width:F.width,height:F.height,sizes:F.sizes,src:F.src,crossOrigin:this.props.crossOrigin,srcSet:F.srcSet,style:z,ref:this.imageRef,onLoad:this.handleImageLoaded,onError:this.props.onError,itemProp:S,loading:j,draggable:O})),this.addNoScript&&c.default.createElement("noscript",{dangerouslySetInnerHTML:{__html:k((0,l.default)({alt:r,title:t,loading:j},F,{imageVariants:W}))}}))}return null},t}(c.default.Component);R.defaultProps={fadeIn:!0,durationFadeIn:500,alt:"",Tag:"div",loading:"lazy"};var P=u.default.shape({width:u.default.number.isRequired,height:u.default.number.isRequired,src:u.default.string.isRequired,srcSet:u.default.string.isRequired,base64:u.default.string,tracedSVG:u.default.string,srcWebp:u.default.string,srcSetWebp:u.default.string,media:u.default.string}),z=u.default.shape({aspectRatio:u.default.number.isRequired,src:u.default.string.isRequired,srcSet:u.default.string.isRequired,sizes:u.default.string.isRequired,base64:u.default.string,tracedSVG:u.default.string,srcWebp:u.default.string,srcSetWebp:u.default.string,media:u.default.string});R.propTypes={resolutions:P,sizes:z,fixed:u.default.oneOfType([P,u.default.arrayOf(P)]),fluid:u.default.oneOfType([z,u.default.arrayOf(z)]),fadeIn:u.default.bool,durationFadeIn:u.default.number,title:u.default.string,alt:u.default.string,className:u.default.oneOfType([u.default.string,u.default.object]),critical:u.default.bool,crossOrigin:u.default.oneOfType([u.default.string,u.default.bool]),style:u.default.object,imgStyle:u.default.object,placeholderStyle:u.default.object,placeholderClassName:u.default.string,backgroundColor:u.default.oneOfType([u.default.string,u.default.bool]),onLoad:u.default.func,onError:u.default.func,onStartLoad:u.default.func,Tag:u.default.string,itemProp:u.default.string,loading:u.default.oneOf(["auto","lazy","eager"]),draggable:u.default.bool};var V=R;t.default=V},C331:function(e,t,r){"use strict";r("2Spj"),r("HAE/"),r("pIFo");var a="bfred-it:object-fit-images",i=/(object-fit|object-position)\s*:\s*([-.\w\s%]+)/g,n="undefined"==typeof Image?{style:{"object-position":1}}:new Image,o="object-fit"in n.style,s="object-position"in n.style,l="background-size"in n.style,c="string"==typeof n.currentSrc,u=n.getAttribute,d=n.setAttribute,f=!1;function p(e,t,r){var a="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='"+(t||1)+"' height='"+(r||0)+"'%3E%3C/svg%3E";u.call(e,"src")!==a&&d.call(e,"src",a)}function g(e,t){e.naturalWidth?t(e):setTimeout(g,100,e,t)}function m(e){var t=function(e){for(var t,r=getComputedStyle(e).fontFamily,a={};null!==(t=i.exec(r));)a[t[1]]=t[2];return a}(e),r=e[a];if(t["object-fit"]=t["object-fit"]||"fill",!r.img){if("fill"===t["object-fit"])return;if(!r.skipTest&&o&&!t["object-position"])return}if(!r.img){r.img=new Image(e.width,e.height),r.img.srcset=u.call(e,"data-ofi-srcset")||e.srcset,r.img.src=u.call(e,"data-ofi-src")||e.src,d.call(e,"data-ofi-src",e.src),e.srcset&&d.call(e,"data-ofi-srcset",e.srcset),p(e,e.naturalWidth||e.width,e.naturalHeight||e.height),e.srcset&&(e.srcset="");try{!function(e){var t={get:function(t){return e[a].img[t||"src"]},set:function(t,r){return e[a].img[r||"src"]=t,d.call(e,"data-ofi-"+r,t),m(e),t}};Object.defineProperty(e,"src",t),Object.defineProperty(e,"currentSrc",{get:function(){return t.get("currentSrc")}}),Object.defineProperty(e,"srcset",{get:function(){return t.get("srcset")},set:function(e){return t.set(e,"srcset")}})}(e)}catch(n){window.console&&console.warn("https://bit.ly/ofi-old-browser")}}!function(e){if(e.srcset&&!c&&window.picturefill){var t=window.picturefill._;e[t.ns]&&e[t.ns].evaled||t.fillImg(e,{reselect:!0}),e[t.ns].curSrc||(e[t.ns].supported=!1,t.fillImg(e,{reselect:!0})),e.currentSrc=e[t.ns].curSrc||e.src}}(r.img),e.style.backgroundImage='url("'+(r.img.currentSrc||r.img.src).replace(/"/g,'\\"')+'")',e.style.backgroundPosition=t["object-position"]||"center",e.style.backgroundRepeat="no-repeat",e.style.backgroundOrigin="content-box",/scale-down/.test(t["object-fit"])?g(r.img,(function(){r.img.naturalWidth>e.width||r.img.naturalHeight>e.height?e.style.backgroundSize="contain":e.style.backgroundSize="auto"})):e.style.backgroundSize=t["object-fit"].replace("none","auto").replace("fill","100% 100%"),g(r.img,(function(t){p(e,t.naturalWidth,t.naturalHeight)}))}function h(e,t){var r=!f&&!e;if(t=t||{},e=e||"img",s&&!t.skipTest||!l)return!1;"img"===e?e=document.getElementsByTagName("img"):"string"==typeof e?e=document.querySelectorAll(e):"length"in e||(e=[e]);for(var i=0;i<e.length;i++)e[i][a]=e[i][a]||{skipTest:t.skipTest},m(e[i]);r&&(document.body.addEventListener("load",(function(e){"IMG"===e.target.tagName&&h(e.target,{skipTest:t.skipTest})}),!0),f=!0,e="img"),t.watchMQ&&window.addEventListener("resize",h.bind(null,e,{skipTest:t.skipTest}))}h.supportsObjectFit=o,h.supportsObjectPosition=s,function(){function e(e,t){return e[a]&&e[a].img&&("src"===t||"srcset"===t)?e[a].img:e}s||(HTMLImageElement.prototype.getAttribute=function(t){return u.call(e(this,t),t)},HTMLImageElement.prototype.setAttribute=function(t,r){return d.call(e(this,t),t,String(r))})}(),e.exports=h},OGtf:function(e,t,r){var a=r("XKFU"),i=r("eeVq"),n=r("vhPU"),o=/"/g,s=function(e,t,r,a){var i=String(n(e)),s="<"+t;return""!==r&&(s+=" "+r+'="'+String(a).replace(o,""")+'"'),s+">"+i+"</"+t+">"};e.exports=function(e,t){var r={};r[e]=t(s),a(a.P+a.F*i((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})),"String",r)}},ciIH:function(e,t,r){"use strict";r("VRzm"),r("Btvt");var a=r("jGDn"),i=r("5NKs");t.__esModule=!0,t.default=void 0;var n=i(r("j8BX")),o=i(r("uDP2")),s=i(r("jGDn")),l=i(r("v06X")),c=i(r("XEEL")),u=i(r("0jh0")),d=a(r("q1tI")),f=i(r("17x9")),p=i(r("9eSz")),g=function(e){function t(){for(var t,r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return t=e.call.apply(e,[this].concat(a))||this,(0,u.default)((0,l.default)(t),"imageRef",t.props.innerRef||(0,d.createRef)()),t}(0,c.default)(t,e);var a=t.prototype;return a.componentDidMount=function(){var e=this,t=document.createElement("img");void 0!==t.style.objectFit&&void 0!==t.style.objectPosition||Promise.resolve().then((function(){return(0,s.default)(r("C331"))})).then((function(t){return(0,t.default)(e.imageRef.current.imageRef.current)}))},a.render=function(){var e=this.props,t=e.objectFit,r=e.objectPosition,a=(0,o.default)(e,["objectFit","objectPosition"]);return d.default.createElement(p.default,(0,n.default)({ref:this.imageRef},a,{imgStyle:(0,n.default)({},a.imgStyle,{objectFit:t,objectPosition:r,fontFamily:'"object-fit: '+t+"; object-position: "+r+'"'})}))},t}(d.Component);g.propTypes={objectFit:f.default.string,objectPosition:f.default.string},g.defaultProps={objectFit:"cover",objectPosition:"50% 50%"};var m=(0,d.forwardRef)((function(e,t){return d.default.createElement(g,(0,n.default)({},e,{innerRef:t}))}));t.default=m},cjBy:function(e,t){function r(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=r=function(e){return typeof e}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(t)}e.exports=r},jGDn:function(e,t,r){var a=r("cjBy");function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}e.exports=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var s=n?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,t&&t.set(e,r),r}}}]);
//# sourceMappingURL=component---src-pages-works-js-a2328d785a55db0b0c26.js.map