/*! GreeCommonNavigationJS - v2.0.38 - 2023-06-08 */ !function(){var s,n,i,e,t,a,d,o,c,r,h;void 0===window.gree_common_navigation&&(s=function(){try{window.sessionStorage.setItem("test","dummy"),window.sessionStorage.removeItem("test")}catch(t){return!1}return!0}(),n=!!s&&window.sessionStorage,i=function(){s&&n.removeItem("navigation_notification")},t=function(){try{window.localStorage.setItem("test","dummy"),window.localStorage.removeItem("test")}catch(t){return!1}return!0}(),a=!!t&&window.localStorage,t&&a.removeItem("navigation_announce"),e=function(){var t="ontouchstart"in window,i=t?"touchstart":"mousedown",e="touchmove",s=t?"touchend":"mouseup",n=["click",i,e,s].join(" ");return{touchable:t,touchStartEvent:i,touchMoveEvent:e,touchEndEvent:s,touchCancelEvent:"touchcancel",allTouchEvent:n}},this.gree_common_navigation=new function(){var t=this,c={header:{static:!1,silent:!0},menu:{silent:!0},footer:{disable:!0}},r={header:{static:!0,silent:!0,hide:{mypage:!0}},menu:{silent:!1},footer:{static:!1,silent:!1}},l={header:{static:!0,silent:!1},menu:{silent:!1},footer:{disable:!0}};$("#content");this.init=function(t){var t=void 0===t?{}:t,i=!!t.is_logged_in||void 0!==t.pattern_id,e=d(t.pattern_id),s=this.isHttpsPage(),n=i?this.isPositionStyleUnsupported(navigator.userAgent)?l:r:c,a=h(n.header),o=h(n.footer),n=h(n.menu),t=(void 0!==t.header&&$.extend(a,t.header),void 0!==t.menu&&$.extend(n,t.menu),void 0!==t.footer&&$.extend(o,t.footer),this.isBreakPosition(navigator.userAgent)&&this.fixBreakPosition(),{is_logged_in:i,is_https_page:s});$.extend(a,t),$.extend(o,t),t.pattern_id=e,$.extend(n,t),gree_common_menu_box.init(n),gree_common_header.init(a),gree_common_footer.init(o)},this.show=function(){gree_common_header.show(),gree_common_footer.show(),gree_common_menu_box.show(),(gree_common_header.show_cntnotifs||gree_common_footer.show_cntnotifs)&&t.countNotifications(t.countNotificationsOnSuccess,t.countNotificationsOnError),t.callScrollTo(),window.addEventListener("hashchange",t.refresh,!1)},this.countNotifications=function(t,i){var e;s&&null!==n.getItem("navigation_notification")&&new Date-new Date(JSON.parse(n.getItem("navigation_notification")).updated_at)<3e5?t(JSON.parse(n.getItem("navigation_notification")).data,!0):($.ajaxSettings.beforeSend=function(t){t.withCredentials=!0},e=$("#gcf").data("notification-url"),e=this.isHttpsPage()?"https://"+e:"http://"+e,$.ajax({type:"GET",url:e,data:{action:"api_balloon_unreadcount",filter:"navigation"},xhrFields:{withCredentials:!0},cache:!1,dataType:"html",timeout:2e3,success:t,error:i}))},this.countNotificationsOnSuccess=function(t,i){!0!==i&&!0===s&&n.setItem("navigation_notification",JSON.stringify({data:t,updated_at:new Date})),gree_common_header.show_cntnotifs&&gree_common_header.updateNotificationCounts(t),gree_common_footer.show_cntnotifs&&gree_common_footer.updateNotificationCounts(t)},this.countNotificationsOnError=function(t,i,e){},this.isPositionStyleUnsupported=function(t){var i,e;return!!t&&(i=new RegExp(/Android (1\.5|1\.6|2\.1|2\.2)/),e=new RegExp(/iP(?:hone|ad|od); (?:U; )?CPU (?:iPhone )?(like|OS [234]_)/),!!t.match(i)||!!t.match(e))},this.isScrollNeeded=function(t){var i;return!!t&&(i=new RegExp(/iP(?:hone|ad|od); (?:U; )?CPU (?:iPhone )?OS 5_/),!!t.match(i))},this.isBreakPosition=function(t){var i;return!!t&&(i=new RegExp(/iP(?:hone|ad|od)/),!!t.match(i))},this.fixBreakPosition=function(){var t=this;$("input[type=password], input[type=text]").on("focus",function(){$(window).on("orientationchange",t.unfix)}),$("input[type=password], input[type=text]").on("blur",function(){$(window).off("orientationchange",t.unfix),t.fix()})},this.callScrollTo=function(){t.isScrollNeeded(navigator.userAgent)&&setTimeout(function(){scrollTo(0,2)},3e3)},this.refresh=function(){void 0!==gree_common_menu_box&&gree_common_menu_box.close(),t.callScrollTo()},this.fix=function(){gree_common_header.fix(),gree_common_footer.fix()},this.unfix=function(){gree_common_header.unfix(),gree_common_footer.unfix()},this.showPCLink=function(){},this.getOS=function(t){var i,e;return t?(i=new RegExp(/iP(?:hone|ad|od)/),e=new RegExp(/Android/),t.match(i)?"i":t.match(e)?"a":"o"):"u"},this.isHttpsPage=function(){return"https:"===window.location.protocol}},(t=function(){}).prototype={id_prefix:"",template:void 0,init:function(t){var t=void 0===t?{}:t,i=void 0===t.hide?{}:t.hide,e=!!t.is_logged_in;this.pattern_id=t.pattern_id,this.disabled=!!t.disable,this.silent=!e||this.disabled||!!t.silent,this.is_https_page=!!t.is_https_page,this.login_extension=t.login_extension,this.disabled||(this.static=!!t.static,this.show_top=!i.top,this.show_mygame=e&&!i.mygame,this.show_mypage=e&&!i.mypage,this.show_menu=e&&!i.menu,this.show_search=!i.search,this.show_login=!e&&!i.login,this.show_chat=e&&!i.chat,this.show_cntnotifs=!this.silent,this.is_absolute=!!t.absolute)},observeTap:function(t){t=t||".tap";var i="ontouchstart"in window,e=i?"touchstart":"mousedown",s="touchmove",i=i?"touchend":"mouseup",n=["click",e,s,i].join(" ");$(t,this.own()).off(n).on(e,function(t){var i=$(this);i.data("tapped","true"),setTimeout(function(){"true"===i.data("tapped")&&i.addClass("tapped")},100)}).on(s,function(t){"true"===$(this).data("tapped")&&$(this).data("tapped","false").removeClass("tapped")}).on(i,function(t){$(this).data("tapped","false").removeClass("tapped")}).on("touchcancel",function(t){$(this).data("tapped","false").removeClass("tapped")}).on("click",function(t){var i=$(this);i.addClass("tapped"),setTimeout(function(){i.removeClass("tapped")},100)})},updateNotificationCounts:function(t){this.disabled||(2<=(t=t.split(",")).length&&(this._changeNotificationIcon("IcMg",this._getBadgeValue(t[0])),this._changeNotificationIcon("IcMp",this._getBadgeValue(t[1]))),3===t.length&&this.show_chat&&this._changeNotificationIcon("IcCh",this._getBadgeValue(t[2])))},_getBadgeValue:function(t){t=d(t);return 0===t?"":99
ログイン
',this.show=function(){var t=document.getElementById("navigation").children[0];this.addMyself(t),this.show_mygame&&r(this.own("IcMg"),"hide"),this.show_mypage&&r(this.own("IcMp"),"hide"),this.show_search&&r(this.own("IcSr"),"hide"),this.show_menu&&(r(this.own("IcMn"),"hide"),this.own("BtMn").addEventListener("click",this.openMenuBox,!1)),this.show_login&&(t=this.own("BtLg"),r(t,"hide"),t.addEventListener("click",function(){location.href=i.getLoginUrl()})),this.static&&c(this.own(),"static"),this.observeTap()},this.openMenuBox=function(){gree_common_menu_box.toggle()},this.getLoginUrl=function(){var t=this.own("BtLg").getAttribute("data-url");return void 0!==this.login_extension&&(t+=this.login_extension),t}}).prototype=new t,this.gree_common_header=new a,(a=function(){this.id_prefix="gcf",this.template='
',this.show=function(){var t=document.getElementById("glContr");this.addMyself(t),this.disabled||(this.show_top&&r(this.own("IcTp"),"hide"),this.show_mygame&&r(this.own("IcMg"),"hide"),this.show_mypage&&r(this.own("IcMp"),"hide"),this.show_chat&&r(this.own("IcCh"),"hide"),this.static&&c(this.own(),"static"),r(this.own(),"hide"),this.observeTap(),this.show_mypage&&$(this.own("IcMp")).on(e().touchStartEvent,function(){i()}),this.show_mygame&&$(this.own("IcMg")).on(e().touchStartEvent,function(){i()}))},this.fix=function(){this.static||(r(this.own(),"static"),r(parent,"staticNavFoot"),$("#glContr").removeClass("staticNavFoot"))},this.unfix=function(){this.static||(c(this.own(),"static"),$("#glContr").addClass("staticNavFoot"))}}).prototype=new t,this.gree_common_footer=new a,(CommonMenuBox=function(){var i=this;this.id_prefix="gcm",this.template='
',this.is_opened=!1,this.show=function(){this.is_opened=!1;var t=document.getElementById("gcnCn");this.addMyself(t),this.observeTap(),this.closeWithClick(),0!==this.pattern_id&&(this.showFriendLink(),this.fixURL())},this.fixURL=function(){var t=(t=i.own("BtFrLn").href).replace("user_id=user_id","user_id="+i.pattern_id);i.own("BtFrLn").href=t},this.closeWithClick=function(){$("#gcm a").on("click",this.close)},this.open=function(){r(i.own(),"hide"),i.hideContentsArea(),i.is_opened=!0},this.close=function(){i.showContentsArea(),c(i.own(),"hide"),i.is_opened=!1},this.toggle=function(t){i.is_opened?i.close():i.open()},this.showPCLink=function(){},this.showFriendLink=function(){r(this.own("BtFr"),"hide")}}).prototype=new t,this.gree_common_menu_box=new CommonMenuBox,d=function(t){t=parseInt(t,10);return"number"!=typeof t||isNaN(t)||t<0?0:t},o=function(t,i){return!(!t||!t.className||(i=new RegExp("(\\s|^)"+i+"(\\s|$)"),!t.className.match(i)))},c=function(t,i){t&&!o(t,i)&&(t.className+=" "+i)},r=function(t,i){o(t,i)&&(i=new RegExp("(\\s+|^)"+i+"(\\s|$)"),t.className=t.className.replace(i," "),t.className=t.className.replace(/^\s*(.*?)\s*$/,"$1"))},h=function(t){function i(){}return i.prototype=t,new i})}.call(this);