function gb(){this.Init()}m("AdfMarshalingService",gb);r.v(gb);gb.prototype.Init=function(){gb.h.Init.call(this);this.P7={}};r.a("AdfMarshalingService.prototype.Init",{Init:gb.prototype.Init});gb.prototype.Zta=function(a){var b=a.P7,d=this.P7,e;for(e in b)d[e]={name:b[e],encoder:a}};r.a("AdfMarshalingService.prototype.registerEncoder",{Zta:gb.prototype.Zta});
gb.prototype.Ry=function(a,b,d){var e=Cf(this,b.constructor);null==e&&(e=Cf(this,Object));if(null==d)d=new gb.Lfa;else{var f;a:{f=d.stack;for(var g=f.length,h=0;h<g;h++){var l=f[h];if(l===b&&b.constructor===l.constructor){f=!0;break a}}f=!1}if(f)return null}d.push(b);f=e.Bvb;e=gb.l4(a.ownerDocument,e.name);a.appendChild(e);f.encode(e,b,d,this);d.pop(b);return e};r.a("AdfMarshalingService.prototype.marshal",{Ry:gb.prototype.Ry});
gb.getDefault=function(){var a=gb.Sbb;a||(a=new gb,a.Zta(new gb.Je),gb.Sbb=a);return a};m("AdfMarshalingService.getDefault",gb.getDefault);function Cf(a,b){return a.P7[b===String?"String":b===Boolean?"Boolean":b===Number?"Number":b===Array?"Array":b===Date?"Date":G.prototype.isPrototypeOf(b.prototype)?"AdfUIComponent":w===b?"AdfKeyStroke":"Object"]}
gb.l4=function(a,b){var d=q.b;return d.S()==q.ia&&11>d.Ib()?a.createNode(1,b,"http://oracle.com/richClient/comm"):a.createElementNS("http://oracle.com/richClient/comm",b)};gb.Lfa=function(){this.stack=[]};gb.Lfa.prototype.push=function(a){this.stack.push(a)};gb.Lfa.prototype.pop=function(){return this.stack.pop()};
gb.Je=function(){var a={};a.Number=gb.Je.TWa;a.Boolean=gb.Je.tWa;a.String=gb.Je.dXa;a.Date=gb.Je.AWa;a.Array=gb.Je.kWa;a.Object=gb.Je.NWa;a.AdfUIComponent=gb.Je.eWa;a.AdfKeyStroke=gb.Je.dWa;this.P7=a};gb.Je.lWa="o";gb.Je.oya="k";gb.Je.yza="v";gb.Je.yWa="n";gb.Je.TWa="n";gb.Je.tWa="b";gb.Je.dXa="s";gb.Je.AWa="d";gb.Je.kWa="a";gb.Je.NWa="m";gb.Je.eWa="AdfUIComponent";gb.Je.dWa="AdfKeyStroke";
gb.Je.prototype.encode=function(a,b,d,e){var f=null,g=a.ownerDocument,h=b.constructor;if(h==String||h==Number)f=b;else if(h==Boolean)f=b?"1":"0";else if(h==Date)f=b.getTime();else if(h==Array){for(var l=0;l<b.length;l++)h=null,null!=b[l]&&(h=e.Ry(a,b[l],d)),null==h&&a.appendChild(gb.l4(g,gb.Je.lWa));a.setAttribute(gb.Je.yWa,b.length)}else if(h==Object)for(l in b)h=gb.l4(g,gb.Je.oya),h.setAttribute(gb.Je.yza,l),a.appendChild(h),null!=b[l]&&e.Ry(h,b[l],d);else if(G.prototype.isPrototypeOf(b))f=b.g();
else if(w.prototype.isPrototypeOf(b))f=b.Ps();else for(var n in b)try{var t=b[n];if(null!=t&&"function"!=typeof t){var y=gb.l4(g,gb.Je.oya);y.setAttribute(gb.Je.yza,n);a.appendChild(y);e.Ry(y,t,d)}}catch(z){v.l.Ge(z,"Error in marshaling object")}null!=f&&a.appendChild(g.createTextNode(f.toString()))};