PageSourceSearch

https://www.hotelmanagement-network.com/wp-content/plugins/gd-open…/js/gd-opensearch-public.js?ver=1790252241

js hotelmanagement-network.com collected 2026-09-24 18:36:07 UTC 22,194 bytes, 635 lines download raw bytes

1var ajax_url_p = '';
2var urls = []
3
4if (window.location.href.indexOf('/data-insights/') != -1) {
5	var facet_index = 1;
6	} else {
7		var facet_index = 0;
8	}
9
10
11// generate slugs
12function slugify(data) {
13	return (data).toLowerCase().replace(/[^a-z0-9]+/g, '-');
14}
15
16// fix image lazyload issue after ajax
17function lazyImg() {
18	jQuery('#solr-search-results img').each(function () {
19		var src = jQuery(this).data('src');
20		// Use .data() method to get the data-src attribute
21		if (src) {
22			jQuery(this).attr('src', src).removeData('src');
23			// Set src attribute and remove data-src attribute
24		}
25	});
26}
27
28// Build fancytree format json from inputjson
29function buildfancytreejson(inputData) {
30	const data = [];
31	if (inputData == null) {
32		console.log('null');
33		return [];
34	}
35	inputData.forEach(item => {
36		const keys = item.key.split('->');
37		let parent = data;
38		let level = 1;
39		keys.forEach((key, index) => {
40			const existingNode = parent.find(node => node.title === key && node.level === level);
41			if (!existingNode) {
42				const newNode = {
43					title: key,
44					expanded: false,
45					folder: false,
46					key: `${slugify(key)}_${level}_${index}`,
47					facetName: key
48				};
49				if (index === keys.length - 1) {
50					newNode.doc_count = item.doc_count;
51				}
52				newNode.level = level;
53				parent.push(newNode);
54				parent = newNode.children = newNode.children || [];
55			} else {
56				parent = existingNode.children;
57			}
58			level++;
59		});
60	});
61	return data;
62}
63
64// Fetch facets from url and populate the facets selection
65function loadFacetsfromUrl() {
66	const urlParams = new URLSearchParams(window.location.search);
67	const facetValues = {};
68	urlParams.forEach((value, key) => {
69		if (key.includes('selected_facets')) {
70			const facetParts = value.split(':');
71			const facetType = facetParts[0];
72			const facetValue = facetParts[1];
73			if (!facetValues[facetType]) {
74				facetValues[facetType] = [];
75			}
76			facetValues[facetType].push(facetValue);
77		}
78	});
79	Object.keys(facetValues).forEach(facetType => {
80		if ((facetType != 'publication_date_str') || facetType != 'undefined') {
81			console.log(facetType);
82			facetValues[facetType].forEach(facetValue => {
83				var fancy_id = jQuery('#' + facetType + '_fancy');
84				if(fancy_id.length > 0){
85
86				var allKeys = jQuery.map(jQuery('#' + facetType + '_fancy').fancytree('getRootNode').getChildren(), function (node) {
87					console.log(node.data['facetName'])
88					console.log(facetValue)
89					if (node.data['facetName'] == facetValue) {
90						node.setSelected(true);
91					}
92				});
93			}
94			});
95		}
96	})
97}
98
99
100
101
102// reload fancytree after ajax with latest facetsdata
103function reloadFancyTree(treeId, treeDataArray) {
104	var tree = jQuery('#' + treeId).fancytree('getTree');
105	var selectedNodes = tree.getSelectedNodes();
106	selectedNodes.forEach(function (node) {
107	});
108	tree.reload(buildfancytreejson(treeDataArray));
109	jQuery("a.fancytree-header").show(); // show the facet headers by default
110	if (treeDataArray == null) {
111		var tree_class = treeId.replace('_fancy', '');
112		jQuery('a[data-toggle=' + tree_class + ']').hide();
113	}
114	selectedNodes.forEach(function (node) {
115		var currentNode = tree.getNodeByKey(node.key);
116		if (currentNode) {
117			currentNode.setSelected(true);
118		}
119	});
120}
121jQuery(document).ready(function () {
122	
123	//updatePubdatePrice();
124	getserach_by_value();
125	setTimeout(() => {
126		loadFacetsfromUrl();
127	}, 500);
128	
129	const urlParams = new URLSearchParams(window.location.search);
130	var paramValue = urlParams.get('search_sort');
131	if (paramValue === null) {
132		paramValue = 'sort_by_relevancy_desc';
133	}
134
135
136});
137
138
139// Ajax function on facets selection/deselection
140jQuery(document).on('click', '.ui-fancytree li .fancytree-checkbox', function () {
141	//alert(123);
142	var facet_name = jQuery(this).closest('li').attr('data-os-facet-data')
143	var industry_type = jQuery(this).closest('li').attr('data-os-industry_type')
144	if(facet_name == ''){
145		jQuery(".clear_filters_"+industry_type).css("display", "none")
146	}else{
147		jQuery(".clear_filters_"+industry_type).css("display", "block")
148	}
149
150	var selected_chekbox_facet = jQuery(this).closest('li').attr('aria-selected');
151	if(selected_chekbox_facet == "true"){
152		jQuery(".no_filters_"+industry_type).css("display", "none")
153	} else {
154		jQuery(".no_filters_"+industry_type).css("display", "block")
155	}
156
157	data_refresh_after_ajax(industry_type, facet_name)
158});
159
160// Function to pass dynamic params to url without reloading the page
161function setQueryStringParameter(name, value, append = false) {
162	const url = new URL(window.location.href);
163	const params = url.searchParams;
164	if (params.has(name)) {
165		params.set(name, value);
166	} else if (append) {
167		params.append(name, value);
168	} else {
169		params.set(name, value);
170	}
171	window.history.replaceState(null, "", url.toString());
172}
173// Ajax function - Send ajax call with current page url and refresh search/pagination/facets
174function ajaxReq(page_url) {
175	var search_results_div = jQuery("#solr-search-results");
176	jQuery(search_results_div).css('position', 'relative');
177	var overlay = jQuery("<div class='overlay-search'></div>").css({
178		'position': 'absolute',
179		'top': 0,
180		'left': 0,
181		'width': '100%',
182		'height': '100%',
183		'background': 'rgba(255, 255, 255, 0.7)',
184		'z-index': 999999
185	}).appendTo(search_results_div);
186	jQuery('.filter-criteria').removeClass('is-open');
187	jQuery.ajax({
188		url: page_url,
189		dataType: 'html',
190		success: function (response) {
191			jQuery('.res_info').html(jQuery(response).find('.res_info').html())
192			// update pagination block
193			jQuery('.fancytree-render-js').html(jQuery(response).find('.fancytree-render-js').html())
194			// update facets html
195			jQuery('#solr-search-results').html(jQuery(response).find('#solr-search-results').html())
196			// update search results div
197
198			var primary_facet = jQuery('.span-l a i').attr('data-industry');
199			console.log(primary_facet)
200			
201			// var themes_tree = jQuery("#themes_str_fancy").fancytree("getTree");
202			// themes_tree.visit(function (node) {
203			// 		console.log(node.count);
204			// });
205
206			overlay.remove();
207			setTimeout(function () {
208				lazyImg();
209				if (window.location.href.indexOf('/data-insights/') != -1) {
210				
211					reloadFancyTree('_company_name_str_fancy', _company_name_str_arr);
212					reloadFancyTree('_disease_name_str_fancy', _disease_name_str_arr);
213					reloadFancyTree('_drug_name_str_fancy', _drug_name_str_arr);
214					reloadFancyTree('themes_insights_str_fancy', themes_insights_str_arr);
215	
216	
217				} else {
218					reloadFancyTree('categories_str_fancy', categories_str_arr);
219					reloadFancyTree('type_fancy', type_arr);
220					reloadFancyTree('sector_str_fancy', sector_str_arr);
221					reloadFancyTree('region_str_fancy', region_str_arr);
222				}
223	
224				//	updatePubdatePrice();
225				// fix image lazyload
226				console.log('lazy loaded images')
227			}, 100);
228			if (parseInt(jQuery('.res_info strong:first').text().trim()) == 0 || parseInt(j
228Query('.res_info strong:nth-child(2)').text().trim()) == 0) {
229				jQuery('.nodata-insights').css("display", "block")
230				jQuery('.nodata-insights').html('No Data Found')
231			}
232
233			if (parseInt(jQuery('.res_info strong:first').text().trim()) == parseInt(jQuery('.res_info strong:nth-child(2)').text().trim())) {
234				//setTimeout(function() {
235				jQuery('.search_page_loadmore .insights_loadmore').hide()
236
237				jQuery('#load-more-archives, #load-more-insights').hide()
238				//}, 100);
239			} else {
240				jQuery('.search_page_loadmore .insights_loadmore').show()
241				jQuery('#load-more-archives, #load-more-insights').show()
242			}
243			
244		},
245		error: function () {
246			overlay.remove();
247		}
248	});
249}
250
251// Pagination Click - Ajax
252jQuery(document).on('click', '.pg-pagination-prev,.pg-pagination-next', function (e) {
253	e.preventDefault()
254	var page_url = jQuery(this).find('a').attr('href')
255	window.history.replaceState(null, null, page_url);
256	ajaxReq(page_url);
257})
258
259// Sort by relevancy - Ajax
260jQuery(document).on('change', '#DDPMenupg-ddp-sort', function (e) {
261	e.preventDefault()
262	var sort_param = jQuery(this).val()
263	var sort_param_text = jQuery(this).find('span').text()
264	console.log(sort_param)
265	if (sort_param == 'sort_by_relevancy_desc') {
266		var page_url = window.location.href + '&search_sort='
267	} else {
268		var page_url = window.location.href + '&search_sort=' + sort_param.toString()
269	}
270	if (window.location.href.indexOf('search_sort') != -1) {
271		const urlParams1 = new URLSearchParams(window.location.search);
272
273		// console.log("sort "+urlParams1)
274		for (let key of urlParams1.keys()) {
275			console.log("keys " + key)
276			// if (urlParams1.get(key).includes('search_sort')) {
277			if (key == 'search_sort') {
278				console.log("Key containing 'date': " + key);
279				setQueryStringParameter(key, sort_param, false)
280				jQuery('.sort-by-text').text(sort_param_text)
281				jQuery('#pg-ddp-sort').removeClass('is-open')
282			}
283		}
284	} else {
285		jQuery('.sort-by-text').text(sort_param_text)
286		jQuery('#pg-ddp-sort').removeClass('is-open')
287		window.history.replaceState(null, null, page_url);
288	}
289	// window.history.replaceState(null, null, page_url);
290	ajaxReq(page_url)
291})
292
293// Per page - Ajax
294jQuery(document).on('click', '#load-more-archives,#load-more-insights', function (e) {
295	e.preventDefault()
296	var urlParams = new URLSearchParams(window.location.search)
297
298	//var per_page = '';
299	if (window.location.href.indexOf('per_page') == -1) {
300		var per_page = 30;
301		var page_url = window.location.href + '&per_page=' + per_page
302		page_url = page_url.replace(/\/page\/\d+\//, '/')
303		console.log("new " + page_url.replace(/\/page\/\d+\//, '/'))
304		window.history.replaceState(null, null, page_url);
305
306	} else if (window.location.href.indexOf('per_page') != -1) {
307		const urlParams1 = new URLSearchParams(window.location.search);
308		var per_page = parseInt(urlParams.get('per_page')) + 10
309		// console.log("sort "+urlParams1)
310		for (let key of urlParams1.keys()) {
311			console.log("keys " + key)
312			// if (urlParams1.get(key).includes('search_sort')) {
313			if (key == 'per_page') {
314				console.log("Key containing 'date': " + key);
315				setQueryStringParameter(key, per_page, false)
316			}
317		}
318
319		var page_url = window.location.href
320	} else {
321		var page_url = window.location.href + '&per_page=' + per_page
322		window.history.replaceState(null, null, page_url);
323
324	}
325	// window.history.replaceState(null, null, page_url);
326	ajaxReq(page_url)
327})
328//show fancytree reset button on keyup
329jQuery(document).on('keyup', '#inline-search', function () {
330	if (jQuery(this).val() == '') {
331		jQuery(this).closest(".js-geo-tree").find('.fancytree-reset').hide()
332	} else {
333		jQuery(this).closest(".js-geo-tree").find('.fancytree-reset').show()
334	}
335});
336
337//search box in facets
338jQuery(document).on('input', '.fancytree-search', function () {
339	var searchString = jQuery(this).val();
340	jQuery(this).closest(".fancytree-view").find('ul li').each(function (index, value) {
341		var currentName = jQuery(value).text()
342		if (currentName.toUpperCase().indexOf(searchString.toUpperCase()) > -1) {
343			jQuery(value).show();
344			jQuery(this).find('[aria-hidden="true"]').csss('display', 'block');
345			// jQuery('.wpsolr_facet_scroll [aria-hidden="true"]').css('display', 'block');ssss
346		} else {
347			jQuery(value).hide();
348		}
349	});
350});
351
352// Search within facets data in Fancytree
353function getserach_by_value() {
354	jQuery(".fancytree-search").on("keyup", function (e) {
355		var match = jQuery(this).val();
356		var fancytree_id = jQuery(this).closest(".fancytree-holder").find(".fancytree-view").attr('id');
357		var tree = jQuery.ui.fancytree.getTree("#" + fancytree_id);
358		tree.filterNodes(function (node) {
359			var n_title = node.data.facetName
360			node.title = n_title + "<span class= 'count'>(" + node.data.doc_count + ")</span>";
361			return !match || node.title.toLowerCase().indexOf(match.toLowerCase()) > -1;
362		});
363		// tree.filterNodes(function (node) {
364		// 	var n_title = node.data.facetName
365		// 	if (node.data.doc_count) {
366		// 		node.title = n_title + "<span class= 'count'>(" + node.data.doc_count + ")</span>";
367		// 	}
368		// 	return !match || node.title.toLowerCase().indexOf(match.toLowerCase()) > -1;
369		// });
370		if (match === '') {
371			jQuery(this).closest(".fancytree-holder").find('.input-group-button .fancytree-reset').hide();
372			// Visit all nodes and collapse them
373			tree.visit(function (node) {
374				node.setExpanded(false);
375			});
376		} else {
377			jQuery(this).closest(".fancytree-holder").find('.input-group-button .fancytree-reset').show();
378		}
379		// Define the custom sorting function
380		function sortChildren(a, b) {
381			var aDocCount = a.data.doc_count || 0;
382			var bDocCount = b.data.doc_count || 0;
383			return bDocCount - aDocCount;
384		}
385
386		// Get the root node of the Fancytree
387		var rootNode = tree.getRootNode();
388		// Sort the children of the root node using the custom sorting function
389		rootNode.sortChildren(sortChildren, true);
390	});
391}
392// Search within facets data in Fancytree
393jQuery(".fancytree-search").on("keyup", function (e) {
394	var match = jQuery(this).val().trim();
395	var fancytree_id = jQuery(this).closest(".fancytree-holder").find(".fancytree-view").attr('id')
396	// console.log("fancytree_id - " + fancytree_id)
397	var tree = jQuery.ui.fancytree.getTree("#" + fancytree_id);
398	tree.filterNodes(function (node) {
399		// console.log(node);
400		// if (node.data.facetName.indexOf('_') != -1) {
401		// 	var n_title = node.data.facetName.split('_')[0]
402		// }
403		// else {
404		var n_title = node.data.facetName
405		// }
406		if (node.data.doc_count) {
407			node.title = n_title + "<span class= 'count'>(" + node.data.doc_count + ")</span>";
408		}
409		return !match || node.title.toLowerCase().indexOf(match.toLowerCase()) > -1;
410	});
411	if (match == '') {
412		jQuery(this).closest(".fancytree-holder").find('.input-group-button .fancytree-reset').hide()
413		// Visit all nodes and collapse them
414		tree.visit(function (node) {
415			node.setExpanded(false);
416		});
417	} else {
418		jQuery(this).closest(".fancytree-holder").find('.input-group-button .fancytree-reset').show()
419	}
420});
421//empty search box on click of reset button and show all industries
422jQuery(document).on('click', '.fancytree-reset', function (e) {
423	var fancytree_id = jQuery(this).closest(".fancytree-holder").find(".fancytree-view").attr('id')
424	var tree = jQuery.ui.fancytree.getTree("#" + fancytree_id);
425	jQuery(this).closest(".fancytree-holder").find(".fancytree-search").val('').change()
426	tree.clearFilter();
427	jQuery(this).css("display", 'none');
428})
429
430// Search query with existing params
431jQuery("form#solr_facet").submit(function (e) {
432	// jQuery.blockUI();
433	// document.querySelector('.overlay').style.display = 'block';
434	e.preventDefault();
435	var arr = window.location.href.split('&').slice(1).join('&');
436	if (arr) {
437		arr = "&" + arr;
438	} else {
439		arr = '';
440	}
441	var url = window.location.href;
442	var searchdata = jQuery('#main_search_field').val();
443	if (searchdata && url.includes("title=true")) {
444		window.location.href = "/store/?s=" + encodeURIComponent(searchdata) + "&title=true";
445	} else if (searchdata) {
446		window.location.href = "/store/?s=" + encodeURIComponent(searchdata);
447	} else {
448		window.location.href = "/store/?s=" + arr;
449	}
450});
451
452// Grid and List View
453jQuery("#DDPMenupg-ddp-view li a").click(function (e) {
454	var view = jQuery(this).attr('id')
455	jQuery('#DDPMenupg-ddp-view').attr('sel-view', view)
456	if (view == 'grid-view-search') {
457		jQuery('.cell1').hide()
458		jQuery('.grid-only').show()
459		jQuery('.list-result-title').hide()
460		jQuery('.grid-result-title').show()
461		jQuery('.search-results-container ul').addClass('row-up rule row-medium-up-2 fixed grid-view')
462		jQuery('.search-results-container ul .cell1').removeClass('medium-3').addClass('medium-12')
463		jQuery('.search-results-container ul .cell2').removeClass('medium-9').addClass('medium-12')
464	} else {
465		jQuery('.cell1').show()
466		jQuery('.grid-only').hide()
467		jQuery('.grid-result-title').hide()
468		jQuery('.list-result-title').show()
469		jQuery('.search-results-container ul').removeClass('row-up rule row-medium-up-2 fixed grid-view')
470		jQuery('.search-results-container ul .cell1').addClass('medium-3').removeClass('medium-12')
471		jQuery('.search-results-container ul .cell2').addClass('medium-9').removeClass('medium-12')
472	}
473});
474
475// Update refinemenets selection after ajax
476function add_refinements() {
477	console.log("add_refinements")
478	lazyImg();
479	setTimeout(function () {
480		if (jQuery('.refinements-count span').text() == 0) {
481			jQuery('.refinements-count').hide()
482		}
483	}, 10);
484	const urlParams = new URLSearchParams(window.location.search);
485	const facetValues = {};
486	jQuery('#SearchBar').show()
487	jQuery('.refine-option').show()
488	jQuery('.refinements-count').show()
489	var sum = 1;
490	urlParams.forEach((value, key) => {
491		if (key.includes('selected_facets')) {
492			const facetParts = value.split(':');
493			const facetType = facetParts[0];
494			const facetValue = facetParts[1];
495			if (!facetValues[facetType]) {
496				facetValues[facetType] = [];
497			}
498			facetValues[facetType].push({
499				facetValue
500			});
501		}
502	});
503	console.log("fecet are doing:"+facetValues);
504	jQuery.each(facetValues, function (index, item) {
505		jQuery('.' + index + '-span').empty()
506		jQuery('.refinements-count span').text()
507		jQuery.each(item, function (idx, it) {
508			var node_name = it.facetValue
509			jQuery('.' + index + '-name').show()
510			if (index == '_price_f') {
511				var face_name = 'jQuery' + it.facetValue.replace('-', ' - jQuery')
512				jQuery('.' + index + '-span').append('<a class="button option"><span>' + face_name + '</span><i class="gd-ico gd-close" data-title="' + it.facetValue + '" data-industry="' + index + '" onclick="remove_refinements(\'' + index + '\', \'' + node_name + '\')"></i></a>');
513			} else if (index == 'publication_date_str') {
514				console.log(it);
515				var face_name = jQuery("[data-os-facet-data='" + it.facetValue + "']").find('.fancytree-node .fancytree-title').text()
516				jQuery('.' + index + '-span').append('<a class="button option"><span>' + face_name + '</span><i class="gd-ico gd-close" data-title="' + it.facetValue + '" data-industry="' + index + '" onclick="remove_refinements(\'' + index + '\', \'' + node_name + '\')"></i></a>');
517			} else {
518				jQuery('.' + index + '-span').append('<a class="button option"><span>' + it.facetValue + '</span><i class="gd-ico gd-close" data-title="' + it.facetValue + '" data-industry="' + index + '" onclick="remove_refinements(\'' + index + '\', \'' + node_name + '\')"></i></a>');
519			}
520			jQuery('.refinements-count span').text(sum)
521			sum++
522		})
523	})
524}
525
526// Remove refinements
527function remove_refinements(facetType_r, facetValue_r) {
528	var refines_count = jQuery('.refinements-count span').text()
529	var allKeys = jQuery.map(jQuery('#' + facetType_r + '_fancy').fancytree('getRootNode').getChildren(), function (node) {
530		if (facetType_r != '_price_f') {
531			node.setSelected(false);
532			jQuery('[data-title="' + facetValue_r + '"]').closest('a').remove()
533			// refines_count = parseInt(refines_count) - 1
534		}
535		return node;
536	});
537	if (facetType_r == '_price_f') {
538		jQuery.each(allKeys, function (event, data) {
539			data.setSelected(false);
540			if (data.title == 'jQuery0-*') {
541				data.setSelected(true);
542				jQuery('[data-title="' + facetValue_r + '"]').closest('a').remove()
543				facetValue_r = 'jQuery0-*'
544			}
545		});
546	}
547	if (facetType_r == 'publication_date_str') {
548		jQuery.each(allKeys, function (event, data) {
549			data.setSelected(false);
550			if (data.title == 'All') {
551				data.setSelected(true);
552				jQuery('[data-title="' + facetValue_r + '"]').closest('a').remove()
553				facetValue_r = 'All'
554			}
555		});
556	}
557	refines_count = parseInt(refines_count) - 1
558	setTimeout(function () {
559		jQuery('.refinements-count span').text(refines_count)
560		jQuery("#SearchBarRefine span.button").each(function (index) {
561			if (jQuery(this).find("a.button").length == 0) {
562				jQuery(this).hide()
563			}
564		});
565		if (refines_count == 1) {
566			jQuery('.refinements-count').contents().filter(function () {
567				return this.nodeType == 3;
568			}).replaceWith(' Refinement');
569		} else {
570			jQuery('.refinements-count').contents().filter(function () {
571				return this.nodeType == 3;
572			}).replaceWith(' Refinements');
573		}
574		if (refines_count == 0) {
575			jQuery('.clear_refinements').hide()
576			jQuery('.refinements-count').hide()
577		}
578		console.log("log----------:"+refines_count)
579	}, 500);
580	data_refresh_after_ajax(facetType_r, facetValue_r)
581}
582function data_refresh_after_ajax(industry_type, facet_name) {
583	const url = new URL(location);
584	url.searchParams.set(industry_type, facet_name);
585	var separator = window.location.href.includes('?') ? '&' : '?';
586if (window.location.href.indexOf(encodeURIComponent(industry_type + ":" + facet_name)) != -1) {
587			const urlParams = new URLSearchParams(window.location.search);
588			const url2=window.location.href
589			var c_url=window.location.href
590			for (let key of urlParams.keys()) {
591				if (urlParams.get(key).includes(industry_type)) {
592					//console.log("Key containing 'industry_type': " + key);
593					if (facet_name == '') {
594                           
595						const url1 = new URL(decodeURIComponent(window.location.href));
596						const params1 = new URLSearchParams(url1.search);
597						const newParams1 = new URLSearchParams();
598
599						for (const [key, value] of params1) {
600							if (!value.includes(industry_type)) {
601								newParams1.append(key, value);
602							}
603						}
604
605						 c_url = `${url1.origin}${url1.pathname}?${newParams1.toString()}`;
606						 window.history.replaceState(null, null, c_url);
607						
608				     	} else if (urlParams.get(key).includes(industry_type)) {
609							var c_url = window.location.href.replace(encodeURIComponent(industry_type + ":" + facet_name), '')
610                    
611							// c_url = c_url.replace(encodeURIComponent(key) + '=', '')
612							 c_url = c_url.replace(/([?&]selected_facets%5B\d+\%5D)=(&|$)/g, '$2');
613					    	c_url = c_url.replace(/([&?])(?:&|$)/, '$1').replace(/(\?|&)$/, '');
614					    	console.log("Updated URL: " + decodeURIComponent(c_url));
615						
616						            window.history.replaceState(null, null, c_url);
617
618						
619						
620				     	}
621					
622				
623				}
624			}
625		} else {
626			var encode_url = encodeURIComponent('selected_facets[' + facet_index + ']') + '=' + encodeURIComponent(industry_type + ":" + facet_name)
627			window.history.replaceState(null, null, window.location.href + separator + encode_url);
628			
629		}
630		ajax_url_p = page_url = window.location.href
631	
632	ajaxReq(ajax_url_p);
633	facet_index++
634}
635

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.