﻿var _createClass = function () { function e(e, t) { for (var s = 0; s < t.length; s++) { var a = t[s]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function (t, s, a) { return s && e(t.prototype, s), a && e(t, a), t } }(); function _classCallCheck(e, t) { if (!(e instanceof t)) throw TypeError("Cannot call a class as a function") } function _possibleConstructorReturn(e, t) { if (!e) throw ReferenceError("this hasn't been initialised - super() hasn't been called"); return t && ("object" == typeof t || "function" == typeof t) ? t : e } function _inherits(e, t) { if ("function" != typeof t && null !== t) throw 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 Modal = function (e) { function t() { return _classCallCheck(this, t), _possibleConstructorReturn(this, Object.getPrototypeOf(t).apply(this, arguments)) } return _inherits(t, e), _createClass(t, [{ key: "componentDidMount", value: function e() { var t = document.getElementById("postpopup"); "flex" === getComputedStyle(t).display ? (t.classList.add("modal-hide"), setTimeout(function () { document.body.style.overflow = "initial", t.classList.remove("modal-show", "modal-hide"), t.style.display = "none" }, 200)) : (document.body.style.overflow = "hidden", t.style.display = "flex", t.classList.add("modal-show")) } }, { key: "getParsedDate", value: function e(t) { var s = new Date(parseInt(t.replace(/(^.*\()|([+-].*$)/g, ""))); return (s.getDate() + " " + ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"][s.getMonth()] + " " + s.getFullYear()).toString() } }, { key: "commentsValues", value: function e(t) { this.setState({ commentsListValues: t }) } }, { key: "likesValues", value: function e(t) { this.setState({ likeListValues: t }) } }, { key: "closeModal", value: function e() { var t = this; setTimeout(function () { var e = document.getElementById("postpopup"); e.classList.add("modal-hide"), document.body.style.overflow = "initial", e.classList.remove("modal-show", "modal-hide"), e.style.display = "none", t.props.handleHideModal() }, 200) } }, { key: "render", value: function e() { var t = this; return React.createElement("div", { className: "modal detail-popup", id: "postpopup" }, React.createElement("div", { className: "p-5 modal-content" }, React.createElement("span", { className: "modal-close   md:block hidden" }, React.createElement("button", { type: "button", className: "close", onClick: function e() { return t.closeModal() } }, " ", React.createElement("img", { src: "/Templates/ThemeProfileV1/Content/img/close-black.svg", width: "13", height: "14", alt: "close icon" }))), React.createElement("span", { className: "back-button", onClick: function e() { return t.closeModal() } }, React.createElement("img", { src: "/Templates/ThemeCityVersion6/Content/img/left-arrow.png", width: "22", height: "14", alt: "left arrow" }), React.createElement("h2", { className: "font-bold" }, this.props.List.Title)), React.createElement("div", { className: "grid grid-cols-1 gap-y-5 xl:gap-x-6 xl:grid-cols-3" }, React.createElement("div", { className: "col-span-2" }, 46 == this.props.List.Type ? React.createElement("div", { className: "video-post-popup" }, null != this.props.List.VideoId ? 1 == this.props.List.SourceContact ? React.createElement("iframe", { src: "https://www.youtube.com/embed/" + this.props.List.VideoId, frameBorder: "0", allowFullScreen: !0 }) : React.createElement("iframe", { src: this.props.List.VideoId, frameBorder: "0", allowFullScreen: !0 }) : React.createElement("img", { className: "img-fluid", src: "/Templates/ThemeCityVersion5/Content/img/no_image.gif", width: "700", height: "700", alt: this.props.List.Title })) : React.createElement("div", { id: "ListModalSlider", className: "carousel slide relative", "data-bs-ride": "carousel" }, React.createElement("div", { className: "carousel-inner relative w-full overflow-hidden" }, null != this.props.List.ImageUrl && this.props.List.ImageUrl.length > 0 ? this.imageSection() : React.createElement("div", { className: "carousel-inner relative w-full overflow-hidden" }, React.createElement("div", { className: "carousel-item relative float-left w-full" }, React.createElement("img", { className: "w-full mt-2 mb-3", src: "/Templates/ThemeCityVersion5/Content/img/no_image.gif", width: "700", height: "700", alt: this.props.List.Title })))), null != this.props.List.ImageUrl && this.props.List.ImageUrl.length > 1 ? React.createElement("div", null, React.createElement("button", { className: "carousel-control-prev absolute top-0 bottom-0 flex items-center justify-center p-0 text-center border-0 hover:outline-none hover:no-underline focus:outline-none focus:no-underline left-0", type: "button", "data-bs-target": "#ListModalSlider", "data-bs-slide": "prev" }, React.createElement("span", { className: "carousel-control-prev-icon inline-block bg-no-repeat", "aria-hidden": "true" }), React.createElement("span", { className: "visually-hidden" }, "Previous")), React.createElement("button", { className: "carousel-control-next absolute top-0 bottom-0 flex items-center justify-center p-0 text-center border-0 hover:outline-none hover:no-underline focus:outline-none focus:no-underline right-0", type: "button", "data-bs-target": "#ListModalSlider", "data-bs-slide": "next" }, React.createElement("span", { className: "carousel-control-next-icon inline-block bg-no-repeat", "aria-hidden": "true" }), React.createElement("span", { className: "visually-hidden" }, "Next"))) : "")), React.createElement("div", { className: "relative w-full pop-right" }, React.createElement("h2", { className: "font-bold" }, this.props.List.Title), React.createElement("small", { className: "block mb-3 font-semibold text-secondary-1 flex flex-wrap" }, React.createElement("span", { className: "mr-2 font-normal text-secondary-8" }, "Posted on ", this.getParsedDate(this.props.List.CreatedDate), " by"), " ", React.createElement("a", { href: "/" + this.props.List.ApplicationRelativeUrl }, " ", React.createElement("h4", { className: "modal-title" }, this.props.List.ApplicationName))), React.createElement("p", null, this.props.List.Description), React.createElement("div", { className: "calltoaction" }, " ", 18 == this.props.List.Type && null != this.props.List.ActionLink && null != this.props.List.ActionText && null != this.props.List.CallToAction ? React.createElement(FeedsCallToAction, { List: this.props.List }) : "", 17 == this.props.List.Type && !0 == this.props.List.EnabledActionType && null != this.props.List.CallToAction ? React.createElement(PortfolioCallToAction, { List: this.props.List }) : ""), React.createElement(CommentBox, { List: this.props.List, Follow: !1, commentsValues: function e(s) { return t.commentsValues(s) }, likesValues: function e(s) { return t.likesValues(s) }, commentsListValues: this.props.commentsListValues, likeListValues: this.props.likeListValues, CurrentUserId: this.props.CurrentUserId, IsCityAdmin: this.props.IsCityAdmin, HasSession: this.props.HasSession }))))) } }, { key: "imageSection", value: function e() { var t = this; switch (this.props.List.Type) { case 17: return this.props.List.ImageUrl.map(function (e, s) { return React.createElement("div", { className: 0 == s ? "carousel-item relative float-left w-full active" : "carousel-item relative float-left w-full ", key: s }, React.createElement("img", { className: "img-fluid", src: "https://cdn.citymapia.com/assets/Business/" + t.props.List.ApplicationId + "/portfolio/" + t.props.List.ParentId + "/" + e + "?rendered=true&width=1024", width: "700", height: "700", alt: t.props.List.Title })) }); case 18: return this.props.List.ImageUrl.map(function (e, s) { return React.createElement("div", { className: 0 == s ? "carousel-item relative float-left w-full active" : "carousel-item relative float-left w-full ", key: s }, React.createElement("img", { className: "img-fluid", src: "https://cdn.citymapia.com/assets/Business/" + t.props.List.ApplicationId + "/feeds/" + t.props.List.ParentId + "/" + e + "?rendered=true&width=1024", width: "700", height: "700", alt: t.props.List.Title })) }); case 29: return this.props.List.ImageUrl.map(function (e, s) { return React.createElement("div", { className: 0 == s ? "carousel-item relative float-left w-full active" : "carousel-item relative float-left w-full ", key: s }, React.createElement("img", { className: "img-fluid", src: "https://cdn.citymapia.com/assets/Business/" + t.props.List.ApplicationId + "/galleryimage/" + t.props.List.ParentId + "/" + e + "?rendered=true&width=1024", width: "700", height: "700", alt: t.props.List.Title })) }); case 44: return this.props.List.ImageUrl.map(function (e, s) { return React.createElement("div", { className: 0 == s ? "carousel-item relative float-left w-full active" : "carousel-item relative float-left w-full ", key: s }, React.createElement("img", { className: "img-fluid", src: "https://cdn.citymapia.com/assets/Business/" + t.props.List.ApplicationId + "/events/" + t.props.List.ParentId + "/" + e + "?rendered=true&width=1024", width: "700", height: "700", alt: t.props.List.Title })) }) } } }]), t }(React.Component), DeleteModal = function (e) { function t(e) { _classCallCheck(this, t); var s = _possibleConstructorReturn(this, Object.getPrototypeOf(t).call(this, e)); return s.state = { isModalOpen: !0 }, s } return _inherits(t, e), _createClass(t, [{ key: "componentDidMount", value: function e() { $(document.getElementById("ModalDelete")).modal("show"), $(document.getElementById("ModalDelete")).on("hidden.bs.modal", this.props.DeleteHideModal) } }, { key: "handleToggle", value: function e() { this.setState({ isModalOpen: !this.state.isModalOpen }), this.props.IsModal, $(document.getElementById("ModalDelete")).modal("hide") } }, { key: "DeleteComment", value: function e(t, s, a) { var i = this, n = window.location.pathname, l = { Id: t.Id, ParentId: s }, o = new Request(n + "/CommentDelete", { headers: { "Content-Type": "application/json" }, method: "POST", body: JSON.stringify(l) }); fetch(o).then(function (e) { return e.json() }).then(function (e) { !0 == e.Success ? (i.props.IsModal, $(document.getElementById("ModalDelete")).modal("hide"), i.props.deleteComment(a)) : (i.setState({ ErrorMessage: e.Message }), $(document.getElementById("ModalDelete")).modal("hide")) }) } }, { key: "render", value: function e() { var t = this; return !0 == this.props.IsModal || this.state.isModalOpen ? React.createElement("div", { className: "modal fade", id: "ModalDelete", role: "dialog" }, React.createElement("div", { className: "modal-dialog", role: "document" }, React.createElement("div", { className: "modal-content" }, React.createElement("div", { className: "modal-header" }, React.createElement("h5", { className: "modal-title" }, "Delete"), React.createElement("button", { type: "button", className: "close", onClick: function e(s) { return t.handleToggle(t) }, "aria-label": "Close" }, React.createElement("span", { "aria-hidden": "true" }, "\xd7"))), React.createElement("div", { className: "modal-body" }, React.createElement("p", null, "Are you sure you want to delete this comment?")), React.createElement("div", { className: "modal-footer" }, React.createElement("button", { type: "button", className: "btn-primary", onClick: function e(s) { return t.DeleteComment(t.props.Comments, t.props.ParentId, t.props.index, s) } }, "Delete"))))) : React.createElement("span", null) } }]), t }(React.Component), FeedsList = function (e) { function t(e) { _classCallCheck(this, t); var s = _possibleConstructorReturn(this, Object.getPrototypeOf(t).call(this, e)); return s.state = { items: [], loadingState: !1, total: 0, ImageWidth: 500, isPageProcessing: !1, pageIndex: 2, CurrentPage: 1, descriptionLength: 320 }, s.loadMoreItems = s.loadMoreItems.bind(s), s } return _inherits(t, e), _createClass(t, [{ key: "componentDidMount", value: function e() { var t = window.innerWidth; t >= 320 && t <= 667 ? this.setState({ ImageWidth: 400 }) : t >= 768 && t <= 1024 ? this.setState({ ImageWidth: 525 }) : t >= 1025 && this.setState({ ImageWidth: 700 }), this.newMethod(1, 10) } }, { key: "componentWillUpdate", value: function e() { var t = this, s = this.state.isPageProcessing, a = this.state.CurrentPage; $(window).scroll(function () { if ($("#ItemList").length > 0) { var e = $("#ItemList").offset().top, i = $("#ItemList").outerHeight(), n = $(window).height(), l = $(this).scrollTop() + 2e3; a >= 1 && l > e + i - n && !1 == s && t.ScrollPager() } }) } }, { key: "newMethod", value: function e(t, s) { var a = this, i = window.location.pathname, n = new Request(i + "/TimeLine", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ page: t, PageSize: 12 }) }); fetch(n).then(function (e) { return e.json() }).then(function (e) { if (a.state.items, e.ItemsModel.length > 0) { var s = e.ItemsModel.map(function (t) { return a.renderSwitch(t, e.CurrentUserId, e.HasSessionId, e.IsCityAdmin) }); a.setState({ items: a.state.items.concat(s), loadingState: !1, total: e.ItemsModel.length, page: t, isPageProcessing: !1 }) } else a.setState({ items: a.state.items.concat(a.NoData()) }) }) } }, { key: "NoData", value: function e() { return React.createElement("div", { className: "card mb-4 p-4 text-center mt-4", key: "66" }, React.createElement("img", { className: "img-fluid mx-auto", src: "/Templates/ThemeProfileWithCart/Content/img/no-post.gif", alt: "no post image", height: "150", width: "150" }), React.createElement("span", { className: "pt-3" }, "No Posts created yet.")) } }, { key: "getParsedDate", value: function e(t) { var s = new Date(parseInt(t.replace(/(^.*\()|([+-].*$)/g, ""))); return (s.getDate() + " " + ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"][s.getMonth()] + " " + s.getFullYear()).toString() } }, { key: "renderSwitch", value: function e(t, s, a, i) { switch (t.Type) { case 17: return this.PortfolioList(t, s, a, i); case 29: if (null != t.Title) return this.GalleryList(t, s, a, i); return; case 44: return this.EventList(t, s, a, i); case 46: return this.VideoList(t, s, a, i); case 18: return this.FeedsList(t, s, a, i); default: return } } }, { key: "PortfolioList", value: function e(t, s, a, i) { var n = "", l = "https://cdn.citymapia.com/" + t.ApplicationRelativeUrl + "/" + t.ParentId + "/Portfolio.jpg?width=" + this.state.ImageWidth + "&biz=" + t.ApplicationId + "&v=" + t.UpdatedDtm; return n = 1 == t.BusinessVersion ? "/" + t.ApplicationRelativeUrl + "/portfolio" : "/" + t.ApplicationRelativeUrl + "/product", React.createElement("div", { className: "mt-5 card", key: t.Type + "-" + t.ApplicationId + "-" + t.ParentId }, React.createElement(Portfolio, { List: t, ImageUrl: l, CurrentUserId: s, IsCityAdmin: i, descriptionLength: this.state.descriptionLength, HasSession: a, LinkUrl: "/" + t.WebUrl })) } }, { key: "GalleryList", value: function e(t, s, a, i) { var n = "/" + t.ApplicationRelativeUrl + "/gallery", l = function e(t) { return arguments.callee.re || (arguments.callee.re = [/[^a-z0-9]+/ig, /^-+|-+$/g]), t.toLowerCase().replace(arguments.callee.re[0], "-").replace(arguments.callee.re[1], "") }(t.RelativePageUrl); return React.createElement("div", { key: t.Type + "-" + t.ParentId, className: "mt-5 card" }, React.createElement(Gallery, { List: t, CurrentUserId: s, HasSession: a, IsCityAdmin: i, descriptionLength: this.state.descriptionLength, ImageWidth: this.state.ImageWidth, LinkUrl: n + "/" + l + "-" + t.ParentId })) } }, { key: "FeedsList", value: function e(t, s, a, i) { var n = ""; null != t.ImageUrl && (n = t.ImageUrl[0]); var l = "https://cdn.citymapia.com/assets/Business/" + t.ApplicationId + "/feeds/" + t.ParentId + "/" + n + "?rendered=true&width=" + this.state.ImageWidth; return React.createElement("div", { className: "mt-5 card", key: t.Type + "-" + t.ApplicationId + "-" + t.ParentId }, React.createElement(Feeds, { List: t, ImageUrl: l, CurrentUserId: s, HasSession: a, descriptionLength: this.state.descriptionLength, IsCityAdmin: i, LinkUrl: "/" + t.WebUrl })) } }, { key: "EventList", value: function e(t, s, a, i) { var n = ""; null != t.ImageUrl && (n = t.ImageUrl[0]); var l = "https://cdn.citymapia.com/assets/Business/" + t.ApplicationId + "/events/" + t.ParentId + "/" + n + "?rendered=true&width=" + this.state.ImageWidth, o = "/" + t.ApplicationRelativeUrl + "/event"; return React.createElement("div", { className: "mt-5 card", key: t.Type + "-" + t.ApplicationId + "-" + t.ParentId }, React.createElement(Event, { List: t, ImageUrl: l, CurrentUserId: s, HasSession: a, descriptionLength: this.state.descriptionLength, IsCityAdmin: i, LinkUrl: o + "/" + t.RelativePageUrl + "-" + t.ParentId })) } }, { key: "VideoList", value: function e(t, s, a, i) { var n = "/" + t.ApplicationRelativeUrl + "/videos"; return React.createElement("div", { className: "mt-5 card", key: t.Type + "-" + t.ApplicationId + "-" + t.ParentId }, React.createElement(Video, { List: t, CurrentUserId: s, HasSession: a, IsCityAdmin: i, descriptionLength: this.state.descriptionLength, LinkUrl: n + "/" + t.RelativePageUrl + "-" + t.ParentId })) } }, { key: "ScrollPager", value: function e() { !1 == this.state.isPageProcessing && this.loadMoreItems(), this.setState(function (e) { return { isPageProcessing: !0 } }) } }, { key: "loadMoreItems", value: function e() { var t = this; this.setState(function (e) { return { loadingState: !0 } }), setTimeout(function () { t.newMethod(t.state.page + 1, 12), t.setState({ items: t.state.items, loadingState: !1, CurrentPage: t.state.CurrentPage + 1 }) }, 1e3) } }, { key: "render", value: function e() { return React.createElement("div", null, this.state.items, 12 == this.state.total ? React.createElement("button", { id: "ItemList", className: "timeline-loadmore", onClick: this.loadMoreItems }, "Load More Items", !0 == this.state.loadingState ? React.createElement("i", { className: "load-more-icon fa fa-spinner fa-spin" }) : "") : "") } }]), t }(React.Component), FeedsCallToAction = function (e) { function t() { return _classCallCheck(this, t), _possibleConstructorReturn(this, Object.getPrototypeOf(t).apply(this, arguments)) } return _inherits(t, e), _createClass(t, [{ key: "render", value: function e() { var t = this.props.List; return React.createElement("div", { className: "w-full event-date-wrap", key: "F_AT-" + t.ParentId + "-" + t.CallToAction }, React.createElement("p", { className: "pl-4" }, t.ActionText), 1 == t.CallToAction ? React.createElement("a", { className: "btn-green", href: t.ActionLink, target: "_blank" }, "Apply Now") : "", 2 == t.CallToAction ? React.createElement("a", { className: "btn-green", href: t.ActionLink, target: "_blank" }, "Book Now") : "", 3 == t.CallToAction ? React.createElement("a", { className: "btn-green", href: t.ActionLink, target: "_blank" }, "Contact Us") : "", 5 == t.CallToAction ? React.createElement("a", { className: "btn-green", href: t.ActionLink, target: "_blank" }, "Download") : "", 6 == t.CallToAction ? React.createElement("a", { className: "btn-green", href: t.ActionLink, target: "_blank" }, "Learn More") : "", 7 == t.CallToAction ? React.createElement("a", { className: "btn-green", href: t.ActionLink, target: "_blank" }, "Listen Now") : "", 8 == t.CallToAction ? React.createElement("a", { className: "btn-green", href: t.ActionLink, target: "_blank" }, "Request A Quote") : "", 9 == t.CallToAction ? React.createElement("a", { className: "btn-green", href: t.ActionLink, target: "_blank" }, "SendMessage") : "", 10 == t.CallToAction ? React.createElement("a", { className: "btn-green", href: t.ActionLink, target: "_blank" }, "Shop Now") : "", 11 == t.CallToAction ? React.createElement("a", { className: "btn-green", href: t.ActionLink, target: "_blank" }, "Sign Up") : "", 12 == t.CallToAction ? React.createElement("a", { className: "btn-green", href: t.ActionLink, target: "_blank" }, "Watch More") : "", 13 == t.CallToAction ? React.createElement("a", { className: "btn-green", href: "tel:" + t.ActionLink }, "Call Us") : "") } }]), t }(React.Component), PortfolioCallToAction = function (e) { function t() { return _classCallCheck(this, t), _possibleConstructorReturn(this, Object.getPrototypeOf(t).apply(this, arguments)) } return _inherits(t, e), _createClass(t, [{ key: "render", value: function e() { var t = this.props.List, s = "http://www." + t.Domain, a = "", i = "_blank"; return (null == t.Domain || "" == t.Domain) && (s = "https://www.citymapia.com/" + t.ApplicationRelativeUrl, null == t.ActionLink && (i = "")), a = 1 == t.BusinessVersion ? s + "/portfolio/" + t.RelativePageUrl + "-" + t.ParentId : s + "/product/" + t.RelativePageUrl + "-" + t.ParentId, React.createElement("div", { className: "w-full event-date-wrap", key: "p_AT-" + t.ParentId + "-" + t.CallToAction }, React.createElement("p", { className: "pl-4" }, t.ActionText), 1 == t.CallToAction ? React.createElement("a", { className: "btn-green", href: null != t.ActionLink ? t.ActionLink : a, target: i }, "Apply Now") : "", 2 == t.CallToAction ? React.createElement("a", { className: "btn-green", href: null != t.ActionLink ? t.ActionLink : a, target: i }, "Book Now") : "", 3 == t.CallToAction ? React.createElement("a", { className: "btn-green", href: null != t.ActionLink ? t.ActionLink : s + "/contact", target: i }, "Contact Us") : "", 5 == t.CallToAction ? React.createElement("a", { className: "btn-green", href: null != t.ActionLink ? t.ActionLink : s, target: i }, "Download") : "", 6 == t.CallToAction ? React.createElement("a", { className: "btn-green", href: null != t.ActionLink ? t.ActionLink : a, target: i }, "Learn More") : "", 7 == t.CallToAction ? React.createElement("a", { className: "btn-green", href: null != t.ActionLink ? t.ActionLink : s, target: i }, "Listen Now") : "", 8 == t.CallToAction ? React.createElement("a", { className: "btn-green", href: null != t.ActionLink ? t.ActionLink : a, target: i }, "Request A Quote") : "", 9 == t.CallToAction ? React.createElement("a", { className: "btn-green", href: null != t.ActionLink ? t.ActionLink : a, target: i }, "SendMessage") : "", 10 == t.CallToAction ? React.createElement("a", { className: "btn-green", href: null != t.ActionLink ? t.ActionLink : a, target: i }, "Shop Now") : "", 11 == t.CallToAction ? React.createElement("a", { className: "btn-green", href: null != t.ActionLink ? t.ActionLink : s, target: i }, "Sign Up") : "", 12 == t.CallToAction ? React.createElement("a", { className: "btn-green", href: null != t.ActionLink ? t.ActionLink : a, target: i }, "Watch More") : "", 13 == t.CallToAction ? React.createElement("a", { className: "btn-green", href: "tel:" + t.ActionLink }, "Call Us") : "") } }]), t }(React.Component), CategoryTags = function (e) { function t(e) { _classCallCheck(this, t); var s = _possibleConstructorReturn(this, Object.getPrototypeOf(t).call(this, e)); return s.state = { UrlLocation: "" }, s } return _inherits(t, e), _createClass(t, [{ key: "componentDidMount", value: function e() { var t = window.location.href.split("/")[3], s = t.split("#").length > 1 ? t.split("#")[t.split("#").length - 2] : t.replace("#", ""); this.setState({ UrlLocation: s }) } }, { key: "render", value: function e() { var t = this; return React.createElement("div", { className: "pb-3 border-b border-secondary-9 links" }, null != this.props.List.ItemCategory && this.props.List.ItemCategory.length > 0 ? JSON.parse(this.props.List.ItemCategory).map(function (e, t) { return React.createElement("span", { className: "item_cat", key: "ItemCategory-" + e.PortfolioType + "-" + t }, null != e.PortfolioType ? "#" + e.PortfolioType.toLowerCase().replace(/ /g, "") : "") }) : "", null != this.props.List.Tags ? this.props.List.Tags.split(",").map(function (e, s) { return React.createElement("span", { className: "item_cat", key: "Tags-" + t.props.List.ItemTags + "-" + s }, e.startsWith("#") ? e : "#" + e) }) : "") } }]), t }(React.Component), CommentBox = function (e) { function t(e) { _classCallCheck(this, t); var s = _possibleConstructorReturn(this, Object.getPrototypeOf(t).call(this, e)); return s.state = { pageSize: 3, currentPage: 1, PagerItems: [], total: 0, HidePager: !1, HideSignView: !1, UrlLocation: "", HideCommentView: !1, followingStatus: !1, CommentsList: s.props.commentsListValues, likeListValues: s.props.likeListValues, followBusinessUser: [], followBusinessUserCount: 0, HideDeleteIcon: !1, DeleteModal: !1, value: "", showModal: !1 }, s.handleChange = s.handleChange.bind(s), s } return _inherits(t, e), _createClass(t, [{ key: "componentDidMount", value: function e() { var t = window.location.href.split("/")[3], s = this.state.CommentsList, a = this.state.pageSize * (this.state.currentPage - 1), i = a + this.state.pageSize, n = Math.ceil(null == s ? 0 : s.length / 3); null != this.props.List.FollowBusinessUser && (followBuzUserCount = (followBuzUser = JSON.parse(this.props.List.FollowBusinessUser)).length, this.setState({ followBusinessUserCount: followBuzUserCount, followBusinessUser: followBuzUser })), this.setState({ CommentsList: s, PagerItems: null == s ? 0 : s.sort(function (e, t) { return t.Id - e.Id }).slice(a, i), total: n, UrlLocation: t, likeListValues: this.props.likeListValues }) } }, { key: "handleChange", value: function e(t) { this.setState({ value: t.target.value }) } }, { key: "handleSubmit", value: function e(t, s) { var a, i, n, l, o = this; "" != this.state.value.trim() && (s.preventDefault(), l = (n = window.location.pathname) + "/Comments", (a = new FormData).append("ParentId", t.ParentId), a.append("EntityType", t.Type), a.append("Message", o.state.value), (i = new XMLHttpRequest).open("post", l, !0), i.onload = function () { var e = JSON.parse(i.responseText); if (!0 == e.Success) { var t = o.state.CommentsList; null == t && (t = []), t.unshift(e.Message), o.props.commentsValues(t), o.refs.notes.value = "", o.setState({ value: "", CommentsList: t, PagerItems: t.sort(function (e, t) { return t.Id - e.Id }).slice(0, 3) }) } else o.setState({ ErrorMessage: e.Message }) }, i.send(a)), s.preventDefault() } }, { key: "deleteComment", value: function e(t) { var s = this.state.CommentsList.sort(function (e, t) { return t.Id - e.Id }).filter(function (e, s) { return s !== t }); this.props.commentsValues(s), this.setState({ CommentsList: s, PagerItems: s.sort(function (e, t) { return t.Id - e.Id }).slice(0, 3) }) } }, { key: "SignView", value: function e() { this.setState({ HideCommentView: !this.state.HideCommentView }) } }, { key: "handleCommentPage", value: function e(t) { var s = this; this.setState(function (e) { return { HidePager: !0 } }), console.log("ss", this.state.CommentsList), setTimeout(function () { var e = s.state.CommentsList.sort(function (e, t) { return t.Id - e.Id }).slice((t - 1) * 3, (t - 1) * 3 + 3); s.setState({ PagerItems: s.state.PagerItems.concat(e), currentPage: t, HidePager: !1 }) }, 1e3) } }, { key: "LoginBusiness", value: function e(t) { var s = document.getElementById("loginModal"); document.body.style.overflow = "hidden", s.style.display = "flex", s.classList.add("modal-show"), $(document.getElementById("postpopup")).modal("hide"), $("#modalLoginContainer").html('<div className="loading">Loading ...</div>').load("/BusinessLogin?ApplicationId=" + t, function () { }).show() } }, { key: "DeleteHideModal", value: function e() { this.setState({ DeleteModal: !1 }) } }, { key: "DeleteShowModal", value: function e(t, s) { this.setState({ DeleteModal: !0, comment: t, index: s }) } }, { key: "likedUserValues", value: function e(t) { this.setState({ likeListValues: t }) } }, { key: "handleHideModal", value: function e() { this.setState({ showModal: !1 }) } }, { key: "handleShowModal", value: function e(t) { t.preventDefault(), this.setState({ showModal: !0 }) } }, { key: "render", value: function e() { var t = this; return React.createElement("div", { className: "interaction-area" }, React.createElement("div", { className: "flex justify-between py-3.5 like-share" }, React.createElement(Like, { LikesList: this.props.List, likedUserValues: function e(s) { return t.likedUserValues(s) }, likeListValues: this.state.likeListValues, CurrentUserId: this.props.CurrentUserId, HasSession: this.props.HasSession }), null != this.state.CommentsList && this.state.CommentsList.length > 0 ? React.createElement("span", { className: "comment-area" }, React.createElement("img", { src: "/Templates/ThemeCityVersion6/Content/img/comment-black.svg", alt: "comment icon", width: "17", height: "17", className: "mr-2" }), React.createElement("span", { className: "comment-count" }, " ", this.state.CommentsList.length, " ", React.createElement("span", { className: "m-hdn ml-1" }, "Comments"), " ")) : "", React.createElement(ShareButton, { ShareList: this.props.List, Text: this.props.List.Title, Description: this.props.List.Description, Url: "https://www.citymapia.com" + this.props.LinkUrl, ImageUrl: this.props.ImageUrl })), React.createElement("div", { className: "relative block w-full" }, !0 == this.props.HasSession ? React.createElement("form", { onSubmit: function e(s) { return t.handleSubmit(t.props.List, s) } }, React.createElement("textarea", { id: this.props.List.ParentId + "-comment", className: "w-full pr-8 border rounded-md resize", placeholder: "Comment", ref: "notes", value: this.state.value, onChange: this.handleChange }), React.createElement("button", { type: "submit", className: "absolute top-0 bottom-0 m-auto right-4", "aria-label": this.props.List.ParentId + "-nav" }, React.createElement("img", { src: "/Templates/ThemeCityVersion6/Content/img/btn.svg", alt: "send button", width: "16", height: "18" }))) : React.createElement("form", { onClick: function e() { return t.SignView() } }, React.createElement("textarea", { id: this.props.List.ParentId + "-comment", className: "w-full pr-8 border rounded-md resize", placeholder: "Comment" }), React.createElement("button", { type: "button", className: "absolute top-0 bottom-0 m-auto right-4", "aria-label": this.props.List.ParentId + "-nav" }, React.createElement("img", { src: "/Templates/ThemeCityVersion6/Content/img/btn.svg", alt: "send button", width: "16", height: "18" })), !1 == this.state.HideCommentView ? "" : React.createElement("span", { className: "sign-card unauth-cmt" }, React.createElement("span", null, "Want to share your thoughts?", React.createElement("br", null), React.createElement("small", null, "To comment this post you must Sign In first.")), React.createElement("hr", null), React.createElement("a", { "data-toggle": "modal", "data-modal-target": "loginModal", onClick: function e(s) { return t.LoginBusiness(t.props.List.ApplicationId) } }, "Sign In "))), null != this.state.CommentsList && this.state.CommentsList.length > 0 ? React.createElement("div", { id: "commentlist1-" + this.props.List.ParentId, className: "comment-lists  collapse show" }, this.state.PagerItems.map(function (e, s) { return t.props.List.ParentId, React.createElement("div", { className: "comment-bubble mb-2", key: s }, !0 == t.props.HasSession && (t.props.CurrentUserId == e.CreatedBy || !0 == t.props.IsCityAdmin) ? React.createElement("span", { className: "comment-del", onClick: function a() { return t.DeleteShowModal(e, s) } }, React.createElement("img", { src: "/Templates/ThemeProfilev1/Content/img/delete.png", width: "16", height: "16", alt: "delete icon" })) : "", React.createElement("h6", null, e.UserName), React.createElement("p", null, e.Message)) }), React.createElement("div", null, this.state.DeleteModal ? React.createElement(DeleteModal, { DeleteHideModal: function e(s) { return t.DeleteHideModal(t) }, deleteComment: function e(s) { return t.deleteComment(t.state.index) }, Comments: this.state.comment, ParentId: this.props.List.ParentId, index: this.state.index, IsModal: this.props.Follow }) : null), this.state.CommentsList.length > 3 && !1 == this.props.Follow && this.state.total > this.state.currentPage ? React.createElement("a", { className: "more-cmnt", onClick: function e(s) { return t.handleCommentPage(t.state.currentPage + 1) } }, "View more comments", !0 == this.state.HidePager ? React.createElement("i", { className: "load-more-icon fa fa-spinner fa-spin" }) : "") : "", this.state.CommentsList.length > 3 && !1 != this.props.Follow && this.state.total > this.state.currentPage ? React.createElement("a", { className: "more-cmnt", onClick: this.handleShowModal.bind(this) }, "View more comments") : "", this.state.showModal ? React.createElement(Modal, { handleHideModal: function e(s) { return t.handleHideModal() }, List: this.props.List, commentsListValues: this.props.commentsListValues, likeListValues: this.props.likeListValues, ImageUrl: this.props.ImageUrl, CurrentUserId: this.props.CurrentUserId, IsCityAdmin: this.props.IsCityAdmin, HasSession: this.props.HasSession }) : null) : "")) } }]), t }(React.Component), Like = function (e) { function t(e) { _classCallCheck(this, t); var s = _possibleConstructorReturn(this, Object.getPrototypeOf(t).call(this, e)); return s.state = { LikesCount: s.props.LikesList.LikesCount, ClassActive: !1, HasSession: s.props.HasSession, HideSession: !1, UrlLocation: "", LikeLoading: !1, LikeLoadingCount: 0, LikesList: s.props.likeListValues, LikesUsersList: [] }, s.handleLikeButton = s.handleLikeButton.bind(s), s.SignView = s.SignView.bind(s), s } return _inherits(t, e), _createClass(t, [{ key: "componentDidMount", value: function e() { var t = window.location.href.split("/")[3], s = t.split("#").length > 1 ? t.split("#")[t.split("#").length - 2] : t.replace("#", ""); this.setState({ UrlLocation: s, LikesUsersList: this.props.likeListValues }) } }, { key: "handleLikeButton", value: function e() { var t = this, s = window.location.pathname, a = this.props.LikesList; this.setState({ LikeLoading: !(null != this.state.LikesList && this.state.LikesList.length > 0 && this.state.LikesList.includes(this.props.CurrentUserId)), LikeLoadingCount: null != this.state.LikesList && this.state.LikesUsersList.length > 0 && this.state.LikesUsersList.includes(this.props.CurrentUserId) ? this.state.LikesCount - 1 : this.state.LikesCount + 1, ClassActive: !0 }); var i = new FormData; i.append("ParentId", a.ParentId), i.append("EntityType", a.Type), i.append("ApplicationId", a.ApplicationId); var n = new XMLHttpRequest; n.open("post", s + "/Likes", !0), n.onload = function () { var e = JSON.parse(n.responseText); if (!0 == e.Success) { if (!0 == e.Islike) { var s = t.state.LikesUsersList; null == s && (s = []), s.push(t.props.CurrentUserId), t.props.likedUserValues(s), t.setState({ LikesUsersList: s, ClassActive: !1 }) } else t.state.LikesUsersList.pop(t.props.CurrentUserId), t.setState({ LikesUsersList: t.state.LikesUsersList, ClassActive: !1 }) } else t.setState({ ErrorLikeMessage: e.Message }) }, n.send(i) } }, { key: "SignView", value: function e() { this.setState({ HideSession: !this.state.HideSession }) } }, { key: "LoginBusiness", value: function e(t) { var s = document.getElementById("loginModal"); document.body.style.overflow = "hidden", s.style.display = "flex", s.classList.add("modal-show"), $(document.getElementById("postpopup")).modal("hide"), $("#modalLoginContainer").html('<div className="loading">Loading ...</div>').load("/BusinessLogin?ApplicationId=" + t.ApplicationId, function () { }).show() } }, { key: "render", value: function e() { var t = this; return React.createElement("span", { className: "opinion" }, !0 == this.state.ClassActive ? React.createElement("button", { type: "button", className: !0 == this.state.LikeLoading ? "like-btn align-middle active" : "like-btn align-middle" }, React.createElement("span", { className: "like" }), this.state.LikeLoadingCount, " ", React.createElement("span", { className: "m-hdn ml-1" }, "Like")) : React.createElement("button", { type: "button", className: null != this.state.LikesUsersList && this.state.LikesUsersList.length > 0 && this.state.LikesUsersList.includes(this.props.CurrentUserId) ? "like-btn align-middle active" : "like-btn align-middle", onClick: !0 == this.state.HasSession ? this.handleLikeButton.bind(this.state.LikesList) : this.SignView.bind(this.state.LikesList) }, React.createElement("span", { className: "like" }), null != this.state.LikesUsersList ? this.state.LikesUsersList.length : 0, " ", React.createElement("span", { className: "m-hdn ml-1" }, "Like")), !1 == this.state.HideSession ? "" : React.createElement("span", { className: "sign-card" }, React.createElement("span", null, "Like this post?", React.createElement("br", null), React.createElement("small", null, "Sign in to make your oppinion count.")), React.createElement("hr", null), React.createElement("a", { "data-modal-target": "loginModal", onClick: function e(s) { return t.LoginBusiness(t.props.LikesList) } }, "Sign In "))) } }]), t }(React.Component), Gallery = function (e) { function t(e) { _classCallCheck(this, t); var s = _possibleConstructorReturn(this, Object.getPrototypeOf(t).call(this, e)); return s.state = { showModal: !1, commentsListValues: [], likeListValues: [] }, s.handleShowModal = s.handleShowModal.bind(s), s } return _inherits(t, e), _createClass(t, [{ key: "componentWillMount", value: function e() { var t = []; null != this.props.List.Likes && JSON.parse(this.props.List.Likes).map(function (e) { t.push(e.UserId) }), this.setState({ commentsListValues: JSON.parse(this.props.List.Comments), likeListValues: t }) } }, { key: "handleHideModal", value: function e() { this.setState({ showModal: !1 }) } }, { key: "handleShowModal", value: function e(t) { t.preventDefault(), this.setState({ showModal: !0 }) } }, { key: "commentsValues", value: function e(t) { this.setState({ commentsListValues: t }) } }, { key: "likesValues", value: function e(t) { this.setState({ likeListValues: t }) } }, { key: "getParsedDate", value: function e(t) { var s = new Date(parseInt(t.replace(/(^.*\()|([+-].*$)/g, ""))); return (s.getDate() + " " + ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"][s.getMonth()] + " " + s.getFullYear()).toString() } }, { key: "render", value: function e() { var t = this, s = this.props.List.Description, a = s.length, i = s.slice(0, this.props.descriptionLength); return React.createElement("div", null, React.createElement("a", { onClick: this.handleShowModal.bind(this), href: this.props.LinkUrl }, React.createElement("h2", { className: "card-title" }, this.props.List.Title)), React.createElement("small", { className: "font-semibold text-secondary-1" }, React.createElement("span", { className: "mr-2 font-normal text-secondary-8" }, "Posted on ", this.getParsedDate(this.props.List.CreatedDate))), null != this.props.List.ImageUrl && this.props.List.ImageUrl.length > 0 ? React.createElement("div", { className: "post-img-wrapper" }, this.props.List.ImageUrl.sort(function (e, t) { return t.Id - e.Id }).slice(0, 4).map(function (e, s) { var a = 250; 1 == t.props.List.ImageUrl.length ? a = t.props.ImageWidth : 3 == t.props.List.ImageUrl.length && 0 == s && (a = t.props.ImageWidth); var i = "https://cdn.citymapia.com/assets/Business/" + t.props.List.ApplicationId + "/galleryimage/" + t.props.List.ParentId + "/" + e + "?rendered=true&width=" + a; return React.createElement("div", { className: ["one-images", "two-images", "three-images", "four-images"][t.props.List.ImageUrl.length > 4 ? 3 : t.props.List.ImageUrl.length - 1] + " post-img-holder", key: s }, 1 == t.props.List.ImageUrl.length ? React.createElement("a", { onClick: t.handleShowModal.bind(t), href: t.props.LinkUrl }, React.createElement("img", { className: "w-full   mt-2 mb-3", alt: t.props.List.Title, src: i, width: "700", height: "700" })) : 3 == s && t.props.List.ImageUrl.length > 4 ? React.createElement("span", { className: "gal-img-more" }, React.createElement("a", { onClick: t.handleShowModal.bind(t) }, "+ ", t.props.List.ImageUrl.length - 4)) : "", t.props.List.ImageUrl.length > 1 ? React.createElement("a", { onClick: t.handleShowModal.bind(t), href: t.props.LinkUrl }, React.createElement("img", { className: "w-full", alt: t.props.List.Title, src: i, width: "700", height: "700" })) : "") })) : "", this.state.showModal ? React.createElement(Modal, { handleHideModal: function e(s) { return t.handleHideModal() }, List: this.props.List, commentsListValues: this.state.commentsListValues, likeListValues: this.state.likeListValues, ImageUrl: this.props.List.ImageUrl, CurrentUserId: this.props.CurrentUserId, HasSession: this.props.HasSession, IsCityAdmin: this.props.IsCityAdmin }) : null, " " != this.props.List.Description ? React.createElement("p", { className: "mb-3 text-lg font-normal leading-7" }, i, a > this.props.descriptionLength ? React.createElement("a", { onClick: this.handleShowModal.bind(this), className: "desc-elips" }, "...show more") : "") : "", React.createElement(CategoryTags, { List: this.props.List }), React.createElement(CommentBox, { List: this.props.List, commentsValues: function e(s) { return t.commentsValues(s) }, likesValues: function e(s) { return t.likesValues(s) }, commentsListValues: this.state.commentsListValues, likeListValues: this.state.likeListValues, CurrentUserId: this.props.CurrentUserId, HasSession: this.props.HasSession, IsCityAdmin: this.props.IsCityAdmin, LinkUrl: this.props.LinkUrl })) } }]), t }(React.Component), Portfolio = function (e) { function t(e) { _classCallCheck(this, t); var s = _possibleConstructorReturn(this, Object.getPrototypeOf(t).call(this, e)); return s.state = { showModal: !1, commentsListValues: [], likeListValues: [] }, s.handleShowModal = s.handleShowModal.bind(s), s } return _inherits(t, e), _createClass(t, [{ key: "componentWillMount", value: function e() { var t = []; null != this.props.List.Likes && JSON.parse(this.props.List.Likes).map(function (e) { t.push(e.UserId) }), this.setState({ commentsListValues: JSON.parse(this.props.List.Comments), likeListValues: t }) } }, { key: "handleHideModal", value: function e() { this.setState({ showModal: !1 }) } }, { key: "handleShowModal", value: function e(t) { t.preventDefault(), this.setState({ showModal: !0 }) } }, { key: "commentsValues", value: function e(t) { this.setState({ commentsListValues: t }) } }, { key: "likesValues", value: function e(t) { this.setState({ likeListValues: t }) } }, { key: "getParsedDate", value: function e(t) { var s = new Date(parseInt(t.replace(/(^.*\()|([+-].*$)/g, ""))); return (s.getDate() + " " + ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"][s.getMonth()] + " " + s.getFullYear()).toString() } }, { key: "render", value: function e() { var t = this, s = this.props.List.Description, a = s.length, i = s.slice(0, this.props.descriptionLength); return React.createElement("div", null, React.createElement("a", { onClick: this.handleShowModal.bind(this), href: this.props.LinkUrl }, React.createElement("h2", { className: "card-title" }, this.props.List.Title)), React.createElement("small", { className: "font-semibold text-secondary-1" }, React.createElement("span", { className: "mr-2 font-normal text-secondary-8" }, "Posted on ", this.getParsedDate(this.props.List.CreatedDate))), null != this.props.List.ImageUrl && this.props.List.ImageUrl.length > 0 ? React.createElement("div", { className: "post-img-holder" }, React.createElement("a", { onClick: this.handleShowModal.bind(this), href: this.props.LinkUrl }, React.createElement("img", { className: "w-full mt-2 mb-3", alt: this.props.List.Title, src: this.props.ImageUrl, width: "700", height: "700" }))) : "", this.state.showModal ? React.createElement(Modal, { handleHideModal: function e(s) { return t.handleHideModal() }, List: this.props.List, commentsListValues: this.state.commentsListValues, likeListValues: this.state.likeListValues, ImageUrl: this.props.ImageUrl, CurrentUserId: this.props.CurrentUserId, HasSession: this.props.HasSession, IsCityAdmin: this.props.IsCityAdmin }) : null, React.createElement("p", { className: "mb-3 text-lg font-normal leading-7" }, "  ", i, a > this.props.descriptionLength ? React.createElement("a", { onClick: this.handleShowModal.bind(this), className: "desc-elips" }, "...show more") : ""), React.createElement(CategoryTags, { List: this.props.List }), !0 == this.props.List.EnabledActionType && null != this.props.List.CallToAction ? React.createElement(PortfolioCallToAction, { List: this.props.List }) : "", React.createElement(CommentBox, { List: this.props.List, commentsValues: function e(s) { return t.commentsValues(s) }, likesValues: function e(s) { return t.likesValues(s) }, commentsListValues: this.state.commentsListValues, likeListValues: this.state.likeListValues, CurrentUserId: this.props.CurrentUserId, HasSession: this.props.HasSession, IsCityAdmin: this.props.IsCityAdmin, LinkUrl: this.props.LinkUrl })) } }]), t }(React.Component), Feeds = function (e) { function t(e) { _classCallCheck(this, t); var s = _possibleConstructorReturn(this, Object.getPrototypeOf(t).call(this, e)); return s.state = { showModal: !1, commentsListValues: [], likeListValues: [] }, s.handleShowModal = s.handleShowModal.bind(s), s } return _inherits(t, e), _createClass(t, [{ key: "componentWillMount", value: function e() { var t = []; null != this.props.List.Likes && JSON.parse(this.props.List.Likes).map(function (e) { t.push(e.UserId) }), this.setState({ commentsListValues: JSON.parse(this.props.List.Comments), likeListValues: t }) } }, { key: "handleHideModal", value: function e() { this.setState({ showModal: !1 }) } }, { key: "handleShowModal", value: function e(t) { t.preventDefault(), this.setState({ showModal: !0 }) } }, { key: "commentsValues", value: function e(t) { this.setState({ commentsListValues: t }) } }, { key: "likesValues", value: function e(t) { this.setState({ likeListValues: t }) } }, { key: "getParsedDate", value: function e(t) { var s = new Date(parseInt(t.replace(/(^.*\()|([+-].*$)/g, ""))); return (s.getDate() + " " + ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"][s.getMonth()] + " " + s.getFullYear()).toString() } }, { key: "render", value: function e() { var t = this, s = this.props.List.Description, a = s.length, i = s.slice(0, this.props.descriptionLength); return React.createElement("div", null, React.createElement("a", { onClick: this.handleShowModal.bind(this), href: this.props.LinkUrl }, React.createElement("h2", { className: "card-title" }, this.props.List.Title)), React.createElement("small", { className: "font-semibold text-secondary-1" }, React.createElement("span", { className: "mr-2 font-normal text-secondary-8" }, "Posted on ", this.getParsedDate(this.props.List.CreatedDate))), null != this.props.List.ImageUrl && this.props.List.ImageUrl.length > 0 ? React.createElement("div", { className: "post-img-holder" }, React.createElement("a", { onClick: this.handleShowModal.bind(this), href: this.props.LinkUrl }, React.createElement("img", { className: "w-full mt-2 mb-3", alt: this.props.List.Title, src: this.props.ImageUrl, width: "700", height: "700" }))) : "", this.state.showModal ? React.createElement(Modal, { handleHideModal: function e(s) { return t.handleHideModal() }, List: this.props.List, commentsListValues: this.state.commentsListValues, likeListValues: this.state.likeListValues, ImageUrl: this.props.ImageUrl, CurrentUserId: this.props.CurrentUserId, HasSession: this.props.HasSession, IsCityAdmin: this.props.IsCityAdmin }) : null, React.createElement("p", { className: "mb-3 text-lg font-normal leading-7" }, " ", i, a > this.props.descriptionLength ? React.createElement("a", { onClick: this.handleShowModal.bind(this), className: "desc-elips" }, "...show more") : ""), null != this.props.List.ActionText && null != this.props.List.CallToAction ? React.createElement(FeedsCallToAction, { List: this.props.List }) : "", React.createElement(CategoryTags, { List: this.props.List }), React.createElement(CommentBox, { List: this.props.List, commentsValues: function e(s) { return t.commentsValues(s) }, likesValues: function e(s) { return t.likesValues(s) }, commentsListValues: this.state.commentsListValues, likeListValues: this.state.likeListValues, CurrentUserId: this.props.CurrentUserId, HasSession: this.props.HasSession, IsCityAdmin: this.props.IsCityAdmin, LinkUrl: this.props.LinkUrl })) } }]), t }(React.Component), Event = function (e) { function t(e) { _classCallCheck(this, t); var s = _possibleConstructorReturn(this, Object.getPrototypeOf(t).call(this, e)); return s.state = { showModal: !1, commentsListValues: [], likeListValues: [] }, s.handleShowModal = s.handleShowModal.bind(s), s } return _inherits(t, e), _createClass(t, [{ key: "componentWillMount", value: function e() { var t = []; null != this.props.List.Likes && JSON.parse(this.props.List.Likes).map(function (e) { t.push(e.UserId) }), this.setState({ commentsListValues: JSON.parse(this.props.List.Comments), likeListValues: t }) } }, { key: "handleHideModal", value: function e() { this.setState({ showModal: !1 }) } }, { key: "handleShowModal", value: function e(t) { t.preventDefault(), this.setState({ showModal: !0 }) } }, { key: "commentsValues", value: function e(t) { this.setState({ commentsListValues: t }) } }, { key: "likesValues", value: function e(t) { this.setState({ likeListValues: t }) } }, { key: "getParsedDate", value: function e(t) { var s = new Date(parseInt(t.replace(/(^.*\()|([+-].*$)/g, ""))); return (s.getDate() + " " + ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"][s.getMonth()] + " " + s.getFullYear()).toString() } }, { key: "render", value: function e() { var t = this, s = this.props.List.StartDate, a = new Date(parseInt(s.replace(/(^.*\()|([+-].*$)/g, ""))), i = this.props.List.Description, n = i.length, l = i.slice(0, this.props.descriptionLength); return React.createElement("div", null, React.createElement("a", { onClick: this.handleShowModal.bind(this), href: this.props.LinkUrl }, React.createElement("h2", { className: "card-title" }, this.props.List.Title)), React.createElement("small", { className: "font-semibold text-secondary-1" }, React.createElement("span", { className: "mr-2 font-normal text-secondary-8" }, "Posted on ", this.getParsedDate(this.props.List.CreatedDate))), null != this.props.List.ImageUrl && this.props.List.ImageUrl.length > 0 ? React.createElement("div", { className: "post-img-holder" }, React.createElement("a", { onClick: this.handleShowModal.bind(this), href: this.props.LinkUrl }, React.createElement("img", { className: "w-full mt-2 mb-3", width: "700", height: "700", alt: this.props.List.Title, src: this.props.ImageUrl }))) : "", this.state.showModal ? React.createElement(Modal, { handleHideModal: function e(s) { return t.handleHideModal() }, List: this.props.List, commentsListValues: this.state.commentsListValues, likeListValues: this.state.likeListValues, ImageUrl: this.props.ImageUrl, CurrentUserId: this.props.CurrentUserId, HasSession: this.props.HasSession, IsCityAdmin: this.props.IsCityAdmin }) : null, React.createElement("div", { className: "w-full event-date-wrap" }, React.createElement("span", null, " ", a.getDate(), "  ", ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"][a.getMonth()]), React.createElement("p", null, this.getParsedDate(this.props.List.StartDate), " - ", this.getParsedDate(this.props.List.EndDtm))), React.createElement("p", { className: "mb-3 text-lg font-normal leading-7" }, l, n > this.props.descriptionLength ? React.createElement("a", { onClick: this.handleShowModal.bind(this), className: "desc-elips" }, "...show more") : ""), React.createElement(CategoryTags, { List: this.props.List }), React.createElement(CommentBox, { List: this.props.List, commentsValues: function e(s) { return t.commentsValues(s) }, likesValues: function e(s) { return t.likesValues(s) }, commentsListValues: this.state.commentsListValues, likeListValues: this.state.likeListValues, CurrentUserId: this.props.CurrentUserId, HasSession: this.props.HasSession, IsCityAdmin: this.props.IsCityAdmin, LinkUrl: this.props.LinkUrl })) } }]), t }(React.Component), Video = function (e) { function t(e) { _classCallCheck(this, t); var s = _possibleConstructorReturn(this, Object.getPrototypeOf(t).call(this, e)); return s.state = { showModal: !1, commentsListValues: [], likeListValues: [] }, s.handleShowModal = s.handleShowModal.bind(s), s } return _inherits(t, e), _createClass(t, [{ key: "componentWillMount", value: function e() { var t = []; null != this.props.List.Likes && JSON.parse(this.props.List.Likes).map(function (e) { t.push(e.UserId) }), this.setState({ commentsListValues: JSON.parse(this.props.List.Comments), likeListValues: t }) } }, { key: "handleHideModal", value: function e() { this.setState({ showModal: !1 }) } }, { key: "handleShowModal", value: function e(t) { t.preventDefault(), this.setState({ showModal: !0 }) } }, { key: "commentsValues", value: function e(t) { this.setState({ commentsListValues: t }) } }, { key: "likesValues", value: function e(t) { this.setState({ likeListValues: t }) } }, { key: "getParsedDate", value: function e(t) { var s = new Date(parseInt(t.replace(/(^.*\()|([+-].*$)/g, ""))); return (s.getDate() + " " + ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"][s.getMonth()] + " " + s.getFullYear()).toString() } }, { key: "render", value: function e() { var t = this, s = this.props.List.Description, a = s.length, i = s.slice(0, this.props.descriptionLength); return React.createElement("div", null, React.createElement("a", { onClick: this.handleShowModal.bind(this), href: this.props.LinkUrl }, React.createElement("h2", { className: "card-title" }, " ", this.props.List.Title, " ")), React.createElement("small", { className: "font-semibold text-secondary-1" }, React.createElement("span", { className: "mr-2 font-normal text-secondary-8" }, "Posted on ", this.getParsedDate(this.props.List.CreatedDate))), null != this.props.List.VideoId ? React.createElement("div", { className: "post-video-holder" }, React.createElement("a", { onClick: this.handleShowModal.bind(this), href: this.props.LinkUrl }, 1 == this.props.List.SourceContact ? React.createElement("iframe", { src: "https://www.youtube.com/embed/" + this.props.List.VideoId, frameBorder: "0", allowFullScreen: !0 }) : React.createElement("iframe", { src: this.props.List.VideoId, frameBorder: "0", allowFullScreen: !0 }))) : "", this.state.showModal ? React.createElement(Modal, { handleHideModal: function e(s) { return t.handleHideModal() }, List: this.props.List, ImageUrl: this.props.ImageUrl, commentsListValues: this.state.commentsListValues, likeListValues: this.state.likeListValues, CurrentUserId: this.props.CurrentUserId, HasSession: this.props.HasSession, IsCityAdmin: this.props.IsCityAdmin }) : null, React.createElement("p", { className: "mb-3 text-lg font-normal leading-7" }, i, a > this.props.descriptionLength ? React.createElement("a", { onClick: this.handleShowModal.bind(this), className: "desc-elips" }, "...show more") : ""), React.createElement(CategoryTags, { List: this.props.List }), React.createElement(CommentBox, { List: this.props.List, commentsValues: function e(s) { return t.commentsValues(s) }, likesValues: function e(s) { return t.likesValues(s) }, commentsListValues: this.state.commentsListValues, likeListValues: this.state.likeListValues, CurrentUserId: this.props.CurrentUserId, HasSession: this.props.HasSession, IsCityAdmin: this.props.IsCityAdmin, LinkUrl: this.props.LinkUrl })) } }]), t }(React.Component), ShareButton = function (e) { function t(e) { _classCallCheck(this, t); var s = _possibleConstructorReturn(this, Object.getPrototypeOf(t).call(this, e)); return s.state = { popup: !1, copied: !1 }, s } return _inherits(t, e), _createClass(t, [{ key: "componentDidMount", value: function e() { $(".drop-open").attr("style", "display:none") } }, { key: "sharethis", value: function e(t, s, a, i) { screen.width, screen.height, window.open("https://www.facebook.com/sharer/sharer.php?u=" + encodeURIComponent(a), "facebook-share-dialog", "width=626,height=436") } }, { key: "handleToggle", value: function e() { console.log(this.state.popup), !1 == this.state.popup ? ($(".drop-open").attr("style", "display:block"), this.setState({ popup: !0 })) : ($(".drop-open").attr("style", "display:none"), this.setState({ popup: !1 })) } }, { key: "copyToclipBoard", value: function e(t) { var s = this, a = document.createElement("input"); console.log(t), a.value = t, document.body.appendChild(a), a.select(), document.execCommand("copy"), document.body.removeChild(a), this.setState({ copied: !0 }), setTimeout(function () { s.setState({ copied: !1 }) }, 2e3) } }, { key: "render", value: function e() { var t = this; return React.createElement("div", { className: "flex justify-center" }, React.createElement("div", { className: "dropdown relative share-dropdown" }, React.createElement("button", { className: "dropdown-toggle duration-150 flex items-center whitespace-nowrap", type: "button", id: "dropdownMenuButton1", "data-bs-toggle": "dropdown" }, React.createElement("img", { src: "/Templates/ThemeProfileV1/Content/img/share-black.svg", className: "mr-2", alt: "share icon", width: "18", height: "18" }), React.createElement("span", { className: "m-hdn ml-1" }, " Share")), React.createElement("ul", { className: "dropdown-menu", "aria-labelledby": "dropdownMenuButton1" }, React.createElement("li", null, React.createElement("a", { href: "javascript:void(0)", rel: "noopener", className: "dropdown-item", onClick: function e() { return t.sharethis(t.props.Text, t.props.Description, t.props.Url, t.props.ImageUrl) } }, "Facebook")), React.createElement("li", null, React.createElement("a", { rel: "noopener", className: "dropdown-item", target: "_blank", href: "https://api.whatsapp.com/send?text=" + encodeURIComponent(this.props.Text) + "-" + this.props.Url }, "WhatsApp")), React.createElement("li", null, React.createElement("a", { href: "javascript:void(0)", rel: "noopener", className: "dropdown-item", onClick: function e() { return t.copyToclipBoard(t.props.Url) } }, !1 == this.state.copied ? " Copy Link" : "Copyed"))))) } }]), t }(React.Component); ReactDOM.render(React.createElement(FeedsList, null), document.getElementById("Feedslist"));