(this.webpackJsonpwebapp=this.webpackJsonpwebapp||[]).push([[27],{1317:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(75),s=(n(6),n(17)),c=n(3),o=function(e){var t=e.date,n=e.className,o=Object(s.useSelector)((function(e){return e.i18nState.lang}));if(!t)return null;var a=r.DateTime.fromISO(t).setLocale(o);return Object(c.jsx)("time",{className:n,dateTime:t,children:a.toRelative()})}},1318:function(e,t,n){"use strict";n.d(t,"a",(function(){return j}));var r=n(4),s=n(22),c=n.n(s),o=n(5),a=n.n(o),i=(n(6),n(17)),l=n(320),u=n(321),d=n(3),b=function(e,t){var n=e.className,s=e.sponsorId,o=Object(i.useSelector)((function(e){return Object(u.c)(e,s)})),a=Object(i.useSelector)((function(e){return Object(u.d)(e,s)})),b=Object(i.useSelector)((function(e){var t,n;return Object(l.c)(e,null===a||void 0===a||null===(t=a.sponsor_medium)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.id)}));if(!s)return null;var j=null===o||void 0===o?void 0:o.name,m=null===b||void 0===b?void 0:b.original_tiny,f=null===o||void 0===o?void 0:o.bg_color,h=null===o||void 0===o?void 0:o.text_color,p=null===o||void 0===o?void 0:o.show_border,v=null===o||void 0===o?void 0:o.url,x=Object(d.jsxs)(d.Fragment,{children:[Object(d.jsx)("span",{className:"sponsorbadge__by",children:t.t("sponsored by")}),m?Object(d.jsx)("img",{src:m,className:"sponsorbadge__image",alt:j}):Object(d.jsx)("span",{className:"sponsorbadge__name",children:j})]}),O={className:c()("sponsorbadge",n),style:{backgroundColor:f,color:h,boxShadow:p?"0 0 0 1px ".concat(h):void 0}};return v?Object(d.jsx)("a",Object(r.a)(Object(r.a)({href:v,target:"_blank",rel:"noopener noreferrer"},O),{},{children:x})):Object(d.jsx)("span",Object(r.a)(Object(r.a)({},O),{},{children:x}))};b.defaultProps={className:""},b.contextTypes={t:a.a.func};var j=b},1319:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.forceVisible=t.forceCheck=t.lazyload=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(6),c=d(s),o=d(n(5)),a=n(1324),i=d(n(1325)),l=d(n(1326)),u=d(n(1327));function d(e){return e&&e.__esModule?e:{default:e}}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function j(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function m(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var f=0,h=0,p=0,v=0,x="data-lazyload-listened",O=[],g=[],y=!1;try{var k=Object.defineProperty({},"passive",{get:function(){y=!0}});window.addEventListener("test",null,k)}catch(L){}var N=!!y&&{capture:!1,passive:!0},_=function(e){var t=e.ref;if(t instanceof HTMLElement){var n=(0,i.default)(t);(e.props.overflow&&n!==t.ownerDocument&&n!==document&&n!==document.documentElement?function(e,t){var n=e.ref,r=void 0,s=void 0,c=void 0,o=void 0;try{var a=t.getBoundingClientRect();r=a.top,s=a.left,c=a.height,o=a.width}catch(L){r=f,s=h,c=v,o=p}var i=window.innerHeight||document.documentElement.clientHeight,l=window.innerWidth||document.documentElement.clientWidth,u=Math.max(r,0),d=Math.max(s,0),b=Math.min(i,r+c)-u,j=Math.min(l,s+o)-d,m=void 0,x=void 0,O=void 0,g=void 0;try{var y=n.getBoundingClientRect();m=y.top,x=y.left,O=y.height,g=y.width}catch(L){m=f,x=h,O=v,g=p}var k=m-u,N=x-d,_=Array.isArray(e.props.offset)?e.props.offset:[e.props.offset,e.props.offset];return k-_[0]<=b&&k+O+_[1]>=0&&N-_[0]<=j&&N+g+_[1]>=0}(e,n):function(e){var t=e.ref;if(!(t.offsetWidth||t.offsetHeight||t.getClientRects().length))return!1;var n=void 0,r=void 0;try{var s=t.getBoundingClientRect();n=s.top,r=s.height}catch(L){n=f,r=v}var c=window.innerHeight||document.documentElement.clientHeight,o=Array.isArray(e.props.offset)?e.props.offset:[e.props.offset,e.props.offset];return n-o[0]<=c&&n+r+o[1]>=0}(e))?e.visible||(e.props.once&&g.push(e),e.visible=!0,e.forceUpdate()):e.props.once&&e.visible||(e.visible=!1,e.props.unmountIfInvisible&&e.forceUpdate())}},S=function(){g.forEach((function(e){var t=O.indexOf(e);-1!==t&&O.splice(t,1)})),g=[]},T=function(){for(var e=0;e<O.length;++e){var t=O[e];_(t)}S()},w=void 0,C=null,P=function(e){function t(e){b(this,t);var n=j(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.visible=!1,n.setRef=n.setRef.bind(n),n}return m(t,e),r(t,[{key:"componentDidMount",value:function(){var e=window,t=this.props.scrollContainer;t&&"string"===typeof t&&(e=e.document.querySelector(t));var n=void 0!==this.props.debounce&&"throttle"===w||"debounce"===w&&void 0===this.props.debounce;if(n&&((0,a.off)(e,"scroll",C,N),(0,a.off)(window,"resize",C,N),C=null),C||(void 0!==this.props.debounce?(C=(0,l.default)(T,"number"===typeof this.props.debounce?this.props.debounce:300),w="debounce"):void 0!==this.props.throttle?(C=(0,u.default)(T,"number"===typeof this.props.throttle?this.props.throttle:300),w="throttle"):C=T),this.props.overflow){var r=(0,i.default)(this.ref);if(r&&"function"===typeof r.getAttribute){var s=+r.getAttribute(x)+1;1===s&&r.addEventListener("scroll",C,N),r.setAttribute(x,s)}}else if(0===O.length||n){var c=this.props,o=c.scroll,d=c.resize;o&&(0,a.on)(e,"scroll",C,N),d&&(0,a.on)(window,"resize",C,N)}O.push(this),_(this)}},{key:"shouldComponentUpdate",value:function(){return this.visible}},{key:"componentWillUnmount",value:function(){if(this.props.overflow){var e=(0,i.default)(this.ref);if(e&&"function"===typeof e.getAttribute){var t=+e.getAttribute(x)-1;0===t?(e.removeEventListener("scroll",C,N),e.removeAttribute(x)):e.setAttribute(x,t)}}var n=O.indexOf(this);-1!==n&&O.splice(n,1),0===O.length&&"undefined"!==typeof window&&((0,a.off)(window,"resize",C,N),(0,a.off)(window,"scroll",C,N))}},{key:"setRef",value:function(e){e&&(this.ref=e)}},{key:"render",value:function(){var e=this.props,t=e.height,n=e.children,r=e.placeholder,s=e.className,o=e.classNamePrefix,a=e.style;return c.default.createElement("div",{className:o+"-wrapper "+s,ref:this.setRef,style:a},this.visible?n:r||c.default.createElement("div",{style:{height:t},className:o+"-placeholder"}))}}]),t}(s.Component);P.propTypes={className:o.default.string,classNamePrefix:o.default.string,once:o.default.bool,height:o.default.oneOfType([o.default.number,o.default.string]),offset:o.default.oneOfType([o.default.number,o.default.arrayOf(o.default.number)]),overflow:o.default.bool,resize:o.default.bool,scroll:o.default.bool,children:o.default.node,throttle:o.default.oneOfType([o.default.number,o.default.bool]),debounce:o.default.oneOfType([o.default.number,o.default.bool]),placeholder:o.default.node,scrollContainer:o.default.oneOfType([o.default.string,o.default.object]),unmountIfInvisible:o.default.bool,style:o.default.object},P.defaultProps={className:"",classNamePrefix:"lazyload",once:!1,offset:0,overflow:!1,resize:!1,scroll:!0,unmountIfInvisible:!1};var I=function(e){return e.displayName||e.name||"Component"};t.lazyload=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){return function(n){function s(){b(this,s);var e=j(this,(s.__proto__||Object.getPrototypeOf(s)).call(this));return e.displayName="LazyLoad"+I(t),e}return m(s,n),r(s,[{key:"render",value:function(){return c.default.createElement(P,e,c.default.createElement(t,this.props))}}]),s}(s.Component)}},t.default=P,t.forceCheck=T,t.forceVisible=function(){for(var e=0;e<O.length;++e){var t=O[e];t.visible=!0,t.forceUpdate()}S()}},1320:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(e,t){var n,r,s,c,o,a;return{availableForUser:!!(null===e||void 0===e?void 0:e.available_for_user),availableForLoggedOut:!!(null===e||void 0===e||null===(n=e.available_fors)||void 0===n?void 0:n.includes(t.availableFor.loggedOut)),availableForLoggedIn:!!(null===e||void 0===e||null===(r=e.available_fors)||void 0===r?void 0:r.includes(t.availableFor.loggedIn)),availableForBuyer:!!(null===e||void 0===e||null===(s=e.available_fors)||void 0===s?void 0:s.includes(t.availableFor.buyer)),availableForSubscriber:!!(null===e||void 0===e||null===(c=e.available_fors)||void 0===c?void 0:c.includes(t.availableFor.subscriber)),availableForTokenHolder:!!(null===e||void 0===e||null===(o=e.available_fors)||void 0===o?void 0:o.includes(t.availableFor.tokenHolder)),availableForNftHolder:!!(null===e||void 0===e||null===(a=e.available_fors)||void 0===a?void 0:a.includes(t.availableFor.nftHolder))}}},1321:function(e,t,n){"use strict";var r=n(1322);n.d(t,"a",(function(){return r.a}))},1322:function(e,t,n){"use strict";var r=n(2),s=n.n(r),c=n(24),o=n(497),a=n.n(o),i=n(5),l=n.n(i),u=n(6),d=n(36),b=n.n(d),j=n(196),m=n.n(j),f=n(17),h=n(56),p=n(116),v=n(25),x=n(213),O=n(122),g=n(214),y=n(3),k=b()({loader:function(){return n.e(22).then(n.bind(null,1345))},loading:function(){return null},modules:["ButtonOnline"]}),N=function(e,t){var n=e.children,r=e.color,o=e.size,i=e.block,l=e.outline,d=e.className,b=Object(h.j)(),j=Object(f.useDispatch)(),N=function(){var e=Object(c.a)(s.a.mark((function e(t,n){var r,c,o,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=n,c="string"===typeof t?t:t.credentials,"object"===typeof t&&(r=t.notificationToken),o=new URL(c),a=o.searchParams,j(p.a.handleOAuthCallback({code:a.get("code"),state:Object(x.c)(a.get("state")),notification_token:r,redirectUri:"/account/redirect"}));case 5:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),_=Object(u.useCallback)(N,[]);Object(u.useEffect)((function(){m.a.define("getAuth",_)}),[_]);var S=function(){var e=Object(c.a)(s.a.mark((function e(){var t,n,r,c,o,i,l;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new URLSearchParams(b.search),n=a()(),r=n.code_challenge,c=n.code_verifier,j(p.a.setCodeVerifier({codeVerifier:c})),Object(O.a)(),Object(g.a)(),o=t.get("redirect")||b.pathname+b.search,i=v.h>0?{message:"Live login",title:"Live login",url:Object(x.b)(r,"/account/login",o),redirectUri:"".concat(Object(x.d)(),"/account/login")}:{message:"Live login",title:"Live login",url:Object(x.b)(r,"/account/redirect",o)},l=m.a.bind("onLoginStarted"),e.next=10,l(i);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(y.jsxs)(y.Fragment,{children:[v.f&&Object(y.jsx)(k,{className:d,onClick:S,color:r,size:o,block:i,outline:l,"data-testid":"login-button",children:n||Object(y.jsxs)(y.Fragment,{children:[t.t("Login / Register with"),"\xa0",t.t("FanID")]})}),!v.f&&Object(y.jsx)(k,{className:d,onClick:function(){var e=new URLSearchParams(b.search).get("redirect")||b.pathname+b.search;j(p.a.startOAuthLogin({redirect:e}))},color:r,size:o,block:i,outline:l,"data-testid":"login-button",children:n||Object(y.jsxs)(y.Fragment,{children:[t.t("Login / Register with"),"\xa0",t.t("FanID")]})})]})};N.contextTypes={t:l.a.func},N.defaultProps={color:"primary",size:"md",block:!1,outline:!1,className:"",children:null},t.a=N},1323:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(22),s=n.n(r),c=n(5),o=n.n(c),a=(n(6),n(1349)),i=n(1310),l=n(3),u=function(e,t){var n=e.className;return Object(l.jsxs)(i.a,{color:"primary",pill:!0,className:s()("z-index-3 mb-1",n),children:[Object(l.jsx)(a.a,{className:"mr-2"}),Object(l.jsx)("span",{children:t.t("Pinned to top")})]})};u.defaultProps={className:""},u.contextTypes={t:o.a.func};var d=u},1324:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.on=function(e,t,n,r){r=r||!1,e.addEventListener?e.addEventListener(t,n,r):e.attachEvent&&e.attachEvent("on"+t,(function(t){n.call(e,t||window.event)}))},t.off=function(e,t,n,r){r=r||!1,e.removeEventListener?e.removeEventListener(t,n,r):e.detachEvent&&e.detachEvent("on"+t,n)}},1325:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!(e instanceof HTMLElement))return document.documentElement;for(var t="absolute"===e.style.position,n=/(scroll|auto)/,r=e;r;){if(!r.parentNode)return e.ownerDocument||document.documentElement;var s=window.getComputedStyle(r),c=s.position,o=s.overflow,a=s["overflow-x"],i=s["overflow-y"];if("static"===c&&t)r=r.parentNode;else{if(n.test(o)&&n.test(a)&&n.test(i))return r;r=r.parentNode}}return e.ownerDocument||e.documentElement||document.documentElement}},1326:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r=void 0,s=void 0,c=void 0,o=void 0,a=void 0,i=function i(){var l=+new Date-o;l<t&&l>=0?r=setTimeout(i,t-l):(r=null,n||(a=e.apply(c,s),r||(c=null,s=null)))};return function(){c=this,s=arguments,o=+new Date;var l=n&&!r;return r||(r=setTimeout(i,t)),l&&(a=e.apply(c,s),c=null,s=null),a}}},1327:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r,s;return t||(t=250),function(){var c=n||this,o=+new Date,a=arguments;r&&o<r+t?(clearTimeout(s),s=setTimeout((function(){r=o,e.apply(c,a)}),t)):(r=o,e.apply(c,a))}}},1328:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(22),s=n.n(r),c=n(5),o=n.n(c),a=(n(6),n(3)),i=function(e){var t=e.label,n=e.className,r=e.positionY,c=e.positionX;return Object(a.jsx)("div",{className:s()("ribbon","ribbon-".concat(r,"-").concat(c),n),children:Object(a.jsx)("span",{children:t})})};i.defaultProps={className:""},i.contextTypes={t:o.a.func};var l=i},1332:function(e,t,n){"use strict";n.d(t,"a",(function(){return P}));var r=n(20),s=n(22),c=n.n(s),o=n(5),a=n.n(o),i=n(6),l=n(36),u=n.n(l),d=n(17),b=n(1280),j=n(1290),m=n(1315),f=n(1293),h=n(1294),p=n(1303),v=n(100),x=n(1344),O=n(136),g=n(1334),y=n(99),k=n(726),N=n(235),_=n(3),S=function(e,t){var n=e.children,r=e.minTokens,s=e.linkContent,c=Object(v.a)(),o=c.modules,a=c.options,i=Object(N.b)().startCreateWallet,l=Object(d.useSelector)((function(e){return e.account.currentUser})),u=Object(d.useSelector)((function(e){return e.lttoken.balance})),b=Object(d.useSelector)((function(e){return e.routes})),j=Object(d.useSelector)((function(e){return e.i18nState.lang}));return a.encourageFanIdWalletCreation&&l&&!l.wallet_address?Object(_.jsxs)("div",{className:"text-center my-3 d-flex flex-column align-items-center",children:[Object(_.jsx)("p",{className:"display-4",children:t.t("You need a wallet")}),Object(_.jsx)(k.a,{color:"primary",onClick:function(){return i()},className:"z-index-2",children:t.t("Create FanID Wallet")})]}):u<r?Object(_.jsxs)("div",{className:"text-center my-3 d-flex flex-column align-items-center",children:[Object(_.jsx)("p",{className:"display-4","data-testid":"not-enough-tokens-message",children:t.t("You need more {tokens} to do this",{tokens:t.t("Tokens")})}),(null===o||void 0===o?void 0:o.shop)&&Object(_.jsx)(y.a,{to:"/".concat(j,"/").concat(b.shop,"/"),className:"btn btn-primary z-index-2",children:s||Object(_.jsxs)(_.Fragment,{children:[Object(_.jsx)(O.a,{type:"icon-my-token-shop"}),t.t("Shop")]})})]}):n};S.contextTypes={t:a.a.func},S.defaultProps={minTokens:1,linkContent:null,children:null};var T=S,w=u()({loader:function(){return n.e(22).then(n.bind(null,1345))},loading:function(){return null},modules:["ButtonOnline"]}),C=function(e,t){var n=Object(v.a)().options,s=e.type,o=e.id,a=e.spendHeading,l=e.min,u=e.max,y=e.ctaText,k=e.ctaDisabled,N=e.ctaFullwidth,S=e.children,C=e.shareDistribution,P=e.fixedValue,I=e.transact,L=e.lockPeriodInMinutes,z=e.spendInfoHeading,M=e.spendInfo,F=e.loginRequirementMessage,U=e.className,E=e.skipConfirm,D=Object(d.useSelector)((function(e){return e.lttoken.balance})),A=Object(d.useSelector)((function(e){return e.account.skipConfirmation})),R=1===Object(d.useSelector)((function(e){var t;return null===(t=e.account.currentUser)||void 0===t?void 0:t.skip_boost_modal})),H=E||A||R||n.skip_boost_modal,V=Object(d.useSelector)((function(e){return e.transactions.creating})),B=u?Math.min(u,D):D,q=0===l?0:l||1,Y=Object(i.useState)(P||q),W=Object(r.a)(Y,2),Q=W[0],J=W[1],X=Object(i.useState)(!1),G=Object(r.a)(X,2),K=G[0],Z=G[1],$=function(){return Z(!1)},ee=Object(i.useState)(!1),te=Object(r.a)(ee,2),ne=te[0],re=te[1],se=function(){return re(!0)},ce=function(){setTimeout((function(){J(P||q)}),500)},oe=function(e){null===e||void 0===e||e.preventDefault(),$(),I&&I(Q,ce)};return Object(_.jsx)(_.Fragment,{children:Object(_.jsx)(g.a,{loginRequirementMessage:F,children:Object(_.jsxs)(T,{minTokens:P||q,children:[Object(_.jsxs)(b.a,{body:!0,className:c()("spend__card mb-4 z-index-2",U),children:[Object(_.jsx)("p",{className:"lead text-center mb-0",children:a||t.t("Amount of {tokens}",{tokens:t.t("Tokens")})}),Object(_.jsx)("p",{className:"text-center h1 mb-0",children:Object(_.jsx)("strong",{children:Q})}),Object(_.jsx)("p",{className:"text-center",children:t.t(["Token","Tokens","n"],{n:Q})}),!1===P&&Object(_.jsx)(_.Fragment,{children:Object(_.jsx)(j.a,{className:"mb-0",children:Object(_.jsx)(m.a,{type:"range",name:"spend-".concat(s,"-").concat(o),id:"spend-".concat(s,"-").concat(o),onChange:function(e){return J(e.target.value)},min:q,max:B,value:Q,className:"spend__rangeinput",disabled:V})})}),C&&Object(_.jsx)("div",{className:"text-right h4 mb-0",children:Object(_.jsx)(O.a,{type:"icon-info-fill",onClick:function(){return se},className:"cursor-pointer"})})]}),Object(_.jsx)(f.a,{className:"mb-4",children:Object(_.jsx)(h.a,{xs:{size:12},lg:N?12:{size:6,offset:3},className:"z-index-2",children:Object(_.jsxs)(w,{block:!0,color:"primary",disabled:k||V,onClick:H?function(){return oe()}:function(){return Z(!0)},size:"lg","data-testid":"unlock-confirm-button",children:[V&&Object(_.jsx)(p.a,{size:"sm",className:"mr-2"}),y||t.t("Boost")]})})}),Object(_.jsx)(x.a,{isOpen:K,onSubmit:function(e){return oe(e)},hideModal:$,submitMessage:y||t.t("Submit"),fanVaultShare:C&&C.fanvault_share?C.fanvault_share:null,itemCreatorShare:C&&C.creator_share?C.creator_share:null,depositShare:C&&C.deposit_share?C.deposit_share:null,operatorShare:C&&C.operator_share?C.operator_share:null,tokenAmount:parseInt(Q,10),confirmType:"spend-".concat(s),lockPeriodInMinutes:L,children:S&&S}),Object(_.jsx)(x.a,{infoType:!0,isOpen:ne,onSubmit:function(e){return oe(e)},hideModal:function(){return re(!1)},spendInfoHeading:z,spendInfo:M,submitMessage:y||t.t("Submit"),fanVaultShare:C&&C.fanvault_share?C.fanvault_share:null,itemCreatorShare:C&&C.creator_share?C.creator_share:null,depositShare:C&&C.deposit_share?C.deposit_share:null,operatorShare:C&&C.operator_share?C.operator_share:null,tokenAmount:parseInt(Q,10),confirmType:"spend-".concat(s),lockPeriodInMinutes:L,children:S&&S})]})})})};C.defaultProps={className:"",id:null,loginRequirementMessage:null,spendHeading:null,spendInfo:null,spendInfoHeading:null,min:null,max:null,ctaText:null,ctaDisabled:!1,ctaFullwidth:!1,children:null,shareDistribution:null,fixedValue:!1,lockPeriodInMinutes:null,transact:null,skipConfirm:!1},C.contextTypes={t:a.a.func},C.defaultProps={fixedValue:!1};var P=C},1333:function(e,t,n){"use strict";var r=n(5),s=n.n(r),c=(n(6),n(17)),o=n(322),a=n(122),i=n(1321),l=n(3),u=function(e,t){var n=Object(c.useSelector)((function(e){return e.account.currentUser})),r=Object(o.a)(),s=Object(a.b)(null===r||void 0===r?void 0:r.cookie).accessToken,u=e.children,d=e.linkContent,b=e.loginRequirementMessage,j=e.checkUserStatus,m=e.userLockedMessage,f=e.skipCheck,h=e.compact;return Object(l.jsxs)(l.Fragment,{children:[!f&&(!n||!s)&&Object(l.jsxs)("div",{className:"text-center my-3",children:[Object(l.jsx)("p",{className:h?"small":"lead",children:b||"".concat(t.t("You need to be logged in")," ").concat(t.t("to do this"))}),Object(l.jsx)(i.a,{size:h?"sm":"md",children:d||Object(l.jsxs)(l.Fragment,{children:[t.t("Login")," / ",t.t("Register")]})})]}),!f&&n&&j&&"unlocked"!==n.status&&Object(l.jsx)("div",{className:"text-center my-3",children:Object(l.jsx)("p",{className:"lead",children:m||t.t("Your user is locked or banned, thus you can not perform this action.")})}),(f||n&&(!j||"unlocked"===n.status))&&u]})};u.defaultProps={children:null,linkContent:null,loginRequirementMessage:null,userLockedMessage:null,checkUserStatus:!1,skipCheck:!1,compact:!1},u.contextTypes={t:s.a.func},t.a=u},1334:function(e,t,n){"use strict";var r=n(1333);n.d(t,"a",(function(){return r.a}))},1335:function(e,t,n){"use strict";n.d(t,"a",(function(){return j}));var r=n(22),s=n.n(r),c=n(5),o=n.n(c),a=(n(6),n(1319)),i=n.n(a),l=n(1299),u=n(100),d=n(3),b=function(e){var t=e.title,n=e.img_url,r=e.lazyLoad,c=Object(u.a)().options,o=null===c||void 0===c?void 0:c.show_moduleheader_heading;return Object(d.jsxs)(l.a,{className:"pt-2 moduleheader",children:[Object(d.jsx)("div",{className:"moduleheader__imgwrapper",children:Object(d.jsx)("div",{className:"bg-primary",children:r?Object(d.jsx)(i.a,{height:150,children:Object(d.jsx)("img",{src:n,alt:t,className:"img-fluid"})}):Object(d.jsx)("img",{src:n,alt:t,className:"img-fluid"})})}),Object(d.jsx)("h1",{className:s()("moduleheader__heading text-uppercase",{"d-none":!o}),children:Object(d.jsx)("span",{className:"moduleheader__heading__styled",children:t})})]})};b.defaultProps={lazyLoad:!1,img_url:void 0},b.contextTypes={t:o.a.func};var j=b},1337:function(e,t,n){"use strict";n.d(t,"a",(function(){return w}));var r=n(20),s=n(22),c=n.n(s),o=n(5),a=n.n(o),i=n(6),l=n(17),u=n(726),d=n(58),b=n(138),j=n(33),m=n(71),f=n(67),h=n(54),p=n(57),v=n(137),x=n(136),O=n(738),g=n(736),y=n(737),k=n(1321),N=n(3),_=function(e,t){var n=e.isOpen,r=e.toggle,s=e.loginRequirementMessage;return Object(N.jsxs)(O.a,{isOpen:n,toggle:r,centered:!0,children:[Object(N.jsx)(g.a,{toggle:r}),Object(N.jsx)(y.a,{children:Object(N.jsxs)("div",{className:"text-center my-5",children:[Object(N.jsx)("p",{className:"lead",children:s||"".concat(t.t("You need to be logged in")," ").concat(t.t("to do this"))}),Object(N.jsx)(k.a,{})]})})]})};_.defaultProps={loginRequirementMessage:null},_.contextTypes={t:a.a.func};var S=_,T=function(e,t){var n=e.resourceType,s=e.resourceId,o=e.className,a=e.disabled,O=e.color,g=e.block,y=e.label,k=e.outline,_=e.size,T=e.hideLikeCounter,w=Object(l.useSelector)((function(e){return e.account.currentUser})),C=Object(i.useState)(!1),P=Object(r.a)(C,2),I=P[0],L=P[1],z=function(){return L(!I)},M=Object(l.useSelector)((function(e){return e.constants})),F=Object(l.useDispatch)(),U=function(e,t){var n=Object(l.useSelector)((function(e){return e.constants}));return Object(l.useSelector)((function(r){switch(e){case n.resourceTypes.content:var s=Object(m.c)(r,t);return{likedByCurrentUser:s.liked_by_user,likes:s.likes_count,liking:r.contents.liking,unliking:r.contents.unliking,requestParams:{slug:s.slug}};case n.resourceTypes.comment:var c=Object(j.c)(r,t);return{likedByCurrentUser:c.liked_by_user,likes:c.likes_count,liking:r.comments.liking,unliking:r.comments.unliking,requestParams:{id:t}};case n.resourceTypes.feedPost:var o=Object(f.c)(r,t);return{likedByCurrentUser:o.liked_by_user,likes:o.likes_count,liking:r.feedPosts.liking,unliking:r.feedPosts.unliking,requestParams:{slug:null===o||void 0===o?void 0:o.slug}};case n.resourceTypes.groupPost:var a=Object(h.c)(r,t);return{likedByCurrentUser:a.liked_by_user,likes:a.likes_count,liking:r.groupPosts.liking,unliking:r.groupPosts.unliking,requestParams:{slug:null===a||void 0===a?void 0:a.slug}};case n.resourceTypes.idea:var i,l,u=Object(p.c)(r,t),x=Object(p.d)(r,t),O=Object(v.c)(r,null===x||void 0===x||null===(i=x.ideation_mission)||void 0===i||null===(l=i.data)||void 0===l?void 0:l.id);return{likedByCurrentUser:u.liked_by_user,likes:u.likes_count,liking:r.ideas.liking,unliking:r.ideas.unliking,requestParams:{slug:null===O||void 0===O?void 0:O.slug,idea_id:t}};case n.resourceTypes.amaQuestion:var g,y,k=Object(d.e)(r,t),N=Object(d.f)(r,t),_=Object(b.d)(r,null===N||void 0===N||null===(g=N.ama_session)||void 0===g||null===(y=g.data)||void 0===y?void 0:y.id);return{likedByCurrentUser:k.liked_by_user,likes:k.likes_count,liking:r.amaQuestions.liking,unliking:r.amaQuestions.unliking,requestParams:{slug:null===_||void 0===_?void 0:_.slug,ama_question_id:t}};default:return{}}}))}(n,s),E=U.likes,D=U.likedByCurrentUser,A=U.requestParams,R=U.liking,H=U.unliking,V=function(){var e=null;switch(n){case M.resourceTypes.content:e=m.a;break;case M.resourceTypes.comment:e=j.a;break;case M.resourceTypes.feedPost:e=f.a;break;case M.resourceTypes.groupPost:e=h.a;break;case M.resourceTypes.idea:e=p.a;break;case M.resourceTypes.amaQuestion:e=d.a}return{selectedActions:e}};return Object(N.jsxs)(N.Fragment,{children:[Object(N.jsx)(u.a,{className:c()("boostbutton",{"boostbutton--active":D},{"btn-labeled":!T&&(E||0===E)},o),color:O,onClick:function(){w&&D?function(){var e=V().selectedActions;e&&F(e.unlike(A))}():w?function(){var e=V().selectedActions;e&&F(e.like(A))}():z()},size:_,disabled:a||R||H,block:g,outline:k,children:y||Object(N.jsxs)(N.Fragment,{children:[Object(N.jsxs)("span",{className:c()({"btn-label":E||0===E}),children:[Object(N.jsx)(x.a,{type:D?"icon-liked":"icon-likeable",className:"mr-2"}),D?t.t("Liked"):t.t("Like")]}),!T&&(E||0===E)&&Object(N.jsx)("strong",{children:E})]})}),Object(N.jsx)(S,{isOpen:I,toggle:z,loginRequirementMessage:"".concat(t.t("You need to be logged in")," ").concat(t.t("to like this"))})]})};T.defaultProps={hideLikeCounter:!1,className:"",disabled:!1,color:"primary",block:!1,outline:!1,size:"sm",label:null},T.contextTypes={t:a.a.func};var w=T},1340:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(22),s=n.n(r),c=n(5),o=n.n(c),a=(n(6),n(726)),i=n(136),l=n(3),u=function(e,t){var n=e.boosts,r=e.onClick,c=e.className,o=e.boostedByCurrentUser,u=e.disabled,d=e.color,b=e.block,j=e.label,m=e.outline,f=e.size;return Object(l.jsx)(a.a,{className:s()("boostbutton",{"boostbutton--active":o},{"btn-labeled":n||0===n},c),color:d,onClick:r,size:f,disabled:u,block:b,outline:m,children:j||Object(l.jsxs)(l.Fragment,{children:[Object(l.jsxs)("span",{className:s()({"btn-label":n||0===n}),children:[Object(l.jsx)(i.a,{type:"icon-boost",className:"mr-2"}),t.t("Boost")]}),(n||0===n)&&Object(l.jsx)("strong",{children:n})]})})};u.defaultProps={boosts:null,boostedByCurrentUser:!1,className:"",disabled:!1,color:"primary",block:!1,outline:!1,size:"sm",label:null},u.contextTypes={t:o.a.func};var d=u},1341:function(e,t,n){"use strict";n.d(t,"a",(function(){return j}));var r=n(22),s=n.n(r),c=n(5),o=n.n(c),a=(n(6),n(81)),i=n(17),l=n(726),u=n(1309),d=n(3),b=function(e){var t=Object(i.useSelector)((function(e){return e.spendcollapse})),n=e.children,r=e.resourceType,c=e.resourceId,o=e.closeCollapse,b=e.closeAtBottom,j=e.className,m=r===t.resourceType&&c===t.resourceId,f=function(){return Object(d.jsx)("div",{className:"d-flex justify-content-center",children:Object(d.jsx)(l.a,{color:"link",onClick:o,className:s()("z-index-2",{"mb-2":!b}),children:b?Object(d.jsx)(a.h,{}):Object(d.jsx)(a.e,{})})})};return Object(d.jsx)(d.Fragment,{children:Object(d.jsxs)(u.a,{isOpen:m,className:s()(j),children:[!b&&o&&f(),n,b&&o&&f()]})})};b.defaultProps={children:null,className:"",closeCollapse:null,closeAtBottom:!1},b.contextTypes={t:o.a.func};var j=b},1342:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),s=n.n(r),c=n(6),o=n(17),a=n(85),i=n(25),l=function(e){var t=e.skipScrollToCard,n=Object(o.useSelector)((function(e){return e.routerHistory.currentHash})),r=Object(o.useSelector)((function(e){return e.routerHistory.history})),s=Object(o.useDispatch)();return Object(c.useEffect)((function(){if(!i.g&&n&&(setTimeout((function(){var e=[n.slice(0,1),"scroll-",n.slice(1)].join(""),r=document.querySelector(e);r||(r=document.querySelector(n));var c={behavior:"auto"};if(r){var o=r.querySelector(".card-body");!t&&o?o.scrollIntoView(c):r.scrollIntoView(c),s(Object(a.c)())}}),100),!i.g&&!n&&r.length<2)){window.scrollTo({left:0,top:0,behavior:"auto"})}}),[n]),null};l.propTypes={skipScrollToCard:s.a.bool},l.defaultProps={skipScrollToCard:!1};var u=l},1344:function(e,t,n){"use strict";n.d(t,"a",(function(){return w}));var r=n(20),s=n(5),c=n.n(s),o=n(6),a=n(1360),i=n(17),l=n(738),u=n(736),d=n(1304),b=n(737),j=n(726),m=n(1279),f=n(1290),h=n(1291),p=n(1292),v=n(116),x=n(1293),O=n(1294),g=n(136),y=n(3),k=function(e,t){var n=e.fanVaultShare,r=e.itemCreatorShare,s=e.depositShare,c=e.operatorShare,o=e.tokenAmount,a=e.lockPeriodInMinutes,i=e.spendInfoHeading,l=e.infoType,u=!!(a&&parseInt(a,10)>0)&&Math.round(a/60/24*100)/100;return Object(y.jsxs)("div",{className:"tokendistributioninfo",children:[i&&Object(y.jsx)("p",{className:"h3 text-primary text-center mb-4",children:i}),n&&Object(y.jsxs)(x.a,{className:"mb-2",children:[Object(y.jsx)(O.a,{xs:2,className:"d-flex justify-content-center",children:Object(y.jsx)(g.a,{type:"icon-fan-vault",width:"2rem",height:"2rem",className:"text-primary"})}),Object(y.jsx)(O.a,{xs:9,className:"d-flex align-items-center",children:Object(y.jsxs)("div",{children:[Object(y.jsx)("strong",{children:t.t("{tokenShare} go to the {fanVault}",{fanVault:t.t("Community Chest"),tokenShare:l?"".concat(n,"%"):t.t(["{n} Token","{n} Tokens","n"],{n:n*o/100})})}),Object(y.jsx)("p",{className:"small",children:t.t("The {fanVault} belongs to the entire {fanCommunity}. Tokens are regularly distributed among active members.",{fanVault:t.t("Community Chest"),fanCommunity:t.t("fan community")})})]})})]}),s&&Object(y.jsxs)(x.a,{className:"mb-2",children:[Object(y.jsx)(O.a,{xs:2,className:"d-flex justify-content-center",children:Object(y.jsx)(g.a,{type:"icon-lock",width:"2rem",height:"2rem",className:"text-primary"})}),Object(y.jsx)(O.a,{xs:9,className:"d-flex align-items-center",children:Object(y.jsxs)("div",{children:[Object(y.jsx)("strong",{children:Object(y.jsx)("span",{children:t.t("{tokenShare} are being frozen",{tokenShare:l?"".concat(s,"%"):t.t(["{n} Token","{n} Tokens","n"],{n:s*o/100})})})}),Object(y.jsxs)("p",{className:"small",children:[t.t("You still own frozen {tokens}, but you will not be able to use them",{tokens:t.t("tokens")}),u?Object(y.jsxs)("span",{children:[" ",t.t("until {lockedDays} days after the end of the {voting}.",{lockedDays:u,voting:t.t("voting")})]}):Object(y.jsxs)("span",{children:[" ",t.t("until after the end of the {voting}.",{voting:t.t("voting")})]})]})]})})]}),r&&Object(y.jsxs)(x.a,{className:"mb-2",children:[Object(y.jsx)(O.a,{xs:2,className:"d-flex justify-content-center",children:Object(y.jsx)(g.a,{type:"icon-creator-share-bulb",width:"2rem",height:"2rem",className:"text-primary"})}),Object(y.jsx)(O.a,{xs:9,className:"d-flex align-items-center d-flex align-items-center",children:Object(y.jsxs)("div",{children:[Object(y.jsx)("strong",{children:t.t("{tokenShare} go to the creator",{tokenShare:l?"".concat(r,"%"):t.t(["{n} Token","{n} Tokens","n"],{n:r*o/100})})}),Object(y.jsx)("p",{className:"small",children:t.t("These {tokens} will reward {creator} for his contribution.",{creator:t.t("the creator"),tokens:t.t("tokens")})})]})})]}),c&&Object(y.jsxs)(x.a,{className:"mb-2",children:[Object(y.jsx)(O.a,{xs:2,className:"d-flex justify-content-center",children:Object(y.jsx)(g.a,{type:"icon-burned",width:"2rem",height:"2rem",className:"text-primary"})}),Object(y.jsx)(O.a,{xs:9,className:"d-flex align-items-center",children:Object(y.jsxs)("div",{children:[Object(y.jsx)("strong",{children:t.t("{tokenShare} go back to the {appName}",{tokenShare:l?"".concat(c,"%"):t.t(["{n} Token","{n} Tokens","n"],{n:c*o/100}),appName:t.t("Appname")})}),Object(y.jsx)("p",{className:"small",children:t.t("With these {tokens}, you support the existence of this community.",{tokens:t.t("tokens")})})]})})]})]})};k.defaultProps={fanVaultShare:null,itemCreatorShare:null,depositShare:null,operatorShare:null,lockPeriodInMinutes:null,spendInfoHeading:"",infoType:!1},k.contextTypes={t:c.a.func};var N=k,_=function(e){var t=e.fanVaultShare,n=e.itemCreatorShare,r=e.depositShare,s=e.operatorShare;return Object(y.jsx)("div",{className:"tokendistributioninfoshort",children:Object(y.jsxs)("div",{className:"d-flex justify-content-around align-items-center my-3",children:[t&&Object(y.jsxs)("div",{className:"d-flex flex-column align-items-center",children:[Object(y.jsx)(g.a,{type:"icon-fan-vault",width:"2rem",height:"2rem",className:"text-primary mb-3"}),Object(y.jsxs)("p",{className:"h4 text-primary",children:[t,"%"]})]}),r&&Object(y.jsxs)("div",{className:"d-flex flex-column align-items-center",children:[Object(y.jsx)(g.a,{type:"icon-lock",width:"2rem",height:"2rem",className:"text-primary mb-3"}),Object(y.jsxs)("p",{className:"h4 text-primary",children:[r,"%"]})]}),n&&Object(y.jsxs)("div",{className:"d-flex flex-column align-items-center",children:[Object(y.jsx)(g.a,{type:"icon-creator-share-bulb",width:"2rem",height:"2rem",className:"text-primary mb-3"}),Object(y.jsxs)("p",{className:"h4 text-primary",children:[n,"%"]})]}),s&&Object(y.jsxs)("div",{className:"d-flex flex-column align-items-center",children:[Object(y.jsx)(g.a,{type:"icon-burned",width:"2rem",height:"2rem",className:"text-primary mb-3"}),Object(y.jsxs)("p",{className:"h4 text-primary",children:[s,"%"]})]})]})})};_.defaultProps={fanVaultShare:0,itemCreatorShare:0,depositShare:0,operatorShare:0},_.contextTypes={t:c.a.func};var S=_,T=function(e,t){var n=e.children,s=e.isOpen,c=e.onSubmit,x=e.hideModal,O=e.submitMessage,g=e.fanVaultShare,k=e.itemCreatorShare,_=e.depositShare,T=e.operatorShare,w=e.tokenAmount,C=e.lockPeriodInMinutes,P=e.infoType,I=e.spendInfoHeading,L=e.spendInfo,z=Object(i.useSelector)((function(e){return e.account.skipConfirmation})),M=1===Object(i.useSelector)((function(e){var t;return null===(t=e.account.currentUser)||void 0===t?void 0:t.skip_boost_modal})),F=z||M,U=Object(o.useState)(F||!1),E=Object(r.a)(U,2),D=E[0],A=E[1],R=Object(i.useDispatch)(),H=Object(o.useState)(!1),V=Object(r.a)(H,2),B=V[0],q=V[1];return Object(y.jsxs)(l.a,{isOpen:s,toggle:x,centered:!0,className:"confirmspend",children:[Object(y.jsx)(u.a,{close:Object(y.jsx)("button",{className:"close",onClick:x,type:"button",children:Object(y.jsx)(a.c,{})})}),Object(y.jsxs)(d.a,{onSubmit:c,children:[Object(y.jsxs)(b.a,{children:[L&&L,!P&&n,!P&&w&&Object(y.jsxs)(y.Fragment,{children:[Object(y.jsx)("p",{className:"text-center",children:t.t("You are using")}),Object(y.jsx)("p",{className:"h3 text-primary text-center",children:t.t(["{n} Token","{n} Tokens","n"],{n:w})})]}),w&&P&&Object(y.jsx)(N,{fanVaultShare:g,itemCreatorShare:k,depositShare:_,operatorShare:T,tokenAmount:w,lockPeriodInMinutes:C,spendInfoHeading:I,infoType:P}),w&&!P&&!B&&Object(y.jsxs)(y.Fragment,{children:[Object(y.jsx)(S,{fanVaultShare:g,itemCreatorShare:k,depositShare:_,operatorShare:T}),Object(y.jsx)("div",{className:"text-center",children:Object(y.jsx)(j.a,{color:"link",size:"sm",onClick:function(){return q(!0)},children:t.t("show Details")})})]}),w&&!P&&B&&Object(y.jsxs)(y.Fragment,{children:[Object(y.jsx)(N,{fanVaultShare:g,itemCreatorShare:k,depositShare:_,operatorShare:T,tokenAmount:w,lockPeriodInMinutes:C}),Object(y.jsx)("div",{className:"text-center",children:Object(y.jsx)(j.a,{color:"link",size:"sm",onClick:function(){return q(!1)},children:t.t("hide Details")})})]})]}),!P&&Object(y.jsxs)(m.a,{children:[Object(y.jsx)("div",{className:"text-center w-100 mb-3",children:Object(y.jsx)(f.a,{check:!0,children:Object(y.jsxs)(h.a,{check:!0,children:[Object(y.jsx)(p.a,{type:"checkbox",checked:D,onChange:function(){return A(!D),void R(v.a.setSkipConfirm({value:!D}))}}),t.t("Don't show this message again")]})})}),Object(y.jsx)(j.a,{block:!0,color:"primary",type:"submit",children:O})]})]})]})};T.defaultProps={children:null,fanVaultShare:null,itemCreatorShare:null,depositShare:null,operatorShare:null,tokenAmount:null,lockPeriodInMinutes:null,infoType:!1,spendInfoHeading:"",spendInfo:null},T.contextTypes={t:c.a.func};var w=T},1395:function(e,t,n){"use strict";n.d(t,"a",(function(){return q}));var r=n(2),s=n.n(r),c=n(24),o=n(20),a=n(22),i=n.n(a),l=n(5),u=n.n(l),d=n(6),b=n(81),j=n(1390),m=n(501),f=n(36),h=n.n(f),p=n(17),v=n(99),x=n(1280),O=n(1310),g=n(1295),y=n(726),k=n(1309),N=n(1303),_=n(235),S=n(100),T=n(316),w=n(71),C=n(496),P=n(1320),I=n(1340),L=n(136),z=n(1337),M=n(1321),F=n(1323),U=n(1317),E=n(1328),D=n(1332),A=n(1341),R=n(1318),H=n(3),V=h()({loader:function(){return n.e(26).then(n.bind(null,1394))},loading:function(){return null},modules:["ContentMedia"]}),B=function(e,t){var n,r,a=e.contentId,l=e.handleShowContent,u=e.homeFeed,f=e.skipLazyLoading,h=Object(S.a)().options.boostFeature,B=Object(p.useSelector)((function(e){return e.constants})),q=Object(p.useSelector)((function(e){return e.routes})),Y=Object(p.useSelector)((function(e){return e.i18nState.lang})),W=Object(p.useSelector)((function(e){return e.account.currentUser})),Q=Object(p.useSelector)((function(e){return Object(w.c)(e,a)})),J=Object(p.useSelector)((function(e){return Object(w.d)(e,a)})),X=Object(p.useSelector)((function(e){var t,n;return Object(T.d)(e,null===J||void 0===J||null===(t=J.hero_medium)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.id)})),G=Object(d.useState)(!1),K=Object(o.a)(G,2),Z=K[0],$=K[1],ee=function(){return $(!Z)},te=Object(p.useDispatch)(),ne=Object(p.useSelector)((function(e){return e.spendcollapse})),re=Object(p.useSelector)((function(e){return e.contents.unlocking}))===a,se=null===Q||void 0===Q?void 0:Q.is_pinned,ce=null===J||void 0===J||null===(n=J.sponsor)||void 0===n||null===(r=n.data)||void 0===r?void 0:r.id,oe=Object(_.b)().signTokenSendTransaction,ae=Object(P.a)(Q,B),ie=ae.availableForUser,le=ae.availableForLoggedOut,ue=ae.availableForLoggedIn,de=ae.availableForBuyer,be=function(){te(C.a.closeCollapse())},je=function(){var e=Object(c.a)(s.a.mark((function e(t,n){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Q||!a){e.next=5;break}return e.next=3,oe({eventName:B.events.contentBoosted,recipient:Q.contract_address,amount:t,option:a});case 3:be(),n();case 5:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),me=function(){var e=Object(c.a)(s.a.mark((function e(t,n){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(Q&&a&&Q.unlocker_address)){e.next=5;break}return e.next=3,oe({eventName:"ContentUnlocked",recipient:Q.unlocker_address,amount:t,option:a});case 3:ee(),n();case 5:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),fe=function(e){var n={article:t.t("this article"),image:t.t("this image"),audio:t.t("this podcast"),video:t.t("this video")};return n[e]?n[e]:e};if(!Q)return null;var he=Q.content_category||u&&se;return!(Q.only_for_availables&&!Q.available_for_user)&&Object(H.jsxs)(x.a,{className:"ressourcelistentry mb-3 card--feed","data-testid":"content-list-entry",children:[Q&&X&&Object(H.jsx)("div",{className:"ressourcelistentry__hero",id:"scroll-content-".concat(a),children:Object(H.jsx)(V,{heroMedium:X,availableForUser:ie,handleShowResource:function(){return l(Q.slug)},resourceId:a,resourceType:B.resourceTypes.content,isPreview:!0,isListEntry:!0,skipLazyLoading:f})}),Q&&X&&(!ie||ie&&!(le||ue))&&Object(H.jsx)(E.a,{label:ie?t.t("premium"):t.t("locked"),positionX:"right",positionY:"top"}),X&&he&&Object(H.jsxs)("span",{className:"position-absolute top-0 left-0 ml-2 mt-2 z-index-2",children:[u&&se&&Object(H.jsx)(F.a,{className:"mr-1"}),Q.content_category&&Object(H.jsx)(O.a,{color:"primary",pill:!0,className:"mr-1",children:Q.content_category})]}),Q&&Object(H.jsxs)(g.a,{children:[Object(H.jsxs)("div",{children:[Object(H.jsx)(H.Fragment,{children:ce&&Object(H.jsx)("div",{className:"d-flex mb-2",children:Object(H.jsx)(R.a,{sponsorId:ce})})}),Object(H.jsxs)("div",{className:"d-flex",children:[Q.title&&Object(H.jsx)("h2",{className:i()("h4",{"mb-3":!Q.author},{"mb-1":Q.author}),children:Q.title}),!ie&&Object(H.jsxs)("div",{className:"ml-auto align-self-start z-index-2",children:[W&&de&&Object(H.jsx)(y.a,{color:"primary",size:"sm",className:"ml-2",onClick:ee,children:Object(H.jsx)(j.a,{})}),!W&&ue&&Object(H.jsx)(M.a,{color:"primary",size:"sm",className:"ml-2",children:Object(H.jsx)(m.d,{})})]})]}),!X&&he&&Object(H.jsxs)("div",{className:"mb-2",children:[u&&se&&Object(H.jsx)(F.a,{className:"mr-1"}),Q.content_category&&Object(H.jsx)(O.a,{color:"primary",pill:!0,className:"mr-1",children:Q.content_category})]}),Object(H.jsxs)(k.a,{isOpen:Z,className:"my-3 z-index-1",children:[Object(H.jsxs)(D.a,{spendHeading:t.t("Unlock this {content} with",{content:t.t("content")}),type:B.resourceTypes.content,id:a,transact:me,fixedValue:Q.unlock_price,ctaText:t.t("Unlock"),shareDistribution:{fanvault_share:Q.unlocker_fanvault_share,operator_share:Q.unlocker_operator_share},children:[Object(H.jsx)("p",{className:"text-center",children:t.t("You unlock")}),Object(H.jsx)("p",{className:"h3 text-primary text-center",children:Q.title})]}),Object(H.jsx)("div",{className:"d-flex justify-content-center",children:Object(H.jsx)(y.a,{color:"link",onClick:ee,className:"z-index-2",children:Object(H.jsx)(b.h,{})})})]}),Object(H.jsxs)("p",{className:"small text-muted mb-3",children:[Object(H.jsxs)("span",{className:"",children:[Q.content_type===B.contentType.article&&Object(H.jsx)(L.a,{type:"icon-text-line",className:"mr-1"}),Q.content_type===B.contentType.image&&Object(H.jsx)(L.a,{type:"icon-image-line",className:"mr-1"}),Q.content_type===B.contentType.audio&&Object(H.jsx)(L.a,{type:"icon-sound-line",className:"mr-1"}),Q.content_type===B.contentType.video&&Object(H.jsx)(L.a,{type:"icon-video-line",className:"mr-1"})]}),Q.author&&Object(H.jsxs)("span",{children:[t.t("by")," ",Q.author," -"," "]}),Object(H.jsx)(v.a,{to:"/".concat(Y,"/").concat(q.contents,"/").concat(Q.slug,"/"),className:"stretched-link text-muted align-self-end",children:Object(H.jsx)(U.a,{date:Q.published_at||Q.created_at})})]}),re&&Object(H.jsx)("div",{className:"text-center my-3",children:Object(H.jsx)(N.a,{size:"lg",className:"mr-3"})}),Q.preview&&Object(H.jsx)("p",{children:Q.preview})]}),Object(H.jsx)(A.a,{resourceType:B.resourceTypes.content,resourceId:a,closeCollapse:be,className:"my-2",children:Object(H.jsxs)(D.a,{loginRequirementMessage:"".concat(t.t("You need to be logged in")," ").concat(t.t("to boost this")),spendHeading:t.t("Boost this {content} with",{content:t.t("content")}),spendInfo:Object(H.jsxs)("div",{className:"text-center",children:[Object(H.jsx)("h3",{className:"text-primary mb-4",children:t.t("This is what happens when you boost {thisContentType}",{thisContentType:fe(Q.content_type)})}),Object(H.jsx)("p",{children:t.t("You show your appreciation")}),Object(H.jsx)("p",{children:t.t("You influence its ranking and visibility")}),Object(H.jsx)("p",{children:t.t("Your collect activity points")})]}),spendInfoHeading:t.t("This is where your {tokens} go when you boost {thisContentType}",{thisContentType:fe(Q.content_type),tokens:t.t("Tokens")}),type:B.resourceTypes.content,id:a,transact:je,shareDistribution:{fanvault_share:null===Q||void 0===Q?void 0:Q.fanvault_share,creator_share:null===Q||void 0===Q?void 0:Q.creator_share,operator_share:null===Q||void 0===Q?void 0:Q.operator_share},children:[Object(H.jsx)("p",{className:"text-center",children:t.t("You boost")}),Object(H.jsx)("p",{className:"h3 text-primary text-center",children:Q.title})]})}),Object(H.jsxs)("div",{className:"d-flex",children:[Object(H.jsxs)("div",{className:"d-flex flex-column justify-content-center",children:[Object(H.jsx)("span",{className:"align-self-start",children:!ie&&!X&&Object(H.jsx)(O.a,{color:"primary",className:"mb-1 mr-1","data-testid":"content-available-for-badge",children:t.t("locked")})}),Object(H.jsxs)("div",{className:"d-flex align-items-center",children:[Q.reading_time&&Q.reading_time[1]>0&&Object(H.jsxs)("span",{className:"d-flex align-items-center small text-muted mr-3",children:[Object(H.jsx)(L.a,{type:"icon-reading",className:"mr-2"}),Q.reading_time[2]>30?Q.reading_time[1]+1:Q.reading_time[1],Object(H.jsx)("span",{children:"min"})]}),!!Q.comments_count&&Q.comments_count>0&&Object(H.jsxs)("span",{className:"d-flex align-items-center small text-muted mr-3",children:[Object(H.jsx)(L.a,{type:"icon-comment-line",className:"mr-2"}),Q.comments_count]})]})]}),h?Object(H.jsx)(I.a,{boosts:Q.boosts,onClick:function(){Q&&a&&(ne.resourceType===B.resourceTypes.content&&ne.resourceId===a?te(C.a.closeCollapse()):te(C.a.setOpenCollapse({resourceType:B.resourceTypes.content,resourceId:a})))},boostedByCurrentUser:Q.boosted_by_current_user,className:"z-index-2 ml-auto align-self-end"}):Object(H.jsx)(z.a,{resourceType:B.resourceTypes.content,resourceId:a,className:"z-index-2 ml-auto align-self-end"})]})]})]})};B.defaultProps={homeFeed:!1,skipLazyLoading:!1},B.contextTypes={t:u.a.func};var q=B},1553:function(e,t,n){"use strict";n.r(t),n.d(t,"Contents",(function(){return L}));var r=n(2),s=n.n(r),c=n(4),o=n(24),a=n(117),i=n(5),l=n.n(i),u=n(6),d=n(315),b=n(491),j=n(17),m=n(1299),f=n(1293),h=n(1294),p=n(726),v=n(104),x=n(20),O=n(22),g=n.n(O),y=n(100),k=n(71),N=n(3),_=function(e,t){var n,r=Object(y.a)().options,s=Object(j.useSelector)((function(e){return e.contents.listFilters})),c=Object(j.useSelector)((function(e){return e.contents.availableContentTypes})),o=Object(u.useState)((null===s||void 0===s||null===(n=s.content_types)||void 0===n?void 0:n[0])||null),a=Object(x.a)(o,2),i=a[0],l=a[1],d=Object(j.useDispatch)(),b=function(e){l(e),d(Object(k.e)({page:1,content_types:[e]}))};return Object(N.jsxs)("ul",{className:"contentfilter my-3",children:[Object(N.jsx)("li",{children:Object(N.jsx)("button",{type:"button",onClick:function(){return l(null),void d(Object(k.e)(void 0))},className:g()("contentfilter__option",{active:!i}),"data-testid":"contentfilter-all-button",children:t.t("All")})}),c.includes("article")&&Object(N.jsx)("li",{children:Object(N.jsx)("button",{type:"button",onClick:function(){return b("article")},className:g()("contentfilter__option",{active:"article"===i}),"data-testid":"contentfilter-articles-button",children:t.t("Articles")})}),c.includes("image")&&Object(N.jsx)("li",{children:Object(N.jsx)("button",{type:"button",onClick:function(){return b("image")},className:g()("contentfilter__option",{active:"image"===i}),"data-testid":"contentfilter-image-button",children:t.t("Images")})}),c.includes("video")&&Object(N.jsx)("li",{children:Object(N.jsx)("button",{type:"button",onClick:function(){return b("video")},className:g()("contentfilter__option",{active:"video"===i}),"data-testid":"contentfilter-video-button",children:t.t("Videos")})}),c.includes("audio")&&Object(N.jsx)("li",{children:Object(N.jsx)("button",{type:"button",onClick:function(){return b("audio")},className:g()("contentfilter__option",{active:"audio"===i}),"data-testid":"contentfilter-audio-button",children:t.t("Podcasts")})}),(null===r||void 0===r?void 0:r.show_premium_filter)&&Object(N.jsx)("li",{children:Object(N.jsx)("button",{type:"button",onClick:function(){return l("premium"),void d(Object(k.e)({page:1,premium_only:!0}))},className:g()("contentfilter__option",{active:"premium"===i}),"data-testid":"contentfilter-premium-button",children:t.t("Premium")})})]})};_.contextTypes={t:l.a.func};var S=_,T=n(1395),w=n(1335),C=n(314),P=n(1342),I=function(){var e=Object(o.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.filters,1!==t.page){e.next=4;break}return e.next=4,t.listContents(Object(c.a)({page:1},n));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function L(e,t){var n,r=Object(y.a)().options,s=e.listContents,o=e.filters,a=e.page,i=e.routes,l=e.loadingList,d=e.searchLocale,v=Object(j.useSelector)((function(e){return e.i18nState.lang})),x=function(t){(0,e.navigateTo)("/".concat(v,"/").concat(i.contents,"/").concat(t,"/"))},O=Object(j.useSelector)((function(e){return e.contents.idsList})),g=Object(j.useSelector)((function(e){return e.contents.listTotalCount}));return Object(u.useEffect)((function(){d&&d!==v&&s(Object(c.a)({page:1},o))}),[v,d,s]),Object(N.jsxs)(C.a,{id:"contents",title:t.t("News & More"),children:[Object(N.jsx)(P.a,{}),Object(N.jsxs)(b.a,{dataLength:O.length,next:l?function(){}:function(){s(Object(c.a)({page:a+1},o))},hasMore:O.length<g,loader:Object(N.jsx)("p",{className:"pb-3 text-center text-muted",children:t.t("Loading")}),endMessage:Object(N.jsx)("p",{className:"pb-3 text-center text-muted","data-testid":"content-list-end-message",children:l?t.t("Loading"):t.t("Yay! You have seen it all")}),refreshFunction:function(){s(Object(c.a)({page:1},o))},pullDownToRefresh:!0,pullDownToRefreshThreshold:50,pullDownToRefreshContent:Object(N.jsxs)("p",{className:"pb-3 text-center",children:["\u2193 ",t.t("Pull down to refresh")]}),releaseToRefreshContent:Object(N.jsxs)("p",{className:"pb-3 text-center",children:["\u2191 ",t.t("Release to refresh")]}),children:[Object(N.jsx)(w.a,{title:t.t("News & More"),img_url:null===(n=r.images)||void 0===n?void 0:n.headerContents}),Object(N.jsxs)(m.a,{children:[Object(N.jsx)(S,{}),Object(N.jsx)(f.a,{className:"contents-list","data-testid":"content-list",children:O&&O.map&&O.map((function(e,t){return Object(N.jsx)(h.a,{xs:12,id:"content-".concat(e),"data-testid":"content-list-item",children:Object(N.jsx)(T.a,{contentId:e,handleShowContent:x,skipLazyLoading:t<2})},"content_".concat(e))}))})]})]}),O.length<g&&!l&&Object(N.jsx)("div",{className:"text-center my-3",children:Object(N.jsx)(p.a,{color:"primary",onClick:l?function(){}:function(){s(Object(c.a)({page:a+1},o))},children:t.t("Load more")})})]})}L.defaultProps={filters:{},page:1,searchLocale:null},L.contextTypes={t:l.a.func};t.default=Object(j.connect)((function(e){return{filters:e.contents.listFilters,page:e.contents.listPage,searchLocale:e.contents.searchLocale,loadingList:e.contents.loadingList,routes:e.routes}}),(function(e){return Object(v.bindActionCreators)({listContents:k.e,navigateTo:a.e},e)}))(Object(d.frontloadConnect)(I,{onMount:!0,onUpdate:!1})(L))}}]);