Jonas Kress (WMDE) has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/321869

Change subject: Provide dist files for npm package
......................................................................

Provide dist files for npm package

At the moment this is a manually build and will not update
automatically. Also we don't have versioning for it.

Change-Id: Iad2917ed1a137c617baa2eb5140891a5427d9b01
---
M README.md
A dist/css/style.min.css
A dist/js/wdqs.min.js
3 files changed, 8 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui 
refs/changes/69/321869/1

diff --git a/README.md b/README.md
index f226f70..0bd65e6 100644
--- a/README.md
+++ b/README.md
@@ -18,7 +18,7 @@
 Alternative use npm install
 
 ```bash
-npm i wikidata-query-gui
+npm install wikidata-query-gui
 ```
 
 #Run tests
@@ -53,7 +53,7 @@
 
 #Components
 ## Editor
-A code mirror based SPARQL editor with code completion (ctrl+space) and 
tooltips
+A [CodeMirror](https://codemirror.net/) based SPARQL editor with code 
completion (ctrl+space) and tooltips (hover)
 ```
 var editor = new wikibase.queryService.ui.editor.Editor();
 editor.fromTextArea( $( '.editor' )[0] );
@@ -88,10 +88,8 @@
        result.setResult( api.getResultRawData() );
        result.draw( element );
 } );
-
-
-See examples/result.html
 ```
+See examples/result.html
 
 
 
diff --git a/dist/css/style.min.css b/dist/css/style.min.css
new file mode 100644
index 0000000..4eb5d4d
--- /dev/null
+++ b/dist/css/style.min.css
@@ -0,0 +1 @@
+.QueryExamples 
input.tags-input,.queryEditor{visibility:hidden}body{overflow-y:scroll}.error{margin:20px;overflow-x:scroll;font-family:monospace;white-space:pre}#clear-button{margin-right:10px}#query-box
 .navbar-left,#query-box 
.navbar-right,.navbar-right{margin-right:0}#hide-explorer,#query-error,#query-error-short,#query-result,.query-total{display:none}.graph-iframe{width:100%;height:90vh;border:none;margin:0}.error-line{border-bottom:2px
 dotted red}.error-character{background:#ffa07a}#query-result 
pre{display:inline;font-family:serif;border:none;background-color:inherit}#query-result{width:100%}#result-browser-menu
 .fa,#result-browser-menu .glyphicon{padding:0 .5em 0 0}.cm-s-default 
.cm-bracket{color:#000}.CodeMirror{border:1px solid 
#ccc;height:auto!important}.CodeMirror-scroll{min-height:300px}.CodeMirror-hint{max-width:19em}.queryEditor{min-height:273px;padding:0}pre.CodeMirror-placeholder{color:#777}.exampleQueries{width:160px}#query-box{position:relative}#query-box
 
.status{padding:3px;font-size:13px;min-height:25px;color:#777;margin-bottom:5px}.dataUpdated>span:nth-child(1){padding:5px}#query-box
 
.nav{margin-left:0}.shareQuery{z-index:100;position:absolute;top:10px;right:10px;font-size:25px;background:rgba(255,255,255,.5)}.alert,.navbar{margin-bottom:0}.navbar
 
.dropdown-menu{z-index:1001}.popover{max-width:500px;width:auto}.dropdown-toggle
 .fa:before,.dropdown-toggle 
.glyphicon:before{margin-right:3px}.navbar-brand{line-height:35px;padding:5px 
15px}.navbar-brand 
img{padding-right:5px}.navbar-toggle{z-index:100}.navbar-btn{margin-left:15px}.nav>li{float:left}@media
 
(max-width:900px){.navbar-header{float:none}.navbar-toggle{display:block}.navbar-collapse{border-top:1px
 solid transparent;box-shadow:inset 0 1px 0 
rgba(255,255,255,.1)}.navbar-collapse.collapse{display:none!important}.navbar-nav{float:none!important;margin:7.5px
 
-15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px}.navbar-text{float:left;margin:15px
 
0}.navbar-collapse.collapse.in{display:block!important}.collapsing{overflow:hidden!important}}.wikibase-rdf-hint{border-bottom:1px
 solid gray;white-space:normal}.QueryExamples 
.tagCloud{width:100%;height:200px}.QueryExamples 
.tag{background-color:#337ab7;background-image:none}.QueryExamples 
.tagFilter{padding-bottom:5px!important}.QueryExamples 
.exampleTable{max-height:500px;overflow-y:auto;overflow-x:hidden;border:1px 
solid 
#ccc}iframe.shortUrl{border:none;width:250px;height:40px}.explorer-panel{position:fixed;right:0;bottom:0;background-color:rgba(255,255,255,.8);z-index:100;display:none;overflow:auto}.visual-editor,.visual-editor-trigger{z-index:100;position:absolute;right:45px}.explorer-panel
 iframe{height:70vh;width:50vw}div.jqcloud{color:#337ab7}div.jqcloud 
a{color:inherit}div.jqcloud a:hover{color:#337ab7}div.jqcloud 
span.w10{color:rgba(51,122,183,1)}div.jqcloud 
span.w9{color:rgba(51,122,183,.9)}div.jqcloud 
span.w8{color:rgba(51,122,183,.8)}div.jqcloud 
span.w7{color:rgba(51,122,183,.75)}div.jqcloud 
span.w6{color:rgba(51,122,183,.6)}div.jqcloud 
span.w5{color:rgba(51,122,183,.65)}div.jqcloud 
span.w4{color:rgba(51,122,183,.5)}div.jqcloud 
span.w3{color:rgba(51,122,183,.55)}div.jqcloud 
span.w2{color:rgba(51,122,183,.4)}div.jqcloud 
span.w1{color:rgba(51,122,183,.45)}.masonry{width:95%;margin:1.5em 
0;padding:0;-moz-column-gap:1.5em;-webkit-column-gap:1.5em;column-gap:1.5em;font-size:.85em}.item,.item>a>img{display:inline-block;width:100%}.item{background:#fff;padding:1em;margin:0
 0 
1.5em;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-shadow:2px
 2px 4px 0 #ccc}@media only screen and 
(min-width:400px){.masonry{-moz-column-count:2;-webkit-column-count:2;column-count:2}}@media
 only screen and 
(min-width:700px){.masonry{-moz-column-count:3;-webkit-column-count:3;column-count:3}}@media
 only screen and 
(min-width:900px){.masonry{-moz-column-count:4;-webkit-column-count:4;column-count:4}}@media
 only screen and 
(min-width:1100px){.masonry{-moz-column-count:5;-webkit-column-count:5;column-count:5}}@media
 only screen and (min-width:1280px){.wrapper{width:1260px}}.action-bar 
.progress{height:30px;font-size:30px}.action-bar 
.progress-bar{font-size:16px;line-height:30px;font-weight:700}.action-bar 
.label{display:block;font-size:16px;line-height:20px}.action-bar{display:none}#query-result
 .labelbody{background:0 0;overflow:hidden;cursor:pointer}.visual-editor 
.panel-heading,.visual-editor 
.panel-info{background:rgba(255,255,255,.9)}.visual-editor-trigger{display:none;top:10px;font-size:25px}.visual-editor{display:none;min-width:300px;max-width:500px;top:5px;font-size:15px;padding-left:35px}.visual-editor
 .panel-heading{padding:8px 10px}.visual-editor 
.panel-body{font-size:120%}.select2-container{z-index:2000;min-width:200px}.visual-editor
 .popover{min-width:250px;white-space:nowrap}.visual-editor 
.spacer{min-height:.8em}.nav 
.uls-trigger{display:none;padding-left:30px}.vis-item{padding:15px;box-shadow:5px
 5px 20px 
rgba(0,0,0,.2)}.vis-item,.vis-item.vis-line,.vis-item.vis-selected{background-color:#fff;border-color:#888a85}#query-result
 .foreground 
path{fill:none;stroke:#222;stroke-opacity:.4;pointer-events:none;stroke-width:3px}#query-result
 .axis 
.title{font-size:8px;font-weight:700;text-transform:uppercase;transform:rotate(-12deg)
 translate(-5px,-6px)}#query-result .axis line,#query-result .axis 
path{fill:none;stroke:#000;stroke-width:1px}#query-result .brush 
.extent{fill-opacity:.3;stroke:#fff;stroke-width:1px}#query-result 
pre{width:900px;margin:10px 30px;tab-size:21;font-size:12px;overflow:auto}
\ No newline at end of file
diff --git a/dist/js/wdqs.min.js b/dist/js/wdqs.min.js
new file mode 100644
index 0000000..bf27bcc
--- /dev/null
+++ b/dist/js/wdqs.min.js
@@ -0,0 +1,4 @@
+var 
wikibase=wikibase||{};wikibase.queryService=wikibase.queryService||{},wikibase.queryService.ui=wikibase.queryService.ui||{},wikibase.queryService.ui.App=function(a,b,c,d,e,f){"use
 strict";function 
g(a,b,c,d,e){this._$element=a,this._editor=b,this._visualEditor=c,this._sparqlApi=d,this._querySamplesApi=e,this._init()}var
 h="//tinyurl.com/api-create.php?url=",i="wikibase.queryService.ui.app.";return 
g.prototype._$element=null,g.prototype._sparqlApi=null,g.prototype._querySamplesApi=null,g.prototype._editor=null,g.prototype._visualEditor=null,g.prototype._isHistoryDisabled=!1,g.prototype._selectedResultBrowser=null,g.prototype._actionBar=null,g.prototype._trackingApi=null,g.prototype._hasRunFirstQuery=!1,g.prototype._resultBrowsers={Table:{icon:"glyphicon-th-list",label:"Table","class":"TableResultBrowser",object:null,$element:null},ImageGrid:{icon:"glyphicon-picture",label:"Image
 
Grid","class":"ImageResultBrowser",object:null,$element:null},Polestar:{icon:"fa-certificate",label:"Graph
 
builder","class":"PolestarResultBrowser",object:null,$element:null},Map:{icon:"glyphicon-map-marker",label:"Map","class":"CoordinateResultBrowser",object:null,$element:null},LineChart:{icon:"fa-line-chart",label:"Line
 
Chart","class":"LineChartResultBrowser",object:null,$element:null},BarChart:{icon:"fa-bar-chart",label:"Bar
 
Chart","class":"BarChartResultBrowser",object:null,$element:null},ScatterChart:{icon:"fa-braille",label:"Scatter
 
Chart","class":"ScatterChartResultBrowser",object:null,$element:null},AreaChart:{icon:"fa-area-chart",label:"Area
 
Chart","class":"AreaChartResultBrowser",object:null,$element:null},BubbleChart:{icon:"glyphicon-tint",label:"Bubble
 
Chart","class":"BubbleChartResultBrowser",object:null,$element:null},TreeMap:{icon:"glyphicon-th",label:"Tree
 
Map","class":"TreeMapResultBrowser",object:null,$element:null},Timeline:{icon:"glyphicon-calendar",label:"Timeline","class":"TimelineResultBrowser",object:null,$element:null},Dimensions:{icon:"glyphicon-random",label:"Dimensions","class":"MultiDimensionResultBrowser",object:null,$element:null},Graph:{icon:"glyphicon-retweet",label:"Graph","class":"GraphResultBrowser",object:null,$element:null}},g.prototype._init=function(){this._sparqlApi||(this._sparqlApi=new
 
wikibase.queryService.api.Sparql),this._querySamplesApi||(this._querySamplesApi=new
 
wikibase.queryService.api.QuerySamples),this._trackingApi||(this._trackingApi=new
 wikibase.queryService.api.Tracking),this._editor||(this._editor=new 
wikibase.queryService.ui.editor.Editor),this._track("init"),this._initApp(),this._initEditor(),this._initVisualEditor(),this._initExamples(),this._initDataUpdated(),this._initQuery(),this._initRdfNamespaces(),this._initHandlers(),this._initResultBrowserMenu()},g.prototype._initApp=function(){a(c).keydown(function(b){b.ctrlKey&&13===b.keyCode&&a("#execute-button").click()}),this._actionBar=new
 
wikibase.queryService.ui.toolbar.Actionbar(a(".action-bar"))},g.prototype._initEditor=function(){this._editor.fromTextArea(this._$element.find(".queryEditor")[0])},g.prototype._initVisualEditor=function(){var
 b=this,c="visual-editor-hide";this._visualEditor||(this._visualEditor=new 
wikibase.queryService.ui.visualEditor.VisualEditor),this._visualEditor.setChangeListener(function(a){b._editor.setValue(a.getQuery())}),"true"===e.get(c)&&a(".visual-editor-trigger").show(),this._editor&&this._editor.registerCallback("change",d.debounce(function(){a(".visual-editor-trigger").is(":visible")||b._editor.getValue()===b._visualEditor.getQuery()||(a(".visual-editor").hide(),b._drawVisualEditor())},1500)),a(".visual-editor
 .panel-heading .close").click(function(){return 
e.set(c,!0),a(".visual-editor").hide(),a(".visual-editor-trigger").show(),!1}),a(".visual-editor-trigger").click(function(){return
 
a(".visual-editor-trigger").hide(),e.set(c,!1),b._drawVisualEditor(),!1})},g.prototype._drawVisualEditor=function(){try{this._visualEditor.setQuery(this._editor.getValue()),this._visualEditor.draw(a(".visual-editor
 
.panel-body")),a(".visual-editor").delay(500).fadeIn()}catch(b){b.stack&&c.console.log(b.stack)}},g.prototype._initExamples=function(){var
 b=this;new 
wikibase.queryService.ui.QueryExampleDialog(a("#QueryExamples"),this._querySamplesApi,function(a,c){a&&a.trim()&&b._editor.setValue("#"+c+"\n"+a)})},g.prototype._initRdfNamespaces=function(){var
 
b,c,d,e=a(".namespace-shortcuts"),f=wikibase.queryService.RdfNamespaces.NAMESPACE_SHORTCUTS;e.click(function(a){a.stopPropagation()});for(b
 in 
f){c=a("<select>").attr("class","form-control").append(a("<option>").text(b)).appendTo(e);for(d
 in 
f[b])c.append(a("<option>").text(d).attr("value",f[b][d]))}},g.prototype._initQuery=function(){""!==c.location.hash&&(0===location.hash.indexOf("#result#")&&(location.hash=location.hash.replace("#result#","#")),this._isHistoryDisabled=!0,this._editor.setValue(decodeURIComponent(c.location.hash.substr(1))),this._editor.refresh(),this._isHistoryDisabled=!1)},g.prototype._initDataUpdated=function(){var
 
b=this,d=a(".dataUpdated"),e=function(){b._sparqlApi.queryDataUpdatedTime().done(function(b,c){var
 
e,g,h=f.duration(c,"seconds").humanize();e=c<=120?"list-group-item-success":c<=900?"list-group-item-warning":"list-group-item-danger",g='<span
 class="badge 
'+e+'">'+h+"</span>",d.html(a.i18n("wdqs-app-footer-updated",g))})};e(),c.setInterval(e,6e5),d.hover(function(){e();var
 
c=a(this);b._sparqlApi.queryDataUpdatedTime().done(function(b,d){c.popover({html:!0,placement:"top",content:a.i18n("wdqs-app-footer-updated-seconds",d)+".</br>"+b}).popover("show")}).fail(function(){c.popover({content:"[unable
 to connect]"}).popover("show")})},function(){var 
b=a(this);b.popover("destroy")})},g.prototype._initHandlers=function(){var 
b=this;a("#query-form").submit(a.proxy(this._handleQuerySubmit,this)),a(".namespace-shortcuts").on("change","select",a.proxy(this._handleNamespaceSelected,this)),a(".addPrefixes").click(function(){var
 
a=wikibase.queryService.RdfNamespaces.STANDARD_PREFIXES,c=Object.keys(a).map(function(b){return
 
a[b]}).join("\n");b._editor.prepandValue(c+"\n\n"),b._track("buttonClick.addPrefixes")}),a('[data-target="#QueryExamples"]').click(function(){b._track("buttonClick.examples")}),a("#clear-button").click(function(){b._editor.setValue(""),b._track("buttonClick.clear")}),a(".explorer-close").click(function(b){b.preventDefault(),a(".explorer-panel").hide()}),a(c).on("popstate",a.proxy(this._initQuery,this)),this._initPopovers(),this._initHandlersDownloads()},g.prototype._initPopovers=function(){var
 b=this;a(".visual-editor 
.help").clickover({placement:"bottom",global_close:!0,html:!0,content:function(){return
 a("<div>").append(a("<span>").html("This is a basic textual representation of 
the SPARQL query.<br/>If your query doesn't work well, please give 
"),a("<a>").text("feedback 
here!").attr({href:"https://www.mediawiki.org/w/index.php?title=Talk:Wikidata_query_service&action=edit&section=new",target:"_B"}))}}),a(".shortUrlTrigger.query").clickover({placement:"left",global_close:!0,html:!0,content:function(){return
 b._updateQueryUrl(),'<iframe class="shortUrl" 
src="'+h+encodeURIComponent(c.location)+'">'}}).click(function(){b._track("buttonClick.shortUrlQuery")}),a(".shortUrlTrigger.result").clickover({placement:"left",global_close:!0,html:!0,content:function(){b._updateQueryUrl();var
 d=a("<a>").attr("href","embed.html"+c.location.hash);return'<iframe 
class="shortUrl" 
src="'+h+encodeURIComponent(d[0].href)+'">'}}).click(function(){b._track("buttonClick.shortUrlResult")}),a(".embed.result").clickover({placement:"left",global_close:!0,html:!0,content:function(){b._updateQueryUrl();var
 
d="";b._selectedResultBrowser&&(d="#defaultView:"+b._selectedResultBrowser+"\n",d=encodeURIComponent(d));var
 
e=a("<a>").attr("href","embed.html#"+d+c.location.hash.substring(1)),f=a("<textarea>").text('<iframe
 style="width:80vw; height:50vh;" scrolling="yes" frameborder="0" 
src="'+e[0].href+'">').click(function(){f.select()});return 
f}}).click(function(){b._track("buttonClick.embedResult")})},g.prototype._initHandlersDownloads=function(){var
 
c=this._sparqlApi,d={CSV:{handler:a.proxy(c.getResultAsCsv,c),mimetype:"text/csv;charset=utf-8"},JSON:{handler:a.proxy(c.getResultAsJson,c),mimetype:"application/json;charset=utf-8"},TSV:{handler:a.proxy(c.getSparqlTsv,c),mimetype:"text/tab-separated-values;charset=utf-8"},"Simple
 
TSV":{handler:a.proxy(c.getSimpleTsv,c),mimetype:"text/tab-separated-values;charset=utf-8",ext:"tsv"},"Full
 
JSON":{handler:a.proxy(c.getResultAsAllJson,c),mimetype:"application/json;charset=utf-8",ext:"json"}},e=this,f=function(a,d,f){return
 function(g){return 
g.preventDefault(),null===c.getResultLength()?"":(e._track("buttonClick.download."+a),void
 b(d(),a,f))}};for(var g in d){var 
h=d[g].ext||g.toLowerCase(),i=g.replace(/\s/g,"-");a("#download"+i).click(f("query."+h,d[g].handler,d[g].mimetype))}},g.prototype._initResultBrowserMenu=function(){a.each(this._resultBrowsers,function(b,c){var
 d=a('<li><a class="result-browser" href="#"><span 
class="'+c.icon.split("-",1)[0]+" 
"+c.icon+'"></span>'+c.label+"</a></li>");d.appendTo(a("#result-browser-menu")),c.$element=d})},g.prototype._handleQuerySubmit=function(b){var
 
c=this;this._hasRunFirstQuery||(this._track("firstQuery"),this._hasRunFirstQuery=!0),b.preventDefault(),this._editor.save(),this._updateQueryUrl(),this._actionBar.show("wdqs-action-query","","info",100),a("#query-result").empty().hide(),a(".query-total").hide(),a("#execute-button").prop("disabled",!0),a("#query-error").hide(),this._sparqlApi.query(this._editor.getValue()).done(a.proxy(this._handleQueryResult,this)).fail(a.proxy(this._handleQueryError,this)),a(".queryUri").attr("href",c._sparqlApi.getQueryUri())},g.prototype._handleQueryError=function(){a("#execute-button").prop("disabled",!1);var
 
b=this._sparqlApi.getError(),c=null,d=this._sparqlApi.ERROR_CODES;switch(b.code){case
 d.TIMEOUT:c="wdqs-action-timeout";break;case 
d.MALFORMED:c="wdqs-action-malformed-query";break;case 
d.SERVER:c="wdqs-action-server-error";break;default:c="wdqs-action-unknow-error"}b.debug&&a("#query-error").html(a("<pre>").text(b.debug)).show(),this._actionBar.show(c||"",b.message||"","danger"),this._track("result.error."+(c||"unknown")),this._editor.highlightError(b.debug)},g.prototype._handleQueryResult=function(){var
 
b=this._sparqlApi;a("#total-results").text(b.getResultLength()),a("#query-time").text(b.getExecutionTime()),a(".query-total").show(),a("#execute-button").prop("disabled",!1);var
 c=this._createResultBrowsers(b.getResultRawData());return 
this._drawResult(c),this._selectedResultBrowser=null,this._track("result.resultLength",b.getResultLength()),this._track("result.executionTime",b.getExecutionTime(),"ms"),this._track("result.received.success"),!1},g.prototype._createResultBrowsers=function(b){var
 c=this._getDefaultResultBrowser();return 
this._track("result.browser."+(c||"default")),a.each(this._resultBrowsers,function(a,b){var
 d=new 
wikibase.queryService.ui.resultBrowser[b["class"]];null!==c&&c!==a||(c=d),b.object=d}),c.resetVisitors(),a.each(this._resultBrowsers,function(a,d){c.addVisitor(d.object),d.object.setResult(b)}),c},g.prototype._getDefaultResultBrowser=function(){var
 a=this._editor.getValue().match(/#defaultView:(\w+)/);return 
a&&this._resultBrowsers[a[1]]?a[1]:null},g.prototype._handleQueryResultBrowsers=function(){var
 
b=this;a.each(this._resultBrowsers,function(c,d){d.$element.off("click"),d.object.isDrawable()?(d.$element.css("opacity",1).attr("href","#"),d.$element.click(function(){return
 
a(this).closest(".open").removeClass("open"),a("#query-result").html(""),b._drawResult(d.object),b._selectedResultBrowser=c,b._track("buttonClick.display."+c),!1})):d.$element.css("opacity",.5).removeAttr("href")})},g.prototype._drawResult=function(b){var
 
d=this;this._actionBar.show("wdqs-action-render","","success",100),c.setTimeout(function(){try{a("#query-result").show(),b.draw(a("#query-result")),d._actionBar.hide()}catch(e){d._actionBar.show("wdqs-action-error-display","","warning"),c.console.log(e.stack)}d._handleQueryResultBrowsers()},20)},g.prototype._handleNamespaceSelected=function(b){var
 
c,d=b.target.value,e=this._editor.getValue();e.indexOf("<"+d+">")===-1&&(c=a(b.target).find(":selected").text(),this._editor.setValue("PREFIX
 "+c+": 
<"+d+">\n"+e)),b.target.selectedIndex=0},g.prototype._updateQueryUrl=function(){if(!this._isHistoryDisabled){var
 
a=encodeURIComponent(this._editor.getValue());a=a.replace(/[!'()*]/g,function(a){return"%"+a.charCodeAt(0).toString(16)}),c.location.hash!==a&&(c.history.pushState?c.history.pushState(null,null,"#"+a):c.location.hash=a)}},g.prototype._track=function(a,b,c){this._trackingApi.track(i+a,b,c)},g}(jQuery,download,window,_,Cookies,moment);var
 
wikibase=wikibase||{};wikibase.queryService=wikibase.queryService||{},wikibase.queryService.ui=wikibase.queryService.ui||{},wikibase.queryService.ui.toolbar=wikibase.queryService.toolbar||{},wikibase.queryService.ui.toolbar.Actionbar=function(a){"use
 strict";function b(a){this._$element=a}return 
b.prototype._$element=null,b.prototype.show=function(b,c,d,e){var 
f=b;a.i18n&&(f=a.i18n(b)),""!==c&&(f=f+": 
"+c),this._$element.find(".message").html(""),d||(d="info"),void 
0===e||e===!1?this._$element.find(".message").append(this._getBar(f,d)):this._$element.find(".message").append(this._getProgressbar(f,d,e)),this._$element.show()},b.prototype._getProgressbar=function(b,c,d){return
 a('<div class="progress"><div class="progress-bar progress-bar-'+c+' 
progress-bar-striped active" role="progressbar" style="width: 
'+d+'%">'+b+"</div></div>")},b.prototype._getBar=function(b,c){return a('<div 
class="label 
label-'+c+'"/>').text(b)},b.prototype.hide=function(){this._$element.hide()},b}(jQuery);var
 
wikibase=wikibase||{};wikibase.queryService=wikibase.queryService||{},wikibase.queryService.ui=wikibase.queryService.ui||{},wikibase.queryService.ui.i18n=wikibase.queryService.ui.i18n||{},wikibase.queryService.ui.i18n.LanguageSelector=function(a,b){"use
 strict";function c(a,c,d){this._$element=a,c?this._api=c:this._api=new 
b.queryService.api.Wikibase,this._defaultLanguage=d,this._create()}return 
c.prototype._api=null,c.prototype._$element=null,c.prototype._defaultLanguage=null,c.prototype._changeListener=null,c.prototype.setChangeListener=function(a){this._changeListener=a},c.prototype._create=function(b){var
 
c=this;this._$element.text(a.uls.data.getAutonym(this._defaultLanguage)),this._getLanguages().done(function(b){c._$element.uls({onSelect:function(b){c._$element.text(a.uls.data.getAutonym(b)),c._changeListener&&c._changeListener(b)},languages:b}).click(function(){a(".uls-menu").addClass("uls-mobile").css("left","").css("right","2.5%")}).css("display","block")})},c.prototype._getLanguages=function(){var
 b=a.Deferred();return this._api.getLanguages().done(function(c){var 
d={};a.each(c.query.languages,function(a,b){d[b.code]=b["*"]}),b.resolve(d)}),b.promise()},c}(jQuery,wikibase);var
 
wikibase=wikibase||{};wikibase.queryService=wikibase.queryService||{},wikibase.queryService.ui=wikibase.queryService.ui||{},wikibase.queryService.ui.editor=wikibase.queryService.ui.editor||{},wikibase.queryService.ui.editor.hint=wikibase.queryService.ui.editor.hint||{},function(a,b){"use
 strict";var c=b.queryService.ui.editor.hint,d=["SELECT","SELECT * WHERE 
{\n\n}","OPTIONAL","OPTIONAL {\n\n}","WHERE","WHERE {\n\n}","ORDER","ORDER 
BY","DISTINCT","SERVICE",'SERVICE wikibase:label {\n bd:serviceParam 
wikibase:language "en" 
.\n}',"BASE","PREFIX","REDUCED","FROM","LIMIT","OFFSET","HAVING","UNION","SAMPLE","(SAMPLE()
 AS )","COUNT","(COUNT() AS )","DESC","DESC()","ASC","ASC()","FILTER 
()","FILTER NOT EXISTS","FILTER NOT EXISTS {\n\n}","UNION","UNION 
{\n\n}","BIND","BIND ()","GROUP_CONCAT","(GROUP_CONCAT() as )","ORDER 
BY","#defaultView:Map","#defaultView:ImageGrid","#defaultView:Map","#defaultView:BubbleChart","#defaultView:TreeMap","#defaultView:Timeline","#defaultView:Dimensions","#defaultView:Graph","#defaultView:LineChart","#defaultView:BarChart","#defaultView:ScatterChart","#defaultView:AreaChart","SERVICE
 wikibase:around {\n\t?place wdt:P625 ?location .\n\tbd:serviceParam 
wikibase:center ? .\n\tbd:serviceParam wikibase:radius ? .\n\tbd:serviceParam 
wikibase:distance ?dist .\n}","SERVICE wikibase:box {\n\t?place wdt:P625 
?location .\n\tbd:serviceParam wikibase:cornerWest ? .\n\tbd:serviceParam 
wikibase:cornerEast ? 
.\n}"],e=["wikibase:rank","wikibase:badge","wikibase:propertyType","wikibase:directClaim","wikibase:claim","wikibase:statementProperty","wikibase:statementValue","wikibase:qualifier","wikibase:qualifierValue","wikibase:referenceValue","wikibase:statementValueNormalized","wikibase:qualifierValueNormalized","wikibase:referenceValueNormalized","wikibase:novalue","wikibase:Reference","wikibase:Dump","wikibase:PreferredRank","wikibase:NormalRank","wikibase:DeprecatedRank","wikibase:BestRank","wikibase:TimeValue","wikibase:QuantityValue","wikibase:GlobecoordinateValue","wikibase:WikibaseItem","wikibase:CommonsMedia","wikibase:Globecoordinate","wikibase:Monolingualtext","wikibase:Quantity","wikibase:String","wikibase:Time","wikibase:Url","wikibase:ExternalId","wikibase:statements","wikibase:sitelinks","wikibase:timeValue","wikibase:timePrecision","wikibase:timeTimezone","wikibase:timeCalendarModel","wikibase:quantityAmount","wikibase:quantityUpperBound","wikibase:quantityLowerBound","wikibase:quantityUnit","wikibase:quantityNormalized","wikibase:geoLatitude","wikibase:geoLongitude","wikibase:geoPrecision","wikibase:geoGlobe","wikibase:wikiGroup","schema:about","schema:name","schema:description","schema:dateModified","schema:Article","schema:inLanguage","schema:isPartOf","rdfs:label","rdf:type","skos:altLabel","xsd:dateTime","xsd:integer","xsd:decimal","geo:wktLiteral","owl:sameAs","prov:wasDerivedFrom"],f=c.Sparql=function(){};f.prototype.getHint=function(b,c,d,e){var
 f=this._getCurrentWord(c,e),g=[],h=new 
a.Deferred;if(0===f.word.indexOf("?")&&(g=g.concat(this._getVariableHints(f.word,this._getDefinedVariables(b)))),g=g.concat(this._getSPARQLHints(f.word)),g.length>0){var
 i=this._getHintCompletion(f,g,d);return h.resolve(i).promise()}return 
h.reject().promise()},f.prototype._getSPARQLHints=function(b){var c=[];return 
a.each(d,function(a,d){d.toLowerCase().indexOf(b.toLowerCase())>=0&&c.push(d)}),a.each(e,function(a,d){0===d.toLowerCase().indexOf(b.toLowerCase())&&c.push(d)}),c},f.prototype._getDefinedVariables=function(b){var
 c={};return 
a.each(b.match(/\?\w+/g),function(a,b){c[b]=!0}),Object.keys(c)},f.prototype._getVariableHints=function(b,c){var
 d=[];return 
b&&"?"!==b?(a.each(c,function(a,c){0===c.toLowerCase().indexOf(b.toLowerCase())&&d.push(c)}),d):c},f.prototype._getHintCompletion=function(a,b,c){var
 d={list:[]};return 
d.from={line:c,"char":a.start},d.to={line:c,"char":a.end},d.list=b,d},f.prototype._getCurrentWord=function(a,b){var
 c=b-1;for(c<0&&(c=0);/[\w?#:]/.test(a.charAt(c))&&(c--,!(c<0)););var 
d=c+1;for(c=b;/[\w:]/.test(a.charAt(c))&&(c++,!(c>=a.length)););var 
e=c,f=a.substring(d,e);return{word:f,start:d,end:e}}}(jQuery,wikibase);var 
wikibase=wikibase||{};wikibase.queryService=wikibase.queryService||{},wikibase.queryService.ui=wikibase.queryService.ui||{},wikibase.queryService.ui.editor=wikibase.queryService.ui.editor||{},wikibase.queryService.ui.editor.hint=wikibase.queryService.ui.editor.hint||{},function(a,b){"use
 strict";var 
c=b.queryService.ui.editor.hint,d=c.Rdf=function(a,c){this._api=a,this._rdfNamespaces=c,this._api||(this._api=new
 
b.queryService.api.Wikibase),this._rdfNamespaces||(this._rdfNamespaces=b.queryService.RdfNamespaces)};d.prototype._rdfNamespaces=null,d.prototype._api=null,d.prototype.getHint=function(b,c,d,e){var
 f,g,h,i,j=new a.Deferred,k=this._getCurrentWord(c,e),l=this;return 
k.word.match(/\S+:\S*/)?(g=this._getPrefixFromWord(k.word.trim()),h=this._getTermFromWord(k.word.trim()),i=this._extractPrefixes(b),i[g]?0===h.length?(f=[{text:h,displayText:"Type
 to search for an 
entity"}],j.resolve(this._getHintCompletion(d,k,g,f)).promise()):(i[g]&&this._searchEntities(h,i[g]).done(function(a){return
 
j.resolve(l._getHintCompletion(d,k,g,a))}),j.promise()):this._rdfNamespaces.ALL_PREFIXES&&this._rdfNamespaces.ALL_PREFIXES[g]?j.reject().promise():(f=[{text:h,displayText:"Unknown
 prefix 
'"+g+":'"}],j.resolve(this._getHintCompletion(d,k,g,f)).promise())):j.reject().promise()},d.prototype._getPrefixFromWord=function(a){return
 a.split(":",1)[0]},d.prototype._getTermFromWord=function(a){return 
a.split(":").pop()},d.prototype._getHintCompletion=function(a,b,c,d){var 
e={list:[]};return 
e.from={line:a,"char":b.start+c.length+1},e.to={line:a,"char":b.end},e.list=d,e},d.prototype._searchEntities=function(b,c){var
 d=[],e=a.Deferred();return 
this._api.searchEntities(b,c).done(function(b){a.each(b.search,function(a,b){d.push({className:"wikibase-rdf-hint",text:b.id,displayText:b.label+"
 ("+b.id+") 
"+b.description+"\n"})}),e.resolve(d)}),e.promise()},d.prototype._getCurrentWord=function(a,b){var
 c=b-1,d=!1,e=["/","*","+"," 
",";",".","\n","\t","(",")","{","}","[","]"];for(c<0&&(c=0);(e.indexOf(a.charAt(c))===-1||"
 
"===a.charAt(c)&&d===!1||":"===a.charAt(c)&&d===!1)&&(":"===a.charAt(c)&&(d=!0),c--,!(c<0)););var
 f=c+1;for(c=b;e.indexOf(a.charAt(c))===-1&&(c++,!(c>=a.length)););var 
g=c,h=a.substring(f,g);return{word:h,start:f,end:g}},d.prototype._extractPrefixes=function(b){var
 
c,d=this._rdfNamespaces.getPrefixMap(this._rdfNamespaces.ENTITY_TYPES),e=this._rdfNamespaces.ENTITY_TYPES,f=b.split("\n");return
 a.each(f,function(a,b){(c=b.match(/(PREFIX) (\S+): 
<([^>]+)>/))&&e[c[3]]&&(d[c[2]]=e[c[3]])}),d}}(jQuery,wikibase);var 
wikibase=wikibase||{};wikibase.queryService=wikibase.queryService||{},wikibase.queryService.ui=wikibase.queryService.ui||{},wikibase.queryService.ui.editor=wikibase.queryService.ui.editor||{},wikibase.queryService.ui.editor.tooltip=wikibase.queryService.ui.editor.tooltip||{},wikibase.queryService.ui.editor.tooltip.Rdf=function(a,b,c){"use
 strict";function 
d(a,b){this._api=a,this._rdfNamespaces=b,this._api||(this._api=new 
wikibase.queryService.api.Wikibase),this._rdfNamespaces||(this._rdfNamespaces=wikibase.queryService.RdfNamespaces)}return
 
d.prototype._rdfNamespaces=null,d.prototype._editor=null,d.prototype.setEditor=function(a){this._editor=a,this._registerHandler()},d.prototype._registerHandler=function(){var
 
b=this;a.on(this._editor.getWrapperElement(),"mouseover",c.debounce(function(a){b._triggerTooltip(a)},300))},d.prototype._triggerTooltip=function(a){this._removeToolTip(),this._createTooltip(a)},d.prototype._createTooltip=function(a){var
 
c=a.clientX,d=a.clientY+b(window).scrollTop(),e=this._editor.getTokenAt(this._editor.coordsChar({left:c,top:d})).string;if(e.match(/.+\:(Q|P)[0-9]*/)){var
 
f=this._extractPrefixes(this._editor.doc.getValue()),g=e.split(":",1)[0],h=e.split(":").pop();if(f[g]){var
 
i=this;this._searchEntities(h,f[g]).done(function(a){i._showToolTip(a.shift(),{x:c,y:d})})}}},d.prototype._removeToolTip=function(){b(".wikibaseRDFtoolTip").remove()},d.prototype._showToolTip=function(a,c){a&&c&&b('<div
 class="panel 
panel-info">').css("position","absolute").css("z-index","100").css("max-width","200px").css({top:c.y+2,left:c.x+2}).addClass("wikibaseRDFtoolTip").append(b('<div
 
class="panel-body">').html(a).css("padding","10px")).appendTo("body").fadeIn("slow")},d.prototype._extractPrefixes=function(a){var
 
c,d=this._rdfNamespaces.getPrefixMap(this._rdfNamespaces.ENTITY_TYPES),e=a.split("\n"),f=this;return
 b.each(e,function(a,b){(c=b.match(/(PREFIX) (\S+): 
<([^>]+)>/))&&f._rdfNamespaces.ENTITY_TYPES[c[3]]&&(d[c[2]]=f._rdfNamespaces.ENTITY_TYPES[c[3]])}),d},d.prototype._searchEntities=function(a,c){var
 d=[],e=b.Deferred();return 
this._api.searchEntities(a,c).done(function(a){b.each(a.search,function(a,b){d.push(b.label+"
 
("+b.id+")<br/><small>"+(b.description?b.description:"")+"</small>")}),e.resolve(d)}),e.promise()},d}(CodeMirror,jQuery,_);var
 
wikibase=wikibase||{};wikibase.queryService=wikibase.queryService||{},wikibase.queryService.ui=wikibase.queryService.ui||{},wikibase.queryService.ui.editor=wikibase.queryService.ui.editor||{},wikibase.queryService.ui.editor.Editor=function(a,b,c,d,e){"use
 strict";function 
f(a,c,d){this._rdfHint=a,this._sparqlHint=c,this._rdfTooltip=d,this._sparqlHint||(this._sparqlHint=new
 b.queryService.ui.editor.hint.Sparql),this._rdfHint||(this._rdfHint=new 
b.queryService.ui.editor.hint.Rdf),this._rdfTooltip||(this._rdfTooltip=new 
b.queryService.ui.editor.tooltip.Rdf)}var 
g={lineNumbers:!0,matchBrackets:!0,mode:"sparql",extraKeys:{"Ctrl-Space":"autocomplete"},viewportMargin:1/0,hintOptions:{closeCharacters:/[]/,completeSingle:!1}},h=null,i=null,j="wikibase.queryService.ui.Editor";return
 
f.prototype._editor=null,f.prototype._sparqlHint=null,f.prototype._rdfHint=null,f.prototype._rdfTooltip=null,f.prototype.fromTextArea=function(a){var
 
b=this;this._editor=c.fromTextArea(a,g),this._editor.on("change",function(a,c){b.storeValue(b.getValue()),b.clearError(),"?"!==c.text[0]&&"#"!==c.text[0]||a.showHint({closeCharacters:/[\s]/})}),this._editor.focus(),this._rdfTooltip.setEditor(this._editor),this._registerHints()},f.prototype._registerHints=function(){var
 a=this;c.registerHelper("hint","sparql",function(b,c,d){if(b===a._editor){var 
e=b.getLine(b.getCursor().line),f=b.doc.getValue(),g=b.getCursor().ch,h=b.getCursor().line;a._getHints(f,e,h,g).done(function(a){c(a)})}}),c.hint.sparql.async=!0},f.prototype._getHints=function(b,d,e,f){var
 g=new a.Deferred,h=this;return 
this._rdfHint.getHint(b,d,e,f).done(function(a){a.from=c.Pos(a.from.line,a.from["char"]),a.to=c.Pos(a.to.line,a.to["char"]),g.resolve(a)}).fail(function(){h._sparqlHint.getHint(b,d,e,f).done(function(a){a.from=c.Pos(a.from.line,a.from["char"]),a.to=c.Pos(a.to.line,a.to["char"]),g.resolve(a)})}),g.promise()},f.prototype.addKeyMap=function(a,b){this._editor.addKeyMap({keyMap:b})},f.prototype.setValue=function(a){this._editor.setValue(a)},f.prototype.getValue=function(){return
 
this._editor.getValue()},f.prototype.save=function(){this._editor.save()},f.prototype.prepandValue=function(a){this._editor.setValue(a+this._editor.getValue())},f.prototype.refresh=function(){this._editor.refresh()},f.prototype.highlightError=function(a){var
 b,c,d=a.match(/line (\d+), column 
(\d+)/);d&&(b=d[1]-1,c=d[2]-1,c>=this._editor.doc.getLine(b).length-1&&(c=this._editor.doc.getLine(b).length-1),h=this._editor.doc.markText({line:b,ch:0},{line:b},{className:"error-line"}),i=this._editor.doc.markText({line:b,ch:c},{line:b,ch:c+1},{className:"error-character"}))},f.prototype.clearError=function(){h&&(h.clear(),i.clear())},f.prototype.storeValue=function(a){e&&e.setItem(j,a)},f.prototype.restoreValue=function(){if(e){var
 
a=e.getItem(j);a&&(this.setValue(a),this.refresh())}},f.prototype.registerCallback=function(a,b){this._editor.on(a,b)},f}(jQuery,wikibase,CodeMirror,window.localStorage);var
 
wikibase=wikibase||{};wikibase.queryService=wikibase.queryService||{},wikibase.queryService.ui=wikibase.queryService.ui||{},wikibase.queryService.ui.visualEditor=wikibase.queryService.ui.visualEditor||{},wikibase.queryService.ui.visualEditor.VisualEditor=function(a,b){"use
 strict";function c(a,c){this._api=a||new 
b.queryService.api.Wikibase,this._selectorBox=c||new 
b.queryService.ui.visualEditor.SelectorBox(this._api),this._query=new 
b.queryService.ui.visualEditor.SparqlQuery}var 
d={"http://www.w3.org/2000/01/rdf-schema#label":!0,"http://schema.org/description":!0,"http://www.bigdata.com/queryHints#optimizer":!0,"http://www.w3.org/1999/02/22-rdf-syntax-ns#type":!0},e="wdqs-ve-";return
 
c.prototype._api=null,c.prototype._selectorBox=null,c.prototype._changeListener=null,c.prototype._query=null,c.prototype._queryComments=null,c.prototype._triples=[],c.prototype._isSimpleMode=!1,c.prototype._labels={find:"Find",show:"Show",anything:"anything","with":"with",and:"and",any:"any",or:"or",subtype:"subtype"},c.prototype.setQuery=function(c){var
 
d=this;this._queryComments=[],a.each(c.split("\n"),function(a,b){0===b.indexOf("#")&&d._queryComments.push(b)});var
 
e=b.queryService.RdfNamespaces.ALL_PREFIXES;this._query.parse(c,e)},c.prototype.getQuery=function(){try{var
 a=this._query.getQueryString();return 
a=this._cleanQueryPrefixes(a).trim(),a=this._queryComments.join("\n")+"\n"+a,a.trim()}catch(b){return
 null}},c.prototype._cleanQueryPrefixes=function(a){for(var c,d=/PREFIX 
([a-z]+): <(.*)>/gi,e={},f=a.replace(d,"").trim();c=d.exec(a);){var 
g=c[1],h=c[2].replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),i=f.replace(new
 
RegExp("<"+h+"([^/>#]+?)>","gi"),g+":$1");f!==i&&(f=i,b.queryService.RdfNamespaces.STANDARD_PREFIXES[g]||(e[c[0]]=!0))}return
 
f=Object.keys(e).join("\n")+"\n\n"+f.trim()},c.prototype.draw=function(a){this._triples=this._query.getTriples();for(var
 b=this._query.getSubQueries();b.length>0;){var 
c=b.pop();this._triples=this._triples.concat(c.getTriples()),b.concat(c.getSubQueries())}this._isSimpleMode=this._isSimpleQuery(),a.html(this._getHtml())},c.prototype.setChangeListener=function(a){this._changeListener=a},c.prototype._i18n=function(b){return
 a.i18n?a.i18n(e+b):this._labels[b]},c.prototype._getHtml=function(){var 
b=this,c=a("<div>"),d=this._getFindSection(),e=this._getShowSection(),f=a("<div>").addClass("spacer");return
 
c.append(d,f.clone(),e,f.clone(),this._getLimitSection()),a.each(this._triples,function(c,f){if(!b._isNotRelevant(f.triple)){if(b._isInShowSection(f.triple))return
 e.children().length>1&&e.append(a("<span>").text(", ")),void 
e.append(b._getTripleHtml(f));d.children().length>1&&(2===d.children().length?d.append(a("<span>").text(b._i18n("with")+"
 ")):d.append(a("<span>").text(b._i18n("and")+" 
"))),d.append(b._getTripleHtml(f))}}),1===d.children().length&&d.append(a("<span>").text(this._i18n("anything")+"
 ")),c},c.prototype._getLimitSection=function(){var b=a("<div>"),c=a('<a 
data-type="number">').attr("href","#").text("Limit").data("value",this._query.getLimit()),d=a("<span>").text(this._query.getLimit()?this._query.getLimit():""),e=this;return
 
this._selectorBox.add(c,function(a){"0"===a&&(a=null),d.text(a||""),e._query.setLimit(a),e._changeListener&&e._changeListener(e)},{trash:function(){return
 
e._query.setLimit(null),c.data("value",""),d.text(""),e._changeListener&&e._changeListener(e),!0}}),b.append(c.append("
 ",d))},c.prototype._getFindSection=function(){var b=a("<div>"),c=a('<a 
class="btn 
btn-default">').text(this._i18n("find"));c.attr("href","#").prepend('<span 
class="glyphicon glyphicon-search" aria-hidden="true"></span>'," 
").tooltip({title:"Click to add new 
item"}).attr("data-type","item").attr("data-auto_open",!0);var d=this;return 
this._selectorBox.add(c,function(c,e){var 
f="http://www.wikidata.org/entity/"+c,g=d._query.getBoundVariables().shift();g||(g="?_"+e.replace(/(
 |[^a-z0-9])/gi,"_"));var 
h="http://www.wikidata.org/prop/direct/P31",i=d._query.addTriple(g,h,f,!1);d._query.hasVariable(g)||d._query.addVariable(g),b.children().length>=3&&(3===b.children().length?b.append(a("<span>").text(d._i18n("with")+"
 ")):b.append(a("<span>").text(d._i18n("and")+" 
"))),b.append(d._getTripleHtml(i)),d._changeListener&&d._changeListener(d)}),b.append(c,"
 ")},c.prototype._getShowSection=function(){var b=a("<div>"),c=a('<a class="btn 
btn-default">').text(this._i18n("show"));c.attr("href","#").prepend('<span 
class="glyphicon glyphicon-eye-open" aria-hidden="true"></span>'," 
").tooltip({title:"Click to add new 
property"}).attr("data-type","property").attr("data-auto_open",!0);var 
d=this;return this._selectorBox.add(c,function(c,e){var 
f="http://www.wikidata.org/prop/direct/"+c,g=d._query.getBoundVariables().shift();if(g){var
 h="?_"+e.replace(/( 
|[^a-z0-9])/gi,"_"),i=d._query.addTriple(g,f,h,!0);d._query.addVariable(h),b.children().length>2&&b.append(a("<span>").text(",
 
")),b.append(d._getTripleHtml(i)),d._changeListener&&d._changeListener(d)}}),b.append(c,"
 
")},c.prototype._isNotRelevant=function(a){return!!d[a.predicate]||!(!this._isSimpleMode||!this._isInShowSection(a)||this._query.hasVariable(a.object)!==!1||this._query.hasVariable(a.object+"Label")!==!1)},c.prototype._isInShowSection=function(a){
+return!(!this._isVariable(a.subject)||!this._isVariable(a.object))},c.prototype._getTripleHtml=function(b){var
 c=this,d=a("<span>");return 
a.each(b.triple,function(a,e){c._isSimpleMode&&c._isVariable(e)||(e.type&&"path"===e.type?d.append(c._getTripleEntityPathHtml(e,b,a),"
 "):d.append(c._getTripleEntityHtml(e,b,a)," 
"))}),d},c.prototype._isVariable=function(a){return"string"==typeof 
a&&a.startsWith("?")},c.prototype._isSimpleQuery=function(){var 
b={},c=this;return 
a.each(this._triples,function(a,d){c._isVariable(d.triple.subject)&&c._isVariable(d.triple.object)===!1&&(b[d.triple.subject]=!0)}),Object.keys(b).length<=1},c.prototype._getTripleEntityPathHtml=function(b,c){var
 d=this,e=a("<span>");return 
a.each(b.items,function(f,g){if(g.type&&"path"===g.type)return void 
e.append(d._getTripleEntityPathHtml(g,c));f>0&&"/"===b.pathType&&e.append(" 
"+d._i18n("or")+" "+d._i18n("subtype")+" "),"*"===b.pathType&&e.append(" 
"+d._i18n("any")+" ");var h=b.items.reduce(function(a,b,c){return 
a[c]=b,a},{});h=a.extend(h,c.triple),c=a.extend({},c),c.triple=h,e.append(d._getTripleEntityHtml(g,c,f))}),e},c.prototype._getTripleEntityHtml=function(b,c,d){var
 e=a("<span>"),f=this;return this._getLabel(b).done(function(g,h,i,j){var 
k=a("<a>").text(g).attr({"data-id":h,"data-type":j,href:"#"}).appendTo(e);e.tooltip({title:"("+h+")
 
"+i}),a(e).on("show.bs.tooltip",function(){a(".tooltip").is(":visible")&&a(".tooltip").not(this).hide()}),f._selectorBox.add(k,function(a){var
 g=b.replace(new 
RegExp(h+"$"),"")+a;e.replaceWith(f._getTripleEntityHtml(g,c,d)),c.triple[d]=g,f._changeListener&&f._changeListener(f)},{trash:function(){c.remove();var
 
d=c.triple.object;return(c.triple.object===b||c.triple.object.startsWith("?")===!1&&c.triple.predicate===b)&&(d=c.triple.subject),e.parent().next("span").length?e.parent().next("span").remove():e.parent().prev("span").remove(),e.parent().remove(),f._query.removeVariable(d),f._query.removeVariable(d+"Label"),f._changeListener&&f._changeListener(f),a(".tooltip").hide(),!0},tag:function(){return
 
c.triple.object.startsWith("?")?f._query.addVariable(c.triple.object+"Label"):f._query.addVariable(c.triple.subject+"Label"),f._changeListener&&f._changeListener(f),!0}})}).fail(function(){e.text(b)}),e},c.prototype._getLabel=function(b){var
 c=a.Deferred(),d=b.match(/(Q|P)([0-9]+)/);if(!d)return 
c.reject().promise();var e={P:"property",Q:"item"};e=e[d[1]];var f=d[0];return 
this._api.searchEntities(f,e).done(function(b){a.each(b.search,function(a,b){return
 
c.resolve(b.label,b.id,b.description,e),!1})}),c.promise()},c}(jQuery,wikibase);var
 
wikibase=wikibase||{};wikibase.queryService=wikibase.queryService||{},wikibase.queryService.ui=wikibase.queryService.ui||{},wikibase.queryService.ui.visualEditor=wikibase.queryService.ui.visualEditor||{},wikibase.queryService.ui.visualEditor.SparqlQuery=function(a,b,c){"use
 strict";function d(a){this._query=a}return 
d.prototype._query=null,d.prototype._queryComments=null,d.prototype.parse=function(a,b){var
 d=new 
c.Parser(b);this._query=d.parse(a)},d.prototype.getQueryString=function(){try{return(new
 c.Generator).stringify(this._query)}catch(a){return 
null}},d.prototype.getLimit=function(){return 
this._query.limit?this._query.limit:null},d.prototype.setLimit=function(a){a||delete
 
this._query.limit,this._query.limit=a},d.prototype.hasVariable=function(a){return
 
0!==this._query.variables.length&&(!("*"!==this._query.variables[0]||!a.startsWith("?"))||this._query.variables.indexOf(a)>=0)},d.prototype.addVariable=function(a){a.startsWith("?")&&(1===this._query.variables.length&&"*"===this._query.variables[0]||this._query.variables.indexOf(a)>=0||this._query.variables.push(a))},d.prototype.removeVariable=function(a){if(a.startsWith("?")&&(1!==this._query.variables.length||"*"!==this._query.variables[0])){var
 
b=this._query.variables.indexOf(a);b>=0&&this._query.variables.splice(b,1)}},d.prototype.getTriples=function(b,c){var
 d=[];b||(b=this._query.where),c||(c=!1);var e=this;return 
a.each(b,function(a,b){b.type&&"bgp"===b.type&&(d=d.concat(e._createTriples(b.triples,c))),b.type&&"optional"===b.type&&(d=d.concat(e.getTriples(b.patterns,!0))),b.type&&"union"===b.type&&(d=d.concat(e.getTriples(b.patterns,!1)))}),d},d.prototype._createTriples=function(b,c){var
 d=[],e=this;return 
a.each(b,function(a,f){d.push({optional:c,query:e,triple:f,remove:function(){b.splice(a,1)}})}),d},d.prototype.getSubQueries=function(){var
 b=[];return a.each(this._query.where,function(a,c){c.queryType&&b.push(new 
d(c))}),b},d.prototype.addTriple=function(a,b,c,d){var 
e={type:"bgp",triples:[{subject:a,predicate:b,object:c}]};if(d){var 
f={type:"optional",patterns:[e]};this._query.where.push(f)}else 
this._query.where.push(e);return 
this._createTriples(e.triples,d)[0]},d.prototype.getBoundVariables=function(){var
 b={};return 
a.each(this.getTriples(),function(a,c){c.triple.subject.startsWith("?")&&!c.triple.object.startsWith("?")&&(b[c.triple.subject]=!0),!c.triple.subject.startsWith("?")&&c.triple.object.startsWith("?")&&(b[c.triple.object]=!0)}),Object.keys(b)},d}(jQuery,wikibase,sparqljs);var
 
wikibase=wikibase||{};wikibase.queryService=wikibase.queryService||{},wikibase.queryService.ui=wikibase.queryService.ui||{},wikibase.queryService.ui.visualEditor=wikibase.queryService.ui.visualEditor||{},wikibase.queryService.ui.visualEditor.SelectorBox=function(a,b){"use
 strict";function c(a){this._api=a||new b.queryService.api.Wikibase}return 
c.prototype._api=null,c.prototype.add=function(a,b,c){switch(a.data("type").toLowerCase()){case"number":this._createInput(a,b,c);break;default:this._createSelect(a,b,c)}},c.prototype._createInput=function(b,c,d){var
 
e=a("<input>").attr("type",b.data("type")),f=this._getCloseButton(),g=this._getToolbar(d,b),h=a("<div>").append(f,"
 ",e," 
",g);b.clickover({placement:"bottom",global_close:!1,html:!0,content:function(){return
 h}}).click(function(a){e.val(b.data("value")||"")}),e.on("keyup 
mouseup",function(){c&&c(e.val())})},c.prototype._createSelect=function(b,c,d){var
 
e=this,f=this._getSelectBox(b),g=this._getCloseButton(),h=this._getToolbar(d,b),i=a("<div>").append(g,"
 ",f," 
",h);b.clickover({placement:"bottom",global_close:!1,html:!0,content:function(){return
 i}}).click(function(c){return 
f.toggleClass("open"),f.data("select2")||a.proxy(e._renderSelect2(f,b),e),f.hasClass("open")&&b.data("auto_open")&&f.data("select2").open(),!1}),f.change(function(a){c&&c(f.val(),f.find("option:selected").text()),b.click(),f.html("")})},c.prototype._getSelectBox=function(b){var
 c=b.data("id"),d=b.text(),e=a("<select>");return 
c&&e.append(a("<option>").attr("value",c).text(d)),e},c.prototype._getCloseButton=function(){return
 a('<a href="#" data-dismiss="clickover">').append('<span class="glyphicon 
glyphicon-remove" 
aria-hidden="true"></span>')},c.prototype._getToolbar=function(b,c){var 
d=a("<span>");return a.each(b,function(b,e){var 
f=a("<a>").attr("href","#");f.prepend('<span class="glyphicon glyphicon-'+b+'" 
aria-hidden="true"></span>'," "),f.click(function(){return 
e()&&c.click(),!1}),d.append(f," 
")}),d},c.prototype._renderSelect2=function(b,c){var 
d=this,e=c.data("type"),f=function(b){return b.data?a("<span>"+b.text+" 
("+b.data.id+")</span><br/><small>"+b.data.description+"</small>"):b.text},g=function(a,b,c){d._api.searchEntities(a.data.term,e).done(function(a){var
 
c=a.search.map(function(a){return{id:a.id,text:a.label,data:a}});b({results:c})}).fail(c)};b.select2({width:"auto",minimumInputLength:1,templateResult:f,ajax:{delay:250,transport:g},cache:!0})},c}(jQuery,wikibase);var
 
wikibase=wikibase||{};wikibase.queryService=wikibase.queryService||{},wikibase.queryService.ui=wikibase.queryService.ui||{},wikibase.queryService.ui.QueryExampleDialog=function(a){"use
 strict";function 
b(a,b,c,d){this._$element=a,this._querySamplesApi=b,this._callback=c,this._previewUrl=d,this._init()}var
 c="wikibase.queryService.ui.examples.";return 
b.prototype._querySamplesApi=null,b.prototype._callback=null,b.prototype._previewUrl=null,b.prototype._examples=null,b.prototype._trackingApi=null,b.prototype._init=function(){this._querySamplesApi||(this._querySamplesApi=new
 
wikibase.queryService.api.QuerySamples),this._trackingApi||(this._trackingApi=new
 
wikibase.queryService.api.Tracking),this._initFilter(),this._initExamples();var 
a=this;this._$element.focus(function(){a._$element.find(".tableFilter").focus()})},b.prototype._initFilter=function(){var
 
b=this;this._$element.find(".tableFilter").keyup(a.proxy(this._filterTable,this)),this._$element.find(".tagFilter").tags({afterAddingTag:a.proxy(this._filterTable,this),afterDeletingTag:function(){b._filterTable(),b._drawTagCloud(!0)}})},b.prototype._initExamples=function(){var
 
b=this,c=null;this._querySamplesApi.getExamples().done(function(d){b._examples=d,b._initTagCloud(),b._updateExamplesCount(d.length),a.each(d,function(d,e){e.category!==c&&(c=e.category,b._$element.find(".searchable").append(a("<tr>").addClass("active").append(a('<td
 
colspan="3">').text(c)))),b._addExample(e.title,e.query,e.href,e.tags)})})},b.prototype._initTagCloud=function(){var
 
a=this,b=window.setInterval(function(){a._$element.is(":visible")&&(a._drawTagCloud(),clearInterval(b))},300)},b.prototype._drawTagCloud=function(b){var
 c=this,d=[];return 
a.each(this._getCloudTags(),function(b,e){d.push({text:b,weight:e,link:"#",html:{title:e+"
 match(es)"},handlers:{click:function(b){return 
c._$element.find(".tagFilter").tags().addTag(a(this).text()),c._drawTagCloud(!0),!1}}})}),b?void
 a(".tagCloud").jQCloud("update",d):void 
a(".tagCloud").jQCloud(d,{delayedMode:!0,autoResize:!0})},b.prototype._getCloudTags=function(){var
 b=this,c=function(c){var 
d=b._$element.find(".tagFilter").tags().getTags(),e=!0;return 
0===d.length||(a.each(d,function(a,b){c.indexOf(b)===-1&&(e=!1)}),e)},d=function(a){var
 c=b._$element.find(".tagFilter").tags().getTags();return 
c.indexOf(a)!==-1},e={};return 
a.each(b._examples,function(b,f){c(f.tags)&&a.each(f.tags,function(a,b){d(b)||(e[b]?e[b]++:e[b]=1)})}),e},b.prototype._addExample=function(b,c,d,e){var
 f=this,g=a('<a title="Select" 
data-dismiss="modal">').text(b).attr("href","#").click(function(){f._callback(c,b),f._track("select")}),h=a("<a>").attr({title:"Edit",href:d,target:"_blank"}).append("<span>").addClass("glyphicon
 
glyphicon-pencil").click(function(){f._track("edit")}),i=a("<span>").addClass("glyphicon
 
glyphicon-eye-open").popover({placement:"bottom",trigger:"hover",container:"body",title:f._i18n("wdqs-dialog-examples-preview-query","Preview
 query"),content:a('<pre style="white-space:pre-line; 
word-break:break-word;"/>').text(c),html:!0}),j=a('<a 
href="#">').addClass("glyphicon 
glyphicon-camera").clickover({placement:"left",global_close:!0,trigger:"click",container:"body",title:f._i18n("wdqs-dialog-examples-preview-result","Preview
 result"),content:a('<iframe width="400" height="350" frameBorder="0" 
src="'+(f._previewUrl||"embed.html#")+encodeURIComponent(c)+'">'),html:!0}).click(function(){f._track("preview")});a(".exampleTable").scroll(function(){j.clickover&&j.clickover("hide").removeAttr("data-clickover-open")}),e=a("<td>").text(e.join("|")).hide();var
 k=a("<tr>");k.append(a("<td>").append(g).append(" 
",h)),k.append(a("<td>").append(j)),k.append(a("<td>").append(i)),k.append(e),this._$element.find(".searchable").append(k)},b.prototype._filterTable=function(){var
 b=this._$element.find(".tableFilter"),c=new 
RegExp(b.val(),"i"),d=this._$element.find(".tagFilter").tags().getTags(),e=function(b){var
 c=!0;return 
b=b.toLowerCase(),a.each(d,function(a,d){b.indexOf(d.toLowerCase())===-1&&(c=!1)}),c};this._$element.find(".searchable
 tr").hide();var f=this._$element.find(".searchable 
tr").filter(function(){return 
c.test(a(this).text())&&e(a(this).text())});f.show(),f.each(function(b,c){a(c).prevAll("tr.active").first().show()}),this._updateExamplesCount(f.length)},b.prototype._updateExamplesCount=function(a){this._$element.find(".count").text(a)},b.prototype._track=function(a,b,d){this._trackingApi.track(c+a,b,d)},b.prototype._i18n=function(b,c){var
 d=null;return a.i18n&&(d=a.i18n(b))!==b?d:c},b}(jQuery);var 
wikibase=wikibase||{};wikibase.queryService=wikibase.queryService||{},wikibase.queryService.ui=wikibase.queryService.ui||{},wikibase.queryService.ui.resultBrowser=wikibase.queryService.ui.resultBrowser||{},wikibase.queryService.ui.resultBrowser.helper=wikibase.queryService.ui.resultBrowser.helper||{},wikibase.queryService.ui.resultBrowser.helper.FormatterHelper=function(a,b){"use
 strict";function c(){}var 
d="http://www.wikidata.org/entity/Q",e="http://commons.wikimedia.org/wiki/special:filepath/",f="http://www.w3.org/2001/XMLSchema#dateTime",g="uri",h="http://www.w3.org/1998/Math/MathML",i=["http://www.w3.org/2001/XMLSchema#double","http://www.w3.org/2001/XMLSchema#float","http://www.w3.org/2001/XMLSchema#decimal","http://www.w3.org/2001/XMLSchema#integer","http://www.w3.org/2001/XMLSchema#long","http://www.w3.org/2001/XMLSchema#int","http://www.w3.org/2001/XMLSchema#short","http://www.w3.org/2001/XMLSchema#nonNegativeInteger","http://www.w3.org/2001/XMLSchema#positiveInteger","http://www.w3.org/2001/XMLSchema#unsignedLong","http://www.w3.org/2001/XMLSchema#unsignedInt","http://www.w3.org/2001/XMLSchema#unsignedShort","http://www.w3.org/2001/XMLSchema#nonPositiveInteger","http://www.w3.org/2001/XMLSchema#negativeInteger"];return
 c.prototype.formatRow=function(b,c){var d=this,e=a("<div/>");return 
a.each(b,function(b,f){e.prepend(a("<div>").append(d.formatValue(f,b,c)))}),e},c.prototype.formatValue=function(b,c,d){var
 e=b.value,i=a("<span>");if(c||(c=b.dataType||""),!b.type)return 
a("<span>").text(e).attr("title",c);switch(b.datatype||b.type){case g:var 
j=a("<a>").attr({title:c,href:e,target:"_blank"});i.append(j),this.isCommonsResource(e)?d?(j.click(this.handleCommonResourceItem),j.append(a("<img>").attr("src",this.getCommonsResourceFileNameThumbnail(e,"120"))).width("120")):(j.text("commons:"+decodeURIComponent(this.getCommonsResourceFileName(e))),i.prepend(this.createGalleryButton(e,c),"
 
")):(j.text(this.abbreviateUri(e)),this.isExploreUrl(e)&&i.prepend(this.createExploreButton(e),"
 "));break;case 
f:c||(c=this._i18n("wdqs-app-result-formatter-title-datetime","Raw ISO 
timestamp"));var k=a("<span>").text(this._formatDate(e));k.attr("title",c+": 
"+e),i.append(k);break;case h:i.append(a(b.value));break;default:var 
l=a("<span>").text(e);b["xml:lang"]?l.attr("title",c+": 
"+e+"@"+b["xml:lang"]):l.attr("title",c),i.append(l)}return 
i},c.prototype._formatDate=function(a){var 
b,c=!1,d=a.replace(/^(?:-\d+|\+?0+\b)/,function(a){return 
c=!0,Math.abs(a)+1}),e=this.parseDate(d);if(e.isValid())b=e.format("ll");else{var
 f=d.replace(/^\+?(\d+).*/,"$1");b="0000".slice(f.length)+f}return c&&(b+=" 
BCE"),b},c.prototype.parseDate=function(a){return 
a=a.replace(/^(?![+-])/,"+"),a=a.replace(/^([+-]?)(\d{1,5}\b)/,function(a,b,c){return
 
b+("00000"+c).slice(-6)}),a=a.replace(/Z$/,""),b(a,b.ISO_8601)},c.prototype.isExploreUrl=function(a){return"string"==typeof
 a&&a.startsWith(d)},c.prototype.createExploreButton=function(b){var c=a('<a 
href="'+b+'" title="Explore item" class="explore glyphicon glyphicon-search" 
aria-hidden="true">');return 
c.click(a.proxy(this.handleExploreItem,this)),c},c.prototype.isCommonsResource=function(a){return
 
a.toLowerCase().startsWith(e.toLowerCase())},c.prototype.getCommonsResourceFileName=function(a){var
 b=new RegExp(e,"ig");return 
decodeURIComponent(a.replace(b,""))},c.prototype.getCommonsResourceFileNameThumbnail=function(a,b){return
 
this.isCommonsResource(a)?a.replace(/^http(?=:\/\/)/,"https")+"?width="+(b||400):a},c.prototype.createGalleryButton=function(b,c){var
 
d=this.getCommonsResourceFileName(b),e=this.getCommonsResourceFileNameThumbnail(b,900),f=a("<a>").attr({title:"Show
 Gallery",href:e,"aria-hidden":"true","class":"gallery glyphicon 
glyphicon-picture","data-gallery":"G_"+c,"data-title":decodeURIComponent(d)});return
 
f.click(this.handleCommonResourceItem),f},c.prototype.abbreviateUri=function(a){var
 b,c,d=wikibase.queryService.RdfNamespaces.NAMESPACE_SHORTCUTS;for(b in d)for(c 
in d[b])if(0===a.indexOf(d[b][c]))return 
a.replace(d[b][c],c+":");return"<"+a+">"},c.prototype.handleExploreItem=function(b){var
 c=a(b.target).attr("href");b.preventDefault();var 
d=a.i18n&&a.i18n().locale||"en",e="SELECT ?item ?itemLabel WHERE { BIND( 
<"+c+'> as ?item ).\tSERVICE wikibase:label { bd:serviceParam wikibase:language 
"'+d+'" } 
}',f="embed.html#"+encodeURIComponent("#defaultView:Graph\n"+e);return 
a(".explorer-panel .panel-body").html(a('<iframe frameBorder="0" 
scrolling="no"></iframe>').attr("src",f)),a(".explorer-panel").show(),!1},c.prototype.handleCommonResourceItem=function(b){b.preventDefault(),a(this).ekkoLightbox({scale_height:!0})},c.prototype.isLabel=function(a){return!!a&&("xml:lang"in
 
a||"literal"===a.type&&!a.datatype)},c.prototype.isNumber=function(a){return!(!a||!a.datatype)&&i.indexOf(a.datatype)!==-1},c.prototype.isDateTime=function(a){return!(!a||!a.datatype)&&a.datatype===f},c.prototype.isEntity=function(a){return!(!a||!a.value)&&this.isExploreUrl(a.value)},c.prototype.isColor=function(a){return!!(a&&a.type&&a.value)&&("literal"===a.type&&a.value.match(/^[0-9A-F]{6}$/))},c.prototype.getColorForHtml=function(a){return"#"+a.value},c.prototype.calculateLuminance=function(a){var
 
b=parseInt(a.substr(1,2),16)/255,c=parseInt(a.substr(3,2),16)/255,d=parseInt(a.substr(5,2),16)/255;if(isFinite(b)&&isFinite(c)&&isFinite(d)){b=b<=.04045?b/12.92:Math.pow((b+.055)/1.055,2.4),c=c<=.04045?c/12.92:Math.pow((c+.055)/1.055,2.4),d=d<=.04045?d/12.92:Math.pow((d+.055)/1.055,2.4);var
 e=.2126*b+.7152*c+.0722*d;return e}return 
NaN},c.prototype._i18n=function(b,c){var d;return 
a.i18n&&(d=a.i18n(b))!==b?d:c},c}(jQuery,moment);var 
wikibase=wikibase||{};wikibase.queryService=wikibase.queryService||{},wikibase.queryService.ui=wikibase.queryService.ui||{},wikibase.queryService.ui.resultBrowser=wikibase.queryService.ui.resultBrowser||{},wikibase.queryService.ui.resultBrowser.AbstractResultBrowser=function(a,b){"use
 strict";function c(){this._visitors=[]}return 
c.prototype._formatter=null,c.prototype._result=null,c.prototype._visitors=null,c.prototype._drawable=!1,c.prototype.setResult=function(a){this._result=a},c.prototype._iterateResult=function(b){var
 
c=this;a.each(this._result.results.bindings,function(d,e){a.each(c._result.head.vars,function(a,f){var
 
g=e[f]||null;c.processVisitors(g,f),b(g,f,e,d)})})},c.prototype.isDrawable=function(){return
 this._drawable},c.prototype.draw=function(a){jQuery.error("Method draw() needs 
to be 
implemented!")},c.prototype.addVisitor=function(a){this._visitors.push(a)},c.prototype.resetVisitors=function(){this._visitors=[]},c.prototype.processVisitors=function(b,c){var
 
d=this,e={};0!==this._visitors.length&&(a.each(this._visitors,function(a,d){d.visit&&"function"==typeof
 
d.visit&&d.visit(b,c)===!1&&(e[a]=!0)}),d._visitors=d._visitors.filter(function(a,b){return!e[b]}))},c.prototype.visit=function(a){return!1},c.prototype.setFormatter=function(a){this._formatter=a},c.prototype._getFormatter=function(){return
 null===this._formatter&&(this._formatter=new 
b.queryService.ui.resultBrowser.helper.FormatterHelper),this._formatter},c.prototype._i18n=function(b,c){var
 d=null;return a.i18n&&(d=a.i18n(b))!==b?d:c},c}(jQuery,wikibase);var 
wikibase=wikibase||{};wikibase.queryService=wikibase.queryService||{},wikibase.queryService.ui=wikibase.queryService.ui||{},wikibase.queryService.ui.resultBrowser=wikibase.queryService.ui.resultBrowser||{},wikibase.queryService.ui.resultBrowser.AbstractChartResultBrowser=function(a,b){"use
 strict";function c(){}return c.prototype=new 
wikibase.queryService.ui.resultBrowser.AbstractResultBrowser,c.prototype._getLabelColumns=function(){var
 a=this,b=a._getRows()[0];return a._getColumns().filter(function(c){return 
a._getFormatter().isLabel(b[c])})},c.prototype._getNumberColumns=function(){var 
a=this,b=a._getRows()[0];return a._getColumns().filter(function(c){return 
a._getFormatter().isNumber(b[c])})},c.prototype._getColumns=function(){return 
this._result.head.vars},c.prototype._getRows=function(){return 
this._result.results.bindings},c}(jQuery,window);var 
wikibase=wikibase||{};wikibase.queryService=wikibase.queryService||{},wikibase.queryService.ui=wikibase.queryService.ui||{},wikibase.queryService.ui.resultBrowser=wikibase.queryService.ui.resultBrowser||{},window.mediaWiki=window.mediaWiki||{},wikibase.queryService.ui.resultBrowser.AbstractDimpleChartResultBrowser=function(a,b,c,d,e){"use
 strict";function f(){}return f.prototype=new 
wikibase.queryService.ui.resultBrowser.AbstractChartResultBrowser,f.prototype._dataColumns=null,f.prototype._data=null,f.prototype._$element=null,f.prototype._svg=null,f.prototype._chart=null,f.prototype._chartLegend=null,f.prototype._chartSeriesKey=null,f.prototype._chartStoryKey=null,f.prototype._isStoryPause=!1,f.prototype.draw=function(b){var
 
c=this;this._$element=a("<div>").css({width:"100%",height:"98vh"}),b.html(this._$element),this._createData(),this._drawSvg(),this._createChart(),this._drawChart(),this._createLegendFilter(),d.onresize=function(){c._drawChart(250,!0)}},f.prototype._createData=function(){var
 
a=[],b={},c=null;this._iterateResult(function(d,e,f){null===c&&(c=f),f!==c&&(c=f,a.push(b),b={}),d&&d.value&&(b[e]=d.value)}),a.push(b),this._data=a},f.prototype._drawSvg=function(){this._svg=e.newSvg(this._$element[0],"100%","100%")},f.prototype._createChart=function(){this._chart=new
 
e.chart(this._svg,this._data),this._chart.setBounds(0,0,"100%","100%"),this._chart.setMargins("5%","5%","2%","25%"),this._createChartAxis();var
 
a=this._chart.addSeries(this._chartSeriesKey,this._getPlotType());a.addOrderRule(this._chartSeriesKey),a.lineMarkers=!0,this._chartStoryKey&&this._createChartStory(),this._chartLegend=this._chart.addLegend("1%","85%","100%","15%")},f.prototype._getPlotType=function(){jQuery.error("Method
 _getPlotType() needs to be 
implemented!")},f.prototype._createChartAxis=function(){var 
b=this,c=this._getRows()[0],d=this._getFormatter(),e=this._chart,f=["y","x"],g=!1;a.each(this._getColumns(),function(a,h){if(0!==f.length)d.isLabel(c[h])&&(e.addCategoryAxis(f.pop(),h),g=!0),d.isNumber(c[h])&&e.addMeasureAxis(f.pop(),h),d.isDateTime(c[h])&&(e.addTimeAxis(f.pop(),h,"%Y-%m-%dT%H:%M:%SZ","%m-%d-%Y"),g=!0);else
 if(d.isLabel(c[h])){if(!b._chartSeriesKey)return 
void(b._chartSeriesKey=h);if(!b._chartStoryKey)return 
b._chartStoryKey=h,!1}}),g||this._chartSeriesKey||!e.axes[0]||(this._chartSeriesKey=e.axes[0].measure)},f.prototype._createChartStory=function(){var
 
a=this,b=this._chart.setStoryboard(this._chartStoryKey);b.frameDuration=5e3,this._$element.click(function(){return
 
a._isStoryPaused?(b.startAnimation(),void(a._isStoryPaused=!1)):(b.pauseAnimation(),void(a._isStoryPaused=!0))})},f.prototype._createLegendFilter=function(){var
 
a=this,b=e.getUniqueValues(this._data,this._chartSeriesKey);this._chart.legends=[],this._chartLegend.shapes.selectAll("rect").on("click",function(d){var
 
f=!1,g=[];b.forEach(function(a){a===d.aggField.slice(-1)[0]?f=!0:g.push(a)}),c.select(this).style("opacity",f?.2:.8),f||g.push(d.aggField.slice(-1)[0]),b=g,a._chart.data=e.filterData(a._data,a._chartSeriesKey,b),a._drawChart(800)})},f.prototype._drawChart=function(a,c){var
 
d=this;this._chart.draw(a,c),b.delay(function(){d._svg.selectAll(".dimple-marker,.dimple-marker-back").attr("r",2)},1.2*a)},f.prototype.isDrawable=function(){return
 
Object.keys(this._dataColumns).length>=2},f.prototype.visit=function(a,b){return
 this._checkColumn(a,b)},f.prototype._checkColumn=function(a,b){return 
this._getFormatter().isLabel(a)&&(this._dataColumns[b]=!0),this._getFormatter().isNumber(a)&&(this._dataColumns[b]=!0),this._getFormatter().isDateTime(a)&&(this._dataColumns[b]=!0),!this.isDrawable()},f}(jQuery,_,d3,window,dimple);var
 
wikibase=wikibase||{};wikibase.queryService=wikibase.queryService||{},wikibase.queryService.ui=wikibase.queryService.ui||{},wikibase.queryService.ui.resultBrowser=wikibase.queryService.ui.resultBrowser||{},wikibase.queryService.ui.resultBrowser.ImageResultBrowser=function(a){"use
 strict";function b(){}return b.prototype=new 
wikibase.queryService.ui.resultBrowser.AbstractResultBrowser,b.prototype._grid=null,b.prototype.draw=function(b){var
 c=this;this._grid=a('<div 
class="masonry">'),this._iterateResult(function(a,b,d){if(a&&c._isCommonsResource(a.value)){var
 
e=a.value,f=c._getFormatter().getCommonsResourceFileName(e);c._grid.append(c._getItem(c._getThumbnail(e),c._getThumbnail(e,1e3),f,d))}}),b.html(this._grid)},b.prototype._getItem=function(b,c,d,e){var
 
f=a("<a>").click(this._getFormatter().handleCommonResourceItem).attr({href:c,"data-gallery":"g","data-title":d}).append(a("<img>").attr("src",b)),g=this._getFormatter().formatRow(e);return
 a('<div 
class="item">').append(f,g)},b.prototype._isCommonsResource=function(a){return 
this._getFormatter().isCommonsResource(a)},b.prototype._getThumbnail=function(a,b){return
 
this._getFormatter().getCommonsResourceFileNameThumbnail(a,b)},b.prototype.visit=function(a){return
 
this._checkImage(a)},b.prototype._checkImage=function(a){return!(a&&a.value&&this._isCommonsResource(a.value))||(this._drawable=!0,!1)},b}(jQuery);var
 
wikibase=wikibase||{};wikibase.queryService=wikibase.queryService||{},wikibase.queryService.ui=wikibase.queryService.ui||{},wikibase.queryService.ui.resultBrowser=wikibase.queryService.ui.resultBrowser||{},wikibase.queryService.ui.resultBrowser.TableResultBrowser=function(a,b){"use
 strict";function c(){}var d=200,e=[10,50,100,200,500,1e3];return 
c.prototype=new 
wikibase.queryService.ui.resultBrowser.AbstractResultBrowser,c.prototype._columns=null,c.prototype._rows=null,c.prototype._sorter={string:function(a,b){return
 a.localeCompare(b)},number:function(a,b){return 
a>=b?-1:1},generic:function(a,b){if(!b)return 1;if(!a)return-1;var 
c=this._getFormatter();return 
c.isNumber(a)&&c.isNumber(b)?this._sorter.number(Number(a.value),Number(b.value)):c.isExploreUrl(a.value)&&c.isExploreUrl(b.value)?this._sorter.number(Number(a.value.replace(/[^0-9]/gi,"")),Number(b.value.replace(/[^0-9]/gi,""))):this._sorter.string(a.value,b.value)}},c.prototype.draw=function(c){var
 d=this._result;if("undefined"!=typeof d["boolean"]){var 
e=a("<table>").attr("class","table");return 
e.append("<tr><td>"+d["boolean"]+"</td></tr>").addClass("boolean"),void 
c.html(e)}this.columns=d.head.vars,this.rows=d.results.bindings;var 
f=a("<table/>");c.html(f),this.drawBootstrapTable(f),f.children().width()>a(b).width()&&f.bootstrapTable("toggleView")},c.prototype.drawBootstrapTable=function(b){var
 
c=this,f=this.rows.length>d;jQuery.fn.bootstrapTable.columnDefaults.formatter=function(a,b,d){return
 
a?(c.processVisitors(a,this.field),c._getFormatter().formatValue(a).html()):""};var
 g={"click 
.explore":a.proxy(this._getFormatter().handleExploreItem,this),"click 
.gallery":this._getFormatter().handleCommonResourceItem};b.bootstrapTable({columns:this.columns.map(function(b){return{title:b,field:b,events:g,sortable:!0,sorter:a.proxy(c._sorter.generic,c)}}),data:this.rows,mobileResponsive:!0,search:f,pagination:f,showPaginationSwitch:f,pageSize:d,pageList:e,keyEvents:!0,cookie:!0,cookieIdTable:"1",cookieExpire:"1y",cookiesEnabled:["bs.table.pageList"]})},c.prototype.isDrawable=function(){return!0},c.prototype.visit=function(a){return!1},c}(jQuery,window);var
 
wikibase=wikibase||{};wikibase.queryService=wikibase.queryService||{},wikibase.queryService.ui=wikibase.queryService.ui||{},wikibase.queryService.ui.resultBrowser=wikibase.queryService.ui.resultBrowser||{},wikibase.queryService.ui.resultBrowser.CoordinateResultBrowser=function(a,b,c,d,e){"use
 strict";function f(){}var 
g="http://www.opengis.net/ont/geosparql#wktLiteral",h="Q2",i=["layerLabel","layer"],j="_LAYER_DEFAULT_GROUP",k={wikimedia:{url:"https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png",options:{id:"wikipedia-map-01",attribution:'
 <a href="http://maps.wikimedia.org/";>Wikimedia</a> | &copy; <a 
href="http://openstreetmap.org/copyright";>Open Street Map</a> 
contributors'}},osm:{url:"http://{s}.tile.osm.org/{z}/{x}/{y}.png",options:{attribution:'&copy;
 <a href="http://osm.org/copyright";>OpenStreetMap</a> 
contributors'}}},l=null;return f.prototype=new 
wikibase.queryService.ui.resultBrowser.AbstractResultBrowser,f.prototype._map=null,f.prototype._markerGroups=null,f.prototype.draw=function(c){var
 
e=a("<div>").attr("id","map").height("100vh");c.html(e),this._createMarkerGroups(),this._map=b.map("map",{center:[0,0],maxZoom:18,minZoom:2,fullscreenControl:!0,preferCanvas:!0,layers:d.compact(this._markerGroups)}).fitBounds(this._markerGroups[j].getBounds()),this._setTileLayer(),this._createControls(),this._createMarkerZoomResize(),c.html(e)},f.prototype._createControls=function(){var
 c=this;this._map.addControl(b.control.zoomBox({modal:!1,className:"glyphicon 
glyphicon-zoom-in"})),this._map.addControl(new l);var 
d=Object.keys(this._markerGroups).length;if(d>1){var 
e=this._getLayerControl(this._markerGroups).addTo(this._map);this._map.on("overlayadd
 
overlayremove",function(b){b.layer===c._markerGroups[j]&&(a.each(c._markerGroups,function(a,d){"overlayadd"===b.type?c._map.addLayer(d):c._map.removeLayer(d)}),e._update())})}},f.prototype._createMarkerZoomResize=function(){var
 a=this;if(!(this._markerGroups[j].getLayers().length>1e3)){var 
b=function(){a._markerGroups[j].setStyle({radius:a._getMarkerRadius()})};this._map.on("zoomend",b)}},f.prototype._getMarkerRadius=function(){if(!this._map)return
 3;var 
a=this._map.getZoom();return.5*a},f.prototype._getLayerControl=function(){var 
c=this,d={},e="";return 
a.each(this._markerGroups,function(a,b){if(a===j)e=c._i18n("wdqs-result-map-layers-all","All
 layers");else{var f=c._getMarkerGroupColor(a);e='<span 
style="color:'+f+'">&#x2b24;</span> 
'+a}d[e]=b}),b.control.layers(null,d)},f.prototype._createMarkerGroups=function(){var
 
c=this,d={};if(d[j]=[],this._iterateResult(function(a,e,f){if(a&&a.datatype===g){var
 h=c._extractLongLat(a.value);if(null===h||!h[0]||!h[1])return!0;var 
i=b.popup(),k=h[0],l=h[1],m=c._getMarkerGroupsLayer(f),n=b.circleMarker([l,k],c._getMarkerStyle(m)).bindPopup(i);n.on("click",function(){var
 
a=c._getItemDescription(f);i.setContent(a[0])}),d[m]||(d[m]=[]),d[m].push(n),d[j].push(n)}}),0===Object.keys(d).length){var
 e=b.marker([0,0]).bindPopup("Nothing 
found!").openPopup();return{"null":b.featureGroup([e])}}a.each(d,function(a){d[a]=b.featureGroup(d[a])}),this._markerGroups=d},f.prototype._getMarkerGroupsLayer=function(a){var
 b=i.find(function(b){return a[b]});return 
b?a[b].value:j},f.prototype._getMarkerGroupColor=c.scale.category10(),f.prototype._getMarkerStyle=function(a){var
 b="#e04545";return 
a!==j&&(b=this._getMarkerGroupColor(a)),{color:b,opacity:.8,fillColor:b,fillOpacity:.9,radius:this._getMarkerRadius()}},f.prototype._extractLongLat=function(a){var
 b=this._extractGlobe(a);return 
null!==b&&b!==h?null:(a=a.match(/Point\((.*)\)/).pop(),a.split(" 
"))},f.prototype._extractGlobe=function(a){var 
b=null;return(b=a.match(/<http\:\/\/www\.wikidata\.org\/entity\/(.+)>/i))&&(b=b.pop()),b},f.prototype._getItemDescription=function(b){var
 c=a("<div/>").append(this._getFormatter().formatRow(b,!0));return 
c},f.prototype._setTileLayer=function(){var 
a=k.osm;("query.wikidata.org"===e.location.host||"localhost"===e.location.host||e.location.host.endsWith(".wmflabs.org"))&&(a=k.wikimedia),b.tileLayer(a.url,a.options).addTo(this._map)},l=b.Control.extend({options:{position:"topright"},onAdd:function(c){var
 d=b.DomUtil.create("button");return a(d).addClass("btn 
btn-default"),a(d).append(a(' <span class="glyphicon glyphicon-chevron-up"/> 
')),d.onclick=function(){c.isFullscreen()&&c.toggleFullscreen(),a(e).scrollTop(0,0)},d}}),f.prototype.visit=function(a){return
 
this._checkCoordinate(a)},f.prototype._checkCoordinate=function(a){if(a&&a.datatype===g){var
 b=this._extractGlobe(a.value);if(null===b||b===h)return 
this._drawable=!0,!1}return!0},f}(jQuery,L,d3,_,window);var 
wikibase=wikibase||{};wikibase.queryService=wikibase.queryService||{},wikibase.queryService.ui=wikibase.queryService.ui||{},
+wikibase.queryService.ui.resultBrowser=wikibase.queryService.ui.resultBrowser||{},wikibase.queryService.ui.resultBrowser.TreeMapResultBrowser=function(a,b,c){"use
 strict";function d(){this._labelColumns={}}return d.prototype=new 
wikibase.queryService.ui.resultBrowser.AbstractChartResultBrowser,d.prototype._labelColumns=null,d.prototype.draw=function(a){var
 
b=this,c={},d=c,e=null,f=null,g=null;this._iterateResult(function(a,h,i){i!==g&&(null!==g&&(d.data={size:e,url:f},e=null,f=null,d=c),g=i),b._getFormatter().isLabel(a)&&(d[a.value]||(d[a.value]={}),d=d[a.value]),b._getFormatter().isNumber(a)&&(e=a.value),a&&a.value&&b._getFormatter().isExploreUrl(a.value)&&(f=a.value)}),d.data={size:e,url:f};var
 
h=this._createTreeData(c),i={name:"treeMap",children:h};this._draw(a,i)},d.prototype._createTreeData=function(b){var
 c,d=this,e=[];return b.data?e:(a.each(b,function(a,b){var 
f=d._createTreeData(b);if(0!==f.length)c={id:a,name:a,children:f};else{var 
g=1;b.data.size&&b.data.size>0&&(g=b.data.size);var 
h=a,i=b.data.url;i&&(h=i),c={id:h+Math.random(),name:a,size:g,url:i}}e.push(c)}),e)},d.prototype._draw=function(d,e){function
 f(a){return a.size}function g(a){return 1}function h(a){var 
b=a.substring(1,3),c=a.substring(3,5),d=a.substring(5,7);return{R:parseInt(b,16),G:parseInt(c,16),B:parseInt(d,16)}}function
 i(a){var b=105,c=h(a),d=.299*c.R+.587*c.G+.114*c.B;return 
255-d<b?"#000000":"#ffffff"}function 
j(a){v.padding([s/(o/a.dy),0,0,0]).nodes(a);var 
c=n/a.dx,d=o/a.dy,e=a;p.domain([a.x,a.x+a.dx]),q.domain([a.y,a.y+a.dy]),w.selectAll(".labelbody
 .label").style("display","block");var 
f=w.selectAll("g.cell").transition().duration(u).attr("transform",function(a){return"translate("+p(a.x)+","+q(a.y)+")"}).each("end",function(a,b){b||e===self.root||(w.selectAll(".cell.child").filter(function(a){return
 a.parent===self.node}).select(".foreignObject .labelbody 
.label").style("color",function(a){return 
i(r(a.parent.name))}),m?w.selectAll(".cell.child").filter(function(a){return 
a.parent===self.node}).select(".foreignObject").style("display",""):w.selectAll(".cell.child").filter(function(a){return
 a.parent===self.node}).select(".foreignObject .labelbody 
.label").style("display",""))});f.select(".foreignObject").attr("width",function(a){return
 Math.max(.01,c*a.dx)}).attr("height",function(a){return 
a.children?s:Math.max(.01,d*a.dy)}).select(".labelbody 
.label").text(function(a){return 
a.name}),f.select("rect").attr("width",function(a){return 
Math.max(.01,c*a.dx)}).attr("height",function(a){return 
a.children?s:Math.max(.01,d*a.dy)}).style("fill",function(a){return 
a.children?t:r(a.parent.name)}),l=a,b.event&&b.event.stopPropagation()}var 
k,l,m=!1,n=a(c).width(),o=a(c).height(),p=b.scale.linear().range([0,n]),q=b.scale.linear().range([0,o]),r=b.scale.category10(),s=20,t="#555555",u=500,v=b.layout.treemap().round(!1).size([n,o]).sticky(!0).value(function(a){return
 
a.size}),w=b.select(d[0]).append("svg:svg").attr("width",n).attr("height",o).append("svg:g");l=k=e;var
 
x=v.nodes(k),y=x.filter(function(a){return!a.children}),z=x.filter(function(a){return
 
a.children}),A=w.selectAll("g.cell.parent").data(z,function(a){return"p-"+a.id}),B=A.enter().append("g").attr("class","cell
 
parent").on("click",function(a){j(a)});B.append("rect").attr("width",function(a){return
 
Math.max(.01,a.dx)}).attr("height",s).style("fill",t),B.append("foreignObject").attr("class","foreignObject").append("xhtml:body").attr("class","labelbody").append("div").attr("class","label");var
 
C=A.transition().duration(u);C.select(".cell").attr("transform",function(a){return"translate("+a.dx+","+a.y+")"}),C.select("rect").attr("width",function(a){return
 
Math.max(.01,a.dx)}).attr("height",s).style("fill",t),C.select(".foreignObject").attr("width",function(a){return
 Math.max(.01,a.dx)}).attr("height",s).select(".labelbody 
.label").text(function(a){return a.name}),A.exit().remove();var 
D=w.selectAll("g.cell.child").data(y,function(a){return"c-"+a.id}),E=D.enter().append("g").attr("class","cell
 
child").on("click",function(a){j(l===a.parent?k:a.parent)});E.append("rect").classed("background",!0).style("fill",function(a){return
 
r(a.parent.name)}),E.append("foreignObject").attr({"class":"foreignObject",width:function(a){return
 Math.max(.01,a.dx)},height:function(a){return 
Math.max(.01,a.dy)}}).append("xhtml:body").attr("class","labelbody").append("div").attr("class","label").text(function(a){return
 
a.name}).on("click",function(a){a.url&&(c.open(a.url,"_blank"),b.event.stopPropagation())});var
 
F=D.transition().duration(u);F.select(".cell").attr("transform",function(a){return"translate("+a.x+","+a.y+")"}),F.select("rect").attr("width",function(a){return
 Math.max(.01,a.dx)}).attr("height",function(a){return 
a.dy}).style("fill",function(a){return 
r(a.parent.name)}),F.select(".foreignObject").attr("width",function(a){return 
Math.max(.01,a.dx)}).attr("height",function(a){return 
Math.max(.01,a.dy)}).select(".labelbody .label").text(function(a){return 
a.name}),D.exit().remove(),b.select("select").on("change",function(){console.log("select
 
zoom(node)"),v.value("size"==value?f:g).nodes(k),j(l)}),j(l)},d.prototype.isDrawable=function(){return
 
Object.keys(this._labelColumns).length>1},d.prototype.visit=function(a,b){return
 
this._checkColumn(a,b)},d.prototype._checkColumn=function(a,b){return!this._getFormatter().isLabel(a,b)||(this._labelColumns[b]=!0,!this.isDrawable())},d}(jQuery,d3,window);var
 
wikibase=wikibase||{};wikibase.queryService=wikibase.queryService||{},wikibase.queryService.ui=wikibase.queryService.ui||{},wikibase.queryService.ui.resultBrowser=wikibase.queryService.ui.resultBrowser||{},wikibase.queryService.ui.resultBrowser.BubbleChartResultBrowser=function(a,b,c){"use
 strict";function d(){}return d.prototype=new 
wikibase.queryService.ui.resultBrowser.AbstractChartResultBrowser,d.prototype._hasLabel=!1,d.prototype._hasNumber=!1,d.prototype.draw=function(b){var
 
c=this,d={name:"bubblechart",children:[]},e=this._getLabelColumns()[0],f=this._getNumberColumns()[0],g=null,h=null;this._iterateResult(function(a,b,i){if(a&&a.value&&c._getFormatter().isExploreUrl(a.value)&&(h=a.value),i!==g){var
 
j={url:h};h=null,g=i,i.rgb&&c._getFormatter().isColor(i.rgb)&&(j.color=c._getFormatter().getColorForHtml(i.rgb)),i[e]&&i[f]&&(j.name=i[e].value,j.size=i[f].value,d.children.push(j))}});var
 
i=a("<center>");b.html(i),this._drawBubbleChart(i,d)},d.prototype._drawBubbleChart=function(d,e){function
 f(a){function 
b(a,d){d.children?d.children.forEach(function(a){b(d.name,a)}):c.push({packageName:a,className:d.name,value:d.size,url:d.url,color:d.color})}var
 c=[];return b(null,a),{children:c}}var 
g=this,h=Math.min(.98*a(c).height(),a(c).width()),i=b.scale.category20c(),j=b.layout.pack().sort(null).size([h,h]).padding(1.5),k=b.select(d[0]).append("svg").attr({"class":"bubble",width:h,height:h}),l=k.selectAll(".node").data(j.nodes(f(e)).filter(function(a){return!a.children})).enter().append("g").attr("class","node").attr("transform",function(a){return"translate("+a.x+","+a.y+")"});l.append("title").text(function(a){return
 a.className+": "+a.value}),l.append("circle").attr("r",function(a){return 
a.r}).style("fill",function(a){return 
a.color||i(a.className)}),l.append("text").attr("dy",".3em").style("text-anchor","middle").text(function(a){return
 
a.className.substring(0,a.r/4)}).on("click",function(a){a.url&&c.open(a.url,"_blank")}).style("fill",function(a){if(a.color)return
 
g._getFormatter().calculateLuminance(a.color)<=.5?"#FFF":"#000"}).style("cursor","pointer")},d.prototype.isDrawable=function(){return
 this._hasLabel&&this._hasNumber},d.prototype.visit=function(a){return 
this._checkColumn(a)},d.prototype._checkColumn=function(a){return 
this._getFormatter().isNumber(a)&&(this._hasNumber=!0),this._getFormatter().isLabel(a)&&(this._hasLabel=!0),!this.isDrawable()},d}(jQuery,d3,window);var
 
wikibase=wikibase||{};wikibase.queryService=wikibase.queryService||{},wikibase.queryService.ui=wikibase.queryService.ui||{},wikibase.queryService.ui.resultBrowser=wikibase.queryService.ui.resultBrowser||{},window.mediaWiki=window.mediaWiki||{},wikibase.queryService.ui.resultBrowser.LineChartResultBrowser=function(a){"use
 strict";function b(){this._dataColumns={}}var 
c=wikibase.queryService.ui.resultBrowser.AbstractDimpleChartResultBrowser;return
 b.prototype=new c,b.prototype._getPlotType=function(){return 
a.plot.line},b}(dimple);var 
wikibase=wikibase||{};wikibase.queryService=wikibase.queryService||{},wikibase.queryService.ui=wikibase.queryService.ui||{},wikibase.queryService.ui.resultBrowser=wikibase.queryService.ui.resultBrowser||{},window.mediaWiki=window.mediaWiki||{},wikibase.queryService.ui.resultBrowser.BarChartResultBrowser=function(a){"use
 strict";function b(){this._dataColumns={}}var 
c=wikibase.queryService.ui.resultBrowser.AbstractDimpleChartResultBrowser;return
 b.prototype=new c,b.prototype._getPlotType=function(){return 
a.plot.bar},b}(dimple);var 
wikibase=wikibase||{};wikibase.queryService=wikibase.queryService||{},wikibase.queryService.ui=wikibase.queryService.ui||{},wikibase.queryService.ui.resultBrowser=wikibase.queryService.ui.resultBrowser||{},window.mediaWiki=window.mediaWiki||{},wikibase.queryService.ui.resultBrowser.ScatterChartResultBrowser=function(a){"use
 strict";function b(){this._dataColumns={}}var 
c=wikibase.queryService.ui.resultBrowser.AbstractDimpleChartResultBrowser;return
 b.prototype=new c,b.prototype._getPlotType=function(){return 
a.plot.scatter},b}(dimple);var 
wikibase=wikibase||{};wikibase.queryService=wikibase.queryService||{},wikibase.queryService.ui=wikibase.queryService.ui||{},wikibase.queryService.ui.resultBrowser=wikibase.queryService.ui.resultBrowser||{},window.mediaWiki=window.mediaWiki||{},wikibase.queryService.ui.resultBrowser.AreaChartResultBrowser=function(a){"use
 strict";function b(){this._dataColumns={}}var 
c=wikibase.queryService.ui.resultBrowser.AbstractDimpleChartResultBrowser;return
 b.prototype=new c,b.prototype._getPlotType=function(){return 
a.plot.area},b}(dimple);var 
wikibase=wikibase||{};wikibase.queryService=wikibase.queryService||{},wikibase.queryService.ui=wikibase.queryService.ui||{},wikibase.queryService.ui.resultBrowser=wikibase.queryService.ui.resultBrowser||{},wikibase.queryService.ui.resultBrowser.TimelineResultBrowser=function(a,b,c,d){"use
 strict";function e(){}var 
f={minHeight:"400px",orientation:{axis:"both",item:"top"},align:"auto",zoomKey:"ctrlKey"};return
 e.prototype=new 
wikibase.queryService.ui.resultBrowser.AbstractResultBrowser,e.prototype.draw=function(c){var
 d=a("<div>"),e=new 
b.Timeline(d[0],this._getItems(),f);c.append(d.prepend(this._createToolbar(e)))},e.prototype._getItems=function(){var
 a=this,c=[];return 
this._iterateResult(function(b,d,e,f){if(a._getFormatter().isDateTime(b))if(c[f]){var
 
g=[];g.push(a._getFormatter().parseDate(b.value)),c[f].start&&g.push(c[f].start),c[f].end&&g.push(c[f].end),c[f].start=g.reduce(function(a,b){return
 a<b?a:b}),c[f].end=g.reduce(function(a,b){return a>b?a:b})}else 
c[f]={id:f,content:a._getHtml(e).html(),start:a._getFormatter().parseDate(b.value)}}),new
 b.DataSet(d.compact(c))},e.prototype._getHtml=function(b){var 
c=a("<div/>").append(this._getFormatter().formatRow(b,!0));return 
c},e.prototype._createToolbar=function(b){function c(a){var 
c=b.getWindow(),d=c.end-c.start;b.setWindow({start:c.start.valueOf()-d*a,end:c.end.valueOf()+d*a})}var
 d=a('<div style="margin-top: -35px; text-align: center;">');return a('<a 
class="btn btn-default">').click(a.proxy(b.redraw,b)).append('<span 
class="glyphicon glyphicon-resize-vertical" 
aria-hidden="true"></span>').appendTo(d),a('<a class="btn 
btn-default">').click(a.proxy(b.fit,b)).append('<span class="glyphicon 
glyphicon-resize-horizontal" aria-hidden="true"></span>').appendTo(d),a('<a 
class="btn btn-default">').click(function(){c(.2)}).append('<span 
class="glyphicon glyphicon-zoom-out" 
aria-hidden="true"></span>').appendTo(d),a('<a class="btn 
btn-default">').click(function(){c(-.2)}).append('<span class="glyphicon 
glyphicon-zoom-in" 
aria-hidden="true"></span>').appendTo(d),d},e.prototype.visit=function(a){return!this._getFormatter().isDateTime(a)||(this._drawable=!0,!1)},e}(jQuery,vis,window,_);var
 
wikibase=wikibase||{};wikibase.queryService=wikibase.queryService||{},wikibase.queryService.ui=wikibase.queryService.ui||{},wikibase.queryService.ui.resultBrowser=wikibase.queryService.ui.resultBrowser||{},wikibase.queryService.ui.resultBrowser.MultiDimensionResultBrowser=function(a,b,c){"use
 strict";function d(){}var e="http://www.w3.org/2001/XMLSchema#dateTime";return 
d.prototype=new 
wikibase.queryService.ui.resultBrowser.AbstractChartResultBrowser,d.prototype.draw=function(a){var
 
b={},c=[],d=this._getFormatter();this._iterateResult(function(a,f,g,h){if(c[h]||(c[h]={}),c[h][f]=a&&a.value||"undefined",a&&a.type===e&&(c[h][f]=new
 Date(a.value).toLocaleDateString()),!b[f]){var 
i={key:f,description:f,type:"STRING"};d.isNumber(a)&&(i.type="NUMBER"),a&&a.type===e&&(i.type="DATE"),b[f]=i}}),this._draw(a,c,_.values(b))},d.prototype._draw=function(d,e,f){function
 g(a){return o(f.map(function(b){return[n(b.key),b.scale(a[b.key])]}))}function 
h(){b.event.sourceEvent.stopPropagation()}function i(){var 
a=f.filter(function(a){return!a.brush.empty()}),c=a.map(function(a){return 
a.brush.extent()}),d=[];b.selectAll(".foreground 
path").style("display",function(b){return a.every(function(a,d){return 
a.type.within(b[a.key],c[d],a)})?(d.push(b),null):"none"})}var 
j={top:50,right:80,bottom:10,left:100},k=a(c).width()-(j.left+j.right),l=a(c).height()-(j.top+j.bottom),m={NUMBER:{key:"Number",coerce:function(a){return+a},extent:b.extent,within:function(a,b){return
 
b[0]<=a&&a<=b[1]},defaultScale:b.scale.linear().range([l,0])},STRING:{key:"String",coerce:String,extent:function(a){return
 a.sort()},within:function(a,b,c){return 
b[0]<=c.scale(a)&&c.scale(a)<=b[1]},defaultScale:b.scale.ordinal().rangePoints([0,l])},DATE:{key:"Date",coerce:function(a){return
 new Date(a)},extent:b.extent,within:function(a,b){return 
b[0]<=a&&a<=b[1]},defaultScale:b.time.scale().range([0,l])}};a.each(f,function(){this.type=m[this.type]});var
 n=b.scale.ordinal().domain(f.map(function(a){return 
a.key})).rangePoints([0,k]),o=b.svg.line().defined(function(a){return!isNaN(a[1])}),p=b.svg.axis().orient("left"),q=b.select(d[0]).append("svg").attr({width:k+j.left+j.right,height:l+j.top+j.bottom}).append("g").attr("transform","translate("+j.left+","+j.top+")"),r=q.append("g").attr("class","foreground"),s=q.selectAll(".axis").data(f).enter().append("g").attr("class","axis").attr("transform",function(a){return"translate("+n(a.key)+")"});e.forEach(function(a){f.forEach(function(b){a[b.key]=b.type.coerce(a[b.key])})}),f.forEach(function(a){"domain"in
 a||(a.domain=b.functor(a.type.extent)(e.map(function(b){return 
b[a.key]})),a.domain.sort(function(a,b){return a-b})),"scale"in 
a||(a.scale=a.type.defaultScale.copy()),a.scale.domain(a.domain)}),r.selectAll("path").data(e).enter().append("path").attr("d",g).style("stroke",function(a){return"#6ac"}),s.append("g").attr("class","axis").each(function(a){var
 c="axis"in 
a?a.axis.scale(a.scale):p.scale(a.scale);b.select(this).call(c)}).append("text").attr("class","title").attr("text-anchor","start").text(function(a){return"description"in
 
a?a.description:a.key}),s.append("g").attr("class","brush").each(function(a){b.select(this).call(a.brush=b.svg.brush().y(a.scale).on("brushstart",h).on("brush",i))}).selectAll("rect").attr("x",-8).attr("width",16)},d.prototype.isDrawable=function(){return
 this._drawable},d.prototype.visit=function(a){return 
this._drawable=!0,!1},d}(jQuery,d3,window);var 
wikibase=wikibase||{};wikibase.queryService=wikibase.queryService||{},wikibase.queryService.ui=wikibase.queryService.ui||{},wikibase.queryService.ui.resultBrowser=wikibase.queryService.ui.resultBrowser||{},wikibase.queryService.ui.resultBrowser.GraphResultBrowser=function(a,b,c,d){"use
 strict";function e(){}var 
f={autoResize:!0,physics:{stabilization:{enabled:!0,iterations:10,fit:!0}},nodes:{shadow:!0,color:"#fff"},edges:{arrows:{to:!0}}};return
 e.prototype=new 
wikibase.queryService.ui.resultBrowser.AbstractResultBrowser,e.prototype.draw=function(d){var
 e=a("<div>").height("100vh"),g=this._getData(),h=new 
b.Network(e[0],g,f);h.on("doubleClick",function(a){1===a.nodes.length&&c.open(a.nodes[0],"_blank")});var
 i=new 
wikibase.queryService.ui.resultBrowser.GraphResultBrowserNodeBrowser(g.nodes,g.edges);h.on("click",function(a){var
 
b=a.nodes[0]||null;i.browse(b)}),e.prepend(this._createToolbar(h)),d.append(e)},e.prototype._createToolbar=function(b){function
 
c(a){b.setOptions({layout:{hierarchical:{direction:a,sortMethod:"directed"}}})}var
 d=a('<div style="margin-top: -35px; text-align: center;">');return a('<a 
class="btn btn-default">').click(function(){b.stabilize(100)}).append('<span 
class="glyphicon glyphicon-fullscreen" 
aria-hidden="true"></span>').appendTo(d),a('<a class="btn 
btn-default">').click(function(){c("LR")}).append('<span class="glyphicon 
glyphicon-indent-left" aria-hidden="true"></span>').appendTo(d),a('<a 
class="btn btn-default">').click(function(){c("UD")}).append('<span 
class="glyphicon glyphicon-align-center" 
aria-hidden="true"></span>').appendTo(d),a('<a class="btn 
btn-default">').click(function(){c("RL")}).append('<span class="glyphicon 
glyphicon-indent-right" 
aria-hidden="true"></span>').appendTo(d),d},e.prototype._getData=function(){var 
a={},c={},e=[],f=this._getFormatter(),g={};return 
this._iterateResult(function(b,d,h,i){if(b&&b.value){if(f.isEntity(b)){var 
j=h[d+"Label"]&&h[d+"Label"].value||b.value,k=b.value;if(g={id:k,label:j,title:j},e[i]){var
 l={from:e[i],to:k};c[l.from+l.to]=l,a[k]||(a[k]=g)}else 
a[k]=g,e[i]=g.id}if(f.isCommonsResource(b.value)&&(g.image=f.getCommonsResourceFileNameThumbnail(b.value,150),g.shape="image",g.font={color:"black"}),f.isNumber(b)&&(g.value=b.value,g.title+="
 
value:"+b.value,g.shape="dot",g.font={color:"black"}),"rgb"===d&&f.isColor(b)&&(g.color=f.getColorForHtml(b),"dot"!==g.shape&&"image"!==g.shape)){var
 
m=f.calculateLuminance(b.value)<=.5?"#FFF":"#000";g.font={color:m}}}}),{nodes:new
 b.DataSet(d.compact(a)),edges:new 
b.DataSet(d.compact(c))}},e.prototype.visit=function(a){return!this._getFormatter().isEntity(a)||(this._drawable=!0,!1)},e}(jQuery,vis,window,_);var
 
wikibase=wikibase||{};wikibase.queryService=wikibase.queryService||{},wikibase.queryService.ui=wikibase.queryService.ui||{},wikibase.queryService.ui.resultBrowser=wikibase.queryService.ui.resultBrowser||{},wikibase.queryService.ui.resultBrowser.GraphResultBrowserNodeBrowser=function(a,b,c,d){"use
 strict";function e(a,b){this._nodes=a,this._edges=b,this._sparql=new 
wikibase.queryService.api.Sparql}var f='SELECT ?p (SAMPLE(?pl) AS ?pl) 
(COUNT(?o) AS ?count ) WHERE {<{entityUri}> ?p ?o .   ?o 
<http://www.w3.org/2000/01/rdf-schema#label> ?ol .    FILTER ( LANG(?ol) = "en" 
)    ?s <http://wikiba.se/ontology#directClaim> ?p .    ?s rdfs:label ?pl .    
FILTER ( LANG(?pl) = "en" )} group by ?p',g='SELECT ?o ?ol WHERE {<{entityUri}> 
<{propertyUri}> ?o .?o <http://www.w3.org/2000/01/rdf-schema#label> ?ol .FILTER 
( LANG(?ol) = "en" )} LIMIT 50';return 
e.prototype._nodes=null,e.prototype._nodes=null,e.prototype._sparql=null,e.prototype._selectedNodeId=null,e.prototype._temporaryNodes={},e.prototype._temporaryEdges={},e.prototype._getEntites=function(b,c){var
 d=this,e=a.Deferred();return 
this._sparql.query(g.replace("{entityUri}",b).replace("{propertyUri}",c)).done(function(){var
 
b=d._sparql.getResultRawData(),c=[];a.each(b.results.bindings,function(a,b){c.push({id:b.o.value,label:b.ol.value})}),e.resolve(c)}),e},e.prototype._getProperties=function(b){var
 c=this,d=a.Deferred();return 
this._sparql.query(f.replace("{entityUri}",b)).done(function(){var 
b=c._sparql.getResultRawData(),e=[];a.each(b.results.bindings,function(a,b){e.push({id:b.p.value,label:b.pl.value,count:b.count.value})}),d.resolve(e)}),d},e.prototype._removeTemporaryNodes=function(b){var
 
c=this;a.each(this._temporaryNodes,function(a,b){c._nodes.remove(b.id)}),a.each(this._temporaryEdges,function(a,b){c._edges.remove(b.id)}),this._temporaryNodes={},this._temporaryEdges={}},e.prototype._expandPropertyNode=function(b){var
 
c=this,d=this._temporaryNodes[b];this._getEntites(d.entityId,d.id).done(function(b){a.each(b,function(a,b){null===c._nodes.get(b.id)&&c._nodes.add({id:b.id,label:b.label}),c._edges.add({dashes:!0,from:d.entityId,to:b.id,label:d.propertyLabel,linkType:d.id})})})},e.prototype._expandEntityNode=function(b){var
 
c=this;this._getProperties(b).done(function(d){a.each(d,function(a,d){if(!(c._edges.get({filter:function(a){return
 a.linkType===d.id&&a.from===b}}).length>0)){var 
e={id:d.id,label:d.count,entityId:b,propertyLabel:d.label},f={id:d.id,dashes:!0,label:d.label,from:b,to:d.id};c._temporaryNodes[e.id]=e,c._nodes.add(e),c._temporaryEdges[f.id]=f,c._edges.add(f)}})})},e.prototype.browse=function(a){return
 null===a?void 
this._removeTemporaryNodes():this._temporaryNodes[a]?(this._expandPropertyNode(a),void
 
this._removeTemporaryNodes()):(null!==this._selectedNodeId&&a!==this._selectedNodeId&&this._removeTemporaryNodes(),this._expandEntityNode(a),void(this._selectedNodeId=a))},e}(jQuery,vis,window,_);var
 
wikibase=wikibase||{};wikibase.queryService=wikibase.queryService||{},wikibase.queryService.ui=wikibase.queryService.ui||{},wikibase.queryService.ui.resultBrowser=wikibase.queryService.ui.resultBrowser||{},wikibase.queryService.ui.resultBrowser.PolestarResultBrowser=function(a,b,c){"use
 strict";function d(){}var 
e="polestar/embed.html",f="wikidatasparql://query.wikidata.org/?query=";return 
d.prototype=new 
wikibase.queryService.ui.resultBrowser.AbstractResultBrowser,d.prototype.draw=function(c){var
 d={url:f+location.hash.substr(1),name:"Imported from Wikidata Query 
Service",_directEmbed:!0},g=a("<iframe>").attr({src:e+"#"+encodeURIComponent(JSON.stringify(d)),"class":"graph-iframe"}).height("98vh");c.append(g),b.setTimeout(function(){g.scrollIntoView()},50)},d.prototype.visit=function(a){return
 this._drawable=!0,!1},d}(jQuery,window,_);var 
wikibase=wikibase||{};wikibase.queryService=wikibase.queryService||{},wikibase.queryService.api=wikibase.queryService.api||{},wikibase.queryService.api.Sparql=function(a){"use
 strict";function b(a){this._serviceUri=a||c}var 
c="https://query.wikidata.org/bigdata/namespace/wdq/sparql",d={TIMEOUT:10,MALFORMED:20,SERVER:30,UNKNOWN:100},e={"QueryTimeoutException:
 Query deadline is expired":d.TIMEOUT,"MalformedQueryException: 
":d.MALFORMED};return 
b.prototype.ERROR_CODES=d,b.prototype._serviceUri=null,b.prototype._executionTime=null,b.prototype._error=null,b.prototype._resultLength=null,b.prototype._rawData=null,b.prototype._queryUri=null,b.prototype.queryDataUpdatedTime=function(){var
 b=a.Deferred(),c=encodeURI("prefix schema: <http://schema.org/> SELECT * WHERE 
{<http://www.wikidata.org> schema:dateModified 
?y}"),d=this._serviceUri+"?query="+c+"&nocache="+Math.floor(Date.now()/6e4),e={headers:{Accept:"application/sparql-results+json"}};return
 a.ajax(d,e).done(function(a,c,d){if(!a.results.bindings[0])return void 
b.reject();var e=new 
Date(a.results.bindings[0][a.head.vars[0]].value),f=e.toLocaleTimeString(navigator.language,{timeZoneName:"short"})+",
 
"+e.toLocaleDateString(navigator.language,{month:"short",day:"numeric",year:"numeric"}),g=Math.round((new
 
Date-e)/1e3);b.resolve(f,g)}).fail(function(){b.reject()}),b},b.prototype.query=function(b){var
 
c=this,d=a.Deferred(),e={headers:{Accept:"application/sparql-results+json"}};return
 
this._queryUri=this._serviceUri+"?query="+encodeURIComponent(b),this._executionTime=Date.now(),a.ajax(this._queryUri,e).done(function(a,b,e){c._executionTime=Date.now()-c._executionTime,"boolean"==typeof
 
a["boolean"]?c._resultLength=1:c._resultLength=a.results.bindings.length||0,c._rawData=a,d.resolve()}).fail(function(a,b,e){c._executionTime=null,c._rawData=null,c._resultLength=null,c._generateErrorMessage(a,b,e),d.reject()}),d},b.prototype._generateErrorMessage=function(a,b,c){var
 
f={code:d.UNKNOWN,message:null,debug:a.responseText};(0===a.status||c)&&(f.code=d.SERVER,f.message=c.message);try{var
 
g=f.debug.substring(f.debug.indexOf("java.util.concurrent.ExecutionException:"));for(var
 h in 
e)g.indexOf(h)!==-1&&(f.code=e[h],f.message=null);f.code!==d.UNKNOWN&&f.code!==d.MALFORMED||(f.message=f.debug.match(/(java\.util\.concurrent\.ExecutionException\:)+(.*)(Exception\:)+(.*)/).pop().trim())}catch(i){}this._error=f},b.prototype.getExecutionTime=function(){return
 this._executionTime},b.prototype.getError=function(){return 
this._error},b.prototype.getResultLength=function(){return 
this._resultLength},b.prototype.getQueryUri=function(){return 
this._queryUri},b.prototype._processData=function(a,b,c){for(var 
d=a.results.bindings.length,e=0;e<d;e++){for(var 
f={},g=0;g<a.head.vars.length;g++)a.head.vars[g]in 
a.results.bindings[e]?f[a.head.vars[g]]=a.results.bindings[e][a.head.vars[g]]:f[a.head.vars[g]]=void
 0;c=b(f,c)}return c},b.prototype._encodeCsv=function(a){var 
b=a.replace(/"/g,'""');return/[",\n]/.test(b)&&(b='"'+b+'"'),b},b.prototype.getResultRawData=function(){return
 this._rawData},b.prototype.getResultAsCsv=function(){var 
a=this,b=a._rawData,c=b.head.vars.map(this._encodeCsv).join(",")+"\n";return 
c=this._processData(b,function(b,c){var d,e="",f=!0;for(var g in b)d=void 
0===b[g]?"":a._encodeCsv(b[g].value),f?f=!1:e+=",",e+=d;return 
e+="\n",c+e},c)},b.prototype.getResultAsJson=function(){var 
a=[],b=this._rawData;return a=this._processData(b,function(a,b){var 
c={};for(var d in a)c[d]=(a[d]||{}).value;return 
b.push(c),b},a),JSON.stringify(a)},b.prototype.getResultAsAllJson=function(){return
 JSON.stringify(this._rawData)},b.prototype._renderValueTSV=function(a){var 
b=a.value.replace(/\t/g,"");switch(a.type){case"uri":return"<"+b+">";case"bnode":return"_:"+b;case"literal":var
 c=JSON.stringify(b);return 
a["xml:lang"]?c+"@"+a["xml:lang"]:a.datatype?"http://www.w3.org/2001/XMLSchema#integer"===a.datatype||"http://www.w3.org/2001/XMLSchema#decimal"===a.datatype||"http://www.w3.org/2001/XMLSchema#double"===a.datatype?b:c+"^^<"+a.datatype+">":c}return
 b},b.prototype.getSparqlTsv=function(){var 
a=this,b=this._rawData,c=b.head.vars.map(function(a){return"?"+a}).join("\t")+"\n";return
 c=this._processData(b,function(b,c){var d,e="",f=!0;for(var g in b)d=void 
0===b[g]?"":a._renderValueTSV(b[g]),f?f=!1:e+="\t",e+=d;return 
e+="\n",c+e},c)},b.prototype.getSimpleTsv=function(){var 
a=this._rawData,b=a.head.vars.join("\t")+"\n";return 
b=this._processData(a,function(a,b){var c,d="",e=!0;for(var f in a)c=void 
0===a[f]?"":a[f].value.replace(/\t/g,""),e?e=!1:d+="\t",d+=c;return 
d+="\n",b+d},b)},b}(jQuery);var 
wikibase=wikibase||{};wikibase.queryService=wikibase.queryService||{},wikibase.queryService.api=wikibase.queryService.api||{},wikibase.queryService.api.QuerySamples=function(a){"use
 strict";function b(){}var 
c="https://www.wikidata.org/",d=c+"api/rest_v1/page/html/",e="Wikidata:SPARQL 
query service/queries/examples",f=c+"wiki/"+e;return 
b.prototype.getExamples=function(){var b=a.Deferred(),c=this;return 
a.ajax({url:d+encodeURIComponent(e)+"?redirect=false",dataType:"html"}).done(function(a){b.resolve(c._parseHTML(a))}),b},b.prototype._findPrevHeader=function(a){var
 
b=a.prop("tagName");return"H"!==b[0]&&"h"!==b[0]?null:this._findPrev(a,"h"+(b.substr(1)-1))},b.prototype._findPrev=function(a,b){var
 c=a.prev().filter(b);return 
c.length>0?c:(c=a.prevUntil(b).last().prev(),c.length>0?c:c=a.parent().prev().filter(b))},b.prototype._extractTagsFromUL=function(b){return
 b.find('a[rel="mw:WikiLink"]').map(function(){return 
a(this).text().trim()}).get()},b.prototype._parseHTML=function(b){var 
c=document.createElement("div"),d=this;c.innerHTML=b;var 
e=a(c).find("div.mw-highlight").map(function(){var 
b=a(this),c=b.attr("data-mw");if(c){var 
e,g=JSON.parse(c);if(g.parts&&"./Template:SPARQL"===g.parts[0].template.target.href)e=g.parts[0].template.params.query.wt;else{if(!g.body)return
 null;e=g.body.extsrc}e=e.replace(/\{\{!}}/g,"|");var 
h=d._findPrev(b,"h2,h3,h4,h5,h6,h7");if(!h||!h.length)return null;var 
i=h.text().trim(),j=b.prevUntil(h).filter("ul");return{title:i,query:e,href:f+"#"+encodeURIComponent(i.replace(/
 
/g,"_")).replace(/%/g,"."),tags:d._extractTagsFromUL(j),category:d._findPrevHeader(h).text().trim()}}}).get();return
 _.flatten(_.toArray(_.groupBy(e,"category")))},b}(jQuery);var 
wikibase=wikibase||{};wikibase.queryService=wikibase.queryService||{},wikibase.queryService.api=wikibase.queryService.api||{},wikibase.queryService.api.Wikibase=function(a){"use
 strict";function b(a,b){this._endpoint=c,a&&(this._endpoint=a)}var 
c="https://www.wikidata.org/w/api.php",d="en",e={action:"wbsearchentities",format:"json",contiunue:0,language:d,uselang:d},f={action:"query",meta:"siteinfo",format:"json",siprop:"languages"};return
 
b.prototype._endpoint=null,b.prototype._language=null,b.prototype.searchEntities=function(a,b,c){var
 d=e;return 
d.search=a,b&&(d.type=b),(this._language||c)&&(d.language=c?c:this._language,d.uselang=c?c:this._language),this._query(d)},b.prototype.getLanguages=function(){return
 this._query(f)},b.prototype._query=function(b){return 
a.ajax({url:this._endpoint+"?"+jQuery.param(b),dataType:"jsonp"})},b.prototype.setLanguage=function(a){this._language=a},b}(jQuery);var
 
tracking=tracking||{};wikibase.queryService=wikibase.queryService||{},wikibase.queryService.api=wikibase.queryService.api||{},wikibase.queryService.api.Tracking=function(a){"use
 strict";function b(a){this._endpoint=c,a&&(this._endpoint=a)}var 
c="https://www.wikidata.org/beacon/statsv";return 
b.prototype._endpoint=null,b.prototype.track=function(a,b,c){if(b||(b=1),c||(c="c"),"query.wikidata.org"===location.hostname)return
 this._track(a+"="+b+c)},b.prototype._track=function(b){return 
a.ajax({url:this._endpoint+"?"+b,dataType:"jsonp"})},b}(jQuery);var 
wikibase=wikibase||{};wikibase.queryService=wikibase.queryService||{},wikibase.queryService.RdfNamespaces={},function(a,b){"use
 
strict";b.NAMESPACE_SHORTCUTS={Wikidata:{wikibase:"http://wikiba.se/ontology#",wd:"http://www.wikidata.org/entity/",wdt:"http://www.wikidata.org/prop/direct/",wds:"http://www.wikidata.org/entity/statement/",p:"http://www.wikidata.org/prop/",wdref:"http://www.wikidata.org/reference/",wdv:"http://www.wikidata.org/value/",ps:"http://www.wikidata.org/prop/statement/",psv:"http://www.wikidata.org/prop/statement/value/",psn:"http://www.wikidata.org/prop/statement/value-normalized/",pq:"http://www.wikidata.org/prop/qualifier/",pqv:"http://www.wikidata.org/prop/qualifier/value/",pqn:"http://www.wikidata.org/prop/qualifier/value-normalized/",pr:"http://www.wikidata.org/prop/reference/",prv:"http://www.wikidata.org/prop/reference/value/",prn:"http://www.wikidata.org/prop/reference/value-normalized/",wdno:"http://www.wikidata.org/prop/novalue/",wdata:"http://www.wikidata.org/wiki/Special:EntityData/"},W3C:{rdfs:"http://www.w3.org/2000/01/rdf-schema#",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",owl:"http://www.w3.org/2002/07/owl#",skos:"http://www.w3.org/2004/02/skos/core#",xsd:"http://www.w3.org/2001/XMLSchema#",prov:"http://www.w3.org/ns/prov#"},"Social/Other":{schema:"http://schema.org/"},Blazegraph:{bd:"http://www.bigdata.com/rdf#",bds:"http://www.bigdata.com/rdf/search#",gas:"http://www.bigdata.com/rdf/gas#",hint:"http://www.bigdata.com/queryHints#"}},b.ENTITY_TYPES={"http://www.wikidata.org/prop/direct/":"property","http://www.wikidata.org/prop/":"property","http://www.wikidata.org/prop/novalue/":"property","http://www.wikidata.org/prop/statement/":"property","http://www.wikidata.org/prop/statement/value/":"property","http://www.wikidata.org/prop/statement/value-normalized/":"property","http://www.wikidata.org/prop/qualifier/":"property","http://www.wikidata.org/prop/qualifier/value/":"property","http://www.wikidata.org/prop/qualifier/value-normalized/":"property","http://www.wikidata.org/prop/reference/":"property","http://www.wikidata.org/prop/reference/value/":"property","http://www.wikidata.org/prop/reference/value-normalized/":"property","http://www.wikidata.org/wiki/Special:EntityData/":"item";,
+"http://www.wikidata.org/entity/":"item"},b.ALL_PREFIXES=a.map(b.NAMESPACE_SHORTCUTS,function(a){return
 a}).reduce(function(b,c,d){return 
a.extend(b,c)},{}),b.STANDARD_PREFIXES={wd:"PREFIX wd: 
<http://www.wikidata.org/entity/>",wdt:"PREFIX wdt: 
<http://www.wikidata.org/prop/direct/>",wikibase:"PREFIX wikibase: 
<http://wikiba.se/ontology#>",p:"PREFIX p: 
<http://www.wikidata.org/prop/>",ps:"PREFIX ps: 
<http://www.wikidata.org/prop/statement/>",pq:"PREFIX pq: 
<http://www.wikidata.org/prop/qualifier/>",rdfs:"PREFIX rdfs: 
<http://www.w3.org/2000/01/rdf-schema#>",bd:"PREFIX bd: 
<http://www.bigdata.com/rdf#>"},b.getPrefixMap=function(c){var d={};return 
a.each(b.ALL_PREFIXES,function(a,b){c[b]&&(d[a]=c[b])}),d}}(jQuery,wikibase.queryService.RdfNamespaces);var
 CONFIG=function(a,b){"use strict";var 
c={language:"en",api:{sparql:{uri:"/bigdata/namespace/wdq/sparql"},wikibase:{uri:"https://www.wikidata.org/w/api.php"}},i18nLoad:function(a){var
 c=null;return 
a!==this.language&&(c=b.i18n().load("i18n/"+this.language+".json",this.language)),b.when(c,b.i18n().load("i18n/"+a+".json",a))},brand:{logo:"logo.svg",title:"Wikidata
 
Query"}},d=b.extend(!0,{},c,{api:{sparql:{uri:"https://query.wikidata.org/bigdata/namespace/wdq/sparql"}},i18nLoad:function(a){return
 
b.when(b.i18n().load("i18n/"+a+".json",a),b.i18n().load("node_modules/jquery.uls/i18n/"+a+".json",a))},brand:{title:"Localhost"}}),e=a.location.hostname.toLowerCase();return""===e||"localhost"===e||"127.0.0.1"===e?d:c}(window,jQuery);
\ No newline at end of file

-- 
To view, visit https://gerrit.wikimedia.org/r/321869
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iad2917ed1a137c617baa2eb5140891a5427d9b01
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Jonas Kress (WMDE) <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to