var BaseFE=function(){
};
BaseFE.prototype={server:null,client:null,nextId:0,factory:null,serverName:null,isServer:false,EMPTY_FUNC:function(){
},initServer:function(){
this.makeLogger(framework.core.Class.prototype,"framework.core.Class");
this.envId=FE.server.getEnvironmentId();
this.envDate=new Date();
FE.Factory=FE.server.getServerFactory();
FE.Modules=FE.Factory.getModules();
FE.FileSystem=FE.Class.forName("framework.server.FileSystem").getInstance();
FE.DependencyManager=FE.Factory.getDependencyManager();
FE.ChecksumProvider=FE.Factory.getChecksumProvider();
FE.ClientBundles=FE.Factory.getClientBundles();
this.server=this.Factory.getServerEnvironment();
this.server.initServer();
},initClient:function(_1){
this.Factory=FE.Class.forName(_1.factoryType).getInstance();
this.client=FE.Factory.getClientEnvironment();
this.client.initClient(_1);
this.contextPath=_1.contextPath;
this.envId=_1.envId;
},getServerName:function(){
return FE.server?requestContext.serverName:FE.client.getServerName();
},getServerPort:function(){
return FE.server?requestContext.serverPort:FE.client.getServerName();
},isSecure:function(){
return FE.server?requestContext.secure:FE.client.isSecure();
},getServerPrefix:function(_2){
var _3=this.getServerPort();
if(_2==null){
_2=this.isSecure();
}else{
if(_2!=this.isSecure()){
_3=-1;
}
}
_3=_3==-1?"":(":"+_3);
return (_2?"https://":"http://")+this.getServerName()+_3;
},isEmpty:function(o){
return o==null?true:(new String(o).trim().length==0);
},getUniqueId:function(){
var _4=this.nextId;
this.nextId++;
return _4;
},cssMatch:/\.css/,jsMatch:/\.js/,isCSSPath:function(_5){
return FE.cssMatch.test(_5);
},isJSPath:function(_6){
return FE.jsMatch.test(_6);
},namespace:function(_7){
var _8=_7.split(".");
var _9=this.getGlobalScope();
for(var i=0;i<_8.length;i++){
var _a=_8[i];
if(_9[_a]==null){
_9[_a]=new Object();
}
_9=_9[_a];
}
},getGlobalScope:function(){
return this.isServer?__server.getGlobalScope():window;
},logger:function(_b){
if(this.server){
return FE.Class.newInstance("framework.server.ServerLogger",_b);
}else{
if(framework&&framework.client){
return framework.client.ClientEnvironment.logger(_b);
}else{
return null;
}
}
},getContextPath:function(){
return FE.server?FE.server.getRequestScope().contextPath:this.contextPath;
},getServletPath:function(){
return FE.server?requestContext.servletPath:FE.client.servletPath;
},getContextRelativeUrl:function(_c){
if(FE.Array.isArray(_c)){
FE.Array.forEach(_c,function(u,i){
_c[i]=this.getContextRelativeUrl(u);
},this);
return _c;
}
if(_c==null){
return null;
}
if(_c.startsWith("#")||_c.startsWith("javascript:")||!_c.startsWith("/")||_c.indexOf("://")!=-1){
return _c;
}
return FE.getContextPath()+(_c.startsWith("/")?_c:("/"+_c));
},alert:function(_d,_e){
if(_e===undefined){
_e=null;
}
if(this.server){
__server.alert(_d,_e);
}else{
alert(_e?(_e+": "+_d):_d);
}
},makeLogger:function(_f,_10){
if(typeof _f==="function"){
_f=_f.prototype;
_10=_f.__className__;
}
delete _f.noLogger;
_10=_10||_f.__className__;
if(_10==null){
return;
}
var _11=FE.logger(_10);
if(_11){
_f._logger=_11;
FE.Object.extend(_f,FE.loggerFunctions);
}
},encodeURIComponent:function(c){
return this.server?this.server.encodeURIComponent(c):encodeURIComponent(c);
},decodeURIComponent:function(c){
return this.server?this.server.decodeURIComponent(c):decodeURIComponent(c);
},getUserClassKey:function(){
return this.server?requestContext.getUserClassKey():FE.client.getUserClassKey();
},url:function(_12,_13,_14){
if(_12==null){
return null;
}
if(_12.startsWith("#")||_12.startsWith("javascript:")){
return _12;
}
if(_14==null){
_14={};
}
var _15=FE.Class.newInstance("framework.core.StringBuilder");
var _16=_14.contextRelative!==false;
var _17=_14.secure;
var _18=_14.hostname;
var _19=_14.port;
var _1a=_14.includeUserClass===true;
var _1b=_14.useQueryString===true;
if(_17===FE.isSecure()){
_17=undefined;
}
if(_12.indexOf(":")==-1){
if((_14.makeAbsolute||(_17||_18||_19))&&_12.indexOf("://")===-1){
_17=_14.secure===undefined?FE.isSecure():_14.secure;
_18=_14.hostname||FE.getServerName();
_19=_14.port||FE.getServerPort();
_15.append(_17?"https://":"http://");
_15.append(_18);
if(_19!=null){
_15.append(":");
_15.append(_19);
}
}
if(_16){
_15.append(this.getContextPath());
}
if(_1a){
var uc=this.getUserClassKey();
if(uc!=null){
_15.append("/");
_15.append(uc);
}
}
}
_15.append(_12);
if(_13!=null){
if(_1b){
this._addQueryStringParams(_15,_13,_12);
}else{
this._addURLParams(_15,_13,_12);
}
}
return _15.toString();
},_addURLParams:function(_1c,_1d,_1e){
var _1f=this.urlParams(_1d);
if(_1f.length!=0){
if(_1e.endsWith("/")===false){
_1c.append("/");
}
_1c.append(_1f);
_1c.append("/");
}
},urlParams:function(_20){
var _21=[];
FE.Object.forEachEntry(_20,function(k,v){
if(v==null){
return;
}
_21.push(FE.encodeURIComponent(k)+(v!=null?"="+FE.encodeUrlParamValue(v):""));
},this);
_21=_21.join("/");
return _21;
},encodeUrlParamValue:function(v){
return FE.encodeURIComponent(FE.encodeURIComponent(v));
},_addQueryStringParams:function(_22,_23,_24){
var _25=this.queryString(_23);
if(_25.length!=0){
if(_24.indexOf("?")==-1){
_22.append("?");
_22.append(_25);
}else{
if(_24.charAt(_24.length-1)=="?"){
_22.append(_25);
}else{
if(_24.charAt(_24.length-1)=="&"){
_22.append(_25);
}else{
_22.append("&");
_22.append(_25);
}
}
}
}
},queryString:function(_26){
var _27=[];
for(var _28 in _26){
if(_26.hasOwnProperty(_28)===false){
continue;
}
var _29=_26[_28];
if(_29==null){
continue;
}
_27.push(FE.encodeURIComponent(_28)+(_29!=null?"="+FE.encodeURIComponent(_29):""));
}
_27=_27.join("&");
return _27;
},getTemplateManager:function(){
return FE.Factory.getTemplateManager();
},registerTemplate:function(p,t){
var tm=FE.getTemplateManager();
tm.registerTemplate(p,t);
},encodeHTML:function(s){
if(s==null||s.length==0){
return "";
}
var sb=new framework.core.StringBuilder();
var i;
var len=s.length;
for(i=0;i<len;i++){
var c=s.charAt(i);
switch(c){
case "\n":
sb.append("&#"+s.charCodeAt(i)+";");
break;
case "\"":
sb.append("&quot;");
break;
case "&":
sb.append("&amp;");
break;
case "<":
sb.append("&lt;");
break;
case ">":
sb.append("&gt;");
break;
default:
var _2a=s.charCodeAt(i);
if(_2a<" ".charCodeAt(0)||_2a>"}".charCodeAt(0)){
sb.append("&#"+_2a+";");
}else{
sb.append(c);
}
break;
}
}
return sb.toString();
},createEventClass:function(_2b){
_2b.innerClass=true;
},initLogger:function(){
this.makeLogger(BaseFE.prototype,"FE");
},throwError:function(_2c,_2d){
var _2e;
if(FE.server){
var _2f=function(_30){
return FE.getStackTrace().split("\n").slice(_30).join("\n");
};
_2e=new Error(_2c);
_2e.stackTrace=_2f(4);
if(arguments.length===2){
_2e.cause=_2d;
if(_2d.rhinoException==null&&_2d.stackTrace==null){
_2d.stackTrace="(stack trace not available)";
}
}else{
if(arguments.length===1){
if(_2c instanceof Error){
_2e=_2c;
if(_2e.rhinoException==null){
_2e.stackTrace=FE.getStackTrace(_2e);
}else{
_2e.originalRhinoException=_2e.rhinoException;
}
}
}
}
}else{
if(arguments.length===2){
_2e=new Error(_2c);
_2e.stackTrace=FE.client.getStackTrace(undefined,2);
_2e.cause=_2d;
if(_2d.__logged!==true){
this.error(_2d.toString(),_2d);
}
this.error(_2c,_2e);
}else{
if(arguments.length===1){
if(_2c instanceof Error){
_2e=_2c;
if(_2e.__logged!==true){
_2e.__logged=true;
this.error(_2e.toString(),_2e);
}
}else{
_2e=new Error(_2c);
_2e.stackTrace=FE.client.getStackTrace(undefined,2);
_2e.__logged=true;
this.error(_2e.toString(),_2e);
}
}
}
}
throw _2e;
},getStackTrace:function(_31){
if(FE.server){
return FE.server.getStackTrace(_31);
}else{
return FE.client.getStackTrace(_31);
}
},safeCall:function(_32,_33,_34,_35){
if(_34==null){
_34=[];
}
var _36=undefined;
if(FE.server){
_36=_32[_33].apply(_32,_34);
}else{
try{
_36=_32[_33].apply(_32,_34);
}
catch(e ){
_35=_35||"An exception has occured when calling \""+_33+"\"";
_35+="\nMessage: "+FE.getErrorMessage(e);
if(_32.error){
_32.error(_35,e);
}else{
if(this.error){
this.error(_35,e);
}
}
throw e;
}
}
return _36;
},getErrorMessage:function(e){
return e.message;
},defineEvents:function(_37){
var _38={};
_38.methods={};
_38.properties={};
FE.Object.forEachEntry(_37,function(k,v){
switch(k){
case "name":
_38.name=v;
break;
case "externalEvents":
_38.properties[k]=v;
break;
default:
var _39={};
_39.innerClass=true;
_39.superclass="framework.client.DOMEvent";
_39.name=_38.name+"."+k;
_39.methods=v;
var _3a=FE.Class.create(_39);
_38.properties[k]=_3a;
break;
}
},this);
FE.Class.create(_38);
},parseInt:function(n){
if(n==null){
return n;
}else{
return parseInt(n);
}
},loggerFunctions:{alert:function(_3b){
this._logger.alert.apply(this._logger,arguments);
},dump:function(_3c){
this._logger.dump.apply(this._logger,arguments);
},debug:function(_3d){
this._logger.debug.apply(this._logger,arguments);
},info:function(_3e){
this._logger.info.apply(this._logger,arguments);
},warn:function(_3f){
this._logger.warn.apply(this._logger,arguments);
},error:function(_40){
this._logger.error.apply(this._logger,arguments);
},fatal:function(_41){
this._logger.fatal.apply(this._logger,arguments);
},trace:function(_42){
this._logger.trace.apply(this._logger,arguments);
},isDebugEnabled:function(){
return this._logger.isDebugEnabled();
},isInfoEnabled:function(){
return this._logger.isInfoEnabled();
},isWarnEnabled:function(){
return this._logger.isWarnEnabled();
},isErrorEnabled:function(){
return this._logger.isErrorEnabled();
},isFatalEnabled:function(){
return this._logger.isFatalEnabled();
}},getType:function(_43){
return _43==null?"null":(FE.Array.isArray(_43)?"array":(typeof _43));
},buildUserClassKey:function(_44){
if(_44==null){
return null;
}
var _45=FE.server?FE.server.getMembershipKeyEntries(_44):FE.client.getMembershipKeyEntries(_44);
FE.Array.forEach(_45,function(e){
e.sortStr=e.key+e.value;
});
_45.sort(function(a,b){
a=a.sortStr;
b=b.sortStr;
return ((a<b)?-1:((a>b)?1:0));
});
var key=FE.Class.newInstance("framework.core.StringBuilder");
FE.Array.forEach(_45,function(e,i){
var k=e.key;
if(key.length>0){
key.append("/");
}
key.append(k);
key.append("=");
key.append(e.value);
},this);
key=key.toString();
return key;
},convertType:function(_46,_47){
var _48=this.getType(_46);
if(_47==null||_47=="null"||_47=="object"){
return _46;
}
switch(_47){
case "string":
switch(_48){
case "string":
break;
case "boolean":
case "number":
case "object":
_46=""+_46;
break;
case "null":
break;
case "array":
_46==_46.length>0?this.convertType(_46[0]):null;
break;
}
break;
case "boolean":
switch(_48){
case "string":
_46=_46==="true";
break;
case "boolean":
break;
case "number":
_46=_46!=0;
break;
case "object":
break;
case "null":
break;
case "array":
_46==_46.length>0?this.convertType(_46[0]):null;
break;
}
break;
case "number":
switch(_48){
case "string":
_46=parseFloat(_46);
break;
case "boolean":
_46=_46?1:0;
break;
case "number":
case "object":
case "null":
break;
case "array":
_46==_46.length>0?this.convertType(_46[0]):null;
break;
}
break;
case "array":
switch(_48){
case "string":
case "boolean":
case "number":
case "object":
_46=[_46];
break;
case "null":
break;
case "array":
break;
}
break;
}
return _46;
},currentTimeMillis:function(){
return FE.server?FE.server.currentTimeMillis():FE.client.currentTimeMillis();
},captureTime:function(_49,_4a,_4b,_4c){
if(FE.server){
requestContext.profiler.capture.apply(requestContext.profiler,arguments);
}else{
_49.call(_4a);
}
},prepareAsyncCallback:function(cfg,_4d,_4e){
return FE.Class.newInstance("framework.client.AsyncCallback",cfg,_4d,_4e);
},forEach:function(o,_4f,_50){
if(FE.Array.isArray(o)){
FE.Array.forEach(o,_4f,_50);
}else{
if(FE.Object.isObject(o)){
FE.Object.forEachEntry(o,_4f,_50);
}else{
_4f.call(_50,o);
}
}
}};
var FE=new BaseFE();

FE.namespace("framework.core");
framework.core.Class=function(){
};
framework.core.Class.prototype={classLookup:{},_lock:FE.server?new java.util.concurrent.locks.ReentrantLock():null,lock:function(){
if(this._lock!=null){
this._lock.lock();
}
},unlock:function(){
if(this._lock!=null){
this._lock.unlock();
}
},forName:function(_1,_2){
if(typeof _1!=="string"){
return _1;
}
var _3=this.classLookup[_1];
if(_3===undefined){
if(this.debug&&this.isDebugEnabled()){
this.debug("forName: Class not found \""+_1+"\"... Creating...");
}
this.lock();
try{
if(FE.server){
_3=this.classLookup[_1];
if(_3!=null){
return _3;
}
}
_3=this.resolveConstructor(_1,true);
if(_3!=null){
this.register(_1,_3);
}else{
if(FE.isServer){
var _4=FE.server.maybeEvaluateClassFile(_1);
if(_4){
_3=this.resolveConstructor(_1);
if(_3==null){
FE.throwError("Class with name \""+_1+"\" not found in class file.");
}
this.register(_1,_3);
}
if(_3==null){
if(this.debug&&this.isDebugEnabled()){
this.debug("forName: Class does not exist \""+_1+"\". Returning null");
}
this.classLookup[_1]=null;
}
}
}
}
finally{
this.unlock();
}
}
if(FE.client&&_3!=null&&_3.hasOwnProperty("__inheritUnfinished__")){
var _5=_3.__superclassName__;
delete _3.__inheritUnfinished__;
this.inherit(_1,_5);
if(_3.__inheritUnfinished__!==undefined&&_2!==true){
FE.throwError("Unable to inherit. superclass with name \""+_5+"\" not found. Subclass: "+_1);
}
}
return _3;
},require:function(_6){
this.forName(_6);
},getInstance:function(_7){
var _8=this.forName(_7);
if(_8==null){
FE.throwError("Class.getInstance failed. Class not found with name: "+_7);
}
return _8.getInstance();
},newInstance:function(_9,_a){
var _b=this.forName(_9);
if(_b==null){
FE.throwError("Unable to make instance of class. Class not found with name \""+_9+"\".");
}
var _c=arguments.length>1?Array.prototype.slice.call(arguments,1):[];
var _d=_b.newInstance.apply(_b,_c);
return _d;
},register:function(_e,_f){
if(_e==null||this.classLookup[_e]===undefined){
if(_f==null){
_f=resolveConstructor(_e);
}
var _10=_e!=null?("/"+_e.substring(0,_e.lastIndexOf(".")).replace(/\./g,"/")):null;
_f.prototype.__className__=_e;
_f.prototype.constructor=_f;
_f.__className__=_e;
_f.__classDir__=_10;
if(!_f.prototype.hasOwnProperty("noLogger")||_f.prototype.noLogger===false){
FE.makeLogger(_f.prototype);
}
_f.newInstance=this._newInstance;
_f.getInstance=this._getInstance;
_f.isInstance=this._isInstance;
if(_f&&!_f.hasOwnProperty("__initialized")){
if(_f.initClass){
_f.initClass();
}
_f.__initialized=true;
}
if(_e!=null){
this.classLookup[_e]=_f;
}
}
},defaultToString:function(){
return this.__className__;
},exists:function(_11){
return this.forName(_11)!=null;
},emptyFunction:function(){
},createInnerClass:function(_12){
_12.innerClass=true;
return this.create(_12);
},create:function(_13){
if(this.debug&&this.isDebugEnabled()){
this.debug("Creating class with name "+_13.name);
}
var _14=_13.name;
if(_14==null&&_13.innerClass!=true){
FE.throwError("The \"name\" is required when creating a class. Methods: "+JSON.stringify(FE.Object.keys(_13.methods)));
}
var _15=_13.init;
var _16=function(){
var i;
for(i in this.__properties__){
if(this.__properties__.hasOwnProperty(i)){
this[i]=this.__properties__[i];
}
}
};
_16.prototype={};
var _17=_13.methods;
if(_17!=null){
FE.Object.extend(_16.prototype,_17);
}
var _18=_13.properties;
_16.prototype.__properties__=_18||{};
_16.prototype.__className__=_14;
if(_15!==undefined){
_16.prototype.init=_15;
}
var i;
if(_13.prototypeProperties){
for(i in _13.prototypeProperties){
if(_13.prototypeProperties.hasOwnProperty(i)){
_16.prototype[i]=_13.prototypeProperties[i];
}
}
}
if(_13.staticProperties){
for(i in _13.staticProperties){
if(_13.staticProperties.hasOwnProperty(i)){
_16[i]=_13.staticProperties[i];
}
}
}
if(_13.staticMethods){
for(i in _13.staticMethods){
if(_13.staticMethods.hasOwnProperty(i)){
_16[i]=_13.staticMethods[i];
}
}
}
_16.prototype.constructor=_16;
if(this.debug&&this.isDebugEnabled()){
this.debug("Registering class with name "+_14);
}
this.register(_14,_16);
var _19=_13.superclass;
if(_19!=null){
this.inherit(_16,_19);
}
return _16;
},_getInstance:function(){
if(this.hasOwnProperty("__instance__")===false){
FE.Class.lock();
try{
if(this.hasOwnProperty("__instance__")===false){
this.__instance__=this.newInstance();
}
}
finally{
FE.Class.unlock();
}
}
return this.__instance__;
},_newInstance:function(){
var _1a=framework.core.Class.prototype;
var obj=new this();
if(obj.init){
obj.init.apply(obj,arguments);
}
return obj;
},_isInstance:function(obj){
if(obj==null){
return false;
}
return obj instanceof this;
},inherit:function(_1b,_1c){
var _1d=this.forName(_1b,true);
var _1e=this.forName(_1c,true);
if(this.debug&&this.isDebugEnabled()){
this.debug("inheriting: "+(FE.String.isString(_1b)?_1b:_1b.__className__)+" - "+(FE.String.isString(_1c)?_1c:_1c.__className__));
}
if(_1d==null){
FE.throwError("Unable to inherit. subclass with name \""+_1b+"\" not found.");
}
_1d.__superclassName__=_1c;
if(_1c!=null&&(_1e==null||_1e.hasOwnProperty("__inheritUnfinished__")===true)){
_1d.__inheritUnfinished__=true;
return;
}
var _1f=_1d.prototype;
var F=function(){
};
F.prototype=_1e.prototype;
_1d.prototype=new F();
_1d.superclass=_1e.prototype;
_1d.prototype.constructor=_1d;
for(var i in _1f){
if(_1f.hasOwnProperty(i)){
_1d.prototype[i]=_1f[i];
}
}
},_objectToString:function(){
return "[Object: "+this.__className__+"]";
},resolveConstructor:function(_20,_21){
var _22=this.classLookup[_20];
if(_22!=null){
return _22;
}
var _23=_20.split(".");
var _24=FE.isServer?FE.server.getGlobalScope():window;
for(var i=0;i<_23.length;i++){
var _25=_23[i];
_24=_24[_25];
if(_24==null){
if(_21===true){
return null;
}else{
FE.throwError("Unable to create new instance of \""+_20+"'. Class not found");
}
}
}
if(typeof _24!=="function"){
if(_21===true){
return null;
}else{
FE.throwError("Invalid constructor for type \""+_20+"\". A function was expected but actual type is \""+(typeof _20)+"\".");
}
}
return _24;
},applySuper:function(_26,_27,_28,_29){
return FE.Class.forName(_26).superclass[_28].apply(_27,_29);
},callSuper:function(_2a,_2b,_2c,_2d){
if(arguments.length>2){
_2d=Array.slice.call(_2d,_2d,2);
}
return FE.Class.forName(_2a).superclass[_2c].apply(_2b,_2d);
}};
FE.Class=framework.core.Class.prototype;

