Your IP : 216.73.216.26


Current Path : /home2/wtmwscom/public_html/post/Track and Trace_files/
Upload File :
Current File : /home2/wtmwscom/public_html/post/Track and Trace_files/Portal_039.js

define("Portal.EP_Common.ChatFloatingButton.mvc$model", ["OutSystems/ClientRuntime/Main", "Portal.model", "Portal.controller", "Portal.controller$FetchChatURL", "Portal.controller$OpenURLInNewTab"], function (OutSystems, PortalModel, PortalController) {
var OS = OutSystems.Internal;


var VariablesRecord = (function (_super) {
__extends(VariablesRecord, _super);
function VariablesRecord(defaults) {
_super.apply(this, arguments);
}
VariablesRecord.attributesToDeclare = function () {
return [
this.attr("URL", "uRLVar", "URL", true, false, OS.Types.Text, function () {
return "";
}, false), 
this.attr("locale", "localeIn", "locale", true, false, OS.Types.Text, function () {
return "";
}, false), 
this.attr("_localeInDataFetchStatus", "_localeInDataFetchStatus", "_localeInDataFetchStatus", true, false, OS.Types.Integer, function () {
return /*Fetched*/ 1;
}, false)
].concat(_super.attributesToDeclare.call(this));
};
VariablesRecord.init();
return VariablesRecord;
})(OS.DataTypes.GenericRecord);
var WidgetsRecord = (function (_super) {
__extends(WidgetsRecord, _super);
function WidgetsRecord() {
_super.apply(this, arguments);
}
WidgetsRecord.getWidgetsType = function () {
return {};
};

return WidgetsRecord;
})(OS.Model.BaseWidgetRecordMap);
var Model = (function (_super) {
__extends(Model, _super);
function Model() {
_super.apply(this, arguments);
}
Model.getVariablesRecordConstructor = function () {
return VariablesRecord;
};
Model.getWidgetsRecordConstructor = function () {
return WidgetsRecord;
};
Object.defineProperty(Model, "hasValidationWidgets", {
enumerable: true,
configurable: true,
get: function () {
return false;
}
});

Model.prototype.setInputs = function (inputs) {
if("locale" in inputs) {
this.variables.localeIn = inputs.locale;
if("_localeInDataFetchStatus" in inputs) {
this.variables._localeInDataFetchStatus = inputs._localeInDataFetchStatus;
}

}

};
return Model;
})(OS.Model.BaseViewModel);
return new OS.Model.ModelFactory(Model);
});
define("Portal.EP_Common.ChatFloatingButton.mvc$view", ["OutSystems/ClientRuntime/Main", "Portal.model", "Portal.controller", "react", "OutSystems/ReactView/Main", "Portal.EP_Common.ChatFloatingButton.mvc$model", "Portal.EP_Common.ChatFloatingButton.mvc$controller", "Portal.clientVariables", "OutSystems/ReactWidgets/Main", "Portal.controller$FetchChatURL", "Portal.controller$OpenURLInNewTab"], function (OutSystems, PortalModel, PortalController, React, OSView, Portal_EP_Common_ChatFloatingButton_mvc_model, Portal_EP_Common_ChatFloatingButton_mvc_controller, PortalClientVariables, OSWidgets) {
    var OS = OutSystems.Internal;
var PlaceholderContent = OSView.Widget.PlaceholderContent;
var IteratorPlaceholderContent = OSView.Widget.IteratorPlaceholderContent;


    var View = (function (_super) {
        __extends(View,_super);
        function View() {
            try {
                this.initialize.apply(this, arguments);
            } catch (error) {
                View.handleError(error);
                throw error;
            }
        }
        View.prototype.initialize = function() {
            _super.apply(this, arguments);
        };
        View.displayName = "EP_Common.ChatFloatingButton";
        View.getCssDependencies = function() {
            return ["css/OutSystemsReactWidgets.css"];
        };
        View.getJsDependencies = function() {
            return [];
        };
        View.getBlocks = function() {
            return [];
        };
        Object.defineProperty(View.prototype, "modelFactory", {
            get: function () {
                return Portal_EP_Common_ChatFloatingButton_mvc_model;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(View.prototype, "controllerFactory", {
            get: function () {
                return Portal_EP_Common_ChatFloatingButton_mvc_controller;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(View.prototype, "title", {
            get: function () {
                return "";
            },
            enumerable: true,
            configurable: true
        });
        View.prototype.internalRender = function() {
            var model = this.model;
            var controller = this.controller;
            var idService = this.idService;
            var validationService = controller.validationService;
            var widgetsRecordProvider = this.widgetsRecordProvider;
            var callContext = controller.callContext();
            var $if = View.ifWidget;
            var asPrimitiveValue = View.asPrimitiveValue;
            var _this = this;

            return React.createElement("div", this.getRootNodeProperties(), React.createElement(OSWidgets.Container, {
align: /*Default*/ 0,
animate: false,
style: "fabWrapper",
visible: true,
_idProps: {
service: idService,
uuid: "0"
},
_widgetRecordProvider: widgetsRecordProvider
}, React.createElement(OSWidgets.Button, {
enabled: true,
extendedProperties: {
style: "height: 60px;"
},
gridProperties: {
width: "60px"
},
isDefault: false,
onClick: function () {
return Promise.resolve().then(function () {
var eventHandlerContext = callContext.clone();
controller.chatOnClick$Action(controller.callContext(eventHandlerContext));
});
;
},
style: "btn btn-primary fab",
visible: true,
_idProps: {
service: idService,
uuid: "1"
},
_widgetRecordProvider: widgetsRecordProvider
}, React.createElement(OSWidgets.Icon, {
extendedProperties: {
style: "font-size: 1.5em; padding: 10px;"
},
icon: "comment-o",
iconSize: /*FontSize*/ 0,
style: "icon font-bold",
visible: true,
_idProps: {
service: idService,
uuid: "2"
},
_widgetRecordProvider: widgetsRecordProvider
}), React.createElement(OSWidgets.Text, {
extendedProperties: {
"data-trans": "live-chat-live-chat-live-chat"
},
style: "fab-subtitle",
text: ["Live Chat"],
_idProps: {
service: idService,
uuid: "3"
},
_widgetRecordProvider: widgetsRecordProvider
}))));
        };
        return View;
    })(OSView.BaseView.BaseWebBlock);
	
    return View;
});
define("Portal.EP_Common.ChatFloatingButton.mvc$controller", ["OutSystems/ClientRuntime/Main", "Portal.model", "Portal.controller", "Portal.languageResources", "Portal.clientVariables", "Portal.EP_Common.ChatFloatingButton.mvc$controller.OnInitialize.JavaScriptARJS", "Portal.EP_Common.ChatFloatingButton.mvc$controller.OnInitialize.JavaScriptENJS", "Portal.controller$FetchChatURL", "Portal.controller$OpenURLInNewTab"], function (OutSystems, PortalModel, PortalController, PortalLanguageResources, PortalClientVariables, Portal_EP_Common_ChatFloatingButton_mvc_controller_OnInitialize_JavaScriptARJS, Portal_EP_Common_ChatFloatingButton_mvc_controller_OnInitialize_JavaScriptENJS) {
var OS = OutSystems.Internal;
var Controller = (function (_super) {
__extends(Controller, _super);
function Controller() {
_super.apply(this, arguments);
var controller = this.controller;
this.clientActionProxies = {};
this.dataFetchDependenciesOriginal = {};
this.dataFetchDependentsGraph = {};
this.useImprovedDataFetch = false;
this.hasDependenciesBetweenSources = false;
this.shouldSendClientVarsToDataSources = false;
}
// Server Actions

// Aggregates and Data Actions

Controller.prototype.dataFetchActionNames = [];
// Client Actions
Controller.prototype._onParametersChanged$Action = function (callContext) {
var model = this.model;
var controller = this.controller;
var idService = this.idService;
controller.ensureControllerAlive("OnParametersChanged");
callContext = controller.callContext(callContext);
// Execute Action: OnInitialize
controller._onInitialize$Action(callContext);
};
Controller.prototype._onInitialize$Action = function (callContext) {
var model = this.model;
var controller = this.controller;
var idService = this.idService;
controller.ensureControllerAlive("OnInitialize");
callContext = controller.callContext(callContext);
if(((model.variables.localeIn === "ar-sa"))) {
controller.safeExecuteJSNode(Portal_EP_Common_ChatFloatingButton_mvc_controller_OnInitialize_JavaScriptARJS, "JavaScriptAR", "OnInitialize", null, function ($parameters) {
}, {}, {});
} else {
controller.safeExecuteJSNode(Portal_EP_Common_ChatFloatingButton_mvc_controller_OnInitialize_JavaScriptENJS, "JavaScriptEN", "OnInitialize", null, function ($parameters) {
}, {}, {});
}

};
Controller.prototype._chatOnClick$Action = function (callContext) {
var model = this.model;
var controller = this.controller;
var idService = this.idService;
controller.ensureControllerAlive("ChatOnClick");
callContext = controller.callContext(callContext);
var fetchChatURLVar = new OS.DataTypes.VariableHolder();
return OS.Flow.executeAsyncFlow(function () {
// Execute Action: FetchChatURL
model.flush();
return PortalController.default.fetchChatURL$Action(model.variables.localeIn, callContext).then(function (value) {
fetchChatURLVar.value = value;
}).then(function () {
// URL = FetchChatURL.URL
model.variables.uRLVar = fetchChatURLVar.value.uRLOut;
// Execute Action: OpenURLInNewTab
PortalController.default.openURLInNewTab$Action(model.variables.uRLVar, callContext);
});
});
};

Controller.prototype.onParametersChanged$Action = function (callContext) {
var controller = this.controller;
return controller.safeExecuteClientAction(controller._onParametersChanged$Action, callContext);

};
Controller.prototype.onInitialize$Action = function (callContext) {
var controller = this.controller;
return controller.safeExecuteClientAction(controller._onInitialize$Action, callContext);

};
Controller.prototype.chatOnClick$Action = function (callContext) {
var controller = this.controller;
return controller.safeExecuteClientAction(controller._chatOnClick$Action, callContext);

};

// Event Handler Actions
Controller.prototype.onInitializeEventHandler = function (callContext) {
var controller = this.controller;
var model = this.model;
var idService = this.idService;

return controller.onInitialize$Action(callContext);

};
Controller.prototype.onReadyEventHandler = null;
Controller.prototype.onRenderEventHandler = null;
Controller.prototype.onDestroyEventHandler = null;
Controller.prototype.onParametersChangedEventHandler = function (callContext) {
var controller = this.controller;
var model = this.model;
var idService = this.idService;

return controller.onParametersChanged$Action(callContext);

};
Controller.prototype.handleError = function (ex) {
return controller.handleError(ex);
};
Controller.checkPermissions = function () {
};
Controller.prototype.getDefaultTimeout = function () {
return PortalController.default.defaultTimeout;
};
return Controller;
})(OS.Controller.BaseViewController);
return new OS.Controller.ControllerFactory(Controller, PortalLanguageResources);
});
define("Portal.EP_Common.ChatFloatingButton.mvc$controller.OnInitialize.JavaScriptARJS", [], function () {
return function ($actions, $roles, $public) {
//function loadScript() {
var hmScript = document.getElementById('happiness-meter-widget-web-script');
if(hmScript === null || hmScript === 'undefined' ) {
 
    var spt = document.createElement('script');
    spt.type = 'text/javascript';
	spt.id='happiness-meter-widget-web-script';
	spt.async=true;
	spt.src='https://happinessmeter.gov.ae/webwidget/web.js';
	spt.dataset.containerId='happiness-meter-widget-container';
	spt.dataset.language='arab';
	spt.dataset.key='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MTN9.DK3aEus347T_Lf1nKW09zL4acB-z5ZInQ_JdB-VzZgc';
	spt.dataset.onFinish='console.log(textStatus)';
	spt.dataset.entitySequenceId='0';
	spt.dataset.customerId='0';
	spt.dataset.email='happinessmeter@happinessmeter.gov.ae';
	spt.dataset.phone='+971000000000';
	spt.dataset.transactionId='0';
	spt.dataset.emiratesId='0';
	spt.dataset.version='latest';
	spt.dataset.delay='0';
	spt.dataset.mode='click';
	spt.dataset.modeClickId='happiness-meter-widget-button';
	spt.dataset.cssUrl='https://happinessmeter.gov.ae/webwidget/web.css';
	
	document.body.appendChild(spt);
    console.log('loadScript');
}
else
{
 
  hmScript.setAttribute("data-language", "arab");    
  var hmButton = document.getElementById('happiness-meter-widget-button');
  hmButton.setAttribute("dir", "rtl");  
}

//}

//function initialize() {
//    console.log('initialize');
//}

//window.onload = loadScript;
};
});
define("Portal.EP_Common.ChatFloatingButton.mvc$controller.OnInitialize.JavaScriptENJS", [], function () {
return function ($actions, $roles, $public) {
//function loadScript() {
var hmScript = document.getElementById('happiness-meter-widget-web-script');
if(hmScript === null || hmScript === 'undefined' ) {
    var spt = document.createElement('script');
    spt.type = 'text/javascript';
	spt.id='happiness-meter-widget-web-script';
	spt.async=true;
	spt.src='https://happinessmeter.gov.ae/webwidget/web.js';
	spt.dataset.containerId='happiness-meter-widget-container';
	spt.dataset.language='en';
	spt.dataset.key='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MTN9.DK3aEus347T_Lf1nKW09zL4acB-z5ZInQ_JdB-VzZgc';
	spt.dataset.onFinish='console.log(textStatus)';
	spt.dataset.entitySequenceId='0';
	spt.dataset.customerId='0';
	spt.dataset.email='happinessmeter@happinessmeter.gov.ae';
	spt.dataset.phone='+971000000000';
	spt.dataset.transactionId='0';
	spt.dataset.emiratesId='0';
	spt.dataset.version='latest';
	spt.dataset.delay='0';
	spt.dataset.mode='click';
	spt.dataset.modeClickId='happiness-meter-widget-button';
	spt.dataset.cssUrl='https://happinessmeter.gov.ae/webwidget/web.css';
	
	document.body.appendChild(spt);
    console.log('loadScript');
}
else
{
 
  hmScript.setAttribute("data-language", "en");    
  var hmButton = document.getElementById('happiness-meter-widget-button');
  hmButton.setAttribute("dir", "ltr");  
}

//function initialize() {
//    console.log('initialize');
//}

//window.onload = loadScript;
};
});