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,aAAI,EAAaC,QAAjB,qCAAqDX,EAArD,uBAAuEQ,EAAvE,yBAA2F5G,EAA3F,wBAAuHqG,EAAvH,qBAA+IC,EAA/I,2BAA0KC,IAC7KS,MAAK,SAAAC,GAAG,OAAIA,EAAIC,UAChBF,MAAK,SAAAG,GAAI,OAAIX,EAASW,W","sources":["webpack://advanced-post-block/webpack/bootstrap","webpack://advanced-post-block/webpack/runtime/compat get default export","webpack://advanced-post-block/webpack/runtime/define property getters","webpack://advanced-post-block/webpack/runtime/hasOwnProperty shorthand","webpack://advanced-post-block/external var \"React\"","webpack://advanced-post-block/external var \"ReactDOM\"","webpack://advanced-post-block/../block-directory/node_modules/react-responsive-masonry/es/Masonry/index.js","webpack://advanced-post-block/../block-directory/node_modules/react-responsive-masonry/es/ResponsiveMasonry/index.js","webpack://advanced-post-block/../block-directory/node_modules/react-responsive-masonry/es/index.js","webpack://advanced-post-block/./src/Single/FeatureImage.js","webpack://advanced-post-block/./src/Single/PostMetaAuthor.js","webpack://advanced-post-block/./src/Single/PostMetaDate.js","webpack://advanced-post-block/./src/utils/functions.js","webpack://advanced-post-block/./src/Single/PostMetaCategory.js","webpack://advanced-post-block/./src/Single/PostMetaReadTime.js","webpack://advanced-post-block/./src/Single/PostMetaComment.js","webpack://advanced-post-block/./src/Single/Meta.js","webpack://advanced-post-block/./src/Single/Title.js","webpack://advanced-post-block/./src/Single/TitleMeta.js","webpack://advanced-post-block/./src/Single/PostExcerpt.js","webpack://advanced-post-block/./src/Single/PostReadMore.js","webpack://advanced-post-block/./src/Layout/Default.js","webpack://advanced-post-block/./src/Layout/SideImage.js","webpack://advanced-post-block/./src/Layout/Overlay.js","webpack://advanced-post-block/./src/Layout/SubLayout.js","webpack://advanced-post-block/./src/Layout/Masonry.js","webpack://advanced-post-block/./src/Components/Frontend/DisplayPosts.js","webpack://advanced-post-block/./src/Pagination/usePagination.js","webpack://advanced-post-block/./src/Pagination/index.js","webpack://advanced-post-block/./src/script.js","webpack://advanced-post-block/./src/utils/configs.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","var __WEBPACK_NAMESPACE_OBJECT__ = React;","var __WEBPACK_NAMESPACE_OBJECT__ = ReactDOM;","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport PropTypes from \"prop-types\";\nimport React from \"react\";\n\nvar Masonry = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Masonry, _React$Component);\n\n function Masonry() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = Masonry.prototype;\n\n _proto.getColumns = function getColumns() {\n var _this$props = this.props,\n children = _this$props.children,\n columnsCount = _this$props.columnsCount;\n var columns = Array.from({\n length: columnsCount\n }, function () {\n return [];\n });\n React.Children.forEach(children, function (child, index) {\n if (child && React.isValidElement(child)) {\n columns[index % columnsCount].push(child);\n }\n });\n return columns;\n };\n\n _proto.renderColumns = function renderColumns() {\n var gutter = this.props.gutter;\n return this.getColumns().map(function (column, i) {\n return /*#__PURE__*/React.createElement(\"div\", {\n key: i,\n style: {\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"flex-start\",\n alignContent: \"stretch\",\n flex: 1,\n width: 0,\n gap: gutter\n }\n }, column.map(function (item) {\n return item;\n }));\n });\n };\n\n _proto.render = function render() {\n var _this$props2 = this.props,\n gutter = _this$props2.gutter,\n className = _this$props2.className,\n style = _this$props2.style;\n return /*#__PURE__*/React.createElement(\"div\", {\n style: _extends({\n display: \"flex\",\n flexDirection: \"row\",\n justifyContent: \"center\",\n alignContent: \"stretch\",\n boxSizing: \"border-box\",\n width: \"100%\",\n gap: gutter\n }, style),\n className: className\n }, this.renderColumns());\n };\n\n return Masonry;\n}(React.Component);\n\nMasonry.propTypes = process.env.NODE_ENV !== \"production\" ? {\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired,\n columnsCount: PropTypes.number,\n gutter: PropTypes.string,\n className: PropTypes.string,\n style: PropTypes.object\n} : {};\nMasonry.defaultProps = {\n columnsCount: 3,\n gutter: \"0\",\n className: null,\n style: {}\n};\nexport default Masonry;","import PropTypes from \"prop-types\";\nimport React, { useCallback, useLayoutEffect, useEffect, useMemo, useState } from \"react\";\nvar DEFAULT_COLUMNS_COUNT = 1;\nvar useIsomorphicLayoutEffect = typeof window !== \"undefined\" ? useLayoutEffect : useEffect;\n\nvar useHasMounted = function useHasMounted() {\n var _useState = useState(false),\n hasMounted = _useState[0],\n setHasMounted = _useState[1];\n\n useIsomorphicLayoutEffect(function () {\n setHasMounted(true);\n }, []);\n return hasMounted;\n};\n\nvar useWindowWidth = function useWindowWidth() {\n var hasMounted = useHasMounted();\n\n var _useState2 = useState(0),\n width = _useState2[0],\n setWidth = _useState2[1];\n\n var handleResize = useCallback(function () {\n if (!hasMounted) return;\n setWidth(window.innerWidth);\n }, [hasMounted]);\n useIsomorphicLayoutEffect(function () {\n if (hasMounted) {\n window.addEventListener(\"resize\", handleResize);\n handleResize();\n return function () {\n return window.removeEventListener(\"resize\", handleResize);\n };\n }\n }, [hasMounted, handleResize]);\n return width;\n};\n\nvar MasonryResponsive = function MasonryResponsive(_ref) {\n var _ref$columnsCountBrea = _ref.columnsCountBreakPoints,\n columnsCountBreakPoints = _ref$columnsCountBrea === void 0 ? {\n 350: 1,\n 750: 2,\n 900: 3\n } : _ref$columnsCountBrea,\n children = _ref.children,\n _ref$className = _ref.className,\n className = _ref$className === void 0 ? null : _ref$className,\n _ref$style = _ref.style,\n style = _ref$style === void 0 ? null : _ref$style;\n var windowWidth = useWindowWidth();\n var columnsCount = useMemo(function () {\n var breakPoints = Object.keys(columnsCountBreakPoints).sort(function (a, b) {\n return a - b;\n });\n var count = breakPoints.length > 0 ? columnsCountBreakPoints[breakPoints[0]] : DEFAULT_COLUMNS_COUNT;\n breakPoints.forEach(function (breakPoint) {\n if (breakPoint < windowWidth) {\n count = columnsCountBreakPoints[breakPoint];\n }\n });\n return count;\n }, [windowWidth, columnsCountBreakPoints]);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: className,\n style: style\n }, React.Children.map(children, function (child, index) {\n return React.cloneElement(child, {\n key: index,\n columnsCount: columnsCount\n });\n }));\n};\n\nMasonryResponsive.propTypes = process.env.NODE_ENV !== \"production\" ? {\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired,\n columnsCountBreakPoints: PropTypes.object,\n className: PropTypes.string,\n style: PropTypes.object\n} : {};\nexport default MasonryResponsive;","import Masonry from \"./Masonry\";\nimport ResponsiveMasonry from \"./ResponsiveMasonry\";\nexport default Masonry;\nexport { ResponsiveMasonry };","const FeatureImage = ({ post, attributes }) => {\r\n\tconst { link, thumbnail: { url: thumbUrl, alt: thumbAlt }, categories } = post;\r\n\tconst { isFImg, isFImgLink, isMeta, isMetaCategory, metaCategoryIn, isLinkNewTab } = attributes;\r\n\r\n\treturn (isFImg && thumbUrl) ?
\r\n\t\t{isFImgLink ? \r\n\t\t\t{thumbAlt}\r\n\t\t : {thumbAlt}}\r\n\r\n\t\t{(isMeta && isMetaCategory && 'image' === metaCategoryIn && categories.space) &&
}\r\n\t
: null;\r\n};\r\nexport default FeatureImage;","const PostMetaAuthor = ({ post, attributes }) => {\r\n\tconst { author } = post;\r\n\tconst { name, link } = author || {};\r\n\tconst { isMetaAuthor, isMetaAuthorLink = true, metaAuthorIcon } = attributes;\r\n\r\n\treturn (isMetaAuthor && name) ? \r\n\t\t{metaAuthorIcon ?\r\n\t\t\tAuthor :\r\n\t\t\t}\r\n\r\n\t\t{!isMetaAuthorLink ?\r\n\t\t\t{name} :\r\n\t\t\t{name}}\r\n\t : null;\r\n};\r\nexport default PostMetaAuthor;","const PostMetaDate = ({ post, attributes }) => {\r\n\tconst { date } = post;\r\n\tconst { isMetaDate, metaDateIcon } = attributes;\r\n\r\n\treturn (isMetaDate && date) ? \r\n\t\t{metaDateIcon ?\r\n\t\t\tDate :\r\n\t\t\t}\r\n\r\n\t\t{date}\r\n\t : null;\r\n};\r\nexport default PostMetaDate;","export const truncate = (str, nu_words) => str && str.split(' ').splice(0, nu_words).join(' ');\r\n\r\nexport const strToIntArr = str => str?.trim().split(',').map(id => id ? parseInt(id) : id);\r\nexport const filterNaN = array => array?.filter(id => id && !isNaN(id));\r\n\r\nexport const strLength = (str) => str ? str.split(' ').length : 0;\r\n\r\nexport const wordCount = content => content ? (content?.replace(/(<([^>]+)>)/gi, '').split(/\\s+/) || []).length : 0;\r\n\r\nexport const renderHTML = raw => ;\r\n\r\nexport const filterObject = (obj, callback) => Object.fromEntries(Object.entries(obj).filter(([key, val]) => callback(key, val)));\r\n\r\nexport const omit = ({ [key]: _, ...obj }, key) => obj;\r\n\r\nexport const filterSelected = (taxonomy, selected) => taxonomy?.map(tax => tax.id)?.filter(tax => selected.indexOf(tax) !== -1);\r\n\r\nexport const dateFormat = (format, date) => {\r\n\tconst suffix = {\r\n\t\t'01': 'st',\r\n\t\t'02': 'nd',\r\n\t\t'03': 'rd'\r\n\t};\r\n\r\n\tif (!date || date === '') {\r\n\t\tdate = new Date();\r\n\t}\r\n\telse if (typeof (date) !== 'object') {\r\n\t\tdate = new Date(date.replace(/-/g, '/')); // attempt to convert string to date object\t\r\n\t}\r\n\r\n\tvar string = '',\r\n\t\tmo = date.getMonth(),\t// month (0-11)\r\n\t\tm1 = mo + 1,\t\t\t// month (1-12)\r\n\t\tdow = date.getDay(),\t// day of week (0-6)\r\n\t\td = date.getDate(),\t\t// day of the month (1-31)\r\n\t\ty = date.getFullYear(), // 1999 or 2003\r\n\t\th = date.getHours(),\t// hour (0-23)\r\n\t\tmi = date.getMinutes(), // minute (0-59)\r\n\t\ts = date.getSeconds(); // seconds (0-59)\r\n\r\n\tfor (var i = 0, len = format.length; i < len; i++) {\r\n\t\tswitch (format[i]) {\r\n\t\t\tcase 'j': // Day of the month without leading zeros (1 to 31)\r\n\t\t\t\tstring += d;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'd': // Day of the month, 2 digits with leading zeros (01 to 31)\r\n\t\t\t\tstring += (d < 10) ? '0' + d : d;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'S': // Day of the month, 2 digits with leading zeros (01 to 31)\r\n\t\t\t\tstring += suffix[d] || 'th';\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'l': // (lowercase 'L') A full textual representation of the day of the week\r\n\t\t\t\tvar days = Array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');\r\n\t\t\t\tstring += days[dow];\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'w': // Numeric representation of the day of the week (0=Sunday,1=Monday,...6=Saturday)\r\n\t\t\t\tstring += dow;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'D': // A textual representation of a day, three letters\r\n\t\t\t\tdays = Array('Sun', 'Mon', 'Tue', 'Wed', 'Thr', 'Fri', 'Sat');\r\n\t\t\t\tstring += days[dow];\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'm': // Numeric representation of a month, with leading zeros (01 to 12)\r\n\t\t\t\tstring += (m1 < 10) ? '0' + m1 : m1;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'n': // Numeric representation of a month, without leading zeros (1 to 12)\r\n\t\t\t\tstring += m1;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'F': // A full textual representation of a month, such as January or March \r\n\t\t\t\tvar months = Array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');\r\n\t\t\t\tstring += months[mo];\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'M': // A short textual representation of a month, three letters (Jan - Dec)\r\n\t\t\t\tmonths = Array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');\r\n\t\t\t\tstring += months[mo];\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'Y': // A full numeric representation of a year, 4 digits (1999 OR 2003)\t\r\n\t\t\t\tstring += y;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'y': // A two digit representation of a year (99 OR 03)\r\n\t\t\t\tstring += y.toString().slice(-2);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'H': // 24-hour format of an hour with leading zeros (00 to 23)\r\n\t\t\t\tstring += (h < 10) ? '0' + h : h;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'g': // 12-hour format of an hour without leading zeros (1 to 12)\r\n\t\t\t\tvar hour = (h === 0) ? 12 : h;\r\n\t\t\t\tstring += (hour > 12) ? hour - 12 : hour;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'h': // 12-hour format of an hour with leading zeros (01 to 12)\r\n\t\t\t\thour = (h === 0) ? 12 : h;\r\n\t\t\t\thour = (hour > 12) ? hour - 12 : hour;\r\n\t\t\t\tstring += (hour < 10) ? '0' + hour : hour;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'a': // Lowercase Ante meridiem and Post meridiem (am or pm)\r\n\t\t\t\tstring += (h < 12) ? 'am' : 'pm';\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'i': // Minutes with leading zeros (00 to 59)\r\n\t\t\t\tstring += (mi < 10) ? '0' + mi : mi;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 's': // Seconds, with leading zeros (00 to 59)\r\n\t\t\t\tstring += (s < 10) ? '0' + s : s;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'c': // ISO 8601 date (eg: 2012-11-20T18:05:54.944Z)\r\n\t\t\t\tstring += date.toISOString();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\tstring += format[i];\r\n\t\t}\r\n\t}\r\n\r\n\treturn string;\r\n}\r\n\r\nexport const classNames = (...args) => {\r\n\tconst classes = args.reduce((acc, arg) => {\r\n\t\tif (typeof arg === 'string') {\r\n\t\t\tacc.push(arg);\r\n\t\t} else if (typeof arg === 'object') {\r\n\t\t\tObject.entries(arg).forEach(([key, value]) => {\r\n\t\t\t\tif (value) {\r\n\t\t\t\t\tacc.push(key);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn acc;\r\n\t}, []);\r\n\r\n\treturn classes.join(' ');\r\n}","import { renderHTML } from '../utils/functions';\r\n\r\nconst PostMetaCategory = ({ post, attributes }) => {\r\n\tconst { categories } = post;\r\n\tconst { isMetaCategory, metaCategoryIn, metaCategoryIcon } = attributes;\r\n\r\n\treturn (isMetaCategory && 'content' === metaCategoryIn && categories.coma) ? \r\n\t\t{metaCategoryIcon ?\r\n\t\t\tAuthor :\r\n\t\t\t}\r\n\r\n\t\t{renderHTML(categories.coma)}\r\n\t : null;\r\n};\r\nexport default PostMetaCategory;","const PostMetaReadTime = ({ post, attributes }) => {\r\n\tconst { readTime, content } = post;\r\n\tconst { isMetaReadTime, metaReadTimeIcon, isMetaReadTimeSec, metaReadTimeLabel } = attributes;\r\n\r\n\tconst readTimeText = isMetaReadTimeSec ? `${readTime?.min}:${readTime?.sec}` : readTime?.min;\r\n\r\n\treturn (isMetaReadTime && content) ? \r\n\t\t{metaReadTimeIcon ?\r\n\t\t\tAuthor :\r\n\t\t\t}\r\n\r\n\t\t{readTimeText} {metaReadTimeLabel}\r\n\t : null;\r\n};\r\nexport default PostMetaReadTime;","const PostMetaComment = ({ post, attributes }) => {\r\n\tconst { link, title, commentCount, commentStatus } = post;\r\n\tconst { isMetaComment, metaCommentIcon } = attributes;\r\n\r\n\treturn (isMetaComment && 'open' === commentStatus) ? \r\n\t\t{metaCommentIcon ?\r\n\t\t\tAuthor :\r\n\t\t\t}\r\n\r\n\t\t{commentCount}\r\n\t : null;\r\n};\r\nexport default PostMetaComment;","import PostMetaAuthor from './PostMetaAuthor';\r\nimport PostMetaDate from './PostMetaDate';\r\nimport PostMetaCategory from './PostMetaCategory';\r\nimport PostMetaReadTime from './PostMetaReadTime';\r\nimport PostMetaComment from './PostMetaComment';\r\n\r\nconst Meta = ({ post, attributes }) => {\r\n\tconst { isMeta } = attributes;\r\n\r\n\treturn isMeta &&
\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t
;\r\n};\r\nexport default Meta;","const Title = ({ post, attributes }) => {\r\n\tconst { link, title } = post;\r\n\tconst { isTitle, isTitleLink, isLinkNewTab } = attributes;\r\n\r\n\treturn isTitle ? <>\r\n\t\t{isTitleLink ?\r\n\t\t\t

\r\n\t\t\t\t\r\n\t\t\t

:\r\n\t\t\t

}\r\n\t : null;\r\n};\r\nexport default Title;","import Meta from './Meta';\r\nimport Title from './Title';\r\n\r\nconst TitleMeta = ({ post, attributes }) => {\r\n\tconst { elementsSort = ['title', 'meta'] } = attributes;\r\n\r\n\treturn elementsSort.map((el, index) => 'title' === el ? : <Meta key={index} post={post} attributes={attributes} />)\r\n}\r\nexport default TitleMeta;","import { truncate, strLength } from '../utils/functions';\r\n\r\nconst PostExcerpt = ({ post, attributes }) => {\r\n\tconst { excerpt, content } = post;\r\n\tconst { isExcerpt, isExcerptFromContent, isEllipsisOnExcerpt, excerptLength } = attributes;\r\n\r\n\tconst finalExcerpt = (!isExcerptFromContent && excerpt) ? excerpt : content;\r\n\tconst ellipsis = (isEllipsisOnExcerpt && (strLength(finalExcerpt) > excerptLength)) ? '...' : '';\r\n\r\n\treturn (isExcerpt && finalExcerpt) ? <div className='apbExcerpt apbInnerContent' dangerouslySetInnerHTML={{ __html: `${truncate(finalExcerpt, excerptLength)}${ellipsis}` }} /> : null;\r\n};\r\nexport default PostExcerpt;","const PostReadMore = ({ post, attributes }) => {\r\n\tconst { link } = post;\r\n\tconst { isReadMore, readMorePosition = 'auto', readMoreLabel, isLinkNewTab } = attributes;\r\n\r\n\treturn isReadMore ? <div className={`apbReadMore ${readMorePosition}`}>\r\n\t\t<a href={link} target={isLinkNewTab ? '_blank' : '_self'} rel='noreferrer' dangerouslySetInnerHTML={{ __html: readMoreLabel }} aria-label={readMoreLabel} />\r\n\t</div> : null;\r\n};\r\nexport default PostReadMore;","import FeatureImage from '../Single/FeatureImage';\r\nimport TitleMeta from '../Single/TitleMeta';\r\nimport PostExcerpt from '../Single/PostExcerpt';\r\nimport PostReadMore from '../Single/PostReadMore';\r\nimport { classNames } from '../utils/functions';\r\n\r\nconst Default = ({ post, attributes, postClass }) => {\r\n\tconst { subLayout } = attributes;\r\n\r\n\tconst className = classNames(postClass, 'apbDefault');\r\n\r\n\treturn <article className={className}>\r\n\t\t<FeatureImage post={post} attributes={attributes} />\r\n\r\n\t\t<div className='apbText'>\r\n\t\t\t<TitleMeta post={post} attributes={attributes} />\r\n\r\n\t\t\t{'title-meta' !== subLayout && <>\r\n\t\t\t\t<PostExcerpt post={post} attributes={attributes} />\r\n\t\t\t\t<PostReadMore post={post} attributes={attributes} />\r\n\t\t\t</>}\r\n\t\t</div>\r\n\t</article>;\r\n};\r\nexport default Default;","import FeatureImage from '../Single/FeatureImage';\r\nimport TitleMeta from '../Single/TitleMeta';\r\nimport PostExcerpt from '../Single/PostExcerpt';\r\nimport PostReadMore from '../Single/PostReadMore';\r\nimport { classNames } from '../utils/functions';\r\n\r\nconst SideImage = ({ post, attributes, postClass }) => {\r\n\tconst { thumbnail } = post;\r\n\tconst { subLayout, isFImg } = attributes;\r\n\r\n\tconst isLeftImg = 'left-image' === subLayout;\r\n\tconst isRightImg = 'right-image' === subLayout;\r\n\tconst className = classNames(postClass, 'apbSideImage', {\r\n\t\t'grid': isFImg && thumbnail.url,\r\n\t\t'leftImage': isLeftImg,\r\n\t\t'rightImage': isRightImg\r\n\t});\r\n\r\n\treturn <article className={className}>\r\n\t\t{isLeftImg && <FeatureImage post={post} attributes={attributes} />}\r\n\r\n\t\t<div className='apbText'>\r\n\t\t\t<TitleMeta post={post} attributes={attributes} />\r\n\r\n\t\t\t<PostExcerpt post={post} attributes={attributes} />\r\n\t\t\t<PostReadMore post={post} attributes={attributes} />\r\n\t\t</div>\r\n\r\n\t\t{isRightImg && <FeatureImage post={post} attributes={attributes} />}\r\n\t</article>;\r\n};\r\nexport default SideImage;","import TitleMeta from '../Single/TitleMeta';\r\nimport PostExcerpt from '../Single/PostExcerpt';\r\nimport PostReadMore from '../Single/PostReadMore';\r\nimport { classNames } from '../utils/functions';\r\n\r\nconst Overlay = ({ post, attributes, postClass }) => {\r\n\tconst { title, thumbnail: { url: thumbUrl } } = post;\r\n\tconst { subLayout } = attributes;\r\n\r\n\tconst className = classNames(postClass, 'apbOverlay', {\r\n\t\t'apbOverlayHover': 'overlay-content-hover' === subLayout && thumbUrl,\r\n\t\t'apbOverlayBox': 'overlay-box' === subLayout || 'overlay-content-box' === subLayout,\r\n\t\t'apbOverlayHalfContent': 'overlay-half-content' === subLayout\r\n\t});\r\n\r\n\treturn <article className={className}>\r\n\t\t{thumbUrl && <img src={thumbUrl} alt={title} />}\r\n\r\n\t\t<div className='apbText'>\r\n\t\t\t<TitleMeta post={post} attributes={attributes} />\r\n\r\n\t\t\t{'overlay-box' !== subLayout && 'overlay-half-content' !== subLayout && <>\r\n\t\t\t\t<PostExcerpt post={post} attributes={attributes} />\r\n\t\t\t\t<PostReadMore post={post} attributes={attributes} />\r\n\t\t\t</>}\r\n\t\t</div>\r\n\t</article>;\r\n};\r\n\r\nexport default Overlay;","import Default from './Default';\r\nimport SideImage from './SideImage';\r\nimport Overlay from './Overlay';\r\nimport { classNames } from '../utils/functions';\r\n\r\nconst SubLayout = ({ post, attributes }) => {\r\n const { layout, subLayout, content = { height: 'auto' } } = attributes;\r\n\r\n const { id, thumbnail } = post;\r\n const postClass = classNames('apbPost', `apbPost-${id}`, `${content?.height}ContentHeight`, {\r\n 'hasThumbnail': thumbnail.url,\r\n 'swiper-slide': 'slider' === layout\r\n });\r\n\r\n switch (subLayout) {\r\n case 'default':\r\n case 'title-meta':\r\n return <Default post={post} attributes={attributes} postClass={postClass} />;\r\n case 'left-image':\r\n case 'right-image':\r\n return <SideImage post={post} attributes={attributes} postClass={postClass} />;\r\n case 'overlay-content':\r\n case 'overlay-content-hover':\r\n case 'overlay-box':\r\n case 'overlay-content-box':\r\n case 'overlay-half-content':\r\n return <Overlay post={post} attributes={attributes} postClass={postClass} />;\r\n default:\r\n return null;\r\n }\r\n}\r\nexport default SubLayout;","import Masonry, { ResponsiveMasonry } from 'react-responsive-masonry';\r\n\r\nimport SubLayout from './SubLayout';\r\n\r\nconst MyMasonry = ({ posts, attributes }) => {\r\n\tconst { columns, columnGap, rowGap } = attributes;\r\n\tconst { desktop = 3, tablet = 2, mobile = 1 } = columns;\r\n\r\n\treturn <ResponsiveMasonry className='apbMasonryPosts' columnsCountBreakPoints={{ 0: mobile, 576: tablet, 768: desktop }}>\r\n\t\t<Masonry gutter={`${rowGap}px ${columnGap}px`}>\r\n\t\t\t{posts.map(post => <SubLayout key={post.id} post={post} attributes={attributes} />)}\r\n\t\t</Masonry>\r\n\t</ResponsiveMasonry>\r\n}\r\nexport default MyMasonry;","import MyMasonry from '../../Layout/Masonry';\r\nimport SubLayout from '../../Layout/SubLayout';\r\n\r\nconst DisplayPosts = ({ posts, attributes }) => {\r\n\tconst { layout, columns, sliderIsPage, sliderIsPrevNext } = attributes;\r\n\tconst { desktop = 3, tablet = 2, mobile = 1 } = columns;\r\n\r\n\tconst PostsLoop = () => posts.map(post => <SubLayout key={post.id} post={post} attributes={attributes} />)\r\n\r\n\tswitch (layout) {\r\n\t\tcase 'grid':\r\n\t\t\treturn <div className={`apbGridPosts columns-${desktop} columns-tablet-${tablet} columns-mobile-${mobile}`}>\r\n\t\t\t\t<PostsLoop />\r\n\t\t\t</div>;\r\n\r\n\t\tcase 'grid1':\r\n\t\t\treturn <div className='apbGrid1Posts'>\r\n\t\t\t\t<PostsLoop />\r\n\t\t\t</div>;\r\n\r\n\t\tcase 'masonry':\r\n\t\t\treturn <MyMasonry posts={posts} attributes={attributes} />;\r\n\r\n\t\tcase 'slider':\r\n\t\t\treturn <div className='apbSliderPosts'>\r\n\t\t\t\t<div className='swiper-wrapper'>\r\n\t\t\t\t\t<PostsLoop />\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t{sliderIsPage && <div className='swiper-pagination'></div>}\r\n\r\n\t\t\t\t{sliderIsPrevNext && <>\r\n\t\t\t\t\t<div className='swiper-button-prev'></div>\r\n\t\t\t\t\t<div className='swiper-button-next'></div>\r\n\t\t\t\t</>}\r\n\t\t\t</div>;\r\n\r\n\t\tcase 'ticker':\r\n\t\t\treturn <div className='apbTickerPosts'>\r\n\t\t\t\t<div>\r\n\t\t\t\t\t<PostsLoop />\r\n\t\t\t\t</div>\r\n\t\t\t</div>;\r\n\r\n\t\tdefault:\r\n\t\t\treturn null;\r\n\t}\r\n}\r\nexport default DisplayPosts;","import { useMemo } from 'react';\r\n\r\nexport const DOTS = '·';\r\n\r\nconst range = (start, end) => {\r\n\tlet length = end - start + 1;\r\n\treturn Array.from({ length }, (_, idx) => idx + start);\r\n};\r\n\r\nexport const usePagination = ({ currentPage, totalCount, pageSize, siblingCount = 1 }) => {\r\n\tconst paginationRange = useMemo(() => {\r\n\t\tconst totalPageCount = Math.ceil(totalCount / pageSize);\r\n\r\n\t\t// Pages count is determined as siblingCount + firstPage + lastPage + currentPage + 2*DOTS\r\n\t\tconst totalPageNumbers = siblingCount + 5;\r\n\r\n\t\t/*\r\n\t\t\tIf the number of pages is less than the page numbers we want to show in our\r\n\t\t\tpaginationComponent, we return the range [1..totalPageCount]\r\n\t\t*/\r\n\t\tif (totalPageNumbers >= totalPageCount) {\r\n\t\t\treturn range(1, totalPageCount);\r\n\t\t}\r\n\r\n\t\tconst leftSiblingIndex = Math.max(currentPage - siblingCount, 1);\r\n\t\tconst rightSiblingIndex = Math.min(\r\n\t\t\tcurrentPage + siblingCount,\r\n\t\t\ttotalPageCount\r\n\t\t);\r\n\r\n\t\t/*\r\n\t\t\tWe do not want to show dots if there is only one position left \r\n\t\t\tafter/before the left/right page count as that would lead to a change if our Pagination\r\n\t\t\tcomponent size which we do not want\r\n\t\t*/\r\n\t\tconst shouldShowLeftDots = leftSiblingIndex > 2;\r\n\t\tconst shouldShowRightDots = rightSiblingIndex < totalPageCount - 2;\r\n\r\n\t\tconst firstPageIndex = 1;\r\n\t\tconst lastPageIndex = totalPageCount;\r\n\r\n\t\tif (!shouldShowLeftDots && shouldShowRightDots) {\r\n\t\t\tlet leftItemCount = 3 + 2 * siblingCount;\r\n\t\t\tlet leftRange = range(1, leftItemCount);\r\n\t\t\treturn [...leftRange, DOTS, totalPageCount];\r\n\t\t}\r\n\r\n\t\tif (shouldShowLeftDots && !shouldShowRightDots) {\r\n\t\t\tlet rightItemCount = 3 + 2 * siblingCount;\r\n\t\t\tlet rightRange = range(\r\n\t\t\t\ttotalPageCount - rightItemCount + 1,\r\n\t\t\t\ttotalPageCount\r\n\t\t\t);\r\n\t\t\treturn [firstPageIndex, DOTS, ...rightRange];\r\n\t\t}\r\n\r\n\t\tif (shouldShowLeftDots && shouldShowRightDots) {\r\n\t\t\tlet middleRange = range(leftSiblingIndex, rightSiblingIndex);\r\n\t\t\treturn [firstPageIndex, DOTS, ...middleRange, DOTS, lastPageIndex];\r\n\t\t}\r\n\t}, [currentPage, totalCount, pageSize, siblingCount]);\r\n\r\n\treturn paginationRange;\r\n};","import { useState } from 'react';\r\n\r\nimport { usePagination, DOTS } from './usePagination';\r\n\r\nconst Pagination = ({ attributes, totalCount, onChange }) => {\r\n\tconst { layout, isPostsPerPageAll, postsPerPage, isPagination, paginationPrevLabel, paginationNextLabel } = attributes;\r\n\r\n\tconst [currentPage, setCurrentPage] = useState(1);\r\n\r\n\tconst paginationRange = usePagination({\r\n\t\tcurrentPage,\r\n\t\ttotalCount,\r\n\t\tpageSize: postsPerPage,\r\n\t\tsiblingCount: 1\r\n\t});\r\n\r\n\tif (currentPage === 0 || paginationRange.length < 2) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\tlet lastPage = paginationRange[paginationRange.length - 1];\r\n\r\n\tconst setPageNumber = pageNumber => {\r\n\t\tonChange(pageNumber);\r\n\t\tsetCurrentPage(pageNumber);\r\n\t}\r\n\r\n\treturn isPagination && !isPostsPerPageAll && 'slider' !== layout && 'ticker' !== layout ? <ul className={`apbPagination`}>\r\n\t\t<li className={`apbPageNumber ${currentPage === 1 ? 'disabled' : ''}`}\r\n\t\t\tonClick={() => setPageNumber(currentPage - 1)}\r\n\t\t>{paginationPrevLabel}</li>\r\n\r\n\t\t{paginationRange.map((pageNumber, index) => {\r\n\t\t\tif (pageNumber === DOTS) {\r\n\t\t\t\treturn <li key={index} className='dots'>·····</li>;\r\n\t\t\t}\r\n\r\n\t\t\treturn <li key={index}\r\n\t\t\t\tclassName={`apbPageNumber ${pageNumber === currentPage ? 'apbActivePage' : ''}`}\r\n\t\t\t\tonClick={() => setPageNumber(pageNumber)}\r\n\t\t\t> {pageNumber}</li>;\r\n\t\t})}\r\n\r\n\t\t<li className={`apbPageNumber ${currentPage === lastPage ? 'disabled' : ''}`}\r\n\t\t\tonClick={() => setPageNumber(currentPage + 1)}\r\n\t\t>{paginationNextLabel}</li>\r\n\t</ul> : null;\r\n};\r\nexport default Pagination;","import { useState, useEffect } from 'react';\r\nimport { render } from 'react-dom';\r\nconst $ = jQuery;\r\nimport 'swiper/css/bundle'; // Swiper CSS\r\n\r\nimport DisplayPosts from './Components/Frontend/DisplayPosts';\r\nimport Pagination from './Pagination';\r\nimport './style.scss';\r\nimport { sliderConfig, setSliderHeight, tickerConfig } from './utils/configs';\r\nimport MyMasonry from './Layout/Masonry';\r\n\r\n// Advanced Posts Block\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n\tconst postsEls = document.querySelectorAll('.wp-block-ap-block-posts');\r\n\tpostsEls.forEach(postEl => {\r\n\t\tconst posts = JSON.parse(postEl.dataset.posts);\r\n\t\tconst attributes = JSON.parse(postEl.dataset.attributes);\r\n\t\tconst { totalPosts } = JSON.parse(postEl.dataset.extra);\r\n\t\tconst { layout } = attributes;\r\n\r\n\t\t// Masonry\r\n\t\tif ('masonry' === layout) {\r\n\t\t\trender(<MyMasonry posts={posts} attributes={attributes} />, document.querySelector(`#${postEl.id} .apbPostsMainPH`))\r\n\t\t}\r\n\r\n\t\t// Slider\r\n\t\tif ('slider' === layout) {\r\n\t\t\tconst sliderEl = document.querySelector(`#${postEl.id} .apbSliderPosts`);\r\n\r\n\t\t\tif (sliderEl) {\r\n\t\t\t\tnew Swiper(sliderEl, sliderConfig(attributes));\r\n\t\t\t\t// new Swiper(sliderEl, {\r\n\t\t\t\t// \t...sliderConfig(attributes),\r\n\t\t\t\t// \ton: {\r\n\t\t\t\t// \t\tinit: () => {\r\n\t\t\t\t// \t\t\tconst slideWrapperEl = document.querySelector(`#${postEl.id} .apbSliderPosts .swiper-wrapper`);\r\n\t\t\t\t// \t\t\tslideWrapperEl.className = 'swiper-wrapper';\r\n\t\t\t\t// \t\t\tslideWrapperEl.style.gap = 0;\r\n\t\t\t\t// \t\t}\r\n\t\t\t\t// \t}\r\n\t\t\t\t// });\r\n\r\n\t\t\t\t// Slider Height\r\n\t\t\t\tsetSliderHeight(postEl.id);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\t// Ticker\r\n\t\tif ('ticker' === layout) {\r\n\t\t\tconst tickerEl = document.querySelector(`#${postEl.id} .apbTickerPosts`);\r\n\r\n\t\t\ttickerEl && $(tickerEl).easyTicker(tickerConfig(attributes));\r\n\t\t}\r\n\r\n\t\trender(<RenderMain postEl={postEl} totalPosts={totalPosts} attributes={attributes} />, document.querySelector(`#${postEl.id} .apbPostsMain`));\r\n\r\n\t\tpostEl?.removeAttribute('data-posts');\r\n\t\tpostEl?.removeAttribute('data-attributes');\r\n\t\tpostEl?.removeAttribute('data-extra');\r\n\t});\r\n});\r\n\r\nconst RenderMain = ({ postEl, totalPosts, attributes }) => {\r\n\tconst { cId, layout, isPostsPerPageAll, postsPerPage, postsOffset, isPagination, paginationPrevLabel, paginationNextLabel, fImgSize = 'full', metaDateFormat = 'M j, Y' } = attributes;\r\n\r\n\tconst [posts, setPosts] = useState([]);\r\n\r\n\tconst postsMainPHEl = document.querySelector(`#${postEl.id} .apbPostsMainPH`);\r\n\r\n\t// Remove PHP posts if has posts\r\n\tuseEffect(() => {\r\n\t\tposts?.length && postsMainPHEl?.remove();\r\n\t}, [posts, postsMainPHEl]);\r\n\r\n\treturn <>\r\n\t\t{posts?.length ? <DisplayPosts posts={posts} attributes={attributes} clientId={cId} /> : null}\r\n\r\n\t\t<Pagination attributes={{ layout, isPostsPerPageAll, postsPerPage, isPagination, paginationPrevLabel, paginationNextLabel }} totalCount={totalPosts} onChange={val => {\r\n\t\t\t// window.scrollTo({\r\n\t\t\t// \ttop: postEl.offsetTop,\r\n\t\t\t// \tbehavior: 'smooth',\r\n\t\t\t// });\r\n\r\n\t\t\t// Fetch posts on page click\r\n\t\t\tfetch(`${apbPageData?.ajaxUrl}?action=apb_get_posts&cId=${cId}&pageNumber=${val}&postsPerPage=${postsPerPage}&postsOffset=${postsOffset}&fImgSize=${fImgSize}&metaDateFormat=${metaDateFormat}`)\r\n\t\t\t\t.then(res => res.json())\r\n\t\t\t\t.then(data => setPosts(data));\r\n\t\t}} />\r\n\t</>\r\n}","export const masonryConfig = (container, attributes) => {\r\n\tconst { columnGap, rowGap } = attributes;\r\n\r\n\treturn {\r\n\t\tcontainer,\r\n\t\tbaseWidth: 400,\r\n\t\tgutterX: columnGap,\r\n\t\tgutterY: rowGap,\r\n\t\tminify: false,\r\n\t\tultimateGutter: 5,\r\n\t\tsurroundingGutter: false\r\n\t}\r\n}\r\n\r\nexport const sliderConfig = (attributes) => {\r\n\tconst { columns, columnGap, sliderIsLoop, sliderIsTouchMove, sliderIsAutoplay, sliderAutoplayOptions = { delay: 1.5 }, sliderSpeed, sliderEffect, sliderIsPageClickable, sliderIsPageDynamic } = attributes;\r\n\r\n\treturn {\r\n\t\t// Optional parameters\r\n\t\tdirection: 'horizontal',\r\n\t\tslidesPerView: columns?.mobile,\r\n\t\tbreakpoints: {\r\n\t\t\t// when window width is >= 576px\r\n\t\t\t576: { slidesPerView: columns?.tablet },\r\n\t\t\t// when window width is >= 768px\r\n\t\t\t768: { slidesPerView: columns?.desktop },\r\n\t\t},\r\n\t\tspaceBetween: columnGap,\r\n\t\tloop: sliderIsLoop,\r\n\t\tallowTouchMove: sliderIsTouchMove,\r\n\t\tgrabCursor: sliderIsTouchMove,\r\n\t\tautoplay: sliderIsAutoplay ? { delay: sliderAutoplayOptions?.delay * 1000 } : false,\r\n\t\tspeed: sliderSpeed * 1000,\r\n\t\teffect: sliderEffect,\r\n\t\tfadeEffect: { crossFade: true },\r\n\t\tcreativeEffect: {\r\n\t\t\tprev: {\r\n\t\t\t\tshadow: true,\r\n\t\t\t\ttranslate: ['-120%', 0, -500],\r\n\t\t\t},\r\n\t\t\tnext: {\r\n\t\t\t\tshadow: true,\r\n\t\t\t\ttranslate: ['120%', 0, -500],\r\n\t\t\t}\r\n\t\t},\r\n\t\tallowSlideNext: true,\r\n\t\tallowSlidePrev: true,\r\n\t\tautoHeight: false, // Frontend\r\n\t\tnotificationClass: null,\r\n\r\n\t\t// Controllers\r\n\t\tpagination: {\r\n\t\t\tel: '.swiper-pagination',\r\n\t\t\tclickable: sliderIsPageClickable,\r\n\t\t\tdynamicBullets: sliderIsPageDynamic\r\n\t\t},\r\n\t\tnavigation: {\r\n\t\t\tnextEl: '.swiper-button-next',\r\n\t\t\tprevEl: '.swiper-button-prev',\r\n\t\t}\r\n\t}\r\n}\r\n\r\nexport const setSliderHeight = (id) => {\r\n\tconst slideHeightArray = [];\r\n\tconst swiperSlide = document.querySelectorAll(`#${id} .apbSliderPosts .swiper-slide`);\r\n\tconst swiperSlideText = document.querySelectorAll(`#${id} .apbSliderPosts .swiper-slide .apbText`);\r\n\tswiperSlideText?.forEach(slideText => {\r\n\t\tslideHeightArray.push(slideText?.clientHeight);\r\n\t});\r\n\tswiperSlide?.length && swiperSlide.forEach(slide => {\r\n\t\tslide.style.height = `${Math.max(...slideHeightArray)}px`;\r\n\t});\r\n}\r\n\r\nexport const tickerConfig = (attributes) => {\r\n\tconst { rowGap, tickerDirection = 'up', tickerSpeed = 'slow', tickerInterval = 2000, tickerHeight = '0px', tickerVisible = 3, tickerIsMousePause = true } = attributes;\r\n\r\n\treturn {\r\n\t\tdirection: tickerDirection,\r\n\t\teasing: 'swing',\r\n\t\tspeed: isNaN(tickerSpeed) ? tickerSpeed : parseInt(tickerSpeed),\r\n\t\tinterval: tickerInterval,\r\n\t\theight: '0px' === tickerHeight || '0em' === tickerHeight ? 'auto' : tickerHeight,\r\n\t\tgap: rowGap,\r\n\t\tvisible: tickerVisible,\r\n\t\tmousePause: tickerIsMousePause\r\n\t}\r\n}"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","React","ReactDOM","_extends","assign","target","i","arguments","length","source","apply","this","_setPrototypeOf","p","setPrototypeOf","__proto__","Masonry","_React$Component","subClass","superClass","create","constructor","_proto","getColumns","_this$props","props","children","columnsCount","columns","Array","from","child","index","push","renderColumns","gutter","map","column","style","display","flexDirection","justifyContent","alignContent","flex","width","gap","item","render","_this$props2","className","boxSizing","propTypes","defaultProps","useIsomorphicLayoutEffect","window","useLayoutEffect","useEffect","useWindowWidth","hasMounted","_useState","useState","setHasMounted","useHasMounted","_useState2","setWidth","handleResize","useCallback","innerWidth","addEventListener","removeEventListener","MasonryResponsive","_ref","_ref$columnsCountBrea","columnsCountBreakPoints","_ref$className","_ref$style","windowWidth","useMemo","breakPoints","keys","sort","b","count","forEach","breakPoint","post","attributes","link","thumbnail","thumbUrl","url","thumbAlt","alt","categories","isFImg","isFImgLink","isMeta","isMetaCategory","metaCategoryIn","isLinkNewTab","href","rel","src","space","dangerouslySetInnerHTML","__html","author","name","isMetaAuthor","isMetaAuthorLink","metaAuthorIcon","date","isMetaDate","metaDateIcon","truncate","str","nu_words","split","splice","join","classNames","args","classes","reduce","acc","arg","entries","raw","metaCategoryIcon","coma","readTime","content","isMetaReadTime","metaReadTimeIcon","isMetaReadTimeSec","metaReadTimeLabel","readTimeText","min","sec","title","commentCount","commentStatus","isMetaComment","metaCommentIcon","isTitle","isTitleLink","elementsSort","el","excerpt","isExcerpt","isExcerptFromContent","isEllipsisOnExcerpt","excerptLength","finalExcerpt","ellipsis","isReadMore","readMorePosition","readMoreLabel","postClass","subLayout","isLeftImg","isRightImg","layout","height","id","posts","columnGap","rowGap","desktop","tablet","mobile","ResponsiveMasonry","sliderIsPage","sliderIsPrevNext","PostsLoop","DOTS","range","start","end","_","idx","totalCount","onChange","isPostsPerPageAll","postsPerPage","isPagination","paginationPrevLabel","paginationNextLabel","currentPage","setCurrentPage","paginationRange","pageSize","siblingCount","totalPageCount","Math","ceil","leftSiblingIndex","max","rightSiblingIndex","shouldShowLeftDots","shouldShowRightDots","firstPageIndex","lastPageIndex","leftRange","rightRange","middleRange","usePagination","lastPage","setPageNumber","pageNumber","onClick","$","jQuery","document","querySelectorAll","postEl","slideHeightArray","swiperSlide","swiperSlideText","JSON","parse","dataset","totalPosts","extra","querySelector","sliderEl","Swiper","sliderIsLoop","sliderIsTouchMove","sliderIsAutoplay","sliderAutoplayOptions","delay","sliderSpeed","sliderEffect","sliderIsPageClickable","sliderIsPageDynamic","direction","slidesPerView","breakpoints","spaceBetween","loop","allowTouchMove","grabCursor","autoplay","speed","effect","fadeEffect","crossFade","creativeEffect","prev","shadow","translate","next","allowSlideNext","allowSlidePrev","autoHeight","notificationClass","pagination","clickable","dynamicBullets","navigation","nextEl","prevEl","sliderConfig","slideText","clientHeight","slide","tickerEl","easyTicker","tickerDirection","tickerSpeed","tickerInterval","tickerHeight","tickerVisible","tickerIsMousePause","easing","isNaN","parseInt","interval","visible","mousePause","tickerConfig","RenderMain","removeAttribute","cId","postsOffset","fImgSize","metaDateFormat","setPosts","postsMainPHEl","remove","clientId","val","fetch","apbPageData","ajaxUrl","then","res","json","data"],"sourceRoot":""}