(function(){'use strict';module.exports=function(a){var b=require(a);return by.addLocator('css_sr',function(a,b){let c=a.split('::sr');if(0===c.length)return[];let d=document.head.createShadowRoot||document.head.attachShadow,e=a=>a&&d?a.shadowRoot:a,f=function(a,b,c){let d,f,g=[];for(f=0;f<b.length;++f)d=c?b[f]:e(b[f]),d&&(''===a?g.push(d):Array.prototype.push.apply(g,d.querySelectorAll(a)));return g},g=f(c.shift().trim(),[b||document],!0);for(;0<c.length&&0<g.length;)g=f(c.shift().trim(),g,!1);return g}),{findElement:function(a,c,d){var e=b[a][c],f=e.locatorType,g=e.locatorValue,h=e.locatorCSS;if(d&&('string'==typeof d&&(g=g.replace('replaceText',d)),'object'==typeof d))for(var i in d)g=g.replace(i,d[i]);return'css_sr'===f?element(by.css_sr(g)):'css_sr_all'===f?element.all(by.css_sr(g)):'id'===f?element(by.id(g)):'idArray'===f?element.all(by.id(e.value.locatorValue)).get(e.value.index):'css'===f?element.all(by.css(g)).get(0):'cssArray'===f?element.all(by.css(e.value.locatorValue)).get(e.value.index):'cssAll'===f?element.all(by.css(g)):'name'===f?element(by.name(g)):'className'===f?element(by.className(g)):'xpath'===f?element(by.xpath(g)):'linkText'===f?element(by.linkText(g)):'buttonText'===f?element(by.buttonText(g)):'binding'===f?element(by.binding(g)):'exactBinding'===f?element(by.exactBinding(g)):'model'===f?element(by.model(g)):'partialButtonText'===f?element(by.partialButtonText(g)):'repeater'===f?element.all(by.repeater(g)):'exactRepeater'===f?element(by.exactRepeater(g)):'cssContainingText'===f?element(by.cssContainingText(h,g)):'options'===f?element.all(by.options(g)):'deepCss'===f?element.all(by.deepCss(g)):'tagName'===f?element(by.tagName(g)):'partialLinkText'===f?element(by.partialLinkText(g)):element(by.id(g))},browserFindElement:function(a,c){var d=b[a][c],e=d.locatorType,f=d.locatorValue,g=d.locatorCSS;return'id'===e?browser.findElement(by.id(f)):'idArray'===e?browser.findElements(by.id(d.value.locatorValue)).get(d.value.index):'css'===e?browser.findElements(by.css(f)).get(0):'cssArray'===e?browser.findElements(by.css(d.value.locatorValue)).get(d.value.index):'cssAll'===e?browser.findElements(by.css(f)):'name'===e?browser.findElement(by.name(f)):'className'===e?browser.findElement(by.className(f)):'xpath'===e?browser.findElement(by.xpath(f)):'linkText'===e?browser.findElement(by.linkText(f)):'buttonText'===e?browser.findElement(by.buttonText(f)):'binding'===e?browser.findElement(by.binding(f)):'exactBinding'===e?browser.findElement(by.exactBinding(f)):'model'===e?browser.findElement(by.model(f)):'partialButtonText'===e?browser.findElement(by.partialButtonText(f)):'repeater'===e?browser.findElements(by.repeater(f)):'exactRepeater'===e?browser.findElement(by.exactRepeater(f)):'cssContainingText'===e?browser.findElement(by.cssContainingText(g,f)):'options'===e?browser.findElements(by.options(f)):'deepCss'===e?browser.findElements(by.deepCss(f)):'tagName'===e?browser.findElement(by.tagName(f)):'partialLinkText'===e?browser.findElement(by.partialLinkText(f)):browser.findElement(by.id(f))}}}})();