/*! For license information please see rdflib.min.js.LICENSE.txt */ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("window")):"function"==typeof define&&define.amd?define(["window"],e):"object"==typeof exports?exports.$rdf=e(require("window")):t.$rdf=e(t.window)}(self,(t=>(()=>{var e,r,n,i,o={9390:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n={Literal:1,Collection:3,Graph:4,NamedNode:5,BlankNode:6,Variable:7}},3787:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n={debug:function(t){},warn:function(t){},info:function(t){},error:function(t){},success:function(t){},msg:function(t){}}},3627:(t,e,r)=>{"use strict";r.d(e,{A:()=>v});var n=r(9121),i=r(2937),o=r(365),a=r(8782),s=r(9604),u=r(8175),c=r(9390),l=r(1605),h=r(6866),f=r(362),p=r(546);function d(t,e,r){return e=(0,a.A)(e),(0,o.A)(t,y()?Reflect.construct(e,r||[],(0,a.A)(t).constructor):e.apply(t,r))}function y(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(y=function(){return!!t})()}var v=function(t){function e(t){var r;if((0,n.A)(this,e),r=d(this,e,[(0,f.E)(t)]),(0,u.A)(r,"termType",h.Kk),(0,u.A)(r,"classOrder",c.A.NamedNode),!r.value)throw new Error("Missing IRI for NamedNode");if(!r.value.includes(":"))throw new Error('NamedNode IRI "'+t+'" must be absolute.');if(r.value.includes(" "))throw new Error('Error: NamedNode IRI "'+t+'" must not contain unencoded spaces.');return r}return(0,s.A)(e,t),(0,i.A)(e,[{key:"dir",value:function(){var t=this.value.split("#")[0],r=t.slice(0,-1).lastIndexOf("/"),n=t.indexOf("//");return n>=0&&r"}},{key:"id",value:function(){return this.value.split("#")[1]}},{key:"uri",get:function(){return this.value},set:function(t){this.value=t}}],[{key:"fromValue",value:function(t){return null==t||(0,p.D0)(t)?t:new e(t)}}])}(l.A)},1605:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var n=r(9121),i=r(2937),o=r(8175),a=function(){return(0,i.A)((function t(e){(0,n.A)(this,t),(0,o.A)(this,"termType",void 0),(0,o.A)(this,"classOrder",void 0),(0,o.A)(this,"value",void 0),this.value=e}),[{key:"substitute",value:function(t){return this}},{key:"compareTerm",value:function(t){return this.classOrdert.classOrder?1:this.valuet.value?1:0}},{key:"equals",value:function(t){return!!t&&this.termType===t.termType&&this.value===t.value}},{key:"hashString",value:function(){return this.toCanonical()}},{key:"sameTerm",value:function(t){return this.equals(t)}},{key:"toCanonical",value:function(){return this.toNT()}},{key:"toNT",value:function(){return this.toString()}},{key:"toNQ",value:function(){return this.toNT()}},{key:"toString",value:function(){throw new Error("Node.toString() is abstract - see the subclasses instead")}}])}();(0,o.A)(a,"fromValue",void 0),(0,o.A)(a,"toJS",void 0)},6866:(t,e,r)=>{"use strict";r.d(e,{$Q:()=>i,BR:()=>y,Fn:()=>w,H:()=>_,JG:()=>m,K9:()=>b,Kk:()=>n,MG:()=>d,P2:()=>a,QW:()=>o,S:()=>c,_0:()=>v,bD:()=>l,bM:()=>g,hu:()=>x,i2:()=>f,ic:()=>s,lc:()=>h,ny:()=>p,r0:()=>u,sT:()=>A});var n="NamedNode",i="BlankNode",o="Literal",a="Variable",s="DefaultGraph",u="Collection",c="Empty",l="Graph",h="text/html",f="application/ld+json",p="text/n3",d="application/n3",y="application/nquads",v="application/n-quads",g="application/n-triples",m="application/rdf+xml",b="application/sparql-update",w="application/sparql-update-single-match",A="text/turtle",x="application/x-turtle",_="application/xhtml+xml"},4221:(t,e,r)=>{"use strict";r.r(e),r.d(e,{docpart:()=>a,document:()=>s,hostpart:()=>u,join:()=>c,protocol:()=>l,refTo:()=>h});var n=r(3627),i=r(6357),o=o||i.log;function a(t){var e;return(e=t.indexOf("#"))<0?t:t.slice(0,e)}function s(t){return new n.A(a(t))}function u(t){var e=/[^\/]*\/\/([^\/]*)\//.exec(t);return e?e[1]:""}function c(t,e){var r,n,i,a,s,u=e.indexOf("#");if(u>0&&(e=e.slice(0,u)),0===t.length)return e;if(0===t.indexOf("#"))return e+t;if(t.indexOf(":")>=0)return t;if(r=e.indexOf(":"),0===e.length)return t;if(r<0)return o("Invalid base: "+e+" in join with given: "+t),t;if(n=e.slice(0,+r+1||9e9),0===t.indexOf("//"))return n+t;if(e.indexOf("//",r)===r+1){if((i=e.indexOf("/",r+3))<0)return e.length-r-3>0?e+"/"+t:n+t}else if((i=e.indexOf("/",r+1))<0)return e.length-r-1>0?e+"/"+t:n+t;if(0===t.indexOf("/"))return e.slice(0,i)+t;if((a=(s=e.slice(i)).lastIndexOf("/"))<0)return n+t;for(a>=0&&a0&&"/"!==e[r-1];)r--;if(r<3)return e;if(t.indexOf("//",r-2)>0||e.indexOf("//",r-2)>0)return e;if(t.indexOf(":",r)>0)return e;for(s=0,c=0,a=(h=t.slice(r)).length;c0)for(l=1,f=s;f>=1?l<=f:l>=f;f>=1?++l:--l)p+="../";return p+e.slice(r)}},7114:(t,e,r)=>{"use strict";r.r(e),r.d(e,{DOMParserFactory:()=>f,RDFArrayRemove:()=>w,callbackify:()=>h,domToString:()=>p,dtstamp:()=>y,dumpNode:()=>d,heavyCompare:()=>v,heavyCompareSPO:()=>g,linkRelationProperty:()=>l,log:()=>n.A,mediaTypeClass:()=>c,output:()=>m,parseXML:()=>b,stackString:()=>x,string:()=>u,string_startswith:()=>A,uri:()=>i});var n=r(3787),i=r(4221),o=r(3627),a=r(8392);t=r.hmd(t);var s=r(6357),u={template:function(t,e){for(var r=t.split("%s"),n="",i=0;i=0;r--)t.callbacks[e[r]]=[];t.addHook=function(e){t.callbacks[e]||(t.callbacks[e]=[])},t.addCallback=function(e,r){t.callbacks[e].push(r)},t.removeCallback=function(e,r){for(var n=0;n=0;n--)(i=t.callbacks[e][n])&&i.apply(t,r)&&o.push(i);for(n=o.length-1;n>=0;n--)a.push(o[n]);for(n=s;n=0;i--){var l=t.attributes[i];if(!(n&&n.length>0&&n[l.name]||/^\d+$/.test(l.name))){if("class"===l.name&&e&&e.replaceClassItemWith&&l.value.split(" ").indexOf(e.replaceClassItemWith.source)>-1){var h=new RegExp(e.replaceClassItemWith.source,"g");l.value=l.value.replace(h,e.replaceClassItemWith.target).trim()}"class"===l.name&&e&&e.skipClassWithValue&&e.skipClassWithValue===l.value||c.push(l.name+"='"+l.value.replace(/&/g,"&").replace(//g,">").replace(/'/g,""")+"'")}}if(c.length>0&&(e&&e.sortAttributes&&c.sort((function(t,e){return t.toLowerCase().localeCompare(e.toLowerCase())})),o+=" "+c.join(" ")),r&&r.ename)o+=" />";else{for(o+=">",o+="html"===u?"\n ":"",a.push("style"===u||"script"===u),i=0;i\n":""}}}else if(8===t.nodeType)o+="\x3c!--"+t.nodeValue+"--\x3e";else if(3===t.nodeType||4===t.nodeType){var f=t.nodeValue.replace(/\n+$/,"");o+=a[a.length-1]?f:f.replace(/&/g,"&").replace(//g,">")}else s.log("Warning; Cannot handle serialising nodes of type: "+t.nodeType),s.log(t);return o}function y(){var t=new Date,e=t.getYear()+1900,r=t.getMonth()+1,n=t.getDate(),i=t.getUTCHours(),o=t.getUTCMinutes(),a=t.getSeconds();return r<10&&(r="0"+r),n<10&&(n="0"+n),i<10&&(i="0"+i),o<10&&(o="0"+o),a<10&&(a="0"+a),e+"-"+r+"-"+n+"T"+i+":"+o+":"+a+"Z"}function v(t,e,r,n){var i=function(t){return"BlankNode"===t.termType?null:t},o=function(t){var e=r.statementsMatching(t).map((function(t){return i(t.subject)+" "+i(t.predicate)+" "+i(t.object)})).concat(r.statementsMatching(void 0,void 0,t).map((function(t){return i(t.subject)+" "+i(t.predicate)+" "+i(t.object)})));return e.sort(),e.join("\n")},a=Object.prototype.hasOwnProperty.call(r,"compareTerms")?r.compareTerms(t,e):t.compareTerm(e);return"BlankNode"===t.termType&&"BlankNode"===e.termType?0===a?0:o(t)>o(e)?1:o(t)-1)break;"("==o.charAt(0)&&(o="function"+o);var a=o.split("@");n.push(a)}for(i=0;i{"use strict";function n(t){return"string"==typeof t?t:t.value}r.d(e,{E:()=>n})},546:(t,e,r)=>{"use strict";r.d(e,{CZ:()=>c,D0:()=>f,DJ:()=>u,DZ:()=>h,GE:()=>b,P3:()=>s,RN:()=>w,SH:()=>o,Y2:()=>y,YC:()=>m,aF:()=>d,c$:()=>p,fY:()=>l,hr:()=>g,jt:()=>v,ok:()=>a});var n=r(4360),i=r(6866);function o(t){return"object"===(0,n.A)(t)&&null!==t&&"subject"in t}function a(t){return"object"===(0,n.A)(t)&&null!==t&&"statements"in t}function s(t){return f(t)&&t.termType===i.r0}function u(t){return t&&Object.prototype.hasOwnProperty.call(t,"termType")&&(t.termType===i.Kk||t.termType===i.P2||t.termType===i.$Q||t.termType===i.r0||t.termType===i.QW||t.termType===i.bD)}function c(t){return t&&Object.prototype.hasOwnProperty.call(t,"termType")&&(t.termType===i.Kk||t.termType===i.P2||t.termType===i.$Q||t.termType===i.r0||t.termType===i.QW||t.termType===i.bD)}function l(t){return f(t)&&(t.termType===i.Kk||t.termType===i.$Q||t.termType===i.P2)}function h(t){return f(t)&&t.termType===i.P2}function f(t){return"object"===(0,n.A)(t)&&null!==t&&"termType"in t}function p(t){return t.termType===i.QW}function d(t){return"object"===(0,n.A)(t)&&null!==t&&"subject"in t&&"predicate"in t&&"object"in t}function y(t){return f(t)&&"NamedNode"===t.termType}function v(t){return f(t)&&"termType"in t&&"BlankNode"===t.termType}function g(t){return f(t)&&(t.termType===i.Kk||t.termType===i.P2||t.termType===i.$Q)}function m(t){return f(t)&&(t.termType===i.Kk||t.termType===i.P2)}function b(t){return f(t)&&(t.termType===i.Kk||t.termType===i.P2||t.termType===i.$Q||t.termType===i.QW)}function w(t){return f(t)&&(t.termType===i.Kk||t.termType===i.P2||t.termType===i.$Q||t.termType===i.ic)}},2312:function(t,e,r){var n,i;void 0===(i="function"==typeof(n=function(){"use strict";function t(e,r,n,i){this.message=e,this.expected=r,this.found=n,this.location=i,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t)}return function(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}(t,Error),t.buildMessage=function(t,e){var r={literal:function(t){return'"'+i(t.text)+'"'},class:function(t){var e,r="";for(e=0;e0){for(e=1,n=1;eArray.isArray(t))).forEach((t=>{t.forEach((t=>{e["@graph"].push(t)}))})),1===e["@graph"].length&&(Object.assign(e,e["@graph"][0]),delete e["@graph"]),e},c=".",l=Hr(".",!1),h=function(t){return t},f="#",p=Hr("#",!1),d=/^[^\n]/,y=$r(["\n"],!0,!1),v="\n",g=Hr("\n",!1),m=function(t){return t.join("")},b="@prefix",w=Hr("@prefix",!1),A=function(t,e){return _n.addPrefix(""===t?"0":t,e),{}},x="@base",_=Hr("@base",!1),k=function(t){return _n.addBase(t),{}},T=/^[Bb]/,E=$r(["B","b"],!1,!1),O=/^[Aa]/,j=$r(["A","a"],!1,!1),N=/^[Ss]/,S=$r(["S","s"],!1,!1),R=/^[Ee]/,I=$r(["E","e"],!1,!1),C=/^[Pp]/,P=$r(["P","p"],!1,!1),F=/^[Rr]/,U=$r(["R","r"],!1,!1),D=/^[Ff]/,L=$r(["F","f"],!1,!1),M=/^[Ii]/,B=$r(["I","i"],!1,!1),q=/^[Xx]/,H=$r(["X","x"],!1,!1),$=function(t,e){var r={};return"string"==typeof t&&"[]"!==t?r["@id"]=t:"object"==typeof t&&Object.assign(r,t),e&&Object.assign(r,e),[r]},z=function(t,e){var r={};return t&&Object.assign(r,t),e&&Object.assign(r,e),[r]},X=";",G=Hr(";",!1),V=function(t,e,r,n){var i={};return i[r]=n,i},W=function(t,e,r){return r},Q=function(t,e,r){var n={};return r.unshift(function(t,e){var r={};return r[t]=e,r}(t,e)),r.forEach((t=>{t&&Object.keys(t).forEach((e=>{t[e].forEach((t=>{"@type"===e&&void 0!==t["@id"]&&(t=t["@id"]),void 0===n[e]?n[e]=t:Array.isArray(n[e])?n[e].push(t):n[e]=[n[e],t]}))}))})),n},Y=",",J=Hr(",",!1),Z=function(t,e){return e},K=function(t,e){return e.unshift(t),e},tt="a",et=Hr("a",!1),rt=function(){return"@type"},nt=function(t){return kn(t,!0)},it=function(t){return kn(t,!1)},ot=function(t){return"[]"===t?{}:{"@id":t}},at=function(t){return{"@id":t}},st="[",ut=Hr("[",!1),ct="]",lt=Hr("]",!1),ht="(",ft=Hr("(",!1),pt=")",dt=Hr(")",!1),yt=function(t){return{"@list":t}},vt=function(t,e){return{"@value":t,"@language":e}},gt="^^",mt=Hr("^^",!1),bt=function(t,e){if("http://www.w3.org/2001/XMLSchema#boolean"===e&&"true"===t)return!0;if("http://www.w3.org/2001/XMLSchema#boolean"===e&&"false"===t)return!1;if("http://www.w3.org/2001/XMLSchema#integer"===e)return parseInt(t);if("http://www.w3.org/2001/XMLSchema#double"===e)return parseFloat(t);const r=_n.resolve(e,!0);if(r){const n=e.split(":")[0];if("http://www.w3.org/2001/XMLSchema#boolean"===r&&"true"===t)return _n.decrement(n),!0;if("http://www.w3.org/2001/XMLSchema#boolean"===r&&"false"===t)return _n.decrement(n),!1;if("http://www.w3.org/2001/XMLSchema#integer"===r)return _n.decrement(n),parseInt(t);if("http://www.w3.org/2001/XMLSchema#double"===r)return _n.decrement(n),parseFloat(t)}return{"@value":t,"@type":e}},wt="true",At=Hr("true",!1),xt=function(){return!0},_t="false",kt=Hr("false",!1),Tt=function(){return!1},Et=function(t){return t+":"},Ot="<",jt=Hr("<",!1),Nt=/^[^\0- <>"{}|\^`\\]/,St=$r([["\0"," "],"<",">",'"',"{","}","|","^","`","\\"],!0,!1),Rt=">",It=Hr(">",!1),Ct=function(t){const e=t.map((t=>65536<=t.codePointAt(0)&&t.codePointAt(0)<=983039?"a":1===t.length?t:6===t.length?String.fromCharCode("0x"+t.substring(2)):10===t.length?String.fromCodePoint("0x"+t.substring(2)):t)).join("");if(e.match(/^[^\u0000-\u0020<>"{}|^`\\]*$/)){var r=t.join("");try{return _n.resolve(r)}catch(t){qr("Invalid IRIREF "+r)}}else qr("Invalid IRIREF "+t.join("")+" / "+e)},Pt=":",Ft=Hr(":",!1),Ut=function(t){return t=t||"0",!1===_n.hasPrefix(t)&&qr("undefined prefix "+t),t},Dt=function(t){return t||""},Lt=function(t,e){return _n.increment(t),_n.resolve(t+":"+e)},Mt="_:",Bt=Hr("_:",!1),qt=/^[0-9]/,Ht=$r([["0","9"]],!1,!1),$t="@",zt=Hr("@",!1),Xt=/^[a-zA-Z]/,Gt=$r([["a","z"],["A","Z"]],!1,!1),Vt="-",Wt=Hr("-",!1),Qt=/^[a-zA-Z0-9]/,Yt=$r([["a","z"],["A","Z"],["0","9"]],!1,!1),Jt=function(t,e){return"-"+e.join("")},Zt=function(t,e){return t.join("")+e.join("")},Kt=/^[+\-]/,te=$r(["+","-"],!1,!1),ee=function(t){return t.match(/^[0+][0-9]+$/)?{"@value":t,"@type":"http://www.w3.org/2001/XMLSchema#integer"}:parseInt(t)},re=function(t){return{"@value":t,"@type":"http://www.w3.org/2001/XMLSchema#decimal"}},ne=function(t){return{"@value":t,"@type":"http://www.w3.org/2001/XMLSchema#double"}},ie=/^[eE]/,oe=$r(["e","E"],!1,!1),ae='"',se=Hr('"',!1),ue=/^[^"\\\n\r]/,ce=$r(['"',"\\","\n","\r"],!0,!1),le="'",he=Hr("'",!1),fe=/^[^'\\\n\r]/,pe=$r(["'","\\","\n","\r"],!0,!1),de="'''",ye=Hr("'''",!1),ve=/^[^'\\]/,ge=$r(["'","\\"],!0,!1),me="''",be=Hr("''",!1),we=function(t,e){return"''"+e.join("")},Ae=function(t,e){return"'"+e.join("")},xe=function(t,e){return t.join("")+e.join("")},_e='"""',ke=Hr('"""',!1),Te=/^[^"\\]/,Ee=$r(['"',"\\"],!0,!1),Oe='""',je=Hr('""',!1),Ne=function(t,e){return'""'+e.join("")},Se=function(t,e){return'"'+e.join("")},Re="\\U",Ie=Hr("\\U",!1),Ce=function(t){return String.fromCodePoint(parseInt(t.join(""),16))},Pe="\\u",Fe=Hr("\\u",!1),Ue=function(t){return String.fromCharCode(parseInt(t.join(""),16))},De="\\t",Le=Hr("\\t",!1),Me=function(){return"\t"},Be="\\b",qe=Hr("\\b",!1),He=function(){return"\b"},$e="\\n",ze=Hr("\\n",!1),Xe=function(){return"\n"},Ge="\\r",Ve=Hr("\\r",!1),We=function(){return"\r"},Qe="\\f",Ye=Hr("\\f",!1),Je=function(){return"\f"},Ze='\\"',Ke=Hr('\\"',!1),tr=function(){return'"'},er="\\'",rr=Hr("\\'",!1),nr=function(){return"'"},ir="\\\\",or=Hr("\\\\",!1),ar=function(){return"\\"},sr=/^[ \t\r\n]/,ur=$r([" ","\t","\r","\n"],!1,!1),cr=function(){return"[]"},lr=/^[\uD800-\uDBFF]/,hr=$r([["\ud800","\udbff"]],!1,!1),fr=/^[\uDC00-\uDFFF]/,pr=$r([["\udc00","\udfff"]],!1,!1),dr=function(t,e){return t+e},yr=/^[A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,vr=$r([["A","Z"],["a","z"],["À","Ö"],["Ø","ö"],["ø","˿"],["Ͱ","ͽ"],["Ϳ","῿"],["‌","‍"],["⁰","↏"],["Ⰰ","⿯"],["、","퟿"],["豈","﷏"],["ﷰ","�"]],!1,!1),gr="_",mr=Hr("_",!1),br="·",wr=Hr("·",!1),Ar=/^[\u0300-\u036F]/,xr=$r([["̀","ͯ"]],!1,!1),_r=/^[\u203F-\u2040]/,kr=$r([["‿","⁀"]],!1,!1),Tr=function(t,e,r,n){return r.join("")+n.join("")},Er=function(t,e,r){return t+e.join("")+r.join("")},Or="%",jr=Hr("%",!1),Nr=/^[0-9A-Fa-f]/,Sr=$r([["0","9"],["A","F"],["a","f"]],!1,!1),Rr="\\",Ir=Hr("\\",!1),Cr=/^[_~.!$&'()*+,;=\/?#@%\-]/,Pr=$r(["_","~",".","!","$","&","'","(",")","*","+",",",";","=","/","?","#","@","%","-"],!1,!1),Fr=0,Ur=0,Dr=[{line:1,column:1}],Lr=0,Mr=[],Br=0;if("startRule"in n){if(!(n.startRule in a))throw new Error("Can't start parsing from rule \""+n.startRule+'".');s=a[n.startRule]}function qr(e,r){throw function(e,r){return new t(e,null,null,r)}(e,r=void 0!==r?r:Xr(Ur,Fr))}function Hr(t,e){return{type:"literal",text:t,ignoreCase:e}}function $r(t,e,r){return{type:"class",parts:t,inverted:e,ignoreCase:r}}function zr(t){var r,n=Dr[t];if(n)return n;for(r=t-1;!Dr[r];)r--;for(n={line:(n=Dr[r]).line,column:n.column};rLr&&(Lr=Fr,Mr=[]),Mr.push(t))}function Vr(){var t,e,r,n;for(t=Fr,e=[],r=Wr();r!==o;)e.push(r),r=Wr();if(e!==o){for(r=[],n=Qr();n!==o;)r.push(n),n=Qr();r!==o?(Ur=t,t=e=u(e)):(Fr=t,t=o)}else Fr=t,t=o;return t}function Wr(){var t,r,n,i;if((t=function(){var t;return(t=function(){var t,r,n,i,a,s,u,h,f;for(t=Fr,r=[],n=Qr();n!==o;)r.push(n),n=Qr();if(r!==o)if(e.substr(Fr,7)===b?(n=b,Fr+=7):(n=o,0===Br&&Gr(w)),n!==o){for(i=[],a=Qr();a!==o;)i.push(a),a=Qr();if(i!==o)if((a=un())!==o){for(s=[],u=Qr();u!==o;)s.push(u),u=Qr();if(s!==o)if((u=an())!==o){for(h=[],f=Qr();f!==o;)h.push(f),f=Qr();h!==o?(46===e.charCodeAt(Fr)?(f=c,Fr++):(f=o,0===Br&&Gr(l)),f!==o?(Ur=t,t=r=A(a,u)):(Fr=t,t=o)):(Fr=t,t=o)}else Fr=t,t=o;else Fr=t,t=o}else Fr=t,t=o;else Fr=t,t=o}else Fr=t,t=o;else Fr=t,t=o;return t}())===o&&(t=function(){var t,r,n,i,a,s,u;for(t=Fr,r=[],n=Qr();n!==o;)r.push(n),n=Qr();if(r!==o)if(e.substr(Fr,5)===x?(n=x,Fr+=5):(n=o,0===Br&&Gr(_)),n!==o){for(i=[],a=Qr();a!==o;)i.push(a),a=Qr();if(i!==o)if((a=an())!==o){for(s=[],u=Qr();u!==o;)s.push(u),u=Qr();s!==o?(46===e.charCodeAt(Fr)?(u=c,Fr++):(u=o,0===Br&&Gr(l)),u!==o?(Ur=t,t=r=k(a)):(Fr=t,t=o)):(Fr=t,t=o)}else Fr=t,t=o;else Fr=t,t=o}else Fr=t,t=o;else Fr=t,t=o;return t}())===o&&(t=function(){var t,r,n,i,a,s,u,c,l,h,f,p;for(t=Fr,r=[],n=Qr();n!==o;)r.push(n),n=Qr();if(r!==o)if(C.test(e.charAt(Fr))?(n=e.charAt(Fr),Fr++):(n=o,0===Br&&Gr(P)),n!==o)if(F.test(e.charAt(Fr))?(i=e.charAt(Fr),Fr++):(i=o,0===Br&&Gr(U)),i!==o)if(R.test(e.charAt(Fr))?(a=e.charAt(Fr),Fr++):(a=o,0===Br&&Gr(I)),a!==o)if(D.test(e.charAt(Fr))?(s=e.charAt(Fr),Fr++):(s=o,0===Br&&Gr(L)),s!==o)if(M.test(e.charAt(Fr))?(u=e.charAt(Fr),Fr++):(u=o,0===Br&&Gr(B)),u!==o)if(q.test(e.charAt(Fr))?(c=e.charAt(Fr),Fr++):(c=o,0===Br&&Gr(H)),c!==o){for(l=[],h=Qr();h!==o;)l.push(h),h=Qr();if(l!==o)if((h=un())!==o){for(f=[],p=Qr();p!==o;)f.push(p),p=Qr();f!==o&&(p=an())!==o?(Ur=t,t=r=A(h,p)):(Fr=t,t=o)}else Fr=t,t=o;else Fr=t,t=o}else Fr=t,t=o;else Fr=t,t=o;else Fr=t,t=o;else Fr=t,t=o;else Fr=t,t=o;else Fr=t,t=o;else Fr=t,t=o;return t}())===o&&(t=function(){var t,r,n,i,a,s,u,c;for(t=Fr,r=[],n=Qr();n!==o;)r.push(n),n=Qr();if(r!==o)if(T.test(e.charAt(Fr))?(n=e.charAt(Fr),Fr++):(n=o,0===Br&&Gr(E)),n!==o)if(O.test(e.charAt(Fr))?(i=e.charAt(Fr),Fr++):(i=o,0===Br&&Gr(j)),i!==o)if(N.test(e.charAt(Fr))?(a=e.charAt(Fr),Fr++):(a=o,0===Br&&Gr(S)),a!==o)if(R.test(e.charAt(Fr))?(s=e.charAt(Fr),Fr++):(s=o,0===Br&&Gr(I)),s!==o){for(u=[],c=Qr();c!==o;)u.push(c),c=Qr();u!==o&&(c=an())!==o?(Ur=t,t=r=k(c)):(Fr=t,t=o)}else Fr=t,t=o;else Fr=t,t=o;else Fr=t,t=o;else Fr=t,t=o;else Fr=t,t=o;return t}()),t}())===o)if(t=Fr,(r=function(){var t,e,r;return t=Fr,(e=function(){var t,e;return t=Fr,(e=en())!==o&&(Ur=t,e=nt(e)),(t=e)===o&&(t=on())===o&&(t=nn()),t}())!==o&&(r=Yr())!==o?(Ur=t,t=e=$(e,r)):(Fr=t,t=o),t===o&&(t=Fr,(e=tn())!==o?((r=Yr())===o&&(r=null),r!==o?(Ur=t,t=e=z(e,r)):(Fr=t,t=o)):(Fr=t,t=o)),t}())!==o){for(n=[],i=Qr();i!==o;)n.push(i),i=Qr();n!==o?(46===e.charCodeAt(Fr)?(i=c,Fr++):(i=o,0===Br&&Gr(l)),i!==o?(Ur=t,t=r=h(r)):(Fr=t,t=o)):(Fr=t,t=o)}else Fr=t,t=o;return t}function Qr(){var t;return(t=function(){var t;return sr.test(e.charAt(Fr))?(t=e.charAt(Fr),Fr++):(t=o,0===Br&&Gr(ur)),t}())===o&&(t=function(){var t,r,n,i;if(t=Fr,35===e.charCodeAt(Fr)?(r=f,Fr++):(r=o,0===Br&&Gr(p)),r!==o){for(n=[],d.test(e.charAt(Fr))?(i=e.charAt(Fr),Fr++):(i=o,0===Br&&Gr(y));i!==o;)n.push(i),d.test(e.charAt(Fr))?(i=e.charAt(Fr),Fr++):(i=o,0===Br&&Gr(y));n!==o?(10===e.charCodeAt(Fr)?(i=v,Fr++):(i=o,0===Br&&Gr(g)),i!==o?(Ur=t,t=r=m(n)):(Fr=t,t=o)):(Fr=t,t=o)}else Fr=t,t=o;return t}()),t}function Yr(){var t,r,n,i,a,s,u,c,l,h;if(t=Fr,(r=Zr())!==o)if((n=Jr())!==o){for(i=[],a=Fr,s=[],u=Qr();u!==o;)s.push(u),u=Qr();for(s!==o?(59===e.charCodeAt(Fr)?(u=X,Fr++):(u=o,0===Br&&Gr(G)),u!==o?(c=Fr,(l=Zr())!==o&&(h=Jr())!==o?(Ur=c,c=l=V(r,n,l,h)):(Fr=c,c=o),c===o&&(c=null),c!==o?(Ur=a,a=s=W(r,n,c)):(Fr=a,a=o)):(Fr=a,a=o)):(Fr=a,a=o);a!==o;){for(i.push(a),a=Fr,s=[],u=Qr();u!==o;)s.push(u),u=Qr();s!==o?(59===e.charCodeAt(Fr)?(u=X,Fr++):(u=o,0===Br&&Gr(G)),u!==o?(c=Fr,(l=Zr())!==o&&(h=Jr())!==o?(Ur=c,c=l=V(r,n,l,h)):(Fr=c,c=o),c===o&&(c=null),c!==o?(Ur=a,a=s=W(r,n,c)):(Fr=a,a=o)):(Fr=a,a=o)):(Fr=a,a=o)}i!==o?(Ur=t,t=r=Q(r,n,i)):(Fr=t,t=o)}else Fr=t,t=o;else Fr=t,t=o;return t}function Jr(){var t,r,n,i,a,s,u;if(t=Fr,(r=Kr())!==o){for(n=[],i=Fr,a=[],s=Qr();s!==o;)a.push(s),s=Qr();for(a!==o?(44===e.charCodeAt(Fr)?(s=Y,Fr++):(s=o,0===Br&&Gr(J)),s!==o&&(u=Kr())!==o?(Ur=i,i=a=Z(r,u)):(Fr=i,i=o)):(Fr=i,i=o);i!==o;){for(n.push(i),i=Fr,a=[],s=Qr();s!==o;)a.push(s),s=Qr();a!==o?(44===e.charCodeAt(Fr)?(s=Y,Fr++):(s=o,0===Br&&Gr(J)),s!==o&&(u=Kr())!==o?(Ur=i,i=a=Z(r,u)):(Fr=i,i=o)):(Fr=i,i=o)}n!==o?(Ur=t,t=r=K(r,n)):(Fr=t,t=o)}else Fr=t,t=o;return t}function Zr(){var t,r,n;if(t=Fr,(r=function(){var t,e,r;for(t=Fr,e=[],r=Qr();r!==o;)e.push(r),r=Qr();return e!==o&&(r=nn())!==o?(Ur=t,t=e=h(r)):(Fr=t,t=o),t}())!==o&&(Ur=t,r=h(r)),(t=r)===o){for(t=Fr,r=[],n=Qr();n!==o;)r.push(n),n=Qr();r!==o?(97===e.charCodeAt(Fr)?(n=tt,Fr++):(n=o,0===Br&&Gr(et)),n!==o?(Ur=t,t=r=rt()):(Fr=t,t=o)):(Fr=t,t=o)}return t}function Kr(){var t,r;return(t=function(){var t;return(t=function(){var t,r,n,i,a,s,u;for(t=Fr,r=[],n=Qr();n!==o;)r.push(n),n=Qr();if(r!==o)if((n=rn())!==o){for(i=[],a=Qr();a!==o;)i.push(a),a=Qr();i!==o&&(a=function(){var t,r,n,i,a,s,u,c;if(t=Fr,64===e.charCodeAt(Fr)?(r=$t,Fr++):(r=o,0===Br&&Gr(zt)),r!==o){if(n=[],Xt.test(e.charAt(Fr))?(i=e.charAt(Fr),Fr++):(i=o,0===Br&&Gr(Gt)),i!==o)for(;i!==o;)n.push(i),Xt.test(e.charAt(Fr))?(i=e.charAt(Fr),Fr++):(i=o,0===Br&&Gr(Gt));else n=o;if(n!==o){if(i=[],a=Fr,45===e.charCodeAt(Fr)?(s=Vt,Fr++):(s=o,0===Br&&Gr(Wt)),s!==o){if(u=[],Qt.test(e.charAt(Fr))?(c=e.charAt(Fr),Fr++):(c=o,0===Br&&Gr(Yt)),c!==o)for(;c!==o;)u.push(c),Qt.test(e.charAt(Fr))?(c=e.charAt(Fr),Fr++):(c=o,0===Br&&Gr(Yt));else u=o;u!==o?(Ur=a,a=s=Jt(n,u)):(Fr=a,a=o)}else Fr=a,a=o;for(;a!==o;)if(i.push(a),a=Fr,45===e.charCodeAt(Fr)?(s=Vt,Fr++):(s=o,0===Br&&Gr(Wt)),s!==o){if(u=[],Qt.test(e.charAt(Fr))?(c=e.charAt(Fr),Fr++):(c=o,0===Br&&Gr(Yt)),c!==o)for(;c!==o;)u.push(c),Qt.test(e.charAt(Fr))?(c=e.charAt(Fr),Fr++):(c=o,0===Br&&Gr(Yt));else u=o;u!==o?(Ur=a,a=s=Jt(n,u)):(Fr=a,a=o)}else Fr=a,a=o;i!==o?(Ur=t,t=r=Zt(n,i)):(Fr=t,t=o)}else Fr=t,t=o}else Fr=t,t=o;return t}())!==o?(Ur=t,t=r=vt(n,a)):(Fr=t,t=o)}else Fr=t,t=o;else Fr=t,t=o;if(t===o){for(t=Fr,r=[],n=Qr();n!==o;)r.push(n),n=Qr();if(r!==o)if((n=rn())!==o){for(i=[],a=Qr();a!==o;)i.push(a),a=Qr();if(i!==o)if(e.substr(Fr,2)===gt?(a=gt,Fr+=2):(a=o,0===Br&&Gr(mt)),a!==o){for(s=[],u=Qr();u!==o;)s.push(u),u=Qr();s!==o&&(u=nn())!==o?(Ur=t,t=r=bt(n,u)):(Fr=t,t=o)}else Fr=t,t=o;else Fr=t,t=o}else Fr=t,t=o;else Fr=t,t=o;if(t===o){for(t=Fr,r=[],n=Qr();n!==o;)r.push(n),n=Qr();r!==o&&(n=rn())!==o?(Ur=t,t=r=h(n)):(Fr=t,t=o)}}return t}())===o&&(t=function(){var t,r,n;for(t=Fr,r=[],n=Qr();n!==o;)r.push(n),n=Qr();return r!==o?((n=function(){var t,r,n,i,a,s,u,h,f;if(t=Fr,r=Fr,n=Fr,Kt.test(e.charAt(Fr))?(i=e.charAt(Fr),Fr++):(i=o,0===Br&&Gr(te)),i===o&&(i=null),i!==o){if(a=Fr,s=[],qt.test(e.charAt(Fr))?(u=e.charAt(Fr),Fr++):(u=o,0===Br&&Gr(Ht)),u!==o)for(;u!==o;)s.push(u),qt.test(e.charAt(Fr))?(u=e.charAt(Fr),Fr++):(u=o,0===Br&&Gr(Ht));else s=o;if(s!==o)if(46===e.charCodeAt(Fr)?(u=c,Fr++):(u=o,0===Br&&Gr(l)),u!==o){for(h=[],qt.test(e.charAt(Fr))?(f=e.charAt(Fr),Fr++):(f=o,0===Br&&Gr(Ht));f!==o;)h.push(f),qt.test(e.charAt(Fr))?(f=e.charAt(Fr),Fr++):(f=o,0===Br&&Gr(Ht));h!==o&&(f=cn())!==o?a=s=[s,u,h,f]:(Fr=a,a=o)}else Fr=a,a=o;else Fr=a,a=o;if(a===o){if(a=Fr,46===e.charCodeAt(Fr)?(s=c,Fr++):(s=o,0===Br&&Gr(l)),s!==o){if(u=[],qt.test(e.charAt(Fr))?(h=e.charAt(Fr),Fr++):(h=o,0===Br&&Gr(Ht)),h!==o)for(;h!==o;)u.push(h),qt.test(e.charAt(Fr))?(h=e.charAt(Fr),Fr++):(h=o,0===Br&&Gr(Ht));else u=o;u!==o&&(h=cn())!==o?a=s=[s,u,h]:(Fr=a,a=o)}else Fr=a,a=o;if(a===o){if(a=Fr,s=[],qt.test(e.charAt(Fr))?(u=e.charAt(Fr),Fr++):(u=o,0===Br&&Gr(Ht)),u!==o)for(;u!==o;)s.push(u),qt.test(e.charAt(Fr))?(u=e.charAt(Fr),Fr++):(u=o,0===Br&&Gr(Ht));else s=o;s!==o&&(u=cn())!==o?a=s=[s,u]:(Fr=a,a=o)}}a!==o?n=i=[i,a]:(Fr=n,n=o)}else Fr=n,n=o;return(r=n!==o?e.substring(r,Fr):n)!==o&&(Ur=t,r=ne(r)),r}())===o&&(n=function(){var t,r,n,i,a,s,u,h;if(t=Fr,r=Fr,n=Fr,Kt.test(e.charAt(Fr))?(i=e.charAt(Fr),Fr++):(i=o,0===Br&&Gr(te)),i===o&&(i=null),i!==o){for(a=[],qt.test(e.charAt(Fr))?(s=e.charAt(Fr),Fr++):(s=o,0===Br&&Gr(Ht));s!==o;)a.push(s),qt.test(e.charAt(Fr))?(s=e.charAt(Fr),Fr++):(s=o,0===Br&&Gr(Ht));if(a!==o)if(46===e.charCodeAt(Fr)?(s=c,Fr++):(s=o,0===Br&&Gr(l)),s!==o){if(u=[],qt.test(e.charAt(Fr))?(h=e.charAt(Fr),Fr++):(h=o,0===Br&&Gr(Ht)),h!==o)for(;h!==o;)u.push(h),qt.test(e.charAt(Fr))?(h=e.charAt(Fr),Fr++):(h=o,0===Br&&Gr(Ht));else u=o;u!==o?n=i=[i,a,s,u]:(Fr=n,n=o)}else Fr=n,n=o;else Fr=n,n=o}else Fr=n,n=o;return(r=n!==o?e.substring(r,Fr):n)!==o&&(Ur=t,r=re(r)),r}())===o&&(n=function(){var t,r,n,i,a,s;if(t=Fr,r=Fr,n=Fr,Kt.test(e.charAt(Fr))?(i=e.charAt(Fr),Fr++):(i=o,0===Br&&Gr(te)),i===o&&(i=null),i!==o){if(a=[],qt.test(e.charAt(Fr))?(s=e.charAt(Fr),Fr++):(s=o,0===Br&&Gr(Ht)),s!==o)for(;s!==o;)a.push(s),qt.test(e.charAt(Fr))?(s=e.charAt(Fr),Fr++):(s=o,0===Br&&Gr(Ht));else a=o;a!==o?n=i=[i,a]:(Fr=n,n=o)}else Fr=n,n=o;return(r=n!==o?e.substring(r,Fr):n)!==o&&(Ur=t,r=ee(r)),r}()),n!==o?(Ur=t,t=r=h(n)):(Fr=t,t=o)):(Fr=t,t=o),t}())===o&&(t=function(){var t,r,n;for(t=Fr,r=[],n=Qr();n!==o;)r.push(n),n=Qr();if(r!==o?(e.substr(Fr,4)===wt?(n=wt,Fr+=4):(n=o,0===Br&&Gr(At)),n!==o?(Ur=t,t=r=xt()):(Fr=t,t=o)):(Fr=t,t=o),t===o){for(t=Fr,r=[],n=Qr();n!==o;)r.push(n),n=Qr();r!==o?(e.substr(Fr,5)===_t?(n=_t,Fr+=5):(n=o,0===Br&&Gr(kt)),n!==o?(Ur=t,t=r=Tt()):(Fr=t,t=o)):(Fr=t,t=o)}return t}()),t}())===o&&(t=Fr,(r=en())!==o&&(Ur=t,r=it(r)),(t=r)===o&&(t=Fr,(r=on())!==o&&(Ur=t,r=ot(r)),(t=r)===o&&(t=Fr,(r=tn())!==o&&(Ur=t,r=h(r)),(t=r)===o&&(t=Fr,(r=nn())!==o&&(Ur=t,r=at(r)),t=r)))),t}function tn(){var t,r,n,i,a,s;for(t=Fr,r=[],n=Qr();n!==o;)r.push(n),n=Qr();if(r!==o)if(91===e.charCodeAt(Fr)?(n=st,Fr++):(n=o,0===Br&&Gr(ut)),n!==o)if((i=Yr())!==o){for(a=[],s=Qr();s!==o;)a.push(s),s=Qr();a!==o?(93===e.charCodeAt(Fr)?(s=ct,Fr++):(s=o,0===Br&&Gr(lt)),s!==o?(Ur=t,t=r=h(i)):(Fr=t,t=o)):(Fr=t,t=o)}else Fr=t,t=o;else Fr=t,t=o;else Fr=t,t=o;return t}function en(){var t,r,n,i,a,s;for(t=Fr,r=[],n=Qr();n!==o;)r.push(n),n=Qr();if(r!==o)if(40===e.charCodeAt(Fr)?(n=ht,Fr++):(n=o,0===Br&&Gr(ft)),n!==o){for(i=[],a=Kr();a!==o;)i.push(a),a=Kr();if(i!==o){for(a=[],s=Qr();s!==o;)a.push(s),s=Qr();a!==o?(41===e.charCodeAt(Fr)?(s=pt,Fr++):(s=o,0===Br&&Gr(dt)),s!==o?(Ur=t,t=r=yt(i)):(Fr=t,t=o)):(Fr=t,t=o)}else Fr=t,t=o}else Fr=t,t=o;else Fr=t,t=o;return t}function rn(){var t,r,n;for(t=Fr,r=[],n=Qr();n!==o;)r.push(n),n=Qr();return r!==o?((n=function(){var t,r,n,i,a,s,u,c;if(t=Fr,e.substr(Fr,3)===de?(r=de,Fr+=3):(r=o,0===Br&&Gr(ye)),r!==o){for(n=[],ve.test(e.charAt(Fr))?(i=e.charAt(Fr),Fr++):(i=o,0===Br&&Gr(ge)),i===o&&(i=hn())===o&&(i=ln());i!==o;)n.push(i),ve.test(e.charAt(Fr))?(i=e.charAt(Fr),Fr++):(i=o,0===Br&&Gr(ge)),i===o&&(i=hn())===o&&(i=ln());if(n!==o){if(i=[],a=Fr,e.substr(Fr,2)===me?(s=me,Fr+=2):(s=o,0===Br&&Gr(be)),s!==o){if(u=[],ve.test(e.charAt(Fr))?(c=e.charAt(Fr),Fr++):(c=o,0===Br&&Gr(ge)),c===o&&(c=hn())===o&&(c=ln()),c!==o)for(;c!==o;)u.push(c),ve.test(e.charAt(Fr))?(c=e.charAt(Fr),Fr++):(c=o,0===Br&&Gr(ge)),c===o&&(c=hn())===o&&(c=ln());else u=o;u!==o?(Ur=a,a=s=we(n,u)):(Fr=a,a=o)}else Fr=a,a=o;if(a===o)if(a=Fr,39===e.charCodeAt(Fr)?(s=le,Fr++):(s=o,0===Br&&Gr(he)),s!==o){if(u=[],ve.test(e.charAt(Fr))?(c=e.charAt(Fr),Fr++):(c=o,0===Br&&Gr(ge)),c===o&&(c=hn())===o&&(c=ln()),c!==o)for(;c!==o;)u.push(c),ve.test(e.charAt(Fr))?(c=e.charAt(Fr),Fr++):(c=o,0===Br&&Gr(ge)),c===o&&(c=hn())===o&&(c=ln());else u=o;u!==o?(Ur=a,a=s=Ae(n,u)):(Fr=a,a=o)}else Fr=a,a=o;for(;a!==o;){if(i.push(a),a=Fr,e.substr(Fr,2)===me?(s=me,Fr+=2):(s=o,0===Br&&Gr(be)),s!==o){if(u=[],ve.test(e.charAt(Fr))?(c=e.charAt(Fr),Fr++):(c=o,0===Br&&Gr(ge)),c===o&&(c=hn())===o&&(c=ln()),c!==o)for(;c!==o;)u.push(c),ve.test(e.charAt(Fr))?(c=e.charAt(Fr),Fr++):(c=o,0===Br&&Gr(ge)),c===o&&(c=hn())===o&&(c=ln());else u=o;u!==o?(Ur=a,a=s=we(n,u)):(Fr=a,a=o)}else Fr=a,a=o;if(a===o)if(a=Fr,39===e.charCodeAt(Fr)?(s=le,Fr++):(s=o,0===Br&&Gr(he)),s!==o){if(u=[],ve.test(e.charAt(Fr))?(c=e.charAt(Fr),Fr++):(c=o,0===Br&&Gr(ge)),c===o&&(c=hn())===o&&(c=ln()),c!==o)for(;c!==o;)u.push(c),ve.test(e.charAt(Fr))?(c=e.charAt(Fr),Fr++):(c=o,0===Br&&Gr(ge)),c===o&&(c=hn())===o&&(c=ln());else u=o;u!==o?(Ur=a,a=s=Ae(n,u)):(Fr=a,a=o)}else Fr=a,a=o}i!==o?(e.substr(Fr,3)===de?(a=de,Fr+=3):(a=o,0===Br&&Gr(ye)),a!==o?(Ur=t,t=r=xe(n,i)):(Fr=t,t=o)):(Fr=t,t=o)}else Fr=t,t=o}else Fr=t,t=o;return t}())===o&&(n=function(){var t,r,n,i,a,s,u,c;if(t=Fr,e.substr(Fr,3)===_e?(r=_e,Fr+=3):(r=o,0===Br&&Gr(ke)),r!==o){for(n=[],Te.test(e.charAt(Fr))?(i=e.charAt(Fr),Fr++):(i=o,0===Br&&Gr(Ee)),i===o&&(i=hn())===o&&(i=ln());i!==o;)n.push(i),Te.test(e.charAt(Fr))?(i=e.charAt(Fr),Fr++):(i=o,0===Br&&Gr(Ee)),i===o&&(i=hn())===o&&(i=ln());if(n!==o){if(i=[],a=Fr,e.substr(Fr,2)===Oe?(s=Oe,Fr+=2):(s=o,0===Br&&Gr(je)),s!==o){if(u=[],Te.test(e.charAt(Fr))?(c=e.charAt(Fr),Fr++):(c=o,0===Br&&Gr(Ee)),c===o&&(c=hn())===o&&(c=ln()),c!==o)for(;c!==o;)u.push(c),Te.test(e.charAt(Fr))?(c=e.charAt(Fr),Fr++):(c=o,0===Br&&Gr(Ee)),c===o&&(c=hn())===o&&(c=ln());else u=o;u!==o?(Ur=a,a=s=Ne(n,u)):(Fr=a,a=o)}else Fr=a,a=o;if(a===o)if(a=Fr,34===e.charCodeAt(Fr)?(s=ae,Fr++):(s=o,0===Br&&Gr(se)),s!==o){if(u=[],Te.test(e.charAt(Fr))?(c=e.charAt(Fr),Fr++):(c=o,0===Br&&Gr(Ee)),c===o&&(c=hn())===o&&(c=ln()),c!==o)for(;c!==o;)u.push(c),Te.test(e.charAt(Fr))?(c=e.charAt(Fr),Fr++):(c=o,0===Br&&Gr(Ee)),c===o&&(c=hn())===o&&(c=ln());else u=o;u!==o?(Ur=a,a=s=Se(n,u)):(Fr=a,a=o)}else Fr=a,a=o;for(;a!==o;){if(i.push(a),a=Fr,e.substr(Fr,2)===Oe?(s=Oe,Fr+=2):(s=o,0===Br&&Gr(je)),s!==o){if(u=[],Te.test(e.charAt(Fr))?(c=e.charAt(Fr),Fr++):(c=o,0===Br&&Gr(Ee)),c===o&&(c=hn())===o&&(c=ln()),c!==o)for(;c!==o;)u.push(c),Te.test(e.charAt(Fr))?(c=e.charAt(Fr),Fr++):(c=o,0===Br&&Gr(Ee)),c===o&&(c=hn())===o&&(c=ln());else u=o;u!==o?(Ur=a,a=s=Ne(n,u)):(Fr=a,a=o)}else Fr=a,a=o;if(a===o)if(a=Fr,34===e.charCodeAt(Fr)?(s=ae,Fr++):(s=o,0===Br&&Gr(se)),s!==o){if(u=[],Te.test(e.charAt(Fr))?(c=e.charAt(Fr),Fr++):(c=o,0===Br&&Gr(Ee)),c===o&&(c=hn())===o&&(c=ln()),c!==o)for(;c!==o;)u.push(c),Te.test(e.charAt(Fr))?(c=e.charAt(Fr),Fr++):(c=o,0===Br&&Gr(Ee)),c===o&&(c=hn())===o&&(c=ln());else u=o;u!==o?(Ur=a,a=s=Se(n,u)):(Fr=a,a=o)}else Fr=a,a=o}i!==o?(e.substr(Fr,3)===_e?(a=_e,Fr+=3):(a=o,0===Br&&Gr(ke)),a!==o?(Ur=t,t=r=xe(n,i)):(Fr=t,t=o)):(Fr=t,t=o)}else Fr=t,t=o}else Fr=t,t=o;return t}())===o&&(n=function(){var t,r,n,i;if(t=Fr,39===e.charCodeAt(Fr)?(r=le,Fr++):(r=o,0===Br&&Gr(he)),r!==o){for(n=[],fe.test(e.charAt(Fr))?(i=e.charAt(Fr),Fr++):(i=o,0===Br&&Gr(pe)),i===o&&(i=hn())===o&&(i=ln());i!==o;)n.push(i),fe.test(e.charAt(Fr))?(i=e.charAt(Fr),Fr++):(i=o,0===Br&&Gr(pe)),i===o&&(i=hn())===o&&(i=ln());n!==o?(39===e.charCodeAt(Fr)?(i=le,Fr++):(i=o,0===Br&&Gr(he)),i!==o?(Ur=t,t=r=m(n)):(Fr=t,t=o)):(Fr=t,t=o)}else Fr=t,t=o;return t}())===o&&(n=function(){var t,r,n,i;if(t=Fr,34===e.charCodeAt(Fr)?(r=ae,Fr++):(r=o,0===Br&&Gr(se)),r!==o){for(n=[],ue.test(e.charAt(Fr))?(i=e.charAt(Fr),Fr++):(i=o,0===Br&&Gr(ce)),i===o&&(i=hn())===o&&(i=ln());i!==o;)n.push(i),ue.test(e.charAt(Fr))?(i=e.charAt(Fr),Fr++):(i=o,0===Br&&Gr(ce)),i===o&&(i=hn())===o&&(i=ln());n!==o?(34===e.charCodeAt(Fr)?(i=ae,Fr++):(i=o,0===Br&&Gr(se)),i!==o?(Ur=t,t=r=m(n)):(Fr=t,t=o)):(Fr=t,t=o)}else Fr=t,t=o;return t}()),n!==o?(Ur=t,t=r=h(n)):(Fr=t,t=o)):(Fr=t,t=o),t}function nn(){var t,r,n;for(t=Fr,r=[],n=Qr();n!==o;)r.push(n),n=Qr();if(r!==o&&(n=an())!==o?(Ur=t,t=r=h(n)):(Fr=t,t=o),t===o){for(t=Fr,r=[],n=Qr();n!==o;)r.push(n),n=Qr();r!==o&&(n=function(){var t,r;return(t=function(){var t,r,n;return t=Fr,(r=sn())!==o&&(n=function(){var t,r,n,i,a,s,u,h;if(t=Fr,(r=pn())===o&&(58===e.charCodeAt(Fr)?(r=Pt,Fr++):(r=o,0===Br&&Gr(Ft)),r===o&&(qt.test(e.charAt(Fr))?(r=e.charAt(Fr),Fr++):(r=o,0===Br&&Gr(Ht)),r===o&&(r=vn()))),r!==o){for(n=[],(i=dn())===o&&(58===e.charCodeAt(Fr)?(i=Pt,Fr++):(i=o,0===Br&&Gr(Ft)),i===o&&(i=vn()));i!==o;)n.push(i),(i=dn())===o&&(58===e.charCodeAt(Fr)?(i=Pt,Fr++):(i=o,0===Br&&Gr(Ft)),i===o&&(i=vn()));if(n!==o){if(i=[],a=Fr,s=[],46===e.charCodeAt(Fr)?(u=c,Fr++):(u=o,0===Br&&Gr(l)),u!==o)for(;u!==o;)s.push(u),46===e.charCodeAt(Fr)?(u=c,Fr++):(u=o,0===Br&&Gr(l));else s=o;if(s!==o){if(u=[],(h=dn())===o&&(58===e.charCodeAt(Fr)?(h=Pt,Fr++):(h=o,0===Br&&Gr(Ft)),h===o&&(h=vn())),h!==o)for(;h!==o;)u.push(h),(h=dn())===o&&(58===e.charCodeAt(Fr)?(h=Pt,Fr++):(h=o,0===Br&&Gr(Ft)),h===o&&(h=vn()));else u=o;u!==o?(Ur=a,a=s=Tr(r,n,s,u)):(Fr=a,a=o)}else Fr=a,a=o;for(;a!==o;){if(i.push(a),a=Fr,s=[],46===e.charCodeAt(Fr)?(u=c,Fr++):(u=o,0===Br&&Gr(l)),u!==o)for(;u!==o;)s.push(u),46===e.charCodeAt(Fr)?(u=c,Fr++):(u=o,0===Br&&Gr(l));else s=o;if(s!==o){if(u=[],(h=dn())===o&&(58===e.charCodeAt(Fr)?(h=Pt,Fr++):(h=o,0===Br&&Gr(Ft)),h===o&&(h=vn())),h!==o)for(;h!==o;)u.push(h),(h=dn())===o&&(58===e.charCodeAt(Fr)?(h=Pt,Fr++):(h=o,0===Br&&Gr(Ft)),h===o&&(h=vn()));else u=o;u!==o?(Ur=a,a=s=Tr(r,n,s,u)):(Fr=a,a=o)}else Fr=a,a=o}i!==o?(Ur=t,t=r=Er(r,n,i)):(Fr=t,t=o)}else Fr=t,t=o}else Fr=t,t=o;return t}())!==o?(Ur=t,t=r=Lt(r,n)):(Fr=t,t=o),t}())===o&&(t=Fr,(r=sn())!==o&&(Ur=t,r=Et(r)),t=r),t}())!==o?(Ur=t,t=r=h(n)):(Fr=t,t=o)}return t}function on(){var t,r,n;for(t=Fr,r=[],n=Qr();n!==o;)r.push(n),n=Qr();if(r!==o&&(n=function(){var t,r,n,i,a,s,u,h,f,p;if(t=Fr,r=Fr,e.substr(Fr,2)===Mt?(n=Mt,Fr+=2):(n=o,0===Br&&Gr(Bt)),n!==o)if((i=pn())===o&&(qt.test(e.charAt(Fr))?(i=e.charAt(Fr),Fr++):(i=o,0===Br&&Gr(Ht))),i!==o){for(a=[],s=dn();s!==o;)a.push(s),s=dn();if(a!==o){if(s=[],u=Fr,h=[],46===e.charCodeAt(Fr)?(f=c,Fr++):(f=o,0===Br&&Gr(l)),f!==o)for(;f!==o;)h.push(f),46===e.charCodeAt(Fr)?(f=c,Fr++):(f=o,0===Br&&Gr(l));else h=o;if(h!==o){if(f=[],(p=dn())!==o)for(;p!==o;)f.push(p),p=dn();else f=o;f!==o?u=h=[h,f]:(Fr=u,u=o)}else Fr=u,u=o;for(;u!==o;){if(s.push(u),u=Fr,h=[],46===e.charCodeAt(Fr)?(f=c,Fr++):(f=o,0===Br&&Gr(l)),f!==o)for(;f!==o;)h.push(f),46===e.charCodeAt(Fr)?(f=c,Fr++):(f=o,0===Br&&Gr(l));else h=o;if(h!==o){if(f=[],(p=dn())!==o)for(;p!==o;)f.push(p),p=dn();else f=o;f!==o?u=h=[h,f]:(Fr=u,u=o)}else Fr=u,u=o}s!==o?r=n=[n,i,a,s]:(Fr=r,r=o)}else Fr=r,r=o}else Fr=r,r=o;else Fr=r,r=o;return r!==o?e.substring(t,Fr):r}())!==o?(Ur=t,t=r=h(n)):(Fr=t,t=o),t===o){for(t=Fr,r=[],n=Qr();n!==o;)r.push(n),n=Qr();r!==o&&(n=function(){var t,r,n,i;if(t=Fr,91===e.charCodeAt(Fr)?(r=st,Fr++):(r=o,0===Br&&Gr(ut)),r!==o){for(n=[],i=Qr();i!==o;)n.push(i),i=Qr();n!==o?(93===e.charCodeAt(Fr)?(i=ct,Fr++):(i=o,0===Br&&Gr(lt)),i!==o?(Ur=t,t=r=cr()):(Fr=t,t=o)):(Fr=t,t=o)}else Fr=t,t=o;return t}())!==o?(Ur=t,t=r=h(n)):(Fr=t,t=o)}return t}function an(){var t,r,n,i;if(t=Fr,60===e.charCodeAt(Fr)?(r=Ot,Fr++):(r=o,0===Br&&Gr(jt)),r!==o){for(n=[],Nt.test(e.charAt(Fr))?(i=e.charAt(Fr),Fr++):(i=o,0===Br&&Gr(St)),i===o&&(i=ln());i!==o;)n.push(i),Nt.test(e.charAt(Fr))?(i=e.charAt(Fr),Fr++):(i=o,0===Br&&Gr(St)),i===o&&(i=ln());n!==o?(62===e.charCodeAt(Fr)?(i=Rt,Fr++):(i=o,0===Br&&Gr(It)),i!==o?(Ur=t,t=r=Ct(n)):(Fr=t,t=o)):(Fr=t,t=o)}else Fr=t,t=o;return t}function sn(){var t,r,n;return t=Fr,(r=yn())===o&&(r=null),r!==o?(58===e.charCodeAt(Fr)?(n=Pt,Fr++):(n=o,0===Br&&Gr(Ft)),n!==o?(Ur=t,t=r=Ut(r)):(Fr=t,t=o)):(Fr=t,t=o),t}function un(){var t,r,n;return t=Fr,(r=yn())===o&&(r=null),r!==o?(58===e.charCodeAt(Fr)?(n=Pt,Fr++):(n=o,0===Br&&Gr(Ft)),n!==o?(Ur=t,t=r=Dt(r)):(Fr=t,t=o)):(Fr=t,t=o),t}function cn(){var t,r,n,i,a,s;if(t=Fr,r=Fr,ie.test(e.charAt(Fr))?(n=e.charAt(Fr),Fr++):(n=o,0===Br&&Gr(oe)),n!==o)if(Kt.test(e.charAt(Fr))?(i=e.charAt(Fr),Fr++):(i=o,0===Br&&Gr(te)),i===o&&(i=null),i!==o){if(a=[],qt.test(e.charAt(Fr))?(s=e.charAt(Fr),Fr++):(s=o,0===Br&&Gr(Ht)),s!==o)for(;s!==o;)a.push(s),qt.test(e.charAt(Fr))?(s=e.charAt(Fr),Fr++):(s=o,0===Br&&Gr(Ht));else a=o;a!==o?r=n=[n,i,a]:(Fr=r,r=o)}else Fr=r,r=o;else Fr=r,r=o;return r!==o?e.substring(t,Fr):r}function ln(){var t,r,n,i,a,s,u,c,l,h,f;return t=Fr,e.substr(Fr,2)===Re?(r=Re,Fr+=2):(r=o,0===Br&&Gr(Ie)),r!==o?(n=Fr,(i=gn())!==o&&(a=gn())!==o&&(s=gn())!==o&&(u=gn())!==o&&(c=gn())!==o&&(l=gn())!==o&&(h=gn())!==o&&(f=gn())!==o?n=i=[i,a,s,u,c,l,h,f]:(Fr=n,n=o),n!==o?(Ur=t,t=r=Ce(n)):(Fr=t,t=o)):(Fr=t,t=o),t===o&&(t=Fr,e.substr(Fr,2)===Pe?(r=Pe,Fr+=2):(r=o,0===Br&&Gr(Fe)),r!==o?(n=Fr,(i=gn())!==o&&(a=gn())!==o&&(s=gn())!==o&&(u=gn())!==o?n=i=[i,a,s,u]:(Fr=n,n=o),n!==o?(Ur=t,t=r=Ue(n)):(Fr=t,t=o)):(Fr=t,t=o)),t}function hn(){var t,r;return t=Fr,e.substr(Fr,2)===De?(r=De,Fr+=2):(r=o,0===Br&&Gr(Le)),r!==o&&(Ur=t,r=Me()),(t=r)===o&&(t=Fr,e.substr(Fr,2)===Be?(r=Be,Fr+=2):(r=o,0===Br&&Gr(qe)),r!==o&&(Ur=t,r=He()),(t=r)===o&&(t=Fr,e.substr(Fr,2)===$e?(r=$e,Fr+=2):(r=o,0===Br&&Gr(ze)),r!==o&&(Ur=t,r=Xe()),(t=r)===o&&(t=Fr,e.substr(Fr,2)===Ge?(r=Ge,Fr+=2):(r=o,0===Br&&Gr(Ve)),r!==o&&(Ur=t,r=We()),(t=r)===o&&(t=Fr,e.substr(Fr,2)===Qe?(r=Qe,Fr+=2):(r=o,0===Br&&Gr(Ye)),r!==o&&(Ur=t,r=Je()),(t=r)===o&&(t=Fr,e.substr(Fr,2)===Ze?(r=Ze,Fr+=2):(r=o,0===Br&&Gr(Ke)),r!==o&&(Ur=t,r=tr()),(t=r)===o&&(t=Fr,e.substr(Fr,2)===er?(r=er,Fr+=2):(r=o,0===Br&&Gr(rr)),r!==o&&(Ur=t,r=nr()),(t=r)===o&&(t=Fr,e.substr(Fr,2)===ir?(r=ir,Fr+=2):(r=o,0===Br&&Gr(or)),r!==o&&(Ur=t,r=ar()),t=r))))))),t}function fn(){var t,r,n;return t=Fr,lr.test(e.charAt(Fr))?(r=e.charAt(Fr),Fr++):(r=o,0===Br&&Gr(hr)),r!==o?(fr.test(e.charAt(Fr))?(n=e.charAt(Fr),Fr++):(n=o,0===Br&&Gr(pr)),n!==o?(Ur=t,t=r=dr(r,n)):(Fr=t,t=o)):(Fr=t,t=o),t===o&&(yr.test(e.charAt(Fr))?(t=e.charAt(Fr),Fr++):(t=o,0===Br&&Gr(vr))),t}function pn(){var t;return(t=fn())===o&&(95===e.charCodeAt(Fr)?(t=gr,Fr++):(t=o,0===Br&&Gr(mr))),t}function dn(){var t;return(t=pn())===o&&(45===e.charCodeAt(Fr)?(t=Vt,Fr++):(t=o,0===Br&&Gr(Wt)),t===o&&(qt.test(e.charAt(Fr))?(t=e.charAt(Fr),Fr++):(t=o,0===Br&&Gr(Ht)),t===o&&(183===e.charCodeAt(Fr)?(t=br,Fr++):(t=o,0===Br&&Gr(wr)),t===o&&(Ar.test(e.charAt(Fr))?(t=e.charAt(Fr),Fr++):(t=o,0===Br&&Gr(xr)),t===o&&(_r.test(e.charAt(Fr))?(t=e.charAt(Fr),Fr++):(t=o,0===Br&&Gr(kr))))))),t}function yn(){var t,r,n,i,a,s,u,h,f;if(t=Fr,r=Fr,(n=fn())!==o){for(i=[],a=dn();a!==o;)i.push(a),a=dn();if(i!==o){if(a=[],s=Fr,u=[],46===e.charCodeAt(Fr)?(h=c,Fr++):(h=o,0===Br&&Gr(l)),h!==o)for(;h!==o;)u.push(h),46===e.charCodeAt(Fr)?(h=c,Fr++):(h=o,0===Br&&Gr(l));else u=o;if(u!==o){if(h=[],(f=dn())!==o)for(;f!==o;)h.push(f),f=dn();else h=o;h!==o?s=u=[u,h]:(Fr=s,s=o)}else Fr=s,s=o;for(;s!==o;){if(a.push(s),s=Fr,u=[],46===e.charCodeAt(Fr)?(h=c,Fr++):(h=o,0===Br&&Gr(l)),h!==o)for(;h!==o;)u.push(h),46===e.charCodeAt(Fr)?(h=c,Fr++):(h=o,0===Br&&Gr(l));else u=o;if(u!==o){if(h=[],(f=dn())!==o)for(;f!==o;)h.push(f),f=dn();else h=o;h!==o?s=u=[u,h]:(Fr=s,s=o)}else Fr=s,s=o}a!==o?r=n=[n,i,a]:(Fr=r,r=o)}else Fr=r,r=o}else Fr=r,r=o;return r!==o?e.substring(t,Fr):r}function vn(){var t;return(t=function(){var t,r,n,i,a;return t=Fr,r=Fr,37===e.charCodeAt(Fr)?(n=Or,Fr++):(n=o,0===Br&&Gr(jr)),n!==o&&(i=gn())!==o&&(a=gn())!==o?r=n=[n,i,a]:(Fr=r,r=o),r!==o?e.substring(t,Fr):r}())===o&&(t=function(){var t,r,n;return t=Fr,92===e.charCodeAt(Fr)?(r=Rr,Fr++):(r=o,0===Br&&Gr(Ir)),r!==o?(Cr.test(e.charAt(Fr))?(n=e.charAt(Fr),Fr++):(n=o,0===Br&&Gr(Pr)),n!==o?(Ur=t,t=r=h(n)):(Fr=t,t=o)):(Fr=t,t=o),t}()),t}function gn(){var t;return Nr.test(e.charAt(Fr))?(t=e.charAt(Fr),Fr++):(t=o,0===Br&&Gr(Sr)),t}var mn,bn,wn,An=new Function("try {return this===window;}catch(e){ return false;}")()?window.URL:r(9533).URL,xn=function(t){return t.match(/^[a-z](.*?):(.+?)/g)},_n={base:[],data:{},addBase:function(t){if(0===_n.base.length)return void _n.base.push(t);const e=_n.base[_n.base.length-1];e!==t&&_n.base.push(new An(t,e).toString())},addPrefix:function(t,e){const r=_n.data[t];void 0===r?_n.data[t]=[{uri:e,count:0}]:r[r.length-1].uri!==e&&r.push({uri:e,count:0})},hasPrefix:function(t){return void 0!==this.data[t]},resolve:function(t,e){const r=Object.keys(_n.data).find((e=>0===t.indexOf(e+":")));if(void 0!==r){const n=_n.data[r];if(1===n.length&&!0!==e&&xn(n[0].uri))return t;const i=n[n.length-1].uri;return t.replace(r+":",i)}var i=0===_n.base.length?n.baseIRI:_n.base[_n.base.length-1];return!i||t.match(/^(http:|https:|urn:|file:)/)?t:0===t.indexOf("//")&&i?i.split("//")[0]+t:new An(t,i).toString()},increment:function(t){const e=_n.data[t];void 0!==e&&e[e.length-1].count++},decrement:function(t){const e=_n.data[t];void 0!==e&&e[e.length-1].count--},toJSON:function(){const t={};return _n.base.length>0&&(void 0===t["@context"]&&(t["@context"]={}),t["@context"]["@base"]=_n.base[0]),Object.keys(_n.data).forEach((e=>{const r=_n.data[e][0];"http://www.w3.org/2001/XMLSchema#"===r.uri&&r.count<1||xn(r.uri)&&(void 0===t["@context"]&&(t["@context"]={}),t["@context"][e]=r.uri)})),t}};function kn(t,e){if(void 0===t["@list"])return t;if(!e&&!t["@list"].find((t=>void 0!==t["@list"])))return t;if(0===t["@list"].length)return{"@id":"http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"};var r={},n=null;return t["@list"].forEach((t=>{null===n?n=r:(n["http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"]={},n=n["http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"]),n["http://www.w3.org/1999/02/22-rdf-syntax-ns#first"]=kn(t,!0),n["http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"]={"@id":"http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"}})),r}if((i=s())!==o&&Fr===e.length)return i;throw i!==o&&Fr{"use strict";var n=r(9964),i=r(6357);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}var a,s,u=r(5403).codes,c=u.ERR_AMBIGUOUS_ARGUMENT,l=u.ERR_INVALID_ARG_TYPE,h=u.ERR_INVALID_ARG_VALUE,f=u.ERR_INVALID_RETURN_VALUE,p=u.ERR_MISSING_ARGS,d=r(5416),y=r(7187).inspect,v=r(7187).types,g=v.isPromise,m=v.isRegExp,b=Object.assign?Object.assign:r(6713).assign,w=Object.is?Object.is:r(8527);function A(){var t=r(6781);a=t.isDeepEqual,s=t.isDeepStrictEqual}new Map;var x=!1,_=t.exports=O,k={};function T(t){if(t.message instanceof Error)throw t.message;throw new d(t)}function E(t,e,r,n){if(!r){var i=!1;if(0===e)i=!0,n="No value argument passed to `assert.ok()`";else if(n instanceof Error)throw n;var o=new d({actual:r,expected:!0,message:n,operator:"==",stackStartFn:t});throw o.generatedMessage=i,o}}function O(){for(var t=arguments.length,e=new Array(t),r=0;r1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i{"use strict";var n=r(9964);function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;rt.length)&&(r=t.length),t.substring(r-e.length,r)===e}var v="",g="",m="",b="",w={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function A(t){var e=Object.keys(t),r=Object.create(Object.getPrototypeOf(t));return e.forEach((function(e){r[e]=t[e]})),Object.defineProperty(r,"message",{value:t.message}),r}function x(t){return p(t,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var _=function(t){function e(t){var r;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),"object"!==f(t)||null===t)throw new d("options","Object",t);var i=t.message,o=t.operator,u=t.stackStartFn,c=t.actual,l=t.expected,p=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=i)r=a(this,h(e).call(this,String(i)));else if(n.stderr&&n.stderr.isTTY&&(n.stderr&&n.stderr.getColorDepth&&1!==n.stderr.getColorDepth()?(v="",g="",b="",m=""):(v="",g="",b="",m="")),"object"===f(c)&&null!==c&&"object"===f(l)&&null!==l&&"stack"in c&&c instanceof Error&&"stack"in l&&l instanceof Error&&(c=A(c),l=A(l)),"deepStrictEqual"===o||"strictEqual"===o)r=a(this,h(e).call(this,function(t,e,r){var i="",o="",a=0,s="",u=!1,c=x(t),l=c.split("\n"),h=x(e).split("\n"),p=0,d="";if("strictEqual"===r&&"object"===f(t)&&"object"===f(e)&&null!==t&&null!==e&&(r="strictEqualObject"),1===l.length&&1===h.length&&l[0]!==h[0]){var A=l[0].length+h[0].length;if(A<=10){if(!("object"===f(t)&&null!==t||"object"===f(e)&&null!==e||0===t&&0===e))return"".concat(w[r],"\n\n")+"".concat(l[0]," !== ").concat(h[0],"\n")}else if("strictEqualObject"!==r&&A<(n.stderr&&n.stderr.isTTY?n.stderr.columns:80)){for(;l[0][p]===h[0][p];)p++;p>2&&(d="\n ".concat(function(t,e){if(e=Math.floor(e),0==t.length||0==e)return"";var r=t.length*e;for(e=Math.floor(Math.log(e)/Math.log(2));e;)t+=t,e--;return t+t.substring(0,r-t.length)}(" ",p),"^"),p=0)}}for(var _=l[l.length-1],k=h[h.length-1];_===k&&(p++<2?s="\n ".concat(_).concat(s):i=_,l.pop(),h.pop(),0!==l.length&&0!==h.length);)_=l[l.length-1],k=h[h.length-1];var T=Math.max(l.length,h.length);if(0===T){var E=c.split("\n");if(E.length>30)for(E[26]="".concat(v,"...").concat(b);E.length>27;)E.pop();return"".concat(w.notIdentical,"\n\n").concat(E.join("\n"),"\n")}p>3&&(s="\n".concat(v,"...").concat(b).concat(s),u=!0),""!==i&&(s="\n ".concat(i).concat(s),i="");var O=0,j=w[r]+"\n".concat(g,"+ actual").concat(b," ").concat(m,"- expected").concat(b),N=" ".concat(v,"...").concat(b," Lines skipped");for(p=0;p1&&p>2&&(S>4?(o+="\n".concat(v,"...").concat(b),u=!0):S>3&&(o+="\n ".concat(h[p-2]),O++),o+="\n ".concat(h[p-1]),O++),a=p,i+="\n".concat(m,"-").concat(b," ").concat(h[p]),O++;else if(h.length1&&p>2&&(S>4?(o+="\n".concat(v,"...").concat(b),u=!0):S>3&&(o+="\n ".concat(l[p-2]),O++),o+="\n ".concat(l[p-1]),O++),a=p,o+="\n".concat(g,"+").concat(b," ").concat(l[p]),O++;else{var R=h[p],I=l[p],C=I!==R&&(!y(I,",")||I.slice(0,-1)!==R);C&&y(R,",")&&R.slice(0,-1)===I&&(C=!1,I+=","),C?(S>1&&p>2&&(S>4?(o+="\n".concat(v,"...").concat(b),u=!0):S>3&&(o+="\n ".concat(l[p-2]),O++),o+="\n ".concat(l[p-1]),O++),a=p,o+="\n".concat(g,"+").concat(b," ").concat(I),i+="\n".concat(m,"-").concat(b," ").concat(R),O+=2):(o+=i,i="",1!==S&&0!==p||(o+="\n ".concat(I),O++))}if(O>20&&p30)for(k[26]="".concat(v,"...").concat(b);k.length>27;)k.pop();r=1===k.length?a(this,h(e).call(this,"".concat(_," ").concat(k[0]))):a(this,h(e).call(this,"".concat(_,"\n\n").concat(k.join("\n"),"\n")))}else{var T=x(c),E="",O=w[o];"notDeepEqual"===o||"notEqual"===o?(T="".concat(w[o],"\n\n").concat(T)).length>1024&&(T="".concat(T.slice(0,1021),"...")):(E="".concat(x(l)),T.length>512&&(T="".concat(T.slice(0,509),"...")),E.length>512&&(E="".concat(E.slice(0,509),"...")),"deepEqual"===o||"equal"===o?T="".concat(O,"\n\n").concat(T,"\n\nshould equal\n\n"):E=" ".concat(o," ").concat(E)),r=a(this,h(e).call(this,"".concat(T).concat(E)))}return Error.stackTraceLimit=p,r.generatedMessage=!i,Object.defineProperty(s(r),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),r.code="ERR_ASSERTION",r.actual=c,r.expected=l,r.operator=o,Error.captureStackTrace&&Error.captureStackTrace(s(r),u),r.stack,r.name="AssertionError",a(r)}var r,u;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(e,t),r=e,u=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:p.custom,value:function(t,e){return p(this,function(t){for(var e=1;e{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}var a,s,u={};function c(t,e,r){r||(r=Error);var a=function(r){function a(r,o,s){var u;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),u=function(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,i(a).call(this,function(t,r,n){return"string"==typeof e?e:e(t,r,n)}(r,o,s))),u.code=t,u}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(a,r),a}(r);u[t]=a}function l(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}c("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),c("ERR_INVALID_ARG_TYPE",(function(t,e,i){var o,s,u,c,h;if(void 0===a&&(a=r(182)),a("string"==typeof t,"'name' must be a string"),"string"==typeof e&&(s="not ",e.substr(0,4)===s)?(o="must not be",e=e.replace(/^not /,"")):o="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-9,r)===e}(t," argument"))u="The ".concat(t," ").concat(o," ").concat(l(e,"type"));else{var f=("number"!=typeof h&&(h=0),h+1>(c=t).length||-1===c.indexOf(".",h)?"argument":"property");u='The "'.concat(t,'" ').concat(f," ").concat(o," ").concat(l(e,"type"))}return u+". Received type ".concat(n(i))}),TypeError),c("ERR_INVALID_ARG_VALUE",(function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===s&&(s=r(7187));var i=s.inspect(e);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(t,"' ").concat(n,". Received ").concat(i)}),TypeError,RangeError),c("ERR_INVALID_RETURN_VALUE",(function(t,e,r){var i;return i=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(n(r)),"Expected ".concat(t,' to be returned from the "').concat(e,'"')+" function but got ".concat(i,".")}),TypeError),c("ERR_MISSING_ARGS",(function(){for(var t=arguments.length,e=new Array(t),n=0;n0,"At least one arg needs to be specified");var i="The ",o=e.length;switch(e=e.map((function(t){return'"'.concat(t,'"')})),o){case 1:i+="".concat(e[0]," argument");break;case 2:i+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:i+=e.slice(0,o-1).join(", "),i+=", and ".concat(e[o-1]," arguments")}return"".concat(i," must be specified")}),TypeError),t.exports.codes=u},6781:(t,e,r)=>{"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}var o=void 0!==/a/g.flags,a=function(t){var e=[];return t.forEach((function(t){return e.push(t)})),e},s=function(t){var e=[];return t.forEach((function(t,r){return e.push([r,t])})),e},u=Object.is?Object.is:r(8527),c=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},l=Number.isNaN?Number.isNaN:r(7051);function h(t){return t.call.bind(t)}var f=h(Object.prototype.hasOwnProperty),p=h(Object.prototype.propertyIsEnumerable),d=h(Object.prototype.toString),y=r(7187).types,v=y.isAnyArrayBuffer,g=y.isArrayBufferView,m=y.isDate,b=y.isMap,w=y.isRegExp,A=y.isSet,x=y.isNativeError,_=y.isBoxedPrimitive,k=y.isNumberObject,T=y.isStringObject,E=y.isBooleanObject,O=y.isBigIntObject,j=y.isSymbolObject,N=y.isFloat32Array,S=y.isFloat64Array;function R(t){if(0===t.length||t.length>10)return!0;for(var e=0;e57)return!0}return 10===t.length&&t>=Math.pow(2,32)}function I(t){return Object.keys(t).filter(R).concat(c(t).filter(Object.prototype.propertyIsEnumerable.bind(t)))}function C(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i{"use strict";e.byteLength=function(t){var e=s(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,o=s(t),a=o[0],u=o[1],c=new i(function(t,e,r){return 3*(e+r)/4-r}(0,a,u)),l=0,h=u>0?a-4:a;for(r=0;r>16&255,c[l++]=e>>8&255,c[l++]=255&e;return 2===u&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[l++]=255&e),1===u&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[l++]=e>>8&255,c[l++]=255&e),c},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],a=16383,s=0,c=n-i;sc?c:s+a));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function s(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function u(t,e,n){for(var i,o,a=[],s=e;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},2313:(t,e,r)=>{"use strict";var n=r(6357);const i=r(2504),o=r(9029),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.hp=c,e.IS=50;const s=2147483647;function u(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,c.prototype),e}function c(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return f(t)}return l(t,e,r)}function l(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!c.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|v(t,e);let n=u(r);const i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(Y(t,Uint8Array)){const e=new Uint8Array(t);return d(e.buffer,e.byteOffset,e.byteLength)}return p(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(Y(t,ArrayBuffer)||t&&Y(t.buffer,ArrayBuffer))return d(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(Y(t,SharedArrayBuffer)||t&&Y(t.buffer,SharedArrayBuffer)))return d(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return c.from(n,e,r);const i=function(t){if(c.isBuffer(t)){const e=0|y(t.length),r=u(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||J(t.length)?u(0):p(t):"Buffer"===t.type&&Array.isArray(t.data)?p(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return c.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function h(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function f(t){return h(t),u(t<0?0:0|y(t))}function p(t){const e=t.length<0?0:0|y(t.length),r=u(e);for(let n=0;n=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function v(t,e){if(c.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Y(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return V(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return W(t).length;default:if(i)return n?-1:V(t).length;e=(""+e).toLowerCase(),i=!0}}function g(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,e,r);case"utf8":case"utf-8":return O(this,e,r);case"ascii":return N(this,e,r);case"latin1":case"binary":return S(this,e,r);case"base64":return E(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function b(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=c.from(e,n)),c.isBuffer(e))return 0===e.length?-1:w(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):w(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function w(t,e,r,n,i){let o,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){let n=-1;for(o=r;os&&(r=s-u),o=r;o>=0;o--){let r=!0;for(let n=0;ni&&(n=i):n=i;const o=e.length;let a;for(n>o/2&&(n=o/2),a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function E(t,e,r){return 0===e&&r===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,r))}function O(t,e,r){r=Math.min(t.length,r);const n=[];let i=e;for(;i239?4:e>223?3:e>191?2:1;if(i+a<=r){let r,n,s,u;switch(a){case 1:e<128&&(o=e);break;case 2:r=t[i+1],128==(192&r)&&(u=(31&e)<<6|63&r,u>127&&(o=u));break;case 3:r=t[i+1],n=t[i+2],128==(192&r)&&128==(192&n)&&(u=(15&e)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=t[i+1],n=t[i+2],s=t[i+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(u=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&s,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return function(t){const e=t.length;if(e<=j)return String.fromCharCode.apply(String,t);let r="",n=0;for(;nn.length?(c.isBuffer(e)||(e=c.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else{if(!c.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,i)}i+=e.length}return n},c.byteLength=v,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;er&&(t+=" ... "),""},a&&(c.prototype[a]=c.prototype.inspect),c.prototype.compare=function(t,e,r,n,i){if(Y(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;let o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0);const s=Math.min(o,a),u=this.slice(n,i),l=t.slice(e,r);for(let t=0;t>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return A(this,t,e,r);case"utf8":case"utf-8":return x(this,t,e,r);case"ascii":case"latin1":case"binary":return _(this,t,e,r);case"base64":return k(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const j=4096;function N(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;in)&&(r=n);let i="";for(let n=e;nr)throw new RangeError("Trying to access beyond buffer length")}function P(t,e,r,n,i,o){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function F(t,e,r,n,i){$(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,r}function U(t,e,r,n,i){$(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=a,a>>=8,t[r+2]=a,a>>=8,t[r+1]=a,a>>=8,t[r]=a,r+8}function D(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(t,e,r,n,i){return e=+e,r>>>=0,i||D(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function M(t,e,r,n,i){return e=+e,r>>>=0,i||D(t,0,r,8),o.write(t,e,r,n,52,8),r+8}c.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||C(t,e,this.length);let n=this[t],i=1,o=0;for(;++o>>=0,e>>>=0,r||C(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},c.prototype.readUint8=c.prototype.readUInt8=function(t,e){return t>>>=0,e||C(t,1,this.length),this[t]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(t,e){return t>>>=0,e||C(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(t,e){return t>>>=0,e||C(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(t,e){return t>>>=0,e||C(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(t,e){return t>>>=0,e||C(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readBigUInt64LE=K((function(t){z(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||X(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||X(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<>>=0,e>>>=0,r||C(t,e,this.length);let n=this[t],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*e)),n},c.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||C(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},c.prototype.readInt8=function(t,e){return t>>>=0,e||C(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){t>>>=0,e||C(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(t,e){t>>>=0,e||C(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(t,e){return t>>>=0,e||C(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return t>>>=0,e||C(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readBigInt64LE=K((function(t){z(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||X(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||X(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<>>=0,e||C(t,4,this.length),o.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return t>>>=0,e||C(t,4,this.length),o.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return t>>>=0,e||C(t,8,this.length),o.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return t>>>=0,e||C(t,8,this.length),o.read(this,t,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||P(this,t,e,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[e]=255&t;++o>>=0,r>>>=0,n||P(this,t,e,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,1,255,0),this[e]=255&t,e+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeBigUInt64LE=K((function(t,e=0){return F(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=K((function(t,e=0){return U(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);P(this,t,e,r,n-1,-n)}let i=0,o=1,a=0;for(this[e]=255&t;++i>>=0,!n){const n=Math.pow(2,8*r-1);P(this,t,e,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/o|0)-a&255;return e+r},c.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},c.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeBigInt64LE=K((function(t,e=0){return F(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=K((function(t,e=0){return U(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(t,e,r){return L(this,t,e,!0,r)},c.prototype.writeFloatBE=function(t,e,r){return L(this,t,e,!1,r)},c.prototype.writeDoubleLE=function(t,e,r){return M(this,t,e,!0,r)},c.prototype.writeDoubleBE=function(t,e,r){return M(this,t,e,!1,r)},c.prototype.copy=function(t,e,r,n){if(!c.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function $(t,e,r,n,i,o){if(t>r||t3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new B.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,r){z(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||X(e,t.length-(r+1))}(n,i,o)}function z(t,e){if("number"!=typeof t)throw new B.ERR_INVALID_ARG_TYPE(e,"number",t)}function X(t,e,r){if(Math.floor(t)!==t)throw z(t,r),new B.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new B.ERR_BUFFER_OUT_OF_BOUNDS;throw new B.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}q("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),q("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),q("ERR_OUT_OF_RANGE",(function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=H(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=H(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n}),RangeError);const G=/[^+/0-9A-Za-z-_]/g;function V(t,e){let r;e=e||1/0;const n=t.length;let i=null;const o=[];for(let a=0;a55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function W(t){return i.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(G,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Q(t,e,r,n){let i;for(i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function Y(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function J(t){return t!=t}const Z=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function K(t){return"undefined"==typeof BigInt?tt:t}function tt(){throw new Error("BigInt not supported")}},7913:(t,e,r)=>{"use strict";var n=r(8651),i=r(6601),o=i(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&o(t,".prototype.")>-1?i(r):r}},6601:(t,e,r)=>{"use strict";var n=r(5049),i=r(8651),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),s=i("%Reflect.apply%",!0)||n.call(a,o),u=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),l=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(t){c=null}t.exports=function(t){var e=s(n,a,arguments);return u&&c&&u(e,"length").configurable&&c(e,"length",{value:1+l(0,t.length-(arguments.length-1))}),e};var h=function(){return s(n,o,arguments)};c?c(t.exports,"apply",{value:h}):t.exports.apply=h},6357:(t,e,r)=>{var n=r(7187),i=r(182);function o(){return(new Date).getTime()}var a,s=Array.prototype.slice,u={};a=void 0!==r.g&&r.g.console?r.g.console:"undefined"!=typeof window&&window.console?window.console:{};for(var c=[[function(){},"log"],[function(){a.log.apply(a,arguments)},"info"],[function(){a.log.apply(a,arguments)},"warn"],[function(){a.warn.apply(a,arguments)},"error"],[function(t){u[t]=o()},"time"],[function(t){var e=u[t];if(!e)throw new Error("No such label: "+t);delete u[t];var r=o()-e;a.log(t+": "+r+"ms")},"timeEnd"],[function(){var t=new Error;t.name="Trace",t.message=n.format.apply(null,arguments),a.error(t.stack)},"trace"],[function(t){a.log(n.inspect(t)+"\n")},"dir"],[function(t){if(!t){var e=s.call(arguments,1);i.ok(!1,n.format.apply(null,e))}},"assert"]],l=0;l-1};function c(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function l(t){return"string"!=typeof t&&(t=String(t)),t}function h(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return n&&(e[Symbol.iterator]=function(){return e}),e}function f(t){this.map={},t instanceof f?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function p(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function d(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function y(t){var e=new FileReader,r=d(e);return e.readAsArrayBuffer(t),r}function v(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function g(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:i&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:o&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:r&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():a&&i&&(e=t)&&DataView.prototype.isPrototypeOf(e)?(this._bodyArrayBuffer=v(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(t)||u(t))?this._bodyArrayBuffer=v(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var t=p(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var t,e,r,n=p(this);if(n)return n;if(this._bodyBlob)return t=this._bodyBlob,r=d(e=new FileReader),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n-1?n:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function w(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(i))}})),e}function A(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new f(e.headers),this.url=e.url||"",this._initBody(t)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},g.call(b.prototype),g.call(A.prototype),A.prototype.clone=function(){return new A(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},A.error=function(){var t=new A(null,{status:0,statusText:""});return t.type="error",t};var x=[301,302,303,307,308];A.redirect=function(t,e){if(-1===x.indexOf(e))throw new RangeError("Invalid status code");return new A(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function _(t,r){return new Promise((function(n,o){var a=new b(t,r);if(a.signal&&a.signal.aborted)return o(new e.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function u(){s.abort()}s.onload=function(){var t,e,r={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",e=new f,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var r=t.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();e.append(n,i)}})),e)};r.url="responseURL"in s?s.responseURL:r.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;n(new A(i,r))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.onabort=function(){o(new e.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),a.headers.forEach((function(t,e){s.setRequestHeader(e,t)})),a.signal&&(a.signal.addEventListener("abort",u),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",u)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}_.polyfill=!0,t.fetch||(t.fetch=_,t.Headers=f,t.Request=b,t.Response=A),e.Headers=f,e.Request=b,e.Response=A,e.fetch=_,Object.defineProperty(e,"__esModule",{value:!0})}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;(e=i.fetch).default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e},7802:(t,e,r)=>{"use strict";var n=r(5643),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,a=Array.prototype.concat,s=Object.defineProperty,u=r(8890)(),c=s&&u,l=function(t,e,r,n){var i;(!(e in t)||"function"==typeof(i=n)&&"[object Function]"===o.call(i)&&n())&&(c?s(t,e,{configurable:!0,enumerable:!1,value:r,writable:!0}):t[e]=r)},h=function(t,e){var r=arguments.length>2?arguments[2]:{},o=n(e);i&&(o=a.call(o,Object.getOwnPropertySymbols(e)));for(var s=0;s{"use strict";function e(t,e){if(null==t)throw new TypeError("Cannot convert first argument to object");for(var r=Object(t),n=1;n{"use strict";var n=r(3746),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){if(!n(e))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=r),"[object Array]"===i.call(t)?function(t,e,r){for(var n=0,i=t.length;n{"use strict";var e=Array.prototype.slice,r=Object.prototype.toString;t.exports=function(t){var n=this;if("function"!=typeof n||"[object Function]"!==r.call(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var i,o=e.call(arguments,1),a=Math.max(0,n.length-o.length),s=[],u=0;u{"use strict";var n=r(2719);t.exports=Function.prototype.bind||n},8651:(t,e,r)=>{"use strict";var n,i=SyntaxError,o=Function,a=TypeError,s=function(t){try{return o('"use strict"; return ('+t+").constructor;")()}catch(t){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(t){u=null}var c=function(){throw new a},l=u?function(){try{return c}catch(t){try{return u(arguments,"callee").get}catch(t){return c}}}():c,h=r(3257)(),f=Object.getPrototypeOf||function(t){return t.__proto__},p={},d="undefined"==typeof Uint8Array?n:f(Uint8Array),y={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":h?f([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":p,"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":p,"%AsyncIteratorPrototype%":p,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":p,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":h?f(f([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&h?f((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&h?f((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":h?f(""[Symbol.iterator]()):n,"%Symbol%":h?Symbol:n,"%SyntaxError%":i,"%ThrowTypeError%":l,"%TypedArray%":d,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};try{null.error}catch(t){var v=f(f(t));y["%Error.prototype%"]=v}var g=function t(e){var r;if("%AsyncFunction%"===e)r=s("async function () {}");else if("%GeneratorFunction%"===e)r=s("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=s("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&(r=f(i.prototype))}return y[e]=r,r},m={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},b=r(5049),w=r(8032),A=b.call(Function.call,Array.prototype.concat),x=b.call(Function.apply,Array.prototype.splice),_=b.call(Function.call,String.prototype.replace),k=b.call(Function.call,String.prototype.slice),T=b.call(Function.call,RegExp.prototype.exec),E=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,O=/\\(\\)?/g,j=function(t,e){var r,n=t;if(w(m,n)&&(n="%"+(r=m[n])[0]+"%"),w(y,n)){var o=y[n];if(o===p&&(o=g(n)),void 0===o&&!e)throw new a("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new i("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,t))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=k(t,0,1),r=k(t,-1);if("%"===e&&"%"!==r)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new i("invalid intrinsic syntax, expected opening `%`");var n=[];return _(t,E,(function(t,e,r,i){n[n.length]=r?_(i,O,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",o=j("%"+n+"%",e),s=o.name,c=o.value,l=!1,h=o.alias;h&&(n=h[0],x(r,A([0,1],h)));for(var f=1,p=!0;f=r.length){var m=u(c,d);c=(p=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:c[d]}else p=w(c,d),c=c[d];p&&!l&&(y[s]=c)}}return c}},8109:(t,e,r)=>{"use strict";var n=r(8651)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},8890:(t,e,r)=>{"use strict";var n=r(8651)("%Object.defineProperty%",!0),i=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};i.hasArrayLengthDefineBug=function(){if(!i())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=i},3257:(t,e,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(2843);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},2843:t=>{"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},6626:(t,e,r)=>{"use strict";var n=r(2843);t.exports=function(){return n()&&!!Symbol.toStringTag}},8032:(t,e,r)=>{"use strict";var n=r(5049);t.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},9029:(t,e)=>{e.read=function(t,e,r,n,i){var o,a,s=8*i-n-1,u=(1<>1,l=-7,h=r?i-1:0,f=r?-1:1,p=t[e+h];for(h+=f,o=p&(1<<-l)-1,p>>=-l,l+=s;l>0;o=256*o+t[e+h],h+=f,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+t[e+h],h+=f,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),o-=c}return(p?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var a,s,u,c=8*o-i-1,l=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+h>=1?f/u:f*Math.pow(2,1-h))*u>=2&&(a++,u/=2),a+h>=l?(s=0,a=l):a+h>=1?(s=(e*u-1)*Math.pow(2,i),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;t[r+p]=255&s,p+=d,s/=256,i-=8);for(a=a<0;t[r+p]=255&a,p+=d,a/=256,c-=8);t[r+p-d]|=128*y}},9784:t=>{"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},7906:(t,e,r)=>{"use strict";var n=r(6626)(),i=r(7913)("Object.prototype.toString"),o=function(t){return!(n&&t&&"object"==typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===i(t)},a=function(t){return!!o(t)||null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Array]"!==i(t)&&"[object Function]"===i(t.callee)},s=function(){return o(arguments)}();o.isLegacyArguments=a,t.exports=s?o:a},3746:t=>{"use strict";var e,r,n=Function.prototype.toString,i="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof i&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},i((function(){throw 42}),null,e)}catch(t){t!==r&&(i=null)}else i=null;var o=/^\s*class\b/,a=function(t){try{var e=n.call(t);return o.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},u=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),h=function(){return!1};if("object"==typeof document){var f=document.all;u.call(f)===u.call(document.all)&&(h=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=u.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=i?function(t){if(h(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{i(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(h(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(c)return s(t);if(a(t))return!1;var e=u.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},4610:(t,e,r)=>{"use strict";var n,i=Object.prototype.toString,o=Function.prototype.toString,a=/^\s*(?:function)?\*/,s=r(6626)(),u=Object.getPrototypeOf;t.exports=function(t){if("function"!=typeof t)return!1;if(a.test(o.call(t)))return!0;if(!s)return"[object GeneratorFunction]"===i.call(t);if(!u)return!1;if(void 0===n){var e=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(t){}}();n=!!e&&u(e)}return u(t)===n}},2621:t=>{"use strict";t.exports=function(t){return t!=t}},7051:(t,e,r)=>{"use strict";var n=r(6601),i=r(7802),o=r(2621),a=r(1320),s=r(5074),u=n(a(),Number);i(u,{getPolyfill:a,implementation:o,shim:s}),t.exports=u},1320:(t,e,r)=>{"use strict";var n=r(2621);t.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},5074:(t,e,r)=>{"use strict";var n=r(7802),i=r(1320);t.exports=function(){var t=i();return n(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}},6094:(t,e,r)=>{"use strict";var n=r(8404),i=r(821),o=r(7913),a=o("Object.prototype.toString"),s=r(6626)(),u=r(8109),c="undefined"==typeof globalThis?r.g:globalThis,l=i(),h=o("Array.prototype.indexOf",!0)||function(t,e){for(var r=0;r-1}return!!u&&function(t){var e=!1;return n(p,(function(r,n){if(!e)try{e=r.call(t)===n}catch(t){}})),e}(t)}},3249:t=>{"use strict";var e=function(t){return t!=t};t.exports=function(t,r){return 0===t&&0===r?1/t==1/r:t===r||!(!e(t)||!e(r))}},8527:(t,e,r)=>{"use strict";var n=r(7802),i=r(6601),o=r(3249),a=r(9636),s=r(3534),u=i(a(),Object);n(u,{getPolyfill:a,implementation:o,shim:s}),t.exports=u},9636:(t,e,r)=>{"use strict";var n=r(3249);t.exports=function(){return"function"==typeof Object.is?Object.is:n}},3534:(t,e,r)=>{"use strict";var n=r(9636),i=r(7802);t.exports=function(){var t=n();return i(Object,{is:t},{is:function(){return Object.is!==t}}),t}},8461:(t,e,r)=>{"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,a=r(6515),s=Object.prototype.propertyIsEnumerable,u=!s.call({toString:null},"toString"),c=s.call((function(){}),"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],h=function(t){var e=t.constructor;return e&&e.prototype===t},f={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},p=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!f["$"+t]&&i.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{h(window[t])}catch(t){return!0}}catch(t){return!0}return!1}();n=function(t){var e=null!==t&&"object"==typeof t,r="[object Function]"===o.call(t),n=a(t),s=e&&"[object String]"===o.call(t),f=[];if(!e&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var d=c&&r;if(s&&t.length>0&&!i.call(t,0))for(var y=0;y0)for(var v=0;v{"use strict";var n=Array.prototype.slice,i=r(6515),o=Object.keys,a=o?function(t){return o(t)}:r(8461),s=Object.keys;a.shim=function(){if(Object.keys){var t=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(Object.keys=function(t){return i(t)?s(n.call(t)):s(t)})}else Object.keys=a;return Object.keys||a},t.exports=a},6515:t=>{"use strict";var e=Object.prototype.toString;t.exports=function(t){var r=e.call(t),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===e.call(t.callee)),n}},9964:t=>{var e,r,n=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(t){if(e===setTimeout)return setTimeout(t,0);if((e===i||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:i}catch(t){e=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var s,u=[],c=!1,l=-1;function h(){c&&s&&(c=!1,s.length?u=s.concat(u):l=-1,u.length&&f())}function f(){if(!c){var t=a(h);c=!0;for(var e=u.length;e;){for(s=u,u=[];++l1)for(var r=1;r{"use strict";function e(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,r,n,i){r=r||"&",n=n||"=";var o={};if("string"!=typeof t||0===t.length)return o;var a=/\+/g;t=t.split(r);var s=1e3;i&&"number"==typeof i.maxKeys&&(s=i.maxKeys);var u=t.length;s>0&&u>s&&(u=s);for(var c=0;c=0?(l=d.substr(0,y),h=d.substr(y+1)):(l=d,h=""),f=decodeURIComponent(l),p=decodeURIComponent(h),e(o,f)?Array.isArray(o[f])?o[f].push(p):o[f]=[o[f],p]:o[f]=p}return o}},3016:t=>{"use strict";var e=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,r,n,i){return r=r||"&",n=n||"=",null===t&&(t=void 0),"object"==typeof t?Object.keys(t).map((function(i){var o=encodeURIComponent(e(i))+n;return Array.isArray(t[i])?t[i].map((function(t){return o+encodeURIComponent(e(t))})).join(r):o+encodeURIComponent(e(t[i]))})).join(r):i?encodeURIComponent(e(i))+n+encodeURIComponent(e(t)):""}},4756:(t,e,r)=>{"use strict";e.decode=e.parse=r(4016),e.encode=e.stringify=r(3016)},5582:(t,e,r)=>{let n;t.exports="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:r.g):t=>(n||(n=Promise.resolve())).then(t).catch((t=>setTimeout((()=>{throw t}),0)))},8540:t=>{const e={acl:"http://www.w3.org/ns/auth/acl#",arg:"http://www.w3.org/ns/pim/arg#",as:"https://www.w3.org/ns/activitystreams#",cal:"http://www.w3.org/2002/12/cal/ical#",cert:"http://www.w3.org/ns/auth/cert#",contact:"http://www.w3.org/2000/10/swap/pim/contact#",dc:"http://purl.org/dc/elements/1.1/",dct:"http://purl.org/dc/terms/",doap:"http://usefulinc.com/ns/doap#",foaf:"http://xmlns.com/foaf/0.1/",geo:"http://www.w3.org/2003/01/geo/wgs84_pos#",gpx:"http://www.w3.org/ns/pim/gpx#",http:"http://www.w3.org/2007/ont/http#",httph:"http://www.w3.org/2007/ont/httph#",icalTZ:"http://www.w3.org/2002/12/cal/icaltzd#",ldp:"http://www.w3.org/ns/ldp#",link:"http://www.w3.org/2007/ont/link#",log:"http://www.w3.org/2000/10/swap/log#",meeting:"http://www.w3.org/ns/pim/meeting#",mo:"http://purl.org/ontology/mo/",org:"http://www.w3.org/ns/org#",owl:"http://www.w3.org/2002/07/owl#",pad:"http://www.w3.org/ns/pim/pad#",patch:"http://www.w3.org/ns/pim/patch#",prov:"http://www.w3.org/ns/prov#",qu:"http://www.w3.org/2000/10/swap/pim/qif#",trip:"http://www.w3.org/ns/pim/trip#",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",rss:"http://purl.org/rss/1.0/",sched:"http://www.w3.org/ns/pim/schedule#",schema:"http://schema.org/",sioc:"http://rdfs.org/sioc/ns#",solid:"http://www.w3.org/ns/solid/terms#",space:"http://www.w3.org/ns/pim/space#",stat:"http://www.w3.org/ns/posix/stat#",tab:"http://www.w3.org/2007/ont/link#",tabont:"http://www.w3.org/2007/ont/link#",ui:"http://www.w3.org/ns/ui#",vcard:"http://www.w3.org/2006/vcard/ns#",wf:"http://www.w3.org/2005/01/wf/flow#",xsd:"http://www.w3.org/2001/XMLSchema#",cco:"http://www.ontologyrepository.com/CommonCoreOntologies/",skos:"http://www.w3.org/2004/02/skos/core#",bookmark:"http://www.w3.org/2002/01/bookmark#",vann:"http://purl.org/vocab/vann/"};t.exports=function(t={namedNode:t=>t}){const r={};for(const n in e){const i=e[n];r[n]=function(e=""){return t.namedNode(i+e)}}return r}},9292:function(t,e,r){var n;t=r.nmd(t),function(i){e&&e.nodeType,t&&t.nodeType;var o="object"==typeof r.g&&r.g;o.global!==o&&o.window!==o&&o.self;var a,s=2147483647,u=36,c=26,l=38,h=700,f=/^xn--/,p=/[^\x20-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},v=u-1,g=Math.floor,m=String.fromCharCode;function b(t){throw RangeError(y[t])}function w(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function A(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),n+w((t=t.replace(d,".")).split("."),e).join(".")}function x(t){for(var e,r,n=[],i=0,o=t.length;i=55296&&e<=56319&&i65535&&(e+=m((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+m(t)})).join("")}function k(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function T(t,e,r){var n=0;for(t=r?g(t/h):t>>1,t+=g(t/e);t>v*c>>1;n+=u)t=g(t/v);return g(n+(v+1)*t/(t+l))}function E(t){var e,r,n,i,o,a,l,h,f,p,d,y=[],v=t.length,m=0,w=128,A=72;for((r=t.lastIndexOf("-"))<0&&(r=0),n=0;n=128&&b("not-basic"),y.push(t.charCodeAt(n));for(i=r>0?r+1:0;i=v&&b("invalid-input"),((h=(d=t.charCodeAt(i++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:u)>=u||h>g((s-m)/a))&&b("overflow"),m+=h*a,!(h<(f=l<=A?1:l>=A+c?c:l-A));l+=u)a>g(s/(p=u-f))&&b("overflow"),a*=p;A=T(m-o,e=y.length+1,0==o),g(m/e)>s-w&&b("overflow"),w+=g(m/e),m%=e,y.splice(m++,0,w)}return _(y)}function O(t){var e,r,n,i,o,a,l,h,f,p,d,y,v,w,A,_=[];for(y=(t=x(t)).length,e=128,r=0,o=72,a=0;a=e&&dg((s-r)/(v=n+1))&&b("overflow"),r+=(l-e)*v,e=l,a=0;as&&b("overflow"),d==e){for(h=r,f=u;!(h<(p=f<=o?1:f>=o+c?c:f-o));f+=u)A=h-p,w=u-p,_.push(m(k(p+A%w,0))),h=g(A/w);_.push(m(k(h,0))),o=T(r,v,n==i),r=0,++n}++r,++e}return _.join("")}a={version:"1.3.2",ucs2:{decode:x,encode:_},decode:E,encode:O,toASCII:function(t){return A(t,(function(t){return p.test(t)?"xn--"+O(t):t}))},toUnicode:function(t){return A(t,(function(t){return f.test(t)?E(t.slice(4).toLowerCase()):t}))}},void 0===(n=function(){return a}.call(e,r,e,t))||(t.exports=n)}()},9533:(t,e,r)=>{"use strict";var n=r(9292),i=r(8278);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),h=["%","/","?",";","#"].concat(l),f=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,y={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=r(4756);o.prototype.parse=function(t,e,r){if(!i.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),s=-1!==o&&o127?C+="x":C+=I[P];if(!C.match(p)){var U=S.slice(0,O),D=S.slice(O+1),L=I.match(d);L&&(U.push(L[1]),D.unshift(L[2])),D.length&&(b="/"+D.join(".")+b),this.hostname=U.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),N||(this.hostname=n.toASCII(this.hostname));var M=this.port?":"+this.port:"",B=this.hostname||"";this.host=B+M,this.href+=this.host,N&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!y[x])for(O=0,R=l.length;O0)&&r.host.split("@"))&&(r.auth=N.shift(),r.host=r.hostname=N.shift())),r.search=t.search,r.query=t.query,i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!_.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var T=_.slice(-1)[0],E=(r.host||t.host||_.length>1)&&("."===T||".."===T)||""===T,O=0,j=_.length;j>=0;j--)"."===(T=_[j])?_.splice(j,1):".."===T?(_.splice(j,1),O++):O&&(_.splice(j,1),O--);if(!A&&!x)for(;O--;O)_.unshift("..");!A||""===_[0]||_[0]&&"/"===_[0].charAt(0)||_.unshift(""),E&&"/"!==_.join("/").substr(-1)&&_.push("");var N,S=""===_[0]||_[0]&&"/"===_[0].charAt(0);return k&&(r.hostname=r.host=S?"":_.length?_.shift():"",(N=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=N.shift(),r.host=r.hostname=N.shift())),(A=A||r.host&&_.length)&&!S&&_.unshift(""),_.length?r.pathname=_.join("/"):(r.pathname=null,r.path=null),i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var t=this.host,e=s.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},8278:t=>{"use strict";t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},1201:t=>{t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},9490:(t,e,r)=>{"use strict";var n=r(7906),i=r(4610),o=r(3381),a=r(6094);function s(t){return t.call.bind(t)}var u="undefined"!=typeof BigInt,c="undefined"!=typeof Symbol,l=s(Object.prototype.toString),h=s(Number.prototype.valueOf),f=s(String.prototype.valueOf),p=s(Boolean.prototype.valueOf);if(u)var d=s(BigInt.prototype.valueOf);if(c)var y=s(Symbol.prototype.valueOf);function v(t,e){if("object"!=typeof t)return!1;try{return e(t),!0}catch(t){return!1}}function g(t){return"[object Map]"===l(t)}function m(t){return"[object Set]"===l(t)}function b(t){return"[object WeakMap]"===l(t)}function w(t){return"[object WeakSet]"===l(t)}function A(t){return"[object ArrayBuffer]"===l(t)}function x(t){return"undefined"!=typeof ArrayBuffer&&(A.working?A(t):t instanceof ArrayBuffer)}function _(t){return"[object DataView]"===l(t)}function k(t){return"undefined"!=typeof DataView&&(_.working?_(t):t instanceof DataView)}e.isArgumentsObject=n,e.isGeneratorFunction=i,e.isTypedArray=a,e.isPromise=function(t){return"undefined"!=typeof Promise&&t instanceof Promise||null!==t&&"object"==typeof t&&"function"==typeof t.then&&"function"==typeof t.catch},e.isArrayBufferView=function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):a(t)||k(t)},e.isUint8Array=function(t){return"Uint8Array"===o(t)},e.isUint8ClampedArray=function(t){return"Uint8ClampedArray"===o(t)},e.isUint16Array=function(t){return"Uint16Array"===o(t)},e.isUint32Array=function(t){return"Uint32Array"===o(t)},e.isInt8Array=function(t){return"Int8Array"===o(t)},e.isInt16Array=function(t){return"Int16Array"===o(t)},e.isInt32Array=function(t){return"Int32Array"===o(t)},e.isFloat32Array=function(t){return"Float32Array"===o(t)},e.isFloat64Array=function(t){return"Float64Array"===o(t)},e.isBigInt64Array=function(t){return"BigInt64Array"===o(t)},e.isBigUint64Array=function(t){return"BigUint64Array"===o(t)},g.working="undefined"!=typeof Map&&g(new Map),e.isMap=function(t){return"undefined"!=typeof Map&&(g.working?g(t):t instanceof Map)},m.working="undefined"!=typeof Set&&m(new Set),e.isSet=function(t){return"undefined"!=typeof Set&&(m.working?m(t):t instanceof Set)},b.working="undefined"!=typeof WeakMap&&b(new WeakMap),e.isWeakMap=function(t){return"undefined"!=typeof WeakMap&&(b.working?b(t):t instanceof WeakMap)},w.working="undefined"!=typeof WeakSet&&w(new WeakSet),e.isWeakSet=function(t){return w(t)},A.working="undefined"!=typeof ArrayBuffer&&A(new ArrayBuffer),e.isArrayBuffer=x,_.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&_(new DataView(new ArrayBuffer(1),0,1)),e.isDataView=k;var T="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function E(t){return"[object SharedArrayBuffer]"===l(t)}function O(t){return void 0!==T&&(void 0===E.working&&(E.working=E(new T)),E.working?E(t):t instanceof T)}function j(t){return v(t,h)}function N(t){return v(t,f)}function S(t){return v(t,p)}function R(t){return u&&v(t,d)}function I(t){return c&&v(t,y)}e.isSharedArrayBuffer=O,e.isAsyncFunction=function(t){return"[object AsyncFunction]"===l(t)},e.isMapIterator=function(t){return"[object Map Iterator]"===l(t)},e.isSetIterator=function(t){return"[object Set Iterator]"===l(t)},e.isGeneratorObject=function(t){return"[object Generator]"===l(t)},e.isWebAssemblyCompiledModule=function(t){return"[object WebAssembly.Module]"===l(t)},e.isNumberObject=j,e.isStringObject=N,e.isBooleanObject=S,e.isBigIntObject=R,e.isSymbolObject=I,e.isBoxedPrimitive=function(t){return j(t)||N(t)||S(t)||R(t)||I(t)},e.isAnyArrayBuffer=function(t){return"undefined"!=typeof Uint8Array&&(x(t)||O(t))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})}))},7187:(t,e,r)=>{var n=r(9964),i=r(6357),o=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n=i)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}})),s=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&e._extend(n,r),A(n.showHidden)&&(n.showHidden=!1),A(n.depth)&&(n.depth=2),A(n.colors)&&(n.colors=!1),A(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=h),p(n,t,n.depth)}function h(t,e){var r=l.styles[e];return r?"["+l.colors[r][0]+"m"+t+"["+l.colors[r][1]+"m":t}function f(t,e){return t}function p(t,r,n){if(t.customInspect&&r&&E(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return w(i)||(i=p(t,i,n)),i}var o=function(t,e){if(A(e))return t.stylize("undefined","undefined");if(w(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return b(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):m(e)?t.stylize("null","null"):void 0}(t,r);if(o)return o;var a=Object.keys(r),s=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(r)),T(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return d(r);if(0===a.length){if(E(r)){var u=r.name?": "+r.name:"";return t.stylize("[Function"+u+"]","special")}if(x(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(k(r))return t.stylize(Date.prototype.toString.call(r),"date");if(T(r))return d(r)}var c,l="",h=!1,f=["{","}"];return v(r)&&(h=!0,f=["[","]"]),E(r)&&(l=" [Function"+(r.name?": "+r.name:"")+"]"),x(r)&&(l=" "+RegExp.prototype.toString.call(r)),k(r)&&(l=" "+Date.prototype.toUTCString.call(r)),T(r)&&(l=" "+d(r)),0!==a.length||h&&0!=r.length?n<0?x(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),c=h?function(t,e,r,n,i){for(var o=[],a=0,s=e.length;a60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}(c,l,f)):f[0]+l+f[1]}function d(t){return"["+Error.prototype.toString.call(t)+"]"}function y(t,e,r,n,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),S(n,i)||(a="["+i+"]"),s||(t.seen.indexOf(u.value)<0?(s=m(r)?p(t,u.value,null):p(t,u.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(t){return" "+t})).join("\n").slice(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n")):s=t.stylize("[Circular]","special")),A(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function v(t){return Array.isArray(t)}function g(t){return"boolean"==typeof t}function m(t){return null===t}function b(t){return"number"==typeof t}function w(t){return"string"==typeof t}function A(t){return void 0===t}function x(t){return _(t)&&"[object RegExp]"===O(t)}function _(t){return"object"==typeof t&&null!==t}function k(t){return _(t)&&"[object Date]"===O(t)}function T(t){return _(t)&&("[object Error]"===O(t)||t instanceof Error)}function E(t){return"function"==typeof t}function O(t){return Object.prototype.toString.call(t)}function j(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(t=t.toUpperCase(),!s[t])if(u.test(t)){var r=n.pid;s[t]=function(){var n=e.format.apply(e,arguments);i.error("%s %d: %s",t,r,n)}}else s[t]=function(){};return s[t]},e.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=r(9490),e.isArray=v,e.isBoolean=g,e.isNull=m,e.isNullOrUndefined=function(t){return null==t},e.isNumber=b,e.isString=w,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=A,e.isRegExp=x,e.types.isRegExp=x,e.isObject=_,e.isDate=k,e.types.isDate=k,e.isError=T,e.types.isNativeError=T,e.isFunction=E,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(1201);var N=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){var t,r;i.log("%s - %s",(r=[j((t=new Date).getHours()),j(t.getMinutes()),j(t.getSeconds())].join(":"),[t.getDate(),N[t.getMonth()],r].join(" ")),e.format.apply(e,arguments))},e.inherits=r(9784),e._extend=function(t,e){if(!e||!_(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var R="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function I(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(R&&t[R]){var e;if("function"!=typeof(e=t[R]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,R,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise((function(t,n){e=t,r=n})),i=[],o=0;o{"use strict";var n=r(8404),i=r(821),o=r(7913),a=r(8109),s=o("Object.prototype.toString"),u=r(6626)(),c="undefined"==typeof globalThis?r.g:globalThis,l=i(),h=o("String.prototype.slice"),f={},p=Object.getPrototypeOf;u&&a&&p&&n(l,(function(t){if("function"==typeof c[t]){var e=new c[t];if(Symbol.toStringTag in e){var r=p(e),n=a(r,Symbol.toStringTag);if(!n){var i=p(r);n=a(i,Symbol.toStringTag)}f[t]=n.get}}}));var d=r(6094);t.exports=function(t){return!!d(t)&&(u&&Symbol.toStringTag in t?function(t){var e=!1;return n(f,(function(r,n){if(!e)try{var i=r.call(t);i===n&&(e=i)}catch(t){}})),e}(t):h(s(t),8,-1))}},8392:e=>{"use strict";e.exports=t},8541:(t,e,r)=>{var n=r(2990).default;function i(){"use strict";t.exports=i=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var e,r={},o=Object.prototype,a=o.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",h=u.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(e){f=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var i=e&&e.prototype instanceof w?e:w,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:N(t,r,a)}),o}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}r.wrap=p;var y="suspendedStart",v="suspendedYield",g="executing",m="completed",b={};function w(){}function A(){}function x(){}var _={};f(_,c,(function(){return this}));var k=Object.getPrototypeOf,T=k&&k(k(P([])));T&&T!==o&&a.call(T,c)&&(_=T);var E=x.prototype=w.prototype=Object.create(_);function O(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(i,o,s,u){var c=d(t[i],t,o);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==n(h)&&a.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,u)}),(function(t){r("throw",t,s,u)})):e.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,u)}))}u(c.arg)}var i;s(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}})}function N(t,r,n){var i=y;return function(o,a){if(i===g)throw Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=S(s,n);if(u){if(u===b)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===y)throw i=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=g;var c=d(t,r,n);if("normal"===c.type){if(i=n.done?m:v,c.arg===b)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=m,n.method="throw",n.arg=c.arg)}}}function S(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var o=d(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,b;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function R(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(R,this),this.reset(!0)}function P(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var u=a.call(o,"catchLoc"),c=a.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;I(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},r}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},2990:t=>{function e(r){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},232:(t,e,r)=>{var n=r(8541)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},821:(t,e,r)=>{"use strict";var n=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],i="undefined"==typeof globalThis?r.g:globalThis;t.exports=function(){for(var t=[],e=0;e{"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.d(e,{A:()=>n})},2937:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(9812);function i(t,e){for(var r=0;r{"use strict";r.d(e,{A:()=>i});var n=r(9812);function i(t,e,r){return(e=(0,n.A)(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}},8782:(t,e,r)=>{"use strict";function n(t){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},n(t)}r.d(e,{A:()=>n})},9604:(t,e,r)=>{"use strict";function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&n(t,e)}r.d(e,{A:()=>i})},365:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=r(4360);function i(t,e){if(e&&("object"===(0,n.A)(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}},9812:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=r(4360);function i(t){var e=function(t,e){if("object"!=(0,n.A)(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,"string");if("object"!=(0,n.A)(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==(0,n.A)(e)?e:e+""}},4360:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r.d(e,{A:()=>n})}},a={};function s(t){var e=a[t];if(void 0!==e)return e.exports;var r=a[t]={id:t,loaded:!1,exports:{}};return o[t].call(r.exports,r,r.exports,s),r.loaded=!0,r.exports}s.m=o,s.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e},r=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,s.t=function(t,n){if(1&n&&(t=this(t)),8&n)return t;if("object"==typeof t&&t){if(4&n&&t.__esModule)return t;if(16&n&&"function"==typeof t.then)return t}var i=Object.create(null);s.r(i);var o={};e=e||[null,r({}),r([]),r(r)];for(var a=2&n&&t;"object"==typeof a&&!~e.indexOf(a);a=r(a))Object.getOwnPropertyNames(a).forEach((e=>o[e]=()=>t[e]));return o.default=()=>t,s.d(i,o),i},s.d=(t,e)=>{for(var r in e)s.o(e,r)&&!s.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},s.f={},s.e=t=>Promise.all(Object.keys(s.f).reduce(((e,r)=>(s.f[r](t,e),e)),[])),s.u=t=>t+".rdflib.min.js",s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),s.hmd=t=>((t=Object.create(t)).children||(t.children=[]),Object.defineProperty(t,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+t.id)}}),t),s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n={},i="$rdf:",s.l=(t,e,r,o)=>{if(n[t])n[t].push(e);else{var a,u;if(void 0!==r)for(var c=document.getElementsByTagName("script"),l=0;l{a.onerror=a.onload=null,clearTimeout(p);var i=n[t];if(delete n[t],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach((t=>t(r))),e)return e(r)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=f.bind(null,a.onerror),a.onload=f.bind(null,a.onload),u&&document.head.appendChild(a)}},s.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{var t;s.g.importScripts&&(t=s.g.location+"");var e=s.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=r[n--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=t})(),(()=>{var t={792:0};s.f.j=(e,r)=>{var n=s.o(t,e)?t[e]:void 0;if(0!==n)if(n)r.push(n[2]);else{var i=new Promise(((r,i)=>n=t[e]=[r,i]));r.push(n[2]=i);var o=s.p+s.u(e),a=new Error;s.l(o,(r=>{if(s.o(t,e)&&(0!==(n=t[e])&&(t[e]=void 0),n)){var i=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;a.message="Loading chunk "+e+" failed.\n("+i+": "+o+")",a.name="ChunkLoadError",a.type=i,a.request=o,n[1](a)}}),"chunk-"+e,e)}};var e=(e,r)=>{var n,i,[o,a,u]=r,c=0;if(o.some((e=>0!==t[e]))){for(n in a)s.o(a,n)&&(s.m[n]=a[n]);u&&u(s)}for(e&&e(r);c{"use strict";s.r(u),s.d(u,{BlankNode:()=>p,Collection:()=>k,ConnectedStore:()=>zr,DataFactory:()=>xr,Empty:()=>O,Fetcher:()=>fr,Formula:()=>ht,IndexedFormula:()=>Et,Literal:()=>w,LiveStore:()=>Xr,N3Parser:()=>Yt,NamedNode:()=>y.A,Namespace:()=>W,NextId:()=>$r,Node:()=>ft,Query:()=>yt,RDFParser:()=>He,RDFaProcessor:()=>Be,SPARQLToQuery:()=>yr,Serializer:()=>et,Statement:()=>L,Store:()=>Et,UpdateManager:()=>mr,UpdatesSocket:()=>_r,UpdatesVia:()=>kr,Util:()=>Q,Variable:()=>H,blankNode:()=>Fr,defaultGraph:()=>Ur,fetcher:()=>Nr,fromNT:()=>qr,graph:()=>Sr,isBlankNode:()=>v.jt,isCollection:()=>v.P3,isGraph:()=>v.RN,isLiteral:()=>v.c$,isNamedNode:()=>v.Y2,isPredicate:()=>v.YC,isQuad:()=>v.aF,isRDFObject:()=>v.GE,isRDFlibObject:()=>v.DJ,isRDFlibPredicate:()=>v.fY,isRDFlibSubject:()=>v.CZ,isStatement:()=>v.SH,isStore:()=>v.ok,isSubject:()=>v.hr,isTerm:()=>v.D0,isVariable:()=>v.DZ,jsonParser:()=>pr,lit:()=>Rr,literal:()=>Dr,log:()=>V.A,namedNode:()=>Cr,parse:()=>ze,quad:()=>Lr,queryToSPARQL:()=>dr,serialize:()=>nt,sparqlUpdateParser:()=>$e,st:()=>Ir,sym:()=>Cr,term:()=>Hr,termValue:()=>Ve.E,triple:()=>Mr,uri:()=>M,variable:()=>Pr});var t=s(2937),e=s(9121),r=s(365),n=s(8782),i=s(9604),o=s(8175),a=s(9390),c=s(1605),l=s(6866);function h(t,e,i){return e=(0,n.A)(e),(0,r.A)(t,f()?Reflect.construct(e,i||[],(0,n.A)(t).constructor):e.apply(t,i))}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(f=function(){return!!t})()}var p=function(r){function n(t){var r;return(0,e.A)(this,n),r=h(this,n,[n.getId(t)]),(0,o.A)(r,"termType",l.$Q),(0,o.A)(r,"classOrder",a.A.BlankNode),(0,o.A)(r,"isBlank",1),(0,o.A)(r,"isVar",1),r}return(0,i.A)(n,r),(0,t.A)(n,[{key:"id",get:function(){return this.value},set:function(t){this.value=t}},{key:"compareTerm",value:function(t){return this.classOrdert.classOrder?1:this.idt.id?1:0}},{key:"copy",value:function(t){var e=new n;return t.copyTo(this,e),e}},{key:"toCanonical",value:function(){return n.NTAnonymousNodePrefix+this.value}},{key:"toString",value:function(){return n.NTAnonymousNodePrefix+this.id}}],[{key:"getId",value:function(t){if(t){if("string"!=typeof t)throw new Error("Bad id argument to new blank node: "+t);if(t.includes("#")){var e=t.split("#");return e[e.length-1]}return t}return"n"+n.nextId++}}])}(c.A);(0,o.A)(p,"nextId",0),(0,o.A)(p,"NTAnonymousNodePrefix","_:");var d=s(4360),y=s(3627),v=s(546);const g={boolean:new y.A("http://www.w3.org/2001/XMLSchema#boolean"),dateTime:new y.A("http://www.w3.org/2001/XMLSchema#dateTime"),decimal:new y.A("http://www.w3.org/2001/XMLSchema#decimal"),double:new y.A("http://www.w3.org/2001/XMLSchema#double"),integer:new y.A("http://www.w3.org/2001/XMLSchema#integer"),langString:new y.A("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"),string:new y.A("http://www.w3.org/2001/XMLSchema#string")};function m(t,e,i){return e=(0,n.A)(e),(0,r.A)(t,b()?Reflect.construct(e,i||[],(0,n.A)(t).constructor):e.apply(t,i))}function b(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(b=function(){return!!t})()}var w=function(r){function n(t,r,i){var s;return(0,e.A)(this,n),s=m(this,n,[t]),(0,o.A)(s,"termType",l.QW),(0,o.A)(s,"classOrder",a.A.Literal),(0,o.A)(s,"datatype",g.string),(0,o.A)(s,"isVar",0),(0,o.A)(s,"language",""),r?(s.language=r,s.datatype=g.langString):s.datatype=i?y.A.fromValue(i):g.string,s}return(0,i.A)(n,r),(0,t.A)(n,[{key:"copy",value:function(){return new n(this.value,this.lang,this.datatype)}},{key:"equals",value:function(t){return!!t&&this.termType===t.termType&&this.value===t.value&&this.language===t.language&&(!this.datatype&&!t.datatype||this.datatype&&this.datatype.equals(t.datatype))}},{key:"lang",get:function(){return this.language},set:function(t){this.language=t||""}},{key:"toNT",value:function(){return n.toNT(this)}},{key:"toString",value:function(){return""+this.value}}],[{key:"toNT",value:function(t){if("number"==typeof t.value)return""+t.value;if("string"!=typeof t.value)throw new Error("Value of RDF literal is not string or number: "+t.value);var e=t.value;return e='"'+(e=(e=(e=(e=e.replace(/\\/g,"\\\\")).replace(/\"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r"))+'"',t.language?e+="@"+t.language:t.datatype.equals(g.string)||(e+="^^"+t.datatype.toCanonical()),e}},{key:"fromBoolean",value:function(t){return new n(t?"1":"0",null,g.boolean)}},{key:"fromDate",value:function(t){if(!(t instanceof Date))throw new TypeError("Invalid argument to Literal.fromDate()");var e=function(t){return(""+(100+t)).slice(1,3)};return new n(t.getUTCFullYear()+"-"+e(t.getUTCMonth()+1)+"-"+e(t.getUTCDate())+"T"+e(t.getUTCHours())+":"+e(t.getUTCMinutes())+":"+e(t.getUTCSeconds())+"Z",null,g.dateTime)}},{key:"fromNumber",value:function(t){if("number"!=typeof t)throw new TypeError("Invalid argument to Literal.fromNumber()");var e,r=t.toString();return e=r.indexOf("e")<0&&Math.abs(t)<=Number.MAX_SAFE_INTEGER?Number.isInteger(t)?g.integer:g.decimal:g.double,new n(r,null,e)}},{key:"fromValue",value:function(t){if((0,v.c$)(t))return t;switch((0,d.A)(t)){case"object":if(t instanceof Date)return n.fromDate(t);case"boolean":return n.fromBoolean(t);case"number":return n.fromNumber(t);case"string":return new n(t)}throw new Error("Can't make literal from "+t+" of type "+(0,d.A)(t))}}])}(c.A);function A(t,e,i){return e=(0,n.A)(e),(0,r.A)(t,x()?Reflect.construct(e,i||[],(0,n.A)(t).constructor):e.apply(t,i))}function x(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(x=function(){return!!t})()}function _(t){return null==t||(0,v.D0)(t)?t:Array.isArray(t)?new k(t):w.fromValue(t)}var k=function(r){function n(t){var r;return(0,e.A)(this,n),r=A(this,n,[(p.nextId++).toString()]),(0,o.A)(r,"termType",l.r0),(0,o.A)(r,"classOrder",a.A.Collection),(0,o.A)(r,"closed",!1),(0,o.A)(r,"compareTerm",p.prototype.compareTerm),(0,o.A)(r,"elements",[]),(0,o.A)(r,"isVar",0),t&&t.length>0&&t.forEach((function(t){r.elements.push(_(t))})),r}return(0,i.A)(n,r),(0,t.A)(n,[{key:"id",get:function(){return this.value},set:function(t){this.value=t}},{key:"append",value:function(t){return this.elements.push(t)}},{key:"close",value:function(){return this.closed=!0,this.closed}},{key:"shift",value:function(){return this.elements.shift()}},{key:"substitute",value:function(t){return new n(this.elements.map((function(e){return e.substitute(t)})))}},{key:"toNT",value:function(){return n.toNT(this)}},{key:"toString",value:function(){return"("+this.elements.join(" ")+")"}},{key:"unshift",value:function(t){return this.elements.unshift(t)}}],[{key:"toNT",value:function(t){return p.NTAnonymousNodePrefix+t.id}}])}(c.A);function T(t,e,i){return e=(0,n.A)(e),(0,r.A)(t,E()?Reflect.construct(e,i||[],(0,n.A)(t).constructor):e.apply(t,i))}function E(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(E=function(){return!!t})()}(0,o.A)(k,"termType",l.r0);var O=function(r){function n(){var t;return(0,e.A)(this,n),t=T(this,n,[""]),(0,o.A)(t,"termType",l.S),t}return(0,i.A)(n,r),(0,t.A)(n,[{key:"toString",value:function(){return"()"}}])}(c.A);function j(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function N(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){j(o,n,i,a,s,"next",t)}function s(t){j(o,n,i,a,s,"throw",t)}a(void 0)}))}}var S=s(232),R=s.n(S),I="chrome:theSession";function C(t,e,i){return e=(0,n.A)(e),(0,r.A)(t,P()?Reflect.construct(e,i||[],(0,n.A)(t).constructor):e.apply(t,i))}function P(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(P=function(){return!!t})()}new y.A(I);var F=function(r){function n(){var t;return(0,e.A)(this,n),t=C(this,n,[""]),(0,o.A)(t,"value",""),(0,o.A)(t,"termType",l.ic),(0,o.A)(t,"uri",I),t}return(0,i.A)(n,r),(0,t.A)(n,[{key:"toCanonical",value:function(){return this.value}},{key:"toString",value:function(){return"DefaultGraph"}}])}(c.A);function U(t){return!!t&&t.termType===l.ic}var D=new F,L=function(){function r(t,n,i,a){(0,e.A)(this,r),(0,o.A)(this,"subject",void 0),(0,o.A)(this,"predicate",void 0),(0,o.A)(this,"object",void 0),(0,o.A)(this,"graph",void 0),this.subject=c.A.fromValue(t),this.predicate=c.A.fromValue(n),this.object=c.A.fromValue(i),this.graph=null==a?D:c.A.fromValue(a)}return(0,t.A)(r,[{key:"why",get:function(){return this.graph},set:function(t){this.graph=t}},{key:"equals",value:function(t){return t.subject.equals(this.subject)&&t.predicate.equals(this.predicate)&&t.object.equals(this.object)&&t.graph.equals(this.graph)}},{key:"substitute",value:function(t){return new r(this.subject.substitute(t),this.predicate.substitute(t),this.object.substitute(t),U(this.graph)?this.graph:this.graph.substitute(t))}},{key:"toCanonical",value:function(){var t=[this.subject.toCanonical(),this.predicate.toCanonical(),this.object.toCanonical()];return this.graph&&this.graph.termType!==l.ic&&t.push(this.graph.toCanonical()),t.join(" ")+" ."}},{key:"toNT",value:function(){return[this.subject.toNT(),this.predicate.toNT(),this.object.toNT()].join(" ")+" ."}},{key:"toNQ",value:function(){return[this.subject.toNT(),this.predicate.toNT(),this.object.toNT(),U(this.graph)?"":this.graph.toNT()].join(" ")+" ."}},{key:"toString",value:function(){return this.toNT()}}])}(),M=s(4221);function B(t,e,i){return e=(0,n.A)(e),(0,r.A)(t,q()?Reflect.construct(e,i||[],(0,n.A)(t).constructor):e.apply(t,i))}function q(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(q=function(){return!!t})()}var H=function(r){function n(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(0,e.A)(this,n),t=B(this,n,[r]),(0,o.A)(t,"termType",l.P2),(0,o.A)(t,"base","varid:"),(0,o.A)(t,"classOrder",a.A.Variable),(0,o.A)(t,"isVar",1),(0,o.A)(t,"uri",void 0),t.base="varid:",t.uri=M.join(r,t.base),t}return(0,i.A)(n,r),(0,t.A)(n,[{key:"equals",value:function(t){return!!t&&this.termType===t.termType&&this.value===t.value}},{key:"hashString",value:function(){return this.toString()}},{key:"substitute",value:function(t){var e;return null!=(e=t[this.toNT()])?e:this}},{key:"toString",value:function(){return n.toString(this)}}],[{key:"toString",value:function(t){return t.uri.slice(0,t.base.length)===t.base?"?".concat(t.uri.slice(t.base.length)):"?".concat(t.uri)}}])}(c.A),$=function(t){return t.collections="COLLECTIONS",t.defaultGraphType="DEFAULT_GRAPH_TYPE",t.equalsMethod="EQUALS_METHOD",t.id="ID",t.identity="IDENTITY",t.reversibleId="REVERSIBLE_ID",t.variableType="VARIABLE_TYPE",t}({}),z=new F,X={supports:(0,o.A)((0,o.A)((0,o.A)((0,o.A)((0,o.A)((0,o.A)((0,o.A)({},$.collections,!1),$.defaultGraphType,!1),$.equalsMethod,!0),$.identity,!1),$.id,!0),$.reversibleId,!1),$.variableType,!0),blankNode:function(t){return new p(t)},defaultGraph:function(){return z},equals:function(t,e){return t===e||!t||!e||((0,v.aF)(t)||(0,v.aF)(e)?!(!(0,v.aF)(t)||!(0,v.aF)(e))&&this.equals(t.subject,e.subject)&&this.equals(t.predicate,e.predicate)&&this.equals(t.object,e.object)&&this.equals(t.graph,e.graph):!(!(0,v.D0)(t)||!(0,v.D0)(e))&&this.id(t)===this.id(e))},id:function(t){if(!t)return"undefined";if((0,v.aF)(t))return this.quadToNQ(t);switch(t.termType){case l.ic:return"defaultGraph";case l.P2:return H.toString(t);default:var e=this.termToNQ(t);if(e)return e;throw new Error("Can't id term with type '".concat(t.termType,"'"))}},isQuad:function(t){return t instanceof L},literal:function(t,e){if("string"!=typeof t&&!e)return w.fromValue(t);var r="string"==typeof t?t:""+t;return"string"==typeof e?-1===e.indexOf(":")?new w(r,e):new w(r,null,this.namedNode(e)):new w(r,null,e)},namedNode:function(t){return new y.A(t)},quad:function(t,e,r,n){return new L(t,e,r,n||z)},triple:function(t,e,r,n){return this.quad(t,e,r,n)},quadToNQ:function(t){return"".concat(this.termToNQ(t.subject)," ").concat(this.termToNQ(t.predicate)," ").concat(this.termToNQ(t.object)," ").concat(this.termToNQ(t.graph)," .")},termToNQ:function(t){var e=this;switch(t.termType){case l.$Q:return"_:"+t.value;case l.ic:return"";case l.S:return"";case l.QW:return w.toNT(t);case l.bD:case l.Kk:return"<"+t.value+">";case l.r0:return"("+t.elements.map((function(t){return e.termToNQ(t)})).join(" ")+")";default:throw new Error("Can't serialize nonstandard term type (was '".concat(t.termType,"')"))}},toNQ:function(t){return this.isQuad(t)?this.quadToNQ(t):this.termToNQ(t)},variable:function(t){return new H(t)}};const G=X;var V=s(3787);function W(t,e){var r=e||{namedNode:function(t){return new y.A(t)}};return function(e){return r.namedNode(t+(e||""))}}var Q=s(7114);function Y(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:G;return{boolean:t.namedNode("http://www.w3.org/2001/XMLSchema#boolean"),dateTime:t.namedNode("http://www.w3.org/2001/XMLSchema#dateTime"),decimal:t.namedNode("http://www.w3.org/2001/XMLSchema#decimal"),double:t.namedNode("http://www.w3.org/2001/XMLSchema#double"),integer:t.namedNode("http://www.w3.org/2001/XMLSchema#integer"),langString:t.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"),string:t.namedNode("http://www.w3.org/2001/XMLSchema#string")}}Y(G);var J=s(8540),Z=s.n(J),K=s(2312),tt=s(6357);function et(t){return new rt(t)}var rt=function(){function r(t){(0,e.A)(this,r),(0,o.A)(this,"_notQNameChars","\t\r\n !\"#$%&'()*.,+/;<=>?@[\\]^`{|}~"),(0,o.A)(this,"_notNameChars",this._notQNameChars+":"),(0,o.A)(this,"validPrefix",new RegExp(/^[a-zA-Z][a-zA-Z0-9]*$/)),(0,o.A)(this,"forbidden1",new RegExp(/[\\"\b\f\r\v\t\n\u0080-\uffff]/gm)),(0,o.A)(this,"forbidden3",new RegExp(/[\\"\b\f\r\v\u0080-\uffff]/gm)),this.flags="",this.base=null,this.prefixes=[],this.namespaces=[];var n=Object.keys(Z()());for(var i in n){var a=Z()()[n[i]](""),s=n[i];this.prefixes[a]=s,this.namespaces[s]=a}this.suggestPrefix("rdf","http://www.w3.org/1999/02/22-rdf-syntax-ns#"),this.suggestPrefix("xml","reserved:reservedForFutureUse"),this.namespacesUsed=[],this.keywords=["a"],this.prefixchars="abcdefghijklmnopqustuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",this.incoming=null,this.formulas=[],this.store=t,this.rdfFactory=t.rdfFactory||G,this.xsd=Y(this.rdfFactory)}return(0,t.A)(r,[{key:"setBase",value:function(t){return this.base=t,this}},{key:"setFlags",value:function(t){return this.flags=t||"",this}},{key:"toStr",value:function(t){var e=t.toNT();return"Graph"===t.termType&&(this.formulas[e]=t),e}},{key:"fromStr",value:function(t){if("{"===t[0]){var e=this.formulas[t];return e||tt.log("No formula object for "+t),e}return this.store.fromNT(t)}},{key:"setNamespaces",value:function(t){for(var e in t)this.setPrefix(e,t[e]);return this}},{key:"setPrefix",value:function(t,e){if("default"!==t.slice(0,7)&&"ns"!==t.slice(0,2)&&t&&e){for(var r in this.prefixes)this.prefixes[r]==t&&delete this.prefixes[r];this.prefixes[e]=t,this.namespaces[t]=e}}},{key:"suggestPrefix",value:function(t,e){"default"!==t.slice(0,7)&&"ns"!==t.slice(0,2)&&t&&e&&(t in this.namespaces||e in this.prefixes||(this.prefixes[e]=t,this.namespaces[t]=e))}},{key:"suggestNamespaces",value:function(t){for(var e in t)this.suggestPrefix(e,t[e]);return this}},{key:"checkIntegrity",value:function(){var t,e;for(t in this.namespaces)if(this.prefixes[this.namespaces[t]]!==t)throw new Error("Serializer integity error 1: "+t+", "+this.namespaces[t]+", "+this.prefixes[this.namespaces[t]]+"!");for(e in this.prefixes)if(this.namespaces[this.prefixes[e]]!==e)throw new Error("Serializer integity error 2: "+e+", "+this.prefixs[e]+", "+this.namespaces[this.prefixes[e]]+"!")}},{key:"makeUpPrefix",value:function(t){var e=t,r=function(e){return!!this.validPrefix.test(e)&&"ns"!==e&&!(e in this.namespaces)&&(this.prefixes[t]=e,this.namespaces[e]=t,e)}.bind(this);"#/".indexOf(e[e.length-1])>=0&&(e=e.slice(0,-1));var n=e.lastIndexOf("/");n>=0&&(e=e.slice(n+1));for(var i=0;i=0?t=function(t){for(var e,r="",n=0;n65535?"\\U"+("00000000"+e.toString(16)).slice(-8):e>126?"\\u"+("0000"+e.toString(16)).slice(-4):t[n];return r}(t):(e=decodeURI(t),t=encodeURI(e)),"<"+t+">"}},{key:"statementsToNTriples",value:function(t){var e=t.slice();e.sort();for(var r="",n="http://www.w3.org/1999/02/22-rdf-syntax-ns#",i=this,o=this.store,a=this.rdfFactory,s=function t(e){if("Collection"!==e.termType)return i.atomicTermToN3(e);for(var s=e.elements,u=o.sym(n+"nill"),c=s.length-1;c>=0;c--){var l=a.blankNode();r+=t(l)+" "+t(o.sym(n+"first"))+" "+t(s[c])+".\n",r+=t(l)+" "+t(o.sym(n+"rest"))+" "+t(u)+".\n",u=l}return i.atomicTermToN3(u)},u=0;u=0&&(l+=s(c.why)+" "),r+=l+=".\n"}return r}},{key:"statementsToN3",value:function(t){var e=this.store,n={"http://www.w3.org/1999/02/22-rdf-syntax-ns#type":"aaa:00"};t.sort((function(t,r){return Q.heavyCompareSPO(t,r,e,n)})),this.base&&!this.defaultNamespace&&(this.defaultNamespace=this.base+"#");var i={};this.flags.indexOf("s")<0&&(i["http://www.w3.org/2002/07/owl#sameAs"]="="),this.flags.indexOf("t")<0&&(i["http://www.w3.org/1999/02/22-rdf-syntax-ns#type"]="a"),this.flags.indexOf("i")<0&&(i["http://www.w3.org/2000/10/swap/log#implies"]="=>");var o=function(t){for(var e="",r=0;r=0){n=n.slice(0,-1),"."==u&&"0123456789.:".includes(n.charAt(n.length-1))&&(n+=" ",i+=1),n+=u+"\n",i+=1;continue}if(i<4*r+4||i+u.length+1<80&&";.".indexOf(n[n.length-2])<0)n=n.slice(0,-1)+" "+u+"\n",i+=u.length+1;else{var h=o(4*r)+u;n+=h+"\n",i=h.length,r<0&&(n+="\n",i=1e5)}}}return n}(p)}},{key:"atomicTermToN3",value:function(t,e){switch(t.termType){case"BlankNode":case"Variable":return t.toNT();case"Literal":var r=t.value;if("string"!=typeof r)throw new TypeError("Value of RDF literal node must be a string");if(t.datatype&&this.flags.indexOf("x")<0)switch(t.datatype.uri){case"http://www.w3.org/2001/XMLSchema#integer":return r;case"http://www.w3.org/2001/XMLSchema#decimal":return r.indexOf(".")<0&&(r+=".0"),r;case"http://www.w3.org/2001/XMLSchema#double":var n=r.toLowerCase().indexOf("e")>0;return r.indexOf(".")<0&&!n&&(r+=".0"),n||(r+="e0"),r;case"http://www.w3.org/2001/XMLSchema#boolean":return"1"===t.value?"true":"false"}var i=this.stringToN3(t.value);return t.language?i+="@"+t.language:t.datatype.equals(this.xsd.string)||(i+="^^"+this.atomicTermToN3(t.datatype,e)),i;case"NamedNode":return this.symbolToN3(t);case"DefaultGraph":return"";default:throw new Error("Internal: atomicTermToN3 cannot handle "+t+" of termType: "+t.termType)}}},{key:"stringToN3",value:function(t,e){e||(e="e");var r,n,i,o,a,s="";for(t.length>20&&'"'!==t.slice(-1)&&e.indexOf("n")<0&&(t.indexOf("\n")>0||t.indexOf('"')>0)?(o='"""',a=this.forbidden3):(o='"',a=this.forbidden1),r=0;r=0?s+="\\"+'bfrtvn\\"'[i]:e.indexOf("e")>=0?s+="\\u"+("000"+u.charCodeAt(0).toString(16).toLowerCase()).slice(-4):s+=u,r=n+1}return o+s+t.slice(r)+o}},{key:"symbolToN3",value:function(t){var e=t.uri,r=e.indexOf("#");if(r<0&&this.flags.indexOf("/")<0&&(r=e.lastIndexOf("/")),r>=0&&this.flags.indexOf("p")<0&&(0===e.indexOf("http")||0===e.indexOf("ws")||0===e.indexOf("file"))){for(var n=!0,i=r+1;i=0){n=!1;break}if(n){var o=e.slice(r+1),a=e.slice(0,r+1);if(this.defaultNamespace&&this.defaultNamespace===a&&this.flags.indexOf("d")<0)return this.flags.indexOf("k")>=0&&this.keyords.indexOf(o)<0?o:":"+o;var s=this.prefixes[a];if(s||(s=this.makeUpPrefix(a)),s)return this.namespacesUsed[a]=!0,s+":"+o}}return this.explicitURI(e)}},{key:"writeStore",value:function(t){var e=this.store,r=e.fetcher,n=r&&r.appNode,i=this.store.index[3];for(var o in i){var a=e.fromNT(o);n&&a.equals(n)||t("\n"+this.atomicTermToN3(a)+" "+this.atomicTermToN3(e.sym("http://www.w3.org/2000/10/swap/log#semantics"))+" { "+this.statementsToN3(e.statementsMatching(void 0,void 0,void 0,a))+" }.\n")}e.statementsMatching(void 0,e.sym("http://www.w3.org/2007/ont/link#requestedURI")).map((function(r){t("\n<"+r.object.value+"> log:metadata {\n");var n=e.statementsMatching(void 0,void 0,void 0,r.subject);t(this.statementsToN3(this.statementsToN3(n))),t("}.\n")}));var s=[];n&&s.push(n);var u=[];s.map((function(t){u=u.concat(e.statementsMatching(void 0,void 0,void 0,t))})),t(this.statementsToN3(u))}},{key:"statementsToXML",value:function(t){var e=[];e["http://www.w3.org/1999/02/22-rdf-syntax-ns#"]=!0;var r="http://www.w3.org/1999/02/22-rdf-syntax-ns#_",n=function(t){for(var e="",r=0;r',u(o.object,e),""]):p.concat(["<"+i+' rdf:nodeID="'+o.object.toNT().slice(2)+'"/>']);break;case"NamedNode":p=p.concat(["<"+i+' rdf:resource="'+s(o.object)+'"/>']);break;case"Literal":p=p.concat(["<"+i+(o.object.datatype.equals(this.xsd.string)?"":' rdf:datatype="'+a(o.object.datatype.uri)+'"')+(o.object.language?' xml:lang="'+o.object.language+'"':"")+">"+a(o.object.value)+""]);break;case"Collection":p=p.concat(["<"+i+' rdf:parseType="Collection">',c(o.object,e),""]);break;default:throw new Error("Can't serialize object of type "+o.object.termType+" into XML")}}else n=o.object;var g=n?h(n):"rdf:Description",m="";return"BlankNode"===t.termType?e.incoming[t]&&1===e.incoming[t].length||(m=' rdf:nodeID="'+t.toNT().slice(2)+'"'):m=' rdf:about="'+s(t)+'"',["<"+g+m+">"].concat([p]).concat([""])}.bind(this);function c(t,e){for(var r=[],n=0;n',""]):r.concat(["<"+h(o.predicate)+' rdf:parseType="Resource">',l(o.object,e),""]);break;case"NamedNode":r=r.concat(["<"+h(o.predicate)+' rdf:resource="'+s(o.object)+'"/>']);break;case"Literal":r=r.concat(["<"+h(o.predicate)+(o.object.datatype.equals(this.xsd.string)?"":' rdf:datatype="'+a(o.object.datatype.value)+'"')+(o.object.language?' xml:lang="'+o.object.language+'"':"")+">"+a(o.object.value)+""]);break;case"Collection":r=r.concat(["<"+h(o.predicate)+' rdf:parseType="Collection">',c(o.object,e),""]);break;default:throw new Error("Can't serialize object of type "+o.object.termType+" into XML")}}return r}.bind(this),h=function(t){var r=t.uri,n=r.indexOf("#");if(n<0&&this.flags.indexOf("/")<0&&(n=r.lastIndexOf("/")),n<0)throw new Error("Cannot make qname out of <"+r+">");for(var i=n+1;i=0)throw new Error('Invalid character "'+r[i]+'" cannot be in XML qname for URI: '+r);var o=r.slice(n+1),a=r.slice(0,n+1);if(this.defaultNamespace&&this.defaultNamespace===a&&this.flags.indexOf("d")<0)return o;var s=this.prefixes[a];return s||(s=this.makeUpPrefix(a)),e[a]=!0,s+":"+o}.bind(this),f=o(t),p=""],-1)}},{key:"statementsToJsonld",value:function(t){var e=this.statementsToN3(t),r=K.parse(e);return JSON.stringify(r,null,2)}}])}();function nt(t,e,r,n,i,o){r=r||(null==t?void 0:t.value);var a=o||{};n=n||l.sT;try{var s=et(e);a.flags&&s.setFlags(a.flags);var u=e.statementsMatching(void 0,void 0,void 0,t);switch("namespaces"in e&&s.suggestNamespaces(e.namespaces),a.namespaces&&s.setNamespaces(a.namespaces),s.setBase(r),n){case l.JG:return c(null,s.statementsToXML(u));case l.ny:case l.MG:return c(null,s.statementsToN3(u));case l.sT:case l.hu:return s.setFlags("si"),c(null,s.statementsToN3(u));case l.bM:return s.setFlags("deinprstux"),c(null,s.statementsToNTriples(u));case l.i2:return s.setFlags("si dr"),c(null,s.statementsToJsonld(u));case l._0:case l.BR:return s.setFlags("deinprstux q"),c(null,s.statementsToNTriples(u));default:throw new Error("Serialize: Content-type "+n+" not supported for data write.")}}catch(t){if(i)return i(t,void 0);throw t}function c(t,e){return i?void i(t,e):e}}var it=["blankNode","defaultGraph","literal","namedNode","quad","variable","supports"],ot={first:"http://www.w3.org/1999/02/22-rdf-syntax-ns#first",rest:"http://www.w3.org/1999/02/22-rdf-syntax-ns#rest",nil:"http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"};function at(t,e,r){var n=[];return r.reduce((function(e,r,i,o){var a;return n.push(t.quad(e,t.namedNode(ot.first),o[i])),i2&&void 0!==arguments[2]?arguments[2]:0,n=t.length;for(r<0&&(r=n+r);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};(0,e.A)(this,n),(t=ct(this,n,[""])).statements=r,t.constraints=i,t.initBindings=s,t.optional=u,(0,o.A)(t,"termType",l.bD),(0,o.A)(t,"classOrder",a.A.Graph),(0,o.A)(t,"fetcher",void 0),(0,o.A)(t,"isVar",0),(0,o.A)(t,"ns",W),(0,o.A)(t,"rdfFactory",void 0),t.rdfFactory=c&&c.rdfFactory||G;var h,f=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return ut(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ut(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(it);try{var p=function(){var e=h.value;t[e]=function(){var r;return(r=t.rdfFactory)[e].apply(r,arguments)}};for(f.s();!(h=f.n()).done;)p()}catch(t){f.e(t)}finally{f.f()}return t}return(0,i.A)(n,r),(0,t.A)(n,[{key:"add",value:function(t,e,r,n){var i=this;return 1===arguments.length&&t.forEach((function(t){return i.add(t.subject,t.predicate,t.object,t.graph)})),this.statements.push(this.rdfFactory.quad(t,e,r,n))}},{key:"addStatement",value:function(t){return this.add(t)}},{key:"bnode",value:function(t){return this.rdfFactory.blankNode(t)}},{key:"addAll",value:function(t){var e=this;t.forEach((function(t){e.add(t.subject,t.predicate,t.object,t.graph)}))}},{key:"any",value:function(t,e,r,n){var i=this.anyStatementMatching(t,e,r,n);return null==i?null:null==t?i.subject:null==e?i.predicate:null==r?i.object:null}},{key:"anyValue",value:function(t,e,r,n){var i=this.any(t,e,r,n);return i?i.value:void 0}},{key:"anyJS",value:function(t,e,r,n){var i=this.any(t,e,r,n);return i?c.A.toJS(i):void 0}},{key:"anyStatementMatching",value:function(t,e,r,n){var i=this.statementsMatching(t,e,r,n,!0);if(i&&0!==i.length)return i[0]}},{key:"id",value:function(t){return this.rdfFactory.id(t)}},{key:"statementsMatching",value:function(t,e,r,n,i){var o=this.statements.filter((function(i){return(!t||t.equals(i.subject))&&(!e||e.equals(i.predicate))&&(!r||r.equals(i.object))&&(!n||n.equals(i.graph))}));return i?0===o.length?[]:[o[0]]:o}},{key:"bottomTypeURIs",value:function(t){var e,r,n,i,o,a;for(var s in e=[],t)if(t.hasOwnProperty(s)){for(a=t[s],r=!0,n=0,i=(o=this.each(void 0,this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#subClassOf"),this.rdfFactory.namedNode(s))).length;n "+t[e]);return r}function o(t){var e,r="Bindings: ",n=t.length;for(e=0;ei.length)&&(e.index=i)}}return null===e.index&&(e.index=t.statements),!0}function f(t,e){return t.nvars!==e.nvars?t.nvars-e.nvars:t.index.length-e.index.length}l.prototype.reportMatch=function(t){this.results.push(t)},l.prototype.reportDone=function(){V.A.debug("Optional branch finished - results.length = "+this.results.length),0===this.results.length&&(this.results.push({}),V.A.debug("Optional branch FAILED - that's OK.")),this.done=!0,this.junction.checkAllDone()};var p=function t(r,n,o,a,s,c,h){V.A.debug("Match begins, Branch count now: "+h.count+" for "+h.pattern_debug);var f,p,d=n.statements;if(0===d.length){if(V.A.debug("FOUND MATCH WITH BINDINGS:"+i(o)),0===n.optional.length)h.reportMatch(o);else{V.A.debug("OPTIONAL: "+n.optional);var v,g=new u(e,o),m=[];for(v=0;v in query: "+u),t(r,n,o,a,s,c,h)}))};for(p=0;pt.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:{};return(0,e.A)(this,n),r=wt(this,n,[void 0,void 0,void 0,void 0,i]),(0,o.A)(r,"updater",void 0),(0,o.A)(r,"namespaces",void 0),(0,o.A)(r,"classActions",void 0),(0,o.A)(r,"propertyActions",void 0),(0,o.A)(r,"redirections",void 0),(0,o.A)(r,"aliases",void 0),(0,o.A)(r,"HTTPRedirects",void 0),(0,o.A)(r,"subjectIndex",void 0),(0,o.A)(r,"predicateIndex",void 0),(0,o.A)(r,"objectIndex",void 0),(0,o.A)(r,"whyIndex",void 0),(0,o.A)(r,"index",void 0),(0,o.A)(r,"features",void 0),(0,o.A)(r,"_universalVariables",void 0),(0,o.A)(r,"_existentialVariables",void 0),(0,o.A)(r,"rdfArrayRemove",void 0),(0,o.A)(r,"dataCallbacks",void 0),r.propertyActions={},r.classActions={},r.redirections=[],r.aliases=[],r.HTTPRedirects=[],r.subjectIndex=[],r.predicateIndex=[],r.objectIndex=[],r.whyIndex=[],r.index=[r.subjectIndex,r.predicateIndex,r.objectIndex,r.whyIndex],r.namespaces={},r.features=t||[],r.rdfArrayRemove=i.rdfArrayRemove||Q.RDFArrayRemove,i.dataCallback&&(r.dataCallbacks=[i.dataCallback]),r.initPropertyActions(r.features),r}return(0,i.A)(n,r),(0,t.A)(n,[{key:"substitute",value:function(t){var e=this.statements.map((function(e){return e.substitute(t)})),r=new n;return r.add(e),r}},{key:"addDataCallback",value:function(t){this.dataCallbacks||(this.dataCallbacks=[]),this.dataCallbacks.push(t)}},{key:"applyPatch",value:function(t,e,r){var n,i=this,o=null;function a(a){if(t.delete){n=t.delete,o&&(n=n.substitute(o)),n=n.statements;var s=[],u=n.map((function(t){var r=i.statementsMatching(t.subject,t.predicate,t.object,e);return 0===r.length?(s.push(t),null):r[0]}));if(s.length)return r("Could not find to delete: "+s.join("\n or "));u.map((function(t){i.remove(t)}))}t.insert&&(n=t.insert,o&&(n=n.substitute(o)),(n=n.statements).map((function(t){t.graph=e,i.add(t.subject,t.predicate,t.object,t.graph)}))),a()}if(t.where){var s=new yt("patch");s.pat=t.where,s.pat.statements.map((function(t){t.graph=Cr(e.value)})),s.sync=!0;var u=[];i.query(s,(function(t){u.push(t)}),i.fetcher,(function(){return 0===u.length?r("No match found to be patched:"+t.where):u.length>1?r("Patch ambiguous. No patch done."):(o=u[0],void a(r))}))}else a(r)}},{key:"declareExistential",value:function(t){return this._existentialVariables||(this._existentialVariables=[]),this._existentialVariables.push(t),t}},{key:"initPropertyActions",value:function(t){this.propertyActions[this.rdfFactory.id(this.rdfFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"))]=[Tt],st(t,"sameAs")>=0&&(this.propertyActions[this.rdfFactory.id(this.rdfFactory.namedNode("".concat(xt,"sameAs")))]=[function(t,e,r,n,i){return t.equate(e,n),!0}]),st(t,"InverseFunctionalProperty")>=0&&(this.classActions[this.rdfFactory.id(this.rdfFactory.namedNode("".concat(xt,"InverseFunctionalProperty")))]=[function(t,e,r,n,i){return t.newPropertyAction(e,kt)}]),st(t,"FunctionalProperty")>=0&&(this.classActions[this.rdfFactory.id(this.rdfFactory.namedNode("".concat(xt,"FunctionalProperty")))]=[function(t,e,r,n,i){return t.newPropertyAction(e,_t)}])}},{key:"addStatement",value:function(t){return this.add(t.subject,t.predicate,t.object,t.graph),this.statements.length}},{key:"add",value:function(t,e,r,n){var i,o,a;if(1===arguments.length){if(t instanceof Array)for(i=0;i=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(this.dataCallbacks);try{for(d.s();!(p=d.n()).done;)(0,p.value)(a)}catch(t){d.e(t)}finally{d.f()}}return a}},{key:"canon",value:function(t){if(!t)return t;var e=this.redirections[this.id(t)];if(e)return e;switch(t.termType){case l.$Q:return new p(t.value);case l.r0:return t;case l.ic:return new F;case l.S:case l.bD:return t;case l.QW:return new w(t.value,t.language,t.datatype);case l.Kk:return new y.A(t.value);case l.P2:return new H(t.value);default:throw new Error("Term Type not recognized for canonization: ".concat(t.termType))}}},{key:"check",value:function(){this.checkStatementList(this.statements);for(var t=0;t<4;t++){var e=this.index[t];for(var r in e)e.hasOwnProperty(r)&&this.checkStatementList(e[r],t)}}},{key:"checkStatementList",value:function(t,e){void 0===e&&(e=0);for(var r,n=" found in "+["subject","predicate","object","why"][e]+" index.",i=0;ia.A[e.termType]?1:t.valuee.value?1:0}},{key:"copyTo",value:function(t,e,r){r||(r=[]);var n=this.statementsMatching(t);-1!==st(r,"two-direction")&&n.concat(this.statementsMatching(void 0,void 0,t));for(var i=0;i";return!!this.subjectIndex[e]||!!this.objectIndex[e]||!!this.predicateIndex[e]}},{key:"newExistential",value:function(t){if(!t)return this.bnode();var e=this.sym(t);return this.declareExistential(e)}},{key:"newPropertyAction",value:function(t,e){var r=this.id(t);this.propertyActions[r]||(this.propertyActions[r]=[]),this.propertyActions[r].push(e);for(var n=this.statementsMatching(void 0,t,void 0),i=!1,o=0;o1&&(a=a.slice(0,1)),a||[];var f,p,d=1e10;for(p=0;p=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function jt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0)throw"missing.js: oops nnonempty dict not imp";return[]},Ft=function(t){return t.length},Ut=function(t,e,r){if(void 0===t.slice)throw"@@ mising.js: No .slice function for "+t+" of type "+(0,d.A)(t);return void 0===r||null==r?t.slice(e):t.slice(e,r)},Dt=Error("dummy error stop iteration"),Lt=function(t){return this.last=0,this.li=t,this.next=function(){if(this.last==this.li.length)throw Dt;return this.li[this.last++]},this},Mt=function(t,e){return t.indexOf(e)},Bt=function(t,e){if(!t){if(e)throw"python Assertion failed: "+e;throw"(python) Assertion failed."}};String.prototype.encode=function(t){if("utf-8"!=t)throw"UTF8_converter: can only do utf-8";return function(t){t=t.replace(/\r\n/g,"\n");for(var e="",r=0;r127&&n<2048?(e+=String.fromCharCode(n>>6|192),e+=String.fromCharCode(63&n|128)):(e+=String.fromCharCode(n>>12|224),e+=String.fromCharCode(n>>6&63|128),e+=String.fromCharCode(63&n|128))}return e}(this)},String.prototype.decode=function(t){if("utf-8"!=t)throw"UTF8_converter: can only do utf-8";return this};var qt=function(t,e){return M.join(e,t)},Ht="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil",$t="http://www.w3.org/2002/07/owl#sameAs",zt="\t\r\n !\"#$%&'()*.,+/;<=>?@[\\]^`{|}~",Xt=zt+":",Gt=new RegExp("^([-+]?[0-9]+)(\\.[0-9]+)?(e[-+]?[0-9]+)?","g"),Vt=new RegExp("^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9](T[0-9][0-9]:[0-9][0-9](:[0-9][0-9](\\.[0-9]*)?)?)?Z?"),Wt=new RegExp('[\\\\\\r\\n\\"]',"g"),Qt=new RegExp("^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*","g");const Yt=function(t,e,r,n,i,o,a,s){return new Jt(t,e,r,n,i,o,a,s)};var Jt=function(){return(0,t.A)((function t(r,n,i,o,a,s,u,c){(0,e.A)(this,t),void 0===n&&(n=null),void 0===i&&(i=""),void 0===o&&(o=null),void 0===a&&(a=""),void 0===s&&(s=null),void 0===u&&(u=""),void 0===c&&(c=null),this._bindings=new Pt([]),this._flags=u,""!=i&&(Bt(i.indexOf(":")>=0,"Document URI not absolute: "+i),this._bindings[""]=i+"#"),this._store=r,a&&r.setGenPrefix(a),this._thisDoc=i,this.source=r.sym(i),this.lines=0,this.statementCount=0,this.hasNil=!1,this.startOfLine=0,this.previousLine=0,this._genPrefix=a,this.keywords=new Ct(["a","this","bind","has","is","of","true","false"]),this.keywordsSet=0,this._anonymousNodes=new Pt([]),this._variables=new Pt([]),this._parentVariables=new Pt([]),this._reason=c,this._reason2=null,this._baseURI=o||i||null,Bt(!this._baseURI||this._baseURI.indexOf(":")>=0),this._genPrefix||(this._thisDoc?this._genPrefix=this._thisDoc+"#_g":this._genPrefix=RDFSink_uniqueURI()),null==n?this._thisDoc?this._formula=r.formula(i+"#_formula"):this._formula=r.formula():this._formula=n,this._context=this._formula,this._parentContext=null}),[{key:"here",value:function(t){return this._genPrefix+"_L"+this.lines+"C"+(t-this.startOfLine+1)}},{key:"formula",value:function(){return this._formula}},{key:"loadStream",value:function(t){return this.loadBuf(t.read())}},{key:"loadBuf",value:function(t){return this.startDoc(),this.feed(t),this.endDoc()}},{key:"feed",value:function(t){for(var e=t.decode("utf-8"),r=0;r>=0;){var n=this.skipSpace(e,r);if(n<0)return;if((r=this.directiveOrStatement(e,n))<0)throw Zt(this._thisDoc,this.lines,e,n,"expected directive or statement")}}},{key:"directiveOrStatement",value:function(t,e){var r,n=this.skipSpace(t,e);return n<0?n:(r=this.directive(t,n))>=0||(r=this.statement(t,n))>=0?this.checkDot(t,r):r}},{key:"tok",value:function(t,e,r){if("@"==e.slice(r,r+1))r+=1;else if(st(this.keywords,t)<0)return-1;var n=r+Ft(t);return e.slice(r,n)==t&&zt.indexOf(e.charAt(n))>=0?n:-1}},{key:"directive",value:function(t,e){if((o=this.skipSpace(t,e))<0)return o;var r=new Ct([]);if((o=this.tok("bind",t,e))>0)throw Zt(this._thisDoc,this.lines,t,e,"keyword bind is obsolete: use @prefix");if((o=this.tok("keywords",t,e))>0){if((e=this.commaSeparatedList(t,o,r,!1))<0)throw Zt(this._thisDoc,this.lines,t,e,"'@keywords' needs comma separated list of words");return this.setKeywords(Ut(r,null,null)),e}if((o=this.tok("forAll",t,e))>0){if((e=this.commaSeparatedList(t,o,r,!0))<0)throw Zt(this._thisDoc,this.lines,t,e,"Bad variable list after @forAll");var n=new Lt(r);try{for(;;){var i=n.next();(st(this._variables,i)<0||st(this._parentVariables,i)>=0)&&(this._variables[i]=this._context.newUniversal(i))}}catch(t){if(t!=Dt)throw t}return e}if((o=this.tok("forSome",t,e))>0){if((e=this.commaSeparatedList(t,o,r,this.uri_ref2))<0)throw Zt(this._thisDoc,this.lines,t,e,"Bad variable list after @forSome");n=new Lt(r);try{for(;;)i=n.next(),this._context.declareExistential(i)}catch(t){if(t!=Dt)throw t}return e}if((o=this.tok("prefix",t,e))>=0){var o,a=new Ct([]);if((e=this.qname(t,o,a))<0)throw Zt(this._thisDoc,this.lines,t,o,"expected qname after @prefix");if((o=this.uri_ref2(t,e,a))<0)throw Zt(this._thisDoc,this.lines,t,e,"expected after @prefix _qname_");var s=a[1].uri;return this._baseURI?s=qt(this._baseURI,s):Bt(s.indexOf(":")>=0,"With no base URI, cannot handle relative URI for NS"),Bt(s.indexOf(":")>=0),this._bindings[a[0][0]]=s,this.bind(a[0][0],function(t){return encodeURI(t)}(s)),o}if((o=this.tok("base",t,e))>=0){if(a=new Ct([]),(e=this.uri_ref2(t,o,a))<0)throw Zt(this._thisDoc,this.lines,t,o,"expected after @base ");if(s=a[0].uri,!this._baseURI)throw Zt(this._thisDoc,this.lines,t,o,"With no previous base URI, cannot use relative URI in @base <"+s+">");return s=qt(this._baseURI,s),Bt(s.indexOf(":")>=0),this._baseURI=s,e}return-1}},{key:"bind",value:function(t,e){""==t||this._store.setPrefixForURI(t,e)}},{key:"setKeywords",value:function(t){null==t?this.keywordsSet=0:(this.keywords=t,this.keywordsSet=1)}},{key:"startDoc",value:function(){}},{key:"endDoc",value:function(){return this.hasNil&&this._store.rdfFactory.supports.COLLECTIONS&&St(this._store,this.source),this._formula}},{key:"makeStatement",value:function(t){t[0].add(t[2],t[1],t[3],this.source),(t[2].uri&&t[2].uri===Ht||t[3].uri&&t[3].uri===Ht)&&(this.hasNil=!0),this.statementCount+=1}},{key:"statement",value:function(t,e){var r=new Ct([]);if((e=this.object(t,e,r))<0)return e;var n=this.property_list(t,e,r[0]);if(n<0)throw Zt(this._thisDoc,this.lines,t,e,"expected propertylist");return n}},{key:"subject",value:function(t,e,r){return this.item(t,e,r)}},{key:"verb",value:function(t,e,r){if((i=this.skipSpace(t,e))<0)return i;var n=new Ct([]);if((i=this.tok("has",t,e))>=0){if((e=this.prop(t,i,n))<0)throw Zt(this._thisDoc,this.lines,t,i,"expected property after 'has'");return r.push(new It(["->",n[0]])),e}if((i=this.tok("is",t,e))>=0){if((e=this.prop(t,i,n))<0)throw Zt(this._thisDoc,this.lines,t,i,"expected after 'is'");if((i=this.skipSpace(t,e))<0)throw Zt(this._thisDoc,this.lines,t,e,"End of file found, expected property after 'is'");var i;if(e=i,(i=this.tok("of",t,e))<0)throw Zt(this._thisDoc,this.lines,t,e,"expected 'of' after 'is' ");return r.push(new It(["<-",n[0]])),i}if((i=this.tok("a",t,e))>=0)return r.push(new It(["->",this._store.sym("http://www.w3.org/1999/02/22-rdf-syntax-ns#type")])),i;if("<="==t.slice(e,e+2))return r.push(new It(["<-",this._store.sym(Rt+"implies")])),e+2;if("="==t.slice(e,e+1))return">"==t.slice(e+1,e+2)?(r.push(new It(["->",this._store.sym(Rt+"implies")])),e+2):(r.push(new It(["->",this._store.sym($t)])),e+1);if(":="==t.slice(e,e+2))return r.push(new It(["->",Rt+"becomes"])),e+2;if((i=this.prop(t,e,n))>=0)return r.push(new It(["->",n[0]])),i;if(">-"==t.slice(e,e+2)||"<-"==t.slice(e,e+2))throw Zt(this._thisDoc,this.lines,t,i,">- ... -> syntax is obsolete.");return-1}},{key:"prop",value:function(t,e,r){return this.item(t,e,r)}},{key:"item",value:function(t,e,r){return this.path(t,e,r)}},{key:"blankNode",value:function(t){return this._context.bnode(t,this._reason2)}},{key:"path",value:function(t,e,r){if((o=this.nodeOrLiteral(t,e,r))<0)return o;for(;"!^.".indexOf(t.slice(o,o+1))>=0;){var n=t.slice(o,o+1);if("."==n){var i=t.slice(o+1,o+2);if(!i||Xt.indexOf(i)>=0&&":?<[{(".indexOf(i)<0)break}var o,a=r.pop(),s=this.blankNode(this.here(o));if((o=this.node(t,o+1,r))<0)throw Zt(this._thisDoc,this.lines,t,o,"EOF found in middle of path syntax");var u=r.pop();"^"==n?this.makeStatement(new It([this._context,u,s,a])):this.makeStatement(new It([this._context,u,a,s])),r.push(s)}return o}},{key:"anonymousNode",value:function(t){if(e=this._anonymousNodes[t])return e;var e=this._store.bnode(t);return this._anonymousNodes[t]=e,e}},{key:"node",value:function(t,e,r,n){void 0===n&&(n=null);var i=n;if((l=this.skipSpace(t,e))<0)return l;e=l;var o=t.slice(e,e+1);if("["==o){var a=this.here(e);if((l=this.skipSpace(t,e+1))<0)throw Zt(this._thisDoc,this.lines,t,e,"EOF after '['");if("="==t.slice(l,l+1)){e=l+1;var s=new Ct([]);if(!((l=this.objectList(t,e,s))>=0))throw Zt(this._thisDoc,this.lines,t,e,"objectList expected after [= ");if(i=s[0],Ft(s)>1){var u=new Lt(s);try{for(;;){var c=u.next();this.makeStatement(new It([this._context,this._store.sym($t),i,c]))}}catch(t){if(t!=Dt)throw t}}if((l=this.skipSpace(t,l))<0)throw Zt(this._thisDoc,this.lines,t,e,"EOF when objectList expected after [ = ");if(";"==t.slice(l,l+1))var l=l+1}if(null==i&&(i=this.blankNode(a)),(e=this.property_list(t,l,i))<0)throw Zt(this._thisDoc,this.lines,t,l,"property_list expected");if((l=this.skipSpace(t,e))<0)throw Zt(this._thisDoc,this.lines,t,e,"EOF when ']' expected after [ ");if("]"!=t.slice(l,l+1))throw Zt(this._thisDoc,this.lines,t,l,"']' expected");return r.push(i),l+1}if("{"==o){if("$"==t.slice(e+1,e+2)){l=(e+=1)+1;for(var h=new Ct([]),f=!0;;){if((e=this.skipSpace(t,l))<0)throw Zt(this._thisDoc,this.lines,t,e,"needed '$}', found end.");if("$}"==t.slice(e,e+2)){l=e+2;break}if(f)f=!1;else{if(","!=t.slice(e,e+1))throw Zt(this._thisDoc,this.lines,t,e,"expected: ','");e+=1}var p=new Ct([]);if((l=this.item(t,e,p))<0)throw Zt(this._thisDoc,this.lines,t,e,"expected item in set or '$}'");h.push(p[0])}return r.push(this._store.newSet(h,this._context)),l}l=e+1;var d=this._parentContext;this._parentContext=this._context;var y=this._anonymousNodes,v=this._parentVariables;this._parentVariables=this._variables,this._anonymousNodes=new Pt([]),this._variables=this._variables.slice();var g=this._reason2;for(this._reason2=null,null==i&&(i=this._store.formula()),this._context=i;;){if((e=this.skipSpace(t,l))<0)throw Zt(this._thisDoc,this.lines,t,e,"needed '}', found end.");if("}"==t.slice(e,e+1)){l=e+1;break}if((l=this.directiveOrStatement(t,e))<0)throw Zt(this._thisDoc,this.lines,t,e,"expected statement or '}'")}return this._anonymousNodes=y,this._variables=this._parentVariables,this._parentVariables=v,this._context=this._parentContext,this._reason2=g,this._parentContext=d,r.push(i.close()),l}if("("==o){var m=this._store.list;for("$"==t.slice(e+1,e+2)&&(m=this._store.newSet,e+=1),l=e+1,h=new Ct([]);;){if((e=this.skipSpace(t,l))<0)throw Zt(this._thisDoc,this.lines,t,e,"needed ')', found end.");if(")"==t.slice(e,e+1)){l=e+1;break}if(p=new Ct([]),(l=this.item(t,e,p))<0)throw Zt(this._thisDoc,this.lines,t,e,"expected item in list or ')'");h.push(p[0])}return r.push(m(h,this._context)),l}if((l=this.tok("this",t,e))>=0)throw Zt(this._thisDoc,this.lines,t,e,"Keyword 'this' was ancient N3. Now use @forSome and @forAll keywords.");return(l=this.tok("true",t,e))>=0?(r.push(!0),l):(l=this.tok("false",t,e))>=0?(r.push(!1),l):null==i&&(l=this.uri_ref2(t,e,r))>=0?l:-1}},{key:"property_list",value:function(t,e,r){for(;;){if((l=this.skipSpace(t,e))<0)throw Zt(this._thisDoc,this.lines,t,e,"EOF found when expected verb in property list");if(":-"!=t.slice(l,l+2)){e=l;var n=new Ct([]);if((l=this.verb(t,e,n))<=0)return e;var i=new Ct([]);if((e=this.objectList(t,l,i))<0)throw Zt(this._thisDoc,this.lines,t,l,"objectList expected");var o=new Lt(i);try{for(;;){var a=o.next(),s=n[0],u=s[0],c=s[1];"->"==u?this.makeStatement(new It([this._context,c,r,a])):this.makeStatement(new It([this._context,c,a,r]))}}catch(t){if(t!=Dt)throw t}if((l=this.skipSpace(t,e))<0)throw Zt(this._thisDoc,this.lines,t,l,"EOF found in list of objects");if(";"!=t.slice(e,e+1))return e;e+=1}else{e=l+2;var l,h=new Ct([]);if((l=this.node(t,e,h,r))<0)throw Zt(this._thisDoc,this.lines,t,e,"bad {} or () or [] node after :- ");e=l}}}},{key:"commaSeparatedList",value:function(t,e,r,n){if((i=this.skipSpace(t,e))<0)throw Zt(this._thisDoc,this.lines,t,i,"EOF found expecting comma sep list");if("."==t.charAt(i))return e;if(n)var i=this.uri_ref2(t,i,r);else i=this.bareWord(t,i,r);if(i<0)return-1;for(;;){if((e=this.skipSpace(t,i))<0)return e;var o=t.slice(e,e+1);if(","!=o)return"."!=o?-1:e;if((i=n?this.uri_ref2(t,e+1,r):this.bareWord(t,e+1,r))<0)throw Zt(this._thisDoc,this.lines,t,i,"bad list content")}}},{key:"objectList",value:function(t,e,r){if((e=this.object(t,e,r))<0)return-1;for(;;){var n=this.skipSpace(t,e);if(n<0)throw Zt(this._thisDoc,this.lines,t,n,"EOF found after object");if(","!=t.slice(n,n+1))return n;if((e=this.object(t,n+1,r))<0)return e}}},{key:"checkDot",value:function(t,e){var r=this.skipSpace(t,e);if(r<0)return r;if("."==t.slice(r,r+1))return r+1;if("}"==t.slice(r,r+1))return r;if("]"==t.slice(r,r+1))return r;throw Zt(this._thisDoc,this.lines,t,r,"expected '.' or '}' or ']' at end of statement")}},{key:"uri_ref2",value:function(t,e,r){var n=new Ct([]);if((f=this.qname(t,e,n))>=0){var i=n[0],o=i[0],a=i[1];if(null==o){Bt(0,"not used?");var s=this._baseURI+"#"}else if(!(s=this._bindings[o])){if("_"==o)return r.push(this.anonymousNode(a)),f;throw Zt(this._thisDoc,this.lines,t,e,"Prefix "+o+" not bound.")}var u=this._store.sym(s+a);return st(this._variables,u)>=0?r.push(this._variables[u]):r.push(u),f}if((e=this.skipSpace(t,e))<0)return-1;if("?"==t.charAt(e)){var c=new Ct([]);return(f=this.variable(t,e,c))>0?(r.push(c[0]),f):-1}if("<"==t.charAt(e)){for(var l=e+=1;e"==t.charAt(e)){var h=t.slice(l,e);return this._baseURI?h=qt(this._baseURI,h):Bt(h.indexOf(":")>=0,"With no base URI, cannot deal with relative URIs"),"#"==t.slice(e-1,e)&&"#"!=Ut(h,-1,null)&&(h+="#"),u=this._store.sym(h),st(this._variables,u)>=0?r.push(this._variables[u]):r.push(u),e+1}e+=1}throw Zt(this._thisDoc,this.lines,t,f,"unterminated URI reference")}if(this.keywordsSet){var f;if(c=new Ct([]),(f=this.bareWord(t,e,c))<0)return-1;if(st(this.keywords,c[0])>=0)throw Zt(this._thisDoc,this.lines,t,e,'Keyword "'+c[0]+'" not allowed here.');return r.push(this._store.sym(this._bindings[""]+c[0])),f}return-1}},{key:"skipSpace",value:function(t,e){for(var r=e||0;r=0)throw Zt(this._thisDoc,this.lines,t,n,"Varible name can't start with '"+t.charAt(n)+"s'");for(;e=0)return-1;if(Xt.indexOf(i)>=0)return-1;for(e=n;e=0)return-1;if(Xt.indexOf(n)<0){var i=n;for(e+=1;e=0)return a;if((a=this.skipSpace(t,e))<0)return-1;e=a;var n=null,i=t.charAt(e);if('"'==i||"'"==i){n=t.slice(e,e+3==i+i)?i+i+i:i,e+=Ft(n);var o=this.strconst(t,e,n),a=o[0],s=o[1];return r.push(this._store.literal(s)),a}return-1}},{key:"nodeOrLiteral",value:function(t,e,r){if((u=this.node(t,e,r))>=0)return u;if((u=this.skipSpace(t,e))<0)return-1;e=u;var n=t.charAt(e);if("-+0987654321".indexOf(n)>=0){if(Vt.lastIndex=0,null!=(h=Vt.exec(t.slice(e))))u=e+(i=h[0]).length,i.indexOf("T")>=0?r.push(this._store.literal(i,this._store.sym("http://www.w3.org/2001/XMLSchema#dateTime"))):r.push(this._store.literal(i,this._store.sym("http://www.w3.org/2001/XMLSchema#date")));else{var i;if(Gt.lastIndex=0,null==(h=Gt.exec(t.slice(e))))throw Zt(this._thisDoc,this.lines,t,e,"Bad number or date syntax");u=e+Gt.lastIndex,(i=t.slice(e,u)).indexOf("e")>=0?r.push(this._store.literal(parseFloat(i),this._store.sym("http://www.w3.org/2001/XMLSchema#double"))):t.slice(e,u).indexOf(".")>=0?r.push(this._store.literal(parseFloat(i),this._store.sym("http://www.w3.org/2001/XMLSchema#decimal"))):r.push(this._store.literal(parseInt(i),this._store.sym("http://www.w3.org/2001/XMLSchema#integer")))}return u}if('"'==t.charAt(e)){if('"""'==t.slice(e,e+3))var o='"""';else o='"';e+=Ft(o);var a=null,s=this.strconst(t,e,o),u=s[0],c=s[1],l=null;if("@"==t.slice(u,u+1)){var h;if(Qt.lastIndex=0,null==(h=Qt.exec(t.slice(u+1))))throw Zt(this._thisDoc,startline,t,e,"Bad language code syntax on string literal, after @");e=Qt.lastIndex+u+1,l=t.slice(u+1,e),u=e}if("^^"==t.slice(u,u+2)){var f=new Ct([]);u=this.uri_ref2(t,u+2,f),a=f[0]}return r.push(this._store.literal(c,l||a)),u}return-1}},{key:"strconst",value:function(t,e,r){for(var n=e,i="",o=this.lines;n=0)i+='a\b\f\r\t\v\n\\"'.charAt(a),n+=1;else if("u"==u)n=(s=this.uEscape(t,n+1,o))[0],i+=u=s[1];else{if("U"!=u)throw Zt(this._thisDoc,this.lines,t,e,"bad escape");var s,u;n=(s=this.UEscape(t,n+1,o))[0],i+=u=s[1]}}}else n=e+1;else n=e}else i=i+'"',n=n+1}throw Zt(this._thisDoc,this.lines,t,e,"unterminated string literal")}},{key:"uEscape",value:function(t,e,r){for(var n=e,i=0,o=0;i<4;){var a=t.slice(n,n+1).toLowerCase();if(n+=1,""==a)throw Zt(this._thisDoc,r,t,e,"unterminated string literal(3)");var s=Mt("0123456789abcdef",a);if(s<0)throw Zt(this._thisDoc,r,t,e,"bad string literal hex escape");o=16*o+s,i+=1}var u=String.fromCharCode(o);return new It([n,u])}},{key:"UEscape",value:function(t,e,r){for(var n=e,i=0,o="\\U";i<8;){var a=t.slice(n,n+1).toLowerCase();if(n+=1,""==a)throw Zt(this._thisDoc,r,t,e,"unterminated string literal(3)");if(Mt("0123456789abcdef",a)<0)throw Zt(this._thisDoc,r,t,e,"bad string literal hex escape");o+=a,i+=1}var s,u=(s="0x"+Ut(o,2,10)-0,String.fromCharCode(s));return new It([n,u])}}])}();function Zt(t,e,r,n,i){var o=e+1,a="Line "+o+" of <"+t+">: Bad syntax: "+i+'\nat: "'+r.slice(n,n+30)+'"',s=new SyntaxError(a,t,o);return s.lineNo=o,s.characterInFile=n,s.syntaxProblem=i,s}function Kt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function te(t){for(var e=1;e\\"\{\}\|\^\`]/,be={_iri:!0,_unescapedIri:!0,_simpleQuotedString:!0,_langcode:!0,_blank:!0,_newline:!0,_comment:!0,_whitespace:!0,_endOfFile:!0},we=/$0^/;class Ae{constructor(t){if(this._iri=/^<((?:[^ <>{}\\]|\\[uU])+)>[ \t]*/,this._unescapedIri=/^<([^\x00-\x20<>\\"\{\}\|\^\`]*)>[ \t]*/,this._simpleQuotedString=/^"([^"\\\r\n]*)"(?=[^"])/,this._simpleApostropheString=/^'([^'\\\r\n]*)'(?=[^'])/,this._langcode=/^@([a-z]+(?:-[a-z0-9]+)*)(?=[^a-z0-9\-])/i,this._prefix=/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:(?=[#\s<])/,this._prefixed=/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:((?:(?:[0-:A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])(?:(?:[\.\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])*(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~]))?)?)(?:[ \t]+|(?=\.?[,;!\^\s#()\[\]\{\}"'<>]))/,this._variable=/^\?(?:(?:[A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?=[.,;!\^\s#()\[\]\{\}"'<>])/,this._blank=/^_:((?:[0-9A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?:[ \t]+|(?=\.?[,;:\s#()\[\]\{\}"'<>]))/,this._number=/^[\-+]?(?:(\d+\.\d*|\.?\d+)[eE][\-+]?|\d*(\.)?)\d+(?=\.?[,;:\s#()\[\]\{\}"'<>])/,this._boolean=/^(?:true|false)(?=[.,;\s#()\[\]\{\}"'<>])/,this._keyword=/^@[a-z]+(?=[\s#<:])/i,this._sparqlKeyword=/^(?:PREFIX|BASE|GRAPH)(?=[\s#<])/i,this._shortPredicates=/^a(?=[\s#()\[\]\{\}"'<>])/,this._newline=/^[ \t]*(?:#[^\n\r]*)?(?:\r\n|\n|\r)[ \t]*/,this._comment=/#([^\n\r]*)/,this._whitespace=/^[ \t]+/,this._endOfFile=/^(?:#[^\n\r]*)?$/,t=t||{},this._lineMode=!!t.lineMode){this._n3Mode=!1;for(const t in this)!(t in be)&&this[t]instanceof RegExp&&(this[t]=we)}else this._n3Mode=!1!==t.n3;this._comments=!!t.comments,this._literalClosingPos=0}_tokenizeToEnd(t,e){let r=this._input,n=r.length;for(;;){let t,a;for(;t=this._newline.exec(r);)this._comments&&(a=this._comment.exec(t[0]))&&i("comment",a[1],"",this._line,t[0].length),r=r.substr(t[0].length,r.length),n=r.length,this._line++;if(!t&&(t=this._whitespace.exec(r))&&(r=r.substr(t[0].length,r.length)),this._endOfFile.test(r))return e&&(this._comments&&(a=this._comment.exec(r))&&i("comment",a[1],"",this._line,r.length),r=null,i("eof","","",this._line,0)),this._input=r;const s=this._line,u=r[0];let c="",l="",h="",f=null,p=0,d=!1;switch(u){case"^":if(r.length<3)break;if("^"!==r[1]){this._n3Mode&&(p=1,c="^");break}if(this._previousMarker="^^",r=r.substr(2),"<"!==r[0]){d=!0;break}case"<":if(f=this._unescapedIri.exec(r))c="IRI",l=f[1];else if(f=this._iri.exec(r)){if(l=this._unescape(f[1]),null===l||me.test(l))return o(this);c="IRI"}else r.length>1&&"<"===r[1]?(c="<<",p=2):this._n3Mode&&r.length>1&&"="===r[1]&&(c="inverse",p=2,l=">");break;case">":r.length>1&&">"===r[1]&&(c=">>",p=2);break;case"_":((f=this._blank.exec(r))||e&&(f=this._blank.exec(`${r} `)))&&(c="blank",h="_",l=f[1]);break;case'"':if(f=this._simpleQuotedString.exec(r))l=f[1];else if(({value:l,matchLength:p}=this._parseLiteral(r)),null===l)return o(this);null===f&&0===p||(c="literal",this._literalClosingPos=0);break;case"'":if(!this._lineMode){if(f=this._simpleApostropheString.exec(r))l=f[1];else if(({value:l,matchLength:p}=this._parseLiteral(r)),null===l)return o(this);null===f&&0===p||(c="literal",this._literalClosingPos=0)}break;case"?":this._n3Mode&&(f=this._variable.exec(r))&&(c="var",l=f[0]);break;case"@":"literal"===this._previousMarker&&(f=this._langcode.exec(r))?(c="langcode",l=f[1]):(f=this._keyword.exec(r))&&(c=f[0]);break;case".":if(1===r.length?e:r[1]<"0"||r[1]>"9"){c=".",p=1;break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":case"-":(f=this._number.exec(r)||e&&(f=this._number.exec(`${r} `)))&&(c="literal",l=f[0],h="string"==typeof f[1]?ye.double:"string"==typeof f[2]?ye.decimal:ye.integer);break;case"B":case"b":case"p":case"P":case"G":case"g":(f=this._sparqlKeyword.exec(r))?c=f[0].toUpperCase():d=!0;break;case"f":case"t":(f=this._boolean.exec(r))?(c="literal",l=f[0],h=ye.boolean):d=!0;break;case"a":(f=this._shortPredicates.exec(r))?(c="abbreviation",l="a"):d=!0;break;case"=":this._n3Mode&&r.length>1&&(c="abbreviation",">"!==r[1]?(p=1,l="="):(p=2,l=">"));break;case"!":if(!this._n3Mode)break;case",":case";":case"[":case"]":case"(":case")":case"}":this._lineMode||(p=1,c=u);break;case"{":!this._lineMode&&r.length>=2&&("|"===r[1]?(c="{|",p=2):(c=u,p=1));break;case"|":r.length>=2&&"}"===r[1]&&(c="|}",p=2);break;default:d=!0}if(d&&("@prefix"!==this._previousMarker&&"PREFIX"!==this._previousMarker||!(f=this._prefix.exec(r))?((f=this._prefixed.exec(r))||e&&(f=this._prefixed.exec(`${r} `)))&&(c="prefixed",h=f[1]||"",l=this._unescape(f[2])):(c="prefix",l=f[1]||"")),"^^"===this._previousMarker)switch(c){case"prefixed":c="type";break;case"IRI":c="typeIRI";break;default:c=""}if(!c)return e||!/^'''|^"""/.test(r)&&/\n|\r/.test(r)?o(this):this._input=r;const y=p||f[0].length,v=i(c,l,h,s,y);this.previousToken=v,this._previousMarker=c,r=r.substr(y,r.length)}function i(e,i,o,a,s){const u=r?n-r.length:n,c={type:e,value:i,prefix:o,line:a,start:u,end:u+s};return t(null,c),c}function o(e){t(e._syntaxError(/^\S*/.exec(r)[0]))}}_unescape(t){let e=!1;const r=t.replace(ve,((t,r,n,i)=>{if("string"==typeof r)return String.fromCharCode(Number.parseInt(r,16));if("string"==typeof n){let t=Number.parseInt(n,16);return t<=65535?String.fromCharCode(Number.parseInt(n,16)):String.fromCharCode(55296+((t-=65536)>>10),56320+(1023&t))}return i in ge?ge[i]:(e=!0,"")}));return e?null:r}_parseLiteral(t){if(t.length>=3){const e=t.match(/^(?:"""|"|'''|'|)/)[0],r=e.length;let n=Math.max(this._literalClosingPos,r);for(;(n=t.indexOf(e,n))>0;){let e=0;for(;"\\"===t[n-e-1];)e++;if(e%2==0){const e=t.substring(r,n),i=e.split(/\r\n|\r|\n/).length-1,o=n+r;if(1===r&&0!==i||3===r&&this._lineMode)break;return this._line+=i,{value:this._unescape(e),matchLength:o}}n++}this._literalClosingPos=t.length-r+1}return{value:"",matchLength:0}}_syntaxError(t){this._input=null;const e=new Error(`Unexpected "${t}" on line ${this._line}.`);return e.context={token:void 0,line:this._line,previousToken:this.previousToken},e}_readStartingBom(t){return t.startsWith("\ufeff")?t.substr(1):t}tokenize(t,e){if(this._line=1,"string"==typeof t){if(this._input=this._readStartingBom(t),"function"!=typeof e){const t=[];let e;if(this._tokenizeToEnd(((r,n)=>r?e=r:t.push(n)),!0),e)throw e;return t}ce()((()=>this._tokenizeToEnd(e,!0)))}else this._pendingBuffer=null,"function"==typeof t.setEncoding&&t.setEncoding("utf8"),t.on("data",(t=>{null!==this._input&&0!==t.length&&(this._pendingBuffer&&(t=de.concat([this._pendingBuffer,t]),this._pendingBuffer=null),128&t[t.length-1]?this._pendingBuffer=t:(void 0===this._input?this._input=this._readStartingBom("string"==typeof t?t:t.toString()):this._input+=t,this._tokenizeToEnd(e,!1)))})),t.on("end",(()=>{"string"==typeof this._input&&this._tokenizeToEnd(e,!0)})),t.on("error",e)}}const{rdf:xe,xsd:_e}=pe;let ke,Te=0;const Ee={namedNode:function(t){return new je(t)},blankNode:function(t){return new Se(t||"n3-"+Te++)},variable:function(t){return new Re(t)},literal:function(t,e){if("string"==typeof e)return new Ne(`"${t}"@${e.toLowerCase()}`);let r=e?e.value:"";return""===r&&("boolean"==typeof t?r=_e.boolean:"number"==typeof t&&(Number.isFinite(t)?r=Number.isInteger(t)?_e.integer:_e.double:(r=_e.double,Number.isNaN(t)||(t=t>0?"INF":"-INF")))),""===r||r===_e.string?new Ne(`"${t}"`):new Ne(`"${t}"^^${r}`)},defaultGraph:function(){return ke},quad:Ce,triple:Ce};class Oe{constructor(t){this.id=t}get value(){return this.id}equals(t){return t instanceof Oe?this.id===t.id:!!t&&this.termType===t.termType&&this.value===t.value}hashCode(){return 0}toJSON(){return{termType:this.termType,value:this.value}}}class je extends Oe{get termType(){return"NamedNode"}}class Ne extends Oe{get termType(){return"Literal"}get value(){return this.id.substring(1,this.id.lastIndexOf('"'))}get language(){const t=this.id;let e=t.lastIndexOf('"')+1;return enull),this._blankNodePrefix="string"!=typeof t.blankNodePrefix?"":t.blankNodePrefix.replace(/^(?!_:)/,"_:"),this._lexer=t.lexer||new Ae({lineMode:s,n3:a}),this._explicitQuantifiers=!!t.explicitQuantifiers}static _resetBlankNodePrefix(){Pe=0}_setBase(t){if(t){const e=t.indexOf("#");e>=0&&(t=t.substr(0,e)),this._base=t,this._basePath=t.indexOf("/")<0?t:t.replace(/[^\/?]*(?:\?.*)?$/,""),t=t.match(/^(?:([a-z][a-z0-9+.-]*:))?(?:\/\/[^\/]*)?/i),this._baseRoot=t[0],this._baseScheme=t[1]}else this._base="",this._basePath=""}_saveContext(t,e,r,n,i){const o=this._n3Mode;this._contextStack.push({type:t,subject:r,predicate:n,object:i,graph:e,inverse:!!o&&this._inversePredicate,blankPrefix:o?this._prefixes._:"",quantified:o?this._quantified:null}),o&&(this._inversePredicate=!1,this._prefixes._=this._graph?`${this._graph.value}.`:".",this._quantified=Object.create(this._quantified))}_restoreContext(t,e){const r=this._contextStack.pop();if(!r||r.type!==t)return this._error(`Unexpected ${e.type}`,e);this._subject=r.subject,this._predicate=r.predicate,this._object=r.object,this._graph=r.graph,this._n3Mode&&(this._inversePredicate=r.inverse,this._prefixes._=r.blankPrefix,this._quantified=r.quantified)}_readInTopContext(t){switch(t.type){case"eof":return null!==this._graph?this._error("Unclosed graph",t):(delete this._prefixes._,this._callback(null,null,this._prefixes));case"PREFIX":this._sparqlStyle=!0;case"@prefix":return this._readPrefix;case"BASE":this._sparqlStyle=!0;case"@base":return this._readBaseIRI;case"{":if(this._supportsNamedGraphs)return this._graph="",this._subject=null,this._readSubject;case"GRAPH":if(this._supportsNamedGraphs)return this._readNamedGraphLabel;default:return this._readSubject(t)}}_readEntity(t,e){let r;switch(t.type){case"IRI":case"typeIRI":const e=this._resolveIRI(t.value);if(null===e)return this._error("Invalid IRI",t);r=this._namedNode(e);break;case"type":case"prefixed":const n=this._prefixes[t.prefix];if(void 0===n)return this._error(`Undefined prefix "${t.prefix}:"`,t);r=this._namedNode(n+t.value);break;case"blank":r=this._blankNode(this._prefixes[t.prefix]+t.value);break;case"var":r=this._variable(t.value.substr(1));break;default:return this._error(`Expected entity but got ${t.type}`,t)}return!e&&this._n3Mode&&r.id in this._quantified&&(r=this._quantified[r.id]),r}_readSubject(t){switch(this._predicate=null,t.type){case"[":return this._saveContext("blank",this._graph,this._subject=this._blankNode(),null,null),this._readBlankNodeHead;case"(":return this._saveContext("list",this._graph,this.RDF_NIL,null,null),this._subject=null,this._readListItem;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._graph=this._blankNode(),null,null),this._readSubject):this._error("Unexpected graph",t);case"}":return this._readPunctuation(t);case"@forSome":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORSOME,this._quantifier=this._blankNode,this._readQuantifierList):this._error('Unexpected "@forSome"',t);case"@forAll":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORALL,this._quantifier=this._variable,this._readQuantifierList):this._error('Unexpected "@forAll"',t);case"literal":if(!this._n3Mode)return this._error("Unexpected literal",t);if(0===t.prefix.length)return this._literalValue=t.value,this._completeSubjectLiteral;this._subject=this._literal(t.value,this._namedNode(t.prefix));break;case"<<":return this._supportsRDFStar?(this._saveContext("<<",this._graph,null,null,null),this._graph=null,this._readSubject):this._error("Unexpected RDF* syntax",t);default:if(void 0===(this._subject=this._readEntity(t)))return;if(this._n3Mode)return this._getPathReader(this._readPredicateOrNamedGraph)}return this._readPredicateOrNamedGraph}_readPredicate(t){const e=t.type;switch(e){case"inverse":this._inversePredicate=!0;case"abbreviation":this._predicate=this.ABBREVIATIONS[t.value];break;case".":case"]":case"}":return null===this._predicate?this._error(`Unexpected ${e}`,t):(this._subject=null,"]"===e?this._readBlankNodeTail(t):this._readPunctuation(t));case";":return null!==this._predicate?this._readPredicate:this._error("Expected predicate but got ;",t);case"[":if(this._n3Mode)return this._saveContext("blank",this._graph,this._subject,this._subject=this._blankNode(),null),this._readBlankNodeHead;case"blank":if(!this._n3Mode)return this._error("Disallowed blank node as predicate",t);default:if(void 0===(this._predicate=this._readEntity(t)))return}return this._readObject}_readObject(t){switch(t.type){case"literal":if(0===t.prefix.length)return this._literalValue=t.value,this._readDataTypeOrLang;this._object=this._literal(t.value,this._namedNode(t.prefix));break;case"[":return this._saveContext("blank",this._graph,this._subject,this._predicate,this._subject=this._blankNode()),this._readBlankNodeHead;case"(":return this._saveContext("list",this._graph,this._subject,this._predicate,this.RDF_NIL),this._subject=null,this._readListItem;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._subject,this._predicate,this._graph=this._blankNode()),this._readSubject):this._error("Unexpected graph",t);case"<<":return this._supportsRDFStar?(this._saveContext("<<",this._graph,this._subject,this._predicate,null),this._graph=null,this._readSubject):this._error("Unexpected RDF* syntax",t);default:if(void 0===(this._object=this._readEntity(t)))return;if(this._n3Mode)return this._getPathReader(this._getContextEndReader())}return this._getContextEndReader()}_readPredicateOrNamedGraph(t){return"{"===t.type?this._readGraph(t):this._readPredicate(t)}_readGraph(t){return"{"!==t.type?this._error(`Expected graph but got ${t.type}`,t):(this._graph=this._subject,this._subject=null,this._readSubject)}_readBlankNodeHead(t){return"]"===t.type?(this._subject=null,this._readBlankNodeTail(t)):(this._predicate=null,this._readPredicate(t))}_readBlankNodeTail(t){if("]"!==t.type)return this._readBlankNodePunctuation(t);null!==this._subject&&this._emit(this._subject,this._predicate,this._object,this._graph);const e=null===this._predicate;return this._restoreContext("blank",t),null!==this._object?this._getContextEndReader():null!==this._predicate?this._readObject:e?this._readPredicateOrNamedGraph:this._readPredicateAfterBlank}_readPredicateAfterBlank(t){switch(t.type){case".":case"}":return this._subject=null,this._readPunctuation(t);default:return this._readPredicate(t)}}_readListItem(t){let e=null,r=null,n=this._readListItem;const i=this._subject,o=this._contextStack,a=o[o.length-1];switch(t.type){case"[":this._saveContext("blank",this._graph,r=this._blankNode(),this.RDF_FIRST,this._subject=e=this._blankNode()),n=this._readBlankNodeHead;break;case"(":this._saveContext("list",this._graph,r=this._blankNode(),this.RDF_FIRST,this.RDF_NIL),this._subject=null;break;case")":if(this._restoreContext("list",t),0!==o.length&&"list"===o[o.length-1].type&&this._emit(this._subject,this._predicate,this._object,this._graph),null===this._predicate){if(n=this._readPredicate,this._subject===this.RDF_NIL)return n}else if(n=this._getContextEndReader(),this._object===this.RDF_NIL)return n;r=this.RDF_NIL;break;case"literal":0===t.prefix.length?(this._literalValue=t.value,n=this._readListItemDataTypeOrLang):(e=this._literal(t.value,this._namedNode(t.prefix)),n=this._getContextEndReader());break;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._subject,this._predicate,this._graph=this._blankNode()),this._readSubject):this._error("Unexpected graph",t);default:if(void 0===(e=this._readEntity(t)))return}if(null===r&&(this._subject=r=this._blankNode()),null===i?null===a.predicate?a.subject=r:a.object=r:this._emit(i,this.RDF_REST,r,this._graph),null!==e){if(this._n3Mode&&("IRI"===t.type||"prefixed"===t.type))return this._saveContext("item",this._graph,r,this.RDF_FIRST,e),this._subject=e,this._predicate=null,this._getPathReader(this._readListItem);this._emit(r,this.RDF_FIRST,e,this._graph)}return n}_readDataTypeOrLang(t){return this._completeObjectLiteral(t,!1)}_readListItemDataTypeOrLang(t){return this._completeObjectLiteral(t,!0)}_completeLiteral(t){let e=this._literal(this._literalValue);switch(t.type){case"type":case"typeIRI":const r=this._readEntity(t);if(void 0===r)return;e=this._literal(this._literalValue,r),t=null;break;case"langcode":e=this._literal(this._literalValue,t.value),t=null}return{token:t,literal:e}}_completeSubjectLiteral(t){return this._subject=this._completeLiteral(t).literal,this._readPredicateOrNamedGraph}_completeObjectLiteral(t,e){const r=this._completeLiteral(t);if(r)return this._object=r.literal,e&&this._emit(this._subject,this.RDF_FIRST,this._object,this._graph),null===r.token?this._getContextEndReader():(this._readCallback=this._getContextEndReader(),this._readCallback(r.token))}_readFormulaTail(t){return"}"!==t.type?this._readPunctuation(t):(null!==this._subject&&this._emit(this._subject,this._predicate,this._object,this._graph),this._restoreContext("formula",t),null===this._object?this._readPredicate:this._getContextEndReader())}_readPunctuation(t){let e,r=this._graph;const n=this._subject,i=this._inversePredicate;switch(t.type){case"}":if(null===this._graph)return this._error("Unexpected graph closing",t);if(this._n3Mode)return this._readFormulaTail(t);this._graph=null;case".":this._subject=null,e=this._contextStack.length?this._readSubject:this._readInTopContext,i&&(this._inversePredicate=!1);break;case";":e=this._readPredicate;break;case",":e=this._readObject;break;case"{|":if(!this._supportsRDFStar)return this._error("Unexpected RDF* syntax",t);const o=this._predicate,a=this._object;this._subject=this._quad(n,o,a,this.DEFAULTGRAPH),e=this._readPredicate;break;case"|}":if("Quad"!==this._subject.termType)return this._error("Unexpected asserted triple closing",t);this._subject=null,e=this._readPunctuation;break;default:if(this._supportsQuads&&null===this._graph&&void 0!==(r=this._readEntity(t))){e=this._readQuadPunctuation;break}return this._error(`Expected punctuation to follow "${this._object.id}"`,t)}if(null!==n){const t=this._predicate,e=this._object;i?this._emit(e,t,n,r):this._emit(n,t,e,r)}return e}_readBlankNodePunctuation(t){let e;switch(t.type){case";":e=this._readPredicate;break;case",":e=this._readObject;break;default:return this._error(`Expected punctuation to follow "${this._object.id}"`,t)}return this._emit(this._subject,this._predicate,this._object,this._graph),e}_readQuadPunctuation(t){return"."!==t.type?this._error("Expected dot to follow quad",t):this._readInTopContext}_readPrefix(t){return"prefix"!==t.type?this._error("Expected prefix to follow @prefix",t):(this._prefix=t.value,this._readPrefixIRI)}_readPrefixIRI(t){if("IRI"!==t.type)return this._error(`Expected IRI to follow prefix "${this._prefix}:"`,t);const e=this._readEntity(t);return this._prefixes[this._prefix]=e.value,this._prefixCallback(this._prefix,e),this._readDeclarationPunctuation}_readBaseIRI(t){const e="IRI"===t.type&&this._resolveIRI(t.value);return e?(this._setBase(e),this._readDeclarationPunctuation):this._error("Expected valid IRI to follow base declaration",t)}_readNamedGraphLabel(t){switch(t.type){case"IRI":case"blank":case"prefixed":return this._readSubject(t),this._readGraph;case"[":return this._readNamedGraphBlankLabel;default:return this._error("Invalid graph label",t)}}_readNamedGraphBlankLabel(t){return"]"!==t.type?this._error("Invalid graph label",t):(this._subject=this._blankNode(),this._readGraph)}_readDeclarationPunctuation(t){return this._sparqlStyle?(this._sparqlStyle=!1,this._readInTopContext(t)):"."!==t.type?this._error("Expected declaration to end with a dot",t):this._readInTopContext}_readQuantifierList(t){let e;switch(t.type){case"IRI":case"prefixed":if(void 0!==(e=this._readEntity(t,!0)))break;default:return this._error(`Unexpected ${t.type}`,t)}return this._explicitQuantifiers?(null===this._subject?this._emit(this._graph||this.DEFAULTGRAPH,this._predicate,this._subject=this._blankNode(),this.QUANTIFIERS_GRAPH):this._emit(this._subject,this.RDF_REST,this._subject=this._blankNode(),this.QUANTIFIERS_GRAPH),this._emit(this._subject,this.RDF_FIRST,e,this.QUANTIFIERS_GRAPH)):this._quantified[e.id]=this._quantifier(this._blankNode().value),this._readQuantifierPunctuation}_readQuantifierPunctuation(t){return","===t.type?this._readQuantifierList:(this._explicitQuantifiers&&(this._emit(this._subject,this.RDF_REST,this.RDF_NIL,this.QUANTIFIERS_GRAPH),this._subject=null),this._readCallback=this._getContextEndReader(),this._readCallback(t))}_getPathReader(t){return this._afterPath=t,this._readPath}_readPath(t){switch(t.type){case"!":return this._readForwardPath;case"^":return this._readBackwardPath;default:const e=this._contextStack,r=e.length&&e[e.length-1];if(r&&"item"===r.type){const e=this._subject;this._restoreContext("item",t),this._emit(this._subject,this.RDF_FIRST,e,this._graph)}return this._afterPath(t)}}_readForwardPath(t){let e,r;const n=this._blankNode();if(void 0!==(r=this._readEntity(t)))return null===this._predicate?(e=this._subject,this._subject=n):(e=this._object,this._object=n),this._emit(e,r,n,this._graph),this._readPath}_readBackwardPath(t){const e=this._blankNode();let r,n;if(void 0!==(r=this._readEntity(t)))return null===this._predicate?(n=this._subject,this._subject=e):(n=this._object,this._object=e),this._emit(e,r,n,this._graph),this._readPath}_readRDFStarTailOrGraph(t){return">>"!==t.type?this._supportsQuads&&null===this._graph&&void 0!==(this._graph=this._readEntity(t))?this._readRDFStarTail:this._error(`Expected >> to follow "${this._object.id}"`,t):this._readRDFStarTail(t)}_readRDFStarTail(t){if(">>"!==t.type)return this._error(`Expected >> but got ${t.type}`,t);const e=this._quad(this._subject,this._predicate,this._object,this._graph||this.DEFAULTGRAPH);return this._restoreContext("<<",t),null===this._subject?(this._subject=e,this._readPredicate):(this._object=e,this._getContextEndReader())}_getContextEndReader(){const t=this._contextStack;if(!t.length)return this._readPunctuation;switch(t[t.length-1].type){case"blank":return this._readBlankNodeTail;case"list":return this._readListItem;case"formula":return this._readFormulaTail;case"<<":return this._readRDFStarTailOrGraph}}_emit(t,e,r,n){this._callback(null,this._quad(t,e,r,n||this.DEFAULTGRAPH))}_error(t,e){const r=new Error(`${t} on line ${e.line}.`);r.context={token:e,line:e.line,previousToken:this._lexer.previousToken},this._callback(r),this._callback=Ue}_resolveIRI(t){return/^[a-z][a-z0-9+.-]*:/i.test(t)?t:this._resolveRelativeIRI(t)}_resolveRelativeIRI(t){if(!t.length)return this._base;switch(t[0]){case"#":return this._base+t;case"?":return this._base.replace(/(?:\?.*)?$/,t);case"/":return("/"===t[1]?this._baseScheme:this._baseRoot)+this._removeDotSegments(t);default:return/^[^/:]*:/.test(t)?null:this._removeDotSegments(this._basePath+t)}}_removeDotSegments(t){if(!/(^|\/)\.\.?($|[/#?])/.test(t))return t;const e=t.length;let r="",n=-1,i=-1,o=0,a="/";for(;n=i&&(r=r.substr(0,o)),"/"!==a)return`${r}/${t.substr(n+1)}`;o=n+1}}}a=t[++n]}return r+t.substring(o)}parse(t,e,r){if(this._readCallback=this._readInTopContext,this._sparqlStyle=!1,this._prefixes=Object.create(null),this._prefixes._=this._blankNodePrefix?this._blankNodePrefix.substr(2):`b${Pe++}_`,this._prefixCallback=r||Ue,this._inversePredicate=!1,this._quantified=Object.create(null),!e){const e=[];let r;if(this._callback=(t,n)=>{t?r=t:n&&e.push(n)},this._lexer.tokenize(t).every((t=>this._readCallback=this._readCallback(t))),r)throw r;return e}this._callback=e,this._lexer.tokenize(t,((t,e)=>{null!==t?(this._callback(t),this._callback=Ue):this._readCallback&&(this._readCallback=this._readCallback(e))}))}}function Ue(){}function De(t,e){const r=e.namedNode;t._namedNode=r,t._blankNode=e.blankNode,t._literal=e.literal,t._variable=e.variable,t._quad=e.quad,t.DEFAULTGRAPH=e.defaultGraph(),t.RDF_FIRST=r(pe.rdf.first),t.RDF_REST=r(pe.rdf.rest),t.RDF_NIL=r(pe.rdf.nil),t.N3_FORALL=r(pe.r.forAll),t.N3_FORSOME=r(pe.r.forSome),t.ABBREVIATIONS={a:r(pe.rdf.type),"=":r(pe.owl.sameAs),">":r(pe.log.implies)},t.QUANTIFIERS_GRAPH=r("urn:n3:quantifiers")}De(Fe.prototype,Ee);var Le=s(6357);if(void 0===Me)var Me={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12};var Be=function(){function r(t,n){(0,e.A)(this,r),this.options=n||{},this.kb=t,this.target=n.target||{graph:{subjects:{},prefixes:{},terms:{}}},this.blankNodes=[],this.htmlOptions={selfClosing:"br img input area base basefont col colgroup source wbr isindex link meta param hr"},this.theOne="_:"+(new Date).getTime(),this.language=null,this.vocabulary=null,this.blankCounter=0,this.langAttributes=[{namespaceURI:"http://www.w3.org/XML/1998/namespace",localName:"lang"}],this.inXHTMLMode=!1,this.absURIRE=/[\w\_\-]+:\S+/,this.finishedHandlers=[],this.init()}return(0,t.A)(r,[{key:"addTriple",value:function(t,e,r,n){var i,o,a,s;i=void 0===e?G.namedNode(this.options.base):this.toRDFNodeObject(e),a=this.toRDFNodeObject(r),o=this.toRDFNodeObject(n),s=G.namedNode(this.options.base),this.kb.add(i,a,o,s)}},{key:"ancestorPath",value:function(t){for(var e="";t&&t.nodeType!==Me.DOCUMENT_NODE;)e="/"+t.localName+e,t=t.parentNode;return e}},{key:"copyMappings",value:function(t){var e={};for(var r in t)e[r]=t[r];return e}},{key:"copyProperties",value:function(){}},{key:"deriveDateTimeType",value:function(t){for(var e=0;e=0){var a=t.substring(0,o);if(""===a)return(i=e[""])?i+t.substring(o+1):null;if("_"===a)return"_:"+t.substring(o+1);if(r.NCNAME.test(a)&&(i=e[a]))return i+t.substring(o+1)}return null}},{key:"parseCURIEOrURI",value:function(t,e,r){return this.parseCURIE(t,e,r)||this.resolveAndNormalize(r,t)}},{key:"parsePredicate",value:function(t,e,r,n,i,o){if(""===t)return null;var a=this.parseTermOrCURIEOrAbsURI(t,e,o?null:r,n,i);return a&&0===a.indexOf("_:")?null:a}},{key:"parsePrefixMappings",value:function(t,e){for(var r=this.tokenize(t),n=null,i=0;i=0&&(t=t.substring(0,r)),e&&e.baseURIMap&&(t=e.baseURIMap(t)),t};for(i.push({current:t,context:this.push(null,o(t.baseURI))});i.length>0;){var a=i.shift();if(a.parent){if(a.context.parent&&a.context.parent.listMapping===a.listMapping)continue;for(var s in a.listMapping){var u=a.listMapping[s];if(0!==u.length){for(var c=[],l=0;l0){k=E;var O=n.spec;this.addTriple(f,O,"http://www.w3.org/ns/rdfa#usesVocabulary",{type:r.objectURI,value:k})}else k=this.vocabulary}for(var j=0;j0?F:null}var U,D,L=f.getAttributeNode("rel"),B=f.getAttributeNode("rev"),q=f.getAttributeNode("typeof"),H=f.getAttributeNode("property"),$=f.getAttributeNode("datatype"),z=this.inHTMLMode?f.getAttributeNode("datetime"):null,X=f.getAttributeNode("content"),G=f.getAttributeNode("about"),V=f.getAttributeNode("src"),W=f.getAttributeNode("resource"),Q=f.getAttributeNode("href"),Y=f.getAttributeNode("inlist"),J=[];if(L){D=this.tokenize(L.value);for(var Z=0;Z=0?e+=t.nodeName.split(":")[1]:e+=t.nodeName),e}.bind(this),i=!0;t.parent;){var o=t.element,a=o.attributes;if(o.nodeType===r.nodeType.TEXT||o.nodeType===r.nodeType.CDATA_SECTION)t.parent.nodeType===t.NODE&&(t.addArc(r.ns.RDF+"value"),t=this.buildFrame(t)),t.addLiteral(o.nodeValue);else if(n(o)!==r.ns.RDF+"RDF")if(t.parent&&t.parent.collection&&(t.addCollectionArc(),(t=this.buildFrame(t,t.element)).parent.element=null),t.parent&&t.parent.nodeType&&t.parent.nodeType!==t.ARC){t.addArc(n(o)),this.reify&&(e=this.getAttributeNodeNS(o,r.ns.RDF,"ID"))&&(t.rdfid=e.nodeValue,o.removeAttributeNode(e));var s=this.getAttributeNodeNS(o,r.ns.RDF,"parseType"),u=this.getAttributeNodeNS(o,r.ns.RDF,"datatype");if(u&&(t.datatype=u.nodeValue,o.removeAttributeNode(u)),s){var c=s.nodeValue;"Literal"===c?(t.datatype=r.ns.RDF+"XMLLiteral",(t=this.buildFrame(t)).addLiteral(o.innerHTML||o.childNodes),i=!1):"Resource"===c?((t=this.buildFrame(t,t.element)).parent.element=null,t.addBNode()):"Collection"===c&&((t=this.buildFrame(t,t.element)).parent.element=null,t.addCollection()),o.removeAttributeNode(s)}if(0!==a.length){var l=this.getAttributeNodeNS(o,r.ns.RDF,"resource"),h=this.getAttributeNodeNS(o,r.ns.RDF,"nodeID");t=this.buildFrame(t),l?(t.addNode(l.nodeValue),o.removeAttributeNode(l)):h?(t.addBNode(h.nodeValue),o.removeAttributeNode(h)):t.addBNode();for(var f=a.length-1;f>=0;f--){var p=this.buildFrame(t);p.addArc(n(a[f])),n(a[f])===r.ns.RDF+"type"?this.buildFrame(p).addNode(a[f].nodeValue):this.buildFrame(p).addLiteral(a[f].nodeValue)}}else 0===o.childNodes.length&&this.buildFrame(t).addLiteral("")}else{var d=this.getAttributeNodeNS(o,r.ns.RDF,"about");if(e=this.getAttributeNodeNS(o,r.ns.RDF,"ID"),d&&e)throw new Error("RDFParser: "+o.nodeName+" has both rdf:id and rdf:about. Halting. Only one of these properties may be specified on a node.");if(!d&&e)t.addNode("#"+e.nodeValue),o.removeAttributeNode(e);else if(null==d&&null==e){var y=this.getAttributeNodeNS(o,r.ns.RDF,"nodeID");y?(t.addBNode(y.nodeValue),o.removeAttributeNode(y)):t.addBNode()}else t.addNode(d.nodeValue),o.removeAttributeNode(d);var v=this.getAttributeNodeNS(o,r.ns.RDF,"type");r.ns.RDF+"Description"!==n(o)&&(v={nodeValue:n(o)}),null!=v&&(this.store.add(t.node,this.store.sym(r.ns.RDF+"type"),this.store.sym(M.join(v.nodeValue,t.base)),this.why),v.nodeName&&o.removeAttributeNode(v));for(var g=a.length-1;g>=0;g--)this.store.add(t.node,this.store.sym(n(a[g])),this.store.literal(a[g].nodeValue,t.lang),this.why)}for(o=t.element;t.parent;){for(var m=t;null==o;)o=(t=t.parent).element;var b=o.childNodes&&o.childNodes[t.lastChild];if(b&&i){if((b.nodeType===r.nodeType.ELEMENT||b.nodeType===r.nodeType.TEXT||b.nodeType===r.nodeType.CDATA_SECTION)&&(b.nodeType!==r.nodeType.TEXT&&b.nodeType!==r.nodeType.CDATA_SECTION||1===o.childNodes.length)){t.lastChild++,t=this.buildFrame(m,o.childNodes[t.lastChild-1]);break}t.lastChild++}else{if(t.terminateFrame(),!(t=t.parent))break;o=t.element,i=!0}}}}},{key:"cleanParser",value:function(){this.bnodes={},this.why=null}},{key:"buildFrame",value:function(t,e){var n=this.frameFactory(this,t,e);if(t&&(n.base=t.base,n.lang=t.lang),!e||e.nodeType===r.nodeType.TEXT||e.nodeType===r.nodeType.CDATA_SECTION)return n;var i=e.attributes,o=e.getAttributeNode("xml:base");null!=o&&(n.base=o.nodeValue,e.removeAttribute("xml:base"));var a=e.getAttributeNode("xml:lang");null!=a&&(n.lang=a.nodeValue,e.removeAttribute("xml:lang"));for(var s=i.length-1;s>=0;s--)if("xml"===i[s].nodeName.substr(0,3)){if("xmlns:"===i[s].name.slice(0,6)){var u=i[s].nodeValue;this.base&&(u=M.join(u,this.base)),this.store.setPrefixForURI(i[s].name.slice(6),u)}e.removeAttributeNode(i[s])}return n}}])}();function $e(t,e,r){var n,i,o,a=["INSERT","DELETE","WHERE"],s=W("http://www.w3.org/ns/pim/patch#"),u=Yt(e,e,r,r,null,null,"",null),c={},l=function(t,e,r,n,i){return"Line "+(e+1)+" of <"+t+">: Bad syntax:\n "+i+'\n at: "'+r.slice(n,n+30)+'"'};n=0;var h=e.sym(r+"#query");for(c.query=h;;){if((i=u.skipSpace(t,n))<0)return c;if(";"===t[i]){if((n=u.skipSpace(t,i+1))<0)return c;i=n}var f=!1;for(o=0;o3&&void 0!==arguments[3]?arguments[3]:"text/turtle",i=arguments.length>4?arguments[4]:void 0;n=(n=n||l.sT).split(";")[0];try{if(n===l.ny||n===l.sT)Yt(e,e,r,r,null,null,"",null).loadBuf(t),a();else if(n===l.JG)new He(e).parse(Q.parseXML(t),r,e.sym(r)),a();else if(n===l.H)qe(Q.parseXML(t,{contentType:l.H}),e,r),a();else if(n===l.lc)qe(Q.parseXML(t,{contentType:l.lc}),e,r),a();else if(n===l.K9||n===l.Fn)$e(t,e,r),a();else if(n===l.i2)ie(t,e,r,a);else{if(n!==l._0&&n!==l.BR)throw void 0===n?new Error("contentType is undefined"):new Error("Don't know how to parse "+n+" yet");var o=new Fe({factory:re});!function(t,r){try{o.parse(r,s)}catch(t){i(t,e)}}(null,t)}}catch(t){!function(t){if(n!==l.i2||n!==l._0||n!==l.BR){if(!i){var o=new Error(t+" while trying to parse <"+r+"> as "+n);throw o.cause=t,o}i(t,e)}}(t)}function a(){i&&i(null,e)}function s(t,r){r?e.add(r.subject,r.predicate,r.object,r.graph):i(t,e)}ze.handled={"text/n3":!0,"text/turtle":!0,"application/rdf+xml":!0,"application/xhtml+xml":!0,"text/html":!0,"application/sparql-update":!0,"application/sparql-update-single-match":!0,"application/ld+json":!0,"application/nquads":!0,"application/n-quads":!0}}(0,o.A)(He,"ns",{RDF:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",RDFS:"http://www.w3.org/2000/01/rdf-schema#"}),(0,o.A)(He,"nodeType",{ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION:12});var Xe=s(1147),Ge=s.n(Xe),Ve=s(362),We=s(6357);function Qe(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&o.add(r.resource,er.dc("title"),o.rdfFactory.literal(a[0].textContent),r.resource);for(var s=this.dom.getElementsByTagName("link"),u=s.length-1;u>=0;u--)i=!1,(n=s[u].getAttribute("rel"))||(n=s[u].getAttribute("rev"),i=!0),n&&t.linkData(r.original,n,s[u].getAttribute("href"),r.resource,i);for(var c=this.dom.getElementsByTagName("script"),l=0;l");return!(-1===e||-1===r||e>r)&&-1!==t.substr(e,r-e).indexOf("XHTML")}(e))return t.addStatus(r.req,"Has XHTML DOCTYPE. Switching to XHTMLHandler.\n"),new ir(this.response).parse(t,e,r);if(function(t){return!!t.match(/[^(/)}(e))return t.addStatus(r.req,"Has default namespace for XHTML, so switching to XHTMLHandler.\n"),new ir(this.response).parse(t,e,r);var i=new RegExp("([\\s\\S]+?)","im").exec(e);return i&&n.add(r.resource,er.dc("title"),n.rdfFactory.literal(i[1]),r.resource),n.add(r.resource,er.rdf("type"),er.link("WebPage"),t.appNode),t.addStatus(r.req,"non-XML HTML document, not parsed for data."),t.doneFetch(r,this.response)}}],[{key:"toString",value:function(){return"HTMLHandler"}},{key:"register",value:function(t){t.mediatypes["text/html"]={q:.9}}}])}(rr);ar.pattern=new RegExp("text/html");var sr=function(r){function n(){return(0,e.A)(this,n),Ye(this,n,arguments)}return(0,i.A)(n,r),(0,t.A)(n,[{key:"parse",value:function(t,e,r,n){var i=t.store;return new Promise((function(o,a){try{ie(e,i,r.original.value,(function(){o(t.doneFetch(r,n))}))}catch(e){var s="Error trying to parse "+r.resource+" as JSON-LD:\n"+e;o(t.failFetch(r,s,"parse_error",n))}}))}}],[{key:"toString",value:function(){return"JsonLdHandler"}},{key:"register",value:function(t){t.mediatypes["application/ld+json"]={q:.9}}}])}(rr);sr.pattern=/application\/ld\+json/;var ur=function(r){function n(){return(0,e.A)(this,n),Ye(this,n,arguments)}return(0,i.A)(n,r),(0,t.A)(n,[{key:"parse",value:function(t,e,r){return hr(e)?(t.addStatus(r.req,"Warning: "+r.resource+" has an XML declaration. We'll assume it's XML but its content-type wasn't XML.\n"),new or(this.response).parse(t,e,r)):e.slice(0,500).match(/xmlns:/)?(t.addStatus(r.req,"May have an XML namespace. We'll assume it's XML but its content-type wasn't XML.\n"),new or(this.response).parse(t,e,r)):(t.addStatus(r.req,"Plain text document, no known RDF semantics."),t.doneFetch(r,this.response))}}],[{key:"toString",value:function(){return"TextHandler"}},{key:"register",value:function(t){t.mediatypes["text/plain"]={q:.5}}}])}(rr);ur.pattern=new RegExp("text/plain");var cr=function(r){function n(){return(0,e.A)(this,n),Ye(this,n,arguments)}return(0,i.A)(n,r),(0,t.A)(n,[{key:"parse",value:function(t,e,r,n){var i=t.store,o=Yt(i,i,r.original.value,r.original.value,null,null,"",null);try{o.loadBuf(e)}catch(e){var a="Error trying to parse "+r.resource+" as Notation3:\n"+e;return t.failFetch(r,a,"parse_error",n)}return t.addStatus(r.req,"N3 parsed: "+o.statementCount+" triples in "+o.lines+" lines."),t.store.add(r.original,er.rdf("type"),er.link("RDFDocument"),t.appNode),t.doneFetch(r,this.response)}}],[{key:"toString",value:function(){return"N3Handler"}},{key:"register",value:function(t){t.mediatypes["text/n3"]={q:"1.0"},t.mediatypes["text/turtle"]={q:1}}}])}(rr);cr.pattern=new RegExp("(application|text)/(x-)?(rdf\\+)?(n3|turtle)");var lr={RDFXMLHandler:nr,XHTMLHandler:ir,XMLHandler:or,HTMLHandler:ar,TextHandler:ur,N3Handler:cr,JsonLdHandler:sr};function hr(t){return!!t.match(/\s*<\?xml\s+version\s*=[^<>]+\?>/)}var fr=function(){function r(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((0,e.A)(this,r),(0,o.A)(this,"store",void 0),(0,o.A)(this,"timeout",void 0),(0,o.A)(this,"_fetch",void 0),(0,o.A)(this,"mediatypes",void 0),(0,o.A)(this,"appNode",void 0),(0,o.A)(this,"requested",void 0),(0,o.A)(this,"timeouts",void 0),(0,o.A)(this,"redirectedTo",void 0),(0,o.A)(this,"fetchQueue",void 0),(0,o.A)(this,"fetchCallbacks",void 0),(0,o.A)(this,"nonexistent",void 0),(0,o.A)(this,"lookedUp",void 0),(0,o.A)(this,"handlers",void 0),(0,o.A)(this,"ns",void 0),(0,o.A)(this,"fireCallbacks",void 0),this.store=t||new Et,this.ns=tr(this.store.rdfFactory),this.timeout=i.timeout||3e4,this._fetch=i.fetch||void 0!==s.g&&(s.g.solidFetcher||s.g.solidFetch)||"undefined"!=typeof window&&(window.solidFetcher||window.solidFetch)||Ge(),!this._fetch)throw new Error("No _fetch function available for Fetcher");this.appNode=this.store.sym("chrome://TheCurrentSession"),this.store.fetcher=this,this.requested={},this.timeouts={},this.redirectedTo={},this.fetchQueue={},this.fetchCallbacks={},this.nonexistent={},this.lookedUp={},this.handlers=[],this.mediatypes={"image/*":{q:.9},"*/*":{q:.1}},Q.callbackify(this,["request","fail","refresh","retract","done"]),Object.keys(i.handlers||lr).map((function(t){return n.addHandler(lr[t])}))}return(0,t.A)(r,[{key:"load",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(r=Object.assign({},r),t instanceof Array)return Promise.all(t.map((function(t){return e.load(t,Object.assign({},r))})));var n=t,i=(0,Ve.E)(n);i=i.split("#")[0],r=this.initFetchOptions(i,r);var o,a=this.appNode,s=this.store,u=s.statementsMatching(void 0,this.ns.link("requestedURI"),s.sym(i),a).map((function(t){return t.subject})),c=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return Qe(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Qe(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(u);try{for(c.s();!(o=c.n()).done;){var l=o.value,h=s.any(l,this.ns.link("response"),null,a);if(null!=h){var f=s.statementsMatching(h,this.ns.link("outOfDate"),!0,a);s.remove(f),r.force=!0,r.clearPreviousData=!0}}}catch(t){c.e(t)}finally{c.f()}var p=this.initFetchOptions(i,r);return this.pendingFetchPromise(i,p.baseURI,p)}},{key:"pendingFetchPromise",value:(i=N(R().mark((function t(e,r,n){var i,o=this;return R().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.t0=!n.force,!t.t0){t.next=5;break}return t.next=4,this.fetchQueue[r];case 4:t.t0=t.sent;case 5:if(!t.t0){t.next=9;break}i=this.fetchQueue[r],t.next=12;break;case 9:i=Promise.race([this.setRequestTimeout(e,n),this.fetchUri(e,n)]),this.fetchQueue[r]=i,this.cleanupFetchRequest(r,void 0,this.timeout);case 12:return t.abrupt("return",i.then((function(t){return e in o.timeouts&&(o.timeouts[e].forEach(clearTimeout),delete o.timeouts[e]),t})));case 13:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return i.apply(this,arguments)})},{key:"cleanupFetchRequest",value:function(t,e,r){var n=this;void 0!==e&&We.warn("_options is deprecated"),this.timeouts[t]=(this.timeouts[t]||[]).concat(setTimeout((function(){n.isPending(t)||delete n.fetchQueue[t]}),r))}},{key:"initFetchOptions",value:function(t,e){var n=this.store;!e.method||"GET"===e.method.toUpperCase()||(e.force=!0),e.resource=n.rdfFactory.namedNode(t),e.baseURI=e.baseURI||t,e.original=n.rdfFactory.namedNode(e.baseURI),e.req=n.bnode(),e.headers=e.headers||new Xe.Headers,e.contentType&&(e.headers["content-type"]=e.contentType),e.force&&(e.cache="no-cache");var i=this.acceptString();e.headers.accept=i;var o=r.offlineOverride(t);e.requestedURI=o,r.setCredentials(o,e);var a=r.proxyIfNecessary(o);return o!==a&&(e.proxyUsed=!0),e.actualProxyURI=a,e}},{key:"fetchUri",value:function(t,e){var n=this;if(!t)return Promise.reject(new Error("Cannot fetch an empty uri"));if(r.unsupportedProtocol(t))return this.failFetch(e,"fetcher: Unsupported protocol","unsupported_protocol");var i=this.getState(t);if(e.force)delete this.nonexistent[t];else{if("fetched"===i)return Promise.resolve(this.doneFetch(e,{status:200,ok:!0,statusText:"Already loaded into quadstore."}));if("failed"===i&&404===this.requested[t]){var o="Previously failed: "+this.requested[t],a={url:t,status:this.requested[t],statusText:o,responseText:o,headers:new Xe.Headers,ok:!1,body:null,bodyUsed:!1,size:0,timeout:0};return this.failFetch(e,o,this.requested[t],a)}}this.fireCallbacks("request",[t]),this.requested[t]=!0,e.noMeta||this.saveRequestMetadata(t,e);var s=e.actualProxyURI;return this._fetch(s,e).then((function(r){return n.handleResponse(r,t,e)}),(function(r){var i={url:s,status:999,statusText:(r.name||"network failure")+": "+(r.errno||r.code||r.type),responseText:r.message,headers:new Xe.Headers,ok:!1,body:null,bodyUsed:!1,size:0,timeout:0};return n.handleError(i,t,e)}))}},{key:"nowOrWhenFetched",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=(0,Ve.E)(t);"function"==typeof e?r=e:void 0===e||((0,v.Y2)(e)?n.referringTerm=e:n=e),this.load(i,n).then((function(t){if(r)if(t)if(t.ok)r(!0,"OK",t);else{var e="HTTP error: Status "+t.status+" ("+t.statusText+")";t.responseText&&(e+=" "+t.responseText),r(!1,e,t)}else r(!1,"@@ nowOrWhenFetched: no response object!")}),(function(t){var e=t.message||t.statusText;e="Failed to load <"+i+"> "+e,t.response&&t.response.status&&(e+=" status: "+t.response.status),r(!1,e,t.response)}))}},{key:"addStatus",value:function(t,e){var r=new Date;e="["+r.getHours()+":"+r.getMinutes()+":"+r.getSeconds()+"."+r.getMilliseconds()+"] "+e;var n=this.store,i=n.the(t,this.ns.link("status"));(0,v.P3)(i)?i.append(n.rdfFactory.literal(e)):V.A.warn("web.js: No list to add to: "+i+","+e)}},{key:"failFetch",value:function(t,e,r,n){this.addStatus(t.req,e),t.noMeta||this.store.add(t.original,this.ns.link("error"),this.store.rdfFactory.literal(e));var i=(t.method||"GET").toUpperCase();("GET"===i||"HEAD"===i)&&(t.resource.equals(t.original),this.requested[M.docpart(t.original.value)]=r,this.fireCallbacks("fail",[t.original.value,e]));var o=new Error("Fetcher: "+e);return o.status=r,o.statusText=e,o.response=n,Promise.reject(o)}},{key:"linkData",value:function(t,e,r,n,i){if(r){var o,a=this.store,s=a.rdfFactory.namedNode(M.join(r,t.value));if("alternate"===e||"seeAlso"===e||"meta"===e||"describedby"===e){if(s.value===t.value)return;o=this.ns.rdfs("seeAlso")}else o="type"===e?a.rdfFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"):a.rdfFactory.namedNode(M.join(encodeURIComponent(e),"http://www.iana.org/assignments/link-relations/"));i?a.add(s,o,t,n):a.add(t,o,s,n)}}},{key:"parseLinkHeader",value:function(t,e,r){if(t){var n=/[^\(\)<>@,;:"\/\[\]\?={} \t]+=(([^\(\)<>@,;:"\/\[\]\?={} \t]+)|("[^"]*"))/g,i=t.match(/<[^>]*>\s*(\s*;\s*[^()<>@,;:"/[\]?={} \t]+=(([^\(\)<>@,;:"\/\[\]\?={} \t]+)|("[^"]*")))*(,|$)/g);if(null!=i)for(var o=0;o"),s=a[0].substring(1),u=a[1].match(n);if(null==u)return;for(var c=0;c1&&void 0!==arguments[1]?arguments[1]:{},n=(0,Ve.E)(t),i=new y.A(n).doc();return r.contentType=r["content-type"]||r["Content-Type"]||r.contentType||l.sT,"application/ld+json"===r.contentType?new Promise((function(n,o){nt(i,e.store,i.uri,r.contentType,(function(i,a){i?o(i):(r.data=a,e.webOperation("PUT",t,r).then((function(t){return n(t)})).catch((function(t){return o(t)})))}))})):(r.data=nt(i,this.store,i.value,r.contentType),this.webOperation("PUT",n,r))}},{key:"webCopy",value:function(t,e,r){var n=this;return this.webOperation("GET",t).then((function(t){return n.webOperation("PUT",e,{data:t.responseText,contentType:r})}))}},{key:"delete",value:function(t,e){var r=this;return this.webOperation("DELETE",t,e).then((function(e){return r.requested[t]=404,r.nonexistent[t]=!0,r.unload(r.store.rdfFactory.namedNode(t)),e}))}},{key:"createIfNotExists",value:(n=N(R().mark((function t(e){var r,n,i,o,a=arguments;return R().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:l.sT,n=a.length>2&&void 0!==a[2]?a[2]:"",i=this,t.prev=3,t.next=6,i.load(e);case 6:o=t.sent,t.next=26;break;case 9:if(t.prev=9,t.t0=t.catch(3),404!==t.t0.response.status){t.next=25;break}return t.prev=12,t.next=15,i.webOperation("PUT",e.value,{data:n,contentType:r});case 15:o=t.sent,t.next=21;break;case 18:throw t.prev=18,t.t1=t.catch(12),t.t1;case 21:return delete i.requested[e.value],t.abrupt("return",o);case 25:throw t.t0;case 26:return t.abrupt("return",o);case 27:case"end":return t.stop()}}),t,this,[[3,9],[12,18]])}))),function(t){return n.apply(this,arguments)})},{key:"createContainer",value:function(t,e,r){var n={"content-type":l.sT,link:this.ns.ldp("BasicContainer")+'; rel="type"'};e&&(n.slug=e);var i={headers:n};return r&&(i.body=r),this.webOperation("POST",t,i)}},{key:"invalidateCache",value:function(t){var e=(0,Ve.E)(t),r=this;if(r.fetchQueue&&r.fetchQueue[e]&&(r.fetchQueue[e].PromiseStatus,delete r.fetchQueue[e]),r.requested[e]&&"done"!==r.requested[e]&&"failed"!==r.requested[e]&&404!==r.requested[e]){var n="Rdflib: fetcher: Destructive operation on <".concat(r.requested[e],"> file being fetched! ")+e;We.error(n)}else delete r.requested[e],delete r.nonexistent[e]}},{key:"webOperation",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=(0,Ve.E)(e);n.method=t,n.body=n.data||n.body,n.force=!0;var o=this;if(n.body&&!n.contentType)throw new Error("Web operation sending data must have a defined contentType.");return n.contentType&&(n.headers=n.headers||{},n.headers["content-type"]=n.contentType),r.setCredentials(i,n),new Promise((function(e,r){o._fetch(i,n).then((function(n){if(n.ok)"PUT"!==t&&"PATCH"!==t&&"POST"!==t&&"DELETE"!==t||o.invalidateCache(i),n.text?n.text().then((function(t){n.responseText=t,e(n)})):e(n);else{var a="Web error: "+n.status;n.statusText&&(a+=" ("+n.statusText+")"),a+=" on "+t+" of <"+i+">",n.responseText&&(a+=": "+n.responseText);var s=new Error(a);s.response=n,r(s)}}),(function(e){r(new Error("Fetch error for "+t+" of <"+i+">:"+e))}))}))}},{key:"lookUpThing",value:function(t,e){var r=this,n=this.store.uris(t);return(n=n.map((function(t){return M.docpart(t)}))).forEach((function(t){r.lookedUp[t]=!0})),this.load(n,{referringTerm:e})}},{key:"getHeader",value:function(t,e){for(var r=this.store,n=t.value,i=r.each(void 0,this.ns.link("requestedURI"),r.rdfFactory.literal(n)),o=0;o=400)return 404===t.status&&(this.nonexistent[r.original.value]=!0,this.nonexistent[e]=!0),this.saveErrorResponse(t,s).then((function(){var e=r.resource+" "+t.statusText;return n.failFetch(r,e,t.status,t)}));var l=null,h=null;if(c&&(h=M.join(c,e))!==e&&(l=h),200===t.status){if(this.addType(this.ns.link("Document"),a,i,e),l&&this.addType(this.ns.link("Document"),a,i,l),r.clearPreviousData)for(var f=i.statementsMatching(void 0,void 0,void 0,r.resource).slice(),p=0;p10&&n.add(e,r.ns.http("content"),n.rdfFactory.literal(t),e)}))}},{key:"handlerForContentType",value:function(t,e){if(!t)return null;var r=this.handlers.find((function(e){return t.match(e.pattern)}));return r?new r(e):null}},{key:"guessContentType",value:function(t){return Ke[t.split(".").pop()]}},{key:"normalizedContentType",value:function(t,e){if(t.forceContentType)return t.forceContentType;var r=e.get("content-type");if(!r||r.includes("application/octet-stream")){var n=this.guessContentType(t.resource.value);if(n)return n}var i=M.protocol(t.resource.value);return!r&&["file","chrome"].includes(i)?"text/xml":r}},{key:"redirectToProxy",value:function(t,e){var r=this;this.addStatus(e.req,"BLOCKED -> Cross-site Proxy to <"+t+">"),e.proxyUsed=!0;var n=this.store,i=e.req;e.noMeta||(n.add(i,this.ns.link("redirectedTo"),n.rdfFactory.namedNode(t),i),this.addStatus(i,"redirected to new request")),this.requested[e.resource.value]="redirected",this.redirectedTo[e.resource.value]=t;var o=Object.assign({},e);return o.baseURI=e.resource.value,this.fetchUri(t,o).then((function(t){return o.noMeta||n.add(i,r.ns.link("redirectedRequest"),o.req,r.appNode),t}))}},{key:"setRequestTimeout",value:function(t,e){var r=this;return new Promise((function(n){r.timeouts[t]=(r.timeouts[t]||[]).concat(setTimeout((function(){!r.isPending(t)||e.retriedWithNoCredentials||e.proxyUsed||n(r.failFetch(e,"Request to ".concat(t," timed out"),"timeout"))}),r.timeout))}))}},{key:"addFetchCallback",value:function(t,e){this.fetchCallbacks[t]?this.fetchCallbacks[t].push(e):this.fetchCallbacks[t]=[e]}},{key:"acceptString",value:function(){var t="";for(var e in this.mediatypes)for(var r in""!==t&&(t+=", "),t+=e,this.mediatypes[e])t+=";"+r+"="+this.mediatypes[e][r];return t}}],[{key:"crossSiteProxy",value:function(t){return r.crossSiteProxyTemplate?r.crossSiteProxyTemplate.replace("{uri}",encodeURIComponent(t)):void 0}},{key:"offlineOverride",value:function(t){var e,r=t;return"undefined"!=typeof window&&window.panes&&(e=window.panes.UI)&&e.preferences&&e.preferences.get("offlineModeUsingLocalhost")&&"http://"===r.slice(0,7)&&"localhost/"!==r.slice(7,17)&&(r="http://localhost/"+r.slice(7),V.A.warn("Localhost kludge for offline use: actually getting <"+r+">")),r}},{key:"proxyIfNecessary",value:function(t){var e;if("undefined"!=typeof window&&window.panes&&(e=window.panes.UI)&&e.isExtension)return t;if("undefined"!=typeof $SolidTestEnvironment&&$SolidTestEnvironment.localSiteMap){var n=function t(e,r){var n=r[e.shift()];return n?"string"==typeof n?n+e.join("/"):e?t(e,n):null:null}(t.split("/").slice(2),$SolidTestEnvironment.localSiteMap);if(n)return n}return r.crossSiteProxyTemplate&&"undefined"!=typeof document&&document.location&&"https:"===(""+document.location).slice(0,6)&&"http:"===t.slice(0,5)?r.crossSiteProxyTemplate.replace("{uri}",encodeURIComponent(t)):t}},{key:"unsupportedProtocol",value:function(t){var e=M.protocol(t);return"tel"===e||"mailto"===e||"urn"===e}},{key:"setCredentials",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};void 0===e.credentials&&(void 0!==e.withCredentials?e.credentials=e.withCredentials?"include":"omit":e.credentials="include")}}]);var n,i}();(0,o.A)(fr,"HANDLERS",void 0),(0,o.A)(fr,"CONTENT_TYPE_BY_EXT",void 0),(0,o.A)(fr,"crossSiteProxyTemplate",void 0),fr.HANDLERS=lr,fr.CONTENT_TYPE_BY_EXT=Ke;const pr={parseJSON:function(t,e,r){var n,i,o,a={},s=r.sym(e);for(var u in t){0===u.indexOf("_:")?a[u]?n=a[u]:(n=r.bnode(u),a[u]=n):n=r.sym(u);var c=t[u];for(var l in c){var h=c[l];for(var f in i=r.sym(l),h){var p=h[f];if("uri"===p.type)o=r.sym(p.value),r.add(n,i,o,s);else if("BlankNode"===p.type)a[p.value]?o=a[p.value]:(o=r.bnode(p.value),a[p.value]=o),r.add(n,i,o,s);else{if("Literal"!==p.type)throw new Error("error: unexpected termtype: "+f.type);o=p.datatype?r.literal(p.value,void 0,r.sym(p.datatype)):p.lang?r.literal(p.value,p.lang):r.literal(p.value),r.add(n,i,o,s)}}}}}};function dr(t){var e=0;function r(t){var e="",r=t.statements;for(var n in r)V.A.debug("Found statement: "+r),e+=a()+r[n]+"\n";return e}function n(t){var e="";for(var r in t.constraints){var n=t.constraints[r];e+=a()+"FILTER ( "+n.describe(r)+" ) \n"}return e}function i(t){for(var o="",s=0;s"):t}function u(t){return"string"==typeof t&&t.match(/^<[^>]*>$/)}function c(t){return"string"==typeof t&&(t.match(/^_:/)||t.match(/^$/))}function l(t){return"string"==typeof t&&t.match(/:$/)}function h(t){return"string"==typeof t&&t.match(/^:|^[^_][^:]*:/)}function f(t){return t.split(":")[0]}function p(t){return t.split(":")[1]}function d(t){return u(t)?t.slice(1,t.length-1):t}function y(t){var e=-1===t.indexOf("'")?null:t.indexOf("'"),n=-1===t.indexOf('"')?null:t.indexOf('"');if(!e&&!n){var i=new Array(1);return i[0]=t,i}var o,a,s=new Array(2);if(!e||n&&n/g,"> ").replace(/{/g," { ").replace(/}/g," } ").replace(/[\t\n\r]/g," ").replace(/; /g," ; ").replace(/\. /g," . ").replace(/, /g," , "),V.A.info("New str into spaceDelimit: \n"+t);var e=[],r=t.split(" ");for(var n in r)o(r[n])&&(e=e.concat(r[n]));return e}function g(t,e){for(var r=0;r"===t[1]||"<"===t[1]?(V.A.debug("Constraint added: "+t),e.constraints[t[0]]=new w(t[2])):V.A.warn("I don't know how to handle the constraint: "+t)}function _(t,e){V.A.debug("Optional query: "+t+" not yet implemented.");var n=r.formula();k(t,n),e.optional.push(n)}function k(t,e){var n,o,l=function(t){for(var e=[],n=0;n"),"is"===e[r]&&"of"===e[r+2]){e.splice(r,1),e.splice(r+1,1);var n=e[r-1];e[r-1]=e[r+1],e[r+1]=n}return e}(r),V.A.info("SPARQL Tokens: "+r),r}(t),O=function(t){var e=m("PREFIX",t),r=[];for(var n in e){var i=t[e[n]+1],o=t[e[n]+2];if(l(i))if(u(o)){V.A.info("Prefix found: "+i+" -> "+o);var a=f(i),s=d(o);r[a]=s}else V.A.error("Invalid SPARQL symbol: "+o);else V.A.error("Invalid SPARQL prefix: "+i)}return r}(E);O.rdf||(O.rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"),O.rdfs||(O.rdfs="http://www.w3.org/2000/01/rdf-schema#");var j=g("SELECT",E),N=g("WHERE",E);if(j<0||N<0||j>N)return V.A.error("Invalid or nonexistent SELECT and WHERE tags in SPARQL query"),!1;if(function(t,e){for(var r in V.A.info("SPARQL vars: "+t),t)if(a(t[r])){V.A.info("Added "+t[r]+" to query variables from SPARQL");var n=i(t[r].slice(1));e.vars.push(n),n.label=t[r].slice(1)}else V.A.warn("Incorrect SPARQL variable in SELECT: "+t[r])}(E.slice(j+1,N),T),k(E.slice(N+2,E.length-1),T.pat),e)return T;for(var S in T.pat.statements){var R=T.pat.statements[S];"NamedNode"===R.subject.termType&&r.fetcher&&r.fetcher.lookUpThing(R.subject,"sparql:"+R.subject),"NamedNode"===R.object.termType&&r.fetcher&&r.fetcher.lookUpThing(R.object,"sparql:"+R.object)}return T}function vr(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return gr(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?gr(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function gr(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0)return"N3PATCH";if(i.indexOf("application/sparql-update")>=0)return"SPARQL";if(i.indexOf("application/sparql-update-single-match")>=0)return"SPARQL"}var v=e.each(c,this.ns.httph("ms-author-via"));if(v.length)for(var g=0;g=0)return"SPARQL";if(i.indexOf("DAV")>=0)return"DAV"}if(!this.isHttpUri(t))return!!l&&"LOCALFILE";var m=e.each(c,this.ns.http("status"));if(m.length)for(var b=0;b3&&void 0!==arguments[3]?arguments[3]:{};return Promise.resolve().then((function(){if(!t)throw new Error("No URI given for remote editing operation: "+e);return i.noMeta=!0,i.contentType=i.contentType||"application/sparql-update",i.body=e,n.store.fetcher.webOperation("PATCH",t,i)})).then((function(n){if(!n.ok){var i="UpdateManager: update failed for <"+t+"> status="+n.status+", "+n.statusText+"\n for query: "+e;throw new Error(i)}r(t,n.ok,n.responseText,n)})).catch((function(e){r(t,!1,e.message,e)}))}},{key:"update_statement",value:function(t){if(!t||t.graph){var e=this,r=this.statementContext(t);return{statement:t?[t.subject,t.predicate,t.object,t.graph]:void 0,statementNT:t?this.anonymizeNT(t):void 0,where:e.contextWhere(r),set_object:function(t,r){var n=this.where;n+="DELETE DATA { "+this.statementNT+" } ;\n",n+="INSERT DATA { "+this.anonymize(this.statement[0])+" "+this.anonymize(this.statement[1])+" "+this.anonymize(t)+" . }\n",e.fire(this.statement[3].value,n,r)}}}}},{key:"insert_statement",value:function(t,e){var r=t instanceof Array?t[0]:t,n=this.contextWhere(this.statementContext(r));if(t instanceof Array){for(var i="",o=0;o 1 different downstream actions")}else r.downstreamAction=e;else e(t)}},{key:"clearUpstreamCount",value:function(t){this.patchControlFor(t).upstreamCount=0}},{key:"getUpdatesVia",value:function(t){var e=this.store.fetcher.getHeader(t,"updates-via");return e&&e.length?e[0].trim():null}},{key:"addDownstreamChangeListener",value:function(t,e){var r=this,n=this.patchControlFor(t);n.downstreamChangeListeners||(n.downstreamChangeListeners=[]),n.downstreamChangeListeners.push(e),this.setRefreshHandler(t,(function(t){r.reloadAndSync(t)}))}},{key:"reloadAndSync",value:function(t){var e=this.patchControlFor(t),r=this;if(e.reloading)e.outOfDate=!0;else{e.reloading=!0;var n=1e3;!function i(){r.reload(r.store,t,(function(t,r,o){if(t){if(e.downstreamChangeListeners)for(var a=0;a=0))return;c.upstreamCount=0,i.requestDownstreamAction(t,n)}}}(),!0}},{key:"updateMany",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=t.concat(e).map((function(t){return t.why})),n=this,i=[];r.forEach((function(t){i.find((function(e){return e.equals(t)}))||i.push(t)}));var o=i.map((function(r){return n.update(t.filter((function(t){return t.why.equals(r)})),e.filter((function(t){return t.why.equals(r)})))}));return o.length,Promise.all(o)}},{key:"constructSparqlUpdateQuery",value:function(t,e,r){var n=this.contextWhere(r),i="";if(n.length){if(t.length){i+="DELETE { ";for(var o=0;o.\n@prefix ex: .\n\n_:patch\n";return r&&r.length>0&&(i+="\n solid:where {\n ".concat(r.map((function(t){return n.anonymizeNT(t)})).join("\n "),"\n };")),t.length>0&&(i+="\n solid:deletes {\n ".concat(t.map((function(t){return n.anonymizeNT(t)})).join("\n "),"\n };")),e.length>0&&(i+="\n solid:inserts {\n ".concat(e.map((function(t){return n.anonymizeNT(t)})).join("\n "),"\n };")),i+" a solid:InsertDeletePatch .\n"}},{key:"update",value:function(t,e,r,n){var i=this,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};if(!r){var a=this;return new Promise((function(r,i){a.update(t,e,(function(t,e,n){e?r():i(new Error(n))}),n,o)}))}try{var s=this.store,u=t?(0,v.ok)(t)?t.statements:t instanceof Array?t:[t]:[],c=e?(0,v.ok)(e)?e.statements:e instanceof Array?e:[e]:[];if(!(u instanceof Array))throw new Error("Type Error "+(0,d.A)(u)+": "+u);if(!(c instanceof Array))throw new Error("Type Error "+(0,d.A)(c)+": "+c);if(0===u.length&&0===c.length)return r(null,!0);var l=u.length?u[0].graph:c[0].graph;if(!l){var h="Error patching: statement does not specify which document to patch:"+u[0]+", "+c[0];throw new Error(h)}if("NamedNode"!==l.termType){var f="Error patching: document not a NamedNode:"+u[0]+", "+c[0];throw new Error(f)}var p=this.patchControlFor(l),y=Date.now(),g=["subject","predicate","object","why"],m={delete:u,insert:c};["insert","delete"].map((function(t){m[t].map((function(t){if(!l.equals(t.graph))throw new Error("update: destination "+l+" inconsistent with delete quad "+t.graph);g.map((function(e){if(void 0===t[e])throw new Error("update: undefined "+e+" of statement.")}))}))}));var b=this.editable(l.value,s);if(!1===b)throw new Error("Update: Can't make changes in uneditable "+l);if(void 0===b){if(n)throw new Error("Update: Loaded "+l+"but still can't figure out what editing protocol it supports.");return void this.store.fetcher.load(l).then((function(n){i.update(t,e,r,!0,o)}),(function(n){if(404!==n.response.status)throw new Error("Update: Can't get updatability status ".concat(l," before patching: ").concat(n));i.update(t,e,r,!0,o)}))}if(b.indexOf("SPARQL")>=0||b.indexOf("N3PATCH")>=0){var w=b.indexOf("SPARQL")>=0,A=[];u.length&&(A=this.statementArrayBnodes(u)),c.length&&(A=A.concat(this.statementArrayBnodes(c)));var x=this.bnodeContext(A,l),_=w?this.constructSparqlUpdateQuery(u,c,x):this.constructN3PatchQuery(u,c,x);o.contentType=w?"application/sparql-update":"text/n3",p.pendingUpstream=p.pendingUpstream?p.pendingUpstream+1:1,"upstreamCount"in p&&(p.upstreamCount+=1),this.fire(l.value,_,(function(t,e,n,i){if(i.elapsedTimeMs=Date.now()-y,e){try{s.remove(u)}catch(t){e=!1,n="Remote Ok BUT error deleting "+u.length+" from store!!! "+t}for(var o=0;o=0)this.updateDav(l,u,c,r,o);else{if(!(b.indexOf("LOCALFILE")>=0))throw new Error("Unhandled edit method: '"+b+"' for "+l);try{this.updateLocalFile(l,u,c,r,o)}catch(t){r(l.value,!1,"Exception trying to write back file <"+l.value+">\n")}}}catch(t){r(void 0,!1,"Exception in update: "+t+"\n"+Q.stackString(t))}}},{key:"updateDav",value:function(t,e,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=this.store,a=o.any(t,this.ns.link("request"));if(!a)throw new Error("No record of our HTTP GET request for document: "+t);var s=o.any(a,this.ns.link("response"));if(!s)return null;for(var u=o.the(s,this.ns.httph("content-type")).value,c=o.statementsMatching(void 0,void 0,void 0,t).slice(),l=0;l4&&void 0!==arguments[4]?arguments[4]:{},o=this.store,a=o.statementsMatching(void 0,void 0,void 0,t).slice(),s=0;s0&&void 0!==arguments[0]?arguments[0]:void 0,(arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0)||{rdfFactory:re})},lit:function(t,e,r){return this.literal(""+t,e||r)},st:function(t,e,r,n){return this.quad(t,e,r,n)}});const xr=Ar;var _r=function(){return(0,t.A)((function t(r,n){(0,e.A)(this,t),this.parent=r,this.via=n,this.connected=!1,this.pending={},this.subscribed={},this.socket={};try{this.socket=new WebSocket(n),this.socket.onopen=this.onOpen,this.socket.onclose=this.onClose,this.socket.onmessage=this.onMessage,this.socket.onerror=this.onError}catch(t){this.onError(t)}}),[{key:"_decode",value:function(t){var e,r,n,i,o,a,s;for(r in i={},o=function(){var r,n,i,o;for(o=[],r=0,n=(i=t.split("&")).length;r