text: /*! Copyright Novix S.A. 2019. All rights reserved. */
  (window.webpackJsonp=window.webpackJsonp||[]).push([[101,27,32,43,62,80,102,272],{1448:function(e,n,t){"use strict";(function(a){var o,r,i=t(18),s="en";try{"es"!=(s=(s=navigator.language?navigator.language:navigator.userLanguage).substr(0,2).toLowerCase())&&"en"!=s&&(s="en")}catch(e){}o=[t(881),t(702),t(706),t(879),t(855),t(1451),t(880)],void 0===(r=function(e,n,o,r,s,c,l){return(0,i.setLanguageDictionary)(new r),e.extend({el:a("#main"),keyView:"",currentDashboardId:-1,currentDashboardName:void 0,dashboardModel:{},dashboardController:{},noQuery:void 0,lastSize:void 0,ownerWidth:void 0,ownerHeight:void 0,editionModeInitiated:!1,editMode:!1,initialSizeTimeOut:-1,dashboardName:"",fromExternal:!1,render:function(e){a(".embedded").length>0&&(a(".embedded").remove(),a('div[data-rel="embeddable"]').remove(),a(".embeddableFooter").remove()),a("body").css("background-color","#fff"),a("#main").css("background-color","#fff"),this._uId=a.uuid(),void 0!==__currentSession.fromEmbedded&&(this.fromEmbedded=__currentSession.fromEmbedded),this.fromEmbedded&&a("body").css("background-color","#368ee0"),this.dashboardModel=new o({dashboardViewList:[],nodeOwner:"",extraOptions:null});var n=c();a("#main").append(n);var r=e.session.loginDashboardId,i=e.entity_type;Promise.resolve().then(function(){var e=[t(702)];(function(e){(new e).showEmbeddableDashboard(r,i,"Loading...",!1,!1,null)}).apply(null,e)}).catch(t.oe),setTimeout(function(){a(".resolution-alert").remove()},2e4)},getNavigator:function(e){var n=this;this.dashboardModel.getNavigator({dashboardId:e},function(e){e&&n.tabsToTitles(e)})},tabsToTitles:function(e){var n=[];if(a.each(e.list,function(e,t){var a=t.id,o=t.id,r=t.name;n.push({id:o,key:a,title:r,closeBtn:!1})}),a(".dashboard-titles").empty(),a(".dashboard-titles").hide(),n.length>0){var t=l(n);a(".dashboard-titles").html(t),a(".dashboard-titles").show()}else a(".dashboard-titles").hide(),a(".dashboard-title").show(),a(".report-navigator").hide();a(".dashboard-titles li:first").each(function(e,n){var t=a(n).find("a").attr("data-rel");a(this).addClass("active"),a(".container-fluid.mainTask[data-rel='"+t+"']").addClass("active")}),this.addTabsHandlers()},addTabsHandlers:function(){a(".dashboard-titles").on("click","li a",function(){a(".dashboard-titles li").removeClass("active");var e=a(this).attr("data-rel"),n=a(this).attr("data-key");"false"===a(this).attr("data-opened")&&(a(".tabs-area .nav-tabs li").find("a").attr("data-opened",!1),a(this).attr("data-opened",!0),Promise.resolve().then(function(){var n=[t(702)];(function(n){(new n).showEmbeddableDashboard(e,null,"Loading...",!1,!1,null)}).apply(null,n)}).catch(t.oe)),Promise.resolve().then(function(){var e=[t(684)];(function(e){(new e).selectTask(n)}).apply(null,e)}).catch(t.oe)}),a(".btnNavigatorPrior").click(function(){a("ul.dashboard-titles").animate({scrollLeft:"-=200"},1e3)}),a(".btnNavigatorNext").click(function(){a("ul.dashboard-titles").animate({scrollLeft:"+=200"},1e3)}),a(".dashboard-titles").on("scroll",function(){var e=a(this).scrollLeft();e+a(this).innerWidth()>=this.scrollWidth?a(".btnNavigatorNext").prop("disabled",!0):e<=0?a(".btnNavigatorPrior").prop("disabled",!0):(a(".btnNavigatorPrior").prop("disabled",!1),a(".btnNavigatorNext").prop("disabled",!1))})},onRemoveView:function(){},updateSizes:function(e){},getParent:function(){return a(this.keyView)},addHandlers:function(){}})}.apply(n,o))||(e.exports=r)}).call(this,t(1))},1451:function(e,n,t){var a=t(690);e.exports=(a.default||a).template({compiler:[7,">= 4.0.0"],main:function(e,n,a,o,r){return'<div class="alert alert-success alert-warning resolution-alert">\n  <button type="button" class="close" data-dismiss="alert">x</button>\n  '+e.escapeExpression(function(e){return e&&(e.__esModule?e.default:e)}(t(688)).call(null!=n?n:e.nullContext||{},"resolution_text",{name:"L",hash:{},data:r}))+'\n</div>\n\n<div data-rel="embeddable" style="background-color: #368ee0; margin-bottom: 35px;">\n  <div class="loader embeddable">\n    <div class="cubePlanLoaderEmbed">\n      <span>Loading...</span>\n\n      <div class="sk-cube-grid">\n        <div class="sk-cube sk-cube1"></div>\n        <div class="sk-cube sk-cube2"></div>\n        <div class="sk-cube sk-cube3"></div>\n        <div class="sk-cube sk-cube4"></div>\n        <div class="sk-cube sk-cube5"></div>\n        <div class="sk-cube sk-cube6"></div>\n        <div class="sk-cube sk-cube7"></div>\n        <div class="sk-cube sk-cube8"></div>\n        <div class="sk-cube sk-cube9"></div>\n      </div>\n    </div>\n\n  </div>\n\n</div>\n<div class="embeddableFooter" style="bottom: 0; position: fixed; width: 100%;">\n  <a href="http://pyplan.com" target="_blank"> <img src="img/abbb5d72614615ac35f33bfab14b6444-powered-by-small.png"></a>\n</div>'},useData:!0})},219:function(e,n,t){"use strict";(function(a,o){var r,i=t(18),s=t(693);void 0===(r=function(){var e=function(e,n,t,o){if(__currentSession.modelInfo=e,a("#licenceExpiration").hide(),__currentSession.modelInfo.daysToExpire)try{var r=parseInt(__currentSession.modelInfo.daysToExpire)-1;r>=0&&r<15&&(r>=0?a("#licenceExpiration span").html((0,i.translate)("days_to_expire").replace("#days#",r)):a("#licenceExpiration span").html((0,i.translate)("license_expired")),a("#licenceExpiration").show(),setTimeout(function(){a("#licenceExpiration").hide()},15e3))}catch(e){}if(""!=e.new_session_key&&(__currentSession.session_key=e.new_session_key,(0,s.ajaxSetup)()),n(e),a(".wikiLink").attr("href","http://docs.pyplan.com"),t||a("#summary").trigger("refresh"),a("#navigation .modelopened").show(),a("#left .navigation .modelopened").show(),a("#currentModel").html(e.uri.substring(e.uri.lastIndexOf("/")+1,e.uri.lastIndexOf("."))),e.useSnapshot){var c=(0,i.translate)("use_snapshot");a("#navigation .snapshotactive").show().attr("title",c).attr("data-snapdate",e.snapshotDate)}o.canEdit()?(a("#navigation li.modelopened[data-key='btnSaveModel']").show(),a("#navigation li.modelopened[data-key='btnSaveModelAs']").show(),__currentSession.modelInfo&&__currentSession.modelInfo.readonly&&(a("#navigation li.modelopened[data-key='btnSaveModel']").hide(),(0,i.showMessage)(__currentSession.modelInfo.readOnlyReason,"","info",!1))):(a("#navigation li.modelopened[data-key='btnSaveModel']").hide(),a("#navigation li.modelopened[data-key='btnSaveModelAs']").hide())};return o.Model.extend({openModel:function(n,t,o,r){a("#navigation .snapshotactive").hide();var i=this;(0,s.send)("modelManager/openModel/",{file:n},null,function(n){n&&e(n,t,o,i)},r)},createNewModel:function(n,t,o,r){a("#navigation .snapshotactive").hide();var i=this;(0,s.send)("modelManager/createNewModel/",{modelName:n},null,function(n){n&&e(n,t,o,i)},r)},closeModel:function(e){(0,s.send)("modelManager/closeModel/",null,null,function(){Promise.all([t.e(2),t.e(6),t.e(62)]).then(function(){var n=[t(684)];(function(n){(new n).clearUI(),e()}).apply(null,n)}).catch(t.oe)})},saveModel:function(e){(0,s.send)("modelManager/saveModel/",null,{dataType:"text"},function(){e()})},saveModelAs:function(e,n){(0,s.send)("modelManager/saveModelAs/",{name:e},{type:"GET"},function(e){n(e)})},getModelInfo:function(e){(0,s.send)("modelManager/getModelInfo/",null,null,e)},isInPublic:function(){return!!(__currentSession.modelInfo.uri&&__currentSession.modelInfo.uri.toLowerCase().indexOf("/public/")>=0)},canEdit:function(){var e=!1,n=this.isInPublic();return((0,i.haveAccess)("change_model")&&!n||(0,i.haveAccess)("change_public_model")&&n)&&(e=!0),e},setModelPreferences:function(e,n,t,o){(0,s.send)("modelManager/setModelPreferences/",JSON.stringify(e),{type:"POST",contentType:"application/json;charset=utf-8",dataType:"text"},function(e){void 0!=n&&n(e),a("body").trigger("pendingChanges",[!0])},function(e){t(e)},!1,o)},getModelPreferences:function(e,n,t){(0,s.send)("modelManager/getModelPreferences/",null,{type:"GET"},e,n,!0,t)},setNodeProperties:function(e,n,t,o,r,i){void 0===i&&(i=!0),(0,s.send)("modelManager/setNodeProperties/",JSON.stringify({node:e,properties:n}),{type:"POST",contentType:"application/json;charset=utf-8",dataType:"text"},function(e){void 0!=t&&t(e),a("body").trigger("pendingChanges",[i])},function(e){o(e)},!1,r)},setNodesProperties:function(e,n){(0,s.send)("modelManager/setNodesProperties/",JSON.stringify(e),{type:"POST",contentType:"application/json;charset=utf-8",dataType:"text"},function(e){n(e),a("body").trigger("pendingChanges",[!0])})},setNodeIdFromTitle:function(e,n){(0,s.send)("modelManager/setNodeIdFromTitle/",{value:e},{type:"POST"},function(e){n(e),a("body").trigger("pendingChanges",[!0])})},getNodeProperties:function(e,n,t,a,o,r){(0,s.send)("modelManager/getNodeProperties/",JSON.stringify({node:e,properties:n,forceThisNode:r}),{type:"POST",contentType:"application/json;charset=utf-8"},t,a,!0,o)},getInputs:function(e,n){(0,s.send)("modelManager/getNodeInputs/?node="+e,null,{type:"GET"},n)},getOutputs:function(e,n){(0,s.send)("modelManager/getNodeOutputs/?node="+e,null,{type:"GET"},n)},executeForRefresh:function(e){(0,s.send)("modelManager/executeForRefresh/",null,{type:"POST",dataType:"text"},function(n){void 0!=e&&e(n)})},createNode:function(e,n,t){(0,s.send)("modelManager/createNode/",e,{type:"POST"},function(e){a("body").trigger("pendingChanges",[!0]),void 0!=n&&n(e)},t)},createAlias:function(e,n,t){(0,s.send)("modelManager/createAlias/",JSON.stringify({values:e}),{type:"POST",contentType:"application/json;charset=utf-8",dataType:"text"},function(e){a("body").trigger("pendingChanges",[!0]),void 0!=n&&n(e)},t)},createInputNode:function(e,n,t){(0,s.send)("modelManager/createInputNode/",JSON.stringify({values:e}),{type:"POST",contentType:"application/json;charset=utf-8",dataType:"text"},function(e){a("body").trigger("pendingChanges",[!0]),void 0!=n&&n(e)},t)},deleteNodes:function(e,n,t){(0,s.send)("modelManager/deleteNodes/",JSON.stringify({values:e}),{type:"DELETE",contentType:"application/json;charset=utf-8",dataType:"text"},function(e){a("body").trigger("pendingChanges",[!0]),void 0!=n&&n(e)},t)},searchNode:function(e,n,t){var a=e.text,o=void 0===a?"":a,r=e.extraClasses,i=void 0===r?[]:r,c=e.moduleId,l=e.nodeClass,d=e.fillDetail;(0,s.send)("modelManager/searchNodes/?text=".concat(o).concat(c?"&moduleId=".concat(c):"").concat(l?"&nodeClass=".concat(l):"").concat(d?"&fillDetail=".concat(d):""),JSON.stringify({extraClasses:i}),{type:"POST",contentType:"application/json;charset=utf-8"},n,t)},SearchForAutocomplete:function(e,n,t){(0,s.send)("modelManager/searchForAutocomplete/",{text:e},{type:"GET",dataType:"text"},n,t)},navigateDiagram:function(e,n,t){(0,s.send)("modelManager/navigateDiagram/",{moduleId:e,includeArrows:!1},null,n,t)},getArrows:function(e,n,t){(0,s.send)("modelManager/getArrows/",{moduleId:e},null,n,t)},executeButton:function(e,n,t){(0,s.send)("modelManager/executeButton/",JSON.stringify({nodeId:e}),{type:"POST",contentType:"application/json;charset=utf-8",dataType:"text"},n,t)},evaluateNode:function(e,n,t){(0,s.send)("dashboardManager/getOrCreate/",{node:e},void 0,n,t)},isInBackground:function(e,n,t){(0,s.send)("modelManager/isInBackground/",{nodeId:e},{type:"GET",contentType:"application/json;charset=utf-8",dataType:"text"},n,t,!0)},abortProcess:function(e,n){(0,s.send)("modelManager/abortProcess/",null,{type:"GET"},e,n)},getIndexValues:function(e,n){(0,s.send)("dashboardManager/getIndexValues/",e,null,function(e){e&&n(e)})},getNodeIndexes:function(e,n){(0,s.send)("dashboardManager/getNodeIndexes/",{node:e},null,function(e){e&&n(e)})},getSelector:function(e,n){(0,s.send)("modelManager/getSelector/",{node:e},{type:"POST"},n)},exportFlatNode:function(e,n,a,o,r,i){var s={nodeId:e,fileFormat:n,numberFormat:a,columnFormat:o,compressed:r},c=new XMLHttpRequest;c.responseType="arraybuffer",c.open("POST","".concat(__apiURL,"/modelManager/exportFlatNode/")),c.setRequestHeader("Authorization","Token ".concat(__currentToken)),c.setRequestHeader("session-key",__currentSession?__currentSession.session_key:""),c.setRequestHeader("Content-type","application/json;charset=utf-8"),c.onreadystatechange=function(e){var n=e.currentTarget;n.readyState==n.DONE&&(200==n.status?i(n):Promise.all([t.e(2),t.e(18)]).then(function(){var e=[t(685)];(function(e){(new e).show({title:"ERROR!",text:n.response,notifyType:"error"})}).apply(null,e)}).catch(t.oe))},c.send(JSON.stringify(s))},exportCurrentNode:function(e,n,a,o,r,i,s){var c={nodeId:e,fileFormat:n,numberFormat:a,columnFormat:o,compressed:r,nodeQuery:i},l=new XMLHttpRequest;l.responseType="arraybuffer",l.open("POST","".concat(__apiURL,"/modelManager/exportCurrentNode/")),l.setRequestHeader("Authorization","Token ".concat(__currentToken)),l.setRequestHeader("session-key",__currentSession?__currentSession.session_key:""),l.setRequestHeader("Content-type","application/json;charset=utf-8"),l.onreadystatechange=function(e){var n=e.currentTarget;n.readyState==n.DONE&&(200==n.status?s(n):Promise.all([t.e(2),t.e(18)]).then(function(){var e=[t(685)];(function(e){(new e).show({title:"ERROR!",text:n.response,notifyType:"error"})}).apply(null,e)}).catch(t.oe))},l.send(JSON.stringify(c))},getDepartments:function(e){(0,s.send)("departments/by_current_company/",null,{type:"GET"},e)},getDeniedDepartments:function(e,n){(0,s.send)("departments/denied/?module=".concat(e),null,{type:"GET"},n)},setDeniedModule:function(e,n){(0,s.send)("departments/deny_items/",JSON.stringify(e),{type:"POST",contentType:"application/json;charset=utf-8"},n)},openParallelModel:function(e,n){(0,s.send)("ModelManager/openParallelModel/?file="+e,null,{type:"GET"},n)},closeParallelModel:function(e,n){(0,s.send)("ModelManager/closeParallelModel/?parallelToken="+e,null,{type:"GET"},n)},moveNodes:function(e,n,t){(0,s.send)("modelManager/moveNodes/",JSON.stringify({values:e}),{type:"POST",contentType:"application/json;charset=utf-8",dataType:"text"},function(e){a("body").trigger("pendingChanges",[!0]),void 0!=n&&n(e)},t)},copyNodes:function(e,n,t){(0,s.send)("modelManager/copyNodes/",JSON.stringify({values:e}),{type:"POST",contentType:"application/json;charset=utf-8",dataType:"text"},function(e){a("body").trigger("pendingChanges",[!0]),void 0!=n&&n(e)},t)},copyAsValues:function(e,n,t,o){(0,s.send)("modelManager/copyAsValues/",JSON.stringify({nodeId:e,asNewNode:n}),{type:"POST",contentType:"application/json;charset=utf-8",dataType:"text"},function(e){a("body").trigger("pendingChanges",[!0]),void 0!=t&&t(e)},o)},setNodePosition:function(e,n,t){(0,s.send)("modelManager/setNodesPosition/",JSON.stringify({values:e}),{type:"POST",contentType:"application/json;charset=utf-8",dataType:"text"},function(e){a("body").trigger("pendingChanges",[!0]),void 0!=n&&n(e)},t)},setNodeSize:function(e,n,t){(0,s.send)("modelManager/setNodesSize/",JSON.stringify({values:e}),{type:"POST",contentType:"application/json;charset=utf-8",dataType:"text"},function(e){a("body").trigger("pendingChanges",[!0]),void 0!=n&&n(e)},t)},setNodeZ:function(e,n,t){(0,s.send)("modelManager/setNodeZ/",JSON.stringify({values:e}),{type:"POST",contentType:"application/json;charset=utf-8",dataType:"text"},function(e){a("body").trigger("pendingChanges",[!0]),void 0!=n&&n(e)},t)},changeSession:function(n,a){var o=this;(0,s.send)("modelManager/changeToOtherModelSession/",{new_session_key:n},null,function(n){Promise.all([t.e(2),t.e(6),t.e(62)]).then(function(){var r=[t(684)];(function(t){(new t).clearUI(),e(n,a,!0,o)}).apply(null,r)}).catch(t.oe)})},getSharedNode:function(e,n){(0,s.send)("result/by_node_id/".concat(e,"/"),null,{type:"GET"},function(e){e&&n(e)},function(e,t){e&&n&&n(e)})},setSharedNode:function(e,n){(0,s.send)("result/".concat(e.id,"/"),JSON.stringify(e),{type:"PATCH",contentType:"application/json;charset=utf-8"},function(e){e&&n&&n(e)})},exportModuleToFile:function(e,n,t,a){var o={moduleId:e,exportType:n},r=new XMLHttpRequest;r.responseType="arraybuffer",r.open("POST","".concat(__apiURL,"/modelManager/exportModuleToFile/")),r.setRequestHeader("Authorization","Token ".concat(__currentToken)),r.setRequestHeader("session-key",__currentSession?__currentSession.session_key:""),r.setRequestHeader("Content-type","application/json;charset=utf-8"),r.onreadystatechange=function(e){var n=e.currentTarget;n.readyState==n.DONE&&(200==n.status?t(n):a(n.response))},r.send(JSON.stringify(o))},importModuleFromFile:function(e,n,t){(0,s.send)("modelManager/importModuleFromFile/",JSON.stringify(e),{type:"POST",contentType:"application/json;charset=utf-8",dataType:"text"},function(e){a("body").trigger("pendingChanges",[!0]),void 0!=n&&n(e)},t)},getProfile:function(e,n,t,a){(0,s.send)("modelManager/getNodeProfile/",{nodeId:e},{type:"GET"},n,t,!0,a)},previewNode:function(e,n,t){var a={node:e};(0,s.send)("modelManager/previewNode/",a,{type:"POST"},n,t)},stopProcess:function(e,n){(0,s.send)("modelManager/stop/",null,{type:"POST",contentType:"application/json;charset=utf-8",dataType:"text"},e,n,!1,!1)},listShortcuts:function(e){(0,s.send)("diagramShortcut/",null,{type:"GET"},e)},createShortcut:function(e,n){(0,s.send)("diagramShortcut/?node_id=".concat(e),null,{type:"POST"},function(e){void 0!=n&&n(e)})},deleteShortcut:function(e,n){(0,s.send)("diagramShortcut/".concat(e,"/"),null,{type:"DELETE"},function(e){void 0!=n&&n(e)})},getToolbars:function(e){(0,s.send)("modelManager/getToolbars/",null,{type:"GET"},e)},callWizard:function(e,n,t){(0,s.send)("modelManager/callWizard/",JSON.stringify(e),{type:"POST",contentType:"application/json;charset=utf-8",dataType:"text"},n,t)},getFilesForImportWizard:function(e,n){(0,s.send)("modelManager/getFilesForImportWizard/",{extension:e},{type:"GET",contentType:"application/json;charset=utf-8",dataType:"text"},n)},installLibrary:function(e,n){(0,s.send)("modelManager/installLibrary/",JSON.stringify({lib:e}),{type:"POST",contentType:"application/json;charset=utf-8",dataType:"text"},n)},getInstallProgress:function(e,n,t){(0,s.send)("modelManager/getInstallProgress/",{from_line:e},{type:"GET",contentType:"application/json;charset=utf-8",dataType:"text"},n,t,!0,!0)}})}.apply(n,[]))||(e.exports=r)}).call(this,t(1),t(218))},688:function(e,n,t){"use strict";var a=t(18);e.exports=function(e){return(0,a.translate)(e)}},694:function(e,n,t){var a,o;!function(r,i){if(!r.BackboneMVC){var s=r.BackboneMVC={};a=[t(218),t(220),t(1)],void 0===(o=function(e,n,t){return function(e,n,t,a,o){"use strict";if(void 0===t||void 0===a)return;var r=function(){function e(){this._created=(new Date).getTime()}return a.extend(e.prototype,{_created:null}),e.extend=function(n){var t,o=function(){return void 0!==t?t:(e.apply(this,arguments),void 0!==this.initialize&&this.initialize.apply(this,arguments),t=this)};return o.prototype=new e,a.extend(o.prototype,n),o.prototype.constructor=o,o.prototype.classId=a.uniqueId("controller_"),o},e}();a.extend(n,{namespace:function(n){for(var t=n.split("."),a=e,o=0,r=t.length;o<r;o++)void 0===a[t[o]]&&(a[t[o]]={}),a=a[t[o]]},Controller:{beforeFilter:function(){return(new o.Deferred).resolve()},afterRender:function(){return(new o.Deferred).resolve()},checkSession:function(){return(new o.Deferred).resolve(!0)},default:function(){return!0}},Router:function(){var e={_history:[],routes:{"*components":"dispatch"},dispatch:function(e){var n,t=(e||"").replace(/\/+$/g,"").split("/");if(i[t[0]]?n=t[0]:void 0!==i[d(t[0])]?n=d(t[0]):void 0!==i[u(t[0])]&&(n=u(t[0])),void 0===n)return this[404]();var r=new i[n],s=t.length>1?t[1]:"default";if("function"!=typeof r._actions[s])return this[404]();var f=t.length>2?a.rest(t,2):[];return function(e,n,t,o){e._history.length>888&&(e._history=a.last(e._history,888));e._history.push([n,t,o])}(this,n,s,f),function(e,n,t){var a=new i[e],r=[n].concat(t),s=o.Deferred(),d=a.beforeFilter.apply(a,r);c(d)?s=d:l(s,d);"function"==typeof a._secureActions[n]&&(s=s.pipe(function(){var e=a.checkSession.apply(a,t);return c(e)?e:l(new o.Deferred,e)}));return s=(s=s.pipe(function(){var e=a[n].apply(a,t);return c(e)?e:l(new o.Deferred,e)})).pipe(function(){var e=a.afterRender.apply(a,r);return c(e)?e:l(new o.Deferred,e)})}(n,s,f)},404:function(){},getLastAction:function(){return a.last(this._history,1)[0]},navigate:function(e,n){n&&!0!==n||(n={trigger:n});var r=a.extend({},n);return r.trigger=!1,t.Router.prototype.navigate.call(this,e,r),n.trigger?this.dispatch(e):(new o.Deferred).resolve()}};function n(n){var o=a.extend(n.routes||{},e.routes);return t.Router.extend(a.extend({},e,n,{routes:o}))}var r=t.Router.extend(a.extend({extend:n},e));return r.extend=n,r}(),Model:{extend:function(e){return e=a.extend({__fetchSuccessCallback:null,__fetchErrorCallback:null,fetch:function(e){var n=(e=e||{}).success;e.success=function(e,t){if(n&&n(e,t),e.__fetchSuccessCallback){var a=e.__fetchSuccessCallback;e.__fetchSuccessCallback=null,a.apply(e)}};var o=e.error;e.error=function(e,n){o&&o(e,n),e.trigger("error",o)},t.Model.prototype.fetch.apply(this,[e].concat(a.rest(arguments)))},parse:function(e){return this.__fetchSuccessCallback=null,this.__fetchErrorCallback=null,!e||e.error?(this.trigger("error",e&&e.error||e),{}):(this.__fetchSuccessCallback=function(){this.trigger("read",e.data)}.bind(this),e.data)}},e),t.Model.extend(e)}}}),n.Controller.extend=function e(t,o){return function(t){var c=t.name;if(void 0===c)throw"'name' property is mandatory ";t=a.extend({},o,t);var l=a.extend({},n.Controller),d={},u={};a.each(t,function(e,n){if(l[n]=e,"function"!=typeof e||"_"===n[0]||a.indexOf(s,n)>=0)return!1;if(d[n]=e,n.match(/^user_/i)){u[n]=e;var o=n.replace(/^user_/i,"");"function"!=typeof t[o]&&(u[o]=e,d[o]=e)}}),a.extend(l,d,{_actions:d,_secureActions:u}),"extend"in l&&delete l.extend;var f=r.extend(l);return a.extend(f,{extend:e(f,a.extend({},o,t))}),i[c]=f,f}}(n.Controller,{});var i={},s=["initialize","beforeFilter","afterRender","checkSession"];function c(e){return a.isObject(e)&&e.promise&&"function"==typeof e.promise}function l(e,n){return void 0===n&&(n=!0),e[n?"resolve":"reject"](n)}function d(e){return"string"!=typeof e?null:(e=e.replace(/\s{2,}/g," "),a.map(e.split(" "),function(e){return e.replace(/(^|_)[a-z]/gi,function(e){return e.toUpperCase()}).replace(/_/g,"")}).join(" "))}function u(e){return"string"!=typeof e?null:(e=e.replace(/\s{2,}/g," "),a.map(e.split(" "),function(e){return e.replace(/^[A-Z]/g,function(e){return e.toLowerCase()}).replace(/([a-z])([A-Z])/g,function(e,n,t){return n+"_"+t.toLowerCase()})}).join(" "))}}(r,s,e,n,t),s}.apply(n,a))||(e.exports=o)}}(this)},702:function(e,n,t){"use strict";(function(a,o){var r,i;r=[t(684),t(706)],void 0===(i=function(e,n){return a.Controller.extend({name:"dashboardManager",showDashboard:function(n,a,r,i,s,c,l){var d="dashboard-"+n,u=new e;u.existsTask(d)?(u.selectTask(d),i&&o(".mainTask[data-rel='"+d+"']").length>0&&o(".mainTask[data-rel='"+d+"']").trigger("refreshView")):(u.addSimpleTask(d,r),t.e(47).then(function(){var e=[t(881)];(function(e){(new e).render(n,a,s,c,l),u.selectTask(d)}).apply(null,e)}).catch(t.oe))},showEmbeddableDashboard:function(n,a,r,i,s,c){var l="dashboard-"+n,d=new e;__currentSession.fromEmbedded,d.existsTask(l)?(d.selectTask(l),i&&o(".mainTask[data-rel='"+l+"']").length>0&&o(".mainTask[data-rel='"+l+"']").trigger("refreshView")):(d.addSimpleTask(l,r),Promise.all([t.e(47),t.e(164)]).then(function(){var e=[t(1026)];(function(e){(new e).render(n,a,r,s,c),d.selectTask(l)}).apply(null,e)}).catch(t.oe))},removeDashboardTaskFromHome:function(n){var t="dashboard-"+n,a=new e;a.existsTask(t)&&a.removeTask(t)},drawDashboardBars:function(e,n){this.drawToolbar(e,function(){n()})},drawBottombar:function(e,n){t.e(165).then(function(){var a=[t(1027)];(function(t){var a=new t;a.setElement(e),a.render(),void 0!=n&&n()}).apply(null,a)}).catch(t.oe)},drawToolbar:function(e,n){t.e(44).then(function(){var a=[t(754)];(function(t){(new t).show({el:e,positions:["left","right"],onLoad:n,className:"dockDashboardProperty"})}).apply(null,a)}).catch(t.oe)},drawMoreDashboard:function(e,n){t.e(166).then(function(){var e=[t(1028)];(function(e){var t=new e;t.setElement("body"),t.render(n)}).apply(null,e)}).catch(t.oe)},getDefaultContent:function(e,n){Promise.all([t.e(0),t.e(7),t.e(66)]).then(function(){var a=[t(763)];(function(t){var a=new t({model:e});n(a)}).apply(null,a)}).catch(t.oe)},getEmptyContent:function(e,n){Promise.all([t.e(0),t.e(67)]).then(function(){var a=[t(858)];(function(t){var a=new t({model:e});n(a)}).apply(null,a)}).catch(t.oe)},getChartToolbar:function(e,n,a,o){var r;switch(e){case"linechart":r="line/lineToolbar";break;case"columnchart":case"columnchartstacked":case"columnchartpercent":case"barchart":case"barchartstacked":case"barchartpercent":r="columnAndBar/columnAndBarToolbar";break;case"areachart":case"areachartstacked":case"areachartpercent":r="area/areaToolbar";break;case"piechart":r="pie/pieToolbar";break;case"funnelchart":r="funnelToolbar/funnelToolbar";break;case"pyramidchart":r="pyramidToolbar/pyramidToolbar";break;case"gaugechart":r="gauge/gaugeToolbar";break;case"waterfallchart":r="waterfall/waterfallToolbar";break;case"scatterchart":r="scatter/scatterToolbar";break;case"table":r="table/tableToolbar";break;case"indexlist":r="index/indexToolbar";break;case"map":r="map/mapToolbar";break;case"indicator":r="indicator/indicatorToolbar";break;case"selector":r="selector/selectorToolbar";break;case"formnode":r="formnode/formnodeToolbar";break;case"nodetable":r="nodeTable/nodetableToolbar";break;case"button":r="button/buttonToolbar";break;case"analyticachart":r="analyticaChart/analyticaChartToolbar";break;case"objectItem":switch(n){case"texteditor":r="texteditor/texteditorToolbar";break;case"cubeviewer":r="cubeviewer/cubeviewerToolbar";break;case"diagramviewer":r="diagramViewer/diagramViewerToolbar";break;case"mapviewer":r="mapViewer/mapViewerToolbar";break;case"inputform":r="inputForm/inputFormToolbar";break;case"menuwidget":r="menuWidget/menuWidgetToolbar";break;case"dashboardcontainer_QUITAR_ESTO_PARA_MOSTRAR":r="dashboardContainer/dashboardContainerToolbar"}break;case"complexchart":r="complexchart/complexChartToolbar";break;default:r=!1}r?Promise.all([t.e(25),t.e(167)]).then(function(){var e=[t(1029)("./"+r)];(function(e){var n=new e({model:a});o(n)}).apply(null,e)}).catch(t.oe):Promise.all([t.e(25),t.e(56),t.e(168)]).then(function(){var e=[t(1034)];(function(e){var n=new e({model:a});o(n)}).apply(null,e)}).catch(t.oe)},getChartItemViewFromType:function(e,n){switch(e){case"empty":Promise.all([t.e(0),t.e(67)]).then(function(){var e=[t(858)];(function(e){n(e)}).apply(null,e)}).catch(t.oe);break;case"linechart":Promise.all([t.e(0),t.e(7),t.e(169)]).then(function(){var e=[t(1035)];(function(e){n(e)}).apply(null,e)}).catch(t.oe);break;case"columnchart":Promise.all([t.e(0),t.e(7),t.e(66)]).then(function(){var e=[t(763)];(function(e){n(e)}).apply(null,e)}).catch(t.oe);break;case"columnchartstacked":Promise.all([t.e(0),t.e(7),t.e(170)]).then(function(){var e=[t(1036)];(function(e){n(e)}).apply(null,e)}).catch(t.oe);break;case"columnchartpercent":Promise.all([t.e(0),t.e(7),t.e(171)]).then(function(){var e=[t(1037)];(function(e){n(e)}).apply(null,e)}).catch(t.oe);break;case"barchart":Promise.all([t.e(0),t.e(7),t.e(172)]).then(function(){var e=[t(839)];(function(e){n(e)}).apply(null,e)}).catch(t.oe);break;case"barchartstacked":Promise.all([t.e(0),t.e(7),t.e(173)]).then(function(){var e=[t(1038)];(function(e){n(e)}).apply(null,e)}).catch(t.oe);break;case"barchartpercent":Promise.all([t.e(0),t.e(7),t.e(174)]).then(function(){var e=[t(1039)];(function(e){n(e)}).apply(null,e)}).catch(t.oe);break;case"areachart":Promise.all([t.e(0),t.e(7),t.e(175)]).then(function(){var e=[t(840)];(function(e){n(e)}).apply(null,e)}).catch(t.oe);break;case"areachartstacked":Promise.all([t.e(0),t.e(7),t.e(176)]).then(function(){var e=[t(1040)];(function(e){n(e)}).apply(null,e)}).catch(t.oe);break;case"areachartpercent":Promise.all([t.e(0),t.e(7),t.e(177)]).then(function(){var e=[t(1041)];(function(e){n(e)}).apply(null,e)}).catch(t.oe);break;case"piechart":Promise.all([t.e(0),t.e(7),t.e(178)]).then(function(){var e=[t(1042)];(function(e){n(e)}).apply(null,e)}).catch(t.oe);break;case"gaugechart":Promise.all([t.e(0),t.e(7),t.e(179)]).then(function(){var e=[t(1043)];(function(e){n(e)}).apply(null,e)}).catch(t.oe);break;case"waterfallchart":Promise.all([t.e(0),t.e(7),t.e(180)]).then(function(){var e=[t(1044)];(function(e){n(e)}).apply(null,e)}).catch(t.oe);break;case"scatterchart":Promise.all([t.e(0),t.e(7),t.e(181)]).then(function(){var e=[t(1045)];(function(e){n(e)}).apply(null,e)}).catch(t.oe);break;case"complexchart":Promise.all([t.e(0),t.e(7),t.e(182)]).then(function(){var e=[t(1046)];(function(e){n(e)}).apply(null,e)}).catch(t.oe);break;case"table":Promise.all([t.e(0),t.e(11),t.e(183)]).then(function(){var e=[t(1047)];(function(e){n(e)}).apply(null,e)}).catch(t.oe);break;case"indexlist":Promise.all([t.e(0),t.e(184)]).then(function(){var e=[t(1048)];(function(e){n(e)}).apply(null,e)}).catch(t.oe);break;case"map":Promise.all([t.e(34),t.e(0),t.e(11),t.e(93),t.e(185)]).then(function(){var e=[t(1049)];(function(e){n(e)}).apply(null,e)}).catch(t.oe);break;case"indicator":Promise.all([t.e(91),t.e(302),t.e(0),t.e(186)]).then(function(){var e=[t(1050)];(function(e){n(e)}).apply(null,e)}).catch(t.oe);break;case"selector":Promise.all([t.e(0),t.e(187)]).then(function(){var e=[t(1096)];(function(e){n(e)}).apply(null,e)}).catch(t.oe);break;case"formnode":Promise.all([t.e(0),t.e(188)]).then(function(){var e=[t(1098)];(function(e){n(e)}).apply(null,e)}).catch(t.oe);break;case"nodetable":Promise.all([t.e(0),t.e(15),t.e(35),t.e(189)]).then(function(){var e=[t(1099)];(function(e){n(e)}).apply(null,e)}).catch(t.oe);break;case"button":Promise.all([t.e(0),t.e(190)]).then(function(){var e=[t(1100)];(function(e){n(e)}).apply(null,e)}).catch(t.oe);break;case"funnelchart":Promise.all([t.e(0),t.e(7),t.e(191)]).then(function(){var e=[t(1101)];(function(e){n(e)}).apply(null,e)}).catch(t.oe);break;case"pyramidchart":Promise.all([t.e(0),t.e(7),t.e(192)]).then(function(){var e=[t(1102)];(function(e){n(e)}).apply(null,e)}).catch(t.oe);break;case"analyticachart":Promise.all([t.e(0),t.e(193)]).then(function(){var e=[t(1103)];(function(e){n(e)}).apply(null,e)}).catch(t.oe)}},getObjectItemViewFromType:function(e,n){switch(e){case"texteditor":Promise.all([t.e(0),t.e(92),t.e(194)]).then(function(){var e=[t(1104)];(function(e){n(e)}).apply(null,e)}).catch(t.oe);break;case"cubeviewer":Promise.all([t.e(0),t.e(15),t.e(35),t.e(195)]).then(function(){var e=[t(1105)];(function(e){n(e)}).apply(null,e)}).catch(t.oe);break;case"diagramviewer":Promise.all([t.e(0),t.e(11),t.e(21),t.e(196)]).then(function(){var e=[t(1106)];(function(e){n(e)}).apply(null,e)}).catch(t.oe);break;case"mapviewer":Promise.all([t.e(34),t.e(0),t.e(11),t.e(94),t.e(197)]).then(function(){var e=[t(1107)];(function(e){n(e)}).apply(null,e)}).catch(t.oe);break;case"inputform":Promise.all([t.e(20),t.e(0),t.e(15),t.e(36),t.e(198)]).then(function(){var e=[t(1108)];(function(e){n(e)}).apply(null,e)}).catch(t.oe);break;case"dashboardcontainer":Promise.all([t.e(0),t.e(199)]).then(function(){var e=[t(1109)];(function(e){n(e)}).apply(null,e)}).catch(t.oe);case"menuwidget":Promise.all([t.e(0),t.e(25),t.e(200)]).then(function(){var e=[t(1110)];(function(e){n(e)}).apply(null,e)}).catch(t.oe)}},getFilterView:function(e){t.e(201).then(function(){var n=[t(1111)];(function(n){e(n)}).apply(null,n)}).catch(t.oe)},showCopyDashboard:function(e,n,a){t.e(202).then(function(){var o=[t(1112)];(function(t){(new t).render(e,n,a)}).apply(null,o)}).catch(t.oe)},showDashboardComments:function(e){t.e(203).then(function(){var n=[t(1113)];(function(n){var t=new n;t.setElement(e.parent),t.render(e)}).apply(null,n)}).catch(t.oe)},refreshAllOpenDashboards:function(){o(".mainTask.dashboardTask .btnRefresh").trigger("click")},showTimeFrameSetting:function(e){t.e(204).then(function(){var n=[t(1114)];(function(n){var t=new n(e);t.setElement(e.el),t.render()}).apply(null,n)}).catch(t.oe)},updatePrintReportProgress:function(e){t.e(48).then(function(){var n=[t(779)];(function(n){new n(e).updatePrintReportProgress()}).apply(null,n)}).catch(t.oe)},updatePrintReportMessage:function(e){t.e(48).then(function(){var n=[t(779)];(function(n){new n(e).updatePrintReportMessage()}).apply(null,n)}).catch(t.oe)},updatePrintReportComplete:function(e){t.e(48).then(function(){var n=[t(779)];(function(n){new n(e).updatePrintReportComplete()}).apply(null,n)}).catch(t.oe)}})}.apply(n,r))||(e.exports=i)}).call(this,t(694),t(1))},706:function(e,n,t){"use strict";(function(a,o){var r,i=t(693);void 0===(r=function(){return a.Model.extend({defaults:{dashId:null,dashboardViewList:[],modifiedDash:!1,noQuery:[],styleLibraries:[],nodeOwner:"",extraOptions:void 0},resizeTimeOut:0,getDashboard:function(e,n){(0,i.send)("dashboardManager/by_id/".concat(e,"/"),null,null,function(e){e&&(n(e),o("#summary").trigger("refresh"))})},getNavigator:function(e,n){var t=e.reportId,a=void 0===t?null:t,o=e.dashboardId,r=void 0===o?null:o,s="";a?(s="?report_id=".concat(a),r&&(s+="&dashboard_id=".concat(r))):r&&(s="?dashboard_id=".concat(r)),(0,i.send)("reportManager/getNavigator/".concat(s),null,null,n)},calculateScaleFactor:function(e,n){if(this.getItemsModel().length>0)for(var t=this.getItemsModel(),a=0;a<t.length;a++)t[a].calculateScaleFactor(e,n)},updateSizes:function(e,n){if(this.getItemsModel().length>0){var t=300;n&&(t=1),clearTimeout(this.resizeTimeOut);var a=this.getItemsModel();this.resizeTimeOut=setTimeout(function(){var e;for(e=0;e<a.length;e++)a[e].baseUpdateSize(),a[e].updateSize()},t)}},setStateModified:function(e){this.set({modifiedDash:e})},getStateModified:function(){return this.get("modifiedDash")},addItemToModel:function(e){this.get("dashboardViewList").push(e)},getItemsModel:function(){return this.get("dashboardViewList")},getItemModel:function(e){var n,t=this.getItemsModel();for(n=0;n<t.length;n++)if(t[n].tagId==e)return t[n]},countItemsModelByNodeId:function(e){for(var n=0,t=this.getItemsModel(),a=0;a<t.length;a++)t[a].currentNodeId&&e&&t[a].currentNodeId.toLowerCase()==e.toLowerCase()&&n++;return n},removeItemModel:function(e){var n,t=this.getItemsModel();for(n=0;n<t.length;n++)if(t[n].tagId==e.tagId){t.splice(n,1);break}this.set({dashboardViewList:t})},removeAllItemsModel:function(){this.set("dashboardViewList",[])},changeItemModel:function(e,n){this.removeItemModel(e),this.addItemToModel(n)},setNodeOwner:function(e){this.set("node",e)},getNodeOwner:function(){return this.get("node")},onFilterChange:function(e,n,t,a,o,r){if(o){var i=this.getItemModel(o);if(i&&i.isUnlinkedIndex(e))return void i.onFilterChange(e,n,t,a,!0)}var s=this.getItemsModel();if(s)for(var c=0;c<s.length;c++)s[c].onFilterChange(e,n,t,a,!1,r)},onFiltersChange:function(e){var n=this.getItemsModel();if(n)for(var t=0;t<n.length;t++)n[t].onFiltersChange(e)},synchronizeDrop:function(e,n,t,a,o,r,i){if(i){var s=this.getItemsModel();if(s)for(var c=0;c<s.length;c++)s[c].tagId&&s[c].tagId!=i&&s[c].onSynchronizeDrop(e,n,t,a,o,r)}},synchronizeLevel:function(e,n,t){if(t){var a=this.getItemsModel();if(a)for(var o=0;o<a.length;o++)a[o].tagId&&a[o].tagId!=t&&a[o].onSynchronizeLevel(e,n)}},getNodeFullData:function(e,n,t,a){var o={node:e};n&&(o.fromRow=1,o.toRow=n),(0,i.send)("dashboardManager/getNodeFullData/",o,{type:"GET"},t,a)},getNodeIndexes:function(e,n){(0,i.send)("dashboardManager/getNodeIndexes/",{node:e},null,function(e){e&&n(e)})},getIndexValues:function(e,n){(0,i.send)("dashboardManager/getIndexValues/",e,null,function(e){e&&n(e)})},getGeoDef:function(e,n){(0,i.send)("Dashboard/GetGeoDef/"+e,null,null,function(e){e&&n(e)})},evaluateNode:function(e,n,t,a,o,r,s,c,l,d,u,f,p,h,g){c||(c="sum");var y={node:e,dims:n,rows:t,columns:a,summaryBy:c,bottomTotal:u,rightTotal:f,timeFormat:p,timeFormatType:h,calendarType:g},m="evaluateNode";r&&(m="evaluateNodeDef"),l&&l>0&&d&&d>0&&(y.fromRow=l*(d-1)+1,y.toRow=l*d),(0,i.send)("dashboardManager/".concat(m,"/"),JSON.stringify(y),{type:"POST",contentType:"application/json;charset=utf-8"},o,s)},evaluateNodeForPivot:function(e,n,t,a){(0,i.send)("Dashboard/EvaluateNodeForPivot/",{node:e},{type:"GET"},function(e){var r=e.value,i={success:function(e,t,a){n(e)},complete:function(){o("#mainLoading").hide(),o("#secondLoading").hide(),t()},dataType:"json",progress:function(e){if(e.lengthComputable){var n=e.loaded/e.total*100;a(n)}else try{var t=this.getResponseHeader("X-Content-Length");n=e.loaded/t*100;a(n)}catch(e){}}};o("#secondLoading").show(),o.ajax("".concat(__apiURL,"/scripts/download.aspx?name=").concat(r),i)},t)},updateDefinition:function(e,n,t,a){var r=[];t&&o.each(t,function(e,n){r.push({id:n})});var s={dashboardId:e,definition:n,styles:t};(0,i.send)("dashboardManager/".concat(e,"/"),JSON.stringify(s),{type:"PATCH",contentType:"application/json;charset=utf-8",dataType:"text"},function(e){void 0!=a&&a(e)})},updateDashboardImage:function(e,n,t){var a={id:e,fileData:n};(0,i.send)("Dashboard/UpdateImage/",a,{type:"PUT"},function(n){o("#summary").trigger("refresh"),o("#model-summary").trigger("refresh",{id:e}),n&&t&&t(n)})},validateIndexes:function(e,n){var t=function(n){var t;for(t=0;t<e.length;t++)if(e[t].field==n)return e[t]},a=function(e){var n,a;for(n=0;n<e.length;n++)void 0!=(a=t(e[n].field))&&(e[n].name=a.name)};a(n.dims),a(n.rows),a(n.columns)},initializeDashboardQuery:function(e){this.set("noQuery",e),this._initNoQuery()},_initNoQuery:function(){var e=this.get("noQuery");e&&e.length>0&&o.each(e,function(e,n){n.started=!1})},isReadyForEvaluate:function(e,n){var t=!0,a=this.get("noQuery");return a&&a.length>0&&o.each(a,function(a,o){o.node==e?o.started=!0:0==o.started&&o.rel&&o.rel.indexOf(n)>=0&&(t=!1)}),t},setNodeValueChanges:function(e,n){(0,i.send)("dashboardManager/pivotGrid/setCubeChanges/",JSON.stringify(e),{type:"POST",contentType:"application/json;charset=utf-8"},function(e){n(e),o("body").trigger("pendingChanges",[!0])})},isResultComputed:function(e,n){(0,i.send)("dashboardManager/isResultComputed/",JSON.stringify({nodes:e}),{type:"POST",contentType:"application/json;charset=utf-8"},function(e){n(e)})},reevaluateNodesNeeded:function(e){o(".dashboardTask").trigger("reevaluateNodesNeeded",[e])},reevaluateNodesNeededInThisDashboard:function(e){for(var n=[],t=this.getItemsModel(),a=0;a<t.length;a++){var r=t[a].getNodesOfView();r&&(n=n.concat(r))}n.length>0&&this.isResultComputed(n,function(n){if(n&&n.length>0)for(var a=0;a<t.length;a++)e&&t[a].tagId==e||(n.indexOf(t[a].currentNodeId)>=0&&o(t[a].tagId).trigger("evaluateNodeFromCurrentResult"),t[a].needRefresh(n)&&t[a].refreshItemDash())})},applyNumberFormat:function(e){for(var n=this.getItemsModel(),t=0;t<n.length;t++)n[t].currentNodeId==e&&n[t].applyNumberFormat()},getStyleLibrary:function(e){var n=this.get("styleLibraries");if(n)for(var t=0;t<n.length;t++)if(n[t].id==e)return n[t].definition;return[]},getStyleLibraries:function(){return this.get("styleLibraries")},setStyleLibraries:function(e){return this.set("styleLibraries",e)},refreshStyleLibraries:function(e){var n=this;t.e(65).then(function(){var a=[t(731)];(function(t){(new t).list(null,function(t){n.set("styleLibraries",t),e(t)})}).apply(null,a)}).catch(t.oe)},syncDrilldown:function(e,n,t){var a=this.getItemsModel();if(a)for(var o=0;o<a.length;o++)a[o].tagId!=t&&a[o].syncDrilldown(e,n,t)},syncDrillUp:function(e,n){var t=this.getItemsModel();if(t)for(var a=0;a<t.length;a++)t[a].tagId!=n&&t[a].syncDrillup(e,n)},syncShowHideLegend:function(e,n,t){},viewAsChart:function(e,n){(0,i.send)("Dashboard/viewAsChart/",e,{type:"POST"},n)}})}.apply(n,[]))||(e.exports=r)}).call(this,t(218),t(1))},724:function(e,n,t){"use strict";(function(a){var o,r=t(18),i=t(693);void 0===(o=function(){var e=function(e,n,a){null!==e.companySettingFile&&""!==e.companySettingFile&&t.e(42).then(function(){var n=[t(713)("./".concat(e.companySettingFile))];(function(){Promise.resolve().then(function(){t(221)}).catch(t.oe)}).apply(null,n)}).catch(t.oe),__currentSession=e,(0,r.setProcessDictionary)(e.process),(0,i.ajaxSetup)(),Promise.all([t.e(2),t.e(6),t.e(43)]).then(function(){var a=[t(684)];(function(t){(new t).clearUI(),n(e)}).apply(null,a)}).catch(t.oe)};return a.Model.extend({isConnected:function(){return""!=__currentToken&&null!==__currentSession},connect:function(e,n,t,a,o){var r={error:function(e,n,t){alert("Could not contact server ".concat(__apiURL))},type:"POST"};(0,i.send)("token-auth/",{username:e,password:n},r,function(e){e&&e.token&&(__currentToken=e.token,(0,i.ajaxSetup)(),a(e))},o,!0,!0)},createSession:function(n,t,a){(0,i.send)("security/createSession",{companyId:n},{type:"POST"},function(n){e(n,t)},a)},getUserCompanies:function(e,n,t){(0,i.send)("security/getUserCompanies",{user:e,password:n},null,function(e){t(e)})},getUserCompaniesFromUserId:function(e,n){(0,i.send)("security/GetUserCompaniesFromUserId/?userId=".concat(e),null,null,function(e){n(e)})},logout:function(e){(0,i.send)("security/logout/",null,{dataType:"text"},function(n){void 0!=e&&e(n)})},getAllSessions:function(e){(0,i.send)("security/getAllSessions/",null,null,e,null,!0)},getMySessions:function(e){(0,i.send)("security/getMySessions/",null,null,e,null,!0)},getAllProcess:function(e){(0,i.send)("security/getAllProcess",null,null,e)},createFromToken:function(e,n,t){__currentToken=e,__currentSession={},(0,r.setProcessDictionary)([]),(0,i.ajaxSetup)(),(0,r.setLanguageDictionary)({}),n()},useExternalLink:function(e,n){(0,i.send)("security/useExternalLink/?guid=".concat(e),null,null,function(e,a){200===a.status?(null!==e.session.companySettingFile&&""!==e.session.companySettingFile&&t.e(42).then(function(){var n=[t(713)("./".concat(e.session.companySettingFile))];(function(){Promise.resolve().then(function(){t(221)}).catch(t.oe)}).apply(null,n)}).catch(t.oe),n(e,a)):n(e,a)})},killSessionByKey:function(e,n){(0,i.send)("security/killSessionByKey/",{session_key:e},{type:"GET",dataType:"text"},n)},createNewSession:function(n,t){(0,i.send)("security/createNewSession/",null,null,function(t){e(t,n)})},requireLogoutSessionByToken:function(e,n){(0,i.send)("security/requireLogoutSessionByToken/",{token:e},null,n)},ssoTest:function(){(0,i.send)("security/ssoTest",null,null,function(e){console.log(e)})},ssoCheckUser:function(e,n){(0,i.send)("security/SSOCheckUser/",null,null,e,n)},loginas:function(n,t,a,o,r){var s={error:function(e,n,t){alert("Could not contact server ".concat(__apiURL))}};(0,i.send)("security/loginas",{userId:n,token:t,companyId:a},s,function(n){e(n,o)})},loginFromToken:function(n,t,a){var o={error:function(e,n,t){alert("Could not contact server ".concat(__apiURL))}};(0,i.send)("security/loginFromToken",{token:n},o,function(n){e(n,t)})}})}.apply(n,[]))||(e.exports=o)}).call(this,t(218))},880:function(e,n,t){var a=t(690);e.exports=(a.default||a).template({1:function(e,n,t,a,o){var r,i=null!=n?n:e.nullContext||{},s=t.helperMissing,c=e.escapeExpression;return'    <li>\n        <a data-rel="'+c("function"==typeof(r=null!=(r=t.id||(null!=n?n.id:n))?r:s)?r.call(i,{name:"id",hash:{},data:o}):r)+'" data-key="dashboard-'+c("function"==typeof(r=null!=(r=t.key||(null!=n?n.key:n))?r:s)?r.call(i,{name:"key",hash:{},data:o}):r)+'" title="'+c("function"==typeof(r=null!=(r=t.title||(null!=n?n.title:n))?r:s)?r.call(i,{name:"title",hash:{},data:o}):r)+'" data-toggle="tab" data-opened="false">'+c("function"==typeof(r=null!=(r=t.title||(null!=n?n.title:n))?r:s)?r.call(i,{name:"title",hash:{},data:o}):r)+"</a>\n    </li>\n"},compiler:[7,">= 4.0.0"],main:function(e,n,t,a,o){var r;return null!=(r=t.each.call(null!=n?n:e.nullContext||{},n,{name:"each",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?r:""},useData:!0})}}]);