YUI.add("substitute",function(o,t){var f=o.Lang,l=/(~-(\d+)-~)/g,c=/\{LBRACE\}/g,O=/\{RBRACE\}/g,n=function(t,n,e,s){for(var r,i,u,g,a,d,p=[],b=t.length;!((r=t.lastIndexOf("{",b))<0||(i=t.indexOf("}",r))<=r+1);)g=null,-1<(u=(d=a=t.substring(r+1,i)).indexOf(" "))&&(g=d.substring(u+1),d=d.substring(0,u)),u=n[d],e&&(u=e(d,u,g)),f.isObject(u)?u=o.dump&&(f.isArray(u)||(-1<(d=(g=g||"").indexOf("dump"))&&(g=g.substring(4)),u.toString===Object.prototype.toString)||-1<d)?o.dump(u,parseInt(g,10)):u.toString():f.isUndefined(u)&&(u="~-"+p.length+"-~",p.push(a)),t=t.substring(0,r)+u+t.substring(i+1),s||(b=r-1);return t.replace(l,function(t,n,e){return"{"+p[parseInt(e,10)]+"}"}).replace(c,"{").replace(O,"}")};o.substitute=n,f.substitute=n},"patched-v3.18.7",{requires:["yui-base"],optional:["dump"]});