var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(a){var b=0;return function(){return b'),$(c).html(b));getJSONCDS(a+"?limit="+l+"&page="+p+"&keyword="+m+n).done(function(g){$(c).html(parseHtml(f,l,g,d))})} function multiPageHelper(a,b,c,f,p,l,m,d,n,g,e,h){h=void 0===h?"":h;""!==f&&(f='
'),$(p).html(f));var k="";b&&b.constructor===Array&&(k=parseArrayArgs(b));$(l).html("");getJSONCDS(c+"?limit="+n+"&page="+d+"&keyword="+g+h).done(function(u){var r=!1,t="",q=u.pageCount,y=u.pageResults,w=d+1,v=d-1;var x=d+3;w>q&&(w=q);0==v&&(v=1);1q?(r=1,x=q):v==d-1?(r=d>=q-2?q-3:d-1,--x):r=d;t+='';t+='';for(i=r;i<=x;i++)i<=q&&(t+='");t+='';t+=''}$(p).html(parseHtml(m, y,u,e));$(l).html(t)})}var Comments=function(a,b,c,f,p,l,m,d,n){this.assetid=a;this.commentsid=b;this.commentscontainer=c;this.buttonscontainer=f;this.successid=p;this.errorid=l;this.inputid=m;this.messageDelay=d;this.newObject=n;var g=this;getJSONCDS("https://api.alphaland.cc/game/info?id="+this.assetid).done(function(e){e.CommentsEnabled&&($(g.commentsid).show(),g.commentsPage())})}; Comments.prototype.commentsPage=function(a){multiPageHelper(this.newObject+".commentsPage",[],"https://api.alphaland.cc/comments/","https://api.alphaland.cc/logo",this.commentscontainer,this.buttonscontainer,'
Comment by {username} : {date}

{comment}

', void 0===a?1:a,10,"","No comments","&assetId="+this.assetid)};Comments.prototype.submitComment=function(a){var b=this;postJSONCDS("https://api.alphaland.cc/comments/newcomment?assetId="+this.assetid,JSON.stringify({comment:a})).done(function(c){c=c.alert;var f=b.errorid;"Comment Placed"==c&&(f=b.successid,$(b.inputid).val(""),b.commentsPage());$(f).text(c);$(f).show();window.scrollTo({top:0,behavior:"smooth"});setTimeout(function(){$(f).hide()},b.messageDelay)})};