import{caseInsensetiveComparator,regexSpecialCharacters,sprintf}from"./string-utilities.js";String.sprintf=sprintf,String.regexSpecialCharacters=regexSpecialCharacters,String.caseInsensetiveComparator=caseInsensetiveComparator,self.createPlainTextSearchRegex=function(e,t){let n="";for(let r=0;r<e.length;++r){const t=e.charAt(r);-1!==regexSpecialCharacters().indexOf(t)&&(n+="\\"),n+=t}return new RegExp(n,t||"")};export function runOnWindowLoad(e){"complete"===document.readyState||"interactive"===document.readyState?e():window.addEventListener("DOMContentLoaded",(function t(){window.removeEventListener("DOMContentLoaded",t,!1),e()}),!1)}export function assertNever(e,t){throw new Error(t)}self.base64ToSize=function(e){if(!e)return 0;let t=3*e.length/4;return"="===e[e.length-1]&&t--,e.length>1&&"="===e[e.length-2]&&t--,t};