1(function () { 2 function slugifyState(value) { 3 return String(value || "") 4 .toLowerCase() 5 .trim() 6 .replace(/[^a-z0-9\s-]/g, "") 7 .replace(/\s+/g, "-") 8 .replace(/-+/g, "-"); 9 } 10 11 function setupStateSelector(selectEl) { 12 if (!selectEl) return; 13 14 selectEl.addEventListener("change", function () { 15 var selectedState = selectEl.value; 16 if (!selectedState) return; 17 18 var slug = slugifyState(selectedState); 19 if (!slug) return; 20 21 var urlPattern = selectEl.getAttribute("data-url-pattern") || "/how-to-start-an-llc-in-{slug}/"; 22 if (urlPattern.indexOf("{slug}") !== -1) { 23 window.location.href = urlPattern.replace("{slug}", slug); 24 return; 25 } 26 27 window.location.href = "/how-to-start-an-llc-in-" + slug + "/"; 28 }); 29 } 30 31 document.addEventListener("DOMContentLoaded", function () { 32 var selectors = document.querySelectorAll(".js-state-selector-llc"); 33 selectors.forEach(setupStateSelector); 34 }); 35})();
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.