1"use strict";(self.webpackChunkseascape_web=self.webpackChunkseascape_web||[]).push([[1547],{40150:function(e,t,o){o.r(t),o.d(t,{default:function(){return C}});var n=o(19632),r=o.n(n),s=o(5574),i=o.n(s),l=o(19823),a=o(39380),c=o(67294),h=o(4393),p=o(26429),d=o(40411),u=o(42075),f=o(52704),v=o(86250),m=o(66309),g=o(75398),y=function(e,t){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},y(e,t)};var w=function(){return w=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},w.apply(this,arguments)};var b="Pixel",T="Percent",S={unit:T,value:.8};function _(e){return"number"==typeof e?{unit:T,value:100*e}:"string"==typeof e?e.match(/^(\d*(\.\d+)?)px$/)?{unit:b,value:parseFloat(e)}:e.match(/^(\d*(\.\d+)?)%$/)?{unit:T,value:parseFloat(e)}:(console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...'),S):(console.warn("scrollThreshold should be string or number"),S)}var E=function(e){function t(t){var o=e.call(this,t)||this;return o.lastScrollTop=0,o.actionTriggered=!1,o.startY=0,o.currentY=0,o.dragging=!1,o.maxPullDownDistance=0,o.getScrollableTarget=function(){return o.props.scrollableTarget instanceof HTMLElement?o.props.scrollableTarget:"string"==typeof o.props.scrollableTarget?document.getElementById(o.props.scrollableTarget):(null===o.props.scrollableTarget&&console.warn("You are trying to pass scrollableTarget but it is null. This might\n happen because the element may not have been added to DOM yet.\n See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info.\n "),null)},o.onStart=function(e){o.lastScrollTop||(o.dragging=!0,e instanceof MouseEvent?o.startY=e.pageY:e instanceof TouchEvent&&(o.startY=e.touches[0].pageY),o.currentY=o.startY,o._infScroll&&(o._infScroll.style.willChange="transform",o._infScroll.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)"))},o.onMove=function(e){o.dragging&&(e instanceof MouseEvent?o.currentY=e.pageY:e instanceof TouchEvent&&(o.currentY=e.touches[0].pageY),o.currentY<o.startY||(o.currentY-o.startY>=Number(o.props.pullDownToRefreshThreshold)&&o.setState({pullToRefreshThresholdBreached:!0}),o.currentY-o.startY>1.5*o.maxPullDownDistance||o._infScroll&&(o._infScroll.style.overflow="visible",o._infScroll.style.transform="translate3d(0px, "+(o.currentY-o.startY)+"px, 0px)")))},o.onEnd=function(){o.startY=0,o.currentY=0,o.dragging=!1,o.state.pullToRefreshThresholdBreached&&(o.props.refreshFunction&&o.props.refreshFunction(),o.setState({pullToRefreshThresholdBreached:!1})),requestAnimationFrame((function(){o._infScroll&&(o._infScroll.style.overflow="auto",o._infScroll.style.transform="none",o._infScroll.style.willChange="unset")}))},o.onScrollListener=function(e){"function"==typeof o.props.onScroll&&setTimeout((function(){return o.props.onScroll&&o.props.onScroll(e)}),0);var t=o.props.height||o._scrollableNode?e.target:document.documentElement.scrollTop?document.documentElement:document.body;o.actionTriggered||((o.props.inverse?o.isElementAtTop(t,o.props.scrollThreshold):o.isElementAtBottom(t,o.props.scrollThreshold))&&o.props.hasMore&&(o.actionTriggered=!0,o.setState({showLoader:!0}),o.props.next&&o.props.next()),o.lastScrollTop=t.scrollTop)},o.state={showLoader:!1,pullToRefreshThresholdBreached:!1,prevDataLength:t.dataLength},o.throttledOnScrollListener=function(e,t,o,n){var r,s=!1,i=0;function l(){r&&clearTimeout(r)}function a(){var a=this,c=Date.now()-i,h=arguments;function p(){i=Date.now(),o.apply(a,h)}function d(){r=void 0}s||(n&&!r&&p(),l(),void 0===n&&c>e?p():!0!==t&&(r=setTimeout(n?d:p,void 0===n?e-c:e)))}return"boolean"!=typeof t&&(n=o,o=t,t=void 0),a.cancel=function(){l(),s=!0},a}(150,o.onScrollListener).bind(o),o.onStart=o.onStart.bind(o),o.onMove=o.onMove.bind(o),o.onEnd=o.onEnd.bind(o),o}return function(e,t){function o(){this.constructor=e}y(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}(t,e),t.prototype.componentDidMount=function(){if(void 0===this.props.dataLength)throw new Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');
1if(this._scrollableNode=this.getScrollableTarget(),this.el=this.props.height?this._infScroll:this._scrollableNode||window,this.el&&this.el.addEventListener("scroll",this.throttledOnScrollListener),"number"==typeof this.props.initialScrollY&&this.el&&this.el instanceof HTMLElement&&this.el.scrollHeight>this.props.initialScrollY&&this.el.scrollTo(0,this.props.initialScrollY),this.props.pullDownToRefresh&&this.el&&(this.el.addEventListener("touchstart",this.onStart),this.el.addEventListener("touchmove",this.onMove),this.el.addEventListener("touchend",this.onEnd),this.el.addEventListener("mousedown",this.onStart),this.el.addEventListener("mousemove",this.onMove),this.el.addEventListener("mouseup",this.onEnd),this.maxPullDownDistance=this._pullDown&&this._pullDown.firstChild&&this._pullDown.firstChild.getBoundingClientRect().height||0,this.forceUpdate(),"function"!=typeof this.props.refreshFunction))throw new Error('Mandatory prop "refreshFunction" missing.\n Pull Down To Refresh functionality will not work\n as expected. Check README.md for usage\'')},t.prototype.componentWillUnmount=function(){this.el&&(this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd)))},t.prototype.componentDidUpdate=function(e){this.props.dataLength!==e.dataLength&&(this.actionTriggered=!1,this.setState({showLoader:!1}))},t.getDerivedStateFromProps=function(e,t){return e.dataLength!==t.prevDataLength?w(w({},t),{prevDataLength:e.dataLength}):null},t.prototype.isElementAtTop=function(e,t){void 0===t&&(t=.8);var o=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,n=_(t);return n.unit===b?e.scrollTop<=n.value+o-e.scrollHeight+1:e.scrollTop<=n.value/100+o-e.scrollHeight+1},t.prototype.isElementAtBottom=function(e,t){void 0===t&&(t=.8);var o=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,n=_(t);return n.unit===b?e.scrollTop+o>=e.scrollHeight-n.value:e.scrollTop+o>=n.value/100*e.scrollHeight},t.prototype.render=function(){var e=this,t=w({height:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),o=this.props.hasChildren||!!(this.props.children&&this.props.children instanceof Array&&this.props.children.length),n=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return c.createElement("div",{style:n,className:"infinite-scroll-component__outerdiv"},c.createElement("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(t){return e._infScroll=t},style:t},this.props.pullDownToRefresh&&c.createElement("div",{style:{position:"relative"},ref:function(t){return e._pullDown=t}},c.createElement("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance}},this.state.pullToRefreshThresholdBreached?this.props.releaseToRefreshContent:this.props.pullDownToRefreshContent)),this.props.children,!this.state.showLoader&&!o&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage))},t}(c.Component),x=E,L="blogPage___JT0rl",D="scrollableDiv___BG0Y0",Y=o(27484),M=o.n(Y),j=o(94272),R=o(85893),C=function(){var e=(0,c.useState)(!1),t=i()(e,2),o=t[0],n=t[1],s=(0,c.useState)([]),y=i()(s,2),w=y[0],b=y[1],T=(0,c.useState)(1),S=i()(T,2),_=S[0],E=S[1],Y=(0,c.useState)(!0),C=i()(Y,2),P=C[0],Z=C[1],H=function(){o||(n(!0),l.L.getByType("seascape_blogs",{page:_,pageSize:12,orderings:[{field:"document.first_publication_date",direction:"desc"}]}).then((function(e){b([].concat(r()(w),r()(e.results))),n(!1),E(_+1),Z(!!e.next_page)})).catch((function(){n(!1)})))};return(0,c.useEffect)((function(){var e;return null===(e=document.querySelector(".main-children"))||void 0===e||e.classList.add("main-children-width"),H(),function(){var e;null===(e=document.querySelector(".main-children"))||void 0===e||e.classList.remove("main-children-width")}}),[]),(0,R.jsx)(a._z,{header:{title:null},className:L,children:(0,R.jsx)("div",{id:"scrollableDiv",className:D,children:(0,R.jsx)(x,{dataLength:w.length,next:H,hasMore:P,loader:(0,R.jsx)(h.Z,{loading:!0}),scrollableTarget:"scrollableDiv",children:(0,R.jsx)(p.Z,{grid:{gutter:16,xs:1,sm:2,md:2,lg:3,xl:4,xxl:4},loading:o,dataSource:w,renderItem:function(e){var t,o;return(0,R.jsx)(p.Z.Item,{style:{height:"100%"},children:(0,R.jsx)(d.Z.Ribbon,{text:"New",placement:"end",color:"magenta",style:{display:M()(e.first_publication_date).isAfter(M()().subtract(10,"day"))?"":"none"},children:(0,R.jsxs)(h.Z,{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column"},hoverable:!0,cover:(0,R.jsx)("img",{draggable:!1,src:e.data.image.url}),styles:{body:{flex:1,display:"flex",flexDirection:"column"}},onClick:function(){j.history.push("/blog/".concat(e.uid))},children:[(0,R.jsxs)(u.Z,{direction:"vertical",children:[(0,R.jsx)(f.Z.Title,{level:5,children:null===(t=e.data.title[0])||void 0===t?void 0:t.text}),(0,R.jsx)(f.Z.Paragraph,{type:"secondary",ellipsis:{rows:3},children:null===(o=e.data.description[0])||void 0===o?void 0:o.text})]}),(0,R.jsxs)(v.Z,{align:"center",justify:"space-between",style:{marginTop:"auto"},children:[(0,R.jsxs)(u.Z,{children:[(0,R.jsx)(m.Z,{bordered:!1,color:"processing",children:M()(e.first_publication_date).format("MMM DD, YYYY")}),e.data.readtime&&(0,R.jsxs)(m.Z,{bordered:!1,color:"processing",children:[e.data.readtime," min read"]})]}),(0,R.jsx)(g.ZP,{type:"primary",shape:"round",children:"View"})]})]})})},e.id)}})})})})}},19823:function(e,t,o){o.d(t,{L:function(){return n}});var n=(0,o(54859).e)("https://blocklords.prismic.io/api/v2",{accessToken:"MC5ZelY3OWhFQUFEMHhwbGwy.JRHvv73vv73vv73vv71W77-9Su-_ve-_vQnvv73vv73vv71277-977-977-9Knge77-977-977-9NFor77-9de-_vRc"})}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.