{1} “.replace(“{0}”, “Technical Stuff”).replace(“{1}”, “To view this site, enable cookies in your browser.”); document.body.appendChild(cookieMessage); } }()); ]]>
{0}
{1}
0; for (var c=0,size=auraCss.size;c 1) { var val = declaration.substring(declaration.indexOf(“,”) + 1); var fallback = val.substring(0, val.length-1); // if the fallback is one other variable, resolve the worth recursively if (fallback.indexOf(“var(“) != -1) { return extractValue(fallback, lookup); } return fallback; } } operate replaceBlobUrlSubresources(css) { var anchor = doc.createElement(“a”); return css.substitute(/b(urls*(s*[‘”]?)([^)”‘]+)([‘”]?))/g, operate (match, left, url, proper) { anchor.href = url; return left + anchor.href + proper; }); } whereas ( (consequence = VAR_PATTERN.exec(css)) ) { output.push(css.substring(startIndex, consequence.index)); startIndex = consequence.index; var endIndex = startIndex + findVarEnd(css.substring(startIndex)); var declaration = css.substring(startIndex, endIndex); var worth = extractValue(declaration, varLookup); if(worth) { output.push(worth); } else { output.push(declaration); } startIndex = endIndex; } if(startIndex === 0) { return replaceBlobUrlSubresources(css); } output.push(css.substring(startIndex)); return replaceBlobUrlSubresources(output.be a part of(“”)); } operate injectStyles(linkEl,css){ var cssEl; if(auraConfig.applyCssVarPolyfillViaBlob) { var blob=new Blob([css],{sort:”textual content/css”}); cssEl=doc.createElement(“hyperlink”); cssEl.addEventListener(“load”,onLoadStyleSheets); cssEl.addEventListener(“error”,onLoadStyleSheetsError); cssEl.setAttribute(“rel”,”stylesheet”); cssEl.setAttribute(“href”,URL.createObjectURL(blob)); linkEl.parentElement.insertBefore(cssEl,linkEl); }else{ cssEl=doc.createElement(“fashion”); cssEl.textContent=css; linkEl.parentElement.insertBefore(cssEl,linkEl); onLoadStyleSheets(); } } operate rewriteAndInjectCss(linkEl, supply, varLookup) { var css = rewriteCssVars(supply, varLookup); injectStyles(linkEl, css); } operate loadViaAjax(linkEl, cssVariables) { var url = linkEl.getAttribute(“data-href”); var xhr = new XMLHttpRequest(); xhr.addEventListener(“error”, onLoadStyleSheetsError); xhr.addEventListener(“load”, operate (e) { if (this.standing === 200) { rewriteAndInjectCss(linkEl, xhr.responseText, cssVariables); } else { onLoadStyleSheets(e); } }); xhr.open(“GET”, url); xhr.withCredentials = true; xhr.ship(); } window.Aura.rewriteCssVars = rewriteCssVars; }()); ]]>