/** * @license RequireJS text 2.0.10 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved. * Available via the MIT or new BSD license. * see: http://github.com/requirejs/text for details */ /*! @source http://purl.eligrey.com/github/l10n.js/blob/master/l10n.js*/ /** * @name Elasticnode widgets * @description Main widget file: config & initialization * @author Anton Golub * @copyright 2014 * @license MIT * @version 0.0.1 * @class main */ (function(){var e,t,n,r,i,o,a;e="table[data-sortable]",r=/^-?[£$¤]?[\d,.]+%?$/,a=/^\s+|\s+$/g,o="ontouchstart"in document.documentElement,n=o?"touchstart":"click",t=function(e,t,n){return null!=e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)},i={init:function(t){var n,r,o,a,s;for(null==t&&(t={}),null==t.selector&&(t.selector=e),r=document.querySelectorAll(t.selector),s=[],o=0,a=r.length;a>o;o++)n=r[o],s.push(i.initTable(n));return s},initTable:function(e){var t,n,r,o,a,s;if(1===(null!=(s=e.tHead)?s.rows.length:void 0)&&"true"!==e.getAttribute("data-sortable-initialized")){for(e.setAttribute("data-sortable-initialized","true"),r=e.querySelectorAll("th"),t=o=0,a=r.length;a>o;t=++o)n=r[t],"false"!==n.getAttribute("data-sortable")&&i.setupClickableTH(e,n,t);return e}},setupClickableTH:function(e,r,o){var a;return a=i.getColumnType(e,o),t(r,n,function(){var t,n,s,l,c,u,d,h,f,p,g,m,w,A,b,y;for(c="true"===this.getAttribute("data-sorted"),u=this.getAttribute("data-sorted-direction"),t=c?"ascending"===u?"descending":"ascending":a.defaultSortDirection,h=this.parentNode.querySelectorAll("th"),f=0,m=h.length;m>f;f++)r=h[f],r.setAttribute("data-sorted","false"),r.removeAttribute("data-sorted-direction");for(this.setAttribute("data-sorted","true"),this.setAttribute("data-sorted-direction",t),d=e.tBodies[0],s=[],b=d.rows,p=0,w=b.length;w>p;p++)n=b[p],s.push([i.getNodeValue(n.cells[o]),n]);for(c?s.reverse():s.sort(a.compare),y=[],g=0,A=s.length;A>g;g++)l=s[g],y.push(d.appendChild(l[1]));return y})},getColumnType:function(e,t){var n,o,a,s,l;for(l=e.tBodies[0].rows,a=0,s=l.length;s>a;a++)if(n=l[a],o=i.getNodeValue(n.cells[t]),""!==o){if(o.match(r))return i.types.numeric;if(!isNaN(Date.parse(o)))return i.types.date}return i.types.alpha},getNodeValue:function(e){return e?null!==e.getAttribute("data-value")?e.getAttribute("data-value"):"undefined"!=typeof e.innerText?e.innerText.replace(a,""):e.textContent.replace(a,""):""},types:{numeric:{defaultSortDirection:"descending",compare:function(e,t){var n,r;return n=parseFloat(e[0].replace(/[^0-9.-]/g,""),10),r=parseFloat(t[0].replace(/[^0-9.-]/g,""),10),isNaN(n)&&(n=0),isNaN(r)&&(r=0),r-n}},alpha:{defaultSortDirection:"ascending",compare:function(e,t){return e[0].localeCompare(t[0])}},date:{defaultSortDirection:"ascending",compare:function(e,t){var n,r;return n=Date.parse(e[0]),r=Date.parse(t[0]),isNaN(n)&&(n=0),isNaN(r)&&(r=0),n-r}}}},setTimeout(i.init,0),window.Sortable=i}).call(this),define("sortable",function(){}),define("utils",["framework","underscore"],function(e,t){return{strictBool:function(e,t){return"boolean"==typeof e?e:!!t},isx64:function(){return"MacIntel"===window.navigator.platform||"Linux x86_64"===window.navigator.platform||navigator.userAgent.indexOf("WOW64")>-1||"Win64"===window.navigator.platform||!1},sum:function(n){return e.isArray(n)&&0!==n.length?t.reduce(n,function(e,t){return e+t}):0},sortBy:function(e,n,r,i){if("object"==typeof e&&n){var o="string"==typeof n?function(e){return"function"==typeof e[n]?e[n]():e[n]||e}:"string"==typeof r?function(e){return e[r]}:function(e){return e},a=function(e){var n=o(e),r=["avg".toLocaleString(),"yearSlice".toLocaleString()];return t.contains(r,n)?"00"+n:n},s=i?a:o;return t.sortBy(e,s)}return e},getCacheSize:function(e){return this.getCacheScope(e).cacheSize},setCacheSize:function(e,t,n){var r=this.getCacheScope(t),i=1048576,o=isNaN(e)||"number"!=typeof e?i*(this.strictBool(n,this.isx64())?1:.25):e>20*i?20*i:0>e?0:e;return"number"==typeof r.cacheSize?this.freeCacheSpace(r,r.cacheSize-o):r.cacheRest=o,r.cacheSize=o,o},freeCacheSpace:function(e,t){var n,r=this.getCacheScope(e),i=this.getCache(r),o=r.cacheRest,a=r.cacheSize;if(a&&"number"==typeof t&&t>0){if(t>=a)this.flushCache(r);else for(;t>o;)n=r.cacheStack.shift(),o+=n.size,delete i[n.key];r.cacheRest=o}return o},getCacheScope:function(e){return"object"==typeof e?e:this.getDefaultCacheScope()},getDefaultCacheScope:function(){return"object"!=typeof window.Enw&&(window.Enw={}),window.Enw},getCache:function(e){var t=this.getCacheScope(e);return t.cache||(t.cache={},t.cacheStack=[],this.setCacheSize(this.getCacheSize(t),t)),t.cache},getCacheRest:function(e){var t=this.getCacheScope(e);return t.cacheRest},setToCache:function(e,t,n){var r=this.getCacheScope(n),i=this.getCache(n),o=r.cacheSize,a=this.sizeOf(t);return this.delFromCache(e,r),o>=a&&e&&(a>r.cacheRest&&this.freeCacheSpace(r,a),i[e]=t,r.cacheStack.push({key:e,size:a}),r.cacheRest-=a),t},getFromCache:function(e,t){return e?this.getCache(t)[e]:void 0},delFromCache:function(e,n){var r=this.getCacheScope(n),i=this.getCache(r),o=r.cacheStack;e&&i[e]&&(delete i[e],t.each(o,function(t,n){return t.key===e?(r.cacheRest+=t.size,void(o=o.splice(n,1))):void 0}))},flushCache:function(e){var t=this.getCacheScope(e);delete t.cache,delete t.cacheRest,delete t.cacheStack,delete t.cacheSize},replace:function(e,t,n){if(arguments.length>2)if(e instanceof Array){var r;for(r=e.length;r;r-=1)e[r-1]===t&&(e[r-1]=n)}else if("string"==typeof e)return e.replace(t,n);return e},sizeOf:function(e){var t,n,r,i,o=[e],a=0;for(t=0;t/im,l=/]*>\s*([\s\S]+)\s*<\/body>/im,c="undefined"!=typeof location&&location.href,u=c&&location.protocol&&location.protocol.replace(/\:/,""),d=c&&location.hostname,h=c&&(location.port||void 0),f={},p=e.config&&e.config()||{};return t={version:"2.0.10",strip:function(e){if(e){e=e.replace(s,"");var t=e.match(l);t&&(e=t[1])}else e="";return e},jsEscape:function(e){return e.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:p.createXhr||function(){var e,t,n;if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;if("undefined"!=typeof ActiveXObject)for(t=0;3>t;t+=1){n=a[t];try{e=new ActiveXObject(n)}catch(r){}if(e){a=[n];break}}return e},parseName:function(e){var t,n,r,i=!1,o=e.indexOf("."),a=0===e.indexOf("./")||0===e.indexOf("../");return-1!==o&&(!a||o>1)?(t=e.substring(0,o),n=e.substring(o+1,e.length)):t=e,r=n||t,o=r.indexOf("!"),-1!==o&&(i="strip"===r.substring(o+1),r=r.substring(0,o),n?n=r:t=r),{moduleName:t,ext:n,strip:i}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(e,n,r,i){var o,a,s,l=t.xdRegExp.exec(e);return l?(o=l[2],a=l[3],a=a.split(":"),s=a[1],a=a[0],!(o&&o!==n||a&&a.toLowerCase()!==r.toLowerCase()||(s||a)&&s!==i)):!0},finishLoad:function(e,n,r,i){r=n?t.strip(r):r,p.isBuild&&(f[e]=r),i(r)},load:function(e,n,r,i){if(i.isBuild&&!i.inlineText)return void r();p.isBuild=i.isBuild;var o=t.parseName(e),a=o.moduleName+(o.ext?"."+o.ext:""),s=n.toUrl(a),l=p.useXhr||t.useXhr;return 0===s.indexOf("empty:")?void r():void(!c||l(s,u,d,h)?t.get(s,function(n){t.finishLoad(e,o.strip,n,r)},function(e){r.error&&r.error(e)}):n([a],function(e){t.finishLoad(o.moduleName+"."+o.ext,o.strip,e,r)}))},write:function(e,n,r){if(f.hasOwnProperty(n)){var i=t.jsEscape(f[n]);r.asModule(e+"!"+n,"define(function () { return '"+i+"';});\n")}},writeFile:function(e,n,r,i,o){var a=t.parseName(n),s=a.ext?"."+a.ext:"",l=a.moduleName+s,c=r.toUrl(a.moduleName+s)+".js";t.load(l,r,function(){var n=function(e){return i(c,e)};n.asModule=function(e,t){return i.asModule(e,c,t)},t.write(e,l,n,o)},o)}},"node"===p.env||!p.env&&"undefined"!=typeof process&&process.versions&&process.versions.node&&!process.versions["node-webkit"]?(n=require.nodeRequire("fs"),t.get=function(e,t,r){try{var i=n.readFileSync(e,"utf8");0===i.indexOf("")&&(i=i.substring(1)),t(i)}catch(o){r(o)}}):"xhr"===p.env||!p.env&&t.createXhr()?t.get=function(e,n,r,i){var o,a=t.createXhr();if(a.open("GET",e,!0),i)for(o in i)i.hasOwnProperty(o)&&a.setRequestHeader(o.toLowerCase(),i[o]);p.onXhr&&p.onXhr(a,e),a.onreadystatechange=function(){var t,i;4===a.readyState&&(t=a.status,t>399&&600>t?(i=new Error(e+" HTTP status: "+t),i.xhr=a,r(i)):n(a.responseText),p.onXhrComplete&&p.onXhrComplete(a,e))},a.send(null)}:"rhino"===p.env||!p.env&&"undefined"!=typeof Packages&&"undefined"!=typeof java?t.get=function(e,t){var n,r,i="utf-8",o=new java.io.File(e),a=java.lang.System.getProperty("line.separator"),s=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(o),i)),l="";try{for(n=new java.lang.StringBuffer,r=s.readLine(),r&&r.length()&&65279===r.charAt(0)&&(r=r.substring(1)),null!==r&&n.append(r);null!==(r=s.readLine());)n.append(a),n.append(r);l=String(n.toString())}finally{s.close()}t(l)}:("xpconnect"===p.env||!p.env&&"undefined"!=typeof Components&&Components.classes&&Components.interfaces)&&(r=Components.classes,i=Components.interfaces,Components.utils["import"]("resource://gre/modules/FileUtils.jsm"),o="@mozilla.org/windows-registry-key;1"in r,t.get=function(e,t){var n,a,s,l={};o&&(e=e.replace(/\//g,"\\")),s=new FileUtils.File(e);try{n=r["@mozilla.org/network/file-input-stream;1"].createInstance(i.nsIFileInputStream),n.init(s,1,0,!1),a=r["@mozilla.org/intl/converter-input-stream;1"].createInstance(i.nsIConverterInputStream),a.init(n,"utf-8",n.available(),i.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER),a.readString(n.available(),l),a.close(),n.close(),t(l.value)}catch(c){throw new Error((s&&s.path||"")+": "+c)}}),t}),define("text!templates/partials/title.hbs",[],function(){return"{{#if this}}\n {{l10n this}}\n{{/if}}"}),define("assets/ifCondHelper",["handlebars"],function(e){var t=function(e,t,n){return e===t?n.fn(this):n.inverse(this)};return e.registerHelper("ifCond",t),t}),function(){var e,t,n="undefined",r="string",i=self.navigator,o=String,a=Object.prototype.hasOwnProperty,s={},l={},c=!1,u=!0,d=/^\s*application\/(?:vnd\.oftn\.|x-)?l10n\+json\s*(?:$|;)/i,h="locale",f="defaultLocale",p="toLocaleString",g="toLowerCase",m=Array.prototype.indexOf||function(e){for(var t=this.length,n=0;t>n;n++)if(n in this&&this[n]===e)return n;return-1},w=function(t){var n=new e;return n.open("GET",t,c),n.send(null),200!==n.status?(setTimeout(function(){var e=new Error("Unable to load localization data: "+t);throw e.name="Localization Error",e},0),{}):JSON.parse(n.responseText)},A=o[p]=function(e){if(arguments.length>0&&"number"!=typeof e)if(typeof e===r)A(w(e));else if(e===c)l={};else{var t,n,i;for(t in e)if(a.call(e,t)){if(n=e[t],t=t[g](),t in l&&n!==c||(l[t]={}),n===c)continue;if(typeof n===r){if(0!==o[h][g]().indexOf(t)){t in s||(s[t]=[]),s[t].push(n);continue}n=w(n)}for(i in n)a.call(n,i)&&(l[t][i]=n[i])}}return Function.prototype[p].apply(o,arguments)},b=function(e){for(var t,n=s[e],r=0,i=n.length;i>r;r++)t={},t[e]=w(n[r]),A(t);delete s[e]},y=o.prototype[p]=function(){if(typeof this===n)return this;var e,r=t,i=o[r?f:h],a=i[g]().split("-"),d=a.length,p=this.valueOf();t=c;do if(e=a.slice(0,d).join("-"),e in s&&b(e),e in l&&p in l[e])return l[e][p];while(d-->1);return!r&&o[f]?(t=u,y.call(p)):p};if(typeof XMLHttpRequest===n&&typeof ActiveXObject!==n){var v=ActiveXObject;e=function(){try{return new v("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new v("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new v("Msxml2.XMLHTTP")}catch(n){}throw new Error("XMLHttpRequest not supported by this browser.")}}else e=XMLHttpRequest;if(o[f]=o[f]||"",o[h]=i&&(i.language||i.userLanguage)||"",typeof document!==n)for(var x,C=document.getElementsByTagName("link"),S=C.length;S--;){var _=C[S],k=(_.getAttribute("rel")||"")[g]().split(/\s+/);d.test(_.type)&&(-1!==m.call(k,"localizations")?A(_.getAttribute("href")):-1!==m.call(k,"localization")&&(x={},x[(_.getAttribute("hreflang")||"")[g]()]=_.getAttribute("href"),A(x)))}}(),define("l10n",function(e){return function(){var t;return t||e.l10n}}(this)),define("text!localization/localization.json",[],function(){return'{\n "en": {\n "avg": "Average",\n "avgSchool": "Sch.avg",\n "failMark": "Failed",\n "exMark": "Ex.",\n "excellent": "Excellent",\n "failed": "Failed",\n "female": "Female",\n "limit": "Limit",\n "male": "Male",\n "max": "Max",\n "maximum": "Maximum",\n "min": "Min",\n "minimum": "Minimum",\n "passed": "Passed",\n "population": "Population",\n "RF": "RF",\n "subject": "Subject",\n "threshold": "Threshold",\n "total": "Total",\n "weightedAvg": "Weighted average",\n "weightedAvgMathRus":"Weighted average Math & Rus",\n "weightedAvgFull": "Weighted average normalized exam result",\n "weightedAvgMathRusFull": "Weighted normalized exam result in Russian and Mathematics",\n\n \n "algebra": "Algebra",\n "biology": "Biology",\n "calligraphy": "Calligraphy",\n "chemistry": "Chemistry",\n "civics": "Civics",\n "english": "English",\n "french": "French",\n "geography": "Geography",\n "geometry": "Geometry",\n "german": "German",\n "history": "History",\n "informatics": "Informatics",\n "jurisprudence": "Jurisprudence",\n "laborTechnology": "Labor technology",\n "literature": "Literature",\n "localHistory": "Local history",\n "math": "Mathematics",\n "mechDrawing": "Mech. drawing",\n "music": "Music",\n "natureStudy": "Nature study",\n "painting": "Painting",\n "physics": "Physics",\n "physicalTraining": "Physical training",\n "reading": "Reading",\n "russian": "Russian",\n "socialscience": "Soc. science",\n\n\n "yearSlice": "Slice by years",\n "score": "Score",\n "sou": "SOU",\n "souTitle": "Degree of training (SOU)",\n "egeTitle": "Unified State Exam (EGE)",\n "giaTitle": "State (final) attestation (GIA)",\n "populationTitle": "Population",\n\n\n "choice": "Choice",\n "school": "School",\n "district": "District",\n "region": "Region",\n "country": "Country",\n "whoChose": "Who chose",\n\n\n "notFoundMsg": "No content found",\n "connectionErrorMsg": "Connection error"\n },\n "ru": {\n "avg": "Средн.",\n "avgSchool": "Ср.шк.",\n "failMark": "Неуд.",\n "exMark": "Отл.",\n "excellent": "Отлично",\n "failed": "Не сдали",\n "female": "Жен.",\n "limit": "Лимит",\n "male": "Муж.",\n "max": "Макс.",\n "maximum": "Максимум",\n "min": "Мин.",\n "minimum": "Минимум",\n "passed": "Сдали",\n "population": "Численность, чел.",\n "RF": "РФ",\n "subject": "Дисциплина",\n "threshold": "Порог",\n "total": "Всего",\n "weightedAvg": "Средневзвеш.",\n "weightedAvgMathRus":"Средневзвеш. матем. и рус.яз",\n "weightedAvgFull": "Средневзвешенная нормированная экзаменационная оценка",\n "weightedAvgMathRusFull": "Средневзвешенный нормированный балл экзаменов по русскому языку и математике",\n\n\n "algebra": "Алгебра",\n "biology": "Биология",\n "calligraphy": "Чистописание",\n "chemistry": "Химия",\n "civics": "Граждановедение",\n "english": "Английский яз.",\n "french": "Французский яз.",\n "geography": "География",\n "geometry": "Геометрия",\n "german": "Немецкий яз.",\n "history": "История",\n "informatics": "Информатика",\n "jurisprudence": "Правоведение",\n "laborTechnology": "Труд и технология",\n "literature": "Литература",\n "localHistory": "Краеведение",\n "math": "Математика",\n "mechDrawing": "Черчение",\n "music": "Музыка (пение)",\n "natureStudy": "Естествознание",\n "painting": "Изобр. искусство",\n "physics": "Физика",\n "physicalTraining": "Физкультура",\n "reading": "Чтение",\n "russian": "Русский язык",\n "socialscience": "Обществознание",\n\n\n "sou": "СОУ",\n "souTitle": "Степень обученности учащихся",\n "egeTitle": "Единый государственный экзамен (11-й класс)",\n "giaTitle": "Государственная итоговая аттестация (9-й класс)",\n "populationTitle": "Численность учащихся",\n "yearSlice": "Срез по годам",\n "score": "Балл",\n \n\n "choice": "Выбран",\n "school": "Школа",\n "district": "Район",\n "region": "Регион",\n "country": "Страна",\n "whoChose": "Доля выбравших",\n\n "notFoundMsg": "Нет сведений по запросу",\n "connectionErrorMsg": "Ошибка соединения"\n }\n}\n\n'}),define("assets/localizationHelper",["handlebars","framework","l10n","text!localization/localization.json"],function(e,t,n,r){String.toLocaleString(t.parseJSON(r));var i=function(e,t){return e=(e+"").toLocaleString(),t&&t.fn?t.fn(e):e};return e.registerHelper("l10n",i),i}),define("assets/titleHelper",["handlebars","utils","text!templates/partials/title.hbs","assets/ifCondHelper","assets/localizationHelper"],function(e,t,n){return t.getFromCache("titleTpl")||t.setToCache("titleTpl",e.compile(n))}),define("text!templates/partials/menu.hbs",[],function(){return'\n\n\n\n\n{{#sortBy this "toLocaleString" true true}}\n {{#each this}}\n {{l10n this}}\n {{/each}}\n{{/sortBy}}\n\n\n'}),define("assets/sortByHelper",["handlebars","utils"],function(e,t){var n=function(e,n,r,i){var o=t.sortBy(e,n,t.strictBool(r),t.strictBool(i)),a=arguments[arguments.length-1];return a&&a.fn?a.fn(o):o};return e.registerHelper("sortBy",n),n}),define("assets/menuHelper",["handlebars","text!templates/partials/menu.hbs","assets/localizationHelper","assets/sortByHelper"],function(e,t){e.registerPartial("menu",t)}),define("normalize",[],function(){function e(e,r,i){if(e.match(s)||e.match(a))return e;e=o(e);var l=i.match(a),c=r.match(a);return!c||l&&l[1]==c[1]&&l[2]==c[2]?n(t(e,r),i):t(e,r)}function t(e,t){if("./"==e.substr(0,2)&&(e=e.substr(2)),e.match(s)||e.match(a))return e;var n=t.split("/"),r=e.split("/");for(n.pop();curPart=r.shift();)".."==curPart?n.pop():n.push(curPart);return n.join("/")}function n(e,t){var n=t.split("/");for(n.pop(),t=n.join("/")+"/",i=0;t.substr(i,1)==e.substr(i,1);)i++;for(;"/"!=t.substr(i,1);)i--;t=t.substr(i+1),e=e.substr(i+1),n=t.split("/");var r=e.split("/");for(out="";n.shift();)out+="../";for(;curPart=r.shift();)out+=curPart+"/";return out.substr(0,out.length-1)}var r=/([^:])\/+/g,o=function(e){return e.replace(r,"$1/")},a=/[^\:\/]*:\/\/([^\/])*/,s=/^(\/|data:)/,l=function(t,n,r){n=o(n),r=o(r);for(var i,a,t,s=/@import\s*("([^"]*)"|'([^']*)')|url\s*\(\s*(\s*"([^"]*)"|'([^']*)'|[^\)]*\s*)\s*\)/gi;i=s.exec(t);){a=i[3]||i[2]||i[5]||i[6]||i[4];var l;l=e(a,n,r);var c=i[5]||i[6]?1:0;t=t.substr(0,s.lastIndex-a.length-c-1)+l+t.substr(s.lastIndex-c-1),s.lastIndex=s.lastIndex+(l.length-a.length)}return t};return l.convertURIBase=e,l.absoluteURI=t,l.relativeURI=n,l}),define("css",[],function(){if("undefined"==typeof window)return{load:function(e,t,n){n()}};var e=document.getElementsByTagName("head")[0],t=window.navigator.userAgent.match(/Trident\/([^ ;]*)|AppleWebKit\/([^ ;]*)|Opera\/([^ ;]*)|rv\:([^ ;]*)(.*?)Gecko\/([^ ;]*)|MSIE\s([^ ;]*)/)||0,n=!1,r=!0;t[1]||t[7]?n=parseInt(t[1])<6||parseInt(t[7])<=9:t[2]?r=!1:t[4]&&(n=parseInt(t[4])<18);var i={};i.pluginBuilder="./css-builder";var o,a,s,l=function(){o=document.createElement("style"),e.appendChild(o),a=o.styleSheet||o.sheet},c=0,u=[],d=function(e){c++,32==c&&(l(),c=0),a.addImport(e),o.onload=h},h=function(){s();var e=u.shift();e&&(s=e[1],d(e[0]))},f=function(e,t){if(a&&a.addImport||l(),a&&a.addImport)s?u.push([e,t]):(d(e),s=t);else{o.textContent='@import "'+e+'";';var n=setInterval(function(){try{o.sheet.cssRules,clearInterval(n),t()}catch(e){}},10)}},p=function(t,n){var i=document.createElement("link");if(i.type="text/css",i.rel="stylesheet",r)i.onload=function(){i.onload=function(){},setTimeout(n,7)};else var o=setInterval(function(){for(var e=0;e0},selectMenuItem:function(e,t){var n="enw__menu__link--active",i=r(e instanceof Object?e:'*[data-href="'+e+'"]');switch(!!n){case!!i.size():return i.addClass(n).siblings().removeClass(n),!0;case t instanceof r.fn.constructor:return t.children().removeClass(n),!0;default:return!1}},setMode:function(e){var t=this.mode||{},n=o.keys(t),r=function(){var e={},t=arguments;return o.each(n,function(n,r){e[n]=t[r]}),e},i=o.pick.apply(this,[o.defaults("object"==typeof e?e:r.apply(this,arguments),t)].concat(n));return o.isEqual(this.mode,i)?!1:(this.mode=i,i)},switchModeDelayed:function(){return this.delayedSetModeArgs&&this.delayedSetModeArgs.length&&this.switchMode?(this.switchMode.apply(this,this.delayedSetModeArgs),this.delayedSetModeArgs=void 0,!0):!1},showMsg:function(e){var t=".enw__msgbox",n=".enw__content",r="enw--hidden",i=this.$el.find(t),o=this.$el.find(n),a={notFound:"notFoundMsg".toLocaleString(),connectionError:"connectionErrorMsg".toLocaleString()};return e=a[e]||e,o.toggleClass(r,!!e),i.toggleClass(r,!e).html(e),e},showMessage:function(){return this.showMsg.apply(this,arguments)},initRelatedView:function(e,t,n){if(!this[e]&&t&&e&&n){var r=this.$el.find(n).get(0);r&&(this[e]=new(t.extend({widget:this}))({el:r}))}return this[e]},switchRelatedView:function(e,t){var n=t||"enw--displaynone";return e instanceof r.fn.constructor?e.removeClass(n).siblings().addClass(n):!1}})}),define("text!templates/defaultTpl.hbs",[],function(){return'
\n

\n
\n
\n
'}),define("views/chartView",["backbone","framework","highcharts","underscore"],function(e,t,n,r){var i="#000",o="#FFF",a="#FFF",s="#777",l="#EEE",c=".enw__widget";return e.View.extend({type:"spline",redraw:function(e){if(this.chart){var t=this;setTimeout(function(){t.chart.redraw()},parseInt(e,10)||50)}},initialize:function(){this.self=this},getWidget:function(){return this.widget},create:function(e,r,i){return!this.chart&&(e=t(e||this.$el))?(i=t.extend(!0,{getWidget:t.proxy(this.getWidget,this),chart:{renderTo:e.get(0),width:e.closest(c).width()}},this.chartOptions.defaults,this.chartOptions[r||this.type],this.options,i),this.chart=new n.Chart(i),this.chart):null},flush:function(){return this.chart=null,null},render:function(){return this.create(),this.update.apply(this,arguments),this},update:function(){return!0},updateSeries:function(e,t){var n,r=this.chart.series[t||0];if(r){if(r.data&&r.data.length)for(n=0;nt)for(n=i;n>t;)this.chart.series[n-1].remove(!1),n-=1;else for(;n>i;)n-=1,this.chart.addSeries({},!1);return r.map(arguments,function(t,n){var r=e.chart.series[n];return r.update(t.data?t:{data:t},!1),r})},chartOptions:{defaults:{chart:{backgroundColor:o},credits:{enabled:!1},legend:{borderColor:a,itemStyle:{fontWeight:"normal"}},title:{text:"",style:{color:i,fontSize:"normal"}}},column:{colors:["#0d233a","#d4d8e7"],chart:{type:"column",height:300},credits:{enabled:!1},legend:{borderColor:"#FFF"},title:{text:"",style:{color:"#000"}},yAxis:{title:{text:"Показатель, %",style:{color:"#777",fontWeight:"normal"}},gridLineColor:"#EEE"},xAxis:{title:{text:"Параллель",style:{color:"#777",fontWeight:"normal"}}},plotOptions:{column:{pointPadding:0,borderWidth:0,animation:!0}},tooltip:{enabled:!0,formatter:function(){return""+this.series.chart.options.series[this.series._i].name+("-"+this.x).toLowerCase()+"
"+this.y.toPrecision(3)+"%"}}},spline:{chart:{type:"spline"},xAxis:{type:"linear",categories:[]},yAxis:{title:{text:"%",style:{color:s,fontWeight:"normal"}},gridLineColor:l},tooltip:{formatter:function(){return""+this.series.name+"
"+this.x+": "+this.y.toPrecision(3)}},plotOptions:{spline:{dataLabels:{enabled:!1},enableMouseTracking:!0},series:{cursor:"pointer",marker:{lineWidth:1}}}},pie:{chart:{type:"pie",height:280},yAxis:{title:{text:"Проценты",style:{color:"#777",fontWeight:"normal"}}},plotOptions:{pie:{shadow:!1,center:["50%","50%"]}},tooltip:{formatter:function(){return""+this.point.name+"
"+this.y.toPrecision(3)+"%"}}}}})}),define("views/tableView",["backbone","framework","handlebars","sortable"],function(e,t,n){return e.View.extend({create:function(){return!this.table&&this.template&&(this.table=this.$el.append(n.compile(this.template)()).find("table"),"string"==typeof this.rowTemplate&&(this.rowTemplate=n.compile(this.rowTemplate)),this.afterRender()),this.table},update:function(){return!0},render:function(){return this.create(),this.update.apply(this,arguments),this},afterRender:function(){},initSortable:function(){return Sortable&&this.table?(Sortable.initTable(this.table.get(0)),!0):!1}})}),define("modules/mainPack",["framework","underscore","backbone","handlebars","highcharts","hcadapter","sortable","utils","models/defaultModel","views/defaultView","text!templates/defaultTpl.hbs","views/chartView","views/tableView"],function(){return!0}),define("App",["framework","underscore","backbone","modules/mainPack"],function(e,t,n){return function(r){var i,o,a,s=this,l=0,c="enw"+(1e5*Math.random()|0),u={},d=function(e){return l=u.status=e,e},h=function(e){return e&&e.$el?(e.undelegateEvents(),e.$el.unbind(),e.$el.remove(),e.remove(),n.View.prototype.remove.call(e),e={},!0):!1},f=function(t,n){var i=function(){return t?(i=function(t){return t&&(h(u),d(0),u=new(t.extend({el:r.$container.get(0),id:c,status:l,host:r.host,title:r.title||t.prototype.title,setStatus:d,delayedSetModeArgs:[].concat(r.mode||u.delayedSetModeArgs)})),(a=e.proxy(u.render,u.self))()),a},require([t],i),i):void 0};return n?require([n],i):i(),i},p=function(){return function(){return f(i,o)}},g=function(n){n=t.extend({},r,n);var a=null,s=["gia","ege","sou","population"];switch(n.type&&!t.contains(s,n.type)&&(a=1),n.host||(a=3),n.interval&&n.interval>0&&n.interval<5&&(n.interval=5,console.warn("Too short interval. It should be at least 5m or 0 if you don't need autoupdate")),n.$container=e(n.container).eq(0),n.$container.length||(a=2),n.type){case"gia":i="views/exams/giaExamsView",o="modules/examsModule";break;case"ege":i="views/exams/examsView",o="modules/examsModule";break;case"sou":i="views/sou/souView",o="modules/souModule";break;case"population":i="views/population/populationView",o="modules/populationModule"}return a?(d(-1),console.warn("Invalid config. See elasticnode.ru/widgets/#error"+a+" for details"),{error:a}):n},m=function(e,n){return e=g(e),e.hasOwnProperty("error")||t.isEqual(e,r)||(r.type!==e.type?(r=e,a=new p):(n.$el&&(e.title&&n.title!==e.title&&(n.title=e.title,n.renderTitle()),r.$container.get(0)!==e.$container.get(0)&&e.$container.after(n.$el.detach()),n.interval=e.interval),e.host&&r.host!==e.host&&(n.host=e.host,n.modelInit()),r=e),n.delayedSetModeArgs=[].concat(e.mode),a()),e};a=new p,s.getStatus=function(){return l},s.getNode=function(){return u.$el||null},s.setConfig=function(e){return m(e,u)},s.setMode=function(){return u.delayedSetModeArgs=arguments,u.switchModeDelayed?(u.switchModeDelayed(),!0):!1},s.destroy=function(){h();var e;for(e in this)this.hasOwnProperty(e)&&delete this[e];return s.ptototype={},d(-1),"Completely destroyed view and object methods (id: "+c+")"},m(void 0,u),s.__testonly__={applyConfig:m,validateConfig:g,setView:function(e){return u=e},getView:function(){return u},getRenderer:function(){return a},getConfig:function(){return r},Loader:p,loadRenderer:f,flushView:h,setStatus:d}}}),function(){var e=document.querySelector&&window.localStorage&&window.addEventListener;require.config({map:{"*":{jquery:"framework"}},paths:{framework:e?["//cdn.jsdelivr.net/zepto/1.1.3/zepto.min","//cdnjs.cloudflare.com/ajax/libs/zepto/1.1.3/zepto.min","../../../bower_components/zepto/zepto"]:["//yandex.st/jquery/1.11.0/jquery.min","//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min","../../../bower_components/jquery/dist/jquery.min"],backbone:["//yandex.st/backbone/1.1.2/backbone-min","//cdn.jsdelivr.net/backbonejs/1.1.2/backbone-min","//cdnjs.cloudflare.com/ajax/libs/backbone.js/1.1.2/backbone-min","../../../bower_components/backbone/backbone"],underscore:["//yandex.st/underscore/1.6.0/underscore-min","//cdn.jsdelivr.net/underscorejs/1.6.0/underscore-min","../../../bower_components/underscore/underscore"],handlebars:["../../../bower_components/handlebars/handlebars"],highcharts:["//cdnjs.cloudflare.com/ajax/libs/highcharts/4.0.1/highcharts","../../../bower_components/highcharts/highcharts"],hcadapter:["//cdn.jsdelivr.net/highcharts/4.0.1/adapters/standalone-framework","//cdnjs.cloudflare.com/ajax/libs/highcharts/4.0.1/adapters/standalone-framework","../../../bower_components/highcharts/adapters/standalone-framework"],l10n:"../../../bower_components/l10n/l10n",sortable:"../../../bower_components/sortable/js/sortable",text:"../../../bower_components/requirejs-text/text",css:"../../../bower_components/require-css/css",assets:"../app/assets",views:"../app/views",models:"../app/models",templates:"../app/templates",localization:"../app/localization",styles:"../../sass",utils:"../app/assets/utils",modules:"../app/modules",App:"../app/app"},shim:{framework:{exports:"$"},underscore:{exports:"_"},handlebars:{exports:"Handlebars"},highcharts:{deps:["framework","hcadapter"],exports:"Highcharts"},backbone:{deps:["underscore","framework"],exports:"Backbone"},l10n:{exports:"l10n"}}}) }(),define(["App"],function(e){var t,n=window.enwCallback;if(window.Enw=e,"[object Array]"===Object.prototype.toString.call(n))for(;n.length;){t=n.pop();try{t()}catch(r){}}}),function(e){var t=document,n="appendChild",r="styleSheet",i=t.createElement("style");i.type="text/css",t.getElementsByTagName("head")[0][n](i),i[r]?i[r].cssText=e:i[n](t.createTextNode(e))}(".enw__table{width:100%}.enw__table th,.enw__table td{padding-right:.5em}.enw__table tbody tr:first-child td{padding-top:1em}.enw__table__header{font-size:smaller}.enw__table__header--alignleft{text-align:left}.enw__table__header th{border-bottom:1px solid #EEE}.enw__menu{padding-bottom:.7em}.enw__menu--primary{width:66%;float:left}.enw__menu--secondary{width:33%;float:right}.enw__menu__link{text-decoration:none;display:inline-block;margin:.3em;padding:.2em 0 0;border-bottom:1px dotted #39f;color:#39f}.enw__menu__link:hover{color:#c00;cursor:pointer;border-bottom-color:#c00}.enw__menu__link--active{cursor:default;border-radius:.3em;margin:.3em 0;padding:.2em .3em 0;color:#000;background:#EEE;border-bottom-color:transparent}.enw__menu__link--active:hover{color:#000;border-bottom-color:transparent}.enw__link{text-decoration:none;border-bottom:1px dotted #39f;color:#39f}.enw__link:hover{color:#c00;cursor:pointer;border-bottom-color:#c00}.enw__title{text-align:center}.enw__summary{font-size:300%;font-weight:bolder;padding-bottom:.25em;float:left}.enw__summary-comment{font-weight:400;font-size:75%;float:left;padding:1em 3em 2em 1em}.enw__msgbox{text-align:center;padding:4em 0 2em;float:left;width:100%}.enw__chart{opacity:.4;width:95%;height:300px;position:relative}.enw__widget{background-position:center center;background-repeat:no-repeat;background-image:url(data:image/gif;base64,R0lGODlhEAAQAPQAAP///5GRkfv7+6mpqcnJyZOTk6Ghoezs7NnZ2ZqamsPDw7y8vPLy8tLS0uXl5a+vr7W1tQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAAACwAAAAAEAAQAAAFUCAgjmRpnqUwFGwhKoRgqq2YFMaRGjWA8AbZiIBbjQQ8AmmFUJEQhQGJhaKOrCksgEla+KIkYvC6SJKQOISoNSYdeIk1ayA8ExTyeR3F749CACH5BAkKAAAALAAAAAAQABAAAAVoICCKR9KMaCoaxeCoqEAkRX3AwMHWxQIIjJSAZWgUEgzBwCBAEQpMwIDwY1FHgwJCtOW2UDWYIDyqNVVkUbYr6CK+o2eUMKgWrqKhj0FrEM8jQQALPFA3MAc8CQSAMA5ZBjgqDQmHIyEAIfkECQoAAAAsAAAAABAAEAAABWAgII4j85Ao2hRIKgrEUBQJLaSHMe8zgQo6Q8sxS7RIhILhBkgumCTZsXkACBC+0cwF2GoLLoFXREDcDlkAojBICRaFLDCOQtQKjmsQSubtDFU/NXcDBHwkaw1cKQ8MiyEAIfkECQoAAAAsAAAAABAAEAAABVIgII5kaZ6AIJQCMRTFQKiDQx4GrBfGa4uCnAEhQuRgPwCBtwK+kCNFgjh6QlFYgGO7baJ2CxIioSDpwqNggWCGDVVGphly3BkOpXDrKfNm/4AhACH5BAkKAAAALAAAAAAQABAAAAVgICCOZGmeqEAMRTEQwskYbV0Yx7kYSIzQhtgoBxCKBDQCIOcoLBimRiFhSABYU5gIgW01pLUBYkRItAYAqrlhYiwKjiWAcDMWY8QjsCf4DewiBzQ2N1AmKlgvgCiMjSQhACH5BAkKAAAALAAAAAAQABAAAAVfICCOZGmeqEgUxUAIpkA0AMKyxkEiSZEIsJqhYAg+boUFSTAkiBiNHks3sg1ILAfBiS10gyqCg0UaFBCkwy3RYKiIYMAC+RAxiQgYsJdAjw5DN2gILzEEZgVcKYuMJiEAOwAAAAAAAAAAAA==);color:#000;width:inherit}.enw__widget--complete{background-image:none}.enw__widget--complete .enw__chart{opacity:1}.enw__content{min-height:300px;width:100%;position:relative;float:left}.enw--hidden{visibility:hidden;display:none}.enw--displaynone{display:none}.enw--halfwidth{width:50%;float:left}.enw--quarterwidth{width:25%;float:left}");