-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomponent---src-pages-index-tsx-e7da40f2c74b1ffd8620.js
2 lines (2 loc) · 15.2 KB
/
component---src-pages-index-tsx-e7da40f2c74b1ffd8620.js
1
2
(self.webpackChunkgatsby_starter_default=self.webpackChunkgatsby_starter_default||[]).push([[691],{7228:function(t){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n},t.exports.default=t.exports,t.exports.__esModule=!0},2858:function(t){t.exports=function(t){if(Array.isArray(t))return t},t.exports.default=t.exports,t.exports.__esModule=!0},3646:function(t,e,r){var n=r(7228);t.exports=function(t){if(Array.isArray(t))return n(t)},t.exports.default=t.exports,t.exports.__esModule=!0},6860:function(t){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.default=t.exports,t.exports.__esModule=!0},3884:function(t){t.exports=function(t,e){var r=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null!=r){var n,o,a=[],i=!0,u=!1;try{for(r=r.call(t);!(i=(n=r.next()).done)&&(a.push(n.value),!e||a.length!==e);i=!0);}catch(s){u=!0,o=s}finally{try{i||null==r.return||r.return()}finally{if(u)throw o}}return a}},t.exports.default=t.exports,t.exports.__esModule=!0},521:function(t){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},8206:function(t){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},3038:function(t,e,r){var n=r(2858),o=r(3884),a=r(379),i=r(521);t.exports=function(t,e){return n(t)||o(t,e)||a(t,e)||i()},t.exports.default=t.exports,t.exports.__esModule=!0},319:function(t,e,r){var n=r(3646),o=r(6860),a=r(379),i=r(8206);t.exports=function(t){return n(t)||o(t)||a(t)||i()},t.exports.default=t.exports,t.exports.__esModule=!0},379:function(t,e,r){var n=r(7228);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0},7091:function(t){"use strict";var e="%[a-f0-9]{2}",r=new RegExp(e,"gi"),n=new RegExp("("+e+")+","gi");function o(t,e){try{return decodeURIComponent(t.join(""))}catch(a){}if(1===t.length)return t;e=e||1;var r=t.slice(0,e),n=t.slice(e);return Array.prototype.concat.call([],o(r),o(n))}function a(t){try{return decodeURIComponent(t)}catch(a){for(var e=t.match(r),n=1;n<e.length;n++)e=(t=o(e,n).join("")).match(r);return t}}t.exports=function(t){if("string"!=typeof t)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof t+"`");try{return t=t.replace(/\+/g," "),decodeURIComponent(t)}catch(e){return function(t){for(var r={"%FE%FF":"��","%FF%FE":"��"},o=n.exec(t);o;){try{r[o[0]]=decodeURIComponent(o[0])}catch(e){var i=a(o[0]);i!==o[0]&&(r[o[0]]=i)}o=n.exec(t)}r["%C2"]="�";for(var u=Object.keys(r),s=0;s<u.length;s++){var c=u[s];t=t.replace(new RegExp(c,"g"),r[c])}return t}(t)}}},8616:function(t){"use strict";t.exports=function(t,e){for(var r={},n=Object.keys(t),o=Array.isArray(e),a=0;a<n.length;a++){var i=n[a],u=t[i];(o?-1!==e.indexOf(i):e(i,u,t))&&(r[i]=u)}return r}},2203:function(t,e,r){"use strict";var n=r(3038),o=r(319);function a(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){s=!0,a=t},f:function(){try{u||null==r.return||r.return()}finally{if(s)throw a}}}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var u=r(8936),s=r(7091),c=r(4734),l=r(8616);function f(t){if("string"!=typeof t||1!==t.length)throw new TypeError("arrayFormatSeparator must be single character string")}function p(t,e){return e.encode?e.strict?u(t):encodeURIComponent(t):t}function d(t,e){return e.decode?s(t):t}function g(t){return Array.isArray(t)?t.sort():"object"==typeof t?g(Object.keys(t)).sort((function(t,e){return Number(t)-Number(e)})).map((function(e){return t[e]})):t}function m(t){var e=t.indexOf("#");return-1!==e&&(t=t.slice(0,e)),t}function y(t){var e=(t=m(t)).indexOf("?");return-1===e?"":t.slice(e+1)}function x(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&"string"==typeof t&&""!==t.trim()?t=Number(t):!e.parseBooleans||null===t||"true"!==t.toLowerCase()&&"false"!==t.toLowerCase()||(t="true"===t.toLowerCase()),t}function v(t,e){f((e=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},e)).arrayFormatSeparator);var r=function(t){var e;switch(t.arrayFormat){case"index":return function(t,r,n){e=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),e?(void 0===n[t]&&(n[t]={}),n[t][e[1]]=r):n[t]=r};case"bracket":return function(t,r,n){e=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),e?void 0!==n[t]?n[t]=[].concat(n[t],r):n[t]=[r]:n[t]=r};case"comma":case"separator":return function(e,r,n){var o="string"==typeof r&&r.includes(t.arrayFormatSeparator),a="string"==typeof r&&!o&&d(r,t).includes(t.arrayFormatSeparator);r=a?d(r,t):r;var i=o||a?r.split(t.arrayFormatSeparator).map((function(e){return d(e,t)})):null===r?r:d(r,t);n[e]=i};default:return function(t,e,r){void 0!==r[t]?r[t]=[].concat(r[t],e):r[t]=e}}}(e),o=Object.create(null);if("string"!=typeof t)return o;if(!(t=t.trim().replace(/^[?#&]/,"")))return o;var i,u=a(t.split("&"));try{for(u.s();!(i=u.n()).done;){var s=i.value;if(""!==s){var l=c(e.decode?s.replace(/\+/g," "):s,"="),p=n(l,2),m=p[0],y=p[1];y=void 0===y?null:["comma","separator"].includes(e.arrayFormat)?y:d(y,e),r(d(m,e),y,o)}}}catch(I){u.e(I)}finally{u.f()}for(var v=0,h=Object.keys(o);v<h.length;v++){var b=h[v],w=o[b];if("object"==typeof w&&null!==w)for(var k=0,j=Object.keys(w);k<j.length;k++){var Z=j[k];w[Z]=x(w[Z],e)}else o[b]=x(w,e)}return!1===e.sort?o:(!0===e.sort?Object.keys(o).sort():Object.keys(o).sort(e.sort)).reduce((function(t,e){var r=o[e];return Boolean(r)&&"object"==typeof r&&!Array.isArray(r)?t[e]=g(r):t[e]=r,t}),Object.create(null))}e.extract=y,e.parse=v,e.stringify=function(t,e){if(!t)return"";f((e=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},e)).arrayFormatSeparator);for(var r=function(r){return e.skipNull&&null==t[r]||e.skipEmptyString&&""===t[r]},n=function(t){switch(t.arrayFormat){case"index":return function(e){return function(r,n){var a=r.length;return void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:[].concat(o(r),null===n?[[p(e,t),"[",a,"]"].join("")]:[[p(e,t),"[",p(a,t),"]=",p(n,t)].join("")])}};case"bracket":return function(e){return function(r,n){return void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:[].concat(o(r),null===n?[[p(e,t),"[]"].join("")]:[[p(e,t),"[]=",p(n,t)].join("")])}};case"comma":case"separator":return function(e){return function(r,n){return null==n||0===n.length?r:0===r.length?[[p(e,t),"=",p(n,t)].join("")]:[[r,p(n,t)].join(t.arrayFormatSeparator)]}};default:return function(e){return function(r,n){return void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:[].concat(o(r),null===n?[p(e,t)]:[[p(e,t),"=",p(n,t)].join("")])}}}}(e),a={},i=0,u=Object.keys(t);i<u.length;i++){var s=u[i];r(s)||(a[s]=t[s])}var c=Object.keys(a);return!1!==e.sort&&c.sort(e.sort),c.map((function(r){var o=t[r];return void 0===o?"":null===o?p(r,e):Array.isArray(o)?o.reduce(n(r),[]).join("&"):p(r,e)+"="+p(o,e)})).filter((function(t){return t.length>0})).join("&")},e.parseUrl=function(t,e){e=Object.assign({decode:!0},e);var r=c(t,"#"),o=n(r,2),a=o[0],i=o[1];return Object.assign({url:a.split("?")[0]||"",query:v(y(t),e)},e&&e.parseFragmentIdentifier&&i?{fragmentIdentifier:d(i,e)}:{})},e.stringifyUrl=function(t,r){r=Object.assign({encode:!0,strict:!0},r);var n=m(t.url).split("?")[0]||"",o=e.extract(t.url),a=e.parse(o,{sort:!1}),i=Object.assign(a,t.query),u=e.stringify(i,r);u&&(u="?".concat(u));var s=function(t){var e="",r=t.indexOf("#");return-1!==r&&(e=t.slice(r)),e}(t.url);return t.fragmentIdentifier&&(s="#".concat(p(t.fragmentIdentifier,r))),"".concat(n).concat(u).concat(s)},e.pick=function(t,r,n){n=Object.assign({parseFragmentIdentifier:!0},n);var o=e.parseUrl(t,n),a=o.url,i=o.query,u=o.fragmentIdentifier;return e.stringifyUrl({url:a,query:l(i,r),fragmentIdentifier:u},n)},e.exclude=function(t,r,n){var o=Array.isArray(r)?function(t){return!r.includes(t)}:function(t,e){return!r(t,e)};return e.pick(t,o,n)}},4734:function(t){"use strict";t.exports=function(t,e){if("string"!=typeof t||"string"!=typeof e)throw new TypeError("Expected the arguments to be of type `string`");if(""===e)return[t];var r=t.indexOf(e);return-1===r?[t]:[t.slice(0,r),t.slice(r+e.length)]}},8936:function(t){"use strict";t.exports=function(t){return encodeURIComponent(t).replace(/[!'()*]/g,(function(t){return"%".concat(t.charCodeAt(0).toString(16).toUpperCase())}))}},1812:function(t,e,r){"use strict";r.r(e),r.d(e,{default:function(){return R}});var n=r(7294),o=r(6771),a=r(1496),i=r(3431);var u=(0,o.Z)(a.Z,{target:"e1n1u3tj0"})({name:"1on2x4e",styles:"width:120px;height:120px;margin-bottom:30px;border-radius:50%;@media (max-width: 768px){width:80px;height:80px;}"});var s=function(t){var e=t.profileImage;return(0,i.tZ)(u,{fluid:e,alt:"Profile Image"})};var c=(0,o.Z)("div",{target:"e160b013"})({name:"1u7ncg7",styles:"width:100%;background-image:linear-gradient(60deg, #29323c 0%, #485563 100%);color:#ffffff"}),l=(0,o.Z)("header",{target:"e160b012"})({name:"1ib3zlp",styles:"display:flex;flex-direction:column;justify-content:center;align-items:flex-start;width:768px;height:400px;margin:0 auto;padding:0 20px;@media (max-width: 768px){width:100%;height:300px;}"}),f=(0,o.Z)("div",{target:"e160b011"})({name:"1mgdphf",styles:"margin-top:5px;font-size:35px;font-weight:700;@media (max-width: 768px){font-size:25px;}"}),p=(0,o.Z)("div",{target:"e160b010"})({name:"1h8u8jj",styles:"font-size:20px;font-weight:400;@media (max-width: 768px){font-size:15px;}"});var d=function(t){var e=t.profileImage;return(0,i.tZ)(c,null,(0,i.tZ)(l,null,(0,i.tZ)(s,{profileImage:e}),(0,i.tZ)("div",null,(0,i.tZ)(p,null,"Hello World!"),(0,i.tZ)(f,null,"Super Awesome Blog!"))))},g=r(2122);var m=r(5444),y=["active","to"];var x=(0,o.Z)("div",{target:"e1kn8q5k1"})({name:"1israo0",styles:"display:flex;flex-wrap:wrap;width:768px;margin:50px auto 10px;padding:0 20px;@media (max-width: 768px){width:100%;margin-top:25px;}"}),v=(0,o.Z)((function(t){t.active;var e=t.to,r=function(t,e){if(null==t)return{};var r,n,o={},a=Object.keys(t);for(n=0;n<a.length;n++)r=a[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,y);return(0,i.tZ)(m.rU,(0,g.Z)({to:e},r))}),{target:"e1kn8q5k0"})("margin-right:20px;padding:5px 0;font-size:18px;font-weight:",(function(t){return t.active?"800":"400"}),";cursor:pointer;&:last-of-type{margin-right:0;}");var h=function(t){var e=t.selectedCategory,r=t.categoryList;return(0,i.tZ)(x,null,r&&Object.entries(r).map((function(t){var r=t[0],n=t[1];return(0,i.tZ)(v,{to:"/?category="+r,key:r,active:r===e},"#",r,"(",n,")")})))};var b=10,w=function(t,e){var r=(0,n.useRef)(null),o=(0,n.useRef)(null),a=(0,n.useState)(1),i=a[0],u=a[1],s=(0,n.useMemo)((function(){return e.filter((function(e){var r=e.node.frontmatter.categories;return"All"===t||r.includes(t)}))}),[t]);return(0,n.useEffect)((function(){o.current=new IntersectionObserver((function(t,e){t[0].isIntersecting&&(u((function(t){return t+1})),e.unobserve(t[0].target))}))}),[]),(0,n.useEffect)((function(){return u(1)}),[t]),(0,n.useEffect)((function(){b*i>=s.length||null===r.current||0===r.current.children.length||null===o.current||o.current.observe(r.current.children[r.current.children.length-1])}),[i,t]),{containerRef:r,postList:s.slice(0,i*b)}};var k=(0,o.Z)(m.rU,{target:"e1eg5kak7"})({name:"m7gxp6",styles:"display:flex;flex-direction:column;border-radius:10px;box-shadow:0 0 8px rgba(0, 0, 0, 0.15);transition:0.3s box-shadow;cursor:pointer;&:hover{box-shadow:0 0 10px rgba(0, 0, 0, 0.3);}"}),j=(0,o.Z)(a.Z,{target:"e1eg5kak6"})({name:"1axbq5h",styles:"width:100%;height:200px;border-radius:10px 10px 0 0"}),Z=(0,o.Z)("div",{target:"e1eg5kak5"})({name:"zp8s7h",styles:"display:flex;flex:1;flex-direction:column;padding:15px"}),I=(0,o.Z)("div",{target:"e1eg5kak4"})({name:"kw2b4d",styles:"display:-webkit-box;overflow:hidden;margin-bottom:3px;text-overflow:ellipsis;white-space:normal;overflow-wrap:break-word;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:20px;font-weight:700"}),A=(0,o.Z)("div",{target:"e1eg5kak3"})({name:"xm5j9w",styles:"font-size:14px;font-weight:400;opacity:0.7"}),O=(0,o.Z)("div",{target:"e1eg5kak2"})({name:"1sll9v6",styles:"display:flex;flex-wrap:wrap;margin:10px -5px"}),S=(0,o.Z)("div",{target:"e1eg5kak1"})({name:"ksdq7s",styles:"margin:2.5px 5px;padding:3px 5px;border-radius:5px;background:black;font-size:14px;font-weight:700;color:white"}),_=(0,o.Z)("div",{target:"e1eg5kak0"})({name:"ge4uq2",styles:"display:-webkit-box;margin-top:auto;overflow:hidden;overflow-wrap:break-word;text-overflow:ellipsis;white-space:normal;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:16px;opacity:0.8"});var F=function(t){var e=t.title,r=t.date,n=t.categories,o=t.summary,a=t.thumbnail.childImageSharp.fluid,u=t.link;return(0,i.tZ)(k,{to:u},(0,i.tZ)(j,{fluid:a,alt:"Post Item Image"}),(0,i.tZ)(Z,null,(0,i.tZ)(I,null,e),(0,i.tZ)(A,null,r),(0,i.tZ)(O,null,n.map((function(t){return(0,i.tZ)(S,{key:t},t)}))),(0,i.tZ)(_,null,o)))};var E=(0,o.Z)("div",{target:"es8e92y0"})({name:"1p3zhho",styles:"display:grid;grid-template-columns:1fr 1fr;grid-gap:20px;width:768px;margin:0 auto;padding:10px 20px;@media (max-width: 768px){grid-template-columns:1fr;width:100%;}"});var C=function(t){var e=t.selectedCategory,r=t.posts,n=w(e,r),o=n.containerRef,a=n.postList;return(0,i.tZ)(E,{ref:o},a.map((function(t){var e=t.node,r=e.id,n=e.fields.slug,o=e.frontmatter;return(0,i.tZ)(F,(0,g.Z)({},o,{link:n,key:r}))})))},U=r(2203),M=r(8440);var R=function(t){var e=t.location.search,r=t.data,o=r.site.siteMetadata,a=o.title,u=o.description,s=o.siteUrl,c=r.allMarkdownRemark.edges,l=r.file,f=l.publicURL,p=l.childImageSharp.fluid,g=U.parse(e),m="string"==typeof g.category&&g.category?g.category:"All",y=(0,n.useMemo)((function(){return c.reduce((function(t,e){return e.node.frontmatter.categories.forEach((function(e){void 0===t[e]?t[e]=1:t[e]++})),t.All++,t}),{All:0})}),[]);return(0,i.tZ)(M.Z,{title:a,description:u,url:s,image:f},(0,i.tZ)(d,{profileImage:p}),(0,i.tZ)(h,{selectedCategory:m,categoryList:y}),(0,i.tZ)(C,{selectedCategory:m,posts:c}))}}}]);
//# sourceMappingURL=component---src-pages-index-tsx-e7da40f2c74b1ffd8620.js.map