yjs/dest/browser/Widgets/libs/DUIClient.min.js
2014-08-06 13:33:08 +02:00

2 lines
58 KiB
JavaScript

DUIClient=function(){var a=parent.document.getElementById(self.frameElement.id).parentNode.id.split("-")[1],b=this,c=new iwc.Client(["*"]);c._componentName="duiclient-"+a,this.externalCallback=function(){},this._onUpdateState=function(a){var b=a.extras.isForMigration;b?this.finishMigration(a):this.updateState(a)},this.getIwcClient=function(){return c},this._onGetWidgetState=function(b){var d=null,e=!1;null!=b.extras.target&&(d=b.extras.target,e=!0);var f=this.getWidgetState(e),g={};g=e?{action:"DUI_WS_MIG",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{target:d,widgetId:a,widgetStates:f}}:{action:"DUI_WS",categories:["DUI"],component:b.sender,data:"",dataType:"",extras:{widgetId:a,widgetStates:f}},c.publish(g)},this._onAppStateChange=function(a){this.changeWithApp(a)},this._prepareMigration=function(){console.log("do sth before the widget is removed"),this.prepareMigration()},this._logOff=function(){var b=this.getWidgetState(!1);resIntent={action:"DUI_WS_LOGOFF",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a,widgetStates:b}},c.publish(resIntent)};var d=function(c){if(b.externalCallback(c),("undefined"==typeof c.flags||-1==c.flags.indexOf("PUBLISH_GLOBAL"))&&"undefined"!=typeof c.categories&&-1!=c.categories.indexOf("DUI")){var d=c.action;if("undefined"!=typeof c.extras.widgetId&&c.extras.widgetId==a){if("DUI_UPDATE_STATE"==d)return void b._onUpdateState(c);if("DUI_GET_WS"==d)return void b._onGetWidgetState(c);if("DUI_PRE_MIG"==d)return void b._prepareMigration(c)}else if("undefined"==typeof c.extras.widgetId){if("DUI_LOG_OFF"==d)return void b._logOff(c);if("DUI_APP_CHANGE"==d)return void b._onAppStateChange(c);if("DUI_REG_CLIENT"==d)return void b.initOK();"DUI_AS"==d&&b.onAppState(c.extras.appStates)}}};c.connect(d),this.getWidgetState=function(){console.log("the widget collects it is state and return, overwrite it");var a={};return a},this.changeWithApp=function(a){var b=a.extras.oldStates,c=a.extras.newStates;console.log(b),console.log(c),console.log("the widget may need to change something following the whole app")},this.prepareMigration=function(){this.prepareMigDone()},this.updateState=function(a){var b={};b=a.extras.widgetStates;var c=a.extras.appStates;console.log(b),"undefined"!=typeof c&&console.log(c),console.log("update the widget state, widget need to overwrite it")},this.finishMigration=function(a){var b={};b=a.extras.widgetStates;var c=a.extras.appStates;console.log(b),"undefined"!=typeof c&&console.log(c),console.log("the migration is done, the widget may need to perform special inits before update the widget state e.g. login to the lasServer again.")},this.prepareMigDone=function(){var b={component:"duimanager",categories:["DUI"],action:"DUI_PRE_MIG_OK",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.saveWidgetState=function(){var b=this.getWidgetState(!1),d={action:"DUI_SAVE_WS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetStates:b,widgetId:a}};c.publish(d)},this.sendIntent=function(a){c.publish(a)},this.requireWidgetState=function(){var b={action:"DUI_REQ_WS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.setAppState=function(a){var b={action:"DUI_SET_AS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{states:a}};c.publish(b)},this.getAppState=function(){var a={action:"DUI_GET_AS",categories:["DUI"],component:"duimanager",data:"",dataType:""};c.publish(a)},this.onAppState=function(){},this.initOK=function(){var b={action:"DUI_CLIENT_OK",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.publishToUser=function(a){var b={action:"DUI_PUB_USER",categories:["DUI"],component:"duimanager",data:JSON.stringify(a),dataType:"application/json",extras:{}};c.publish(a),c.publish(b)},this.connect=function(a){this.externalCallback=a}},DUIClient=function(){var a=parent.document.getElementById(self.frameElement.id).parentNode.id.split("-")[1],b=this,c=new iwc.Client(["*"]);c._componentName="duiclient-"+a,this.externalCallback=function(){},this._onUpdateState=function(a){var b=a.extras.isForMigration;b?this.finishMigration(a):this.updateState(a)},this.getIwcClient=function(){return c},this._onGetWidgetState=function(b){var d=null,e=!1;null!=b.extras.target&&(d=b.extras.target,e=!0);var f=this.getWidgetState(e),g={};g=e?{action:"DUI_WS_MIG",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{target:d,widgetId:a,widgetStates:f}}:{action:"DUI_WS",categories:["DUI"],component:b.sender,data:"",dataType:"",extras:{widgetId:a,widgetStates:f}},c.publish(g)},this._onAppStateChange=function(a){this.changeWithApp(a)},this._prepareMigration=function(){console.log("do sth before the widget is removed"),this.prepareMigration()},this._logOff=function(){var b=this.getWidgetState(!1);resIntent={action:"DUI_WS_LOGOFF",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a,widgetStates:b}},c.publish(resIntent)};var d=function(c){if(b.externalCallback(c),("undefined"==typeof c.flags||-1==c.flags.indexOf("PUBLISH_GLOBAL"))&&"undefined"!=typeof c.categories&&-1!=c.categories.indexOf("DUI")){var d=c.action;if("undefined"!=typeof c.extras.widgetId&&c.extras.widgetId==a){if("DUI_UPDATE_STATE"==d)return void b._onUpdateState(c);if("DUI_GET_WS"==d)return void b._onGetWidgetState(c);if("DUI_PRE_MIG"==d)return void b._prepareMigration(c)}else if("undefined"==typeof c.extras.widgetId){if("DUI_LOG_OFF"==d)return void b._logOff(c);if("DUI_APP_CHANGE"==d)return void b._onAppStateChange(c);if("DUI_REG_CLIENT"==d)return void b.initOK();"DUI_AS"==d&&b.onAppState(c.extras.appStates)}}};c.connect(d),this.getWidgetState=function(){console.log("the widget collects it is state and return, overwrite it");var a={};return a},this.changeWithApp=function(a){var b=a.extras.oldStates,c=a.extras.newStates;console.log(b),console.log(c),console.log("the widget may need to change something following the whole app")},this.prepareMigration=function(){this.prepareMigDone()},this.updateState=function(a){var b={};b=a.extras.widgetStates;var c=a.extras.appStates;console.log(b),"undefined"!=typeof c&&console.log(c),console.log("update the widget state, widget need to overwrite it")},this.finishMigration=function(a){var b={};b=a.extras.widgetStates;var c=a.extras.appStates;console.log(b),"undefined"!=typeof c&&console.log(c),console.log("the migration is done, the widget may need to perform special inits before update the widget state e.g. login to the lasServer again.")},this.prepareMigDone=function(){var b={component:"duimanager",categories:["DUI"],action:"DUI_PRE_MIG_OK",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.saveWidgetState=function(){var b=this.getWidgetState(!1),d={action:"DUI_SAVE_WS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetStates:b,widgetId:a}};c.publish(d)},this.sendIntent=function(a){c.publish(a)},this.requireWidgetState=function(){var b={action:"DUI_REQ_WS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.setAppState=function(a){var b={action:"DUI_SET_AS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{states:a}};c.publish(b)},this.getAppState=function(){var a={action:"DUI_GET_AS",categories:["DUI"],component:"duimanager",data:"",dataType:""};c.publish(a)},this.onAppState=function(){},this.initOK=function(){var b={action:"DUI_CLIENT_OK",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.publishToUser=function(a){var b={action:"DUI_PUB_USER",categories:["DUI"],component:"duimanager",data:JSON.stringify(a),dataType:"application/json",extras:{}};c.publish(a),c.publish(b)},this.connect=function(a){this.externalCallback=a}},DUIClient=function(){var a=parent.document.getElementById(self.frameElement.id).parentNode.id.split("-")[1],b=this,c=new iwc.Client(["*"]);c._componentName="duiclient-"+a,this.externalCallback=function(){},this._onUpdateState=function(a){var b=a.extras.isForMigration;b?this.finishMigration(a):this.updateState(a)},this.getIwcClient=function(){return c},this._onGetWidgetState=function(b){var d=null,e=!1;null!=b.extras.target&&(d=b.extras.target,e=!0);var f=this.getWidgetState(e),g={};g=e?{action:"DUI_WS_MIG",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{target:d,widgetId:a,widgetStates:f}}:{action:"DUI_WS",categories:["DUI"],component:b.sender,data:"",dataType:"",extras:{widgetId:a,widgetStates:f}},c.publish(g)},this._onAppStateChange=function(a){this.changeWithApp(a)},this._prepareMigration=function(){console.log("do sth before the widget is removed"),this.prepareMigration()},this._logOff=function(){var b=this.getWidgetState(!1);resIntent={action:"DUI_WS_LOGOFF",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a,widgetStates:b}},c.publish(resIntent)};var d=function(c){if(b.externalCallback(c),("undefined"==typeof c.flags||-1==c.flags.indexOf("PUBLISH_GLOBAL"))&&"undefined"!=typeof c.categories&&-1!=c.categories.indexOf("DUI")){var d=c.action;if("undefined"!=typeof c.extras.widgetId&&c.extras.widgetId==a){if("DUI_UPDATE_STATE"==d)return void b._onUpdateState(c);if("DUI_GET_WS"==d)return void b._onGetWidgetState(c);if("DUI_PRE_MIG"==d)return void b._prepareMigration(c)}else if("undefined"==typeof c.extras.widgetId){if("DUI_LOG_OFF"==d)return void b._logOff(c);if("DUI_APP_CHANGE"==d)return void b._onAppStateChange(c);if("DUI_REG_CLIENT"==d)return void b.initOK();"DUI_AS"==d&&b.onAppState(c.extras.appStates)}}};c.connect(d),this.getWidgetState=function(){console.log("the widget collects it is state and return, overwrite it");var a={};return a},this.changeWithApp=function(a){var b=a.extras.oldStates,c=a.extras.newStates;console.log(b),console.log(c),console.log("the widget may need to change something following the whole app")},this.prepareMigration=function(){this.prepareMigDone()},this.updateState=function(a){var b={};b=a.extras.widgetStates;var c=a.extras.appStates;console.log(b),"undefined"!=typeof c&&console.log(c),console.log("update the widget state, widget need to overwrite it")},this.finishMigration=function(a){var b={};b=a.extras.widgetStates;var c=a.extras.appStates;console.log(b),"undefined"!=typeof c&&console.log(c),console.log("the migration is done, the widget may need to perform special inits before update the widget state e.g. login to the lasServer again.")},this.prepareMigDone=function(){var b={component:"duimanager",categories:["DUI"],action:"DUI_PRE_MIG_OK",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.saveWidgetState=function(){var b=this.getWidgetState(!1),d={action:"DUI_SAVE_WS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetStates:b,widgetId:a}};c.publish(d)},this.sendIntent=function(a){c.publish(a)},this.requireWidgetState=function(){var b={action:"DUI_REQ_WS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.setAppState=function(a){var b={action:"DUI_SET_AS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{states:a}};c.publish(b)},this.getAppState=function(){var a={action:"DUI_GET_AS",categories:["DUI"],component:"duimanager",data:"",dataType:""};c.publish(a)},this.onAppState=function(){},this.initOK=function(){var b={action:"DUI_CLIENT_OK",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.publishToUser=function(a){var b={action:"DUI_PUB_USER",categories:["DUI"],component:"duimanager",data:JSON.stringify(a),dataType:"application/json",extras:{}};c.publish(a),c.publish(b)},this.connect=function(a){this.externalCallback=a}},DUIClient=function(){var a=parent.document.getElementById(self.frameElement.id).parentNode.id.split("-")[1],b=this,c=new iwc.Client(["*"]);c._componentName="duiclient-"+a,this.externalCallback=function(){},this._onUpdateState=function(a){var b=a.extras.isForMigration;b?this.finishMigration(a):this.updateState(a)},this.getIwcClient=function(){return c},this._onGetWidgetState=function(b){var d=null,e=!1;null!=b.extras.target&&(d=b.extras.target,e=!0);var f=this.getWidgetState(e),g={};g=e?{action:"DUI_WS_MIG",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{target:d,widgetId:a,widgetStates:f}}:{action:"DUI_WS",categories:["DUI"],component:b.sender,data:"",dataType:"",extras:{widgetId:a,widgetStates:f}},c.publish(g)},this._onAppStateChange=function(a){this.changeWithApp(a)},this._prepareMigration=function(){console.log("do sth before the widget is removed"),this.prepareMigration()},this._logOff=function(){var b=this.getWidgetState(!1);resIntent={action:"DUI_WS_LOGOFF",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a,widgetStates:b}},c.publish(resIntent)};var d=function(c){if(b.externalCallback(c),("undefined"==typeof c.flags||-1==c.flags.indexOf("PUBLISH_GLOBAL"))&&"undefined"!=typeof c.categories&&-1!=c.categories.indexOf("DUI")){var d=c.action;if("undefined"!=typeof c.extras.widgetId&&c.extras.widgetId==a){if("DUI_UPDATE_STATE"==d)return void b._onUpdateState(c);if("DUI_GET_WS"==d)return void b._onGetWidgetState(c);if("DUI_PRE_MIG"==d)return void b._prepareMigration(c)}else if("undefined"==typeof c.extras.widgetId){if("DUI_LOG_OFF"==d)return void b._logOff(c);if("DUI_APP_CHANGE"==d)return void b._onAppStateChange(c);if("DUI_REG_CLIENT"==d)return void b.initOK();"DUI_AS"==d&&b.onAppState(c.extras.appStates)}}};c.connect(d),this.getWidgetState=function(){console.log("the widget collects it is state and return, overwrite it");var a={};return a},this.changeWithApp=function(a){var b=a.extras.oldStates,c=a.extras.newStates;console.log(b),console.log(c),console.log("the widget may need to change something following the whole app")},this.prepareMigration=function(){this.prepareMigDone()},this.updateState=function(a){var b={};b=a.extras.widgetStates;var c=a.extras.appStates;console.log(b),"undefined"!=typeof c&&console.log(c),console.log("update the widget state, widget need to overwrite it")},this.finishMigration=function(a){var b={};b=a.extras.widgetStates;var c=a.extras.appStates;console.log(b),"undefined"!=typeof c&&console.log(c),console.log("the migration is done, the widget may need to perform special inits before update the widget state e.g. login to the lasServer again.")},this.prepareMigDone=function(){var b={component:"duimanager",categories:["DUI"],action:"DUI_PRE_MIG_OK",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.saveWidgetState=function(){var b=this.getWidgetState(!1),d={action:"DUI_SAVE_WS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetStates:b,widgetId:a}};c.publish(d)},this.sendIntent=function(a){c.publish(a)},this.requireWidgetState=function(){var b={action:"DUI_REQ_WS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.setAppState=function(a){var b={action:"DUI_SET_AS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{states:a}};c.publish(b)},this.getAppState=function(){var a={action:"DUI_GET_AS",categories:["DUI"],component:"duimanager",data:"",dataType:""};c.publish(a)},this.onAppState=function(){},this.initOK=function(){var b={action:"DUI_CLIENT_OK",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.publishToUser=function(a){var b={action:"DUI_PUB_USER",categories:["DUI"],component:"duimanager",data:JSON.stringify(a),dataType:"application/json",extras:{}};c.publish(a),c.publish(b)},this.connect=function(a){this.externalCallback=a}},DUIClient=function(){var a=parent.document.getElementById(self.frameElement.id).parentNode.id.split("-")[1],b=this,c=new iwc.Client(["*"]);c._componentName="duiclient-"+a,this.externalCallback=function(){},this._onUpdateState=function(a){var b=a.extras.isForMigration;b?this.finishMigration(a):this.updateState(a)},this.getIwcClient=function(){return c},this._onGetWidgetState=function(b){var d=null,e=!1;null!=b.extras.target&&(d=b.extras.target,e=!0);var f=this.getWidgetState(e),g={};g=e?{action:"DUI_WS_MIG",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{target:d,widgetId:a,widgetStates:f}}:{action:"DUI_WS",categories:["DUI"],component:b.sender,data:"",dataType:"",extras:{widgetId:a,widgetStates:f}},c.publish(g)},this._onAppStateChange=function(a){this.changeWithApp(a)},this._prepareMigration=function(){console.log("do sth before the widget is removed"),this.prepareMigration()},this._logOff=function(){var b=this.getWidgetState(!1);resIntent={action:"DUI_WS_LOGOFF",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a,widgetStates:b}},c.publish(resIntent)};var d=function(c){if(b.externalCallback(c),("undefined"==typeof c.flags||-1==c.flags.indexOf("PUBLISH_GLOBAL"))&&"undefined"!=typeof c.categories&&-1!=c.categories.indexOf("DUI")){var d=c.action;if("undefined"!=typeof c.extras.widgetId&&c.extras.widgetId==a){if("DUI_UPDATE_STATE"==d)return void b._onUpdateState(c);if("DUI_GET_WS"==d)return void b._onGetWidgetState(c);if("DUI_PRE_MIG"==d)return void b._prepareMigration(c)}else if("undefined"==typeof c.extras.widgetId){if("DUI_LOG_OFF"==d)return void b._logOff(c);if("DUI_APP_CHANGE"==d)return void b._onAppStateChange(c);if("DUI_REG_CLIENT"==d)return void b.initOK();"DUI_AS"==d&&b.onAppState(c.extras.appStates)}}};c.connect(d),this.getWidgetState=function(){console.log("the widget collects it is state and return, overwrite it");var a={};return a},this.changeWithApp=function(a){var b=a.extras.oldStates,c=a.extras.newStates;console.log(b),console.log(c),console.log("the widget may need to change something following the whole app")},this.prepareMigration=function(){this.prepareMigDone()},this.updateState=function(a){var b={};b=a.extras.widgetStates;var c=a.extras.appStates;console.log(b),"undefined"!=typeof c&&console.log(c),console.log("update the widget state, widget need to overwrite it")},this.finishMigration=function(a){var b={};b=a.extras.widgetStates;var c=a.extras.appStates;console.log(b),"undefined"!=typeof c&&console.log(c),console.log("the migration is done, the widget may need to perform special inits before update the widget state e.g. login to the lasServer again.")},this.prepareMigDone=function(){var b={component:"duimanager",categories:["DUI"],action:"DUI_PRE_MIG_OK",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.saveWidgetState=function(){var b=this.getWidgetState(!1),d={action:"DUI_SAVE_WS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetStates:b,widgetId:a}};c.publish(d)},this.sendIntent=function(a){c.publish(a)},this.requireWidgetState=function(){var b={action:"DUI_REQ_WS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.setAppState=function(a){var b={action:"DUI_SET_AS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{states:a}};c.publish(b)},this.getAppState=function(){var a={action:"DUI_GET_AS",categories:["DUI"],component:"duimanager",data:"",dataType:""};c.publish(a)},this.onAppState=function(){},this.initOK=function(){var b={action:"DUI_CLIENT_OK",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.publishToUser=function(a){var b={action:"DUI_PUB_USER",categories:["DUI"],component:"duimanager",data:JSON.stringify(a),dataType:"application/json",extras:{}};c.publish(a),c.publish(b)},this.connect=function(a){this.externalCallback=a}},DUIClient=function(){var a=parent.document.getElementById(self.frameElement.id).parentNode.id.split("-")[1],b=this,c=new iwc.Client(["*"]);c._componentName="duiclient-"+a,this.externalCallback=function(){},this._onUpdateState=function(a){var b=a.extras.isForMigration;b?this.finishMigration(a):this.updateState(a)},this.getIwcClient=function(){return c},this._onGetWidgetState=function(b){var d=null,e=!1;null!=b.extras.target&&(d=b.extras.target,e=!0);var f=this.getWidgetState(e),g={};g=e?{action:"DUI_WS_MIG",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{target:d,widgetId:a,widgetStates:f}}:{action:"DUI_WS",categories:["DUI"],component:b.sender,data:"",dataType:"",extras:{widgetId:a,widgetStates:f}},c.publish(g)},this._onAppStateChange=function(a){this.changeWithApp(a)},this._prepareMigration=function(){console.log("do sth before the widget is removed"),this.prepareMigration()},this._logOff=function(){var b=this.getWidgetState(!1);resIntent={action:"DUI_WS_LOGOFF",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a,widgetStates:b}},c.publish(resIntent)};var d=function(c){if(b.externalCallback(c),("undefined"==typeof c.flags||-1==c.flags.indexOf("PUBLISH_GLOBAL"))&&"undefined"!=typeof c.categories&&-1!=c.categories.indexOf("DUI")){var d=c.action;if("undefined"!=typeof c.extras.widgetId&&c.extras.widgetId==a){if("DUI_UPDATE_STATE"==d)return void b._onUpdateState(c);if("DUI_GET_WS"==d)return void b._onGetWidgetState(c);if("DUI_PRE_MIG"==d)return void b._prepareMigration(c)}else if("undefined"==typeof c.extras.widgetId){if("DUI_LOG_OFF"==d)return void b._logOff(c);if("DUI_APP_CHANGE"==d)return void b._onAppStateChange(c);if("DUI_REG_CLIENT"==d)return void b.initOK();"DUI_AS"==d&&b.onAppState(c.extras.appStates)}}};c.connect(d),this.getWidgetState=function(){console.log("the widget collects it is state and return, overwrite it");var a={};return a},this.changeWithApp=function(a){var b=a.extras.oldStates,c=a.extras.newStates;console.log(b),console.log(c),console.log("the widget may need to change something following the whole app")},this.prepareMigration=function(){this.prepareMigDone()},this.updateState=function(a){var b={};b=a.extras.widgetStates;var c=a.extras.appStates;console.log(b),"undefined"!=typeof c&&console.log(c),console.log("update the widget state, widget need to overwrite it")},this.finishMigration=function(a){var b={};b=a.extras.widgetStates;var c=a.extras.appStates;console.log(b),"undefined"!=typeof c&&console.log(c),console.log("the migration is done, the widget may need to perform special inits before update the widget state e.g. login to the lasServer again.")},this.prepareMigDone=function(){var b={component:"duimanager",categories:["DUI"],action:"DUI_PRE_MIG_OK",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.saveWidgetState=function(){var b=this.getWidgetState(!1),d={action:"DUI_SAVE_WS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetStates:b,widgetId:a}};c.publish(d)},this.sendIntent=function(a){c.publish(a)},this.requireWidgetState=function(){var b={action:"DUI_REQ_WS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.setAppState=function(a){var b={action:"DUI_SET_AS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{states:a}};c.publish(b)},this.getAppState=function(){var a={action:"DUI_GET_AS",categories:["DUI"],component:"duimanager",data:"",dataType:""};c.publish(a)},this.onAppState=function(){},this.initOK=function(){var b={action:"DUI_CLIENT_OK",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.publishToUser=function(a){var b={action:"DUI_PUB_USER",categories:["DUI"],component:"duimanager",data:JSON.stringify(a),dataType:"application/json",extras:{}};c.publish(a),c.publish(b)},this.connect=function(a){this.externalCallback=a}},DUIClient=function(){var a=parent.document.getElementById(self.frameElement.id).parentNode.id.split("-")[1],b=this,c=new iwc.Client(["*"]);c._componentName="duiclient-"+a,this.externalCallback=function(){},this._onUpdateState=function(a){var b=a.extras.isForMigration;b?this.finishMigration(a):this.updateState(a)},this.getIwcClient=function(){return c},this._onGetWidgetState=function(b){var d=null,e=!1;null!=b.extras.target&&(d=b.extras.target,e=!0);var f=this.getWidgetState(e),g={};g=e?{action:"DUI_WS_MIG",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{target:d,widgetId:a,widgetStates:f}}:{action:"DUI_WS",categories:["DUI"],component:b.sender,data:"",dataType:"",extras:{widgetId:a,widgetStates:f}},c.publish(g)},this._onAppStateChange=function(a){this.changeWithApp(a)},this._prepareMigration=function(){console.log("do sth before the widget is removed"),this.prepareMigration()},this._logOff=function(){var b=this.getWidgetState(!1);resIntent={action:"DUI_WS_LOGOFF",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a,widgetStates:b}},c.publish(resIntent)};var d=function(c){if(b.externalCallback(c),("undefined"==typeof c.flags||-1==c.flags.indexOf("PUBLISH_GLOBAL"))&&"undefined"!=typeof c.categories&&-1!=c.categories.indexOf("DUI")){var d=c.action;if("undefined"!=typeof c.extras.widgetId&&c.extras.widgetId==a){if("DUI_UPDATE_STATE"==d)return void b._onUpdateState(c);if("DUI_GET_WS"==d)return void b._onGetWidgetState(c);if("DUI_PRE_MIG"==d)return void b._prepareMigration(c)}else if("undefined"==typeof c.extras.widgetId){if("DUI_LOG_OFF"==d)return void b._logOff(c);if("DUI_APP_CHANGE"==d)return void b._onAppStateChange(c);if("DUI_REG_CLIENT"==d)return void b.initOK();"DUI_AS"==d&&b.onAppState(c.extras.appStates)}}};c.connect(d),this.getWidgetState=function(){console.log("the widget collects it is state and return, overwrite it");var a={};return a},this.changeWithApp=function(a){var b=a.extras.oldStates,c=a.extras.newStates;console.log(b),console.log(c),console.log("the widget may need to change something following the whole app")},this.prepareMigration=function(){this.prepareMigDone()},this.updateState=function(a){var b={};b=a.extras.widgetStates;var c=a.extras.appStates;console.log(b),"undefined"!=typeof c&&console.log(c),console.log("update the widget state, widget need to overwrite it")},this.finishMigration=function(a){var b={};b=a.extras.widgetStates;var c=a.extras.appStates;console.log(b),"undefined"!=typeof c&&console.log(c),console.log("the migration is done, the widget may need to perform special inits before update the widget state e.g. login to the lasServer again.")},this.prepareMigDone=function(){var b={component:"duimanager",categories:["DUI"],action:"DUI_PRE_MIG_OK",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.saveWidgetState=function(){var b=this.getWidgetState(!1),d={action:"DUI_SAVE_WS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetStates:b,widgetId:a}};c.publish(d)},this.sendIntent=function(a){c.publish(a)},this.requireWidgetState=function(){var b={action:"DUI_REQ_WS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.setAppState=function(a){var b={action:"DUI_SET_AS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{states:a}};c.publish(b)},this.getAppState=function(){var a={action:"DUI_GET_AS",categories:["DUI"],component:"duimanager",data:"",dataType:""};c.publish(a)},this.onAppState=function(){},this.initOK=function(){var b={action:"DUI_CLIENT_OK",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.publishToUser=function(a){var b={action:"DUI_PUB_USER",categories:["DUI"],component:"duimanager",data:JSON.stringify(a),dataType:"application/json",extras:{}};c.publish(a),c.publish(b)},this.connect=function(a){this.externalCallback=a}},DUIClient=function(){var a=parent.document.getElementById(self.frameElement.id).parentNode.id.split("-")[1],b=this,c=new iwc.Client(["*"]);c._componentName="duiclient-"+a,this.externalCallback=function(){},this._onUpdateState=function(a){var b=a.extras.isForMigration;b?this.finishMigration(a):this.updateState(a)},this.getIwcClient=function(){return c},this._onGetWidgetState=function(b){var d=null,e=!1;null!=b.extras.target&&(d=b.extras.target,e=!0);var f=this.getWidgetState(e),g={};g=e?{action:"DUI_WS_MIG",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{target:d,widgetId:a,widgetStates:f}}:{action:"DUI_WS",categories:["DUI"],component:b.sender,data:"",dataType:"",extras:{widgetId:a,widgetStates:f}},c.publish(g)},this._onAppStateChange=function(a){this.changeWithApp(a)},this._prepareMigration=function(){console.log("do sth before the widget is removed"),this.prepareMigration()},this._logOff=function(){var b=this.getWidgetState(!1);resIntent={action:"DUI_WS_LOGOFF",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a,widgetStates:b}},c.publish(resIntent)};var d=function(c){if(b.externalCallback(c),("undefined"==typeof c.flags||-1==c.flags.indexOf("PUBLISH_GLOBAL"))&&"undefined"!=typeof c.categories&&-1!=c.categories.indexOf("DUI")){var d=c.action;if("undefined"!=typeof c.extras.widgetId&&c.extras.widgetId==a){if("DUI_UPDATE_STATE"==d)return void b._onUpdateState(c);if("DUI_GET_WS"==d)return void b._onGetWidgetState(c);if("DUI_PRE_MIG"==d)return void b._prepareMigration(c)}else if("undefined"==typeof c.extras.widgetId){if("DUI_LOG_OFF"==d)return void b._logOff(c);if("DUI_APP_CHANGE"==d)return void b._onAppStateChange(c);if("DUI_REG_CLIENT"==d)return void b.initOK();"DUI_AS"==d&&b.onAppState(c.extras.appStates)}}};c.connect(d),this.getWidgetState=function(){console.log("the widget collects it is state and return, overwrite it");var a={};return a},this.changeWithApp=function(a){var b=a.extras.oldStates,c=a.extras.newStates;console.log(b),console.log(c),console.log("the widget may need to change something following the whole app")},this.prepareMigration=function(){this.prepareMigDone()},this.updateState=function(a){var b={};b=a.extras.widgetStates;var c=a.extras.appStates;console.log(b),"undefined"!=typeof c&&console.log(c),console.log("update the widget state, widget need to overwrite it")},this.finishMigration=function(a){var b={};b=a.extras.widgetStates;var c=a.extras.appStates;console.log(b),"undefined"!=typeof c&&console.log(c),console.log("the migration is done, the widget may need to perform special inits before update the widget state e.g. login to the lasServer again.")},this.prepareMigDone=function(){var b={component:"duimanager",categories:["DUI"],action:"DUI_PRE_MIG_OK",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.saveWidgetState=function(){var b=this.getWidgetState(!1),d={action:"DUI_SAVE_WS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetStates:b,widgetId:a}};c.publish(d)},this.sendIntent=function(a){c.publish(a)},this.requireWidgetState=function(){var b={action:"DUI_REQ_WS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.setAppState=function(a){var b={action:"DUI_SET_AS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{states:a}};c.publish(b)},this.getAppState=function(){var a={action:"DUI_GET_AS",categories:["DUI"],component:"duimanager",data:"",dataType:""};c.publish(a)},this.onAppState=function(){},this.initOK=function(){var b={action:"DUI_CLIENT_OK",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.publishToUser=function(a){var b={action:"DUI_PUB_USER",categories:["DUI"],component:"duimanager",data:JSON.stringify(a),dataType:"application/json",extras:{}};c.publish(a),c.publish(b)},this.connect=function(a){this.externalCallback=a}},DUIClient=function(){var a=parent.document.getElementById(self.frameElement.id).parentNode.id.split("-")[1],b=this,c=new iwc.Client(["*"]);c._componentName="duiclient-"+a,this.externalCallback=function(){},this._onUpdateState=function(a){var b=a.extras.isForMigration;b?this.finishMigration(a):this.updateState(a)},this.getIwcClient=function(){return c},this._onGetWidgetState=function(b){var d=null,e=!1;null!=b.extras.target&&(d=b.extras.target,e=!0);var f=this.getWidgetState(e),g={};g=e?{action:"DUI_WS_MIG",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{target:d,widgetId:a,widgetStates:f}}:{action:"DUI_WS",categories:["DUI"],component:b.sender,data:"",dataType:"",extras:{widgetId:a,widgetStates:f}},c.publish(g)
},this._onAppStateChange=function(a){this.changeWithApp(a)},this._prepareMigration=function(){console.log("do sth before the widget is removed"),this.prepareMigration()},this._logOff=function(){var b=this.getWidgetState(!1);resIntent={action:"DUI_WS_LOGOFF",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a,widgetStates:b}},c.publish(resIntent)};var d=function(c){if(b.externalCallback(c),("undefined"==typeof c.flags||-1==c.flags.indexOf("PUBLISH_GLOBAL"))&&"undefined"!=typeof c.categories&&-1!=c.categories.indexOf("DUI")){var d=c.action;if("undefined"!=typeof c.extras.widgetId&&c.extras.widgetId==a){if("DUI_UPDATE_STATE"==d)return void b._onUpdateState(c);if("DUI_GET_WS"==d)return void b._onGetWidgetState(c);if("DUI_PRE_MIG"==d)return void b._prepareMigration(c)}else if("undefined"==typeof c.extras.widgetId){if("DUI_LOG_OFF"==d)return void b._logOff(c);if("DUI_APP_CHANGE"==d)return void b._onAppStateChange(c);if("DUI_REG_CLIENT"==d)return void b.initOK();"DUI_AS"==d&&b.onAppState(c.extras.appStates)}}};c.connect(d),this.getWidgetState=function(){console.log("the widget collects it is state and return, overwrite it");var a={};return a},this.changeWithApp=function(a){var b=a.extras.oldStates,c=a.extras.newStates;console.log(b),console.log(c),console.log("the widget may need to change something following the whole app")},this.prepareMigration=function(){this.prepareMigDone()},this.updateState=function(a){var b={};b=a.extras.widgetStates;var c=a.extras.appStates;console.log(b),"undefined"!=typeof c&&console.log(c),console.log("update the widget state, widget need to overwrite it")},this.finishMigration=function(a){var b={};b=a.extras.widgetStates;var c=a.extras.appStates;console.log(b),"undefined"!=typeof c&&console.log(c),console.log("the migration is done, the widget may need to perform special inits before update the widget state e.g. login to the lasServer again.")},this.prepareMigDone=function(){var b={component:"duimanager",categories:["DUI"],action:"DUI_PRE_MIG_OK",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.saveWidgetState=function(){var b=this.getWidgetState(!1),d={action:"DUI_SAVE_WS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetStates:b,widgetId:a}};c.publish(d)},this.sendIntent=function(a){c.publish(a)},this.requireWidgetState=function(){var b={action:"DUI_REQ_WS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.setAppState=function(a){var b={action:"DUI_SET_AS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{states:a}};c.publish(b)},this.getAppState=function(){var a={action:"DUI_GET_AS",categories:["DUI"],component:"duimanager",data:"",dataType:""};c.publish(a)},this.onAppState=function(){},this.initOK=function(){var b={action:"DUI_CLIENT_OK",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.publishToUser=function(a){var b={action:"DUI_PUB_USER",categories:["DUI"],component:"duimanager",data:JSON.stringify(a),dataType:"application/json",extras:{}};c.publish(a),c.publish(b)},this.connect=function(a){this.externalCallback=a}},DUIClient=function(){var a=parent.document.getElementById(self.frameElement.id).parentNode.id.split("-")[1],b=this,c=new iwc.Client(["*"]);c._componentName="duiclient-"+a,this.externalCallback=function(){},this._onUpdateState=function(a){var b=a.extras.isForMigration;b?this.finishMigration(a):this.updateState(a)},this.getIwcClient=function(){return c},this._onGetWidgetState=function(b){var d=null,e=!1;null!=b.extras.target&&(d=b.extras.target,e=!0);var f=this.getWidgetState(e),g={};g=e?{action:"DUI_WS_MIG",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{target:d,widgetId:a,widgetStates:f}}:{action:"DUI_WS",categories:["DUI"],component:b.sender,data:"",dataType:"",extras:{widgetId:a,widgetStates:f}},c.publish(g)},this._onAppStateChange=function(a){this.changeWithApp(a)},this._prepareMigration=function(){console.log("do sth before the widget is removed"),this.prepareMigration()},this._logOff=function(){var b=this.getWidgetState(!1);resIntent={action:"DUI_WS_LOGOFF",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a,widgetStates:b}},c.publish(resIntent)};var d=function(c){if(b.externalCallback(c),("undefined"==typeof c.flags||-1==c.flags.indexOf("PUBLISH_GLOBAL"))&&"undefined"!=typeof c.categories&&-1!=c.categories.indexOf("DUI")){var d=c.action;if("undefined"!=typeof c.extras.widgetId&&c.extras.widgetId==a){if("DUI_UPDATE_STATE"==d)return void b._onUpdateState(c);if("DUI_GET_WS"==d)return void b._onGetWidgetState(c);if("DUI_PRE_MIG"==d)return void b._prepareMigration(c)}else if("undefined"==typeof c.extras.widgetId){if("DUI_LOG_OFF"==d)return void b._logOff(c);if("DUI_APP_CHANGE"==d)return void b._onAppStateChange(c);if("DUI_REG_CLIENT"==d)return void b.initOK();"DUI_AS"==d&&b.onAppState(c.extras.appStates)}}};c.connect(d),this.getWidgetState=function(){console.log("the widget collects it is state and return, overwrite it");var a={};return a},this.changeWithApp=function(a){var b=a.extras.oldStates,c=a.extras.newStates;console.log(b),console.log(c),console.log("the widget may need to change something following the whole app")},this.prepareMigration=function(){this.prepareMigDone()},this.updateState=function(a){var b={};b=a.extras.widgetStates;var c=a.extras.appStates;console.log(b),"undefined"!=typeof c&&console.log(c),console.log("update the widget state, widget need to overwrite it")},this.finishMigration=function(a){var b={};b=a.extras.widgetStates;var c=a.extras.appStates;console.log(b),"undefined"!=typeof c&&console.log(c),console.log("the migration is done, the widget may need to perform special inits before update the widget state e.g. login to the lasServer again.")},this.prepareMigDone=function(){var b={component:"duimanager",categories:["DUI"],action:"DUI_PRE_MIG_OK",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.saveWidgetState=function(){var b=this.getWidgetState(!1),d={action:"DUI_SAVE_WS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetStates:b,widgetId:a}};c.publish(d)},this.sendIntent=function(a){c.publish(a)},this.requireWidgetState=function(){var b={action:"DUI_REQ_WS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.setAppState=function(a){var b={action:"DUI_SET_AS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{states:a}};c.publish(b)},this.getAppState=function(){var a={action:"DUI_GET_AS",categories:["DUI"],component:"duimanager",data:"",dataType:""};c.publish(a)},this.onAppState=function(){},this.initOK=function(){var b={action:"DUI_CLIENT_OK",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.publishToUser=function(a){var b={action:"DUI_PUB_USER",categories:["DUI"],component:"duimanager",data:JSON.stringify(a),dataType:"application/json",extras:{}};c.publish(a),c.publish(b)},this.connect=function(a){this.externalCallback=a}},DUIClient=function(){var a=parent.document.getElementById(self.frameElement.id).parentNode.id.split("-")[1],b=this,c=new iwc.Client(["*"]);c._componentName="duiclient-"+a,this.externalCallback=function(){},this._onUpdateState=function(a){var b=a.extras.isForMigration;b?this.finishMigration(a):this.updateState(a)},this.getIwcClient=function(){return c},this._onGetWidgetState=function(b){var d=null,e=!1;null!=b.extras.target&&(d=b.extras.target,e=!0);var f=this.getWidgetState(e),g={};g=e?{action:"DUI_WS_MIG",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{target:d,widgetId:a,widgetStates:f}}:{action:"DUI_WS",categories:["DUI"],component:b.sender,data:"",dataType:"",extras:{widgetId:a,widgetStates:f}},c.publish(g)},this._onAppStateChange=function(a){this.changeWithApp(a)},this._prepareMigration=function(){console.log("do sth before the widget is removed"),this.prepareMigration()},this._logOff=function(){var b=this.getWidgetState(!1);resIntent={action:"DUI_WS_LOGOFF",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a,widgetStates:b}},c.publish(resIntent)};var d=function(c){if(b.externalCallback(c),("undefined"==typeof c.flags||-1==c.flags.indexOf("PUBLISH_GLOBAL"))&&"undefined"!=typeof c.categories&&-1!=c.categories.indexOf("DUI")){var d=c.action;if("undefined"!=typeof c.extras.widgetId&&c.extras.widgetId==a){if("DUI_UPDATE_STATE"==d)return void b._onUpdateState(c);if("DUI_GET_WS"==d)return void b._onGetWidgetState(c);if("DUI_PRE_MIG"==d)return void b._prepareMigration(c)}else if("undefined"==typeof c.extras.widgetId){if("DUI_LOG_OFF"==d)return void b._logOff(c);if("DUI_APP_CHANGE"==d)return void b._onAppStateChange(c);if("DUI_REG_CLIENT"==d)return void b.initOK();"DUI_AS"==d&&b.onAppState(c.extras.appStates)}}};c.connect(d),this.getWidgetState=function(){console.log("the widget collects it is state and return, overwrite it");var a={};return a},this.changeWithApp=function(a){var b=a.extras.oldStates,c=a.extras.newStates;console.log(b),console.log(c),console.log("the widget may need to change something following the whole app")},this.prepareMigration=function(){this.prepareMigDone()},this.updateState=function(a){var b={};b=a.extras.widgetStates;var c=a.extras.appStates;console.log(b),"undefined"!=typeof c&&console.log(c),console.log("update the widget state, widget need to overwrite it")},this.finishMigration=function(a){var b={};b=a.extras.widgetStates;var c=a.extras.appStates;console.log(b),"undefined"!=typeof c&&console.log(c),console.log("the migration is done, the widget may need to perform special inits before update the widget state e.g. login to the lasServer again.")},this.prepareMigDone=function(){var b={component:"duimanager",categories:["DUI"],action:"DUI_PRE_MIG_OK",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.saveWidgetState=function(){var b=this.getWidgetState(!1),d={action:"DUI_SAVE_WS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetStates:b,widgetId:a}};c.publish(d)},this.sendIntent=function(a){c.publish(a)},this.requireWidgetState=function(){var b={action:"DUI_REQ_WS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.setAppState=function(a){var b={action:"DUI_SET_AS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{states:a}};c.publish(b)},this.getAppState=function(){var a={action:"DUI_GET_AS",categories:["DUI"],component:"duimanager",data:"",dataType:""};c.publish(a)},this.onAppState=function(){},this.initOK=function(){var b={action:"DUI_CLIENT_OK",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.publishToUser=function(a){var b={action:"DUI_PUB_USER",categories:["DUI"],component:"duimanager",data:JSON.stringify(a),dataType:"application/json",extras:{}};c.publish(a),c.publish(b)},this.connect=function(a){this.externalCallback=a}},DUIClient=function(){var a=parent.document.getElementById(self.frameElement.id).parentNode.id.split("-")[1],b=this,c=new iwc.Client(["*"]);c._componentName="duiclient-"+a,this.externalCallback=function(){},this._onUpdateState=function(a){var b=a.extras.isForMigration;b?this.finishMigration(a):this.updateState(a)},this.getIwcClient=function(){return c},this._onGetWidgetState=function(b){var d=null,e=!1;null!=b.extras.target&&(d=b.extras.target,e=!0);var f=this.getWidgetState(e),g={};g=e?{action:"DUI_WS_MIG",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{target:d,widgetId:a,widgetStates:f}}:{action:"DUI_WS",categories:["DUI"],component:b.sender,data:"",dataType:"",extras:{widgetId:a,widgetStates:f}},c.publish(g)},this._onAppStateChange=function(a){this.changeWithApp(a)},this._prepareMigration=function(){console.log("do sth before the widget is removed"),this.prepareMigration()},this._logOff=function(){var b=this.getWidgetState(!1);resIntent={action:"DUI_WS_LOGOFF",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a,widgetStates:b}},c.publish(resIntent)};var d=function(c){if(b.externalCallback(c),("undefined"==typeof c.flags||-1==c.flags.indexOf("PUBLISH_GLOBAL"))&&"undefined"!=typeof c.categories&&-1!=c.categories.indexOf("DUI")){var d=c.action;if("undefined"!=typeof c.extras.widgetId&&c.extras.widgetId==a){if("DUI_UPDATE_STATE"==d)return void b._onUpdateState(c);if("DUI_GET_WS"==d)return void b._onGetWidgetState(c);if("DUI_PRE_MIG"==d)return void b._prepareMigration(c)}else if("undefined"==typeof c.extras.widgetId){if("DUI_LOG_OFF"==d)return void b._logOff(c);if("DUI_APP_CHANGE"==d)return void b._onAppStateChange(c);if("DUI_REG_CLIENT"==d)return void b.initOK();"DUI_AS"==d&&b.onAppState(c.extras.appStates)}}};c.connect(d),this.getWidgetState=function(){console.log("the widget collects it is state and return, overwrite it");var a={};return a},this.changeWithApp=function(a){var b=a.extras.oldStates,c=a.extras.newStates;console.log(b),console.log(c),console.log("the widget may need to change something following the whole app")},this.prepareMigration=function(){this.prepareMigDone()},this.updateState=function(a){var b={};b=a.extras.widgetStates;var c=a.extras.appStates;console.log(b),"undefined"!=typeof c&&console.log(c),console.log("update the widget state, widget need to overwrite it")},this.finishMigration=function(a){var b={};b=a.extras.widgetStates;var c=a.extras.appStates;console.log(b),"undefined"!=typeof c&&console.log(c),console.log("the migration is done, the widget may need to perform special inits before update the widget state e.g. login to the lasServer again.")},this.prepareMigDone=function(){var b={component:"duimanager",categories:["DUI"],action:"DUI_PRE_MIG_OK",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.saveWidgetState=function(){var b=this.getWidgetState(!1),d={action:"DUI_SAVE_WS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetStates:b,widgetId:a}};c.publish(d)},this.sendIntent=function(a){c.publish(a)},this.requireWidgetState=function(){var b={action:"DUI_REQ_WS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.setAppState=function(a){var b={action:"DUI_SET_AS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{states:a}};c.publish(b)},this.getAppState=function(){var a={action:"DUI_GET_AS",categories:["DUI"],component:"duimanager",data:"",dataType:""};c.publish(a)},this.onAppState=function(){},this.initOK=function(){var b={action:"DUI_CLIENT_OK",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.publishToUser=function(a){var b={action:"DUI_PUB_USER",categories:["DUI"],component:"duimanager",data:JSON.stringify(a),dataType:"application/json",extras:{}};c.publish(a),c.publish(b)},this.connect=function(a){this.externalCallback=a}},DUIClient=function(){var a=parent.document.getElementById(self.frameElement.id).parentNode.id.split("-")[1],b=this,c=new iwc.Client(["*"]);c._componentName="duiclient-"+a,this.externalCallback=function(){},this._onUpdateState=function(a){var b=a.extras.isForMigration;b?this.finishMigration(a):this.updateState(a)},this.getIwcClient=function(){return c},this._onGetWidgetState=function(b){var d=null,e=!1;null!=b.extras.target&&(d=b.extras.target,e=!0);var f=this.getWidgetState(e),g={};g=e?{action:"DUI_WS_MIG",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{target:d,widgetId:a,widgetStates:f}}:{action:"DUI_WS",categories:["DUI"],component:b.sender,data:"",dataType:"",extras:{widgetId:a,widgetStates:f}},c.publish(g)},this._onAppStateChange=function(a){this.changeWithApp(a)},this._prepareMigration=function(){console.log("do sth before the widget is removed"),this.prepareMigration()},this._logOff=function(){var b=this.getWidgetState(!1);resIntent={action:"DUI_WS_LOGOFF",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a,widgetStates:b}},c.publish(resIntent)};var d=function(c){if(b.externalCallback(c),("undefined"==typeof c.flags||-1==c.flags.indexOf("PUBLISH_GLOBAL"))&&"undefined"!=typeof c.categories&&-1!=c.categories.indexOf("DUI")){var d=c.action;if("undefined"!=typeof c.extras.widgetId&&c.extras.widgetId==a){if("DUI_UPDATE_STATE"==d)return void b._onUpdateState(c);if("DUI_GET_WS"==d)return void b._onGetWidgetState(c);if("DUI_PRE_MIG"==d)return void b._prepareMigration(c)}else if("undefined"==typeof c.extras.widgetId){if("DUI_LOG_OFF"==d)return void b._logOff(c);if("DUI_APP_CHANGE"==d)return void b._onAppStateChange(c);if("DUI_REG_CLIENT"==d)return void b.initOK();"DUI_AS"==d&&b.onAppState(c.extras.appStates)}}};c.connect(d),this.getWidgetState=function(){console.log("the widget collects it is state and return, overwrite it");var a={};return a},this.changeWithApp=function(a){var b=a.extras.oldStates,c=a.extras.newStates;console.log(b),console.log(c),console.log("the widget may need to change something following the whole app")},this.prepareMigration=function(){this.prepareMigDone()},this.updateState=function(a){var b={};b=a.extras.widgetStates;var c=a.extras.appStates;console.log(b),"undefined"!=typeof c&&console.log(c),console.log("update the widget state, widget need to overwrite it")},this.finishMigration=function(a){var b={};b=a.extras.widgetStates;var c=a.extras.appStates;console.log(b),"undefined"!=typeof c&&console.log(c),console.log("the migration is done, the widget may need to perform special inits before update the widget state e.g. login to the lasServer again.")},this.prepareMigDone=function(){var b={component:"duimanager",categories:["DUI"],action:"DUI_PRE_MIG_OK",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.saveWidgetState=function(){var b=this.getWidgetState(!1),d={action:"DUI_SAVE_WS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetStates:b,widgetId:a}};c.publish(d)},this.sendIntent=function(a){c.publish(a)},this.requireWidgetState=function(){var b={action:"DUI_REQ_WS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.setAppState=function(a){var b={action:"DUI_SET_AS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{states:a}};c.publish(b)},this.getAppState=function(){var a={action:"DUI_GET_AS",categories:["DUI"],component:"duimanager",data:"",dataType:""};c.publish(a)},this.onAppState=function(){},this.initOK=function(){var b={action:"DUI_CLIENT_OK",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.publishToUser=function(a){var b={action:"DUI_PUB_USER",categories:["DUI"],component:"duimanager",data:JSON.stringify(a),dataType:"application/json",extras:{}};c.publish(a),c.publish(b)},this.connect=function(a){this.externalCallback=a}},DUIClient=function(){var a=parent.document.getElementById(self.frameElement.id).parentNode.id.split("-")[1],b=this,c=new iwc.Client(["*"]);c._componentName="duiclient-"+a,this.externalCallback=function(){},this._onUpdateState=function(a){var b=a.extras.isForMigration;b?this.finishMigration(a):this.updateState(a)},this.getIwcClient=function(){return c},this._onGetWidgetState=function(b){var d=null,e=!1;null!=b.extras.target&&(d=b.extras.target,e=!0);var f=this.getWidgetState(e),g={};g=e?{action:"DUI_WS_MIG",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{target:d,widgetId:a,widgetStates:f}}:{action:"DUI_WS",categories:["DUI"],component:b.sender,data:"",dataType:"",extras:{widgetId:a,widgetStates:f}},c.publish(g)},this._onAppStateChange=function(a){this.changeWithApp(a)},this._prepareMigration=function(){console.log("do sth before the widget is removed"),this.prepareMigration()},this._logOff=function(){var b=this.getWidgetState(!1);resIntent={action:"DUI_WS_LOGOFF",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a,widgetStates:b}},c.publish(resIntent)};var d=function(c){if(b.externalCallback(c),("undefined"==typeof c.flags||-1==c.flags.indexOf("PUBLISH_GLOBAL"))&&"undefined"!=typeof c.categories&&-1!=c.categories.indexOf("DUI")){var d=c.action;if("undefined"!=typeof c.extras.widgetId&&c.extras.widgetId==a){if("DUI_UPDATE_STATE"==d)return void b._onUpdateState(c);if("DUI_GET_WS"==d)return void b._onGetWidgetState(c);if("DUI_PRE_MIG"==d)return void b._prepareMigration(c)}else if("undefined"==typeof c.extras.widgetId){if("DUI_LOG_OFF"==d)return void b._logOff(c);if("DUI_APP_CHANGE"==d)return void b._onAppStateChange(c);if("DUI_REG_CLIENT"==d)return void b.initOK();"DUI_AS"==d&&b.onAppState(c.extras.appStates)}}};c.connect(d),this.getWidgetState=function(){console.log("the widget collects it is state and return, overwrite it");var a={};return a},this.changeWithApp=function(a){var b=a.extras.oldStates,c=a.extras.newStates;console.log(b),console.log(c),console.log("the widget may need to change something following the whole app")},this.prepareMigration=function(){this.prepareMigDone()},this.updateState=function(a){var b={};b=a.extras.widgetStates;var c=a.extras.appStates;console.log(b),"undefined"!=typeof c&&console.log(c),console.log("update the widget state, widget need to overwrite it")},this.finishMigration=function(a){var b={};b=a.extras.widgetStates;var c=a.extras.appStates;console.log(b),"undefined"!=typeof c&&console.log(c),console.log("the migration is done, the widget may need to perform special inits before update the widget state e.g. login to the lasServer again.")},this.prepareMigDone=function(){var b={component:"duimanager",categories:["DUI"],action:"DUI_PRE_MIG_OK",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.saveWidgetState=function(){var b=this.getWidgetState(!1),d={action:"DUI_SAVE_WS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetStates:b,widgetId:a}};c.publish(d)},this.sendIntent=function(a){c.publish(a)},this.requireWidgetState=function(){var b={action:"DUI_REQ_WS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.setAppState=function(a){var b={action:"DUI_SET_AS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{states:a}};c.publish(b)},this.getAppState=function(){var a={action:"DUI_GET_AS",categories:["DUI"],component:"duimanager",data:"",dataType:""};c.publish(a)},this.onAppState=function(){},this.initOK=function(){var b={action:"DUI_CLIENT_OK",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.publishToUser=function(a){var b={action:"DUI_PUB_USER",categories:["DUI"],component:"duimanager",data:JSON.stringify(a),dataType:"application/json",extras:{}};c.publish(a),c.publish(b)},this.connect=function(a){this.externalCallback=a}},DUIClient=function(){var a=parent.document.getElementById(self.frameElement.id).parentNode.id.split("-")[1],b=this,c=new iwc.Client(["*"]);c._componentName="duiclient-"+a,this.externalCallback=function(){},this._onUpdateState=function(a){var b=a.extras.isForMigration;b?this.finishMigration(a):this.updateState(a)},this.getIwcClient=function(){return c},this._onGetWidgetState=function(b){var d=null,e=!1;null!=b.extras.target&&(d=b.extras.target,e=!0);var f=this.getWidgetState(e),g={};g=e?{action:"DUI_WS_MIG",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{target:d,widgetId:a,widgetStates:f}}:{action:"DUI_WS",categories:["DUI"],component:b.sender,data:"",dataType:"",extras:{widgetId:a,widgetStates:f}},c.publish(g)},this._onAppStateChange=function(a){this.changeWithApp(a)},this._prepareMigration=function(){console.log("do sth before the widget is removed"),this.prepareMigration()},this._logOff=function(){var b=this.getWidgetState(!1);resIntent={action:"DUI_WS_LOGOFF",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a,widgetStates:b}},c.publish(resIntent)};var d=function(c){if(b.externalCallback(c),("undefined"==typeof c.flags||-1==c.flags.indexOf("PUBLISH_GLOBAL"))&&"undefined"!=typeof c.categories&&-1!=c.categories.indexOf("DUI")){var d=c.action;if("undefined"!=typeof c.extras.widgetId&&c.extras.widgetId==a){if("DUI_UPDATE_STATE"==d)return void b._onUpdateState(c);if("DUI_GET_WS"==d)return void b._onGetWidgetState(c);if("DUI_PRE_MIG"==d)return void b._prepareMigration(c)}else if("undefined"==typeof c.extras.widgetId){if("DUI_LOG_OFF"==d)return void b._logOff(c);if("DUI_APP_CHANGE"==d)return void b._onAppStateChange(c);if("DUI_REG_CLIENT"==d)return void b.initOK();"DUI_AS"==d&&b.onAppState(c.extras.appStates)}}};c.connect(d),this.getWidgetState=function(){console.log("the widget collects it is state and return, overwrite it");var a={};return a},this.changeWithApp=function(a){var b=a.extras.oldStates,c=a.extras.newStates;console.log(b),console.log(c),console.log("the widget may need to change something following the whole app")},this.prepareMigration=function(){this.prepareMigDone()},this.updateState=function(a){var b={};b=a.extras.widgetStates;var c=a.extras.appStates;console.log(b),"undefined"!=typeof c&&console.log(c),console.log("update the widget state, widget need to overwrite it")},this.finishMigration=function(a){var b={};b=a.extras.widgetStates;var c=a.extras.appStates;console.log(b),"undefined"!=typeof c&&console.log(c),console.log("the migration is done, the widget may need to perform special inits before update the widget state e.g. login to the lasServer again.")},this.prepareMigDone=function(){var b={component:"duimanager",categories:["DUI"],action:"DUI_PRE_MIG_OK",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.saveWidgetState=function(){var b=this.getWidgetState(!1),d={action:"DUI_SAVE_WS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetStates:b,widgetId:a}};c.publish(d)},this.sendIntent=function(a){c.publish(a)},this.requireWidgetState=function(){var b={action:"DUI_REQ_WS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.setAppState=function(a){var b={action:"DUI_SET_AS",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{states:a}};c.publish(b)},this.getAppState=function(){var a={action:"DUI_GET_AS",categories:["DUI"],component:"duimanager",data:"",dataType:""};c.publish(a)},this.onAppState=function(){},this.initOK=function(){var b={action:"DUI_CLIENT_OK",categories:["DUI"],component:"duimanager",data:"",dataType:"",extras:{widgetId:a}};c.publish(b)},this.publishToUser=function(a){var b={action:"DUI_PUB_USER",categories:["DUI"],component:"duimanager",data:JSON.stringify(a),dataType:"application/json",extras:{}};c.publish(a),c.publish(b)},this.connect=function(a){this.externalCallback=a}};