PageSourceSearch

https://www.wynnsocial.com/wp-content/themes/uvtheme/js/global.js?ver=1.02

js wynnsocial.com collected 2026-10-03 22:01:23 UTC 32,048 bytes, 635 lines download raw bytes

vendor: 6,840 bytes, lines 1-2
1/*Lazy Load*/
2!function (n, t) { "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (n = n || self).LazyLoad = t() }(this, (function () { "use strict"; function n() { return (n = Object.assign || function (n) { for (var t = 1; t < arguments.length; t++) { var e = arguments[t]; for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && (n[i] = e[i]) } return n }).apply(this, arguments) } var t = "undefined" != typeof window, e = t && !("onscroll" in window) || "undefined" != typeof navigator && /(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent), i = t && "IntersectionObserver" in window, a = t && "classList" in document.createElement("p"), o = t && window.devicePixelRatio > 1, r = { elements_selector: ".lazy", container: e || t ? document : null, threshold: 300, thresholds: null, data_src: "src", data_srcset: "srcset", data_sizes: "sizes", data_bg: "bg", data_bg_hidpi: "bg-hidpi", data_bg_multi: "bg-multi", data_bg_multi_hidpi: "bg-multi-hidpi", data_poster: "poster", class_applied: "applied", class_loading: "loading", class_loaded: "loaded", class_error: "error", unobserve_completed: !0, unobserve_entered: !1, cancel_on_exit: !0, callback_enter: null, callback_exit: null, callback_applied: null, callback_loading: null, callback_loaded: null, callback_error: null, callback_finish: null, callback_cancel: null, use_native: !1 }, c = function (t) { return n({}, r, t) }, l = function (n, t) { var e, i = new n(t); try { e = new CustomEvent("LazyLoad::Initialized", { detail: { instance: i } }) } catch (n) { (e = document.createEvent("CustomEvent")).initCustomEvent("LazyLoad::Initialized", !1, !1, { instance: i }) } window.dispatchEvent(e) }, s = function (n, t) { return n.getAttribute("data-" + t) }, u = function (n, t, e) { var i = "data-" + t; null !== e ? n.setAttribute(i, e) : n.removeAttribute(i) }, d = function (n) { return s(n, "ll-status") }, f = function (n, t) { return u(n, "ll-status", t) }, _ = function (n) { return f(n, null) }, g = function (n) { return null === d(n) }, v = function (n) { return "native" === d(n) }, p = ["loading", "loaded", "applied", "error"], b = function (n, t, e, i) { n && (void 0 === i ? void 0 === e ? n(t) : n(t, e) : n(t, e, i)) }, h = function (n, t) { a ? n.classList.add(t) : n.className += (n.className ? " " : "") + t }, m = function (n, t) { a ? n.classList.remove(t) : n.className = n.className.replace(new RegExp("(^|\\s+)" + t + "(\\s+|$)"), " ").replace(/^\s+/, "").replace(/\s+$/, "") }, E = function (n) { return n.llTempImage }, I = function (n, t) { if (t) { var e = t._observer; e && e.unobserve(n) } }, y = function (n, t) { n && (n.loadingCount += t) }, A = function (n, t) { n && (n.toLoadCount = t) }, L = function (n) { for (var t, e = [], i = 0; t = n.children[i]; i += 1)"SOURCE" === t.tagName && e.push(t); return e }, w = function (n, t, e) { e && n.setAttribute(t, e) }, z = function (n, t) { n.removeAttribute(t) }, k = function (n) { return !!n.llOriginalAttrs }, O = function (n) { if (!k(n)) { var t = {}; t.src = n.getAttribute("src"), t.srcset = n.getAttribute("srcset"), t.sizes = n.getAttribute("sizes"), n.llOriginalAttrs = t } }, C = function (n) { if (k(n)) { var t = n.llOriginalAttrs; w(n, "src", t.src), w(n, "srcset", t.srcset), w(n, "sizes", t.sizes) } }, N = function (n, t) { w(n, "sizes", s(n, t.data_sizes)), w(n, "srcset", s(n, t.data_srcset)), w(n, "src", s(n, t.data_src)) }, x = function (n) { z(n, "src"), z(n, "srcset"), z(n, "sizes") }, M = function (n, t) { var e = n.parentNode; e && "PICTURE" === e.tagName && L(e).forEach(t) }, R = function (n, t) { L(n).forEach(t) }, G = { IMG: function (n, t) { M(n, (function (n) { O(n), N(n, t) })), O(n), N(n, t) }, IFRAME: function (n, t) { w(n, "src", s(n, t.data_src)) }, VIDEO: function (n, t) { R(n, (function (n) { w(n, "src", s(n, t.data_src)) })), w(n, "poster", s(n, t.data_poster)), w(n, "src", s(n, t.data_src)), n.load() } }, T = function (n, t) { var e = G[n.tagName]; e && e(n, t) }, D = function (n, t, e) { y(e, 1), h(n, t.class_loading), f(n, "loading"), b(t.callback_loading, n, e) }, F = { IMG: function (n, t) { u(n, t.data_src, null), u(n, t.data_srcset, null), u(n, t.data_sizes, null), M(n, (function (n) { u(n, t.data_srcset, null), u(n, t.data_sizes, null) })) }, IFRAME: function (n, t) { u(n, t.data_src, null) }, VIDEO: function (n, t) { u(n, t.data_src, null), u(n, t.data_poster, null), R(n, (function (n) { u(n, t.data_src, null) })) } }, V = function (n, t) { u(n, t.data_bg_multi, null), u(n, t.data_bg_multi_hidpi, null) }, j = function (n, t) { var e = F[n.tagName]; e ? e(n, t) : function (n, t) { u(n, t.data_bg, null), u(n, t.data_bg_hidpi, null) }(n, t) }, P = ["IMG", "IFRAME", "VIDEO"], S = function (n, t) { !t || function (n) { return n.loadingCount > 0 }(t) || function (n) { return n.toLoadCount > 0 }(t) || b(n.callback_finish, t) }, U = function (n, t, e) { n.addEventListener(t, e), n.llEvLisnrs[t] = e }, $ = function (n, t, e) { n.removeEventListener(t, e) }, q = function (n) { return !!n.llEvLisnrs }, H = function (n) { if (q(n)) { var t = n.llEvLisnrs; for (var e in t) { var i = t[e]; $(n, e, i) } delete n.llEvLisnrs } }, B = function (n, t, e) { !function (n) { delete n.llTempImage }(n), y(e, -1), function (n) { n && (n.toLoadCount -= 1) }(e), m(n, t.class_loading), t.unobserve_completed && I(n, e) }, J = function (n, t, e) { var i = E(n) || n; q(i) || function (n, t, e) { q(n) || (n.llEvLisnrs = {}); var i = "VIDEO" === n.tagName ? "loadeddata" : "load"; U(n, i, t), U(n, "error", e) }(i, (function (a) { !function (n, t, e, i) { var a = v(t); B(t, e, i), h(t, e.class_loaded), f(t, "loaded"), j(t, e), b(e.callback_loaded, t, i), a || S(e, i) }(0, n, t, e), H(i) }), (function (a) { !function (n, t, e, i) { var a = v(t); B(t, e, i), h(t, e.class_error), f(t, "error"), b(e.callback_error, t, i), a || S(e, i) }(0, n, t, e), H(i) })) }, K = function (n, t, e) { !function (n) { n.llTempImage = document.createElement("IMG") }(n), J(n, t, e), function (n, t, e) { var i = s(n, t.data_bg), a = s(n, t.data_bg_hidpi), r = o && a ? a : i; r && (n.style.backgroundImage = 'url("'.concat(r, '")'), E(n).setAttribute("src", r), D(n, t, e)) }(n, t, e), function (n, t, e) { var i = s(n, t.data_bg_multi), a = s(n, t.data_bg_multi_hidpi), r = o && a ? a : i; r && (n.style.backgroundImage = r, function (n, t, e) { h(n, t.class_applied), f(n, "applied"), V(n, t), t.unobserve_completed && I(n, t), b(t.callback_applied, n, e) }(n, t, e)) }(n, t, e) }, Q = function (n, t, e) { !function (n) { return P.indexOf(n.tagName) > -1 }(n) ? K(n, t, e) : function (n, t, e) { J(n, t, e), T(n, t), D(n, t, e) }(n, t, e) }, W = ["IMG", "IFRAME"], X = function (n) { return n.use_native && "loading" in HTMLImageElement.prototype }
2, Y = function (n, t, e) { n.forEach((function (n) { return function (n) { return n.isIntersecting || n.intersectionRatio > 0 }(n) ? function (n, t, e, i) { f(n, "entered"), function (n, t, e) { t.unobserve_entered && I(n, e) }(n, e, i), b(e.callback_enter, n, t, i), function (n) { return p.indexOf(d(n)) >= 0 }(n) || Q(n, e, i) }(n.target, n, t, e) : function (n, t, e, i) { g(n) || (function (n, t, e, i) { e.cancel_on_exit && function (n) { return "loading" === d(n) }(n) && "IMG" === n.tagName && (H(n), function (n) { M(n, (function (n) { x(n) })), x(n) }(n), function (n) { M(n, (function (n) { C(n) })), C(n) }(n), m(n, e.class_loading), y(i, -1), _(n), b(e.callback_cancel, n, t, i)) }(n, t, e, i), b(e.callback_exit, n, t, i)) }(n.target, n, t, e) })) }, Z = function (n) { return Array.prototype.slice.call(n) }, nn = function (n) { return n.container.querySelectorAll(n.elements_selector) }, tn = function (n) { return function (n) { return "error" === d(n) }(n) }, en = function (n, t) { return function (n) { return Z(n).filter(g) }(n || nn(t)) }, an = function (n, e) { var a = c(n); this._settings = a, this.loadingCount = 0, function (n, t) { i && !X(n) && (t._observer = new IntersectionObserver((function (e) { Y(e, n, t) }), function (n) { return { root: n.container === document ? null : n.container, rootMargin: n.thresholds || n.threshold + "px" } }(n))) }(a, this), function (n, e) { t && window.addEventListener("online", (function () { !function (n, t) { var e; (e = nn(n), Z(e).filter(tn)).forEach((function (t) { m(t, n.class_error), _(t) })), t.update() }(n, e) })) }(a, this), this.update(e) }; return an.prototype = { update: function (n) { var t, a, o = this._settings, r = en(n, o); A(this, r.length), !e && i ? X(o) ? function (n, t, e) { n.forEach((function (n) { -1 !== W.indexOf(n.tagName) && (n.setAttribute("loading", "lazy"), function (n, t, e) { J(n, t, e), T(n, t), j(n, t), f(n, "native") }(n, t, e)) })), A(e, 0) }(r, o, this) : (a = r, function (n) { n.disconnect() }(t = this._observer), function (n, t) { t.forEach((function (t) { n.observe(t) })) }(t, a)) : this.loadAll(r) }, destroy: function () { this._observer && this._observer.disconnect(), nn(this._settings).forEach((function (n) { delete n.llOriginalAttrs })), delete this._observer, delete this._settings, delete this.loadingCount, delete this.toLoadCount }, loadAll: function (n) { var t = this, e = this._settings; en(n, e).forEach((function (n) { I(n, t), Q(n, e, t) })) } }, an.load = function (n, t) { var e = c(t); Q(n, e) }, an.resetStatus = function (n) { _(n) }, t && function (n, t) { if (t) if (t.length) for (var e, i = 0; e = t[i]; i += 1)l(n, e); else l(n, t) }(an, window.lazyLoadOptions), an }));
3
4/**
5 * Vanilla JavaScript Dropdown v2.2.0
6 * https://zoltantothcom.github.io/vanilla-js-dropdown
7 */
8var CustomSelect = function (e) { var t = "string" == typeof e.elem ? document.getElementById(e.elem) : e.elem, n = "boolean" == typeof e.bubbles, a = "js-Dropdown-title", o = "is-selected", s = "is-open", l = t.getElementsByTagName("optgroup"), i = t.options, r = i.length, d = 0, c = document.createElement("div"); c.className = "js-Dropdown", t.id && (c.id = "custom-" + t.id); var u = document.createElement("button"); u.className = a, u.textContent = i[0].textContent; var m = document.createElement("ul"); if (m.className = "js-Dropdown-list", l.length) for (var p = 0; p < l.length; p++) { var v = document.createElement("div"); v.innerText = l[p].label, v.classList.add("js-Dropdown-optgroup"), m.appendChild(v), g(l[p].getElementsByTagName("option")) } else g(i); function g(e) { for (var n = 0; n < e.length; n++) { var a = document.createElement("li"); a.innerHTML = "<a href='javascript:void(0);'>" + e[n].textContent + "</a>", a.setAttribute("data-value", e[n].value), a.setAttribute("data-index", d++), i[t.selectedIndex].textContent === e[n].textContent && (a.classList.add(o), u.textContent = e[n].textContent), m.appendChild(a) } } function f() { m.classList.toggle(s) } function x() { m.classList.remove(s) } return c.appendChild(u), c.appendChild(m), c.addEventListener("click", function (e) { e.preventDefault(); var s, l = e.target; l.className === a && f(); if ("A" === l.tagName) { if (!(s = l.parentElement).classList.contains(o)) { c.querySelector("." + a).innerText = l.innerText, t.options.selectedIndex = s.getAttribute("data-index"); var i = n ? new CustomEvent("change", { bubbles: !0 }) : new CustomEvent("change"); t.dispatchEvent(i); for (var d = 0; d < r; d++)m.querySelectorAll("li")[d].classList.remove(o); s.classList.add(o) } x() } }), t.parentNode.insertBefore(c, t), t.style.display = "none", document.addEventListener("click", function (e) { c.contains(e.target) || x() }), { toggle: f, close: x, open: function () { m.classList.add(s) } } };
9
10var uvlazyimages;
11
12function uvDOMReady(fn) {
13	if (document.readyState != 'loading') {
14		fn();
15	}
16	else {
17		document.addEventListener('DOMContentLoaded', fn);
18	}
19}
20
21function uvWindowload(fn) {
22	if (document.readyState === 'complete') {
23		fn();
24	}
25	else {
26		window.addEventListener('load', fn);
27	}
28}
29
30uvDOMReady(function () {
31	uvlazyimages = new LazyLoad({ elements_selector: '.uv-lazyimage', unobserve_entered: true });
32
33	document.getElementById('uv-menuicon').addEventListener('click', function (e) {
34		if (document.getElementsByTagName('html')[0].classList.contains('ovmenuopen')) {
35			document.getElementsByTagName('html')[0].classList.remove('ovmenuopen');
36			document.getElementById('uv-menuicon').setAttribute("aria-label", "Open the navigation menu");
37		}
38		else {
39			document.getElementsByTagName('html')[0].classList.add('ovmenuopen');
40			document.getElementById('uv-menuicon').setAttribute("aria-label", "Close the navigation menu");
41		}
42	});
43
44	var mobsubmenu = document.querySelectorAll('.uv-overmenu-menu ul > li.menu-item-has-children > a');
45	for (var i = 0; i < mobsubmenu.length; i++) {
46		mobsubmenu[i].addEventListener('click', mobsubmenuoc, false);
47	}
48
49	uvcheckanimations();
50	simpleParallax('.uv-parallaxsec .uv-section-bg', 8);
51
52	// replaceHomeFlyers();
53});
54
55//share face
56uvClickListener('.uvjs-fbshare', function (e) {
57	e.preventDefault();
58	var uvshareurl = encodeURIComponent(this.getAttribute("href"));
59	window.open('https://www.facebook.com/sharer.php?u=' + uvshareurl, 'Like', 'toolbar=0, status=0, width=650, height=450');
60});
61//share twitter
62uvClickListener('.uvjs-tweet', function (e) {
63	e.preventDefault();
64	var uvtweettext = encodeURIComponent(this.getAttribute("href"));
65	window.open('https://twitter.com/intent/tweet?text=' + uvtweettext, 'Tweet', 'toolbar=0, status=0, width=650, height=450');
66});
67window.onload = (event) => {
68	uvcheckanimations();
69};
70
71var mobsubmenuoc = function () {
72	if (this.parentElement.classList.contains('active')) {
73		this.parentElement.classList.remove('active');
74	}
75	else {
76		this.parentElement.classList.add('active');
77	}
78};
79
80function uvClickListener(uvselector, uvhandler) {
81	document.addEventListener("click", function (e) {
82		for (var target = e.target; target && target != this; target = target.parentNode) {
83			if (target.matches(uvselector)) {
84				uvhandler.call(target, e);
85				break;
86			}
87		}
88	}, false);
89}
90
91document.addEventListener("keydown", e => {
92	if (e.keyCode == 27) { document.getElementsByTagName('html')[0].classList.remove('ovmenuopen'); }
93	else if (event.keyCode === 9) { document.body.classList.remove('uv-using-mouse'); }
94});
95
96document.addEventListener("scroll", e => {
97	if (window.pageYOffset > 0) {
98		document.getElementsByTagName('html')[0].classList.add('uv-pagescrolled');
99	}
100	else {
101		document.getElementsByTagName('html')[0].classList.remove('uv-pagescrolled');
102	}
103
104	uvcheckanimations();
105});
106
107document.addEventListener('mousedown', function () {
108	document.body.classList.add('uv-using-mouse');
109});
110function uvcheckanimations() {
111	var uvanimateelements = document.querySelectorAll(".uvan-slideup:not(.animate), .uvan-fadein:not(.animate), .uvan-fadeinup:not(.animate), .uvan-slideleft:not(.animate), .uvan-sectionelems h2:not(.animate), .uvan-sectionelems p:not(.animate), .uvan-sectionelems .wp-block-buttons:not(.animate), .uv-eventscarousel:not(.animate)");
112	Array.prototype.forEach.call(uvanimateelements, function (el, i) {
113		if (uvIsInViewport(el))
114			el.classList.add("animate");
115	});
116}
117
118function uvIsInViewport(el) {
119	var top = el.offsetTop;
120	var left = el.offsetLeft;
121	var width = el.offsetWidth;
122	var height = el.offsetHeight;
123
124	while (el.offsetParent) {
125		el = el.offsetParent;
126		top += el.offsetTop;
127		left += el.offsetLeft;
128	}
129
130	return (
131		top < (window.pageYOffset + window.innerHeight) &&
132		left < (window.pageXOffset + window.innerWidth) &&
133		(top + height) > window.pageYOffset &&
134		(left + width) > window.pageXOffset
135	);
136}
137
138/*Parallax*/
139const simpleParallax = (elem, modifier) => {
140	let paras = document.querySelectorAll(elem);
141	for (let i = 0; i < paras.length; i++) {
142		paras[i].setAttribute(
143			"style",
144			"background-repeat: no-repeat; background-attachment: fixed; background-size: cover;background-position: center center;"
145		);
146	}
147	const sp = () => {
148		for (let i = 0; i < paras.length; i++) {
149			let x = paras[i].getBoundingClientRect().top / modifier;
150			let y = Math.round(x * 100) / 100;
151			paras[i].style.backgroundPosition = "center " + y + "px";
152		}
153		requestAnimationFrame(sp);
154	};
155	requestAnimationFrame(sp);
156};
157/**/
158
159uvClickListener(".uvjs-scrollto", function (e) {
160	e.preventDefault();
161
162	let uvscrolltarget = document.querySelector(this.getAttribute("href"));
163	uvScrolltoelem(uvscrolltarget);
164});
165
166function uvScrolltoelem(uvscrollelem) {
167	const uvoffsetelem = document.querySelector(".uv-page-header");
168	const uvoffset = uvoffsetelem.clientHeight * -1;
169	const uvtop = uvscrollelem.getBoundingClientRect().top + window.pageYOffset + uvoffset;
170
171	console.log(uvoffset);
172
173	window.scrollTo({ top: uvtop, behavior: 'smooth' });
174}
175uvClickListener(".uv-faq-modern-item", function () {
176	if (this.classList.contains("active")) {
177		this.classList.remove("active");
178	}
179	else {
180		this.classList.add("active");
181	}
182});
183
184/*Map Inquiry*/
185function uvmapinquiry() {
186	var uvmapform = document.getElementById('uv-mapresform');
187	var mapristine = new Pristine(uvmapform);
188
189	uvmapform.addEventListener('submit', function (e) {
190		e.preventDefault();
191
192		if (mapristine.validate()) {
193			uvmapform.classList.add("sending");
194
195			var request = new XMLHttpRequest();
196			var formData = new FormData(uvmapform);
197
198			request.open('POST', '/wp-admin/admin-ajax.php?action=uvwp_resformapro');
199			request.send(formData);
200			request.onerror = function () { alert("There was a connection error of some sort"); };
201			request.onload = function () {
202				if (this.response == "0") {
203					uvmapform.classList.remove("sending");
204					alert("There was a connection error of some sort");
205				}
206				else {
207					document.getElementById('formsuccess-email').value = document.getElementById('email_popup').value;
208					document.getElementById('uvform-tosuccess').submit();
209				}
210			};
211		}
212		else {
213			if (document.getElementsByClassName('uv-inquirylabelerror').length)
214				document.getElementsByClassName('uv-inquirylabelerror')[0].classList.remove('uv-hide');
215			console.log('no validate');
216			uvPristineAriadescribedby(uvmapform);
217		}
218	});
219}
220/**/
221/*Cookies*/
222function setCookie(cname, cvalue, exdays) {
223	var d = new Date();
224	d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
225	var expires = 'expires=' + d.toUTCString();
226	document.cookie = cname + '=' + cvalue + '; ' + expires + '; path=/';
227}
228
229function getCookie(cname) {
230	var name = cname + '=';
231	var ca = document.cookie.split(';');
232	for (var i = 0; i < ca.length; i++) {
233		var c = ca[i];
234		while (c.charAt(0) == ' ') {
235			c = c.substring(1);
236		}
237		if (c.indexOf(name) == 0) {
238			return c.substring(name.length, c.length);
239		}
240	}
241	return '';
242}
243
244/*uvClickListener('.cookiepopup-close', function () {
245	setCookie('showcookiepopup', 'false', 600);
246	if (document.querySelector('.cookiepopup') !== null)
247		document.querySelector('.cookiepopup').classList.add('hidden');
248});
249
250uvWindowload(function () {
251	if (getCookie('showcookiepopup') != 'false') {
252		if (document.querySelector('.cookiepopup') !== null)
253			document.querySelector('.cookiepopup').classList.remove('hidden');
254	}
255});*/
256/**/
257
258
259
260/*Phone Field Format*/
261const isNumericInput = (event) => {
262	const key = event.keyCode;
263	return ((key >= 48 && key <= 57) || // Allow number line
264		(key >= 96 && key <= 105) // Allow number pad
265	);
266};
267
268const isModifierKey = (event) => {
269	const key = event.keyCode;
270	return (event.shiftKey === true || key === 35 || key === 36) || // Allow Shift, Home, End
271		(key === 8 || key === 9 || key === 13 || key === 46) || // Allow Backspace, Tab, Enter, Delete
272		(key > 36 && key < 41) || // Allow left, up, right, down
273		(
274			// Allow Ctrl/Command + A,C,V,X,Z
275			(event.ctrlKey === true || event.metaKey === true) &&
276			(key === 65 || key === 67 || key === 86 || key === 88 || key === 90)
277		)
278};
279
280const enforceFormat = (event) => {
281	// Input must be of a valid number format or a modifier key, and not longer than ten digits
282	if (!isNumericInput(event) && !isModifierKey(event)) {
283		event.preventDefault();
284	}
285};
286
287const formatToPhone = (event) => {
288	if (isModifierKey(event)) { return; }
289
290	const input = event.target.value.replace(/\D/g, '').substring(0, 10); // First ten digits of input only
291	const areaCode = input.substring(0, 3);
292	const middle = input.substring(3, 6);
293	const last = input.substring(6, 10);
294
295	if (input.length > 6) { event.target.value = `(${areaCode}) ${middle} - ${last}`; }
296	else if (input.length > 3) { event.target.value = `(${areaCode}) ${middle}`; }
297	else if (input.length > 0) { event.target.value = `(${areaCode}`; }
298};
299
300window.addEventListener("load", function () {
301	const inputElement = document.getElementById('phone');
302	if (inputElement) {
303		if (inputElement.type == 'number') {
304			inputElement.type = 'text';
305		}
306		inputElement.addEventListener('keydown', enforceFormat);
307		inputElement.addEventListener('keyup', formatToPhone);
308	}
309	uvinitada();
310
311}, false);
312/*end Phone Field Format*/
313
314
315function uvinitada() {
316	const uvfigure = document.querySelectorAll('figure.wp-block-image');
317	Array.prototype.forEach.call(uvfigure, function (el, i) {
318		el.setAttribute("role", "none");
319	});
320
321	const uvfigureimg = document.querySelectorAll('figure.wp-block-image img');
322	Array.prototype.forEach.call(uvfigureimg, function (el, i) {
323		const uvextarialabel = el.getAttribute("alt");
324		if (uvextarialabel) {
325			if (!el.parentElement.classList.contains('remove-role')) {
326
327				el.setAttribute("role", "figure");
328			}
329
330			if (!el.parentElement.classList.contains('remove-arialabel')) {
331				// el.setAttribute("aria-label", uvextarialabel);
332			}
333
334
335		} else {
336			if (!el.parentElement.classList.contains('remove-role')) {
337
338				el.setAttribute("role", "presentation");
339			}
340
341		}
342
343	});
344
345
346	const uvshowitemterms = document.querySelectorAll('.uvjs-showitemterms');
347	Array.prototype.forEach.call(uvshowitemterms, function (el, i) {
348		const uvrole = el.getAttribute("role");
349		if (!uvrole) {
350			el.setAttribute("role", "button");
351		}
352	});
353
354	const uvextlinkselems = document.querySelectorAll('a[target="_blank"]');
355	Array.prototype.forEach.call(uvextlinkselems, function (el, i) {
356		const uvextarialabel = el.getAttribute("aria-label");
357
358		if (!uvextarialabel && uvextarialabel != '') {
359			let uvextlinklabel = el.getAttribute("href");
360			uvextlinklabel.replace(/<[^>]*>?/gm, '');
361
362			el.setAttribute("aria-label", "Open " + uvextlinklabel + " in a new tab");
363		}
364	});
365
366
367	const uvinputrequired = document.querySelectorAll('input[required]:not([type="number"]):not([id="uvformnl-email"])');
368
369	//more references https://www.w3.org/TR/WCAG21/#input-purposes
370	let uvautocomplete = { "firstname": "name", "lastname": "family-name", "phone": "tel-national" };
371	Array.prototype.forEach.call(uvinputrequired, function (el, i) {
372		const uvextariarequired = el.getAttribute("aria-required");
373		const uvextariaautocomplete = el.getAttribute("autocomplete");
374
375		if (!uvextariarequired) {
376			el.setAttribute("aria-required", "true");
377		}
378		if (!uvextariaautocomplete) {
379
380			let uvfieldname = el.getAttribute("name");
381			if (uvfieldname in uvautocomplete) {
382				uvfieldname = uvautocomplete[uvfieldname];
383			}
384
385			el.setAttribute("autocomplete", uvfieldname);
386		}
387
388	});
389
390
391
392	const uvlazyimage = document.querySelectorAll('.uv-lazyimage');
393	Array.prototype.forEach.call(uvlazyimage, function (el, i) {
394		const uvrole = el.getAttribute("role");
395		const uvarialabel = el.getAttribute("aria-label");
396
397		const uvaalt = el.getAttribute("alt");
398
399		// if(!uvrole){
400		// 	el.setAttribute("role", "img");
401		// }
402		// if(!uvarialabel){
403		// 	el.setAttribute("aria-label", "Image "+uvaalt);
404		// }
405
406	});
407
408	/* submenu focus */
409	const uvmenuselements = document.querySelectorAll(".menu-item-has-children a");
410	Array.prototype.forEach.call(uvmenuselements, function (el, i) {
411		el.addEventListener('click', (event) => {
412			//if (!document.body.classList.contains('uv-using-mouse')) {
413				el.closest(".menu-item-has-children").classList.add("isfocus");
414				el.closest(".menu-item-has-children a").setAttribute("aria-expanded", "true");
415			//}
416		});
417
418		el.addEventListener('focus', (event) => {
419			if (!document.body.classList.contains('uv-using-mouse')) {
420				el.closest(".menu-item-has-children").classList.add("isfocus");
421				el.closest(".menu-item-has-children a").setAttribute("aria-expanded", "true");
422			}
423		});
424
425		el.addEventListener('mouseenter', (event) => {
426			//if (!document.body.classList.contains('uv-using-mouse')) {
427				el.closest(".menu-item-has-children").classList.add("isfocus");
428				el.closest(".menu-item-has-children a").setAttribute("aria-expanded", "true");
429			//}
430		});
431		el.addEventListener('mouseleave', (event) => {
432			//if (!document.body.classList.contains('uv-using-mouse')) {
433				el.closest(".menu-item-has-children").classList.remove("isfocus");
434				el.closest(".menu-item-has-children a").setAttribute("aria-expanded", "false");
435			//}
436		});
437
438	});
439
440	Array.prototype.forEach.call(uvmenuselements, function (el, i) {
441		el.addEventListener('blur', (event) => {
442			const uvdropparent = el.closest(".menu-item-has-children");
443			setTimeout(function () {
444				if (!uvdropparent.querySelector("a:focus") && !uvdropparent.querySelector("input:focus") && !uvdropparent.querySelector("button:focus")) {
445					if (!document.body.classList.contains('uv-using-mouse')){
446
447						uvdropparent.querySelector("a").setAttribute("aria-expanded", "false");
448						el.closest(".menu-item-has-children").classList.remove("isfocus");
449					}
450				}
451			}, 100);
452		});
453	});
454	/* end submenu focus */
455
456
457	/*
458			const uvbanner = document.querySelectorAll('.uv-banner-events img');
459			Array.prototype.forEach.call(uvbanner, function(el, i){
460				const uvsrc = el.getAttribute("src");
461				if(!uvsrc){
462					el.setAttribute("src", "data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%20210%20140%22%3E%3C/svg%3E");
463					console.log("hello 1");
464				}
465				{
466					console.log("hello 2");
467				}
468				
469			});
470	*/
471
472
473	/*
474			setTimeout(function () {
475				
476			
477			
478			}, 5000);
479	*/
480}
481
482
483
484
485document.addEventListener('keydown', function (event) {
486	if (event.key === "Escape") {
487
488		/* close popup */
489		const uvpoptarget = document.querySelector('#uv-popup');
490		const ispopupative = uvpoptarget.classList.contains("visible");
491		if (uvpoptarget) {
492			if (ispopupative) {
493				uvHidePopup(uvpoptarget, true);
494			}
495		}
496		/* close popup calendar */
497		const uvpoptargetmap = document.querySelector('#uv-mappop');
498		if (uvpoptargetmap) {
499			const ispopupmapative = uvpoptargetmap.classList.contains("visible");
500			if (ispopupmapative) {
501				uvHidePopup(uvpoptargetmap, true);
502			}
503		}
504		/* close popup choose dates */
505		const uvpoptarget_flatpickrcalendar = document.querySelector('.uvdropchangedate');
506		if (uvpoptarget_flatpickrcalendar) {
507			const ispopupative_flatpickrcalendar = uvpoptarget_flatpickrcalendar.classList.contains("clicked");
508			if (ispopupative_flatpickrcalendar) {
509				uvpoptarget_flatpickrcalendar.classList.remove("clicked");
510				document.querySelector('.uvdropchangedate .uvevents-changedate.form-control').classList.remove("active");
511				document.querySelector('.flatpickr-calendar').classList.remove("open");
512				console.log("test");
513			}
514		}
515		/* close popup all special */
516		const uvpoptarget_changespecialselect = document.querySelector('#custom-uvevents-changespecialselect .js-Dropdown-title');
517		if (uvpoptarget_changespecialselect) {
518			console.log("special select");
519			const ispopupative_changespecialselect = uvpoptarget_changespecialselect.classList.contains("clicked");
520			if (ispopupative_changespecialselect) {
521				uvpoptarget_changespecialselect.classList.remove("clicked");
522
523				document.querySelector('#custom-uvevents-changespecialselect .js-Dropdown-list').classList.remove("is-open");
524			}
525		}
526		/* close popup all venues */
527		const uvpoptarget_changevenueselect = document.querySelector('#custom-uvevents-changevenueselect .js-Dropdown-title');
528		if (uvpoptarget_changevenueselect) {
529			const ispopupative_changevenueselect = uvpoptarget_changevenueselect.classList.contains("clicked");
530			if (ispopupative_changevenueselect) {
531				uvpoptarget_changevenueselect.classList.remove("clicked");
532
533				document.querySelector('#custom-uvevents-changevenueselect .js-Dropdown-list').classList.remove("is-open");
534			}
535		}
536		/* close popup all artists */
537		const uvpoptarget_uvfilterartists = document.querySelector('.uvdropdowncont.uvfilterartists');
538		if (uvpoptarget_uvfilterartists) {
539			const ispopupative_uvfilterartists = uvpoptarget_uvfilterartists.classList.contains("active");
540			if (ispopupative_uvfilterartists) {
541				uvpoptarget_uvfilterartists.classList.remove("active");
542
543				document.querySelector('#uvfilterartists').classList.remove("clicked");
544			}
545		}
546		/* close popup map event info */
547		const uvpoptarget_mapevtinfo = document.querySelector('.uvmapctevinfo');
548		if (uvpoptarget_mapevtinfo) {
549			const ispopupative_mapevtinfo = uvpoptarget_mapevtinfo.classList.contains("active");
550			if (ispopupative_mapevtinfo) {
551				uvpoptarget_mapevtinfo.classList.remove("active");
552			}
553		}
554		/* close popup map select date */
555		const uvpoptarget_mapselectdate = document.querySelector('#uv-mapdatepop');
556		if (uvpoptarget_mapselectdate) {
557			const ispopupative_mapselectdate = uvpoptarget_mapselectdate.classList.contains("visible");
558			if (ispopupative_mapselectdate) {
559				uvHidePopup(uvpoptarget_mapselectdate, true);
560			}
561		}
562		/* close popup map select table */
563		const uvpoptarget_mappopsel = document.querySelector('#uv-mappopsel');
564		if (uvpoptarget_mappopsel) {
565			const ispopupative_mappopsel = uvpoptarget_mappopsel.classList.contains("visible");
566			if (ispopupative_mappopsel) {
567				uvHidePopup(uvpoptarget_mappopsel, true);
568			}
569		}
570		/* close popup header venues */
571		const uvpoptarget_topmenuvenues = document.querySelector('.menu-item-has-children.isfocus');
572		if (uvpoptarget_topmenuvenues) {
573			uvpoptarget_topmenuvenues.classList.remove("isfocus");
574			uvpoptarget_topmenuvenues.querySelector("a").setAttribute("aria-expanded", "false");
575		}
576
577
578	}
579
580	/* add focus tabindex */
581	var uvgettabindex0 = document.querySelectorAll(".uvtabindex0");
582	if (uvgettabindex0) {
583		uvgettabindex0.forEach(uvaddtabindex);
584	}
585	function uvaddtabindex(uvelementtabindex) {
586		uvelementtabindex.setAttribute("tabindex", "0");
587	}
588
589});
590
591
592
593//get venue name by venuecode 
594
595function uvvenuename(uvvenuecode) {
596	let uvvenuename = '';
597	if (uvvenuecode == 'VEN1163')
598		uvvenuename = 'EBC at Night';
599	else if (uvvenuecode == 'VEN1103')
600		uvvenuename = 'Encore Beach Club';
601	else if (uvvenuecode == 'VEN1115')
602		uvvenuename = 'XS Las Vegas';
603	else if (uvvenuecode == 'VEN649843')
604		uvvenuename = 'Wynn Field Club  ';
605	else
606		uvvenuename = 'Wynn Nightlife'
607	return uvvenuename;
608}
609
610//replaces these two event flyers @auth:egt
611function replaceHomeFlyers() {
612	const isHome = document.querySelector(".home");
613	const flyers = document.querySelectorAll(".swiper-link"); 
614
615	if(isHome && flyers){
616		flyers.forEach(flyer => { 
617			if(flyer.getAttribute("href").includes("EVE111500020241231") 
618				|| flyer.getAttribute("href").includes("http://Wynnjobs.com") 
619				|| flyer.getAttribute("href").includes("/wfc/")) {
620				// flyer.closest(".swiper-slide.uvhome-eventslideritem").style.display = 'none';
621				// flyer.closest(".swiper-slide.uvhome-eventslideritem").remove();
622				flyer.setAttribute("href", "/odesza-dj-set");
623				flyer.setAttribute("aria-label", "ODESZA (DJ SET)");
624				flyer.querySelector(".swiper-lazy.bg").style.backgroundImage = "url(/wp-content/themes/uvtheme/assets/images/250106_WNL_Residency_ODEZA_Homepage-Banner_1920x890.jpg)";
625			}
626			// if(flyer.getAttribute("href").includes("http://Wynnjobs.com")) {
627			// 	// flyer.closest(".swiper-slide.uvhome-eventslideritem").style.display = 'none';
628			// 	// flyer.closest(".swiper-slide.uvhome-eventslideritem").remove();
629			// 	flyer.setAttribute("href", "/wfc/");
630			// 	flyer.setAttribute("aria-label", "Wynn Nightlife LAS VEGAS - WFC");
631			// 	flyer.querySelector(".swiper-lazy.bg").style.backgroundImage = "url(https://wynnsocial.uvtix.com/websites/wynnsocial/assets/images/home/WFC_banner.jpg)";
632			// }
633		});
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.