define(["jquery"],function(g){var k=g("html");if(k.data("xwiki-reference")!==undefined){var e=XWiki.Model.resolve(k.data("xwiki-reference"),XWiki.EntityType.DOCUMENT);var b=e.extractReference(XWiki.EntityType.WIKI);var c=e.extractReference(XWiki.EntityType.SPACE);return{documentReference:e,document:XWiki.Model.serialize(e.relativeTo(b)),wiki:b.getName(),space:XWiki.Model.serialize(c.relativeTo(b)),page:e.getName(),version:k.data("xwiki-version"),restURL:k.data("xwiki-rest-url"),form_token:k.data("xwiki-form-token")}}var l=g("meta");var n=["document","wiki","space","page","version","restURL","form_token"];var h={};for(var f=0;f<l.length;++f){var m=g(l[f]);var a=m.attr("name");for(var d=0;d<n.length;++d){if(a==n[d]){h[a]=m.attr("content")}}}return h});