z.l(re,Da);function re(a){this.Init(a)}v("AdfAutoSaveBehavior",re);re.da=function(){this.zKa=3E5;this.NLa=3E4};v("AdfAutoSaveBehavior.InitClass",re.da);re.prototype.Init=function(a){re.f.Init.call(this);a=a||re.zKa;this.wXa=Math.max(re.NLa,a)};z.a("AdfAutoSaveBehavior.prototype.Init",{Init:re.prototype.Init});
re.prototype.za=function(a){B.assert(a instanceof AdfUIEditableValue,"Component must be an instance of AdfUIEditableValue");this.ab=a;this.ZO=this.KO=n;a.addEventListener(Ra.k4,this.G_a,this);!a.getReadOnly()&&!a.getDisabled()&&se(this)};z.a("AdfAutoSaveBehavior.prototype.initialize",{za:re.prototype.za});function se(a){var b=a.ab;b.addEventListener(I.qd,a.AZ,a);b.addEventListener(I.Xf,a.AZ,a);b.addEventListener(I.ec,a.zZ,a);b.addEventListener(I.Xc,a.zZ,a)}
re.prototype.G_a=function(a){var b=a.kJ();if("disabled"==b||"readOnly"==b)a.Ou()?(a=this.ab,te(this),this.ZO=n,a.removeEventListener(I.qd,this.AZ,this),a.removeEventListener(I.Xf,this.AZ,this)):se(this)};re.prototype.zZ=function(){this.ZO==n&&(this.ZO=ue(this),this.ab.removeEventListener(I.ec,this.zZ,this),this.ab.removeEventListener(I.Xc,this.zZ,this))};re.prototype.AZ=function(){te(this);var a=this;this.KO=setTimeout(function(){var b=ue(a);a.KO=n;a.ZO!=b&&Cb.v(a.ab,"_autoSave",{B9a:b},l,l)},this.wXa)};
function te(a){a.KO&&(clearTimeout(a.KO),a.KO=n)}function ue(a){a=a.ab;var b=a.k();return"oracle.adf.RichTextEditor"===a.getComponentType()?b.JC(a):b.cb(a)}re.mVa=function(a){a=a.YQ();var b=n;if(ya.isArray(a))for(var d=a.length,e=0;e<d;e++){if(a[e]instanceof re){b=a[e];break}}else a instanceof re&&(b=a);return b};re.M4a=function(a){if(a=F.c.j(a))if(a=this.mVa(a))te(a),a.ZO=ue(a)};v("AdfAutoSaveBehavior.removeTimer",re.M4a);