"use strict";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function e(e,t){for(var i=0;i0)for(i in wn)n=wn[i],s=t[n],b(s)||(e[n]=s);return e}function _(e){v(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),yn===!1&&(yn=!0,i.updateOffset(this),yn=!1)}function w(e){return e instanceof _||null!=e&&null!=e._isAMomentObject}function y(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function R(e){var t=+e,i=0;return 0!==t&&isFinite(t)&&(i=y(t)),i}function k(e,t,i){var n,s=Math.min(e.length,t.length),a=Math.abs(e.length-t.length),r=0;for(n=0;n0?"future":"past"];return D(i)?i(t):i.replace(/%s/i,t)}function I(e,t){var i=e.toLowerCase();Yn[i]=Yn[i+"s"]=Yn[t]=e}function L(e){return"string"==typeof e?Yn[e]||Yn[e.toLowerCase()]:void 0}function N(e){var t,i,n={};for(i in e)u(e,i)&&(t=L(i),t&&(n[t]=e[i]));return n}function A(e,t){Pn[e]=t}function E(e){var t=[];for(var i in e)t.push({unit:i,priority:Pn[i]});return t.sort(function(e,t){return e.priority-t.priority}),t}function V(e,t){return function(n){return null!=n?(H(this,e,n),i.updateOffset(this,t),this):W(this,e)}}function W(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function H(e,t,i){e.isValid()&&e._d["set"+(e._isUTC?"UTC":"")+t](i)}function U(e){return e=L(e),D(this[e])?this[e]():this}function z(e,t){if("object"==typeof e){e=N(e);for(var i=E(e),n=0;n=0;return(a?i?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+n}function q(e,t,i,n){var s=n;"string"==typeof n&&(s=function(){return this[n]()}),e&&(In[e]=s),t&&(In[t[0]]=function(){return B(s.apply(this,arguments),t[1],t[2])}),i&&(In[i]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function Z(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function J(e){var t,i,n=e.match(Tn);for(t=0,i=n.length;t=0&&On.test(e);)e=e.replace(On,i),On.lastIndex=0,n-=1;return e}function X(e,t,i){ts[e]=D(t)?t:function(e,n){return e&&i?i:t}}function ee(e,t){return u(ts,e)?ts[e](t._strict,t._locale):new RegExp(te(e))}function te(e){return ie(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,i,n,s){return t||i||n||s}))}function ie(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ne(e,t){var i,n=t;for("string"==typeof e&&(e=[e]),o(t)&&(n=function(e,i){i[t]=R(e)}),i=0;i=0&&isFinite(o.getFullYear())&&o.setFullYear(e),o}function ye(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function Re(e,t,i){var n=7+t-i,s=(7+ye(e,0,n).getUTCDay()-t)%7;return-s+n-1}function ke(e,t,i,n,s){var a,r,o=(7+i-n)%7,l=Re(e,n,s),c=1+7*(t-1)+o+l;return c<=0?(a=e-1,r=be(a)+c):c>be(e)?(a=e+1,r=c-be(e)):(a=e,r=c),{year:a,dayOfYear:r}}function xe(e,t,i){var n,s,a=Re(e.year(),t,i),r=Math.floor((e.dayOfYear()-a-1)/7)+1;return r<1?(s=e.year()-1,n=r+Ge(s,t,i)):r>Ge(e.year(),t,i)?(n=r-Ge(e.year(),t,i),s=e.year()+1):(s=e.year(),n=r),{week:n,year:s}}function Ge(e,t,i){var n=Re(e,t,i),s=Re(e+1,t,i);return(be(e)-n+s)/7}function Se(e){return xe(e,this._week.dow,this._week.doy).week}function De(){return this._week.dow}function Ce(){return this._week.doy}function Me(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function je(e){var t=xe(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function $e(e,t){return"string"!=typeof e?e:isNaN(e)?(e=t.weekdaysParse(e),"number"==typeof e?e:null):parseInt(e,10)}function Ye(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Pe(e,t){return e?s(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:this._weekdays}function Te(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Oe(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Fe(e,t,i){var n,s,a,r=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)a=f([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(a,"").toLocaleLowerCase();return i?"dddd"===t?(s=fs.call(this._weekdaysParse,r),s!==-1?s:null):"ddd"===t?(s=fs.call(this._shortWeekdaysParse,r),s!==-1?s:null):(s=fs.call(this._minWeekdaysParse,r),s!==-1?s:null):"dddd"===t?(s=fs.call(this._weekdaysParse,r),s!==-1?s:(s=fs.call(this._shortWeekdaysParse,r),s!==-1?s:(s=fs.call(this._minWeekdaysParse,r),s!==-1?s:null))):"ddd"===t?(s=fs.call(this._shortWeekdaysParse,r),s!==-1?s:(s=fs.call(this._weekdaysParse,r),s!==-1?s:(s=fs.call(this._minWeekdaysParse,r),s!==-1?s:null))):(s=fs.call(this._minWeekdaysParse,r),s!==-1?s:(s=fs.call(this._weekdaysParse,r),s!==-1?s:(s=fs.call(this._shortWeekdaysParse,r),s!==-1?s:null)))}function Ie(e,t,i){var n,s,a;if(this._weekdaysParseExact)return Fe.call(this,e,t,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(s=f([2e3,1]).day(n),i&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(s,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(s,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(s,"").replace(".",".?")+"$","i")),this._weekdaysParse[n]||(a="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[n]=new RegExp(a.replace(".",""),"i")),i&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(i&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(i&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!i&&this._weekdaysParse[n].test(e))return n}}function Le(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=$e(e,this.localeData()),this.add(e-t,"d")):t}function Ne(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Ae(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Ye(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Ee(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||He.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(u(this,"_weekdaysRegex")||(this._weekdaysRegex=ks),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Ve(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||He.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(u(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=xs),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function We(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||He.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(u(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Gs),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function He(){function e(e,t){return t.length-e.length}var t,i,n,s,a,r=[],o=[],l=[],c=[];for(t=0;t<7;t++)i=f([2e3,1]).day(t),n=this.weekdaysMin(i,""),s=this.weekdaysShort(i,""),a=this.weekdays(i,""),r.push(n),o.push(s),l.push(a),c.push(n),c.push(s),c.push(a);for(r.sort(e),o.sort(e),l.sort(e),c.sort(e),t=0;t<7;t++)o[t]=ie(o[t]),l[t]=ie(l[t]),c[t]=ie(c[t]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Ue(){return this.hours()%12||12}function ze(){return this.hours()||24}function Be(e,t){q(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function qe(e,t){return t._meridiemParse}function Ze(e){return"p"===(e+"").toLowerCase().charAt(0)}function Je(e,t,i){return e>11?i?"pm":"PM":i?"am":"AM"}function Ke(e){return e?e.toLowerCase().replace("_","-"):e}function Qe(e){for(var t,i,n,s,a=0;a0;){if(n=Xe(s.slice(0,t).join("-")))return n;if(i&&i.length>=t&&k(s,i,!0)>=t-1)break;t--}a++}return null}function Xe(i){var n=null;if(!js[i]&&"undefined"!=typeof t&&t&&t.exports)try{n=Ss._abbr,e("./locale/"+i),et(n)}catch(e){}return js[i]}function et(e,t){var i;return e&&(i=b(t)?nt(e):tt(e,t),i&&(Ss=i)),Ss._abbr}function tt(e,t){if(null!==t){var i=Ms;if(t.abbr=e,null!=js[e])S("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=js[e]._config;else if(null!=t.parentLocale){if(null==js[t.parentLocale])return $s[t.parentLocale]||($s[t.parentLocale]=[]),$s[t.parentLocale].push({name:e,config:t}),null;i=js[t.parentLocale]._config}return js[e]=new j(M(i,t)),$s[e]&&$s[e].forEach(function(e){tt(e.name,e.config)}),et(e),js[e]}return delete js[e],null}function it(e,t){if(null!=t){var i,n=Ms;null!=js[e]&&(n=js[e]._config),t=M(n,t),i=new j(t),i.parentLocale=js[e],js[e]=i,et(e)}else null!=js[e]&&(null!=js[e].parentLocale?js[e]=js[e].parentLocale:null!=js[e]&&delete js[e]);return js[e]}function nt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Ss;if(!s(e)){if(t=Xe(e))return t;e=[e]}return Qe(e)}function st(){return Gn(js)}function at(e){var t,i=e._a;return i&&m(e).overflow===-2&&(t=i[ss]<0||i[ss]>11?ss:i[as]<1||i[as]>re(i[ns],i[ss])?as:i[rs]<0||i[rs]>24||24===i[rs]&&(0!==i[os]||0!==i[ls]||0!==i[cs])?rs:i[os]<0||i[os]>59?os:i[ls]<0||i[ls]>59?ls:i[cs]<0||i[cs]>999?cs:-1,m(e)._overflowDayOfYear&&(tas)&&(t=as),m(e)._overflowWeeks&&t===-1&&(t=us),m(e)._overflowWeekday&&t===-1&&(t=ds),m(e).overflow=t),e}function rt(e){var t,i,n,s,a,r,o=e._i,l=Ys.exec(o)||Ps.exec(o);if(l){for(m(e).iso=!0,t=0,i=Os.length;tbe(s)&&(m(e)._overflowDayOfYear=!0),i=ye(s,0,e._dayOfYear),e._a[ss]=i.getUTCMonth(),e._a[as]=i.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=n[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[rs]&&0===e._a[os]&&0===e._a[ls]&&0===e._a[cs]&&(e._nextDay=!0,e._a[rs]=0),e._d=(e._useUTC?ye:we).apply(null,a),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[rs]=24)}}function dt(e){var t,i,n,s,a,r,o,l;if(t=e._w,null!=t.GG||null!=t.W||null!=t.E)a=1,r=4,i=lt(t.GG,e._a[ns],xe(wt(),1,4).year),n=lt(t.W,1),s=lt(t.E,1),(s<1||s>7)&&(l=!0);else{a=e._locale._week.dow,r=e._locale._week.doy;var c=xe(wt(),a,r);i=lt(t.gg,e._a[ns],c.year),n=lt(t.w,c.week),null!=t.d?(s=t.d,(s<0||s>6)&&(l=!0)):null!=t.e?(s=t.e+a,(t.e<0||t.e>6)&&(l=!0)):s=a}n<1||n>Ge(i,a,r)?m(e)._overflowWeeks=!0:null!=l?m(e)._overflowWeekday=!0:(o=ke(i,n,s,a,r),e._a[ns]=o.year,e._dayOfYear=o.dayOfYear)}function ft(e){if(e._f===i.ISO_8601)return void rt(e);e._a=[],m(e).empty=!0;var t,n,s,a,r,o=""+e._i,l=o.length,c=0;for(s=Q(e._f,e._locale).match(Tn)||[],t=0;t0&&m(e).unusedInput.push(r),o=o.slice(o.indexOf(n)+n.length),c+=n.length),In[a]?(n?m(e).empty=!1:m(e).unusedTokens.push(a),ae(a,n,e)):e._strict&&!n&&m(e).unusedTokens.push(a);m(e).charsLeftOver=l-c,o.length>0&&m(e).unusedInput.push(o),e._a[rs]<=12&&m(e).bigHour===!0&&e._a[rs]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[rs]=ht(e._locale,e._a[rs],e._meridiem),ut(e),at(e)}function ht(e,t,i){var n;return null==i?t:null!=e.meridiemHour?e.meridiemHour(t,i):null!=e.isPM?(n=e.isPM(i),n&&t<12&&(t+=12),n||12!==t||(t=0),t):t}function mt(e){var t,i,n,s,a;if(0===e._f.length)return m(e).invalidFormat=!0,void(e._d=new Date(NaN));for(s=0;sthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Lt(){if(!b(this._isDSTShifted))return this._isDSTShifted;var e={};if(v(e,this),e=bt(e),e._a){var t=e._isUTC?f(e._a):wt(e._a);this._isDSTShifted=this.isValid()&&k(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Nt(){return!!this.isValid()&&!this._isUTC}function At(){return!!this.isValid()&&this._isUTC}function Et(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Vt(e,t){var i,n,s,a=e,r=null;return Gt(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:o(e)?(a={},t?a[t]=e:a.milliseconds=e):(r=Vs.exec(e))?(i="-"===r[1]?-1:1,a={y:0,d:R(r[as])*i,h:R(r[rs])*i,m:R(r[os])*i,s:R(r[ls])*i,ms:R(St(1e3*r[cs]))*i}):(r=Ws.exec(e))?(i="-"===r[1]?-1:1, a={y:Wt(r[2],i),M:Wt(r[3],i),w:Wt(r[4],i),d:Wt(r[5],i),h:Wt(r[6],i),m:Wt(r[7],i),s:Wt(r[8],i)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(s=Ut(wt(a.from),wt(a.to)),a={},a.ms=s.milliseconds,a.M=s.months),n=new xt(a),Gt(e)&&u(e,"_locale")&&(n._locale=e._locale),n}function Wt(e,t){var i=e&&parseFloat(e.replace(",","."));return(isNaN(i)?0:i)*t}function Ht(e,t){var i={milliseconds:0,months:0};return i.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(i.months,"M").isAfter(t)&&--i.months,i.milliseconds=+t-+e.clone().add(i.months,"M"),i}function Ut(e,t){var i;return e.isValid()&&t.isValid()?(t=Mt(t,e),e.isBefore(t)?i=Ht(e,t):(i=Ht(t,e),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function zt(e,t){return function(i,n){var s,a;return null===n||isNaN(+n)||(S(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=i,i=n,n=a),i="string"==typeof i?+i:i,s=Vt(i,n),Bt(this,s,e),this}}function Bt(e,t,n,s){var a=t._milliseconds,r=St(t._days),o=St(t._months);e.isValid()&&(s=null==s||s,a&&e._d.setTime(e._d.valueOf()+a*n),r&&H(e,"Date",W(e,"Date")+r*n),o&&de(e,W(e,"Month")+o*n),s&&i.updateOffset(e,r||o))}function qt(e,t){var i=e.diff(t,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"}function Zt(e,t){var n=e||wt(),s=Mt(n,this).startOf("day"),a=i.calendarFormat(this,s)||"sameElse",r=t&&(D(t[a])?t[a].call(this,n):t[a]);return this.format(r||this.localeData().calendar(a,this,wt(n)))}function Jt(){return new _(this)}function Kt(e,t){var i=w(e)?e:wt(e);return!(!this.isValid()||!i.isValid())&&(t=L(b(t)?"millisecond":t),"millisecond"===t?this.valueOf()>i.valueOf():i.valueOf()a&&(t=a),Pi.call(this,e,t,i,n,s))}function Pi(e,t,i,n,s){var a=ke(e,t,i,n,s),r=ye(a.year,0,a.dayOfYear);return this.year(r.getUTCFullYear()),this.month(r.getUTCMonth()),this.date(r.getUTCDate()),this}function Ti(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}function Oi(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}function Fi(e,t){t[cs]=R(1e3*("0."+e))}function Ii(){return this._isUTC?"UTC":""}function Li(){return this._isUTC?"Coordinated Universal Time":""}function Ni(e){return wt(1e3*e)}function Ai(){return wt.apply(null,arguments).parseZone()}function Ei(e){return e}function Vi(e,t,i,n){var s=nt(),a=f().set(n,t);return s[i](a,e)}function Wi(e,t,i){if(o(e)&&(t=e,e=void 0),e=e||"",null!=t)return Vi(e,t,i,"month");var n,s=[];for(n=0;n<12;n++)s[n]=Vi(e,n,i,"month");return s}function Hi(e,t,i,n){"boolean"==typeof e?(o(t)&&(i=t,t=void 0),t=t||""):(t=e,i=t,e=!1,o(t)&&(i=t,t=void 0),t=t||"");var s=nt(),a=e?s._week.dow:0;if(null!=i)return Vi(t,(i+a)%7,n,"day");var r,l=[];for(r=0;r<7;r++)l[r]=Vi(t,(r+a)%7,n,"day");return l}function Ui(e,t){return Wi(e,t,"months")}function zi(e,t){return Wi(e,t,"monthsShort")}function Bi(e,t,i){return Hi(e,t,i,"weekdays")}function qi(e,t,i){return Hi(e,t,i,"weekdaysShort")}function Zi(e,t,i){return Hi(e,t,i,"weekdaysMin")}function Ji(){var e=this._data;return this._milliseconds=ea(this._milliseconds),this._days=ea(this._days),this._months=ea(this._months),e.milliseconds=ea(e.milliseconds),e.seconds=ea(e.seconds),e.minutes=ea(e.minutes),e.hours=ea(e.hours),e.months=ea(e.months),e.years=ea(e.years),this}function Ki(e,t,i,n){var s=Vt(t,i);return e._milliseconds+=n*s._milliseconds,e._days+=n*s._days,e._months+=n*s._months,e._bubble()}function Qi(e,t){return Ki(this,e,t,1)}function Xi(e,t){return Ki(this,e,t,-1)}function en(e){return e<0?Math.floor(e):Math.ceil(e)}function tn(){var e,t,i,n,s,a=this._milliseconds,r=this._days,o=this._months,l=this._data;return a>=0&&r>=0&&o>=0||a<=0&&r<=0&&o<=0||(a+=864e5*en(sn(o)+r),r=0,o=0),l.milliseconds=a%1e3,e=y(a/1e3),l.seconds=e%60,t=y(e/60),l.minutes=t%60,i=y(t/60),l.hours=i%24,r+=y(i/24),s=y(nn(r)),o+=s,r-=en(sn(s)),n=y(o/12),o%=12,l.days=r,l.months=o,l.years=n,this}function nn(e){return 4800*e/146097}function sn(e){return 146097*e/4800}function an(e){var t,i,n=this._milliseconds;if(e=L(e),"month"===e||"year"===e)return t=this._days+n/864e5,i=this._months+nn(t),"month"===e?i:i/12;switch(t=this._days+Math.round(sn(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return 24*t+n/36e5;case"minute":return 1440*t+n/6e4;case"second":return 86400*t+n/1e3;case"millisecond":return Math.floor(864e5*t)+n;default:throw new Error("Unknown unit "+e)}}function rn(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*R(this._months/12)}function on(e){return function(){return this.as(e)}}function ln(e){return e=L(e),this[e+"s"]()}function cn(e){return function(){return this._data[e]}}function un(){return y(this.days()/7)}function dn(e,t,i,n,s){return s.relativeTime(t||1,!!i,e,n)}function fn(e,t,i){var n=Vt(e).abs(),s=ga(n.as("s")),a=ga(n.as("m")),r=ga(n.as("h")),o=ga(n.as("d")),l=ga(n.as("M")),c=ga(n.as("y")),u=s0,u[4]=i,dn.apply(null,u)}function hn(e){return void 0===e?ga:"function"==typeof e&&(ga=e,!0)}function mn(e,t){return void 0!==ba[e]&&(void 0===t?ba[e]:(ba[e]=t,!0))}function pn(e){var t=this.localeData(),i=fn(this,!e,t);return e&&(i=t.pastFuture(+this,i)),t.postformat(i)}function gn(){var e,t,i,n=va(this._milliseconds)/1e3,s=va(this._days),a=va(this._months);e=y(n/60),t=y(e/60),n%=60,e%=60,i=y(a/12),a%=12;var r=i,o=a,l=s,c=t,u=e,d=n,f=this.asSeconds();return f?(f<0?"-":"")+"P"+(r?r+"Y":"")+(o?o+"M":"")+(l?l+"D":"")+(c||u||d?"T":"")+(c?c+"H":"")+(u?u+"M":"")+(d?d+"S":""):"P0D"}var bn,vn;vn=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),i=t.length>>>0,n=0;n68?1900:2e3)};var vs=V("FullYear",!0);q("w",["ww",2],"wo","week"),q("W",["WW",2],"Wo","isoWeek"),I("week","w"),I("isoWeek","W"),A("week",5),A("isoWeek",5),X("w",Wn),X("ww",Wn,Nn),X("W",Wn),X("WW",Wn,Nn),se(["w","ww","W","WW"],function(e,t,i,n){t[n.substr(0,1)]=R(e)});var _s={dow:0,doy:6};q("d",0,"do","day"),q("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),q("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),q("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),q("e",0,0,"weekday"),q("E",0,0,"isoWeekday"),I("day","d"),I("weekday","e"),I("isoWeekday","E"),A("day",11),A("weekday",11),A("isoWeekday",11),X("d",Wn),X("e",Wn),X("E",Wn),X("dd",function(e,t){return t.weekdaysMinRegex(e)}),X("ddd",function(e,t){return t.weekdaysShortRegex(e)}),X("dddd",function(e,t){return t.weekdaysRegex(e)}),se(["dd","ddd","dddd"],function(e,t,i,n){var s=i._locale.weekdaysParse(e,n,i._strict);null!=s?t.d=s:m(i).invalidWeekday=e}),se(["d","e","E"],function(e,t,i,n){t[n]=R(e)});var ws="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ys="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Rs="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ks=es,xs=es,Gs=es;q("H",["HH",2],0,"hour"),q("h",["hh",2],0,Ue),q("k",["kk",2],0,ze),q("hmm",0,0,function(){return""+Ue.apply(this)+B(this.minutes(),2)}),q("hmmss",0,0,function(){return""+Ue.apply(this)+B(this.minutes(),2)+B(this.seconds(),2)}),q("Hmm",0,0,function(){return""+this.hours()+B(this.minutes(),2)}),q("Hmmss",0,0,function(){return""+this.hours()+B(this.minutes(),2)+B(this.seconds(),2)}),Be("a",!0),Be("A",!1),I("hour","h"),A("hour",13),X("a",qe),X("A",qe),X("H",Wn),X("h",Wn),X("HH",Wn,Nn),X("hh",Wn,Nn),X("hmm",Hn),X("hmmss",Un),X("Hmm",Hn),X("Hmmss",Un),ne(["H","HH"],rs),ne(["a","A"],function(e,t,i){i._isPm=i._locale.isPM(e),i._meridiem=e}),ne(["h","hh"],function(e,t,i){t[rs]=R(e),m(i).bigHour=!0}),ne("hmm",function(e,t,i){var n=e.length-2;t[rs]=R(e.substr(0,n)),t[os]=R(e.substr(n)),m(i).bigHour=!0}),ne("hmmss",function(e,t,i){var n=e.length-4,s=e.length-2;t[rs]=R(e.substr(0,n)),t[os]=R(e.substr(n,2)),t[ls]=R(e.substr(s)),m(i).bigHour=!0}),ne("Hmm",function(e,t,i){var n=e.length-2;t[rs]=R(e.substr(0,n)),t[os]=R(e.substr(n))}),ne("Hmmss",function(e,t,i){var n=e.length-4,s=e.length-2;t[rs]=R(e.substr(0,n)),t[os]=R(e.substr(n,2)),t[ls]=R(e.substr(s))});var Ss,Ds=/[ap]\.?m?\.?/i,Cs=V("Hours",!0),Ms={calendar:Sn,longDateFormat:Dn,invalidDate:Cn,ordinal:Mn,ordinalParse:jn,relativeTime:$n,months:ms,monthsShort:ps,week:_s,weekdays:ws,weekdaysMin:Rs,weekdaysShort:ys,meridiemParse:Ds},js={},$s={},Ys=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ps=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ts=/Z|[+-]\d\d(?::?\d\d)?/,Os=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Fs=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Is=/^\/?Date\((\-?\d+)/i;i.createFromInputFallback=G("value provided is not in a recognized ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),i.ISO_8601=function(){};var Ls=G("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=wt.apply(null,arguments);return this.isValid()&&e.isValid()?ethis?this:e:g()}),As=function(){return Date.now?Date.now():+new Date};Dt("Z",":"),Dt("ZZ",""),X("Z",Qn),X("ZZ",Qn),ne(["Z","ZZ"],function(e,t,i){i._useUTC=!0,i._tzm=Ct(Qn,e)});var Es=/([\+\-]|\d\d)/gi;i.updateOffset=function(){};var Vs=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Ws=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;Vt.fn=xt.prototype;var Hs=zt(1,"add"),Us=zt(-1,"subtract");i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var zs=G("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});q(0,["gg",2],0,function(){return this.weekYear()%100}),q(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Di("gggg","weekYear"),Di("ggggg","weekYear"),Di("GGGG","isoWeekYear"),Di("GGGGG","isoWeekYear"),I("weekYear","gg"),I("isoWeekYear","GG"),A("weekYear",1),A("isoWeekYear",1),X("G",Jn),X("g",Jn),X("GG",Wn,Nn),X("gg",Wn,Nn),X("GGGG",Bn,En),X("gggg",Bn,En),X("GGGGG",qn,Vn),X("ggggg",qn,Vn),se(["gggg","ggggg","GGGG","GGGGG"],function(e,t,i,n){t[n.substr(0,2)]=R(e)}),se(["gg","GG"],function(e,t,n,s){t[s]=i.parseTwoDigitYear(e)}),q("Q",0,"Qo","quarter"),I("quarter","Q"),A("quarter",7),X("Q",Ln),ne("Q",function(e,t){t[ss]=3*(R(e)-1)}),q("D",["DD",2],"Do","date"),I("date","D"),A("date",9),X("D",Wn),X("DD",Wn,Nn),X("Do",function(e,t){return e?t._ordinalParse:t._ordinalParseLenient}),ne(["D","DD"],as),ne("Do",function(e,t){t[as]=R(e.match(Wn)[0],10)});var Bs=V("Date",!0);q("DDD",["DDDD",3],"DDDo","dayOfYear"),I("dayOfYear","DDD"),A("dayOfYear",4),X("DDD",zn),X("DDDD",An),ne(["DDD","DDDD"],function(e,t,i){i._dayOfYear=R(e)}),q("m",["mm",2],0,"minute"),I("minute","m"),A("minute",14),X("m",Wn),X("mm",Wn,Nn),ne(["m","mm"],os);var qs=V("Minutes",!1);q("s",["ss",2],0,"second"),I("second","s"),A("second",15),X("s",Wn),X("ss",Wn,Nn),ne(["s","ss"],ls);var Zs=V("Seconds",!1);q("S",0,0,function(){return~~(this.millisecond()/100)}),q(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),q(0,["SSS",3],0,"millisecond"),q(0,["SSSS",4],0,function(){return 10*this.millisecond()}),q(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),q(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),q(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),q(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),q(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),I("millisecond","ms"),A("millisecond",16),X("S",zn,Ln),X("SS",zn,Nn),X("SSS",zn,An);var Js;for(Js="SSSS";Js.length<=9;Js+="S")X(Js,Zn);for(Js="S";Js.length<=9;Js+="S")ne(Js,Fi);var Ks=V("Milliseconds",!1);q("z",0,0,"zoneAbbr"),q("zz",0,0,"zoneName");var Qs=_.prototype;Qs.add=Hs,Qs.calendar=Zt,Qs.clone=Jt,Qs.diff=ni,Qs.endOf=gi,Qs.format=li,Qs.from=ci,Qs.fromNow=ui,Qs.to=di,Qs.toNow=fi,Qs.get=U,Qs.invalidAt=Gi,Qs.isAfter=Kt,Qs.isBefore=Qt,Qs.isBetween=Xt,Qs.isSame=ei,Qs.isSameOrAfter=ti,Qs.isSameOrBefore=ii,Qs.isValid=ki,Qs.lang=zs,Qs.locale=hi,Qs.localeData=mi,Qs.max=Ns,Qs.min=Ls,Qs.parsingFlags=xi,Qs.set=z,Qs.startOf=pi,Qs.subtract=Us,Qs.toArray=wi,Qs.toObject=yi,Qs.toDate=_i,Qs.toISOString=ri,Qs.inspect=oi,Qs.toJSON=Ri,Qs.toString=ai,Qs.unix=vi,Qs.valueOf=bi,Qs.creationData=Si,Qs.year=vs,Qs.isLeapYear=_e,Qs.weekYear=Ci,Qs.isoWeekYear=Mi,Qs.quarter=Qs.quarters=Ti,Qs.month=fe,Qs.daysInMonth=he,Qs.week=Qs.weeks=Me,Qs.isoWeek=Qs.isoWeeks=je,Qs.weeksInYear=$i,Qs.isoWeeksInYear=ji,Qs.date=Bs,Qs.day=Qs.days=Le,Qs.weekday=Ne,Qs.isoWeekday=Ae,Qs.dayOfYear=Oi,Qs.hour=Qs.hours=Cs,Qs.minute=Qs.minutes=qs,Qs.second=Qs.seconds=Zs,Qs.millisecond=Qs.milliseconds=Ks,Qs.utcOffset=$t,Qs.utc=Pt,Qs.local=Tt,Qs.parseZone=Ot,Qs.hasAlignedHourOffset=Ft,Qs.isDST=It,Qs.isLocal=Nt,Qs.isUtcOffset=At,Qs.isUtc=Et,Qs.isUTC=Et,Qs.zoneAbbr=Ii,Qs.zoneName=Li,Qs.dates=G("dates accessor is deprecated. Use date instead.",Bs),Qs.months=G("months accessor is deprecated. Use month instead",fe),Qs.years=G("years accessor is deprecated. Use year instead",vs),Qs.zone=G("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Yt),Qs.isDSTShifted=G("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Lt);var Xs=j.prototype;Xs.calendar=$,Xs.longDateFormat=Y,Xs.invalidDate=P,Xs.ordinal=T,Xs.preparse=Ei,Xs.postformat=Ei,Xs.relativeTime=O,Xs.pastFuture=F,Xs.set=C,Xs.months=oe,Xs.monthsShort=le,Xs.monthsParse=ue,Xs.monthsRegex=pe,Xs.monthsShortRegex=me,Xs.week=Se,Xs.firstDayOfYear=Ce,Xs.firstDayOfWeek=De,Xs.weekdays=Pe,Xs.weekdaysMin=Oe,Xs.weekdaysShort=Te,Xs.weekdaysParse=Ie,Xs.weekdaysRegex=Ee,Xs.weekdaysShortRegex=Ve,Xs.weekdaysMinRegex=We,Xs.isPM=Ze,Xs.meridiem=Je,et("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,i=1===R(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+i}}),i.lang=G("moment.lang is deprecated. Use moment.locale instead.",et),i.langData=G("moment.langData is deprecated. Use moment.localeData instead.",nt);var ea=Math.abs,ta=on("ms"),ia=on("s"),na=on("m"),sa=on("h"),aa=on("d"),ra=on("w"),oa=on("M"),la=on("y"),ca=cn("milliseconds"),ua=cn("seconds"),da=cn("minutes"),fa=cn("hours"),ha=cn("days"),ma=cn("months"),pa=cn("years"),ga=Math.round,ba={s:45,m:45,h:22,d:26,M:11},va=Math.abs,_a=xt.prototype;return _a.abs=Ji,_a.add=Qi,_a.subtract=Xi,_a.as=an,_a.asMilliseconds=ta,_a.asSeconds=ia,_a.asMinutes=na,_a.asHours=sa,_a.asDays=aa,_a.asWeeks=ra,_a.asMonths=oa,_a.asYears=la,_a.valueOf=rn,_a._bubble=tn,_a.get=ln,_a.milliseconds=ca,_a.seconds=ua,_a.minutes=da,_a.hours=fa,_a.days=ha,_a.weeks=un,_a.months=ma,_a.years=pa,_a.humanize=pn,_a.toISOString=gn,_a.toString=gn,_a.toJSON=gn,_a.locale=hi,_a.localeData=mi,_a.toIsoString=G("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",gn),_a.lang=zs,q("X",0,0,"unix"),q("x",0,0,"valueOf"),X("x",Jn),X("X",Xn),ne("X",function(e,t,i){i._d=new Date(1e3*parseFloat(e,10))}),ne("x",function(e,t,i){i._d=new Date(R(e))}),i.version="2.17.1",n(wt),i.fn=Qs,i.min=Rt,i.max=kt,i.now=As,i.utc=f,i.unix=Ni,i.months=Ui,i.isDate=l,i.locale=et,i.invalid=g,i.duration=Vt,i.isMoment=w,i.weekdays=Bi,i.parseZone=Ai,i.localeData=nt,i.isDuration=Gt,i.monthsShort=zi,i.weekdaysMin=Zi,i.defineLocale=tt,i.updateLocale=it,i.locales=st,i.weekdaysShort=qi,i.normalizeUnits=L,i.relativeTimeRounding=hn,i.relativeTimeThreshold=mn,i.calendarFormat=qt,i.prototype=Qs,i})},{}],5:[function(e,t,i){!function(e,n){"object"==typeof i&&"undefined"!=typeof t?t.exports=n():"function"==typeof define&&define.amd?define(n):e.Ractive.transitions.fade=n()}(this,function(){function e(e,t){var n;t=e.processParams(t,i),e.isIntro?(n=e.getStyle("opacity"),e.setStyle("opacity",0)):n=0,e.animateStyle("opacity",n,t).then(e.complete)}var t=e,i={delay:0,duration:300,easing:"linear"};return t})},{}],6:[function(e,t,i){var n=function(){return Math.random().toString(36).substring(7)},s='{{#banner.content}}
{{{banner.content}}}
{{/banner.content}}',a=Ractive.extend({template:s,data:function(){return{uri:null,appear:null,screentype:null,banner:{id:null,content:null}}},oninit:function(){RG.logger.debug("Adfox component init")},onrender:function(){var e=this,t=e.get("screentype"),i=null;t?(i=t.split(" "),RG.events.subscribe(RG.ScreenViewer._modulePrefix+".check",function(t){RG.logger.log(t),e.checkForScreenType(i,RG.ScreenViewer.getScreenInfo().type,e.prepareRun.bind(e)),RG.events.subscribe(RG.ScreenViewer._modulePrefix+".update",function(t,n){e.checkForScreenType(i,n.type,e.prepareRun.bind(e))})})):e.prepareRun()},setAppear:function(e,t){var i=this,n=null;$(window).load(function(){n=new Waypoint({element:$("#"+e)[0],handler:function(){i.loadBanner(t),RG.logger.log("banner #"+e+", appeared"),n.disable()},offset:"bottom-in-view"})})},prepareUri:function(){function e(){var e=RG.meta.getPlatform(),t=RG.meta.getPlatformReg(),i=RG.meta.getPlatformUrl(),n=null;return n=""+e+(t?"$reg:"+t:"")+(i?"$url:"+i:"")}var t=this.get("uri"),i=null;i=e(),t=t+"&dl="+i,this.set("uri",t)},initBanner:function(e,t){var i=window.ADFOX.RELOAD_CODE,s=n(),a=null,r=null;a=i.initBanner(s,e),this.set("banner.id",s),this.set("banner.content",a.html),r={tgNS:i,initData:a,uri:e},t?this.setAppear(s,r):this.loadBanner(r)},loadBanner:function(e){e.tgNS.loadBanner(e.initData.pr1,e.uri,e.initData.sessionId)},checkForScreenType:function(e,t,i){var n=this;$.each(e,function(e,s){s===t&&(n.get("banner.content")||i())})},prepareRun:function(){this.prepareUri(),this.initBanner(this.get("uri"),this.get("appear"))}});t.exports=a},{}],7:[function(e,t,i){var n=e("../../../../scripts/vendors/Pikaday"),s=function(e){var t=this;return t._param={behavoirClasses:{active:"is-active",animationSrc:"animated",animationBehavoir:"bounceIn"},methods:{},datepickerIconLabel:".b-custom-datepicker__trigger",root:".b-custom-datepicker",fieldLabel:null,triggerLabel:null,calendarParam:{field:null,trigger:null,position:"bottom left",maxDate:new Date,firstDay:1,format:"DD.MM.YYYY",i18n:{previousMonth:"Пред.",nextMonth:"След.",months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],weekdays:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"],weekdaysShort:["вс","пн","вт","ср","чт","пт","сб"]},onClose:function(){RG.events.publish(t.name+".close")},onOpen:function(){RG.events.publish(t.name+".open")},onSelect:function(){var e=this.getMoment().format("YYYY-MM-DD");RG.events.publish(t.name+".select",e)}}},t.param=null,t.name=null,this.$elMap=null,t.init(e)};s.prototype={setParam:function(e){return this.param=$.extend(!0,{},this._param,e),this},generateHash:function(){return Math.random().toString(36).substring(7)},setName:function(){this.name="calendar_"+this.generateHash()},getName:function(){return this.name},setElMap:function(){return this.$elMap={},this.$elMap.$root=$(this.param.root),this.$elMap.$el=this.$elMap.$root.find(this.param.el),this},setCalendarIcon:function(){this.$elMap.$datepickerIconLabel=this.$elMap.$root.find(this.param.datepickerIconLabel)},openCalendar:function(e){var t=this.param.behavoirClasses;return this.$elMap.$datepickerIconLabel.addClass(t.active).addClass(t.animationSrc).addClass(t.animationBehavoir),this.appendCloseButton(),$.isFunction(e)&&e(this),this},closeCalendar:function(e){var t=this.param.behavoirClasses;return this.$elMap.$datepickerIconLabel.removeClass(t.active).removeClass(t.animationSrc).removeClass(t.animationBehavoir),this.removeCloseButton(),$.isFunction(e)&&e(this),this},selectCalendar:function(e,t){return RG.logger.log("Выбрали дату "+e),$.isFunction(t)&&t(this,e),this},clearInputs:function(){this.param.calendarParam.field.value=""},wrongDate:function(e){this.picker.setDate(e),this.picker.toString("DD.MM.YYYY")},setSubscribers:function(){var e=this,t=this.param.methods;return RG.events.subscribe(e.name+".open",function(i){RG.logger.log(i),e.openCalendar(t.open)}),RG.events.subscribe(e.name+".close",function(i){RG.logger.log(i),e.closeCalendar(t.close)}),RG.events.subscribe(this.name+".select",function(i,n){RG.logger.log(i),e.selectCalendar(n,t.select)}),RG.events.subscribe("datepicker.wrongDate",function(t,i){RG.logger.log(t),RG.logger.log(i),e.wrongDate(i)}),RG.events.subscribe("pickers.clear",function(t){RG.logger.log(t),e.clearInputs()}),this},renderButtonCalendarIcon:function(){var e=this.param,t=document.createElement("button");!e.field&&e.fieldLabel&&(e.field=document.querySelector(e.fieldLabel)),e.field.after(t),t.classList.add(e.triggerLabel),e.calendarParam.field=e.field,e.calendarParam.trigger=t,RG.logger.log("Datepicker привязан к кнопке - "+e.triggerLabel)},appendCloseButton:function(){var e=document.createElement("div"),t=document.createElement("div"),i=document.querySelectorAll(".pika-single")[0];e.classList.add("b-custom-datepicker__buttonpane"),t.classList.add("b-custom-datepicker__close-button"),e.appendChild(t),document.body.insertBefore(e,i)},removeCloseButton:function(){var e=document.querySelectorAll(".b-custom-datepicker__buttonpane")[0];document.body.removeChild(e)},destroy:function(){RG.logger.log("destroy "+self.name+" datepicker"),self.picker.destroy()},run:function(){this.param.triggerLabel?(this.renderButtonCalendarIcon(),this.picker=new n(this.param.calendarParam),this.setCalendarIcon()):RG.logger.log("У datepicker не указан класс кнопки, к которой он должен привязываться")},init:function(e){var t=this;return t.setName(),t.setParam(e),t.setElMap(),t.setSubscribers(),RG.events.subscribe(t.name+".run",$.proxy(t.run,t)),this}},t.exports=s},{"../../../../scripts/vendors/Pikaday":144}],8:[function(e,t,i){t.exports={v:3,t:[{t:7,e:"div",a:{class:"b-dummy b-dummy_empty"},f:[{t:7,e:"p",a:{class:"b-dummy__text"},f:[{t:7,e:"b",a:{class:"b-dummy__name"},f:[{t:2,r:"userName"}]},", ",{t:2,r:"intro"}]}," ",{t:4,f:[{t:4,f:[{t:7,e:"p",a:{class:"b-dummy__text"},f:[{t:3,r:"txt"}]}],x:{r:["."],s:"{txt:_0}"}}],r:"list"}," ",{t:7,e:"p",a:{class:"b-dummy__text"},f:[{t:7,e:"b",f:[{t:2,r:"outro"}]}]}]}]}},{}],9:[function(e,t,i){var n={intro:"Вы пока не заинтересовались ни одним сюжетом.",list:['Откройте любой материал в сюжете и отметьте флажок Следить за сюжетом',"Информация о новой статье будет появляться в Вашем личном кабинете.","Вы всегда можете отписаться от обновлений."]},s={intro:"Вы пока не подписаны ни на один комментарий.",list:["Вы можете прокомментировать любой материал на сайте или следить за обсуждением, подписавшись на комментарии.","Информация о добавлении нового комментария будет приходить на указанную Вами почту и появляться в личном кабинете.","Вы можете отписаться от конкретных комментариев либо от уведомлений в целом."]},a={intro:"Вы пока не сохранили ни одной статьи.",list:['Откройте любой материал на сайте и отметьте в меню справа.',"Также Вы можете помечать статьи как прочитанные или удалять из списка в личном кабинете."]},r={intro:"у Вас пока нет ни одной прочитанной статьи.",list:["Каждая просмотренная Вами статья будет попадать в этот список, чтобы Вы всегда могли вернуться к ней."]};t.exports={comments:s,sujets:n,saved:a,viewed:r}},{}],10:[function(e,t,i){var n=e("../b-dummy_empty.ihtml"),s=e("../data/b-dummy_empty"),a=Ractive.extend({template:n,data:function(){return{userName:RG.session.getUserData().firstName }},oninit:function(){var e=this;RG.logger.debug("Spinner"),this.observe("type",function(t){s[t]&&e.set(s[t])}),this.on({test:function(e){e.original.preventDefault()}})}});t.exports=a},{"../b-dummy_empty.ihtml":8,"../data/b-dummy_empty":9}],11:[function(e,t,i){t.exports={v:3,t:[{t:7,e:"div",a:{class:["b-follow b-follow_sujets ",{t:2,x:{r:["subscribed"],s:'_0?"is-active":""'}}]},v:{click:"follow"},f:[{t:2,r:"txt"}]}]}},{}],12:[function(e,t,i){var n=e("../b-follow.ihtml"),s=Ractive.extend({template:n,data:function(){return{subscribed:!0}},oninit:function(){var e=this;RG.logger.debug("Follow-sujets"),this.on({follow:function(t){var i=e.get("subscribed"),n=e.get("sujet");RG.session.isAuthorized()?i?RG.events.publish("subscribe.sujet.remove",n):RG.events.publish("subscribe.sujet.add",n):RG.events.publish("login"),t.original.preventDefault()}}),RG.events.registerList({"subscribe.sujet.added":function(t,i){var n=+e.get("sujet");n===+i.id&&e.set("subscribed",!0)},"subscribe.sujet.removed":function(t,i){var n=+e.get("sujet");n===+i.id&&e.set("subscribed",!1)}})}});t.exports=s},{"../b-follow.ihtml":11}],13:[function(e,t,i){t.exports={v:3,t:[{t:7,e:"div",a:{class:"b-mailing"},f:[{t:7,e:"input-notification",a:{msg:[{t:2,r:"msg"}],off:"8000",class:"'b-input-notification_mailing'"}}," ",{t:7,e:"div",a:{class:"b-mailing__body"},f:[{t:7,e:"div",a:{class:["b-mailing__name b__name ",{t:2,x:{r:["subscribed"],s:'_0?"":"b-mailing__active_name"'}}]},f:[" ",{t:2,r:"txt"}," ",{t:7,e:"span",v:{click:"faq"},a:{class:"faq"},f:["?"]}]}," ",{t:7,e:"span",a:{class:["b-link-btn b-mailing__action_btn b-link-btn_",{t:2,x:{r:["subscribed"],s:'_0?"second":"accent"'}}]},v:{click:"subscribe"},f:[{t:2,x:{r:["subscribed"],s:'_0?"Отписаться":"Подписаться"'}}]}," "]}]}]}},{}],14:[function(e,t,i){t.exports={fresh:{txt:"Рассылка свежего номера",msg:'В рассылку включаются главные материалы очередного номера "Российской Газеты"'},doc:{txt:"Рассылка документов",msg:'В рассылку включаются важные документы опубликованные в свежем номере "Российской Газеты"'}}},{}],15:[function(e,t,i){var n=e("../../../forms/b-input-notification/scripts/InputNotification"),s=e("../b-mailing.ihtml"),a=e("../data/b-mailing.js"),r=Ractive.extend({template:s,components:{"input-notification":n},data:function(){return{subscribed:!1}},oninit:function(){var e=this,t=this.get("type"),i=a[t].txt;RG.logger.debug("Mailing"),this.set("txt",i),this.on({subscribe:function(i){var n=e.get("subscribed");RG.session.isAuthorized()?n?RG.events.publish("subscribe."+t+".remove"):RG.events.publish("subscribe."+t+".add"):RG.events.publish("login"),i.original.preventDefault()},faq:function(i){var n=a[t].msg;RG.logger.trace(n),e.set("msg",null),e.set("msg",n),i.original.preventDefault()}}),RG.events.subscribe("subscribe."+t+".added",function(t){RG.logger.info(t),e.set("subscribed",!0)}),RG.events.subscribe("subscribe."+t+".removed",function(t){RG.logger.info(t),e.set("subscribed",!1)})}});t.exports=r},{"../../../forms/b-input-notification/scripts/InputNotification":44,"../b-mailing.ihtml":13,"../data/b-mailing.js":14}],16:[function(e,t,i){var n=Ractive.extend({data:function(){return{elems:null}},oninit:function(){RG.events.publish("Relap.component.ready"),this.set("elems",this.get("elems")),this.set("title",this.get("title"))}});t.exports=n},{}],17:[function(e,t,i){t.exports={v:3,t:[{t:7,e:"div",a:{class:"b-search-bar"},f:[{t:7,e:"form",a:{class:"b-form b-search-bar__form"},f:[{t:7,e:"fieldset",a:{class:"b-form__fieldset"},f:[" ",{t:7,e:"label",a:{class:"b-field b-field_input b-field_input_text"},f:[{t:7,e:"div",a:{class:"b-field__wrapper"},f:[{t:7,e:"input",a:{class:"b-field__input b-field__input_text",type:"text",id:"searchInput",value:[{t:2,r:"keywords"}]}}]}]}," ",{t:7,e:"label",a:{class:["b-field b-field_input b-field_input_submit b-field_accent ",{t:2,x:{r:["loading"],s:'_0?"b-spinner":""'}}]},f:[{t:7,e:"div",a:{class:"b-field__wrapper"},f:[{t:7,e:"input",a:{class:"b-field__input b-field__input_submit b-search__bar-submit",type:"submit",value:"Найти",disabled:[{t:2,r:"loading"}],twoway:"false"},v:{click:"find"}}]}]}," "]}]}]}]}},{}],18:[function(e,t,i){var n=e("../b-search-bar.ihtml"),s=Ractive.extend({template:n,data:function(){return{keywords:"",type:null}},oninit:function(){var e=this;RG.logger.debug("SearchBar"),this.on({find:function(e){RG.events.publish("search.bar.find"),e.original.preventDefault(),e.original.stopPropagation()}}),this.observe("keywords",function(t,i){_.isEmpty(t.trim())||_.isEmpty(i.trim())||t.trim()===i.trim()||RG.events.publish("search.filters.update",{keywords:e.get("keywords")})}),RG.events.subscribe("search.keywords",function(t,i){var n=i||"";e.set("keywords",n)}),RG.events.subscribe("search.find",function(t){RG.logger.log(t),e.set("loading",!0)}),RG.events.subscribe("search.result.show",function(t){RG.logger.log(t),e.set("loading",!1)}),RG.events.subscribe("search.bar.find",function(t){switch(RG.logger.log(t),RG.logger.info("search.bar.find"),e.get("type")){case"redirect":var i=e.get("keywords");window.location=encodeURI(window.location.origin+"/search/?keywords="+i);break;case"redirect-doc-search":var n=e.get("keywords");window.location=encodeURI(window.location.origin+"/doc-search/?keywords="+n);break;default:RG.events.publish("search.find")}})},onrender:function(){this.nodes.searchInput.focus()}});t.exports=s},{"../b-search-bar.ihtml":17}],19:[function(e,t,i){t.exports={v:3,t:[{t:7,e:"div",a:{class:[{t:2,x:{r:["rgb"],s:'!_0?"b-search-filters":"b-search-filters__body"'}}," ",{t:2,x:{r:["show"],s:'_0?"is-show":"is-hide"'}}," group"]},f:[{t:7,e:"div",a:{class:"b-search-filters__wrapper b-search-filters__wrapper_theme group"},f:[{t:7,e:"div",a:{class:"b-search-filters__name"},f:["Темы"]}," ",{t:7,e:"div",a:{class:"b-search-filters__content"},f:[{t:4,f:[{t:7,e:"label",a:{class:"b-field b-field_input b-field_input_checkbox"},v:{click:{n:"addFilter",a:["themes"]}},f:[{t:7,e:"div",a:{class:"b-field__label"},f:[{t:2,r:"name"}]}," ",{t:7,e:"div",a:{class:"b-field__wrapper"},f:[{t:7,e:"input",a:{class:"b-field__input b-field__input_checkbox",type:"checkbox"},m:[{t:2,x:{r:["checked"],s:'_0?"checked":""'}}]}," ",{t:7,e:"span",a:{class:"b-field__icon"}}]}]}],i:"i",r:"filters.themes"}]}]}," ",{t:7,e:"div",a:{class:"b-search-filters__wrapper b-search-filters__wrapper_projects group"},f:[{t:7,e:"div",a:{class:"b-search-filters__name"},f:["Специальные проекты"]}," ",{t:7,e:"div",a:{class:"b-search-filters__content"},f:[{t:4,f:[{t:7,e:"label",a:{class:"b-field b-field_input b-field_input_checkbox"},v:{click:{n:"addFilter",a:["projects"]}},f:[{t:7,e:"div",a:{class:"b-field__label"},f:[{t:2,r:"name"}]}," ",{t:7,e:"div",a:{class:"b-field__wrapper"},f:[{t:7,e:"input",a:{class:"b-field__input b-field__input_checkbox",type:"checkbox"},m:[{t:2,x:{r:["checked"],s:'_0?"checked":""'}}]}," ",{t:7,e:"span",a:{class:"b-field__icon"}}]}]}],i:"i",r:"filters.projects"}]}]}," ",{t:7,e:"div",a:{class:"b-search-filters__wrapper b-search-filters__wrapper_period group"},f:[{t:7,e:"div",a:{class:"b-search-filters__name"},f:["Период"]}," ",{t:7,e:"div",a:{class:"b-search-filters__content"},f:[{t:7,e:"label",a:{class:"b-field b-field_select b-field_select_select b-search-filters__item_select"},f:[{t:7,e:"div",a:{class:"b-field__wrapper"},f:[{t:7,e:"select",a:{class:"b-field__select b-field__select_select",value:[{t:2,r:"period"}],type:"select"},v:{change:{n:"setPeriod",d:[{t:2,r:"period"}]}},f:[{t:4,f:[{t:7,e:"option",a:{value:[{t:2,r:"value"}]},f:[{t:2,r:"name"}]}],r:"filters.periods"}]}]}]}," ",{t:7,e:"label",a:{class:"b-field b-field_input b-field_input_text b-search-filters__item_datepicker-from b-custom-datepicker_input"},f:[{t:7,e:"div",a:{class:"b-field__label"},f:["c"]}," ",{t:7,e:"div",a:{class:"b-field__wrapper"},f:[{t:7,e:"input",a:{class:"b-field__input b-field__input_text",type:"text",value:[{t:2,r:"searchFilters.from"}]},o:"date-picker"}]}]}," ",{t:7,e:"label",a:{class:"b-field b-field_input b-field_input_text b-search-filters__item_datepicker-to b-custom-datepicker__input"},f:[{t:7,e:"div",a:{class:"b-field__label"},f:["по"]}," ",{t:7,e:"div",a:{class:"b-field__wrapper"},f:[{t:7,e:"input",a:{class:"b-field__input b-field__input_text",type:"text",value:[{t:2,r:"searchFilters.to"}]},o:"date-picker"}]}]}]}]}," ",{t:7,e:"div",a:{class:"b-search-filters__wrapper b-search-filters__submit group"},f:[" ",{t:7,e:"label",a:{class:["b-field b-field_input b-field_input_submit b-field_accent ",{t:2,x:{r:["loading"],s:'_0?"b-spinner":""'}}]},f:[{t:7,e:"div",a:{class:"b-field__wrapper"},f:[{t:7,e:"input",a:{class:"b-field__input b-field__input_submit",type:"submit",value:"Найти",disabled:[{t:2,r:"loading"}]},v:{click:"find"}}]}]}," "]}]}]}},{}],20:[function(e,t,i){t.exports={v:3,t:[{t:7,e:"div",a:{class:[{t:2,x:{r:["rgb"],s:'!_0?"b-search-filters b-search-filters_doc":"b-search-filters__body"'}}," ",{t:2,x:{r:["show"],s:'_0?"is-show":"is-hide"'}}," group"]},f:[" ",{t:7,e:"div",a:{class:"b-search-filters__wrapper b-search-filters__wrapper_doc-datepub group"},f:[{t:7,e:"div",a:{class:"b-search-filters__name"},f:["Дата публикации"]}," ",{t:7,e:"div",a:{class:"b-search-filters__content"},f:[{t:7,e:"label",a:{class:"b-field b-field_input b-field_input_text b-search-filters__item_datepicker-from b-custom-datepicker__input"},v:{click:"datepiker"},f:[{t:7,e:"div",a:{class:"b-field__label"},f:["c"]}," ",{t:7,e:"div",a:{class:"b-field__wrapper"},f:[{t:7,e:"input",a:{class:"b-field__input b-field__input_text",type:"text",value:[{t:2,r:"searchFilters.from"}]},o:"date-picker"}]}]}," ",{t:7,e:"label",a:{class:"b-field b-field_input b-field_input_text b-search-filters__item_datepicker-to b-custom-datepicker__input"},v:{click:"datepiker"},f:[{t:7,e:"div",a:{class:"b-field__label"},f:["по"]}," ",{t:7,e:"div",a:{class:"b-field__wrapper"},f:[{t:7,e:"input",a:{class:"b-field__input b-field__input_text",type:"text",value:[{t:2,r:"searchFilters.to"}]},o:"date-picker"}]}]}]}]}," ",{t:7,e:"div",a:{class:"b-search-filters__wrapper b-search-filters__wrapper_doc-type group"},f:[{t:7,e:"div",a:{class:"b-search-filters__name"},f:["Тип документа"]}," ",{t:7,e:"div",a:{class:"b-search-filters__content"},f:[{t:4,f:[{t:7,e:"label",a:{class:"b-field b-field_input b-field_input_checkbox"},v:{click:{n:"addFilter",a:["doctype"]}},f:[{t:7,e:"div",a:{class:"b-field__label"},f:[{t:2,r:"name"}]}," ",{t:7,e:"div",a:{class:"b-field__wrapper"},f:[{t:7,e:"input",a:{class:"b-field__input b-field__input_checkbox",type:"checkbox"},m:[{t:2,x:{r:["checked"],s:'_0?"checked":""'}}]}," ",{t:7,e:"span",a:{class:"b-field__icon"}}]}]}],i:"i",r:"filters.doctype"}]}]}," ",{t:7,e:"div",a:{class:"b-search-filters__wrapper b-search-filters__wrapper_doc-department group"},f:[{t:7,e:"div",a:{class:"b-search-filters__name"},f:["Ведомства"]}," ",{t:7,e:"div",a:{class:"b-search-filters__content"},f:[{t:4,f:[{t:7,e:"label",a:{class:"b-field b-field_input b-field_input_checkbox"},v:{click:{n:"addFilter",a:["org"]}},f:[{t:7,e:"div",a:{class:"b-field__label"},f:[{t:2,r:"name"}]}," ",{t:7,e:"div",a:{class:"b-field__wrapper"},f:[{t:7,e:"input",a:{class:"b-field__input b-field__input_checkbox",type:"checkbox"},m:[{t:2,x:{r:["checked"],s:'_0?"checked":""'}}]}," ",{t:7,e:"span",a:{class:"b-field__icon"}}]}]}],i:"i",r:"filters.org"}]}]}," ",{t:7,e:"div",a:{class:"b-search-filters__wrapper b-search-filters__wrapper_doc-theme group"},f:[{t:7,e:"div",a:{class:"b-search-filters__name"},f:["Тема документа"]}," ",{t:7,e:"div",a:{class:"b-search-filters__content"},f:[{t:4,f:[{t:7,e:"label",a:{class:"b-field b-field_input b-field_input_checkbox"},v:{click:{n:"addFilter",a:["themes"]}},f:[{t:7,e:"div",a:{class:"b-field__label"},f:[{t:2,r:"name"}]}," ",{t:7,e:"div",a:{class:"b-field__wrapper"},f:[{t:7,e:"input",a:{class:"b-field__input b-field__input_checkbox",type:"checkbox"},m:[{t:2,x:{r:["checked"],s:'_0?"checked":""'}}]}," ",{t:7,e:"span",a:{class:"b-field__icon"}}]}]}],i:"i",r:"filters.themes"}]}]}," ",{t:7,e:"div",a:{class:"b-search-filters__wrapper b-search-filters__submit group"},f:[" ",{t:7,e:"label",a:{class:["b-field b-field_input b-field_input_submit ",{t:2,x:{r:["loading"],s:'_0?"b-spinner":""'}}]},f:[{t:7,e:"div",a:{class:"b-field__wrapper"},f:[{t:7,e:"input",a:{class:"b-field__input b-field__input_submit",type:"submit",value:"Применить"},v:{click:"find"}}]}]}," "]}," ",{t:7,e:"div",a:{class:"b-search-filters__wrapper b-search-filters__reset group"},f:[{t:7,e:"a",a:{class:"b-link b-link_blue"},f:["Сбросить фильтр"]}]}]}]}},{}],21:[function(e,t,i){var n=e("./config").searchFilters,s=e("./config").documentsFilters,a=e("../b-search-filters.ihtml"),r=e("../b-search-filters_doc.ihtml"),o=Ractive.extend({template:function(){return"search"===this.get("type")?a:r},data:function(){return{paper:!1,period:"any",loading:!1}},oninit:function(){var e=this;RG.logger.log("SearchFilters"),"document"===this.get("type")&&(this.ctrlDocFilter(RG.ScreenViewer.getScreenInfo().type),RG.events.subscribe(RG.ScreenViewer._modulePrefix+".update",function(t,i){e.ctrlDocFilter(i.type)}));var t=RG.query.get(),i={};switch(this.set("searchFilters","search"===this.get("type")?{themes:[],materialTypes:[],projects:[],origin:null}:{themes:[],doctype:[],materialTypes:["doc"],statuses:[],org:[]}),this.get("type")){case"search":this.set("filters",n);break;case"document":this.set("filters",s)}this.on({addFilter:this.addFilter.bind(this),setPeriod:this.setPeriod.bind(this),paper:this.setPaper.bind(this),find:RG.events.publish.bind(RG.events,"search.find"),setOrigin:RG.events.publish.bind(RG.events,"search.filters.update",this.get("searchFilters"))}),t&&!_.isEmpty(t)&&!function(){t.projects&&(i.projects=t.projects.split(",")),t.materialTypes&&(i.materialTypes=t.materialTypes.split(",")),t.doctype&&(i.doctype=t.doctype.split(",")),t.org&&(i.org=t.org.split(",")),t.themes&&(i.themes=t.themes.split(",")),t.statuses&&(i.statuses=t.statuses.split(",")),_.isString(t.from)&&_.isString(t.to)&&(i.from=t.from,i.to=t.to);var n=e.get("filters"),s=_.extend(e.get("searchFilters"),i);e.set("searchFilters",s),_.each(n,function(e,t){_.isArray(e)&&_.each(e,function(e){"undefined"!=typeof s[t]&&s[t].indexOf(e.value)!==-1&&(e.checked=!0)})}),e.set("filters",n),e.emitFilters()}(),RG.events.subscribe("search.find",function(t){RG.logger.log(t),e.set("loading",!0)}),RG.events.subscribe("search.result.show",function(t){RG.logger.log(t),e.set("showResult",!0),e.set("loading",!1)}),RG.events.subscribe("date.picked",function(t,i){RG.logger.info(t);var n=i.get("searchFilters.from")||moment().format("DD.MM.YYYY"),s=i.get("searchFilters.to")||moment().format("DD.MM.YYYY");n=moment(new Date(n.split(".").reverse().join("/"))),s=moment(new Date(s.split(".").reverse().join("/"))),n.diff(s)>0&&(s=n,RG.events.publish("datepicker.wrongDate",s.format("YYYY-MM-DD"))),e.set("searchFilters.from",n.format("DD.MM.YYYY")),e.set("searchFilters.to",s.format("DD.MM.YYYY")),e.emitFilters()}),RG.events.subscribe("search.filters.panel.show",function(t,i){e.set("show",i)})},addFilter:function(e,t){var i=e.keypath+".checked",n=this.get("searchFilters."+t);this.toggle(i),this.get(i)?(Array.prototype.push.call(n,e.context.value),this.set("searchFilters."+t,n)):(Array.prototype.splice.call(n,_.findIndex(e.context.value),1),this.set("searchFilters."+t,n)),this.emitFilters(),e.original.preventDefault(),e.original.stopPropagation()},setPeriod:function(e,t){var i=null,n=moment().format("DD.MM.YYYY");switch(t){case"any":RG.events.publish("pickers.clear");break;case"today":i=moment();break;case"yestarday":i=moment().subtract(1,"days"),n=moment().subtract(1,"days").format("DD.MM.YYYY");break;case"week":i=moment().subtract(1,"weeks");break;case"month":i=moment().subtract(1,"months");break;case"year":i=moment().subtract(1,"years")}i&&(i=i.format("DD.MM.YYYY")),this.set("searchFilters.to",n),this.set("searchFilters.from",i),this.emitFilters(),e.original.preventDefault(),e.original.stopPropagation()},setPaper:function(e){this.toggle("paper"),e.original.preventDefault(),e.original.stopPropagation()},emitFilters:function(){var e=_.objFilter(this.get("searchFilters"),function(e){return!_.isEmpty(e)});RG.events.publish("search.filters.update",e)},ctrlDocFilter:function(e){"desktop"===e||"desktopFull"===e?(this.set("show",!0),RG.events.publish("search.filters.show",{state:"boolean",val:!0})):(this.set("show",!1),RG.events.publish("search.filters.show",{state:"boolean",val:!1}))}});t.exports=o},{"../b-search-filters.ihtml":19,"../b-search-filters_doc.ihtml":20,"./config":22}],22:[function(e,t,i){var n={documentsFilters:{themes:[{value:"tema/gos",name:"Власть"},{value:"tema/ekonomika",name:"Экономика"},{value:"tema/regional",name:"В регионах"},{value:"tema/mir",name:"В мире"},{value:"tema/bezopasnost",name:"Происшествия"},{value:"tema/obshestvo",name:"Общество"},{value:"tema/sport",name:"Спорт"},{value:"tema/kultura",name:"Культура"}],org:[{name:"Все ведомства",value:"all",check:!0},{name:"Президент",value:"org/prezident",subDepartments:[{name:"Администрация Президента",value:"org/prezident/admin"},{name:"Совет Безопасности",value:"org/prezident/sovbez"},{name:"Государственный Совет",value:"org/prezident/gossovet"},{name:"Полпреды Президента в федеральных округах",value:"org/prezident/polpred"},{name:"Главное управление специальных программ",value:"org/prezident/gusp"},{name:"Общественная палата",value:"org/prezident/palata"},{name:"Совет по правам человека",value:"org/prezident/sovet"},{name:"Уполномоченный по правам ребенка",value:"org/prezident/detombudsmen"},{name:"Уполномоченный по правам человека",value:"org/prezident/prava"},{name:"Управление делами Президента",value:"org/prezident/upravdelami"}]},{name:"Законодательная власть",value:"org/zakon",subDepartments:[{name:"Госдума",value:"org/zakon/gosduma"},{name:"Совет Федерации",value:"org/zakon/sovfed"}]},{name:"Правительство",value:"org/pravitelstvo",subDepartments:[{name:"Председатель Правительства",value:"org/pravitelstvo/premier"},{name:"Вице-премьеры",value:"org/pravitelstvo/vicepremijery"},{name:"Президиум",value:"org/pravitelstvo/prezidium"},{name:"Аппарат Правительства",value:"org/pravitelstvo/apparat"},{name:"Министерство иностранных дел",value:"org/pravitelstvo/mid"},{name:"Государственная фельдъегерская служба (ГФС)",value:"org/pravitelstvo/feldegeri"},{name:"Служба внешней разведки (СВР)",value:"org/pravitelstvo/razvedka"},{name:"Федеральная служба охраны (ФСО)",value:"org/pravitelstvo/fso"},{name:"Федеральная служба по финансовому мониторингу (Росфинмониторинг)",value:"org/pravitelstvo/fedmonitoring"},{name:"Генеральная прокуратура",value:"org/pravitelstvo/genprok"},{name:"Следственный комитет (СК)",value:"org/pravitelstvo/sledkom"},{name:"Министерство культуры",value:"org/pravitelstvo/minkultmk"},{name:"Министерство по делам Крыма",value:"org/pravitelstvo/minkrym"},{name:"Министерство по делам Северного Кавказа",value:"org/pravitelstvo/minsevkavkaz"},{name:"Министерство по развитию Дальнего Востока",value:"org/pravitelstvo/daliniy"},{name:"Министерство спорта",value:"org/pravitelstvo/minsport"},{name:"Министерство строительства и жилищно-коммунального хозяйства (Минстрой)",value:"org/pravitelstvo/stroitelstvozhkh"},{name:"Министерство транспорта",value:"org/pravitelstvo/mintranssvyaz"},{name:"Министерство труда и социальной защиты",value:"org/pravitelstvo/trud"},{name:"Министерство энергетики",value:"org/pravitelstvo/minenergo"},{name:"Федеральная антимонопольная служба (ФАС)",value:"org/pravitelstvo/fedantimonopol"},{name:"Федеральная служба государственной статистики (Росстат)",value:"org/pravitelstvo/statistika"},{name:"Федеральная миграционная служба (ФМС)",value:"org/pravitelstvo/migracia"},{name:"Федеральная служба по надзору в сфере защиты прав потребителей и благополучия человека (Роспотребнадзор)",value:"org/pravitelstvo/potrebnadzor"},{name:"Рособоронзаказ",value:"org/pravitelstvo/oboronzakaz"},{name:"Федеральная служба по регулированию алкогольного рынка (Росалкогольрегулирование)",value:"org/pravitelstvo/posalk"},{name:"Федеральная служба по финансовым рынкам (ФСФР)",value:"org/pravitelstvo/fktsb"},{name:"Федеральная служба по экологическому, технологическому и атомному надзору (Ростехнадзор)",value:"org/pravitelstvo/atom"},{name:"Федеральное космическое агентство (Роскосмос)",value:"org/pravitelstvo/kosmos"},{name:"Федеральное агентство по обустройству государственной границы (Росграница)",value:"org/pravitelstvo/rosgranica"},{name:"Федеральное агентство научных организаций (ФАНО)",value:"org/pravitelstvo/fano"},{name:"Министерство внутренних дел",value:"org/pravitelstvo/mvd"},{name:"Министерство по чрезвычайным ситуациям",value:"org/pravitelstvo/emercom"},{name:"Министерство обороны",value:"org/pravitelstvo/minoboroni"},{name:"Министерство юстиции",value:"org/pravitelstvo/minyust"},{name:"Федеральная служба безопасности (ФСБ)",value:"org/pravitelstvo/fsb"},{name:"Федеральная служба по контролю за оборотом наркотиков (ФСКН)",value:"org/pravitelstvo/narkomitet"},{name:"Министерство здравоохранения и социального развития",value:"org/pravitelstvo/minzdravsoc"},{name:"Министерство образования и науки",value:"org/pravitelstvo/minobrnauka"},{name:"Министерство природных ресурсов и экологии",value:"org/pravitelstvo/minprirody"},{name:"Министерство промышленности и торговли",value:"org/pravitelstvo/minpromenergo"},{name:"Министерство регионального развития",value:"org/pravitelstvo/minreg"},{name:"Министерство связи и массовых коммуникаций",value:"org/pravitelstvo/svyazj"},{name:"Министерство сельского хозяйства",value:"org/pravitelstvo/minselhoz"},{name:"Министерство финансов",value:"org/pravitelstvo/minfin"},{name:"Министерство экономического развития",value:"org/pravitelstvo/minekonom"},{name:"Федеральная таможенная служба (ФТС)",value:"org/pravitelstvo/fts"},{name:"Федеральная служба по тарифам (ФСТ)",value:"org/pravitelstvo/slujba-tarif"}]},{name:"Судебная власть",value:"org/sudvlast",subDepartments:[{name:"Конституционный суд",value:"org/sudvlast/konstsud"},{name:"Верховный суд",value:"org/sudvlast/sudobshyurisdik/verhsud"},{name:"Суды общей юрисдикции",value:"org/sudvlast/sudobshyurisdik"},{name:"Военные суды",value:"org/sudvlast/voensud"}]},{name:"Госфонды и контрольные органы",value:"org/goskontrol",subDepartments:[{name:"Агентство стратегических инициатив",value:"org/goskontrol/asi"},{name:"Российский фонд прямых инвестиций",value:"org/goskontrol/investicii"},{name:"Российский фонд федерального имущества (РФФИ)",value:"org/goskontrol/gosfond"},{name:"Счетная палата",value:"org/goskontrol/schet"},{name:"Пенсионный фонд",value:"org/goskontrol/pensii"},{name:"Федеральный фонд обязательного медицинского страхования",value:"org/goskontrol/ffomc"},{name:"Фонд социального страхования",value:"org/goskontrol/sotcial"},{name:"Центральная избирательная комиссия",value:"org/goskontrol/cik"},{name:"Центральный банк России",value:"org/goskontrol/zbrf"}]}],doctype:[{name:"Все типы",value:"any"},{name:"Федеральный закон",value:"fedzakon"},{name:"Постановление",value:"postanov"},{name:"Указ",value:"ukaz"},{name:"Приказ",value:"prikaz"},{name:"Сообщение",value:"soobshenie"},{name:"Распоряжение",value:"raspr"},{name:"Законопроект",value:"zakonoproekt"}],statuses:[{value:"publishing",name:"Опубликован"},{value:"effective",name:"Вступает в силу"},{value:"lost",name:"Утратил силу"}]},searchFilters:{themes:[{value:"tema/gos",name:"Власть"},{value:"tema/ekonomika",name:"Экономика"},{value:"tema/regional",name:"В регионах"},{value:"tema/mir",name:"В мире"},{value:"tema/bezopasnost",name:"Происшествия"},{value:"tema/obshestvo",name:"Общество"},{value:"tema/sport",name:"Спорт"},{value:"tema/kultura",name:"Культура"}],materialTypes:[{value:"art",name:"Новости"},{value:"dok",name:"Документы"},{value:"fot",name:"Фоторепортажи"}],origins:[{value:"rg",name:"Российская газета"},{value:"rodina",name:"Родина"}],projects:[{value:"sila",name:"Русское оружие"},{value:"rgdigital",name:"Digital"},{value:"kino",name:"Кинократия"}],periods:[{value:"any",name:"Любой"},{value:"today",name:"За сегодня"},{value:"yestarday",name:"За вчера"},{value:"week",name:"За неделю"},{value:"month",name:"За месяц"},{value:"year",name:"За год"}]}};t.exports=n},{}],23:[function(e,t,i){var n=e("../search-info.ihtml"),s=Ractive.extend({template:n,data:function(){return{sort:!1}},oninit:function(){var e=this;RG.logger.debug("SearchInfo"),this.on({sort:function t(i){var t=e.get("sort")?"date":"relevant";RG.events.publish("search.sort",t),e.toggle("sort"),i.original.preventDefault(),i.original.stopPropagation()}}),RG.events.subscribe("search.result.show",function(t,i){e.set("showResult",!0),e.set("materials",i.count),RG.events.publish("materials.in.pagination",i)})}});t.exports=s},{"../search-info.ihtml":24}],24:[function(e,t,i){t.exports={v:3,t:[{t:4,f:[{t:7,e:"div",a:{class:[{t:2,x:{r:["rgb"],s:'!_0?"b-search-info":"b-search-info__body"'}}," group"]},f:[{t:7,e:"div",a:{class:"b-search-info__meta"},f:[{t:2,r:"materials"}," найдено"]}," ",{t:7,e:"div",a:{class:"b-search-info__sort"},f:["Сортировать: ",{t:7,e:"a",a:{class:"b-search-info__link b-link b-link_blue",href:"#"},v:{click:"sort"},f:[{t:2,x:{r:["sort"],s:'_0?"По дате":"По релевантности"'}}]}]}]}],r:"showResult"}]}},{}],25:[function(e,t,i){t.exports={v:3,t:[{t:4,f:[{t:7,e:"div",a:{class:["b-spinner ",{t:2,r:"class"}]}}],r:"loading"},{t:4,f:[{t:2,r:"txt"}],n:51,r:"loading"}]}},{}],26:[function(e,t,i){var n=e("../b-spinner.ihtml"),s=Ractive.extend({template:n,data:function(){return{txt:"",loading:!1,class:""}},oninit:function(){RG.logger.debug("Spinner"),this.on({test:function(e){e.original.preventDefault()}})}});t.exports=s},{"../b-spinner.ihtml":25}],27:[function(e,t,i){t.exports={v:3,t:[{t:7,e:"label",a:{class:"b-field b-field_input b-field_input_checkbox b-comment__check"},v:{click:"subscribe"},f:[{t:7,e:"div",a:{class:"b-field__label"},f:[{t:2,r:"txt"}]}," ",{t:7,e:"div",a:{class:"b-field__wrapper"},f:[{t:7,e:"input",a:{class:"b-field__input b-field__input_checkbox",name:"newsletter",type:"checkbox"},m:[{t:2,x:{r:["subscribed"],s:'_0?"checked":""'}}]}," ",{t:7,e:"span",a:{class:"b-field__icon"}}]}]}]}},{}],28:[function(e,t,i){var n=e("../b-subscribe-comments.ihtml"),s=Ractive.extend({template:n,data:function(){return{material:RG.meta.getMaterial(),subscribed:!RG.meta.getMaterial(),txt:"",subscribeMsg:"",subscribeClass:""}},oninit:function(){var e=this;RG.logger.debug("SubscribeComments"),this.on({subscribe:function(t){var i=e.get("subscribed"),n=e.get("material");RG.session.isAuthorized()?i?RG.events.publish("subscribe.comments.remove",n):RG.events.publish("subscribe.comments.add",n):RG.events.publish("login"),t.original.preventDefault()}}),RG.events.registerList({"subscribe.comments.added":function(t,i){var n=e.get("material");i===n&&(e.set("subscribed",!0),e.set("subscribeClass","b-input-notification_success"),e.set("subscribeMsg",null),e.set("subscribeMsg","Вы подписались на комментарии"))},"subscribe.comments.removed":function(t,i){var n=e.get("material");RG.logger.info(t),i===n&&(e.set("subscribed",!1),e.set("subscribeClass","b-input-notification_error"),e.set("subscribeMsg",null),e.set("subscribeMsg","Вы отписались от комментариев"))}})}});t.exports=s},{"../b-subscribe-comments.ihtml":27}],29:[function(e,t,i){var n=e("../tabs.ihtml"),s=Ractive.extend({template:n,data:function(){return{selected:0,items:[]}},oninit:function(){RG.logger.debug("Tabs")},onrender:function(){var e=this,t=this.get("selected"),i=this.findAll(".b-tabs__item")[t],n=_.debounce(function(t,i){var n=e.get("items"),s=_.findIndex(n,i),a=i.topic||"tab.click.${index}",r=i.data||null;e.set("selected",s),e.setPosition(t.node),RG.events.publish(a,r)},500);this.setPosition(i),this.on("select",n),RG.events.subscribe("tab.selected.set",function(t,i){RG.logger.info(t),e.setPosition(i)})},setPosition:function(e){var t=null,i=null,n=null;e&&$(this.el).find(e).length&&(t=$(e),i=t.position().left,n=t.width(),this.set("left",i),this.set("width",n))}});t.exports=s},{"../tabs.ihtml":30}],30:[function(e,t,i){t.exports={v:3,t:[{t:7,e:"div",a:{class:"b-tabs"},f:[{t:7,e:"div",a:{class:"b-tabs__item b-tabs__item_underline",style:["left: ",{t:2,r:"left"},"px; width: ",{t:2,r:"width"},"px;"]}}," ",{t:4,f:[{t:7,e:"div",a:{class:["b-tabs__item ",{t:2,x:{r:["item.class","i"],s:'_0?_0:"b-tab__item_"+_1'}}]},v:{click:{n:"select",d:[{t:2,r:"."}]}},f:[{t:7,e:"div",a:{class:["b-tabs__title ",{t:2,x:{r:["i","selected"],s:'_0===_1?"b-tab__title_selected":""'}}]},f:[{t:3,r:"title"}]}]}],i:"i",r:"items"}]}]}},{}],31:[function(e,t,i){t.exports={v:3,t:[{t:7,e:"div",a:{class:"b-video-inner__body"},f:[{t:7,e:"div",a:{class:"b-video-inner__video"},f:[{t:7,e:"rg-video",a:{file:[{t:2,r:"video.file"}],image:[{t:2,r:"video.image"}],url:[{t:2,r:"video.url"}],ratio:[{t:2,r:"video.ratio"}]}}]}," ",{t:7,e:"div",a:{class:"b-video-inner__content"},f:[{t:7,e:"h3",a:{class:"b-video-inner__name"},f:[{t:7,e:"a",a:{class:"b-link b-link_blue",href:[{t:2,r:"url"}]},f:[{t:2,r:"name"}]}]}," ",{t:7,e:"h4",a:{class:"b-video-inner__title"},f:[{t:7,e:"a",a:{class:"b-link",href:[{t:2,r:"urlMaterial"}]},f:[{t:2,r:"video.title"}]}]}," ",{t:7,e:"div",a:{class:"b-video-inner__feed-link"},f:[{t:7,e:"a",a:{class:"b-link b-link_blue",href:[{t:2,r:"urlallfeed"}]},f:[{t:2,r:"titleallfeed"}]}]}]}]}]}},{}],32:[function(e,t,i){var n=e("../b-video-inner.ihtml"),s=e("../../../main/b-video/scripts/Video"),a=Ractive.extend({template:n,components:{"rg-video":s},data:function(){return{name:null,url:null,urlallfeed:null,titleallfeed:null,datauriparam:null,video:null}},oninit:function(){RG.logger.debug("Video Inner from component init")},onrender:function(){this.getData()},getData:function(){var e=this;$.get("/include/obj-article/"+this.get("datauriparam")+"/show-videos/has-video/num-1/index.json").done(function(t){var i=null,n=null;try{i=t[0],n=t[0].videos[0],e.set("video",{file:n.video_file,image:n.image_file,title:n.title,uannounce:n.text,url:n.url,ratio:n.aspect_ratio}),e.set("urlMaterial",i.uri)}catch(e){throw new Error(e)}}).fail(function(e){RG.logger.error(e)})}});t.exports=a},{"../../../main/b-video/scripts/Video":70,"../b-video-inner.ihtml":31}],33:[function(e,t,i){var n=function(e,t){function i(e,t){return Math.random()*(t-e)+e}var n=null,s=0,a=t.list,r=0,o=e.length;for(n=i(0,t.fullRate);r',r=Ractive.extend({template:a,data:function(){return{project:null,place:null,items:null,screenInfo:null}},oninit:function(){RG.logger.debug("Yadirect component init")},onrender:function(){var e=this;RG.events.subscribe(RG.ScreenViewer._modulePrefix+".check",function(t){RG.logger.log(t),e.set("screenInfo",RG.ScreenViewer.getScreenInfo()),e.initDirect(),RG.events.subscribe(RG.ScreenViewer._modulePrefix+".update",function(t,i){RG.logger.log(i),e.set("screenInfo",RG.ScreenViewer.getScreenInfo()),e.initDirect()})})},initDirect:function(){var e=this,t=this.get("items"),i="29789",a=e.get("screenInfo"),r=null,o=null,l=null;$.each(t,function(t,c){var u=c.resolution,d=null;u[a.type]?(d=c.blocks,r=n(d,e.getRateMap(d)),l=r.yaDirect,o=l.ad_format+"_"+l.type+"_"+r.id+"_"+Math.random().toString(36).substring(7),e.set("banner.containerId",o),e.set("banner.yaDirect",l),window.yandex_context_callbacks=window.yandex_context_callbacks||[],l.stat_id=s({project:e.get("project"),screenInfo:a,id:r.id,place:e.get("place")}),RG.logger.log(l),window.yandex_context_callbacks.push(function(){Ya.Direct.insertInto(i,o,l)}),e.loadLib()):$("#"+e.get("banner.containerId")).empty()})},loadLib:function(){var e="//an.yandex.ru/system/context.js";$.getScript(e)},getRateMap:function(e){var t={};return t.fullRate=0,t.list=[],$.each(e,function(e,i){var n=i.rate;t.list.push(n),t.fullRate+=n}),t}});t.exports=r},{}],34:[function(e,t,i){t.exports={v:3, t:[{t:7,e:"div",a:{class:"b-button"},f:[{t:7,e:"button",a:{class:"b-button__button b-field__input_submit"},v:{click:"press"},f:[{t:2,r:"txt"}]}]}]}},{}],35:[function(e,t,i){var n=e("../b-button.ihtml"),s=Ractive.extend({template:n,oninit:function(){var e=this;this.on("press",function(t){var i=e.get(),n=e.get("topic");RG.events.publish(n,i),t.original.preventDefault()})}});t.exports=s},{"../b-button.ihtml":34}],36:[function(e,t,i){t.exports={v:3,t:[{t:7,e:"label",a:{class:["b-field b-field_input b-field_input_checkbox ",{t:2,x:{r:["highlighted"],s:'_0?"b-field_input_checkbox_highlighted":""'}}," ",{t:2,x:{r:["required"],s:'_0?"b-field_required":""'}}]},v:{click:"toggle"},f:[{t:4,f:[{t:7,e:"div",a:{class:"b-field__label"},f:[{t:3,r:"label"}]}],r:"label"}," ",{t:7,e:"div",a:{class:"b-field__wrapper"},f:[{t:7,e:"input",a:{class:"b-field__input b-field__input_checkbox",type:"checkbox"},m:[{t:2,x:{r:["value"],s:'_0?"checked":""'}}]}," ",{t:7,e:"span",a:{class:"b-field__icon"}}]}]}]}},{}],37:[function(e,t,i){var n=e("../../b-form/scripts/FormTools"),s=e("../b-checkbox.ihtml"),a=Ractive.extend(n,{template:s,data:function(){return{name:"checkbox",highlight:!0,highlighted:!1}},oninit:function(){var e=this,t=this.get("form"),i=this.get("name");RG.events.subscribe("form."+t+".set."+i,function(t,i){e.set("value",i)}),this.on("toggle",function(n){e.toggle("value"),RG.events.publish("form."+t+".update."+i,e.get("value")),n.original.preventDefault()})},reset:function(){this.set("value",!1)},check:function(){return!this.get("required")||this.get("value")}});t.exports=a},{"../../b-form/scripts/FormTools":42,"../b-checkbox.ihtml":36}],38:[function(e,t,i){var n=e("../../b-input/scripts/Input"),s=n.extend({data:function(){return{name:"email",type:"email",placeholder:"e-mail",format:"email",label:""}}});t.exports=s},{"../../b-input/scripts/Input":46}],39:[function(e,t,i){t.exports={v:3,t:[{t:7,e:"div",a:{class:["b-form-message b-form-message",{t:2,x:{r:["show"],s:'_0?"_show":""'}}]},f:[{t:7,e:"div",a:{class:"b-form-message__content"},f:[{t:7,e:"p",a:{class:"b-form-message__text"},f:[{t:3,r:"txt"}]}," ",{t:7,e:"rg-button",a:{txt:[{t:2,r:"button"}],topic:["'form.",{t:2,r:"form"},".message.hide'"]}}]}]}]}},{}],40:[function(e,t,i){var n=e("../../b-button/scripts/Button"),s=e("../b-form-message.ihtml"),a=Ractive.extend({template:s,components:{"rg-button":n},oninit:function(){var e=this,t=this.get("form");RG.events.subscribe("form."+t+".message.show",function(t){RG.logger.info(t),e.set("show",!0)}),RG.events.subscribe("form."+t+".message.hide",function(t){RG.logger.info(t),e.set("show",!1)})}});t.exports=a},{"../../b-button/scripts/Button":35,"../b-form-message.ihtml":39}],41:[function(e,t,i){var n=function(){function e(t){if(_classCallCheck(this,e),RG.logger.debug("Form"),this.el=t.el,this.options=t.data||{},this.template=t.data.template,this.formData={},_.isEmpty(this.options.tmpl)){var i=RG.parser.findComponents(this.el);this.setAllComponents(i)}else this._getTemplate()}return _createClass(e,[{key:"setAllComponents",value:function(e){this.registerEvents(e),this.fields=this.renderComponents(e)}},{key:"updateFormData",value:function(e,t){var i=e.split(".").pop();RG.logger.info(e),this.formData[i]=t,RG.logger.log("name: "+i+" - "+this.formData[i])}},{key:"setFormData",value:function(e){var t=this;!_.isEmpty(e)&&this.fields.length&&_.each(e,function(e,i){RG.events.publish("form."+t.options.name+".set."+i,e)})}},{key:"getFormData",value:function(){var e={};return this.fields.length&&_.each(this.fields,function(t){var i=t.get("name"),n=t.get("value");!_.isEmpty(i)&&n&&(e[i]=n)}),e.form_id=parseInt(this.options.id,10),e.article_id=RG.meta.getMaterial()||0,e.user_id=RG.session.getUserData().id||0,e}},{key:"renderForm",value:function(e){$(this.el).html(e);var t=RG.parser.findComponents(this.el);this.setAllComponents(t)}},{key:"renderComponents",value:function(e){var t=[];return RG.parser.init(),e.length&&_.each(e,function(e){var i=RG.parser.render(e.tag);t=t.concat(i)}),t}},{key:"registerEvents",value:function(e){var t=this;RG.events.subscribe("form."+this.options.name+".submit",this._submit.bind(this)),_.each(e,function(e){RG.events.subscribe("form."+t.options.name+".update."+e.data.name,t.updateFormData.bind(t))})}},{key:"validate",value:function(){var e=this.fields,t=this.fields.length,i=!0;if(t)for(var n=0;n=n&&RG.events.publish("form."+e+"."+t+".reached.max",a),RG.events.publish("form."+e+".update."+t,a))})},validate:function(e){var t=null;return this.check()?t=!this.highlight(!1):(e&&this.showMsg(),t=!this.highlight(!0)),t},showMsg:function(){var e=null,t=this.get("error"),i=this.get("type");e=t?t:RG.config.messages[i+"NotValid"]||RG.config.messages.inputNotValid,this.set("errorMsg",null),this.set("errorMsg",e)},highlight:function(e){return this.get("highlight")&&this.set("highlighted",e),e},resetField:function(){"submit"!==this.get("type")&&this.set("value",null)}});t.exports=n},{}],43:[function(e,t,i){t.exports={v:3,t:[{t:4,f:[{t:7,e:"div",t0:"fade",a:{class:["b-input-notification ",{t:2,r:"class"}]},v:{click:"notify"},f:[{t:7,e:"p",a:{class:"b-input-notification__msg"},f:[{t:3,r:"msg"}]}]}],r:"show"}]}},{}],44:[function(e,t,i){var n=e("../b-input-notification.ihtml"),s=Ractive.extend({template:n,timeOut:null,data:function(){return{msg:"",show:!1,class:""}},oninit:function(){RG.logger.debug("InputNotification"),this.observe("msg",this.showMsg.bind(this))},showMsg:function(e){var t=this;RG.logger.trace("notification"),RG.logger.log(e),clearTimeout(this.timeOut),""!==this.get("msg")&&(this.set("show",!0),this.timeOut=setTimeout(function(){t.set("show",!1)},this.get("off"))),this.on("notify",function(){RG.events.publish("notification.click")})}});t.exports=s},{"../b-input-notification.ihtml":43}],45:[function(e,t,i){t.exports={v:3,t:[{t:7,e:"label",a:{class:["b-field b-field_input b-field_input_text ",{t:2,x:{r:["highlighted"],s:'_0?"b-field_input_text_highlighted":""'}}," b-field_input_",{t:2,r:"type"}," ",{t:2,x:{r:["required"],s:'_0?"b-field_required":""'}}]},f:[{t:4,f:[{t:7,e:"div",a:{class:"b-field__label"},f:[{t:3,r:"label"}]}],r:"label"}," ",{t:7,e:"div",a:{class:"b-field__wrapper"},f:[{t:7,e:"input-notification",a:{msg:[{t:2,r:"errorMsg"}],off:"5000"}}," ",{t:7,e:"input",a:{name:[{t:2,r:"name"}],class:["b-field__input b-field__input_text b-field__input_",{t:2,r:"type"}],type:[{t:2,r:"type"}],placeholder:[{t:2,r:"placeholder"}],value:[{t:2,r:"value"}]},m:[{t:4,f:['maxlength="',{t:2,r:"size"},'"'],r:"maxlength"}]}," ",{t:4,f:[{t:4,f:[{t:4,f:[{t:7,e:"div",a:{class:"b-field__maxlength"},f:[{t:2,r:"enteredValueLength"},"/",{t:2,r:"size"}]}],n:51,r:"backward"}," ",{t:4,f:[{t:7,e:"div",a:{class:"b-field__maxlength"},f:[{t:2,r:"enteredValueLength"}]}],r:"backward"}],r:"show"}],r:"maxlength"}]}]}]}},{}],46:[function(e,t,i){var n=e("../../b-input-notification/scripts/InputNotification"),s=e("../../b-form/scripts/FormTools"),a=e("../b-input.ihtml"),r=Ractive.extend(s,{template:a,components:{"input-notification":n},data:function(){return{highlight:!0,highlighted:!1,type:"text",name:"input"}},oninit:function(){var e=this,t=this.get("form"),i=this.get("name");RG.events.subscribe("form."+t+".set."+i,function(t,i){e.set("value",i)}),this.observe("value",function(e,n){_.isEmpty(e)||e===n||RG.events.publish("form."+t+".update."+i,e)}),this.checkMaxLength(t,i)},check:function(){var e=this.get("pattern")||/.+/gi,t=this.get("format"),i=this.get("value");return t&&(e=RG.config.formats[t]),!this.get("required")||e.test(i)}});t.exports=r},{"../../b-form/scripts/FormTools":42,"../../b-input-notification/scripts/InputNotification":44,"../b-input.ihtml":45}],47:[function(e,t,i){var n=e("../../b-input/scripts/Input"),s=n.extend({data:function(){return{name:"name",type:"text",placeholder:"Имя",format:"name"}}});t.exports=s},{"../../b-input/scripts/Input":46}],48:[function(e,t,i){t.exports={v:3,t:[{t:7,e:"label",a:{class:["b-field b-field_select b-field_select_select ",{t:2,x:{r:["highlighted"],s:'_0?"b-field_select_highlighted":""'}}," ",{t:2,x:{r:["required"],s:'_0?"b-field_required":""'}}]},f:[{t:4,f:[{t:7,e:"div",a:{class:"b-field__label"},f:[{t:2,r:"label"}]}],r:"label"}," ",{t:7,e:"div",a:{class:"b-field__wrapper"},f:[{t:7,e:"select",a:{class:"b-field__select b-field__select_select",value:[{t:2,r:"selectedOption"}],type:"select"},v:{change:"select"},f:[{t:4,f:[{t:4,f:[{t:4,f:[{t:7,e:"option",a:{value:[{t:2,r:"value"}]},f:[{t:3,r:"content"}]}],n:50,x:{r:["value"],s:"_0!==null&&_0!==undefined"}},{t:4,n:51,f:[{t:7,e:"option",a:{value:[{t:2,r:"."}]},f:[{t:3,r:"content"}]}],x:{r:["value"],s:"_0!==null&&_0!==undefined"}}],r:"isObject"}," ",{t:4,f:[{t:7,e:"option",a:{value:[{t:2,r:"."}]},f:[{t:3,r:"."}]}],n:51,r:"isObject"}],r:"items"}]}]}]}]}},{}],49:[function(e,t,i){var n=e("../b-select.ihtml"),s=e("../../b-form/scripts/FormTools"),a=Ractive.extend(s,{template:n,data:function(){return{items:[],selectedOption:null,name:"select",isObject:!0,highlight:!0,highlighted:!1}},oninit:function(){RG.logger.debug("Select")},onrender:function(){var e=this,t=this.get("items");this.set("isObject",_.isObject(t[0])),this.on({select:function(t){var i=e.get("selectedOption"),n=e.get("form"),s=e.get("name");i&&(i.href&&"#"!==i.href?document.location.href=i.href:i.topic?RG.events.publish(i.topic,i):RG.events.publish("form."+n+".update."+s,i),e.get("value")&&e.set("value",i)),RG.logger.log(e),t.original.preventDefault()}})},check:function(){return!this.get("required")||this.get("value")}});t.exports=a},{"../../b-form/scripts/FormTools":42,"../b-select.ihtml":48}],50:[function(e,t,i){t.exports={v:3,t:[{t:7,e:"label",a:{class:"b-field b-field_type_comment b-field_input b-field_input_submit"},f:[{t:7,e:"div",a:{class:"b-field__wrapper"},f:[{t:7,e:"input",a:{class:"b-field__input b-field__input_submit",type:"submit",value:[{t:2,r:"text"}]},v:{click:"submit"}}]}]}]}},{}],51:[function(e,t,i){var n=e("../b-submit.ihtml"),s=Ractive.extend({template:n,data:function(){return{type:"submit"}},oninit:function(){var e=this;this.on("submit",function(){var t=e.get(),i=e.get("form");RG.events.publish("form."+i+".submit",t)})}});t.exports=s},{"../b-submit.ihtml":50}],52:[function(e,t,i){t.exports={v:3,t:[{t:7,e:"label",a:{class:["b-field b-field_textarea b-field_textarea_textarea ",{t:2,x:{r:["highlighted"],s:'_0?"b-field_textarea_highlighted":""'}}," ",{t:2,x:{r:["required"],s:'_0?"b-field_required":""'}}]},f:[{t:4,f:[{t:7,e:"div",a:{class:"b-field__label"},f:[{t:2,r:"label"}]}],r:"label"}," ",{t:7,e:"div",a:{class:"b-field__wrapper"},f:[{t:7,e:"textarea",a:{name:[{t:2,r:"name"}],class:"b-field__textarea b-field__textarea_textarea",placeholder:[{t:2,r:"placeholder"}],value:[{t:2,r:"value"}]},m:[{t:4,f:['maxlength="',{t:2,r:"size"},'"'],r:"maxlength"}]}," ",{t:4,f:[{t:4,f:[{t:4,f:[{t:7,e:"div",a:{class:"b-field__maxlength"},f:[{t:2,r:"enteredValueLength"},"/",{t:2,r:"size"}]}],n:51,r:"backward"}," ",{t:4,f:[{t:7,e:"div",a:{class:"b-field__maxlength"},f:[{t:2,r:"enteredValueLength"}]}],r:"backward"}],r:"show"}],r:"maxlength"}]}]}]}},{}],53:[function(e,t,i){var n=e("../../b-input-notification/scripts/InputNotification"),s=e("../../b-form/scripts/FormTools"),a=e("../b-textarea.ihtml"),r=Ractive.extend(s,{template:a,components:{"input-notification":n},data:function(){return{name:"textarea",highlight:!0,highlighted:!1}},oninit:function(){var e=this,t=this.get("form"),i=this.get("name");RG.events.subscribe("form."+t+".set."+i,function(t,i){e.set("value",i)}),this.observe("value",function(e,n){_.isEmpty(e)||e===n||RG.events.publish("form."+t+".update."+i,e)}),this.checkMaxLength(t,i)},check:function(){var e=this.get("value");return!this.get("required")||!_.isEmpty(e)}});t.exports=r},{"../../b-form/scripts/FormTools":42,"../../b-input-notification/scripts/InputNotification":44,"../b-textarea.ihtml":52}],54:[function(e,t,i){var n=e("../../b-input/scripts/Input"),s=n.extend({data:function(){return{name:"name",type:"text",placeholder:"Ссылка",format:"url"}}});t.exports=s},{"../../b-input/scripts/Input":46}],55:[function(e,t,i){t.exports={v:3,t:[{t:7,e:"div",a:{class:"b-menu-user"},f:[{t:4,f:[{t:4,f:[{t:7,e:"div",a:{class:"b-menu-user__item b-menu-user__item_image"},v:{click:"menu"},f:[{t:7,e:"img",a:{class:"b-menu-user__item-image",src:[{t:2,r:"user.avatar"}],alt:"Моя фотография"}}]}],r:"user.avatar"}],r:"isAuthorized"}," ",{t:7,e:"div",a:{class:"b-menu-user__item b-menu-user__item_type_nav is-mobile"},v:{click:"menu"},f:[{t:7,e:"div",a:{class:"b-menu-user__nav-icon",title:"Меню"},f:[{t:7,e:"div",a:{class:"b-menu-user__nav-icon-line"}}," ",{t:7,e:"div",a:{class:"b-menu-user__nav-icon-line"}}," ",{t:7,e:"div",a:{class:"b-menu-user__nav-icon-line"}}]}]}," ",{t:4,f:[{t:7,e:"div",a:{class:"b-menu-user__item is-tablet"},v:{click:"menu"},f:[{t:7,e:"span",a:{class:"b-menu-user__name"},f:[{t:2,r:"user.firstName"}]}]}," "],r:"isAuthorized"}," ",{t:7,e:"div",a:{style:["display: ",{t:2,x:{r:["showList"],s:'_0?"block":"none"'}}]},f:[{t:7,e:"menu-list",a:{isAuthorized:[{t:2,r:"isAuthorized"}]}}]}," ",{t:4,f:[{t:7,e:"div",a:{class:"b-menu-user__item b-menu-user__item_desktop"},f:[{t:7,e:"div",a:{class:"b-menu-user__login"},f:[{t:7,e:"a",a:{class:"b-link_blue b-icon-aside b-icon-aside_type_login",href:"#"},v:{click:"login"},f:["Войти"]}]}]}],n:51,r:"isAuthorized"}]}]}},{}],56:[function(e,t,i){t.exports={v:3,t:[{t:7,e:"div",a:{class:"b-menu-user__menu"},f:[{t:7,e:"div",a:{id:"userProfileCatalogWrapper",class:"b-menu-user__profile"},f:[{t:7,e:"div",a:{style:["display: ",{t:2,x:{r:["isAuthorized"],s:'_0?"none":"block"'}}]},f:[{t:7,e:"div",a:{class:"b-menu-user__item b-menu-user__item_mobile"},f:[{t:7,e:"a",a:{class:"b-link_blue b-icon-aside b-icon-aside_type_login",href:"#"},v:{click:"login"},f:["Войти"]}]}]}," ",{t:7,e:"div",a:{style:["display: ",{t:2,x:{r:["isAuthorized"],s:'_0?"block":"none"'}}]},f:[{t:7,e:"div",a:{class:"b-menu-user__profile-info"},f:[{t:7,e:"div",a:{class:"b-menu-user__profile-info-name"},f:[{t:7,e:"a",a:{href:"/account"},f:[{t:2,r:"user.firstName"}," ",{t:2,r:"user.lastName"}]}]}," "]}," ",{t:7,e:"div",a:{class:"b-menu-user__profile-links"},f:[{t:7,e:"div",a:{class:"b-menu-user__profile-links-item"},f:[{t:7,e:"a",a:{class:"b-link b-link_title",href:"/account/services/sujets"},f:["Мои сюжеты"]}]}," ",{t:7,e:"div",a:{class:"b-menu-user__profile-links-item"},f:[{t:7,e:"a",a:{class:"b-link b-link_title",href:"/account/services/comments"},f:["Комментарии"]}]}," ",{t:7,e:"div",a:{class:"b-menu-user__profile-links-item"},f:[{t:7,e:"a",a:{class:"b-link b-link_title",href:"/account/services/saved"},f:["Сохранённые статьи"]}]}," ",{t:7,e:"div",a:{class:"b-menu-user__profile-links-item"},f:[{t:7,e:"a",a:{class:"b-link b-link_title",href:"/account/profile"},f:["Настройки профиля"]}]}," ",{t:7,e:"div",a:{class:"b-menu-user__profile-links-item"},f:[{t:7,e:"a",a:{class:"b-link b-link_title",href:"#"},v:{click:"logout"},f:["Выход"]}]}]}]}," ",{t:7,e:"div",a:{class:"b-menu-user__profile-wrapper"},f:[{t:7,e:"div",a:{class:"b-menu-user__profile-title"},f:[{t:7,e:"div",a:{class:"b-categories__body b-categories__body_blue"},f:[{t:7,e:"div",a:{class:"b-categories__list"},f:[{t:7,e:"div",a:{class:"b-categories__item "},f:[{t:7,e:"a",a:{class:"b-link b-link_white b-categories__link",href:"/izdania/"},f:["Наши издания"]}]}]}]}]}," ",{t:7,e:"div",a:{class:"b-menu-user__profile-categories shiftContainer","data-blocksshifterwidthhash":"mobile","data-blocksshifterid":"rgb_categories"}}]}]}]}]}},{}],57:[function(e,t,i){var n=e("../list.ihtml"),s=Ractive.extend({template:n,oninit:function(){RG.logger.debug("List"),this.on("logout",function(){return RG.events.publish("logout"),!1}),this.on("login",function(){return RG.events.publish("login"),!1})}});t.exports=s},{"../list.ihtml":56}],58:[function(e,t,i){var n=e("./List"),s=e("../b-menu-user.ihtml"),a=Ractive.extend({template:s,data:function(){return{showList:!1,user:{},comentsCount:0,isAuthorized:!1}},components:{"menu-list":n},oninit:function(){function e(e){0===$(".b-menu-user").has(e.target).length&&(this.set("showList",!1),RG.events.publish("menu.user.hide"))}var t=this;RG.logger.debug("MenuUser"),this.on("login",function(e){RG.events.publish("login"),e.original.preventDefault()}),this.on("menu",function(i){t.get("showList")?RG.events.publish("menu.user.hide"):RG.events.publish("menu.user.show"),t.toggle("showList"),$(document).on("click.menu",e.bind(t)),i.original.preventDefault()}),RG.events.subscribe("menu.user.hide",function(i){RG.logger.log(i),t.set("showList",!1),$(document).off("click.menu",e.bind(t))}),RG.events.subscribe("session.user.logedout",function(e){RG.logger.log(e),RG.events.publish("menu.user.hide")}),function(){function e(e){var t=window.innerHeight,i=60;e.css("height",t-i)}function t(){$("body").addClass("scroll-disabled")}function i(){$("body").removeClass("scroll-disabled")}try{RG.events.subscribe("menu.user.show",function(i){var n=RG.ScreenViewer.getScreenInfo();RG.logger.log(i),"mobile"===n.type&&(e($("#userProfileCatalogWrapper")),t(),$("#userProfileCatalogWrapper").mCustomScrollbar({autoHideScrollbar:!0}))}),RG.events.subscribe("menu.user.hide",function(e){RG.logger.log(e),i(),$("#userProfileCatalogWrapper").mCustomScrollbar("destroy")})}catch(e){RG.logger.error("Ошибка при определении высоты MenuUser, "+e)}}()}});t.exports=a},{"../b-menu-user.ihtml":55,"./List":57}],59:[function(e,t,i){t.exports={v:3,t:[{t:7,e:"div",a:{class:"b-menu"},f:[{t:7,e:"div",a:{class:"b-menu__wrapper group"},f:[{t:7,e:"menu-geolocation"}," ",{t:7,e:"menu-services",a:{materials:[{t:2,r:"materials"}]}}]}]}]}},{}],60:[function(e,t,i){t.exports={v:3,t:[{t:7,e:"div",a:{class:["b-menu__col b-menu__col_side_left b-menu__geolocation ",{t:2,x:{r:["showRegion"],s:'_0?"b-menu__geolocation_show":"b-menu__geolocation_hide"'}}]},f:[{t:7,e:"div",a:{class:"b-menu__item b-menu__item_type_country"},f:[{t:7,e:"a",a:{class:"b-link b-link_blue b-link_dotted js-modal ajax"},v:{click:"choose"},f:[{t:3,x:{r:["currentRegion.originName"],s:'_0||"Вся Россия"'}}]}," ",{t:7,e:"div",a:{class:"b-switch-region is-desktop"},f:[{t:7,e:"a",a:{href:"#",class:["b-icon ",{t:2,x:{r:["different"],s:'_0?"b-icon_type_region":"b-spinner"'}}," ",{t:2,x:{r:["loading"],s:'_0?"b-spinner_black":""'}}]},v:{click:"swith"}}," ",{t:4,f:[{t:7,e:"span",a:{class:"b-switch-region__text"},f:["Переключиться на ",{t:7,e:"a",a:{href:"#",class:"b-link_blue",title:"Сменить регион"},v:{click:"swith"},f:["новости ",{t:2,r:"newRegion.originGenitiveName"}]}]}],r:"different"}]}]}]}]}},{}],61:[function(e,t,i){var n=e("../geolocation.ihtml"),s=Ractive.extend({template:n,data:function(){return{showRegion:!0}},oninit:function(){var e=this;RG.logger.debug("Geolocation"),this.on({choose:function(e){RG.events.publish("region.overlay.show"),e.original.preventDefault()},swith:function(t){RG.events.publish("geolocation.region.change",e.get("newRegion")),t.original.preventDefault()}}),RG.events.registerList({"geolocation.region.change":function(t){RG.logger.log(t),e.set("loading",!0)},"geolocation.region.changed":function(t){RG.logger.log(t),e.set("loading",!1),e.setRegions.call(e)},"menu.user.show":function(t){RG.logger.log(t),e.set("showRegion",!1)},"menu.user.hide":function(t){RG.logger.log(t),e.set("showRegion",!0)},"geolocation.list":function(t){RG.logger.log(t),e.setRegions.call(e)}}),this.setRegions()},setRegions:function(){var e=RG.session.getUserRegion(),t=RG.session.getCurrentRegion(),i=!_.isEmpty(t)&&parseInt(e.id,10)!==parseInt(t.id,10);_.isEmpty(e)||this.set({currentRegion:e,newRegion:t,different:i})}});t.exports=s},{"../geolocation.ihtml":60}],62:[function(e,t,i){var n=e("./Services"),s=e("./Geolocation"),a=e("../b-menu.ihtml"),r=Ractive.extend({el:"menu",template:a,data:function(){return{materials:null}},components:{"menu-services":n,"menu-geolocation":s},oninit:function(){RG.logger.debug("Menu")}});t.exports=r},{"../b-menu.ihtml":59,"./Geolocation":61,"./Services":63}],63:[function(e,t,i){var n=e("../../b-menu-user/scripts/MenuUser"),s=e("../services.ihtml"),a=Ractive.extend({template:s,data:function(){return{isOpen:!1,viewedActive:!1,followedActive:!1,user:{},isAuthorized:!1,showList:!1}},components:{"menu-user":n},oninit:function(){var e=this;if(RG.logger.debug("Services"),RG.session.isAuthorized()){var t=RG.session.getUserData();t&&this.set("user",t),this.set("isAuthorized",!0)}this.on({choose:function(e){RG.events.publish("region.overlay.show"),e.original.preventDefault()},search:function(e){RG.events.publish("search.overlay.show"),e.original.preventDefault()},viewed:function(t){RG.events.publish("viewed.show"),e.set("viewedActive",!0),t.original.preventDefault()},followed:function(t){RG.events.publish("followed.show"),e.set("followedActive",!0),t.original.preventDefault()}}),RG.events.registerList({"menu.user.show":function(t){RG.logger.info(t),e.set("isOpen",!0)},"menu.user.hide":function(t){RG.logger.info(t),e.set("isOpen",!1)},"colorbox.closed":function(t){RG.logger.info(t),e.set("viewedActive",!1),e.set("followedActive",!1)},"session.user.authorized":function(t){RG.logger.info(t);var i=RG.session.getUserData();e.set("user",i),e.set("isAuthorized",!0)},"session.user.logedout":function(t){RG.logger.info(t),e.set("isAuthorized",!1),e.set("user",{})}})},onrender:function(){RG.logger.log(this)}});t.exports=a},{"../../b-menu-user/scripts/MenuUser":58,"../services.ihtml":65}],64:[function(e,t,i){var n=e("./Menu"),s=e("../../../overlays/b-followed/scripts/Followed"),a=e("../../../overlays/b-viewed/scripts/Viewed"),r=e("../../../overlays/b-sujet-materials/scripts/SujetMaterials"),o=RG.events.registerList,l=[],c=[],u=null,d=null,f=null,h=null,m=function(e){RG.logger.info(e),u=n()},p=function(e,t){RG.logger.info(e),_.isEmpty(t.items)?RG.events.publish("subscribe.sujets.top"):(l=t.items,u.set("materials",t.sum||null))},g=function(e){RG.logger.info(e),RG.events.publish("viewed.get")},b=function(e,t){_.isEmpty(t)?$.get(RG.config.paths.popularMaterials).then(function(e){d=new a({data:{popularMaterials:e}})}):d=new a({data:{materials:t}})},v=function(e){var t={sujets:l,popularSujets:c};RG.logger.info(e),f=new s({data:t})},w=function(e,t){if(!_.findWhere(l,{id:parseInt(t.id,10)})){var i={sujets:l,popularSujets:c};l.push(t),f=new s({data:i})}u.set("materials",null)},y=function(e,t){l=_.filter(l,function(e){return e.id!==parseInt(t.id,10)}),u.set("materials",null)},R=function(e,t){RG.logger.info(e),RG.events.publish("subscribe.sujet.get",t)},k=function(e,t){var i={materials:t},n=u.get("materials"),s=n-_.filter(t,function(e){return e.isNew}).length;s=s>0?s:null,h=new r({data:i}),RG.logger.info(h),u.set("materials",s)},x=function(){RG.events.publish("menu.run")},G=function(){o({"menu.run":m,"followed.run":v,"followed.destroy":function(e){RG.logger.info(e),f&&f.teardown()},"viewed.run":g,"viewed.list":b,"viewed.destroy":function(e){RG.logger.info(e),d&&d.teardown()},"articles.show":R,"subscribe.sujet.list":p,"session.user.authorized":function(e){RG.logger.info(e),RG.events.publish("subscribe.sujet.fetch")},"subscribe.sujet.set":k,"subscribe.sujets.toped":function(e,t){RG.logger.info(e),c=t},"subscribe.sujet.removed":y,"subscribe.sujet.added":w})},S=function(){};t.exports={init:G,run:x,destruct:S}},{"../../../overlays/b-followed/scripts/Followed":92,"../../../overlays/b-sujet-materials/scripts/SujetMaterials":99,"../../../overlays/b-viewed/scripts/Viewed":101,"./Menu":62}],65:[function(e,t,i){t.exports={v:3,t:[{t:7,e:"div",a:{class:["b-menu__col b-menu__col_side_right b-menu__services ",{t:2,x:{r:["isOpen"],s:'_0?"is-open":""'}}]},f:[{t:7,e:"div",a:{class:"b-menu__item b-menu__item_type_actions"},f:[{t:7,e:"div",a:{class:"b-menu__item-icon b-menu__item-icon_search"},f:[{t:7,e:"a",a:{class:"b-icon b-icon_type_search",href:"#",title:"Поиск по сайту"},v:{click:"search"}}]}," ",{t:7,e:"div",a:{class:"b-menu__item-icon b-menu__item-icon_geo"},f:[{t:7,e:"a",a:{class:"b-icon b-icon_type_geo",href:"#",title:"Геопределение"},v:{click:"choose"}}]}," ",{t:4,f:[{t:7,e:"div",a:{class:"b-menu__item-icon"},f:[{t:7,e:"a",a:{class:["b-icon b-icon_type_viewed js-modal-header ",{t:2,x:{r:["viewedActive"],s:'_0?"is-active":""'}}],href:"#",title:"Просмотренные статьи"},v:{click:"viewed"}}]}," ",{t:7,e:"div",a:{class:"b-menu__item-icon"},f:[{t:7,e:"a",a:{class:["b-icon b-icon_type_follow i-follow js-modal-header ",{t:2,x:{r:["followedActive"],s:'_0?"is-active":""'}}],href:"#",title:"Отслеживаемые сюжеты"},v:{click:"followed"},f:[{t:7,e:"span",a:{class:"i-follow__sup"},f:[{t:2,r:"materials"}]}]}]}],r:"isAuthorized"}]}," ",{t:7,e:"div",a:{class:"b-menu__item b-menu__item_type_user"},f:[{t:7,e:"menu-user",a:{isAuthorized:[{t:2,r:"isAuthorized"}],user:[{t:2,r:"user"}],showList:[{t:2,r:"showList"}]}}]}," ",{t:7,e:"menu-user--menu"}]}]}},{}],66:[function(e,t,i){t.exports={v:3,t:[{t:7,e:"div",a:{class:["b-fast-access__body ",{t:2,x:{r:["showMenu"],s:'_0?"b-fast-access_expanded":""'}}]},f:[{t:7,e:"div",a:{class:"b-fast-access__list"},f:[{t:4,f:[],r:"showSujets"}," ",{t:4,f:[],r:"showSujets"}," ",{t:7,e:"div",a:{class:"b-fast-access__list-item b-fast-access__list-item_share",title:"Поделиться"},f:[" ",{t:7,e:"div",a:{class:["b-fast-access__share b-share article-share ",{t:2,x:{r:["share"],s:'_0?"b-fast-access__share_shown":""'}}]},f:[{t:7,e:"div",a:{class:"b-share"},f:[{t:7,e:"rg-share",a:{class:"shareObject"}}," "]}]}," "]}," ",{t:7,e:"div",a:{class:"b-fast-access__list-item"},f:[{t:7,e:"a",a:{class:["b-icon b-icon_type_star ",{t:2,x:{r:["saved"],s:'_0?"is-active":""'}}],href:"#",title:"Сохранить статью"},v:{click:"save"},f:[{t:7,e:"span",a:{class:"b-fast-access__span-title"},f:["Сохранить статью"]}]}]}," ",{t:7,e:"div",a:{class:"b-fast-access__list-item"},f:[{t:7,e:"a",a:{class:["b-icon b-icon_type_comment animated ",{t:2,x:{r:["commentsActive"],s:'_0?"shake":""'}}],href:"#comments_block",title:"Комментарии"},f:[{t:4,f:[{t:7,e:"span",a:{class:["b-icon__qty ",{t:2,x:{r:["commentsActive"],s:'_0?"is-active":""'}}]},f:[{t:2,r:"comments"}]}],r:"comments"}," ",{t:7,e:"span",a:{class:"b-fast-access__span-title"},f:["Комментарии"]}]}]}]}]}]}},{}],67:[function(e,t,i){var n=e("../b-fast-access.ihtml"),s=Ractive.extend({template:n,data:function(){return{materials:null,comments:null,showSujets:RG.meta.getSujet(),showMenu:!1}},onrender:function(){RG.events.publish("share.set",{url:$('meta[property="og:url"]').attr("content"),title:$('meta[property="og:title"]').attr("content"),description:$('meta[name="description"]').attr("content"),image:$('meta[property="og:image"]').attr("content")})},oninit:function(){var e=this;this.set("sujet",RG.meta.getSujet()),RG.logger.debug("FastAccess"),RG.events.publish("fast-access.init"),this.on({expand:function(){},showShare:function(){e.set("share",!0)},hideShare:function(){e.set("share",!1)},news:function(e){RG.session.isAuthorized()?RG.events.publish("fast-access.news"):RG.events.publish("login"),e.original.preventDefault()},share:function(e){e.original.preventDefault()},comment:function(){},save:function(t){RG.logger.log("saved"),RG.session.isAuthorized()?e.get("saved")?RG.events.publish("subscribe.saved.remove",RG.meta.getMaterial()):RG.events.publish("subscribe.saved.add",RG.meta.getMaterial()):RG.events.publish("login"),t.original.preventDefault()}}),RG.events.registerList({"comment.count":function(t,i){var n=e.get("comments");i>n&&e.set("commentsActive",!0),e.set("comments",i)},"sujets.materials.count":function(t,i){var n=e.get("materials");i>n&&e.set("materialsActive",!0),e.set("materials",i)},"subscribe.saved.removed":function(t,i){RG.logger.info(t),RG.logger.info(i),e.set("saved",!1)},"subscribe.saved.added":function(t,i){RG.logger.info(t),RG.logger.info(i),e.set("saved",!0)}})}});t.exports=s},{"../b-fast-access.ihtml":66}],68:[function(e,t,i){var n=Ractive.extend({data:function(){return{dateFormat:RG.datetime.parseVmDate}},oninit:function(){RG.logger.debug("LiveReload")}});t.exports=n},{}],69:[function(e,t,i){t.exports={v:3,t:[{t:7,e:"div",a:{class:["b-video ",{t:2,x:{r:["meta.videoPlaying"],s:'_0?"b-video-playing":""'}}]},f:[{t:7,e:"div",a:{class:"b-video__source jwplayer-root"},o:"jwplayer"}," ",{t:4,f:[{t:7,e:"div",a:{class:"b-video__title"},f:[{t:7,e:"a",a:{class:"b-link b-link_video-title",href:[{t:2,r:"url"}]},f:[{t:3,r:"title"}]}]}],n:50,x:{r:["title"],s:"!!_0"}}," ",{t:4,f:[{t:7,e:"div",a:{class:"b-video__author"},f:["Автор: ",{t:4,f:[{t:7,e:"a",a:{class:"b-link b-link_title",href:[{t:2,r:"uri"}]},f:[{t:2,r:"name"}]},{t:4,f:[", "],n:50,x:{r:["__LAST__","authorsList.length"],s:"!_0&&_1>1"}}],r:"authorsList"}]}],n:50,x:{r:["authorsList.length"],s:"!!_0"}}]}]}},{}],70:[function(e,t,i){var n=function(e){var t=/rg.ru/.test(e)?e:"https://rg.ru"+e,i=location.href;RG.logger.info("send stat "+t+", "+i),window.ga&&ga("send","pageview",t),window.yaCounter22322746&&yaCounter22322746.hit(t,null,i),window._tmr&&_tmr.push({id:"11659",url:t,referrer:i,type:"pageView",start:(new Date).getTime()}),(new Image).src="//counter.yadro.ru/hit?t14.11;r"+escape(i)+("undefined"==typeof screen?"":";s"+screen.width+"*"+screen.height+"*"+(screen.colorDepth?screen.colorDepth:screen.pixelDepth))+";u"+escape(t)+";"+Math.random()},s=e("../b-video.ihtml"),a=Ractive.extend({template:s,data:function(){return{meta:{id:null,playerNode:null,player:null,videoPlaying:!1}}},decorators:{jwplayer:function(e){return this.set("meta.playerNode",e),{teardown:function(){$(e).destroy()}}}},oninit:function(){RG.logger.debug("Video component init")},onrender:function(){this.get("authors")&&this.set("authorsList",JSON.parse(this.get("authors"))),this.observe("file meta.playerNode",function(){this.initPlayer()})},getId:function(){return"rgVideo_"+Math.random().toString(36).substring(7)},initPlayer:function(){var e=this,t=this.getId(),i=this.get("meta.playerNode"),s=null,a=this.get("file"),r=this.get("image"),o=this.get("autoplay"),l=this.get("url"),c=this.get("ratio"),u=null,d=null;i&&a&&(d={width:"100%",aspectratio:c?c:"4:3",sharing:{link:null}},d.file=a,r&&(d.image=r),l&&(d.sharing.link=l),RG.logger.log(this.get()),o&&(d.autostart=!0),s=$(i),s.empty(),s.append($("
",{id:t})),u=jwplayer(t).setup(d),u.onPause(function(){e.set("meta.videoPlaying",!1),RG.logger.log("meta.videoPlayed false")}),u.onPlay(function(){var i=null;e.set("meta.videoPlaying",!0),RG.logger.log("meta.videoPlayed true"),"video"!==RG.meta.getPage()&&(i=$("#"+t),i.attr("data-sended")||"dev"===RG.config.env?RG.logger.log("video stat not send"):(n(l),i.attr("data-sended",!0),RG.logger.log("video stat sended, url: "+l)))}),e.set("meta.player",u))}});t.exports=a},{"../b-video.ihtml":69}],71:[function(e,t,i){t.exports={v:3,t:[{t:7,e:"div",a:{class:"b-auth"},f:[{t:7,e:"div",a:{class:"b-auth__tabs"},f:[{t:7,e:"tabs",a:{items:'[{"title":"Регистрация","topic":"auth.registration"},{"title":"Войти","topic":"auth.enter"}]', selected:"1"}}]}," ",{t:7,e:"div",a:{class:"b-auth__scroll"},f:[{t:7,e:"div",a:{class:"b-auth__content",id:"authContent"}}," ",{t:7,e:"div",f:[]}]}]}]}},{}],72:[function(e,t,i){t.exports={v:3,t:[{t:7,e:"div",a:{class:"b-auth__description"},f:[" ",{t:7,e:"p",a:{class:"b-auth__title"},f:["Для завершения авторизации введите код подтверждения, отправленный Вам на электронную почту."]}]}," ",{t:7,e:"div",a:{class:"b-auth__form"},f:[{t:7,e:"form",a:{class:"b-form form_code"},v:{submit:"submit"},f:[{t:7,e:"div",a:{class:"b-form__row"},f:[{t:7,e:"label",a:{class:"b-field b-field_input b-field_input_text b-auth__input_text"},f:[{t:7,e:"input-notification",a:{msg:[{t:2,r:"errorMsg"}],off:"10000"}}," ",{t:7,e:"div",a:{class:"b-field__wrapper"},f:[{t:7,e:"input",a:{class:"b-field__input b-field__input_text",id:"codeInput",name:"codeInput",type:"text",value:[{t:2,r:"code"}],placeholder:"Код"}}]}]}," ",{t:7,e:"label",a:{class:["b-field b-field_input b-field_input_submit b-field_accent b-auth__button ",{t:2,x:{r:["loading"],s:'_0?"b-spinner":""'}}]},f:[{t:7,e:"div",a:{class:"b-field__wrapper"},f:[{t:7,e:"input",a:{class:"b-field__input b-field__input_submit",type:"submit",value:"Подтвердить",disabled:[{t:2,r:"loading"}],twoway:"false"}}]}]}," "]}]}]}]}},{}],73:[function(e,t,i){t.exports={v:3,t:[{t:7,e:"div",a:{class:"b-form"},f:[{t:7,e:"form",a:{class:"b-form__body"},v:{submit:"submit"},f:[{t:7,e:"div",a:{class:"b-form__row"},f:[{t:7,e:"label",a:{class:"b-field b-field_input b-field_input_text b-auth__input_text"},f:[{t:7,e:"input-notification",a:{msg:[{t:2,r:"errorMsg"}],off:"10000"}}," ",{t:7,e:"div",a:{class:"b-field__wrapper"},f:[{t:7,e:"input",a:{class:"b-field__input b-field__input_text",id:"emailInput",type:"text",value:[{t:2,r:"email"}],placeholder:"e-mail"}}]}]}," ",{t:7,e:"label",a:{class:["b-field b-field_input b-field_input_submit b-field_accent b-auth__button ",{t:2,x:{r:["error"],s:'_0?"b-input_notify":""'}}," ",{t:2,x:{r:["loading"],s:'_0?"b-spinner":""'}}]},f:[{t:7,e:"div",a:{class:"b-field__wrapper"},f:[{t:7,e:"input",a:{class:"b-field__input b-field__input_submit",type:"submit",value:"Войти",disabled:[{t:2,r:"disabled"}],twoway:"false"}}]}]}," "]}]}]}]}},{}],74:[function(e,t,i){t.exports={v:3,t:[{t:7,e:"div",a:{class:"b-auth__description"},f:[{t:7,e:"p",a:{class:"b-auth__title"},f:["Уважаемый ",{t:7,e:"b",f:[{t:2,r:"user.firstName"}," ",{t:2,r:"user.lastName"}]},"!",{t:7,e:"br"},{t:7,e:"br"}," Недавно вы изменили адрес электронной почты в своем профиле в личном кабинете. В связи с этим некоторые важные преимущества личного кабинета сейчас могут быть вам недоступны.",{t:7,e:"br"},{t:7,e:"br"}," Чтобы пользоваться всеми возможностями личного кабинета, найдите в почтовом ящике ",{t:7,e:"b",f:[{t:2,r:"user.email"}]},' письмо от "Российской газеты" с темой ',{t:7,e:"b",f:['"Уведомление о смене Email"']}," и следуйте краткой инструкции - это займет совсем немного времени."]}]}]}},{}],75:[function(e,t,i){t.exports={v:3,t:[{t:7,e:"div",a:{class:"b-auth__login"},f:[{t:7,e:"div",a:{class:"b-auth__description"},f:[{t:7,e:"p",a:{class:"b-auth__text"},f:["Для использования сервисов сайта и возможности комментирования укажите свой e-mail. На этот e-mail мы пришлем код авторизации."]}]}," ",{t:7,e:"email-form",a:{email:[{t:2,r:"email"}]}}," ",{t:7,e:"div",a:{class:"b-auth__description b-auth__description_centered"},f:[{t:7,e:"p",a:{class:"b-auth__text b-auth__title_midle b-auth__title_or"},f:["Авторизация через аккаунты в соцсетях"]}]}," ",{t:7,e:"div",a:{class:"b-auth__social"},f:[{t:7,e:"social-form"}]}," ",{t:7,e:"div",a:{class:"b-auth__description"},f:[{t:7,e:"p",a:{class:"b-auth__title b-auth__title_agreement",href:"#"},f:["Входя на сайт, Вы принимаете условия соглашения ",{t:7,e:"a",a:{class:"b-auth__link b-link b-link_inner",target:"_blank",href:"/useragreement/"},f:['"О размещении комментариев и иной информации пользователей на интернет-портале "Российской Газеты" (www.rg.ru)"']}]}]}]}]}},{}],76:[function(e,t,i){var n=e("../b-auth.ihtml"),s=Ractive.extend({el:"authContainer",template:n,oninit:function(){RG.logger.debug("Auth")},onrender:function(){var e=this.get("type");switch(RG.logger.trace(e),e){case"code":RG.events.publish("auth.expect.code",{tab:"enter"});break;case"login":RG.events.publish("auth.login",{tab:"enter"});break;case"authInfoConfirmEmail":RG.events.publish("auth.info.confirm.email")}}});t.exports=s},{"../b-auth.ihtml":71}],77:[function(e,t,i){t.exports=Ractive.extend({template:e("../info-confirm-email.ihtml"),el:"authContent",data:function(){return{user:{}}},oninit:function(){RG.logger.debug("AuthInfoConfirmEmail")},onrender:function(){this.set("user",RG.session.getUserData())}})},{"../info-confirm-email.ihtml":74}],78:[function(e,t,i){var n=e("./config").messages,s=RG.config.formats.conformAtionCode,a=e("../code-form.ihtml"),r=Ractive.extend({template:a,el:"authContent",data:{merge:!1},oninit:function(){var e=this;RG.logger.debug("CodeForm"),this.set("codeNotValid",!0),this.observe("code",this.checkCode.bind(this)),this.on("submit",function(t){var i=e.get("code");e.get("codeNotValid")?e.notValid():RG.events.publish(e.get("merge")?"auth.send.merge.code":"auth.send.confirm.code",i),t.original.preventDefault()})},loading:function(){this.set("loading",!0)},notValid:function(){this.callError(n.codeNotValid)},callError:function(e){this.set("loading",!1),this.set("error",!0),this.set("errorMsg",null),this.set("errorMsg",e)},checkCode:function(e,t){e!==t&&(s.test(e)?this.set("codeNotValid",!1):this.set("codeNotValid",!0))}});t.exports=r},{"../code-form.ihtml":72,"./config":84}],79:[function(e,t,i){var n=e("./config").messages,s=RG.config.formats.email,a=e("../email-form.ihtml"),r=Ractive.extend({template:a,data:{errorMsg:"",email:""},oninit:function(){var e=this;RG.logger.debug("EmailForm"),this.set("emailNotValid",!0),this.observe("email",this.checkEmail.bind(this)),this.on("submit",function(t){var i=e.get("email");e.get("emailNotValid")?e.notValid():RG.events.publish("auth.send.email",i),t.original.preventDefault()}),RG.events.subscribe("auth.disable",function(t){RG.logger.log(t),e.set("disabled",!0)})},loading:function(){this.set("loading",!0),this.set("disabled",!0)},notValid:function(){this.callError(n.emailNotValid)},emailNotFound:function(){this.callError(n.registrationOffer)},codeSend:function(){this.callError(n.codeIsSent)},callError:function(e){var t=this.get("email");this.set("loading",!1),this.set("erorr",!0),this.set("disabled",!1),this.set("errorMsg",null),this.set("errorMsg",e),$(".b-auth__registration-link").on("click",function(e){RG.events.publish("auth.signup",{tab:"registration",user:{email:t}}),e.preventDefault()}),$(".b-auth__code-link").on("click",function(e){RG.events.publish("auth.expect.code",{tab:"enter",user:{email:t}}),e.preventDefault()})},checkEmail:function(e,t){e!==t&&(s.test(e)?(this.set("emailNotValid",!1),this.set("error",!1)):this.set("emailNotValid",!0))}});t.exports=r},{"../email-form.ihtml":73,"./config":84}],80:[function(e,t,i){var n=e("./SocialForm"),s=e("./EmailForm"),a=e("../login-form.ihtml"),r=Ractive.extend({el:"authContent",template:a,data:{email:""},components:{"social-form":n,"email-form":s},oninit:function(){RG.logger.debug("SigninForm")},onrender:function(){"mobile"===RG.ScreenViewer.getScreenInfo().type&&($(".b-auth__scroll").css("height",window.innerHeight-60),RG.events.publish("scroll.init",$(".b-auth__scroll")))},loading:function(){this.findComponent("email-form").loading()},codeSend:function(){this.findComponent("email-form").codeSend()},emailNotFound:function(){this.findComponent("email-form").emailNotFound()}});t.exports=r},{"../login-form.ihtml":75,"./EmailForm":79,"./SocialForm":82}],81:[function(e,t,i){var n=e("./config").messages,s=RG.config.formats,a=e("../signup-form.ihtml"),r=Ractive.extend({template:a,el:"authContent",oninit:function(){var e=this;RG.logger.debug("SignupForm"),this.observe("email",this.checkEmail.bind(this)),this.observe("first_name",this.checkName.bind(this)),this.observe("last_name",this.checkName.bind(this)),this.on("submit",function(t){var i={first_name:e.get("first_name"),last_name:e.get("last_name"),email:e.get("email")},s=e.get("social");e.get("first_nameNotValid")?e.notValid(n.nameNotValid,"first_name"):e.get("last_nameNotValid")?e.notValid(n.nameNotValid,"last_name"):e.get("emailNotValid")?e.notValid(n.emailNotValid,"email"):RG.events.publish("auth.user.save",{user:i,social:s}),t.original.preventDefault()})},loading:function(){this.set("loading",!0)},notValid:function(e,t){var i=e||"Неверный формат данных",n=t||"email";this.callError(i,n)},callError:function(e,t){this.set("loading",!1),this.set(t+"ErrorMsg",null),this.set(t+"ErrorMsg",e)},checkEmail:function(e,t){e!==t&&(s.email.test(e)?this.set("emailNotValid",!1):this.set("emailNotValid",!0))},checkName:function(e,t,i){e!==t&&(s.name.test(e)?this.set(i+"NotValid",!1):this.set(i+"NotValid",!0))}});t.exports=r},{"../signup-form.ihtml":88,"./config":84}],82:[function(e,t,i){var n=e("./config").paths.social,s=e("../social-form.ihtml"),a=Ractive.extend({template:s,data:function(){return{socialPath:n}},oninit:function(){var e=this;RG.logger.debug("SocialForm"),this.on("setSocial",function(t,i){e.set("disabled",!0),e.set(i,!0),RG.events.publish("auth.disable")})}});t.exports=a},{"../social-form.ihtml":89,"./config":84}],83:[function(e,t,i){var n=e("../user-exist-form.ihtml"),s=Ractive.extend({template:n,el:"authContent",oninit:function(){var e=this;RG.logger.debug("UserExistForm"),this.on("confirm",function(t){var i=e.get("id");RG.events.publish("auth.user.merge",i),t.original.preventDefault()}),this.on("decline",function(t){var i=e.get("user");RG.events.publish("auth.signup",{user:i,social:!0,tab:"registration"}),t.original.preventDefault()})},loading:function(){this.set("loading",!0)}});t.exports=s},{"../user-exist-form.ihtml":90}],84:[function(e,t,i){var n=RG.config.paths.root,s=$("").addClass("b-link").addClass("b-link_blue").text("пройдите регистрацию").attr("href","#").addClass("b-auth__registration-link"),a=$("
").html(s).html(),r=$("").addClass("b-link").addClass("b-link_blue").text("ссылке").attr("href","#").addClass("b-auth__code-link"),o=$("
").html(r).html(),l=n+"auth",c={paths:{email:l+"/send/code",social:l+"/connect/",code:l+"/confirm/code/",getAuthData:l+"/get_auth_data",getUserData:l+"/get_exists_user_data/",mergeUser:l+"/send/merge/",mergeCode:l+"/confirm/merge/",saveUser:l+"/save",logout:l+"/logout",disconnect:l+"/disconnect/"},messages:{emailNotValid:"Неверный формат адреса электронной почты",nameNotValid:"Неверный формат имени",registrationOffer:"Введенный e-mail не зарегистрирован на сайте, попробуйте ещё раз или "+a,codeIsSent:"Код уже отправлен. Введите его, кликнув по "+o+". Чтобы получить новый код, попробуйте авторизоваться позднее.",codeNotValid:"Введен неверный код"}};t.exports=c},{}],85:[function(e,t,i){var n=e("../config").paths,s=function(e){return $.ajax({url:n.email,data:{email:e},method:"POST",xhrFields:{withCredentials:!0}})},a=function(e){return $.ajax({url:""+n.code+e,xhrFields:{withCredentials:!0}})},r=function(){return $.ajax({url:""+n.getAuthData,xhrFields:{withCredentials:!0}})},o=function(e){return $.ajax({url:""+n.saveUser,data:e,method:"POST",xhrFields:{withCredentials:!0}})},l=function(e){return $.ajax({url:""+n.getUserData+e,method:"POST",xhrFields:{withCredentials:!0}})},c=function(e){return $.ajax({url:""+n.mergeUser+e,xhrFields:{withCredentials:!0}})},u=function(e){return $.ajax({url:""+n.mergeCode+e,xhrFields:{withCredentials:!0}})},d=function(){return $.ajax({url:""+n.logout,xhrFields:{withCredentials:!0}})},f=function(e){return $.ajax({url:""+n.disconnect+e,xhrFields:{withCredentials:!0}})};t.exports={sendEmail:s,sendConfirmCode:a,getAuthData:r,saveUser:o,getUserData:l,sendMergeCode:u,mergeUser:c,logOut:d,socialDisconnect:f}},{"../config":84}],86:[function(e,t,i){var n=function(){return"#social_redirect"===window.location.hash},s=function(){return"#code"===window.location.hash};t.exports={confirmingData:n,expectCode:s}},{}],87:[function(e,t,i){var n=e("./helpers/Router"),s=e("./helpers/Ajax"),a=e("./Auth"),r=e("./CodeForm"),o=e("./SignupForm"),l=e("./UserExistForm"),c=e("./LoginForm"),u=e("./AuthInfoConfirmEmail"),d=RG.events.publish,f=RG.events.registerList,h=RG.logger.warn,m=RG.logger.info,p=null,g={registration:"signup",enter:"login"},b=function(e,t,i){switch(m(e),t){case"email":break;case"confirmCode":break;case"mergCode":break;case"user":h(i),p.notValid()}},v=function(e){m(e),p.loading()},_=function(e,t){m(e),s.socialDisconnect(t).then(function(){RG.events.publish("auth.social.disconnected",t)})},w=function(e,t){var i=t||"login";new a({data:{type:i}})},y=function(e){switch(m(e),RG.events.publish("account.tabs.show",0),g.registration){case"signup":d("auth.signup",{tab:"registration"});break;case"exists":d("auth.user.form",{tab:"registration"});break;case"code":d("auth.expect.code",{tab:"registration"})}},R=function(e){switch(m(e),RG.events.publish("account.tabs.show",1),g.enter){case"signup":d("auth.signup",{tab:"enter"});break;case"login":d("auth.login",{tab:"enter"});break;case"code":d("auth.expect.code",{tab:"enter"});break;case"exists":d("auth.user.form",{tab:"enter"})}},k=function(e,t){var i=t.email||RG.storage.get("auth").email;m(e),t.tab&&(g[t.tab]="login"),p=new c,i&&p.set("email",i),d("overlay.resize")},x=function(e){m(e),s.logOut().then(function(){d("auth.check")})},G=function(e,t){m(e),d("auth.loading"),s.sendEmail(t).then(function(){d("auth.expect.code",{merge:!1,tab:"enter"})},function(e){switch(e.status){case 423:d("auth.email.sended");break;case 400:d("auth.error","email");break;case 418:d("auth.register.offer",t)}})},S=function(e,t){m(e),t.tab&&(g[t.tab]="code"),p=new r,p.set("merge",t.merge),d("overlay.resize"),document.location.hash="#code"},D=function(e){m(e),p.codeSend()},C=function(e,t){p.emailNotFound(),m(t),m(e)},M=function(e,t){m(e),d("auth.loading"),s.sendConfirmCode(t).then(function(){document.location.hash="",d("auth.check")},function(){d("auth.error","confirmCode")})},j=function(e,t){m(e),d("auth.loading"),s.sendMergeCode(t).then(function(){d("auth.check")},function(){d("auth.error","mergCode")})},$=function(e){m(e),d("session.check")},Y=function(e){m(e),p=new u},P=function(e,t){var i=t.user||{first_name:RG.storage.get("auth").firstName,last_name:RG.storage.get("auth").lastName,email:RG.storage.get("auth").email};m(e),t.tab&&(g[t.tab]="signup"),p=new o,p.set(i),p.set("social",t.social),d("overlay.resize")},T=function(e){m(e),n.confirmingData()&&s.getAuthData().then(function(e){d("auth.signup",{user:e,social:!0,tab:"enter"})},function(e){switch(e.status){case 423:d("auth.user.exists",{id:e.responseJSON.uid,user:{}});break;case 400:d("auth.error","data")}})},O=function(e,t){var i=t.user;m(e),d("auth.loading"),s.saveUser(i).then(function(){d("auth.expect.code",{merge:t.social,tab:"enter"})},function(e){switch(e.status){case 423:d("auth.user.exists",{id:e.responseJSON.uid,user:i});break;case 400:d("auth.error","user")}})},F=function(e,t){m(e),s.getUserData(t.id).then(function(e){var i=RG.storage.get("auth");i.email=e.email,i.last_name=e.last_name,i.first_name=e.first_name,RG.storage.set("auth",i),d("auth.user.form",{tab:"registration",user:e,data:t.user,id:t.id})},function(){d("auth.error","getUser")})},I=function(e,t){var i=t.user||RG.storage.get("auth");m(e),t.tab&&(g[t.tab]="exists"),p=new l,p.set(i),p.set("id",t.id),d("overlay.resize")},L=function(e,t){m(e),s.mergeUser(t).then(function(){d("auth.expect.code",{merge:!0,tab:"enter"})},function(){d("auth.error","getUser")})},N=function(){f({"auth.run":w,"auth.registration":y,"auth.enter":R,"auth.login":k,logout:x,"aurh.confirm.required":T,"auth.send.email":G,"auth.expect.code":S,"auth.email.sended":D,"auth.register.offer":C,"auth.send.confirm.code":M,"auth.send.merge.code":j,"auth.check":$,"auth.info.confirm.email":Y,"auth.signup":P,"auth.user.save":O,"auth.user.exists":F,"auth.user.form":I,"auth.user.merge":L,"auth.error":b,"auth.loading":v,"auth.social.dsiconnect":_})},A=function(e){var t=e||"login";RG.events.publish("auth.run",t)},E=function(){RG.events.unsubscribe("auth"),p=null};t.exports={init:N,run:A,destruct:E}},{"./Auth":76,"./AuthInfoConfirmEmail":77,"./CodeForm":78,"./LoginForm":80,"./SignupForm":81,"./UserExistForm":83,"./helpers/Ajax":85,"./helpers/Router":86}],88:[function(e,t,i){t.exports={v:3,t:[{t:7,e:"div",f:[{t:7,e:"div",a:{class:"b-auth__description"},f:[{t:7,e:"p",a:{class:"b-auth__title"},f:["Для регистрации на сайте заполните, пожалуйста, все поля формы. На указанный e-mail мы пришлем ссылку на Ваш профиль."]}]}," ",{t:7,e:"div",a:{class:"b-auth__form"},f:[{t:7,e:"form",a:{class:"b-form form_data"},v:{submit:"submit"},f:[{t:7,e:"div",a:{class:"b-form__row"},f:[{t:7,e:"label",a:{class:"b-field b-field_input b-field_input_text b-auth__input_text"},f:[{t:7,e:"input-notification",a:{msg:[{t:2,r:"first_nameErrorMsg"}],off:"2000"}}," ",{t:7,e:"div",a:{class:"b-field__wrapper"},f:[{t:7,e:"input",a:{class:"b-field__input b-field__input_text",type:"text",value:[{t:2,r:"first_name"}],placeholder:"Имя"}}]}]}," ",{t:7,e:"label",a:{class:"b-field b-field_input b-field_input_text b-auth__input_text"},f:[{t:7,e:"input-notification",a:{msg:[{t:2,r:"last_nameErrorMsg"}],off:"2000"}}," ",{t:7,e:"div",a:{class:"b-field__wrapper"},f:[{t:7,e:"input",a:{class:"b-field__input b-field__input_text",type:"text",value:[{t:2,r:"last_name"}],placeholder:"Фамилия"}}]}]}," ",{t:7,e:"label",a:{class:"b-field b-field_input b-field_input_text b-auth__input_text"},f:[{t:7,e:"input-notification",a:{msg:[{t:2,r:"emailErrorMsg"}],off:"2000"}}," ",{t:7,e:"div",a:{class:"b-field__wrapper"},f:[{t:7,e:"input",a:{class:"b-field__input b-field__input_text",type:"text",value:[{t:2,r:"email"}],placeholder:"Email"}}]}]}," ",{t:7,e:"label",a:{class:["b-field b-field_input b-field_input_submit b-field_accent b-auth__button ",{t:2,x:{r:["loading"],s:'_0?"b-spinner":""'}}]},f:[{t:7,e:"div",a:{class:"b-field__wrapper"},f:[{t:7,e:"input",a:{class:"b-field__input b-field__input_submit",type:"submit",value:"Зарегистрироваться",disabled:[{t:2,r:"loading"}],twoway:"false"}}]}]}," "]}]}]}]}]}},{}],89:[function(e,t,i){t.exports={v:3,t:[{t:7,e:"div",a:{class:"b-social"},f:[{t:7,e:"a",a:{class:["b-icon b-icon_type_social b-social__item b-social__item_fb ",{t:2,x:{r:["disabled"],s:'_0?"disabled":""'}}," ",{t:2,x:{r:["facebook"],s:'_0?"b-spinner":""'}}],href:[{t:2,r:"socialPath"},"facebook"]},v:{click:{n:"setSocial",a:["facebook"]}},f:[{t:7,e:"svg",f:[{t:7,e:"use",a:{"xmlns:xlink":"http://www.w3.org/1999/xlink","xlink:href":"#svg-fb"}}]}]}," ",{t:7,e:"a",a:{class:["b-icon b-icon_type_social b-social__item b-social__item_goo ",{t:2,x:{r:["disabled"],s:'_0?"disabled":""'}}," ",{t:2,x:{r:["google"],s:'_0?"b-spinner":""'}}],href:[{t:2,r:"socialPath"},"google"]},v:{click:{n:"setSocial",a:["google"]}},f:[{t:7,e:"svg",f:[{t:7,e:"use",a:{"xmlns:xlink":"http://www.w3.org/1999/xlink","xlink:href":"#svg-goo"}}]}]}," ",{t:7,e:"a",a:{class:["b-icon b-icon_type_social b-social__item b-social__item_tw ",{t:2,x:{r:["disabled"],s:'_0?"disabled":""'}}," ",{t:2,x:{r:["twitter"],s:'_0?"b-spinner":""'}}],href:[{t:2,r:"socialPath"},"twitter"]},v:{click:{n:"setSocial",a:["twitter"]}},f:[{t:7,e:"svg",f:[{t:7,e:"use",a:{"xmlns:xlink":"http://www.w3.org/1999/xlink","xlink:href":"#svg-tw"}}]}]}," ",{t:7,e:"a",a:{class:["b-icon b-icon_type_social b-social__item b-social__item_vk ",{t:2,x:{r:["disabled"],s:'_0?"disabled":""'}}," ",{t:2,x:{r:["vkontakte"],s:'_0?"b-spinner":""'}}],href:[{t:2,r:"socialPath"},"vkontakte"]},v:{click:{n:"setSocial",a:["vkontakte"]}},f:[{t:7,e:"svg",f:[{t:7,e:"use",a:{"xmlns:xlink":"http://www.w3.org/1999/xlink","xlink:href":"#svg-vk"}}]}]}," ",{t:7,e:"a",a:{class:["b-icon b-icon_type_social b-social__item b-social__item_ok ",{t:2,x:{r:["disabled"],s:'_0?"disabled":""'}}," ",{t:2,x:{r:["odnoklassniki"],s:'_0?"b-spinner":""'}}],href:[{t:2,r:"socialPath"},"odnoklassniki"]},v:{click:{n:"setSocial",a:["odnoklassniki"]}},f:[{t:7,e:"svg",f:[{t:7,e:"use",a:{"xmlns:xlink":"http://www.w3.org/1999/xlink","xlink:href":"#svg-ok"}}]}]}]}]}},{}],90:[function(e,t,i){t.exports={v:3,t:[{t:7,e:"div",a:{class:"b-form"},f:[{t:7,e:"form",a:{class:"b-form__body b-form__body_info"},f:[{t:7,e:"div",a:{class:"b-form__row b-auth__description b-auth__description_centered"},f:[{t:7,e:"p",a:{class:"b-auth__title b-auth__title_middle b-form__title_info"},f:["Пользователь с таким e-mail уже зарегистрирован на сайте"]}]}," ",{t:7,e:"div",a:{class:"b-form__row b-auth__description b-auth__description_initial-color b-auth__description_centered"},f:[{t:7,e:"p",a:{class:"b-auth__title b-auth__title_middle"},f:[" ",{t:7,e:"b",f:[{t:2,r:"first_name"}," *****"]},{t:7,e:"br"}," ",{t:2,r:"email"}]}]}," ",{t:7,e:"div",a:{class:"b-form__row b-form__row_centered"},f:[" ",{t:7,e:"label",a:{class:"b-field b-field_input b-field_input_submit b-field_accent"},f:[{t:7,e:"div",a:{class:"b-field__wrapper"},f:[{t:7,e:"input",a:{class:"b-field__input b-field__input_submit",type:"button",value:"Это не я"},v:{click:"decline"}}]}]}," ",{t:7,e:"label",a:{class:["b-field b-field_input b-field_input_submit b-field_accent ",{t:2,x:{r:["loading"],s:'_0?"b-spinner":""'}}]},f:[{t:7,e:"div",a:{class:"b-field__wrapper"},f:[{t:7,e:"input",a:{class:"b-field__input b-field__input_submit",type:"submit",value:"Это я",disabled:[{t:2,r:"loading"}]},v:{click:"confirm"}}]}]}," "]}]}]}]}},{}],91:[function(e,t,i){t.exports={v:3,t:[{t:4,f:[{t:7,e:"div",a:{class:["b-followed-full ",{t:2,x:{r:["showMaterials"],s:'_0?"b-followed-full_expanded":""'}}," ",{t:2,x:{r:["materials"],s:'_0?"b-followed-full_expanded":"b-followed-full_hidden"'}}]},f:[{t:7,e:"div",a:{class:"b-followed-full__col b-followed-full__col_side_left",id:"news-content"},f:[{t:7,e:"div",a:{class:"b-news-inner b-news-inner_type_wide b-news-inner_type_viewed slideInRight"},f:[{t:7,e:"div",a:{class:"b-followed-full__link"},f:[{t:7,e:"a",a:{class:"b-link_blue b-icon-aside b-icon-aside_type_larrow-mini",href:"#",title:"Отслеживаемые сюжеты"},v:{click:"sujets"},f:["Отслеживаемые сюжеты"]}]}," ",{t:7,e:"h2",a:{class:"b-followed-full__title"},f:[{t:7,e:"a",a:{href:[{t:2,r:"sujetUrl"}]},f:[{t:2,r:"sujetTitle"}]}]}," ",{t:7,e:"sujet-materials",a:{items:[{t:2,r:"materials"}]}}]}]}]}," ",{t:7,e:"div",a:{class:"b-followed-full__col b-followed-full__col_side_right"},f:[{t:7,e:"div",a:{class:"b-followed"},f:[{t:7,e:"h2",a:{class:"b-followed__title"},f:["Отслеживаемые сюжеты:"]}," ",{t:7,e:"div",a:{class:"b-followed__list js-height-list"},o:"scroll-bar",f:[{t:4,f:[{t:7,e:"div",a:{class:["b-followed__item ",{t:4,f:["active"],n:50,x:{r:["activeItemId","id"],s:"_0==_1"}}]},v:{click:{n:"materials",d:[{t:2,r:"."}]}},f:[{t:7,e:"div",a:{class:"b-followed__item-text"},f:[{t:7,e:"a",a:{class:"b-link",href:[{t:2,r:"url"}]},f:[{t:3,r:"title"}]}]}," ",{t:7,e:"div",a:{class:"b-followed__item-action"},f:[{t:4,f:[{t:7,e:"span",a:{class:"b-followed__qty"},f:[{t:2,x:{r:["materials"],s:"_0>99?99:_0"}}]}],n:50,x:{r:["materials"],s:"_0>0"}}," ",{t:7,e:"rg-follow-sujet",a:{sujet:[{t:2,r:"id"}]}}]}]}],r:"sujets"}]}]}]}],n:50,r:"sujets"},{t:4,n:51,f:[{t:7,e:"div",a:{class:"b-followed-full__col b-followed-full__col_side_right"},f:[{t:7,e:"dummy-empty",a:{type:"'sujets'"}}]}," ",{t:7,e:"div",a:{class:"b-followed-full__col b-followed-full__col_side_right"},f:[{t:7,e:"div",a:{class:"b-followed"},f:[{t:7,e:"h2",a:{class:"b-followed__title"},f:["Популярные сюжеты:"]}," ",{t:7,e:"div",a:{class:"b-followed__list js-height-list"},o:"scroll-bar",f:[{t:4,f:[{t:7,e:"div",a:{class:"b-followed__item"},f:[{t:7,e:"div",a:{class:"b-followed__item-text"},f:[{t:7,e:"a",a:{class:"b-link",href:[{t:2,r:"url"}]},f:[{t:3,r:"title"}]}]}]}],r:"popularSujets"}]}]}]}],r:"sujets"}]}},{}],92:[function(e,t,i){var n=e("../../b-sujet-materials/scripts/SujetMaterials"),s=e("../b-followed.ihtml"),a=Ractive.extend({el:"followed",components:{"sujet-materials":n},data:function(){return{materials:null,activeItemId:null}},template:s,oninit:function(){var e=this;RG.logger.debug("Followed"),this.on({materials:function(t,i){e.set("sujetTitle",i.title),e.set("sujetUrl",i.url),RG.events.publish("subscribe.sujet.get",i.id),e.set("activeItemId",i.id),t.original.preventDefault()},sujets:function(t,i){RG.logger.log(i),e.set("materials",null),e.set("showMaterials",!1),t.original.preventDefault()}}),RG.events.registerList({"subscribe.sujet.set":function(t,i){RG.logger.info(t),e.set("materials",i),e.set("showMaterials",!0),RG.events.publish("overlay.resize"),RG.events.publish("scroll.init",$("#sujetList"))},"subscribe.sujet.get":function(t,i){var n=_.findIndex(e.get("sujets"),{id:i});e.set("sujets."+n+".materials",null)}})},onrender:function(){RG.events.publish("overlay.resize")}});t.exports=a},{"../../b-sujet-materials/scripts/SujetMaterials":99,"../b-followed.ihtml":91}],93:[function(e,t,i){t.exports={v:3,t:[{t:7,e:"div",a:{class:"b-region"},f:[{t:7,e:"div",a:{class:"b-region__current"},f:["Текущий регион: ",{t:7,e:"span",a:{class:"b-region__current-city"},f:[{t:2,r:"selectedRegion.originName"}]}]}," ",{t:7,e:"div",a:{class:"b-region__choose"},f:[{t:7,e:"div",a:{class:"b-region__choose-title"},f:["Выберите интересующий регион:"]}," ",{t:7,e:"div",a:{class:"b-region__choose-item is-mobile"},f:[{t:7,e:"label",a:{class:"b-field b-field_select b-field_select_select"},f:[{t:7,e:"div",a:{class:"b-field__wrapper"},f:[{t:7,e:"select",a:{class:"b-field__select b-field__select_select",name:"select-region",value:[{t:2,r:"selectedRegionOption"}],type:"select"},v:{change:"setRegion"},f:[{t:4,f:[{t:7,e:"option",a:{value:[{t:2,r:"id"}]},f:[{t:2,r:"originName"}]}],r:"regions"}]}]}]}]}," ",{t:7,e:"div",a:{class:"b-region__choose-item is-tablet"},f:[{t:7,e:"ul",a:{class:"b-region__list"},f:[{t:4,f:[{t:7,e:"li",a:{class:"b-region__list-item"},v:{click:{n:"switch",d:[{t:2,r:"."}]}},f:[{t:7,e:"a",a:{class:["b-link b-link_blue b-region__link ",{t:2,x:{r:["selectedRegion.id","id"],s:'_0===_1?"b-region__link_active":""'}}],href:"#"},f:[{t:2,r:"originName"}]}]}],x:{r:["filterRegions","regions"],s:"_0(_1)"}}]}]}]},{t:7,e:"div",a:{class:"b-region__search"},f:[" ",{t:7,e:"form",a:{class:"b-form b-text-actions__form"},v:{submit:"send"},f:[{t:7,e:"fieldset",a:{class:"b-form__fieldset b-text-actions__fieldset"},f:[{t:7,e:"label",a:{class:"b-field b-field_input b-field_input_text"},f:[{t:7,e:"div",a:{class:"b-field__label"},f:["Если вы не знаете, к какому Федеральному округу принадлежит город, введите его название в поле:"]}," ",{t:7,e:"div",a:{class:"b-field__wrapper"},f:[{t:7,e:"input",a:{class:"b-field__input b-field__input_text",type:"text",placeholder:"Введите город...",value:[{t:2,r:"searchingRegion"}]}}," ",{t:4,f:[{t:7,e:"div",a:{class:"b-field__search-results b-region__result"},f:[{t:7,e:"ul",a:{class:"b-region__list"},f:[{t:4,f:[{t:7,e:"li",a:{class:"b-region__list-item"},v:{click:{n:"switch",d:[{t:2,r:"."}]}},f:[{t:7,e:"a",a:{class:"b-link b-link_blue b-region__link",href:"#"},f:[{t:2,r:"originName"}]}]}],r:"searchingRegions"}," ",{t:4,f:[{t:7,e:"li",a:{class:"b-region__list-item"},f:[{t:7,e:"p",f:["Совпадений не найдено"]}]}],n:51,r:"searchingRegions"}]}]}],r:"showRegions"}]}]}]}]}]}]}]}},{}],94:[function(e,t,i){var n=e("../b-region.ihtml"),s=Ractive.extend({el:"region",template:n,data:function(){return{regions:RG.config.regions,selectedRegion:RG.session.getUserRegion(),filterRegions:function(e){var t=[201,146,181,130,96,223,227,176,104],i=null;return i=_.filter(e,function(e){return _.indexOf(t,e.id)!==-1}),_.sortBy(i,"name")},searchRegions:[],searchingRegion:"",showRegions:!1}},oninit:function(){var e=this;RG.logger.debug("Region"),this.set("selectedRegionOption",this.get("selectedRegion").id),this.observe("searchingRegion",function(t,i){var n=[],s=e.get("regions");t!==i&&(""!==t?(e.set("showRegions",!0),n=_.filter(s,function(e){return e.originName.toLowerCase().indexOf(t.toLowerCase())>=0}),e.set("searchingRegions",n)):(e.set("showRegions",!1),e.set("searchingRegions",[])))}),this.on({setRegion:function(t){var i=e.get("selectedRegionOption"),n=_.findWhere(e.get("regions"),{id:i});RG.events.publish("geolocation.region.change",n),t.original.preventDefault()},switch:function(t,i){RG.events.publish("geolocation.region.change",i),e.set("showRegions",!1),e.set("searchingRegions",[]),e.set("searchingRegion",""),t.original.preventDefault()}}),RG.events.registerList({"geolocation.region.changed":function(t,i){e.set("selectedRegion",i),e.set("selectedRegionOption",i.id)}})},onrender:function(){RG.events.publish("overlay.resize")}});t.exports=s},{"../b-region.ihtml":93}],95:[function(e,t,i){t.exports={v:3,t:[{t:7,e:"div",a:{class:"b-search-overlay"},f:[{t:7,e:"search-bar",a:{type:"redirect"}}," ",{t:7,e:"div",a:{class:"b-search-overlay__popular"},f:[{t:7,e:"div",a:{class:"b-search-overlay__row"},f:[{t:7,e:"div",a:{class:"b-search-overlay__popular-title"},f:["Сегодня чаще всего ищут:"]}," ",{t:7,e:"ul",a:{class:"b-search-overlay__popular-list"},f:[{t:4,f:[{t:7,e:"li",a:{class:"b-search-overlay__popular-list-item"},f:[{t:7,e:"a",a:{class:"b-link b-link_blue",href:"#"},v:{click:"suggest"},f:[{t:2,r:"."}]}]}],r:"suggestions"}]}]}]}]}]}},{}],96:[function(e,t,i){t.exports={suggestions:["Коммунальные платежи","Выплата 5 тысяч рублей пенсионерам","Закон о коллекторах","Правила регистрации дач, квартир и земли","Зарплаты бюджетников"]}},{}],97:[function(e,t,i){var n=e("../data/b-search-overlay"),s=e("../b-search-overlay.ihtml"),a=Ractive.extend({el:"searchOverlay",template:s,data:function(){return{suggestions:n.suggestions}},oninit:function(){RG.logger.debug("SearchOverlay"),this.on("suggest",function(e){RG.events.publish("search.keywords",e.context),RG.events.publish("search.bar.find"),e.original.preventDefault()})},onrender:function(){RG.events.publish("overlay.resize")}});t.exports=a},{"../b-search-overlay.ihtml":95,"../data/b-search-overlay":96}],98:[function(e,t,i){t.exports={v:3,t:[{t:4,f:[{t:7,e:"div",a:{class:"b-news-inner b-news-inner_type_wide b-news-inner_type_attention"},f:[{t:7,e:"h3",a:{class:"b-news-inner__title"},f:[{t:3,r:"title"},":"]}," ",{t:8,r:"list"}]}],r:"standAlone"},{t:4,f:[{t:8,r:"list"}],n:51,r:"standAlone"}],p:{list:[{t:4,f:[{t:7,e:"div",a:{class:"b-news-inner__list js-height-list",id:"sujetList"},f:[{t:4,f:[{t:7,e:"div",a:{class:["b-news-inner__list-item ",{t:2,x:{r:["isNew"],s:'_0?"b-news-inner__list-item_type_new":""'}}]},f:[{t:7,e:"div",a:{class:"b-news-inner__list-item-wrapper"},f:[{t:7,e:"div",a:{class:"b-news-inner__list-item-time"},f:[{t:2,x:{r:["dateFormat","published"],s:"_0(_1)"}}]}," ",{t:7,e:"h2",a:{class:"b-news-inner__list-item-title"},f:[{t:7,e:"a",a:{class:"b-link b-link_title",href:[{t:2,r:"url"}]},f:[{t:3,r:"title"}]}]}," ",{t:7,e:"p",a:{class:"b-news-inner__list-item-text"},f:[{t:3,r:"announce"}]}," ",{t:7,e:"div",a:{class:"b-news-inner__list-item-tags"},f:[{t:4,f:[{t:7,e:"a",a:{href:[{t:2,r:"uri"}],class:"b-link b-link_tag"},f:[{t:3,r:"title"}]},{t:4,f:[", "],n:51,r:"__LAST__"}],r:"bindings"}]}]}]}],r:"items"}," ",{t:7,e:"div",a:{class:"b-news-inner__list__all-materials"},f:[{t:7,e:"a",a:{href:[{t:2,r:"sujetUrl"}],class:"b-link_blue"},f:["Все материалы сюжета"]}]}]}],n:50,r:"items"}]}}},{}],99:[function(e,t,i){var n=e("../b-sujet-materials.ihtml"),s=Ractive.extend({template:n,data:function(){return{items:null,dateFormat:RG.datetime.parseVmDate}},oninit:function(){RG.logger.debug("SujetMaterials")},onrender:function(){var e=this;this.observe("items",function(t,i){var n=null;t&&t.length&&t!==i&&(n=$(e.nodes.sujetList),RG.events.publish("scroll.init",n))}),RG.events.publish("overlay.resize")}});t.exports=s},{"../b-sujet-materials.ihtml":98}],100:[function(e,t,i){t.exports={v:3,t:[{t:4,f:[{t:7,e:"div",a:{class:"b-viewed"},f:[{t:7,e:"h2",a:{class:"b-viewed__title"},f:["Прочитанные статьи:"]}," ",{t:7,e:"div",a:{class:"b-viewed__list js-height-list"},o:"scroll-bar",f:[{t:4,f:[{t:7,e:"div",a:{class:"b-viewed__item"},f:[{t:7,e:"a", a:{class:"b-link b-viewed__link",href:[{t:2,r:"url"}]},f:[{t:3,r:"title"}]}]}],r:"materials"}]}]}],n:50,r:"materials"},{t:4,n:51,f:[{t:7,e:"div",a:{class:"b-viewed"},f:[{t:7,e:"dummy-empty",a:{type:"'viewed'"}}," ",{t:7,e:"h2",a:{class:"b-viewed__title"},f:["Популярные статьи:"]}," ",{t:7,e:"div",a:{class:"b-viewed__list js-height-list"},o:"scroll-bar",f:[{t:4,f:[{t:7,e:"div",a:{class:"b-viewed__item"},f:[{t:7,e:"a",a:{class:"b-link b-viewed__link",href:[{t:2,r:"path"}]},f:[{t:3,r:"title"}]}]}],r:"popularMaterials"}]}]}],r:"materials"}]}},{}],101:[function(e,t,i){var n=e("../b-viewed.ihtml"),s=Ractive.extend({el:"viewed",template:n,oninit:function(){RG.logger.debug("Viewed"),RG.events.publish("overlay.resize")}});t.exports=s},{"../b-viewed.ihtml":100}],102:[function(e,t,i){var n="//front.rg.ru/",s="//outer.rg.ru/",a={paths:{root:n,fresh:"/json/gazeta",accountInclude:"/include/tmpl-b-feed/is-announce/num-3/index.json",popularMaterials:s+"plain/popular/",popularCommentMaterials:n+"comments/top_list",fascicles:"/json/fascicles",supersp:"/json/supersp",lastNews:"/json/last_news/",broadcastSport:s+"plain/sport_translations/api/sport.php?id=",broadcastOnline:s+"plain/online_translations/api/online.php?id=",partners:"api/partners/",tmpl:{bFeed:"/res/templates/b-feed.html",bNewsInner:"/res/templates/b-news-inner.html",bNewsInner_doc:"/res/templates/b-news-inner_doc.html",bNews:"/res/templates/b-news.html",bNews_broadsides:"/res/templates/b-news_broadsides.html",broadcastOnline:"/res/templates/b-broadcast-online.html",broadcastSport:"/res/templates/b-broadcast-sport.html",bPartners:"/res/templates/b-partners.html"}},regions:null,env:"dev",formats:{email:/\S+@\S+\.\S+/,conformAtionCode:/\b\d{6}\b/g,name:/^[а-яА-ЯёЁa-zA-Z ,.'-]+$/},messages:{inputNotValid:"Не верный формат",emailNotValid:"Неверный формат адреса электронной почты",nameNotValid:"Неверный формат имени",codeIsSent:"Код уже отправлен, попробуйте позднее",codeNotValid:"Неверный код"}};t.exports=a},{}],103:[function(e,t,i){window.RG=window.RG||{},console.debug("From RG team with ❤"),e("./global/decorators"),e("./global/components"),e("./global/modules"),e("./global/extends");var n=e("../blocks/overlays/b-search-overlay/scripts/SearchOverlay"),s=e("../blocks/overlays/b-region/scripts/Region");window.$scrollTop=0,window.$windowHeight=0,window.$windowWidth=0,window.$currentWindowWidth=0,function(){var e=RG.config.paths.tmpl.bNewsInner;RG.config.env||(e="//rg.ru"+e),$.get(e).then(function(e){Ractive.partials.bNewsInner=e})}(),RG.Geolocation.init(),_.isEmpty(RG.session.getUserRegion())&&RG.events.publish("geolocation.region.get"),$(function(){function e(e){var n=$("#cboxOverlay");return e?(n.show(),t()):(n.hide(),i()),!1}function t(){$("body").addClass("scroll-disabled")}function i(){$("body").removeClass("scroll-disabled")}function a(e,t,i){RG.logger.info(e),d.addClass("has-loading"),f.addClass("has-loading"),$.colorbox({html:'
',onComplete:function(){var e=i?"code":null;RG.Auth.run(e),RG.events.publish("colorbox.opened","login"),t?RG.events.publish("auth.confirm.required"):null,setTimeout(function(){$.colorbox.resize({innerWidth:360,innerHeight:600}),d.removeClass("has-loading"),f.removeClass("has-loading"),RG.events.publish("tab.selected.set",$(".b-auth .b-tab__item_1"))},1e3)},onLoad:function(){},onCleanup:function(){RG.logger.info("close colorbox"),RG.events.publish("colorbox.closed","login"),d.addClass("hidding"),setTimeout(function(){d.removeClass("hidding")},1e3)},returnFocus:!1,scrolling:!1,opacity:.7,initialWidth:0,initialHeight:0,transition:"none"})}function r(e,t){RG.logger.info(e),d.addClass("has-loading"),f.addClass("has-loading"),$.colorbox({html:'
',onComplete:function(){RG.Auth.run(t.type),RG.events.publish("colorbox.opened","login"),setTimeout(function(){$.colorbox.resize({innerWidth:360,innerHeight:600}),d.removeClass("has-loading"),f.removeClass("has-loading"),RG.events.publish("tab.selected.set",$(".b-auth .b-tab__item_1")),RG.events.publish("overlay.resize")},1e3)},onLoad:function(){},onCleanup:function(){RG.logger.info("close colorbox"),RG.events.publish("colorbox.closed","login"),d.addClass("hidding"),setTimeout(function(){d.removeClass("hidding")},1e3)},returnFocus:!1,scrolling:!1,opacity:.7,initialWidth:0,initialHeight:0,transition:"none"})}function o(e){RG.logger.info(e),d.addClass("has-loading"),f.addClass("has-loading"),$.colorbox({html:'
',onComplete:function(){new n,RG.events.publish("overlay.resize"),RG.events.publish("colorbox.opened","search"),setTimeout(function(){d.removeClass("has-loading"),f.removeClass("has-loading")},300)},onLoad:function(){},onCleanup:function(){RG.events.publish("colorbox.closed","search"),d.addClass("hidding"),setTimeout(function(){d.removeClass("hidding")},1e3)},onClosed:function(){},returnFocus:!1,className:"b-modal_search",opacity:.7,initialWidth:0,initialHeight:0,transition:"none"})}function l(e){RG.logger.info(e),d.addClass("has-loading"),f.addClass("has-loading"),$.colorbox({html:'
',onComplete:function(){RG.events.publish("followed.run"),RG.events.publish("colorbox.opened","followed"),setTimeout(function(){d.removeClass("has-loading"),f.removeClass("has-loading")},300)},onLoad:function(){},onCleanup:function(){RG.events.publish("followed.destroy"),RG.events.publish("colorbox.closed","followed"),d.addClass("hidding"),setTimeout(function(){d.removeClass("hidding")},1e3)},onClosed:function(){},returnFocus:!1,transition:"none",top:$("#menu").offset().top+53,right:0,className:"b-modal_header",opacity:.7,initialWidth:0,initialHeight:0})}function c(e){RG.logger.info(e),d.addClass("has-loading"),f.addClass("has-loading"),$.colorbox({html:'
',onComplete:function(){RG.events.publish("viewed.run"),RG.events.publish("colorbox.opened","viewed"),$.colorbox.resize({innerWidth:390}),setTimeout(function(){d.removeClass("has-loading"),f.removeClass("has-loading")},300)},onLoad:function(){},onCleanup:function(){RG.events.publish("viewed.destroy"),RG.events.publish("colorbox.closed","viewed"),d.addClass("hidding"),setTimeout(function(){d.removeClass("hidding")},1e3)},onClosed:function(){},returnFocus:!1,transition:"none",top:$("#menu").offset().top+53,right:0,className:"b-modal_header",opacity:.7,initialWidth:0,initialHeight:0})}function u(e,t){RG.config.regions=t,RG.events.unsubscribe("geolocation.region.update"),RG.logger.info(e),d.addClass("has-loading"),f.addClass("has-loading"),$.colorbox({html:'
',onComplete:function(){new s,RG.events.publish("colorbox.opened","region"),$.colorbox.resize({innerWidth:900,innerHeight:300}),setTimeout(function(){d.removeClass("has-loading"),f.removeClass("has-loading")},300)},onLoad:function(){},onCleanup:function(){RG.events.publish("colorbox.closed","region"),d.addClass("hidding"),setTimeout(function(){d.removeClass("hidding")},1e3)},onClosed:function(){},returnFocus:!1,scrolling:!1,opacity:.7,initialWidth:0,initialHeight:0,transition:"none"})}var d=$("#colorbox"),f=$("#cboxOverlay");RG.parser.init(),RG.Viewed.init(),RG.Notify.init(),$(document).on("click",function(e){RG.events.publish("document.click",e)}),$(document).on("mousedown",function(e){RG.events.publish("document.mousedown",e)}),$(document).on("mouseup",function(e){RG.events.publish("document.mouseup",e)}),window.$windowHeight=window.innerHeight,window.$windowWidth=window.innerWidth,$(document).on("scroll",function(){window.$scrollTop=window.pageYOffset,window.$windowHeight=window.innerHeight}),$(window).on("resize",function(){window.$scrollTop=window.pageYOffset,window.$windowHeight=window.innerHeight}),function(){var e=$(".js-datepicker");e.length&&(e.datepicker({showOn:"button",buttonText:"",showButtonPanel:!0,showOtherMonths:!0,selectOtherMonths:!0,beforeShow:function(){$(".ui-datepicker-trigger").addClass("is-active").addClass("animated").addClass("bounceIn")},onClose:function(){$(".ui-datepicker-trigger").removeClass("is-active").removeClass("animated").removeClass("bounceIn")}}),e.datepicker($.datepicker.regional.ru))}(),$(".b-scroll-block_sidebar-left").stick_in_parent({parent:".l-page__body",spacer:!1}),$(".js-scroll-bar").mCustomScrollbar({autoHideScrollbar:!0}),RG.parser.render("rg-form"),RG.Subscribe.init(),RG.meta.getSujet()&&RG.parser.render("rg-follow-sujet",{data:{subscribed:!1,txt:"Следить за сюжетом",sujet:RG.meta.getSujet()}}),RG.Saved.init(),RG.Analytics.init(),RG.events.subscribe(RG.Analytics.Ga._modulePrefix+".running",function(){RG.logger.log("аналитика настроена и готова к кастомной работе")}),RG.Analytics.run(),function(){var e=$(".b-icon_type_print");e.length&&e.on("click",function(e){e.preventDefault(),window.print()})}(),"dev"===RG.config.env||RG.meta.getPreview()||(RG.Counters.init(),RG.events.publish("Counters.run")),RG.meta.getPreview()||(RG.Ads.init(),RG.parser.render("rg-adfox"),RG.events.publish(RG.Ads.Adfox_modulePrefix+".run"),RG.Ads.YaDirect.init(),RG.parser.render("rg-yadirect")),RG.events.subscribe("Adfox.platform.loaded",function(e,t){RG.Partners.init(t)}),RG.ScreenViewer.init(),RG.events.publish(RG.ScreenViewer._modulePrefix+".check"),$(window).on("resize",function(){RG.events.publish("window.resize")}),RG.BlocksShifter.init(),RG.events.subscribe(RG.ScreenViewer._modulePrefix+".check",function(e){var t=RG.ScreenViewer.getScreenInfo();RG.logger.info(e),RG.Place.init(t),RG.events.publish(RG.BlocksShifter._modulePrefix+".run",t),RG.events.subscribe(RG.ScreenViewer._modulePrefix+".update",function(e,t){RG.logger.info(e),RG.events.publish(RG.BlocksShifter._modulePrefix+".run",t)})}),RG.RegionalNews.init(),RG.LiveReload.init(),RG.LiveReload.run(),RG.storage.set("auth",{email:"",firstName:"",lastName:""}),RG.Auth.init(),RG.session.init(),RG.events.publish("session.check"),RG.Menu.init(),RG.Menu.run(),new RG.ListHeadToSelect(".b-list-head_catalog .b-list-head__name_related",".b-list-head_catalog .b-list-head__row",".b-list-head_catalog .b-list-head__related"),function(){$(".b-vendors__item_more-btn").colorbox({onComplete:function(){},onOpen:function(){RG.events.publish("colorbox.opened")},onCleanup:function(){RG.events.publish("colorbox.closed")},className:"b-vendors b-vendors_overlay",inline:!0,href:$(".b-vendors_header").clone(),width:"408px",height:"400px",opacity:.7,initialWidth:0,initialHeight:0})}(),RG.events.subscribe(RG.ScreenViewer._modulePrefix+".check",function(e){var t=RG.ScreenViewer.getScreenInfo();RG.logger.log(e),"tabletLandscape"!==t.type&&"desktop"!==t.type&&"desktopFull"!==t.type?window.footerContentToggler?t.infoBefore&&t.infoBefore.screenWidth!==t.screenWidth&&("tabletLandscape"===t.infoBefore.type&&"desktop"!==t.infoBefore.type&&"desktopFull"!==t.infoBefore.type||window.footerContentToggler.initialHide()):window.footerContentToggler=new RG.ContentToggler($(".b-footer")[0],{btn:".b-footer__toggle",ctx:".b-footer__links",opened:!1}):window.footerContentToggler&&window.footerContentToggler.destroy()}),RG.events.subscribe(RG.ScreenViewer._modulePrefix+".update",function(e,t){"tabletLandscape"!==t.type&&"desktop"!==t.type&&"desktopFull"!==t.type?window.footerContentToggler?t.infoBefore&&t.infoBefore.screenWidth!==t.screenWidth&&("tabletLandscape"===t.infoBefore.type&&"desktop"!==t.infoBefore.type&&"desktopFull"!==t.infoBefore.type||window.footerContentToggler.initialHide()):window.footerContentToggler=new RG.ContentToggler($(".b-footer")[0],{btn:".b-footer__toggle",ctx:".b-footer__links",opened:!1}):window.footerContentToggler&&window.footerContentToggler.destroy()}),$("#vendorsRg").slick({dots:!1,infinite:!0,speed:300,slidesToShow:7,responsive:[{breakpoint:768,settings:{dots:!1,infinite:!0,speed:300,variableWidth:!0,slidesToShow:1,centerMode:!0}},{breakpoint:1024,settings:{dots:!1,infinite:!0,speed:300,slidesToShow:4}},{breakpoint:1366,settings:{dots:!1,infinite:!0,speed:300,slidesToShow:7}}]}),function(){"#code"===document.location.hash&&a("code.required",!1,!0)}(),RG.events.registerList({login:a,loginInfo:r,"search.overlay.show":o,"region.overlay.show":function(e){RG.logger.info(e),RG.config.regions?u("region.overlay.show",RG.config.regions):(RG.events.subscribe("geolocation.region.update",u,RG.config.regions),RG.events.publish("geolocation.region.all"))},"followed.show":l,"viewed.show":c,"session.confirm.required":function(e){RG.logger.info(e),"#social_redirect"===document.location.hash&&RG.events.publish("login",!0)},"overlay.resize":function(e){RG.logger.info(e);var i=$("#colorbox").find(".js-height-list");i.offset()&&i.css("height",window.$windowHeight-i.offset().top),$.colorbox.resize(),t()},"colorbox.opened":t,"colorbox.closed":i,"overlay.show":function(){e(!0)},"overlay.hide":function(){e(!1)},"session.user.authorized":function(e){RG.logger.info(e),RG.Auth.destruct(),$.colorbox.close()},"scroll.init":function(e,t){var i=t,n=RG.ScreenViewer.getScreenInfo().type;RG.logger.info(e),"tabletLandscape"!==n&&"tablet"!==n&&"mobile"!==n&&(i=i||$(".js-scroll-bar"),i.length&&(i.mCustomScrollbar("destroy"),i.mCustomScrollbar({autoHideScrollbar:!0})))},"scroll.destroy":function(e,t){var i=t;RG.logger.info(e),i=i||$(".js-scroll-bar"),i.mCustomScrollbar("destroy")},"livereload.init":function(e){RG.logger.info(e),RG.events.publish("scroll.init")},"geolocation.region.changed":function(e){RG.logger.info(e),$.colorbox.close()}})})},{"../blocks/overlays/b-region/scripts/Region":94,"../blocks/overlays/b-search-overlay/scripts/SearchOverlay":97,"./global/components":104,"./global/decorators":105,"./global/extends":106,"./global/modules":107}],104:[function(e,t,i){Ractive.components={"input-notification":e("../../blocks/forms/b-input-notification/scripts/InputNotification"),tabs:e("../../blocks/crosslayouts/b-tabs/scripts/Tabs"),"search-bar":e("../../blocks/crosslayouts/b-search-bar/scripts/SearchBar"),"rg-search-info":e("../../blocks/crosslayouts/b-search-info/scripts/SearchInfo"),"rg-search-filters":e("../../blocks/crosslayouts/b-search-filters/scripts/SearchFilters"),"rg-follow-sujet":e("../../blocks/crosslayouts/b-follow/scripts/Follow"),"subscribe-comments":e("../../blocks/crosslayouts/b-subscribe-comments/scripts/SubscribeComments"),spinner:e("../../blocks/crosslayouts/b-spinner/scripts/Spinner"),"dummy-empty":e("../../blocks/crosslayouts/b-dummy/scripts/Empty"),"rg-input":e("../../blocks/forms/b-input/scripts/Input"),"rg-email":e("../../blocks/forms/b-email/scripts/Email"),"rg-name":e("../../blocks/forms/b-name/scripts/Name"),"rg-checkbox":e("../../blocks/forms/b-checkbox/scripts/Checkbox"),"rg-select":e("../../blocks/forms/b-select/scripts/Select"),"rg-textarea":e("../../blocks/forms/b-textarea/scripts/Textarea"),"rg-button":e("../../blocks/forms/b-button/scripts/Button"),"rg-url":e("../../blocks/forms/b-url/sctipts/Url"),"rg-form-message":e("../../blocks/forms/b-form-message/scripts/FormMessage"),"rg-submit":e("../../blocks/forms/b-submit/scripts/Submit"),"rg-form":e("../../blocks/forms/b-form/scripts/Form"),"rg-mailing":e("../../blocks/crosslayouts/b-mailing/scripts/Mailing"),"rg-yadirect":e("../../blocks/crosslayouts/b-yadirect/scripts/Yadirect"),"rg-video":e("../../blocks/main/b-video/scripts/Video"),"rg-adfox":e("../../blocks/crosslayouts/b-adfox/scripts/Adfox"),"rg-relap":e("../../blocks/crosslayouts/b-relap/scripts/Relap"),"rg-video-inner":e("../../blocks/crosslayouts/b-video-inner/scripts/VideoInner"),"rg-fast-access":e("../../blocks/main/b-fast-access/scripts/FastAccess.js")}},{"../../blocks/crosslayouts/b-adfox/scripts/Adfox":6,"../../blocks/crosslayouts/b-dummy/scripts/Empty":10,"../../blocks/crosslayouts/b-follow/scripts/Follow":12,"../../blocks/crosslayouts/b-mailing/scripts/Mailing":15,"../../blocks/crosslayouts/b-relap/scripts/Relap":16,"../../blocks/crosslayouts/b-search-bar/scripts/SearchBar":18,"../../blocks/crosslayouts/b-search-filters/scripts/SearchFilters":21,"../../blocks/crosslayouts/b-search-info/scripts/SearchInfo":23,"../../blocks/crosslayouts/b-spinner/scripts/Spinner":26,"../../blocks/crosslayouts/b-subscribe-comments/scripts/SubscribeComments":28,"../../blocks/crosslayouts/b-tabs/scripts/Tabs":29,"../../blocks/crosslayouts/b-video-inner/scripts/VideoInner":32,"../../blocks/crosslayouts/b-yadirect/scripts/Yadirect":33,"../../blocks/forms/b-button/scripts/Button":35,"../../blocks/forms/b-checkbox/scripts/Checkbox":37,"../../blocks/forms/b-email/scripts/Email":38,"../../blocks/forms/b-form-message/scripts/FormMessage":40,"../../blocks/forms/b-form/scripts/Form":41,"../../blocks/forms/b-input-notification/scripts/InputNotification":44,"../../blocks/forms/b-input/scripts/Input":46,"../../blocks/forms/b-name/scripts/Name":47,"../../blocks/forms/b-select/scripts/Select":49,"../../blocks/forms/b-submit/scripts/Submit":51,"../../blocks/forms/b-textarea/scripts/Textarea":53,"../../blocks/forms/b-url/sctipts/Url":54,"../../blocks/main/b-fast-access/scripts/FastAccess.js":67,"../../blocks/main/b-video/scripts/Video":70}],105:[function(e,t,i){var n=e("../../blocks/crosslayouts/b-custom-datepicker/scripts/main");Ractive.decorators={"date-picker":function(e){var t=this,i=new n({field:e,triggerLabel:"b-custom-datepicker__trigger",calendarParam:{onSelect:function(){t.updateModel(),RG.events.publish("date.picked",t)}}});return RG.events.publish(i.getName()+".run"),{teardown:function(){RG.logger.log("have to destroy"),i.destroy()}}},"scroll-bar":function(e){return $(e).mCustomScrollbar({autoHideScrollbar:!0}),{teardown:function(){$(e).mCustomScrollbar("destroy")}}},"select-text-to-clipboard":function(e){var t=$(e),i=!1;return t.on("mouseup",function(e){var n=null,s="",a=null,r=null;if(!i&&(window.getSelection&&(n=window.getSelection(),s=n.toString()),s))try{i=!0,document.execCommand("copy"),r=$("
",{class:"b-rgftools__notify animated fadeOut"}).text("скопировано").css({top:e.clientY,left:e.clientX}),t.append(r),a=setTimeout(function(){r.remove(),clearTimeout(a),i=!1},1500)}catch(e){RG.logger.info("не могу скопировать текст. Декоратор select-text-to-clipboard")}}),{teardown:function(){t.remove()}}}}},{"../../blocks/crosslayouts/b-custom-datepicker/scripts/main":7}],106:[function(e,t,i){Ractive.transitions.fade=e("ractive-transitions-fade"),_.mixin({getQueryParam:function(e,t){var i=new RegExp("[?&]"+t+"(=([^&#]*)|&|#|$)"),n=i.exec(e);return e||(e=window.location.href),e=e.toLowerCase(),t=t.replace(/[\[\]]/g,"\\$&").toLowerCase(),n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null},remove:function(e,t){return delete e[t],e},objMap:function(e,t,i){return _.reduce(e,function(n,s,a){return n[a]=t.call(i,s,a,e),n},{},i)},objFilter:function(e,t,i){return _.reduce(e,function(n,s,a){return t.call(i,s,a,e)&&(n[a]=s),n},{},i)},objReject:function(e,t,i){return _.reduce(e,function(n,s,a){return t.call(i,s,a,e)||(n[a]=s),n},{},i)}})},{"ractive-transitions-fade":5}],107:[function(e,t,i){RG.config=RG.config||e("../config"),RG.meta=RG.meta||e("../modules/Meta"),RG.config.env=RG.meta.getEnv(),Ractive.DEBUG="dev"===RG.meta.getEnv(),RG.logger=RG.logger||e("../modules/Logger"),RG.events=RG.events||e("../modules/Events"),RG.session=RG.session||e("../modules/Session"),RG.query=RG.query||e("../modules/Query"),RG.storage=RG.storage||e("../modules/Storage"),RG.datetime=RG.datetime||e("../modules/DateTime"),RG.selection=RG.selection||e("../modules/Selection"),RG.parser=RG.parser||e("../modules/Parser"),RG.ScreenViewer=RG.ScreenViewer||e("../modules/ScreenViewer"),RG.Subscribe=RG.Subscribe||e("../modules/Services/Subscribe"),RG.Saved=RG.Saved||e("../modules/Services/Saved"),RG.Viewed=RG.Viewed||e("../modules/Services/Viewed"),RG.Geolocation=RG.Geolocation||e("../modules/Services/Geolocation"),RG.Place=RG.Place||e("../modules/Services/Place"),RG.Analytics=RG.Analytics||e("../modules/Analytics/Analytics"),RG.Counters=RG.Counters||e("../modules/Counters"),RG.Ads=RG.Ads||e("../modules/Ads/Ads"),RG.Partners=RG.Partners||e("../modules/Partners/Partners"),RG.BlocksShifter=RG.BlocksShifter||e("../modules/BlocksShifter"),RG.ContentToggler=RG.ContentToggler||e("../modules/ContentToggler"),RG.ContentHandler=RG.ContentHandler||e("../modules/ContentHandler"),RG.LiveReload=RG.LiveReload||e("../modules/LiveReload"),RG.RegionalNews=RG.RegionalNews||e("../modules/Services/RegionalNews"),RG.ListHeadToSelect=RG.ListHeadToSelect||e("../modules/ListHeadToSelect"),RG.Menu=RG.Menu||e("../../blocks/header/b-menu/scripts/main"),RG.Auth=RG.Auth||e("../../blocks/overlays/b-auth/scripts/main"),RG.forms=RG.forms||{},RG.Notify=RG.Notify||e("../modules/Notify")},{"../../blocks/header/b-menu/scripts/main":64,"../../blocks/overlays/b-auth/scripts/main":87,"../config":102,"../modules/Ads/Ads":109,"../modules/Analytics/Analytics":115,"../modules/BlocksShifter":119,"../modules/ContentHandler":120,"../modules/ContentToggler":121,"../modules/Counters":122,"../modules/DateTime":123,"../modules/Events":124,"../modules/ListHeadToSelect":125,"../modules/LiveReload":126,"../modules/Logger":127,"../modules/Meta":128,"../modules/Notify":129,"../modules/Parser":130,"../modules/Partners/Partners":131,"../modules/Query":132,"../modules/ScreenViewer":133,"../modules/Selection":134,"../modules/Services/Geolocation":135,"../modules/Services/Place":136,"../modules/Services/RegionalNews":137,"../modules/Services/Saved":138,"../modules/Services/Subscribe":139,"../modules/Services/Viewed":140,"../modules/Session":142,"../modules/Storage":143}],108:[function(e,t,i){var n="Adfox",s=function(e,t){var i=window.ADFOX.RELOAD_CODE,n=null,s=null,a=null,r=null,o=null;e.html(""),_.each(t,function(t){_.isEmpty(t.uri)?_.isEmpty(t.code)||e.append(t.code):(o="adfox_"+Math.random().toString(36).substring(7),a=t.uri,r=t.scroll,s=$("
",{id:o,class:"adfox_item"}),n=i.initBanner(o,a),e.append(s.append(n.html)),r?e.closest(".b-ads").hasClass("b-ads_fullscreen")?i.loadBanner(n.pr1,t.uri,n.sessionId):(RG.logger.log("loadBanner with appear "+o),RG.logger.info("appear is delete. Use Waypoints.js")):i.loadBanner(n.pr1,t.uri,n.sessionId))})},a=function(e,t){RG.logger.info(e);for(var i in t)if({}.hasOwnProperty.call(t,i)){var n="#ads"+i,a=$(n);a.length&&s(a,t[i])}},r=function(){RG.events.subscribe(n+".places.set",a)};t.exports={_modulePrefix:n,init:r}},{}],109:[function(e,t,i){var n=[],s=e("./Adfox"),a=e("./Teads"),r=e("./YaDirect"),o=e("./Ivengo"),l=e("./Turboroller"),c=e("./NativeRoll"),u=function(e,t){var i={};_.forEach(e,function(e,n){i[n]=_.filter(e,function(e){return parseInt(e[t],10)})}),RG.events.publish("Adfox.places.set",i),RG.events.publish("Turboroller.places.set",i),RG.events.publish("YaDirect.places.set",i)},d=function(){var e=RG.meta.getPlatform()||"/static/main/ind";$.get("https://front.rg.ru/blocks/platform"+e).then(function(e){n=e,u(n,RG.ScreenViewer.getScreenInfo().type),RG.events.publish("Adfox.platform.loaded",e)})},f=function(){s.init(),d(),RG.events.subscribe(RG.ScreenViewer._modulePrefix+".update",function(e,t){u(n,t.type)})};t.exports={Adfox_modulePrefix:s._modulePrefix,Teads_modulePrefix:a._modulePrefix,YaDirect_modulePrefix:r._modulePrefix,Ivengo_modulePrefix:o._modulePrefix,Turboroller_modulePrefix:l._modulePrefix,Adfox:s,Teads:a,YaDirect:r,Ivengo:o,Turboroller:l,NativeRoll:c,init:f}},{"./Adfox":108,"./Ivengo":110,"./NativeRoll":111,"./Teads":112,"./Turboroller":113,"./YaDirect":114}],110:[function(e,t,i){var n="Ivengo",s=RG.config.env,a="//s.i-vengo.com/js/ivengo.min.js",r={prod:"18s59u0l2mb",dev:"18s59u0l2mb"},o=function(){$.getScript(a).done(function(){RG.events.publish(n+".lib.loaded")})},l=function(){var e=RG.ScreenViewer.getScreenInfo().type,t=window.iVengo||null;"mobile"===e&&t&&(t.init({appId:r[s],logLevel:"info"}),t.fillSlot({adType:["standart","cube","inline_video","slim_video"],width:"100%",mobileOnly:!0}),t.showInterstitial({adType:"fullscreen"}))},c=function(){o(),RG.events.subscribe(n+".lib.loaded",l)},u=function(){RG.events.subscribe(n+".init",c)};t.exports={_modulePrefix:n,init:u}},{}],111:[function(e,t,i){var n="NativeRoll",s=RG.config.env,a=function(){var e=$(".b-material-wrapper__text")[0],t={onError:function(e){console.log(e)}};t.gid="5715fa7b64225d0e308b456e","dev"===s&&(t.debug=!0),SeedrPlayer(e,20,t)},r=function(){!function(e,t,i,n,s,a,r,o){r=t.createElement(i),r.src=n,r.type="application/javascript",r.async=!0,o=t.getElementsByTagName(i)[0],o.parentNode.insertBefore(r,o),e[a]=[],e[s]=function(){e[a].push(Array.prototype.slice.apply(arguments))}}(window,document,"script",("https:"===document.location.protocol?"https:":"http:")+"//cdn01.nativeroll.tv/js/seedr-player.min.js","SeedrPlayer","seedrInit")},o=function(){r(),a()};t.exports={_modulePrefix:n,init:o}},{}],112:[function(e,t,i){var n="Teads",s=RG.config.env,a={mobile:{inread:{prod:25863,dev:25863}},desktop:{inread:{prod:19301,dev:19301},inboard:{prod:25888,dev:25888}}},r="teads",o="//cdn.teads.tv/media/format.js",l={mobile:[{pid:a.mobile.inread[s],lang:"ru",slot:".b-material-wrapper__text > p",format:"inread",components:{skip:{delay:0}},mutable:!0,css:"margin: 0px 0px 20px;"}],desktop:[{pid:a.desktop.inboard[s],lang:"en",slot:".l-page__wrapper #rgb_header_article #rgb_header__content",format:"inboard",mobile:!1,minSlot:3,components:{skip:{delay:0}},mutable:!0,css:"margin: 15px 0px 0px;"},{pid:a.desktop.inread[s],lang:"ru",slot:".b-material-wrapper__text > p",format:"inread",className:r+" teads_inread",mobile:!1,minSlot:1,components:{skip:{delay:0}},mutable:!0,css:"margin: 0px 0px 20px;"}]},c=function(e){var t=null;window._ttf=window._ttf||[],t="mobile"===e?l.mobile:l.desktop,$.each(t,function(e,t){window._ttf.push(t)})},u=function(){$.getScript(o)},d=function(e){c(e),u()};t.exports={_modulePrefix:n,init:d}},{}],113:[function(e,t,i){var n="Turboroller",s=RG.config.env,a={prod:"9429",dev:"9429"},r=function(e){var t=$("#ads"+e),i=$("
"),n=null,r="turbo",l="roller"+Math.random().toString(36).substring(7),c=null;t.length&&(n=r+l,c="//engine.turboroller.ru/Route?place=rg.ru-"+a[s]+"&ctx="+escape(document.title)+"&r="+Math.floor(99999999999*Math.random())+"&r2="+l+"&ct1="+document.defaultCharset+"&ct2="+document.characterSet,i.addClass("b-ads__tgb").attr("id",n),t.append(i),o(c))},o=function(e){$.getScript(e).done(function(){RG.events.publish(n+".loaded")})},l=function(e,t){$.each(t,function(e,t){$.each(t,function(t,i){var n=i.turboroller||null;n&&r(e)})})},c=function(){RG.events.subscribe(n+".places.set",l)};t.exports={_modulePrefix:n,init:c}},{}],114:[function(e,t,i){var n="YaDirect",s="29789",a="//an.yandex.ru/system/context.js",r="ya-direct-root",o="ya-direct_loaded",l=function(){$.getScript(a)},c=function(t){var i=null,n=e("../ScreenViewer").getScreenInfo(),s={mobile:1,tablet:2,tabletLandscape:3,desktop:4,desktopFull:5};return i=[t.placeAdsId.replace("ads",""),0,s[n.type],0,1],""+i.join("")},u=function(e,t){var i=null,n=null;$.each(t,function(t,a){var l=a.yadirect;l&&(l=JSON.parse(l),i=$("
"),n="yaDirect_"+Math.random().toString(36).substring(7),i.attr({id:n,class:"ya-direct-"+l.type+" "+r+" "+o}),e.append(i),window.yandex_context_callbacks=window.yandex_context_callbacks||[],l.stat_id=c({placeAdsId:e.attr("id"),param:a}),window.yandex_context_callbacks.push(function(){Ya.Direct.insertInto(s,n,l)}))})},d=function(e,t){var i=null;for(i in t)if({}.hasOwnProperty.call(t,i)){var n="#ads"+i,s=$(n);s.length&&u(s,t[i])}l()},f=function(){RG.events.subscribe(n+".places.set",d)};t.exports={_modulePrefix:n,init:f}},{"../ScreenViewer":133}],115:[function(e,t,i){var n=e("./Chartbeat"),s=e("./Ga"),a=e("./Contentinsights"),r=function(){n.init(),s.init(),a.init()},o=function(){RG.events.publish(n._modulePrefix+".run"),RG.events.publish(s._modulePrefix+".run")};t.exports={Chartbeat:n,Ga:s,Contentinsights:a,init:r,run:o}},{"./Chartbeat":116,"./Contentinsights":117,"./Ga":118}],116:[function(e,t,i){var n="Chartbeat",s=function(){$.getScript("//static.chartbeat.com/js/chartbeat.js").done(function(){window._sf_endpt=(new Date).getTime()}).fail(function(){RG.logger.error("chartbeat not loaded")})},a=function(){window._sf_startpt=(new Date).getTime()},r=function(){window._sf_async_config=window._sf_async_config||{},_sf_async_config.uid=52857,_sf_async_config.domain="rg.ru",_sf_async_config.useCanonical=!0,_sf_async_config.sections=RG.meta.getSectionName()||"",_sf_async_config.authors=RG.meta.getAuthorName()||"","function"!=typeof window.onload?window.onload=s:window.onload=function(){s()}},o=function(){a(),r()},l=function(){RG.events.subscribe(n+".run",o)};t.exports={_modulePrefix:n,init:l}},{}],117:[function(e,t,i){var n="Contentinsights",s="1339",a=function(){!function(e,t){var i=null,n=null;i=e.createElement(t),i.type="text/javascript",i.async=!0,i.src=("https:"===e.location.protocol?"https://d7d3cf2e81d293050033-3dfc0615b0fd7b49143049256703bfce.ssl.cf1.rackcdn.com":"http://t.contentinsights.com")+"/stf.js",n=e.getElementsByTagName(t)[0],n.parentNode.insertBefore(i,n)}(document,"script")},r=function(){var e={id:s,url:RG.meta.getMaterialUrl()||"",postid:RG.meta.getMaterial()||"",title:RG.meta.getMaterialTitle()||"",pubdate:RG.meta.getPubTime()||"",authors:RG.meta.getAuthorName()||"",sections:RG.meta.getSectionName()||"",maincontent:".b-content_article"};window._ain=e,RG.logger.log(e)},o=function(){RG.logger.log("Contentinsights run"),r(),a()},l=function(){RG.logger.log("Contentinsights init"),RG.events.subscribe(n+".run",o)};t.exports={init:l,_modulePrefix:n}},{}],118:[function(e,t,i){var n="Ga",s="dev"!==RG.config.env?"UA-7039329-2":"UA-7039329-30",a={1:["reg","uri"],2:["theme","uri"],3:["org","uri"],4:["project","uri"],5:["fascicle","uri"],6:["author","uri"],7:["sujet","uri"],9:["article","length"]},r=function(){$.getScript("//www.google-analytics.com/analytics.js")},o=function(){var e=RG.meta.getAll();e?$.each(a,function(t,i){var n=i[0],s=i[1],a=null;e[n]&&(a=e[n][s]),a&&("article"===n&&"length"===s&&(s=100*Math.floor(+s/100)),ga("set","dimension"+t,a))}):RG.logger.error("Ga.js -> dimensionsSet: не найден объект Meta")},l=function(){var e=RG.meta.getGaId(),t=RG.meta.getProjectUri();window.ga=window.ga||function(){ga.q=ga.q||[],ga.q.push(arguments)},ga.l=+new Date,RG.logger.log("ga id: "+e),RG.logger.log("ga GaURI: "+t),ga("create",s,"rg.ru"),e&&ga("create",e,"rg.ru",{name:t}),o(),ga("set","dimension8",RG.ScreenViewer.getScreenInfo().type),ga("require","displayfeatures"),ga("send","pageview")},c=function(e){var t=e.type||"send",i=e.param;ga(t,{hitType:i.hitType,eventCategory:i.eventCategory,eventAction:i.eventAction,eventLabel:i.eventLabel,eventValue:i.eventValue,nonInteraction:i.nonInteraction||!0}),RG.logger.log("Отправлены GA данные, по событию "+t),RG.logger.log("Отправлены GA данные, с параметрами",i)},u=function(e){var t=e.type,i=e.param;$(i.tagLabel).on(i.event,function(){c({type:t,param:{hitType:i.hitType,eventCategory:i.eventCategory,eventAction:i.eventAction,eventLabel:i.eventLabel,eventValue:i.eventValue}}),RG.logger.log("send GA, event: "+i.event+", on element "+i.tagLabel)}),RG.logger.log("Зарегестрировано событие GA, event: "+i.event+", на элементе "+i.tagLabel)},d=function(e){var t=e.list;$.each(t,function(e,t){$.each(t,function(e,t){$.each(t,function(t,i){u({type:e,param:i})})})})},f=function(){r(),l(),RG.events.publish(n+".running")},h=function(){RG.events.subscribe(n+".run",f)};t.exports={_modulePrefix:n,register:u,registerList:d,sendTracker:c,init:h}},{}],119:[function(e,t,i){var n=e("keypather")(),s="BlocksShifter",a=".shiftContainer",r="shiftContainer_active",o="data-blocksShifterId",l="data-blocksShifterWidthHash",c={},u=function(e,t){var i=$(a);i.length&&d(i,t)},d=function(e,t){var i=t.type;e.each(function(e,t){var n=$(t),s=n.attr(l),a=n.attr(o),c=null;s=s.split(" "),$.each(s,function(e,t){t===i&&(c=$("["+o+"="+a+"]."+r),f(n,c,a,i,r))})})},f=function(e,t,i,s,a){e.children().length||t.children().appendTo(e.empty()),n.in(c,i+"."+s+".callback")&&c[i][s].callback(e,t),t.removeClass(a),e.addClass(a)},h=function(e){$.each(e,function(e,t){var i=t.blockId||null,n=t.screenType.split(" ")||null,a=t.callback||null;try{if(!(i&&n&&a))throw new Error("не указаны все данные для функции"); c[i]||(c[i]={}),$.each(n,function(e,t){c[i][t]||(c[i][t]={}),c[i][t].callback=a})}catch(e){RG.logger.error("Модуль "+s+", функция setCallback.\nОшибка: "+e)}})},m=function(){RG.events.subscribe(s+".run",u)};t.exports={setCallback:h,_modulePrefix:s,init:m}},{keypather:1}],120:[function(e,t,i){function n(e,t){var i=$(e),n=null,s={labelList:".b-content-handler__btn",contentList:".b-content-handler__ctx",active:"is-active",attrFind:"data-content-handler"};this.options=n=$.extend({},s,t),this.$root=i,this.$labelList=i.find(n.labelList),this.$contentList=i.find(n.contentList),this.$activeBtn=null,this.$activeCtx=null,this.init()}n.fn=n.prototype,n.fn.setHeight=function(e){return e.css("height",e.children().outerHeight(!0)),this},n.fn.select=function(e,t){var i=null;if(this.deselect(),e.addClass(this.options.active),this.storeBtn(e),i=this.$root.find(t),!i)throw new Error("Не найден выбранный элемент, проверьте аттрибут поиска элемента: "+this.options.attrFind);return i.addClass(this.options.active),this.storeCtx(i),this.setHeight(i.closest(".b-rubricator-wrapper")),this},n.fn.deselect=function(){return this.$activeBtn&&this.$activeBtn.removeClass(this.options.active),this.$activeCtx&&this.$activeCtx.removeClass(this.options.active),this},n.fn.storeBtn=function(e){return this.$activeBtn=e,this},n.fn.storeCtx=function(e){return this.$activeCtx=e,this},n.fn.storeActiveEl=function(){var e=this.options.active;return this.$activeBtn=this.$labelList.filter("."+e),this.$activeCtx=this.$contentList.filter("."+e),this},n.fn.init=function(){var e=this;return this.storeActiveEl().$labelList.on("click",function(t){var i=$(this),n=null,s=e.options.onSelect;if(t.preventDefault(),n=i.attr(e.options.attrFind),!n)throw new Error("Не установлен аттрибут поиска элемента: "+e.options.attrFind);e.select(i,n),$.isFunction(s)&&s(t)}),this},t.exports=n},{}],121:[function(e,t,i){function n(e,t){var i=$(e),n=null,s={btn:".b-content-toggler__btn",ctx:".b-content-toggler__ctx",show:"is-show",hide:"is-hide",opened:!1};$.extend({location:"top","background-color":"blue"},t),this.options=n=$.extend({},s,t),this.$root=i,this.$btn=i.find(n.btn),this.$ctx=i.find(n.ctx),this.init()}n.fn=n.prototype,n.fn.destroy=function(){return this.$root.removeClass(this.options.show).removeClass(this.options.hide),this.$ctx.css("height","auto"),this},n.fn.setHeight=function(e){return e.css("height",e.children().outerHeight(!0)),this},n.fn.initialHide=function(){var e=this.options.show,t=this.options.hide;return this.$ctx.css("height",0),this.$root.removeClass(e).addClass(t),this},n.fn.showHide=function(){var e=this.options.show,t=this.options.hide;return this.$root.hasClass(e)?(this.$ctx.css("height",0),this.$root.removeClass(e).addClass(t)):(this.setHeight(this.$ctx),this.$root.removeClass(t).addClass(e)),this},n.fn.initialShow=function(){var e=this.options.show,t=this.options.hide;return this.setHeight(this.$ctx),this.$root.removeClass(t).addClass(e),this},n.fn.init=function(){var e=this;return this.options.opened?(this.$root.addClass(this.options.show),setTimeout(function(){e.setHeight(e.$ctx)},1e3)):this.initialHide(this.$ctx),$(window).resize(function(){e.$root.hasClass(e.options.show)&&e.setHeight(e.$ctx)}),this.$btn.on("click",function(){e.showHide(e.$ctx)}),RG.events.subscribe("ContentHandler.select",function(){e.setHeight(e.$ctx)}),this},t.exports=n},{}],122:[function(e,t,i){var n="Counters",s="https:",a=[{name:"top100RamblerCounter",targetId:"#top100counter",init:function(e){window._top100q=window._top100q||[],window._top100q.push(["setAccount","250928"]),window._top100q.push(["trackPageviewByLogo",$(e)[0]]),$.getScript(s+"//st.top100.ru/top100/top100.js"),RG.logger.info("top100counter init")}},{name:"mailruCounter",targetId:"#mailruCounter",init:function(e){var t=null,i=null,n=null;t=window._tmr||(window._tmr=[]),t.push({id:"11659",type:"pageView",start:(new Date).getTime()}),$.getScript(s+"//top-fwz1.mail.ru/js/code.js"),i=$("",{target:"_blank",href:s+"//top.mail.ru/jump?from=11659"}),n=$("",{src:s+"//top-fwz1.mail.ru/counter?id=11659;t=409;l=1",alt:"Рейтинг@Mail.ru",width:"88px",height:"31px",border:"0"}),$(e).append(i.append(n)),RG.logger.info("mailruCounter init")}},{name:"LiveInternetCounter",targetId:"#liveInternetCounter",init:function(e){var t=null,i=null,n=null,a=RG.meta.getCustomLiveinternet();t=$("",{href:s+"//www.liveinternet.ru/click",target:"_blank"}),n=s+"//counter.yadro.ru/hit?t14.11;r"+escape(document.referrer)+("undefined"==typeof screen?"":";s"+screen.width+"*"+screen.height+"*"+(screen.colorDepth?screen.colorDepth:screen.pixelDepth))+";u"+escape(document.URL)+";h"+escape(document.title.substring(0,80))+";"+Math.random(),i=$("",{src:n,title:"LiveInternet: показано число просмотров за 24 часа,\nпосетителей за 24 часа и за сегодня",alt:"LiveInternet",border:"0",width:"88px",height:"31px"}),$(e).append(t.append(i)),RG.logger.info("liveInternetCounter init"),a&&(a=a.trim(),$.each(a.split(" "),function(e,t){t&&((new Image).src=s+"//counter.yadro.ru/hit;"+t+"?r"+escape(document.referrer)+("undefined"==typeof screen?"":";s"+screen.width+"*"+screen.height+"*"+(screen.colorDepth?screen.colorDepth:screen.pixelDepth))+";u"+escape(document.URL)+";"+Math.random(),RG.logger.info("liveInternetCounter with custom Hit init: "+t))}))}},{name:"tnsCounter",targetId:"#tnsCounter",init:function(e){var t=null,i=null;i=s+"//www.tns-counter.ru/V13a***R>"+document.referrer.replace(/\*/g,"%2a")+"*rg_ru/ru/UTF-8/tmsec=rg_total/",t=$("",{src:i,border:"0",width:"1px",height:"1px"}).css({position:"absolute",left:"-10000px"}),$(e).append(t),RG.logger.info("tnsCounter init")}},{name:"yaMetrikaCounter",targetId:"#yaMetrika",init:function(){var e=RG.meta.getYaMetrikaId()||"22322746";RG.logger.log("Yandex Metrika id "+RG.meta.getYaMetrikaId()),window.yandex_metrika_callbacks=window.yandex_metrika_callbacks||[],window.yandex_metrika_callbacks.push(function(){try{window.yaCounter22322746=new Ya.Metrika({id:e,clickmap:!0,trackLinks:!0,accurateTrackBounce:!0})}catch(e){RG.logger.error(e+". Yandex Metrika error")}}),$.getScript(s+"//mc.yandex.ru/metrika/watch.js"),RG.logger.info("yaMetrika init")}}],r=function(){$.each(a,function(e,t){t.init(t.targetId)})},o=function(){RG.events.subscribe(n+".run",r)};t.exports={init:o}},{}],123:[function(e,t,i){var n,s,a=function(e){return n=moment().format("HH:mm"),e&&(n=e.slice(-4,-2)+":"+e.slice(-2)),n},r=function(e){var t=!1;return e?(s=moment(e,"YYYYMMDDhhmm"),s.isSame(moment(),"day")&&(t=s.format("HH:mm")),t=s.format("DD.MM.YYYY")):t=moment().format("HH:mm"),t};t.exports={getTime:a,parseVmDate:r}},{}],124:[function(e,t,i){var n=PubSub;n.immediateExceptions="dev"===RG.config.env,n.registerList=function(){var e=this,t=arguments.length<=0||void 0===arguments[0]?null:arguments[0];_.isEmpty(t)||_.each(t,function(t,i){_.isString(i)&&_.isFunction(t)&&e.subscribe(i,t)})}.bind(n),t.exports=n},{}],125:[function(e,t,i){var n=e("../../blocks/forms/b-select/scripts/Select"),s=function(){function e(t,i,n){_classCallCheck(this,e),this.id=_.random(0,1e3),this.elementId="selectRubric-"+this.id,this.$element=this.appendElement(i),this.$list=$(n).addClass("is-tablet_block").addClass("is-tabletLanscape"),RG.logger.log(this.$element),RG.logger.log(this.$list),this.collectItems(t),this.run()}return _createClass(e,[{key:"collectItems",value:function(e){var t=[];return $(e).each(function(e,i){t.push(RG.parser.getAttributes(i))}),this.setItems(t)}},{key:"appendElement",value:function(e){var t=$("
").attr("id",this.elementId).addClass("is-mobile_block");return $(e).append(t),t}},{key:"run",value:function(){this.selectedOption=this.selectedOption||_.findWhere(this.getItems(),{href:document.location.pathname}),this.render()}},{key:"getItems",value:function(){return this.items}},{key:"setItems",value:function(e){return this.items=e,this.items}},{key:"setSelected",value:function(e){return this.selectedOption=e,this.selectedOption}},{key:"render",value:function(){var e=this.getItems(),t=null;e.length&&(t=this.selectedOption||this.setSelected(e[0]),this.component=new n({el:this.elementId,isolated:!0,data:function(){return{items:e,selectedOption:t}}}))}}]),e}();t.exports=s},{"../../blocks/forms/b-select/scripts/Select":49}],126:[function(e,t,i){var n=e("../../blocks/main/b-live-reload/scripts/LiveReload"),s=[],a={},r={},o={},l={},c={},u={},d=!1,f=!1,h=function(){s=[],$(".liveReload").each(function(e,t){$(t).attr("id","live_reload_"+Math.random().toString(36).substring(10));var i=_.extend(RG.parser.getAttributes(t),{el:t});_.each(i,function(e,t){var n=t.replace("data-","");i[n]=e}),s.push(i)})},m=function(e){RG.logger.trace(_(s).where({json:e.json})),_.chain(s).where({json:e.json}).each(function(e){if($.each(l,function(e,t){t.widgets&&(1!==t.widgets.instagram||d||($.getScript('//platform.instagram.com/en_US/embeds.js"'),d=!0),1!==t.widgets.twitter||f||($.getScript("//platform.twitter.com/widgets.js"),f=!0))}),a[e.id])if(_.isArray(l[e.json]))a[e.id].reset(l[e.json]);else try{a[e.id].set(l[e.json])}catch(e){RG.logger.log("LiveReload object is updated")}else a[e.id]=new n({template:r[e.tmpl],data:l[e.json],el:e.el,magic:!0,partials:{part:o[e.tmpl]}});RG.events.publish("livereload.init",e),f=!1}),b(e)},p=function(e){"jsonp"===e.request?$.ajax({url:e.json,dataType:"jsonp",jsonp:"callback",jsonpCallback:"callback"}).then(function(t){l[e.json]=t,m(e)}):$.get(e.json).then(function(t){l[e.json]=t,m(e)})},g=function(e){setTimeout(function(){u[e.tmpl]?u[e.json]||(p(e),u[e.json]=!0):(v(e),u[e.tmpl]=!0)},e.delay)},b=function(e){var t=e.json,i=l[e]||{},n=parseInt(i.interval,10)||6e4;return!(t in c&&(clearInterval(c[t].intervalId),delete c[t],0===n))&&(n=n>2e4?n:2e4,void(c[t]={intervalId:setInterval(function(){p(e)},n),intervalTime:n}))},v=function(e){var t=e.tmpl,i=e.iterator,n="";$.get(t).then(function(s){i?(n="{{#"+i+"}}{{>part}}{{/"+i+"}}",o[e.tmpl]=s):n=s,r[t]=n,u[e.json]||(p(e),u[e.json]=!0)})},w=function(){RG.logger.trace(s),_.each(s,function(e){g(e)})},y=function(){h()};t.exports={init:y,run:w}},{"../../blocks/main/b-live-reload/scripts/LiveReload":68}],127:[function(e,t,i){var n=function(){var e=new Date;return[e.getHours(),e.getMinutes(),e.getSeconds()].join(":")+"."+e.getMilliseconds()},s=function(){return"dev"===RG.config.env||"test"===RG.config.env},a=function(e){s()&&console.log(n(),e)},r=function(e){s()&&console.info(n(),e)},o=function(e){s()&&console.warn(n(),e)},l=function(e){s()&&console.error(n(),e)},c=function(e){s()&&console.debug(n(),e)},u=function(e){s()&&console.trace(n(),e)};t.exports={log:a,info:r,warn:o,error:l,debug:c,trace:u}},{}],128:[function(e,t,i){var n=function(e){var t=null;return RG&&RG._meta&&(t=e?e.split(".").reduce(function(e,t){return"undefined"==typeof e||null===e?e:e[t]},RG._meta):RG._meta),t},s=function(){return n()},a=function(){return n("env")},r=function(){return n("article.id")},o=function(){return n("article.title")},l=function(){return n("article.url")},c=function(){return n("article.image")},u=function(){return n("project.uri")},d=function(){return n("sujets.firstId")},f=function(){return n("sujets.firstTitle")},h=function(){return n("article.published_time")},m=function(){return n("sections.name")},p=function(){return n("authors.name")},g=function(){return n("ads.uri")},b=function(){return n("ads.reg")},v=function(){return n("ads.url")},_=function(){return n("page")},w=function(){return n("ads.custom")},y=function(){return n("counters.ga")},R=function(){return n("counters.ya")},k=function(){return n("counters.li")},x=function(){return n("preview")};t.exports={getAll:s,getEnv:a,getSujet:d,getMaterial:r,getSujetTitle:f,getPubTime:h,getMaterialTitle:o,getMaterialUrl:l,getMaterialImg:c,getSectionName:m,getAuthorName:p,getProjectUri:u,getPlatform:g,getPlatformReg:b,getPlatformUrl:v,getPage:_,getAdsHide:w,getGaId:y,getYaMetrikaId:R,getCustomLiveinternet:k,getPreview:x}},{}],129:[function(e,t,i){var n=function(){function e(){_classCallCheck(this,e),this._SERVICE_WORKER_URI="/worker-notify.js",this._SUBS_API="https://front.rg.ru/app_dev.php/notify/get_data?recipient=",this._CLIENT_HASH=null,this.ready=this.checkToNotify()}return _createClass(e,[{key:"checkToNotify",value:function(){return new Promise(function(e,t){return"undefined"==typeof Notification?t({msg:"Нотификации не поддерживаются"}):"denied"===Notification.permission?t({msg:"Отправка нотификаций заблокирована"}):"granted"===Notification.permission?e({msg:"Отправка нотификаций разрешена"}):void("default"===Notification.permission&&Notification.requestPermission(function(i){"granted"!==i&&t({msg:"Отправка нотификаций заблокирована"}),e({msg:"Отправка нотификаций разрешена"})}))})}},{key:"registerServiceWorker",value:function(){var e=this,t=this._SERVICE_WORKER_URI,i={insecure:!0};"serviceWorker"in navigator?(RG.logger.info("Service Worker поддерживается"),navigator.serviceWorker.register(t,i).then(function(t){RG.logger.info("Service Worker зарегистрирован",t),e.subscribeClient()}).catch(function(e){return RG.logger.error("ServiceWorker не зарегистрирован",e)})):RG.logger.info("Service Worker не поддерживается. Работаем по принципу арахиса")}},{key:"subscribeClient",value:function(){var e=this;return RG.logger.log("subscribeClient"),navigator.serviceWorker.ready.then(function(e){return e.pushManager.subscribe({userVisibleOnly:!0})}).then(function(t){RG.logger.info("Подписаться на уведомления получилось"),e.subscriptionUpdate(t)}).catch(function(){return RG.logger.info("Подписаться на уведомления не получилось")})}},{key:"subscriptionUpdate",value:function(e){var t=this._SUBS_API,i=JSON.parse(JSON.stringify(e));i&&i.keys&&i.keys.auth&&i.keys.p256dh?(fetch(""+t+i.endpoint).catch(function(e){return RG.logger.error("Ошибка регистрации пользователя",e)}),this.storeClientHash(i.endpoint.replace("https://android.googleapis.com/gcm/send/",""))):RG.logger.error("Некорректный объект для сервиса уведомлений",i)}},{key:"storeClientHash",value:function(e){this._CLIENT_HASH=e,navigator.serviceWorker.controller.postMessage({cmd:"setClientHash",res:e})}}]),e}(),s=function(){var e=null;"sessionStorage"in window?sessionStorage.getItem("notifySession")||(sessionStorage.setItem("notifySession",!0),e=new n,e.ready.then(function(t){RG.logger.log(t.msg),e.registerServiceWorker()}).catch(function(e){RG.logger.info(e.msg)})):RG.logger.log("Notify init: не работает sessionStorage")};t.exports={init:s}},{}],130:[function(e,t,i){var n=[],s=function(e){var t=[];return _.each(_.keys(Ractive.components),function(i){$(e).find(i).each(function(e,i){var n=this.tagName.toLowerCase();if(Ractive.components[n]){RG.logger.warn("Parser found "+n+" component");var s=a(i);t.push({tag:n,el:i,data:s})}})}),_.sortBy(t,function(e){return e.data.sort})},a=function(e){var t={};return _.isObject(e)&&e.attributes&&(t=_.object(_.map(Array.prototype.slice.call(e.attributes),function(t){var i=t.value,n=$(e).attr(t.name).toString();try{if(!/^[\[\{].*?[\]\}]/.test(n))throw new Error;i=JSON.parse(n)}catch(e){i=n.match(/'(.+)'$/)?n.replace(/['"]+/g,""):"true"===n||"false"===n?"true"===n:"class"===t.name?n.split(" "):n}return[t.name,i]}))),t.content=$(e).text(),t},r=function(e){return _.where(n,{tag:e})},o=function(e,t){var i=[],s=[];return _.isEmpty(e)||(i=_.where(n,{tag:e}),i.length&&_.each(i,function(i){var n=_.extend({el:i.el,data:i.data},t||{}),a=new Ractive.components[e](n);s.push(a)})),s},l=function(){n=[],n=s("html")};t.exports={init:l,render:o,getAttributes:a,getComponents:r,findComponents:s}},{}],131:[function(e,t,i){var n=e("../../config").paths,s=function(e,t){return Math.floor(Math.random()*(t-e+1))+e},a=null,r=null,o=null,l=function(){var e=n.tmpl.bPartners;RG.config.env||(e="//rg.ru"+e),$.get(e).done(function(e){RG.events.publish("Partners.tmpl.bPartners.loaded",e)}).fail(function(){RG.logger.error("Модуль Partners. Не могу получить шаблон")})},c=function(){var e=s(1,10)+".json";$.ajax({url:"https://front.rg.ru/"+n.partners+e,dataType:"jsonp",jsonp:"callback",jsonpCallback:"callbackPartners"}).done(function(e){RG.events.publish("Partners.data.loaded",e)}).fail(function(){RG.logger.error("Модуль Partners. Не могу получить данные")})},u=function(e){var t=null,i=null,n=$("
"),s=o[e.moduleName];s.posts__length&&(t=$("#ads"+e.placeId),i=e.moduleName+"_"+e.moduleMod+"_"+Math.random().toString(36).substring(7),n.attr({id:i,class:"b-partners__body"}),t.append(n),new Ractive({el:i,template:r,data:function(){return s}}),"smi2"===e.moduleMod&&(window.ttsmi2_data={siteid:37846,count:"site"},$.getScript("//target.smi2.net/client/target.js")))},d=function(e){$.each(e,function(e,t){$.each(t,function(t,i){var n=i.partner,s=null,a=null,r=null;n&&(n=n.split(":"),s=n[0].split("#"),r=n[1],a=s.length<2?s[0]:s[1],f({moduleName:s[0],moduleMod:a,dataURL:r,placeId:e}))})})},f=function(e){u(e)},h=function(e){a=e,l(),RG.events.subscribe("Partners.tmpl.bPartners.loaded",function(e,t){r=t,c()}),RG.events.subscribe("Partners.data.loaded",function(e,t){o=t,d(a)})};t.exports={init:h}},{"../../config":102}],132:[function(e,t,i){var n={set:function(e){var t=_.reduce(e,function(e,t,i){return t&&e.push(i+"="+encodeURIComponent(t)),e},[]).join("&");if(t.length>0&&(t="?"+t),history.pushState){var i=window.location.protocol+"//"+window.location.host+window.location.pathname+t;window.history.pushState({path:i},"",i)}else document.location=t;return t},get:function(e){var t=e||window.location.search||null,i=null;return t&&(i=_.reduce(t.replace("?","").split("&"),function(e,t){return t.length>0&&_.extend(e,_.object([_.map(t.split("="),decodeURIComponent)])),e},{})),i}};t.exports=n},{}],133:[function(e,t,i){var n="ScreenViewer",s={map:{tablet:768,tabletLandscape:990,desktop:1260,desktopFull:1760}},a=null,r=function(){return window.innerWidth||$(window).width()},o=function(){var e=r(),t=s.map,i={type:null,screenWidth:null,infoBefore:null};try{if(!e)throw new Error("Ширина экрана не получена, значение выводится, как: "+e);i.screenWidth=e,e=t.tablet&&e=t.tabletLandscape&&e=t.desktop&&e=t.desktopFull&&(i.type="desktopFull"),i.infoBefore=c()}catch(e){RG.logger.error("Модуль "+n+", функция detectScreenSizeType.\nОшибка: "+e)}return i},l=function(e){var t=o();RG.logger.info(e),a&&a.type===t.type||(t.infoBefore=c(),a=t,RG.events.publish(n+".update",a),RG.logger.trace(a))},c=function(){return a},u=function(){var e={};a=o(),e[n+".ready"]=l,e[n+".check"]=l,e["window.resize"]=l,RG.events.registerList(e)};t.exports={_modulePrefix:n,getScreenInfo:c,init:u}},{}],134:[function(e,t,i){var n=function(){var e=!1;return window.getSelection?e=window.getSelection():document.getSelection?e=document.getSelection():(e=document.selection&&document.selection.createRange(),e=!!e.text&&e.text),e},s=function(e){var t=$(e)[0],i=null;document.selection?(i=document.body.createTextRange(),i.moveToElementText(t),i.select()):window.getSelection&&(i=document.createRange(),i.selectNodeContents(t),window.getSelection().removeAllRanges(),window.getSelection().addRange(i))};t.exports={getSelected:n,selectText:s}},{}],135:[function(e,t,i){var n=e("./config").geolocationPaths,s=function(e){RG.logger.info(e),$.ajax({url:""+n.getRegion,xhrFields:{withCredentials:!0}}).then(function(e){RG.events.publish("geolocation.list",e)})},a=function(e,t){RG.logger.info(e),$.ajax({url:""+n.changeRegion+t.id,xhrFields:{withCredentials:!0}}).then(function(){RG.events.publish("geolocation.region.changed",t)})},r=function(e){RG.logger.info(e),$.ajax({url:""+n.getRegions,xhrFields:{withCredentials:!0}}).then(function(e){RG.events.publish("geolocation.region.update",e)})},o=function(){RG.events.registerList({"geolocation.region.get":s,"geolocation.region.change":a,"geolocation.region.all":r})};t.exports={init:o}},{"./config":141}],136:[function(e,t,i){var n="Place",s={},a=function(e,t){s.placeSrc=t,s.placeFiltered=t},r=function(e){RG.logger.log(e),RG.events.subscribe(n+".places.loaded",a)};t.exports={_modulePrefix:n,init:r}},{}],137:[function(e,t,i){var n=null,s=[],a=null,r=null,o=[],l=function(e){RG.logger.info(e),n=RG.session.getUserRegion(),$(".b-feed__list_reg").hide()},c=function(e){RG.logger.info(e),a=RG.config.paths.tmpl.bFeed,RG.config.env||(a="//rg.ru"+a),$.get(a).then(function(e){r=e,RG.events.publish("regional.news.get")})},u=function(e){if(RG.logger.info(e),n.rgId){var t=RG.config.paths.lastNews;RG.config.env||(t="//rg.ru"+t),$.get(t+"region-"+n.rgId+".json").then(function(e){s=e.result,RG.events.publish("regional.render")})}},d=function(){r?(h(),$(".b-feed__list_reg").each(function(e,t){var i=$(this).attr("data-id");i?o[i].set("items",s):(i=Math.random().toString(36).substring(6),o[i]=new Ractive({el:t,template:"{{#items}}"+r+"{{/items}}",data:function(){return{items:s,dateFormat:RG.datetime.parseVmDate}}}),$(this).attr("data-id",i))})):RG.events.publish("regional.template.get")},f=function(){RG.BlocksShifter.setCallback([{blockId:"rgb_feed_last-news",screenType:"mobile",callback:function(){RG.events.publish("regional.render"),RG.events.publish("scroll.init",$(".b-feed__list_scrolled"))}},{blockId:"rgb_feed_last-news",screenType:"tablet tabletLandscape desktop desktopFull",callback:function(){RG.events.publish("regional.render"),RG.events.publish("scroll.init",$(".b-feed__list_scrolled"))}}]),RG.events.registerList({"regional.run":l,"regional.template.get":c,"regional.news.get":u,"regional.render":d,"geolocation.region.changed":function(e,t){RG.logger.info(e),t&&(n=t,RG.events.publish("regional.news.get"))},"geolocation.list":function(){RG.events.publish("regional.run")}}),RG.events.publish("regional.run")},h=function(){!_.isEmpty(n)&&_.isString(n.rubricPrepositionalName)&&($(".b-feed__name_reg-link, .b-feed__name_com").off("click"),$(".b-feed__name_reg-link").attr("href",n.link).text("в "+n.rubricPrepositionalName).on("click",function(e){$(this).parent().hasClass("is-active")&&(window.location=n.link),$(".b-feed__list_com").hide(),$(".b-feed__list_reg").show(),$(this).parent().addClass("is-active"),$(".b-feed__name_com-link").parent().removeClass("is-active"),e.preventDefault()}),$(".b-feed__name_com-link").on("click",function(e){$(".b-feed__list_com").show(),$(".b-feed__list_reg").hide(),$(".b-feed__name_reg-link").parent().removeClass("is-active"),$(".b-feed__name_com-link").parent().addClass("is-active"),e.preventDefault()}))};t.exports={init:f}},{}],138:[function(e,t,i){var n=e("./config").savedPaths,s=function(e){try{var t=e.responseJSON.error;"ROLE_UNCONFIRMED_USER"===t.user_role?RG.session.authInfoConfirmEmail():RG.logger.error(t)}catch(e){throw new Error(e)}},a=function(e,t){RG.logger.info(e),$.ajax({url:""+n.add+t,xhrFields:{withCredentials:!0}}).then(function(){RG.events.publish("subscribe.saved.added",t)}).fail(s)},r=function(e,t){RG.logger.info(e),$.ajax({url:""+n.remove+t,xhrFields:{withCredentials:!0}}).then(function(){RG.events.publish("subscribe.saved.removed",t)}).fail(s)},o=function(e,t){RG.logger.info(e),$.ajax({url:""+n.toggle+t,xhrFields:{withCredentials:!0}}).then(function(){RG.events.publish("subscribe.saved.toggled",t)})},l=function(){RG.events.registerList({"subscribe.saved.toggle":o,"subscribe.saved.remove":r,"subscribe.saved.add":a})};t.exports={init:l}},{"./config":141}],139:[function(e,t,i){var n=e("./config").sujetsPaths,s=e("./config").commentsPaths,a=e("./config").freshPaths,r=e("./config").docPaths,o=function(e){try{var t=e.responseJSON.error;"ROLE_UNCONFIRMED_USER"===t.user_role?RG.session.authInfoConfirmEmail():RG.logger.error(t)}catch(e){throw new Error(e)}},l=function(e,t){RG.logger.info(e),$.ajax({url:""+n.remove+t,xhrFields:{withCredentials:!0}}).then(function(e){e.id=parseInt(e.id,10),RG.events.publish("subscribe.sujet.removed",e)}).fail(o)},c=function(e,t){RG.logger.info(e),$.ajax({url:""+n.add+t,xhrFields:{withCredentials:!0}}).then(function(e){e.id=parseInt(e.id,10),RG.events.publish("subscribe.sujet.added",e)}).fail(o)},u=function(e,t){RG.logger.info(e),$.ajax({url:""+n.getMaterials+t,xhrFields:{withCredentials:!0}}).then(function(e){RG.events.publish("subscribe.sujet.set",e.items)})},d=function(e,t){RG.logger.info(e),$.ajax({url:""+s.remove+t,xhrFields:{withCredentials:!0}}).then(function(){RG.events.publish("subscribe.comments.removed",t)})},f=function(e,t){RG.logger.info(e),$.ajax({url:""+s.add+t,xhrFields:{withCredentials:!0}}).then(function(){RG.events.publish("subscribe.comments.added",t)})},h=function(e){var t=[],i=+RG.meta.getSujet();RG.logger.info(e),$.ajax({url:""+n.getFollowed,xhrFields:{withCredentials:!0}}).then(function(e){t=e.items,_.findIndex(t,{id:i})!==-1&&RG.events.publish("subscribe.sujet.added",_.findWhere(t,{id:i})),RG.events.publish("subscribe.sujet.list",e)})},m=function(e){RG.logger.info(e),$.ajax({url:""+n.getTopSujets,xhrFields:{withCredentials:!0}}).then(function(e){RG.events.publish("subscribe.sujets.toped",e)})},p=function(e){RG.logger.info(e),$.ajax({url:""+a.add,xhrFields:{withCredentials:!0}}).then(function(e){RG.events.publish("subscribe.fresh.added",e)})},g=function(e){RG.logger.info(e),$.ajax({url:""+a.remove,xhrFields:{withCredentials:!0}}).then(function(e){RG.events.publish("subscribe.fresh.removed",e)})},b=function(e){RG.logger.info(e),RG.session.isAuthorized()&&$.ajax({url:""+a.check,xhrFields:{withCredentials:!0}}).then(function(e){"OK"===e.status?RG.events.publish("subscribe.fresh.added",e):RG.events.publish("subscribe.fresh.removed",e)})},v=function(e){RG.logger.info(e),$.ajax({url:""+r.add,xhrFields:{withCredentials:!0}}).then(function(e){RG.events.publish("subscribe.doc.added",e)})},w=function(e){RG.logger.info(e),$.ajax({url:""+r.remove,xhrFields:{withCredentials:!0}}).then(function(e){RG.events.publish("subscribe.doc.removed",e)})},y=function(e){RG.logger.info(e),RG.session.isAuthorized()&&$.ajax({url:""+r.check,xhrFields:{withCredentials:!0}}).then(function(e){"OK"===e.status?RG.events.publish("subscribe.doc.added",e):(RG.logger.trace(e),RG.events.publish("subscribe.doc.removed",e))})},R=function(){RG.events.registerList({"subscribe.sujet.remove":l,"subscribe.sujet.fetch":h,"subscribe.sujet.add":c,"subscribe.sujet.get":u,"subscribe.sujets.top":m,"subscribe.comments.remove":d,"subscribe.comments.add":f,"subscribe.fresh.add":p,"subscribe.fresh.remove":g,"subscribe.fresh.check":b,"subscribe.doc.add":v,"subscribe.doc.remove":w,"subscribe.doc.check":y})};t.exports={init:R}},{"./config":141}],140:[function(e,t,i){var n=e("./config").viewedPaths,s=function(e){RG.logger.info(e),$.ajax({url:""+n.getViewed,xhrFields:{withCredentials:!0}}).then(function(e){RG.events.publish("viewed.list",e)})},a=function(e){var t=RG.meta.getMaterial();RG.logger.info(e),$.ajax({url:""+n.setViewed+t,xhrFields:{withCredentials:!0}}).then(function(e){e.current_saved&&RG.events.publish("subscribe.saved.added",RG.meta.getMaterial())})},r=function(){RG.events.registerList({"viewed.get":s,"viewed.set":a})};t.exports={init:r}},{"./config":141}],141:[function(e,t,i){var n=RG.config.paths.root,s=n+"subscribe/",a=s+"add/",r=s+"remove/",o=n+"account/",l=n+"geo/",c=s+"check/",u=n+"app/send_error",d={add:a+"sujet/",remove:r+"sujet/",getMaterials:s+"articles/",getFollowed:s+"sujets",getTopSujets:s+"top_sujets"},f={add:a+"comments/",remove:r+"comments/"},h={add:o+"set_favorite/",remove:o+"remove_favorite/",toggle:o+"toggle_read_page/"},m={getViewed:o+"list_viewed",setViewed:o+"set_viewed/"},p={getRegion:""+l,changeRegion:l+"change/",getRegions:l+"regions"},g={add:a+"fresh",remove:r+"fresh",check:c+"fresh"},b={add:a+"doc",remove:r+"doc",check:c+"doc"};t.exports={commentsPaths:f,sujetsPaths:d,savedPaths:h,typo:u,viewedPaths:m,geolocationPaths:p,freshPaths:g,docPaths:b}},{}],142:[function(e,t,i){var n=function(e){var t=null;return _.isEmpty(e)||(t=_.object(_.map(e,function(e,t){var i=e;return _.isString(i)&&(i=i.replace(/\+/g," ")),[t,i]}))),t},s=Cookies,a=function(){return s.enabled},r=function(){return!!s.get("rg_user_hash")},o=function(){var e=Cookies.get("rg_user_region");return e=e?n(JSON.parse(e)||null):{}},l=function(){var e=Cookies.get("rg_geo_data");return e=e?n(JSON.parse(e)||null):{}},c=function(){return s.get("rg_thash")},u=function(e){RG.logger.info(e),a()?c()?(RG.logger.warn("User avaitnig conformation"),RG.events.publish("session.confirm.required")):r()?(RG.logger.warn("User is authorized"),RG.events.publish("session.user.authorized")):(RG.logger.warn("User is NOT authorized"),RG.events.publish("session.user.logedout")):(RG.logger.error("Cookies disabled"),RG.events.publish("session.cookie.disabled"))},d=function(){RG.events.publish("loginInfo",{type:"authInfoConfirmEmail"})},f=function(){var e={},t={};try{e=s.get("rg_user_info"),e&&(t=JSON.parse(e))}catch(e){RG.logger.error(""+e.toString())}return t},h=function(){var e=window.setInterval(function(){r()&&(window.clearInterval(e),RG.events.publish("session.check"))},1e3);RG.events.subscribe("session.check",u)};t.exports={enabled:a,isAuthorized:r,authInfoConfirmEmail:d,confirmData:c,init:h,getUserData:f,getUserRegion:o,getCurrentRegion:l}},{}],143:[function(e,t,i){var n={get:function(e){return Lockr.get(e)},set:function(e,t){return Lockr.set(e,t),Lockr.get(e)},add:function(){return Lockr.sadd(name),Lockr.get(name)},all:function(){return Lockr.getAll()}};t.exports=n},{}],144:[function(e,t,i){!function(n,s){var a;if("object"==typeof i){try{a=e("moment")}catch(e){}t.exports=s(a)}else"function"==typeof define&&define.amd?define(function(e){var t="moment";try{a=e(t)}catch(e){}return s(a)}):n.Pikaday=s(n.moment)}(this,function(e){var t="function"==typeof e,i=!!window.addEventListener,n=window.document,s=window.setTimeout,a=function(e,t,n,s){i?e.addEventListener(t,n,!!s):e.attachEvent("on"+t,n)},r=function(e,t,n,s){i?e.removeEventListener(t,n,!!s):e.detachEvent("on"+t,n)},o=function(e,t,i){var s;n.createEvent?(s=n.createEvent("HTMLEvents"),s.initEvent(t,!0,!1),s=_(s,i),e.dispatchEvent(s)):n.createEventObject&&(s=n.createEventObject(),s=_(s,i),e.fireEvent("on"+t,s))},l=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},c=function(e,t){return(" "+e.className+" ").indexOf(" "+t+" ")!==-1},u=function(e,t){c(e,t)||(e.className=""===e.className?t:e.className+" "+t)},d=function(e,t){e.className=l((" "+e.className+" ").replace(" "+t+" "," "))},f=function(e){return/Array/.test(Object.prototype.toString.call(e))},h=function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())},m=function(e){var t=e.getDay();return 0===t||6===t},p=function(e){return e%4===0&&e%100!==0||e%400===0},g=function(e,t){return[31,p(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},b=function(e){h(e)&&e.setHours(0,0,0,0)},v=function(e,t){return e.getTime()===t.getTime()},_=function e(t,i,n){var s,a;for(s in i)a=void 0!==t[s],a&&"object"==typeof i[s]&&null!==i[s]&&void 0===i[s].nodeName?h(i[s])?n&&(t[s]=new Date(i[s].getTime())):f(i[s])?n&&(t[s]=i[s].slice(0)):t[s]=e({},i[s],n):!n&&a||(t[s]=i[s]);return t},w=function(e){return e.month<0&&(e.year-=Math.ceil(Math.abs(e.month)/12),e.month+=12),e.month>11&&(e.year+=Math.floor(Math.abs(e.month)/12),e.month-=12),e},y={field:null,bound:void 0,position:"bottom left",reposition:!0,format:"YYYY-MM-DD",defaultDate:null,setDefaultDate:!1,firstDay:0,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,onSelect:null,onOpen:null,onClose:null,onDraw:null},R=function(e,t,i){for(t+=e.firstDay;t>=7;)t-=7;return i?e.i18n.weekdaysShort[t]:e.i18n.weekdays[t]; },k=function(e){var t=[],i="false";if(e.isEmpty){if(!e.showDaysInNextAndPreviousMonths)return'';t.push("is-outside-current-month")}return e.isDisabled&&t.push("is-disabled"),e.isToday&&t.push("is-today"),e.isSelected&&(t.push("is-selected"),i="true"),e.isInRange&&t.push("is-inrange"),e.isStartRange&&t.push("is-startrange"),e.isEndRange&&t.push("is-endrange"),'"},x=function(e,t,i){var n=new Date(i,0,1),s=Math.ceil(((new Date(i,t,e)-n)/864e5+n.getDay()+1)/7);return''+s+""},G=function(e,t){return""+(t?e.reverse():e).join("")+""},S=function(e){return""+e.join("")+""},D=function(e){var t,i=[];for(e.showWeekNumber&&i.push(""),t=0;t<7;t++)i.push(''+R(e,t,!0)+"");return""+(e.isRTL?i.reverse():i).join("")+""},C=function(e,t,i,n,s,a){var r,o,l,c,u,d=e._o,h=i===d.minYear,m=i===d.maxYear,p='
',g=!0,b=!0;for(l=[],r=0;r<12;r++)l.push('");for(c='
'+d.i18n.months[n]+'
",f(d.yearRange)?(r=d.yearRange[0],o=d.yearRange[1]+1):(r=i-d.yearRange,o=1+i+d.yearRange),l=[];r=d.minYear&&l.push('");return u='
'+i+d.yearSuffix+'
",p+=d.showMonthAfterYear?u+c:c+u,h&&(0===n||d.minMonth>=n)&&(g=!1),m&&(11===n||d.maxMonth<=n)&&(b=!1),0===t&&(p+='"),t===e._o.numberOfMonths-1&&(p+='"),p+="
"},M=function(e,t,i){return''+D(e)+S(t)+"
"},j=function(r){var o=this,l=o.config(r);o._onMouseDown=function(e){if(o._v){e=e||window.event;var t=e.target||e.srcElement;if(t)if(c(t,"is-disabled")||(!c(t,"pika-button")||c(t,"is-empty")||c(t.parentNode,"is-disabled")?c(t,"pika-prev")?o.prevMonth():c(t,"pika-next")&&o.nextMonth():(o.setDate(new Date(t.getAttribute("data-pika-year"),t.getAttribute("data-pika-month"),t.getAttribute("data-pika-day"))),l.bound&&s(function(){o.hide(),l.field&&l.field.blur()},100))),c(t,"pika-select"))o._c=!0;else{if(!e.preventDefault)return e.returnValue=!1,!1;e.preventDefault()}}},o._onChange=function(e){e=e||window.event;var t=e.target||e.srcElement;t&&(c(t,"pika-select-month")?o.gotoMonth(t.value):c(t,"pika-select-year")&&o.gotoYear(t.value))},o._onKeyChange=function(e){if(e=e||window.event,o.isVisible())switch(e.keyCode){case 13:case 27:l.field.blur();break;case 37:e.preventDefault(),o.adjustDate("subtract",1);break;case 38:o.adjustDate("subtract",7);break;case 39:o.adjustDate("add",1);break;case 40:o.adjustDate("add",7)}},o._onInputChange=function(i){var n;i.firedBy!==o&&(t?(n=e(l.field.value,l.format,l.formatStrict),n=n&&n.isValid()?n.toDate():null):n=new Date(Date.parse(l.field.value)),h(n)&&o.setDate(n),o._v||o.show())},o._onInputFocus=function(){o.show()},o._onInputClick=function(){o.show()},o._onInputBlur=function(){var e=n.activeElement;do if(c(e,"pika-single"))return;while(e=e.parentNode);o._c||(o._b=s(function(){o.hide()},50)),o._c=!1},o._onClick=function(e){e=e||window.event;var t=e.target||e.srcElement,n=t;if(t){!i&&c(t,"pika-select")&&(t.onchange||(t.setAttribute("onchange","return;"),a(t,"change",o._onChange)));do if(c(n,"pika-single")||n===l.trigger)return;while(n=n.parentNode);o._v&&t!==l.trigger&&n!==l.trigger&&o.hide()}},o.el=n.createElement("div"),o.el.className="pika-single"+(l.isRTL?" is-rtl":"")+(l.theme?" "+l.theme:""),a(o.el,"mousedown",o._onMouseDown,!0),a(o.el,"touchend",o._onMouseDown,!0),a(o.el,"change",o._onChange),a(n,"keydown",o._onKeyChange),l.field&&(l.container?l.container.appendChild(o.el):l.bound?n.body.appendChild(o.el):l.field.parentNode.insertBefore(o.el,l.field.nextSibling),a(l.field,"change",o._onInputChange),l.defaultDate||(t&&l.field.value?l.defaultDate=e(l.field.value,l.format).toDate():l.defaultDate=new Date(Date.parse(l.field.value)),l.setDefaultDate=!0));var u=l.defaultDate;h(u)?l.setDefaultDate?o.setDate(u,!0):o.gotoDate(u):o.gotoDate(new Date),l.bound?(this.hide(),o.el.className+=" is-bound",a(l.trigger,"click",o._onInputClick),a(l.trigger,"focus",o._onInputFocus),a(l.trigger,"blur",o._onInputBlur)):this.show()};return j.prototype={config:function(e){this._o||(this._o=_({},y,!0));var t=_(this._o,e,!0);t.isRTL=!!t.isRTL,t.field=t.field&&t.field.nodeName?t.field:null,t.theme="string"==typeof t.theme&&t.theme?t.theme:null,t.bound=!!(void 0!==t.bound?t.field&&t.bound:t.field),t.trigger=t.trigger&&t.trigger.nodeName?t.trigger:t.field,t.disableWeekends=!!t.disableWeekends,t.disableDayFn="function"==typeof t.disableDayFn?t.disableDayFn:null;var i=parseInt(t.numberOfMonths,10)||1;if(t.numberOfMonths=i>4?4:i,h(t.minDate)||(t.minDate=!1),h(t.maxDate)||(t.maxDate=!1),t.minDate&&t.maxDate&&t.maxDate100&&(t.yearRange=100);return t},toString:function(i){return h(this._d)?t?e(this._d).format(i||this._o.format):this._d.toDateString():""},getMoment:function(){return t?e(this._d):null},setMoment:function(i,n){t&&e.isMoment(i)&&this.setDate(i.toDate(),n)},getDate:function(){return h(this._d)?new Date(this._d.getTime()):new Date},setDate:function(e,t){if(!e)return this._d=null,this._o.field&&(this._o.field.value="",o(this._o.field,"change",{firedBy:this})),this.draw();if("string"==typeof e&&(e=new Date(Date.parse(e))),h(e)){var i=this._o.minDate,n=this._o.maxDate;h(i)&&en&&(e=n),this._d=new Date(e.getTime()),b(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),o(this._o.field,"change",{firedBy:this})),t||"function"!=typeof this._o.onSelect||this._o.onSelect.call(this,this.getDate())}},gotoDate:function(e){var t=!0;if(h(e)){if(this.calendars){var i=new Date(this.calendars[0].year,this.calendars[0].month,1),n=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),s=e.getTime();n.setMonth(n.getMonth()+1),n.setDate(n.getDate()-1),t=s=a&&(this._y=a,!isNaN(o)&&this._m>o&&(this._m=o)),t="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2);for(var c=0;c'+C(this,c,this.calendars[c].year,this.calendars[c].month,this.calendars[0].year,t)+this.render(this.calendars[c].year,this.calendars[c].month,t)+"
";this.el.innerHTML=l,i.bound&&"hidden"!==i.field.type&&s(function(){i.trigger.focus()},1),"function"==typeof this._o.onDraw&&this._o.onDraw(this),i.bound&&i.field.setAttribute("aria-label","Use the arrow keys to pick a date")}},adjustPosition:function(){var e,t,i,s,a,r,o,l,c,u;if(!this._o.container){if(this.el.style.position="absolute",e=this._o.trigger,t=e,i=this.el.offsetWidth,s=this.el.offsetHeight,a=window.innerWidth||n.documentElement.clientWidth,r=window.innerHeight||n.documentElement.clientHeight,o=window.pageYOffset||n.body.scrollTop||n.documentElement.scrollTop,"function"==typeof e.getBoundingClientRect)u=e.getBoundingClientRect(),l=u.left+window.pageXOffset,c=u.bottom+window.pageYOffset;else for(l=t.offsetLeft,c=t.offsetTop+t.offsetHeight;t=t.offsetParent;)l+=t.offsetLeft,c+=t.offsetTop;(this._o.reposition&&l+i>a||this._o.position.indexOf("right")>-1&&l-i+e.offsetWidth>0)&&(l=l-i+e.offsetWidth),(this._o.reposition&&c+s>r+o||this._o.position.indexOf("top")>-1&&c-s-e.offsetHeight>0)&&(c=c-s-e.offsetHeight),this.el.style.left=l+"px",this.el.style.top=c+"px"}},render:function(e,t,i){var n=this._o,s=new Date,a=g(e,t),r=new Date(e,t,1).getDay(),o=[],l=[];b(s),n.firstDay>0&&(r-=n.firstDay,r<0&&(r+=7));for(var c=0===t?11:t-1,u=11===t?0:t+1,d=0===t?e-1:e,f=11===t?e+1:e,p=g(d,c),_=a+r,w=_;w>7;)w-=7;_+=7-w;for(var y=0,R=0;y<_;y++){var S=new Date(e,t,1+(y-r)),D=!!h(this._d)&&v(S,this._d),C=v(S,s),j=y=a+r,$=1+(y-r),Y=t,P=e,T=n.startRange&&v(n.startRange,S),O=n.endRange&&v(n.endRange,S),F=n.startRange&&n.endRange&&n.startRangen.maxDate||n.disableWeekends&&m(S)||n.disableDayFn&&n.disableDayFn(S);j&&(y