var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,c,d){a instanceof String&&(a=String(a));for(var b=a.length,e=0;e<b;e++){var g=a[e];if(c.call(d,g,e,a))return{i:e,v:g}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,c,d){if(a==Array.prototype||a==Object.prototype)return a;a[c]=d.value;return a};$jscomp.getGlobal=function(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var c=0;c<a.length;++c){var d=a[c];if(d&&d.Math==Math)return d}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(a,c){var d=$jscomp.propertyToPolyfillSymbol[c];if(null==d)return a[c];d=a[d];return void 0!==d?d:a[c]};
$jscomp.polyfill=function(a,c,d,b){c&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(a,c,d,b):$jscomp.polyfillUnisolated(a,c,d,b))};$jscomp.polyfillUnisolated=function(a,c,d,b){d=$jscomp.global;a=a.split(".");for(b=0;b<a.length-1;b++){var e=a[b];if(!(e in d))return;d=d[e]}a=a[a.length-1];b=d[a];c=c(b);c!=b&&null!=c&&$jscomp.defineProperty(d,a,{configurable:!0,writable:!0,value:c})};
$jscomp.polyfillIsolated=function(a,c,d,b){var e=a.split(".");a=1===e.length;b=e[0];b=!a&&b in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var g=0;g<e.length-1;g++){var k=e[g];if(!(k in b))return;b=b[k]}e=e[e.length-1];d=$jscomp.IS_SYMBOL_NATIVE&&"es6"===d?b[e]:null;c=c(d);null!=c&&(a?$jscomp.defineProperty($jscomp.polyfills,e,{configurable:!0,writable:!0,value:c}):c!==d&&($jscomp.propertyToPolyfillSymbol[e]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(e):$jscomp.POLYFILL_PREFIX+e,e=
$jscomp.propertyToPolyfillSymbol[e],$jscomp.defineProperty(b,e,{configurable:!0,writable:!0,value:c})))};$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(c,d){return $jscomp.findInternal(this,c,d).v}},"es6","es3");"undefined"==typeof XWiki&&(XWiki={});
XWiki.Blog={initialize:function(){var a=$("blog_AddCategoryButton");a&&Event.observe(a,"click",XWiki.Blog.createBlogCategory.bindAsEventListener(a.form))},createBlogCategory:function(){var a=this.newCategoryName.value,c=encodeURI(a.replace(/'/g,"").replace(/"/g,"")),d=encodeURI(a),b=this.newCategoryParent.value,e=encodeURI(b.substring(0,b.indexOf("."))),g=encodeURI(b);new Ajax.Request("/save/Blog/__name__?ajax\x3d1\x26template\x3dBlog.CategoryTemplate\x26form_token\x3dOgyy377Buuw5hxLZ7R7R7w".replace(/__name__/g,
c)+"\x26parent\x3d"+g+"\x26title\x3d"+d+"\x26Blog.CategoryClass_0_name\x3d"+d,{method:"get",onSuccess:XWiki.Blog.updateCategoryTree.bindAsEventListener(this,a,b,e),on1223:function(k){k.request.options.onSuccess(k)},on409:function(){alert("Target page already exists, please choose a different name")},on403:function(){alert("You are not allowed to create the target page")},on401:function(){alert("You have been logged out, please refresh and log in")},onFailure:function(){alert("blog.manageCategories.js.add.failed")}})},
updateCategoryTree:function(a,c,d,b){a=(a=$("blog_category_"+d))?a.up():$("blog_category_container");d=a.down("ul");d||(d=document.createElement("ul"),a.appendChild(d));var e=d.childElements(),g=!1,k="blog_category_"+b+"."+c,l=document.createElement("li"),h=document.createElement("label");h.id=k;l.appendChild(h);var f=document.createElement("input");f.type="checkbox";f.checked="checked";f.name="Blog.BlogPostClass_0_category";f.value=b+"."+c;h.appendChild(f);h.appendChild(document.createTextNode(" "+
c));h=document.createElement("option");h.id=k+"_option";h.value=b+"."+c;f=0;for(b=a;b&&b!=$("blog_category_container");)f++,b=b.up("li");h.appendChild(document.createTextNode("\x26nbsp;".unescapeHTML().times(2*f)+c));c=$("blog_category_selectBox");for(b=0;b<e.size();++b)if(e[b].down("label").id>k){d.insertBefore(l,e[b]);e=$(e[b].down("label").id+"_option");c.insertBefore(h,e);g=!0;break}if(!g){d.appendChild(l);b=a;for(var m;!m&&b;)m=b.next("li"),b=b.up("li");m?c.insertBefore(h,$(m.down("label").id+
"_option")):c.appendChild(h)}}};document.observe("xwiki:dom:loaded",XWiki.Blog.initialize);
require(["jquery"],function(a){a(document).ready(function(){var c={icon:'\x3cspan class\x3d"fa fa-unlock"\x3e\x3c/span\x3e',comment:"Made entry visible",title:"This blog post is not visible to other users. Make it visible.",hiddenValue:"1",css:"blog-tool-show"},d={icon:'\x3cspan class\x3d"fa fa-lock"\x3e\x3c/span\x3e',comment:"Hidden entry",title:"Hide this blog post from other users.",hiddenValue:"0",css:"blog-tool-hide"};a(".blog-tool-show,.blog-tool-hide").click(function(b){b.preventDefault();
var e=a(this),g=e.parents(".hentry");e.hide();var k=e.hasClass("blog-tool-hide")?"hide":"show",l="hide"==k?c:d,h=new XWiki.widgets.Notification("Changing the visibility","inprogress");a.ajax(e.attr("href")).done(function(){e.find("span.icon-manage").html(l.icon);var f=e.attr("href").replace(/&comment=(.*?)(&|$)/,"\x26comment\x3d"+encodeURIComponent(l.comment)+"$2");f=f.replace(/_hidden=./,"_hidden\x3d"+l.hiddenValue);e.attr("href",f);e.attr("title",l.title);e.attr("class",l.css);"hide"==k?(g.hasClass("single-article")||
g.addClass("hidden-article"),f=g.find("\x3ediv.warningmessage"),0<f.length?f.show():(f=a("\x3cdiv\x3e").addClass("box").addClass("warningmessage"),f.text("This blog post is hidden."),f.insertBefore(g.find(".entry-content")))):(g.removeClass("hidden-article"),g.find("\x3ediv.warningmessage").hide());new XWiki.widgets.Notification("The visibility of the blog entry has been successfully changed","done")}).fail(function(f,m,n){403==f.statusCode()?new XWiki.widgets.Notification("You are not allowed to create the target page",
"error"):401==f.statusCode()?new XWiki.widgets.Notification("You have been logged out, please refresh and log in","error"):new XWiki.widgets.Notification("Failed to change blog post visibility.","error")}).always(function(){h.hide();e.show()})}).each(function(){var b=a(this);b.attr("href",b.attr("href").replace(/xredirect=.*?(&|$)/,"ajax\x3d1$1"))})})});