// ***************************
// js.compressed/subscribe.js
// ***************************
/*=======================================================================*\
|| ###################################################################### ||
|| # vBulletin 5.1.9 Patch Level 4
|| # ------------------------------------------------------------------ # ||
|| # Copyright 2000-2016 vBulletin Solutions Inc. All Rights Reserved.  # ||
|| # This file may not be redistributed in whole or significant part.   # ||
|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html   # ||
|| ###################################################################### ||
\*========================================================================*/
window.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=$.merge(window.vBulletin.phrase.precache,["follow","following","following_pending"]);window.vBulletin.options=window.vBulletin.options||{};window.vBulletin.options.precache=window.vBulletin.options.precache||[];window.vBulletin.options.precache=$.merge(window.vBulletin.options.precache,[]);(function(){vBulletin.subscribe={};vBulletin.subscribe.subscribe=function(A){if($(A).hasClass("isSubscribed")||$(A).hasClass("is-pending")){return true}var E=parseInt($(A).attr("data-node-id"),10),D={},B="";if($(A).hasClass("is-topic")){B="/ajax/api/follow/add";D.follow_item=E;D.type="follow_contents";vBulletin.subscribe.subscribeRequest(A,B,D)}else{var C={};C.channelid=E;C.recipient=parseInt($(A).attr("data-owner-id"),10);if($(A).hasClass("is-blog-channel")){C.requestType="member"}else{if($(A).hasClass("is-sg-channel")){C.requestType="sg_subscriber"}else{C.requestType="subscriber"}}vBulletin.AJAX({url:pageData.baseurl+"/ajax/api/node/requestChannel",data:C,success:function(F){vBulletin.subscribe.subscribeRequestSuccess(A,F)},error:function(){openAlertDialog({title:vBulletin.phrase.get("follow"),message:vBulletin.phrase.get("follow_error"),iconType:"error"})}})}};vBulletin.subscribe.subscribeRequest=function(A,B,C){$.ajax({url:pageData.baseurl+B,data:C,type:"POST",dataType:"json",success:function(D){vBulletin.subscribe.subscribeRequestSuccess(A,D)},error:function(){openAlertDialog({title:vBulletin.phrase.get("follow"),message:vBulletin.phrase.get("follow_error"),iconType:"error"})}})};vBulletin.subscribe.subscribeRequestSuccess=function(B,A){if(!isNaN(A)&&A==1){$(B).children(".button-text-primary").text(vBulletin.phrase.get("following"));$(B).addClass("isSubscribed special").removeClass("secondary")}else{if(!isNaN(A)&&A>1){$(B).children(".button-text-primary").text(vBulletin.phrase.get("following_pending"));$(B).addClass("is-pending special").removeClass("secondary")}else{if(A.errors){openAlertDialog({title:vBulletin.phrase.get("follow"),message:vBulletin.phrase.get(A.errors[0][0]),iconType:"error"})}else{openAlertDialog({title:vBulletin.phrase.get("follow"),message:vBulletin.phrase.get("follow_error"),iconType:"error"})}}}};vBulletin.subscribe.join=function(A){var C=parseInt($(A).attr("data-node-id"),10),B=parseInt($(A).attr("data-owner-id"),10);$.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/node/requestChannel",data:({channelid:C,recipient:B,requestType:"sg_member"}),type:"POST",dataType:"json",success:function(D){if(D.errors){openAlertDialog({title:vBulletin.phrase.get("join"),message:vBulletin.phrase.get(D.errors[0]),iconType:"error"})}else{if(D===true){$(A).children(".button-text-primary").text(vBulletin.phrase.get("joined"));$(A).addClass("has-joined special").removeClass("secondary")}else{if(!isNaN(D)){$(A).children(".button-text-primary").text(vBulletin.phrase.get("following_pending"));$(A).addClass("is-pending special").removeClass("secondary")}}}},error:function(){openAlertDialog({title:vBulletin.phrase.get("join"),message:vBulletin.phrase.get("join_error"),iconType:"error"})}})};vBulletin.subscribe.leave=function(A){var B=parseInt($(A).attr("data-node-id"),10);$.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/blog/leaveChannel",data:({channelId:B}),type:"POST",dataType:"json",success:function(C){if(C.errors){openAlertDialog({title:vBulletin.phrase.get("leave"),message:vBulletin.phrase.get(C.errors[0]),iconType:"error"})}else{if(C===true){var D=$(A);if(D.hasClass("follow-btn")){D.children(".button-text-primary").text(vBulletin.phrase.get("follow"));D.removeClass("isSubscribed unfollow-btn");D.addClass("special")}else{D.children(".button-text-primary").text(vBulletin.phrase.get("join"));D.removeClass("has-joined special")}location.reload()}else{openAlertDialog({title:vBulletin.phrase.get("leave"),message:vBulletin.phrase.get("invalid_server_response_please_try_again"),iconType:"error"})}}},error:function(){openAlertDialog({title:vBulletin.phrase.get("leave"),message:vBulletin.phrase.get("invalid_server_response_please_try_again"),iconType:"error"})}})};vBulletin.subscribe.unsubscribe=function(A){var B=$(A).attr("data-node-id");$.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/follow/delete",data:({follow_item:B,type:"follow_contents"}),type:"POST",dataType:"json",success:function(C){if(C==1){$(A).removeClass("isSubscribed unfollow-btn special").addClass("secondary").children(".button-text-primary").text(vBulletin.phrase.get("follow"))}else{if(C.errors){openAlertDialog({title:vBulletin.phrase.get("following_remove"),message:vBulletin.phrase.get(C.errors[0][0]),iconType:"error"})}else{openAlertDialog({title:vBulletin.phrase.get("follow"),message:vBulletin.phrase.get("unfollow_error"),iconType:"error"})}}},error:function(){openAlertDialog({title:vBulletin.phrase.get("follow"),message:vBulletin.phrase.get("unfollow_error"),iconType:"error"})}})};vBulletin.subscribe.getUnsubscribeOverlay=function(G){var H="",A=$(G).closest(".list-item").find("ul.unfollow_panel").filter(function(){var I=parseInt($(this).attr("data-node-id"),10);if(typeof I=="number"){H=I;return true}}),F=A.children(),D=false,C=false,B=false,E="";$.each(F,function(I,J){if($(J).hasClass("unfollow_content")){C=$(J).attr("data-item-id")}else{if($(J).hasClass("unfollow_member")){D=$(J).attr("data-item-id")}else{if($(J).hasClass("unfollow_channel")){B=$(J).attr("data-item-id")}}}});if(C){E+="&content="+C}if(D){E+="&member="+D}if(B){E+="&channel="+B}if(H){$.ajax({url:vBulletin.getAjaxBaseurl()+"/profile/getUnsubscribeOverlay?userId="+pageData.userid+E+"&nodeId="+H,type:"POST",success:function(I){var J=$(".unsubscribe-overlay-container");if(J){J.html(I);J.children(".unsubscribe-overlay").dialog({title:vBulletin.phrase.get("following_remove"),autoOpen:false,modal:true,resizable:false,closeOnEscape:false,showCloseButton:false,width:450,dialogClass:"dialog-container unsubscribe-dialog-container dialog-box"}).dialog("open")}},error:function(){openAlertDialog({title:vBulletin.phrase.get("following_remove"),message:vBulletin.phrase.get("unable_to_contact_server_please_try_again"),iconType:"error"})}})}};vBulletin.subscribe.removeUnsubscribeOptions=function(E,B){var D=$(E).parents(".unsubscribe-overlay"),F=parseInt(D.attr("data-node-id"),10),C=$(D).children(".unsubscribe-options"),A=[];if(typeof F!="number"){return false}var G="li :checkbox[name=unsubscribeItems]";if(!(($(C).find("li #"+F+"-unsubscribeAll:checkbox:checked")).length===1)){G+=":checked"}$.each($(C).find(G),function(H,K){var I=$(K).attr("data-type"),J=parseInt($(K).attr("data-item-id"),10);if(J&&typeof J=="number"){A.push({type:I,itemId:J})}});if(A.length>0){$.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/follow/unsubscribeItems",data:({unsubscribeItems:A}),type:"POST",dataType:"json",success:function(H){if(H===true){$(D).dialog("close").remove();B.updatePageNumber(1).applyFilters(false)}else{if(H.errors!=undefined){openAlertDialog({title:vBulletin.phrase.get("profile_guser"),message:vBulletin.phrase.get("unable_to_contact_server_please_try_again"),iconType:"error"})}}},error:function(){openAlertDialog({title:vBulletin.phrase.get("profile_guser"),message:vBulletin.phrase.get("unable_to_contact_server_please_try_again"),iconType:"error"})}})}else{openAlertDialog({title:vBulletin.phrase.get("profile_guser"),message:vBulletin.phrase.get("unsubscribe_overlay_error"),iconType:"error"})}};vBulletin.subscribe.updateSubscribeButton=function(B){if(typeof B!="undefined"){var A=$(".follow-btn").filter(function(){return $(this).data("node-id")==pageData.nodeid&&pageData.nodeid!=pageData.channelid});switch(B){case 0:A.addClass("secondary").removeClass("isSubscribed unfollow-btn special").children(".button-text-primary").text(vBulletin.phrase.get("follow"));break;case 1:A.addClass("isSubscribed special").removeClass("secondary").children(".button-text-primary").text(vBulletin.phrase.get("following"));break;case 2:A.addClass("is-pending special").removeClass("secondary").children(".button-text-primary").text(vBulletin.phrase.get("following_pending"));break}}};$(".follow-btn").on("click",function(A){if(!$(this).hasClass("isSubscribed")){vBulletin.subscribe.subscribe(this)}else{if($(this).hasClass("unfollow-btn")){if($(this).hasClass("is-blog-channel")){vBulletin.subscribe.leave(this)}else{vBulletin.subscribe.unsubscribe(this)}}}});$(".follow-btn").on("mouseover",function(A){if($(this).hasClass("isSubscribed")&&!$(this).hasClass("is-owner")){$(this).addClass("unfollow-btn secondary").removeClass("special");var B=vBulletin.phrase.get("following_remove");$(this).children(".button-text-primary").text(B)}});$(".follow-btn").on("mouseout",function(A){if($(this).hasClass("unfollow-btn")){$(this).removeClass("unfollow-btn secondary").addClass("special");var B=vBulletin.phrase.get("following");$(this).children(".button-text-primary").text(B)}});$(".share-btn").on("click",function(A){alert("Not yet implemented");return false});$(".join-btn").on("click",function(A){if(!$(this).hasClass("has-joined")&&!$(this).hasClass("is-pending")){vBulletin.subscribe.join(this)}else{if($(this).hasClass("leave-btn")&&!$(this).hasClass("is-owner")){vBulletin.subscribe.leave(this)}}});$(".join-btn").on("mouseover",function(A){if($(this).hasClass("has-joined")&&!$(this).hasClass("is-owner")){$(this).addClass("leave-btn secondary").removeClass("special");var B=vBulletin.phrase.get("leave");$(this).children(".button-text-primary").text(B)}});$(".join-btn").on("mouseout",function(A){if($(this).hasClass("leave-btn")&&!$(this).hasClass("is-owner")){$(this).removeClass("leave-btn secondary").addClass("special");var B=vBulletin.phrase.get("joined");$(this).children(".button-text-primary").text(B)}})})();;

// ***************************
// js.compressed/profile.js
// ***************************
/*=======================================================================*\
|| ###################################################################### ||
|| # vBulletin 5.1.9 Patch Level 4
|| # ------------------------------------------------------------------ # ||
|| # Copyright 2000-2016 vBulletin Solutions Inc. All Rights Reserved.  # ||
|| # This file may not be redistributed in whole or significant part.   # ||
|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html   # ||
|| ###################################################################### ||
\*========================================================================*/
window.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=$.merge(window.vBulletin.phrase.precache,["error","error_trying_to_change_user_status","error_x","follow","following","following_pending","following_remove","invalid_server_response_please_try_again","profile_guser","edit_avatar","invalid_data","no_permission","invalid_url","unable_to_upload_profile_photo","profile_media","album","album_saved","please_enter_message_x_chars","please_enter_title_x_chars","unable_to_contact_server_please_try_again"]);window.vBulletin.options=window.vBulletin.options||{};window.vBulletin.options.precache=window.vBulletin.options.precache||[];window.vBulletin.options.precache=$.merge(window.vBulletin.options.precache,["postminchars","statusMaxChars"]);var albumPhotoCount=0;(function(A){var B=[".profile-sidebar-widget"];if(!vBulletin.pageHasSelectors(B)){return false}if(vBulletin.isAlreadyLoaded("profile")){}A(document).ready(function(){var C=A(".profile-widget"),H=A("#profileTabs");if(H.length>0){var F=H.find(".ui-tabs-nav > li"),N=F.filter(".ui-tabs-selected"),M=N.index(),T,D,I=A(".subscribed-tab",H),P=A(".conversation-list",I),L=A(".activities-tab",H),G=A(".conversation-list",L),O,Q,R={},K=F.parent().data("allow-history")=="1",E=new vBulletin.history.instance(K),J=C.find(".js-module-top-anchor").attr("id");if(M==-1){M=0;N=F.first()}T=N.find("> a").attr("href");F.removeClass("ui-state-disabled");function S(X,W,Z,V){if(E.isEnabled()){var Y=E.getState();if(V||!Y||A.isEmptyObject(Y.data)){var U={from:X,tab:W,page:typeof Z=="undefined"?undefined:Z};E.setDefaultState(U,document.title,location.href)}}}vBulletin.tabify.call(H,{tabHistory:E,getTabIndexByHash:function(U){U=U||T;return F.filter('li:has(a[href*="'+U+'"])').first().index()},allowHistory:K,tabParamAsQueryString:false,hash:J,tabOptions:{selected:M,select:function(U,V){if(D){D.hideFilterOverlay()}if(O){O.hideFilterOverlay()}},show:function(U,b){var W=b.panel.id,d=A(b.panel),Y=A(this);if(typeof R[W]=="undefined"){R[W]=A(".conversation-toolbar-wrapper",b.panel).data("allow-history")=="1"}if(b.tab.hash=="#activities-tab"){if(!D){D=new vBulletin.conversation.filter({context:L,allowHistory:R[W],tabParamAsQueryString:false,onContentLoad:function(){vBulletin.conversation.processPostContent(G);vBulletin.truncatePostContent(G);if(vBulletin.upload){vBulletin.upload.initializePhotoUpload(L)}}});if(T==b.tab.hash){vBulletin.truncatePostContent(G);vBulletin.conversation.processPostContent(G);if(vBulletin.upload){vBulletin.upload.initializePhotoUpload(L)}D.lastFilters={filters:D.getSelectedFilters(A(".toolbar-filter-overlay",L))}}}else{D.setOption("context",L);if(typeof D.lastFilters!="undefined"&&A(".conversation-empty:not(.h-hide)",b.panel).length>0){delete D.lastFilters}}D.applyFilters(false,true)}else{if(b.tab.hash=="#subscribed-tab"){if(!O){O=new vBulletin.conversation.filter({context:I,allowHistory:R[W],tabParamAsQueryString:false,onContentLoad:function(){vBulletin.conversation.processPostContent(P);vBulletin.truncatePostContent(P)}});if(T==b.tab.hash){vBulletin.truncatePostContent(P);vBulletin.conversation.processPostContent(P);O.lastFilters={filters:O.getSelectedFilters(A(".toolbar-filter-overlay",I))}}}else{O.setOption("context",I);if(typeof O.lastFilters!="undefined"&&A(".conversation-empty:not(.h-hide)",b.panel).length>0){delete O.lastFilters}}O.applyFilters(false,true)}else{if(b.tab.hash=="#about-tab"){if(T==b.tab.hash){S("tabs","about");return }var Z=A(".js-profile-about-container",b.panel);if(A(".section",Z).length==0){A.post(vBulletin.getAjaxBaseurl()+"/profile/fetchAbout",{userid:Z.data("user-id")},function(e){Z.html(e)},"html")}}else{if(b.tab.hash=="#media-tab"){var a=Number(A("#mediaCurrentPage").val());if(T==b.tab.hash){S("media_filter","media",a,true);vBulletin.media.setHistoryStateChange();d.data("media-statechange-set",true);return }var V=A(".js-profile-media-container",b.panel);if(A(".item-album",V).length==0){var X=0;if(typeof (vBulletin.contentEntryBox)=="undefined"){X=1}A.post(vBulletin.getAjaxBaseurl()+"/profile/fetchMedia",{userid:V.data("user-id"),perpage:V.data("perpage"),allowHistory:1,includeJs:X,isAjaxTemplateRender:true},function(e){V.html(e);if(T!=b.tab.hash){var f=Number(A("#mediaCurrentPage").val());S("media_filter","media",f,true)}vBulletin.media.setHistoryStateChange(true);d.data("media-statechange-set",true);vBulletin.contentEntryBox.init()},"json")}else{if(!d.data("media-statechange-set")){S("media_filter","media",a,true);vBulletin.media.setHistoryStateChange();d.data("media-statechange-set",true)}}}else{if(b.tab.hash=="#infractions-tab"){var a=Number(A(".pagenav-form .js-pagenum",b.panel).val())||1;if(T==b.tab.hash){if(A(".pagenav-form",d).length&&!d.data("pagination-instance")){var c=new vBulletin.pagination({context:d,tabParamAsQueryString:false,allowHistory:d.find(".conversation-toolbar-wrapper").data("allow-history")==1,onPageChanged:function(e,f){vBulletin.infraction.loadUserInfractions({container:d,userid:d.data("userid"),pageNumber:e,replaceState:true})}});d.data("pagination-instance",true)}S("infraction_filter","infractions",a,true);vBulletin.infraction.setHistoryStateChange();d.data("infraction-statechange-set",true);return }if(A(".infraction-list",b.panel).length==0){S("infraction_filter","infractions",a,true);vBulletin.infraction.loadUserInfractions({container:d,userid:A(b.tab).data("userid"),pageNumber:a,callback:function(){vBulletin.infraction.setHistoryStateChange();d.data("infraction-statechange-set",true)}})}else{if(!d.data("infraction-statechange-set")){S("infraction_filter","infractions",a,true);vBulletin.infraction.setHistoryStateChange();d.data("infraction-statechange-set",true)}}}}}}}}}});A(".customize-theme").off("click").on("click",function(V){var U=A(".profile_custom_edit");if(U.is(":hidden")){if(A(".profileNavTabs",U).length>0){U.removeClass("h-hide");vBulletin.animateScrollTop(U.offset().top,{duration:"slow"})}else{A.post(vBulletin.getAjaxBaseurl()+"/ajax/render/profile_custom_edit",{userid:U.data("page-userid")},function(W){U.html(W);U.prependTo("#content").removeClass("h-hide");vBulletin.animateScrollTop(U.offset().top,{duration:"slow"})},"json").error(function(){openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("unable_to_contact_server_please_try_again"),iconType:"error"})}).complete(function(){})}}else{vBulletin.animateScrollTop(U.offset().top,{duration:"slow"})}})}else{A(".customize-theme").addClass("h-hide-imp")}A(".profileDetailTabs").tabs();A(".toggle_customizations").off("click").on("click",function(W){var U=A(this),V;if(U.attr("data-action")=="show"){V=1}else{V=0}A.ajax({url:vBulletin.getAjaxBaseurl()+"/profile/toggle-profile-customizations",data:{showusercss:V},type:"POST",dataType:"json",complete:function(){A("body").css("cursor","auto")},success:function(X){window.location.reload()},error:function(Z,Y,X){console.log("/profile/toggle-profile-customizations error: "+X);openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("error"),iconType:"error",onAfterClose:function(){window.location.reload()}})}})});if(H.length>0){C.off("click",".list-item-poll .view-more-ctrl").on("click",".list-item-poll .view-more-ctrl",function(V){var U=A(this).closest("form.poll");var W=U.find("ul.poll");A(this).addClass("h-hide");W.css("max-height","none").find("li.h-hide").slideDown(100,function(){U.find(".action-buttons").removeClass("h-hide").next(".view-less-ctrl").removeClass("h-hide");vBulletin.animateScrollTop(U.offset().top,{duration:"fast"})});return false});C.off("click",".list-item-poll .view-less-ctrl").on("click",".list-item-poll .view-less-ctrl",function(V){var U=A(this).closest("form.poll");vBulletin.conversation.limitVisiblePollOptionsInAPost(U,3);U.find("ul.poll").css("max-height","").find("li.h-hide").slideUp(100);return false});A(document).off("click",".unsubscribe-close").on("click",".unsubscribe-close",function(){var U=A(this).parents(".unsubscribe-overlay");A(U).dialog("close").remove()});A(document).off("click",".unsubscribe-delete").on("click",".unsubscribe-delete",function(){vBulletin.subscribe.removeUnsubscribeOptions(this,O)});A(document).off("click",".profileTabs .action_button").on("click",".profileTabs .action_button",function(){if(!A(this).hasClass("subscribepending_button")){var U=A(this);var W=parseInt(U.attr("data-userid"));var V="";if(U.hasClass("subscribe_button")){V="add"}else{if(U.hasClass("unsubscribe_button")){V="delete"}}if((typeof (W)=="number")&&V){A.ajax({url:vBulletin.getAjaxBaseurl()+"/profile/follow_button?do="+V+"&follower="+W+"&type=follow_members",type:"POST",dataType:"json",success:function(Y){if(Y==1||Y==2){if(V=="add"){var X=(Y==1)?"subscribed":"subscribepending";var Z=(Y==1)?"following":"following_pending";U.removeClass("subscribe_button").addClass(X+"_button").find(".button-text-primary").text(vBulletin.phrase.get(Z))}else{if(V=="delete"){U.removeClass("subscribed_button unsubscribe_button special").addClass("subscribe_button secondary").find(".button-text-primary").text(vBulletin.phrase.get("follow"))}}location.reload()}else{if(Y.errors){openAlertDialog({title:vBulletin.phrase.get("profile_guser"),message:vBulletin.phrase.get(Y.errors[0]),iconType:"error"})}}},error:function(){openAlertDialog({title:vBulletin.phrase.get("profile_guser"),message:vBulletin.phrase.get("unable_to_contact_server_please_try_again"),iconType:"error"})}})}}});A(document).off("mouseover",".profileTabs .action_button.subscribed_button").on("mouseover",".profileTabs .action_button.subscribed_button",function(U){A(this).html(vBulletin.phrase.get("following_remove")).toggleClass("subscribed_button unsubscribe_button special secondary")});A(document).off("mouseout",".profileTabs .action_button.unsubscribe_button").on("mouseout",".profileTabs .action_button.unsubscribe_button",function(U){A(this).html(vBulletin.phrase.get("following")).toggleClass("subscribed_button unsubscribe_button special secondary")});A(document).off("click",".js-updata-status-btn").on("click",".js-updata-status-btn",function(){var V=A(this).closest(".section-content").find(".js-user-status-text");var U=A.trim(V.val());if(V.hasClass("placeholder")&&U==V.attr("placeholder")){U=""}var W=window.vBulletin.options.get("statusMaxChars");if(U.length>W){openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("please_enter_user_status_with_at_most_x_characters",W),iconType:"warning"});return false}A.ajax({url:vBulletin.getAjaxBaseurl()+"/profile/updateStatus",type:"POST",data:({userid:pageData.userid,status:U}),dataType:"json",success:function(X){if(X){if(X.errors){var Y=vBulletin.phrase.get("error_trying_to_change_user_status");if(X.errors&&A.isArray(X.errors)&&A.isArray(X.errors[0])){A.each(X.errors,function(Z,a){A.each(a,function(c,b){if(c>0){a[c]=vBulletin.phrase.get(b)}});X.errors[Z]=vBulletin.phrase.get(a)});Y=X.errors.join("<br />")}else{if(X.errors){Y=vBulletin.phrase.get(X.errors)}}openAlertDialog({title:vBulletin.phrase.get("profile_guser"),message:Y,iconType:"warning"})}else{A("#userStatus").text('"'+X+'"');V.val("")}}else{if(X===""){A("#userStatus").text("");V.val("")}else{openAlertDialog({title:vBulletin.phrase.get("profile_guser"),message:vBulletin.phrase.get("error_trying_to_change_user_status"),iconType:"error"})}}},error:function(){openAlertDialog({title:vBulletin.phrase.get("profile_guser"),message:vBulletin.phrase.get("invalid_server_response_please_try_again"),iconType:"error"})}})});vBulletin.conversation.bindEditFormEventHandlers("all");C.off("click",".js-post-control__ip-address").on("click",".js-post-control__ip-address",vBulletin.conversation.showIp);C.off("click",".js-post-control__vote").on("click",".js-post-control__vote",function(U){if(A(U.target).closest(".bubble-flyout").length==1){vBulletin.conversation.showWhoVoted.apply(U.target,[U])}else{vBulletin.conversation.votePost.apply(this,[U])}return false});C.off("click",".js-post-control__edit").on("click",".js-post-control__edit",vBulletin.conversation.editPost);C.off("click",".js-post-control__flag").on("click",".js-post-control__flag",vBulletin.conversation.flagPost);C.off("click",".js-post-control__comment").on("click",".js-post-control__comment",vBulletin.conversation.toggleCommentBox);C.off("click",".js-comment-entry__post").on("click",".js-comment-entry__post",function(U){vBulletin.conversation.postComment.apply(this,[U,function(){location.reload()}])});C.off("click",".post-controls .replyCtrl").on("click",".post-controls .replyCtrl",function(){alert("Not implemented yet")})}if(A("body").is(".view-mode")){A("#editProfilePicture").off("click").on("click",editProfilePhoto);A("#btnProfilePhotoSave").off("click").on("click",cropProfilePhoto)}A("#btnProfilePhotoContinue").off("click").on("click",function(){var V=A("[name=profile-img-option]:checked").val();switch(parseInt(V)){case 2:var U=A("#profilePhotoUrl").val();if(!U){openAlertDialog({title:vBulletin.phrase.get("edit_avatar"),message:vBulletin.phrase.get("upload_invalid_url"),iconType:"error"});break}initIAS();A("#profilePicImgCrop").attr("src",U);case 1:A("div#cropFrame").removeClass("h-hide");A("#btnProfilePhotoSave").removeClass("h-hide-imp");A("#btnProfilePhotoContinue").addClass("h-hide-imp");A("div#uploadFrame").addClass("h-hide");A("#btnProfilePhotoClose").focus();break;case 4:resetAvatar();break}});A("#btnProfilePhotoClose").off("click").on("click",function(){closeUploader();resetCropValues();A("div#uploadFrame").removeClass("h-hide");A("div#cropFrame").addClass("h-hide");A("#btnProfilePhotoSave").addClass("h-hide-imp");A("#btnProfilePhotoContinue").removeClass("h-hide-imp");A("#editProfilePhotoDlg").dialog("close").find("form").trigger("reset")});A(document).off("click",".gallery-upload-form .files a:not([target^=_blank])").on("click",".gallery-upload-form .files a:not([target^=_blank])",function(U){U.preventDefault();A('<iframe style="display:none;"></iframe>').prop("src",this.href).appendTo("body")});A("#editProfilePhotoDlg .frmprofilePhoto").ajaxForm({success:function(V,Y,a,U){if(V){if(V.errors){if(typeof (V.errors[0])=="undefined"){openAlertDialog({title:vBulletin.phrase.get("edit_avatar"),message:vBulletin.phrase.get(V.errors),iconType:"error"})}else{openAlertDialog({title:vBulletin.phrase.get("edit_avatar"),message:vBulletin.phrase.get(V.errors[0][0]),iconType:"error"})}}else{if(V["0"]){var X=V["0"].indexOf("?")==-1?"?":"&";var Z=A("#profilePicImg").attr("src",pageData.baseurl_core+"/"+V["0"]+X+"random="+Math.random()).attr("src");A(".avatar-"+pageData.userid).attr("src",Z);var W=A("#editProfilePhotoDlg");W.find("form").trigger("reset");W.dialog("close")}}}else{openAlertDialog({title:vBulletin.phrase.get("edit_avatar"),message:vBulletin.phrase.get("unable_to_upload_profile_photo"),iconType:"error"})}},error:function(U){openAlertDialog({title:vBulletin.phrase.get("edit_avatar"),message:vBulletin.phrase.get("unable_to_contact_server_please_try_again"),iconType:"error"})},complete:function(W,V){var U=A("#editProfilePhotoDlg");U.find(".upload-progress-bar").addClass("h-hide");U.find("input,button").prop("disabled",false);U.find(".custom-upload-button").removeClass("h-disabled")},dataType:"json",beforeSerialize:function(){var U=A("#editProfilePhotoDlg");var V=A('[name="profile-img-option"]:checked',U);if(V.val()=="2"&&A.trim(A(".profilePhotoUrl",U).val())!=""){U.find("button, input").prop("disabled",true);V.closest(".profile-img-option-container").find(".profile-img-option-field input").prop("disabled",false)}return true},beforeSubmit:function(a,U,Y){var b=A('[name="profile-img-option"]:checked',U);var Z=b.val(),X=true;if(Z=="1"){if(A(".fileText",U).val()==""){openAlertDialog({title:vBulletin.phrase.get("edit_avatar"),message:"Please browse an image to upload.",iconType:"warning",onAfterClose:function(){b.focus()}});X=false}}else{if(Z=="2"){if(A.trim(A(".profilePhotoUrl",U).val())==""){openAlertDialog({title:vBulletin.phrase.get("edit_avatar"),message:"Please specify the image URL from a hosting site.",iconType:"warning",onAfterClose:function(){A(".profilePhotoUrl",U).focus()}});X=false}}else{if(Z=="3"){var W=A(".avatarHolder .defaultAvatarSet.defaultAvatarSelected").data("avatarid");if(!W){openAlertDialog({title:vBulletin.phrase.get("edit_avatar"),message:"Please select a default profile photo.",iconType:"warning",onAfterClose:function(){b.focus()}})}else{setDefaultAvatar(W)}X=false}}}if(X){var V=A("#editProfilePhotoDlg");V.find(".action-buttons .upload-progress-bar").removeClass("h-hide");V.find(".custom-upload-button").addClass("h-disabled")}return X}})})})(jQuery);var ias=null;editProfilePhoto=function(D){$(".defaultAvatarSet").removeClass("defaultAvatarSelected");$("#defaultAvatars").html("");var A=$("#editProfilePhotoDlg").dialog({width:734,title:vBulletin.phrase.get("edit_avatar"),autoOpen:false,modal:true,resizable:false,closeOnEscape:false,showCloseButton:false,dialogClass:"dialog-container edit-profile-photo-dialog-container dialog-box"}).dialog("open");$(".profile-img-option-container .browse-option").off("click").on("click",function(E){$(".avatarHolder .defaultAvatarSet.defaultAvatarSelected").removeClass("defaultAvatarSelected")});$(".profile-img-option-container .url-option").off("click").on("click",function(E){var F=$(this);$(".avatarHolder .defaultAvatarSet.defaultAvatarSelected").removeClass("defaultAvatarSelected");setTimeout(function(){F.closest(".profile-img-option-container").find(".profilePhotoUrl").trigger("focus.photourl")},10)});$(".profile-img-option-container .default-option").off("click").on("click",function(E){if($("#defaultAvatars .avatarHolder").length==0){var F=$(this);F.closest(".profile-img-option-container").find(".upload-progress-bar").removeClass("h-hide");$.ajax({url:vBulletin.getAjaxBaseurl()+"/profile/getdefaultavatars",type:"POST",dataType:"html",success:function(G){if(G){if(G.errors){openAlertDialog({title:vBulletin.phrase.get("edit_avatar"),message:vBulletin.phrase.get(G.errors[0][0]),iconType:"error"})}else{$("#defaultAvatars").html(G);$(".defaultAvatarSet").off("click").on("click",function(){$(".defaultAvatarSet").removeClass("defaultAvatarSelected");$(this).addClass("defaultAvatarSelected");$(".profile-img-option-container .default-option").trigger("click")})}}else{openAlertDialog({title:vBulletin.phrase.get("edit_avatar"),message:vBulletin.phrase.get("invalid_server_response_please_try_again"),iconType:"error"})}},error:function(G){openAlertDialog({title:vBulletin.phrase.get("edit_avatar"),message:vBulletin.phrase.get("invalid_server_response_please_try_again"),iconType:"error"})},complete:function(){F.closest(".profile-img-option-container").find(".upload-progress-bar").addClass("h-hide")}})}});var C=$("#editProfilePicture").data("avatarmaxsize");var B=false;$("#profilePhotoFile").off("click").on("click",function(){$(this).closest(".profile-img-option-container").find(".browse-option").trigger("click")}).fileupload({url:vBulletin.getAjaxBaseurl()+"/profile/upload_profilepicture",dropZone:null,dataType:"json",add:function(I,H){if(!H.crop){B=H;var G="undefined";var F=(typeof window.createObjectURL!==G&&window)||(typeof URL!==G&&URL)||(typeof webkitURL!==G&&webkitURL);var E=F?F.createObjectURL(H.files[0]):$(H.fileInput).val();var J=H.files[0].fileName||H.files[0].name;$(".profile-img-option-container .fileText").val(J);if(!F){B.fileInput.attr("name","profilePhotoFull");B.submit();B.fileInput.attr("name","profilePhotoFile");closeUploader()}else{$("#btnProfilePhotoContinue").trigger("click");initIAS();$("#profilePicImgCrop").attr("src",E)}}else{H.crop.resized_width=$("#profilePicImgCrop").width();H.crop.resized_height=$("#profilePicImgCrop").height();B.formData=H.crop;B.formData.securitytoken=pageData.securitytoken;B.submit();closeUploader()}},done:function(I,H){var F=H.result;if(F){if(F.errors){openAlertDialog({title:vBulletin.phrase.get("edit_avatar"),message:vBulletin.phrase.get(F.errors[0]),iconType:"error"});return false}else{if(F.imageUrl){$("#profilePhotoUrl").val(F.imageUrl).data("filedataid",F.filedataid);$("#profilePhotoUrl").trigger("focus");$("#btnProfilePhotoContinue").trigger("click");return false}else{$("#defaultAvatars").html(F);$(".defaultAvatarSet").off("click").on("click",function(){$(".defaultAvatarSet").removeClass("defaultAvatarSelected");$(this).addClass("defaultAvatarSelected");$(".profile-img-option-container .default-option").trigger("click")})}}}else{openAlertDialog({title:vBulletin.phrase.get("edit_avatar"),message:vBulletin.phrase.get("invalid_server_response_please_try_again"),iconType:"error"});return false}var G=F.avatarpath.indexOf("?")==-1?"?":"&";var E=F.avatarpath?(F.avatarpath+G+"random="+Math.random()):F[0];var J=$("#profilePicImg").attr("src",pageData.baseurl_core+"/"+E).attr("src");$(".avatar-"+pageData.userid).attr("src",J);$("#profilePicImgCrop").attr("src","");$("#btnProfilePhotoClose").trigger("click")},fail:function(H,F){var G=vBulletin.phrase.get("error_uploading_image");var E="error";if(F&&F.files.length>0){switch(F.files[0].error){case"acceptFileTypes":G=vBulletin.phrase.get("invalid_image_allowed_filetypes_are");E="warning";break}}openAlertDialog({title:vBulletin.phrase.get("upload"),message:G,iconType:E,onAfterClose:function(){A.find(".fileText").val("");A.find(".browse-option").focus()}})},always:function(F,E){A.find(".action-buttons .upload-progress-bar").addClass("h-hide");A.find("input,button").prop("disabled",false);A.find(".custom-upload-button").removeClass("h-disabled");return false}});$("#profilePhotoUrl").off("focus").on("focus",function(){$(this).closest(".profile-img-option-container").find(".url-option").trigger("click")})};cropProfilePhoto=function(G){var B=$("#profilePicImgCrop").attr("src");if(B==""){closeUploader();openAlertDialog({title:vBulletin.phrase.get("edit_avatar"),message:vBulletin.phrase.get("please_select_a_image_to_crop"),iconType:"error"});$("#btnProfilePhotoSave").addClass("h-hide-imp");$("#btnProfilePhotoContinue").removeClass("h-hide-imp");$("div#cropFrame").addClass("h-hide");$("div#uploadFrame").removeClass("h-hide");return false}var F={crop:{}};var A=$("#editProfilePicture");var E=A.data("avatarmaxwidth");var D=A.data("avatarmaxheight");F.crop["x1"]=$("#x1").val()||0;F.crop["x2"]=$("#x2").val()||E;F.crop["y1"]=$("#y1").val()||0;F.crop["y2"]=$("#y2").val()||D;F.crop["width"]=$("#width").val()||E;F.crop["height"]=$("#height").val()||D;F.crop["resized_width"]=$("#profilePicImgCrop").width();F.crop["resized_height"]=$("#profilePicImgCrop").height();F.securitytoken=pageData.securitytoken;var C=$("[name=profile-img-option]:checked").val();if(C=="1"){F.files=$("#profilePhotoFile");F.url=pageData.baseurl+"/profile/upload_profilepicture";$("#profilePhotoFile").fileupload("add",F)}else{if(C=="2"){F.profilePhotoUrl=$("#profilePhotoUrl").val();F.filedataid=$("#profilePhotoUrl").data("filedataid");vBulletin.AJAX({url:vBulletin.getAjaxBaseurl()+"/profile/upload_profilepicture",data:F,success:function(I){var J=I.avatarpath.indexOf("?")==-1?"?":"&";var H=I.avatarpath?(I.avatarpath+J+"random="+Math.random()):I[0];var K=$("#profilePicImg").attr("src",pageData.baseurl_core+"/"+H).attr("src");$(".avatar-"+pageData.userid).attr("src",K);$("#profilePicImgCrop").attr("src","");$("#btnProfilePhotoClose").trigger("click");$("#profilePhotoUrl").data("filedataid","")}})}}resetCropValues()};resetCropValues=function(){$("#x1").val("");$("#x2").val("");$("#y1").val("");$("#y2").val("")};initIAS=function(){var E=false;var B=$("#profilePicImgCrop");var A=$("#editProfilePicture");var D=A.data("avatarmaxwidth");var C=A.data("avatarmaxheight");B.off("load").on("load",function(){if(E){return }if(B.width()>D||B.height()>C){E=true;var F=Math.min(D,C,B.width(),B.height());ias=B.imgAreaSelect({aspectRatio:"1:1",handles:true,zIndex:1012,enable:true,show:true,x1:0,y1:0,x2:F,y2:F,onSelectChange:setDimensions,instance:true})}else{$("#btnProfilePhotoSave").trigger("click")}})};setDefaultAvatar=function(B){var A=$("#editProfilePhotoDlg");A.find(".action-buttons .upload-progress-bar").removeClass("h-hide");A.find("button, input").prop("disabled",true);A.find(".custom-upload-button").addClass("h-disabled");$.ajax({url:vBulletin.getAjaxBaseurl()+"/profile/set_defaultavatar?avatarid="+B,type:"POST",dataType:"json",success:function(C){if(C){if(C.errors){openAlertDialog({title:vBulletin.phrase.get("edit_avatar"),message:vBulletin.phrase.get(C.errors[0][0]),iconType:"error"})}else{var D=$("#profilePicImg").attr("src",pageData.baseurl_core+"/"+C.avatarpath).attr("src");$(".avatar-"+pageData.userid).attr("src",D);A.dialog("close");A.find("form").trigger("reset")}}else{openAlertDialog({title:vBulletin.phrase.get("edit_avatar"),message:vBulletin.phrase.get("invalid_server_response_please_try_again"),iconType:"error"})}},error:function(){openAlertDialog({title:vBulletin.phrase.get("edit_avatar"),message:vBulletin.phrase.get("invalid_server_response_please_try_again"),iconType:"error"})},complete:function(){A.find(".action-buttons .upload-progress-bar").addClass("h-hide");A.find("input,button").prop("disabled",false);A.find(".custom-upload-button").removeClass("h-disabled")}})};setDimensions=function(A,B){$("#x1").val(B.x1);$("#y1").val(B.y1);$("#x2").val(B.x2);$("#y2").val(B.y2);$("#width").val(B.width);$("#height").val(B.height)};resetAvatar=function(){vBulletin.AJAX({url:vBulletin.getAjaxBaseurl()+"/profile/resetAvatar",success:function(A){var C=$("#profilePicImg").attr("src",pageData.baseurl_core+"/"+A.avatarpath).attr("src");$(".avatar-"+pageData.userid).attr("src",C);$("#btnProfilePhotoClose").trigger("click");var B=$("#editProfilePhotoDlg");B.find("form").trigger("reset")},complete:function(){var A=$("#editProfilePhotoDlg");A.find(".action-buttons .upload-progress-bar").addClass("h-hide");A.find("input,button").prop("disabled",false);A.find(".custom-upload-button").removeClass("h-disabled")}})};closeUploader=function(){$("#profilePicImgCrop").imgAreaSelect({remove:true});if(ias!=null){ias=null}$("#profilePhotoFile").fileupload("destroy");$("#profilePhotoFile").removeData(["fileupload","blueimp.fileupload.form"])};;