FE.namespace("framework.core");
framework.core.Object=function(){
};
framework.core.Object.prototype={extend:function(_1,_2,_3){
for(var k in _2){
if(_3===true||_2.hasOwnProperty(k)===true){
_1[k]=_2[k];
}
}
return _1;
},clone:function(o,_4){
var _5=typeof o;
if(_5==="string"||_5==="number"||_5==="boolean"||_5==="function"){
return o;
}
if(FE.Array.isArray(o)){
return FE.Array.clone(o,_4);
}else{
var _6={};
if(_4!==false){
for(var k in o){
try{
if(o.hasOwnProperty(k)){
_6[k]=FE.Object.clone(o[k],true);
}
}
catch(e ){
throw new Error("test: "+o+" - "+e);
}
}
}else{
FE.Object.extend(_6,o);
}
}
return _6;
},forEachProperty:function(o,_7,_8){
this.forEachEntry(o,_7,_8);
},forEachEntry:function(o,_9,_a){
var k;
for(k in o){
if(o.hasOwnProperty(k)){
var v=o[k];
var _b=_9.call(_a,k,v);
if(_b===false){
return;
}
}
}
},forEachKey:function(o,_c,_d){
var k;
for(k in o){
if(o.hasOwnProperty(k)){
var _e=_c.call(_d,k);
if(_e===false){
return;
}
}
}
},forEachValue:function(o,_f,_10){
var k;
for(k in o){
if(o.hasOwnProperty(k)){
var _11=_f.call(_10,o[k]);
if(_11===false){
return;
}
}
}
},keys:function(o){
var k;
var _12=[];
for(k in o){
if(o.hasOwnProperty(k)){
_12.push(k);
}
}
return _12;
},values:function(o){
var k;
var _13=[];
for(k in o){
if(o.hasOwnProperty(k)){
_13.push(o[k]);
}
}
return _13;
},entries:function(o){
var k;
var _14=[];
for(k in o){
if(o.hasOwnProperty(k)){
_14.push({key:k,value:o[k]});
}
}
return _14;
},dumpToString:function(o,_15){
var _16="";
var i;
if(_15==null){
_15={};
}
var _17=_15.desc;
if(_17!=null){
_16+="\n"+_17+"\n";
for(i=0;i<_17.length;i++){
_16+="-";
}
_16+="\n";
}
_16+=this.dumpToStringHelper(o,"",1,_15);
if(_17!=null){
_16+="\n";
for(i=0;i<_17.length;i++){
_16+="-";
}
_16+="\n";
}
return _16;
},dumpToStringHelper:function(o,_18,_19,_1a){
if(o===null){
return "null";
}
if(o===undefined){
return "undefined";
}
if(typeof (o)==="string"){
return JSON.stringify(o);
}
if(typeof (o)==="number"){
return ""+o;
}
if(typeof (o)=="boolean"){
return ""+o;
}
if(typeof (o)=="function"){
return (""+o).replace(/\r|\n|\r\n/g,"\n"+_18);
}
var ret;
if(o.constructor==Array){
if(_19>_1a.maxDepth){
ret="[(max depth reached)]";
return ret;
}else{
var len=o.length;
ret="[\n";
for(var i=0;i<len;i++){
ret+=_18+"  "+this.dumpToStringHelper(o[i],_18+"  ",_19+1,_1a);
if(i<len-1){
ret+=",";
}
ret+="\n";
}
ret+=_18+"]";
return ret;
}
}
if(typeof (o)==="object"){
if(o.getClass){
return _18+"(Java object: "+o.getClass().toString()+")";
}else{
if(_19>_1a.maxDepth){
ret="{(max depth reached)}";
return ret;
}else{
var _1b=new Array();
for(var key in o){
if(_1a.allProps||o.hasOwnProperty(key)){
_1b.push(key);
}
}
ret="{\n";
for(var j=0;j<_1b.length;j++){
var k=_1b[j];
var _1c=o[k];
ret+=_18+" "+k+": "+this.dumpToStringHelper(_1c,_18+" ",_19+1,_1a);
if(j<_1b.length-1){
ret+=",";
}
ret+="\n";
}
ret+=_18+"}";
return ret;
}
}
}
return _18+"unknown: "+typeof (o);
},isEmpty:function(o){
if(o==null){
return true;
}
var k;
for(k in o){
if(o.hasOwnProperty(k)){
return false;
}
}
return true;
},size:function(o){
var _1d=0;
for(var key in o){
if(o.hasOwnProperty(key)){
_1d++;
}
}
return _1d;
},makeSet:function(_1e){
if(_1e==null){
return {};
}
if(!FE.Array.isArray(_1e)){
_1e=FE.Array.fromArguments(arguments);
}
var set={};
FE.Array.forEach(_1e,function(o){
if(typeof o==="string"){
set[o]=true;
}else{
throw new Error("Unable to add object to set. Unsupported type. Object: "+o);
}
},this);
return set;
},setToArray:function(set){
return FE.Object.keys(set);
},contains:function(set,o){
if(set==null){
return false;
}
var key;
var _1f=false;
FE.forEach(o,function(k){
if(set.hasOwnProperty(k)){
_1f=true;
return false;
}
});
return _1f;
},add:function(set,o){
var key;
if(typeof o==="string"){
key=o;
}else{
throw new Error("Unable to add object to set. Unsupported type. Object: "+o);
}
set[o]=true;
},isObject:function(obj){
return obj!=null&&(typeof obj==="object");
}};
FE.Object=framework.core.Object.prototype;

String.prototype.trim=function(){
return this.replace(/^\s*|\s*$/g,"");
};
String.prototype.ltrim=function(){
return this.replace(/^\s*/g,"");
};
String.prototype.rtrim=function(){
return this.replace(/\s*$/g,"");
};
String.prototype.startsWith=function(_1){
if(this.length<_1.length){
return false;
}else{
return this.substring(0,_1.length)===_1;
}
};
String.prototype.endsWith=function(_2){
if(this.length<_2.length){
return false;
}else{
return this.substring(this.length-_2.length)===_2;
}
};
String.prototype.compareTo=function(s){
var _3=this.length;
var _4=s.length;
var n=(_3<_4?_3:_4);
var i;
for(i=0;i<n;i++){
var a=this.charCodeAt(i);
var b=s.charCodeAt(i);
if(a!=b){
return (a-b);
}
}
return (_3-_4);
};
String.prototype.leftPad=function(_5,c){
if(c==null){
c=" ";
}
var _6=_5-this.length;
var _7=FE.Class.newInstance("framework.core.StringBuilder");
for(var i=0;i<_6;i++){
_7.append(c);
}
_7.append(this);
return _7.toString();
};
String.prototype.rightPad=function(_8,c){
if(c==null){
c=" ";
}
var _9=_8-this.length;
var _a=FE.Class.newInstance("framework.core.StringBuilder");
_a.append(this);
for(var i=0;i<_9;i++){
_a.append(c);
}
return _a.toString();
};
String.prototype.isLowerCase=function(){
if(this.length!=1){
throw new Error("Single character string expected");
}
return (this>="a")&&(this<="z");
};
String.prototype.isUpperCase=function(){
if(this.length!=1){
throw new Error("Single character string expected");
}
return (this>="A")&&(this<="Z");
};
framework.core.String=function(){
};
framework.core.String.prototype={isEmpty:function(s){
return s==null||s.trim().length==0;
},length:function(s){
return s==null?0:s.length;
},isString:function(s){
return s!=null&&s.constructor===String;
}};
FE.String=framework.core.String.prototype;

FE.namespace("framework.core");
framework.core.StringBuilder=function(){
this.array=new Array();
this.length=0;
};
framework.core.StringBuilder.prototype={append:function(_1){
var _2=_1==null?"null":_1.toString();
if(typeof _2.length!=="string"){
_2=""+_2;
}
this.length+=_2.length;
this.array.push(_2);
return this;
},toString:function(){
return this.array.join("");
},clear:function(){
this.array=new Array();
this.length=0;
return this;
}};

FE.namespace("framework.core");
framework.core.Array=function(){
};
framework.core.Array.prototype={peek:function(a){
return a.length>0?a[a.length-1]:undefined;
},last:function(a){
return a[a.length-1];
},first:function(a){
return a[0];
},clear:function(a){
a.length=0;
return a;
},clone:function(a,_1){
if(_1){
var _2=[];
var _3=a.length;
for(var i=0;i<_3;i++){
_2.push(FE.Object.clone(a[i]));
}
return _2;
}else{
return [].concat(a);
}
},isEmpty:function(a){
return a==null||(a.length!==undefined&&a.length===0);
},isNotEmpty:function(a){
return this.isEmpty(a)===false;
},fromArguments:function(_4,_5){
if(_5!=null){
if(_5>_4.length){
return Array.prototype.slice.call(_4,_5);
}else{
return [];
}
}else{
return Array.prototype.slice.call(_4);
}
},enqueue:function(a,o){
a.push(o);
},dequeue:function(a){
if(a.length===0){
return undefined;
}
var o=a.first();
a.splice(0,1);
return o;
},isArray:function(a){
return a!=null&&a.constructor===Array;
},forEach:function(a,_6,_7){
if(a==null){
return;
}
var _8=a.length>>>0;
if(typeof _6!="function"){
throw new TypeError();
}
for(var i=0;i<_8;i++){
if(i in a){
var _9=_6.call(_7,a[i],i,a);
if(_9===false){
return;
}
}
}
},reverseForEach:function(a,_a,_b){
var _c=a.length>>>0;
if(typeof _a!="function"){
throw new TypeError();
}
for(var i=_c-1;i>=0;i--){
if(i in a){
var _d=_a.call(_b,a[i],i,a);
if(_d===false){
return;
}
}
}
},length:function(a){
return a==null?0:a.length;
}};
Array.prototype.peek=function(){
return this.length>0?this[this.length-1]:undefined;
};
Array.prototype.last=function(){
return this[this.length-1];
};
Array.prototype.first=function(){
return this[0];
};
Array.prototype.clear=function(){
this.length=0;
return this;
};
Array.prototype.clone=function(){
return FE.Array.clone(this);
};
Array.prototype.enqueue=function(o){
this.push(o);
};
Array.prototype.dequeue=function(){
if(this.length===0){
return undefined;
}
var o=this.first();
this.splice(0,1);
return o;
};
Array.prototype.removeAt=function(_e){
this.splice(_e,1);
};
Array.prototype.removeObject=function(_f){
var _10=[];
var len=this.length;
var i;
for(i=0;i<len;i++){
if(this[i]==_f){
_10.push(i);
}
}
len=_10.length;
for(i=len-1;i>=0;i--){
this.removeAt(_10[i]);
}
};
Array.prototype.contains=function(_11){
for(var i=0;i<this.length;i++){
if(this[i]==_11){
return true;
}
}
return false;
};
FE.Array=framework.core.Array.prototype;

var JSON={};
(function(){
var _1=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
var _2=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g;
var _3=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g;
var _4=/(?:^|:|,)(?:\s*\[)+/g;
var _5=/^[\],:{}\s]*$/;
var _6=Object.prototype.hasOwnProperty;
var _7=function(_8,_9){
var _a=function(o,_b){
var k,v,_c=o[_b];
if(_c&&typeof _c==="object"){
for(k in _c){
if(_6.call(_c,k)){
v=_a(_c,k);
if(v===undefined){
delete _c[k];
}else{
_c[k]=v;
}
}
}
}
return _9.call(o,_b,_c);
};
return typeof _9==="function"?_a({"":_8},""):_8;
};
JSON.parse=function(s,_d){
if(typeof s==="string"){
s=s.replace(_1,function(c){
return "\\u"+("0000"+(+(c.charCodeAt(0))).toString(16)).slice(-4);
});
return _7(eval("("+s+")"),_d);
}
throw new SyntaxError("parseJSON");
};
var _e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
var _f={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\"":"\\\"","\\":"\\\\"};
var _10=function(d){
function _11(v){
return v<10?"0"+v:v;
};
return "\""+d.getUTCFullYear()+"-"+_11(d.getUTCMonth()+1)+"-"+_11(d.getUTCDate())+"T"+_11(d.getUTCHours())+":"+_11(d.getUTCMinutes())+":"+_11(d.getUTCSeconds())+"Z\"";
};
var isA=FE.Array.isArray;
var _12=FE.Object.keys;
JSON.stringify=function(obj,w,d){
var m=_f,_13=_e,rep=typeof w==="function"?w:null,_14=[];
if(rep||typeof w!=="object"){
w=undefined;
}
var _15=function(c){
if(!m[c]){
m[c]="\\u"+("0000"+(+(c.charCodeAt(0))).toString(16)).slice(-4);
}
return m[c];
};
var _16=function(s){
return "\""+s.replace(_13,_15)+"\"";
};
var _17=_10;
var _18=function(h,key,d){
var o=h[key];
if(o&&o.hashCode){
o=""+o;
}
if(typeof rep==="function"){
o=rep.call(h,key,o);
}
var t=typeof o,i,len,j,k,v,a;
if(t==="string"){
return _16(o);
}
if(t==="boolean"||o instanceof Boolean){
return String(o);
}
if(t==="number"||o instanceof Number){
return isFinite(o)?String(o):"null";
}
if(o instanceof Date){
return _17(o);
}
if(t==="object"){
if(!o){
return "null";
}
for(i=_14.length-1;i>=0;--i){
if(_14[i]===o){
return "null";
}
}
_14[_14.length]=o;
a=[];
if(d>0){
if(isA(o)){
for(i=o.length-1;i>=0;--i){
a[i]=_18(o,i,d-1)||"null";
}
}else{
k=isA(w)?w:_12(o);
for(i=0,j=0,len=k.length;i<len;++i){
if(typeof k[i]==="string"){
v=_18(o,k[i],d-1);
if(v){
a[j++]=_16(k[i])+":"+v;
}
}
}
a.sort();
}
}
_14.pop();
return isA(o)?"["+a.join(",")+"]":"{"+a.join(",")+"}";
}
return undefined;
};
d=d>=0?d:1/0;
return _18({"":obj},"",d);
};
})();

FE.namespace("framework.core");
framework.core.Cookie=function(){
};
framework.core.Cookie.prototype={init:function(){
this.cookiePath="/";
this.domainName="";
this.cookieValue="";
this.cookieName="";
this.nvPair=new Array();
this.PERSISTENT_LENGTH=6*2592000;
this.size=0;
this.m_cookie=null;
this.persistent=false;
this.seconds=-1;
this.secure=false;
},setDomain:function(d){
this.domainName=d;
},setPath:function(p){
this.cookiePath=p;
},setPersistent:function(_1){
this.persistent=_1;
},isPersistent:function(){
return this.persistent;
},setSecure:function(_2){
this.secure=_2;
},isSecure:function(){
return this.secure;
},getTime:function(){
return this.seconds;
},setSeconds:function(_3){
this.seconds=_3;
},setCookieName:function(_4){
this.cookieName=_4;
},getCookieName:function(){
return this.cookieName;
},setCookieValue:function(_5){
this.cookieValue=_5;
},getCookieValue:function(){
return ""+this.cookieValue;
},getValue:function(_6){
if(_6==null){
throw "Key cannot be null";
}
return this.nvPair[_6];
},setValue:function(_7,_8){
this.nvPair[""+_7]=""+_8;
this.size++;
},removeValue:function(_9){
var _a=this.nvPair[_9];
this.nvPair[_9]=null;
this.size--;
return _a;
},removeAll:function(){
this.nvPair=new Array();
},toString:function(){
var _b="";
if(this.cookieName){
_b=this.cookieName+"=";
}
if(this.serialize()){
_b+=this.serialize();
}
if(this.cookiePath){
_b+="; path="+this.cookiePath;
}
if(this.domainName&&this.domainName.indexOf(".")!=-1){
_b+="; domain="+this.domainName+";";
}
return _b;
},deserialize:function(_c){
},serialize:function(){
}};

FE.namespace("framework.core");
framework.core.Number=function(){
};
framework.core.Number.prototype={isNumber:function(n){
return n!=null&&typeof n=="number";
},isInteger:function(n){
return this.isNumber(n)&&(n.toString().search(/^-?[0-9]+$/)==0);
},isNonNegativeInteger:function(n){
return this.isNumber(n)&&(n.toString().search(/^[0-9]+$/)==0);
}};
FE.Number=framework.core.Number.prototype;

FE.namespace("framework.core");
framework.core.StringWriter=function(){
};
framework.core.StringWriter.prototype={init:function(_1,_2){
this.buffer=FE.Class.newInstance("framework.core.StringBuilder");
},write:function(_3){
this.buffer.append(_3);
},toString:function(){
return this.buffer.toString();
}};

FE.defineEvents({name:"framework.client.ClientEvents",onAsyncStart:{init:function(_1){
}},onAsyncComplete:{init:function(_2){
}},onError:{init:function(_3){
this.error=_3;
}}});

FE.namespace("framework.client");
try{
if(window.console!==undefined){
console.debug("Logger initialized");
}else{
window.console=null;
}
}
catch(e ){
window.console=null;
}
framework.client.ClientLogging=function(){
};
var __alertCount__=0;
var __maxAlertCount__=15;
framework.client.ClientLogging.prototype={noLogger:true,alertCount:0,maxAlertCount:15,levels:{"DEBUG":0,"INFO":1,"WARN":2,"ERROR":3,"FATAL":4},init:function(_1){
var _2=FE.Object.keys(_1);
var _3=function(a,b){
var x=a==="ROOT"?0:a.length;
var y=b==="ROOT"?0:b.length;
return ((x>y)?-1:((x<y)?1:0));
};
_2.sort(_3);
this.loggers=[];
var i,_4=_2.length,p,c;
for(i=0;i<_4;i++){
p=_2[i];
c=_1[p];
c.prefix=p;
c.level=c.level!=null?this.levels[c.level]:0;
this.loggers.push(c);
}
},logger:function(_5){
var i,_6=this.loggers.length,c;
for(i=0;i<_6;i++){
c=this.loggers[i];
if(c.prefix==="ROOT"||(c.prefix.length<=_5.length&&_5.startsWith(c.prefix))){
var _7=FE.Class.newInstance("framework.client.ClientLogger",c.level,_5);
return _7;
}
}
return this.getVoidLogger();
},getVoidLogger:function(){
if(this.voidLogger===undefined){
this.voidLogger=FE.Class.newInstance("framework.client.VoidLogger");
}
return this.voidLogger;
}};
framework.client.VoidLogger=function(){
};
framework.client.VoidLogger.prototype={noLogger:true,isDebugEnabled:function(){
return false;
},isInfoEnabled:function(){
return false;
},isWarnEnabled:function(){
return false;
},isErrorEnabled:function(){
return false;
},isFatalEnabled:function(){
return false;
},dump:function(_8,_9,_a){
},debug:function(_b){
},info:function(_c){
},warn:function(_d){
},error:function(_e){
},fatal:function(_f){
},alert:function(_10){
},trace:function(_11){
},logException:function(){
}};
framework.client.ClientLogger=function(){
};
framework.client.ClientLogger.prototype={noLogger:true,init:function(_12,_13){
this.className=_13;
this.level=_12;
},isDebugEnabled:function(){
return this.level===0;
},isInfoEnabled:function(){
return this.level<=1;
},isWarnEnabled:function(){
return this.level<=2;
},isErrorEnabled:function(){
return this.level<=3;
},isFatalEnabled:function(){
return this.level<=4;
},dump:function(obj,_14,_15){
if(!this.isDebugEnabled()){
return;
}
if(_14){
_14="Object dump ("+_14+"):";
}else{
_14="Object dump:";
}
this._log("debug",[_14]);
if(console&&console["debug"]){
console["debug"](obj);
}
},debug:function(_16,_17){
if(!this.isDebugEnabled()){
return;
}
this._log("debug",_16,_17);
},info:function(_18,_19){
if(!this.isInfoEnabled()){
return;
}
this._log("info",_18,_19);
},warn:function(_1a,_1b){
if(!this.isWarnEnabled()){
return;
}
this._log("warn",_1a,_1b);
},error:function(_1c,_1d){
if(!this.isErrorEnabled()){
return;
}
this._log("error",_1c,_1d,true);
},fatal:function(_1e,_1f){
if(!this.isFatalEnabled()){
return;
}
this._log("fatal",_1e,_1f,true);
},logException:function(){
},_log:function(_20,_21,_22,_23){
try{
if(console&&console[_20]){
var out=_20.toUpperCase()+" "+this.className+": "+(_21!=null?_21:"");
if(_22){
try{
out+="\n"+(_22.stackTrace||FE.client.getStackTrace(_22));
}
catch(e ){
console.error("Unable to get stack trace",e);
}
}else{
if(_23){
out+="\n"+FE.client.getStackTrace();
}
}
console[_20](out);
if(_22){
console[_20]("Exception:",_22);
}
}
}
catch(e ){
}
},alert:function(_24){
if(this.isDebugEnabled()&&__alertCount__<__maxAlertCount__){
__alertCount__++;
alert(this.className+":\n"+_24);
}
},trace:function(_25){
if(this.isDebugEnabled()){
if(window.console&&console.trace){
this.debug(_25);
console.trace();
}else{
var _26=FE.client.getStackTrace();
this.debug(_25+"\n"+_26);
}
}
}};

