/
js3.min.js
1 lines (1 loc) · 18.4 KB
/
js3.min.js
1
var curiemap=(function(a){return Object.defineProperties(a,{resolve:{writable:false,configurable:false,enumerable:false,value:function(d){var b=d.indexOf(":");if(b<0||d.indexOf("//")>=0){return d}var c=d.slice(0,b).toLowerCase();if(!this[c]){return d}return this[c].concat(d.slice(++b))}},setDefault:{writable:false,configurable:false,enumerable:false,value:function(b){this[""]=b;return this}}})})({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: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,h){var c=0;function k(l){return{writable:false,configurable:false,enumerable:false,value:l}}function e(l){return l<10?"0"+l:l}function b(n,m){if(n=="a"){return"rdf:type"}n=n.replace("$",":");if(n.indexOf(":")==-1){n=h.resolve(n,m)}return n}RDFTriple=function(l,m,n){this.subject=l;this.property=m;this.object=n};RDFTriple.prototype={object:null,property:null,subject:null,toString:function(){return this.subject.toNT()+" "+this.property.toNT()+" "+this.object.toNT()+" ."},equals:function(l){return this.subject.equals(l.subject)&&this.property.equals(l.property)&&this.object.equals(l.object)}};Graph=function(l){this.length=0;this.graph=[];this.index={};if(Array.isArray(l)){this.importArray(l)}};Graph.prototype={length:null,graph:null,importArray:function(l){while(l.length>0){this.add(l.pop())}},get:function(l){return this.graph[l]},add:function(l){if(!this.index[l.subject.toNT()]){this.index[l.subject.toNT()]={}}if(!this.index[l.subject.toNT()][l.property.toNT()]){this.index[l.subject.toNT()][l.property.toNT()]=[]}if(this.index[l.subject.toNT()][l.property.toNT()].some(function(m){return m.equals(l.object)})){return}this.length++;this.index[l.subject.toNT()][l.property.toNT()].push(l.object);this.graph.push(l)},merge:function(m){var n=0,o=m.length;while(n<o){var l=n++;this.add(m.get(l))}},every:function(l){return this.graph.every(l)},some:function(l){return this.graph.some(l)},forEach:function(l){this.graph.forEach(l)},filter:function(l){return new Graph(this.graph.filter(l))},apply:function(l){this.graph=this.graph.filter(l);this.length=this.graph.length},toArray:function(){return this.graph.slice()}};function j(u){var n="";var t=false;var q=0,p=u.length;while(q<p){var o=q++;if(!t){var l=u.charCodeAt(o);if(55296<=l&&l<=56319){var r=u.charCodeAt(o+1);l=(l-55296)*1024+(r-56320)+65536;t=true}if(l>1114111){throw new Error("Char out of range")}var m="00000000".concat((new Number(l)).toString(16).toUpperCase());if(l>=65536){n+="\\U"+m.slice(-8)}else{if(l>=127||l<=31){switch(l){case 9:n+="\\t";break;case 10:n+="\\n";break;case 13:n+="\\r";break;default:n+="\\u"+m.slice(-4);break}}else{switch(l){case 34:n+='\\"';break;case 92:n+="\\\\";break;default:n+=u.charAt(o);break}}}}else{t=!t}}return n}Object.defineProperties(Object.prototype,{equals:k(function(l){if(this.nodeType()!=l.nodeType()){return false}switch(this.nodeType()){case"IRI":case"BlankNode":return this==l;case"PlainLiteral":if((this.language&&!l.language)||(!this.language&&l.language)){return false}if(this.language&&l.language){return this.language==l.language&&this==l}return this==l;case"TypedLiteral":return this.type.equals(l.type)&&this==l}return this.n3()==l.n3()}),ref:k(function(l){Object.defineProperties(this,{id:k(l?l.resolve():"_:b"+(++c)),n3:k(function(m){var p=[],q=this,n=q.aliasmap||m;Object.keys(this).forEach(function(o){if(typeof q[o]=="function"){return}if(q[o].id&&q[o].id.nodeType()=="IRI"){return p.push(b(o,n)+" "+q[o].id.n3())}if(!q[o].nodeType&&!q[o].id){q[o].ref()}p.push(b(o,n)+" "+q[o].n3(n))});p=p.join(";\n ");return l?this.id.n3()+" "+p+" .":"[ "+p+" ]"}),toNT:k(function(m){return this.graphify(m).toArray().join("\n")}),graphify:k(function(m){var p=new Graph,r=this,q=r.aliasmap||m;function n(s,u,t){if(typeof t=="function"){return}if(!t.nodeType&&!t.id){t.ref()}if(t.id){p.add(new RDFTriple(s,b(u,q),t.id));p.merge(t.graphify())}else{if(!Array.isArray(t)){p.add(new RDFTriple(s,b(u,q),t))}else{if(Array.isArray(t)){if(!t.list){t.forEach(function(v){n(s,u,v)})}else{if(t.length==0){p.add(new RDFTriple(s,b(u,q),"rdf:nil".resolve()))}else{var o={}.ref();p.add(new RDFTriple(s,b(u,q),o.id));t.forEach(function(w,v){n(o.id,"rdf:first".resolve(),w);var y={}.ref();p.add(new RDFTriple(o.id,"rdf:rest".resolve(),(v==t.length-1)?"rdf:nil".resolve():y.id));o=y})}}}}}}Object.keys(this).forEach(function(o){n(r.id,o,r[o])});return p}),using:k(function(){Object.defineProperty(this,"aliasmap",k(Array.prototype.slice.call(arguments)));return this})});return this}),});Object.defineProperties(String.prototype,{tl:k(function(l){Object.defineProperty(this,"type",k(l.resolve()));Object.defineProperty(this,"language",k(null));return this}),l:k(function(m){Object.defineProperty(this,"type",k(null));Object.defineProperty(this,"language",k(m));return this}),resolve:k(function(){return f.resolve(this)}),nodeType:k(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:k(function(){switch(this.nodeType()){case"PlainLiteral":return('"'+j(this)+'"'+(this.language?"@"+this.language:"")).toString();case"IRI":return(this.resolve()==this)?"<"+j(this.resolve())+">":this.toString();case"BlankNode":return this.toString();case"TypedLiteral":if(this.type.resolve()=="rdf:PlainLiteral".resolve()){return'"'+j(this)+'"'}return'"'+j(this)+'"^^'+this.type.n3()}}),toNT:k(function(){switch(this.nodeType()){case"PlainLiteral":return('"'+j(this)+'"'+(this.language?"@"+this.language:"")).toString();case"IRI":return"<"+j(this.resolve())+">";case"BlankNode":return this.toString();case"TypedLiteral":if(this.type.resolve()=="rdf:PlainLiteral".resolve()){return'"'+j(this)+'"'}return'"'+j(this)+'"^^'+this.type.n3()}}),toCanonical:k(function(){return this.n3()})});Object.defineProperties(Array.prototype,{list:k(false),toList:k(function(){this.list=true;return this}),nodeType:k("Collection"),n3:k(function(l){var m=[];this.forEach(function(n){if(typeof n=="function"){return}if(n.id&&n.id.nodeType()=="IRI"){return m.push(n.id.n3())}if(!n.nodeType){n.ref()}m.push(n.n3(l))});return this.list?"( "+m.join(" ")+" )":m.join(", ")})});Object.defineProperties(Boolean.prototype,{type:k("xsd:boolean".resolve()),nodeType:k(function(){return"TypedLiteral"}),n3:k(function(){return this.valueOf()}),toNT:k(function(){return'"'+this.valueOf()+'"^^<'+this.type+">"}),toCanonical:k(function(){return this.toNT()})});Object.defineProperties(Date.prototype,{type:k("xsd:dateTime".resolve()),nodeType:k(function(){return"TypedLiteral"}),n3:k(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:k(function(){return this.n3()}),toCanonical:k(function(){return this.n3()})});var d=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 l=this.toString();if(d.test(l)){return"xsd:integer".resolve()}if(a.test(l)){return"xsd:decimal".resolve()}if(g.test(l)){return"xsd:double".resolve()}}},nodeType:k(function(){return"TypedLiteral"}),n3:k(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:k(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:k(function(){return this.nt()})});return{curiemap:f,propertymap:h,graphify:function(){var l=Array.prototype.slice.call(arguments),n=new Graph;function m(p){if(typeof p=="object"&&!p.nodeType){if(!p.id){p.ref()}n.merge(p.graphify())}}l.forEach(function(p){if(Array.isArray(p)){p.forEach(function(o){m(o)})}else{m(p)}});return n}}})(curiemap,propertymap);