(function(){ // register module paths to enabler and builder ibmConfig = ibmCfg.enablerConfig; dojo.registerModulePath("com.ibm.mm", ibmCfg.enablerConfig["com.ibm.mashups.contextroot.enabler"] + "/js/com/ibm/mm"); dojo.registerModulePath("com.ibm.mashups", ibmCfg.enablerConfig["com.ibm.mashups.contextroot.enabler"] + "/js/com/ibm/mashups"); dojo.registerModulePath("com.ibm.mm.builder", ibmCfg.enablerConfig["com.ibm.mashups.contextroot.builder"] + "/js/com/ibm/mm/builder"); dojo.registerModulePath("com.ibm.mashups.builder", ibmCfg.enablerConfig["com.ibm.mashups.contextroot.builder"] + "/js/com/ibm/mashups/builder"); })();/** Licensed Materials - Property of IBM, 5724-U69, (C) Copyright IBM Corp. 2008, 2010 - All Rights reserved. **/ dojo.provide("com.ibm.mm.enabler.extreg");if(typeof (ExtensionRegistry)=="undefined"){this.ExtensionRegistry=function(_1){var _2=window;var _3={root:document.body,enabled:false,_queue:[],debug:function(_4){if(this.enabled){}},log:function(_5){if(this.enabled){}},_flushQueueIfNecessary:function(){var _6=(this._queue.length>0);while(this._queue.length>0){this.root.appendChild(this._queue.shift());}if(_6){this.log("----------------- END STMTS EXECUTED BEFORE ONLOAD ---------------");}}};var _7=function(_8){var _9=_8.split(".");var _a=null;var _b=window;var _c=null;for(var i=0;(i<_9.length&&_b);i++){_a=_b;_c=_9[i];_b=_a[_9[i]];}return [{object:_a,method:_c}];};if(!_1){_1=_7;}function forInLoop(_d,_e){for(var _f in _d){if(Object.prototype.hasOwnProperty.call(_d,_f)){_e(_f,_d[_f]);}}};function isArray(obj){return (obj&&obj.length&&typeof (obj.length)=="number");};function applyToObjectOrArray(obj,_10){if(isArray(obj)){for(var i=0;i [ "+arguments+" ]");_3.log("handler to execute: "+_15.toString());_3.debug(_15);_3.log("next function in the chain (executor parameter): "+fn.toString());_3.debug(fn);}var me=this;var _16=_15.call(this,function(_17){return fn.apply(me,_17);},arguments);if(_3.enabled){_3.log("around advice exit ==> "+_16);}return _16;});};ExtensionPointController.prototype.execute=function(_18,_19){if(_3.enabled){_3.log("ExtensionPointController.execute entry ==> [ "+_18+", "+_19+" ] ");_3.debug(_18);_3.debug(_19);}function argumentsToArray(_1a){var arr=[];for(var i=0;i<_1a.length;i++){arr.push(_1a[i]);}return arr;};var _1b=null;if(_3.enabled){_3.log("Executing extensions for \""+this.name+"\"...");}var _1c=this.extensions;var _1d=this.fnDescriptor;function doExecution(_1e){if(_3.enabled){_3.log("doExecution entry ==> "+_1e);_3.debug(_1e);}if(_1e){_1e=argumentsToArray(_1e);}var _1f=null;var _20=_1d.getMethod();_1d.revert();var _21=_1c.before;if(_3.enabled){_3.log("Executing "+_21.length+" before advice extensions.");}for(var i=0;i<_21.length;i++){if(_3.enabled){_3.log("beforeAdvice["+i+"] = "+_21[i].toString());_3.debug(_21[i]);}_1e=_21[i].call(this,_1e);}if(_3.enabled){_3.log("Executing the original function: "+_1d.getMethod().toString());}_1f=_1d.getMethod().apply(this,_1e);var _22=_1c.after;if(_3.enabled){_3.log("Executing "+_22.length+" after advice extensions.");}if(_1e){for(var j=0;j<_22.length;j++){if(_3.enabled){_3.log("afterAdvice["+j+"] = "+_22[j].toString());_3.debug(_22[j]);_3.log("Return value: "+_1f);_3.debug(_1f);}_1f=_22[j].call(this,_1f,_1e);}}_1d.setMethod(_20);if(_3.enabled){_3.log("doExecution exit ==> "+_1f);}return _1f;};_1b=doExecution.apply(_18,[_19]);if(_3.enabled){_3.log("ExtensionPointController.execute exit ==> "+_1b);}return _1b;};if(!ExtensionRegistry.prototype.extensionPointControllers){ExtensionRegistry.prototype.extensionPointControllers={};}function getExtensionPointController(_23,_24){if(_3.enabled){_3.log("ExtensionRegistry.getExtensionPointController entry ==> [ "+_23+", "+_24+" ]");}var _25=ExtensionRegistry.prototype.extensionPointControllers[_23];if(!_25){_25={};ExtensionRegistry.prototype.extensionPointControllers[_23]=_25;}var _26=_25[_24.id];if(!_26){_26=new ExtensionPointController(_23,_24);ExtensionRegistry.prototype.extensionPointControllers[_23][_24.id]=_26;_24.setMethod(function(){if(_3.enabled){_3.log(_23+" entry ==> "+arguments);}var _27=_26.execute(this,arguments);if(_3.enabled){_3.log(_23+" exit ==> "+_27);}return _27;});}if(_3.enabled){_3.log("ExtensionRegistry.getExtensionPointController exit ==> "+_26);}return _26;};function processExtensionDefinition(_28,_29){if(_3.enabled){_3.log("processExtensionDefinition entry ==> [ "+_28+", "+_29+" ]");_3.log("Extension: "+_28+"; extension: { type: \""+_29.type+"\", handler: "+_29.handler+" }");}var _2a=_1(_28);_2a=_2a||null;if(_2a===null){_2a=_7(_28);}if(_3.enabled){_3.log("impls="+_2a);}for(var i=0;i<_2a.length;i++){var _2b=_2a[i];var md=new MethodDescriptor(_2b.object,_2b.method);if(md.originalValue){var _2c=getExtensionPointController(_28,md);if(_3.enabled){_3.log("Extension Point (after mapping function): "+md);}switch(_29.type){case "before":if(_3.enabled){_3.log("wrapping in a before extension");}_2c.extensions.before.push(_29.handler);break;case "after":if(_3.enabled){_3.log("wrapping in an after extension");}_2c.extensions.after.push(_29.handler);break;case "around":if(_3.enabled){_3.log("wrapping in an around extension");}_2c.addAroundAdvice(_29.handler);break;default:if(_3.enabled){_3.log("Unrecognized extension type: "+_29.type);}}}else{if(console&&console.log){console.log("WARNING! \""+_28+"\" does not exist! The provided extension will be ignored!");}}}if(_3.enabled){_3.log("processExtensionDefinition exit");}};function removeExtensionDefinition(_2d){if(_3.enabled){_3.log("removeExtensionDefinition entry ==> [ "+_2d+" ]");}var _2e=ExtensionRegistry.prototype.extensionPointControllers[_2d];forInLoop(_2e,function(_2f,_30){_30.fnDescriptor.revert();});delete ExtensionRegistry.prototype.extensionPointControllers[_2d];if(_3.enabled){_3.log("removeExtensionDefinition exit");}};this.process=function(_31){if(_3.enabled){_3.log("ExtensionRegistry.process entry ==>"+_31);}applyToObjectOrArray(_31,function(_32){forInLoop(_32,function(_33,_34){applyToObjectOrArray(_34,function(obj){processExtensionDefinition(_33,obj);});});});if(_3.enabled){_3.log("ExtensionRegistry.process exit");}};this.disconnect=function(_35){if(_3.enabled){_3.log("ExtensionRegistry.disconnect entry ==>"+_35);}removeExtensionDefinition(_35);if(_3.enabled){_3.log("ExtensionRegistry.disconnect exit");}};this.enableTracking=function(_36){var _37=new ImplementationTracker(true);var _38={"dojo.declare":{type:"before",handler:function(_39){_37.add(_39[0],_39[1]);return _39;}}};this.process(_38);var _3a=function(_3b){return _37.getImpls(_3b);};dojo.addOnLoad(function(){if(_36&&_36.extensions&&_36.extensions.length>0){var _3c={};function forInLoop(obj,_3d){for(var _3e in obj){if(obj.hasOwnProperty(_3e)){_3d(_3e,obj[_3e]);}}};for(var i=0;i<_36.extensions.length;i++){forInLoop(_36.extensions[i],function(_3f,_40){_3c[_3f]=_40;});}var _41=new ExtensionRegistry(_3a);_41.process(_36.extensions);}});};this.disableTracking=function(){this.disconnect("dojo.declare");};};}if(typeof ImplementationTracker=="undefined"){this.ImplementationTracker=function(_42){var _43={enabled:false,log:function(msg){if(this.enabled){}},debug:function(obj){if(this.enabled){}}};function forInLoop(obj,_44){for(var _45 in obj){if(Object.prototype.hasOwnProperty.call(obj,_45)){_44(_45,obj[_45]);}}};function getMethodImpl(_46){var _47=_46.split(".");var _48=null;var _49=window;var _4a=null;for(var i=0,l=_47.length;(i "+[_53,_54]);}if(!_4b[_53]){if(_54&&typeof _54=="function"){_54=[_54];}var _55=new ObjectInfo(_53);_4b[_53]=_55;for(var i=0,l=_54?_54.length:0;i "+_58);}var _59=_58.substring(0,_58.lastIndexOf("."));var _5a=_58.substring(_58.lastIndexOf(".")+1);if(_43.enabled){_43.log("className = "+_59+"; methodName = "+_5a);}var _5b=getMethodImpl(_58);_5b=_5b||null;if(!_4b[_59]||_5b===null){if(_43.enabled){_43.log("ImplementationTracker.getImpls exit ==> null ");}return null;}var _5c=_4b[_59].implementors;if(_43.enabled){_43.log("impls = "+_5c);}var _5d=[];for(var i=0,l=_5c.length;i "+_5d);}return _5d;};};}(function() { var implTracker = new ImplementationTracker(true); var DojoExtensions = { "dojo.declare": { type: "before", handler: function ( fnArgs ) { implTracker.add( fnArgs[0], fnArgs[1] ); return fnArgs; } } }; var registry = new ExtensionRegistry(); registry.process( DojoExtensions ); ibmConfig.mappingFunction = function ( name ) { return implTracker.getImpls( name ); }; })();dojo.provide("com.ibm.mm.enabler.nls.enabler_es");dojo.provide("com.ibm.mm.enabler.nls.modelMessages");com.ibm.mm.enabler.nls.modelMessages._built=true;dojo.provide("com.ibm.mm.enabler.nls.modelMessages.es");com.ibm.mm.enabler.nls.modelMessages.es={"E_COMNODE_NOTFOUND_1":"BMWMF0011E: No se puede encontrar el nodo siguiente: ${0}.","E_WIDGETDEF_MUST_BE_IDENTIFIABLE_0":"BMWMF0018E: La definición del widget no se puede identificar.","E_INVALID_PARAM_TYPE_0":"BMWMF0021E: El parámetro ${num} no es válido. El valor debe ser de tipo ${type}.","E_LAYOUTNODE_NEXT_CAN_NOT_BE_ITSELF_0":"BMWMF0027E: El nodo insertado no se puede insertar junto a sí mismo.","E_LAYOUTNODE_NOTFOUND_1":"BMWMF0015E: No se ha podido encontrar el siguiente nodo de dise?o: ${0}.","E_INVALID_DOCUMENT_0":"BMWMF0022E: El documento no puede ser nulo.","E_XHR_REQUEST_FAILED_2":"BMWMF0025E: El servidor no ha podido responder a la solicitud HTTP. La solicitud devolvió un estado '${0}' y los datos de respuesta '${1}'.","E_PARAM_ISNULL_0":"BMWMF0014E: El valor del parámetro no puede ser nulo.","E_PARAM_IS_SMALLER_ZERO_0":"BMWMF0016E: Los valores de parámetro deben ser superior o igual a cero.","E_PARAM_ISNULL_OR_UNDEFINED_3":"BMWMF0024E: El parámetro '${0}' en la función'${1}.${2}' no puede ser nulo o no estar definido.","E_INVALID_CONTEXT_MISSING_TYPE_0":"BMWMF0019E: El contexto debe contener un tipo.","E_INVALID_CONTEXT_SPECIFIED_0":"BMWMF0017E: El contexto de widget no se ha definido.","E_CATNODE_NOTFOUND_1":"BMWMF0010E: No se ha podido encontrar la siguiente entrada de catálogo: ${0}.","E_NODE_NOTFOUND_1":"BMWMF0004E: El sistema no puede encontrar el nodo siguiente:${0}.","E_NODE_ISNULL_0":"BMWMF0001E: Se ha producido un error porque el nodo es nulo.","E_INVALID_XPATH_EXPR_0":"BMWMF0023E: La expresión XPath no puede estar vacía.","E_ELEMENT_NOT_FOUND_2":"BMWMF0013E: No se puede encontrar el elemento ${0} en ${1}.","E_INVALID_PARAM_COUNT_0":"BMWMF0020E: El número de parámetros no es válido.","E_UNSUPPORTED_OP_0":"BMWMF0003E: Esta operación no está soportada.","E_OBJECT_DISPOSED_0":"BMWMF0026E: El objeto se ha desechado.","E_CCATNODE_NOTFOUND_1":"BMWMF0012E: No se ha podido encontrar la siguiente categoría de catálogo: ${0}.","E_WIDGET_NOTFOUND_1":"BMWMF0002E: El widget siguiente no se ha podido cargar: ${0}."};dojo.provide("com.ibm.mm.data.nls.dataTypeStrings");com.ibm.mm.data.nls.dataTypeStrings._built=true;dojo.provide("com.ibm.mm.data.nls.dataTypeStrings.es");com.ibm.mm.data.nls.dataTypeStrings.es={"countrycode":"Código nacional","languagecode":"Código de idioma","date":"Fecha","boolean":"Booleano","json":"JSON","table":"Tabla","rss":"RSS","email":"Correo electrónico","image":"Imagen","any":"Todos los datos","text":"Texto","html":"HTML","modeldata":"Datos del modelo","time":"Hora","phone":"Teléfono","url":"URL","currency":"Moneda","address":"Dirección","postalcode":"Código postal","xml":"XML","timestamp":"Indicación de fecha y hora","person":"Persona","number":"Número","atom":"Atom"};dojo.provide("com.ibm.mm.enabler.nls.iwStr");com.ibm.mm.enabler.nls.iwStr._built=true;dojo.provide("com.ibm.mm.enabler.nls.iwStr.es");com.ibm.mm.enabler.nls.iwStr.es={"I_NO_PREVIEW_SUPPORT_0":"BMWIS0001I: Este elemento no soporta vista previa.","ALL_AUTH":"Todos los usuarios autenticados","LOAD":"Cargando.....","I_ONEUI_INFORMATION_0":"Información","I_ONEUI_INFORMATION_1":"Información:","WIDGET_NOT_INSTALLED":"Widget no disponible","ERROR":"Error","WARNING":"Aviso","ANON":"Anónimo","INFO":"Información","WIDGET_NOT_INSTALLED_SUB":"Este widget no está habilitado o no está disponible para ser utilizado.","ALL_PORTAL":"All Portal Users"};dojo.provide("com.ibm.mm.enabler.nls.iwMessages");com.ibm.mm.enabler.nls.iwMessages._built=true;dojo.provide("com.ibm.mm.enabler.nls.iwMessages.es");com.ibm.mm.enabler.nls.iwMessages.es={"E_WIDGET_DISPLAY_FAIL_2":"BMWIW0006E: El widget ${0} no se puede visualizar correctamente. Detalles del error: ${1}.","W_STANDALONECLASS_MISSING_1":"BMWIW0013W: Falta el widget ${0} en la clase iw-Standalone.","E_IWIDGETDEF_NOTAVAILABLE_1":"BMWIW0001E: El widget ${0} no está disponible. Compruebe la conexión de red o póngase en contacto con el administrador para confirmar que el widget esté disponible en el servidor solicitado.","W_API_DEPRECATED_1":"BMWIW0008W: El método utilizado ya no está soportado. Utilice ${0} en su lugar.","E_NODISPLAY_UNSECUREWIDGET_1":"BMWIW0010E: No se ha podido visualizar el widget no de confianza ${0}.","E_RESOURCE_LOAD_FAIL_2":"BMWIW0011E: No se ha podido cargar el recurso ${0} : ${1}.","E_SUBDOMAIN_NOTAVAILABLE_2":"BMWIW0003E: El widget no de confianza ${0} no se ha podido cargar debido a que se ha superado el límite de número de subdominios de ${1}. Marque otro widget en la página como de confianza para que otro subdominio esté disponible.","E_SUBDOMAIN_NOTAVAILABLE1_2":"BMWIW0009E: No se ha podido cargar el widget ${0} debido a que el número de subdominios supera su límite de ${1}.","E_WIDGET_EVENT_FAIL_3":"BMWIW0007E: El sistema no puede manejar el suceso ${0} para el widget ${1}. Detalles del error: ${2}.","E_WIDGETS_UNLOAD_FAIL_1":"BMWIW0004E: Los widgets no se han cargado correctamente debido a que no se ha renovado por completo la ventana del navegador. Detalles del error: ${0}.","W_DEPRECATE_2":"BMWIW0012W: La función ${0} está en desuso. Utilice ${1} en su lugar.","E_WIDGET_UNLOAD_FAIL_2":"BMWIW0005E: El widget ${0} no se ha cargado correctamente. Detalles del error: ${1}.","E_IWIDGETDEF_CONTENTNOTAVAILABLE_1":"BMWIW0002E: El sistema no puede encontrar el contenido para la modalidad siguiente: ${0}.","E_WIDGET_INCORRECTCONFIG_1":"BMWIW0014E: El widget ${0} no se ha configurado correctamente."};/** Licensed Materials - Property of IBM, 5724-U69, (C) Copyright IBM Corp. 2008, 2010 - All Rights reserved. **/ dojo.provide("com.ibm.mm.enabler.portal");dojo.i18n._preloadLocalizations("com.ibm.mm.enabler.nls.enabler",["ROOT","ar","ca","cs","da","de","de-de","el","en","en-gb","en-us","es","es-es","fi","fi-fi","fr","fr-fr","he","he-il","hr","hu","it","it-it","ja","ja-jp","kk","ko","ko-kr","nb","nl","nl-be","nl-nl","no","pl","pt","pt-br","pt-pt","ro","ro-ro","ru","sk","sl","sv","th","tr","uk","xx","zh","zh-cn","zh-tw"]);(function(){var _1="3.0.0.20140512-1700".split(".");var _2="enabler";var _3="3.0.0.1-CF3";if(_2){_2="_"+_2;}if(_1.length==4){dojo.setObject("com.ibm.mashups.enabler.version",{major:_1[0],minor:_1[1],patch:_1[2],"projectName":_3,"flag":_2,revision:_1[3],toString:function(){return this.major+"."+this.minor+"."+this.patch+(this.flag||"")+" ("+this.revision+")"+(this.projectName?"["+this.projectName+"]":"");}});}})();if(!dojo._hasResource["com.ibm.mashups.enabler.Deferred_API"]){dojo._hasResource["com.ibm.mashups.enabler.Deferred_API"]=true;dojo.provide("com.ibm.mashups.enabler.Deferred_API");dojo.provide("com.ibm.mashups.enabler.Deferred");dojo.declare("com.ibm.mashups.enabler.Deferred",null,{setFinishedCallback:function(_4,_5,_6){},start:function(_7){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.logging.LogLevel"]){dojo._hasResource["com.ibm.mashups.enabler.logging.LogLevel"]=true;dojo.provide("com.ibm.mashups.enabler.logging.LogLevel");dojo.declare("com.ibm.mashups.enabler.logging.LogLevel",null,{TRACE:500,INFO:800,WARNING:900,SEVERE:1000});com.ibm.mashups.enabler.logging.LogLevel=new com.ibm.mashups.enabler.logging.LogLevel();}if(!dojo._hasResource["com.ibm.mashups.enabler.logging.LogHandler"]){dojo._hasResource["com.ibm.mashups.enabler.logging.LogHandler"]=true;dojo.provide("com.ibm.mashups.enabler.logging.LogHandler");dojo.require("com.ibm.mashups.enabler.logging.LogLevel");dojo.declare("com.ibm.mashups.enabler.logging.LogHandler",null,{constructor:function(){},getHandlerID:function(){return null;},getLogLevel:function(){return null;},log:function(_8,_9,_a,_b){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.logging.Logger_API"]){dojo._hasResource["com.ibm.mashups.enabler.logging.Logger_API"]=true;dojo.provide("com.ibm.mashups.enabler.logging.Logger_API");dojo.provide("com.ibm.mashups.enabler.logging.Logger");dojo.require("com.ibm.mashups.enabler.logging.LogLevel");dojo.declare("com.ibm.mashups.enabler.logging.Logger",null,{constructor:function(){},getLogger:function(_c){return null;},addHandler:function(_d){},removeHandler:function(_e){},entering:function(_f,_10){},exiting:function(_11,_12){},info:function(_13,_14,_15){},warning:function(_16,_17,_18){},severe:function(_19,_1a,_1b){},trace:function(_1c,_1d,_1e){},log:function(_1f,_20,_21,_22){},isLoggable:function(_23){return false;}});}if(!dojo._hasResource["com.ibm.mm.enabler.logging.ConsoleHandler"]){dojo._hasResource["com.ibm.mm.enabler.logging.ConsoleHandler"]=true;dojo.provide("com.ibm.mm.enabler.logging.ConsoleHandler");dojo.declare("com.ibm.mm.enabler.logging.ConsoleHandler",[com.ibm.mashups.enabler.logging.LogHandler],{constructor:function(){this.handlerID="com.ibm.mm.enabler.logging.ConsoleHandler";this.logLevel=com.ibm.mashups.enabler.logging.LogLevel.TRACE;},getHandlerID:function(){return this.handlerID;},getLogLevel:function(){return this.logLevel;},log:function(_24,_25,_26,_27){if(_25==com.ibm.mashups.enabler.logging.LogLevel.SEVERE){console.error(_24+" "+_26+": "+_27);}else{if(_25==com.ibm.mashups.enabler.logging.LogLevel.WARNING){console.warn(_24+" "+_26+": "+_27);}else{if(_25==com.ibm.mashups.enabler.logging.LogLevel.INFO){console.info(_24+" "+_26+": "+_27);}else{if(_25==com.ibm.mashups.enabler.logging.LogLevel.TRACE){console.debug(_24+" "+_26+": "+_27);}}}}}});}if(!dojo._hasResource["com.ibm.mm.enabler.logging.LoggerImpl"]){dojo._hasResource["com.ibm.mm.enabler.logging.LoggerImpl"]=true;dojo.provide("com.ibm.mm.enabler.logging.LoggerImpl");dojo.declare("com.ibm.mm.enabler.logging.LoggerImpl",[com.ibm.mashups.enabler.logging.Logger],{BASE_TOPIC:"com.ibm.mm.enabler.logging.",constructor:function(_28,_29){this.loggers={};this.handlers={};this.name=_28?_28:null;this.parentLogger=_29?_29:null;if(!this.parentLogger){if(ibmConfig&&ibmConfig.traceConfig){this._setTraceConfig(ibmConfig.traceConfig);}else{this._setTraceConfig();}}},getLogger:function(_2a){if(this.parentLogger){return this.parentLogger.getLogger(_2a);}if(!this.loggers[_2a]){this.loggers[_2a]=new com.ibm.mm.enabler.logging.LoggerImpl(_2a,this);}return this.loggers[_2a];},addHandler:function(_2b){if(this.parentLogger){return this.parentLogger.addHandler(_2b);}this.handlers[_2b.handlerID]={};var _2c=this.handlers[_2b.handlerID];_2c.handler=_2b;var _2d=_2b.getLogLevel();var _2e="log";_2c.severeHandle=dojo.subscribe(this.BASE_TOPIC+com.ibm.mashups.enabler.logging.LogLevel.SEVERE,_2b,_2e);if(_2d<=com.ibm.mashups.enabler.logging.LogLevel.WARNING){_2c.warningHandle=dojo.subscribe(this.BASE_TOPIC+com.ibm.mashups.enabler.logging.LogLevel.WARNING,_2b,_2e);}if(_2d<=com.ibm.mashups.enabler.logging.LogLevel.INFO){_2c.infoHandle=dojo.subscribe(this.BASE_TOPIC+com.ibm.mashups.enabler.logging.LogLevel.INFO,_2b,_2e);}if(_2d<=com.ibm.mashups.enabler.logging.LogLevel.TRACE){_2c.traceHandle=dojo.subscribe(this.BASE_TOPIC+com.ibm.mashups.enabler.logging.LogLevel.TRACE,_2b,_2e);}},removeHandler:function(_2f){var _30;var _31;if(dojo.isString(_2f)){if(!_2f in this.handlers){return;}_30=this.handlers[_2f];_31=_2f;}else{if(dojo.isObject(_2f)){_30=this.handlers[_2f.getHandlerID()];_31=_2f.getHandlerID();}else{return;}}if(_30){if(_30.severeHandle){dojo.unsubscribe(_30.severeHandle);}if(_30.warningHandle){dojo.unsubscribe(_30.warningHandle);}if(_30.infoHandle){dojo.unsubscribe(_30.infoHandle);}if(_30.traceHandle){dojo.unsubscribe(_30.traceHandle);}if(_30.handler){delete _30.handler;}}delete this.handlers[_31];},entering:function(_32,_33){var _34=com.ibm.mashups.enabler.logging.LogLevel.TRACE;if(this.isLoggable(_34)){var msg=this._getMessageString(_33);this._log(this.name,_34,_32,"ENTRY"+(msg?" "+msg:""));}},exiting:function(_35,_36){var _37=com.ibm.mashups.enabler.logging.LogLevel.TRACE;if(this.isLoggable(_37)){var msg=this._getMessageString(_36);this._log(this.name,_37,_35,"RETURN"+(msg?" "+msg:""));}},info:function(_38,_39,_3a){var _3b=com.ibm.mashups.enabler.logging.LogLevel.INFO;this.log(_3b,_38,_39,_3a);},warning:function(_3c,_3d,_3e){var _3f=com.ibm.mashups.enabler.logging.LogLevel.WARNING;this.log(_3f,_3c,_3d,_3e);},severe:function(_40,_41,_42){var _43=com.ibm.mashups.enabler.logging.LogLevel.SEVERE;this.log(_43,_40,_41,_42);},trace:function(_44,_45,_46){var _47=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.log(_47,_44,_45,_46);},log:function(_48,_49,_4a,_4b){if(!this.parentLogger){this._log("com.ibm.mashups.enabler.logging.Logger",com.ibm.mashups.enabler.logging.LogLevel.WARNING,"{log|info|warning|severe|trace|entering|exiting}","You must not use the RootLogger (com.ibm.mashups.enabler.logging.Logger). Create your own logger for each class.");}if(this.isLoggable(_48)){this._log(this.name,_48,_49,_4a,_4b);}},isLoggable:function(_4c){if(_4c!=com.ibm.mashups.enabler.logging.LogLevel.TRACE){return true;}if(!(ibmConfig&&ibmConfig.isDebug)){return false;}var _4d=this._getRegExp();if(_4d&&_4d.exec(this.name)){return true;}return false;},_log:function(_4e,_4f,_50,_51,_52){if((_52&&!dojo.isArray(_52))||_52===false){_52=[_52];}var _53=_52?dojo.string.substitute(_51.toString(),_52):_51;dojo.publish(this.BASE_TOPIC+_4f,[_4e,_4f,_50,_53]);},_getMessageString:function(_54){var _55=0;var msg="";if(_54||_54===false){msg+="[ ";if(dojo.isArray(_54)){for(var i=0;i<_54.length;++i){var arg=_54[i];if(msg.length>2){msg+=", ";}if(typeof arg=="undefined"){msg+="undefined";}if(arg&&arg.toString){msg+=arg.toString();}else{if(arg===null){msg+="null";}else{msg+="n/a";}}}}else{if(_54&&_54.toString){msg+=_54.toString();}else{if(_54===null){msg+="null";}else{msg+="n/a";}}}msg+=" ]";}return msg;},_setTraceConfig:function(_56){if(dojo.isString(_56)&&_56.length>0&&_56=="*"){this._log("RootLogger",com.ibm.mashups.enabler.logging.LogLevel.TRACE,"_setTraceConfig","Invalid traceConfig specified: *");}else{if((dojo.isArray(_56)||dojo.isString(_56))&&_56.length>0){this._log("RootLogger",com.ibm.mashups.enabler.logging.LogLevel.TRACE,"_setTraceConfig","Changing traceConfig: "+_56);var _57=dojo.isArray(_56)?_56.join("|"):_56;if(_57.length>0){this.regExp=new RegExp(_57);return;}}}this.regExp=null;},_disableTraceConfig:function(){this.regExp=null;},_getRegExp:function(){if(this.parentLogger){return this.parentLogger._getRegExp();}return this.regExp;}});com.ibm.mashups.enabler.logging.Logger=new com.ibm.mm.enabler.logging.LoggerImpl();com.ibm.mashups.enabler.logging.Logger.addHandler(new com.ibm.mm.enabler.logging.ConsoleHandler());}if(!dojo._hasResource["com.ibm.mashups.enabler.logging.Logger"]){dojo._hasResource["com.ibm.mashups.enabler.logging.Logger"]=true;dojo.provide("com.ibm.mashups.enabler.logging.Logger");}if(!dojo._hasResource["com.ibm.mm.enabler.DeferredImpl"]){dojo._hasResource["com.ibm.mm.enabler.DeferredImpl"]=true;dojo.provide("com.ibm.mm.enabler.DeferredImpl");dojo.declare("com.ibm.mm.enabler.DeferredImpl",[com.ibm.mashups.enabler.Deferred],{_chainedDeferred:null,_sync:false,_previous:null,constructor:function(_58,_59,_5a){this.context=_58;this.startfn=_59;this.params=_5a;this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);},addErrorCallback:function(_5b,_5c){dojo.deprecated("com.ibm.mashups.enabler.Deferred.addErrorCallback()","use com.ibm.mashups.enabler.Deferred.setFinishedCallback() instead");this.errorCallback=_5b;this.errorCallbackParameters=_5c;},addFinishedCallback:function(_5d,_5e){dojo.deprecated("com.ibm.mashups.enabler.Deferred.addFinishedCallback()","use com.ibm.mashups.enabler.Deferred.setFinishedCallback() instead");this.finishedCallback=_5d;this.finishedCallbackParameters=_5e;},setFinishedCallback:function(_5f,_60,_61){if(_61===true){this._isVerboseFinish=true;}this.finishedCallback2=_5f;this.finishedCallbackParameters2=_60;return this;},start:function(_62,_63){this._sync=(_62||typeof (_62)=="undefined");var ret=null;if(dojo.isFunction(this.startfn)){ret=dojo.hitch(this.context||null,this.startfn)(this,this._sync,this.params,_63||null);}return ret;},getFinishedCallback:function(){return this.finishedCallback2;},getFinishedCallbackParameters:function(){return this.finishedCallbackParameters2;},setChainedDeferred:function(_64){this._chainedDeferred=_64;},getChainedDeferred:function(){return this._chainedDeferred;},getPrevious:function(){return this._previous;},_setPreviousDeferred:function(_65,_66,_67){this._previous={deferred:_65,result:_66,status:_67};},removeChainedDeferred:function(){this._chainedDeferred=null;},finish:function(_68,_69,_6a){try{if(dojo.isFunction(this.getFinishedCallback())){if(this._isVerboseFinish){var _6b={resource:_68,parameter:this.getFinishedCallbackParameters()};_6b.statusCode=_69;if(this._verboseOperationResults){_6b.operations=this._verboseOperationResults||[];}else{_6b.request=_6a||{statusCode:_69};}dojo.partial(this.getFinishedCallback())(_6b);}else{dojo.partial(this.getFinishedCallback())(_68,_69,this.getFinishedCallbackParameters());}}else{if(dojo.isFunction(this.finishedCallback)&&(""+_69).indexOf("2")===0){dojo.partial(this.finishedCallback)(_68,this.finishedCallbackParameters);}else{if(dojo.isFunction(this.errorCallback)&&_69>=400){dojo.partial(this.errorCallback)(_68,this.errorCallbackParameters);}}}}catch(e){this.LOGGER.warning("finish","Callback failed to execute; skipping. Reason: "+e.message);}if(this._chainedDeferred){this._chainedDeferred._setPreviousDeferred(this,_68,_69);this._chainedDeferred.start(this._sync);}}});}if(!dojo._hasResource["com.ibm.mashups.enabler.Deferred"]){dojo._hasResource["com.ibm.mashups.enabler.Deferred"]=true;dojo.provide("com.ibm.mashups.enabler.Deferred");}if(!dojo._hasResource["com.ibm.mashups.enabler.context.LocalizedContext_API"]){dojo._hasResource["com.ibm.mashups.enabler.context.LocalizedContext_API"]=true;dojo.provide("com.ibm.mashups.enabler.context.LocalizedContext_API");dojo.provide("com.ibm.mashups.enabler.context.LocalizedContext");dojo.declare("com.ibm.mashups.enabler.context.LocalizedContext",null,{getPreferredLocale:function(){},getDefaultLocale:function(){},getLocale:function(_6c){},getDisplayLocale:function(_6d){},getTitle:function(_6e){},getDescription:function(_6f){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.xml.XPath_API"]){dojo._hasResource["com.ibm.mashups.enabler.xml.XPath_API"]=true;dojo.provide("com.ibm.mashups.enabler.xml.XPath_API");dojo.provide("com.ibm.mashups.enabler.xml.XPath");dojo.declare("com.ibm.mashups.enabler.xml.XPath",null,{evaluateXPath:function(_70,doc,_71){},evaluateEntry:function(_72,doc,_73){},evaluateBoolean:function(_74,doc,_75){},evaluateString:function(_76,doc,_77){},evaluateNumber:function(_78,doc,_79){}});}if(!dojo._hasResource["com.ibm.mm.enabler.utils.Dom"]){dojo._hasResource["com.ibm.mm.enabler.utils.Dom"]=true;dojo.provide("com.ibm.mm.enabler.utils.Dom");com.ibm.mm.enabler.utils.Dom={getAttributeWithNS:function(_7a,_7b,_7c,_7d){if(!_7a){return null;}if(!_7b){return null;}if(!_7c){return null;}if(!_7d){return null;}var _7e=null;if(dojo.isIE||window.ActiveXObject!==undefined){_7e=_7a.getAttribute(_7b);if(_7e===null||_7e==""){var _7f=_7a.attributes;for(var i=_7f.length;i>0;i--){if(_7f[i-1].baseName==_7c&&_7f[i-1].namespaceURI==_7d){_7e=_7f[i-1].value;break;}}}}else{_7e=_7a.getAttributeNS(_7d,_7c);}return _7e;},setAttributeWithNS:function(dom,_80,_81,_82,_83,_84){if(!dojo.isObject(_80)){throw new Error("element must be a DOMNode");}if(dojo.isIE||window.ActiveXObject!==undefined){var _85=dom.createNode(2,_81,_83);if(_84===null||_84===undefined){_84="";}_85.nodeValue=_84;_80.setAttributeNode(_85);}else{_80.setAttributeNS(_83,_81,_84);}},textContent:function(_86,_87){if(!_86){return "";}if(arguments.length>1){var doc=_86.ownerDocument;var _88=doc.createTextNode(_87||"");com.ibm.mm.enabler.utils.Dom.replaceChildren(_86,_88);return;}else{var tc=dojox.xml.parser.textContent(_86);if(tc){return tc;}return dojo.map(_86.childNodes||[],function(_89){return (_89.nodeType>0&&_89.nodeType<4)?_89.nodeValue:"";}).join("");}},createElement:function(dom,_8a,ns){var _8b;if(dojo.isIE||window.ActiveXObject!==undefined){if(ns){_8b=dom.createNode(1,_8a,ns);}else{_8b=dom.createElement(_8a);}}else{_8b=dom.createElementNS(ns,_8a);}return _8b;},destroyNode:function(_8c){var _8d=dojo.byId("IELeakGarbageBin");if(!_8d){_8d=dojo.create("div",{id:"IELeakGarbageBin",style:{display:"none"}},dojo.body());}dojo.place(_8c,_8d);dojo.attr(_8d,"innerHTML","");if(_8c.nodeType!=3){if(dojo.isIE||window.ActiveXObject!==undefined){dojo.attr(_8c,"outerHTML","");}}},createDocument:function(_8e,_8f){if(typeof ActiveXObject!="undefined"||window.ActiveXObject!==undefined){var _90=["MSXML2.FreeThreadedDOMDocument.6.0","Msxml2.DOMDocument.6.0","Msxml2.DOMDocument.3.0"];for(var i=0;i<_90.length;i++){try{oXml=new ActiveXObject(_90[i]);if(oXml){break;}}catch(e){if(i==_90.length){console.warn("Error creating Msxml.DOMDocument; reason: ",e);}}}oXml.async=false;if(_8e){oXml.loadXML(_8e);if(oXml.parseError.errorCode!=0){var _91=oXml.parseError;console.warn("Error parsing XML data. Reason: '"+_91.reason+"'; data: '"+_8e+"'.");}}return oXml;}else{return dojox.xml.parser.parse(_8e,_8f);}},replaceChildren:function(_92,_93){return dojox.xml.parser.replaceChildren(_92,_93);},innerXML:function(_94){return _94?dojox.xml.parser.innerXML(_94):null;},removeChildren:function(_95){return dojox.xml.parser.removeChildren(_95);},copyChildren:function(_96,_97,_98){var _99=_96.cloneNode(true);return this.moveChildren(_99,_97,_98);},moveChildren:function(_9a,_9b,_9c){var _9d=0;if(_9c){while(_9a.hasChildNodes()&&_9a.firstChild.nodeType==3){_9a.removeChild(_9a.firstChild);}while(_9a.hasChildNodes()&&_9a.lastChild.nodeType==3){_9a.removeChild(_9a.lastChild);}}while(_9a.hasChildNodes()){_9b.appendChild(_9a.firstChild);_9d++;}return _9d;},getLocalName:function(_9e){if(!_9e){return null;}switch(_9e.nodeType){case 3:return "#text";case 1:return _9e.localName||com.ibm.mm.enabler.utils.Dom.removeNodeNS(_9e.nodeName);}return null;},getNodeNSPrefix:function(_9f){var tN=""+_9f;var _a0=tN.indexOf(":");return (_a0!=-1)?tN.substring(0,_a0):null;},removeNodeNS:function(_a1){var tN=""+_a1;var _a2=tN.indexOf(":");return (_a2!=-1)?tN.substring(1+_a2):_a1;},lookupNamespaceURI:function(_a3,_a4){if(!(dojo.isIE||window.ActiveXObject!==undefined)){return _a3.lookupNamespaceURI(_a4);}var _a5=_a3;while(_a5&&_a5.nodeType!=9){var _a6=_a5.getAttribute("xmlns:"+_a4);if(_a6){return _a6;}_a5=_a5.parentNode;}return null;}};}if(!dojo._hasResource["com.ibm.mm.enabler.xml.xpath._Generic"]){dojo._hasResource["com.ibm.mm.enabler.xml.xpath._Generic"]=true;dojo.provide("com.ibm.mm.enabler.xml.xpath._Generic");dojo.declare("com.ibm.mm.enabler.xml.xpath._Generic",null,{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.xml.xpath._Generic");},_evaluateXPath:function(_a7,doc,_a8){if(dojo.isSafari){return this._safariEvaluateXPath(_a7,doc,_a8);}else{if(dojo.isIE||window.ActiveXObject!==undefined){return this._ieEvaluateXPath(_a7,doc,_a8);}else{return this._geckoEvaluateXPath(_a7,doc,_a8);}}},_transformNode:function(_a9,_aa){if(typeof XPathResult!="undefined"&&_a9 instanceof XPathResult){return this._xpathResultValue(_a9,_aa);}else{if(_aa==com.ibm.mm.enabler.xml.xpath._Generic.ANY_TYPE){return _a9;}else{if(_aa==com.ibm.mm.enabler.xml.xpath._Generic.NUMBER_TYPE){return parseFloat(com.ibm.mm.enabler.utils.Dom.textContent(_a9));}else{if(_aa==com.ibm.mm.enabler.xml.xpath._Generic.STRING_TYPE){return com.ibm.mm.enabler.utils.Dom.textContent(_a9);}else{if(_aa==com.ibm.mm.enabler.xml.xpath._Generic.BOOLEAN_TYPE){return !!_a9;}}}}}return null;},_xpathResultValue:function(_ab,_ac){if(_ac==com.ibm.mm.enabler.xml.xpath._Generic.ANY_TYPE){return _ab;}else{if(_ac==com.ibm.mm.enabler.xml.xpath._Generic.NUMBER_TYPE){return _ab.numberValue;}else{if(_ac==com.ibm.mm.enabler.xml.xpath._Generic.STRING_TYPE){return _ab.stringValue;}else{if(_ac==com.ibm.mm.enabler.xml.xpath._Generic.BOOLEAN_TYPE){return _ab.booleanValue;}}}}return null;},_evaluateXPathSingle:function(_ad,doc,_ae,_af){_af=_af||com.ibm.mm.enabler.xml.xpath._Generic.ANY_TYPE;var _b0;if(dojo.isSafari){_b0=this._safariEvaluateXPathRaw(_ad,doc,_ae,_af);if(XPathResult&&_b0 instanceof XPathResult){if(_af==com.ibm.mm.enabler.xml.xpath._Generic.ANY_TYPE){return _b0.iterateNext();}return this._transformNode(_b0,_af);}else{if(_b0){return this._transformNode(_b0[0],_af);}}}else{if(dojo.isIE||window.ActiveXObject!==undefined){_b0=this._ieEvaluateXPathRawSingle(_ad,doc,_ae);if(_b0||_b0===null){return this._transformNode(_b0,_af);}}else{_b0=this._geckoEvaluateXPathRaw(_ad,doc,_ae,_af);if(_b0&&_af==com.ibm.mm.enabler.xml.xpath._Generic.ANY_TYPE){return _b0.iterateNext();}else{return this._transformNode(_b0,_af);}}}return _b0||null;},_geckoEvaluateXPath:function(_b1,doc,_b2){var _b3=this._geckoEvaluateXPathRaw(_b1,doc,_b2,com.ibm.mm.enabler.xml.xpath._Generic.ANY_TYPE);var _b4=[];if(_b3){var _b5;while((_b5=_b3.iterateNext())){_b4.push(_b5);}}return _b4;},_geckoEvaluateXPathRaw:function(_b6,doc,_b7,_b8){var _b9=doc;if(doc.nodeType!=9){_b9=doc.ownerDocument;}return _b9.evaluate(_b6,doc,function(_ba){return _b7[_ba]?_b7[_ba].toString():null;},_b8,null);},_ieEvaluateXPath:function(_bb,doc,_bc){var _bd=this._ieEvaluateXPathRaw(_bb,doc,_bc);return _bd||[];},_setIeNamespaces:function(doc,_be){if(_be){var ns=[];var _bf;for(var _c0 in _be){_bf=_be[_c0];if(_c0!="xml"){ns.push("xmlns:",_c0,"='",_bf,"' ");}}var _c1=doc.ownerDocument||doc;_c1.setProperty("SelectionNamespaces",ns.join(""));_c1.setProperty("SelectionLanguage","XPath");}},_ieEvaluateXPathRaw:function(_c2,doc,_c3){this._setIeNamespaces(doc,_c3);return doc.selectNodes(_c2);},_ieEvaluateXPathRawSingle:function(_c4,doc,_c5){this._setIeNamespaces(doc,_c5);return doc.selectSingleNode(_c4);},_safariEvaluateXPath:function(_c6,doc,_c7){var _c8=this._safariEvaluateXPathRaw(_c6,doc,_c7,com.ibm.mm.enabler.xml.xpath._Generic.ANY_TYPE);if(XPathResult&&_c8 instanceof XPathResult){var _c9=[];var _ca;while((_ca=_c8.iterateNext())){_c9.push(_ca);}return _c9;}return _c8||[];},_safariEvaluateXPathRaw:function(_cb,doc,_cc,_cd){if(typeof XPathResult!="undefined"){return document.evaluate(_cb,doc,function(_ce){return _cc[_ce]?_cc[_ce].toString():null;},_cd,null);}else{if(doc.selectNodes){return doc.selectNodes(_cb);}}}});com.ibm.mm.enabler.xml.xpath._Generic.ANY_TYPE=0;com.ibm.mm.enabler.xml.xpath._Generic.NUMBER_TYPE=1;com.ibm.mm.enabler.xml.xpath._Generic.STRING_TYPE=2;com.ibm.mm.enabler.xml.xpath._Generic.BOOLEAN_TYPE=3;}if(!dojo._hasResource["com.ibm.mm.enabler.xml.XPathImpl"]){dojo._hasResource["com.ibm.mm.enabler.xml.XPathImpl"]=true;dojo.provide("com.ibm.mm.enabler.xml.XPathImpl");dojo.declare("com.ibm.mm.enabler.xml.XPathImpl",[com.ibm.mashups.enabler.xml.XPath,com.ibm.mm.enabler.xml.xpath._Generic],{modelMessages:null,constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.xml.XPath");this.modelMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","modelMessages");},ANY_TYPE:com.ibm.mm.enabler.xml.xpath._Generic.ANY_TYPE,NUMBER_TYPE:com.ibm.mm.enabler.xml.xpath._Generic.NUMBER_TYPE,STRING_TYPE:com.ibm.mm.enabler.xml.xpath._Generic.STRING_TYPE,BOOLEAN_TYPE:com.ibm.mm.enabler.xml.xpath._Generic.BOOLEAN_TYPE,evaluateXPath:function(_cf,doc,_d0){var _d1="evaluateXPath(xpathExpr, doc, namespaces)";var _d2=this.LOGGER.isLoggable(com.ibm.mashups.enabler.logging.LogLevel.TRACE);if(_d2){this.LOGGER.entering(_d1,[_cf,doc,_d0]);}if(!dojo.isString(_cf)||_cf.length===0){throw new Error(this.modelMessages.E_INVALID_XPATH_EXPR_0);}if(!doc){throw new Error(this.modelMessages.E_INVALID_DOCUMENT_0);}var ret=this._evaluateXPath(_cf,doc,_d0);if(_d2){this.LOGGER.exiting(_d1,ret);}return ret;},evaluateSingle:function(_d3,doc,_d4,_d5){if(!dojo.isString(_d3)||_d3.length===0){throw new Error(this.modelMessages.E_INVALID_XPATH_EXPR_0);}if(!doc){throw new Error(this.modelMessages.E_INVALID_DOCUMENT_0);}return this._evaluateXPathSingle(_d3,doc,_d4,_d5);},evaluateEntry:function(_d6,doc,_d7){return this.evaluateSingle(_d6,doc,_d7,com.ibm.mashups.enabler.xml.XPath.ANY_TYPE);},evaluateBoolean:function(_d8,doc,_d9){return this.evaluateSingle(_d8,doc,_d9,com.ibm.mashups.enabler.xml.XPath.BOOLEAN_TYPE);},evaluateString:function(_da,doc,_db){return this.evaluateSingle(_da,doc,_db,com.ibm.mashups.enabler.xml.XPath.STRING_TYPE);},evaluateNumber:function(_dc,doc,_dd){return this.evaluateSingle(_dc,doc,_dd,com.ibm.mashups.enabler.xml.XPath.NUMBER_TYPE);},createXPath:function(_de,_df,_e0){var _e1=_de.split("/");var _e2=_e1[0];var _e3=_e2.split(":");var _e4,_e5;if(_e3.length>1){_e5=_e3[0];_e4=_e3[1];}else{_e4=_e3[0];}var _e6=com.ibm.mashups.enabler.xml.XPath.evaluateXPath((_e5?_e5+":":"")+_e4,_df,_e0);var _e7;if(_e6&&_e6.length>0){_e7=_e6[0];}else{_e7=com.ibm.mm.enabler.utils.Dom.createElement(_df.ownerDocument,(_e5?_e5+":":"")+_e4,_e5?_e0[_e5]:null);_df.appendChild(_e7);}if(_e1.length>1){_e7=com.ibm.mashups.enabler.xml.XPath.createXPath(_de.substr(_de.indexOf("/")+1),_e7,_e0);}return _e7;}});com.ibm.mashups.enabler.xml.XPath=new com.ibm.mm.enabler.xml.XPathImpl();com.ibm.mm.enabler.xml.xpath.evaluateXPath=function(_e8,doc,_e9){var _ea=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.xml.xpath");var _eb="evaluateXPath";_ea.warning(_eb,"This method must not be used directly. Use com.ibm.mashups.enabler.xml.XPath.evaluateXPath instead.");dojo.deprecated("com.ibm.mm.enabler.xml.xpath.evaluateXPath","The method com.ibm.mm.enabler.xml.xpath.evaluateXPath is deprecated, please use com.ibm.mashups.enabler.xml.XPath.evaluateXPath instead");return com.ibm.mm.enabler.xml.xpath._Generic.evaluateXPath.apply(null,arguments);};}if(!dojo._hasResource["com.ibm.mashups.enabler.xml.XPath"]){dojo._hasResource["com.ibm.mashups.enabler.xml.XPath"]=true;dojo.provide("com.ibm.mashups.enabler.xml.XPath");}if(!dojo._hasResource["com.ibm.mm.enabler.utils.LocaleHelper"]){dojo._hasResource["com.ibm.mm.enabler.utils.LocaleHelper"]=true;dojo.provide("com.ibm.mm.enabler.utils.LocaleHelper");com.ibm.mm.enabler.utils.LocaleHelper={LOG_LEVEL:com.ibm.mashups.enabler.logging.LogLevel.TRACE,LOGGER:com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.utils.LocaleHelper"),getLocale:function(_ec,_ed,_ee){com.ibm.mm.enabler.utils.LocaleHelper.LOGGER.warning("com.ibm.mm.enabler.utils.LocaleHelper.getLocale","Deprecated. Use com.ibm.mashups.enabler.context.Factory.getLocalizedContext().getLocale() instead.");if(typeof _ec=="undefined"||_ec===null){return null;}var _ef=_ec.getLocales();if(typeof _ef=="undefined"||_ef===null||!dojo.isArray(_ef)){return null;}if(_ef.length===0){return null;}var _f0=null;if(_ef.length===1){_f0=_ef[0];}var arr={};for(var i in _ef){if(Object.prototype.hasOwnProperty.call(_ef,i)){var _f1=_ef[i];arr[_f1]=_f1;}}var _f2;if(_f0===null){if(typeof _ed!="undefined"&&_ed!==null){_f0=this.findMatchLocale(arr,_ed);if(_f0===null){_f2=_ed.split(/-|_/);if(_f2.length==2){var _f3=_f2[0];if(typeof arr[_f3]!="undefined"&&arr[_f3]!==null){_f0=_f3;}}}}}if(_f0===null){var _f4=(dojo.isIE||window.ActiveXObject!==undefined?navigator.userLanguage:navigator.language).toLowerCase();if(typeof ibmConfig!="undefined"&&ibmConfig&&typeof (ibmConfig.locale)!="undefined"&&ibmConfig.locale){_f4=ibmConfig.locale;}if(_f4!==null){_f0=this.findMatchLocale(arr,_f4);if(_f0===null){_f2=_f4.split(/-|_/);if(_f2.length==2){var _f5=_f2[0];if(typeof arr[_f5]!="undefined"&&arr[_f5]!==null){_f0=_f5;}}}}}if(_f0===null){if(_ee){_f0=_ee;}}if(_f0===null){if(arr.en){_f0="en";}}if(_f0===null){_f0=_ef[0];}return _f0;},findMatchLocale:function(arr,_f6){com.ibm.mm.enabler.utils.LocaleHelper.LOGGER.warning("com.ibm.mm.enabler.utils.LocaleHelper.findMatchLocale","Deprecated. Use com.ibm.mm.enabler.utils.LocaleHelper.matchLocale() instead.");var _f7=null;if(arr[_f6]){_f7=_f6;}var _f8=this.toServerLocale(_f6);if(_f7===null&&arr[_f8]){_f7=_f8;}var _f9=_f8.toLowerCase();if(_f7===null&&arr[_f9]){_f7=_f9;}return _f7;},matchLocale:function(_fa,_fb){return com.ibm.mm.enabler.utils.LocaleHelper._matchLocale(com.ibm.mm.enabler.utils.LocaleHelper._getLocaleObj(_fa),com.ibm.mm.enabler.utils.LocaleHelper.normalizeLocale(_fb));},_matchLocale:function(_fc,_fd,_fe){var _ff=_fc;var _100=null;var _101=dojo.some(_fd,function(item){if(item==com.ibm.mm.enabler.utils.LocaleHelper.normalizeLocale(_fc.toString())){_100=item;return true;}});if(_101&&_100){return _100;}if(_fc.variant){_fc.variant=null;return com.ibm.mm.enabler.utils.LocaleHelper._matchLocale(_fc,_fd);}if(_fc.country){_fc.country=null;return com.ibm.mm.enabler.utils.LocaleHelper._matchLocale(_fc,_fd);}if(!_fe){_fc=_ff;switch(_fc.language){case "he":_fc.language="iw";break;case "iw":_fc.language="he";break;}return com.ibm.mm.enabler.utils.LocaleHelper._matchLocale(_fc,_fd,true);}return null;},toServerLocale:function(_102){com.ibm.mm.enabler.utils.LocaleHelper.LOGGER.warning("com.ibm.mm.enabler.utils.LocaleHelper.normalizeLocale","Deprecated. Use com.ibm.mm.enabler.utils.LocaleHelper.normalizeLocale() instead.");if(!_102){return null;}if(_102.indexOf("-")<0){return _102;}_102=_102.replace(/-/,"_");var _103=_102.split("_");var lang=_103[0];var _104=_103[1].toUpperCase();var _105=lang+"_"+_104;return _105;},_getLocaleObj:function(_106){if(dojo.isArray(_106)){return dojo.map(_106,function(item){return com.ibm.mm.enabler.utils.LocaleHelper._getLocaleObj(item);});}else{if(dojo.isString(_106)&&dojo.string.trim(_106).length>0){var _107={language:null,country:null,variant:null,toString:function(){return (this.language?this.language+(this.country?"_"+this.country+(this.variant?"_"+this.variant:""):""):"");},isValid:function(){return !!this.language;}};var _108=dojo.string.trim(_106).replace(/-/g,"_").split("_");switch(_108.length){case 3:_107.variant=_108[2];case 2:_107.country=_108[1].toUpperCase();case 1:_107.language=_108[0].toLowerCase();break;}return _107;}else{return null;}}},normalizeLocale:function(_109){if(dojo.isArray(_109)){return dojo.map(_109,function(item){return com.ibm.mm.enabler.utils.LocaleHelper.normalizeLocale(item);});}else{if(_109&&dojo.isString(_109)){return _109.replace(/_/g,"-").toLowerCase();}else{return null;}}}};}if(!dojo._hasResource["com.ibm.mm.enabler.model.NameSpaceFactory"]){dojo._hasResource["com.ibm.mm.enabler.model.NameSpaceFactory"]=true;dojo.provide("com.ibm.mm.enabler.model.NameSpaceFactory");dojo.declare("com.ibm.mm.enabler.model.NameSpaceFactoryImpl",null,{constructor:function(){this.NS_APP="app";this.NS_ATOM="atom";this.NS_THR="thr";this.NS_UM="um";this.NS_XHTML="xhtml";this.NS_XML="xml";this.NS_XSI="xsi";this.NS_OPENSEARCH="opensearch";this.NS_CM="cm";this.NS_CA="ca";this.NS_AC="ac";this.NS_EVENT_DATATYPES="event-datatypes";this.NS_XMLNS="xmlns";this.NS_XSD="xsd";this.NS_JS="js";this.NS_ENV="env";this.namespaces={};this.namespaces[this.NS_APP]="http://www.w3.org/2007/app";this.namespaces[this.NS_ATOM]="http://www.w3.org/2005/Atom";this.namespaces[this.NS_THR]="http://purl.org/syndication/thread/1.0";this.namespaces[this.NS_UM]="http://www.ibm.com/xmlns/prod/websphere/um.xsd";this.namespaces[this.NS_XHTML]="http://www.w3.org/1999/xhtml";this.namespaces[this.NS_XML]="http://www.w3.org/XML/1998/namespace";this.namespaces[this.NS_XSI]="http://www.w3.org/2001/XMLSchema-instance";this.namespaces[this.NS_XMLNS]="http://www.w3.org/2000/xmlns/";this.namespaces[this.NS_OPENSEARCH]="http://a9.com/-/spec/opensearch/1.1/";this.namespaces[this.NS_CM]="http://www.ibm.com/xmlns/prod/composite-applications/v1.0";this.namespaces[this.NS_CA]="http://www.ibm.com/xmlns/prod/composite-applications/v1.0";this.namespaces[this.NS_AC]="http://www.ibm.com/xmlns/prod/lotus/access-control/v1.0";this.namespaces[this.NS_EVENT_DATATYPES]="http://www.ibm.com/xmlns/prod/lotus/mashups/event-datatypes";this.namespaces[this.NS_XSD]="http://www.w3.org/2001/XMLSchema";this.namespaces[this.NS_JS]="text/javascript";this.namespaces[this.NS_ENV]="http://www.w3.org/2003/05/soap-envelope";},getNameSpaces:function(_10a){var _10b={};var len=_10a.length;for(var i=0;i").replace(/</g,"<");if(_121){this.LOGGER.exiting(_120,[dojo.doc.title]);}}});com.ibm.mm.enabler.context.PageContext=new com.ibm.mm.enabler.context.PageContextImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.context.PageContext"]){dojo._hasResource["com.ibm.mashups.enabler.context.PageContext"]=true;dojo.provide("com.ibm.mashups.enabler.context.PageContext");}if(!dojo._hasResource["com.ibm.mashups.enabler.context.Factory_API"]){dojo._hasResource["com.ibm.mashups.enabler.context.Factory_API"]=true;dojo.provide("com.ibm.mashups.enabler.context.Factory_API");dojo.provide("com.ibm.mashups.enabler.context.Factory");dojo.declare("com.ibm.mashups.enabler.context.Factory",null,{getLocalizedContext:function(){},getLocalizedContext:function(_122,_123){},getPageContext:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.context.FactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.context.FactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.context.FactoryImpl");dojo.declare("com.ibm.mm.enabler.context.FactoryImpl",[com.ibm.mashups.enabler.context.Factory],{constructor:function(){},getLocalizedContext:function(_124,_125){return new com.ibm.mm.enabler.context.LocalizedContextImpl(_124,_125);},getPageContext:function(){return new com.ibm.mm.enabler.context.PageContextImpl();}});com.ibm.mashups.enabler.context.Factory=new com.ibm.mm.enabler.context.FactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.context.Factory"]){dojo._hasResource["com.ibm.mashups.enabler.context.Factory"]=true;dojo.provide("com.ibm.mashups.enabler.context.Factory");}if(!dojo._hasResource["com.ibm.mashups.enabler.services.ConfigConstants"]){dojo._hasResource["com.ibm.mashups.enabler.services.ConfigConstants"]=true;dojo.provide("com.ibm.mashups.enabler.services.ConfigConstants");dojo.declare("com.ibm.mashups.enabler.services.ConfigConstants",null,{PROXY_URL:"com.ibm.mashups.proxy.url",HUB_URL:"com.ibm.mashups.hub.url",LOGIN_URL:"com.ibm.mashups.url.login",LOGOUT_URL:"com.ibm.mashups.url.logout",CONTEXT_ROOT:"com.ibm.mashups.contextroot",CONTEXT_ROOT_ENABLER:"com.ibm.mashups.contextroot.enabler",CONTEXT_ROOT_BUILDER:"com.ibm.mashups.contextroot.builder",CONTENTHANDLER_PUBLIC:"com.ibm.mashups.contenthandler.public",CONTENTHANDLER_PRIVATE:"com.ibm.mashups.contenthandler.private",EMBEDDING_PUBLIC:"com.ibm.mashups.embedding.public",EMBEDDING_PRIVATE:"com.ibm.mashups.embedding.private",THEMES_FEEDS_EXPIRATION:"themes.feed.expiration",AVAILABLE_LOCALES:"availableLocales",DEFAULT_LOCALE:"default.locale",DISPLAY_LOCALE:"displayLocale",TUNNEL_MODE:"tunnel.mode",CLIENT_IS_DEBUG:"isDebug",CLIENT_IS_BIDI:"isBidi",WIDGETDEFID_SANDBOX_DISABLED:"com.ibm.mashups.sandbox.force.disable",TRACE_CONFIG:"traceConfig",CLIENT_POPUP_CONSOLE:"popupConsole",CLIENT_ALLOW_PUBLISH_LOGGING:"allowPublishLogging",CLIENT_ALLOW_PUBLISH_TRACING:"allowPublishTracing",CLIENT_ADDITIONAL_SERVICES:"additionalServices",CLIENT_DEFAULT_THEME_ID:"com.ibm.mashups.theme.defaultThemeId",CLIENT_PAGE_SOURCE_READ_ONLY:"pageSourceReadOnly",CLIENT_AUTO_ACCEPT_SHARED_GROUPNAME:"autoAcceptSharedGroupName",AUTO_WIRING_DEFAULT_ENABLED:"autoWiringDefaultEnabled",CLIENT_USER_ID_KEY:"userIdKey",CLIENT_GROUP_CN_KEY:"groupCNKey",SERVICE_DOCUMENT_URL:"serviceDocumentUrl",MULTIPART_ENABLED:"com.ibm.mashups.multipart.enabled",MULTIPART_CORRELATE_HOSTS:"com.ibm.mashups.multipart.correlatehosts",MULTIPART_CACHE_QUERIES:"com.ibm.mashups.multipart.cachequeries",ENDPOINTS:"endpointIDs",ENDPOINT_CONFIG_PROVIDER:"Endpoints",ANONYMOUS_USER:"anonymousUser",NAVIGATION_HIDDEN:"com.ibm.mashups.navigation.hidden",SPACE_HIDDEN:"com.ibm.mashups.space.hidden",USER:"user",SUBDOMAINS:"subdomains",SERVERDOMAIN:"serverdomain",SANDBOXENABLED:"sandboxenabled",SUBDOMAINREUSE:"subdomainreuse",NAVSTATE_PERSISTENCE_URL:"navstate.persistence.url",NAVSTATE_PERSISTENCE_PSTORE:"navstate.persistence.pstore",NAVSTATE_PERSISTENCE_URL_LIMIT:"navstate.persistence.url.limit",NAVSTATE_PERSISTENCE_URL_SPLIMIT:"navstate.persistence.url.splimit",NAVSTATE_HUFFMANNENCODE_ENABLED:"navstate.huffmannencode.enabled",LOADING_HTML:"loadingHTML",PAGE_LOAD_OPTIMIZATION:"pageLoadOptimization",PAGE_LOAD_OPTIMIZATION_THEME:"pageLoadOptimizationTheme",PAGE_LOAD_OPTIMIZATION_APP_WIDGETS:"pageLoadOptimizationAppWidgets",ANONYMOUS_ALLOW_CREATE:"com.ibm.mashups.anonymous.allow.create",DEFAULT_USER_DISPLAY_PROP:"com.ibm.mashups.default.user.display.prop",PRODUCT_NAME:"com.ibm.mashups.productname",DEFAULT_GROUP_DISPLAY_PROP:"com.ibm.mashups.default.group.display.prop",WELCOME_SPACE_ID:"com.ibm.mashups.welcome.space.name",BUILDER_TITLE_FILTER_REGEXP:"com.ibm.mashups.builder.filter.title.regexp",ANON_VIRTUAL_USER_ID:"com.ibm.mashups.anonUserId",ALL_AUTH_VIRTUAL_GROUP_ID:"com.ibm.mashups.allAuthGroupId",SERVER_TYPE:"com.ibm.mashups.server",SERVER_TYPE_MASHUPS:"Lotus_Mashups",SERVER_TYPE_PORTAL:"WebSphere_Portal",SERVER_TYPE_BSPACE:"Business_Space",ANON_MODE_ENABLED:"com.ibm.mashups.anonymous.mode",AUTO_WILDCARD_DISABLED:"com.ibm.mashups.autoWildcardSearchDisabled",CONTEXT_MENU_NAME:"com.ibm.mashups.contextmenu.name",WIDGET_BUILDER_ENABLED:"com.ibm.mashups.widgetBuilder.enabled",CREATE_SPACE_TEMPLATE_MODE:"createSpaceOnTemplateMode",FAVORITE_SPACES_MAXIMUM_NUMBER:"favorite.spaces.maximum.number",RECENT_SPACES_MAXIMUM_NUMBER:"recent.spaces.maximum.number",REGISTER_LOADEDRESOURCES:"register.loadedresources",PERSISTENCE_MODE:"com.ibm.mashups.enabler.icontext.persistence.mode",PERSISTENCE_MODE_EVENTS:"com.ibm.mashups.enabler.icontext.persistence.mode.events",PERSISTENCE_MODE_EVENTS_MODIFIABLE:"com.ibm.mashups.enabler.icontext.persistence.mode.events.modifiable",PERSISTENCE_MODE_WIRES:"com.ibm.mashups.enabler.icontext.persistence.mode.wires",PERSISTENCE_MODE_WIRES_MODIFIABLE:"com.ibm.mashups.enabler.icontext.persistence.mode.wires.modifiable",PERSISTENCE_MODE_ATTRIBUTES:"com.ibm.mashups.enabler.icontext.persistence.mode.attributes",PERSISTENCE_MODE_ATTRIBUTES_MODIFIABLE:"com.ibm.mashups.enabler.icontext.persistence.mode.attributes.modifiable",PERSISTENCE_MODE_ATTRIBUTES_JSON_INJECTXML:"com.ibm.mashups.enabler.icontext.attributes.json.injectxml",ICONTEXT_AUTO_COMMIT:"com.ibm.mashups.enabler.icontext.autocommit",ID_PREFIX:"com.ibm.mashups.iWidget.idPrefix",API_ENFORCEMENT_MODE:"com.ibm.mashups.enabler.enforcement",API_ENFORCEMENT_MODE_WARN:"warning",API_ENFORCEMENT_MODE_ERROR:"error",NON_PREVIEWABLE_WIDGET_LOCATION:"com.ibm.mashups.enabler.layout.widget.NonPreviewableContentWidget.location",LIMIT_PAGE_DESCRIPTION:"com.ibm.mashups.persistence.page.description.limit",WIDGET_PERSONALIZE_ENABLED:"com.ibm.mashups.widget.attributes.personalize.enabled",SPACEMANAGER_PAGE_QUERYCOUNT:"com.ibm.mashups.spacemanager.page.queryCount",SPACEMANAGER_PAGE_QUERYKEYWORD:"com.ibm.mashups.spacemanager.page.queryKeyword",SPACEMANAGER_SPACE_QUERYCOUNT:"com.ibm.mashups.spacemanager.spacetemplate.queryCount",SPACEMANAGER_SPACE_QUERYKEYWORD:"com.ibm.mashups.spacemanager.spacetemplate.queryKeyword",LOCALAPPS_REGEX:"com.ibm.mashups.multipart.localapps.regex",SERVER_OBJECT_ID_FORMAT:"com.ibm.mashups.server.oid.format",LOGOUT_VERIFICATION_REGEXP:"com.ibm.mashups.logout.verification.regexp",MULTIPART_SPLIT_PUBLIC:"com.ibm.mashups.multipart.splitPublic",MULTIPART_SPLIT_TRANSACTIONS:"com.ibm.mashups.multipart.splitTransactions",QUEUE_RENDERING:"com.ibm.mashups.queueRendering",MULTIPART_USE_SINK:"com.ibm.mashups.multipart.useSinkForModRequests",NAVIGATION_CREATION_NOOP:"com.ibm.mashups.navigation.creation.noop",ALL_PORTAL_VIRTUAL_GROUP_ID:"com.ibm.mashups.allPortalGroupId"});com.ibm.mashups.enabler.services.ConfigConstants=new com.ibm.mashups.enabler.services.ConfigConstants();}if(!dojo._hasResource["com.ibm.mashups.enabler.services.ConfigObject_API"]){dojo._hasResource["com.ibm.mashups.enabler.services.ConfigObject_API"]=true;dojo.provide("com.ibm.mashups.enabler.services.ConfigObject_API");dojo.provide("com.ibm.mashups.enabler.services.ConfigObject");dojo.declare("com.ibm.mashups.enabler.services.ConfigObject",null,{getValue:function(name){return null;},getValueDeferred:function(name){return null;}});}if(!dojo._hasResource["com.ibm.mm.enabler.services.ConfigObjectDefaultImpl"]){dojo._hasResource["com.ibm.mm.enabler.services.ConfigObjectDefaultImpl"]=true;dojo.provide("com.ibm.mm.enabler.services.ConfigObjectDefaultImpl");dojo.declare("com.ibm.mm.enabler.services.ConfigObjectDefaultImpl",[com.ibm.mashups.enabler.services.ConfigObject],{constructor:function(_126,_127){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.provider=_126;this.configService=_127;this.ns={};this.ns.app="http://www.w3.org/2007/app";this.ns.atom="http://www.w3.org/2005/Atom";},getPreferenceValue:function(name){if(this.provider=="all"){return this.configService.getValue(name);}else{return this._getValue(this.provider,name);}return null;},getValue:function(name){if(this.provider=="all"){return this.configService.getValue(name,internal);}else{return this._getValue(this.provider,name);}return null;},_getValue:function(_128,name){return null;},getValueDeferred:function(name){if(this.provider=="all"){return new com.ibm.mm.enabler.DeferredImpl(this,function(_129,sync,name){var _12a=_129.getFinishedCallback();var _12b=this.configService.getValue(name,internal);if(_12b&&_12a){_12a(_12b,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK,_129.getFinishedCallbackParameters());}return _12b;});}else{return this._getValueDeferred(this.provider,name);}},_getValueDeferred:function(_12c,name){return null;}});if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"Base")>=0)){dojo["require"]("com.ibm.mm.enabler.services.ConfigObjectExtendedImpl");}}if(!dojo._hasResource["com.ibm.mashups.enabler.services.ConfigObject"]){dojo._hasResource["com.ibm.mashups.enabler.services.ConfigObject"]=true;dojo.provide("com.ibm.mashups.enabler.services.ConfigObject");}if(!dojo._hasResource["com.ibm.mashups.enabler.services.ConfigService_API"]){dojo._hasResource["com.ibm.mashups.enabler.services.ConfigService_API"]=true;dojo.provide("com.ibm.mashups.enabler.services.ConfigService_API");dojo.provide("com.ibm.mashups.enabler.services.ConfigService");dojo.declare("com.ibm.mashups.enabler.services.ConfigService",null,{SERVICE_NAME:"configService",getValue:function(name){return null;},getConfigObject:function(name){return null;},getConfigProviderNames:function(){return null;}});com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME="configService";}if(!dojo._hasResource["com.ibm.mashups.services.ServiceManager_API"]){dojo._hasResource["com.ibm.mashups.services.ServiceManager_API"]=true;dojo.provide("com.ibm.mashups.services.ServiceManager_API");dojo.provide("com.ibm.mashups.services.ServiceManager");dojo.declare("com.ibm.mashups.services.ServiceManager",null,{constructor:function(){},getService:function(_12d){}});}if(!dojo._hasResource["com.ibm.mashups.services.ServiceManager"]){dojo._hasResource["com.ibm.mashups.services.ServiceManager"]=true;dojo.provide("com.ibm.mashups.services.ServiceManager");}if(!dojo._hasResource["com.ibm.mm.services.ServiceManagerImpl"]){dojo._hasResource["com.ibm.mm.services.ServiceManagerImpl"]=true;dojo.provide("com.ibm.mm.services.ServiceManagerImpl");dojo.declare("com.ibm.mm.services.ServiceManagerImpl",com.ibm.mashups.services.ServiceManager,{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this._serviceEntries={};ibmConfig=ibmConfig||{};ibmConfig.additionalServices=ibmConfig.additionalServices||null;if(ibmConfig.additionalServices){var _12e=dojo.fromJson(ibmConfig.additionalServices);for(var i in _12e){if(Object.prototype.hasOwnProperty.call(_12e,i)){var _12f=_12e[i];this._serviceEntries[_12f.name]=_12f;}}}},getService:function(_130){var _131=this._serviceEntries[_130];_131=_131||null;if(_131!==null){var _132=_131.serviceHandler;_132=_132||null;if(_132===null){_132=this._createService(_131);_132=_132||null;if(_132===null){this._loadScript(_131);}else{this._serviceEntries[_130].serviceHandler=_132;}}}return this._serviceEntries[_130].serviceHandler;},setService:function(_133,_134){_134=_134||null;if(_134===null){return null;}var _135=this._serviceEntries[_133];_135=_135||null;if(_135!==null){delete this._serviceEntries[_133];}if(!this._serviceEntries[_133]){this._serviceEntries[_133]={};}if(dojo.isString(_134)){this._serviceEntries[_133].baseClass=_134;}else{this._serviceEntries[_133].serviceHandler=_134;}},_loadScript:function(_136){var me=this;dojo.xhrGet({url:_136.path,ibmMultipart:{context:com.ibm.mashups.enabler.io.XHRMultipartFactory.CONTEXT_ENABLER},handleAs:"text",sync:true,load:function(_137){dojo.eval(_137);var _138=me._createService(_136);if(typeof _138!="undefined"&&_138!==null){var _139=_136.name;_136.serviceHandler=_138;}},error:function(data,_13a){this.LOGGER.severe("_loadScript","error loading service:"+_136.name,data);}});},_createService:function(_13b){var _13c=null;try{_13c=new (dojo.getObject(_13b.baseClass))();}catch(err){}return _13c;}});com.ibm.mashups.services.ServiceManager=new com.ibm.mm.services.ServiceManagerImpl();}if(!dojo._hasResource["com.ibm.mm.enabler.services.AbstractConfigServiceImpl"]){dojo._hasResource["com.ibm.mm.enabler.services.AbstractConfigServiceImpl"]=true;dojo.provide("com.ibm.mm.enabler.services.AbstractConfigServiceImpl");dojo.declare("com.ibm.mm.enabler.services.AbstractConfigServiceImpl",com.ibm.mashups.enabler.services.ConfigService,{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);},getPreferenceValue:function(name){return this.getValue(name);},getValue:function(name,_13d){if(typeof _13d=="undefined"){this.LOGGER.warning("com.ibm.mm.enabler.services.ConfigService.getValue","This method must not be used directly. Use com.ibm.mashups.enabler.services.ConfigService.getValue instead. name: ${0}",[name]);}var _13e=ibmConfig[name];return _13e;},getConfigObject:function(_13f){return null;},getConfigProviderNames:function(){return null;}});}if(!dojo._hasResource["com.ibm.mm.enabler.services.ConfigServiceDefaultImpl"]){dojo._hasResource["com.ibm.mm.enabler.services.ConfigServiceDefaultImpl"]=true;dojo.provide("com.ibm.mm.enabler.services.ConfigServiceDefaultImpl");dojo.declare("com.ibm.mm.enabler.services.ConfigServiceDefaultImpl",[com.ibm.mm.enabler.services.AbstractConfigServiceImpl],{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.services.ConfigServiceDefaultImpl");},_getConfigObject:function(_140){if(!ibmConfig["CO_"+_140]){var co=new com.ibm.mm.enabler.services.ConfigObjectDefaultImpl(_140,this);ibmConfig["CO_"+_140]=co;}return ibmConfig["CO_"+_140];},_getConfigProviderNames:function(){var ret=[];ret.push("all");return ret;},getValue:function(name){var _141="getValue(name)";var _142=this.LOGGER.isLoggable(com.ibm.mashups.enabler.logging.LogLevel.TRACE);if(_142){this.LOGGER.entering(_141,name);}var ret=this.inherited(arguments,[name,true]);if(_142){this.LOGGER.exiting(_141,ret);}return ret;},getConfigObject:function(name){var _143="getConfigObject(name)";var _144=this.LOGGER.isLoggable(com.ibm.mashups.enabler.logging.LogLevel.TRACE);if(_144){this.LOGGER.entering(_143,name);}var ret=this._getConfigObject(name);if(_144){this.LOGGER.exiting(_143,ret);}return ret;},getConfigProviderNames:function(){var _145="getConfigProviderNames()";var _146=this.LOGGER.isLoggable(com.ibm.mashups.enabler.logging.LogLevel.TRACE);if(_146){this.LOGGER.entering(_145,name);}var ret=this._getConfigProviderNames();if(_146){this.LOGGER.exiting(_145,ret);}return ret;}});com.ibm.mashups.services.ServiceManager.setService("configService","com.ibm.mm.enabler.services.ConfigServiceDefaultImpl");if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"Base")>=0)){dojo["require"]("com.ibm.mm.enabler.services.ConfigServiceExtendedImpl");}}if(!dojo._hasResource["com.ibm.mashups.enabler.services.ConfigService"]){dojo._hasResource["com.ibm.mashups.enabler.services.ConfigService"]=true;dojo.provide("com.ibm.mashups.enabler.services.ConfigService");}if(!dojo._hasResource["com.ibm.mashups.enabler.utils.EndpointHelper_API"]){dojo._hasResource["com.ibm.mashups.enabler.utils.EndpointHelper_API"]=true;dojo.provide("com.ibm.mashups.enabler.utils.EndpointHelper_API");dojo.provide("com.ibm.mashups.enabler.utils.EndpointHelper");dojo.declare("com.ibm.mashups.enabler.utils.EndpointHelper",null,{resolve:function(url){return null;}});}if(!dojo._hasResource["com.ibm.mm.enabler.EndpointUtils"]){dojo._hasResource["com.ibm.mm.enabler.EndpointUtils"]=true;dojo.provide("com.ibm.mm.enabler.EndpointUtils");dojo.declare("com.ibm.mm.enabler.EndpointUtilsDefaultImpl",null,{constructor:function(){},checkForEndpoints:function(url){return null;}});com.ibm.mm.enabler.EndpointUtils=new com.ibm.mm.enabler.EndpointUtilsDefaultImpl();if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"iWidget")>=0)){dojo["require"]("com.ibm.mm.enabler.EndpointUtilsExtendedImpl");}}if(!dojo._hasResource["com.ibm.mm.enabler.utils.EndpointHelperImpl"]){dojo._hasResource["com.ibm.mm.enabler.utils.EndpointHelperImpl"]=true;dojo.provide("com.ibm.mm.enabler.utils.EndpointHelperImpl");dojo.declare("com.ibm.mm.enabler.utils.EndpointHelperImpl",null,{resolve:function(url){if(!url){return url;}var url2=com.ibm.mm.enabler.EndpointUtils.checkForEndpoints(url);if(url2){return url2;}return url;}});com.ibm.mashups.enabler.utils.EndpointHelper=new com.ibm.mm.enabler.utils.EndpointHelperImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.utils.EndpointHelper"]){dojo._hasResource["com.ibm.mashups.enabler.utils.EndpointHelper"]=true;dojo.provide("com.ibm.mashups.enabler.utils.EndpointHelper");}if(!dojo._hasResource["com.ibm.mashups.enabler.utils.URLHelper_API"]){dojo._hasResource["com.ibm.mashups.enabler.utils.URLHelper_API"]=true;dojo.provide("com.ibm.mashups.enabler.utils.URLHelper_API");dojo.provide("com.ibm.mashups.enabler.utils.URLHelper");dojo.declare("com.ibm.mashups.enabler.utils.URLHelper",null,{rewriteURL:function(_147){return null;}});}if(!dojo._hasResource["com.ibm.mm.enabler.utils.Misc"]){dojo._hasResource["com.ibm.mm.enabler.utils.Misc"]=true;dojo.provide("com.ibm.mm.enabler.utils.Misc");com.ibm.mm.enabler.utils.Misc={LOG_LEVEL:com.ibm.mashups.enabler.logging.LogLevel.TRACE,LOGGER:com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.utils.Misc"),forIn:function(obj,func,_148){if(!obj||typeof obj!="object"){return;}_148=_148||null;var item;for(var idx in obj){if(Object.prototype.hasOwnProperty.call(obj,idx)){item=obj[idx];dojo.hitch(_148,func)(item,idx,obj);}}},encodePath:function(path,_149){if(path.length===0){return path;}var _14a=path.split("/");for(var i=0;i<_14a.length;++i){_14a[i]=_149?com.ibm.mm.enabler.utils.Misc._pathPartUnescape(_14a[i]):com.ibm.mm.enabler.utils.Misc._pathPartEscape(com.ibm.mm.enabler.utils.Misc._pathPartUnescape(_14a[i]));}return _14a.join("/");},_pathPartUnescape:function(_14b){_14b=decodeURIComponent(_14b);return _14b;},_pathPartEscape:function(_14c){_14c=encodeURIComponent(_14c);_14c=_14c.replace(/%3a/g,":");_14c=_14c.replace(/%3A/g,":");return _14c;},inStringArray:function(str,_14d){var rc=false;for(var i in _14d){if(Object.prototype.hasOwnProperty.call(_14d,i)){var _14e=_14d[i];if(_14e==str){rc=true;break;}}}return rc;},isEmpty:function(_14f){if(_14f===null||typeof _14f=="undefined"){return true;}else{if(dojo.isString(_14f)){return _14f.length===0;}else{for(var i in _14f){if(Object.prototype.hasOwnProperty.call(_14f,i)){return false;}}return true;}}},encodeModelID4Uri:function(uri){var pos=uri.indexOf(":");if(pos!=-1){var _150=uri.slice(0,pos+1);var end=uri.slice(pos+1);uri=_150+encodeURIComponent(end);}return encodeURIComponent(uri);},preloadImage:function(path,_151,_152){var _153=(_151&&_152)?new Image(_151,_152):new Image();_153.src=path;return _153;},isInstanceOf:function(obj1,obj2){if(obj1&&obj2){if(typeof obj1.isInstanceOf=="function"){if(obj1.isInstanceOf(obj2)){return true;}}return (obj1 instanceof obj2);}return false;},isPocUrl:function(_154){var _155={http:"http",https:"https",file:"file",endpoint:"endpoint"};var rc=false;if(_154.indexOf(":")>0){if(_154.indexOf("/")===0){return false;}if(_154.indexOf("?")===0){return false;}var _156=_154.substring(0,_154.indexOf(":"));if(!_155[_156]){rc=true;}}return rc;},_transferURLParameter:function(_157,_158){var _159=_158.getParameters();var _15a=_157.getParameters();var c=com.ibm.mm.enabler.model.url.ModelUrlConstants;for(var s in _15a){if(_159[s]){if(s==c.PARAMETER_MDNAME||s==c.PARAMETER_ASPECT){var sv=_15a[s];var _15b=dojo.filter(dojo.isArray(sv)?sv:[sv],function(v){if(dojo.isArray(_159[s])){return dojo.indexOf(_159[s],v)==-1;}else{return _159[s]!=v;}},this);dojo.forEach(_15b,function(v){_158.addParameter(s,v);},this);}}else{_158.setParameter(s,_15a[s]);}}return _158;}};}if(!dojo._hasResource["com.ibm.mm.enabler.utils.HttpUrl"]){dojo._hasResource["com.ibm.mm.enabler.utils.HttpUrl"]=true;dojo.provide("com.ibm.mm.enabler.utils.HttpUrl");dojo.declare("com.ibm.mm.enabler.utils.HttpUrl",null,{constructor:function(_15c,_15d){if(_15d!==false){var _15e=com.ibm.mm.enabler.EndpointUtils.checkForEndpoints(_15c);if(_15e){_15c=_15e;}}this.pocurl=this._resolvePocUrl(_15c);if(!this.pocurl){this.scheme=this._extractScheme(_15c);this.server=this._extractServer(_15c);this.port=this._extractPort(_15c);this.path=this._extractPath(_15c);this.parameters=this._extractQuery(_15c);this.anchor=this._extractAnchor(_15c);}},_resolvePocUrl:function(_15f){var rv=null;if(com.ibm.mm.enabler.utils.Misc.isPocUrl(_15f)){var _160=this._getPrefix();_15f=escape(unescape(_15f));rv=_160.concat(_15f);}return rv;},_getPrefix:function(){var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _161=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTEXT_ROOT);var _162=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.ANONYMOUS_USER);var _163;if(_162){_163=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTENTHANDLER_PUBLIC);}else{_163=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTENTHANDLER_PRIVATE);}var rv=_161.concat(_163).concat("?uri=");return rv;},addParameter:function(name,_164){if(dojo.isString(this.parameters[name])){this.parameters[name]=[this.parameters[name],_164];}else{if(dojo.isArray(this.parameters[name])){this.parameters[name].push(_164);}else{this.parameters[name]=_164;}}},setParameter:function(name,_165){if(!this.parameters){this.parameters={};}this.parameters[name]=_165;},getParameter:function(name){if(!this.parameters){return false;}return this.parameters[name];},getParameters:function(){return this.parameters;},isProxyNeeded:function(){var loc=document.location;if(loc.protocol!=this.scheme){return true;}if(!this._equalsServer(loc.hostname)){return true;}if(loc.port==this.port){return false;}var _166;if(this.scheme=="http:"){_166="80";if((loc.port==""&&this.port==_166)||(loc.port==_166&&this.port=="")){return false;}}if(this.scheme=="https:"){_166="443";if((loc.port==""&&this.port==_166)||(loc.port==_166&&this.port=="")){return false;}}return true;},toServerRelativeString:function(_167){if(this.pocurl){return this.pocurl;}var str="";if(this.path!=""){str+="/"+com.ibm.mm.enabler.utils.Misc.encodePath(this.path,_167);}if(!com.ibm.mm.enabler.utils.Misc.isEmpty(this.parameters)){str+="?"+(_167?this._parametersToQuery(this.parameters):dojo.objectToQuery(this.parameters));}if(this.anchor!=""){str+="#"+this.anchor;}return str;},toProxifiedString:function(){if(this.pocurl){return this.pocurl;}if(typeof ibmConfig=="undefined"){return this.toString();}var _168=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME).getValue(com.ibm.mashups.enabler.services.ConfigConstants.PROXY_URL);if(!_168){return this.toString();}_168+="/";if(window.location.protocol==this.scheme&&this._equalsServer(window.location.hostname)){if(window.location.port==this.port){return this.toString();}else{if(this.scheme=="http:"&&window.location.port==""&&this.port=="80"){return this.toString();}else{if(this.scheme=="https:"&&window.location.port==""&&this.port=="443"){return this.toString();}else{if(this.scheme=="http:"&&window.location.port=="80"&&this.port==""){return this.toString();}else{if(this.scheme=="https:"&&window.location.port=="443"&&this.port==""){return this.toString();}}}}}}if(this.scheme=="https:"){_168+="https/"+this.server+((this.port!="443"&&this.port!="")?":"+this.port:"");}else{_168+="http/"+this.server+((this.port!="80"&&this.port!="")?":"+this.port:"");}_168+="/";if(this.path!=""){_168+=com.ibm.mm.enabler.utils.Misc.encodePath(this.path);}if(!com.ibm.mm.enabler.utils.Misc.isEmpty(this.parameters)){_168+="?"+dojo.objectToQuery(this.parameters);}if(this.anchor!=""){_168+="#"+this.anchor;}return _168;},getPath:function(){return "/"+this.path;},toString:function(_169){if(this.pocurl){return this.pocurl;}var str="";if(this.server!=""){str+=this.scheme+"http://"+this.server;if(this.port!=""){if(this.scheme=="http:"&&this.port=="80"){str+="";}else{if(this.scheme=="https:"&&this.port=="443"){str+="";}else{str+=":"+this.port;}}}}str+="/";if(this.path!=""){str+=com.ibm.mm.enabler.utils.Misc.encodePath(this.path,_169);}if(!com.ibm.mm.enabler.utils.Misc.isEmpty(this.parameters)){str+="?"+(_169?this._parametersToQuery(this.parameters):dojo.objectToQuery(this.parameters));}if(this.anchor!=""){str+="#"+this.anchor;}return str;},_parametersToQuery:function(_16a){var str="";var fn=function(_16b){str+=k+"="+_16b+"&";};for(var k in _16a){if(dojo.isArray(_16a[k])){dojo.forEach(_16a[k],fn);}else{fn(_16a[k]);}}if(str.lastIndexOf("&")===str.length-1){str=str.substr(0,str.length-1);}return str;},_isAbsolute:function(){return this._absoluteURL;},_extractScheme:function(_16c){var _16d=_16c.indexOf("/")===0;if(_16d){return window.location.protocol;}var _16e=_16c.indexOf("://");if(_16e==-1){this._absoluteURL=false;return window.location.protocol;}this._absoluteURL=true;return _16c.substring(0,_16e+1);},_extractServer:function(_16f){var _170=_16f.indexOf(this.scheme);var _171="";if(_170===0){var _172;var _173=_16f.indexOf("/",_170+this.scheme.length+2);if(_173!=-1){_172=_16f.substring(_170+this.scheme.length+2,_173);}else{_172=_16f.substring(_170+this.scheme.length+2);}_171=_172.split(":")[0];}else{var _174=window.location.hostname;_171=this._isIPv6(_174)?"["+_174+"]":_174;}return _171;},_extractPort:function(_175){var _176=_175.indexOf("/")===0;if(_176){return window.location.port;}var _177=_175.indexOf(this.scheme);if(_177>0){return window.location.port;}var _178=_175.indexOf(this.server);if(_178>=0){var _179;var _17a=_175.indexOf("/",_178);if(_17a!=-1){_179=_175.substring(_178,_17a);}else{_179=_175.substring(_178);}var _17b=_179.split(":");if(_17b.length>1){return _17b[1];}}return "";},_extractPath:function(_17c){var _17d=_17c.indexOf(this.scheme);var _17e=0;if(_17d===0){_17e=this.scheme.length+2;}var _17f="";var _180=_17c.indexOf("/",_17e);var _181=_17c.indexOf("?");var _182=_17c.lastIndexOf("#");if(_181>=0){_17f=_17c.substring(_180+1,_181);}else{if(_182>=0&&_180!=-1){_17f=_17c.substring(_180+1,_182);}else{if(_180!=-1){_17f=_17c.substring(_180+1);}}}return _17f;},_extractQuery:function(_183){var _184={};var _185=_183.split("?");if(_185.length>1){_184=dojo.queryToObject(_185[1].split("#")[0]);}return _184;},_extractAnchor:function(_186){var _187="";var _188=_186.split("#");if(_188.length>1){_187=_188[_188.length-1];}return _187;},_isIPv6:function(_189){return _189.indexOf(":")!=-1;},_equalsServer:function(_18a){return this.server.toLowerCase()==(this._isIPv6(_18a)?"["+_18a+"]":_18a).toLowerCase();}});}if(!dojo._hasResource["com.ibm.mm.enabler.utils.URLHelper"]){dojo._hasResource["com.ibm.mm.enabler.utils.URLHelper"]=true;dojo.provide("com.ibm.mm.enabler.utils.URLHelper");dojo.declare("com.ibm.mm.enabler.utils.URLHelperImpl",com.ibm.mashups.enabler.utils.URLHelper,{rewriteURL:function(_18b){var _18c=new com.ibm.mm.enabler.utils.HttpUrl(_18b);return _18c.toProxifiedString();}});com.ibm.mashups.enabler.utils.URLHelper=new com.ibm.mm.enabler.utils.URLHelperImpl();com.ibm.mm.enabler.utils.URLHelper=com.ibm.mashups.enabler.utils.URLHelper;}if(!dojo._hasResource["com.ibm.mashups.enabler.utils.URLHelper"]){dojo._hasResource["com.ibm.mashups.enabler.utils.URLHelper"]=true;dojo.provide("com.ibm.mashups.enabler.utils.URLHelper");}if(!dojo._hasResource["com.ibm.mm.enabler.services.ConfigObjectExtendedImpl"]){dojo._hasResource["com.ibm.mm.enabler.services.ConfigObjectExtendedImpl"]=true;dojo.provide("com.ibm.mm.enabler.services.ConfigObjectExtendedImpl");dojo.declare("com.ibm.mm.enabler.services.ConfigObjectExtendedImpl",[com.ibm.mm.enabler.services.ConfigObjectDefaultImpl],{constructor:function(_18d,_18e){this.valuesArray=null;this.provider=_18d;this.configService=_18e;},_getValue:function(_18f,name){if(!this.valuesArray){this._loadConfigData(_18f);}return this.valuesArray[name];},_getValueDeferred:function(_190,name){return new com.ibm.mm.enabler.DeferredImpl(this,function(_191,sync,name){var _192=_191.getFinishedCallback();if(!this.valuesArray){dojo["require"]("com.ibm.mashups.enabler.xml.XPath");dojo["require"]("com.ibm.mashups.enabler.model.url.ModelUrlFactory");dojo["require"]("com.ibm.mm.enabler.services.ModelRestServiceRequest");var _193="ConfigProvider."+_190;var _194=ibmConfig[_193];if((typeof _194!="undefined")||(_194!==null)){_190=_194;}var _195=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.CONFIG_URL,this);_195.setSchemeSpecificPart("/"+_190+"/*");var _196=new com.ibm.mm.enabler.services.ModelRestServiceRequest(_195,null,null,false,sync);var me=this;_196.read(function(type,data,xhr,args){if(!me.valuesArray){me.valuesArray={};}var _197=com.ibm.mashups.enabler.xml.XPath.evaluateXPath("http://atom:entry/atom:content/preferences/root/node/map/*",data,me.ns);if(_197&&_197.length>0){for(var i=0,l=_197.length;i0){for(var i=0;i<_19e.length;i++){var name=_19e[i].getAttribute("key");var _19f=_19e[i].getAttribute("value");ret[name]=_19f;}}});this.valuesArray=ret;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.Strategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.Strategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.Strategy");dojo.declare("com.ibm.mashups.enabler.strategy.Strategy",null,{});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.Model_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.Model_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.Model_API");dojo.provide("com.ibm.mashups.enabler.model.Model");dojo.declare("com.ibm.mashups.enabler.model.Model",null,{setStrategy:function(_1a0){},getStrategies:function(){},getStrategy:function(_1a1){},addStrategy:function(_1a2){},removeStrategy:function(_1a3){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.Model"]){dojo._hasResource["com.ibm.mashups.enabler.model.Model"]=true;dojo.provide("com.ibm.mashups.enabler.model.Model");}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.NoCacheStrategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.NoCacheStrategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.NoCacheStrategy");dojo.declare("com.ibm.mashups.enabler.strategy.NoCacheStrategy",com.ibm.mashups.enabler.strategy.Strategy,{_apply:function(_1a4){_1a4.setHeader("Pragma","no-cache");_1a4.setHeader("Cache-Control","no-cache");_1a4.setHeader("If-Modified-Since","Thu, 1 Jan 1970 00:00:00 GMT");}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.ModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.ModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.ModelImpl");dojo.declare("com.ibm.mm.enabler.model.ModelImpl",com.ibm.mashups.enabler.model.Model,{strategy:null,constructor:function(){this.modelMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","modelMessages");},setStrategy:function(_1a5){if(_1a5===null||typeof _1a5=="undefined"){this.strategy=null;}else{if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(_1a5,Array)){if(_1a5.length>0){this.strategy=[];dojo.forEach(_1a5,function(item,idx,arr){this.strategy.push(item);this._preprocessStrategy(item);},this);}}else{this.strategy=[_1a5];this._preprocessStrategy(_1a5);}}},getStrategies:function(){return this.strategy||[];},addStrategy:function(_1a6){if(_1a6===null||typeof _1a6=="undefined"){throw new Error(this.modelMessages.E_PARAM_ISNULL_0);}if(null===this.strategy){this.strategy=[];}this._preprocessStrategy(_1a6);for(var i=0,l=this.strategy.length;i=0)){this.strategy.splice(s,1+s);}},getStrategy:function(s){if(!this.strategy){return null;}else{if(dojo.isString(s)){return this._findStrategyByType(s);}else{if(!isNaN(s)&&(s=0)){return this.strategy[s];}else{return null;}}}},_findStrategyByType:function(type){var i=this._getIndexOfStrategyByType(type);return i>=0?this.strategy[i]:null;},_getIndexOfStrategyByType:function(type){if(this.strategy){for(var i=0,l=this.strategy.length;i=0){me._doLogin();return;}if(dojo.isIE||window.ActiveXObject!==undefined){data=com.ibm.mm.enabler.utils.Dom.createDocument(xhr.responseText);}_1ad(com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD,data,xhr,_1ae);},error:function(_1b2,_1b3){var xhr=_1b3.xhr;var _1b4=xhr.status;if(_1b4==401){me._doLogin();return;}_1ad(com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR,null,xhr,_1ae);},sync:this._sync,postData:feed.toString(),handleAs:this._handleAs};dojo.rawXhrPost(args);},read:function(_1b5,_1b6){if(this._textOnly){this._retrieveRawFeed(_1b5,_1b6);}else{this._retrieve(_1b5,_1b6);}},update:function(feed,_1b7,_1b8){this._updateCookie();var me=this;var args={url:this._feedURI,ibmMultipart:{context:com.ibm.mashups.enabler.io.XHRMultipartFactory.CONTEXT_ENABLER},load:function(_1b9,_1ba){var xhr=_1ba.xhr;var xrd=xhr.getResponseHeader("X-Request-Digest");if(xrd!==null){com.ibm.mm.enabler.services.ModelRestServiceRequestStatic.setXRequestDigest(xrd);}var _1bb=xhr.getResponseHeader("Content-Type");if(typeof _1bb!="undefined"&&_1bb!==null&&_1bb.indexOf("text/html")>=0){me._doLogin();return;}dojo.partial(_1b7)(com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD,_1b9,xhr,_1b8);},error:function(_1bc,_1bd){var xhr=_1bd.xhr;var _1be=xhr.status;if(_1be==401){me._doLogin();return;}dojo.partial(_1b7)(com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR,null,xhr,_1b8);},sync:this._sync,handleAs:this._handleAs};var _1bf={"Content-Type":"application/atom+xml; charset=utf-8","X-IBM-XHR":"true"};var _1c0=com.ibm.mashups.enabler.io.XHRMultipartFactory.create();var _1c1=_1c0.isTransaction();if(com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME).getValue(com.ibm.mashups.enabler.services.ConfigConstants.TUNNEL_MODE)===true&&(!_1c1||this._sync)){_1bf[this.POST_ACTION_HEADER]=this.REQUEST_METHOD_PUT;args.headers=_1bf;args.postData=feed;dojo.rawXhrPost(args);}else{args.putData=feed;args.headers=_1bf;dojo.rawXhrPut(args);}},remove:function(_1c2,_1c3){this._updateCookie();var me=this;var args={url:this._feedURI,ibmMultipart:{context:com.ibm.mashups.enabler.io.XHRMultipartFactory.CONTEXT_ENABLER},load:function(_1c4,_1c5){var type=com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD;var data=_1c4;var xhr=_1c5.xhr;var xrd=xhr.getResponseHeader("X-Request-Digest");if(xrd!==null){com.ibm.mm.enabler.services.ModelRestServiceRequestStatic.setXRequestDigest(xrd);}var _1c6=xhr.getResponseHeader("Content-Type");if(typeof _1c6!="undefined"&&_1c6!==null&&_1c6.indexOf("text/html")>=0){me._doLogin();return;}if(dojo.isIE||window.ActiveXObject!==undefined){data=com.ibm.mm.enabler.utils.Dom.createDocument(xhr.responseText);}_1c2(type,data,xhr,_1c3);},error:function(_1c7,_1c8){var xhr=_1c8.xhr;var _1c9=xhr.status;if(_1c9==401){me._doLogin();return;}_1c2(com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR,null,xhr,_1c3);},sync:this._sync,handleAs:this._handleAs};var _1ca={"Content-Type":"application/atom+xml","X-IBM-XHR":"true"};if(com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME).getValue(com.ibm.mashups.enabler.services.ConfigConstants.TUNNEL_MODE)===true){_1ca[this.POST_ACTION_HEADER]=this.REQUEST_METHOD_DELETE;args.headers=_1ca;dojo.rawXhrPost(args);}else{args.headers=_1ca;dojo.xhrDelete(args);}},_retrieveRawFeed:function(_1cb,_1cc){var _1cd=this._headers;_1cd["X-IBM-XHR"]=true;var me=this;dojo.xhrGet({url:this._feedURI,headers:_1cd,ibmMultipart:{context:com.ibm.mashups.enabler.io.XHRMultipartFactory.CONTEXT_ENABLER},load:function(data,_1ce){var xhr=_1ce.xhr;var xrd=xhr.getResponseHeader("X-Request-Digest");if(xrd!==null){com.ibm.mm.enabler.services.ModelRestServiceRequestStatic.setXRequestDigest(xrd);}if((me.logoutVerificationForRaw)&&(xhr.responseText)){var _1cf=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME).getValue(com.ibm.mashups.enabler.services.ConfigConstants.LOGOUT_VERIFICATION_REGEXP);if(_1cf){var _1d0=new RegExp(_1cf);if(_1d0&&(xhr.responseText.match(_1d0))){me._doLogin();return;}}}_1cb(com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD,data,_1ce.xhr,_1cc);},error:function(data,_1d1){var xhr=_1d1.xhr;var _1d2=xhr.status;if(_1d2==401){me._doLogin();return;}_1cb(com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR,data,_1d1.xhr,_1cc);},sync:this._sync,handleAs:this._handleAs});},_retrieve:function(_1d3,_1d4,_1d5,_1d6){var _1d7={};var mt="xml";if(dojo.isIE||window.ActiveXObject!==undefined){mt="text";}var _1d8=this._headers;_1d8["X-IBM-XHR"]=true;var me=this;var args={url:this._feedURI,content:_1d7,headers:_1d8,ibmMultipart:{context:com.ibm.mashups.enabler.io.XHRMultipartFactory.CONTEXT_ENABLER},load:function(_1d9,_1da){var data=_1d9;var xhr=_1da.xhr;var xrd=xhr.getResponseHeader("X-Request-Digest");if(xrd!==null){com.ibm.mm.enabler.services.ModelRestServiceRequestStatic.setXRequestDigest(xrd);}var _1db=xhr.getResponseHeader("Content-Type");if(typeof _1db!="undefined"&&_1db!==null&&_1db.indexOf("text/html")>=0){me._doLogin();return;}if(dojo.isIE||window.ActiveXObject!==undefined){var doc=com.ibm.mm.enabler.utils.Dom.createDocument(data);_1d3(com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD,doc,xhr,_1d4);}else{_1d3(com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD,data,xhr,_1d4);}},error:function(_1dc,_1dd){var data=_1dc;var xhr=_1dd.xhr;var _1de=xhr.status;if(_1de==401){me._doLogin();return;}if(dojo.isIE||window.ActiveXObject!==undefined){var doc=null;try{if(data){doc=com.ibm.mm.enabler.utils.Dom.createDocument(data);}}catch(e){}_1d3(com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR,doc,xhr,_1d4);}else{_1d3(com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR,data,xhr,_1d4);}},sync:this._sync,handleAs:mt};var _1df="Get";if(this._formNode){args.form=this._formNode;_1df="Post";}if(this._formFilter){args.formFilter=this._formFilter;}dojo["xhr"+_1df](args);},_updateCookie:function(){var dt=new Date();var _1e0={};_1e0.path=this._config.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTEXT_ROOT);dojo.cookie(this.MODIFICATION_COOKIE,dt.getTime(),_1e0);},_doLogin:function(){dojo["require"]("com.ibm.mashups.enabler.model.state.NavigationStateModelFactory");dojo["require"]("com.ibm.mashups.enabler.model.state.UrlGeneratorFactory");var pid=null;var url=document.location.href;var cb=function(url){if(url){top.location.href=url;}};var _1e1=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();com.ibm.mashups.enabler.model.state.UrlGeneratorFactory.getURLGenerator().getUrl(_1e1,cb,{nohash:"true"});},toString:function(){return this._feedURI;}});com.ibm.mm.enabler.services.ModelRestServiceRequestStatic={xRequestDigest:null,getXRequestDigest:function(){if((null===this.xRequestDigest)&&(ibmConfig["com.ibm.resolver.digest"])){this.xRequestDigest=ibmConfig["com.ibm.resolver.digest"];}return this.xRequestDigest;},setXRequestDigest:function(_1e2){this.xRequestDigest=_1e2;},invalidateXRequestDigest:function(){var dt=new Date();var _1e3=dt.getTime();this.setXRequestDigest(_1e3);var _1e4={};var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);_1e4.path=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTEXT_ROOT);dojo.cookie("modified.id",_1e3,_1e4);}};com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD="load";com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR="error";}if(!dojo._hasResource["com.ibm.mm.enabler.endpoints.XHREndpointExtensionImpl"]){dojo._hasResource["com.ibm.mm.enabler.endpoints.XHREndpointExtensionImpl"]=true;dojo.provide("com.ibm.mm.enabler.endpoints.XHREndpointExtensionImpl");dojo.declare("com.ibm.mm.enabler.endpoints.XHREndpointExtensionImpl",null,{LOG_LEVEL:com.ibm.mashups.enabler.logging.LogLevel.TRACE,constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_METHOD="dojo.xhrGet()";this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);this.originalDojoXHR=dojo.xhr;dojo.xhr=dojo.hitch(this,function(_1e5,args,_1e6){if(this.bIsLoggable){this.LOGGER.entering(this.LOG_METHOD,[args]);}var url=args.url;var url2=com.ibm.mm.enabler.EndpointUtils.checkForEndpoints(url);url2=url2||null;if(url2!==null){args.url=url2;}var ret=this.originalDojoXHR(_1e5,args,_1e6);if(this.bIsLoggable){this.LOGGER.exiting(this.LOG_METHOD);}return ret;});}});com.ibm.mm.enabler.endpoints.XHREndpointExtension=new com.ibm.mm.enabler.endpoints.XHREndpointExtensionImpl();}if(!dojo._hasResource["com.ibm.mm.enabler.services.ConfigServiceExtendedImpl"]){dojo._hasResource["com.ibm.mm.enabler.services.ConfigServiceExtendedImpl"]=true;dojo.provide("com.ibm.mm.enabler.services.ConfigServiceExtendedImpl");dojo.declare("com.ibm.mm.enabler.services.ConfigServiceExtendedImpl",[com.ibm.mm.enabler.services.ConfigServiceDefaultImpl],{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.services.ConfigServiceExtendedImpl");},_getConfigObject:function(_1e7){if(!ibmConfig["CO_"+_1e7]){var co=new com.ibm.mm.enabler.services.ConfigObjectExtendedImpl(_1e7,this);ibmConfig["CO_"+_1e7]=co;}return ibmConfig["CO_"+_1e7];},_getConfigProviderNames:function(){dojo["require"]("com.ibm.mashups.enabler.model.url.ModelUrlFactory");var ret=[];ret.push("all");var _1e8=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.CONFIG_URL,this);_1e8.setSchemeSpecificPart("/*");_1e8.setParameter("rep","compact");var _1e9=new com.ibm.mm.enabler.services.ModelRestServiceRequest(_1e8,null,null,false,true);var me=this;_1e9.read(function(type,data,xhr,args){var _1ea=com.ibm.mashups.enabler.xml.XPath.evaluateXPath("http://atom:entry/atom:id",data,me.ns);if(_1ea&&_1ea.length>0){for(var i=0,l=_1ea.length;i0){var _1fc=[];for(var ii=0,ll=_1fb.length;ii0){var _205=[];for(var ii=0,ll=_204.length;iithis.max_version)){_209=-1000;}_207[i]=_209;}var _20b=-1;var _20c=1000;for(i=0,scl=_207.length;i_20c){_20b=i;_20c=_207[i];}}if(_20b==-1){return null;}return this.cache[_20b];},_processCollection:function(i,node){var ret={};var _20d="app:categories//atom:category[@term]";var _20e=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(_20d,node,this.ns);var _20f=[];if(_20e){for(var jj=0,ll=_20e.length;jj0;i--){if(fn===this._dirtyCallbacks[i-1].fn){this._dirtyCallbacks.splice(i-1,1);break;}}}}});}if(!dojo._hasResource["com.ibm.mashups.enabler.DirtyFlagProvider"]){dojo._hasResource["com.ibm.mashups.enabler.DirtyFlagProvider"]=true;dojo.provide("com.ibm.mashups.enabler.DirtyFlagProvider");}if(!dojo._hasResource["com.ibm.mashups.enabler.Discardable_API"]){dojo._hasResource["com.ibm.mashups.enabler.Discardable_API"]=true;dojo.provide("com.ibm.mashups.enabler.Discardable_API");dojo.provide("com.ibm.mashups.enabler.Discardable");dojo.declare("com.ibm.mashups.enabler.Discardable",null,{discard:function(node){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.Discardable"]){dojo._hasResource["com.ibm.mashups.enabler.Discardable"]=true;dojo.provide("com.ibm.mashups.enabler.Discardable");}if(!dojo._hasResource["com.ibm.mashups.enabler.Identifiable"]){dojo._hasResource["com.ibm.mashups.enabler.Identifiable"]=true;dojo.provide("com.ibm.mashups.enabler.Identifiable");dojo.declare("com.ibm.mashups.enabler.Identifiable",null,{getID:function(){},getUniqueName:function(){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.Invalidatable_API"]){dojo._hasResource["com.ibm.mashups.enabler.Invalidatable_API"]=true;dojo.provide("com.ibm.mashups.enabler.Invalidatable_API");dojo.provide("com.ibm.mashups.enabler.Invalidatable");dojo.declare("com.ibm.mashups.enabler.Invalidatable",null,{invalidate:function(node){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.Invalidatable"]){dojo._hasResource["com.ibm.mashups.enabler.Invalidatable"]=true;dojo.provide("com.ibm.mashups.enabler.Invalidatable");}if(!dojo._hasResource["com.ibm.mashups.enabler.Locator"]){dojo._hasResource["com.ibm.mashups.enabler.Locator"]=true;dojo.provide("com.ibm.mashups.enabler.Locator");dojo.declare("com.ibm.mashups.enabler.Locator",null,{find:function(id){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ListModel"]){dojo._hasResource["com.ibm.mashups.enabler.ListModel"]=true;dojo.provide("com.ibm.mashups.enabler.ListModel");dojo.declare("com.ibm.mashups.enabler.ListModel",[com.ibm.mashups.enabler.model.Model,com.ibm.mashups.enabler.Locator],{iterator:function(){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ListModelController"]){dojo._hasResource["com.ibm.mashups.enabler.ListModelController"]=true;dojo.provide("com.ibm.mashups.enabler.ListModelController");dojo.declare("com.ibm.mashups.enabler.ListModelController",com.ibm.mashups.enabler.ListModel,{create:function(_22b){},confirmCreate:function(_22c){},insert:function(node,_22d){},confirmInsert:function(node,_22e){},remove:function(node){},confirmRemove:function(node){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.Localized_API"]){dojo._hasResource["com.ibm.mashups.enabler.Localized_API"]=true;dojo.provide("com.ibm.mashups.enabler.Localized_API");dojo.provide("com.ibm.mashups.enabler.Localized");dojo.declare("com.ibm.mashups.enabler.Localized",null,{getLocales:function(){},getTitle:function(_22f){},getTitles:function(){},getDescription:function(_230){},getDescriptions:function(_231){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ModifiableLocalized"]){dojo._hasResource["com.ibm.mashups.enabler.ModifiableLocalized"]=true;dojo.provide("com.ibm.mashups.enabler.ModifiableLocalized");dojo.declare("com.ibm.mashups.enabler.ModifiableLocalized",com.ibm.mashups.enabler.Localized,{setTitle:function(_232,_233){},confirmSetTitle:function(_234,_235){},removeTitle:function(_236){},confirmRemoveTitle:function(_237){},removeTitles:function(){},confirmRemoveTitles:function(){},setDescription:function(desc,_238){},confirmSetDescription:function(desc,_239){},removeDescription:function(_23a){},confirmRemoveDescription:function(_23b){},removeDescriptions:function(){},confirmRemoveDescriptions:function(){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.Localized"]){dojo._hasResource["com.ibm.mashups.enabler.Localized"]=true;dojo.provide("com.ibm.mashups.enabler.Localized");}if(!dojo._hasResource["com.ibm.mashups.enabler.Representation_API"]){dojo._hasResource["com.ibm.mashups.enabler.Representation_API"]=true;dojo.provide("com.ibm.mashups.enabler.Representation_API");dojo.provide("com.ibm.mashups.enabler.Representation");dojo.declare("com.ibm.mashups.enabler.Representation",com.ibm.mashups.enabler.Identifiable,{getID:function(){},getURL:function(){},getMimeType:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.RepresentationImpl"]){dojo._hasResource["com.ibm.mm.enabler.RepresentationImpl"]=true;dojo.provide("com.ibm.mm.enabler.RepresentationImpl");dojo.declare("com.ibm.mm.enabler.RepresentationImpl",com.ibm.mashups.enabler.Representation,{constructor:function(url,type){this.url=url;this.type=type;},getID:function(){return this.type;},getURL:function(){return this.url;},getMimeType:function(){return this.type;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.Representation"]){dojo._hasResource["com.ibm.mashups.enabler.Representation"]=true;dojo.provide("com.ibm.mashups.enabler.Representation");}if(!dojo._hasResource["com.ibm.mashups.enabler.RepresentationProvider_API"]){dojo._hasResource["com.ibm.mashups.enabler.RepresentationProvider_API"]=true;dojo.provide("com.ibm.mashups.enabler.RepresentationProvider_API");dojo.provide("com.ibm.mashups.enabler.RepresentationProvider");dojo.declare("com.ibm.mashups.enabler.RepresentationProvider",null,{getAlternateModel:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.RepresentationModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.RepresentationModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.RepresentationModelImpl");dojo.declare("com.ibm.mm.enabler.RepresentationModelImpl",[com.ibm.mashups.enabler.ListModel,com.ibm.mm.enabler.DeferredIteratorImpl],{constructor:function(_23c){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.loadedNodes={};this.entries=[];this.cursor=0;this.size=null;this.start=null;this.num=null;this.strategy=null;if(_23c&&_23c.length>0){this.size=_23c.length;for(var i=0;i<_23c.length;i++){var link=_23c[i];var url=link.getAttribute("href");var _23d=link.getAttribute("type");var uri=_23d;var node=new com.ibm.mm.enabler.RepresentationImpl(url,_23d);this.entries[i]=uri;this.loadedNodes[uri]=node;}}},find:function(uri){return new com.ibm.mm.enabler.DeferredImpl(this,this._find,uri);},_find:function(_23e,sync,uri){return this._load(uri,_23e,sync);},start:function(sync){while(this._hasNext(this,sync)){if(this._next(this,sync)){continue;}else{break;}}},hasNext:function(){return this._hasNext(null,true);},_hasNext:function(_23f,sync){if(this.start===null||this.cursor=(this.start+this.num)&&(this.size>this.cursor))){this._loadAhead(_23f,sync);}return (this.size>this.cursor);},next:function(){return this._next(null,true);},_next:function(_240,sync){return this._hasNext(_240,sync)?this.loadedNodes[this.entries[this.cursor++]]:null;},size:function(){return this.size;},setCursorPosition:function(_241){this.cursor=_241;},getCursorPosition:function(){return this.cursor;},setStrategy:function(_242){if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(_242,Array)){this.strategy=_242[0];}else{this.strategy=_242;}},_load:function(uri,_243,sync){var _244="_load";var _245=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_245){this.LOGGER.entering(_244,arguments);}if(uri in this.loadedNodes){if(_243){_243.finish(this.loadedNodes[uri],com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}}if(_245){this.LOGGER.exiting(_244,this.loadedNodes[uri]);}return this.loadedNodes[uri];},_loadAhead:function(_246,sync){}});}if(!dojo._hasResource["com.ibm.mm.enabler.RepresentationProviderImpl"]){dojo._hasResource["com.ibm.mm.enabler.RepresentationProviderImpl"]=true;dojo.provide("com.ibm.mm.enabler.RepresentationProviderImpl");dojo.declare("com.ibm.mm.enabler.RepresentationProviderImpl",com.ibm.mashups.enabler.RepresentationProvider,{constructor:function(){this.serviceJson=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_NAVIGATION);var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.r_ns=dojo.delegate(this.serviceJson.namespaces,nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_XML]));this.XPATH="atom:link";},getAlternateModel:function(){var _247=[];var md=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.XPATH,this.xmlData,this.r_ns);if(md&&md.length>0){for(var i=0,l=md.length;i0){if(i#%{}|\\^~[]`\"Z",constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);},isUnsafeChar:function(_2a9){if(this.UNSAFE_CHARS.indexOf(_2a9)>-1||_2a9.charCodeAt(0)<=32||_2a9.charCodeAt(0)>=123){return true;}return false;},zEncode:function(_2aa){var _2ab="";for(var i=0;i<_2aa.length;++i){var _2ac=_2aa.charAt(i);if(!this.isUnsafeChar(_2ac)){_2ab+=_2ac;continue;}_2ab+=this.zEncodeChar(_2ac);}return _2ab;},zEncodeChar:function(_2ad){var _2ae="Z";return _2ae+this.byteToHex(_2ad.charCodeAt(0));},byteToHex:function(_2af){var _2b0=Math.floor(_2af/16);var _2b1=_2af%16;return this.HEX_CHARS[_2b0]+this.HEX_CHARS[_2b1];},zDecode:function(_2b2){var _2b3="";var _2b4="Z";if(_2b2.indexOf(_2b4)!=-1){for(var i=0,l=_2b2.length;i0){_2ba.dwords.push(_2ba.dword);len+=((_2ba.bits+7)>>3);_2ba.bits=0;}return this._encodeBase64(_2ba.dwords,0,len);},_initStream:function(_2bb){_2bb.dword=0;_2bb.mask=1;_2bb.bits=0;_2bb.dwords=[];return _2bb;},_addBits:function(_2bc,data){var mask=_2bc.mask,_2bd=_2bc.dword,bits=_2bc.bits;var len=data.length,off=0;while(len>0){var copy=Math.min(len,32-bits);for(var i=0;i>2;var _2c0=off&3;var _2c1=data[_2bf++],_2c2;var c1,c2,c3,c4;var _2c3="";for(var i=len;i>0;i-=3){switch(_2c0){case 0:c1=((_2c1>>2)&63);c2=((_2c1<<4)&48)|((_2c1>>12)&15);c3=((_2c1>>6)&60)|((_2c1>>22)&3);c4=((_2c1>>16)&63);_2c0=3;break;case 1:c1=((_2c1>>10)&63);c2=((_2c1>>4)&48)|((_2c1>>20)&15);c3=((_2c1>>14)&60)|((_2c1>>30)&3);c4=((_2c1>>24)&63);_2c0=0;_2c1=data[_2bf++];break;case 2:_2c2=data[_2bf++];c1=((_2c1>>18)&63);c2=((_2c1>>12)&48)|((_2c1>>28)&15);c3=((_2c1>>22)&60)|((_2c2>>6)&3);c4=(_2c2&63);_2c1=_2c2;_2c0=1;break;case 3:_2c2=data[_2bf++];c1=((_2c1>>26)&63);c2=((_2c1>>20)&48)|((_2c2>>4)&15);c3=((_2c2<<2)&60)|((_2c2>>14)&3);c4=((_2c2>>8)&63);_2c1=_2c2;_2c0=2;break;}switch(i){case 1:c3=64;c4=64;break;case 2:c4=64;break;}_2c3+=ab.charAt(c1);_2c3+=ab.charAt(c2);_2c3+=ab.charAt(c3);_2c3+=ab.charAt(c4);}return _2c3;},_decodeBase64:function(_2c4){var ab=this.URL_ALPHABET;var len=_2c4.length/4;var i=0;var _2c5=[];for(var j=0;j>4);c2=((indexC2&15)<<4)|(indexC3>>2);c3=((indexC3&3)<<6)|indexC4;_2c5.push(c1);switch(_2c6){case 0:_2c5.push(c2);_2c5.push(c3);break;case 1:_2c5.push(c2);break;case 2:break;}}return _2c5;},_frequencyCompare:function(n1,n2){return n1.frequency-n2.frequency;},_initTree:function(_2c7,node,_2c8){if(node.left&&node.right){this._addBit(_2c7,1);this._initTree(_2c7,node.left,_2c8.concat(0));this._initTree(_2c7,node.right,_2c8.concat(1));}else{this._addBit(_2c7,0);node.prefix=_2c8;_2c7.tokens.push(node.name);}return _2c7;},_dumpTokens:function(tree,_2c9){var _2ca=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_2ca){for(var i=0;i=0;--i){var _2cd=_2cb[i];node=_2cc[_2cd];if(node){node.frequency++;}else{node={frequency:1,name:_2cd};_2cc[_2cd]=node;}}var _2ce=[];for(node in _2cc){if(Object.prototype.hasOwnProperty.call(_2cc,node)){_2ce.push(_2cc[node]);}}_2ce.sort(this._frequencyCompare);while(_2ce.length>1){var left=_2ce.shift(),_2cf=_2ce.shift();_2ce.push({frequency:left.frequency+_2cf.frequency,left:left,right:_2cf});_2ce.sort(this._frequencyCompare);}var root=_2ce[0];var tree=this._initTree(this._initStream({tokens:[]}),_2ce.shift(),[]);this._dumpTokens(tree,_2cc);var url=this._encodeStream(tree);len=tree.tokens.length;for(i=0;i=0)&&(i1>=0)){var _2d6=this._decodeBase64(tree.substring(0,i0));var _2d7=tree.substring(i0+1,i1).split("/");var _2d8=this._decodeBase64(tree.substring(i1+1));encodedTokens=this._decodeTokens(_2d7);var root=this._readStructure(this._convertBitToChar(_2d6),encodedTokens);var _2d9=this._convertBitToChar(_2d8);var _2da="";while(_2d9.length>0){_2da=this._buildData(_2da,_2d9,root);}return _2da;}return null;},_buildData:function(_2db,_2dc,root){var _2dd=false;var node=null;while(!_2dd){var bit=_2dc.shift();if(typeof bit=="undefined"){node=null;break;}node=this._getNode(bit,root);if(node&&node.token&&node.token){_2dd=true;}else{if(!node){_2dd=true;}}root=node;}if(_2dd&&node){_2db=_2db.concat(node.token);}return _2db;},_getNode:function(bit,_2de){var node=null;node=(bit==1)?_2de.right:_2de.left;if(!node){return null;}return node;},_convertBitToChar:function(_2df){var arr=[];var mask=1;var bit=0;for(var i=0;i<_2df.length;i++){var _2e0=_2df[i];for(var j=0;j<8;j++){bit=_2e0&mask;arr.push(bit);_2e0=(_2e0>>1);}}return arr;},_readStructure:function(_2e1,_2e2){var bit=_2e1.shift();var node={};if(bit==1){node.left=this._readStructure(_2e1,_2e2);node.right=this._readStructure(_2e1,_2e2);}else{var _2e3=_2e2.shift();node.token=_2e3;}return node;},_decodeTokens:function(_2e4){var arr=[];for(var i in _2e4){if(Object.prototype.hasOwnProperty.call(_2e4,i)){arr.push(com.ibm.mm.enabler.encode.huffman.ZEncoder.zDecode(_2e4[i]));}}return arr;}});com.ibm.mm.enabler.encode.huffman.HuffmanURL=new com.ibm.mm.enabler.encode.huffman.HuffmanURL();}if(!dojo._hasResource["com.ibm.mm.enabler.ArrayMap"]){dojo._hasResource["com.ibm.mm.enabler.ArrayMap"]=true;dojo.provide("com.ibm.mm.enabler.ArrayMap");dojo.declare("com.ibm.mm.enabler.ArrayMap",null,{constructor:function(){this.entries=[];this.keys={};},values:function(){return this.entries;},put:function(key,_2e5){var _2e6=this.keys[key];if(typeof _2e6!="undefined"&&_2e6!==null){this.entries[_2e6]=_2e5;}else{_2e6=this.entries.length;this.entries.push(_2e5);this.keys[key]=_2e6;}},getKey:function(_2e7){if(_2e7=400){if(this.error){this.error(new Error(_2f6.xhr.status+": "+_2f7.URI),_2f6,_2f7);}}else{if(this.load){this.load(_2f5,_2f6,_2f7);}}}if(this.handle){this.handle(_2f5,_2f6,_2f7);}}catch(err){try{if(this.error){this.error(_2f5,_2f6,_2f7);}}catch(err2){}}});work();},_handleMultiPartResponse:function(_2f8,_2f9,_2fa,_2fb,_2fc){var _2fd=_2fc.xhr.getResponseHeader("Content-Type");var _2fe=_2fd.match(_2fa.boundaryRegx);if(!_2fe){throw new Error("No boundary specified in Content-Type response header");}var _2ff=_2fe[1];var _300=_2ff.indexOf(";");if(_300!=-1){_2ff=_2ff.substring(0,_300);}var _301=new RegExp(_2fa.newL+_2fa.sep+_2ff,"mg");var _302=_2fb.split(_301);var _303=null;if(_2f9){_303=new com.ibm.mm.enabler.io.XHRMultipartImpl();_303.startTransaction();}var i=1;for(var _304 in _2f8){if(Object.prototype.hasOwnProperty.call(_2f8,_304)){var _305=_2f8[_304];for(var x=0,l=_305.length;x0)){if(-1==_308[1].indexOf(":")){continue;}if(-1==_308[1].indexOf("digest=")){var _30b=_308[1].match(_2fa.headerPartsRegx);_307[_30b[1]]=_30b[2];if(_30b[1]=="X-Status-Code"){_309=_30b[2];}else{if(_30b[1]=="Content-Type"){_2fd=_30b[2];}else{if(_30b[1]=="Content-Language"){_30a=_30b[2];}}}}}part=dojo.string.trim(part.substr(_2fa.headerRegx.lastIndex+_2fa.newL.length));var _30c="";var _30d="";var _30e=parseInt(_309,10);if(_30e<400){_30d=part;if(_306.handleAs=="xml"){_30c=com.ibm.mm.enabler.utils.Dom.createDocument(part);}else{_30c=dojo.contentHandlers[_306.handleAs]({responseText:part});}}else{if(_2fd&&_2fd.indexOf(this.CONTENT_TYPE_SOAP)===0){var _30f=com.ibm.mm.enabler.utils.Dom.createDocument(part);var _310="env:Fault/env:Reason/env:Text/@xml:lang";var _311=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(_310,_30f,this.ns);if(!_30a){_30a=_2fc.xhr.getResponseHeader("Content-Language");}var _312=null;if(_30a&&_311){var _313=dojo.map(_311,function(node){return node.textContent;});_312=com.ibm.mm.enabler.utils.LocaleHelper.matchLocale(_30a,_313);}var expr="env:Fault/env:Reason/env:Text";if(_312){expr+="[@xml:lang='"+_312+"']";}var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,_30f,this.ns);if(node){_30d=com.ibm.mm.enabler.utils.Dom.textContent(node);_30c=_30d;}}}var _314=new com.ibm.mm.enabler.io.XHRWrapper(_2fc,_30d,_30e,_2fd,_307);var xhr=_2fc.xhr;_2fc.xhr=_314;_2fa._partHandler(_306,_30c,_2fc,_307);_2fc.xhr=xhr;}}}if(_2f9){var _315=false;if(_2fc&&_2fc["com.ibm.mm.Multipart.forceOnNextResponse"]){_315=_2fc["com.ibm.mm.Multipart.forceOnNextResponse"];}_303.endTransactionDeferred(_315).start();}},_multiPartXhr:function(_316,args,_317,_318){var body="";var _319=null;for(var _31a in _317){if(Object.prototype.hasOwnProperty.call(_317,_31a)){for(var _31b in _317[_31a]){if(Object.prototype.hasOwnProperty.call(_317[_31a],_31b)){var part=_317[_31a][_31b];part.handleAs=part.handleAs?part.handleAs.toLowerCase():"text";_319="";for(var x in part.headers){if(Object.prototype.hasOwnProperty.call(part.headers,x)){_319+=x+": "+part.headers[x]+this.newL;}}body+=this.startB+_319+this.newL;if(part.data&&part.data.length>1){body+=part.data+this.newL;}else{if(part.postData&&part.postData.length>1){body+=part.postData+this.newL;}else{if(part.putData&&part.putData.length>1){body+=part.putData+this.newL;}}}}}}}body+=this.endB;if(_316.toUpperCase()!="PUT"){_316="POST";}var me=this;var _31c;var _31d=dojo.mixin({},args,{load:function(_31e,_31f){me._handleMultiPartResponse(_317,_318,me,_31e,_31f);_31c=_31f.xhr.status;},error:function(_320,_321){for(var part in _317){for(var x=0,l=part.length;xthis.urlMaxLength){if(!this.splitTransactions){if(_33b){this.LOGGER.trace(_33a,"url is too long, falling back to POST");}_33c=this._doMultipartPOSTRequest(this.method,_339,this.multipartParts);}else{if(_33b){this.LOGGER.trace(_33a,"url is too long, split transactions is enabled");}_33c=this._doMultipartGETSplitRequest(_339,url);}}else{_33c=this._doMultipartGETRequest(url,_339);}}else{_33c=this._doMultipartPOSTRequest(this.method,_339,this.multipartParts);}return _33c;},_doMultipartGETSplitRequest:function(_33d,_33e){var urls=[];for(var url in _33d){urls.push(url);}if(urls.length==0){return 200;}var _33f;if(!_33e){_33f=this._createHuffmanUrl(_33d);}else{_33f=_33e;}if(_33f.length<=this.urlMaxLength||urls.length==1){return this._doMultipartGETRequest(_33f,_33d);}var half=Math.round(urls.length/2);var left={};for(var i=0;i_342?_340:_342;},_doMultipartGETRequest:function(url,_343){var me=this;xhrArgs={url:url,load:function(_344,_345){me._handleMultiPartResponse(_343,me.multipartParts,me,_344,_345);status=_345.xhr.status;},error:function(_346,_347){for(var part in _343){for(var x=0,l=part.length;x_34a){_34a=_34b;}}}else{var _34c={};var pub=_349[this.SCOPE_PUBLIC];for(var part in pub){if(Object.prototype.hasOwnProperty.call(pub,part)){for(var i=0,l=pub[part].length;i_354){_354=_355;}}}}else{var _357=this.partsArray;_354=this._loadPartsArray(_357);}if(_354!==0&&_34e){_34e(_34f);}if(_351){this.LOGGER.exiting(_350);}},endTransactionDeferred:function(_358){if(typeof _358!=="undefined"&&true===_358){this.multipartParts=true;}return new com.ibm.mm.enabler.DeferredOperationImpl(this,this._endTransaction);},_endTransaction:function(_359,sync){var _35a="_endTransaction(deferred, sync)";var _35b=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_35b){this.LOGGER.entering(_35a,[_359,sync]);}if(!this.doMultipart){if(_35b){this.LOGGER.exiting(_35a);}return;}this._release();if(0_35d){_35d=tmpStatus;}}}}else{var _35f=this.partsArray;_35d=this._loadPartsArray(_35f);}if(_35d!==0&&_359){var _360=_359.getOperationCallback();if(_360){_360(id,com.ibm.mashups.enabler.DeferredOperation.OPERATION_GET,xhr.status,myDeferred.getOperationCallbackParameters());}}if(_35b){this.LOGGER.exiting(_35a);}},_doMultipartPOSTRequest:function(_361,_362,_363){var _364=this._processMultipartBody(_362);this._initServiceDoc();var _365;if(_364){_365={url:this.serviceCHJson.url,sync:true};}else{_365={url:this.serviceMPJson.url,sync:true};}var _366=this._multiPartXhr(_361,_365,_362,_363);return _366;},_assocArraySize:function(_367){var size=0;for(var x in _367){if(Object.prototype.hasOwnProperty.call(_367,x)){size++;}}return size;},_addToPartsArray:function(_368,args){var _369=_368[args.url];if(!_369){_368[args.url]=[];_368[args.url][0]=args;}else{_369[_369.length]=args;}},_acquire:function(){this.statics.semaphore++;},_release:function(_36a,_36b){this.statics.semaphore--;},_createPocURI:function(args){var _36c="_createPocURI(args)";var _36d=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_36d){this.LOGGER.entering(_36c,args);}var url=args.url;var _36e=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME).getValue(com.ibm.mashups.enabler.services.ConfigConstants.PROXY_URL);var _36f=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME).getValue(com.ibm.mashups.enabler.services.ConfigConstants.LOCALAPPS_REGEX);_36e+="/http/";if(url.indexOf(_36e)===0){var _370="http://";var _371=url.indexOf("/",_36e.length+1);if(_371>-1){_370+=unescape(url.substring(_36e.length,_371));_370+=url.substring(_371);}else{_370="http://"+url.substring(_36e.length);}url=_370;}var _372=new com.ibm.mm.enabler.utils.HttpUrl(url);var _373=this._extractDigest(_372,url);if(_373){if(null===this.digest&&false===this.replaceDigest){this.replaceDigest=true;}else{if(_373!==this.digest){this.replaceDigest=false;}}this.digest=_373;}else{this.digest="";this.replaceDigest=false;}if(args.content){for(var name in args.content){if(Object.prototype.hasOwnProperty.call(args.content,name)){var _374=args.content[name];_372.addParameter(name,_374);}}}var uri="";var _375=_372.isProxyNeeded();var _376=null;if(_36f){_376=new RegExp(_36f);}if((_375)||(_376&&(url.match(_376)))){uri=_372.toString();}else{var _377=(args.method)?args.method.toLowerCase():null;if(_377&&!this.useSinkForModRequests&&(_377=="post"||_377=="put"||_377=="delete")){uri=_372.getParameter("uri");}else{uri="res:"+_372.toServerRelativeString();}}if(_36d){this.LOGGER.trace(_36c,"proxy? ${0}: ${1}",[_375,uri]);}if(_36d){this.LOGGER.exiting(_36c,uri);}return uri;},_processMultipartBody:function(_378){var _379="_processMultipartBody(parts)";var _37a=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_37a){this.LOGGER.entering(_379,_378);}var _37b=false;for(var w in _378){if(Object.prototype.hasOwnProperty.call(_378,w)){for(var x in _378[w]){if(Object.prototype.hasOwnProperty.call(_378[w],x)){var args=_378[w][x];var uri=this._createPocURI(args);var _37c=uri;args.headers=dojo.mixin({},args.headers,{"X-Method-Override":args.method,"Content-ID":_37c});if("GET"!==args.method){_37b=true;}}}}}if(_37a){this.LOGGER.exiting(_379,_37b);}return _37b;},_createSiteMap:function(_37d){var _37e="_createSiteMap(parts)";var _37f=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_37f){this.LOGGER.entering(_37e,_37d);}var cxml="";for(var w in _37d){if(Object.prototype.hasOwnProperty.call(_37d,w)){var args=_37d[w][0];args.handleAs=args.handleAs?args.handleAs.toLowerCase():"text";var uri=this._createPocURI(args).replace(//g,">").replace(/&/g,"&");cxml+="";}}cxml+="";if(_37f){this.LOGGER.exiting(_37e,cxml);}return cxml;},_extractDigest:function(_380,url){var _381="_extractDigest(httpUrl, url)";var _382=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_382){this.LOGGER.entering(_381,[_380,url]);}var _383;var _384=_380.getParameter("digest");if(!_384){var _385=url.indexOf("digest!");if(0<_385){_385+=7;var end=url.indexOf("/",_385);_383=url.substring(_385,end);}if(_382){this.LOGGER.trace(_381,"digest portal style - ${0}",_383);}}else{_383=_384;}if(_382){this.LOGGER.exiting(_381,_383);}return _383;},_updateDigest:function(url){var _386="_updateDigest(url)";var _387=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_387){this.LOGGER.entering(_386,url);}if(!this.replaceDigest){if(_387){this.LOGGER.trace(_386,"this.replaceDigest is false, returning");this.LOGGER.exiting(_386,url);}return url;}var _388;var end;var _389=url.indexOf("digest!");if(0<_389){_389+=7;end=url.indexOf("/",_389);_388=url.substring(_389,end);}else{if(!_388){_389=url.indexOf("digest=");if(0<_389){_389+=7;end=url.indexOf("&",_389);if(-1===end){_388=url.substring(_389);}else{_388=url.substring(_389,end);}}}}if(_387){this.LOGGER.trace(_386,"extracted digest - ${0}",_388);}var _38a=url;if(_388){_38a=url.replace(_388,this.digest);}if(_387){this.LOGGER.exiting(_386,_38a);}return _38a;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.io.XHRMultipart"]){dojo._hasResource["com.ibm.mashups.enabler.io.XHRMultipart"]=true;dojo.provide("com.ibm.mashups.enabler.io.XHRMultipart");}if(!dojo._hasResource["com.ibm.mashups.enabler.io.XHRMultipartFactory_API"]){dojo._hasResource["com.ibm.mashups.enabler.io.XHRMultipartFactory_API"]=true;dojo.provide("com.ibm.mashups.enabler.io.XHRMultipartFactory_API");dojo.provide("com.ibm.mashups.enabler.io.XHRMultipartFactory");dojo.declare("com.ibm.mashups.enabler.io.XHRMultipartFactory",null,{create:function(){},isMultipartEnabled:function(){},isMultipartApplicationWidgets:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.io.XHRMultipartFactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.io.XHRMultipartFactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.io.XHRMultipartFactoryImpl");dojo.declare("com.ibm.mm.enabler.io.XHRMultipartFactoryImpl",[com.ibm.mashups.enabler.io.XHRMultipartFactory,com.ibm.mm.enabler.ServiceDocConsumer],{constructor:function(){this._init=false;this.serviceMPJson=null;this.doMultipart=false;var _38b=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _38c=_38b.getValue(com.ibm.mashups.enabler.services.ConfigConstants.PAGE_LOAD_OPTIMIZATION_APP_WIDGETS);this.multipartAppWidgets=false;if(typeof (_38c)=="undefined"||_38c===null||_38c===true){this.multipartAppWidgets=true;}this.CONTEXT_ENABLER="enabler";},_initServiceDoc:function(){this.inherited("_initServiceDoc",arguments);if(dojo.exists("com.ibm.mm.enabler.model.ServiceDocumentModel")){this.serviceMPJson=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData([com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_MODEL,com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_MULTIPART]);}if(this.serviceMPJson&&this.serviceMPJson.url){this.doMultipart=true;}},create:function(){return new com.ibm.mm.enabler.io.XHRMultipartImpl();},isMultipartEnabled:function(){if(!this._init){this._init=true;var _38d=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _38e=_38d.getValue(com.ibm.mashups.enabler.services.ConfigConstants.MULTIPART_ENABLED);if(dojo.isIE!=6&&_38e){this._initServiceDoc();}}return this.doMultipart;},isMultipartApplicationWidgets:function(){return this.multipartAppWidgets;}});com.ibm.mashups.enabler.io.XHRMultipartFactory=new com.ibm.mm.enabler.io.XHRMultipartFactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.io.XHRMultipartFactory"]){dojo._hasResource["com.ibm.mashups.enabler.io.XHRMultipartFactory"]=true;dojo.provide("com.ibm.mashups.enabler.io.XHRMultipartFactory");dojo.require("com.ibm.mm.enabler.io.XHRMultipartFactoryImpl");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.Accessor"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.Accessor"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.Accessor");dojo.declare("com.ibm.mashups.enabler.model.state.Accessor",null,{});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.PageAccessor_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.PageAccessor_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.PageAccessor_API");dojo.provide("com.ibm.mashups.enabler.model.state.PageAccessor");dojo.declare("com.ibm.mashups.enabler.model.state.PageAccessor",[com.ibm.mashups.enabler.model.state.Accessor],{getPageID:function(){},setPageID:function(_38f){},confirmSetPageID:function(_390){return true;}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.PageAccessorImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.PageAccessorImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.PageAccessorImpl");dojo.declare("com.ibm.mm.enabler.model.state.PageAccessorImpl",[com.ibm.mashups.enabler.model.state.PageAccessor],{constructor:function(_391,_392){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);if(this.bIsLoggable){this.LOGGER.entering("constructor");this.LOGGER.trace("constructor","spaceId:"+_392);}this.navStateModel=_391;if(_392){this.spaceid=_392;}},getPageID:function(){var _393=this.navStateModel._state;var rc=null;if(!_393){return null;}if(!this.spaceid){if(_393.pid){if(this.bIsLoggable){this.LOGGER.trace("getPageID","No required pace is defined, return Pageid"+_393.pid.value);}return _393.pid.value;}if(this.bIsLoggable){this.LOGGER.trace("getPageID","No required space is defined, no pid is defined in state return null");}return null;}else{if(_393.pageselection&&_393.pageselection[this.spaceid]){if(this.bIsLoggable){this.LOGGER.trace("getPageID","return pid:"+_393.pageselection[this.spaceid]+" for space:"+this.spaceid);}return _393.pageselection[this.spaceid].value;}if(this.bIsLoggable){this.LOGGER.trace("getPageID","No page is found for required space "+this.spaceid+" return null");}return null;}if(this.bIsLoggable){this.LOGGER.trace("getPageID","return null");}return null;},setPageID:function(_394){if(this.bIsLoggable){this.LOGGER.trace("setPageID","pageId:"+_394);}var _395=this.navStateModel._state;if(!_395){this.navStateModel._state={};_395=this.navStateModel._state;}if(!_394){_395.pid=null;if(this.spaceid){if(_395.pageselection&&_395.pageselection[this.spaceid]){_395.pageselection[this.spaceid]=null;}}this.navStateModel.setDirty(true,"pid");return;}var lm=new Date().getTime();_395.pid=_395.pid?_395.pid:{};_395.pid.value=_394;_395.pid.params=_395.pid.params?_395.pid.params:{};_395.pid.params.lm=lm;if(this.spaceid){if(!_395.pageselection){_395.pageselection={};}if(!_395.pageselection[this.spaceid]){_395.pageselection[this.spaceid]={};}_395.pageselection[this.spaceid].value=_394;_395.pageselection[this.spaceid].params=_395.pageselection[this.spaceid].params?_395.pageselection[this.spaceid].params:{};_395.pageselection[this.spaceid].params.lm=lm;}this.navStateModel.setDirty(true,"pid");}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.PageAccessor"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.PageAccessor"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.PageAccessor");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.SpaceAccessor_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.SpaceAccessor_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.SpaceAccessor_API");dojo.provide("com.ibm.mashups.enabler.model.state.SpaceAccessor");dojo.declare("com.ibm.mashups.enabler.model.state.SpaceAccessor",[com.ibm.mashups.enabler.model.state.Accessor],{getSpaceID:function(){},setSpaceID:function(_396){},confirmSetSpaceID:function(_397){return true;}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.SpaceAccessorImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.SpaceAccessorImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.SpaceAccessorImpl");dojo.declare("com.ibm.mm.enabler.model.state.SpaceAccessorImpl",[com.ibm.mashups.enabler.model.state.SpaceAccessor],{constructor:function(_398){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);if(this.bIsLoggable){this.LOGGER.entering("constructor");}this.navStateModel=_398;},getSpaceID:function(){var _399=this.navStateModel._state;if(!_399){return null;}if(_399.sid&&_399.sid.value){if(this.bIsLoggable){this.LOGGER.trace("getSpaceID","sid:"+_399.sid.value);}return _399.sid.value;}if(this.bIsLoggable){this.LOGGER.trace("getSpaceID","sid:null");}return null;},_setSpaceIDInternal:function(_39a){var _39b=this.navStateModel._state;if(!_39b){this.navStateModel._state={};_39b=this.navStateModel._state;}var lm=new Date().getTime();if(typeof _39a=="undefined"){_39b.sid={};}else{_39b.sid=_39b.sid?_39b.sid:{};_39b.sid.value=_39a;_39b.sid.params=_39b.sid.params?_39b.sid.params:{};_39b.sid.params.lm=lm;}if(_39b.pid){_39b.pid=null;}},setSpaceID:function(_39c){if(this.bIsLoggable){this.LOGGER.trace("setSpaceID","sid:"+_39c);}this._setSpaceIDInternal(_39c);this.navStateModel.setDirty(true,"sid");}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.SpaceAccessor"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.SpaceAccessor"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.SpaceAccessor");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.WidgetAccessor_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.WidgetAccessor_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.WidgetAccessor_API");dojo.provide("com.ibm.mashups.enabler.model.state.WidgetAccessor");dojo.declare("com.ibm.mashups.enabler.model.state.WidgetAccessor",[com.ibm.mashups.enabler.model.state.Accessor],{constructor:function(_39d,id){},getWidgetID:function(){},getWidgetStateValues:function(key){},getWidgetState:function(key){},setWidgetState:function(key,_39e){},confirmSetWidgetState:function(key,_39f){return true;},setWidgetState:function(key,_3a0){},confirmSetWidgetState:function(key,_3a1){return true;},removeWidgetState:function(key){},confirmRemoveWidgetState:function(key){return true;},getWidgetStateNames:function(){},getWidgetMode:function(){},setWidgetMode:function(mode){},confirmSetWidgetMode:function(mode){return true;},getWindowState:function(){},setWindowState:function(_3a2){},confirmSetWindowState:function(_3a3){return true;},getSize:function(){},setSize:function(_3a4,_3a5){},confirmSetSize:function(_3a6,_3a7){return true;},MIN:"minimize",MAX:"maximize",NORMAL:"normal"});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.WidgetAccessorImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.WidgetAccessorImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.WidgetAccessorImpl");dojo.declare("com.ibm.mm.enabler.model.state.WidgetAccessorImpl",[com.ibm.mashups.enabler.model.state.WidgetAccessor],{constructor:function(_3a8,id){this.navStateModel=_3a8;this.wid=id;this.uniqueWid=this._getUniqueWid();this.widgetNavStateNode=_3a8._find(this.WIDGET_PREFIX+this.navStateModel.DELIMITER+this.uniqueWid);if(this.wid!=this.uniqueWid&&!this.widgetNavStateNode){this.widgetNavStateNodeFallback=_3a8._find(this.WIDGET_PREFIX+this.navStateModel.DELIMITER+this.wid);}},WIDGET_PREFIX:"wparams",WIDTH:"w",HEIGHT:"h",WINDOWSTATE:"st",SYSTEMSTATE:"rp",CUSTOMSTATE:"cp",VALUE:"value",PARAMS:"params",MODE:"md",RP:{w:"w",h:"h",st:"st",md:"md"},VIEW:"view",getWidgetID:function(){return this.wid;},_getUniqueWid:function(){return this.navStateModel._getUniqueWid(this.wid);},getWidgetStateSet:function(){var _3a9=null;if(!this.widgetNavStateNode&&!this.widgetNavStateNodeFallback){return null;}var _3aa=this.widgetNavStateNode;if(!_3aa){_3aa=this.widgetNavStateNodeFallback;}var data=_3aa.getRef();if(data&&data[this.VALUE]){if(data[this.VALUE][this.CUSTOMSTATE]){_3a9=data[this.VALUE][this.CUSTOMSTATE];}}if(_3a9&&!dojo.isString(_3a9)){_3a9=dojo.toJson(_3a9);}return _3a9;},_createWidgetNavStateNode:function(){var _3ab=this.navStateModel.create({key:this.uniqueWid});var _3ac=this.navStateModel._find(this.WIDGET_PREFIX);if(!_3ac){var temp=this.navStateModel.create({key:this.WIDGET_PREFIX});this.navStateModel.insert(temp,this.navStateModel._getRoot());_3ac=this.navStateModel._find(this.WIDGET_PREFIX);}this.navStateModel.insert(_3ab,_3ac);_3ab=this.navStateModel._find(this.WIDGET_PREFIX+this.navStateModel.DELIMITER+this.uniqueWid);return _3ab;},setWidgetStateSet:function(_3ad){var _3ae=null;if(dojo.isString(_3ad)){try{_3ad=dojo.fromJson(_3ad);}catch(e){}}if(!this.widgetNavStateNode){this.widgetNavStateNode=this._createWidgetNavStateNode();}var data=this.widgetNavStateNode.getRef();data.params=data.params?data.params:{};data.params.lm=new Date().getTime();if(data&&data[this.VALUE]){if(data[this.VALUE][this.CUSTOMSTATE]){_3ae=dojo.clone(data[this.VALUE][this.CUSTOMSTATE]);}}data[this.VALUE]=data[this.VALUE]?data[this.VALUE]:{};var obj=_3ad;if(_3ae&&!dojo.isString(_3ae)&&!dojo.isString(_3ad)){obj=dojo.mixin(_3ae,_3ad);}data[this.VALUE][this.CUSTOMSTATE]=obj;this.navStateModel.setDirty(true);return this;},_getWidgetSystemState:function(key){var _3af=null;if(!this.widgetNavStateNode&&!this.widgetNavStateNodeFallback){return null;}var _3b0=this.widgetNavStateNode;if(!_3b0){_3b0=this.widgetNavStateNodeFallback;}var data=_3b0.getRef();if(data&&data[this.VALUE]){if(data[this.VALUE][this.SYSTEMSTATE]){data=data[this.VALUE][this.SYSTEMSTATE];if(data&&data[key]){_3af=data[key];}}}return _3af;},_setWidgetSystemState:function(key,_3b1){if(!this.widgetNavStateNode){this.widgetNavStateNode=this._createWidgetNavStateNode();}var data=this.widgetNavStateNode.getRef();data.params=data.params?data.params:{};data.params.lm=new Date().getTime();var _3b2=null;data[this.VALUE]=data[this.VALUE]?data[this.VALUE]:{};data[this.VALUE][this.SYSTEMSTATE]=data[this.VALUE][this.SYSTEMSTATE]?data[this.VALUE][this.SYSTEMSTATE]:{};_3b2=data[this.VALUE][this.SYSTEMSTATE];_3b2[key]=_3b1;this.navStateModel.setDirty(true);return this;},getWidgetState:function(key){var rc=this._getWidgetStateValue(key)||null;if(!rc){return null;}if(!dojo.isString(rc)){rc=dojo.toJson(rc);}return rc;},_getWidgetStateValue:function(key){if(!key){return null;}if(key&&key=="cp"){return this.getWidgetStateSet();}if(this.RP[key]){return this._getWidgetSystemState(key);}var _3b3=null;if(!this.widgetNavStateNode&&!this.widgetNavStateNodeFallback){return null;}var _3b4=this.widgetNavStateNode;if(!_3b4){_3b4=this.widgetNavStateNodeFallback;}var data=_3b4.getRef();if(data&&data[this.VALUE]){if(data[this.VALUE][this.CUSTOMSTATE]){data=data[this.VALUE][this.CUSTOMSTATE];if(dojo.isString(data)){return null;}if(data&&data[key]){_3b3=data[key];}}}return _3b3;},getWidgetStateValues:function(key){var rc=this._getWidgetStateValue(key)||null;if(!rc){return null;}if(dojo.isString(rc)){var arr=[];arr.push(rc);return arr;}return rc;},getWidgetStateNames:function(){var _3b5=[];if(!this.widgetNavStateNode&&!this.widgetNavStateNodeFallback){return null;}var _3b6=this.widgetNavStateNode;if(!_3b6){_3b6=this.widgetNavStateNodeFallback;}var data=_3b6.getRef();if(data&&data[this.VALUE]){if(data[this.VALUE][this.CUSTOMSTATE]){data=data[this.VALUE][this.CUSTOMSTATE];if(dojo.isString(data)){return null;}if(data){for(var i in data){if(Object.prototype.hasOwnProperty.call(data,i)){if(data[i]){_3b5.push(i);}}}}}}if(_3b5.length===0){return null;}return _3b5;},setWidgetState:function(key,_3b7){if(!key||!_3b7){return null;}if(key&&key=="cp"){return this.setWidgetStateSet(_3b7);}var _3b8=false;if(dojo.isArray(_3b7)&&_3b7.length>=1){if(dojo.isString(_3b7[0])){_3b8=true;}}if(!_3b8){if(dojo.isString(_3b7)){_3b8=true;}}if(!_3b8){return null;}if(this.RP[key]){return this._setWidgetSystemState(key,_3b7);}if(key&&key=="cp"){return this.setWidgetStateSet(_3b7);}if(!this.widgetNavStateNode){this.widgetNavStateNode=this._createWidgetNavStateNode();}var data=this.widgetNavStateNode.getRef();data.params=data.params?data.params:{};data.params.lm=new Date().getTime();var _3b9=null;data[this.VALUE]=data[this.VALUE]?data[this.VALUE]:{};data[this.VALUE][this.CUSTOMSTATE]=data[this.VALUE][this.CUSTOMSTATE]?data[this.VALUE][this.CUSTOMSTATE]:{};_3b9=data[this.VALUE][this.CUSTOMSTATE];_3b9[key]=_3b7;this.navStateModel.setDirty(true);return this;},removeWidgetState:function(key){if(!key){return false;}if(this.RP[key]){return this._removeWidgetSystemState(key);}if(!this.widgetNavStateNode){return false;}var data=this.widgetNavStateNode.getRef();data.params=data.params?data.params:{};data.params.lm=new Date().getTime();if(key&&key=="cp"){if(data&&data[this.VALUE]&&data[this.VALUE][this.CUSTOMSTATE]){data[this.VALUE][this.CUSTOMSTATE]=null;this.navStateModel.setDirty(true);return true;}return false;}if(data&&data[this.VALUE]&&data[this.VALUE][this.CUSTOMSTATE]){var _3ba=data[this.VALUE][this.CUSTOMSTATE];if(_3ba&&_3ba[key]){_3ba[key]=null;this.navStateModel.setDirty(true);return true;}}return false;},_removeWidgetSystemState:function(key){if(!key){return false;}if(!this.widgetNavStateNode){return false;}var data=this.widgetNavStateNode.getRef();data.params=data.params?data.params:{};data.params.lm=new Date().getTime();if(data&&data[this.VALUE]&&data[this.VALUE][this.SYSTEMSTATE]){var _3bb=data[this.VALUE][this.SYSTEMSTATE];if(_3bb&&_3bb[key]){_3bb[key]=null;this.navStateModel.setDirty(true);return true;}}return false;},getWindowState:function(){rc=this._getWidgetSystemState(this.WINDOWSTATE);return rc;},setWindowState:function(_3bc){if(_3bc&&(_3bc==this.MIN||_3bc==this.MAX||_3bc==this.NORMAL)){this._setWidgetSystemState(this.WINDOWSTATE,_3bc);}},getWidgetMode:function(){var rc=this._getWidgetSystemState(this.MODE);return rc;},setWidgetMode:function(_3bd){if(_3bd){this._setWidgetSystemState(this.MODE,_3bd);return this;}return null;},getSize:function(){var size={};var _3be=this._getWidgetSystemState(this.HEIGHT);var _3bf=this._getWidgetSystemState(this.WIDTH);if(_3be){size[this.HEIGHT]=_3be;}if(_3bf){size[this.WIDTH]=_3bf;}if(!size[this.HEIGHT]&&!size[this.WIDTH]){return null;}return size;},setSize:function(_3c0,_3c1){if(_3c0){this._setWidgetSystemState(this.WIDTH,_3c0);}if(_3c1){this._setWidgetSystemState(this.HEIGHT,_3c1);}return this;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.WidgetAccessor"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.WidgetAccessor"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.WidgetAccessor");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.PageModeAccessor_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.PageModeAccessor_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.PageModeAccessor_API");dojo.provide("com.ibm.mashups.enabler.model.state.PageModeAccessor");dojo.declare("com.ibm.mashups.enabler.model.state.PageModeAccessor",[com.ibm.mashups.enabler.model.state.Accessor],{VIEW:"view",EDIT:"edit",getPageMode:function(){},setPageMode:function(_3c2){},confirmSetPageMode:function(_3c3){return true;}});com.ibm.mashups.enabler.model.state.PageModeAccessor.VIEW="view";com.ibm.mashups.enabler.model.state.PageModeAccessor.EDIT="edit";}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.PageModeAccessorImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.PageModeAccessorImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.PageModeAccessorImpl");dojo.declare("com.ibm.mm.enabler.model.state.PageModeAccessorImpl",[com.ibm.mashups.enabler.model.state.PageModeAccessor],{constructor:function(_3c4){this.navStateModel=_3c4;},getPageMode:function(){var _3c5=this.navStateModel._getPageMode();if(!_3c5){return null;}return _3c5;},setPageMode:function(mode){if(mode){this.navStateModel._setPageMode(mode);}return;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.PageModeAccessor"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.PageModeAccessor"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.PageModeAccessor");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.ShareableParameterSetAccessor_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.ShareableParameterSetAccessor_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.ShareableParameterSetAccessor_API");dojo.provide("com.ibm.mashups.enabler.model.state.ShareableParameterSetAccessor");dojo.declare("com.ibm.mashups.enabler.model.state.ShareableParameterSetAccessor",[com.ibm.mashups.enabler.model.state.Accessor],{getId:function(){},getScope:function(){},getAllNames:function(){},setItemValue:function(_3c6,_3c7){},confirmSetItemValue:function(_3c8,_3c9){return true;},removeItem:function(_3ca){},confirmRemoveItem:function(_3cb){return true;},getItemValue:function(_3cc){},registerListener:function(_3cd){},removeListener:function(_3ce){},confirmRemoveListener:function(_3cf){return true;}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.ShareableParameterSetAccessorImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.ShareableParameterSetAccessorImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.ShareableParameterSetAccessorImpl");dojo.declare("com.ibm.mm.enabler.model.state.ShareableParameterSetAccessorImpl",[com.ibm.mashups.enabler.model.state.ShareableParameterSetAccessor],{DELETE_TOKEN:"DELETE_TOKEN",TYPE_NEW:"newItem",TYPE_UPDATE:"changedValue",TYPE_REMOVE:"removedItem",constructor:function(_3d0,name,_3d1){if(!_3d1){this.scope=com.ibm.mm.enabler.model.state.ShareableParameterSetAccessorImpl.GLOBAL_SCOPE;}else{this.scope=_3d1;}this.name=name;this.navStateModel=_3d0;this.navStateNode=_3d0._find("sparams"+this.navStateModel.DELIMITER+name+this.navStateModel.DELIMITER+this.scope);},_createNavStateNode:function(){var temp;var _3d2=this.navStateModel._find("sparams");if(!_3d2){temp=this.navStateModel.create({key:"sparams"});this.navStateModel.insert(temp,this.navStateModel._getRoot());_3d2=this.navStateModel._find("sparams");}var _3d3=this.navStateModel._find(this.name);if(!_3d3){temp=this.navStateModel.create({key:this.name});this.navStateModel.insert(temp,_3d2);_3d3=this.navStateModel._find("sparams"+this.navStateModel.DELIMITER+this.name);}var _3d4=this.navStateModel.create({key:this.scope});this.navStateModel.insert(_3d4,_3d3);_3d4=this.navStateModel._find("sparams"+this.navStateModel.DELIMITER+this.name+this.navStateModel.DELIMITER+this.scope);return _3d4;},getId:function(){return this.name;},getScope:function(){return this.scope;},getAllNames:function(){if(!this.navStateNode){return null;}var arr=[];var data=this.navStateNode.getRef();if(data&&data[this.navStateModel.VALUE]){for(var i in data[this.navStateModel.VALUE]){if(data[this.navStateModel.VALUE].hasOwnProperty(i)){var _3d5=data[this.navStateModel.VALUE][i][this.navStateModel.VALUE];if(_3d5&&_3d5!=this.DELETE_TOKEN){arr.push(i);}}}}return arr;},setItemValue:function(_3d6,_3d7){if(!this.navStateNode){this.navStateNode=this._createNavStateNode();}var data=this.navStateNode.getRef();data.params=data.params?data.params:{};data.params.lm=new Date().getTime();data.value=data.value?data.value:{};var _3d8={};if(!data.value[_3d6]){data.value[_3d6]={};data.value[_3d6].value=_3d7;data.value[_3d6].params=data.value[_3d6].params?data.value[_3d6].params:{};data.value[_3d6].params._isDirty=true;_3d8.alias=_3d6;_3d8.type=this.TYPE_NEW;_3d8.newVal=_3d7;data.value[_3d6].params._change=_3d8;}else{if(data.value[_3d6]){var _3d9=dojo.clone(data.value[_3d6].value);data.value[_3d6].value=_3d7;data.value[_3d6].params=data.value[_3d6].params?data.value[_3d6].params:{};var _3da=data.value[_3d6].params._isDirty;if(_3da){_3d8=data.value[_3d6].params._change;if(_3d8.type==this.TYPE_NEW){_3d8.newVal=_3d7;}else{if(_3d8.type==this.TYPE_UPDATE){_3d8.newVal=_3d7;}else{if(_3d8.type==this.TYPE_REMOVE){if(_3d8.oldVal){_3d8.type=this.TYPE_UPDATE;}else{_3d8.type=this.TYPE_NEW;}_3d8.newVal=_3d7;}}}}else{_3d8.type=this.TYPE_UPDATE;_3d8.oldVal=_3d9;_3d8.newVal=_3d7;_3d8.alias=_3d6;data.value[_3d6].params._change=_3d8;}data.value[_3d6].params._isDirty=true;}}this.navStateModel.setDirty(true);return true;},removeItem:function(_3db){if(!this.navStateNode){return false;}var data=this.navStateNode.getRef();data.params=data.params?data.params:{};data.params.lm=new Date().getTime();if(data&&data[this.navStateModel.VALUE]){if(data[this.navStateModel.VALUE][_3db]){var _3dc=data[this.navStateModel.VALUE][_3db];var _3dd=dojo.clone(_3dc.value);_3dc.value=this.DELETE_TOKEN;_3dc.params=_3dc.params?_3dc.params:{};var _3de=_3dc.params._isDirty;var _3df={};if(_3de){_3df=_3dc.params._change;if(_3df.type==this.TYPE_NEW){delete data[this.navStateModel.VALUE][_3db];}else{if(_3df.type==this.TYPE_UPDATE){_3df.type=this.TYPE_REMOVE;_3df.newVal=null;delete _3df.oldVal;}}}else{_3df.type=this.TYPE_REMOVE;_3df.alias=_3db;_3df.oldVal=_3dd;_3dc.params._change=_3df;_3dc.params._isDirty=true;}this.navStateModel.setDirty(true);}else{return false;}}return true;},getItemValue:function(_3e0){if(!this.navStateNode){return null;}var data=this.navStateNode.getRef();if(data&&data[this.navStateModel.VALUE]){if(data[this.navStateModel.VALUE][_3e0]){var _3e1=data[this.navStateModel.VALUE][_3e0];var _3e2=_3e1[this.navStateModel.VALUE];if(_3e2&&_3e2!=this.DELETE_TOKEN){return _3e2;}}}return null;},registerListener:function(_3e3){if(!this.navStateNode){this.navStateNode=this._createNavStateNode();}var data=this.navStateNode.getRef();var _3e4=data[this.navStateModel.PARAMS];if(!_3e4){data[this.navStateModel.PARAMS]={};_3e4=data[this.navStateModel.PARAMS];}if(!_3e4._listeners){_3e4._listeners={};}var _3e5=this.navStateModel._generateListenerId();_3e4._listeners[_3e5]=_3e3;return _3e5;},removeListener:function(_3e6){if(!this.navStateNode){return null;}var data=this.navStateNode.getRef();var _3e7=data[this.navStateModel.PARAMS];if(_3e7&&_3e7._listeners){var _3e8=_3e7._listeners;if(_3e8[_3e6]){_3e8[_3e6]=null;delete _3e8[_3e6];return true;}}return false;},_setItems:function(_3e9){for(var i in _3e9){if(_3e9[i]&&_3e9[i]==this.DELETE_TOKEN){this.removeItem(i);}else{if(_3e9[i]){this.setItemValue(i,_3e9[i]);}}}}});com.ibm.mm.enabler.model.state.ShareableParameterSetAccessorImpl.GLOBAL_SCOPE="global";}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.ShareableParameterSetAccessor"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.ShareableParameterSetAccessor"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.ShareableParameterSetAccessor");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.LayoutContainerAccessor_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.LayoutContainerAccessor_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.LayoutContainerAccessor_API");dojo.provide("com.ibm.mashups.enabler.model.state.LayoutContainerAccessor");dojo.declare("com.ibm.mashups.enabler.model.state.LayoutContainerAccessor",[com.ibm.mashups.enabler.model.state.Accessor],{constructor:function(_3ea,_3eb,_3ec){},getID:function(){},getSize:function(){},setSize:function(_3ed){},confirmSetSize:function(_3ee){return true;}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.LayoutContainerAccessorImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.LayoutContainerAccessorImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.LayoutContainerAccessorImpl");dojo.declare("com.ibm.mm.enabler.model.state.LayoutContainerAccessorImpl",[com.ibm.mashups.enabler.model.state.LayoutContainerAccessor],{constructor:function(_3ef,_3f0,_3f1){this.navStateModel=_3ef;this.cid=_3f0;this.pid=_3f1;var _3f2=this.navStateModel.DELIMITER;var path=this.LAYOUT_PREFIX;path+=_3f2+this.pid;this.layoutNavStateNode=_3ef._find(path);if(this.layoutNavStateNode){path+=_3f2+this.VALUE+_3f2+this.cid;this.layoutContainerNavStateNode=_3ef._find(path);}else{this.layoutContainerNavStateNode=null;}},LAYOUT_PREFIX:"lcparams",WIDTH:"w",SYSTEMSTATE:"rp",VALUE:"value",PARAMS:"params",MODE:"md",RP:{w:"w"},getID:function(){return this.cid;},_getLayoutContainerSystemState:function(key){var _3f3=null;if(!this.layoutContainerNavStateNode){return null;}var data=this.layoutContainerNavStateNode.getRef();if(data&&data[this.VALUE]){if(data[this.VALUE][this.SYSTEMSTATE]){data=data[this.VALUE][this.SYSTEMSTATE];if(data&&data[key]){_3f3=data[key];}}}return _3f3;},_setLayoutContainerSystemState:function(key,_3f4){var data;if(!this.layoutContainerNavStateNode){this.layoutContainerNavStateNode=this._createLayoutContainerNavStateNode();}data=this.layoutNavStateNode.getRef();data.params=data.params?data.params:{};data.params.lm=new Date().getTime();data=this.layoutContainerNavStateNode.getRef();var _3f5=null;data[this.VALUE]=data[this.VALUE]?data[this.VALUE]:{};data[this.VALUE][this.SYSTEMSTATE]=data[this.VALUE][this.SYSTEMSTATE]?data[this.VALUE][this.SYSTEMSTATE]:{};_3f5=data[this.VALUE][this.SYSTEMSTATE];_3f5[key]=_3f4;this.navStateModel.setDirty(true);return this;},_createLayoutNavStateNode:function(){var _3f6=this.navStateModel.create({key:this.pid});var _3f7=this.navStateModel._find(this.LAYOUT_PREFIX);if(!_3f7){var temp=this.navStateModel.create({key:this.LAYOUT_PREFIX});this.navStateModel.insert(temp,this.navStateModel._getRoot());_3f7=this.navStateModel._find(this.LAYOUT_PREFIX);}this.navStateModel.insert(_3f6,_3f7);_3f6=this.navStateModel._find(this.LAYOUT_PREFIX+this.navStateModel.DELIMITER+this.pid);return _3f6;},_createLayoutContainerNavStateNode:function(){if(!this.layoutNavStateNode){this.layoutNavStateNode=this._createLayoutNavStateNode();}var data=this.layoutNavStateNode.getRef();data[this.VALUE]=data[this.VALUE]?data[this.VALUE]:{};var _3f8=this.navStateModel.DELIMITER;var path=this.LAYOUT_PREFIX+_3f8+this.pid+_3f8+this.VALUE;var _3f9=this.navStateModel.create({key:this.cid});var _3fa=this.navStateModel._find(path);this.navStateModel.insert(_3f9,_3fa);_3f9=this.navStateModel._find(path+_3f8+this.cid);return _3f9;},getSize:function(){var size={};var _3fb=this._getLayoutContainerSystemState(this.WIDTH);if(_3fb){size[this.WIDTH]=_3fb;return size;}else{return null;}return size;},setSize:function(_3fc){if(_3fc){this._setLayoutContainerSystemState(this.WIDTH,_3fc);}return this;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.LayoutContainerAccessor"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.LayoutContainerAccessor"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.LayoutContainerAccessor");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.LayoutAccessor_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.LayoutAccessor_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.LayoutAccessor_API");dojo.provide("com.ibm.mashups.enabler.model.state.LayoutAccessor");dojo.declare("com.ibm.mashups.enabler.model.state.LayoutAccessor",[com.ibm.mashups.enabler.model.state.Accessor],{constructor:function(_3fd,_3fe){},getTemplateURL:function(){},setTemplateURL:function(url){},getContainerAccessor:function(_3ff){},removeAll:function(_400){}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.LayoutAccessorImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.LayoutAccessorImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.LayoutAccessorImpl");dojo.declare("com.ibm.mm.enabler.model.state.LayoutAccessorImpl",[com.ibm.mashups.enabler.model.state.LayoutAccessor],{constructor:function(_401,_402){this.navStateModel=_401;this.pid=_402;this.path=this.LAYOUT_PREFIX+this.navStateModel.DELIMITER+this.pid;this.layoutNavStateNode=null;},LAYOUT_PREFIX:"lcparams",WIDGET_PREFIX:"wparams",VALUE:"value",TEMPLATE_URL:"templateURL",SYSTEMSTATE:"rp",WIDTH:"w",HEIGHT:"h",_getLayoutState:function(key){var _403=null;if(!this.layoutNavStateNode){this.layoutNavStateNode=this.navStateModel._find(this.path);if(!this.layoutNavStateNode){return null;}}var data=this.layoutNavStateNode.getRef();if(data&&data[key]){_403=data[key];}return _403;},_setLayoutState:function(key,_404){var data;if(!this.layoutNavStateNode){this.layoutNavStateNode=this.navStateModel._find(this.path);if(!this.layoutNavStateNode){this.layoutNavStateNode=this._createLayoutNavStateNode();}}data=this.layoutNavStateNode.getRef();data.params=data.params?data.params:{};data.params.lm=new Date().getTime();data[key]=_404;this.navStateModel.setDirty(true);return this;},_createLayoutNavStateNode:function(){var _405=this.navStateModel.create({key:this.pid});var _406=this.navStateModel._find(this.LAYOUT_PREFIX);if(!_406){var temp=this.navStateModel.create({key:this.LAYOUT_PREFIX});this.navStateModel.insert(temp,this.navStateModel._getRoot());_406=this.navStateModel._find(this.LAYOUT_PREFIX);}this.navStateModel.insert(_405,_406);_405=this.navStateModel._find(this.path);return _405;},getTemplateURL:function(){return this._getLayoutState(this.TEMPLATE_URL);},setTemplateURL:function(url){return this._setLayoutState(this.TEMPLATE_URL,url);},removeAll:function(_407){var _408=this.navStateModel.DELIMITER;if(_407&&this.navStateModel._find(this.WIDGET_PREFIX)){var i;var _409;for(i=0;i<_407.length;i++){_409=this.navStateModel._find(this.WIDGET_PREFIX+_408+_407[i]+_408+this.VALUE+_408+this.SYSTEMSTATE);if(_409){_409=_409.getRef();delete _409[this.WIDTH];delete _409[this.HEIGHT];this.navStateModel.setDirty(true);}}}if(this.layoutNavStateNode){this.navStateModel.remove(this.layoutNavStateNode);this.navStateModel.setDirty(true);delete this.layoutNavStateNode;}return this;},getContainerAccessor:function(_40a){return new com.ibm.mm.enabler.model.state.LayoutContainerAccessorImpl(this.navStateModel,_40a,this.pid);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.LayoutAccessor"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.LayoutAccessor"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.LayoutAccessor");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.AccessorFactory_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.AccessorFactory_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.AccessorFactory_API");dojo.provide("com.ibm.mashups.enabler.model.state.AccessorFactory");dojo.declare("com.ibm.mashups.enabler.model.state.AccessorFactory",null,{getPageAccessor:function(_40b,_40c){},getSpaceAccessor:function(_40d){},getWidgetAccessor:function(_40e,_40f){},getPageModeAccessor:function(_410){},getShareableParameterSetAccessor:function(_411,id,_412){},getLayoutAccessor:function(_413,_414){}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.AccessorFactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.AccessorFactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.AccessorFactoryImpl");dojo.declare("com.ibm.mm.enabler.model.state.AccessorFactoryImpl",[com.ibm.mashups.enabler.model.state.AccessorFactory],{constructor:function(){},getPageAccessor:function(_415,_416){return new com.ibm.mm.enabler.model.state.PageAccessorImpl(_415,_416);},getPageModeAccessor:function(_417){return new com.ibm.mm.enabler.model.state.PageModeAccessorImpl(_417);},getSpaceAccessor:function(_418){return new com.ibm.mm.enabler.model.state.SpaceAccessorImpl(_418);},getWidgetAccessor:function(_419,_41a){return new com.ibm.mm.enabler.model.state.WidgetAccessorImpl(_419,_41a);},getShareableParameterSetAccessor:function(_41b,name,_41c){return new com.ibm.mm.enabler.model.state.ShareableParameterSetAccessorImpl(_41b,name,_41c);},getLayoutAccessor:function(_41d,_41e){return new com.ibm.mm.enabler.model.state.LayoutAccessorImpl(_41d,_41e);}});com.ibm.mashups.enabler.model.state.AccessorFactory=new com.ibm.mm.enabler.model.state.AccessorFactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.AccessorFactory"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.AccessorFactory"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.AccessorFactory");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateModel_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateModel_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateModel_API");dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateModel");dojo.declare("com.ibm.mashups.enabler.model.state.NavigationStateModel",null,{ONNAVSTATEUPDATED:"com.ibm.mashups.enabler.model.state.onNavStateUpdated",startTransaction:function(){return;},commitTransaction:function(){return;},discardTransaction:function(){return;},isTransaction:function(){return false;},commit:function(_41f){return new com.ibm.mashups.enabler.Deferred();},discard:function(){return;},dispose:function(){return;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.services.IdentificationService_API"]){dojo._hasResource["com.ibm.mashups.enabler.services.IdentificationService_API"]=true;dojo.provide("com.ibm.mashups.enabler.services.IdentificationService_API");dojo.provide("com.ibm.mashups.enabler.services.IdentificationService");dojo.declare("com.ibm.mashups.enabler.services.IdentificationService",null,{createClientID:function(){},attachClientID:function(_420){},releaseClientID:function(id){},isClientID:function(id){},isServerID:function(id){},isAlienID:function(id){},attachServerID:function(_421,_422){},resolveID:function(id){},resolveIdentifiable:function(id){}});}if(!dojo._hasResource["com.ibm.mm.enabler.utils.Utils"]){dojo._hasResource["com.ibm.mm.enabler.utils.Utils"]=true;dojo.provide("com.ibm.mm.enabler.utils.Utils");dojo.declare("com.ibm.mm.enabler.utils.UtilsImpl",null,{constructor:function(){this.serviceJson=null;},_lazyInit:function(){if(this.serviceJson){return;}this.xmlDom=com.ibm.mm.enabler.utils.Dom.createDocument();this.serviceJson=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_NAVIGATION);this.prefix=this.serviceJson.idprefix;var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns=dojo.delegate(this.serviceJson.namespaces,nsf.getNameSpaces([nsf.NS_ATOM]));},createNode:function(name,ns){this._lazyInit();return com.ibm.mm.enabler.utils.Dom.createElement(this.xmlDom,name,ns);},createLinkNode:function(href,rel,ns){var _423=this.createNode("atom:link",ns);_423.setAttribute("href",href);_423.setAttribute("rel",rel);return _423;},createExtLinkNode:function(href,rel,_424){this._lazyInit();var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;var _425=this.createNode("atom:link",this.ns[nsf.NS_ATOM]);_425.setAttribute("href",href);if(rel){_425.setAttribute("rel",rel);}com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(this.xmlDom,_425,"ext:rel","rel",this.ns.ext,_424);return _425;},getIdFromExtUri:function(_426,node){this._lazyInit();var id=null;var uri=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(node,"ext:uri","uri",this.ns.ext);if(uri){var aPos=uri.indexOf("@");if(aPos!=-1){uri=uri.slice(0,aPos);}id=uri;var _427=id.lastIndexOf(":");if(_427!=-1){id=id.slice(_427+1);}_427=id.toUpperCase().lastIndexOf("%3A");if(_427!=-1){id=id.slice(_427+3);}_427=id.lastIndexOf("/");if(_427!=-1){id=id.slice(_427+1);}}return id;},getHrefFromIdentifiable:function(_428){return (_428&&(typeof _428._getParameters=="function"))?_428._getParameters().href:null;},getIdFromIdentifiable:function(_429){if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(_429,com.ibm.mashups.enabler.Identifiable)){return _429.getID();}else{if(dojo.isString(_429)){return dojo.string.trim(_429);}else{return _429;}}},setAttributeWithNS:function(_42a,_42b,_42c,_42d){this._lazyInit();com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(this.xmlDom,_42a,_42b,null,_42c,_42d);},createFeed:function(id,_42e,_42f,_430){var ns="";for(var _431 in _430){if(Object.prototype.hasOwnProperty.call(_430,_431)){ns+="xmlns:"+_431+"=\""+_430[_431]+"\" ";}}var time=new Date();var feed="\n"+"\n"+""+_42e+"\n"+""+id+"\n"+""+time.toGMTString()+"\n"+_42f+"";return feed;},transferElements:function(_432,_433,_434,ns){dojo.forEach(_434,function(ctx){var _435=ctx.parentXpath+"/"+ctx.element;if(ctx.replace===true){var _436=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(_435,_433,ns);if(_436){_436.parentNode.removeChild(_436);}}var _437=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(_435,_432,ns);if(_437){var _438=_437.cloneNode(true);var _439=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(ctx.parentXpath,_433,ns);if(_439){_439.appendChild(_438);}}},this);}});com.ibm.mm.enabler.utils.Utils=new com.ibm.mm.enabler.utils.UtilsImpl();}if(!dojo._hasResource["com.ibm.mm.enabler.IdentifiableHelper"]){dojo._hasResource["com.ibm.mm.enabler.IdentifiableHelper"]=true;dojo.provide("com.ibm.mm.enabler.IdentifiableHelper");com.ibm.mm.enabler.IdentifiableHelper.ID_MATCHER=/^(.*?)(%3a)?([ \.\w_\-]*)(@.*?)?$/i;com.ibm.mm.enabler.IdentifiableHelper.getID=function(id){var _43a=id.match(com.ibm.mm.enabler.IdentifiableHelper.ID_MATCHER);return _43a?_43a[3]:"";};com.ibm.mm.enabler.IdentifiableHelper.replaceID=function(_43b,_43c,_43d){var id=com.ibm.mm.enabler.IdentifiableHelper.getID(_43d);var _43e=_43b.match(com.ibm.mm.enabler.IdentifiableHelper.ID_MATCHER);return _43c+":"+id+(_43e?(_43e[4]||""):"");};}if(!dojo._hasResource["com.ibm.mm.enabler.utils.Atom"]){dojo._hasResource["com.ibm.mm.enabler.utils.Atom"]=true;dojo.provide("com.ibm.mm.enabler.utils.Atom");com.ibm.mm.enabler.utils.Atom={_FEED:"atom:feed",_ENTRY:"atom:entry",_LINK:"atom:link",_ID:"atom:id",_NEXT_LINK:"atom:link[@rel='next']",_EDIT_LINK:"atom:link[@rel='edit']",_REPLIES_LINK:"atom:link[@rel='replies']",_REPLIES_LINK_HREF:"atom:link[@rel='replies']/@href",_IN_REPLY_TO_LINK:"thr:in-reply-to",_IN_REPLY_TO_LINK_HREF:"thr:in-reply-to/@href",LOG_LEVEL:com.ibm.mashups.enabler.logging.LogLevel.TRACE,LOGGER:com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.utils.Atom"),createEntry:function(_43f,_440,_441){var _442={};var _443="createEntry";var _444=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_444){this.LOGGER.entering(_443,[_43f,_440,_441]);}var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;var ns=nsf.getNameSpaces([nsf.NS_ATOM]);var _445=com.ibm.mm.enabler.utils.Utils.createNode("atom:entry",ns.atom);var _446=com.ibm.mm.enabler.utils.Utils.createNode("atom:id",ns.atom);_445.appendChild(_446);var _447=com.ibm.mm.enabler.utils.Utils.createNode("atom:title",ns.atom);if(_43f){com.ibm.mm.enabler.utils.Dom.textContent(_447,_43f);}_445.appendChild(_447);var _448=com.ibm.mm.enabler.utils.Utils.createNode("atom:updated",ns.atom);var time=new Date();com.ibm.mm.enabler.utils.Dom.textContent(_448,time.toGMTString());_445.appendChild(_448);var _449=com.ibm.mm.enabler.utils.Utils.createNode("atom:content",ns.atom);_449.setAttribute("type","application/xml");_445.appendChild(_449);if(_440&&_441){var elem=com.ibm.mm.enabler.utils.Utils.createNode(_440,_441);_449.appendChild(elem);_442.modelElement=elem;}_442.entryElement=_445;_442.idElement=_446;if(_444){this.LOGGER.exiting(_443,_442);}return _442;}};}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.xml.IdentifiableXmlImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.xml.IdentifiableXmlImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.xml.IdentifiableXmlImpl");dojo.declare("com.ibm.mm.enabler.persistence.xml.IdentifiableXmlImpl",[com.ibm.mashups.enabler.Identifiable,com.ibm.mm.enabler.DirtyFlagProviderImpl,com.ibm.mm.enabler.ServiceDocConsumer],{constructor:function(){this.modelMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","modelMessages");this._resetCachedRawID();this._addDirtyCallback(this,this._resetCachedRawID,null,true);},_cachedRawIdToken:{},_resetCachedRawID:function(){this._cachedRawID=this._cachedRawIdToken;},_cachedRawID:null,_initServiceDoc:function(){this.inherited("_initServiceDoc",arguments);var _44a=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_NAVIGATION);var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.id_ns=dojo.delegate(_44a.namespaces,nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_THR,nsf.NS_XML,nsf.NS_OPENSEARCH,nsf.NS_XHTML,nsf.NS_APP]));this.id_prefix=_44a.idprefix;},getID:function(){var id=this._getRawID();return id?com.ibm.mm.enabler.IdentifiableHelper.getID(id):id;},_getRawID:function(){this._initServiceDoc();if(this._cachedRawID===this._cachedRawIdToken){var _44b=null;var node=com.ibm.mashups.enabler.xml.XPath.evaluateString(com.ibm.mm.enabler.utils.Atom._ID,this.xmlData,this.id_ns);if(node){_44b=dojo.string.trim(node);}this._cachedRawID=_44b;}return this._cachedRawID;},equals:function(_44c){return com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(this)==com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(_44c);},setID:function(id){this._initServiceDoc();var _44d=this._getRawID();var _44e=this.id_prefix;if(_44d){var _44f=_44d.indexOf(this.id_prefix);if(_44f>0){_44e=_44d.substring(0,_44f+this.id_prefix.length);}}var _450=com.ibm.mm.enabler.IdentifiableHelper.replaceID(_44d||"",_44e,id);if(_450!=_44d){this._setRawID(_450);}},_setRawID:function(id){this._initServiceDoc();id=id||"";var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(com.ibm.mm.enabler.utils.Atom._ID,this.xmlData,this.id_ns);if(node){var _451=this._getRawID();if(id!=_451){com.ibm.mm.enabler.utils.Dom.textContent(node,id);this._setDirty();this._cachedRawID=dojo.string.trim(id);}}else{throw new Error(dojo.string.substitute(this.modelMessages.E_ELEMENT_NOT_FOUND_2,[com.ibm.mm.enabler.utils.Atom._ID,this.toString()]));}},getUniqueName:function(){this._initServiceDoc();var name=null;var res=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(com.ibm.mm.enabler.utils.Atom._ID,this.xmlData,this.id_ns);if(res){name=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(res,"ext:uniquename","uniquename",this.id_ns.ext);}return name||"";}});}if(!dojo._hasResource["com.ibm.mm.enabler.IdentifierImpl"]){dojo._hasResource["com.ibm.mm.enabler.IdentifierImpl"]=true;dojo.provide("com.ibm.mm.enabler.IdentifierImpl");dojo.declare("com.ibm.mm.enabler.IdentifierImpl",com.ibm.mm.enabler.persistence.xml.IdentifiableXmlImpl,{_id:null,_params:null,constructor:function(id,_452){if(dojo.isString(id)){this._id=id;}else{this.xmlData=id;}this._params=_452;},setID:function(id){if(this._id){this._id=id;}else{this.inherited(arguments);}},getID:function(){return this._id?com.ibm.mm.enabler.IdentifiableHelper.getID(this._id):this.inherited(arguments);},_getParameters:function(){return this._params;},_getRawID:function(){return this._id?this._id:this.inherited(arguments);},_setRawID:function(id){if(!this._id){var _453=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(com.ibm.mm.enabler.utils.Atom._ID,this.xmlData,this.id_ns);if(_453){com.ibm.mm.enabler.utils.Dom.textContent(_453,id);}}}});}if(!dojo._hasResource["com.ibm.mm.enabler.services.IdentificationServiceImpl"]){dojo._hasResource["com.ibm.mm.enabler.services.IdentificationServiceImpl"]=true;dojo.provide("com.ibm.mm.enabler.services.IdentificationServiceImpl");dojo.declare("com.ibm.mm.enabler.services.IdentificationServiceImpl",[com.ibm.mashups.enabler.services.IdentificationService],{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.services.IdentificationServiceImpl");this.clientIds={};this.clientServerMap={};var _454=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME).getValue(com.ibm.mashups.enabler.services.ConfigConstants.SERVER_OBJECT_ID_FORMAT);if(!_454){_454="M[A-F0-9]+$";}this.serverOidRegExp=new RegExp(_454);},createClientID:function(){while(true){var id=dojox.uuid.generateRandomUuid().replace(/-/g,"_");if(!(id in this.clientIds)){this.clientIds[id]=null;return id;}}return null;},attachClientID:function(_455){this.clientIds[_455]=null;},releaseClientID:function(id){var _456=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(id);if(this.isClientID(_456)){delete this.clientIds[_456];delete this.clientServerMap[_456];}},isClientID:function(id){return (id in this.clientIds);},isServerID:function(id){return this.serverOidRegExp.test(id);},isAlienID:function(id){return !this.isServerID(id)&&!this.isClientID(id);},attachServerID:function(cid,sid){var _457=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(cid);var _458=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(sid);this.clientServerMap[_457]=_458;},resolveID:function(id){var _459=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(id);return (_459 in this.clientServerMap)?this.clientServerMap[_459]:_459;},resolveIdentifiable:function(id){return new com.ibm.mm.enabler.IdentifierImpl(this.resolveID(id));}});com.ibm.mashups.enabler.services.IdentificationService=new com.ibm.mm.enabler.services.IdentificationServiceImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.services.IdentificationService"]){dojo._hasResource["com.ibm.mashups.enabler.services.IdentificationService"]=true;dojo.provide("com.ibm.mashups.enabler.services.IdentificationService");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateProcessor_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateProcessor_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateProcessor_API");dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateProcessor");dojo.declare("com.ibm.mashups.enabler.model.state.NavigationStateProcessor",null,{encodeWidgetIdentifier:function(wid,_45a){},decodeWidgetIdentifier:function(wid,_45b){},decode:function(url,_45c){},encode:function(_45d,_45e,_45f,_460,_461){},generateUrl:function(_462,_463,_464){},generateURL:function(_465,_466,_467){},preprocess:function(_468,_469){},dispose:function(_46a){},postprocess:function(_46b,_46c,_46d,_46e){}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.CookieManager"]){dojo._hasResource["com.ibm.mm.enabler.model.state.CookieManager"]=true;dojo.provide("com.ibm.mm.enabler.model.state.CookieManager");dojo.declare("com.ibm.mm.enabler.model.state.CookieManager",null,{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);this._dirty=false;this.cookiePath=window.location.pathname;},COOKIE_PREFIX:"digest.ignore.state.",disposeState:function(){if(ibmConfig["com.ibm.mashups.embedding.isActive"]===true){return;}var id=this._getCookieID();if(id&&dojo.cookie(id)){if(dojo.isIE||window.ActiveXObject!==undefined){dojo.cookie(id,null,{expires:-1});}else{dojo.cookie(id,null,{expires:-1,path:this.cookiePath});}}if(this._state){delete this._state;}this._dirty=false;},_getCookieID:function(){if(!this._cookieID){var _46f=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var uid=_46f.getValue(com.ibm.mashups.enabler.services.ConfigConstants.USER);if(!uid||(uid&&uid=="null")){return null;}this._cookieID=this.COOKIE_PREFIX+uid;}return this._cookieID;},_init:function(){if(!this._getCookieID()){this._state={};return;}if(dojo.cookie.isSupported()){if(dojo.cookie(this._getCookieID())&&dojo.fromJson(dojo.cookie(this._getCookieID()))){this._state=dojo.fromJson(dojo.cookie(this._getCookieID()));}}if(!this._state){this._state={};}},getState:function(id){if(!this._state){this._init();}if(!id){return this._state;}if(this._state[id]){return this._state[id];}return null;},setState:function(id,_470){if(!this._state){this._state={};}this._state[id]=_470;this._dirty=true;},removeState:function(id){if(this._state[id]){delete this._state[id];this._dirty=true;}},commit:function(){if(ibmConfig["com.ibm.mashups.embedding.isActive"]===true){return;}if(this._dirty){if(!this._getCookieID()){this._dirty=false;return;}if(dojo.cookie.isSupported()){if(dojo.isIE||window.ActiveXObject!==undefined){dojo.cookie(this._getCookieID(),dojo.toJson(this._state),{expires:3652});}else{dojo.cookie(this._getCookieID(),dojo.toJson(this._state),{expires:3652,path:this.cookiePath});}}this._dirty=false;}}});com.ibm.mashups.enabler.model.state.CookieManager=new com.ibm.mm.enabler.model.state.CookieManager();}if(!dojo._hasResource["com.ibm.mashups.iwidget.model.Factory_API"]){dojo._hasResource["com.ibm.mashups.iwidget.model.Factory_API"]=true;dojo.provide("com.ibm.mashups.iwidget.model.Factory_API");dojo.provide("com.ibm.mashups.iwidget.model.Factory");dojo.declare("com.ibm.mashups.iwidget.model.Factory",null,{constructor:function(){},getGlobalWidgetModel:function(){}});}if(!dojo._hasResource["com.ibm.mm.iwidget.Constants"]){dojo._hasResource["com.ibm.mm.iwidget.Constants"]=true;dojo.provide("com.ibm.mm.iwidget.Constants");dojo.declare("com.ibm.mm.iwidget.Constants",null,{constructor:function(){},WIDGETEVENT_PREFIX:"widgetevents.",WILDCARD_PREFIX:"*.",mode:{VIEW:"view",EDIT:"edit",PERSONALIZE:"personalize",CONFIG:"config",HELP:"help"},mode_view:"view",mode_edit:"edit",mode_help:"help",event:{TITLE:"title",DESCRIPTION:"description"},ATTRIBUTES:"attributes",IDESCRIPTOR:"idescriptor",USERPROFILE:"userprofile",windowstate:{NORMAL:"normal",MINIMIZE:"minimize",MAXIMIZE:"maximize"},status:{SUCCESS:200,TIMEOUT:408,NOTFOUND:404,INTERROR:500,OTHER:303},changeType:{CHANGEDVALUE:"changedValue",NEWITEM:"newItem",REMOVEDITEM:"removedItem"},iDescriptorItems:{title:"title",name:"name",description:"description",defaultHeight:"defaultHeight",defaultWidth:"defaultWidth",displayLocale:"displayLocale",mode:"mode",author:"author",email:"email",website:"website",version:"version",icon:"icon",windowState:"windowState",messageLocale:"messageLocale",availableMessageLocales:"availableMessageLocales",thumbnail:"thumbnail"},IW_PREFIX:"iw-",IW_DEFINITION_TYPE:"iwidget",OSGADGET_DEFINITION_TYPE:"os-gadget",CSSCLASS_INSTANCE:{iwWidget:"iWidget",iwOSGadget:"OSGadget",iwSandbox:"Sandbox",iwDefinition:"Definition",iwEventDescription:"EventDescription",iwPayloadType:"PayloadType",iwHandled:"Handled",iwPublished:"Published",iwDescription:"Description",iwTitle:"Title",iwEvent:"Event",iwDescRef:"DescRef",iwGlobalid:"Globalid",iwHandler:"Handler",iwNewWire:"NewWire",iwRemoveWire:"RemoveWire",iwReadOnly:"ReadOnly",iwItemSet:"ItemSet",iwItem:"Item",iwValue:"Value",iwContent:"Content",iwReceivedEvent:"ReceivedEvent",iwSourceEvent:"SourceEvent",iwTargetEvent:"TargetEvent",iwMappedName:"MappedName",iwStandalone:"Standalone"},CSSCLASS_PREFIXED_INSTANCE:{},CSSCLASS_PERSONALIZED:"mm-Personalized",RESOURCE:{src:"src",id:"id",globalid:"globalid",mimeType:"mimeType",callback:"callback",version:"version",blockInit:"blockInit",skipLoad:"skipLoad"},EVENTS:{onLoad:"onLoad",onUnLoad:"onUnload",onModeChanged:"onModeChanged",onItemSetChanged:"onItemSetChanged",unloadWidget:"/enabler/unloadWidget",unSubscribeWire:"/enabler/unSubscribeWire",modeChanged:"modeChanged",onSizeChanged:"onSizeChanged",onNavStateChanged:"onNavStateChanged",onAttributeSaved:"com.ibm.mashups.iwidget.onAttributeSaved",onWindowStateChanged:"onWindowStateChanged",onIncompleteEventDescription:"onIncompleteEventDescription"},eventservice:{type:{MAIN:"MAIN",IFRAME:"IFRAME"}}});com.ibm.mm.iwidget.Constants=new com.ibm.mm.iwidget.Constants();(function(){for(var key in com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE){if(Object.prototype.hasOwnProperty.call(com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE,key)){com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE[key]=com.ibm.mm.iwidget.Constants.IW_PREFIX+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE[key];}}})();iwConstants=com.ibm.mm.iwidget.Constants;}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.WireProvider"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.WireProvider"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.WireProvider");dojo.declare("com.ibm.mashups.iwidget.widget.WireProvider",null,{constructor:function(id){},getWires:function(){}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.IEventDescription_API"]){dojo._hasResource["com.ibm.mashups.iwidget.IEventDescription_API"]=true;dojo.provide("com.ibm.mashups.iwidget.IEventDescription_API");dojo.provide("com.ibm.mashups.iwidget.IEventDescription");dojo.declare("com.ibm.mashups.iwidget.IEventDescription",null,{constructor:function(){},alias:"",name:"",type:"",handlingFn:"",getDescription:function(_471){return null;},lang:"",isHandled:false,isPublished:false,getAttribute:function(_472,_473){return null;},setAttribute:function(_474,_475,_476){}});}if(!dojo._hasResource["com.ibm.mm.iwidget.IEventDescriptionImpl"]){dojo._hasResource["com.ibm.mm.iwidget.IEventDescriptionImpl"]=true;dojo.provide("com.ibm.mm.iwidget.IEventDescriptionImpl");dojo.declare("com.ibm.mm.iwidget.IEventDescriptionImpl",com.ibm.mashups.iwidget.IEventDescription,{constructor:function(name,_477,type,_478,_479,_47a,_47b){if(dojo.isString(name)){var obj={};obj.name=name;_477=_477||null;if(_477){obj.handlingFn=_477;obj.isHandled=true;obj.isPublished=false;}else{obj.isPublished=true;}type=type||null;if(type){obj.type=type;}_47a=_47a||null;if(_47a){obj.lang=_47a;}else{obj.lang="en";}obj.attributes={};obj.localizedAttributes={};_479=_479||null;if(_479){obj.attributes.aliases=_479;}_47b=_47b||null;if(_47b){obj.localizedAttributes=_47b;}if(_478){if(!obj.localizedAttributes[obj.lang]){obj.localizedAttributes[obj.lang]={};}obj.localizedAttributes[obj.lang].description=_478;}this._internalJsonObj=obj;}else{this._internalJsonObj=name;}this.initPredefinedFields(this._internalJsonObj);},initPredefinedFields:function(obj){this.name=obj.name;this.type=obj.type;this.lang=obj.lang;this.handlingFn=obj.handlingFn;this.isHandled=obj.isHandled;this.isPublished=obj.isPublished;},getDescription:function(_47c){return this._getLocalizedAttribute("description",_47c);},getTitle:function(_47d){return this._getLocalizedAttribute("title",_47d);},_getLocalizedAttribute:function(_47e,_47f){var _480=null,_481=null;var lc=com.ibm.mashups.enabler.context.Factory.getLocalizedContext(_47f,this.lang);var _482=lc.getLocale(this);if(this.localemapping&&this.localemapping[_482]){_482=this.localemapping[_482];}if(this._internalJsonObj.localizedAttributes){_481=this._internalJsonObj.localizedAttributes[_482];if(_481){_480=_481[_47e];}}if(!_480){_480=this[_47e];}if(typeof _480=="undefined"){_480=null;}return _480;},setOnRemoveWire:function(_483){if(typeof _483=="undefined"||_483===null){_483="onRemoveWire";}if(typeof this._internalJsonObj.attributes=="undefined"){this._internalJsonObj.attributes={};}this._internalJsonObj.attributes.onRemoveWire=_483;return this;},getOnRemoveWire:function(){if(typeof this._internalJsonObj.attributes!="undefined"&&this._internalJsonObj.attributes.onRemoveWire){return this._internalJsonObj.attributes.onRemoveWire;}return null;},setOnNewWire:function(_484){if(typeof _484=="undefined"||_484===null){_484="onNewWire";}if(typeof this._internalJsonObj.attributes=="undefined"){this._internalJsonObj.attributes={};}this._internalJsonObj.attributes.onNewWire=_484;return this;},getOnNewWire:function(){if(typeof this._internalJsonObj.attributes!="undefined"&&this._internalJsonObj.attributes.onNewWire){return this._internalJsonObj.attributes.onNewWire;}return null;},getLocales:function(){var _485=[];var _486={};if(this._internalJsonObj.localizedAttributes){for(var i in this._internalJsonObj.localizedAttributes){if(Object.prototype.hasOwnProperty.call(this._internalJsonObj.localizedAttributes,i)){_485.push(i);var _487=com.ibm.mm.enabler.utils.LocaleHelper.normalizeLocale(i);if(_487!=i){_486[_487]=i;}}}}this.localemapping=_486;return _485;},toString:function(){var temp=this.toJson();return dojo.toJson(temp);},_getInternalJsonObj:function(){return this._internalJsonObj;},toJson:function(){var _488={};for(var i in this._internalJsonObj){if(Object.prototype.hasOwnProperty.call(this._internalJsonObj,i)){if(i=="handlingFn"){if(dojo.isFunction(this._internalJsonObj[i])){_488[i]="HANDLEFN";continue;}}_488[i]=dojo.clone(this._internalJsonObj[i]);}}return _488;},clone:function(){var temp=dojo.toJson(this._internalJsonObj);if(temp){return new com.ibm.mm.iwidget.IEventDescriptionImpl(dojo.fromJson(temp));}else{return null;}},getAttribute:function(_489,_48a){if(!_489){return null;}if(!_48a){if(this._internalJsonObj.attributes&&typeof this._internalJsonObj.attributes[_489]!="undefined"){return this._internalJsonObj.attributes[_489];}if(this._internalJsonObj.localizedAttributes&&this._internalJsonObj.localizedAttributes[this.lang]){var _48b=this._internalJsonObj.localizedAttributes[this.lang][_489];if(_48b){return _48b;}}return null;}else{return this._getLocalizedAttribute(_489,_48a);}},setAttribute:function(_48c,_48d,_48e){if(!_48c){return null;}if(typeof _48d=="undefined"){return null;}if(!_48e){if(typeof this._internalJsonObj.attributes=="undefined"){this._internalJsonObj.attributes={};}this._internalJsonObj.attributes[_48c]=_48d;if(_48d===null){delete this._internalJsonObj.attributes[_48c];}return this;}if(!this._internalJsonObj.localizedAttributes[_48e]){this._internalJsonObj.localizedAttributes[_48e]={};}this._internalJsonObj.localizedAttributes[_48e][_48c]=_48d;if(_48d===null){delete this._internalJsonObj.localizedAttributes[_48e][_48c];}return this;},copyRuntimeProperties:function(_48f){if((!this.handlingFn)&&(_48f.handlingFn)){this.handlingFn=_48f.handlingFn;}if((!this._internalJsonObj.handlingFn)&&(_48f._internalJsonObj.handlingFn)){this._internalJsonObj.handlingFn=_48f._internalJsonObj.handlingFn;}if(typeof this._internalJsonObj.attributes=="undefined"){this._internalJsonObj.attributes={};}for(var name in _48f._internalJsonObj.attributes){if(!this._internalJsonObj.attributes[name]){this._internalJsonObj.attributes[name]=_48f._internalJsonObj.attributes[name];}}}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.IEventDescription"]){dojo._hasResource["com.ibm.mashups.iwidget.IEventDescription"]=true;dojo.provide("com.ibm.mashups.iwidget.IEventDescription");}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.EventProvider"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.EventProvider"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.EventProvider");dojo.declare("com.ibm.mashups.iwidget.widget.EventProvider",null,{constructor:function(){},getWidgetPublishedEvents:function(){},getWidgetHandledEvents:function(){},getPublicEvent:function(name){}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.Properties_API"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.Properties_API"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.Properties_API");dojo.provide("com.ibm.mashups.iwidget.widget.Properties");dojo.declare("com.ibm.mashups.iwidget.widget.Properties",null,{constructor:function(){},getItemValue:function(_490,_491){},getAllNames:function(){return null;},getItemLocales:function(_492){},isReadOnly:function(_493){}});}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.PropertiesImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.PropertiesImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.PropertiesImpl");dojo.declare("com.ibm.mm.iwidget.widget.PropertiesImpl",com.ibm.mashups.iwidget.widget.Properties,{DELETE_TOKEN:"com.ibm.mm.iwidget.widget.DELETE_TOKEN",TYPE_NEW:"newItem",TYPE_UPDATE:"updatedValue",TYPE_REMOVE:"removedItem",constructor:function(_494,_495){this._defaultProperties=_495;this._items={};if(_494){this._items=_494;}this._localizedItems={};this.DEFAULT_LOCALE=ibmConfig[com.ibm.mashups.enabler.services.ConfigConstants.DEFAULT_LOCALE];if(!this.DEFAULT_LOCALE){this.DEFAULT_LOCALE="en";}},_getItemDefaultLocale:function(_496){var _497=null;if(this._items[_496]){if(this._items[_496].defaultLocale){_497=this._items[_496].defaultLocale;}}if(!_497){_497=null;}return _497;},getLocalizedItemValue:function(_498,_499){if(!_498||!_499){return;}if(!(_498 in this._items)&&!this._defaultProperties){return null;}var item=this._items[_498];var _49a=null;if(!item.values){return null;}var _49b=[];for(var i in item.values){if(Object.prototype.hasOwnProperty.call(item.values,i)){_49b.push(i);}}var _49c;_49c=com.ibm.mm.enabler.utils.LocaleHelper.matchLocale(_499,_49b);for(var j in item.values){if(_49c==com.ibm.mm.enabler.utils.LocaleHelper.normalizeLocale(j)){_49a=item.values[j];break;}}if(_49a==this.DELETE_TOKEN){return null;}return _49a;},getItemValue:function(_49d,_49e){if(!(_49d in this._items)&&!this._defaultProperties){return null;}if(!(_49d in this._items)){return this._defaultProperties.getItemValue(_49d,_49e);}var item=this._items[_49d];var _49f=null;if((typeof _49e=="undefined"||_49e===null)&&typeof item.value!="undefined"&&item.value!==null){if(item.value==this.DELETE_TOKEN){return null;}return item.value;}if(!item.values){return null;}var _4a0=[];for(var i in item.values){if(Object.prototype.hasOwnProperty.call(item.values,i)){_4a0.push(i);}}var _4a1;if(_49e){_4a1=com.ibm.mm.enabler.utils.LocaleHelper.matchLocale(_49e,_4a0);for(var j in item.values){if(_4a1==com.ibm.mm.enabler.utils.LocaleHelper.normalizeLocale(j)){_49f=item.values[j];break;}}}if(item.defaultLocale&&_49f===null){_4a1=com.ibm.mm.enabler.utils.LocaleHelper.matchLocale(item.defaultLocale,_4a0);for(var k in item.values){if(_4a1==com.ibm.mm.enabler.utils.LocaleHelper.normalizeLocale(k)){_49f=item.values[k];break;}}}if(this.DEFAULT_LOCALE&&_49f===null){_4a1=com.ibm.mm.enabler.utils.LocaleHelper.matchLocale(this.DEFAULT_LOCALE,_4a0);for(var l in item.values){if(_4a1==com.ibm.mm.enabler.utils.LocaleHelper.normalizeLocale(l)){_49f=item.values[l];break;}}}if(_49f===null){for(var lang in item.values){if(Object.prototype.hasOwnProperty.call(item.values,lang)){_49f=item.values[lang];break;}}}if(_49f==this.DELETE_TOKEN){return null;}return _49f;},getItemLocales:function(_4a2){var _4a3=[];if(_4a2 in this._items&&this._items[_4a2].values){for(var _4a4 in this._items[_4a2].values){if(Object.prototype.hasOwnProperty.call(this._items[_4a2].values,_4a4)){_4a3.push(_4a4);}}}if(_4a3.length===0){return null;}return _4a3;},getAllNames:function(){var _4a5=[];if(this._defaultProperties){_4a5=this._defaultProperties.getAllNames();}var _4a6={};for(var i=0;i<_4a5.length;i++){_4a6[_4a5[i]]=null;}for(var _4a7 in this._items){if(this._items[_4a7]&&this._items[_4a7]._change&&this._items[_4a7]._change.changeType==this.TYPE_REMOVE){if(_4a7 in _4a6){delete _4a6[_4a7];}}else{_4a6[_4a7]=null;}}var _4a8=[];for(var _4a9 in _4a6){if(Object.prototype.hasOwnProperty.call(_4a6,_4a9)){_4a8.push(_4a9);}}return _4a8;},isReadOnly:function(_4aa){var item=this._items[_4aa];return (this._defaultProperties&&this_defaultProperties.isReadOnly(_4aa))||(item&&item.readOnly);}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.Properties"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.Properties"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.Properties");}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.PropertiesProvider"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.PropertiesProvider"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.PropertiesProvider");dojo.declare("com.ibm.mashups.iwidget.widget.PropertiesProvider",null,{constructor:function(){},getIDescriptorItems:function(){},getAttributes:function(){}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetDefinition_API"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetDefinition_API"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.IWidgetDefinition_API");dojo.provide("com.ibm.mashups.iwidget.widget.IWidgetDefinition");dojo.declare("com.ibm.mashups.iwidget.widget.IWidgetDefinition",[com.ibm.mashups.iwidget.widget.EventProvider,com.ibm.mashups.iwidget.widget.PropertiesProvider],{constructor:function(){},getSupportedModes:function(){},toSpecObject:function(){}});}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetDefinitionDefaultImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetDefinitionDefaultImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.IWidgetDefinitionDefaultImpl");dojo.declare("com.ibm.mm.iwidget.widget.IWidgetDefinitionDefaultImpl",com.ibm.mashups.iwidget.widget.IWidgetDefinition,{namespaces:{"iw":"http://www.ibm.com/xmlns/prod/iWidget"},reservedAttributes:{iScope:"iScope",supportedModes:"supportedModes",id:"id",allowInstanceContent:"allowInstanceContent",lang:"language","xml_lang":"_xml_lang","xmlns_iw":"_xmlns_iw",supportedWindowStates:"supportedWindowStates","xml_base":"_xml_base",sandbox:"sandbox"},constructor:function(_4ab,_4ac,_4ad){this.widgetDef=_4ab;if(_4ac){this.xmlStr=_4ac;}if(_4ad){this.specObject=_4ad;this._specObjectToWidgetDef();}},getXmlBase:function(){if(this.widgetDef.xmlBase){return this.widgetDef.xmlBase;}return null;},getAllowInstanceContent:function(){return this.widgetDef.allowInstanceContent;},getResources:function(){if(!this.resources){this.resources=[];}return this.resources;},getIScope:function(){return this.widgetDef.iScope;},getWidgetEvents:function(){return this.widgetDef.widgetEvents;},getMarkupByMode:function(mode){if(this.widgetDef.markup){if(!mode){mode="view";}var temp=this.widgetDef.markup[mode];return temp;}else{return null;}},setMarkupByMode:function(mode,elem){if(this.widgetDef.markup){if(!mode){mode="view";}this.widgetDef.markup[mode]=elem;return this;}return null;},_getManagedItemSetListener:function(_4ae){if(!_4ae){return null;}if(_4ae!=iwConstants.ATTRIBUTES&&_4ae!=iwConstants.IDESCRIPTOR){return null;}if(this.widgetDef.itemSetsArr){var _4af=this.widgetDef.itemSetsArr[_4ae];if(_4af&&_4af.onItemSetChanged){return _4af.onItemSetChanged;}}return null;},_getManagedItemSetItems:function(_4b0,_4b1){var _4b2={};if(this.widgetDef.itemSetsArr){var _4b3=this.widgetDef.itemSetsArr[_4b0];if(_4b3){for(var _4b4 in _4b3.items){if(Object.prototype.hasOwnProperty.call(_4b3.items,_4b4)){_4b2[_4b4]=_4b3.items[_4b4];}}}}_4b1=_4b1||null;if(_4b1){for(var _4b5 in _4b1){if(Object.prototype.hasOwnProperty.call(_4b1,_4b5)){var _4b6=_4b1[_4b5];if(typeof _4b6!="undefined"&&_4b6!==null){var _4b7={};_4b7.readOnly=false;_4b7.value=_4b6;_4b7.id=_4b5;_4b2[_4b5]=_4b7;}}}}return new com.ibm.mm.iwidget.widget.PropertiesImpl(_4b2);},getAttributes:function(){if(!this.attributeProperties){this.attributeProperties=this._getManagedItemSetItems(iwConstants.ATTRIBUTES,this.widgetDef.simpleAttributes);}return this.attributeProperties;},getIDescriptorItems:function(){if(!this.idescriptorProperties){this.idescriptorProperties=this._getManagedItemSetItems(iwConstants.IDESCRIPTOR,this.widgetDef.iDescriptor);}return this.idescriptorProperties;},getAllItemSetNames:function(){var _4b8=[];if(!this.widgetDef.itemSetsArr){return _4b8;}for(var _4b9 in this.widgetDef.itemSetsArr){if(Object.prototype.hasOwnProperty.call(this.widgetDef.itemSetsArr,_4b9)){var _4ba=this.widgetDef.itemSetsArr[_4b9];if(typeof (_4ba)!="undefined"&&_4b9!=iwConstants.ATTRIBUTES&&_4b9!=iwConstants.IDESCRIPTOR){_4b8.push(_4ba.id);}}}return _4b8;},getItemSet:function(name){if(name=="attributes"){return this.getAttributes();}var _4bb=this.widgetDef.itemSetsArr[name]||null;if(!_4bb){return null;}return _4bb;},getWidgetId:function(){return this.widgetDef.id;},getWidgetName:function(){return this.widgetDef.id;},getPayloadDefs:function(){return null;},getPayloadDef:function(name){return null;},getPayloadDefNames:function(){var arr=[];return arr;},getSupportedModes:function(){var temp=this.widgetDef.supportedModes;if(!temp){return null;}var arr=temp.split(" ");return arr;},getSupportedWindowStates:function(){var temp=this.widgetDef.supportedWindowStates;if(!temp){return null;}var arr=temp.split(" ");return arr;},getDefaultLanguage:function(){return this.widgetDef.lang;},getMarkup:function(){return this.widgetDef.markup;},_specObjectToWidgetDef:function(){this.widgetDef={};if(null===this.specObject){return;}var temp=this.specObject._id;if(!temp){temp=this.specObject._name;}this.widgetDef.id=null;this.widgetDef.name=null;if(temp){this.widgetDef.id=temp;this.widgetDef.name=temp;}this.widgetDef.allowInstanceContent=false;temp=this.specObject._allowInstanceContent;if(temp&&temp=="true"){this.widgetDef.allowInstanceContent=true;}temp=this.specObject._iScope;this.widgetDef.iScope=null;if(temp){this.widgetDef.iScope=temp;}temp=this.specObject._supportedModes;if(!temp){temp="view";}this.widgetDef.supportedModes=temp;temp=this.specObject._supportedWindowStates;if(!temp){temp="normal";}this.widgetDef.supportedWindowStates=temp;temp=this.specObject._lang;if(!temp){temp=this.specObject._xml_lang;}if(!temp){temp="en";}this.widgetDef.lang=temp;temp=this.specObject._xml_base;if(temp){this.widgetDef.xmlBase=temp;}var _4bc=iwConstants.iDescriptorItems;var _4bd={};for(var i in _4bc){if(Object.prototype.hasOwnProperty.call(_4bc,i)){var name=_4bc[i];var _4be=this.specObject["_"+name];if(typeof _4be=="undefined"){_4be=null;}_4bd[name]=_4be;}}this.widgetDef.iDescriptor=_4bd;var _4bf={};var _4c0={};for(var j in this.specObject){if(Object.prototype.hasOwnProperty.call(this.specObject,j)){if(0!==j.indexOf("_")){continue;}var attr=j;attr=attr.substr(1);if(attr.indexOf("on")!==0&&!iwConstants.iDescriptorItems[attr]&&!this.reservedAttributes[attr]){_4bf[attr]=this.specObject[j];}else{if(attr.indexOf("on")===0){_4c0[attr]=this.specObject[j];}}}}this.widgetDef.simpleAttributes=_4bf;this.widgetDef.widgetEvents=_4c0;this.widgetDef.markup=this._extractMarkupFromSpecObject();var _4c1=this._extractItemSetsFromSpecObject(this.widgetDef);if(null!==_4c1){this.widgetDef.itemSetsArr=_4c1;}this.widgetDef.publicEvents=this._extractEventsFromSpecObject();this.widgetDef.resources=this._extractResourcesFromSpecObject();this.widgetDef.eventDescriptions=this._extractEventDescFromSpecObject();},_extractMarkupFromSpecObject:function(){var _4c2=this.specObject.contents;var _4c3={};for(var mode in _4c2){if(Object.prototype.hasOwnProperty.call(_4c2,mode)){if(_4c2[mode]){_4c3[mode]={};if(_4c2[mode]._uri){_4c3[mode].uri=_4c2[mode]._uri;}if(_4c2[mode].value){_4c3[mode].content=_4c2[mode].value;}}}}return _4c3;},_extractItemSetsFromSpecObject:function(_4c4){var _4c5=this.specObject.itemSets;if(_4c5){var _4c6={};var _4c7={};for(var i in _4c5){if(Object.prototype.hasOwnProperty.call(_4c5,i)){var _4c8=_4c5[i];var id=i;var _4c9=_4c8._onItemSetChanged;var temp=_4c8._private;var _4ca=true;if(temp&&temp=="false"){_4ca=false;}var _4cb=_4c8._alias?_4c8._alias:null;var _4cc=_4c8._description;var _4cd={id:id,onItemSetChanged:_4c9,isPrivate:_4ca};if(_4cb){_4cd.alias=_4cb;}_4cd.items={};var _4ce=_4c8.items;for(var j in _4ce){if(Object.prototype.hasOwnProperty.call(_4ce,j)){var item=_4ce[j];var _4cf=false;var _4d0=item._readOnly;if(_4d0&&_4d0=="true"){_4cf=true;}var id2=item._id;var _4d1=item._alias?item._alias:null;var _4d2=item._value;var lang=item._lang;if(!lang){lang=item._xml_lang;}var _4d3={};_4d3.id=id2;if(_4d1){_4d3.alias=_4d1;}_4d3.readOnly=_4cf;if(lang){_4d3.defaultLocale=lang;}if(typeof _4d2!="undefined"&&_4d2!==null&&!lang){_4d3.value=_4d2;}if(typeof _4d2!="undefined"&&_4d2!==null&&lang){_4d3.values={};_4d3.values[lang]=_4d2;}var _4d4=item.alts;for(var v in _4d4){if(Object.prototype.hasOwnProperty.call(_4d4,v)){var _4d5=_4d4[v];var _4d6=v;var _4d7=_4d5._value;if(!_4d3.values){_4d3.values={};}_4d3.values[_4d6]=_4d7;if(lang&&_4d6==lang&&_4d3.value){delete _4d3.value;}}}_4cd.items[id2]=_4d3;}}if(_4ca===true){_4c6[id]=_4cd;}else{_4c7[id]=_4cd;}}}_4c4.shareableItemSetsArr=_4c7;return _4c6;}return null;},_extractEventsFromSpecObject:function(){var _4d8=this.specObject.events;var _4d9={};if(_4d8&&_4d8.length!==0){for(var j in _4d8){if(Object.prototype.hasOwnProperty.call(_4d8,j)){var _4da=_4d8[j];var _4db={};for(var i in _4da){if(Object.prototype.hasOwnProperty.call(_4da,i)){var name=i;if(0===i.indexOf("_")){name=name.substr(1);}var _4dc=_4da[i];if(name=="eventDescName"){name="description";}if(name=="handled"){name="isHandled";}if(name=="published"){name="isPublished";}if(_4dc){_4db[name]=_4dc;}}}_4d9[_4db.id]=_4db;}}}return _4d9;},_extractResourcesFromSpecObject:function(){var _4dd=[];var _4de=this.specObject.resources;var j=0;if(_4de&&_4de.length!==0){for(var i in _4de){if(Object.prototype.hasOwnProperty.call(_4de,i)){var node=_4de[i];var _4df={};var id=node._id;if(!id){id=node._globalid;}_4df[iwConstants.RESOURCE.id]=id?id:null;var src=node._src;if(!src){src=node._uri;}_4df[iwConstants.RESOURCE.src]=src;_4df[iwConstants.RESOURCE.version]=node._version?node._version:null;_4df[iwConstants.RESOURCE.callback]=node._callback?node._callback:null;_4df[iwConstants.RESOURCE.mimeType]=node._mimeType?node._mimeType:null;_4df[iwConstants.RESOURCE.blockInit]=node._blockInit?node._blockInit:null;_4df[iwConstants.RESOURCE.globalid]=node._globalid?node._globalid:null;_4df[iwConstants.RESOURCE.skipLoad]=node._skipLoad?node._skipLoad:null;_4dd[j]=_4df;j++;}}}return _4dd;},_extractPayloadDefsFromSpecObject:function(){var _4e0={};var _4e1=this.specObject.payloadDefs;for(var i in _4e1){if(Object.prototype.hasOwnProperty.call(_4e1,i)){var _4e2=payloadDef[i];}}},_extractEventDescFromSpecObject:function(){var _4e3={};var _4e4=this.specObject.eventDescriptions;if(_4e4&&_4e4.length!==0){for(var i in _4e4){if(Object.prototype.hasOwnProperty.call(_4e4,i)){var node=_4e4[i];var _4e5={};var id=i;_4e5.id=id;_4e5.payloadType=node._payloadType;_4e5.description=node._description;_4e5.title=node._title;_4e5.descriptionURI=node._descriptionURI?node._descriptionURI:null;var lang=node._lang;if(!lang){lang=node._xml_lang;}if(lang){_4e5.lang=lang;}var _4e6=node.alts;for(var j in _4e6){if(Object.prototype.hasOwnProperty.call(_4e6,j)){var _4e7=_4e6[j];var temp={};temp.description=_4e7._description;temp.title=_4e7._title;temp.descriptionURI=_4e7._descriptionURI?aNode_descriptionURI:null;if(!_4e5.descriptions){_4e5.descriptions={};}_4e5.descriptions[j]=temp;}}_4e3[id]=_4e5;}}}return _4e3;},toSpecObject:function(){if(this.specObject){return this.specObject;}var _4e8={};return _4e8;}});com.ibm.mm.iwidget.widget.IWidgetDefinitionImpl=com.ibm.mm.iwidget.widget.IWidgetDefinitionDefaultImpl;if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"iWidget")>=0)){dojo["require"]("com.ibm.mm.iwidget.widget.IWidgetDefinitionExtendedImpl");}}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetDefinition"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetDefinition"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.IWidgetDefinition");}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.ModifiableProperties_API"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.ModifiableProperties_API"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.ModifiableProperties_API");dojo.provide("com.ibm.mashups.iwidget.widget.ModifiableProperties");dojo.declare("com.ibm.mashups.iwidget.widget.ModifiableProperties",[com.ibm.mashups.iwidget.widget.Properties],{constructor:function(){},setItemValue:function(_4e9,_4ea,_4eb,_4ec){},removeItem:function(_4ed){},removeItemValue:function(_4ee,_4ef){}});}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.ModifiablePropertiesImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.ModifiablePropertiesImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.ModifiablePropertiesImpl");dojo.declare("com.ibm.mm.iwidget.widget.ModifiablePropertiesImpl",[com.ibm.mashups.iwidget.widget.ModifiableProperties,com.ibm.mm.iwidget.widget.PropertiesImpl],{constructor:function(_4f0,_4f1){this._dirty=false;},_buildChange:function(item,_4f2,_4f3,_4f4,_4f5){var _4f6=item._dirty;if(!_4f6){item._dirty=true;}var _4f7=item._change?item._change:{};_4f7.id=_4f2;if(_4f5){if(_4f6&&_4f7.changeType&&_4f7.changeType==this.TYPE_NEW){item._dirty=false;delete item._change;return;}else{if(_4f6){_4f7.changeType=this.TYPE_REMOVE;return;}}item._change.changeType=this.TYPE_REMOVE;item._change.oldVal=_4f3;return;}if(_4f6&&_4f7.changeType){if(_4f7.changeType==this.TYPE_NEW){_4f7.newVal=_4f4;}else{_4f7.changeType=this.TYPE_UPDATE;_4f7.newVal=_4f4;}}else{if(_4f3){_4f7.oldVal=_4f3;}if(_4f4){_4f7.newVal=_4f4;}if(_4f3){_4f7.changeType=this.TYPE_UPDATE;}else{_4f7.changeType=this.TYPE_NEW;}}item._change=_4f7;return;},setItemValue:function(_4f8,_4f9,_4fa,_4fb){if(!_4f8||!_4f9){return null;}if(_4f8 in this._items){if(this._defaultProperties&&this._defaultProperties.isReadOnly(_4f8)){return null;}}var _4fc={};var _4fd={};var _4fe;if(!_4fb||(_4fb&&_4fb=="")){if(_4f8 in this._items){_4fc={};_4fd={};if(this._items[_4f8].values){_4fc=dojo.clone(this._items[_4f8].values);if(this._items[_4f8].value){_4fc[""]=this._items[_4f8].value;}_4fd=dojo.clone(this._items[_4f8].values);_4fd[""]=_4f9;}else{if(this._items[_4f8].value){_4fc[""]=this._items[_4f8].value;}_4fd[""]=_4f9;}this._items[_4f8].value=_4f9;this._buildChange(this._items[_4f8],_4f8,_4fc,_4fd);}else{var _4ff={};_4ff.id=_4f8;_4ff.value=_4f9;_4fe=!!_4fa;_4ff.readOnly=_4fe;this._items[_4f8]=_4ff;_4fd={};_4fd[""]=_4f9;this._items[_4f8]=this._items[_4f8]?this._items[_4f8]:{};this._buildChange(this._items[_4f8],_4f8,null,_4fd);}if(this._items[_4f8]._dirty){this._dirty=true;}return this;}var _500=_4fb.replace(/-/g,"_");if(_4f8 in this._items){_4fc={};_4fd={};if(this._items[_4f8].values){_4fc=dojo.clone(this._items[_4f8].values);}this._items[_4f8].values[_500]=_4f9;_4fd=dojo.clone(this._items[_4f8].values);if(this._items[_4f8].value){_4fc[""]=this._items[_4f8].value;_4fd[""]=this._items[_4f8].value;}this._items[_4f8].readOnly=_4fa;this._buildChange(this._items[_4f8],_4f8,_4fc,_4f9);if(this._items[_4f8]._dirty){this._dirty=true;}return this;}var item={};item.values={};item.values[_500]=_4f9;item.id=_4f8;_4fe=!!_4fa;item.readOnly=_4fe;this._items[_4f8]=item;_4fd=dojo.clone(item.values);this._buildChange(this._items[_4f8],_4f8,null,_4fd);if(this._items[_4f8]._dirty){this._dirty=true;}return this;},removeItem:function(_501){if(this._defaultProperties&&this._defaultProperties.isReadOnly(_501)){throw "The specified item ["+_501+"] is readOnly!";}var _502={};var _503=false;if(_501 in this._items){if(this._items[_501]._dirty){this._items[_501].value=this.DELETE_TOKEN;this._items[_501].values=this.DELETE_TOKEN;_502=this._items[_501]._change?this._items[_501]._change:{};if(_502.changeType==this.TYPE_NEW){delete this._items[_501];return this;}else{_502.changeType=this.TYPE_REMOVE;}}else{var _504={};if(this._items[_501].values){_504=dojo.clone(this._items[_501].values);}if(this._items[_501].value){_504[""]=this._items[_501].value;}this._items[_501].value=this.DELETE_TOKEN;this._items[_501].values=this.DELETE_TOKEN;_502={};_502.changeType=this.TYPE_REMOVE;_502.itemName=_501;_502.oldVal=_504;this._items[_501]._change=_502;this._items[_501]._dirty=true;}_503=true;}if(_503){this._dirty=true;return this;}else{return null;}},removeItemValue:function(_505,_506){if(!_506){_506="";}if(this._defaultProperties&&this._defaultProperties.isReadOnly(_505)){throw "The specified item ["+_505+"] is readOnly!";}var _507=_506.replace(/-/g,"_");var _508=false;var _509={};if(_505 in this._items){if(this._items[_505]._dirty){_509=this._items[_505]._change?this._items[_505]._change:{};if(_509.changeType==this.TYPE_REMOVE){return null;}else{if(_509.changeType==this.TYPE_NEW){if(_507==""&&this._items[_505].value&&this._items[_505].value!=this.DELETE_TOKEN){delete this._items[_505].value;if(this._items[_505]._change.newVal[""]){delete this._items[_505]._change.newVal[""];}_508=true;}if(_507!=""){if(this._items[_505].values[_507]){delete this._items[_505].values[_507];if(this._items[_505]._change.newVal[_507]){delete this._items[_505]._change.newVal[_507];}_508=true;}}if(this._isEmpty(this._items[_505]._change.newVal)){delete this._items[_505]._dirty;delete this._items[_505]._change;}}else{if(_507==""&&this._items[_505].value&&this._items[_505].value!=this.DELETE_TOKEN){delete this._items[_505].value;if(this._items[_505]._change.newVal[""]){delete this._items[_505]._change.newVal[""];}_508=true;}if(this._items[_505].values[_507]){delete this._items[_505].values[_507];if(this._items[_505]._change.newVal[_507]){delete this._items[_505]._change.newVal[_507];}_508=true;}}}}else{var _50a={};var _50b={};if(_507==""&&this._items[_505].value){_509={};_509.id=_505;_50a={};_50b={};if(this._items[_505].values){_509.changeType=this.TYPE_UPDATE;_50a=dojo.clone(this._items[_505].values);_50a[""]=this._items[_505][""];_509.oldVal=_50a;_509.newVal=dojo.clone(this._items[_505].values);delete this._items[_505].value;}else{_509.changeType=this.TYPE_REMOVE;_50a[""]=this._items[_505][""];_509.oldVal=_50a;delete this._items[_505].value;}this._items[_505]._change=_509;this._items[_505]._dirty=true;_508=true;}if(_507 in this._items[_505].values){_509={};_509.id=_505;_50a={};_50b={};if(this._items[_505].value){_509.changeType=this.TYPE_UPDATE;_50a=dojo.clone(this._items[_505].values);_50a[""]=this._items[_505][""];_509.oldVal=_50a;_509.newVal=dojo.clone(this._items[_505].values);_509.newVal[""]=this._items[_505].value;delete _509.newVal[_507];delete this._items[_505].value;}else{_50a=dojo.clone(this._items[_505].values);delete this._items[_505].values[_507];if(this._isEmpty(this._items[_505].values)){_509.changeType=this.TYPE_REMOVE;}else{_509.changeType=this.TYPE_UPDATE;_509.newVal=dojo.clone(this._items[_505].values);}_509.oldVal=_50a;}this._items[_505]._change=_509;this._items[_505]._dirty=true;_508=true;}}}if(_508){this._dirty=true;return this;}else{return null;}},_isDirty:function(){return this._dirty;},_setDirty:function(_50c){this._dirty=_50c;},_isItemDirty:function(_50d){if(!_50d){return false;}var _50e=false;if(this._items[_50d]){_50e=this._items[_50d]._dirty;}return _50e;},_setItemDirty:function(_50f,_510){if(!_50f){return;}if(this._items[_50f]){this._items[_50f]._dirty=_510;if(typeof _510!="undefined"&&!_510){delete this._items[_50f]._dirty;delete this._items[_50f]._change;}if(this._items[_50f].values&&this._items[_50f].values==this.DELETE_TOKEN){delete this._items[_50f].values;}if(this._items[_50f].value&&this._items[_50f].value==this.DELETE_TOKEN){delete this._items[_50f].value;}if(!this._items[_50f].value&&!this._items[_50f].values){delete this._items[_50f];}}},_getInternalItemValue:function(_511){if(this._items[_511]){return this._items[_511];}return null;},_isEmpty:function(obj){return com.ibm.mm.enabler.utils.Misc.isEmpty(obj);},_getRequiredValue:function(obj,_512){if(!obj){return null;}if(dojo.isString(obj)){return obj;}if(_512){if(obj[_512]){return obj[_512];}else{return null;}}var _513=null;var j=0;for(var i in obj){if(Object.prototype.hasOwnProperty.call(obj,i)){if(i==""){_513=obj[i];}j++;}}if(_513&&j==1){return _513;}return obj;},_updateProperties:function(_514){var _515=dojo.mixin(this._items,_514);this._items=_515;this._dirty=true;},toJson:function(){return this._items;}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.ModifiableProperties"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.ModifiableProperties"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.ModifiableProperties");}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.ModifiablePropertiesProvider"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.ModifiablePropertiesProvider"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.ModifiablePropertiesProvider");dojo.declare("com.ibm.mashups.iwidget.widget.ModifiablePropertiesProvider",null,{constructor:function(){},getIDescriptorItems:function(){},getAttributes:function(){}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.ModifiableWireProvider"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.ModifiableWireProvider"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.ModifiableWireProvider");dojo.declare("com.ibm.mashups.iwidget.widget.ModifiableWireProvider",com.ibm.mashups.iwidget.widget.WireProvider,{constructor:function(id){},addWire:function(_516,_517,_518){},removeWire:function(_519,_51a,_51b){}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetInstance_API"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetInstance_API"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.IWidgetInstance_API");dojo.provide("com.ibm.mashups.iwidget.widget.IWidgetInstance");dojo.declare("com.ibm.mashups.iwidget.widget.IWidgetInstance",[com.ibm.mashups.iwidget.widget.ModifiablePropertiesProvider,com.ibm.mashups.iwidget.widget.ModifiableWireProvider],{constructor:function(){}});}if(!dojo._hasResource["com.ibm.mm.iwidget.Utils"]){dojo._hasResource["com.ibm.mm.iwidget.Utils"]=true;dojo.provide("com.ibm.mm.iwidget.Utils");dojo.declare("com.ibm.mm.iwidget.UtilsDefaultImpl",null,{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.iwidget.Utils");this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},widgetClassRE:new RegExp("(mm:|mm_|iw-)iWidget"),findElementByAttribute:function(att,_51c,root,_51d,_51e){var _51f=root;if(!root.childNodes){return false;}if(att=="class"){dojo.query("."+_51c,root).forEach(function(ele){_51d.push(ele);});return _51d.length!==0;}else{if(att=="query"){dojo.query(_51c,root).forEach(function(ele){_51d.push(ele);});return _51d.length!==0;}}if(root.getElementsByTagName){var _520=root.getElementsByTagName("*");for(var i=0,l=_520.length;i=0)){dojo["require"]("com.ibm.mm.iwidget.UtilsExtended");}else{com.ibm.mm.iwidget.Utils=new com.ibm.mm.iwidget.UtilsDefaultImpl();}}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetInstanceDefaultImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetInstanceDefaultImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.IWidgetInstanceDefaultImpl");dojo.declare("com.ibm.mm.iwidget.widget.IWidgetInstanceDefaultImpl",com.ibm.mashups.iwidget.widget.IWidgetInstance,{constructor:function(_52d,_52e,id){this.wrapper=_52d;this.rootElement=_52e;this.id=id;this.ns=_52e.className.substr(0,3);var _52f=[];var _530=this.ns+"Definition";com.ibm.mm.iwidget.Utils.findElementByAttribute("query","> ."+_530,this.rootElement,_52f,false);if(_52f&&_52f.length>0){var node=_52f[0];var url=node.getAttribute("href");if(typeof (url)!="undefined"&&url!==null){this.widgetXMLUrl=url;}}this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},_destroy:function(){if(this.rootElement){this.rootElement=null;}},getDefaultViewContent:function(){if(this.defaultViewContent){return this.defaultViewContent;}var _531=this.ns+"Content";var node=null;var _532=dojo.query("> ."+_531+"."+iwConstants.mode_view,this.rootElement);if(_532){node=_532[0];}if(!node){_532=dojo.query("> ."+_531,this.rootElement);if(_532){node=_532[0];}}if(node){this.defaultViewContent=node.innerHTML;return this.defaultViewContent;}else{return null;}},getWidgetEvents:function(){if(this.widgetEvents){return this.widgetEvents;}var _533={};var _534=this.rootElement.attributes;for(var i=0;i<_534.length;i++){var _535=_534[i];if(_535.name!==null&&_535.name.indexOf("on")===0){var _536=this.rootElement.getAttribute(_535.name);if(typeof _536!="undefined"&&_536!==null){_533[_535.name]=_536;if(this.bIsLoggable){this.LOGGER.trace("iWidgetInstance.getWidgetEvents","eventName:"+_535.name+" handler:"+_533[_535.name]);}}}}this.widgetEvents=_533;return this.widgetEvents;},_addWire:function(wire){},_removeWire:function(id){},addWire:function(_537,_538,_539){},removeWire:function(_53a,_53b,_53c){},_getPublicEvents:function(){return null;},getWires:function(){return [];},getWireModel:function(){return null;},getAttributes:function(){if(!this.attributeProperties){var _53d=this.getItemSets()[iwConstants.ATTRIBUTES];var _53e={};if(_53d){for(var _53f in _53d){if(Object.prototype.hasOwnProperty.call(_53d,_53f)){_53e[_53f]=_53d[_53f];}}}this.attributeProperties=new com.ibm.mm.iwidget.widget.ModifiablePropertiesImpl(_53e);}return this.attributeProperties;},getIDescriptorItems:function(){if(!this.idescriptorProperties){var _540=this.getItemSets()[iwConstants.IDESCRIPTOR];var _541={};if(_540){for(var _542 in _540){if(Object.prototype.hasOwnProperty.call(_540,_542)){_541[_542]=_540[_542];}}}this.idescriptorProperties=new com.ibm.mm.iwidget.widget.ModifiablePropertiesImpl(_541);}return this.idescriptorProperties;},_getItemSets:function(){if(this.itemSets){return this.itemSets;}this.loadItemSets();return this.itemSets;},getItemSets:function(){return this._getItemSets();},getItemSet:function(_543){if(!_543){return null;}var _544=this._getItemSets();if(_544&&_544[_543]){return _544[_543];}},loadItemSets:function(){this.itemSets=this._loadItemSetsOptimized(this.rootElement,this.ns);},_loadItemSetsOptimized:function(_545,ns){var _546={};if(_545.childNodes.length){dojo.query("> ."+ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwItemSet+" > ."+ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwItem,_545).forEach(function(item){var _547=dojo.attr(item.parentNode,"title");if(_547){if(!_546[_547]){_546[_547]={};}var _548=this._loadItemOptimized(item,ns);_546[_547][_548.id]=_548;}},this);}return _546;},_loadItemOptimized:function(elem,ns){var css=com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE;var item={id:com.ibm.mm.iwidget.Utils.stripHashPrefix(dojo.attr(elem,"href")),readOnly:dojo.hasClass(elem,ns+css.iwReadOnly)};var lang=dojo.attr(elem,"lang");if(lang){item.defaultLocale=lang;}var _549;var _54a=dojo.query("> ."+ns+css.iwValue,elem);if(_54a.length){item.values={};_54a.forEach(function(_54b){var _54c=dojo.attr(_54b,"lang")||lang;item.values[_54c]=com.ibm.mm.enabler.utils.Dom.textContent(_54b);});}else{_549=com.ibm.mm.enabler.utils.Dom.textContent(elem);if(dojo.isString(_549)){item.value=dojo.string.trim(_549);}}return item;},_invalidateItemSets:function(name){if(!name){this.itemSets={};}else{this.itemSets[name]={};}},_getInstanceMarkup:function(){var node=dojo.clone(this.rootElement);dojo.query("> ."+this.ns+"Content",node).forEach(function(_54d){com.ibm.mm.enabler.utils.Dom.destroyNode(_54d);});dojo.query("> ."+this.ns+"loading",node).forEach(function(_54e){com.ibm.mm.enabler.utils.Dom.destroyNode(_54e);});var _54f=document.createElement("div");_54f.appendChild(node);var html=_54f.innerHTML;return html;}});com.ibm.mm.iwidget.widget.IWidgetInstanceImpl=com.ibm.mm.iwidget.widget.IWidgetInstanceDefaultImpl;if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"iWidget")>=0)){dojo["require"]("com.ibm.mm.iwidget.widget.IWidgetInstanceExtendedImpl");}}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetInstance"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetInstance"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.IWidgetInstance");}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetWrapper_API"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetWrapper_API"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.IWidgetWrapper_API");dojo.provide("com.ibm.mashups.iwidget.widget.IWidgetWrapper");dojo.declare("com.ibm.mashups.iwidget.widget.IWidgetWrapper",[com.ibm.mashups.iwidget.widget.WireProvider,com.ibm.mashups.iwidget.widget.EventProvider],{constructor:function(){},getIWidgetDefinition:function(){},setIWidgetDefinition:function(_550){},getIWidgetInstance:function(){},getMarkup:function(){},isLoaded:function(){},isStandalone:function(){},doRender:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.aggregation.javascript.Filter"]){dojo._hasResource["com.ibm.mm.enabler.aggregation.javascript.Filter"]=true;dojo.provide("com.ibm.mm.enabler.aggregation.javascript.Filter");function com_ibm_enabler_aggregation_javascript_globalEvalNonIE(_551){eval.call(self,_551);};dojo.declare("com.ibm.mm.enabler.aggregation.javascript.Filter",null,{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},doFilter:function(_552){},evalGlobal:function(_553){if(window.execScript){window.execScript(this._stripHTMLComments(_553),"JavaScript");}else{com_ibm_enabler_aggregation_javascript_globalEvalNonIE(_553);}},_stripHTMLComments:function(str){if(this.bIsLoggable){this.LOGGER.entering("com.ibm.mm.enabler.aggregation.javascript.Filter._stripHTMLComments",[str]);}var _554=str;_554=_554.replace(/)]+-->/g,"");if(this.bIsLoggable){this.LOGGER.exiting("com.ibm.mm.enabler.aggregation.javascript.Filter._stripHTMLComments",[_554]);}return _554;},prepareDocumentWrite:function(_555){if(this.bIsLoggable){this.LOGGER.entering("com.ibm.mm.enabler.aggregation.javascript.Filter.prepareDocumentWrite");}var me=this;document.write=function(){me._documentWrite(_555,document.write.arguments);};document.writeln=function(str){me._documentWrite(_555,document.writeln.arguments);};if(this.bIsLoggable){this.LOGGER.exiting("com.ibm.mm.enabler.aggregation.javascript.Filter.prepareDocumentWrite");}},_documentWrite:function(_556,args){for(var i=0,l=args.length;i0){var i=0;if(dojo.isIE||window.ActiveXObject!==undefined){cont="
"+cont;i++;}var div=dojo.create("div",{innerHTML:cont});var _559=dojo.isIE||window.ActiveXObject!==undefined||dojo.isWebKit||dojo.isOpera;var _55a=div.childNodes||null;if(_55a!==null&&_55a.length>0){var pred=_557;var l;var _55b=[];while(i<(l=_55a.length)){var node=_55a[l-1];dojo.place(node,pred,"before");if(_559&&node.tagName&&node.tagName.toLowerCase()=="script"){_55b.unshift(node);}pred=node;}if(_559){dojo.forEach(_55b,function(scr){com.ibm.mm.enabler.aggregation.javascript.JAVASCRIPT_HANDLER.handle(scr);});}}dojo.destroy(div);}if(this.bIsLoggable){this.LOGGER.exiting("com.ibm.mm.enabler.aggregation.javascript.Filter.applyDocumentWrite");}}});}if(!dojo._hasResource["com.ibm.mm.enabler.aggregation.javascript.ExternalScriptFilter"]){dojo._hasResource["com.ibm.mm.enabler.aggregation.javascript.ExternalScriptFilter"]=true;dojo.provide("com.ibm.mm.enabler.aggregation.javascript.ExternalScriptFilter");dojo.declare("com.ibm.mm.enabler.aggregation.javascript.ExternalScriptFilter",com.ibm.mm.enabler.aggregation.javascript.Filter,{doFilter:function(_55c){var url=this._getScriptUrl(_55c);var _55d=false;if(url){var _55e=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME).getValue(com.ibm.mashups.enabler.services.ConfigConstants.PROXY_URL);_55e=_55e||null;if(_55e!==null){_55e+="/";url=this._rewriteURL(url,_55e);}var _55f={content:""};this.prepareDocumentWrite(_55f);this._loadExternalScript(url);this.applyDocumentWrite(_55c,_55f);_55d=true;}return _55d;},_getScriptUrl:function(_560){var url=null;if(_560.getAttribute){url=_560.getAttribute("src");}else{var _561=_560.toLowerCase().indexOf("");var _562=_560.substring(_561,end);var _563=_562.toLowerCase().indexOf("src");if(_563!=-1){var _564=_562.indexOf("'",_563);var _565=_562.indexOf("\"",_563);var _566="\"";var _567=_565;if(_565==-1||(_564!=-1&&_564<_565)){_566="'";_567=_564;}var _568=_562.indexOf(_566,_567+1);url=_562.substring(_567+1,_568);}}return url;},loadExternalScript:function(url){var _569=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME).getValue(com.ibm.mashups.enabler.services.ConfigConstants.PROXY_URL);_569=_569||null;if(_569!==null){_569+="/";url=this._rewriteURL(url,_569);}this._loadExternalScript(url);},_loadExternalScript:function(url){var me=this;dojo.xhrGet({url:url,load:function(data,_56a){if(this.bIsLoggable){this.LOGGER.trace("com.ibm.mm.enabler.aggregation.javascript.Filter._loadExternalScript","Retrieved JS file: ${0}",[data]);}me.evalGlobal(data);},sync:true,handleAs:"text"});},_rewriteURL:function(_56b,_56c){var _56d=_56c;var host=window.location.host;var _56e=window.location.protocol;if(_56b.indexOf("://")<0||_56b.indexOf(_56e)===0&&_56b.indexOf(host)==_56e.length+2){return _56b;}if(_56b.indexOf("https")===0){_56d+="https/";}else{_56d+="http/";}_56d+=_56b.substr(_56b.indexOf("://")+3);return _56d;}});}if(!dojo._hasResource["com.ibm.mm.enabler.aggregation.javascript.FilterChain"]){dojo._hasResource["com.ibm.mm.enabler.aggregation.javascript.FilterChain"]=true;dojo.provide("com.ibm.mm.enabler.aggregation.javascript.FilterChain");dojo.declare("com.ibm.mm.enabler.aggregation.javascript.FilterChain",null,{constructor:function(){this._filters=[];},addFilter:function(_56f){if(!this._filters){this._filters=[];}this._filters.push(_56f);},applyFilters:function(_570){var _571=false;for(var i=0,l=this._filters.length;i");var _577=_575.lastIndexOf("<");_574=_575.substring(_576+1,_577);}if(this.bIsLoggable){this.LOGGER.trace("com.ibm.mm.enabler.aggregation.javascript.InlineScriptFilter.doFilter","Stripped HTML tags out: "+_574);}if(_574){var _578={content:""};this.prepareDocumentWrite(_578);this.evalGlobal(_574);_573=true;this.applyDocumentWrite(_572,_578);}return _573;}});}if(!dojo._hasResource["com.ibm.mm.enabler.aggregation.javascript.WidgetJavascriptHandler"]){dojo._hasResource["com.ibm.mm.enabler.aggregation.javascript.WidgetJavascriptHandler"]=true;dojo.provide("com.ibm.mm.enabler.aggregation.javascript.WidgetJavascriptHandler");dojo.declare("com.ibm.mm.enabler.aggregation.javascript.WidgetJavascriptHandler",null,{constructor:function(){this.filterChain=new com.ibm.mm.enabler.aggregation.javascript.FilterChain();this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},handle:function(_579){if(this.bIsLoggable){this.LOGGER.entering("WidgetJavascriptHandler.handle",[_579]);}var val=this.filterChain.applyFilters(_579);if(this.bIsLoggable){this.LOGGER.exiting("WidgetJavascriptHandler.handle");}}});}if(!dojo._hasResource["com.ibm.mm.enabler.aggregation.javascript"]){dojo._hasResource["com.ibm.mm.enabler.aggregation.javascript"]=true;dojo.provide("com.ibm.mm.enabler.aggregation.javascript");com.ibm.mm.enabler.aggregation.javascript.JAVASCRIPT_HANDLER=new com.ibm.mm.enabler.aggregation.javascript.WidgetJavascriptHandler();com.ibm.mm.enabler.aggregation.javascript.JAVASCRIPT_HANDLER.filterChain.addFilter(new com.ibm.mm.enabler.aggregation.javascript.ExternalScriptFilter());com.ibm.mm.enabler.aggregation.javascript.JAVASCRIPT_HANDLER.filterChain.addFilter(new com.ibm.mm.enabler.aggregation.javascript.InlineScriptFilter());}if(!dojo._hasResource["com.ibm.mashups.iwidget.Constants"]){dojo._hasResource["com.ibm.mashups.iwidget.Constants"]=true;dojo.provide("com.ibm.mashups.iwidget.Constants");dojo.declare("com.ibm.mashups.iwidget.Constants",null,{WIDGET_LOADED:"com.ibm.mashups.iwidget.widgetloaded",RESIZE_WIDGET:"com.ibm.mashups.iwidget.resizewidget",UNLOAD_WIDGETS:"com.ibm.mashups.iwidget.unloadwidgets",WIDGETS_UNLOADED:"com.ibm.mashups.iwidget.widgetsunloaded",WIDGET_MODECHANGED:"com.ibm.mashups.iwidget.widgetmodechanged",CHANGE_WIDGETMODE:"com.ibm.mashups.iwidget.changewidgetmode",WIDGET_WINDOWSTATECHANGED:"com.ibm.mashups.iwidget.widgetwindowstatechanged",CHANGE_WIDGETWINDOWSTATE:"com.ibm.mashups.iwidget.changewidgetwindowstate",NAVSTATE_UPDATED:"com.ibm.mashups.enabler.model.state.onNavStateUpdated"});com.ibm.mashups.iwidget.Constants=new com.ibm.mashups.iwidget.Constants();}if(!dojo._hasResource["com.ibm.mashups.iwidget.iEvents_API"]){dojo._hasResource["com.ibm.mashups.iwidget.iEvents_API"]=true;dojo.provide("com.ibm.mashups.iwidget.iEvents_API");dojo.provide("com.ibm.mashups.iwidget.iEvents");dojo.declare("com.ibm.mashups.iwidget.iEvents",null,{constructor:function(){},fireEvent:function(_57a,_57b,_57c){},setEvent:function(_57d){},setEvents:function(_57e){},removeEvent:function(_57f){},removeEvents:function(_580){},getEvents:function(_581){},createEventDescription:function(_582){}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.IEvent_API"]){dojo._hasResource["com.ibm.mashups.iwidget.IEvent_API"]=true;dojo.provide("com.ibm.mashups.iwidget.IEvent_API");dojo.provide("com.ibm.mashups.iwidget.IEvent");dojo.declare("com.ibm.mashups.iwidget.IEvent",null,{constructor:function(){},name:"",type:"",payload:null,source:""});}if(!dojo._hasResource["com.ibm.mashups.iwidget.IEvent"]){dojo._hasResource["com.ibm.mashups.iwidget.IEvent"]=true;dojo.provide("com.ibm.mashups.iwidget.IEvent");}if(!dojo._hasResource["com.ibm.mm.iwidget.IEventImpl"]){dojo._hasResource["com.ibm.mm.iwidget.IEventImpl"]=true;dojo.provide("com.ibm.mm.iwidget.IEventImpl");dojo.declare("com.ibm.mm.iwidget.IEventImpl",com.ibm.mashups.iwidget.IEvent,{constructor:function(name,type,_583,_584){this.name=name;if(typeof type!="undefined"){this.type=type;}else{this.type=null;}if(typeof _583!="undefined"){this.payload=_583;}else{this.payload=null;}if(typeof _584!="undefined"){this.source=_584;}else{this.source=null;}this.source=_584;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.icontext.IContextIEventsImpl"]){dojo._hasResource["com.ibm.mm.iwidget.icontext.IContextIEventsImpl"]=true;dojo.provide("com.ibm.mm.iwidget.icontext.IContextIEventsImpl");dojo.declare("com.ibm.mm.iwidget.icontext.IContextIEventsImpl",com.ibm.mashups.iwidget.iEvents,{constructor:function(_585){this.widget=_585;this.id=_585.id;this.svc=com.ibm.mashups.services.ServiceManager.getService("eventService");this.timer=null;this.timerEventQ=[];this.allTargetWidgetsLoaded=false;this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},createEventDescription:function(_586){return new com.ibm.mm.iwidget.IEventDescriptionImpl(_586);},getEvents:function(_587){var _588=this.widget._getPublicEvents();var _589=_588.getEvents(_587);if(!_589){return null;}var arr=[];for(var i in _589){if(Object.prototype.hasOwnProperty.call(_589,i)){arr.push(_589[i].clone());}}return arr;},setEvent:function(_58a){var _58b=this.widget._getPublicEvents();var rc=_58b.eventExists(_58a.name);var _58c=false;if(rc){_58c=_58b.isUpdateEventRequired(_58a);}else{_58c=true;}if(_58c){var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME);if(cs){cs.switchToModifiablePersistenceMode(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS);}}_58b=this.widget._getPublicEvents();rc=_58b.eventExists(_58a.name);if(rc){if(this.widget._inIframe()){this.svc._publishEvent(this.svc.WIDGETEVENT_PREFIX+"_stub_"+this.id,{"scope":"eventmodel","methodname":"updateEvent","params":[_58a.toJson()]},this.id);}rc=_58b.updateEvent(_58a);}else{if(this.widget._inIframe()){this.svc._publishEvent(this.svc.WIDGETEVENT_PREFIX+"_stub_"+this.id,{"scope":"eventmodel","methodname":"createEvent","params":[_58a.toJson()]},this.id);}rc=_58b.createEvent(_58a);}return rc;},removeEvent:function(_58d){var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME);if(cs){cs.switchToModifiablePersistenceMode(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS);}if(this.widget._inIframe()){this.svc._publishEvent(this.svc.WIDGETEVENT_PREFIX+"_stub_"+this.id,{"scope":"eventmodel","methodname":"removeEvent","params":[_58d]},this.id);}var _58e=this.widget._getPublicEvents();var rc=_58e.removeEvent(_58d);return rc;},publishEvent:function(_58f,_590,_591){return this.fireEvent(_58f,_591,_590);},fireEvent:function(_592,_593,_594){var _595="fireEvent(eventName, payloadType, payload)";if(this.bIsLoggable){this.LOGGER.entering(_595,[_592,_593,_594]);}if(this.allTargetWidgetsLoaded){this._fireEventFinish(_592,_593,_594);}else{this.timerEventQ.push({"eventName":_592,"payloadType":_593,"payload":_594});if(!this.timer){var _596=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel();var _597=dojo.query("."+this.widget.ns+"ReceivedEvent");var _598=[];for(var i=0;i<_597.length;i++){var _599=dojo.query("."+this.widget.ns+"SourceEvent",_597[i])[0];if(_599){var href=_599.getAttribute("href");if(href.indexOf(this.widget.id)!=-1){var _59a=_596.find(_597[i].parentNode.id);if(_59a){_598.push(_59a);}}}}this.timer_tries=0;this.timer=setInterval(dojo.hitch(this,"_fireEventContinue",_598),5);}}if(this.bIsLoggable){this.LOGGER.exiting(_595);}},_fireEventContinue:function(_59b){var _59c="_fireEventContinue(target_widgets)";if(this.bIsLoggable){this.LOGGER.entering(_59c,[_59b]);}for(var i=0;i<_59b.length;i++){if(!_59b[i].isLoaded()&&(this.timer_tries<20)){this.timer_tries++;if(this.bIsLoggable){this.LOGGER.trace(_59c,"Not all target widgets are loaded, retry "+this.timer_tries);}if(this.bIsLoggable){this.LOGGER.exiting(_59c);}return;}}clearInterval(this.timer);this.timer_tries=0;while(this.timerEventQ.length>0){var _59d=this.timerEventQ.shift();this._fireEventFinish(_59d.eventName,_59d.payloadType,_59d.payload);}this.allTargetWidgetsLoaded=true;this.timer=null;if(this.bIsLoggable){this.LOGGER.exiting(_59c);}},_fireEventFinish:function(_59e,_59f,_5a0){var _5a1="_fireEventFinish(eventName, payloadType, payload)";if(this.bIsLoggable){this.LOGGER.entering(_5a1,[_59e,_59f,_5a0]);}var _5a2=this.widget._getPublicEvents();var _5a3=false;var temp;if(_5a2){temp=_5a2.find(_59e);if(temp){_59f=temp.type;}if(temp&&temp.handlingFn){_5a3=true;}}var _5a4=new com.ibm.mm.iwidget.IEventImpl(_59e,_59f,_5a0,null);if(!_5a3){this.widget.handleEvent(_5a4);}if(_5a2){temp=_5a2.find(_59e);if(temp&&temp.isPublished){this.svc.publishWire(this.id,_59e,_5a0,_59f);}}if(this.bIsLoggable){this.LOGGER.exiting(_5a1);}},setEvents:function(_5a5){var _5a6=this.widget._getPublicEvents();if(this.widget._inIframe()){var arr=[];for(var i=0;i<_5a5.length;i++){arr.push(_5a5[i].toJson());}this.svc._publishEvent(this.svc.WIDGETEVENT_PREFIX+"_stub_"+this.id,{"scope":"eventmodel","methodname":"setEvents","params":[arr]},this.id);}rc=_5a6.setEvents(_5a5);return rc;},removeEvents:function(_5a7){if(this.widget._inIframe()){this.svc._publishEvent(this.svc.WIDGETEVENT_PREFIX+"_stub_"+this.id,{"scope":"eventmodel","methodname":"removeEvents","params":[_5a7]},this.id);}var _5a8=this.widget._getPublicEvents();var rc=_5a8.removeEvents(_5a7);return rc;}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.iEvents"]){dojo._hasResource["com.ibm.mashups.iwidget.iEvents"]=true;dojo.provide("com.ibm.mashups.iwidget.iEvents");}if(!dojo._hasResource["com.ibm.mashups.iwidget.io_API"]){dojo._hasResource["com.ibm.mashups.iwidget.io_API"]=true;dojo.provide("com.ibm.mashups.iwidget.io_API");dojo.provide("com.ibm.mashups.iwidget.io");dojo.declare("com.ibm.mashups.iwidget.io",null,{constructor:function(){},XMLHttpRequest:function(){},rewriteURI:function(uri,_5a9){return null;},xhrReq:function(args){return;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.icontext.IContextIOImpl"]){dojo._hasResource["com.ibm.mm.iwidget.icontext.IContextIOImpl"]=true;dojo.provide("com.ibm.mm.iwidget.icontext.IContextIOImpl");dojo.declare("com.ibm.mm.iwidget.icontext.IContextIOImpl",com.ibm.mashups.iwidget.io,{constructor:function(_5aa){this.id=_5aa.id;this.widget=_5aa;this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},XMLHttpRequest:function(){return dojo._xhrObj();},rewriteURI:function(uri,_5ab){if(this.bIsLoggable){this.LOGGER.entering("com.ibm.mm.iwidget.io.rewriteURI",[uri,_5ab]);}var _5ac=this.widget._rewriteURI(uri,_5ab);if(this.bIsLoggable){this.LOGGER.exiting("com.ibm.mm.iwidget.io.rewriteURI",[_5ac]);}return _5ac;},getWebAppRootPath:function(){if(this.rootPath){return this.rootPath;}var _5ad=this.widget.getIWidgetInstance().widgetXMLUrl;_5ad=this.widget._getRawBaseUri(_5ad);_5ad=this.widget._getResolvedPocUri(_5ad);var _5ae=null;if(_5ad&&_5ad.indexOf("/")===0){var temp=_5ad.substring(1);if(temp.indexOf("/")>0){_5ae="/"+temp.substring(0,temp.indexOf("/"));}else{_5ae=_5ad;}}if(_5ae){this.rootPath=_5ae;return _5ae;}if(_5ad&&_5ad.indexOf("://")>0){var _5af=_5ad.split("/");if(_5af.length>=4){_5ae=_5af[0]+"http://"+_5af[2]+"/"+_5af[3];}}if(_5ae){this.rootPath=_5ae;return _5ae;}return null;},request:function(_5b0,uri,_5b1,_5b2,_5b3){var xhr=dojo._xhrObj();var _5b4=this.rewriteURI(uri);var _5b5=false;if(_5b1){xhr.onreadystatechange=_5b1;_5b5=true;}var _5b6=_5b0||null;if(!_5b0){_5b6=this.httpmethods.GET;}if(_5b0){if(!this.httpmethods[_5b0]){_5b6=this.httpmethods.GET;}}xhr.open(_5b6,_5b4,_5b5);var _5b7=null;var _5b8="application/x-www-form-urlencoded";if(_5b3){for(var i=0;i<_5b3.length;i++){var _5b9=_5b3[i];var _5ba=_5b9[_5ba];var _5bb=_5b9[_5bb];if(_5ba=="Content-Type"){_5b7=_5bb;}else{xhr.setRequestHeader(_5ba,_5bb);}}}xhr.setRequestHeader("Content-Type",(_5b7||_5b8));if(_5b6==this.httpmethods.PUT||_5b6==this.httpmethods.POST){if(_5b2){xhr.send(_5b2);}}else{xhr.send(null);}return xhr;},xhrReq:function(args){if(!args){return;}var _5bc=com.ibm.mashups.enabler.io.XHRMultipartFactory;if(!args.requestVerb||!args.url||!args.handleAs){return;}var _5bd=args.requestVerb;if(_5bd&&!this.requestVerbs[_5bd]){_5bd=this.requestVerbs.get;}if(_5bd&&_5bd==this.requestVerbs.get){var obj=args;delete obj.requestVerb;obj.ibmMultipart={context:_5bc.CONTEXT_ENABLER};dojo.xhrGet(obj);return;}if(_5bd&&_5bd==this.requestVerbs.put){var obj1=args;delete obj1.requestVerb;if(obj1.msgData){obj1.putData=obj1.msgData;delete obj1.msgData;}obj1.ibmMultipart={context:_5bc.CONTEXT_ENABLER};dojo.xhrPut(obj1);return;}if(_5bd&&_5bd==this.requestVerbs["delete"]){var obj2=args;delete obj2.requestVerb;obj2.ibmMultipart={context:_5bc.CONTEXT_ENABLER};dojo.xhrDelete(obj2);return;}if(_5bd&&_5bd==this.requestVerbs.post){var obj3=args;delete obj3.requestVerb;if(obj3.msgData){obj3.postData=obj3.msgData;delete obj3.msgData;}obj3.ibmMultipart={context:_5bc.CONTEXT_ENABLER};dojo.xhrPost(obj3);return;}},httpmethods:{GET:"GET",PUT:"PUT",POST:"POST",DELETE:"DELETE"},requestVerbs:{get:"get",put:"put",post:"post","delete":"delete"}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.io"]){dojo._hasResource["com.ibm.mashups.iwidget.io"]=true;dojo.provide("com.ibm.mashups.iwidget.io");}if(!dojo._hasResource["com.ibm.mashups.iwidget.iContext_API"]){dojo._hasResource["com.ibm.mashups.iwidget.iContext_API"]=true;dojo.provide("com.ibm.mashups.iwidget.iContext_API");dojo.provide("com.ibm.mashups.iwidget.iContext");dojo.declare("com.ibm.mashups.iwidget.iContext",null,{constructor:function(){},constants:{mode:{VIEW:"view",EDIT:"edit",PERSONALIZE:"personalize",CONFIG:"config",HELP:"help"},event:{TITLE:"title",DESCRIPTION:"description"},ATTRIBUTES:"attributes",IDESCRIPTOR:"idescriptor",USERPROFILE:"userprofile",keys:{SHIFT:1,ALT:2,CTRL:4,META:8,CAPSLOCK:16},windowstate:{NORMAL:"normal",MINIMIZE:"minimize",MAXIMIZE:"maximize"},status:{SUCCESS:200,TIMEOUT:408,NOTFOUND:404,INTERROR:500,OTHER:303},changeType:{CHANGEDVALUE:"changedValue",NEWITEM:"newItem",REMOVEDITEM:"removedItem"}},getWidgetId:function(){return null;},getRootElement:function(){return null;},getElementById:function(id,root){return null;},getiWidgetAttributes:function(){return {};},getItemSet:function(name,_5be){return null;},getShareableItemSet:function(name){return null;},requires:function(_5bf,_5c0,uri,cb,_5c1){},iScope:function(){return null;},processMarkup:function(_5c2){return null;},processiWidgets:function(root){},getElementByClass:function(_5c3,root){return null;},getUserProfile:function(){return null;},getiDescriptor:function(){return null;},io:{},iEvents:{}});}if(!dojo._hasResource["com.ibm.mm.iwidget.icontext.IContextDefaultImpl"]){dojo._hasResource["com.ibm.mm.iwidget.icontext.IContextDefaultImpl"]=true;dojo.provide("com.ibm.mm.iwidget.icontext.IContextDefaultImpl");dojo.declare("com.ibm.mm.iwidget.icontext.IContextDefaultImpl",com.ibm.mashups.iwidget.iContext,{constructor:function(_5c4){this.widgetwrapper=_5c4;this.widgetId=_5c4.id;this.scope={};this.rootElement=dojo.byId(this.widgetId);this.ns=this.rootElement.className.substr(0,3);this._initEvents();this._initIO();this._initMMExtension();},_destroy:function(){if(this.rootElement){this.rootElement=null;}},getWidgetId:function(){if(this.widgetId){return this.widgetId;}return null;},_initEvents:function(){this.iEvents=null;},_initMMExtension:function(){this._mm=null;},getRootElement:function(){return dojo.byId(this.widgetId);},getElementById:function(id,root){if(!root){root=this._getContentRoot();}var _5c5=[];var rc=com.ibm.mm.iwidget.Utils.findElementByAttribute("id",id,root,_5c5,false);if(rc){return _5c5[0];}else{return null;}},getiWidgetAttributes:function(){var _5c6=this.widgetwrapper.getAttributes();return _5c6;},getItemSet:function(name,_5c7){if(typeof name=="undefined"||name===null){return null;}if(name==iwConstants.ATTRIBUTES){return this.getiWidgetAttributes();}if(name==iwConstants.USERPROFILE){return this.getUserProfile();}if(name==iwConstants.IDESCRIPTOR){return this.getiDescriptor();}var _5c8=this.widgetwrapper.getWidgetItemSet(name);return _5c8;},iScope:function(){return this.scope;},processMarkup:function(_5c9){var _5ca=_5c9.replace(/_IWID_/g,"_"+this.widgetId+"_");var _5cb=_5ca.replace(/iContext(?=\.|\s|\(|\))/g,"_"+this.widgetId+"_iContext");return _5cb;},getElementByClass:function(_5cc,root){if(!root){root=this._getContentRoot();}var _5cd=dojo.query("."+_5cc,root);if(typeof _5cd!="undefined"&&_5cd!==null){if(_5cd.length===0){return null;}else{var _5ce=[];for(var i=0;i<_5cd.length;i++){_5ce.push(_5cd[i]);}return _5ce;}}return null;},getWidgetXMLPath:function(){var url=this.widgetwrapper.getIWidgetInstance().widgetXMLUrl;var _5cf=url.indexOf("?");if(0<_5cf){url=url.substring(0,_5cf);}var url2=com.ibm.mm.enabler.EndpointUtils.checkForEndpoints(url);if(url2){url=url2;}return url;},_getWidgetBaseUri:function(){var _5d0=this.widgetwrapper.getIWidgetInstance().widgetXMLUrl;var _5d1=_5d0.indexOf("?");if(0<_5d1){_5d0=_5d0.substring(0,_5d1);}return _5d0.substring(0,_5d0.lastIndexOf("/")+1);},_getContentRoot:function(){var _5d2=this.getRootElement();var _5d3=this.widgetwrapper.currentMode;if(!_5d3){_5d3="view";}var _5d4=this.widgetwrapper.windowManager[_5d3];if(_5d4){var temp=_5d4.root;if(temp){_5d2=temp;}}return _5d2;},getiDescriptor:function(){var _5d5=this.widgetwrapper.getIDescriptorItems();return _5d5;},_initIO:function(){this.io=new com.ibm.mm.iwidget.icontext.IContextIOImpl(this.widgetwrapper);},getUserProfile:function(){return null;},requires:function(_5d6,_5d7,uri,cb,_5d8){return;},processiWidgets:function(root){return;}});com.ibm.mm.iwidget.icontext.IContextImpl=com.ibm.mm.iwidget.icontext.IContextDefaultImpl;if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"iWidget")>=0)){dojo["require"]("com.ibm.mm.iwidget.icontext.IContextExtendedImpl");}}if(!dojo._hasResource["com.ibm.mashups.iwidget.iContext"]){dojo._hasResource["com.ibm.mashups.iwidget.iContext"]=true;dojo.provide("com.ibm.mashups.iwidget.iContext");}if(!dojo._hasResource["com.ibm.mashups.iwidget.itemset.ManagedItemSetCallbackModel"]){dojo._hasResource["com.ibm.mashups.iwidget.itemset.ManagedItemSetCallbackModel"]=true;dojo.provide("com.ibm.mashups.iwidget.itemset.ManagedItemSetCallbackModel");dojo.declare("com.ibm.mashups.iwidget.itemset.ManagedItemSetCallbackModel",null,{constructor:function(){},postSaveCallbackFn:function(_5d9,_5da){}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.itemset.ManagedItemSet_API"]){dojo._hasResource["com.ibm.mashups.iwidget.itemset.ManagedItemSet_API"]=true;dojo.provide("com.ibm.mashups.iwidget.itemset.ManagedItemSet_API");dojo.provide("com.ibm.mashups.iwidget.itemset.ManagedItemSet");dojo.declare("com.ibm.mashups.iwidget.itemset.ManagedItemSet",null,{constructor:function(){},save:function(_5db){},commit:function(_5dc){},setItemValue:function(_5dd,_5de,_5df){return this;},setItemValue:function(_5e0,_5e1){return this;},getItemValue:function(_5e2){return null;},getAllNames:function(){return null;},removeItem:function(_5e3){return null;},clone:function(){return null;},isReadOnly:function(_5e4){return null;},getItemSetDescription:function(){return null;},addListener:function(_5e5){return null;},removeListener:function(_5e6){return true;}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.services.EventService"]){dojo._hasResource["com.ibm.mashups.iwidget.services.EventService"]=true;dojo.provide("com.ibm.mashups.iwidget.services.EventService");dojo.declare("com.ibm.mashups.iwidget.services.EventService",null,{SERVICE_NAME:"eventService",constructor:function(){},fireEvent:function(_5e7,_5e8,_5e9,_5ea,_5eb){},broadcastEvent:function(_5ec,_5ed,_5ee,_5ef){},broadcastEvent:function(_5f0,_5f1,_5f2,_5f3,_5f4){},broadcastEvent:function(_5f5,_5f6,_5f7,_5f8,_5f9,_5fa){},broadcastEvents:function(_5fb,_5fc){},broadcastEvents:function(_5fd,_5fe,_5ff){},broadcastEvents:function(_600,_601,_602,_603){},publishEvent:function(_604,_605,_606,_607){},subscribeEvent:function(_608,_609,_60a,_60b,_60c){},unsubscribeEvent:function(_60d,_60e){}});com.ibm.mashups.iwidget.services.EventService.SERVICE_NAME="eventService";}if(!dojo._hasResource["com.ibm.mm.iwidget.manageditemset.IDescriptorDefaultImpl"]){dojo._hasResource["com.ibm.mm.iwidget.manageditemset.IDescriptorDefaultImpl"]=true;dojo.provide("com.ibm.mm.iwidget.manageditemset.IDescriptorDefaultImpl");dojo.declare("com.ibm.mm.iwidget.manageditemset.IDescriptorDefaultImpl",com.ibm.mashups.iwidget.itemset.ManagedItemSet,{constructor:function(_60f,_610,_611){this.widget=_60f;this.defiDescriptorItems=_610;this.instanceiDescriptorItems=_611;this.navStateModel=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();this._updatedItems={};this._hasDynamicTitle=false;this._hasDynamicIcon=false;},readOnlyItems:{defaultHeight:"defaultHeight",defaultWidth:"defaultWidth",displayLocale:"displayLocale",messageLocale:"messageLocale",author:"author",email:"email",website:"website",version:"version",icon:"icon"},writableItems:{title:"title",name:"name",description:"description",availableMessageLocales:"availableMessageLocales",mode:"mode",windowState:"windowState"},localizedItems:{title:"title",name:"name",description:"description"},getItemValue:function(name){if(typeof name=="undefined"||name===null){return null;}var _612=null;if(name==iwConstants.iDescriptorItems.mode){var _613=this.widget;if(_613){_612=_613.currentMode;}}else{if(name==iwConstants.iDescriptorItems.displayLocale){var _614=ibmConfig.locale;var _615=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var temp=_615.getValue(com.ibm.mashups.enabler.services.ConfigConstants.DISPLAY_LOCALE);if(temp){_614=temp;}_612=_614;}else{if(name==iwConstants.iDescriptorItems.messageLocale){_612=this._getMessageLocale();}else{if(name==iwConstants.iDescriptorItems.windowState){_612=this._getWindowState();}else{_612=this._getItemValue(name);}}}}return _612;},_getWindowState:function(){return "normal";},_getItemValue:function(_616){var _617=null;var _618=null;var _619=null;if(this.localizedItems[_616]){_619=this._getMessageLocale();}if(_616==iwConstants.iDescriptorItems.title){_618=this._getDynamicTitle();}if(_618===null&&this.instanceiDescriptorItems){_618=this.instanceiDescriptorItems.getItemValue(_616,_619);}if(_618===null&&this.defiDescriptorItems){_617=this.defiDescriptorItems.getItemValue(_616,_619);if(typeof _617=="undefined"){_617=null;}}if(_618!==null){return _618;}return _617;},_getDynamicTitle:function(){return null;},_setDynamicTitleOrIcon:function(name,_61a){},setItemValue:function(name,_61b){if(typeof name=="undefined"||name===null){return null;}if(typeof _61b=="undefined"||_61b===null){return null;}if(this.readOnlyItems[name]){return null;}if(name==iwConstants.iDescriptorItems.mode){var _61c=this._getWidgetDef().getSupportedModes();if(this._contains(_61c,_61b)){this._updatedItems[name]=_61b;}else{return null;}}if(name==iwConstants.iDescriptorItems.windowState){var _61d=this._getWidgetDef().getSupportedWindowStates();if(this._contains(_61d,_61b)){this._updatedItems[name]=_61b;}else{return null;}}if(this.widget.id&&(name==iwConstants.iDescriptorItems.title||name==iwConstants.iDescriptorItems.icon)){this._setDynamicTitleOrIcon(name,_61b);}var _61e=null;if(this.localizedItems[name]){_61e=this._getMessageLocale();}if(name==this.writableItems.title||name==this.writableItems.name||name==this.writableItems.description){this.instanceiDescriptorItems.setItemValue(name,_61b,false,_61e);}if(name==iwConstants.iDescriptorItems.availableMessageLocales){this.instanceiDescriptorItems.setItemValue(name,_61b,false);}return this;},isReadOnly:function(name){if(typeof name=="undefined"||name===null){return false;}if(this.readOnlyItems[name]){return true;}else{return false;}},removeItem:function(name){return null;},getAllNames:function(){var arr={};if(this.defiDescriptorItems){var _61f=this.defiDescriptorItems.getAllNames();for(var i in _61f){if(Object.prototype.hasOwnProperty.call(_61f,i)){arr[_61f[i]]=true;}}}if(this.instanceiDescriptorItems){var _620=this.instanceiDescriptorItems.getAllNames();for(var j in _620){if(Object.prototype.hasOwnProperty.call(_620,j)){arr[_620[j]]=true;}}}this._hasDynamicTitle&&(arr[iwConstants.iDescriptorItems.title]=true);this._hasDynamicIcon&&(arr[iwConstants.iDescriptorItems.icon]=true);var _621=[];for(var name in arr){if(Object.prototype.hasOwnProperty.call(arr,name)){_621.push(name);}}return _621;},save:function(cb){return this.commit(cb);},commit:function(_622){if(this.serverless){this._saveMicroformat();}if(this._updatedItems[iwConstants.iDescriptorItems.mode]){var _623=this._updatedItems[iwConstants.iDescriptorItems.mode];this.widget._handleOnModeChange(_623);}if(this._updatedItems[iwConstants.iDescriptorItems.windowState]){var _624=this._updatedItems[iwConstants.iDescriptorItems.windowState];var _625=this._getWindowState();var _626=com.ibm.mashups.services.ServiceManager.getService("eventService");_626.publishEvent(com.ibm.mashups.iwidget.Constants.CHANGE_WIDGETWINDOWSTATE,{id:this.widget.id,newWindowState:_624,oldWindowState:_625});}if(_622){_622(iwConstants.IDESCRIPTOR,true);}},_saveMicroformat:function(){this.widget.commit();var _627={};_627.wid=this.widget.id;this.widget.eventSvr._publishEvent(iwConstants.EVENTS.onAttributeSaved,_627,this.widget.hubId);},addListener:function(fn){var _628=this.widget;var _629=_628._registerListener(iwConstants.IDESCRIPTOR,fn);return _629;},removeListener:function(_62a){var _62b=this.widget;return _62b._removeListener(iwConstants.IDESCRIPTOR,_62a);},_getWidgetDef:function(){return this.widget.widgetDef;},_contains:function(arr,_62c){var rc=false;for(var i=0;i=0)){dojo["require"]("com.ibm.mm.iwidget.manageditemset.IDescriptorExtendedImpl");}}if(!dojo._hasResource["com.ibm.mashups.iwidget.itemset.ManagedItemSet"]){dojo._hasResource["com.ibm.mashups.iwidget.itemset.ManagedItemSet"]=true;dojo.provide("com.ibm.mashups.iwidget.itemset.ManagedItemSet");}if(!dojo._hasResource["com.ibm.mm.iwidget.manageditemset.PersistentAttributes"]){dojo._hasResource["com.ibm.mm.iwidget.manageditemset.PersistentAttributes"]=true;dojo.provide("com.ibm.mm.iwidget.manageditemset.PersistentAttributes");dojo.declare("com.ibm.mm.iwidget.manageditemset.InternalPersistentAttributesToPreferenceModelAdapter",com.ibm.mashups.iwidget.itemset.ManagedItemSet,{constructor:function(_636,_637,_638){if(_637){this.serverless=true;}else{this.serverless=false;}this.modes=iwConstants.mode;this.widget=_636;this.widgetInstance=this.widget.getIWidgetInstance();this.instanceAttributes=this.widgetInstance.getAttributes();this.defAttributes=this.widget.widgetDef.getAttributes();this.parent=_638;this.mode=this._getMode(null);},setItemValue:function(_639,_63a,_63b){if(!_639){return null;}if(!_63a){return null;}if(this.isReadOnly(_639)){return null;}if(this.serverless){if(this.mode==this.modes.EDIT){this.instanceAttributes.setItemValue(_639,_63a);if(this.parent){return this.parent;}}}return null;},getItemValue:function(_63c,_63d){if(!_63c){return null;}var _63e;if(this.serverless){if(typeof _63d==="undefined"){_63d=true;}if(this.mode==this.modes.CONFIG){_63e=this.defAttributes.getItemValue(_63c);if(typeof _63e==="undefined"){_63e=null;}return _63e;}if(this.mode==this.modes.EDIT&&!_63d){_63e=this.instanceAttributes.getItemValue(_63c);if(typeof _63e==="undefined"){_63e=null;}return _63e;}if(_63d){_63e=this.instanceAttributes.getItemValue(_63c);if(!_63e){_63e=this.defAttributes.getItemValue(_63c);}if(typeof _63e==="undefined"){_63e=null;}return _63e;}}return null;},getAllNames:function(_63f){if(this.serverless){if(typeof _63f==="undefined"){_63f=true;}var _640;if(this.mode==this.modes.CONFIG){_640=this.defAttributes.getAllNames();if(_640&&_640.length&&_640.length===0){return null;}return _640;}if(this.mode==this.modes.EDIT&&!_63f){_640=this.instanceAttributes.getAllNames();if(_640&&_640.length&&_640.length===0){return null;}return _640;}var name;if(_63f){_640=this.instanceAttributes.getAllNames();var obj={};if(_640&&_640.length&&_640.length>0){for(var i in _640){if(Object.prototype.hasOwnProperty.call(_640,i)){name=_640[i];obj[name]=name;}}}_640=this.defAttributes.getAllNames();if(_640&&_640.length&&_640.length>0){for(var j in _640){if(Object.prototype.hasOwnProperty.call(_640,j)){name=_640[j];obj[name]=name;}}}return this._getNamesArray(obj);}}return null;},removeItem:function(_641){if(!_641){return null;}if(this.isReadOnly(_641)){return null;}if(this.serverless){if(this.mode==this.modes.EDIT){this.instanceAttributes.removeItem(_641);if(this.parent){return this.parent;}}}return null;},isReadOnly:function(_642,_643){if(!_642){return false;}if(this.serverless){if(typeof _643==="undefined"){_643=true;}if(this.mode==this.modes.CONFIG){return this.defAttributes.isReadOnly(_642);}if(this.mode==this.modes.EDIT&&_643){var _644=this.defAttributes.isReadOnly(_642);if(!_644){_644=this.instanceAttributes.isReadOnly(_642);}return _644;}if(this.mode==this.modes.EDIT){return this.instanceAttributes.isReadOnly(_642);}}return false;},commit:function(_645){if(this.serverless){this._saveMicroformat();}else{return null;}if(_645){_645(iwConstants.ATTRIBUTES,true);}return (this);},_getNamesArray:function(_646){var i=0;var _647=[];var name;for(name in _646){if(Object.prototype.hasOwnProperty.call(_646,name)){_647.push(name);i++;}}if(i===0){return null;}return _647;},_saveMicroformat:function(){this.widget.commit();var _648={};_648.wid=this.widget.id;this.widget.eventSvr._publishEvent(iwConstants.EVENTS.onAttributeSaved,_648,this.widget.hubId);},_getMode:function(_649){var mode=this.modes.EDIT;if(_649){mode=_649;}else{mode=this.widget.currentMode;}if(mode==this.modes.VIEW){mode=this.modes.EDIT;}return mode;},addListener:function(fn){var _64a=this.widget._registerListener(iwConstants.ATTRIBUTES,fn);return _64a;},removeListener:function(_64b){return this.widget._removeListener(iwConstants.ATTRIBUTES,_64b);}});dojo.declare("com.ibm.mm.iwidget.manageditemset.PersistentAttributes",com.ibm.mashups.iwidget.itemset.ManagedItemSet,{constructor:function(_64c,_64d){this._internalPersistentAttributesToPreferenceModelAdapter=new com.ibm.mm.iwidget.manageditemset.InternalPersistentAttributesToPreferenceModelAdapter(_64c,_64d,this);},setItemValue:function(_64e,_64f){return this._internal().setItemValue(_64e,_64f,true);},getItemValue:function(_650){return this._internal().getItemValue(_650,true);},getAllNames:function(){return this._internal().getAllNames(true);},removeItem:function(_651){return this._internal().removeItem(_651);},isReadOnly:function(_652){return this._internal().isReadOnly(_652,true);},save:function(_653){return this.commit(_653);},commit:function(_654){return this._internal().commit(_654);},_internal:function(){return this._internalPersistentAttributesToPreferenceModelAdapter;},addListener:function(fn){return this._internal().addListener(fn);},removeListener:function(_655){return this._internal().removeListener(_655);}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.itemset.ItemSet"]){dojo._hasResource["com.ibm.mashups.iwidget.itemset.ItemSet"]=true;dojo.provide("com.ibm.mashups.iwidget.itemset.ItemSet");dojo.declare("com.ibm.mashups.iwidget.itemset.ItemSet",null,{constructor:function(){},setLocalizedItemValue:function(_656,_657,_658){return this;},setItemValue:function(_659,_65a,_65b){return this;},setItemValue:function(_65c,_65d){return this;},getLocalizedItemValue:function(_65e,_65f){return null;},getItemValue:function(_660){return null;},getAllNames:function(){return null;},removeItem:function(_661){return null;},removeItemValue:function(_662){return null;},removeLocalizedItemValue:function(_663,_664){return null;},getLocalesWithValues:function(_665){return null;},clone:function(){return null;},isReadOnly:function(_666){return false;},getItemSetDescription:function(){return null;},addListener:function(_667){return null;},removeListener:function(_668){return true;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.itemset.ItemsetDefaultImpl"]){dojo._hasResource["com.ibm.mm.iwidget.itemset.ItemsetDefaultImpl"]=true;dojo.provide("com.ibm.mm.iwidget.itemset.ItemsetDefaultImpl");dojo.declare("com.ibm.mm.iwidget.itemset.ItemSetDefaultImpl",com.ibm.mashups.iwidget.itemset.ItemSet,{constructor:function(_669,_66a,name){this.widget=_669;this.name=name;var _66b=this.widget.getIWidgetInstance();var _66c=null;if(_66b){_66c=_66b.getItemSet(name);}var _66d={};if(_66a){if(_66a){for(var _66e in _66a.items){if(Object.prototype.hasOwnProperty.call(_66a.items,_66e)){_66d[_66e]=dojo.clone(_66a.items[_66e]);}}}this.properties=new com.ibm.mm.iwidget.widget.ModifiablePropertiesImpl(_66d);}if(!this.properties){this.properties=new com.ibm.mm.iwidget.widget.ModifiablePropertiesImpl(_66d);}if(_66c){for(var _66f in _66c){if(Object.prototype.hasOwnProperty.call(_66c,_66f)){var _670=_66c[_66f];if(_670.values){for(var j in _670.values){if(Object.prototype.hasOwnProperty.call(_670.values,j)){this.properties.setItemValue(_66f,_670.values[j],false,j);}}}if(_670.value){this.properties.setItemValue(_66f,_670.value);}}}}this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},_getResourceBundle:function(){if(!this.iwMessages){this.iwMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","iwMessages");}return this.iwMessages;},_logDeprecated:function(_671,fn1,fn2){this._getResourceBundle();var _672=dojo.string.substitute(this.iwMessages.W_DEPRECATE_2,[fn1,fn2]);this.LOGGER.warning(_671,_672);},getLocalesWithValues:function(_673){return this.properties.getItemLocales(_673);},setLocalizedItemValue:function(_674,_675,_676){if(!_674||!_676){return null;}if(!(typeof _675!="undefined"&&_675!==null)){return null;}rc=this.properties.setItemValue(_674,_675,false,_676);if(rc){return this;}return null;},setItemValue:function(_677,_678,_679){if(!_677){return null;}if(!(typeof _678!="undefined"&&_678!==null)){return null;}if(!_679){rc=this.properties.setItemValue(_677,_678,false);}else{if(_679&&!dojo.isString(_679)){this._logDeprecated("setItemValue","ItemSet.setItemValue(itemName,value,readOnly)","ItemSet.setItemValue(item,value)");rc=this.properties.setItemValue(_677,_678,false);}else{this._logDeprecated("setItemValue","ItemSet.setItemValue(itemName,value,locale)","ItemSet.setLocalizedItemValue(item,value,locale)");return this.setLocalizedItemValue(_677,_678,_679);}}if(rc){return this;}return null;},getLocalizedItemValue:function(_67a,_67b){if(!_67a||!_67b){return null;}return this.properties.getLocalizedItemValue(_67a,_67b);},getItemValue:function(_67c,_67d){if(!_67c){return null;}if(_67d){this._logDeprecated("getItemValue","ItemSet.getItemValue(itemName,locale)","ItemSet.getLocalizedItemValue(item,locale)");return this.getLocalizedItemValue(_67c,_67d);}return this.properties.getItemValue(_67c);},getAllNames:function(){rc=this.properties.getAllNames();if(rc&&rc.length===0){return null;}return rc;},removeItem:function(_67e,_67f){if(!_67e){return null;}if(_67f){this._logDeprecated("removeItem","ItemSet.removeItem(itemName,locale)","ItemSet.removeLocalizedItemValue(itemName,locale)");return this.removeLocalizedItemValue(_67e,_67f);}rc=this.properties.removeItem(_67e);if(rc){return this;}return null;},removeLocalizedItemValue:function(_680,_681){if(!_680||!_681){return null;}rc=this.properties.removeItemValue(_680,_681);if(rc){return this;}return null;},removeItemValue:function(_682){if(!_682){return null;}rc=this.properties.removeItemValue(_682);if(rc){return this;}return null;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.DeferredLiveTextUnprocessStubImpl"]){dojo._hasResource["com.ibm.mm.iwidget.DeferredLiveTextUnprocessStubImpl"]=true;dojo.provide("com.ibm.mm.iwidget.DeferredLiveTextUnprocessStubImpl");dojo.declare("com.ibm.mm.iwidget.DeferredLiveTextUnprocessStubImpl",com.ibm.mm.enabler.DeferredImpl,{constructor:function(_683){this.wrapper=_683;},start:function(sync){if(sync){return;}var _684=this.wrapper.getIWidgetInstance();var _685=dojo.clone(this.wrapper.rootElement);this._unchangeCompleteCallback(_685);},setIncludeParent:function(_686){this.includeParent=_686;},getIncludeParent:function(){return this.includeParent;},_unchangeCompleteCallback:function(node){if(dojo.isFunction(this.getFinishedCallback())){this.finish(node,200);}}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.services.ContainerService_API"]){dojo._hasResource["com.ibm.mashups.iwidget.services.ContainerService_API"]=true;dojo.provide("com.ibm.mashups.iwidget.services.ContainerService_API");dojo.provide("com.ibm.mashups.iwidget.services.ContainerService");dojo.declare("com.ibm.mashups.iwidget.services.ContainerService",null,{SERVICE_NAME:"iWidgetContainerService",PROVIDER_EVENTS:"events",PROVIDER_WIRES:"wires",PROVIDER_ATTRIBUTES:"attributes",registerOnChangeListener:function(_687,_688){},getPersistenceMode:function(_689,_68a){},switchToModifiablePersistenceMode:function(){}});com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME="iWidgetContainerService";com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS="events";com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES="wires";com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES="attributes";}if(!dojo._hasResource["com.ibm.mm.iwidget.services.ContainerServiceImpl"]){dojo._hasResource["com.ibm.mm.iwidget.services.ContainerServiceImpl"]=true;dojo.provide("com.ibm.mm.iwidget.services.ContainerServiceImpl");dojo.declare("com.ibm.mm.iwidget.services.ContainerServiceImpl",com.ibm.mashups.iwidget.services.ContainerService,{constructor:function(){this._modes=null;this._modModes=null;this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);this.TOPIC_BASE="/"+("com.ibm.mm.iwidget.services.ContainerServiceImpl".replace(/\./ig,"/"))+"/";this.TOPIC_CHANGE=this.TOPIC_BASE+"change";this.TOPIC_CHANGE_EVENTS=this.TOPIC_CHANGE+"/events";this.TOPIC_CHANGE_WIRES=this.TOPIC_CHANGE+"/wires";this.TOPIC_CHANGE_ATTRIBUTES=this.TOPIC_CHANGE+"/attributes";this._topics={};this._topics[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS]=this.TOPIC_CHANGE_EVENTS;this._topics[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES]=this.TOPIC_CHANGE_WIRES;this._topics[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES]=this.TOPIC_CHANGE_ATTRIBUTES;},_invalidate:function(){this._modes=null;this._modModes=null;},_init:function(){if(this._modes){return;}var _68b="_init";if(this.bIsLoggable){this.LOGGER.entering(_68b,arguments);}var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _68c=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.PERSISTENCE_MODE);var _68d=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.PERSISTENCE_MODE_EVENTS);var _68e=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.PERSISTENCE_MODE_WIRES);var _68f=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.PERSISTENCE_MODE_ATTRIBUTES);this._modes={};this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS]=(_68d)?_68d:_68c;this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES]=(_68e)?_68e:_68c;this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES]=(_68f)?_68f:_68c;_68d=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.PERSISTENCE_MODE_EVENTS_MODIFIABLE);_68e=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.PERSISTENCE_MODE_WIRES_MODIFIABLE);_68f=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.PERSISTENCE_MODE_ATTRIBUTES_MODIFIABLE);this._modModes={};this._modModes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS]=(_68d)?_68d:_68c;this._modModes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES]=(_68e)?_68e:_68c;this._modModes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES]=(_68f)?_68f:_68c;if(this.bIsLoggable){this.LOGGER.trace(_68b,"Selected Modes for the iWidget Providers:");this.LOGGER.trace(_68b,com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS+": "+this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS]);this.LOGGER.trace(_68b,com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES+": "+this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES]);this.LOGGER.trace(_68b,com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES+": "+this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES]);this.LOGGER.exiting(_68b);}},registerOnChangeListener:function(_690,_691){this._init();var _692=dojo.subscribe(this._topics[_690],_691.context,_691.callback);if(dojo.isFunction(_691.unregister)){dojo.hitch(_691.context,_691.unregister)(_692);}},getPersistenceMode:function(_693,_694){this._init();return this._modes[_693];},switchToModifiablePersistenceMode:function(_695){var _696="switchToModifiablePersistenceMode";if(this.bIsLoggable){this.LOGGER.entering(_696,arguments);}this._init();var _697=this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS];var _698=this._modModes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS];var _699=this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES];var _69a=this._modModes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES];var _69b=this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES];var _69c=this._modModes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES];this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS]=_698;this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES]=_69a;this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES]=_69c;if(_697!=_698){if(this.bIsLoggable){this.LOGGER.trace(_696,"old mode != new mode, switching...");}dojo.publish(this._topics[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS],[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS,_697,_698]);dojo.publish(this._topics[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES],[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES,_699,_69a]);dojo.publish(this._topics[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES],[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES,_69b,_69c]);}if(this.bIsLoggable){this.LOGGER.exiting(_696);}}});com.ibm.mashups.services.ServiceManager.setService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME,new com.ibm.mm.iwidget.services.ContainerServiceImpl());}if(!dojo._hasResource["com.ibm.mashups.iwidget.services.ContainerService"]){dojo._hasResource["com.ibm.mashups.iwidget.services.ContainerService"]=true;dojo.provide("com.ibm.mashups.iwidget.services.ContainerService");}if(!dojo._hasResource["com.ibm.mm.iwidget.manageditemset.AttributesModeDelegate"]){dojo._hasResource["com.ibm.mm.iwidget.manageditemset.AttributesModeDelegate"]=true;dojo.provide("com.ibm.mm.iwidget.manageditemset.AttributesModeDelegate");dojo.declare("com.ibm.mm.iwidget.manageditemset.AttributesModeDelegate",com.ibm.mashups.iwidget.itemset.ManagedItemSet,{constructor:function(_69d,_69e){this.persistentAttributesFactoryService=_69d;this.wrapper=_69e;this.callbackHandle={context:this,callback:"_attributesProviderModeChange",unregister:function(_69f){this.wrapper.unregisterArray.push(_69f);}};this.widgetAttributes=[];this.widgetAttributesReplay=[];this._skipRecord=false;this._getAttributes();},_attributesProviderModeChange:function(_6a0,_6a1,_6a2){this.widgetAttributes=[];this._getAttributes();var _6a3=this._getModeSelector();var _6a4=this.widgetAttributesReplay[_6a3];if(_6a4){this._skipRecord=true;for(var i=0;i<_6a4.length;i++){var _6a5=_6a4[i];if(_6a5[0]=="set"){this.setItemValue(_6a5[1],_6a5[2]);}else{if(_6a5[0]=="remove"){this.removeItem(_6a5[1]);}}}this._skipRecord=false;}this.widgetAttributesReplay=[];this.widgetAttributesReplay[_6a3]=[];},_getModeSelector:function(){var _6a6=this.wrapper._getCurrentMode();var _6a7=iwConstants.mode.PERSONALIZE;if(_6a6==iwConstants.mode.CONFIG||_6a6==iwConstants.mode.EDIT){_6a7=_6a6;}return _6a7;},_getAttributes:function(){var _6a8=this._getModeSelector();this.widgetAttributes[_6a8]=this.widgetAttributes[_6a8]||null;if(this.widgetAttributes[_6a8]===null){this.widgetAttributes[_6a8]=this.persistentAttributesFactoryService.createPersistentAttributes(this.wrapper,this.callbackHandle);this.callbackHandle=null;}return this.widgetAttributes[_6a8];},_record:function(_6a9){if(!this._skipRecord){var _6aa=this._getModeSelector();this.widgetAttributesReplay[_6aa]=this.widgetAttributesReplay[_6aa]||null;if(this.widgetAttributesReplay[_6aa]===null){this.widgetAttributesReplay[_6aa]=[];}this.widgetAttributesReplay[_6aa].push(_6a9);}},_clearReplay:function(){var _6ab=this._getModeSelector();this.widgetAttributesReplay[_6ab]=[];},setItemValue:function(_6ac,_6ad){this._record(["set",_6ac,_6ad]);return this._getAttributes().setItemValue(_6ac,_6ad);},getItemValue:function(_6ae){return this._getAttributes().getItemValue(_6ae,true);},getAllNames:function(){return this._getAttributes().getAllNames(true);},removeItem:function(_6af){this._record(["remove",_6af]);return this._getAttributes().removeItem(_6af);},isReadOnly:function(_6b0){return this._getAttributes().isReadOnly(_6b0,true);},save:function(_6b1){var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME);if(cs){cs.switchToModifiablePersistenceMode(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES);}this._clearReplay();return this._getAttributes().save(_6b1);},commit:function(_6b2){var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME);if(cs){cs.switchToModifiablePersistenceMode(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES);}this._clearReplay();return this._getAttributes().commit(_6b2);},addListener:function(fn){return this._getAttributes().addListener(fn);},removeListener:function(_6b3){return this._getAttributes().removeListener(_6b3);}});}if(!dojo._hasResource["com.ibm.mm.iwidget.DeferredLoadImpl"]){dojo._hasResource["com.ibm.mm.iwidget.DeferredLoadImpl"]=true;dojo.provide("com.ibm.mm.iwidget.DeferredLoadImpl");dojo.declare("com.ibm.mm.iwidget.DeferredLoadImpl",com.ibm.mm.enabler.DeferredImpl,{constructor:function(uri,id,_6b4){this.uri=uri;if(typeof id=="undefined"){id=null;}this.id=id;if(typeof _6b4=="undefined"){_6b4=null;}this.widgetDef=_6b4;},start:function(sync){if(this.widgetDef){this._handleCallback(this.widgetDef,200);return this.widgetDef;}var mode=(typeof (sync)=="undefined")?true:sync;var _6b5=com.ibm.mashups.services.ServiceManager.getService("widgetLoadService");_6b5.getWidgetXML(this.uri,mode,dojo.hitch(this,"_handleLoad"),this.id);if(sync){return this.widgetDef;}return null;},_handleLoad:function(data,_6b6,xhr){if(xhr){_6b6=xhr.status;}if(_6b6!=200){data=null;}this.widgetDef=data;this._handleCallback(data,status);},_handleCallback:function(_6b7,_6b8){this.finish(_6b7,_6b8);}});}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetWrapperDefaultImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetWrapperDefaultImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.IWidgetWrapperDefaultImpl");dojo.declare("com.ibm.mm.iwidget.widget.IWidgetWrapperDefaultImpl",com.ibm.mashups.iwidget.widget.IWidgetWrapper,{constructor:function(_6b9,id){this._internalIbmModes=iwConstants._INTERNALIBMMODES;this.rootElement=_6b9;this.id=id||dojo.attr(_6b9,"id");this.hubId=this.id;this.simpleWidgetEvents={};this.loaded=false;this.standalone=null;this.widgetAttributes=null;this.widgetItemSets=null;this.ns=_6b9.className.substr(0,3);this.windowManager={};this.iwMessages=null;this.eventSvr=com.ibm.mashups.services.ServiceManager.getService("eventService");this._jsHandler=com.ibm.mm.enabler.aggregation.javascript.JAVASCRIPT_HANDLER;this.eventHandlers=[];this.unregisterArray=[];this.publishedEvents={};this.handledEvents={};this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},getID:function(){return this.id;},getIWidgetInstance:function(){if(this.widgetInstance){return this.widgetInstance;}this.widgetInstance=new com.ibm.mm.iwidget.widget.IWidgetInstanceImpl(this,this.rootElement,this.id);return this.widgetInstance;},setIWidgetDefinition:function(_6ba){this.widgetDef=_6ba;},getIWidgetDefinition:function(){if(this.loaded){return new com.ibm.mm.iwidget.DeferredLoadImpl(this.getIWidgetInstance().widgetXMLUrl,this.id,this.widgetDef);}else{return new com.ibm.mm.iwidget.DeferredLoadImpl(this.getIWidgetInstance().widgetXMLUrl,this.id);}},getMarkup:function(){return new com.ibm.mm.iwidget.DeferredLiveTextUnprocessStubImpl(this);},doRender:function(){try{this.prepare();this.execute();}catch(e){this.LOGGER.severe("IWidgetWrapper.doRender","widget: ${0} OnloadingException: ${1}",[this.hubId,e]);}},prepare:function(){var _6bb="_"+this.id+"_"+"iContext";if(!this.isModal()){dojo.global[_6bb]=new com.ibm.mm.iwidget.icontext.IContextImpl(this,this.ns);}else{var _6bc=this._mainframeId;var _6bd=parent[_6bc][_6bb];dojo.global[_6bb]=_6bd;}var _6be=this.eventSvr._subscribeEvent(this.eventSvr.WIDGETEVENT_PREFIX+this.hubId,this,"handleEvent",null,this.hubId);if(!this._inIframe()){this.eventHandlers.push(_6be);}},execute:function(){this._initialize(dojo.hitch(this,function(){this._doRender();}));},_initialize:function(_6bf){var lang=this.widgetDef.getDefaultLanguage();if(typeof lang!="undefined"&&lang!==null){this.defaultLanguage=lang;}else{this.defaultLanguage="en";}var _6c0=this._getInitDefaultMode();if(_6c0===null){_6c0=iwConstants.mode_view;}this.currentMode=_6c0;if(this._handleSaveMode){this._handleSaveMode();}this._initManagedItemSet();if(_6bf){_6bf();}},_getResourceBundle:function(){return null;},_logUpdateMarkupError:function(mode){},_getMarkupByMode:function(mode){var _6c1=this.widgetDef;var elem=_6c1.getMarkupByMode(mode);if(elem&&elem.uri){var uri=this._rewriteURI(elem.uri);dojo.xhrGet({url:uri,ibmMultipart:{context:com.ibm.mashups.enabler.io.XHRMultipartFactory.CONTEXT_ENABLER},handleAs:"text",sync:true,load:function(_6c2){if(_6c2){var _6c3={};_6c3.content=_6c2;_6c1.setMarkupByMode(mode,_6c3);}},error:function(data,_6c4){this.LOGGER.severe("_getMarkupByMode","error loading content for mode:"+mode,data);delete elem.uri;}});}var _6c5=null;if(_6c1.getMarkupByMode(mode)){_6c5=_6c1.getMarkupByMode(mode).content;}return _6c5;},_updateTitle:function(){},_updateMarkup:function(mode,_6c6){var _6c7=this._getMarkupByMode(mode);if(mode==iwConstants.mode_view){if(this.widgetDef.getAllowInstanceContent()){var temp=this.getIWidgetInstance().getDefaultViewContent();if(temp&&temp!==null){_6c7=temp;}}}if(typeof _6c7=="undefined"||_6c7===null){this._logUpdateMarkupError(mode);return true;}var _6c8=this._prepareMarkup(_6c7);_6c8=_6c8.replace(/^\s+|\s+$/,"");if(_6c8.indexOf("=0;k--){var _6d2=_6d1[k].getSourceWidgetID();_6d0.removeWire(_6d2);this.commit();}}}var _6d3=null;if(_6d0){_6d3=_6d0.getTargets();}if(_6d3&&true!==_6cf){var _6d4=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel();for(var i in _6d3){if(Object.prototype.hasOwnProperty.call(_6d3,i)){var _6d5=_6d4.find(i);if(_6d5){var _6d6=_6d5.getIWidgetInstance().getWireModel();_6d6.removeWire(this.id);_6d5.commit();}}}}for(var x in this.eventHandlers){if(Object.prototype.hasOwnProperty.call(this.eventHandlers,x)){this.eventSvr._unsubscribeEvent(this.eventHandlers[x],this.hubId);}}this.eventSvr._getHubAdapter(this.hubId).removeInlineHubClient(this.hubId);if(dojo.global["_"+this.id+"_"+"iContext"]){dojo.global["_"+this.id+"_"+"iContext"]._destroy();dojo.global["_"+this.id+"_"+"iContext"]=null;}}else{if(!this.isModal()){this.eventSvr.disconnectHubClient();if(dojo.global["_"+this.id+"_"+"iContext"]){dojo.global["_"+this.id+"_"+"iContext"]=null;}}}if(this.rootElement){this.rootElement=null;}if(this.windowManager){this.windowManager=null;}this.widgetInstance._destroy();},_doRender:function(){if(!this._inIframe()){this._updateTitle();}var _6d7=document.createElement("div");_6d7.className=this.ns+"Content";this.rootElement.appendChild(_6d7);var _6d8=this.rootElement.lastChild;dojo.addClass(_6d8,this.currentMode);_6d8.style.visibility="hidden";if(this._inIframe()){dojo.style(_6d8,"height","100%");}var _6d9=this.widgetDef.getIDescriptorItems();var _6da=_6d9.getItemValue(iwConstants.iDescriptorItems.mode);if(this.isModal()&&this.currentMode!=_6da){var _6db=document.createElement("div");_6db.className=this.ns+"Content";this.rootElement.appendChild(_6db);contentDiv1=this.rootElement.lastChild;dojo.addClass(contentDiv1,_6da);contentDiv1.style.visibility="hidden";contentDiv1.style.display="none";this._updateMarkup(_6da,contentDiv1);}this._updateMarkup(this.currentMode,_6d8);this._loadWidgetSharedResource(dojo.partial(this._finishRender,_6d8,this));},_finishRender:function(_6dc,_6dd){try{var _6de=_6dd.eventSvr._subscribeEvent(com.ibm.mashups.iwidget.Constants.RESIZE_WIDGET+"."+_6dd.id,_6dd,"handleSizeChanged",null,_6dd.id);_6dd.eventHandlers.push(_6de);_6dd._createiScope();_6dd._evalScripts(_6dc);_6dd.windowManager[_6dd.currentMode]={id:_6dd.currentMode,root:_6dc,active:true,external:false};dojo.query("> ."+_6dd.ns+"loading",_6dd.rootElement).forEach(function(elem){com.ibm.mm.enabler.utils.Dom.destroyNode(elem);});_6dd.onLoad();if(typeof _6dd._eventqueue!="undefined"&&_6dd._eventqueue!==null){for(var _6df in _6dd._eventqueue){if(Object.prototype.hasOwnProperty.call(_6dd._eventqueue,_6df)){_6dd.handleEvent(_6dd._eventqueue[_6df]);}}}}catch(e){if(_6dd._logInlineMessage){_6dd._logInlineMessage(_6dd,e);}if(_6dd.bIsLoggable){_6dd.LOGGER.trace("iWidget._finishRender","failed to render widget:"+_6dd.id+" Error:"+e.message);}return;}dojo.query("."+_6dd.currentMode,_6dd.rootElement).style({"visibility":""});},_evalScripts:function(_6e0){dojo.query("script",_6e0).forEach(function(_6e1){this._jsHandler.handle(_6e1);},this);},onLoad:function(){if(!this.isModal()){this._handleEventInternal(iwConstants.EVENTS.onLoad);}this.updateState();var _6e2=new com.ibm.mm.iwidget.IEventImpl("on"+this.currentMode,null,{oldMode:null});this._handleEventInternal("on"+this.currentMode,_6e2);this.loaded=true;try{dojo.publish(com.ibm.mashups.iwidget.Constants.WIDGET_LOADED+"."+this.id,[this.id]);}catch(e){throw e;}this.eventSvr._publishEvent(com.ibm.mashups.iwidget.Constants.WIDGET_LOADED+"."+this.hubId,this.hubId);},updateState:function(){return;},_getSimpleEventHandler:function(_6e3){if(this.simpleWidgetEvents&&typeof this.simpleWidgetEvents[_6e3]!="undefined"){return this.simpleWidgetEvents[_6e3];}var _6e4=this.widgetDef.getWidgetEvents()[_6e3];if(!_6e4){_6e4=_6e3;}var _6e5=this._getHandlerScope(_6e4);var _6e6=null;if(_6e5){_6e6=dojo.hitch(_6e5,_6e4);this.simpleWidgetEvents[_6e3]=_6e6;}else{if(_6e4.indexOf("on")===0){var _6e7="on"+_6e4.substr(2,1).toUpperCase()+_6e4.substr(3);if(_6e7!=_6e4){_6e5=this._getHandlerScope(_6e7);if(_6e5){_6e6=dojo.hitch(_6e5,_6e7);this.simpleWidgetEvents[_6e3]=_6e6;}}}}return _6e6;},_getHandlerScope:function(_6e8){var fn=dojo.global["_"+this.id+"_"+_6e8];if(typeof (fn)=="undefined"){var _6e9=dojo.global["_"+this.id+"_iContext"].iScope();if(_6e9&&_6e9[_6e8]){fn=_6e9;}}if(typeof fn=="undefined"||fn===null){fn=dojo.global[_6e8];}if(typeof fn=="undefined"||fn===null){return null;}else{return fn;}},handleEvent:function(_6ea){var _6eb=_6ea.declaredClass;if(_6eb=="com.ibm.mm.iwidget.IEventImpl"){var _6ec=_6ea.name;return this._handleEvent(_6ec,_6ea);}},_handleEvent:function(_6ed,_6ee){var _6ef="_handleEvent(eventName, iEvent)";if(this.bIsLoggable){this.LOGGER.entering(_6ef,[_6ed,dojo.toJson(_6ee)]);}_6ee=this._deserializePayload(_6ee);if(typeof _6ed=="undefined"||_6ed===null){return false;}if(!this.loaded){if(!this._eventqueue){this._eventqueue={};}this._eventqueue[_6ed]=_6ee;return;}try{if(_6ed==iwConstants.EVENTS.onModeChanged){if(this._inIframe()){var _6f0={};_6f0.methodname="_handleOnModeChange";_6f0.hubclient=this.hubId;_6f0.params=[_6ee.payload];var id="_stub_"+this.id;this.eventSvr._publishEvent(iwConstants.WIDGETEVENT_PREFIX+id,_6f0,this.hubId);return;}return this._handleModeChange(_6ee);}return this._handleEventInternal(_6ed,_6ee);}catch(e){this.LOGGER.severe("IWidgetWrapper.handleEvent","widget: ${0}, eventName: ${1}, HandleEventException: ${2}",[this.hubId,_6ed,e]);throw e;}},_deserializePayload:function(_6f1){if(typeof _6f1.payload=="string"&&_6f1.payload.indexOf("className")!=-1&&_6f1.payload.indexOf("json")!=-1){try{var _6f2=dojo.fromJson(_6f1.payload);if(_6f2.className&&typeof _6f2.className=="string"&&_6f2.className.length>0&&_6f2.json&&typeof _6f2.json=="string"){var _6f3=_6f2.json;if(_6f2.className=="com.ibm.mm.data.table"&&_6f3.indexOf("data")!=-1){_6f3=dojo.fromJson(_6f3);}_6f1.payload=new (dojo.getObject(_6f2.className))(_6f3);}}catch(e){this.LOGGER.severe("IWidgetWrapper._deserializePayload","widget: ${0}, eventName: ${1}, PayloadDeserializeException: ${2}",[this.hubId,_6f1.payload,e]);throw e;}}return _6f1;},_handleOnModeChange:function(_6f4){var _6f5=new com.ibm.mm.iwidget.IEventImpl("onModeChanged",null,{newMode:_6f4},null);this._handleModeChange(_6f5);},_handleModeChange:function(_6f6){var _6f7=false;var _6f8=this.currentMode;var _6f9=_6f6.payload;if(typeof _6f9=="undefined"||_6f9===null){return false;}if(dojo.isString(_6f9)){_6f9=dojo.fromJson(_6f9);}if(typeof _6f9=="undefined"||_6f9===null){return false;}var _6fa=_6f9.newMode||null;var _6fb=_6f9.rootElementId||null;if(_6fa!==null&&_6fa==this.currentMode){return false;}if(_6fa===null){return false;}var _6fc=_6fb!==null;var _6fd=_6fb;var _6fe=this._getDefaultMode();if(!_6fe){_6fe="view";}var _6ff=this.windowManager[_6fa]||null;if(this._inIframe()&&_6ff!==null&&_6fe==_6fa){this.currentMode=_6fa;if(this._handleSaveMode){this._handleSaveMode();}this.windowManager[_6fa].active=true;if(_6fd!==null){this.windowManager[_6fa].root=_6fd;}dojo.style(this.windowManager[_6fa].root,"display","");var _700=this.windowManager[_6f8];_700.active=false;if(_700.root){dojo.style(_700.root,"display","none");}this._handleOnModeEvent(_6fa,_6f8);return;}var _701=false;if(typeof _6ff!="undefined"&&_6ff!==null){var _702=_6ff.root;if(!_6ff.external&&_702!==null&&_6fb===null){_6fd=_702;_701=true;_6f7=true;dojo.style(_702,"display","");}}if(!_701){if(_6fd===null){var _703=document.createElement("div");_703.className=this.ns+"Content";this.rootElement.appendChild(_703);_6fd=this.rootElement.lastChild;dojo.addClass(_6fd,_6fa);}_6f7=this._updateMarkup(_6fa,_6fd);}if(_6f7){var _704=this.windowManager[this.currentMode];var _705=_704.root;if(_704.external){dojo.style(_705,"display","none");this.windowManager[this.currentMode]=null;}else{if(_6fb!==null){_704.active=false;}else{_704.active=false;dojo.style(_705,"display","none");}}_6f8=this.currentMode;this.currentMode=_6fa;if(this._handleSaveMode){this._handleSaveMode();}this.windowManager[_6fa]={id:_6fa,root:_6fd,active:true,external:_6fc};if(!_701){this._evalScripts(_6fd);}this._handleOnModeEvent(_6fa,_6f8);}if(_6f7&&!this._inIframe()){dojo.publish(iwConstants.EVENTS.modeChanged,[this.id,_6f8,_6fa]);_6f9={};_6f9.id=this.id;_6f9.oldMode=_6f8;_6f9.newMode=_6fa;this.eventSvr._publishEvent(com.ibm.mashups.iwidget.Constants.WIDGET_MODECHANGED,_6f9,this.hubId);}if(this._inIframe()){var _706={};_706.methodname="_handleOnModeUpdated";_706.hubclient=this.hubId;_706.params=[_6f6.payload];var id="_stub_"+this.id;this.eventSvr._publishEvent(iwConstants.WIDGETEVENT_PREFIX+id,_706,this.hubId);}return _6f7;},_handleOnModeUpdated:function(mode){var _707=mode.newMode||mode;if(_707==this.currentMode){return;}this.currentMode=_707;if(this._handleSaveMode){this._handleSaveMode();}this.windowManager[_707]={id:this.id,active:true,external:true};},_handleOnModeEvent:function(mode,_708){if(this._inIframe()){dojo.setContext(com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().global,com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().doc);if(dojo.isIE||window.ActiveXObject!==undefined){if(document._mmcreateElement){document.createElement=document._mmcreateElement;}if(document._mmgetElementsByTagName){document.getElementsByTagName=document._mmgetElementsByTagName;}}}var _709=false;var _70a="on"+mode;if(!_708){_708=null;}var _70b=new com.ibm.mm.iwidget.IEventImpl(_70a,null,{oldMode:_708});_709=this._handleEventInternal(_70a,_70b);return _709;},_handleEventInternal:function(_70c,_70d){if(typeof _70c=="undefined"||_70c===null){return false;}var _70e=false;var _70f=null;if(_70c.indexOf("on")===0){var _710=this._getSimpleEventHandler(_70c);if(_710!==null){_70f=_710;}}if(_70f===null){_70f=this.getPublicEventHandler(_70c);}if(dojo.isFunction(_70f)){try{if(_70d){if(this._transform){_70d=this._transform(_70c,_70d);}dojo.partial(_70f)(_70d);}else{dojo.partial(_70f)();}}catch(e){this.LOGGER.severe("IWidgetWrapper._handleEventInternal","widget: ${0}, eventName: ${1}, HandleEventException: ${2}",[this.hubId,_70c,e]);throw e;}_70e=true;}return _70e;},getPublicEventHandler:function(_711){return null;},_getParent:function(){if(!this.parent){this.parent=com.ibm.mm.iwidget.Utils.getWidgetParent(this.rootElement);}this.parent=this.parent||null;return this.parent;},_setParent:function(_712){this.parent=_712;},getAttributes:function(){if(!this.widgetAttributes){var _713=com.ibm.mashups.services.ServiceManager.getService("persistentAttributesFactoryService");this.widgetAttributes=new com.ibm.mm.iwidget.manageditemset.AttributesModeDelegate(_713,this);}return this.widgetAttributes;},getWidgetItemSets:function(){if(this.widgetItemSets){return this.widgetItemSets;}this.widgetItemSets={};if(this.widgetDef){var _714=this.widgetDef.getAllItemSetNames();for(var i=0,l=_714.length;i0){var _74a=new com.ibm.mm.iwidget.IEventImpl("onItemSetChanged",null,_748);if(dojo.isString(fn)){var _74b=me._getHandlerScope(fn);if(_74b){fn=dojo.hitch(_74b,fn);}}if(dojo.isFunction(fn)){dojo.partial(fn)(_74a);}}};this.listenerManager[_745][_746]=_747;return _746;},_removeListener:function(_74c,id){if(!_74c||typeof id=="undefined"||id===null){return false;}if(!this.listenerManager){return false;}if(!this.listenerManager[_74c]){return false;}if(this.listenerManager[_74c][id]){delete this.listenerManager[_74c][id];return true;}return false;},_generateListenerId:function(){if(typeof this._listenerCt=="undefined"){this._listenerCt=0;}else{this._listenerCt++;}return this._listenerCt;},_initManagedItemSet:function(){var _74d=null;if(typeof (this.widgetDef)!="undefined"){_74d=this.widgetDef._getManagedItemSetListener(iwConstants.ATTRIBUTES);if(_74d!==null){this._registerListener(iwConstants.ATTRIBUTES,_74d);}_74d=this.widgetDef._getManagedItemSetListener(iwConstants.IDESCRIPTOR);if(_74d!==null){this._registerListener(iwConstants.IDESCRIPTOR,_74d);}}},_getRawUri:function(){var _74e=this.getIWidgetInstance().widgetXMLUrl;if(this.widgetDef.getXmlBase()){_74e=this.widgetDef.getXmlBase();}return _74e;},_initBaseUri:function(_74f){if(!_74f){return;}this.rawBaseUri=this._getRawBaseUri(_74f);this.widgetBaseUri=this._getResolvedPocUri(this.rawBaseUri);this.widgetBaseUriXhr=this._getXhrUri(this.widgetBaseUri);if(this.rawBaseUri.indexOf(":/")!=-1){var _750=this._getServerRoot(this.rawBaseUri);if(_750){this.serverRoot=this._getResolvedPocUri(_750);this.serverRootXhr=this._getXhrUri(this.serverRoot);}}},_rewriteURI:function(uri,_751){if(!this.widgetBaseUri){var _752=this._getRawUri();this._initBaseUri(_752);}return this._rewriteURIWithContext(uri,_751,this.widgetBaseUri,this.widgetBaseUriXhr,this.serverRoot,this.serverRootXhr);},_rewriteURIWithContext:function(uri,_753,_754,_755,_756,_757){if(typeof _753=="undefined"){_753=true;}var uri2=com.ibm.mm.enabler.EndpointUtils.checkForEndpoints(uri);if(uri2){uri=uri2;}var _758=uri;var _759,_75a;if(_753){if(uri.indexOf(":/")!=-1){_758=com.ibm.mm.enabler.utils.URLHelper.rewriteURL(uri);}else{if(_757!==null&&uri.indexOf(_757)===0){_758=uri;}else{_759=uri.split("?");_75a=com.ibm.mm.enabler.utils.Misc.encodePath(_759[0]);_758=_75a;if(uri.indexOf("/")===0){if(_757){_758=_757+_75a.substring(1);}}else{if(_755){_758=_755+_75a;}}if(_759.length==2){_758+="?"+_759[1];}}}}else{if(uri.indexOf(":/")===-1){_759=uri.split("?");_75a=com.ibm.mm.enabler.utils.Misc.encodePath(_759[0]);if(uri.indexOf("/")===0){if(_756){_758=_756+_75a.substring(1);}}else{if(_754){_758=_754+_75a;}}if(_759.length===2){_758+="?"+_759[1];}}}return _758;},_getRawBaseUri:function(_75b){if(!_75b){return null;}var _75c=_75b.indexOf("?");if(0<_75c){_75b=_75b.substring(0,_75c);}var uri2=com.ibm.mm.enabler.EndpointUtils.checkForEndpoints(_75b);if(uri2){_75b=uri2;}var rc=_75b.substring(0,_75b.lastIndexOf("/")+1);return rc;},_getResolvedPocUri:function(_75d){if(!_75d){return null;}var rc=_75d;if(com.ibm.mm.enabler.utils.Misc.isPocUrl(_75d)===true){rc=com.ibm.mm.enabler.utils.URLHelper.rewriteURL(_75d);}return rc;},_getXhrUri:function(_75e){if(!_75e){return null;}var rc=_75e;if(_75e.indexOf("/")!==0){rc=com.ibm.mm.enabler.utils.URLHelper.rewriteURL(_75e);}return rc;},_getServerRoot:function(_75f){if(!_75f){return null;}if(_75f.indexOf(":/")==-1){return null;}var _760=null;var _761=_75f.indexOf(":/");_760=_75f.substring(0,_761+2);if(_75f.indexOf(":///")!==-1){_760=_75f.substring(0,_761+4);}else{if(_75f.indexOf("://")!==-1){var _762=_75f.indexOf("/",_761+4);_760=_75f.substring(0,_762+1);}}return _760;},_executeCallbackQueue:function(){return;},_getCurrentMode:function(){return this.currentMode;}});com.ibm.mm.iwidget.widget.IWidgetWrapperImpl=com.ibm.mm.iwidget.widget.IWidgetWrapperDefaultImpl;if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"iWidget")>=0)){dojo["require"]("com.ibm.mm.iwidget.widget.IWidgetWrapperExtendedImpl");}}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetWrapper"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetWrapper"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.IWidgetWrapper");}if(!dojo._hasResource["com.ibm.mashups.iwidget.model.WidgetModel"]){dojo._hasResource["com.ibm.mashups.iwidget.model.WidgetModel"]=true;dojo.provide("com.ibm.mashups.iwidget.model.WidgetModel");dojo.declare("com.ibm.mashups.iwidget.model.WidgetModel",null,{constructor:function(id){},find:function(id){},hasChildren:function(_763){},getChildren:function(_764,_765){},getParent:function(_766){},getWidgetDefinitionByUrl:function(url){},getWidgetDefinitionByURL:function(url){},commit:function(){},createIWidgetDefinition:function(json){},createWidget:function(span){}});}if(!dojo._hasResource["com.ibm.mm.enabler.hub.ManagedHubImpl"]){dojo._hasResource["com.ibm.mm.enabler.hub.ManagedHubImpl"]=true;dojo.provide("com.ibm.mm.enabler.hub.ManagedHubImpl");dojo.declare("com.ibm.mm.enabler.hub.ManagedHubImpl",null,{constructor:function(){},publishMgr:function(_767,data,_768,_769){var _76a=_768?_768.getClientID():"manager";var _76b=_769?_769.getClientID():"manager";var that=com.ibm.mm.enabler.hub.ManagedHubImpl._instance;if(that.bIsLoggable){that.LOGGER.trace("publishMgr","(MANAGER): PUB: "+_76a+" -> "+_76b+" || topic: '"+_767+"' data: '"+data+"'");}return true;},subscribeMgr:function(_76c,_76d){var _76e=_76d?_76d.getClientID():"manager";var that=com.ibm.mm.enabler.hub.ManagedHubImpl._instance;if(that.bIsLoggable){that.LOGGER.trace("subscribeMgr","(MANAGER): SUB: id: '"+_76e+"' topic: '"+_76c+"'");}return true;},securityMgr:function(_76f,_770){var that=com.ibm.mm.enabler.hub.ManagedHubImpl._instance;if(that.bIsLoggable){that.LOGGER.trace("securityMgr","source:"+_76f+" alertType:"+_770);}},getInstance:function(){var hub=com.ibm.mm.enabler.hub.ManagedHubImpl._instance;if(!hub){com.ibm.mm.enabler.hub.ManagedHubImpl._instance=new OpenAjax.hub.ManagedHub({onPublish:this.publishMgr,onSubscribe:this.subscribeMgr,onSecurityAlert:this.securityMgr});com.ibm.mm.enabler.hub.ManagedHubImpl._instance.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.hub.ManagedHubImpl");com.ibm.mm.enabler.hub.ManagedHubImpl._instance.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;com.ibm.mm.enabler.hub.ManagedHubImpl._instance.bIsLoggable=com.ibm.mm.enabler.hub.ManagedHubImpl._instance.LOGGER.isLoggable(com.ibm.mm.enabler.hub.ManagedHubImpl._instance.LOG_LEVEL);hub=com.ibm.mm.enabler.hub.ManagedHubImpl._instance;}return hub;}});com.ibm.mm.enabler.hub.ManagedHubImpl=new com.ibm.mm.enabler.hub.ManagedHubImpl();}if(!dojo._hasResource["com.ibm.mm.enabler.hub.SubDomainPoolImpl"]){dojo._hasResource["com.ibm.mm.enabler.hub.SubDomainPoolImpl"]=true;dojo.provide("com.ibm.mm.enabler.hub.SubDomainPoolImpl");dojo.declare("com.ibm.mm.enabler.hub.SubDomainPoolImpl",null,{constructor:function(arr){if(arr){this._pool=arr;this._internalPool=dojo.clone(this._pool);}else{this._counter=0;this._reusedSubDomain=[];}this.configService=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);this.reuseSubDomain=this.configService.getValue(com.ibm.mashups.enabler.services.ConfigConstants.SUBDOMAINREUSE);},getSize:function(){if(this._internalPool){return this._internalPool.length;}return -1;},get:function(){if(this._pool){return this._getFromPool();}var cnt=this._counter;if(this.reuseSubDomain){if(this._reusedSubDomain.length>0){cnt=this._reusedSubDomain.shift();return cnt;}else{this._counter++;}}else{this._counter++;}return "w"+cnt;},add:function(_771){if(!this.reuseSubDomain){return;}if(this._pool){return this._addToPool(_771);}else{this._reusedSubDomain.push(_771);}return;},_getFromPool:function(){if(this._pool.length===0){return null;}return this._pool.shift();},_addToPool:function(_772){this._pool.push(_772);}});}if(!dojo._hasResource["com.ibm.mm.enabler.hub.XHRHeaderExtensionImpl"]){dojo._hasResource["com.ibm.mm.enabler.hub.XHRHeaderExtensionImpl"]=true;dojo.provide("com.ibm.mm.enabler.hub.XHRHeaderExtensionImpl");dojo.declare("com.ibm.mm.enabler.hub.XHRHeaderExtensionImpl",null,{LOG_LEVEL:com.ibm.mashups.enabler.logging.LogLevel.TRACE,constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_METHOD="dojo.xhr()";this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);this.originalDojoXHR=dojo.xhr;dojo.xhr=dojo.hitch(this,function(_773,args,_774){if(this.bIsLoggable){this.LOGGER.entering(this.LOG_METHOD,[_773,args,_774]);}if(!args.headers){args.headers={};}args.headers["com.ibm.lotus.openajax.virtualhost"]=document.location.hostname;args.headers["com.ibm.lotus.openajax.virtualport"]=document.location.port?document.location.port:(document.location.protocol=="https:"?"443":"80");if(this.bIsLoggable){this.LOGGER.trace(this.LOG_METHOD,"Adding headers: com.ibm.lotus.openajax.virtualhost="+document.location.hostname+" - com.ibm.lotus.openajax.virtualport="+document.location.port);}var ret=this.originalDojoXHR(_773,args,_774);if(this.bIsLoggable){this.LOGGER.exiting(this.LOG_METHOD);}return ret;});}});com.ibm.mm.enabler.hub.XHRHeaderExtension=new com.ibm.mm.enabler.hub.XHRHeaderExtensionImpl();}if(!dojo._hasResource["com.ibm.mm.enabler.hub.MainHubAdapterImpl"]){dojo._hasResource["com.ibm.mm.enabler.hub.MainHubAdapterImpl"]=true;dojo.provide("com.ibm.mm.enabler.hub.MainHubAdapterImpl");dojo.declare("com.ibm.mm.enabler.hub.MainHubAdapterImpl",null,{constructor:function(_775){this._managedhub=_775;this._inlineHubClients={};this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},PREFIX_INLINE:"_inline_",PREFIX_IFRAME:"_iframe_",createInlineHubContainer:function(id){var _776=this.PREFIX_INLINE+id;var me=this;function onClientConnect(_777){if(me.bIsLoggable){me.LOGGER.trace("onClientConnect","++ "+_777.getClientID()+" connected");}};function onClientDisconnect(_778){if(me.bIsLoggable){me.LOGGER.trace("onClientDisconnect","-- "+_778.getClientID()+" disconnected");}};function onClientSecurityAlert(_779,_77a){if(me.bIsLoggable){me.LOGGER.trace("onClientSecurityAlert","!! security alert - id: '"+_779.getClientID()+"' msg: '"+_77a);}};function onClientError(_77b,_77c){if(me.bIsLoggable){me.LOGGER.trace("onClientError","!! error - id: '"+_77b.getClientID()+"' msg: '"+_77c);}};var _77d={Container:{onConnect:onClientConnect,onDisconnect:onClientDisconnect,onSecurityAlert:onClientSecurityAlert,onError:onClientError}};var _77e=new OpenAjax.hub.InlineContainer(this._managedhub,_776,_77d);return _77e;},createIframeHubContainer:function(id,_77f,uri,_780,_781,_782,_783){var _784=this.PREFIX_IFRAME+id;var _785=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _786=_785.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTEXT_ROOT_ENABLER);var _787=_786+"/js/openajaxhub/rpc_relay.html";var _788=window.location.protocol;var host=window.location.hostname;var port=window.location.port;var _789=_788+"http://"+host+":"+port+_787;if(port==""){_789=_788+"http://"+host+_787;}var me=this;function onClientConnect(_78a){if(me.bIsLoggable){me.LOGGER.trace("onClientConnect","++ "+_78a.getClientID()+" connected");}};function onClientDisconnect(_78b){if(me.bIsLoggable){me.LOGGER.trace("onClientDisconnect","-- "+_78b.getClientID()+" disconnected");}};function onClientSecurityAlert(_78c,_78d){if(me.bIsLoggable){me.LOGGER.trace("onClientSecurityAlert","!! security alert - id: '"+_78c.getClientID()+"' msg: '"+_78d);}};try{var w,h;this.removeIframeHubContainer(id);if(_780&&_780=="true"){w="600px";h="400px";}else{w="100%";h="100%";}if(_781){w=_781;}if(_782){h=_782;}if(_783){onClientSecurityAlert=_783;}var _78e=new OpenAjax.hub.IframeContainer(this._managedhub,_784,{Container:{onConnect:onClientConnect,onDisconnect:onClientDisconnect,onSecurityAlert:onClientSecurityAlert},IframeContainer:{uri:uri,tunnelURI:_789,parent:_77f,iframeAttrs:{title:"iframe",style:{width:w,height:h,border:"0px",overflow:"auto"}},timeout:1200000}});}catch(e){if(me.bIsLoggable){me.LOGGER.trace("createIframeHubContainer","Creating iframe container exception:"+e.message);}}},createInlineHubClient:function(id){var _78f=this.PREFIX_INLINE+id;var me=this;var _790=this._managedhub.getContainer(_78f);function onHubClientSecurityAlert(_791,_792){};var _793=new OpenAjax.hub.InlineHubClient({HubClient:{onSecurityAlert:onHubClientSecurityAlert},InlineHubClient:{container:_790}});function onHubClientConnect(_794,_795,_796){if(!_795){if(me.bIsLoggable){me.LOGGER.trace("createIframeHubContainer","!! client connection error = id: '"+_794.getClientID()+"' msg: '"+_796);}}};_793.connect(onHubClientConnect);this._inlineHubClients[_78f]=_793;return _793;},_getInlineHubClient:function(id){if(!id){return null;}var _797=this.PREFIX_INLINE+id;var _798=this._inlineHubClients[_797];if(typeof _798=="undefined"){_798=null;}return _798;},getInlineHubClient:function(id){if(!id){return this._managedhub;}var _799=this._getInlineHubClient(id);return _799?_799:this._managedhub;},isInlineClient:function(id){var rc=false;var _79a=this._getInlineHubClient(id);if(_79a){rc=true;}return rc;},removeInlineHubClient:function(id){var _79b=this._getInlineHubClient(id);var _79c=this.PREFIX_INLINE+id;if(_79b){var me=this;var _79d=function(_79e,_79f,_7a0){if(!_79f){if(me.bIsLoggable){me.LOGGER.trace("onHubClientDisconnect","-- "+_79e.getClientID()+" msg:"+_7a0);}}};_79b.disconnect(_79d);delete this._inlineHubClients[_79c];var _7a1=this._managedhub.getContainer(_79c);if(_7a1){this._managedhub.removeContainer(_7a1);}return;}},getContainer:function(id,_7a2){_7a2=_7a2||false;if(_7a2===true){id=this.PREFIX_IFRAME+id;}return this._managedhub.getContainer(id);},removeIframeHubContainer:function(id){var _7a3=this.PREFIX_IFRAME+id;var _7a4=this._managedhub.getContainer(_7a3);if(_7a4){this._managedhub.removeContainer(_7a4);}},returnSubDomain:function(_7a5){this.getSubDomainPool().add(_7a5);},getSubDomainSize:function(){return this.getSubDomainPool().getSize();},getSubDomain:function(){return this.getSubDomainPool().get();},getSubDomainPool:function(){if(!this.subDomainPool){var _7a6=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _7a7=_7a6.getValue(com.ibm.mashups.enabler.services.ConfigConstants.SUBDOMAINS);if(_7a7){if(dojo.isArray(_7a7)&&_7a7.length!==0){this.subDomainPool=new com.ibm.mm.enabler.hub.SubDomainPoolImpl(_7a7);}}if(!this.subDomainPool){this.subDomainPool=new com.ibm.mm.enabler.hub.SubDomainPoolImpl();}}return this.subDomainPool;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.services.EventService"]){dojo._hasResource["com.ibm.mm.iwidget.services.EventService"]=true;dojo.provide("com.ibm.mm.iwidget.services.EventService");dojo.declare("com.ibm.mm.iwidget.services.EventServiceDefaultImpl",com.ibm.mashups.iwidget.services.EventService,{constructor:function(){this.subMgr={};this.managedhub=com.ibm.mm.enabler.hub.ManagedHubImpl.getInstance();this.hubAdapter=new com.ibm.mm.enabler.hub.MainHubAdapterImpl(this.managedhub);this._subscribeEventService();if(this.registerServices){this.registerServices();}if(this.registerExtServices){this.registerExtServices();}this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},getType:function(){return com.ibm.mm.iwidget.Constants.eventservice.type.MAIN;},registerServices:function(){var _7a8=com.ibm.mashups.iwidget.Constants.CHANGE_WIDGETMODE;var me=this;var _7a9=function(_7aa){var _7ab=_7aa.id;var _7ac=_7aa.newMode;var _7ad=_7aa.parentNode;me.fireEvent(_7ab,"onModeChanged",{newMode:_7ac,rootElementId:_7ad});};this.subscribeEvent(_7a8,null,_7a9,null,null);},setId:function(id){this.id=id;},getId:function(){return "main";},_subscribeEventService:function(){var that=this;function eventCallback(_7ae,_7af,_7b0){var _7b1=_7af.methodname;if(_7b1){var fn=that[_7af.methodname];if(fn){that[_7b1].apply(that,_7af.params);}}};this.managedhub.subscribe("eventservice."+this.getId(),eventCallback,that,that._subscribeCallback);},_subscribeCallback:function(_7b2,_7b3,_7b4){if(!_7b3){console.log("subscribe failed "+_7b2);}},_getHubAdapter:function(){return this.hubAdapter;},_getManagedHub:function(){return this.managedhub;},WIDGETEVENT_PREFIX:iwConstants.WIDGETEVENT_PREFIX,WILDCARD_PREFIX:iwConstants.WILDCARD_PREFIX,subscribeWire:function(_7b5,_7b6,_7b7,_7b8){return false;},publishWire:function(_7b9,_7ba,_7bb,_7bc){return false;},unSubscribeWire:function(_7bd,_7be,_7bf,_7c0){return false;},addWire:function(_7c1,_7c2,_7c3,_7c4){return false;},removeWire:function(_7c5,_7c6,_7c7,_7c8){return false;},fireEvent:function(_7c9,_7ca,_7cb,_7cc,_7cd){var _7ce=new com.ibm.mm.iwidget.IEventImpl(_7ca,_7cc,_7cb,_7cd);var _7cf=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel();var _7d0=_7cf.find(_7c9);var cb=function(_7d1,_7d2,_7d3,_7d4){var _7d5=_7d1.hubAdapter.isInlineClient(_7d2.id);if(_7d5){_7d1._publishEvent(_7d1.WIDGETEVENT_PREFIX+_7d2.id,_7d3,_7d3.source);}else{var _7d6={};if(_7d3.name==iwConstants.EVENTS.onModeChanged){_7d6.methodname="_handleOnModeChange";_7d6.params=[_7cb];_7d2.handleEvent(_7d6);return;}_7d6.methodname="fireEvent";_7d6.hubclient=_7d1.getId();_7d6.params=[_7d2.id,_7d3.name,_7d3.payload,_7d3.type];_7d1._publishEvent("eventservice."+_7d2.id,_7d6);}if(_7d4){var _7d7=_7d1.subMgr[_7d4];if(_7d7){_7d1.unsubscribeEvent(_7d7);}delete _7d1.subMgr[_7d4];}};if(_7d0&&_7d0.isLoaded()){cb(this,_7d0,_7ce);}else{var that=this;var _7d8=dojox.uuid.generateRandomUuid();var _7d9=this.subscribeEvent(com.ibm.mashups.iwidget.Constants.WIDGET_LOADED+"."+_7c9,null,function(){var _7da=_7cf.find(_7c9);cb(that,_7da,_7ce,_7d8);});this.subMgr[_7d8]=_7d9;}},publishEvent:function(_7db,_7dc,_7dd,_7de){if(this.bIsLoggable){this.LOGGER.entering("eventService.publishEvent",[_7db,_7dc,_7dd,_7de]);}if(typeof _7db=="undefined"||_7db===null){return;}var temp;if(_7db.indexOf(this.WILDCARD_PREFIX)===0){temp=this.WILDCARD_PREFIX;return this.broadcastEvent(_7db.substring(temp.length),_7dc,_7dd,_7de);}else{if(_7db.indexOf(this.WIDGETEVENT_PREFIX)===0){temp=_7db.substring(this.WIDGETEVENT_PREFIX.length);var _7df=temp.substring(0,temp.indexOf("."));var _7e0=temp.substring(temp.indexOf(".")+1);return this.fireEvent(_7df,_7e0,_7dc,_7dd,_7de);}}this._publishEvent(_7db,_7dc,_7de);},_publishEvent:function(_7e1,_7e2,_7e3){var _7e4=this.hubAdapter.getInlineHubClient(_7e3);if(typeof _7e2=="undefined"||_7e2===null){_7e4.publish(_7e1);}else{_7e4.publish(_7e1,_7e2);}},broadcastEvent:function(_7e5,_7e6,_7e7,_7e8,_7e9,_7ea){var _7eb={};_7eb.targetEvent=_7e5;_7eb.payload=_7e6;_7eb.payloadType=_7e7;this.broadcastEvents([_7eb],_7e8,_7e9,_7ea);return;},broadcastEvents:function(_7ec,_7ed,_7ee,_7ef){if((_7ec===null)||!dojo.isArray(_7ec)){return;}var _7f0=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _7f1=com.ibm.mashups.enabler.model.state.AccessorFactory.getSpaceAccessor(_7f0);var _7f2=_7f1.getSpaceID();var _7f3=com.ibm.mashups.enabler.model.state.AccessorFactory.getPageAccessor(_7f0,_7f2);var _7f4=_7f3.getPageID();var _7f5=((_7ee)&&(typeof _7ee=="string")&&(_7ee!=_7f4));if(_7f5){this._switchPageForBroadcastEvents(_7ec,_7ed,_7ee,_7ef,_7f0,_7f1,_7f2);}else{var _7f6;var _7f7;var _7f8=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel();var _7f9=_7f8.getAllWidgets();var that=this;var _7fa=function(_7fb,_7fc,_7fd){var _7fe=_7fb.getWidgetHandledEvents();if(_7fe===null){var _7ff=_7fb.getIWidgetDefinition().start();if(_7ff){_7fe=_7ff.getWidgetHandledEvents();}}if(_7fe){for(var i=0;i<_7fc.length;i++){for(var j=0;j<_7fe.length;j++){if(_7fc[i].targetEvent==_7fe[j].name){that.fireEvent(_7fb.getID(),_7fc[i].targetEvent,_7fc[i].payload,_7fc[i].payloadType,_7ed);break;}}}}if(_7fd){var _800=that.subMgr[_7fd];if(_800){that.unsubscribeEvent(_800);}delete that.subMgr[_7fd];}};var _801=false;for(var i in _7f9){if(Object.prototype.hasOwnProperty.call(_7f9,i)){var _802=_7f9[i];if(_802.isLoaded()){_7fa(_802,_7ec);}else{if(!_802.lazyLoad){_801=true;_7f6=dojox.uuid.generateRandomUuid();_7f7=this.subscribeEvent(com.ibm.mashups.iwidget.Constants.WIDGET_LOADED+"."+_802.getID(),null,dojo.partial(_7fa,_802,_7ec,_7f6));this.subMgr[_7f6]=_7f7;}}}}if((_7ec.length>0)&&(_7ec[0].targetEvent==="com.ibm.mashups.builder.skinLoaded")){_7f6=dojox.uuid.generateRandomUuid();_7f7=this.subscribeEvent(com.ibm.mashups.iwidget.Constants.WIDGET_LOADED+"."+_7ec[0].payload.widgetId,null,function(){that._handleBroadcastEventsCache();var _803=that.subMgr[_7f6];if(_803){that.unsubscribeEvent(_803);}});this.subMgr[_7f6]=_7f7;}for(var j=0;j<_7ec.length;j++){this._publishEvent(_7ec[j].targetEvent,_7ec[j].payload,_7ed);}}return;},_switchPageForBroadcastEvents:function(_804,_805,_806,_807,_808,_809,_80a){},_handleBroadcastEventsCache:function(){},_subscribeEvent:function(_80b,_80c,_80d,_80e,_80f){var _810=this._getHubAdapter().getInlineHubClient(_80f);var _811=_810.subscribe(_80b,function(_812,data,_813){var ec=_80d;if(_80c&&_80d){ec=dojo.hitch(_80c,_80d);}if(ec){ec(data);}},null,function(_814,_815,_816){if(_80c&&_80e){_80e=dojo.hitch(_80c,_80e);}if(_80e){_80e.apply(this,[_814,_815,_816]);}if(!_815){console.log("subscription for "+_814+" failed");return;}});return _811;},subscribeEvent:function(_817,_818,_819,_81a,_81b){return this._subscribeEvent(_817,_818,_819,_81a,_81b);},_unsubscribeEvent:function(_81c,_81d){var _81e=this._getHubAdapter().getInlineHubClient(_81d);try{if(_81e){_81e.unsubscribe(_81c);}}catch(e){console.log("unsubscribe failure:"+e);}},unsubscribeEvent:function(_81f,_820){if(!_81f){return;}this._unsubscribeEvent(_81f,_820);},_generateWireId:function(_821,_822,_823,_824){return _821+"_"+_822+"_"+_823+"_"+_824;}});if(!ibmConfig.insideSandbox){com.ibm.mashups.services.ServiceManager.setService("eventService","com.ibm.mm.iwidget.services.EventServiceDefaultImpl");}if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"iWidget")>=0)){dojo["require"]("com.ibm.mm.iwidget.services.EventServiceExtended");dojo["require"]("com.ibm.mm.iwidget.services.IFrameEventServiceImpl");}}if(!dojo._hasResource["com.ibm.mm.iwidget.model.WidgetModel"]){dojo._hasResource["com.ibm.mm.iwidget.model.WidgetModel"]=true;dojo.provide("com.ibm.mm.iwidget.model.WidgetModel");dojo.declare("com.ibm.mm.iwidget.model.WidgetModelDefaultImpl",com.ibm.mashups.iwidget.model.WidgetModel,{constructor:function(){this.widgetArr={};this.parentMap={};this.eventService=com.ibm.mashups.services.ServiceManager.getService("eventService");this.eventService.subscribeEvent(com.ibm.mashups.iwidget.Constants.UNLOAD_WIDGETS,this,"_unloadWidgets");if(!ibmConfig||(ibmConfig&&typeof ibmConfig.loadingHTML!="string")){if(ibmConfig["loadingHTML.imageURL"]){this.processAnim=com.ibm.mm.enabler.utils.Misc.preloadImage(ibmConfig["loadingHTML.imageURL"],20,20);}else{var url=dojo.moduleUrl("com.ibm.mm.iwidget","image/");url=url+"progress-anim.gif";this.processAnim=com.ibm.mm.enabler.utils.Misc.preloadImage(url,20,20);}}dojo.addOnWindowUnload(this,"_onWindowUnload");this.global=dojo.global;this.doc=dojo.doc;this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},_onWindowUnload:function(){try{var arr=[];for(var i in this.widgetArr){if(Object.prototype.hasOwnProperty.call(this.widgetArr,i)){this._unloadWidget(i);}}}catch(e){console.log("_onWindowUnload "+e.message);}},createWidget:function(_825){var id=_825.getAttribute("id");if(typeof (id)=="undefined"){return null;}var _826=this.widgetArr[id];if(typeof _826!="undefined"&&_826!==null){var _827=_826.rootElement;if(_827==_825){return _826;}else{this._unloadWidget(id);}}var _828=new com.ibm.mm.iwidget.widget.IWidgetWrapperImpl(_825,id);this.widgetArr[id]=_828;this.parentMap[id]="DEFER_TOKEN";return _828;},createIWidgetDefinition:function(json){return new com.ibm.mm.iwidget.widget.IWidgetDefinitionImpl(null,null,json);},find:function(id){var _829=this.widgetArr[id];if(typeof _829!="undefined"){if(_829.lazyLoad&&!_829.loaded){this.renderWidget(_829);delete _829.lazyLoad;}return _829;}return null;},getWidgetById:function(id){return this.find(id);},commit:function(){return new com.ibm.mm.enabler.DeferredOperationImpl(this,this._commit);},_commit:function(_82a,sync){for(var _82b in this.widgetArr){if(Object.prototype.hasOwnProperty.call(this.widgetArr,_82b)){var _82c=this.widgetArr[_82b];var _82d=_82c.getIWidgetInstance();if(!_82d){continue;}_82c.commit();}}},_unloadWidgets:function(arr){var _82e;if(typeof arr!="undefined"||arr!==null){var _82f;if(arr.refreshId){_82f=arr.refreshId;arr=arr.unloadArray;}if(dojo.isArray(arr)){for(var i in arr){if(Object.prototype.hasOwnProperty.call(arr,i)){_82e=arr[i];this._unloadWidget(_82e,_82e==_82f?true:false);}}dojo.publish(com.ibm.mashups.iwidget.Constants.WIDGETS_UNLOADED,[arr]);this.eventService.publishEvent(com.ibm.mashups.iwidget.Constants.WIDGETS_UNLOADED,arr);}else{if(dojo.isString(arr)){this._unloadWidget(arr);}}}},_unloadWidget:function(_830,_831){if(typeof this.widgetArr[_830]!="undefined"&&this.widgetArr[_830]!==null){var _832=this.widgetArr[_830];try{_832.destroy(_831);}catch(e){}delete this.widgetArr[_830];if(this.parentMap[_830]){delete this.parentMap[_830];}}},getParent:function(_833){var _834=this.parentMap[_833.getID()];if(_834&&_834=="DEFER_TOKEN"){_834=_833._getParent();this.parentMap[_833.getID()]=_834;}if(_834){parent=this.find(_834);}return parent||null;},hasChildren:function(_835){return (this.getChildren(_835,false).length===0)?false:true;},getChildren:function(_836,_837){this._checkParentMap();var _838=[];var _839=(typeof _837=="undefined")?true:_837;this._getChildren(_836,_839,_838);return _838;},_checkParentMap:function(){for(var id in this.widgetArr){if(Object.prototype.hasOwnProperty.call(this.widgetArr,id)){var _83a=this.parentMap[id];if(_83a&&_83a=="DEFER_TOKEN"){var _83b=this.widgetArr[id];_83a=_83b._getParent();this.parentMap[id]=_83a;}}}},_getChildren:function(_83c,_83d,_83e){for(var id in this.parentMap){if(this.parentMap[id]==_83c.getID()){var _83f=this.find(id);if(_83f){_83e.push(_83f);if(_83d){this._getChildren(_83f,_83d,_83e);}}}}},getWidgetDefinitionByUrl:function(url){return this.getWidgetDefinitionByURL(url);},getWidgetDefinitionByURL:function(url){return new com.ibm.mm.iwidget.DeferredLoadImpl(url);},getAllWidgets:function(){return this.widgetArr;},renderWidget:function(_840){if(typeof _840=="undefined"){return;}if(_840.loaded){return;}_840.doRender();}});com.ibm.mm.iwidget.model.WidgetModelImpl=com.ibm.mm.iwidget.model.WidgetModelDefaultImpl;if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"iWidget")>=0)){dojo["require"]("com.ibm.mm.iwidget.model.WidgetModelExtended");}}if(!dojo._hasResource["com.ibm.mm.iwidget.model.FactoryImpl"]){dojo._hasResource["com.ibm.mm.iwidget.model.FactoryImpl"]=true;dojo.provide("com.ibm.mm.iwidget.model.FactoryImpl");dojo.declare("com.ibm.mm.iwidget.model.FactoryImpl",com.ibm.mashups.iwidget.model.Factory,{constructor:function(){},getGlobalWidgetModel:function(){if(!this._globalWidgetModel){this._globalWidgetModel=new com.ibm.mm.iwidget.model.WidgetModelImpl();}return this._globalWidgetModel;}});com.ibm.mashups.iwidget.model.Factory=new com.ibm.mm.iwidget.model.FactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.iwidget.model.Factory"]){dojo._hasResource["com.ibm.mashups.iwidget.model.Factory"]=true;dojo.provide("com.ibm.mashups.iwidget.model.Factory");}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.NavigationStateProcessorImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.NavigationStateProcessorImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.NavigationStateProcessorImpl");dojo.declare("com.ibm.mm.enabler.model.state.NavigationStateProcessorImpl",com.ibm.mashups.enabler.model.state.NavigationStateProcessor,{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);if(this.bIsLoggable){this.LOGGER.entering("constructor");}this.configService=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _841=this.configService.getValue(com.ibm.mashups.enabler.services.ConfigConstants.NAVSTATE_PERSISTENCE_URL);if(_841){this.persistenceURL=this._getAssociativeArray(_841);}var _842=this.configService.getValue(com.ibm.mashups.enabler.services.ConfigConstants.NAVSTATE_PERSISTENCE_PSTORE);if(_842){this.persistencePSTORE=this._getAssociativeArray(_842);}var _843=this.configService.getValue(com.ibm.mashups.enabler.services.ConfigConstants.NAVSTATE_PERSISTENCE_URL_LIMIT);var _844=10;if(_843){_844=parseInt(_843,10);}this.urlpersistenceLIMIT=_844;var _845=this.configService.getValue(com.ibm.mashups.enabler.services.ConfigConstants.NAVSTATE_PERSISTENCE_URL_SPLIMIT);_844=2;if(_845){_844=parseInt(_845,10);}this.urlpersistenceSPLIMIT=_844;this.isHuffmannEnabled=this.configService.getValue(com.ibm.mashups.enabler.services.ConfigConstants.NAVSTATE_HUFFMANNENCODE_ENABLED);},PID:"pid",SHAREDPARAMETERSETS:"sps",SID:"sid",HUFFMANN_PREFIX:"mashup:huffman/",encodeWidgetIdentifier:function(wid,nsm){return wid;},decodeWidgetIdentifier:function(wid,nsm){return wid;},dispose:function(_846){var _847=com.ibm.mashups.enabler.model.state.CookieManager;var temp=_847.disposeState();if(_846){_846();}},_getAssociativeArray:function(_848){var obj={};if(dojo.isString(_848)){obj[_848]=_848;return obj;}for(var i in _848){if(Object.prototype.hasOwnProperty.call(_848,i)){var _849=_848[i];obj[_849]=_849;}}return obj;},decode:function(url,_84a){if(this.bIsLoggable){this.LOGGER.entering("decode");this.LOGGER.trace("decode","url is "+url);}if(url.indexOf(this.HUFFMANN_PREFIX)!=-1){var arr=url.split(this.HUFFMANN_PREFIX);var _84b=com.ibm.mm.enabler.encode.huffman.HuffmanURL.getDataFromHuffmanTree(arr[1])||null;if(_84b){url=arr[0]+_84b;}}var hash=this._getHash(url)||null;if(hash){if(url.indexOf("#")!=-1){if(url.lastIndexOf("&")==(url.length-1)){url=url.concat(hash);}else{url=url.concat("#");url=url.concat(hash);}}else{url=url.concat("#");url=url.concat(hash);}}var _84c={};var _84d=new com.ibm.mm.enabler.utils.HttpUrl(url);var _84e=_84d.anchor;_84e=decodeURIComponent(_84e);if(this.bIsLoggable){this.LOGGER.trace("decode","fragment is "+_84e);}if(_84e&&_84e!=""){var _84f=dojo.queryToObject(_84e);var _850=new Date().getTime();if(_84f.pid){_84c.pid={};_84c.pid.value=decodeURIComponent(_84f.pid);_84c.pid.params={};_84c.pid.params.lm=_850;}if(_84f.sid){_84c.sid={};_84c.sid.value=decodeURIComponent(_84f.sid);_84c.sid.params={};_84c.sid.params.lm=_850;}if(_84f.sps){_84c.sparams={};rawValue=dojo.fromJson(decodeURIComponent(_84f.sps));_84c.sparams=rawValue;}_84c.wparams={};for(var i in _84f){if(i.indexOf("w")===0&&i.indexOf("cp")==-1&&i.indexOf("rp")==-1){var _851={};var _852=i.substr(1)*1+_850;var wID=_84f[i];var _853=i+"cp";var _854=i+"rp";if(_84f[_853]){_851.value=_851.value?_851.value:{};try{_851.value.cp=dojo.fromJson(decodeURIComponent(_84f[_853]));}catch(e){_851.value.cp=decodeURIComponent(_84f[_853]);}_851.params=_851.params?_851.params:{};_851.params.lm=_852;}if(_84f[_854]){_851.value=_851.value?_851.value:{};try{_851.value.rp=dojo.fromJson(decodeURIComponent(_84f[_854]));}catch(e2){_851.value.rp=decodeURIComponent(_84f[_854]);}_851.params=_851.params?_851.params:{};_851.params.lm=_852;}_84c.wparams[wID]=_851;}else{if(i.indexOf("w")!==0&&i!="pid"&&i!="sid"&&i!="sps"&&i!="pageselection"){var _855=_84f[i];_84c.params=_84c.params?_84c.params:{};_84c.params[i]=decodeURIComponent(_855);}}}}if(_84a){_84a(_84c);}if(!_84a){return _84c;}},_getFragmentFromData:function(obj,_856,_857){var _858;if(dojo.isString(obj)){_858=obj;}else{_858=dojo.clone(obj);if(_856||_857){_858=this._filterData(obj,_856,_857);}}var _859=_858;if(!dojo.isString(_859)){if(this._isEmpty(_859)){_859=null;}else{try{_859=dojo.toJson(_859);}catch(e){_859=null;}}}return _859;},encode:function(_85a,_85b,_85c,_85d,nsm){var _85e="";var _85f={};var wm;if(_85d&&_85d.cp){_85f=_85d.cp;if(_85f.widgetsOnCurrentPage=="true"){wm=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel();}}var data;var pid;var sid;if(_85a.pid&&_85a.pid.value){pid=_85a.pid.value;}if(!pid&&_85a.sid&&_85a.sid.value){sid=_85a.sid.value;if(_85a.pageselection&&_85a.pageselection[sid]){pid=_85a.pageselection[sid].value;}}if(pid&&this._contains("pid",this.persistenceURL)){_85e=_85e+"pid"+"="+encodeURIComponent(pid)+"&";}if(!sid&&_85a.sid&&_85a.sid.value){sid=_85a.sid.value;}if(sid&&this._contains("sid",this.persistenceURL)){_85e=_85e+"sid"+"="+encodeURIComponent(sid)+"&";}for(var i in _85a){if(Object.prototype.hasOwnProperty.call(_85a,i)){if(i=="sparams"){if(_85a[i]){var _860=dojo.clone(_85a[i])||null;this._removeHiddenParameters(_860);this._removeEmptyObj(_860);if(_860&&this._contains("sparams",this.persistenceURL)){_85e=_85e+"sps"+"="+encodeURIComponent(dojo.toJson(_860))+"&";}}}if(i=="pageselection"&&_85a[i]){data=dojo.clone(_85a[i])||null;if(data&&this._contains("pageselection",this.persistenceURL)){_85e=_85e+"pageselection"+"="+encodeURIComponent(dojo.toJson(data))+"&";}}if(i=="wparams"&&_85a[i]&&!(_85f.noWidgets=="true")){var _861=this._sortData(dojo.clone(_85a[i]));if(_861.length>this.urlpersistenceLIMIT){_861=_861.slice(_861.length-this.urlpersistenceLIMIT);}var _862=0;var _863;var _864;var _865=_85f.allWidgets=="true"||this._contains("cp",this.persistenceURL);var _866=_85f.widgetsOnCurrentPage=="true";for(var j in _861){if(Object.prototype.hasOwnProperty.call(_861,j)){var _867=_861[j]||null;if(_866&&wm){if(_867&&_867.wid){var wid=dojo.isFunction(this.decodeWidgetIdentifier)?this.decodeWidgetIdentifier(_867.wid,nsm):_867.wid;if(wm.find(wid)===null){continue;}}}if(_867&&_867.value){_863=null;_864=null;if(_867.value.cp&&(_865||_866)){_863=this._getFragmentFromData(_867.value.cp)||null;}if(_867.value.rp){_864=this._getFragmentFromData(_867.value.rp,this.persistenceURL)||null;}if(_863||_864){_85e=_85e+"w"+_862+"="+_867.wid+"&";if(_863){_85e=_85e+"w"+_862+"cp="+encodeURIComponent(_863)+"&";}if(_864){_85e=_85e+"w"+_862+"rp="+encodeURIComponent(_864)+"&";}_862++;if(_862>=this.urlpersistenceLIMIT){break;}}}}}}if(i=="params"&&_85a[i]){var _868=_85a[i];for(var k in _868){if(Object.prototype.hasOwnProperty.call(_868,k)){_85e=_85e+k+"="+encodeURIComponent(_868[k])+"&";}}}}}if(this.isHuffmannEnabled){if(_85e.indexOf("&")!=-1){data=_85e.substr(_85e.indexOf("&")+1);if(data.length>0){data=com.ibm.mm.enabler.encode.huffman.HuffmanURL.createRawSchemeSpecificPartFromRegex(data,"[%&c=]");_85e=_85e.substring(0,_85e.indexOf("&")+1);_85e=_85e.concat(this.HUFFMANN_PREFIX);_85e=_85e.concat(data);}}}if(_85b){_85b(_85e,_85d);}if(!_85b){return _85e;}},_removeHiddenParameters:function(obj){for(var i in obj){if(Object.prototype.hasOwnProperty.call(obj,i)){if(i.indexOf("_")===0){obj[i]=null;delete obj[i];}else{if(!dojo.isString(obj[i])){this._removeHiddenParameters(obj[i]);}}}}},_removeEmptyObj:function(obj){if(com.ibm.mm.enabler.utils.Misc.isEmpty(obj)){return;}for(var _869 in obj){if(Object.prototype.hasOwnProperty.call(obj,_869)){if(!dojo.isObject(obj[_869])){continue;}var _86a=obj[_869];this._removeEmptyObj(_86a);if(com.ibm.mm.enabler.utils.Misc.isEmpty(_86a)){obj[_869]=null;delete obj[_869];}}}},_removeQueryState:function(wru){if(wru.indexOf("?")==-1){return wru;}var _86b=wru.substring(wru.indexOf("?")+1);if(_86b&&_86b.indexOf("#")!=-1){_86b=_86b.substring(0,_86b.indexOf("#"));}var _86c=wru.substr(0,wru.indexOf("?"));var st=null;var _86d="";if(_86b&&(_86b.indexOf("nst=")===0||_86b.indexOf("&nst=")>=0)){var temp=_86b.substr(_86b.indexOf("nst=")+3);var _86e="";if(temp.indexOf("&")>0){st=temp.substring(0,temp.indexOf("&"));_86e=temp.substring(temp.indexOf("&"));}else{st=temp;}if(_86b.indexOf("&nst=")!=-1){_86d=_86b.substring(0,_86b.indexOf("&nst="));}if(_86d.length===0&&_86e.length!==0){_86d=_86d.concat(_86e.substring(1));}else{_86d=_86d.concat(_86e);}}else{return wru;}var hash=wru.substr(wru.indexOf("#")+1);var _86f=_86c;if(_86d.length>0){_86f=_86f.concat("?").concat(_86d);}if(hash.length>0){_86f=_86f.concat("#").concat(hash);}return _86f;},generateUrl:function(_870,_871,_872,nsm){return this.generateURL(_870,_871,_872);},generateURL:function(_873,_874,_875,nsm){var _876;if(_875&&_875.cp){_876={cp:_875.cp};}var _877=_876?this.encode(_873,null,null,_876,nsm):this.encode(_873,null,null,null,nsm);var href=window.location.href;href=this._removeQueryState(href);var _878=href;if(href.indexOf("#")!=-1){_878=href.substr(0,href.indexOf("#"));}var url=_878.concat("#");url=url.concat(_877);if(_875&&_875.nohash&&_875.nohash=="true"){_877=encodeURIComponent(_877);if(_878.indexOf("?")==-1){url=_878.concat("?");url=url.concat("nst=");url=url.concat(_877);}else{if(_878.lastIndexOf("&")==(_878.length-1)){url=_878.concat("nst=");url=url.concat(_877);}else{url=_878.concat("&");url=url.concat("nst=");url=url.concat(_877);}}}if(_874){_874(url);}return url;},_getHash:function(wru){if(wru.indexOf("?")==-1){return null;}if(wru.indexOf("#")!=-1){var _879=wru.substr(wru.indexOf("#")+1);if(wru.indexOf("pid")!=-1||wru.indexOf("sid")!=-1){return null;}}var _87a=wru.substring(wru.indexOf("?")+1);if(_87a&&_87a.indexOf("#")!=-1){_87a=_87a.substring(0,_87a.indexOf("#"));}var st=null;if(_87a&&(_87a.indexOf("nst=")===0||_87a.indexOf("&nst=")>=0)){var temp=_87a.substr(_87a.indexOf("nst=")+4);var _87b="";if(temp.indexOf("&")>0){st=temp.substring(0,temp.indexOf("&"));}else{st=temp;}st=decodeURIComponent(st);}else{return null;}return st;},_sortData:function(_87c){var arr=[];for(var i in _87c){if(Object.prototype.hasOwnProperty.call(_87c,i)){_87c[i].wid=i;var _87d=_87c[i];if(_87d.params&&_87d.params.lm){arr.push(_87d);}}}var _87e=function(a,b){return (a.params.lm-b.params.lm);};arr.sort(_87e);return arr;},_getLength:function(obj){var _87f=0;for(var i in obj){if(Object.prototype.hasOwnProperty.call(obj,i)){_87f++;}}return _87f;},_isEmpty:function(obj){return com.ibm.mm.enabler.utils.Misc.isEmpty(obj);},_contains:function(_880,obj){if(!obj){return false;}if(obj[_880]){return true;}return false;},_filterData:function(data,_881,_882){if(!_881&&!_882){return data;}if(!_882){for(var i in data){if(Object.prototype.hasOwnProperty.call(data,i)){if(!this._contains(i,_881)){delete data[i];}}}return data;}for(var j in data){if(Object.prototype.hasOwnProperty.call(data,j)){if(!this._contains(j,_881)&&this._contains(j,_882)){delete data[j];}}}return data;},preprocess:function(_883,_884){if(this.bIsLoggable){this.LOGGER.entering("preprocess");if(_883){this.LOGGER.trace("preprocess","state is "+dojo.toJson(_883));}}var _885=com.ibm.mashups.enabler.model.state.CookieManager;var temp=_885.getState();if(!_883.pid&&temp.pid&&!_883.sid){_883.pid=temp.pid;}if(!_883.sid&&temp.sid){_883.sid=temp.sid;}if(!_883.pageselection&&temp.pageselection){_883.pageselection=temp.pageselection;}_883.lcparams=temp.lcparams||{};if(!_883.wparams){_883.wparams={};}var _886=_883.wparams;var _887=temp.wparams;for(var i in _887){if(Object.prototype.hasOwnProperty.call(_887,i)){var _888=i;var _889=_887[i];var _88a=_886[_888];if(_88a){_889=dojo.mixin(_889,dojo.clone(_88a));_886[_888]=_889;}else{_886[_888]=_889;}}}if(_884){_884(_883);}if(!_884){return _883;}},postprocess:function(_88b,_88c,_88d,_88e){var _88f=com.ibm.mashups.enabler.model.state.CookieManager;for(var i in _88b){if(Object.prototype.hasOwnProperty.call(_88b,i)){if(i=="pid"||i=="sid"||i=="pageselection"||i=="sparams"){if(this._contains(i,this.persistencePSTORE)){_88f.setState(i,_88b[i]);}}if(i=="lcparams"&&_88b[i]&&this.persistencePSTORE&&(this.persistencePSTORE.w||this.persistencePSTORE.h)){var _890={};var _891=_88b[i];for(var page in _891){if(Object.prototype.hasOwnProperty.call(_891,page)){var _892={};var _893=_891[page];_892.templateURL=_893.templateURL;_892.params=_893.params;_890[page]=_892;}}_88f.setState("lcparams",_890);}if(i=="wparams"&&_88b[i]){var _894={};var _895=_88b[i];for(var j in _895){if(Object.prototype.hasOwnProperty.call(_895,j)){var _896=_895[j]||null;var wID=j;var _897={};if(_896&&_896.value){if(_896.value.rp){var _898=this._filterData(dojo.clone(_896.value.rp),this.persistencePSTORE);if(!this._isEmpty(_898)){_897.value=_897.value?_897.value:{};_897.value.rp=_898;}}if(_896.value.cp&&this._contains("cp",this.persistencePSTORE)){var _899=this._filterData(dojo.clone(_896.value.cp),this.persistencePSTORE);if(!this._isEmpty(_899)){_897.value=_897.value?_897.value:{};_897.value.cp=_899;}}if(!this._isEmpty(_897)){if(_896.params){_897.params=_896.params;}_894[wID]=_897;}}}}_88f.setState("wparams",_894);}}}_88f.commit();if(_88c){_88c(_88b,_88e);}if(!_88c){return _88b;}}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateProcessor"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateProcessor"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateProcessor");}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.NavigationStateProcessorFactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.NavigationStateProcessorFactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.NavigationStateProcessorFactoryImpl");dojo.declare("com.ibm.mm.enabler.model.state.NavigationStateProcessorFactoryImpl",null,{constructor:function(){},getProcessor:function(){if(!this._nsp){this._nsp=new com.ibm.mm.enabler.model.state.NavigationStateProcessorImpl();}return this._nsp;}});com.ibm.mashups.enabler.model.state.NavigationStateProcessorFactory=new com.ibm.mm.enabler.model.state.NavigationStateProcessorFactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateNode_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateNode_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateNode_API");dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateNode");dojo.declare("com.ibm.mashups.enabler.model.state.NavigationStateNode",com.ibm.mashups.enabler.Identifiable,{get:function(){},set:function(_89a){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateNode"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateNode"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateNode");}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.NavigationStateNodeImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.NavigationStateNodeImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.NavigationStateNodeImpl");dojo.declare("com.ibm.mm.enabler.model.state.NavigationStateNodeImpl",[com.ibm.mashups.enabler.model.state.NavigationStateNode],{constructor:function(_89b,key,_89c,id,ref){this.model=_89b;this.key=key;this.value=_89c;if(id){this.id=id;}if(ref){this.ref=ref;}},setID:function(id){this.id=id;},setRef:function(ref){this.ref=ref;},getID:function(){return this.id;},getRef:function(){return this.ref;},getKey:function(){return this.key;},getValue:function(){return this.value;},get:function(){return dojo.clone(this._ref);},set:function(_89d){this.ref=_89d;this.model.setDirty(true);}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.NavigationStateModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.NavigationStateModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.NavigationStateModelImpl");dojo.declare("com.ibm.mm.enabler.model.state.NavigationStateModelImpl",[com.ibm.mashups.enabler.model.state.NavigationStateModel],{DELIMITER:"#",ROOT:"ROOT",DELETE_TOKEN:"DELETE_TOKEN",VALUE:"value",PARAMS:"params",constructor:function(_89e){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);this.processor=com.ibm.mashups.enabler.model.state.NavigationStateProcessorFactory.getProcessor();if(_89e){this._state=_89e;this._rootNode=new com.ibm.mm.enabler.model.state.NavigationStateNodeImpl(this,this.ROOT,this._state,this.ROOT,this._state);this._loaded=true;}else{dojo.back.setInitialState({back:this._loadCurrentPage,forward:this._loadCurrentPage});this._loaded=false;var _89f=this._getBaseUrl();this.processor.decode(_89f,dojo.hitch(this,"_preprocess"));}this._sync=true;},_getBaseUrl:function(){var _8a0=dojo.query("base");var _8a1=null;if(_8a0&&_8a0.length>0){var hash=dojo.hash();_8a1=_8a0[0].href+(hash!==""?"#"+hash:"");}else{_8a1=window.location.href;}return _8a1;},_getUniqueWid:function(wid){return dojo.isFunction(this.processor.encodeWidgetIdentifier)?this.processor.encodeWidgetIdentifier(wid,this):wid;},_refreshPage:function(){var cb=function(url){if(url){top.location.href=url;}};var _8a2=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();com.ibm.mashups.enabler.model.state.UrlGeneratorFactory.getURLGenerator().getUrl(_8a2,cb,{nohash:"true"});},_getFullUrl:function(cb,_8a3){return this.processor.generateURL(this._state,cb,_8a3,this);},clone:function(){var _8a4=dojo.clone(this._state);return new com.ibm.mm.enabler.model.state.NavigationStateModelImpl(_8a4);},_preprocess:function(_8a5){if(this.bIsLoggable){this.LOGGER.entering("_preprocess");if(_8a5){this.LOGGER.trace("_preprocess","state:"+dojo.toJson(_8a5));}}this.processor.preprocess(_8a5,dojo.hitch(this,"_initializeState"));},_initialize:function(){var _8a6=this._getBaseUrl();this.processor.decode(_8a6,dojo.hitch(this,"_preprocess"));},_initializeState:function(_8a7){if(this.bIsLoggable){this.LOGGER.entering("_initializeState");if(_8a7){this.LOGGER.trace("_initializeState","state:"+dojo.toJson(_8a7));}}this._state=_8a7;this._stateInternal=dojo.clone(_8a7);this._rootNode=new com.ibm.mm.enabler.model.state.NavigationStateNodeImpl(this,this.ROOT,this._state,this.ROOT,this._state);this._isDirty=false;this._isTransactionDirty=false;this._isTransaction=false;this._loaded=true;},_postprocess:function(_8a8,_8a9){if(this._isDirty&&(!this._pagemode||(this._pagemode&&this._pagemode!="unload"&&this._pagemode!="edit"))){this.processor.encode(_8a8,dojo.hitch(this,"_finishCommit"),this._stateInternal,_8a9,this);}else{if(this._deferred){this._deferred.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);delete this._deferred;}}},_loadCurrentPage:function(){var nsm=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();nsm._initialize();var _8aa=com.ibm.mashups.services.ServiceManager.getService("eventService");_8aa.publishEvent(nsm.ONNAVSTATEUPDATED);},_finishCommit:function(_8ab,_8ac,_8ad){try{var _8ae=window.location.hash.substring(1);if(_8ac&&_8ac.addToHistory){if(_8ab&&_8ae!=_8ab){dojo.back.addToHistory({back:this._loadCurrentPage,forward:this._loadCurrentPage,changeUrl:_8ab});}}}catch(e){this.LOGGER.warning("_finishCommit","failed to update window.location.href error:"+e.message+" length of fragment:"+_8ab.length);}if(this._isDirty){var _8af=com.ibm.mashups.services.ServiceManager.getService("eventService");_8af.publishEvent(this.ONNAVSTATEUPDATED);}this._isDirty=false;this._removeDirty(this._state);this._stateInternal=dojo.clone(this._state);if(_8ac&&_8ac.allowRedirect&&_8ad&&_8ad.doRedirect&&!this._sync){this._refreshPage();}else{if(this._deferred){this._deferred.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);delete this._deferred;}}},_removeDirty:function(obj){for(var i in obj){if(Object.prototype.hasOwnProperty.call(obj,i)){if(i.params&&i.params._isDirty){i.params._isDirty=false;if(i.value&&i.value==this.DELETE_TOKEN){obj[i]=null;delete obj[i];}}if(obj[i]&&!dojo.isString(obj[i])){this._removeDirty(obj[i]);}}}},setDirty:function(_8b0){this._isDirty=_8b0;},isDirty:function(){return this._isDirty;},_find:function(id){id=id||null;if(!id){return null;}if(id==this.ROOT){return this._rootNode;}else{var _8b1=this._findReference(id)||null;if(_8b1){var _8b2=new com.ibm.mm.enabler.model.state.NavigationStateNodeImpl(this);_8b2.setID(id);_8b2.setRef(_8b1);return _8b2;}}return null;},create:function(_8b3){var key=_8b3.key?_8b3.key:null;var _8b4=_8b3.value?_8b3.value:null;var _8b5=new com.ibm.mm.enabler.model.state.NavigationStateNodeImpl(this,key,_8b4);return _8b5;},insert:function(_8b6,_8b7){var _8b8=_8b7.getRef();var key=_8b6.getKey();var _8b9=_8b6.getValue()||null;if(!_8b9){_8b9={};}var _8ba=_8b7.getID();_8b8[key]=_8b9;return;},_getIndex:function(_8bb){var _8bc=0;for(var i in _8bb){if(Object.prototype.hasOwnProperty.call(_8bb,i)){_8bc++;}}return _8bc;},remove:function(_8bd){var id=_8bd.getID();var arr=id.split("#");if(arr.length==1){if(this._state[id]){delete this._state[id];}}if(arr.length>1){var key=id.substring(id.lastIndexOf("#")+1);var _8be=id.substring(0,id.lastIndexOf("#"));var _8bf=this._find(_8be);if(_8bf){var ref=_8bf.getRef();if(ref[key]){delete ref[key];}}}return;},_getRoot:function(){return this._rootNode;},_findReference:function(id){if(id==this.ROOT){return this._state;}var _8c0=false;var arr=id.split("#");var node=this._state;if(!node){return null;}for(var i in arr){if(Object.prototype.hasOwnProperty.call(arr,i)){var j=arr[i];_8c0=false;if(this._findMatch(node,j)){node=node[j];_8c0=true;}else{break;}}}if(!_8c0){return null;}return node;},_findMatch:function(node,key){if(node[key]){return true;}return false;},commit:function(_8c1){return new com.ibm.mm.enabler.DeferredImpl(this,this._commit,_8c1);},_commit:function(_8c2,sync,_8c3){this._deferred=_8c2;this._sync=sync;if(_8c3&&_8c3.allowRedirect&&this._sync){this.LOGGER.warning("_commit","additionalParams.allowRedirect set to true will be ignored since sync is true. The page will not be refreshed");}this._processShareableParameters();if(this._isDirty&&(!this._pagemode||(this._pagemode&&this._pagemode!="edit"))){this._isTransactionDirty=true;this.processor.postprocess(this._state,dojo.hitch(this,this._postprocess),this._stateInternal,_8c3);}else{_8c2.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}},_processShareableParameters:function(){var _8c4=this._state.sparams;if(!_8c4){return;}var _8c5=null;for(var i in _8c4){if(Object.prototype.hasOwnProperty.call(_8c4,i)){var _8c6={};_8c6.itemSetName=i;var _8c7=[];for(var _8c8 in _8c4[i]){if(Object.prototype.hasOwnProperty.call(_8c4[i],_8c8)){var _8c9=_8c4[i][_8c8].value;for(var j in _8c9){if(Object.prototype.hasOwnProperty.call(_8c9,j)){var _8ca=_8c9[j].params;if(_8ca&&_8ca._isDirty){_8c7.push(_8ca._change);if(_8c9[j].value==this.DELETE_TOKEN){_8c9[j]=null;delete _8c9[j];}else{_8c9[j].params=null;delete _8c9[j].params;}}}}if(_8c7.length>0){_8c6.changes=_8c7;if(_8c4[i][_8c8].params&&_8c4[i][_8c8].params._listeners){var _8cb=_8c4[i][_8c8].params._listeners;for(var t in _8cb){if(Object.prototype.hasOwnProperty.call(_8cb,t)){_8cb[t](_8c6);}}}}}}}}},discard:function(){this._state=dojo.clone(this._stateInternal);this._rootNode=new com.ibm.mm.enabler.model.state.NavigationStateNodeImpl(this,this.ROOT,this._state,this.ROOT,this._state);this._isDirty=false;},_getPageMode:function(){if(!this._pagemode){return null;}return this._pagemode;},_setPageMode:function(_8cc){if(_8cc){this._pagemode=_8cc;}},dispose:function(){this._state={};this._stateInternal={};this._rootNode=new com.ibm.mm.enabler.model.state.NavigationStateNodeImpl(this,this.ROOT,this._state,this.ROOT,this._state);this._isDirty=false;this._loaded=true;this.processor.dispose();},startTransaction:function(){if(this.isTransaction()){return;}this.discard();this._isTransaction=true;this._isTransactionDirty=false;this._transactionRollbackState=dojo.clone(this._state);var _8cd=null;if(this._state){_8cd=this._state.wparams;}if(_8cd){var _8ce=com.ibm.mashups.enabler.services.IdentificationService;var id;for(id in _8cd){if(!_8ce.isServerID(id)){delete _8cd[id];}}}},commitTransaction:function(){if(this.isTransaction()){this._isTransaction=false;if(this._isTransactionDirty){this.discard();this._stateInternal=this._transactionRollbackState;this._transactionRollbackState=null;this._isDirty=true;this.processor.postprocess(this._state,dojo.hitch(this,this._postprocess),this._stateInternal);this._isTransactionDirty=false;}}return;},discardTransaction:function(){if(this.isTransaction()){if(this._isTransactionDirty){this.discard();if(!(typeof this._transactionRollbackState=="undefined")){var trs=this._transactionRollbackState;var s=this._state;if(s){if(s.pid){trs.pid=dojo.clone(s.pid);}if(s.sid){trs.sid=dojo.clone(s.sid);}if(s.pageselection){trs.pageselection=dojo.clone(s.pageselection);}}this._state=this._transactionRollbackState;this._rootNode=new com.ibm.mm.enabler.model.state.NavigationStateNodeImpl(this,this.ROOT,this._state,this.ROOT,this._state);this._transactionRollbackState=null;this._isDirty=true;this.processor.postprocess(this._state,dojo.hitch(this,this._postprocess),this._stateInternal);}this._isTransactionDirty=false;}this._isTransaction=false;}return;},isTransaction:function(){if(typeof this._isTransaction=="undefined"){this._isTransaction=false;}return this._isTransaction;},_generateListenerId:function(){if(!this._listenerCounter){this._listenerCounter=1;}else{this._listenerCounter++;}return this._listenerCounter;}});dojo.back.init();}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateModel"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateModel"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateModel");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateModelFactory_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateModelFactory_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateModelFactory_API");dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateModelFactory");dojo.declare("com.ibm.mashups.enabler.model.state.NavigationStateModelFactory",null,{getNavigationStateModel:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.NavigationStateModelFactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.NavigationStateModelFactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.NavigationStateModelFactoryImpl");dojo.declare("com.ibm.mm.enabler.model.state.NavigationStateModelFactoryImpl",[com.ibm.mashups.enabler.model.state.NavigationStateModelFactory],{constructor:function(){},getNavigationStateModel:function(_8cf){if(!this.navigationstatemodel){this.navigationstatemodel=new com.ibm.mm.enabler.model.state.NavigationStateModelImpl(_8cf);}return this.navigationstatemodel;}});com.ibm.mashups.enabler.model.state.NavigationStateModelFactory=new com.ibm.mm.enabler.model.state.NavigationStateModelFactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateModelFactory"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateModelFactory"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateModelFactory");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.UrlGenerator_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.UrlGenerator_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.UrlGenerator_API");dojo.provide("com.ibm.mashups.enabler.model.state.UrlGenerator");dojo.declare("com.ibm.mashups.enabler.model.state.UrlGenerator",null,{getUrl:function(_8d0,_8d1,_8d2){},getURL:function(_8d3,_8d4,_8d5){}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.UrlGeneratorImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.UrlGeneratorImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.UrlGeneratorImpl");dojo.declare("com.ibm.mm.enabler.model.state.UrlGeneratorImpl",com.ibm.mashups.enabler.model.state.UrlGenerator,{constructor:function(){},getUrl:function(_8d6,_8d7,_8d8){return this.getURL(_8d6,_8d7,_8d8);},getURL:function(_8d9,_8da,_8db){if(!_8d9){return null;}var _8dc=_8d9.clone();return _8dc._getFullUrl(_8da,_8db);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.UrlGenerator"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.UrlGenerator"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.UrlGenerator");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.UrlGeneratorFactory_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.UrlGeneratorFactory_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.UrlGeneratorFactory_API");dojo.provide("com.ibm.mashups.enabler.model.state.UrlGeneratorFactory");dojo.declare("com.ibm.mashups.enabler.model.state.UrlGeneratorFactory",null,{getUrlGenerator:function(){},getURLGenerator:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.UrlGeneratorFactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.UrlGeneratorFactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.UrlGeneratorFactoryImpl");dojo.declare("com.ibm.mm.enabler.model.state.UrlGeneratorFactoryImpl",com.ibm.mashups.enabler.model.state.UrlGeneratorFactory,{constructor:function(){this._urlGenerator=new com.ibm.mm.enabler.model.state.UrlGeneratorImpl();},getUrlGenerator:function(){return this.getURLGenerator();},getURLGenerator:function(){return this._urlGenerator;}});com.ibm.mashups.enabler.model.state.UrlGeneratorFactory=new com.ibm.mm.enabler.model.state.UrlGeneratorFactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.UrlGeneratorFactory"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.UrlGeneratorFactory"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.UrlGeneratorFactory");}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.HiddenMetaDataLoadingStrategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.HiddenMetaDataLoadingStrategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.HiddenMetaDataLoadingStrategy");dojo.declare("com.ibm.mashups.enabler.strategy.HiddenMetaDataLoadingStrategy",com.ibm.mashups.enabler.strategy.Strategy,{constructor:function(_8dd){this.names=_8dd;},getHiddenMetaDataToLoad:function(){return this.names;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.ListLoadAheadStrategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.ListLoadAheadStrategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.ListLoadAheadStrategy");dojo.declare("com.ibm.mashups.enabler.strategy.ListLoadAheadStrategy",com.ibm.mashups.enabler.strategy.Strategy,{constructor:function(_8de){this.interval=_8de;},getInterval:function(){return this.interval;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.NavigationDeletionStrategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.NavigationDeletionStrategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.NavigationDeletionStrategy");dojo.declare("com.ibm.mashups.enabler.strategy.NavigationDeletionStrategy",com.ibm.mashups.enabler.strategy.Strategy,{isDeleteContentByID:function(node,_8df){return node.getID()!=_8df;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.NavigationUpdateStrategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.NavigationUpdateStrategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.NavigationUpdateStrategy");dojo.declare("com.ibm.mashups.enabler.strategy.NavigationUpdateStrategy",com.ibm.mashups.enabler.strategy.Strategy,{constructor:function(_8e0){this._URLUpdateParameterValue=_8e0;},getURLUpdateParameterValue:function(){return this._URLUpdateParameterValue;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.SyncMetaDataStrategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.SyncMetaDataStrategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.SyncMetaDataStrategy");dojo.declare("com.ibm.mashups.enabler.strategy.SyncMetaDataStrategy",com.ibm.mashups.enabler.strategy.Strategy,{});}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.TreeLoadAheadStrategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.TreeLoadAheadStrategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.TreeLoadAheadStrategy");dojo.declare("com.ibm.mashups.enabler.strategy.TreeLoadAheadStrategy",com.ibm.mashups.enabler.strategy.Strategy,{constructor:function(_8e1,_8e2){this.parentLevel=_8e1;this.childrenLevel=_8e2;},getChildrenLevel:function(){return this.childrenLevel;},getParentLevel:function(){return this.parentLevel;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.utils.EventTransformer_API"]){dojo._hasResource["com.ibm.mashups.enabler.utils.EventTransformer_API"]=true;dojo.provide("com.ibm.mashups.enabler.utils.EventTransformer_API");dojo.provide("com.ibm.mashups.enabler.utils.EventTransformer");dojo.declare("com.ibm.mashups.enabler.utils.EventTransformer",null,{isTransformable:function(_8e3,_8e4,_8e5){}});}if(!dojo._hasResource["com.ibm.mm.data.datatypes"]){dojo._hasResource["com.ibm.mm.data.datatypes"]=true;dojo.provide("com.ibm.mm.data.datatypes");dojo.declare("com.ibm.mm.data.datatypes",null,{_alltypes:{"text":1,"url":1,"html":1,"image":1,"number":1,"countrycode":1,"languagecode":1,"currency":1,"boolean":1,"date":1,"time":1,"timestamp":1,"email":1,"postalcode":1,"phone":1,"address":1,"person":1,"table":1,"atom":1,"xml":1,"json":1,"modeldata":1,"xsd:string":1,"xsd:boolean":1,"xsd:decimal":1,"xsd:float":1,"xsd:double":1,"xsd:duration":1,"xsd:datetime":1,"xsd:time":1,"xsd:date":1,"xsd:gyearmonth":1,"xsd:gyear":1,"xsd:gmonthday":1,"xsd:gday":1,"xsd:gmonth":1,"xsd:hexbinary":1,"xsd:base64binary":1,"xsd:anyuri":1,"xsd:qname":1,"xsd:notation":1,"js:string":1,"js:number":1,"js:date":1,"js:boolean":1},_simpleTypes:{"text":1,"url":1,"html":1,"image":1,"number":1,"countrycode":1,"languagecode":1,"currency":1,"boolean":1,"date":1,"time":1,"timestamp":1,"email":1,"postalcode":1,"phone":1,"address":1,"person":1,"xsd:string":1,"xsd:boolean":1,"xsd:decimal":1,"xsd:float":1,"xsd:double":1,"xsd:duration":1,"xsd:datetime":1,"xsd:time":1,"xsd:date":1,"xsd:gyearmonth":1,"xsd:gyear":1,"xsd:gmonthday":1,"xsd:gday":1,"xsd:gmonth":1,"xsd:hexbinary":1,"xsd:base64binary":1,"xsd:anyuri":1,"xsd:qname":1,"xsd:notation":1,"js:string":1,"js:number":1,"js:date":1,"js:boolean":1},_complexTypes:{"table":1,"atom":1,"xml":1,"json":1,"modeldata":1},specialTypes:{"mashupdata":1},_mappings:{text:{"url":1,"html":1,"number":1,"countrycode":1,"languagecode":1,"currency":1,"boolean":1,"date":1,"time":1,"timestamp":1,"email":1,"postalcode":1,"phone":1,"address":1,"person":1,"xsd:string":1,"xsd:boolean":1,"xsd:decimal":1,"xsd:float":1,"xsd:double":1,"xsd:duration":1,"xsd:datetime":1,"xsd:time":1,"xsd:date":1,"xsd:gyearmonth":1,"xsd:gyear":1,"xsd:gmonthday":1,"xsd:gday":1,"xsd:gmonth":1,"xsd:hexbinary":1,"xsd:base64binary":1,"xsd:anyuri":1,"xsd:qname":1,"xsd:notation":1,"js:string":1,"js:number":1,"js:date":1,"js:boolean":1},"url":{"xsd:anyuri":1,"text":1,"xsd:string":1,"js:string":1},"html":{"text":1,"xsd:string":1,"js:string":1},"image":{},"number":{"xsd:decimal":1,"xsd:float":1,"xsd:double":1,"js:number":1,"text":1,"xsd:string":1,"js:string":1},"countrycode":{"text":1,"xsd:string":1,"js:string":1},"languagecode":{"text":1,"xsd:string":1,"js:string":1},"currency":{"text":1,"xsd:string":1,"js:string":1},"boolean":{"xsd:boolean":1,"js:boolean":1,"text":1,"xsd:string":1,"js:string":1},"date":{"timestamp":1,"xsd:date":1,"js:date":1,"text":1,"xsd:string":1,"js:string":1},"time":{"timestamp":1,"xsd:time":1,"text":1,"xsd:string":1,"js:string":1},"timestamp":{"date":1,"time":1,"xsd:datetime":1,"text":1,"xsd:string":1,"js:string":1},"email":{"text":1,"xsd:string":1,"js:string":1},"postalcode":{"text":1,"xsd:string":1,"js:string":1},"phone":{"text":1,"xsd:string":1,"js:string":1},"address":{"text":1,"xsd:string":1,"js:string":1},"person":{"text":1,"xsd:string":1,"js:string":1},"json":{},"xsd:string":{"text":1,"url":1,"html":1,"number":1,"countrycode":1,"languagecode":1,"currency":1,"boolean":1,"date":1,"time":1,"timestamp":1,"email":1,"postalcode":1,"phone":1,"address":1,"person":1,"xsd:boolean":1,"xsd:decimal":1,"xsd:float":1,"xsd:double":1,"xsd:duration":1,"xsd:datetime":1,"xsd:time":1,"xsd:date":1,"xsd:gyearmonth":1,"xsd:gyear":1,"xsd:gmonthday":1,"xsd:gday":1,"xsd:gmonth":1,"xsd:hexbinary":1,"xsd:base64binary":1,"xsd:anyuri":1,"xsd:qname":1,"xsd:notation":1,"js:string":1,"js:number":1,"js:date":1,"js:boolean":1},"xsd:boolean":{"boolean":1,"js:boolean":1,"text":1,"xsd:string":1,"js:string":1},"xsd:decimal":{"number":1,"js:number":1,"text":1,"xsd:string":1,"js:string":1},"xsd:float":{"number":1,"js:number":1,"text":1,"xsd:string":1,"js:string":1},"xsd:double":{"number":1,"js:number":1,"text":1,"xsd:string":1,"js:string":1},"xsd:duration":{"text":1,"xsd:string":1,"js:string":1},"xsd:gmonthday":{"text":1,"xsd:string":1,"js:string":1},"xsd:gday":{"text":1,"xsd:string":1,"js:string":1},"xsd:gmonth":{"text":1,"xsd:string":1,"js:string":1},"xsd:hexbinary":{"text":1,"xsd:string":1,"js:string":1},"xsd:base64binary":{"text":1,"xsd:string":1,"js:string":1},"xsd:qname":{"text":1,"xsd:string":1,"js:string":1},"xsd:notation":{"text":1,"xsd:string":1,"js:string":1},"xsd:anyuri":{"url":1,"text":1,"xsd:string":1,"js:string":1},"xsd:time":{"time":1,"text":1,"xsd:string":1,"js:string":1},"xsd:date":{"date":1,"js:date":1,"text":1,"xsd:string":1,"js:string":1},"xsd:datetime":{"timestamp":1,"text":1,"xsd:string":1,"js:string":1},"xsd:gyear":{"date":1,"text":1,"xsd:string":1,"js:string":1},"xsd:gyearmonth":{"date":1,"text":1,"xsd:string":1,"js:string":1},"js:string":{"text":1,"url":1,"html":1,"number":1,"countrycode":1,"languagecode":1,"currency":1,"boolean":1,"date":1,"time":1,"timestamp":1,"email":1,"postalcode":1,"phone":1,"address":1,"person":1,"xsd:string":1,"xsd:boolean":1,"xsd:decimal":1,"xsd:float":1,"xsd:double":1,"xsd:duration":1,"xsd:datetime":1,"xsd:time":1,"xsd:date":1,"xsd:gyearmonth":1,"xsd:gyear":1,"xsd:gmonthday":1,"xsd:gday":1,"xsd:gmonth":1,"xsd:hexbinary":1,"xsd:base64binary":1,"xsd:anyuri":1,"xsd:qname":1,"xsd:notation":1,"js:number":1,"js:date":1,"js:boolean":1},"js:date":{"date":1,"xsd:date":1,"text":1,"xsd:string":1,"js:string":1},"js:number":{"xsd:decimal":1,"xsd:float":1,"xsd:double":1,"number":1,"text":1,"xsd:string":1,"js:string":1},"js:boolean":{"xsd:boolean":1,"boolean":1,"text":1,"xsd:string":1,"js:string":1}},_semanticMappings:{text:{"xsd:string":1,"js:string":1},"url":{"xsd:anyuri":1},"html":{},"image":{},"number":{"xsd:decimal":1,"xsd:float":1,"xsd:double":1,"js:number":1},"countrycode":{},"languagecode":{},"currency":{},"boolean":{"xsd:boolean":1,"js:boolean":1},"date":{"xsd:date":1,"js:date":1},"time":{"xsd:time":1},"timestamp":{"xsd:datetime":1},"email":{},"postalcode":{},"phone":{},"address":{},"person":{},"json":{},"xsd:string":{"text":1,"js:string":1},"xsd:boolean":{"boolean":1,"js:boolean":1},"xsd:decimal":{"number":1,"js:number":1},"xsd:float":{"number":1,"js:number":1},"xsd:double":{"number":1,"js:number":1},"xsd:duration":{},"xsd:gmonthday":{},"xsd:gday":{},"xsd:gmonth":{},"xsd:hexbinary":{},"xsd:base64binary":{},"xsd:qname":{},"xsd:notation":{},"xsd:anyuri":{"url":1},"xsd:time":{"time":1},"xsd:date":{"date":1,"js:date":1},"xsd:datetime":{"timestamp":1},"xsd:gyear":{"date":1},"xsd:gyearmonth":{"date":1},"js:string":{"text":1,"xsd:string":1},"js:date":{"date":1,"xsd:date":1},"js:number":{"xsd:decimal":1,"xsd:float":1,"xsd:double":1,"number":1},"js:boolean":{"xsd:boolean":1,"boolean":1}},_SIMPLE_DATA_TYPE:1,_COMBINED_DATA_TYPE:2,_COMPLEX_DATA_TYPE:3,resourceBundle:null,constructor:function(_8e6){this.resourceBundle=dojo.i18n.getLocalization("com.ibm.mm.data","dataTypeStrings");this.xsdNS=com.ibm.mm.enabler.model.NameSpaceFactory.getNameSpaceUri(com.ibm.mm.enabler.model.NameSpaceFactory.NS_XSD);this.nsNS=com.ibm.mm.enabler.model.NameSpaceFactory.getNameSpaceUri(com.ibm.mm.enabler.model.NameSpaceFactory.NS_EVENT_DATATYPES);this.jsNS=com.ibm.mm.enabler.model.NameSpaceFactory.getNameSpaceUri(com.ibm.mm.enabler.model.NameSpaceFactory.NS_JS);this.xsdPrefix="xsd:";this.nsPrefix="";this.jsPrefix="js:";},addDataType:function(_8e7,_8e8){if(!_8e7){return;}this._alltypes.typename=1;if(!_8e8||_8e8==this._SIMPLE_DATA_TYPE){this._simpleTypes.typename=1;}else{this._complexTypes.typename=1;}},removeDataType:function(_8e9){delete this._alltypes[_8e9];},addDataMapping:function(_8ea,_8eb){if(this._mappings.typename1===null){this._mappings.typename1={};}this._mappings[_8ea][_8eb]=1;},removeDataMapping:function(_8ec,_8ed){if(this._mappings[_8ec]!==null){if(this._mappings[_8ec][_8ed]!==null){delete this._mappings[_8ec][_8ed];}}},getAllTypes:function(){return dojo.clone(this._alltypes);},doesTypeMatch:function(_8ee,_8ef){var _8f0=false;if(!_8ee||!_8ef){return _8f0;}_8ee=_8ee.toLowerCase();_8ef=_8ef.toLowerCase();if(_8ee==_8ef||_8ee=="any"||_8ef=="any"){_8f0=true;}else{var _8f1=this.checkDataType(_8ee);switch(_8f1){case this._SIMPLE_DATA_TYPE:var _8f2=this.checkDataType(_8ef);switch(_8f2){case this._SIMPLE_DATA_TYPE:if(this._mappings[_8ee][_8ef]==1){_8f0=true;}break;case this._COMBINED_DATA_TYPE:var _8f3=this.getMainType(_8ef);if(_8ee==_8f3||this._mappings[_8ee][_8f3]==1){_8f0=true;}break;default:break;}break;case this._COMBINED_DATA_TYPE:break;case this._COMPLEX_DATA_TYPE:break;default:break;}}return _8f0;},doesTypeFlexMatch:function(_8f4,_8f5,_8f6){var _8f7=false;if(_8f4===null||_8f5===null){return _8f7;}if((_8f6===null)||(typeof _8f6=="undefined")){_8f6=true;}_8f4=this.getNormalizedPayload(_8f4);_8f5=this.getNormalizedPayload(_8f5);_8f4=_8f4.toLowerCase();_8f5=_8f5.toLowerCase();if(_8f4==_8f5||_8f4=="any"||_8f5=="any"){_8f7=true;}else{var _8f8=this.checkDataType(_8f4);var _8f9,_8fa;switch(_8f8){case this._SIMPLE_DATA_TYPE:_8f9=this.checkDataType(_8f5);switch(_8f9){case this._SIMPLE_DATA_TYPE:if(_8f6){if(this._mappings[_8f4][_8f5]==1){_8f7=true;}}else{if(this._semanticMappings[_8f4][_8f5]==1){_8f7=true;}}break;case this._COMBINED_DATA_TYPE:_8fa=this.getMainType(_8f5);if(_8f6){if(_8f4==_8fa||this._mappings[_8f4][_8fa]==1){_8f7=true;}}else{if(_8f4==_8fa||this._semanticMappings[_8f4][_8fa]==1){_8f7=true;}}break;default:break;}break;case this._COMBINED_DATA_TYPE:_8f9=this.checkDataType(_8f5);var _8fb=this.getMainType(_8f4);switch(_8f9){case this._SIMPLE_DATA_TYPE:if(_8f6){if(_8fb==_8f5||this._mappings[_8fb][_8f5]==1){_8f7=true;}}else{if(_8fb==_8f5||this._semanticMappings[_8fb][_8f5]==1){_8f7=true;}}break;case this._COMBINED_DATA_TYPE:_8fa=this.getMainType(_8f5);if(_8fb==_8fa||this._mappings[_8fb][_8fa]==1){_8f7=true;}break;default:break;}break;default:break;}}return _8f7;},getMainType:function(_8fc){var _8fd=_8fc.indexOf(".");if(_8fd<0){return _8fc;}else{return _8fc.substring(0,_8fd);}},checkDataType:function(_8fe){_8fe=_8fe.toLowerCase();var _8ff=_8fe.split(".");if(_8ff.length==1){if(this._simpleTypes[_8fe]==1){return this._SIMPLE_DATA_TYPE;}else{return this._COMPLEX_DATA_TYPE;}}else{if(_8ff.length==2||_8ff.length==3){var _900=_8ff[0];var _901=_8ff[_8ff.length-1];if(_900=="url"||_901=="languagecode"||_901=="countrycode"){return this._COMBINED_DATA_TYPE;}else{return this._COMPLEX_DATA_TYPE;}}else{return this._COMPLEX_DATA_TYPE;}}},getTypeLabel:function(_902,_903){_902=_902.toLowerCase();var _904=_902;var _905=this.checkDataType(_902);if(_905==this._COMBINED_DATA_TYPE){var _906=_902.indexOf(".");var main=_902.substring(0,_906);var _907=this.getSimpleTypeLabel(main,_903);var sub=_902.substring(_906+1,_902.length);var _908=this.getSimpleTypeLabel(sub,_903);_904=_907+" ("+_908+")";}else{_904=this.getSimpleTypeLabel(_902,_903);}return _904;},getNormalizedPayload:function(_909){var _90a=_909;var _90b=_909;var _90c=_909.indexOf("{");var _90d=_909.indexOf("}");var _90e="";if(_90d>_90c){_90a=_909.substring(_90c+1,_90d);_90b=_909.substring(_90d+1,_909.length);if(_90a===this.xsdNS){_90e=this.xsdPrefix;}else{if(_90a===this.jsNS){_90e=this.jsPrefix;}else{if(_90a===this.nsNS){_90e=this.nsPrefix;}}}_90b=_90e+_90b;}return _90b;},getSimpleTypeLabel:function(_90f,_910){var _911;if(this.resourceBundle[_90f]){_911=this.resourceBundle[_90f];}else{_911=_90f.charAt(0).toUpperCase()+_90f.substring(1);}return _911;}});}if(!dojo._hasResource["com.ibm.mm.enabler.utils.EventTransformerImpl"]){dojo._hasResource["com.ibm.mm.enabler.utils.EventTransformerImpl"]=true;dojo.provide("com.ibm.mm.enabler.utils.EventTransformerImpl");dojo.declare("com.ibm.mm.enabler.utils.EventTransformerImpl",[com.ibm.mashups.enabler.utils.EventTransformer],{constructor:function(){this.dataTypes=new com.ibm.mm.data.datatypes();},_transform:function(_912,_913,_914){var _915=null;if(_912.type==_913.type||_912.type=="any"||_913.type=="any"){_915=new com.ibm.mm.iwidget.IEventImpl(_912.name,_912.type,_912.payload,_912.source);}else{var _916=this.isTransformable(_912,_913,_914);if(_916){var _917=null;switch(_913.type.toLowerCase()){case "time":if(_912.type.toLowerCase()=="xsd:time"){_917=this._xsdTimeToMmTime(_912.payload);}break;case "date":switch(_912.type.toLowerCase()){case "xsd:date":_917=this._xsdDateToMmDate(_912.payload);break;case "js:date":_917=this._jsDateToMmDate(_912.payload);break;}break;case "timestamp":if(_912.type.toLowerCase()=="xsd:datetime"){_917=this._xsdDateTimeToMmTimestamp(_912.payload);}break;case "xsd:time":if(_912.type.toLowerCase()=="time"){_917=this._mmTimeToXsdTime(_912.payload);}break;case "xsd:date":switch(_912.type.toLowerCase()){case "date":_917=this._mmDateToXsdDate(_912.payload);break;case "js:date":_917=this._jsDateToXsdDate(_912.payload);break;}break;case "xsd:datetime":if(_912.type.toLowerCase()=="timestamp"){_917=this._mmTimestampToXsdDatetime(_912.payload);}break;case "js:date":switch(_912.type.toLowerCase()){case "xsd:date":_917=this._xsdDateToJsDate(_912.payload);break;case "date":_917=this._mmDateToJsDate(_912.payload);break;}break;}if(_917!==null){_915=new com.ibm.mm.iwidget.IEventImpl(_912.name,_913.type,_917,_912.source);}else{_915=new com.ibm.mm.iwidget.IEventImpl(_912.name,_913.type,_912.payload,_912.source);}}}return _915;},isTransformable:function(_918,_919,_91a){return this.dataTypes.doesTypeFlexMatch(_918.type,_919.type,_91a);},_mmTimestampToXsdDatetime:function(_91b){var _91c="T";var _91d="-";var _91e=":";var _91f=/^([\d]{4})-([\d]{2})-([\d]{2})\s([\d]{2}):([\d]{2}):([\d]{2})$/;var _920=/^([\d]{4})-([\d]{2})-([\d]{2})\s([\d]{2}):([\d]{2}):([\d]{2})\.([\d]{4})$/;var _921=/^([\d]{4})([\d]{2})([\d]{2})\s([\d]{2})([\d]{2})([\d]{2})$/;var _922=false;_922=_920.test(_91b);if(_922){var _923=_91b.split(new RegExp("[.]{1}"))[0];return _923.replace(/\s/,_91c);}else{_922=_91f.test(_91b);if(_922){return _91b.replace(/\s/,_91c);}else{_922=_921.test(_91b);if(_922){var _924=_921.exec(_91b);var yyyy=_924[1];var _925=_924[2];var dd=_924[3];var hh=_924[4];var _926=_924[5];var ss=_924[6];return yyyy+_91d+_925+_91d+dd+_91c+hh+_91e+_926+_91e+ss;}else{return null;}}}},_mmDateToXsdDate:function(date){var _927="-";var _928="01";var _929="01";var _92a=/^([\d]{4})-([\d]{2})-([\d]{2})$/;var _92b=/^([\d]{4})([\d]{2})([\d]{2})$/;var _92c=/^([\d]{4})([\d]{2})$/;var _92d=/^([\d]{4})$/;var _92e=false;_92e=_92a.test(date);if(_92e){return date;}else{_92e=_92b.test(date);var yyyy,mm,_92f;if(_92e){_92f=_92b.exec(date);yyyy=_92f[1];mm=_92f[2];var dd=_92f[3];return yyyy+_927+mm+_927+dd;}else{_92e=_92c.test(date);if(_92e){_92f=_92c.exec(date);yyyy=_92f[1];mm=_92f[2];return yyyy+_927+mm+_927+_929;}else{_92e=_92d.test(date);if(_92e){_92f=_92d.exec(date);yyyy=_92f[1];return yyyy+_927+_928+_927+_929;}else{return null;}}}}},_mmTimeToXsdTime:function(time){var _930=":";var _931="00";var _932="00";var _933=/^\d{2}\:\d{2}\:\d{2}\.\d{4}$/;var _934=/^\d{2}\:\d{2}\:\d{2}$/;var _935=/^\d{2}\:\d{2}$/;var _936=/^\d{2}$/;var _937=false;_937=_933.test(time);if(_937){return time.split(new RegExp("[.]{1}"))[0];}else{_937=_934.test(time);if(_937){return time;}else{_937=_935.test(time);if(_937){return time+_930+_932;}else{_937=_936.test(time);if(_937){return time+_930+_931+_930+_932;}else{return null;}}}}},_xsdDateTimeToMmTimestamp:function(_938){var _939=" ";var _93a=/^\d{4}\-\d{2}\-\d{2}\T\d{2}\:\d{2}\:\d{2}/;var _93b=false;_93b=_93a.test(_938);if(_93b){var _93c=_938.match(_93a)[0];return _93c.replace(/T/,_939);}else{return null;}},_xsdDateToMmDate:function(date){var _93d=/^\d{4}\-\d{2}\-\d{2}/;var _93e=false;_93e=_93d.test(date);if(_93e){return date.match(_93d)[0];}else{return null;}},_xsdTimeToMmTime:function(time){var _93f=/^\d{2}\:\d{2}\:\d{2}/;var _940=false;_940=_93f.test(time);if(_940){return time.match(_93f)[0];}else{return null;}},_jsDateToMmDate:function(date){if(date){var year=date.getFullYear();var _941=date.getMonth();var day=date.getDate();_941=this._format(_941.toString());day=this._format(day.toString());return year+"-"+_941+"-"+day;}else{return null;}},_jsDateToXsdDate:function(date){var _942=null;if(date){var year=date.getFullYear();var _943=date.getMonth();var day=date.getDate();var _944=date.getTimezoneOffset();_943=this._format(_943.toString());day=this._format(day.toString());_942=year+"-"+_943+"-"+day;if(_944!==0){var _945;var _946;var _947;if(_944<0){_946=Math.ceil(_944/60);_947=(_944*-1)%60;if(_947===0){_945="-"+this._format((_946*-1).toString())+":00";}else{_945="-"+this._format((_946*-1).toString())+this._format(_947);}_942=_942+_945;}else{_946=Math.floor(_944/60);_947=_944%60;if(_947===0){_945="+"+this._format((_946).toString())+":00";}else{_945="+"+this._format((_946).toString())+this._format(_947);}_942=_942+_945;}}}return _942;},_xsdDateToJsDate:function(date){var _948=/^([\d]{4})-(\d\d)-(\d\d)/;var _949=false;_949=_948.test(date);if(_949){var _94a=new Date(NaN);var _94b;var _94c=_948.exec(date);if(_94c){_94b=_94c[2];_94a.setFullYear(_94c[1],_94b-1,_94c[3]);if(_94b!=_94a.getMonth()+1){_94a.setTime(NaN);}}return _94a;}else{return null;}},_mmDateToJsDate:function(date){return this._xsdDateToJsDate(this._mmDateToXsdDate(date));},_format:function(_94d){if(_94d.length==1){_94d="0"+_94d;}return _94d;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.utils.EventTransformer"]){dojo._hasResource["com.ibm.mashups.enabler.utils.EventTransformer"]=true;dojo.provide("com.ibm.mashups.enabler.utils.EventTransformer");}if(!dojo._hasResource["com.ibm.mm.enabler.logging.Trace"]){dojo._hasResource["com.ibm.mm.enabler.logging.Trace"]=true;if(typeof (__trace)=="undefined"){__trace={enter:function(_94e,_94f,args){if((args)&&(args.length==0)){args=null;}com.ibm.mashups.enabler.logging.Logger.getLogger(_94e).entering(_94f,args);},msg:function(_950,_951,msg,args){com.ibm.mashups.enabler.logging.Logger.getLogger(_950).trace(_951,msg,args);},evalFunction:function(js){return "function() {"+js+"}";},evalResult:function(_952,_953,msg){com.ibm.mashups.enabler.logging.Logger.getLogger(_952).trace(_953,msg);},exit:function(_954,_955,_956){com.ibm.mashups.enabler.logging.Logger.getLogger(_954).exiting(_955,_956);},assertFunction:function(_957){return "function() {\t if (!("+_957+")) {\t throw new Error('Assert failed');\t }\t }";}};}}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.Constants_API"]){dojo._hasResource["com.ibm.mashups.enabler.widget.Constants_API"]=true;dojo.provide("com.ibm.mashups.enabler.widget.Constants_API");dojo.provide("com.ibm.mashups.enabler.widget.Constants");dojo.declare("com.ibm.mashups.enabler.widget.Constants",null,{FILTER_HANDLED_EVENTS:"HandledEvents",FILTER_PUBLISHED_EVENTS:"PublishedEvents"});}if(!dojo._hasResource["com.ibm.mm.enabler.widget.Constants"]){dojo._hasResource["com.ibm.mm.enabler.widget.Constants"]=true;dojo.provide("com.ibm.mm.enabler.widget.Constants");dojo.declare("com.ibm.mm.enabler.widget.Constants",com.ibm.mashups.enabler.widget.Constants,{constructor:function(){},PERSISTENCE_MODE_MODEL:"Model",PERSISTENCE_MODE_MODEL_PREFERENCES:"ModelPreferences",PERSISTENCE_MODE_DOM:"DOM"});com.ibm.mashups.enabler.widget.Constants=new com.ibm.mm.enabler.widget.Constants();}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.Constants"]){dojo._hasResource["com.ibm.mashups.enabler.widget.Constants"]=true;dojo.provide("com.ibm.mashups.enabler.widget.Constants");}if(!dojo._hasResource["com.ibm.mashups.iwidget.itemset.PersistentAttributesFactory"]){dojo._hasResource["com.ibm.mashups.iwidget.itemset.PersistentAttributesFactory"]=true;dojo.provide("com.ibm.mashups.iwidget.itemset.PersistentAttributesFactory");dojo.declare("com.ibm.mashups.iwidget.itemset.PersistentAttributesFactory",null,{createPersistentAttributes:function(_958,_959){},getSupportedPersistenceMode:function(){}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService_API"]){dojo._hasResource["com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService_API"]=true;dojo.provide("com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService_API");dojo.provide("com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService");dojo.declare("com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService",null,{SERVICE_NAME:"persistentAttributesFactoryService",createPersistentAttributes:function(_95a,_95b){},setFactory:function(_95c,_95d){},removeFactory:function(_95e){}});com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService.SERVICE_NAME=com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService.prototype.SERVICE_NAME;}if(!dojo._hasResource["com.ibm.mm.iwidget.manageditemset.DOMPersistentAttributesFactoryImpl"]){dojo._hasResource["com.ibm.mm.iwidget.manageditemset.DOMPersistentAttributesFactoryImpl"]=true;dojo.provide("com.ibm.mm.iwidget.manageditemset.DOMPersistentAttributesFactoryImpl");dojo.declare("com.ibm.mm.iwidget.manageditemset.DOMPersistentAttributesFactoryImpl",com.ibm.mashups.iwidget.itemset.PersistentAttributesFactory,{constructor:function(){this.modes=["DOM"];},createPersistentAttributes:function(_95f,_960){return new com.ibm.mm.iwidget.manageditemset.PersistentAttributes(_95f,true);},getSupportedPersistenceMode:function(){return this.modes;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.services.PersistentAttributesFactoryServiceImpl"]){dojo._hasResource["com.ibm.mm.iwidget.services.PersistentAttributesFactoryServiceImpl"]=true;dojo.provide("com.ibm.mm.iwidget.services.PersistentAttributesFactoryServiceImpl");dojo.declare("com.ibm.mm.iwidget.services.PersistentAttributesFactoryServiceImpl",com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService,{constructor:function(){this._factories={};this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},createPersistentAttributes:function(_961,_962){if(_962){com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME).registerOnChangeListener(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES,_962);}var _963;var wID=_961.id;var _963=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME).getPersistenceMode(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES);var _964=_961.rootElement;if(dojo.hasClass(_964,com.ibm.mm.iwidget.services.PersistentAttributesFactoryServiceImpl.STANDALONE_CLASS)||!_963){_963=com.ibm.mm.iwidget.services.PersistentAttributesFactoryServiceImpl.DEFAULT_PERSISTENCE;}if(typeof _963!=="undefined"&&_963==com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_MODEL){var _965=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _966=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _967=com.ibm.mashups.enabler.model.state.AccessorFactory.getSpaceAccessor(_966);var _968=com.ibm.mashups.enabler.model.state.AccessorFactory.getPageAccessor(_966,_969);var _969=_967.getSpaceID();var _96a=_968.getPageID();var _96b=com.ibm.mm.iwidget.Utils.getModelID(wID);var wnd=_965.findWidgetWindow(_96b,_96a).start();if(!wnd){if(!com.ibm.mashups.enabler.services.IdentificationService.isClientID(_96b)){if(dojo.isFunction(_961._getResourceBundle)){_961._getResourceBundle();this.LOGGER.warning("createPersistentAttributes",_961.iwMessages.W_STANDALONECLASS_MISSING_1,[wID]);}else{this.LOGGER.warning("createPersistentAttributes","widget "+wID+" is missing class "+com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE.iwStandalone);}}_963=com.ibm.mm.iwidget.services.PersistentAttributesFactoryServiceImpl.DEFAULT_PERSISTENCE;}}if(!(_963 in this._factories)){return null;}return this._factories[_963].createPersistentAttributes(_961,_963);},setFactory:function(_96c,_96d){this._factories[_96c]=_96d;},removeFactory:function(_96e){if(_96e in this._factories){delete this._factories[_96e];}}});com.ibm.mm.iwidget.services.PersistentAttributesFactoryServiceImpl.DEFAULT_PERSISTENCE=com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_DOM;com.ibm.mm.iwidget.services.PersistentAttributesFactoryServiceImpl.STANDALONE_CLASS=com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE.iwStandalone;com.ibm.mashups.services.ServiceManager.setService(com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService.SERVICE_NAME,new com.ibm.mm.iwidget.services.PersistentAttributesFactoryServiceImpl());com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService.SERVICE_NAME).setFactory(com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_DOM,new com.ibm.mm.iwidget.manageditemset.DOMPersistentAttributesFactoryImpl());}if(!dojo._hasResource["com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService"]){dojo._hasResource["com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService"]=true;dojo.provide("com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService");}if(!dojo._hasResource["com.ibm.mm.iwidget.services.IWidgetFragmentServiceImpl"]){dojo._hasResource["com.ibm.mm.iwidget.services.IWidgetFragmentServiceImpl"]=true;dojo.provide("com.ibm.mm.iwidget.services.IWidgetFragmentServiceImpl");dojo.declare("com.ibm.mm.iwidget.services.IWidgetFragmentServiceImpl",null,{createItem:function(_96f,_970,_971,ns){if(!ns){ns="iw-";}var item=document.createElement("a");dojo.addClass(item,ns+iwConstants.CSSCLASS_INSTANCE.iwItem);dojo.style(item,"visibility","hidden");dojo.style(item,"display","none");item.setAttribute("href","#"+_96f);if(_971){item.setAttribute("lang",_971);}if(_970&&!_971){item.innerHTML=_970;}return item;},createItemSet:function(_972,ns){if(!ns){ns="iw-";}var _973=document.createElement("span");dojo.addClass(_973,ns+iwConstants.CSSCLASS_INSTANCE.iwItemSet);_973.setAttribute("title",_972);dojo.style(_973,"visibility","hidden");dojo.style(_973,"display","none");return _973;},createWidgetDefRef:function(_974,ns){if(!ns){ns="iw-";}var aTag=document.createElement("a");dojo.addClass(aTag,ns+iwConstants.CSSCLASS_INSTANCE.iwDefinition);aTag.setAttribute("href",_974);dojo.style(aTag,"visibility","hidden");dojo.style(aTag,"display","none");return aTag;},getItemSet:function(_975,name,ns){if(!ns){ns="iw-";}var rc=null;var _976=dojo.byId(_975);var _977=dojo.query("."+ns+iwConstants.CSSCLASS_INSTANCE.iwItemSet,_976);for(var i=0;i<_977.length;i++){var _978=_977[i];var _979=_978.getAttribute("title");if(name==_979){rc=_978;break;}}return rc;},getItem:function(_97a,name,ns){if(!ns){ns="iw-";}var rc=null;var _97b=dojo.query("."+ns+iwConstants.CSSCLASS_INSTANCE.iwItem,_97a);for(var i=0;i<_97b.length;i++){var _97c=_97b[i];var _97d=this.getKeyFromHref(_97c);if(_97d&&_97d==name){rc=_97c;break;}}return rc;},getItems:function(_97e,ns){if(!ns){ns="iw-";}var _97f=dojo.query("."+ns+iwConstants.CSSCLASS_INSTANCE.iwItem,_97e);if(typeof _97f=="undefined"||_97f===null||_97f.length===0){_97f=null;}return _97f;},getWidgetDefRef:function(_980,ns){if(!ns){ns="iw-";}var rc=null;var _981=dojo.byId(_980);var def=dojo.query("."+ns+iwConstants.CSSCLASS_INSTANCE.iwDefinition,_981)[0];var ref=def.getAttribute("href");if(ref){rc=ref;}return rc;},getKeyFromHref:function(node){var _982=node.getAttribute("href");if(!_982){return null;}var pos=_982.indexOf("#");if(pos<0){return null;}return _982.substring(pos+1);}});com.ibm.mashups.services.ServiceManager.setService("iwidgetFragmentService",new com.ibm.mm.iwidget.services.IWidgetFragmentServiceImpl());}if(!dojo._hasResource["com.ibm.mm.enabler.EndpointUtilsExtendedImpl"]){dojo._hasResource["com.ibm.mm.enabler.EndpointUtilsExtendedImpl"]=true;dojo.provide("com.ibm.mm.enabler.EndpointUtilsExtendedImpl");dojo.declare("com.ibm.mm.enabler.EndpointUtilsExtendedImpl",com.ibm.mm.enabler.EndpointUtilsDefaultImpl,{constructor:function(){},checkForEndpoints:function(url){if(!url){return null;}var _983=url.toString();if(_983){var _984=_983.indexOf("endpoint://",0);if(_984===0){var _985=_983.indexOf("/",11);if(_985>0){var _986=_983.substring(11,_985);var _987=_983.substring(_985+1);var _988=this._resolveEndpoint(_986);if(_988){if(_988.charAt(_988.length-1)=="/"){_983=_988+_987;}else{_983=_988+"/"+_987;}return _983;}else{return null;}}}else{if(_984>0){var _989=_983.substring(0,_984);var _98a=_983.substring(_984);var _98b=this.checkForEndpoints(_98a);if(_98b){return _98b.substring(0);}}}}return url;},_resolveEndpoint:function(_98c){if(!this.co){this._init();}var _98d=decodeURIComponent(_98c);var url=this.co.getValue(_98d+".url");if(!url){if(_98d=="{contenthandler}"){url=this.urlContentHandler;}else{if(_98d=="{webdavroot}"){url=this.urlWebDavRoot;}else{return null;}}}if((url)&&(url.charAt(0)!="/")&&(url.substr(0,4)!="http")){url="/"+url;}return url;},_init:function(){this.cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);this.co=this.cs.getConfigObject(com.ibm.mashups.enabler.services.ConfigConstants.ENDPOINT_CONFIG_PROVIDER);this.urlContentHandler="";this.urlContentHandler+=this.cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTEXT_ROOT);var _98e=this.cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.ANONYMOUS_USER);var _98f;if(_98e){_98f=this.cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTENTHANDLER_PUBLIC);}else{_98f=this.cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTENTHANDLER_PRIVATE);}this.urlContentHandler+=_98f;if(com.ibm.mm.enabler.remote&&com.ibm.mm.enabler.remote.WebDavUrlFactory){this.urlWebDavRoot=com.ibm.mm.enabler.remote.WebDavUrlFactory.createUrl()+"/";}else{this.urlWebDavRoot=null;}}});com.ibm.mm.enabler.EndpointUtils=new com.ibm.mm.enabler.EndpointUtilsExtendedImpl();}if(!dojo._hasResource["com.ibm.mm.iwidget.payloadDef"]){dojo._hasResource["com.ibm.mm.iwidget.payloadDef"]=true;dojo.provide("com.ibm.mm.iwidget.payloadDef");dojo.declare("com.ibm.mm.iwidget.payloadDef",null,{constructor:function(name,type,_990,_991,_992){this.name=name;this.attributes=_992||null;if(!this.attributes){this.attributes={};}if(typeof type!="undefined"&&type!==null){this.attributes.type=type;}if(typeof _990!="undefined"&&_990!==null){this.attributes.defaultValue=_990;}if(typeof _991!="undefined"&&_991!==null){this.attributes.description=_991;}this.attributeNames=[];this.attributeNames.push("type");this.attributeNames.push("defaultValue");this.attributeNames.push("description");var _993;for(_993 in _992){if(Object.prototype.hasOwnProperty.call(_992,_993)){this.attributeNames.push(_993);}}this.children=new com.ibm.mm.enabler.ArrayMap();},setAttribute:function(name,_994){this.attributes[name]=_994;if(typeof (this.attributeNames[name])!="undefined"){this.attributeNames.push(name);}},getAttribute:function(name){var _995=this.attributes[name];if(typeof _995=="undefined"){_995=null;}return _995;},getAttributeNames:function(){return this.attributeNames;},getChildren:function(){return this.children.values();},getChild:function(name){return this.children.get(name);},setChild:function(name,_996){this.children.put(name,_996);},getChildrenNames:function(){this.children.keySet();},getName:function(){return this.name;},getType:function(){return this.attributes.type;},getDefaultValue:function(){return this.attributes.defaultValue;},getDescription:function(){return this.attributes.description;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.UtilsExtended"]){dojo._hasResource["com.ibm.mm.iwidget.UtilsExtended"]=true;dojo.provide("com.ibm.mm.iwidget.UtilsExtended");dojo.declare("com.ibm.mm.iwidget.UtilsExtendedImpl",com.ibm.mm.iwidget.UtilsDefaultImpl,{getPayloadDef:function(_997){var name=_997.getAttribute("name");var _998=new com.ibm.mm.iwidget.payloadDef(name);var _999=_997.attributes;for(var i=0;i<_999.length;i++){var _99a=_999[i];if(_99a.name!="name"){_998.setAttribute(_99a.name,_99a.value);}}var _99b=_997.childNodes;for(var j=0;j<_99b.length;j++){var _99c=_99b[j];if(_99c.nodeType==1){var _99d=this.getPayloadDef(_99c);_998.setChild(_99d.name,_99d);}}return _998;}});if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"CoreModel")>=0)){dojo["require"]("com.ibm.mm.enabler.iwidget.UtilsModelImpl");}else{com.ibm.mm.iwidget.Utils=new com.ibm.mm.iwidget.UtilsExtendedImpl();}}if(!dojo._hasResource["com.ibm.mm.iwidget.icontext.IContextMMExtensionImpl"]){dojo._hasResource["com.ibm.mm.iwidget.icontext.IContextMMExtensionImpl"]=true;dojo.provide("com.ibm.mm.iwidget.icontext.IContextMMExtensionImpl");dojo.declare("com.ibm.mm.iwidget.icontext.IContextMMExtensionImpl",null,{constructor:function(_99e){this.widget=_99e;this.widgetId=_99e.id;},getSupportedModes:function(){var _99f=this.widgetwrapper.widgetDef.getSupportedModes();return _99f;},getPayloadDef:function(name){var _9a0=this.widget.widgetDef.payloadDefs;var _9a1=_9a0[name];if(typeof _9a1=="undefined"){return null;}return _9a1;},getPayloadDefNames:function(){var _9a2=this.widget.widgetDef.payloadDefs;var arr=[];for(var a in _9a2){if(Object.prototype.hasOwnProperty.call(_9a2,a)){arr.push(a);}}return arr;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.manageditemset.UserProfileImpl"]){dojo._hasResource["com.ibm.mm.iwidget.manageditemset.UserProfileImpl"]=true;dojo.provide("com.ibm.mm.iwidget.manageditemset.UserProfileImpl");dojo.declare("com.ibm.mm.iwidget.manageditemset.UserProfileImpl",com.ibm.mashups.iwidget.itemset.ManagedItemSet,{constructor:function(_9a3,user){this.widgetId=_9a3;this.user=user;},getItemValue:function(name){if(!name){return null;}var _9a4=this.user.getAttribute(name);if(typeof _9a4=="undefined"){_9a4=null;}return _9a4;},setItemValue:function(name,_9a5){if(!name||!_9a5){return null;}if(this.isReadOnly(name)){return null;}this.user.setAttribute(name,_9a5);return this;},isReadOnly:function(name){if(typeof name=="undefined"||name===null){return false;}var _9a6=this.user.getReadOnlyAttributeNames();var rc=this._contains(_9a6,name);return rc;},_contains:function(_9a7,_9a8){if(!_9a8){return false;}if(!_9a7){return false;}if(_9a7&&!dojo.isArray(_9a7)){return false;}for(var i=0;i<_9a7.length;i++){if(_9a7[i]&&_9a7[i]==_9a8){return true;}}return false;},removeItem:function(name){if(!name){return null;}if(this.isReadOnly(name)){return null;}this.user.removeAttribute(name);return this;},getAllNames:function(){var _9a9=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _9aa=_9a9.getValue("com.ibm.mashups.hideLookaside");if(dojo.isString(_9aa)&&_9aa.toLowerCase()=="true"){return this.user.getReadOnlyAttributeNames();}return this.user.getAttributeNames();},save:function(cb){return this.commit(cb);},commit:function(cb){var _9ab=null;if(com.ibm.mashups.enabler.user.Factory.getUserModel){_9ab=com.ibm.mashups.enabler.user.Factory.getUserModel();}if(_9ab){var _9ac=_9ab.commit();var fn=function(_9ad,_9ae,_9af){if(cb){var rc=false;var _9b0=iwConstants.USERPROFILE;if(_9ae&&_9ae==iwConstants.status.SUCCESS){rc=true;}cb(_9b0,rc);}};_9ac.setFinishedCallback(fn);_9ac.start();}},addListener:function(fn){var _9b1=this._getWidget();if(!_9b1){return null;}var _9b2=_9b1._registerListener(iwConstants.USERPROFILE,fn);return _9b2;},removeListener:function(_9b3){var _9b4=this._getWidget();if(!_9b4){return null;}return _9b4._removeListener(iwConstants.USERPROFILE,_9b3);},_getWidget:function(){var _9b5=com.ibm.mashups.iwidget.model.Factory.getGlobalModel();return _9b5.find(this.widget)||null;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.ResourceImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.ResourceImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.ResourceImpl");dojo.declare("com.ibm.mm.iwidget.widget.ResourceImpl",null,{constructor:function(obj){if(obj){for(var i in obj){if(Object.prototype.hasOwnProperty.call(obj,i)){this[i]=obj[i];}}}},IMAGE:{"bmp":"bmp","cod":"cod","gif":"gif","ief":"ief","jpe":"jpe","jpeg":"jpeg","jpg":"jpg","jfif":"jfif","svg":"svg","tif":"tif","tiff":"tiff","ras":"ras","cmx":"cmx","ico":"ico","pnm":"pnm","pbm":"pbm","pgm":"pgm","ppm":"ppm","rgb":"rgb","xbm":"xbm","xpm":"xpm","xwd":"xwd"},isCSS:function(){var rc=false;var _9b6=this._getExtension();if(_9b6&&_9b6=="css"){rc=true;}if(!rc&&this.getMimeType()){if(this.getMimeType()=="text/stylesheet"||this.getMimeType()=="text/css"){rc=true;}}return rc;},isImage:function(){var rc=false;var _9b7=this._getExtension();if(_9b7&&_9b7 in this.IMAGE){rc=true;}if(!rc&&this.getMimeType()){if(this.getMimeType().indexOf("image/")===0){rc=true;}}return rc;},isJS:function(){var rc=false;var _9b8=this._getExtension();if(_9b8&&_9b8=="js"){rc=true;}if(!rc&&this.getMimeType()){var _9b9=this.getMimeType();if(_9b9=="text/javascript"||_9b9=="application/x-javascript"||_9b9=="application/javascript"){rc=true;}}return rc;},getGlobalId:function(){var id=this[iwConstants.RESOURCE.globalid];if(!id){id=this[iwConstants.RESOURCE.id];}if(!id){id=null;}return id;},getSrc:function(){return this[iwConstants.RESOURCE.src];},getMimeType:function(){var _9ba=this[iwConstants.RESOURCE.mimeType];if(!_9ba){_9ba=null;}return _9ba;},_getExtension:function(){var uri=this.getSrc();if(!uri){return null;}var _9bb=uri.substring(uri.lastIndexOf(".")+1,uri.length);if(!_9bb){return null;}return _9bb;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.icontext.IContextExtendedImpl"]){dojo._hasResource["com.ibm.mm.iwidget.icontext.IContextExtendedImpl"]=true;dojo.provide("com.ibm.mm.iwidget.icontext.IContextExtendedImpl");dojo.declare("com.ibm.mm.iwidget.icontext.IContextExtendedImpl",com.ibm.mm.iwidget.icontext.IContextDefaultImpl,{_initEvents:function(){this.iEvents=new com.ibm.mm.iwidget.icontext.IContextIEventsImpl(this.widgetwrapper);},_initIO:function(){this.io=new com.ibm.mm.iwidget.icontext.IContextIOImpl(this.widgetwrapper);},_initMMExtension:function(){this._mm=new com.ibm.mm.iwidget.icontext.IContextMMExtensionImpl(this.widgetwrapper);},getUserProfile:function(){var _9bc=null;if(com.ibm.mashups.enabler.user.Factory.getUserModel){_9bc=com.ibm.mashups.enabler.user.Factory.getUserModel();}var user=null;if(_9bc){user=_9bc.findCurrentUser().start();}var _9bd=null;if(user){_9bd=new com.ibm.mm.iwidget.manageditemset.UserProfileImpl(this.widgetId,user);}return _9bd;},requires:function(_9be,_9bf,uri,cb,_9c0){_9c0=_9c0||null;if(!_9c0){_9c0="text/plain";}uri=uri||null;if(uri){var obj={};obj[iwConstants.RESOURCE.mimeType]=_9c0;obj[iwConstants.RESOURCE.id]=_9be;obj[iwConstants.RESOURCE.version]=_9bf;obj[iwConstants.RESOURCE.src]=uri;obj[iwConstants.RESOURCE.callback]=cb;var _9c1=new com.ibm.mm.iwidget.widget.ResourceImpl(obj);com.ibm.mashups.services.ServiceManager.getService("resourceLoadService").loadResource(_9c1,this.widgetId);}},processiWidgets:function(root){dojo.publish("/com/ibm/mashups/livetext/livetextchanged",[root,true]);},getShareableItemSet:function(name){name=name||null;if(!name){return null;}var _9c2=this.widgetwrapper._getShareableItemSet(name);return _9c2;}});com.ibm.mm.iwidget.icontext.IContextImpl=com.ibm.mm.iwidget.icontext.IContextExtendedImpl;}if(!dojo._hasResource["com.ibm.mm.iwidget.manageditemset.IDescriptorExtendedImpl"]){dojo._hasResource["com.ibm.mm.iwidget.manageditemset.IDescriptorExtendedImpl"]=true;dojo.provide("com.ibm.mm.iwidget.manageditemset.IDescriptorExtendedImpl");dojo.declare("com.ibm.mm.iwidget.manageditemset.IDescriptorExtendedImpl",com.ibm.mm.iwidget.manageditemset.IDescriptorDefaultImpl,{_getWindowState:function(){if(this.widget){var _9c3=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(this.navStateModel,this.widget.id);value=_9c3.getWindowState();}else{value="normal";}return value;}});com.ibm.mm.iwidget.manageditemset.IDescriptorImpl=com.ibm.mm.iwidget.manageditemset.IDescriptorExtendedImpl;if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"CoreModel")>=0)){dojo["require"]("com.ibm.mm.enabler.iwidget.manageditemset.IDescriptorModelImpl");}}if(!dojo._hasResource["com.ibm.mm.iwidget.services.ResourceLoadServiceImpl"]){dojo._hasResource["com.ibm.mm.iwidget.services.ResourceLoadServiceImpl"]=true;dojo.provide("com.ibm.mm.iwidget.services.ResourceLoadServiceImpl");dojo.declare("com.ibm.mm.iwidget.services.ResourceLoadServiceImpl",null,{constructor:function(){this.modules={};this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);this.LOADING_TOKEN=0;this.LOADING_ERROR_TOKEN=1;this.LOADED_TOKEN=2;this.waitingqueue={};this.evalqueue={};this.callbackQueue={};var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);if(cs){var _9c4=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.REGISTER_LOADEDRESOURCES);if(_9c4){if(dojo.isString(_9c4)){try{_9c4=dojo.fromJson(_9c4);}catch(e){}}if(dojo.isArray(_9c4)){this.registeredLoadedResources=_9c4;}}}},executeCallbackQueue:function(_9c5){if(this.callbackQueue[_9c5]){var _9c6=this.callbackQueue[_9c5];var _9c7=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(_9c5);if(_9c7){for(var i=0;i<_9c6.length;i++){if(_9c6[i]){var _9c8=_9c7._getHandlerScope(_9c6[i].cb);if(_9c8){var cb=dojo.hitch(_9c8,_9c6[i].cb);cb(_9c6[i].id,_9c6[i].src,_9c6[i].status);_9c6[i]=null;}}}}}},loadResource:function(_9c9,_9ca,cb2){var _9cb="loadResource";var _9cc=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_9cc){this.LOGGER.entering(_9cb,arguments);}var _9cd=_9c9.getGlobalId();var uri=_9c9.getSrc();var path=null;if(_9c9.isJS()){path=this._rewriteUrl(uri,_9ca,true);}else{path=this._rewriteUrl(uri,_9ca,false);}if(!_9cd){_9cd=path;}if(!_9cd){return;}this.evalqueue[_9ca]=this.evalqueue[_9ca]?this.evalqueue[_9ca]:[];this.evalqueue[_9ca].push({_id:_9cd,resourceElem:_9c9,cb2:cb2,widgetId:_9ca,isReady:false});var _9ce=_9c9[iwConstants.RESOURCE.skipLoad];if(_9ce){var rc=false;try{rc=dojo.eval(_9ce);}catch(e){rc=false;}if(rc){this._handleLoadedResource(_9cd,_9ca,null,iwConstants.status.OTHER);return;}}var _9cf=this.registeredLoadedResources;if(dojo.isArray(_9cf)){for(var j=0;j<_9cf.length;j++){if(_9cf[j].globalid&&_9cf[j].globalid==_9cd){if(_9cf[j].version){var _9d0=_9c9[iwConstants.RESOURCE.version];if(!_9d0||(_9d0&&_9d0==_9cf[j].version)){this._handleLoadedResource(_9cd,_9ca,null,iwConstants.status.OTHER);return;}}else{this._handleLoadedResource(_9cd,_9ca,null,iwConstants.status.OTHER);return;}}}}var _9d1=this.modules[_9cd];var me=this;if(_9d1&&_9d1!==null){var type=_9d1.type;switch(type){case 0:this.waitingqueue[_9d1._id]=(this.waitingqueue[_9d1._id])?this.waitingqueue[_9d1._id]:[];this.waitingqueue[_9d1._id].push({resourceElem:_9c9,widgetId:_9ca,cb2:cb2});return;case 1:this._handleLoadedResource(_9cd,_9ca,null,_9d1.status,_9d1.data);return;case 2:this._handleLoadedResource(_9cd,_9ca,null,_9d1.status);return;}}_9d1={};_9d1.type=this.LOADING_TOKEN;_9d1._id=_9cd;_9d1._path=path;this.modules[_9cd]=_9d1;if(_9cd!=path){this.modules[path]=this.modules[_9cd];}var _9d2=null;if(_9c9.isCSS()){_9d2=this._loadCSS(path);this.modules[_9cd].type=this.LOADED_TOKEN;this.modules[_9cd].status=iwConstants.status.OTHER;this._handleLoadedResource(_9cd,_9ca,null,iwConstants.status.OTHER);return;}if(_9c9.isImage()){_9d2=this._loadImage(path);this.modules[_9cd].type=this.LOADED_TOKEN;this.modules[_9cd].status=iwConstants.status.OTHER;this._handleLoadedResource(_9cd,_9ca,null,iwConstants.status.OTHER);return;}var _9d3=path;if(dojo.isIE==6&&path.indexOf("/")===0){var _9d4=window.location.protocol;var host=window.location.hostname;var port=window.location.port;_9d3=_9d4+"http://"+host+":"+port+path;}var _9d5=com.ibm.mashups.enabler.io.XHRMultipartFactory;var _9d6=_9d5.create();var _9d7=!_9d6.isTransaction();if(ibmConfig.dojotest){_9d7=true;}var args={url:_9d3,ibmMultipart:{context:_9d5.CONTEXT_ENABLER},sync:_9d7,load:function(data,_9d8){var _9d9=null;if(_9d8.xhr.status==200||_9d8.xhr.status===0){var _9da=_9d8.xhr.responseText;_9d9=_9da.replace(/_IWID_/g,"_"+_9ca+"_");}me.modules[_9cd].type=me.LOADED_TOKEN;me.modules[_9cd].status=iwConstants.status.SUCCESS;me._handleLoadedResource(_9cd,_9ca,_9d9,iwConstants.status.SUCCESS);var _9db=me.waitingqueue[_9cd];if(_9db){for(var j=0;j<_9db.length;j++){var req=_9db[j];me._handleLoadedResource(_9cd,req.widgetId,null,iwConstants.status.SUCCESS);}}me.waitingqueue[_9cd]=null;},error:function(data,_9dc){me.modules[_9cd].type=me.LOADING_ERROR_TOKEN;me.modules[_9cd].data=data;me.modules[_9cd].status=_9dc.xhr.status;me._handleLoadedResource(_9cd,_9ca,null,_9dc.xhr.status,data);var _9dd=me.waitingqueue[_9cd];if(_9dd){for(var h=0;h<_9dd.length;h++){var req=_9dd[h];me._handleLoadedResource(_9cd,req.widgetId,null,_9dc.xhr.status,data);}}me.waitingqueue[_9cd]=null;}};dojo.xhrGet(args);},_rewriteUrl:function(uri,id,_9de){var _9df=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(id);return _9df._rewriteURI(uri,_9de);},_getExtension:function(uri){return uri.substring(uri.lastIndexOf(".")+1,uri.length);},_loadCSS:function(path){var link=document.createElement("link");link.setAttribute("rel","stylesheet");link.setAttribute("type","text/css");link.setAttribute("href",path);document.getElementsByTagName("head")[0].appendChild(link);},_loadImage:function(path){com.ibm.mm.enabler.utils.Misc.preloadImage(url);},_evalCallback:function(cb,_9e0,_9e1,_9e2){if(cb){if(dojo.isString(cb)){var _9e3=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(_9e0);if(_9e3){var _9e4=_9e3._getHandlerScope(cb);if(_9e4){cb=dojo.hitch(_9e4,cb);}}}var id=_9e1.getGlobalId();var src=_9e1.getSrc();if(!_9e2){_9e2=iwConstants.status.SUCCESS;}if(dojo.isFunction(cb)){dojo.partial(cb)(id,src,_9e2);}else{this.callbackQueue[_9e0]=this.callbackQueue[_9e0]?this.callbackQueue[_9e0]:[];var _9e5={cb:cb,id:id,src:src,status:_9e2};this.callbackQueue[_9e0].push(_9e5);}}},_evalFn:function(_9e6){if(window.execScript){window.execScript(_9e6,"JavaScript");}else{dojo.eval(_9e6);}},_loadedFC:function(_9e7,_9e8,cb2,data,_9e9){var cb=_9e7[iwConstants.RESOURCE.callback];if(cb){this._evalCallback(cb,_9e8,_9e7,_9e9);}if(cb2){var _9ea=com.ibm.mashups.enabler.io.XHRMultipartFactory.create();_9ea.suspendTransaction();if(data&&_9e9){cb2(data,_9e9);}else{cb2();}_9ea.resumeTransaction();}},_handleLoadedResource:function(_9eb,_9ec,_9ed,_9ee,_9ef){var _9f0;var _9f1=this.evalqueue[_9ec];if(_9f1){if(_9f1[0]&&_9f1[0]._id&&_9f1[0]._id==_9eb){if(_9ed){this._evalFn(_9ed);}_9f0=_9f1.shift();this._loadedFC(_9f0.resourceElem,_9ec,_9f0.cb2,_9ef,_9ee);var arr=_9f1;var _9f2=true;while(_9f2&&_9f1.length>0){if(_9f1[0].isReady){var _9f3=_9f1[0].contents;if(_9f3){this._evalFn(_9f3);}this._loadedFC(_9f1[0].resourceElem,_9ec,_9f1[0].cb2,_9f1[0].statusData,_9f1[0].status);_9f1.shift();}else{_9f2=false;}}}else{if(_9f1[0]&&_9f1[0]._id&&_9f1[0]._id!=_9eb){for(var i=0;i<_9f1.length;i++){_9f0=_9f1[i];if(_9f0._id&&_9f0._id==_9eb){_9f1[i].contents=_9ed;_9f1[i].isReady=true;_9f1[i].status=_9ee;_9f1[i].statusData=_9ef;}}}}}}});com.ibm.mashups.services.ServiceManager.setService("resourceLoadService",new com.ibm.mm.iwidget.services.ResourceLoadServiceImpl());}if(!dojo._hasResource["com.ibm.mm.iwidget.parser.WidgetParser"]){dojo._hasResource["com.ibm.mm.iwidget.parser.WidgetParser"]=true;dojo.provide("com.ibm.mm.iwidget.parser.WidgetParser");dojo.declare("com.ibm.mm.iwidget.parser.WidgetParser",null,{parseWidgetDefinition:function(){return null;}});}if(!dojo._hasResource["com.ibm.mm.enabler.xslt"]){dojo._hasResource["com.ibm.mm.enabler.xslt"]=true;dojo.provide("com.ibm.mm.enabler.xslt");com.ibm.mm.enabler.xslt.ie={};com.ibm.mm.enabler.xslt.gecko={};com.ibm.mm.enabler.xslt.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);com.ibm.mm.enabler.xslt.getXmlHttpRequest=function(){var oXml=null;if(typeof ActiveXObject!="undefined"){oXml=new ActiveXObject("Microsoft.XMLHTTP");}else{oXml=new XMLHttpRequest();}return oXml;};com.ibm.mm.enabler.xslt.loadXml=function(sUrl){if(typeof ActiveXObject!="undefined"||window.ActiveXObject!==undefined){return com.ibm.mm.enabler.xslt.ie.loadXml(sUrl);}else{return com.ibm.mm.enabler.xslt.gecko.loadXml(sUrl);}};com.ibm.mm.enabler.xslt.loadXmlString=function(sXml){if(typeof ActiveXObject!="undefined"||window.ActiveXObject!==undefined){return com.ibm.mm.enabler.xslt.ie.loadXmlString(sXml);}else{var _9f4=new DOMParser();return com.ibm.mm.enabler.xslt.gecko.loadXmlString(sXml);}};com.ibm.mm.enabler.xslt.loadXsl=function(sUrl){if(typeof ActiveXObject!="undefined"||window.ActiveXObject!==undefined){return com.ibm.mm.enabler.xslt.ie.loadXsl(sUrl);}else{return com.ibm.mm.enabler.xslt.gecko.loadXsl(sUrl);}};com.ibm.mm.enabler.xslt.transform=function(xml,xsl,_9f5,_9f6,_9f7){var _9f8=com.ibm.mashups.enabler.logging.LogLevel.TRACE;var _9f9="transform";var _9fa=com.ibm.mm.enabler.xslt.LOGGER.isLoggable(_9f8);if(_9fa){com.ibm.mm.enabler.xslt.LOGGER.entering(_9f9,arguments);}if(typeof ActiveXObject!="undefined"||window.ActiveXObject!==undefined){return com.ibm.mm.enabler.xslt.ie.transform(xml,xsl,_9f5,_9f6,_9f7);}else{return com.ibm.mm.enabler.xslt.gecko.transform(xml,xsl,_9f5,_9f6,_9f7);}};com.ibm.mm.enabler.xslt.transformAndUpdate=function(_9fb,xml,xsl,_9fc,_9fd){var _9fe=com.ibm.mashups.enabler.logging.LogLevel.TRACE;var _9ff="transformAndUpdate";var _a00=com.ibm.mm.enabler.xslt.LOGGER.isLoggable(_9fe);if(_a00){com.ibm.mm.enabler.xslt.LOGGER.entering(_9ff,arguments);}var _a01;if(typeof ActiveXObject!="undefined"||window.ActiveXObject!==undefined){_a01=com.ibm.mm.enabler.xslt.ie.transform(xml,xsl,_9fc,_9fd,true);if(_a00){com.ibm.mm.enabler.xslt.LOGGER.trace(_9ff,"XSLT result: "+_a01);}_9fb.innerHTML+=_a01;}else{_a01=com.ibm.mm.enabler.xslt.gecko.transform(xml,xsl,_9fc,_9fd,false);if(_a00){com.ibm.mm.enabler.xslt.LOGGER.trace(_9ff,"XSLT result: "+(new XMLSerializer()).serializeToString(_a01));}var _a02=_a01.documentElement;if(_a01.documentElement.tagName=="transformiix:result"){_a02=_a01.documentElement.childNodes;com.ibm.mm.enabler.utils.Dom.copyChildren(_a01.documentElement,_9fb,true);}else{if(_a00){com.ibm.mm.enabler.xslt.LOGGER.trace(_9ff,"Appending: "+(new XMLSerializer()).serializeToString(_a02));}_9fb.appendChild(_a02);}}if(_a00){com.ibm.mm.enabler.xslt.LOGGER.exiting(_9ff);}};com.ibm.mm.enabler.xslt.ie.loadXml=function(sUrl){var _a03=new ActiveXObject("MSXML2.DOMDocument");_a03.async=0;_a03.resolveExternals=0;if(!_a03.load(sUrl)){throw new Error("Error loading xml file "+sUrl);}return _a03;};com.ibm.mm.enabler.xslt.ie.loadXmlString=function(sXml){var _a04=!window.ActiveXObject&&window.ActiveXObject!==undefined;var _a05=_a04?new ActiveXObject("MSXML2.FreeThreadedDOMDocument.6.0"):new ActiveXObject("MSXML2.DOMDocument");_a05.async=0;_a05.resolveExternals=0;if(!_a05.loadXML(sXml)){throw new Error("Error loading xml string "+sXml);}return _a05;};com.ibm.mm.enabler.xslt.ie.loadXsl=function(sUrl){var _a06=new ActiveXObject("MSXML2.FreeThreadedDOMDocument");_a06.async=0;_a06.resolveExternals=0;if(!_a06.load(sUrl)){throw new Error("Error loading xsl file "+sUrl);}return _a06;};com.ibm.mm.enabler.xslt.ie.transform=function(_a07,xsl,_a08,_a09,_a0a){var oXml=_a07;var oXsl=xsl;try{if(!oXsl.documentElement){oXsl=this.loadXsl(xsl);}}catch(e){var sMsg=e.message;throw new Error(""+sMsg,""+sMsg);}var _a0b=new ActiveXObject("Msxml2.XSLTemplate");_a0b.stylesheet=oXsl;var _a0c=_a0b.createProcessor();_a0c.input=oXml;if(_a09){com.ibm.mm.enabler.utils.Misc.forIn(_a09,function(_a0d,key,obj){this.addParameter(key,_a0d);},_a0c);}if(_a08){_a0c.addParameter("mode",_a08);}if(_a0a){if(!_a0c.transform()){throw new Error("Error transforming xml doc "+oXml);}return _a0c.output;}else{var _a0e=new ActiveXObject("MSXML2.DOMDocument");_a0e.async=0;_a0e.validateOnParse=1;oXml.transformNodeToObject(oXsl,_a0e);return _a0e;}};com.ibm.mm.enabler.xslt.gecko.loadXml=function(sUrl){};com.ibm.mm.enabler.xslt.gecko.loadXmlString=function(sXml){var _a0f=new DOMParser();var _a10;try{_a10=_a0f.parseFromString(sXml,"text/xml");}catch(exc){throw new Error("Error loading xml string "+sXml);}return _a10;};com.ibm.mm.enabler.xslt.gecko.loadXsl=function(sUrl){var _a11=document.implementation.createDocument("","",null);_a11.async=0;_a11.load(sUrl);return _a11;};com.ibm.mm.enabler.xslt.gecko.transform=function(_a12,xsl,_a13,_a14,_a15){try{var _a16=xsl;if(!_a16.documentElement){_a16=this.loadXsl(xsl);}var proc=new XSLTProcessor();proc.importStylesheet(_a16);if(_a14){com.ibm.mm.enabler.utils.Misc.forIn(_a14,function(_a17,key,obj){this.setParameter(null,key,_a17);},proc);}if(_a13){proc.setParameter(null,"mode",_a13);}var _a18=proc.transformToDocument(_a12);if(!_a15){return _a18;}resultStr=_a18.documentElement.childNodes[0].textContent;}catch(exc){throw new Error("Error transforming xml doc "+exc);}return resultStr;};com.ibm.mm.enabler.xslt.setLayerContentByXml=function(_a19,xml,xsl,_a1a,_a1b){var _a1c=com.ibm.mm.enabler.xslt.transform(xml,xsl,null,_a1a,_a1b);if(_a19.innerHTML){_a19.innerHTML=_a1c;}else{var obj=document.getElementById(_a19);obj.innerHTML=_a1c;}};}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetDefinitionLegacyImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetDefinitionLegacyImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.IWidgetDefinitionLegacyImpl");dojo.declare("com.ibm.mm.iwidget.widget.IWidgetDefinitionLegacyImpl",com.ibm.mashups.iwidget.widget.IWidgetDefinition,{constructor:function(name,_a1d,_a1e,_a1f,_a20,uri,_a21,_a22,_a23,_a24,_a25,_a26){var arg1=name;if(dojo.isString(arg1)){this.name=name;this.markup=_a1d;this.iScope=_a1e;this.itemSetsArr=_a1f;this.uri=uri;this.widgetEvents=_a20;this.publishedEvents=_a22;this.handledEvents=_a23;this.supportedModes=_a21;this.resources=_a24;this.payloadDefs=_a25;this.iDescriptor=_a26;}else{this.name=arg1.name;this.markup=arg1.markup;this.metaData=arg1.metaData;this.events=arg1.events;this.itemSets=arg1.itemSets;this.resources=arg1.resources;this.payloadDefs=arg1.payloadDefs;this.iScope=this.metaData.iScope;this.supportedModes=this.metaData.supportedModes;this.uri=this.metaData.contentURI;var _a27;this.widgetEvents={};for(_a27 in this.metaData){if(_a27.indexOf("on")===0){this.widgetEvents[_a27]=this.metaData[_a27];}}var _a28=arg1.events.publishedEvents;this.publishedEvents={};this.handledEvents={};var _a29;var _a2a;for(_a29 in _a28){if(Object.prototype.hasOwnProperty.call(_a28,_a29)){_a27=_a28[_a29];_a2a=new com.ibm.mm.iwidget.IEventDescriptionImpl(_a27.eventName,_a27.payloadType,_a27.description,_a27.onEvent);if(!this.publishedEvents[_a29]){this.publishedEvents[_a29]=[];}this.publishedEvents[_a29].push(_a2a);}}var _a2b=arg1.events.handledEvents;for(_a29 in _a2b){if(Object.prototype.hasOwnProperty.call(_a2b,_a29)){_a27=_a2b[_a29];_a2a=new com.ibm.mm.iwidget.IEventDescriptionImpl(_a27.eventName,_a27.payloadType,_a27.description,_a27.onEvent);if(!this.handledEvents[_a29]){this.handledEvents[_a29]=[];}this.handledEvents[_a29].push(_a2a);}}var _a2c;this.itemSetsArr={};for(_a2c in arg1.itemSets){if(Object.prototype.hasOwnProperty.call(arg1.itemSets,_a2c)){var _a2d=arg1.itemSets[_a2c];var _a2e;if(_a2c=="attributes"){_a2e=new com.ibm.mm.iwidget.itemset.ItemSetDefaultImpl(_a2d.name,_a2d.onItemSetChanged);}else{_a2e=new com.ibm.mm.iwidget.itemset.ItemSetDefaultImpl(_a2d.name,_a2d.onItemSetChanged);}_a2e.itemLists.items=_a2d.itemLists;this.itemSetsArr[_a2c]=_a2e;}}}},_getPublishedEvents:function(){return this.publishedEvents;},_getHandledEvents:function(){return this.handledEvents;},getPublishedEvents:function(){var arr=[];for(var i in this.publishedEvents){if(Object.prototype.hasOwnProperty.call(this.publishedEvents,i)){arr.push(this.publishedEvents[i]);}}return arr;},getHandledEvents:function(){var arr=[];for(var i in this.handledEvents){if(Object.prototype.hasOwnProperty.call(this.handledEvents,i)){arr.push(this.handledEvents[i]);}}return arr;},getAttributes:function(){var _a2f=this.itemSetsArr.attributes;if(!_a2f){_a2f={name:"attributes",items:{}};}if(typeof (this.uri)!="undefined"&&_a2f){_a2f.items.contentURI={id:"contentURI",value:this.uri,readOnly:false};}if(typeof (this.supportedModes)!="undefined"&&_a2f){_a2f.items.supportedModes={id:"supportedModes",value:this.uri,readOnly:false};}return _a2f;},getAllItemSetNames:function(){var _a30=[];if(!this.itemSetsArr){return _a30;}var i=0;for(var _a31 in this.itemSetsArr){if(Object.prototype.hasOwnProperty.call(this.itemSetsArr,_a31)){var _a32=this.itemSetsArr[_a31];if(typeof (_a32)!="undefined"){_a30[i]=_a32.name;}i++;}}return _a30;},getItemSet:function(name){if(name=="attributes"){return this.getAttributes();}var _a33=this.itemSetsArr[name];if(typeof (_a33)!="undefined"){return _a33;}return null;},getPublishedEventsNames:function(){if(!this.publishedEvents){return null;}var _a34=[];var _a35;for(_a35 in this.publishedEvents){if(Object.prototype.hasOwnProperty.call(this.publishedEvents,_a35)){_a34.push(_a35);}}return _a34;},getHandledEventsNames:function(){if(!this.handledEvents){return null;}var _a36=[];var _a37;for(_a37 in this.handledEvents){if(Object.prototype.hasOwnProperty.call(this.handledEvents,_a37)){_a36.push(_a37);}}return _a36;},getPublishedEvent:function(_a38){if(!this.publishedEvents){return null;}return this.publishedEvents[_a38];},getHandledEvent:function(_a39){if(!this.handledEvents){return null;}return this.handledEvents[_a39];},getWidgetName:function(){return this.name;},getPayloadDefs:function(){return this.payloadDefs;},getPayloadDef:function(name){var _a3a=this.payloadDefs[name];if(typeof _a3a=="undefined"){return null;}return _a3a;},getPayloadDefNames:function(){var arr=[];var a;for(a in this.payloadDefs){if(Object.prototype.hasOwnProperty.call(this.payloadDefs,a)){arr.push(a);}}return arr;},getSupportedModes:function(){var temp=this.supportedModes;if(!temp){return null;}var arr=temp.split(" ");return arr;},getIDescriptorItems:function(){return null;},getMarkupByMode:function(mode){return this.markup;},getWidgetEvents:function(){return this.widgetEvents;},getIScope:function(){return this.iScope;},getResources:function(){return this.resources;},getDefaultLanguage:function(){return "en";},getMarkup:function(){return this.markup;},getAllowInstanceContent:function(){return false;},_getShareableItemSets:function(){return null;},_getManagedItemSetListener:function(_a3b){return null;},getXmlBase:function(){return null;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.parser.LegacyXMLParser"]){dojo._hasResource["com.ibm.mm.iwidget.parser.LegacyXMLParser"]=true;dojo.provide("com.ibm.mm.iwidget.parser.LegacyXMLParser");dojo.declare("com.ibm.mm.iwidget.parser.LegacyXMLParser",com.ibm.mm.iwidget.parser.WidgetParser,{constructor:function(_a3c){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.xmlStr=_a3c;},namespaces:{"iw":"http://www.ibm.com/iWidget"},parseWidgetDefinition:function(){var _a3d=com.ibm.mm.enabler.xslt.loadXmlString(this.xmlStr);var _a3e=this.readMarkup(_a3d);var _a3f=this.readItemSets(_a3d);var uri=this.readContentURI(_a3d);var _a40=this.readWidgetEvents(_a3d);var name=this.readName(_a3d);var _a41=this.readiScope(_a3d);var _a42=this.readSupportedModes(_a3d);var _a43=this.readPublicEvents(_a3d,"iw:handledEvents");var _a44=this.readPublicEvents(_a3d,"iw:publishedEvents");var _a45=this.readResources(_a3d);var _a46=this.readPayloadDefs(_a3d);var _a47=this.readIDescriptor(_a3d);return new com.ibm.mm.iwidget.widget.IWidgetDefinitionLegacyImpl(name,_a3e,_a41,_a3f,_a40,uri,_a42,_a44,_a43,_a45,_a46,_a47);},readMarkup:function(_a48){var _a49="readMarkup";var _a4a=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_a4a){this.LOGGER.entering(_a49,arguments);}var _a4b="/iw:iwidget/iw:content";var _a4c=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(_a4b,_a48,this.namespaces);var _a4d="";if(_a4c){var _a4e=_a4c.childNodes;for(var j=0,l=_a4e.length;j0){dojo.forEach(_a79,function(node){var _a7a={};_a7a.name=node.getAttribute("resourceName");_a7a.src=node.getAttribute("uri");_a7a.version=node.getAttribute("version");_a7a.callback=node.getAttribute("callback");_a7a.mimetype=node.getAttribute("mimetype");_a78[i]=_a7a;},this);}return _a78;},readIDescriptor:function(_a7b){return null;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.parser.StandardXMLParser"]){dojo._hasResource["com.ibm.mm.iwidget.parser.StandardXMLParser"]=true;dojo.provide("com.ibm.mm.iwidget.parser.StandardXMLParser");dojo.declare("com.ibm.mm.iwidget.parser.StandardXMLParser",com.ibm.mm.iwidget.parser.WidgetParser,{constructor:function(_a7c){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.xmlStr=_a7c;},namespaces:{"iw":"http://www.ibm.com/xmlns/prod/iWidget"},reservedAttributes:{iScope:"iScope",supportedModes:"supportedModes",id:"id",allowInstanceContent:"allowInstanceContent",lang:"lang","xmlns:iw":"xmlns:iw",supportedWindowStates:"supportedWindowStates","xml:lang":"xml:lang","xml:base":"xml:base"},parseWidgetDefinition:function(){var _a7d=com.ibm.mm.enabler.xslt.loadXmlString(this.xmlStr);var _a7e=this.readRootElement(_a7d);_a7e.markup=this.readMarkup(_a7d);_a7e.itemSetsArr=this.readItemSets(_a7d,_a7e);_a7e.publicEvents=this.readPublicEvents(_a7d);_a7e.resources=this.readResources(_a7d);var _a7f=this.readPayloadDefs(_a7d);if(_a7f){_a7e.payloadDefs=_a7f;}_a7e.eventDescriptions=this.readEventDescriptions(_a7d);_a7e.xmlStr=this.xmlStr;return new com.ibm.mm.iwidget.widget.IWidgetDefinitionImpl(_a7e,this.xmlStr);},readRootElement:function(_a80){var _a81={};var root=_a80.documentElement;var _a82=root.getAttribute("supportedModes");if(!_a82){_a82="view";}_a81.supportedModes=_a82;var _a83;var name=root.getAttribute("id");if(!name){name=null;}_a81.id=name;_a81.name=name;var temp=root.getAttribute("allowInstanceContent");var _a84=false;if(temp&&temp=="true"){_a84=true;}_a81.allowInstanceContent=_a84;var lang=root.getAttribute("lang");if(!lang){lang=root.getAttribute("xml:lang");}if(!lang){lang="en";}_a81.lang=lang;var _a85={};var _a86=root.attributes;var i;for(i=0;i<_a86.length;i++){var _a87=_a86[i];if(_a87.name.indexOf("on")===0){var _a88=_a87.value;if(_a88){_a85[_a87.name]=_a88;}}}_a81.widgetEvents=_a85;var _a89=root.getAttribute("iScope");if(!_a89){_a89=null;}_a81.iScope=_a89;var _a8a=iwConstants.iDescriptorItems;var _a8b={};for(var j in _a8a){if(Object.prototype.hasOwnProperty.call(_a8a,j)){name=_a8a[j];_a83=root.getAttribute(name);_a8b[name]=_a83;}}_a81.iDescriptor=_a8b;var _a8c={};_a86=root.attributes;for(i=0;i<_a86.length;i++){var att=_a86[i];if(att.name.indexOf("on")!==0&&!iwConstants.iDescriptorItems[att.name]&&!this.reservedAttributes[att.name]){_a83=att.value;if(typeof _a83!="undefined"&&_a83!==null){_a8c[att.name]=_a83;}}}_a81.simpleAttributes=_a8c;var _a8d=root.getAttribute("supportedWindowStates");if(!_a8d){_a8d="normal";}_a81.supportedWindowStates=_a8d;var _a8e=root.getAttribute("xml:base");if(_a8e){_a81.xmlBase=_a8e;}return _a81;},readMarkup:function(_a8f){var _a90="readMarkup";var _a91=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_a91){this.LOGGER.entering(_a90,arguments);}var _a92="/iw:iwidget/iw:content";var _a93=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(_a92,_a8f,this.namespaces);var _a94={};var _a95="";var mode=null;if(_a93&&_a93.length>0){for(var i=0,l=_a93.length;i0||(lang&&_aad)){for(var v=0,vL=_aaf.length;v=0){_b01=true;_b06.defaultLocale=lang;}else{_b06.value=_b05;}_b02.items[id]=_b06;if(_aff){_afb[_afd]=_b02;}else{_afc[_afd]=_b02;}}}}}_af7.shareableItemSetsArr=_afc;_af7.itemSetsArr=_afb;if(_af9){this.LOGGER.exiting(_af8,_afb);}},readPayloadDefs:function(_b07){var _b08="readPayloadDefs";var _b09=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_b09){this.LOGGER.entering(_b08,arguments);}var _b0a={};return _b0a;},readPublicEvents:function(_b0b,_b0c){var _b0d="readPublicEvents";var _b0e=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_b0e){this.LOGGER.entering(_b0d,arguments);}var _b0f={};if(_b0e){this.LOGGER.exiting(_b0d,itemSetsArr);}return _b0f;},readResources:function(_b10){var _b11="readResources";var _b12=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_b12){this.LOGGER.entering(_b11,arguments);}var _b13=[];if(_b12){this.LOGGER.exiting(_b11,itemSetsArr);}return _b13;},readEventDescriptions:function(_b14){var _b15="readEventDescriptions";var _b16=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_b16){this.LOGGER.entering(_b15,arguments);}var _b17={};if(_b16){this.LOGGER.exiting(_b15,itemSetsArr);}return _b17;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.parser.WidgetParserFactory"]){dojo._hasResource["com.ibm.mm.iwidget.parser.WidgetParserFactory"]=true;dojo.provide("com.ibm.mm.iwidget.parser.WidgetParserFactory");dojo.declare("com.ibm.mm.iwidget.parser.WidgetParserFactory",null,{getWidgetParser:function(_b18){var _b19=_b18.replace(/^\s+/,"").replace(/\s+$/,"");var _b1a=this._isXML(_b19);var _b1b=this._isLegacy(_b19);var _b1c=this._isOpenSocialGadget(_b19);if(_b1a&&_b1b&&!_b1c){return new com.ibm.mm.iwidget.parser.LegacyXMLParser(_b19);}else{if(_b1a&&!_b1b&&!_b1c){return new com.ibm.mm.iwidget.parser.StandardXMLParser(_b19);}else{if(_b1a&&_b1c){return new com.ibm.mm.iwidget.parser.OpenSocialXMLParser(_b19);}}}return null;},_isOpenSocialGadget:function(_b1d){var _b1e=true;var _b1f=_b1d.indexOf("");if(_b1f===-1){_b1e=false;}return _b1e;},_isXML:function(_b20){var _b21=true;var _b22=_b20.indexOf("=\"http://www.w3.org/1999/xhtml\"");if(_b22!=-1){_b21=false;}return _b21;},_isLegacy:function(_b23){var _b24=true;var _b25=_b23.indexOf("=\"http://www.ibm.com/xmlns/prod/iWidget\"");if(_b25!=-1){_b24=false;}return _b24;}});com.ibm.mm.iwidget.parser.WidgetParserFactory=new com.ibm.mm.iwidget.parser.WidgetParserFactory();}if(!dojo._hasResource["com.ibm.mm.iwidget.services.WidgetLoadServiceImpl"]){dojo._hasResource["com.ibm.mm.iwidget.services.WidgetLoadServiceImpl"]=true;dojo.provide("com.ibm.mm.iwidget.services.WidgetLoadServiceImpl");dojo.provide("com.ibm.mm.iwidget.services.WidgetLoadServiceImpl");dojo.declare("com.ibm.mm.iwidget.services.WidgetLoadServiceImpl",null,{constructor:function(){this.widgetDef={};this.LOADING_TOKEN="LOADING_TOKEN";this.LOADING_ERROR_TOKEN="LOADING_ERROR_TOKEN";this.waitingqueue={};this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},getWidgetXML:function(_b26,sync,_b27,_b28){if(ibmConfig.dojotest){sync=true;}var _b29=this.widgetDef[_b26];if(_b29&&_b29==this.LOADING_TOKEN){if(!this.waitingqueue[_b26]){this.waitingqueue[_b26]=[];}var _b2a={id:_b28,cb:_b27};this.waitingqueue[_b26].push(_b2a);return;}else{if(_b29&&_b29.error&&_b29.error==this.LOADING_ERROR_TOKEN){return this.handleCallback(_b27,_b29.data,_b29.status);}else{if(_b29){return this.handleCallback(_b27,_b29,"200");}}}this.widgetDef[_b26]=this.LOADING_TOKEN;var me=this;var _b2b=_b26;if((_b2b.indexOf("http")===0)||(_b2b.indexOf("https")===0)||(_b2b.indexOf("endpoint")===0)){_b2b=com.ibm.mm.enabler.utils.URLHelper.rewriteURL(_b2b);}var args={url:_b2b,ibmMultipart:{context:com.ibm.mashups.enabler.io.XHRMultipartFactory.CONTEXT_ENABLER},load:function(data,_b2c){var xhr=_b2c.xhr;_b2c["com.ibm.mm.Multipart.forceOnNextResponse"]=true;var _b2d=com.ibm.mm.iwidget.parser.WidgetParserFactory.getWidgetParser(xhr.responseText);var _b2e=_b2d.parseWidgetDefinition();me.widgetDef[_b26]=_b2e;me.handleCallback(_b27,_b2e,xhr.status,xhr);var _b2f=me.waitingqueue[_b26];if(_b2f){for(var i in _b2f){if(Object.prototype.hasOwnProperty.call(_b2f,i)){me.handleCallback(_b2f[i].cb,_b2e,xhr.status,xhr);}}me.waitingqueue[_b26]=null;}},error:function(data,_b30){var xhr=_b30.xhr;if(xhr.status==404){me.LOGGER.warning("getWidgetXML","Error loading widget xml. "+data.message);}me.widgetDef[_b26]={error:me.LOADING_ERROR_TOKEN,data:data,status:xhr.status};me.handleCallback(_b27,data,xhr.status,xhr);var _b31=me.waitingqueue[_b26];if(_b31){for(var i in _b31){if(Object.prototype.hasOwnProperty.call(_b31,i)){me.handleCallback(_b31[i].cb,data,xhr.status,xhr);}}me.waitingqueue[_b26]=null;}},handleAs:"text",sync:sync};dojo.xhrGet(args);return;},handleCallback:function(_b32,data,_b33,xhr){if(_b32){_b32(data,_b33,xhr);}}});com.ibm.mashups.services.ServiceManager.setService("widgetLoadService",new com.ibm.mm.iwidget.services.WidgetLoadServiceImpl());}if(!dojo._hasResource["com.ibm.mm.enabler.logging.LegacyLoggerStatus"]){dojo._hasResource["com.ibm.mm.enabler.logging.LegacyLoggerStatus"]=true;dojo.provide("com.ibm.mm.enabler.logging.LegacyLoggerStatus");dojo.declare("com.ibm.mm.enabler.logging.LegacyLoggerStatus.StatusType",null,{constructor:function(id,_b34,_b35,_b36,_b37){this._id=id;this._styleClass=_b34;this._iconPath=_b35;this._iconAlt=_b36;this._color=_b37;}});dojo.declare("com.ibm.mm.enabler.logging.LegacyLoggerStatus.StatusMessage",null,{constructor:function(type,_b38,_b39){this._type=type;this._message=_b38;this._details=_b39;},render:function(_b3a){var _b3b=com.ibm.mm.enabler.logging.LegacyLoggerStatus.statusTypesMap.getStatusType(this._type);var msg=[];msg[msg.length]="
";msg[msg.length]="
";msg[msg.length]="
";var _b3c=this._message;if(this._type==="error"){var _b3d=_b3c.split(":");var _b3e=_b3d.shift()+":";_b3c=_b3d.join(":");msg[msg.length]="
";msg[msg.length]=_b3e;msg[msg.length]="
";}msg[msg.length]="
";msg[msg.length]=_b3c;msg[msg.length]="
";if(this._details&&this._details.length>0){msg[msg.length]="
";msg[msg.length]=this._details;msg[msg.length]="
";}msg[msg.length]="
";_b3a.innerHTML=msg.join("");}});dojo.declare("com.ibm.mm.enabler.logging.LegacyLoggerStatus.StatusTypesMap",null,{constructor:function(){this._baseURL=dojo.moduleUrl("com.ibm.mm.enabler","image/");this.constants={"ERROR":"error","WARN":"warn","INFO":"info"};this.internalStatusTypeMap=null;},getStatusType:function(type){if(this.internalStatusTypeMap===null){var _b3f=dojo.i18n.getLocalization("com.ibm.mm.enabler","iwStr");this.internalStatusTypeMap={};this.internalStatusTypeMap.error=new com.ibm.mm.enabler.logging.LegacyLoggerStatus.StatusType(0,"error",this._baseURL+"error.gif",_b3f.ERROR,"#FF0000");this.internalStatusTypeMap.warn=new com.ibm.mm.enabler.logging.LegacyLoggerStatus.StatusType(1,"warning",this._baseURL+"warning.gif",_b3f.WARNING,"FFFF00");this.internalStatusTypeMap.info=new com.ibm.mm.enabler.logging.LegacyLoggerStatus.StatusType(2,"info",this._baseURL+"info.gif",_b3f.INFO,"#0077FF");}return this.internalStatusTypeMap[type];}});com.ibm.mm.enabler.logging.LegacyLoggerStatus.statusTypesMap=new com.ibm.mm.enabler.logging.LegacyLoggerStatus.StatusTypesMap();}if(!dojo._hasResource["com.ibm.mm.enabler.logging.LegacyLogger"]){dojo._hasResource["com.ibm.mm.enabler.logging.LegacyLogger"]=true;dojo.provide("com.ibm.mm.enabler.logging.LegacyLogger");com.ibm.mm.enabler.logging.LegacyLogger.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.logging.LegacyLogger");com.ibm.mm.enabler.logging.LegacyLogger.Constants={MMLogging:"/mm/logging",MMStatusMsg:"/mm/statusMsg",MMTracing:"/mm/tracing",LOG:"log",INFO:"info",WARN:"warn",ERROR:"error"};com.ibm.mm.enabler.logging.LegacyLogger.getObjectArryFromArguments=function(args){if(args.length==1){return null;}var _b40=[];for(var i=1;i/g,">");return _b47;};com.ibm.mm.enabler.logging.LegacyLogger.info=function(_b48){var _b49=com.ibm.mm.enabler.logging.LegacyLogger.getObjectArryFromArguments(arguments);var msg=com.ibm.mm.enabler.logging.LegacyLogger.LOGGER._getMessageString(_b49);com.ibm.mm.enabler.logging.LegacyLogger.LOGGER.info(_b48,msg);};com.ibm.mm.enabler.logging.LegacyLogger.warn=function(_b4a){var _b4b=com.ibm.mm.enabler.logging.LegacyLogger.getObjectArryFromArguments(arguments);var msg=com.ibm.mm.enabler.logging.LegacyLogger.LOGGER._getMessageString(_b4b);com.ibm.mm.enabler.logging.LegacyLogger.LOGGER.warning(_b4a,msg);};com.ibm.mm.enabler.logging.LegacyLogger.error=function(_b4c){var _b4d=com.ibm.mm.enabler.logging.LegacyLogger.getObjectArryFromArguments(arguments);var msg=com.ibm.mm.enabler.logging.LegacyLogger.LOGGER._getMessageString(_b4d);com.ibm.mm.enabler.logging.LegacyLogger.LOGGER.severe(_b4c,msg);};com.ibm.mm.enabler.logging.LegacyLogger._log=function(type,args){if(com.ibm.mm.enabler.logging.LegacyLogger.isLogging){if(args.length>=2&&dojo.isString(args[1])){var arr=[];arr.push(args[0]+args[1]);for(var i=2;i0){var _b78=_b77[0].getSourceWidgetID();_b76.removeWire(_b78);this.commit();_b77=_b76.getWires();}}var _b79=null;if(_b76){_b79=_b76.getTargets();}if(_b79){var _b7a=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel();for(var i in _b79){if(Object.prototype.hasOwnProperty.call(_b79,i)){var _b7b=_b7a.find(i);if(_b7b){var _b7c=_b7b.getIWidgetInstance().getWireModel();_b7c.removeWire(this.id);_b7b.commit();}}}}for(var i2 in this.subHandler){if(Object.prototype.hasOwnProperty.call(this.subHandler,i2)){for(var j in this.subHandler[i2]){if(Object.prototype.hasOwnProperty.call(this.subHandler[i2],j)){this.eventSvr.unsubscribeEvent(this.subHandler[i2][j]);}}}}this.eventSvr._getHubAdapter(this.id).removeIframeHubContainer(this.id);if(this.windowManager){this.windowManager=null;}},update2:function(span){return;},_getParent:function(){if(!this.parent){this.parent=com.ibm.mm.iwidget.Utils.getWidgetParent(this.rootElement);}this.parent=this.parent||null;return this.parent;},_setParent:function(_b7d){this.parent=_b7d;},_getPublishedEvents:function(){var _b7e=this.getWidgetPublishedEvents();var arr={};if(dojo.isArray(_b7e)){for(var i=0,l=_b7e.length;i ."+that.ns+"loading",that.rootElement).forEach(function(elem){com.ibm.mm.enabler.utils.Dom.destroyNode(elem);});dojo.query("."+that.currentMode,that.rootElement).style({"visibility":""});}});that.subHandler[id].push(_ba8);var _baa=that.eventSvr.subscribeEvent(com.ibm.mashups.iwidget.Constants.RESIZE_WIDGET+"."+that.id,that,"handleSizeChanged");that.subHandler[id].push(_baa);};if(_ba0.isLoaded()&&_b9f&&_b9f=="false"){_ba0.loaded=false;_ba0._getInstanceMarkup(eventCallbackContinue);}else{eventCallbackContinue(_b9e);}};var _bab=_ba0.eventSvr.subscribeEvent(_ba0.eventSvr.WIDGETEVENT_PREFIX+id+"."+"onFrameLoaded",null,eventCallback);_ba0.subHandler[id].push(_bab);var _bac=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var url=window.location.protocol;var host=window.location.hostname;var _bad=_bac.getValue(com.ibm.mashups.enabler.services.ConfigConstants.SERVERDOMAIN);if(_bad&&_bad!="null"){host=_bad;}var port=window.location.port;var path=window.location.pathname;var _bae=_bac.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTEXT_ROOT);var _baf=null;if(path.indexOf(_bae)>0){_baf=path.slice(0,path.indexOf(_bae));}if(_ba0._getSubDomain()){var _bb0=_ba0._getSubDomain()+"."+host;if(_bac.getValue("sandbox.disable.subdomains")){_bb0=host;}if(port!=""){url+="http://"+_bb0+":"+port;}else{url+="http://"+_bb0;}if(_baf){url+=_baf;}url+=_bac.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTEXT_ROOT_ENABLER);url+="/widgetsandbox";_ba0.eventSvr._getHubAdapter().createIframeHubContainer(id,root,url,_b9f,null,null,dojo.hitch(this,"_onSecurityAlert"));}else{var _bb1=_ba0.eventSvr._getHubAdapter().getSubDomainSize();var _bb2=unescape(_ba0.getIWidgetInstance().getIDescriptorItems().getItemValue("title",dojo.locale));if(!_bb2){_bb2=_ba0.getID();}var _bb3=_bac.getValue(com.ibm.mashups.enabler.services.ConfigConstants.SUBDOMAINREUSE);var fmt=_ba0.iwMessages.E_SUBDOMAIN_NOTAVAILABLE1_2;if(_bb3){fmt=_ba0.iwMessages.E_SUBDOMAIN_NOTAVAILABLE_2;}var _bb4=dojo.string.substitute(fmt,[_bb2,_bb1]);var _bb5=[];com.ibm.mm.iwidget.Utils.findElementByAttribute("query","> ."+_ba0.ns+"loading",_ba0.rootElement,_bb5,false);if(_bb5.length>0){aNode=_bb5[0];aNode.innerHTML="";com.ibm.mm.enabler.logging.LegacyLogger.logInlineMessage(aNode,"error",_bb4);}}},_onSecurityAlert:function(_bb6,_bb7){if(_bb7&&_bb7=="OpenAjax.hub.SecurityAlert.FramePhish"){var me=this;setTimeout(function(){me._handleIframeMove(_bb6);},0);}else{this.LOGGER.trace("_onSecurityAlert","securityAlert:"+_bb7);}},_handleIframeMove:function(_bb8){this.eventSvr._getHubAdapter(this.id).returnSubDomain(this._getSubDomain());var _bb9=this.windowManager[this.currentMode];var id=_bb9.id;var root=_bb9.root||null;if(root===null){var _bba=this._getDefaultMode()||iwConstants.mode_view;var _bbb=this.windowManager[_bba]||null;if(_bbb!==null){root=_bbb.root||null;}}try{for(var j in this.subHandler[id]){if(Object.prototype.hasOwnProperty.call(this.subHandler[id],j)){this.eventSvr.unsubscribeEvent(this.subHandler[id][j]);}}}catch(e){this.LOGGER.trace("_handleIframeMove","FramePHishing"+" error:"+e.message);}this.eventSvr._getHubAdapter(id).removeIframeHubContainer(id);this._getInstanceMarkup(dojo.hitch(this,function(_bbc){this._createIframe(_bbc,root,id,"false",this);}));},_getSubDomain:function(){if(!this.subDomain){this.subDomain=this.eventSvr._getHubAdapter().getSubDomain();}return this.subDomain;},_handleDataSync:function(_bbd){if(_bbd&&_bbd.attributes){var _bbe=_bbd.attributes;this._syncModifiableProperties(_bbe,this.getIWidgetInstance().getAttributes());this._syncAttributes(_bbe,this.getAttributes());}if(_bbd&&_bbd.wiremodel){var _bbf=_bbd.wiremodel;this._syncWireModel(_bbf,this.getIWidgetInstance().getWireModel());}this.commit(true);},_syncWireModel:function(_bc0,_bc1){var _bc2=_bc0._wires;for(var i in _bc2){if(Object.prototype.hasOwnProperty.call(_bc2,i)){var _bc3=_bc2[i];if(_bc3._isDirty&&_bc3._type&&_bc3._type=="NEW"){_bc1.addWire(_bc3.SourceWidget,_bc3.SourceEvent,_bc3.TargetEvent);}else{if(_bc3._isDirty&&_bc3._type&&_bc3._type=="DELETE"){_bc1.removeWire(_bc3.SourceWidget,_bc3.SourceEvent,_bc3.TargetEvent);}}}}var _bc4=_bc0._targets;_bc1._targets=_bc4;},_syncModifiableProperties:function(_bc5,_bc6){_bc6._updateProperties(_bc5);},_syncAttributes:function(_bc7,_bc8){var _bc9="newItem";var _bca="updatedValue";var _bcb="removedItem";for(var att in _bc7){if(Object.prototype.hasOwnProperty.call(_bc7,att)){var item=_bc7[att];if(item._dirty){if(item._change.changeType==_bcb){_bc8.removeItem(item.id);}else{_bc8.setItemValue(item.id,item.value,item.readOnly);}}}}_bc8.commit();},handleSizeChanged:function(_bcc){var _bcd=this.windowManager[this.currentMode];var id=this.id;if(!_bcd.main){id=this.id+"_"+this.currentMode;}var root=_bcd.root;var _bce=root.childNodes[0];if(_bcc.newWidth){var _bcf=parseInt(_bcc.newWidth,10);_bcf=_bcf-5;dojo.style(_bce,"width",_bcf+"px");}if(_bcc.newHeight){var _bd0=parseInt(_bcc.newHeight,10);_bd0=_bd0-5;dojo.style(_bce,"height",_bd0+"px");}this.eventSvr._publishEvent(com.ibm.mashups.iwidget.Constants.RESIZE_WIDGET+id,_bcc);},getCSSUrl:function(){var that=this;if(this.themeCSS){return this.themeCSS;}dojo.forEach(document.getElementsByTagName("link"),function(_bd1){if(_bd1.href&&_bd1.href.indexOf("theme.css")!=-1){var _bd2=_bd1.href.length-9;if(_bd1.href.indexOf("theme.css")==_bd2){that.themeCSS=_bd1.href;}}else{if(_bd1.href&&_bd1.href.indexOf("theme_rtl.css")!=-1){var _bd3=_bd1.href.length-13;if(_bd1.href.indexOf("theme_rtl.css")==_bd3){that.themeCSS=_bd1.href;}}}});return this.themeCSS;},_handleOnNavStateChanged:function(_bd4){var _bd5=_bd4.payload;if(_bd5){var _bd6=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _bd7=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(_bd6,this.id);_bd7.setWidgetState("cp",_bd5);var _bd8=_bd6.commit();_bd8.start();}}});}if(!dojo._hasResource["com.ibm.mm.iwidget.RenderController"]){dojo._hasResource["com.ibm.mm.iwidget.RenderController"]=true;dojo.provide("com.ibm.mm.iwidget.RenderController");dojo.declare("com.ibm.mm.iwidget.RenderController",null,{constructor:function(_bd9){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.widgetwrapper=_bd9;this.widgetXMLUrl=this.widgetwrapper.getIWidgetInstance().widgetXMLUrl;this.iwStr=dojo.i18n.getLocalization("com.ibm.mm.enabler","iwStr");this.iwMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","iwMessages");},render:function(){this._loadWidgetDefinition();},_resourceBaseURL:dojo.moduleUrl("com.ibm.mm.iwidget","image/"),_setLoading:function(){var _bda=document.createElement("div");_bda.className=this.widgetwrapper.ns+"loading";if(ibmConfig&&ibmConfig.loadingHTML){_bda.innerHTML=ibmConfig.loadingHTML;}else{if(ibmConfig&&ibmConfig["loadingHTML.imageURL"]){_bda.innerHTML=""+this.iwStr.LOAD+" "+this.iwStr.LOAD;}else{_bda.innerHTML=""+this.iwStr.LOAD+" "+this.iwStr.LOAD;}}this.widgetwrapper.rootElement.appendChild(_bda);},_loadWidgetDefinition:function(){var _bdb="_loadWidgetDefinition";var _bdc=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_bdc){this.LOGGER.entering(_bdb,arguments);}var _bdd=this.widgetwrapper.rootElement;if(this.widgetwrapper.loaded){return false;}this._setLoading();if(this.widgetXMLUrl!==null){var _bde=com.ibm.mashups.services.ServiceManager.getService("widgetLoadService");_bde.getWidgetXML(this.widgetXMLUrl,false,dojo.hitch(this,"handleWidgetInfoRetrieved"),this.widgetwrapper.id);}else{return false;}if(_bdc){this.LOGGER.exiting(_bdb,true);}return true;},handleWidgetInfoRetrieved:function(data,_bdf,xhr){var _be0="handleWidgetInfoRetrieved";var _be1=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_be1){this.LOGGER.entering(_be0,arguments);}var _be2;if(_bdf=="200"||_bdf=="0"){this.widgetwrapper.setIWidgetDefinition(data);this.widgetDef=data;}else{if(!this._isWidgetInstalled()){this._handleInlineWidgetNotInstalledMessage(this.iwStr.WIDGET_NOT_INSTALLED,this.iwStr.WIDGET_NOT_INSTALLED_SUB,data.message);}else{_be2=unescape(this.widgetwrapper.getIWidgetInstance().getIDescriptorItems().getItemValue("title",dojo.locale));if(!_be2){_be2=this.widgetXMLUrl;}this._handleInlineMessage("error",dojo.string.substitute(this.iwMessages.E_IWIDGETDEF_NOTAVAILABLE_1,[_be2]),data.message);}return;}var _be3=this.isSandboxed();if(dojo.isIE<7&&_be3){_be2=unescape(this.widgetwrapper.getIWidgetInstance().getIDescriptorItems().getItemValue("title",dojo.locale));if(!_be2){_be2=this.widgetXMLUrl;}this._handleInlineMessage("error",dojo.string.substitute(this.iwMessages.E_NODISPLAY_UNSECUREWIDGET_1,[_be2]));return;}this._doRender(_be3);if(_be1){this.LOGGER.exiting(_be0);}},_isWidgetInstalled:function(){try{var _be4=com.ibm.mashups.enabler.catalog.Factory.getCatalogCategoryModel();_be4.setStrategy(new com.ibm.mashups.enabler.strategy.ListLoadAheadStrategy(25));var _be5=null;var _be6=null;var _be7=_be4.getRoot().start();var _be8=_be4.getChildren(_be7);while(_be8.hasNext()){var _be9=_be8.next();_be5=_be4.getCatalogEntryModel(_be9);var _bea=_be5.iterator();_bea.setCursorPosition(0);while(_bea.hasNext()){var _beb=_bea.next();var _bec=decodeURIComponent(this.widgetXMLUrl);if(_bec.indexOf(_beb.getDefinitionURL(false))>=0){return true;}}}}catch(e){return true;}return false;},isSandboxed:function(){var _bed=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _bee=_bed.getValue(com.ibm.mashups.enabler.services.ConfigConstants.SANDBOXENABLED);if(!_bee){return false;}var _bef=document.location+"";_bee=false;var _bf0=this.widgetDef.getAttributes()||null;if(_bf0){var _bf1=_bf0.getItemValue("sandbox");if(typeof _bf1!="undefined"&&_bf1!==null){if(_bf1=="true"){_bee=true;}}}if(!_bee){if(this.widgetwrapper.rootElement.getAttribute("sandbox")!==null&&this.widgetwrapper.rootElement.getAttribute("sandbox")=="true"){_bee=true;}}if(!_bee){if(this.widgetwrapper.rootElement.className.indexOf(iwConstants.CSSCLASS_INSTANCE.iwSandbox)>0){_bee=true;}}if(_bee){if(this._isSandboxDisabledWidget(this.widgetXMLUrl)){_bee=false;}}return _bee;},_isSandboxDisabledWidget:function(_bf2){var _bf3=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var temp=_bf3.getValue(com.ibm.mashups.enabler.services.ConfigConstants.WIDGETDEFID_SANDBOX_DISABLED);var _bf4=temp;if(dojo.isString(_bf4)){_bf4=[temp];}if(_bf4.length===0){return false;}for(var i=0;i<_bf4.length;i++){if(dojo.string.trim(_bf2)===dojo.string.trim(_bf4[i])){return true;}else{if(dojo.string.trim(_bf2).indexOf(dojo.string.trim(_bf4[i]))!=-1&&dojo.string.trim(_bf4[i]).indexOf("/")!==0){return true;}else{if(dojo.string.trim(_bf2).indexOf(dojo.string.trim(_bf4[i]))!=-1&&dojo.string.trim(_bf4[i]).indexOf("/")===0&&dojo.string.trim(_bf2).indexOf(":")!=-1){var buf=_bf2.split("http://");var _bf5=buf[0];var buf2=buf[1].split("/");var host=buf2[0];if(_bf5==window.location.protocol&&window.location.host==host){return true;}else{if(_bf5==window.location.protocol&&_bf5=="http:"&&host.indexOf(window.location.host)===0){if(host.substr(host.indexOf(":")+1)=="80"){return true;}}else{if(_bf5==window.location.protocol&&_bf5=="https:"&&host.indexOf(window.location.host)===0){if(host.substr(host.indexOf(":")+1)=="443"){return true;}}}}}}}}return false;},_handleInlineMessage:function(type,_bf6,_bf7){var _bf8=[];com.ibm.mm.iwidget.Utils.findElementByAttribute("query","> ."+this.widgetwrapper.ns+"loading",this.widgetwrapper.rootElement,_bf8,false);var _bf9=_bf8[0];_bf9.innerHTML="";com.ibm.mm.enabler.logging.LegacyLogger.logInlineMessage(_bf9,type,_bf6,_bf7);},_handleInlineWidgetNotInstalledMessage:function(_bfa,_bfb,_bfc){var _bfd=[];com.ibm.mm.iwidget.Utils.findElementByAttribute("query","> ."+this.widgetwrapper.ns+"loading",this.widgetwrapper.rootElement,_bfd,false);var _bfe=_bfd[0];var msg=[];msg[msg.length]="
";msg[msg.length]="
";msg[msg.length]="
";msg[msg.length]="
";msg[msg.length]=_bfa;msg[msg.length]="
";if(_bfb&&_bfb.length>0){msg[msg.length]="
";msg[msg.length]=_bfb;msg[msg.length]="
";}msg[msg.length]="
";_bfe.innerHTML=msg.join("");com.ibm.mm.enabler.logging.LegacyLogger._publishStatusMsg("info",_bfa,_bfc);},_doRender:function(_bff){var _c00=com.ibm.mashups.services.ServiceManager.getService("eventService");if(_bff){dojo.mixin(this.widgetwrapper,new com.ibm.mm.iwidget.widget.IWidgetWrapperStubImpl());}else{_c00._getHubAdapter().createInlineHubContainer(this.widgetwrapper.id);_c00._getHubAdapter().createInlineHubClient(this.widgetwrapper.id);}this.widgetwrapper.doRender();}});}if(!dojo._hasResource["com.ibm.mm.iwidget.model.WidgetModelExtended"]){dojo._hasResource["com.ibm.mm.iwidget.model.WidgetModelExtended"]=true;dojo.provide("com.ibm.mm.iwidget.model.WidgetModelExtended");dojo.declare("com.ibm.mm.iwidget.model.WidgetModelExtendedImpl",com.ibm.mm.iwidget.model.WidgetModelDefaultImpl,{_onWindowUnload:function(){var _c01=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();if(_c01){var _c02=com.ibm.mashups.enabler.model.state.AccessorFactory.getPageModeAccessor(_c01);_c02.setPageMode("unload");}try{var arr=[];for(var i in this.widgetArr){if(Object.prototype.hasOwnProperty.call(this.widgetArr,i)){this._unloadWidget(i);}}}catch(e){console.log("_onWindowUnload "+e.message);}},renderWidget:function(_c03){if(typeof _c03=="undefined"){return;}if(_c03.loaded||_c03.loading){return;}_c03.loading=true;var _c04=new com.ibm.mm.iwidget.RenderController(_c03);_c04.render();},getWidgetById:function(id){return this.find(id);}});com.ibm.mm.iwidget.model.WidgetModelImpl=com.ibm.mm.iwidget.model.WidgetModelExtendedImpl;}if(!dojo._hasResource["com.ibm.mm.iwidget.services.EventServiceExtended"]){dojo._hasResource["com.ibm.mm.iwidget.services.EventServiceExtended"]=true;dojo.provide("com.ibm.mm.iwidget.services.EventServiceExtended");dojo.declare("com.ibm.mm.iwidget.services.EventServiceExtendedImpl",com.ibm.mm.iwidget.services.EventServiceDefaultImpl,{registerExtServices:function(){var _c05=com.ibm.mashups.iwidget.Constants.WIDGET_WINDOWSTATECHANGED;var me=this;var _c06=function(_c07){var _c08=_c07.id;var _c09=_c07.newWindowState;var _c0a=_c07.oldWindowState;me.fireEvent(_c08,"onWindowStateChanged",{newWindowState:_c09,oldWindowState:_c0a});};this.subscribeEvent(_c05,null,_c06,null,null);},subscribeWire:function(_c0b,_c0c,_c0d,_c0e){if(this.bIsLoggable){this.LOGGER.entering("eventService.subscribeWire",[_c0b,_c0c,_c0d,_c0e]);}if(typeof _c0b=="undefined"||_c0b===null){return false;}if(typeof _c0c=="undefined"||_c0c===null){return false;}if(typeof _c0d=="undefined"||_c0d===null){return false;}if(typeof _c0e=="undefined"||_c0e===null){return false;}var rc=true;var that=this;function eventCallback(_c0f,_c10,_c11){that.fireEvent(_c0d,_c0e,_c10.payload,_c10.payloadType,_c0b);};function callback(item,_c12,_c13){if(!_c12){console.log("eventService.subscribeWire subscribe failed "+"source:"+_c0b+" sourceEvent:"+_c0c+" targetWidget:"+_c0d+" targetEvent:"+_c0e);}};var _c14;var _c15=this.hubAdapter._getInlineHubClient(_c0d);if(_c15){var _c16=this._generateWireId(_c0b,_c0c,_c0d,_c0e);if(this.subMgr[_c16]){return true;}var _c17=_c15.subscribe(this.WIDGETEVENT_PREFIX+_c0b+"."+_c0c,eventCallback,null,callback);this.subMgr[_c16]=_c17;_c14={};_c14.targetWidget=_c0d;_c14.sourceEvent=_c0c;_c14.sourceWidget=_c0b;_c14.targetEvent=_c0e;this.fireEvent(_c0b,"onNewWire",_c14);}var _c18=this.hubAdapter.isInlineClient(_c0d);if(!_c18){var _c19="eventservice."+_c0d;_c14={};_c14.methodname="subscribeWire";_c14.sourceWidget=_c0b;_c14.sourceEvent=_c0c;_c14.targetWidget=_c0d;_c14.targetEvent=_c0e;_c14.hubclient="main";this._publishEvent(_c19,_c14);rc=true;}return rc;},publishWire:function(_c1a,_c1b,_c1c,_c1d){_c1c=this._serializePayload(_c1c);if(this.bIsLoggable){this.LOGGER.entering("eventService.publishWire",[_c1a,_c1b,_c1c,_c1d]);}if(typeof _c1a=="undefined"||_c1a===null){return false;}if(typeof _c1b=="undefined"||_c1b===null){return false;}var _c1e=this.hubAdapter._getInlineHubClient(_c1a);if(_c1e){_c1e.publish(this.WIDGETEVENT_PREFIX+_c1a+"."+_c1b,{"payload":_c1c,"payloadType":_c1d});}return true;},_serializePayload:function(_c1f){if(typeof _c1f=="object"&&_c1f.toJson){_c1f=_c1f.toJson();}return _c1f;},unSubscribeWire:function(_c20,_c21,_c22,_c23){if(typeof _c20=="undefined"||_c20===null){return false;}if(typeof _c21=="undefined"||_c21===null){return false;}if(typeof _c22=="undefined"||_c22===null){return false;}if(typeof _c23=="undefined"||_c23===null){return false;}var _c24;var _c25=this.hubAdapter._getInlineHubClient(_c22);if(_c25){var _c26=this._generateWireId(_c20,_c21,_c22,_c23);var _c27=this.subMgr[_c26];if(_c27){this.unsubscribeEvent(_c27,_c22);delete this.subMgr[_c26];}_c24={};_c24.targetWidget=_c22;_c24.targetEvent=_c23;_c24.sourceWidget=_c20;_c24.sourceEvent=_c21;this.fireEvent(_c22,"onRemoveWire",_c24);this.fireEvent(_c20,"onRemoveWire",_c24);this.publishEvent(iwConstants.EVENTS.unSubscribeWire,{wires:[_c24]});}var _c28=this.hubAdapter.isInlineClient(_c22);if(!_c28){var _c29="eventservice."+_c22;_c24={};_c24.methodname="unSubscribeWire";_c24.sourceWidget=_c20;_c24.sourceEvent=_c21;_c24.targetWidget=_c22;_c24.targetEvent=_c23;_c24.hubclient="main";this._publishEvent(_c29,_c24);rc=true;}return true;},addWire:function(_c2a,_c2b,_c2c,_c2d){if(this.bIsLoggable){this.LOGGER.entering("eventService.addWire",[_c2a,_c2b,_c2c,_c2d]);}if(typeof _c2a=="undefined"||_c2a===null){return false;}if(typeof _c2b=="undefined"||_c2b===null){return false;}if(typeof _c2c=="undefined"||_c2c===null){return false;}if(typeof _c2d=="undefined"||_c2d===null){return false;}var rc=false;var _c2e=this.hubAdapter.isInlineClient(_c2c);if(!_c2e){var _c2f="eventservice."+_c2c;var _c30={};_c30.methodname="addWire";_c30.params=arguments;_c30.hubclient="main";this._publishEvent(event,_c30);rc=true;}else{rc=this.subscribeWire(_c2a,_c2b,_c2c,_c2d);if(rc){var _c31=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().getWidgetById(_c2c);if(typeof _c31!="undefined"&&_c31!==null){var _c32={};_c32.SourceWidget=_c2a;_c32.SourceEvent=_c2b;_c32.TargetEvent=_c2d;var _c33=_c31.getIWidgetInstance();var _c34=new com.ibm.mm.iwidget.widget.WireImpl(_c2c,_c32);_c33._addWire(_c34);}}}return rc;},removeWire:function(_c35,_c36,_c37,_c38){if(this.bIsLoggable){this.LOGGER.entering("eventService.removeWire",[_c35,_c36,_c37,_c38]);}if(typeof _c35=="undefined"||_c35===null){return false;}if(typeof _c36=="undefined"||_c36===null){return false;}if(typeof _c37=="undefined"||_c37===null){return false;}if(typeof _c38=="undefined"||_c38===null){return false;}var rc=false;var _c39=this.hubAdapter.isInlineClient(_c37);if(!_c39){var _c3a="eventservice."+_c37;var _c3b={};_c3b.methodname="removeWire";_c3b.params=arguments;_c3b.hubclient="main";this._publishEvent(event,_c3b);rc=true;}else{rc=this.unSubscribeWire(_c35,_c36,_c37,_c38);if(rc){var _c3c=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().getWidgetById(_c37);if(typeof _c3c!="undefined"&&_c3c!==null){var _c3d={};_c3d.SourceWidget=_c35;_c3d.SourceEvent=_c36;_c3d.TargetEvent=_c38;var _c3e=_c3c.getIWidgetInstance();var _c3f=new com.ibm.mm.iwidget.widget.WireImpl(_c37,_c3d);_c3e._removeWire(_c3f.getID());}}}return rc;}});if(!ibmConfig.insideSandbox){com.ibm.mashups.services.ServiceManager.setService("eventService","com.ibm.mm.iwidget.services.EventServiceExtendedImpl");}if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"CoreModel")>=0)){dojo["require"]("com.ibm.mm.enabler.iwidget.services.EventServiceModel");}}if(!dojo._hasResource["com.ibm.mm.iwidget.services.IFrameEventServiceImpl"]){dojo._hasResource["com.ibm.mm.iwidget.services.IFrameEventServiceImpl"]=true;dojo.provide("com.ibm.mm.iwidget.services.IFrameEventServiceImpl");dojo.declare("com.ibm.mm.iwidget.services.IFrameEventServiceImpl",com.ibm.mashups.iwidget.services.EventService,{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.subMgr={};this.eventQueue=[];this._hubClient=null;this.getHubClient();this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},getType:function(){return com.ibm.mm.iwidget.Constants.eventservice.type.IFRAME;},PREFIX_IFRAME:"_iframe_",getHubClient:function(){if(this._hubClient){return this._hubClient;}var that=this;function onHubClientSecurityAlert(_c40,_c41){if(that.bIsLoggable){that.LOGGER.trace("onHubClientSecurityAlert","security alert from "+_c40.getClientID());}};var _c42=new OpenAjax.hub.IframeHubClient({HubClient:{onSecurityAlert:onHubClientSecurityAlert}});function onHubClientConnect2(_c43,_c44,_c45){if(!_c44){if(that.bIsLoggable){that.LOGGER.trace("onHubClientConnect2","!! client connection error = id: '"+_c43.getClientID()+"' msg: '"+_c45);}}var id=_c43.getClientID();id=id.slice(8);that.setId(id);that._hubClient=_c43;that._subscribeEventService();for(var i in that.eventQueue){if(Object.prototype.hasOwnProperty.call(that.eventQueue,i)){var args=that.eventQueue[i];args[0]="widgetevents."+id+args[0];that._subscribeEvent.apply(that,args);}}};function onHubClientDisconnect(_c46,_c47,_c48){if(!_c47){if(that.bIsLoggable){that.LOGGER.trace("onHubClientDisconnect2","!! client disconnection error = id: '"+_c46.getClientID()+"' msg: '"+_c48);}}_c46.connect(onHubClientConnect2);};_c42.connect(onHubClientConnect2);return null;},disconnectHubClient:function(){if(!this._hubClient){return;}this._hubClient.disconnect();this._hubClient=null;},setId:function(id){this.id=id;},getId:function(){return this.id;},_subscribeEventService:function(){var that=this;function eventCallback(_c49,_c4a,_c4b){var _c4c=_c4a.methodname;if((_c4c=="subscribeWire")||(_c4c=="unSubscribeWire")){var fn=that[_c4a.methodname];if(fn){fn.apply(that,[_c4a.sourceWidget,_c4a.sourceEvent,_c4a.targetWidget,_c4a.targetEvent]);}}else{if(_c4c){var fn=that[_c4a.methodname];if(fn){fn.apply(that,_c4a.params);}}}};this._hubClient.subscribe("eventservice."+this.getId(),eventCallback,this,this._subscribeCallback);},_subscribeCallback:function(_c4d,_c4e,_c4f){if(!_c4e){}},WIDGETEVENT_PREFIX:iwConstants.WIDGETEVENT_PREFIX,WILDCARD_PREFIX:iwConstants.WILDCARD_PREFIX,subscribeWire:function(_c50,_c51,_c52,_c53){var _c54="subscribeWire";var _c55=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_c55){this.LOGGER.entering(_c54,arguments);}if(typeof _c50=="undefined"||_c50===null){return false;}if(typeof _c51=="undefined"||_c51===null){return false;}if(typeof _c52=="undefined"||_c52===null){return false;}if(typeof _c53=="undefined"||_c53===null){return false;}var rc=true;var that=this;function eventCallback(_c56,_c57,_c58){that.fireEvent(_c52,_c53,_c57.payload,_c57.payloadType,_c50);};function callback(item,_c59,_c5a){if(!_c59){if(that.bIsLoggable){that.LOGGER.trace("subscribeWire","eventService.subscribeWire subscribe failed "+"source:"+_c50+" sourceEvent:"+_c51+" targetWidget:"+_c52+" targetEvent:"+_c53);}}};var _c5b=this._hubClient.subscribe(this.WIDGETEVENT_PREFIX+_c50+"."+_c51,eventCallback,null,callback);var _c5c=this._generateWireId(_c50,_c51,_c52,_c53);this.subMgr[_c5c]=_c5b;var _c5d={};_c5d.targetWidget=_c52;_c5d.sourceEvent=_c51;_c5d.sourceWidget=_c50;_c5d.targetEvent=_c53;this.fireEvent(_c50,"onNewWire",_c5d);return rc;},publishWire:function(_c5e,_c5f,_c60,_c61){_c60=this._serializePayload(_c60);if(typeof _c5e=="undefined"||_c5e===null){return false;}if(typeof _c5f=="undefined"||_c5f===null){return false;}this._hubClient.publish(this.WIDGETEVENT_PREFIX+_c5e+"."+_c5f,{"payload":_c60,"payloadType":_c61});return true;},_serializePayload:function(_c62){if(typeof _c62=="object"&&_c62.toJson){_c62=_c62.toJson();}return _c62;},unSubscribeWire:function(_c63,_c64,_c65,_c66){if(typeof _c63=="undefined"||_c63===null){return false;}if(typeof _c64=="undefined"||_c64===null){return false;}if(typeof _c65=="undefined"||_c65===null){return false;}if(typeof _c66=="undefined"||_c66===null){return false;}var _c67=this._generateWireId(_c63,_c64,_c65,_c66);var _c68=this.subMgr[_c67];if(_c68){this._unsubscribeEvent(_c68,_c66);delete this.subMgr[_c67];}var _c69={};_c69.targetWidget=_c65;_c69.targetEvent=_c66;_c69.sourceWidget=_c63;_c69.sourceEvent=_c64;this.fireEvent(_c65,"onRemoveWire",_c69);this.fireEvent(_c63,"onRemoveWire",_c69);this._publishEvent(iwConstants.EVENTS.unSubscribeWire,{wires:[_c69]});},fireEvent:function(_c6a,_c6b,_c6c,_c6d,_c6e){var _c6f=new com.ibm.mm.iwidget.IEventImpl(_c6b,_c6d,_c6c,_c6e);var _c70=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel();var _c71=_c70.find(_c6a);if(typeof _c71!="undefined"&&_c71!==null){if(_c71.isLoaded()){_c71.handleEvent(_c6f);}else{var _c72=dojox.uuid.generateRandomUuid();var cb=function(_c73,_c74,_c75){_c74.handleEvent(_c75);var _c76=_c73.subMgr[_c72];if(_c76){_c73._unsubscribeEvent(_c76);}};var _c77=this._subscribeEvent(com.ibm.mashups.iwidget.Constants.WIDGET_LOADED+"."+_c71.id,null,dojo.partial(cb,this,_c71,_c6f));this.subMgr[_c72]=_c77;}}else{var _c78={};_c78.methodname="fireEvent";_c78.hubclient=this.getId();_c78.params=[_c6a,_c6b,_c6c,_c6d];this._publishEvent("eventservice.main",_c78);}},publishEvent:function(_c79,_c7a,_c7b,_c7c){return;},_publishEvent:function(_c7d,_c7e,_c7f){if(typeof _c7e=="undefined"||_c7e===null){this._hubClient.publish(_c7d,"");}else{this._hubClient.publish(_c7d,_c7e);}},broadcastEvent:function(_c80,_c81,_c82,_c83,_c84,_c85){return;},broadcastEvents:function(_c86,_c87,_c88,_c89){return;},_handleBroadcastEventsCache:function(){var _c8a={};_c8a.methodname="_handleBroadcastEventsCache";_c8a.hubclient=this.getId();_c8a.params=[];this._publishEvent("eventservice.main",_c8a);},subscribeEvent:function(_c8b,_c8c,_c8d,_c8e,_c8f){return;},_subscribeEvent:function(_c90,_c91,_c92,_c93,_c94){if(!this._hubClient){this.eventQueue.push(arguments);return;}var _c95=this._hubClient.subscribe(_c90,function(_c96,data,_c97){if(_c91&&_c92){_c92=dojo.hitch(_c91,_c92);}if(_c92){_c92.apply(this,[data]);}},null,function(_c98,_c99,_c9a){if(_c91&&_c93){_c93=dojo.hitch(_c91,_c93);}if(_c93){_c93.apply(this,[_c98,_c99,_c9a]);}if(!_c99){return;}});return _c95;},_unsubscribeEvent:function(_c9b,_c9c){if(!_c9b){return;}this._hubClient.unsubscribe(_c9b);},unsubscribeEvent:function(_c9d,_c9e){return;},_generateWireId:function(_c9f,_ca0,_ca1,_ca2){return _c9f+"_"+_ca0+"_"+_ca1+"_"+_ca2;}});if(ibmConfig.insideSandbox){com.ibm.mashups.services.ServiceManager.setService("eventService","com.ibm.mm.iwidget.services.IFrameEventServiceImpl");}}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetDefinitionExtendedImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetDefinitionExtendedImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.IWidgetDefinitionExtendedImpl");dojo.declare("com.ibm.mm.iwidget.widget.IWidgetDefinitionExtendedImpl",com.ibm.mm.iwidget.widget.IWidgetDefinitionDefaultImpl,{getResources:function(){if(!this.resources){this.resources=dojo.map(this.widgetDef.resources,function(_ca3){return new com.ibm.mm.iwidget.widget.ResourceImpl(_ca3);});}return this.resources;},getPublishedEventsNames:function(){var _ca4=[];if(this.widgetDef.publicEvents){com.ibm.mm.enabler.utils.Misc.forIn(this.widgetDef.publicEvents,function(temp,_ca5){if(!temp.isPublished||(temp.isPublished&&temp.isPublished=="true")){_ca4.push(_ca5);}});}return _ca4;},getHandledEventsNames:function(){var _ca6=[];if(this.widgetDef.publicEvents){com.ibm.mm.enabler.utils.Misc.forIn(this.widgetDef.publicEvents,function(temp,_ca7){if(temp.onEvent){_ca6.push(_ca7);}});}return _ca6;},getPublishedEvent:function(_ca8){if(!this.widgetDef.publicEvents){return null;}var _ca9=this.getPublicEvent(_ca8)||null;if(_ca9){if(!_ca9.isPublished||(_ca9.isPublished&&_ca9.isPublished=="false")){_ca9=null;}}return _ca9;},getHandledEvent:function(_caa){if(!this.widgetDef.publicEvents){return null;}var _cab=this.getPublicEvent(_caa)||null;if(_cab){if(!_cab.onEvent){_cab=null;}}return _cab;},getPublicEvent:function(_cac){if(!this.widgetDef.publicEvents){return null;}if(this.eventsCache&&this.eventsCache[_cac]){return new com.ibm.mm.iwidget.IEventDescriptionImpl(this.eventsCache[_cac]);}var data=this.widgetDef.publicEvents[_cac];var _cad=null;var obj={};if(data){obj.name=data.id;if(data.onEvent){obj.handlingFn=data.onEvent;obj.isHandled=true;}else{obj.isHandled=false;}obj.isPublished=!!data.isPublished;obj.attributes={};obj.localizedAttributes={};var _cae=null;com.ibm.mm.enabler.utils.Misc.forIn(data,function(d,i){if(i=="description"){_cae=d;}else{if(i!="id"&&i!="onEvent"){obj.attributes[i]=d;}}});var _caf=null;if(_cae){_caf=this._getEventDescription(_cae)||null;if(_caf){var _cb0=_caf.lang;if(!_cb0){_cb0=this.getDefaultLanguage();if(!_cb0){_cb0="en";}}obj.lang=_cb0;if(_caf.payloadType){obj.type=_caf.payloadType;}if(_caf.aliases){obj.attributes.aliases=_caf.aliases;}var _cb1=_caf.descriptions;if(_cb1){obj.localizedAttributes=_caf.descriptions;}if(typeof (obj.localizedAttributes[_cb0])=="undefined"){obj.localizedAttributes[_cb0]={};}if(_caf.title){obj.localizedAttributes[_cb0].title=_caf.title;}if(_caf.description){obj.localizedAttributes[_cb0].description=_caf.description;}if(_caf.descriptionURI){obj.localizedAttributes[_cb0].descriptionURI=_caf.descriptionURI;}}}if(!this.eventsCache){this.eventsCache={};}this.eventsCache[_cac]=obj;_cad=new com.ibm.mm.iwidget.IEventDescriptionImpl(obj);}return _cad;},_getEventDescription:function(id){var _cb2=null;if(this.widgetDef.eventDescriptions){_cb2=this.widgetDef.eventDescriptions[id];}return _cb2;},_getPublicEvents:function(){var _cb3={};com.ibm.mm.enabler.utils.Misc.forIn(this.widgetDef.publicEvents,function(k,_cb4){var _cb5=this.getPublicEvent(_cb4)||null;if(_cb5){_cb3[_cb4]=_cb5;}},this);return _cb3;},getWidgetPublishedEvents:function(){return this.getPublishedEvents();},getWidgetHandledEvents:function(){return this.getHandledEvents();},getPublishedEvents:function(){var _cb6=[];dojo.forEach(this.getPublishedEventsNames(),function(_cb7){var _cb8=this.getPublicEvent(_cb7)||null;if(_cb8){_cb6.push(_cb8);}},this);return _cb6;},getHandledEvents:function(){var _cb9=[];dojo.forEach(this.getHandledEventsNames(),function(_cba){var _cbb=this.getPublicEvent(_cba)||null;if(_cbb){_cb9.push(_cbb);}},this);return _cb9;},getPayloadDefs:function(){return this.widgetDef.payloadDefs;},getPayloadDef:function(name){var _cbc=this.widgetDef.payloadDefs[name];return (typeof _cbc=="undefined")?null:_cbc;},getPayloadDefNames:function(){var arr=[];com.ibm.mm.enabler.utils.Misc.forIn(this.widgetDef.payloadDefs,function(a){arr.push(a);});return arr;},_getShareableItemSets:function(){var _cbd=this.widgetDef.shareableItemSetsArr;if(_cbd){for(var i in _cbd){if(Object.prototype.hasOwnProperty.call(_cbd,i)){return _cbd;}}}return null;},toSpecObject:function(){if(this.specObject){return this.specObject;}var _cbe={};if(!this.xmlStr){return _cbe;}var _cbf=com.ibm.mm.enabler.xslt.loadXmlString(this.xmlStr);var expr="/iw:iwidget";var _cc0=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,_cbf,this.namespaces);if(_cc0){this._addAttributesToJson(_cc0,_cbe);var _cc1=[];_cc1.push({elementName:"eventDescription",keyNames:["id"]});_cc1.push({elementName:"alt",keyNames:["lang","xml:lang"]});this._addElements(_cc0,_cc1,_cbe);_cc1=[];_cc1.push({elementName:"event",keyNames:["id"]});this._addElements(_cc0,_cc1,_cbe);_cc1=[];_cc1.push({elementName:"itemSet",keyNames:["id"]});_cc1.push({elementName:"item",keyNames:["id"]});_cc1.push({elementName:"alt",keyNames:["lang","xml:lang"]});this._addElements(_cc0,_cc1,_cbe);_cc1=[];_cc1.push({elementName:"resource",keyNames:["uri","src"],elemsAsAtt:["skipLoad"]});this._addElements(_cc0,_cc1,_cbe);_cc1=[];_cc1.push({elementName:"content",keyNames:["mode"]});this._addElements(_cc0,_cc1,_cbe,true);}this.specObject=_cbe;return _cbe;},_addAttributesToJson:function(node,_cc2){dojo.forEach(node.attributes,function(att){_cc2["_"+att.nodeName.replace(":","_")]=att.nodeValue;});},_addElements:function(node,_cc3,_cc4,_cc5){if(!dojo.isArray(_cc3)||_cc3.length===0){return;}var _cc6=_cc3[0].elementName;var _cc7=_cc3[0].keyNames;var _cc8=_cc3[0].elemsAsAtt;var _cc9=null;var _cca=null;if(_cc3.length>1){_cc9=_cc3[1].elementName;_cca=_cc3[1].keyNames;}var _ccb=_cc4[_cc6+"s"]={};var _ccc=com.ibm.mashups.enabler.xml.XPath.evaluateXPath("iw:"+_cc6,node,this.namespaces);if(_ccc){dojo.forEach(_ccc,function(node){var _ccd;for(var j=0,kL=_cc7.length;j ."+ns+_ceb,this._instance.rootElement,_cec,true);var _ced=["SourceWidget","SourceEvent","TargetEvent"];var _cee=["SourceEvent","TargetEvent"];for(var i=0;i<_cec.length;i++){var _cef=_cec[i];var _cf0={};var _cf1=true;for(var j=0;j<2;j++){var _cf2=[];com.ibm.mm.iwidget.Utils.findElementByAttribute("query","> ."+ns+_cee[j],_cef,_cf2,false);if(_cf2.length===0){_cf1=false;}else{if(j===0){var temp=_cf2[0].getAttribute("href")||null;if(temp!==null){var _cf3=temp.indexOf("#");if(_cf3!=-1){temp=temp.substring(_cf3+1);}_cf0[_ced[0]]=temp;_cf0[_ced[1]]=_cf2[0].innerHTML;}}else{_cf0[_ced[2]]=_cf2[0].innerHTML;}}}if(_cf1){this._addWire(new com.ibm.mm.iwidget.widget.WireImpl(this._instance.id,_cf0),true);}}},commit:function(){if(this.isDirty()===true){for(var i in this._wires){if(Object.prototype.hasOwnProperty.call(this._wires,i)){var _cf4=this._wires[i];if(_cf4.isDirty()&&_cf4.getType()!==null&&_cf4.getType()==_cf4.TYPE_NEW){this._addToDOM(_cf4);_cf4.setDirty(false);_cf4.setType(null);}else{if(_cf4.isDirty()&&_cf4.getType()!==null&&_cf4.getType()==_cf4.TYPE_DELETE){this._removeFromDOM(_cf4);this._wires.splice(i,1);}}}}this.setDirty(false);}},_addToDOM:function(_cf5){var _cf6=_cf5.getSourceWidgetID();var _cf7=_cf5.getSourceEventName();var _cf8=_cf5.getTargetEventName();var _cf9=document.createElement("span");_cf9.className=this._instance.ns+"ReceivedEvent";var _cfa=document.createElement("a");_cfa.className=this._instance.ns+"SourceEvent";_cfa.setAttribute("href","#"+_cf6);_cfa.innerHTML=_cf7;var _cfb=document.createElement("span");_cfb.className=this._instance.ns+"TargetEvent";_cfb.innerHTML=_cf8;_cf9.appendChild(_cfa);_cf9.appendChild(_cfb);this._instance.rootElement.appendChild(_cf9);},_removeFromDOM:function(_cfc){var _cfd=_cfc.getSourceWidgetID();var _cfe=_cfc.getSourceEventName();var _cff=_cfc.getTargetEventName();var _d00=this._instance.rootElement;var _d01=dojo.query("."+this._instance.ns+"ReceivedEvent",_d00);var _d02=com.ibm.mashups.services.ServiceManager.getService("iwidgetFragmentService");for(var i=0;i<_d01.length;i++){var _d03=_d01[i];var _d04=dojo.query("."+this._instance.ns+"SourceEvent",_d03)[0];var _d05=_d04.innerHTML;var _d06=dojo.query("."+this._instance.ns+"TargetEvent",_d03)[0];if(_d02.getKeyFromHref(_d04)==_cfd&&_d05==_cfe&&_d06.innerHTML==_cff){dojo.destroy(_d03);break;}}}});}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.DOMWireProviderFactoryImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.DOMWireProviderFactoryImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.DOMWireProviderFactoryImpl");dojo.declare("com.ibm.mm.iwidget.widget.DOMWireProviderFactoryImpl",com.ibm.mashups.iwidget.widget.WireProviderFactory,{constructor:function(){this.modes=["DOM"];},createWireProvider:function(_d07,_d08){return new com.ibm.mm.iwidget.widget.ModifiableWireModelImpl(_d07);},getSupportedPersistenceMode:function(){return this.modes;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.services.WireProviderFactoryServiceImpl"]){dojo._hasResource["com.ibm.mm.iwidget.services.WireProviderFactoryServiceImpl"]=true;dojo.provide("com.ibm.mm.iwidget.services.WireProviderFactoryServiceImpl");dojo.declare("com.ibm.mm.iwidget.services.WireProviderFactoryServiceImpl",com.ibm.mashups.iwidget.services.WireProviderFactoryService,{constructor:function(){this._factories={};this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},createWireProvider:function(_d09,_d0a){if(_d0a){com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME).registerOnChangeListener(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES,_d0a);}var _d0b;var wID=_d09.id;_d0b=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME).getPersistenceMode(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES);var _d0c=_d09.rootElement;if(dojo.hasClass(_d0c,com.ibm.mm.iwidget.services.WireProviderFactoryServiceImpl.STANDALONE_CLASS)||!_d0b){_d0b=com.ibm.mm.iwidget.services.WireProviderFactoryServiceImpl.DEFAULT_PERSISTENCE;}if(typeof _d0b!=="undefined"&&_d0b==com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_MODEL){var _d0d=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _d0e=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _d0f=com.ibm.mashups.enabler.model.state.AccessorFactory.getSpaceAccessor(_d0e);var _d10=_d0f.getSpaceID();var _d11=com.ibm.mashups.enabler.model.state.AccessorFactory.getPageAccessor(_d0e,_d10);var _d12=_d11.getPageID();var _d13=com.ibm.mm.iwidget.Utils.getModelID(wID);var wnd=_d0d.findWidgetWindow(_d13,_d12).start();if(!wnd){_d0b=com.ibm.mm.iwidget.services.WireProviderFactoryServiceImpl.DEFAULT_PERSISTENCE;if(this.widgetWrapper&&dojo.isFunction(this.widgetWrapper._getResourceBundle)){this.widgetWrapper._getResourceBundle();this.LOGGER.warning("createPersistentAttributes",widgetWrapper.iwMessages.W_STANDALONECLASS_MISSING_1,[wID]);}else{this.LOGGER.warning("createPersistentAttributes","widget "+wID+" is missing class "+com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE.iwStandalone);}}}if(!(_d0b in this._factories)){return null;}return this._factories[_d0b].createWireProvider(_d09,_d0b);},setFactory:function(_d14,_d15){this._factories[_d14]=_d15;},removeFactory:function(_d16){if(_d16 in this._factories){delete this._factories[_d16];}}});com.ibm.mm.iwidget.services.WireProviderFactoryServiceImpl.DEFAULT_PERSISTENCE=com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_DOM;com.ibm.mm.iwidget.services.WireProviderFactoryServiceImpl.STANDALONE_CLASS=com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE.iwStandalone;com.ibm.mashups.services.ServiceManager.setService(com.ibm.mashups.iwidget.services.WireProviderFactoryService.SERVICE_NAME,new com.ibm.mm.iwidget.services.WireProviderFactoryServiceImpl());com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.WireProviderFactoryService.SERVICE_NAME).setFactory(com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_DOM,new com.ibm.mm.iwidget.widget.DOMWireProviderFactoryImpl());}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetInstanceExtendedImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetInstanceExtendedImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.IWidgetInstanceExtendedImpl");dojo.declare("com.ibm.mm.iwidget.widget.IWidgetInstanceExtendedImpl",com.ibm.mm.iwidget.widget.IWidgetInstanceDefaultImpl,{_addWire:function(wire){return this.getWireModel()._addWire(wire);},_removeWire:function(id){return this.getWireModel()._removeWire(id);},addWire:function(_d17,_d18,_d19){return this.getWireModel().addWire(_d17,_d18,_d19);},removeWire:function(_d1a,_d1b,_d1c){return this.getWireModel().removeWire(_d1a,_d1b,_d1c);},getWires:function(){return this.getWireModel().getWires();},getWireModel:function(){if(!this.wiremodel){this.wiremodel=com.ibm.mashups.services.ServiceManager.getService("WireProviderFactoryService").createWireProvider(this,{context:this,callback:"_wireProviderModeChange",unregister:function(_d1d){this.wrapper.unregisterArray.push(_d1d);}});}return this.wiremodel;},_wireProviderModeChange:function(_d1e,_d1f,_d20){var _d21=null;if(this.wiremodel){_d21=this.wiremodel.getTargets();}this.wiremodel=com.ibm.mashups.services.ServiceManager.getService("WireProviderFactoryService").createWireProvider(this);if(_d21){for(var id in _d21){var _d22=_d21[id];for(var i=0,l=_d22.length;i ."+this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwEvent,this.rootElement,_d23,true);var _d24=[];com.ibm.mm.iwidget.Utils.findElementByAttribute("query","> ."+this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwEventDescription,this.rootElement,_d24,true);if(_d23.length>0){for(var i=0;i<_d23.length;i++){var elem=_d23[i];var _d25=this._getEventDescription(elem,_d24);var id=elem.getAttribute("title");this.events[id]=_d25;}}}return this.events;},_getEventDescription:function(elem,_d26){var id=elem.getAttribute("title");var _d27=dojo.query("> ."+this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwDescRef,elem);var _d28=null;if(_d27){_d28=_d27[0];}var _d29=null;if(_d28){_d29=_d28.getAttribute("href");if(_d29.indexOf("#")===0){_d29=_d29.slice(1);_d29=unescape(_d29);}}var _d2a=null;for(var j=0;j<_d26.length;j++){var temp=_d26[j];if(temp.getAttribute("title")==_d29){_d2a=temp;break;}}var obj={};obj.name=id;var _d2b=_d28.innerHTML;_d2b=_d2b.replace(/^\s*/,"").replace(/\s*$/,"");if(_d2b){obj.alias=_d2b;}var _d2c=elem.className;if(_d2c.indexOf(this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwPublished)>0){obj.isPublished=true;}if(_d2c.indexOf(this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwHandled)>0){obj.isHandled=true;}var list=[];list.push(this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwHandler);list.push(this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwNewWire);list.push(this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwRemoveWire);for(var s=0;s ."+list[s],elem);if(_d2d){var _d2e=_d2d[0];if(_d2e){switch(s){case 0:obj.handlingFn=_d2e.innerHTML;break;case 1:obj.attributes=obj.attributes?obj.attributes:{};obj.attributes.onNewWire=_d2e.innerHTML;break;case 2:obj.attributes=obj.attributes?obj.attributes:{};obj.attributes.onRemoveWire=_d2e.innerHTML;break;default:break;}}}}if(_d2a){var _d2f=this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwPayloadType;var list=dojo.query("> ."+_d2f,_d2a);if(list&&list[0]){obj.type=list[0].innerHTML.replace(/^\s*/,"").replace(/\s*$/,"");}obj.localizedAttributes={};var _d30=this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwTitle;var _d31=this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwValue;var _d32=dojo.query("> ."+_d30,_d2a);if(_d32&&_d32[0]){dojo.query("> ."+_d31,_d32[0]).forEach(function(elem){var lang=elem.getAttribute("lang");var _d33=elem.innerHTML.replace(/^\s*/,"").replace(/\s*$/,"");if(!obj.localizedAttributes[lang]){obj.localizedAttributes[lang]={};}obj.localizedAttributes[lang].title=_d33;});}var _d34=this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwDescription;var _d31=this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwValue;var _d35=dojo.query("> ."+_d34,_d2a);if(_d35&&_d35[0]){dojo.query("> ."+_d31,_d35[0]).forEach(function(elem){var lang=elem.getAttribute("lang");var _d36=elem.innerHTML.replace(/^\s*/,"").replace(/\s*$/,"");if(!obj.localizedAttributes[lang]){obj.localizedAttributes[lang]={};}obj.localizedAttributes[lang].description=_d36;});}}return new com.ibm.mm.iwidget.IEventDescriptionImpl(obj);}});com.ibm.mm.iwidget.widget.IWidgetInstanceImpl=com.ibm.mm.iwidget.widget.IWidgetInstanceExtendedImpl;}if(!dojo._hasResource["com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService_API"]){dojo._hasResource["com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService_API"]=true;dojo.provide("com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService_API");dojo.provide("com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService");dojo.declare("com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService",null,{SERVICE_NAME:"WidgetEventModelFactoryService",createEventModel:function(_d37,_d38){},setFactory:function(_d39,_d3a){},removeFactory:function(_d3b){}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService"]){dojo._hasResource["com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService"]=true;dojo.provide("com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService");com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService.SERVICE_NAME=com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService.prototype.SERVICE_NAME;}if(!dojo._hasResource["com.ibm.mashups.iwidget.model.EventModelFactory"]){dojo._hasResource["com.ibm.mashups.iwidget.model.EventModelFactory"]=true;dojo.provide("com.ibm.mashups.iwidget.model.EventModelFactory");dojo.declare("com.ibm.mashups.iwidget.model.EventModelFactory",null,{createEventModel:function(_d3c,_d3d){},getSupportedPersistenceMode:function(){}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.model.EventModel"]){dojo._hasResource["com.ibm.mashups.iwidget.model.EventModel"]=true;dojo.provide("com.ibm.mashups.iwidget.model.EventModel");dojo.declare("com.ibm.mashups.iwidget.model.EventModel",null,{constructor:function(_d3e){this.wrapper=_d3e;},find:function(id){return null;},eventExists:function(id){return false;},createEvent:function(_d3f){return null;},removeEvent:function(_d40){},isUpdateEventRequired:function(_d41){},updateEvent:function(_d42){},getEvents:function(_d43){}});}if(!dojo._hasResource["com.ibm.mm.enabler.utils.EventModelHelperImpl"]){dojo._hasResource["com.ibm.mm.enabler.utils.EventModelHelperImpl"]=true;dojo.provide("com.ibm.mm.enabler.utils.EventModelHelperImpl");dojo.declare("com.ibm.mm.enabler.utils.EventModelHelperImpl",null,{_PredefinedFields:{alias:"alias",name:"name",type:"type",lang:"lang",isPublished:"isPublished",isHandled:"isHandled",handlingFn:"handlingFn"},checkMatch:function(_d44,_d45){var rc=true;var _d46=[];var _d47;for(var i in _d45){if(Object.prototype.hasOwnProperty.call(_d45,i)){if(!_d45[i]){continue;}if(typeof (this._PredefinedFields[i])!="undefined"){if(i==this._PredefinedFields.isPublished&&(_d45[i]===true||_d45[i]=="true")){_d47=_d44.isPublished;if(!(_d47&&(_d47===true||_d47=="true"))){rc=false;break;}}else{if(i==this._PredefinedFields.isPublished&&(_d45[i]=="false"||_d45[i]===false)){_d47=_d44.isPublished;if(!(_d47&&(_d47===false||_d47=="false"))){rc=false;break;}}else{if(i==this._PredefinedFields.isPublished&&(_d45[i]=="false"||_d45[i]===false)){if(!this._checkBoolean(dojo.toJson(_d44),i,"false")){rc=false;break;}}else{if(i==this._PredefinedFields.isHandled&&(_d45[i]===true||_d45[i]=="true")){if(!_d44[this._PredefinedFields.handlingFn]){rc=false;break;}}else{if(i==this._PredefinedFields.isHandled&&(_d45[i]=="false"||_d45[i]===false)){if(_d44[this._PredefinedFields.handlingFn]){rc=false;break;}}else{if(!(_d44[i]&&_d44[i]==_d45[i])){rc=false;break;}}}}}}}else{if(!(_d44.attributes&&_d44.attributes[i]&&_d44.attributes[i]==_d45[i])){rc=false;break;}}}}return rc;},_checkBoolean:function(str,name,_d48){var rc=false;var temp="\""+name+"\""+":"+_d48;if(str.indexOf(temp)!=-1){return true;}temp="\""+name+"\""+":\""+_d48+"\"";if(str.indexOf(temp)!=-1){return true;}return false;}});dojo.declare("com.ibm.mashups.enabler.utils.EventModelHelper",null,{});com.ibm.mashups.enabler.utils.EventModelHelper=new com.ibm.mm.enabler.utils.EventModelHelperImpl();}if(!dojo._hasResource["com.ibm.mm.iwidget.model.DOMEventModelImpl"]){dojo._hasResource["com.ibm.mm.iwidget.model.DOMEventModelImpl"]=true;dojo.provide("com.ibm.mm.iwidget.model.DOMEventModelImpl");dojo.declare("com.ibm.mm.iwidget.model.DOMEventModelImpl",com.ibm.mashups.iwidget.model.EventModel,{constructor:function(_d49){this.wrapper=_d49;this.eventDescriptionPool={};var _d4a=_d49.widgetDef._getPublicEvents();var _d4b=_d49.getIWidgetInstance()._getPublicEvents();var _d4c=_d4a?_d4a:null;if(_d4b){for(var j in _d4b){if(Object.prototype.hasOwnProperty.call(_d4b,j)){_d4c[j]=_d4b[j];}}}if(_d4c){var _d4d={};for(var i in _d4c){if(Object.prototype.hasOwnProperty.call(_d4c,i)){_d4d[i]=_d4c[i];}}this.eventDescriptionPool=_d4d;}},find:function(id){var _d4e=this.eventDescriptionPool[id];if(_d4e){return _d4e;}if(this.wrapper.handledEvents){if(this.wrapper.handledEvents[id]){return this.wrapper.handledEvents[id][0];}}if(this.wrapper.publishedEvents){if(this.wrapper.publishedEvents[id]){return this.wrapper.publishedEvents[id][0];}}return null;},eventExists:function(_d4f){var temp=this.eventDescriptionPool[_d4f];if(temp){return true;}else{return false;}},_getEventDescObj:function(_d50){var obj=_d50;var _d51=_d50.declaredClass;if(typeof _d51=="undefined"||_d51===null){obj=new com.ibm.mm.iwidget.IEventDescriptionImpl(_d50);}return obj;},createEvent:function(_d52){var _d53=this._getEventDescObj(_d52);var _d54=this.eventExists(_d53.name);if(_d54){return false;}else{this.eventDescriptionPool[_d53.name]=_d53;return true;}},removeEvent:function(_d55){var _d56=this.eventExists(_d55);if(_d56){delete this.eventDescriptionPool[_d55];return true;}else{return true;}},removeEvents:function(_d57){for(var i=0;i<_d57.length;i++){this.removeEvent(_d57[i]);}return true;},isUpdateEventRequired:function(_d58){var _d59=this._getEventDescObj(_d58);var _d5a=this.eventExists(_d59.name);if(_d5a){var _d5b=this.eventDescriptionPool[_d59.name];var _d5c=_d5b.type||"";_d5c=(_d5c.indexOf("}")==-1)?_d5c:_d5c.substring(_d5c.indexOf("}")+1);var _d5d=_d59.type||"";_d5d=(_d5d.indexOf("}")==-1)?_d5d:_d5d.substring(_d5d.indexOf("}")+1);if((_d5b.alias!=_d59.alias)||(_d5b.name!=_d59.name)||(_d5c!=_d5d)||(_d5b.isHandled!=_d59.isHandled)||(_d5b.isPublished!=_d59.isPublished)){return true;}return false;}else{return true;}},updateEvent:function(_d5e){var _d5f=this._getEventDescObj(_d5e);var _d60=this.eventExists(_d5f.name);if(_d60){this.eventDescriptionPool[_d5f.name]=_d5f;}else{return false;}return true;},setEvents:function(_d61){var rc=true;for(var i=0;i<_d61.length;i++){var _d62=_d61[i];var _d63=this.createEvent(_d62);_d63=_d63||false;if(_d63===false){_d63=this.updateEvent(_d62);}_d63=_d63||false;if(rc===true){rc=_d63;}}return rc;},getEvents:function(_d64){if(typeof _d64=="undefined"||_d64===null){return this._getEventsInArray(this.eventDescriptionPool);}var _d65=[];if(_d64.isHandled&&_d64.isHandled=="true"){if(this.wrapper.handledEvents){this._addEvents(_d65,this.wrapper.handledEvents);}}if(_d64.isPublished&&_d64.isPublished=="true"){if(this.wrapper.publishedEvents){this._addEvents(_d65,this.wrapper.publishedEvents);}}if(dojo.isString(_d64)){try{_d64=dojo.fromJson(_d64);}catch(e){return null;}}for(var j in this.eventDescriptionPool){if(Object.prototype.hasOwnProperty.call(this.eventDescriptionPool,j)){var _d66=this.eventDescriptionPool[j];var rc=com.ibm.mashups.enabler.utils.EventModelHelper.checkMatch(_d66._getInternalJsonObj(),_d64);if(rc){_d65.push(_d66);}}}if(_d65.length===0){return null;}else{return _d65;}},_getEventsInArray:function(arr){var _d67=[];for(var j in arr){if(Object.prototype.hasOwnProperty.call(arr,j)){_d67.push(arr[j]);}}if(_d67.length===0){return null;}else{return _d67;}},_addEvents:function(arr,_d68){for(var i in _d68){if(Object.prototype.hasOwnProperty.call(_d68,i)){var _d69=_d68[i];for(var j in _d69){if(Object.prototype.hasOwnProperty.call(_d69,j)){arr.push(_d69[j]);}}}}}});}if(!dojo._hasResource["com.ibm.mm.iwidget.model.DOMEventModelFactoryImpl"]){dojo._hasResource["com.ibm.mm.iwidget.model.DOMEventModelFactoryImpl"]=true;dojo.provide("com.ibm.mm.iwidget.model.DOMEventModelFactoryImpl");dojo.declare("com.ibm.mm.iwidget.model.DOMEventModelFactoryImpl",com.ibm.mashups.iwidget.model.EventModelFactory,{constructor:function(){this.modes=["DOM"];},createEventModel:function(_d6a,_d6b){return new com.ibm.mm.iwidget.model.DOMEventModelImpl(_d6a);},getSupportedPersistenceMode:function(){return this.modes;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.services.WidgetEventModelFactoryServiceImpl"]){dojo._hasResource["com.ibm.mm.iwidget.services.WidgetEventModelFactoryServiceImpl"]=true;dojo.provide("com.ibm.mm.iwidget.services.WidgetEventModelFactoryServiceImpl");dojo.declare("com.ibm.mm.iwidget.services.WidgetEventModelFactoryServiceImpl",com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService,{constructor:function(){this._factories={};this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},createEventModel:function(_d6c,_d6d){if(_d6d){com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME).registerOnChangeListener(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS,_d6d);}return new com.ibm.mm.enabler.DeferredImpl(this,function(dfr,sync){var wID=_d6c.id;var _d6e=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME).getPersistenceMode(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS);var _d6f=_d6c.rootElement;if(dojo.hasClass(_d6f,com.ibm.mm.iwidget.services.WidgetEventModelFactoryServiceImpl.STANDALONE_CLASS)||!_d6e){_d6e=com.ibm.mm.iwidget.services.WidgetEventModelFactoryServiceImpl.DEFAULT_PERSISTENCE;}var _d70;if(typeof _d6e!=="undefined"&&_d6e==com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_MODEL){var _d71=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _d72=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _d73=com.ibm.mashups.enabler.model.state.AccessorFactory.getSpaceAccessor(_d72);var _d74=_d73.getSpaceID();var _d75=com.ibm.mashups.enabler.model.state.AccessorFactory.getPageAccessor(_d72,_d74);var _d76=_d75.getPageID();var _d77=com.ibm.mm.iwidget.Utils.getModelID(wID);var _d78=_d71.findWidgetWindow(_d77,_d76);_d78.setFinishedCallback(dojo.hitch(this,function(wnd,_d79){if(!wnd){_d6e=com.ibm.mm.iwidget.services.WidgetEventModelFactoryServiceImpl.DEFAULT_PERSISTENCE;if(dojo.isFunction(_d6c._getResourceBundle)){_d6c._getResourceBundle();this.LOGGER.warning("createPersistentAttributes",_d6c.iwMessages.W_STANDALONECLASS_MISSING_1,[wID]);}else{this.LOGGER.warning("createPersistentAttributes","widget "+wID+" is missing class "+com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE.iwStandalone);}}if(!(_d6e in this._factories)){_d70=null;}else{_d70=this._factories[_d6e].createEventModel(_d6c,_d6e);}dfr.finish(_d70,_d79);}));_d78.start(sync);}else{if(!_d70){if(!(_d6e in this._factories)){_d70=null;}else{_d70=this._factories[_d6e].createEventModel(_d6c,_d6e);}}dfr.finish(_d70,200);}return _d70;});},setFactory:function(_d7a,_d7b){this._factories[_d7a]=_d7b;},removeFactory:function(_d7c){if(_d7c in this._factories){delete this._factories[_d7c];}}});com.ibm.mm.iwidget.services.WidgetEventModelFactoryServiceImpl.DEFAULT_PERSISTENCE=com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_DOM;com.ibm.mm.iwidget.services.WidgetEventModelFactoryServiceImpl.STANDALONE_CLASS=com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE.iwStandalone;com.ibm.mashups.services.ServiceManager.setService(com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService.SERVICE_NAME,new com.ibm.mm.iwidget.services.WidgetEventModelFactoryServiceImpl());com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService.SERVICE_NAME).setFactory(com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_DOM,new com.ibm.mm.iwidget.model.DOMEventModelFactoryImpl());}if(!dojo._hasResource["com.ibm.mashups.iwidget.itemset.ShareableItemSet"]){dojo._hasResource["com.ibm.mashups.iwidget.itemset.ShareableItemSet"]=true;dojo.provide("com.ibm.mashups.iwidget.itemset.ShareableItemSet");dojo.declare("com.ibm.mashups.iwidget.itemset.ShareableItemSet",null,{constructor:function(){},setItemValue:function(_d7d,_d7e){return this;},getItemValue:function(_d7f){return null;},getAllNames:function(){return null;},removeItem:function(_d80){return null;},commit:function(){return null;},addListener:function(_d81){return null;},removeListener:function(_d82){return true;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.itemset.ShareableItemSetImpl"]){dojo._hasResource["com.ibm.mm.iwidget.itemset.ShareableItemSetImpl"]=true;dojo.provide("com.ibm.mm.iwidget.itemset.ShareableItemSetImpl");dojo.declare("com.ibm.mm.iwidget.itemset.ShareableItemSetImpl",com.ibm.mashups.iwidget.itemset.ShareableItemSet,{constructor:function(_d83,_d84,name){this.DELETE_TOKEN="DELETE_TOKEN";this.parent=_d83;if(name){this.id=name;}if(_d84){this.id=_d84.id;this.alias=_d84.alias?_d84.alias:null;this.defData=_d84;}this.mapping={};this.items={};if(_d84){var _d85=_d84.items;for(var i in _d85){if(Object.prototype.hasOwnProperty.call(_d85,i)){var id=i;var _d86=_d85[i].alias?_d85[i].alias:null;this.items[i]={id:id};if(_d86){this.mapping[_d86]=id;this.items[i].alias=_d86;}}}}this.navigationStateModel=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var psid=this.alias;if(!psid){psid=this.id;}this.shareableAccessor=com.ibm.mashups.enabler.model.state.AccessorFactory.getShareableParameterSetAccessor(this.navigationStateModel,psid,"global");this._isDirty=false;this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},addListener:function(fn){var id=this.alias;if(!id){id=this.id;}var me=this;var _d87=function(_d88){if(me._isSender){return;}var _d89=_d88.changes?_d88.changes:null;if(_d89){for(var i=0;i<_d89.length;i++){var _d8a=_d89[i].alias;if(me.mapping){if(me.mapping[_d8a]){var _d8b=me.mapping[_d8a];_d89[i].id=_d8b;}}}}if(_d89.length>0){var _d8c=new com.ibm.mm.iwidget.IEventImpl("onItemSetChanged",null,_d88);if(dojo.isString(fn)){var _d8d=me.parent._getHandlerScope(fn);if(_d8d){fn=dojo.hitch(_d8d,fn);}}fn(_d8c);}};var _d8e=this.shareableAccessor.registerListener(_d87);return _d8e;},removeListener:function(_d8f){return this.shareableAccessor.removeListener(_d8f);},setItemValue:function(_d90,_d91){if(!_d90){return null;}if(!_d91){return null;}if(typeof (this._isDirty)!="undefined"&&!this._isDirty){this._isDirty=true;this._changedItems={};}var _d92=this._resolveMapping(_d90);if(!_d92){_d92=_d90;}this._changedItems=this._changedItems?this._changedItems:{};this._changedItems[_d92]=_d91;return this;},getItemValue:function(_d93){var id=this._resolveMapping(_d93);if(!id){id=_d93;}if(this._isDirty&&this._changedItems){if(this._changedItems[id]&&this._changedItems[id]!=this.DELETE_TOKEN){return this._changedItems[id];}else{if(this._changedItems[id]&&this._changedItems[id]==this.DELETE_TOKEN){return null;}}}var _d94=this.alias;if(!_d94){_d94=this.id;}var _d95=this.shareableAccessor.getItemValue(id);if(!_d95){_d95=null;}return _d95;},getAllNames:function(){var _d96=this.alias;if(!_d96){_d96=this.id;}var _d97=this.shareableAccessor.getAllNames();if(this._isDirty){var obj={};for(var i=0;i<_d97.length;i++){var _d98=_d97[i];obj[_d98]=_d98;}if(this._changedItems){for(var j in this._changedItems){if(this._changedItems[j]&&this._changedItems[j]==this.DELETE_TOKEN&&obj[j]){obj[j]=null;}else{if(this._changedItems[j]&&!obj[j]){obj[j]=j;}}}}var arr=[];for(var k in obj){if(Object.prototype.hasOwnProperty.call(obj,k)){arr.push(k);}}_d97=arr;}for(var s=0;s<_d97.length;s++){var id=_d97[s];if(this.mapping[id]){_d97[s]=this.mapping[id];}}if(_d97.length===0){return null;}return _d97;},removeItem:function(_d99){if(typeof (this._isDirty)!="undefined"&&!this._isDirty){this._isDirty=true;this._changedItems={};}var _d9a=this.getAllNames();if(_d9a===null){return null;}var _d9b=false;for(var i=0;i<_d9a.length;i++){if(_d9a[i]==_d99){_d9b=true;}}if(!_d9b){return null;}var id=this._resolveMapping(_d99);if(!id){id=_d99;}this._changedItems=this._changedItems?this._changedItems:{};this._changedItems[id]=this.DELETE_TOKEN;return this;},getItemSetDescription:function(){return null;},commit:function(){if(this._isDirty){this._isSender=true;var _d9c=this.alias;if(!_d9c){_d9c=this.id;}this.shareableAccessor._setItems(this._changedItems);var _d9d=this.navigationStateModel.commit();_d9d.start();this._isSender=false;}this._changedItems=null;this._isDirty=false;},_resolveMapping:function(name){if(!name){return null;}if(!this.items){return null;}if(this.items[name]&&this.items[name].alias){return this.items[name].alias;}return null;}});com.ibm.mm.iwidget.itemset.ShareableItemSetFactory=com.ibm.mm.iwidget.itemset.ShareableItemSetImpl;if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"CoreModel")>=0)){dojo["require"]("com.ibm.mm.iwidget.itemset.ShareableItemSetExtendedModelImpl");}}if(!dojo._hasResource["com.ibm.mm.iwidget.DeferredLiveTextUnprocessImpl"]){dojo._hasResource["com.ibm.mm.iwidget.DeferredLiveTextUnprocessImpl"]=true;dojo.provide("com.ibm.mm.iwidget.DeferredLiveTextUnprocessImpl");dojo.declare("com.ibm.mm.iwidget.DeferredLiveTextUnprocessImpl",com.ibm.mm.enabler.DeferredImpl,{constructor:function(_d9e){this.wrapper=_d9e;},start:function(sync){if(sync){return;}var _d9f=this.wrapper.getIWidgetInstance();if(dojo.isFunction(this.wrapper.iScope._onGetMarkup)){this.wrapper.iScope._onGetMarkup();}var _da0=dojo.clone(this.wrapper.rootElement);dojo.publish("/com/ibm/mashups/livetext/livetextunchange",[_da0,true,null,null,dojo.hitch(this,this._unchangeCompleteCallback),this.includeParent]);},setIncludeParent:function(_da1){this.includeParent=_da1;},getIncludeParent:function(){return this.includeParent;},_unchangeCompleteCallback:function(node){if(dojo.isFunction(this.getFinishedCallback())){this.finish(node,200);}}});}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetWrapperExtendedImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetWrapperExtendedImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.IWidgetWrapperExtendedImpl");dojo.declare("com.ibm.mm.iwidget.widget.IWidgetWrapperExtendedImpl",com.ibm.mm.iwidget.widget.IWidgetWrapperDefaultImpl,{getMarkup:function(){return new com.ibm.mm.iwidget.DeferredLiveTextUnprocessImpl(this);},destroy:function(){if(this.widgetDef){var _da2=this.widgetDef._getShareableItemSets();if(_da2){var _da3=null;for(var i in _da2){if(Object.prototype.hasOwnProperty.call(_da2,i)){if(this.shareableItemSets.listeners[i]){for(var j=0,l=this.shareableItemSets.listeners[i].length;j ."+_da6.ns+"loading",_da6.rootElement).forEach(function(elem){elem.innerHTML="";var _da7=_da6.id;if(_da6.getIWidgetInstance().getIDescriptorItems().getItemValue("title",dojo.locale)){_da7=unescape(_da6.getIWidgetInstance().getIDescriptorItems().getItemValue("title",dojo.locale));com.ibm.mm.enabler.logging.LegacyLogger.logInlineMessage(elem,"error",dojo.string.substitute(_da6.iwMessages.E_WIDGET_DISPLAY_FAIL_2,[_da7,e.message]));}else{if(typeof (e)!=="undefined"&&null!==e){com.ibm.mm.enabler.logging.LegacyLogger.logInlineMessage(elem,"error",dojo.string.substitute(_da6.iwMessages.E_WIDGET_DISPLAY_FAIL_2,[_da7,e.message]));}else{elem.innerHTML=dojo.string.substitute(_da6.iwMessages.E_WIDGET_INCORRECTCONFIG_1,[_da7]);}}});},_logUpdateMarkupError:function(mode){this._getResourceBundle();var _da8=dojo.string.substitute(this.iwMessages.E_IWIDGETDEF_CONTENTNOTAVAILABLE_1,[mode]);},_loadWidgetSharedResource:function(cb2){var _da9=this.widgetDef.getResources();this._getResourceBundle();if(typeof _da9!="undefined"&&_da9!==null){var size=_da9.length-1;if(size==-1){cb2();}var _daa=[];var temp=[];for(var x in _da9){if(Object.prototype.hasOwnProperty.call(_da9,x)){var _dab=_da9[x];if(_dab.isImage()||_dab.isCSS()){temp.push(_dab);}else{_daa.push(_dab);}}}for(var y=0;y ."+me.ns+"loading",me.rootElement).forEach(function(elem){elem.innerHTML="";var _dae=me.getIWidgetInstance().getIDescriptorItems().getItemValue("title",dojo.locale);if(!_dae){_dae="'"+me.getIWidgetInstance().widgetXMLUrl+"'";}else{_dae="'"+unescape(_dae)+"'";}if(me.widgetDef){var _daf=me.widgetDef.getWidgetId();if(_daf){_dae="'"+_daf+"' ("+_dae+")";}}var _db0="";var _db1=(dojo.isArray(me.data))?me.data[0]:me.data;_db0="";for(var j in _db1){if(Object.prototype.hasOwnProperty.call(_db1,j)){if(j=="data"){_db0=_db0.concat("'"+_db1[j]+"'").concat("\n");}}}com.ibm.mm.enabler.logging.LegacyLogger.logInlineMessage(elem,"error",dojo.string.substitute(me.iwMessages.E_WIDGET_DISPLAY_FAIL_2,[_dae,_db0]));});me.error=null;me.data=null;}else{if(cb2){cb2();}}}};for(var i=0;i<_daa.length;i++){var _db2=_daa[i];if(typeof _db2!="undefined"&&_db2!==null){com.ibm.mashups.services.ServiceManager.getService("resourceLoadService").loadResource(_db2,this.id,dojo.partial(mycb,i,_db2));}}}},handleEvent:function(_db3){var _db4=_db3.declaredClass;if(typeof _db4!="undefined"&&_db4!==null&&_db4=="com.ibm.mm.iwidget.IEventImpl"){var _db5=_db3.name;return this._handleEvent(_db5,_db3);}var _db6=_db3.scope;if(typeof _db6!="undefined"&&_db6!==null){if(_db6=="instance"){_db6=this.getIWidgetInstance();}else{if(_db6=="eventmodel"){_db6=this._getPublicEvents();}}}else{_db6=this;}var _db7=_db3.methodname;if(typeof _db7!="undefined"&&_db7!==null){if(_db6[_db7]&&dojo.isFunction(_db6[_db7])){_db6[_db7].apply(_db6,_db3.params);}}},_handleEvent:function(_db8,_db9){var _dba="_handleEvent(eventName, iEvent)";if(this.bIsLoggable){this.LOGGER.entering(_dba,[_db8,dojo.toJson(_db9)]);}_db9=this._deserializePayload(_db9);if(typeof _db8=="undefined"||_db8===null){return false;}if(!this.loaded){if(!this._eventqueue){this._eventqueue={};}this._eventqueue[_db8]=_db9;return;}try{if(_db8==iwConstants.EVENTS.onNavStateChanged){return this._handleOnNavStateChanged(_db9);}if(_db8==iwConstants.EVENTS.onWindowStateChanged){var _dbb=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _dbc=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(_dbb,this.id);var _dbd=_db9.payload.newWindowState;_dbc.setWindowState(_dbd);var _dbe=dojo.contentBox(this.rootElement.parentNode);this.handleSizeChanged({"newWidth":Math.max(0,_dbe.w),"newHeight":Math.max(0,_dbe.h)});return this._handleEventInternal(_db8,_db9);}if(_db8==iwConstants.EVENTS.onModeChanged){if(this._inIframe()){var _dbf={};_dbf.methodname="_handleOnModeChange";_dbf.hubclient=this.hubId;_dbf.params=[_db9.payload];var id="_stub_"+this.id;this.eventSvr._publishEvent(iwConstants.WIDGETEVENT_PREFIX+id,_dbf,this.hubId);return;}return this._handleModeChange(_db9);}if(_db8=="onNewWire"){return this._handleNewWire(_db9);}if(_db8=="onRemoveWire"){return this._handleRemoveWire(_db9);}return this._handleEventInternal(_db8,_db9);}catch(e){var _dc0=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);_dc0.severe("_handleEvent","widget:"+this.hubId+"eventName:"+_db8+" HandleEventException:"+e);}},getPublicEventHandler:function(_dc1){var _dc2=this._getPublicEvents()||null;if(!_dc2){return null;}var _dc3=_dc2.find(_dc1)||null;if(!_dc3){return null;}var _dc4=_dc3.handlingFn||null;if(!_dc4){var _dc5=_dc3.getAttribute("isComplete");if(typeof _dc5!=="undefined"&&_dc5===false){var _dc6=iwConstants.EVENTS.onIncompleteEventDescription;var _dc7={eventDescription:_dc3};var _dc8=new com.ibm.mm.iwidget.IEventImpl(_dc6,null,_dc7);this._handleEventInternal(_dc6,_dc8);_dc3=_dc2.find(_dc1);_dc4=_dc3.handlingFn;}}var _dc9=null;if(_dc4){if(dojo.isFunction(_dc4)){_dc9=_dc4;}else{var _dca=this._getHandlerScope(_dc4)||null;if(_dca){_dc9=dojo.hitch(_dca,_dc4);}}}return _dc9;},getPublishedEvents:function(){if(!this.publishedEvents){this.publishedEvents={};}return this.publishedEvents;},getHandledEvents:function(){if(!this.handledEvents){this.handledEvents={};}return this.handledEvents;},_inIframe:function(){if(this._isInIframe){return this._isInIframe;}var _dcb=false;var type=this.eventSvr.getType();if(typeof type!="undefined"&&type==com.ibm.mm.iwidget.Constants.eventservice.type.IFRAME){_dcb=true;}this._isInIframe=_dcb;return this._isInIframe;},setMainframeId:function(_dcc){this._mainframeId=_dcc;},setModal:function(_dcd){this._isModal=_dcd;},isModal:function(){return this._isModal?this._isModal:false;},_handleDataSync:function(_dce){if(typeof _dce.attributes!="undefined"&&_dce.attributes!==null){var _dcf=_dce.attributes;this._syncModifiableProperties(_dcf,this.getIWidgetInstance().getAttributes());}if(typeof _dce.idescriptors!="undefined"&&_dce.idescriptors!==null){var _dd0=_dce.idescriptors;this._syncModifiableProperties(_dd0,this.getIWidgetInstance().getIDescriptorItems());}if(typeof _dce.wiremodel!="undefined"&&_dce.wiremodel!==null){var _dd1=_dce.wiremodel;this._syncWireModel(_dd1,this.getIWidgetInstance().getWireModel());}this.commit(true);},_syncModifiableProperties:function(_dd2,_dd3){var _dd4=_dd2._items;if(_dd2._dirty){for(var i in _dd4){if(Object.prototype.hasOwnProperty.call(_dd4,i)){var name=i;var temp=_dd4[i];if(dojo.isString(temp)){if(temp&&temp==_dd3.DELETE_TOKEN){_dd3.removeItem(name);}}else{var _dd5=(_dd4[i].readOnly)?_dd4[i].readOnly:false;var _dd6=_dd4[i].values;if(typeof _dd6!="undefined"&&_dd6!==null){for(var j in _dd6){if(Object.prototype.hasOwnProperty.call(_dd6,j)){var _dd7=_dd6[j];if(_dd7&&_dd7==_dd3.DELETE_TOKEN){_dd3.removeItemValue(name,j);}else{if(_dd7){_dd3.setItemValue(name,_dd7,_dd5,j);}}}}}}}}}},_syncWireModel:function(_dd8,_dd9){var _dda=_dd8._wires;for(var i in _dda){if(Object.prototype.hasOwnProperty.call(_dda,i)){var _ddb=_dda[i];if(_ddb._isDirty&&_ddb._type&&_ddb._type=="NEW"){_dd9.addWire(_ddb.SourceWidget,_ddb.SourceEvent,_ddb.TargetEvent);}else{if(_ddb._isDirty&&_ddb._type&&_ddb._type=="DELETE"){_dd9.removeWire(_ddb.SourceWidget,_ddb.SourceEvent,_ddb.TargetEvent);}}}}var _ddc=_dd8._targets;_dd9._targets=_ddc;},setStateData:function(_ddd){this.stateData=_ddd;},updateState:function(){var _dde;if(!this._inIframe()){var _ddf=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _de0=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(_ddf,this.id)||null;if(_de0){var _de1=_de0.getWidgetState("cp");if(_de1){_dde=new com.ibm.mm.iwidget.IEventImpl(iwConstants.EVENTS.onNavStateChanged,"json",_de1);this._handleEventInternal(iwConstants.EVENTS.onNavStateChanged,_dde);}}}else{if(this.stateData){_dde=new com.ibm.mm.iwidget.IEventImpl(iwConstants.EVENTS.onNavStateChanged,null,this.stateData);this._handleEventInternal(iwConstants.EVENTS.onNavStateChanged,_dde);}}},_handleOnNavStateChanged:function(_de2){if(!this._inIframe()){var _de3=_de2.payload;if(_de3){var _de4=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _de5=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(_de4,this.id);_de5.setWidgetState("cp",_de3);var _de6=_de4.commit();_de6.start();}}else{var _de7={};_de7.methodname="_handleOnNavStateChanged";_de7.params=[_de2];this.eventSvr._publishEvent(this.eventSvr.WIDGETEVENT_PREFIX+"_stub_"+this.id,_de7);}},_initialize:function(_de8){var lang=this.widgetDef.getDefaultLanguage()||null;if(lang){this.defaultLanguage=lang;}else{this.defaultLanguage="en";}var _de9=this._getInitDefaultMode()||null;if(!_de9){_de9=iwConstants.mode_view;}this.currentMode=_de9;this._handleSaveMode();this._initManagedItemSet();this._getShareableItemSets();this._getPublicEvents(dojo.hitch(this,function(_dea){this.getWires();if(_de8){_de8();}}));},getPublicEvent:function(name){var _deb=this._getPublicEvents();return _deb.find(name);},_getPublicEvents:function(_dec){if(!this.publicEvents){var _ded=com.ibm.mashups.services.ServiceManager.getService("WidgetEventModelFactoryService");var dfr=_ded.createEventModel(this,{context:this,callback:"_eventProviderModeChange",unregister:function(_dee){this.unregisterArray.push(_dee);}});dfr.setFinishedCallback(dojo.hitch(this,function(_def,_df0){this.publicEvents=_def;if(_dec){_dec(this.publicEvents);}}));var sync=(_dec)?false:true;if(ibmConfig.dojotest){sync=true;}dfr.start(sync);}return this.publicEvents;},_eventProviderModeChange:function(_df1,_df2,_df3){var _df4=this.publicEvents;var _df5=com.ibm.mashups.services.ServiceManager.getService("WidgetEventModelFactoryService");var dfr=_df5.createEventModel(this,{context:this,callback:"_eventProviderModeChange",unregister:function(_df6){this.unregisterArray.push(_df6);}});dfr.setFinishedCallback(dojo.hitch(this,function(_df7,_df8){this.publicEvents=_df7;}));dfr.start(true);var _df9={};_df9.isHandled="true";var _dfa=_df4.getEvents(_df9);if(_dfa){for(var i=0;i<_dfa.length;i++){var _dfb=_dfa[i];var _dfc=this.getPublicEvent(_dfb.name);if(_dfb&&_dfc){_dfc.copyRuntimeProperties(_dfb);}}}},_getPublishedEvents:function(){var _dfd=this.getWidgetPublishedEvents()||null;var arr={};if(_dfd){var i=0;for(i;i<_dfd.length;i++){arr[_dfd[i].name]=_dfd[i];}}return arr;},_getHandledEvents:function(){var _dfe=this.getWidgetHandledEvents()||null;var arr={};if(_dfe){var i=0;for(i;i<_dfe.length;i++){arr[_dfe[i].name]=_dfe[i];}}return arr;},getWidgetPublishedEvents:function(){var _dff=this._getPublicEvents();if(_dff){var _e00={};_e00.isPublished="true";return _dff.getEvents(_e00);}return null;},getWidgetHandledEvents:function(){var _e01=this._getPublicEvents();if(_e01){var _e02={};_e02.isHandled="true";return _e01.getEvents(_e02);}return null;},getWires:function(){return this.getIWidgetInstance().getWires();},_handleNewWire:function(_e03){var _e04=_e03.payload;var _e05=this.getIWidgetInstance().getWireModel();_e05.registerTargets(_e04.targetWidget,_e04.targetEvent,_e04.sourceEvent);this.commit();var _e06=_e04.sourceEvent;var _e07=this._getPublicEvents();if(!_e07){return false;}var _e08=_e07.find(_e06);if(_e08){var _e09=_e08.getOnNewWire();if(_e09){var _e0a=this._getHandlerScope(_e09);if(_e0a&&dojo.isFunction(_e0a)){_e0a(_e03);}else{if(_e0a&&dojo.isObject(_e0a)){_e0a[_e09](_e03);}}return true;}}return false;},_handleRemoveWire:function(_e0b){var _e0c=_e0b.payload;var _e0d=_e0c.targetEvent;if(this.id==_e0c.sourceWidget){_e0d=_e0c.sourceEvent;}var _e0e=this._getPublicEvents()||null;if(!_e0e){return false;}var _e0f=_e0e.find(_e0d)||null;if(_e0f){var _e10=_e0f.getOnRemoveWire();if(_e10){var _e11=this._getHandlerScope(_e10);if(_e11&&dojo.isFunction(_e11)){_e11(_e0b);}else{if(_e11&&dojo.isObject(_e11)){_e11[_e10](_e0b);}}return true;}}return false;},_getShareableItemSets:function(){if(this.shareableItemSets){return this.shareableItemSets;}this.shareableItemSets={};this.shareableItemSets.mapping={};this.shareableItemSets.itemsets={};this.shareableItemSets.listeners={};var _e12=this.widgetDef._getShareableItemSets();if(_e12){var _e13=null;for(var i in _e12){if(Object.prototype.hasOwnProperty.call(_e12,i)){_e13=new com.ibm.mm.iwidget.itemset.ShareableItemSetFactory(this,_e12[i]);var _e14=_e12[i].onItemSetChanged||null;if(_e14){if(!this.shareableItemSets.listeners[i]){this.shareableItemSets.listeners[i]=[];}this.shareableItemSets.listeners[i].push(_e13.addListener(_e14));}this.shareableItemSets.itemsets[i]=_e13;var _e15=_e12[i].alias||null;if(_e15){this.shareableItemSets.mapping[_e15]=_e15;}}}}return this.shareableItemSets;},_getShareableItemSet:function(id){var _e16=this._getShareableItemSets();if(_e16&&_e16.mapping[id]){var _e17=_e16.mapping[id];return _e16.itemsets[_e17];}else{if(_e16&&_e16.itemsets[id]){return _e16.itemsets[id];}}var _e18=new com.ibm.mm.iwidget.itemset.ShareableItemSetFactory(this.widgetwrapper,null,name);_e16.itemsets[id]=_e18;return _e16.itemsets[id];},_executeCallbackQueue:function(){com.ibm.mashups.services.ServiceManager.getService("resourceLoadService").executeCallbackQueue(this.id);},_handleSaveMode:function(){var _e19=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _e1a=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(_e19,this.id);var _e1b=_e1a.getWidgetMode();if(_e1b!=this.currentMode){if(!((_e1b===null)&&(this.currentMode==com.ibm.mm.iwidget.Constants.mode.VIEW))){_e1a.setWidgetMode(this.currentMode);var _e1c=_e19.commit();_e1c.start();}}},_transform:function(_e1d,_e1e){var _e1f=this.getPublicEvent(_e1d);if(!(!_e1f||!_e1f.type||!_e1e.type)){var _e20=new com.ibm.mm.iwidget.IEventImpl(_e1f.name,_e1f.type,_e1e.payload,null);var _e21=new com.ibm.mm.enabler.utils.EventTransformerImpl();var _e22=_e21._transform(_e1e,_e20)||null;if(_e22){_e1e=_e22;}}return _e1e;},_getModeFromNavStateModel:function(){var _e23=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _e24=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(_e23,this.id);return _e24.getWidgetMode();}});com.ibm.mm.iwidget.widget.IWidgetWrapperImpl=com.ibm.mm.iwidget.widget.IWidgetWrapperExtendedImpl;if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"CoreModel")>=0)){dojo["require"]("com.ibm.mm.enabler.iwidget.widget.IWidgetWrapperModelImpl");}}if(!dojo._hasResource["com.ibm.mashups.livetext.CallbackModel"]){dojo._hasResource["com.ibm.mashups.livetext.CallbackModel"]=true;dojo.provide("com.ibm.mashups.livetext.CallbackModel");dojo.declare("com.ibm.mashups.livetext.CallbackModel",null,{preProcessCallbackFunc:function(_e25,_e26,_e27){},postProcessCallbackFunc:function(_e28,_e29,_e2a,_e2b){}});}if(!dojo._hasResource["com.ibm.mashups.livetext.ConfigEntry_API"]){dojo._hasResource["com.ibm.mashups.livetext.ConfigEntry_API"]=true;dojo.provide("com.ibm.mashups.livetext.ConfigEntry_API");dojo.provide("com.ibm.mashups.livetext.ConfigEntry");dojo.declare("com.ibm.mashups.livetext.ConfigEntry",null,{constructor:function(_e2c,_e2d,_e2e,path,_e2f,_e30,id){},isEqual:function(_e31){}});}if(!dojo._hasResource["com.ibm.mm.livetext.ConfigEntryImpl"]){dojo._hasResource["com.ibm.mm.livetext.ConfigEntryImpl"]=true;dojo.provide("com.ibm.mm.livetext.ConfigEntryImpl");dojo.declare("com.ibm.mm.livetext.ConfigEntryImpl",com.ibm.mashups.livetext.ConfigEntry,{constructor:function(_e32,_e33,_e34,path,_e35,_e36,id){this.match=_e32;this.wait=_e36;this.procEnc=_e33;this.mod=_e34;this.path=path;this.baseCls=_e35;this.id=id;},isEqual:function(_e37){return _e37&&_e37.match==this.match&&_e37.wait==this.wait&&_e37.procEnc==this.procEnc&&_e37.mod==this.mod&&_e37.path==this.path&&_e37.baseCls==this.baseCls&&_e37.id==this.id;}});com.ibm.mashups.livetext.ConfigEntry=com.ibm.mm.livetext.ConfigEntryImpl;}if(!dojo._hasResource["com.ibm.mashups.livetext.ConfigEntry"]){dojo._hasResource["com.ibm.mashups.livetext.ConfigEntry"]=true;dojo.provide("com.ibm.mashups.livetext.ConfigEntry");}if(!dojo._hasResource["com.ibm.mashups.livetext.Exception"]){dojo._hasResource["com.ibm.mashups.livetext.Exception"]=true;dojo.provide("com.ibm.mashups.livetext.Exception");dojo.declare("com.ibm.mashups.livetext.Exception",null,{constructor:function(_e38,_e39){},getMessage:function(_e3a){}});}if(!dojo._hasResource["com.ibm.mashups.livetext.LivetextBatchModel"]){dojo._hasResource["com.ibm.mashups.livetext.LivetextBatchModel"]=true;dojo.provide("com.ibm.mashups.livetext.LivetextBatchModel");dojo.declare("com.ibm.mashups.livetext.LivetextBatchModel",null,{processTag:function(_e3b,_e3c){},unprocessTag:function(_e3d){}});}if(!dojo._hasResource["com.ibm.mashups.livetext.LivetextModel"]){dojo._hasResource["com.ibm.mashups.livetext.LivetextModel"]=true;dojo.provide("com.ibm.mashups.livetext.LivetextModel");dojo.declare("com.ibm.mashups.livetext.LivetextModel",null,{processTag:function(node){},unprocessTag:function(node){}});}if(!dojo._hasResource["com.ibm.mashups.livetext.ServiceModel_API"]){dojo._hasResource["com.ibm.mashups.livetext.ServiceModel_API"]=true;dojo.provide("com.ibm.mashups.livetext.ServiceModel_API");dojo.provide("com.ibm.mashups.livetext.ServiceModel");dojo.declare("com.ibm.mashups.livetext.ServiceModel",null,{SERVICE_NAME:"livetextService",init:function(_e3e){},onTagChanged:function(_e3f,_e40,_e41,_e42){},onUnchangeTag:function(node,_e43,_e44,_e45,_e46){},onTagContentChanged:function(_e47,_e48,_e49,_e4a){},onAddConfigEntry:function(_e4b,_e4c){},onRemoveConfigEntry:function(_e4d){}});com.ibm.mashups.livetext.ServiceModel.SERVICE_NAME=com.ibm.mashups.livetext.ServiceModel.prototype.SERVICE_NAME;}if(!dojo._hasResource["com.ibm.mm.livetext.ServiceModelImpl"]){dojo._hasResource["com.ibm.mm.livetext.ServiceModelImpl"]=true;dojo.provide("com.ibm.mm.livetext.ServiceModelImpl");dojo.declare("com.ibm.mm.livetext.ServiceModelImpl",com.ibm.mashups.livetext.ServiceModel,{_initialized:false,_tagTypes:null,_rootContainer:null,tagChanged:"/com/ibm/mashups/livetext/livetextchanged",unchangeTag:"/com/ibm/mashups/livetext/livetextunchange",tagStatusChange:"/com/ibm/mashups/livetext/livetextchanged",tagContentChanged:"/com/ibm/mashups/livetext/livetextcontentchanged",entryAdded:"/com/ibm/mashups/livetext/configentryadded",entryRemoved:"/com/ibm/mashups/livetext/configentryremoved",constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);this.LogLevel=com.ibm.mashups.enabler.logging.LogLevel.TRACE;if(com.ibm.mm.livetext.ServiceModelStatic){console.warn("WARNING: Do not create the LiveText Framework multiple times!");return;}com.ibm.mm.livetext.ServiceModelStatic=true;dojo.subscribe(this.entryAdded,this,"onAddConfigEntry");dojo.subscribe(this.entryRemoved,this,"onRemoveConfigEntry");},init:function(_e4e){if(this._initialized){console.warn("WARNING: Do not initialize the LiveText Framework multiple times!");return;}this._initialized=true;if(!_e4e){_e4e={};}this._loadTags(_e4e);dojo.subscribe(this.tagChanged,this,"onTagChanged");dojo.subscribe(this.unchangeTag,this,"onUnchangeTag");dojo.subscribe(this.tagContentChanged,this,"onTagContentChanged");dojo.publish(this.tagContentChanged,[_e4e.node||document,("continueAfterException" in _e4e)?_e4e.continueAfterException:true,_e4e.preProcessCallbackFunc,_e4e.postProcessCallbackFunc]);},_getNodes:function(node,_e4f){var k=[];if(_e4f=="undfined"||!_e4f){console.error("Why are we having tagType undefined ::::");return k;}var _e50;var a;var _e51=0;if(_e4f.processEnclosedTags!="undefined"&&_e4f.processEnclosedTags){var _e52=_e4f.match;a=[];_e50=dojo.query(_e52,node);_e50.forEach(function(node,_e53,_e54){a.push(node);});return a;}else{var _e55=_e4f.match.split(",");a=[];var b=[];for(_e51=0,l=_e55.length;_e510){_e5b=a[0];_e5c=0;while(_e5c0){tag.loaded=tag.loaded||null;if(tag.loaded===null){this._loadTagHandler(tag);}var _e73=[];if(dojo.isFunction(_e6d)){try{_e6d(node,_e72,tag);}catch(error1){console.debug(error1);}}if(this.LOGGER.isLoggable(this.LogLevel.TRACE)){if(tag.tagHandler instanceof com.ibm.mashups.livetext.LivetextBatchModel){this.LOGGER.trace(_e70,"calling processTag with tagHanlder ${0}",[tag.tagHandler.processTag]);}}if(this.LOGGER.isLoggable(this.LogLevel.TRACE)){this.LOGGER.trace(_e70,"tagHanlder is Instanceof of LivetextBatchModel ${0}:",[(tag.tagHandler instanceof com.ibm.mashups.livetext.LivetextBatchModel)]);}if(tag.tagHandler instanceof com.ibm.mashups.livetext.LivetextBatchModel){try{tag.tagHandler.processTag(_e71,tag);}catch(error){this.LOGGER.trace("_processTypeTag","processTag tag:"+tag.baseClass+" error:"+error.message);_e73[_e73.length]=error;}}else{for(var _e74=0,l=_e71.length;_e740){tag.loaded=tag.loaded||null;if(tag.loaded===null){this._loadTagHandler(tag);}if(tag.tagHandler instanceof com.ibm.mashups.livetext.LivetextBatchModel){try{tag.tagHandler.unprocessTag(nodes,tag);}catch(error2){_e7a[_e7a.length]=error2;}}else{for(var _e7b=0,l=tags.length;_e7b0){_e7c=true;}dojo.destroy(copy.copyOfNode);dojo.destroy(copy.copyNodeParent);delete copy.copyOfNode;delete copy.copyNodeParent;delete copy.result;}return _e7c;},_loadTags:function(){var _e7d="_loadTags";this._tagTypes=this._tagTypes||null;if(this._tagTypes===null){var _e7e=this;if(ibmConfig.livetextService){this._tagTypes=ibmConfig.livetextService;}else{dojo.xhrGet({url:dojo.moduleUrl("com.ibm.mm.livetext","tagservice.entries.cfg"),ibmMultipart:{context:com.ibm.mashups.enabler.io.XHRMultipartFactory.CONTEXT_ENABLER},handleAs:"text",sync:true,load:function(_e7f){_e7e._tagTypes=dojo.fromJson(_e7f);if(_e7e.LOGGER.isLoggable(_e7e.LogLevel.TRACE)){_e7e.LOGGER.trace(_e7d,"got Inside _loadTags of ServiceModelImpl"+_e7e._tagTypes);}},error:function(data){console.dir(data);}});}}},onAddConfigEntry:function(_e80,_e81){this._loadTags();if(!dojo.some(this._tagTypes,function(_e82){return _e80.isEqual(_e82);})){if(_e81){this._tagTypes.unshift({"match":_e80.match,"processEnclosedTags":_e80.procEnc,"waitOnPreTag":_e80.wait,"module":_e80.mod,"path":_e80.path,"baseClass":_e80.baseCls,"id":_e80.id});}else{this._tagTypes.push({"match":_e80.match,"processEnclosedTags":_e80.procEnc,"waitOnPreTag":_e80.wait,"module":_e80.mod,"path":_e80.path,"baseClass":_e80.baseCls,"id":_e80.id});}}},onRemoveConfigEntry:function(_e83){this._loadTags();for(var i=0;;i\s*/,"");_e8e.allSkins[_e8c]=_e91;_e8e.allVars[_e8c]=_e92;_e8e.startAttatchSkin(_e8c,tag);},error:function(data){_e8e.allSkins[_e8c]=_e91;_e8e.startAttatchSkin(_e8c,tag);}});},error:function(data){this.LOGGER.severe("_getSkinTemplate",dojo.string.substitute(com.ibm.mm.builder.coreWidgetsMessages.E_SKIN_LOAD_TEMPLATE_FAIL_1,[data]));}});}else{this.startAttatchSkin(_e8c,tag);}},startAttatchSkin:function(_e93,tag){if(this.isProcessing===0){this.executeReplaceSkin(_e93,tag);}else{this.addToWaitingList(_e93,tag);}},chooseNext:function(){if(this.waitingList.length!==0){var _e94=this.waitingList.pop();this.executeReplaceSkin(_e94.skin,_e94.tag);}},addToWaitingList:function(_e95,tag){if(!this.subscribeHandler){this.subscribeHandler=dojo.subscribe(this.skinAttachEvent,this,"chooseNext");}var _e96={};_e96.skin=_e95;_e96.tag=tag;this.waitingList.push(_e96);},executeReplaceSkin:function(_e97,tag){this.isProcessing=1;var temp=this.allSkins[_e97];if(temp){var _e98=this._getNodeToReplace(tag);var _e99=_e98.parentNode;var anId=dojox.uuid.generateRandomUuid().replace(/\-/g,"");var args=this._getArgs(_e97,tag,anId);if(!args){this.LOGGER.severe("executeReplaceSkin",com.ibm.mm.builder.coreWidgetsMessages.E_SKIN_NOT_EXIST_0);return;}var _e9a=this._getSkinResourceUrl(_e97,"skin.css");com.ibm.mm.builder.utils.htmlUtil.loadCss(_e9a);if(builderConfig.isBidi){var _e9b=this._getSkinResourceUrl(_e97,"skin_rtl.css");com.ibm.mm.builder.utils.htmlUtil.loadCss(_e9b);}var _e9c=dojo.string.substitute(temp,args);_e9c=_e9c.replace(/\/>/g,">");var _e9d=this._getNodeFromMarkup(_e9c);dojo.addClass(_e9d,"mumWidgetTitleBar");_e99.replaceChild(_e9d,_e98);var _e9e=dojo.byId(anId);_e9e.parentNode.replaceChild(tag,_e9e);if(!(dojo.hasClass(_e98,"iw-iWidget")||dojo.hasClass(_e98,"mm_iWidget"))){}var para={};para.widgetId=tag.id;para.skinNodeId=_e9d.id;para.skinParam=args;com.ibm.mashups.services.ServiceManager.getService("eventService").broadcastEvent("com.ibm.mashups.builder.skinLoaded",para);}this.isProcessing=0;dojo.publish(this.skinAttachEvent,[null]);},_getSkinResourceUrl:function(_e9f,_ea0){try{var _ea1=com.ibm.mm.builder.utils.skinUtil._getSkinModel();var skin=com.ibm.mm.builder.utils.skinUtil.getSkinNode(_e9f)||com.ibm.mm.builder.utils.skinUtil.getDefaultSkin();var url=_ea1.findResourceURL(skin,_ea0);return url;}catch(ex){this.LOGGER.severe("_getSkinResourceUrl",dojo.string.substitute(com.ibm.mm.builder.coreWidgetsMessages.E_SKIN_LOAD_ROOT_FAIL_1,[ex.message]));}return null;},_getArgs:function(_ea2,tag,anId){var args={};var _ea3=this.allVars[_ea2];if(_ea3){dojo.mixin(args,_ea3);}args.widgetBody="
";args.skinId=this.skinIdPrefix+tag.id;if(!args.process){args.process=function(_ea4,_ea5){};}args.process(_ea2,tag.id);return args;},_getNodeMarkup:function(tag){var _ea6=document.createElement("div");_ea6.appendChild(tag.cloneNode(true));var _ea7=_ea6.innerHTML;_ea6.removeChild(_ea6.firstChild);return _ea7;},_getNodeFromMarkup:function(_ea8){var _ea9=document.createElement("div");_ea9.innerHTML=_ea8;return _ea9.removeChild(_ea9.firstChild);},_getNodeToReplace:function(tag){var node=dojo.byId(this.skinIdPrefix+tag.id);if(!node){node=tag;}return node;},_showParent:function(node){var _eaa=node.parentNode;while(_eaa){_eaa=_eaa.parentNode;}}});}if(!dojo._hasResource["tagservices.widgets"]){dojo._hasResource["tagservices.widgets"]=true;dojo.provide("tagservices.widgets");dojo.provide("com.ibm.mm.livetext.widgets");dojo.declare("tagservices.widgets",null,{queue:[],queueHandle:null,queueRendering:true,constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;var _eab=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);queueRendering=_eab.getValue(com.ibm.mashups.enabler.services.ConfigConstants.QUEUE_RENDERING);},processTag:function(tag){var _eac="processTag";var _ead=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_ead){this.LOGGER.entering(_eac,arguments);}var id=dojo.attr(tag,"id");if(typeof id!="undefined"){var _eae=dojo.attr(tag,"lazyLoad");var _eaf=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(id);if(_eaf===null){_eaf=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().createWidget(tag);}if(_eaf){if(!_eae||(_eae&&_eae!="true")){if((queueRendering===true)&&!dojo.hasClass(tag,"iw-Standalone")){this.queue.push({priority:dojo.position(tag).y,widgetId:id});this.processQueue(false);}else{com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().renderWidget(_eaf);}}else{_eaf.lazyLoad=true;}}}},processQueue:function(_eb0){if(this.queue.length>0){if(_eb0){while(this.queue.length>0){var json=this.queue.shift();var _eb1=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(json.widgetId);if(_eb1){com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().renderWidget(_eb1);break;}}}else{this.queue.sort(function(_eb2,_eb3){return _eb2.priority-_eb3.priority;});}if(!this.queueHandle){var that=this;this.queueHandle=setTimeout(function(){that.queueHandle=setTimeout(function(){that.queueHandle=null;dojo.hitch(that,that.processQueue)(true);},5);},0);}}},unprocessTag:function(tag){var ns=["iw-","mm_"];for(var n=0,l=ns.length;n0){for(var i=0,l=_ec4.length;i0){return dojo.map(md,function(item){return com.ibm.mm.enabler.utils.Dom.textContent(item);});}return [];},getMetaData:function(name,_ed8){var res=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this.MODEL_METADATA+"[@name='"+name+"']/"+this.BASE_VALUE,this.xmlData,this.mdi_ns);if(res){res=res.getAttribute("value");}if(res&&_ed8){var _ed9=com.ibm.mm.enabler.EndpointUtils.checkForEndpoints(res);if(_ed9){return _ed9;}}return res;},setMetaData:function(name,_eda){var _edb;var _edc=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.MODEL_METADATA+"[@name='"+name+"']/"+this.BASE_VALUE,this.xmlData,this.mdi_ns);if(_edc&&_edc.length>0){_edb=_edc[0];for(var i=1,l=_edc.length;i0){_ee1=this.getMetaData(name);dojo.forEach(_ee2,function(item){dojo.destroy(item);},this);this._setDirty();}return _ee1||null;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ModifiableMetaData"]){dojo._hasResource["com.ibm.mashups.enabler.ModifiableMetaData"]=true;dojo.provide("com.ibm.mashups.enabler.ModifiableMetaData");}if(!dojo._hasResource["com.ibm.mashups.enabler.ThemeProvider"]){dojo._hasResource["com.ibm.mashups.enabler.ThemeProvider"]=true;dojo.provide("com.ibm.mashups.enabler.ThemeProvider");dojo.declare("com.ibm.mashups.enabler.ThemeProvider",null,{getTheme:function(){},setTheme:function(_ee3){},getThemeIdentifier:function(){},setThemeIdentifier:function(_ee4){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.content.ContentNode"]){dojo._hasResource["com.ibm.mashups.enabler.content.ContentNode"]=true;dojo.provide("com.ibm.mashups.enabler.content.ContentNode");dojo.declare("com.ibm.mashups.enabler.content.ContentNode",[com.ibm.mashups.enabler.Identifiable],{});}if(!dojo._hasResource["com.ibm.mashups.enabler.content.ContentPage"]){dojo._hasResource["com.ibm.mashups.enabler.content.ContentPage"]=true;dojo.provide("com.ibm.mashups.enabler.content.ContentPage");dojo.declare("com.ibm.mashups.enabler.content.ContentPage",[com.ibm.mashups.enabler.content.ContentNode,com.ibm.mashups.enabler.ModifiableMetaData,com.ibm.mashups.enabler.Transformable,com.ibm.mashups.enabler.DirtyFlagProvider],{});}if(!dojo._hasResource["com.ibm.mashups.enabler.content.ContentProvider"]){dojo._hasResource["com.ibm.mashups.enabler.content.ContentProvider"]=true;dojo.provide("com.ibm.mashups.enabler.content.ContentProvider");dojo.declare("com.ibm.mashups.enabler.content.ContentProvider",null,{getContent:function(){throw new Error("Unimplemented API: com.ibm.mashups.enabler.content.ContentProvider.getContent");}});}if(!dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationElement_API"]){dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationElement_API"]=true;dojo.provide("com.ibm.mashups.enabler.navigation.NavigationElement_API");dojo.provide("com.ibm.mashups.enabler.navigation.NavigationElement");dojo.declare("com.ibm.mashups.enabler.navigation.NavigationElement",[com.ibm.mashups.enabler.Identifiable,com.ibm.mashups.enabler.ModifiableMetaData,com.ibm.mashups.enabler.ModifiableLocalized,com.ibm.mashups.enabler.DefaultLocalized,com.ibm.mashups.enabler.ThemeProvider,com.ibm.mashups.enabler.content.ContentProvider,com.ibm.mashups.enabler.ac.EffectiveAccess,com.ibm.mashups.enabler.Transformable,com.ibm.mashups.enabler.DirtyFlagProvider],{isHidden:function(){},setHidden:function(hide){},confirmSetHidden:function(hide){},getNavigationElementType:function(){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.EditLinkProvider"]){dojo._hasResource["com.ibm.mashups.enabler.EditLinkProvider"]=true;dojo.provide("com.ibm.mashups.enabler.EditLinkProvider");dojo.declare("com.ibm.mashups.enabler.EditLinkProvider",null,{getEditLink:function(){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.NextLinkProvider"]){dojo._hasResource["com.ibm.mashups.enabler.NextLinkProvider"]=true;dojo.provide("com.ibm.mashups.enabler.NextLinkProvider");dojo.declare("com.ibm.mashups.enabler.NextLinkProvider",null,{_getNextURI:function(){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ThreadingLinkProvider"]){dojo._hasResource["com.ibm.mashups.enabler.ThreadingLinkProvider"]=true;dojo.provide("com.ibm.mashups.enabler.ThreadingLinkProvider");dojo.declare("com.ibm.mashups.enabler.ThreadingLinkProvider",null,{getParentLink:function(){},getChildrenLink:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.space.SpaceIdentifierAspect"]){dojo._hasResource["com.ibm.mm.enabler.space.SpaceIdentifierAspect"]=true;dojo.provide("com.ibm.mm.enabler.space.SpaceIdentifierAspect");dojo.declare("com.ibm.mm.enabler.space.SpaceIdentifierAspect",null,{getSpaceIdentifier:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.PersistenceHandlerImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.PersistenceHandlerImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.PersistenceHandlerImpl");dojo.declare("com.ibm.mm.enabler.persistence.PersistenceHandlerImpl",null,{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;},_initTransition:function(ctx,fn){this._transitionCtx=ctx;this._transitionFn=fn;},_initDelegators:function(_ee5,_ee6,_ee7){var _ee8=dojo.getObject(this.declaredClass).prototype;com.ibm.mm.enabler.utils.Misc.forIn(_ee5,function(f,fn){if(dojo.isFunction(f)&&!Object.prototype.hasOwnProperty.call(_ee8,fn)){if(!_ee7||!(_ee7&&_ee7[fn])){this[fn]=dojo.hitch(this,(function(fn){return function(){return (_ee6&&_ee6[fn])?this._delegate(fn,arguments,_ee6[fn]):this._delegate(fn,arguments);};})(fn));}}},this);},_delegate:function(fn,args,_ee9){var _eea=this.LOGGER.isLoggable(this.LOG_LEVEL);var id;if(!dojo.isFunction(this._persistence[fn])){id=(this.getID)?this.getID():"unknown";if(_eea){this.LOGGER.trace("com.ibm.mm.enabler.persistence.PersistenceHandlerImpl._delegate","No json implementation found for function '${0}' in object with id '${1}'; switching to xml.",[fn,id]);}this._transitionFn.apply(this._transitionCtx,[id]).start();}else{if(_ee9&&dojo.isFunction(this._persistence[_ee9])&&!this._persistence[_ee9].apply(this._persistence,args||[])){id=(this.getID)?this.getID():"unknown";if(_eea){this.LOGGER.trace("com.ibm.mm.enabler.persistence.PersistenceHandlerImpl._delegate","Conditional function '${0}' indicated to switch to xml implementation for function '${1}' in object with id '${2}'.",[_ee9,fn,id]);}this._transitionFn.apply(this._transitionCtx,[id]).start();}}if(!dojo.isFunction(this._persistence[fn])){if(_eea){this.LOGGER.trace("com.ibm.mm.enabler.persistence.PersistenceHandlerImpl._delegate","Function '${0}' not available in xml as well.",fn);}throw new Error("fn not available!");}return this._persistence[fn].apply(this._persistence,args||[]);},_getPersistence:function(){return this._persistence;},_setPersistence:function(p){this._persistence=p;},toString:function(){if(!this._persistence){return "";}return this._delegate("toString");}});}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.NavigationElementImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.NavigationElementImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.NavigationElementImpl");dojo.declare("com.ibm.mm.enabler.IdentifiablePrivate",null,{_setRawID:function(){},_getRawID:function(){},setID:function(){}});dojo.declare("com.ibm.mm.enabler.navigation.NavigationElementImpl",[com.ibm.mashups.enabler.navigation.NavigationElement,com.ibm.mm.enabler.persistence.PersistenceHandlerImpl],{constructor:function(_eeb){this.navModel=_eeb;var e=com.ibm.mashups.enabler;this._initDelegators(e.DefaultLocalized.prototype);this._initDelegators(e.Identifiable.prototype);this._initDelegators(e.Localized.prototype);this._initDelegators(e.MetaData.prototype);this._initDelegators(e.ModifiableLocalized.prototype);this._initDelegators(e.ModifiableMetaData.prototype);this._initDelegators(e.NextLinkProvider.prototype);this._initDelegators(e.ThemeProvider.prototype);this._initDelegators(e.Transformable.prototype);this._initDelegators(e.EditLinkProvider.prototype);this._initDelegators(e.DirtyFlagProvider.prototype);var n=e.navigation;this._initDelegators(n.NavigationElement.prototype);var c=e.content;this._initDelegators(c.ServerRuntimeContent.prototype);this._initDelegators(c.ServerRuntimeContentProvider.prototype);this._initDelegators(c.ContentProvider.prototype,null,{getContent:true});this._initDelegators(e.ac.EffectiveAccess.prototype,{hasRole:"hasCachedHasRole"});this._initDelegators(e.ThreadingLinkProvider.prototype);this._initDelegators(com.ibm.mm.enabler.space.SpaceIdentifierAspect.prototype);this._initDelegators(com.ibm.mm.enabler.IdentifiablePrivate.prototype);var nm=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();this._initTransition(nm,nm.getModifiableNode);},getContent:function(){return new com.ibm.mm.enabler.DeferredImpl(this,function(_eec,sync){var _eed="getContent";var _eee=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_eee){this.LOGGER.entering(_eed,arguments);}var _eef=null;var dfr=this._getPersistence().getContent();dfr.setFinishedCallback(dojo.hitch(this,function(node,_ef0){if(node){_eef=this.navModel._wrapContent(node);}_eec.finish(_eef,_ef0);}));dfr.start(sync);if(_eee){this.LOGGER.exiting(_eed,_eef);}return _eef;});}});}if(!dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationElement"]){dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationElement"]=true;dojo.provide("com.ibm.mashups.enabler.navigation.NavigationElement");}if(!dojo._hasResource["com.ibm.mashups.enabler.content.ServerRuntimeContent"]){dojo._hasResource["com.ibm.mashups.enabler.content.ServerRuntimeContent"]=true;dojo.provide("com.ibm.mashups.enabler.content.ServerRuntimeContent");dojo.declare("com.ibm.mashups.enabler.content.ServerRuntimeContent",null,{getServerRuntimeMarkup:function(_ef1){throw new Error("Unimplemented API: com.ibm.mashups.enabler.content.ServerRuntimeContent.getServerRuntimeMarkup");}});}if(!dojo._hasResource["com.ibm.mashups.enabler.content.ServerRuntimeContentProvider"]){dojo._hasResource["com.ibm.mashups.enabler.content.ServerRuntimeContentProvider"]=true;dojo.provide("com.ibm.mashups.enabler.content.ServerRuntimeContentProvider");dojo.declare("com.ibm.mashups.enabler.content.ServerRuntimeContentProvider",null,{getServerRuntimeContent:function(){throw new Error("Unimplemented API: com.ibm.mashups.enabler.content.ServerRuntimeContentProvider.getServerRuntimeContent");},primeServerRuntimeContent:function(_ef2){throw new Error("Unimplemented SPI: com.ibm.mashups.enabler.content.ServerRuntimeContentProvider.primeServerRuntimeContent");}});}if(!dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationNode_API"]){dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationNode_API"]=true;dojo.provide("com.ibm.mashups.enabler.navigation.NavigationNode_API");dojo.provide("com.ibm.mashups.enabler.navigation.NavigationNode");dojo.declare("com.ibm.mashups.enabler.navigation.NavigationNode",[com.ibm.mashups.enabler.navigation.NavigationElement,com.ibm.mashups.enabler.content.ServerRuntimeContentProvider,com.ibm.mashups.enabler.RepresentationProvider],{getExportPageURL:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.NavigationNodeImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.NavigationNodeImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.NavigationNodeImpl");dojo.declare("com.ibm.mm.enabler.navigation.NavigationNodeImpl",[com.ibm.mm.enabler.navigation.NavigationElementImpl],{constructor:function(){this._initDelegators(com.ibm.mashups.enabler.navigation.NavigationNode.prototype);this._initDelegators(com.ibm.mashups.enabler.content.ServerRuntimeContentProvider.prototype);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationNode"]){dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationNode"]=true;dojo.provide("com.ibm.mashups.enabler.navigation.NavigationNode");}if(!dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationLabel_API"]){dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationLabel_API"]=true;dojo.provide("com.ibm.mashups.enabler.navigation.NavigationLabel_API");dojo.provide("com.ibm.mashups.enabler.navigation.NavigationLabel");dojo.declare("com.ibm.mashups.enabler.navigation.NavigationLabel",[com.ibm.mashups.enabler.navigation.NavigationElement],{});}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.NavigationLabelImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.NavigationLabelImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.NavigationLabelImpl");dojo.declare("com.ibm.mm.enabler.navigation.NavigationLabelImpl",[com.ibm.mashups.enabler.navigation.NavigationLabel,com.ibm.mm.enabler.navigation.NavigationElementImpl],{constructor:function(){this._initDelegators(com.ibm.mashups.enabler.navigation.NavigationLabel.prototype);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationLabel"]){dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationLabel"]=true;dojo.provide("com.ibm.mashups.enabler.navigation.NavigationLabel");}if(!dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationURL_API"]){dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationURL_API"]=true;dojo.provide("com.ibm.mashups.enabler.navigation.NavigationURL_API");dojo.provide("com.ibm.mashups.enabler.navigation.NavigationURL");dojo.declare("com.ibm.mashups.enabler.navigation.NavigationURL",[com.ibm.mashups.enabler.navigation.NavigationElement],{getURL:function(){},setURL:function(url){}});}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.NavigationURLImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.NavigationURLImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.NavigationURLImpl");dojo.declare("com.ibm.mm.enabler.navigation.NavigationURLImpl",[com.ibm.mm.enabler.navigation.NavigationElementImpl],{constructor:function(){this._initDelegators(com.ibm.mashups.enabler.navigation.NavigationURL.prototype);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationURL"]){dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationURL"]=true;dojo.provide("com.ibm.mashups.enabler.navigation.NavigationURL");}if(!dojo._hasResource["com.ibm.mm.enabler.EmptyModelIteratorImpl"]){dojo._hasResource["com.ibm.mm.enabler.EmptyModelIteratorImpl"]=true;dojo.provide("com.ibm.mm.enabler.EmptyModelIteratorImpl");dojo.declare("com.ibm.mm.enabler.EmptyModelIteratorImpl",[com.ibm.mm.enabler.DeferredIteratorImpl],{constructor:function(){},start:function(){this.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);},hasNext:function(dfr){if(dfr){dfr.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return false;},next:function(dfr){if(dfr){dfr.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return null;},setCursorPosition:function(){},getCursorPosition:function(){return 0;},size:function(){return new com.ibm.mm.enabler.DeferredImpl(this,this._size);},_size:function(dfr,sync){if(dfr){dfr.finish(0,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return 0;}});}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.FactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.FactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.persistence.FactoryImpl");dojo.declare("com.ibm.mm.enabler.navigation.persistence.FactoryImpl",null,{createNavigationElement:function(p,_ef3){var type=p.getNavigationElementType();var c=com.ibm.mashups.enabler.navigation.Constants;var w;switch(type){case c.NAVIGATION_PAGE:w=new com.ibm.mm.enabler.navigation.NavigationNodeImpl(_ef3);break;case c.NAVIGATION_LABEL:w=new com.ibm.mm.enabler.navigation.NavigationLabelImpl(_ef3);break;case c.NAVIGATION_URL:w=new com.ibm.mm.enabler.navigation.NavigationURLImpl(_ef3);break;default:console.warn("No navigation element type specified!");break;}w._setPersistence(p);p._setContext({getBaseContext:function(){return w;}});return w;}});com.ibm.mm.enabler.navigation.persistence.Factory=new com.ibm.mm.enabler.navigation.persistence.FactoryImpl();}if(!dojo._hasResource["com.ibm.mm.enabler.ModelIteratorOrderedBaseImpl"]){dojo._hasResource["com.ibm.mm.enabler.ModelIteratorOrderedBaseImpl"]=true;dojo.provide("com.ibm.mm.enabler.ModelIteratorOrderedBaseImpl");dojo.declare("com.ibm.mm.enabler.ModelIteratorOrderedBaseImpl",[com.ibm.mm.enabler.DeferredIteratorImpl],{constructor:function(_ef4,_ef5){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.persistenceProvider=_ef4;this.modelProvider=_ef5;this.entries=[];this.entryCache={};this.context=null;this.cursor=0;this.loadFurtherNodes=true;this.sizeValue=null;this._inboundNodes={};this._numInboundNodes=0;com.ibm.mm.enabler.utils.Misc.forIn(this.modelProvider.getCreatedNodes(),function(node,id){this._inboundNodes[id]=null;this._numInboundNodes++;},this);com.ibm.mm.enabler.utils.Misc.forIn(this.modelProvider.getInboundNodes(),function(node,id){this._inboundNodes[id]=null;this._numInboundNodes++;},this);this._outboundNodes={};this._numOutboundNodes=0;com.ibm.mm.enabler.utils.Misc.forIn(this.modelProvider.getDeletedNodes(),function(node,id){this._outboundNodes[id]=null;this._numOutboundNodes++;},this);com.ibm.mm.enabler.utils.Misc.forIn(this.modelProvider.getOutboundNodes(),function(node,id){this._outboundNodes[id]=null;this._numOutboundNodes++;},this);},hasNext:function(dfr,sync){if(typeof this.entries[this.cursor]=="undefined"){var _ef6=0;if(this.loadFurtherNodes){this._loadAheadInternal(dfr||null,true);_ef6=this.cursor;}else{this.entries[0]=null;}}var _ef7=this.entries[this.cursor];var _ef8=_ef7?true:false;if(_ef8&&this._outboundNodes[_ef7]===null){this.cursor++;return this.hasNext(dfr,sync);}return _ef8;},next:function(dfr,sync){if(this.hasNext(dfr||null,true)){var _ef9=this.entries[this.cursor++];var _efa=this.modelProvider.lookupNodeInCacheByID(_ef9);return (typeof _efa=="undefined")?this.entryCache[_ef9]:_efa;}return null;},_insertInbound:function(_efb,_efc){for(var id in this._inboundNodes){_efb.splice(_efc,0,id);_efc++;}},setCursorPosition:function(_efd){if(_efd<0){return;}if(!this.loadFurtherNodes){if(_efd>=this.size().start()){return;}}this.cursor=_efd;this.persistenceProvider.setCursorPosition(this.context,this);},getCursorPosition:function(){return this.cursor;},size:function(){return new com.ibm.mm.enabler.DeferredImpl(this,this._size);},_size:function(dfr,sync){if(!this.sizeValue){this.hasNext(null,true);}var size=this.sizeValue+this._numInboundNodes-this._numOutboundNodes;if(size<0){size=0;}if(dfr){dfr.finish(size,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return size;},start:function(sync){this._loadAheadInternal(this,sync,true);},_loadAheadInternal:function(_efe,sync,_eff){var _f00="_loadAhead";var _f01=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_f01){this.LOGGER.entering(_f00,arguments);}if(!this.context){this.context=this.persistenceProvider.getLoadAheadContext(null,this);}var _f02;var dfr=this.persistenceProvider.loadAhead(this.context);dfr.setFinishedCallback(dojo.hitch(this,function(_f03,_f04){if(_f03==null){this.loadFurtherNodes=false;this.sizeValue=0;this.entries[this.cursor]=null;this._insertInbound(this.entries,this.cursor);if(_efe){_efe.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_BAD_REQUEST);}return;}this.loadFurtherNodes=_f03.loadFurtherNodes;this.sizeValue=_f03.size;if(_f03.size==0){this.entries[this.cursor]=null;this._insertInbound(this.entries,this.cursor);if(_efe){_efe.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return;}var c=0;if(_f03.nodes){for(var i=0,l=_f03.nodes.length;i0;}return _f45;},hasCachedHasChildren:function(_f47){return this._internalCache.pages[_f47];},findSpace:function(_f48,_f49,sync,_f4a){var _f4b=function(_f4c){if(this._internalCache.spaces[_f4c]){return this._internalCache.spaces[_f4c];}return null;};var _f4d=_f4b.apply(this,[_f48])||null;if(_f4d){if(dojo.isFunction(_f49)){_f49(_f4d,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}}else{var _f4e=null;if(!com.ibm.mm.enabler.utils.Misc.isEmpty(this._internalCache.pages)){_f4e={"sections":["spaces"],"spaces":{"select":["current"]}};}this.findBySelection(this.COLLECTION,_f48,_f4e,dojo.hitch(this,function(_f4f){if(_f4f==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK){_f4d=_f4b.apply(this,[_f48])||null;}if(dojo.isFunction(_f49)){_f49(_f4d,_f4f);}}),sync,_f4a);}return _f4d;},getSpace:function(_f50,_f51,sync,_f52){var _f53=function(_f54){if(this._page2SpaceMap[_f54]){var _f55=this._page2SpaceMap[_f54];if(_f55==this.MY_MASHUP_APPS){return this.MY_MASHUP_APPS;}else{if(this._internalCache.spaces[_f55]){return this._internalCache.spaces[_f55];}}}return null;};var _f56=null;var _f57=_f53.apply(this,[_f50])||null;if(_f57){if(_f57==this.MY_MASHUP_APPS){if(dojo.isFunction(_f51)){_f51(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}}else{_f56=_f57;if(dojo.isFunction(_f51)){_f51(_f56,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}}}else{var _f58=null;if(!com.ibm.mm.enabler.utils.Misc.isEmpty(this._internalCache.spaces)){_f58={"sections":["spaces"],"spaces":{"select":["current"]}};}this.findBySelection(_f50,null,_f58,dojo.hitch(this,function(_f59){if(_f59==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK){_f56=_f53.apply(this,[_f50])||null;if(!_f56){this._page2SpaceMap[_f50]=this.MY_MASHUP_APPS;_f56=this.MY_MASHUP_APPS;}}if(dojo.isFunction(_f51)){_f51(_f56,_f59);}}),sync,_f52);}return _f56;},getFavoriteSpaces:function(_f5a,sync,_f5b){var _f5c=this.COLLECTION;var _f5d=function(_f5e){if(this._internalCache.favorites.length>0){var _f5f=[];for(var i=0;i0;i--){this._internalCache.parents[_f8a[i]]=_f8a[i-1];}}if(_f87.topLevel){var tl=_f87.topLevel;this._internalCache.topLevels[_f88]=tl;}if(_f87.root){this._internalCache.rootNodes[_f88]=_f87.root;}else{if(_f87.trail){this._internalCache.rootNodes[this.MY_MASHUP_APPS]=_f87.trail[0];}}}for(var j=0,m=_f84.data.length;j0);},hasWidgetsCached:function(_f93){if(this._internalCache.widgets[_f93]){return true;}else{return false;}},invalidatePage:function(id,_f94){if(!id){this._internalCache.pages={};this._internalCache.trails={};this._internalCache.parents={};this._page2SpaceMap={};this._spaceForPage={};}else{if(_f94){var node=this._internalCache.pages[id];if(node){node.children=null;}}else{delete this._internalCache.pages[id];delete this._internalCache.trails[id];delete this._page2SpaceMap[id];delete this._spaceForPage[id];var _f95=this._internalCache.parents[id];if(_f95){var _f96=this._internalCache.pages[_f95];if(_f96){_f96.children=null;}}var _f97=[];for(var _f98 in this._internalCache.parents){_f95=this._internalCache.parents[_f98];if(_f95==id){_f97.push(_f98);}}for(var i=0,l=_f97.length;i1&&com.ibm.mm.enabler.utils.Misc.isEmpty(node.children[0])){var _f9d=com.ibm.mm.enabler.persistence.JsonPersistenceProvider;for(var i=1;i1){c.children=[];for(var j=0;j=this.filters.length){return;}if(this.changing){this.filters[this.current++].onChangingStyle(_103b,_103c,_103d,_103e,this);}else{this.filters[this.current++].onChangeStyle(_103b,_103c,_103d,this);}}});}if(!dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.StyleFilterChain"]){dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.StyleFilterChain"]=true;dojo.provide("com.ibm.mashups.enabler.runtime.skin.StyleFilterChain");}if(!dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.StyleFilter"]){dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.StyleFilter"]=true;dojo.provide("com.ibm.mashups.enabler.runtime.skin.StyleFilter");dojo.declare("com.ibm.mashups.enabler.runtime.skin.StyleFilter",null,{onChangingStyle:function(_103f,_1040,_1041,_1042,_1043){},onChangeStyle:function(_1044,_1045,_1046,_1047){},onChangeLayoutControl:function(_1048){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.RuntimeSkinModel_API"]){dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.RuntimeSkinModel_API"]=true;dojo.provide("com.ibm.mashups.enabler.runtime.skin.RuntimeSkinModel_API");dojo.provide("com.ibm.mashups.enabler.runtime.skin.RuntimeSkinModel");dojo.declare("com.ibm.mashups.enabler.runtime.skin.RuntimeSkinModel",[com.ibm.mashups.enabler.ListModel,com.ibm.mashups.enabler.runtime.skin.RuntimeSkinLocator,com.ibm.mashups.enabler.Invalidatable],{addStyleFilter:function(_1049,_104a,_104b){},removeStyleFilter:function(_104c){},find:function(id){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.DynamicContentFilterChain_API"]){dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.DynamicContentFilterChain_API"]=true;dojo.provide("com.ibm.mashups.enabler.runtime.skin.DynamicContentFilterChain_API");dojo.provide("com.ibm.mashups.enabler.runtime.skin.DynamicContentFilterChain");dojo.declare("com.ibm.mashups.enabler.runtime.skin.DynamicContentFilterChain",null,{doFilter:function(_104d,name,_104e,_104f,_1050){}});}if(!dojo._hasResource["com.ibm.mm.enabler.runtime.skin.DynamicContentFilterChainImpl"]){dojo._hasResource["com.ibm.mm.enabler.runtime.skin.DynamicContentFilterChainImpl"]=true;dojo.provide("com.ibm.mm.enabler.runtime.skin.DynamicContentFilterChainImpl");dojo.declare("com.ibm.mm.enabler.runtime.skin.DynamicContentFilterChainImpl",[com.ibm.mashups.enabler.runtime.skin.DynamicContentFilterChain],{constructor:function(_1051,_1052){this.filters=_1051;this.changing=_1052;this.current=0;},doFilter:function(_1053,name,_1054,_1055,_1056){if(this.current>=this.filters.length){return;}if(this.changing){this.filters[this.current++].onChangingDynamicContent(_1053,name,_1054,_1055,_1056,this);}else{this.filters[this.current++].onChangeDynamicContent(_1053,name,_1054,_1055,this);}}});}if(!dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.DynamicContentFilterChain"]){dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.DynamicContentFilterChain"]=true;dojo.provide("com.ibm.mashups.enabler.runtime.skin.DynamicContentFilterChain");}if(!dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.DynamicContentFilter"]){dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.DynamicContentFilter"]=true;dojo.provide("com.ibm.mashups.enabler.runtime.skin.DynamicContentFilter");dojo.declare("com.ibm.mashups.enabler.runtime.skin.DynamicContentFilter",null,{onChangingDynamicContent:function(_1057,name,_1058,_1059,_105a,_105b){},onChangeDynamicContent:function(_105c,name,_105d,_105e,_105f){}});}if(!dojo._hasResource["com.ibm.mm.enabler.runtime.skin.SystemStyleFilter"]){dojo._hasResource["com.ibm.mm.enabler.runtime.skin.SystemStyleFilter"]=true;dojo.provide("com.ibm.mm.enabler.runtime.skin.SystemStyleFilter");dojo.declare("com.ibm.mm.enabler.runtime.skin.SystemStyleFilter",[com.ibm.mashups.enabler.runtime.skin.StyleFilter],{constructor:function(_1060,_1061,_1062){this.navModel=_1060;this.layoutModel=_1061;this.rsModel=_1062;},onChangingStyle:function(_1063,_1064,_1065,_1066,_1067){_1067.doFilter(_1063,_1064,_1065,_1066);},onChangeStyle:function(_1068,_1069,_106a,_106b){var _106c=com.ibm.mm.enabler.runtime.skin.RuntimeSkinNodeImpl.prototype._serializeStyle(_106a);_1068.setMetaData("css-style",_106c);_106b.doFilter(_1068,_1069,_106a);}});}if(!dojo._hasResource["com.ibm.mm.enabler.runtime.skin.SystemDynamicContentFilter"]){dojo._hasResource["com.ibm.mm.enabler.runtime.skin.SystemDynamicContentFilter"]=true;dojo.provide("com.ibm.mm.enabler.runtime.skin.SystemDynamicContentFilter");dojo.declare("com.ibm.mm.enabler.runtime.skin.SystemDynamicContentFilter",null,{onChangingDynamicContent:function(_106d,name,_106e,_106f,_1070,_1071){_1071.doFilter(_106d,name,_106e,_106f,_1070,_1071);},onChangeDynamicContent:function(_1072,name,_1073,_1074,_1075){_1075.doFilter(_1072,name,_1073,_1074);if(!com.ibm.mm.enabler.utils.Misc.isInstanceOf(_1072,com.ibm.mashups.enabler.layout.LayoutControl)||(typeof _1074==="undefined"||null===_1074)||_1073===_1074){return;}var _1076=com.ibm.mashups.enabler.runtime.skin.Factory.getRuntimeSkinModel();var _1077=_1076.findByLayoutNode(_1072);var node=_1077.getDomElementForDynamicContent(name);if(!node){return;}if(name==com.ibm.mashups.enabler.runtime.skin.Constants.DYNAMIC_CONTENT_TITLE){node.innerHTML=_1074.replace(/&/g,"&").replace(/"/g,"\"").replace(/>/g,">").replace(/</g,"<");}else{if(name==com.ibm.mashups.enabler.runtime.skin.Constants.DYNAMIC_CONTENT_ICON){node.src=_1074;}}}});}if(!dojo._hasResource["com.ibm.mm.enabler.runtime.skin.RuntimeSkinModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.runtime.skin.RuntimeSkinModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.runtime.skin.RuntimeSkinModelImpl");dojo.declare("com.ibm.mm.enabler.runtime.skin.RuntimeSkinModelImpl",[com.ibm.mashups.enabler.runtime.skin.RuntimeSkinModel,com.ibm.mm.enabler.model.ModelImpl],{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.modelMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","modelMessages");this.nodes=new dojox.collections.Dictionary();var ids=[];this.cursor=0;this.styleChains=new dojox.collections.Dictionary();this.dcChains=new dojox.collections.Dictionary();this.currentPage=null;this.navStateModel=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();this.navModel=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();this.styleFilters=new dojox.collections.SortedList();this.styleFilters.add(com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_FIRST,new dojox.collections.ArrayList());this.styleFilters.add(com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_LAST,new dojox.collections.ArrayList());this.styleFilterIDs=new dojox.collections.SortedList();this.dcFilters=new dojox.collections.SortedList();this.dcFilters.add(com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_FIRST,new dojox.collections.ArrayList());this.dcFilters.add(com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_LAST,new dojox.collections.ArrayList());this.dcFilterIDs=new dojox.collections.SortedList();},invalidate:function(node){if(node){var id=node.getLayoutNode().getID();if(this.styleChains.containsKey(id)){this.styleChains.remove(id);}}else{this.styleChains.clear();}},getInstance:function(){var _1078=com.ibm.mm.enabler.runtime.skin.RuntimeSkinModelImpl._instance;var ret=_1078?_1078:(com.ibm.mm.enabler.runtime.skin.RuntimeSkinModelImpl._instance=new com.ibm.mm.enabler.runtime.skin.RuntimeSkinModelImpl());ret.navStateModel=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();ret.navModel=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();return ret;},_buildIteratorNodes:function(node,lm){var _1079="buildIteratorNodes(node, lm)";var _107a=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_107a){this.LOGGER.entering(_1079,[node,lm]);}if(typeof node=="undefined"||null===node){if(_107a){this.LOGGER.exiting(_1079);}return;}if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(node,com.ibm.mashups.enabler.layout.LayoutControl)||com.ibm.mm.enabler.utils.Misc.isInstanceOf(node,com.ibm.mashups.enabler.layout.LayoutContainer)){if(_107a){this.LOGGER.trace(_1079,"Adding runtime skin node with id: "+node.getID());}this.nodes.add(node.getID(),new com.ibm.mm.enabler.runtime.skin.RuntimeSkinNodeImpl(node,this));this.ids[this.ids.length]=node.getID();}var _107b=lm.getChildren(node);while(_107b.hasNext()){this._buildIteratorNodes(_107b.next(),lm);}if(_107a){this.LOGGER.exiting(_1079);}},iterator:function(){var _107c="iterator()";var _107d=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_107d){this.LOGGER.entering(_107c);}this.nodes.clear();this.ids=[];var page=this._getCurrentPage();this.cursor=0;if(page===null){if(_107d){this.LOGGER.exiting(_107c);}return this;}var _107e=this.navModel.getLayoutModel(page);if(_107e===null){if(_107d){this.LOGGER.exiting(_107c);}return this;}var root=_107e.getRoot().start();this._buildIteratorNodes(root,_107e);if(_107d){this.LOGGER.exiting(_107c);}return this;},start:function(sync){},hasNext:function(){return this.size()>this.cursor;},next:function(){if(!this.hasNext()){return null;}var ret=null;var id=this.ids[this.cursor++];ret=this.nodes.entry(id).valueOf()||null;return ret;},size:function(){return this.nodes.count;},setCursorPosition:function(_107f){this.cursor=_107f;},getCursorPosition:function(){return this.cursor;},_getCurrentPage:function(){var _1080="_getCurrentPage()";var _1081=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1081){this.LOGGER.entering(_1080);}var _1082=com.ibm.mashups.enabler.model.state.AccessorFactory.getPageAccessor(this.navStateModel,null);var _1083=_1082.getPageID();if(_1081){this.LOGGER.trace(_1080,"page id is "+_1083);}if(typeof _1083=="undefined"||null===_1083){if(_1081){this.LOGGER.exiting(_1080,null);}return null;}var node=this.navModel.find(_1083).start();if(_1081){this.LOGGER.exiting(_1080,node);}return node;},_getLayoutModel:function(){var page=this._getCurrentPage();if(null===page){return null;}return this.navModel.getLayoutModel(page);},_hasPageChanged:function(page){if(this.currentPage===null||com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(page)!=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(this.currentPage)){this.currentPage=page;this.nodes.clear();this.ids=[];return true;}return false;},_isLayoutNodeOnCurrentPage:function(_1084){return true;},find:function(id){var _1085="find(id)";var _1086=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1086){this.LOGGER.entering(_1085,id);}if(typeof id=="undefined"||id===null){return null;}var page=this._getCurrentPage();this._hasPageChanged(page);if(!this._isLayoutNodeOnCurrentPage(id)){if(this.nodes.containsKey(id)){this.nodes.remove(id);}if(_1086){this.LOGGER.trace(_1085,id+" is not on the current page");this.LOGGER.exiting(_1085,null);}return null;}if(this.nodes.containsKey(id)){if(_1086){this.LOGGER.trace(_1085,id+" is cached");this.LOGGER.exiting(_1085,this.nodes.entry(id).valueOf());}return this.nodes.entry(id).valueOf();}var _1087=new com.ibm.mm.enabler.runtime.skin.RuntimeSkinNodeImpl(id,this);this.nodes.add(id,_1087);this.ids[this.ids.length]=id;if(_1086){this.LOGGER.exiting(_1085,_1087);}return _1087;},findByLayoutNode:function(_1088){var _1089="findByLayoutNode(layoutNode)";var _108a=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_108a){this.LOGGER.entering(_1089,_1088);}if(typeof _1088=="undefined"||null===_1088){if(_108a){this.LOGGER.exiting(_1089,null);}return null;}var _108b=this.find(_1088.getID());if(_108b){_108b._setLayoutNode(_1088);}if(_108a){this.LOGGER.exiting(_1089,_108b);}return _108b;},_generateFilterId:function(){if(!this._listenerCounter){this._listenerCounter=1;}else{this._listenerCounter++;}return this._listenerCounter;},addStyleFilter:function(_108c,_108d,_108e){var _108f="ordinal, filter, scopeObject";var _1090=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1090){this.LOGGER.entering(_108f,[_108c,_108d,_108e]);}if(!com.ibm.mm.enabler.utils.Misc.isInstanceOf(_108d,com.ibm.mashups.enabler.runtime.skin.StyleFilter)){if(_1090){this.LOGGER.exiting(_108f,-1);}return -1;}var id=this._addFilter(_108c,_108d,_108e,this.styleFilterIDs,this.styleFilters,this.styleChains);if(_1090){this.LOGGER.exiting(_108f,id);}return id;},_addFilter:function(_1091,_1092,_1093,ids,_1094,_1095){var _1096="_addFilter(ordinal, filter, scopeObject, ids, filters)";var _1097=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1097){this.LOGGER.entering(_1096,[_1091,_1092,_1093,ids,_1094]);}if(typeof _1091!="number"){this.LOGGER.trace(_1096,"ordinal is not a number");this.LOGGER.exiting(_1096,-1);return -1;}var _1098;var _1099=false;if(typeof _1093=="undefined"||null===_1093||!com.ibm.mm.enabler.utils.Misc.isInstanceOf(_1093,com.ibm.mashups.enabler.layout.LayoutNode)){_1098=null;if(_1097){this.LOGGER.trace(_1096,"no scope object");}}else{if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(_1093,com.ibm.mashups.enabler.layout.LayoutControl)){_1098=_1093;if(_1097){this.LOGGER.trace(_1096,"scope object is a LayoutControl");}}else{if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(_1093,com.ibm.mashups.enabler.layout.LayoutContainer)){_1098=_1093;_1099=true;if(_1097){this.LOGGER.trace(_1096,"scope object is a LayoutContainer");}}else{_1098=null;if(_1097){this.LOGGER.trace(_1096,"no scope object");}}}}var id=this._generateFilterId();var _109a={id:id,filter:_1092,scope:_1098,isContainer:_1099,ordinal:_1091};var list;if(com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_FIRST>=_1091){list=_1094.item(com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_FIRST);list.insert(0,_109a);ids.add(id,com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_FIRST);}else{if(com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_LAST<=_1091){list=_1094.item(com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_LAST);list.add(_109a);ids.add(id,com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_LAST);}else{list=_1094.item(_1091);if(typeof list==="undefined"||null===list){list=new dojox.collections.ArrayList();this.styleFilters.add(_1091,list);}list.add(_109a);ids.add(id,_1091);}}_1095.clear();if(_1097){this.LOGGER.exiting(_1096,id);}return id;},removeStyleFilter:function(_109b){this._removeFilter(_109b,this.styleFilterIDs,this.styleFilters,this.styleChains);},_removeFilter:function(_109c,ids,_109d,_109e){var _109f=ids.item(_109c);if(typeof _109f=="undefined"||null===_109f){return;}var list=_109d.item(_109f);if(typeof list!=="undefined"&&null!==list&&0 .component-container > .id-"+_10d3);if(!!_10d5&&_10d5.length>0){return _10d5;}_10d5=dojo.query("#layoutContainers > .hiddenWidgetsDiv > .component-container > .id-"+_10d3);if(!!_10d5&&_10d5.length>0){return _10d5;}return dojo.query(".id-"+_10d3);},_updateTitle:function(){var _10d6="_updateTitle()";if(this.bIsLoggable){this.LOGGER.entering(_10d6);}var _10d7=com.ibm.mm.iwidget.Utils.getModelID(this.id);var _10d8,elem;var _10d9=this._query(_10d7);if(_10d9.length!==1){if(this.bIsLoggable){this.LOGGER.trace(_10d6,_10d7+": no layout node; not updating title");this.LOGGER.exiting(_10d6);}return;}_10d8=_10d9[0];var elems=dojo.query("."+com.ibm.mashups.enabler.runtime.skin.Constants.DYNAMIC_CONTENT_TITLE,_10d8);if(elems.length!==1){if(this.bIsLoggable){this.LOGGER.trace(_10d6,_10d7+": no dynamic content title element; not updating title");this.LOGGER.exiting(_10d6);}return;}elem=elems[0];var title=com.ibm.mm.iwidget.Utils._getWidgetTitle(_10d7);if(title===null){title=this.widgetDef.getIDescriptorItems().getItemValue("title",dojo.locale);if(this.bIsLoggable){this.LOGGER.trace(_10d6,_10d7+": using title from widget xml: "+title);}}if(title!==null){elem.innerHTML=title;if(this.bIsLoggable){this.LOGGER.trace(_10d6,_10d7+": set title to: "+title);}}if(this.bIsLoggable){this.LOGGER.exiting(_10d6);}}});com.ibm.mm.iwidget.widget.IWidgetWrapperImpl=com.ibm.mm.enabler.iwidget.widget.IWidgetWrapperModelImpl;}if(!dojo._hasResource["com.ibm.mm.enabler.utils.Model"]){dojo._hasResource["com.ibm.mm.enabler.utils.Model"]=true;dojo.provide("com.ibm.mm.enabler.utils.Model");com.ibm.mm.enabler.utils.Model={LOGGER:com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.utils.Model"),LOG_LEVEL:com.ibm.mashups.enabler.logging.LogLevel.TRACE,getCurrentPageID:function(){var _10da=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _10db=com.ibm.mashups.enabler.model.state.AccessorFactory.getPageAccessor(_10da,null);var _10dc=_10db.getPageID();return _10dc;},getCurrentPageDeferred:function(){var _10dd="getCurrentPageDeferred()";var _10de=com.ibm.mm.enabler.utils.Model.LOGGER.isLoggable(this.LOG_LEVEL);if(_10de){com.ibm.mm.enabler.utils.Model.LOGGER.entering(_10dd);}var _10df=this.getCurrentPageID();if(_10de){com.ibm.mm.enabler.utils.Model.LOGGER.trace(_10dd,"page id is "+_10df);}if(typeof _10df=="undefined"||null===_10df){if(_10de){com.ibm.mm.enabler.utils.Model.LOGGER.exiting(_10dd,null);}return null;}var _10e0=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();var _10e1=_10e0.find(_10df);if(_10de){this.LOGGER.exiting(_10dd,_10e1);}return _10e1;},getCurrentPageLayoutModel:function(){var _10e2="getCurrentPageLayoutModel()";var _10e3=com.ibm.mm.enabler.utils.Model.LOGGER.isLoggable(this.LOG_LEVEL);if(_10e3){com.ibm.mm.enabler.utils.Model.LOGGER.entering(_10e2);}var _10e4=com.ibm.mm.enabler.utils.Model.getCurrentPageDeferred().start();if(!_10e4){return null;}if(_10e3){com.ibm.mm.enabler.utils.Model.LOGGER.trace(_10e2,"page id is "+_10e4.getID());}var _10e5=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();var _10e6=_10e5.getLayoutModel(_10e4);if(_10e3){this.LOGGER.exiting(_10e2,_10e6);}return _10e6;}};}if(!dojo._hasResource["com.ibm.mm.iwidget.itemset.ShareableItemSetExtendedModelImpl"]){dojo._hasResource["com.ibm.mm.iwidget.itemset.ShareableItemSetExtendedModelImpl"]=true;dojo.provide("com.ibm.mm.iwidget.itemset.ShareableItemSetExtendedModelImpl");dojo.declare("com.ibm.mm.iwidget.itemset.ShareableItemSetExtendedModelImpl",com.ibm.mm.iwidget.itemset.ShareableItemSetImpl,{constructor:function(_10e7,_10e8,name){var _10e9=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();var dfd=com.ibm.mm.enabler.utils.Model.getCurrentPageDeferred();var scope;if(dfd){scope=this._getScope(dfd.start(),_10e9);}if(!scope){scope="global";}var psid=this.alias;if(!psid){psid=this.id;}this.shareableAccessor=com.ibm.mashups.enabler.model.state.AccessorFactory.getShareableParameterSetAccessor(this.navigationStateModel,psid,scope);},_getScope:function(_10ea,_10eb){if(_10ea){var scope=_10ea.getMetaData("param.sharing.scope");if(scope){return scope;}var _10ec=_10eb.getParent(_10ea);if(_10ec){var _10ed=_10ec.start();if(_10ed){return this._getScope(_10ed,_10eb);}}}return null;}});com.ibm.mm.iwidget.itemset.ShareableItemSetFactory=com.ibm.mm.iwidget.itemset.ShareableItemSetExtendedModelImpl;}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.AccessControlModelFactory_API"]){dojo._hasResource["com.ibm.mashups.enabler.ac.AccessControlModelFactory_API"]=true;dojo.provide("com.ibm.mashups.enabler.ac.AccessControlModelFactory_API");dojo.provide("com.ibm.mashups.enabler.ac.AccessControlModelFactory");dojo.declare("com.ibm.mashups.enabler.ac.AccessControlModelFactory",null,{getAccessControlModel:function(_10ee){},getAccessControlModel:function(_10ef){},getAccessControlModel:function(_10f0){},getAccessControlModel:function(_10f1,_10f2){},getAccessControlModel:function(_10f3,_10f4){}});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.AccessControlModelFactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.AccessControlModelFactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.AccessControlModelFactoryImpl");dojo.declare("com.ibm.mm.enabler.ac.AccessControlModelFactoryImpl",[com.ibm.mashups.enabler.ac.AccessControlModelFactory,com.ibm.mm.enabler.LazyLoadSupport],{modelMessages:null,_resourceACModels:null,_resourceSpaceACModels:null,constructor:function(){this._resourceACModels={};this._resourceSpaceACModels={};this.modelMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","modelMessages");},_transformXNode:function(xNode){if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(xNode,com.ibm.mashups.enabler.layout.LayoutContainer)){xNode=xNode._getContent();dojo.deprecated("com.ibm.mashups.enabler.ac.AccessControlModelFactory.getAccessControlModel","The method com.ibm.mashups.enabler.ac.AccessControlModelFactory.getAccessControlModel used in conjunction with com.ibm.mashups.enabler.layout.LayoutNode is deprecated, please use com.ibm.mashups.enabler.content.ContentNode as parameter instead!");}else{if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(xNode,com.ibm.mashups.enabler.layout.LayoutFragment)){dojo.deprecated("com.ibm.mashups.enabler.ac.AccessControlModelFactory.getAccessControlModel","The method com.ibm.mashups.enabler.ac.AccessControlModelFactory.getAccessControlModel used in conjunction with com.ibm.mashups.enabler.layout.LayoutFragment is deprecated, please use com.ibm.mashups.enabler.content.ContentNode as parameter instead!");}}return xNode;},_getResourceSpaceAccessControlModel:function(_10f5,xNode){var ret=null;var _10f6=_10f5.getID();var xID=xNode.getID();if(this._resourceSpaceACModels[_10f6]){ret=this._resourceSpaceACModels[_10f6][xID];}if(!ret){ret=new com.ibm.mm.enabler.ac.ResourceSpaceAccessControlModelImpl(_10f5,xNode);if(!this._resourceSpaceACModels[_10f6]){this._resourceSpaceACModels[_10f6]={};}this._resourceSpaceACModels[_10f6][xID]=ret;}return ret;},_getResourceAccessControlModel:function(xNode){var ret=null;var xID=xNode.getID();ret=this._resourceACModels[xID];if(!ret){ret=new com.ibm.mm.enabler.ac.ResourceAccessControlModelImpl(xNode);this._resourceACModels[xID]=ret;}return ret;},_getSpaceAccessControlModel:function(_10f7){return new com.ibm.mm.enabler.ac.SpaceAccessControlModelImpl(_10f7);},_getAccessControlModelFromSingleNode:function(xNode){xNode=this._transformXNode(xNode);var ret=null;if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(xNode,com.ibm.mashups.enabler.space.SpaceNode)){ret=this._getSpaceAccessControlModel(xNode);}else{if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(xNode,com.ibm.mashups.enabler.content.ContentNode)||com.ibm.mm.enabler.utils.Misc.isInstanceOf(xNode,com.ibm.mashups.enabler.layout.LayoutFragment)){ret=this._getResourceAccessControlModel(xNode);}else{throw new Error(dojo.string.substitute(this.modelMessages.E_INVALID_PARAM_TYPE_0,{num:1,type:"com.ibm.mashups.enabler.space.SpaceNode|com.ibm.mashups.enabler.content.ContentNode"}));}}return ret;},getAccessControlModel:function(){com.ibm.mashups.enabler.ac.AccessControlModelFactory.lazyLoadModules(["AccessControlModel","SpaceModel","LayoutModel"]);var xNode,ret=null;if(arguments.length===2&&arguments[0]===null){dojo.deprecated("com.ibm.mashups.enabler.ac.AccessControlModelFactory.getAccessControlModel","The method com.ibm.mashups.enabler.ac.AccessControlModelFactory.getAccessControlModel/2 used with null as first parameter is deprecated, please use com.ibm.mashups.enabler.ac.AccessControlModelFactory.getAccessControlModel/1 instead!");ret=this._getAccessControlModelFromSingleNode(arguments[1]);}else{if(arguments.length===2){var _10f8=arguments[0];xNode=arguments[1];if(!com.ibm.mm.enabler.utils.Misc.isInstanceOf(_10f8,com.ibm.mashups.enabler.space.SpaceNode)){throw new Error(dojo.string.substitute(this.modelMessages.E_INVALID_PARAM_TYPE_0,{num:1,type:"com.ibm.mashups.enabler.space.SpaceNode"}));}xNode=this._transformXNode(xNode);if(!com.ibm.mm.enabler.utils.Misc.isInstanceOf(xNode,com.ibm.mashups.enabler.content.ContentNode)&&!com.ibm.mm.enabler.utils.Misc.isInstanceOf(xNode,com.ibm.mashups.enabler.layout.LayoutFragment)){throw new Error(dojo.string.substitute(this.modelMessages.E_INVALID_PARAM_TYPE_0,{num:2,type:"com.ibm.mashups.enabler.content.ContentNode"}));}ret=this._getResourceSpaceAccessControlModel(_10f8,xNode);}else{if(arguments.length===1){ret=this._getAccessControlModelFromSingleNode(arguments[0]);}else{throw new Error(this.modelMessages.E_INVALID_PARAM_COUNT_0);}}}if(ret!==null&&dojo.isFunction(ret._init)&&dojo.isFunction(ret._loadAheadResource)){ret._init();ret._loadAheadResource(null,true);}return ret;}});com.ibm.mashups.enabler.ac.AccessControlModelFactory=new com.ibm.mm.enabler.ac.AccessControlModelFactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.AccessControlModelFactory"]){dojo._hasResource["com.ibm.mashups.enabler.ac.AccessControlModelFactory"]=true;dojo.provide("com.ibm.mashups.enabler.ac.AccessControlModelFactory");}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.VirtualResourceType"]){dojo._hasResource["com.ibm.mashups.enabler.ac.VirtualResourceType"]=true;dojo.provide("com.ibm.mashups.enabler.ac.VirtualResourceType");dojo.declare("com.ibm.mashups.enabler.ac.VirtualResourceType",null,{ROOT:"wps.PORTAL",TEMPLATE:"wps.TEMPLATE_DEPLOYMENT",SPACE:"wps.APPLICATION_ENTITIES"});com.ibm.mashups.enabler.ac.VirtualResourceType=new com.ibm.mashups.enabler.ac.VirtualResourceType();}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.AccessFactory_API"]){dojo._hasResource["com.ibm.mashups.enabler.ac.AccessFactory_API"]=true;dojo.provide("com.ibm.mashups.enabler.ac.AccessFactory_API");dojo.provide("com.ibm.mashups.enabler.ac.AccessFactory");dojo.declare("com.ibm.mashups.enabler.ac.AccessFactory",null,{getEffectiveAccess:function(node){},getEffectiveAccessVirtualResource:function(_10f9){}});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.AccessFactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.AccessFactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.AccessFactoryImpl");dojo.declare("com.ibm.mm.enabler.ac.AccessFactoryImpl",[com.ibm.mashups.enabler.ac.AccessFactory],{getEffectiveAccess:function(node){if((node)&&(node.hasRole)){return node;}return null;},getEffectiveAccessVirtualResource:function(_10fa){var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.AC_URL,null);myUrl.setNodes([{value:_10fa,isID:true,subModel:com.ibm.mashups.enabler.model.url.ModelUrlFactory.SUBMODEL_ACCESS}]);var _10fb=null;var _10fc=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,true);_10fc.read(dojo.hitch(this,function(type,data,xhr,args){if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD){var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;var ns=nsf.getNameSpaces([nsf.NS_ATOM]);var expr="http://atom:entry";var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,data,ns);if(node){_10fb=node;}}}));if(_10fb){var ret=new com.ibm.mm.enabler.ac.EffectiveAccessImpl();ret._init(_10fb);return ret;}return null;}});com.ibm.mashups.enabler.ac.AccessFactory=new com.ibm.mm.enabler.ac.AccessFactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.AccessFactory"]){dojo._hasResource["com.ibm.mashups.enabler.ac.AccessFactory"]=true;dojo.provide("com.ibm.mashups.enabler.ac.AccessFactory");}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.operation.Constants"]){dojo._hasResource["com.ibm.mashups.enabler.ac.operation.Constants"]=true;dojo.provide("com.ibm.mashups.enabler.ac.operation.Constants");dojo.declare("com.ibm.mashups.enabler.ac.operation.Constants",null,{EDIT_PAGE_LAYOUT:"com.ibm.mashups.enabler.ac.operation.editpagelayout",EDIT_PAGE_PROPERTIES:"com.ibm.mashups.enabler.ac.operation.editpageproperties",ASSIGN_PAGE_PERMISSIONS:"com.ibm.mashups.enabler.ac.operation.assignpagepermissions",WIDGET_MODE_VIEW:"com.ibm.mashups.enabler.ac.operation.widgetmode.view",WIDGET_MODE_PERSONALIZE:"com.ibm.mashups.enabler.ac.operation.widgetmode.personalize",WIDGET_MODE_EDIT:"com.ibm.mashups.enabler.ac.operation.widgetmode.edit",WIDGET_MODE_CONFIG:"com.ibm.mashups.enabler.ac.operation.widgetmode.config"});com.ibm.mashups.enabler.ac.operation.Constants=new com.ibm.mashups.enabler.ac.operation.Constants();}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.operation.Operation_API"]){dojo._hasResource["com.ibm.mashups.enabler.ac.operation.Operation_API"]=true;dojo.provide("com.ibm.mashups.enabler.ac.operation.Operation_API");dojo.provide("com.ibm.mashups.enabler.ac.operation.Operation");dojo.declare("com.ibm.mashups.enabler.ac.operation.Operation",null,{isAllowed:function(){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.operation.Operation"]){dojo._hasResource["com.ibm.mashups.enabler.ac.operation.Operation"]=true;dojo.provide("com.ibm.mashups.enabler.ac.operation.Operation");}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.operation.AllowedOperationsModel_API"]){dojo._hasResource["com.ibm.mashups.enabler.ac.operation.AllowedOperationsModel_API"]=true;dojo.provide("com.ibm.mashups.enabler.ac.operation.AllowedOperationsModel_API");dojo.provide("com.ibm.mashups.enabler.ac.operation.AllowedOperationsModel");dojo.declare("com.ibm.mashups.enabler.ac.operation.AllowedOperationsModel",[com.ibm.mashups.enabler.model.Model],{getOperation:function(_10fd,_10fe){},setOperation:function(_10ff,_1100){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.operation.AllowedOperationsModelFactory_API"]){dojo._hasResource["com.ibm.mashups.enabler.ac.operation.AllowedOperationsModelFactory_API"]=true;dojo.provide("com.ibm.mashups.enabler.ac.operation.AllowedOperationsModelFactory_API");dojo.provide("com.ibm.mashups.enabler.ac.operation.AllowedOperationsModelFactory");dojo.declare("com.ibm.mashups.enabler.ac.operation.AllowedOperationsModelFactory",null,{getAllowedOperationsModel:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.operation.AllowedOperationsModelFactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.operation.AllowedOperationsModelFactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.operation.AllowedOperationsModelFactoryImpl");dojo.declare("com.ibm.mm.enabler.ac.operation.AllowedOperationsModelFactoryImpl",com.ibm.mashups.enabler.ac.operation.AllowedOperationsModelFactory,{constructor:function(){},getAllowedOperationsModel:function(){return com.ibm.mm.enabler.ac.operation.AllowedOperationsModelImpl.prototype.getInstance();}});com.ibm.mashups.enabler.ac.operation.AllowedOperationsModelFactory=new com.ibm.mm.enabler.ac.operation.AllowedOperationsModelFactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.operation.AllowedOperationsModelFactory"]){dojo._hasResource["com.ibm.mashups.enabler.ac.operation.AllowedOperationsModelFactory"]=true;dojo.provide("com.ibm.mashups.enabler.ac.operation.AllowedOperationsModelFactory");}if(!dojo._hasResource["com.ibm.mm.enabler.ac.operation.AbstractOperationImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.operation.AbstractOperationImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.operation.AbstractOperationImpl");dojo.declare("com.ibm.mm.enabler.ac.operation.AbstractOperationImpl",[com.ibm.mashups.enabler.ac.operation.Operation],{constructor:function(_1101){this.context=_1101;this.roleCheck=null;},isAllowed:function(){this.context=this.context||null;if(this.context===null){return false;}if(!this.context.contentNode){return false;}var _1102=com.ibm.mashups.enabler.ac.AccessFactory.getEffectiveAccess(this.context.contentNode);_1102=_1102||null;if(_1102!==null&&_1102.hasRole(this.roleCheck)){return true;}return false;}});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.operation.EditPageLayoutOperationImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.operation.EditPageLayoutOperationImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.operation.EditPageLayoutOperationImpl");dojo.declare("com.ibm.mm.enabler.ac.operation.EditPageLayoutOperationImpl",[com.ibm.mm.enabler.ac.operation.AbstractOperationImpl],{constructor:function(_1103){this.context=_1103;this.roleCheck=com.ibm.mashups.enabler.ac.RoleType.EDITOR;}});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.operation.EditPagePropertiesOperationImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.operation.EditPagePropertiesOperationImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.operation.EditPagePropertiesOperationImpl");dojo.declare("com.ibm.mm.enabler.ac.operation.EditPagePropertiesOperationImpl",[com.ibm.mm.enabler.ac.operation.AbstractOperationImpl],{constructor:function(_1104){this.context=_1104;this.roleCheck=com.ibm.mashups.enabler.ac.RoleType.EDITOR;}});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.operation.AssignPagePermissionsOperationImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.operation.AssignPagePermissionsOperationImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.operation.AssignPagePermissionsOperationImpl");dojo.declare("com.ibm.mm.enabler.ac.operation.AssignPagePermissionsOperationImpl",[com.ibm.mm.enabler.ac.operation.AbstractOperationImpl],{constructor:function(_1105){this.context=_1105;this.roleCheck=com.ibm.mashups.enabler.ac.RoleType.MANAGER;}});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.operation.WidgetModeOperationImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.operation.WidgetModeOperationImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.operation.WidgetModeOperationImpl");dojo.declare("com.ibm.mm.enabler.ac.operation.WidgetModeOperationImpl",[com.ibm.mm.enabler.ac.operation.AbstractOperationImpl],{constructor:function(_1106,mode){this.context=_1106;this.mode=mode;if(this.mode==com.ibm.mm.iwidget.Constants.mode.PERSONALIZE){this.roleCheck=com.ibm.mashups.enabler.ac.RoleType.USER;}else{if(this.mode==com.ibm.mm.iwidget.Constants.mode.EDIT){this.roleCheck=com.ibm.mashups.enabler.ac.RoleType.EDITOR;}else{if(this.mode==com.ibm.mm.iwidget.Constants.mode.CONFIG){this.roleCheck=com.ibm.mashups.enabler.ac.RoleType.USER;}else{this.roleCheck=com.ibm.mashups.enabler.ac.RoleType.USER;}}}},_getCurrentMode:function(){var _1107=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _1108=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(_1107,this.context.id);return _1108.getWidgetMode();},_getCurrentPageID:function(){var _1109=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();return com.ibm.mashups.enabler.model.state.AccessorFactory.getPageAccessor(_1109).getPageID();},_getSupportModes:function(){var _110a=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _110b=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _110c=_110b.findWidgetWindow(this.context.id,this._getCurrentPageID(_110a)).start();var _110d=_110b.getWidgetDefinitionByWindow(_110c).start();return _110d.getSupportedModes();},_isSupportedMode:function(){var _110e=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _110f=this._getSupportModes(_110e);var _1110=(dojo.indexOf(_110f,this.mode)>=0);if(_1110&&(this.mode==com.ibm.mm.iwidget.Constants.mode.CONFIG)){var _1111=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _1112=_1111.findWidgetWindow(this.context.id,this._getCurrentPageID(_110e)).start();var _1113=_1111.getWidgetInstance(_1112).start();if(_1113.isSandboxed()){_1110=false;}}return _1110;},_isModeSwitchable:function(){var _1114=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _1115=this._getCurrentMode(_1114);var _1116=[com.ibm.mm.iwidget.Constants.mode.EDIT,com.ibm.mm.iwidget.Constants.mode.PERSONALIZE,com.ibm.mm.iwidget.Constants.mode.CONFIG];return (dojo.indexOf(_1116,_1115)<0||dojo.indexOf(_1116,this.mode)<0);},isAllowed:function(){if(!this._isSupportedMode()){return false;}if(!this._isModeSwitchable()){return false;}var _1117=this.inherited(arguments);if(_1117){if(this.mode==com.ibm.mm.iwidget.Constants.mode.PERSONALIZE){var _1118=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _1119=_1118.getValue(com.ibm.mashups.enabler.services.ConfigConstants.WIDGET_PERSONALIZE_ENABLED);if(typeof _1119!="undefined"){if(!_1119){return false;}}var _111a=com.ibm.mashups.enabler.user.Factory.getUserModel().findCurrentUser().start();if(_111a&&_111a.isVirtual()){var _111b=_111a.getVirtualType();if(com.ibm.mashups.enabler.user.VirtualType.ANONYMOUS_USER==_111b){return false;}}}else{if(this.mode==com.ibm.mm.iwidget.Constants.mode.CONFIG){if(!ibmConfig["com.ibm.mm.internal.allowConfig"]){return false;}}}}return _1117;}});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.operation.AllowedOperationsModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.operation.AllowedOperationsModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.operation.AllowedOperationsModelImpl");dojo.declare("com.ibm.mm.enabler.ac.operation.AllowedOperationsModelImpl",com.ibm.mashups.enabler.ac.operation.AllowedOperationsModel,{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.additionalOperations=[];},getInstance:function(){var _111c=com.ibm.mm.enabler.ac.operation.AllowedOperationsModelImpl._instance;return _111c?_111c:(com.ibm.mm.enabler.ac.operation.AllowedOperationsModelImpl._instance=new com.ibm.mm.enabler.ac.operation.AllowedOperationsModelImpl());},getOperation:function(_111d,_111e){return new com.ibm.mm.enabler.DeferredImpl(this,this._getOperation,{"operationName":_111d,"jsonContext":_111e});},_getOperation:function(dfr,sync,_111f){var _1120="_getOperation";var _1121=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1121){this.LOGGER.entering(_1120,arguments);}var _1122=_111f.operationName;var _1123=_111f.jsonContext;var _1124=null;if(_1122){var _1125=this.additionalOperations[_1122]||null;if(dojo.isFunction(_1125)){var _1126=function(_1127){_1124=_1127;dfr.finish(_1124,(_1124!==null)?com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK:com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);};dojo.partial(_1125)(_1122,_1123,sync,_1126);if(_1121){this.LOGGER.exiting(_1120,[_1124]);}return _1124;}switch(_1122){case com.ibm.mashups.enabler.ac.operation.Constants.EDIT_PAGE_LAYOUT:_1124=new com.ibm.mm.enabler.ac.operation.EditPageLayoutOperationImpl(_1123);break;case com.ibm.mashups.enabler.ac.operation.Constants.EDIT_PAGE_PROPERTIES:_1124=new com.ibm.mm.enabler.ac.operation.EditPagePropertiesOperationImpl(_1123);break;case com.ibm.mashups.enabler.ac.operation.Constants.ASSIGN_PAGE_PERMISSIONS:_1124=new com.ibm.mm.enabler.ac.operation.AssignPagePermissionsOperationImpl(_1123);break;case com.ibm.mashups.enabler.ac.operation.Constants.WIDGET_MODE_VIEW:_1124=new com.ibm.mm.enabler.ac.operation.WidgetModeOperationImpl(_1123,com.ibm.mm.iwidget.Constants.mode.VIEW);break;case com.ibm.mashups.enabler.ac.operation.Constants.WIDGET_MODE_PERSONALIZE:_1124=new com.ibm.mm.enabler.ac.operation.WidgetModeOperationImpl(_1123,com.ibm.mm.iwidget.Constants.mode.PERSONALIZE);break;case com.ibm.mashups.enabler.ac.operation.Constants.WIDGET_MODE_EDIT:_1124=new com.ibm.mm.enabler.ac.operation.WidgetModeOperationImpl(_1123,com.ibm.mm.iwidget.Constants.mode.EDIT);break;case com.ibm.mashups.enabler.ac.operation.Constants.WIDGET_MODE_CONFIG:_1124=new com.ibm.mm.enabler.ac.operation.WidgetModeOperationImpl(_1123,com.ibm.mm.iwidget.Constants.mode.CONFIG);break;}}dfr.finish(_1124,(_1124!==null)?com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK:com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);if(_1121){this.LOGGER.exiting(_1120,[_1124]);}return _1124;},setOperation:function(_1128,_1129){if(!_1128){return false;}if(!_1129){return false;}this.additionalOperations[_1128]=_1129;return true;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.operation.AllowedOperationsModel"]){dojo._hasResource["com.ibm.mashups.enabler.ac.operation.AllowedOperationsModel"]=true;dojo.provide("com.ibm.mashups.enabler.ac.operation.AllowedOperationsModel");}if(!dojo._hasResource["com.ibm.mashups.enabler.catalog.Factory_API"]){dojo._hasResource["com.ibm.mashups.enabler.catalog.Factory_API"]=true;dojo.provide("com.ibm.mashups.enabler.catalog.Factory_API");dojo.provide("com.ibm.mashups.enabler.catalog.Factory");dojo.declare("com.ibm.mashups.enabler.catalog.Factory",null,{getCatalogCategoryModel:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.catalog.FactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.catalog.FactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.catalog.FactoryImpl");dojo.declare("com.ibm.mm.enabler.catalog.FactoryImpl",[com.ibm.mashups.enabler.catalog.Factory,com.ibm.mm.enabler.LazyLoadSupport],{getCatalogCategoryModel:function(){com.ibm.mashups.enabler.catalog.Factory.lazyLoadModules(["CatalogModel"]);return com.ibm.mm.enabler.catalog.CatalogCategoryModelImpl.prototype.getInstance();}});com.ibm.mashups.enabler.catalog.Factory=new com.ibm.mm.enabler.catalog.FactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.catalog.Factory"]){dojo._hasResource["com.ibm.mashups.enabler.catalog.Factory"]=true;dojo.provide("com.ibm.mashups.enabler.catalog.Factory");}if(!dojo._hasResource["com.ibm.mashups.enabler.content.RuntimeContent_API"]){dojo._hasResource["com.ibm.mashups.enabler.content.RuntimeContent_API"]=true;dojo.provide("com.ibm.mashups.enabler.content.RuntimeContent_API");dojo.provide("com.ibm.mashups.enabler.content.RuntimeContent");dojo.declare("com.ibm.mashups.enabler.content.RuntimeContent",null,{getRuntimeMarkup:function(){throw new Error("Unimplemented API: com.ibm.mashups.enabler.content.RuntimeContent.getRuntimeMarkup");}});}if(!dojo._hasResource["com.ibm.mm.enabler.content.RuntimeContentImpl"]){dojo._hasResource["com.ibm.mm.enabler.content.RuntimeContentImpl"]=true;dojo.provide("com.ibm.mm.enabler.content.RuntimeContentImpl");dojo.declare("com.ibm.mm.enabler.content.RuntimeContentImpl",com.ibm.mashups.enabler.content.RuntimeContent,{_scope:null,constructor:function(scope,func){this._scope=scope;this._getRuntimeMarkup=func||(function(){});},getRuntimeMarkup:function(){return new com.ibm.mm.enabler.DeferredImpl(this._scope||null,this._getRuntimeMarkup);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.content.RuntimeContent"]){dojo._hasResource["com.ibm.mashups.enabler.content.RuntimeContent"]=true;dojo.provide("com.ibm.mashups.enabler.content.RuntimeContent");}if(!dojo._hasResource["com.ibm.mashups.enabler.content.RuntimeContentProvider"]){dojo._hasResource["com.ibm.mashups.enabler.content.RuntimeContentProvider"]=true;dojo.provide("com.ibm.mashups.enabler.content.RuntimeContentProvider");dojo.declare("com.ibm.mashups.enabler.content.RuntimeContentProvider",null,{getRuntimeContent:function(){throw new Error("Unimplemented API: com.ibm.mashups.enabler.content.RuntimeContentProvider.getRuntimeContent");}});}if(!dojo._hasResource["com.ibm.mashups.enabler.layout.Constants"]){dojo._hasResource["com.ibm.mashups.enabler.layout.Constants"]=true;dojo.provide("com.ibm.mashups.enabler.layout.Constants");dojo.declare("com.ibm.mashups.enabler.layout.Constants",null,{LAYOUT_CONTROL:"LayoutControl",LAYOUT_CONTAINER:"LayoutContainer",CONTEXT_WIDGET_DEFINITION_ID:"WidgetDefinitionID",CONTEXT_WIDGET_DEFINITION_URL:"WidgetDefinitionURL",DISPLAY_TITLE:"displayTitle",CONTEXT_TYPE:"type"});com.ibm.mashups.enabler.layout.Constants=new com.ibm.mashups.enabler.layout.Constants();}if(!dojo._hasResource["com.ibm.mashups.enabler.layouttemplate.Factory_API"]){dojo._hasResource["com.ibm.mashups.enabler.layouttemplate.Factory_API"]=true;dojo.provide("com.ibm.mashups.enabler.layouttemplate.Factory_API");dojo.provide("com.ibm.mashups.enabler.layouttemplate.Factory");dojo.declare("com.ibm.mashups.enabler.layouttemplate.Factory",null,{getTemplateModel:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.layouttemplate.Factory"]){dojo._hasResource["com.ibm.mm.enabler.layouttemplate.Factory"]=true;dojo.provide("com.ibm.mm.enabler.layouttemplate.Factory");dojo.declare("com.ibm.mm.enabler.layouttemplate.Factory",[com.ibm.mashups.enabler.layouttemplate.Factory,com.ibm.mm.enabler.LazyLoadSupport],{getTemplateModel:function(){if(!com.ibm.mashups.enabler.layouttemplate.Factory._model){com.ibm.mashups.enabler.layouttemplate.Factory.lazyLoadModules(["LayoutTemplateModel"]);com.ibm.mashups.enabler.layouttemplate.Factory._model=new com.ibm.mm.enabler.layouttemplate.LayoutTemplateModel();}return com.ibm.mashups.enabler.layouttemplate.Factory._model;}});com.ibm.mashups.enabler.layouttemplate.Factory=new com.ibm.mm.enabler.layouttemplate.Factory();}if(!dojo._hasResource["com.ibm.mashups.enabler.layouttemplate.Factory"]){dojo._hasResource["com.ibm.mashups.enabler.layouttemplate.Factory"]=true;dojo.provide("com.ibm.mashups.enabler.layouttemplate.Factory");}if(!dojo._hasResource["com.ibm.mashups.enabler.theme.Factory_API"]){dojo._hasResource["com.ibm.mashups.enabler.theme.Factory_API"]=true;dojo.provide("com.ibm.mashups.enabler.theme.Factory_API");dojo.provide("com.ibm.mashups.enabler.theme.Factory");dojo.declare("com.ibm.mashups.enabler.theme.Factory",null,{getThemeModel:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.theme.FactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.theme.FactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.theme.FactoryImpl");dojo.declare("com.ibm.mm.enabler.theme.FactoryImpl",[com.ibm.mashups.enabler.theme.Factory,com.ibm.mm.enabler.LazyLoadSupport],{getThemeModel:function(){com.ibm.mashups.enabler.theme.Factory.lazyLoadModules(["ThemeModel"]);return com.ibm.mm.enabler.theme.ThemeModelImpl.prototype.getInstance();}});com.ibm.mashups.enabler.theme.Factory=new com.ibm.mm.enabler.theme.FactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.theme.Factory"]){dojo._hasResource["com.ibm.mashups.enabler.theme.Factory"]=true;dojo.provide("com.ibm.mashups.enabler.theme.Factory");}if(!dojo._hasResource["com.ibm.mashups.enabler.user.VirtualType"]){dojo._hasResource["com.ibm.mashups.enabler.user.VirtualType"]=true;dojo.provide("com.ibm.mashups.enabler.user.VirtualType");dojo.declare("com.ibm.mashups.enabler.user.VirtualType",null,{ALL_AUTHENTICATED_GROUP:"all authenticated group",ALL_PORTAL_GROUP:"all portal group",ANONYMOUS_USER:"anonymous user",UNKNOWN:"unknown"});com.ibm.mashups.enabler.user.VirtualType=new com.ibm.mashups.enabler.user.VirtualType();}if(!dojo._hasResource["com.ibm.mashups.enabler.user.Entity_API"]){dojo._hasResource["com.ibm.mashups.enabler.user.Entity_API"]=true;dojo.provide("com.ibm.mashups.enabler.user.Entity_API");dojo.provide("com.ibm.mashups.enabler.user.Entity");dojo.declare("com.ibm.mashups.enabler.user.Entity",[com.ibm.mashups.enabler.Identifiable],{getDisplayName:function(){},getCN:function(){},getAttribute:function(name){},getReadOnlyAttributeNames:function(){},getReadWriteAttributeNames:function(){},getAttributeNames:function(){},isVirtual:function(){},getVirtualType:function(){},getEntityType:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.user.EntityImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.EntityImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.EntityImpl");dojo.declare("com.ibm.mm.enabler.user.EntityImpl",[com.ibm.mashups.enabler.user.Entity,com.ibm.mm.enabler.persistence.PersistenceHandlerImpl],{constructor:function(){var e=com.ibm.mashups.enabler;this._initDelegators(e.Identifiable.prototype);var u=e.user;this._initDelegators(u.Entity.prototype);var um=com.ibm.mashups.enabler.user.Factory.getUserModel();this._initTransition(um,um.getModifiableNode);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.user.Entity"]){dojo._hasResource["com.ibm.mashups.enabler.user.Entity"]=true;dojo.provide("com.ibm.mashups.enabler.user.Entity");}if(!dojo._hasResource["com.ibm.mashups.enabler.user.User_API"]){dojo._hasResource["com.ibm.mashups.enabler.user.User_API"]=true;dojo.provide("com.ibm.mashups.enabler.user.User_API");dojo.provide("com.ibm.mashups.enabler.user.User");dojo.declare("com.ibm.mashups.enabler.user.User",[com.ibm.mashups.enabler.user.Entity],{getLoginName:function(){},getSN:function(){},getEmail:function(){},setAttribute:function(name,value){},removeAttribute:function(name){}});}if(!dojo._hasResource["com.ibm.mm.enabler.user.UserImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.UserImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.UserImpl");dojo.declare("com.ibm.mm.enabler.user.UserImpl",[com.ibm.mashups.enabler.user.User,com.ibm.mm.enabler.user.EntityImpl],{constructor:function(){this._initDelegators(com.ibm.mashups.enabler.user.User.prototype);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.user.User"]){dojo._hasResource["com.ibm.mashups.enabler.user.User"]=true;dojo.provide("com.ibm.mashups.enabler.user.User");}if(!dojo._hasResource["com.ibm.mashups.enabler.user.CurrentUser_API"]){dojo._hasResource["com.ibm.mashups.enabler.user.CurrentUser_API"]=true;dojo.provide("com.ibm.mashups.enabler.user.CurrentUser_API");dojo.provide("com.ibm.mashups.enabler.user.CurrentUser");dojo.declare("com.ibm.mashups.enabler.user.CurrentUser",[com.ibm.mashups.enabler.user.User],{getJ2EEPrincipalName:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.user.CurrentUserImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.CurrentUserImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.CurrentUserImpl");dojo.declare("com.ibm.mm.enabler.user.CurrentUserImpl",[com.ibm.mashups.enabler.user.CurrentUser,com.ibm.mm.enabler.user.UserImpl],{constructor:function(){this._initDelegators(com.ibm.mashups.enabler.user.CurrentUser.prototype);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.user.CurrentUser"]){dojo._hasResource["com.ibm.mashups.enabler.user.CurrentUser"]=true;dojo.provide("com.ibm.mashups.enabler.user.CurrentUser");}if(!dojo._hasResource["com.ibm.mashups.enabler.user.Group_API"]){dojo._hasResource["com.ibm.mashups.enabler.user.Group_API"]=true;dojo.provide("com.ibm.mashups.enabler.user.Group_API");dojo.provide("com.ibm.mashups.enabler.user.Group");dojo.declare("com.ibm.mashups.enabler.user.Group",[com.ibm.mashups.enabler.user.Entity],{});}if(!dojo._hasResource["com.ibm.mm.enabler.user.GroupImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.GroupImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.GroupImpl");dojo.declare("com.ibm.mm.enabler.user.GroupImpl",[com.ibm.mashups.enabler.user.Group,com.ibm.mm.enabler.user.EntityImpl],{constructor:function(){this._initDelegators(com.ibm.mashups.enabler.user.Group.prototype);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.user.Group"]){dojo._hasResource["com.ibm.mashups.enabler.user.Group"]=true;dojo.provide("com.ibm.mashups.enabler.user.Group");}if(!dojo._hasResource["com.ibm.mashups.enabler.user.Attribute_API"]){dojo._hasResource["com.ibm.mashups.enabler.user.Attribute_API"]=true;dojo.provide("com.ibm.mashups.enabler.user.Attribute_API");dojo.provide("com.ibm.mashups.enabler.user.Attribute");dojo.declare("com.ibm.mashups.enabler.user.Attribute",null,{getName:function(){},getType:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.user.AttributeImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.AttributeImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.AttributeImpl");dojo.declare("com.ibm.mm.enabler.user.AttributeImpl",[com.ibm.mashups.enabler.user.Attribute,com.ibm.mm.enabler.persistence.PersistenceHandlerImpl],{constructor:function(){var u=com.ibm.mashups.enabler.user;this._initDelegators(u.Attribute.prototype);var um=com.ibm.mashups.enabler.user.Factory.getUserModel();this._initTransition(um,um.getModifiableNode);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.user.Attribute"]){dojo._hasResource["com.ibm.mashups.enabler.user.Attribute"]=true;dojo.provide("com.ibm.mashups.enabler.user.Attribute");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.UserModel_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.UserModel_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.UserModel_API");dojo.provide("com.ibm.mashups.enabler.model.UserModel");dojo.declare("com.ibm.mashups.enabler.model.UserModel",[com.ibm.mashups.enabler.Commitable,com.ibm.mashups.enabler.ListModel,com.ibm.mashups.enabler.Locator],{getAnonymousMode:function(){},findCurrentUser:function(){},findUsersByAttribute:function(_112a,_112b){},findGroupByID:function(id){return new Deferred();},findGroupsByAttribute:function(_112c,_112d){return new Deferred();},findGroupAttributes:function(){return [];},findUserAttributes:function(){return [];},getVirtualUsers:function(){return [];},getVirtualGroups:function(){return [];},getLookasideAttributeNames:function(){return [];}});}if(!dojo._hasResource["com.ibm.mm.enabler.user.AllAuthGroupImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.AllAuthGroupImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.AllAuthGroupImpl");dojo.declare("com.ibm.mm.enabler.user.AllAuthGroupImpl",[com.ibm.mm.enabler.user.EntityImpl],{constructor:function(_112e,_112f){this.allAuthID=_112e;this.allAuthIDEncoded=_112f;},getID:function(){return this.allAuthID;},getCN:function(){return "all authenticated portal users";},getDisplayName:function(){this.iwStr=dojo.i18n.getLocalization("com.ibm.mm.enabler","iwStr");return this.iwStr.ALL_AUTH;},getEntityType:function(){return "group";},getAttribute:function(_1130){return null;},isVirtual:function(){return true;},getVirtualType:function(){return com.ibm.mashups.enabler.user.VirtualType.ALL_AUTHENTICATED_GROUP;}});}if(!dojo._hasResource["com.ibm.mm.enabler.user.AllPortalGroupImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.AllPortalGroupImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.AllPortalGroupImpl");dojo.declare("com.ibm.mm.enabler.user.AllPortalGroupImpl",[com.ibm.mm.enabler.user.EntityImpl],{constructor:function(_1131,_1132){this.allPortalID=_1131;this.allPortalIDEncoded=_1132;},getID:function(){return this.allPortalID;},getCN:function(){return "all portal users";},getDisplayName:function(){this.iwStr=dojo.i18n.getLocalization("com.ibm.mm.enabler","iwStr");return this.iwStr.ALL_PORTAL;},getEntityType:function(){return "group";},getAttribute:function(_1133){return null;},isVirtual:function(){return true;},getVirtualType:function(){return com.ibm.mashups.enabler.user.VirtualType.ALL_PORTAL_GROUP;}});}if(!dojo._hasResource["com.ibm.mm.enabler.user.AnonUserImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.AnonUserImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.AnonUserImpl");dojo.declare("com.ibm.mm.enabler.user.AnonUserImpl",[com.ibm.mm.enabler.user.EntityImpl],{constructor:function(_1134,_1135){this.anonUserID=_1134;this.anonUserIDEncoded=_1135;},getAttribute:function(_1136){return null;},getAttributeNames:function(){return [];},getID:function(){return this.anonUserID;},getLoginName:function(){return "anonymous portal user";},getSN:function(){return "anonymous portal user";},getCN:function(){return "anonymous portal user";},getEmail:function(){return null;},getDisplayName:function(){this.iwStr=dojo.i18n.getLocalization("com.ibm.mm.enabler","iwStr");return this.iwStr.ANON;},getEntityType:function(){return "user";},setAttribute:function(name,value){return null;},removeAttribute:function(name){return null;},getChangedAttributeNames:function(){return {};},getAddedAttributeNames:function(){return {};},getRemovedAttributeNames:function(){return {};},clearChangedAttributeNames:function(){},isVirtual:function(){return true;},getVirtualType:function(){return com.ibm.mashups.enabler.user.VirtualType.ANONYMOUS_USER;}});}if(!dojo._hasResource["com.ibm.mm.enabler.user.UserModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.UserModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.UserModelImpl");dojo.provide("com.ibm.mm.enabler.model.UserModel.iConfig");dojo.declare("com.ibm.mm.enabler.user.UserModelImpl",[com.ibm.mashups.enabler.ListModel,com.ibm.mm.enabler.model.ModelImpl,com.ibm.mm.enabler.LazyLoadSupport],{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;var _1137=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var eps=_1137.getValue("ConfigProvider.Endpoints");this.anonUserID=_1137.getValue(com.ibm.mashups.enabler.services.ConfigConstants.ANON_VIRTUAL_USER_ID);if((typeof this.anonUserID=="undefined")||(this.anonUserID===null)){this.anonUserID="anonymous portal user";}this.allAuthID=_1137.getValue(com.ibm.mashups.enabler.services.ConfigConstants.ALL_AUTH_VIRTUAL_GROUP_ID);if((typeof this.allAuthID=="undefined")||(this.allAuthID===null)){this.allAuthID="all authenticated portal users";}this.allPortalID=_1137.getValue(com.ibm.mashups.enabler.services.ConfigConstants.ALL_PORTAL_VIRTUAL_GROUP_ID);if((typeof this.allPortalID=="undefined")||(this.allPortalID===null)){this.allPortalID="all portal users";}this.anonEnabled=false;var _1138=_1137.getValue(com.ibm.mashups.enabler.services.ConfigConstants.ANON_MODE_ENABLED)||false;if(_1138===true||_1138=="true"||_1138=="on"||_1138=="TRUE"||_1138=="ON"){this.anonEnabled=true;}this.anonUserIDEncoded=encodeURIComponent(this.anonUserID);this.allAuthIDEncoded=encodeURIComponent(this.allAuthID);this.allPortalIDEncoded=encodeURIComponent(this.allPortalID);this.anonUser=null;this.allAuth=null;this.allPortal=null;this.currentUser=null;this.loadedUsers={};},_lazyInit:function(){if(this.anonUser){return;}this.anonUser=new com.ibm.mm.enabler.user.AnonUserImpl(this.anonUserID,this.anonUserIDEncoded);this.allAuth=new com.ibm.mm.enabler.user.AllAuthGroupImpl(this.allAuthID,this.allAuthIDEncoded);this.allPortal=new com.ibm.mm.enabler.user.AllPortalGroupImpl(this.allPortalID,this.allPortalIDEncoded);},_getPersistenceModel:function(){var m=this._getJsonModel();return m?m:this._getXmlModel();},_hasXmlModel:function(){return !!this._xmlModel;},_getXmlModel:function(){if(!this._xmlModel){this.lazyLoadModules(["UserModelXml"]);dojo["require"]("com.ibm.mm.enabler.user.persistence.xml.UserModelImpl");this._xmlModel=com.ibm.mm.enabler.user.persistence.xml.UserModelImpl.prototype._getInstance(this.anonUserID,this.anonUserIDEncoded,this.anonUser,this.allAuthID,this.allAuthIDEncoded,this.allAuth,this.allPortalID,this.allPortalIDEncoded,this.allPortal);}return this._xmlModel;},_hasJsonModel:function(){return !!this._jsonModel;},_getJsonModel:function(){if((ibmConfig)&&(ibmConfig.json)&&(ibmConfig.json.userAttributes)&&(ibmConfig.json.user)){if(!this._jsonModel){dojo["require"]("com.ibm.mm.enabler.user.persistence.json.UserModelImpl");this._jsonModel=com.ibm.mm.enabler.user.persistence.json.UserModelImpl.prototype._getInstance(this.anonUserID,this.anonUserIDEncoded,this.anonUser,this.allAuthID,this.allAuthIDEncoded,this.allAuth,this.allPortalID,this.allPortalIDEncoded,this.allPortal);}return this._jsonModel;}return null;},_getInstance:function(){var _1139=com.ibm.mm.enabler.user.UserModelImpl._instance;return _1139?_1139:(com.ibm.mm.enabler.user.UserModelImpl._instance=new com.ibm.mm.enabler.user.UserModelImpl());},getAnonymousMode:function(){return com.ibm.mm.enabler.AnonymousHelper.getAnonymousMode();},getVirtualUsers:function(){return new com.ibm.mm.enabler.DeferredImpl(this,this._getVirtualUsers);},_getVirtualUsers:function(dfr,sync){this._lazyInit();var users=[];if(this.anonEnabled){users.push(this.anonUser);}return users;},getVirtualGroups:function(){return new com.ibm.mm.enabler.DeferredImpl(this,this._getVirtualGroups);},_getVirtualGroups:function(dfr,sync){this._lazyInit();var _113a=[];_113a.push(this.allAuth);_113a.push(this.allPortal);return _113a;},find:function(uri){return new com.ibm.mm.enabler.DeferredImpl(this,function(dfr,sync,id){var _113b="find";var _113c=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_113c){this.LOGGER.entering(_113b,arguments);}this._lazyInit();if(this.currentUser!==null&&this.currentUser.getID()==id){if(dfr){dfr.finish(this.currentUser,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return this.currentUser;}if((id===this.anonUserID)||(id===this.anonUserIDEncoded)){this.entry=this.anonUser;if(dfr){dfr.finish(this.entry,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return this.anonUser;}if((id===this.allAuthID)||(id===this.allAuthIDEncoded)){this.entry=this.allAuth;if(dfr){dfr.finish(this.entry,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return this.allAuth;}if((id===this.allPortalID)||(id===this.allPortalIDEncoded)){this.entry=this.allPortal;if(dfr){dfr.finish(this.entry,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return this.allPortal;}if(id in this.loadedUsers){this.entry=this.loadedUsers[id];if(dfr){dfr.finish(this.entry,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return this.entry;}var _113d=null;var _113e=this._getXmlModel().find(id);_113e.setFinishedCallback(dojo.hitch(this,function(node,_113f){if(node){var _1140=new com.ibm.mm.enabler.user.UserImpl();_1140._setPersistence(node);_113d=this.loadedUsers[_1140.getID()]=_1140;}dfr.finish(_113d,_113f);}));_113e.start(sync);if(_113c){this.LOGGER.exiting(_113b);}return _113d;},uri);},getModifiableNode:function(node){return new com.ibm.mm.enabler.DeferredImpl(this,function(_1141,sync,node){var _1142="getModifiable";var _1143=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1143){this.LOGGER.entering(_1142,arguments);}var id=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(node);var _1144;if(!(this.loadedUsers[id])||!this.loadedUsers[id]._getPersistence().data.ownerDocument){var dfr;if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(node,com.ibm.mashups.enabler.user.CurrentUser)){dfr=this._getXmlModel().findCurrentUser(id);dfr.setFinishedCallback(dojo.hitch(this,function(node,_1145){if(node){if(this.currentUser){this.currentUser._setPersistence(node);this.loadedUsers[id]=this.currentUser;}else{var _1146=new com.ibm.mm.enabler.user.CurrentUserImpl();_1146._setPersistence(node);this.currentUser=_1146;this.loadedUsers[id]=_1146;}_1144=this.loadedUsers[id];}_1141.finish(_1144,_1145);}));dfr.start();}else{dfr=this._getXmlModel().find(id);dfr.setFinishedCallback(dojo.hitch(this,function(node,_1147){if(node){if(this.loadedUsers[id]){this.loadedUsers[id]._setPersistence(node);}else{var _1148=new com.ibm.mm.enabler.user.UserImpl();_1148._setPersistence(node);this.loadedUsers[id]=_1148;}_1144=this.loadedUsers[id];}_1141.finish(_1144,_1147);}));dfr.start();}if(_1141){_1141.finish(this.loadedUsers[id],com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}_1144=this.loadedUsers[id];}if(_1143){this.LOGGER.exiting(_1142,_1144);}return _1144;},node);},findUserAttributes:function(){return new com.ibm.mm.enabler.DeferredImpl(this,function(dfr,sync){var _1149="findUserAttributes";var _114a=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_114a){this.LOGGER.entering(_1149,arguments);}var _114b=null;var _114c=this._getPersistenceModel().findUserAttributes();_114c.setFinishedCallback(dojo.hitch(this,function(nodes,_114d){if(nodes){_114b=[];for(var i=0;i0;i--){var _1162=this._filters[p][i-1];try{_1161=_1162.fn.apply(_1162.scope||null,[data]);}catch(e){this.LOGGER.warning("_getType","Type mapping filter failed to execute; skipping. Reason: "+e.message);}if(_1161){break;}}return _1161||null;}});com.ibm.mashups.enabler.navigation.persistence.TypeMappingRegistry=new com.ibm.mm.enabler.navigation.persistence.TypeMappingRegistryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.navigation.persistence.TypeMappingRegistry"]){dojo._hasResource["com.ibm.mashups.enabler.navigation.persistence.TypeMappingRegistry"]=true;dojo.provide("com.ibm.mashups.enabler.navigation.persistence.TypeMappingRegistry");}if(!dojo._hasResource["com.ibm.mashups.enabler.persistence.Constants"]){dojo._hasResource["com.ibm.mashups.enabler.persistence.Constants"]=true;dojo.provide("com.ibm.mashups.enabler.persistence.Constants");dojo.declare("com.ibm.mashups.enabler.persistence.Constants",null,{NAVIGATION_MODEL_PERSISTENCE_PROVIDER:"NavigationModelPersistenceProvider",SPACE_MODEL_PERSISTENCE_PROVIDER:"SpaceModelPersistenceProvider"});com.ibm.mashups.enabler.persistence.Constants=new com.ibm.mashups.enabler.persistence.Constants();}if(!dojo._hasResource["com.ibm.mashups.enabler.persistence.ModelPersistenceProvider"]){dojo._hasResource["com.ibm.mashups.enabler.persistence.ModelPersistenceProvider"]=true;dojo.provide("com.ibm.mashups.enabler.persistence.ModelPersistenceProvider");dojo.declare("com.ibm.mashups.enabler.persistence.ModelPersistenceProvider",null,{findBySelection:function(url,_1163,_1164,_1165){},create:function(_1166){},remove:function(_1167,_1168,_1169){},store:function(_116a,_116b,_116c){},getModifiable:function(node){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.persistence.NavigationModelPersistenceProvider"]){dojo._hasResource["com.ibm.mashups.enabler.persistence.NavigationModelPersistenceProvider"]=true;dojo.provide("com.ibm.mashups.enabler.persistence.NavigationModelPersistenceProvider");dojo.declare("com.ibm.mashups.enabler.persistence.NavigationModelPersistenceProvider",[com.ibm.mashups.enabler.persistence.ModelPersistenceProvider],{find:function(url,_116d,_116e){},findBySelection:function(url,_116f,_1170,_1171){},create:function(_1172){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.persistence.SpaceModelPersistenceProvider"]){dojo._hasResource["com.ibm.mashups.enabler.persistence.SpaceModelPersistenceProvider"]=true;dojo.provide("com.ibm.mashups.enabler.persistence.SpaceModelPersistenceProvider");dojo.declare("com.ibm.mashups.enabler.persistence.SpaceModelPersistenceProvider",[com.ibm.mashups.enabler.persistence.ModelPersistenceProvider],{find:function(url,_1173,_1174){},findBySelection:function(url,_1175,_1176,_1177){},create:function(_1178){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.persistence.Factory_API"]){dojo._hasResource["com.ibm.mashups.enabler.persistence.Factory_API"]=true;dojo.provide("com.ibm.mashups.enabler.persistence.Factory_API");dojo.provide("com.ibm.mashups.enabler.persistence.Factory");dojo.declare("com.ibm.mashups.enabler.persistence.Factory",null,{getModelPersistenceProvider:function(type){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.persistence.Factory"]){dojo._hasResource["com.ibm.mashups.enabler.persistence.Factory"]=true;dojo.provide("com.ibm.mashups.enabler.persistence.Factory");}if(!dojo._hasResource["com.ibm.mashups.enabler.services.StrategyService_API"]){dojo._hasResource["com.ibm.mashups.enabler.services.StrategyService_API"]=true;dojo.provide("com.ibm.mashups.enabler.services.StrategyService_API");dojo.provide("com.ibm.mashups.enabler.services.StrategyService");dojo.declare("com.ibm.mashups.enabler.services.StrategyService",null,{SERVICE_NAME:"strategyService",setStrategy:function(model,_1179){},getStrategies:function(model){},getStrategy:function(model,_117a){},addStrategy:function(model,_117b){},removeStrategy:function(model,_117c){}});com.ibm.mashups.enabler.services.StrategyService.SERVICE_NAME="strategyService";}if(!dojo._hasResource["com.ibm.mm.enabler.services.StrategyServiceImpl"]){dojo._hasResource["com.ibm.mm.enabler.services.StrategyServiceImpl"]=true;dojo.provide("com.ibm.mm.enabler.services.StrategyServiceImpl");dojo.declare("com.ibm.mm.enabler.services.StrategyServiceImpl",[com.ibm.mashups.enabler.services.StrategyService],{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.map={};this.map["com.ibm.mashups.enabler.widget.WidgetModel"]=new com.ibm.mm.enabler.model.ModelImpl();this.map["com.ibm.mashups.enabler.layout.LayoutModel"]=new com.ibm.mm.enabler.model.ModelImpl();},setStrategy:function(model,_117d){var _117e=this.map[model];if(_117e){_117e.setStrategy(_117d);}},getStrategies:function(model){var _117f=this.map[model];if(_117f){return _117f.getStrategies(strategy);}return null;},getStrategy:function(model,_1180){var _1181=this.map[model];if(_1181){return _1181.getStrategy(_1180);}return null;},addStrategy:function(model,_1182){var _1183=this.map[model];if(_1183){_1183.addStrategy(_1182);}},removeStrategy:function(model,_1184){var _1185=this.map[model];if(_1185){_1185.removeStrategy(_1184);}}});com.ibm.mashups.services.ServiceManager.setService("strategyService","com.ibm.mm.enabler.services.StrategyServiceImpl");}if(!dojo._hasResource["com.ibm.mashups.enabler.services.StrategyService"]){dojo._hasResource["com.ibm.mashups.enabler.services.StrategyService"]=true;dojo.provide("com.ibm.mashups.enabler.services.StrategyService");}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.CatalogCategoryLoadAheadStrategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.CatalogCategoryLoadAheadStrategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.CatalogCategoryLoadAheadStrategy");dojo.declare("com.ibm.mashups.enabler.strategy.CatalogCategoryLoadAheadStrategy",com.ibm.mashups.enabler.strategy.Strategy,{constructor:function(_1186){this.loadAheadCatalogCategoryModel=_1186;this.catalogCategoryModel=null;},isLoadAheadCatalogCategoryModel:function(){return this.loadAheadCatalogCategoryModel;},setCatalogCategoryModel:function(_1187){this.catalogCategoryModel=_1187||null;},getCatalogCategoryModel:function(){if(null===this.catalogCategoryModel){this.catalogCategoryModel=com.ibm.mashups.enabler.catalog.Factory.getCatalogCategoryModel();}return this.catalogCategoryModel;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.PageLoadAheadStrategy_API"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.PageLoadAheadStrategy_API"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.PageLoadAheadStrategy_API");dojo.provide("com.ibm.mashups.enabler.strategy.PageLoadAheadStrategy");dojo.declare("com.ibm.mashups.enabler.strategy.PageLoadAheadStrategy",com.ibm.mashups.enabler.strategy.Strategy,{constructor:function(_1188,_1189,_118a){},isLoadAheadLayoutModel:function(){return this.loadAheadLayoutModel;},isLoadAheadTheme:function(){return this.loadAheadTheme;}});}if(!dojo._hasResource["com.ibm.mm.enabler.strategy.PageLoadAheadStrategyImpl"]){dojo._hasResource["com.ibm.mm.enabler.strategy.PageLoadAheadStrategyImpl"]=true;dojo.provide("com.ibm.mm.enabler.strategy.PageLoadAheadStrategyImpl");dojo.declare("com.ibm.mm.enabler.strategy.PageLoadAheadStrategyImpl",[com.ibm.mashups.enabler.strategy.PageLoadAheadStrategy,com.ibm.mm.enabler.ServiceDocConsumer],{constructor:function(_118b,_118c,_118d){this.loadAheadLayoutModel=!!_118b;this.loadAheadUser=!!_118d;this.userModel=null;var _118e=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _118f=_118e.getValue(com.ibm.mashups.enabler.services.ConfigConstants.PAGE_LOAD_OPTIMIZATION_THEME);if(_118f===true){this.loadAheadTheme=!!_118c;}else{this.loadAheadTheme=false;}},_initServiceDoc:function(){this.inherited("_initServiceDoc",arguments);this.serviceJson=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_NAVIGATION);var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns=dojo.delegate(this.serviceJson.namespaces,nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_THR,nsf.NS_XML,nsf.NS_OPENSEARCH]));this.prefix=this.serviceJson.idprefix;},isLoadAheadLayoutModel:function(){return this.loadAheadLayoutModel;},isLoadAheadTheme:function(){return this.loadAheadTheme;},isLoadAheadUser:function(){return this.loadAheadUser;},setUserModel:function(_1190){this.userModel=_1190;},getUserModel:function(){if(!this.userModel){this.userModel=com.ibm.mashups.enabler.user.Factory.getUserModel();}return this.userModel;},_processLoadAhead:function(_1191,sync){if(!com.ibm.mashups.enabler.io.XHRMultipartFactory.isMultipartEnabled()){return;}var _1192=com.ibm.mashups.enabler.io.XHRMultipartFactory.create();_1192.startTransaction();if(this.loadAheadUser){var _1193=this.getUserModel();_1193.findCurrentUser().start();}this._initServiceDoc();for(var i=0;i<_1191.length;i++){if(this.loadAheadLayoutModel){var href=null;var id=null;var expr="atom:link[@rel='related' and @ext:class='content-node']";var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,_1191[i].xmlData,this.ns);if(node){href=node.getAttribute("href");id=com.ibm.mm.enabler.utils.Utils.getIdFromExtUri(this.prefix,node);}var _1194=(id!==null)?id:_1191[i].getID();var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(href,null);var _1195=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);_1195.read(dojo.hitch(this,function(type,data,xhr,args){if((type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD)&&(args.node)){var _1196=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("atom:feed/atom:entry",data,this.ns);if(_1196){args.node._setFragmentData(_1196);}}}),{"node":_1191[i]});myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.FRAGMENT_MEDIA_URL,null);myUrl.setNodes([{value:_1194,isID:true},{value:"index.html",isID:false}]);_1195=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,true,sync);_1195.read(dojo.hitch(this,function(type,data,xhr,args){if((type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD)&&(args.node)){args.node._setFragmentMediaData(data);}}),{"node":_1191[i]});}if(this.loadAheadTheme){var _1197=_1191[i].getThemeIdentifier().getID();if(_1197!==null){var _1198=com.ibm.mashups.enabler.theme.Factory.getThemeModel();_1198.find(_1197).start();}}}_1192.endTransactionDeferred().start();},_processFind:function(node,sync){if(this.loadAheadLayoutModel){this._initServiceDoc();var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.FRAGMENT_URL,null);var uri="0";myUrl.setNodes([{value:uri,isID:true}]);serviceReq=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);serviceReq.read(dojo.hitch(this,function(type,data,xhr,args){if((type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD)&&(node)){var _1199=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("atom:feed/atom:entry",data,this.ns);if(_1199){node._setFragmentData(_1199);}}}));myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.FRAGMENT_MEDIA_URL,null);myUrl.setNodes([{value:uri,isID:true},{value:"index.html",isID:false}]);serviceReq=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,true,sync);serviceReq.read(dojo.hitch(this,function(type,data,xhr,args){if((type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD)&&(node)){node._setFragmentMediaData(data);}}));}if(this.loadAheadTheme){var _119a=com.ibm.mashups.enabler.theme.Factory.getThemeModel();_119a.find("0").start();}}});com.ibm.mashups.enabler.strategy.PageLoadAheadStrategy=com.ibm.mm.enabler.strategy.PageLoadAheadStrategyImpl;}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.PageLoadAheadStrategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.PageLoadAheadStrategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.PageLoadAheadStrategy");}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.WidgetWindowLoadAheadStrategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.WidgetWindowLoadAheadStrategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.WidgetWindowLoadAheadStrategy");dojo.declare("com.ibm.mashups.enabler.strategy.WidgetWindowLoadAheadStrategy",com.ibm.mashups.enabler.strategy.Strategy,{constructor:function(_119b){this.windowMap=_119b;},getWidgetWindowMap:function(){return this.windowMap;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.Factory_API"]){dojo._hasResource["com.ibm.mashups.enabler.widget.Factory_API"]=true;dojo.provide("com.ibm.mashups.enabler.widget.Factory_API");dojo.provide("com.ibm.mashups.enabler.widget.Factory");dojo.declare("com.ibm.mashups.enabler.widget.Factory",null,{getWidgetModel:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.widget.FactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.widget.FactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.widget.FactoryImpl");dojo.declare("com.ibm.mm.enabler.widget.FactoryImpl",[com.ibm.mashups.enabler.widget.Factory,com.ibm.mm.enabler.LazyLoadSupport],{getWidgetModel:function(){com.ibm.mashups.enabler.widget.Factory.lazyLoadModules(["WidgetModel"]);return com.ibm.mm.enabler.widget.WidgetModelImpl.prototype.getInstance();}});com.ibm.mashups.enabler.widget.Factory=new com.ibm.mm.enabler.widget.FactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.Factory"]){dojo._hasResource["com.ibm.mashups.enabler.widget.Factory"]=true;dojo.provide("com.ibm.mashups.enabler.widget.Factory");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.Constants"]){dojo._hasResource["com.ibm.mashups.enabler.model.Constants"]=true;dojo.provide("com.ibm.mashups.enabler.model.Constants");dojo.declare("com.ibm.mashups.enabler.model.Constants",null,{constructor:function(){this.SCHEME_SEPARATOR=":";this.CLIENT_ID_SCHEME="cid";this.CLIENT_ID_PREFIX=this.CLIENT_ID_SCHEME+this.SCHEME_SEPARATOR;}});com.ibm.mashups.enabler.model.Constants=new com.ibm.mashups.enabler.model.Constants();}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.PersistenceImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.PersistenceImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.PersistenceImpl");dojo.declare("com.ibm.mm.enabler.persistence.PersistenceImpl",null,{_setContext:function(ctx){this._ctx=ctx;},_getContext:function(){return this._ctx;},_getBaseContext:function(){var base;var ctx=this._getContext();if(ctx&&dojo.isFunction(ctx.getBaseContext)){base=ctx.getBaseContext();}return base||this;}});}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.json.JsonPersistenceImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.json.JsonPersistenceImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.json.JsonPersistenceImpl");dojo.declare("com.ibm.mm.enabler.persistence.json.JsonPersistenceImpl",[com.ibm.mm.enabler.persistence.PersistenceImpl],{constructor:function(d){this.data=d;},toString:function(){return dojo.toJson(this.data);},_getJsonData:function(){return this.data;}});}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.json.IdentifiableJsonImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.json.IdentifiableJsonImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.json.IdentifiableJsonImpl");dojo.declare("com.ibm.mm.enabler.persistence.json.IdentifiableJsonImpl",[com.ibm.mashups.enabler.Identifiable],{getID:function(){return this.data.id;},isDirty:function(){return false;}});}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.json.MetaDataJsonImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.json.MetaDataJsonImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.json.MetaDataJsonImpl");dojo.declare("com.ibm.mm.enabler.persistence.json.MetaDataJsonImpl",[com.ibm.mm.enabler.persistence.meta.MetaDataMetaImpl],{getMetaDataNames:function(){var _119c=[];com.ibm.mm.enabler.utils.Misc.forIn(this.data.metadata,function(value,name){_119c.push(name);},this);return _119c;},getMetaData:function(name){return this.data.metadata?(this.data.metadata[name]||null):null;}});}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.json.EffectiveAccessJsonImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.json.EffectiveAccessJsonImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.json.EffectiveAccessJsonImpl");dojo.declare("com.ibm.mm.enabler.persistence.json.EffectiveAccessJsonImpl",[com.ibm.mashups.enabler.ac.EffectiveAccess],{hasRole:function(_119d){if(dojo.isString(_119d)){_119d=_119d.toUpperCase();}if(this.data.roles&&dojo.isArray(this.data.roles)){for(var i=0,l=this.data.roles.length;i0){for(var i=0;i<_122e.length;i++){var node=new com.ibm.mm.enabler.ac.MemberNodeImpl(this.roleID,_122e[i],this.um);this.accessControlModel.membersEntries[this.roleID][this.accessControlModel.membersCursor[this.roleID]+i]=node.getID();this.accessControlModel._cacheNodeMembers(this.roleID,node);}var len=this.accessControlModel.membersEntries[this.roleID].length;this.accessControlModel.membersEntries[this.roleID][len]=null;}else{this.accessControlModel.membersEntries[this.roleID]=[];this.accessControlModel.membersEntries[this.roleID][0]=null;}}},create:function(_122f){if(!_122f){throw new Error("MemberModelImpl.create: no context");}if(!_122f.type){throw new Error("MemberModelImpl.create: no type context");}if(!_122f.id){throw new Error("MemberModelImpl.create: no type context");}var entry=com.ibm.mm.enabler.utils.Utils.createNode("atom:entry",this.ns.atom);entry.appendChild(com.ibm.mm.enabler.utils.Utils.createNode("atom:id",this.ns.atom));var title=com.ibm.mm.enabler.utils.Utils.createNode("atom:title",this.ns.atom);com.ibm.mm.enabler.utils.Dom.textContent(title,"Member");entry.appendChild(title);var _1230=com.ibm.mm.enabler.utils.Utils.createNode("atom:updated",this.ns.atom);var time=new Date();com.ibm.mm.enabler.utils.Dom.textContent(_1230,time.toGMTString());entry.appendChild(_1230);var _1231=com.ibm.mm.enabler.utils.Utils.createNode("atom:content",this.ns.atom);_1231.setAttribute("type","application/xml");var _1232=com.ibm.mm.enabler.utils.Utils.createNode("ac:member",this.ns.ac);com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(_1232,"ac:id",this.nsf.getNameSpaceUri(this.nsf.NS_AC),_122f.id);com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(_1232,"ac:type",this.nsf.getNameSpaceUri(this.nsf.NS_AC),_122f.type);_1231.appendChild(_1232);entry.appendChild(_1231);var _1233=new com.ibm.mm.enabler.ac.MemberNodeImpl(this.roleID,entry,this.um);return _1233;},iterator:function(){return this;},start:function(sync){while(this._hasNext(this,sync)){if(this._next(this,sync)){continue;}else{break;}}},hasNext:function(){return this._hasNext(null,true);},_hasNext:function(_1234,sync){var _1235=false;var next=this.accessControlModel.membersEntries[this.roleID][this.accessControlModel.membersCursor[this.roleID]];if(next!==null&&next!==undefined){_1235=true;}return _1235;},next:function(){return this._next(null,true);},_next:function(_1236,sync){var _1237=this._hasNext(_1236,sync);var _1238=this.accessControlModel.membersEntries[this.roleID];var _1239=this.accessControlModel.membersLoadedNodes[this.roleID];var ret=_1237?_1239[_1238[this.accessControlModel.membersCursor[this.roleID]]]:null;this.accessControlModel.membersCursor[this.roleID]++;return ret;},size:function(){return this.accessControlModel.membersSizeValue[this.roleID];},setCursorPosition:function(_123a){this.accessControlModel.membersCursor[this.roleID]=_123a;},getCursorPosition:function(){return this.accessControlModel.membersCursor[this.roleID];},insert:function(node,_123b){if(!this.accessControlModel.changedProperties.role){this.accessControlModel.changedProperties.role=this.accessControlModel.getRoleModel()._getRoles();}this.accessControlModel.membersCreatedNodes[this.roleID][node.getID()]=node;var _123c=this.accessControlModel.membersEntries[this.roleID].length;if((!_123c)||(_123c===0)){this.accessControlModel.membersEntries[this.roleID][0]=node.getID();this.accessControlModel.membersEntries[this.roleID][1]=null;}else{this.accessControlModel.membersEntries[this.roleID][_123c-1]=node.getID();this.accessControlModel.membersEntries[this.roleID][_123c]=null;}this.accessControlModel._cacheNodeMembers(this.roleID,node);},find:function(id){return new com.ibm.mm.enabler.DeferredImpl(this,this._find,id);},_find:function(_123d,sync,id){if(id in this.accessControlModel.membersDeletedNodes[this.roleID]){if(_123d){_123d.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}return null;}if(id in this.accessControlModel.membersLoadedNodes[this.roleID]){if(_123d){_123d.finish(this.accessControlModel.membersLoadedNodes[this.roleID][id],com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return this.accessControlModel.membersLoadedNodes[this.roleID][id];}var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelUrl(com.ibm.mashups.enabler.model.url.ModelUrlFactory.AC_URL,this);myUrl.setNodes([{value:id,isID:true}]);var _123e=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);var entry=null;var _123f={};_123f.node=null;_123e.read(dojo.hitch(this,function(type,data,xhr,args){if(type!=com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){var nodes=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("http://atom:entry",data,this.ns);if(nodes){var _1240=new com.ibm.mm.enabler.ac.MemberNodeImpl(nodes,this);this.accessControlModel.membersNewid[this.roleID]=_1240.getID();this.membersLoadedNodes[this.roleID][this.membersNewid[this.roleID]]=_1240;_123f.node=this.accessControlModel.membersLoadedNodes[this.roleID][this.membersNewid[this.roleID]];}else{if(sync){_123f.status=com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND;}}}if(_123d){_123d.finish(_123f.node||null,xhr.status);}if(sync&&type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){if(xhr.status!=com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND){_123f.status=xhr.status;}}}));if(_123f.status){throw new Error(dojo.string.substitute(this.modelMessages.E_COMNODE_NOTFOUND_1,[id,_123f.status]));}retVal=_123f.node;return retVal;},remove:function(node){if(!this.accessControlModel.changedProperties.role){this.accessControlModel.changedProperties.role=this.accessControlModel.getRoleModel()._getRoles();}var id=node.getID();if(!(id in this.accessControlModel.membersDeletedNodes[this.roleID])){this.accessControlModel.membersDeletedNodesMemberIDs[this.roleID][id]=node.getEntity().getID();this.accessControlModel.membersDeletedNodes[this.roleID][id]=node;}if(id in this.accessControlModel.membersLoadedNodes[this.roleID]){delete this.accessControlModel.membersLoadedNodes[this.roleID][id];}}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.MemberModel"]){dojo._hasResource["com.ibm.mashups.enabler.ac.MemberModel"]=true;dojo.provide("com.ibm.mashups.enabler.ac.MemberModel");}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.RoleModel_API"]){dojo._hasResource["com.ibm.mashups.enabler.ac.RoleModel_API"]=true;dojo.provide("com.ibm.mashups.enabler.ac.RoleModel_API");dojo.provide("com.ibm.mashups.enabler.ac.RoleModel");dojo.declare("com.ibm.mashups.enabler.ac.RoleModel",[com.ibm.mashups.enabler.ListModelController],{create:function(_1241){},getMemberModel:function(_1242){}});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.RoleModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.RoleModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.RoleModelImpl");dojo.declare("com.ibm.mm.enabler.ac.RoleModelImpl",[com.ibm.mashups.enabler.ac.RoleModel,com.ibm.mashups.enabler.ListModel,com.ibm.mm.enabler.DeferredIteratorImpl,com.ibm.mm.enabler.model.ModelImpl,com.ibm.mm.enabler.ConfirmableModelImpl],{constructor:function(_1243,_1244){this.accessControlModel=_1243;this.um=_1244;this.modelMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","modelMessages");this.serviceJson=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_NAVIGATION);this.nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns=dojo.delegate(this.serviceJson.namespaces,this.nsf.getNameSpaces([this.nsf.NS_ATOM,this.nsf.NS_AC,this.nsf.NS_AI]));this.prefix="role";this.xmlDom=com.ibm.mm.enabler.utils.Dom.createDocument();this.cid=0;},create:function(_1245){if(!_1245){throw new Error("RoleModelImpl.create: no context");}if(!_1245.roletype){throw new Error("RoleModelImpl.create: no roletype context");}var _1246=this.getCursorPosition();this.setCursorPosition(0);var _1247=this.iterator();while(_1247.hasNext()){var role=_1247.next();if(role.getRoleType()==_1245.roletype){if(_1246){this.setCursorPosition(_1246);}else{this.setCursorPosition(0);}return null;}}var entry=com.ibm.mm.enabler.utils.Utils.createNode("atom:entry",this.ns.atom);entry.appendChild(com.ibm.mm.enabler.utils.Utils.createNode("atom:id",this.ns.atom));var title=com.ibm.mm.enabler.utils.Utils.createNode("atom:title",this.ns.atom);com.ibm.mm.enabler.utils.Dom.textContent(title,"Role");entry.appendChild(title);var _1248=com.ibm.mm.enabler.utils.Utils.createNode("atom:updated",this.ns.atom);var time=new Date();com.ibm.mm.enabler.utils.Dom.textContent(_1248,time.toGMTString());entry.appendChild(_1248);var _1249=com.ibm.mm.enabler.utils.Utils.createNode("atom:content",this.ns.atom);_1249.setAttribute("type","application/xml");var _124a=com.ibm.mm.enabler.utils.Utils.createNode("ac:role",this.ns.ac);var _124b=this.accessControlModel._getCreationRoleName(_1245.roletype);if(!_124b){_124b=_1245.roletype;}com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(_124a,"ac:type",this.nsf.getNameSpaceUri(this.nsf.NS_AC),_124b);com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(this.xmlDom,_124a,"creation-context:role-types","role-types",this.ns["creation-context"],_1245.roletype);var _124c=this.accessControlModel._getCreationResourceID();com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(this.xmlDom,_124a,"creation-context:resource-id","resource-id",this.ns["creation-context"],_124c);_1249.appendChild(_124a);entry.appendChild(_1249);var _124d=new com.ibm.mm.enabler.ac.RoleNodeImpl(entry,this.um,_1245.roletype);_124d.setID(""+(this.cid++));return _124d;},remove:function(role){if(!this.accessControlModel.changedProperties.role){this.accessControlModel.changedProperties.role=this._getRoles();}var _124e=role.getID();for(var i=this.accessControlModel.rolesEntries.length;i>0;i--){if(this.accessControlModel.rolesEntries[i]==_124e){this.accessControlModel.rolesEntries.splice(i,1);break;}}this.accessControlModel._removeNodeRoles(role);},iterator:function(){return this;},start:function(sync){while(this._hasNext(this,sync)){if(this._next(this,sync)){continue;}else{break;}}},hasNext:function(){return this._hasNext(null,true);},_hasNext:function(_124f,sync){var _1250=false;var next=this.accessControlModel.rolesEntries[this.accessControlModel.rolesCursor];if(next!==null&&next!==undefined){_1250=true;}return _1250;},next:function(){return this._next(null,true);},_next:function(_1251,sync){var _1252=this._hasNext(_1251,sync);var _1253=this.accessControlModel.rolesEntries;var _1254=this.accessControlModel.rolesLoadedNodes;var ret=_1252?_1254[_1253[this.accessControlModel.rolesCursor]]:null;this.accessControlModel.rolesCursor++;return ret;},size:function(){return this.accessControlModel.rolesSizeValue;},setCursorPosition:function(_1255){this.accessControlModel.rolesCursor=_1255;},getCursorPosition:function(){return this.accessControlModel.rolesCursor;},insert:function(node,_1256){if(!this.accessControlModel.changedProperties.role){this.accessControlModel.changedProperties.role=this._getRoles();}this.accessControlModel.rolesCreatedNodes[node.getID()]=node;var _1257=this.accessControlModel.rolesEntries.length;if((!_1257)||(_1257===0)){this.accessControlModel.rolesEntries[0]=node.getID();this.accessControlModel.rolesEntries[1]=null;}else{this.accessControlModel.rolesEntries[_1257-1]=node.getID();this.accessControlModel.rolesEntries[_1257]=null;}this.accessControlModel._cacheNodeRoles(node);},_getRoles:function(){var roles={};this.setCursorPosition(0);var _1258=this.iterator();while(_1258.hasNext()){var role=_1258.next();var _1259=role.getID();roles[_1259]=_1259;}return roles;},find:function(id){return new com.ibm.mm.enabler.DeferredImpl(this,this._find,id);},_find:function(_125a,sync,id){if(id in this.accessControlModel.rolesLoadedNodes){if(_125a){_125a.finish(this.accessControlModel.rolesLoadedNodes[id],com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return this.accessControlModel.rolesLoadedNodes[id];}if(id in this.accessControlModel.rolesDeletedNodes){if(_125a){_125a.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}return null;}var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.AC_URL,this);myUrl.setNodes([{value:id,isID:true}]);var _125b=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);var entry=null;var _125c={};_125c.node=null;_125b.read(dojo.hitch(this,function(type,data,xhr,args){if(type!=com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("http://atom:entry",data,this.ns);if(node){var _125d=new com.ibm.mm.enabler.ac.RoleNodeImpl(node,this);this.accessControlModel.rolesNewid=_125d.getID();this.rolesLoadedNodes[this.rolesNewid]=_125d;_125c.node=this.accessControlModel.rolesLoadedNodes[this.rolesNewid];}else{if(sync){_125c.status=com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND;}}}if(_125a){_125a.finish(_125c.node,xhr.status);}if(sync&&type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){if(xhr.status!=com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND){_125c.status=xhr.status;}}}));if(_125c.status){throw new Error(dojo.string.substitute(this.modelMessages.E_COMNODE_NOTFOUND_1,[id,_125c.status]));}retVal=_125c.node;return retVal;},getMemberModel:function(_125e){if(!_125e){return null;}var id=_125e.getID();if(!id){return null;}if(this.accessControlModel.memberModel){if(this.accessControlModel.memberModel[id]){return this.accessControlModel.memberModel[id];}}this.accessControlModel._loadAheadMember(_125e,null,true);if(this.accessControlModel.memberModel[id]){return this.accessControlModel.memberModel[id];}return null;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.RoleModel"]){dojo._hasResource["com.ibm.mashups.enabler.ac.RoleModel"]=true;dojo.provide("com.ibm.mashups.enabler.ac.RoleModel");}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.AccessControlModel_API"]){dojo._hasResource["com.ibm.mashups.enabler.ac.AccessControlModel_API"]=true;dojo.provide("com.ibm.mashups.enabler.ac.AccessControlModel_API");dojo.provide("com.ibm.mashups.enabler.ac.AccessControlModel");dojo.declare("com.ibm.mashups.enabler.ac.AccessControlModel",[com.ibm.mashups.enabler.model.Model],{isInitialized:function(){},getOwner:function(){},setOwner:function(user){},confirmSetOwner:function(user){},getRoleModel:function(){},getRoleModel:function(_125f){},confirmGetRoleModel:function(){},commit:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.ACLinkProviderImpl"]){dojo._hasResource["com.ibm.mm.enabler.ACLinkProviderImpl"]=true;dojo.provide("com.ibm.mm.enabler.ACLinkProviderImpl");dojo.declare("com.ibm.mm.enabler.ACLinkProviderImpl",null,{constructor:function(){var _1260=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_NAVIGATION);var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns_acrlp=dojo.delegate(_1260.namespaces,nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_XML,nsf.NS_EXT,nsf.NS_AC,nsf.NS_CA]));this.AC_RESOURCE_ATOM_LINK="atom:link[@ext:rel='ac-resource-config']";this.AC_ROLES_ATOM_LINK="atom:link[@ext:rel='roles']";this.CA_ROLES_ATOM_LINK="atom:link[@ca:rel='roles']";this.AC_MEMBERS_ATOM_LINK="atom:link[@ac:rel='members']";},getACResourceLink:function(_1261){var _1262=null;var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this.AC_RESOURCE_ATOM_LINK,_1261,this.ns_acrlp);if(node){_1262=node.getAttribute("href");}return _1262;},getACRolesLink:function(_1263){var _1264=null;var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this.AC_ROLES_ATOM_LINK,_1263,this.ns_acrlp);if(node){_1264=node.getAttribute("href");}return _1264;},getCARolesLink:function(_1265){var _1266=null;var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this.CA_ROLES_ATOM_LINK,_1265,this.ns_acrlp);if(node){_1266=node.getAttribute("href");}return _1266;},getACMembersLink:function(_1267){var _1268=null;var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this.AC_MEMBERS_ATOM_LINK,_1267,this.ns_acrlp);if(node){_1268=node.getAttribute("href");}return _1268;}});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.AccessControlModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.AccessControlModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.AccessControlModelImpl");dojo.declare("com.ibm.mm.enabler.ac.AccessControlModelImpl",[com.ibm.mashups.enabler.ac.AccessControlModel,com.ibm.mm.enabler.model.ModelImpl,com.ibm.mm.enabler.persistence.xml.IdentifiableXmlImpl,com.ibm.mm.enabler.ACLinkProviderImpl,com.ibm.mm.enabler.ConfirmableModelImpl],{constructor:function(_1269){this.mainResource=_1269;this.url=com.ibm.mashups.enabler.model.url.ModelUrlFactory.AI_URL;},_init:function(){this.initialContentsMembers=null;this.rolesLoadedNodes={};this.rolesCreatedNodes={};this.rolesDeletedNodes={};var _126a;this.roleModel=_126a;this.rolesStart=null;this.rolesNum=null;this.rolesSizeValue=9999;this.rolesEntries=[];this.rolesCursor=0;this.rolesSize=null;this.membersLoadedNodes={};this.membersCreatedNodes={};this.membersDeletedNodes={};this.membersDeletedNodesMemberIDs={};this.memberModel={};this.membersEntries={};this.membersCursor={};this.membersSize={};this.xmlDataMember={};this.initialContentsMember={};this.owner=null;this.modelMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","modelMessages");this.um=com.ibm.mashups.enabler.user.Factory.getUserModel();this.prefix="resource";this.nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns=this.nsf.getNameSpaces([this.nsf.NS_ATOM,this.nsf.NS_XML,this.nsf.NS_OPENSEARCH,this.nsf.NS_AC,this.nsf.NS_AI,this.nsf.NS_APP,this.nsf.NS_CA]);this.changedProperties={};},getResource:function(){return this.mainResource;},_isPageInSpace:function(){return false;},_getPossibleRoles:function(){return null;},_getRolesLink:function(){return null;},_getMembersLink:function(_126b){return null;},_getCreationRoleName:function(_126c){return null;},_getCreationResourceID:function(){return this.mainResource.getID();},_filterRole:function(node){return false;},setID:function(id){throw new Error(this.modelMessages.E_UNSUPPORTED_OP_0);},isInitialized:function(){return true;},getRoleModel:function(){if(this.roleModel===undefined){this._loadAheadRole(null,true);}return this.roleModel;},getRoleModel:function(_126d){if(this.roleModel===undefined){this._loadAheadRole(null,true);}return this.roleModel;},confirmGetRoleModel:function(){if(com.ibm.mm.enabler.AnonymousHelper.getAnonymousMode()==com.ibm.mashups.enabler.user.AnonymousMode.ANONYMOUS){return false;}return this.mainResource.hasRole(com.ibm.mashups.enabler.ac.RoleType.MANAGER);},_loadAheadRole:function(_126e,sync){var myUrl;var _126f;this.rolesEntries=[];this.rolesStart=0;this.rolesCursor=0;var _1270=this._getPossibleRoles();if((this._isPageInSpace())&&(_1270)){var i=0;for(var _1271 in _1270){if(Object.prototype.hasOwnProperty.call(_1270,_1271)){var _1272=_1270[_1271];myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(this.url,this);_126f=[{value:"collection",isID:false,subModel:com.ibm.mashups.enabler.model.url.ModelUrlFactory.SUBMODEL_ROLE},{value:this.mainResource.getID(),isID:true}];myUrl.setNodes(_126f);myUrl.setParameter("filter","type="+_1272);this.__loadAheadRole(myUrl,_126e,sync,i,_1271);i++;}}this.roleModel=new com.ibm.mm.enabler.ac.RoleModelImpl(this,this.um);}else{if(!this.rolesNextLink){var link=this._getRolesLink();if(link){myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(link,this);}else{myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(this.url,this);_126f=[{value:"collection",isID:false,subModel:com.ibm.mashups.enabler.model.url.ModelUrlFactory.SUBMODEL_ROLE},{value:this.mainResource.getID(),isID:true}];myUrl.setNodes(_126f);}}else{myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(this.rolesNextLink,this);}myUrl.setParameter("start",this.rolesPosition);if(this.url===com.ibm.mashups.enabler.model.url.ModelUrlFactory.AC_URL){myUrl.setParameter("filter","all");}if(this.strategy){for(var x in this.strategy){if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(this.strategy[x],com.ibm.mm.enabler.strategy.PageLoadAheadStrategyImpl)){myUrl.setParameter("num",this.strategy[x].getInterval());break;}}}this.__loadAheadRole(myUrl,_126e,sync,null);}},__loadAheadRole:function(myUrl,_1273,sync,_1274,_1275){var _1276=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);_1274=_1274||null;_1276.read(dojo.hitch(this,function(type,data,xhr,args){if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD){var expr,nodes;if(_1274===null){if(!this.rolesSizeValue){expr="atom:feed/openSearch:totalResults";var _1277=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,data,this.ns);if(_1277){this.rolesSizeValue=com.ibm.mm.enabler.utils.Dom.textContent(_1277);}}this.rolesNextLink=null;expr="atom:feed/atom:link[@rel='next']";nodes=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,data,this.ns);if(nodes){this.rolesNextLink=nodes.getAttribute("href");}}nodes=com.ibm.mashups.enabler.xml.XPath.evaluateXPath("http://atom:entry",data,this.ns);if(nodes.length>0){var i,c,l,node;if(_1274===null){for(i=0,c=0,l=nodes.length;i0){for(var i=0,l=nodes.length;i0){for(var i=0,l=_1294.length;i0);},_getRolesLink:function(){return this.getCARolesLink(this.mainResource.getXml());},_getMembersLink:function(_12d5){return this.getACMembersLink(_12d5);},getOwner:function(){return this.mainResource.getOwner();},getOwnerDeferred:function(){return this.mainResource.getOwnerDeferred();},setOwner:function(user){this.mainResource.setOwner(user);},confirmSetOwner:function(user){return this.mainResource.hasRole(com.ibm.mashups.enabler.ac.RoleType.MANAGER);},commit:function(){return new com.ibm.mm.enabler.DeferredOperationImpl(this,this._commit);},_commit:function(_12d6,sync){var e=com.ibm.mashups.enabler;if((typeof e.space!="undefined")&&(typeof e.space.Factory!="undefined")){var _12d7=e.space.Factory.getSpaceModel();_12d7.commit().start();}this.__commit(_12d6,sync);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.SpaceAccessControlModel"]){dojo._hasResource["com.ibm.mashups.enabler.ac.SpaceAccessControlModel"]=true;dojo.provide("com.ibm.mashups.enabler.ac.SpaceAccessControlModel");}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.ResourceSpaceAccessControlModel_API"]){dojo._hasResource["com.ibm.mashups.enabler.ac.ResourceSpaceAccessControlModel_API"]=true;dojo.provide("com.ibm.mashups.enabler.ac.ResourceSpaceAccessControlModel_API");dojo.provide("com.ibm.mashups.enabler.ac.ResourceSpaceAccessControlModel");dojo.declare("com.ibm.mashups.enabler.ac.ResourceSpaceAccessControlModel",com.ibm.mashups.enabler.ac.SpaceAccessControlModel,{});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.ResourceSpaceAccessControlModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.ResourceSpaceAccessControlModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.ResourceSpaceAccessControlModelImpl");dojo.declare("com.ibm.mm.enabler.ac.ResourceSpaceAccessControlModelImpl",[com.ibm.mashups.enabler.ac.ResourceSpaceAccessControlModel,com.ibm.mm.enabler.ac.ResourceAccessControlModelImpl],{_metaPrefix:"com.ibm.mashups.acl.role.",constructor:function(_12d8,_12d9){this.mainResource=_12d8;this.subResource=_12d9;this.url=com.ibm.mashups.enabler.model.url.ModelUrlFactory.AI_URL;this.url2=com.ibm.mashups.enabler.model.url.ModelUrlFactory.AC_URL;},_getRolesLink:function(){return this.getACRolesLink(this.mainResource.getXml());},_getResourceLink:function(){return this.getACResourceLink(this.subResource.getXml());},_getCreationRoleName:function(_12da){return _12da+"@"+this.subResource.getID();},_getCreationResourceID:function(){return this.subResource.getID();},_isPageInSpace:function(){return true;},_getPossibleRoles:function(){var roles={};var names=this.subResource.getMetaDataNames();for(var i=0,l=names.length;i0){this._deferreds.forEach(function(_12e8){_12e8.start(sync);},this);}else{this._finish();}}}});}if(!dojo._hasResource["com.ibm.mm.enabler.DeferredSet"]){dojo._hasResource["com.ibm.mm.enabler.DeferredSet"]=true;dojo.provide("com.ibm.mm.enabler.DeferredSet");dojo.declare("com.ibm.mm.enabler.DeferredSet",com.ibm.mm.enabler.DeferredSetImpl,{});}if(!dojo._hasResource["com.ibm.mm.enabler.layout.LayoutContainerImpl"]){dojo._hasResource["com.ibm.mm.enabler.layout.LayoutContainerImpl"]=true;dojo.provide("com.ibm.mm.enabler.layout.LayoutContainerImpl");dojo.declare("com.ibm.mm.enabler.layout.LayoutContainerImpl",[com.ibm.mashups.enabler.layout.LayoutContainer,com.ibm.mm.enabler.layout.LayoutNodeImpl,com.ibm.mashups.enabler.content.RuntimeContentProvider],{constructor:function(){this._type=com.ibm.mashups.enabler.layout.Constants.LAYOUT_CONTAINER;},_getContent:function(){return this._getLayoutModel()._getNavigationNode().getContent().start(true);},_templates:{baseMarkup:dojo.string.trim(dojo.cache("com.ibm.mm.enabler.layout","templates/LayoutContainerFragment.html","
\n ${childrenMarkup}\n
\n"))},getRuntimeContent:function(){return new com.ibm.mm.enabler.content.RuntimeContentImpl(this,this._getRuntimeMarkup);},_templateFunc:function(_12e9,sync,_12ea){var ret=null;var _12eb=this.getMetaData("css-classes");var cName=this.getMetaData("com.ibm.portal.layoutnode.localname");ret=dojo.string.substitute(this._templates.baseMarkup,{containerClass:_12eb||"",containerId:com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(this),containerName:cName||"",childrenMarkup:_12ea||""});if(_12e9){_12e9.finish(ret,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return ret;},_getRuntimeMarkup:function(_12ec,sync){var chain=new com.ibm.mm.enabler.DeferredSet();if(this._getLayoutModel().hasChildren(this)){var _12ed=this._getLayoutModel().getChildren(this);while(_12ed.hasNext()){var child=_12ed.next();var _12ee=child.getRuntimeContent().getRuntimeMarkup();chain.addDeferred(_12ee);}}var ret=null;chain.setFinishedCallback(dojo.hitch(this,function(_12ef,_12f0,args){var _12f1=args.origDf;if(_12f0==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK){var _12f2=[];_12ef.forEach(function(item,idx,arr){this.push(item.result);},_12f2);ret=this._templateFunc(_12f1,sync,_12f2.join("\n"));}else{if(_12f1){_12f1.finish(null,_12f0);}}return ret;}),{origDf:_12ec});chain.start(sync);return ret;},getLayoutNodeType:function(){return this._type;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.layout.LayoutContainer"]){dojo._hasResource["com.ibm.mashups.enabler.layout.LayoutContainer"]=true;dojo.provide("com.ibm.mashups.enabler.layout.LayoutContainer");}if(!dojo._hasResource["com.ibm.mashups.enabler.layout.LayoutControl_API"]){dojo._hasResource["com.ibm.mashups.enabler.layout.LayoutControl_API"]=true;dojo.provide("com.ibm.mashups.enabler.layout.LayoutControl_API");dojo.provide("com.ibm.mashups.enabler.layout.LayoutControl");dojo.declare("com.ibm.mashups.enabler.layout.LayoutControl",[com.ibm.mashups.enabler.layout.LayoutNode,com.ibm.mashups.enabler.ModifiableLocalized,com.ibm.mashups.enabler.content.RuntimeContentProvider],{getSkin:function(){throw new Error("Unimplemented API: com.ibm.mashups.enabler.layout.LayoutControl.getSkin");},setSkin:function(id){throw new Error("Unimplemented API: com.ibm.mashups.enabler.layout.LayoutControl.setSkin");},getWidgetBody:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.xml.LocalizedXmlImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.xml.LocalizedXmlImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.xml.LocalizedXmlImpl");dojo.declare("com.ibm.mm.enabler.persistence.xml.LocalizedXmlImpl",[com.ibm.mashups.enabler.ModifiableLocalized,com.ibm.mm.enabler.ac.EffectiveAccessImpl],{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;var _12f3=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_NAVIGATION);var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.li_ns=dojo.delegate(_12f3.namespaces,nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_XML]));this.enforcementHelper=com.ibm.mm.enabler.utils.APIEnforcementHelper;this.BASE_NLS_TITLE_STRING="base:nls-string";this.BASE_NLS_DESCRIPTION_STRING="base:nls-string";this.BASE_NS=this.li_ns.base;this.TITLE_ELEMENT="atom:content/*/model:title";this.TITLE=this.TITLE_ELEMENT+"/"+this.BASE_NLS_TITLE_STRING;this.DESCRIPTION_ELEMENT="atom:content/*/model:description";this.DESCRIPTION=this.DESCRIPTION_ELEMENT+"/"+this.BASE_NLS_DESCRIPTION_STRING;},_normalizeLocale:function(loc){return (dojo.isString(loc)&&loc.length>0)?loc.replace(/_/g,"-").toLowerCase():null;},getLocales:function(){this._readLocales();var _12f4=[];com.ibm.mm.enabler.utils.Misc.forIn(this._cache.titles,function(title,loc){_12f4.push(loc);});return _12f4;},getTitle:function(loc){this.enforcementHelper.enforceDefinedNotNull(loc,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["locale",this.declaredClass,"getTitle(locale)"]);this._readLocales();var title=this._cache.titles[this._normalizeLocale(loc)];return (typeof title=="undefined")?null:title;},getTitles:function(loc){this._readLocales();var _12f5={};if(loc){var nLoc=this._normalizeLocale(loc);com.ibm.mm.enabler.utils.Misc.forIn(this._cache.titles,function(title,l){if(l.indexOf(nLoc)===0){_12f5[l]=title;}});}else{_12f5=dojo.clone(this._cache.titles);}return _12f5;},getDescription:function(loc){this.enforcementHelper.enforceDefinedNotNull(loc,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["locale",this.declaredClass,"getDescription(locale)"]);this._readLocales();var _12f6=this._cache.descriptions[this._normalizeLocale(loc)];return (typeof _12f6=="undefined")?null:_12f6;},getDescriptions:function(loc){this._readLocales();var _12f7={};if(loc){var nLoc=this._normalizeLocale(loc);com.ibm.mm.enabler.utils.Misc.forIn(this._cache.descriptions,function(_12f8,l){if(l.indexOf(nLoc)===0){_12f7[l]=_12f8;}});}else{_12f7=dojo.clone(this._cache.descriptions);}return _12f7;},_getLang:function(node){return com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(node,"xml:lang","lang",this.li_ns.xml);},_readLocales:function(){if(!this._cache){this._cache={titles:{},descriptions:{}};var _12f9=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.TITLE,this.xmlData,this.li_ns);if(_12f9){for(var i=_12f9.length;i>0;i--){var title=_12f9[i-1];this._cache.titles[this._normalizeLocale(this._getLang(title))]=com.ibm.mm.enabler.utils.Dom.textContent(title);}}var _12fa=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.DESCRIPTION,this.xmlData,this.li_ns);if(_12fa){for(var j=_12fa.length;j>0;j--){var _12fb=_12fa[j-1];this._cache.descriptions[this._normalizeLocale(this._getLang(_12fb))]=com.ibm.mm.enabler.utils.Dom.textContent(_12fb);}}}},setTitle:function(title,loc){this.enforcementHelper.enforceDefinedNotNull(title,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["title",this.declaredClass,"setTitle(title, locale)"]);this.enforcementHelper.enforceDefinedNotNull(loc,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["locale",this.declaredClass,"setTitle(title, locale)"]);if(dojo.isString(title)&&loc){if(this.getTitle(loc)==title){return;}var _12fc=com.ibm.mashups.enabler.xml.XPath.createXPath(this.TITLE_ELEMENT,this.xmlData,this.li_ns);var _12fd=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.BASE_NLS_TITLE_STRING,_12fc,this.li_ns);var nLoc=this._normalizeLocale(loc);var _12fe=false;var i=_12fd.length;while(--i>=0){var t=_12fd[i];var lang=this._getLang(t);if(lang!==null&&this._normalizeLocale(lang)==nLoc){com.ibm.mm.enabler.utils.Dom.textContent(t,title);_12fe=true;break;}}if(!_12fe){var _12ff=this.xmlData.ownerDocument;var node=com.ibm.mm.enabler.utils.Dom.createElement(_12ff,this.BASE_NLS_TITLE_STRING,this.BASE_NS);com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(_12ff,node,"xml:lang","lang",this.li_ns.xml,loc);com.ibm.mm.enabler.utils.Dom.textContent(node,title);_12fc.appendChild(node);}this._cache.titles[nLoc]=title;this._setDirty();}},confirmSetTitle:function(title,_1300){return this.hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR);},removeTitle:function(loc){this.enforcementHelper.enforceDefinedNotNull(loc,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["locale",this.declaredClass,"removeTitle(locale)"]);if(loc){var _1301=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.TITLE,this.xmlData,this.li_ns);if(_1301&&_1301.length>0){var nLoc=this._normalizeLocale(loc);for(var i=_1301.length;i>0;i--){var title=_1301[i-1];var lang=this._getLang(title);if(lang!==null&&this._normalizeLocale(lang)==nLoc){dojo.destroy(title);break;}}delete this._cache.titles[nLoc];this._setDirty();}}},confirmRemoveTitle:function(loc){return this.hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR);},removeTitles:function(){var _1302=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.TITLE,this.xmlData,this.li_ns);if(_1302&&_1302.length>0){for(var i=_1302.length;i>0;i--){var _1303=_1302[i-1].parentNode;_1303.removeChild(_1302[i-1]);}this._cache.titles={};this._setDirty();}},confirmRemoveTitles:function(){return this.hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR);},setDescription:function(_1304,loc){this.enforcementHelper.enforceDefinedNotNull(_1304,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["description",this.declaredClass,"setDescription(description, locale)"]);this.enforcementHelper.enforceDefinedNotNull(loc,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["locale",this.declaredClass,"setDescription(description, locale)"]);if(dojo.isString(_1304)&&loc){if(this.getDescription(loc)==_1304){return;}var _1305=com.ibm.mashups.enabler.xml.XPath.createXPath(this.DESCRIPTION_ELEMENT,this.xmlData,this.li_ns);var _1306=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.BASE_NLS_DESCRIPTION_STRING,_1305,this.li_ns);var nLoc=this._normalizeLocale(loc);var _1307=false;var i=_1306.length;while(--i>=0){var desc=_1306[i];var lang=this._getLang(desc);if(lang!==null&&this._normalizeLocale(lang)==nLoc){com.ibm.mm.enabler.utils.Dom.textContent(desc,_1304);_1307=true;break;}}if(!_1307){var _1308=this.xmlData.ownerDocument;var node=com.ibm.mm.enabler.utils.Dom.createElement(_1308,this.BASE_NLS_DESCRIPTION_STRING,this.BASE_NS);com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(_1308,node,"xml:lang","lang",this.li_ns.xml,loc);com.ibm.mm.enabler.utils.Dom.textContent(node,_1304);_1305.appendChild(node);}this._cache.descriptions[nLoc]=_1304;this._setDirty();}},confirmSetDescription:function(title,_1309){return this.hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR);},removeDescription:function(loc){this.enforcementHelper.enforceDefinedNotNull(loc,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["locale",this.declaredClass,"removeDescription(locale)"]);if(loc){var _130a=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.DESCRIPTION,this.xmlData,this.li_ns);if(_130a&&_130a.length>0){var _130b=this._normalizeLocale(loc);for(var i=_130a.length;i>0;i--){var desc=_130a[i-1];var lang=this._getLang(desc);if(lang!==null&&this._normalizeLocale(lang)==_130b){dojo.destroy(desc);break;}}delete this._cache.descriptions[this._normalizeLocale(loc)];this._setDirty();}}},confirmRemoveDescription:function(loc){return this.hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR);},removeDescriptions:function(){var _130c=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.DESCRIPTION,this.xmlData,this.li_ns);if(_130c&&_130c.length>0){for(var i=_130c.length;i>0;i--){dojo.destroy(_130c[i-1]);}this._cache.descriptions={};this._setDirty();}},confirmRemoveDescriptions:function(){return this.hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR);}});}if(!dojo._hasResource["com.ibm.mm.enabler.layout.SkinIdentifiable"]){dojo._hasResource["com.ibm.mm.enabler.layout.SkinIdentifiable"]=true;dojo.provide("com.ibm.mm.enabler.layout.SkinIdentifiable");dojo.declare("com.ibm.mm.enabler.layout.SkinIdentifiable",com.ibm.mm.enabler.IdentifierImpl,{});}if(!dojo._hasResource["com.ibm.mm.enabler.layout.LayoutControlImpl"]){dojo._hasResource["com.ibm.mm.enabler.layout.LayoutControlImpl"]=true;dojo.provide("com.ibm.mm.enabler.layout.LayoutControlImpl");dojo.declare("com.ibm.mm.enabler.layout.LayoutControlImpl",[com.ibm.mashups.enabler.layout.LayoutControl,com.ibm.mm.enabler.layout.LayoutNodeImpl,com.ibm.mashups.enabler.content.RuntimeContentProvider,com.ibm.mm.enabler.persistence.xml.LocalizedXmlImpl],{_skins:new dojox.collections.Dictionary(),configService:null,_cachedSkinData:{},_templates:{widgetFragment:dojo.cache("com.ibm.mm.enabler.layout.widget","templates/WidgetFragment.html","
\n \n ${eventDescriptions}\n ${events}\n ${itemSets}\n ${receivedEvents}\n
\n"),valueFragment:dojo.cache("com.ibm.mm.enabler.layout.widget","templates/ValueFragment.html","${val}\n"),eventDescFragment:dojo.cache("com.ibm.mm.enabler.layout.widget","templates/EventDescriptionFragment.html"," \n ${payloadType}\n \n ${descriptions}\n \n \n ${titles}\n \n \n"),mappedNameFragment:dojo.cache("com.ibm.mm.enabler.layout.widget","templates/MappedNameFragment.html","${value}\n"),eventFragment:dojo.cache("com.ibm.mm.enabler.layout.widget","templates/EventFragment.html","\n \n ${mappedName}\n\n"),itemSetFragment:dojo.cache("com.ibm.mm.enabler.layout.widget","templates/ItemSetFragment.html","\n ${items}\n\n"),receivedEventFragment:dojo.cache("com.ibm.mm.enabler.layout.widget","templates/ReceivedEventFragment.html","\n ${sourceEventName}\n ${targetEventName}\n\n"),itemSetItemFragment:dojo.cache("com.ibm.mm.enabler.layout.widget","templates/ItemSetItemFragment.html","${itemValue}\n"),gadgetFragment:dojo.cache("com.ibm.mm.enabler.layout.gadget","templates/GadgetFragment.html","
\n \n ${itemSets}\n
\n"),baseMarkup:dojo.string.trim(dojo.cache("com.ibm.mm.enabler.layout","templates/LayoutControlFragment.html","
\n ${skinMarkup}\n
\n"))},constructor:function(){var _130d=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_CONTENT);this.ns=dojo.delegate(_130d.namespaces,com.ibm.mm.enabler.model.NameSpaceFactory.getNameSpaces([com.ibm.mm.enabler.model.NameSpaceFactory.NS_ATOM]));this.id_prefix=_130d.idprefix;this.configService=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);this._type=com.ibm.mashups.enabler.layout.Constants.LAYOUT_CONTROL;this._displayTitle=null;},_getDisplayTitle:function(){return this._displayTitle;},_setDisplayTitle:function(_130e){this._displayTitle=_130e;},_getWidgetFragment:function(_130f,_1310,_1311,_1312,_1313,_1314,_1315){return dojo.string.substitute(this._templates.widgetFragment,{css:com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE,instanceID:com.ibm.mm.iwidget.Utils.getMarkupID(_130f.getID()),sandboxEnabled:!!_1311,widgetDefinitionURI:_1310||"",eventDescriptions:_1312||"",events:_1313||"",itemSets:_1314||"",receivedEvents:_1315||""});},_getValueFragment:function(_1316,value){var ret=dojo.string.substitute(this._templates.valueFragment,{css:com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE,loc:_1316||"",val:value||""});return ret;},_getEventDescriptionFragment:function(_1317,_1318,_1319,_131a){return dojo.string.substitute(this._templates.eventDescFragment,{css:com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE,eventDescName:_1317||"",payloadType:_1318||"",descriptions:_1319||"",titles:_131a||""});},_eventDescSuffix:"_desc",_getEventDescriptions:function(_131b){var _131c={};return dojo.map(_131b.getEvents(_131c)||[],function(event){var _131d=[];var _131e=[];dojo.forEach(event.getLocales()||[],function(_131f){_131d.push(this._getValueFragment(_131f,event.getTitle(_131f)));_131e.push(this._getValueFragment(_131f,event.getDescription(_131f)));},this);return this._getEventDescriptionFragment(event.getName()+this._eventDescSuffix,event.getPayloadType(),_131e.join("\n"),_131d.join("\n"));},this);},_getMappedNameFragment:function(_1320){var ret="";dojo.forEach(_1320,function(item,idx,arr){var temp=dojo.string.substitute(this._templates.mappedNameFragment,{name:item.name,value:item.value});ret=ret+temp;},this);return ret;},_getEventFragment:function(event,_1321){var _1322=[];var _1323=[];if(event.isPublished()){_1323.push(com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE.iwPublished);}if(event.isHandled()){_1323.push(com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE.iwHandled);}if(_1321){var _1324=_1321.getPublicEvent(event.getName());if(_1324){if(_1324.handlingFn){if(!dojo.isFunction(_1324.handlingFn)){_1322.push({name:"iw-Handler",value:_1324.handlingFn});}}if(_1324.getOnRemoveWire()){_1322.push({name:"iw-Remove-Wire",value:_1324.getOnRemoveWire()});}if(_1324.getOnNewWire()){_1322.push({name:"iw-New-Wire",value:_1324.getOnNewWire()});}}}var _1325=event.getName();return dojo.string.substitute(this._templates.eventFragment,{css:com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE,additionalClasses:_1323.join(" "),eventName:_1325,eventDescName:_1325+this._eventDescSuffix,mappedName:this._getMappedNameFragment(_1322)||""});},_getEvents:function(_1326,_1327){var _1328={};return dojo.map(_1326.getEvents(_1328)||[],function(item){return this._getEventFragment(item,_1327);},this);},_getReceivedEventFragment:function(wire){return dojo.string.substitute(this._templates.receivedEventFragment,{css:com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE,sourceWidgetID:wire.getSourceWidget().getID(),sourceEventName:wire.getSourceEventName(),targetEventName:wire.getTargetEventName()});},_getReceivedEvents:function(_1329){return dojo.map(this._getLayoutModel().getWireModel().findByTargetWidget(_1329).start(),function(wire){return this._getReceivedEventFragment(wire);},this);},_getItemSetItemFragment:function(name,_132a,_132b){return dojo.string.substitute(this._templates.itemSetItemFragment,{css:com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE,readOnly:_132b?" "+com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE.iwReadOnly:"",itemName:name||"",itemValue:(dojo.isArray(_132a)&&_132a.length===1)?dojox.html.entities.encode(_132a[0]):dojo.toJson(_132a)||""});},_getItemSetFragment:function(_132c){var items=dojo.map(_132c.getNames()||[],function(name){return this._getItemSetItemFragment(name,_132c.getValues(name),_132c.isReadOnly(name));},this);return dojo.string.substitute(this._templates.itemSetFragment,{css:com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE,setName:"attributes",items:items.join("\n")});},getWidgetBody:function(){return this._getWidgetBody();},_getWidgetBody:function(){return new com.ibm.mm.enabler.DeferredImpl(this,function(_132d,sync){var wm=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _132e=wm.getWidgetWindow(this);_132e.setFinishedCallback(dojo.hitch(this,function(_132f,_1330,args){var _1331=args.deferred;var sync=args.sync;var wm=args.wm;var ret=null;if(_1330==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK&&_132f){var _1332=new com.ibm.mm.enabler.DeferredSetImpl();_1332.addDeferred(wm.getHierarchicalPreferences(_132f));_1332.setFinishedCallback(dojo.hitch(this,function(_1333,_1334,args){var _1335=args.deferred;var _1336=args.wWindow;var wm=args.wm;var ret=null;if(_1334==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK){var prefs=_1333.item(0).result;var _1337=wm.getWidgetInstance(_1336).start(true);var _1338=_1337;var _1339=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel();var _133a=_1339.find(_1336.getID());var _133b=this._getEventDescriptions(_1338);var _133c=this._getEvents(_1338,_133a);var _133d=this._getItemSetFragment(prefs);var _133e=this._getReceivedEvents(_1336);var _133f=wm.getWidgetDefinitionByWindow(_1336).start(true);ret=this._getWidgetFragment(_1336,_133f.getURL(),_133f._isSandboxed()||_1337.isSandboxed(),_133b.join("\n"),_133c.join("\n"),_133d,_133e.join("\n"));}if(_1335){_1335.finish(ret,ret?com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK:com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}return ret;}),{deferred:_1331,wWindow:_132f,wm:wm});ret=_1332.start(sync);}else{if(_1331){_1331.finish(ret,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}}return ret;}),{deferred:_132d,sync:sync,wm:wm});var ret=_132e.start(sync);return ret;});},_getOpenSocialGadgetBody:function(){return new com.ibm.mm.enabler.DeferredImpl(this,function(_1340,sync){var wm=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _1341=wm.getWidgetWindow(this);_1341.setFinishedCallback(dojo.hitch(this,function(_1342,_1343,args){var _1344=args.deferred;var sync=args.sync;var wm=args.wm;var ret=null;com.ibm.mm.enabler.opensocial.OpenSocial.removeGadgetInstance(_1342.getID());if(_1343==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK&&_1342){var _1345=new com.ibm.mm.enabler.DeferredSetImpl();_1345.addDeferred(wm.getHierarchicalPreferences(_1342));_1345.setFinishedCallback(dojo.hitch(this,function(_1346,_1347,args){var _1348=args.deferred;var _1349=args.wWindow;var wm=args.wm;var ret=null;if(_1347==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK){var prefs=_1346.item(0).result;var _134a=this._getItemSetFragment(prefs);var _134b=wm.getWidgetInstance(_1349).start(true);var _134c=wm.getWidgetDefinitionByWindow(_1349).start(true);ret=this._getGadgetFragment(_1349,_134c.getURL(),_134a);}if(_1348){_1348.finish(ret,ret?com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK:com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}return ret;}),{deferred:_1344,wWindow:_1342,wm:wm});ret=_1345.start(sync);}else{if(_1344){_1344.finish(ret,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}}return ret;}),{deferred:_1340,sync:sync,wm:wm});var ret=_1341.start(sync);return ret;});},_getGadgetFragment:function(_134d,_134e,_134f){return dojo.string.substitute(this._templates.gadgetFragment,{css:com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE,instanceID:com.ibm.mm.iwidget.Utils.getMarkupID(_134d.getID()),gadgetDefinitionURI:_134e||"",itemSets:_134f||""});},_getGenericWidgetURI:function(){return this.configService.getValue(com.ibm.mashups.enabler.services.ConfigConstants.NON_PREVIEWABLE_WIDGET_LOCATION)||dojo.moduleUrl("com.ibm.mm.enabler.layout.widget","NonPreviewableContentWidget.xml").toString();},_getGenericWidgetBody:function(){return new com.ibm.mm.enabler.DeferredImpl(this,function(_1350,sync){var wm=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _1351=wm.getWidgetWindow(this);_1351.setFinishedCallback(dojo.hitch(this,function(_1352,_1353,args){var _1354=args.deferred;var sync=args.sync;var ret=null;if(_1353==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK&&_1352){ret=this._getWidgetFragment(_1352,this._getGenericWidgetURI());}if(_1354){_1354.finish(ret,ret?com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK:com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}return ret;}),{deferred:_1350,sync:sync});var ret=_1351.start(sync);return ret;});},replaceControl:function(_1355,_1356){return _1355.replace(com.ibm.mm.enabler.layout.LayoutControlImpl.REGEX_CONTROL,_1356);},replaceTitle:function(_1357,title){return _1357.replace(com.ibm.mm.enabler.layout.LayoutControlImpl.REGEX_TITLE,title);},_templateFunc:function(_1358,sync,_1359){var _135a=false;var _135b=false;if(_1358.context){var _135c=null;var wm=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _135d=wm.getWidgetWindow(_1358.context).start();_135c=wm.getWidgetDefinitionByWindow(_135d).start(true);if(_135c&&dojo.isFunction(_135c.getType)&&_135c.getType()){_135a=(_135c.getType()==com.ibm.mm.iwidget.Constants.OSGADGET_DEFINITION_TYPE);}if(com.ibm.mashups.enabler.services.IdentificationService.isServerID(_135d.getID())){_135b=true;}}var def;if(dojo.isString(_1359)&&!this.configService.getValue(com.ibm.mashups.enabler.services.ConfigConstants.NON_PREVIEWABLE_WIDGET_LOCATION)&&!_135a){def=this._getWidgetBody();}else{if(_135a&&_135b){def=this._getOpenSocialGadgetBody();}else{def=this._getGenericWidgetBody();}}def.setFinishedCallback(dojo.hitch(this,function(_135e,_135f,args){var _1360=args.skinData;var _1361=args.deferred;var ret=null;if(dojo.isString(_1360)&&!this.configService.getValue(com.ibm.mashups.enabler.services.ConfigConstants.NON_PREVIEWABLE_WIDGET_LOCATION)){_1360=this.replaceControl(_1360,_135e);var _1362=com.ibm.mashups.enabler.context.Factory.getLocalizedContext();var title=_1362.getTitle(this);if((title===null)||(typeof title=="undefined")){if(_135c!==null){title=_1362.getTitle(_135c);}if((title===null)||(typeof title=="undefined")){title="";}}_1360=this.replaceTitle(_1360,title);}else{_1360=_135e;}ret=dojo.string.substitute(this._templates.baseMarkup,{controlId:com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(this),cssStyle:this.getMetaData("css-style")||"",skinMarkup:_1360});if(_1361){_1361.finish(ret,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return ret;}),{deferred:_1358,skinData:_1359});return def;},getRuntimeContent:function(){return new com.ibm.mm.enabler.content.RuntimeContentImpl(this,function(_1363,sync){var self=this;var skin=this.getSkin();var _1364=null;if(skin){var _1365=com.ibm.mashups.enabler.model.staticSkin.Factory.getStaticSkinModel();var rawID=this.getSkin()._getRawID();var _1366=rawID.substring(1+rawID.lastIndexOf(":"));var _1367=_1365.find(skin,_1366);_1367.setFinishedCallback(function(_1368,_1369,_136a){var ret=null;var _136b=com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD;var _136c=com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND;if(_1369==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK){var _136d=_1368._getMediaURL();if(_136d){if(_136d in self._cachedSkinData){if(_136b in self._cachedSkinData[_136d]){ret=self._templateFunc(_136a,sync,self._cachedSkinData[_136d][_136b]).start(sync);}else{if(_136a){_136a.finish(null,_136c);}}}else{var req=new com.ibm.mm.enabler.services.ModelRestServiceRequest(new com.ibm.mm.enabler.utils.HttpUrl(_136d),null,null,true,sync);req.read(function(_136e,_136f,xhr,_1370){self._cachedSkinData[_136d]={};self._cachedSkinData[_136d][_136e]=_136f;if(_136e==_136b){ret=self._templateFunc(_1370,sync,_136f).start(sync);}else{if(_1370){_1370.finish(null,_136c);}}},_136a);}}else{ret=self._templateFunc(_136a,sync,null).start(sync);}}else{if(_136a){_136a.finish(null,_136c);}}return ret;},_1363);_1364=_1367.start(sync);}else{_1364=this._templateFunc(_1363,sync,null).start(sync);}return _1364;});},setMetaData:function(name,value){var _1371=this.inherited(arguments);dojo.publish(com.ibm.mm.enabler.layout.LayoutControlImpl.TOPIC_METADATA_SET,[this,name,_1371,value]);this._setDirty();return _1371;},removeMetaData:function(name){var _1372=this.inherited(arguments);dojo.publish(com.ibm.mm.enabler.layout.LayoutControlImpl.TOPIC_METADATA_REMOVE,[this,name,_1372,null]);this._setDirty();return _1372;},getSkin:function(){var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(com.ibm.mm.enabler.layout.LayoutControlImpl.XPATH_SKIN_ELEMENT,this.getXml(),this.ns);if(node){var id=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(node,"ext:uri","uri",this.ns.ext);var skin=new com.ibm.mm.enabler.layout.SkinIdentifiable(id);if(this._skins.containsKey(skin.getID())){return this._skins.item(skin.getID());}else{this._skins.add(skin.getID(),skin);return skin;}}return null;},setSkin:function(id){if(this.layoutModel._isEmpty(id)){throw new Error(this.layoutModel.modelMessages.E_PARAM_ISNULL_0);}var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(com.ibm.mm.enabler.layout.LayoutControlImpl.XPATH_SKIN_ELEMENT,this.getXml(),this.ns);var _1373;if(!node){node=com.ibm.mm.enabler.utils.Utils.createNode("atom:link",this.ns.atom);node.setAttribute("rel","related");node.setAttribute("type","application/atom+xml");com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(this.getXml().ownerDocument,node,"ext:rel","rel",this.ns.ext,"skin");this.getXml().appendChild(node);}else{_1373=this.getSkin().getID();}var newId=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(id);if(newId!=_1373){var _1374=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.THEME_URL,this.layoutModel);_1374.setNodes([{value:newId,isID:true},{value:this.layoutModel._getNavigationNode().getThemeIdentifier().getID(),isID:true}]);node.setAttribute("href",_1374.getAbsoluteURL());com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(this.getXml().ownerDocument,node,"ext:uri","uri",this.ns.ext,_1374.getModelURI());this._setDirty();if(this._skins.containsKey(_1373)){var it=this._skins.item(_1373);this._skins.remove(_1373);it.setID(_1374.getModelURI());this._skins.add(newId,it);}dojo.publish(com.ibm.mm.enabler.layout.LayoutControlImpl.TOPIC_SKIN_SET,[this,null,_1373||null,newId]);}},_getWidgetWindowURI:function(){var uri=com.ibm.mashups.enabler.xml.XPath.evaluateString("atom:link[@ext:rel='portlet']/@ext:uri",this.getXml(),this.ns);return uri?dojo.string.trim(uri):null;},_getWidgetDefinitionURL:function(){var xp2="atom:content/model:layout-control/@creation-context:widget-definition-url";return com.ibm.mashups.enabler.xml.XPath.evaluateString(xp2,this.getXml(),this.ns);},_getContext:function(){var _1375={};var xp1="atom:content/model:layout-control/@creation-context:portlet-definition";var id=com.ibm.mashups.enabler.xml.XPath.evaluateString(xp1,this.getXml(),this.ns);if(id){_1375[com.ibm.mashups.enabler.layout.Constants.CONTEXT_WIDGET_DEFINITION_ID]=new com.ibm.mm.enabler.IdentifierImpl(id);_1375[com.ibm.mashups.enabler.layout.Constants.CONTEXT_TYPE]=com.ibm.mashups.enabler.layout.Constants.LAYOUT_CONTROL;return _1375;}var url=this._getWidgetDefinitionURL();if(url){_1375[com.ibm.mashups.enabler.layout.Constants.CONTEXT_WIDGET_DEFINITION_URL]=url;_1375[com.ibm.mashups.enabler.layout.Constants.CONTEXT_TYPE]=com.ibm.mashups.enabler.layout.Constants.LAYOUT_CONTROL;return _1375;}return null;}});com.ibm.mm.enabler.layout.LayoutControlImpl.TOPIC_BASE="/"+"com.ibm.mashups.enabler.model.LayoutControl".replace(/\./ig,"/")+"/";com.ibm.mm.enabler.layout.LayoutControlImpl.TOPIC_SKIN_BASE=com.ibm.mm.enabler.layout.LayoutControlImpl.TOPIC_BASE+"skin/";com.ibm.mm.enabler.layout.LayoutControlImpl.TOPIC_SKIN_SET=com.ibm.mm.enabler.layout.LayoutControlImpl.TOPIC_SKIN_SET+"set";com.ibm.mm.enabler.layout.LayoutControlImpl.TOPIC_METADATA_BASE=com.ibm.mm.enabler.layout.LayoutControlImpl.TOPIC_BASE+"meta/";com.ibm.mm.enabler.layout.LayoutControlImpl.TOPIC_METADATA_SET=com.ibm.mm.enabler.layout.LayoutControlImpl.TOPIC_METADATA_BASE+"set";com.ibm.mm.enabler.layout.LayoutControlImpl.TOPIC_METADATA_REMOVE=com.ibm.mm.enabler.layout.LayoutControlImpl.TOPIC_METADATA_BASE+"remove";com.ibm.mm.enabler.layout.LayoutControlImpl.XPATH_SKIN_ELEMENT="atom:link[@ext:rel = 'skin' and @rel = 'related']";com.ibm.mm.enabler.layout.LayoutControlImpl._REGEX_START="<\\s*a\\s+rel\\s*=\\s*(\"|')dynamic-content(\"|')\\s+href\\s*=\\s*(\"|')";com.ibm.mm.enabler.layout.LayoutControlImpl._REGEX_END="(\"|')\\s*>.*?<\\s*/\\s*a\\s*>";com.ibm.mm.enabler.layout.LayoutControlImpl.REGEX_CONTROL=new RegExp(com.ibm.mm.enabler.layout.LayoutControlImpl._REGEX_START+"lm:control"+com.ibm.mm.enabler.layout.LayoutControlImpl._REGEX_END,"i");com.ibm.mm.enabler.layout.LayoutControlImpl.REGEX_TITLE=new RegExp(com.ibm.mm.enabler.layout.LayoutControlImpl._REGEX_START+"lm:title"+com.ibm.mm.enabler.layout.LayoutControlImpl._REGEX_END,"i");}if(!dojo._hasResource["com.ibm.mashups.enabler.layout.LayoutControl"]){dojo._hasResource["com.ibm.mashups.enabler.layout.LayoutControl"]=true;dojo.provide("com.ibm.mashups.enabler.layout.LayoutControl");}if(!dojo._hasResource["com.ibm.mashups.enabler.layout.LayoutFragment"]){dojo._hasResource["com.ibm.mashups.enabler.layout.LayoutFragment"]=true;dojo.provide("com.ibm.mashups.enabler.layout.LayoutFragment");dojo.declare("com.ibm.mashups.enabler.layout.LayoutFragment",[com.ibm.mashups.enabler.layout.LayoutNode],{getFragment:function(){},setFragment:function(_1376){},confirmSetFragment:function(_1377){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.wire.Wire_API"]){dojo._hasResource["com.ibm.mashups.enabler.wire.Wire_API"]=true;dojo.provide("com.ibm.mashups.enabler.wire.Wire_API");dojo.provide("com.ibm.mashups.enabler.wire.Wire");dojo.declare("com.ibm.mashups.enabler.wire.Wire",[com.ibm.mashups.enabler.Identifiable],{getSourceWidget:function(){},getSourceEvent:function(){},getSourceEventName:function(){},getSourcePage:function(){},getTargetWidget:function(){},getTargetEvent:function(){},getTargetEventName:function(){},getTargetPage:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.wire.WireImpl"]){dojo._hasResource["com.ibm.mm.enabler.wire.WireImpl"]=true;dojo.provide("com.ibm.mm.enabler.wire.WireImpl");dojo.declare("com.ibm.mm.enabler.wire.WireImpl",[com.ibm.mashups.enabler.wire.Wire,com.ibm.mm.enabler.persistence.xml.IdentifiableXmlImpl,com.ibm.mm.enabler.persistence.xml.EditLinkProviderXmlImpl],{constructor:function(node,_1378){this.xmlData=node;this.wireModel=_1378;this.idService=com.ibm.mashups.enabler.services.IdentificationService;},_getWireModel:function(){return this.wireModel;},toString:function(){return com.ibm.mm.enabler.utils.Dom.innerXML(this.xmlData);},_getWireModelUrl:function(){return this.wireModel.href;},_getWireUri:function(){var expr="atom:id";var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this.xmlData,this.wireModel.ns);if(node){return dojo.string.trim(com.ibm.mm.enabler.utils.Dom.textContent(node));}return null;},_getNode:function(_1379){var expr="atom:link[@ext:rel='"+_1379+"']";var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this.xmlData,this.wireModel.ns);return node||null;},_getIdentifier:function(_137a){var _137b=null;var node=this._getNode(_137a);if(node){var id=null;var uri=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(node,"ext:uri","uri",this.wireModel.ns.ext);if(uri){var aPos=uri.indexOf("@");if(aPos!=-1){uri=uri.slice(0,aPos);}var idPos=uri.lastIndexOf(":");if(idPos!=-1){uri=uri.slice(idPos+1);}idPos=uri.toUpperCase().lastIndexOf("%3A");if(idPos!=-1){uri=uri.slice(idPos+3);}idPos=uri.lastIndexOf("/");if(idPos!=-1){uri=uri.slice(idPos+1);}id=uri;}if(id){_137b=new com.ibm.mm.enabler.IdentifierImpl(id,uri);}}return _137b;},_setIdentifier:function(_137c,value){var node=this._getNode(_137c);if(node){var id=null;com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(node.ownerDocument,node,"ext:uri","uri",this.wireModel.ns.ext,value);}},_updateEventIDs:function(){this._updateIdentifier("sourcePortletWindow",com.ibm.mashups.enabler.model.url.ModelUrlFactory.WIDGET_URL);this._updateIdentifier("communicationSource",com.ibm.mashups.enabler.model.url.ModelUrlFactory.EVENT_URL);this._updateIdentifier("targetPortletWindow",com.ibm.mashups.enabler.model.url.ModelUrlFactory.WIDGET_URL);this._updateIdentifier("communicationTarget",com.ibm.mashups.enabler.model.url.ModelUrlFactory.EVENT_URL);},_updateIdentifier:function(name,_137d){var oldID=this._getIdentifier(name);var newID=this.idService.resolveID(oldID);var _137e=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(_137d,this.wireModel);_137e.setNodes([{value:newID,isID:true}]);var _137f=dojo.string.trim(_137e.getModelURI());this._setIdentifier(name,_137f);},_getName:function(_1380){var node=this._getNode(_1380);if(node){var name=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(node,"model:internalName","internalName",this.wireModel.ns.model);if(name){return name;}}return null;},getSourceWidget:function(){var _1381="sourcePortletWindow";return this._getIdentifier(_1381);},getSourceEvent:function(){var _1382="communicationSource";return this._getIdentifier(_1382);},getSourceEventName:function(){var _1383="communicationSource";return this._getName(_1383);},getSourcePage:function(){var _1384="sourcePage";return this._getIdentifier(_1384);},getTargetWidget:function(){var _1385="targetPortletWindow";return this._getIdentifier(_1385);},getTargetEvent:function(){var _1386="communicationTarget";return this._getIdentifier(_1386);},getTargetEventName:function(){var _1387="communicationTarget";return this._getName(_1387);},getTargetPage:function(){var _1388="targetPage";return this._getIdentifier(_1388);},getXml:function(){return this.xmlData;},setXml:function(xml){this.xmlData=xml;this._setDirty();}});}if(!dojo._hasResource["com.ibm.mashups.enabler.wire.Wire"]){dojo._hasResource["com.ibm.mashups.enabler.wire.Wire"]=true;dojo.provide("com.ibm.mashups.enabler.wire.Wire");}if(!dojo._hasResource["com.ibm.mashups.enabler.wire.WireModel_API"]){dojo._hasResource["com.ibm.mashups.enabler.wire.WireModel_API"]=true;dojo.provide("com.ibm.mashups.enabler.wire.WireModel_API");dojo.provide("com.ibm.mashups.enabler.wire.WireModel");dojo.declare("com.ibm.mashups.enabler.wire.WireModel",[com.ibm.mashups.enabler.ListModelController,com.ibm.mashups.enabler.DirtyFlagProvider],{create:function(_1389){},findByTargetWidget:function(id){},findBySourceWidget:function(id){}});}if(!dojo._hasResource["com.ibm.mm.enabler.wire.WireModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.wire.WireModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.wire.WireModelImpl");dojo.declare("com.ibm.mm.enabler.wire.WireModelImpl",[com.ibm.mashups.enabler.wire.WireModel,com.ibm.mashups.enabler.ListModelController,com.ibm.mm.enabler.ConfirmableModelImpl,com.ibm.mm.enabler.model.ModelImpl,com.ibm.mm.enabler.DeferredIteratorImpl,com.ibm.mm.enabler.DirtyFlagProviderImpl],{_cidCounter:0,_cursor:0,_layoutModel:null,constructor:function(href,uri,_138a){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.uri=uri;this.href=href;this._layoutModel=_138a;var _138b=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_CONTENT);this.entryUrl=_138b.url;this.prefix=_138b.idprefix;var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns=dojo.delegate(_138b.namespaces,nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_THR,nsf.NS_XML,nsf.NS_OPENSEARCH,nsf.NS_XHTML,nsf.NS_XSI]));this.modelMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","modelMessages");this._nodes=new dojox.collections.Dictionary();this._ids=[];this._insertedNodes=new dojox.collections.Dictionary();this._deletedNodes=new dojox.collections.Dictionary();var _138c=function(){var _138d="WireModel.dirtyHandler()";var _138e=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_138e){this.LOGGER.trace(_138d,"Wire Model has been changed. Switching to edit representation.");}var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME);cs.switchToModifiablePersistenceMode();this.removeDirtyCallback(_138c);};this.addDirtyCallback(this,dojo.hitch(this,_138c));},_setWireModelDirty:function(){this._setDirty();},create:function(_138f){if(this._isEmpty(_138f)||this._isEmpty(_138f.sourceWidgetId)||this._isEmpty(_138f.sourcePageId)||this._isEmpty(_138f.sourcePageId)||this._isEmpty(_138f.sourceEventId)||this._isEmpty(_138f.targetWidgetId)||this._isEmpty(_138f.targetPageId)||this._isEmpty(_138f.targetEventId)){throw new Error(this.modelMessages.E_INVALID_CONTEXT_SPECIFIED_0);}var _1390=com.ibm.mm.enabler.utils.Atom.createEntry("New Wire","model:wire",this.ns.model);var entry=_1390.entryElement;com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(_1390.idElement,"ext:uniquename",this.ns.ext,"wire.orderDetails.orderId");com.ibm.mm.enabler.utils.Dom.textContent(_1390.idElement,"cid:"+this._cidCounter++);var _1391=com.ibm.mm.enabler.utils.Utils.createNode("model:isimmediateswitch",this.ns.model);_1391.setAttribute("value","false");_1390.modelElement.appendChild(_1391);var _1392=com.ibm.mashups.enabler.model.url.ModelUrlFactory.FRAGMENT_URL;var _1393=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(_1392,this);_1393.setNodes([{value:dojo.string.trim(_138f.sourcePageId.getID()),isID:true}]);var _1394=dojo.string.trim(_1393.getModelURI());var link=com.ibm.mm.enabler.utils.Utils.createNode("atom:link",this.ns.atom);link.setAttribute("rel","related");com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(link,"ext:rel",this.ns.ext,"sourcePage");com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(link,"ext:uri",this.ns.ext,_1394);entry.appendChild(link);_1392=com.ibm.mashups.enabler.model.url.ModelUrlFactory.WIDGET_URL;_1393=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(_1392,this);_1393.setNodes([{value:dojo.string.trim(_138f.sourceWidgetId.getID()),isID:true}]);_1394=dojo.string.trim(_1393.getModelURI());link=com.ibm.mm.enabler.utils.Utils.createNode("atom:link",this.ns.atom);link.setAttribute("rel","related");com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(link,"ext:rel",this.ns.ext,"sourcePortletWindow");com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(link,"ext:uri",this.ns.ext,_1394);entry.appendChild(link);_1392=com.ibm.mashups.enabler.model.url.ModelUrlFactory.FRAGMENT_URL;_1393=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(_1392,this);_1393.setNodes([{value:dojo.string.trim(_138f.targetPageId.getID()),isID:true}]);_1394=dojo.string.trim(_1393.getModelURI());link=com.ibm.mm.enabler.utils.Utils.createNode("atom:link",this.ns.atom);link.setAttribute("rel","related");com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(link,"ext:rel",this.ns.ext,"targetPage");com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(link,"ext:uri",this.ns.ext,_1394);entry.appendChild(link);_1392=com.ibm.mashups.enabler.model.url.ModelUrlFactory.WIDGET_URL;_1393=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(_1392,this);_1393.setNodes([{value:dojo.string.trim(_138f.targetWidgetId.getID()),isID:true}]);_1394=dojo.string.trim(_1393.getModelURI());link=com.ibm.mm.enabler.utils.Utils.createNode("atom:link",this.ns.atom);link.setAttribute("rel","related");com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(link,"ext:rel",this.ns.ext,"targetPortletWindow");com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(link,"ext:uri",this.ns.ext,_1394);entry.appendChild(link);_1392=com.ibm.mashups.enabler.model.url.ModelUrlFactory.EVENT_URL;_1393=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(_1392,this);_1393.setNodes([{value:dojo.string.trim(_138f.sourceEventId.getID()),isID:true}]);_1394=dojo.string.trim(_1393.getModelURI());link=com.ibm.mm.enabler.utils.Utils.createNode("atom:link",this.ns.atom);link.setAttribute("rel","related");com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(link,"ext:rel",this.ns.ext,"communicationSource");com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(link,"ext:uri",this.ns.ext,_1394);if(_138f.sourceEventId.getName){var _1395=_138f.sourceEventId.getName();com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(link,"model:internalName",this.ns.model,_1395);}entry.appendChild(link);_1392=com.ibm.mashups.enabler.model.url.ModelUrlFactory.EVENT_URL;_1393=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(_1392,this);_1393.setNodes([{value:dojo.string.trim(_138f.targetEventId.getID()),isID:true}]);_1394=dojo.string.trim(_1393.getModelURI());link=com.ibm.mm.enabler.utils.Utils.createNode("atom:link",this.ns.atom);link.setAttribute("rel","related");com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(link,"ext:rel",this.ns.ext,"communicationTarget");com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(link,"ext:uri",this.ns.ext,_1394);if(_138f.targetEventId.getName){var _1396=_138f.targetEventId.getName();com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(link,"model:internalName",this.ns.model,_1396);}entry.appendChild(link);ret=new com.ibm.mm.enabler.wire.WireImpl(entry,this);return ret;},confirmCreate:function(_1397){var page=this._layoutModel._getNavigationNode();if(page){return page.hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR)?true:false;}else{return this.getConfirmCreate();}},insert:function(node,_1398){if(this._isEmpty(node)){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}this._getData();var id=node.getID();this._nodes.add(id,node);this._ids.push(id);this._insertedNodes.add(id,node);this._setDirty();node._addDirtyCallback(this,this._setWireModelDirty);dojo.publish(com.ibm.mashups.enabler.wire.WireModel.TOPIC_WIRE_ADDED,[this,node]);},confirmInsert:function(node,_1399,_139a){if(this._isEmpty(node)){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}if(this._isEmpty(_1399)){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}return true;},remove:function(node){if(this._isEmpty(node)){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}node=this.find(node).start(true);if(node){var id=node.getID();this._deleteNode(node.getXml());this._nodes.remove(id);for(var ds=0;ds0){for(var i=0,l=_139f.length;i0||this._deletedNodes.count>0){return true;}return false;},_commit:function(_13a5,sync,_13a6){var _13a7=com.ibm.mashups.enabler.io.XHRMultipartFactory;var _13a8=_13a7.create();_13a8.startTransaction(_13a7.CONTEXT_ENABLER);this._nodes.forEach(function(entry){var node=entry.valueOf();if(node._isDirty()&&!this._insertedNodes.containsKey(entry.key)&&!this._deletedNodes.containsKey(entry.key)){var _13a9=node.getEditLink();var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(_13a9,this);var _13aa=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);node._updateEventIDs();_13a6._acquire();_13aa.update(node.toString(),dojo.hitch(this,function(type,data,xhr,args){var id=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(args.node);var _13ab=args.deferred;if(xhr.status==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK){this._replaceNodeXmlFromFeed(args.node,data);}var _13ac;if(_13ab){_13ab.finishOperation(id,com.ibm.mashups.enabler.DeferredOperation.OPERATION_MODIFY,xhr.status);}_13a6._release(_13a5,xhr.status);}),{node:node,deferred:_13a5});}},this);this._insertedNodes.forEach(function(entry){var node=entry.valueOf();node._updateEventIDs();var _13ad=this._layoutModel.find(node.getSourceWidget().getID()).start();var _13ae=this._layoutModel.find(node.getTargetWidget().getID()).start();if((!_13ad)||(!_13ae)){return;}var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(this.href,this);var _13af=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);_13a6._acquire();_13af.create(node.toString(),dojo.hitch(this,function(type,data,xhr,args){var _13b0=args.deferred;if(xhr.status==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_CREATED){this._replaceNodeXmlFromFeed(node,data);}if(_13b0){_13b0.finishOperation(node,com.ibm.mashups.enabler.DeferredOperation.OPERATION_CREATE,xhr.status,com.ibm.mm.enabler.DeferredDataComposer._dataFromXhr(xhr));}_13a6._release(_13b0,xhr.status);}),{node:node,deferred:_13a5});},this);_13a8.endTransactionDeferred().start();this._insertedNodes.clear();this._deletedNodes.forEach(function(entry){var node=entry.valueOf();var _13b1=node.getEditLink();var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(_13b1,this);node._updateEventIDs();var _13b2=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);_13a6._acquire();_13b2.remove(dojo.hitch(this,function(type,data,xhr,_13b3){var _13b4;if(_13b3){_13b3.finishOperation(node.getID(),com.ibm.mashups.enabler.DeferredOperation.OPERATION_DELETE,xhr.status);}_13a6._release(_13b3,xhr.status);}),_13a5);},this);this._deletedNodes.clear();},hasNext:function(){return this.size().start(true)>this._cursor;},next:function(){var ret=null;if(this.hasNext()){var _13b5=this._cursor++;var id=this._ids[_13b5];ret=this._nodes.item(id).valueOf()||null;if(ret){var _13b6=this.getForeachCallback();if(_13b6){_13b6(ret,this.getForeachCallbackParameters());}}}return ret;},size:function(){return new com.ibm.mm.enabler.DeferredImpl(this,function(_13b7,sync){if(!this._data){this._getData();}var size=this._nodes.count;var _13b8=_13b7.getFinishedCallback();if(_13b8){_13b8(size,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK,_13b7.getFinishedCallbackParameters());}return size;});},setCursorPosition:function(_13b9){if(_13b9<0){throw new Error(this.modelMessages.E_PARAM_IS_SMALLER_ZERO_0);}this._cursor=_13b9||0;},getCursorPosition:function(){return this._cursor;},_deleteNode:function(node){if(node&&node.parentNode){node.parentNode.removeChild(node);}},findByTargetWidget:function(id){if(this._isEmpty(id)){throw new Error(this.modelMessages.E_PARAM_ISNULL_0);}this._checkValidNode(id);if(id.getID){id=id.getID();}return new com.ibm.mm.enabler.DeferredImpl(this,function(_13ba,sync,id){var _13bb=_13ba.getFinishedCallback();var wires=[];var it=this.iterator();it.start(true);it.setCursorPosition(0);while(it&&it.hasNext()){var wire=it.next();if((wire.getTargetWidget())&&(wire.getTargetWidget().getID()==id)){wires.push(wire);}}if(wires&&_13bb){_13bb(wires,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK,_13ba.getFinishedCallbackParameters());}else{if(_13bb){_13bb(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND,_13ba.getFinishedCallbackParameters());}}return wires;},id);},findBySourceWidget:function(id){if(this._isEmpty(id)){throw new Error(this.modelMessages.E_PARAM_ISNULL_0);}this._checkValidNode(id);if(id.getID){id=id.getID();}return new com.ibm.mm.enabler.DeferredImpl(this,function(_13bc,sync,id){var _13bd=_13bc.getFinishedCallback();var wires=[];var it=this.iterator();it.start(true);it.setCursorPosition(0);while(it&&it.hasNext()){var wire=it.next();if((wire.getSourceWidget())&&(wire.getSourceWidget().getID()==id)){wires.push(wire);}}if(wires&&_13bd){_13bd(wires,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK,_13bc.getFinishedCallbackParameters());}else{if(_13bd){_13bd(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND,_13bc.getFinishedCallbackParameters());}}return wires;},id);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.wire.WireModel"]){dojo._hasResource["com.ibm.mashups.enabler.wire.WireModel"]=true;dojo.provide("com.ibm.mashups.enabler.wire.WireModel");com.ibm.mashups.enabler.wire.WireModel.TOPIC_BASE="/"+("com.ibm.mashups.enabler.wire.WireModel".replace(/\./ig,"/"))+"/";com.ibm.mashups.enabler.wire.WireModel.TOPIC_WIRE_ADDED=com.ibm.mashups.enabler.wire.WireModel.TOPIC_BASE+"add";com.ibm.mashups.enabler.wire.WireModel.TOPIC_WIRE_REMOVED=com.ibm.mashups.enabler.wire.WireModel.TOPIC_BASE+"remove";}if(!dojo._hasResource["com.ibm.mashups.enabler.wire.WireModelProvider"]){dojo._hasResource["com.ibm.mashups.enabler.wire.WireModelProvider"]=true;dojo.provide("com.ibm.mashups.enabler.wire.WireModelProvider");dojo.declare("com.ibm.mashups.enabler.wire.WireModelProvider",null,{getWireModel:function(){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.LayoutModel_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.LayoutModel_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.LayoutModel_API");dojo.provide("com.ibm.mashups.enabler.model.LayoutModel");dojo.declare("com.ibm.mashups.enabler.model.LayoutModel",[com.ibm.mashups.enabler.TreeModelController,com.ibm.mashups.enabler.wire.WireModelProvider,com.ibm.mashups.enabler.DirtyFlagProvider],{create:function(_13be){},getRoot:function(){},hasChildren:function(node){},getChildren:function(node){},getParent:function(node){},isModifiable:function(node){},isDeletable:function(node){},find:function(id){}});}if(!dojo._hasResource["com.ibm.mm.enabler.layout.LayoutModelIteratorImpl"]){dojo._hasResource["com.ibm.mm.enabler.layout.LayoutModelIteratorImpl"]=true;dojo.provide("com.ibm.mm.enabler.layout.LayoutModelIteratorImpl");dojo.declare("com.ibm.mm.enabler.layout.LayoutModelIteratorImpl",com.ibm.mm.enabler.DeferredIteratorImpl,{node:null,layoutModel:null,_cursor:0,_last:null,constructor:function(node,_13bf){this.node=node;this.layoutModel=_13bf;this._setEntries();},_setEntries:function(){var xp="/atom:feed/atom:entry[contains(thr:in-reply-to/@ref,':"+com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(this.node)+"')]";this._entries=dojo.map(com.ibm.mashups.enabler.xml.XPath.evaluateXPath(xp,this.layoutModel._getData(),this.layoutModel.ns)||[],this._transform,this);},_getId:function(node){var xp="atom:id";var rawID=dojo.string.trim(com.ibm.mashups.enabler.xml.XPath.evaluateString(xp,node,this.layoutModel.ns));return com.ibm.mm.enabler.IdentifiableHelper.getID(rawID);},_getEntries:function(){return this._entries;},_transform:function(elem){var ret=null;var id=this._getId(elem);if(this.layoutModel._nodes.containsKey(id)){ret=this.layoutModel._nodes.item(id);}else{ret=this.layoutModel._transformNode(elem);this.layoutModel._nodes.add(ret.getID(),ret);}return ret;},hasNext:function(){return this.size().start(true)>this._cursor;},hasPrevious:function(){return this._cursor>0;},_findEntryById:function(id){var ret=null;if(id){dojo.forEach(this._getEntries(),function(node,idx,arr){if(node.getID()==id){ret=node;}},this);}return ret;},_firstEntry:function(){var _13c0={};dojo.forEach(this._getEntries(),function(node,idx,arr){var _13c1=this.layoutModel._getNextNodeID(node);if(_13c1){_13c0[_13c1]=true;}},this);var ret=null;dojo.forEach(this._getEntries(),function(node,idx,arr){if(!(node.getID() in _13c0)){ret=node;}},this);return ret;},_nextEntry:function(node){if(!node){return this._firstEntry();}else{return this._findEntryById(this.layoutModel._getNextNodeID(node));}},_lastEntry:function(){var ret=null;dojo.forEach(this._getEntries(),function(node,idx,arr){var _13c2=this.layoutModel._getNextNodeID(node);if(!_13c2){ret=node;}},this);return ret;},_previousEntry:function(node){if(!node){return this._lastEntry();}else{var _13c3=this.layoutModel._findPointingNodeID(node);return this._findEntryById(_13c3);}},previous:function(){if(!this.hasPrevious()){return null;}var elem=this._previousEntry(this._last);this._last=elem;this._cursor--;return elem||null;},next:function(){if(!this.hasNext()){return null;}var elem=this._nextEntry(this._last);this._last=elem;this._cursor++;return elem||null;},size:function(){return new com.ibm.mm.enabler.DeferredImpl(this,function(_13c4,sync){var size=this._getEntries().length;if(_13c4){_13c4.finish(size,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return size;});},seekToEnd:function(){this.setCursorPosition(this.size().start(true));this._last=null;},setCursorPosition:function(_13c5){if(_13c5<0){throw new Error(this.layoutModel.modelMessages.E_PARAM_IS_SMALLER_ZERO_0);}this._cursor=_13c5||0;var x;for(var i=0,size=this.size().start(true);i0){var _140a=this._getNext(node);var _140b=this._getPrevious(node);if(_140b){this._setNext(_140b,_140a);}}else{}}}},confirmRemove:function(node){var ret;var _140c="confirmRemove(node)";var _140d=com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.isLoggable(com.ibm.mm.enabler.layout.LayoutModelImpl.LOG_LEVEL);if(_140d){com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.entering(_140c,arguments);}if(this._isEmpty(node)){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}if(this.isDeletable(node)){if(this.navigationNode.isPrivate()){ret=this.navigationNode.hasRole(com.ibm.mashups.enabler.ac.RoleType.PRIVILEGED_USER);}else{ret=this.navigationNode.hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR);}}else{ret=false;}if(_140d){com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.exiting(_140c,[ret]);}return ret;}});}if(!dojo._hasResource["com.ibm.mm.enabler.layout.LayoutModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.layout.LayoutModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.layout.LayoutModelImpl");dojo.declare("com.ibm.mm.enabler.layout.LayoutModelImpl",[com.ibm.mashups.enabler.model.LayoutModel,com.ibm.mashups.enabler.TreeModelController,com.ibm.mashups.enabler.wire.WireModelProvider,com.ibm.mm.enabler.strategy.HiddenMetaDataLoadingStrategyHelperImpl,com.ibm.mm.enabler.ConfirmableModelImpl,com.ibm.mm.enabler.model.ModelImpl,com.ibm.mm.enabler.layout._LayoutModelBaseMixin,com.ibm.mm.enabler.layout._LayoutModelWireModelProviderMixin,com.ibm.mm.enabler.layout._LayoutModelTreeModelControllerMixin,com.ibm.mm.enabler.layout._LayoutModelLocatorMixin,com.ibm.mm.enabler.DirtyFlagProviderImpl,com.ibm.mm.enabler.LazyLoadSupport],{ns:null,urlType:com.ibm.mashups.enabler.model.url.ModelUrlFactory.LAYOUT_URL,entryUrl:"",navigationNode:null,constructor:function(href,uri,_140e){this.uri=uri;this.href=href;this.navigationNode=_140e;this.modelMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","modelMessages");var _140f=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_CONTENT);this.prefix=_140f.idprefix;this.entryUrl=this.href;this.ns=dojo.delegate(_140f.namespaces,com.ibm.mm.enabler.model.NameSpaceFactory.getNameSpaces([com.ibm.mm.enabler.model.NameSpaceFactory.NS_ATOM,com.ibm.mm.enabler.model.NameSpaceFactory.NS_THR,com.ibm.mm.enabler.model.NameSpaceFactory.NS_XML,com.ibm.mm.enabler.model.NameSpaceFactory.NS_OPENSEARCH,com.ibm.mm.enabler.model.NameSpaceFactory.NS_XHTML,com.ibm.mm.enabler.model.NameSpaceFactory.NS_XSI]));var _1410=function(){var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME);cs.switchToModifiablePersistenceMode();this.removeDirtyCallback(_1410);};this.addDirtyCallback(this,dojo.hitch(this,_1410));},_getNavigationNode:function(){return this.navigationNode;},_commit:function(_1411,sync,_1412){if(!com.ibm.mashups.enabler.io.XHRMultipartFactory.isMultipartEnabled()){sync=true;}var _1413=com.ibm.mashups.enabler.io.XHRMultipartFactory;var _1414=_1413.create();_1414.startTransaction(_1413.CONTEXT_ENABLER);this.widgetWindowLoadAheadMap={};this._commitChanges(_1411,sync,_1412,this.getRoot().start(true));var _1415=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.StrategyService.SERVICE_NAME);var _1416=new com.ibm.mashups.enabler.strategy.WidgetWindowLoadAheadStrategy(this.widgetWindowLoadAheadMap);_1415.setStrategy("com.ibm.mashups.enabler.widget.WidgetModel",_1416);_1414.endTransactionDeferred().start();_1415.removeStrategy("com.ibm.mashups.enabler.widget.WidgetModel","com.ibm.mashups.enabler.strategy.WidgetWindowLoadAheadStrategy");this._commitWireModel(_1411,sync,_1412);_1414=_1413.create();_1414.startTransaction(_1413.CONTEXT_ENABLER);this._commitDelete(_1411,sync,_1412);_1414.endTransactionDeferred().start();this._setClean();},_replaceNodeXmlFromFeed:function(node,_1417,_1418){if(_1418){var entry=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("http://atom:entry",_1418,this.ns);if(entry){this._replaceNodeXml(node,_1417,entry);}}},_replaceNodeXml:function(node,_1419,_141a){if(dojo.isWebKit){_141a=_141a.cloneNode(true);}var _141b=node.getXml().parentNode;if(!_1419){_1419=this._getPrevious(node);}var _141c=this._getNext(node);var _141d=this._isClientNode(node);var oldId=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(node);this._deleteNode(node.getXml(),true);node.setXml(_141a);node._setClean();_141b.appendChild(node.getXml());if(_1419&&_141d){this._setNext(_1419,node);}if(_141c){this._setNext(node,_141c);}var newId=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(node);if(oldId!=newId){this._nodes.remove(oldId);this._nodes.add(newId,node);}this._setDirty();},_commitWireModel:function(_141e,sync,_141f){if(this._wireModel){this.lazyLoadModules(["WidgetModel"]);var _1420=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();if(this._wireModel._isDirty()&&_1420.isDirty()){_1420.commit().start(sync);}this._wireModel._commit(_141e,sync,_141f);}},_commitDelete:function(_1421,sync,_1422){this._deletedNodes.forEach(function(entry){var node=entry.valueOf();var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(node.getEditLink(),this);var _1423=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);_1422._acquire();_1423.remove(dojo.hitch(this,function(type,data,xhr,_1424){if(_1424){_1424.finishOperation(node.getID(),com.ibm.mashups.enabler.DeferredOperation.OPERATION_DELETE,xhr.status);}_1422._release(_1424,xhr.status);}),_1421);},this);this._deletedNodes.clear();},_commitChanges:function(_1425,sync,_1426,_1427){if(!_1427){return;}var _1428=this.getChildren(_1427);var _1429=null;while(_1428.hasNext()){var node=_1428.next();if(this._isClientNode(node)){this._insertCommit(node,_1429,_1425,sync,_1426);}else{if(node&&node._isDirty()){this._updateCommit(node,_1425,sync,_1426);}}if(this._isContainer(node)){this._commitChanges(_1425,sync,_1426,node);}_1429=node;}},_prepareNodeCommit:function(node){var _142a=true;var _142b=null;var _142c=node;while(_142a){var _142d=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("atom:link[@rel='next']",_142c.getXml(),this.ns);if(_142d){var _142e=com.ibm.mm.enabler.utils.Utils.getIdFromExtUri(this.prefix,_142d);var _142f=this.find(_142e).start();var _1430=this._isClientNode(_142f);var _1431=_142f._isDirty();_142a=_1430||_1431;if(!_142a){_142b=_142f;}_142c=_142f;}else{_142a=false;_142b=null;}}_142c=new com.ibm.mm.enabler.layout.LayoutNodeImpl(node.getXml().cloneNode(true),this);this._setNext(_142c,_142b);return _142c;},_updateCommit:function(node,_1432,sync,_1433){var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(node.getEditLink(),this);myUrl.setParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_REPRESENTATION,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_REPRESENTATION_VALUE_FULL);var _1434=node;if(this._isControl(node)){myUrl.addParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_ASPECT,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_ASPECT_VALUE_ACCESS_CONTROL);this.widgetWindowLoadAheadMap[node.getID()]=node;_1434=this._prepareNodeCommit(node);}var _1435=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);_1433._acquire();_1435.update(_1434.toString(),dojo.hitch(this,function(type,data,xhr,args){var _1436=args.deferred;try{if(xhr.status==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK){this._replaceNodeXmlFromFeed(args.node,null,data);}if(_1436){_1436.finishOperation(com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(args.node),com.ibm.mashups.enabler.DeferredOperation.OPERATION_MODIFY,xhr.status);}}catch(e){console.error(e);}_1433._release(_1436,xhr.status);}),{node:node,deferred:_1432});},_insertCommit:function(node,_1437,_1438,sync,_1439){var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(this.entryUrl,this);myUrl.setParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_REPRESENTATION,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_REPRESENTATION_VALUE_FULL);var _143a=node;if(this._isControl(node)){myUrl.addParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_ASPECT,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_ASPECT_VALUE_ACCESS_CONTROL);this.widgetWindowLoadAheadMap[node.getID()]=node;_143a=this._prepareNodeCommit(node);}var _143b=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);_1439._acquire();_143b.create(_143a.toString(),dojo.hitch(this,function(type,data,xhr,args){var _143c=args.deferred;var node=args.node;var _143d=args.previousNode;try{if(xhr.status==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_CREATED){this._replaceNodeXmlFromFeed(node,_143d,data);}if(_143c){_143c.finishOperation(node,com.ibm.mashups.enabler.DeferredOperation.OPERATION_CREATE,xhr.status,com.ibm.mm.enabler.DeferredDataComposer._dataFromXhr(xhr));}}catch(e){console.error(e);}_1439._release(_143c,xhr.status);}),{node:node,previousNode:_1437,deferred:_1438});},_getMediaLink:function(){var _143e=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("atom:link[@ext:rel='media']",this.root.xmlData,this.ns);if(_143e){return _143e.getAttribute("href");}return null;},_getEditMediaLink:function(){var _143f=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("atom:link[@rel='edit-media']",this.root.xmlData,this.ns);if(_143f){return _143f.getAttribute("href");}return null;}});com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.layout.LayoutModelImpl");com.ibm.mm.enabler.layout.LayoutModelImpl.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;}if(!dojo._hasResource["com.ibm.mashups.enabler.model.LayoutModel"]){dojo._hasResource["com.ibm.mashups.enabler.model.LayoutModel"]=true;dojo.provide("com.ibm.mashups.enabler.model.LayoutModel");}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.UserLoadAheadStrategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.UserLoadAheadStrategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.UserLoadAheadStrategy");dojo.declare("com.ibm.mashups.enabler.strategy.UserLoadAheadStrategy",com.ibm.mashups.enabler.strategy.Strategy,{constructor:function(_1440){this.loadAheadUser=_1440;this.userModel=null;},isLoadAheadUser:function(){return this.loadAheadUser;},setUserModel:function(_1441){this.userModel=_1441;},getUserModel:function(){if(null===this.userModel){this.userModel=com.ibm.mashups.enabler.user.Factory.getUserModel();}return this.userModel;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.Event"]){dojo._hasResource["com.ibm.mashups.enabler.widget.Event"]=true;dojo.provide("com.ibm.mashups.enabler.widget.Event");dojo.declare("com.ibm.mashups.enabler.widget.Event",[com.ibm.mashups.enabler.Identifiable,com.ibm.mashups.enabler.Localized],{getName:function(){},isPublished:function(){},isHandled:function(){},getPayloadType:function(){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.EventProvider"]){dojo._hasResource["com.ibm.mashups.enabler.widget.EventProvider"]=true;dojo.provide("com.ibm.mashups.enabler.widget.EventProvider");dojo.declare("com.ibm.mashups.enabler.widget.EventProvider",null,{getEvents:function(_1442){},getEvent:function(name){},getEventByID:function(id){},HANDLED_NAME_PREFIX:"handled_",PUBLISHED_NAME_PREFIX:"published_"});}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.ModifiableEvent"]){dojo._hasResource["com.ibm.mashups.enabler.widget.ModifiableEvent"]=true;dojo.provide("com.ibm.mashups.enabler.widget.ModifiableEvent");dojo.declare("com.ibm.mashups.enabler.widget.ModifiableEvent",[com.ibm.mashups.enabler.widget.Event,com.ibm.mashups.enabler.ModifiableLocalized,com.ibm.mashups.enabler.DirtyFlagProvider],{setName:function(name){},setPayloadType:function(_1443){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.ModifiableEventProvider"]){dojo._hasResource["com.ibm.mashups.enabler.widget.ModifiableEventProvider"]=true;dojo.provide("com.ibm.mashups.enabler.widget.ModifiableEventProvider");dojo.declare("com.ibm.mashups.enabler.widget.ModifiableEventProvider",[com.ibm.mashups.enabler.widget.EventProvider,com.ibm.mashups.enabler.DirtyFlagProvider],{createEvent:function(name,_1444){},getEvents:function(_1445){},getEvent:function(name){},addEvent:function(event){},removeEvent:function(event){},confirmAddEvent:function(event){},confirmRemoveEvent:function(event){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.Preferences"]){dojo._hasResource["com.ibm.mashups.enabler.widget.Preferences"]=true;dojo.provide("com.ibm.mashups.enabler.widget.Preferences");dojo.declare("com.ibm.mashups.enabler.widget.Preferences",null,{getValue:function(name){},getValues:function(name){},isReadOnly:function(name){},getNames:function(){},getMap:function(){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.ModifiablePreferences"]){dojo._hasResource["com.ibm.mashups.enabler.widget.ModifiablePreferences"]=true;dojo.provide("com.ibm.mashups.enabler.widget.ModifiablePreferences");dojo.declare("com.ibm.mashups.enabler.widget.ModifiablePreferences",[com.ibm.mashups.enabler.widget.Preferences,com.ibm.mashups.enabler.DirtyFlagProvider],{confirmRemove:function(name){},confirmSetValue:function(name,value){},confirmSetValues:function(name,_1446){},confirmSetReadOnly:function(name){},setValue:function(name,value){},setValue:function(name,value,_1447){},setValues:function(name,_1448){},setValues:function(name,_1449,_144a){},remove:function(name){}});com.ibm.mashups.enabler.widget.ModifiablePreferences.TOPIC_BASE="/"+("com.ibm.mashups.enabler.widget.ModifiablePreferences".replace(/\./ig,"/"))+"/";com.ibm.mashups.enabler.widget.ModifiablePreferences.TOPIC_PREFERENCES_SET=com.ibm.mashups.enabler.widget.ModifiablePreferences.TOPIC_BASE+"set";com.ibm.mashups.enabler.widget.ModifiablePreferences.TOPIC_PREFERENCES_REMOVE=com.ibm.mashups.enabler.widget.ModifiablePreferences.TOPIC_BASE+"remove";}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.PreferencesProvider_API"]){dojo._hasResource["com.ibm.mashups.enabler.widget.PreferencesProvider_API"]=true;dojo.provide("com.ibm.mashups.enabler.widget.PreferencesProvider_API");dojo.provide("com.ibm.mashups.enabler.widget.PreferencesProvider");dojo.declare("com.ibm.mashups.enabler.widget.PreferencesProvider",null,{getPreferences:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.widget.PreferencesImpl"]){dojo._hasResource["com.ibm.mm.enabler.widget.PreferencesImpl"]=true;dojo.provide("com.ibm.mm.enabler.widget.PreferencesImpl");dojo.declare("com.ibm.mm.enabler.widget.PreferencesImpl",[com.ibm.mashups.enabler.widget.Preferences],{constructor:function(node,_144b,_144c){this.prefProvider=_144b;this.defaultPreferences=_144c;var _144d=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_WIDGET);var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.li_ns=dojo.delegate(_144d.namespaces,nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_XML,nsf.NS_XSI]));this.PREFERENCES="atom:content/*/model:portletpreferences[@name='${0}']/base:value";this.PREFERENCES_BY_NAME="atom:content/*/model:portletpreferences[@name='${0}']";this.PREFERENCES_TOP="atom:content/*/model:portletpreferences";this.STAR_NODE="atom:content/*";this.BASE_NS=this.li_ns.base;this.BASE_VALUE="base:value";this.BASE_STRING="base:String";this.XSI_NS=this.li_ns.xsi;this.XSI_TYPE="xsi:type";this.MODEL_NS=this.li_ns.model;this.MODEL_PORTLETPREFERENCES="model:portletpreferences";},_getPrefNode:function(name){if(!name){return null;}var _144e=null;var expr=dojo.string.substitute(this.PREFERENCES_BY_NAME,[name]);var _144f=this.prefProvider._getPreferencesXML();var _1450=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,_144f,this.li_ns);return _1450||_144e;},getValue:function(name){var _1451=this._getPrefNode(name);if(_1451){var _1452="base:value[@xsi:type='base:String' and position()=1]/@value";var value=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(_1452,_1451,this.li_ns);if(value){return com.ibm.mm.enabler.utils.Dom.textContent(value);}}if(this.defaultPreferences){return this.defaultPreferences.getValue(name);}return null;},getValues:function(name){var _1453=this._getPrefNode(name);if(_1453){var _1454="base:value[@xsi:type='base:String']/@value";var _1455=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(_1454,_1453,this.li_ns);if(_1455&&_1455.length>0){return dojo.map(_1455,function(node){return com.ibm.mm.enabler.utils.Dom.textContent(node);});}}if(this.defaultPreferences){return this.defaultPreferences.getValues(name);}return null;},isReadOnly:function(name){var _1456=false;var _1457=this._getPrefNode(name);if(_1457){var _1458=_1457.getAttribute("read-only");if(_1458=="true"){_1456=true;}}else{if(this.defaultPreferences){_1456=this.defaultPreferences.isReadOnly(name);}}return _1456;},getNames:function(){var _1459=[];var names={};var _145a=this.prefProvider._getPreferencesXML();var _145b=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.PREFERENCES_TOP,_145a,this.li_ns);var i;if(_145b){var _145c=_145b.length;for(i=0;i<_145c;i++){names[_145b[i].getAttribute("name")]=null;}}if(this.defaultPreferences){var _145d=this.defaultPreferences.getNames();var _145e=_145d.length;for(i=0;i<_145e;++i){names[_145d[i]]=null;}}for(var name in names){if(Object.prototype.hasOwnProperty.call(names,name)){_1459.push(name);}}return _1459;},_getValueForMap:function(_145f){if(_145f){var _1460="base:value[@xsi:type='base:String' and position()=1]/@value";var value=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(_1460,_145f,this.li_ns);if(value){return com.ibm.mm.enabler.utils.Dom.textContent(value);}}return null;},getMap:function(){var _1461={};var _1462=this.prefProvider._getPreferencesXML();var _1463=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.PREFERENCES_TOP,_1462,this.li_ns);var i;if(this.defaultPreferences){_1461=this.defaultPreferences.getMap();}if(_1463){var map={};var _1464=_1463.length;for(i=0;i<_1464;i++){var name=_1463[i].getAttribute("name");var value=this._getValueForMap(_1463[i]);map[name]=value;}dojo.mixin(_1461,map);}return _1461;}});}if(!dojo._hasResource["com.ibm.mm.enabler.widget.ModifiablePreferencesImpl"]){dojo._hasResource["com.ibm.mm.enabler.widget.ModifiablePreferencesImpl"]=true;dojo.provide("com.ibm.mm.enabler.widget.ModifiablePreferencesImpl");dojo.declare("com.ibm.mm.enabler.widget.PreferencesUpdateContext",null,{source:"",type:""});dojo.declare("com.ibm.mm.enabler.widget.ModifiablePreferencesImpl",[com.ibm.mashups.enabler.widget.ModifiablePreferences,com.ibm.mm.enabler.widget.PreferencesImpl,com.ibm.mm.enabler.DirtyFlagProviderImpl],{setValue:function(name,value,_1465,_1466){if(value===null){return false;}name=name||null;if(!name||name===null||name==="undefined"){var indx=value.indexOf(":");if(indx>0){name=value.substring(2,indx-1);}var indx2=value.indexOf(",");if(indx2>indx){value=value.substring(indx+2,indx2-1);}}if(!this.confirmSetValue(name,value)){return false;}var _1467=this.getValue(name);var _1468=this._setValuesInternally(name,[value],_1465);if(_1468){var _1469=null;if(_1466){_1469=_1466;}dojo.publish(com.ibm.mashups.enabler.widget.ModifiablePreferences.TOPIC_PREFERENCES_SET,[this,name,_1467,value,_1469]);}return _1468;},setValues:function(name,_146a,_146b){if(_146a===null){return false;}if(!this.confirmSetValues(name,_146a)){return false;}return this._setValuesInternally(name,_146a,_146b);},_setValuesInternally:function(name,_146c,_146d){if(!dojo.isArray(_146c)){return false;}if(this.defaultPreferences&&this.defaultPreferences.isReadOnly(name)){return false;}var _146e=this._getPrefNode(name);var _146f=this.prefProvider._getPreferencesXML();var _1470=_146f.ownerDocument;if(_146e){if(_146e.hasChildNodes()){var _1471=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.BASE_VALUE,_146e,this.li_ns);dojo.forEach(_1471,dojo.destroy);}}else{var _1472=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this.STAR_NODE,_146f,this.li_ns);if(!_1472){return false;}_146e=com.ibm.mm.enabler.utils.Dom.createElement(_1470,this.MODEL_PORTLETPREFERENCES,this.MODEL_NS);_146e.setAttribute("name",name);_1472.appendChild(_146e);_146e.setAttribute("read-only","false");}if(this.confirmSetReadOnly(name)){if(_146d===true){_146e.setAttribute("read-only","true");}else{if(_146d===false){_146e.setAttribute("read-only","false");}}}var _1473=_146c.length;for(var i=0;i<_1473;++i){var value=_146c[i];var node=com.ibm.mm.enabler.utils.Dom.createElement(_1470,this.BASE_VALUE,this.BASE_NS);com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(_1470,node,this.XSI_TYPE,"type",this.XSI_NS,this.BASE_STRING);node.setAttribute("value",value);_146e.appendChild(node);}this._setDirty();return true;},remove:function(name,_1474){if(!this.confirmRemove(name)){return false;}var _1475=this._getPrefNode(name);if(!_1475){return false;}var _1476=this.getValue(name);var _1477=this.prefProvider._getPreferencesXML();var _1478=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this.STAR_NODE,_1477,this.li_ns);if(!_1478){return false;}_1478.removeChild(_1475);this._setDirty();var _1479=null;if(_1474){_1479=_1474;}dojo.publish(com.ibm.mashups.enabler.widget.ModifiablePreferences.TOPIC_PREFERENCES_REMOVE,[this,name,_1476,null,_1479]);return true;},confirmRemove:function(name){var _147a=this._getPrefNode(name);if(!_147a){return false;}return true;},confirmSetValue:function(name,value){return true;},confirmSetValues:function(name,_147b){return true;},confirmSetReadOnly:function(name){return true;}});}if(!dojo._hasResource["com.ibm.mm.enabler.widget.HierarchicalPreferencesImpl"]){dojo._hasResource["com.ibm.mm.enabler.widget.HierarchicalPreferencesImpl"]=true;dojo.provide("com.ibm.mm.enabler.widget.HierarchicalPreferencesImpl");dojo.declare("com.ibm.mm.enabler.widget.HierarchicalPreferencesImpl",com.ibm.mashups.enabler.widget.ModifiablePreferences,{constructor:function(_147c){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;var _147d="constructor(basePreferences)";var _147e=this.LOGGER.isLoggable(this.LOG_LEVEL,_147c);if(_147e){this.LOGGER.entering(_147d);}this.basePrefs=_147c;this.prefProvider=this.basePrefs.prefProvider;this.parentPrefs=this.prefProvider._getParentHierarchicalPreferences();dojo.subscribe(com.ibm.mashups.enabler.widget.ModifiablePreferences.TOPIC_PREFERENCES_SET,this,"_setValueHandler");dojo.subscribe(com.ibm.mashups.enabler.widget.ModifiablePreferences.TOPIC_PREFERENCES_REMOVE,this,"_removeHandler");this.eventContext={source:this,type:"hierachyUpdate",provider:this.prefProvider.getID()};if(_147e){this.LOGGER.exiting(_147d);}},isReadOnly:function(name){if(this.basePrefs.getValue(name)!==null){return this.basePrefs.isReadOnly(name);}if(this.parentPrefs){return this.parentPrefs.isReadOnly(name);}return false;},getValue:function(name){var value=this.basePrefs.getValue(name);if(value!==null){return value;}if(this.parentPrefs){return this.parentPrefs.getValue(name);}return null;},getValues:function(name){var _147f=this.basePrefs.getValues(name);if(_147f!==null){return _147f;}if(this.parentPrefs){return this.parentPrefs.getValues(name);}return null;},setValue:function(name,value,_1480,_1481){var _1482="setValue(name, value, readOnly, _context)";var _1483=this.LOGGER.isLoggable(this.LOG_LEVEL,[name,value,_1480,_1481]);if(_1483){this.LOGGER.entering(_1482);}if(!this.confirmSetValue(name,value)){if(_1483){this.LOGGER.trace(_1482,"confirmSetValue is false");}if(_1483){this.LOGGER.exiting(_1482,false);}return false;}if(_1483){this.LOGGER.trace(_1482,"Setting the new value");}var _1484=this.getValue(name);var _1485=this.basePrefs.setValue(name,value,_1480,_1481);if(_1483){this.LOGGER.exiting(_1482,_1485);}return _1485;},setValues:function(name,_1486,_1487){var _1488="setValues(name, values, readOnly)";var _1489=this.LOGGER.isLoggable(this.LOG_LEVEL,[name,_1486,_1487]);if(_1489){this.LOGGER.entering(_1488);}if(!this.confirmSetValues(name,_1486)){if(_1489){this.LOGGER.trace(_1488,"confirmSetValues is false");}if(_1489){this.LOGGER.exiting(_1488,false);}return false;}if(_1489){this.LOGGER.trace(_1488,"Setting the new values");}var _148a=this.basePrefs.setValues(name,_1486,_1487);if(_1489){this.LOGGER.exiting(_1488,_148a);}return _148a;},remove:function(name,_148b){var _148c=this.basePrefs.remove(name,_148b);return _148c;},getNames:function(){var _148d="getNames()";var _148e=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_148e){this.LOGGER.entering(_148d);}var _148f=[];var names={};var i;if(this.parentPrefs){if(_148e){this.LOGGER.trace(_148d,"Getting names from parent preference");}var _1490=this.parentPrefs.getNames();var _1491=_1490.length;for(i=0;i<_1491;++i){names[_1490[i]]=null;}}if(_148e){this.LOGGER.trace(_148d,"Getting own names");}var _1492=this.basePrefs.getNames();var _1493=_1492.length;for(i=0;i<_1493;++i){names[_1492[i]]=null;}for(var name in names){if(Object.prototype.hasOwnProperty.call(names,name)){_148f.push(name);}}if(_148e){this.LOGGER.exiting(_148d);}return _148f;},getMap:function(){var _1494="getMap()";var _1495=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1495){this.LOGGER.entering(_1494);}var _1496={};if(this.parentPrefs){if(_1495){this.LOGGER.trace(_1494,"Getting map from parent preference");}_1496=this.parentPrefs.getMap();}if(_1495){this.LOGGER.trace(_1494,"Getting own map");}var _1497=this.basePrefs.getMap();dojo.mixin(_1496,_1497);if(_1495){this.LOGGER.exiting(_1494);}return _1496;},confirmRemove:function(name){return this.basePrefs.confirmRemove(name);},confirmSetValue:function(name,value){var _1498="confirmSetValue(name, value)";var _1499=this.LOGGER.isLoggable(this.LOG_LEVEL,[name,value]);if(_1499){this.LOGGER.entering(_1498);}if(this.parentPrefs&&this.parentPrefs.isReadOnly(name)){if(_1499){this.LOGGER.trace(_1498,"Preference is read only on parent");}if(_1499){this.LOGGER.exiting(_1498,false);}return false;}var _149a=this.basePrefs.confirmSetValue(name,value);if(_1499){this.LOGGER.trace(_1498,"Confirm on base preferences is ${0}",_149a);}if(_1499){this.LOGGER.exiting(_1498,_149a);}return _149a;},confirmSetValues:function(name,_149b){return this.confirmSetValue(name,_149b);},confirmSetReadOnly:function(name){return false;},_valueExistsOnHierarchy:function(_149c){},_setValueHandler:function(_149d,_149e,_149f,_14a0,_14a1){if(_149d!==this.basePrefs&&_149d!==this.parentPrefs){return;}var myOV=_149f;if(_149d===this.basePrefs){if(_149f===null&&this.parentPrefs){myOV=this.parentPrefs.getValue(_149e);}}else{if(_149d===this.parentPrefs){var _14a2=this.basePrefs.getValue(_149e);if(_14a2!==null){return;}}}if(_14a1===null){_14a1=this.eventContext;}dojo.publish(com.ibm.mashups.enabler.widget.ModifiablePreferences.TOPIC_PREFERENCES_SET,[this,_149e,myOV,_14a0,_14a1]);},_removeHandler:function(_14a3,_14a4,_14a5,_14a6,_14a7){if(_14a3!==this.basePrefs&&_14a3!==this.parentPrefs){return;}if(_14a7===null){_14a7=this.eventContext;}var value;if(_14a3===this.parentPrefs){value=this.basePrefs.getValue(_14a4);if(value!==null){return;}}if(_14a3===this.basePrefs){if(this.parentPrefs){value=this.parentPrefs.getValue(_14a4);if(value!==null){dojo.publish(com.ibm.mashups.enabler.widget.ModifiablePreferences.TOPIC_PREFERENCES_SET,[this,_14a4,_14a5,value,_14a7]);return;}}}dojo.publish(com.ibm.mashups.enabler.widget.ModifiablePreferences.TOPIC_PREFERENCES_REMOVE,[this,_14a4,_14a5,_14a6,_14a7]);}});}if(!dojo._hasResource["com.ibm.mm.enabler.widget.PreferencesProviderImpl"]){dojo._hasResource["com.ibm.mm.enabler.widget.PreferencesProviderImpl"]=true;dojo.provide("com.ibm.mm.enabler.widget.PreferencesProviderImpl");dojo.declare("com.ibm.mm.enabler.widget.PreferencesProviderImpl",com.ibm.mashups.enabler.widget.PreferencesProvider,{getPreferences:function(){if(!this.preferences){var _14a8=this._getPreferencesXML();if(!_14a8){return null;}var _14a9=null;var _14aa=null;if(this._getDefaultPreferencesXML){_14a9=this._getDefaultPreferencesXML();if(_14a9){var me=this;var _14ab={_getPreferencesXML:function(){return me._getDefaultPreferencesXML();}};_14aa=new com.ibm.mm.enabler.widget.PreferencesImpl(_14a9,_14ab);}}this.preferences=new com.ibm.mm.enabler.widget.ModifiablePreferencesImpl(_14a8,this,_14aa);}return this.preferences;},_getParentPreferences:function(){var _14ac=this.model._getParent(this);if(_14ac&&_14ac.getPreferences){return _14ac.getPreferences();}else{return null;}},_getHierarchicalPreferences:function(){if(!this.hierarchicalPrefs){if(!this.getPreferences()){this.hierarchicalPrefs=this._getParentHierarchicalPreferences();}else{this.hierarchicalPrefs=new com.ibm.mm.enabler.widget.HierarchicalPreferencesImpl(this.getPreferences());}}return this.hierarchicalPrefs;},_getParentHierarchicalPreferences:function(){var _14ad=this.model._getParent(this);if(_14ad&&_14ad._getParentHierarchicalPreferences){return _14ad._getHierarchicalPreferences();}else{return null;}}});}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.PreferencesProvider"]){dojo._hasResource["com.ibm.mashups.enabler.widget.PreferencesProvider"]=true;dojo.provide("com.ibm.mashups.enabler.widget.PreferencesProvider");}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.WidgetDefinition_API"]){dojo._hasResource["com.ibm.mashups.enabler.widget.WidgetDefinition_API"]=true;dojo.provide("com.ibm.mashups.enabler.widget.WidgetDefinition_API");dojo.provide("com.ibm.mashups.enabler.widget.WidgetDefinition");dojo.declare("com.ibm.mashups.enabler.widget.WidgetDefinition",[com.ibm.mashups.enabler.Identifiable,com.ibm.mashups.enabler.ModifiableLocalized,com.ibm.mashups.enabler.ModifiableMetaData,com.ibm.mashups.enabler.widget.PreferencesProvider,com.ibm.mashups.enabler.widget.ModifiableEventProvider],{_type:"definition",getURL:function(){},getType:function(){},getSupportedModes:function(){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.WidgetDefinition"]){dojo._hasResource["com.ibm.mashups.enabler.widget.WidgetDefinition"]=true;dojo.provide("com.ibm.mashups.enabler.widget.WidgetDefinition");}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.WidgetInstance_API"]){dojo._hasResource["com.ibm.mashups.enabler.widget.WidgetInstance_API"]=true;dojo.provide("com.ibm.mashups.enabler.widget.WidgetInstance_API");dojo.provide("com.ibm.mashups.enabler.widget.WidgetInstance");dojo.declare("com.ibm.mashups.enabler.widget.WidgetInstance",[com.ibm.mashups.enabler.Identifiable,com.ibm.mashups.enabler.ModifiableMetaData,com.ibm.mashups.enabler.widget.PreferencesProvider,com.ibm.mashups.enabler.widget.ModifiableEventProvider],{_type:"instance"});}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.WidgetInstance"]){dojo._hasResource["com.ibm.mashups.enabler.widget.WidgetInstance"]=true;dojo.provide("com.ibm.mashups.enabler.widget.WidgetInstance");}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.WidgetWindow"]){dojo._hasResource["com.ibm.mashups.enabler.widget.WidgetWindow"]=true;dojo.provide("com.ibm.mashups.enabler.widget.WidgetWindow");dojo.declare("com.ibm.mashups.enabler.widget.WidgetWindow",[com.ibm.mashups.enabler.Identifiable,com.ibm.mashups.enabler.widget.PreferencesProvider,com.ibm.mashups.enabler.widget.ModifiableEventProvider],{_type:"window"});}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.WidgetModel_API"]){dojo._hasResource["com.ibm.mashups.enabler.widget.WidgetModel_API"]=true;dojo.provide("com.ibm.mashups.enabler.widget.WidgetModel_API");dojo.provide("com.ibm.mashups.enabler.widget.WidgetModel");dojo.declare("com.ibm.mashups.enabler.widget.WidgetModel",[com.ibm.mashups.enabler.Commitable,com.ibm.mashups.enabler.model.Model,com.ibm.mashups.enabler.Locator,com.ibm.mashups.enabler.Discardable,com.ibm.mashups.enabler.DirtyFlagProvider],{find:function(id){},findWidgetWindow:function(_14ae,_14af){},getWidgetDefinitionByWindow:function(_14b0){},getWidgetDefinitionByInstance:function(_14b1){},getWidgetWindow:function(_14b2){},isWidgetWindowCached:function(id){},getWidgetInstance:function(_14b3){},getHierarchicalPreferences:function(_14b4){},getHierarchicalEventProvider:function(_14b5){}});}if(!dojo._hasResource["com.ibm.mm.enabler.widget.ModifiableEventImpl"]){dojo._hasResource["com.ibm.mm.enabler.widget.ModifiableEventImpl"]=true;dojo.provide("com.ibm.mm.enabler.widget.ModifiableEventImpl");dojo.declare("com.ibm.mm.enabler.widget.ModifiableEventImpl",[com.ibm.mashups.enabler.widget.ModifiableEvent,com.ibm.mm.enabler.persistence.xml.LocalizedXmlImpl,com.ibm.mm.enabler.DirtyFlagProviderImpl],{constructor:function(node,_14b6){this.xmlData=node;this.eventProvider=_14b6;var _14b7=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_WIDGET);var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.li_ns=dojo.delegate(_14b7.namespaces,nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_XML,nsf.NS_XSI,nsf.NS_EVENT_DATATYPES]));this.QNAME_XPATH="model:qname";this.PAYLOAD_TYPE_XPATH="model:payload-type";this.PUBLISHED_LNAME="publish-event";this.PROCESSED_LNAME="process-event";this.MODEL_QNAME="model:qname";this.MODEL_PAYLOAD_TYPE="model:payload-type";this.STAR_NODE="atom:content/*";this.BASE_NS=this.li_ns.base;this.BASE_VALUE="base:value";this.BASE_STRING="base:String";this.XSI_NS=this.li_ns.xsi;this.XSI_TYPE="xsi:type";this.MODEL_NS=this.li_ns.model;this.TITLE_ELEMENT="model:title";this.TITLE=this.TITLE_ELEMENT+"/"+this.BASE_NLS_TITLE_STRING;this.DESCRIPTION_ELEMENT="model:description";this.DESCRIPTION=this.DESCRIPTION_ELEMENT+"/"+this.BASE_NLS_TITLE_STRING;this.DEFAULT_PAYLOAD_PREFIX="mmpayload";this.DEFAULT_NAME_PREFIX="mmname";this.DATATYPE_NS=this.li_ns[nsf.NS_EVENT_DATATYPES];this.XMLNS_NS=nsf.getNameSpaces([nsf.NS_XMLNS])[nsf.NS_XMLNS];},getID:function(){var rawID=this.xmlData.getAttribute("id");return com.ibm.mm.enabler.IdentifiableHelper.getID(rawID);},getName:function(){var expr=this.QNAME_XPATH;var _14b8=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this.xmlData,this.li_ns);if(!_14b8){return null;}var qName=com.ibm.mm.enabler.utils.Dom.textContent(_14b8);var _14b9=null;var _14ba=null;if(qName.indexOf(":")!=qName.length-1){_14b9=com.ibm.mm.enabler.utils.Dom.getNodeNSPrefix(qName);_14ba=com.ibm.mm.enabler.utils.Dom.removeNodeNS(qName);}else{_14ba=qName;}if(_14b9===null){return _14ba;}var ns=com.ibm.mm.enabler.utils.Dom.lookupNamespaceURI(_14b8,_14b9);if(ns===null){return _14ba;}return "{"+ns+"}"+_14ba;},isPublished:function(){var _14bb=com.ibm.mm.enabler.utils.Dom.getLocalName(this.xmlData);return (_14bb==this.PUBLISHED_LNAME);},isHandled:function(){var _14bc=com.ibm.mm.enabler.utils.Dom.getLocalName(this.xmlData);return (_14bc==this.PROCESSED_LNAME);},getPayloadType:function(){var expr=this.PAYLOAD_TYPE_XPATH;var _14bd=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this.xmlData,this.li_ns);if(!_14bd){return null;}var _14be=com.ibm.mm.enabler.utils.Dom.textContent(_14bd);var _14bf=com.ibm.mm.enabler.utils.Dom.getNodeNSPrefix(_14be);var _14c0=com.ibm.mm.enabler.utils.Dom.removeNodeNS(_14be);if(_14bf===null){return _14c0;}var ns=com.ibm.mm.enabler.utils.Dom.lookupNamespaceURI(_14bd,_14bf);if(ns===null){return _14c0;}return "{"+ns+"}"+_14c0;},_setQNameNode:function(_14c1,_14c2,value,_14c3){var expr=_14c2;var _14c4=this.xmlData.ownerDocument;var _14c5=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this.xmlData,this.li_ns);if(!_14c5){_14c5=com.ibm.mm.enabler.utils.Dom.createElement(_14c4,_14c1,this.li_ns.model);this.xmlData.appendChild(_14c5);}var nsUri=null;var _14c6=null;var _14c7=value.indexOf("{");if(_14c7===0){var nsEnd=value.indexOf("}");if(nsEnd==-1){throw new Error("Name is not a valid qName");}nsUri=value.substring(_14c7+1,nsEnd);_14c6=value.substring(nsEnd+1);}else{_14c6=value;}if(nsUri!==null){com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(_14c5.ownerDocument,_14c5,"xmlns:"+_14c3,_14c3,this.XMLNS_NS,nsUri);com.ibm.mm.enabler.utils.Dom.textContent(_14c5,_14c3+":"+_14c6);}else{com.ibm.mm.enabler.utils.Dom.textContent(_14c5,_14c6);}},setName:function(name){if(this.getName()==name){return;}this._setQNameNode(this.MODEL_QNAME,this.QNAME_XPATH,name,this.DEFAULT_NAME_PREFIX);this._setDirty();},setPayloadType:function(_14c8){var _14c9=_14c8;var _14ca=_14c8.indexOf("{");if(_14ca==-1){_14c9="{"+this.DATATYPE_NS+"}"+_14c8;}if(this.getPayloadType()==_14c9){return;}this._setQNameNode(this.MODEL_PAYLOAD_TYPE,this.PAYLOAD_TYPE_XPATH,_14c9,this.DEFAULT_PAYLOAD_PREFIX);this._setDirty();},_getXML:function(){return this.xmlData;},_setXML:function(_14cb){this.xmlData=_14cb;}});}if(!dojo._hasResource["com.ibm.mm.enabler.widget.HierarchicalEventProviderImpl"]){dojo._hasResource["com.ibm.mm.enabler.widget.HierarchicalEventProviderImpl"]=true;dojo.provide("com.ibm.mm.enabler.widget.HierarchicalEventProviderImpl");dojo.declare("com.ibm.mm.enabler.widget.HierarchicalEventProviderImpl",com.ibm.mashups.enabler.widget.EventProvider,{constructor:function(_14cc){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;var _14cd="constructor(baseEventProvider)";var _14ce=this.LOGGER.isLoggable(this.LOG_LEVEL,_14cc);if(_14ce){this.LOGGER.entering(_14cd);}this.baseEP=_14cc;this.parentEP=this.baseEP._getParentHierarchicalEventProvider();if(_14ce){this.LOGGER.exiting(_14cd);}},createEvent:function(name,_14cf){var _14d0="createEvent(name, handled)";var _14d1=this.LOGGER.isLoggable(this.LOG_LEVEL,[name,_14cf]);if(_14d1){this.LOGGER.entering(_14d0);}var _14d2=this.baseEP.createEvent(name,_14cf);if(_14d1){this.LOGGER.exiting(_14d0,_14d2);}return _14d2;},getEvents:function(_14d3){var _14d4="getEvents()";var _14d5=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_14d5){this.LOGGER.entering(_14d4);}var _14d6=[];var _14d7={};var i;var _14d8;if(_14d5){this.LOGGER.trace(_14d4,"Getting own events");}var _14d9=this.baseEP.getEvents(_14d3);var _14da=_14d9.length;for(i=0;i<_14da;++i){var _14db=_14d9[i];if(_14db.isHandled()){_14d8=this.HANDLED_NAME_PREFIX;}else{_14d8=this.PUBLISHED_NAME_PREFIX;}_14d7[_14d8+_14db.getName()]=_14d9[i];}if(this.parentEP){if(_14d5){this.LOGGER.trace(_14d4,"Getting events from parent event provider");}var _14dc=this.parentEP.getEvents(_14d3);var _14dd=_14dc.length;var name;for(i=0;i<_14dd;++i){var _14de=_14dc[i];name=_14de.getName();if(_14de.isHandled()){_14d8=this.HANDLED_NAME_PREFIX;}else{_14d8=this.PUBLISHED_NAME_PREFIX;}var _14df=_14d8+name;if(!(_14df in _14d7)){_14d7[_14df]=_14dc[i];}}}for(var _14e0 in _14d7){if(Object.prototype.hasOwnProperty.call(_14d7,_14e0)){_14d6.push(_14d7[_14e0]);}}if(_14d5){this.LOGGER.exiting(_14d4);}return _14d6;},getEvent:function(name){var event=this.baseEP.getEvent(name);if(event!==null){return event;}if(this.parentEP){return this.parentEP.getEvent(name);}return null;},addEvent:function(event){var _14e1="addEvent(event)";var _14e2=this.LOGGER.isLoggable(this.LOG_LEVEL,[event]);if(_14e2){this.LOGGER.entering(_14e1);}if(!this.confirmAddEvent(event)){if(_14e2){this.LOGGER.trace(_14e1,"confirmAddEvent is false");}if(_14e2){this.LOGGER.exiting(_14e1);}return;}this.baseEP.addEvent(event);if(_14e2){this.LOGGER.exiting(_14e1);}},removeEvent:function(event){var _14e3="removeEvent(event)";var _14e4=this.LOGGER.isLoggable(this.LOG_LEVEL,[event]);if(_14e4){this.LOGGER.entering(_14e3);}if(!this.confirmRemoveEvent(event)){if(_14e4){this.LOGGER.trace(_14e3,"confirmRemoveEvent is false");}if(_14e4){this.LOGGER.exiting(_14e3);}return;}this.baseEP.removeEvent(event);if(_14e4){this.LOGGER.exiting(_14e3);}},confirmAddEvent:function(event){return this.baseEP.confirmAddEvent(event);},confirmRemoveEvent:function(event){return this.baseEP.confirmRemoveEvent(event);},getEventByID:function(id){var event=this.baseEP.getEventByID(id);if(event!==null){return event;}if(this.parentEP){return this.parentEP.getEventByID(id);}return null;}});}if(!dojo._hasResource["com.ibm.mm.enabler.widget.ModifiableEventProviderImpl"]){dojo._hasResource["com.ibm.mm.enabler.widget.ModifiableEventProviderImpl"]=true;dojo.provide("com.ibm.mm.enabler.widget.ModifiableEventProviderImpl");dojo.declare("com.ibm.mm.enabler.widget.ModifiableEventProviderImpl",[com.ibm.mashups.enabler.widget.ModifiableEventProvider,com.ibm.mm.enabler.DirtyFlagProviderImpl],{constructor:function(){this._events=null;this.EVENTS_TOP_XPATH="atom:content/*/model:events";this.EVENTS_XPATH=this.EVENTS_TOP_XPATH+"/*";this.PARENT_XPATH="atom:content/*";this.MODEL_PUBLISH_EVENT="model:publish-event";this.MODEL_PROCESS_EVENT="model:process-event";this.MODEL_EVENTS="model:events";this._eventProviderIsDirty=false;this.idService=com.ibm.mashups.enabler.services.IdentificationService;},createEvent:function(name,_14e5){var _14e6=this._getEventXML().ownerDocument;var _14e7=this.MODEL_PUBLISH_EVENT;if(_14e5){_14e7=this.MODEL_PROCESS_EVENT;}var node=com.ibm.mm.enabler.utils.Dom.createElement(_14e6,_14e7,this.ns.model);node.setAttribute("id","cid:"+this.idService.createClientID());var _14e8=new com.ibm.mm.enabler.widget.ModifiableEventImpl(node,this);_14e8._addDirtyCallback(this,function(){this._setDirty();});_14e8.setName(name);_14e8.setPayloadType("{"+this.ns.xsi+"}String");_14e8._setDirty();return _14e8;},getEvents:function(_14e9){var _14ea=true;var _14eb=false;var _14ec=false;if(typeof _14e9!="undefined"&&_14e9!==null){if(_14e9[com.ibm.mashups.enabler.widget.Constants.FILTER_HANDLED_EVENTS]!==null&&_14e9[com.ibm.mashups.enabler.widget.Constants.FILTER_HANDLED_EVENTS]===true){_14eb=true;_14ea=false;}if(_14e9[com.ibm.mashups.enabler.widget.Constants.FILTER_PUBLISHED_EVENTS]!==null&&_14e9[com.ibm.mashups.enabler.widget.Constants.FILTER_PUBLISHED_EVENTS]===true){_14ec=true;_14ea=false;}if(_14ec&&_14eb){_14ea=true;}}if(this._events===null){this._loadEventsFromXML();}var _14ed=[];for(var _14ee in this._events){if(Object.prototype.hasOwnProperty.call(this._events,_14ee)){_14ed.push(this._events[_14ee]);}}var event;if(this._defaultEventProvider){var _14ef=this._defaultEventProvider.getEvents();var _14f0=_14ef.length;for(var i=0;i<_14f0;++i){event=_14ef[i];if(event.isHandled()){namePrefix=this.HANDLED_NAME_PREFIX;}else{namePrefix=this.PUBLISHED_NAME_PREFIX;}if(!(namePrefix+event.getName() in this._events)){_14ed.push(event);}}}var _14f1=[];if(!_14ea){var _14f2=_14ed.length;for(var j=0;j<_14f2;++j){event=_14ed[j];if(_14eb&&event.isHandled()){_14f1.push(event);}else{if(_14ec&&event.isPublished()){_14f1.push(event);}}}_14ed=_14f1;}return _14ed;},_updateEventsFromXML:function(_14f3){if(this._events===null){return;}if(!this._getEventXML()){return;}var expr=this.EVENTS_XPATH;var _14f4=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(expr,(_14f3)?_14f3:this._getEventXML(),this.ns);if(!_14f4){return;}var _14f5=_14f4.length;var _14f6;for(var i=0;i<_14f5;++i){var event=new com.ibm.mm.enabler.widget.ModifiableEventImpl(_14f4[i],this);var _14f7;if(event.isHandled()){_14f7=this.HANDLED_NAME_PREFIX;}else{_14f7=this.PUBLISHED_NAME_PREFIX;}var _14f8=_14f7+event.getName();if(_14f8 in this._events){var oldID=this._events[_14f8].getID();this._events[_14f8]._setXML(event._getXML());var newID=this._events[_14f8].getID();if(oldID!=newID){this.idService.attachServerID(oldID,newID);}}}},_loadEventsFromXML:function(){var expr=this.EVENTS_XPATH;var _14f9=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(expr,this._getEventXML(),this.ns);this._events={};if(!_14f9){return;}var _14fa=_14f9.length;var _14fb;for(var i=0;i<_14fa;++i){var event=new com.ibm.mm.enabler.widget.ModifiableEventImpl(_14f9[i],this);var _14fc;if(event.isHandled()){_14fc=this.HANDLED_NAME_PREFIX;}else{_14fc=this.PUBLISHED_NAME_PREFIX;}var _14fd=_14fc+event.getName();this._events[_14fd]=event;}},getEvent:function(name){if(this._events===null){this._loadEventsFromXML();}if(name===null){return null;}var _14fe=this.HANDLED_NAME_PREFIX+name;if(_14fe in this._events){return this._events[_14fe];}_14fe=this.PUBLISHED_NAME_PREFIX+name;if(_14fe in this._events){return this._events[_14fe];}if(this._defaultEventProvider){return this._defaultEventProvider.getEvent(name);}return null;},addEvent:function(event){if(!event){return;}if(!this.confirmAddEvent(event)){return;}var expr=this.EVENTS_TOP_XPATH;var _14ff=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this._getEventXML(),this.ns);if(!_14ff){var _1500=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this.PARENT_XPATH,this._getEventXML(),this.ns);if(!_1500){return;}_14ff=com.ibm.mm.enabler.utils.Dom.createElement(this._getEventXML().ownerDocument,this.MODEL_EVENTS,this.ns.model);_1500.appendChild(_14ff);}_14ff.appendChild(event._getXML());if(this._events===null){this._loadEventsFromXML();}var _1501;if(event.isHandled()){_1501=this.HANDLED_NAME_PREFIX;}else{_1501=this.PUBLISHED_NAME_PREFIX;}var _1502=_1501+event.getName();this._events[_1502]=event;this._eventProviderIsDirty=true;this._setDirty();},removeEvent:function(event){if(!event){return;}if(!this.confirmRemoveEvent(event)){return;}var expr=this.EVENTS_TOP_XPATH;var _1503=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this._getEventXML(),this.ns);if(!_1503){return;}_1503.removeChild(event._getXML());if(this._events!==null){var _1504;if(event.isHandled()){_1504=this.HANDLED_NAME_PREFIX;}else{_1504=this.PUBLISHED_NAME_PREFIX;}var _1505=_1504+event.getName();if(_1505 in this._events){delete this._events[_1505];}}this._eventProviderIsDirty=true;this._setDirty();},confirmAddEvent:function(event){return true;},confirmRemoveEvent:function(event){return true;},_getHierarchicalEventProvider:function(){if(!this.hierarchicalEvents){this.hierarchicalEvents=new com.ibm.mm.enabler.widget.HierarchicalEventProviderImpl(this);}return this.hierarchicalEvents;},_getParentHierarchicalEventProvider:function(){var _1506=this.model._getParent(this);if(_1506&&_1506._getParentHierarchicalEventProvider){return _1506._getHierarchicalEventProvider();}else{return null;}},_getEventXML:function(){return this.xmlData;},_isEventProviderDirty:function(){if(this._eventProviderIsDirty){return true;}if(this._events===null){return false;}for(var _1507 in this._events){if(Object.prototype.hasOwnProperty.call(this._events,_1507)){var event=this._events[_1507];if(event._isDirty()){return true;}}}return false;},_setEventProviderClean:function(){this._eventProviderIsDirty=false;if(this._events===null){return;}for(var _1508 in this._events){if(Object.prototype.hasOwnProperty.call(this._events,_1508)){var event=this._events[_1508];event._setClean();}}},_isEmpty:function(obj){return obj===null||typeof obj=="undefined";},getEventByID:function(id){if(this._events===null){this._loadEventsFromXML();}if(id===null){return null;}var _1509=this.getEvents(null);if(_1509&&_1509!==null){for(var i=0,l=_1509.length;i