FE.namespace("framework.client");
if(window.$included===undefined){
window.$included={};
}
framework.client.ClientEnvironment=function(){
};
framework.client.ClientEnvironment.uninitializedLoggers=[];
framework.client.ClientEnvironment.createDoNothingLogger=function(){
var _1={};
var _2=function(){
};
var _3=function(){
return false;
};
for(var _4 in FE.loggerFunctions){
_1[_4]=_4.startsWith("is")?_3:_2;
}
return _1;
};
framework.client.ClientEnvironment.logger=function(_5){
if(FE.client==null||FE.client.logging==null){
var _6=this.createDoNothingLogger();
_6.prefix=_5;
this.uninitializedLoggers.push(_6);
return _6;
}else{
return FE.client.logging.logger(_5);
}
};
framework.client.ClientEnvironment.prototype={requireTransactions:[],included:window.$included,docClosed:false,componentPrefixMappings:{},imageUrls:{},bundles:{},resourceLookup:{},queuedDOMEvents:[],init:function(){
var _7=framework.client.ClientEnvironment;
var c=this;
YUI().use("node-base",function(Y){
Y.on("domready",_7._ondomready,c);
Y.on("load",_7._onload,window,c);
});
},initClient:function(_8){
this.DependencyManager=FE.Class.getInstance("framework.client.ClientDependencyManager");
this.servletPath=_8.servletPath;
this.serverName=_8.serverName;
this.serverPort=_8.serverPort;
this.secure=_8.secure;
this.setUserClass(_8.userClass);
FE.Browser=FE.Class.getInstance("framework.client.ClientBrowserDetection");
FE.History=FE.Class.getInstance("framework.client.ClientHistory");
},getUserClassKey:function(){
return this.userClass.key;
},getClientRenderingTemplateModuleName:function(_9,_a){
var _b="cr/template:"+(_a?_a+"@"+_9:_9);
return _b+":"+this.userClass.key;
},getServerName:function(){
return this.serverName;
},getServerPort:function(){
return this.serverPort;
},isSecure:function(){
return this.secure;
},initLogging:function(_c){
if(_c==null){
_c={};
}
this.logging=FE.Class.newInstance("framework.client.ClientLogging",_c);
FE.initLogger();
FE.makeLogger(this);
FE.Array.forEach(framework.client.ClientEnvironment.uninitializedLoggers,function(_d){
var _e=_d.prefix;
var _f=FE.logger(_e);
FE.Object.extend(_d,_f,true);
},this);
},createClientContext:function(_10){
return FE.Class.newInstance("framework.mvc.client.ClientContext",_10);
},getClientRenderer:function(){
if(this.clientRenderer==null){
this.clientRenderer=FE.Class.newInstance("framework.client.ClientRenderer");
}
return this.clientRenderer;
},createClientRenderer:function(){
return FE.Class.newInstance("framework.client.ClientRenderer");
},registerProperties:function(_11,_12,_13){
var key=_12+"/"+_11;
this.bundles[key]=_13;
},getProperties:function(dir,_14){
var _15=dir+"/"+_14;
var _16=this.bundles[_15];
if(_16==null){
return {};
}
return _16;
},addResourceMappings:function(_17){
FE.Object.forEachEntry(_17,function(dir,_18){
var _19=this.resourceLookup[dir];
if(_19===undefined){
this.resourceLookup[dir]=_18;
}else{
FE.Object.forEachEntry(_18,function(k,v){
_19[k]=v;
},this);
}
},this);
},addComponentPrefixMapping:function(key,_1a){
if(key.startsWith("component/")===false){
key="component/"+key;
}
this.componentPrefixMappings[key]=_1a;
},addComponentImageSrc:function(_1b,_1c,_1d){
var key=_1b+":"+_1c;
this.imageUrls[key]=_1d;
},addImageSrc:function(_1e,_1f,_20){
var key=_1e?(_1e+":"+_1f):_1f;
this.imageUrls[key]=_20;
},resolveImageSrc:function(_21,_22){
var key=_21?(_21+":"+_22):_22;
return this.imageUrls[key]||_22;
},resolveComponentImageSrc:function(_23,_24){
var key=_23+":"+_24;
return this.imageUrls[key]||_24;
},setUserClass:function(uc){
if(uc==null){
uc={};
}
uc.key=FE.buildUserClassKey(uc.memberships);
this.userClass=uc;
},getEl:function(id){
return typeof id==="string"?document.getElementById(id):id;
},insertAfter:function(_25,_26){
_25.parentNode.insertBefore(_26,_25.nextSibling);
},renderTemplate:function(_27){
_27.type="template";
this.getClientRenderer().render(_27);
},renderComponent:function(_28){
_28.type="component";
this.getClientRenderer().render(_28);
},includeDependencies:function(_29){
this.DependencyManager.includeDependencies(_29);
},markModulesIncluded:function(_2a){
this.DependencyManager.markIncluded(_2a);
},includeCSS:function(o){
if(FE.Array.isArray(o)){
FE.Array.forEach(o,function(_2b){
this.includeCSS(_2b);
},this);
return;
}
this._include(o,"css");
},includeJS:function(o){
if(FE.Array.isArray(o)){
FE.Array.forEach(o,function(_2c){
this.includeJS(_2c);
},this);
return;
}
this._include(o,"js");
},include:function(o){
if(FE.Array.isArray(o)){
FE.Array.forEach(o,function(){
this.include(o);
},this);
return;
}
if(FE.isJSPath(o)){
this._include(o,"js");
}else{
if(FE.isCSSPath(path)){
this._include(o,"css");
}
}
},_include:function(o,_2d){
if(this.included[o]!==undefined){
return;
}
this.included[o]=true;
o=FE.getContextRelativeUrl(o);
var _2e={};
var _2f=null;
var _30=o.split("|");
if(_30.length==2){
_2f=_30[0];
_30=_30[1].split(",");
FE.Array.forEach(_30,function(p){
var _31=p.split("=");
if(_31.length===2){
_2e[_31[0]]=_31[1];
}
});
}else{
_2f=o;
}
if(_2d==="js"){
_2e.type="text/javascript";
_2e.src=_2f;
this.writeElement("script",_2e,false);
}else{
if(_2d==="css"){
_2e.type="text/css";
_2e.href=_2f;
_2e.rel="stylesheet";
this.writeElement("link",_2e,true);
}else{
alert("Unknown resource path: "+o+" - "+JSON.stringify(_30));
throw new Error("Unknown resource path: "+o);
}
}
},writeElement:function(_32,_33,_34){
var sb=FE.Class.newInstance("framework.core.StringBuilder");
sb.append("<").append(_32);
FE.Object.forEachEntry(_33,function(k,v){
sb.append(" ").append(k).append("=").append(v);
});
sb.append(">");
if(_34!==true){
sb.append("</").append(_32).append(">\n");
}
document.write(sb.toString());
},requireComponent:function(_35,_36,_37){
this.DependencyManager.requireComponent(_35,_36,_37);
},requireModule:function(_38,_39,_3a){
this.DependencyManager.requireModule(_38,_39,_3a);
},markJavaScriptIncluded:function(js){
this.included[js]=true;
},markStyleSheetIncluded:function(css){
this.included[css]=true;
},isJavaScriptDirIncluded:function(js){
return this.included["jsdir:"+js]!==undefined;
},isJavaScriptBundleIncluded:function(_3b){
return this.included["jsbundle:"+_3b]!==undefined;
},isJavaScriptIncluded:function(js){
return this.included[js]!==undefined;
},isStyleSheetIncluded:function(css){
return this.included[css]!==undefined;
},isStyleSheetDirIncluded:function(js){
return this.included["cssdir:"+js]!==undefined;
},isStyleSheetBundleIncluded:function(_3c){
return this.included["cssbundle:"+_3c]!==undefined;
},prepareAsyncCallback:function(cfg,_3d,_3e){
return FE.prepareAsyncCallback(cfg,_3d,_3e);
},mergeCallbacks:function(c1,c2){
if(c1==null||c2==null){
throw new Error("Invalid arguments");
}
return c1.merge(c2);
},removeNode:function(n){
return this.removeChild(n.parentNode,n);
},removeChild:function(p,n){
FE.Widget.destroyWidgetsForNode(n);
p.removeChild(n);
},removeAllChildren:function(n){
var _3f=n.childNodes;
var len=_3f.length;
var i;
for(i=0;i<len;i++){
var c=_3f[i];
if(c!=null){
this.removeChild(n,c);
}
}
},require:function(o,_40,_41){
FE.Class.forName("framework.client.ClientRequire").require(o,_40,_41);
},get:function(url,cfg,_42){
return FE.IO.get(url,cfg,_42);
},getJSON:function(url,cfg,_43){
return FE.IO.get(url,cfg,_43);
},getComponentJSON:function(_44,cfg){
return this._sendComponentJSON(_44,cfg,"GET");
},postComponentJSON:function(_45,cfg){
return this._sendComponentJSON(_45,cfg,"POST");
},_sendComponentJSON:function(_46,cfg,_47){
var _48=cfg.params;
delete cfg.params;
cfg.method=_47;
var url=FE.url("/json/"+_46,_48,{includeUserClass:true});
return FE.IO.send(url,cfg);
},post:function(url,cfg,_49){
return FE.IO.post(url,cfg,_49);
},subscribe:function(_4a,_4b,_4c,_4d){
if(typeof _4c==="string"||_4c==null){
_4c=FE.MessageService.channel(_4c);
}
if(typeof _4a==="string"){
var _4e=_4a;
var _4f=FE.Class.forName(_4e);
if(_4f==null){
FE.throwError("Events not found with class name \""+_4e+"\". Make sure the class exists.");
}
_4a=_4f.getInstance();
}
if(_4d===undefined){
_4d=true;
}
var _50=_4b.scope||_4b;
FE.Object.forEachKey(_4a,function(k){
var _51=_4b[k];
if(_51!==undefined){
var _52=_4d?_4a.__className__+"."+k:k;
_4c.subscribe(_52,_51,_50);
}
},this);
},unsubscribe:function(_53,_54){
FE.MessageService.unsubscribe(_53,_54);
},publish:function(_55,arg,_56){
var _57=_55.lastIndexOf(".");
if(_57===-1){
FE.throwError("Event type should be in the format \"<events_class>.<event_type>\" (e.g. \"examples.eventHandling.PhotoEvents.onPhotoChanged\"). The given type is \""+_55+"\".");
}
var _58=_55.substring(0,_57);
var _59=FE.Class.forName(_58);
if(_59==null){
FE.throwError("Events class not found with name \""+_58+"\"");
}
var _5a=_59.getInstance();
var _5b=_55.substring(_57+1);
var _5c=_5a[_5b];
if(_5c==null){
FE.throwError("Event with name \""+_5b+"\" not defined in \""+_58+"\".");
}
var _5d=_5c.newInstance.call(_5c,arg);
var _56=FE.MessageService.channel(_56);
_56.publish(_55,_5d);
return _5d;
},channel:function(_5e){
return FE.MessageService.channel(_5e);
},addParameters:function(_5f){
var _60=this.getParameters();
FE.Object.forEachEntry(_5f,function(key,_61){
_60[key]=_61;
},this);
},getParameter:function(_62){
var _63=this.getParameters()[_62];
if(FE.Array.isArray(_63)){
return _63==null||_63.length===0?undefined:_63[0];
}else{
return _63;
}
},_applyParametersFromPathInfo:function(_64,_65){
var _66=_64.split("/");
var len=_66.length;
var i;
var _67=-1;
for(i=len-1;i>=0;i--){
var p=_66[i];
if(p.length==0){
continue;
}
var nv=p.split("=");
if(nv.length==1){
break;
}else{
_65[nv[0]]=FE.decodeURIComponent(nv[1]);
}
}
},getParameters:function(){
if(this.parameters===undefined){
var _68={};
var _69=document.location.href;
var _6a=_69.indexOf("?");
var _6b=_69;
if(_6a!==-1){
_6b=_69.substring(0,_6a);
var _6c=_69.substring(_6a+1);
var _6d=_6c.split("&");
var i;
len=_6d.length;
for(i=0;i<len;i++){
var _6e=_6d[i].split("=");
var _6f=decodeURIComponent(_6e[0].replace(/\+/g," "));
var _70=_6e.length==2?decodeURIComponent(_6e[1].replace(/\+/g," ")):null;
var _71=_68[_6f];
if(_71===undefined){
_71=[];
_68[_6f]=_71;
}
_71.push(_70);
}
}
this._applyParametersFromPathInfo(_6b,_68);
this.parameters=_68;
}
return this.parameters;
},onload:function(_72,_73){
if(this.windowLoaded){
_72.call(_73);
}else{
FE.MessageService.subscribe("onload",_72,_73);
}
},ondomready:function(_74,_75){
if(this.domReady){
_74.call(_75);
}else{
FE.MessageService.subscribe("ondomready",_74,_75);
}
},parseJSON:function(str){
return JSON.parse(str);
},getModuleBaseUrl:function(_76){
if(_76==null){
_76=this.userClass.key;
}
return this.servletPath+(_76!=null?"/"+_76:"")+"/module/";
},requireDragDrop:function(_77,_78){
if(this.yuiDD===undefined){
this.yuiDD=YUI().use("dd",function(Y){
FE.Array.forEach(FE.client.yuiDDCallbacks,function(c){
c.callback.call(c.scope,Y);
},this);
delete FE.client.yuiDDCallbacks;
});
this.yuiDDCallbacks=[{callback:_77,scope:_78}];
}else{
if(this.yuiDDCallbacks){
this.yuiDDCallbacks.push({callback:_77,scope:_78});
}else{
_77.call(_78,this.yuiDD);
}
}
},getDependenciesChecksum:function(){
return FE.envId;
},getIncludeUrlPrefix:function(){
return FE.client.servletPath;
},handleQueuedDOMEvents:function(){
FE.Array.forEach(this.queuedDOMEvents,function(_79){
this.handleDOMEvent.apply(this,_79);
},this);
this.queuedDOMEvents=null;
},handleDOMEvent:function(_7a,_7b,_7c,_7d,_7e,_7f){
var _80=null;
if(_7c==null){
_80="framework.client.DOMEvent";
}else{
_80=_7c+"."+_7b;
}
var _81=null;
var _82=FE.Class.forName(_80);
if(_82!=null){
_81=_82.newInstance(_7d);
}else{
if(this.windowLoaded!==true){
this.queuedDOMEvents.push(arguments);
return;
}else{
FE.throwError("Invalid event type: "+_80);
}
}
try{
}
catch(e ){
this.warn("Events class not available. Ignoring DOM event. Event class name: "+_82);
return false;
}
_81.source=_7e;
_81.event=_7f;
_81.returnValue=undefined;
_81.type=_7b;
this.channel(_7a).publish(_7b,_81);
var _83=_81.returnValue;
if(_7e&&_7e.tagName=="A"){
if(_83===undefined){
_83=false;
}
}
return _83;
},forEachChildEl:function(_84,_85,_86){
this.forEachChild(_84,_85,_86,1);
},forEachChild:function(_87,_88,_89,_8a){
if(_87==null){
return;
}
var _8b=_87.childNodes;
var len=_8b.length;
var i;
for(i=0;i<len;i++){
var c=_8b[i];
if(c&&(_8a==null||_8a==c.nodeType)){
_88.call(_89,c);
}
}
},hidePanel:function(_8c){
},setTimeout:function(_8d,_8e,_8f,arg,_90){
var _91;
if(typeof _8d==="function"){
_91=_8d;
}else{
_91=_8d.callback;
_8e=_8d.scope||_8e;
_8f=_8d.delay||_8f;
arg=_8d.arg||arg;
_90=_8d.repeat==null?_90:_8d.repeat;
}
if(_8f==null){
_8f=0;
}
var _92=function(){
_91.call(_8e,arg);
};
if(_90){
window.setInterval(_92,_8f);
}else{
window.setTimeout(_92,_8f);
}
},setInterval:function(_93,_94,_95,arg){
this.setTimeout(_93,_94,_95,arg,true);
},resolveComponentPrefix:function(key){
if(key.indexOf("/")!=-1&&key.startsWith("component/")===false){
key="component/"+key;
}
var _96=this.componentPrefixMappings[key];
return _96||key;
},getProperty:function(dir,_97,key){
return this.getProperties(dir,_97)[key];
},getResourcePath:function(_98,dir){
if(dir===undefined){
return _98;
}
var _99=this.resourceLookup[dir];
if(_99===undefined){
return _98;
}
var _9a=_99[_98];
if(_9a===undefined){
return _98;
}
return _9a;
},getMembershipKeyEntries:function(_9b){
return FE.Object.entries(_9b);
},currentTimeMillis:function(){
return new Date().getTime();
},globalScope:window};
framework.client.ClientEnvironment.addGetStackTrace=function(){
var _9c;
try{
throw new Error();
}
catch(e ){
_9c=e.stack?1:e.message.indexOf("stacktrace")>-1?2:3;
}
var _9d=null;
switch(_9c){
case 1:
var _9e=function(url){
var _9f=url.split("/");
var _a0="";
FE.Array.reverseForEach(_9f,function(p){
if(p.length>0){
_a0=p;
return false;
}
});
return _a0;
};
var _a1=function(_a2,_a3){
var _a4=_a2.split("\n");
if(_a3!=null){
_a4=_a4.slice(_a3);
}
var _a5=[];
FE.Array.forEach(_a4,function(_a6,i){
if(_a6==""){
return;
}
var _a7=_a6.indexOf(")@");
var _a8=_a6.lastIndexOf(":");
var _a9=_a6.substring(0,_a7)+")";
if(_a9.startsWith("(")){
_a9="{anonymous}"+_a9;
}
var _aa=_a4.length-i-1;
var url=_a6.substring(_a7+1,_a8);
var _ab=_a6.substring(_a8+1);
var _ac=_9e(url);
var _ad=url.length>40?"..."+url.substring(url.length-40):url;
var _ae=(_aa+") ").leftPad(4)+_ac+":"+_ab+" ("+_ad+")\n    "+_a9;
_a5.push(_ae);
});
var out=_a5.join("\n");
return out;
};
_9d=function(e,_af){
if(e==null){
try{
this.triggerErrorByCallingInvalidMethod();
}
catch(e2 ){
e=e2;
}
}
var _b0=e.stack==null?"(unable to retrieve stack trace)":_a1(e.stack,_af);
return _b0;
};
break;
case 2:
_9d=function(e){
if(e==null){
try{
throw new Error();
}
catch(e2 ){
e=e2;
}
}
var _b1=e.message.split("\n"),_b2="{anonymous}(..)@",_b3=/Line\s+(\d+).*?(http\S+)(?:.*?in\s+function\s+(\S+))?/i,i,j,len,m;
for(i=4,j=0,len=_b1.length;i<len;i+=2){
m=_b1[i].match(_b3);
if(m){
_b1[j++]=(m[3]?m[3]+"(..)@"+m[2]+m[1]:_b2+m[2]+":"+m[1])+" -- "+_b1[i+1].replace(/^\s+/,"");
}
}
_b1.splice(j,_b1.length-j);
return _b1.join("\n");
};
break;
default:
_9d=function(){
var _b4=arguments.callee.caller,_b5="function",_b6="{anonymous}",_b7=/function\s*([\w\-$]+)?\s*\(/i,_b8=[arguments.callee],_b9=[],j=0,fn,_ba,i;
trace:
while(_b4){
i=_b8.length;
while(i--){
if(_b4===_b8[i]){
_b4=null;
break trace;
}
}
_b8.push(_b4);
fn=(_b4.toString().match(_b7)||[])[1]||_b6;
_ba=_b9.slice.call(_b4.arguments);
i=_ba.length;
while(i--){
switch(typeof _ba[i]){
case "string":
_ba[i]="\""+_ba[i].replace(/"/g,"\\\"")+"\"";
break;
case "function":
_ba[i]=_b5;
break;
default:
_ba[i]=_ba[i]==null?"null":_ba[i].toString();
}
}
_b9[j++]=fn+"("+_ba.join()+")";
_b4=_b4.caller;
}
return _b9.join("\n");
};
}
framework.client.ClientEnvironment.prototype.getStackTrace=_9d;
};
framework.client.ClientEnvironment.addGetStackTrace();
delete framework.client.ClientEnvironment.addGetStackTrace;
framework.client.ClientEnvironment._onload=function(e){
this.windowLoaded=true;
this.handleQueuedDOMEvents();
FE.MessageService.publish("onload",e);
};
framework.client.ClientEnvironment._ondomready=function(){
try{
this.domReady=true;
}
catch(e ){
}
FE.MessageService.publish("ondomready");
};
framework.client.DOMEvent=function(){
};
framework.client.DOMEvent.prototype={init:function(_bb){
this.data=_bb;
}};
framework.client.ClientEnvironment._onerror=function(_bc,url,_bd){
if(_bc===""){
return true;
}
if(framework.client.ClientEnvironment._oldonerror){
framework.client.ClientEnvironment._oldonerror.apply(window,arguments);
}
var _be="An uncaught error has occured:\n"+"Message: "+_bc+"\n"+"URL: "+url+"\n"+"Line: "+_bd;
if(FE.client&&FE.client.error){
FE.client.error(_be);
}else{
alert(_bc+" ("+url+":"+_bd+")");
}
return false;
};
framework.client.ClientEnvironment._oldonerror=window.onerror;
window.onerror=framework.client.ClientEnvironment._onerror;

FE.namespace("framework.client");
framework.client.MessageChannel=function(_1){
};
framework.client.MessageChannel.prototype={init:function(_2){
this.listenersByType={};
this.name=_2;
},publish:function(_3,_4){
FE.safeCall(this,"_publish",arguments,"An error has occured when publishing message of type \""+_3+"\"");
},_publish:function(_5,_6){
_6=arguments.length>1?Array.prototype.slice.call(arguments,1):[];
var _7=this.listenersByType[_5];
if(this.isDebugEnabled()){
this.debug("Publishing message with type \""+_5+"\" to channel \""+(FE.String.isEmpty(this.name)?"global":this.name)+"\"");
}
if(_7===undefined){
return true;
}
var i,l;
try{
if(_7.nestingLevel==0){
_7._length=_7.length;
}
_7.nestingLevel++;
var _8;
var _9=_7._length;
for(i=0;i<_9;i++){
l=_7[i];
if(l===null){
continue;
}
_8=l.callback.apply(l.scope,_6);
if(_8===false){
return false;
}
}
_7=this.listenersByType[_5];
}
finally{
_7.nestingLevel--;
if(_7.cleanupRequired===true&&_7.nestingLevel===0){
for(i=0;i<_7.length;i++){
l=_7[i];
if(l===null){
_7.splice(i,1);
}
}
_7.cleanupRequired=false;
}
}
return true;
},unsubscribe:function(_a,_b){
var _c=this.listenersByType[_a];
if(_c===undefined){
return;
}
var i,l;
var _d=_c.length;
for(i=_d-1;i>=0;i--){
l=_c[i];
if(l===null){
continue;
}
if(l.callback===_b){
if(_c.nestingLevel===0){
_c.splice(i,1);
}else{
_c[i]=null;
_c.cleanupRequired=true;
}
}
}
},subscribe:function(_e,_f,_10){
var _11=this.listenersByType[_e];
if(_11===undefined){
_11=[];
_11.nestingLevel=0;
_11.cleanupRequired=false;
this.listenersByType[_e]=_11;
}
_11.push({callback:_f,scope:_10});
},removeListenersByScope:function(_12){
FE.Object.forEachValue(this.listenersByType,function(_13){
var i,len=_13.length;
for(i=len-1;i>=0;i--){
var l=_13[i];
if(l===null){
continue;
}
if(l.scope===_12){
if(_13.nestingLevel===0){
_13.splice(i,1);
}else{
_13[i]=null;
_13.cleanupRequired=true;
}
}
}
},this);
}};
framework.client.MessageService=function(){
};
framework.client.MessageService.prototype={channels:{},global:null,channel:function(_14){
if(_14==null){
return this.global;
}
var c=this.channels[_14];
if(c===undefined){
c=FE.Class.newInstance("framework.client.MessageChannel",_14);
this.channels[_14]=c;
}
return c;
},removeChannel:function(_15){
if(_15==null){
return;
}
if(typeof _15!=="string"){
_15=_15.name;
}
delete this.channels[_15];
},removeListenersByScope:function(_16){
FE.Object.forEachValue(this.channels,function(c){
c.removeListenersByScope(_16);
},this);
},subscribe:function(_17,_18,_19){
var g=this.global;
return g.subscribe.apply(g,arguments||[]);
},unsubscribe:function(_1a,_1b){
var g=this.global;
return g.unsubscribe.apply(g,arguments||[]);
},publish:function(_1c,_1d){
var g=this.global;
return g.publish.apply(g,arguments||[]);
}};
FE.MessageService=framework.client.MessageService.prototype;
FE.MessageService.global=FE.MessageService.channel("global");

FE.namespace("framework.client");
framework.client.ClientRenderer=function(){
};
framework.client.ClientRenderer.prototype={Transaction:FE.Class.createInnerClass({properties:{aborted:false,completed:false},methods:{abort:function(){
this.aborted=true;
},isCompleted:function(){
return this.completed;
}}}),render:function(_1,_2){
var _2=this.Transaction.newInstance();
var _3=null;
var _4=_1.defaultCallbacks!==false;
_1.callback=FE.prepareAsyncCallback(_1.callback,null,_4);
var _5=_1.callback;
var _6=null;
var _7=null;
if(_1.userClass){
var _8={};
if(FE.client.userClass.memberships){
FE.Object.extend(_8,FE.client.userClass.memberships);
}
FE.Object.extend(_8,_1.userClass);
_7=FE.buildUserClassKey(_8);
}
if(_1.depends){
_3=_1.depends;
}else{
if(_1.type!=null){
switch(_1.type){
case "component":
if(_1.component){
_1.componentType=_1.component;
}
if(this.isDebugEnabled()){
this.debug("Rendering component of type \""+_1.componentType+"\"...");
}
_6="An error has occured when rendering component \""+_1.componentType+"\"";
var c=_1.componentType;
if(typeof c==="string"){
_3={type:"component",componentType:c,userClassKey:_7};
}
break;
}
}
}
if(_1.componentModel){
_6="An error has occured when rendering component \""+_1.componentModel.__componentPrefix__+"\"";
}
if(_3){
FE.client.requireModule(_3,{start:function(){
if(_1.startModel!=null){
if(_1.append===true){
}else{
if(_1.replace===true){
}
}
}
},complete:function(){
},failure:function(){
try{
_5.failure.apply(_5,arguments);
}
finally{
_5.complete();
}
},success:function(){
if(this.isDebugEnabled()){
this.debug("Client dependencies requiring for client-side rendering downloaded.");
}
try{
FE.safeCall(this,"_render",[_1,_2],_6);
}
catch(e ){
_5.failure(e);
}
finally{
_2.complete=true;
_5.complete();
}
},scope:this});
}else{
try{
FE.safeCall(this,"_render",[_1,_2],_6);
}
catch(e ){
_5.failure(e);
}
finally{
_5.complete();
_2.complete=true;
}
}
},_render:function(_9,_a){
this.debug("Beginning client-rendering...");
if(_a.aborted===true){
return;
}
var _b={};
FE.Object.extend(_b,FE.client.getParameters());
FE.Object.extend(_b,_9.params);
var _c=FE.client.createClientContext(_b);
var _d=null;
var c;
var _e;
switch(_9.type){
case "component":
if(this.isDebugEnabled()){
if(this.isDebugEnabled()){
this.debug("Rendering component on client...");
}
}
if(_9.componentType){
c=_9.componentType;
if(typeof c==="string"){
var _f=c;
c=_c.createModel(_f);
if(c==null){
FE.throwError("Unable to render component. Component not found with type \""+_f+"\"");
}
}
}else{
if(_9.componentModel){
c=_9.componentModel;
_9.componentType=c.__componentPrefix__;
}
}
if(c==null){
FE.throwError("Unable to render component. Component not specified");
}
if(this.isDebugEnabled()){
this.debug("Rendering component of type "+_9.componentType);
}
c=_c.processModel(c);
break;
default:
FE.throwError("Invalid render type: "+_9.type+" - params: "+JSON.stringify(_9));
}
if(c!=null){
_c.render(c);
_d=_c.getStringOutput();
}else{
_d="";
}
if(this.isDebugEnabled()){
this.debug("Rendering complete. Component type: "+_9.componentType);
}
if(_d!=null){
var _10=null;
var _11=_9.targetEl;
if(_9.targetEl!=null){
_10=FE.client.getEl(_9.targetEl);
if(_10==null){
FE.throwError("Unable to add rendered HTML to DOM. Target element not found with ID of \""+_9.targetEl+"\"");
}
}else{
if(_9.template){
_10=FE.client.getEl(_9.template.el);
if(_10==null){
FE.throwError("Unable to add rendered HTML to DOM. Target element not found with ID of \""+_9.template.el+"\"");
}
}else{
FE.throwError("Unable to add rendered HTML to DOM. Target element not specified");
}
}
var _12;
var _13;
if(_10){
if(_9.append===true){
if(this.isDebugEnabled()){
this.debug("Appending rendering HTML to the DOM for component of type "+_f);
}
_12=this._renderToEl(_d);
_13=this.getNodes(_12);
FE.Array.forEach(_13,function(_14){
_10.appendChild(_14);
},this);
}else{
if(_9.replace===true){
var _15=_10.parentNode;
_10.style.visibility="hidden";
_12=this._renderToEl(_d);
if(this.isDebugEnabled()){
this.debug("Replacing node ("+_10.id+") with rendered HTML for component of type "+_f);
}
if(_15==null){
FE.throwError("Unable to replace DOM node with newly rendered HTML. The DOM node is not part of the DOM because the parent node is null. Target element ID: "+_10.id);
}
_13=this.getNodes(_12);
FE.Array.forEach(_13,function(_16){
_15.insertBefore(_16,_10);
},this);
FE.client.removeChild(_15,_10);
}else{
if(this.isDebugEnabled()){
this.debug("Replacing content of node ("+_10.id+") with rendering HTML for component of type "+_f);
}
FE.client.removeAllChildren(_10);
_10.innerHTML=_d;
}
}
var ids;
if(this.isDebugEnabled()){
this.debug("Rendered component added to DOM. Component type: "+_9.componentType);
}
_c.onAfterRender();
_9.callback.success();
}else{
FE.throwError("Unable to add rendered HTML to DOM. Target element not found");
}
}
},getNodes:function(el){
var _17=[];
FE.client.forEachChild(el,function(n){
_17.push(n);
},this);
return _17;
},_renderToEl:function(_18,el){
if(el==null){
el=document.createElement("span");
}
el.innerHTML=_18;
return el;
}};

FE.namespace("framework.client");
framework.client.Widget=function(){
};
framework.client.Widget.prototype={_setComponentPrefix:function(_1){
this.componentPrefix=_1;
this.componentShortPrefix=_1.substring(_1.lastIndexOf(".")+1);
var _2="/"+_1.substring(0,_1.lastIndexOf(".")).replace(/\./g,"/");
this.componentDir=_2;
this.historyListeners=[];
},_getElCache:function(_3){
var _4=this["__elCache__"];
if(_4===undefined){
_4={};
this["__elCache__"]=_4;
}
return _4;
},_getId:function(_5){
var _6=[this.widgetId];
if(FE.Array.isArray(_5)===false){
_6.push(_5);
}else{
_6=_6.concat(_5);
}
var id=_6.join(":");
return id;
},template:function(){
return this.dir()+"/"+this.componentShortPrefix+".html";
},component:function(){
return this.componentPrefix;
},dir:function(){
return this.componentDir;
},channel:function(){
if(this._channel===undefined){
this._channel=FE.client.channel(this.widgetId);
}
return this._channel;
},hasEvents:function(){
var _7=FE.Class.forName(this.componentPrefix+"Events");
return _7!=null;
},events:function(){
var _8=FE.Class.forName(this.componentPrefix+"Events");
if(_8==null){
throw new Error("No events defined for widget \""+this.componentPrefix+"\". Make sure events class with name \""+this.componentPrefix+"Events\" exists");
}
return _8.getInstance();
},removeWidgetEl:function(id){
var el=this.getWidgetEl(id);
if(el!=null){
FE.client.removeNode(el);
}
var _9=this._getElCache();
id=this._getId(id);
delete _9[id];
},getWidgetEl:function(id,_a){
var _b=this._getElCache();
var _c=this._getId(id);
var el=_b[_c];
if(el===undefined){
el=FE.client.getEl(_c);
if(el==null){
if(_a!==true){
FE.throwError("Widget element not found with ID \""+id+"\" for widget \""+this.widgetId+"\". Resolved ID: "+_c);
}else{
el=null;
}
}
_b[_c]=el;
}
return el;
},destroy:function(_d){
this._destroy(_d===undefined?true:_d,true);
},_destroy:function(_e,_f){
this.destroyed=true;
if(this.isDebugEnabled()){
this.debug("Destroying widget with ID of \""+this.widgetId+"\" ("+this.componentPrefix+")");
}
if(this.beforeDestroy){
this.beforeDestroy();
}
var _10=this.getRootEl();
if(_10){
if(_f==true){
_10.parentNode.removeChild(_10);
}
if(_e){
FE.client.forEachChildEl(_10,function(c){
FE.Widget.destroyWidgetsForNode(_10);
},this);
}
}
delete this["__elCache__"];
if(this.widgetId){
delete framework.client.Widget.lookup[this.widgetId];
}
if(this.rootElId){
delete framework.client.Widget.lookupByRootElId[this.rootElId];
}
FE.MessageService.removeChannel(this.channel());
FE.MessageService.removeListenersByScope(this);
FE.forEach(this.historyListeners,function(l){
l.remove();
});
this.historyListeners=[];
if(this.afterDestroy){
this.afterDestroy();
}
},getRootEl:function(){
if(this.rootElId){
var el=FE.client.getEl(this.rootElId);
return el;
}else{
return null;
}
},rerender:function(_11){
if(this.destroyed!==false){
this.warn("A widget that has been destroyed cannot be rerendered. Widget ID: "+this.widgetId);
}
if(this.isDebugEnabled()){
this.debug("Rerendering widget with ID of \""+this.widgetId);
}
if(this.rootElId==null){
FE.throwError("Unable to rerender widget for component of type \""+this.componentPrefix+"\". The root element ID is null");
}
var _12=this.getRootEl();
if(_12==null){
FE.throwError("Unable to rerender widget for component of type \""+this.componentPrefix+"\". The target element with ID of \""+this.rootElId+"\" does not exist in the DOM.");
}
FE.client.renderComponent({componentType:this.componentPrefix,targetEl:this.getRootEl(),replace:true,params:_11});
},hidePanel:function(){
if(this.__panelName__!=null){
FE.client.hidePanel(this.__panelName__);
}
},publish:function(_13,arg,_14){
FE.client.publish(_13,arg,_14);
},subscribe:function(_15,_16,_17){
if(_16){
_16.scope=this;
FE.client.subscribe(_15,_16,_17);
}else{
FE.client.subscribe(_15,this,_17);
}
},historySubscribe:function(_18,_19,_1a){
if(_1a==null){
_1a=this;
}
var _1b=FE.History.subscribe(_18,_19,_1a);
this.historyListeners.push(_1b);
return _1b;
},historySave:function(_1c){
FE.History.save(_1c);
}};
FE.Widget=FE.Class.forName("framework.client.Widget");
framework.client.Widget.lookup={};
framework.client.Widget.lookupByRootElId={};
framework.client.Widget.register=function(cfg){
if(typeof cfg==="string"){
cfg=JSON.parse(cfg.replace(/&lt;/g,"<").replace(/&amp;/g,"&"));
}
var id=cfg.config.widgetId;
var _1d=cfg.componentPrefix+"Widget";
var _1e=FE.Class.forName(_1d);
if(_1e==null){
return;
}
var w;
w=_1e.newInstance();
if(id){
if(this.lookup[id]!==undefined){
FE.throwError("Widget has already been registered with ID "+id);
}
this.lookup[id]=w;
}
w.widgetId=id;
w.rootElId=cfg.config.rootElId;
if(w.rootElId){
framework.client.Widget.lookupByRootElId[w.rootElId]=w;
}
if(w.getWidgetEl===undefined){
FE.Object.extend(w,this.prototype);
}
w.__panelName__=cfg.config.__panelName__;
w.destroyed=false;
w._setComponentPrefix(cfg.componentPrefix);
if(w.hasEvents()){
FE.client.subscribe(w.events(),w,w.channel(),false);
}
if(w.initWidget){
w.initWidget(cfg.config);
}
};
framework.client.Widget.get=function(id){
var w=this.lookup[id];
return w;
};
framework.client.Widget.getByRootElId=function(id){
var w=this.lookupByRootElId[id];
return w;
};
framework.client.Widget.widgetFromNode=function(n){
var _1f=n.getAttribute&&n.getAttribute("widget")==="true";
if(_1f){
var id=n.id;
var w=this.getByRootElId(id);
return w;
}else{
return null;
}
};
framework.client.Widget.destroyWidgetsForNode=function(n){
var w=this.widgetFromNode(n);
if(w){
w._destroy(false,false);
}
FE.client.forEachChildEl(n,function(c){
this.destroyWidgetsForNode(c);
},this);
};

FE.namespace("framework.client");
framework.client.ClientRequire=function(){
};
framework.client.ClientRequire.require=function(o,_1,_2){
var r=FE.Class.newInstance("framework.client.ClientRequire",o,_1,_2);
r.execute();
};
framework.client.ClientRequire.prototype={requireTransaction:null,requireTransactions:[],init:function(o,_3,_4){
this.callback=FE.client.prepareAsyncCallback(_3,_4);
this.callbackArg=_3.arg;
this.missingJS=[];
this.missingCSS=[];
this.cssComplete=false;
this.jsComplete=false;
this._require(o);
},_require:function(o){
if(FE.Array.isArray(o)){
FE.Array.orEach(o,function(e){
this._require(e);
},this);
return;
}
if(typeof o==="string"){
if(FE.isJSPath(o)){
this._requireJS(o);
}else{
if(FE.isCSSPath(o)){
this._requireCSS(o);
}else{
var js="/"+o.replace(/\./g,"/")+".js";
this._requireJS(js);
}
}
}else{
if(o.css!=null){
this._requireCSS(o.css);
}
if(o.js!=null){
this._requireJS(o.js);
}
}
},_requireJS:function(js){
if(FE.Array.isArray(js)){
FE.Array.forEach(js,function(e){
this._requireJS(e);
},this);
return;
}
if(!FE.client.isJavaScriptIncluded(js)){
this.missingJS.push(js);
}
},_requireCSS:function(_5){
if(FE.Array.isArray(_5)){
FE.Array.forEach(_5,function(e){
this._requireCSS(e);
},this);
return;
}
if(!FE.client.isStyleSheetIncluded(_5)){
this.missingCSS.push(_5);
}
},execute:function(){
if(this.missingCSS.length===0&&this.missingJS.length===0){
this.callback.success(this.callbackArg);
}else{
this.cssComplete=this.missingCSS.length===0;
this.jsComplete=this.missingJS.length===0;
if(this.isDebugEnabled()){
this.debug("Making request for:\nJS Count: "+this.missingJS.length+"\nCSS Count: "+this.missingCSS.length);
}
this.callback.start(this.callbackArg);
if(this.requireTransaction==null){
this._execute();
}else{
if(this.isDebugEnabled()){
this.debug("Require transaction in progress.... enqueing transaction. Current transactions: "+JSON.stringify(this.requireTransactions));
}
this.requireTransactions.enqueue(t);
}
}
},_execute:function(){
if(this.isDebugEnabled()){
this.debug("Performing require transaction...");
}
this.requireTransaction=this;
var _6=this.missingCSS;
var _7=this.missingJS;
var Y=YUI();
if(_6.length>0){
if(this.isDebugEnabled()){
this.debug("Adding missing CSS files. Count: "+_6.length);
}
this.relMissingCSS=FE.getContextRelativeUrl(_6.clone());
Y.Get.css(this.relMissingCSS,{onSuccess:this._requireSuccessCallback,onFailure:this._requireFailureCallback,onTimeout:this._requireTimeoutCallback,data:{type:"css",require:this,time:new Date().getTime(),scope:this},timeout:60000});
}
if(_7.length>0){
if(this.isDebugEnabled()){
this.debug("Adding missing JS files. Count: "+_7.length);
}
this.relMissingJS=FE.getContextRelativeUrl(_7.clone());
Y.Get.script(this.relMissingJS,{onSuccess:this._requireSuccessCallback,onFailure:this._requireFailureCallback,onTimeout:this._requireTimeoutCallback,data:{type:"js",require:this,time:new Date().getTime(),scope:this},timeout:60000});
}
},_nextRequireTransaction:function(){
var t=this.requireTransactions.dequeue();
if(t!==undefined){
t._execute();
}
},_requireTimeoutCallback:function(o){
var _8=o.data;
var _9=_8.type;
var _a=_8.scope;
var _b="";
FE.Array.forEach(o.nodes,function(n){
_b+=n.href+" - "+n.readyState+"\n";
},_a);
var _c=document.createTextNode(_b);
document.body.appendChild(_c);
if(_a.alert){
_a.alert("Require for "+_9+" timed out.");
}
if(this.error){
this.error("Require for "+_9+" timed out. Start time: "+_8.time);
}
_a._requireFailureCallback.apply(_a,arguments);
},_requireFailureCallback:function(o){
var _d=o.data;
var _e=_d.type;
var t=_d.require;
var _f=_d.scope;
if(_e==="css"){
if(this.error){
this.error("Require CSS failed. Start time: "+_d.time);
}
t.cssComplete=true;
if(_f.alert){
_f.alert("Unable to load required CSS files: "+JSON.stringify(t.relMissingCSS));
}
}else{
if(_e==="js"){
if(this.error){
this.error("Require JavaScript failed. Start time: "+_d.time);
}
t.jsComplete=true;
if(_f.alert){
_f.alert("Unable to load required JS files: "+JSON.stringify(t.relMissingJS));
}
}
}
if(t.jsComplete&&t.cssComplete){
t.callback.complete(t.callbackArg);
t.requireTransaction=null;
t._nextRequireTransaction();
}
if(t.failed!==true){
t.callback.failure(t.callbackArg);
t.failed=true;
}
},_requireSuccessCallback:function(o){
var _10=FE.client;
var _11=o.data;
var _12=_11.type;
var t=_11.require;
var _13=_11.scope;
var _14=null;
if(_12==="css"){
if(this.debug){
this.debug("Require CSS completed. "+(t.jsComplete?"JavaScript is complete.":"JavaScript is NOT complete.")+" Start time: "+_11.time);
}
FE.Array.forEach(t.missingCSS,function(css){
FE.client.markStyleSheetIncluded(css);
},t);
t.cssComplete=true;
}else{
if(_12==="js"){
if(this.debug){
this.debug("Require JavaScript completed. "+(t.cssComplete?"CSS is complete.":"CSS is NOT complete.")+" Start time: "+_11.time);
}
FE.Array.forEach(t.missingJS,function(js){
_10.markJavaScriptIncluded(js);
},t);
t.jsComplete=true;
}
}
if(t.jsComplete&&t.cssComplete){
if(t.failed!==true){
t.callback.success(t.callbackArg);
}
t.callback.complete(t.callbackArg);
t.requireTransaction=null;
t._nextRequireTransaction();
}
}};
FE.ClientRequire=FE.Class.forName("framework.client.ClientRequire");

FE.namespace("framework.client");
framework.client.ClientIO=function(){
};
framework.client.ClientIO.prototype={get:function(_1,_2,_3){
var _4=FE.Class.newInstance("framework.client.Request");
_4.get(_1,_2,_3);
},post:function(_5,_6,_7){
var _8=FE.Class.newInstance("framework.client.Request");
_8.post(_5,_6,_7);
},send:function(_9,_a,_b){
var _c=FE.Class.newInstance("framework.client.Request");
_c.send(_9,_a,_b);
}};
FE.IO=FE.Class.forName("framework.client.ClientIO").getInstance();
framework.client.Request=function(){
};
framework.client.Request.prototype={getCache:{},pendingGets:{},get:function(_d,_e,_f){
_e.method="GET";
return this.send(_d,_e,_f);
},post:function(url,cfg,_10){
cfg.method="POST";
return this.send(url,cfg,_10);
},send:function(url,cfg,_11){
this.method=cfg.method;
this.url=url;
this.responseData=null;
var _12={callback:FE.client.prepareAsyncCallback(cfg,_11),arg:cfg.arg};
this.callbacks=[_12];
this.config=cfg;
this.cacheResult=cfg.noCache!==true;
if(this.method==="GET"){
var _13=cfg.noCache===true||cfg.refresh===true?undefined:this.getCache[url];
if(_13!==undefined){
if(this.isDebugEnabled()){
this.debug("Using cached resposne for GET request to URL \""+_13.url+"\"");
}
_13._invoke("success",this.callbacks);
return;
}
var _14=this.pendingGets[url];
if(_14!==undefined){
this.xmlHttpRequest=_14.xmlHttpRequest;
this.responseData=_14.responseData;
if(this.isDebugEnabled()){
this.debug("Request for \""+url+"\" arleady initiated. Merging callbacks...");
}
this._invoke("start");
_14.callbacks=_14.callbacks.concat(this.callbacks);
return _14;
}
this.pendingGets[url]=this;
}
if(this.isDebugEnabled()){
this.debug("Sending "+this.method+" request to \""+this.url+"'");
}
var _15=FE.Class.newInstance("framework.client.XMLHttpRequest");
this.xmlHttpRequest=_15;
var _16=cfg.data;
if(cfg.params){
if(this.method==="GET"){
this.url=FE.url(this.url,params,{contextRelative:false});
}else{
if(this.method==="POST"){
_16=FE.queryString(cfg.params);
cfg.contentType="application/x-www-form-urlencoded; charset=UTF-8";
}
}
}
_15.open(this.method,url,cfg.async!==false);
if(cfg.contentType){
_15.setRequestHeader("Content-Type",cfg.contentType);
}
if(cfg.headers){
FE.Object.forEachEntry(cfg.headers,function(k,v){
_15.setRequestHeader(k,v);
},this);
}
_15.send(_16,{start:this._ioStart,success:this._ioSuccess,failure:this._ioFailure,complete:this._ioComplete,scope:this});
return this;
},_invoke:function(_17,_18){
if(_18==null){
_18=this.callbacks;
}
FE.Array.forEach(_18,function(c){
c.callback[_17].call(c.callback,this.responseData,c.arg,this.xmlHttpRequest);
},this);
},_ioStart:function(_19){
if(this.isDebugEnabled()){
this.debug("IO start for \""+this.url);
}
this._invoke("start");
},_ioSuccess:function(_1a){
if(this.isDebugEnabled()){
this.debug("IO success for \""+this.url);
}
this.responseData=this._getResponseData(_1a);
this._invoke("success");
},_ioFailure:function(_1b){
if(this.isDebugEnabled()){
this.debug("IO failure for \""+this.url);
}
this.responseData=this._getResponseData(_1b);
this._invoke("failure");
},_ioComplete:function(_1c){
if(this.method==="GET"){
if(_1c.success===true&&this.cacheResult===true){
this.getCache[this.url]=this;
}
delete this.pendingGets[this.url];
}
if(this.isDebugEnabled()){
this.debug("IO complete for \""+this.url);
}
this._invoke("complete");
},_getResponseData:function(_1d){
var _1e=_1d.responseText;
var _1f=_1d.getResponseHeader("Content-Type");
if(_1f==null){
if(this.isDebugEnabled()){
this.debug("Content-Type response header is is missing for URL "+this.url);
}
}
if(_1f!=null&&_1f.indexOf("application/json")!=-1){
try{
_1e=FE.client.parseJSON(_1e);
this.dump(_1e,"JSON response for URL \""+this.url+"\"");
}
catch(e ){
this.warn("Unable to parse JSON response to \""+this.url+"\". Exception: "+e,e);
}
}
return _1e;
},abort:function(){
this.xmlHttpRequest.abort();
}};

FE.namespace("framework.client");
framework.client.AsyncCallback=function(){
};
framework.client.AsyncCallback.prototype={init:function(_1,_2,_3){
this.startCalled=false;
var _4={};
if(_1==null){
_1={};
}
if(typeof _1==="function"){
var f=_1;
_4.success=f;
}else{
_4.success=_1.success;
_4.failure=_1.failure;
}
if(_4.failure===undefined){
_4.failure=this._defaultAsyncFailure;
}
_4.defaultStart=_1.defaultStart||this._defaultAsyncStart;
_4.defaultComplete=_1.defaultComplete||this._defaultAsyncComplete;
if((_3===undefined||_3===true)&&(_1.start===undefined&&_1.complete===undefined)){
_4.start=_4.defaultStart;
_4.complete=_4.defaultComplete;
}else{
_4.start=_1.start;
_4.complete=_1.complete;
}
_4.__scope=_2||_1.scope||_1;
this.callbacks=[_4];
},_defaultAsyncFailure:function(){
},_defaultAsyncStart:function(){
FE.client.publish("framework.client.ClientEvents.onAsyncStart",null);
},_defaultAsyncComplete:function(){
FE.client.publish("framework.client.ClientEvents.onAsyncComplete",null);
},merge:function(_5){
if(_5==null){
throw new Error("Invalid arguments");
}
this.callbacks=this.callbacks.concat(_5.callbacks);
return this;
},success:function(_6){
return this.invoke("success",arguments);
},failure:function(_7){
return this.invoke("failure",arguments);
},start:function(_8){
if(this.startCalled===true){
return;
}
this.startCalled=true;
return this.invoke("start",arguments);
},complete:function(_9){
if(this.startCalled==false||this.completeCalled==true){
return;
}
this.completeCalled=true;
return this.invoke("complete",arguments);
},invoke:function(_a,_b){
var _c=this.callbacks;
var _d;
FE.Array.forEach(_c,function(c){
var _e=c[_a];
if(_e!=null){
if(this.isDebugEnabled()&&c.__scope){
this.debug("Invoking "+_a+" in object of type "+c.__scope.__className__);
}
_d=_e.apply(c.__scope,_b);
}
},this);
return _d;
}};

FE.namespace("framework.client");
framework.client.ClientDependencyManager=function(){
};
framework.client.ClientDependencyManager.prototype={noLogger:true,includedModules:[],requestedModules:[],currentRequire:null,requireQueue:[],_getModuleKey:function(_1){
var _2="";
if(_1.type==="component"){
_2+="c-"+_1.componentType;
}else{
throw new Error("Invalid module type. Params: "+JSON.stringify(_1));
}
if(_1.userClassKey){
_2+=":"+_1.userClassKey;
}
return _2;
},requireComponent:function(_3,_4,_5,_6){
var _7={type:"component",componentType:_3};
this.requireModule(_7,_4,_5,_6);
},_moduleExists:function(_8){
return this.includedModules[_8]!==undefined||this.requestedModules[_8]!==undefined;
},requireModule:function(_9,_a,_b){
_a=FE.client.prepareAsyncCallback(_a,_b);
var _c=this._getModuleKey(_9);
var _d={params:_9,callback:_a,moduleKey:_c};
if(this.currentRequire!=null){
this.requireQueue.enqueue(_d);
_a.start();
return;
}else{
this.currentRequire=_d;
this._doRequireModule(_9,_a,_c);
}
},_doRequireModule:function(_e,_f,_10){
if(this._moduleExists(_10)){
this._handleSuccess();
}else{
var _11=this.requestedModules.length>0?this.requestedModules.join("/"):null;
var url=FE.url(FE.client.getModuleBaseUrl(_e.userClassKey));
if(_e.type==="component"){
url+="c-"+_e.componentType+"/";
}
if(_11!=null){
url+="e/"+_11+"/";
}
url+="cs="+FE.client.getDependenciesChecksum()+"/";
var _12={success:this._getModuleSuccess,failure:this._getModuleFailure,start:this._getModuleStart,complete:this._getModuleComplete,scope:this,arg:{callback:_f,moduleKey:_10}};
FE.client.get(url,_12);
}
},_next:function(){
if(this.requireQueue.length==0){
return;
}
this.currentRequire=this.requireQueue.dequeue();
this._doRequireModule(this.currentRequire.params,this.currentRequire.callback,this.currentRequire.moduleKey);
},_getModuleStart:function(_13,arg,_14){
arg.callback.start();
},_getModuleComplete:function(_15,arg,_16){
},_getModuleSuccess:function(_17,arg,_18){
var _19=_17.dependencies;
this.currentRequire.moduleKey=arg.moduleKey;
var _1a=this.handleDependencies(_19);
if(FE.Array.isEmpty(_1a.cssPaths)&&FE.Array.isEmpty(_1a.jsPaths)){
this._handleSuccess();
}else{
var _1b={success:this._requireSuccess,failure:this._requireFailure,start:this._requireStart,complete:this._requireComplete,scope:this,arg:{callback:arg.callback,dependencies:_19}};
FE.client.require({js:_1a.jsPaths,css:_1a.cssPaths},_1b);
}
},_getModuleFailure:function(_1c,arg,_1d){
this._handleFailure();
},_handleFailure:function(){
var _1e=this.currentRequire.callback;
try{
_1e.failure();
}
finally{
this._handleComplete();
}
},_handleSuccess:function(){
var _1f=this.currentRequire.callback;
var _20=this.currentRequire.moduleKey;
if(_20!==undefined&&this.requestedModules[_20]===undefined){
this.requestedModules[_20]=true;
this.requestedModules.push(_20);
this.requestedModules.sort();
}
try{
_1f.success();
}
finally{
this._handleComplete();
}
},_handleComplete:function(){
try{
this.currentRequire.callback.complete();
this.currentRequire=null;
}
finally{
this._next();
}
},_requireStart:function(arg){
},_requireComplete:function(){
},_requireSuccess:function(){
this._handleSuccess();
},_requireFailure:function(arg){
this._handleFailure();
},includeDependencies:function(_21){
var _22=this.handleDependencies(_21);
FE.client.includeCSS(_22.cssPaths);
FE.client.includeJS(_22.jsPaths);
},markIncluded:function(_23){
if(!FE.Array.isArray(_23)){
_23=[_23];
}
FE.Array.forEach(_23,function(n){
this.includedModules[n]=true;
},this);
},handleOrder:["js","components","cr-components","cr-component-modules","component-modules","css","images"],handleDependencies:function(_24){
var _25=FE.Factory.createDependencyHandler();
_25.location=_24.location;
delete _24.location;
var _26=function(_27,d){
var _28=_25[_27];
if(_28){
_28.call(_25,d);
}else{
alert("Dependency handler function not found for dependency of type \""+_27+"\"");
}
};
var _29={};
FE.Array.forEach(this.handleOrder,function(_2a){
var d=_24[_2a];
if(d){
_29[_2a]=true;
_26(_2a,d);
}
},this);
FE.Object.forEachEntry(_24,function(_2b,d){
if(_29[_2b]!==true){
_26(_2b,d);
}
},this);
return {cssPaths:_25.cssPaths,jsPaths:_25.jsPaths};
}};

framework.client.ClientDependencyHandler=function(){
};
framework.client.ClientDependencyHandler.prototype={init:function(){
this.location=null;
this.cssPaths=[];
this.jsPaths=[];
},"components":function(_1){
this._handleComponents(_1);
},"cr-components":function(_2){
this._handleComponents(_2);
},_handleComponents:function(_3){
FE.Object.forEachEntry(_3,function(_4,d){
var _5;
if(d.prefix!=null){
_5=d.prefix;
FE.client.addComponentPrefixMapping(_4,d.prefix);
}else{
_5=_4;
}
var _6=d.classes;
FE.Array.forEach(_6,function(c){
var _7=FE.client.getIncludeUrlPrefix()+"/js/c/"+_4+"-"+c.type+"/";
this.jsPaths.push(_7);
},this);
var _8=d.properties;
FE.Array.forEach(_8,function(p){
var _9=FE.client.getIncludeUrlPrefix()+"/js/c/"+_4+"/p/"+p.path+"/";
this.jsPaths.push(_9);
},this);
var _a=d.templates;
FE.Array.forEach(_a,function(t){
var _b=FE.client.getIncludeUrlPrefix()+"/js/c/"+_4+"/t/"+t.path+"/";
this.jsPaths.push(_b);
},this);
var _c=d.css;
FE.Array.forEach(_c,function(c){
var _d=FE.client.getIncludeUrlPrefix()+"/css/c/"+_4+"/p/"+c.path+"/";
this.cssPaths.push(_d);
},this);
var _e=d.images;
FE.Array.forEach(_e,function(_f){
FE.client.addComponentImageSrc(_5,_f.path,_f.resolvedSrc);
},this);
},this);
},"cr-component-modules":function(_10){
this._handleComponentModules(_10,true);
},"component-modules":function(_11){
this._handleComponentModules(_11,false);
},_handleComponentModules:function(_12,_13){
FE.Array.forEach(_12,function(o){
if(o.path.startsWith("/")){
o.path=o.path.substring(1);
}
var loc=this.location?("loc="+this.location+"/"):"";
var cr=_13?("cr=true/"):"";
var url;
var _14=o.cs;
if(_14.js!=null){
url=FE.client.getIncludeUrlPrefix()+"/js/cm/"+loc+cr+"cs="+_14.js+"/"+o.path+"/";
this.jsPaths.push(url);
}
if(_14.css!=null){
url=FE.client.getIncludeUrlPrefix()+"/css/cm/"+loc+cr+"cs="+_14.css+"/"+o.path+"/";
this.cssPaths.push(url);
}
},this);
},"images":function(_15){
FE.Array.forEach(_15,function(_16){
FE.client.addImageSrc(_16.basePath,_16.path,_16.resolvedSrc);
},this);
},"css":function(_17){
FE.Array.forEach(_17,function(o){
var url=this.getIncludeFileUrl(o.path,o.checksum,"css",o.type);
this.cssPaths.push(url);
},this);
},"js":function(_18){
FE.Array.forEach(_18,function(o){
var url=this.getIncludeFileUrl(o.path,o.checksum,"js",o.type);
this.jsPaths.push(url);
},this);
},getIncludeFileUrl:function(_19,_1a,_1b,_1c){
var url=FE.client.getIncludeUrlPrefix()+"/"+_1b+"/"+_1c;
if(_1a!=null&&_1a.length>0){
url+="/cs="+_1a;
}
if(_19.startsWith("/")===false){
url+="/";
}
url+=_19+"/";
return url;
}};

FE.namespace("framework.client");
framework.client.ClientTemplateManager=function(){
};
framework.client.ClientTemplateManager.prototype={templatesByPath:{},init:function(){
},loadTemplateDoc:function(_1){
var _2=this.templatesByPath[_1];
if(_2===undefined){
return null;
}
if(FE.Class.forName("framework.templates.TemplateDocument").isInstance(_2)===false){
var _3=FE.Class.newInstance("framework.templates.TemplateDocument");
FE.Object.extend(_3,_2);
this.templatesByPath[_1]=_3;
return _3;
}else{
return _2;
}
},registerTemplate:function(_4,_5){
if(this.isDebugEnabled()){
this.debug("Registering template at path \""+_4+"\"");
}
this.templatesByPath[_4]=_5;
}};
function TemplateNotFoundException(_6){
this.message="Template not found at path \""+_6+"\"";
this.path=_6;
this.name=TemplateNotFoundException;
};
TemplateNotFoundException.prototype={noLogger:true,toString:function(){
return "TemplateNotFoundException: "+this.message;
}};
FE.Class.inherit("TemplateNotFoundException","Error");

FE.namespace("framework.client");
framework.client.AsyncActions=function(){
};
framework.client.AsyncActions.prototype={init:function(_1,_2,_3){
this.context=_3;
this.scope=_1.scope;
this.componentContext=_2;
this.rootAction=FE.Class.newInstance("framework.client.AsyncAction",_1,null,this);
this.complete=false;
},isAsyncStarted:function(){
return this.rootAction.started===true;
},getStartResult:function(){
return this.rootAction.startResult;
},isComplete:function(){
return this.complete;
},onComplete:function(_4){
},_complete:function(_5,_6){
this.result=_5;
this.complete=true;
this.success=_6;
this.onComplete(_5,_6);
},execute:function(){
this.rootAction.execute();
},invokeFailure:function(){
var _7=this.rootAction.userCallback.invoke("failure",arguments);
return _7;
}};
framework.client.AsyncAction=function(){
};
framework.client.AsyncAction.prototype={init:function(_8,_9,_a){
var _b=_8.scope;
if(_b==null&&_8.callback){
_b=_8.callback.scope;
}
this.parent=_9;
this.asyncActions=_a;
this.childCount=0;
this.scope=_b||(_9?_9.scope:null);
if(this.scope==null){
FE.throwError("scope is not defined");
}
this.actionFunc=null;
this.actionArray=null;
this.isSerial=false;
this.index=-1;
this.condition=null;
this.failureCount=0;
this.successCount=0;
this.actionCount=0;
this.userCallback=_8.callback?FE.prepareAsyncCallback(_8.callback,_8.scope,false):null;
this.async=this.userCallback!=null;
this.context=_a.context;
this.description=_8.description;
if(this.scope&&this.scope.__className__){
this.description=this.description?(this.description+" ("+this.scope.__className__+")"):"("+this.scope.__className__+")";
}
if(this.context==null){
FE.throwError("context is null");
}
this.componentContext=_a.componentContext;
this.started=false;
this.startResult=null;
this.elId=null;
var _c=null;
if(_8.parallelActions){
this.isSerial=false;
_c=_8.parallelActions;
}else{
if(_8.serialActions){
this.isSerial=true;
_c=_8.serialActions;
}else{
if(_8.actions){
this.isSerial=_8.serial!==undefined?_8.serial:false;
_c=_8.actions;
}else{
if(_8.action){
this.actionCount=1;
this.actionFunc=_8.action;
this.condition=_8.condition;
if(_8.async!==undefined){
this.async=_8.async;
}
}
}
}
}
if(_c!=null){
this.actionCount=_c.length;
this.actionArray=[];
FE.Array.forEach(_c,function(_d,i){
var _e=FE.Class.newInstance("framework.client.AsyncAction",_d,this,_a);
_e.index=i;
this.actionArray.push(_e);
},this);
}
},shouldExecute:function(){
if(this.condition==null){
return true;
}else{
if(this.condition===false){
return false;
}else{
if(typeof this.condition==="function"){
return this.condition.call(this.scope);
}else{
return true;
}
}
}
},execute:function(){
if(this.actionFunc){
if(this.shouldExecute()){
if(this.description){
this.debug("Executing action \""+this.description+"\"");
}
try{
this.actionFunc.call(this.scope,{start:this.start,complete:this.complete,success:this.success,failure:this.failure,scope:this});
}
catch(e ){
this.error("An error has occurred when invoking action function for \""+this.description+"\". Exception: "+e,e);
this.failure(e);
}
if(this.async===false){
this.success();
}
}else{
this.debug("Skipped action \""+this.description+"\" due to condition");
this.successCount++;
this.handleStatusChange("success",arguments,false);
}
}else{
if(this.actionArray){
if(this.isSerial){
this.actionArray[0].execute();
}else{
FE.Array.forEach(this.actionArray,function(_f){
_f.execute();
},this);
}
}
}
},isComplete:function(){
return this.successCount+this.failureCount===this.actionCount;
},handleStatusChange:function(_10,_11,_12){
var _13=null;
this.context.pushComponentContext(this.componentContext);
try{
if(_12!==false&&this.userCallback){
try{
this.debug("Invoking user callback for \""+_10+"\". Action: "+this.description);
_13=this.userCallback.invoke(_10,_11);
}
catch(e ){
this.error("An error has occurred when invoking user "+_10+" callback. Exception: "+e,e);
_13=""+e;
_10="failure";
}
}
if(this.parent){
switch(_10){
case "start":
this.parent.handleStatusChange(_10,_11);
break;
case "success":
this.parent.onChildSuccess(this,_11);
break;
case "failure":
this.parent.onChildFailure(this,_11);
break;
}
}else{
switch(_10){
case "start":
this.started=true;
this.startResult=_13;
this.elId=this.context.getUniqueId();
break;
case "success":
case "failure":
this.debug("Action \""+this.description+"\" completed");
this.result=_13;
this.debug("Invoking user callback for \""+_10+"\". Action: "+this.description);
this.userCallback.complete(_10,_11);
this.asyncActions._complete(_13,this.isSuccess());
break;
}
}
}
finally{
this.context.popComponentContext();
}
},isSuccess:function(){
return this.failureCount===0;
},success:function(){
this.successCount++;
this.handleStatusChange("success",arguments);
},failure:function(){
this.error("An error has occurred for asynchronous action \""+this.description+"\". Failure arguments: "+FE.Object.dumpToString(FE.Array.fromArguments(arguments)));
this.failureCount++;
this.handleStatusChange("failure",arguments);
},start:function(){
if(this.handleStatusChange==null){
alert(this.__className__);
}
this.handleStatusChange("start",arguments);
},complete:function(){
},onChildFailure:function(_14,_15){
this.failureCount++;
this.handleStatusChange("failure",_15);
},onChildSuccess:function(_16,_17){
this.successCount++;
if(this.isComplete()){
this.handleStatusChange("success",null);
}else{
if(this.isSerial){
var _18=_16.index;
var _19=this.actionArray[_18+1];
_19.execute();
}
}
}};

FE.namespace("framework.client");
framework.client.ClientBrowserDetection=function(){
};
framework.client.ClientBrowserDetection.prototype={init:function(){
this.UA=this._getUserAgent();
},_getUserAgent:function(){
var ua=null;
YUI().use("yui-base",function(Y){
ua=Y.UA;
});
return ua;
},isGecko:function(){
return this.UA.gecko>0;
},isIE:function(){
return this.UA.ie>0;
},isOpera:function(){
return this.UA.opera>0;
},isWebKit:function(){
return this.UA.webkit>0;
}};

FE.namespace("framework.client");
framework.client.ClientCookies=function(){
};
framework.client.ClientCookies.prototype={getCookie:function(_1){
},save:function(){
},removeCookie:function(_2){
},createCookie:function(){
}};
FE.Class.inherit("framework.client.ClientCookies","framework.core.Cookie");

FE.namespace("framework.client");
framework.client.ClientFactory=function(){
};
framework.client.ClientFactory.prototype={getClientEnvironment:function(){
return FE.Class.forName("framework.client.ClientEnvironment").getInstance();
},getTemplateManager:function(){
return FE.Class.forName("framework.client.ClientTemplateManager").getInstance();
},createCookiesManager:function(){
return FE.Class.forName("framework.client.ClientCookies").newInstance();
},getElementModelResolever:function(){
return FE.Class.forName("framework.templates.ElementModelResolver").getInstance();
},getMVCProcessor:function(){
return FE.Class.forName("framework.mvc.MVCProcessor").getInstance();
},createDependencyHandler:function(){
return FE.Class.newInstance("framework.client.ClientDependencyHandler");
}};

FE.namespace("framework.client");
framework.client.ClientHistory=function(){
};
framework.client.ClientHistory.prototype={init:function(){
var _1=document;
var _2=window;
this.listeners=[];
this.states={};
this.usingIFrame=false;
if(FE.Browser.isGecko()){
this._getHash=this._geckoGetHash;
}
this.lastHash=this._getHash();
FE.client.ondomready(function(){
this._updateStates(this.lastHash,true);
},this);
if(_2.onhashchange!==undefined&&(_1.documentMode===undefined||_1.documentMode>7)){
this._watchHashUsingEvent();
}else{
if(FE.Browser.isIE()&&(_1.documentMode===undefined||_1.documentMode<8)){
this._watchHashUsingIFrame();
}else{
this._watchHashUsingTimer();
}
}
},save:function(_3){
FE.forEach(_3,function(k,v){
this.states[k]=v;
},this);
this._updateHash();
},subscribe:function(_4,_5,_6){
var _7=this;
var _8={params:_4,callback:_5,scope:_6,remove:function(){
_7.remove(this);
}};
this.listeners.push(_8);
},remove:function(_9){
this.listeners.removeObject(_9);
},_watchHashUsingTimer:function(){
FE.client.setInterval(this._checkHash,this,50);
},_checkHash:function(){
var _a=this._getHash();
if(_a!=this.lastHash){
this._updateStates(_a);
this.lastHash=_a;
}
},_watchHashUsingIFrame:function(){
this.usingIFrame=true;
FE.client.ondomready(function(){
this.iframe=document.createElement("IFRAME");
this.iframe.src="javascript:false";
this.iframe.style.display="none";
document.body.insertBefore(this.iframe,document.body.firstChild);
this.lastHash="";
FE.client.setInterval(this._checkIFrame,this,2000);
},this);
},_checkIFrame:function(){
var _b=this._iframeGetHash();
if(_b!=this.lastHash){
window.location.hash=_b;
this._updateStates(_b);
this.lastHash=_b;
}
},_updateStates:function(_c,_d){
var _e=_c.split("&");
var _f={};
var _10={};
FE.forEach(_e,function(_11){
var _12=_11.split("=");
if(_12.length===2){
var k=_12[0];
var v=_12[1];
_10[k]=v;
var _13=this.states[k];
if(_13!=v){
_f[k]=v;
}
}
},this);
FE.Object.extend(this.states,_f);
FE.forEach(this.states,function(k,v){
if(_10.hasOwnProperty(k)===false){
_f[k]=null;
delete this.states[k];
}
},this);
this._notifyListeners(_f,_d);
},_notifyListeners:function(_14,_15){
if(_15||FE.Object.isEmpty(_14)===false){
FE.forEach(this.listeners,function(_16){
if(FE.Object.contains(_14,_16.params)){
var _17={get:this._getState,getInt:this._getStateInt,getBoolean:this._getStateBoolean};
FE.forEach(_16.params,function(k){
_17[k]=_14[k];
},this);
_16.callback.call(_16.scope,_17,_15);
}
},this);
}
},_getState:function(_18,_19){
var _1a=this[_18];
return _1a==null?_19:_1a;
},_getStateInt:function(_1b,_1c){
var _1d=this.get(_1b,_1c);
if(_1d==null){
return _1d;
}
return typeof _1d!=="number"?parseInt(_1d):_1d;
},_getStateBoolean:function(_1e,_1f){
var _20=this.get(_1e,_1f);
if(_20==null){
return _20;
}
return typeof _20!=="boolean"?_20===1||_20==="true":_20;
},_checkStates:function(_21){
FE.forEach(_21,function(k,v){
},this);
return true;
},_watchHashUsingEvent:function(){
var _22=this;
window.onhashchange=function(){
_22._onHashChange();
};
},_onHashChange:function(){
var _23=this._getHash();
this._updateStates(_23);
},getHashForStates:function(_24){
var _25=[];
FE.forEach(_24,function(k,v){
var _26=FE.encodeURIComponent(k)+"="+FE.encodeURIComponent(v);
_25.push(_26);
});
var _27=_25.join("&");
return _27;
},_updateHash:function(){
var _28=this.getHashForStates(this.states);
if(this.iframe){
var _29=this.getIFrameDoc();
_29.open();
_29.close();
_29.location.hash=_28;
window.location.hash=_28;
}else{
window.location.hash=_28;
}
this.lastHash=_28;
},_geckoGetHash:function(){
var m=/#(.*)$/.exec(window.location.href);
return m&&m[1]?m[1]:"";
},_iframeGetHash:function(){
var _2a=this.getIFrameDoc().location.hash;
if(_2a&&_2a.length>0){
return _2a.substring(1);
}else{
return "";
}
},_getHash:function(){
return window.location.hash.substr(1);
},getIFrameDoc:function(){
return this.iframe.contentDocument||this.iframe.contentWindow.document;
}};

FE.namespace("framework.client");
framework.client.XMLHttpRequest=function(_1){
};
framework.client.XMLHttpRequest.prototype={READYSTATE_UNSENT:0,READYSTATE_OPENED:1,READYSTATE_HEADERS_RECEIVED:2,READYSTATE_LOADING:3,READYSTATE_DONE:4,METHOD_CONNECT:"CONNECT",METHOD_DELETE:"DELETE",METHOD_GET:"GET",METHOD_HEAD:"HEAD",METHOD_OPTIONS:"OPTIONS",METHOD_POST:"POST",METHOD_PUT:"PUT",METHOD_TRACE:"TRACE",METHOD_TRACK:"TRACK",isIE:window.document.all&&!window.opera,init:function(){
this.xmlHttpRequest=window.XMLHttpRequest?new window.XMLHttpRequest():new window.ActiveXObject("Microsoft.XMLHTTP");
this.readyState=this.READYSTATE_UNSENT;
this.responseText=null;
this.responseXML=null;
this.status=0;
this.statusText=null;
this.onreadystatechange=null;
this.aborted=false;
},open:function(_2,_3,_4,_5,_6){
if(_4!==false){
_4=true;
}
this.async=_4;
this.url=_3;
var _7=this;
this._windowOnUnloadFunc=function(){
_7._onUnload.call(_7);
};
if(this.isIE&&this.async){
window.attachEvent("onunload",this._windowOnUnloadFunc);
}
var _8=function(){
try{
_7._onReadyStateChange.call(_7);
}
catch(e ){
_7.error("An error occurred for request to URL \""+_3+"\" ("+_2+"). Exception: "+e,e);
}
};
if(window.console&&window.console.firebug&&window.console.firebug.indexOf("1.4.0")!=-1){
this.xmlHttpRequest.onload=_8;
this.xmlHttpRequest.onerror=_8;
this.xmlHttpRequest.onabort=_8;
}else{
this.xmlHttpRequest.onreadystatechange=_8;
}
try{
if(arguments.length>4){
this.xmlHttpRequest.open(_2,_3,_4,_5,_6);
}else{
if(arguments.length>3){
this.xmlHttpRequest.open(_2,_3,_4,_5);
}else{
this.xmlHttpRequest.open(_2,_3,_4);
}
}
}
catch(e ){
FE.throwError("Unable to send XML HTTP Request for URL \""+_3+"\". Exception: "+e,e);
}
if(this.readyState!==this.READYSTATE_OPENED){
if(this.isDebugEnabled()){
this.debug("Simulating open state change");
}
this._onReadyStateChange(this.READYSTATE_OPENED);
}
},send:function(_9,_a){
if(this.isDebugEnabled()){
this.debug("Sending HTTP request for URL \""+this.url+"\"");
}
this.callback=FE.client.prepareAsyncCallback(_a);
this.callback.start(this);
this.xmlHttpRequest.send(_9||"");
if(this.isDebugEnabled()){
this.debug("HTTP request sent for URL \""+this.url+"\"");
}
if(this.async===false&&this.readyState!==this.READYSTATE_DONE){
var _b=this.readyState+1;
while(_b<=this.READYSTATE_DONE){
this._onReadyStateChange(_b);
if(this.aborted){
return;
}
_b++;
}
}
},abort:function(){
if(this.aborted){
return;
}
if(this.isDebugEnabled()){
this.debug("Aborting request");
}
this.aborted=true;
this.xmlHttpRequest.abort();
this.callback.complete(this);
this.xmlHttpRequest.onreadystatechange=function(){
};
},getAllResponseHeaders:function(){
return this.xmlHttpRequest.getAllResponseHeaders();
},getResponseHeader:function(_c){
return this.xmlHttpRequest.getResponseHeader(_c);
},setRequestHeader:function(_d,_e){
return this.xmlHttpRequest.setRequestHeader(_d,_e);
},_onUnload:function(){
if(this.xmlHttpRequest.readyState!=this.READYSTATE_DONE){
this.abort();
}
},_synchronizeValues:function(){
try{
this.responseText=this.xmlHttpRequest.responseText;
}
catch(e ){
}
try{
this.status=this.xmlHttpRequest.status;
}
catch(e ){
}
try{
this.statusText=this.xmlHttpRequest.statusText;
}
catch(e ){
}
},_onReadyStateChange:function(_f){
if(_f==null){
_f=this.xmlHttpRequest.readyState;
}
if(this.readyState>=_f){
return;
}
if(this.isDebugEnabled()){
this.debug("_onReadyStateChange("+_f+")");
}
this.readyState=_f;
if(this.isDebugEnabled()){
this.debug("HTTP request ready state changed changed for \""+this.url+"\". Ready state: "+this.readyState);
}
if(this.aborted){
this.readyState=this.READYSTATE_UNSENT;
return;
}
if(this.readyState==this.READYSTATE_DONE){
this._onDone();
}
if(this.onreadystatechange){
this.onreadystatechange();
}
},_onDone:function(){
if(this.isDebugEnabled()){
this.debug("HTTP request completed for \""+this.url+"\". Status: "+this.status);
}
this._synchronizeValues();
if((this.status>=200&&this.status<300)||this.status===1223){
this.success=true;
}else{
this.success=false;
}
if(this.callback){
if(this.success){
if(this.isDebugEnabled()){
this.debug("Invoking success callback");
}
this.callback.success(this);
}else{
if(this.isDebugEnabled()){
this.debug("Invoking failure callback");
}
this.callback.failure(this);
}
if(this.isDebugEnabled()){
this.debug("Invoking complete callback");
}
this.callback.complete(this);
}
if(this.isIE&&this.async){
window.detachEvent("onunload",this._windowOnUnloadFunc);
}
}};

FE.namespace("framework.rest.client");
framework.rest.client.ClientRESTAPI=function(){
};
framework.rest.client.ClientRESTAPI.prototype={cachedResources:{},_resourceUrl:function(_1,_2){
if(!_1.startsWith("/")){
_1="/"+_1;
}
var _3=FE.url(this.getBasePath()+_1,_2,{useQueryString:true});
return _3;
},getBasePath:function(){
return "/resources";
},uri:function(_4,_5){
if(_4==null){
return null;
}
_4=FE.client.resolveResourceURI(_4);
var _6=_4.split("/");
FE.Array.forEach(_6,function(_7,i){
_6[i]=FE.encodeURIComponent(_7);
},this);
_4=_6.join("/");
if(_5){
_4=FE.url(_4,_5,{contextRelative:false,useQueryString:true});
}
return _4;
},readResource:function(_8,_9,_a){
if(_9==null){
FE.throwError("A callback is required when reading a REST resource on the client-side.");
}
if(_8==null||_8.length===0){
throw new Error("Invalid resource URI");
}
var _b=_a!=null?_a.params:null;
_9=FE.client.prepareAsyncCallback(_9);
var _c=this.cachedResources[_8];
if(_c!==undefined){
var _d=_c.object;
if(_c.full){
_9.success(_d);
return;
}
if(_a&&_a.require){
var _e=true;
var i,_f=_a.require.length;
for(i=0;i<_f;i++){
var p=_a.require[i];
if(_d[p]===undefined){
_e=false;
break;
}
}
if(_e){
_9.success(_d);
return;
}
}
}
var url=this._resourceUrl(_8,_b);
var _10=false;
if(typeof url==="object"){
_10=url.crossDomain;
_8=url.uri;
url=url.url;
}
if(_10===false){
return FE.client.get(url,{"start":this._sendStart,"complete":this._sendComplete,"success":this._sendSuccess,"failure":this._sendFailure,noCache:_a!=null&&_a.noCache===true,arg:{uri:_8,callback:_9}},this);
}else{
this.debug("Sending cross-domain REST request to \""+url+"\"");
FE.ClientRequire.require({js:url},{"start":this._xdrStart,"complete":this._xdrComplete,"success":this._xdrSuccess,"failure":this._xdrFailure,arg:{uri:_8,callback:_9,url:url},scope:this});
}
},updateResource:function(uri,_11,_12,_13){
if(uri==null||uri.length===0){
throw new Error("Invalid resource URI");
}
var _14=_13!=null?_13.params:null;
_12=FE.client.prepareAsyncCallback(_12);
var _15=JSON.stringify(_11);
var url=this._resourceUrl(uri,_14);
return FE.IO.post(url,{"start":this._sendStart,"complete":this._sendComplete,"success":this._sendSuccess,"failure":this._sendFailure,arg:{uri:uri,callback:_12},contentType:"application/json",data:_15,scope:this},this);
},createResource:function(uri,_16,_17,_18){
if(uri==null||uri.length===0){
throw new Error("Invalid resource URI");
}
var _19=_18!=null?_18.params:{};
_17=FE.client.prepareAsyncCallback(_17);
var _1a=JSON.stringify(_16);
_19.method="CREATE";
var url=this._resourceUrl(uri,_19);
return FE.IO.post(url,{"start":this._sendStart,"complete":this._sendComplete,"success":this._sendSuccess,"failure":this._sendFailure,arg:{uri:uri,callback:_17},contentType:"application/json",data:_1a,scope:this},this);
},deleteResource:function(uri,_1b){
},_sendStart:function(_1c,arg,_1d){
var _1e=arg.callback;
_1e.start();
},_sendComplete:function(_1f,arg,_20){
var _21=arg.callback;
_21.complete();
},_sendSuccess:function(_22,arg,_23){
this.cachedResources[arg.uri]={object:_22,full:true};
this.onObjectRead(_22);
var _24=arg.callback;
_24.success(_22);
},_sendFailure:function(_25,arg,_26){
var _27=arg.callback;
_27.failure(_25,_26);
this.debug(JSON.stringify(_25));
},cacheResource:function(uri,_28,_29){
this.cachedResources[uri]={object:_28,full:_29!==false};
},_xdrStart:function(arg){
var _2a=arg.callback;
_2a.start();
},_xdrComplete:function(arg){
var _2b=arg.callback;
_2b.complete();
},_xdrSuccess:function(arg){
var _2c=arg.callback;
var uri=arg.uri;
var _2d=this.cachedResources[uri];
if(_2d!=null){
var _2e=_2d.object;
this.onObjectRead(_2e);
_2c.success(_2e);
}else{
this.error("Unable to GET cross-domain REST resource for URI \""+arg.uri+"\" ("+arg.url+"). Cached resource not found");
var _2f={};
_2c.failure(null,_2f);
}
},_xdrFailure:function(arg){
var _30=arg.callback;
var _31={};
this.error("Unable to GET cross-domain REST resource for URI \""+arg.uri+"\" ("+arg.url+"). Unable to load script");
_30.failure(null,_31);
},onObjectRead:function(obj){
this._processObj(obj);
},_processObj:function(obj){
if(obj==null){
return;
}
FE.Object.forEachEntry(obj,function(k,v){
if(k==="resourceURI"){
var uri=v;
var _32=this.cachedResources[uri];
if(_32===undefined){
this.cachedResources[uri]={object:obj,full:false};
}
}else{
if(FE.Array.isArray(v)){
FE.Array.forEach(v,function(o){
this._processObj(o);
},this);
}else{
if(typeof v==="object"){
this._processObj(v);
}
}
}
},this);
}};

FE.namespace("framework.client.util");
framework.client.util.DOM=function(){
};
framework.client.util.DOM.prototype={getRegion:function(el){
el=this.getEl(el);
var _1=null;
YUI.use("yui","dom",function(Y){
_1=Y.DOM.region(el);
});
if(_1==null){
FE.throwError("dom-base has not been included");
}
return FE.Region.newInstance(_1.left,_1.top,_1.width,_1.height);
},getViewportRegion:function(){
var _2=null;
YUI.use("yui-base","dom",function(Y){
_2=Y.DOM.viewportRegion();
});
return FE.Region.newInstance(_2.left,_2.top,_2.width,_2.height);
},getDimensions:function(el){
return {width:el.offsetWidth,height:el.offsetHeight};
},setXY:function(el,x,y){
el.style.left=x+"px";
el.style.top=y+"px";
},getEl:function(el){
return FE.client.getEl(el);
},on:function(_3){
if(_3.event==null){
FE.throwError("The \"event\" property is required for the configuration object.");
}
var _4=null;
YUI().use("event",function(Y){
_4=Y.on(_3.event,_3.callback,_3.el,_3.scope,_3.arg);
});
return _4;
},detach:function(_5){
YUI().use("event",function(Y){
Y.detach(_5);
});
},addClass:function(el,_6){
el.className=FE.HTMLUtils.addClass(el.className,_6);
},removeClass:function(el,_7){
el.className=FE.HTMLUtils.removeClass(el.className,_7);
}};
FE.DOM=FE.Class.forName("framework.client.util.DOM").getInstance();

FE.namespace("framework.client.util");
framework.client.util.Region=function(){
};
framework.client.util.Region.VERTICAL=1;
framework.client.util.Region.HORIZONTAL=2;
framework.client.util.Region.prototype={vPointFunctions:{"t":function(_1){
return _1.top;
},"c":function(_2){
return (_2.top+_2.bottom)>>1;
},"b":function(_3){
return _3.bottom;
}},hPointFunctions:{"l":function(_4){
return _4.left;
},"c":function(_5){
return (_5.left+_5.right)>>1;
},"r":function(_6){
return _6.right;
}},init:function(x,y,_7,_8){
this.width=_7;
this.height=_8;
this.moveTo(x,y);
},clone:function(){
return FE.Region.newInstance(this.x,this.y,this.width,this.height);
},alignTo:function(_9,_a,_b){
var _c=this.getPointOnRegion(_9);
var _d=_a.getPointOnRegion(_b);
var _e=_d.x-_c.x;
var _f=_d.y-_c.y;
this.moveDelta(_e,_f);
},moveDelta:function(_10,_11){
this.moveTo(this.x+_10,this.y+_11);
},moveTo:function(x,y){
this.x=x;
this.y=y;
this.left=x;
this.top=y;
this.right=x+this.width;
this.bottom=y+this.height;
},getPointOnRegion:function(pos){
var _12=this.vPointFunctions[pos.charAt(0)];
if(_12==null){
throw new Error("Invalid position. The first character should be either t, c or b");
}
var _13=this.hPointFunctions[pos.charAt(1)];
if(_12==null){
throw new Error("Invalid position. The second character should be either l, c or r");
}
var x=_13(this);
var y=_12(this);
return {x:x,y:y};
},containedWithin:function(_14){
return this.x>=_14.x&&this.y>=_14.y&&this.right<=_14.right&&this.bottom<=_14.bottom;
},boundingBox:function(_15){
var _16=Math.min(this.left,_15.left);
var top=Math.min(this.top,_15.top);
var _17=Math.max(this.right,_15.right);
var _18=Math.max(this.bottom,_15.bottom);
var _19=_17-_16;
var _1a=_18-top;
return FE.Region.newInstance(_16,top,_19,_1a);
},intersect:function(_1b){
var top=Math.max(this.top,_1b.top);
var _1c=Math.min(this.right,_1b.right);
var _1d=Math.min(this.bottom,_1b.bottom);
var _1e=Math.max(this.left,_1b.left);
if(_1d>=top&&_1c>=_1e){
var _1f=_1c-_1e;
var _20=_1d-top;
return FE.Region.newInstance(_1e,top,_1f,_20);
}else{
return null;
}
},grow:function(_21,_22){
var _23=this.left-_21;
var _24=this.right+_21;
var top=this.top-_22;
var _25=this.bottom+_22;
this.moveTo(_23,top);
this.setDimensions(_24-_23,_25-top);
},setWidth:function(_26){
this.width=_26;
this.right=this.left+_26;
},setHeight:function(_27){
this.height=_27;
this.bottom=this.top+_27;
},setDimensions:function(_28,_29){
this.setWidth(_28);
this.setHeight(_29);
},constrainToRegion:function(_2a,_2b,_2c){
var _2d=this.top;
var _2e=this.left;
var _2f=true;
if(_2b==null||(_2b&FE.Region.VERTICAL)!=0){
if(this.bottom>_2a.bottom){
_2d=_2a.bottom-this.height;
}
if(_2d<_2a.top){
_2d=_2a.top;
}
if(this.height>_2a.height){
_2f=false;
}
}
if(_2b==null||(_2b&FE.Region.HORIZONTAL)!=0){
if(this.right>_2a.right){
_2e=_2a.right-this.width;
}
if(_2e<_2a.left){
_2e=_2a.left;
}
if(this.width>_2a.width){
_2f=false;
}
}
if(_2f===false&&_2c===true){
return false;
}
this.moveTo(_2e,_2d);
return _2f;
},toString:function(){
return "Region(top="+this.top+", left="+this.left+", bottom="+this.bottom+", right="+this.right+", width="+this.width+", height="+this.height+")";
}};
FE.Region=FE.Class.forName("framework.client.util.Region");

FE.namespace("framework.util");
framework.util.HTMLUtils=function(){
};
framework.util.HTMLUtils.prototype={addClass:function(_1,_2){
if(_1==null){
return _2;
}
var _3=_1.split(" ");
var _4=false;
FE.Array.forEach(_3,function(c){
if(c===_2){
return _1;
}
});
return _1+" "+_2;
},removeClass:function(_5,_6){
if(_5==null){
return "";
}
var _7=_5.split(" ");
var _8=[];
FE.Array.forEach(_7,function(c){
if(c!==_6){
_8.push(c);
}
});
return _8.join(" ");
}};
FE.HTMLUtils=FE.Class.getInstance("framework.util.HTMLUtils");

FE.namespace("framework.util");
framework.util.MessageUtils=function(){
};
framework.util.MessageUtils.prototype={NORMAL:0,INSIDE:1,merge:function(_1,_2){
if(_1==null||_2==null){
return _1;
}
var _3=typeof _2==="function"?_2:function(_4){
return _2[_4];
};
var _5=FE.Class.newInstance("framework.core.StringBuilder");
var _6=0;
var _7=0;
var _8=this.NORMAL;
var i=0;
var _9=_1.length;
while(i<=_9){
var c=i==_9?0:_1.charAt(i);
var _a=i>=_9-1?0:_1.charAt(i+1);
switch(_8){
case this.NORMAL:
if(c===0){
break;
}
if(c==="{"){
if(_a==="{"){
_5.append("{");
i+=2;
continue;
}else{
_8=this.INSIDE;
_6=_7=i+1;
}
}else{
_5.append(c);
}
break;
case this.INSIDE:
if(c==="}"){
if(_6==_7){
_5.append("{}");
}else{
var _b=_1.substring(_6,_7);
var _c=_3(_b);
if(_c!=null){
_5.append(_c);
}else{
_5.append("{"+_b+"}");
}
}
_8=this.NORMAL;
}else{
if(c===0){
_5.append("{");
if(_6!=_7){
_5.append(_1.substring(_6,_7));
}
break;
}else{
_7++;
}
}
break;
}
i++;
}
return _5.toString();
}};
FE.MessageUtils=FE.Class.getInstance("framework.util.MessageUtils");

FE.namespace("framework.util");
framework.util.Profiler=function(){
};
framework.util.Profiler.prototype={init:function(){
this.roots=[];
this.stack=[];
this.handlesByFunction={};
},capture:function(_1,_2,_3,_4){
if(_3==null){
_3="(unknown)";
}
var _5=FE.Array.fromArguments(arguments).slice(3).join(",").replace(/\n/g," ");
var _6=_3+"("+_5+")";
var _7=this.start(_6);
try{
_1.call(_2);
}
finally{
_7.stop();
}
var _8=this.handlesByFunction[_3];
if(_8===undefined){
_8=[];
this.handlesByFunction[_3]=_8;
}
_8.push(_7);
},start:function(_9){
var _a=FE.Class.newInstance("framework.util.TimerHandle",this,_9);
if(this.stack.length==0){
this.roots.push(_a);
}else{
var _b=this.stack.peek();
_b._addChild(_a);
}
this.stack.push(_a);
return _a;
},_stop:function(){
this.stack.pop();
},toString:function(){
var sb=FE.Class.newInstance("framework.core.StringBuilder");
sb.append("TIMES BY FUNCTION:\n");
sb.append("------------------\n");
FE.Object.forEachEntry(this.handlesByFunction,function(_c,_d){
var _e=0;
_d.sort(function(a,b){
return a.duration>b.duration?-1:(a.duration<b.duration?1:0);
});
FE.Array.forEach(_d,function(_f){
if(_f.duration!=null){
_e+=_f.duration;
}
},this);
sb.append(_c+" - "+_e+"ms\n");
FE.Array.forEach(_d,function(_10){
var _11=_10.duration;
if(_11!=null){
_11+="ms";
}else{
_11="?";
}
_11=FE.StringUtils.leftPad(_11,6);
sb.append(" "+_11+" - "+_10.details+"\n");
},this);
sb.append("\n");
},this);
sb.append("\n");
sb.append("TIMER TREE:\n");
sb.append("-----------\n");
FE.Array.forEach(this.roots,function(_12){
_12._toStringHelper(sb,"");
},this);
return sb.toString();
}};
framework.util.TimerHandle=function(){
};
framework.util.TimerHandle.prototype={init:function(_13,_14){
this.profiler=_13;
this.startTime=FE.currentTimeMillis();
this.children=[];
this.details=_14!=null?_14:"(no details)";
this.duration=null;
},_addChild:function(_15){
this.children.push(_15);
},stop:function(){
this.endTime=FE.currentTimeMillis();
this.duration=this.endTime-this.startTime;
this.profiler._stop();
},toString:function(){
var sb=FE.Class.newInstance("framework.core.StringBuilder");
var tab="";
this._toStringHelper(sb,tab);
return sb.toString();
},_toStringHelper:function(sb,tab){
var _16=this.duration?" - "+this.duration+"ms":"";
sb.append(tab+this.details+_16+"\n");
FE.Array.forEach(this.children,function(_17){
_17._toStringHelper(sb,tab+"    ");
},this);
}};

FE.namespace("framework.util");
framework.util.StringUtils=function(){
};
framework.util.StringUtils.prototype={leftPad:function(_1,_2,c){
var _3=_1.length;
if(_3>=_2){
return _1;
}
var _4=_2-_3;
if(c==null){
c=" ";
}
var sb=FE.Class.newInstance("framework.core.StringBuilder");
for(var i=0;i<_4;i++){
sb.append(c);
}
sb.append(_1);
return sb.toString();
},rightPad:function(_5,_6,c){
var _7=_5.length;
if(_7>=_6){
return _5;
}
var _8=_6-_7;
if(c==null){
c=" ";
}
var sb=FE.Class.newInstance("framework.core.StringBuilder");
sb.append(_5);
for(var i=0;i<_8;i++){
sb.append(c);
}
return sb.toString();
}};
FE.StringUtils=FE.Class.getInstance("framework.util.StringUtils");

FE.defineEvents({name:"events.PanelEvents",onDrag:{init:function(_1){
this.panel=_1.panel;
}},onBeforeShow:{init:function(_2){
this.panel=_2.panel;
}},onShow:{init:function(_3){
this.panel=_3.panel;
}},onBeforeHide:{init:function(_4){
this.panel=_4.panel;
}},onHide:{init:function(_5){
this.panel=_5.panel;
}}});

var swfobject=function(){
var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){
var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;
if(typeof t.plugins!=D&&typeof t.plugins[S]==r){
ab=t.plugins[S].description;
if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){
T=true;
X=false;
ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");
ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);
ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);
ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0;
}
}else{
if(typeof O.ActiveXObject!=D){
try{
var ad=new ActiveXObject(W);
if(ad){
ab=ad.GetVariable("$version");
if(ab){
X=true;
ab=ab.split(" ")[1].split(",");
ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)];
}
}
}
catch(Z ){
}
}
}
return {w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac};
}(),k=function(){
if(!M.w3){
return;
}
if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){
f();
}
if(!J){
if(typeof j.addEventListener!=D){
j.addEventListener("DOMContentLoaded",f,false);
}
if(M.ie&&M.win){
j.attachEvent(x,function(){
if(j.readyState=="complete"){
j.detachEvent(x,arguments.callee);
f();
}
});
if(O==top){
(function(){
if(J){
return;
}
try{
j.documentElement.doScroll("left");
}
catch(X ){
setTimeout(arguments.callee,0);
return;
}
f();
})();
}
}
if(M.wk){
(function(){
if(J){
return;
}
if(!/loaded|complete/.test(j.readyState)){
setTimeout(arguments.callee,0);
return;
}
f();
})();
}
s(f);
}
}();
function f(){
if(J){
return;
}
try{
var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));
Z.parentNode.removeChild(Z);
}
catch(aa ){
return;
}
J=true;
var X=U.length;
for(var Y=0;Y<X;Y++){
U[Y]();
}
};
function K(X){
if(J){
X();
}else{
U[U.length]=X;
}
};
function s(Y){
if(typeof O.addEventListener!=D){
O.addEventListener("load",Y,false);
}else{
if(typeof j.addEventListener!=D){
j.addEventListener("load",Y,false);
}else{
if(typeof O.attachEvent!=D){
i(O,"onload",Y);
}else{
if(typeof O.onload=="function"){
var X=O.onload;
O.onload=function(){
X();
Y();
};
}else{
O.onload=Y;
}
}
}
}
};
function h(){
if(T){
V();
}else{
H();
}
};
function V(){
var X=j.getElementsByTagName("body")[0];
var aa=C(r);
aa.setAttribute("type",q);
var Z=X.appendChild(aa);
if(Z){
var Y=0;
(function(){
if(typeof Z.GetVariable!=D){
var ab=Z.GetVariable("$version");
if(ab){
ab=ab.split(" ")[1].split(",");
M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)];
}
}else{
if(Y<10){
Y++;
setTimeout(arguments.callee,10);
return;
}
}
X.removeChild(aa);
Z=null;
H();
})();
}else{
H();
}
};
function H(){
var ag=o.length;
if(ag>0){
for(var af=0;af<ag;af++){
var Y=o[af].id;
var ab=o[af].callbackFn;
var aa={success:false,id:Y};
if(M.pv[0]>0){
var ae=c(Y);
if(ae){
if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){
w(Y,true);
if(ab){
aa.success=true;
aa.ref=z(Y);
ab(aa);
}
}else{
if(o[af].expressInstall&&A()){
var ai={};
ai.data=o[af].expressInstall;
ai.width=ae.getAttribute("width")||"0";
ai.height=ae.getAttribute("height")||"0";
if(ae.getAttribute("class")){
ai.styleclass=ae.getAttribute("class");
}
if(ae.getAttribute("align")){
ai.align=ae.getAttribute("align");
}
var ah={};
var X=ae.getElementsByTagName("param");
var ac=X.length;
for(var ad=0;ad<ac;ad++){
if(X[ad].getAttribute("name").toLowerCase()!="movie"){
ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value");
}
}
P(ai,ah,Y,ab);
}else{
p(ae);
if(ab){
ab(aa);
}
}
}
}
}else{
w(Y,true);
if(ab){
var Z=z(Y);
if(Z&&typeof Z.SetVariable!=D){
aa.success=true;
aa.ref=Z;
}
ab(aa);
}
}
}
}
};
function z(aa){
var X=null;
var Y=c(aa);
if(Y&&Y.nodeName=="OBJECT"){
if(typeof Y.SetVariable!=D){
X=Y;
}else{
var Z=Y.getElementsByTagName(r)[0];
if(Z){
X=Z;
}
}
}
return X;
};
function A(){
return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312);
};
function P(aa,ab,X,Z){
a=true;
E=Z||null;
B={success:false,id:X};
var ae=c(X);
if(ae){
if(ae.nodeName=="OBJECT"){
l=g(ae);
Q=null;
}else{
l=ae;
Q=X;
}
aa.id=R;
if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){
aa.width="310";
}
if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){
aa.height="137";
}
j.title=j.title.slice(0,47)+" - Flash Player Installation";
var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;
if(typeof ab.flashvars!=D){
ab.flashvars+="&"+ac;
}else{
ab.flashvars=ac;
}
if(M.ie&&M.win&&ae.readyState!=4){
var Y=C("div");
X+="SWFObjectNew";
Y.setAttribute("id",X);
ae.parentNode.insertBefore(Y,ae);
ae.style.display="none";
(function(){
if(ae.readyState==4){
ae.parentNode.removeChild(ae);
}else{
setTimeout(arguments.callee,10);
}
})();
}
u(aa,ab,X);
}
};
function p(Y){
if(M.ie&&M.win&&Y.readyState!=4){
var X=C("div");
Y.parentNode.insertBefore(X,Y);
X.parentNode.replaceChild(g(Y),X);
Y.style.display="none";
(function(){
if(Y.readyState==4){
Y.parentNode.removeChild(Y);
}else{
setTimeout(arguments.callee,10);
}
})();
}else{
Y.parentNode.replaceChild(g(Y),Y);
}
};
function g(ab){
var aa=C("div");
if(M.win&&M.ie){
aa.innerHTML=ab.innerHTML;
}else{
var Y=ab.getElementsByTagName(r)[0];
if(Y){
var ad=Y.childNodes;
if(ad){
var X=ad.length;
for(var Z=0;Z<X;Z++){
if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){
aa.appendChild(ad[Z].cloneNode(true));
}
}
}
}
}
return aa;
};
function u(ai,ag,Y){
var X,aa=c(Y);
if(M.wk&&M.wk<312){
return X;
}
if(aa){
if(typeof ai.id==D){
ai.id=Y;
}
if(M.ie&&M.win){
var ah="";
for(var ae in ai){
if(ai[ae]!=Object.prototype[ae]){
if(ae.toLowerCase()=="data"){
ag.movie=ai[ae];
}else{
if(ae.toLowerCase()=="styleclass"){
ah+=" class=\""+ai[ae]+"\"";
}else{
if(ae.toLowerCase()!="classid"){
ah+=" "+ae+"=\""+ai[ae]+"\"";
}
}
}
}
}
var af="";
for(var ad in ag){
if(ag[ad]!=Object.prototype[ad]){
af+="<param name=\""+ad+"\" value=\""+ag[ad]+"\" />";
}
}
aa.outerHTML="<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\""+ah+">"+af+"</object>";
N[N.length]=ai.id;
X=c(ai.id);
}else{
var Z=C(r);
Z.setAttribute("type",q);
for(var ac in ai){
if(ai[ac]!=Object.prototype[ac]){
if(ac.toLowerCase()=="styleclass"){
Z.setAttribute("class",ai[ac]);
}else{
if(ac.toLowerCase()!="classid"){
Z.setAttribute(ac,ai[ac]);
}
}
}
}
for(var ab in ag){
if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){
e(Z,ab,ag[ab]);
}
}
aa.parentNode.replaceChild(Z,aa);
X=Z;
}
}
return X;
};
function e(Z,X,Y){
var aa=C("param");
aa.setAttribute("name",X);
aa.setAttribute("value",Y);
Z.appendChild(aa);
};
function y(Y){
var X=c(Y);
if(X&&X.nodeName=="OBJECT"){
if(M.ie&&M.win){
X.style.display="none";
(function(){
if(X.readyState==4){
b(Y);
}else{
setTimeout(arguments.callee,10);
}
})();
}else{
X.parentNode.removeChild(X);
}
}
};
function b(Z){
var Y=c(Z);
if(Y){
for(var X in Y){
if(typeof Y[X]=="function"){
Y[X]=null;
}
}
Y.parentNode.removeChild(Y);
}
};
function c(Z){
var X=null;
try{
X=j.getElementById(Z);
}
catch(Y ){
}
return X;
};
function C(X){
return j.createElement(X);
};
function i(Z,X,Y){
Z.attachEvent(X,Y);
I[I.length]=[Z,X,Y];
};
function F(Z){
var Y=M.pv,X=Z.split(".");
X[0]=parseInt(X[0],10);
X[1]=parseInt(X[1],10)||0;
X[2]=parseInt(X[2],10)||0;
return (Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false;
};
function v(ac,Y,ad,ab){
if(M.ie&&M.mac){
return;
}
var aa=j.getElementsByTagName("head")[0];
if(!aa){
return;
}
var X=(ad&&typeof ad=="string")?ad:"screen";
if(ab){
n=null;
G=null;
}
if(!n||G!=X){
var Z=C("style");
Z.setAttribute("type","text/css");
Z.setAttribute("media",X);
n=aa.appendChild(Z);
if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){
n=j.styleSheets[j.styleSheets.length-1];
}
G=X;
}
if(M.ie&&M.win){
if(n&&typeof n.addRule==r){
n.addRule(ac,Y);
}
}else{
if(n&&typeof j.createTextNode!=D){
n.appendChild(j.createTextNode(ac+" {"+Y+"}"));
}
}
};
function w(Z,X){
if(!m){
return;
}
var Y=X?"visible":"hidden";
if(J&&c(Z)){
c(Z).style.visibility=Y;
}else{
v("#"+Z,"visibility:"+Y);
}
};
function L(Y){
var Z=/[\\\"<>\.;]/;
var X=Z.exec(Y)!=null;
return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y;
};
var d=function(){
if(M.ie&&M.win){
window.attachEvent("onunload",function(){
var ac=I.length;
for(var ab=0;ab<ac;ab++){
I[ab][0].detachEvent(I[ab][1],I[ab][2]);
}
var Z=N.length;
for(var aa=0;aa<Z;aa++){
y(N[aa]);
}
for(var Y in M){
M[Y]=null;
}
M=null;
for(var X in swfobject){
swfobject[X]=null;
}
swfobject=null;
});
}
}();
return {registerObject:function(ab,X,aa,Z){
if(M.w3&&ab&&X){
var Y={};
Y.id=ab;
Y.swfVersion=X;
Y.expressInstall=aa;
Y.callbackFn=Z;
o[o.length]=Y;
w(ab,false);
}else{
if(Z){
Z({success:false,id:ab});
}
}
},getObjectById:function(X){
if(M.w3){
return z(X);
}
},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){
var X={success:false,id:ah};
if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){
w(ah,false);
K(function(){
ae+="";
ag+="";
var aj={};
if(af&&typeof af===r){
for(var al in af){
aj[al]=af[al];
}
}
aj.data=ab;
aj.width=ae;
aj.height=ag;
var am={};
if(ad&&typeof ad===r){
for(var ak in ad){
am[ak]=ad[ak];
}
}
if(Z&&typeof Z===r){
for(var ai in Z){
if(typeof am.flashvars!=D){
am.flashvars+="&"+ai+"="+Z[ai];
}else{
am.flashvars=ai+"="+Z[ai];
}
}
}
if(F(Y)){
var an=u(aj,am,ah);
if(aj.id==ah){
w(ah,true);
}
X.success=true;
X.ref=an;
}else{
if(aa&&A()){
aj.data=aa;
P(aj,am,ah,ac);
return;
}else{
w(ah,true);
}
}
if(ac){
ac(X);
}
});
}else{
if(ac){
ac(X);
}
}
},switchOffAutoHideShow:function(){
m=false;
},ua:M,getFlashPlayerVersion:function(){
return {major:M.pv[0],minor:M.pv[1],release:M.pv[2]};
},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){
if(M.w3){
return u(Z,Y,X);
}else{
return undefined;
}
},showExpressInstall:function(Z,aa,X,Y){
if(M.w3&&A()){
P(Z,aa,X,Y);
}
},removeSWF:function(X){
if(M.w3){
y(X);
}
},createCSS:function(aa,Z,Y,X){
if(M.w3){
v(aa,Z,Y,X);
}
},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){
var Z=j.location.search||j.location.hash;
if(Z){
if(/\?/.test(Z)){
Z=Z.split("?")[1];
}
if(aa==null){
return L(Z);
}
var Y=Z.split("&");
for(var X=0;X<Y.length;X++){
if(Y[X].substring(0,Y[X].indexOf("="))==aa){
return L(Y[X].substring((Y[X].indexOf("=")+1)));
}
}
}
return "";
},expressInstallCallback:function(){
if(a){
var X=c(R);
if(X&&l){
X.parentNode.replaceChild(l,X);
if(Q){
w(Q,true);
if(M.ie&&M.win){
l.style.display="block";
}
}
if(E){
E(B);
}
}
a=false;
}
}};
}();