// ***************************
// js.compressed/jquery/jquery.imgareaselect.pack.js
// ***************************
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(m($){1k W=2v.4N,D=2v.4M,F=2v.4L,u=2v.4K;m V(){C $("<4J/>")};$.N=m(T,c){1k O=$(T),2E,A=V(),1i=V(),I=V().r(V()).r(V()).r(V()),B=V().r(V()).r(V()).r(V()),E=$([]),1J,G,l,17={v:0,l:0},Q,M,1j,1f={v:0,l:0},12=0,1I="1G",2k,2j,1s,1r,S,1A,1z,2o,2n,14,1O,a,b,j,g,f={a:0,b:0,j:0,g:0,H:0,L:0},2u=R.4I,$p,d,i,o,w,h,2p;m 1m(x){C x+17.v-1f.v};m 1l(y){C y+17.l-1f.l};m 1a(x){C x-17.v+1f.v};m 19(y){C y-17.l+1f.l};m 1y(3H){C 3H.4H-1f.v};m 1x(3G){C 3G.4G-1f.l};m 13(30){1k 1h=30||1s,1g=30||1r;C{a:u(f.a*1h),b:u(f.b*1g),j:u(f.j*1h),g:u(f.g*1g),H:u(f.j*1h)-u(f.a*1h),L:u(f.g*1g)-u(f.b*1g)}};m 23(a,b,j,g,2Z){1k 1h=2Z||1s,1g=2Z||1r;f={a:u(a/1h||0),b:u(b/1g||0),j:u(j/1h||0),g:u(g/1g||0)};f.H=f.j-f.a;f.L=f.g-f.b};m 1e(){9(!O.H()){C}17={v:u(O.2t().v),l:u(O.2t().l)};Q=O.2X();M=O.3F();17.l+=(O.2Y()-M)>>1;17.v+=(O.2q()-Q)>>1;1A=u(c.4F/1s)||0;1z=u(c.4E/1r)||0;2o=u(F(c.4D/1s||1<<24,Q));2n=u(F(c.4C/1r||1<<24,M));9($().4B=="1.3.2"&&1I=="21"&&!2u["4A"]){17.l+=D(R.1p.2r,2u.2r);17.v+=D(R.1p.2s,2u.2s)}1f=/1G|4z/.1V(1j.q("1o"))?{v:u(1j.2t().v)-1j.2s(),l:u(1j.2t().l)-1j.2r()}:1I=="21"?{v:$(R).2s(),l:$(R).2r()}:{v:0,l:0};G=1m(0);l=1l(0);9(f.j>Q||f.g>M){1S()}};m 1T(3D){9(!1O){C}A.q({v:1m(f.a),l:1l(f.b)}).r(1i).H(w=f.H).L(h=f.L);1i.r(I).r(E).q({v:0,l:0});I.H(D(w-I.2q()+I.2X(),0)).L(D(h-I.2Y()+I.3F(),0));$(B[0]).q({v:G,l:l,H:f.a,L:M});$(B[1]).q({v:G+f.a,l:l,H:w,L:f.b});$(B[2]).q({v:G+f.j,l:l,H:Q-f.j,L:M});$(B[3]).q({v:G+f.a,l:l+f.g,H:w,L:M-f.g});w-=E.2q();h-=E.2Y();2N(E.3b){15 8:$(E[4]).q({v:w>>1});$(E[5]).q({v:w,l:h>>1});$(E[6]).q({v:w>>1,l:h});$(E[7]).q({l:h>>1});15 4:E.3E(1,3).q({v:w});E.3E(2,4).q({l:h})}9(3D!==Y){9($.N.1Z!=2Q){$(R).U($.N.1Z,$.N.3C)}9(c.1R){$(R)[$.N.1Z]($.N.3C=2Q)}}9($.1b.1E&&I.2q()-I.2X()==2){I.q("3B",0);3u(m(){I.q("3B","4y")},0)}};m 22(3A){1e();1T(3A);a=1m(f.a);b=1l(f.b);j=1m(f.j);g=1l(f.g)};m 27(2W,2w){c.1N?2W.4x(c.1N,2w):2W.1q()};m 1c(2V){1k x=1a(1y(2V))-f.a,y=19(1x(2V))-f.b;9(!2p){1e();2p=11;A.1F("4w",m(){2p=Y})}S="";9(c.2C){9(y<=c.1U){S="n"}X{9(y>=f.L-c.1U){S="s"}}9(x<=c.1U){S+="w"}X{9(x>=f.H-c.1U){S+="e"}}}A.q("2U",S?S+"-18":c.26?"4v":"");9(1J){1J.4u()}};m 2R(4t){$("1p").q("2U","");9(c.4s||f.H*f.L==0){27(A.r(B),m(){$(J).1q()})}$(R).U("P",2l);A.P(1c);c.2f(T,13())};m 2B(1W){9(1W.3w!=1){C Y}1e();9(S){$("1p").q("2U",S+"-18");a=1m(f[/w/.1V(S)?"j":"a"]);b=1l(f[/n/.1V(S)?"g":"b"]);$(R).P(2l).1F("1w",2R);A.U("P",1c)}X{9(c.26){2k=G+f.a-1y(1W);2j=l+f.b-1x(1W);A.U("P",1c);$(R).P(2S).1F("1w",m(){c.2f(T,13());$(R).U("P",2S);A.P(1c)})}X{O.1M(1W)}}C Y};m 1v(3z){9(14){9(3z){j=D(G,F(G+Q,a+W(g-b)*14*(j>a||-1)));g=u(D(l,F(l+M,b+W(j-a)/14*(g>b||-1))));j=u(j)}X{g=D(l,F(l+M,b+W(j-a)/14*(g>b||-1)));j=u(D(G,F(G+Q,a+W(g-b)*14*(j>a||-1))));g=u(g)}}};m 1S(){a=F(a,G+Q);b=F(b,l+M);9(W(j-a)<1A){j=a-1A*(j<a||-1);9(j<G){a=G+1A}X{9(j>G+Q){a=G+Q-1A}}}9(W(g-b)<1z){g=b-1z*(g<b||-1);9(g<l){b=l+1z}X{9(g>l+M){b=l+M-1z}}}j=D(G,F(j,G+Q));g=D(l,F(g,l+M));1v(W(j-a)<W(g-b)*14);9(W(j-a)>2o){j=a-2o*(j<a||-1);1v()}9(W(g-b)>2n){g=b-2n*(g<b||-1);1v(11)}f={a:1a(F(a,j)),j:1a(D(a,j)),b:19(F(b,g)),g:19(D(b,g)),H:W(j-a),L:W(g-b)};1T();c.2g(T,13())};m 2l(2T){j=/w|e|^$/.1V(S)||14?1y(2T):1m(f.j);g=/n|s|^$/.1V(S)||14?1x(2T):1l(f.g);1S();C Y};m 1u(3y,3x){j=(a=3y)+f.H;g=(b=3x)+f.L;$.2c(f,{a:1a(a),b:19(b),j:1a(j),g:19(g)});1T();c.2g(T,13())};m 2S(2m){a=D(G,F(2k+1y(2m),G+Q-f.H));b=D(l,F(2j+1x(2m),l+M-f.L));1u(a,b);2m.4r();C Y};m 2h(){$(R).U("P",2h);1e();j=a;g=b;1S();S="";9(!B.2y(":4q")){A.r(B).1q().2D(c.1N||0)}1O=11;$(R).U("1w",1L).P(2l).1F("1w",2R);A.U("P",1c);c.3v(T,13())};m 1L(){$(R).U("P",2h).U("1w",1L);27(A.r(B));23(1a(a),19(b),1a(a),19(b));9(!J 4p $.N){c.2g(T,13());c.2f(T,13())}};m 2z(2i){9(2i.3w!=1||B.2y(":4o")){C Y}1e();2k=a=1y(2i);2j=b=1x(2i);$(R).P(2h).1w(1L);C Y};m 2A(){22(Y)};m 2x(){2E=11;25(c=$.2c({1Q:"4n",26:11,20:"1p",2C:11,1U:10,3t:m(){},3v:m(){},2g:m(){},2f:m(){}},c));A.r(B).q({36:""});9(c.2F){1O=11;1e();1T();A.r(B).1q().2D(c.1N||0)}3u(m(){c.3t(T,13())},0)};1k 2Q=m(16){1k k=c.1R,d,t,2M=16.4m;d=!1K(k.2O)&&(16.2e||16.3q.2e)?k.2O:!1K(k.2a)&&16.3r?k.2a:!1K(k.2b)&&16.3s?k.2b:!1K(k.2P)?k.2P:10;9(k.2P=="18"||(k.2b=="18"&&16.3s)||(k.2a=="18"&&16.3r)||(k.2O=="18"&&(16.2e||16.3q.2e))){2N(2M){15 37:d=-d;15 39:t=D(a,j);a=F(a,j);j=D(t+d,a);1v();1t;15 38:d=-d;15 40:t=D(b,g);b=F(b,g);g=D(t+d,b);1v(11);1t;3p:C}1S()}X{a=F(a,j);b=F(b,g);2N(2M){15 37:1u(D(a-d,G),b);1t;15 38:1u(a,D(b-d,l));1t;15 39:1u(a+F(d,Q-1a(j)),b);1t;15 40:1u(a,b+F(d,M-19(g)));1t;3p:C}}C Y};m 1P(3o,2L){3m(2d 4l 2L){9(c[2d]!==1X){3o.q(2L[2d],c[2d])}}};m 25(K){9(K.20){(1j=$(K.20)).3g(A.r(B))}$.2c(c,K);1e();9(K.2K!=3n){E.1n();E=$([]);i=K.2K?K.2K=="4k"?4:8:0;3c(i--){E=E.r(V())}E.29(c.1Q+"-4j").q({1o:"1G",34:0,1H:12+1||1});9(!4i(E.q("H"))>=0){E.H(5).L(5)}9(o=c.2J){E.q({2J:o,2G:"3j"})}1P(E,{3k:"2I-28",3i:"2H-28",3l:"1d"})}1s=c.4h/Q||1;1r=c.4g/M||1;9(K.a!=3n){23(K.a,K.b,K.j,K.g);K.2F=!K.1q}9(K.1R){c.1R=$.2c({2b:1,2a:"18"},K.1R)}B.29(c.1Q+"-4f");1i.29(c.1Q+"-4e");3m(i=0;i++<4;){$(I[i-1]).29(c.1Q+"-2I"+i)}1P(1i,{4d:"2H-28",4c:"1d"});1P(I,{3l:"1d",2J:"2I-H"});1P(B,{4b:"2H-28",4a:"1d"});9(o=c.3k){$(I[0]).q({2G:"3j",3h:o})}9(o=c.3i){$(I[1]).q({2G:"49",3h:o})}A.3g(1i.r(I).r(1J).r(E));9($.1b.1E){9(o=B.q("3f").3e(/1d=(\\d+)/)){B.q("1d",o[1]/1Y)}9(o=I.q("3f").3e(/1d=(\\d+)/)){I.q("1d",o[1]/1Y)}}9(K.1q){27(A.r(B))}X{9(K.2F&&2E){1O=11;A.r(B).2D(c.1N||0);22()}}14=(d=(c.48||"").47(/:/))[0]/d[1];O.r(B).U("1M",2z);9(c.1D||c.1C===Y){A.U("P",1c).U("1M",2B);$(3d).U("18",2A)}X{9(c.1C||c.1D===Y){9(c.2C||c.26){A.P(1c).1M(2B)}$(3d).18(2A)}9(!c.46){O.r(B).1M(2z)}}c.1C=c.1D=1X};J.1n=m(){25({1D:11});A.r(B).1n()};J.45=m(){C c};J.31=25;J.44=13;J.43=23;J.42=1L;J.41=22;$p=O;3c($p.3b){12=D(12,!1K($p.q("z-3a"))?$p.q("z-3a"):12);9($p.q("1o")=="21"){1I="21"}$p=$p.20(":3Z(1p)")}12=c.1H||12;9($.1b.1E){O.3Y("3X","3W")}$.N.1Z=$.1b.1E||$.1b.3V?"3U":"3T";9($.1b.3S){1J=V().q({H:"1Y%",L:"1Y%",1o:"1G",1H:12+2||2})}A.r(B).q({36:"35",1o:1I,3R:"35",1H:12||"0"});A.q({1H:12+2||2});1i.r(I).q({1o:"1G",34:0});T.33||T.3Q=="33"||!O.2y("3P")?2x():O.1F("3O",2x);9($.1b.1E&&$.1b.3N>=7){T.32=T.32}};$.2w.N=m(Z){Z=Z||{};J.3M(m(){9($(J).1B("N")){9(Z.1n){$(J).1B("N").1n();$(J).3L("N")}X{$(J).1B("N").31(Z)}}X{9(!Z.1n){9(Z.1C===1X&&Z.1D===1X){Z.1C=11}$(J).1B("N",3K $.N(J,Z))}}});9(Z.3J){C $(J).1B("N")}C J}})(3I);',62,298,'|||||||||if|x1|y1|_7|||_23|y2|||x2||top|function||||css|add|||_4|left|||||_a|_d|return|_2|_e|_3|_10|width|_c|this|_53|height|_13|imgAreaSelect|_8|mousemove|_12|document|_1c|_6|unbind|_5|_1|else|false|_54||true|_16|_2c|_21|case|_4f|_11|resize|_29|_28|browser|_39|opacity|_30|_15|sy|sx|_b|_14|var|_27|_26|remove|position|body|hide|_1b|_1a|break|_44|_41|mouseup|evY|evX|_1e|_1d|data|enable|disable|msie|one|absolute|zIndex|_17|_f|isNaN|_49|mousedown|fadeSpeed|_22|_50|classPrefix|keys|_31|_32|resizeMargin|test|_3f|undefined|100|keyPress|parent|fixed|_35|_2e||_4e|movable|_37|color|addClass|ctrl|shift|extend|option|altKey|onSelectEnd|onSelectChange|_48|_4b|_19|_18|_3d|_47|_20|_1f|_25|outerWidth|scrollTop|scrollLeft|offset|_24|Math|fn|_4d|is|_4a|_4c|_3e|resizable|fadeIn|_9|show|borderStyle|background|border|borderWidth|handles|_52|key|switch|alt|arrows|_34|_3b|_40|_43|cursor|_3a|_38|innerWidth|outerHeight|_2f|_2d|setOptions|src|complete|fontSize|hidden|visibility||||index|length|while|window|match|filter|append|borderColor|borderColor2|solid|borderColor1|borderOpacity|for|null|_51|default|originalEvent|ctrlKey|shiftKey|onInit|setTimeout|onSelectStart|which|_46|_45|_42|_36|margin|onKeyPress|_33|slice|innerHeight|_2b|_2a|jQuery|instance|new|removeData|each|version|load|img|readyState|overflow|opera|keypress|keydown|safari|on|unselectable|attr|not||update|cancelSelection|setSelection|getSelection|getOptions|persistent|split|aspectRatio|dashed|outerOpacity|outerColor|selectionOpacity|selectionColor|selection|outer|imageHeight|imageWidth|parseInt|handle|corners|in|keyCode|imgareaselect|animated|instanceof|visible|preventDefault|autoHide|_3c|toggle|move|mouseout|fadeOut|auto|relative|getBoundingClientRect|jquery|maxHeight|maxWidth|minHeight|minWidth|pageY|pageX|documentElement|div|round|min|max|abs'.split('|')))
;

