<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">window.xdgetRepository={xdgets:[],registerXdget:function(a){this.xdgets[a.type]=a},getXdgets:function(){return this.xdgets},getXdgetData:function(a){if(!this.xdgets[a])throw"Wrong xdget type: "+a;return this.xdgets[a]},createNewXdgetBlock:function(a,b,c,d){xdgetData=this.getXdgetData(a);a=xdgetData.blockTag;b&amp;&amp;b.tag&amp;&amp;(a=b.tag);a=$("&lt;"+a+" class='xdget-block xdget-"+xdgetData.type+"' /&gt;");var e="r"+Math.round(1E4*Math.random());b||(b=xdgetData.defaultParams);a[xdgetData.jsName]({xdgetId:e,type:xdgetData.type,
name:xdgetData.jsName,label:xdgetData.label,params:b,editorEnabled:c?c.options.editorEnabled:!0,existedXdget:!1,parentXdget:c,jsName:xdgetData.jsName,iconClass:xdgetData.iconClass,selfBlock:xdgetData.selfBlock,selfMeaningful:xdgetData.selfMeaningful,style:d,settings:xdgetData.settings});return a},allowedInsertInto:function(a,b){return 1==this.xdgets[a].allowedParentTypes?!0:-1!=this.xdgets[a].allowedParentTypes.indexOf(b)}};
jQuery.widget("gc.abstractXdget",{contentEl:null,blockerEl:null,uncontrolled:!1,type:null,label:null,parentXdget:null,isRoot:!1,jsName:null,onChange:null,currentElClass:null,currentElId:null,xdgetId:null,style:null,settedStyles:{},oldWidth:0,options:{uncontrolled:!1,xdgetId:null,type:null,name:null,params:{},editorEnabled:!1,existedXdget:!0,parentXdget:null,isRoot:!1,jsName:null,settings:{}},params:{},_create:function(){var a=this;this.element.data("xdget",this);this.jsName=this.options.jsName;this.xdgetId=
this.options.xdgetId;this.contentEl=this.element;this.type=this.options.type;this.isRoot=this.options.isRoot;this.parentXdget=this.options.parentXdget;this.isUncontrolled=this.options.uncontrolled;this.options.params.uncontrolled&amp;&amp;(this.isUncontrolled=this.options.params.uncontrolled);!this.parentXdget&amp;&amp;this.element.parents(".xdget-block")&amp;&amp;(this.parentXdget=this.element.parents(".xdget-block").data("xdget"));this.isRoot&amp;&amp;(window.rootXdget=this);this.build();this.setParams(this.options.params,this.options.existedXdget,
!0);(fixedClass=this.getParam("fixedClass"))&amp;&amp;this.element.addClass(fixedClass);this.getParam("clickLink")&amp;&amp;this.element.addClass("with-link");this.isEditorEnabled()?(this.enableEditor(),a=this,this.element.on("mouseover",function(b){if(!$(this).hasClass("dragged")){if(!a.isEditorEnabled()||window.xdgetRootEditorBlock.xdgetEditorControl("isBlocked"))return!1;window.xdgetDragged?($(this).addClass("hovered-add-sibling"),$(this).addClass("hovered-add-child")):$(this).addClass("hovered");b.preventDefault();
b.stopPropagation()}}),this.element.on("mouseout",function(a){$(this).removeClass("hovered");$(this).removeClass("hovered-add-sibling");$(this).removeClass("hovered-add-child");a.preventDefault();a.stopPropagation()})):this.getParam("clickLink")&amp;&amp;this.element.click(function(){$.gc.abstractXdget.prototype.redirectTo(a.getParam("clickLink"))});this.buildPlaceholders();this.options.style&amp;&amp;this.setStyle(this.options.style)},build:function(){},enableEditor:function(){var a=this;this.element.addClass("editable");
this.isContainer()||this.element.addClass("fadeable");this.element.click(function(b){b.stopPropagation();b.preventDefault();if(!a.isEditorEnabled())return!1;window.xdgetRootEditorBlock.xdgetEditorControl("isBlocked")?window.xdgetRootEditorBlock.xdgetEditorControl("clickedOnOtherXdget",a):a.startEditing(!0)});this.enableDraggable()},addBlockerEl:function(){this.blockerEl=this.element;this.blockerEl=$('&lt;div class="xdget-blocker"&gt;&lt;/div&gt;');this.blockerEl.appendTo(this.element)},enableDraggable:function(){var a=
this.getLabel(),b=this;this.isDraggable()&amp;&amp;this.element.draggable({appendTo:"body",cancel:!1,helper:function(){return $("&lt;div class='xdget-drag-block'&gt;"+a+"&lt;/div&gt;")},start:function(){window.xdgetDragged=!0;window.xdgetDraggedType=b.type;b.element.addClass("xdget-dragged");$(".xdget-root").addClass("drag-mode")},stop:function(){window.xdgetDragged=!1;b.element.removeClass("xdget-dragged");$(".xdget-root").removeClass("drag-mode")}})},startEditing:function(a){window.xdgetRootEditorBlock.xdgetEditorControl("setXdget",
this,a)},finishEditing:function(){},getParam:function(a,b){return"undefined"==typeof this.params[a]||""==this.params[a]?b:"false"==this.params[a]?!1:this.params[a]},getParams:function(){return this.params},getParamsAsObject:function(){return this.params},setParams:function(a,b,c){a.elClass!=this.currentElClass&amp;&amp;(this.currentElClass&amp;&amp;""!=this.currentElClass&amp;&amp;this.contentEl.removeClass(this.currentElClass),this.contentEl.addClass(a.elClass),this.currentElClass=a.elClass);if(a.elId||this.currentElId){var d=
"",d=""!=a.elId?a.elId:"xdget"+this.xdgetId;this.contentEl.attr("id",d);this.currentElId=d}d=this.params.mdWidth;this.params={};for(key in a)this.params[key]=a[key];this.applyParams(b);this.refresh();d!=this.params.mdWidth&amp;&amp;this.parentXdget&amp;&amp;this.parentXdget.refresh();c||this.changed()},refresh:function(){var a=this.getMdWidth();this.isInRow()&amp;&amp;(a&amp;&amp;0&lt;a||a!=this.oldWidth)&amp;&amp;this.setBlockSize(this.element,a,"gc");this.oldWidth=a;this.buildInTitle()},isRow:function(){return!1},isInRow:function(){return this.parentXdget&amp;&amp;
this.parentXdget.isRow()},rebuild:function(){this.refresh();this.changed()},applyParams:function(a){},recalcSize:function(){},isDroppable:function(){return!1},isDraggable:function(){return!this.isRootContainer()},getParentXdgetByType:function(a){return this.type==a?this:this.parentXdget?this.parentXdget.getParentXdgetByType(a):null},getXdgetPath:function(){var a=[];this.parentXdget&amp;&amp;(a=this.parentXdget.getXdgetPath());a.push(this);return a},getLabel:function(){return this.options.label},isRootContainer:function(){return!1},
isEditorEnabled:function(){return this.options.editorEnabled},buildInTitle:function(){if(this.isEditorEnabled()&amp;&amp;!this.element.data("disable-in-title")){this.element.find("&gt; .xdget-in-title").detach();var a=this.getLabel();if(elId=this.getParam("elId"))a+=" #"+elId;if(elClass=this.getParam("elClass"))a+=" ."+elClass;if(this.getParam("visibleTo")||this.getParam("invisilbeTo")){var b="\u041d\u0415 \u0412\u0421\u0415\u041c \u041f\u041e\u041a\u0410\u0417\u042b\u0412\u0410\u0415\u0422\u0421\u042f";void 0!==
Yii&amp;&amp;(b=Yii.t("common",b));a+=" -- "+b+" -- "}b=$("&lt;div class='xdget-in-title'/&gt;");b.html(a);b.appendTo(this.element)}},buildPlaceholders:function(){if(!this.isEditorEnabled())return!1;this.element.find("&gt; .xdget-in-placeholder").detach();var a=this,b=[];this.isRootContainer()||(b=["top","bottom","left","right"]);this.isContainer()&amp;&amp;0==this.blocks.length&amp;&amp;b.push("full");if(0==b.length)return!1;for(var c=0;c&lt;b.length;c++){var d=b[c],e=$("&lt;div/&gt;");e.addClass("xdget-in-placeholder");"full"==d?e.addClass("xdget-in-child-placeholder"):
e.addClass("xdget-in-sibling-placeholder");e.addClass("xdget-in-placeholder-"+d);e.appendTo(this.element);e.data("position",d);e.on("mouseover",function(a){window.xdgetDragged&amp;&amp;$(this).addClass("hovered-placeholder")});e.on("mouseout",function(a){window.xdgetDragged&amp;&amp;$(this).removeClass("hovered-placeholder")});e.droppable({tolerance:"pointer",greedy:!0,drop:function(b,c){var d=$(c.draggable);a.droppedBlock(d,$(this).data("position"))}})}},getTargetXdget:function(a,b,c){return this.parentXdget?this.parentXdget.getTargetXdget(a,
!0,this):null},droppedBlock:function(a,b){this.canAddElement();var c=this.parentXdget,d=null;droppedBlockXdgetType=null;a.data("xdget")&amp;&amp;(d=a.data("xdget").parentXdget,droppedBlockXdgetType=a.data("xdget").type);droppedBlockXdgetType||(droppedBlockXdgetType=a.data("xdgetData").type);if("full"!=b||!this.isAllowableChildType(droppedBlockXdgetType)||this.isContainer()&amp;&amp;this.addBlockInside())if("full"==b){targetXdget=this.getTargetXdget(droppedBlockXdgetType,!0);if(!targetXdget)return alert("\u0418\u0437\u0432\u0438\u043d\u0438\u0442\u0435, \u0432 \u044d\u0442\u043e\u0442 \u0431\u043b\u043e\u043a \u043d\u0435\u043b\u044c\u0437\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442"),
!1;a=targetXdget.processDroppedBlock(a,this,b)}else a=this.parentXdget.processDroppedBlock(a,this,b);else targetXdget=this,a=this.parentXdget.processDroppedBlock(a,this,"bottom");this.rebuild();c&amp;&amp;c!=this&amp;&amp;c.rebuild();d&amp;&amp;d!=c&amp;&amp;d!=this&amp;&amp;d.rebuild();this.parentXdget&amp;&amp;this.parentXdget.rebuild();window.xdgetRootEditorBlock.xdgetEditorControl("blocksChanged");a.data("xdget").startEditing();window.rootXdget.optimize()},optimize:function(){},removeBlockSizeClass:function(a,b){b||(b="md");for(var c=a.get(0).className.split(" "),
d=0;d&lt;c.length;d++){var e=c[d];e.substr(0,7)=="col-"+b+"-"&amp;&amp;a.removeClass(e)}},replaceXdgetWith:function(a){if(!a)return console.error("Try to replace xdget with null"),!1;a.parentXdget=this.parentXdget;this.element.replaceWith(a.element);a.parentXdget&amp;&amp;a.parentXdget.rebuild();this.removeBlockSizeClass(a.element)},destroyXdget:function(a){var b=this.parentXdget;this.element.detach();b&amp;&amp;b.rebuild();window.xdgetRootEditorBlock.xdgetEditorControl("blocksChanged");a&amp;&amp;window.rootXdget.optimize()},getMdWidth:function(){return 1*
this.getParam("mdWidth","m0").replace("m","")},changed:function(){if(this.onChange)this.onChange();this.parentXdget&amp;&amp;this.parentXdget.changed()},getAsObject:function(){var a=this.getParamsAsObject();a.mdWidth=this.params.mdWidth;a={type:this.type,xdgetId:this.options.xdgetId,params:a};this.style&amp;&amp;(a.style=this.style);return a},getChildBlocks:function(){return[]},canAddElement:function(){return!0},isAutoContainer:function(){return!0},isContainer:function(){return!1},getElementTitle:function(){return(value=
this.getParam("elementTitle"))||(value=this.getSetting("elementTitle"))?value:this.getLabel()},setParam:function(a,b){this.options.params[a]=b;this.params[a]=b},setBlockSize:function(a,b,c){c||(c="md");this.removeBlockSizeClass(a,c);a.addClass("col-"+c+"-"+b)},resizeChildren:function(){},canAddSubcontainer:function(){return!0},isAllowableChildType:function(a){a=xdgetRepository.getXdgetData(a);return 1==a.allowedParentTypes?!0:a.allowedParentTypes&amp;&amp;-1!=a.allowedParentTypes.indexOf(this.type)?!0:!1},
isAllowableSiblingType:function(a){if(this.parentXdget)return this.parentXdget.isAllowableChildType(a)},isAllowableAddType:function(a){return this.isAllowableChildType(a)},allowableChildTypes:function(){return null},strictAddTypes:function(){return this.allowableChildTypes()||this.parentXdget&amp;&amp;this.parentXdget.allowableChildTypes()},setStyle:function(a){for(key in this.settedStyles)a[key]||(this.element.css(key,""),this.settedStyles[key]=null);for(key in a){var b=a[key];"background-image"==key&amp;&amp;b&amp;&amp;
(b='url("'+b+'")');this.settedStyles[key]=b;-1&lt;key.indexOf("color")&amp;&amp;b?b="#"+b:this.isNumber(b)&amp;&amp;(b+="px");this.element.css(key,b)}this.style=a},isNumber:function(a){return!isNaN(parseFloat(a))&amp;&amp;isFinite(a)},useChildAvailableChildren:function(){return!1},getOwnAvailableChildren:function(a){a||(a={});return a},getAvailableChildren:function(a,b,c,d){this.getOwnAvailableChildren(a);this.parentXdget&amp;&amp;b&amp;&amp;this.parentXdget.getAvailableChildren(a,!0,!0,this);if(window.savedXdgets)for(b=0;b&lt;window.savedXdgets.length;b++)c=
window.savedXdgets[b],c.group="widgets",c.label=c.params.title,c.type="insertEmbed",c.params.inherited=!0,a["xdget"+c.xdgetId]=c},applyCss:function(){if(this.params.css){var a=$("#css"+this.xdgetId);0&lt;a.length?a.html(this.params.css):(a=$('&lt;style id="css'+this.xdgetId+'"&gt;'),a.appendTo($("body")));a.html(this.params.css)}else $("#css"+this.xdgetId).detach()},getSetting:function(a){return this.options.settings?this.options.settings[a]:null},getAvailableCssClasses:function(){var a={};this.fillAvailableClasses(a);
return a},fillAvailableClasses:function(a){a["block-center"]={label:"\u0426\u0435\u043d\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u0431\u043b\u043e\u043a"}},addBlockInside:function(){return!1},redirectTo:function(a,b){if(window.appHandleAction){var c=!0;if(!b)try{var d=window.internalDomains||[],e=(new URL(a)).hostname,c=-1===d.indexOf(e)}catch(f){c=!1}0!==a.indexOf("http")&amp;&amp;0!==a.indexOf("//")&amp;&amp;(a=location.origin+a);window.appHandleAction({type:"navigate",url:a,openInExternalApp:c})}else b?
window.open(a):location.href=a}});
jQuery.widget("gc.xdget_container",$.gc.abstractXdget,{blocks:null,columnNo:null,options:{},build:function(){$.gc.abstractXdget.prototype.build.call(this);this.element.addClass(this.getBlockClass());this.element.addClass("xdget-common-container");!this.options.existedXdget&amp;&amp;this.options.params.children&amp;&amp;this.createChildren()},getBlockClass:function(){return"xdget-col"},applyParams:function(a){this.refresh();this.parentXdget&amp;&amp;this.parentXdget.resizeChildren();this.params.content&amp;&amp;""!=this.params.content?
(a=this.element.find("&gt; .xdget-container-self-content"),this.params.link?($newSelfContent=$("&lt;a class='xdget-container-self-content'&gt;"),$newSelfContent.attr("href",this.params.link)):$newSelfContent=$("&lt;span class='xdget-container-self-content'&gt;"),$newSelfContent.html(this.params.content),0&lt;a.length?a.replaceWith($newSelfContent):$newSelfContent.prependTo(this.element)):this.element.find("&gt; .xdget-container-self-content").detach()},getChildBlocks:function(){return this.contentEl.find("&gt; .xdget-block")},
addNewXdget:function(a){$xdgetBlock=xdgetRepository.createNewXdgetBlock(a.type,a.params,this,a.style);this.appendXdgetBlock($xdgetBlock,null,"full");return $xdgetBlock},appendXdgetBlock:function(a,b,c){this.removeBlockSizeClass(a);a.data("xdget").parentXdget=this;b?"before"==c?a.insertBefore(b.element):a.insertAfter(b.element):a.appendTo(this.contentEl);this.refresh()},createChildren:function(){for(key in this.options.params.children)this.addNewXdget(this.options.params.children[key])},isRootContainer:function(){return this.isRoot},
unwrap:function(){this.blocks=this.getChildBlocks();for(var a=this,b=0;b&lt;this.blocks.length;b++){var c=$(this.blocks[b]);this.parentXdget.appendXdgetBlock(c,a,"bottom");a=c.data("xdget");c.data("xdget").optimize()}this.destroyXdget();this.blocks=[]},optimize:function(){this.blocks=this.getChildBlocks();for(var a=0;a&lt;this.blocks.length;a++)$(this.blocks[a]).data("xdget").optimize();"row"==this.type&amp;&amp;1==this.blocks.length&amp;&amp;this.unwrap();"container"==this.type&amp;&amp;"row"!=this.parentXdget.type&amp;&amp;this.unwrap();
this.isAutoContainer()&amp;&amp;0==this.blocks.length&amp;&amp;this.destroyXdget()},rebuild:function(){if(window.xdgetNoRebuild)return!1;this.blocks=this.getChildBlocks();this.refresh();this.isContainer()&amp;&amp;this.buildPlaceholders();0&lt;this.blocks.length&amp;&amp;this.element.find("&gt; .xdget-in-placeholder-full").detach();this.parentXdget&amp;&amp;this.parentXdget.rebuild();this.changed()},refresh:function(){$.gc.abstractXdget.prototype.refresh.call(this);this.blocks=this.getChildBlocks();0==this.blocks.length?this.element.addClass("empty"):
this.element.removeClass("empty");this.resizeChildren()},resizeChildren:function(){},getBlocksCount:function(){return this.blocks.length},isDroppable:function(){return!0},wrapDraggedBlock:function(a){$result=a;$result.hasClass("new-xdget")&amp;&amp;(a=a.data("xdgetData"),$result=xdgetRepository.createNewXdgetBlock(a.type,a.params,this));return $result},processDroppedBlock:function(a,b,c){a=this.wrapDraggedBlock(a);switch(c){case "full":this.isAutoContainer()?this.appendXdgetBlock(a):this.appendXdgetBlock(a,
null,"after");break;case "top":this.appendXdgetBlock(a,b,"before");break;case "bottom":this.appendXdgetBlock(a,b,"after");break;case "left":this.makeSubcontainer(a,b,"before");break;case "right":this.makeSubcontainer(a,b,"after")}this.refresh();return a},getSubcontainerType:function(){return"row"},makeSubcontainer:function(a,b,c){if(this.canAddSubcontainer())$subcontainer=xdgetRepository.createNewXdgetBlock(this.getSubcontainerType(),{},this),$subcontainerXdget=$subcontainer.data("xdget"),$subcontainer.insertBefore(b.element),
window.xdgetNoRebuild=!0,$subcontainerXdget.appendXdgetBlock(b.element),$subcontainerXdget.appendXdgetBlock(a,b,c),window.xdgetNoRebuild=!1;else return this.appendXdgetBlock(a,b,c)},getLabel:function(){return this.isRootContainer()?Yii.t("common","\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430"):this.columnNo?Yii.t("common","\u043a\u043e\u043b\u043e\u043d\u043a\u0430")+" "+this.columnNo+"":Yii.t("common","\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440")},getParamsAsObject:function(){var a=
$.gc.abstractXdget.prototype.getParamsAsObject.call(this);a.children=[];if(!this.getParam("inherited")){this.blocks=this.getChildBlocks();for(var b=0;b&lt;this.blocks.length;b++){var c=$(this.blocks[b]).data("xdget");c&amp;&amp;a.children.push(c.getAsObject())}}return a},isAutoContainer:function(){return"undefined"!=typeof this.getSetting("isAutoContainer")?this.getSetting("isAutoContainer"):!this.isRootContainer()},isContainer:function(){return!0},getAvailableChildren:function(a,b,c,d){$.gc.abstractXdget.prototype.getAvailableChildren.call(this,
a,b,c);c&amp;&amp;this.useChildAvailableChildren()&amp;&amp;this.getChildBlocks().each(function(b,c){var g=$(c).data("xdget");g&amp;&amp;g!=d&amp;&amp;g.getAvailableChildren(a,!1,!0)})},getTargetXdget:function(a,b,c){if(this.isAllowableChildType(a))return this;var d=null;this.getChildBlocks().each(function(b,f){var g=$(f).data("xdget");if(g&amp;&amp;g.isContainer()&amp;&amp;g!=c&amp;&amp;(result=g.getTargetXdget(a,!1)))return d=result,!1});return d?d:b&amp;&amp;this.parentXdget?this.parentXdget.getTargetXdget(a,!0,this):null},addBlockInside:function(){return!0}});
window.Yii||(window.Yii={t:function(a,b){return b}});jQuery.widget("gc.xdget_form",$.gc.xdget_container,{getBlockClass:function(){return"form"},getLabel:function(){return Yii.t("common","\u0424\u043e\u0440\u043c\u0430")},isAutoContainer:function(){return!1}});
jQuery.widget("gc.xdget_formField",$.gc.abstractXdget,{fieldWidget:null,applyParams:function(){this.element.addClass("xdget-form-field-"+this.getParam("fieldName"));null==this.fieldWidget&amp;&amp;this.params.fieldType&amp;&amp;this.params.fieldOptions&amp;&amp;(this.element.empty(),$el=$("&lt;div class='form-field form-field-"+this.getFieldName()+"'/&gt;"),this.params.fieldOptions.settings||(this.params.fieldOptions.settings={}),window.gcCreateFieldWidget($el,this.params.fieldType,{field:this.params.fieldOptions,hideShowInTableInput:!0}),
this.fieldWidget=$el.data("fieldWidget"),$el.appendTo(this.element),this.element.find("input,textarea").addClass("form-control"),this.element.find("input,textarea").addClass("form-field-"+this.getFieldName()),this.element.find("input,textarea").attr("name",this.getFieldName()))},build:function(){this.element.addClass("xdget-formField")},getElementTitle:function(){return this.fieldWidget&amp;&amp;this.fieldWidget.field.label&amp;&amp;""!=this.fieldWidget.field.label?this.fieldWidget.field.label:this.getParam("fieldName")},
getFieldName:function(){return this.getParam("fieldName")},getFieldValue:function(){return this.fieldWidget.getValue()},validate:function(){var a=this.getFieldValue();if(this.params.fieldOptions.required&amp;&amp;"false"!=this.params.fieldOptions.required&amp;&amp;!a)return this.element.addClass("has-error"),!1;this.element.removeClass("has-error");return!0},getFieldLabel:function(){var a=this.getParam("fieldOptions").label;return a?a:this.getDefaultLabel()},getDefaultLabel:function(){var a=this.getParam("fieldName");
emailValue="E-Mail";nameValue="\u0412\u0430\u0448\u0435 \u0438\u043c\u044f";firstNameValue="\u0418\u043c\u044f";lastNameValue="\u0424\u0430\u043c\u0438\u043b\u0438\u044f";phoneValue="\u0422\u0435\u043b\u0435\u0444\u043e\u043d";phoneVerifyValue="\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430";birthdayValue="\u0414\u0430\u0442\u0430 \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f";avatarValue="\u0410\u0432\u0430\u0442\u0430\u0440";
passwordValue="\u041f\u0430\u0440\u043e\u043b\u044c";cityValue="\u0413\u043e\u0440\u043e\u0434";"undefined"!=typeof Yii&amp;&amp;(emailValue=Yii.t("common","E-Mail"),nameValue=Yii.t("common","Your name"),firstNameValue=Yii.t("common","Name"),lastNameValue=Yii.t("common","Surname"),phoneValue=Yii.t("common","Phone"),phoneVerifyValue=Yii.t("common","Verify your phone"),birthdayValue=Yii.t("common","Birthday"),avatarValue=Yii.t("common","Avatar"),passwordValue=Yii.t("common","Password"),cityValue=Yii.t("common",
"City"));switch(a){case "email":return emailValue;case "full_name":case "name":return nameValue;case "first_name":return firstNameValue;case "last_name":return lastNameValue;case "phone":return phoneValue;case "phoneConfirm":return phoneVerifyValue;case "birthday":return birthdayValue;case "profile_image":return avatarValue;case "password":return passwordValue;case "city":return cityValue;default:return a}},_setValue:function(a,b){this.element.find("input").val(a);"file"==this.getParam("fieldType")&amp;&amp;
this.element.find(".form-field").data("fieldWidget").valueChanged(!0);"phone_confirm"==this.getParam("fieldType")&amp;&amp;this.element.find(".form-field").data("fieldWidget").valueChanged(a,b);a&amp;&amp;""!=a&amp;&amp;("email"==this.getParam("fieldName")&amp;&amp;this.element.find("input").attr("disabled","disabled"),this.params.fieldOptions.hide_filled&amp;&amp;"false"!=this.params.fieldOptions.hide_filled&amp;&amp;("phone_confirm_code"==this.params.fieldName?-1==a&amp;&amp;this.element.hide():this.element.hide()))}});
jQuery.widget("gc.xdget_substitution",$.gc.xdget_container,{options:{},build:function(){if(!this.isEditorEnabled()){var a=this;if(this.options.settings){var b=[];this.options.settings.setupUrl&amp;&amp;(e=$('&lt;button class="btn global-edit-btn "&gt;&lt;span class="fa fa-puzzle-piece"&gt;&lt;/span&gt; '+Yii.t("common","Customize view")+"&lt;/button&gt;"),e.click(function(){$.gc.abstractXdget.prototype.redirectTo(a.options.settings.setupUrl)}),b.push(e));if(this.options.settings.buttons)for(var c=0;c&lt;this.options.settings.buttons.length;c++){var d=
this.options.settings.buttons[c],e=$('&lt;button class="btn '+d["class"]+' global-edit-btn "&gt;'+(d.icon?"&lt;span class='"+d.icon+"'&gt;&lt;/span&gt; ":"")+d.label+"&lt;/button&gt;");e.data("url",d.url);e.data("newWindow",d.newWindow);d.confirm&amp;&amp;e.data("confirm-text",d.confirm);e.appendTo($("body"));d.customHandler||e.click(function(){if(!$(this).data("confirm-text")||confirm($(this).data("confirm-text"))){var a=$(this).data("url");$(this).data("newWindow")?$.gc.abstractXdget.prototype.redirectTo(a,!0):$.gc.abstractXdget.prototype.redirectTo(a)}});
b.push(e)}if(0&lt;b.length)for(d=$(".inline-global-controls"),0==d.length&amp;&amp;(d=$('&lt;div class="global-controls"&gt;&lt;/div&gt;'),d.appendTo($("body"))),c=0;c&lt;b.length;c++){var e=b[c];e.appendTo(d)}}}},applyParams:function(a){},getChildBlocks:function(){return this.contentEl.find(".xdget-area")},getLabel:function(){return"\u0428\u0430\u0431\u043b\u043e\u043d"},canAddElement:function(){return!1}});
jQuery.widget("gc.xdget_tag",$.gc.abstractXdget,{build:function(){},applyParams:function(a){a||(a=this.getParam("content"),this.contentEl.html(a),this.isEditorEnabled()&amp;&amp;this.buildPlaceholders())},getElementTitle:function(){var a=$.gc.abstractXdget.prototype.getElementTitle.call(this),b=this.getParam("content",a);return""==b?a:b},getTag:function(){return this.options.params.tag?this.options.params.tag:"span"}});
jQuery.widget("gc.xdget_list",$.gc.xdget_container,{getBlockClass:function(){return"list"},getLabel:function(){return Yii.t("common","\u0421\u043f\u0438\u0441\u043e\u043a")},isAutoContainer:function(){return!1},canAddSubcontainer:function(){return!1},allowableChildTypes:function(){return["item"]},useChildAvailableChildren:function(){return!0}});
jQuery.widget("gc.xdget_area",$.gc.xdget_container,{canBeInherited:!1,descriptionLabel:!1,options:{},build:function(){$.gc.xdget_container.prototype.build.call(this);this.options.editorEnabled&amp;&amp;this.addBlockerEl();this.options.params.canBeInherited&amp;&amp;(this.canBeInherited=!0)},applyParams:function(a){$.gc.xdget_container.prototype.applyParams.call(this,a);this.options.editorEnabled&amp;&amp;this.getParam("inherited")?this.element.addClass("blocked"):this.element.hasClass("blocked")&amp;&amp;this.element.removeClass("blocked")},
getLabel:function(){return Yii.t("common","\u041e\u0431\u043b\u0430\u0441\u0442\u044c: ")+this.getParam("areaName")},isRootContainer:function(){return!0},getParamsAsObject:function(){var a=$.gc.xdget_container.prototype.getParamsAsObject.call(this);a.areaName=this.getParam("areaName");a.inherited=this.getParam("inherited")?1:0;a.autoCreated=this.getParam("autoCreated");return a},refresh:function(){$.gc.xdget_container.prototype.refresh.call(this);this.isEditorEnabled()&amp;&amp;(this.element.hasClass("empty")?
this.descriptionLabel||(this.descriptionLabel=$("&lt;div&gt;\u041e\u0431\u043b\u0430\u0441\u0442\u044c "+this.getParam("areaName")+"&lt;/div&gt;"),this.descriptionLabel.appendTo(this.element)):this.descriptionLabel&amp;&amp;(this.descriptionLabel.detach(),this.descriptionLabel=null))},getOwnAvailableChildren:function(a){$.gc.xdget_container.prototype.getOwnAvailableChildren.call(this,a);var b=[{type:"div",params:{elClass:"container"}}],c=[{type:"div",params:{elClass:"container",children:[{type:"row",params:{children:[{type:"div",
params:{elClass:"overview",children:[{type:"header",params:{content:Yii.t("common","\u041e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u043b\u0435\u043d\u0434\u0438\u043d\u0433 \u0434\u043b\u044f \u043c\u043e\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430")}},{type:"html",params:{elClass:"summary",content:"&lt;ul&gt;&lt;li&gt;\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u0439 \u0434\u0438\u0437\u0430\u0439\u043d&lt;/li&gt;&lt;li&gt;\u0413\u0438\u0431\u043a\u0430\u044f \u0432\u0435\u0440\u0441\u0442\u043a\u0430&lt;/li&gt;&lt;li&gt;\u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0441\u0431\u043e\u0440 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043e\u0432&lt;/li&gt;&lt;li&gt;\u0412\u0441\u0442\u0430\u0432\u043a\u0430 \u0432\u0438\u0434\u0435\u043e&lt;/li&gt;&lt;/ul&gt;"}}]}},
{type:"div",params:{children:[{type:"video",params:{type:"vimeo",videoId:101321156,playerWidth:500,playerHeight:280}}]}}]}}]}}];a.sectionEmpty={group:"section",iconClass:"fa fa-square-o",type:"section",label:Yii.t("common","\u041f\u0443\u0441\u0442\u0430\u044f \u0441\u0435\u043a\u0446\u0438\u044f"),params:{children:b}};a.sectionPattern={group:"section",iconClass:"fa fa-square",type:"section",label:Yii.t("common","\u0421\u0435\u043a\u0446\u0438\u044f \u0441 \u0444\u043e\u043d\u043e\u043c"),params:{elClass:"has-pattern",
children:b}};a.sectionPromo={group:"section",iconClass:"fa fa-certificate",type:"section",label:Yii.t("common","\u041f\u0440\u043e\u043c\u043e \u0441 \u0432\u0438\u0434\u0435\u043e"),params:{elClass:"promo",children:c}};return a},hasOwnAvailableChildren:function(){return!0}});
jQuery.widget("gc.xdget_button",$.gc.xdget_tag,{applyParams:function(a){$.gc.xdget_tag.prototype.applyParams.call(this,a);if(!this.isEditorEnabled()){var b=this.getParam("onClick");b&amp;&amp;this.element.click(function(){eval(b)})}},getTag:function(){return"button"},fillAvailableClasses:function(a){$.gc.xdget_tag.prototype.fillAvailableClasses.call(this,a);classes["btn-block"]={label:"\u041a\u043d\u043e\u043f\u043a\u0430 \u043d\u0430 \u0432\u0441\u044e \u0448\u0438\u0440\u0438\u043d\u0443 \u0431\u043b\u043e\u043a\u0430"};
classes["btn-success"]={label:"\u041a\u043d\u043e\u043f\u043a\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f (\u0437\u0435\u043b\u0435\u043d\u0430\u044f)"};classes["btn-primary"]={label:"\u041a\u043d\u043e\u043f\u043a\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f (\u0441\u0438\u043d\u044f\u044f)"};classes["btn-warning"]={label:"\u041a\u043d\u043e\u043f\u043a\u0430 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f (\u0436\u0435\u043b\u0442\u0430\u044f)"};
classes["btn-danger"]={label:"\u041a\u043d\u043e\u043f\u043a\u0430 \u0432\u0430\u0436\u043d\u043e\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f (\u043a\u0440\u0430\u0441\u043d\u0430\u044f)"}}});
jQuery.widget("gc.xdget_chooseVariant",$.gc.xdget_container,{selector:null,resizeStarted:!1,selectedBlock:null,getLabel:function(){return Yii.t("common","\u0412\u044b\u0431\u043e\u0440 \u0438\u0437 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432")},isAutoContainer:function(){return!1},applyParams:function(a){},createVariantSelector:function(){this.selector&amp;&amp;(this.selector.detach(),this.selector=null);var a=this;this.selector=$selector=$("&lt;ul class='xdget-choose-variant-selector'&gt;");this.selector.prependTo(this.element);
for(var b=0,c=this.getChildBlocks(),d=0;d&lt;c.length;d++){var e=$(c[d]);e.addClass("hidden-variant");var f=e.data("xdget");b++;$option=$('&lt;li class="variant-link"/&gt;');$option.addClass("option-"+f.xdgetId);$option.data("block",e);$option.html(f.getElementTitle());$option.appendTo($selector);$option.click(function(b){var c=a.selectVariant($(this).data("block"));c&amp;&amp;c.startEditing();b.stopPropagation();b.preventDefault()})}this.selectedBlock?this.selectVariant(this.selectedBlock):0&lt;c.length&amp;&amp;this.selectVariant($(c[0]));
return $selector},selectVariant:function(a){var b=a.data("xdget"),c=b.xdgetId;this.getChildBlocks().addClass("hidden-variant");this.selector.find(".variant-link").removeClass("active");this.selector.find(".option-"+c).addClass("active");a.removeClass("hidden-variant");this.selectedBlock=a;return b},resizeChildren:function(){var a=this;this.isEditorEnabled()&amp;&amp;!this.resizeStarted&amp;&amp;(setTimeout(function(){a.createVariantSelector();a.resizeStarted=!1},100),this.resizeStarted=!0)}});
$(function(){var a=(new Date).getTime();setInterval(function(){3E3&lt;Math.abs((new Date).getTime()-a)&amp;&amp;$.countdown.resync();a=(new Date).getTime()},3E3)});
jQuery.widget("gc.xdget_countdown",$.gc.abstractXdget,{applyParams:function(a){this.countdownEl&amp;&amp;this.countdownEl.detach();finishDate=this.getParam("finishDate");this.addText=$("&lt;div&gt;");this.addText.addClass("countdown-text");this.addText.appendTo(this.element);this.countdownEl=$("&lt;div&gt;");this.countdownEl.addClass("countdown-timer");this.countdownEl.appendTo(this.element);if(finishDate){a=finishDate.split(/[^0-9]/);"en"==window.language&amp;&amp;$.countdown.setDefaults($.countdown.regionalOptions[""]);a=
2E3&lt;a[2]?new Date(a[2],a[1]-1,a[0],a[3],a[4],a[5]|0):new Date(a[0],a[1]-1,a[2],a[3],a[4],a[5]|0);var b=window.nowTime,c="HMS";3&lt;(a-b)/864E5&amp;&amp;(c="D HMS");if(a&lt;=b)return"dealCountdown"===this.type&amp;&amp;this.getParam("textOnFinish")&amp;&amp;(this.element.addClass("with-border"),this.element.addClass("time-over"),this.addText.html(this.getParam("textOnFinish"))),"promoCountdown"===this.type&amp;&amp;this.getParam("textOnFinish")&amp;&amp;(this.addText.addClass("is-countdown"),this.addText.html(this.getParam("textOnFinish"))),!1;
if(b=this.getParam("countdownText"))this.element.addClass("with-border"),this.addText.html(b);this.countdownEl.countdown({until:a,padZeroes:!0,compact:!0,format:c,timezone:void 0!==window.dateOffset?60*window.dateOffset:180,expiryText:this.getParam("textOnFinish"),expiryUrl:this.getParam("expiryUrl"),serverSync:function(){var a;$.ajax("/sales/shop/syncTime",{async:!1,success:function(b){a=new Date(b)},error:function(){a=new Date},dataType:"text"});return a}})}else"dealCountdown"!=this.type&amp;&amp;this.countdownEl.html(Yii.t("common",
"\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0434\u0430\u0442\u0443 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445"))}});jQuery.widget("gc.xdget_div",$.gc.xdget_container,{getBlockClass:function(){return"div"},getLabel:function(){return this.getSetting("label")?this.getSetting("label"):Yii.t("common","\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440")},isAutoContainer:function(){return!1}});
jQuery.widget("gc.xdget_dynamicContainer",$.gc.xdget_container,{oldAdditionalClass:null,build:function(){$.gc.xdget_container.prototype.build.call(this);var a="xdgetRefresh"+this.xdgetId,b=this;window.accountUserWebSocketConnection&amp;&amp;window.accountUserWebSocketConnection.subscribeChannel(a,function(a,d){b.applyDynamicParams(d)});b.applyDynamicParams(this.options.params)},getBlockClass:function(){return"dynamic-container"},getLabel:function(){return this.getSetting("label")?this.getSetting("label"):
"\u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440"},isAutoContainer:function(){return!1},applyDynamicParams:function(a){this.oldAdditionalClass&amp;&amp;this.oldAdditionalClass!=a.additional_class&amp;&amp;this.element.removeClass(this.oldAdditionalClass);a.additional_class!=this.oldAdditionalClass&amp;&amp;this.element.addClass(a.additional_class);this.isEditorEnabled()||(a.need_hide?this.element.addClass("hidden"):this.element.removeClass("hidden"));
a.additional_class&amp;&amp;(this.oldAdditionalClass=a.additional_class)}});
jQuery.widget("gc.xdget_statefull",$.gc.xdget_container,{selector:null,selectorInited:!1,applyParams:function(a){this.isEditorEnabled()&amp;&amp;this.createStateSelector();this.element.find(".state-block").hide();this.getParam("state")&amp;&amp;this.element.find(".state-block.state-"+this.getParam("state")).show()},getBlockClass:function(){return"statefull"},getLabel:function(){return this.getSetting("label")},isAutoContainer:function(){return!1},getState:function(){return this.getParam("state")},changeState:function(a){this.setParam("state",
a);this.applyParams(!1)},createStateSelector:function(){if(this.selectorInited)return!1;this.selector&amp;&amp;(this.selector.detach(),this.selector=null);var a=this;this.selector=$selector=$("&lt;ul class='xdget-choose-state-selector'&gt;");this.selector.prependTo(this.element);var b=this.getSetting("states"),c=this.getState(),d;for(d in b){var e=b[d];$option=$('&lt;li class="state-link"/&gt;');$option.data("state",d);$option.html(e);$option.appendTo($selector);c==d&amp;&amp;$option.addClass("active");$option.click(function(b){a.selector.find(".state-link").removeClass("active");
$(this).addClass("active");var c=$(this).data("state");a.changeState(c);b.preventDefault();b.stopPropagation()})}this.selectorInited=!0;return $selector}});
jQuery.widget("gc.xdget_fileList",$.gc.abstractXdget,{fileListEl:null,applyParams:function(a){var b=this,c=this.getParam("fileList",{files:[]}),d=this.fileListEl=$("&lt;ul/&gt;");d.addClass(this.getFileListClass());this.isEditorEnabled()&amp;&amp;(0==c.files.length&amp;&amp;d.html("&lt;center&gt;"+Yii.t("common","\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0444\u0430\u0439\u043b\u044b \u0432 \u043c\u0435\u043d\u044e \u0441\u043f\u0440\u0430\u0432\u0430 \u0438\u043b\u0438 \u0449\u0435\u043b\u043a\u043d\u0438\u0442\u0435 \u0434\u0432\u0430 \u0440\u0430\u0437\u0430 \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438")+"&lt;/center&gt;"),
a&amp;&amp;this.element.dblclick(function(){b.startEditing();window.xdgetRootEditorBlock.xdgetEditorControl("getEditor").editFileList()}));d.addClass("file-list");for(key in c.files)a=gcGetFileObj(c.files[key]),$fileEl=$("&lt;li/&gt;"),this.fillFileEl($fileEl,a,key),$fileEl.appendTo(d);c=this.element.find(".file-list-content");0==c.length&amp;&amp;(c=$("&lt;div class='file-list-content'/&gt;"),c.appendTo(this.element));c.empty();d.appendTo(c)},fillFileEl:function(a,b,c){a.addClass("file-item");this.getParam("showTitle")&amp;&amp;($titleEl=
$("&lt;a target='_blank' href='"+b.getDownloadUrl()+"'class='title' data-index='"+c+"'&gt;"+b.title+"&lt;/a&gt;"),$titleEl.appendTo(a));this.getParam("showDescription")&amp;&amp;b.description&amp;&amp;($descriptionEl=$("&lt;span class='description'&gt;"+b.description+"&lt;/span&gt;"),$descriptionEl.appendTo(a));$thumbnailLink=$("&lt;a class='thumbnail-link'/&gt;");$thumbnailLink.attr("href",getThumbnailUrl(b.hash,900,""));$thumbnailLink.attr("title",b.title);$thumbnailEl=$("&lt;img/&gt;");$thumbnailEl.addClass("thumbnail");$thumbnailEl.attr("src",
getThumbnailUrl(b.hash,this.getThumbnailSize(),this.getThumbnailSize()));$thumbnailEl.appendTo($thumbnailLink);$thumbnailLink.prependTo(a)},getThumbnailSize:function(){return 40},getFileListClass:function(){return"standard-file-list"}});
jQuery.widget("gc.xdget_gallery",$.gc.xdget_fileList,{globalGalleryEl:null,localGalleryEl:null,getThumbnailSize:function(){switch(this.getParam("previewSize")){case "xtrasmall":return 50;case "small":return 137;case "medium":return 220;case "big":return 300;case "xtrabig":return 500;default:return 220}},applyParams:function(a){$.gc.xdget_fileList.prototype.applyParams.call(this,a);"carousel"==this.getParam("viewMode")?(a=this.getLocalGalleryEl(),blueimp.Gallery(this.fileListEl.find("a.thumbnail-link"),
{container:a,carousel:!0})):(this.getGlobalGalleryEl(),this.localGalleryEl&amp;&amp;(this.localGalleryEl.detach(),this.localGalleryEl=null),this.isEditorEnabled()||this.fileListEl.find("a").click(function(a){$links=$(this).parents(".file-list").find("a.thumbnail-link");a={index:this};$(this).data("index")&amp;&amp;(a.index=$(this).data("index"));a.transitionSpeed=200;a.displayTransition=!1;blueimp.Gallery($links,a);return!1}))},getGlobalGalleryEl:function(){null==this.globalGalleryEl&amp;&amp;($galleryEl=$("#blueimp-gallery"),
0==$galleryEl.length&amp;&amp;($galleryEl=$('&lt;div id="blueimp-gallery" class="blueimp-gallery blueimp-gallery-controls"&gt;&lt;div class="slides next-click"&gt;&lt;/div&gt;&lt;h3 class="title"&gt;&lt;/h3&gt;&lt;a class="prev"&gt;\u2039&lt;/a&gt;&lt;a class="next next-click"&gt;\u203a&lt;/a&gt;&lt;a class="play-pause"&gt;&lt;/a&gt;&lt;ol class="indicator"&gt;&lt;/ol&gt;&lt;/div&gt;')),$galleryEl.appendTo($("body")),this.globalGalleryEl=$galleryEl);return this.globalGalleryEl},getLocalGalleryEl:function(){null==this.localGalleryEl&amp;&amp;($galleryEl=$('&lt;div id="blueimp-gallery-carousel" class="blueimp-gallery blueimp-gallery-carousel blueimp-gallery-controls"&gt;&lt;div class="slides"&gt;&lt;/div&gt;&lt;h3 class="title"&gt;&lt;/h3&gt;&lt;a class="prev"&gt;\u2039&lt;/a&gt;&lt;a class="next"&gt;\u203a&lt;/a&gt;&lt;a class="play-pause"&gt;&lt;/a&gt;&lt;ol class="indicator"&gt;&lt;/ol&gt;&lt;/div&gt;'),
$galleryEl.appendTo(this.element),this.localGalleryEl=$galleryEl);return this.localGalleryEl},getFileListClass:function(){var a="";switch(this.getParam("viewMode")){case "tile":a="gallery-tile";break;case "carousel":a="gallery-carousel";break;default:a="gallery-list"}this.getParam("thumbnailBorder")||(a+=" no-thumbnail-border");return a}});jQuery.widget("gc.xdget_header",$.gc.xdget_tag,{getTag:function(){return this.params.size&amp;&amp;""!=this.params.size?this.params.size:"h2"}});
jQuery.widget("gc.xdget_html",$.gc.abstractXdget,{options:{},build:function(){this.htmlContentEl=this.element.find("&gt; .html-content");0==this.htmlContentEl.length?(this.htmlContentEl=$("&lt;div class='html-content'&gt;&lt;/div&gt;"),this.htmlContentEl.prependTo(this.element)):this.setParam("content",this.htmlContentEl.html())},applyParams:function(a){a||this.htmlContentEl.html(this.params.content)},getElementTitle:function(){var a=$.gc.abstractXdget.prototype.getElementTitle.call(this),b=this.getParam("content",
a),b=b.replace(/(&lt;([^&gt;]+)&gt;)/ig,""),b=b.replace(/\n/ig,""),b=b.trim();return 2&gt;b.length?a:b.substr(0,30)+"..."}});
jQuery.widget("gc.xdget_image",$.gc.abstractXdget,{url:null,img:null,description:null,applyParams:function(a){var b=this;a&amp;&amp;this.element.click(function(a){b.onClick(a)});a=this.getParam("filehash");if(!a&amp;&amp;this.isEditorEnabled())return this.element.html(Yii.t("common","\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0444\u0430\u0439\u043b")),!1;var c=this.getParam("width",""),d=this.getParam("height","");this.isNumber(c)||(c="");this.isNumber(d)||(d="");var e="";""!=c||""!=d?e=getThumbnailUrl(a,
c,d):(c=a?a.split("."):[],e=1&lt;c.length&amp;&amp;"heic"===c.pop()?getThumbnailUrl(a,200,""):getDownloadUrl(a));this.getParam("useAsBackground")?(this.img&amp;&amp;(this.img.detach(),this.img=null),this.element.css("background-image","url('"+e+"')"),this.element.css("background-size",this.getParam("backgroundSize"))):(this.element.css("background-image",""),e==this.url&amp;&amp;this.img||(this.img||(this.element.empty(),this.img=$("&lt;img&gt;"),this.img.prependTo(this.element)),this.img.attr("src",e),this.url=e),this.getParam("alt")&amp;&amp;
this.img&amp;&amp;(this.img.attr("alt",this.getParam("alt")),this.img.attr("title",this.getParam("alt"))),this.getParam("description")?(this.description||(this.description=$("&lt;span class='image-desc'&gt;"),this.description.insertAfter(this.img)),this.description.html(this.getParam("description"))):this.description&amp;&amp;this.description.detach(),this.getParam("link")?this.element.addClass("with-link"):this.element.removeClass("with-link"),this.getParam("widthFit")?this.element.addClass("width-fit"):this.element.removeClass("width-fit"))},
onClick:function(a){this.isEditorEnabled()||this.getParam("link")&amp;&amp;(2==a.which||this.getParam("link_new_window")?$.gc.abstractXdget.prototype.redirectTo(this.getParam("link"),!0):1==a.which&amp;&amp;$.gc.abstractXdget.prototype.redirectTo(this.getParam("link")))}});jQuery.widget("gc.xdget_item",$.gc.xdget_container,{getTag:function(){return"li"},isAutoContainer:function(){return!1},canAddSubcontainer:function(){return!1},allowableChildTypes:function(){return["list"]}});
jQuery.widget("gc.xdget_javascript",$.gc.abstractXdget,{options:{},build:function(){},applyParams:function(a){this.isEditorEnabled()&amp;&amp;this.element.html(this.getElementTitle())},getElementTitle:function(){return this.getParam("scriptName","javascript")}});
jQuery.widget("gc.xdget_userForm",$.gc.xdget_form,{selector:null,clickedButton:null,loginBlock:null,previousState:null,messageEl:null,remindMode:!1,action:"form",applyParams:function(a){this.element.addClass("xdget-common-user-form");var b=this;a&amp;&amp;(this.isEditorEnabled()||(b.trySendCallback=addGlobalCheckbox(this.element),this.element.submit(function(a){if(this.remindMode)return!1;b.trySendData();return!1}),this.element.find("button").click(function(){b.setClickedButton(this)}),this.element.find(".btn-register").click(function(){console.log(1111);
b.changeState("register");return!1}),$(".btn-login",this.element).click(function(){b.changeState("login");return!1}),$(".btn-remind",this.element).click(function(){b.showRemindForm();return!1}),$(".btn-enter",this.element).click(function(){if(b.getParam("open_new_window"))return window.top.location.href="/",!1;$.gc.abstractXdget.prototype.redirectTo("/");return!1}),$(".btn-logout",this.element).click(function(){b.trySendData({action:"logout"});return!1}),this.loginBlock=this.createLoginBlock(),this.loginBlock.appendTo(this.element),
this.loginBlock.hide(),this.remindBlock=this.createRemindBlock(),this.remindBlock.appendTo(this.element),this.remindBlock.hide(),$(document).ready(function(){b.element.find(".btn-register").get(0)&amp;&amp;"#registration"==window.location.hash&amp;&amp;b.changeState("register")})),this.isEditorEnabled()||(setTimeout(function(){var a=!1;$(".xdget-userFormField").each(function(){$xdgetBlock=$(this);if(xdget=$xdgetBlock.data("xdget")){var d=xdget.getParam("fieldName"),d=b.params.default_values[d];xdget._setValue(d,
b.params.default_values);!b.getParam("showOnlyOneField")||d&amp;&amp;""!=d||(a?$xdgetBlock.hide():a=!0)}})},100),this.getParam("run_try_process")&amp;&amp;setTimeout(function(){b.trySendData()},100)),this.messageEl=$('&lt;div class="alert alert-danger error-message"&gt;'),this.messageEl.appendTo(this.element),this.messageEl.hide());this.isEditorEnabled()&amp;&amp;!this.selector&amp;&amp;this.createStateSelector();this.getParam("state")&amp;&amp;(this.previousState&amp;&amp;this.element.removeClass("state-"+this.previousState),a=this.getParam("state"),
this.element.addClass("state-"+a),this.element.find(".state-form").removeClass("active-state"),this.element.find("."+a+"-form").addClass("active-state"),this.previousState=a);this.element.trigger("xdgetApplyParams")},setClickedButton:function(a){this.clickedButton=$(a);var b=this;setTimeout(function(){b.clickedButton=null},300)},changeState:function(a){this.setParam("state",a);this.applyParams(!1)},showLoginForm:function(a){this.element.addClass("hide-content");a&amp;&amp;this.loginBlock.setEmail(a);this.loginBlock.show();
this.loginBlock.passwordInput.focus();this.action="auth"},showRemindForm:function(){this.remindMode=!0;this.remindBlock.show();this.element.addClass("hide-content");this.action="auth"},showMainForm:function(){this.remindMode=!1;"after_send"==this.getState()&amp;&amp;this.changeState("before_send");this.action="form";this.element.removeClass("hide-content");this.loginBlock.hide();this.remindBlock.hide()},getBlockClass:function(){return"form"},getLabel:function(){return this.getSetting("label")?this.getSetting("label"):
Yii.t("common","\u0424\u043e\u0440\u043c\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438")},isAutoContainer:function(){return!1},allowableChildTypes:function(){return"html header separator  userFormField button".split(" ")},getFormParams:function(a){var b=this.element.find(".active-state");0==b.length&amp;&amp;(b=this.element);var b=b.find(".xdget-formField"),c=this,d={};d.action=this.action;"auth"==this.action&amp;&amp;(d.password=this.loginBlock.passwordInput.val());"login"==this.getState()&amp;&amp;
(d.action="login");d.url=location.href;var e=!1;b.each(function(b,g){var k=$(g),l=k.data("xdget");l?(k=l.getFieldName(),a||l.validate()||e||(emptyField=Yii.t("common","\u041d\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043e \u043f\u043e\u043b\u0435"),"undefined"!=typeof Yii&amp;&amp;(emptyField=Yii.t("common","Field is empty -")),c.showError(emptyField+" "+l.getFieldLabel()),e=!0),d[k]=l.getFieldValue()):k.find("input.append-handle-input")&amp;&amp;(l=k.find("input.append-handle-input"),l.is(":checkbox")&amp;&amp;
(d[l.attr("name")]=l.prop("checked")?1:0))});return e?!1:d},trySendData:function(a,b){if(this.trySendCallback&amp;&amp;!this.trySendCallback({state:this.getParam("state")}))return!1;var c=this,d=c.element.prop("action")?c.element.prop("action"):"",e={action:"processXdget"};e.xdgetId=this.xdgetId;c.getParam("metrika_submit_goal")&amp;&amp;window.yaCounter&amp;&amp;window.yaCounter.reachGoal(c.getParam("metrika_submit_goal"));e.params=a?a:this.getFormParams();c.clickedButton&amp;&amp;c.clickedButton.attr("name")&amp;&amp;(e.params.subaction=
c.clickedButton.attr("value"));if(!e.params)return!1;c.getParam("return_url")&amp;&amp;(e.params.returnUrl=c.getParam("return_url"));e.params.object_type=window.gcsObjectType;e.params.object_id=window.gcsObjectId;$(c.element).siblings(".form-result-block").remove();ajaxCall(d,e,{btn:c.clickedButton,enableSimpleSign:!0},function(a){if(a.redirectUrl){var d=a.redirectUrl;a.confirmMessage&amp;&amp;a.confirmCancelRedirectUrl&amp;&amp;!confirm(a.confirmMessage)&amp;&amp;(d=a.confirmCancelRedirectUrl);a.new_user_registered&amp;&amp;c.getParam("metrika_register_goal")&amp;&amp;
window.yaCounter&amp;&amp;window.yaCounter.reachGoal(c.getParam("metrika_register_goal"));c.getParam("metrika_finish_goal")&amp;&amp;window.yaCounter&amp;&amp;window.yaCounter.reachGoal(c.getParam("metrika_finish_goal"));"true"==d?$.gc.abstractXdget.prototype.redirectTo(window.location.origin+window.location.pathname):c.getParam("open_new_window")?window.top.location.href=d:0!=d.indexOf("#")?$.gc.abstractXdget.prototype.redirectTo(d):($.gc.abstractXdget.prototype.redirectTo(d),window.location.reload())}c.userForm&amp;&amp;a.needAuth&amp;&amp;
c.userForm(e,b).show();a.hasRegistered&amp;&amp;"login"!=c.getState()&amp;&amp;c.showLoginForm(a.email);a.errorMessage&amp;&amp;c.showError(a.errorMessage,a.disableButton);a.warning&amp;&amp;c.showWarning(a.warning);a.changeState&amp;&amp;c.changeState(a.changeState);b&amp;&amp;b(a)})},showError:function(a,b){this.showMessage(a,"danger",b)},showWarning:function(a){$('&lt;div class="form-result-block error"&gt;&lt;div class="error-message"&gt;'+a+"&lt;/div&gt;&lt;/div&gt;").insertBefore(this.element)},showMessage:function(a,b,c){b||(b="success");(this.clickedButton?this.clickedButton:
this.element.find("button")).each(function(b,e){if(!$(e).hasClass("btn-error")){var f=$(e).html();$(e).html(a);$(e).addClass("btn-error");c?$(e).attr("disabled","disabled"):setTimeout(function(){$(e).html(f);$(e).removeClass("btn-error")},5E3)}})},createRemindBlock:function(){var a=this,b=$('&lt;div class="remind-block"&gt;');$("&lt;h2&gt;"+Yii.t("common","Forgot password?")+"&lt;/h2&gt;").appendTo(b);var c=$("&lt;div class='form-group'&gt;&lt;/div&gt;");$("&lt;label&gt;"+Yii.t("common","Email")+"&lt;/label&gt;").appendTo(c);$emailInput=
$("&lt;input type='text' class='form-control' placeholder='"+Yii.t("common","Please enter your email")+"'&gt;");$emailInput.appendTo(c);b.emailInput=$emailInput;c.appendTo(b);c=$("&lt;div class='form-group'&gt;&lt;/div&gt;");$btnRemind=$('&lt;button class="btn btn-primary"&gt;'+Yii.t("common","Send to mail")+"&lt;/button&gt;");$btnRemind.appendTo(c);$remindResultEl=$("&lt;span&gt;&lt;/span&gt;");$remindResultEl.appendTo(c);$btnReturn=$('&lt;button class="btn btn-link"&gt;'+Yii.t("common","Back")+"&lt;/button&gt;");$btnReturn.appendTo(c);$emailInput.keyup(function(a){if(13==
a.keyCode)return $btnRemind.click(),!1});$btnReturn.click(function(){a.showMainForm();return!1});$btnRemind.click(function(){a.setClickedButton(this);a.trySendData({action:"remind",email:$emailInput.val()},function(b){b.error||($btnRemind.html(Yii.t("common","Resend")),a.showMessage(Yii.t("common","Password sent")))});return!1});c.appendTo(b);return b},createLoginBlock:function(){var a=$('&lt;div class="login-block"&gt;');a.setEmail=function(b){a.find(".email-value").html(b)};var b=Yii.t("common","Email {email} has already been registered. To log in, enter your password, or receive it by email",
{email:"&lt;span class='email-value'&gt;&lt;/span&gt;"}),b=$("&lt;div class='has-registered-message'&gt;&lt;p&gt;"+b+"&lt;/p&gt;&lt;/div&gt;"),c=$("&lt;div class='input-group form-group'&gt;&lt;/div&gt;"),d=$("&lt;input type='password' class='form-control'&gt;");d.attr("placeholder",Yii.t("common","Enter password"));d.appendTo(c);$wrapper=$("&lt;span class='input-group-btn'&gt;&lt;/span&gt;");$("&lt;button class='btn btn-success'&gt;&lt;span class='glyphicon glyphicon-user'&gt;&lt;/span&gt; "+Yii.t("common","Enter")+"&lt;/button&gt;").appendTo($wrapper);$wrapper.appendTo(c);var e=$("&lt;div class='form-group'&gt;&lt;/div&gt;");
$remindResultEl=$("&lt;span/&gt;");var f=$("&lt;a href='javascript:void(0)' class='restore-btn'&gt;&lt;/a&gt;");f.html(Yii.t("common","Send me password on email {email}",{email:"&lt;span class='email-value'&gt;&lt;/span&gt;"}));$sepEl=$("&lt;div class='user-form-sep'&gt;&lt;/div&gt;");var g=$("&lt;a href='javascript:void(0)' class='clearfix change-btn'&gt;&lt;/a&gt;");g.text(Yii.t("common","Enter another email address"));$remindResultEl.appendTo(e);f.appendTo(e);$sepEl.appendTo(e);g.appendTo(e);var k=this;g.click(function(){k.showMainForm();return!1});
f.click(function(){k.action="remind";k.trySendData();k.action="auth";$remindResultEl.html(Yii.t("common","Password sent"));$(this).html(Yii.t("common","Resend"))});a.passwordInput=d;b.appendTo(a);c.appendTo(a);e.appendTo(a);return a},getOwnAvailableChildren:function(a){$.gc.xdget_form.prototype.getOwnAvailableChildren.call(this,a);a.email={group:"own",iconClass:"fa fa-at",type:"userFormField",label:Yii.t("common","\u042d\u043b. \u0430\u0434\u0440\u0435\u0441"),params:{fieldName:"email",fieldType:"string",
fieldOptions:{label:Yii.t("common","\u042d\u043b. \u0430\u0434\u0440\u0435\u0441"),placeholder:Yii.t("common","\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u0432\u043e\u0439 \u044d\u043b. \u0430\u0434\u0440\u0435\u0441")}}};116===window.accountId&amp;&amp;(a.respondentId={group:"own",iconClass:"fa fa-list-ul",type:"userFormField",label:Yii.t("common","\u041e\u0442\u0434\u0435\u043b"),params:{fieldName:"respondentId",fieldType:"numeric",fieldOptions:{label:Yii.t("common","\u041e\u0442\u0434\u0435\u043b"),
placeholder:Yii.t("common","\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043e\u0442\u0434\u0435\u043b")}}});a.firstName={group:"own",iconClass:"fa fa-user",type:"userFormField",label:Yii.t("common","\u0418\u043c\u044f"),params:{fieldName:"first_name",fieldType:"string",fieldOptions:{label:Yii.t("common","\u0418\u043c\u044f"),placeholder:Yii.t("common","\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u0432\u043e\u0435 \u0438\u043c\u044f")}}};a.lastName={group:"own",iconClass:"fa fa-user",type:"userFormField",
label:Yii.t("common","\u0424\u0430\u043c\u0438\u043b\u0438\u044f"),params:{fieldName:"last_name",fieldType:"string",fieldOptions:{label:Yii.t("common","\u0424\u0430\u043c\u0438\u043b\u0438\u044f"),placeholder:Yii.t("common","\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u0432\u043e\u044e \u0444\u0430\u043c\u0438\u043b\u0438\u044e")}}};a.fullName={group:"own",iconClass:"fa fa-user",type:"userFormField",label:Yii.t("common","\u0424\u0418\u041e"),params:{fieldName:"full_name",fieldType:"string",
fieldOptions:{label:Yii.t("common","\u0424\u0418\u041e"),placeholder:Yii.t("common","\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0424\u0418\u041e")}}};a.phone={group:"own",iconClass:"fa fa-phone",type:"userFormField",label:Yii.t("common","\u0422\u0435\u043b\u0435\u0444\u043e\u043d"),params:{fieldName:"phone",fieldType:"phone",fieldOptions:{label:Yii.t("common","\u0422\u0435\u043b\u0435\u0444\u043e\u043d"),placeholder:Yii.t("common","\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0442\u0435\u043b\u0435\u0444\u043e\u043d")}}};
this.getSetting("confirmAvailable")&amp;&amp;(a.phoneConfirm={group:"own",iconClass:"fa fa-check",type:"userFormField",label:Yii.t("common","\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430"),params:{fieldName:"phone_confirm_code",fieldType:"phone_confirm",fieldOptions:{label:Yii.t("common","\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430"),placeholder:Yii.t("common",
"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043a\u043e\u0434 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432 \u0441\u043c\u0441"),hide_filled:!0,captchaDisabled:this.getSetting("captchaDisabled")}}});a.country={group:"own",iconClass:"fa fa-globe",type:"userFormField",label:Yii.t("common","\u0421\u0442\u0440\u0430\u043d\u0430"),params:{fieldName:"country",fieldType:"string",fieldOptions:{label:Yii.t("common",
"\u0421\u0442\u0440\u0430\u043d\u0430"),placeholder:Yii.t("common","\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0441\u0432\u043e\u044e \u0441\u0442\u0440\u0430\u043d\u0443")}}};a.city={group:"own",iconClass:"fa fa-map-marker",type:"userFormField",label:Yii.t("common","\u0413\u043e\u0440\u043e\u0434"),params:{fieldName:"city",fieldType:"string",fieldOptions:{label:Yii.t("common","\u0413\u043e\u0440\u043e\u0434"),placeholder:Yii.t("common","\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0441\u0432\u043e\u0439 \u0433\u043e\u0440\u043e\u0434")}}};
a.profileImage={group:"own",iconClass:"fa fa-file-image-o",type:"userFormField",label:Yii.t("common","\u0410\u0432\u0430\u0442\u0430\u0440"),params:{fieldName:"profile_image",fieldType:"file",fieldOptions:{label:Yii.t("common","\u0410\u0432\u0430\u0442\u0430\u0440")}}};a.birthday={group:"own",iconClass:"fa fa-calendar",type:"userFormField",label:Yii.t("common","\u0414\u0430\u0442\u0430 \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f"),params:{fieldName:"birthday",fieldType:"date",fieldOptions:{label:Yii.t("common",
"\u0414\u0430\u0442\u0430 \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f"),placeholder:Yii.t("common","\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u0432\u043e\u044e \u0434\u0430\u0442\u0443 \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f")}}};a.password={group:"own",iconClass:"fa fa-password",type:"userFormField",label:Yii.t("common","\u041f\u0430\u0440\u043e\u043b\u044c"),params:{fieldName:"password",fieldType:"password",fieldOptions:{label:Yii.t("common","\u041f\u0430\u0440\u043e\u043b\u044c"),
placeholder:Yii.t("common","\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c")}}};a.comment={group:"own",iconClass:"fa fa-comment",type:"userFormField",label:Yii.t("common","\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439"),params:{fieldName:"comment",fieldType:"text",fieldOptions:{label:Yii.t("common","\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439"),placeholder:Yii.t("common","\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438")}}};
a.comment={group:"own",iconClass:window.isDisabledVK?"fa fa-facebook":"fa fa-vk",type:"socialUserFormField",label:Yii.t("common","\u041f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u0441\u043e\u0446\u0441\u0435\u0442\u0435\u0439"),params:{fieldName:"",fieldType:"string"}};return a},useChildAvailableChildren:function(){return!0},getState:function(){return this.getParam("state")},createStateSelector:function(){this.selector&amp;&amp;(this.selector.detach(),this.selector=null);var a=this;this.selector=$selector=
$("&lt;ul class='xdget-choose-state-selector'&gt;");this.selector.prependTo(this.element);var b=this.getSetting("states"),c=this.getState(),d;for(d in b){var e=b[d];$option=$('&lt;li class="state-link"/&gt;');$option.data("state",d);$option.html(e);$option.appendTo($selector);c==d&amp;&amp;$option.addClass("active");$option.click(function(b){a.selector.find(".state-link").removeClass("active");$(this).addClass("active");b=$(this).data("state");a.changeState(b)})}return $selector}});
jQuery.widget("gc.xdget_userFormField",$.gc.xdget_formField,{allowableChildTypes:function(){if(this.parentXdget)return this.parentXdget.allowableChildTypes()}});
jQuery.widget("gc.xdget_socialUserFormField",$.gc.xdget_userFormField,{form:null,labelEl:null,buttonsEl:null,buttonLabels:{vk:"\u0412\u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0435",facebook:"Facebook"},applyParams:function(a){a=this.getSetting("availableButtons");var b=this.getParam("button_type"),c=this.getParam("button_size");"lines"==this.getParam("buttons_layout")?this.element.addClass("buttons-on-new-line"):this.element.removeClass("buttons-on-new-line");if(!this.buttonsEl||this.appliedButtonType!=
b||this.appliedButtonSize!=c){this.element.empty();this.buttonsEl&amp;&amp;this.buttonsEl.detach();this.buttonsEl=$("&lt;div&gt;");this.buttonsEl.appendTo(this.element);this.form=this.element.parents(".xdget-common-user-form");this.labelEl=$("&lt;span class='social-buttons-label'&gt;");this.labelEl.appendTo(this.buttonsEl);var d=this.getSetting("isVkBotEnabled");for(key in a)"facebook"===key&amp;&amp;window.isDisabledFacebook||this.createButton(key,a[key],b,c,d).appendTo(this.buttonsEl);this.appliedButtonType=b;this.appliedButtonSize=
c;d&amp;&amp;(b=$("#vk-auth-btn").attr("href"),vkNativeApp.init({appLauncherElId:"vk-auth-btn",notSupportedMessage:"",universalLinkUrl:"https://vk.com",appUri:"vk:"+b+"&amp;isMobileApp=1",androidAppId:"com.vkontakte.android",url:b+"&amp;isMobileApp=0",mobileUrl:b+"&amp;isMobileApp=1",debug:!1}))}b=0;for(key in a)b++;0&lt;b&amp;&amp;this.getParam("label")&amp;&amp;0&lt;this.getParam("label").length?(this.labelEl.html(this.getParam("label")),this.labelEl.removeClass("hidden")):(this.labelEl.addClass("hidden"),this.labelEl.empty())},getElementTitle:function(){return Yii.t("common",
"\u041f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u0441\u043e\u0446\u0441\u0435\u0442\u0435\u0439")},createButton:function(a,b,c,d,e){linkedAuths=this.getParam("linked_auths");var f=this,g="btn-social-icon",k="";"buttons"==c&amp;&amp;(g="btn-social",k=b.label);"buttons"==c&amp;&amp;(g="btn-social",k=b.label);d&amp;&amp;0!=d.length&amp;&amp;(g+=" btn-"+d);linkedAuths&amp;&amp;linkedAuths[a]&amp;&amp;"buttons"==c&amp;&amp;(k=linkedAuths[a].name,linkedAuths[a].image_url&amp;&amp;0&lt;linkedAuths[a].image_url.length&amp;&amp;(k="&lt;img class='profile-auth-image' src='"+linkedAuths[a].image_url+
"'/&gt;"+k));c=this.params.button_prefix?this.params.button_prefix:"";e&amp;&amp;"vk"==a?(b=$("&lt;a id='vk-auth-btn' href='"+f.getSetting("vkLoginUrl")+"' class='btn btn-"+a+" "+g+"'&gt;&lt;i class='"+b.icon+"'&gt;&lt;/i&gt;"+c+k+"&lt;/a&gt;"),b.click(function(){var a=$(this).attr("href");window.vkAuth.init([a])})):"chatium"==a?(e="/pl/chatium/control/app-link?path="+encodeURIComponent("screen/"+window.accountId+"/code-login/goto"),b=$("&lt;a id='chatium-auth-btn' href='"+e+"' class='btn btn-"+a+" "+g+"'&gt;&lt;img src='"+b.img+"'&gt;&lt;/a&gt;"),
b.click(function(a){if(768&gt;$(window).width())return!0;if(!window.accountUserWebSocketConnection)return alert("\u041d\u0435\u0442 \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u0430 \u0441 \u0441\u043e\u043a\u0435\u0442\u043e\u043c. \u0421\u0435\u0439\u0447\u0430\u0441 \u044d\u0442\u043e\u0442 \u0432\u0438\u0434 \u0432\u0445\u043e\u0434\u0430 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d"),!1;f.element.parents(".xdget-common-user-form").xdget_userForm("changeState","login");$(".xdget-loginUserForm").addClass("for-chatium");
var b=$('&lt;div class="chatium-login-form"/&gt;'),c="\u0412\u043e\u0439\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 Chatium";"undefined"!=typeof Yii&amp;&amp;(c=Yii.t("common","\u0412\u043e\u0439\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 Chatium"));$("&lt;h2&gt;").addClass("xdget-header").html(c).appendTo(b);if(window.accountUserWebSocketConnection){var d=Math.ceil(1E7*Math.random());window.accountUserWebSocketConnection.subscribeChannel("chatiumLoginSocket"+d,function(a,b){ajaxCall("/pl/chatium/school/code-login",
{code:b.code,hash:b.hash},{},function(){$.gc.abstractXdget.prototype.redirectTo("/")})})}$('&lt;img class="chatium-qr-code" src="/pl/chatium/control/app-link?qr=1&amp;path='+encodeURIComponent("screen/"+window.accountId+"/code-login/"+d)+'"&gt;').appendTo(b);var e=$(".login-form .xdget-form-field-email");b.prependTo(e);$('&lt;div class="chatium-instructions"&gt;'+Yii.t("common","\u041e\u0442\u0441\u043a\u0430\u043d\u0438\u0440\u0443\u0439\u0442\u0435 QR-\u043a\u043e\u0434 \u0441\u043a\u0430\u043d\u0435\u0440\u043e\u043c \u0438\u0437 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Chatium \n \u0438\u043b\u0438 \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u044d\u043b. \u0430\u0434\u0440\u0435\u0441 \u0432 \u0444\u043e\u0440\u043c\u0435 \u043d\u0438\u0436\u0435")+
"&lt;/div&gt;").appendTo(b);var k=$("&lt;button type='button' class='btn btn-success' style='color: white'&gt;"+Yii.t("common","\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441")+"&lt;/button&gt;"),g=$("&lt;button type='button' class='btn btn-link btn-cancel' style='color: white'&gt;"+Yii.t("common","\u041e\u0442\u043c\u0435\u043d\u0430")+"&lt;/button&gt;");g.insertAfter(e);k.insertAfter(e);k.click(function(){var a=e.find("input").val();ajaxCall("/pl/chatium/school/request-login",{email:a,
code:d},{},function(){})});g.click(function(){b.detach();g.detach();k.detach();$(".xdget-loginUserForm").removeClass("for-chatium")});a.preventDefault();a.stopPropagation();return!1})):(b=$("&lt;button class='btn btn-"+a+" "+g+"'&gt;&lt;i class='"+b.icon+"'&gt;&lt;/i&gt;"+c+k+"&lt;/button&gt;"),b.click(function(){if(f.form){var b=f.form.data("xdget"),c=b.getFormParams(!0);c.action="socialAuth";c.providerType=a;f.getParam("not_continue_process")&amp;&amp;(c.notContinueProcess=f.getParam("not_continue_process"));b.trySendData(c)}return!1}));
return b},getFieldName:function(){return null},getFieldValue:function(){return null},validate:function(){return!0}});
jQuery.widget("gc.xdget_offer",$.gc.abstractXdget,{offerId:null,offerContainerEl:null,offerData:null,applyParams:function(a){var b=this;$.gc.abstractXdget.prototype.applyParams.call(this,a);this.offerContainerEl=this.element.find(".offer-xdget-container");0==this.offerContainerEl.length&amp;&amp;(this.offerContainerEl=$('&lt;div class="offer-xdget-container"&gt;&lt;/div&gt;').appendTo(this.element));var c=this.getParentXdgetByType("offerSelector"),d="offerId[]";c&amp;&amp;(d="offerId_"+c.xdgetId+"[]");this.offerContainerEl.html('&lt;label&gt;&lt;input type="radio" class="offer-select-input" name='+
d+'&gt; &lt;div class="price-block"&gt;&lt;span class="source-price"&gt;&lt;/span&gt; &lt;span class="offer-count-block"&gt; &lt;span class="unit-price offer-count-need-hide"&gt;&lt;/span&gt; &lt;span class="offer-count-need-hide"&gt;x&lt;/span&gt; &lt;input type="text" class="offer-count-input" size=6 value=1&gt;&lt;/span&gt; &lt;span class="final-price offer-count-need-hide"&gt;&lt;/span&gt;&lt;/div&gt; &lt;span class="offer-title offer-count-need-hide"&gt;&lt;/span&gt; &lt;div class="offer-desc-string offer-count-need-hide"&gt;&lt;/div&gt;    &lt;/label&gt;&lt;/div&gt;');this.isEditorEnabled()&amp;&amp;this.offerContainerEl.find(".offer-title").html("&amp;lt;"+
Yii.t("common","\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435")+"&amp;gt;");this.countEl=this.offerContainerEl.find(".offer-count-block");this.countInput=this.countEl.find("input");this.countInput.click(function(){b._setSelected(!0)});this.countInput.keyup(function(){b.changedCount()});c&amp;&amp;(this.offerContainerEl.data("offerId",this.getParam("offerId")),c.applyParams(a),d=this.element.find(".offer-select-input"),c.getParam("selectMany")?
d.attr("type","checkbox"):d.attr("type","radio"));this.countEl||(this.countEl=$(""),this.countEl.appendTo(this.offerContainerEl));this.getParam("showCount")?this.countEl.show():this.countEl.hide();this.getParam("defaultCount")&amp;&amp;this.countInput.val(this.getParam("defaultCount"));a&amp;&amp;this.element.click(function(){b._setSelected()});this.getParam("checkedByDefault")&amp;&amp;(this.element.find(".offer-select-input").prop("checked",!0),b._setSelected())},_setOfferData:function(a,b){this.offerId=a.id;var c=this.element.find(".offer-select-input");
b&amp;&amp;"checkbox"!=c.attr("type")?c.attr("type","checkbox"):b||"radio"==c.attr("type")||c.attr("type","radio");this.getParam("checkedByDefault")&amp;&amp;c.prop("checked",!0);"not_show"==a.access_type&amp;&amp;(this.element.addClass("access-not-show"),c.attr("disabled","disabled"),c.prop("checked",!1));"success"==a.access_type&amp;&amp;this.element.addClass("special-offer");"cant_buy"==a.access_type&amp;&amp;(this.element.addClass("access-cant-buy"),c.attr("disabled","disabled"),c.prop("checked",!1),""!=a.not_access_message&amp;&amp;$("&lt;span class='not-access-message'&gt;"+
a.not_access_message+"&lt;/span&gt;").appendTo(this.element.find(".offer-title")));$offerEl=this.offerContainerEl;var d=this.getParam("title");d&amp;&amp;""!=d||(d=a.title);$offerEl.find(".offer-title").html(d);a.desc_string&amp;&amp;$offerEl.find(".offer-desc-string").html(a.desc_string);a.has_discount?$offerEl.find(".source-price").html(a.source_price_str):$offerEl.find(".source-price").empty();c.val(this.getParam("offerId"));c=[];if(0&lt;a.otherCurrencies.length){c.push('&lt;div class="currency-prices"&gt;');for(var d=[],e=
0;e&lt;a.otherCurrencies.length;e++)d.push("&lt;span&gt;"+a.otherCurrencies[e]+"&lt;/span&gt;");c.push(d.join(" "));c.push("&lt;/div&gt;")}this.offerData=a;this.getParam("showCount")?($offerEl.find(".unit-price").html(a.final_price_str),this.changedCount()):(d=$offerEl.find(".final-price"),d.html(a.final_price_str),0==$offerEl.find(".other-currencies").length&amp;&amp;d.after('&lt;div class="other-currencies"&gt;'),$offerEl.find(".other-currencies").html(c.join("")));$offerEl.appendTo(this.offerContainerEl)},changedCount:function(){var a=
this.countInput.val();(a*=1)||(a=1);$offerEl=this.offerContainerEl;$offerEl.find(".final-price").html(this.offerData.final_price*a+" "+this.offerData.currency_label)},_setSelected:function(a){this.element.parents(".xdget-offerSelector").find(".xdget-offer").removeClass("selected");a&amp;&amp;this.element.find(".offer-select-input").prop("checked",!0);this.element.find(".offer-select-input").prop("checked")&amp;&amp;this.element.addClass("selected")}});
jQuery.widget("gc.xdget_offerSelector",$.gc.xdget_container,{alreadyLoading:!1,currencySelectorInited:!1,productTable:null,offersModelsCache:{},applyParams:function(a){$.gc.xdget_container.prototype.applyParams.call(this,a);this.getParam("showDescString")?this.element.addClass("with-desc-string"):this.element.removeClass("with-desc-string");this.currency=this.params.currency;this.loadOffersData()},getLabel:function(){return Yii.t("common","\u0411\u043b\u043e\u043a \u0432\u044b\u0431\u043e\u0440\u0430 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f")},
isAutoContainer:function(){return!1},setOffersData:function(a,b,c){if("table"==this.getParam("viewMode"))this.productTable=this.makeProductTable(a,b,c);else{this.getChildBlocks().show();this.productTable&amp;&amp;(this.productTable.detach(),this.productTable=null);for(var d=0;d&lt;a.length;d++){var e=a[d],f=c[e];f&amp;&amp;b[e]?($block=b[e],(e=$block.data("xdget"))&amp;&amp;e._setOfferData(f,this.getParam("selectMany"))):console.log("NOT FOUND BLOCK: "+e,b)}1==a.length?this.element.find(".offer-xdget-container input:checked").addClass("hidden"):
this.element.find(".offer-xdget-container input:checked").removeClass("hidden");"hidden"==this.getParam("viewMode")&amp;&amp;this.getChildBlocks().hide()}},loadOffersData:function(){var a=this,b=[],c={};this.element.find(".offer-xdget-container").each(function(a,d){var g=$(d).parents(".xdget-block"),k=$(d).data("offer-id");g&amp;&amp;(c[k]=g,b.push(k))});var d=b.join(",")+a.currency;0&lt;b.length&amp;&amp;!a.alreadyLoading&amp;&amp;(a.offersModelsCache[d]?a.setOffersData(b,c,a.offersModelsCache[d]):(a.alreadyLoading=!0,ajaxCall("/sales/shop/offersData",
{ids:b,currency:a.currency,geoAreaId:window.geoAreaId},{},function(e){a.alreadyLoading=!1;a.offersModelsCache[d]=e.models;a.setOffersData(b,c,e.models)})))},makeProductTable:function(a,b,c){for(var d=this,e=[],f=0;f&lt;a.length;f++)c[a[f]]&amp;&amp;"not_show"!=c[a[f]].access_type&amp;&amp;e.push(a[f]);a=e;e=this.element.find(".offer-selector-hor-table");0==e.length?(e=$("&lt;table class='offer-selector-hor-table'/&gt;"),e.appendTo(this.element),this.getChildBlocks().hide()):e.empty();4&lt;a.length&amp;&amp;e.addClass("col-width-narrow");
e.addClass("col-total-"+a.length);var g=$("&lt;tr&gt;&lt;th class='product-title-td'&gt;&amp;nbsp;&lt;/th&gt;&lt;/tr&gt;");g.appendTo(e);var k=[];if(productsOrder=this.getParam("productsOrder"))for(f=0;f&lt;productsOrder.length;f++)k["p"+productsOrder[f]]={};for(f=0;f&lt;a.length;f++){var l=a[f],n=c[l];if(n&amp;&amp;b[l]){$block=b[l];var h=$block.data("xdget");h&amp;&amp;h._setOfferData(n,d.getParam("selectMany"));var m="col"+f,m=m+(" offer-"+l);"success"==n.access_type&amp;&amp;(m+=" special-offer");c[a[f]].colClass=m;for(p in n.parts){var h=n.parts[p],
m=h.product_id,p="p"+m;k[p]&amp;&amp;k[p].id||(k[p]={product_id:m,id:m,title:h.product.title,description:h.product.description,parts:{}});k[p].parts[l]=h}}}$tbody=e;for(p in k)if(m=k[p],m.id){var q=$("&lt;tr class='product-tr'/&gt;");q.data("productId",m.id);h=$("&lt;td class='product-title-td'/&gt;");h.html(m.title);m.description&amp;&amp;$("&lt;span class='description'&gt;"+m.description+"&lt;/span&gt;").appendTo(h);h.appendTo(q);q.appendTo($tbody);for(f=0;f&lt;a.length;f++)l=a[f],n=c[l],h=$("&lt;td class='offer-part-td offer-part-desc'/&gt;"),
h.addClass(n.colClass),m.parts[l]?h.html(m.parts[l].description?m.parts[l].description:"&lt;img src='/sales/img/v.png'&gt;"):h.html("&lt;img src='/sales/img/-.png'&gt;"),h.appendTo(q)}$oldPriceTr=$("&lt;tr class='source-price-tr'&gt;&lt;td class='product-title-td'&gt;&lt;/td&gt;&lt;/tr&gt;");$priceTr=$("&lt;tr class='finish-price-tr'&gt;&lt;td class='product-title-td'&gt;&lt;/td&gt;&lt;/tr&gt;");$buttonTr=$("&lt;tr class='button-tr'&gt;&lt;td class='product-title-td'&gt;&lt;/td&gt;&lt;/tr&gt;");p=!1;for(f=0;f&lt;a.length;f++)if(l=a[f],n=c[l],m=n.colClass,h=$("&lt;th/&gt;"),h.addClass(m),
h.appendTo(g),n&amp;&amp;b[l]){k=n.title;b[l]&amp;&amp;b[l].data("xdget")&amp;&amp;b[l].data("xdget").getParam("title")&amp;&amp;(k=b[l].data("xdget").getParam("title"));h.html(k);h=$("&lt;td class='offer-part-td'/&gt;");h.addClass(m);h.appendTo($oldPriceTr);n.has_discount&amp;&amp;(h.html("&lt;span class='source-price'&gt;"+n.source_price_str+"&lt;/span&gt;"),p=!0);h=$("&lt;td class='offer-part-td'/&gt;");h.addClass(m);h.appendTo($priceTr);k=["&lt;span class='final-price'&gt;"+n.final_price_str+"&lt;/span&gt;"];if(0&lt;n.otherCurrencies.length){k.push("&lt;br /&gt;");for(var q=[],
r=0;r&lt;n.otherCurrencies.length;r++)q.push(n.otherCurrencies[r]);k.push(q.join(", "))}h.html(k.join(""));h=$("&lt;td class='offer-part-td'/&gt;");h.addClass(m);(m=d.getParam("buyLabel"))&amp;&amp;""!=m||(m="\u0417\u0430\u043a\u0430\u0437\u0430\u0442\u044c");n.access_type&amp;&amp;""!=n.access_type&amp;&amp;"success"!=n.access_type?$("&lt;span&gt;"+n.not_access_message+"&lt;/span&gt;").appendTo(h):($button=$("&lt;button class='btn btn-order'&gt;"+m+"&lt;/button&gt;"),$button.appendTo(h),$button.data("offerId",l),$button.click(function(){var a=$(this).data("offerId");
d.selectOffer(a)}));h.appendTo($buttonTr)}p&amp;&amp;$oldPriceTr.appendTo(e);$priceTr.appendTo(e);$buttonTr.appendTo(e);return e},selectOffer:function(a){this.element.find(".xdget-offer").each(function(b,c){$block=$(c);var d=$block.data("xdget");d.offerId==a&amp;&amp;d._setSelected(!0)})},getAvailableChildren:function(a,b,c,d){a||(a={});a.offer={group:"own",iconClass:"fa fa-usd",type:"offer",label:Yii.t("common","\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435")};$.gc.xdget_container.prototype.getAvailableChildren.call(this,
a,b,c);return a},initCurrencySelector:function(){if(!this.currencySelectorInited){this.currencySelectorInited=!0;var a=this;a.getParam("enableCurrencySelector")&amp;&amp;ajaxCall("/sales/shop/getAllCurrencies",{},{},function(b){for(var c=[],d=0;d&lt;b.currencies.length;d++){var e=b.currencies[d],f="change-currency-btn";a.currency==e.code&amp;&amp;(f+=" active");c.push('&lt;span class="'+f+'" data-code="'+e.code+'"&gt;'+e.name+"&lt;/span&gt;")}a.element.prepend('&lt;div class="currency-selector"&gt;'+("&lt;div&gt;\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0432\u0430\u043b\u044e\u0442\u0443: "+
c.join(", ")+"&lt;/div&gt;")+"&lt;/div&gt;");a.element.find(".change-currency-btn").click(function(){var b=$(this).data("code");a.currency!==b&amp;&amp;(a.element.find(".change-currency-btn").removeClass("active"),$(this).addClass("active"),a.currency=b,a.alreadyLoading=!1,a.loadOffersData())})})}}});
jQuery.widget("gc.xdget_orderForm",$.gc.xdget_userForm,{userForm:function(){var a;return function(b,c){var d=b.params,e=this;a||(a=window.gcUserFormModal({tab:"register",register:{skip_user_exists:!0,title:"\u041e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u043a\u0430\u0437\u0430",buttonTitle:"\u041e\u0444\u043e\u0440\u043c\u0438\u0442\u044c \u0437\u0430\u043a\u0430\u0437",reload:!1,callback:function(a,b){b.email&amp;&amp;(d.email=b.email);e.trySendData(d,c)}}}));return a}}(),applyParams:function(a){$.gc.xdget_userForm.prototype.applyParams.call(this,
a)},getLabel:function(){return Yii.t("common","\u0424\u043e\u0440\u043c\u0430 \u0437\u0430\u043a\u0430\u0437\u0430")},isAutoContainer:function(){return!1},getPredefinedChildren:function(){var a=$.gc.xdget_userForm.prototype.getPredefinedChildren.call(this);a.push({group:"form",iconClass:"fa fa-at",type:"offerSelector",label:Yii.t("common","\u0412\u044b\u0431\u043e\u0440 \u043e\u0444\u0444\u0435\u0440\u0430"),params:{fieldOptions:{label:Yii.t("common","\u0412\u044b\u0431\u043e\u0440 \u043e\u0444\u0444\u0435\u0440\u0430")}}});
return a},getFormParams:function(a){var b=$.gc.xdget_userForm.prototype.getFormParams.call(this,a);if(!b)return null;var c=this.element.find("input.offer-select-input:checked");if(!a&amp;&amp;0==c.length)return this.showError(Yii.t("common","\u041d\u0435 \u0432\u044b\u0431\u0440\u0430\u043d\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435")),null;b.offerId=[];b.offerCount={};c.each(function(){var a=$(this).val(),c=$(this).parents(".offer-xdget-container").find(".offer-count-input").val();
b.offerId.push(a);b.offerCount[a]=c});return b}});
jQuery.widget("gc.xdget_row",$.gc.xdget_container,{getBlockClass:function(){if(this.isFloatWidth())return"row"},enableEditor:function(){$.gc.xdget_container.prototype.enableEditor.call(this)},getSubcontainerType:function(){return"container"},applyParams:function(a){$.gc.xdget_container.prototype.applyParams.call(this,a);this.isFloatWidth()?(this.element.removeClass("row"),this.element.addClass("float-row")):(this.element.addClass("row"),this.element.removeClass("float-row"))},processDroppedBlock:function(a,
b,c){a=this.wrapDraggedBlock(a);switch(c){case "left":this.appendXdgetBlock(a,b,"before");break;case "right":this.appendXdgetBlock(a,b,"after");break;case "top":this.makeSubcontainer(a,b,"before");break;case "bottom":this.makeSubcontainer(a,b,"after");break;case "full":this.appendXdgetBlock(a)}return a},appendXdgetBlock:function(a,b,c){var d=a.data("xdget");d&amp;&amp;d.type==this.getSubcontainerType()?d=a:(d=xdgetRepository.createNewXdgetBlock(this.getSubcontainerType(),{},this),d.data("xdget").appendXdgetBlock(a),
b&amp;&amp;(b=b.getParentXdgetByType(this.getSubcontainerType())));$.gc.xdget_container.prototype.appendXdgetBlock.call(this,d,b,c)},isFloatWidth:function(){return this.getParam("float_width")},resizeChildren:function(){if(this.blocks){var a=12,b=[],c=this,d=0;if(this.isFloatWidth())this.blocks.each(function(a,b){var d=$(b);c.removeBlockSizeClass(d)});else{this.blocks.each(function(e,f){var g=$(f),h=g.data("xdget");h&amp;&amp;(h.columnNo=++d);h&amp;&amp;h.getMdWidth&amp;&amp;h.getMdWidth()?(h=h.getMdWidth(),a-=h,c.setBlockSize(g,
h)):b.push(g)});for(var e=0;e&lt;b.length;e++){var f=b[e],g=Math.floor(a/b.length);1&gt;g&amp;&amp;(g=1);this.setBlockSize(f,g)}}}},getLabel:function(){return this.blocks?"&lt;"+this.blocks.length+" "+Yii.t("common","\u043a\u043e\u043b\u043e\u043d\u043a\u0438")+"&gt;":Yii.t("common","\u041a\u043e\u043b\u043e\u043d\u043a\u0438")},isRow:function(){return!0}});
jQuery.widget("gc.xdget_section",$.gc.xdget_container,{getBlockClass:function(){return"section"},getLabel:function(){return Yii.t("common","\u0421\u0435\u043a\u0446\u0438\u044f")},isAutoContainer:function(){return!1}});
jQuery.widget("gc.xdget_separator",$.gc.xdget_tag,{getTag:function(){return"hr"},getElementTitle:function(){var a="\u0420\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c";"undefined"!=typeof Yii&amp;&amp;(a=Yii.t("common","\u0420\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c"));return a}});jQuery.widget("gc.xdget_standard",$.gc.abstractXdget,{applyParams:function(a){this.options.existedXdget||this.element.html("&lt;b&gt;"+this.getLabel()+"&lt;/b&gt;: "+Yii.t("common","\u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b"))}});
jQuery.widget("gc.xdget_surveyFieldsFormField",$.gc.xdget_formField,{renderedSurveyId:null,customFormEl:null,allowableChildTypes:function(){if(this.parentXdget)return this.parentXdget.allowableChildTypes()},getElementTitle:function(){return Yii.t("common","\u041f\u043e\u043b\u044f \u0430\u043d\u043a\u0435\u0442\u044b")},applyParams:function(a){$.gc.abstractXdget.prototype.applyParams.call(this,a);a=null;if(surveyFormXdget=this.getParentXdgetByType("surveyUserForm"))a=surveyFormXdget.getParam("survey_id");
this.renderedSurveyId==a&amp;&amp;this.customFormEl||this.loadSurvey(a)},build:function(){var a=this.getParentXdgetByType("surveyUserForm");if(a){var b=this;a.element.on("xdgetApplyParams",function(){b.applyParams(!1)})}},getFieldName:function(){return"surveyData"},getFieldValue:function(){return this.customFormEl.customForm("getFormValues")},validate:function(){return!0},loadSurvey:function(a){var b=this;b.customFormEl&amp;&amp;b.customFormEl.detach();b.customFormEl=$("&lt;div&gt;");b.customFormEl.appendTo(b.element);
a?ajaxCall("/user/surveyPublic/model/id/"+a,{},{},function(a){b.customFormEl.customForm({form:a.model.customForm})}):this.isEditorEnabled()&amp;&amp;b.customFormEl.html(Yii.t("common","\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0430\u043d\u043a\u0435\u0442\u0443 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0444\u043e\u0440\u043c\u044b"));b.renderedSurveyId=a}});
jQuery.widget("gc.xdget_table",$.gc.abstractXdget,{options:{},children:[],childrenWidgets:[],table:null,slots:null,blocks:null,build:function(){for(var a in this.options.params.children){var b=this.options.params.children[a],c=b.xdget,d=c.jsName,e=$("&lt;div/&gt;");e[d]({params:c.params});b.el=e;this.children.push(b);this.element.find("a").click(function(){return!1})}},applyParams:function(a){if(a)this.table=this.contentEl.find("&gt; table");else{this.table=$("&lt;table/&gt;");this.table.addClass("xdget-table-table");
for(a=0;a&lt;this.params.rowsCount;a++){for(var b=$("&lt;tr&gt;"),c=0;c&lt;this.params.colsCount;c++){var d=$("&lt;td&gt;");d.html(c+a);if(0==a&amp;&amp;0==c){var e=this.children[0];e.el.appendTo(d);e.el[e.xdget.jsName]("applyParams")}d.appendTo(b)}b.appendTo(this.table)}this.contentEl.empty();this.table.appendTo(this.contentEl)}$tds=this.table.find("&gt; tbody &gt; tr &gt; td");$tds.css("width",Math.round(100/this.params.colsCount)+"%");this.slots=$tds;this.blocks=$tds.find("&gt; .xdget-block")}});
jQuery.widget("gc.xdget_variant",$.gc.xdget_container,{getLabel:function(){return"\u0412\u0430\u0440\u0438\u0430\u043d\u0442"},isAutoContainer:function(){return!1},getElementTitle:function(){return this.getParam("title")?this.getParam("title"):"\u0412\u0430\u0440\u0438\u0430\u043d\u0442"}});
jQuery.widget("gc.xdget_video",$.gc.abstractXdget,{iframe:null,applyParams:function(a){(a=this.getParam("playerWidth"))&amp;&amp;""!=a||(a="550");var b=this.getParam("playerHeight");b||(b="100%"==a?"56%":.56*a);var c=this.getIframeUrl();c&amp;&amp;c&amp;&amp;(this.getParam("autoplay")&amp;&amp;!this.isEditorEnabled()&amp;&amp;(c+="autoplay=1"),this.iframe||(this.iframe=$("&lt;iframe border=0 width='"+a+"' height='"+b+"' frameborder='0' allowfullscreen/&gt;"),this.iframe.appendTo(this.element)),c!=this.iframe.attr("src")&amp;&amp;this.iframe.attr("src",
c));this.getParam("responsive")?(this.element.addClass("responsive"),$(this.iframe).css("width",""),$(this.iframe).css("height","")):(this.element.removeClass("responsive"),a&amp;&amp;this.isNumber(a)&amp;&amp;$(this.iframe).css("width",a+"px"),b&amp;&amp;this.isNumber(b)&amp;&amp;$(this.iframe).css("height",b+"px"))},getIframeUrl:function(){var a=this.getParam("videoId");if(!a)return null;var b=this.getParam("type","vimeo"),c="";"youtube"==b&amp;&amp;(c="//www.youtube.com/embed/"+a+"?");"vimeo"==b&amp;&amp;(c="//player.vimeo.com/video/"+a+"?title=0&amp;amp;byline=0&amp;amp;portrait=0&amp;amp;color=c9ff23&amp;");
return c}});window.modalWindows||(window.modalWindows={});
jQuery.widget("gc.xdget_modal",$.gc.xdget_div,{getLabel:function(){return"\u041c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u043d\u043e"},applyParams:function(a){$.gc.xdget_container.prototype.applyParams.call(this,a);this.isEditorEnabled()?this.params.modal_width&amp;&amp;""!=this.params.modal_width&amp;&amp;this.params.modal_width!=this.appliedModalWidth?(this.element.width(this.params.modal_width),this.appliedModalWidth=this.params.modal_width):this.params.modal_width&amp;&amp;""!=this.params.modal_width||
!this.appliedModalWidth||this.element.width("auto"):this.params.elId&amp;&amp;(window.modalWindows[this.params.elId]=this)},getModalElement:function(){var a=$('&lt;div class=\'modal gc-modal xdget-modal-main-el\'&gt;&lt;div class=\'modal-dialog\'&gt;&lt;div class=\'modal-content\'&gt;&lt;div class=\'modal-body\'&gt;&lt;div class="modal-xdget-content"&gt;&lt;div class="link-close close-panel"&gt;&lt;i class="fa fa-times"/&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="link-close close-btn"&gt;&lt;i class="fa fa-times"/&gt;&lt;/div&gt;&lt;/div&gt;');768&lt;$(window).width()?
(this.params.modal_width&amp;&amp;""!=this.params.modal_width&amp;&amp;a.find(".modal-dialog").width(this.params.modal_width),a.removeClass("for-mobile")):(a.addClass("for-mobile"),a.find(".modal-content").css("min-height",$(window).height()+"px"));a.find(".link-close").click(function(){a.modal("hide")});return a},show:function(){this.modalInitialized||(this.modalEl=this.getModalElement(),this.modalEl.modal({show:!1}),this.element.appendTo(this.modalEl.find(".modal-body")),this.modalInitialized=!0);this.modalEl.modal("show");
$(".modal-backdrop").addClass("for-modal-xdget")}});window.gcShowModal=function(a){window.modalWindows[a]&amp;&amp;(gcFixIncident("show-modal",a),window.modalWindows[a].show())};
jQuery.widget("gc.xdget_embed",$.gc.xdget_container,{getLabel:function(){return Yii.t("common","\u0412\u0438\u0434\u0436\u0435\u0442")},applyParams:function(a){$.gc.xdget_container.prototype.applyParams.call(this,a);this.params.css?(a=$("#css"+this.xdgetId),0&lt;a.length?a.html(this.params.css):(a=$('&lt;style id="css'+this.xdgetId+'"&gt;'),a.appendTo($("body"))),a.html(this.params.css)):$("#css"+this.xdgetId).detach()},canAddElement:function(){return!0},useChildAvailableChildren:function(){return!0}});
jQuery.widget("gc.xdget_insertEmbed",$.gc.xdget_area,{canBeInherited:!0,getLabel:function(){return this.getParam("model_name")?"\u0412\u0438\u0434\u0436\u0435\u0442: "+this.getParam("model_name"):"\u0412\u0438\u0434\u0436\u0435\u0442"},applyParams:function(a){$.gc.xdget_area.prototype.applyParams.call(this,a);this.params.css?(a=$("#css"+this.xdgetId),0&lt;a.length?a.html(this.params.css):(a=$('&lt;style id="css'+this.xdgetId+'"&gt;'),a.appendTo($("body"))),a.html(this.params.css)):$("#css"+this.xdgetId).detach()},
canAddElement:function(){return!0},useChildAvailableChildren:function(){return!1},isRootContainer:function(){return!1},isAutoContainer:function(){return!1},addBlockInside:function(){return!1}});
jQuery.widget("gc.xdget_page",$.gc.xdget_substitution,{getLabel:function(){var a="";"site"==this.params.type?(a="\u0428\u0430\u0431\u043b\u043e\u043d \u0441\u0430\u0439\u0442\u0430","undefined"!=typeof Yii&amp;&amp;(a=Yii.t("common","\u0428\u0430\u0431\u043b\u043e\u043d \u0441\u0430\u0439\u0442\u0430"))):(a="\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430","undefined"!=typeof Yii&amp;&amp;(a=Yii.t("common","\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430")));return a},applyParams:function(a){$.gc.xdget_substitution.prototype.applyParams.call(this,
a);this.applyCss();a=this.params.title?this.params.title:this.params.name;this.element.find(".page-title").html(a)},droppedBlock:function(a,b){var c=this.element.find(".area-PAGE").data("xdget");c||$.gc.xdget_substitution.prototype.droppedBlock.call(this,a,b);c.droppedBlock(a,b)},canAddElement:function(){return!0},useChildAvailableChildren:function(){return!0}});
jQuery.widget("gc.xdget_pageNavbar",$.gc.xdget_container,{build:function(){this.options.params.children=this.makeChildren();this.params=this.options.params;this.options.existedXdget=!1;this.options.params.elClass="container";this.element.empty();$.gc.xdget_container.prototype.build.call(this);this.element.find(".navbar-header &gt; .xdget-container-self-content").addClass("navbar-brand")},makeChildren:function(){var a=window.rootXdget.options.params.pageRoot,b="navbar-header";this.options.params.pageId==
a.id&amp;&amp;(b+=" active");return[{type:"container",params:{uncontrolled:!0,children:[{type:"container",params:{uncontrolled:!0,elClass:b,content:a.title,link:a.url,children:[]}},{type:"container",params:{elClass:"collapse navbar-collapse navbar-responsive-collapse",children:[{type:"pageTree",params:{uncontrolled:!0,elClass:"navbar-nav nav",children:[],pageId:this.options.params.pageId}}]}}]}}]},createItem:function(a){var b={type:"item",params:{content:a.title,children:[]}};if(a.children){for(var c={type:"list",
params:{children:[]}},d=0;d&lt;a.children.length;d++)c.params.children.push(this.createItem(a.children[d]));b.params.children.push(c)}return b},getElementTitle:function(){return"\u0412\u0435\u0440\u0445\u043d\u044f\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f"}});
jQuery.widget("gc.xdget_pageTree",$.gc.xdget_list,{build:function(){this.options.params.children=this.makePageTreeChildren();this.params=this.options.params;this.options.existedXdget=!1;this.element.empty();$.gc.xdget_list.prototype.build.call(this);this.element.find(".dropdown a").addClass("dropdown-toggle");this.element.find(".dropdown a").data("toggle","dropdown");this.element.find(".dropdown-menu").addClass("sub-menu")},makePageTreeChildren:function(){var a=this.createItem(window.rootXdget.options.params.pageRoot);
return 0==a.params.children.length?[]:a.params.children[0].params.children},createItem:function(a){var b={type:"item",params:{uncontrolled:!0,content:a.title,link:a.url,children:[],elClass:""}};this.options.params.pageId==a.id&amp;&amp;(b.params.elClass="active");if(a.children){b.params.elClass+=" dropdown";for(var c={type:"list",params:{children:[],elClass:"dropdown-menu"}},d=0;d&lt;a.children.length;d++)c.params.children.push(this.createItem(a.children[d]));b.params.children.push(c)}return b},getElementTitle:function(){return"\u0414\u0435\u0440\u0435\u0432\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446"}});
jQuery.widget("gc.xdget_systemPage",$.gc.xdget_substitution,{getLabel:function(){var a="\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430";"undefined"!=typeof Yii&amp;&amp;(a=Yii.t("common","\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430"));return a},applyParams:function(a){$.gc.xdget_substitution.prototype.applyParams.call(this,a);a||(this.getParam("title")?$(".page-header h1").html(this.getParam("title")):$(".page-header h1").html(this.getParam("defaultTitle")))},isAutoContainer:function(){return!1}});
jQuery.widget("gc.xdget_webinarTranslation",$.gc.xdget_video,{messageEl:null,applyParams:function(a){var b=this;window.addEventListener("message",function(a){a.data instanceof Array&amp;&amp;(console.log(a.data),e(a.data));"tunnelLoaded"===a.data&amp;&amp;d()},!1);b.element.find(".controls .broadcasts").html("&lt;tr&gt;&lt;td&gt;\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u0439...&lt;/td&gt;&lt;/tr&gt;");var c=b.element.find("iframe.tunnel");
b.element.find(".controls a.refresh").click(function(){d()});var d=function(){b.element.find(".controls .broadcasts").html("&lt;tr&gt;&lt;td&gt;\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u0439...&lt;/td&gt;&lt;/tr&gt;");c.get(0).contentWindow.postMessage("getBroadcasts","*")},e=function(a){b.element.find(".controls .broadcasts").html("&lt;tr&gt;&lt;th&gt;\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435&lt;/th&gt;&lt;th&gt;\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435&lt;/th&gt;&lt;th&gt;id&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;/tr&gt;");
0&lt;a.length?($.each(a,function(a,c){$("&lt;tr&gt;&lt;td&gt;"+c.snippet.title+"&lt;/td&gt;&lt;td&gt;"+c.snippet.description+"&lt;/td&gt;&lt;td&gt;"+c.id+'&lt;/td&gt;&lt;td&gt;&lt;button data-id="'+c.id+'" class="btn btn-success select-broadcast"&gt;\u0412\u044b\u0431\u0440\u0430\u0442\u044c&lt;/button&gt;&lt;/td&gt;&lt;/tr&gt;').find(".select-broadcast").click(function(){b.element.find("input.broadcast-ytid").val($(this).attr("data-id"))}).end().appendTo(b.element.find(".controls .broadcasts"))}),1!==a.length||b.element.find("input.broadcast-ytid").val()||b.element.find("input.broadcast-ytid").val(a[0].id)):
b.element.find(".controls .broadcasts").html("&lt;tr&gt;&lt;td&gt;\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u0439...&lt;/td&gt;&lt;/tr&gt;")};a=this.getIframeUrl();null==a?this.messageEl||(this.messageEl=$("&lt;div class='alert alert-info'&gt;"),this.messageEl.appendTo(this.element.find("div.video")),$("&lt;h3 style='margin-bottom: 20px'&gt;\u0422\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u044f \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430&lt;/h3&gt;").appendTo(this.messageEl),
a=this.getParam("status"),this.getParam("can_start")?"new"==a?$("&lt;div&gt;\u041d\u0430\u0447\u043d\u0438\u0442\u0435 \u0435\u0451 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043d\u043e\u043f\u043a\u0438 '\u0412\u043e\u0439\u0442\u0438 \u0432 \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u044e'&lt;/div&gt;").appendTo(this.messageEl):$("&lt;div&gt;\u0421\u0442\u0430\u0442\u0443\u0441 \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u0438: "+this.getParam("status_label")+"&lt;/div&gt;").appendTo(this.messageEl):
$("&lt;div&gt;\u041e\u0436\u0438\u0434\u0430\u0435\u043c \u043d\u0430\u0447\u0430\u043b\u0430 \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u0438&lt;/div&gt;")):this.messageEl&amp;&amp;(this.messageEl.detach(),this.messageEl=null);this.element.addClass("xdget-video");this.element.find("button.set-broadcast-ytid").click(function(a){a.preventDefault();a=b.element.find("input.broadcast-ytid").val();$.post("/pl/webinar/public/set-yt",{ytid:a,hurl:$(this).attr("data-hurl"),uid:$(this).attr("data-uid"),userid:$(this).attr("data-userid"),
hash:$(this).attr("data-hash")}).success(function(a){a.status&amp;&amp;"ok"===a.status&amp;&amp;document.location.reload()})});var f=this.getParam("playerWidth");f&amp;&amp;""!=f||(f="550");var g=this.getParam("playerHeight");g||(g="100%"==f?"56%":.56*f);(a=this.getIframeUrl())&amp;&amp;a&amp;&amp;(this.getParam("autoplay")&amp;&amp;!this.isEditorEnabled()&amp;&amp;(a+="autoplay=1"),this.iframe||(this.iframe=$("&lt;iframe border=0 width='"+f+"' height='"+g+"' frameborder='0' allowfullscreen/&gt;"),this.iframe.appendTo(this.element.find("div.video"))),a!=this.iframe.attr("src")&amp;&amp;
this.iframe.attr("src",a));this.getParam("responsive")?(this.element.addClass("responsive"),$(this.iframe).css("width",""),$(this.iframe).css("height","")):(this.element.removeClass("responsive"),f&amp;&amp;this.isNumber(f)&amp;&amp;$(this.iframe).css("width",f+"px"),g&amp;&amp;this.isNumber(g)&amp;&amp;$(this.iframe).css("height",g+"px"));$(".controls .broadcasts").length&amp;&amp;$(".main-page-block &gt; .container &gt; .xdget-root").prepend('&lt;div style="color: red; position: relative; top: -30px;"&gt;\u0423\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0439 \u0442\u0438\u043f \u0432\u0435\u0431\u0438\u043d\u0430\u0440\u0430. \u0417\u0430\u043f\u0443\u0441\u043a \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d. \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 \u0432\u0435\u0431\u0438\u043d\u0430\u0440.&lt;/div&gt;')},
getIframeUrl:function(){var a=this.getParam("ytid");a||(a=this.getParam("videoId"));return a?"https://www.youtube.com/embed/"+a+"?modestbranding=1&amp;rel=0&amp;showinfo=0&amp;":null}});jQuery.widget("gc.xdget_lesson",$.gc.xdget_container,{options:{},getElementTitle:function(){return"\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0443\u0440\u043e\u043a\u0430"},build:function(){},applyParams:function(a){$.gc.xdget_container.prototype.applyParams.call(this,a);this.applyCss()}});
jQuery.widget("gc.xdget_lessonList",$.gc.xdget_standard,{options:{}});jQuery.widget("gc.xdget_training",$.gc.xdget_container,{options:{},getElementTitle:function(){return Yii.t("common","\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0442\u0440\u0435\u043d\u0438\u043d\u0433\u0430")},build:function(){},applyParams:function(a){$.gc.xdget_container.prototype.applyParams.call(this,a);this.applyCss()}});jQuery.widget("gc.xdget_trainingList",$.gc.xdget_standard,{});
</pre></body></html>