FE.namespace("frameworksf.core");
frameworksf.core.Snapfish=function(){
};
frameworksf.core.Snapfish.prototype={init:function(){
this.client={};
},getEnvName:function(){
return FE.server?FE.server.getEnvironmentName():FE.client.getEnvironmentName();
},isProduction:function(){
return this.getEnvName()=="prd";
},isStaging:function(){
return this.getEnvName()=="stg";
},isDevelopment:function(){
return this.getEnvName()=="dev";
},getUserClassKey:function(){
var _1=FE.server?requestContext.userClass:FE.client.userClass;
var _2=_1.key.length>0?"/"+_1.key:"";
return _2;
},getCobrandName:function(){
var _3=FE.server?requestContext.cobrandName:FE.client.cobrandName;
return _3;
},getLocale:function(){
var _4=FE.server?requestContext.locale:FE.client.locale;
return _4;
},isLoggedIn:function(){
return FE.server?requestContext.isLoggedIn():FE.client.isLoggedIn();
},isDGSCRequest:function(){
var _5=FE.ProxyServer.getDGSCHostName();
var _6=FE.ProxyServer.getHostName();
if(this.isDebugEnabled()){
this.debug("DGSC host: "+_5+"\nWebsite Host: "+_6);
}
if(_5==_6){
return false;
}
var _7=_5.indexOf("://");
if(_7!=-1){
_5=_5.substring(_7+3);
}
var _8=_5.indexOf(":");
if(_8!=-1){
_5=_5.substring(0,_8);
}
var _9=FE.getServerName();
if(this.isDebugEnabled()){
this.debug("DGSC host: "+_5+"\nServer name: "+_9);
}
return _9==_5;
},resolveProperty:function(_a,_b,_c,_d,_e){
var _f=null;
var _10=null;
var _11;
var _12;
if(_c!=null){
_12=_a[_c];
if(_12!=null){
_10=_d.getParameter(_12);
if(_10!=null){
_11=_b+"."+_10;
_f=_a[_11];
}
}
}
if(_f==null){
_f=_a[_b];
}
return _f||(_e?null:("[Property not defined: "+_b+"]"));
},getMembershipKeyEntries:function(_13){
var _14=[];
FE.Object.forEachEntry(_13,function(k,v){
if(k=="cobrand"){
k="c";
}else{
if(k=="website"){
k="w";
}else{
if(k=="subscriber"){
k="s";
}else{
if(k=="locale"){
k="l";
}
}
}
}
_14.push({key:k,value:v});
},this);
return _14;
},getGoBackURL:function(){
var _15=FE.Cookies.getCookie("SF_SESSION_COOKIE");
var _16=_15.getValue("urlType");
var _17=_15.getValue("urlToGoback");
_17=_17?_17:FE.LinkManager.legacyUrl("/home");
return _17;
},getIsSearchEnabledFlag:function(){
return FE.server?FE.server.getIsSearchEnabledFlag(requestContext.websiteName):FE.client.getIsSearchEnabledFlag();
},getWalmartSearchUrl:function(){
return FE.server?FE.server.getWalmartSearchUrl(requestContext.websiteName):FE.client.getWalmartSearchUrl();
}};
var SF=FE.Class.forName("frameworksf.core.Snapfish").getInstance();
FE.namespace("frameworksf.core.Formatter");
frameworksf.core.Formatter=function(){
};
frameworksf.core.Formatter.prototype={_getFormatterOptions:function(_18){
var _19={};
var _1a={};
_1a.decimalPlaces=2;
_1a.thousandsSeparator=3;
_1a.decimalSeparator=".";
_1a.prefix="$";
_1a.suffix="¢";
_19["en_US"]=_1a;
return _19[_18];
},_formatAmountWithCurrency:function(_1b,_1c){
var _1c=_1c||SF.getLocale();
var _1d=this._getFormatterOptions(_1c);
_1d.isFormattingCurrency=true;
return this._formatNumberWithOptions(_1b,_1d);
},_formatNumber:function(_1e,_1f){
var _1f=_1f||SF.getLocale();
var _20=this._getFormatterOptions(_1f);
return this._formatNumberWithOptions(_1e,_20);
},_formatAmount:function(_21,_22){
var _22=_22||SF.getLocale();
return this._formatNumber(_21,_22);
},formatNumber:function(_23,_24){
var _24=_24||{};
if(_24.displayCurrency==true){
return this._formatAmountWithCurrency(_23,_24.locale);
}else{
return this._formatAmount(_23,_24.locale);
}
},_formatNumberWithOptions:function(_25,_26){
if(Number(_25)!=0&&(_25==""||_25==null||isNaN(_25))){
return _25;
}
_25=Number(_25);
_26=_26||{};
var _27=(_25<0);
var _28=_25+"";
var _29=(_26.decimalSeparator)?_26.decimalSeparator:".";
var _2a;
if(!isNaN(_26.decimalPlaces)){
var _2b=_26.decimalPlaces;
var _2c=Math.pow(10,_2b);
_25=Math.round(_25*_2c)/_2c;
_28=Math.abs(_25)+"";
_2a=_28.lastIndexOf(".");
if(_2b>0){
if(_2a<0){
_28+=_29;
_2a=_28.length-1;
}else{
if(_29!=="."){
_28=_28.replace(".",_29);
}
}
while((_28.length-1-_2a)<_2b){
_28+="0";
}
}
}
if(_26.thousandsSeparator){
var _2d=_26.thousandsSeparator;
_2a=_28.lastIndexOf(_29);
_2a=(_2a>-1)?_2a:_28.length;
var _2e=_28.substring(_2a);
var _2f=-1;
for(var i=_2a;i>0;i--){
_2f++;
if((_2f%3===0)&&(i!==_2a)&&(!_27||(i>1))){
_2e=_2d+_2e;
}
_2e=_28.charAt(i-1)+_2e;
}
_28=_2e;
}
if(_26.isFormattingCurrency){
if(!_27){
_28=(_26.prefix)?_26.prefix+_28:_28;
}else{
_28="-"+((_26.prefix)?_26.prefix+_28:_28);
}
}
return _28;
}};
SF.Formatter=FE.Class.forName("frameworksf.core.Formatter").getInstance();

