tao-test/app/taoClientDiagnostic/views/js/loader/diagnostic.min.js

2 lines
47 KiB
JavaScript

function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}(function(){'use strict';var loaderScript=document.getElementById("amd-loader"),configUrl=loaderScript.getAttribute("data-config"),bundle=loaderScript.getAttribute("data-bundle"),loadController=function(){var controllerOptions={},controllerPath=loaderScript.getAttribute("data-controller"),params=loaderScript.getAttribute("data-params");try{controllerOptions=JSON.parse(params)}catch(err){controllerOptions={}}window.require([controllerPath],function(controller){var startController=function(){window.started||(window.started=!0,controller.start(controllerOptions))};document.addEventListener("readystatechange",startController,!1),"complete"===document.readyState&&startController()})};window.require([configUrl],function(){window.loadBundles||(window.loaded={},window.loadBundles=function(bundles){bundles=bundles||[],bundles=bundles.concat(window.bundles),bundles=bundles.filter(function(item,index){return item&&bundles.indexOf(item)===index&&!0!==window.loaded[item]}),require(bundles,function(){bundles.forEach(function(item){window.loaded[item]=!0}),loadController()})}),bundle||window.bundles&&window.bundles.length?window.loadBundles([bundle]):loadController()})})(),define("loader/bootstrap",function(){}),define("taoClientDiagnostic/tools/fixedDecimals",[],function(){'use strict';return function(value,decimals){var shift=Math.pow(10,Math.abs(decimals||1));return Math.round(+value*shift)/shift||0}}),define("taoClientDiagnostic/tools/stats",["lodash","taoClientDiagnostic/tools/fixedDecimals"],function(_,fixedDecimals){'use strict';var _Mathfloor=Math.floor,_Mathmax=Math.max,_Mathmin=Math.min;function valueGetter(name){return"function"==typeof name?name:function(item){return item&&item[name]||0}}return function(list,fieldName,decimals){var _Mathceil=Math.ceil,_Mathsqrt=Math.sqrt,_NumberMAX_VALUE=Number.MAX_VALUE,getValue=valueGetter(fieldName),values=[],min=_NumberMAX_VALUE,max=0,count=0,sum=_.reduce(list,function(sum,item){if("undefined"!=typeof item){var value=getValue(item);return values.push(value),min=_Mathmin(min,value),max=_Mathmax(max,value),sum+=value,count++,sum}},0),average=sum/(count||1),sum2=values.reduce(function(sum,value){var diff=value-average;return sum+=diff*diff,sum},0),variance=1<count?_Mathsqrt(sum2/(count-1)):0;values.sort();var middle=count/2,median=(values[_Mathfloor(middle)]+values[_Mathceil(middle)])/2,results={min:min,max:max,sum:sum,count:count,average:average,median:median,variance:variance};return decimals&&_.forEach(results,function(value,key){results[key]=fixedDecimals(value,decimals)}),results.values=list,results}}),define("taoClientDiagnostic/tools/getConfig",["lodash"],function(_){'use strict';return function(config,defaults){return _(config||{}).omit(function(value){return null===value||"undefined"==typeof value}).defaults(defaults||{}).value()}}),define("taoClientDiagnostic/tools/getLabels",[],function(){'use strict';var _Mathmax2=Math.max,_Mathmin2=Math.min;return function(messages,level){return messages=messages||{},Array.isArray(messages)||(messages=[messages]),level=_Mathmin2(_Mathmax2(parseInt(level,10)||0,1),messages.length||1)-1,messages[level]||{}}}),define("taoClientDiagnostic/tools/getStatus",["lodash"],function(_){'use strict';var _Mathmax3=Math.max;return function(percentage,thresholds,opts){var options=opts||{},testPercentage=_Mathmax3(0,Math.min(100,Math.round(parseInt(percentage,10)||0))),globalPercentage=options.minimumGlobalPercentage?_Mathmax3(testPercentage,options.minimumGlobalPercentage):testPercentage,status={percentage:testPercentage,globalPercentage:globalPercentage,quality:{}};if(thresholds){Array.isArray(thresholds)||(thresholds=[thresholds]);for(var feedback,step,len=thresholds.length,i=0;i<len&&(step=thresholds[i],step&&(!step.threshold||status.percentage>=step.threshold));i++)feedback=step;feedback&&(status.feedback=_.clone(feedback))}return status}}),define("taoClientDiagnostic/tools/performances/tester",["jquery","lodash","i18n","async","context","helpers","taoClientDiagnostic/tools/stats","taoQtiItem/qtiItem/core/Loader","taoQtiItem/qtiCommonRenderer/renderers/Renderer","taoClientDiagnostic/tools/getConfig","taoClientDiagnostic/tools/getLabels","taoClientDiagnostic/tools/getStatus"],function($,_,__,async,context,helpers,stats,Loader,Renderer,getConfig,getLabels,getStatus){'use strict';var _Mathabs=Math.abs;function loadItem(data,done){var qtiJsonFile="".concat(data.url,"qti.json"),urlTokens=data.url.split("/"),extension=urlTokens[0],fullpath=require.s.contexts._.config.paths[extension],baseUrl=data.url.replace(extension,fullpath),loader=new Loader,renderer=new Renderer({baseUrl:baseUrl});renderer.getAssetManager&&renderer.getAssetManager().setData("baseUrl",baseUrl),require(["json!".concat(qtiJsonFile)],function(itemData){loader.loadItemData(itemData,function(item){renderer.load(function(){var start=window.performance.now();item.setRenderer(this);var $container=$("<div>").appendTo("body");$container.append(item.render()),item.postRender(),$container.remove();var end=window.performance.now(),result={id:data.id,url:data.url,duration:(end-start)/1000};done(null,result)},this.getLoadedClasses())})})}var _defaultSamples=["taoClientDiagnostic/tools/performances/data/sample1/","taoClientDiagnostic/tools/performances/data/sample2/","taoClientDiagnostic/tools/performances/data/sample3/"],_defaults={id:"performances",optimal:.025,threshold:.25},_thresholds=[{threshold:0,message:__("Very slow performances"),type:"error"},{threshold:33,message:__("Average performances"),type:"warning"},{threshold:66,message:__("Good performances"),type:"success"}],_messages=[{title:__("Workstation performances"),status:__("Checking the performances..."),performancesMin:__("Minimum rendering time"),performancesMax:__("Maximum rendering time"),performancesAverage:__("Average rendering time")}];return function(config){var initConfig=getConfig(config,_defaults),labels=getLabels(_messages,initConfig.level),idx=0,_samples=_.map(!_.isEmpty(initConfig.samples)&&initConfig.samples||_defaultSamples,function(sample){return idx++,{id:"sample"+idx,url:sample,timeout:1e3*initConfig.timeout||30000,nb:initConfig.occurrences||10}});return _samples[0].nb++,{start:function start(done){var _this=this,tests=[];_.forEach(_samples,function(data){for(var cb=_.partial(loadItem,data),iterations=data.nb||1;iterations--;)tests.push(cb)}),async.series(tests,function(err,measures){if(err&&!measures.length)throw err;measures.shift();var results=stats(measures,"duration",2),status=_this.getFeedback(results.average),summary=_this.getSummary(results);done(status,summary,results)})},get labels(){return labels},getSummary:function getSummary(results){return{performancesMin:{message:labels.performancesMin,value:"".concat(results.min," s")},performancesMax:{message:labels.performancesMax,value:"".concat(results.max," s")},performancesAverage:{message:labels.performancesAverage,value:"".concat(results.average," s")}}},getFeedback:function getFeedback(result){var optimal=initConfig.optimal,range=_Mathabs(optimal-initConfig.threshold),status=getStatus(100*((range+optimal-result)/range),_thresholds);return status.title=labels.title,status.id=initConfig.id,status}}}}),define("taoClientDiagnostic/tools/bandwidth/tester",["lodash","i18n","async","context","taoClientDiagnostic/tools/getConfig","taoClientDiagnostic/tools/getLabels","taoClientDiagnostic/tools/stats","taoClientDiagnostic/tools/fixedDecimals","taoClientDiagnostic/tools/getStatus"],function(_,__,async,context,getConfig,getLabels,stats,fixedDecimals,getStatus){'use strict';var _Mathfloor2=Math.floor,_Mathmax4=Math.max;function download(data,cb){var _this2=this;if(data.threshold&&this.bandwidth<data.threshold)return cb("threshold");var start=window.performance.now(),url="".concat(context.root_url,"taoClientDiagnostic/views/js/tools/bandwidth/").concat(data.file,"?").concat(Date.now()),timeoutId=window.setTimeout(cb,data.timeout,"timeout"),request=new XMLHttpRequest;request.open("GET",url,!0),request.setRequestHeader("Accept","application/octet-stream"),request.onload=function(){var end=window.performance.now();clearTimeout(timeoutId);var duration=end-start,bytes=data.size,speed=8*bytes/(duration/1000)/1048576;return _this2.bandwidth=_Mathmax4(_this2.bandwidth,speed),cb(null,{id:data.id,file:data.file,size:data.size,duration:duration,speed:speed})},request.onerror=function(err){clearTimeout(timeoutId),cb(err)},request.onreadystatechange=function(){4===request.readyState&&200!==request.status&&(clearTimeout(timeoutId),cb(request.status))},request.send()}var _second=1e3,_thresholds=[{threshold:0,message:__("Low bandwidth"),type:"error"},{threshold:33,message:__("Average bandwidth"),type:"warning"},{threshold:66,message:__("Good bandwidth"),type:"success"}],_defaults={id:"bandwidth",unit:.16,ideal:45,max:100,minimumGlobalPercentage:!1,feedbackThresholds:_thresholds,fallbackThreshold:.2},_downloadData={"10KB":{id:"10KB",file:"data/bin10KB.data",size:10240,timeout:_second,threshold:0,nb:10},"100KB":{id:"100KB",file:"data/bin100KB.data",size:102400,timeout:2*_second,threshold:0,nb:5},"1MB":{id:"1MB",file:"data/bin1MB.data",size:1048576,timeout:20*_second,threshold:0,nb:3}},_messages=[{title:__("Bandwidth"),status:__("Checking the bandwidth..."),legend:__("Number of simultaneous test takers the connection can handle"),bandwidthMin:__("Minimum bandwidth"),bandwidthMax:__("Maximum bandwidth"),bandwidthAverage:__("Average bandwidth")},{title:__("Media intensive bandwidth"),status:__("Checking the media intensive bandwidth..."),legend:__("Number of simultaneous test takers the connection can handle with media intensive"),bandwidthMin:__("Minimum intensive bandwidth"),bandwidthMax:__("Maximum intensive bandwidth"),bandwidthAverage:__("Average intensive bandwidth")}];return function(config){var initConfig=getConfig(config,_defaults),labels=getLabels(_messages,initConfig.level);return _.isArray(initConfig.feedbackThresholds)&&!initConfig.feedbackThresholds.length&&(initConfig.feedbackThresholds=_thresholds),{start:function start(done){var _this3=this,tests=[];_.forEach(_downloadData,function(data){for(var cb=download.bind(_this3,data),iterations=data.nb||1;iterations--;)tests.push(cb)}),this.bandwidth=0,async.series(tests,function(err,measures){function getValue(value){var speed=0;return value&&(duration+=value.duration,size+=value.size,speed=value.speed,value.speed=fixedDecimals(speed,2)),speed}var duration=0,size=0,decimals=2,resultsBySize={};if(err&&!measures.length)throw err;var results=stats(measures,getValue,decimals);_.forEach(_downloadData,function(data,key){resultsBySize[key]=stats(_.filter(measures,function(o){return o.id===key}),getValue,decimals)}),results.duration=fixedDecimals(duration/_second,decimals),results.size=size;var summary=_this3.getSummary(results),status=_this3.getFeedback(results,resultsBySize);done(status,summary,results)})},get labels(){return labels},getSummary:function getSummary(results){return{bandwidthMin:{message:labels.bandwidthMin,value:results.min+" Mbps"},bandwidthMax:{message:labels.bandwidthMax,value:results.max+" Mbps"},bandwidthAverage:{message:labels.bandwidthAverage,value:results.average+" Mbps"}}},getFeedback:function getFeedback(result,resultsBySize){var avgResult=result.average,bandwidthUnit=initConfig.unit,threshold=initConfig.ideal,maxTestTakers=initConfig.max,getStatusOptions=initConfig.minimumGlobalPercentage?{minimumGlobalPercentage:initConfig.minimumGlobalPercentage}:{},baseBandwidth=avgResult,stable=!0;_.forEach(resultsBySize,function(resultBySize){resultBySize.min/resultBySize.average<initConfig.fallbackThreshold&&(stable=!1)});var status=getStatus(100*(baseBandwidth/(threshold*bandwidthUnit)),initConfig.feedbackThresholds,getStatusOptions),nb=_Mathfloor2(baseBandwidth/bandwidthUnit);return nb>maxTestTakers&&(nb=">"+maxTestTakers),status.id=initConfig.id,status.title=labels.title,status.feedback.legend=labels.legend,status.quality.label=nb,stable||(status.feedback.type="warning",status.feedback.message=__("Unstable bandwidth, temporary fluctuations in connection speed may affect test taker experience."),status.feedback.legend=__("Simultaneous test takers under normal connection conditions.")),2<nb.toString().length&&(status.quality.wide=!0),status}}}}),define("taoClientDiagnostic/tools/upload/tester",["jquery","lodash","i18n","async","util/url","taoClientDiagnostic/tools/getConfig","taoClientDiagnostic/tools/getLabels","taoClientDiagnostic/tools/getStatus"],function($,_,__,async,urlHelper,getConfig,getLabels,getStatus){'use strict';var _Mathround=Math.round;function generateStr(length){for(var text="",possible="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=0;i<length;i++)text+=possible.charAt(Math.floor(Math.random()*possible.length));return text}function upload(size){var url=urlHelper.route("upload","CompatibilityChecker","taoClientDiagnostic",{cache:Date.now()}),str=generateStr(size);return data=[],$.ajax({url:url,type:"POST",data:{upload:str},xhr:function(){var xhr=new window.XMLHttpRequest,startTime=Date.now();return xhr.upload.addEventListener("progress",function(evt){if(evt.lengthComputable){var passedTime=Date.now()-startTime;data.push({time:passedTime,loaded:evt.loaded,speed:8*evt.loaded/1048576/(passedTime/1e3)})}},!1),xhr}})}var _mega=1048576,data=[],_defaults={id:"upload",size:_mega,optimal:_mega},_thresholds=[{threshold:0,message:__("Low upload speed"),type:"error"},{threshold:33,message:__("Average upload speed"),type:"warning"},{threshold:66,message:__("Good upload speed"),type:"success"}],_messages=[{title:__("Upload speed"),status:__("Checking upload speed..."),uploadAvg:__("Average upload speed"),uploadMax:__("Max upload speed")}];return function(config){var initConfig=getConfig(config,_defaults),labels=getLabels(_messages,initConfig.level);return{start:function start(done){var _this4=this;upload(parseInt(initConfig.size,10)).then(function(){var totalSpeed=0,maxSpeed=0;_.forEach(data,function(val){totalSpeed+=val.speed,maxSpeed<val.speed&&(maxSpeed=_Mathround(100*val.speed)/100)});var avgSpeed=_Mathround(100*(totalSpeed/data.length))/100,results={max:maxSpeed,avg:avgSpeed,type:"upload"},status=_this4.getFeedback(avgSpeed),summary=_this4.getSummary(results);done(status,summary,results)})},get labels(){return labels},getSummary:function getSummary(results){return{uploadAvg:{message:labels.uploadAvg,value:"".concat(results.avg," Mbps")},uploadMax:{message:labels.uploadMax,value:"".concat(results.max," Mbps")}}},getFeedback:function getFeedback(result){var optimal=initConfig.optimal/_mega,status=getStatus(100/optimal*result,_thresholds);return status.id=initConfig.id,status.title=labels.title,status}}}}),define("taoClientDiagnostic/tools/getPlatformInfo",["core/request","util/url","taoClientDiagnostic/tools/getConfig"],function(request,urlHelper,getConfig){'use strict';function getTesterUrl(win,action,controller,extension){var document=win.document,navigator=win.navigator,screen=win.screen,params={},e=0,f=0;return params.ua=navigator.userAgent,e|=win.ActiveXObject?1:0,e|=win.opera?2:0,e|=win.chrome?4:0,e|="getBoxObjectFor"in document||"mozInnerScreenX"in win?8:0,e|="WebKitCSSMatrix"in win||"WebKitPoint"in win||"webkitStorageInfo"in win||"webkitURL"in win?16:0,e|=16&e&&-1==={}.toString.toString().indexOf("\n")?32:0,params.e=e,f|="sandbox"in document.createElement("iframe")?1:0,f|="WebSocket"in win?2:0,f|=win.Worker?4:0,f|=win.applicationCache?8:0,f|=win.history&&win.history.pushState?16:0,f|=document.documentElement.webkitRequestFullScreen?32:0,f|="FileReader"in win?64:0,params.f=f,params.r=Math.random().toString(36).substring(7),params.w=screen.width,params.h=screen.height,urlHelper.route(action,controller,extension,params)}var defaultConfig={browserVersionAction:"whichBrowser",browserVersionController:"CompatibilityChecker",browserVersionExtension:"taoClientDiagnostic"};return function(win,config){config=getConfig(config,defaultConfig);var url=getTesterUrl(win,config.browserVersionAction,config.browserVersionController,config.browserVersionExtension);return request({url:url,noToken:!0})}}),define("taoClientDiagnostic/tools/browser/tester",["jquery","lodash","i18n","util/url","core/logger","core/request","taoClientDiagnostic/tools/getConfig","taoClientDiagnostic/tools/getLabels","taoClientDiagnostic/tools/getPlatformInfo","taoClientDiagnostic/tools/getStatus"],function($,_,__,urlHelper,loggerFactory,request,getConfig,getLabels,getPlatformInfo,getStatus){'use strict';var logger=loggerFactory("taoClientDiagnostic/browser"),_defaults={id:"browser",browserVersionAction:"whichBrowser",browserVersionController:"CompatibilityChecker",browserVersionExtension:"taoClientDiagnostic",action:"check",controller:"DiagnosticChecker",browserslistUrl:"https://oat-sa.github.io/browserslist-app-tao/api.json"},_placeHolders={CURRENT_BROWSER:"%CURRENT_BROWSER%",CURRENT_OS:"%CURRENT_OS%"},_messages=[{title:__("Operating system and web browser"),status:__("Checking the browser..."),browser:__("Web browser"),os:__("Operating system")}],unknown=__("Unknown");return function(config){function checkBrowserSupport(platformInfo){var currentDevice=platformInfo.isMobile?"mobile":"desktop",currentOS=platformInfo.os.toLowerCase(),currentBrowser=platformInfo.browser.toLowerCase(),currentVersion=platformInfo.browserVersion;return fetchBrowserList().then(function(list){return list.some(function(entry){var browser=entry.browser,device=entry.device,os=entry.os,versions=entry.versions;return!(currentDevice!==device)&&!(os&&os.toLowerCase()!==currentOS)&&!(browser.toLowerCase()!==currentBrowser)&&_(versions).map(function(version){return version.split("-")}).flatten().value().some(function(version){return 0<=currentVersion.localeCompare(version,void 0,{numeric:!0})})},{})})}var initConfig=getConfig(config,_defaults),labels=getLabels(_messages,initConfig.level),fetchBrowserList=function(){return request({url:initConfig.browserslistUrl,noToken:!0}).catch(function(){return[]})};return{start:function start(done){var _this5=this;getPlatformInfo(window,initConfig).catch(function(err){return logger.error(err),{browser:unknown,browserVersion:"",os:unknown,osVersion:"",isMobile:!1}}).then(function(platformInfo){return checkBrowserSupport(platformInfo).then(function(browserSupported){return Object.assign(platformInfo,{browserSupported:browserSupported})})}).then(function(platformInfo){request({url:urlHelper.route(initConfig.action,initConfig.controller,initConfig.extension),data:platformInfo,method:"POST",noToken:!0}).catch(function(){return{success:!1,type:"error",message:__("Unable to validate the data as the server did not respond in time.")}}).then(function(data){var percentage="success"===data.type?100:"warning"===data.type?33:0,status=_this5.getFeedback(percentage,data),summary=_this5.getSummary(platformInfo);status.customMsgRenderer=function(customMsg){return(customMsg||"").replace(_placeHolders.CURRENT_BROWSER,summary.browser.value).replace(_placeHolders.CURRENT_OS,summary.os.value)},done(status,summary,platformInfo)})})},get labels(){return labels},getSummary:function getSummary(results){var currentBrowser="".concat(results.browser," ").concat(results.browserVersion),currentOs="".concat(results.os," ").concat(results.osVersion);return{browser:{message:labels.browser,value:currentBrowser},os:{message:labels.os,value:currentOs}}},getFeedback:function getFeedback(result,data){var status=getStatus(result,data);return status.id=initConfig.id,status.title=labels.title,status}}}}),define("tpl!taoClientDiagnostic/tools/diagnostic/tpl/main",["handlebars"],function(hb){return hb.template(function(Handlebars,depth0,helpers,partials,data){function program1(depth0,data){var stack1,helper,buffer="";return buffer+="<p>",(helper=helpers.header)?stack1=helper.call(depth0,{hash:{},data:data}):(helper=depth0&&depth0.header,stack1="function"===_typeof(helper)?helper.call(depth0,{hash:{},data:data}):helper),buffer+=escapeExpression(stack1)+"</p>",buffer}function program3(depth0,data){var stack1,helper,buffer="";return buffer+="<p>",(helper=helpers.info)?stack1=helper.call(depth0,{hash:{},data:data}):(helper=depth0&&depth0.info,stack1="function"===_typeof(helper)?helper.call(depth0,{hash:{},data:data}):helper),buffer+=escapeExpression(stack1)+"</p>",buffer}function program5(depth0,data){var stack1,helper,buffer="";return buffer+="<p>",(helper=helpers.setup)?stack1=helper.call(depth0,{hash:{},data:data}):(helper=depth0&&depth0.setup,stack1="function"===_typeof(helper)?helper.call(depth0,{hash:{},data:data}):helper),buffer+=escapeExpression(stack1)+"</p>",buffer}function program7(depth0,data){var helper,options,buffer="";return buffer+="\n <p>\n <label for=\"school_id\">"+escapeExpression((helper=helpers.__||depth0&&depth0.__,options={hash:{},data:data},helper?helper.call(depth0,"School ID:",options):helperMissing.call(depth0,"__","School ID:",options)))+"</label>\n <input type=\"text\" data-control=\"school_id\" id=\"school_id\" name=\"school_id\" maxlength=\"255\" placeholder=\""+escapeExpression((helper=helpers.__||depth0&&depth0.__,options={hash:{},data:data},helper?helper.call(depth0,"School ID",options):helperMissing.call(depth0,"__","School ID",options)))+"\" />\n </p>\n <p>\n <label for=\"workstation\">"+escapeExpression((helper=helpers.__||depth0&&depth0.__,options={hash:{},data:data},helper?helper.call(depth0,"Workstation:",options):helperMissing.call(depth0,"__","Workstation:",options)))+"</label>\n <input type=\"text\" data-control=\"workstation\" id=\"workstation\" name=\"workstation\" maxlength=\"64\" placeholder=\""+escapeExpression((helper=helpers.__||depth0&&depth0.__,options={hash:{},data:data},helper?helper.call(depth0,"Workstation name",options):helperMissing.call(depth0,"__","Workstation name",options)))+"\" />\n </p>\n ",buffer}function program9(depth0,data){var stack1,buffer="";return buffer+="\n ",stack1=helpers["if"].call(depth0,depth0&&depth0.validateSchoolName,{hash:{},inverse:self.program(12,program12,data),fn:self.program(10,program10,data),data:data}),(stack1||0===stack1)&&(buffer+=stack1),buffer+="\n ",buffer}function program10(depth0,data){var helper,options,buffer="";return buffer+="\n <p>\n <label for=\"school_number\">"+escapeExpression((helper=helpers.__||depth0&&depth0.__,options={hash:{},data:data},helper?helper.call(depth0,"School number:",options):helperMissing.call(depth0,"__","School number:",options)))+"</label>\n <input type=\"text\" data-control=\"school_number\" id=\"school_number\" name=\"school_number\" maxlength=\"10\" placeholder=\""+escapeExpression((helper=helpers.__||depth0&&depth0.__,options={hash:{},data:data},helper?helper.call(depth0,"School number",options):helperMissing.call(depth0,"__","School number",options)))+"\" />\n </p>\n <p>\n <label for=\"school_pin\">"+escapeExpression((helper=helpers.__||depth0&&depth0.__,options={hash:{},data:data},helper?helper.call(depth0,"School PIN:",options):helperMissing.call(depth0,"__","School PIN:",options)))+"</label>\n <input type=\"text\" data-control=\"school_pin\" id=\"school_pin\" name=\"school_pin\" maxlength=\"4\" placeholder=\""+escapeExpression((helper=helpers.__||depth0&&depth0.__,options={hash:{},data:data},helper?helper.call(depth0,"School PIN code (4 digits)",options):helperMissing.call(depth0,"__","School PIN code (4 digits)",options)))+"\" />\n </p>\n ",buffer}function program12(depth0,data){var helper,options,buffer="";return buffer+="\n <p>\n <label for=\"school_name\">"+escapeExpression((helper=helpers.__||depth0&&depth0.__,options={hash:{},data:data},helper?helper.call(depth0,"School name:",options):helperMissing.call(depth0,"__","School name:",options)))+"</label>\n <input type=\"text\" data-control=\"school_name\" id=\"school_name\" name=\"school_name\" maxlength=\"255\" placeholder=\""+escapeExpression((helper=helpers.__||depth0&&depth0.__,options={hash:{},data:data},helper?helper.call(depth0,"School name",options):helperMissing.call(depth0,"__","School name",options)))+"\" />\n </p>\n ",buffer}this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{};var stack1,helper,buffer="",escapeExpression=this.escapeExpression,helperMissing=helpers.helperMissing,self=this;return buffer+="<div class=\"diagnostics-main-area\">\n\n <h1>",(helper=helpers.title)?stack1=helper.call(depth0,{hash:{},data:data}):(helper=depth0&&depth0.title,stack1="function"===_typeof(helper)?helper.call(depth0,{hash:{},data:data}):helper),buffer+=escapeExpression(stack1)+"</h1>\n\n <div class=\"intro\">\n ",stack1=helpers["if"].call(depth0,depth0&&depth0.header,{hash:{},inverse:self.noop,fn:self.program(1,program1,data),data:data}),(stack1||0===stack1)&&(buffer+=stack1),buffer+="\n ",stack1=helpers["if"].call(depth0,depth0&&depth0.info,{hash:{},inverse:self.noop,fn:self.program(3,program3,data),data:data}),(stack1||0===stack1)&&(buffer+=stack1),buffer+="\n ",stack1=helpers["if"].call(depth0,depth0&&depth0.setup,{hash:{},inverse:self.noop,fn:self.program(5,program5,data),data:data}),(stack1||0===stack1)&&(buffer+=stack1),buffer+="\n ",stack1=helpers["if"].call(depth0,depth0&&depth0.requireSchoolId,{hash:{},inverse:self.noop,fn:self.program(7,program7,data),data:data}),(stack1||0===stack1)&&(buffer+=stack1),buffer+="\n ",stack1=helpers["if"].call(depth0,depth0&&depth0.requireSchoolName,{hash:{},inverse:self.noop,fn:self.program(9,program9,data),data:data}),(stack1||0===stack1)&&(buffer+=stack1),buffer+="\n </div>\n\n <div class=\"clearfix\">\n <button data-action=\"test-launcher\" class=\"btn-info small rgt\">",(helper=helpers.button)?stack1=helper.call(depth0,{hash:{},data:data}):(helper=depth0&&depth0.button,stack1="function"===_typeof(helper)?helper.call(depth0,{hash:{},data:data}):helper),buffer+=escapeExpression(stack1)+"</button>\n </div>\n\n <ul class=\"plain results\"></ul>\n\n <div class=\"status\">\n <h2></h2>\n </div>\n\n</div>",buffer})}),define("tpl!taoClientDiagnostic/tools/diagnostic/tpl/result",["handlebars"],function(hb){return hb.template(function(Handlebars,depth0,helpers,partials,data){function program1(depth0,data){var helper,options,buffer="";return buffer+="\n <div class=\"clearfix\">\n <button data-action=\"show-details\" class=\"rgt btn-info small\">"+escapeExpression((helper=helpers.__||depth0&&depth0.__,options={hash:{},data:data},helper?helper.call(depth0,"Show Details",options):helperMissing.call(depth0,"__","Show Details",options)))+"</button>\n <button data-action=\"hide-details\" class=\"rgt btn-info small hidden\">"+escapeExpression((helper=helpers.__||depth0&&depth0.__,options={hash:{},data:data},helper?helper.call(depth0,"Hide Details",options):helperMissing.call(depth0,"__","Hide Details",options)))+"</button>\n <div class=\"details hidden\"></div>\n </div>\n ",buffer}this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{};var stack1,helper,buffer="",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression,self=this;return buffer+="<li data-result=\"",(helper=helpers.id)?stack1=helper.call(depth0,{hash:{},data:data}):(helper=depth0&&depth0.id,stack1="function"===_typeof(helper)?helper.call(depth0,{hash:{},data:data}):helper),buffer+=escapeExpression(stack1)+"\">\n <h2>",(helper=helpers.title)?stack1=helper.call(depth0,{hash:{},data:data}):(helper=depth0&&depth0.title,stack1="function"===_typeof(helper)?helper.call(depth0,{hash:{},data:data}):helper),buffer+=escapeExpression(stack1)+"</h2>\n <div class=\"result\"></div>\n\n ",stack1=helpers["if"].call(depth0,depth0&&depth0.details,{hash:{},inverse:self.noop,fn:self.program(1,program1,data),data:data}),(stack1||0===stack1)&&(buffer+=stack1),buffer+="\n</li>",buffer})}),define("tpl!taoClientDiagnostic/tools/diagnostic/tpl/details",["handlebars"],function(hb){return hb.template(function(Handlebars,depth0,helpers,partials,data){function program1(depth0,data){var stack1,helper,buffer="";return buffer+="\n <tr><td>",(helper=helpers.message)?stack1=helper.call(depth0,{hash:{},data:data}):(helper=depth0&&depth0.message,stack1="function"===_typeof(helper)?helper.call(depth0,{hash:{},data:data}):helper),buffer+=escapeExpression(stack1)+"</td><td>",(helper=helpers.value)?stack1=helper.call(depth0,{hash:{},data:data}):(helper=depth0&&depth0.value,stack1="function"===_typeof(helper)?helper.call(depth0,{hash:{},data:data}):helper),buffer+=escapeExpression(stack1)+"</td></tr>\n ",buffer}this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{};var stack1,helper,options,buffer="",escapeExpression=this.escapeExpression,helperMissing=helpers.helperMissing,self=this;return buffer+="<div class=\"details\">\n <h2>"+escapeExpression((helper=helpers.__||depth0&&depth0.__,options={hash:{},data:data},helper?helper.call(depth0,"Details",options):helperMissing.call(depth0,"__","Details",options)))+"</h2>\n <div>\n <table class=\"matrix\">\n <tbody>\n ",stack1=helpers.each.call(depth0,depth0,{hash:{},inverse:self.noop,fn:self.program(1,program1,data),data:data}),(stack1||0===stack1)&&(buffer+=stack1),buffer+="\n </tbody>\n </table>\n </div>\n</div>",buffer})}),define("tpl!taoClientDiagnostic/tools/diagnostic/tpl/feedback",["handlebars"],function(hb){return hb.template(function(Handlebars,depth0,helpers,partials,data){function program1(depth0,data){var stack1,helper,buffer="";return buffer+="<div class=\"legend\">",(helper=helpers.legend)?stack1=helper.call(depth0,{hash:{},data:data}):(helper=depth0&&depth0.legend,stack1="function"===_typeof(helper)?helper.call(depth0,{hash:{},data:data}):helper),buffer+=escapeExpression(stack1)+"</div>",buffer}function program3(depth0,data){var stack1,helper,buffer="";return buffer+="<div class=\"customMsg\">",(helper=helpers.customMsg)?stack1=helper.call(depth0,{hash:{},data:data}):(helper=depth0&&depth0.customMsg,stack1="function"===_typeof(helper)?helper.call(depth0,{hash:{},data:data}):helper),buffer+=escapeExpression(stack1)+"</div>",buffer}this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{};var stack1,helper,buffer="",escapeExpression=this.escapeExpression,self=this;return buffer+="<div class=\"small feedback feedback-",(helper=helpers.type)?stack1=helper.call(depth0,{hash:{},data:data}):(helper=depth0&&depth0.type,stack1="function"===_typeof(helper)?helper.call(depth0,{hash:{},data:data}):helper),buffer+=escapeExpression(stack1)+"\">\n <span class=\"icon icon-",(helper=helpers.type)?stack1=helper.call(depth0,{hash:{},data:data}):(helper=depth0&&depth0.type,stack1="function"===_typeof(helper)?helper.call(depth0,{hash:{},data:data}):helper),buffer+=escapeExpression(stack1)+"\"></span>\n <span class=\"msg\">",(helper=helpers.message)?stack1=helper.call(depth0,{hash:{},data:data}):(helper=depth0&&depth0.message,stack1="function"===_typeof(helper)?helper.call(depth0,{hash:{},data:data}):helper),buffer+=escapeExpression(stack1)+"</span>\n ",stack1=helpers["if"].call(depth0,depth0&&depth0.legend,{hash:{},inverse:self.noop,fn:self.program(1,program1,data),data:data}),(stack1||0===stack1)&&(buffer+=stack1),buffer+="\n ",stack1=helpers["if"].call(depth0,depth0&&depth0.customMsg,{hash:{},inverse:self.noop,fn:self.program(3,program3,data),data:data}),(stack1||0===stack1)&&(buffer+=stack1),buffer+="\n</div>",buffer})}),define("tpl!taoClientDiagnostic/tools/diagnostic/tpl/quality-bar",["handlebars"],function(hb){return hb.template(function(Handlebars,depth0,helpers,partials,data){function program3(depth0,data){var stack1,helper,buffer="";return buffer+=" title=\"",(helper=helpers.label)?stack1=helper.call(depth0,{hash:{},data:data}):(helper=depth0&&depth0.label,stack1="function"===_typeof(helper)?helper.call(depth0,{hash:{},data:data}):helper),buffer+=escapeExpression(stack1)+"\"",buffer}this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{};var stack1,buffer="",escapeExpression=this.escapeExpression,self=this;return buffer+="<div class=\"quality-bar\">\n <div class=\"quality-indicator",stack1=helpers["if"].call(depth0,depth0&&depth0.wide,{hash:{},inverse:self.noop,fn:self.program(1,function(){return" wide"},data),data:data}),(stack1||0===stack1)&&(buffer+=stack1),buffer+="\"",stack1=helpers["if"].call(depth0,depth0&&depth0.label,{hash:{},inverse:self.noop,fn:self.program(3,program3,data),data:data}),(stack1||0===stack1)&&(buffer+=stack1),buffer+="></div>\n</div>",buffer})}),define("css!taoClientDiagnosticCss/diagnostics",[],function(){}),define("taoClientDiagnostic/tools/diagnostic/diagnostic",["jquery","lodash","i18n","async","ui/component","core/logger","core/store","core/request","core/dataProvider/request","ui/dialog/alert","ui/feedback","util/url","taoClientDiagnostic/tools/performances/tester","taoClientDiagnostic/tools/bandwidth/tester","taoClientDiagnostic/tools/upload/tester","taoClientDiagnostic/tools/browser/tester","taoClientDiagnostic/tools/getStatus","taoClientDiagnostic/tools/getConfig","tpl!taoClientDiagnostic/tools/diagnostic/tpl/main","tpl!taoClientDiagnostic/tools/diagnostic/tpl/result","tpl!taoClientDiagnostic/tools/diagnostic/tpl/details","tpl!taoClientDiagnostic/tools/diagnostic/tpl/feedback","tpl!taoClientDiagnostic/tools/diagnostic/tpl/quality-bar","css!taoClientDiagnosticCss/diagnostics"],function($,_,__,async,component,loggerFactory,store,request,requestData,dialogAlert,feedback,urlHelper,performancesTester,bandwidthTester,uploadTester,browserTester,getStatus,getConfig,mainTpl,resultTpl,detailsTpl,feedbackTpl,qualityBarTpl){'use strict';var logger=loggerFactory("taoClientDiagnostic/diagnostic"),_defaults={title:__("System Compatibility"),header:__("This tool will run a number of tests in order to establish how well your current environment is suitable to run the TAO platform."),info:__("Be aware that these tests will take up to several minutes."),button:__("Test system compatibility"),actionStore:"storeData",actionSchool:"schoolName",controller:"DiagnosticChecker",extension:"taoClientDiagnostic",actionDropId:"deleteId",storeAllRuns:!1,configurableText:{}},_thresholds=[{threshold:0,message:__("Your system requires a compatibility update, please contact your system administrator."),type:"error"},{threshold:33,message:__("Your system is not optimal, please contact your system administrator."),type:"warning"},{threshold:66,message:__("Your system is fully compliant."),type:"success"}],diagnostic={changeStatus:function changeStatus(status){return this.is("rendered")&&this.controls.$status.html(status),this},store:function(type,data,done){var config=this.config,url=urlHelper.route(config.actionStore,config.controller,config.extension,config.storeParams);data=_.omit(data,"values"),data.type=type,request({url:url,data:data,method:"POST",noToken:!0}).then(done).catch(function(err){logger.error(err),feedback().error(__("Unable to save the results! Please check your connection.")),done()})},getCustomMsg:function getCustomMsg(key){return this.config.configurableText[key]},addCustomFeedbackMsg:function addCustomFeedbackMsg(status,msg){this.hasFailed(status)&&msg&&(_.isFunction(status.customMsgRenderer)&&(msg=status.customMsgRenderer(msg)),status.feedback=status.feedback||{},status.feedback.customMsg=msg)},hasFailed:function hasFailed(result){return!(result&&result.feedback&&"success"===result.feedback.type)},addResult:function addResult(result){if(this.is("rendered")){result.quality&&result.quality.label&&2<result.quality.label.toString().length&&(result.quality.wide=!0);var $main=$(resultTpl(result)),$result=$main.find(".result");result.feedback&&$result.append($(feedbackTpl(result.feedback))),result.quality&&$result.append($(qualityBarTpl(result.quality))),result.details&&$main.find(".details").append($(detailsTpl(result.details)));var $indicator=$main.find(".quality-indicator");this.controls.$results.append($main),$main.fadeIn(function(){$indicator.length&&$indicator.animate({left:result.percentage*$main.outerWidth()/100-$indicator.outerWidth()/2})})}return this},cleanUp:function cleanUp(){return this.controls.$results.empty(),this},enable:function enable(){return this.controls.$start.removeClass("hidden"),this},disable:function disable(){return this.controls.$start.addClass("hidden"),this},prepare:function prepare(){return this.trigger("start"),this.changeStatus(__("Starting...")),this.setState("running",!0),this.setState("done",!1),this.cleanUp(),this.disable(),this},finish:function finish(){var config=this.config;return this.enable(),config.storeAllRuns&&this.deleteIdentifier(),this.trigger("end"),this.changeStatus(__("Done!")),this.setState("running",!1),this.setState("done",!0),this},deleteIdentifier:function deleteIdentifier(){var url=urlHelper.route(this.config.actionDropId,this.config.controller,this.config.extension);return request({url:url,method:"POST",noToken:!0})},run:function run(){var _this6=this,information=[],scores={},testers=[],customInput=this.getCustomInput(),doRun=function(){var doCheck=function(testerConfig,cb){var testerId=testerConfig.id;_this6.trigger("starttester",testerId),_this6.setState(testerId,!0);require([testerConfig.tester],function processTester(testerFactory){var tester=testerFactory(getConfig(testerConfig,_this6.config),_this6);_this6.changeStatus(tester.labels.status),tester.start(function(status,details,results){if(testerConfig.customMsgKey){var customMsg=_this6.getCustomMsg(testerConfig.customMsgKey);_this6.addCustomFeedbackMsg(status,customMsg)}_.forEach(details,function(info){return information.push(info)}),scores[status.id]=status,_this6.trigger("endtester",testerId,status),_this6.setState(testerId,!1),results=_.mapValues(results,function(value){switch(_typeof(value)){case"boolean":return value?1:0;case"object":return JSON.stringify(value);}return value}),_this6.store(testerId,results,function(){_this6.addResult(status),cb()})})},function processFailure(err){logger.error(err),feedback().error(__("Unable to process with the diagnostic tester %s. The tester module is unreachable.",testerId)),cb()})};_this6.is("rendered")&&(_this6.prepare(),_.forEach(_this6.config.testers,function(testerConfig,testerId){testerConfig.id=testerConfig.id||testerId,testerConfig.enabled&&testers.push(function(cb){return doCheck(testerConfig,cb)})}),async.series(testers,function(){var total=_.min(scores,"globalPercentage"),status=getStatus(total.globalPercentage,_thresholds);status.title=__("Total"),status.id="total",_this6.addCustomFeedbackMsg(status,_this6.config.configurableText.diagTotalCheckResult),status.details=information,_this6.addResult(status),_this6.finish()}))};return 0<_.size(customInput)?this.store("custom_input",customInput,doRun):doRun(),this},getCustomInput:function getCustomInput(){var _this7=this,vars={};return window.location.href.replace(location.hash,"").replace(/[?&]+([^=&]+)=?([^&]*)?/gi,function(m,key,value){_.has(_this7.config.customInput,key)&&(vars[key]="undefined"==typeof value?"":value)}),vars}};return function(container,config){config&&_.forEach(["title","header","footer","info","button"],function(name){config[name]&&(config[name]=__(config[name]))});var diagComponent=component(diagnostic,_defaults).setTemplate(mainTpl).on("destroy",function(){this.controls=null}).on("init",function(){this.render(container)}).on("render",function(){function getInputValue(name){var $control=getControl(name);return($control&&$control.val()||"").trim()}function setInputValue(name,value){var $control=getControl(name);$control&&$control.val(value)}function toggleControl(name,state){var $control=getControl(name);$control&&("undefined"==typeof state&&(state=!$control.is(":enabled")),state?$control.prop("disabled",!1):$control.prop("disabled",!0))}var _this8=this,runDiagnostics=function(data){data&&_.isPlainObject(data)&&(_this8.config.storeParams=_.assign(_this8.config.storeParams||{},data)),_this8.run()},launch=function(){return runDiagnostics()},getControl=function(name){return _this8.controls["$".concat(name)]},manageSchoolProperties=function(fields,validate){function toggleStart(){var allow=_.every(fields,getInputValue);return toggleControl("start",allow),allow}function toggleFields(state){_.forEach(fields,function(fieldName){toggleControl(fieldName,state)})}_.forEach(fields,function(fieldName){_this8.controls["$".concat(fieldName)]=_this8.getElement().find("[data-control=\"".concat(fieldName,"\"]")).on("keypress",function(e){var shouldStart=13===e.which;shouldStart&&e.preventDefault(),_.defer(function(){toggleStart()&&shouldStart&&_this8.controls.$start.click()})})}),toggleStart(),toggleFields(!1),store("client-diagnostic").then(function(storage){return _this8.on("start.school",function(){_.forEach(fields,function(fieldName){storage.setItem(fieldName,getInputValue(fieldName)).catch(function(error){logger.error(error)})})}),Promise.all(_.map(fields,function(fieldName){return storage.getItem(fieldName).then(function(value){setInputValue(fieldName,value)})}))}).catch(function(error){logger.error(error)}).then(function(){toggleFields(!0),toggleStart()}),launch=function(){var values=_.reduce(fields,function(result,fieldName){return result[fieldName]=getInputValue(fieldName),result},{});_this8.changeStatus(__("Getting school name...")).cleanUp().disable(),_.isFunction(validate)?validate(values).then(runDiagnostics).catch(function(error){var response=error.response||{},message=response.errorMsg||response.errorMessage||__("An error occurred! Please verify your input!");dialogAlert(message),logger.error(error),_this8.changeStatus(__("Failed to get school name")).enable()}):runDiagnostics(values)},_this8.on("start.school",function(){toggleFields(!1)}).on("end.school",function(){toggleFields(!0)})};this.controls={$start:this.$component.find("[data-action=\"test-launcher\"]"),$status:this.$component.find(".status h2"),$results:this.$component.find(".results")},this.controls.$start.on("click",function(){_this8.controls.$start.is(":enabled")&&launch()}),this.config.requireSchoolName&&(this.config.validateSchoolName?manageSchoolProperties(["school_number","school_pin"],function requestSchoolName(values){var componentConfig=_this8.config;return requestData(urlHelper.route(componentConfig.actionSchool,componentConfig.controller,componentConfig.extension),values,"POST").then(function(data){return{school_name:data,school_number:values.school_number}})}):manageSchoolProperties(["school_name"])),this.config.requireSchoolId&&manageSchoolProperties(["school_id","workstation"]),this.controls.$results.on("click","button[data-action=\"show-details\"]",function(){var $btn=$(this).closest("button"),$result=$btn.closest("[data-result]"),$details=$result.find(".details");$details.removeClass("hidden"),$btn.addClass("hidden"),$result.find("[data-action=\"hide-details\"]").removeClass("hidden")}),this.controls.$results.on("click","button[data-action=\"hide-details\"]",function(){var $btn=$(this).closest("button"),$result=$btn.closest("[data-result]"),$details=$result.find(".details");$details.addClass("hidden"),$btn.addClass("hidden"),$result.find("[data-action=\"show-details\"]").removeClass("hidden")})});return _.defer(function(){return diagComponent.init(config)}),diagComponent}}),function(c){var d=document,s=d.createElement("style");s.type="text/css",d.getElementsByTagName("head")[0].appendChild(s),s.styleSheet?s.styleSheet.cssText=c:s.appendChild(d.createTextNode(c))}(".diagnostics-content-area{max-width:768px;margin:40px auto 40px auto}.diagnostics-main-area{margin:40px auto 0 auto;background:#f3f1ef;border:1px solid #ddd;border-radius:2px;-webkit-border-radius:2px;padding:20px}.diagnostics-main-area h1,.diagnostics-main-area h2,.diagnostics-main-area h3{font-style:normal;font-family:\"Source Sans Pro\",sans-serif}.diagnostics-main-area h1{margin-bottom:20px;font-size:20px;font-size:2rem}.diagnostics-main-area h2{margin:0;font-size:14px;font-size:1.4rem}.diagnostics-main-area h3{margin-top:10px;margin-bottom:5px;font-size:12px;font-size:1.2rem}.diagnostics-main-area .status h2,.diagnostics-main-area .details h2{margin:1rem 0}.diagnostics-main-area .legend{font-style:italic;font-weight:normal;font-family:\"Source Sans Pro\",sans-serif;font-size:11px;font-size:1.1rem}.diagnostics-main-area .customMsg{margin-top:10px}.diagnostics-main-area .quality-bar{height:15px;background:linear-gradient(to right, #CE1431 0%, #D57915 25%, #D5A215 50%, #D5CB15 75%, #36B111 100%);opacity:.8;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;margin:5px 0 10px;position:relative}.diagnostics-main-area .quality-indicator{position:absolute;border-width:10px 8px;border-style:solid;border-color:#333 transparent transparent;top:-1px;height:25px;width:0}.diagnostics-main-area .quality-indicator[title]:before{font-size:11px;font-size:1.1rem;content:attr(title);position:absolute;top:-36px;left:-12px;text-align:center;width:24px;height:24px;line-height:24px;display:inline-block;background-color:#0e5d91;color:rgba(255,255,255,0.9);-moz-border-radius:12px;-webkit-border-radius:12px;border-radius:12px}.diagnostics-main-area .quality-indicator.wide[title]:before{left:-16px;width:32px}.diagnostics-main-area [data-result],.diagnostics-main-area .bandwidth-box{display:none}.diagnostics-main-area [data-action=bandwidth-launcher]{margin:5px 0 10px}.diagnostics-main-area li{padding-bottom:10px}.diagnostics-main-area .intro{margin-bottom:20px}.diagnostics-main-area .intro label{display:inline-block;width:150px}table.datatable [class^=\"icon-\"]{padding:0}table.datatable td{font-size:90%;font-weight:normal}table.datatable .progress .state:not(:first-child):before{content:' - '}table.datatable .progress .item-time:before{content:' ('}table.datatable .progress .item-time .total:before{content:' / '}table.datatable .progress .item-time:after{content:')'}.details table.matrix{border:1px solid #ddd;border-radius:2px;-webkit-border-radius:2px;margin-top:5px}.details table.matrix td:first-child{min-width:30%}.diagnostic-scope h1{font-family:\"Source Sans Pro\",sans-serif;font-size:22px;font-size:2.2rem;font-weight:normal}.diagnostic-scope h2{font-family:\"Source Sans Pro\",sans-serif;font-size:18px;font-size:1.8rem;margin:30px 0 10px}.diagnostic-scope form.daterange label{padding:0}.diagnostic-scope form.daterange input{margin:0 10px}.diagnostic-scope table.datatable [class^=\"icon-\"]{padding:0}.diagnostic-scope table.datatable td{font-size:90%;font-weight:normal}.diagnostic-scope .content{margin:auto}.diagnostic-scope .diagnostic-index .content,.diagnostic-scope .diagnostic-runner .content{width:100%}.diagnostic-scope .diagnostic-index .message,.diagnostic-scope .diagnostic-runner .message{padding:8px;text-align:center}.diagnostic-scope .panel .action-bar{background:#266d9c;padding:3px;overflow:hidden;color:#e7eff4}.diagnostic-scope .panel .action-bar .btn-info{overflow:hidden;background:transparent;border:1px rgba(255,255,255,0.3) solid}.diagnostic-scope .diagnostics-main-area{margin-top:0px;max-width:800px}.diagnostic-scope .detailed-value{display:flex;justify-content:space-between}.diagnostic-scope .detailed-value.errors{color:#d8ae5b}.diagnostic-scope .detailed-value .details{font-size:2rem;cursor:pointer;color:#3e7da7}.diagnostic-scope .detailed-value .details:hover{color:#03131d}.action-bar .tool-exitButton,.action-bar [data-control=\"exitButton\"]{float:right}\n\n/*# sourceMappingURL=../../../taoClientDiagnostic/views/css/diagnostics.css.map */"),define("taoClientDiagnostic/loader/diagnostic.bundle",function(){}),window.bundles=(window.bundles||[]).concat(["taoQtiItem/loader/taoQtiItem.min","taoItems/loader/taoItems.min"]);
//# sourceMappingURL=diagnostic.min.js.map