;\n activeCategoriesLabel: HTMLElement;\n showAllButton: HTMLElement;\n hideSearch: any;\n updateCategoryCounts: boolean;\n hideCategories: boolean;\n hideCategoryCounts: boolean;\n showStaticCategory: boolean;\n featuredPagesSize: number;\n showingFeatured: boolean = true;\n labels: LabelsType;\n itemAttributes: any;\n modalAttributes: any;\n showShadows: any;\n makeItemClickable: any;\n isIntegrations: any;\n gridClasses: any;\n linkToModal: any;\n modalLinkParam: any;\n scrollUpToTopOnCategoryClick: boolean;\n logoMaxWidth: number;\n logoMaxHeight: number;\n modalContent: any;\n displayStyle: string = \"search-grid\";\n useJSON: boolean;\n totalUnfiltered: any;\n activeCategories: {\n [key: string]: Category[]\n };\n paginateItems: number;\n paginatePosition?: \"top\" | \"bottom\" | \"both\";\n paginateAlign: string;\n currentPage: number = 1;\n isJiraTemplates: boolean;\n templatesLinkButtonText: string;\n templatesModal_confluence: any;\n templatesModal_jirasoftware: any;\n templatesModal_jiraservicemanagement: any;\n templatesModal_jiraworkmanagement: any;\n templatesTryLink: any;\n templatesKeys: { [name: string]: string } = {\n \"jira-software\": \"jira-software\",\n \"jira-service-management\": \"jira-servicedesk\",\n \"jira-work-management\": \"jira-core\",\n };\n linkLabel: string;\n ids: { [key: string]: string };\n keepSorted: any;\n customSortKey?: string | null;\n sortKey: string;\n sortKeyParsed: any;\n modalElement: HTMLDivElement = document.createElement(\"div\");\n isLoggedIn: boolean = false;\n sitesProducts: string[] = [];\n activeDropdown: string = '';\n activeDismissHandler?: (e: MouseEvent) => void;\n\n constructor(domRoot: HTMLElement, params: FilterSortSearchParams) {\n this.domRoot = domRoot;\n this.params = params;\n this.items = params.itemsArr;\n this.categories = params.categories ? params.categories : {};\n this.itemsArea = domRoot.querySelector(\".all-items\") as HTMLElement;\n this.clearInput = domRoot.querySelector(\".clear-items\") as HTMLElement;\n this.searchInput = domRoot.querySelector(\".search-items\") as HTMLInputElement;\n this.displayButtons = document.getElementsByName(\"radio-items\");\n this.numResultsLabel = domRoot.querySelector(\".num-results\") as HTMLElement;\n this.resultsLabel = domRoot.querySelector(\".results-label\") as HTMLElement;\n this.categoriesContainers = domRoot.querySelectorAll(\n \".categories-containers\"\n );\n this.activeCategoriesLabel = domRoot.querySelector(\".active-category\") as HTMLElement;\n this.showAllButton = domRoot.querySelector(\".show-all\") as HTMLElement;\n this.hideSearch = params.hideSearch;\n this.updateCategoryCounts = params.updateCategoryCounts;\n this.hideCategories = params.hideCategories;\n this.hideCategoryCounts = params.hideCategoryCounts;\n this.showStaticCategory = params.showStaticCategory;\n this.featuredPagesSize = params.featuredPagesSize;\n this.labels = params.labels;\n this.itemAttributes = params.attributesArray;\n this.modalAttributes = params.modalAttributesArray;\n this.showShadows = params.showShadows;\n this.makeItemClickable = params.makeItemClickable;\n this.isIntegrations = params.isIntegrations;\n this.gridClasses = params.gridClasses;\n this.linkToModal = params.linkToModal;\n this.modalLinkParam = params.modalLinkParam;\n this.scrollUpToTopOnCategoryClick = params.scrollUpToTopOnCategoryClick;\n this.logoMaxWidth = params.logoMaxWidth;\n this.logoMaxHeight = params.logoMaxHeight;\n this.useJSON = params.useJSON;\n this.totalUnfiltered = this.items.length;\n this.activeCategories = params.activeCategories;\n this.paginateItems = Number(params.paginateItems);\n this.paginatePosition = params.paginatePosition;\n this.paginateAlign = params.paginateAlign;\n this.isJiraTemplates = this.modalAttributes.includes(\n \"productTemplatesModal\"\n );\n this.templatesLinkButtonText = params.templatesLinkButtonText;\n this.templatesModal_confluence = params.templatesModalConfluence;\n this.templatesModal_jirasoftware = params.templatesModalJiraSoftware;\n this.templatesModal_jiraservicemanagement =\n params.templatesModalJiraServiceManagement;\n this.templatesModal_jiraworkmanagement =\n params.templatesModalJiraWorkManagement;\n this.templatesTryLink = params.templatesTryLink;\n this.linkLabel = params.labels.linkLabel || \"\";\n this.ids = {\n title: params.titleFieldId || \"title\",\n description: params.descriptionFieldId || \"description\",\n htmlUnescaped: params.htmlUnescapedFieldId || \"config\",\n logo: params.logoFieldId || \"logo\",\n image: params.imageFieldId || \"image\",\n link: params.linkFieldId || \"url\",\n dateLabel: params.dateFieldId || \"dateLabel\",\n linkLabel: params.linkLabelFieldId || \"linkLabel\",\n customField1: params.customField1Id || \"customField1\",\n customField2: params.customField2Id || \"customField2\",\n customField3: params.customField3Id || \"customField3\",\n customCategoryKey: params.customCategoryKey || \"color\",\n customCategory2Key: params.customCategory2Key || \"color\",\n customCategoryAllKey: params.customCategoryAllKey || \"product\",\n };\n this.keepSorted = params.keepSorted;\n this.sortKey =\n params.sortKey == params.dateFieldId ? \"sorterDate\" : params.sortKey;\n this.sortKeyParsed = this.sortKey.replace(\"customSorts.\", \"\");\n\n if (this.isJiraTemplates) {\n const hamletUserCheck = () => {\n const isDebugMode = window.location.search.includes(\"debug=true\");\n return hamletUser.getStargateProfile(true, isDebugMode).then(() => {\n this.isLoggedIn = hamletUser.isLoggedIn() || false;\n this.sitesProducts =\n this.sortSiteData(hamletUser.getSites(), \"products\") || [];\n this.renderAll();\n });\n };\n\n hamletUserCheck();\n }\n document.body.appendChild(this.modalElement);\n if (!this.showStaticCategory) {\n if (this.getParam([\"search\"])) {\n this.searchInput.value = decodeURIComponent(this.getParam([\"search\"]) as string);\n }\n this.clearInput.addEventListener(\"click\", () => {\n this.searchInput.value = \"\";\n history.replaceState(null, \"\", \"?\" + this.getParam([\"search\"], true));\n this.renderAll();\n });\n\n [\"keyup\", \"change\"].forEach((handler) => {\n this.searchInput.addEventListener(handler, () => {\n this.scrollToTopOfPage();\n this.currentPage = 1;\n let newParams = this.getParam([\"search\", \"page\"], true);\n history.replaceState(\n null,\n \"\",\n `?${newParams}&search=${encodeURIComponent(this.searchInput.value)}`\n );\n this.renderAll();\n });\n });\n [\"click\", \"change\"].forEach((handler) => {\n this.searchInput.addEventListener(handler, (e) => {\n const target = e.target as HTMLInputElement;\n this.trackEvents(target, {\n event: handler,\n eventComponent: \"searchInput\",\n eventContainer: \"filterSortSearch\",\n searchValue: target.value\n });\n })\n })\n } else {\n this.scrollLoadImg();\n }\n\n if (\n this.paginateItems > 0 &&\n this.getParam([\"page\"]) &&\n !isNaN(Number(this.getParam([\"page\"])))\n ) {\n this.currentPage = Number(this.getParam([\"page\"]));\n }\n\n if (!this.showStaticCategory && !this.hideCategories) {\n Array.from(this.categoriesContainers).forEach((catContainer) => {\n catContainer.addEventListener(\"click\", (e: MouseEvent) => {\n this.parseFilterItem(e);\n });\n });\n }\n\n window.addEventListener(\"click\", this.activeDismissHandler = (e) => this.dismissHandler(e));\n\n for (let categoryKey in this.categories) {\n this.activeCategories[categoryKey] = [];\n let referenceCat = this.categories[categoryKey];\n let urlStartingDefault: any[] = [];\n let startingDefault =\n referenceCat.defaultOption && referenceCat.defaultOption.length\n ? [referenceCat.defaultOption]\n : \"\";\n\n if (this.getParam([categoryKey])) {\n const urlSubCats = (this.getParam([categoryKey]) as string).split(';');\n urlSubCats.forEach((urlSubCat: string) => {\n if (referenceCat.options[urlSubCat]) {\n urlStartingDefault.push(urlSubCat)\n }\n })\n }\n\n startingDefault = urlStartingDefault.length ? urlStartingDefault : startingDefault;\n\n if (startingDefault.length) {\n this.activeCategories[categoryKey] = this.activeCategories[categoryKey].concat(startingDefault);\n }\n\n if (\n !this.showStaticCategory &&\n !this.hideCategories\n ) {\n const categoriesMobileArea = this.domRoot.querySelector(\".categories-mobile-\" + categoryKey) as HTMLElement;\n\n if (categoriesMobileArea) {\n const self = this;\n\n categoriesMobileArea.addEventListener(\"click\", (e) => {\n e.stopImmediatePropagation();\n\n const target = e.target as HTMLElement;\n\n if (target.hasAttribute('data-category')) {\n this.parseFilterItem(e);\n }\n\n if (target.classList.contains('select-style')) {\n if (target.classList.contains('active-menu')) {\n target.classList.remove('active-menu');\n }\n else {\n if (document.querySelector('.active-menu')) {\n (document.querySelector('.active-menu') as HTMLElement).classList.remove('active-menu');\n }\n this.activeDropdown = categoryKey;\n target.classList.add('active-menu');\n target.focus();\n }\n }\n });\n }\n }\n }\n\n for (let d = 0; d < this.displayButtons.length; d++) {\n this.displayButtons[d].addEventListener(\"click\", (e) => {\n this.displayStyle = (e.target as HTMLInputElement).value;\n this.renderAll();\n });\n }\n\n this.modalElement.addEventListener(\"click\", (e) => {\n const target = e.target as HTMLElement;\n if (target.classList.contains(\"copy-yaml\") || target.classList.contains(\"share-modal-link\")) {\n this.copyToClipboard(target);\n } else if (target.classList.contains(\"close-modal\")) {\n this.closeModal(target);\n } else if (target.tagName == \"A\") {\n let modalItem = this.modalContent;\n let trackObjects: { [key: string]: string } = {\n eventContainer: \"filterModal\",\n cardCategories: modalItem.customSorts,\n parentLabel: this.getItemAttr(modalItem, this.ids.title),\n parentDescription: this.getItemAttr(modalItem, this.ids.description),\n };\n this.trackEvents(target, trackObjects);\n }\n });\n\n window.addEventListener(\"scroll\", () => {\n this.scrollLoadImg();\n });\n window.addEventListener(\"keyup\", (e) => {\n if (e.key == \"Escape\" && this.modalContent) {\n this.closeModal({});\n }\n });\n\n if (this.useJSON) {\n if (this.getParam([\"category\"])) {\n this.activeCategories[\"category\"] = [this.getParam([\"category\"])];\n }\n fetch(this.params.jsonURL)\n .then((response) => response.json())\n .then((data2) => {\n\n let data = data2;\n if (this.params.jsonPath.length) {\n data = this.getItemAttr(data2, this.params.jsonPath);\n }\n\n for (let d = 0; d < data.length; d++) {\n data[d].searchString = \"\";\n for (let key in data[d]) {\n if (typeof data[d][key] == \"string\") {\n data[d].searchString += data[d][key].toLowerCase() + \" \";\n } else if (\n typeof data[d][key] == \"object\" &&\n data[d][key].toString() !== \"[object Object]\"\n ) {\n data[d].searchString += data[d][key].toString();\n }\n }\n }\n this.items = data;\n this.totalUnfiltered = data.length;\n this.renderAll();\n this.paramModal();\n });\n } else if (!this.showStaticCategory) {\n this.renderAll();\n } else if (this.showAllButton) {\n this.showAllButton.addEventListener(\"click\", (e) => {\n const target = e.target as HTMLElement;\n this.showingFeatured = !this.showingFeatured;\n target.classList.toggle(\"revealed\");\n this.renderAll();\n });\n }\n\n (Array.from(this.domRoot.querySelectorAll(\".collapsible\")) as HTMLElement[]).forEach(\n (collapser) => {\n collapser.addEventListener(\"click\", (e) => {\n const target = e.target as HTMLElement;\n target.classList.toggle(\"collapsed\");\n });\n }\n );\n\n if (this.domRoot.querySelector(\".reset-filter\")) {\n this.domRoot.querySelectorAll(\".reset-filter\").forEach(resetter => {\n resetter.addEventListener(\"click\", () => {\n for (let act in this.activeCategories) {\n this.activeCategories[act] = [];\n }\n history.replaceState(null, \"\", \"?\");\n this.renderAll();\n })\n })\n\n }\n if (this.domRoot.querySelector(\".sorter-button\")) {\n (this.domRoot.querySelectorAll(\".sorter-button\") as unknown as HTMLInputElement[]).forEach(sorter => {\n sorter.addEventListener(\"click\", (e) => {\n const target = e.target as HTMLInputElement;\n\n let allSorts = this.domRoot.querySelectorAll(\".sorter-button\");\n allSorts.forEach(allSort => { allSort.classList.remove('active') });\n\n this.customSortKey = target.value;\n\n target.classList.add('active');\n\n this.renderAll(target.dataset.sortDir == \"desc\");\n target.dataset.sortDir = target.dataset.sortDir == \"asc\" ? \"desc\" : \"asc\";\n })\n })\n\n }\n window.onload = () => {\n this.paramModal();\n };\n }\n\n dismissHandler(e: MouseEvent) {\n if (!this.activeDropdown) {\n return;\n }\n\n const activeMenu = document.body.getElementsByClassName(`categories-mobile-${this.activeDropdown}`)[0] as HTMLElement;\n if (!activeMenu) {\n return;\n }\n\n const targetInsideMenu = activeMenu?.offsetParent?.lastChild?.contains(e.target as Node) === true;\n\n if (!targetInsideMenu) {\n this.activeDropdown = '';\n this.renderAll();\n }\n }\n\n parseFilterItem(e: MouseEvent) {\n const target = e.target as HTMLElement;\n\n let isActive = (target.parentNode as HTMLElement).classList.contains(\"active\");\n let category = target.getAttribute(\"data-category\") as string;\n let subCat = target.getAttribute(\"data-subcategory\") as string;\n let filterType = target.getAttribute(\"data-filtertype\");\n let resetOthers = target.getAttribute(\"data-reset\") == \"true\";\n\n if (target.hasAttribute(\"data-subcategory\")) {\n if (filterType == \"radio\" && subCat.length) {\n this.activeCategories[category] = subCat.length ? [subCat] : [];\n } else if (filterType == \"checkbox\" && subCat.length && !isActive) {\n this.activeCategories[category].push(subCat);\n } else if (filterType == \"checkbox\" && subCat.length && isActive) {\n let indexCat = this.activeCategories[category].indexOf(subCat);\n this.activeCategories[category].splice(indexCat, 1);\n } else if (subCat.length < 1) {\n this.activeCategories[category] = [];\n }\n\n const joinedCats = this.activeCategories[category].join(';');\n let newParams = `${category}=${joinedCats}&${this.getParam(\n [category, \"page\"],\n true\n )}`;\n if (resetOthers) {\n newParams = `${category}=${joinedCats}`;\n this.resetOtherCategories(category);\n }\n history.replaceState(null, \"\", `?${newParams}`);\n if (this.scrollUpToTopOnCategoryClick) {\n this.scrollToTopOfPage();\n }\n this.currentPage = 1;\n this.renderAll();\n } else if (target.hasAttribute(\"data-sortable\")) {\n this.customSortKey = target.getAttribute(\"data-sortable\");\n this.renderAll();\n }\n\n this.trackEvents(target, {\n eventContainer: \"filterCategory\",\n clickedCategory: category,\n clickedSubCategory: subCat,\n });\n }\n\n sortSiteData(data: any[], type: string) {\n let array: any[] = [];\n data.forEach((site) => {\n array = array.concat(site[type]);\n });\n return array;\n }\n\n scrollToTopOfPage() {\n this.domRoot.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\n }\n\n getCategoryAmounts(categoriesObj: { [key: string]: any }, item: HTMLElement) {\n for (let sideCat in categoriesObj) {\n let cat = this.getItemAttr(item, sideCat);\n if (cat) {\n if (typeof cat === \"object\") {\n for (let b = 0; b < cat.length; b++) {\n let identifier = cat[b].key ? cat[b].key : cat[b];\n if (categoriesObj[sideCat].options[identifier]) {\n categoriesObj[sideCat].options[identifier].amount++;\n }\n }\n } else if (categoriesObj[sideCat].options[this.slugify(cat)]) {\n categoriesObj[sideCat].options[this.slugify(cat)].amount++;\n }\n }\n }\n }\n\n getFilteredItems(reverse?: boolean) {\n let categoriesObj = JSON.parse(JSON.stringify(this.categories)) as Categories;\n let searchInputValue = this.showStaticCategory\n ? \"\"\n : this.searchInput.value.toLowerCase();\n return new Promise((resolve) => {\n let featuredItems = this.items.slice(0, this.featuredPagesSize);\n let featItems =\n this.showStaticCategory && this.showingFeatured\n ? featuredItems\n : this.items;\n let items = featItems.filter((a: any) => {\n delete a.headerBeginner;\n if (a.unsortedCategories) {\n for (let u = 0; u < a.unsortedCategories.length; u++) {\n let cat = a.unsortedCategories[u];\n let key = Object.keys(cat)[0];\n if (a[key] && a[key].indexOf(cat[key]) === -1) {\n a[key].push(cat[key]);\n } else {\n a[key] = [cat[key]];\n }\n }\n }\n\n if (this.useJSON) {\n for (let key in categoriesObj) {\n let itemCat = this.getItemAttr(a, key);\n let slug = this.slugify(itemCat);\n if (\n !categoriesObj[key].options[slug] &&\n itemCat &&\n itemCat.length\n ) {\n categoriesObj[key].options[slug] = {\n label: itemCat,\n amount: 0,\n };\n }\n }\n }\n\n if (!this.updateCategoryCounts) {\n /* get amounts before they've been filtered */\n this.getCategoryAmounts(categoriesObj, a);\n }\n\n let isInSearchResults =\n a.searchString && a.searchString.indexOf(searchInputValue) > -1;\n return (\n isInSearchResults &&\n Object.keys(this.activeCategories).every((b) => {\n return (\n this.activeCategories[b].length === 0 ||\n this.activeCategories[b].some((c: any) => {\n let matchLabel = categoriesObj[b].options[c]\n ? categoriesObj[b].options[c].label\n : c;\n let itemCat = this.getItemAttr(a, b);\n let itemCatMatcher =\n itemCat && itemCat.label ? itemCat.label : itemCat;\n let isMatchers =\n itemCatMatcher && itemCatMatcher.some\n ? itemCatMatcher.some((item: any) => {\n return (\n item == matchLabel ||\n (itemCatMatcher && itemCatMatcher.indexOf(c) > -1) ||\n item.label == matchLabel\n );\n })\n : this.getItemAttr(a, b) === matchLabel ||\n (typeof this.getItemAttr(a, b) == \"string\" &&\n this.getItemAttr(a, b).indexOf(c) > -1);\n return isMatchers;\n })\n );\n })\n );\n });\n\n if (this.updateCategoryCounts) {\n /* get amounts after they've been filtered */\n items.forEach((a: any) => {\n this.getCategoryAmounts(categoriesObj, a);\n });\n }\n\n if (this.keepSorted || this.customSortKey) {\n let sortKey = this.customSortKey ? this.customSortKey : this.sortKey;\n items.sort((a: any, b: any) => {\n let aVal = this.getItemAttr(a, sortKey)\n ? this.getItemAttr(a, sortKey)\n : \"z\";\n let bVal = this.getItemAttr(b, sortKey)\n ? this.getItemAttr(b, sortKey)\n : \"z\";\n if (aVal < bVal) {\n return -1;\n }\n if (aVal > bVal) {\n return 1;\n }\n if (aVal == bVal) {\n return 0;\n }\n return aVal - bVal;\n });\n }\n\n if (reverse) {\n items = items.reverse();\n }\n\n resolve({\n items: items,\n categoriesObj: categoriesObj,\n });\n });\n }\n\n getPaginationLink(i: number, dontClick?: boolean, customText?: string) {\n let pageLink = document.createElement(\"a\");\n pageLink.innerHTML = customText ? customText : i as unknown as string;\n\n if (dontClick) {\n pageLink.className = \"disabled\";\n } else {\n pageLink.className = this.currentPage == i ? \"active\" : \"\";\n pageLink.onclick = () => {\n let newParams = `${this.getParam([\"page\"], true)}&page=${i}`;\n history.replaceState(null, \"\", `?${newParams}`);\n this.scrollToTopOfPage();\n this.currentPage = i;\n this.renderAll();\n };\n }\n\n return pageLink;\n }\n\n getPagination(totalItems: number, kind: string) {\n let totalPages = Math.ceil(totalItems / this.paginateItems);\n let maxPages = 5;\n let pagination = document.createElement(\"div\");\n pagination.className = `pagination ${this.paginateAlign} ${kind}`;\n\n let leftArrow = this.getPaginationLink(\n this.currentPage - 1,\n this.currentPage <= 1,\n ''\n );\n pagination.appendChild(leftArrow);\n\n let startPage: number;\n let endPage: number;\n\n if (totalPages <= maxPages) {\n startPage = 1;\n endPage = totalPages;\n } else {\n let lowerBound = Math.floor(maxPages / 2);\n let upperBound = Math.ceil(maxPages / 2) - 1;\n if (this.currentPage <= lowerBound) {\n startPage = 1;\n endPage = maxPages;\n } else if (this.currentPage + upperBound >= totalPages) {\n startPage = totalPages - maxPages + 1;\n endPage = totalPages;\n } else {\n startPage = this.currentPage - lowerBound;\n endPage = this.currentPage + upperBound;\n }\n }\n let pages = Array.from(Array(endPage + 1 - startPage).keys()).map(\n (i) => startPage + i\n );\n\n if (!pages.includes(1)) {\n pagination.appendChild(this.getPaginationLink(1));\n if (pages[0] > 2 && totalPages > maxPages) {\n let ellipse = document.createElement(\"div\");\n ellipse.innerText = \"...\";\n pagination.appendChild(ellipse);\n }\n }\n pages.forEach((page) => {\n pagination.appendChild(this.getPaginationLink(page));\n });\n if (!pages.includes(totalPages)) {\n if (totalPages - pages[pages.length - 1] > 1 && totalPages > maxPages) {\n let lastEllipse = document.createElement(\"div\");\n lastEllipse.innerText = \"...\";\n pagination.appendChild(lastEllipse);\n }\n pagination.appendChild(this.getPaginationLink(totalPages));\n }\n\n let rightArrow = this.getPaginationLink(\n this.currentPage + 1,\n this.currentPage >= totalPages,\n ''\n );\n pagination.appendChild(rightArrow);\n\n return pagination;\n }\n\n renderAll(reverse?: boolean) {\n this.itemsArea.innerHTML = ``;\n\n this.getFilteredItems(reverse).then((resolve: any) => {\n let categoriesObj = resolve.categoriesObj;\n let items = resolve.items;\n let totalItems = items.length;\n\n if (this.paginateItems > 0) {\n items = items.slice(\n (this.currentPage - 1) * this.paginateItems,\n this.paginateItems * this.currentPage\n );\n }\n\n let numItems = items.length;\n\n if (numItems === 0) {\n this.itemsArea.innerHTML = `${this.labels.noResults}
`;\n } else {\n this.itemsArea.innerHTML = ``;\n\n if (\n this.paginateItems > 0 &&\n (this.paginatePosition == \"top\" || this.paginatePosition == \"both\")\n ) {\n this.itemsArea.appendChild(this.getPagination(totalItems, \"top\"));\n }\n\n for (let i = 0; i < numItems; i++) {\n this.itemsArea.appendChild(this.getItemHTML(items[i]));\n }\n\n if (\n this.paginateItems > 0 &&\n (this.paginatePosition == \"bottom\" || this.paginatePosition == \"both\")\n ) {\n this.itemsArea.appendChild(this.getPagination(totalItems, \"bottom\"));\n }\n }\n\n if (!this.hideCategories && !this.showStaticCategory) {\n for (let cat in categoriesObj) {\n const cssClass = cat.replace(/\\./g, '');\n const catsDesk = this.domRoot.querySelector(\".categories-\" + cssClass) as HTMLElement;\n const catsMobile = this.domRoot.querySelector(\n \".categories-mobile-\" + cssClass\n );\n const catsMobContainer = document.createElement('div');\n const showCatCounts = !this.hideCategoryCounts;\n const isActive = this.activeCategories[cat].length == 0;\n\n const activeMobileLabel = this.activeCategories[cat].length == 1 ? categoriesObj[cat].options[this.activeCategories[cat][0]].label : this.activeCategories[cat].length + \" \" + this.labels.selected;\n\n const emptyMobileLabel = this.activeCategories[cat].length ? activeMobileLabel : categoriesObj[cat].emptyCategory;\n const emptyAmount = this.updateCategoryCounts\n ? totalItems\n : this.totalUnfiltered;\n\n catsDesk.innerHTML = `\n ${categoriesObj[cat].emptyCategory\n }${showCatCounts ? ` (${emptyAmount})` : ``}\n `;\n\n if (catsMobile) {\n catsMobile.innerHTML = `\n \n `;\n\n catsMobContainer.innerHTML = `\n \n \n
`;\n }\n if (isActive && this.categories[cat].toggleDefinition) {\n (this.domRoot.querySelector(\n \".category-definition-\" + cat\n ) as HTMLElement).innerHTML = this.categories[cat].defaultDefinition;\n }\n for (let option in categoriesObj[cat].options) {\n let subCat = categoriesObj[cat].options;\n let isactiveCategories =\n this.activeCategories[cat].indexOf(option) > -1;\n\n catsDesk.innerHTML += `\n \n ${subCat[option].label}${showCatCounts ? ` (${subCat[option].amount})` : ``\n }\n \n `;\n if (isactiveCategories && this.categories[cat].toggleDefinition) {\n (this.domRoot.querySelector(\n \".category-definition-\" + cat\n ) as HTMLElement).innerHTML =\n this.categories[cat].options[option].toggleDefinition;\n }\n\n if (catsMobile) {\n catsMobContainer.innerHTML += `\n \n \n \n
`;\n }\n }\n if (catsMobile) {\n catsMobile.appendChild(catsMobContainer);\n }\n }\n\n this.numResultsLabel.innerHTML = totalItems;\n this.resultsLabel.innerHTML =\n totalItems === 1 ? this.labels.result : this.labels.results;\n this.activeCategoriesLabel.innerHTML = \"\";\n let label = \"\";\n for (let active in this.activeCategories) {\n if (this.activeCategories[active].length) {\n for (let a = 0; a < this.activeCategories[active].length; a++) {\n let option = this.activeCategories[active][a];\n label += `${categoriesObj[active].options[option].label}`;\n }\n } else {\n label += `${categoriesObj[active].emptyCategory}`;\n }\n this.activeCategoriesLabel.innerHTML = label;\n }\n }\n\n this.scrollLoadImg();\n });\n }\n\n paramModal() {\n const pParamValue = this.getParam([\"p\"]);\n if (pParamValue && pParamValue.length) {\n if (!(this.isJiraTemplates)) {\n this.renderItemModal();\n } else {\n const item = this.items.find((i) => {\n return i[this.modalLinkParam] === pParamValue\n });\n let event = document.createEvent('Event');\n event.dataset = {\n templateKey: item.templateId,\n templateId: item.templateId,\n bluePrintModule: item.templateId,\n templateName: item.filterTitle,\n productKey: `${this.templatesKeys[item.filterCloudProduct]}.ondemand`\n };\n event.initEvent('productTemplateModal', true, true);\n document.body.dispatchEvent(event);\n }\n } else {\n this.closeModal({});\n }\n }\n\n renderItemModal() {\n let foundParam:string = '';\n for (let m = 0; m < this.items.length; m++) {\n if (\n this.getItemAttr(this.items[m], this.modalLinkParam) ==\n this.getParam([\"p\"])\n ) {\n foundParam = this.getItemAttr(this.items[m], this.modalLinkParam);\n this.modalContent = this.items[m];\n break;\n }\n }\n if (this.modalContent) {\n const card = this.domRoot.querySelector(`div[data-param=\"${foundParam}\"]`);\n if (card) {\n card.scrollIntoView();\n window.scrollBy(0, -150);\n }\n document.body.style.overflowY = 'hidden';\n this.modalElement.appendChild(this.getModalHTML());\n this.modalElement.querySelector('.modal-inner').focus();\n }\n this.scrollLoadImg();\n }\n\n closeModal(e: Event) {\n let modalItem = this.modalContent;\n let trackObjects: { [key: string]: string } = {\n eventContainer: \"filterModal\",\n eventComponent: \"closeModalButton\",\n cardCategories: modalItem.customSorts,\n parentLabel: this.getItemAttr(modalItem, this.ids.title),\n parentDescription: this.getItemAttr(modalItem, this.ids.description),\n };\n this.trackEvents(e.target as HTMLElement, trackObjects);\n this.modalContent = {};\n document.body.style.overflowY = \"auto\";\n this.modalElement.innerHTML = \"\";\n window.history.pushState(null, \"\", '?' + this.getParam(['p'], true));\n }\n\n launchModal(e, item, itemNode) {\n const target = e.target as HTMLElement;\n if (target.classList.contains(\"modal-pop\")) {\n itemNode.classList.remove(\"showalltags\");\n if (target.classList.contains(\"modal-pop\")) {\n window.history.pushState(null, \"\", `?${document.location.search}&p=${this.getItemAttr(item, this.modalLinkParam)}`);\n this.paramModal();\n } else if (target.getAttribute(\"data-search\")) {\n window.scrollTo(0, this.domRoot.offsetTop - 70);\n let a = new Event(\"change\");\n this.searchInput.value = decodeURIComponent(\n target.getAttribute(\"data-search\") || ''\n );\n this.searchInput.dispatchEvent(a);\n } else if (target.classList.contains(\"expandtags\")) {\n itemNode.classList.add(\"showalltags\");\n }\n }\n }\n\n getItemHTML(item: Item) {\n let itemNode = document.createElement(\"div\");\n let linkItem = this.makeItemClickable;\n let itemClass =\n this.displayStyle == \"search-grid\" ? this.gridClasses : \"xs-none-bottom\";\n let atts = ``;\n for (var i = 0; i < this.itemAttributes.length; i++) {\n if (this[this.itemAttributes[i]]) {\n atts += this[this.itemAttributes[i]](item);\n }\n }\n if (this.linkToModal) {\n itemNode.setAttribute(\n \"data-param\",\n this.getItemAttr(item, this.modalLinkParam)\n );\n\n itemNode.setAttribute(\"tabindex\", \"0\");\n itemClass += this.makeItemClickable ? \" modal-pop\" : \"\";\n itemNode.onclick = (e) => {\n console.log('is clicking')\n this.launchModal(e, item, itemNode);\n };\n itemNode.onkeyup = (e) => {\n if (document.activeElement == e.target && e.key == \"Enter\") {\n this.launchModal(e, item, itemNode);\n }\n };\n }\n itemNode.className = `pi column ${this.displayStyle} ${itemClass} ${this.showShadows ? `shadows` : ``\n } ${this.isIntegrations ? `integration` : ``}`;\n itemNode.innerHTML = `\n ${linkItem && !this.linkToModal\n ? ``\n : ``\n }\n \n ${atts}\n
\n ${linkItem && !this.linkToModal ? `` : ``}`;\n\n itemNode.addEventListener(\"click\", (e) => {\n const target = e.target as HTMLElement;\n if (\n target.tagName == \"A\" ||\n target.tagName == \"BUTTON\" ||\n target.classList.contains(\"modal-pop\")\n ) {\n let trackObjects: { [key: string]: string } = {\n eventContainer: \"filterCard\",\n cardCategories: item.customSorts,\n parentLabel: this.getItemAttr(item, this.ids.title),\n parentDescription: this.getItemAttr(item, this.ids.description),\n };\n if (this.isJiraTemplates) {\n trackObjects.product = this.getItemAttr(item, \"filterCloudProduct\");\n trackObjects.productKey = this.getItemAttr(\n item,\n \"filterCloudProduct\"\n );\n trackObjects.templateId = this.getItemAttr(item, \"templateId\");\n trackObjects.category =\n this.getItemAttr(item, \"templateId\") +\n \"_\" +\n this.getItemAttr(item, \"filterCloudProduct\").replace(/-/g, \"_\");\n }\n this.trackEvents(target, trackObjects);\n }\n });\n return itemNode;\n }\n\n getModalHTML() {\n const item = this.modalContent;\n let filterModalInner = document.createElement(\"div\");\n let filterModalOuter = document.createElement(\"div\");\n filterModalInner.innerHTML = \"\";\n\n this.modalAttributes.forEach((modalAttribute) => {\n if (this[modalAttribute]) {\n if (this[modalAttribute]() && this[modalAttribute]().then) {\n this[modalAttribute](item, null, true).then((resolve) => {\n filterModalInner.innerHTML += resolve;\n });\n } else {\n filterModalInner.innerHTML += this[modalAttribute](item, null, true);\n\n }\n }\n });\n let backingA = document.createElement(\"a\");\n let cornerClose = document.createElement(\"a\");\n cornerClose.href = \"javascript:void(0);\";\n cornerClose.className = \"corner-close\";\n backingA.onclick = (backingA) => {\n this.closeModal(backingA);\n };\n cornerClose.onclick = (cornerClose) => {\n this.closeModal(cornerClose);\n };\n cornerClose.innerText = this.labels.closeLabel;\n cornerClose.setAttribute(\"aria-label\", this.labels.closeLabel);\n let filterModalContent = document.createElement(\"div\");\n filterModalContent.className = \"filter-modal-content\";\n filterModalOuter.className = \"modal-outer\";\n filterModalInner.className = \"modal-inner\";\n filterModalInner.setAttribute(\"tabindex\", \"0\");\n filterModalContent.appendChild(backingA);\n filterModalOuter.appendChild(filterModalInner);\n filterModalOuter.appendChild(cornerClose);\n filterModalContent.appendChild(filterModalOuter);\n\n return filterModalContent;\n }\n\n customAttr(item: Item, int: number) {\n return `${this.getItemAttr(\n item,\n this.ids[\"custom\" + int]\n )}
`;\n }\n customField1(item: Item) {\n let field = this.getItemAttr(item, this.ids.customField1);\n return field\n ? `${field}
`\n : ``;\n }\n customField2(item: Item) {\n let field = this.getItemAttr(item, this.ids.customField2);\n return field\n ? `${field}
`\n : ``;\n }\n customField3(item: Item) {\n let field = this.getItemAttr(item, this.ids.customField2);\n return field\n ? `${field}
`\n : ``;\n }\n title(item: Item) {\n return `${this.getItemAttr(item, this.ids.title)}
`;\n }\n description(item: Item, isFirstSentence = true) {\n let content = this.getItemAttr(item, this.ids.description)\n ? this.getItemAttr(item, this.ids.description)\n : \"\";\n if (isFirstSentence) {\n let delimiter = /\\.(\\s|\\r|\\n|<\\/p>)/;\n let splits = content.split(delimiter);\n let splitMatch = content.match(delimiter);\n content = splits[0] + (splitMatch ? splitMatch[0] : \"\");\n }\n let el =\n content.includes(\"${content}${el}>`;\n }\n descriptionFirstSentence(item: Item) {\n return this.description(item, true);\n }\n htmlUnescaped(item: Item) {\n return `
${this.escapeHtml(\n this.getItemAttr(item, this.ids.htmlUnescaped)\n )}
`;\n }\n logo(item: Item, fullSpan: boolean) {\n let maxWide = this.logoMaxWidth ? this.logoMaxWidth : \"80px\";\n let maxTall = this.logoMaxHeight ? this.logoMaxHeight : \"80px\";\n let imageTag = `
`;\n return `\n ${this.getItemAttr(item, \"showAsBackgroundImage\") ? \"\" : imageTag}\n
`;\n }\n logoFullSpan(item: Item) {\n return this.logo(item, true);\n }\n tags(item: Item) {\n let htmls = \"\";\n let extended = \"\";\n htmls += '\";\n return htmls;\n }\n image(item: Item, fullSpan: boolean) {\n let imageTag = `
`;\n return `\n ${this.getItemAttr(item, \"showAsBackgroundImage\") ? \"\" : imageTag}\n
`;\n }\n imageFullSpan(item: Item) {\n return this.image(item, true);\n }\n link(item: Item, linkType = \"default\", isModal: boolean = false) {\n let individualLinkType = this.getItemAttr(item, \"linkType\") && this.getItemAttr(item, \"linkType\") != \"default\" ? this.getItemAttr(item, \"linkType\") : linkType;\n\n let linkLabel = this.getItemAttr(item, this.ids.linkLabel)\n ? this.getItemAttr(item, this.ids.linkLabel)\n : this.labels.linkLabel;\n\n let linkHref = this.getItemAttr(item, this.ids.link);\n\n let linkIcon = linkIconTypes[individualLinkType];\n let linkClass = linkClassTypes[individualLinkType];\n if ((linkLabel.length && linkHref.length) || (linkLabel.length && !isModal && this.makeItemClickable)) {\n var tag = (!isModal && this.makeItemClickable) ? \"span\" : \"a\";\n return `<${tag} ${this.getItemAttr(item, \"linkOpenNewTab\") ? 'target=\"_blank\"' : \"\"\n } href=\"${linkHref}\" class=\"doNotAutoTrack item-link button ${linkClass}\">${linkLabel}${linkIcon}${tag}>`;\n }\n return \"\";\n }\n linkArrow(item: Item, linkType = \"arrow\", isModal: boolean = false) {\n return this.link(item, linkType, isModal);\n }\n linkArrowOut(item: Item, linkType = \"arrowout\", isModal: boolean = false) {\n return this.link(item, linkType, isModal);\n }\n linkVideo(item: Item, linkType = \"video\", isModal: boolean = false) {\n return this.link(item, linkType, isModal);\n }\n linkPrimary(item: Item, linkType = \"buttonprimary\", isModal: boolean = false) {\n return this.link(item, linkType, isModal);\n }\n linkSecondary(item: Item, linkType = \"buttonsecondary\", isModal: boolean = false) {\n return this.link(item, linkType, isModal);\n }\n extraLink2(item: Item) {\n if (this.getItemAttr(item, \"extraLink2URL\") && this.getItemAttr(item, \"extraLink2Label\")) {\n return ``;\n } else {\n return \"\";\n }\n }\n extraLink3(item: Item) {\n if (this.getItemAttr(item, \"extraLink3URL\") && this.getItemAttr(item, \"extraLink3Label\")) {\n return ``;\n } else {\n return \"\";\n }\n }\n dateLabel(item: Item) {\n return `${this.getItemAttr(item, this.ids.dateLabel)}
`;\n }\n category(item: Item) {\n let activeCategory = \"\";\n for (var act in this.activeCategories) {\n if (item[act]) {\n let itemAct = item[act];\n let identifier = itemAct[0].key ? itemAct[0].key : itemAct[0];\n activeCategory = this.categories[act].options[identifier]\n ? this.categories[act].options[identifier].label\n : \"\";\n for (var f in itemAct) {\n let catIdent = itemAct[f].key ? itemAct[f].key : itemAct[f];\n if (this.activeCategories[act].indexOf(itemAct[f]) > -1) {\n activeCategory = this.categories[act].options[catIdent].label;\n break;\n }\n }\n break;\n }\n }\n return `${activeCategory}
`;\n }\n customCategory(item: Item | {} = {}) {\n let cat = item[this.ids.customCategoryKey]\n ? item[this.ids.customCategoryKey][0]\n : \"\";\n let correspondingCat = this.categories[this.ids.customCategoryKey];\n return cat\n ? `${correspondingCat && correspondingCat.options[cat]\n ? correspondingCat.options[cat].label\n : cat\n }
`\n : ``;\n }\n customCategory2(item: Item | {} = {}) {\n let cat = item[this.ids.customCategory2Key]\n ? item[this.ids.customCategory2Key][0]\n : \"\";\n let correspondingCat = this.categories[this.ids.customCategory2Key];\n return cat\n ? `${correspondingCat && correspondingCat.options[cat]\n ? correspondingCat.options[cat].label\n : cat\n }
`\n : ``;\n }\n customCategoryAll(item: Item | {} = {}) {\n let cats = item[this.ids.customCategoryAllKey];\n let correspondingCat = this.categories[this.ids.customCategoryAllKey];\n return cats\n ? `${cats\n .map((cat) => {\n let label = correspondingCat && correspondingCat.options[cat]\n ? correspondingCat.options[cat].label\n : cat\n return `${label}`;\n })\n .join(\"\")}
`\n : ``;\n }\n shareButton(item: Item | {} = {}) {\n return `\n \n \n \n
`;\n }\n bitbucketPipe(item: Item) {\n return new Promise((resolve) => {\n if (item) {\n fetch(\n `https://bitbucket.org/${item.repositoryPath}/raw/${item.version}/README.md`\n )\n .then((response) => response.text())\n .then(async (data) => {\n\n var markedData = `${item.version}
`;\n markedData += md.render(data);\n var matches = markedData.match(\n /([\\s\\S]*?)<\\/code>/gm\n );\n if (matches) {\n for (var i = 0; i < matches.length; i++) {\n var matched = matches[i]\n .replace('', \"\")\n .replace(\"
\", \"\");\n var styledMarkedData = this.escapeHtml(matched);\n markedData = markedData.replace(matched, styledMarkedData);\n }\n }\n markedData += `
`;\n resolve(markedData);\n });\n }\n });\n }\n\n productTemplatesModal(item: Item) {\n let product: string = this.getItemAttr(item, \"filterCloudProduct\")\n .toString()\n .toLowerCase()\n .replace(/-/g, \"\");\n let modalContent = this[\"templatesModal_\" + product];\n return modalContent;\n }\n\n templateSelectorButton(item: Item) {\n let productName = this.getItemAttr(item, \"filterCloudProduct\");\n let linkProduct = this.templatesKeys[productName]\n ? this.templatesKeys[productName]\n : productName;\n let productKey = `${linkProduct}.ondemand`;\n let isModalLink =\n this.isLoggedIn && this.sitesProducts.includes(productKey);\n const continueUrl = encodeURIComponent(`${window.location.href.split(/[?#]/)[0]}?p=${item.uuid}`);\n let tryButton =\n linkProduct !== \"devops\"\n ? ``\n : ``;\n\n return tryButton;\n }\n\n templateSelectorButtons(item: Item) {\n let linkLabel = this.getItemAttr(item, this.ids.linkLabel)\n ? this.getItemAttr(item, this.ids.linkLabel)\n : this.labels.linkLabel;\n return ``;\n }\n\n product(item: Item) {\n return `${productNames[this.getItemAttr(item, \"filterCloudProduct\")]\n }
`;\n }\n\n copyToClipboard(copyButton: HTMLElement) {\n let modalItem = this.modalContent;\n let trackObjects: { [key: string]: string } = {\n eventContainer: \"filterModal\",\n eventComponent: \"copyShareLinkButton\",\n cardCategories: modalItem.customSorts,\n parentLabel: this.getItemAttr(modalItem, this.ids.title),\n parentDescription: this.getItemAttr(modalItem, this.ids.description),\n };\n let textSelect = copyButton.previousElementSibling as HTMLInputElement;\n textSelect.select();\n document.execCommand(\"copy\");\n copyButton.innerHTML = this.labels.copied;\n this.trackEvents(copyButton, trackObjects);\n setTimeout(() => {\n copyButton.innerHTML = this.labels.copyLabel;\n }, 3000);\n }\n\n scrollLoadImg() {\n let winTop = window.scrollY;\n let winBot = window.innerHeight;\n let winVis = winTop + winBot;\n let unLoaded = document.querySelectorAll(\"[data-lz], [data-lz-bg]\") as unknown as HTMLImageElement[];\n\n if (unLoaded.length) {\n for (let l = 0; l < unLoaded.length; l++) {\n let itemTop = this.offsetTopFind(unLoaded[l], 0);\n let itemHeight = itemTop + unLoaded[l].offsetHeight;\n if (\n this.modalContent !== false ||\n (itemTop < winVis && itemHeight > winTop)\n ) {\n let dataAttr = unLoaded[l].getAttribute(\"data-lz-bg\")\n ? \"data-lz-bg\"\n : \"data-lz\";\n let src = unLoaded[l].getAttribute(dataAttr) as string;\n unLoaded[l].removeAttribute(dataAttr);\n if (dataAttr == \"data-lz-bg\") {\n unLoaded[l].style.backgroundImage = `url(${src})`;\n } else {\n unLoaded[l].src = src;\n }\n }\n }\n }\n }\n\n offsetTopFind(el: HTMLElement, withHeight = 0) {\n let yPosition = withHeight;\n while (el.offsetParent as HTMLElement !== null) {\n yPosition += el.offsetTop;\n el = el.offsetParent as HTMLElement;\n }\n return yPosition;\n }\n\n getItemAttr(item: Item, identifier: string) {\n if (item) {\n let syncData: Object | string = item;\n let keyVal = \"\";\n identifier = identifier.toString();\n let idKeys = identifier.split(\".\");\n while (idKeys.length > 0) {\n keyVal = idKeys[0];\n syncData = syncData && syncData[keyVal] ? syncData[keyVal] : \"\";\n idKeys.shift();\n }\n if (typeof syncData == \"boolean\") {\n syncData = syncData.toString();\n }\n return syncData;\n }\n return false;\n }\n\n escapeHtml(content: string) {\n return content\n .replace(/"(.*?)"/g, '"$1"')\n .replace(/'(.*?)'/g, \"'$1'\")\n .replace(/# (.*?)(\\r|\\n)/g, '# $1$2')\n .replace(\n /^(\\s*)(\\- ){0,1}([^#:]*?)(:|\\n|\\r)/gm,\n '$1$2$3$4'\n )\n .replace(/ /g, \" \")\n .replace(/(\\n+)/g, \"
\");\n }\n\n slugify(label: string = \"\") {\n return label\n .toString()\n .toLowerCase()\n .replace(/[^a-z0-9]/g, \"\");\n }\n\n getParam(paramsArray: any[], getAllExcept?: boolean) {\n let query = window.location.search.substring(1).replace(/\\?/g, \"\");\n let vars = query.split(\"&\");\n let returner: any = false;\n let newString = [];\n for (let i = 0; i < vars.length; i++) {\n let pair = vars[i].split(\"=\");\n if (getAllExcept && pair[0] && !paramsArray.includes(pair[0])) {\n newString.push(`${pair[0]}=${pair[1]}`);\n } else if (paramsArray.includes(pair[0])) {\n vars.splice(i, 1);\n returner = pair[1];\n }\n }\n return getAllExcept ? newString.join(\"&\") : returner;\n }\n\n resetOtherCategories(current: string) {\n for (var cat in this.activeCategories) {\n if (cat != current) {\n this.activeCategories[cat] = [];\n }\n }\n }\n\n trackEvents(target: HTMLElement, additionalProps?: any) {\n if (target) {\n let trackingBase: { [key: string]: any } = {\n eventComponent: \"linkButton\",\n activeCategories: this.activeCategories,\n label: target.innerText,\n };\n for (var key in additionalProps) {\n if (additionalProps.hasOwnProperty(key))\n trackingBase[key] = additionalProps[key];\n }\n trackEvent(additionalProps && additionalProps.event ? additionalProps.event : \"clicked\", trackingBase);\n }\n }\n}\n"],"names":["i","md","markdownIt","highlight","str","lang","hljs","value","__","productNames","devops","confluence","svgs","linkClassTypes","linkIconTypes","FilterSortSearch","domRoot","params","isDebugMode","document","createElement","this","items","itemsArr","categories","itemsArea","querySelector","clearInput","searchInput","displayButtons","getElementsByName","numResultsLabel","resultsLabel","categoriesContainers","querySelectorAll","activeCategoriesLabel","showAllButton","hideSearch","updateCategoryCounts","hideCategories","hideCategoryCounts","showStaticCategory","featuredPagesSize","labels","itemAttributes","attributesArray","modalAttributes","modalAttributesArray","showShadows","makeItemClickable","isIntegrations","gridClasses","linkToModal","modalLinkParam","scrollUpToTopOnCategoryClick","logoMaxWidth","logoMaxHeight","useJSON","totalUnfiltered","length","activeCategories","paginateItems","Number","paginatePosition","paginateAlign","isJiraTemplates","includes","templatesLinkButtonText","templatesModal_confluence","templatesModalConfluence","templatesModal_jirasoftware","templatesModalJiraSoftware","templatesModal_jiraservicemanagement","templatesModalJiraServiceManagement","templatesModal_jiraworkmanagement","templatesModalJiraWorkManagement","templatesTryLink","linkLabel","ids","title","titleFieldId","description","descriptionFieldId","htmlUnescaped","htmlUnescapedFieldId","logo","logoFieldId","image","imageFieldId","link","linkFieldId","dateLabel","dateFieldId","linkLabelFieldId","customField1","customField1Id","customField2","customField2Id","customField3","customField3Id","customCategoryKey","customCategory2Key","customCategoryAllKey","keepSorted","sortKey","sortKeyParsed","replace","window","location","search","hamletUser","then","isLoggedIn","sitesProducts","sortSiteData","renderAll","body","appendChild","modalElement","scrollLoadImg","getParam","decodeURIComponent","addEventListener","history","replaceState","forEach","handler","scrollToTopOfPage","currentPage","newParams","encodeURIComponent","e","target","trackEvents","event","eventComponent","eventContainer","searchValue","isNaN","Array","from","catContainer","parseFilterItem","activeDismissHandler","dismissHandler","categoryKey","referenceCat","urlStartingDefault","startingDefault","defaultOption","split","urlSubCat","options","push","concat","categoriesMobileArea","stopImmediatePropagation","hasAttribute","classList","contains","remove","activeDropdown","add","focus","d","displayStyle","copyToClipboard","closeModal","tagName","modalItem","modalContent","trackObjects","cardCategories","customSorts","parentLabel","getItemAttr","parentDescription","key","fetch","jsonURL","response","json","data2","data","jsonPath","searchString","toLowerCase","toString","paramModal","showingFeatured","toggle","collapser","resetter","act","sorter","allSort","customSortKey","dataset","sortDir","onload","activeMenu","getElementsByClassName","offsetParent","lastChild","isActive","parentNode","category","getAttribute","subCat","filterType","resetOthers","indexCat","indexOf","splice","joinedCats","join","resetOtherCategories","clickedCategory","clickedSubCategory","type","array","site","scrollIntoView","behavior","block","categoriesObj","item","sideCat","cat","b","identifier","amount","slugify","reverse","JSON","parse","stringify","searchInputValue","Promise","resolve","featuredItems","slice","filter","a","headerBeginner","unsortedCategories","u","Object","keys","itemCat","slug","label","getCategoryAmounts","every","some","c","matchLabel","itemCatMatcher","sort","aVal","bVal","dontClick","customText","pageLink","innerHTML","className","onclick","totalItems","kind","totalPages","Math","ceil","pagination","startPage","endPage","leftArrow","getPaginationLink","lowerBound","floor","maxPages","upperBound","pages","map","ellipse","innerText","page","lastEllipse","rightArrow","getFilteredItems","numItems","noResults","getPagination","getItemHTML","cssClass","catsDesk","catsMobile","catsMobContainer","showCatCounts","activeMobileLabel","selected","emptyMobileLabel","emptyCategory","emptyAmount","option","toggleDefinition","defaultDefinition","isactiveCategories","result","results","active","pParamValue","find","createEvent","templateKey","templateId","bluePrintModule","templateName","filterTitle","productKey","templatesKeys","filterCloudProduct","initEvent","dispatchEvent","renderItemModal","foundParam","m","card","scrollBy","style","overflowY","getModalHTML","pushState","itemNode","scrollTo","offsetTop","Event","linkItem","itemClass","atts","setAttribute","console","log","launchModal","onkeyup","activeElement","product","filterModalInner","filterModalOuter","modalAttribute","backingA","cornerClose","href","closeLabel","filterModalContent","int","field","substring","isFirstSentence","content","delimiter","splits","splitMatch","match","el","escapeHtml","fullSpan","maxWide","maxTall","imageTag","htmls","extended","t","tags","comma","buttonHTML","linkType","isModal","individualLinkType","linkHref","linkIcon","linkClass","tag","linkArrow","activeCategory","itemAct","f","catIdent","correspondingCat","cats","shareLabel","origin","pathname","copyLabel","repositoryPath","version","text","markedData","render","matches","matched","styledMarkedData","productName","linkProduct","isModalLink","continueUrl","uuid","templateSelectorButton","copyButton","previousElementSibling","select","execCommand","copied","setTimeout","winTop","scrollY","winVis","innerHeight","unLoaded","l","itemTop","offsetTopFind","itemHeight","offsetHeight","dataAttr","src","removeAttribute","backgroundImage","withHeight","yPosition","syncData","keyVal","idKeys","shift","paramsArray","getAllExcept","vars","returner","newString","pair","current","additionalProps","trackingBase","hasOwnProperty","trackEvent"],"sourceRoot":""}