FE.namespace("frameworksf.core");
frameworksf.core.SFLinkManager=function(){
};
frameworksf.core.SFLinkManager.prototype={securePageUrl:function(_1,_2,_3){
if(_3==null){
_3={};
}
_3.secure=true;
return this.pageUrl(_1,_2,_3);
},pageUrl:function(_4,_5,_6){
return this._componentUrl(_4,_5,_6,"p");
},componentUrl:function(_7,_8,_9){
return this._componentUrl(_7,_8,_9,"c");
},_componentUrl:function(_a,_b,_c,_d){
if(_c==null){
_c={};
}
var _e=_c.secure===true;
var _f=FE.ProxyServer.getHostName(null,null,_e);
_f+=FE.getContextRelativeUrl(FE.getServletPath()+SF.getUserClassKey()+"/"+_d+"/"+_a);
var url=FE.url(_f,_b,null);
if(_c.states){
url+="#"+FE.History.getHashForStates(_c.states);
}
return url;
},legacyUrl:function(_10,_11,_12){
if(_12==null){
_12={};
}
var _13=_12.secure===true;
var _14="";
if(_10.indexOf("/static")!=-1){
_14=FE.ProxyServer.getDGSCHostName(null,null,_13);
}else{
_14=FE.ProxyServer.getHostName(null,null,_13);
}
var url=_14+_10;
if(_11!=null){
if(url.endsWith("/")==false){
url+="/";
}
url+=this._legacyParamsString(_11);
if(url.endsWith("/")==false){
url+="/";
}
}
return url+"/COBRAND_NAME="+SF.getCobrandName();
},_legacyParamsString:function(_15){
var _16=[];
for(var _17 in _15){
if(_15.hasOwnProperty(_17)===false){
continue;
}
var _18=_15[_17];
if(_18==null){
continue;
}
_16.push(FE.encodeURIComponent(_17)+(_18!=null?"="+FE.encodeURIComponent(_18):""));
}
_16=_16.join("/");
return _16;
},secureLegacyUrl:function(_19,_1a,_1b){
if(_1b==null){
_1b={};
}
_1b.secure=true;
return this.legacyUrl(_19,_1a,_1b);
}};
FE.LinkManager=FE.Class.forName("frameworksf.core.SFLinkManager").getInstance();

