PageSourceSearch

https://iot.ru/bitrix/cache/js/s1/m2m/kernel_main/kernel_main_v1.js?1763886428176207

js iot.ru collected 2026-10-02 07:10:26 UTC 176,207 bytes, 2,323 lines download raw bytes

1; /* /bitrix/js/main/pageobject/dist/pageobject.bundle.min.js?1758970030531*/
2; /* /bitrix/js/main/core/core_window.min.js?175896963976324*/
3; /* /bitrix/js/main/date/main.date.min.js?175896992521981*/
4; /* /bitrix/js/main/core/core_date.js?169224745236080*/
5; /* /bitrix/js/main/utils.min.js?169224746018721*/
6; /* /bitrix/js/main/session.js?16922474563701*/
7; /* /bitrix/js/main/core/core_fx.js?169224745116888*/
8
9; /* Start:"a:4:{s:4:"full";s:47:"/bitrix/js/main/core/core_fx.js?169224745116888";s:6:"source";s:31:"/bitrix/js/main/core/core_fx.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
10;(function(window){
11
12var defaultOptions = {
13	time: 1.0,
14	step: 0.05,
15	type: 'linear',
16
17	allowFloat: false
18}
19
20/*
21options: {
22	start: start value or {param: value, param: value}
23	finish: finish value or {param: value, param: value}
24	time: time to transform in seconds
25	type: linear|accelerated|decelerated|custom func name
26	callback,
27	callback_start,
28	callback_complete,
29
30	step: time between steps in seconds
31	allowFloat: false|true
32}
33*/
34BX.fx = function(options)
35{
36	this.options = options;
37
38	if (null != this.options.time)
39		this.options.originalTime = this.options.time;
40	if (null != this.options.step)
41		this.options.originalStep = this.options.step;
42
43	if (!this.__checkOptions())
44		return false;
45
46	this.__go = BX.delegate(this.go, this);
47
48	this.PARAMS = {};
49}
50
51BX.fx.prototype.__checkOptions = function()
52{
53	if (typeof this.options.start != typeof this.options.finish)
54		return false;
55
56	if (null == this.options.time) this.options.time = defaultOptions.time;
57	if (null == this.options.step) this.options.step = defaultOptions.step;
58	if (null == this.options.type) this.options.type = defaultOptions.type;
59	if (null == this.options.allowFloat) this.options.allowFloat = defaultOptions.allowFloat;
60
61	this.options.time *= 1000;
62	this.options.step *= 1000;
63
64	if (typeof this.options.start != 'object')
65	{
66		this.options.start = {_param: this.options.start};
67		this.options.finish = {_param: this.options.finish};
68	}
69
70	var i;
71	for (i in this.options.start)
72	{
73		if (null == this.options.finish[i])
74		{
75			this.options.start[i] = null;
76			delete this.options.start[i];
77		}
78	}
79
80	if (!BX.type.isFunction(this.options.type))
81	{
82		if (BX.type.isFunction(window[this.options.type]))
83			this.options.type = window[this.options.type];
84		else if (BX.type.isFunction(BX.fx.RULES[this.options.type]))
85			this.options.type = BX.fx.RULES[this.options.type];
86		else
87			this.options.type = BX.fx.RULES[defaultOptions.type];
88	}
89
90	return true;
91}
92
93BX.fx.prototype.go = function()
94{
95	var timeCurrent = new Date().valueOf();
96	if (timeCurrent < this.PARAMS.timeFinish)
97	{
98		for (var i in this.PARAMS.current)
99		{
100			this.PARAMS.current[i][0] = this.options.type.apply(this, [{
101				start_value: this.PARAMS.start[i][0],
102				finish_value: this.PARAMS.finish[i][0],
103				current_value: this.PARAMS.current[i][0],
104				current_time: timeCurrent - this.PARAMS.timeStart,
105				total_time: this.options.time
106			}]);
107		}
108
109		this._callback(this.options.callback);
110
111		if (!this.paused)
112			this.PARAMS.timer = setTimeout(this.__go, this.options.step);
113	}
114	else
115	{
116		this.stop();
117	}
118}
119
120BX.fx.prototype._callback = function(cb)
121{
122	var tmp = {};
123
124	cb = cb || this.options.callback;
125
126	for (var i in this.PARAMS.current)
127	{
128		tmp[i] = (this.options.allowFloat ? this.PARAMS.current[i][0] : Math.round(this.PARAMS.current[i][0])) + this.PARAMS.current[i][1];
129	}
130
131	return cb.apply(this, [null != tmp['_param'] ? tmp._param : tmp]);
132}
133
134BX.fx.prototype.start = function()
135{
136	var i,value, unit;
137
138	this.PARAMS.start = {};
139	this.PARAMS.current = {};
140	this.PARAMS.finish = {};
141
142	for (i in this.options.start)
143	{
144		value = +this.options.start[i];
145		unit = (this.options.start[i]+'').substring((value+'').length);
146		this.PARAMS.start[i] = [value, unit];
147		this.PARAMS.current[i] = [value, unit];
148		this.PARAMS.finish[i] = [+this.options.finish[i], unit];
149	}
150
151	this._callback(this.options.callback_start);
152	this._callback(this.options.callback);
153
154	this.PARAMS.timeStart = new Date().valueOf();
155	this.PARAMS.timeFinish = this.PARAMS.timeStart + this.options.time;
156	this.PARAMS.timer = setTimeout(BX.delegate(this.go, this), this.options.step);
157
158	return this;
159}
160
161BX.fx.prototype.pause = function()
162{
163	if (this.paused)
164	{
165		this.PARAMS.timer = setTimeout(this.__go, this.options.step);
166		this.paused = false;
167	}
168	else
169	{
170		clearTimeout(this.PARAMS.timer);
171		this.paused = true;
172	}
173}
174
175BX.fx.prototype.stop = function(silent)
176{
177	silent = !!silent;
178	if (this.PARAMS.timer)
179		clearTimeout(this.PARAMS.timer);
180
181	if (null != this.options.originalTime)
182		this.options.time = this.options.originalTime;
183	if (null != this.options.originalStep)
184		this.options.step = this.options.originalStep;
185
186	this.PARAMS.current = this.PARAMS.finish;
187	if (!silent) {
188		this._callback(this.options.callback);
189		this._callback(this.options.callback_complete);
190	}
191}
192
193/*
194type rules of animation
195 - linear - simple linear animation
196 - accelerated
197 - decelerated
198*/
199
200/*
201	params: {
202		start_value, finish_value, current_time, total_time
203	}
204*/
205BX.fx.RULES =
206{
207	linear: function(params)
208	{
209		return params.start_value + (params.current_time/params.total_time) * (params.finish_value - params.start_value);
210	},
211
212	decelerated: function(params)
213	{
214		return params.start_value + Math.sqrt(params.current_time/params.total_time) * (params.finish_value - params.start_value);
215	},
216
217	accelerated: function(params)
218	{
219		var q = params.current_time/params.total_time;
220		return params.start_value + q * q * (params.finish_value - params.start_value);
221	}
222}
223
224/****************** effects realizaion ************************/
225
226/*
227	type = 'fade' || 'scroll' || 'scale' || 'fold'
228*/
229
230BX.fx.hide = function(el, type, opts)
231{
232	el = BX(el);
233
234	if (typeof type == 'object' && null == opts)
235	{
236		opts = type;
237		type = opts.type
238	}
239
240	if (!opts) opts = {};
241
242	if (!BX.type.isNotEmptyString(type))
243	{
244		el.style.display = 'none';
245		return;
246	}
247
248	var fxOptions = BX.fx.EFFECTS[type](el, opts, 0);
249	fxOptions.callback_complete = function () {
250		if (opts.hide !== false)
251			el.style.display = 'none';
252
253		if (opts.callback_complete)
254			opts.callback_complete.apply(this, arguments);
255	}
256
257	return (new BX.fx(fxOptions)).start();
258}
259
260BX.fx.show = function(el, type, opts)
261{
262	el = BX(el);
263
264	if (typeof type == 'object' && null == opts)
265	{
266		opts = type;
267		type = opts.type
268	}
269
270	if (!opts) opts = {};
271
272	if (!BX.type.isNotEmptyString(type))
273	{
274		el.style.display = 'block';
275		return;
276	}
277
278	var fxOptions = BX.fx.EFFECTS[type](el, opts, 1);
279
280	fxOptions.callback_complete = function () {
281		if (opts.show !== false)
282			el.style.display = 'block';
283
284		if (opts.callback_complete)
285			opts.callback_complete.apply(this, arguments);
286	}
287
288	return (new BX.fx(fxOptions)).start();
289}
290
291BX.fx.EFFECTS = {
292	scroll: function(el, opts, action)
293	{
294		if (!opts.direction) opts.direction = 'vertical';
295
296		var param = opts.direction == 'horizontal' ? 'width' : 'height';
297
298		var val = parseInt(BX.style(el, param));
299		if (isNaN(val))
300		{
301			val = BX.pos(el)[param];
302		}
303
304		if (action == 0)
305			var start = val, finish = opts.min_height ? parseInt(opts.min_height) : 0;
306		else
307			var finish = val, start = opts.min_height ? parseInt(opts.min_height) : 0;
308
309		return {
310			'start': start,
311			'finish': finish,
312			'time': opts.time || defaultOptions.time,
313			'type': 'linear',
314			callback_start: function () {
315				if (BX.style(el, 'position') == 'static')
316					el.style.position = 'relative';
317
318				el.style.overflow = 'hidden';
319				el.style[param] = start + 'px';
320				el.style.display = 'block';
321			},
322			callback: function (val) {el.style[param] = val + 'px';}
323		}
324	},
325
326	fade: function(el, opts, action)
327	{
328		var fadeOpts = {
329			'time': opts.time || defaultOptions.time,
330			'type': action == 0 ? 'decelerated' : 'linear',
331			'start': action == 0 ? 1 : 0,
332			'finish': action == 0 ? 0 : 1,
333			'allowFloat': true
334		};
335
336		if (BX.browser.IsIE() && !BX.browser.IsIE9())
337		{
338			fadeOpts.start *= 100; fadeOpts.finish *= 100; fadeOpts.allowFloat = false;
339
340			fadeOpts.callback_start = function() {
341				el.style.display = 'block';
342				el.style.filter += "progid:DXImageTransform.Microsoft.Alpha(opacity=" + fadeOpts.start + ")";
343			};
344
345			fadeOpts.callback = function (val) {
346				(el.filters['DXImageTransform.Microsoft.alpha']||el.filters.alpha).opacity = val;
347			}
348		}
349		else
350		{
351			fadeOpts.callback_start = function () {
352				el.style.display = 'block';
353			}
354
355			fadeOpts.callback = function (val) {
356				el.style.opacity = el.style.KhtmlOpacity = el.style.MozOpacity = val;
357			};
358		}
359
360		return fadeOpts;
361	},
362
363	fold: function (el, opts, action) // 'fold' is a combination of two consequential 'scroll' hidings.
364	{
365		if (action != 0) return;
366
367		var pos = BX.pos(el);
368		var coef = pos.height / (pos.width + pos.height);
369		var old_opts = {time: opts.time || defaultOptions.time, callback_complete: opts.callback_complete, hide: opts.hide};
370
371		opts.type = 'scroll';
372		opts.direction = 'vertical';
373		opts.min_height = opts.min_height || 10;
374		opts.hide = false;
375		opts.time = coef * old_opts.time;
376		opts.callback_complete = function()
377		{
378			el.style.whiteSpace = 'nowrap';
379
380			opts.direction = 'horizontal';
381			opts.min_height = null;
382
383			opts.time = old_opts.time - opts.time;
384			opts.hide = old_opts.hide;
385			opts.callback_complete = old_opts.callback_complete;
386
387			BX.fx.hide(el, opts);
388		}
389
390		return BX.fx.EFFECTS.scroll(el, opts, action);
391	},
392
393	scale: function (el, opts, action)
394	{
395		var val = {width: parseInt(BX.style(el, 'width')), height: parseInt(BX.style(el, 'height'))};
396		if (isNaN(val.width) || isNaN(val.height))
397		{
398			var pos = BX.pos(el)
399			val = {width: pos.width, height: pos.height};
400		}
401
402		if (action == 0)
403			var start = val, finish = {width: 0, height: 0};
404		else
405			var finish = val, start = {width: 0, height: 0};
406
407		return {
408			'start': start,
409			'finish': finish,
410			'time': opts.time || defaultOptions.time,
411			'type': 'linear',
412			callback_start: function () {
413				el.style.position = 'relative';
414				el.style.overflow = 'hidden';
415				el.style.display = 'block';
416				el.style.height = start.height + 'px';
417				el.style.width = start.width + 'px';
418			},
419			callback: function (val) {
420				el.style.height = val.height + 'px';
421				el.style.width = val.width + 'px';
422			}
423		}
424	}
425}
426
427// Color animation
428//
429// Set animation rule
430// BX.fx.colorAnimate.addRule('animationRule1',"#FFF","#faeeb4", "background-color", 100, 1, true);
431// BX.fx.colorAnimate.addRule('animationRule2',"#fc8282","#ff0000", "color", 100, 1, true);
432// Params: 1 - animation name, 2 - start color, 3 - end color, 4 - count step, 5 - delay each step, 6 - return color on end animation
433//
434// Animate color for element
435// BX.fx.colorAnimate(BX('element'), 'animationRule1,animationRule2');
436
437var defaultOptionsColorAnimation = {
438	arStack: {},
439	arRules: {},
440	globalAnimationId: 0
441}
442
443BX.fx.colorAnimate = function(element, rule, back)
444{
445	if (element == null)
446		return;
447
448	animationId = element.getAttribute('data-animation-id');
449	if (animationId == null)
450	{
451		animationId = defaultOptionsColorAnimation.globalAnimationId;
452		element.setAttribute('data-animation-id', defaultOptionsColorAnimation.globalAnimationId++);
453	}
454	var aRuleList = rule.split(/\s*,\s*/);
455
456	for (var j	= 0; j < aRuleList.length; j++)
457	{
458		rule = aRuleList[j];
459
460		if (!defaultOptionsColorAnimation.arRules[rule]) continue;
461
462		var i=0;
463
464		if (!defaultOptionsColorAnimation.arStack[animationId])
465		{
466			defaultOptionsColorAnimation.arStack[animationId] = {};
467		}
468		else if (defaultOptionsColorAnimation.arStack[animationId][rule])
469		{
470			i = defaultOptionsColorAnimation.arStack[animationId][rule].i;
471			clearInterval(defaultOptionsColorAnimation.arStack[animationId][rule].tId);
472		}
473
474		if ((i==0 && back) || (i==defaultOptionsColorAnimation.arRules[rule][3] && !back)) continue;
475
476		defaultOptionsColorAnimation.arStack[animationId][rule] = {'i':i, 'element': element, 'tId':setInterval('BX.fx.colorAnimate.run("'+animationId+'","'+rule+'")', defaultOptionsColorAnimation.arRules[rule][4]),'back':Boolean(back)};
477	}
478}
479
480BX.fx.colorAnimate.addRule = function (rule, startColor, finishColor, cssProp, step, delay, back)
481{
482	defaultOptionsColorAnimation.arRules[rule] = [
483		BX.util.hex2rgb(startColor),
484		BX.util.hex2rgb(finishColor),
485		cssProp.replace(/\-(.)/g,function(){return arguments[1].toUpperCase();}),
486		step,
487		delay || 1,
488		back || false
489	];
490};
491
492BX.fx.colorAnimate.run = function(animationId, rule)
493{
494	element = defaultOptionsColorAnimation.arStack[animationId][rule].element;
495
496    defaultOptionsColorAnimation.arStack[animationId][rule].i += defaultOptionsColorAnimation.arStack[animationId][rule].back?-1:1;
497 	var finishPercent = defaultOptionsColorAnimation.arStack[animationId][rule].i/defaultOptionsColorAnimation.arRules[rule][3];
498	var startPercent = 1 - finishPercent;
499
500	var aRGBStart = defaultOptionsColorAnimation.arRules[rule][0];
501	var aRGBFinish = defaultOptionsColorAnimation.arRules[rule][1];
502
503	element.style[defaultOptionsColorAnimation.arRules[rule][2]] = 'rgb('+
504	Math.floor( aRGBStart['r'] * startPercent + aRGBFinish['r'] * finishPercent ) + ','+
505	Math.floor( aRGBStart['g'] * startPercent + aRGBFinish['g'] * finishPercent ) + ','+
506	Math.floor( aRGBStart['b'] * startPercent + aRGBFinish['b'] * finishPercent ) +')';
507
508	if ( defaultOptionsColorAnimation.arStack[animationId][rule].i == defaultOptionsColorAnimation.arRules[rule][3] || defaultOptionsColorAnimation.arStack[animationId][rule].i ==0)
509	{
510		clearInterval(defaultOptionsColorAnimation.arStack[animationId][rule].tId);
511		if (defaultOptionsColorAnimation.arRules[rule][5])
512			BX.fx.colorAnimate(defaultOptionsColorAnimation.arStack[animationId][rule].element, rule, true);
513	}
514}
515
516
517/*
518options = {
519	delay: 100,
520	duration : 3000,
521	start : { scroll : document.body.scrollTop, left : 0, opacity :  100 },
522	finish : { scroll : document.body.scrollHeight, left : 500, opacity : 10 },
523	transition : BitrixAnimation.makeEaseOut(BitrixAnimation.transitions.quart),
524
525	step : function(state)
526	{
527		document.body.scrollTop = state.scroll;
528		button.style.left =  state.left + "px";
529		button.style.opacity =  state.opacity / 100;
530	},
531	complete : function()
532	{
533		button.style.background = "green";
534	}
535}
536
537options =
538{
539	delay : 20,
540	duration : 4000,
541	transition : BXAnimation.makeEaseOut(BXAnimation.transitions.quart),
542	progress : function(progress)
543	{
544		document.body.scrollTop = Math.round(topMax * progress);
545		button.style.left =  Math.round(leftMax * progress) + "px";
546		button.style.opacity =  (100 + Math.round((opacityMin - 100) * progress)) / 100;
547
548	},
549	complete : function()
550	{
551		button.style.background = "green";
552	}
553}
554*/
555
556BX.easing = function(options)
557{
558	this.options = options;
559	this.timer = null;
560};
561
562BX.easing.prototype.animate = function()
563{
564	if (!this.options || !this.options.start || !this.options.finish ||
565		typeof(this.options.start) != "object" || typeof(this.options.finish) != "object"
566		)
567		return null;
568
569	for (var propName in this.options.start)
570	{
571		if (typeof(this.options.finish[propName]) == "undefined")
572		{
573			delete this.options.start[propName];
574		}
575	}
576
577	this.options.progress = function(progress) {
578		var state = {};
579		for (var propName in this.start)
580			state[propName] = Math.round(this.start[propName] + (this.finish[propName] - this.start[propName]) * progress);
581
582		if (this.step)
583		{
584			this.step(state);
585		}
586	};
587
588	this.animateProgress();
589};
590
591BX.easing.prototype.stop = function(completed)
592{
593	if (this.timer)
594	{
595		cancelAnimationFrame(this.timer);
596		this.timer = null;
597		if (completed)
598		{
599			this.options.complete && this.options.complete();
600		}
601	}
602};
603
604BX.easing.prototype.animateProgress = function()
605{
606	if (!window.requestAnimationFrame)
607	{
608		//For old browsers we skip animation
609		this.options.progress(1);
610		this.options.complete && this.options.complete();
611		return;
612	}
613
614	var start = null;
615	var delta = this.options.transition || BX.easing.transitions.linear;
616	var duration = this.options.duration || 1000;
617	var animation = BX.proxy(function(time) {
618
619		if (start === null)
620		{
621			start = time;
622		}
623
624		var progress = (time - start) / duration;
625		if (progress > 1)
626		{
627			progress = 1;
628		}
629
630		this.options.progress(delta(progress));
631
632		if (progress == 1)
633		{
634			this.stop(true);
635		}
636		else
637		{
638			this.timer = requestAnimationFrame(animation);
639		}
640
641	}, this);
642
643	this.timer = requestAnimationFrame(animation);
644};
645
646BX.easing.makeEaseInOut = function(delta)
647{
648	return function(progress) {
649		if (progress < 0.5)
650			return delta( 2 * progress ) / 2;
651		else
652			return (2 - delta( 2 * (1-progress) ) ) / 2;
653	}
654};
655
656BX.easing.makeEaseOut = function(delta)
657{
658	return function(progress) {
659		return 1 - delta(1 - progress);
660	};
661};
662
663BX.easing.transitions = {
664
665	linear : function(progress)
666	{
667		return progress;
668	},
669
670	quad : function(progress)
671	{
672		return Math.pow(progress, 2);
673	},
674
675	cubic : function(progress) {
676		return Math.pow(progress, 3);
677	},
678
679	quart : function(progress)
680	{
681		return Math.pow(progress, 4);
682	},
683
684	quint : function(progress)
685	{
686		return Math.pow(progress, 5);
687	},
688
689	circ : function(progress)
690	{
691		return 1 - Math.sin(Math.acos(progress));
692	},
693
694	back : function(progress)
695	{
696		return Math.pow(progress, 2) * ((1.5 + 1) * progress - 1.5);
697	},
698
699	elastic: function(progress)
700	{
701		return Math.pow(2, 10 * (progress-1)) * Math.cos(20 * Math.PI * 1.5/3 * progress);
702	},
703
704	bounce : function(progress)
705	{
706		for(var a = 0, b = 1; 1; a += b, b /= 2) {
707			if (progress >= (7 - 4 * a) / 11) {
708				return -Math.pow((11 - 6 * a - 11 * progress) / 4, 2) + Math.pow(b, 2);
709			}
710		}
711	}};
712
713
714})(window);
715
716
717/* End */
718;
719; /* Start:"a:4:{s:4:"full";s:41:"/bitrix/js/main/session.js?16922474563701";s:6:"source";s:26:"/bitrix/js/main/session.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
720function CBXSession()
721{
722	var _this = this;
723	this.dateInput = new Date();
724	this.dateCheck = new Date();
725	this.dateHit = new Date();
726	this.notifier = null;
727	this.checkInterval = 60;
728	this.checkImmediately = false;
729
730	this.Expand = function(key)
731	{
732		this.key = key;
733
734		BX.ready(function(){
735			BX.bind(document, "keypress", _this.OnUserInput);
736			BX.bind(document.body, "mousemove", _this.OnUserInput);
737			BX.bind(document.body, "click", _this.OnUserInput);
738
739			//check the state once in a minute
740			setInterval(_this.CheckSession, _this.checkInterval*1000);
741		})
742	};
743
744	this.OnUserInput = function()
745	{
746		var currentDate = new Date();
747		_this.dateInput.setTime(currentDate.valueOf());
748
749		if ((currentDate - _this.dateHit)/1000 > (_this.checkInterval + 5) && _this.checkImmediately === false)
750		{
751			// last hit was long time ago, need to recheck immediately
752			_this.checkImmediately = true;
753			_this.CheckSession();
754		}
755	};
756
757	this.CheckSession = function()
758	{
759		var currentDate = new Date();
760
761		if((currentDate - _this.dateCheck)/1000 < (_this.checkInterval - 1) && _this.checkImmediately === false)
762		{
763			//storm protection, e.g. after PC wake-up
764			return;
765		}
766
767		_this.dateCheck.setTime(currentDate.valueOf());
768
769		if(_this.dateInput > _this.dateHit)
770		{
771			//there was input after the last hit, expand/check the session
772			var config = {
773				'method': 'GET',
774				'headers': [
775					{'name': 'X-Bitrix-Csrf-Token', 'value': BX.bitrix_sessid()}
776				],
777				'dataType': 'html',
778				'url': '/bitrix/tools/public_session.php?k='+_this.key,
779				'data':  '',
780				'onsuccess': function(data){_this.CheckResult(data)},
781				'lsId': 'sess_expand', //caching the result in the local storage for multiple tabs
782				'lsTimeout': _this.checkInterval - 5 //some delta for response time
783			};
784			BX.ajax(config);
785		}
786	};
787
788	this.CheckResult = function(data)
789	{
790		var currentDate = new Date();
791		_this.dateHit.setTime(currentDate.valueOf());
792		_this.checkImmediately = false;
793
794		if(data == 'SESSION_EXPIRED')
795		{
796			if(BX.message("SessExpired"))
797			{
798				if(!_this.notifier)
799				{
800					_this.notifier = document.body.appendChild(BX.create('DIV', {
801						props: {className: 'bx-session-message'},
802						style: {
803							top: '0',
804							backgroundColor: '#FFEB41',
805							border: '1px solid #EDDA3C',
806							width: '630px',
807							fontFamily: 'Arial,Helvetica,sans-serif',
808							fontSize: '13px',
809							fontWeight: 'bold',
810							textAlign: 'center',
811							color: 'black',
812							position: 'absolute',
813							zIndex: '10000',
814							padding: '10px'
815						},
816						html: '<a class="bx-session-message-close" ' +
817							'style="display:block; width:12px; height:12px; background:url(/bitrix/js/main/core/images/close.gif) center no-repeat; float:right;" ' +
818							'href="javascript:bxSession.Close()"></a>' +
819							BX.message("SessExpired")
820					}));
821
822					BX.ZIndexManager.register(_this.notifier);
823					BX.ZIndexManager.bringToFront(_this.notifier);
824
825					var windowScroll = BX.GetWindowScrollPos();
826					var windowSize = BX.GetWindowInnerSize();
827
828					_this.notifier.style.left = parseInt(windowScroll.scrollLeft + (windowSize.innerWidth / 2) - (parseInt(_this.notifier.clientWidth) / 2)) + 'px';
829
830					if(BX.browser.IsIE())
831					{
832						_this.notifier.style.top = windowScroll.scrollTop + 'px';
833
834						BX.bind(window, 'scroll', function()
835						{
836							var windowScroll = BX.GetWindowScrollPos();
837							_this.notifier.style.top = windowScroll.scrollTop + 'px';
838						});
839					}
840					else
841					{
842						_this.notifier.style.position='fixed';
843					}
844				}
845
846				_this.notifier.style.display = '';
847			}
848		}
849	};
850
851	this.Close = function()
852	{
853		this.notifier.style.display = 'none';
854	}
855}
856
857var bxSession = new CBXSession();
858
859/* End */
860;
861; /* Start:"a:4:{s:4:"full";s:70:"/bitrix/js/main/pageobject/dist/pageobject.bundle.min.js?1758970030531";s:6:"source";s:52:"/bitrix/js/main/pageobject/dist/pageobject.bundle.js";s:3:"min";s:56:"/bitrix/js/main/pageobject/dist/pageobject.bundle.min.js";s:3:"map";s:56:"/bitrix/js/main/pageobject/dist/pageobject.bundle.map.js";}"*/
862(function(t){"use strict";const r={getRootWindow(){return r.getTopWindowOfCurrentHost(window)},isCrossOriginObject(t){try{void t.location.host}catch{return true}return false},getTopWindowOfCurrentHost(t){if(!r.isCrossOriginObject(t.parent)&&t.parent!==t&&t.parent.location.host===t.location.host){return r.getTopWindowOfCurrentHost(t.parent)}return t},getParentWindowOfCurrentHost(t){if(r.isCrossOriginObject(t.parent)){return t}return t.parent}};t.PageObject=r})(this.BX=this.BX||{});
863/* End */
864;
865; /* Start:"a:4:{s:4:"full";s:55:"/bitrix/js/main/core/core_window.min.js?175896963976324";s:6:"source";s:35:"/bitrix/js/main/core/core_window.js";s:3:"min";s:39:"/bitrix/js/main/core/core_window.min.js";s:3:"map";s:39:"/bitrix/js/main/core/core_window.map.js";}"*/
866(function(window){if(BX.WindowManager)return;BX.WindowManager={_stack:[],_runtime_resize:{},_delta:2,_delta_start:1e3,currently_loaded:null,settings_category:"BX.WindowManager.9.5",register:function(t){this.currently_loaded=null;t.WM_REG_INDEX=this._stack.length;this._stack.push(t);if(this._stack.length<2){BX.bind(document,"keyup",BX.proxy(this.__checkKeyPress,this))}},unregister:function(t){if(null==t.WM_REG_INDEX)return null;var e;if(this._stack.length>0){while((e=this.__pop_stack())!=t){if(!e){e=null;break}}if(this._stack.length<=0){this.enableKeyCheck()}return e}else{return null}},__pop_stack:function(t){if(this._stack.length>0){var e=this._stack.pop();e.WM_REG_INDEX=null;BX.onCustomEvent(e,"onWindowUnRegister",[t===true]);return e}else return null},clean:function(){while(this.__pop_stack(true)){}this._stack=[];this.disableKeyCheck()},Get:function(){if(this.currently_loaded)return this.currently_loaded;else if(this._stack.length>0)return this._stack[this._stack.length-1];else return null},setStartZIndex:function(t){this._delta_start=t},restoreStartZIndex:function(){this._delta_start=1e3},GetZIndex:function(){var t;return null!=(t=this._stack[this._stack.length-1])?parseInt(t.Get().style.zIndex)+this._delta:this._delta_start},__get_check_url:function(t){var e=t.indexOf("?");return e==-1?t:t.substring(0,e)},saveWindowSize:function(t,e){var i=this.__get_check_url(t);if(BX.userOptions){BX.userOptions.save(this.settings_category,"size_"+i,"width",e.width);BX.userOptions.save(this.settings_category,"size_"+i,"height",e.height)}this._runtime_resize[i]=e},saveWindowOptions:function(t,e){if(BX.userOptions){for(var i in e){if(e.hasOwnProperty(i)){BX.userOptions.save(this.settings_category,"options_"+t,i,e[i])}}}},getRuntimeWindowSize:function(t){return this._runtime_resize[this.__get_check_url(t)]},disableKeyCheck:function(){BX.unbind(document,"keyup",BX.proxy(this.__checkKeyPress,this))},enableKeyCheck:function(){BX.bind(document,"keyup",BX.proxy(this.__checkKeyPress,this))},__checkKeyPress:function(t){if(null==t)t=window.event;if(t.keyCode==27){var e=BX.WindowManager.Get();if(e&&!e.unclosable)e.Close()}}};BX.garbage(BX.WindowManager.clean,BX.WindowManager);BX.CWindowButton=function(t){if(t.btn){this.btn=t.btn;this.parentWindow=t.parentWindow;
866if(/save|apply/i.test(this.btn.name)){BX.bind(this.btn,"click",BX.delegate(this.disableUntilError,this))}}else{this.title=t.title;this.hint=t.hint;this.id=t.id;this.name=t.name;this.className=t.className;this.action=t.action;this.onclick=t.onclick;if(t.Button&&BX.type.isFunction(t.Button))this.Button=t.Button;this.btn=null}};BX.CWindowButton.prototype.disable=function(){if(this.btn)this.parentWindow.showWait(this.btn)};BX.CWindowButton.prototype.enable=function(){if(this.btn)this.parentWindow.closeWait(this.btn)};BX.CWindowButton.prototype.emulate=function(){if(this.btn&&this.btn.disabled)return;var t=this.action?BX.delegate(this.action,this):this.onclick?this.onclick:this.btn?this.btn.getAttribute("onclick"):"";if(t){setTimeout(t,50);if(this.btn&&/save|apply/i.test(this.btn.name)&&!this.action){this.disableUntilError()}}};BX.CWindowButton.prototype.Button=function(parentWindow){this.parentWindow=parentWindow;var btn={props:{type:"button",name:this.id?this.id:this.name,value:this.title?this.title:this.name,id:this.id}};if(this.hint)btn.props.title=this.hint;if(!!this.className)btn.props.className=this.className;if(this.action){btn.events={click:BX.delegate(this.action,this)}}else if(this.onclick){if(BX.browser.IsIE()){btn.events={click:BX.delegate((function(){eval(this.onclick)}),this)}}else{btn.attrs={onclick:this.onclick}}}this.btn=BX.create("INPUT",btn);return this.btn};BX.CWindowButton.prototype.disableUntilError=function(){this.disable();if(!this.__window_error_handler_set){BX.addCustomEvent(this.parentWindow,"onWindowError",BX.delegate(this.enable,this));this.__window_error_handler_set=true}};BX.CWindow=function(t,e){this.DIV=t||document.createElement("DIV");this.SETTINGS={resizable:false,min_height:0,min_width:0,top:0,left:0,draggable:false,drag_restrict:true,resize_restrict:true};this.ELEMENTS={draggable:[],resizer:[],close:[]};this.type=e=="float"?"float":"dialog";BX.adjust(this.DIV,{props:{className:"bx-core-window"},style:{zIndex:0,position:"absolute",display:"none",top:this.SETTINGS.top+"px",left:this.SETTINGS.left+"px",height:"100px",width:"100px"}});this.isOpen=false;BX.addCustomEvent(this,"onWindowRegister",BX.delegate(this.onRegister,this));BX.addCustomEvent(this,"onWindowUnRegister",BX.delegate(this.onUnRegister,this));this.MOUSEOVER=null;BX.bind(this.DIV,"mouseover",BX.delegate(this.__set_msover,this));BX.bind(this.DIV,"mouseout",BX.delegate(this.__unset_msover,this));BX.ready(BX.delegate((function(){document.body.appendChild(this.DIV);BX.ZIndexManager.register(this.DIV)}),this))};BX.CWindow.prototype.Get=function(){return this.DIV};BX.CWindow.prototype.visible=function(){return this.isOpen};BX.CWindow.prototype.Show=function(t){this.DIV.style.display="block";if(!t){BX.WindowManager.register(this);BX.onCustomEvent(this,"onWindowRegister")}BX.ZIndexManager.bringToFront(this.DIV)};BX.CWindow.prototype.Hide=function(){BX.WindowManager.unregister(this);this.DIV.style.display="none"};BX.CWindow.prototype.onRegister=function(){this.isOpen=true};BX.CWindow.prototype.onUnRegister=function(t){this.isOpen=false;if(t||this.PARAMS&&this.PARAMS.content_url){if(t){BX.onCustomEvent(this,"onWindowClose",[this,true])}if(this.DIV.parentNode)this.DIV.parentNode.removeChild(this.DIV)}else{this.DIV.style.display="none"}};BX.CWindow.prototype.CloseDialog=BX.CWindow.prototype.Close=function(t){BX.onCustomEvent(this,"onBeforeWindowClose",[this]);if(t!==true){if(this.denyClose)return false}BX.onCustomEvent(this,"onWindowClose",[this]);if(this.bExpanded){var e=BX.GetDocElement();BX.unbind(window,"resize",BX.proxy(this.__expand_onresize,this));e.style.overflow=this.__expand_settings.overflow}BX.WindowManager.unregister(this);return true};BX.CWindow.prototype.SetResize=function(t){t.style.cursor="se-resize";BX.bind(t,"mousedown",BX.proxy(this.__startResize,this));this.ELEMENTS.resizer.push(t);this.SETTINGS.resizable=true};BX.CWindow.prototype.SetExpand=function(t,e){e=e||"click";BX.bind(t,e,BX.proxy(this.__expand,this))};BX.CWindow.prototype.__expand_onresize=function(){var t=BX.GetWindowInnerSize();this.DIV.style.width=t.innerWidth+"px";
866this.DIV.style.height=t.innerHeight+"px";BX.onCustomEvent(this,"onWindowResize")};BX.CWindow.prototype.__expand=function(){var t=BX.GetDocElement();if(!this.bExpanded){var e=BX.GetWindowScrollPos(),i=BX.GetWindowInnerSize();this.__expand_settings={resizable:this.SETTINGS.resizable,draggable:this.SETTINGS.draggable,width:this.DIV.style.width,height:this.DIV.style.height,left:this.DIV.style.left,top:this.DIV.style.top,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,overflow:BX.style(t,"overflow")};this.SETTINGS.resizable=false;this.SETTINGS.draggable=false;window.scrollTo(0,0);t.style.overflow="hidden";this.DIV.style.top="0px";this.DIV.style.left="0px";this.DIV.style.width=i.innerWidth+"px";this.DIV.style.height=i.innerHeight+"px";this.bExpanded=true;BX.onCustomEvent(this,"onWindowExpand");BX.onCustomEvent(this,"onWindowResize");BX.bind(window,"resize",BX.proxy(this.__expand_onresize,this))}else{BX.unbind(window,"resize",BX.proxy(this.__expand_onresize,this));this.SETTINGS.resizable=this.__expand_settings.resizable;this.SETTINGS.draggable=this.__expand_settings.draggable;t.style.overflow=this.__expand_settings.overflow;this.DIV.style.top=this.__expand_settings.top;this.DIV.style.left=this.__expand_settings.left;this.DIV.style.width=this.__expand_settings.width;this.DIV.style.height=this.__expand_settings.height;window.scrollTo(this.__expand_settings.scrollLeft,this.__expand_settings.scrollTop);this.bExpanded=false;BX.onCustomEvent(this,"onWindowNarrow");BX.onCustomEvent(this,"onWindowResize")}};BX.CWindow.prototype.Resize=function(t,e){var i=Math.max(t-this.pos.left+this.dx,this.SETTINGS.min_width);var s=Math.max(e-this.pos.top+this.dy,this.SETTINGS.min_height);if(this.SETTINGS.resize_restrict){var o=BX.GetWindowScrollSize();if(this.pos.left+i>o.scrollWidth-this.dw)i=o.scrollWidth-this.pos.left-this.dw}this.DIV.style.width=i+"px";this.DIV.style.height=s+"px";BX.onCustomEvent(this,"onWindowResize")};BX.CWindow.prototype.__startResize=function(t){if(!this.SETTINGS.resizable)return false;if(!t)t=window.event;this.wndSize=BX.GetWindowScrollPos();this.wndSize.innerWidth=BX.GetWindowInnerSize().innerWidth;this.pos=BX.pos(this.DIV);this.x=t.clientX+this.wndSize.scrollLeft;this.y=t.clientY+this.wndSize.scrollTop;this.dx=this.pos.left+this.pos.width-this.x;this.dy=this.pos.top+this.pos.height-this.y;this.dw=this.pos.width-parseInt(this.DIV.style.width);BX.bind(document,"mousemove",BX.proxy(this.__moveResize,this));BX.bind(document,"mouseup",BX.proxy(this.__stopResize,this));if(document.body.setCapture)document.body.setCapture();document.onmousedown=BX.False;var e=document.body;e.ondrag=e.onselectstart=BX.False;e.style.MozUserSelect=this.DIV.style.MozUserSelect="none";e.style.cursor="se-resize";BX.onCustomEvent(this,"onWindowResizeStart");return true};BX.CWindow.prototype.__moveResize=function(t){if(!t)t=window.event;var e=BX.GetWindowScrollPos();var i=t.clientX+e.scrollLeft;var s=t.clientY+e.scrollTop;if(this.x==i&&this.y==s)return;this.Resize(i,s);this.x=i;this.y=s};BX.CWindow.prototype.__stopResize=function(){if(document.body.releaseCapture)document.body.releaseCapture();BX.unbind(document,"mousemove",BX.proxy(this.__moveResize,this));BX.unbind(document,"mouseup",BX.proxy(this.__stopResize,this));document.onmousedown=null;var t=document.body;t.ondrag=t.onselectstart=null;t.style.MozUserSelect=this.DIV.style.MozUserSelect="";t.style.cursor="";BX.onCustomEvent(this,"onWindowResizeFinished")};BX.CWindow.prototype.SetClose=function(t){BX.bind(t,"click",BX.proxy(this.Close,this));this.ELEMENTS.close.push(t)};BX.CWindow.prototype.SetDraggable=function(t){BX.bind(t,"mousedown",BX.proxy(this.__startDrag,this));t.style.cursor="move";this.ELEMENTS.draggable.push(t);this.SETTINGS.draggable=true};BX.CWindow.prototype.Move=function(t,e){var i=1;var s=parseInt(this.DIV.style.left)+t;var o=parseInt(this.DIV.style.top)+e;if(this.SETTINGS.drag_restrict){if(s<0)s=0;var n=BX.GetWindowScrollSize();var r=this.DIV.offsetWidth;var h=this.DIV.offsetHeight;if(s>n.scrollWidth-r-i)s=n.scrollWidth-r-i;var a=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight,n.scrollHeight);if(o>a-h-i)o=a-h-i;if(o<0)o=0}this.DIV.style.left=s+"px";this.DIV.style.top=o+"px"};BX.CWindow.prototype.__startDrag=function(t){if(!this.SETTINGS.draggable)return false;if(!t)t=window.event;this.x=t.clientX+document.body.scrollLeft;this.y=t.clientY+document.body.scrollTop;this.__bWasDragged=false;BX.bind(document,"mousemove",BX.proxy(this.__moveDrag,this));BX.bind(document,"mouseup",BX.proxy(this.__stopDrag,this));if(document.body.setCapture)document.body.setCapture();document.onmousedown=BX.False;var e=document.body;e.ondrag=e.onselectstart=BX.False;e.style.MozUserSelect=this.DIV.style.MozUserSelect="none";e.style.cursor="move";return BX.PreventDefault(t)};BX.CWindow.prototype.__moveDrag=function(t){if(!t)t=window.event;var e=t.clientX+document.body.scrollLeft;var i=t.clientY+document.body.scrollTop;if(this.x==e&&this.y==i)return;this.Move(e-this.x,i-this.y);this.x=e;this.y=i;if(!this.__bWasDragged){BX.onCustomEvent(this,"onWindowDragStart");this.__bWasDragged=true;BX.bind(BX.proxy_context,"click",BX.PreventDefault)}BX.onCustomEvent(this,"onWindowDrag")};BX.CWindow.prototype.__stopDrag=function(t){if(document.body.releaseCapture)document.body.releaseCapture();BX.unbind(document,"mousemove",BX.proxy(this.__moveDrag,this));BX.unbind(document,"mouseup",BX.proxy(this.__stopDrag,this));document.onmousedown=null;var e=document.body;e.ondrag=e.onselectstart=null;e.style.MozUserSelect=this.DIV.style.MozUserSelect="";e.style.cursor="";if(this.__bWasDragged){BX.onCustomEvent(this,"onWindowDragFinished");var i=BX.proxy_context;setTimeout((function(){BX.unbind(i,"click",BX.PreventDefault)}),100);this.__bWasDragged=false}return BX.PreventDefault(t)};BX.CWindow.prototype.DenyClose=function(){this.denyClose=true};BX.CWindow.prototype.AllowClose=function(){this.denyClose=false};BX.CWindow.prototype.ShowError=function(t){BX.onCustomEvent(this,"onWindowError",[t]);if(this._wait)BX.closeWait(this._wait);window.alert(t)};BX.CWindow.prototype.__set_msover=function(){this.MOUSEOVER=true};BX.CWindow.prototype.__unset_msover=function(){this.MOUSEOVER=false};BX.CWindowDialog=function(){var t=arguments;t[1]="dialog";BX.CWindowDialog.superclass.constructor.apply(this,t);this.DIV.style.top="10px";this.OVERLAY=null};BX.extend(BX.CWindowDialog,BX.CWindow);BX.CWindowDialog.prototype.__resizeOverlay=function(){var t=BX.GetWindowScrollSize();this.OVERLAY.style.width=t.scrollWidth+"px"};BX.CWindowDialog.prototype.CreateOverlay=function(t){if(null==this.OVERLAY){var e=BX.GetWindowScrollSize();var i=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight,e.scrollHeight);
866this.OVERLAY=document.body.appendChild(BX.create("DIV",{style:{position:"absolute",top:"0px",left:"0px",zIndex:t||parseInt(this.DIV.style.zIndex)-2,width:e.scrollWidth+"px",height:i+"px"}}));var s=BX.ZIndexManager.getComponent(this.DIV);if(s){s.setOverlay(this.OVERLAY)}}return this.OVERLAY};BX.CWindowDialog.prototype.Show=function(){BX.CWindowDialog.superclass.Show.apply(this,arguments);this.CreateOverlay();this.OVERLAY.style.display="block";BX.unbind(window,"resize",BX.proxy(this.__resizeOverlay,this));BX.bind(window,"resize",BX.proxy(this.__resizeOverlay,this))};BX.CWindowDialog.prototype.onUnRegister=function(t){BX.CWindowDialog.superclass.onUnRegister.apply(this,arguments);if(this.clean){if(this.OVERLAY.parentNode)this.OVERLAY.parentNode.removeChild(this.OVERLAY)}else{this.OVERLAY.style.display="none"}BX.unbind(window,"resize",BX.proxy(this.__resizeOverlay,this))};BX.CDialog=function(t){BX.CDialog.superclass.constructor.apply(this);this._sender="core_window_cdialog";this.PARAMS=t||{};for(var e in this.defaultParams){if(typeof this.PARAMS[e]=="undefined")this.PARAMS[e]=this.defaultParams[e]}this.PARAMS.width=!isNaN(parseInt(this.PARAMS.width))?this.PARAMS.width:this.defaultParams["width"];this.PARAMS.height=!isNaN(parseInt(this.PARAMS.height))?this.PARAMS.height:this.defaultParams["height"];if(this.PARAMS.resize_id||this.PARAMS.content_url){var i=BX.WindowManager.getRuntimeWindowSize(this.PARAMS.resize_id||this.PARAMS.content_url);if(i){this.PARAMS.width=i.width;this.PARAMS.height=i.height}}BX.addClass(this.DIV,"bx-core-adm-dialog");this.DIV.id="bx-admin-prefix";this.PARTS={};this.DIV.style.height=null;this.DIV.style.width=null;this.PARTS.TITLEBAR=this.DIV.appendChild(BX.create("DIV",{props:{className:"bx-core-adm-dialog-head"}}));this.PARTS.TITLE_CONTAINER=this.PARTS.TITLEBAR.appendChild(BX.create("SPAN",{props:{className:"bx-core-adm-dialog-head-inner"},text:this.PARAMS.title}));this.PARTS.TITLEBAR_ICONS=this.PARTS.TITLEBAR.appendChild(BX.create("DIV",{props:{className:"bx-core-adm-dialog-head-icons"},children:this.PARAMS.resizable?[BX.create("SPAN",{props:{className:"bx-core-adm-icon-expand",title:BX.message("JS_CORE_WINDOW_EXPAND")}}),BX.create("SPAN",{props:{className:"bx-core-adm-icon-close",title:BX.message("JS_CORE_WINDOW_CLOSE")}})]:[BX.create("SPAN",{props:{className:"bx-core-adm-icon-close",title:BX.message("JS_CORE_WINDOW_CLOSE")}})]}));this.PARTS.CONTENT=this.DIV.appendChild(BX.create("DIV",{props:{className:"bx-core-adm-dialog-content-wrap adm-workarea"}}));this.PARTS.CONTENT_DATA=this.PARTS.CONTENT.appendChild(BX.create("DIV",{props:{className:"bx-core-adm-dialog-content"},style:{height:this.PARAMS.height+"px",width:this.PARAMS.width+"px"}}));this.PARTS.HEAD=this.PARTS.CONTENT_DATA.appendChild(BX.create("DIV",{props:{className:"bx-core-adm-dialog-head-block"+(this.PARAMS.icon?" "+this.PARAMS.icon:"")}}));this.SetHead(this.PARAMS.head);this.SetContent(this.PARAMS.content);this.SetTitle(this.PARAMS.title);this.SetClose(this.PARTS.TITLEBAR_ICONS.lastChild);if(this.PARAMS.resizable){this.SetExpand(this.PARTS.TITLEBAR_ICONS.firstChild);this.SetExpand(this.PARTS.TITLEBAR,"dblclick");BX.addCustomEvent(this,"onWindowExpand",BX.proxy(this.__onexpand,this));BX.addCustomEvent(this,"onWindowNarrow",BX.proxy(this.__onexpand,this))}this.PARTS.FOOT=this.PARTS.BUTTONS_CONTAINER=this.PARTS.CONTENT.appendChild(BX.create("DIV",{props:{className:"bx-core-adm-dialog-buttons"},children:this.ShowButtons()}));if(this.PARAMS.draggable)this.SetDraggable(this.PARTS.TITLEBAR);if(this.PARAMS.resizable){this.PARTS.RESIZER=this.DIV.appendChild(BX.create("DIV",{props:{className:"bx-core-resizer"}}));this.SetResize(this.PARTS.RESIZER);this.SETTINGS.min_width=this.PARAMS.min_width;this.SETTINGS.min_height=this.PARAMS.min_height}this.auth_callback=BX.delegate((function(){this.PARAMS.content="";this.hideNotify();this.Show()}),this)};BX.extend(BX.CDialog,BX.CWindowDialog);BX.CDialog.prototype.defaultParams={width:700,height:400,min_width:500,min_height:300,resizable:true,draggable:true,title:"",icon:""};BX.CDialog.prototype.showWait=function(t){if(BX.type.isElementNode(t)&&(t.type=="button"||t.type=="submit")){BX.defer((function(){t.disabled=true}))();var e=BX.hasClass(t,"adm-btn-save")||BX.hasClass(t,"adm-btn-save"),i=BX.pos(t,true);t.bxwaiter=this.PARTS.FOOT.appendChild(BX.create("DIV",{props:{className:"adm-btn-load-img"+(e?"-green":"")}
866,style:{top:parseInt((i.bottom+i.top)/2-10)+"px",left:parseInt((i.right+i.left)/2-10)+"px"}}));BX.addClass(t,"adm-btn-load");this.lastWaitElement=t;return t.bxwaiter}return null};BX.CDialog.prototype.closeWait=function(t){t=t||this.lastWaitElement;if(BX.type.isElementNode(t)){if(t.bxwaiter){if(t.bxwaiter.parentNode){t.bxwaiter.parentNode.removeChild(t.bxwaiter)}t.bxwaiter=null}t.disabled=false;BX.removeClass(t,"adm-btn-load");if(this.lastWaitElement==t)this.lastWaitElement=null}};BX.CDialog.prototype.Authorize=function(t){this.bSkipReplaceContent=true;this.ShowError(BX.message("JSADM_AUTH_REQ"));BX.onCustomEvent(this,"onWindowError",[]);BX.closeWait();new BX.CAuthDialog({content_url:this.PARAMS.content_url,auth_result:t,callback:BX.delegate((function(){if(this.auth_callback)this.auth_callback()}),this)}).Show()};BX.CDialog.prototype.ShowError=function(t){BX.onCustomEvent(this,"onWindowError",[t]);this.closeWait();if(this._wait)BX.closeWait(this._wait);this.Notify(t,true)};BX.CDialog.prototype.__expandGetSize=function(){var t=BX.GetDocElement();t.style.overflow="hidden";var e=BX.GetWindowInnerSize();t.scrollTop=0;this.DIV.style.top="-"+this.dxShadow+"px";this.DIV.style.left="-"+this.dxShadow+"px";return{width:e.innerWidth-parseInt(BX.style(this.PARTS.CONTENT,"padding-right"))-parseInt(BX.style(this.PARTS.CONTENT,"padding-left"))+this.dxShadow,height:e.innerHeight-this.PARTS.TITLEBAR.offsetHeight-this.PARTS.FOOT.offsetHeight-parseInt(BX.style(this.PARTS.CONTENT,"padding-top"))-parseInt(BX.style(this.PARTS.CONTENT,"padding-bottom"))+this.dxShadow}};BX.CDialog.prototype.__expand=function(){var t=BX.GetDocElement();this.dxShadow=2;if(!this.bExpanded){var e=BX.GetWindowScrollPos();this.__expand_settings={resizable:this.SETTINGS.resizable,draggable:this.SETTINGS.draggable,width:this.PARTS.CONTENT_DATA.style.width,height:this.PARTS.CONTENT_DATA.style.height,left:this.DIV.style.left,top:this.DIV.style.top,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,overflow:BX.style(t,"overflow")};this.SETTINGS.resizable=false;this.SETTINGS.draggable=false;var i=this.__expandGetSize();this.PARTS.CONTENT_DATA.style.width=i.width+"px";this.PARTS.CONTENT_DATA.style.height=i.height+"px";window.scrollTo(0,0);t.style.overflow="hidden";this.bExpanded=true;BX.onCustomEvent(this,"onWindowExpand");BX.onCustomEvent(this,"onWindowResize");BX.onCustomEvent(this,"onWindowResizeExt",[{width:i.width,height:i.height}]);BX.bind(window,"resize",BX.proxy(this.__expand_onresize,this))}else{BX.unbind(window,"resize",BX.proxy(this.__expand_onresize,this));this.SETTINGS.resizable=this.__expand_settings.resizable;this.SETTINGS.draggable=this.__expand_settings.draggable;t.style.overflow=this.__expand_settings.overflow;this.DIV.style.top=this.__expand_settings.top;this.DIV.style.left=this.__expand_settings.left;this.PARTS.CONTENT_DATA.style.width=this.__expand_settings.width;this.PARTS.CONTENT_DATA.style.height=this.__expand_settings.height;window.scrollTo(this.__expand_settings.scrollLeft,this.__expand_settings.scrollTop);this.bExpanded=false;BX.onCustomEvent(this,"onWindowNarrow");BX.onCustomEvent(this,"onWindowResize");BX.onCustomEvent(this,"onWindowResizeExt",[{width:parseInt(this.__expand_settings.width),height:parseInt(this.__expand_settings.height)}])}};BX.CDialog.prototype.__expand_onresize=function(){var t=this.__expandGetSize();this.PARTS.CONTENT_DATA.style.width=t.width+"px";this.PARTS.CONTENT_DATA.style.height=t.height+"px";BX.onCustomEvent(this,"onWindowResize");BX.onCustomEvent(this,"onWindowResizeExt",[t])};BX.CDialog.prototype.__onexpand=function(){var t=this.PARTS.TITLEBAR_ICONS.firstChild;t.className=BX.toggle(t.className,["bx-core-adm-icon-expand","bx-core-adm-icon-narrow"]);t.title=BX.toggle(t.title,[BX.message("JS_CORE_WINDOW_EXPAND"),BX.message("JS_CORE_WINDOW_NARROW")]);if(this.PARTS.RESIZER){this.PARTS.RESIZER.style.display=this.bExpanded?"none":"block"}};BX.CDialog.prototype.__startResize=function(t){if(!this.SETTINGS.resizable)return false;if(!t)t=window.event;this.wndSize=BX.GetWindowScrollPos();this.wndSize.innerWidth=BX.GetWindowInnerSize().innerWidth;this.pos=BX.pos(this.PARTS.CONTENT_DATA);this.x=t.clientX+this.wndSize.scrollLeft;this.y=t.clientY+this.wndSize.scrollTop;this.dx=this.pos.left+this.pos.width-this.x;this.dy=this.pos.top+this.pos.height-this.y;this.dw=this.pos.width-parseInt(this.PARTS.CONTENT_DATA.style.width)+parseInt(BX.style(this.PARTS.CONTENT,"padding-right"));BX.bind(document,"mousemove",BX.proxy(this.__moveResize,this));BX.bind(document,"mouseup",BX.proxy(this.__stopResize,this));if(document.body.setCapture)document.body.setCapture();document.onmousedown=BX.False;var e=document.body;e.ondrag=e.onselectstart=BX.False;e.style.MozUserSelect=this.DIV.style.MozUserSelect="none";e.style.cursor="se-resize";BX.onCustomEvent(this,"onWindowResizeStart");return true};BX.CDialog.prototype.Resize=function(t,e){var i=Math.max(t-this.pos.left+this.dx,this.SETTINGS.min_width);var s=Math.max(e-this.pos.top+this.dy,this.SETTINGS.min_height);if(this.SETTINGS.resize_restrict){var o=BX.GetWindowScrollSize();if(this.pos.left+i>o.scrollWidth-this.dw)i=o.scrollWidth-this.pos.left-this.dw}this.PARTS.CONTENT_DATA.style.width=i+"px";this.PARTS.CONTENT_DATA.style.height=s+"px";BX.onCustomEvent(this,"onWindowResize");BX.onCustomEvent(this,"onWindowResizeExt",[{height:s,width:i}])};BX.CDialog.prototype.SetSize=function(t){this.PARTS.CONTENT_DATA.style.width=t.width+"px";this.PARTS.CONTENT_DATA.style.height=t.height+"px";BX.onCustomEvent(this,"onWindowResize");BX.onCustomEvent(this,"onWindowResizeExt",[t])};BX.CDialog.prototype.GetParameters=function(t){var e=this.GetForm();if(!e)return"";var i,s="";var o=e.elements.length;var n="";for(i=0;i<o;i++){if(s!="")n="&";var r=e.elements[i];if(r.disabled)continue;switch(r.type.toLowerCase()){case"text":case"textarea":case"password":case"hidden":if(null==t&&r.name.substr(r.name.length-4)=="_alt"&&e.elements[r.name.substr(0,r.name.length-4)])break;s+=n+r.name+"="+BX.util.urlencode(r.value);break;case"radio":if(r.checked)s+=n+r.name+"="+BX.util.urlencode(r.value);break;case"checkbox":s+=n+r.name+"="+BX.util.urlencode(r.checked?"Y":"N");break;case"select-one":var h="";if(null==t&&e.elements[r.name+"_alt"]&&r.selectedIndex==0)h=e.elements[r.name+"_alt"].value;else h=r.value;s+=n+r.name+"="+BX.util.urlencode(h);break;case"select-multiple":var a,l=false;var d=r.options.length;for(a=0;a<d;a++){if(r.options[a].selected){s+=n+r.name+"="+BX.util.urlencode(r.o
866ptions[a].value);l=true}}if(!l)s+=n+r.name+"=";break;default:break}}return s};BX.CDialog.prototype.PostParameters=function(t){var e=this.PARAMS.content_url;if(null==t)t="";t+=(t==""?"":"&")+"bxsender="+this._sender;var i=e.indexOf("?");if(i==-1)e+="?"+t;else e=e.substring(0,i)+"?"+t+"&"+e.substring(i+1);BX.showWait();this.auth_callback=BX.delegate((function(){this.hideNotify();this.PostParameters(t)}),this);BX.ajax.Setup({skipAuthCheck:true},true);BX.ajax.post(e,this.GetParameters(),BX.delegate((function(t){BX.closeWait();if(!this.bSkipReplaceContent){this.ClearButtons();this.SetContent(t);this.Show(true)}this.bSkipReplaceContent=false}),this))};BX.CDialog.prototype.Submit=function(t,e){var i=this.GetForm();if(i){i.onsubmit=null;i.method="POST";if(!i.action||e){e=e||this.PARAMS.content_url;if(null!=t){var s=e.indexOf("?");if(s==-1)e+="?"+t;else e=e.substring(0,s)+"?"+t+"&"+e.substring(s+1)}i.action=e}if(!i._bxsender){i._bxsender=i.appendChild(BX.create("INPUT",{attrs:{type:"hidden",name:"bxsender",value:this._sender}}))}this._wait=BX.showWait();this.auth_callback=BX.delegate((function(){this.hideNotify();this.Submit(t)}),this);BX.ajax.submit(i,BX.delegate((function(){this.closeWait()}),this))}else{window.alert("no form registered!")}};BX.CDialog.prototype.GetForm=function(){if(null==this.__form){var t=this.PARTS.CONTENT_DATA.getElementsByTagName("FORM");this.__form=t[0]?t[0]:null}return this.__form};BX.CDialog.prototype.GetRealForm=function(){if(null==this.__rform){var t=this.PARTS.CONTENT_DATA.getElementsByTagName("FORM");this.__rform=t[1]?t[1]:t[0]?t[0]:null}return this.__rform};BX.CDialog.prototype._checkButton=function(t){var e=["btnSave","btnCancel","btnClose"];for(var i=0;i<e.length;i++){if(this[e[i]]&&t==this[e[i]])return e[i]}return false};BX.CDialog.prototype.ShowButtons=function(){var t=[];if(this.PARAMS.buttons){if(this.PARAMS.buttons.title)this.PARAMS.buttons=[this.PARAMS.buttons];for(var e=0,i=this.PARAMS.buttons.length;e<i;e++){if(BX.type.isNotEmptyString(this.PARAMS.buttons[e])){t.push(this.PARAMS.buttons[e])}else if(BX.type.isElementNode(this.PARAMS.buttons[e])){t.push(this.PARAMS.buttons[e])}else if(this.PARAMS.buttons[e]){if(!BX.is_subclass_of(this.PARAMS.buttons[e],BX.CWindowButton)){var s=this._checkButton(this.PARAMS.buttons[e]);this.PARAMS.buttons[e]=new BX.CWindowButton(this.PARAMS.buttons[e]);if(s)this[s]=this.PARAMS.buttons[e]}t.push(this.PARAMS.buttons[e].Button(this))}}}return t};BX.CDialog.prototype.setAutosave=function(){if(!this.bSetAutosaveDelay){this.bSetAutosaveDelay=true;setTimeout(BX.proxy(this.setAutosave,this),10)}};BX.CDialog.prototype.SetTitle=function(t){this.PARAMS.title=t;BX.cleanNode(this.PARTS.TITLE_CONTAINER).appendChild(document.createTextNode(this.PARAMS.title))};BX.CDialog.prototype.SetHead=function(t){this.PARAMS.head=BX.util.trim(t);this.PARTS.HEAD.innerHTML=this.PARAMS.head||"&nbsp;";this.PARTS.HEAD.style.display=this.PARAMS.head?"block":"none";this.adjustSize()};BX.CDialog.prototype.Notify=function(t,e,i){if(!this.PARTS.NOTIFY){this.PARTS.NOTIFY=this.DIV.insertBefore(BX.create("DIV",{props:{className:"adm-warning-block"},children:[BX.create("SPAN",{props:{className:"adm-warning-text"}}),BX.create("SPAN",{props:{className:"adm-warning-icon"}}),BX.create("SPAN",{props:{className:"adm-warning-close"},events:{click:BX.proxy(this.hideNotify,this)}})]}),this.DIV.firstChild)}if(e)BX.addClass(this.PARTS.NOTIFY,"adm-warning-block-red");else BX.removeClass(this.PARTS.NOTIFY,"adm-warning-block-red");if(i!==true){t=BX.util.htmlspecialchars(t)}this.PARTS.NOTIFY.firstChild.innerHTML=t||"&nbsp;";this.PARTS.NOTIFY.firstChild.style.width=this.PARAMS.width-50+"px";BX.removeClass(this.PARTS.NOTIFY,"adm-warning-animate")};BX.CDialog.prototype.hideNotify=function(){BX.addClass(this.PARTS.NOTIFY,"adm-warning-animate")};BX.CDialog.prototype.__adjustHeadToIcon=function(){if(!this.PARTS.HEAD.offsetHeight){setTimeout(BX.delegate(this.__adjustHeadToIcon,this),50)}else{if(this.icon_image&&this.icon_image.height&&this.icon_image.height>this.PARTS.HEAD.offsetHeight-5){this.PARTS.HEAD.style.height=this.icon_image.height+5+"px";this.adjustSize()}this.icon_image.onload=null;this.icon_image=null}};BX.CDialog.prototype.SetIcon=function(t){if(this.PARAMS.icon!=t){if(this.PARAMS.icon)BX.removeClass(this.PARTS.HEAD,this.PARAMS.icon);this.PARAMS.icon=t;if(this.PARAMS.icon){BX.addClass(this.PARTS.HEAD,this.PARAMS.icon);var e=BX.style(this.PARTS.HEAD,"background-image")||BX.style(this.PARTS.HEAD,"backgroundImage");if(BX.type.isNotEmptyString(e)&&e!="none"){var i=e.match(new RegExp("url\\s*\\(\\s*('|\"|)(.+?)(\\1)\\s*\\)"));if(i){e=i[2];if(BX.type.isNotEmptyString(e)){this.icon_image=new Image;this.icon_image.onload=BX.delegate(this.__adjustHeadToIcon,this);this.icon_image.src=e}}}}}this.adjustSize()};BX.CDialog.prototype.SetIconFile=function(t){this.icon_image=new Image;this.icon_image.onload=BX.delegate(this.__adjustHeadToIcon,this);this.icon_image.src=t;BX.adjust(this.PARTS.HEAD,{style:{backgroundImage:"url("+t+")",backgroundPosition:"right 9px"}});this.adjustSize()};BX.CDialog.prototype.SetButtons=function(t){if(BX.type.isString(t)){if(t.length>0){this.PARTS.BUTTONS_CONTAINER.innerHTML+=t;var e=this.PARTS.BUTTONS_CONTAINER.getElementsByTagName("INPUT");if(e.length>0){this.PARAMS.buttons=[];for(var i=0;i<e.length;i++){this.PARAMS.buttons.push(new BX.CWindowButton({btn:e[i],parentWindow:this}))}}}}else{this.PARAMS.buttons=t;BX.adjust(this.PARTS.BUTTONS_CONTAINER,{children:this.ShowButtons()})}this.adjustSize()};BX.CDialog.prototype.ClearButtons=function(){BX.cleanNode(this.PARTS.BUTTONS_CONTAINER);this.adjustSize()};BX.CDialog.prototype.SetContent=function(t){this.__form=null;if(BX.type.isElementNode(t)){if(t.parentNode)t.parentNode.removeChild(t)}else if(BX.type.isString(t)){t=BX.create("DIV",{html:t})}this.PARAMS.content=t;BX.cleanNode(this.PARTS.CONTENT_DATA);BX.adjust(this.PARTS.CONTENT_DATA,{children:[this.PARTS.HEAD,BX.create("DIV",{props:{className:"bx-core-adm-dialog-content-wrap-inner"},children:[this.PARAMS.content]}
866)]});if(this.PARAMS.content_url&&this.GetForm()){this.__form.submitbtn=this.__form.appendChild(BX.create("INPUT",{props:{type:"submit"},style:{display:"none"}}));this.__form.onsubmit=BX.delegate(this.__submit,this)}};BX.CDialog.prototype.__submit=function(t){for(var e=0,i=this.PARAMS.buttons.length;e<i;e++){if(this.PARAMS.buttons[e]&&(this.PARAMS.buttons[e].name&&/save|apply/i.test(this.PARAMS.buttons[e].name)||this.PARAMS.buttons[e].btn&&this.PARAMS.buttons[e].btn.name&&/save|apply/i.test(this.PARAMS.buttons[e].btn.name))){this.PARAMS.buttons[e].emulate();break}}return BX.PreventDefault(t)};BX.CDialog.prototype.SwapContent=function(t){t=BX(t);BX.cleanNode(this.PARTS.CONTENT_DATA);t.parentNode.removeChild(t);this.PARTS.CONTENT_DATA.appendChild(t);t.style.display="block";this.SetContent(t.innerHTML)};BX.CDialog.prototype.adjustSize=function(){};BX.CDialog.prototype.__adjustSize=function(){};BX.CDialog.prototype.adjustSizeEx=function(){BX.defer(this.__adjustSizeEx,this)()};BX.CDialog.prototype.__adjustSizeEx=function(){var t=this.PARTS.CONTENT_DATA.firstChild,e=0,i,s;while(t){if(BX.type.isElementNode(t)){i=parseInt(BX.style(t,"margin-top"),10);if(isNaN(i))i=0;s=parseInt(BX.style(t,"margin-bottom"),10);if(isNaN(s))s=0;e+=t.offsetHeight+i+s}t=BX.nextSibling(t)}if(e)this.PARTS.CONTENT_DATA.style.height=e+"px"};BX.CDialog.prototype.__onResizeFinished=function(){BX.WindowManager.saveWindowSize(this.PARAMS.resize_id||this.PARAMS.content_url,{height:parseInt(this.PARTS.CONTENT_DATA.style.height),width:parseInt(this.PARTS.CONTENT_DATA.style.width)})};BX.CDialog.prototype.Show=function(t){if(!this.PARAMS.content&&this.PARAMS.content_url&&BX.ajax&&!t){var e=BX.showWait();BX.WindowManager.currently_loaded=this;this.CreateOverlay();this.OVERLAY.style.display="block";this.OVERLAY.className="bx-core-dialog-overlay";var i="",s="GET";if(this.PARAMS.content_post){i=this.PARAMS.content_post;s="POST"}var o=this.PARAMS.content_url+(this.PARAMS.content_url.indexOf("?")<0?"?":"&")+"bxsender="+this._sender;this.auth_callback=BX.delegate((function(){this.PARAMS.content="";this.hideNotify();this.Show()}),this);BX.ajax({method:s,dataType:"html",url:o,data:i,skipAuthCheck:true,onsuccess:BX.delegate((function(t){BX.closeWait(null,e);this.SetContent(t||"&nbsp;");this.Show()}),this)})}else{BX.WindowManager.currently_loaded=null;BX.CDialog.superclass.Show.apply(this,arguments);this.adjustPos();this.OVERLAY.className="bx-core-dialog-overlay";this.__adjustSize();BX.removeCustomEvent(this,"onWindowResize",BX.proxy(this.__adjustSize,this));BX.addCustomEvent(this,"onWindowResize",BX.proxy(this.__adjustSize,this));if(this.PARAMS.resizable&&(this.PARAMS.content_url||this.PARAMS.resize_id)){BX.removeCustomEvent(this,"onWindowResizeFinished",BX.proxy(this.__onResizeFinished,this));BX.addCustomEvent(this,"onWindowResizeFinished",BX.proxy(this.__onResizeFinished,this))}}};BX.CDialog.prototype.GetInnerPos=function(){return{width:parseInt(this.PARTS.CONTENT_DATA.style.width),height:parseInt(this.PARTS.CONTENT_DATA.style.height)}};BX.CDialog.prototype.adjustPos=function(){if(!this.bExpanded){var t=window;var e=BX.PageObject.getRootWindow();if(e.BX.SidePanel&&e.BX.SidePanel.Instance&&e.BX.SidePanel.Instance.getTopSlider()){t=e.BX.SidePanel.Instance.getTopSlider().getWindow()}var i=t.BX.GetWindowInnerSize();var s=t.BX.GetWindowScrollPos();var o={left:parseInt(s.scrollLeft+i.innerWidth/2-parseInt(this.DIV.offsetWidth)/2)+"px",top:Math.max(parseInt(s.scrollTop+i.innerHeight/2-parseInt(this.DIV.offsetHeight)/2),0)+"px"};BX.adjust(this.DIV,{style:o})}};BX.CDialog.prototype.GetContent=function(){return this.PARTS.CONTENT_DATA};BX.CDialog.prototype.btnSave=BX.CDialog.btnSave={title:BX.message("JS_CORE_WINDOW_SAVE"),id:"savebtn",name:"savebtn",className:BX.browser.IsIE()&&BX.browser.IsDoctype()&&!BX.browser.IsIE10()?"":"adm-btn-save",action:function(){this.disableUntilError();this.parentWindow.PostParameters()}};BX.CDialog.prototype.btnCancel=BX.CDialog.btnCancel={title:BX.message("JS_CORE_WINDOW_CANCEL"),id:"cancel",name:"cancel",action:function(){this.parentWindow.Close()}};BX.CDialog.prototype.btnClose=BX.CDialog.btnClose={title:BX.message("JS_CORE_WINDOW_CLOSE"),id:"close",n
866ame:"close",action:function(){this.parentWindow.Close()}};BX.CAdminDialog=function(t){BX.CAdminDialog.superclass.constructor.apply(this,arguments);this._sender="core_window_cadmindialog";BX.addClass(this.DIV,"bx-core-adm-admin-dialog");this.PARTS.CONTENT.insertBefore(this.PARTS.HEAD,this.PARTS.CONTENT.firstChild);this.PARTS.HEAD.className="bx-core-adm-dialog-tabs"};BX.extend(BX.CAdminDialog,BX.CDialog);BX.CAdminDialog.prototype.SetHead=function(){BX.CAdminDialog.superclass.SetHead.apply(this,arguments);if(this.PARTS.HEAD.firstChild&&BX.type.isElementNode(this.PARTS.HEAD.firstChild)){var t=this.PARTS.HEAD.firstChild,e=0,i=0,s=0;while(t){if(BX.type.isElementNode(t)){i=parseInt(BX.style(t,"margin-left"),10);if(isNaN(i))i=0;s=parseInt(BX.style(t,"margin-right"),10);if(isNaN(s))s=0;e+=t.offsetWidth+i+s}t=BX.nextSibling(t)}this.SETTINGS.min_width=Math.max(e,this.SETTINGS.min_width)-2;if(this.PARAMS.width<this.SETTINGS.min_width){BX.adjust(this.PARTS.CONTENT_DATA,{style:{width:this.SETTINGS.min_width+"px"}})}}};BX.CAdminDialog.prototype.SetContent=function(t){this.__form=null;if(BX.type.isElementNode(t)){if(t.parentNode)t.parentNode.removeChild(t)}this.PARAMS.content=t;BX.cleanNode(this.PARTS.CONTENT_DATA);BX.adjust(this.PARTS.CONTENT_DATA,{children:[this.PARAMS.content||"&nbsp;"]});if(this.PARAMS.content_url&&this.GetForm()){this.__form.appendChild(BX.create("INPUT",{props:{type:"submit"},style:{display:"none"}}));this.__form.onsubmit=BX.delegate(this.__submit,this)}};BX.CAdminDialog.prototype.__expandGetSize=function(){var t=BX.CAdminDialog.superclass.__expandGetSize.apply(this,arguments);t.width-=parseInt(BX.style(this.PARTS.CONTENT_DATA,"padding-right"))+parseInt(BX.style(this.PARTS.CONTENT_DATA,"padding-left"));t.height-=parseInt(BX.style(this.PARTS.CONTENT_DATA,"padding-top"))+parseInt(BX.style(this.PARTS.CONTENT_DATA,"padding-bottom"));t.height-=this.PARTS.HEAD.offsetHeight;return t};BX.CAdminDialog.prototype.Submit=function(){var t=this.GetForm();if(t&&!t["bxpublic"]&&!/bxpublic=/.test(t.action)){t.appendChild(BX.create("INPUT",{props:{type:"hidden",name:"bxpublic",value:"Y"}}))}return BX.CAdminDialog.superclass.Submit.apply(this,arguments)};BX.CAdminDialog.prototype.btnSave=BX.CAdminDialog.btnSave={title:BX.message("JS_CORE_WINDOW_SAVE"),id:"savebtn",name:"savebtn",className:"adm-btn-save",action:function(){this.disableUntilError();this.parentWindow.Submit()}};BX.CAdminDialog.btnCancel=BX.CAdminDialog.superclass.btnCancel;BX.CAdminDialog.btnClose=BX.CAdminDialog.superclass.btnClose;BX.CDebugDialog=function(t){BX.CDebugDialog.superclass.constructor.apply(this,arguments)};BX.extend(BX.CDebugDialog,BX.CDialog);BX.CDebugDialog.prototype.ShowDetails=function(t){var e=BX(t);if(e){if(this.div_detail_current)this.div_detail_current.style.display="none";e.style.display="block";this.div_detail_current=e}};BX.CDebugDialog.prototype.SetContent=function(t){if(!t)return;var e=t.split("#DIVIDER#");if(e.length>1){this.PARAMS.content=e[1];this.PARTS.CONTENT_DATA.style.overflow="hidden";BX.CDebugDialog.superclass.SetContent.apply(this,[e[1]]);this.PARTS.CONTENT_INNER=this.PARTS.CONTENT_DATA.firstChild.nextSibling;this.PARTS.CONTENT_TOP=this.PARTS.CONTENT_DATA.insertBefore(BX.create("DIV",{props:{className:"bx-debug-content-top"},html:e[0]}),this.PARTS.CONTENT_INNER);this.PARTS.CONTENT_INNER.style.overflow="auto"}else{BX.CDebugDialog.superclass.SetContent.apply(this,arguments)}};BX.CDebugDialog.prototype.__adjustSize=function(){BX.CDebugDialog.superclass.__adjustSize.apply(this,arguments);if(this.PARTS.CONTENT_TOP){var t=this.PARTS.CONTENT_DATA.offsetHeight-this.PARTS.HEAD.offsetHeight-this.PARTS.CONTENT_TOP.offsetHeight-38;if(t>0){this.PARTS.CONTENT_INNER.style.height=t+"px"}}};BX.CEditorDialog=function(t){BX.CEditorDialog.superclass.constructor.apply(this,arguments);BX.removeClass(this.PARTS.CONTENT,"bx-core-adm-dialog-content-wrap");BX.removeClass(this.PARTS.CONTENT_DATA,"bx-core-adm-dialog-content");BX.removeClass(this.PARTS.CONTENT_DATA.lastChild,"bx-core-adm-dialog-content-wrap-inner");BX.removeClass(this.PARTS.BUTTONS_CONTAINER,"bx-core-adm-dialog-buttons");BX.addClass(this.PARTS.CONTENT,"bx-core-editor-dialog-content-wrap");BX.addClass(this.PARTS.CONTENT_DATA,"bx-core-editor-dialog-content");BX.addClass(this.PARTS.BUTTONS_CONTAINER,"bx-core-editor-dialog-buttons")};BX.extend(BX.CEditorDialog,BX.CDialog);BX.CEditorDialog.prototype.SetContent=function(){BX.CEditorDialog.superclass.SetContent.apply(this,arguments);BX.removeClass(this.PARTS.CONTENT_DATA.lastChild,"bx-core-adm-dialog-content-wrap-inner")};BX.CWizardDialog=function(t){BX.CWizardDialog.superclass.constructor.apply(this,arguments);BX.removeClass(this.PARTS.CONTENT,"bx-core-adm-dialog-content-wrap");BX.removeClass(this.PARTS.CONTENT_DATA,"bx-core-adm-dialog-content");BX.removeClass(this.PARTS.CONTENT_DATA.lastChild,"bx-core-adm-dialog-content-wrap-inner");BX.removeClass(this.PARTS.BUTTONS_CONTAINER,"bx-core-adm-dialog-buttons");BX.addClass(this.PARTS.CONTENT,"bx-core-wizard-dialog-content-wrap")};BX.extend(BX.CWizardDialog,BX.CDialog);BX.CAuthDialog=function(t){t.resizable=false;t.width=350;
866t.height=200;t.buttons=[this.btnSave];BX.CAuthDialog.superclass.constructor.apply(this,arguments);this._sender="core_window_cauthdialog";BX.addClass(this.DIV,"bx-core-auth-dialog");BX.AUTHAGENT=this};BX.extend(BX.CAuthDialog,BX.CDialog);BX.CAuthDialog.prototype.btnSave=BX.CAuthDialog.btnSave={title:BX.message("JS_CORE_WINDOW_AUTH"),id:"savebtn",name:"savebtn",className:"adm-btn-save",action:function(){this.disableUntilError();this.parentWindow.Submit("",this.parentWindow.PARAMS.content_url)}};BX.CAuthDialog.prototype.SetError=function(t){BX.closeWait();if(!!t)this.ShowError(t.MESSAGE||t)};BX.CAuthDialog.prototype.setAuthResult=function(t){BX.closeWait();if(t===false){this.Close();if(this.PARAMS.callback)this.PARAMS.callback()}else{this.SetError(t)}};BX.CWindowFloat=function(t){BX.CWindowFloat.superclass.constructor.apply(this,[t,"float"]);this.SETTINGS.resizable=false};BX.extend(BX.CWindowFloat,BX.CWindow);BX.CWindowFloat.prototype.adjustPos=function(){if(this.PARAMS.parent)this.adjustToNode();else if(this.PARAMS.x&&this.PARAMS.y)this.adjustToPos([this.PARAMS.x,this.PARAMS.y])};BX.CWindowFloat.prototype.adjustToPos=function(t){this.DIV.style.left=parseInt(t[0])+"px";this.DIV.style.top=parseInt(t[1])+"px"};BX.CWindowFloat.prototype.adjustToNodeGetPos=function(){return BX.pos(this.PARAMS.parent)};BX.CWindowFloat.prototype.adjustToNode=function(t){t=t||this.PARAMS.parent;this.PARAMS.parent=BX(t);if(this.PARAMS.parent){var e=this.adjustToNodeGetPos();this.DIV.style.top=e.top+"px";this.DIV.style.left=e.left+"px";this.PARAMS.parent.OPENER=this}};BX.CWindowFloat.prototype.Show=function(){this.adjustToPos([-1e3,-1e3]);BX.CWindowFloat.superclass.Show.apply(this,arguments);this.adjustPos()};BX.COpener=function(t){this.PARAMS=t||{};this.MENU=t.MENU||[];this.DIV=t.DIV;this.ATTACH=t.ATTACH||t.DIV;this.ATTACH_MODE=t.ATTACH_MODE||"bottom";this.ACTIVE_CLASS=t.ACTIVE_CLASS||"";this.PUBLIC_FRAME=t.PUBLIC_FRAME||0;this.LEVEL=t.LEVEL||0;this.CLOSE_ON_CLICK=typeof t.CLOSE_ON_CLICK!="undefined"?!!t.CLOSE_ON_CLICK:true;this.ADJUST_ON_CLICK=typeof t.ADJUST_ON_CLICK!="undefined"?!!t.ADJUST_ON_CLICK:true;this.TYPE=this.PARAMS.TYPE=="hover"?"hover":"click";this._openTimeout=null;if(this.PARAMS.TYPE=="hover"&&t.TIMEOUT!==0)this.TIMEOUT=t.TIMEOUT||1e3;else this.TIMEOUT=0;this.bMenuInit=false;if(!!this.PARAMS.MENU_URL){this.bMenuLoaded=false;this.bMenuLoading=false;this.MENU=[{TEXT:BX.message("JS_CORE_LOADING"),CLOSE_ON_CLICK:false}];if(this.PARAMS.MENU_PRELOAD){BX.defer(this.Load,this)()}}BX.ready(BX.defer(this.Init,this))};BX.COpener.prototype.Init=function(){this.DIV=BX(this.DIV);switch(this.TYPE){case"hover":BX.bind(this.DIV,"mouseover",BX.proxy(this.Open,this));BX.bind(this.DIV,"click",BX.proxy(this.Toggle,this));break;case"click":BX.bind(this.DIV,"click",BX.proxy(this.Toggle,this));break}};BX.COpener.prototype.Load=function(){if(this.PARAMS.MENU_URL&&!this.bMenuLoaded){if(!this.bMenuLoading){var t=this.PARAMS.MENU_URL;if(t.indexOf("sessid=")<=0)t+=(t.indexOf("?")>0?"&":"?")+"sessid="+BX.bitrix_sessid();this.bMenuLoading=true;BX.ajax.loadJSON(t,BX.proxy(this.SetMenu,this),BX.proxy(this.LoadFailed,this))}}};BX.COpener.prototype.SetMenu=function(t){this.bMenuLoaded=true;this.bMenuLoading=false;if(this.bMenuInit){this.MENU.setItems(t)}else{this.MENU=t}};BX.COpener.prototype.LoadFailed=function(t,e){this.bMenuLoading=false;this.SetMenu([{TEXT:BX.message("JS_CORE_NO_DATA"),CLOSE_ON_CLICK:true}]);BX.debug(arguments)};BX.COpener.prototype.checkAdminMenu=function(){if(document.documentElement.id=="bx-admin-prefix")return true;return!!BX.findParent(this.DIV,{property:{id:"bx-admin-prefix"}})};BX.COpener.prototype.Toggle=function(t){this.__clear_timeout();if(!this.bMenuInit||!this.MENU.visible()){var e=this.TIMEOUT;this.TIMEOUT=0;this.Open(t);this.TIMEOUT=e}else{this.MENU.Close()}return!!(t||window.event)&&BX.PreventDefault(t)};BX.COpener.prototype.GetMenu=function(){if(!this.bMenuInit){if(BX.type.isArray(this.MENU)){this.MENU=new BX.CMenu({ITEMS:this.MENU,ATTACH_MODE:this.ATTACH_MODE,SET_ID:this.checkAdminMenu()?"bx-admin-prefix":"",CLOSE_ON_CLICK:!!this.CLOSE_ON_CLICK,ADJUST_ON_CLICK:!!this.ADJUST_ON_CLICK,PUBLIC_FRAME:!!this.PUBLIC_FRAME,LEVEL:this.LEVEL,parent:BX(this.DIV),parent_attach:BX(this.ATTA
866CH)});if(this.LEVEL>0){BX.bind(this.MENU.DIV,"mouseover",BX.proxy(this._on_menu_hover,this));BX.bind(this.MENU.DIV,"mouseout",BX.proxy(this._on_menu_hout,this))}}BX.addCustomEvent(this.MENU,"onMenuOpen",BX.proxy(this.handler_onopen,this));BX.addCustomEvent(this.MENU,"onMenuClose",BX.proxy(this.handler_onclose,this));BX.addCustomEvent("onMenuItemHover",BX.proxy(this.handler_onover,this));this.bMenuInit=true}return this.MENU};BX.COpener.prototype.Open=function(){this.GetMenu();this.bOpen=true;this.__clear_timeout();if(this.TIMEOUT>0){BX.bind(this.DIV,"mouseout",BX.proxy(this.__clear_timeout,this));this._openTimeout=setTimeout(BX.proxy(this.__open,this),this.TIMEOUT)}else{this.__open()}if(!!this.PARAMS.MENU_URL&&!this.bMenuLoaded){this._loadTimeout=setTimeout(BX.proxy(this.Load,this),parseInt(this.TIMEOUT/2))}return true};BX.COpener.prototype.__clear_timeout=function(){if(!!this._openTimeout)clearTimeout(this._openTimeout);if(!!this._loadTimeout)clearTimeout(this._loadTimeout);BX.unbind(this.DIV,"mouseout",BX.proxy(this.__clear_timeout,this))};BX.COpener.prototype._on_menu_hover=function(){this.bMenuHover=true;this.__clear_timeout();if(this.ACTIVE_CLASS)BX.addClass(this.DIV,this.ACTIVE_CLASS)};BX.COpener.prototype._on_menu_hout=function(){this.bMenuHover=false};BX.COpener.prototype.handler_onover=function(t,e){if(this.bMenuHover)return;if(e!=this&&t==this.LEVEL-1&&this.ACTIVE_CLASS){BX.removeClass(this.DIV,this.ACTIVE_CLASS)}if(this.bMenuInit&&t<=this.LEVEL-1&&this.MENU.visible()){if(e!=this){this.__clear_timeout();this._openTimeout=setTimeout(BX.proxy(this.Close,this),this.TIMEOUT)}}};BX.COpener.prototype.handler_onopen=function(){this.bOpen=true;if(this.ACTIVE_CLASS)BX.addClass(this.DIV,this.ACTIVE_CLASS);BX.defer((function(){BX.onCustomEvent(this,"onOpenerMenuOpen")}),this)()};BX.COpener.prototype.handler_onclose=function(){this.bOpen=false;BX.onCustomEvent(this,"onOpenerMenuClose");if(this.ACTIVE_CLASS)BX.removeClass(this.DIV,this.ACTIVE_CLASS)};BX.COpener.prototype.Close=function(){if(!this.bMenuInit)return;if(!!this._openTimeout)clearTimeout(this._openTimeout);this.bOpen=false;this.__close()};BX.COpener.prototype.__open=function(){this.__clear_timeout();if(this.bMenuInit&&this.bOpen&&!this.MENU.visible())this.MENU.Show()};BX.COpener.prototype.__close=function(){if(this.bMenuInit&&!this.bOpen&&this.MENU.visible())this.MENU.Hide()};BX.COpener.prototype.__close_immediately=function(){this.bOpen=false;this.__close()};BX.COpener.prototype.isMenuVisible=function(){return null!=this.MENU.visible&&this.MENU.visible()};BX.CMenu=function(t){BX.CMenu.superclass.constructor.apply(this);this.DIV.style.width="auto";this.DIV.style.height="auto";this.PARAMS=t||{};this.PARTS={};this.PARAMS.ATTACH_MODE=this.PARAMS.ATTACH_MODE||"bottom";this.PARAMS.CLOSE_ON_CLICK=typeof this.PARAMS.CLOSE_ON_CLICK=="undefined"?true:this.PARAMS.CLOSE_ON_CLICK;this.PARAMS.ADJUST_ON_CLICK=typeof this.PARAMS.ADJUST_ON_CLICK=="undefined"?true:this.PARAMS.ADJUST_ON_CLICK;this.PARAMS.PUBLIC_FRAME=typeof this.PARAMS.PUBLIC_FRAME=="undefined"?false:this.PARAMS.PUBLIC_FRAME;this.PARAMS.LEVEL=this.PARAMS.LEVEL||0;this.DIV.className="bx-core-popup-menu bx-core-popup-menu-"+this.PARAMS.ATTACH_MODE+" bx-core-popup-menu-level"+this.PARAMS.LEVEL+(typeof this.PARAMS.ADDITIONAL_CLASS!="undefined"?" "+this.PARAMS.ADDITIONAL_CLASS:"");if(!!this.PARAMS.SET_ID)this.DIV.id=this.PARAMS.SET_ID;if(this.PARAMS.LEVEL==0){this.ARROW=this.DIV.appendChild(BX.create("SPAN",{props:{className:"bx-core-popup-menu-angle"},style:{left:"15px"}}))}if(!!this.PARAMS.CLASS_NAME)this.DIV.className+=" "+this.PARAMS.CLASS_NAME;BX.bind(this.DIV,"click",BX.eventCancelBubble);this.ITEMS=[];this.setItems(this.PARAMS.ITEMS);BX.addCustomEvent("onMenuOpen",BX.proxy(this._onMenuOpen,this));BX.addCustomEvent("onMenuItemSelected",BX.proxy(this.Hide,this))};BX.extend(BX.CMenu,BX.CWindowFloat);BX.CMenu.broadcastCloseEvent=function(){BX.onCustomEvent("onMenuItemSelected")};BX.CMenu._toggleChecked=function(){BX.toggleClass(this,"bx-core-popup-menu-item-checked")};BX.CMenu._itemDblClick=function(){window.location.href=this.href};BX.CMenu.prototype.toggleArrow=function(t){if(!!this.ARROW){if(typeof t=="undefined"){t=this.ARROW.style.visibility=="hidden"}this.ARROW.style.visibility=!!t?"visible":"hidden"}};BX.CMenu.prototype.visible=function(){return this.DIV.style.display!=="none"};BX.CMenu.prototype._onMenuOpen=function(t,e){if(this.visible()){if(e==this.PARAMS.LEVEL&&t!=this){this.Hide()}}};
866BX.CMenu.prototype.onUnRegister=function(){if(!this.visible())return;this.Hide()};BX.CMenu.prototype.setItems=function(t){this.PARAMS.ITEMS=t;BX.cleanNode(this.DIV);if(!!this.ARROW)this.DIV.appendChild(this.ARROW);if(this.PARAMS.ITEMS){this.PARAMS.ITEMS=BX.util.array_values(this.PARAMS.ITEMS);var e=false;var i=0;for(var s=0,o=this.PARAMS.ITEMS.length;s<o;s++){if((s==0||s==o-1)&&this.PARAMS.ITEMS[s].SEPARATOR)continue;i++;if(!e)e=!!this.PARAMS.ITEMS[s].GLOBAL_ICON;this.addItem(this.PARAMS.ITEMS[s],s)}if(i===1)BX.addClass(this.DIV,"bx-core-popup-menu-single-item");else BX.removeClass(this.DIV,"bx-core-popup-menu-single-item");if(!e)BX.addClass(this.DIV,"bx-core-popup-menu-no-icons");else BX.removeClass(this.DIV,"bx-core-popup-menu-no-icons")}};BX.CMenu.prototype.addItem=function(t){this.ITEMS.push(t);if(t.SEPARATOR){t.NODE=BX.create("DIV",{props:{className:"bx-core-popup-menu-separator"}})}else{var e=!!t.MENU&&(BX.type.isArray(t.MENU)&&t.MENU.length>0||t.MENU instanceof BX.CMenu)||!!t.MENU_URL;if(t.DISABLED){t.CLOSE_ON_CLICK=false;t.LINK=null;t.ONCLICK=null;t.ACTION=null}var i={};if(!!t.LINK||BX.browser.IsIE()&&!BX.browser.IsDoctype()){i.href=t.LINK||"javascript:void(0)"}if(this.PARAMS.PUBLIC_FRAME){i.target="_top"}t.NODE=BX.create(!!t.LINK||BX.browser.IsIE()&&!BX.browser.IsDoctype()?"A":"SPAN",{props:{className:"bx-core-popup-menu-item"+(e?" bx-core-popup-menu-item-opener":"")+(!!t.DEFAULT?" bx-core-popup-menu-item-default":"")+(!!t.DISABLED?" bx-core-popup-menu-item-disabled":"")+(!!t.CHECKED?" bx-core-popup-menu-item-checked":""),title:!!BX.message["MENU_ENABLE_TOOLTIP"]||!!t.SHOW_TITLE?t.TITLE||"":"",BXMENULEVEL:this.PARAMS.LEVEL},attrs:i,events:{mouseover:function(){BX.onCustomEvent("onMenuItemHover",[this.BXMENULEVEL,this.OPENER])}},html:'<span class="bx-core-popup-menu-item-icon'+(t.GLOBAL_ICON?" "+t.GLOBAL_ICON:"")+'"></span><span class="bx-core-popup-menu-item-text">'+(t.HTML||(t.TEXT?BX.util.htmlspecialchars(t.TEXT):""))+"</span>"});if(e&&!t.DISABLED){t.NODE.OPENER=new BX.COpener({DIV:t.NODE,ACTIVE_CLASS:"bx-core-popup-menu-item-opened",TYPE:"hover",MENU:t.MENU,MENU_URL:t.MENU_URL,MENU_PRELOAD:!!t.MENU_PRELOAD,LEVEL:this.PARAMS.LEVEL+1,ATTACH_MODE:"right",TIMEOUT:500})}else if(this.PARAMS.CLOSE_ON_CLICK&&(typeof t.CLOSE_ON_CLICK=="undefined"||!!t.CLOSE_ON_CLICK)){BX.bind(t.NODE,"click",BX.CMenu.broadcastCloseEvent)}else if(this.PARAMS.ADJUST_ON_CLICK&&(typeof t.ADJUST_ON_CLICK=="undefined"||!!t.ADJUST_ON_CLICK)){BX.bind(t.NODE,"click",BX.defer(this.adjustPos,this))}if(e&&!!t.LINK){BX.bind(t.NODE,"dblclick",BX.CMenu._itemDblClick)}if(typeof t.CHECKED!="undefined"){BX.bind(t.NODE,"click",BX.CMenu._toggleChecked)}t.ONCLICK=t.ACTION||t.ONCLICK;if(!!t.ONCLICK){if(BX.type.isString(t.ONCLICK)){t.ONCLICK=new Function("event",t.ONCLICK)}BX.bind(t.NODE,"click",t.ONCLICK)}}this.DIV.appendChild(t.NODE)};BX.CMenu.prototype._documentClickBind=function(){this._documentClickUnBind();BX.bind(document,"click",BX.proxy(this._documentClick,this))};BX.CMenu.prototype._documentClickUnBind=function(){BX.unbind(document,"click",BX.proxy(this._documentClick,this))};BX.CMenu.prototype._documentClick=function(t){t=t||window.event;if(!!t&&!(BX.getEventButton(t)&BX.MSLEFT))return;this.Close()};BX.CMenu.prototype.Show=function(){BX.onCustomEvent(this,"onMenuOpen",[this,this.PARAMS.LEVEL]);BX.CMenu.superclass.Show.apply(this,[]);this.bCloseEventFired=false;BX.addCustomEvent(this.PARAMS.parent_attach,"onChangeNodePosition",BX.proxy(this.adjustToNode,this));BX.defer(this._documentClickBind,this)()};BX.CMenu.prototype.Close=BX.CMenu.prototype.Hide=function(){if(!this.visible())return;BX.removeCustomEvent(this.PARAMS.parent_attach,"onChangeNodePosition",BX.proxy(this.adjustToNode,this));this._documentClickUnBind();if(!this.bCloseEventFired){BX.onCustomEvent(this,"onMenuClose",[this,this.PARAMS.LEVEL]);this.bCloseEventFired=true}BX.CMenu.superclass.Hide.apply(this,arguments)};BX.CMenu.prototype.__adjustMenuToNode=function(){var t=BX.pos(this.PARAMS.parent_attach),e=!!BX.findParent(this.PARAMS.parent_attach,BX.is_fixed);if(e)this.DIV.style.position="fixed";else this.DIV.style.position="absolute";if(!t.top){this.DIV.style.top="-1000px";this.DIV.style.left="-1000px"}if(this.bTimeoutSet)return;var i=this.DIV.offsetWidth,s=this.DIV.offsetHeight;if(!i){setTimeout(BX.delegate((function(){this.bTimeoutSet=false;this.__adjustMenuToNode()}),this),100);this.bTimeoutSet=true;return}var o={},n=BX.GetWindowSize();switch(this.PARAMS.ATTACH_MODE){case"bottom":o.top=t.bottom+9;
866o.left=t.left;var r=0;if(!!this.ARROW){if(t.width>i)r=parseInt(i/2-7);else r=parseInt(Math.min(i,t.width)/2-7);if(r<7){o.left-=15;r+=15}}if(o.left>n.scrollWidth-i-10){var h=o.left;o.left=n.scrollWidth-i-10;if(!!this.ARROW)r+=h-o.left}if(e){o.left-=n.scrollLeft}if(!!this.ARROW)this.ARROW.style.left=r+"px";break;case"right":o.top=t.top-1;o.left=t.right;if(o.left>n.scrollWidth-i-10){o.left=t.left-i-1}break}if(e){o.top-=n.scrollTop}if(!!this.ARROW)this.ARROW.className="bx-core-popup-menu-angle";if(o.top+s>n.scrollTop+n.innerHeight||o.top+s>n.scrollHeight){var a=this.PARAMS.ATTACH_MODE=="bottom"?t.top-s-9:t.bottom-s+1;if(a>n.scrollTop||o.top+s>n.scrollHeight){if(o.top+s>n.scrollHeight){o.top=Math.max(0,n.scrollHeight-s);this.toggleArrow(false)}else{o.top=a;if(!!this.ARROW)this.ARROW.className="bx-core-popup-menu-angle-bottom"}}}if(o.top+o.left==0){this.Hide()}else{this.DIV.style.top=o.top+"px";this.DIV.style.left=o.left+"px"}};BX.CMenu.prototype.adjustToNode=function(t){this.PARAMS.parent_attach=BX(t)||this.PARAMS.parent_attach||this.PARAMS.parent;this.__adjustMenuToNode()};BX.CMenuOpener=function(t){BX.CMenuOpener.superclass.constructor.apply(this);this.PARAMS=t||{};this.setParent(this.PARAMS.parent);this.PARTS={};this.SETTINGS.drag_restrict=true;this.defaultAction=null;this.timeout=500;this.DIV.className="bx-component-opener";this.DIV.ondblclick=BX.PreventDefault;if(this.PARAMS.component_id){this.PARAMS.transform=!!this.PARAMS.transform}this.OPENERS=[];this.DIV.appendChild(BX.create("SPAN",{props:{className:"bx-context-toolbar"+(this.PARAMS.transform?" bx-context-toolbar-vertical-mode":"")}}));this.PARTS.INNER=this.DIV.firstChild.appendChild(BX.create("SPAN",{props:{className:"bx-context-toolbar-inner"},html:'<span class="bx-context-toolbar-drag-icon"></span><span class="bx-context-toolbar-vertical-line"></span><br>'}));this.EXTRA_BUTTONS={};var e=0;for(var i=0,s=this.PARAMS.menu.length;i<s;i++){var o=this.addItem(this.PARAMS.menu[i]);if(null!=o){e++;this.PARTS.INNER.appendChild(o);this.PARTS.INNER.appendChild(BX.create("BR"))}}var n=e>0;this.PARTS.ICONS=this.PARTS.INNER.appendChild(BX.create("SPAN",{props:{className:"bx-context-toolbar-icons"}}));if(this.PARAMS.component_id){this.PARAMS.pin=!!this.PARAMS.pin;if(n)this.PARTS.ICONS.appendChild(BX.create("SPAN",{props:{className:"bx-context-toolbar-separator"}}));this.PARTS.ICON_PIN=this.PARTS.ICONS.appendChild(BX.create("A",{attrs:{href:"javascript:void(0)"},props:{className:this.PARAMS.pin?"bx-context-toolbar-pin-fixed":"bx-context-toolbar-pin"},events:{click:BX.delegate(this.__pin_btn_clicked,this)}}))}if(this.EXTRA_BUTTONS["components2_props"]){var r=this.EXTRA_BUTTONS["components2_props"]||{URL:"javascript:void(0)"};if(null==this.defaultAction){this.defaultAction=r.ONCLICK;this.defaultActionTitle=r.TITLE||r.TEXT}r.URL="javascript:"+BX.util.urlencode(r.ONCLICK);this.ATTACH=this.PARTS.ICONS.appendChild(BX.create("SPAN",{props:{className:"bx-context-toolbar-button bx-context-toolbar-button-settings"},children:[BX.create("SPAN",{props:{className:"bx-context-toolbar-button-inner"},children:[BX.create("A",{attrs:{href:r.URL},events:{mouseover:BX.proxy(this.__msover_text,this),mouseout:BX.proxy(this.__msout_text,this),mousedown:BX.proxy(this.__msdown_text,this)},html:'<span class="bx-context-toolbar-button-icon bx-context-toolbar-settings-icon"></span>'}),BX.create("A",{attrs:{href:"javascript: void(0)"},props:{className:"bx-context-toolbar-button-arrow"},events:{mouseover:BX.proxy(this.__msover_arrow,this),mouseout:BX.proxy(this.__msout_arrow,this),mousedown:BX.proxy(this.__msdown_arrow,this)},html:'<span class="bx-context-toolbar-button-arrow"></span>'})]})]}));this.OPENER=this.ATTACH.firstChild.lastChild;var h=this.attachMenu(this.EXTRA_BUTTONS["components2_submenu"]["MENU"]);BX.addCustomEvent(h,"onOpenerMenuOpen",BX.proxy(this.__menu_open,this));BX.addCustomEvent(h,"onOpenerMenuClose",BX.proxy(this.__menu_close,this))}if(e>1){this.PARTS.ICONS.appendChild(BX.create("span",{props:{className:"bx-context-toolbar-separator bx-context-toolbar-separator-switcher"}}));this.ICON_TRANSFORM=this.PARTS.ICONS.appendChild(BX.create("A",{attrs:{href:"javascript: void(0)"},props:{className:"bx-context-toolbar-switcher"},events:{click:BX.delegate(this.__trf_btn_clicked,this)}}))}if(this.PARAMS.HINT){this.DIV.BXHINT=this.HINT=new BX.CHint({parent:this.DIV,hint:this.PARAMS.HINT.TEXT||"",title:this.PARAMS.HINT.TIT
866LE||"",hide_timeout:this.timeout/2,preventHide:false})}BX.addCustomEvent(this,"onWindowDragFinished",BX.delegate(this.__onMoveFinished,this));BX.addCustomEvent("onDynamicModeChange",BX.delegate(this.__onDynamicModeChange,this));BX.addCustomEvent("onTopPanelCollapse",BX.delegate(this.__onPanelCollapse,this));BX.addCustomEvent("onMenuOpenerMoved",BX.delegate(this.checkPosition,this));BX.addCustomEvent("onMenuOpenerUnhide",BX.delegate(this.checkPosition,this));BX.Event.EventEmitter.incrementMaxListeners("onDynamicModeChange");BX.Event.EventEmitter.incrementMaxListeners("onTopPanelCollapse");BX.Event.EventEmitter.incrementMaxListeners("onMenuOpenerMoved");BX.Event.EventEmitter.incrementMaxListeners("onMenuOpenerUnhide");if(this.OPENERS){for(i=0,s=this.OPENERS.length;i<s;i++){BX.addCustomEvent(this.OPENERS[i],"onOpenerMenuOpen",BX.proxy(this.__hide_hint,this))}}};BX.extend(BX.CMenuOpener,BX.CWindowFloat);BX.CMenuOpener.prototype.setParent=function(t){t=BX(t);if(!t){return}if(t.OPENER&&t.OPENER!=this){t.OPENER.Close();t.OPENER.clearHoverHoutEvents()}if(this.PARAMS.parent&&this.PARAMS.parent!=t){this.clearHoverHoutEvents();this.PARAMS.parent.OPENER=null}this.PARAMS.parent=t;this.PARAMS.parent.OPENER=this};BX.CMenuOpener.prototype.setHoverHoutEvents=function(t,e){if(!this.__opener_events_set){BX.bind(this.Get(),"mouseover",t);BX.bind(this.Get(),"mouseout",e);this.__opener_events_set=true}};BX.CMenuOpener.prototype.clearHoverHoutEvents=function(){if(this.Get()){BX.unbindAll(this.Get());this.__opener_events_set=false}};BX.CMenuOpener.prototype.unclosable=true;BX.CMenuOpener.prototype.__check_intersection=function(t,e){return!(e.right<=t.left||e.left>=t.right||e.bottom<=t.top||e.top>=t.bottom)};BX.CMenuOpener.prototype.__msover_text=function(){this.bx_hover=true;if(!this._menu_open)BX.addClass(this.ATTACH,"bx-context-toolbar-button-text-hover")};BX.CMenuOpener.prototype.__msout_text=function(){this.bx_hover=false;if(!this._menu_open)BX.removeClass(this.ATTACH,"bx-context-toolbar-button-text-hover bx-context-toolbar-button-text-active")};BX.CMenuOpener.prototype.__msover_arrow=function(){this.bx_hover=true;if(!this._menu_open)BX.addClass(this.ATTACH,"bx-context-toolbar-button-arrow-hover")};BX.CMenuOpener.prototype.__msout_arrow=function(){this.bx_hover=false;if(!this._menu_open)BX.removeClass(this.ATTACH,"bx-context-toolbar-button-arrow-hover bx-context-toolbar-button-arrow-active")};BX.CMenuOpener.prototype.__msdown_text=function(){this.bx_active=true;if(!this._menu_open)BX.addClass(this.ATTACH,"bx-context-toolbar-button-text-active")};BX.CMenuOpener.prototype.__msdown_arrow=function(){this.bx_active=true;if(!this._menu_open)BX.addClass(this.ATTACH,"bx-context-toolbar-button-arrow-active")};BX.CMenuOpener.prototype.__menu_close=function(){this._menu_open=false;this.bx_active=false;BX.removeClass(this.ATTACH,"bx-context-toolbar-button-active bx-context-toolbar-button-text-active bx-context-toolbar-button-arrow-active");if(!this.bx_hover){BX.removeClass(this.ATTACH,"bx-context-toolbar-button-hover bx-context-toolbar-button-text-hover bx-context-toolbar-button-arrow-hover");this.bx_hover=false}};BX.CMenuOpener.prototype.__menu_open=function(){this._menu_open=true};BX.CMenuOpener.prototype.checkPosition=function(){if(this.isMenuVisible()||this.DIV.style.display=="none"||this==BX.proxy_context||BX.proxy_context.zIndex>this.zIndex)return;this.correctPosition(BX.proxy_context)};BX.CMenuOpener.prototype.correctPosition=function(t){var e=BX.pos(this.DIV),i=BX.pos(t.Get());if(this.__check_intersection(e,i)){var s=i.top-e.height;if(s<0)s=i.bottom;this.DIV.style.top=s+"px";BX.addCustomEvent(t,"onMenuOpenerHide",BX.proxy(this.restorePosition,this));BX.onCustomEvent(this,"onMenuOpenerMoved")}};BX.CMenuOpener.prototype.restorePosition=function(){if(!this.MOUSEOVER&&!this.isMenuVisible()){if(this.originalPos)this.DIV.style.top=this.originalPos.top+"px";BX.removeCustomEvent(BX.proxy_context,"onMenuOpenerHide",BX.proxy(this.restorePosition,this));if(this.restore_pos_timeout)clearTimeout(this.restore_pos_timeout)}else{this.restore_pos_timeout=setTimeout(BX.proxy(this.restorePosition,this),this.timeout)}};BX.CMenuOpener.prototype.Show=function(){BX.CMenuOpener.superclass.Show.apply(this,arguments);this.SetDraggable(this.PARTS.INNER.firstChild);this.DIV.style.width="auto";this.DIV.style.height="auto";if(!this.PARAMS.pin){this.DIV.style.left="-1000px";this.DIV.style.top="-1000px";this.Hide()}else{this.bPosAdjusted=true;this.bMoved=true;if(this.PARAMS.top)this.DIV.style.top=this.PARAMS.top+"px";if(this.PARAMS.left)this.DIV.style.left=this.PARAMS.left+"px";this.DIV.style.display=!BX.admin.dynamic_mode||BX.admin.dynamic_mode_show_borders?"block":"none";if(this.DIV.style.display=="block"){setTimeout(BX.delegate((function(){BX.onCustomEvent(this,"onMenuOpenerUnhide")}),this),50)}}};BX.CMenuOpener.prototype.executeDefaultAction=function(){if(this.defaultAction){if(BX.type.isFunction(this.defaultAction))this.defaultAction();else if(BX.type.isString(this.defaultAction))BX.evalGlobal(this.defaultAction)}};BX.CMenuOpener.prototype.__onDynamicModeChange=function(t){this.DIV.style.display=t?"block":"none"};BX.CMenuOpener.prototype.__onPanelCollapse=function(t,e){this.DIV.style.top=parseInt(this.DIV.style.top)+e+"px";if(this.PARAMS.pin){this.__savePosition()}};BX.CMenuOpener.prototype.__onMoveFinished=function(){BX.onCustomEvent(this,"onMenuOpenerMoved");this.bMoved=true;if(this.PARAMS.pin)this.__savePosition()};BX.CMenuOpener.prototype.__savePosition=function(){var t={};t.pin=this.PARAMS.pin;if(!this.PARAMS.pin){t.top=false;t.left=false;t.transform=false}else{t.transform=this.PARAMS.transform;if(this.bMoved){t.left=parseInt(this.DIV.style.left);t.top=parseInt(this.DIV.style.top)}}BX.WindowManager.saveWindowOptions(this.PARAMS.component_id,t)};BX.CMenuOpener.prototype.__pin_btn_clicked=function(){this.Pin()};BX.CMenuOpener.prototype.Pin=function(t){if(null==t)this.PARAMS.pin=!this.PARAMS.pin;else this.PARAMS.pin=!!t;this.PARTS.ICON_PIN.className=this.PARAMS.pin?"bx-context-toolbar-pin-fixed":"bx-context-toolbar-pin";this.__savePosition()};BX.CMenuOpener.prototype.__trf_btn_clicked=function(){this.Transform()};BX.CMenuOpener.prototype.Transform=function(t){var e={};if(null==t)this.PARAMS.transform=!this.PARAMS.transform;else this.PARAMS.transform=!!t;if(this.bMoved){e=BX.pos(this.DIV)}if(this.PARAMS.transform)BX.addClass(this.DIV.firstChild,"bx-context-toolbar-vertical-mode");else BX.removeClass(this.DIV.firstChild,"bx-context-toolbar-vertical-mode");if(!this.bMoved){this.adjustPos()}else{this.DIV.style.left=e.right-this.DIV.offsetWidth-(BX.browser.IsIE()&&!BX.browser.IsDoctype()?2:0)+"px"}this.__savePosition()};BX.CMenuOpener.prototype.adjustToNodeGetPos=function(){var t=BX.pos(this.PARAMS.parent);var e=BX.GetWindowScrollSize();var i=this.DIV.offsetWidth;t.left-=BX.admin.__border_dx;t.top-=BX.admin.__border_dx;if(true||!this.PARAMS.transform){t.top-=45}if(t.left>e.scrollWidth-i){t.left=e.scrollWidth-i}return t};BX.CMenuOpener.prototype.addItem=function(t){if(t.TYPE){this.EXTRA_BUTTONS[t.TYPE]=t;return null}else{var e=new BX.CMenuOpenerItem(t);if(null==this.defaultAction){if(e.item.ONCLICK){this.defaultAction=t.ONCLICK}else if(e.item.MENU){this.defaultAction=BX.delegate((function(){this.Open()}),e.item.OPENER)}this.defaultActionTitle=t.TITLE||t.TEXT;BX.addClass(e.Get(),"bx-content-toolbar-default")}
866if(e.item.OPENER)this.OPENERS[this.OPENERS.length]=e.item.OPENER;return e.Get()}};BX.CMenuOpener.prototype.attachMenu=function(t){var e=new BX.COpener({DIV:this.OPENER,ATTACH:this.ATTACH,MENU:t,TYPE:"click"});this.OPENERS[this.OPENERS.length]=e;return e};BX.CMenuOpener.prototype.__hide_hint=function(){if(this.HINT)this.HINT.__hide_immediately()};BX.CMenuOpener.prototype.isMenuVisible=function(){for(var t=0,e=this.OPENERS.length;t<e;t++){if(this.OPENERS[t].isMenuVisible())return true}return false};BX.CMenuOpener.prototype.Hide=function(){if(!this.PARAMS.pin){this.DIV.style.display="none";BX.onCustomEvent(this,"onMenuOpenerHide")}};BX.CMenuOpener.prototype.UnHide=function(){this.DIV.style.display="block";if(!this.bPosAdjusted&&!this.PARAMS.pin){this.adjustPos();this.bPosAdjusted=true}if(null==this.originalPos&&!this.bMoved){this.originalPos=BX.pos(this.DIV)}BX.onCustomEvent(this,"onMenuOpenerUnhide")};BX.CMenuOpenerItem=function(t){this.item=t;if(this.item.ACTION&&!this.item.ONCLICK){this.item.ONCLICK=this.item.ACTION}this.DIV=BX.create("SPAN");this.DIV.appendChild(BX.create("SPAN",{props:{className:"bx-context-toolbar-button-underlay"}}));this.WRAPPER=this.DIV.appendChild(BX.create("SPAN",{props:{className:"bx-context-toolbar-button-wrapper"},children:[BX.create("SPAN",{props:{className:"bx-context-toolbar-button",title:t.TITLE},children:[BX.create("SPAN",{props:{className:"bx-context-toolbar-button-inner"}})]})]}));var e=BX.create("SPAN",{props:{className:"bx-context-toolbar-button-icon"+(this.item.ICON||this.item.ICONCLASS?" "+(this.item.ICON||this.item.ICONCLASS):"")},attrs:!(this.item.ICON||this.item.ICONCLASS)&&(this.item.SRC||this.item.IMAGE)?{style:"background: scroll transparent url("+(this.item.SRC||this.item.IMAGE)+") no-repeat center center !important;"}:{}}),i=BX.create("SPAN",{props:{className:"bx-context-toolbar-button-text"},text:this.item.TEXT});if(this.item.ACTION&&!this.item.ONCLICK){this.item.ONCLICK=this.item.ACTION}this.bHasMenu=!!this.item.MENU;this.bHasAction=!!this.item.ONCLICK;if(this.bHasAction){this.LINK=this.WRAPPER.firstChild.firstChild.appendChild(BX.create("A",{attrs:{href:"javascript: void(0)"},events:{mouseover:this.bHasMenu?BX.proxy(this.__msover_text,this):BX.proxy(this.__msover,this),mouseout:this.bHasMenu?BX.proxy(this.__msout_text,this):BX.proxy(this.__msout,this),mousedown:this.bHasMenu?BX.proxy(this.__msdown_text,this):BX.proxy(this.__msdown,this)},children:[e,i]}));if(this.bHasMenu){this.LINK_MENU=this.WRAPPER.firstChild.firstChild.appendChild(BX.create("A",{props:{className:"bx-context-toolbar-button-arrow"},attrs:{href:"javascript: void(0)"},events:{mouseover:BX.proxy(this.__msover_arrow,this),mouseout:BX.proxy(this.__msout_arrow,this),mousedown:BX.proxy(this.__msdown_arrow,this)},children:[BX.create("SPAN",{props:{className:"bx-context-toolbar-button-arrow"}})]}))}}else if(this.bHasMenu){this.item.ONCLICK=null;this.LINK=this.LINK_MENU=this.WRAPPER.firstChild.firstChild.appendChild(BX.create("A",{attrs:{href:"javascript: void(0)"},events:{mouseover:BX.proxy(this.__msover,this),mouseout:BX.proxy(this.__msout,this),mousedown:BX.proxy(this.__msdown,this)},children:[e,i]}));this.LINK.appendChild(BX.create("SPAN",{props:{className:"bx-context-toolbar-single-button-arrow"}}))}if(this.bHasMenu){this.item.SUBMENU=new BX.CMenu({ATTACH_MODE:"bottom",ITEMS:this.item["MENU"],parent:this.LINK_MENU,parent_attach:this.WRAPPER.firstChild});this.item.OPENER=new BX.COpener({DIV:this.LINK_MENU,TYPE:"click",MENU:this.item.SUBMENU});BX.addCustomEvent(this.item.OPENER,"onOpenerMenuOpen",BX.proxy(this.__menu_open,this));BX.addCustomEvent(this.item.OPENER,"onOpenerMenuClose",BX.proxy(this.__menu_close,this))}if(this.bHasAction){BX.bind(this.LINK,"click",BX.delegate(this.__click,this))}};BX.CMenuOpenerItem.prototype.Get=function(){return this.DIV};BX.CMenuOpenerItem.prototype.__msover=function(){this.bx_hover=true;if(!this._menu_open)BX.addClass(this.LINK.parentNode.parentNode,"bx-context-toolbar-button-hover")};BX.CMenuOpenerItem.prototype.__msout=function(){this.bx_hover=false;if(!this._menu_open)BX.removeClass(this.LINK.parentNode.parentNode,"bx-context-toolbar-button-hover bx-context-toolbar-button-active")};BX.CMenuOpenerItem.prototype.__msover_text=function(){this.bx_hover=true;if(!this._menu_open)BX.addClass(this.LINK.parentNode.parentNode,"bx-context-toolbar-button-text-hover")};BX.CMenuOpenerItem.prototype.__msout_text=function(){this.bx_hover=false;if(!this._menu_open)BX.removeClass(this.LINK.parentNode.parentNode,"bx-context-toolbar-button-text-hover bx-context-toolbar-button-text-active")};BX.CMenuOpenerItem.prototype.__msover_arrow=function(){this.bx_hover=true;if(!this._menu_open)BX.addClass(this.LINK.parentNode.parentNode,"bx-context-toolbar-button-arrow-hover")};BX.CMenuOpenerItem.prototype.__msout_arrow=function(){this.bx_hover=false;if(!this._menu_open)BX.removeClass(this.LINK.parentNode.parentNode,"bx-context-toolbar-button-arrow-hover bx-context-toolbar-button-arrow-active")};BX.CMenuOpenerItem.prototype.__msdown=function(){this.bx_active=true;if(!this._menu_open)BX.addClass(this.LINK.parentNode.parentNode,"bx-context-toolbar-button-active")};BX.CMenuOpenerItem.prototype.__msdown_text=function(){this.bx_active=true;if(!this._menu_open)BX.addClass(this.LINK.parentNode.parentNode,"bx-context-toolbar-button-text-active")};BX.CMenuOpenerItem.prototype.__msdown_arrow=function(){this.bx_active=true;if(!this._menu_open)BX.addClass(this.LINK.parentNode.parentNode,"bx-context-toolbar-button-arrow-active")};BX.CMenuOpenerItem.prototype.__menu_close=function(){this._menu_open=false;this.bx_active=false;BX.removeClass(this.LINK.parentNode.parentNode,"bx-context-toolbar-button-active bx-context-toolbar-button-text-active bx-context-toolbar-button-arrow-active");if(!this.bx_hover){BX.removeClass(this.LINK.parentNode.parentNode,"bx-context-toolbar-button-hover bx-context-toolbar-button-text-hover bx-context-toolbar-button-arrow-hover");this.bx_hover=false}};BX.CMenuOpenerItem.prototype.__menu_open=function(){this._menu_open=true};BX.CMenuOpenerItem.prototype.__click=function(){BX.evalGlobal(this.item.ONCLICK)};BX.CPageOpener=function(t){BX.CPageOpener.superclass.constructor.apply(this,arguments);this.timeout=505;window.PAGE_EDIT_CONTROL=this};BX.extend(BX.CPageOpener,BX.CMenuOpener);BX.CPageOpener.prototype.checkPosition=function(){if(this==BX.proxy_context)return;this.correctPosition(BX.proxy_context)};BX.CPageOpener.prototype.correctPosition=function(t){if(this.bPosCorrected)return;var e;if(this.DIV.style.display=="none"){e=this.adjustToNodeGetPos();e.bottom=e.top+30;e.right=e.left+300}else{e=BX.pos(this.DIV)}var i=BX.pos(t.Get());if(this.__check_intersection(e,i)){this.DIV.style.display="none";var s=BX.proxy(this.restorePosition,this);BX.removeCustomEvent(t,"onMenuOpenerHide",s);BX.addCustomEvent(t,"onMenuOpenerHide",s);this.bPosCorrected=true}};BX.CPageOpener.prototype.restorePosition=function(){if(BX.proxy_context&&BX.proxy_context.Get().style.display=="none"){this.bPosCorrected=false;if(this.PARAMS.parent.bx_over||this.PARAMS.pin)this.UnHide();BX.removeCustomEvent("onMenuOpenerHide",BX.proxy(this.restorePosition,this))}};BX.CPageOpener.prototype.UnHide=function(){if(!this.bPosCorrected)BX.CPageOpener.superclass.UnHide.apply(this,arguments)};BX.CPageOpener.prototype.Remove=function(){BX.admin.removeComponentBorder(this.PARAMS.parent);BX.userOptions.save("global","settings","page_edit_control_enable","N");this.DIV.style.display="none"};BX.CHintSimple=function(){BX.CHintSimple.superclass.constructor.apply(this,arguments)};BX.extend(BX.CHintSimple,BX.CHint);BX.CHintSimple.prototype.Init=function(){this.DIV=document.body.appendChild(BX.create("DIV",{props:{className:"bx-tooltip-simple"},style:{display:"none"},children:[this.CONTENT=BX.create("DIV")]}));BX.ZIndexManager.register(this.DIV);if(this.HINT_TITLE)this.CONTENT.appendChild(BX.create("B",{text:this.HINT_TITLE}));if(this.HINT)this.CONTENT_TEXT=this.CONTENT.appendChild(BX.create("DIV")).appendChild(BX.create("SPAN",{html:this.HINT}));if(this.PARAMS.preventHide){BX.bind(this.DIV,"mouseout",BX.proxy(this.Hide,this));BX.bind(this.DIV,"mouseover",BX.proxy(this.Show,this))}this.bInited=true};BX.adminInformer={itemsShow:3,Init:function(t){if(t)BX.adminInformer.itemsShow=t;var e=BX("admin-informer");if(e){document.body.appendChild(e);BX.ZIndexManager.register(e)}BX.addCustomEvent("onTopPanelCollapse",BX.proxy(BX.adminInformer.Close,BX.adminInformer))},Toggle:function(t){var e=BX("admin-informer");if(!e)return false;var i=BX.pos(t);e.style.top=parseInt(i.top)+parseInt(i.height)+7+"px";e.style.left=i.left+"px";if(!BX.hasClass(e,"adm-informer-active"))BX.adminInformer.Show(e);else BX.adminInformer.Hide(e);return false},Close:function(){BX.adminInformer.Hide(BX("admin-informer"))},OnInnerClick:function(t){var e=t.target||t.srcElement;if(e.nodeName.toLowerCase()!="a"||BX.hasClass(e,"adm-informer-footer")){return BX.PreventDefault(t)}return true},ToggleExtra:function(){var t=BX("adm-informer-footer");if(BX.hasClass(t,"adm-informer-footer-collapsed"))this.ShowAll();else this.HideExtra();return false},ShowAll:function(){var t=BX("admin-informer");for(var e=0;e<t.children.length;e++)if(BX.hasClass(t.children[e],"adm-informer-item")&&t.children[e].style.display=="none"){t.children[e].style.display="block"}var i=BX("adm-informer-footer");if(i.textContent!==undefined)i.textContent=BX.message("JSADM_AI_HIDE_EXTRA");else i.innerText=BX.message("JSADM_AI_HIDE_EXTRA");BX.removeClass(i,"adm-informer-footer-collapsed");return false},HideExtra:function(){var t=BX("admin-informer");var e=0;for(var i=BX.adminInformer.itemsShow+1;i<t.children.length;i++){if(BX.hasClass(t.children[i],"adm-informer-item")&&t.children[i].style.display=="block"){t.children[i].style.display="none";e++}}var s=BX("adm-informer-footer");var o=BX.message("JSADM_AI_ALL_NOTIF")+" ("+(BX.adminInformer.itemsShow+parseInt(e))+")";if(s.textContent!==undefined)s.textContent=o;else s.innerText=o;BX.addClass(s,"adm-informer-footer-collapsed");return false},Show:function(t){var e=BX("adm-header-notif-block");if(e)BX.addClass(e,"adm-header-notif-block-active");BX.onCustomEvent(t,"onBeforeAdminInformerShow");setTimeout(BX.proxy((function(){BX.bind(document,"click",BX.proxy(BX.adminInformer.Close,BX.adminInformer))}),BX.adminInformer),0);BX.addClass(t,"adm-informer-active");BX.ZIndexManager.bringToFront(t);setTimeout((function(){BX.addClass(t,"adm-informer-animate")}),0)},Hide:function(t){var e=BX("adm-header-notif-block");if(e)BX.removeClass(e,"adm-header-notif-block-active");BX.unbind(document,"click",BX.proxy(BX.adminInformer.Close,BX.adminInformer));BX.removeClass(t,"adm-informer-animate");if(this.IsAnimationSupported())setTimeout((function(){BX.removeClass(t,"adm-informer-active")}),300);else BX.removeClass(t,"adm-informer-active");BX.onCustomEvent(t,"onAdminInformerHide")},IsAnimationSupported:function(){var t=document.body||document.documentElement;
866if(typeof t.style.transition=="string")return true;else if(typeof t.style.MozTransition=="string")return true;else if(typeof t.style.OTransition=="string")return true;else if(typeof t.style.WebkitTransition=="string")return true;else if(typeof t.style.msTransition=="string")return true;return false},SetItemHtml:function(t,e){var i=BX("adm-informer-item-html-"+t);if(!i)return false;i.innerHTML=e;return true},SetItemFooter:function(t,e){var i=BX("adm-informer-item-footer-"+t);if(!i)return false;i.innerHTML=e;if(e)i.style.display="block";else i.style.display="none";return true}}})(window);
867/* End */
868;
869; /* Start:"a:4:{s:4:"full";s:53:"/bitrix/js/main/date/main.date.min.js?175896992521981";s:6:"source";s:33:"/bitrix/js/main/date/main.date.js";s:3:"min";s:37:"/bitrix/js/main/date/main.date.min.js";s:3:"map";s:37:"/bitrix/js/main/date/main.date.map.js";}"*/
870this.BX=this.BX||{};(function(e,t){"use strict";function r(e){if(!t.Type.isStringFilled(e)){return""}return e.replace("YYYY","Y").replace("MMMM","F").replace("MM","m").replace("M","M").replace("DD","d").replace("G","g").replace(/GG/i,"G").replace("H","h").replace(/HH/i,"H").replace("MI","i").replace("SS","s").replace("TT","A").replace("T","a")}const s=new t.Cache.MemoryCache;function n(e){return s.remember(`main.date.format.${e}`,(()=>{let s=t.Extension.getSettings("main.date").get(`formats.${e}`);if(t.Type.isStringFilled(s)&&(e==="FORMAT_DATE"||e==="FORMAT_DATETIME")){s=r(s)}return s}))}let _=function(){function e(){babelHelpers.classCallCheck(this,e)}babelHelpers.createClass(e,null,[{key:"isAmPmMode",value:function e(t){if(t===true){return this._getMessage("AMPM_MODE")}return this._getMessage("AMPM_MODE")!==false}},{key:"convertToUTC",value:function e(r){if(!t.Type.isDate(r)){return null}return new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()))}},{key:"getNewDate",value:function e(t){return new Date(this.getBrowserTimestamp(t))}},{key:"getBrowserTimestamp",value:function e(t){t=parseInt(t,10);const r=new Date(t*1e3).getTimezoneOffset()*60;return(parseInt(t,10)+parseInt(this._getMessage("SERVER_TZ_OFFSET"))+r)*1e3}},{key:"getServerTimestamp",value:function e(t){t=parseInt(t,10);const r=new Date(t).getTimezoneOffset()*60;return Math.round(t/1e3-(parseInt(this._getMessage("SERVER_TZ_OFFSET"),10)+parseInt(r,10)))}},{key:"formatLastActivityDate",value:function e(t,r,s){const n=this.isAmPmMode(true);const _=n===this.AM_PM_MODE.LOWER?"g:i a":n===this.AM_PM_MODE.UPPER?"g:i A":"H:i";const i=[["tomorrow","#01#"+_],["now","#02#"],["todayFuture","#03#"+_],["yesterday","#04#"+_],["-",this.convertBitrixFormat(this._getMessage("FORMAT_DATETIME")).replace(/:s/g,"")],["s60","sago"],["i60","iago"],["H5","Hago"],["H24","#03#"+_],["d31","dago"],["m12>1","mago"],["m12>0","dago"],["","#05#"]];let a=this.format(i,t,r,s);let o=null;if((o=/^#(\d+)#(.*)/.exec(a))!=null){switch(o[1]){case"01":a=this._getMessage("FD_LAST_SEEN_TOMORROW").replace("#TIME#",o[2]);break;case"02":a=this._getMessage("FD_LAST_SEEN_NOW");break;case"03":a=this._getMessage("FD_LAST_SEEN_TODAY").replace("#TIME#",o[2]);break;case"04":a=this._getMessage("FD_LAST_SEEN_YESTERDAY").replace("#TIME#",o[2]);break;case"05":a=this._getMessage("FD_LAST_SEEN_MORE_YEAR");break;default:a=o[2];break}}return a}},{key:"_getMessage",value:function e(r){return t.Loc.getMessage(r)}},{key:"parse",value:function e(r,s,n,_){if(t.Type.isStringFilled(r)){if(!n){n=this._getMessage("FORMAT_DATE")}if(!_){_=this._getMessage("FORMAT_DATETIME")}let e="";for(let t=1;t<=12;t++){e=e+"|"+this._getMessage("MON_"+t)}const t=new RegExp("([0-9]+|[a-z]+"+e+")","ig");const i=r.match(t);let a=n.match(/(DD|MI|MMMM|MM|M|YYYY)/gi);const o=[];const D=[];const u={};if(!i){return null}if(i.length>a.length){a=_.match(/(DD|MI|MMMM|MM|M|YYYY|HH|H|SS|TT|T|GG|G)/gi)}for(let e=0,t=i.length;e<t;e++){if(i[e].trim()!==""){o[o.length]=i[e]}}for(let e=0,t=a.length;e<t;e++){if(a[e].trim()!==""){D[D.length]=a[e]}}let l=D.findIndex((e=>e==="MMMM"));if(l>0){o[l]=this.getMonthIndex(o[l]);D[l]="MM"}else{l=D.findIndex((e=>e==="M"));if(l>0){o[l]=this.getMonthIndex(o[l]);D[l]="MM"}}for(let e=0,t=D.length;e<t;e++){const t=D[e].toUpperCase();u[t]=t==="T"||t==="TT"?o[e]:parseInt(o[e],10)}if(u["DD"]>0&&u["MM"]>0&&u["YYYY"]>0){const e=new Date;if(s){e.setUTCDate(1);e.setUTCFullYear(u["YYYY"]);e.setUTCMonth(u["MM"]-1);e.setUTCDate(u["DD"]);e.setUTCHours(0,0,0,0)}else{e.setDate(1);e.setFullYear(u["YYYY"]);e.setMonth(u["MM"]-1);e.setDate(u["DD"]);e.setHours(0,0,0,0)}if((!isNaN(u["HH"])||!isNaN(u["GG"])||!isNaN(u["H"])||!isNaN(u["G"]))&&!isNaN(u["MI"])){if(!isNaN(u["H"])||!isNaN(u["G"])){const e=(u["T"]||u["TT"]||"am").toUpperCase()==="PM",t=parseInt(u["H"]||u["G"]||0,10);if(e){u["HH"]=t+(t===12?0:12)}else{u["HH"]=t<12?t:0}}else{u["HH"]=parseInt(u["HH"]||u["GG"]||0,10)}if(isNaN(u["SS"])){u["SS"]=0}if(s){e.setUTCHours(u["HH"],u["MI"],u["SS"])}else{e.setHours(u["HH"],u["MI"],u["SS"])}}return e}}return null}},{key:"getMonthIndex",value:function e(t){const r=t.toUpperCase();const s=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"];const n=["january","february","march","april","may","june","july","august","september","october","november","december"];for(let e=1;e<=12;e++){if(r===this._getMessage("MON_"+e).toUpperCase()||r===this._getMessage("MONTH_"+e).toUpperCase()||r===this._getMessage("MONTH_"+e+"_S").toUpperCase()||r===s[e-1].toUpperCase()||r===n[e-1].toUpperCase()){return e}}return t}},{key:"format",value:function e(r,s,n,_){const i=t.Type.isDate(s)?new Date(s.getTime()):t.Type.isNumber(s)?new Date(s*1e3):new Date;const a=t.Type.isDate(n)?new Date(n.getTime()):t.Type.isNumber(n)?new Date(n*1e3):new Date;const o=!!_;const D=this;if(t.Type.isArray(r)){return f(r,i,a,o)}else{if(!t.Type.isStringFilled(r)){return""}}const u=(r.match(/{{([^{}]*)}}/g)||[]).map((e=>(e.match(/[^{}]+/)||[""])[0]));if(u.length>0){u.forEach(((e,t)=>{r=r.replace("{{"+e+"}}","{{"+t+"}}")}))}const l=/\\?(sago|iago|isago|Hago|dago|mago|Yago|sdiff|idiff|Hdiff|ddiff|mdiff|Ydiff|sshort|ishort|Hshort|dshort|mshort|Yshort|yesterday|today|tommorow|tomorrow|.)/gi;const c={d:()=>T(i).toString().padStart(2,"0"),D:()=>this._getMessage("DOW_"+S(i)),j:()=>T(i),l:()=>this._getMessage("DAY_OF_WEEK_"+S(i)),N:()=>S(i)||7,S:()=>
870{if(T(i)%10==1&&T(i)!=11){return"st"}else if(T(i)%10==2&&T(i)!=12){return"nd"}else if(T(i)%10==3&&T(i)!=13){return"rd"}else{return"th"}},w:()=>S(i),z:()=>{const e=new Date(g(i),0,1);const t=new Date(g(i),F(i),T(i));return Math.ceil((t-e)/(24*3600*1e3))},W:()=>{const e=new Date(i.getTime());const t=(S(i)+6)%7;d(e,T(e)-t+3);const r=e.getTime();A(e,0,1);if(S(e)!=4){A(e,0,1+(4-S(e)+7)%7)}const s=1+Math.ceil((r-e)/(7*24*3600*1e3));return s.toString().padStart(2,"0")},F:()=>this._getMessage("MONTH_"+(F(i)+1)+"_S"),f:()=>this._getMessage("MONTH_"+(F(i)+1)),m:()=>(F(i)+1).toString().padStart(2,"0"),M:()=>this._getMessage("MON_"+(F(i)+1)),n:()=>F(i)+1,t:()=>{const e=o?new Date(Date.UTC(g(i),F(i)+1,0)):new Date(g(i),F(i)+1,0);return T(e)},L:()=>{const e=g(i);return e%4==0&&e%100!=0||e%400==0?1:0},o:()=>{const e=new Date(i.getTime());d(e,T(e)-(S(i)+6)%7+3);return g(e)},Y:()=>g(i),y:()=>g(i).toString().slice(2),a:()=>h(i)>11?"pm":"am",A:()=>h(i)>11?"PM":"AM",B:()=>{const e=(i.getUTCHours()+1)%24+i.getUTCMinutes()/60+i.getUTCSeconds()/3600;return Math.floor(e*1e3/24).toString().padStart(3,"0")},g:()=>h(i)%12||12,G:()=>h(i),h:()=>(h(i)%12||12).toString().padStart(2,"0"),H:()=>h(i).toString().padStart(2,"0"),i:()=>E(i).toString().padStart(2,"0"),s:()=>m(i).toString().padStart(2,"0"),u:()=>(R(i)*1e3).toString().padStart(6,"0"),e:()=>{if(o){return"UTC"}return""},I:()=>{if(o){return 0}const e=new Date(g(i),0,1);const t=Date.UTC(g(i),0,1);const r=new Date(g(i),6,0);const s=Date.UTC(g(i),6,0);return 0+(e-t!==r-s)},O:()=>{if(o){return"+0000"}const e=i.getTimezoneOffset();const t=Math.abs(e);return(e>0?"-":"+")+(Math.floor(t/60)*100+t%60).toString().padStart(4,"0")},P:function(){if(o){return"+00:00"}const e=this.O();return e.substr(0,3)+":"+e.substr(3)},Z:()=>{if(o){return 0}return-i.getTimezoneOffset()*60},c:()=>"Y-m-d\\TH:i:sP".replace(l,p),r:()=>"D, d M Y H:i:s O".replace(l,p),U:()=>Math.floor(i.getTime()/1e3),sago:()=>H(U((a-i)/1e3),{0:"FD_SECOND_AGO_0",1:"FD_SECOND_AGO_1","10_20":"FD_SECOND_AGO_10_20",MOD_1:"FD_SECOND_AGO_MOD_1",MOD_2_4:"FD_SECOND_AGO_MOD_2_4",MOD_OTHER:"FD_SECOND_AGO_MOD_OTHER"}),sdiff:()=>H(U((a-i)/1e3),{0:"FD_SECOND_DIFF_0",1:"FD_SECOND_DIFF_1","10_20":"FD_SECOND_DIFF_10_20",MOD_1:"FD_SECOND_DIFF_MOD_1",MOD_2_4:"FD_SECOND_DIFF_MOD_2_4",MOD_OTHER:"FD_SECOND_DIFF_MOD_OTHER"}),sshort:()=>this._getMessage("FD_SECOND_SHORT").replace(/#VALUE#/g,U((a-i)/1e3)),iago:()=>H(U((a-i)/60/1e3),{0:"FD_MINUTE_AGO_0",1:"FD_MINUTE_AGO_1","10_20":"FD_MINUTE_AGO_10_20",MOD_1:"FD_MINUTE_AGO_MOD_1",MOD_2_4:"FD_MINUTE_AGO_MOD_2_4",MOD_OTHER:"FD_MINUTE_AGO_MOD_OTHER"}),idiff:()=>H(U((a-i)/60/1e3),{0:"FD_MINUTE_DIFF_0",1:"FD_MINUTE_DIFF_1","10_20":"FD_MINUTE_DIFF_10_20",MOD_1:"FD_MINUTE_DIFF_MOD_1",MOD_2_4:"FD_MINUTE_DIFF_MOD_2_4",MOD_OTHER:"FD_MINUTE_DIFF_MOD_OTHER"}),isago:()=>{const e=U((a-i)/60/1e3);let t=H(e,{0:"FD_MINUTE_0",1:"FD_MINUTE_1","10_20":"FD_MINUTE_10_20",MOD_1:"FD_MINUTE_MOD_1",MOD_2_4:"FD_MINUTE_MOD_2_4",MOD_OTHER:"FD_MINUTE_MOD_OTHER"});t+=" ";const r=U((a-i)/1e3)-e*60;t+=H(r,{0:"FD_SECOND_AGO_0",1:"FD_SECOND_AGO_1","10_20":"FD_SECOND_AGO_10_20",MOD_1:"FD_SECOND_AGO_MOD_1",MOD_2_4:"FD_SECOND_AGO_MOD_2_4",MOD_OTHER:"FD_SECOND_AGO_MOD_OTHER"});return t},ishort:()=>this._getMessage("FD_MINUTE_SHORT").replace(/#VALUE#/g,U((a-i)/60/1e3)),Hago:()=>H(U((a-i)/60/60/1e3),{0:"FD_HOUR_AGO_0",1:"FD_HOUR_AGO_1","10_20":"FD_HOUR_AGO_10_20",MOD_1:"FD_HOUR_AGO_MOD_1",MOD_2_4:"FD_HOUR_AGO_MOD_2_4",MOD_OTHER:"FD_HOUR_AGO_MOD_OTHER"}),Hdiff:()=>H(U((a-i)/60/60/1e3),{0:"FD_HOUR_DIFF_0",1:"FD_HOUR_DIFF_1","10_20":"FD_HOUR_DIFF_10_20",MOD_1:"FD_HOUR_DIFF_MOD_1",MOD_2_4:"FD_HOUR_DIFF_MOD_2_4",MOD_OTHER:"FD_HOUR_DIFF_MOD_OTHER"}),Hshort:()=>this._getMessage("FD_HOUR_SHORT").replace(/#VALUE#/g,U((a-i)/60/60/1e3)),yesterday:()=>this._getMessage("FD_YESTERDAY"),today:()=>this._getMessage("FD_TODAY"),tommorow:()=>this._getMessage("FD_TOMORROW"),tomorrow:()=>this._getMessage("FD_TOMORROW"),dago:()=>H(U((a-i)/60/60/24/1e3),{0:"FD_DAY_AGO_0",1:"FD_DAY_AGO_1","10_20":"FD_DAY_AGO_10_20",MOD_1:"FD_DAY_AGO_MOD_1",MOD_2_4:"FD_DAY_AGO_MOD_2_4",MOD_OTHER:"FD_DAY_AGO_MOD_OTHER"}),ddiff:()=>H(U((a-i)/60/60/24/1e3),{0:"FD_DAY_DIFF_0",1:"FD_DAY_DIFF_1","10_20":"FD_DAY_DIFF_10_20",MOD_1:"FD_DAY_DIFF_MOD_1",MOD_2_4:"FD_DAY_DIFF_MOD_2_4",MOD_OTHER:"FD_DAY_DIFF_MOD_OTHER"}),dshort:()=>this._getMessage("FD_DAY_SHORT").replace(/#VALUE#/g,U((a-i)/60/60/24/1e3)),mago:()=>H(U((a-i)/60/60/24/31/1e3),{0:"FD_MONTH_AGO_0",1:"FD_MONTH_AGO_1","10_20":"FD_MONTH_AGO_10_20",MOD_1:"FD_MONTH_AGO_MOD_1",MOD_2_4:"FD_MONTH_AGO_MOD_2_4",MOD_OTHER:"FD_MONTH_AGO_MOD_OTHER"}),mdiff:()=>H(U((a-i)/60/60/24/31/1e3),{0:"FD_MONTH_DIFF_0",1:"FD_MONTH_DIFF_1","10_20":"FD_MONTH_DIFF_10_20",MOD_1:"FD_MONTH_DIFF_MOD_1",MOD_2_4:"FD_MONTH_DIFF_MOD_2_4",MOD_OTHER:"FD_MONTH_DIFF_MOD_OTHER"}),mshort:()=>this._getMessage("FD_MONTH_SHORT").replace(/#VALUE#/g,U((a-i)/60/60/24/31/1e3)),Yago:()=>H(U((a-i)/60/60/24/365/1e3),{0:"FD_YEARS_AGO_0",1:"FD_YEARS_AGO_1","10_20":"FD_YEARS_AGO_10_20",MOD_1:"FD_YEARS_AGO_MOD_1",MOD_2_4:"FD_YEARS_AGO_MOD_2_4",MOD_OTHER:"FD_YEARS_AGO_MOD_OTHER"}),Ydiff:()=>H(U((a-i)/60/60/24/365/1e3),{0:"FD_YEARS_DIFF_0",1:"FD_YEARS_DIFF_1","10_20":"FD_YEARS_DIFF_10_20",MOD_1:"FD_YEARS_DIFF_MOD_1",MOD_2_4:"FD_YEARS_DIFF_MOD_2_4",MOD_OTHER:"FD_YEARS_DIFF_MOD_OTHER"}),Yshort:()=>H(U((a-i)/60/60/24/365/1e3),{0:"FD_YEARS_SHORT_0",1:"FD_YEARS_SHORT_1","10_20":"FD_YEARS_SHORT_10_20",MOD_1:"FD_YEARS_SHORT_MOD_1",MOD_2_4:"FD_YEARS_SHORT_MOD_2_4",MOD_OTHER:"FD_YEARS_SHORT_MOD_OTHER"}),x:()=>{const e=this.isAmPmMode(true);const t=e===this.AM_PM_MODE.LOWER?"g:i a":e===this.AM_PM_MODE.UPPER?"g:i A":"H:i";return this.format([["tomorrow","tomorrow, "+t],["-",this.convertBitrixFormat(this._getMessage("FORMAT_DATETIME")).replace(/:s/g,"")],["s","sago"],["i","iago"],["today","today, "+t],["yesterday","yesterday, "+t],["",this.convertBitrixFormat(this._getMessage("FORMAT_DATETIME")).replace(/:s/g,"")]],i,a,o)},X:()=>{const e=this.isAmPmMode(true);const t=e===this.AM_PM_MODE.LOWER?"g:i a":e===this.AM_PM_MODE.UPPER?"g:i A":"H:i";const r=this.format([["tomorrow","tomorrow"],["-",this.convertBitrixFormat(this._getMessage("FORMAT_DATE"))],["today","today"],["yesterday","yesterday"],["",this.convertBitrixFormat(this._getMessage("FORMAT_DATE"))]],i,a,o);const s=this.format([["tomorrow",t],["today",t],["yesterday",t],["",""]],i,a,o);if(s.length>0){return this._getMessage("FD_DAY_AT_TIME").replace(/#DAY#/g,r).replace(/#TIME#/g,s)}else{return r}},Q:()=>{const e=U((a-i)/60/60/24/1e3);if(e==0){return this._getMessage("FD_DAY_DIFF_1").replace(/#VALUE#/g,1)}else{return this.format([["d","ddiff"],["m","mdiff"],["","Ydiff"]],i,a)}}};let M=false;if(r[0]&&r[0]=="^"){M=true;r=r.substr(1)}let O=r.replace(l,p);
870if(M){O=O.replace(/\s*00:00:00\s*/g,"").replace(/(\d\d:\d\d)(:00)/g,"$1").replace(/(\s*00:00\s*)(?!:)/g,"")}if(u.length>0){u.forEach((function(e,t){O=O.replace("{{"+t+"}}",e)}))}return O;function f(e,t,r,s){const n=U((r-t)/1e3);for(let _=0;_<e.length;_++){const i=e[_][0];const a=e[_][1];let o=null;if(i=="s"){if(n<60){return D.format(a,t,r,s)}}else if((o=/^s(\d+)\>?(\d+)?/.exec(i))!=null){if(o[1]&&o[2]){if(n<o[1]&&n>o[2]){return D.format(a,t,r,s)}}else if(n<o[1]){return D.format(a,t,r,s)}}else if(i=="i"){if(n<60*60){return D.format(a,t,r,s)}}else if((o=/^i(\d+)\>?(\d+)?/.exec(i))!=null){if(o[1]&&o[2]){if(n<o[1]*60&&n>o[2]*60){return D.format(a,t,r,s)}}else if(n<o[1]*60){return D.format(a,t,r,s)}}else if(i=="H"){if(n<24*60*60){return D.format(a,t,r,s)}}else if((o=/^H(\d+)\>?(\d+)?/.exec(i))!=null){if(o[1]&&o[2]){if(n<o[1]*60*60&&n>o[2]*60*60){return D.format(a,t,r,s)}}else if(n<o[1]*60*60){return D.format(a,t,r,s)}}else if(i=="d"){if(n<31*24*60*60){return D.format(a,t,r,s)}}else if((o=/^d(\d+)\>?(\d+)?/.exec(i))!=null){if(o[1]&&o[2]){if(n<o[1]*24*60*60&&n>o[2]*24*60*60){return D.format(a,t,r,s)}}else if(n<o[1]*24*60*60){return D.format(a,t,r,s)}}else if(i=="m"){if(n<365*24*60*60){return D.format(a,t,r,s)}}else if((o=/^m(\d+)\>?(\d+)?/.exec(i))!=null){if(o[1]&&o[2]){if(n<o[1]*31*24*60*60&&n>o[2]*31*24*60*60){return D.format(a,t,r,s)}}else if(n<o[1]*31*24*60*60){return D.format(a,t,r,s)}}else if(i=="now"){if(t.getTime()==r.getTime()){return D.format(a,t,r,s)}}else if(i=="today"){const e=g(r);const n=F(r);const _=T(r);const i=s?new Date(Date.UTC(e,n,_,0,0,0,0)):new Date(e,n,_,0,0,0,0);const o=s?new Date(Date.UTC(e,n,_+1,0,0,0,0)):new Date(e,n,_+1,0,0,0,0);if(t>=i&&t<o){return D.format(a,t,r,s)}}else if(i=="todayFuture"){const e=g(r);const n=F(r);const _=T(r);const i=r.getTime();const o=s?new Date(Date.UTC(e,n,_+1,0,0,0,0)):new Date(e,n,_+1,0,0,0,0);if(t>=i&&t<o){return D.format(a,t,r,s)}}else if(i=="yesterday"){const e=g(r);const n=F(r);const _=T(r);const i=s?new Date(Date.UTC(e,n,_-1,0,0,0,0)):new Date(e,n,_-1,0,0,0,0);const o=s?new Date(Date.UTC(e,n,_,0,0,0,0)):new Date(e,n,_,0,0,0,0);if(t>=i&&t<o){return D.format(a,t,r,s)}}else if(i=="tommorow"||i=="tomorrow"){const e=g(r);const n=F(r);const _=T(r);const i=s?new Date(Date.UTC(e,n,_+1,0,0,0,0)):new Date(e,n,_+1,0,0,0,0);const o=s?new Date(Date.UTC(e,n,_+2,0,0,0,0)):new Date(e,n,_+2,0,0,0,0);if(t>=i&&t<o){return D.format(a,t,r,s)}}else if(i=="-"){if(n<0){return D.format(a,t,r,s)}}}return e.length>0?D.format(e[e.length-1][1],t,r,s):""}function g(e){return o?e.getUTCFullYear():e.getFullYear()}function T(e){return o?e.getUTCDate():e.getDate()}function F(e){return o?e.getUTCMonth():e.getMonth()}function h(e){return o?e.getUTCHours():e.getHours()}function E(e){return o?e.getUTCMinutes():e.getMinutes()}function m(e){return o?e.getUTCSeconds():e.getSeconds()}function R(e){return o?e.getUTCMilliseconds():e.getMilliseconds()}function S(e){return o?e.getUTCDay():e.getDay()}function d(e,t){return o?e.setUTCDate(t):e.setDate(t)}function A(e,t,r){return o?e.setUTCMonth(t,r):e.setMonth(t,r)}function H(e,t){const r=e<100?Math.abs(e):Math.abs(e%100);const s=r%10;let n="";if(r==0){n=D._getMessage(t["0"])}else if(r==1){n=D._getMessage(t["1"])}else if(r>=10&&r<=20){n=D._getMessage(t["10_20"])}else if(s==1){n=D._getMessage(t["MOD_1"])}else if(2<=s&&s<=4){n=D._getMessage(t["MOD_2_4"])}else{n=D._getMessage(t["MOD_OTHER"])}return n.replace(/#VALUE#/g,e)}function p(e,t){if(c[e]){return c[e]()}else{return t}}function U(e){return e>=0?Math.floor(e):Math.ceil(e)}}}]);return e}();babelHelpers.defineProperty(_,"AM_PM_MODE",{UPPER:1,LOWER:2,NONE:false});babelHelpers.defineProperty(_,"convertBitrixFormat",r);babelHelpers.defineProperty(_,"getFormat",n);function i(e,t){a(e,t);t.add(e)}function a(e,t){if(t.has(e)){throw new TypeError("Cannot initialize the same private elements twice on an object")}}function o(e,t,r){if(!t.has(e)){throw new TypeError("attempted to get private field on non-instance")}return r}const D={format:"Y m d H i s",style:"long"};var u=new WeakSet;var l=new WeakSet;var c=new WeakSet;var M=new WeakSet;var O=new WeakSet;var f=new WeakSet;let g=function(){function e(t){babelHelpers.classCallCheck(this,e);i(this,f);i(this,O);i(this,M);i(this,c);i(this,l);i(this,u);this.milliseconds=Math.abs(t)}babelHelpers.createClass(e,[{key:"format",value:function e(r=D){const s={...D,...r};const n=t.Loc.getMessage("FD_UNIT_ORDER").split(" ");const _=o(this,u,T).call(this,s.style);const i=new Set(s.format.split(" "));const a=o(this,l,F).call(this,s.format);return n.filter((e=>i.has(e))).map((e=>o(this,c,h).call(this,e,e!==a,s.style))).filter((e=>e!=="")).join(_)}},{key:"formatClosest",value:function e(t=D){const r={...D,...t};const s=o(this,l,F).call(this,r.format);return o(this,c,h).call(this,s,false,r.style)}
870},{key:"seconds",get:function(){return Math.floor(this.milliseconds/e.getUnitDurations().s)}},{key:"minutes",get:function(){return Math.floor(this.milliseconds/e.getUnitDurations().i)}},{key:"hours",get:function(){return Math.floor(this.milliseconds/e.getUnitDurations().H)}},{key:"days",get:function(){return Math.floor(this.milliseconds/e.getUnitDurations().d)}},{key:"months",get:function(){return Math.floor(this.milliseconds/e.getUnitDurations().m)}},{key:"years",get:function(){return Math.floor(this.milliseconds/e.getUnitDurations().Y)}}],[{key:"createFromSeconds",value:function t(r){return new e(r*e.getUnitDurations().s)}},{key:"createFromMinutes",value:function t(r){return new e(r*e.getUnitDurations().i)}},{key:"getUnitDurations",value:function e(){return{s:1e3,i:6e4,H:36e5,d:864e5,m:26784e5,Y:31536e6}}}]);return e}();function T(e){if(e==="short"){return t.Loc.getMessage("FD_SEPARATOR_SHORT").replaceAll("&#32;"," ")}return t.Loc.getMessage("FD_SEPARATOR").replaceAll("&#32;"," ")}function F(e){const t=new Set(e.split(" "));const r=Object.entries(g.getUnitDurations()).filter((([e])=>t.has(e)));return r.reduce(((e,t)=>{const r=Math.floor(this.milliseconds/t[1])>=1;const s=t[1]>e[1];return r&&s?t:e}),r[0])[0]}function h(e,t,r){const s=t?o(this,M,E).call(this,e):o(this,O,m).call(this,e);if(t&&s===0){return""}const n=Date.now()/1e3;const i=s*o(this,f,R).call(this,e)/1e3;const a=r==="short"?`${e}short`:`${e}diff`;return _.format(a,n-i,n)}function E(e){const t={s:this.seconds%60,i:this.minutes%60,H:this.hours%24,d:this.days%31,m:this.months%12,Y:this.years};return t[e]}function m(e){const t={s:this.seconds,i:this.minutes,H:this.hours,d:this.days,m:this.months,Y:this.years};return t[e]}function R(e){return g.getUnitDurations()[e]}const S=new t.Cache.MemoryCache;const d={get SERVER_TO_UTC(){return S.remember("SERVER_TO_UTC",(()=>t.Text.toInteger(t.Loc.getMessage("SERVER_TZ_OFFSET"))))},get USER_TO_SERVER(){return S.remember("USER_TO_SERVER",(()=>t.Text.toInteger(t.Loc.getMessage("USER_TZ_OFFSET"))))},get BROWSER_TO_UTC(){return S.remember("BROWSER_TO_UTC",(()=>{const e=t.Text.toInteger((new Date).getTimezoneOffset()*60);return-e}))}};Object.freeze(d);function A(e){if(t.Type.isDate(e)){return p(e)}return t.Text.toInteger(e)}function H(e){return new Date(e*1e3)}function p(e){return Math.floor(e.getTime()/1e3)}let U=d;let y=null;function C(){return U}function I(){var e;return(e=y)!==null&&e!==void 0?e:p(new Date)}let N=function(){function e(){babelHelpers.classCallCheck(this,e)}babelHelpers.createClass(e,null,[{key:"getDate",value:function e(r=null){const s=t.Type.isNumber(r)?r:this.getTimestamp();return H(s)}},{key:"toUserDate",value:function e(t){return H(this.toUser(t))}},{key:"toServerDate",value:function e(t){return H(this.toServer(t))}},{key:"toUser",value:function e(t){return this.toServer(t)+C().USER_TO_SERVER}},{key:"toServer",value:function e(t){return A(t)-C().BROWSER_TO_UTC+C().SERVER_TO_UTC}},{key:"getTimestamp",value:function e(){return I()}}]);return e}();let Y=function(){function e(){babelHelpers.classCallCheck(this,e)}babelHelpers.createClass(e,null,[{key:"getDate",value:function e(r=null){if(t.Type.isNumber(r)){const e=C().SERVER_TO_UTC-C().BROWSER_TO_UTC;return H(r+e)}return N.toServerDate(N.getDate())}},{key:"toUserDate",value:function e(t){return H(this.toUser(t))}},{key:"toBrowserDate",value:function e(t){return H(this.toBrowser(t))}},{key:"toUser",value:function e(t){return A(t)+C().USER_TO_SERVER}},{key:"toBrowser",value:function e(t){return A(t)+C().BROWSER_TO_UTC-C().SERVER_TO_UTC}},{key:"getTimestamp",value:function e(){return N.toServer(N.getTimestamp())}}]);return e}();function w(e,t,r){b(e,t);v(r,"get");return k(e,r)}function v(e,t){if(e===undefined){throw new TypeError("attempted to "+t+" private static field before its declaration")}}function b(e,t){if(e!==t){throw new TypeError("Private static access of wrong provenance")}}function k(e,t){if(t.get){return t.get.call(e)}return t.value}let G=function(){function e(){babelHelpers.classCallCheck(this,e)}babelHelpers.createClass(e,null,[{key:"getDate",value:function r(s=null){if(t.Type.isNumber(s)){return H(s+w(this,e,B))}return H(this.getTimestamp())}},{key:"toBrowserDate",value:function e(t){return H(this.toBrowser(t))}},{key:"toServerDate",value:function e(t){return H(this.toServer(t))}},{key:"toUTCTimestamp",value:function t(r){return A(r)-w(this,e,B)}},{key:"toBrowser",value:function e(t){return A(t)+C().BROWSER_TO_UTC-C().SERVER_TO_UTC-C().USER_TO_SERVER}},{key:"toServer",value:function e(t){return A(t)-C().USER_TO_SERVER}},{key:"getTimestamp",value:function e(){return N.toUser(N.getTimestamp())}}]);return e}();function P(){const e=C().SERVER_TO_UTC+C().USER_TO_SERVER;return e-C().BROWSER_TO_UTC}var B={get:P,set:void 0};const x=Object.freeze({BrowserTime:N,Offset:d,ServerTime:Y,UserTime:G});e.Timezone=x;e.Date=_;e.DateTimeFormat=_;e.DurationFormat=g})(this.BX.Main=this.BX.Main||{},BX);
871/* End */
872;
873; /* Start:"a:4:{s:4:"full";s:49:"/bitrix/js/main/core/core_date.js?169224745236080";s:6:"source";s:33:"/bitrix/js/main/core/core_date.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
874;(function(){
875
876if (BX.date)
877	return;
878
879BX.date = BX.Main.Date;
880
881/************************************** calendar class **********************************/
882
883var obCalendarSingleton = null;
884
885/*
886params: {
887	node: bind element || document.body
888
889	value - start value in site format (using 'field' param if 'value' does not exist)
890	callback - date check handler. can return false to prevent calendar closing.
891	callback_after - another handler, called after date picking
892
893	field - field to read/write data
894
895	bTime = true - whether to enable time control
896	bHideTime = false - whether to hide time control by default
897
898	currentTime - current UTC time()
899
900}
901*/
902
903
904BX.calendar = function(params)
905{
906	return BX.calendar.get().Show(params);
907};
908
909BX.calendar.get = function()
910{
911	if (!obCalendarSingleton)
912		obCalendarSingleton = new BX.JCCalendar();
913
914	return obCalendarSingleton;
915};
916
917// simple func for compatibility with the oldies
918BX.calendar.InsertDaysBack = function(input, days)
919{
920	if (days != '')
921	{
922		var d = new Date();
923		if(days > 0)
924		{
925			d.setTime(d.valueOf() - days*86400000);
926		}
927
928		input.value = BX.date.format(BX.date.convertBitrixFormat(BX.message('FORMAT_DATE')), d, null);
929	}
930	else
931	{
932		input.value = '';
933	}
934};
935
936BX.calendar.ValueToString = function(value, bTime, bUTC)
937{
938	return BX.date.format(
939		BX.date.convertBitrixFormat(BX.message(bTime ? 'FORMAT_DATETIME' : 'FORMAT_DATE')),
940		value,
941		null,
942		!!bUTC
943	);
944};
945
946BX.calendar.ValueToStringFormat = function(value, bitrixFormat, bUTC)
947{
948	return BX.date.format(
949		BX.date.convertBitrixFormat(bitrixFormat),
950		value,
951		null,
952		!!bUTC
953	);
954};
955
956
957BX.CalendarPeriod =
958{
959	Init: function(inputFrom, inputTo, selPeriod)
960	{
961		if((inputFrom.value != "" || inputTo.value != "") && selPeriod.value == "")
962			selPeriod.value = "interval";
963
964		selPeriod.onchange();
965	},
966
967	ChangeDirectOpts: function(peroidValue, selPParent) // "week" || "others"
968	{
969		var selDirect = BX.findChild(selPParent, {'className':'adm-select adm-calendar-direction'}, true);
970
971		if(peroidValue == "week")
972		{
973			selDirect.options[0].text = BX.message('JSADM_CALEND_PREV_WEEK');
974			selDirect.options[1].text = BX.message('JSADM_CALEND_CURR_WEEK');
975			selDirect.options[2].text = BX.message('JSADM_CALEND_NEXT_WEEK');
976		}
977		else
978		{
979			selDirect.options[0].text = BX.message('JSADM_CALEND_PREV');
980			selDirect.options[1].text = BX.message('JSADM_CALEND_CURR');
981			selDirect.options[2].text = BX.message('JSADM_CALEND_NEXT');
982		}
983	},
984
985	SaveAndClearInput: function(oInput)
986	{
987		if(!window.SavedPeriodValues)
988			window.SavedPeriodValues = {};
989
990		window.SavedPeriodValues[oInput.id] = oInput.value;
991		oInput.value="";
992	},
993
994	RestoreInput: function(oInput)
995	{
996		if(!window.SavedPeriodValues || !window.SavedPeriodValues[oInput.id])
997			return;
998
999		oInput.value = window.SavedPeriodValues[oInput.id];
1000		delete(window.SavedPeriodValues[oInput.id]);
1001	},
1002
1003	OnChangeP: function(sel)
1004	{
1005		var selPParent = sel.parentNode.parentNode;
1006		var bShowFrom, bShowTo, bShowDirect, bShowSeparate;
1007		bShowFrom = bShowTo = bShowDirect = bShowSeparate = false;
1008
1009		var inputFromWrap = BX.findChild(selPParent, {'className':'adm-input-wrap adm-calendar-inp adm-calendar-first'});
1010		var inputToWrap = BX.findChild(selPParent, {'className':'adm-input-wrap adm-calendar-second'});
1011		var selDirectWrap = BX.findChild(selPParent, {'className':'adm-select-wrap adm-calendar-direction'});
1012		var separator = BX.findChild(selPParent, {'className':'adm-calendar-separate'});
1013		var inputFrom = BX.findChild(selPParent, {'className':'adm-input adm-calendar-from'},true);
1014		var inputTo = BX.findChild(selPParent, {'className':'adm-input adm-calendar-to'},true);
1015
1016		// define who must be shown
1017		switch (sel.value)
1018		{
1019			case "day":
1020			case "week":
1021			case "month":
1022			case "quarter":
1023			case "year":
1024				bShowDirect=true;
1025				BX.CalendarPeriod.OnChangeD(selDirectWrap.children[0]);
1026				break;
1027
1028			case "before":
1029				bShowTo = true;
1030				break;
1031
1032			case "after":
1033				bShowFrom = true;
1034				break;
1035
1036			case "exact":
1037				bShowFrom= true;
1038				break;
1039
1040			case "interval":
1041				bShowFrom = bShowTo = bShowSeparate = true;
1042				BX.CalendarPeriod.RestoreInput(inputFrom);
1043				BX.CalendarPeriod.RestoreInput(inputTo);
1044
1045				break;
1046
1047			case "":
1048				BX.CalendarPeriod.SaveAndClearInput(inputFrom);
1049				BX.CalendarPeriod.SaveAndClearInput(inputTo);
1050				break;
1051
1052			default:
1053				break;
1054
1055		}
1056
1057		BX.CalendarPeriod.ChangeDirectOpts(sel.value, selPParent);
1058
1059		inputFromWrap.style.display = (bShowFrom? 'inline-block':'none');
1060		inputToWrap.style.display = (bShowTo? 'inline-block':'none');
1061		selDirectWrap.style.display = (bShowDirect? 'inline-block':'none');
1062		separator.style.display = (bShowSeparate? 'inline-block':'none');
1063	},
1064
1065
1066	OnChangeD: function(sel)
1067	{
1068		var selPParent = sel.parentNode.parentNode;
1069		var inputFrom = BX.findChild(selPParent, {'className':'adm-input adm-calendar-from'},true);
1070		var inputTo = BX.findChild(selPParent, {'className':'adm-input adm-calendar-to'},true);
1071		var selPeriod = BX.findChild(selPParent, {'className':'adm-select adm-calendar-period'},true);
1072
1073		var offset=0;
1074
1075		switch (sel.value)
1076		{
1077			case "previous":
1078				offset = -1;
1079				break;
1080
1081			case "next":
1082				offset = 1;
1083				break;
1084
1085			case "current":
1086			default:
1087				break;
1088
1089		}
1090
1091		var from = false;
1092		var to = false;
1093
1094		var today = new Date();
1095		var year = today.getFullYear();
1096		var month = today.getMonth();
1097		var day = today.getDate();
1098		var dayW = today.getDay();
1099
1100		if (dayW == 0)
1101				dayW = 7;
1102
1103		switch (selPeriod.value)
1104		{
1105			case "day":
1106				from = new Date(year, month, day+offset, 0, 0, 0);
1107				to = new Date(year, month, day+offset, 23, 59, 59);
1108				break;
1109
1110			case "week":
1111				from = new Date(year, month, day-dayW+1+offset*7, 0, 0, 0);
1112				to = new Date(year, month, day+(7-dayW)+offset*7, 23, 59, 59);
1113				break;
1114
1115			case "month":
1116				from = new Date(year, month+offset, 1, 0, 0, 0);
1117				to = new Date(year, month+1+offset, 0, 23, 59, 59);
1118				break;
1119
1120			case "quarter":
1121				var quarterNum = Math.floor((month/3))+offset;
1122				from = new Date(year, 3*(quarterNum), 1, 0, 0, 0);
1123				to = new Date(year, 3*(quarterNum+1), 0, 23, 59, 59);
1124				break;
1125
1126			case "year":
1127				from = new Date(year+offset, 0, 1, 0, 0, 0);
1128				to = new Date(year+1+offset, 0, 0, 23, 59, 59);
1129				break;
1130
1131			default:
1132				break;
1133		}
1134
1135		var format = window[inputFrom.name+"_bTime"] ? BX.message('FORMAT_DATETIME') : BX.message('FORMAT_DATE');
1136
1137		if(from)
1138		{
1139			inputFrom.value = BX.formatDate(from, format);
1140			BX.addClass(inputFrom,"adm-calendar-inp-setted");
1141		}
1142
1143		if(to)
1144		{
1145			inputTo.value = BX.formatDate(to, format);
1146			BX.addClass(inputTo,"adm-calendar-inp-setted");
1147		}
1148	}
1149};
1150
1151
1152BX.JCCalendar = function()
1153{
1154	this.params = {};
1155
1156	this.bAmPm = BX.isAmPmMode();
1157
1158	this.popup = null;
1159	this.popup_month = null;
1160	this.popup_year = null;
1161	this.month_popup_classname = '';
1162	this.year_popup_classname = '';
1163	this.value = null;
1164	this._layers = {};
1165	this._current_layer = null;
1166
1167	this.DIV = null;
1168	this.PARTS = {};
1169
1170	this.weekStart = 0;
1171	this.numRows = 6;
1172
1173	this._create = function(params)
1174	{
1175		this.popup = new BX.PopupWindow('calendar_popup_' + Math.random(), params.node, {
1176			closeByEsc: true,
1177			autoHide: false,
1178			content: this._get_content(),
1179			bindOptions: {forceBindPosition: true}
1180		});
1181
1182		BX.bind(this.popup.popupContainer, 'click', function(event) {
1183			event.stopPropagation();
1184		});
1185	};
1186
1187	this._auto_hide_disable = function()
1188	{
1189		BX.unbind(document, 'click', BX.proxy(this._auto_hide, this));
1190	};
1191
1192	this._auto_hide_enable = function()
1193	{
1194		BX.bind(document, 'click', BX.proxy(this._auto_hide, this));
1195	};
1196
1197	this._auto_hide = function(e)
1198	{
1199		this._auto_hide_disable();
1200		this.popup.close();
1201	};
1202
1203	this._get_content = function()
1204	{
1205		var _layer_onclick = BX.delegate(function(e) {
1206			e = e||window.event;
1207			this.SetDate(
1208				new Date(parseInt(BX.proxy_context.getAttribute('data-date'))),
1209				(e.type === 'dblclick' || (this.params.bCompatibility && !this.params.bTimeVisibility))
1210			)
1211		}, this);
1212
1213		this.DIV = BX.create('DIV', {
1214			props: {className: 'bx-calendar'},
1215			children: [
1216				BX.create('DIV', {
1217					props: {
1218						className: 'bx-calendar-header'
1219					},
1220					children: [
1221						BX.create('A', {
1222							attrs: {href: 'javascript:void(0)'},
1223							props: {className: 'bx-calendar-left-arrow'},
1224							events: {click: BX.proxy(this._prev, this)}
1225						}),
1226
1227						BX.create('SPAN', {
1228							props: {className: 'bx-calendar-header-content'},
1229							children: [
1230								(this.PARTS.MONTH = BX.create('A', {
1231									attrs: {href: 'javascript:void(0)'},
1232									props: {className: 'bx-calendar-top-month'},
1233									events: {click: BX.proxy(this._menu_month, this)}
1234								})),
1235
1236								(this.PARTS.YEAR = BX.create('A', {
1237									attrs: {href: 'javascript:void(0)'},
1238									props: {className: 'bx-calendar-top-year'},
1239									events: {click: BX.proxy(this._menu_year, this)}
1240								}))
1241							]
1242						}),
1243
1244						BX.create('A', {
1245							attrs: {href: 'javascript:void(0)'},
1246							props: {className: 'bx-calendar-right-arrow'},
1247							events: {click: BX.proxy(this._next, this)}
1248						})
1249					]
1250				}),
1251
1252				(this.PARTS.WEEK = BX.create('DIV', {
1253					props: {
1254						className: 'bx-calendar-name-day-wrap'
1255					}
1256				})),
1257
1258				(this.PARTS.LAYERS = BX.create('DIV', {
1259					props: {
1260						className: 'bx-calendar-cell-block'
1261					},
1262					events: {
1263						click: BX.delegateEvent({className: 'bx-calendar-cell'}, _layer_onclick),
1264						dblclick: BX.delegateEvent({className: 'bx-calendar-cell'}, _layer_onclick)
1265					}
1266				})),
1267
1268				(this.PARTS.TIME = BX.create('DIV', {
1269					props: {
1270						className: 'bx-calendar-set-time-wrap'
1271					},
1272					events: {
1273						click: BX.delegateEvent(
1274							{attr: 'data-action'},
1275							BX.delegate(this._time_actions, this)
1276						)
1277					},
1278					html: '<a href="javascript:void(0)" data-action="time_show" class="bx-calendar-set-time"><i></i>'+BX.message('CAL_TIME_SET')+'</a><div class="bx-calendar-form-block"><span class="bx-calendar-form-text">'+BX.message('CAL_TIME')+'</span><span class="bx-calendar-form"><input type="text" class="bx-calendar-form-input" maxwidth="2" onkeyup="BX.calendar.get()._check_time()" /><span class="bx-calendar-form-separator"></span><input type="text" class="bx-calendar-form-input" maxwidth="2" onkeyup="BX.calendar.get()._check_time()" />'+(this.bAmPm?'<span class="bx-calendar-AM-PM-block"><span class="bx-calendar-AM-PM-text" data-action="time_ampm"></span><span class="bx-calendar-form-arrow-r"><a href="javascript:void(0)" class="bx-calendar-form-arrow-top" data-action="time_ampm_up"><i></i></a><a href="javascript:void(0)" class="bx-calendar-form-arrow-bottom" data-action="time_ampm_down"><i></i></a></span></span>':'')+'</span><a href="javascript:void(0)" data-action="time_hide" class="bx-calendar-form-close"><i></i></a></div>'
1279				})),
1280
1281				(this.PARTS.BUTTONS = BX.create('DIV', {
1282					props: {className: 'bx-calendar-button-block'},
1283					events: {
1284						click: BX.delegateEvent(
1285							{attr: 'data-action'},
1286							BX.delegate(this._button_actions, this)
1287						)
1288					},
1289					html: '<a href="javascript:void(0)" class="bx-calendar-button bx-calendar-button-select" data-action="submit"><span class="bx-calendar-button-left"></span><span class="bx-calendar-button-text">'+BX.message('CAL_BUTTON')+'</span><span class="bx-calendar-button-right"></span></a><a href="javascript:void(0)" class="bx-calendar-button bx-calendar-button-cancel" data-action="cancel"><span class="bx-calendar-button-left"></span><span class="bx-calendar-button-text">'+BX.message('JS_CORE_WINDOW_CLOSE')+'</span><span class="bx-calendar-button-right"></span></a>'
1290				}))
1291			]
1292		});
1293
1294		this.PARTS.TIME_INPUT_H = BX.findChild(this.PARTS.TIME, {tag: 'INPUT'}, true);
1295		this.PARTS.TIME_INPUT_M = this.PARTS.TIME_INPUT_H.nextSibling.nextSibling;
1296
1297		if (this.bAmPm)
1298			this.PARTS.TIME_AMPM = this.PARTS.TIME_INPUT_M.nextSibling.firstChild;
1299
1300		var spinner = (new BX.JCSpinner({
1301			input: this.PARTS.TIME_INPUT_H,
1302			callback_change: BX.proxy(this._check_time, this),
1303			bSaveValue: false
1304		})).Show();
1305		spinner.className = 'bx-calendar-form-arrow-l';
1306		this.PARTS.TIME_INPUT_H.parentNode.insertBefore(spinner, this.PARTS.TIME_INPUT_H);
1307
1308		spinner = (new BX.JCSpinner({
1309			input: this.PARTS.TIME_INPUT_M,
1310			callback_change: BX.proxy(this._check_time, this),
1311			bSaveValue: true
1312		})).Show();
1313		spinner.className = 'bx-calendar-form-arrow-r';
1314		if (!this.PARTS.TIME_INPUT_M.nextSibling)
1315			this.PARTS.TIME_INPUT_M.parentNode.appendChild(spinner);
1316		else
1317			this.PARTS.TIME_INPUT_M.parentNode.insertBefore(spinner, this.PARTS.TIME_INPUT_M.nextSibling);
1318
1319		for (var i = 0; i < 7; i++)
1320		{
1321			this.PARTS.WEEK.appendChild(BX.create('SPAN', {
1322				props: {
1323					className: 'bx-calendar-name-day'
1324				},
1325				text: BX.message('DOW_' + ((i + this.weekStart) % 7))
1326			}));
1327		}
1328
1329		return this.DIV;
1330	};
1331
1332	this._time_actions = function()
1333	{
1334		switch (BX.proxy_context.getAttribute('data-action'))
1335		{
1336			case 'time_show':
1337				BX.addClass(this.PARTS.TIME, 'bx-calendar-set-time-opened');
1338				if (this.params.bCompatibility)
1339				{
1340					BX.removeClass(this.PARTS.BUTTONS, 'bx-calendar-buttons-disabled');
1341				}
1342				this.popup.adjustPosition();
1343			break;
1344			case 'time_hide':
1345				BX.removeClass(this.PARTS.TIME, 'bx-calendar-set-time-opened');
1346				if (this.params.bCompatibility)
1347				{
1348					this._saveChoice('hide');
1349					BX.addClass(this.PARTS.BUTTONS, 'bx-calendar-buttons-disabled');
1350				}
1351				this.popup.adjustPosition();
1352			break;
1353			case 'time_ampm':
1354				this.PARTS.TIME_AMPM.innerHTML = this.PARTS.TIME_AMPM.innerHTML == 'AM' ? 'PM' : 'AM';
1355			break;
1356			case 'time_ampm_up':
1357				this._check_time({bSaveValue: false}, null, 12);
1358				return;
1359			break;
1360			case 'time_ampm_down':
1361				this._check_time({bSaveValue: false}, null, -12);
1362				return;
1363			break;
1364		}
1365
1366		this._check_time();
1367	};
1368
1369	this._button_actions = function()
1370	{
1371		switch (BX.proxy_context.getAttribute('data-action'))
1372		{
1373			case 'submit':
1374				if (this.params.bCompatibility)
1375				{
1376					this._saveChoice('show');
1377				}
1378				this.SaveValue();
1379			break;
1380			case 'cancel':
1381				this.Close();
1382			break;
1383		}
1384	};
1385
1386	this._saveChoice = function(state)
1387	{
1388		if (this.params.bCategoryTimeVisibilityOption)
1389		{
1390			BX.userOptions.save(
1391				this.params.bCategoryTimeVisibilityOption,
1392				this.params.bNameTimeVisibilityOption,
1393				'visibility',
1394				(state === 'show' ? 'Y' : 'N')
1395			);
1396		}
1397
1398		this._bTimeVisibility = (state === 'show');
1399		this.params.bTimeVisibility = this._bTimeVisibility;
1400	};
1401
1402	this._check_time = function(params, value, direction)
1403	{
1404		var h = parseInt(this.PARTS.TIME_INPUT_H.value.substring(0,5),10)||0,
1405			m = parseInt(this.PARTS.TIME_INPUT_M.value.substring(0,5),10)||0,
1406			bChanged = false;
1407
1408		if (!!params && !params.bSaveValue)
1409		{
1410			this.value.setUTCHours(this.value.getUTCHours() + direction);
1411		}
1412		else if (!isNaN(h))
1413		{
1414			if (this.bAmPm)
1415			{
1416				if (h != 12 && this.PARTS.TIME_AMPM.innerHTML == 'PM')
1417				{
1418					h += 12;
1419				}
1420			}
1421
1422			bChanged = true;
1423			this.value.setUTCHours(h % 24);
1424		}
1425
1426		if (!isNaN(m))
1427		{
1428			bChanged = true;
1429			this.value.setUTCMinutes(m % 60);
1430		}
1431
1432		if (bChanged)
1433		{
1434			this.SetValue(this.value);
1435		}
1436	};
1437
1438	this._set_layer = function()
1439	{
1440		var layerId = parseInt(this.value.getUTCFullYear() + '' + BX.util.str_pad_left(this.value.getUTCMonth()+'', 2, "0"));
1441
1442		if (!this._layers[layerId])
1443		{
1444			this._layers[layerId] = this._create_layer();
1445			this._layers[layerId].BXLAYERID = layerId;
1446		}
1447
1448		if (this._current_layer)
1449		{
1450			var v = new Date(this.value.valueOf());
1451			v.setUTCHours(0); v.setUTCMinutes(0);
1452
1453			var cur_value = BX.findChild(this._layers[layerId], {
1454					tag: 'A',
1455					className: 'bx-calendar-active'
1456				}, true),
1457				new_value = BX.findChild(this._layers[layerId], {
1458					tag: 'A',
1459					attr: {
1460						'data-date' : v.valueOf() + ''
1461					}
1462				}, true);
1463
1464			if (cur_value)
1465			{
1466				BX.removeClass(cur_value, 'bx-calendar-active');
1467			}
1468
1469			if (new_value)
1470			{
1471				BX.addClass(new_value, 'bx-calendar-active');
1472			}
1473
1474			this._replace_layer(this._current_layer, this._layers[layerId]);
1475		}
1476		else
1477		{
1478			this.PARTS.LAYERS.appendChild(this._layers[layerId]);
1479		}
1480
1481		this._current_layer = this._layers[layerId];
1482	};
1483
1484	this._replace_layer = function(old_layer, new_layer)
1485	{
1486		if (old_layer != new_layer)
1487		{
1488			if (!BX.browser.IsIE() || BX.browser.IsDoctype())
1489			{
1490				var dir = old_layer.BXLAYERID > new_layer.BXLAYERID ? 1 : -1;
1491
1492				var old_top = 0;
1493				var new_top = -dir * old_layer.offsetHeight;
1494
1495				old_layer.style.position = 'relative';
1496				old_layer.style.top = "0px";
1497				old_layer.style.zIndex = 5;
1498
1499				new_layer.style.position = 'absolute';
1500				new_layer.style.top = new_top + 'px';
1501				new_layer.style.zIndex = 6;
1502
1503				this.PARTS.LAYERS.appendChild(new_layer);
1504
1505				var delta = 15;
1506
1507				var f;
1508				(f = function() {
1509					new_top += dir * delta;
1510					old_top += dir * delta;
1511
1512					if (dir * new_top < 0)
1513					{
1514						old_layer.style.top = old_top + 'px';
1515						new_layer.style.top = new_top + 'px';
1516						setTimeout(f, 10);
1517					}
1518					else
1519					{
1520						old_layer.parentNode.removeChild(old_layer);
1521
1522						new_layer.style.top = "0px";
1523						new_layer.style.position = 'static';
1524						new_layer.style.zIndex = 0;
1525					}
1526				})();
1527			}
1528			else
1529			{
1530				this.PARTS.LAYERS.replaceChild(new_layer, old_layer);
1531			}
1532		}
1533	};
1534
1535	this._create_layer = function()
1536	{
1537		var l = BX.create('DIV', {
1538			props: {
1539				className: 'bx-calendar-layer'
1540			}
1541		});
1542
1543		var month_start = new Date(this.value);
1544		month_start.setUTCHours(0);
1545		month_start.setUTCMinutes(0);
1546
1547		month_start.setUTCDate(1);
1548
1549		if (month_start.getUTCDay() != this.weekStart)
1550		{
1551			var d = month_start.getUTCDay() - this.weekStart;
1552			d += d < 0 ? 7 : 0;
1553			month_start.setUTCDate(month_start.getUTCDate()-d);
1554		}
1555
1556		var cur_month = this.value.getUTCMonth(),
1557			cur_day = this.value.getUTCDate(),
1558			s = '';
1559		for (var i = 0; i < this.numRows; i++)
1560		{
1561			s += '<div class="bx-calendar-range'
1562				+(i == this.numRows-1 ? ' bx-calendar-range-noline' : '')
1563				+'">';
1564
1565			for (var j = 0; j < 7; j++)
1566			{
1567				d = month_start.getUTCDate();
1568				var wd = month_start.getUTCDay();
1569				var className = 'bx-calendar-cell';
1570
1571				if (cur_month != month_start.getUTCMonth())
1572					className += ' bx-calendar-date-hidden';
1573				else if (cur_day == d)
1574					className += ' bx-calendar-active';
1575
1576
1577				if (wd == 0 || wd == 6)
1578					className += ' bx-calendar-weekend';
1579
1580				s += '<a href="javascript:void(0)" class="'+className+'" data-date="' + month_start.valueOf() + '">' + d + '</a>';
1581
1582				month_start.setUTCDate(month_start.getUTCDate()+1);
1583			}
1584			s += '</div>';
1585		}
1586
1587		l.innerHTML = s;
1588
1589		return l;
1590	};
1591
1592	this._prev = function()
1593	{
1594		this.SetMonth(this.value.getUTCMonth()-1);
1595	};
1596
1597	this._next = function()
1598	{
1599		this.SetMonth(this.value.getUTCMonth()+1);
1600	};
1601
1602	this._menu_month_content = function()
1603	{
1604		var months = '', cur_month = this.value.getMonth(), i;
1605		for (i = 0; i < 12; i++)
1606		{
1607			months += '<span class="bx-calendar-month'+(i == cur_month ? ' bx-calendar-month-active' : '')+'" data-bx-month="' + i + '">' + BX.message('MONTH_' + (i + 1)) + '</span>';
1608		}
1609
1610		return '<div class="bx-calendar-month-popup"><div class="bx-calendar-month-title" data-bx-month="' + this.value.getUTCMonth() + '">' + BX.message('MONTH_' + (this.value.getUTCMonth() + 1)) + '</div><div class="bx-calendar-month-content">' + months + '</div></div>';
1611	};
1612
1613	this._menu_month = function()
1614	{
1615		if (!this.popup_month)
1616		{
1617			this.popup_month = new BX.PopupWindow(
1618				'calendar_popup_month_' + Math.random(), this.PARTS.MONTH,
1619				{
1620					content: this._menu_month_content(),
1621					closeByEsc: true,
1622					autoHide: true,
1623					offsetTop: -29,
1624					offsetLeft: -1,
1625					className: this.month_popup_classname,
1626					events: {
1627						onPopupShow: BX.delegate(function() {
1628							if (this.popup_year)
1629							{
1630								this.popup_year.close();
1631							}
1632						}, this)
1633					}
1634				}
1635			);
1636
1637			BX.bind(this.popup_month.popupContainer, 'click', BX.proxy(this.month_popup_click, this));
1638			this.popup_month.BXMONTH = this.value.getUTCMonth();
1639		}
1640		else if (this.popup_month.BXMONTH != this.value.getUTCMonth())
1641		{
1642			this.popup_month.setContent(this._menu_month_content());
1643			this.popup_month.BXMONTH = this.value.getUTCMonth();
1644		}
1645
1646		this.popup_month.show();
1647	};
1648
1649	this.month_popup_click = function(e)
1650	{
1651		var target = e.target || e.srcElement;
1652		if (target && target.getAttribute && target.getAttribute('data-bx-month'))
1653		{
1654			this.SetMonth(parseInt(target.getAttribute('data-bx-month')));
1655			this.popup_month.close();
1656		}
1657	};
1658
1659	this._menu_year_content = function()
1660	{
1661		var s = '<div class="bx-calendar-year-popup"><div class="bx-calendar-year-title" data-bx-year="' + this.value.getUTCFullYear() + '">' + this.value.getUTCFullYear() + '</div><div class="bx-calendar-year-content" id="bx-calendar-year-content">';
1662
1663		for (var i=-3; i <= 3; i++)
1664		{
1665			s += '<span class="bx-calendar-year-number' + (i == 0?' bx-calendar-year-active' : '') + '" data-bx-year="' + (this.value.getUTCFullYear() - i) + '">' + (this.value.getUTCFullYear() - i)+'</span>';
1666		}
1667
1668		s += '</div><input data-bx-year-input="Y" type="text" class="bx-calendar-year-input" maxlength="4" /></div>';
1669
1670		return s;
1671	};
1672
1673	this._menu_year = function()
1674	{
1675		if (!this.popup_year)
1676		{
1677			this.popup_year = new BX.PopupWindow(
1678				'calendar_popup_year_' + Math.random(), this.PARTS.YEAR,
1679				{
1680					content: this._menu_year_content(),
1681					closeByEsc: true,
1682					autoHide: true,
1683					offsetTop: -29,
1684					offsetLeft: -1,
1685					className: this.year_popup_classname,
1686					events: {
1687						onPopupShow: BX.delegate(function() {
1688							if (this.popup_month)
1689							{
1690								this.popup_month.close();
1691							}
1692						}, this)
1693					}
1694				}
1695			);
1696
1697			BX.bind(this.popup_year.popupContainer, 'click', BX.proxy(this.year_popup_click, this));
1698			BX.bind(this.popup_year.popupContainer, 'keyup', BX.proxy(this.year_popup_keyup, this));
1699			this.popup_year.BXYEAR = this.value.getUTCFullYear();
1700		}
1701		else if (this.popup_year.BXYEAR != this.value.getUTCFullYear())
1702		{
1703			this.popup_year.setContent(this._menu_year_content());
1704			this.popup_year.BXYEAR = this.value.getUTCFullYear();
1705		}
1706
1707		this.popup_year.show();
1708	};
1709
1710	this.year_popup_click = function(e)
1711	{
1712		var target = e.target || e.srcElement;
1713		if (target && target.getAttribute && target.getAttribute('data-bx-year'))
1714		{
1715			this.SetYear(parseInt(target.getAttribute('data-bx-year')));
1716			this.popup_year.close();
1717		}
1718	};
1719	this.year_popup_keyup = function(e)
1720	{
1721		var target = e.target || e.srcElement;
1722		if (target && target.getAttribute && target.getAttribute('data-bx-year-input') == 'Y')
1723		{
1724			var value = parseInt(target.value);
1725			if(value >= 1900 && value <= 2100)
1726			{
1727				this.SetYear(value);
1728				this.popup_year.close();
1729			}
1730		}
1731	};
1732
1733	this._check_date = function(v)
1734	{
1735		var res = v;
1736
1737		if (BX.type.isString(v))
1738		{
1739			res = BX.parseDate(v, true);
1740		}
1741
1742		if (!BX.type.isDate(res) || isNaN(res.valueOf()))
1743		{
1744			res = BX.date.convertToUTC(new Date());
1745			if (this.params.bHideTime)
1746			{
1747				res.setUTCHours(0);
1748				res.setUTCMinutes(0);
1749			}
1750		}
1751
1752		res.setUTCMilliseconds(0);
1753		res.setUTCSeconds(0);
1754
1755		res.BXCHECKED = true;
1756
1757		return res;
1758	};
1759};
1760
1761BX.JCCalendar.prototype.Show = function(params)
1762{
1763	if (!BX.isReady)
1764	{
1765		BX.ready(BX.delegate(function() {this.Show(params)}, this));
1766		return;
1767	}
1768
1769	params.node = params.node||document.body;
1770
1771	if (BX.type.isNotEmptyString(params.node))
1772	{
1773		var n = BX(params.node);
1774		if (!n)
1775		{
1776			n = document.getElementsByName(params.node);
1777			if (n && n.length > 0)
1778			{
1779				n = n[0]
1780			}
1781		}
1782		params.node = n;
1783	}
1784
1785	if (!params.node)
1786		return;
1787
1788	if (!!params.field)
1789	{
1790		if (BX.type.isString(params.field))
1791		{
1792			n = BX(params.field);
1793			if (!!n)
1794			{
1795				params.field = n;
1796			}
1797			else
1798			{
1799				if (params.form)
1800				{
1801					if (BX.type.isString(params.form))
1802					{
1803						params.form = document.forms[params.form];
1804					}
1805				}
1806
1807				if (BX.type.isDomNode(params.form) && !!params.form[params.field])
1808				{
1809					params.field = params.form[params.field];
1810				}
1811				else
1812				{
1813					n = document.getElementsByName(params.field);
1814					if (n && n.length > 0)
1815					{
1816						n = n[0];
1817						params.field = n;
1818					}
1819				}
1820			}
1821
1822			if (BX.type.isString(params.field))
1823			{
1824				params.field = BX(params.field);
1825			}
1826		}
1827	}
1828
1829	var bShow = !this.popup || !this.popup.isShown() || this.params.node != params.node;
1830
1831	this.params = params;
1832
1833	this.params.bCompatibility = (typeof this.params.bCompatibility == 'undefined' ? false : this.params.bCompatibility);
1834	this.params.bTimeVisibility = (typeof this.params.bTimeVisibility == 'undefined' ? !this.params.bCompatibility : this.params.bTimeVisibility);
1835	if (this.params.bCompatibility)
1836	{
1837		this.params.bCategoryTimeVisibilityOption = (
1838			this.params.bCategoryTimeVisibilityOption ? this.params.bCategoryTimeVisibilityOption : ''
1839		);
1840		this.params.bNameTimeVisibilityOption = (
1841			this.params.bNameTimeVisibilityOption ? this.params.bNameTimeVisibilityOption : 'time_visibility'
1842		);
1843
1844		if (typeof this._bTimeVisibility !== 'undefined')
1845		{
1846			this.params.bTimeVisibility = this._bTimeVisibility;
1847		}
1848	}
1849
1850	this.params.bTime = typeof this.params.bTime == 'undefined' ? true : !!this.params.bTime;
1851	this.params.bHideTime = typeof this.params.bHideTime == 'undefined' ? true : !!this.params.bHideTime;
1852	this.params.bUseSecond = typeof this.params.bUseSecond == 'undefined' ? true : !!this.params.bUseSecond;
1853
1854	this.weekStart = parseInt(this.params.weekStart || this.params.weekStart || BX.message('WEEK_START'));
1855	if (isNaN(this.weekStart))
1856		this.weekStart = 1;
1857
1858	if (!this.popup)
1859	{
1860		this._create(this.params);
1861	}
1862	else
1863	{
1864		this.popup.setBindElement(this.params.node);
1865	}
1866
1867	var bHideTime = !!this.params.bHideTime;
1868	if (this.params.value)
1869	{
1870		this.SetValue(this.params.value);
1871		bHideTime = this.value.getUTCHours() <= 0 && this.value.getUTCMinutes() <= 0;
1872	}
1873	else if (this.params.field)
1874	{
1875		this.SetValue(this.params.field.value);
1876		bHideTime = this.value.getUTCHours() <= 0 && this.value.getUTCMinutes() <= 0;
1877	}
1878	else if (!!this.params.currentTime)
1879	{
1880		this.SetValue(this.params.currentTime);
1881	}
1882	else
1883	{
1884		this.SetValue();
1885	}
1886
1887	if (!!this.params.bTime)
1888	{
1889		this.activateTimeStyle(bHideTime);
1890	}
1891	else
1892	{
1893		this.activateDateStyle(bHideTime);
1894	}
1895
1896	if (bShow)
1897	{
1898		this._auto_hide_disable();
1899		this.popup.show();
1900		setTimeout(BX.proxy(this._auto_hide_enable, this), 0);
1901	}
1902
1903	this.params.bSetFocus = typeof this.params.bSetFocus == 'undefined' ? true : !!this.params.bSetFocus;
1904	if(this.params.bSetFocus)
1905	{
1906		params.node.blur();
1907	}
1908	else
1909	{
1910		BX.bind(params.node, 'keyup', BX.defer(function(){
1911			this.SetValue(params.node.value);
1912			if(!!this.params.bTime)
1913			{
1914				if(this.value.getUTCHours() <= 0 && this.value.getUTCMinutes() <= 0)
1915					BX.removeClass(this.PARTS.TIME, 'bx-calendar-set-time-opened');
1916				else
1917					BX.addClass(this.PARTS.TIME, 'bx-calendar-set-time-opened');
1918			}
1919		}, this));
1920	}
1921
1922	return this;
1923};
1924
1925BX.JCCalendar.prototype.activateDateStyle = function(bHideTime)
1926{
1927	BX.addClass(this.DIV, 'bx-calendar-time-disabled');
1928
1929	if (!!bHideTime)
1930		BX.removeClass(this.PARTS.TIME, 'bx-calendar-set-time-opened');
1931	else
1932		BX.addClass(this.PARTS.TIME, 'bx-calendar-set-time-opened');
1933};
1934
1935BX.JCCalendar.prototype.activateTimeStyle = function(bHideTime)
1936{
1937	if (this.params.bCompatibility && !this.params.bTimeVisibility)
1938	{
1939		BX.addClass(this.PARTS.BUTTONS, 'bx-calendar-buttons-disabled');
1940		BX.addClass(this.PARTS.TIME, 'bx-calendar-set-time-wrap-simple');
1941		BX.removeClass(this.PARTS.TIME, 'bx-calendar-set-time-opened');
1942	}
1943	else
1944	{
1945		BX.removeClass(this.DIV, 'bx-calendar-time-disabled');
1946
1947		if (!!bHideTime)
1948			BX.removeClass(this.PARTS.TIME, 'bx-calendar-set-time-opened');
1949		else
1950			BX.addClass(this.PARTS.TIME, 'bx-calendar-set-time-opened');
1951	}
1952};
1953
1954BX.JCCalendar.prototype.SetDay = function(d)
1955{
1956	this.value.setUTCDate(d);
1957	return this.SetValue(this.value);
1958};
1959
1960BX.JCCalendar.prototype.SetMonth = function(m)
1961{
1962	if (this.popup_month)
1963		this.popup_month.close();
1964
1965	this.value.setUTCMonth(m);
1966
1967	if(m < 0)
1968		m += 12;
1969	else if (m >= 12)
1970		m -= 12;
1971
1972	while(this.value.getUTCMonth() > m)
1973	{
1974		this.value.setUTCDate(this.value.getUTCDate()-1);
1975	}
1976
1977	return this.SetValue(this.value);
1978};
1979
1980BX.JCCalendar.prototype.SetYear = function(y)
1981{
1982	if (this.popup_year)
1983		this.popup_year.close();
1984	this.value.setUTCFullYear(y);
1985	return this.SetValue(this.value);
1986};
1987
1988BX.JCCalendar.prototype.SetDate = function(v, bSet)
1989{
1990	v = this._check_date(v);
1991	v.setUTCHours(this.value.getUTCHours());
1992	v.setUTCMinutes(this.value.getUTCMinutes());
1993	v.setUTCSeconds(this.value.getUTCSeconds());
1994
1995	if (this.params.bTime && !bSet)
1996	{
1997		return this.SetValue(v);
1998	}
1999	else
2000	{
2001		this.SetValue(v);
2002		this.SaveValue();
2003	}
2004};
2005
2006BX.JCCalendar.prototype.SetValue = function(v)
2007{
2008	this.value = (v && v.BXCHECKED) ? v : this._check_date(v);
2009
2010	this.PARTS.MONTH.innerHTML = BX.message('MONTH_' + (this.value.getUTCMonth()+1));
2011	this.PARTS.YEAR.innerHTML = this.value.getUTCFullYear();
2012
2013	if (!!this.params.bTime)
2014	{
2015		var h = this.value.getUTCHours();
2016		if (this.bAmPm)
2017		{
2018			if (h >= 12)
2019			{
2020				this.PARTS.TIME_AMPM.innerHTML = 'PM';
2021
2022				if (h != 12)
2023					h -= 12;
2024			}
2025			else
2026			{
2027				this.PARTS.TIME_AMPM.innerHTML = 'AM';
2028
2029				if (h == 0)
2030					h = 12;
2031			}
2032		}
2033
2034		this.PARTS.TIME_INPUT_H.value = BX.util.str_pad_left(h.toString(), 2, "0");
2035		this.PARTS.TIME_INPUT_M.value = BX.util.str_pad_left(this.value.getUTCMinutes().toString(), 2, "0");
2036	}
2037
2038	this._set_layer();
2039
2040	return this;
2041};
2042
2043BX.JCCalendar.prototype.SaveValue = function()
2044{
2045	if (this.popup_month)
2046		this.popup_month.close();
2047	if (this.popup_year)
2048		this.popup_year.close();
2049
2050	var bSetValue = true;
2051	if (!!this.params.callback)
2052	{
2053		var res = this.params.callback.apply(this, [new Date(this.value.valueOf()+this.value.getTimezoneOffset()*60000)]);
2054		if (res === false)
2055			bSetValue = false;
2056	}
2057
2058	if (bSetValue)
2059	{
2060		var bTime = !!this.params.bTime && BX.hasClass(this.PARTS.TIME, 'bx-calendar-set-time-opened');
2061
2062		if (this.params.field)
2063		{
2064			var format = BX.message(bTime ? 'FORMAT_DATETIME' : 'FORMAT_DATE');
2065
2066			if(bTime && !this.params.bUseSecond)
2067			{
2068				format = format.replace(':SS', '');
2069			}
2070
2071			this.params.field.value = BX.calendar.ValueToStringFormat(this.value, format, true);
2072			BX.fireEvent(this.params.field, 'change');
2073		}
2074
2075		this.popup.close();
2076
2077		if (!!this.params.callback_after)
2078		{
2079			this.params.callback_after.apply(this, [new Date(this.value.valueOf()+this.value.getTimezoneOffset()*60000), bTime]);
2080		}
2081	}
2082
2083	return this;
2084};
2085
2086BX.JCCalendar.prototype.Close = function()
2087{
2088	if (!!this.popup)
2089		this.popup.close();
2090
2091	return this;
2092};
2093
2094BX.JCSpinner = function(params)
2095{
2096	params = params || {};
2097	this.params = {
2098		input: params.input || null,
2099
2100		delta: params.delta || 1,
2101
2102		timeout_start: params.timeout_start || 1000,
2103		timeout_cont: params.timeout_cont || 150,
2104
2105		callback_start: params.callback_start || null,
2106		callback_change: params.callback_change || null,
2107		callback_finish: params.callback_finish || null,
2108
2109		bSaveValue: typeof params.bSaveValue == 'undefined' ? !!params.input : !!params.bSaveValue
2110	};
2111
2112	this.mousedown = false;
2113	this.direction = 1;
2114};
2115
2116BX.JCSpinner.prototype.Show = function()
2117{
2118	this.node = BX.create('span', {
2119		events: {
2120			mousedown: BX.delegateEvent(
2121				{attr: 'data-dir'},
2122				BX.delegate(this.Start, this)
2123			)
2124		},
2125		html: '<a href="javascript:void(0)" class="bx-calendar-form-arrow bx-calendar-form-arrow-top" data-dir="1"><i></i></a><a href="javascript:void(0)" class="bx-calendar-form-arrow bx-calendar-form-arrow-bottom" data-dir="-1"><i></i></a>'
2126	});
2127	return this.node;
2128};
2129
2130BX.JCSpinner.prototype.Start = function()
2131{
2132	this.mousedown = true;
2133	this.direction = BX.proxy_context.getAttribute('data-dir') > 0 ? 1 : -1;
2134	BX.bind(document, "mouseup", BX.proxy(this.MouseUp, this));
2135	this.ChangeValue(true);
2136};
2137
2138BX.JCSpinner.prototype.ChangeValue = function(bFirst)
2139{
2140	if(!this.mousedown)
2141		return;
2142
2143	if (this.params.input)
2144	{
2145		var v = parseInt(this.params.input.value, 10) + this.params.delta * this.direction;
2146
2147		if (this.params.bSaveValue)
2148			this.params.input.value = v;
2149
2150		if (!!bFirst && this.params.callback_start)
2151			this.params.callback_start(this.params, v, this.direction);
2152
2153		if (this.params.callback_change)
2154			this.params.callback_change(this.params, v, this.direction);
2155
2156		setTimeout(
2157			BX.proxy(this.ChangeValue, this),
2158			!!bFirst ? this.params.timeout_start : this.params.timeout_cont
2159		);
2160	}
2161};
2162
2163BX.JCSpinner.prototype.MouseUp = function()
2164{
2165	this.mousedown = false;
2166	BX.unbind(document, "mouseup", BX.proxy(this.MouseUp, this));
2167
2168	if (this.params.callback_finish)
2169		this.params.callback_finish(this.params, this.params.input.value);
2170};
2171
2172/**************** compatibility hacks ***************************/
2173
2174window.jsCalendar = {
2175	Show: function(obj, field, fieldFrom, fieldTo, bTime, serverTime, form_name, bHideTimebar)
2176	{
2177		return BX.calendar({
2178			node: obj, field: field, form: form_name, bTime: !!bTime, currentTime: serverTime, bHideTimebar: !!bHideTimebar
2179		});
2180	},
2181
2182	ValueToString: BX.calendar.ValueToString
2183};
2184
2185
2186/************ clock popup transferred from timeman **************/
2187
2188BX.CClockSelector = function(params)
2189{
2190	this.params = params;
2191
2192	this.params.popup_buttons = this.params.popup_buttons || [
2193		new BX.PopupWindowButton({
2194			text : BX.message('CAL_BUTTON'),
2195			className : "popup-window-button-create",
2196			events : {click : BX.proxy(this.setValue, this)}
2197		})
2198	];
2199
2200	this.isReady = false;
2201
2202	this.WND = new BX.PopupWindow(
2203		this.params.popup_id || 'clock_selector_popup',
2204		this.params.node,
2205		this.params.popup_config || {
2206			titleBar: BX.message('CAL_TIME'),
2207			offsetLeft: -45,
2208			offsetTop: -135,
2209			autoHide: true,
2210			closeIcon: true,
2211			closeByEsc: true
2212		}
2213	);
2214
2215	this.SHOW = false;
2216	BX.addCustomEvent(this.WND, "onPopupClose", BX.delegate(this.onPopupClose, this));
2217
2218	this.obClocks = {};
2219	this.CLOCK_ID = this.params.clock_id || 'clock_selector';
2220};
2221
2222BX.CClockSelector.prototype.Show = function()
2223{
2224	if (!this.isReady)
2225	{
2226		//BX.timeman.showWait(this.parent.DIV);
2227
2228		BX.addCustomEvent('onClockRegister', BX.proxy(this.onClockRegister, this));
2229		return BX.ajax.get('/bitrix/tools/clock_selector.php', {start_time: this.params.start_time, clock_id: this.CLOCK_ID, sessid: BX.bitrix_sessid()}, BX.delegate(this.Ready, this));
2230	}
2231
2232	this.WND.setButtons(this.params.popup_buttons);
2233	this.WND.show();
2234
2235	this.SHOW = true;
2236
2237	if (window['bxClock_' + this.obClocks[this.CLOCK_ID]])
2238	{
2239		setTimeout("window['bxClock_" + this.obClocks[this.CLOCK_ID] + "'].CalculateCoordinates()", 40);
2240	}
2241
2242	return true;
2243};
2244
2245BX.CClockSelector.prototype.onClockRegister = function(obClocks)
2246{
2247	if (obClocks[this.CLOCK_ID])
2248	{
2249		this.obClocks[this.CLOCK_ID] = obClocks[this.CLOCK_ID];
2250		BX.removeCustomEvent('onClockRegister', BX.proxy(this.onClockRegister, this));
2251	}
2252};
2253
2254BX.CClockSelector.prototype.Ready = function(data)
2255{
2256	this.content = this.CreateContent(data);
2257	this.WND.setContent(this.content);
2258
2259	this.isReady = true;
2260	//BX.timeman.closeWait();
2261
2262	setTimeout(BX.proxy(this.Show, this), 30);
2263};
2264
2265BX.CClockSelector.prototype.CreateContent = function(data)
2266{
2267	return BX.create('DIV', {
2268		events: {click: BX.PreventDefault},
2269		html:
2270			'<div class="bx-tm-popup-clock">' + data + '</div>'
2271	});
2272};
2273
2274BX.CClockSelector.prototype.setValue = function(e)
2275{
2276	if (this.params.callback)
2277	{
2278		var input = BX.findChild(this.content, {tagName: 'INPUT'}, true);
2279		this.params.callback.apply(this.params.node, [input.value]);
2280	}
2281
2282	return BX.PreventDefault(e);
2283};
2284
2285BX.CClockSelector.prototype.closeWnd = function(e)
2286{
2287	this.WND.close();
2288	return (e || window.event) ? BX.PreventDefault(e) : true;
2289};
2290
2291BX.CClockSelector.prototype.setNode = function(node)
2292{
2293	this.WND.setBindElement(node);
2294};
2295
2296BX.CClockSelector.prototype.setTime = function(timestamp)
2297{
2298	this.params.start_time = timestamp;
2299	if (window['bxClock_' + this.obClocks[this.CLOCK_ID]])
2300	{
2301		window['bxClock_' +  this.obClocks[this.CLOCK_ID]].SetTime(parseInt(timestamp/3600), parseInt((timestamp%3600)/60));
2302	}
2303};
2304
2305BX.CClockSelector.prototype.setCallback = function(cb)
2306{
2307	this.params.callback = cb;
2308};
2309
2310BX.CClockSelector.prototype.onPopupClose = function()
2311{
2312	this.SHOW = false;
2313};
2314
2315})();
2316
2317/* End */
2318;
2319; /* Start:"a:4:{s:4:"full";s:44:"/bitrix/js/main/utils.min.js?169224746018721";s:6:"source";s:24:"/bitrix/js/main/utils.js";s:3:"min";s:28:"/bitrix/js/main/utils.min.js";s:3:"map";s:28:"/bitrix/js/main/utils.map.js";}"*/
2320var phpVars;if(!phpVars){phpVars={ADMIN_THEME_ID:".default",LANGUAGE_ID:"en",FORMAT_DATE:"DD.MM.YYYY",FORMAT_DATETIME:"DD.MM.YYYY HH:MI:SS",opt_context_ctrl:false,cookiePrefix:"BITRIX_SM",titlePrefix:"",bitrix_sessid:"",messHideMenu:"",messShowMenu:"",messHideButtons:"",messShowButtons:"",messFilterInactive:"",messFilterActive:"",messFilterLess:"",messLoading:"Loading...",messMenuLoading:"",messMenuLoadingTitle:"",messNoData:"",messExpandTabs:"",messCollapseTabs:"",messPanelFixOn:"",messPanelFixOff:"",messPanelCollapse:"",messPanelExpand:""}}var jsUtils={arEvents:Array(),addEvent:function(e,t,n,i){if(e.attachEvent)e.attachEvent("on"+t,n);else if(e.addEventListener)e.addEventListener(t,n,false);else e["on"+t]=n;this.arEvents[this.arEvents.length]={element:e,event:t,fn:n}},removeEvent:function(e,t,n){if(e.detachEvent)e.detachEvent("on"+t,n);else if(e.removeEventListener)e.removeEventListener(t,n,false);else e["on"+t]=null},removeAllEvents:function(e){var t;for(t=0;t<this.arEvents.length;t++){if(this.arEvents[t]&&(e==false||e==this.arEvents[t].element)){jsUtils.removeEvent(this.arEvents[t].element,this.arEvents[t].event,this.arEvents[t].fn);this.arEvents[t]=null}}if(e==false)this.arEvents.length=0},IsDoctype:function(){if(document.compatMode)return document.compatMode=="CSS1Compat";if(document.documentElement&&document.documentElement.clientHeight)return true;return false},GetRealPos:function(e){if(window.BX)return BX.pos(e);if(!e||!e.offsetParent)return false;var t=Array();t["left"]=e.offsetLeft;t["top"]=e.offsetTop;var n=e.offsetParent;while(n&&n.tagName!="BODY"){t["left"]+=n.offsetLeft;t["top"]+=n.offsetTop;n=n.offsetParent}t["right"]=t["left"]+e.offsetWidth;t["bottom"]=t["top"]+e.offsetHeight;return t},FindChildObject:function(e,t,n,i){if(!e)return null;var o=t.toUpperCase();var r=n?n.toLowerCase():null;var s=e.childNodes.length;for(var l=0;l<s;l++){var a=e.childNodes[l];if(a.tagName&&a.tagName.toUpperCase()==o)if(!n||a.className.toLowerCase()==r)return a;
2320if(i==true){var f;if(f=jsUtils.FindChildObject(a,t,n,true))return f}}return null},FindParentObject:function(e,t,n){if(!e)return null;var i=e;var o=t.toUpperCase();var r=n?n.toLowerCase():null;while(i.parentNode){var s=i.parentNode;if(s.tagName&&s.tagName.toUpperCase()==o)if(!n||s.className.toLowerCase()==r)return s;i=s}return null},FindNextSibling:function(e,t){if(!e)return null;var n=e;var i=t.toUpperCase();while(n.nextSibling){var o=n.nextSibling;if(o.tagName&&o.tagName.toUpperCase()==i)return o;n=o}return null},FindPreviousSibling:function(e,t){if(!e)return null;var n=e;var i=t.toUpperCase();while(n.previousSibling){var o=n.previousSibling;if(o.tagName&&o.tagName.toUpperCase()==i)return o;n=o}return null},bOpera:navigator.userAgent.toLowerCase().indexOf("opera")!=-1,bIsIE:document.attachEvent&&navigator.userAgent.toLowerCase().indexOf("opera")==-1,IsIE:function(){return this.bIsIE},IsOpera:function(){return this.bOpera},IsSafari:function(){var e=navigator.userAgent.toLowerCase();return/webkit/.test(e)},IsEditor:function(){var e=navigator.userAgent.toLowerCase();var t=(e.match(/.+(msie)[\/: ]([\d.]+)/)||[])[2];var n=/webkit/.test(e);if(this.IsOpera()||document.all&&!document.compatMode&&t<6||n)return false;return true},ToggleDiv:function(e){var t=document.getElementById(e).style;if(t.display!="none")t.display="none";else t.display="block";return t.display!="none"},urlencode:function(e){return escape(e).replace(new RegExp("\\+","g"),"%2B")},OpenWindow:function(e,t,n){var i=screen.width,o=screen.height;if(this.IsOpera()){i=document.body.offsetWidth;o=document.body.offsetHeight}window.open(e,"","status=no,scrollbars=yes,resizable=yes,width="+t+",height="+n+",top="+Math.floor((o-n)/2-14)+",left="+Math.floor((i-t)/2-5))},SetPageTitle:function(e){document.title=phpVars.titlePrefix+e;var t=document.getElementsByTagName("H1");if(t)t[0].innerHTML=e},LoadPageToDiv:function(e,t){var n=document.getElementById(t);if(!n)return;CHttpRequest.Action=function(e){CloseWaitWindow();document.getElementById(t).innerHTML=e};ShowWaitWindow();CHttpRequest.Send(e)},trim:function(e){if(typeof e=="string"||typeof e=="object"&&e.constructor==String){var t,n;n=/^[\s\r\n]+/g;t=e.replace(n,"");n=/[\s\r\n]+$/g;t=t.replace(n,"");return t}else return e},Redirect:function(e,t){var n=null,i=false;if(e&&e.length>0)n=e[0];if(!n)n=window.event;if(n)i=n.shiftKey;if(i)window.open(t);else{window.location.href=t}},False:function(){return false},AlignToPos:function(e,t,n){var i=e["left"],o=e["bottom"];var r=jsUtils.GetWindowScrollPos();var s=jsUtils.GetWindowInnerSize();if(s.innerWidth+r.scrollLeft-(e["left"]+t)<0){if(e["right"]-t>=0)i=e["right"]-t;else i=r.scrollLeft}if(s.innerHeight+r.scrollTop-(e["bottom"]+n)<0){if(e["top"]-n>=0)o=e["top"]-n;else o=r.scrollTop}return{left:i,top:o}},EvalGlobal:function(e){try{if(window.execScript)window.execScript(e,"javascript");else if(jsUtils.IsSafari())window.setTimeout(e,0);else window.eval(e)}catch(e){}},GetStyleValue:function(e,t){var n;if(e.currentStyle)n=e.currentStyle[t];else if(window.getComputedStyle)n=document.defaultView.getComputedStyle(e,null).getPropertyValue(t);if(!n)n="";return n},GetWindowInnerSize:function(e){var t,n;if(!e)e=document;if(self.innerHeight){t=self.innerWidth;n=self.innerHeight}else if(e.documentElement&&(e.documentElement.clientHeight||e.documentElement.clientWidth)){t=e.documentElement.clientWidth;n=e.documentElement.clientHeight}else if(e.body){t=e.body.clientWidth;n=e.body.clientHeight}return{innerWidth:t,innerHeight:n}},GetWindowScrollPos:function(e){var t,n;if(!e)e=document;if(self.pageYOffset){t=self.pageXOffset;n=self.pageYOffset}else if(e.documentElement&&(e.documentElement.scrollTop||e.documentElement.scrollLeft)){t=document.documentElement.scrollLeft;n=document.documentElement.scrollTop}else if(e.body){t=e.body.scrollLeft;n=e.body.scrollTop}return{scrollLeft:t,scrollTop:n}},GetWindowScrollSize:function(e){var t,n;if(!e)e=document;if(e.compatMode&&e.compatMode=="CSS1Compat"){t=e.documentElement.scrollWidth;n=e.documentElement.scrollHeight}else{if(e.body.scrollHeight>e.body.offsetHeight)n=e.body.scrollHeight;else n=e.body.offsetHeight;if(e.body.scrollWidth>e.body.offsetWidth||e.compatMode&&e.compatMode=="BackCompat"||e.documentElement&&!e.documentElement.clientWidth)t=e.body.scrollWidth;else t=e.body.offsetWidth}return{scrollWidth:t,scrollHeight:n}},GetWindowSize:function(){var e=jsUtils.GetWindowInnerSize();var t=jsUtils.GetWindowScrollPos();var n=jsUtils.GetWindowScrollSize();
2320return{innerWidth:e.innerWidth,innerHeight:e.innerHeight,scrollLeft:t.scrollLeft,scrollTop:t.scrollTop,scrollWidth:n.scrollWidth,scrollHeight:n.scrollHeight}},arCustomEvents:{},addCustomEvent:function(e,t,n,i){if(!this.arCustomEvents[e])this.arCustomEvents[e]=[];if(!n)n=[];if(!i)i=false;this.arCustomEvents[e].push({handler:t,arParams:n,obj:i})},removeCustomEvent:function(e,t){if(!this.arCustomEvents[e])return;var n=this.arCustomEvents[e].length;if(n==1){delete this.arCustomEvents[e];return}for(var i=0;i<n;i++){if(!this.arCustomEvents[e][i])continue;if(this.arCustomEvents[e][i].handler==t){delete this.arCustomEvents[e][i];return}}},onCustomEvent:function(e,t){if(!this.arCustomEvents[e])return;if(!t)t=[];var n;for(var i=0,o=this.arCustomEvents[e].length;i<o;i++){n=this.arCustomEvents[e][i];if(!n||!n.handler)continue;if(n.obj)n.handler.call(n.obj,n.arParams,t);else n.handler(n.arParams,t)}},loadJSFile:function(e,t,n){if(!n)n=document;if(typeof e=="string")e=[e];var i=function(){if(!t)return;if(typeof t=="function")return t();if(typeof t!="object"||!t.func)return;var e=t.params||{};if(t.obj)t.func.apply(t.obj,e);else t.func(e)};var o=function(t){if(t>=e.length)return i();var r=n.body.appendChild(n.createElement("script"));r.src=e[t];var s=false;r.onload=r.onreadystatechange=function(){if(!s&&(!r.readyState||r.readyState=="loaded"||r.readyState=="complete")){s=true;setTimeout(function(){o(++t)},50)}}};o(0)},loadCSSFile:function(e,t,n){if(typeof e=="string"){var i=true;e=[e]}var o,r=e.length,s=[];if(r==0)return;if(!t)t=document;if(!n)n=window;if(!n.bxhead){var l=t.getElementsByTagName("HEAD");n.bxhead=l[0]}if(!n.bxhead)return;for(o=0;o<r;o++){var a=document.createElement("LINK");a.href=e[o];a.rel="stylesheet";a.type="text/css";n.bxhead.appendChild(a);s.push(a)}if(i)return a;return s},appendBXHint:function(e,t){if(!e||!e.parentNode||!t)return;var n=new BXHint(t);e.parentNode.insertBefore(n.oIcon,e);e.parentNode.removeChild(e);n.oIcon.style.marginLeft="5px"},PreventDefault:function(e){if(!e)e=window.event;if(e.stopPropagation){e.preventDefault();e.stopPropagation()}else{e.cancelBubble=true;e.returnValue=false}return false},CreateElement:function(e,t,n,i){if(!i)i=document;var o=i.createElement(e),r;if(t){for(r in t){if(r=="className"||r=="class"){o.setAttribute("class",t[r]);if(jsUtils.IsIE())o.setAttribute("className",t[r]);continue}if(t[r]!=undefined&&t[r]!=null)o.setAttribute(r,t[r])}}if(n){for(r in n)o.style[r]=n[r]}return o},in_array:function(e,t){for(var n=0;n<t.length;n++){if(t[n]==e)return true}return false},htmlspecialchars:function(e){if(!e.replace)return e;return e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}};function JCFloatDiv(){var e=this;this.floatDiv=null;this.x=this.y=0;this.Create=function(e){var t=document.body.appendChild(document.createElement("DIV"));t.id=e.id;t.style.position="absolute";t.style.left="-10000px";t.style.top="-10000px";if(e.className)t.className=e.className;if(e.zIndex)t.style.zIndex=e.zIndex;if(e.width)t.style.width=e.width+"px";if(e.height)t.style.height=e.height+"px";return t};this.Show=function(e,t,n,i,o){var r=BX.ZIndexManager.getComponent(e);if(!r){BX.ZIndexManager.register(e)}BX.ZIndexManager.bringToFront(e);if(t<0)t=0;if(n<0)n=0;e.style.left=parseInt(t)+"px";e.style.top=parseInt(n)+"px";e.restrictDrag=o||false;if(isNaN(i))i=5;e.dxShadow=i};this.Close=function(e){if(!e)return;var t=document.getElementById(e.id+"_shadow");if(t)t.style.visibility="hidden";var n=document.getElementById(e.id+"_frame");if(n)n.style.visibility="hidden"};this.Move=function(e,t,n){if(!e)return;var i=e.dxShadow;var o=parseInt(e.style.left)+t;var r=parseInt(e.style.top)+n;if(e.restrictDrag){if(o<0)o=0;if(document.compatMode&&document.compatMode=="CSS1Compat")windowWidth=document.documentElement.scrollWidth;else{if(document.body.scrollWidth>document.body.offsetWidth||document.compatMode&&document.compatMode=="BackCompat"||document.documentElement&&!document.documentElement.clientWidth)windowWidth=document.body.scrollWidth;else windowWidth=document.body.offsetWidth}var s=e.offsetWidth;if(o>windowWidth-s-i)o=windowWidth-s-i;if(r<0)r=0}e.style.left=o+"px";e.style.top=r+"px";this.AdjustShadow(e)};this.HideShadow=function(e){var t=document.getElementById(e.id+"_shadow");t.style.visibility="hidden"};this.UnhideShadow=function(e){var t=document.getElementById(e.id+"_shadow");t.style.visibility="visible"};this.AdjustShadow=function(e){var t=document.getElementById(e.id+"_shadow");if(t&&t.style.visibility!="hidden"){var n=e.dxShadow;t.style.width=e.offsetWidth+"px";t.style.height=e.offsetHeight+"px";t.style.left=parseInt(e.style.left)+n+"px";t.style.top=parseInt(e.style.top)+n+"px"}var i=document.getElementById(e.id+"_frame");
2320if(i){i.style.width=e.offsetWidth+"px";i.style.height=e.offsetHeight+"px";i.style.left=e.style.left;i.style.top=e.style.top}};this.StartDrag=function(t,n){if(!t)t=window.event;this.x=t.clientX+document.body.scrollLeft;this.y=t.clientY+document.body.scrollTop;this.floatDiv=n;jsUtils.addEvent(document,"mousemove",this.MoveDrag);document.onmouseup=this.StopDrag;if(document.body.setCapture)document.body.setCapture();document.onmousedown=jsUtils.False;var i=document.body;i.ondrag=jsUtils.False;i.onselectstart=jsUtils.False;i.style.MozUserSelect=e.floatDiv.style.MozUserSelect="none";i.style.cursor="move"};this.StopDrag=function(t){if(document.body.releaseCapture)document.body.releaseCapture();jsUtils.removeEvent(document,"mousemove",e.MoveDrag);document.onmouseup=null;this.floatDiv=null;document.onmousedown=null;var n=document.body;n.ondrag=null;n.onselectstart=null;n.style.MozUserSelect=e.floatDiv.style.MozUserSelect="";n.style.cursor=""};this.MoveDrag=function(t){var n=t.clientX+document.body.scrollLeft;var i=t.clientY+document.body.scrollTop;if(e.x==n&&e.y==i)return;e.Move(e.floatDiv,n-e.x,i-e.y);e.x=n;e.y=i}}var jsFloatDiv=new JCFloatDiv;var BXHint=function(e,t,n){this.oDivOver=false;this.timeOutID=null;this.oIcon=null;this.freeze=false;this.x=0;this.y=0;this.time=700;if(!e)e="";this.Create(e,t,n)};BXHint.prototype.Create=function(e,t,n){var i=this,o=0,r=0,s=null,l="icon";this.bWidth=true;if(n){if(n.width===false)this.bWidth=false;else if(n.width)o=n.width;if(n.height)r=n.height;if(n.className)s=n.className;if(n.type&&(n.type=="link"||n.type=="icon"))l=n.type;if(n.time>0)this.time=n.time}if(t)l="element";if(l=="icon"){var t=document.createElement("IMG");t.src=n&&n.iconSrc?n.iconSrc:"/bitrix/themes/"+phpVars.ADMIN_THEME_ID+"/public/popup/hint.gif";t.ondrag=jsUtils.False}else if(l=="link"){var t=document.createElement("A");t.href="";t.onclick=function(e){return false};t.innerHTML="[?]"}this.element=t;if(l=="element"){if(n&&n.show_on_click){jsUtils.addEvent(t,"click",function(t){if(!t)t=window.event;i.GetMouseXY(t);i.timeOutID=setTimeout(function(){i.Show(e,o,r,s)},10)})}else{jsUtils.addEvent(t,"mouseover",function(t){if(!t)t=window.event;i.GetMouseXY(t);i.timeOutID=setTimeout(function(){i.Show(e,o,r,s)},750)})}jsUtils.addEvent(t,"mouseout",function(e){if(i.timeOutID)clearTimeout(i.timeOutID);i.SmartHide(i)})}else{this.oIcon=t;t.onmouseover=function(t){if(!t)t=window.event;i.GetMouseXY(t);i.Show(e,o,r,s)};t.onmouseout=function(){i.SmartHide(i)}}};BXHint.prototype.IsFrozen=function(){return this.freeze};BXHint.prototype.Freeze=function(){this.freeze=true;this.Hide()};BXHint.prototype.UnFreeze=function(){this.freeze=false};BXHint.prototype.GetMouseXY=function(e){if(e.pageX||e.pageY){this.x=e.pageX;this.y=e.pageY}else if(e.clientX||e.clientY){this.x=e.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)-document.documentElement.clientLeft;this.y=e.clientY+(document.documentElement.scrollTop||document.body.scrollTop)-document.documentElement.clientTop}};BXHint.prototype.Show=function(e,t,n,i){var o=document.getElementById("__BXHint_div");if(o)this.Hide();if(this.freeze)return;var r=this;var s=document.body.appendChild(document.createElement("DIV"));s.onmouseover=function(){r.oDivOver=true};s.onmouseout=function(){r.oDivOver=false;r.SmartHide(r)};s.id="__BXHint_div";s.className=i?i:"bxhint";s.style.position="absolute";if(t&&this.bWidth)s.style.width=t+"px";if(n)s.style.height=n+"px";s.innerHTML=e;var l=s.offsetWidth;var a=s.offsetHeight;if(this.bWidth){if(!t&&l>200)l=Math.round(Math.sqrt(1.618*l*a));s.style.width=l+"px";a=s.offsetHeight}var f={left:this.x+10,right:this.x+l,top:this.y,bottom:this.y+a};f=this.AlignToPos(f,l,a);jsFloatDiv.Show(s,f.left,f.top,3);s=null};BXHint.prototype.AlignToPos=function(e,t,n){var i=document.body;if(i.clientWidth+i.scrollLeft<e.left+t)e.left=e.left-t>=0?e.left-t:i.scrollLeft;if(i.clientHeight+i.scrollTop-e["bottom"]<0)e.top=e.top-n>=0?e.top-n:i.scrollTop;return e};BXHint.prototype.Hide=function(){var e=document.getElementById("__BXHint_div");if(!e)return;BX.ZIndexManager.unregister(e);jsFloatDiv.Close(e);e.parentNode.removeChild(e);e=null};BXHint.prototype.SmartHide=function(e){setTimeout(function(){if(!e.oDivOver)e.Hide()},100)};function WaitOnKeyPress(e){if(!e)e=window.event;if(!e)return;if(e.keyCode==27)CloseWaitWindow()}function ShowWaitWindow(){CloseWaitWindow();var e=jsUtils.GetWindowSize();var t=document.body.appendChild(document.createElement("DIV"));t.id="wait_window_div";t.innerHTML=phpVars.messLoading;t.className="waitwindow";t.style.right=5-e.scrollLeft+"px";t.style.top=e.scrollTop+5+"px";
2320if(jsUtils.IsIE()){var n=document.createElement("IFRAME");n.src="javascript:''";n.id="wait_window_frame";n.className="waitwindow";n.style.width=t.offsetWidth+"px";n.style.height=t.offsetHeight+"px";n.style.right=t.style.right;n.style.top=t.style.top;document.body.appendChild(n)}jsUtils.addEvent(document,"keypress",WaitOnKeyPress)}function CloseWaitWindow(){jsUtils.removeEvent(document,"keypress",WaitOnKeyPress);var e=document.getElementById("wait_window_frame");if(e)e.parentNode.removeChild(e);var t=document.getElementById("wait_window_div");if(t)t.parentNode.removeChild(t)}var jsSelectUtils={addNewOption:function(e,t,n,i,o){var r=typeof e=="string"||e instanceof String?document.getElementById(e):e;if(r){var s=r.length;if(o!==false){for(var l=0;l<s;l++)if(r[l].value==t)return}var a=new Option(n,t,false,false);r.options[s]=a}if(i===true)this.sortSelect(e)},deleteOption:function(e,t){var n=typeof e=="string"||e instanceof String?document.getElementById(e):e;if(n){for(var i=0;i<n.length;i++)if(n[i].value==t){n.remove(i);break}}},deleteSelectedOptions:function(e){var t=typeof e=="string"||e instanceof String?document.getElementById(e):e;if(t){var n=0;while(n<t.length)if(t[n].selected){t[n].selected=false;t.remove(n)}else n++}},deleteAllOptions:function(e){if(e){for(var t=e.length-1;t>=0;t--)e.remove(t)}},optionCompare:function(e,t){var n=e.optText.toLowerCase();var i=t.optText.toLowerCase();if(n>i)return 1;if(n<i)return-1;return 0},sortSelect:function(e){var t=typeof e=="string"||e instanceof String?document.getElementById(e):e;if(t){var n=[];var i=t.options.length;for(var o=0;o<i;o++){n[o]={optText:t[o].text,optValue:t[o].value}}n.sort(this.optionCompare);t.length=0;i=n.length;for(var o=0;o<i;o++){var r=new Option(n[o].optText,n[o].optValue,false,false);t[o]=r}}},selectAllOptions:function(e){var t=typeof e=="string"||e instanceof String?document.getElementById(e):e;if(t){var n=t.length;for(var i=0;i<n;i++)t[i].selected=true}},selectOption:function(e,t){var n=typeof e=="string"||e instanceof String?document.getElementById(e):e;if(n){var i=n.length;for(var o=0;o<i;o++)n[o].selected=n[o].value==t}},addSelectedOptions:function(e,t,n,i){if(!e)return;var o=e.length;for(var r=0;r<o;r++)if(e[r].selected)this.addNewOption(t,e[r].value,e[r].text,i,n)},moveOptionsUp:function(e){if(!e)return;var t=e.length;for(var n=0;n<t;n++){if(e[n].selected&&n>0&&e[n-1].selected==false){var i=new Option(e[n].text,e[n].value);var o=new Option(e[n-1].text,e[n-1].value);e[n]=o;e[n].selected=false;e[n-1]=i;e[n-1].selected=true}}},moveOptionsDown:function(e){if(!e)return;var t=e.length;for(var n=t-1;n>=0;n--){if(e[n].selected&&n<t-1&&e[n+1].selected==false){var i=new Option(e[n].text,e[n].value);var o=new Option(e[n+1].text,e[n+1].value);e[n]=o;e[n].selected=false;e[n+1]=i;e[n+1].selected=true}}}};
2321/* End */
2322;
2323//# sourceMappingURL=kernel_main.map.js

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.