-
Notifications
You must be signed in to change notification settings - Fork 0
/
js3.min.js
1 lines (1 loc) · 19 KB
/
js3.min.js
1
var curiemap=(function(b){function a(d){var c={};Object.keys(d).forEach(function(e){c[d[e]]=e});return c}return Object.defineProperties(b,{resolve:{writable:false,configurable:false,enumerable:false,value:function(e){var c=e.indexOf(":");if(c<0||e.indexOf("//")>=0){return e}var d=e.slice(0,c).toLowerCase();if(!this[d]){return e}return this[d].concat(e.slice(++c))}},setDefault:{writable:false,configurable:false,enumerable:false,value:function(c){this[""]=c;return this}},getPrefix:{writable:false,configurable:false,enumerable:false,value:function(c){return a(this)[c]}},shrink:{writable:false,configurable:false,enumerable:false,value:function(c){for(pref in this){if(c.substr(0,this[pref].length)==this[pref]){return pref+":"+c.slice(this[pref].length)}}return c}},})})({owl:"http://www.w3.org/2002/07/owl#",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",rdfa:"http://www.w3.org/ns/rdfa#",xhv:"http://www.w3.org/1999/xhtml/vocab#",xml:"http://www.w3.org/XML/1998/namespace",xsd:"http://www.w3.org/2001/XMLSchema#",grddl:"http://www.w3.org/2003/g/data-view#",powder:"http://www.w3.org/2007/05/powder#",powders:"http://www.w3.org/2007/05/powder-s#",rif:"http://www.w3.org/2007/rif#",atom:"http://www.w3.org/2005/Atom/",xhtml:"http://www.w3.org/1999/xhtml#",formats:"http://www.w3.org/ns/formats/",xforms:"http://www.w3.org/2002/xforms/",xhtmlvocab:"http://www.w3.org/1999/xhtml/vocab/",xpathfn:"http://www.w3.org/2005/xpath-functions#",http:"http://www.w3.org/2006/http#",link:"http://www.w3.org/2006/link#",time:"http://www.w3.org/2006/time#",acl:"http://www.w3.org/ns/auth/acl#",cert:"http://www.w3.org/ns/auth/cert#",rsa:"http://www.w3.org/ns/auth/rsa#",crypto:"http://www.w3.org/2000/10/swap/crypto#",list:"http://www.w3.org/2000/10/swap/list#",log:"http://www.w3.org/2000/10/swap/log#",math:"http://www.w3.org/2000/10/swap/math#",os:"http://www.w3.org/2000/10/swap/os#",string:"http://www.w3.org/2000/10/swap/string#",doc:"http://www.w3.org/2000/10/swap/pim/doc#",contact:"http://www.w3.org/2000/10/swap/pim/contact#",p3p:"http://www.w3.org/2002/01/p3prdfv1#",swrl:"http://www.w3.org/2003/11/swrl#",swrlb:"http://www.w3.org/2003/11/swrlb#",exif:"http://www.w3.org/2003/12/exif/ns#",earl:"http://www.w3.org/ns/earl#",ma:"http://www.w3.org/ns/ma-ont#",sawsdl:"http://www.w3.org/ns/sawsdl#",sd:"http://www.w3.org/ns/sparql-service-description#",skos:"http://www.w3.org/2004/02/skos/core#",fresnel:"http://www.w3.org/2004/09/fresnel#",gen:"http://www.w3.org/2006/gen/ont#",timezone:"http://www.w3.org/2006/timezone#",skosxl:"http://www.w3.org/2008/05/skos-xl#",org:"http://www.w3.org/ns/org#",ical:"http://www.w3.org/2002/12/cal/ical#",wgs84:"http://www.w3.org/2003/01/geo/wgs84_pos#",vcard:"http://www.w3.org/2006/vcard/ns#",turtle:"http://www.w3.org/2008/turtle#",pointers:"http://www.w3.org/2009/pointers#",dcat:"http://www.w3.org/ns/dcat#",imreg:"http://www.w3.org/2004/02/image-regions#",rdfg:"http://www.w3.org/2004/03/trix/rdfg-1/",swp:"http://www.w3.org/2004/03/trix/swp-2/",rei:"http://www.w3.org/2004/06/rei#",wairole:"http://www.w3.org/2005/01/wai-rdf/GUIRoleTaxonomy#",states:"http://www.w3.org/2005/07/aaa#",wn20schema:"http://www.w3.org/2006/03/wn/wn20/schema/",httph:"http://www.w3.org/2007/ont/httph#",act:"http://www.w3.org/2007/rif-builtin-action#",common:"http://www.w3.org/2007/uwa/context/common.owl#",dcn:"http://www.w3.org/2007/uwa/context/deliverycontext.owl#",hard:"http://www.w3.org/2007/uwa/context/hardware.owl#",java:"http://www.w3.org/2007/uwa/context/java.owl#",loc:"http://www.w3.org/2007/uwa/context/location.owl#",net:"http://www.w3.org/2007/uwa/context/network.owl#",push:"http://www.w3.org/2007/uwa/context/push.owl#",soft:"http://www.w3.org/2007/uwa/context/software.owl#",web:"http://www.w3.org/2007/uwa/context/web.owl#",content:"http://www.w3.org/2008/content#",vs:"http://www.w3.org/2003/06/sw-vocab-status/ns#",air:"http://dig.csail.mit.edu/TAMI/2007/amord/air#",ex:"http://example.org/",dc:"http://purl.org/dc/terms/",dc11:"http://purl.org/dc/elements/1.1/",dctype:"http://purl.org/dc/dcmitype/",foaf:"http://xmlns.com/foaf/0.1/",cc:"http://creativecommons.org/ns#",opensearch:"http://a9.com/-/spec/opensearch/1.1/","void":"http://rdfs.org/ns/void#",sioc:"http://rdfs.org/sioc/ns#",sioca:"http://rdfs.org/sioc/actions#",sioct:"http://rdfs.org/sioc/types#",lgd:"http://linkedgeodata.org/vocabulary#",moat:"http://moat-project.org/ns#",days:"http://ontologi.es/days#",giving:"http://ontologi.es/giving#",lang:"http://ontologi.es/lang/core#",like:"http://ontologi.es/like#",status:"http://ontologi.es/status#",og:"http://opengraphprotocol.org/schema/",protege:"http://protege.stanford.edu/system#",dady:"http://purl.org/NET/dady#",uri:"http://purl.org/NET/uri#",audio:"http://purl.org/media/audio#",video:"http://purl.org/media/video#",gridworks:"http://purl.org/net/opmv/types/gridworks#",hcterms:"http://purl.org/uF/hCard/terms/",bio:"http://purl.org/vocab/bio/0.1/",cs:"http://purl.org/vocab/changeset/schema#",geographis:"http://telegraphis.net/ontology/geography/geography#",doap:"http://usefulinc.com/ns/doap#",daml:"http://www.daml.org/2001/03/daml+oil#",geonames:"http://www.geonames.org/ontology#",sesame:"http://www.openrdf.org/schema/sesame#",cv:"http://rdfs.org/resume-rdf/",wot:"http://xmlns.com/wot/0.1/",media:"http://purl.org/microformat/hmedia/",ctag:"http://commontag.org/ns#"});var propertymap=(function(a){return Object.defineProperties(a,{resolve:{writable:false,configurable:false,enumerable:false,value:function(c,b){c=c.toString();b=Array.isArray(b)&&b.length>0?b.concat(Object.keys(this)):Object.keys(this);for(i in b){if(this[b[i]].indexOf(c)>=0){return b[i]+":"+c}}return c}},ambiguities:{writable:false,configurable:false,enumerable:false,value:function(){var c=this,d={},b=[];Object.keys(this).forEach(function(e){c[e].forEach(function(f){if(!d[f]){d[f]=[e+":"+f]}else{d[f].push(e+":"+f)}})});Object.keys(d).forEach(function(e){if(d[e].length>1){b=b.concat(d[e])}});return b}}})})({owl:["allValuesFrom","annotatedProperty","annotatedSource","annotatedTarget","assertionProperty","backwardCompatibleWith","bottomDataProperty","bottomObjectProperty","cardinality","complementOf","datatypeComplementOf","deprecated","differentFrom","disjointUnionOf","disjointWith","distinctMembers","equivalentClass","equivalentProperty","hasKey","hasSelf","hasValue","imports","incompatibleWith","intersectionOf","inverseOf","maxCardinality","maxQualifiedCardinality","members","minCardinality","minQualifiedCardinality","onClass","onDataRange","onDatatype","oneOf","onProperties","onProperty","priorVersion","propertyChainAxiom","propertyDisjointWith","qualifiedCardinality","sameAs","someValuesFrom","sourceIndividual","targetIndividual","targetValue","topDataProperty","topObjectProperty","unionOf","versionInfo","versionIRI","withRestrictions"],rdf:["type","subject","predicate","object","value","first","rest"],rdfs:["subClassOf","subPropertyOf","comment","label","domain","range","seeAlso","isDefinedBy","member"],grddl:["namespaceTransformation","transformation","transformationProperty","result","profileTransformation"],wdrs:["text","issuedby","matchesregex","notmatchesregex","hasIRI","tag","notknownto","describedby","authenticate","validfrom","validuntil","logo","sha1sum","certified","certifiedby","supportedby","data_error","proc_error","error_code"],dc:["title","creator","subject","description","publisher","contributor","date","type","format","identifier","source","language","relation","coverage","rights","audience","alternative","tableOfContents","abstract","created","valid","available","issued","modified","extent","medium","isVersionOf","hasVersion","isReplacedBy","replaces","isRequiredBy","requires","isPartOf","hasPart","isReferencedBy","references","isFormatOf","hasFormat","conformsTo","spatial","temporal","mediator","dateAccepted","dateCopyrighted","dateSubmitted","educationLevel","accessRights","bibliographicCitation","license","rightsHolder","provenance","instructionalMethod","accrualMethod","accrualPeriodicity","accrualPolicy"],dc11:["title","creator","subject","description","publisher","contributor","date","type","format","identifier","source","language","relation","coverage","rights"],foaf:["mbox","mbox_sha1sum","gender","geekcode","dnaChecksum","sha1","based_near","title","nick","jabberID","aimChatID","skypeID","icqChatID","yahooChatID","msnChatID","name","firstName","lastName","givenName","givenname","surname","family_name","familyName","phone","homepage","weblog","openid","tipjar","plan","made","maker","img","depiction","depicts","thumbnail","myersBriggs","workplaceHomepage","workInfoHomepage","schoolHomepage","knows","interest","topic_interest","publications","currentProject","pastProject","fundedBy","logo","topic","primaryTopic","focus","isPrimaryTopicOf","page","theme","account","holdsAccount","accountServiceHomepage","accountName","member","membershipClass","birthday","age","status"],cc:["requires","prohibits","jurisdiction","useGuidelines","deprecatedOn","attributionName","license","attributionURL","morePermissions","permits","legalcode"],"void":["statItem","feature","subset","target","sparqlEndpoint","linkPredicate","exampleResource","vocabulary","subjectsTarget","objectsTarget","dataDump","uriLookupEndpoint","uriRegexPattern"],sioc:["about","account_of","addressed_to","administrator_of","attachment","avatar","container_of","content","creator_of","earlier_version","email","email_sha1","embeds_knowledge","feed","follows","function_of","has_administrator","has_container","has_creator","has_discussion","has_function","has_host","has_member","has_moderator","has_modifier","has_owner","has_parent","has_reply","has_scope","has_space","has_subscriber","has_usergroup","host_of","id","ip_address","last_activity_date","last_item_date","last_reply_date","later_version","latest_version","link","links_to","member_of","moderator_of","modifier_of","name","next_by_date","next_version","note","num_authors","num_items","num_replies","num_threads","num_views","owner_of","parent_of","previous_by_date","previous_version","related_to","reply_of","scope_of","sibling","space_of","subscriber_of","topic","usergroup_of"],sioca:["byproduct","creates","deletes","modifies","object","product","source","uses"],link:["listDocumentProperty","uri"],acl:["accessControl","accessTo","accessToClass","agent","agentClass","defaultForNew","mode"],skos:["inScheme","hasTopConcept","topConceptOf","prefLabel","altLabel","hiddenLabel","notation","note","changeNote","definition","editorialNote","example","historyNote","scopeNote","semanticRelation","broader","narrower","related","broaderTransitive","narrowerTransitive","member","memberList","mappingRelation","broadMatch","narrowMatch","relatedMatch","exactMatch","closeMatch"],wgs84:["lat","location","long","alt","lat_long"],org:["subOrganizationOf","transitiveSubOrganizationOf","hasSubOrganization ","purpose","hasUnit","unitOf","classification","identifier","linkedTo","memberOf","hasMember","reportsTo","member","organization","role","hasMembership","memberDuring","roleProperty","headOf","remuneration","siteAddress","hasSite","siteOf","hasPrimarySite","hasRegisteredSite","basedAt ","location","originalOrganization","changedBy","resultedFrom","resultingOrganization"],});js3=(function(f,j,h){var d=0;function l(m){return{writable:false,configurable:false,enumerable:false,value:m}}function e(m){return m<10?"0"+m:m}function b(n,m){if(n=="a"){return"rdf:type"}n=n.replace("$",":");if(n.indexOf(":")==-1){n=j.resolve(n,m)}return n}if(!h){h={};h.RDFTriple=function(m,n,q){this.subject=m;this.property=n;this.object=q};h.RDFTriple.prototype={object:null,property:null,subject:null,toString:function(){return this.subject.toNT()+" "+this.property.toNT()+" "+this.object.toNT()+" ."},equals:function(m){return this.subject.equals(m.subject)&&this.property.equals(m.property)&&this.object.equals(m.object)}};h.Graph=function(m){this.length=0;this.graph=[];this.index={};if(Array.isArray(m)){this.importArray(m)}};h.Graph.prototype={length:null,graph:null,importArray:function(m){while(m.length>0){this.add(m.pop())}},get:function(m){return this.graph[m]},add:function(m){if(!this.index[m.subject.value]){this.index[m.subject.value]={}}if(!this.index[m.subject.value][m.property.value]){this.index[m.subject.value][m.property.value]=[]}if(this.index[m.subject.value][m.property.value].some(function(n){return n.equals(m.object)})){return}this.length++;this.index[m.subject.value][m.property.value].push(m.object);this.graph.push(m)},merge:function(n){var o=0,p=n.length;while(o<p){var m=o++;this.add(n.get(m))}},every:function(m){return this.graph.every(m)},some:function(m){return this.graph.some(m)},forEach:function(m){this.graph.forEach(m)},filter:function(m){return new h.Graph(this.graph.filter(m))},apply:function(m){this.graph=this.graph.filter(m);this.length=this.graph.length},toArray:function(){return this.graph.slice()}}}function k(v){var o="";var u=false;var r=0,q=v.length;while(r<q){var p=r++;if(!u){var m=v.charCodeAt(p);if(55296<=m&&m<=56319){var t=v.charCodeAt(p+1);m=(m-55296)*1024+(t-56320)+65536;u=true}if(m>1114111){throw new Error("Char out of range")}var n="00000000".concat((new Number(m)).toString(16).toUpperCase());if(m>=65536){o+="\\U"+n.slice(-8)}else{if(m>=127||m<=31){switch(m){case 9:o+="\\t";break;case 10:o+="\\n";break;case 13:o+="\\r";break;default:o+="\\u"+n.slice(-4);break}}else{switch(m){case 34:o+='\\"';break;case 92:o+="\\\\";break;default:o+=v.charAt(p);break}}}}else{u=!u}}return o}Object.defineProperties(Object.prototype,{equals:l(function(m){if(this.nodeType()!=m.nodeType()){return false}switch(this.nodeType()){case"IRI":case"BlankNode":return this==m;case"PlainLiteral":if((this.language&&!m.language)||(!this.language&&m.language)){return false}if(this.language&&m.language){return this.language==m.language&&this==m}return this==m;case"TypedLiteral":return this.type.equals(m.type)&&this==m}return this.n3()==m.n3()}),ref:l(function(m){Object.defineProperties(this,{id:l(m?m.resolve():"_:b"+(++d)),n3:l(function(n){var q=[],r=this,p=r.aliasmap||n;Object.keys(this).forEach(function(o){if(typeof r[o]=="function"){return}if(r[o].id&&r[o].id.nodeType()=="IRI"){return q.push(b(o,p)+" "+r[o].id.n3())}if(!r[o].nodeType&&!r[o].id){r[o].ref()}q.push(b(o,p)+" "+r[o].n3(p))});q=q.join(";\n ");return m?this.id.n3()+" "+q+" .":"[ "+q+" ]"}),toNT:l(function(n){return this.graphify(n).toArray().join("\n")}),graphify:l(function(n){var q=new h.Graph,s=this,r=s.aliasmap||n;function p(t,v,u){if(typeof u=="function"){return}if(!u.nodeType&&!u.id){u.ref()}if(u.id){q.add(new h.RDFTriple(t,b(v,r),u.id));q.merge(u.graphify())}else{if(!Array.isArray(u)){q.add(new h.RDFTriple(t,b(v,r),u))}else{if(Array.isArray(u)){if(!u.list){u.forEach(function(w){p(t,v,w)})}else{if(u.length==0){q.add(new h.RDFTriple(t,b(v,r),"rdf:nil".resolve()))}else{var o={}.ref();q.add(new h.RDFTriple(t,b(v,r),o.id));u.forEach(function(y,w){p(o.id,"rdf:first".resolve(),y);var z={}.ref();q.add(new h.RDFTriple(o.id,"rdf:rest".resolve(),(w==u.length-1)?"rdf:nil".resolve():z.id));o=z})}}}}}}Object.keys(this).forEach(function(o){p(s.id,o,s[o])});return q}),using:l(function(){Object.defineProperty(this,"aliasmap",l(Array.prototype.slice.call(arguments)));return this})});return this}),});Object.defineProperties(String.prototype,{tl:l(function(m){Object.defineProperty(this,"type",l(m.resolve()));Object.defineProperty(this,"language",l(null));return this}),l:l(function(m){Object.defineProperty(this,"type",l(null));Object.defineProperty(this,"language",l(m));return this}),resolve:l(function(){return f.resolve(this)}),value:l(function(){return this}),nodeType:l(function(){if(this.type){return"TypedLiteral"}if(this.language||this.indexOf(" ")>=0||this.indexOf(":")==-1){return"PlainLiteral"}if(this.substr(0,2)=="_:"){return"BlankNode"}return"IRI"}),n3:l(function(){switch(this.nodeType()){case"PlainLiteral":return('"'+k(this)+'"'+(this.language?"@"+this.language:"")).toString();case"IRI":return(this.resolve()==this)?"<"+k(this.resolve())+">":this.toString();case"BlankNode":return this.toString();case"TypedLiteral":if(this.type.resolve()=="rdf:PlainLiteral".resolve()){return'"'+k(this)+'"'}return'"'+k(this)+'"^^'+this.type.n3()}}),toNT:l(function(){switch(this.nodeType()){case"PlainLiteral":return('"'+k(this)+'"'+(this.language?"@"+this.language:"")).toString();case"IRI":return"<"+k(this.resolve())+">";case"BlankNode":return this.toString();case"TypedLiteral":if(this.type.resolve()=="rdf:PlainLiteral".resolve()){return'"'+k(this)+'"'}return'"'+k(this)+'"^^'+this.type.n3()}}),toCanonical:l(function(){return this.n3()})});Object.defineProperties(Array.prototype,{list:l(false),toList:l(function(){this.list=true;return this}),nodeType:l("Collection"),n3:l(function(m){var n=[];this.forEach(function(o){if(typeof o=="function"){return}if(o.id&&o.id.nodeType()=="IRI"){return n.push(o.id.n3())}if(!o.nodeType){o.ref()}n.push(o.n3(m))});return this.list?"( "+n.join(" ")+" )":n.join(", ")})});Object.defineProperties(Boolean.prototype,{type:l("xsd:boolean".resolve()),value:l(function(){return this}),nodeType:l(function(){return"TypedLiteral"}),n3:l(function(){return this.valueOf()}),toNT:l(function(){return'"'+this.valueOf()+'"^^<'+this.type+">"}),toCanonical:l(function(){return this.toNT()})});Object.defineProperties(Date.prototype,{type:l("xsd:dateTime".resolve()),value:l(function(){return this}),nodeType:l(function(){return"TypedLiteral"}),n3:l(function(){return'"'+this.getUTCFullYear()+"-"+e(this.getUTCMonth()+1)+"-"+e(this.getUTCDate())+"T"+e(this.getUTCHours())+":"+e(this.getUTCMinutes())+":"+e(this.getUTCSeconds())+'Z"^^<'+this.type+">"}),toNT:l(function(){return this.n3()}),toCanonical:l(function(){return this.n3()})});var c=new RegExp("^(-|\\+)?[0-9]+$","");var g=new RegExp("^(-|\\+)?(([0-9]+\\.[0-9]*[eE]{1}(-|\\+)?[0-9]+)|(\\.[0-9]+[eE]{1}(-|\\+)?[0-9]+)|([0-9]+[eE]{1}(-|\\+)?[0-9]+))$","");var a=new RegExp("^(-|\\+)?[0-9]*\\.[0-9]+?$","");Object.defineProperties(Number.prototype,{type:{configurable:false,enumerable:false,get:function(){if(this==Number.POSITIVE_INFINITY){return"xsd:double".resolve()}if(this==Number.NEGATIVE_INFINITY){return"xsd:double".resolve()}if(this==Number.NaN){return"xsd:double".resolve()}var m=this.toString();if(c.test(m)){return"xsd:integer".resolve()}if(a.test(m)){return"xsd:decimal".resolve()}if(g.test(m)){return"xsd:double".resolve()}}},value:l(function(){return this}),nodeType:l(function(){return"TypedLiteral"}),n3:l(function(){if(this==Number.POSITIVE_INFINITY){return'"INF"^^<'+"xsd:double".resolve()+">"}if(this==Number.NEGATIVE_INFINITY){return'"-INF"^^<'+"xsd:double".resolve()+">"}if(this==Number.NaN){return'"NaN"^^<'+"xsd:double".resolve()+">"}return this.toString()}),toNT:l(function(){if(this==Number.POSITIVE_INFINITY){return'"INF"^^<'+"xsd:double".resolve()+">"}if(this==Number.NEGATIVE_INFINITY){return'"-INF"^^<'+"xsd:double".resolve()+">"}if(this==Number.NaN){return'"NaN"^^<'+"xsd:double".resolve()+">"}return'"'+this.toString()+'"^^<'+this.type+">"}),toCanonical:l(function(){return this.nt()})});return{curiemap:f,propertymap:j,graphify:function(){var m=Array.prototype.slice.call(arguments),o=new h.Graph;function n(p){if(typeof p=="object"&&!p.nodeType){if(!p.id){p.ref()}o.merge(p.graphify())}}m.forEach(function(p){if(Array.isArray(p)){p.forEach(function(q){n(q)})}else{n(p)}});return o}}})(curiemap,propertymap);