FE.namespace("frameworksf.core");
frameworksf.core.SFCookie=function(){
};
frameworksf.core.SFCookie.prototype={init:function(){
FE.Class.forName("frameworksf.core.SFCookie").superclass.init.call(this);
this.cookiePath="/";
this.domainName="";
this.cookieValue="";
this.cookieName="";
this.nvPair=new Array();
this.NVP_SEPARATOR="!%NVP_SEP^!";
this.INNER_SEPARATOR="!%EQUALS^!";
this.PERSISTENT_LENGTH=6*2592000;
this.persistent=false;
this.seconds=-1;
this.secure=false;
this.m_path=null;
this.m_domain=null;
this.TRANSFORM_CHAR=new Array();
this.TRANSFORM_CHAR["a"]="n";
this.TRANSFORM_CHAR["b"]="o";
this.TRANSFORM_CHAR["c"]="p";
this.TRANSFORM_CHAR["d"]="q";
this.TRANSFORM_CHAR["e"]="r";
this.TRANSFORM_CHAR["f"]="s";
this.TRANSFORM_CHAR["g"]="t";
this.TRANSFORM_CHAR["h"]="u";
this.TRANSFORM_CHAR["i"]="v";
this.TRANSFORM_CHAR["j"]="w";
this.TRANSFORM_CHAR["k"]="x";
this.TRANSFORM_CHAR["l"]="y";
this.TRANSFORM_CHAR["m"]="z";
this.TRANSFORM_CHAR["n"]="a";
this.TRANSFORM_CHAR["o"]="b";
this.TRANSFORM_CHAR["p"]="c";
this.TRANSFORM_CHAR["q"]="d";
this.TRANSFORM_CHAR["r"]="e";
this.TRANSFORM_CHAR["s"]="f";
this.TRANSFORM_CHAR["t"]="g";
this.TRANSFORM_CHAR["u"]="h";
this.TRANSFORM_CHAR["v"]="i";
this.TRANSFORM_CHAR["w"]="j";
this.TRANSFORM_CHAR["x"]="k";
this.TRANSFORM_CHAR["y"]="l";
this.TRANSFORM_CHAR["z"]="m";
this.TRANSFORM_CHAR["A"]="N";
this.TRANSFORM_CHAR["B"]="O";
this.TRANSFORM_CHAR["C"]="P";
this.TRANSFORM_CHAR["D"]="Q";
this.TRANSFORM_CHAR["E"]="R";
this.TRANSFORM_CHAR["F"]="S";
this.TRANSFORM_CHAR["G"]="T";
this.TRANSFORM_CHAR["H"]="U";
this.TRANSFORM_CHAR["I"]="V";
this.TRANSFORM_CHAR["J"]="W";
this.TRANSFORM_CHAR["K"]="X";
this.TRANSFORM_CHAR["L"]="Y";
this.TRANSFORM_CHAR["M"]="Z";
this.TRANSFORM_CHAR["N"]="A";
this.TRANSFORM_CHAR["O"]="B";
this.TRANSFORM_CHAR["P"]="C";
this.TRANSFORM_CHAR["Q"]="D";
this.TRANSFORM_CHAR["R"]="E";
this.TRANSFORM_CHAR["S"]="F";
this.TRANSFORM_CHAR["T"]="G";
this.TRANSFORM_CHAR["U"]="H";
this.TRANSFORM_CHAR["V"]="I";
this.TRANSFORM_CHAR["W"]="J";
this.TRANSFORM_CHAR["X"]="K";
this.TRANSFORM_CHAR["Y"]="L";
this.TRANSFORM_CHAR["Z"]="M";
},deserialize:function(_1){
var _2=this.rot13Crypt(""+FE.decodeURIComponent(""+_1));
var _3=_2.length;
var _4=this.NVP_SEPARATOR.length;
var _5=this.INNER_SEPARATOR.length;
var _6=0;
while(_6<_3){
var _7=_2.indexOf(this.NVP_SEPARATOR,_6);
if(_7==-1){
_7=_3;
}
var _8=_2.substring(_6,_7);
_6=_7+_4;
if(_8&&_8!=null){
var _9=_8.indexOf(this.INNER_SEPARATOR);
if(_9==-1){
throw ("deserialize(): Cookie "+"format problem: inSeparator not found in nvp "+_8);
}else{
var _a=_8.substring(0,_9);
if(!_a||_a==null){
throw ("deserialize(): name found "+"empty while parsing "+_8);
}
_1=_8.substring(_9+_5);
this.nvPair[_a]=_1;
this.size++;
}
}
}
},serialize:function(){
var _b=FE.Class.forName("framework.core.StringBuilder").newInstance();
var _c=0;
var _d="";
var _e;
for(_e in this.nvPair){
var _f=this.nvPair[_e];
if(_f&&typeof _f=="string"&&_f!="undefined"){
_b.append(_e);
_b.append(this.INNER_SEPARATOR);
_b.append(_f);
if(_c<this.size){
_b.append(this.NVP_SEPARATOR);
}
_d=this.rot13Crypt(_b.toString());
_c++;
}
}
return FE.encodeURIComponent(_d);
},rot13Crypt:function(_10){
var _11="";
for(var i=0;i<_10.length;i++){
var c=_10.charAt(i);
if((c>="a"&&c<="z")||(c>="A"&&c<="Z")){
c=this.TRANSFORM_CHAR[c];
}
_11+=c;
}
return _11;
},toString:function(){
return this.cookieName+"="+this.serialize();
}};
FE.Class.inherit("frameworksf.core.SFCookie","framework.core.Cookie");

