// generate a function that can be used to query shadowRootsexport const shadowFnFactory = function(elementSelector: string, qsAll = false) {const strFn = /*js*/`(function() {// element has a shadowRoot propertyif (this.shadowRoot) {return this.shadowRoot.querySelector${qsAll ? 'All' : ''}('${elementSelector}')}// fall back to querying the element directly if notreturn this.querySelector${qsAll ? 'All' : ''}('${elementSelector}')})`return (0, eval)(strFn)}