UNPKG

solid-ui

Version:

UI library for writing Solid read-write-web applications

2 lines 117 kB
/*! For license information please see 841.solid-ui.min.js.LICENSE.txt */ (self.webpackChunksolid_ui=self.webpackChunksolid_ui||[]).push([[841],{378:(e,t,n)=>{"use strict";const o=n(3751),r=n(2438);e.exports=class extends r{constructor(){super(),this.name="URGNA2012",this.createMessageDigest=()=>new o("sha1")}modifyFirstDegreeComponent(e,t,n){return"BlankNode"!==t.termType?t:"graph"===n?{termType:"BlankNode",value:"_:g"}:{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return e.predicate.value}createHashToRelated(e,t){const n=new Map,o=this.blankNodeInfo.get(e).quads;for(const r of o){let o,a;if("BlankNode"===r.subject.termType&&r.subject.value!==e)a=r.subject.value,o="p";else{if("BlankNode"!==r.object.termType||r.object.value===e)continue;a=r.object.value,o="r"}const i=this.hashRelatedBlankNode(a,r,t,o),s=n.get(i);s?s.push(a):n.set(i,[a])}return n}}},470:(e,t,n)=>{"use strict";const o=n(7382),r={};e.exports=r,r.parsers={simple:{keys:["href","scheme","authority","path","query","fragment"],regex:/^(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/},full:{keys:["href","protocol","scheme","authority","auth","user","password","hostname","port","path","directory","file","query","fragment"],regex:/^(([a-zA-Z][a-zA-Z0-9+-.]*):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?(?:(((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/}},r.parse=(e,t)=>{const n={},o=r.parsers[t||"full"],a=o.regex.exec(e);let i=o.keys.length;for(;i--;)n[o.keys[i]]=void 0===a[i]?null:a[i];return("https"===n.scheme&&"443"===n.port||"http"===n.scheme&&"80"===n.port)&&(n.href=n.href.replace(":"+n.port,""),n.authority=n.authority.replace(":"+n.port,""),n.port=null),n.normalizedPath=r.removeDotSegments(n.path),n},r.prependBase=(e,t)=>{if(null===e)return t;if(r.isAbsolute(t))return t;e&&!o.isString(e)||(e=r.parse(e||""));const n=r.parse(t),a={protocol:e.protocol||""};if(null!==n.authority)a.authority=n.authority,a.path=n.path,a.query=n.query;else if(a.authority=e.authority,""===n.path)a.path=e.path,null!==n.query?a.query=n.query:a.query=e.query;else{if(0===n.path.indexOf("/"))a.path=n.path;else{let t=e.path;t=t.substr(0,t.lastIndexOf("/")+1),(t.length>0||e.authority)&&"/"!==t.substr(-1)&&(t+="/"),t+=n.path,a.path=t}a.query=n.query}""!==n.path&&(a.path=r.removeDotSegments(a.path));let i=a.protocol;return null!==a.authority&&(i+="//"+a.authority),i+=a.path,null!==a.query&&(i+="?"+a.query),null!==n.fragment&&(i+="#"+n.fragment),""===i&&(i="./"),i},r.removeBase=(e,t)=>{if(null===e)return t;e&&!o.isString(e)||(e=r.parse(e||""));let n="";if(""!==e.href?n+=(e.protocol||"")+"//"+(e.authority||""):t.indexOf("//")&&(n+="//"),0!==t.indexOf(n))return t;const a=r.parse(t.substr(n.length)),i=e.normalizedPath.split("/"),s=a.normalizedPath.split("/"),l=a.fragment||a.query?0:1;for(;i.length>0&&s.length>l&&i[0]===s[0];)i.shift(),s.shift();let c="";if(i.length>0){i.pop();for(let e=0;e<i.length;++e)c+="../"}return c+=s.join("/"),null!==a.query&&(c+="?"+a.query),null!==a.fragment&&(c+="#"+a.fragment),""===c&&(c="./"),c},r.removeDotSegments=e=>{if(0===e.length)return"";const t=e.split("/"),n=[];for(;t.length>0;){const e=t.shift(),o=0===t.length;"."!==e?".."!==e?n.push(e):(n.pop(),o&&n.push("")):o&&n.push("")}return"/"===e[0]&&n.length>0&&""!==n[0]&&n.unshift(""),1===n.length&&""===n[0]?"/":n.join("/")};const a=/^([A-Za-z][A-Za-z0-9+-.]*|_):[^\s]*$/;r.isAbsolute=e=>o.isString(e)&&a.test(e),r.isRelative=e=>o.isString(e)},701:(e,t,n)=>{"use strict";const o=n(9338),r={};e.exports=r,r.setupDocumentLoaders=function(e){"undefined"!=typeof XMLHttpRequest&&(e.documentLoaders.xhr=o,e.useDocumentLoader("xhr"))},r.setupGlobals=function(e){void 0===globalThis.JsonLdProcessor&&Object.defineProperty(globalThis,"JsonLdProcessor",{writable:!0,enumerable:!1,configurable:!0,value:e.JsonLdProcessor})}},989:(e,t,n)=>{e.exports=n(4005)},1058:(e,t,n)=>{"use strict";const o=n(2207),{isArray:r,isObject:a,isString:i,isUndefined:s}=n(7382),{isList:l,isValue:c,isGraph:d,isSimpleGraph:u,isSubjectReference:p}=n(3978),{expandIri:h,getContextValue:f,isKeyword:v,process:g,processingMode:y}=n(1972),{removeBase:m,prependBase:x}=n(470),{REGEX_KEYWORD:b,addValue:w,asArray:j,compareShortestLeast:I}=n(9263),N={};function S(e,t,n){if("@nest"!==h(e,t,{vocab:!0},n))throw new o("JSON-LD compact error; nested property must have an @nest value resolving to @nest.","jsonld.SyntaxError",{code:"invalid @nest value"})}e.exports=N,N.compact=async({activeCtx:e,activeProperty:t=null,element:n,options:h={}})=>{if(r(n)){let o=[];for(let r=0;r<n.length;++r){const a=await N.compact({activeCtx:e,activeProperty:t,element:n[r],options:h});null!==a&&o.push(a)}return h.compactArrays&&1===o.length&&0===(f(e,t,"@container")||[]).length&&(o=o[0]),o}const m=f(e,t,"@context");if(s(m)||(e=await g({activeCtx:e,localCtx:m,propagate:!0,overrideProtected:!0,options:h})),a(n)){if(h.link&&"@id"in n&&h.link.hasOwnProperty(n["@id"])){const e=h.link[n["@id"]];for(let t=0;t<e.length;++t)if(e[t].expanded===n)return e[t].compacted}if(c(n)||p(n)){const o=N.compactValue({activeCtx:e,activeProperty:t,value:n,options:h});return h.link&&p(n)&&(h.link.hasOwnProperty(n["@id"])||(h.link[n["@id"]]=[]),h.link[n["@id"]].push({expanded:n,compacted:o})),o}if(l(n)&&(f(e,t,"@container")||[]).includes("@list"))return N.compact({activeCtx:e,activeProperty:t,element:n["@list"],options:h});const m="@reverse"===t,x={},b=e;c(n)||p(n)||(e=e.revertToPreviousContext());const I=f(b,t,"@context");s(I)||(e=await g({activeCtx:e,localCtx:I,propagate:!0,overrideProtected:!0,options:h})),h.link&&"@id"in n&&(h.link.hasOwnProperty(n["@id"])||(h.link[n["@id"]]=[]),h.link[n["@id"]].push({expanded:n,compacted:x}));let O=n["@type"]||[];O.length>1&&(O=Array.from(O).sort());const E=e;for(const t of O){const n=N.compactIri({activeCtx:E,iri:t,relativeTo:{vocab:!0}}),o=f(b,n,"@context");s(o)||(e=await g({activeCtx:e,localCtx:o,options:h,propagate:!1}))}const D=Object.keys(n).sort();for(const s of D){const p=n[s];if("@id"===s){let t=j(p).map(t=>N.compactIri({activeCtx:e,iri:t,relativeTo:{vocab:!1},base:h.base}));1===t.length&&(t=t[0]),x[N.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}})]=t;continue}if("@type"===s){let t=j(p).map(e=>N.compactIri({activeCtx:b,iri:e,relativeTo:{vocab:!0}}));1===t.length&&(t=t[0]);const n=N.compactIri({activeCtx:e,iri:"@type",relativeTo:{vocab:!0}}),o=(f(e,n,"@container")||[]).includes("@set")&&y(e,1.1)||r(t)&&0===p.length;w(x,n,t,{propertyIsArray:o});continue}if("@reverse"===s){const t=await N.compact({activeCtx:e,activeProperty:"@reverse",element:p,options:h});for(const n in t)if(e.mappings.has(n)&&e.mappings.get(n).reverse){const o=t[n],r=(f(e,n,"@container")||[]).includes("@set")||!h.compactArrays;w(x,n,o,{propertyIsArray:r}),delete t[n]}if(Object.keys(t).length>0){const n=N.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:!0}});w(x,n,t)}continue}if("@preserve"===s){const n=await N.compact({activeCtx:e,activeProperty:t,element:p,options:h});r(n)&&0===n.length||w(x,s,n);continue}if("@index"===s){if((f(e,t,"@container")||[]).includes("@index"))continue;const n=N.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:!0}});w(x,n,p);continue}if("@graph"!==s&&"@list"!==s&&"@included"!==s&&v(s)){const t=N.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:!0}});w(x,t,p);continue}if(!r(p))throw new o("JSON-LD expansion error; expanded value must be an array.","jsonld.SyntaxError");if(0===p.length){const t=N.compactIri({activeCtx:e,iri:s,value:p,relativeTo:{vocab:!0},reverse:m}),n=e.mappings.has(t)?e.mappings.get(t)["@nest"]:null;let o=x;n&&(S(e,n,h),a(x[n])||(x[n]={}),o=x[n]),w(o,t,p,{propertyIsArray:!0})}for(const t of p){const n=N.compactIri({activeCtx:e,iri:s,value:t,relativeTo:{vocab:!0},reverse:m}),o=e.mappings.has(n)?e.mappings.get(n)["@nest"]:null;let p=x;o&&(S(e,o,h),a(x[o])||(x[o]={}),p=x[o]);const v=f(e,n,"@container")||[],g=d(t),y=l(t);let b;y?b=t["@list"]:g&&(b=t["@graph"]);let I=await N.compact({activeCtx:e,activeProperty:n,element:y||g?b:t,options:h});if(y){if(r(I)||(I=[I]),v.includes("@list")){w(p,n,I,{valueIsArray:!0,allowDuplicate:!0});continue}I={[N.compactIri({activeCtx:e,iri:"@list",relativeTo:{vocab:!0}})]:I},"@index"in t&&(I[N.compactIri({activeCtx:e,iri:"@index",relativeTo:{vocab:!0}})]=t["@index"])}if(g)if(v.includes("@graph")&&(v.includes("@id")||v.includes("@index")&&u(t))){let o;p.hasOwnProperty(n)?o=p[n]:p[n]=o={};const r=(v.includes("@id")?t["@id"]:t["@index"])||N.compactIri({activeCtx:e,iri:"@none",relativeTo:{vocab:!0}});w(o,r,I,{propertyIsArray:!h.compactArrays||v.includes("@set")})}else v.includes("@graph")&&u(t)?(r(I)&&I.length>1&&(I={"@included":I}),w(p,n,I,{propertyIsArray:!h.compactArrays||v.includes("@set")})):(r(I)&&1===I.length&&h.compactArrays&&(I=I[0]),I={[N.compactIri({activeCtx:e,iri:"@graph",relativeTo:{vocab:!0}})]:I},"@id"in t&&(I[N.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}})]=t["@id"]),"@index"in t&&(I[N.compactIri({activeCtx:e,iri:"@index",relativeTo:{vocab:!0}})]=t["@index"]),w(p,n,I,{propertyIsArray:!h.compactArrays||v.includes("@set")}));else if(v.includes("@language")||v.includes("@index")||v.includes("@id")||v.includes("@type")){let o,r;if(p.hasOwnProperty(n)?o=p[n]:p[n]=o={},v.includes("@language"))c(I)&&(I=I["@value"]),r=t["@language"];else if(v.includes("@index")){const o=f(e,n,"@index")||"@index",a=N.compactIri({activeCtx:e,iri:o,relativeTo:{vocab:!0}});if("@index"===o)r=t["@index"],delete I[a];else{let e;if([r,...e]=j(I[o]||[]),i(r))switch(e.length){case 0:delete I[o];break;case 1:I[o]=e[0];break;default:I[o]=e}else r=null}}else if(v.includes("@id")){const t=N.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}});r=I[t],delete I[t]}else if(v.includes("@type")){const o=N.compactIri({activeCtx:e,iri:"@type",relativeTo:{vocab:!0}});let a;switch([r,...a]=j(I[o]||[]),a.length){case 0:delete I[o];break;case 1:I[o]=a[0];break;default:I[o]=a}1===Object.keys(I).length&&"@id"in t&&(I=await N.compact({activeCtx:e,activeProperty:n,element:{"@id":t["@id"]},options:h}))}r||(r=N.compactIri({activeCtx:e,iri:"@none",relativeTo:{vocab:!0}})),w(o,r,I,{propertyIsArray:v.includes("@set")})}else{const e=!h.compactArrays||v.includes("@set")||v.includes("@list")||r(I)&&0===I.length||"@list"===s||"@graph"===s;w(p,n,I,{propertyIsArray:e})}}}return x}return n},N.compactIri=({activeCtx:e,iri:t,value:n=null,relativeTo:r={vocab:!1},reverse:i=!1,base:s=null})=>{if(null===t)return t;e.isPropertyTermScoped&&e.previousContext&&(e=e.previousContext);const u=e.getInverse();if(v(t)&&t in u&&"@none"in u[t]&&"@type"in u[t]["@none"]&&"@none"in u[t]["@none"]["@type"])return u[t]["@none"]["@type"]["@none"];if(r.vocab&&t in u){const o=e["@language"]||"@none",r=[];a(n)&&"@index"in n&&!("@graph"in n)&&r.push("@index","@index@set"),a(n)&&"@preserve"in n&&(n=n["@preserve"][0]),d(n)?("@index"in n&&r.push("@graph@index","@graph@index@set","@index","@index@set"),"@id"in n&&r.push("@graph@id","@graph@id@set"),r.push("@graph","@graph@set","@set"),"@index"in n||r.push("@graph@index","@graph@index@set","@index","@index@set"),"@id"in n||r.push("@graph@id","@graph@id@set")):a(n)&&!c(n)&&r.push("@id","@id@set","@type","@set@type");let s="@language",u="@null";if(i)s="@type",u="@reverse",r.push("@set");else if(l(n)){"@index"in n||r.push("@list");const e=n["@list"];if(0===e.length)s="@any",u="@none";else{let t=0===e.length?o:null,n=null;for(let o=0;o<e.length;++o){const r=e[o];let a="@none",i="@none";if(c(r)?"@direction"in r?a=`${(r["@language"]||"").toLowerCase()}_${r["@direction"]}`:"@language"in r?a=r["@language"].toLowerCase():"@type"in r?i=r["@type"]:a="@null":i="@id",null===t?t=a:a!==t&&c(r)&&(t="@none"),null===n?n=i:i!==n&&(n="@none"),"@none"===t&&"@none"===n)break}t=t||"@none",n=n||"@none","@none"!==n?(s="@type",u=n):u=t}}else{if(c(n))if("@language"in n&&!("@index"in n)){r.push("@language","@language@set"),u=n["@language"];const e=n["@direction"];e&&(u=`${u}_${e}`)}else"@direction"in n&&!("@index"in n)?u=`_${n["@direction"]}`:"@type"in n&&(s="@type",u=n["@type"]);else s="@type",u="@id";r.push("@set")}r.push("@none"),a(n)&&!("@index"in n)&&r.push("@index","@index@set"),c(n)&&1===Object.keys(n).length&&r.push("@language","@language@set");const p=function(e,t,n,o,r,i){null===i&&(i="@null");const s=[];if(("@id"===i||"@reverse"===i)&&a(n)&&"@id"in n){"@reverse"===i&&s.push("@reverse");const t=N.compactIri({activeCtx:e,iri:n["@id"],relativeTo:{vocab:!0}});e.mappings.has(t)&&e.mappings.get(t)&&e.mappings.get(t)["@id"]===n["@id"]?s.push.apply(s,["@vocab","@id"]):s.push.apply(s,["@id","@vocab"])}else{s.push(i);const e=s.find(e=>e.includes("_"));e&&s.push(e.replace(/^[^_]+_/,"_"))}s.push("@none");const l=e.inverse[t];for(const e of o){if(!(e in l))continue;const t=l[e][r];for(const e of s)if(e in t)return t[e]}return null}(e,t,n,r,s,u);if(null!==p)return p}if(r.vocab&&"@vocab"in e){const n=e["@vocab"];if(0===t.indexOf(n)&&t!==n){const o=t.substr(n.length);if(!e.mappings.has(o))return o}}let p=null;const h=[];let f=e.fastCurieMap;const g=t.length-1;for(let e=0;e<g&&t[e]in f;++e)f=f[t[e]],""in f&&h.push(f[""][0]);for(let o=h.length-1;o>=0;--o){const r=h[o],a=r.terms;for(const o of a){const a=o+":"+t.substr(r.iri.length);e.mappings.get(o)._prefix&&(!e.mappings.has(a)||null===n&&e.mappings.get(a)["@id"]===t)&&(null===p||I(a,p)<0)&&(p=a)}}if(null!==p)return p;for(const[n,r]of e.mappings)if(r&&r._prefix&&t.startsWith(n+":"))throw new o(`Absolute IRI "${t}" confused with prefix "${n}".`,"jsonld.SyntaxError",{code:"IRI confused with prefix",context:e});if(!r.vocab){if("@base"in e){if(e["@base"]){const n=m(x(s,e["@base"]),t);return b.test(n)?`./${n}`:n}return t}return m(s,t)}return t},N.compactValue=({activeCtx:e,activeProperty:t,value:n,options:o})=>{if(c(n)){const o=f(e,t,"@type"),r=f(e,t,"@language"),a=f(e,t,"@direction"),s=f(e,t,"@container")||[],l="@index"in n&&!s.includes("@index");if(!l&&"@none"!==o){if(n["@type"]===o)return n["@value"];if("@language"in n&&n["@language"]===r&&"@direction"in n&&n["@direction"]===a)return n["@value"];if("@language"in n&&n["@language"]===r)return n["@value"];if("@direction"in n&&n["@direction"]===a)return n["@value"]}const c=Object.keys(n).length,d=1===c||2===c&&"@index"in n&&!l,u="@language"in e,p=i(n["@value"]),h=e.mappings.has(t)&&null===e.mappings.get(t)["@language"];if(d&&"@none"!==o&&(!u||!p||h))return n["@value"];const v={};return l&&(v[N.compactIri({activeCtx:e,iri:"@index",relativeTo:{vocab:!0}})]=n["@index"]),"@type"in n?v[N.compactIri({activeCtx:e,iri:"@type",relativeTo:{vocab:!0}})]=N.compactIri({activeCtx:e,iri:n["@type"],relativeTo:{vocab:!0}}):"@language"in n&&(v[N.compactIri({activeCtx:e,iri:"@language",relativeTo:{vocab:!0}})]=n["@language"]),"@direction"in n&&(v[N.compactIri({activeCtx:e,iri:"@direction",relativeTo:{vocab:!0}})]=n["@direction"]),v[N.compactIri({activeCtx:e,iri:"@value",relativeTo:{vocab:!0}})]=n["@value"],v}const r=h(e,t,{vocab:!0},o),a=f(e,t,"@type"),s=N.compactIri({activeCtx:e,iri:n["@id"],relativeTo:{vocab:"@vocab"===a},base:o.base});return"@id"===a||"@vocab"===a||"@graph"===r?s:{[N.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}})]:s}}},1227:e=>{"use strict";const t="http://www.w3.org/1999/02/22-rdf-syntax-ns#langString",n="http://www.w3.org/2001/XMLSchema#string",o="NamedNode",r="BlankNode",a="Literal",i="DefaultGraph",s={};function l(e,t){return e.subject.termType===t.subject.termType&&e.object.termType===t.object.termType&&e.subject.value===t.subject.value&&e.predicate.value===t.predicate.value&&e.object.value===t.object.value&&(e.object.termType!==a||e.object.datatype.termType===t.object.datatype.termType&&e.object.language===t.object.language&&e.object.datatype.value===t.object.datatype.value)}(()=>{const e="(?:<([^:]+:[^>]*)>)",t="A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_",n=t+"0-9-·̀-ͯ‿-⁀",o="(_:(?:["+t+"0-9])(?:(?:["+n+".])*(?:["+n+"]))?)",r="[ \\t]+",a="[ \\t]*",i="(?:"+e+"|"+o+")"+r,l=e+r,c="(?:"+e+"|"+o+'|(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"(?:(?:\\^\\^'+e+")|(?:@([a-zA-Z]+(?:-[a-zA-Z0-9]+)*)))?))"+a,d="(?:\\.|(?:(?:"+e+"|"+o+")"+a+"\\.))";s.eoln=/(?:\r\n)|(?:\n)|(?:\r)/g,s.empty=new RegExp("^"+a+"$"),s.quad=new RegExp("^"+a+i+l+c+d+a+"$")})(),e.exports=class e{static parse(e){const c=[],d={},p=e.split(s.eoln);let h=0;for(const e of p){if(h++,s.empty.test(e))continue;const p=e.match(s.quad);if(null===p)throw new Error("N-Quads parse error on line "+h+".");const f={subject:null,predicate:null,object:null,graph:null};if(void 0!==p[1]?f.subject={termType:o,value:p[1]}:f.subject={termType:r,value:p[2]},f.predicate={termType:o,value:p[3]},void 0!==p[4]?f.object={termType:o,value:p[4]}:void 0!==p[5]?f.object={termType:r,value:p[5]}:(f.object={termType:a,value:void 0,datatype:{termType:o}},void 0!==p[7]?f.object.datatype.value=p[7]:void 0!==p[8]?(f.object.datatype.value=t,f.object.language=p[8]):f.object.datatype.value=n,f.object.value=u(p[6])),void 0!==p[9]?f.graph={termType:o,value:p[9]}:void 0!==p[10]?f.graph={termType:r,value:p[10]}:f.graph={termType:i,value:""},f.graph.value in d){let e=!0;const t=d[f.graph.value];for(const n of t)if(l(n,f)){e=!1;break}e&&(t.push(f),c.push(f))}else d[f.graph.value]=[f],c.push(f)}return c}static serialize(t){Array.isArray(t)||(t=e.legacyDatasetToQuads(t));const n=[];for(const o of t)n.push(e.serializeQuad(o));return n.sort().join("")}static serializeQuadComponents(e,a,i,s){let l="";return e.termType===o?l+=`<${e.value}>`:l+=`${e.value}`,l+=` <${a.value}> `,i.termType===o?l+=`<${i.value}>`:i.termType===r?l+=i.value:(l+=`"${function(e){return e.replace(c,function(e){switch(e){case'"':return'\\"';case"\\":return"\\\\";case"\n":return"\\n";case"\r":return"\\r"}})}(i.value)}"`,i.datatype.value===t?i.language&&(l+=`@${i.language}`):i.datatype.value!==n&&(l+=`^^<${i.datatype.value}>`)),s.termType===o?l+=` <${s.value}>`:s.termType===r&&(l+=` ${s.value}`),l+=" .\n",l}static serializeQuad(t){return e.serializeQuadComponents(t.subject,t.predicate,t.object,t.graph)}static legacyDatasetToQuads(e){const s=[],l={"blank node":r,IRI:o,literal:a};for(const c in e)e[c].forEach(e=>{const d={};for(const r in e){const i=e[r],s={termType:l[i.type],value:i.value};s.termType===a&&(s.datatype={termType:o},"datatype"in i&&(s.datatype.value=i.datatype),"language"in i?("datatype"in i||(s.datatype.value=t),s.language=i.language):"datatype"in i||(s.datatype.value=n)),d[r]=s}d.graph="@default"===c?{termType:i,value:""}:{termType:c.startsWith("_:")?r:o,value:c},s.push(d)});return s}};const c=/["\\\n\r]/g,d=/(?:\\([tbnrf"'\\]))|(?:\\u([0-9A-Fa-f]{4}))|(?:\\U([0-9A-Fa-f]{8}))/g;function u(e){return e.replace(d,function(e,t,n,o){if(t)switch(t){case"t":return"\t";case"b":return"\b";case"n":return"\n";case"r":return"\r";case"f":return"\f";case'"':return'"';case"'":return"'";case"\\":return"\\"}if(n)return String.fromCharCode(parseInt(n,16));if(o)throw new Error("Unsupported U escape")})}},1235:(e,t,n)=>{"use strict";const o=n(6717),r=Symbol("max"),a=Symbol("length"),i=Symbol("lengthCalculator"),s=Symbol("allowStale"),l=Symbol("maxAge"),c=Symbol("dispose"),d=Symbol("noDisposeOnSet"),u=Symbol("lruList"),p=Symbol("cache"),h=Symbol("updateAgeOnGet"),f=()=>1,v=(e,t,n)=>{const o=e[p].get(t);if(o){const t=o.value;if(g(e,t)){if(m(e,o),!e[s])return}else n&&(e[h]&&(o.value.now=Date.now()),e[u].unshiftNode(o));return t.value}},g=(e,t)=>{if(!t||!t.maxAge&&!e[l])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[l]&&n>e[l]},y=e=>{if(e[a]>e[r])for(let t=e[u].tail;e[a]>e[r]&&null!==t;){const n=t.prev;m(e,t),t=n}},m=(e,t)=>{if(t){const n=t.value;e[c]&&e[c](n.key,n.value),e[a]-=n.length,e[p].delete(n.key),e[u].removeNode(t)}};class x{constructor(e,t,n,o,r){this.key=e,this.value=t,this.length=n,this.now=o,this.maxAge=r||0}}const b=(e,t,n,o)=>{let r=n.value;g(e,r)&&(m(e,n),e[s]||(r=void 0)),r&&t.call(o,r.value,r.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[r]=e.max||1/0;const t=e.length||f;if(this[i]="function"!=typeof t?f:t,this[s]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[l]=e.maxAge||0,this[c]=e.dispose,this[d]=e.noDisposeOnSet||!1,this[h]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[r]=e||1/0,y(this)}get max(){return this[r]}set allowStale(e){this[s]=!!e}get allowStale(){return this[s]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[l]=e,y(this)}get maxAge(){return this[l]}set lengthCalculator(e){"function"!=typeof e&&(e=f),e!==this[i]&&(this[i]=e,this[a]=0,this[u].forEach(e=>{e.length=this[i](e.value,e.key),this[a]+=e.length})),y(this)}get lengthCalculator(){return this[i]}get length(){return this[a]}get itemCount(){return this[u].length}rforEach(e,t){t=t||this;for(let n=this[u].tail;null!==n;){const o=n.prev;b(this,e,n,t),n=o}}forEach(e,t){t=t||this;for(let n=this[u].head;null!==n;){const o=n.next;b(this,e,n,t),n=o}}keys(){return this[u].toArray().map(e=>e.key)}values(){return this[u].toArray().map(e=>e.value)}reset(){this[c]&&this[u]&&this[u].length&&this[u].forEach(e=>this[c](e.key,e.value)),this[p]=new Map,this[u]=new o,this[a]=0}dump(){return this[u].map(e=>!g(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[u]}set(e,t,n){if((n=n||this[l])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const o=n?Date.now():0,s=this[i](t,e);if(this[p].has(e)){if(s>this[r])return m(this,this[p].get(e)),!1;const i=this[p].get(e).value;return this[c]&&(this[d]||this[c](e,i.value)),i.now=o,i.maxAge=n,i.value=t,this[a]+=s-i.length,i.length=s,this.get(e),y(this),!0}const h=new x(e,t,s,o,n);return h.length>this[r]?(this[c]&&this[c](e,t),!1):(this[a]+=h.length,this[u].unshift(h),this[p].set(e,this[u].head),y(this),!0)}has(e){if(!this[p].has(e))return!1;const t=this[p].get(e).value;return!g(this,t)}get(e){return v(this,e,!0)}peek(e){return v(this,e,!1)}pop(){const e=this[u].tail;return e?(m(this,e),e.value):null}del(e){m(this,this[p].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const o=e[n],r=o.e||0;if(0===r)this.set(o.k,o.v);else{const e=r-t;e>0&&this.set(o.k,o.v,e)}}}prune(){this[p].forEach((e,t)=>v(this,t,!1))}}},1972:(e,t,n)=>{"use strict";const o=n(9263),r=n(2207),{isArray:a,isObject:i,isString:s,isUndefined:l}=n(7382),{isAbsolute:c,isRelative:d,prependBase:u}=n(470),{handleEvent:p}=n(2246),{REGEX_BCP47:h,REGEX_KEYWORD:f,asArray:v,compareShortestLeast:g}=n(9263),y=new Map,m={};function x(e,t,n,o,r,a){if(null===t||!s(t)||m.isKeyword(t))return t;if(t.match(f))return null;if(o&&o.hasOwnProperty(t)&&!0!==r.get(t)&&m.createTermDefinition({activeCtx:e,localCtx:o,term:t,defined:r,options:a}),(n=n||{}).vocab){const n=e.mappings.get(t);if(null===n)return null;if(i(n)&&"@id"in n)return n["@id"]}const l=t.indexOf(":");if(l>0){const n=t.substr(0,l),i=t.substr(l+1);if("_"===n||0===i.indexOf("//"))return t;o&&o.hasOwnProperty(n)&&m.createTermDefinition({activeCtx:e,localCtx:o,term:n,defined:r,options:a});const s=e.mappings.get(n);if(s&&s._prefix)return s["@id"]+i;if(c(t))return t}if(n.vocab&&"@vocab"in e)t=e["@vocab"]+t;else if(n.base){let n,o;"@base"in e?e["@base"]?(o=u(a.base,e["@base"]),n=u(o,t)):(o=e["@base"],n=t):(o=a.base,n=u(a.base,t)),t=n}return t}function b(e,t){if(!e||"object"!=typeof e||!t||"object"!=typeof t)return e===t;const n=Array.isArray(e);if(n!==Array.isArray(t))return!1;if(n){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(!b(e[n],t[n]))return!1;return!0}const o=Object.keys(e),r=Object.keys(t);if(o.length!==r.length)return!1;for(const n in e){let o=e[n],r=t[n];if("@container"===n&&Array.isArray(o)&&Array.isArray(r)&&(o=o.slice().sort(),r=r.slice().sort()),!b(o,r))return!1}return!0}e.exports=m,m.process=async({activeCtx:e,localCtx:t,options:n,propagate:o=!0,overrideProtected:l=!1,cycles:f=new Set})=>{if(i(t)&&"@context"in t&&a(t["@context"])&&(t=t["@context"]),0===v(t).length)return e;const g=[],y=[({event:e,next:t})=>{g.push(e),t()}];n.eventHandler&&y.push(n.eventHandler);const b=n;n={...n,eventHandler:y};const w=await n.contextResolver.resolve({activeCtx:e,context:t,documentLoader:n.documentLoader,base:n.base});i(w[0].document)&&"boolean"==typeof w[0].document["@propagate"]&&(o=w[0].document["@propagate"]);let j=e;o||j.previousContext||(j=j.clone(),j.previousContext=e);for(const o of w){let{document:a}=o;if(e=j,null===a){if(!l&&0!==Object.keys(e.protected).length)throw new r("Tried to nullify a context with protected terms outside of a term definition.","jsonld.SyntaxError",{code:"invalid context nullification"});j=e=m.getInitialContext(n).clone();continue}const v=o.getProcessed(e);if(v){if(b.eventHandler)for(const e of v.events)p({event:e,options:b});j=e=v.context;continue}if(i(a)&&"@context"in a&&(a=a["@context"]),!i(a))throw new r("Invalid JSON-LD syntax; @context must be an object.","jsonld.SyntaxError",{code:"invalid local context",context:a});j=j.clone();const y=new Map;if("@version"in a){if(1.1!==a["@version"])throw new r("Unsupported JSON-LD version: "+a["@version"],"jsonld.UnsupportedVersion",{code:"invalid @version value",context:a});if(e.processingMode&&"json-ld-1.0"===e.processingMode)throw new r("@version: "+a["@version"]+" not compatible with "+e.processingMode,"jsonld.ProcessingModeConflict",{code:"processing mode conflict",context:a});j.processingMode="json-ld-1.1",j["@version"]=a["@version"],y.set("@version",!0)}if(j.processingMode=j.processingMode||e.processingMode,"@base"in a){let e=a["@base"];if(null===e||c(e));else{if(!d(e))throw new r('Invalid JSON-LD syntax; the value of "@base" in a @context must be an absolute IRI, a relative IRI, or null.',"jsonld.SyntaxError",{code:"invalid base IRI",context:a});e=u(j["@base"],e)}j["@base"]=e,y.set("@base",!0)}if("@vocab"in a){const e=a["@vocab"];if(null===e)delete j["@vocab"];else{if(!s(e))throw new r('Invalid JSON-LD syntax; the value of "@vocab" in a @context must be a string or null.',"jsonld.SyntaxError",{code:"invalid vocab mapping",context:a});if(!c(e)&&m.processingMode(j,1))throw new r('Invalid JSON-LD syntax; the value of "@vocab" in a @context must be an absolute IRI.',"jsonld.SyntaxError",{code:"invalid vocab mapping",context:a});{const t=x(j,e,{vocab:!0,base:!0},void 0,void 0,n);c(t)||n.eventHandler&&p({event:{type:["JsonLdEvent"],code:"relative @vocab reference",level:"warning",message:"Relative @vocab reference found.",details:{vocab:t}},options:n}),j["@vocab"]=t}}y.set("@vocab",!0)}if("@language"in a){const e=a["@language"];if(null===e)delete j["@language"];else{if(!s(e))throw new r('Invalid JSON-LD syntax; the value of "@language" in a @context must be a string or null.',"jsonld.SyntaxError",{code:"invalid default language",context:a});e.match(h)||n.eventHandler&&p({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e}},options:n}),j["@language"]=e.toLowerCase()}y.set("@language",!0)}if("@direction"in a){const t=a["@direction"];if("json-ld-1.0"===e.processingMode)throw new r("Invalid JSON-LD syntax; @direction not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context member",context:a});if(null===t)delete j["@direction"];else{if("ltr"!==t&&"rtl"!==t)throw new r('Invalid JSON-LD syntax; the value of "@direction" in a @context must be null, "ltr", or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",context:a});j["@direction"]=t}y.set("@direction",!0)}if("@propagate"in a){const n=a["@propagate"];if("json-ld-1.0"===e.processingMode)throw new r("Invalid JSON-LD syntax; @propagate not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context entry",context:a});if("boolean"!=typeof n)throw new r("Invalid JSON-LD syntax; @propagate value must be a boolean.","jsonld.SyntaxError",{code:"invalid @propagate value",context:t});y.set("@propagate",!0)}if("@import"in a){const o=a["@import"];if("json-ld-1.0"===e.processingMode)throw new r("Invalid JSON-LD syntax; @import not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context entry",context:a});if(!s(o))throw new r("Invalid JSON-LD syntax; @import must be a string.","jsonld.SyntaxError",{code:"invalid @import value",context:t});const i=await n.contextResolver.resolve({activeCtx:e,context:o,documentLoader:n.documentLoader,base:n.base});if(1!==i.length)throw new r("Invalid JSON-LD syntax; @import must reference a single context.","jsonld.SyntaxError",{code:"invalid remote context",context:t});const l=i[0].getProcessed(e);if(l)a=l;else{const n=i[0].document;if("@import"in n)throw new r("Invalid JSON-LD syntax: imported context must not include @import.","jsonld.SyntaxError",{code:"invalid context entry",context:t});for(const e in n)a.hasOwnProperty(e)||(a[e]=n[e]);i[0].setProcessed(e,a)}y.set("@import",!0)}y.set("@protected",a["@protected"]||!1);for(const e in a)if(m.createTermDefinition({activeCtx:j,localCtx:a,term:e,defined:y,options:n,overrideProtected:l}),i(a[e])&&"@context"in a[e]){const t=a[e]["@context"];let o=!0;if(s(t)){const e=u(n.base,t);f.has(e)?o=!1:f.add(e)}if(o)try{await m.process({activeCtx:j.clone(),localCtx:a[e]["@context"],overrideProtected:!0,options:n,cycles:f})}catch(t){throw new r("Invalid JSON-LD syntax; invalid scoped context.","jsonld.SyntaxError",{code:"invalid scoped context",context:a[e]["@context"],term:e})}}o.setProcessed(e,{context:j,events:g})}return j},m.createTermDefinition=({activeCtx:e,localCtx:t,term:n,defined:o,options:l,overrideProtected:d=!1})=>{if(o.has(n)){if(o.get(n))return;throw new r("Cyclical context definition detected.","jsonld.CyclicalContext",{code:"cyclic IRI mapping",context:t,term:n})}let u;if(o.set(n,!1),t.hasOwnProperty(n)&&(u=t[n]),"@type"===n&&i(u)&&"@set"===(u["@container"]||"@set")&&m.processingMode(e,1.1)){const e=["@container","@id","@protected"],o=Object.keys(u);if(0===o.length||o.some(t=>!e.includes(t)))throw new r("Invalid JSON-LD syntax; keywords cannot be overridden.","jsonld.SyntaxError",{code:"keyword redefinition",context:t,term:n})}else{if(m.isKeyword(n))throw new r("Invalid JSON-LD syntax; keywords cannot be overridden.","jsonld.SyntaxError",{code:"keyword redefinition",context:t,term:n});if(n.match(f))return void(l.eventHandler&&p({event:{type:["JsonLdEvent"],code:"reserved term",level:"warning",message:'Terms beginning with "@" are reserved for future use and dropped.',details:{term:n}},options:l}));if(""===n)throw new r("Invalid JSON-LD syntax; a term cannot be an empty string.","jsonld.SyntaxError",{code:"invalid term definition",context:t})}const h=e.mappings.get(n);e.mappings.has(n)&&e.mappings.delete(n);let v=!1;if((s(u)||null===u)&&(v=!0,u={"@id":u}),!i(u))throw new r("Invalid JSON-LD syntax; @context term values must be strings or objects.","jsonld.SyntaxError",{code:"invalid term definition",context:t});const g={};e.mappings.set(n,g),g.reverse=!1;const y=["@container","@id","@language","@reverse","@type"];m.processingMode(e,1.1)&&y.push("@context","@direction","@index","@nest","@prefix","@protected");for(const e in u)if(!y.includes(e))throw new r("Invalid JSON-LD syntax; a term definition must not contain "+e,"jsonld.SyntaxError",{code:"invalid term definition",context:t});const w=n.indexOf(":");if(g._termHasColon=w>0,"@reverse"in u){if("@id"in u)throw new r("Invalid JSON-LD syntax; a @reverse term definition must not contain @id.","jsonld.SyntaxError",{code:"invalid reverse property",context:t});if("@nest"in u)throw new r("Invalid JSON-LD syntax; a @reverse term definition must not contain @nest.","jsonld.SyntaxError",{code:"invalid reverse property",context:t});const a=u["@reverse"];if(!s(a))throw new r("Invalid JSON-LD syntax; a @context @reverse value must be a string.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});if(a.match(f))return l.eventHandler&&p({event:{type:["JsonLdEvent"],code:"reserved @reverse value",level:"warning",message:'@reverse values beginning with "@" are reserved for future use and dropped.',details:{reverse:a}},options:l}),void(h?e.mappings.set(n,h):e.mappings.delete(n));const i=x(e,a,{vocab:!0,base:!1},t,o,l);if(!c(i))throw new r("Invalid JSON-LD syntax; a @context @reverse value must be an absolute IRI or a blank node identifier.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});g["@id"]=i,g.reverse=!0}else if("@id"in u){let a=u["@id"];if(a&&!s(a))throw new r("Invalid JSON-LD syntax; a @context @id value must be an array of strings or a string.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});if(null===a)g["@id"]=null;else{if(!m.isKeyword(a)&&a.match(f))return l.eventHandler&&p({event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:'@id values beginning with "@" are reserved for future use and dropped.',details:{id:a}},options:l}),void(h?e.mappings.set(n,h):e.mappings.delete(n));if(a!==n){if(a=x(e,a,{vocab:!0,base:!1},t,o,l),!c(a)&&!m.isKeyword(a))throw new r("Invalid JSON-LD syntax; a @context @id value must be an absolute IRI, a blank node identifier, or a keyword.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});if(n.match(/(?::[^:])|\//)&&x(e,n,{vocab:!0,base:!1},t,new Map(o).set(n,!0),l)!==a)throw new r("Invalid JSON-LD syntax; term in form of IRI must expand to definition.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});g["@id"]=a,g._prefix=v&&!g._termHasColon&&null!==a.match(/[:\/\?#\[\]@]$/)}}}if(!("@id"in g))if(g._termHasColon){const r=n.substr(0,w);if(t.hasOwnProperty(r)&&m.createTermDefinition({activeCtx:e,localCtx:t,term:r,defined:o,options:l}),e.mappings.has(r)){const t=n.substr(w+1);g["@id"]=e.mappings.get(r)["@id"]+t}else g["@id"]=n}else if("@type"===n)g["@id"]=n;else{if(!("@vocab"in e))throw new r("Invalid JSON-LD syntax; @context terms must define an @id.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t,term:n});g["@id"]=e["@vocab"]+n}if((!0===u["@protected"]||!0===o.get("@protected")&&!1!==u["@protected"])&&(e.protected[n]=!0,g.protected=!0),o.set(n,!0),"@type"in u){let n=u["@type"];if(!s(n))throw new r("Invalid JSON-LD syntax; an @context @type value must be a string.","jsonld.SyntaxError",{code:"invalid type mapping",context:t});if("@json"===n||"@none"===n){if(m.processingMode(e,1))throw new r(`Invalid JSON-LD syntax; an @context @type value must not be "${n}" in JSON-LD 1.0 mode.`,"jsonld.SyntaxError",{code:"invalid type mapping",context:t})}else if("@id"!==n&&"@vocab"!==n){if(n=x(e,n,{vocab:!0,base:!1},t,o,l),!c(n))throw new r("Invalid JSON-LD syntax; an @context @type value must be an absolute IRI.","jsonld.SyntaxError",{code:"invalid type mapping",context:t});if(0===n.indexOf("_:"))throw new r("Invalid JSON-LD syntax; an @context @type value must be an IRI, not a blank node identifier.","jsonld.SyntaxError",{code:"invalid type mapping",context:t})}g["@type"]=n}if("@container"in u){const n=s(u["@container"])?[u["@container"]]:u["@container"]||[],o=["@list","@set","@index","@language"];let i=!0;const l=n.includes("@set");if(m.processingMode(e,1.1)){if(o.push("@graph","@id","@type"),n.includes("@list")){if(1!==n.length)throw new r("Invalid JSON-LD syntax; @context @container with @list must have no other values","jsonld.SyntaxError",{code:"invalid container mapping",context:t})}else if(n.includes("@graph")){if(n.some(e=>"@graph"!==e&&"@id"!==e&&"@index"!==e&&"@set"!==e))throw new r("Invalid JSON-LD syntax; @context @container with @graph must have no other values other than @id, @index, and @set","jsonld.SyntaxError",{code:"invalid container mapping",context:t})}else i&=n.length<=(l?2:1);if(n.includes("@type")&&(g["@type"]=g["@type"]||"@id",!["@id","@vocab"].includes(g["@type"])))throw new r("Invalid JSON-LD syntax; container: @type requires @type to be @id or @vocab.","jsonld.SyntaxError",{code:"invalid type mapping",context:t})}else i&=!a(u["@container"]),i&=n.length<=1;if(i&=n.every(e=>o.includes(e)),i&=!(l&&n.includes("@list")),!i)throw new r("Invalid JSON-LD syntax; @context @container value must be one of the following: "+o.join(", "),"jsonld.SyntaxError",{code:"invalid container mapping",context:t});if(g.reverse&&!n.every(e=>["@index","@set"].includes(e)))throw new r("Invalid JSON-LD syntax; @context @container value for a @reverse type definition must be @index or @set.","jsonld.SyntaxError",{code:"invalid reverse property",context:t});g["@container"]=n}if("@index"in u){if(!("@container"in u)||!g["@container"].includes("@index"))throw new r(`Invalid JSON-LD syntax; @index without @index in @container: "${u["@index"]}" on term "${n}".`,"jsonld.SyntaxError",{code:"invalid term definition",context:t});if(!s(u["@index"])||0===u["@index"].indexOf("@"))throw new r(`Invalid JSON-LD syntax; @index must expand to an IRI: "${u["@index"]}" on term "${n}".`,"jsonld.SyntaxError",{code:"invalid term definition",context:t});g["@index"]=u["@index"]}if("@context"in u&&(g["@context"]=u["@context"]),"@language"in u&&!("@type"in u)){let e=u["@language"];if(null!==e&&!s(e))throw new r("Invalid JSON-LD syntax; @context @language value must be a string or null.","jsonld.SyntaxError",{code:"invalid language mapping",context:t});null!==e&&(e=e.toLowerCase()),g["@language"]=e}if("@prefix"in u){if(n.match(/:|\//))throw new r("Invalid JSON-LD syntax; @context @prefix used on a compact IRI term","jsonld.SyntaxError",{code:"invalid term definition",context:t});if(m.isKeyword(g["@id"]))throw new r("Invalid JSON-LD syntax; keywords may not be used as prefixes","jsonld.SyntaxError",{code:"invalid term definition",context:t});if("boolean"!=typeof u["@prefix"])throw new r("Invalid JSON-LD syntax; @context value for @prefix must be boolean","jsonld.SyntaxError",{code:"invalid @prefix value",context:t});g._prefix=!0===u["@prefix"]}if("@direction"in u){const e=u["@direction"];if(null!==e&&"ltr"!==e&&"rtl"!==e)throw new r('Invalid JSON-LD syntax; @direction value must be null, "ltr", or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",context:t});g["@direction"]=e}if("@nest"in u){const e=u["@nest"];if(!s(e)||"@nest"!==e&&0===e.indexOf("@"))throw new r("Invalid JSON-LD syntax; @context @nest value must be a string which is not a keyword other than @nest.","jsonld.SyntaxError",{code:"invalid @nest value",context:t});g["@nest"]=e}const j=g["@id"];if("@context"===j||"@preserve"===j)throw new r("Invalid JSON-LD syntax; @context and @preserve cannot be aliased.","jsonld.SyntaxError",{code:"invalid keyword alias",context:t});if(h&&h.protected&&!d&&(e.protected[n]=!0,g.protected=!0,!b(h,g)))throw new r("Invalid JSON-LD syntax; tried to redefine a protected term.","jsonld.SyntaxError",{code:"protected term redefinition",context:t,term:n})},m.expandIri=(e,t,n,o)=>x(e,t,n,void 0,void 0,o),m.getInitialContext=e=>{const t=JSON.stringify({processingMode:e.processingMode}),n=y.get(t);if(n)return n;const r={processingMode:e.processingMode,mappings:new Map,inverse:null,getInverse:function(){const e=this;if(e.inverse)return e.inverse;const t=e.inverse={},n=e.fastCurieMap={},o={},r=(e["@language"]||"@none").toLowerCase(),s=e["@direction"],l=e.mappings,c=[...l.keys()].sort(g);for(const e of c){const a=l.get(e);if(null===a)continue;let c=a["@container"]||"@none";if(c=[].concat(c).sort().join(""),null===a["@id"])continue;const d=v(a["@id"]);for(const l of d){let d=t[l];const u=m.isKeyword(l);if(d)u||a._termHasColon||o[l].push(e);else if(t[l]=d={},!u&&!a._termHasColon){o[l]=[e];const t={iri:l,terms:o[l]};l[0]in n?n[l[0]].push(t):n[l[0]]=[t]}if(d[c]||(d[c]={"@language":{},"@type":{},"@any":{}}),d=d[c],i(e,d["@any"],"@none"),a.reverse)i(e,d["@type"],"@reverse");else if("@none"===a["@type"])i(e,d["@any"],"@none"),i(e,d["@language"],"@none"),i(e,d["@type"],"@none");else if("@type"in a)i(e,d["@type"],a["@type"]);else if("@language"in a&&"@direction"in a){const t=a["@language"],n=a["@direction"];i(e,d["@language"],t&&n?`${t}_${n}`.toLowerCase():t?t.toLowerCase():n?`_${n}`:"@null")}else"@language"in a?i(e,d["@language"],(a["@language"]||"@null").toLowerCase()):"@direction"in a?a["@direction"]?i(e,d["@language"],`_${a["@direction"]}`):i(e,d["@language"],"@none"):s?(i(e,d["@language"],`_${s}`),i(e,d["@language"],"@none"),i(e,d["@type"],"@none")):(i(e,d["@language"],r),i(e,d["@language"],"@none"),i(e,d["@type"],"@none"))}}for(const e in n)a(n,e,1);return t},clone:function(){const e={};return e.mappings=o.clone(this.mappings),e.clone=this.clone,e.inverse=null,e.getInverse=this.getInverse,e.protected=o.clone(this.protected),this.previousContext&&(e.previousContext=this.previousContext.clone()),e.revertToPreviousContext=this.revertToPreviousContext,"@base"in this&&(e["@base"]=this["@base"]),"@language"in this&&(e["@language"]=this["@language"]),"@vocab"in this&&(e["@vocab"]=this["@vocab"]),e},revertToPreviousContext:function(){return this.previousContext?this.previousContext.clone():this},protected:{}};return 1e4===y.size&&y.clear(),y.set(t,r),r;function a(e,t,n){const o=e[t],r=e[t]={};let i,s;for(const e of o)i=e.iri,s=n>=i.length?"":i[n],s in r?r[s].push(e):r[s]=[e];for(const e in r)""!==e&&a(r,e,n+1)}function i(e,t,n){t.hasOwnProperty(n)||(t[n]=e)}},m.getContextValue=(e,t,n)=>{if(null===t){if("@context"===n)return;return null}if(e.mappings.has(t)){const o=e.mappings.get(t);if(l(n))return o;if(o.hasOwnProperty(n))return o[n]}return"@language"===n&&n in e||"@direction"===n&&n in e?e[n]:"@context"!==n?null:void 0},m.processingMode=(e,t)=>t.toString()>="1.1"?!e.processingMode||e.processingMode>="json-ld-"+t.toString():"json-ld-1.0"===e.processingMode,m.isKeyword=e=>{if(!s(e)||"@"!==e[0])return!1;switch(e){case"@base":case"@container":case"@context":case"@default":case"@direction":case"@embed":case"@explicit":case"@graph":case"@id":case"@included":case"@index":case"@json":case"@language":case"@list":case"@nest":case"@none":case"@omitDefault":case"@prefix":case"@preserve":case"@protected":case"@requireAll":case"@reverse":case"@set":case"@type":case"@value":case"@version":case"@vocab":return!0}return!1}},2207:e=>{"use strict";e.exports=class extends Error{constructor(e="An unspecified JSON-LD error occurred.",t="jsonld.Error",n={}){super(e),this.name=t,this.message=e,this.details=n}}},2246:(e,t,n)=>{"use strict";const o=n(2207),{isArray:r}=n(7382),{asArray:a}=n(9263),i={};function s({event:e,handlers:t}){let n=!0;for(let a=0;n&&a<t.length;++a){n=!1;const i=t[a];if(r(i))n=s({event:e,handlers:i});else if("function"==typeof i)i({event:e,next:()=>{n=!0}});else{if("object"!=typeof i)throw new o("Invalid event handler.","jsonld.InvalidEventHandler",{event:e});e.code in i?i[e.code]({event:e,next:()=>{n=!0}}):n=!0}}return n}e.exports=i,i.defaultEventHandler=null,i.setupEventHandler=({options:e={}})=>{const t=[].concat(e.safe?i.safeEventHandler:[],e.eventHandler?a(e.eventHandler):[],i.defaultEventHandler?i.defaultEventHandler:[]);return 0===t.length?null:t},i.handleEvent=({event:e,options:t})=>{s({event:e,handlers:t.eventHandler})};const l=new Set(["empty object","free-floating scalar","invalid @language value","invalid property","null @id value","null @value value","object with only @id","object with only @language","object with only @list","object with only @value","relative @id reference","relative @type reference","relative @vocab reference","reserved @id value","reserved @reverse value","reserved term","blank node predicate","relative graph reference","relative object reference","relative predicate reference","relative subject reference","rdfDirection not set"]);i.safeEventHandler=function({event:e,next:t}){if("warning"===e.level&&l.has(e.code))throw new o("Safe mode validation error.","jsonld.ValidationError",{event:e});t()},i.logEventHandler=function({event:e,next:t}){console.log(`EVENT: ${e.message}`,{event:e}),t()},i.logWarningEventHandler=function({event:e,next:t}){"warning"===e.level&&console.warn(`WARNING: ${e.message}`,{event:e}),t()},i.unhandledEventHandler=function({event:e}){throw new o("No handler for event.","jsonld.UnhandledEvent",{event:e})},i.setDefaultEventHandler=function({eventHandler:e}={}){i.defaultEventHandler=e?a(e):null}},2341:e=>{"use strict";e.exports=function e(t){return null===t||"object"!=typeof t||null!=t.toJSON?JSON.stringify(t):Array.isArray(t)?"["+t.reduce((t,n,o)=>t+(0===o?"":",")+e(void 0===n||"symbol"==typeof n?null:n),"")+"]":"{"+Object.keys(t).sort().reduce((n,o,r)=>void 0===t[o]||"symbol"==typeof t[o]?n:n+(0===n.length?"":",")+e(o)+":"+e(t[o]),"")+"}"}},2438:(e,t,n)=>{"use strict";const o=n(2985),r=n(3751),a=n(9925),i=n(1227);function s(e,t){return e.hash<t.hash?-1:e.hash>t.hash?1:0}e.exports=class{constructor({createMessageDigest:e=()=>new r("sha256"),canonicalIdMap:t=new Map,maxDeepIterations:n=1/0}={}){this.name="URDNA2015",this.blankNodeInfo=new Map,this.canonicalIssuer=new o("_:c14n",t),this.createMessageDigest=e,this.maxDeepIterations=n,this.quads=null,this.deepIterations=null}main(e){this.deepIterations=new Map,this.quads=e;for(const t of e)this._addBlankNodeQuadInfo({quad:t,component:t.subject}),this._addBlankNodeQuadInfo({quad:t,component:t.object}),this._addBlankNodeQuadInfo({quad:t,component:t.graph});const t=new Map,n=[...this.blankNodeInfo.keys()];for(const e of n)this._hashAndTrackBlankNode({id:e,hashToBlankNodes:t});const r=[...t.keys()].sort(),a=[];for(const e of r){const n=t.get(e);if(n.length>1){a.push(n);continue}const o=n[0];this.canonicalIssuer.getId(o)}for(const e of a){const t=[];for(const n of e){if(this.canonicalIssuer.hasId(n))continue;const e=new o("_:b");e.getId(n);const r=this.hashNDegreeQuads(n,e);t.push(r)}t.sort(s);for(const e of t){const t=e.issuer.getOldIds();for(const e of t)this.canonicalIssuer.getId(e)}}const l=[];for(const e of this.quads){const t=i.serializeQuadComponents(this._componentWithCanonicalId({component:e.subject}),e.predicate,this._componentWithCanonicalId({component:e.object}),this._componentWithCanonicalId({component:e.graph}));l.push(t)}return l.sort(),l.join("")}hashFirstDegreeQuads(e){const t=[],n=this.blankNodeInfo.get(e),o=n.quads;for(const n of o){const o={subject:null,predicate:n.predicate,object:null,graph:null};o.subject=this.modifyFirstDegreeComponent(e,n.subject,"subject"),o.object=this.modifyFirstDegreeComponent(e,n.object,"object"),o.graph=this.modifyFirstDegreeComponent(e,n.graph,"graph"),t.push(i.serializeQuad(o))}t.sort();const r=this.createMessageDigest();for(const e of t)r.update(e);return n.hash=r.digest(),n.hash}hashRelatedBlankNode(e,t,n,o){let r;r=this.canonicalIssuer.hasId(e)?this.canonicalIssuer.getId(e):n.hasId(e)?n.getId(e):this.blankNodeInfo.get(e).hash;const a=this.createMessageDigest();return a.update(o),"g"!==o&&a.update(this.getRelatedPredicate(t)),a.update(r),a.digest()}hashNDegreeQuads(e,t){const n=this.deepIterations.get(e)||0;if(n>this.maxDeepIterations)throw new Error(`Maximum deep iterations (${this.maxDeepIterations}) exceeded.`);this.deepIterations.set(e,n+1);const o=this.createMessageDigest(),r=this.createHashToRelated(e,t),i=[...r.keys()].sort();for(const e of i){o.update(e);let n,i="";const s=new a(r.get(e));for(;s.hasNext();){const e=s.next();let o=t.clone(),r="";const a=[];let l=!1;for(const t of e)if(this.canonicalIssuer.hasId(t)?r+=this.canonicalIssuer.getId(t):(o.hasId(t)||a.push(t),r+=o.getId(t)),0!==i.length&&r>i){l=!0;break}if(!l){for(const e of a){const t=this.hashNDegreeQuads(e,o);if(r+=o.getId(e),r+=`<${t.hash}>`,o=t.issuer,0!==i.length&&r>i){l=!0;break}}l||(0===i.length||r<i)&&(i=r,n=o)}}o.update(i),t=n}return{hash:o.digest(),issuer:t}}modifyFirstDegreeComponent(e,t){return"BlankNode"!==t.termType?t:{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return`<${e.predicate.value}>`}createHashToRelated(e,t){const n=new Map,o=this.blankNodeInfo.get(e).quads;for(const r of o)this._addRelatedBlankNodeHash({quad:r,component:r.subject,position:"s",id:e,issuer:t,hashToRelated:n}),this._addRelatedBlankNodeHash({quad:r,component:r.object,position:"o",id:e,issuer:t,hashToRelated:n}),this._addRelatedBlankNodeHash({quad:r,component:r.graph,position:"g",id:e,issuer:t,hashToRelated:n});return n}_hashAndTrackBlankNode({id:e,hashToBlankNodes:t}){const n=this.hashFirstDegreeQuads(e),o=t.get(n);o?o.push(e):t.set(n,[e])}_addBlankNodeQuadInfo({quad:e,component:t}){if("BlankNode"!==t.termType)return;const n=t.value,o=this.blankNodeInfo.get(n);o?o.quads.add(e):this.blankNodeInfo.set(n,{quads:new Set([e]),hash:null})}_addRelatedBlankNodeHash({quad:e,component:t,position:n,id:o,issuer:r,hashToRelated:a}){if("BlankNode"!==t.termType||t.value===o)return;const i=t.value,s=this.hashRelatedBlankNode(i,e,r,n),l=a.get(s);l?l.push(i):a.set(s,[i])}_componentWithCanonicalId({component:e}){return"BlankNode"!==e.termType||e.value.startsWith(this.canonicalIssuer.prefix)?e:{termType:"BlankNode",value:this.canonicalIssuer.getId(e.value)}}}},2791:function(e,t,n){!function(e){"use strict";if(!e.setImmediate){var t,n,o,r,a,i=1,s={},l=!1,c=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?t=function(e){process.nextTick(function(){p(e)})}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?(r="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(r)&&p(+t.data.slice(r.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),t=function(t){e.postMessage(r+t,"*")}):e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){p(e.data)},t=function(e){o.port2.postMessage(e)}):c&&"onreadystatechange"in c.createElement("script")?(n=c.documentElement,t=function(e){var t=c.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,n.removeChild(t),t=null},n.appendChild(t)}):t=function(e){setTimeout(p,0,e)},d.setImmediate=function(e){"funct