FE.namespace("frameworksf.core");
frameworksf.core.SFUserSession=function(){
};
frameworksf.core.SFUserSession.prototype={init:function(){
this.nvpair={};
this.length=0;
},put:function(_1,_2){
this.nvpair[""+_1]=""+_2;
this.length++;
},get:function(_3){
return this.nvpair[_3];
},remove:function(_4){
this.nvpair[_4]=null;
this.length--;
},size:function(){
return this.length;
},getCobrandName:function(){
return this.nvpair["cobrandName"];
},getWebsiteName:function(){
return this.nvpair["websiteName"];
},getCurrencyCode:function(){
return this.nvpair["currenyCode"];
},getSubscriberName:function(){
return this.nvpair["subscriberName"];
},getLocale:function(){
return this.nvpair["locale"];
},getCampaignName:function(){
return this.nvpair["campaignName"];
},toOutput:function(){
return this.nvpair;
}};

FE.namespace("frameworksf.client");
frameworksf.client.SFClientEnvironment=function(){
};
frameworksf.client.SFClientEnvironment.prototype={init:function(){
FE.Class.forName("frameworksf.client.SFClientEnvironment").superclass.init.apply(this,arguments);
this.resourceURIMappings={};
},pageUrl:function(_1,_2){
var _3=this.userClass.key.length>0?"/"+this.userClass.key:"";
return this.url(FE.client.servletPath+_3+"/p/"+_1,_2,true);
},componentUrl:function(_4,_5){
var _6=this.userClass.key.length>0?"/"+this.userClass.key:"";
return this.url(FE.client.servletPath+_6+"/c/"+_4,_5,true);
},legacyUrl:function(_7,_8){
var _9=this.userClass.key.length>0?"/"+this.userClass.key:"";
return this.url(_7,_8,false);
},initClient:function(_a){
this.environmentName=_a.environmentName;
this.cobrandName=_a.cobrandName;
this.locale=_a.locale;
this.loggedIn=_a.isLoggedIn;
this.currencyCode=_a.currencyCode;
this.connectedServer=_a.connectedServer;
this.websiteDisplayName=_a.websiteDisplayName;
this.omnitureProps=_a.omniture;
this.isSearchEnabledFlag=_a.isSearchEnabledFlag;
this.walmartSearchUrl=_a.walmartSearchUrl;
FE.Class.forName("frameworksf.client.SFClientEnvironment").superclass.initClient.apply(this,arguments);
FE.Cookies=FE.Factory.createCookiesManager();
FE.ProxyServer=FE.Factory.createProxyServer(_a.proxy);
this.userSession=FE.Class.getInstance("frameworksf.client.SFClientUserSession").getClientUserSession(_a.userSession);
SF.Omniture=FE.Class.getInstance("frameworksf.client.SFClientOmniture");
},getUserSession:function(){
return this.userSession;
},getCurrencyCode:function(){
return this.currencyCode;
},getConnectedServerName:function(){
return this.connectedServer;
},getEnvironmentName:function(){
return this.environmentName;
},isLoggedIn:function(){
return this.loggedIn;
},getEnvName:function(){
return this.environmentName;
},createClientContext:function(_b){
return FE.Class.newInstance("frameworksf.mvc.client.SFClientContext",_b);
},getIncludeUrlPrefix:function(){
var _c=FE.ProxyServer.getDGSCHostName()+FE.Class.forName("frameworksf.client.SFClientEnvironment").superclass.getIncludeUrlPrefix.apply(this,arguments);
_c+=FE.getContextPath();
if(this.userClass.key.length>0){
_c+="/"+this.userClass.key;
}
return _c;
},hidePanel:function(_d){
SF.Overlay.hidePanel(_d);
},getGlobalChannelName:function(){
return FE.MessageService.global.name;
},getMembershipKeyEntries:function(_e){
return SF.getMembershipKeyEntries(_e);
},addRESTResourceURIMappings:function(_f){
FE.Object.extend(this.resourceURIMappings,_f);
},resolveResourceURI:function(uri){
if(uri==null){
return null;
}
var _10=FE.MessageUtils.merge(uri,this.resourceURIMappings);
return _10;
},getIsSearchEnabledFlag:function(){
return this.isSearchEnabledFlag;
},getWalmartSearchUrl:function(){
return this.walmartSearchUrl;
}};
FE.Class.inherit("frameworksf.client.SFClientEnvironment","framework.client.ClientEnvironment");

