//>>built
require({cache:{"url:app/ui/widgets/templates/ConceptDetail.html":'\x3cdiv data-dojo-attach-point\x3d"conceptDetailNode"\x3e\n  \x3cdiv class\x3d"large-12 columns" style\x3d"margin-top: 20px; padding-bottom: 20px;"\x3e\n    \x3cdiv class\x3d"large-8 columns"\x3e\n      \x3ch1 data-dojo-attach-point\x3d"conceptTitleViewNode"\x3e\x3c/h1\x3e\n      \x3cspan class\x3d"concept-title-info" data-dojo-attach-point\x3d"idViewNode"\x3e\x3c/span\x3e\n      \x3cspan class\x3d"concept-title-info" data-dojo-attach-point\x3d"typeViewNode"\x3e\x3c/span\x3e\n      \x3cspan class\x3d"concept-title-info" data-dojo-attach-point\x3d"uriViewNode"\x3e\x3c/span\x3e\n    \x3c/div\x3e\n    \x3cdiv class\x3d"large-4 columns"\x3e\n      \x3ca href\x3d"#" class\x3d"button tiny right" data-dojo-attach-event\x3d"onClick: _deleteConcept"\x3eDELETE\x3c/a\x3e\n      \x3ca href\x3d"#" class\x3d"button tiny right" style\x3d"margin-right: 10px;" data-dojo-attach-event\x3d"onClick: _openEditDialog"\x3eEDIT\x3c/a\x3e\n      \x3cbutton href\x3d"#" class\x3d"button tiny right" style\x3d"margin-right: 10px;" data-dojo-attach-event\x3d"onClick: _openMergeDialog"\n         data-dojo-attach-point\x3d"mergeButton"\x3eMERGE\x3c/button\x3e\n    \x3c/div\x3e\n  \x3c/div\x3e\n  \x3chr class\x3d"concept-hr"\x3e\n  \x3cdiv class\x3d"large-12 columns label-relation-block"\x3e\n    \x3cdiv class\x3d"large-6 columns"\x3e\n      \x3ch4 class\x3d"no-top-padding"\x3eLabels\x3c/h4\x3e\n      \x3cdl class\x3d"dllist"\x3e\n        \x3cdt\x3ePreferred labels\x3c/dt\x3e\x3cdd data-dojo-attach-point\x3d"preferredLabelsNode"\x3e\x3c/dd\x3e\n        \x3cdt\x3eAlternate labels\x3c/dt\x3e\x3cdd data-dojo-attach-point\x3d"alternateLabelsNode"\x3e\x3c/dd\x3e\n        \x3cdt\x3eHidden labels\x3c/dt\x3e\x3cdd data-dojo-attach-point\x3d"hiddenLabelsNode"\x3e\x3c/dd\x3e\n        \x3cdt\x3eSort labels\x3c/dt\x3e\x3cdd data-dojo-attach-point\x3d"sortLabelsNode"\x3e\x3c/dd\x3e\n      \x3c/dl\x3e\n    \x3c/div\x3e\n    \x3cdiv class\x3d"large-6 columns"\x3e\n      \x3ch4 class\x3d"no-top-padding"\x3eRelations\x3c/h4\x3e\n      \x3cdl class\x3d"dllist" data-dojo-attach-point\x3d"relationsListNode"\x3e\n      \x3c/dl\x3e\n      \x3ch4 class\x3d"no-top-padding"\x3eMatches\x3c/h4\x3e\n      \x3cdl class\x3d"dllist" data-dojo-attach-point\x3d"matchesListNode"\x3e\n      \x3c/dl\x3e\n    \x3c/div\x3e\n  \x3c/div\x3e\n  \x3chr class\x3d"concept-hr"\x3e\n  \x3cdiv class\x3d"large-12 columns"\x3e\n    \x3cdiv class\x3d"large-12 columns"\x3e\n      \x3cul class\x3d"scopeNote" data-dojo-attach-point\x3d"scopeNoteNode"\x3e\n        \x3ch3\x3enotes\x3c/h3\x3e\n      \x3c/ul\x3e\n    \x3c/div\x3e\n    \x3cdiv class\x3d"large-12 columns"\x3e\n      \x3cul class\x3d"scopeNote" data-dojo-attach-point\x3d"sourcesNode"\x3e\n        \x3ch3\x3esources\x3c/h3\x3e\n      \x3c/ul\x3e\n    \x3c/div\x3e\n  \x3c/div\x3e\n\x3c/div\x3e'}});
define("app/ui/widgets/ConceptDetail","dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/promise/all dojo/dom-construct dojo/dom-class dojo/dom-style dojo/dom-attr dojo/json dojo/query dojo/on dojo/dom dijit/_WidgetBase dijit/_TemplatedMixin dojo/text!./templates/ConceptDetail.html ../dialogs/ConceptEditDialog dojo/NodeList-traverse".split(" "),function(x,d,e,y,c,z,E,v,F,A,G,w,B,C,D,H){return x([B,C],{templateString:D,baseClass:"concept-detail",concept:null,conceptId:null,conceptLabel:null,
scheme:null,languageController:null,listController:null,conceptSchemeController:null,_editDialog:null,postCreate:function(){this.inherited(arguments);v.set(this.mergeButton,"disabled",!0)},startup:function(){this.inherited(arguments);this._setData(this.concept)},_openEditDialog:function(a){a?a.preventDefault():null;this.emit("concept.edit",{concept:this.concept,schemeId:this.scheme})},_openMergeDialog:function(a){a?a.preventDefault():null;this.emit("concept.merge",{concept:this.concept,schemeId:this.scheme})},
_deleteConcept:function(a){a?a.preventDefault():null;this.emit("concept.delete",{concept:this.concept,schemeId:this.scheme})},_setData:function(a){this.conceptTitleViewNode.innerHTML="\x3cstrong\x3e"+this.scheme+" : "+a.label+"\x3c/strong\x3e";this.idViewNode.innerHTML="ID: "+a.id;this.typeViewNode.innerHTML="TYPE: "+a.type;this.uriViewNode.innerHTML="URI: ";c.create("a",{href:this.concept.uri,innerHTML:this.concept.uri,target:"_blank"},this.uriViewNode);if(a.labels&&0<a.label.length){var f="",h=
"",g="",k="";d.forEach(a.labels,e.hitch(this,function(a){"prefLabel"===a.type&&(f+=a.label+" ("+a.language+"), ");"altLabel"===a.type&&(h+=a.label+" ("+a.language+"), ");"hiddenLabel"===a.type&&(g+=a.label+" ("+a.language+"), ");"sortLabel"===a.type&&(k+=a.label+" ("+a.language+"), ")}));2<h.length&&(h=h.substring(0,h.length-2));2<f.length&&(f=f.substring(0,f.length-2));2<g.length&&(g=g.substring(0,g.length-2));2<k.length&&(k=k.substring(0,k.length-2));this.preferredLabelsNode.innerHTML=f;this.alternateLabelsNode.innerHTML=
h;this.hiddenLabelsNode.innerHTML=g;this.sortLabelsNode.innerHTML=k}if(a.narrower&&0<a.narrower.length){var b=c.create("dt",{innerHTML:"Narrower"},this.relationsListNode,"first"),m="";d.forEach(a.narrower,e.hitch(this,function(a){m+='\x3ca href\x3d"'+a.uri+'" target\x3d"_blank" \x3e'+a.label+"\x3c/a\x3e ("+a.id+"), "}));2<m.length&&(m=m.substring(0,m.length-2));c.create("dd",{innerHTML:m},b)}if(a.broader&&0<a.broader.length){var b=c.create("dt",{innerHTML:"Broader"},this.relationsListNode,"last"),
n="";d.forEach(a.broader,e.hitch(this,function(a){n+='\x3ca href\x3d"'+a.uri+'" target\x3d"_blank" \x3e'+a.label+"\x3c/a\x3e ("+a.id+"), "}));2<n.length&&(n=n.substring(0,n.length-2));c.create("dd",{innerHTML:n},b)}if(a.related&&0<a.related.length){var b=c.create("dt",{innerHTML:"Related"},this.relationsListNode,"last"),p="";d.forEach(a.related,e.hitch(this,function(a){p+='\x3ca href\x3d"'+a.uri+'" target\x3d"_blank" \x3e'+a.label+"\x3c/a\x3e ("+a.id+"), "}));2<p.length&&(p=p.substring(0,p.length-
2));c.create("dd",{innerHTML:p},b)}if(a.member_of&&0<a.member_of.length){var b=c.create("dt",{innerHTML:"Member of"},this.relationsListNode,"last"),q="";d.forEach(a.member_of,e.hitch(this,function(a){q+='\x3ca href\x3d"'+a.uri+'" target\x3d"_blank" \x3e'+a.label+"\x3c/a\x3e ("+a.id+"), "}));2<q.length&&(q=q.substring(0,q.length-2));c.create("dd",{innerHTML:q},b)}if(a.members&&0<a.members.length){var b=c.create("dt",{innerHTML:"Members"},this.relationsListNode,"last"),r="";d.forEach(a.members,e.hitch(this,
function(a){r+='\x3ca href\x3d"'+a.uri+'" target\x3d"_blank" \x3e'+a.label+"\x3c/a\x3e ("+a.id+"), "}));2<r.length&&(r=r.substring(0,r.length-2));c.create("dd",{innerHTML:r},b)}if(a.subordinate_arrays&&0<a.subordinate_arrays.length){var b=c.create("dt",{innerHTML:"Subordinate \x3cbr\x3earrays"},this.relationsListNode,"last"),t="";d.forEach(a.subordinate_arrays,e.hitch(this,function(a){t+='\x3ca href\x3d"'+a.uri+'" target\x3d"_blank" \x3e'+a.label+"\x3c/a\x3e ("+a.id+"), "}));2<t.length&&(t=t.substring(0,
t.length-2));c.create("dd",{innerHTML:t},b)}if(a.superordinates&&0<a.superordinates.length){var b=c.create("dt",{innerHTML:"Superordinates"},this.relationsListNode,"last"),l="";d.forEach(a.superordinates,e.hitch(this,function(a){l+='\x3ca href\x3d"'+a.uri+'" target\x3d"_blank" \x3e'+a.label+"\x3c/a\x3e ("+a.id+"), "}));2<l.length&&(l=l.substring(0,l.length-2));c.create("dd",{innerHTML:l},b)}"collection"===a.type&&(b=c.create("dt",{innerHTML:'Inheritance \x3ci class\x3d"fa fa-info-circle"\x3e',title:"Should member concepts of this collection be seen as narrower concept of a superordinate of the collection"},
this.relationsListNode,"last"),l='\x3ci class\x3d"fa '+(!0===a.infer_concept_relations?"fa-check":"fa-times")+'" title\x3d"'+(!0===a.infer_concept_relations?"yes":"no")+'"\x3e',c.create("dd",{innerHTML:l},b));if(a.matches){var b=a.matches,u=!1;b.broad&&0<b.broad.length&&(this._loadMatches(b.broad,"broad"),u=!0);b.narrow&&0<b.narrow.length&&(this._loadMatches(b.narrow,"narrow"),u=!0);b.exact&&0<b.exact.length&&(this._loadMatches(b.exact,"exact"),u=!0);b.close&&0<b.close.length&&(this._loadMatches(b.close,
"close"),u=!0);b.related&&0<b.related.length&&(this._loadMatches(b.related,"related"),u=!0);u&&v.set(this.mergeButton,"disabled",!1)}a.notes&&0<a.notes.length?d.forEach(a.notes,e.hitch(this,function(a){c.create("li",{lang:a.language,innerHTML:"\x3cstrong\x3e"+this._capitalize(a.type)+"\x3c/strong\x3e \x3cem\x3e("+a.language+")\x3c/em\x3e: "+a.note},this.scopeNoteNode,"last")})):c.destroy(this.scopeNoteNode);a.sources&&0<a.sources.length?d.forEach(a.sources,e.hitch(this,function(a){c.create("li",{innerHTML:a.citation},
this.sourcesNode,"last")})):c.destroy(this.sourcesNode)},_capitalize:function(a){return a[0].toUpperCase()+a.substr(1)},_loadMatches:function(a,f){var h=c.create("dt",{innerHTML:this.capitalize(f),id:f},this.matchesListNode,"last"),g=[],k=c.create("dd",{innerHTML:""},h);d.forEach(a,function(b,d){c.create("span",{id:b,innerHTML:b+'\x26nbsp;\x3ci class\x3d"fa fa-spinner fa-pulse"\x3e\x3c/i\x3e\x26nbsp;'},k);g.push(this.conceptSchemeController.getMatch(b,f).then(e.hitch(this,function(b){var c=w.byId(b.data.uri);
c.innerHTML='\x3ca href\x3d"'+b.data.uri+'" target\x3d"_blank" \x3e'+b.data.label+"\x3c/a\x3e"+(d===a.length-1?"":", ");z.set(c,"matched")}),function(a){}))},this);y(g).then(function(a){A("span:not(.matched)",w.byId(f)).forEach(function(a){c.destroy(a)})})},capitalize:function(a){return a.charAt(0).toUpperCase()+a.slice(1)}})});
//# sourceMappingURL=ConceptDetail.js.map