1"use strict";(self.webpackChunksocialUX=self.webpackChunksocialUX||[]).push([[4749],{4749:function(t,r,e){function n(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=Array(r);e<r;e++)n[e]=t[e];return n}e.r(r),e.d(r,{default:function(){return l}});var a=(0,e(2452).A)((function(t,r,e,a){var l=t.hooks,i=t.h,o=t.Fragment;return function(t){var r,e,a=t.isLoggedIn,u=t.isLiked,c=t.totalLikes,s=t.toggleLike,f=(r=l.useState(c),e=2,function(t){if(Array.isArray(t))return t}(r)||function(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var n,a,l,i,o=[],u=!0,c=!1;try{if(l=(e=e.call(t)).next,0===r){if(Object(e)!==e)return;u=!1}else for(;!(u=(n=l.call(e)).done)&&(o.push(n.value),o.length!==r);u=!0);}catch(t){c=!0,a=t}finally{try{if(!u&&null!=e.return&&(i=e.return(),Object(i)!==i))return}finally{if(c)throw a}}return o}}(r,e)||function(t,r){if(t){if("string"==typeof t)return n(t,r);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?n(t,r):void 0}}(r,e)||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.")}()),h=f[0],k=f[1],b=l.useCallback((function(t){return!s(t)&&(a?(k(u?h-1:h+1),!1):res)}),[s,u,h,a]);return i(o,null,i("a",{onClick:b,class:"like-btn ".concat(u?"unlike":"like"),href:a?"javascript:;":"/login",ariaLabel:u?"Dislike post":"Like post"},i("i",{class:"heart fa ".concat(u?"fa-heart":"fa-heart-o")})),h>0?i("span",{class:"like-label"},i("span",{class:"like-count"}," ",h," ")):null)}}));function l(t){var r=t.preact;return a(r)}}}]); 2//# sourceMappingURL=4749.6c4a2c61562f1dea62e9.bundle.js.map
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.