FE.namespace("frameworksf.client");
frameworksf.client.SFClientRESTAPI=function(){
};
frameworksf.client.SFClientRESTAPI.prototype={getBasePath:function(){
return "/resources";
},_resourceUrl:function(_1,_2){
if(!_1.startsWith("/")){
_1="/"+_1;
}
var _3;
var _4=_1.startsWith("/static/");
if(_4){
var _5=FE.ProxyServer.getDGSCHostName();
_1=FE.url(_1,_2,{useQueryString:true,contextRelative:false});
_3=_5+FE.url(this.getBasePath()+_1);
return {url:_3,uri:_1,crossDomain:true};
}else{
_3=FE.url(this.getBasePath()+_1,_2,{useQueryString:true});
return _3;
}
}};
FE.Class.inherit("frameworksf.client.SFClientRESTAPI","framework.rest.client.ClientRESTAPI");
FE.REST=FE.Class.forName("frameworksf.client.SFClientRESTAPI").getInstance();

FE.namespace("frameworksf.client");
frameworksf.client.Overlay=function(){
};
frameworksf.client.Overlay.prototype={panelsByName:{},overlaysByName:{},showModalPanel:function(_1){
_1=_1||{};
_1.modal=true;
this.showPanel("shared/widgets/containers/Panel",_1);
},showModelessPanel:function(_2){
_2=_2||{};
_2.modal=false;
this.showPanel("shared/widgets/containers/Panel",_2);
},showPanel:function(_3,_4){
_4=_4||{};
if(_4.name==null){
_4.name=_3;
}
var _5=_4.name;
if(_4.hasOwnProperty("url")===false){
_4.url=null;
}
var _6=this.panelsByName[_5];
if(_6===undefined){
this.panelsByName[_5]=null;
FE.client.renderComponent({component:_3,params:_4,targetEl:document.body,append:true,callback:{start:function(){
FE.client.publish("framework.client.ClientEvents.onAsyncStart",null);
_4.asyncStarted=true;
},failure:function(){
if(_4.asyncStarted){
FE.client.publish("framework.client.ClientEvents.onAsyncComplete",null);
}
},complete:function(){
}}});
}else{
if(_6){
_6.show(_4.update?_4:null);
}else{
}
}
},hidePanel:function(_7){
var _8=this.panelsByName[_7];
if(_8){
_8.hide();
}
},showPointyOverlay:function(_9){
},_detatchPointyOverlay:function(_a){
var _b=_a.targetEl;
if(_b!=null&&_b.pointyOverlayConfig){
var _a=_b.pointyOverlayConfig;
if(_a.showEventHandle){
FE.DOM.detach(_a.showEventHandle);
}
if(_a.hideEventHandle){
FE.DOM.detach(_a.hideEventHandle);
}
_b.pointyOverlayConfig=null;
}
},attachPointyOverlay:function(_c){
_c=_c||{};
if(_c.targetEl==null){
throw new Error("The \"targetEl\" configuration property is required");
}
if(_c.name==null){
if(typeof _c.component!="undefined"){
_c.name=_c.component;
}else{
throw new Error("The \"name\" configuration property is required if \"component\" is not defined");
}
}
if(_c.hideEvent===undefined&&_c.showEvent===undefined){
_c.hideEvent="mouseout";
_c.showEvent="mouseover";
}
if(_c.showEventEl==null){
_c.showEventEl=_c.targetEl;
}
if(_c.hideEventEl==null){
_c.hideEventEl=_c.targetEl;
}
if(_c.allowClose==null){
_c.allowClose=_c.hideEvent==null;
}
if(_c.width==null){
_c.width=300;
}
if(_c.hideEvent){
if(_c.hideEvent==_c.showEvent&&_c.hideEventEl==_c.showEventEl){
FE.throwError("The hide event trigger must be different from the show event trigger");
}
}
this._detatchPointyOverlay(_c);
if(_c.showEvent){
_c.showEventHandle=FE.DOM.on({event:_c.showEvent,callback:this._showEventCallback,el:_c.showEventEl,scope:this,arg:_c});
}
if(_c.hideEvent){
_c.hideEventHandle=FE.DOM.on({event:_c.hideEvent,callback:this._hideEventCallback,el:_c.hideEventEl,scope:this,arg:_c});
}
if(typeof _c.component!="undefined"){
FE.client.requireComponent(_c.component,{start:function(){
},complete:function(){
}});
}
_c.targetEl.pointyOverlayConfig=_c;
this.createOverlay("shared/widgets/containers/PointyOverlay",{name:_c.name});
},createOverlay:function(_d,_e){
var _f=_e.name;
var _10=this.overlaysByName[_f];
if(_10===undefined){
this.overlaysByName[_f]=null;
FE.client.renderComponent({component:_d,params:_e,targetEl:document.body,append:true,callback:{start:function(){
},complete:function(){
}}});
}else{
}
},_showEventCallback:function(_11,_12){
FE.debug("Show event triggered for overlay "+_12.name);
var _13=this.overlaysByName[_12.name];
var _14={width:_12.width};
if(_13!=null){
FE.debug("Overlay found with name "+_12.name);
var _15={targetEl:_12.targetEl,allowClose:_12.allowClose,width:_12.width};
if(_12.url){
FE.debug("Showing iframe for pointy overlay. URL: "+_12.url);
if(_12.iframe==null){
_12.iframe=document.createElement("iframe");
}
_12.iframe.src=_12.url;
_12.iframe.setAttribute("width",_12.width||"300");
_12.iframe.setAttribute("height",_12.height||"300");
_13.setContentEl(_12.iframe);
_13.attachToEl(_15);
}else{
if(_13.hasContent()===false){
if(_12.component){
FE.debug("Rendering overlay content. Component: "+_12.component);
var _16=document.createElement("SPAN");
FE.client.renderComponent({component:_12.component,params:_14,targetEl:_16,append:true,callback:{start:function(){
},complete:function(){
},success:function(){
_13.setContentEl(_16);
_13.attachToEl(_15);
}}});
}else{
if(_12.contentEl){
_13.setContentEl(_12.contentEl);
_13.attachToEl(_15);
}
}
}else{
_13.attachToEl(_15);
}
}
}else{
FE.warn("Overlay not found with name "+_12.name);
}
_11.stopPropagation();
},_hideEventCallback:function(_17,_18){
FE.debug("Hide event triggered for overlay "+_18.name);
var _19=this.overlaysByName[_18.name];
if(_19!=null){
_19.hide();
}
},subscribe:function(_1a,_1b){
var _1c=this.getMessageChannel(_1a);
FE.client.subscribe("events.PanelEvents",_1b,_1c);
},getMessageChannel:function(_1d){
return "panel-"+_1d;
},registerPanel:function(_1e,_1f){
this.panelsByName[_1e]=_1f;
},registerOverlay:function(_20,_21){
this.overlaysByName[_20]=_21;
}};
SF.Overlay=FE.Class.forName("frameworksf.client.Overlay").getInstance();

FE.namespace("frameworksf.client");
frameworksf.client.SFClientCookies=function(){
};
frameworksf.client.SFClientCookies.prototype={init:function(_1,_2,_3,_4){
FE.Class.forName("frameworksf.client.SFClientCookies").superclass.init.call(this);
this.cookies=new Array();
this.m_document=null;
this.size=0;
},getCookie:function(_5,_6,_7,_8,_9){
_5=this.getUpdatedCookieName(_5);
if(this.cookies[_5]!=null){
return this.cookies[_5];
}
this.m_document=(_9)?_9:window.document;
var _a=this.m_document.cookie;
var _b=FE.Class.forName("frameworksf.core.SFCookie").newInstance();
_b.setCookieName(_5);
if(_6){
_b.setPersistent(_6);
}
if(!_a||_a==""){
this.size++;
this.cookies[_5]=_b;
return _b;
}
var _c=_a.indexOf(_5+"=");
if(_c==-1){
this.size++;
this.cookies[_5]=_b;
return _b;
}
_c=_c+(_5+"=").length;
var _d=_a.indexOf(";",_c);
if(_d==-1){
_d=_a.length;
}
var _e=_a.substring(_c,_d);
_b.setValue(_e);
if(_e.length>0){
_b.deserialize(_e);
}
this.size++;
this.cookies[_5]=_b;
return _b;
},save:function(){
for(cookieName in this.cookies){
var _f=this.cookies[cookieName];
if(typeof _f=="object"&&_f){
if(_f.isPersistent()){
this.savePersistent(_f);
}else{
document.cookie=this.toCookieString(_f);
}
}
}
},getUpdatedCookieName:function(_10){
var _11=_10;
_11+=".";
_11+=FE.ProxyServer.getCobrandOrWebsite();
_11+=".";
_11+=SF.getEnvName();
return _11;
},setCookie:function(){
throw "[SFClientCookies] setCookie is not implemented, use save.";
},removeCookie:function(_12){
if(this.cookies[this.getUpdatedCookieName(_12)]!=null){
this.cookies[this.getUpdatedCookieName(_12)].removeAll();
this.save();
}
},savePersistent:function(_13){
var _14=new Date();
var _15=new Date();
_15.setDate(_14.getDate()+30);
document.cookie=this.toCookieString(_13)+";expires="+_15.toGMTString();
},toCookieString:function(_16){
var str="";
if(_16.getCookieName()){
var _17=_16.getCookieName();
str=_17+"=";
}
var _18=_16.serialize();
if(_18){
str+=_18;
}
if(!this.m_path){
this.m_path="/";
}
if(this.m_path){
str+="; path="+this.m_path;
}
if(!this.m_domain){
this.m_domain=FE.ProxyServer.getCookieDomain();
}
if(this.m_domain&&this.m_domain.indexOf(".")!=-1){
str+="; domain="+this.m_domain+";";
}
return str;
}};
FE.Class.inherit("frameworksf.client.SFClientCookies","framework.client.ClientCookies");

frameworksf.client.SFClientDependencyHandler=function(){
};
frameworksf.client.SFClientDependencyHandler.prototype={"resourceURI":function(_1){
FE.client.addRESTResourceURIMappings(_1);
}};
FE.Class.inherit("frameworksf.client.SFClientDependencyHandler","framework.client.ClientDependencyHandler");

FE.namespace("frameworksf.client");
frameworksf.client.SFClientExternalAPI=function(){
};
frameworksf.client.SFClientExternalAPI.prototype={basePath:"/extapi",cachedResources:{},resourceUrl:function(_1){
if(!_1.startsWith("/")){
_1="/"+_1;
}
var _2=FE.url(this.basePath+_1);
return _2;
},executeExternalAPI:function(_3,_4,_5){
if(_3==null||_3.length===0){
throw new Error("Invalid method name");
}
var _6=this.resourceUrl("");
_6=_6+"?method="+_3;
if(_5){
_6=FE.url(_6,null,{secure:false,contextRelative:false});
}
_4=FE.client.prepareAsyncCallback(_4);
FE.client.post(_6,{"start":this._callbackStart,"complete":this._callbackComplete,"success":this._callbackSuccess,"failure":this._callbackFailure,params:_5,arg:{callback:_4}},this);
},_callbackStart:function(_7){
var _8=_7.callback;
_8.start();
},_callbackComplete:function(_9,_a){
var _b=_a.callback;
_b.complete();
},_callbackSuccess:function(_c,_d,_e){
this.cachedResources[_d.uri]={object:_c,full:true};
this._processObj(_c);
var _f=_d.callback;
_f.success(eval("("+_c+")"));
},_callbackFailure:function(_10,arg){
var _11=arg.callback;
_11.failure();
},_processObj:function(obj){
if(obj==null){
return;
}
FE.Object.forEachEntry(obj,function(k,v){
if(k==="resourceURI"){
var uri=v;
var _12=this.cachedResources[uri];
if(_12===undefined){
this.cachedResources[uri]={object:obj,full:false};
}
}else{
if(FE.Array.isArray(v)){
FE.Array.forEach(v,function(o){
this._processObj(o);
},this);
}else{
if(typeof v==="object"){
this._processObj(v);
}
}
}
},this);
}};
FE.ExternalAPI=FE.Class.forName("frameworksf.client.SFClientExternalAPI").getInstance();

FE.namespace("frameworksf.client");
frameworksf.client.SFClientFactory=function(){
};
frameworksf.client.SFClientFactory.prototype={getClientEnvironment:function(){
return FE.Class.forName("frameworksf.client.SFClientEnvironment").getInstance();
},createCookiesManager:function(){
return FE.Class.forName("frameworksf.client.SFClientCookies").getInstance();
},createProxyServer:function(_1){
return FE.Class.forName("frameworksf.client.SFClientProxyServer").newInstance(_1);
},getElementModelResolever:function(){
return FE.Class.forName("frameworksf.templates.SFElementModelResolver").getInstance();
},createDependencyHandler:function(){
return FE.Class.newInstance("frameworksf.client.SFClientDependencyHandler");
}};
FE.Class.inherit("frameworksf.client.SFClientFactory","framework.client.ClientFactory");

FE.namespace("frameworksf.client");
frameworksf.client.SFClientOmniture=function(){
};
frameworksf.client.SFClientOmniture.prototype={init:function(){
},trackPage:function(_1){
for(sProp in _1){
s[sProp]=_1[sProp];
}
var _2=s.t();
if(_2){
document.write(_2);
}
},trackCustomLink:function(_3,_4){
var _5=200;
if(typeof s!="undefined"){
setTimeout(function(){
try{
s.tl(_3,"o",_4);
}
catch(e ){
}
},_5);
}
}};

FE.namespace("frameworksf.client");
frameworksf.client.SFClientProxyServer=function(){
};
frameworksf.client.SFClientProxyServer.prototype={init:function(_1){
this.hostName=_1.hostname;
this.secureHostName=_1.securehostname;
this.imageHostName=_1.imagehostname;
this.dgscHostName=_1.dgschostname;
this.currentPodName=_1.podname;
this.cookieDomain=_1.cookiedomain;
this.locale=_1.locale;
this.websiteName=_1.websiteName;
this.localeDisplay=_1.localedisplay;
this.cobrandOrWebsite=_1.cobrandOrWebsite;
},getCobrandOrWebsite:function(){
return this.cobrandOrWebsite;
},getWebsiteName:function(){
return this.websiteName;
},getCookieDomain:function(_2,_3){
return this.cookieDomain;
},getCurrentPodName:function(){
return this.currentPodName;
},getHostName:function(_4,_5,_6){
if(_6){
return this.secureHostName;
}
return this.hostName;
},getImageHostName:function(_7,_8,_9){
return this.imageHostName;
},getDGSCHostName:function(_a,_b,_c){
return this.dgscHostName;
},getLocale:function(){
return this.locale;
},getLocaleDisplay:function(){
return this.localeDisplay;
},setLocale:function(l){
this.locale=l;
}};

FE.namespace("frameworksf.client");
frameworksf.client.SFClientUserSession=function(){
};
frameworksf.client.SFClientUserSession.prototype={getClientUserSession:function(_1){
if(_1){
var _2=FE.Object.entries(_1);
var _3=this;
FE.Array.forEach(_2,function(e){
_3.put(e.key,e.value);
},this);
}
return this;
}};
FE.Class.inherit("frameworksf.client.SFClientUserSession","frameworksf.core.SFUserSession");

