var AdfLocators={findComponentByAbsoluteLocator:function(a,b){AdfAssert.assertNonEmptyString(b);var d=a.findComponent(b);if(d)return d;window.AdfDhtmlIteratorPeer&&(b=AdfDhtmlIteratorPeer.fixupIteratorAbsoluteLocator(b));d=b.lastIndexOf(":");d=-1==d?b:b.substring(d+1);return AdfLocators._findComponentByAbsoluteLocator(a,d,b)},findComponentOrAncestorByAbsoluteLocator:function(a,b){for(window.AdfDhtmlIteratorPeer&&(b=AdfDhtmlIteratorPeer.fixupIteratorAbsoluteLocator(b));b.length;){var d=a.findComponent(b);
if(d)return d;var d=b.lastIndexOf(":"),e=-1==d?b:b.substring(d+1);if(e){var f=e.length;"]"===e.charAt(f-1)&&(f=e.lastIndexOf("[",f-2),0<=f&&(e=e.substring(0,f),b=b.substring(0,d+1+f)));if(e&&(e=AdfLocators._findComponentByAbsoluteLocator(a,e,b)))return e}if(1>d)break;":"===b.charAt(d-1)&&d--;b=b.substring(0,d)}return null},findComponentByComplexLocator:function(a,b){var d=a.findComponentByAbsoluteLocator(b);if(!d){var e=AdfLocators._findComponentsByWildcardLocator(b);1==e.length&&(d=e[0])}return d},
findComponentsByComplexLocator:function(a,b){var d=a.findComponentByAbsoluteLocator(b),e;d?(e=[],e.push(d)):e=AdfLocators._findComponentsByWildcardLocator(b);return e},_findComponentByAbsoluteLocator:function(a,b,d){var e=b.length;a=a.getClientIdToComponentMap();for(var f in a)if(e<=f.length&&f.substring(f.length-e)===b){var g=a[f];if(g&&g.getAbsoluteLocator()===d)return g}return null},_findComponentsByWildcardLocator:function(a){var b=0<=a.indexOf("*");b||(b=0<=a.indexOf("("))||(b=!/\[\d+\]/.test(a));
return b?AdfLocators._findComponentsByParsedWildcardLocator(a):[]},_findComponentsByParsedWildcardLocator:function(a){var b=[],d=[];AdfLocators._buildMatchers(a,b,d);return AdfLocators._executeMatchers(b,d)},_buildMatchers:function(a,b,d){var e=a.length,f=0;do f=AdfLocators._parseLocator(a,f,b,d);while(f<e)},_parseLocator:function(a,b,d,e){for(var f=a.length,g=b;g<f;g++){var h=a.charAt(g);switch(h){case "[":case "(":var k="["==h,h=AdfLocators._getBracketedExpression(a,g+1,h,k?"]":")");k&&AdfLocators._isIndex(h)?
g+=h.length+1:(k&&AdfLocators._addNameMatcher(a,b,g,d),k=!AdfLocators._isWildcardExpression(h),g+=h.length+1,b=g+1,k&&AdfLocators._parseExpression(h,d[d.length-1].context.filterId,e));break;case "*":return AdfLocators._addNameMatcher(a,b,g,d)}}return AdfLocators._addNameMatcher(a,b,g,d)},_getBracketedExpression:function(a,b,d,e){for(var f=a.length,g=1,h=!1,k=!1,l=!1,m=!1,n=b;n<f;n++){var q=a.charAt(n);if(e===q){if(!h&&(g--,!g))return a.substring(b,n)}else d===q?h||g++:"'"===q?m?m=!1:l||(h=k=!k):'"'===
q?m?m=!1:k||(h=l=!l):h&&"\\"===q&&!m?m=!0:m&&(m=!1)}throw Error("Missing '"+e+"' in "+a);},_matchComponentByName:function(a){a=a.getAbsoluteLocator();var b=0,d=this.input;d&&(b=d[a]);var e=this.name,d=b+e.length,b=a.substring(b,d);if(e!==b)return 0;b=a.length;if(this.wildcarded)for(e=this.arrayWildcarded?"]":":[";d<b;d++){var f=a.charAt(d);if(0<=e.indexOf(f)){"]"==f&&d++;break}}else if(d!=b)return 0;b=this.output;null==b&&(this.output=b={});b[a]=d;return 1},_addNameMatcher:function(a,b,d,e){var f=
!1,g=!1,h=d,k=d;if(d<a.length){var l=a.charAt(d);if("*"===l)switch(f=!0,h=d+1,a.charAt(h)){case "":case ":":case "[":case "(":break;default:throw Error("Invalid character after wildcard in "+a);}else if("["===l||"("===l)g=f=!0,k++,"["==l&&d++}a={filterId:a.substring(0,k),name:a.substring(b,d),wildcarded:f,arrayWildcarded:g};e.push({filter:AdfLocators._matchComponentByName,context:a});return h},_parseExpression:function(a,b,d){conditionMatcherContext={matcherId:b,expression:a};d.push({filter:AdfLocators._matchByExpression,
context:conditionMatcherContext})},_matchByExpression:function(a){try{return function(){return this.expression}.call(a)}catch(b){AdfLogger.LOGGER.severe("Error: "+b.message+"\nOriginal expression was: "+this.expression+"\nCurrent component locator: "+a.getAbsoluteLocator())}},_isIndex:function(a){return!/\s*\D+\s*/.test(a)},_isWildcardExpression:function(a){return!/\s*[^\*]\s*/.test(a)},_executeConditionMatchers:function(a,b,d){for(var e=AdfPage.PAGE,f=a.length,g=0;d.length&&g<f;g++){var h=a[g],k=
h.context;k.filterOutput=b;d=e.reduceMatchedComponents(d,h.filter,k)}return d},_executeNameMatchers:function(a,b){var d=a.length;if(!d)return[];for(var e=AdfPage.PAGE,f=a[0],g=f.context,h=e.matchComponents(f.filter,g),k=1;0<h.length&&k<d;){if(f=g.filterId)b[f]=g.output;var f=a[k],l=f.context;l.input=g.output;h=e.reduceMatchedComponents(h,f.filter,l);g=l;k++}return h},_executeMatchers:function(a,b){var d={},e=AdfLocators._executeNameMatchers(a,d);return 0==e.length?[]:AdfLocators._executeConditionMatchers(b,
d,e)}};