@noeldemartin/solid-utils 0.1.1-next.3f3913186d2f0057ac597f5ee187ec5132fbeeda → 0.1.1-next.43e8854d84ad29f71c5320cc51f7018a09430819

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,90 @@
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).NoelDeMartinSolidUtils={})}(this,(function(e){"use strict";function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function r(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?t(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function n(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function i(e){return function(){var t=this,r=arguments;return new Promise((function(i,o){var a=e.apply(t,r);function s(e){n(a,i,o,s,u,"next",e)}function u(e){n(a,i,o,s,u,"throw",e)}s(void 0)}))}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),e}function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return h(e)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return d(this,r)}}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,i,o=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}(e,t)||y(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||y(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){if(e){if("string"==typeof e)return m(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(e,t):void 0}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function b(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=y(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},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(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}var x="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function w(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function _(e){var t={exports:{}};return e(t,t.exports),t.exports}var I,S,j=function(e){return e&&e.Math==Math&&e},R=j("object"==typeof globalThis&&globalThis)||j("object"==typeof window&&window)||j("object"==typeof self&&self)||j("object"==typeof x&&x)||function(){return this}()||Function("return this")(),k=function(e){try{return!!e()}catch(e){return!0}},E=!k((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),T=Function.prototype.call,O=T.bind?T.bind(T):function(){return T.apply(T,arguments)},A={}.propertyIsEnumerable,N=Object.getOwnPropertyDescriptor,P=N&&!A.call({1:2},1)?function(e){var t=N(this,e);return!!t&&t.enumerable}:A,L={f:P},C=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},D=Function.prototype,M=D.bind,U=D.call,B=M&&M.bind(U),F=M?function(e){return e&&B(U,e)}:function(e){return e&&function(){return U.apply(e,arguments)}},q=F({}.toString),z=F("".slice),J=function(e){return z(q(e),8,-1)},$=R.Object,G=F("".split),Q=k((function(){return!$("z").propertyIsEnumerable(0)}))?function(e){return"String"==J(e)?G(e,""):$(e)}:$,V=R.TypeError,H=function(e){if(null==e)throw V("Can't call method on "+e);return e},W=function(e){return Q(H(e))},Y=function(e){return"function"==typeof e},K=function(e){return"object"==typeof e?null!==e:Y(e)},X=function(e){return Y(e)?e:void 0},Z=function(e,t){return arguments.length<2?X(R[e]):R[e]&&R[e][t]},ee=F({}.isPrototypeOf),te=Z("navigator","userAgent")||"",re=R.process,ne=R.Deno,ie=re&&re.versions||ne&&ne.version,oe=ie&&ie.v8;oe&&(S=(I=oe.split("."))[0]>0&&I[0]<4?1:+(I[0]+I[1])),!S&&te&&(!(I=te.match(/Edge\/(\d+)/))||I[1]>=74)&&(I=te.match(/Chrome\/(\d+)/))&&(S=+I[1]);var ae=S,se=!!Object.getOwnPropertySymbols&&!k((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ae&&ae<41})),ue=se&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ce=R.Object,le=ue?function(e){return"symbol"==typeof e}:function(e){var t=Z("Symbol");return Y(t)&&ee(t.prototype,ce(e))},fe=R.String,he=function(e){try{return fe(e)}catch(e){return"Object"}},de=R.TypeError,pe=function(e){if(Y(e))return e;throw de(he(e)+" is not a function")},ve=function(e,t){var r=e[t];return null==r?void 0:pe(r)},ge=R.TypeError,ye=!1,me=Object.defineProperty,be=function(e,t){try{me(R,e,{value:t,configurable:!0,writable:!0})}catch(r){R[e]=t}return t},xe="__core-js_shared__",we=R[xe]||be(xe,{}),_e=_((function(e){(e.exports=function(e,t){return we[e]||(we[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),Ie=R.Object,Se=function(e){return Ie(H(e))},je=F({}.hasOwnProperty),Re=Object.hasOwn||function(e,t){return je(Se(e),t)},ke=0,Ee=Math.random(),Te=F(1..toString),Oe=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Te(++ke+Ee,36)},Ae=_e("wks"),Ne=R.Symbol,Pe=Ne&&Ne.for,Le=ue?Ne:Ne&&Ne.withoutSetter||Oe,Ce=function(e){if(!Re(Ae,e)||!se&&"string"!=typeof Ae[e]){var t="Symbol."+e;se&&Re(Ne,e)?Ae[e]=Ne[e]:Ae[e]=ue&&Pe?Pe(t):Le(t)}return Ae[e]},De=R.TypeError,Me=Ce("toPrimitive"),Ue=function(e,t){if(!K(e)||le(e))return e;var r,n=ve(e,Me);if(n){if(void 0===t&&(t="default"),r=O(n,e,t),!K(r)||le(r))return r;throw De("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&Y(r=e.toString)&&!K(n=O(r,e)))return n;if(Y(r=e.valueOf)&&!K(n=O(r,e)))return n;if("string"!==t&&Y(r=e.toString)&&!K(n=O(r,e)))return n;throw ge("Can't convert object to primitive value")}(e,t)},Be=function(e){var t=Ue(e,"string");return le(t)?t:t+""},Fe=R.document,qe=K(Fe)&&K(Fe.createElement),ze=function(e){return qe?Fe.createElement(e):{}},Je=!E&&!k((function(){return 7!=Object.defineProperty(ze("div"),"a",{get:function(){return 7}}).a})),$e=Object.getOwnPropertyDescriptor,Ge=E?$e:function(e,t){if(e=W(e),t=Be(t),Je)try{return $e(e,t)}catch(e){}if(Re(e,t))return C(!O(L.f,e,t),e[t])},Qe={f:Ge},Ve=R.String,He=R.TypeError,We=function(e){if(K(e))return e;throw He(Ve(e)+" is not an object")},Ye=R.TypeError,Ke=Object.defineProperty,Xe=E?Ke:function(e,t,r){if(We(e),t=Be(t),We(r),Je)try{return Ke(e,t,r)}catch(e){}if("get"in r||"set"in r)throw Ye("Accessors not supported");return"value"in r&&(e[t]=r.value),e},Ze={f:Xe},et=E?function(e,t,r){return Ze.f(e,t,C(1,r))}:function(e,t,r){return e[t]=r,e},tt=F(Function.toString);Y(we.inspectSource)||(we.inspectSource=function(e){return tt(e)});var rt,nt,it,ot=we.inspectSource,at=R.WeakMap,st=Y(at)&&/native code/.test(ot(at)),ut=_e("keys"),ct=function(e){return ut[e]||(ut[e]=Oe(e))},lt={},ft="Object already initialized",ht=R.TypeError,dt=R.WeakMap;if(st||we.state){var pt=we.state||(we.state=new dt),vt=F(pt.get),gt=F(pt.has),yt=F(pt.set);rt=function(e,t){if(gt(pt,e))throw new ht(ft);return t.facade=e,yt(pt,e,t),t},nt=function(e){return vt(pt,e)||{}},it=function(e){return gt(pt,e)}}else{var mt=ct("state");lt[mt]=!0,rt=function(e,t){if(Re(e,mt))throw new ht(ft);return t.facade=e,et(e,mt,t),t},nt=function(e){return Re(e,mt)?e[mt]:{}},it=function(e){return Re(e,mt)}}var bt={set:rt,get:nt,has:it,enforce:function(e){return it(e)?nt(e):rt(e,{})},getterFor:function(e){return function(t){var r;if(!K(t)||(r=nt(t)).type!==e)throw ht("Incompatible receiver, "+e+" required");return r}}},xt=Function.prototype,wt=E&&Object.getOwnPropertyDescriptor,_t=Re(xt,"name"),It={EXISTS:_t,PROPER:_t&&"something"===function(){}.name,CONFIGURABLE:_t&&(!E||E&&wt(xt,"name").configurable)},St=_((function(e){var t=It.CONFIGURABLE,r=bt.get,n=bt.enforce,i=String(String).split("String");(e.exports=function(e,r,o,a){var s,u=!!a&&!!a.unsafe,c=!!a&&!!a.enumerable,l=!!a&&!!a.noTargetGet,f=a&&void 0!==a.name?a.name:r;Y(o)&&("Symbol("===String(f).slice(0,7)&&(f="["+String(f).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Re(o,"name")||t&&o.name!==f)&&et(o,"name",f),(s=n(o)).source||(s.source=i.join("string"==typeof f?f:""))),e!==R?(u?!l&&e[r]&&(c=!0):delete e[r],c?e[r]=o:et(e,r,o)):c?e[r]=o:be(r,o)})(Function.prototype,"toString",(function(){return Y(this)&&r(this).source||ot(this)}))})),jt=Math.ceil,Rt=Math.floor,kt=function(e){var t=+e;return t!=t||0===t?0:(t>0?Rt:jt)(t)},Et=Math.max,Tt=Math.min,Ot=function(e,t){var r=kt(e);return r<0?Et(r+t,0):Tt(r,t)},At=Math.min,Nt=function(e){return e>0?At(kt(e),9007199254740991):0},Pt=function(e){return Nt(e.length)},Lt=function(e){return function(t,r,n){var i,o=W(t),a=Pt(o),s=Ot(n,a);if(e&&r!=r){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===r)return e||s||0;return!e&&-1}},Ct={includes:Lt(!0),indexOf:Lt(!1)},Dt=Ct.indexOf,Mt=F([].push),Ut=function(e,t){var r,n=W(e),i=0,o=[];for(r in n)!Re(lt,r)&&Re(n,r)&&Mt(o,r);for(;t.length>i;)Re(n,r=t[i++])&&(~Dt(o,r)||Mt(o,r));return o},Bt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ft=Bt.concat("length","prototype"),qt=Object.getOwnPropertyNames||function(e){return Ut(e,Ft)},zt={f:qt},Jt={f:Object.getOwnPropertySymbols},$t=F([].concat),Gt=Z("Reflect","ownKeys")||function(e){var t=zt.f(We(e)),r=Jt.f;return r?$t(t,r(e)):t},Qt=function(e,t){for(var r=Gt(t),n=Ze.f,i=Qe.f,o=0;o<r.length;o++){var a=r[o];Re(e,a)||n(e,a,i(t,a))}},Vt=/#|\.prototype\./,Ht=function(e,t){var r=Yt[Wt(e)];return r==Xt||r!=Kt&&(Y(t)?k(t):!!t)},Wt=Ht.normalize=function(e){return String(e).replace(Vt,".").toLowerCase()},Yt=Ht.data={},Kt=Ht.NATIVE="N",Xt=Ht.POLYFILL="P",Zt=Ht,er=Qe.f,tr=function(e,t){var r,n,i,o,a,s=e.target,u=e.global,c=e.stat;if(r=u?R:c?R[s]||be(s,{}):(R[s]||{}).prototype)for(n in t){if(o=t[n],i=e.noTargetGet?(a=er(r,n))&&a.value:r[n],!Zt(u?n:s+(c?".":"#")+n,e.forced)&&void 0!==i){if(typeof o==typeof i)continue;Qt(o,i)}(e.sham||i&&i.sham)&&et(o,"sham",!0),St(r,n,o,e)}},rr=Array.isArray||function(e){return"Array"==J(e)},nr=function(e,t,r){var n=Be(t);n in e?Ze.f(e,n,C(0,r)):e[n]=r},ir={};ir[Ce("toStringTag")]="z";var or="[object z]"===String(ir),ar=Ce("toStringTag"),sr=R.Object,ur="Arguments"==J(function(){return arguments}()),cr=or?J:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=sr(e),ar))?r:ur?J(t):"Object"==(n=J(t))&&Y(t.callee)?"Arguments":n},lr=function(){},fr=[],hr=Z("Reflect","construct"),dr=/^\s*(?:class|function)\b/,pr=F(dr.exec),vr=!dr.exec(lr),gr=function(e){if(!Y(e))return!1;try{return hr(lr,fr,e),!0}catch(e){return!1}},yr=!hr||k((function(){var e;return gr(gr.call)||!gr(Object)||!gr((function(){e=!0}))||e}))?function(e){if(!Y(e))return!1;switch(cr(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return vr||!!pr(dr,ot(e))}:gr,mr=Ce("species"),br=R.Array,xr=function(e,t){return new(function(e){var t;return rr(e)&&(t=e.constructor,(yr(t)&&(t===br||rr(t.prototype))||K(t)&&null===(t=t[mr]))&&(t=void 0)),void 0===t?br:t}(e))(0===t?0:t)},wr=Ce("species"),_r=function(e){return ae>=51||!k((function(){var t=[];return(t.constructor={})[wr]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Ir=Ce("isConcatSpreadable"),Sr=9007199254740991,jr="Maximum allowed index exceeded",Rr=R.TypeError,kr=ae>=51||!k((function(){var e=[];return e[Ir]=!1,e.concat()[0]!==e})),Er=_r("concat"),Tr=function(e){if(!K(e))return!1;var t=e[Ir];return void 0!==t?!!t:rr(e)};tr({target:"Array",proto:!0,forced:!kr||!Er},{concat:function(e){var t,r,n,i,o,a=Se(this),s=xr(a,0),u=0;for(t=-1,n=arguments.length;t<n;t++)if(Tr(o=-1===t?a:arguments[t])){if(u+(i=Pt(o))>Sr)throw Rr(jr);for(r=0;r<i;r++,u++)r in o&&nr(s,u,o[r])}else{if(u>=Sr)throw Rr(jr);nr(s,u++,o)}return s.length=u,s}});var Or=or?{}.toString:function(){return"[object "+cr(this)+"]"};or||St(Object.prototype,"toString",Or,{unsafe:!0});var Ar=Z("Promise"),Nr=R.TypeError;tr({target:"AsyncIterator",proto:!0,real:!0},{reduce:function(e){var t=We(this),r=pe(t.next),n=arguments.length<2,i=n?void 0:arguments[1];return pe(e),new Ar((function(o,a){var s=function(){try{Ar.resolve(We(O(r,t))).then((function(t){try{if(We(t).done)n?a(Nr("Reduce of empty iterator with no initial value")):o(i);else{var r=t.value;n?(n=!1,i=r,s()):Ar.resolve(e(i,r)).then((function(e){i=e,s()}),a)}}catch(e){a(e)}}),a)}catch(e){a(e)}};s()}))}});var Pr,Lr=R.TypeError,Cr=function(e,t){if(ee(t,e))return e;throw Lr("Incorrect invocation")},Dr=Object.keys||function(e){return Ut(e,Bt)},Mr=E?Object.defineProperties:function(e,t){We(e);for(var r,n=W(t),i=Dr(t),o=i.length,a=0;o>a;)Ze.f(e,r=i[a++],n[r]);return e},Ur=Z("document","documentElement"),Br=ct("IE_PROTO"),Fr=function(){},qr=function(e){return"<script>"+e+"</"+"script>"},zr=function(e){e.write(qr("")),e.close();var t=e.parentWindow.Object;return e=null,t},Jr=function(){try{Pr=new ActiveXObject("htmlfile")}catch(e){}var e,t;Jr="undefined"!=typeof document?document.domain&&Pr?zr(Pr):((t=ze("iframe")).style.display="none",Ur.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(qr("document.F=Object")),e.close(),e.F):zr(Pr);for(var r=Bt.length;r--;)delete Jr.prototype[Bt[r]];return Jr()};lt[Br]=!0;var $r,Gr,Qr,Vr=Object.create||function(e,t){var r;return null!==e?(Fr.prototype=We(e),r=new Fr,Fr.prototype=null,r[Br]=e):r=Jr(),void 0===t?r:Mr(r,t)},Hr=!k((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Wr=ct("IE_PROTO"),Yr=R.Object,Kr=Yr.prototype,Xr=Hr?Yr.getPrototypeOf:function(e){var t=Se(e);if(Re(t,Wr))return t[Wr];var r=t.constructor;return Y(r)&&t instanceof r?r.prototype:t instanceof Yr?Kr:null},Zr=Ce("iterator"),en=!1;[].keys&&("next"in(Qr=[].keys())?(Gr=Xr(Xr(Qr)))!==Object.prototype&&($r=Gr):en=!0);var tn=null==$r||k((function(){var e={};return $r[Zr].call(e)!==e}));tn&&($r={}),Y($r[Zr])||St($r,Zr,(function(){return this}));var rn={IteratorPrototype:$r,BUGGY_SAFARI_ITERATORS:en},nn=rn.IteratorPrototype,on=Ce("toStringTag"),an=R.Iterator,sn=!Y(an)||an.prototype!==nn||!k((function(){an({})})),un=function(){Cr(this,nn)};Re(nn,on)||et(nn,on,"Iterator"),!sn&&Re(nn,"constructor")&&nn.constructor!==Object||et(nn,"constructor",un),un.prototype=nn,tr({global:!0,forced:sn},{Iterator:un});var cn=F(F.bind),ln=function(e,t){return pe(e),void 0===t?e:cn?cn(e,t):function(){return e.apply(t,arguments)}},fn={},hn=Ce("iterator"),dn=Array.prototype,pn=function(e){return void 0!==e&&(fn.Array===e||dn[hn]===e)},vn=Ce("iterator"),gn=function(e){if(null!=e)return ve(e,vn)||ve(e,"@@iterator")||fn[cr(e)]},yn=R.TypeError,mn=function(e,t){var r=arguments.length<2?gn(e):t;if(pe(r))return We(O(r,e));throw yn(he(e)+" is not iterable")},bn=function(e,t,r){var n,i;We(e);try{if(!(n=ve(e,"return"))){if("throw"===t)throw r;return r}n=O(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return We(n),r},xn=R.TypeError,wn=function(e,t){this.stopped=e,this.result=t},_n=wn.prototype,In=function(e,t,r){var n,i,o,a,s,u,c,l=r&&r.that,f=!(!r||!r.AS_ENTRIES),h=!(!r||!r.IS_ITERATOR),d=!(!r||!r.INTERRUPTED),p=ln(t,l),v=function(e){return n&&bn(n,"normal",e),new wn(!0,e)},g=function(e){return f?(We(e),d?p(e[0],e[1],v):p(e[0],e[1])):d?p(e,v):p(e)};if(h)n=e;else{if(!(i=gn(e)))throw xn(he(e)+" is not iterable");if(pn(i)){for(o=0,a=Pt(e);a>o;o++)if((s=g(e[o]))&&ee(_n,s))return s;return new wn(!1)}n=mn(e,i)}for(u=n.next;!(c=O(u,n)).done;){try{s=g(c.value)}catch(e){bn(n,"throw",e)}if("object"==typeof s&&s&&ee(_n,s))return s}return new wn(!1)},Sn=R.TypeError;tr({target:"Iterator",proto:!0,real:!0},{reduce:function(e){We(this),pe(e);var t=arguments.length<2,r=t?void 0:arguments[1];if(In(this,(function(n){t?(t=!1,r=n):r=e(r,n)}),{IS_ITERATOR:!0}),t)throw Sn("Reduce of empty iterator with no initial value");return r}});var jn=Ze.f,Rn=Ce("toStringTag"),kn=function(e,t,r){e&&!Re(e=r?e:e.prototype,Rn)&&jn(e,Rn,{configurable:!0,value:t})};tr({global:!0},{Reflect:{}}),kn(R.Reflect,"Reflect",!0);var En=Function.prototype,Tn=En.apply,On=En.bind,An=En.call,Nn="object"==typeof Reflect&&Reflect.apply||(On?An.bind(Tn):function(){return An.apply(Tn,arguments)}),Pn=F([].slice),Ln=R.Function,Cn=F([].concat),Dn=F([].join),Mn={},Un=function(e,t,r){if(!Re(Mn,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";Mn[t]=Ln("C,a","return new C("+Dn(n,",")+")")}return Mn[t](e,r)},Bn=Ln.bind||function(e){var t=pe(this),r=t.prototype,n=Pn(arguments,1),i=function(){var r=Cn(n,Pn(arguments));return this instanceof i?Un(t,r.length,r):t.apply(e,r)};return K(r)&&(i.prototype=r),i},Fn=R.TypeError,qn=function(e){if(yr(e))return e;throw Fn(he(e)+" is not a constructor")},zn=Z("Reflect","construct"),Jn=Object.prototype,$n=[].push,Gn=k((function(){function e(){}return!(zn((function(){}),[],e)instanceof e)})),Qn=!k((function(){zn((function(){}))})),Vn=Gn||Qn;function Hn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yn(e,t){return Yn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Yn(e,t)}function Kn(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Yn(e,t)}tr({target:"Reflect",stat:!0,forced:Vn,sham:Vn},{construct:function(e,t){qn(e),We(t);var r=arguments.length<3?e:qn(arguments[2]);if(Qn&&!Gn)return zn(e,t,r);if(e==r){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var n=[null];return Nn($n,n,t),new(Nn(Bn,e,n))}var i=r.prototype,o=Vr(K(i)?i:Jn),a=Nn(e,o,t);return K(a)?a:o}});var Xn=_((function(e){function t(r){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=t=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),t(r)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0})),Zn=w(Xn);function ei(e,t){if(t&&("object"===Zn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Wn(e)}function ti(e){return ti=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ti(e)}var ri=It.EXISTS,ni=Ze.f,ii=Function.prototype,oi=F(ii.toString),ai=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,si=F(ai.exec);function ui(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ci(e,t,r){return t&&ui(e.prototype,t),r&&ui(e,r),e}function li(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}E&&!ri&&ni(ii,"name",{configurable:!0,get:function(){try{return si(ai,oi(this))[1]}catch(e){return""}}}),tr({global:!0},{globalThis:R});var fi=function(e){return void 0!==e&&(Re(e,"value")||Re(e,"writable"))};tr({target:"Reflect",stat:!0},{get:function e(t,r){var n,i,o=arguments.length<3?t:arguments[2];return We(t)===o?t[r]:(n=Qe.f(t,r))?fi(n)?n.value:void 0===n.get?void 0:O(n.get,o):K(i=Xr(t))?e(i,r,o):void 0}});var hi=k((function(){var e=function(){},t=Ze.f(new e,"a",{configurable:!0});return!1!==Reflect.set(e.prototype,"a",1,t)}));tr({target:"Reflect",stat:!0,forced:hi},{set:function e(t,r,n){var i,o,a,s=arguments.length<4?t:arguments[3],u=Qe.f(We(t),r);if(!u){if(K(o=Xr(t)))return e(o,r,n,s);u=C(0)}if(fi(u)){if(!1===u.writable||!K(s))return!1;if(i=Qe.f(s,r)){if(i.get||i.set||!1===i.writable)return!1;i.value=n,Ze.f(s,r,i)}else Ze.f(s,r,C(0,n))}else{if(void 0===(a=u.set))return!1;O(a,s,n)}return!0}});var di=Qe.f;tr({target:"Reflect",stat:!0},{deleteProperty:function(e,t){var r=di(We(e),t);return!(r&&!r.configurable)&&delete e[t]}});var pi=Ce("unscopables"),vi=Array.prototype;null==vi[pi]&&Ze.f(vi,pi,{configurable:!0,value:Vr(null)});var gi=function(e){vi[pi][e]=!0},yi=rn.IteratorPrototype,mi=function(){return this},bi=function(e,t,r,n){var i=t+" Iterator";return e.prototype=Vr(yi,{next:C(+!n,r)}),kn(e,i,!1),fn[i]=mi,e},xi=R.String,wi=R.TypeError,_i=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=F(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return We(r),function(e){if("object"==typeof e||Y(e))return e;throw wi("Can't set "+xi(e)+" as a prototype")}(n),t?e(r,n):r.__proto__=n,r}}():void 0),Ii=It.PROPER,Si=It.CONFIGURABLE,ji=rn.IteratorPrototype,Ri=rn.BUGGY_SAFARI_ITERATORS,ki=Ce("iterator"),Ei="keys",Ti="values",Oi="entries",Ai=function(){return this},Ni=function(e,t,r,n,i,o,a){bi(r,t,n);var s,u,c,l=function(e){if(e===i&&v)return v;if(!Ri&&e in d)return d[e];switch(e){case Ei:case Ti:case Oi:return function(){return new r(this,e)}}return function(){return new r(this)}},f=t+" Iterator",h=!1,d=e.prototype,p=d[ki]||d["@@iterator"]||i&&d[i],v=!Ri&&p||l(i),g="Array"==t&&d.entries||p;if(g&&(s=Xr(g.call(new e)))!==Object.prototype&&s.next&&(Xr(s)!==ji&&(_i?_i(s,ji):Y(s[ki])||St(s,ki,Ai)),kn(s,f,!0)),Ii&&i==Ti&&p&&p.name!==Ti&&(Si?et(d,"name",Ti):(h=!0,v=function(){return O(p,this)})),i)if(u={values:l(Ti),keys:o?v:l(Ei),entries:l(Oi)},a)for(c in u)(Ri||h||!(c in d))&&St(d,c,u[c]);else tr({target:t,proto:!0,forced:Ri||h},u);return d[ki]!==v&&St(d,ki,v,{name:i}),fn[t]=v,u},Pi="Array Iterator",Li=bt.set,Ci=bt.getterFor(Pi),Di=Ni(Array,"Array",(function(e,t){Li(this,{type:Pi,target:W(e),index:0,kind:t})}),(function(){var e=Ci(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}}),"values");fn.Arguments=fn.Array,gi("keys"),gi("values"),gi("entries");var Mi=R.Array,Ui=Math.max,Bi=function(e,t,r){for(var n=Pt(e),i=Ot(t,n),o=Ot(void 0===r?n:r,n),a=Mi(Ui(o-i,0)),s=0;i<o;i++,s++)nr(a,s,e[i]);return a.length=s,a},Fi=zt.f,qi="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],zi={f:function(e){return qi&&"Window"==J(e)?function(e){try{return Fi(e)}catch(e){return Bi(qi)}}(e):Fi(W(e))}},Ji=k((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),$i=Object.isExtensible,Gi=k((function(){$i(1)}))||Ji?function(e){return!!K(e)&&((!Ji||"ArrayBuffer"!=J(e))&&(!$i||$i(e)))}:$i,Qi=!k((function(){return Object.isExtensible(Object.preventExtensions({}))})),Vi=_((function(e){var t=Ze.f,r=!1,n=Oe("meta"),i=0,o=function(e){t(e,n,{value:{objectID:"O"+i++,weakData:{}}})},a=e.exports={enable:function(){a.enable=function(){},r=!0;var e=zt.f,t=F([].splice),i={};i[n]=1,e(i).length&&(zt.f=function(r){for(var i=e(r),o=0,a=i.length;o<a;o++)if(i[o]===n){t(i,o,1);break}return i},tr({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:zi.f}))},fastKey:function(e,t){if(!K(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!Re(e,n)){if(!Gi(e))return"F";if(!t)return"E";o(e)}return e[n].objectID},getWeakData:function(e,t){if(!Re(e,n)){if(!Gi(e))return!0;if(!t)return!1;o(e)}return e[n].weakData},onFreeze:function(e){return Qi&&r&&Gi(e)&&!Re(e,n)&&o(e),e}};lt[n]=!0})),Hi=Ce("iterator"),Wi=!1;try{var Yi=0,Ki={next:function(){return{done:!!Yi++}},return:function(){Wi=!0}};Ki[Hi]=function(){return this},Array.from(Ki,(function(){throw 2}))}catch(e){}var Xi=function(e,t){if(!t&&!Wi)return!1;var r=!1;try{var n={};n[Hi]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},Zi=function(e,t,r){var n,i;return _i&&Y(n=t.constructor)&&n!==r&&K(i=n.prototype)&&i!==r.prototype&&_i(e,i),e},eo=function(e,t,r){var n=-1!==e.indexOf("Map"),i=-1!==e.indexOf("Weak"),o=n?"set":"add",a=R[e],s=a&&a.prototype,u=a,c={},l=function(e){var t=F(s[e]);St(s,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(i&&!K(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return i&&!K(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(i&&!K(e))&&t(this,0===e?0:e)}:function(e,r){return t(this,0===e?0:e,r),this})};if(Zt(e,!Y(a)||!(i||s.forEach&&!k((function(){(new a).entries().next()})))))u=r.getConstructor(t,e,n,o),Vi.enable();else if(Zt(e,!0)){var f=new u,h=f[o](i?{}:-0,1)!=f,d=k((function(){f.has(1)})),p=Xi((function(e){new a(e)})),v=!i&&k((function(){for(var e=new a,t=5;t--;)e[o](t,t);return!e.has(-0)}));p||((u=t((function(e,t){Cr(e,s);var r=Zi(new a,e,u);return null!=t&&In(t,r[o],{that:r,AS_ENTRIES:n}),r}))).prototype=s,s.constructor=u),(d||v)&&(l("delete"),l("has"),n&&l("get")),(v||h)&&l(o),i&&s.clear&&delete s.clear}return c[e]=u,tr({global:!0,forced:u!=a},c),kn(u,e),i||r.setStrong(u,e,n),u},to=function(e,t,r){for(var n in t)St(e,n,t[n],r);return e},ro=Ce("species"),no=function(e){var t=Z(e),r=Ze.f;E&&t&&!t[ro]&&r(t,ro,{configurable:!0,get:function(){return this}})},io=Ze.f,oo=Vi.fastKey,ao=bt.set,so=bt.getterFor,uo={getConstructor:function(e,t,r,n){var i=e((function(e,i){Cr(e,o),ao(e,{type:t,index:Vr(null),first:void 0,last:void 0,size:0}),E||(e.size=0),null!=i&&In(i,e[n],{that:e,AS_ENTRIES:r})})),o=i.prototype,a=so(t),s=function(e,t,r){var n,i,o=a(e),s=u(e,t);return s?s.value=r:(o.last=s={index:i=oo(t,!0),key:t,value:r,previous:n=o.last,next:void 0,removed:!1},o.first||(o.first=s),n&&(n.next=s),E?o.size++:e.size++,"F"!==i&&(o.index[i]=s)),e},u=function(e,t){var r,n=a(e),i=oo(t);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key==t)return r};return to(o,{clear:function(){for(var e=a(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,E?e.size=0:this.size=0},delete:function(e){var t=this,r=a(t),n=u(t,e);if(n){var i=n.next,o=n.previous;delete r.index[n.index],n.removed=!0,o&&(o.next=i),i&&(i.previous=o),r.first==n&&(r.first=i),r.last==n&&(r.last=o),E?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=a(this),n=ln(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!u(this,e)}}),to(o,r?{get:function(e){var t=u(this,e);return t&&t.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),E&&io(o,"size",{get:function(){return a(this).size}}),i},setStrong:function(e,t,r){var n=t+" Iterator",i=so(t),o=so(n);Ni(e,t,(function(e,t){ao(this,{type:n,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?"keys"==t?{value:r.key,done:!1}:"values"==t?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),r?"entries":"values",!r,!0),no(t)}};eo("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),uo);var co=R.String,lo=function(e){if("Symbol"===cr(e))throw TypeError("Cannot convert a Symbol value to a string");return co(e)},fo=F("".charAt),ho=F("".charCodeAt),po=F("".slice),vo=function(e){return function(t,r){var n,i,o=lo(H(t)),a=kt(r),s=o.length;return a<0||a>=s?e?"":void 0:(n=ho(o,a))<55296||n>56319||a+1===s||(i=ho(o,a+1))<56320||i>57343?e?fo(o,a):n:e?po(o,a,a+2):i-56320+(n-55296<<10)+65536}},go={codeAt:vo(!1),charAt:vo(!0)},yo=go.charAt,mo="String Iterator",bo=bt.set,xo=bt.getterFor(mo);Ni(String,"String",(function(e){bo(this,{type:mo,string:lo(e),index:0})}),(function(){var e,t=xo(this),r=t.string,n=t.index;return n>=r.length?{value:void 0,done:!0}:(e=yo(r,n),t.index+=e.length,{value:e,done:!1})}));tr({target:"Set",proto:!0,real:!0,forced:ye},{addAll:function(){for(var e=We(this),t=pe(e.add),r=0,n=arguments.length;r<n;r++)O(t,e,arguments[r]);return e}});var wo=function(){for(var e,t=We(this),r=pe(t.delete),n=!0,i=0,o=arguments.length;i<o;i++)e=O(r,t,arguments[i]),n=n&&e;return!!n};tr({target:"Set",proto:!0,real:!0,forced:ye},{deleteAll:wo});var _o=Ce("species"),Io=function(e,t){var r,n=We(e).constructor;return void 0===n||null==(r=We(n)[_o])?t:qn(r)};tr({target:"Set",proto:!0,real:!0,forced:ye},{difference:function(e){var t=We(this),r=new(Io(t,Z("Set")))(t),n=pe(r.delete);return In(e,(function(e){O(n,r,e)})),r}});var So=function(e){return O(Set.prototype.values,e)};tr({target:"Set",proto:!0,real:!0,forced:ye},{every:function(e){var t=We(this),r=So(t),n=ln(e,arguments.length>1?arguments[1]:void 0);return!In(r,(function(e,r){if(!n(e,e,t))return r()}),{IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}}),tr({target:"Set",proto:!0,real:!0,forced:ye},{filter:function(e){var t=We(this),r=So(t),n=ln(e,arguments.length>1?arguments[1]:void 0),i=new(Io(t,Z("Set"))),o=pe(i.add);return In(r,(function(e){n(e,e,t)&&O(o,i,e)}),{IS_ITERATOR:!0}),i}}),tr({target:"Set",proto:!0,real:!0,forced:ye},{find:function(e){var t=We(this),r=So(t),n=ln(e,arguments.length>1?arguments[1]:void 0);return In(r,(function(e,r){if(n(e,e,t))return r(e)}),{IS_ITERATOR:!0,INTERRUPTED:!0}).result}}),tr({target:"Set",proto:!0,real:!0,forced:ye},{intersection:function(e){var t=We(this),r=new(Io(t,Z("Set"))),n=pe(t.has),i=pe(r.add);return In(e,(function(e){O(n,t,e)&&O(i,r,e)})),r}}),tr({target:"Set",proto:!0,real:!0,forced:ye},{isDisjointFrom:function(e){var t=We(this),r=pe(t.has);return!In(e,(function(e,n){if(!0===O(r,t,e))return n()}),{INTERRUPTED:!0}).stopped}}),tr({target:"Set",proto:!0,real:!0,forced:ye},{isSubsetOf:function(e){var t=mn(this),r=We(e),n=r.has;return Y(n)||(r=new(Z("Set"))(e),n=pe(r.has)),!In(t,(function(e,t){if(!1===O(n,r,e))return t()}),{IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}}),tr({target:"Set",proto:!0,real:!0,forced:ye},{isSupersetOf:function(e){var t=We(this),r=pe(t.has);return!In(e,(function(e,n){if(!1===O(r,t,e))return n()}),{INTERRUPTED:!0}).stopped}});var jo=F([].join),Ro=[].push;tr({target:"Set",proto:!0,real:!0,forced:ye},{join:function(e){var t=We(this),r=So(t),n=void 0===e?",":lo(e),i=[];return In(r,Ro,{that:i,IS_ITERATOR:!0}),jo(i,n)}}),tr({target:"Set",proto:!0,real:!0,forced:ye},{map:function(e){var t=We(this),r=So(t),n=ln(e,arguments.length>1?arguments[1]:void 0),i=new(Io(t,Z("Set"))),o=pe(i.add);return In(r,(function(e){O(o,i,n(e,e,t))}),{IS_ITERATOR:!0}),i}});var ko=R.TypeError;tr({target:"Set",proto:!0,real:!0,forced:ye},{reduce:function(e){var t=We(this),r=So(t),n=arguments.length<2,i=n?void 0:arguments[1];if(pe(e),In(r,(function(r){n?(n=!1,i=r):i=e(i,r,r,t)}),{IS_ITERATOR:!0}),n)throw ko("Reduce of empty set with no initial value");return i}}),tr({target:"Set",proto:!0,real:!0,forced:ye},{some:function(e){var t=We(this),r=So(t),n=ln(e,arguments.length>1?arguments[1]:void 0);return In(r,(function(e,r){if(n(e,e,t))return r()}),{IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}}),tr({target:"Set",proto:!0,real:!0,forced:ye},{symmetricDifference:function(e){var t=We(this),r=new(Io(t,Z("Set")))(t),n=pe(r.delete),i=pe(r.add);return In(e,(function(e){O(n,r,e)||O(i,r,e)})),r}}),tr({target:"Set",proto:!0,real:!0,forced:ye},{union:function(e){var t=We(this),r=new(Io(t,Z("Set")))(t);return In(e,pe(r.add),{that:r}),r}});var Eo={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},To=ze("span").classList,Oo=To&&To.constructor&&To.constructor.prototype,Ao=Oo===Object.prototype?void 0:Oo,No=Ce("iterator"),Po=Ce("toStringTag"),Lo=Di.values,Co=function(e,t){if(e){if(e[No]!==Lo)try{et(e,No,Lo)}catch(t){e[No]=Lo}if(e[Po]||et(e,Po,t),Eo[t])for(var r in Di)if(e[r]!==Di[r])try{et(e,r,Di[r])}catch(t){e[r]=Di[r]}}};for(var Do in Eo)Co(R[Do]&&R[Do].prototype,Do);Co(Ao,"DOMTokenList");var Mo=zi.f,Uo=k((function(){return!Object.getOwnPropertyNames(1)}));tr({target:"Object",stat:!0,forced:Uo},{getOwnPropertyNames:Mo});var Bo=F([].push),Fo=function(e){var t=1==e,r=2==e,n=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(u,c,l,f){for(var h,d,p=Se(u),v=Q(p),g=ln(c,l),y=Pt(v),m=0,b=f||xr,x=t?b(u,y):r||a?b(u,0):void 0;y>m;m++)if((s||m in v)&&(d=g(h=v[m],m,p),e))if(t)x[m]=d;else if(d)switch(e){case 3:return!0;case 5:return h;case 6:return m;case 2:Bo(x,h)}else switch(e){case 4:return!1;case 7:Bo(x,h)}return o?-1:n||i?i:x}},qo={forEach:Fo(0),map:Fo(1),filter:Fo(2),some:Fo(3),every:Fo(4),find:Fo(5),findIndex:Fo(6),filterReject:Fo(7)},zo=Vi.getWeakData,Jo=bt.set,$o=bt.getterFor,Go=qo.find,Qo=qo.findIndex,Vo=F([].splice),Ho=0,Wo=function(e){return e.frozen||(e.frozen=new Yo)},Yo=function(){this.entries=[]},Ko=function(e,t){return Go(e.entries,(function(e){return e[0]===t}))};Yo.prototype={get:function(e){var t=Ko(this,e);if(t)return t[1]},has:function(e){return!!Ko(this,e)},set:function(e,t){var r=Ko(this,e);r?r[1]=t:this.entries.push([e,t])},delete:function(e){var t=Qo(this.entries,(function(t){return t[0]===e}));return~t&&Vo(this.entries,t,1),!!~t}};var Xo,Zo={getConstructor:function(e,t,r,n){var i=e((function(e,i){Cr(e,o),Jo(e,{type:t,id:Ho++,frozen:void 0}),null!=i&&In(i,e[n],{that:e,AS_ENTRIES:r})})),o=i.prototype,a=$o(t),s=function(e,t,r){var n=a(e),i=zo(We(t),!0);return!0===i?Wo(n).set(t,r):i[n.id]=r,e};return to(o,{delete:function(e){var t=a(this);if(!K(e))return!1;var r=zo(e);return!0===r?Wo(t).delete(e):r&&Re(r,t.id)&&delete r[t.id]},has:function(e){var t=a(this);if(!K(e))return!1;var r=zo(e);return!0===r?Wo(t).has(e):r&&Re(r,t.id)}}),to(o,r?{get:function(e){var t=a(this);if(K(e)){var r=zo(e);return!0===r?Wo(t).get(e):r?r[t.id]:void 0}},set:function(e,t){return s(this,e,t)}}:{add:function(e){return s(this,e,!0)}}),i}},ea=bt.enforce,ta=!R.ActiveXObject&&"ActiveXObject"in R,ra=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},na=eo("WeakMap",ra,Zo);if(st&&ta){Xo=Zo.getConstructor(ra,"WeakMap",!0),Vi.enable();var ia=na.prototype,oa=F(ia.delete),aa=F(ia.has),sa=F(ia.get),ua=F(ia.set);to(ia,{delete:function(e){if(K(e)&&!Gi(e)){var t=ea(this);return t.frozen||(t.frozen=new Xo),oa(this,e)||t.frozen.delete(e)}return oa(this,e)},has:function(e){if(K(e)&&!Gi(e)){var t=ea(this);return t.frozen||(t.frozen=new Xo),aa(this,e)||t.frozen.has(e)}return aa(this,e)},get:function(e){if(K(e)&&!Gi(e)){var t=ea(this);return t.frozen||(t.frozen=new Xo),aa(this,e)?sa(this,e):t.frozen.get(e)}return sa(this,e)},set:function(e,t){if(K(e)&&!Gi(e)){var r=ea(this);r.frozen||(r.frozen=new Xo),aa(this,e)?ua(this,e,t):r.frozen.set(e,t)}else ua(this,e,t);return this}})}tr({target:"WeakMap",proto:!0,real:!0,forced:ye},{deleteAll:wo});var ca=function(e,t){var r=We(this),n=pe(r.get),i=pe(r.has),o=pe(r.set),a=O(i,r,e)&&"update"in t?t.update(O(n,r,e),e,r):t.insert(e,r);return O(o,r,e,a),a};tr({target:"WeakMap",proto:!0,real:!0,forced:ye},{emplace:ca});var la=_r("slice"),fa=Ce("species"),ha=R.Array,da=Math.max;tr({target:"Array",proto:!0,forced:!la},{slice:function(e,t){var r,n,i,o=W(this),a=Pt(o),s=Ot(e,a),u=Ot(void 0===t?a:t,a);if(rr(o)&&(r=o.constructor,(yr(r)&&(r===ha||rr(r.prototype))||K(r)&&null===(r=r[fa]))&&(r=void 0),r===ha||void 0===r))return Pn(o,s,u);for(n=new(void 0===r?ha:r)(da(u-s,0)),i=0;s<u;s++,i++)s in o&&nr(n,i,o[s]);return n.length=i,n}});var pa=function(e,t,r,n){try{return n?t(We(r)[0],r[1]):t(r)}catch(t){bn(e,"throw",t)}},va=R.Array,ga=function(e){var t=Se(e),r=yr(this),n=arguments.length,i=n>1?arguments[1]:void 0,o=void 0!==i;o&&(i=ln(i,n>2?arguments[2]:void 0));var a,s,u,c,l,f,h=gn(t),d=0;if(!h||this==va&&pn(h))for(a=Pt(t),s=r?new this(a):va(a);a>d;d++)f=o?i(t[d],d):t[d],nr(s,d,f);else for(l=(c=mn(t,h)).next,s=r?new this:[];!(u=O(l,c)).done;d++)f=o?pa(c,i,[u.value,d],!0):u.value,nr(s,d,f);return s.length=d,s},ya=!Xi((function(e){Array.from(e)}));tr({target:"Array",stat:!0,forced:ya},{from:ga});var ma=function(){var e=We(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},ba=R.RegExp,xa=k((function(){var e=ba("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),wa=xa||k((function(){return!ba("a","y").sticky})),_a=xa||k((function(){var e=ba("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),Ia={BROKEN_CARET:_a,MISSED_STICKY:wa,UNSUPPORTED_Y:xa},Sa=R.RegExp,ja=k((function(){var e=Sa(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),Ra=R.RegExp,ka=k((function(){var e=Ra("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Ea=bt.get,Ta=_e("native-string-replace",String.prototype.replace),Oa=RegExp.prototype.exec,Aa=Oa,Na=F("".charAt),Pa=F("".indexOf),La=F("".replace),Ca=F("".slice),Da=function(){var e=/a/,t=/b*/g;return O(Oa,e,"a"),O(Oa,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),Ma=Ia.BROKEN_CARET,Ua=void 0!==/()??/.exec("")[1];(Da||Ua||Ma||ja||ka)&&(Aa=function(e){var t,r,n,i,o,a,s,u=this,c=Ea(u),l=lo(e),f=c.raw;if(f)return f.lastIndex=u.lastIndex,t=O(Aa,f,l),u.lastIndex=f.lastIndex,t;var h=c.groups,d=Ma&&u.sticky,p=O(ma,u),v=u.source,g=0,y=l;if(d&&(p=La(p,"y",""),-1===Pa(p,"g")&&(p+="g"),y=Ca(l,u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&"\n"!==Na(l,u.lastIndex-1))&&(v="(?: "+v+")",y=" "+y,g++),r=new RegExp("^(?:"+v+")",p)),Ua&&(r=new RegExp("^"+v+"$(?!\\s)",p)),Da&&(n=u.lastIndex),i=O(Oa,d?r:u,y),d?i?(i.input=Ca(i.input,g),i[0]=Ca(i[0],g),i.index=u.lastIndex,u.lastIndex+=i[0].length):u.lastIndex=0:Da&&i&&(u.lastIndex=u.global?i.index+i[0].length:n),Ua&&i&&i.length>1&&O(Ta,i[0],r,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(i[o]=void 0)})),i&&h)for(i.groups=a=Vr(null),o=0;o<h.length;o++)a[(s=h[o])[0]]=i[s[1]];return i});var Ba=Aa;tr({target:"RegExp",proto:!0,forced:/./.exec!==Ba},{exec:Ba});var Fa=function(){var e=!1,t=/[ac]/;return t.exec=function(){return e=!0,/./.exec.apply(this,arguments)},!0===t.test("abc")&&e}(),qa=R.Error,za=F(/./.test);function Ja(e){if(Array.isArray(e))return e}function $a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ga(e,t){if(e){if("string"==typeof e)return $a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$a(e,t):void 0}}function Qa(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Va(e,t){return Ja(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}}(e,t)||Ga(e,t)||Qa()}function Ha(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Wa(e){return function(e){if(Array.isArray(e))return $a(e)}(e)||Ha(e)||Ga(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}tr({target:"RegExp",proto:!0,forced:!Fa},{test:function(e){var t=this.exec;if(!Y(t))return za(this,e);var r=O(t,this,e);if(null!==r&&!K(r))throw new qa("RegExp exec method returned something other than an Object or null");return!!r}});var Ya=_((function(e){var t=function(e){var t,r=Object.prototype,n=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,o=Object.create(i.prototype),a=new E(n||[]);return o._invoke=function(e,t,r){var n=f;return function(i,o){if(n===d)throw new Error("Generator is already running");if(n===p){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=j(a,r);if(s){if(s===v)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=d;var u=l(e,t,r);if("normal"===u.type){if(n=r.done?p:h,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=p,r.method="throw",r.arg=u.arg)}}}(e,r,a),o}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var f="suspendedStart",h="suspendedYield",d="executing",p="completed",v={};function g(){}function y(){}function m(){}var b={};u(b,o,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(T([])));w&&w!==r&&n.call(w,o)&&(b=w);var _=m.prototype=g.prototype=Object.create(b);function I(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function r(i,o,a,s){var u=l(e[i],e,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}var i;this._invoke=function(e,n){function o(){return new t((function(t,i){r(e,n,t,i)}))}return i=i?i.then(o,o):o()}}function j(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,j(e,r),"throw"===r.method))return v;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=l(n,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var o=i.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function R(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(R,this),this.reset(!0)}function T(e){if(e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}return{next:O}}function O(){return{value:t,done:!0}}return y.prototype=m,u(_,"constructor",m),u(m,"constructor",y),y.displayName=u(m,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,u(e,s,"GeneratorFunction")),e.prototype=Object.create(_),e},e.awrap=function(e){return{__await:e}},I(S.prototype),u(S.prototype,a,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var a=new S(c(t,r,n,i),o);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},I(_),u(_,s,"Generator"),u(_,o,(function(){return this})),u(_,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=T,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(k),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return s.type="throw",s.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),k(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;k(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}})),Ka=Ya;eo("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),uo),tr({target:"Map",proto:!0,real:!0,forced:ye},{deleteAll:wo}),tr({target:"Map",proto:!0,real:!0,forced:ye},{emplace:ca});var Xa=function(e){return O(Map.prototype.entries,e)};tr({target:"Map",proto:!0,real:!0,forced:ye},{every:function(e){var t=We(this),r=Xa(t),n=ln(e,arguments.length>1?arguments[1]:void 0);return!In(r,(function(e,r,i){if(!n(r,e,t))return i()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}}),tr({target:"Map",proto:!0,real:!0,forced:ye},{filter:function(e){var t=We(this),r=Xa(t),n=ln(e,arguments.length>1?arguments[1]:void 0),i=new(Io(t,Z("Map"))),o=pe(i.set);return In(r,(function(e,r){n(r,e,t)&&O(o,i,e,r)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),i}}),tr({target:"Map",proto:!0,real:!0,forced:ye},{find:function(e){var t=We(this),r=Xa(t),n=ln(e,arguments.length>1?arguments[1]:void 0);return In(r,(function(e,r,i){if(n(r,e,t))return i(r)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}}),tr({target:"Map",proto:!0,real:!0,forced:ye},{findKey:function(e){var t=We(this),r=Xa(t),n=ln(e,arguments.length>1?arguments[1]:void 0);return In(r,(function(e,r,i){if(n(r,e,t))return i(e)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}});tr({target:"Map",proto:!0,real:!0,forced:ye},{includes:function(e){return In(Xa(We(this)),(function(t,r,n){if(function(e,t){return e===t||e!=e&&t!=t}(r,e))return n()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}}),tr({target:"Map",proto:!0,real:!0,forced:ye},{keyOf:function(e){return In(Xa(We(this)),(function(t,r,n){if(r===e)return n(t)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}}),tr({target:"Map",proto:!0,real:!0,forced:ye},{mapKeys:function(e){var t=We(this),r=Xa(t),n=ln(e,arguments.length>1?arguments[1]:void 0),i=new(Io(t,Z("Map"))),o=pe(i.set);return In(r,(function(e,r){O(o,i,n(r,e,t),r)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),i}}),tr({target:"Map",proto:!0,real:!0,forced:ye},{mapValues:function(e){var t=We(this),r=Xa(t),n=ln(e,arguments.length>1?arguments[1]:void 0),i=new(Io(t,Z("Map"))),o=pe(i.set);return In(r,(function(e,r){O(o,i,e,n(r,e,t))}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),i}}),tr({target:"Map",proto:!0,real:!0,forced:ye},{merge:function(e){for(var t=We(this),r=pe(t.set),n=arguments.length,i=0;i<n;)In(arguments[i++],r,{that:t,AS_ENTRIES:!0});return t}});var Za=R.TypeError;tr({target:"Map",proto:!0,real:!0,forced:ye},{reduce:function(e){var t=We(this),r=Xa(t),n=arguments.length<2,i=n?void 0:arguments[1];if(pe(e),In(r,(function(r,o){n?(n=!1,i=o):i=e(i,o,r,t)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),n)throw Za("Reduce of empty map with no initial value");return i}}),tr({target:"Map",proto:!0,real:!0,forced:ye},{some:function(e){var t=We(this),r=Xa(t),n=ln(e,arguments.length>1?arguments[1]:void 0);return In(r,(function(e,r,i){if(n(r,e,t))return i()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var es=R.TypeError;tr({target:"Map",proto:!0,real:!0,forced:ye},{update:function(e,t){var r=We(this),n=pe(r.get),i=pe(r.has),o=pe(r.set),a=arguments.length;pe(t);var s=O(i,r,e);if(!s&&a<3)throw es("Updating absent value");var u=s?O(n,r,e):pe(a>2?arguments[2]:void 0)(e,r);return O(o,r,e,t(u,e,r)),r}});var ts=R,rs={f:Ce},ns=Ze.f,is=function(e){var t=ts.Symbol||(ts.Symbol={});Re(t,e)||ns(t,e,{value:rs.f(e)})};is("iterator");var os=qo.forEach,as=ct("hidden"),ss="Symbol",us=Ce("toPrimitive"),cs=bt.set,ls=bt.getterFor(ss),fs=Object.prototype,hs=R.Symbol,ds=hs&&hs.prototype,ps=R.TypeError,vs=R.QObject,gs=Z("JSON","stringify"),ys=Qe.f,ms=Ze.f,bs=zi.f,xs=L.f,ws=F([].push),_s=_e("symbols"),Is=_e("op-symbols"),Ss=_e("string-to-symbol-registry"),js=_e("symbol-to-string-registry"),Rs=_e("wks"),ks=!vs||!vs.prototype||!vs.prototype.findChild,Es=E&&k((function(){return 7!=Vr(ms({},"a",{get:function(){return ms(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=ys(fs,t);n&&delete fs[t],ms(e,t,r),n&&e!==fs&&ms(fs,t,n)}:ms,Ts=function(e,t){var r=_s[e]=Vr(ds);return cs(r,{type:ss,tag:e,description:t}),E||(r.description=t),r},Os=function(e,t,r){e===fs&&Os(Is,t,r),We(e);var n=Be(t);return We(r),Re(_s,n)?(r.enumerable?(Re(e,as)&&e[as][n]&&(e[as][n]=!1),r=Vr(r,{enumerable:C(0,!1)})):(Re(e,as)||ms(e,as,C(1,{})),e[as][n]=!0),Es(e,n,r)):ms(e,n,r)},As=function(e,t){We(e);var r=W(t),n=Dr(r).concat(Cs(r));return os(n,(function(t){E&&!O(Ns,r,t)||Os(e,t,r[t])})),e},Ns=function(e){var t=Be(e),r=O(xs,this,t);return!(this===fs&&Re(_s,t)&&!Re(Is,t))&&(!(r||!Re(this,t)||!Re(_s,t)||Re(this,as)&&this[as][t])||r)},Ps=function(e,t){var r=W(e),n=Be(t);if(r!==fs||!Re(_s,n)||Re(Is,n)){var i=ys(r,n);return!i||!Re(_s,n)||Re(r,as)&&r[as][n]||(i.enumerable=!0),i}},Ls=function(e){var t=bs(W(e)),r=[];return os(t,(function(e){Re(_s,e)||Re(lt,e)||ws(r,e)})),r},Cs=function(e){var t=e===fs,r=bs(t?Is:W(e)),n=[];return os(r,(function(e){!Re(_s,e)||t&&!Re(fs,e)||ws(n,_s[e])})),n};if(se||(hs=function(){if(ee(ds,this))throw ps("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?lo(arguments[0]):void 0,t=Oe(e),r=function(e){this===fs&&O(r,Is,e),Re(this,as)&&Re(this[as],t)&&(this[as][t]=!1),Es(this,t,C(1,e))};return E&&ks&&Es(fs,t,{configurable:!0,set:r}),Ts(t,e)},ds=hs.prototype,St(ds,"toString",(function(){return ls(this).tag})),St(hs,"withoutSetter",(function(e){return Ts(Oe(e),e)})),L.f=Ns,Ze.f=Os,Qe.f=Ps,zt.f=zi.f=Ls,Jt.f=Cs,rs.f=function(e){return Ts(Ce(e),e)},E&&(ms(ds,"description",{configurable:!0,get:function(){return ls(this).description}}),St(fs,"propertyIsEnumerable",Ns,{unsafe:!0}))),tr({global:!0,wrap:!0,forced:!se,sham:!se},{Symbol:hs}),os(Dr(Rs),(function(e){is(e)})),tr({target:ss,stat:!0,forced:!se},{for:function(e){var t=lo(e);if(Re(Ss,t))return Ss[t];var r=hs(t);return Ss[t]=r,js[r]=t,r},keyFor:function(e){if(!le(e))throw ps(e+" is not a symbol");if(Re(js,e))return js[e]},useSetter:function(){ks=!0},useSimple:function(){ks=!1}}),tr({target:"Object",stat:!0,forced:!se,sham:!E},{create:function(e,t){return void 0===t?Vr(e):As(Vr(e),t)},defineProperty:Os,defineProperties:As,getOwnPropertyDescriptor:Ps}),tr({target:"Object",stat:!0,forced:!se},{getOwnPropertyNames:Ls,getOwnPropertySymbols:Cs}),tr({target:"Object",stat:!0,forced:k((function(){Jt.f(1)}))},{getOwnPropertySymbols:function(e){return Jt.f(Se(e))}}),gs){var Ds=!se||k((function(){var e=hs();return"[null]"!=gs([e])||"{}"!=gs({a:e})||"{}"!=gs(Object(e))}));tr({target:"JSON",stat:!0,forced:Ds},{stringify:function(e,t,r){var n=Pn(arguments),i=t;if((K(t)||void 0!==e)&&!le(e))return rr(t)||(t=function(e,t){if(Y(i)&&(t=O(i,this,e,t)),!le(t))return t}),n[1]=t,Nn(gs,null,n)}})}if(!ds[us]){var Ms=ds.valueOf;St(ds,us,(function(e){return O(Ms,this)}))}kn(hs,ss),lt[as]=!0;var Us=Ze.f,Bs=R.Symbol,Fs=Bs&&Bs.prototype;if(E&&Y(Bs)&&(!("description"in Fs)||void 0!==Bs().description)){var qs={},zs=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:lo(arguments[0]),t=ee(Fs,this)?new Bs(e):void 0===e?Bs():Bs(e);return""===e&&(qs[t]=!0),t};Qt(zs,Bs),zs.prototype=Fs,Fs.constructor=zs;var Js="Symbol(test)"==String(Bs("test")),$s=F(Fs.toString),Gs=F(Fs.valueOf),Qs=/^Symbol\((.*)\)[^)]+$/,Vs=F("".replace),Hs=F("".slice);Us(Fs,"description",{configurable:!0,get:function(){var e=Gs(this),t=$s(e);if(Re(qs,e))return"";var r=Js?Hs(t,7,-1):Vs(t,Qs,"$1");return""===r?void 0:r}}),tr({global:!0,forced:!0},{Symbol:zs})}function Ws(e){return Ws="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ws(e)}var Ys=k((function(){Dr(1)}));tr({target:"Object",stat:!0,forced:Ys},{keys:function(e){return Dr(Se(e))}});var Ks=R.TypeError,Xs=function(e){var t=0==e,r=1==e,n=2==e,i=3==e;return function(e,o,a){We(e);var s=Z("Promise"),u=pe(e.next),c=0,l=void 0!==o;return!l&&t||pe(o),new s((function(f,h){var d=function(t,r){try{var n=ve(e,"return");if(n)return s.resolve(O(n,e)).then((function(){t(r)}),(function(e){h(e)}))}catch(e){return h(e)}t(r)},onError=function(e){d(h,e)},p=function(){try{if(t&&c>9007199254740991&&l)throw Ks("The allowed number of iterations has been exceeded");s.resolve(We(O(u,e))).then((function(e){try{if(We(e).done)t?(a.length=c,f(a)):f(!i&&(n||void 0));else{var u=e.value;l?s.resolve(t?o(u,c):o(u)).then((function(e){r?p():n?e?p():d(f,!1):t?(a[c++]=e,p()):e?d(f,i||u):p()}),onError):(a[c++]=u,p())}}catch(e){onError(e)}}),onError)}catch(e){onError(e)}};p()}))}},Zs={toArray:Xs(0),forEach:Xs(1),every:Xs(2),some:Xs(3),find:Xs(4)},eu=Zs.some;tr({target:"AsyncIterator",proto:!0,real:!0},{some:function(e){return eu(this,e)}}),tr({target:"Iterator",proto:!0,real:!0},{some:function(e){return We(this),pe(e),In(this,(function(t,r){if(e(t))return r()}),{IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var tu=L.f,ru=F(tu),nu=F([].push),iu=function(e){return function(t){for(var r,n=W(t),i=Dr(n),o=i.length,a=0,s=[];o>a;)r=i[a++],E&&!ru(n,r)||nu(s,e?[r,n[r]]:n[r]);return s}},ou={entries:iu(!0),values:iu(!1)},au=ou.entries;tr({target:"Object",stat:!0},{entries:function(e){return au(e)}});var su=qo.filter,uu=_r("filter");tr({target:"Array",proto:!0,forced:!uu},{filter:function(e){return su(this,e,arguments.length>1?arguments[1]:void 0)}});var cu,lu,fu=Ce("asyncIterator"),hu=R.AsyncIterator,du=we.AsyncIteratorPrototype;if(du)cu=du;else if(Y(hu))cu=hu.prototype;else if(we.USE_FUNCTION_CONSTRUCTOR||R.USE_FUNCTION_CONSTRUCTOR)try{lu=Xr(Xr(Xr(Function("return async function*(){}()")()))),Xr(lu)===Object.prototype&&(cu=lu)}catch(e){}cu||(cu={}),Y(cu[fu])||St(cu,fu,(function(){return this}));var pu=cu,vu=Z("Promise"),gu="AsyncIteratorProxy",yu=bt.set,mu=bt.getterFor(gu),bu=Ce("toStringTag"),xu=function(e,t){var r=function(e){e.type=gu,e.next=pe(e.iterator.next),e.done=!1,e.ignoreArgument=!t,yu(this,e)};return r.prototype=to(Vr(pu),{next:function(r){var n=this,i=!!arguments.length;return new vu((function(o){var a=mu(n),s=i?[a.ignoreArgument?void 0:r]:t?[]:[void 0];a.ignoreArgument=!1,o(a.done?{done:!0,value:void 0}:We(O(e,a,vu,s)))}))},return:function(e){var t=this;return new vu((function(r,n){var i=mu(t),o=i.iterator;i.done=!0;var a=ve(o,"return");if(void 0===a)return r({done:!0,value:e});vu.resolve(O(a,o,e)).then((function(t){We(t),r({done:!0,value:e})}),n)}))},throw:function(e){var t=this;return new vu((function(r,n){var i=mu(t),o=i.iterator;i.done=!0;var a=ve(o,"throw");if(void 0===a)return n(e);r(O(a,o,e))}))}}),t||et(r.prototype,bu,"Generator"),r},wu=xu((function(e,t){var r=this,n=r.filterer;return new e((function(i,o){var a=function(){try{e.resolve(We(Nn(r.next,r.iterator,t))).then((function(t){try{if(We(t).done)r.done=!0,i({done:!0,value:void 0});else{var s=t.value;e.resolve(n(s)).then((function(e){e?i({done:!1,value:s}):a()}),o)}}catch(e){o(e)}}),o)}catch(e){o(e)}};a()}))}));tr({target:"AsyncIterator",proto:!0,real:!0},{filter:function(e){return new wu({iterator:We(this),filterer:pe(e)})}});var _u=rn.IteratorPrototype,Iu="IteratorProxy",Su=bt.set,ju=bt.getterFor(Iu),Ru=Ce("toStringTag"),ku=function(e,t){var r=function(e){e.type=Iu,e.next=pe(e.iterator.next),e.done=!1,e.ignoreArg=!t,Su(this,e)};return r.prototype=to(Vr(_u),{next:function(r){var n=ju(this),i=arguments.length?[n.ignoreArg?void 0:r]:t?[]:[void 0];n.ignoreArg=!1;var o=n.done?void 0:O(e,n,i);return{done:n.done,value:o}},return:function(e){var t=ju(this),r=t.iterator;t.done=!0;var n=ve(r,"return");return{done:!0,value:n?We(O(n,r,e)).value:e}},throw:function(e){var t=ju(this),r=t.iterator;t.done=!0;var n=ve(r,"throw");if(n)return O(n,r,e);throw e}}),t||et(r.prototype,Ru,"Generator"),r},Eu=ku((function(e){for(var t,r,n=this.iterator,i=this.filterer,o=this.next;;){if(t=We(Nn(o,n,e)),this.done=!!t.done)return;if(r=t.value,pa(n,i,r))return r}}));tr({target:"Iterator",proto:!0,real:!0},{filter:function(e){return new Eu({iterator:We(this),filterer:pe(e)})}});var Tu=Qe.f,Ou=k((function(){Tu(1)}));tr({target:"Object",stat:!0,forced:!E||Ou,sham:!E},{getOwnPropertyDescriptor:function(e,t){return Tu(W(e),t)}});var Au=Zs.forEach;tr({target:"AsyncIterator",proto:!0,real:!0},{forEach:function(e){return Au(this,e)}}),tr({target:"Iterator",proto:!0,real:!0},{forEach:function(e){In(We(this),e,{IS_ITERATOR:!0})}});var Nu=function(e,t){var r=[][e];return!!r&&k((function(){r.call(null,t||function(){throw 1},1)}))},Pu=qo.forEach,Lu=Nu("forEach")?[].forEach:function(e){return Pu(this,e,arguments.length>1?arguments[1]:void 0)},Cu=function(e){if(e&&e.forEach!==Lu)try{et(e,"forEach",Lu)}catch(t){e.forEach=Lu}};for(var Du in Eo)Eo[Du]&&Cu(R[Du]&&R[Du].prototype);function Mu(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function Uu(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){Mu(o,n,i,a,s,"next",e)}function s(e){Mu(o,n,i,a,s,"throw",e)}a(void 0)}))}}Cu(Ao),tr({target:"Object",stat:!0,sham:!E},{getOwnPropertyDescriptors:function(e){for(var t,r,n=W(e),i=Qe.f,o=Gt(n),a={},s=0;o.length>s;)void 0!==(r=i(n,t=o[s++]))&&nr(a,t,r);return a}});var Bu,Fu,qu,zu,Ju=R.Promise,$u=/(?:ipad|iphone|ipod).*applewebkit/i.test(te),Gu="process"==J(R.process),Qu=R.setImmediate,Vu=R.clearImmediate,Hu=R.process,Wu=R.Dispatch,Yu=R.Function,Ku=R.MessageChannel,Xu=R.String,Zu=0,ec={},tc="onreadystatechange";try{Bu=R.location}catch(e){}var rc=function(e){if(Re(ec,e)){var t=ec[e];delete ec[e],t()}},nc=function(e){return function(){rc(e)}},ic=function(e){rc(e.data)},oc=function(e){R.postMessage(Xu(e),Bu.protocol+"//"+Bu.host)};Qu&&Vu||(Qu=function(e){var t=Pn(arguments,1);return ec[++Zu]=function(){Nn(Y(e)?e:Yu(e),void 0,t)},Fu(Zu),Zu},Vu=function(e){delete ec[e]},Gu?Fu=function(e){Hu.nextTick(nc(e))}:Wu&&Wu.now?Fu=function(e){Wu.now(nc(e))}:Ku&&!$u?(zu=(qu=new Ku).port2,qu.port1.onmessage=ic,Fu=ln(zu.postMessage,zu)):R.addEventListener&&Y(R.postMessage)&&!R.importScripts&&Bu&&"file:"!==Bu.protocol&&!k(oc)?(Fu=oc,R.addEventListener("message",ic,!1)):Fu=tc in ze("script")?function(e){Ur.appendChild(ze("script")).onreadystatechange=function(){Ur.removeChild(this),rc(e)}}:function(e){setTimeout(nc(e),0)});var ac,sc,uc,cc,lc,fc,hc,dc,pc={set:Qu,clear:Vu},vc=/ipad|iphone|ipod/i.test(te)&&void 0!==R.Pebble,gc=/web0s(?!.*chrome)/i.test(te),yc=Qe.f,mc=pc.set,bc=R.MutationObserver||R.WebKitMutationObserver,xc=R.document,wc=R.process,_c=R.Promise,Ic=yc(R,"queueMicrotask"),Sc=Ic&&Ic.value;Sc||(ac=function(){var e,t;for(Gu&&(e=wc.domain)&&e.exit();sc;){t=sc.fn,sc=sc.next;try{t()}catch(e){throw sc?cc():uc=void 0,e}}uc=void 0,e&&e.enter()},$u||Gu||gc||!bc||!xc?!vc&&_c&&_c.resolve?((hc=_c.resolve(void 0)).constructor=_c,dc=ln(hc.then,hc),cc=function(){dc(ac)}):Gu?cc=function(){wc.nextTick(ac)}:(mc=ln(mc,R),cc=function(){mc(ac)}):(lc=!0,fc=xc.createTextNode(""),new bc(ac).observe(fc,{characterData:!0}),cc=function(){fc.data=lc=!lc}));var jc,Rc,kc,Ec,Tc=Sc||function(e){var t={fn:e,next:void 0};uc&&(uc.next=t),sc||(sc=t,cc()),uc=t},Oc=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n})),this.resolve=pe(t),this.reject=pe(r)},Ac={f:function(e){return new Oc(e)}},Nc=function(e,t){if(We(e),K(t)&&t.constructor===e)return t;var r=Ac.f(e);return(0,r.resolve)(t),r.promise},Pc=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Lc="object"==typeof window,Cc=pc.set,Dc=Ce("species"),Mc="Promise",Uc=bt.getterFor(Mc),Bc=bt.set,Fc=bt.getterFor(Mc),qc=Ju&&Ju.prototype,zc=Ju,Jc=qc,$c=R.TypeError,Gc=R.document,Qc=R.process,Vc=Ac.f,Hc=Vc,Wc=!!(Gc&&Gc.createEvent&&R.dispatchEvent),Yc=Y(R.PromiseRejectionEvent),Kc="unhandledrejection",Xc=!1,Zc=Zt(Mc,(function(){var e=ot(zc),t=e!==String(zc);if(!t&&66===ae)return!0;if(ae>=51&&/native code/.test(e))return!1;var r=new zc((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[Dc]=n,!(Xc=r.then((function(){}))instanceof n)||!t&&Lc&&!Yc})),el=Zc||!Xi((function(e){zc.all(e).catch((function(){}))})),tl=function(e){var t;return!(!K(e)||!Y(t=e.then))&&t},rl=function(e,t){if(!e.notified){e.notified=!0;var r=e.reactions;Tc((function(){for(var n=e.value,i=1==e.state,o=0;r.length>o;){var a,s,u,c=r[o++],l=i?c.ok:c.fail,f=c.resolve,h=c.reject,d=c.domain;try{l?(i||(2===e.rejection&&al(e),e.rejection=1),!0===l?a=n:(d&&d.enter(),a=l(n),d&&(d.exit(),u=!0)),a===c.promise?h($c("Promise-chain cycle")):(s=tl(a))?O(s,a,f,h):f(a)):h(n)}catch(e){d&&!u&&d.exit(),h(e)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&il(e)}))}},nl=function(e,t,r){var n,i;Wc?((n=Gc.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),R.dispatchEvent(n)):n={promise:t,reason:r},!Yc&&(i=R["on"+e])?i(n):e===Kc&&function(e,t){var r=R.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}("Unhandled promise rejection",r)},il=function(e){O(Cc,R,(function(){var t,r=e.facade,n=e.value;if(ol(e)&&(t=Pc((function(){Gu?Qc.emit("unhandledRejection",n,r):nl(Kc,r,n)})),e.rejection=Gu||ol(e)?2:1,t.error))throw t.value}))},ol=function(e){return 1!==e.rejection&&!e.parent},al=function(e){O(Cc,R,(function(){var t=e.facade;Gu?Qc.emit("rejectionHandled",t):nl("rejectionhandled",t,e.value)}))},sl=function(e,t,r){return function(n){e(t,n,r)}},ul=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,rl(e,!0))},cl=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw $c("Promise can't be resolved itself");var n=tl(t);n?Tc((function(){var r={done:!1};try{O(n,t,sl(cl,r,e),sl(ul,r,e))}catch(t){ul(r,t,e)}})):(e.value=t,e.state=1,rl(e,!1))}catch(t){ul({done:!1},t,e)}}};if(Zc&&(Jc=(zc=function(e){Cr(this,Jc),pe(e),O(jc,this);var t=Uc(this);try{e(sl(cl,t),sl(ul,t))}catch(e){ul(t,e)}}).prototype,(jc=function(e){Bc(this,{type:Mc,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=to(Jc,{then:function(e,t){var r=Fc(this),n=r.reactions,i=Vc(Io(this,zc));return i.ok=!Y(e)||e,i.fail=Y(t)&&t,i.domain=Gu?Qc.domain:void 0,r.parent=!0,n[n.length]=i,0!=r.state&&rl(r,!1),i.promise},catch:function(e){return this.then(void 0,e)}}),Rc=function(){var e=new jc,t=Uc(e);this.promise=e,this.resolve=sl(cl,t),this.reject=sl(ul,t)},Ac.f=Vc=function(e){return e===zc||e===kc?new Rc(e):Hc(e)},Y(Ju)&&qc!==Object.prototype)){Ec=qc.then,Xc||(St(qc,"then",(function(e,t){var r=this;return new zc((function(e,t){O(Ec,r,e,t)})).then(e,t)}),{unsafe:!0}),St(qc,"catch",Jc.catch,{unsafe:!0}));try{delete qc.constructor}catch(e){}_i&&_i(qc,Jc)}tr({global:!0,wrap:!0,forced:Zc},{Promise:zc}),kn(zc,Mc,!1),no(Mc),kc=Z(Mc),tr({target:Mc,stat:!0,forced:Zc},{reject:function(e){var t=Vc(this);return O(t.reject,void 0,e),t.promise}}),tr({target:Mc,stat:!0,forced:Zc},{resolve:function(e){return Nc(this,e)}}),tr({target:Mc,stat:!0,forced:el},{all:function(e){var t=this,r=Vc(t),n=r.resolve,i=r.reject,o=Pc((function(){var r=pe(t.resolve),o=[],a=0,s=1;In(e,(function(e){var u=a++,c=!1;s++,O(r,t,e).then((function(e){c||(c=!0,o[u]=e,--s||n(o))}),i)})),--s||n(o)}));return o.error&&i(o.value),r.promise},race:function(e){var t=this,r=Vc(t),n=r.reject,i=Pc((function(){var i=pe(t.resolve);In(e,(function(e){O(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}});var ll=R.Array,fl=Z("JSON","stringify"),hl=F(/./.exec),dl=F("".charAt),pl=F("".charCodeAt),vl=F("".replace),gl=F(1..toString),yl=/[\uD800-\uDFFF]/g,ml=/^[\uD800-\uDBFF]$/,bl=/^[\uDC00-\uDFFF]$/,xl=function(e,t,r){var n=dl(r,t-1),i=dl(r,t+1);return hl(ml,e)&&!hl(bl,i)||hl(bl,e)&&!hl(ml,n)?"\\u"+gl(pl(e,0),16):e},wl=k((function(){return'"\\udf06\\ud834"'!==fl("\udf06\ud834")||'"\\udead"'!==fl("\udead")}));fl&&tr({target:"JSON",stat:!0,forced:wl},{stringify:function(e,t,r){for(var n=0,i=arguments.length,o=ll(i);n<i;n++)o[n]=arguments[n];var a=Nn(fl,null,o);return"string"==typeof a?vl(a,yl,xl):a}});var _l=!!Ju&&k((function(){Ju.prototype.finally.call({then:function(){}},(function(){}))}));if(tr({target:"Promise",proto:!0,real:!0,forced:_l},{finally:function(e){var t=Io(this,Z("Promise")),r=Y(e);return this.then(r?function(r){return Nc(t,e()).then((function(){return r}))}:e,r?function(r){return Nc(t,e()).then((function(){throw r}))}:e)}}),Y(Ju)){var Il=Z("Promise").prototype.finally;Ju.prototype.finally!==Il&&St(Ju.prototype,"finally",Il,{unsafe:!0})}var Sl=_r("splice"),jl=R.TypeError,Rl=Math.max,kl=Math.min,El=9007199254740991,Tl="Maximum allowed length exceeded";tr({target:"Array",proto:!0,forced:!Sl},{splice:function(e,t){var r,n,i,o,a,s,u=Se(this),c=Pt(u),l=Ot(e,c),f=arguments.length;if(0===f?r=n=0:1===f?(r=0,n=c-l):(r=f-2,n=kl(Rl(kt(t),0),c-l)),c+r-n>El)throw jl(Tl);for(i=xr(u,n),o=0;o<n;o++)(a=l+o)in u&&nr(i,o,u[a]);if(i.length=n,r<n){for(o=l;o<c-n;o++)s=o+r,(a=o+n)in u?u[s]=u[a]:delete u[s];for(o=c;o>c-n+r;o--)delete u[o-1]}else if(r>n)for(o=c-n;o>l;o--)s=o+r-1,(a=o+n-1)in u?u[s]=u[a]:delete u[s];for(o=0;o<r;o++)u[o+l]=arguments[o+2];return u.length=c-n+r,i}});var Ol=qo.findIndex,Al="findIndex",Nl=!0;Al in[]&&Array(1).findIndex((function(){Nl=!1})),tr({target:"Array",proto:!0,forced:Nl},{findIndex:function(e){return Ol(this,e,arguments.length>1?arguments[1]:void 0)}}),gi(Al);var Pl=R.TypeError,Ll=function(e,t,r,n,i,o,a,s){for(var u,c,l=i,f=0,h=!!a&&ln(a,s);f<n;){if(f in r){if(u=h?h(r[f],f,t):r[f],o>0&&rr(u))c=Pt(u),l=Ll(e,t,u,c,l,o-1)-1;else{if(l>=9007199254740991)throw Pl("Exceed the acceptable array length");e[l]=u}l++}f++}return l},Cl=Ll;tr({target:"Array",proto:!0},{flatMap:function(e){var t,r=Se(this),n=Pt(r);return pe(e),(t=xr(r,0)).length=Cl(t,r,r,n,0,1,e,arguments.length>1?arguments[1]:void 0),t}}),gi("flatMap");var Dl=Z("Promise"),Ml="AsyncFromSyncIterator",Ul=bt.set,Bl=bt.getterFor(Ml),Fl=function(e,t,r){var n=e.done;Dl.resolve(e.value).then((function(e){t({done:n,value:e})}),r)},ql=function(e){Ul(this,{type:Ml,iterator:We(e),next:e.next})};ql.prototype=to(Vr(pu),{next:function(e){var t=Bl(this),r=!!arguments.length;return new Dl((function(n,i){var o=We(Nn(t.next,t.iterator,r?[e]:[]));Fl(o,n,i)}))},return:function(e){var t=Bl(this).iterator,r=!!arguments.length;return new Dl((function(n,i){var o=ve(t,"return");if(void 0===o)return n({done:!0,value:e});var a=We(Nn(o,t,r?[e]:[]));Fl(a,n,i)}))},throw:function(e){var t=Bl(this).iterator,r=!!arguments.length;return new Dl((function(n,i){var o=ve(t,"throw");if(void 0===o)return i(e);var a=We(Nn(o,t,r?[e]:[]));Fl(a,n,i)}))}});var zl=ql,Jl=Ce("asyncIterator"),$l=xu((function(e){var t,r=this,n=r.mapper;return new e((function(i,o){var a=function(){try{e.resolve(We(O(r.next,r.iterator))).then((function(a){try{We(a).done?(r.done=!0,i({done:!0,value:void 0})):e.resolve(n(a.value)).then((function(e){try{return r.innerIterator=t=function(e,t){var r=arguments.length<2?ve(e,Jl):t;return r?We(O(r,e)):new zl(mn(e))}(e),r.innerNext=pe(t.next),s()}catch(e){o(e)}}),o)}catch(e){o(e)}}),o)}catch(e){o(e)}},s=function(){if(t=r.innerIterator)try{e.resolve(We(O(r.innerNext,t))).then((function(e){try{We(e).done?(r.innerIterator=r.innerNext=null,a()):i({done:!1,value:e.value})}catch(e){o(e)}}),o)}catch(e){o(e)}else a()};s()}))}));tr({target:"AsyncIterator",proto:!0,real:!0},{flatMap:function(e){return new $l({iterator:We(this),mapper:pe(e),innerIterator:null,innerNext:null})}});var Gl=R.TypeError,Ql=ku((function(){for(var e,t,r,n,i=this.iterator,o=this.mapper;;)try{if(n=this.innerIterator){if(!(e=We(O(this.innerNext,n))).done)return e.value;this.innerIterator=this.innerNext=null}if(e=We(O(this.next,i)),this.done=!!e.done)return;if(t=o(e.value),!(r=gn(t)))throw Gl(".flatMap callback should return an iterable object");this.innerIterator=n=We(O(r,t)),this.innerNext=pe(n.next)}catch(e){bn(i,"throw",e)}}));tr({target:"Iterator",proto:!0,real:!0},{flatMap:function(e){return new Ql({iterator:We(this),mapper:pe(e),innerIterator:null,innerNext:null})}});var Vl=qo.map,Hl=_r("map");tr({target:"Array",proto:!0,forced:!Hl},{map:function(e){return Vl(this,e,arguments.length>1?arguments[1]:void 0)}});var Wl=xu((function(e,t){var r=this,n=r.mapper;return e.resolve(We(Nn(r.next,r.iterator,t))).then((function(t){return We(t).done?(r.done=!0,{done:!0,value:void 0}):e.resolve(n(t.value)).then((function(e){return{done:!1,value:e}}))}))}));tr({target:"AsyncIterator",proto:!0,real:!0},{map:function(e){return new Wl({iterator:We(this),mapper:pe(e)})}});var Yl=ku((function(e){var t=this.iterator,r=We(Nn(this.next,t,e));if(!(this.done=!!r.done))return pa(t,this.mapper,r.value)}));tr({target:"Iterator",proto:!0,real:!0},{map:function(e){return new Yl({iterator:We(this),mapper:pe(e)})}});var Kl=F(1..valueOf),Xl="\t\n\v\f\r                 \u2028\u2029\ufeff",Zl=F("".replace),ef="["+Xl+"]",tf=RegExp("^"+ef+ef+"*"),rf=RegExp(ef+ef+"*$"),nf=function(e){return function(t){var r=lo(H(t));return 1&e&&(r=Zl(r,tf,"")),2&e&&(r=Zl(r,rf,"")),r}},of={start:nf(1),end:nf(2),trim:nf(3)},af=zt.f,sf=Qe.f,uf=Ze.f,cf=of.trim,lf="Number",ff=R.Number,hf=ff.prototype,df=R.TypeError,pf=F("".slice),vf=F("".charCodeAt),gf=function(e){var t=Ue(e,"number");return"bigint"==typeof t?t:yf(t)},yf=function(e){var t,r,n,i,o,a,s,u,c=Ue(e,"number");if(le(c))throw df("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=cf(c),43===(t=vf(c,0))||45===t){if(88===(r=vf(c,2))||120===r)return NaN}else if(48===t){switch(vf(c,1)){case 66:case 98:n=2,i=49;break;case 79:case 111:n=8,i=55;break;default:return+c}for(a=(o=pf(c,2)).length,s=0;s<a;s++)if((u=vf(o,s))<48||u>i)return NaN;return parseInt(o,n)}return+c};if(Zt(lf,!ff(" 0o1")||!ff("0b1")||ff("+0x1"))){for(var mf,bf=function(e){var t=arguments.length<1?0:ff(gf(e)),r=this;return ee(hf,r)&&k((function(){Kl(r)}))?Zi(Object(t),r,bf):t},xf=E?af(ff):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),wf=0;xf.length>wf;wf++)Re(ff,mf=xf[wf])&&!Re(bf,mf)&&uf(bf,mf,sf(ff,mf));bf.prototype=hf,hf.constructor=bf,St(R,lf,bf)}var _f=Math.floor,If=function(e,t){var r=e.length,n=_f(r/2);return r<8?Sf(e,t):jf(e,If(Bi(e,0,n),t),If(Bi(e,n),t),t)},Sf=function(e,t){for(var r,n,i=e.length,o=1;o<i;){for(n=o,r=e[o];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==o++&&(e[n]=r)}return e},jf=function(e,t,r,n){for(var i=t.length,o=r.length,a=0,s=0;a<i||s<o;)e[a+s]=a<i&&s<o?n(t[a],r[s])<=0?t[a++]:r[s++]:a<i?t[a++]:r[s++];return e},Rf=If,kf=te.match(/firefox\/(\d+)/i),Ef=!!kf&&+kf[1],Tf=/MSIE|Trident/.test(te),Of=te.match(/AppleWebKit\/(\d+)\./),Af=!!Of&&+Of[1],Nf=[],Pf=F(Nf.sort),Lf=F(Nf.push),Cf=k((function(){Nf.sort(void 0)})),Df=k((function(){Nf.sort(null)})),Mf=Nu("sort"),Uf=!k((function(){if(ae)return ae<70;if(!(Ef&&Ef>3)){if(Tf)return!0;if(Af)return Af<603;var e,t,r,n,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)Nf.push({k:t+n,v:r})}for(Nf.sort((function(e,t){return t.v-e.v})),n=0;n<Nf.length;n++)t=Nf[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));tr({target:"Array",proto:!0,forced:Cf||!Df||!Mf||!Uf},{sort:function(e){void 0!==e&&pe(e);var t=Se(this);if(Uf)return void 0===e?Pf(t):Pf(t,e);var r,n,i=[],o=Pt(t);for(n=0;n<o;n++)n in t&&Lf(i,t[n]);for(Rf(i,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:lo(t)>lo(r)?1:-1}}(e)),r=i.length,n=0;n<r;)t[n]=i[n++];for(;n<o;)delete t[n++];return t}});var Bf=ou.values;tr({target:"Object",stat:!0},{values:function(e){return Bf(e)}});var Ff=Ct.includes;tr({target:"Array",proto:!0},{includes:function(e){return Ff(this,e,arguments.length>1?arguments[1]:void 0)}}),gi("includes");var qf=Ce("match"),zf=function(e){var t;return K(e)&&(void 0!==(t=e[qf])?!!t:"RegExp"==J(e))},Jf=R.TypeError,$f=function(e){if(zf(e))throw Jf("The method doesn't accept regular expressions");return e},Gf=Ce("match"),Qf=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[Gf]=!1,"/./"[e](t)}catch(e){}}return!1},Vf=F("".indexOf);function Hf(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function Wf(e,t,r){return Wf=Hf()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&Yn(i,r.prototype),i},Wf.apply(null,arguments)}tr({target:"String",proto:!0,forced:!Qf("includes")},{includes:function(e){return!!~Vf(lo(H(this)),lo($f(e)),arguments.length>1?arguments[1]:void 0)}}),tr({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991});var Yf=Ce("species"),Kf=RegExp.prototype,Xf=function(e,t,r,n){var i=Ce(e),o=!k((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),a=o&&!k((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[Yf]=function(){return r},r.flags="",r[i]=/./[i]),r.exec=function(){return t=!0,null},r[i](""),!t}));if(!o||!a||r){var s=F(/./[i]),u=t(i,""[e],(function(e,t,r,n,i){var a=F(e),u=t.exec;return u===Ba||u===Kf.exec?o&&!i?{done:!0,value:s(t,r,n)}:{done:!0,value:a(r,t,n)}:{done:!1}}));St(String.prototype,e,u[0]),St(Kf,i,u[1])}n&&et(Kf[i],"sham",!0)},Zf=go.charAt,eh=function(e,t,r){return t+(r?Zf(e,t).length:1)},th=Math.floor,rh=F("".charAt),nh=F("".replace),ih=F("".slice),oh=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,ah=/\$([$&'`]|\d{1,2})/g,sh=function(e,t,r,n,i,o){var a=r+e.length,s=n.length,u=ah;return void 0!==i&&(i=Se(i),u=oh),nh(o,u,(function(o,u){var c;switch(rh(u,0)){case"$":return"$";case"&":return e;case"`":return ih(t,0,r);case"'":return ih(t,a);case"<":c=i[ih(u,1,-1)];break;default:var l=+u;if(0===l)return o;if(l>s){var f=th(l/10);return 0===f?o:f<=s?void 0===n[f-1]?rh(u,1):n[f-1]+rh(u,1):o}c=n[l-1]}return void 0===c?"":c}))},uh=R.TypeError,ch=function(e,t){var r=e.exec;if(Y(r)){var n=O(r,e,t);return null!==n&&We(n),n}if("RegExp"===J(e))return O(Ba,e,t);throw uh("RegExp#exec called on incompatible receiver")},lh=Ce("replace"),fh=Math.max,hh=Math.min,dh=F([].concat),ph=F([].push),vh=F("".indexOf),gh=F("".slice),yh="$0"==="a".replace(/./,"$0"),mh=!!/./[lh]&&""===/./[lh]("a","$0"),bh=!k((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}));Xf("replace",(function(e,t,r){var n=mh?"$":"$0";return[function(e,r){var n=H(this),i=null==e?void 0:ve(e,lh);return i?O(i,e,n,r):O(t,lo(n),e,r)},function(e,i){var o=We(this),a=lo(e);if("string"==typeof i&&-1===vh(i,n)&&-1===vh(i,"$<")){var s=r(t,o,a,i);if(s.done)return s.value}var u=Y(i);u||(i=lo(i));var c=o.global;if(c){var l=o.unicode;o.lastIndex=0}for(var f=[];;){var h=ch(o,a);if(null===h)break;if(ph(f,h),!c)break;""===lo(h[0])&&(o.lastIndex=eh(a,Nt(o.lastIndex),l))}for(var d,p="",v=0,g=0;g<f.length;g++){for(var y=lo((h=f[g])[0]),m=fh(hh(kt(h.index),a.length),0),b=[],x=1;x<h.length;x++)ph(b,void 0===(d=h[x])?d:String(d));var w=h.groups;if(u){var _=dh([y],b,m,a);void 0!==w&&ph(_,w);var I=lo(Nn(i,void 0,_))}else I=sh(y,a,m,b,w,i);m>=v&&(p+=gh(a,v,m)+I,v=m+y.length)}return p+gh(a,v)}]}),!bh||!yh||mh);var xh=Ce("iterator"),wh=!k((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[xh]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host})),_h=Object.assign,Ih=Object.defineProperty,Sh=F([].concat),jh=!_h||k((function(){if(E&&1!==_h({b:1},_h(Ih({},"a",{enumerable:!0,get:function(){Ih(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!=_h({},e)[r]||Dr(_h({},t)).join("")!=n}))?function(e,t){for(var r=Se(e),n=arguments.length,i=1,o=Jt.f,a=L.f;n>i;)for(var s,u=Q(arguments[i++]),c=o?Sh(Dr(u),o(u)):Dr(u),l=c.length,f=0;l>f;)s=c[f++],E&&!O(a,u,s)||(r[s]=u[s]);return r}:_h,Rh=2147483647,kh=/[^\0-\u007E]/,Eh=/[.\u3002\uFF0E\uFF61]/g,Th="Overflow: input needs wider integers to process",Oh=R.RangeError,Ah=F(Eh.exec),Nh=Math.floor,Ph=String.fromCharCode,Lh=F("".charCodeAt),Ch=F([].join),Dh=F([].push),Mh=F("".replace),Uh=F("".split),Bh=F("".toLowerCase),Fh=function(e){return e+22+75*(e<26)},qh=function(e,t,r){var n=0;for(e=r?Nh(e/700):e>>1,e+=Nh(e/t);e>455;)e=Nh(e/35),n+=36;return Nh(n+36*e/(e+38))},zh=function(e){var t=[];e=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=Lh(e,r++);if(i>=55296&&i<=56319&&r<n){var o=Lh(e,r++);56320==(64512&o)?Dh(t,((1023&i)<<10)+(1023&o)+65536):(Dh(t,i),r--)}else Dh(t,i)}return t}(e);var r,n,i=e.length,o=128,a=0,s=72;for(r=0;r<e.length;r++)(n=e[r])<128&&Dh(t,Ph(n));var u=t.length,c=u;for(u&&Dh(t,"-");c<i;){var l=Rh;for(r=0;r<e.length;r++)(n=e[r])>=o&&n<l&&(l=n);var f=c+1;if(l-o>Nh((Rh-a)/f))throw Oh(Th);for(a+=(l-o)*f,o=l,r=0;r<e.length;r++){if((n=e[r])<o&&++a>Rh)throw Oh(Th);if(n==o){for(var h=a,d=36;;){var p=d<=s?1:d>=s+26?26:d-s;if(h<p)break;var v=h-p,g=36-p;Dh(t,Ph(Fh(p+v%g))),h=Nh(v/g),d+=36}Dh(t,Ph(Fh(h))),s=qh(a,f,c==u),a=0,c++}}a++,o++}return Ch(t,"")},Jh=Ce("iterator"),$h="URLSearchParams",Gh="URLSearchParamsIterator",Qh=bt.set,Vh=bt.getterFor($h),Hh=bt.getterFor(Gh),Wh=Z("fetch"),Yh=Z("Request"),Kh=Z("Headers"),Xh=Yh&&Yh.prototype,Zh=Kh&&Kh.prototype,ed=R.RegExp,td=R.TypeError,rd=R.decodeURIComponent,nd=R.encodeURIComponent,id=F("".charAt),od=F([].join),ad=F([].push),sd=F("".replace),ud=F([].shift),cd=F([].splice),ld=F("".split),fd=F("".slice),hd=/\+/g,dd=Array(4),pd=function(e){return dd[e-1]||(dd[e-1]=ed("((?:%[\\da-f]{2}){"+e+"})","gi"))},vd=function(e){try{return rd(e)}catch(t){return e}},gd=function(e){var t=sd(e,hd," "),r=4;try{return rd(t)}catch(e){for(;r;)t=sd(t,pd(r--),vd);return t}},yd=/[!'()~]|%20/g,md={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},bd=function(e){return md[e]},xd=function(e){return sd(nd(e),yd,bd)},wd=function(e,t){if(e<t)throw td("Not enough arguments")},_d=bi((function(e,t){Qh(this,{type:Gh,iterator:mn(Vh(e).entries),kind:t})}),"Iterator",(function(){var e=Hh(this),t=e.kind,r=e.iterator.next(),n=r.value;return r.done||(r.value="keys"===t?n.key:"values"===t?n.value:[n.key,n.value]),r}),!0),Id=function(e){this.entries=[],this.url=null,void 0!==e&&(K(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===id(e,0)?fd(e,1):e:lo(e)))};Id.prototype={type:$h,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,o,a,s,u=gn(e);if(u)for(r=(t=mn(e,u)).next;!(n=O(r,t)).done;){if(o=(i=mn(We(n.value))).next,(a=O(o,i)).done||(s=O(o,i)).done||!O(o,i).done)throw td("Expected sequence with length 2");ad(this.entries,{key:lo(a.value),value:lo(s.value)})}else for(var c in e)Re(e,c)&&ad(this.entries,{key:c,value:lo(e[c])})},parseQuery:function(e){if(e)for(var t,r,n=ld(e,"&"),i=0;i<n.length;)(t=n[i++]).length&&(r=ld(t,"="),ad(this.entries,{key:gd(ud(r)),value:gd(od(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],ad(r,xd(e.key)+"="+xd(e.value));return od(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Sd=function(){Cr(this,jd);var e=arguments.length>0?arguments[0]:void 0;Qh(this,new Id(e))},jd=Sd.prototype;if(to(jd,{append:function(e,t){wd(arguments.length,2);var r=Vh(this);ad(r.entries,{key:lo(e),value:lo(t)}),r.updateURL()},delete:function(e){wd(arguments.length,1);for(var t=Vh(this),r=t.entries,n=lo(e),i=0;i<r.length;)r[i].key===n?cd(r,i,1):i++;t.updateURL()},get:function(e){wd(arguments.length,1);for(var t=Vh(this).entries,r=lo(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){wd(arguments.length,1);for(var t=Vh(this).entries,r=lo(e),n=[],i=0;i<t.length;i++)t[i].key===r&&ad(n,t[i].value);return n},has:function(e){wd(arguments.length,1);for(var t=Vh(this).entries,r=lo(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){wd(arguments.length,1);for(var r,n=Vh(this),i=n.entries,o=!1,a=lo(e),s=lo(t),u=0;u<i.length;u++)(r=i[u]).key===a&&(o?cd(i,u--,1):(o=!0,r.value=s));o||ad(i,{key:a,value:s}),n.updateURL()},sort:function(){var e=Vh(this);Rf(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=Vh(this).entries,n=ln(e,arguments.length>1?arguments[1]:void 0),i=0;i<r.length;)n((t=r[i++]).value,t.key,this)},keys:function(){return new _d(this,"keys")},values:function(){return new _d(this,"values")},entries:function(){return new _d(this,"entries")}},{enumerable:!0}),St(jd,Jh,jd.entries,{name:"entries"}),St(jd,"toString",(function(){return Vh(this).serialize()}),{enumerable:!0}),kn(Sd,$h),tr({global:!0,forced:!wh},{URLSearchParams:Sd}),!wh&&Y(Kh)){var Rd=F(Zh.has),kd=F(Zh.set),Ed=function(e){if(K(e)){var t,r=e.body;if(cr(r)===$h)return t=e.headers?new Kh(e.headers):new Kh,Rd(t,"content-type")||kd(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Vr(e,{body:C(0,lo(r)),headers:C(0,t)})}return e};if(Y(Wh)&&tr({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return Wh(e,arguments.length>1?Ed(arguments[1]):{})}}),Y(Yh)){var Td=function(e){return Cr(this,Xh),new Yh(e,arguments.length>1?Ed(arguments[1]):{})};Xh.constructor=Td,Td.prototype=Xh,tr({global:!0,forced:!0},{Request:Td})}}var Od,Ad={URLSearchParams:Sd,getState:Vh},Nd=go.codeAt,Pd=bt.set,Ld=bt.getterFor("URL"),Cd=Ad.URLSearchParams,Dd=Ad.getState,Md=R.URL,Ud=R.TypeError,Bd=R.parseInt,Fd=Math.floor,qd=Math.pow,zd=F("".charAt),Jd=F(/./.exec),$d=F([].join),Gd=F(1..toString),Qd=F([].pop),Vd=F([].push),Hd=F("".replace),Wd=F([].shift),Yd=F("".split),Kd=F("".slice),Xd=F("".toLowerCase),Zd=F([].unshift),ep="Invalid scheme",tp="Invalid host",rp="Invalid port",np=/[a-z]/i,ip=/[\d+-.a-z]/i,op=/\d/,ap=/^0x/i,sp=/^[0-7]+$/,up=/^\d+$/,cp=/^[\da-f]+$/i,lp=/[\0\t\n\r #%/:<>?@[\\\]^|]/,fp=/[\0\t\n\r #/:<>?@[\\\]^|]/,hp=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,dp=/[\t\n\r]/g,pp=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)Zd(t,e%256),e=Fd(e/256);return $d(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,i=0,o=0;o<8;o++)0!==e[o]?(i>r&&(t=n,r=i),n=null,i=0):(null===n&&(n=o),++i);return i>r&&(t=n,r=i),t}(e),r=0;r<8;r++)i&&0===e[r]||(i&&(i=!1),n===r?(t+=r?":":"::",i=!0):(t+=Gd(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},vp={},gp=jh({},vp,{" ":1,'"':1,"<":1,">":1,"`":1}),yp=jh({},gp,{"#":1,"?":1,"{":1,"}":1}),mp=jh({},yp,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),bp=function(e,t){var r=Nd(e,0);return r>32&&r<127&&!Re(t,e)?e:encodeURIComponent(e)},xp={ftp:21,file:null,http:80,https:443,ws:80,wss:443},wp=function(e,t){var r;return 2==e.length&&Jd(np,zd(e,0))&&(":"==(r=zd(e,1))||!t&&"|"==r)},_p=function(e){var t;return e.length>1&&wp(Kd(e,0,2))&&(2==e.length||"/"===(t=zd(e,2))||"\\"===t||"?"===t||"#"===t)},Ip=function(e){return"."===e||"%2e"===Xd(e)},Sp={},jp={},Rp={},kp={},Ep={},Tp={},Op={},Ap={},Np={},Pp={},Lp={},Cp={},Dp={},Mp={},Up={},Bp={},Fp={},qp={},zp={},Jp={},$p={},Gp=function(e,t,r){var n,i,o,a=lo(e);if(t){if(i=this.parse(a))throw Ud(i);this.searchParams=null}else{if(void 0!==r&&(n=new Gp(r,!0)),i=this.parse(a,null,n))throw Ud(i);(o=Dd(new Cd)).bindURL(this),this.searchParams=o}};Gp.prototype={type:"URL",parse:function(e,t,r){var n,i,o,a,s,u=this,c=t||Sp,l=0,f="",h=!1,d=!1,p=!1;for(e=lo(e),t||(u.scheme="",u.username="",u.password="",u.host=null,u.port=null,u.path=[],u.query=null,u.fragment=null,u.cannotBeABaseURL=!1,e=Hd(e,hp,"")),e=Hd(e,dp,""),n=ga(e);l<=n.length;){switch(i=n[l],c){case Sp:if(!i||!Jd(np,i)){if(t)return ep;c=Rp;continue}f+=Xd(i),c=jp;break;case jp:if(i&&(Jd(ip,i)||"+"==i||"-"==i||"."==i))f+=Xd(i);else{if(":"!=i){if(t)return ep;f="",c=Rp,l=0;continue}if(t&&(u.isSpecial()!=Re(xp,f)||"file"==f&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=f,t)return void(u.isSpecial()&&xp[u.scheme]==u.port&&(u.port=null));f="","file"==u.scheme?c=Mp:u.isSpecial()&&r&&r.scheme==u.scheme?c=kp:u.isSpecial()?c=Ap:"/"==n[l+1]?(c=Ep,l++):(u.cannotBeABaseURL=!0,Vd(u.path,""),c=zp)}break;case Rp:if(!r||r.cannotBeABaseURL&&"#"!=i)return ep;if(r.cannotBeABaseURL&&"#"==i){u.scheme=r.scheme,u.path=Bi(r.path),u.query=r.query,u.fragment="",u.cannotBeABaseURL=!0,c=$p;break}c="file"==r.scheme?Mp:Tp;continue;case kp:if("/"!=i||"/"!=n[l+1]){c=Tp;continue}c=Np,l++;break;case Ep:if("/"==i){c=Pp;break}c=qp;continue;case Tp:if(u.scheme=r.scheme,i==Od)u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=Bi(r.path),u.query=r.query;else if("/"==i||"\\"==i&&u.isSpecial())c=Op;else if("?"==i)u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=Bi(r.path),u.query="",c=Jp;else{if("#"!=i){u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=Bi(r.path),u.path.length--,c=qp;continue}u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=Bi(r.path),u.query=r.query,u.fragment="",c=$p}break;case Op:if(!u.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,c=qp;continue}c=Pp}else c=Np;break;case Ap:if(c=Np,"/"!=i||"/"!=zd(f,l+1))continue;l++;break;case Np:if("/"!=i&&"\\"!=i){c=Pp;continue}break;case Pp:if("@"==i){h&&(f="%40"+f),h=!0,o=ga(f);for(var v=0;v<o.length;v++){var g=o[v];if(":"!=g||p){var y=bp(g,mp);p?u.password+=y:u.username+=y}else p=!0}f=""}else if(i==Od||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(h&&""==f)return"Invalid authority";l-=ga(f).length+1,f="",c=Lp}else f+=i;break;case Lp:case Cp:if(t&&"file"==u.scheme){c=Bp;continue}if(":"!=i||d){if(i==Od||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(u.isSpecial()&&""==f)return tp;if(t&&""==f&&(u.includesCredentials()||null!==u.port))return;if(a=u.parseHost(f))return a;if(f="",c=Fp,t)return;continue}"["==i?d=!0:"]"==i&&(d=!1),f+=i}else{if(""==f)return tp;if(a=u.parseHost(f))return a;if(f="",c=Dp,t==Cp)return}break;case Dp:if(!Jd(op,i)){if(i==Od||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()||t){if(""!=f){var m=Bd(f,10);if(m>65535)return rp;u.port=u.isSpecial()&&m===xp[u.scheme]?null:m,f=""}if(t)return;c=Fp;continue}return rp}f+=i;break;case Mp:if(u.scheme="file","/"==i||"\\"==i)c=Up;else{if(!r||"file"!=r.scheme){c=qp;continue}if(i==Od)u.host=r.host,u.path=Bi(r.path),u.query=r.query;else if("?"==i)u.host=r.host,u.path=Bi(r.path),u.query="",c=Jp;else{if("#"!=i){_p($d(Bi(n,l),""))||(u.host=r.host,u.path=Bi(r.path),u.shortenPath()),c=qp;continue}u.host=r.host,u.path=Bi(r.path),u.query=r.query,u.fragment="",c=$p}}break;case Up:if("/"==i||"\\"==i){c=Bp;break}r&&"file"==r.scheme&&!_p($d(Bi(n,l),""))&&(wp(r.path[0],!0)?Vd(u.path,r.path[0]):u.host=r.host),c=qp;continue;case Bp:if(i==Od||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&wp(f))c=qp;else if(""==f){if(u.host="",t)return;c=Fp}else{if(a=u.parseHost(f))return a;if("localhost"==u.host&&(u.host=""),t)return;f="",c=Fp}continue}f+=i;break;case Fp:if(u.isSpecial()){if(c=qp,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=Od&&(c=qp,"/"!=i))continue}else u.fragment="",c=$p;else u.query="",c=Jp;break;case qp:if(i==Od||"/"==i||"\\"==i&&u.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=Xd(s=f))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(u.shortenPath(),"/"==i||"\\"==i&&u.isSpecial()||Vd(u.path,"")):Ip(f)?"/"==i||"\\"==i&&u.isSpecial()||Vd(u.path,""):("file"==u.scheme&&!u.path.length&&wp(f)&&(u.host&&(u.host=""),f=zd(f,0)+":"),Vd(u.path,f)),f="","file"==u.scheme&&(i==Od||"?"==i||"#"==i))for(;u.path.length>1&&""===u.path[0];)Wd(u.path);"?"==i?(u.query="",c=Jp):"#"==i&&(u.fragment="",c=$p)}else f+=bp(i,yp);break;case zp:"?"==i?(u.query="",c=Jp):"#"==i?(u.fragment="",c=$p):i!=Od&&(u.path[0]+=bp(i,vp));break;case Jp:t||"#"!=i?i!=Od&&("'"==i&&u.isSpecial()?u.query+="%27":u.query+="#"==i?"%23":bp(i,vp)):(u.fragment="",c=$p);break;case $p:i!=Od&&(u.fragment+=bp(i,gp))}l++}},parseHost:function(e){var t,r,n;if("["==zd(e,0)){if("]"!=zd(e,e.length-1))return tp;if(t=function(e){var t,r,n,i,o,a,s,u=[0,0,0,0,0,0,0,0],c=0,l=null,f=0,h=function(){return zd(e,f)};if(":"==h()){if(":"!=zd(e,1))return;f+=2,l=++c}for(;h();){if(8==c)return;if(":"!=h()){for(t=r=0;r<4&&Jd(cp,h());)t=16*t+Bd(h(),16),f++,r++;if("."==h()){if(0==r)return;if(f-=r,c>6)return;for(n=0;h();){if(i=null,n>0){if(!("."==h()&&n<4))return;f++}if(!Jd(op,h()))return;for(;Jd(op,h());){if(o=Bd(h(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;f++}u[c]=256*u[c]+i,2!=++n&&4!=n||c++}if(4!=n)return;break}if(":"==h()){if(f++,!h())return}else if(h())return;u[c++]=t}else{if(null!==l)return;f++,l=++c}}if(null!==l)for(a=c-l,c=7;0!=c&&a>0;)s=u[c],u[c--]=u[l+a-1],u[l+--a]=s;else if(8!=c)return;return u}(Kd(e,1,-1)),!t)return tp;this.host=t}else if(this.isSpecial()){if(e=function(e){var t,r,n=[],i=Uh(Mh(Bh(e),Eh,"."),".");for(t=0;t<i.length;t++)r=i[t],Dh(n,Ah(kh,r)?"xn--"+zh(r):r);return Ch(n,".")}(e),Jd(lp,e))return tp;if(t=function(e){var t,r,n,i,o,a,s,u=Yd(e,".");if(u.length&&""==u[u.length-1]&&u.length--,(t=u.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(i=u[n]))return e;if(o=10,i.length>1&&"0"==zd(i,0)&&(o=Jd(ap,i)?16:8,i=Kd(i,8==o?1:2)),""===i)a=0;else{if(!Jd(10==o?up:8==o?sp:cp,i))return e;a=Bd(i,o)}Vd(r,a)}for(n=0;n<t;n++)if(a=r[n],n==t-1){if(a>=qd(256,5-t))return null}else if(a>255)return null;for(s=Qd(r),n=0;n<r.length;n++)s+=r[n]*qd(256,3-n);return s}(e),null===t)return tp;this.host=t}else{if(Jd(fp,e))return tp;for(t="",r=ga(e),n=0;n<r.length;n++)t+=bp(r[n],vp);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return Re(xp,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&wp(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,i=e.host,o=e.port,a=e.path,s=e.query,u=e.fragment,c=t+":";return null!==i?(c+="//",e.includesCredentials()&&(c+=r+(n?":"+n:"")+"@"),c+=pp(i),null!==o&&(c+=":"+o)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?a[0]:a.length?"/"+$d(a,"/"):"",null!==s&&(c+="?"+s),null!==u&&(c+="#"+u),c},setHref:function(e){var t=this.parse(e);if(t)throw Ud(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new Qp(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+pp(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(lo(e)+":",Sp)},getUsername:function(){return this.username},setUsername:function(e){var t=ga(lo(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=bp(t[r],mp)}},getPassword:function(){return this.password},setPassword:function(e){var t=ga(lo(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=bp(t[r],mp)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?pp(e):pp(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Lp)},getHostname:function(){var e=this.host;return null===e?"":pp(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Cp)},getPort:function(){var e=this.port;return null===e?"":lo(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=lo(e))?this.port=null:this.parse(e,Dp))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+$d(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Fp))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=lo(e))?this.query=null:("?"==zd(e,0)&&(e=Kd(e,1)),this.query="",this.parse(e,Jp)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=lo(e))?("#"==zd(e,0)&&(e=Kd(e,1)),this.fragment="",this.parse(e,$p)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Qp=function(e){var t=Cr(this,Vp),r=arguments.length>1?arguments[1]:void 0,n=Pd(t,new Gp(e,!1,r));E||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},Vp=Qp.prototype,Hp=function(e,t){return{get:function(){return Ld(this)[e]()},set:t&&function(e){return Ld(this)[t](e)},configurable:!0,enumerable:!0}};if(E&&Mr(Vp,{href:Hp("serialize","setHref"),origin:Hp("getOrigin"),protocol:Hp("getProtocol","setProtocol"),username:Hp("getUsername","setUsername"),password:Hp("getPassword","setPassword"),host:Hp("getHost","setHost"),hostname:Hp("getHostname","setHostname"),port:Hp("getPort","setPort"),pathname:Hp("getPathname","setPathname"),search:Hp("getSearch","setSearch"),searchParams:Hp("getSearchParams"),hash:Hp("getHash","setHash")}),St(Vp,"toJSON",(function(){return Ld(this).serialize()}),{enumerable:!0}),St(Vp,"toString",(function(){return Ld(this).serialize()}),{enumerable:!0}),Md){var Wp=Md.createObjectURL,Yp=Md.revokeObjectURL;Wp&&St(Qp,"createObjectURL",ln(Wp,Md)),Yp&&St(Qp,"revokeObjectURL",ln(Yp,Md))}kn(Qp,"URL"),tr({global:!0,forced:!wh,sham:!E},{URL:Qp});var Kp=Ia.UNSUPPORTED_Y,Xp=4294967295,Zp=Math.min,ev=[].push,tv=F(/./.exec),rv=F(ev),nv=F("".slice),iv=!k((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var r="ab".split(e);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}));Xf("split",(function(e,t,r){var n;return n="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,r){var n=lo(H(this)),i=void 0===r?Xp:r>>>0;if(0===i)return[];if(void 0===e)return[n];if(!zf(e))return O(t,n,e,i);for(var o,a,s,u=[],c=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),l=0,f=new RegExp(e.source,c+"g");(o=O(Ba,f,n))&&!((a=f.lastIndex)>l&&(rv(u,nv(n,l,o.index)),o.length>1&&o.index<n.length&&Nn(ev,u,Bi(o,1)),s=o[0].length,l=a,u.length>=i));)f.lastIndex===o.index&&f.lastIndex++;return l===n.length?!s&&tv(f,"")||rv(u,""):rv(u,nv(n,l)),u.length>i?Bi(u,0,i):u}:"0".split(void 0,0).length?function(e,r){return void 0===e&&0===r?[]:O(t,this,e,r)}:t,[function(t,r){var i=H(this),o=null==t?void 0:ve(t,e);return o?O(o,t,i,r):O(n,lo(i),t,r)},function(e,i){var o=We(this),a=lo(e),s=r(n,o,a,i,n!==t);if(s.done)return s.value;var u=Io(o,RegExp),c=o.unicode,l=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(Kp?"g":"y"),f=new u(Kp?"^(?:"+o.source+")":o,l),h=void 0===i?Xp:i>>>0;if(0===h)return[];if(0===a.length)return null===ch(f,a)?[a]:[];for(var d=0,p=0,v=[];p<a.length;){f.lastIndex=Kp?0:p;var g,y=ch(f,Kp?nv(a,p):a);if(null===y||(g=Zp(Nt(f.lastIndex+(Kp?p:0)),a.length))===d)p=eh(a,p,c);else{if(rv(v,nv(a,d,p)),v.length===h)return v;for(var m=1;m<=y.length-1;m++)if(rv(v,y[m]),v.length===h)return v;p=d=g}}return rv(v,nv(a,d)),v}]}),!iv,Kp);var ov=F([].join),av=Q!=Object,sv=Nu("join",",");tr({target:"Array",proto:!0,forced:av||!sv},{join:function(e){return ov(W(this),void 0===e?",":e)}});var uv=It.PROPER,cv="toString",lv=RegExp.prototype,fv=lv.toString,hv=F(ma),dv=k((function(){return"/a/b"!=fv.call({source:"a",flags:"b"})})),pv=uv&&fv.name!=cv;(dv||pv)&&St(RegExp.prototype,cv,(function(){var e=We(this),t=lo(e.source),r=e.flags;return"/"+t+"/"+lo(void 0===r&&ee(lv,e)&&!("flags"in lv)?hv(e):r)}),{unsafe:!0});var vv=k((function(){Xr(1)}));tr({target:"Object",stat:!0,forced:vv,sham:!Hr},{getPrototypeOf:function(e){return Xr(Se(e))}}),tr({target:"Object",stat:!0,forced:Object.assign!==jh},{assign:jh}),Xf("match",(function(e,t,r){return[function(t){var r=H(this),n=null==t?void 0:ve(t,e);return n?O(n,t,r):new RegExp(t)[e](lo(r))},function(e){var n=We(this),i=lo(e),o=r(t,n,i);if(o.done)return o.value;if(!n.global)return ch(n,i);var a=n.unicode;n.lastIndex=0;for(var s,u=[],c=0;null!==(s=ch(n,i));){var l=lo(s[0]);u[c]=l,""===l&&(n.lastIndex=eh(i,Nt(n.lastIndex),a)),c++}return 0===c?null:u}]}));var gv=Ce("matchAll"),yv="RegExp String",mv="RegExp String Iterator",bv=bt.set,xv=bt.getterFor(mv),wv=RegExp.prototype,_v=R.TypeError,Iv=F(ma),Sv=F("".indexOf),jv=F("".matchAll),Rv=!!jv&&!k((function(){jv("a",/./)})),kv=bi((function(e,t,r,n){bv(this,{type:mv,regexp:e,string:t,global:r,unicode:n,done:!1})}),yv,(function(){var e=xv(this);if(e.done)return{value:void 0,done:!0};var t=e.regexp,r=e.string,n=ch(t,r);return null===n?{value:void 0,done:e.done=!0}:e.global?(""===lo(n[0])&&(t.lastIndex=eh(r,Nt(t.lastIndex),e.unicode)),{value:n,done:!1}):(e.done=!0,{value:n,done:!1})})),Ev=function(e){var t,r,n,i,o,a,s=We(this),u=lo(e);return t=Io(s,RegExp),void 0===(r=s.flags)&&ee(wv,s)&&!("flags"in wv)&&(r=Iv(s)),n=void 0===r?"":lo(r),i=new t(t===RegExp?s.source:s,n),o=!!~Sv(n,"g"),a=!!~Sv(n,"u"),i.lastIndex=Nt(s.lastIndex),new kv(i,u,o,a)};tr({target:"String",proto:!0,forced:Rv},{matchAll:function(e){var t,r,n,i=H(this);if(null!=e){if(zf(e)&&(t=lo(H("flags"in wv?e.flags:Iv(e))),!~Sv(t,"g")))throw _v("`.matchAll` does not allow non-global regexes");if(Rv)return jv(i,e);if(n=ve(e,gv))return O(n,e,i)}else if(Rv)return jv(i,e);return r=lo(i),new RegExp(e,"g")[gv](r)}}),gv in wv||St(wv,gv,Ev);var Tv,Ov=It.PROPER,Av=of.trim;tr({target:"String",proto:!0,forced:(Tv="trim",k((function(){return!!Xl[Tv]()||"​…᠎"!=="​…᠎"[Tv]()||Ov&&Xl[Tv].name!==Tv})))},{trim:function(){return Av(this)}});var Nv=Ze.f,Pv=zt.f,Lv=bt.enforce,Cv=Ce("match"),Dv=R.RegExp,Mv=Dv.prototype,Uv=R.SyntaxError,Bv=F(ma),Fv=F(Mv.exec),qv=F("".charAt),zv=F("".replace),Jv=F("".indexOf),$v=F("".slice),Gv=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Qv=/a/g,Vv=/a/g,Hv=new Dv(Qv)!==Qv,Wv=Ia.MISSED_STICKY,Yv=Ia.UNSUPPORTED_Y,Kv=E&&(!Hv||Wv||ja||ka||k((function(){return Vv[Cv]=!1,Dv(Qv)!=Qv||Dv(Vv)==Vv||"/a/i"!=Dv(Qv,"i")})));if(Zt("RegExp",Kv)){for(var Xv=function(e,t){var r,n,i,o,a,s,u=ee(Mv,this),c=zf(e),l=void 0===t,f=[],h=e;if(!u&&c&&l&&e.constructor===Xv)return e;if((c||ee(Mv,e))&&(e=e.source,l&&(t="flags"in h?h.flags:Bv(h))),e=void 0===e?"":lo(e),t=void 0===t?"":lo(t),h=e,ja&&"dotAll"in Qv&&(n=!!t&&Jv(t,"s")>-1)&&(t=zv(t,/s/g,"")),r=t,Wv&&"sticky"in Qv&&(i=!!t&&Jv(t,"y")>-1)&&Yv&&(t=zv(t,/y/g,"")),ka&&(o=function(e){for(var t,r=e.length,n=0,i="",o=[],a={},s=!1,u=!1,c=0,l="";n<=r;n++){if("\\"===(t=qv(e,n)))t+=qv(e,++n);else if("]"===t)s=!1;else if(!s)switch(!0){case"["===t:s=!0;break;case"("===t:Fv(Gv,$v(e,n+1))&&(n+=2,u=!0),i+=t,c++;continue;case">"===t&&u:if(""===l||Re(a,l))throw new Uv("Invalid capture group name");a[l]=!0,o[o.length]=[l,c],u=!1,l="";continue}u?l+=t:i+=t}return[i,o]}(e),e=o[0],f=o[1]),a=Zi(Dv(e,t),u?this:Mv,Xv),(n||i||f.length)&&(s=Lv(a),n&&(s.dotAll=!0,s.raw=Xv(function(e){for(var t,r=e.length,n=0,i="",o=!1;n<=r;n++)"\\"!==(t=qv(e,n))?o||"."!==t?("["===t?o=!0:"]"===t&&(o=!1),i+=t):i+="[\\s\\S]":i+=t+qv(e,++n);return i}(e),r)),i&&(s.sticky=!0),f.length&&(s.groups=f)),e!==h)try{et(a,"source",""===h?"(?:)":h)}catch(e){}return a},Zv=function(e){e in Xv||Nv(Xv,e,{configurable:!0,get:function(){return Dv[e]},set:function(t){Dv[e]=t}})},eg=Pv(Dv),tg=0;eg.length>tg;)Zv(eg[tg++]);Mv.constructor=Xv,Xv.prototype=Mv,St(R,"RegExp",Xv)}no("RegExp");var rg=Ia.MISSED_STICKY,ng=Ze.f,ig=bt.get,og=RegExp.prototype,ag=R.TypeError;E&&rg&&ng(og,"sticky",{configurable:!0,get:function(){if(this!==og){if("RegExp"===J(this))return!!ig(this).sticky;throw ag("Incompatible receiver, RegExp required")}}});var sg,ug=Qe.f,cg=F("".startsWith),lg=F("".slice),fg=Math.min,hg=Qf("startsWith"),dg=!(hg||(sg=ug(String.prototype,"startsWith"),!sg||sg.writable));tr({target:"String",proto:!0,forced:!dg&&!hg},{startsWith:function(e){var t=lo(H(this));$f(e);var r=Nt(fg(arguments.length>1?arguments[1]:void 0,t.length)),n=lo(e);return cg?cg(t,n,r):lg(t,r,r+n.length)===n}});var pg=Qe.f,vg=F("".endsWith),gg=F("".slice),yg=Math.min,mg=Qf("endsWith"),bg=!mg&&!!function(){var e=pg(String.prototype,"endsWith");return e&&!e.writable}();tr({target:"String",proto:!0,forced:!bg&&!mg},{endsWith:function(e){var t=lo(H(this));$f(e);var r=arguments.length>1?arguments[1]:void 0,n=t.length,i=void 0===r?n:yg(Nt(r),n),o=lo(e);return vg?vg(t,o,i):gg(t,i-o.length,i)===o}});var xg=("undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:window).Error,wg=function(e){Kn(JSError,xg);var t,r,n=(t=JSError,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=ti(t);if(r){var i=ti(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return ei(this,e)});function JSError(e,t){var r;return Hn(this,JSError),(r=n.call.apply(n,[this].concat([e,t]))).name="JSError"===(this instanceof JSError?this.constructor:void 0).name?"Error":(this instanceof JSError?this.constructor:void 0).name,Object.setPrototypeOf(Wn(r),(this instanceof JSError?this.constructor:void 0).prototype),r}return JSError}(),_g=function(){function e(){if(Hn(this,e),!this.static().buildingPureInstance())return this.initializeProxy(),this._proxy}return ci(e,[{key:"static",value:function(){return this.constructor}},{key:"__get",value:function(e){return Reflect.get(this._proxyTarget,e)}},{key:"__set",value:function(e,t){Reflect.set(this._proxyTarget,e,t)}},{key:"__delete",value:function(e){Reflect.deleteProperty(this._proxyTarget,e)}},{key:"initializeProxy",value:function(){var e=this.static();this._proxyTarget=this,this._proxy=new Proxy(this._proxyTarget,{get:function(t,r,n){return"string"!=typeof r||r in t||e.isReservedProperty(r)?Reflect.get(t,r,n):t.__get(r)},set:function(t,r,n,i){return"string"!=typeof r||r in t||e.isReservedProperty(r)?Reflect.set(t,r,n,i):(t.__set(r,n),!0)},deleteProperty:function(t,r){return"string"!=typeof r||r in t||e.isReservedProperty(r)?Reflect.deleteProperty(t,r):(t.__delete(r),!0)}})}}],[{key:"buildingPureInstance",value:function(){return!!this.__buildingPureInstance||(this.__reservedProperties.has(this)||(this.__buildingPureInstance=!0,this.__reservedProperties.set(this,new Set(Object.getOwnPropertyNames(new this))),this.__buildingPureInstance=!1),!1)}},{key:"isReservedProperty",value:function(e){var t;return!(null===(t=this.__reservedProperties.get(this))||void 0===t||!t.has(e))}}]),e}();function Ig(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}li(_g,"__buildingPureInstance",void 0),li(_g,"__reservedProperties",new WeakMap);var Sg,jg=Array.isArray.bind(Array);function Rg(e){return"object"===Ws(e)&&null!==e}function kg(e){for(var t in e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ig(Object(r),!0).forEach((function(t){li(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ig(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e))Eg(e,t)&&(e[t]=kg(e[t]));return e}function Eg(e,t){var r;return function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}(e,t)&&Rg(r=e[t])&&r.constructor===Object}function Tg(e){for(var t={},r=0,n=Object.entries(e);r<n.length;r++){var i=Va(n[r],2),o=i[0],a=i[1];null!=a&&(t[o]=a)}return t}function Og(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Ag(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ag(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},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(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function Ag(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.entries.bind(Object),Sg=Symbol.iterator,function(e){function t(e){Hn(this,t),li(this,"keysToItems",void 0),li(this,"itemsToKeys",void 0),li(this,"getKey",void 0),this.keysToItems=new Map,this.itemsToKeys=new WeakMap,this.getKey=null!=e?e:function(e){return function(e){return String(e)}(e)}}ci(t,[{key:Sg,value:Ka.mark((function e(){return Ka.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(this.keysToItems,"t0",1);case 1:case"end":return e.stop()}}),e,this)}))},{key:"size",get:function(){return this.keysToItems.size}},{key:"items",value:function(){return this.keysToItems.values()}},{key:"keys",value:function(){return this.keysToItems.keys()}},{key:"entries",value:function(){return this.keysToItems.entries()}},{key:"add",value:function(e){var t=this.getKey(e);this.keysToItems.set(t,e),this.itemsToKeys.set(e,t)}},{key:"require",value:function(e){return this.keysToItems.get(e)||fail("Couldn't find item with '".concat(e,"' key"))}},{key:"get",value:function(e){return this.keysToItems.get(e)}},{key:"getKeys",value:function(){return Wa(this.keysToItems.keys())}},{key:"getItems",value:function(){return Wa(this.keysToItems.values())}},{key:"hasKey",value:function(e){return this.keysToItems.has(e)}},{key:"hasItem",value:function(e){return this.itemsToKeys.has(e)}},{key:"delete",value:function(e){var t=this.itemsToKeys.get(e);t&&(this.itemsToKeys.delete(e),this.keysToItems.delete(t))}},{key:"filter",value:function(e){var t,r=this.constructor.createFromArray([],this.getKey),n=Og(this.entries());try{for(n.s();!(t=n.n()).done;){var i=Va(t.value,2),o=i[0],a=i[1];e(a,o)&&r.add(a)}}catch(e){n.e(e)}finally{n.f()}return r}},{key:"clear",value:function(){this.itemsToKeys=new WeakMap,this.keysToItems.clear()}}],[{key:"createFromArray",value:function(e,r){var n,i="string"==typeof r?function(e){return e[r]}:r,o=new t(i),a=Og(e);try{for(a.s();!(n=a.n()).done;){var s=n.value;o.add(s)}}catch(e){a.e(e)}finally{a.f()}return o}}])}(),function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;Hn(this,e),li(this,"count",void 0),li(this,"listeners",void 0),this.count=t,this.listeners=new Set}var t,r,n;ci(e,[{key:"acquire",value:(n=Uu(Ka.mark((function e(){return Ka.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.waitAvailable();case 2:this.count=Math.max(this.count-1,0);case 3:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"release",value:function(){this.count++,this.notifyAvailable()}},{key:"run",value:(r=Uu(Ka.mark((function e(t){var r;return Ka.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.acquire();case 2:return e.next=4,t();case 4:return r=e.sent,this.release(),e.abrupt("return",r);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"waitAvailable",value:(t=Uu(Ka.mark((function e(){var t=this;return Ka.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==this.count){e.next=5;break}return e.next=3,new Promise((function(e){t.listeners.add((function r(){t.listeners.delete(r),e(null)}))}));case 3:e.next=0;break;case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"notifyAvailable",value:function(){this.listeners.forEach((function(e){return e()}))}}])}();var Ng={},Pg=function(){function e(){Hn(this,e)}return ci(e,[{key:"set",value:function(e,t){void 0===t&&(t="__undefined__"),localStorage.setItem(e,JSON.stringify(t))}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=localStorage.getItem(e);return null===r?t:"__undefined__"!==r?JSON.parse(r):void 0}},{key:"require",value:function(e){var t=this.get(e,Ng);if(t===Ng)throw new Error("Failed getting required key from local storage: '".concat(e,"'"));return t}},{key:"has",value:function(e){return null!==localStorage.getItem(e)}},{key:"remove",value:function(e){localStorage.removeItem(e)}},{key:"pull",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!this.has(e))return t;var r=this.get(e);return this.remove(e),r}}],[{key:"instance",get:function(){var t;return this._instance=null!==(t=this._instance)&&void 0!==t?t:new e}}]),e}();function Lg(e,t){return e>t?1:t>e?-1:0}function Cg(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Dg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Dg(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},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(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function Dg(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Mg(e,t){return t?e.filter(t):e.filter((function(e){return!!e}))}function Ug(e,t){var r=e.indexOf(t);return-1!==r&&(e.splice(r,1),!0)}function Bg(e,t,r){var n=e.indexOf(t);return-1!==n&&(e[n]=r,!0)}function Fg(e,t){return e.map((function(e,t){return[e,t]})).filter((function(e){var r=Va(e,2);r[0];var n=r[1];return!t.includes(n)})).map((function(e){return Va(e,1)[0]}))}function qg(e){return Array.isArray(e)||function(e){return"function"==typeof(null==e?void 0:e[Symbol.iterator])}(e)&&!function(e){return"string"==typeof e||e instanceof String}(e)?Array.from(e):[e]}function zg(e){if(!e)return null;try{var t=new Date(e),r=t.getTime();return isNaN(r)||0===r?null:t}catch(e){return null}}function Jg(e){return e?(e^16*Math.random()>>e/4).toString(16):"10000000-1000-4000-8000-100000000000".replace(/[018]/g,Jg)}function $g(){return Jg()}function Gg(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return"function"!=typeof e?e.catch((function(){return t})):Uu(Ka.mark((function r(){var n=arguments;return Ka.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,e.apply(void 0,n);case 3:return r.abrupt("return",r.sent);case 6:return r.prev=6,r.t0=r.catch(0),r.abrupt("return",null!=t?t:null);case 9:case"end":return r.stop()}}),r,null,[[0,6]])})))}function Qg(e,t){return e.matchAll(t)}function Vg(e){return e.split(/_|-|\s|(?=[A-Z])/)}function Hg(e){var t;return null!==(t=Kg(e))&&void 0!==t?t:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Something went wrong",t="string"==typeof e?Error:e,r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];throw Wf(t,Wa("string"==typeof e?[e]:n))}("Failed getting parent directory from '".concat(e,"'"))}function Wg(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(var n=t.shift();t.length>0;){var i=t.shift();i.startsWith("/")?n=Yg(n)+i:i.match(/^[\w-]+:\/\//)?n=i:n.endsWith("/")?n+=i:n+="/"+i}return n}function Yg(e){var t=e.indexOf("://")+3,r=e.substr(t).indexOf("/");return-1!==r?e.substring(0,t+r):e}function Kg(e){if(e.endsWith("/")&&(e=e.substring(0,e.length-1)),Yg(e)===e)return null;var t=e.lastIndexOf("/");return-1!==t?e.substr(0,t+1):null}function Xg(e){var t=e.trim().match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/);if(!t)return null;var r=t[4]||"",n=Va(-1===r.indexOf(":")?[r]:r.split(":"),2),i=n[0],o=n[1];return{protocol:t[2]||void 0,domain:i||void 0,port:o||void 0,path:t[5]||void 0,query:t[7]||void 0,fragment:t[9]||void 0}}function Zg(e){return function(e,t){var r,n,i=Xg(e);if(!i)return e;for(var o=0,a=Object.entries(i);o<a.length;o++){var s=Va(a[o],2),u=s[0],c=s[1];i[u]=!1!==t[u]&&c||""}return[i.protocol?"".concat(i.protocol,"://"):"",null!==(r=i.domain)&&void 0!==r?r:"",i.port?":".concat(i.port):"",null!==(n=i.path)&&void 0!==n?n:"",i.query?"?".concat(i.query):"",i.fragment?"#".concat(i.fragment):""].join("")}(e,{protocol:!0,domain:!0,port:!0,path:!0,query:!1,fragment:!1})}function ey(e,t){for(var r=e.prototype,n=function(){var e=Va(o[i],2),t=e[0],n=e[1];r[t]=function(){for(var e,t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];var o=n.apply(void 0,[this.value].concat(r));return null===(e=this.chain)||void 0===e?void 0:e.call(this,o)}},i=0,o=Object.entries(t);i<o.length;i++)n()}function ty(e,t){for(var r=e.prototype,n=Object.getOwnPropertyDescriptors(t.prototype),i=function(){var e=Va(a[o],2),t=e[0],n=e[1];return t in r?"continue":"function"!=typeof n.value?(Object.defineProperty(r,t,{get:function(){return this.chain(this.value[t])}}),"continue"):void(r[t]=function(){for(var e,t,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=(e=n.value).call.apply(e,[this.value].concat(i));return null===(t=this.chain)||void 0===t?void 0:t.call(this,a)})},o=0,a=Object.entries(n);o<a.length;o++)i()}li(Pg,"_instance",void 0),function(){function e(){Hn(this,e),li(this,"resolveListeners",[]),li(this,"rejectListeners",[]),li(this,"resetListeners",[]),this.setPromiseValues()}ci(e,[{key:"value",get:function(){return this._value||null}},{key:"isResolved",value:function(){return"_value"in this}},{key:"then",value:function(e,t){return this.promise.then(e,t)}},{key:"catch",value:function(e){return this.promise.catch(e)}},{key:"finally",value:function(e){return this.promise.finally(e)}},{key:"resolve",value:function(e){this.isResolved()&&this.reset(),this._value=e,this._resolve(e),this.resolveListeners.forEach((function(t){return t(e)}))}},{key:"reject",value:function(e){this.isResolved()&&this.reset(),delete this._value,this._reject(e),this.rejectListeners.forEach((function(t){return t(e)}))}},{key:"onResolve",value:function(e){var t=this;return this.resolveListeners.push(e),function(){return Ug(t.resolveListeners,e)}}},{key:"onReject",value:function(e){var t=this;return this.rejectListeners.push(e),function(){return Ug(t.rejectListeners,e)}}},{key:"onReset",value:function(e){var t=this;return this.resetListeners.push(e),function(){return Ug(t.resetListeners,e)}}},{key:"reset",value:function(){this.setPromiseValues(),this.rejectListeners.forEach((function(e){return e()}))}},{key:"setPromiseValues",value:function(){var e=this;this.promise=new Promise((function(t,r){e._resolve=t,e._reject=r}))}}],[{key:"from",value:function(t){var r=new e;return t.then(r.resolve.bind(r)).catch(r.reject.bind(r)),r}}])}();var ry=function(){function e(t){Hn(this,e),li(this,"value",void 0),this.value=t}return ci(e,[{key:"create",value:function(e){return new this.constructor(e)}},{key:"chain",value:function(e){return this.isPrimitive(e)?this.create(e):e}}],[{key:"isPrimitive",value:function(e){return this.prototype.isPrimitive(e)}}]),e}();var ny={clear:function(e){e.splice(0,e.length)},diff:function(e,t,r){var n,i=e.slice(0),o=[],a=r?function(e,t){return t.findIndex((function(t){return r(e,t)}))}:function(e,t){return t.indexOf(e)},s=Cg(t);try{for(s.s();!(n=s.n()).done;){var u=n.value,c=a(u,i);-1!==c?i.splice(c,1):o.push(u)}}catch(e){s.e(e)}finally{s.f()}return{added:o,removed:i}},filter:Mg,first:function(e,t){var r,n=Cg(e);try{for(n.s();!(r=n.n()).done;){var i=r.value;if(t(i))return i}}catch(e){n.e(e)}finally{n.f()}return null},flatMap:function(e,t){return Wa(e.entries()).flatMap((function(e){var r=Va(e,2),n=r[0],i=r[1];return t(i,n)}))},isEmpty:function(e){return 0===e.length},project:function(e,t){return e.map((function(e){return e[t]}))},randomItem:function(e){return 0===e.length?null:e[Math.floor(Math.random()*e.length)]},randomItems:function(e,t){for(var r=e.slice(0),n=[];r.length>0&&n.length<t;){var i=Math.floor(Math.random()*r.length);n.push(r[i]),r.splice(i,1)}return n},remove:Ug,removeIndex:function(e,t){return e.splice(Number(t),1).length>0},replace:Bg,sorted:function(e,t,r){return r="asc"===t||"desc"===t?t:r,e.slice(0).sort(function(){var e="desc"===r?function(e){return function(t,r){return Lg(r[e],t[e])}}:function(e){return function(t,r){return Lg(t[e],r[e])}};switch(Ws(t)){case"function":return t;case"string":if("asc"===t)return;return"desc"===t?function(e,t){return Lg(t,e)}:e(t);case"object":var n=t.map((function(t){return e(t)}));return function(e,t){var r,i=Cg(n);try{for(i.s();!(r=i.n()).done;){var o=(0,r.value)(e,t);if(0!==o)return o}}catch(e){i.e(e)}finally{i.f()}return 0}}}())},unique:function(e,t){return t?Object.values(e.reduce((function(e,r){var n,i=t(r);return e[i]=null!==(n=e[i])&&void 0!==n?n:r,e}),{})):Wa(new Set(e))},where:function(e,t,r){return e.filter((function(e){var n=e[t],i="function"==typeof n?n.call(e):n;return r?i===r:!!i}))},without:function(e,t){return Array.isArray(t)?Mg(e,(function(e){return-1===t.indexOf(e)})):function(e,t){return Fg(e,[t])}(e,e.indexOf(t))},withoutIndexes:Fg},iy=function(e,t){Kn(n,e);var r=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ti(e);if(t){var i=ti(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ei(this,r)}}(n);function n(){return Hn(this,n),r.apply(this,arguments)}return ci(n,[{key:t,value:Ka.mark((function e(){return Ka.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(this.value,"t0",1);case 1:case"end":return e.stop()}}),e,this)}))},{key:"get",value:function(e){return this.value[e]}},{key:"toArray",value:function(){return this.value.slice(0)}},{key:"isPrimitive",value:function(e){return Array.isArray(e)}}],[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=this.prototype;return t.create(e)}}]),n}(ry,Symbol.iterator);ey(iy,ny),ty(iy,Array);var oy={reverse:function(e){return e.split("").reverse().join("")},toCamelCase:function(e){var t,r=Vg(e),n=Ja(t=r)||Ha(t)||Ga(t)||Qa(),i=n[0],o=n.slice(1);return(null!=i?i:"").toLowerCase()+o.map((function(e){return e.slice(0,1).toUpperCase()+e.slice(1).toLowerCase()})).join("")},toSlug:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-";return e=e.trim().normalize("NFD").replace(/_|-/g," ").replace(/[\u0300-\u036f]/g,"").replace(/[^\d\w\s]/g,"").toLowerCase().replace(/\s+/g,t),t.length>0&&(e=e.replace(new RegExp("".concat(t,"+"),"g"),t)),e},toStudlyCase:function(e){return Vg(e).map((function(e){return e.slice(0,1).toUpperCase()+e.slice(1).toLowerCase()})).join("")}},ay=function(e){Kn(r,ry);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ti(e);if(t){var i=ti(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ei(this,r)}}(r);function r(){return Hn(this,r),t.apply(this,arguments)}return ci(r,[{key:"toString",value:function(){return this.value}},{key:"isPrimitive",value:function(e){return"string"==typeof e}}],[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.prototype;return t.create(e)}}]),r}();function sy(e,t){if(!t)return function(e){var t=new Proxy(e,{get:function(e,r,n){var i=Reflect.get(e,r,n);return"function"!=typeof i?i:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return i.call.apply(i,[e].concat(n)),t}}});return t}(e);var r=t(e);return r instanceof Promise?r.then((function(){return e})):e}function uy(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return iy.create(qg(e))}function cy(e,t){return Array.isArray(e)?function(e,t){var r=e[t];return e.splice(t,1),r}(e,t):function(e,t){var r=e[t];return delete e[t],r}(e,t)}ey(ay,oy),ty(ay,String),e.SolidDocumentFormat=void 0,(e.SolidDocumentFormat||(e.SolidDocumentFormat={})).Turtle="Turtle";var ly=function(e){c(MalformedSolidDocumentError,e);var t=p(MalformedSolidDocumentError);function MalformedSolidDocumentError(e,r,n){var i;return o(this,MalformedSolidDocumentError),i=t.call(this,function(e,t,r){return e?"Malformed ".concat(t," document found at ").concat(e," - ").concat(r):"Malformed ".concat(t," document - ").concat(r)}(e,r,n)),u(h(i),"documentUrl",void 0),u(h(i),"documentFormat",void 0),u(h(i),"malformationDetails",void 0),i.documentUrl=e,i.documentFormat=r,i.malformationDetails=n,i}return MalformedSolidDocumentError}(wg),fy=function(e){c(NetworkRequestError,e);var t=p(NetworkRequestError);function NetworkRequestError(e,r){var n;return o(this,NetworkRequestError),u(h(n=t.call(this,"Request failed trying to fetch ".concat(e),r)),"url",void 0),n.url=e,n}return NetworkRequestError}(wg),hy=function(e){c(NotFoundError,e);var t=p(NotFoundError);function NotFoundError(e){var r;return o(this,NotFoundError),u(h(r=t.call(this,"Document with '".concat(e,"' url not found"))),"url",void 0),r.url=e,r}return NotFoundError}(wg);var dy=function(e){c(UnauthorizedError,e);var t=p(UnauthorizedError);function UnauthorizedError(e,r){var n;return o(this,UnauthorizedError),n=t.call(this,function(e,t){return"Unauthorized".concat(403===t?" (Forbidden)":"",": ").concat(e)}(e,r)),u(h(n),"url",void 0),u(h(n),"responseStatus",void 0),n.url=e,n.responseStatus=r,n}return s(UnauthorizedError,[{key:"forbidden",get:function(){return void 0!==this.responseStatus?403===this.responseStatus:void 0}}]),UnauthorizedError}(wg);var py=function(e){c(UnsuccessfulRequestError,e);var t=p(UnsuccessfulRequestError);function UnsuccessfulRequestError(e,r){var n;return o(this,UnsuccessfulRequestError),n=t.call(this,function(e,t){var r;return t=null!==(r=t)&&void 0!==r?r:e,"string"==typeof e?"".concat(e," (returned ").concat(t.status," status code)"):"Request to ".concat(t.url," returned ").concat(t.status," status code")}(e,r)),u(h(n),"response",void 0),n.response=null!=r?r:e,n}return UnsuccessfulRequestError}(wg),vy=function(e){c(UnsupportedAuthorizationProtocolError,e);var t=p(UnsupportedAuthorizationProtocolError);function UnsupportedAuthorizationProtocolError(e,r,n){var i;return o(this,UnsupportedAuthorizationProtocolError),u(h(i=t.call(this,"The resource at ".concat(e," is using an unsupported authorization protocol (").concat(r,")"),n)),"url",void 0),u(h(i),"protocol",void 0),i.url=e,i.protocol=r,i}return UnsupportedAuthorizationProtocolError}(wg),gy=qo.find,yy="find",my=!0;yy in[]&&Array(1).find((function(){my=!1})),tr({target:"Array",proto:!0,forced:my},{find:function(e){return gy(this,e,arguments.length>1?arguments[1]:void 0)}}),gi(yy);var by=Zs.find;tr({target:"AsyncIterator",proto:!0,real:!0},{find:function(e){return by(this,e)}}),tr({target:"Iterator",proto:!0,real:!0},{find:function(e){return We(this),pe(e),In(this,(function(t,r){if(e(t))return r(t)}),{IS_ITERATOR:!0,INTERRUPTED:!0}).result}});var xy={acl:"http://www.w3.org/ns/auth/acl#",foaf:"http://xmlns.com/foaf/0.1/",pim:"http://www.w3.org/ns/pim/space#",purl:"http://purl.org/dc/terms/",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",schema:"https://schema.org/",solid:"http://www.w3.org/ns/solid/terms#",vcard:"http://www.w3.org/2006/vcard/ns#"};function wy(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.startsWith("http"))return e;var r=e.split(":"),n=v(r,2),i=n[0],o=n[1];if(i&&o){var a,s,u,c=null!==(a=null!==(s=xy[i])&&void 0!==s?s:null===(u=t.extraContext)||void 0===u?void 0:u[i])&&void 0!==a?a:null;if(!c)throw new Error("Can't expand IRI with unknown prefix: '".concat(e,"'"));return c+o}if(!t.defaultPrefix)throw new Error("Can't expand IRI without a default prefix: '".concat(e,"'"));return t.defaultPrefix+i}var _y=function(){function e(t,r){o(this,e),u(this,"url",void 0),u(this,"quads",void 0),this.url=t,this.quads=r}return s(e,[{key:"value",value:function(e){var t;return null===(t=this.quads.find((function(t){return t.predicate.value===wy(e)})))||void 0===t?void 0:t.object.value}},{key:"values",value:function(e){return this.quads.filter((function(t){return t.predicate.value===wy(e)})).map((function(e){return e.object.value}))}}]),e}(),Iy=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];o(this,e),u(this,"quads",void 0),this.quads=t}return s(e,[{key:"isEmpty",value:function(){return 0===this.statements.length}},{key:"getQuads",value:function(){return this.quads.slice(0)}},{key:"addQuads",value:function(e){var t;(t=this.quads).push.apply(t,g(e))}},{key:"statements",value:function(e,t,r){var n=this;return this.quads.filter((function(i){return!(r&&i.object.value!==n.expandIRI(r)||e&&i.subject.value!==n.expandIRI(e)||t&&i.predicate.value!==n.expandIRI(t))}))}},{key:"statement",value:function(e,t,r){var n=this,i=this.quads.find((function(i){return!(r&&i.object.value!==n.expandIRI(r)||e&&i.subject.value!==n.expandIRI(e)||t&&i.predicate.value!==n.expandIRI(t))}));return null!=i?i:null}},{key:"contains",value:function(e,t,r){return null!==this.statement(e,t,r)}},{key:"getThing",value:function(e){var t=this.statements(e);return new _y(e,t)}},{key:"expandIRI",value:function(e){return wy(e)}}]),e}();tr({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=Se(this),r=Pt(t),n=xr(t,0);return n.length=Cl(n,t,t,r,0,void 0===e?1:kt(e)),n}}),gi("flat");var Sy=_((function(e){!function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&r.rotl(e,8)|4278255360&r.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=r.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],r=0,n=0;r<e.length;r++,n+=8)t[n>>>5]|=e[r]<<24-n%32;return t},wordsToBytes:function(e){for(var t=[],r=0;r<32*e.length;r+=8)t.push(e[r>>>5]>>>24-r%32&255);return t},bytesToHex:function(e){for(var t=[],r=0;r<e.length;r++)t.push((e[r]>>>4).toString(16)),t.push((15&e[r]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],r=0;r<e.length;r+=2)t.push(parseInt(e.substr(r,2),16));return t},bytesToBase64:function(e){for(var r=[],n=0;n<e.length;n+=3)for(var i=e[n]<<16|e[n+1]<<8|e[n+2],o=0;o<4;o++)8*n+6*o<=8*e.length?r.push(t.charAt(i>>>6*(3-o)&63)):r.push("=");return r.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var r=[],n=0,i=0;n<e.length;i=++n%4)0!=i&&r.push((t.indexOf(e.charAt(n-1))&Math.pow(2,-2*i+8)-1)<<2*i|t.indexOf(e.charAt(n))>>>6-2*i);return r}};e.exports=r}()})),jy={utf8:{stringToBytes:function(e){return jy.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(jy.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],r=0;r<e.length;r++)t.push(255&e.charCodeAt(r));return t},bytesToString:function(e){for(var t=[],r=0;r<e.length;r++)t.push(String.fromCharCode(e[r]));return t.join("")}}},Ry=jy,ky=function(e){return null!=e&&(Ey(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&Ey(e.slice(0,0))}(e)||!!e._isBuffer)};function Ey(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var Ty,Oy=_((function(e){!function(){var t=Sy,r=Ry.utf8,n=ky,i=Ry.bin,o=function(e,a){e.constructor==String?e=a&&"binary"===a.encoding?i.stringToBytes(e):r.stringToBytes(e):n(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var s=t.bytesToWords(e),u=8*e.length,c=1732584193,l=-271733879,f=-1732584194,h=271733878,d=0;d<s.length;d++)s[d]=16711935&(s[d]<<8|s[d]>>>24)|4278255360&(s[d]<<24|s[d]>>>8);s[u>>>5]|=128<<u%32,s[14+(u+64>>>9<<4)]=u;var p=o._ff,v=o._gg,g=o._hh,y=o._ii;for(d=0;d<s.length;d+=16){var m=c,b=l,x=f,w=h;c=p(c,l,f,h,s[d+0],7,-680876936),h=p(h,c,l,f,s[d+1],12,-389564586),f=p(f,h,c,l,s[d+2],17,606105819),l=p(l,f,h,c,s[d+3],22,-1044525330),c=p(c,l,f,h,s[d+4],7,-176418897),h=p(h,c,l,f,s[d+5],12,1200080426),f=p(f,h,c,l,s[d+6],17,-1473231341),l=p(l,f,h,c,s[d+7],22,-45705983),c=p(c,l,f,h,s[d+8],7,1770035416),h=p(h,c,l,f,s[d+9],12,-1958414417),f=p(f,h,c,l,s[d+10],17,-42063),l=p(l,f,h,c,s[d+11],22,-1990404162),c=p(c,l,f,h,s[d+12],7,1804603682),h=p(h,c,l,f,s[d+13],12,-40341101),f=p(f,h,c,l,s[d+14],17,-1502002290),c=v(c,l=p(l,f,h,c,s[d+15],22,1236535329),f,h,s[d+1],5,-165796510),h=v(h,c,l,f,s[d+6],9,-1069501632),f=v(f,h,c,l,s[d+11],14,643717713),l=v(l,f,h,c,s[d+0],20,-373897302),c=v(c,l,f,h,s[d+5],5,-701558691),h=v(h,c,l,f,s[d+10],9,38016083),f=v(f,h,c,l,s[d+15],14,-660478335),l=v(l,f,h,c,s[d+4],20,-405537848),c=v(c,l,f,h,s[d+9],5,568446438),h=v(h,c,l,f,s[d+14],9,-1019803690),f=v(f,h,c,l,s[d+3],14,-187363961),l=v(l,f,h,c,s[d+8],20,1163531501),c=v(c,l,f,h,s[d+13],5,-1444681467),h=v(h,c,l,f,s[d+2],9,-51403784),f=v(f,h,c,l,s[d+7],14,1735328473),c=g(c,l=v(l,f,h,c,s[d+12],20,-1926607734),f,h,s[d+5],4,-378558),h=g(h,c,l,f,s[d+8],11,-2022574463),f=g(f,h,c,l,s[d+11],16,1839030562),l=g(l,f,h,c,s[d+14],23,-35309556),c=g(c,l,f,h,s[d+1],4,-1530992060),h=g(h,c,l,f,s[d+4],11,1272893353),f=g(f,h,c,l,s[d+7],16,-155497632),l=g(l,f,h,c,s[d+10],23,-1094730640),c=g(c,l,f,h,s[d+13],4,681279174),h=g(h,c,l,f,s[d+0],11,-358537222),f=g(f,h,c,l,s[d+3],16,-722521979),l=g(l,f,h,c,s[d+6],23,76029189),c=g(c,l,f,h,s[d+9],4,-640364487),h=g(h,c,l,f,s[d+12],11,-421815835),f=g(f,h,c,l,s[d+15],16,530742520),c=y(c,l=g(l,f,h,c,s[d+2],23,-995338651),f,h,s[d+0],6,-198630844),h=y(h,c,l,f,s[d+7],10,1126891415),f=y(f,h,c,l,s[d+14],15,-1416354905),l=y(l,f,h,c,s[d+5],21,-57434055),c=y(c,l,f,h,s[d+12],6,1700485571),h=y(h,c,l,f,s[d+3],10,-1894986606),f=y(f,h,c,l,s[d+10],15,-1051523),l=y(l,f,h,c,s[d+1],21,-2054922799),c=y(c,l,f,h,s[d+8],6,1873313359),h=y(h,c,l,f,s[d+15],10,-30611744),f=y(f,h,c,l,s[d+6],15,-1560198380),l=y(l,f,h,c,s[d+13],21,1309151649),c=y(c,l,f,h,s[d+4],6,-145523070),h=y(h,c,l,f,s[d+11],10,-1120210379),f=y(f,h,c,l,s[d+2],15,718787259),l=y(l,f,h,c,s[d+9],21,-343485551),c=c+m>>>0,l=l+b>>>0,f=f+x>>>0,h=h+w>>>0}return t.endian([c,l,f,h])};o._ff=function(e,t,r,n,i,o,a){var s=e+(t&r|~t&n)+(i>>>0)+a;return(s<<o|s>>>32-o)+t},o._gg=function(e,t,r,n,i,o,a){var s=e+(t&n|r&~n)+(i>>>0)+a;return(s<<o|s>>>32-o)+t},o._hh=function(e,t,r,n,i,o,a){var s=e+(t^r^n)+(i>>>0)+a;return(s<<o|s>>>32-o)+t},o._ii=function(e,t,r,n,i,o,a){var s=e+(r^(t|~n))+(i>>>0)+a;return(s<<o|s>>>32-o)+t},o._blocksize=16,o._digestsize=16,e.exports=function(e,r){if(null==e)throw new Error("Illegal argument "+e);var n=t.wordsToBytes(o(e,r));return r&&r.asBytes?n:r&&r.asString?i.bytesToString(n):t.bytesToHex(n)}}()})),Ay=_((function(e,t){window,e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=49)}([function(e,t,r){const n="http://www.w3.org/1999/02/22-rdf-syntax-ns#",i="http://www.w3.org/2001/XMLSchema#",o="http://www.w3.org/2000/10/swap/";t.a={xsd:{decimal:i+"decimal",boolean:i+"boolean",double:i+"double",integer:i+"integer",string:i+"string"},rdf:{type:n+"type",nil:n+"nil",first:n+"first",rest:n+"rest",langString:n+"langString"},owl:{sameAs:"http://www.w3.org/2002/07/owl#sameAs"},r:{forSome:o+"reify#forSome",forAll:o+"reify#forAll"},log:{implies:o+"log#implies"}}},function(e,t,r){const n={};e.exports=n,n.isArray=Array.isArray,n.isBoolean=e=>"boolean"==typeof e||"[object Boolean]"===Object.prototype.toString.call(e),n.isDouble=e=>n.isNumber(e)&&(-1!==String(e).indexOf(".")||Math.abs(e)>=1e21),n.isEmptyObject=e=>n.isObject(e)&&0===Object.keys(e).length,n.isNumber=e=>"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e),n.isNumeric=e=>!isNaN(parseFloat(e))&&isFinite(e),n.isObject=e=>"[object Object]"===Object.prototype.toString.call(e),n.isString=e=>"string"==typeof e||"[object String]"===Object.prototype.toString.call(e),n.isUndefined=e=>void 0===e},function(e,t,r){const n=r(4),i=r(1),o=r(11).IdentifierIssuer,a=r(3),s=/(?:<[^>]*?>|"[^"]*?"|[^,])+/g,u=/\s*<([^>]*?)>\s*(?:;\s*(.*))?/,c=/(.*?)=(?:(?:"([^"]*?)")|([^"]*?))\s*(?:(?:;\s*)|$)/g,l={accept:"application/ld+json, application/json"},f={};e.exports=f,f.IdentifierIssuer=o,f.clone=function(e){if(e&&"object"==typeof e){let t;if(i.isArray(e)){t=[];for(let r=0;r<e.length;++r)t[r]=f.clone(e[r])}else if(e instanceof Map){t=new Map;for(const[r,n]of e)t.set(r,f.clone(n))}else if(e instanceof Set){t=new Set;for(const r of e)t.add(f.clone(r))}else if(i.isObject(e)){t={};for(const r in e)t[r]=f.clone(e[r])}else t=e.toString();return t}return e},f.asArray=function(e){return Array.isArray(e)?e:[e]},f.buildHeaders=(e={})=>{if(Object.keys(e).some((e=>"accept"===e.toLowerCase())))throw new RangeError('Accept header may not be specified; only "'+l.accept+'" is supported.');return Object.assign({Accept:l.accept},e)},f.parseLinkHeader=e=>{const t={},r=e.match(s);for(let e=0;e<r.length;++e){let n=r[e].match(u);if(!n)continue;const i={target:n[1]},o=n[2];for(;n=c.exec(o);)i[n[1]]=void 0===n[2]?n[3]:n[2];const a=i.rel||"";Array.isArray(t[a])?t[a].push(i):t.hasOwnProperty(a)?t[a]=[t[a],i]:t[a]=i}return t},f.validateTypeValue=(e,t)=>{if(!(i.isString(e)||i.isArray(e)&&e.every((e=>i.isString(e))))){if(t&&i.isObject(e))switch(Object.keys(e).length){case 0:return;case 1:if("@default"in e&&f.asArray(e["@default"]).every((e=>i.isString(e))))return}throw new a('Invalid JSON-LD syntax; "@type" value must a string, an array of strings, an empty object, or a default object.',"jsonld.SyntaxError",{code:"invalid type value",value:e})}},f.hasProperty=(e,t)=>{if(e.hasOwnProperty(t)){const r=e[t];return!i.isArray(r)||r.length>0}return!1},f.hasValue=(e,t,r)=>{if(f.hasProperty(e,t)){let o=e[t];const a=n.isList(o);if(i.isArray(o)||a){a&&(o=o["@list"]);for(let e=0;e<o.length;++e)if(f.compareValues(r,o[e]))return!0}else if(!i.isArray(r))return f.compareValues(r,o)}return!1},f.addValue=(e,t,r,n)=>{if("propertyIsArray"in(n=n||{})||(n.propertyIsArray=!1),"valueIsArray"in n||(n.valueIsArray=!1),"allowDuplicate"in n||(n.allowDuplicate=!0),"prependValue"in n||(n.prependValue=!1),n.valueIsArray)e[t]=r;else if(i.isArray(r)){0===r.length&&n.propertyIsArray&&!e.hasOwnProperty(t)&&(e[t]=[]),n.prependValue&&(r=r.concat(e[t]),e[t]=[]);for(let i=0;i<r.length;++i)f.addValue(e,t,r[i],n)}else if(e.hasOwnProperty(t)){const o=!n.allowDuplicate&&f.hasValue(e,t,r);i.isArray(e[t])||o&&!n.propertyIsArray||(e[t]=[e[t]]),o||(n.prependValue?e[t].unshift(r):e[t].push(r))}else e[t]=n.propertyIsArray?[r]:r},f.getValues=(e,t)=>[].concat(e[t]||[]),f.removeProperty=(e,t)=>{delete e[t]},f.removeValue=(e,t,r,n)=>{"propertyIsArray"in(n=n||{})||(n.propertyIsArray=!1);const i=f.getValues(e,t).filter((e=>!f.compareValues(e,r)));0===i.length?f.removeProperty(e,t):1!==i.length||n.propertyIsArray?e[t]=i:e[t]=i[0]},f.relabelBlankNodes=(e,t)=>function e(t,r){if(i.isArray(r))for(let n=0;n<r.length;++n)r[n]=e(t,r[n]);else if(n.isList(r))r["@list"]=e(t,r["@list"]);else if(i.isObject(r)){n.isBlankNode(r)&&(r["@id"]=t.getId(r["@id"]));const i=Object.keys(r).sort();for(let n=0;n<i.length;++n){const o=i[n];"@id"!==o&&(r[o]=e(t,r[o]))}}return r}((t=t||{}).issuer||new o("_:b"),e),f.compareValues=(e,t)=>e===t||!(!n.isValue(e)||!n.isValue(t)||e["@value"]!==t["@value"]||e["@type"]!==t["@type"]||e["@language"]!==t["@language"]||e["@index"]!==t["@index"])||!!(i.isObject(e)&&"@id"in e&&i.isObject(t)&&"@id"in t)&&e["@id"]===t["@id"],f.compareShortestLeast=(e,t)=>e.length<t.length?-1:t.length<e.length?1:e===t?0:e<t?-1:1},function(e,t,r){e.exports=class extends Error{constructor(e="An unspecified JSON-LD error occurred.",t="jsonld.Error",r={}){super(e),this.name=t,this.message=e,this.details=r}}},function(e,t,r){const n=r(1),i={};e.exports=i,i.isSubject=e=>!(!n.isObject(e)||"@value"in e||"@set"in e||"@list"in e)&&(Object.keys(e).length>1||!("@id"in e)),i.isSubjectReference=e=>n.isObject(e)&&1===Object.keys(e).length&&"@id"in e,i.isValue=e=>n.isObject(e)&&"@value"in e,i.isList=e=>n.isObject(e)&&"@list"in e,i.isGraph=e=>n.isObject(e)&&"@graph"in e&&1===Object.keys(e).filter((e=>"@id"!==e&&"@index"!==e)).length,i.isSimpleGraph=e=>i.isGraph(e)&&!("@id"in e),i.isBlankNode=e=>!!n.isObject(e)&&("@id"in e?0===e["@id"].indexOf("_:"):0===Object.keys(e).length||!("@value"in e||"@set"in e||"@list"in e))},function(e,t,r){const n=r(1),i={};e.exports=i,i.parsers={simple:{keys:["href","scheme","authority","path","query","fragment"],regex:/^(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/},full:{keys:["href","protocol","scheme","authority","auth","user","password","hostname","port","path","directory","file","query","fragment"],regex:/^(([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?(?:(((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/}},i.parse=(e,t)=>{const r={},n=i.parsers[t||"full"],o=n.regex.exec(e);let a=n.keys.length;for(;a--;)r[n.keys[a]]=void 0===o[a]?null:o[a];return("https"===r.scheme&&"443"===r.port||"http"===r.scheme&&"80"===r.port)&&(r.href=r.href.replace(":"+r.port,""),r.authority=r.authority.replace(":"+r.port,""),r.port=null),r.normalizedPath=i.removeDotSegments(r.path),r},i.prependBase=(e,t)=>{if(null===e)return t;if(i.isAbsolute(t))return t;e&&!n.isString(e)||(e=i.parse(e||""));const r=i.parse(t),o={protocol:e.protocol||""};if(null!==r.authority)o.authority=r.authority,o.path=r.path,o.query=r.query;else if(o.authority=e.authority,""===r.path)o.path=e.path,null!==r.query?o.query=r.query:o.query=e.query;else{if(0===r.path.indexOf("/"))o.path=r.path;else{let t=e.path;t=t.substr(0,t.lastIndexOf("/")+1),(t.length>0||e.authority)&&"/"!==t.substr(-1)&&(t+="/"),t+=r.path,o.path=t}o.query=r.query}""!==r.path&&(o.path=i.removeDotSegments(o.path));let a=o.protocol;return null!==o.authority&&(a+="//"+o.authority),a+=o.path,null!==o.query&&(a+="?"+o.query),null!==r.fragment&&(a+="#"+r.fragment),""===a&&(a="./"),a},i.removeBase=(e,t)=>{if(null===e)return t;e&&!n.isString(e)||(e=i.parse(e||""));let r="";if(""!==e.href?r+=(e.protocol||"")+"//"+(e.authority||""):t.indexOf("//")&&(r+="//"),0!==t.indexOf(r))return t;const o=i.parse(t.substr(r.length)),a=e.normalizedPath.split("/"),s=o.normalizedPath.split("/"),u=o.fragment||o.query?0:1;for(;a.length>0&&s.length>u&&a[0]===s[0];)a.shift(),s.shift();let c="";if(a.length>0){a.pop();for(let e=0;e<a.length;++e)c+="../"}return c+=s.join("/"),null!==o.query&&(c+="?"+o.query),null!==o.fragment&&(c+="#"+o.fragment),""===c&&(c="./"),c},i.removeDotSegments=e=>{if(0===e.length)return"";const t=e.split("/"),r=[];for(;t.length>0;){const e=t.shift(),n=0===t.length;"."!==e?".."!==e?r.push(e):(r.pop(),n&&r.push("")):n&&r.push("")}return"/"===e[0]&&r.length>0&&""!==r[0]&&r.unshift(""),1===r.length&&""===r[0]?"/":r.join("/")};const o=/^([A-Za-z][A-Za-z0-9+-.]*|_):[^\s]*$/;i.isAbsolute=e=>n.isString(e)&&o.test(e),i.isRelative=e=>n.isString(e)},function(e,t,r){const n=r(2),i=r(3),{isArray:o,isObject:a,isString:s,isUndefined:u}=r(1),{isAbsolute:c,isRelative:l,prependBase:f}=r(5),{asArray:h,compareShortestLeast:d}=r(2),p=new Map,v=/^@[a-zA-Z]+$/,g={};function y(e,t,r,n,i,o){if(null===t||!s(t)||g.isKeyword(t))return t;if(t.match(v))return null;if(n&&n.hasOwnProperty(t)&&!0!==i.get(t)&&g.createTermDefinition({activeCtx:e,localCtx:n,term:t,defined:i,options:o}),(r=r||{}).vocab){const r=e.mappings.get(t);if(null===r)return null;if(a(r)&&"@id"in r)return r["@id"]}const u=t.indexOf(":");if(u>0){const r=t.substr(0,u),a=t.substr(u+1);if("_"===r||0===a.indexOf("//"))return t;n&&n.hasOwnProperty(r)&&g.createTermDefinition({activeCtx:e,localCtx:n,term:r,defined:i,options:o});const s=e.mappings.get(r);if(s&&s._prefix)return s["@id"]+a;if(c(t))return t}if(r.vocab&&"@vocab"in e)return e["@vocab"]+t;if(r.base&&"@base"in e){if(e["@base"])return f(f(o.base,e["@base"]),t)}else if(r.base)return f(o.base,t);return t}e.exports=g,g.process=async({activeCtx:e,localCtx:t,options:r,propagate:u=!0,overrideProtected:d=!1,cycles:p=new Set})=>{if(a(t)&&"@context"in t&&o(t["@context"])&&(t=t["@context"]),0===h(t).length)return e;const v=await r.contextResolver.resolve({activeCtx:e,context:t,documentLoader:r.documentLoader,base:r.base});a(v[0].document)&&"boolean"==typeof v[0].document["@propagate"]&&(u=v[0].document["@propagate"]);let m=e;u||m.previousContext||(m=m.clone(),m.previousContext=e);for(const o of v){let{document:u}=o;if(e=m,null===u){if(!d&&0!==Object.keys(e.protected).length){const a=r&&r.protectedMode||"error";if("error"===a)throw new i("Tried to nullify a context with protected terms outside of a term definition.","jsonld.SyntaxError",{code:"invalid context nullification"});if("warn"===a){console.warn("WARNING: invalid context nullification");const t=o.getProcessed(e);if(t){m=e=t;continue}const i=e;m=e=g.getInitialContext(r).clone();for(const[t,r]of Object.entries(i.protected))r&&(e.mappings[t]=n.clone(i.mappings[t]));e.protected=n.clone(i.protected),o.setProcessed(i,m);continue}throw new i("Invalid protectedMode.","jsonld.SyntaxError",{code:"invalid protected mode",context:t,protectedMode:a})}m=e=g.getInitialContext(r).clone();continue}const h=o.getProcessed(e);if(h){m=e=h;continue}if(a(u)&&"@context"in u&&(u=u["@context"]),!a(u))throw new i("Invalid JSON-LD syntax; @context must be an object.","jsonld.SyntaxError",{code:"invalid local context",context:u});m=m.clone();const v=new Map;if("@version"in u){if(1.1!==u["@version"])throw new i("Unsupported JSON-LD version: "+u["@version"],"jsonld.UnsupportedVersion",{code:"invalid @version value",context:u});if(e.processingMode&&"json-ld-1.0"===e.processingMode)throw new i("@version: "+u["@version"]+" not compatible with "+e.processingMode,"jsonld.ProcessingModeConflict",{code:"processing mode conflict",context:u});m.processingMode="json-ld-1.1",m["@version"]=u["@version"],v.set("@version",!0)}if(m.processingMode=m.processingMode||e.processingMode,"@base"in u){let e=u["@base"];if(null===e||c(e));else{if(!l(e))throw new i('Invalid JSON-LD syntax; the value of "@base" in a @context must be an absolute IRI, a relative IRI, or null.',"jsonld.SyntaxError",{code:"invalid base IRI",context:u});e=f(m["@base"],e)}m["@base"]=e,v.set("@base",!0)}if("@vocab"in u){const e=u["@vocab"];if(null===e)delete m["@vocab"];else{if(!s(e))throw new i('Invalid JSON-LD syntax; the value of "@vocab" in a @context must be a string or null.',"jsonld.SyntaxError",{code:"invalid vocab mapping",context:u});if(!c(e)&&g.processingMode(m,1))throw new i('Invalid JSON-LD syntax; the value of "@vocab" in a @context must be an absolute IRI.',"jsonld.SyntaxError",{code:"invalid vocab mapping",context:u});m["@vocab"]=y(m,e,{vocab:!0,base:!0},void 0,void 0,r)}v.set("@vocab",!0)}if("@language"in u){const e=u["@language"];if(null===e)delete m["@language"];else{if(!s(e))throw new i('Invalid JSON-LD syntax; the value of "@language" in a @context must be a string or null.',"jsonld.SyntaxError",{code:"invalid default language",context:u});m["@language"]=e.toLowerCase()}v.set("@language",!0)}if("@direction"in u){const t=u["@direction"];if("json-ld-1.0"===e.processingMode)throw new i("Invalid JSON-LD syntax; @direction not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context member",context:u});if(null===t)delete m["@direction"];else{if("ltr"!==t&&"rtl"!==t)throw new i('Invalid JSON-LD syntax; the value of "@direction" in a @context must be null, "ltr", or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",context:u});m["@direction"]=t}v.set("@direction",!0)}if("@propagate"in u){const r=u["@propagate"];if("json-ld-1.0"===e.processingMode)throw new i("Invalid JSON-LD syntax; @propagate not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context entry",context:u});if("boolean"!=typeof r)throw new i("Invalid JSON-LD syntax; @propagate value must be a boolean.","jsonld.SyntaxError",{code:"invalid @propagate value",context:t});v.set("@propagate",!0)}if("@import"in u){const n=u["@import"];if("json-ld-1.0"===e.processingMode)throw new i("Invalid JSON-LD syntax; @import not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context entry",context:u});if(!s(n))throw new i("Invalid JSON-LD syntax; @import must be a string.","jsonld.SyntaxError",{code:"invalid @import value",context:t});const o=await r.contextResolver.resolve({activeCtx:e,context:n,documentLoader:r.documentLoader,base:r.base});if(1!==o.length)throw new i("Invalid JSON-LD syntax; @import must reference a single context.","jsonld.SyntaxError",{code:"invalid remote context",context:t});const a=o[0].getProcessed(e);if(a)u=a;else{const r=o[0].document;if("@import"in r)throw new i("Invalid JSON-LD syntax: imported context must not include @import.","jsonld.SyntaxError",{code:"invalid context entry",context:t});for(const e in r)u.hasOwnProperty(e)||(u[e]=r[e]);o[0].setProcessed(e,u)}v.set("@import",!0)}v.set("@protected",u["@protected"]||!1);for(const e in u)if(g.createTermDefinition({activeCtx:m,localCtx:u,term:e,defined:v,options:r,overrideProtected:d}),a(u[e])&&"@context"in u[e]){const n=u[e]["@context"];let o=!0;if(s(n)){const e=f(r.base,n);p.has(e)?o=!1:p.add(e)}if(o)try{await g.process({activeCtx:m.clone(),localCtx:u[e]["@context"],overrideProtected:!0,options:r,cycles:p})}catch(t){throw new i("Invalid JSON-LD syntax; invalid scoped context.","jsonld.SyntaxError",{code:"invalid scoped context",context:u[e]["@context"],term:e})}}o.setProcessed(e,m)}return m},g.createTermDefinition=({activeCtx:e,localCtx:t,term:r,defined:n,options:u,overrideProtected:l=!1})=>{if(n.has(r)){if(n.get(r))return;throw new i("Cyclical context definition detected.","jsonld.CyclicalContext",{code:"cyclic IRI mapping",context:t,term:r})}let f;if(n.set(r,!1),t.hasOwnProperty(r)&&(f=t[r]),"@type"===r&&a(f)&&"@set"===(f["@container"]||"@set")&&g.processingMode(e,1.1)){const e=["@container","@id","@protected"],n=Object.keys(f);if(0===n.length||n.some((t=>!e.includes(t))))throw new i("Invalid JSON-LD syntax; keywords cannot be overridden.","jsonld.SyntaxError",{code:"keyword redefinition",context:t,term:r})}else{if(g.isKeyword(r))throw new i("Invalid JSON-LD syntax; keywords cannot be overridden.","jsonld.SyntaxError",{code:"keyword redefinition",context:t,term:r});if(r.match(v))return void console.warn('WARNING: terms beginning with "@" are reserved for future use and ignored',{term:r});if(""===r)throw new i("Invalid JSON-LD syntax; a term cannot be an empty string.","jsonld.SyntaxError",{code:"invalid term definition",context:t})}const h=e.mappings.get(r);e.mappings.has(r)&&e.mappings.delete(r);let d=!1;if((s(f)||null===f)&&(d=!0,f={"@id":f}),!a(f))throw new i("Invalid JSON-LD syntax; @context term values must be strings or objects.","jsonld.SyntaxError",{code:"invalid term definition",context:t});const p={};e.mappings.set(r,p),p.reverse=!1;const m=["@container","@id","@language","@reverse","@type"];g.processingMode(e,1.1)&&m.push("@context","@direction","@index","@nest","@prefix","@protected");for(const e in f)if(!m.includes(e))throw new i("Invalid JSON-LD syntax; a term definition must not contain "+e,"jsonld.SyntaxError",{code:"invalid term definition",context:t});const b=r.indexOf(":");if(p._termHasColon=b>0,"@reverse"in f){if("@id"in f)throw new i("Invalid JSON-LD syntax; a @reverse term definition must not contain @id.","jsonld.SyntaxError",{code:"invalid reverse property",context:t});if("@nest"in f)throw new i("Invalid JSON-LD syntax; a @reverse term definition must not contain @nest.","jsonld.SyntaxError",{code:"invalid reverse property",context:t});const o=f["@reverse"];if(!s(o))throw new i("Invalid JSON-LD syntax; a @context @reverse value must be a string.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});if(!g.isKeyword(o)&&o.match(v))return console.warn('WARNING: values beginning with "@" are reserved for future use and ignored',{reverse:o}),void(h?e.mappings.set(r,h):e.mappings.delete(r));const a=y(e,o,{vocab:!0,base:!1},t,n,u);if(!c(a))throw new i("Invalid JSON-LD syntax; a @context @reverse value must be an absolute IRI or a blank node identifier.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});p["@id"]=a,p.reverse=!0}else if("@id"in f){let o=f["@id"];if(o&&!s(o))throw new i("Invalid JSON-LD syntax; a @context @id value must be an array of strings or a string.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});if(null===o)p["@id"]=null;else{if(!g.isKeyword(o)&&o.match(v))return console.warn('WARNING: values beginning with "@" are reserved for future use and ignored',{id:o}),void(h?e.mappings.set(r,h):e.mappings.delete(r));if(o!==r){if(o=y(e,o,{vocab:!0,base:!1},t,n,u),!c(o)&&!g.isKeyword(o))throw new i("Invalid JSON-LD syntax; a @context @id value must be an absolute IRI, a blank node identifier, or a keyword.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});if(r.match(/(?::[^:])|\//)&&y(e,r,{vocab:!0,base:!1},t,new Map(n).set(r,!0),u)!==o)throw new i("Invalid JSON-LD syntax; term in form of IRI must expand to definition.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});p["@id"]=o,p._prefix=d&&!p._termHasColon&&o.match(/[:\/\?#\[\]@]$/)}}}if(!("@id"in p))if(p._termHasColon){const i=r.substr(0,b);if(t.hasOwnProperty(i)&&g.createTermDefinition({activeCtx:e,localCtx:t,term:i,defined:n,options:u}),e.mappings.has(i)){const t=r.substr(b+1);p["@id"]=e.mappings.get(i)["@id"]+t}else p["@id"]=r}else if("@type"===r)p["@id"]=r;else{if(!("@vocab"in e))throw new i("Invalid JSON-LD syntax; @context terms must define an @id.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t,term:r});p["@id"]=e["@vocab"]+r}if((!0===f["@protected"]||!0===n.get("@protected")&&!1!==f["@protected"])&&(e.protected[r]=!0,p.protected=!0),n.set(r,!0),"@type"in f){let r=f["@type"];if(!s(r))throw new i("Invalid JSON-LD syntax; an @context @type value must be a string.","jsonld.SyntaxError",{code:"invalid type mapping",context:t});if("@json"===r||"@none"===r){if(g.processingMode(e,1))throw new i(`Invalid JSON-LD syntax; an @context @type value must not be "${r}" in JSON-LD 1.0 mode.`,"jsonld.SyntaxError",{code:"invalid type mapping",context:t})}else if("@id"!==r&&"@vocab"!==r){if(r=y(e,r,{vocab:!0,base:!1},t,n,u),!c(r))throw new i("Invalid JSON-LD syntax; an @context @type value must be an absolute IRI.","jsonld.SyntaxError",{code:"invalid type mapping",context:t});if(0===r.indexOf("_:"))throw new i("Invalid JSON-LD syntax; an @context @type value must be an IRI, not a blank node identifier.","jsonld.SyntaxError",{code:"invalid type mapping",context:t})}p["@type"]=r}if("@container"in f){const r=s(f["@container"])?[f["@container"]]:f["@container"]||[],n=["@list","@set","@index","@language"];let a=!0;const u=r.includes("@set");if(g.processingMode(e,1.1)){if(n.push("@graph","@id","@type"),r.includes("@list")){if(1!==r.length)throw new i("Invalid JSON-LD syntax; @context @container with @list must have no other values","jsonld.SyntaxError",{code:"invalid container mapping",context:t})}else if(r.includes("@graph")){if(r.some((e=>"@graph"!==e&&"@id"!==e&&"@index"!==e&&"@set"!==e)))throw new i("Invalid JSON-LD syntax; @context @container with @graph must have no other values other than @id, @index, and @set","jsonld.SyntaxError",{code:"invalid container mapping",context:t})}else a&=r.length<=(u?2:1);if(r.includes("@type")&&(p["@type"]=p["@type"]||"@id",!["@id","@vocab"].includes(p["@type"])))throw new i("Invalid JSON-LD syntax; container: @type requires @type to be @id or @vocab.","jsonld.SyntaxError",{code:"invalid type mapping",context:t})}else a&=!o(f["@container"]),a&=r.length<=1;if(a&=r.every((e=>n.includes(e))),a&=!(u&&r.includes("@list")),!a)throw new i("Invalid JSON-LD syntax; @context @container value must be one of the following: "+n.join(", "),"jsonld.SyntaxError",{code:"invalid container mapping",context:t});if(p.reverse&&!r.every((e=>["@index","@set"].includes(e))))throw new i("Invalid JSON-LD syntax; @context @container value for a @reverse type definition must be @index or @set.","jsonld.SyntaxError",{code:"invalid reverse property",context:t});p["@container"]=r}if("@index"in f){if(!("@container"in f)||!p["@container"].includes("@index"))throw new i(`Invalid JSON-LD syntax; @index without @index in @container: "${f["@index"]}" on term "${r}".`,"jsonld.SyntaxError",{code:"invalid term definition",context:t});if(!s(f["@index"])||0===f["@index"].indexOf("@"))throw new i(`Invalid JSON-LD syntax; @index must expand to an IRI: "${f["@index"]}" on term "${r}".`,"jsonld.SyntaxError",{code:"invalid term definition",context:t});p["@index"]=f["@index"]}if("@context"in f&&(p["@context"]=f["@context"]),"@language"in f&&!("@type"in f)){let e=f["@language"];if(null!==e&&!s(e))throw new i("Invalid JSON-LD syntax; @context @language value must be a string or null.","jsonld.SyntaxError",{code:"invalid language mapping",context:t});null!==e&&(e=e.toLowerCase()),p["@language"]=e}if("@prefix"in f){if(r.match(/:|\//))throw new i("Invalid JSON-LD syntax; @context @prefix used on a compact IRI term","jsonld.SyntaxError",{code:"invalid term definition",context:t});if(g.isKeyword(p["@id"]))throw new i("Invalid JSON-LD syntax; keywords may not be used as prefixes","jsonld.SyntaxError",{code:"invalid term definition",context:t});if("boolean"!=typeof f["@prefix"])throw new i("Invalid JSON-LD syntax; @context value for @prefix must be boolean","jsonld.SyntaxError",{code:"invalid @prefix value",context:t});p._prefix=!0===f["@prefix"]}if("@direction"in f){const e=f["@direction"];if(null!==e&&"ltr"!==e&&"rtl"!==e)throw new i('Invalid JSON-LD syntax; @direction value must be null, "ltr", or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",context:t});p["@direction"]=e}if("@nest"in f){const e=f["@nest"];if(!s(e)||"@nest"!==e&&0===e.indexOf("@"))throw new i("Invalid JSON-LD syntax; @context @nest value must be a string which is not a keyword other than @nest.","jsonld.SyntaxError",{code:"invalid @nest value",context:t});p["@nest"]=e}
2
+ // disallow aliasing @context and @preserve
3
+ const x=p["@id"];if("@context"===x||"@preserve"===x)throw new i("Invalid JSON-LD syntax; @context and @preserve cannot be aliased.","jsonld.SyntaxError",{code:"invalid keyword alias",context:t});if(h&&h.protected&&!l&&(e.protected[r]=!0,p.protected=!0,!function e(t,r){if(!t||"object"!=typeof t||!r||"object"!=typeof r)return t===r;const n=Array.isArray(t);if(n!==Array.isArray(r))return!1;if(n){if(t.length!==r.length)return!1;for(let n=0;n<t.length;++n)if(!e(t[n],r[n]))return!1;return!0}const i=Object.keys(t),o=Object.keys(r);if(i.length!==o.length)return!1;for(const n in t){let i=t[n],o=r[n];if("@container"===n&&Array.isArray(i)&&Array.isArray(o)&&(i=i.slice().sort(),o=o.slice().sort()),!e(i,o))return!1}return!0}(h,p))){const e=u&&u.protectedMode||"error";if("error"===e)throw new i(`Invalid JSON-LD syntax; tried to redefine "${r}" which is a protected term.`,"jsonld.SyntaxError",{code:"protected term redefinition",context:t,term:r});if("warn"===e)return void console.warn("WARNING: protected term redefinition",{term:r});throw new i("Invalid protectedMode.","jsonld.SyntaxError",{code:"invalid protected mode",context:t,term:r,protectedMode:e})}},g.expandIri=(e,t,r,n)=>y(e,t,r,void 0,void 0,n),g.getInitialContext=e=>{const t=JSON.stringify({processingMode:e.processingMode}),r=p.get(t);if(r)return r;const i={processingMode:e.processingMode,mappings:new Map,inverse:null,getInverse:function(){const e=this;if(e.inverse)return e.inverse;const t=e.inverse={},r=e.fastCurieMap={},n={},i=(e["@language"]||"@none").toLowerCase(),s=e["@direction"],u=e.mappings,c=[...u.keys()].sort(d);for(const e of c){const o=u.get(e);if(null===o)continue;let c=o["@container"]||"@none";if(c=[].concat(c).sort().join(""),null===o["@id"])continue;const l=h(o["@id"]);for(const u of l){let l=t[u];const f=g.isKeyword(u);if(l)f||o._termHasColon||n[u].push(e);else if(t[u]=l={},!f&&!o._termHasColon){n[u]=[e];const t={iri:u,terms:n[u]};u[0]in r?r[u[0]].push(t):r[u[0]]=[t]}if(l[c]||(l[c]={"@language":{},"@type":{},"@any":{}}),l=l[c],a(e,l["@any"],"@none"),o.reverse)a(e,l["@type"],"@reverse");else if("@none"===o["@type"])a(e,l["@any"],"@none"),a(e,l["@language"],"@none"),a(e,l["@type"],"@none");else if("@type"in o)a(e,l["@type"],o["@type"]);else if("@language"in o&&"@direction"in o){const t=o["@language"],r=o["@direction"];a(e,l["@language"],t&&r?`${t}_${r}`.toLowerCase():t?t.toLowerCase():r?"_"+r:"@null")}else"@language"in o?a(e,l["@language"],(o["@language"]||"@null").toLowerCase()):"@direction"in o?o["@direction"]?a(e,l["@language"],"_"+o["@direction"]):a(e,l["@language"],"@none"):s?(a(e,l["@language"],"_"+s),a(e,l["@language"],"@none"),a(e,l["@type"],"@none")):(a(e,l["@language"],i),a(e,l["@language"],"@none"),a(e,l["@type"],"@none"))}}for(const e in r)o(r,e,1);return t},clone:function(){const e={};return e.mappings=n.clone(this.mappings),e.clone=this.clone,e.inverse=null,e.getInverse=this.getInverse,e.protected=n.clone(this.protected),this.previousContext&&(e.previousContext=this.previousContext.clone()),e.revertToPreviousContext=this.revertToPreviousContext,"@base"in this&&(e["@base"]=this["@base"]),"@language"in this&&(e["@language"]=this["@language"]),"@vocab"in this&&(e["@vocab"]=this["@vocab"]),e},revertToPreviousContext:function(){return this.previousContext?this.previousContext.clone():this},protected:{}};return 1e4===p.size&&p.clear(),p.set(t,i),i;function o(e,t,r){const n=e[t],i=e[t]={};let a,s;for(const e of n)a=e.iri,s=r>=a.length?"":a[r],s in i?i[s].push(e):i[s]=[e];for(const e in i)""!==e&&o(i,e,r+1)}function a(e,t,r){t.hasOwnProperty(r)||(t[r]=e)}},g.getContextValue=(e,t,r)=>{if(null===t){if("@context"===r)return;return null}if(e.mappings.has(t)){const n=e.mappings.get(t);if(u(r))return n;if(n.hasOwnProperty(r))return n[r]}return"@language"===r&&r in e||"@direction"===r&&r in e?e[r]:"@context"!==r?null:void 0},g.processingMode=(e,t)=>t.toString()>="1.1"?!e.processingMode||e.processingMode>="json-ld-"+t.toString():"json-ld-1.0"===e.processingMode,g.isKeyword=e=>{if(!s(e)||"@"!==e[0])return!1;switch(e){case"@base":case"@container":case"@context":case"@default":case"@direction":case"@embed":case"@explicit":case"@graph":case"@id":case"@included":case"@index":case"@json":case"@language":case"@list":case"@nest":case"@none":case"@omitDefault":case"@prefix":case"@preserve":case"@protected":case"@requireAll":case"@reverse":case"@set":case"@type":case"@value":case"@version":case"@vocab":return!0}return!1}},function(e,t,r){
4
+ /**
5
+ * A JavaScript implementation of the JSON-LD API.
6
+ *
7
+ * @author Dave Longley
8
+ *
9
+ * @license BSD 3-Clause License
10
+ * Copyright (c) 2011-2019 Digital Bazaar, Inc.
11
+ * All rights reserved.
12
+ *
13
+ * Redistribution and use in source and binary forms, with or without
14
+ * modification, are permitted provided that the following conditions are met:
15
+ *
16
+ * Redistributions of source code must retain the above copyright notice,
17
+ * this list of conditions and the following disclaimer.
18
+ *
19
+ * Redistributions in binary form must reproduce the above copyright
20
+ * notice, this list of conditions and the following disclaimer in the
21
+ * documentation and/or other materials provided with the distribution.
22
+ *
23
+ * Neither the name of the Digital Bazaar, Inc. nor the names of its
24
+ * contributors may be used to endorse or promote products derived from
25
+ * this software without specific prior written permission.
26
+ *
27
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
28
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
29
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
30
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
31
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
32
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
33
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
34
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
35
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
36
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
37
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38
+ */
39
+ const n=r(11),i=r(30),o=r(2),a=r(32),s=o.IdentifierIssuer,u=r(3),c=r(20),l=r(36),{expand:f}=r(37),{flatten:h}=r(38),{fromRDF:d}=r(39),{toRDF:p}=r(40),{frameMergedOrDefault:v,cleanupNull:g}=r(42),{isArray:y,isObject:m,isString:b}=r(1),{isSubjectReference:x}=r(4),{expandIri:w,getInitialContext:_,process:I,processingMode:S}=r(6),{compact:j,compactIri:R}=r(43),{createNodeMap:k,createMergedNodeMap:E,mergeNodeMaps:T}=r(10),O=function(e){const t={},O=new c({max:100});function A(t,{documentLoader:r=e.documentLoader,...n}){return Object.assign({},{documentLoader:r},n,t)}return e.compact=async function(t,r,n){if(arguments.length<2)throw new TypeError("Could not compact, too few arguments.");if(null===r)throw new u("The compaction context must not be null.","jsonld.CompactError",{code:"invalid local context"});if(null===t)return null;let i;(n=A(n,{base:b(t)?t:"",compactArrays:!0,compactToRelative:!0,graph:!1,skipExpansion:!1,link:!1,issuer:new s("_:b"),contextResolver:new a({sharedCache:O})})).link&&(n.skipExpansion=!0),n.compactToRelative||delete n.base,i=n.skipExpansion?t:await e.expand(t,n);const c=await e.processContext(_(n),r,n);let l=await j({activeCtx:c,element:i,options:n,compactionMap:n.compactionMap});n.compactArrays&&!n.graph&&y(l)?1===l.length?l=l[0]:0===l.length&&(l={}):n.graph&&m(l)&&(l=[l]),m(r)&&"@context"in r&&(r=r["@context"]),r=o.clone(r),y(r)||(r=[r]);const f=r;r=[];for(let e=0;e<f.length;++e)(!m(f[e])||Object.keys(f[e]).length>0)&&r.push(f[e]);const h=r.length>0;if(1===r.length&&(r=r[0]),y(l)){const e=R({activeCtx:c,iri:"@graph",relativeTo:{vocab:!0}}),t=l;l={},h&&(l["@context"]=r),l[e]=t}else if(m(l)&&h){const e=l;l={"@context":r};for(const t in e)l[t]=e[t]}return l},e.expand=async function(t,r){if(arguments.length<1)throw new TypeError("Could not expand, too few arguments.");!1===(r=A(r,{keepFreeFloatingNodes:!1,contextResolver:new a({sharedCache:O})})).expansionMap&&(r.expansionMap=void 0);const n={},i=[];if("expandContext"in r){const e=o.clone(r.expandContext);m(e)&&"@context"in e?n.expandContext=e:n.expandContext={"@context":e},i.push(n.expandContext)}let s;if(b(t)){const o=await e.get(t,r);s=o.documentUrl,n.input=o.document,o.contextUrl&&(n.remoteContext={"@context":o.contextUrl},i.push(n.remoteContext))}else n.input=o.clone(t);"base"in r||(r.base=s||"");let u=_(r);for(const e of i)u=await I({activeCtx:u,localCtx:e,options:r});let c=await f({activeCtx:u,element:n.input,options:r,expansionMap:r.expansionMap});return m(c)&&"@graph"in c&&1===Object.keys(c).length?c=c["@graph"]:null===c&&(c=[]),y(c)||(c=[c]),c},e.flatten=async function(t,r,n){if(arguments.length<1)return new TypeError("Could not flatten, too few arguments.");r="function"==typeof r?null:r||null,n=A(n,{base:b(t)?t:"",contextResolver:new a({sharedCache:O})});const i=await e.expand(t,n),o=h(i);return null===r?o:(n.graph=!0,n.skipExpansion=!0,await e.compact(o,r,n))},e.frame=async function(t,r,n){if(arguments.length<2)throw new TypeError("Could not frame, too few arguments.");if(n=A(n,{base:b(t)?t:"",embed:"@once",explicit:!1,requireAll:!1,omitDefault:!1,bnodesToClear:[],contextResolver:new a({sharedCache:O})}),b(r)){const t=await e.get(r,n);if(r=t.document,t.contextUrl){let e=r["@context"];e?y(e)?e.push(t.contextUrl):e=[e,t.contextUrl]:e=t.contextUrl,r["@context"]=e}}const i=r&&r["@context"]||{},o=await e.processContext(_(n),i,n);n.hasOwnProperty("omitGraph")||(n.omitGraph=S(o,1.1)),n.hasOwnProperty("pruneBlankNodeIdentifiers")||(n.pruneBlankNodeIdentifiers=S(o,1.1));const s=await e.expand(t,n),u={...n};u.isFrame=!0,u.keepFreeFloatingNodes=!0;const c=await e.expand(r,u),l=Object.keys(r).map((e=>w(o,e,{vocab:!0})));u.merged=!l.includes("@graph"),u.is11=S(o,1.1);const f=v(s,c,u);u.graph=!n.omitGraph,u.skipExpansion=!0,u.link={},u.framing=!0;let h=await e.compact(f,i,u);return u.link={},h=g(h,u),h},e.link=async function(t,r,n){const i={};return r&&(i["@context"]=r),i["@embed"]="@link",e.frame(t,i,n)},e.normalize=e.canonize=async function(t,r){if(arguments.length<1)throw new TypeError("Could not canonize, too few arguments.");if("inputFormat"in(r=A(r,{base:b(t)?t:"",algorithm:"URDNA2015",skipExpansion:!1,contextResolver:new a({sharedCache:O})}))){if("application/n-quads"!==r.inputFormat&&"application/nquads"!==r.inputFormat)throw new u("Unknown canonicalization input format.","jsonld.CanonizeError");const e=l.parse(t);return n.canonize(e,r)}const i={...r};delete i.format,i.produceGeneralizedRdf=!1;const o=await e.toRDF(t,i);return n.canonize(o,r)},e.fromRDF=async function(e,r){if(arguments.length<1)throw new TypeError("Could not convert from RDF, too few arguments.");r=A(r,{format:b(e)?"application/n-quads":void 0});const{format:n}=r;let{rdfParser:i}=r;if(n){if(i=i||t[n],!i)throw new u("Unknown input format.","jsonld.UnknownFormat",{format:n})}else i=()=>e;const o=await i(e);return d(o,r)},e.toRDF=async function(t,r){if(arguments.length<1)throw new TypeError("Could not convert to RDF, too few arguments.");let n;n=(r=A(r,{base:b(t)?t:"",skipExpansion:!1,contextResolver:new a({sharedCache:O})})).skipExpansion?t:await e.expand(t,r);const i=p(n,r);if(r.format){if("application/n-quads"===r.format||"application/nquads"===r.format)return l.serialize(i);throw new u("Unknown output format.","jsonld.UnknownFormat",{format:r.format})}return i},e.createNodeMap=async function(t,r){if(arguments.length<1)throw new TypeError("Could not create node map, too few arguments.");r=A(r,{base:b(t)?t:"",contextResolver:new a({sharedCache:O})});const n=await e.expand(t,r);return E(n,r)},e.merge=async function(t,r,n){if(arguments.length<1)throw new TypeError("Could not merge, too few arguments.");if(!y(t))throw new TypeError('Could not merge, "docs" must be an array.');r="function"==typeof r?null:r||null,n=A(n,{contextResolver:new a({sharedCache:O})});const i=await Promise.all(t.map((t=>{const r={...n};return e.expand(t,r)})));let u=!0;"mergeNodes"in n&&(u=n.mergeNodes);const c=n.issuer||new s("_:b"),l={"@default":{}};for(let e=0;e<i.length;++e){const t=o.relabelBlankNodes(i[e],{issuer:new s("_:b"+e+"-")}),r=u||0===e?l:{"@default":{}};if(k(t,r,"@default",c),r!==l)for(const e in r){const t=r[e];if(!(e in l)){l[e]=t;continue}const n=l[e];for(const e in t)e in n||(n[e]=t[e])}}const f=T(l),h=[],d=Object.keys(f).sort();for(let e=0;e<d.length;++e){const t=f[d[e]];x(t)||h.push(t)}return null===r?h:(n.graph=!0,n.skipExpansion=!0,await e.compact(h,r,n))},Object.defineProperty(e,"documentLoader",{get:()=>e._documentLoader,set:t=>e._documentLoader=t}),e.documentLoader=async e=>{throw new u("Could not retrieve a JSON-LD document from the URL. URL dereferencing not implemented.","jsonld.LoadDocumentError",{code:"loading document failed",url:e})},e.get=async function(t,r){let n;n="function"==typeof r.documentLoader?r.documentLoader:e.documentLoader;const i=await n(t);try{if(!i.document)throw new u("No remote document found at the given URL.","jsonld.NullRemoteDocument");b(i.document)&&(i.document=JSON.parse(i.document))}catch(e){throw new u("Could not retrieve a JSON-LD document from the URL.","jsonld.LoadDocumentError",{code:"loading document failed",cause:e,remoteDoc:i})}return i},e.processContext=async function(e,t,r){return r=A(r,{base:"",contextResolver:new a({sharedCache:O})}),null===t?_(r):(t=o.clone(t),m(t)&&"@context"in t||(t={"@context":t}),I({activeCtx:e,localCtx:t,options:r}))},e.getContextValue=r(6).getContextValue,e.documentLoaders={},e.useDocumentLoader=function(t){if(!(t in e.documentLoaders))throw new u('Unknown document loader type: "'+t+'"',"jsonld.UnknownDocumentLoader",{type:t});e.documentLoader=e.documentLoaders[t].apply(e,Array.prototype.slice.call(arguments,1))},e.registerRDFParser=function(e,r){t[e]=r},e.unregisterRDFParser=function(e){delete t[e]},e.registerRDFParser("application/n-quads",l.parse),e.registerRDFParser("application/nquads",l.parse),e.url=r(5),e.util=o,Object.assign(e,o),e.promises=e,e.RequestQueue=r(19),e.JsonLdProcessor=r(44)(e),i.setupGlobals(e),i.setupDocumentLoaders(e),e},A=function(){return O((function(){return A()}))};O(A),e.exports=A},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){
40
+ /*!
41
+ * Copyright (c) 2016-2022 Digital Bazaar, Inc. All rights reserved.
42
+ */
43
+ r(16);const n=self.crypto||self.msCrypto;e.exports=class{constructor(e){if(!n||!n.subtle)throw new Error("crypto.subtle not found.");if("sha256"===e)this.algorithm={name:"SHA-256"};else{if("sha1"!==e)throw new Error(`Unsupported algorithm "${e}".`);this.algorithm={name:"SHA-1"}}this._content=""}update(e){this._content+=e}async digest(){const e=(new TextEncoder).encode(this._content),t=new Uint8Array(await n.subtle.digest(this.algorithm,e));let r="";for(let e=0;e<t.length;++e)r+=t[e].toString(16).padStart(2,"0");return r}}},function(e,t,r){const{isKeyword:n}=r(6),i=r(4),o=r(1),a=r(2),s=r(3),u={};e.exports=u,u.createMergedNodeMap=(e,t)=>{const r=(t=t||{}).issuer||new a.IdentifierIssuer("_:b"),n={"@default":{}};return u.createNodeMap(e,n,"@default",r),u.mergeNodeMaps(n)},u.createNodeMap=(e,t,r,c,l,f)=>{if(o.isArray(e)){for(const n of e)u.createNodeMap(n,t,r,c,void 0,f);return}if(!o.isObject(e))return void(f&&f.push(e));if(i.isValue(e)){if("@type"in e){let t=e["@type"];0===t.indexOf("_:")&&(e["@type"]=t=c.getId(t))}return void(f&&f.push(e))}if(f&&i.isList(e)){const n=[];return u.createNodeMap(e["@list"],t,r,c,l,n),void f.push({"@list":n})}if("@type"in e){const t=e["@type"];for(const e of t)0===e.indexOf("_:")&&c.getId(e)}o.isUndefined(l)&&(l=i.isBlankNode(e)?c.getId(e["@id"]):e["@id"]),f&&f.push({"@id":l});const h=t[r],d=h[l]=h[l]||{};d["@id"]=l;const p=Object.keys(e).sort();for(let o of p){if("@id"===o)continue;if("@reverse"===o){const n={"@id":l},o=e["@reverse"];for(const e in o){const s=o[e];for(const o of s){let s=o["@id"];i.isBlankNode(o)&&(s=c.getId(s)),u.createNodeMap(o,t,r,c,s),a.addValue(h[s],e,n,{propertyIsArray:!0,allowDuplicate:!1})}}continue}if("@graph"===o){l in t||(t[l]={}),u.createNodeMap(e[o],t,l,c);continue}if("@included"===o){u.createNodeMap(e[o],t,r,c);continue}if("@type"!==o&&n(o)){if("@index"===o&&o in d&&(e[o]!==d[o]||e[o]["@id"]!==d[o]["@id"]))throw new s("Invalid JSON-LD syntax; conflicting @index property detected.","jsonld.SyntaxError",{code:"conflicting indexes",subject:d});d[o]=e[o];continue}const f=e[o];if(0===o.indexOf("_:")&&(o=c.getId(o)),0!==f.length)for(let e of f)if("@type"===o&&(e=0===e.indexOf("_:")?c.getId(e):e),i.isSubject(e)||i.isSubjectReference(e)){if("@id"in e&&!e["@id"])continue;const n=i.isBlankNode(e)?c.getId(e["@id"]):e["@id"];a.addValue(d,o,{"@id":n},{propertyIsArray:!0,allowDuplicate:!1}),u.createNodeMap(e,t,r,c,n)}else if(i.isValue(e))a.addValue(d,o,e,{propertyIsArray:!0,allowDuplicate:!1});else if(i.isList(e)){const n=[];u.createNodeMap(e["@list"],t,r,c,l,n),e={"@list":n},a.addValue(d,o,e,{propertyIsArray:!0,allowDuplicate:!1})}else u.createNodeMap(e,t,r,c,l),a.addValue(d,o,e,{propertyIsArray:!0,allowDuplicate:!1});else a.addValue(d,o,[],{propertyIsArray:!0})}},u.mergeNodeMapGraphs=e=>{const t={};for(const r of Object.keys(e).sort())for(const i of Object.keys(e[r]).sort()){const o=e[r][i];i in t||(t[i]={"@id":i});const s=t[i];for(const e of Object.keys(o).sort())if(n(e)&&"@type"!==e)s[e]=a.clone(o[e]);else for(const t of o[e])a.addValue(s,e,a.clone(t),{propertyIsArray:!0,allowDuplicate:!1})}return t},u.mergeNodeMaps=e=>{const t=e["@default"],r=Object.keys(e).sort();for(const n of r){if("@default"===n)continue;const r=e[n];let o=t[n];o?"@graph"in o||(o["@graph"]=[]):t[n]=o={"@id":n,"@graph":[]};const a=o["@graph"];for(const e of Object.keys(r).sort()){const t=r[e];i.isSubjectReference(t)||a.push(t)}}return t}},function(e,t,r){e.exports=r(24)},function(e,t,r){e.exports=class e{constructor(e,t=new Map,r=0){this.prefix=e,this._existing=t,this.counter=r}clone(){const{prefix:t,_existing:r,counter:n}=this;return new e(t,new Map(r),n)}getId(e){const t=e&&this._existing.get(e);if(t)return t;const r=this.prefix+this.counter;return this.counter++,e&&this._existing.set(e,r),r}hasId(e){return this._existing.has(e)}getOldIds(){return[...this._existing.keys()]}}},function(e,t,r){
44
+ /*!
45
+ * Copyright (c) 2016-2022 Digital Bazaar, Inc. All rights reserved.
46
+ */
47
+ const n="http://www.w3.org/1999/02/22-rdf-syntax-ns#langString",i="http://www.w3.org/2001/XMLSchema#string",o={};function a(e,t){return e.subject.termType===t.subject.termType&&e.object.termType===t.object.termType&&e.subject.value===t.subject.value&&e.predicate.value===t.predicate.value&&e.object.value===t.object.value&&("Literal"!==e.object.termType||e.object.datatype.termType===t.object.datatype.termType&&e.object.language===t.object.language&&e.object.datatype.value===t.object.datatype.value)}o.eoln=/(?:\r\n)|(?:\n)|(?:\r)/g,o.empty=new RegExp("^[ \\t]*$"),o.quad=new RegExp('^[ \\t]*(?:(?:<([^:]+:[^>]*)>)|(_:(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9])(?:(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9-·̀-ͯ‿-⁀.])*(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9-·̀-ͯ‿-⁀]))?))[ \\t]+(?:<([^:]+:[^>]*)>)[ \\t]+(?:(?:<([^:]+:[^>]*)>)|(_:(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9])(?:(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9-·̀-ͯ‿-⁀.])*(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9-·̀-ͯ‿-⁀]))?)|(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"(?:(?:\\^\\^(?:<([^:]+:[^>]*)>))|(?:@([a-zA-Z]+(?:-[a-zA-Z0-9]+)*)))?))[ \\t]*(?:\\.|(?:(?:(?:<([^:]+:[^>]*)>)|(_:(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9])(?:(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9-·̀-ͯ‿-⁀.])*(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9-·̀-ͯ‿-⁀]))?))[ \\t]*\\.))[ \\t]*$'),e.exports=class e{static parse(e){const t=[],r={},s=e.split(o.eoln);let c=0;for(const e of s){if(c++,o.empty.test(e))continue;const s=e.match(o.quad);if(null===s)throw new Error("N-Quads parse error on line "+c+".");const l={subject:null,predicate:null,object:null,graph:null};if(void 0!==s[1]?l.subject={termType:"NamedNode",value:s[1]}:l.subject={termType:"BlankNode",value:s[2]},l.predicate={termType:"NamedNode",value:s[3]},void 0!==s[4]?l.object={termType:"NamedNode",value:s[4]}:void 0!==s[5]?l.object={termType:"BlankNode",value:s[5]}:(l.object={termType:"Literal",value:void 0,datatype:{termType:"NamedNode"}},void 0!==s[7]?l.object.datatype.value=s[7]:void 0!==s[8]?(l.object.datatype.value=n,l.object.language=s[8]):l.object.datatype.value=i,l.object.value=s[6].replace(u,(function(e,t,r,n){if(t)switch(t){case"t":return"\t";case"b":return"\b";case"n":return"\n";case"r":return"\r";case"f":return"\f";case'"':return'"';case"'":return"'";case"\\":return"\\"}if(r)return String.fromCharCode(parseInt(r,16));if(n)throw new Error("Unsupported U escape")}))),void 0!==s[9]?l.graph={termType:"NamedNode",value:s[9]}:void 0!==s[10]?l.graph={termType:"BlankNode",value:s[10]}:l.graph={termType:"DefaultGraph",value:""},l.graph.value in r){let e=!0;const n=r[l.graph.value];for(const t of n)if(a(t,l)){e=!1;break}e&&(n.push(l),t.push(l))}else r[l.graph.value]=[l],t.push(l)}return t}static serialize(t){Array.isArray(t)||(t=e.legacyDatasetToQuads(t));const r=[];for(const n of t)r.push(e.serializeQuad(n));return r.sort().join("")}static serializeQuadComponents(e,t,r,o){let a="";return"NamedNode"===e.termType?a+=`<${e.value}>`:a+=""+e.value,a+=` <${t.value}> `,"NamedNode"===r.termType?a+=`<${r.value}>`:"BlankNode"===r.termType?a+=r.value:(a+=`"${function(e){return e.replace(s,(function(e){switch(e){case'"':return'\\"';case"\\":return"\\\\";case"\n":return"\\n";case"\r":return"\\r"}}))}(r.value)}"`,r.datatype.value===n?r.language&&(a+="@"+r.language):r.datatype.value!==i&&(a+=`^^<${r.datatype.value}>`)),"NamedNode"===o.termType?a+=` <${o.value}>`:"BlankNode"===o.termType&&(a+=" "+o.value),a+=" .\n",a}static serializeQuad(t){return e.serializeQuadComponents(t.subject,t.predicate,t.object,t.graph)}static legacyDatasetToQuads(e){const t=[],r={"blank node":"BlankNode",IRI:"NamedNode",literal:"Literal"};for(const o in e)e[o].forEach((e=>{const a={};for(const t in e){const o=e[t],s={termType:r[o.type],value:o.value};"Literal"===s.termType&&(s.datatype={termType:"NamedNode"},"datatype"in o&&(s.datatype.value=o.datatype),"language"in o?("datatype"in o||(s.datatype.value=n),s.language=o.language):"datatype"in o||(s.datatype.value=i)),a[t]=s}a.graph="@default"===o?{termType:"DefaultGraph",value:""}:{termType:o.startsWith("_:")?"BlankNode":"NamedNode",value:o},t.push(a)}));return t}};const s=/["\\\n\r]/g,u=/(?:\\([tbnrf"'\\]))|(?:\\u([0-9A-Fa-f]{4}))|(?:\\U([0-9A-Fa-f]{8}))/g},function(e,t,r){const n="http://www.w3.org/1999/02/22-rdf-syntax-ns#",i="http://www.w3.org/2001/XMLSchema#";e.exports={LINK_HEADER_REL:"http://www.w3.org/ns/json-ld#context",LINK_HEADER_CONTEXT:"http://www.w3.org/ns/json-ld#context",RDF:n,RDF_LIST:n+"List",RDF_FIRST:n+"first",RDF_REST:n+"rest",RDF_NIL:n+"nil",RDF_TYPE:n+"type",RDF_PLAIN_LITERAL:n+"PlainLiteral",RDF_XML_LITERAL:n+"XMLLiteral",RDF_JSON_LITERAL:n+"JSON",RDF_OBJECT:n+"object",RDF_LANGSTRING:n+"langString",XSD:i,XSD_BOOLEAN:i+"boolean",XSD_DOUBLE:i+"double",XSD_INTEGER:i+"integer",XSD_STRING:i+"string"}},function(e,t,r){(function(t){
48
+ /*!
49
+ * Copyright (c) 2016-2022 Digital Bazaar, Inc. All rights reserved.
50
+ */
51
+ const n=r(12),i=r(9),o=r(17),a=r(13);function s(e,t){return e.hash<t.hash?-1:e.hash>t.hash?1:0}e.exports=class{constructor({createMessageDigest:e=(()=>new i("sha256")),maxDeepIterations:t=1/0}={}){this.name="URDNA2015",this.blankNodeInfo=new Map,this.canonicalIssuer=new n("_:c14n"),this.createMessageDigest=e,this.maxDeepIterations=t,this.quads=null,this.deepIterations=null}async main(e){this.deepIterations=new Map,this.quads=e;for(const t of e)this._addBlankNodeQuadInfo({quad:t,component:t.subject}),this._addBlankNodeQuadInfo({quad:t,component:t.object}),this._addBlankNodeQuadInfo({quad:t,component:t.graph});const t=new Map,r=[...this.blankNodeInfo.keys()];let i=0;for(const e of r)++i%100==0&&await this._yield(),await this._hashAndTrackBlankNode({id:e,hashToBlankNodes:t});const o=[...t.keys()].sort(),u=[];for(const e of o){const r=t.get(e);if(r.length>1){u.push(r);continue}const n=r[0];this.canonicalIssuer.getId(n)}for(const e of u){const t=[];for(const r of e){if(this.canonicalIssuer.hasId(r))continue;const e=new n("_:b");e.getId(r);const i=await this.hashNDegreeQuads(r,e);t.push(i)}t.sort(s);for(const e of t){const t=e.issuer.getOldIds();for(const e of t)this.canonicalIssuer.getId(e)}}const c=[];for(const e of this.quads){const t=a.serializeQuadComponents(this._componentWithCanonicalId(e.subject),e.predicate,this._componentWithCanonicalId(e.object),this._componentWithCanonicalId(e.graph));c.push(t)}return c.sort(),c.join("")}async hashFirstDegreeQuads(e){const t=[],r=this.blankNodeInfo.get(e),n=r.quads;for(const r of n){const n={subject:null,predicate:r.predicate,object:null,graph:null};n.subject=this.modifyFirstDegreeComponent(e,r.subject,"subject"),n.object=this.modifyFirstDegreeComponent(e,r.object,"object"),n.graph=this.modifyFirstDegreeComponent(e,r.graph,"graph"),t.push(a.serializeQuad(n))}t.sort();const i=this.createMessageDigest();for(const e of t)i.update(e);return r.hash=await i.digest(),r.hash}async hashRelatedBlankNode(e,t,r,n){let i;i=this.canonicalIssuer.hasId(e)?this.canonicalIssuer.getId(e):r.hasId(e)?r.getId(e):this.blankNodeInfo.get(e).hash;const o=this.createMessageDigest();return o.update(n),"g"!==n&&o.update(this.getRelatedPredicate(t)),o.update(i),o.digest()}async hashNDegreeQuads(e,t){const r=this.deepIterations.get(e)||0;if(r>this.maxDeepIterations)throw new Error(`Maximum deep iterations (${this.maxDeepIterations}) exceeded.`);this.deepIterations.set(e,r+1);const n=this.createMessageDigest(),i=await this.createHashToRelated(e,t),a=[...i.keys()].sort();for(const e of a){n.update(e);let r,a="";const s=new o(i.get(e));let u=0;for(;s.hasNext();){const e=s.next();++u%3==0&&await this._yield();let n=t.clone(),i="";const o=[];let c=!1;for(const t of e)if(this.canonicalIssuer.hasId(t)?i+=this.canonicalIssuer.getId(t):(n.hasId(t)||o.push(t),i+=n.getId(t)),0!==a.length&&i>a){c=!0;break}if(!c){for(const e of o){const t=await this.hashNDegreeQuads(e,n);if(i+=n.getId(e),i+=`<${t.hash}>`,n=t.issuer,0!==a.length&&i>a){c=!0;break}}c||(0===a.length||i<a)&&(a=i,r=n)}}n.update(a),t=r}return{hash:await n.digest(),issuer:t}}modifyFirstDegreeComponent(e,t){return"BlankNode"!==t.termType?t:{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return`<${e.predicate.value}>`}async createHashToRelated(e,t){const r=new Map,n=this.blankNodeInfo.get(e).quads;let i=0;for(const o of n)++i%100==0&&await this._yield(),await Promise.all([this._addRelatedBlankNodeHash({quad:o,component:o.subject,position:"s",id:e,issuer:t,hashToRelated:r}),this._addRelatedBlankNodeHash({quad:o,component:o.object,position:"o",id:e,issuer:t,hashToRelated:r}),this._addRelatedBlankNodeHash({quad:o,component:o.graph,position:"g",id:e,issuer:t,hashToRelated:r})]);return r}async _hashAndTrackBlankNode({id:e,hashToBlankNodes:t}){const r=await this.hashFirstDegreeQuads(e),n=t.get(r);n?n.push(e):t.set(r,[e])}_addBlankNodeQuadInfo({quad:e,component:t}){if("BlankNode"!==t.termType)return;const r=t.value,n=this.blankNodeInfo.get(r);n?n.quads.add(e):this.blankNodeInfo.set(r,{quads:new Set([e]),hash:null})}async _addRelatedBlankNodeHash({quad:e,component:t,position:r,id:n,issuer:i,hashToRelated:o}){if("BlankNode"!==t.termType||t.value===n)return;const a=t.value,s=await this.hashRelatedBlankNode(a,e,i,r),u=o.get(s);u?u.push(a):o.set(s,[a])}_componentWithCanonicalId(e){return"BlankNode"!==e.termType||e.value.startsWith(this.canonicalIssuer.prefix)?e:{termType:"BlankNode",value:this.canonicalIssuer.getId(e.value)}}async _yield(){return new Promise((e=>t(e)))}}}).call(this,r(25).setImmediate)},function(e,t,r){(function(e,t){!function(e,r){if(!e.setImmediate){var n,i,o,a,s,u=1,c={},l=!1,f=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick((function(){p(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&p(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),n=function(t){e.postMessage(a+t,"*")}):e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){p(e.data)},n=function(e){o.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(i=f.documentElement,n=function(e){var t=f.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):n=function(e){setTimeout(p,0,e)},h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r<t.length;r++)t[r]=arguments[r+1];var i={callback:e,args:t};return c[u]=i,n(u),u++},h.clearImmediate=d}function d(e){delete c[e]}function p(e){if(l)setTimeout(p,0,e);else{var t=c[e];if(t){l=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(void 0,r)}}(t)}finally{d(e),l=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,r(8),r(26))},function(e,t,r){
52
+ /*!
53
+ * Copyright (c) 2016-2022 Digital Bazaar, Inc. All rights reserved.
54
+ */
55
+ e.exports=class{constructor(e){this.current=e.sort(),this.done=!1,this.dir=new Map;for(let t=0;t<e.length;++t)this.dir.set(e[t],!0)}hasNext(){return!this.done}next(){const{current:e,dir:t}=this,r=e.slice();let n=null,i=0;const o=e.length;for(let r=0;r<o;++r){const a=e[r],s=t.get(a);(null===n||a>n)&&(s&&r>0&&a>e[r-1]||!s&&r<o-1&&a>e[r+1])&&(n=a,i=r)}if(null===n)this.done=!0;else{const r=t.get(n)?i-1:i+1;e[i]=e[r],e[r]=n;for(const r of e)r>n&&t.set(r,!t.get(r))}return r}}},function(e,t,r){
56
+ /*!
57
+ * Copyright (c) 2016-2022 Digital Bazaar, Inc. All rights reserved.
58
+ */
59
+ const n=r(12),i=r(9),o=r(17),a=r(13);function s(e,t){return e.hash<t.hash?-1:e.hash>t.hash?1:0}e.exports=class{constructor({createMessageDigest:e=(()=>new i("sha256")),maxDeepIterations:t=1/0}={}){this.name="URDNA2015",this.blankNodeInfo=new Map,this.canonicalIssuer=new n("_:c14n"),this.createMessageDigest=e,this.maxDeepIterations=t,this.quads=null,this.deepIterations=null}main(e){this.deepIterations=new Map,this.quads=e;for(const t of e)this._addBlankNodeQuadInfo({quad:t,component:t.subject}),this._addBlankNodeQuadInfo({quad:t,component:t.object}),this._addBlankNodeQuadInfo({quad:t,component:t.graph});const t=new Map,r=[...this.blankNodeInfo.keys()];for(const e of r)this._hashAndTrackBlankNode({id:e,hashToBlankNodes:t});const i=[...t.keys()].sort(),o=[];for(const e of i){const r=t.get(e);if(r.length>1){o.push(r);continue}const n=r[0];this.canonicalIssuer.getId(n)}for(const e of o){const t=[];for(const r of e){if(this.canonicalIssuer.hasId(r))continue;const e=new n("_:b");e.getId(r);const i=this.hashNDegreeQuads(r,e);t.push(i)}t.sort(s);for(const e of t){const t=e.issuer.getOldIds();for(const e of t)this.canonicalIssuer.getId(e)}}const u=[];for(const e of this.quads){const t=a.serializeQuadComponents(this._componentWithCanonicalId({component:e.subject}),e.predicate,this._componentWithCanonicalId({component:e.object}),this._componentWithCanonicalId({component:e.graph}));u.push(t)}return u.sort(),u.join("")}hashFirstDegreeQuads(e){const t=[],r=this.blankNodeInfo.get(e),n=r.quads;for(const r of n){const n={subject:null,predicate:r.predicate,object:null,graph:null};n.subject=this.modifyFirstDegreeComponent(e,r.subject,"subject"),n.object=this.modifyFirstDegreeComponent(e,r.object,"object"),n.graph=this.modifyFirstDegreeComponent(e,r.graph,"graph"),t.push(a.serializeQuad(n))}t.sort();const i=this.createMessageDigest();for(const e of t)i.update(e);return r.hash=i.digest(),r.hash}hashRelatedBlankNode(e,t,r,n){let i;i=this.canonicalIssuer.hasId(e)?this.canonicalIssuer.getId(e):r.hasId(e)?r.getId(e):this.blankNodeInfo.get(e).hash;const o=this.createMessageDigest();return o.update(n),"g"!==n&&o.update(this.getRelatedPredicate(t)),o.update(i),o.digest()}hashNDegreeQuads(e,t){const r=this.deepIterations.get(e)||0;if(r>this.maxDeepIterations)throw new Error(`Maximum deep iterations (${this.maxDeepIterations}) exceeded.`);this.deepIterations.set(e,r+1);const n=this.createMessageDigest(),i=this.createHashToRelated(e,t),a=[...i.keys()].sort();for(const e of a){n.update(e);let r,a="";const s=new o(i.get(e));for(;s.hasNext();){const e=s.next();let n=t.clone(),i="";const o=[];let u=!1;for(const t of e)if(this.canonicalIssuer.hasId(t)?i+=this.canonicalIssuer.getId(t):(n.hasId(t)||o.push(t),i+=n.getId(t)),0!==a.length&&i>a){u=!0;break}if(!u){for(const e of o){const t=this.hashNDegreeQuads(e,n);if(i+=n.getId(e),i+=`<${t.hash}>`,n=t.issuer,0!==a.length&&i>a){u=!0;break}}u||(0===a.length||i<a)&&(a=i,r=n)}}n.update(a),t=r}return{hash:n.digest(),issuer:t}}modifyFirstDegreeComponent(e,t){return"BlankNode"!==t.termType?t:{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return`<${e.predicate.value}>`}createHashToRelated(e,t){const r=new Map,n=this.blankNodeInfo.get(e).quads;for(const i of n)this._addRelatedBlankNodeHash({quad:i,component:i.subject,position:"s",id:e,issuer:t,hashToRelated:r}),this._addRelatedBlankNodeHash({quad:i,component:i.object,position:"o",id:e,issuer:t,hashToRelated:r}),this._addRelatedBlankNodeHash({quad:i,component:i.graph,position:"g",id:e,issuer:t,hashToRelated:r});return r}_hashAndTrackBlankNode({id:e,hashToBlankNodes:t}){const r=this.hashFirstDegreeQuads(e),n=t.get(r);n?n.push(e):t.set(r,[e])}_addBlankNodeQuadInfo({quad:e,component:t}){if("BlankNode"!==t.termType)return;const r=t.value,n=this.blankNodeInfo.get(r);n?n.quads.add(e):this.blankNodeInfo.set(r,{quads:new Set([e]),hash:null})}_addRelatedBlankNodeHash({quad:e,component:t,position:r,id:n,issuer:i,hashToRelated:o}){if("BlankNode"!==t.termType||t.value===n)return;const a=t.value,s=this.hashRelatedBlankNode(a,e,i,r),u=o.get(s);u?u.push(a):o.set(s,[a])}_componentWithCanonicalId({component:e}){return"BlankNode"!==e.termType||e.value.startsWith(this.canonicalIssuer.prefix)?e:{termType:"BlankNode",value:this.canonicalIssuer.getId(e.value)}}}},function(e,t,r){e.exports=class{constructor(){this._requests={}}wrapLoader(e){const t=this;return t._loader=e,function(){return t.add.apply(t,arguments)}}async add(e){let t=this._requests[e];if(t)return Promise.resolve(t);t=this._requests[e]=this._loader(e);try{return await t}finally{delete this._requests[e]}}}},function(e,t,r){const n=r(34),i=Symbol("max"),o=Symbol("length"),a=Symbol("lengthCalculator"),s=Symbol("allowStale"),u=Symbol("maxAge"),c=Symbol("dispose"),l=Symbol("noDisposeOnSet"),f=Symbol("lruList"),h=Symbol("cache"),d=Symbol("updateAgeOnGet"),p=()=>1,v=(e,t,r)=>{const n=e[h].get(t);if(n){const t=n.value;if(g(e,t)){if(m(e,n),!e[s])return}else r&&(e[d]&&(n.value.now=Date.now()),e[f].unshiftNode(n));return t.value}},g=(e,t)=>{if(!t||!t.maxAge&&!e[u])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[u]&&r>e[u]},y=e=>{if(e[o]>e[i])for(let t=e[f].tail;e[o]>e[i]&&null!==t;){const r=t.prev;m(e,t),t=r}},m=(e,t)=>{if(t){const r=t.value;e[c]&&e[c](r.key,r.value),e[o]-=r.length,e[h].delete(r.key),e[f].removeNode(t)}};class b{constructor(e,t,r,n,i){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=i||0}}const x=(e,t,r,n)=>{let i=r.value;g(e,i)&&(m(e,r),e[s]||(i=void 0)),i&&t.call(n,i.value,i.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[i]=e.max||1/0;const t=e.length||p;if(this[a]="function"!=typeof t?p:t,this[s]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[u]=e.maxAge||0,this[c]=e.dispose,this[l]=e.noDisposeOnSet||!1,this[d]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||1/0,y(this)}get max(){return this[i]}set allowStale(e){this[s]=!!e}get allowStale(){return this[s]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[u]=e,y(this)}get maxAge(){return this[u]}set lengthCalculator(e){"function"!=typeof e&&(e=p),e!==this[a]&&(this[a]=e,this[o]=0,this[f].forEach((e=>{e.length=this[a](e.value,e.key),this[o]+=e.length}))),y(this)}get lengthCalculator(){return this[a]}get length(){return this[o]}get itemCount(){return this[f].length}rforEach(e,t){t=t||this;for(let r=this[f].tail;null!==r;){const n=r.prev;x(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[f].head;null!==r;){const n=r.next;x(this,e,r,t),r=n}}keys(){return this[f].toArray().map((e=>e.key))}values(){return this[f].toArray().map((e=>e.value))}reset(){this[c]&&this[f]&&this[f].length&&this[f].forEach((e=>this[c](e.key,e.value))),this[h]=new Map,this[f]=new n,this[o]=0}dump(){return this[f].map((e=>!g(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[f]}set(e,t,r){if((r=r||this[u])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const n=r?Date.now():0,s=this[a](t,e);if(this[h].has(e)){if(s>this[i])return m(this,this[h].get(e)),!1;const a=this[h].get(e).value;return this[c]&&(this[l]||this[c](e,a.value)),a.now=n,a.maxAge=r,a.value=t,this[o]+=s-a.length,a.length=s,this.get(e),y(this),!0}const d=new b(e,t,s,n,r);return d.length>this[i]?(this[c]&&this[c](e,t),!1):(this[o]+=d.length,this[f].unshift(d),this[h].set(e,this[f].head),y(this),!0)}has(e){if(!this[h].has(e))return!1;const t=this[h].get(e).value;return!g(this,t)}get(e){return v(this,e,!0)}peek(e){return v(this,e,!1)}pop(){const e=this[f].tail;return e?(m(this,e),e.value):null}del(e){m(this,this[h].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r],i=n.e||0;if(0===i)this.set(n.k,n.v);else{const e=i-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[h].forEach(((e,t)=>v(this,t,!1)))}}},function(e,t,r){(function(e){r.d(t,"a",(function(){return h}));var n=r(0),i=r(22),o=r.n(i);const{xsd:a}=n.a,s=/\\u([a-fA-F0-9]{4})|\\U([a-fA-F0-9]{8})|\\([^])/g,u={"\\":"\\","'":"'",'"':'"',n:"\n",r:"\r",t:"\t",f:"\f",b:"\b",_:"_","~":"~",".":".","-":"-","!":"!",$:"$","&":"&","(":"(",")":")","*":"*","+":"+",",":",",";":";","=":"=","/":"/","?":"?","#":"#","@":"@","%":"%"},c=/[\x00-\x20<>\\"\{\}\|\^\`]/,l={_iri:!0,_unescapedIri:!0,_simpleQuotedString:!0,_langcode:!0,_blank:!0,_newline:!0,_comment:!0,_whitespace:!0,_endOfFile:!0},f=/$0^/;class h{constructor(e){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]*)?$/,e=e||{},this._lineMode=!!e.lineMode){this._n3Mode=!1;for(const e in this)!(e in l)&&this[e]instanceof RegExp&&(this[e]=f)}else this._n3Mode=!1!==e.n3;this._comments=!!e.comments,this._literalClosingPos=0}_tokenizeToEnd(e,t){let r=this._input;const n=this._comments;for(;;){let o,s;for(;o=this._newline.exec(r);)n&&(s=this._comment.exec(o[0]))&&e(null,{line:this._line,type:"comment",value:s[1],prefix:""}),r=r.substr(o[0].length,r.length),this._line++;if(!o&&(o=this._whitespace.exec(r))&&(r=r.substr(o[0].length,r.length)),this._endOfFile.test(r))return t&&(n&&(s=this._comment.exec(r))&&e(null,{line:this._line,type:"comment",value:s[1],prefix:""}),e(r=null,{line:this._line,type:"eof",value:"",prefix:""})),this._input=r;const u=this._line,l=r[0];let f="",h="",d="",p=null,v=0,g=!1;switch(l){case"^":if(r.length<3)break;if("^"!==r[1]){this._n3Mode&&(v=1,f="^");break}if(this._previousMarker="^^",r=r.substr(2),"<"!==r[0]){g=!0;break}case"<":if(p=this._unescapedIri.exec(r))f="IRI",h=p[1];else if(p=this._iri.exec(r)){if(h=this._unescape(p[1]),null===h||c.test(h))return i(this);f="IRI"}else r.length>1&&"<"===r[1]?(f="<<",v=2):this._n3Mode&&r.length>1&&"="===r[1]&&(f="inverse",v=2,h=">");break;case">":r.length>1&&">"===r[1]&&(f=">>",v=2);break;case"_":((p=this._blank.exec(r))||t&&(p=this._blank.exec(r+" ")))&&(f="blank",d="_",h=p[1]);break;case'"':if(p=this._simpleQuotedString.exec(r))h=p[1];else if(({value:h,matchLength:v}=this._parseLiteral(r)),null===h)return i(this);null===p&&0===v||(f="literal",this._literalClosingPos=0);break;case"'":if(!this._lineMode){if(p=this._simpleApostropheString.exec(r))h=p[1];else if(({value:h,matchLength:v}=this._parseLiteral(r)),null===h)return i(this);null===p&&0===v||(f="literal",this._literalClosingPos=0)}break;case"?":this._n3Mode&&(p=this._variable.exec(r))&&(f="var",h=p[0]);break;case"@":"literal"===this._previousMarker&&(p=this._langcode.exec(r))?(f="langcode",h=p[1]):(p=this._keyword.exec(r))&&(f=p[0]);break;case".":if(1===r.length?t:r[1]<"0"||r[1]>"9"){f=".",v=1;break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":case"-":(p=this._number.exec(r)||t&&(p=this._number.exec(r+" ")))&&(f="literal",h=p[0],d="string"==typeof p[1]?a.double:"string"==typeof p[2]?a.decimal:a.integer);break;case"B":case"b":case"p":case"P":case"G":case"g":(p=this._sparqlKeyword.exec(r))?f=p[0].toUpperCase():g=!0;break;case"f":case"t":(p=this._boolean.exec(r))?(f="literal",h=p[0],d=a.boolean):g=!0;break;case"a":(p=this._shortPredicates.exec(r))?(f="abbreviation",h="a"):g=!0;break;case"=":this._n3Mode&&r.length>1&&(f="abbreviation",">"!==r[1]?(v=1,h="="):(v=2,h=">"));break;case"!":if(!this._n3Mode)break;case",":case";":case"[":case"]":case"(":case")":case"{":case"}":this._lineMode||(v=1,f=l);break;default:g=!0}if(g&&("@prefix"!==this._previousMarker&&"PREFIX"!==this._previousMarker||!(p=this._prefix.exec(r))?((p=this._prefixed.exec(r))||t&&(p=this._prefixed.exec(r+" ")))&&(f="prefixed",d=p[1]||"",h=this._unescape(p[2])):(f="prefix",h=p[1]||"")),"^^"===this._previousMarker)switch(f){case"prefixed":f="type";break;case"IRI":f="typeIRI";break;default:f=""}if(!f)return t||!/^'''|^"""/.test(r)&&/\n|\r/.test(r)?i(this):this._input=r;const y={line:u,type:f,value:h,prefix:d};e(null,y),this.previousToken=y,this._previousMarker=f,r=r.substr(v||p[0].length,r.length)}function i(t){e(t._syntaxError(/^\S*/.exec(r)[0]))}}_unescape(e){let t=!1;const r=e.replace(s,((e,r,n,i)=>{if("string"==typeof r)return String.fromCharCode(Number.parseInt(r,16));if("string"==typeof n){let e=Number.parseInt(n,16);return e<=65535?String.fromCharCode(Number.parseInt(n,16)):String.fromCharCode(55296+((e-=65536)>>10),56320+(1023&e))}return i in u?u[i]:(t=!0,"")}));return t?null:r}_parseLiteral(e){if(e.length>=3){const t=e.match(/^(?:"""|"|'''|'|)/)[0],r=t.length;let n=Math.max(this._literalClosingPos,r);for(;(n=e.indexOf(t,n))>0;){let t=0;for(;"\\"===e[n-t-1];)t++;if(t%2==0){const t=e.substring(r,n),i=t.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(t),matchLength:o}}n++}this._literalClosingPos=e.length-r+1}return{value:"",matchLength:0}}_syntaxError(e){this._input=null;const t=new Error(`Unexpected "${e}" on line ${this._line}.`);return t.context={token:void 0,line:this._line,previousToken:this.previousToken},t}tokenize(t,r){if(this._line=1,"string"==typeof t){if(this._input=t,"function"!=typeof r){const e=[];let t;if(this._tokenizeToEnd(((r,n)=>r?t=r:e.push(n)),!0),t)throw t;return e}o()((()=>this._tokenizeToEnd(r,!0)))}else this._input="",this._pendingBuffer=null,"function"==typeof t.setEncoding&&t.setEncoding("utf8"),t.on("data",(t=>{null!==this._input&&0!==t.length&&(this._pendingBuffer&&(t=e.concat([this._pendingBuffer,t]),this._pendingBuffer=null),128&t[t.length-1]?this._pendingBuffer=t:(this._input+=t,this._tokenizeToEnd(r,!1)))})),t.on("end",(()=>{null!==this._input&&this._tokenizeToEnd(r,!0)})),t.on("error",r)}}}).call(this,r(45).Buffer)},function(e,t,r){(function(t){/*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
60
+ let r;e.exports="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:t):e=>(r||(r=Promise.resolve())).then(e).catch((e=>setTimeout((()=>{throw e}),0)))}).call(this,r(8))},,function(e,t,r){const n=r(15),i=r(27),o=r(18),a=r(28);let s;try{s=r(29)}catch(e){}t.NQuads=r(13),t.IdentifierIssuer=r(12),t._rdfCanonizeNative=function(e){return e&&(s=e),s},t.canonize=async function(e,r){if(Array.isArray(e)||(e=t.NQuads.legacyDatasetToQuads(e)),r.useNative){if(!s)throw new Error("rdf-canonize-native not available");if(r.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "useNative".');return new Promise(((t,n)=>s.canonize(e,r,((e,r)=>e?n(e):t(r)))))}if("URDNA2015"===r.algorithm)return new n(r).main(e);if("URGNA2012"===r.algorithm){if(r.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "URGNA2012".');return new i(r).main(e)}if(!("algorithm"in r))throw new Error("No RDF Dataset Canonicalization algorithm specified.");throw new Error("Invalid RDF Dataset Canonicalization algorithm: "+r.algorithm)},t._canonizeSync=function(e,r){if(Array.isArray(e)||(e=t.NQuads.legacyDatasetToQuads(e)),r.useNative){if(!s)throw new Error("rdf-canonize-native not available");if(r.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "useNative".');return s.canonizeSync(e,r)}if("URDNA2015"===r.algorithm)return new o(r).main(e);if("URGNA2012"===r.algorithm){if(r.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "URGNA2012".');return new a(r).main(e)}if(!("algorithm"in r))throw new Error("No RDF Dataset Canonicalization algorithm specified.");throw new Error("Invalid RDF Dataset Canonicalization algorithm: "+r.algorithm)}},function(e,t,r){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r(16),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(8))},function(e,t){var r,n,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var u,c=[],l=!1,f=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&d())}function d(){if(!l){var e=s(h);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function v(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new p(e,t)),1!==c.length||l||s(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,r){
61
+ /*!
62
+ * Copyright (c) 2016-2022 Digital Bazaar, Inc. All rights reserved.
63
+ */
64
+ const n=r(9),i=r(15);e.exports=class extends i{constructor(){super(),this.name="URGNA2012",this.createMessageDigest=()=>new n("sha1")}modifyFirstDegreeComponent(e,t,r){return"BlankNode"!==t.termType?t:"graph"===r?{termType:"BlankNode",value:"_:g"}:{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return e.predicate.value}async createHashToRelated(e,t){const r=new Map,n=this.blankNodeInfo.get(e).quads;let i=0;for(const o of n){let n,a;if("BlankNode"===o.subject.termType&&o.subject.value!==e)a=o.subject.value,n="p";else{if("BlankNode"!==o.object.termType||o.object.value===e)continue;a=o.object.value,n="r"}++i%100==0&&await this._yield();const s=await this.hashRelatedBlankNode(a,o,t,n),u=r.get(s);u?u.push(a):r.set(s,[a])}return r}}},function(e,t,r){
65
+ /*!
66
+ * Copyright (c) 2016-2021 Digital Bazaar, Inc. All rights reserved.
67
+ */
68
+ const n=r(9),i=r(18);e.exports=class extends i{constructor(){super(),this.name="URGNA2012",this.createMessageDigest=()=>new n("sha1")}modifyFirstDegreeComponent(e,t,r){return"BlankNode"!==t.termType?t:"graph"===r?{termType:"BlankNode",value:"_:g"}:{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return e.predicate.value}createHashToRelated(e,t){const r=new Map,n=this.blankNodeInfo.get(e).quads;for(const i of n){let n,o;if("BlankNode"===i.subject.termType&&i.subject.value!==e)o=i.subject.value,n="p";else{if("BlankNode"!==i.object.termType||i.object.value===e)continue;o=i.object.value,n="r"}const a=this.hashRelatedBlankNode(o,i,t,n),s=r.get(a);s?s.push(o):r.set(a,[o])}return r}}},function(e,t){},function(e,t,r){const n=r(31),i={};e.exports=i,i.setupDocumentLoaders=function(e){"undefined"!=typeof XMLHttpRequest&&(e.documentLoaders.xhr=n,e.useDocumentLoader("xhr"))},i.setupGlobals=function(e){void 0===globalThis.JsonLdProcessor&&Object.defineProperty(globalThis,"JsonLdProcessor",{writable:!0,enumerable:!1,configurable:!0,value:e.JsonLdProcessor})}},function(e,t,r){const{parseLinkHeader:n,buildHeaders:i}=r(2),{LINK_HEADER_CONTEXT:o}=r(14),a=r(3),s=r(19),{prependBase:u}=r(5),c=/(^|(\r\n))link:/i;e.exports=({secure:e,headers:t={},xhr:r}={headers:{}})=>(t=i(t),(new s).wrapLoader((async function i(s){if(0!==s.indexOf("http:")&&0!==s.indexOf("https:"))throw new a('URL could not be dereferenced; only "http" and "https" URLs are supported.',"jsonld.InvalidUrl",{code:"loading document failed",url:s});if(e&&0!==s.indexOf("https"))throw new a('URL could not be dereferenced; secure mode is enabled and the URL\'s scheme is not "https".',"jsonld.InvalidUrl",{code:"loading document failed",url:s});let l;try{l=await function(e,t,r){const n=new(e=e||XMLHttpRequest);return new Promise(((e,i)=>{n.onload=()=>e(n),n.onerror=e=>i(e),n.open("GET",t,!0);for(const e in r)n.setRequestHeader(e,r[e]);n.send()}))}(r,s,t)}catch(e){throw new a("URL could not be dereferenced, an error occurred.","jsonld.LoadDocumentError",{code:"loading document failed",url:s,cause:e})}if(l.status>=400)throw new a("URL could not be dereferenced: "+l.statusText,"jsonld.LoadDocumentError",{code:"loading document failed",url:s,httpStatusCode:l.status});let f={contextUrl:null,documentUrl:s,document:l.response},h=null;const d=l.getResponseHeader("Content-Type");let p;if(c.test(l.getAllResponseHeaders())&&(p=l.getResponseHeader("Link")),p&&"application/ld+json"!==d){const e=n(p),t=e[o];if(Array.isArray(t))throw new a("URL could not be dereferenced, it has more than one associated HTTP Link Header.","jsonld.InvalidUrl",{code:"multiple context link headers",url:s});t&&(f.contextUrl=t.target),h=e.alternate,h&&"application/ld+json"==h.type&&!(d||"").match(/^application\/(\w*\+)?json$/)&&(f=await i(u(s,h.target)))}return f})))},function(e,t,r){const{isArray:n,isObject:i,isString:o}=r(1),{asArray:a}=r(2),{prependBase:s}=r(5),u=r(3),c=r(33);function l(e){throw new u("Invalid JSON-LD syntax; @context must be an object.","jsonld.SyntaxError",{code:"invalid local context",context:e})}e.exports=class{constructor({sharedCache:e}){this.perOpCache=new Map,this.sharedCache=e}async resolve({activeCtx:e,context:t,documentLoader:r,base:s,cycles:u=new Set}){t&&i(t)&&t["@context"]&&(t=t["@context"]),t=a(t);const f=[];for(const a of t){if(o(a)){let t=this._get(a);t||(t=await this._resolveRemoteContext({activeCtx:e,url:a,documentLoader:r,base:s,cycles:u})),n(t)?f.push(...t):f.push(t);continue}if(null===a){f.push(new c({document:null}));continue}i(a)||l(t);const h=JSON.stringify(a);let d=this._get(h);d||(d=new c({document:a}),this._cacheResolvedContext({key:h,resolved:d,tag:"static"})),f.push(d)}return f}_get(e){let t=this.perOpCache.get(e);if(!t){const r=this.sharedCache.get(e);r&&(t=r.get("static"),t&&this.perOpCache.set(e,t))}return t}_cacheResolvedContext({key:e,resolved:t,tag:r}){if(this.perOpCache.set(e,t),void 0!==r){let n=this.sharedCache.get(e);n||(n=new Map,this.sharedCache.set(e,n)),n.set(r,t)}return t}async _resolveRemoteContext({activeCtx:e,url:t,documentLoader:r,base:a,cycles:u}){t=s(a,t);const{context:c,remoteDoc:l}=await this._fetchContext({activeCtx:e,url:t,documentLoader:r,cycles:u});!function e({context:t,base:r}){if(!t)return;const a=t["@context"];if(o(a))t["@context"]=s(r,a);else if(n(a))for(let t=0;t<a.length;++t){const n=a[t];o(n)?a[t]=s(r,n):i(n)&&e({context:{"@context":n},base:r})}else if(i(a))for(const t in a)e({context:a[t],base:r})}({context:c,base:a=l.documentUrl||t});const f=await this.resolve({activeCtx:e,context:c,documentLoader:r,base:a,cycles:u});return this._cacheResolvedContext({key:t,resolved:f,tag:l.tag}),f}async _fetchContext({activeCtx:e,url:t,documentLoader:r,cycles:a}){if(a.size>10)throw new u("Maximum number of @context URLs exceeded.","jsonld.ContextUrlError",{code:"json-ld-1.0"===e.processingMode?"loading remote context failed":"context overflow",max:10});if(a.has(t))throw new u("Cyclical @context URLs detected.","jsonld.ContextUrlError",{code:"json-ld-1.0"===e.processingMode?"recursive context inclusion":"context overflow",url:t});let s,c;a.add(t);try{c=await r(t),s=c.document||null,o(s)&&(s=JSON.parse(s))}catch(e){throw new u("Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context.","jsonld.InvalidUrl",{code:"loading remote context failed",url:t,cause:e})}if(!i(s))throw new u("Dereferencing a URL did not result in a JSON object. The response was valid JSON, but it was not a JSON object.","jsonld.InvalidUrl",{code:"invalid remote context",url:t});return s="@context"in s?{"@context":s["@context"]}:{"@context":{}},c.contextUrl&&(n(s["@context"])||(s["@context"]=[s["@context"]]),s["@context"].push(c.contextUrl)),{context:s,remoteDoc:c}}}},function(e,t,r){const n=r(20);e.exports=class{constructor({document:e}){this.document=e,this.cache=new n({max:10})}getProcessed(e){return this.cache.get(e)}setProcessed(e,t){this.cache.set(e,t)}}},function(e,t,r){function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)t.push(arguments[r]);return t}function i(e,t,r){var n=t===e.head?new s(r,null,t,e):new s(r,t,t.next,e);return null===n.next&&(e.tail=n),null===n.prev&&(e.head=n),e.length++,n}function o(e,t){e.tail=new s(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function a(e,t){e.head=new s(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function s(e,t,r,n){if(!(this instanceof s))return new s(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}e.exports=n,n.Node=s,n.create=n,n.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},n.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},n.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},n.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},n.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)a(this,arguments[e]);return this.length},n.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},n.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},n.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;null!==r;n++)e.call(t,r.value,n,this),r=r.next},n.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;null!==r;n--)e.call(t,r.value,n,this),r=r.prev},n.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},n.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},n.prototype.map=function(e,t){t=t||this;for(var r=new n,i=this.head;null!==i;)r.push(e.call(t,i.value,this)),i=i.next;return r},n.prototype.mapReverse=function(e,t){t=t||this;for(var r=new n,i=this.tail;null!==i;)r.push(e.call(t,i.value,this)),i=i.prev;return r},n.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var i=0;null!==n;i++)r=e(r,n.value,i),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==n;i--)r=e(r,n.value,i),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,o=this.head;null!==o&&i<e;i++)o=o.next;for(;null!==o&&i<t;i++,o=o.next)r.push(o.value);return r},n.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev;for(;null!==o&&i>e;i--,o=o.prev)r.push(o.value);return r},n.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,o=this.head;null!==o&&n<e;n++)o=o.next;var a=[];for(n=0;o&&n<t;n++)a.push(o.value),o=this.removeNode(o);for(null===o&&(o=this.tail),o!==this.head&&o!==this.tail&&(o=o.prev),n=0;n<r.length;n++)o=i(this,o,r[n]);return a},n.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};try{r(35)(n)}catch(e){}},function(e,t,r){e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},function(e,t,r){e.exports=r(11).NQuads},function(e,t,r){const n=r(3),{isArray:i,isObject:o,isEmptyObject:a,isString:s,isUndefined:u}=r(1),{isList:c,isValue:l,isGraph:f,isSubject:h}=r(4),{expandIri:d,getContextValue:p,isKeyword:v,process:g,processingMode:y}=r(6),{isAbsolute:m}=r(5),{addValue:b,asArray:x,getValues:w,validateTypeValue:_}=r(2),I={};e.exports=I;const S=/^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/;function j({activeCtx:e,activeProperty:t,value:r,options:n}){if(null==r)return null;const i=d(e,t,{vocab:!0},n);if("@id"===i)return d(e,r,{base:!0},n);if("@type"===i)return d(e,r,{vocab:!0,base:!0},n);const o=p(e,t,"@type");if(("@id"===o||"@graph"===i)&&s(r))return{"@id":d(e,r,{base:!0},n)};if("@vocab"===o&&s(r))return{"@id":d(e,r,{vocab:!0,base:!0},n)};if(v(i))return r;const a={};if(o&&!["@id","@vocab","@none"].includes(o))a["@type"]=o;else if(s(r)){const r=p(e,t,"@language");null!==r&&(a["@language"]=r);const n=p(e,t,"@direction");null!==n&&(a["@direction"]=n)}return["boolean","number","string"].includes(typeof r)||(r=r.toString()),a["@value"]=r,a}function R(e,t,r,o){const a=[],u=Object.keys(t).sort();for(const c of u){const u=d(e,c,{vocab:!0},o);let l=t[c];i(l)||(l=[l]);for(const e of l){if(null===e)continue;if(!s(e))throw new n("Invalid JSON-LD syntax; language map values must be strings.","jsonld.SyntaxError",{code:"invalid language map value",languageMap:t});const i={"@value":e};"@none"!==u&&(i["@language"]=c.toLowerCase()),r&&(i["@direction"]=r),a.push(i)}}return a}async function k({activeCtx:e,options:t,activeProperty:r,value:o,expansionMap:a,asGraph:s,indexKey:c,propertyIndex:h}){const v=[],y=Object.keys(o).sort(),m="@type"===c;for(let x of y){if(m){const r=p(e,x,"@context");u(r)||(e=await g({activeCtx:e,localCtx:r,propagate:!1,options:t}))}let y,w=o[x];i(w)||(w=[w]),w=await I.expand({activeCtx:e,activeProperty:r,element:w,options:t,insideList:!1,insideIndex:!0,expansionMap:a}),y=h?"@none"===x?"@none":j({activeCtx:e,activeProperty:c,value:x,options:t}):d(e,x,{vocab:!0},t),"@id"===c?x=d(e,x,{base:!0},t):m&&(x=y);for(let e of w){if(s&&!f(e)&&(e={"@graph":[e]}),"@type"===c)"@none"===y||(e["@type"]?e["@type"]=[x].concat(e["@type"]):e["@type"]=[x]);else{if(l(e)&&!["@language","@type","@index"].includes(c))throw new n(`Invalid JSON-LD syntax; Attempt to add illegal key to value object: "${c}".`,"jsonld.SyntaxError",{code:"invalid value object",value:e});h?"@none"!==y&&b(e,h,y,{propertyIsArray:!0,prependValue:!0}):"@none"===y||c in e||(e[c]=x)}v.push(e)}}return v}I.expand=async({activeCtx:e,activeProperty:t=null,element:r,options:f={},insideList:E=!1,insideIndex:T=!1,typeScopedContext:O=null,expansionMap:A=(()=>{})})=>{if(null==r)return null;if("@default"===t&&(f=Object.assign({},f,{isFrame:!1})),!i(r)&&!o(r)){if(!E&&(null===t||"@graph"===d(e,t,{vocab:!0},f))){const n=await A({unmappedValue:r,activeCtx:e,activeProperty:t,options:f,insideList:E});return void 0===n?null:n}return j({activeCtx:e,activeProperty:t,value:r,options:f})}if(i(r)){let n=[];const o=p(e,t,"@container")||[];E=E||o.includes("@list");for(let o=0;o<r.length;++o){let a=await I.expand({activeCtx:e,activeProperty:t,element:r[o],options:f,expansionMap:A,insideIndex:T,typeScopedContext:O});E&&i(a)&&(a={"@list":a}),null===a&&(a=await A({unmappedValue:r[o],activeCtx:e,activeProperty:t,parent:r,index:o,options:f,expandedParent:n,insideList:E}),void 0===a)||(i(a)?n=n.concat(a):n.push(a))}return n}const N=d(e,t,{vocab:!0},f),P=p(e,t,"@context");O=O||(e.previousContext?e:null);let L=Object.keys(r).sort(),C=!T;if(C&&O&&L.length<=2&&!L.includes("@context"))for(const t of L){const r=d(O,t,{vocab:!0},f);if("@value"===r){C=!1,e=O;break}if("@id"===r&&1===L.length){C=!1;break}}C&&(e=e.revertToPreviousContext()),u(P)||(e=await g({activeCtx:e,localCtx:P,propagate:!0,overrideProtected:!0,options:f})),"@context"in r&&(e=await g({activeCtx:e,localCtx:r["@context"],options:f})),O=e;let D=null;for(const t of L)if("@type"===d(e,t,{vocab:!0},f)){D=D||t;const n=r[t],i=Array.isArray(n)?n.length>1?n.slice().sort():n:[n];for(const t of i){const r=p(O,t,"@context");u(r)||(e=await g({activeCtx:e,localCtx:r,options:f,propagate:!1}))}}let M={};await async function e({activeCtx:t,activeProperty:r,expandedActiveProperty:f,element:w,expandedParent:j,options:E={},insideList:T,typeKey:O,typeScopedContext:A,expansionMap:N}){const P=Object.keys(w).sort(),L=[];let C;const D=w[O]&&"@json"===d(t,i(w[O])?w[O][0]:w[O],{vocab:!0},E);for(const e of P){let O,P=w[e];if("@context"===e)continue;let M=d(t,e,{vocab:!0},E);if((null===M||!m(M)&&!v(M))&&(M=N({unmappedProperty:e,activeCtx:t,activeProperty:r,parent:w,options:E,insideList:T,value:P,expandedParent:j}),void 0===M))continue;if(v(M)){if("@reverse"===f)throw new n("Invalid JSON-LD syntax; a keyword cannot be used as a @reverse property.","jsonld.SyntaxError",{code:"invalid reverse property map",value:P});if(M in j&&"@included"!==M&&"@type"!==M)throw new n("Invalid JSON-LD syntax; colliding keywords detected.","jsonld.SyntaxError",{code:"colliding keywords",keyword:M})}if("@id"===M){if(!s(P)){if(!E.isFrame)throw new n('Invalid JSON-LD syntax; "@id" value must a string.',"jsonld.SyntaxError",{code:"invalid @id value",value:P});if(o(P)){if(!a(P))throw new n('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:P})}else{if(!i(P))throw new n('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:P});if(!P.every((e=>s(e))))throw new n('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:P})}}b(j,"@id",x(P).map((e=>s(e)?d(t,e,{base:!0},E):e)),{propertyIsArray:E.isFrame});continue}if("@type"===M){o(P)&&(P=Object.fromEntries(Object.entries(P).map((([e,t])=>[d(A,e,{vocab:!0}),x(t).map((e=>d(A,e,{base:!0,vocab:!0})))])))),_(P,E.isFrame),b(j,"@type",x(P).map((e=>s(e)?d(A,e,{base:!0,vocab:!0},E):e)),{propertyIsArray:E.isFrame});continue}if("@included"===M&&y(t,1.1)){const e=x(await I.expand({activeCtx:t,activeProperty:r,element:P,options:E,expansionMap:N}));if(!e.every((e=>h(e))))throw new n("Invalid JSON-LD syntax; values of @included must expand to node objects.","jsonld.SyntaxError",{code:"invalid @included value",value:P});b(j,"@included",e,{propertyIsArray:!0});continue}if("@graph"===M&&!o(P)&&!i(P))throw new n('Invalid JSON-LD syntax; "@graph" value must not be an object or an array.',"jsonld.SyntaxError",{code:"invalid @graph value",value:P});if("@value"===M){C=P,D&&y(t,1.1)?j["@value"]=P:b(j,"@value",P,{propertyIsArray:E.isFrame});continue}if("@language"===M){if(null===P)continue;if(!s(P)&&!E.isFrame)throw new n('Invalid JSON-LD syntax; "@language" value must be a string.',"jsonld.SyntaxError",{code:"invalid language-tagged string",value:P});P=x(P).map((e=>s(e)?e.toLowerCase():e));for(const e of P)s(e)&&!e.match(S)&&console.warn("@language must be valid BCP47: "+e);b(j,"@language",P,{propertyIsArray:E.isFrame});continue}if("@direction"===M){if(!s(P)&&!E.isFrame)throw new n('Invalid JSON-LD syntax; "@direction" value must be a string.',"jsonld.SyntaxError",{code:"invalid base direction",value:P});P=x(P);for(const e of P)if(s(e)&&"ltr"!==e&&"rtl"!==e)throw new n('Invalid JSON-LD syntax; "@direction" must be "ltr" or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",value:P});b(j,"@direction",P,{propertyIsArray:E.isFrame});continue}if("@index"===M){if(!s(P))throw new n('Invalid JSON-LD syntax; "@index" value must be a string.',"jsonld.SyntaxError",{code:"invalid @index value",value:P});b(j,"@index",P);continue}if("@reverse"===M){if(!o(P))throw new n('Invalid JSON-LD syntax; "@reverse" value must be an object.',"jsonld.SyntaxError",{code:"invalid @reverse value",value:P});if(O=await I.expand({activeCtx:t,activeProperty:"@reverse",element:P,options:E,expansionMap:N}),"@reverse"in O)for(const e in O["@reverse"])b(j,e,O["@reverse"][e],{propertyIsArray:!0});let e=j["@reverse"]||null;for(const t in O){if("@reverse"===t)continue;null===e&&(e=j["@reverse"]={}),b(e,t,[],{propertyIsArray:!0});const r=O[t];for(let i=0;i<r.length;++i){const o=r[i];if(l(o)||c(o))throw new n('Invalid JSON-LD syntax; "@reverse" value must not be a @value or an @list.',"jsonld.SyntaxError",{code:"invalid reverse property value",value:O});b(e,t,o,{propertyIsArray:!0})}}continue}if("@nest"===M){L.push(e);continue}let U=t;const B=p(t,e,"@context");u(B)||(U=await g({activeCtx:t,localCtx:B,propagate:!0,overrideProtected:!0,options:E}));const F=p(U,e,"@container")||[];if(F.includes("@language")&&o(P))O=R(U,P,p(U,e,"@direction"),E);else if(F.includes("@index")&&o(P)){const r=F.includes("@graph"),n=p(U,e,"@index")||"@index",i="@index"!==n&&d(t,n,{vocab:!0},E);O=await k({activeCtx:U,options:E,activeProperty:e,value:P,expansionMap:N,asGraph:r,indexKey:n,propertyIndex:i})}else if(F.includes("@id")&&o(P)){const t=F.includes("@graph");O=await k({activeCtx:U,options:E,activeProperty:e,value:P,expansionMap:N,asGraph:t,indexKey:"@id"})}else if(F.includes("@type")&&o(P))O=await k({activeCtx:U.revertToPreviousContext(),options:E,activeProperty:e,value:P,expansionMap:N,asGraph:!1,indexKey:"@type"});else{const n="@list"===M;if(n||"@set"===M){let e=r;n&&"@graph"===f&&(e=null),O=await I.expand({activeCtx:U,activeProperty:e,element:P,options:E,insideList:n,expansionMap:N})}else O="@json"===p(t,e,"@type")?{"@type":"@json","@value":P}:await I.expand({activeCtx:U,activeProperty:e,element:P,options:E,insideList:!1,expansionMap:N})}if(null!==O||"@value"===M||(O=N({unmappedValue:P,expandedProperty:M,activeCtx:U,activeProperty:r,parent:w,options:E,insideList:T,key:e,expandedParent:j}),void 0!==O))if("@list"!==M&&!c(O)&&F.includes("@list")&&(O={"@list":x(O)}),F.includes("@graph")&&!F.some((e=>"@id"===e||"@index"===e))&&(O=x(O).map((e=>({"@graph":x(e)})))),U.mappings.has(e)&&U.mappings.get(e).reverse){const e=j["@reverse"]=j["@reverse"]||{};O=x(O);for(let t=0;t<O.length;++t){const r=O[t];if(l(r)||c(r))throw new n('Invalid JSON-LD syntax; "@reverse" value must not be a @value or an @list.',"jsonld.SyntaxError",{code:"invalid reverse property value",value:O});b(e,M,r,{propertyIsArray:!0})}}else b(j,M,O,{propertyIsArray:!0})}if("@value"in j)if("@json"===j["@type"]&&y(t,1.1));else if((o(C)||i(C))&&!E.isFrame)throw new n('Invalid JSON-LD syntax; "@value" value must not be an object or an array.',"jsonld.SyntaxError",{code:"invalid value object value",value:C});for(const a of L){const s=i(w[a])?w[a]:[w[a]];for(const i of s){if(!o(i)||Object.keys(i).some((e=>"@value"===d(t,e,{vocab:!0},E))))throw new n("Invalid JSON-LD syntax; nested value must be a node object.","jsonld.SyntaxError",{code:"invalid @nest value",value:i});await e({activeCtx:t,activeProperty:r,expandedActiveProperty:f,element:i,expandedParent:j,options:E,insideList:T,typeScopedContext:A,typeKey:O,expansionMap:N})}}}({activeCtx:e,activeProperty:t,expandedActiveProperty:N,element:r,expandedParent:M,options:f,insideList:E,typeKey:D,typeScopedContext:O,expansionMap:A}),L=Object.keys(M);let U=L.length;if("@value"in M){if("@type"in M&&("@language"in M||"@direction"in M))throw new n('Invalid JSON-LD syntax; an element containing "@value" may not contain both "@type" and either "@language" or "@direction".',"jsonld.SyntaxError",{code:"invalid value object",element:M});let i=U-1;if("@type"in M&&(i-=1),"@index"in M&&(i-=1),"@language"in M&&(i-=1),"@direction"in M&&(i-=1),0!==i)throw new n('Invalid JSON-LD syntax; an element containing "@value" may only have an "@index" property and either "@type" or either or both "@language" or "@direction".',"jsonld.SyntaxError",{code:"invalid value object",element:M});const o=null===M["@value"]?[]:x(M["@value"]),u=w(M,"@type");if(y(e,1.1)&&u.includes("@json")&&1===u.length);else if(0===o.length){const n=await A({unmappedValue:M,activeCtx:e,activeProperty:t,element:r,options:f,insideList:E});M=void 0!==n?n:null}else{if(!o.every((e=>s(e)||a(e)))&&"@language"in M)throw new n("Invalid JSON-LD syntax; only strings may be language-tagged.","jsonld.SyntaxError",{code:"invalid language-tagged value",element:M});if(!u.every((e=>m(e)&&!(s(e)&&0===e.indexOf("_:"))||a(e))))throw new n('Invalid JSON-LD syntax; an element containing "@value" and "@type" must have an absolute IRI for the value of "@type".',"jsonld.SyntaxError",{code:"invalid typed value",element:M})}}else if("@type"in M&&!i(M["@type"]))M["@type"]=[M["@type"]];else if("@set"in M||"@list"in M){if(U>1&&(2!==U||!("@index"in M)))throw new n('Invalid JSON-LD syntax; if an element has the property "@set" or "@list", then it can have at most one other property that is "@index".',"jsonld.SyntaxError",{code:"invalid set or list object",element:M});"@set"in M&&(M=M["@set"],L=Object.keys(M),U=L.length)}else if(1===U&&"@language"in M){const n=await A(M,{unmappedValue:M,activeCtx:e,activeProperty:t,element:r,options:f,insideList:E});M=void 0!==n?n:null}if(o(M)&&!f.keepFreeFloatingNodes&&!E&&(null===t||"@graph"===N)&&(0===U||"@value"in M||"@list"in M||1===U&&"@id"in M)){const n=await A({unmappedValue:M,activeCtx:e,activeProperty:t,element:r,options:f,insideList:E});M=void 0!==n?n:null}return M}},function(e,t,r){const{isSubjectReference:n}=r(4),{createMergedNodeMap:i}=r(10),o={};e.exports=o,o.flatten=e=>{const t=i(e),r=[],o=Object.keys(t).sort();for(let e=0;e<o.length;++e){const i=t[o[e]];n(i)||r.push(i)}return r}},function(e,t,r){const n=r(3),i=r(4),o=r(1),a=r(2),{RDF_LIST:s,RDF_FIRST:u,RDF_REST:c,RDF_NIL:l,RDF_TYPE:f,RDF_JSON_LITERAL:h,XSD_BOOLEAN:d,XSD_DOUBLE:p,XSD_INTEGER:v,XSD_STRING:g}=r(14),y=/^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/,m={};function b(e,t,r){if(e.termType.endsWith("Node"))return{"@id":e.value};const i={"@value":e.value};if(e.language)i["@language"]=e.language;else{let a=e.datatype.value;if(a||(a=g),a===h){a="@json";try{i["@value"]=JSON.parse(i["@value"])}catch(e){throw new n("JSON literal could not be parsed.","jsonld.InvalidJsonLiteral",{code:"invalid JSON literal",value:i["@value"],cause:e})}}if(t){if(a===d)"true"===i["@value"]?i["@value"]=!0:"false"===i["@value"]&&(i["@value"]=!1);else if(o.isNumeric(i["@value"]))if(a===v){const e=parseInt(i["@value"],10);e.toFixed(0)===i["@value"]&&(i["@value"]=e)}else a===p&&(i["@value"]=parseFloat(i["@value"]));[d,v,p,g].includes(a)||(i["@type"]=a)}else if("i18n-datatype"===r&&a.startsWith("https://www.w3.org/ns/i18n#")){const[,e,t]=a.split(/[#_]/);e.length>0&&(i["@language"]=e,e.match(y)||console.warn("@language must be valid BCP47: "+e)),i["@direction"]=t}else a!==g&&(i["@type"]=a)}return i}e.exports=m,m.fromRDF=async(e,{useRdfType:t=!1,useNativeTypes:r=!1,rdfDirection:n=null})=>{const h={},d={"@default":h},p={};for(const i of e){const e="DefaultGraph"===i.graph.termType?"@default":i.graph.value;e in d||(d[e]={}),"@default"===e||e in h||(h[e]={"@id":e});const o=d[e],s=i.subject.value,u=i.predicate.value,c=i.object;s in o||(o[s]={"@id":s});const v=o[s],g=c.termType.endsWith("Node");if(g&&!(c.value in o)&&(o[c.value]={"@id":c.value}),u===f&&!t&&g){a.addValue(v,"@type",c.value,{propertyIsArray:!0});continue}const y=b(c,r,n);if(a.addValue(v,u,y,{propertyIsArray:!0}),g)if(c.value===l){const e=o[c.value];"usages"in e||(e.usages=[]),e.usages.push({node:v,property:u,value:y})}else c.value in p?p[c.value]=!1:p[c.value]={node:v,property:u,value:y}}for(const e in d){const t=d[e];if(!(l in t))continue;const r=t[l];if(r.usages){for(let e of r.usages){let r=e.node,n=e.property,a=e.value;const l=[],f=[];let h=Object.keys(r).length;for(;n===c&&o.isObject(p[r["@id"]])&&o.isArray(r[u])&&1===r[u].length&&o.isArray(r[c])&&1===r[c].length&&(3===h||4===h&&o.isArray(r["@type"])&&1===r["@type"].length&&r["@type"][0]===s)&&(l.push(r[u][0]),f.push(r["@id"]),e=p[r["@id"]],r=e.node,n=e.property,a=e.value,h=Object.keys(r).length,i.isBlankNode(r)););delete a["@id"],a["@list"]=l.reverse();for(const e of f)delete t[e]}delete r.usages}}const v=[],g=Object.keys(h).sort();for(const e of g){const t=h[e];if(e in d){const r=t["@graph"]=[],n=d[e],o=Object.keys(n).sort();for(const e of o){const t=n[e];i.isSubjectReference(t)||r.push(t)}}i.isSubjectReference(t)||v.push(t)}return v}},function(e,t,r){const{createNodeMap:n}=r(10),{isKeyword:i}=r(6),o=r(4),a=r(41),s=r(1),u=r(2),{RDF_FIRST:c,RDF_REST:l,RDF_NIL:f,RDF_TYPE:h,RDF_JSON_LITERAL:d,RDF_LANGSTRING:p,XSD_BOOLEAN:v,XSD_DOUBLE:g,XSD_INTEGER:y,XSD_STRING:m}=r(14),{isAbsolute:b}=r(5),x={};function w(e,t,r,n,o){const a=Object.keys(t).sort();for(const s of a){const a=t[s],u=Object.keys(a).sort();for(let t of u){const u=a[t];if("@type"===t)t=h;else if(i(t))continue;for(const i of u){const a={termType:s.startsWith("_:")?"BlankNode":"NamedNode",value:s};if(!b(s))continue;const u={termType:t.startsWith("_:")?"BlankNode":"NamedNode",value:t};if(!b(t))continue;if("BlankNode"===u.termType&&!o.produceGeneralizedRdf)continue;const c=_(i,n,e,r,o.rdfDirection);c&&e.push({subject:a,predicate:u,object:c,graph:r})}}}}function _(e,t,r,n,i){const u={};if(o.isValue(e)){u.termType="Literal",u.value=void 0,u.datatype={termType:"NamedNode"};let t=e["@value"];const r=e["@type"]||null;if("@json"===r)u.value=a(t),u.datatype.value=d;else if(s.isBoolean(t))u.value=t.toString(),u.datatype.value=r||v;else if(s.isDouble(t)||r===g)s.isDouble(t)||(t=parseFloat(t)),u.value=t.toExponential(15).replace(/(\d)0*e\+?/,"$1E"),u.datatype.value=r||g;else if(s.isNumber(t))u.value=t.toFixed(0),u.datatype.value=r||y;else if("i18n-datatype"===i&&"@direction"in e){const r="https://www.w3.org/ns/i18n#"+(e["@language"]||"")+"_"+e["@direction"];u.datatype.value=r,u.value=t}else"@language"in e?(u.value=t,u.datatype.value=r||p,u.language=e["@language"]):(u.value=t,u.datatype.value=r||m)}else if(o.isList(e)){const o=function(e,t,r,n,i){const o={termType:"NamedNode",value:c},a={termType:"NamedNode",value:l},s={termType:"NamedNode",value:f},u=e.pop(),h=u?{termType:"BlankNode",value:t.getId()}:s;let d=h;for(const s of e){const e=_(s,t,r,n,i),u={termType:"BlankNode",value:t.getId()};r.push({subject:d,predicate:o,object:e,graph:n}),r.push({subject:d,predicate:a,object:u,graph:n}),d=u}if(u){const e=_(u,t,r,n,i);r.push({subject:d,predicate:o,object:e,graph:n}),r.push({subject:d,predicate:a,object:s,graph:n})}return h}(e["@list"],t,r,n,i);u.termType=o.termType,u.value=o.value}else{const t=s.isObject(e)?e["@id"]:e;u.termType=t.startsWith("_:")?"BlankNode":"NamedNode",u.value=t}return"NamedNode"!==u.termType||b(u.value)?u:null}e.exports=x,x.toRDF=(e,t)=>{const r=new u.IdentifierIssuer("_:b"),i={"@default":{}};n(e,i,"@default",r);const o=[],a=Object.keys(i).sort();for(const e of a){let n;if("@default"===e)n={termType:"DefaultGraph",value:""};else{if(!b(e))continue;n=e.startsWith("_:")?{termType:"BlankNode"}:{termType:"NamedNode"},n.value=e}w(o,i[e],n,r,t)}return o}},function(e,t,r){e.exports=function e(t){return null===t||"object"!=typeof t||null!=t.toJSON?JSON.stringify(t):Array.isArray(t)?"["+t.reduce(((t,r,n)=>t+(0===n?"":",")+e(void 0===r||"symbol"==typeof r?null:r)),"")+"]":"{"+Object.keys(t).sort().reduce(((r,n,i)=>void 0===t[n]||"symbol"==typeof t[n]?r:r+(0===r.length?"":",")+e(n)+":"+e(t[n])),"")+"}"}},function(e,t,r){const{isKeyword:n}=r(6),i=r(4),o=r(1),a=r(2),s=r(5),u=r(3),{createNodeMap:c,mergeNodeMapGraphs:l}=r(10),f={};function h(e){const t={};for(const r in e)void 0!==e[r]&&(t["@"+r]=[e[r]]);return[t]}function d(e,t,r){for(let n=r.length-1;n>=0;--n){const i=r[n];if(i.graph===t&&i.subject["@id"]===e["@id"])return!0}return!1}function p(e,t,r){const n="@"+r;let i=n in e?e[n][0]:t[r];if("embed"===r)if(!0===i)i="@once";else if(!1===i)i="@never";else if("@always"!==i&&"@never"!==i&&"@link"!==i&&"@first"!==i&&"@last"!==i&&"@once"!==i)throw new u("Invalid JSON-LD syntax; invalid value of @embed.","jsonld.SyntaxError",{code:"invalid @embed value",frame:e});return i}function v(e){if(!o.isArray(e)||1!==e.length||!o.isObject(e[0]))throw new u("Invalid JSON-LD syntax; a JSON-LD frame must be a single object.","jsonld.SyntaxError",{frame:e});if("@id"in e[0])for(const t of a.asArray(e[0]["@id"]))if(!o.isObject(t)&&!s.isAbsolute(t)||o.isString(t)&&0===t.indexOf("_:"))throw new u("Invalid JSON-LD syntax; invalid @id in frame.","jsonld.SyntaxError",{code:"invalid frame",frame:e});if("@type"in e[0])for(const t of a.asArray(e[0]["@type"]))if(!o.isObject(t)&&!s.isAbsolute(t)||o.isString(t)&&0===t.indexOf("_:"))throw new u("Invalid JSON-LD syntax; invalid @type in frame.","jsonld.SyntaxError",{code:"invalid frame",frame:e})}function g(e,t,r,s){let u=!0,c=!1;for(const l in r){let f=!1;const h=a.getValues(t,l),d=0===a.getValues(r,l).length;if("@id"===l){if(o.isEmptyObject(r["@id"][0]||{})?f=!0:r["@id"].length>=0&&(f=r["@id"].includes(h[0])),!s.requireAll)return f}else if("@type"===l){if(u=!1,d){if(h.length>0)return!1;f=!0}else if(1===r["@type"].length&&o.isEmptyObject(r["@type"][0]))f=h.length>0;else for(const e of r["@type"])f=!(!o.isObject(e)||!("@default"in e))||f||h.some((t=>t===e));if(!s.requireAll)return f}else{if(n(l))continue;{const t=a.getValues(r,l)[0];let n=!1;if(t&&(v([t]),n="@default"in t),u=!1,0===h.length&&n)continue;if(h.length>0&&d)return!1;if(void 0===t){if(h.length>0)return!1;f=!0}else if(i.isList(t)){const r=t["@list"][0];if(i.isList(h[0])){const t=h[0]["@list"];i.isValue(r)?f=t.some((e=>x(r,e))):(i.isSubject(r)||i.isSubjectReference(r))&&(f=t.some((t=>b(e,r,t,s))))}}else f=i.isValue(t)?h.some((e=>x(t,e))):i.isSubjectReference(t)?h.some((r=>b(e,t,r,s))):!!o.isObject(t)&&h.length>0}}if(!f&&s.requireAll)return!1;c=c||f}return u||c}function y(e,t){const r=e.uniqueEmbeds[e.graph],n=r[t],i=n.parent,s=n.property,u={"@id":t};if(o.isArray(i)){for(let e=0;e<i.length;++e)if(a.compareValues(i[e],u)){i[e]=u;break}}else{const e=o.isArray(i[s]);a.removeValue(i,s,u,{propertyIsArray:e}),a.addValue(i,s,u,{propertyIsArray:e})}const c=e=>{const t=Object.keys(r);for(const n of t)n in r&&o.isObject(r[n].parent)&&r[n].parent["@id"]===e&&(delete r[n],c(n))};c(t)}
69
+ /**
70
+ * Removes the @preserve keywords from expanded result of framing.
71
+ *
72
+ * @param input the framed, framed output.
73
+ * @param options the framing options used.
74
+ *
75
+ * @return the resulting output.
76
+ */function m(e,t,r){o.isObject(e)?a.addValue(e,t,r,{propertyIsArray:!0}):e.push(r)}function b(e,t,r,n){if(!("@id"in r))return!1;const i=e.subjects[r["@id"]];return i&&g(e,i,t,n)}function x(e,t){const r=t["@value"],n=t["@type"],i=t["@language"],a=e["@value"]?o.isArray(e["@value"])?e["@value"]:[e["@value"]]:[],s=e["@type"]?o.isArray(e["@type"])?e["@type"]:[e["@type"]]:[],u=e["@language"]?o.isArray(e["@language"])?e["@language"]:[e["@language"]]:[];return 0===a.length&&0===s.length&&0===u.length||!(!a.includes(r)&&!o.isEmptyObject(a[0]))&&!!(!n&&0===s.length||s.includes(n)||n&&o.isEmptyObject(s[0]))&&!!(!i&&0===u.length||u.includes(i)||i&&o.isEmptyObject(u[0]))}e.exports=f,f.frameMergedOrDefault=(e,t,r)=>{const n={options:r,embedded:!1,graph:"@default",graphMap:{"@default":{}},subjectStack:[],link:{},bnodeMap:{}},s=new a.IdentifierIssuer("_:b");c(e,n.graphMap,"@default",s),r.merged&&(n.graphMap["@merged"]=l(n.graphMap),n.graph="@merged"),n.subjects=n.graphMap[n.graph];const u=[];return f.frame(n,Object.keys(n.subjects).sort(),t,u),r.pruneBlankNodeIdentifiers&&(r.bnodesToClear=Object.keys(n.bnodeMap).filter((e=>1===n.bnodeMap[e].length))),
77
+ // remove @preserve from results
78
+ r.link={},function e(t,r){if(o.isArray(t))return t.map((t=>e(t,r)));if(o.isObject(t)){
79
+ // remove @preserve
80
+ if("@preserve"in t)return t["@preserve"][0];if(i.isValue(t))return t;if(i.isList(t))return t["@list"]=e(t["@list"],r),t;if("@id"in t){const e=t["@id"];if(r.link.hasOwnProperty(e)){const n=r.link[e].indexOf(t);if(-1!==n)return r.link[e][n];r.link[e].push(t)}else r.link[e]=[t]}for(const n in t)"@id"===n&&r.bnodesToClear.includes(t[n])?delete t["@id"]:t[n]=e(t[n],r)}return t}(u,r)},f.frame=(e,t,r,s,c=null)=>{v(r),r=r[0];const l=e.options,b={embed:p(r,l,"embed"),explicit:p(r,l,"explicit"),requireAll:p(r,l,"requireAll")};e.link.hasOwnProperty(e.graph)||(e.link[e.graph]={});const w=e.link[e.graph],_=function(e,t,r,n){const i={};for(const o of t){const t=e.graphMap[e.graph][o];g(e,t,r,n)&&(i[o]=t)}return i}(e,t,r,b),I=Object.keys(_).sort();for(const v of I){const g=_[v];if(null===c?e.uniqueEmbeds={[e.graph]:{}}:e.uniqueEmbeds[e.graph]=e.uniqueEmbeds[e.graph]||{},"@link"===b.embed&&v in w){m(s,c,w[v]);continue}const I={"@id":v};if(0===v.indexOf("_:")&&a.addValue(e.bnodeMap,v,I,{propertyIsArray:!0}),w[v]=I,("@first"===b.embed||"@last"===b.embed)&&e.is11)throw new u("Invalid JSON-LD syntax; invalid value of @embed.","jsonld.SyntaxError",{code:"invalid @embed value",frame:r});if(e.embedded||!e.uniqueEmbeds[e.graph].hasOwnProperty(v))if(!e.embedded||"@never"!==b.embed&&!d(g,e.graph,e.subjectStack))if(!e.embedded||"@first"!=b.embed&&"@once"!=b.embed||!e.uniqueEmbeds[e.graph].hasOwnProperty(v)){if("@last"===b.embed&&v in e.uniqueEmbeds[e.graph]&&y(e,v),e.uniqueEmbeds[e.graph][v]={parent:s,property:c},e.subjectStack.push({subject:g,graph:e.graph}),v in e.graphMap){let t=!1,n=null;"@graph"in r?(n=r["@graph"][0],t=!("@merged"===v||"@default"===v),o.isObject(n)||(n={})):(t="@merged"!==e.graph,n={}),t&&f.frame({...e,graph:v,embedded:!1},Object.keys(e.graphMap[v]).sort(),[n],I,"@graph")}"@included"in r&&f.frame({...e,embedded:!1},t,r["@included"],I,"@included");for(const t of Object.keys(g).sort())if(n(t)){if(I[t]=a.clone(g[t]),"@type"===t)for(const t of g["@type"])0===t.indexOf("_:")&&a.addValue(e.bnodeMap,t,I,{propertyIsArray:!0})}else if(!b.explicit||t in r)for(const n of g[t]){const o=t in r?r[t]:h(b);if(i.isList(n)){const o=r[t]&&r[t][0]&&r[t][0]["@list"]?r[t][0]["@list"]:h(b),s={"@list":[]};m(I,t,s);const u=n["@list"];for(const t of u)i.isSubjectReference(t)?f.frame({...e,embedded:!0},[t["@id"]],o,s,"@list"):m(s,"@list",a.clone(t))}else i.isSubjectReference(n)?f.frame({...e,embedded:!0},[n["@id"]],o,I,t):x(o[0],n)&&m(I,t,a.clone(n))}for(const e of Object.keys(r).sort()){if("@type"===e){if(!o.isObject(r[e][0])||!("@default"in r[e][0]))continue}else if(n(e))continue;const t=r[e][0]||{};if(!p(t,l,"omitDefault")&&!(e in I)){let r="@null";"@default"in t&&(r=a.clone(t["@default"])),o.isArray(r)||(r=[r]),I[e]=[{"@preserve":r}]}}for(const t of Object.keys(r["@reverse"]||{}).sort()){const n=r["@reverse"][t];for(const r of Object.keys(e.subjects))a.getValues(e.subjects[r],t).some((e=>e["@id"]===v))&&(I["@reverse"]=I["@reverse"]||{},a.addValue(I["@reverse"],t,[],{propertyIsArray:!0}),f.frame({...e,embedded:!0},[r],n,I["@reverse"][t],c))}m(s,c,I),e.subjectStack.pop()}else m(s,c,I);else m(s,c,I)}},f.cleanupNull=(e,t)=>{if(o.isArray(e))return e.map((e=>f.cleanupNull(e,t))).filter((e=>e));if("@null"===e)return null;if(o.isObject(e)){if("@id"in e){const r=e["@id"];if(t.link.hasOwnProperty(r)){const n=t.link[r].indexOf(e);if(-1!==n)return t.link[r][n];t.link[r].push(e)}else t.link[r]=[e]}for(const r in e)e[r]=f.cleanupNull(e[r],t)}return e}},function(e,t,r){const n=r(3),{isArray:i,isObject:o,isString:a,isUndefined:s}=r(1),{isList:u,isValue:c,isGraph:l,isSimpleGraph:f,isSubjectReference:h}=r(4),{expandIri:d,getContextValue:p,isKeyword:v,process:g,processingMode:y}=r(6),{removeBase:m,prependBase:b}=r(5),{addValue:x,asArray:w,compareShortestLeast:_}=r(2),I={};function S(e,t,r){if("@nest"!==d(e,t,{vocab:!0},r))throw new n("JSON-LD compact error; nested property must have an @nest value resolving to @nest.","jsonld.SyntaxError",{code:"invalid @nest value"})}e.exports=I,I.compact=async({activeCtx:e,activeProperty:t=null,element:r,options:d={},compactionMap:m=(()=>{})})=>{if(i(r)){let n=[];for(let i=0;i<r.length;++i){let o=await I.compact({activeCtx:e,activeProperty:t,element:r[i],options:d,compactionMap:m});null===o&&(o=await m({unmappedValue:r[i],activeCtx:e,activeProperty:t,parent:r,index:i,options:d}),void 0===o)||n.push(o)}return d.compactArrays&&1===n.length&&0===(p(e,t,"@container")||[]).length&&(n=n[0]),n}const b=p(e,t,"@context");if(s(b)||(e=await g({activeCtx:e,localCtx:b,propagate:!0,overrideProtected:!0,options:d})),o(r)){if(d.link&&"@id"in r&&d.link.hasOwnProperty(r["@id"])){const e=d.link[r["@id"]];for(let t=0;t<e.length;++t)if(e[t].expanded===r)return e[t].compacted}if(c(r)||h(r)){const n=I.compactValue({activeCtx:e,activeProperty:t,value:r,options:d});return d.link&&h(r)&&(d.link.hasOwnProperty(r["@id"])||(d.link[r["@id"]]=[]),d.link[r["@id"]].push({expanded:r,compacted:n})),n}if(u(r)&&(p(e,t,"@container")||[]).includes("@list"))return I.compact({activeCtx:e,activeProperty:t,element:r["@list"],options:d,compactionMap:m});const b="@reverse"===t,_={},j=e;c(r)||h(r)||(e=e.revertToPreviousContext());const R=p(j,t,"@context");s(R)||(e=await g({activeCtx:e,localCtx:R,propagate:!0,overrideProtected:!0,options:d})),d.link&&"@id"in r&&(d.link.hasOwnProperty(r["@id"])||(d.link[r["@id"]]=[]),d.link[r["@id"]].push({expanded:r,compacted:_}));let k=r["@type"]||[];k.length>1&&(k=Array.from(k).sort());const E=e;for(const t of k){const r=I.compactIri({activeCtx:E,iri:t,relativeTo:{vocab:!0}}),n=p(j,r,"@context");s(n)||(e=await g({activeCtx:e,localCtx:n,options:d,propagate:!1}))}const T=Object.keys(r).sort();for(const s of T){const h=r[s];if("@id"!==s)if("@type"!==s)if("@reverse"!==s)if("@preserve"!==s)if("@index"!==s)if("@graph"!==s&&"@list"!==s&&"@included"!==s&&v(s)){const t=I.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:!0}});x(_,t,h)}else{if(!i(h))throw new n("JSON-LD expansion error; expanded value must be an array.","jsonld.SyntaxError");if(0===h.length){const t=I.compactIri({activeCtx:e,iri:s,value:h,relativeTo:{vocab:!0},reverse:b}),r=e.mappings.has(t)?e.mappings.get(t)["@nest"]:null;let n=_;r&&(S(e,r,d),o(_[r])||(_[r]={}),n=_[r]),x(n,t,h,{propertyIsArray:!0})}for(const t of h){const r=I.compactIri({activeCtx:e,iri:s,value:t,relativeTo:{vocab:!0},reverse:b}),n=e.mappings.has(r)?e.mappings.get(r)["@nest"]:null;let h=_;n&&(S(e,n,d),o(_[n])||(_[n]={}),h=_[n]);const v=p(e,r,"@container")||[],g=l(t),y=u(t);let j;y?j=t["@list"]:g&&(j=t["@graph"]);let R=await I.compact({activeCtx:e,activeProperty:r,element:y||g?j:t,options:d,compactionMap:m});if(y){if(i(R)||(R=[R]),v.includes("@list")){x(h,r,R,{valueIsArray:!0,allowDuplicate:!0});continue}R={[I.compactIri({activeCtx:e,iri:"@list",relativeTo:{vocab:!0}})]:R},"@index"in t&&(R[I.compactIri({activeCtx:e,iri:"@index",relativeTo:{vocab:!0}})]=t["@index"])}if(g)if(v.includes("@graph")&&(v.includes("@id")||v.includes("@index")&&f(t))){let n;h.hasOwnProperty(r)?n=h[r]:h[r]=n={};const i=(v.includes("@id")?t["@id"]:t["@index"])||I.compactIri({activeCtx:e,iri:"@none",relativeTo:{vocab:!0}});x(n,i,R,{propertyIsArray:!d.compactArrays||v.includes("@set")})}else v.includes("@graph")&&f(t)?(i(R)&&R.length>1&&(R={"@included":R}),x(h,r,R,{propertyIsArray:!d.compactArrays||v.includes("@set")})):(i(R)&&1===R.length&&d.compactArrays&&(R=R[0]),R={[I.compactIri({activeCtx:e,iri:"@graph",relativeTo:{vocab:!0}})]:R},"@id"in t&&(R[I.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}})]=t["@id"]),"@index"in t&&(R[I.compactIri({activeCtx:e,iri:"@index",relativeTo:{vocab:!0}})]=t["@index"]),x(h,r,R,{propertyIsArray:!d.compactArrays||v.includes("@set")}));else if(v.includes("@language")||v.includes("@index")||v.includes("@id")||v.includes("@type")){let n,i;if(h.hasOwnProperty(r)?n=h[r]:h[r]=n={},v.includes("@language"))c(R)&&(R=R["@value"]),i=t["@language"];else if(v.includes("@index")){const n=p(e,r,"@index")||"@index",o=I.compactIri({activeCtx:e,iri:n,relativeTo:{vocab:!0}});if("@index"===n)i=t["@index"],delete R[o];else{let e;if([i,...e]=w(R[n]||[]),a(i))switch(e.length){case 0:delete R[n];break;case 1:R[n]=e[0];break;default:R[n]=e}else i=null}}else if(v.includes("@id")){const t=I.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}});i=R[t],delete R[t]}else if(v.includes("@type")){const n=I.compactIri({activeCtx:e,iri:"@type",relativeTo:{vocab:!0}});let o;switch([i,...o]=w(R[n]||[]),o.length){case 0:delete R[n];break;case 1:R[n]=o[0];break;default:R[n]=o}1===Object.keys(R).length&&"@id"in t&&(R=await I.compact({activeCtx:e,activeProperty:r,element:{"@id":t["@id"]},options:d,compactionMap:m}))}i||(i=I.compactIri({activeCtx:e,iri:"@none",relativeTo:{vocab:!0}})),x(n,i,R,{propertyIsArray:v.includes("@set")})}else{const e=!d.compactArrays||v.includes("@set")||v.includes("@list")||i(R)&&0===R.length||"@list"===s||"@graph"===s;x(h,r,R,{propertyIsArray:e})}}}else{if((p(e,t,"@container")||[]).includes("@index"))continue;const r=I.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:!0}});x(_,r,h)}else{const r=await I.compact({activeCtx:e,activeProperty:t,element:h,options:d,compactionMap:m});i(r)&&0===r.length||x(_,s,r)}else{const t=await I.compact({activeCtx:e,activeProperty:"@reverse",element:h,options:d,compactionMap:m});for(const r in t)if(e.mappings.has(r)&&e.mappings.get(r).reverse){const n=t[r],i=(p(e,r,"@container")||[]).includes("@set")||!d.compactArrays;x(_,r,n,{propertyIsArray:i}),delete t[r]}if(Object.keys(t).length>0){const r=I.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:!0}});x(_,r,t)}}else{let t=w(h).map((e=>I.compactIri({activeCtx:j,iri:e,relativeTo:{vocab:!0}})));1===t.length&&(t=t[0]);const r=I.compactIri({activeCtx:e,iri:"@type",relativeTo:{vocab:!0}}),n=(p(e,r,"@container")||[]).includes("@set")&&y(e,1.1)||i(t)&&0===h.length;x(_,r,t,{propertyIsArray:n})}else{let t=w(h).map((t=>I.compactIri({activeCtx:e,iri:t,relativeTo:{vocab:!1},base:d.base})));1===t.length&&(t=t[0]),_[I.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}})]=t}}return _}return r},I.compactIri=({activeCtx:e,iri:t,value:r=null,relativeTo:i={vocab:!1},reverse:a=!1,base:s=null})=>{if(null===t)return t;e.isPropertyTermScoped&&e.previousContext&&(e=e.previousContext);const f=e.getInverse();if(v(t)&&t in f&&"@none"in f[t]&&"@type"in f[t]["@none"]&&"@none"in f[t]["@none"]["@type"])return f[t]["@none"]["@type"]["@none"];if(i.vocab&&t in f){const n=e["@language"]||"@none",i=[];o(r)&&"@index"in r&&!("@graph"in r)&&i.push("@index","@index@set"),o(r)&&"@preserve"in r&&(r=r["@preserve"][0]),l(r)?("@index"in r&&i.push("@graph@index","@graph@index@set","@index","@index@set"),"@id"in r&&i.push("@graph@id","@graph@id@set"),i.push("@graph","@graph@set","@set"),"@index"in r||i.push("@graph@index","@graph@index@set","@index","@index@set"),"@id"in r||i.push("@graph@id","@graph@id@set")):o(r)&&!c(r)&&i.push("@id","@id@set","@type","@set@type");let s="@language",f="@null";if(a)s="@type",f="@reverse",i.push("@set");else if(u(r)){"@index"in r||i.push("@list");const e=r["@list"];if(0===e.length)s="@any",f="@none";else{let t=0===e.length?n:null,r=null;for(let n=0;n<e.length;++n){const i=e[n];let o="@none",a="@none";if(c(i)?"@direction"in i?o=`${(i["@language"]||"").toLowerCase()}_${i["@direction"]}`:"@language"in i?o=i["@language"].toLowerCase():"@type"in i?a=i["@type"]:o="@null":a="@id",null===t?t=o:o!==t&&c(i)&&(t="@none"),null===r?r=a:a!==r&&(r="@none"),"@none"===t&&"@none"===r)break}t=t||"@none",r=r||"@none","@none"!==r?(s="@type",f=r):f=t}}else{if(c(r))if("@language"in r&&!("@index"in r)){i.push("@language","@language@set"),f=r["@language"];const e=r["@direction"];e&&(f=`${f}_${e}`)}else"@direction"in r&&!("@index"in r)?f="_"+r["@direction"]:"@type"in r&&(s="@type",f=r["@type"]);else s="@type",f="@id";i.push("@set")}i.push("@none"),o(r)&&!("@index"in r)&&i.push("@index","@index@set"),c(r)&&1===Object.keys(r).length&&i.push("@language","@language@set");const h=function(e,t,r,n,i,a){null===a&&(a="@null");const s=[];if(("@id"===a||"@reverse"===a)&&o(r)&&"@id"in r){"@reverse"===a&&s.push("@reverse");const t=I.compactIri({activeCtx:e,iri:r["@id"],relativeTo:{vocab:!0}});e.mappings.has(t)&&e.mappings.get(t)&&e.mappings.get(t)["@id"]===r["@id"]?s.push.apply(s,["@vocab","@id"]):s.push.apply(s,["@id","@vocab"])}else{s.push(a);const e=s.find((e=>e.includes("_")));e&&s.push(e.replace(/^[^_]+_/,"_"))}s.push("@none");const u=e.inverse[t];for(const e of n){if(!(e in u))continue;const t=u[e][i];for(const e of s)if(e in t)return t[e]}return null}(e,t,r,i,s,f);if(null!==h)return h}if(i.vocab&&"@vocab"in e){const r=e["@vocab"];if(0===t.indexOf(r)&&t!==r){const n=t.substr(r.length);if(!e.mappings.has(n))return n}}let h=null;const d=[];let p=e.fastCurieMap;const g=t.length-1;for(let e=0;e<g&&t[e]in p;++e)p=p[t[e]],""in p&&d.push(p[""][0]);for(let n=d.length-1;n>=0;--n){const i=d[n],o=i.terms;for(const n of o){const o=n+":"+t.substr(i.iri.length);e.mappings.get(n)._prefix&&(!e.mappings.has(o)||null===r&&e.mappings.get(o)["@id"]===t)&&(null===h||_(o,h)<0)&&(h=o)}}if(null!==h)return h;for(const[r,i]of e.mappings)if(i&&i._prefix&&t.startsWith(r+":"))throw new n(`Absolute IRI "${t}" confused with prefix "${r}".`,"jsonld.SyntaxError",{code:"IRI confused with prefix",context:e});return i.vocab?t:"@base"in e?e["@base"]?m(b(s,e["@base"]),t):t:m(s,t)},I.compactValue=({activeCtx:e,activeProperty:t,value:r,options:n})=>{if(c(r)){const n=p(e,t,"@type"),i=p(e,t,"@language"),o=p(e,t,"@direction"),s=p(e,t,"@container")||[],u="@index"in r&&!s.includes("@index");if(!u&&"@none"!==n){if(r["@type"]===n)return r["@value"];if("@language"in r&&r["@language"]===i&&"@direction"in r&&r["@direction"]===o)return r["@value"];if("@language"in r&&r["@language"]===i)return r["@value"];if("@direction"in r&&r["@direction"]===o)return r["@value"]}const c=Object.keys(r).length,l=1===c||2===c&&"@index"in r&&!u,f="@language"in e,h=a(r["@value"]),d=e.mappings.has(t)&&null===e.mappings.get(t)["@language"];if(l&&"@none"!==n&&(!f||!h||d))return r["@value"];const v={};return u&&(v[I.compactIri({activeCtx:e,iri:"@index",relativeTo:{vocab:!0}})]=r["@index"]),"@type"in r?v[I.compactIri({activeCtx:e,iri:"@type",relativeTo:{vocab:!0}})]=I.compactIri({activeCtx:e,iri:r["@type"],relativeTo:{vocab:!0}}):"@language"in r&&(v[I.compactIri({activeCtx:e,iri:"@language",relativeTo:{vocab:!0}})]=r["@language"]),"@direction"in r&&(v[I.compactIri({activeCtx:e,iri:"@direction",relativeTo:{vocab:!0}})]=r["@direction"]),v[I.compactIri({activeCtx:e,iri:"@value",relativeTo:{vocab:!0}})]=r["@value"],v}const i=d(e,t,{vocab:!0},n),o=p(e,t,"@type"),s=I.compactIri({activeCtx:e,iri:r["@id"],relativeTo:{vocab:"@vocab"===o},base:n.base});return"@id"===o||"@vocab"===o||"@graph"===i?s:{[I.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}})]:s}}},function(e,t,r){e.exports=e=>{class t{toString(){return"[object JsonLdProcessor]"}}return Object.defineProperty(t,"prototype",{writable:!1,enumerable:!1}),Object.defineProperty(t.prototype,"constructor",{writable:!0,enumerable:!1,configurable:!0,value:t}),t.compact=function(t,r){return arguments.length<2?Promise.reject(new TypeError("Could not compact, too few arguments.")):e.compact(t,r)},t.expand=function(t){return arguments.length<1?Promise.reject(new TypeError("Could not expand, too few arguments.")):e.expand(t)},t.flatten=function(t){return arguments.length<1?Promise.reject(new TypeError("Could not flatten, too few arguments.")):e.flatten(t)},t}},function(e,t,r){(function(e){
81
+ /*!
82
+ * The buffer module from node.js, for the browser.
83
+ *
84
+ * @author Feross Aboukhadijeh <http://feross.org>
85
+ * @license MIT
86
+ */
87
+ var n=r(46),i=r(47),o=r(48);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return c(this,e,t,r)}function c(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n),u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=h(e,t),e}(e,t,r,n):"string"==typeof t?function(e,t,r){if("string"==typeof r&&""!==r||(r="utf8"),!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|p(t,r),i=(e=s(e,n)).write(t,r);return i!==n&&(e=e.slice(0,i)),e}(e,t,r):function(e,t){if(u.isBuffer(t)){var r=0|d(t.length);return 0===(e=s(e,r)).length||t.copy(e,0,0,r),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?s(e,0):h(e,t);if("Buffer"===t.type&&o(t.data))return h(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(l(t),e=s(e,t<0?0:0|d(t)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function h(e,t){var r=t.length<0?0:0|d(t.length);e=s(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function d(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return q(e).length;default:if(n)return F(e).length;t=(""+t).toLowerCase(),n=!0}}function v(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,r);case"utf8":case"utf-8":return R(this,t,r);case"ascii":return k(this,t,r);case"latin1":case"binary":return E(this,t,r);case"base64":return j(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function y(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:m(e,t,r,n,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,n,i){var o,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var l=-1;for(o=r;o<s;o++)if(c(e,o)===c(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*a}else-1!==l&&(o-=o-l),l=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var f=!0,h=0;h<u;h++)if(c(e,o+h)!==c(t,h)){f=!1;break}if(f)return o}return-1}function b(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[r+a]=s}return a}function x(e,t,r,n){return z(F(t,e.length-r),e,r,n)}function w(e,t,r,n){return z(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function _(e,t,r,n){return w(e,t,r,n)}function I(e,t,r,n){return z(q(t),e,r,n)}function S(e,t,r,n){return z(function(e,t){for(var r,n,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)n=(r=e.charCodeAt(a))>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function j(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function R(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,a,s,u,c=e[i],l=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=f}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=4096));return r}(n)}function k(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function E(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function T(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=B(e[o]);return i}function O(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function A(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function P(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i<o;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function L(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i<o;++i)e[r+i]=t>>>8*(n?i:3-i)&255}function C(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function D(e,t,r,n,o){return o||C(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function M(e,t,r,n,o){return o||C(e,0,r,8),i.write(e,t,r,n,52,8),r+8}t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,r){return c(null,e,t,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,r){return function(e,t,r,n){return l(t),t<=0?s(e,t):void 0!==r?"string"==typeof n?s(e,t).fill(r,n):s(e,t).fill(r):s(e,t)}(null,e,t,r)},u.allocUnsafe=function(e){return f(null,e)},u.allocUnsafeSlow=function(e){return f(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=u.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var a=e[r];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?R(this,0,e):v.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,r,n,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),c=this.slice(n,i),l=e.slice(t,r),f=0;f<s;++f)if(c[f]!==l[f]){o=c[f],a=l[f];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return y(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return y(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return b(this,e,t,r);case"utf8":case"utf-8":return x(this,e,t,r);case"ascii":return w(this,e,t,r);case"latin1":case"binary":return _(this,e,t,r);case"base64":return I(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},u.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;r=new u(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+e]}return r},u.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||A(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},u.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||A(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUInt8=function(e,t){return t||A(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||A(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||A(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||A(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||A(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||A(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||A(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||A(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||A(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){t||A(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return t||A(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||A(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||A(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||A(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||A(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||A(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){e=+e,t|=0,r|=0,n||N(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUIntBE=function(e,t,r,n){e=+e,t|=0,r|=0,n||N(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):L(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);N(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<r&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);N(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return D(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return D(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return M(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return M(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i,o=n-r;if(this===e&&r<t&&t<n)for(i=o-1;i>=0;--i)e[i+t]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+o),t);return o},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{var a=u.isBuffer(e)?e:F(new u(e,n).toString()),s=a.length;for(o=0;o<r-t;++o)this[o+t]=a[o%s]}return this};var U=/[^+\/0-9A-Za-z-_]/g;function B(e){return e<16?"0"+e.toString(16):e.toString(16)}function F(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=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((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function q(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}}).call(this,r(8))},function(e,t,r){t.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,n=c(e),a=n[0],s=n[1],u=new o(function(e,t,r){return 3*(t+r)/4-r}(0,a,s)),l=0,f=s>0?a-4:a;for(r=0;r<f;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===s&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,u[l++]=255&t),1===s&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],a=0,s=r-i;a<s;a+=16383)o.push(l(e,a,a+16383>s?s:a+16383));return 1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)n[s]=a[s],i[a.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,r){for(var i,o,a=[],s=t;s<r;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){
88
+ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
89
+ t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,c=u>>1,l=-7,f=r?i-1:0,h=r?-1:1,d=e[t+f];for(f+=h,o=d&(1<<-l)-1,d>>=-l,l+=s;l>0;o=256*o+e[t+f],f+=h,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+e[t+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=c}return(d?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[r+d]=255&a,d+=p,a/=256,c-=8);e[r+d-p]|=128*v}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){r.r(t),r.d(t,"createBlankNode",(function(){return P})),r.d(t,"createQuad",(function(){return L})),r.d(t,"jsonLDFromRDF",(function(){return m.fromRDF})),r.d(t,"jsonLDToRDF",(function(){return m.toRDF})),r.d(t,"compactJsonLD",(function(){return m.compact})),r.d(t,"TurtleParser",(function(){return w})),r.d(t,"TurtleWriter",(function(){return A}));var n=r(0);function i(e){return!!e&&"DefaultGraph"===e.termType}const{rdf:o,xsd:a}=n.a;let s,u=0;const c={namedNode:function(e){return new h(e)},blankNode:function(e){return new p(e||"n3-"+u++)},variable:function(e){return new v(e)},literal:function(e,t){if("string"==typeof t)return new d(`"${e}"@${t.toLowerCase()}`);let r=t?t.value:"";return""===r&&("boolean"==typeof e?r=a.boolean:"number"==typeof e&&(Number.isFinite(e)?r=Number.isInteger(e)?a.integer:a.double:(r=a.double,Number.isNaN(e)||(e=e>0?"INF":"-INF")))),""===r||r===a.string?new d(`"${e}"`):new d(`"${e}"^^${r}`)},defaultGraph:function(){return s},quad:y,triple:y};var l=c;class f{constructor(e){this.id=e}get value(){return this.id}equals(e){return e instanceof f?this.id===e.id:!!e&&this.termType===e.termType&&this.value===e.value}toJSON(){return{termType:this.termType,value:this.value}}}class h extends f{get termType(){return"NamedNode"}}class d extends f{get termType(){return"Literal"}get value(){return this.id.substring(1,this.id.lastIndexOf('"'))}get language(){const e=this.id;let t=e.lastIndexOf('"')+1;return t<e.length&&"@"===e[t++]?e.substr(t).toLowerCase():""}get datatype(){return new h(this.datatypeString)}get datatypeString(){const e=this.id,t=e.lastIndexOf('"')+1,r=t<e.length?e[t]:"";return"^"===r?e.substr(t+2):"@"!==r?a.string:o.langString}equals(e){return e instanceof d?this.id===e.id:!!e&&!!e.datatype&&this.termType===e.termType&&this.value===e.value&&this.language===e.language&&this.datatype.value===e.datatype.value}toJSON(){return{termType:this.termType,value:this.value,language:this.language,datatype:{termType:"NamedNode",value:this.datatypeString}}}}class p extends f{constructor(e){super("_:"+e)}get termType(){return"BlankNode"}get value(){return this.id.substr(2)}}class v extends f{constructor(e){super("?"+e)}get termType(){return"Variable"}get value(){return this.id.substr(1)}}s=new class extends f{constructor(){return super(""),s||this}get termType(){return"DefaultGraph"}equals(e){return this===e||!!e&&this.termType===e.termType}};class g extends f{constructor(e,t,r,n){super(""),this._subject=e,this._predicate=t,this._object=r,this._graph=n||s}get termType(){return"Quad"}get subject(){return this._subject}get predicate(){return this._predicate}get object(){return this._object}get graph(){return this._graph}toJSON(){return{termType:this.termType,subject:this._subject.toJSON(),predicate:this._predicate.toJSON(),object:this._object.toJSON(),graph:this._graph.toJSON()}}equals(e){return!!e&&this._subject.equals(e.subject)&&this._predicate.equals(e.predicate)&&this._object.equals(e.object)&&this._graph.equals(e.graph)}}function y(e,t,r,n){return new g(e,t,r,n)}var m=r(7),b=r(21);let x=0;class w{constructor(e){this._contextStack=[],this._graph=null,e=e||{},this._setBase(e.baseIRI),e.factory&&I(this,e.factory);const t="string"==typeof e.format?e.format.match(/\w*$/)[0].toLowerCase():"",r=/turtle/.test(t),n=/trig/.test(t),i=/triple/.test(t),o=/quad/.test(t),a=this._n3Mode=/n3/.test(t),s=i||o;(this._supportsNamedGraphs=!(r||a))||(this._readPredicateOrNamedGraph=this._readPredicate),this._supportsQuads=!(r||n||i||a),this._supportsRDFStar=""===t||/star|\*$/.test(t),s&&(this._resolveRelativeIRI=e=>null),this._blankNodePrefix="string"!=typeof e.blankNodePrefix?"":e.blankNodePrefix.replace(/^(?!_:)/,"_:"),this._lexer=e.lexer||new b.a({lineMode:s,n3:a}),this._explicitQuantifiers=!!e.explicitQuantifiers}static _resetBlankNodePrefix(){x=0}_setBase(e){if(e){const t=e.indexOf("#");t>=0&&(e=e.substr(0,t)),this._base=e,this._basePath=e.indexOf("/")<0?e:e.replace(/[^\/?]*(?:\?.*)?$/,""),e=e.match(/^(?:([a-z][a-z0-9+.-]*:))?(?:\/\/[^\/]*)?/i),this._baseRoot=e[0],this._baseScheme=e[1]}else this._base="",this._basePath=""}_saveContext(e,t,r,n,i){const o=this._n3Mode;this._contextStack.push({subject:r,predicate:n,object:i,graph:t,type:e,inverse:!!o&&this._inversePredicate,blankPrefix:o?this._prefixes._:"",quantified:o?this._quantified:null}),o&&(this._inversePredicate=!1,this._prefixes._=this._graph?this._graph.id.substr(2)+".":".",this._quantified=Object.create(this._quantified))}_restoreContext(){const e=this._contextStack.pop(),t=this._n3Mode;this._subject=e.subject,this._predicate=e.predicate,this._object=e.object,this._graph=e.graph,t&&(this._inversePredicate=e.inverse,this._prefixes._=e.blankPrefix,this._quantified=e.quantified)}_readInTopContext(e){switch(e.type){case"eof":return null!==this._graph?this._error("Unclosed graph",e):(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(e)}}_readEntity(e,t){let r;switch(e.type){case"IRI":case"typeIRI":const t=this._resolveIRI(e.value);if(null===t)return this._error("Invalid IRI",e);r=this._namedNode(t);break;case"type":case"prefixed":const n=this._prefixes[e.prefix];if(void 0===n)return this._error(`Undefined prefix "${e.prefix}:"`,e);r=this._namedNode(n+e.value);break;case"blank":r=this._blankNode(this._prefixes[e.prefix]+e.value);break;case"var":r=this._variable(e.value.substr(1));break;default:return this._error("Expected entity but got "+e.type,e)}return!t&&this._n3Mode&&r.id in this._quantified&&(r=this._quantified[r.id]),r}_readSubject(e){switch(this._predicate=null,e.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",e);case"}":return this._readPunctuation(e);case"@forSome":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORSOME,this._quantifier=this._blankNode,this._readQuantifierList):this._error('Unexpected "@forSome"',e);case"@forAll":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORALL,this._quantifier=this._variable,this._readQuantifierList):this._error('Unexpected "@forAll"',e);case"literal":if(!this._n3Mode)return this._error("Unexpected literal",e);if(0===e.prefix.length)return this._literalValue=e.value,this._completeSubjectLiteral;this._subject=this._literal(e.value,this._namedNode(e.prefix));break;case"<<":return this._supportsRDFStar?(this._saveContext("<<",this._graph,null,null,null),this._graph=null,this._readSubject):this._error("Unexpected RDF* syntax",e);default:if(void 0===(this._subject=this._readEntity(e)))return;if(this._n3Mode)return this._getPathReader(this._readPredicateOrNamedGraph)}return this._readPredicateOrNamedGraph}_readPredicate(e){const t=e.type;switch(t){case"inverse":this._inversePredicate=!0;case"abbreviation":this._predicate=this.ABBREVIATIONS[e.value];break;case".":case"]":case"}":return null===this._predicate?this._error("Unexpected "+t,e):(this._subject=null,"]"===t?this._readBlankNodeTail(e):this._readPunctuation(e));case";":return null!==this._predicate?this._readPredicate:this._error("Expected predicate but got ;",e);case"blank":if(!this._n3Mode)return this._error("Disallowed blank node as predicate",e);default:if(void 0===(this._predicate=this._readEntity(e)))return}return this._readObject}_readObject(e){switch(e.type){case"literal":if(0===e.prefix.length)return this._literalValue=e.value,this._readDataTypeOrLang;this._object=this._literal(e.value,this._namedNode(e.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",e);case"<<":return this._supportsRDFStar?(this._saveContext("<<",this._graph,this._subject,this._predicate,null),this._graph=null,this._readSubject):this._error("Unexpected RDF* syntax",e);default:if(void 0===(this._object=this._readEntity(e)))return;if(this._n3Mode)return this._getPathReader(this._getContextEndReader())}return this._getContextEndReader()}_readPredicateOrNamedGraph(e){return"{"===e.type?this._readGraph(e):this._readPredicate(e)}_readGraph(e){return"{"!==e.type?this._error("Expected graph but got "+e.type,e):(this._graph=this._subject,this._subject=null,this._readSubject)}_readBlankNodeHead(e){return"]"===e.type?(this._subject=null,this._readBlankNodeTail(e)):(this._predicate=null,this._readPredicate(e))}_readBlankNodeTail(e){if("]"!==e.type)return this._readBlankNodePunctuation(e);null!==this._subject&&this._emit(this._subject,this._predicate,this._object,this._graph);const t=null===this._predicate;return this._restoreContext(),null===this._object?t?this._readPredicateOrNamedGraph:this._readPredicateAfterBlank:this._getContextEndReader()}_readPredicateAfterBlank(e){switch(e.type){case".":case"}":return this._subject=null,this._readPunctuation(e);default:return this._readPredicate(e)}}_readListItem(e){let t=null,r=null,n=this._readListItem;const i=this._subject,o=this._contextStack,a=o[o.length-1];switch(e.type){case"[":this._saveContext("blank",this._graph,r=this._blankNode(),this.RDF_FIRST,this._subject=t=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(),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===e.prefix.length?(this._literalValue=e.value,n=this._readListItemDataTypeOrLang):(t=this._literal(e.value,this._namedNode(e.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",e);default:if(void 0===(t=this._readEntity(e)))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!==t){if(this._n3Mode&&("IRI"===e.type||"prefixed"===e.type))return this._saveContext("item",this._graph,r,this.RDF_FIRST,t),this._subject=t,this._predicate=null,this._getPathReader(this._readListItem);this._emit(r,this.RDF_FIRST,t,this._graph)}return n}_readDataTypeOrLang(e){return this._completeObjectLiteral(e,!1)}_readListItemDataTypeOrLang(e){return this._completeObjectLiteral(e,!0)}_completeLiteral(e){let t=this._literal(this._literalValue);switch(e.type){case"type":case"typeIRI":const r=this._readEntity(e);if(void 0===r)return;t=this._literal(this._literalValue,r),e=null;break;case"langcode":t=this._literal(this._literalValue,e.value),e=null}return{token:e,literal:t}}_completeSubjectLiteral(e){return this._subject=this._completeLiteral(e).literal,this._readPredicateOrNamedGraph}_completeObjectLiteral(e,t){const r=this._completeLiteral(e);if(r)return this._object=r.literal,t&&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(e){return"}"!==e.type?this._readPunctuation(e):(null!==this._subject&&this._emit(this._subject,this._predicate,this._object,this._graph),this._restoreContext(),null===this._object?this._readPredicate:this._getContextEndReader())}_readPunctuation(e){let t,r=this._graph;const n=this._subject,i=this._inversePredicate;switch(e.type){case"}":if(null===this._graph)return this._error("Unexpected graph closing",e);if(this._n3Mode)return this._readFormulaTail(e);this._graph=null;case".":this._subject=null,t=this._contextStack.length?this._readSubject:this._readInTopContext,i&&(this._inversePredicate=!1);break;case";":t=this._readPredicate;break;case",":t=this._readObject;break;default:if(this._supportsQuads&&null===this._graph&&void 0!==(r=this._readEntity(e))){t=this._readQuadPunctuation;break}return this._error(`Expected punctuation to follow "${this._object.id}"`,e)}if(null!==n){const e=this._predicate,t=this._object;i?this._emit(t,e,n,r):this._emit(n,e,t,r)}return t}_readBlankNodePunctuation(e){let t;switch(e.type){case";":t=this._readPredicate;break;case",":t=this._readObject;break;default:return this._error(`Expected punctuation to follow "${this._object.id}"`,e)}return this._emit(this._subject,this._predicate,this._object,this._graph),t}_readQuadPunctuation(e){return"."!==e.type?this._error("Expected dot to follow quad",e):this._readInTopContext}_readPrefix(e){return"prefix"!==e.type?this._error("Expected prefix to follow @prefix",e):(this._prefix=e.value,this._readPrefixIRI)}_readPrefixIRI(e){if("IRI"!==e.type)return this._error(`Expected IRI to follow prefix "${this._prefix}:"`,e);const t=this._readEntity(e);return this._prefixes[this._prefix]=t.value,this._prefixCallback(this._prefix,t),this._readDeclarationPunctuation}_readBaseIRI(e){const t="IRI"===e.type&&this._resolveIRI(e.value);return t?(this._setBase(t),this._readDeclarationPunctuation):this._error("Expected valid IRI to follow base declaration",e)}_readNamedGraphLabel(e){switch(e.type){case"IRI":case"blank":case"prefixed":return this._readSubject(e),this._readGraph;case"[":return this._readNamedGraphBlankLabel;default:return this._error("Invalid graph label",e)}}_readNamedGraphBlankLabel(e){return"]"!==e.type?this._error("Invalid graph label",e):(this._subject=this._blankNode(),this._readGraph)}_readDeclarationPunctuation(e){return this._sparqlStyle?(this._sparqlStyle=!1,this._readInTopContext(e)):"."!==e.type?this._error("Expected declaration to end with a dot",e):this._readInTopContext}_readQuantifierList(e){let t;switch(e.type){case"IRI":case"prefixed":if(void 0!==(t=this._readEntity(e,!0)))break;default:return this._error("Unexpected "+e.type,e)}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,t,this.QUANTIFIERS_GRAPH)):this._quantified[t.id]=this._quantifier(this._blankNode().value),this._readQuantifierPunctuation}_readQuantifierPunctuation(e){return","===e.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(e))}_getPathReader(e){return this._afterPath=e,this._readPath}_readPath(e){switch(e.type){case"!":return this._readForwardPath;case"^":return this._readBackwardPath;default:const t=this._contextStack,r=t.length&&t[t.length-1];if(r&&"item"===r.type){const e=this._subject;this._restoreContext(),this._emit(this._subject,this.RDF_FIRST,e,this._graph)}return this._afterPath(e)}}_readForwardPath(e){let t,r;const n=this._blankNode();if(void 0!==(r=this._readEntity(e)))return null===this._predicate?(t=this._subject,this._subject=n):(t=this._object,this._object=n),this._emit(t,r,n,this._graph),this._readPath}_readBackwardPath(e){const t=this._blankNode();let r,n;if(void 0!==(r=this._readEntity(e)))return null===this._predicate?(n=this._subject,this._subject=t):(n=this._object,this._object=t),this._emit(t,r,n,this._graph),this._readPath}_readRDFStarTailOrGraph(e){return">>"!==e.type?this._supportsQuads&&null===this._graph&&void 0!==(this._graph=this._readEntity(e))?this._readRDFStarTail:this._error(`Expected >> to follow "${this._object.id}"`,e):this._readRDFStarTail(e)}_readRDFStarTail(e){if(">>"!==e.type)return this._error("Expected >> but got "+e.type,e);const t=this._quad(this._subject,this._predicate,this._object,this._graph||this.DEFAULTGRAPH);return this._restoreContext(),null===this._subject?(this._subject=t,this._readPredicate):(this._object=t,this._getContextEndReader())}_getContextEndReader(){const e=this._contextStack;if(!e.length)return this._readPunctuation;switch(e[e.length-1].type){case"blank":return this._readBlankNodeTail;case"list":return this._readListItem;case"formula":return this._readFormulaTail;case"<<":return this._readRDFStarTailOrGraph}}_emit(e,t,r,n){this._callback(null,this._quad(e,t,r,n||this.DEFAULTGRAPH))}_error(e,t){const r=new Error(`${e} on line ${t.line}.`);r.context={token:t,line:t.line,previousToken:this._lexer.previousToken},this._callback(r),this._callback=_}_resolveIRI(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)?e:this._resolveRelativeIRI(e)}_resolveRelativeIRI(e){if(!e.length)return this._base;switch(e[0]){case"#":return this._base+e;case"?":return this._base.replace(/(?:\?.*)?$/,e);case"/":return("/"===e[1]?this._baseScheme:this._baseRoot)+this._removeDotSegments(e);default:return/^[^/:]*:/.test(e)?null:this._removeDotSegments(this._basePath+e)}}_removeDotSegments(e){if(!/(^|\/)\.\.?($|[/#?])/.test(e))return e;const t=e.length;let r="",n=-1,i=-1,o=0,a="/";for(;n<t;){switch(a){case":":if(i<0&&"/"===e[++n]&&"/"===e[++n])for(;(i=n+1)<t&&"/"!==e[i];)n=i;break;case"?":case"#":n=t;break;case"/":if("."===e[n+1])switch(a=e[1+ ++n],a){case"/":r+=e.substring(o,n-1),o=n+1;break;case void 0:case"?":case"#":return r+e.substring(o,n)+e.substr(n+1);case".":if(a=e[1+ ++n],void 0===a||"/"===a||"?"===a||"#"===a){if(r+=e.substring(o,n-2),(o=r.lastIndexOf("/"))>=i&&(r=r.substr(0,o)),"/"!==a)return`${r}/${e.substr(n+1)}`;o=n+1}}}a=e[++n]}return r+e.substring(o)}parse(e,t,r){if(this._readCallback=this._readInTopContext,this._sparqlStyle=!1,this._prefixes=Object.create(null),this._prefixes._=this._blankNodePrefix?this._blankNodePrefix.substr(2):`b${x++}_`,this._prefixCallback=r||_,this._inversePredicate=!1,this._quantified=Object.create(null),!t){const t=[];let r;if(this._callback=(e,n)=>{e?r=e:n&&t.push(n)},this._lexer.tokenize(e).every((e=>this._readCallback=this._readCallback(e))),r)throw r;return t}this._callback=t,this._lexer.tokenize(e,((e,t)=>{null!==e?(this._callback(e),this._callback=_):this._readCallback&&(this._readCallback=this._readCallback(t))}))}}function _(){}function I(e,t){const r=t.namedNode;e._namedNode=r,e._blankNode=t.blankNode,e._literal=t.literal,e._variable=t.variable,e._quad=t.quad,e.DEFAULTGRAPH=t.defaultGraph(),e.RDF_FIRST=r(n.a.rdf.first),e.RDF_REST=r(n.a.rdf.rest),e.RDF_NIL=r(n.a.rdf.nil),e.N3_FORALL=r(n.a.r.forAll),e.N3_FORSOME=r(n.a.r.forSome),e.ABBREVIATIONS={a:r(n.a.rdf.type),"=":r(n.a.owl.sameAs),">":r(n.a.log.implies)},e.QUANTIFIERS_GRAPH=r("urn:n3:quantifiers")}I(w.prototype,l);const S=l.defaultGraph(),{rdf:j,xsd:R}=n.a,k=/["\\\t\n\r\b\f\u0000-\u0019\ud800-\udbff]/,E=/["\\\t\n\r\b\f\u0000-\u0019]|[\ud800-\udbff][\udc00-\udfff]/g,T={"\\":"\\\\",'"':'\\"',"\t":"\\t","\n":"\\n","\r":"\\r","\b":"\\b","\f":"\\f"};class O extends f{equals(){return!1}}class A{constructor(e,t){if(this._prefixRegex=/$0^/,e&&"function"!=typeof e.write&&(t=e,e=null),t=t||{},this._lists=t.lists,e)this._outputStream=e,this._endStream=void 0===t.end||!!t.end;else{let e="";this._outputStream={write(t,r,n){e+=t,n&&n()},end:t=>{t&&t(null,e)}},this._endStream=!0}this._subject=null,/triple|quad/i.test(t.format)?(this._lineMode=!0,this._writeQuad=this._writeQuadLine):(this._lineMode=!1,this._graph=S,this._baseIRI=t.baseIRI,this._prefixIRIs=Object.create(null),t.prefixes&&this.addPrefixes(t.prefixes))}get _inDefaultGraph(){return S.equals(this._graph)}_write(e,t){this._outputStream.write(e,"utf8",t)}_writeQuad(e,t,r,n,i){try{n.equals(this._graph)||(this._write((null===this._subject?"":this._inDefaultGraph?".\n":"\n}\n")+(S.equals(n)?"":this._encodeIriOrBlank(n)+" {\n")),this._graph=n,this._subject=null),e.equals(this._subject)?t.equals(this._predicate)?this._write(", "+this._encodeObject(r),i):this._write(`;\n ${this._encodePredicate(this._predicate=t)} ${this._encodeObject(r)}`,i):this._write(`${(null===this._subject?"":".\n")+this._encodeSubject(this._subject=e)} ${this._encodePredicate(this._predicate=t)} ${this._encodeObject(r)}`,i)}catch(e){i&&i(e)}}_writeQuadLine(e,t,r,n,i){delete this._prefixMatch,this._write(this.quadToString(e,t,r,n),i)}quadToString(e,t,r,n){return`${this._encodeSubject(e)} ${this._encodeIriOrBlank(t)} ${this._encodeObject(r)}${n&&n.value?` ${this._encodeIriOrBlank(n)} .\n`:" .\n"}`}quadsToString(e){return e.map((e=>this.quadToString(e.subject,e.predicate,e.object,e.graph))).join("")}_encodeSubject(e){return"Quad"===e.termType?this._encodeQuad(e):this._encodeIriOrBlank(e)}_encodeIriOrBlank(e){if("NamedNode"!==e.termType)return this._lists&&e.value in this._lists&&(e=this.list(this._lists[e.value])),"id"in e?e.id:"_:"+e.value;let t=e.value;this._baseIRI&&t.startsWith(this._baseIRI)&&(t=t.substr(this._baseIRI.length)),k.test(t)&&(t=t.replace(E,N));const r=this._prefixRegex.exec(t);return r?r[1]?this._prefixIRIs[r[1]]+r[2]:t:`<${t}>`}_encodeLiteral(e){let t=e.value;if(k.test(t)&&(t=t.replace(E,N)),e.language)return`"${t}"@${e.language}`;if(this._lineMode){if(e.datatype.value===R.string)return`"${t}"`}else switch(e.datatype.value){case R.string:return`"${t}"`;case R.boolean:if("true"===t||"false"===t)return t;break;case R.integer:if(/^[+-]?\d+$/.test(t))return t;break;case R.decimal:if(/^[+-]?\d*\.\d+$/.test(t))return t;break;case R.double:if(/^[+-]?(?:\d+\.\d*|\.?\d+)[eE][+-]?\d+$/.test(t))return t}return`"${t}"^^${this._encodeIriOrBlank(e.datatype)}`}_encodePredicate(e){return e.value===j.type?"a":this._encodeIriOrBlank(e)}_encodeObject(e){switch(e.termType){case"Quad":return this._encodeQuad(e);case"Literal":return this._encodeLiteral(e);default:return this._encodeIriOrBlank(e)}}_encodeQuad({subject:e,predicate:t,object:r,graph:n}){return`<<${this._encodeSubject(e)} ${this._encodePredicate(t)} ${this._encodeObject(r)}${i(n)?"":" "+this._encodeIriOrBlank(n)}>>`}_blockedWrite(){throw new Error("Cannot write because the writer has been closed.")}addQuad(e,t,r,n,i){void 0===r?this._writeQuad(e.subject,e.predicate,e.object,e.graph,t):"function"==typeof n?this._writeQuad(e,t,r,S,n):this._writeQuad(e,t,r,n||S,i)}addQuads(e){for(let t=0;t<e.length;t++)this.addQuad(e[t])}addPrefix(e,t,r){const n={};n[e]=t,this.addPrefixes(n,r)}addPrefixes(e,t){if(!this._prefixIRIs)return t&&t();let r=!1;for(let t in e){let n=e[t];"string"!=typeof n&&(n=n.value),r=!0,null!==this._subject&&(this._write(this._inDefaultGraph?".\n":"\n}\n"),this._subject=null,this._graph=""),this._prefixIRIs[n]=t+=":",this._write(`@prefix ${t} <${n}>.\n`)}if(r){let e="",t="";for(const r in this._prefixIRIs)e+=e?"|"+r:r,t+=(t?"|":"")+this._prefixIRIs[r];e=e.replace(/[\]\/\(\)\*\+\?\.\\\$]/g,"\\$&"),this._prefixRegex=new RegExp(`^(?:${t})[^/]*$|^(${e})([a-zA-Z][\\-_a-zA-Z0-9]*)$`)}this._write(r?"\n":"",t)}blank(e,t){let r,n,i=e;switch(void 0===e?i=[]:e.termType?i=[{predicate:e,object:t}]:"length"in e||(i=[e]),n=i.length){case 0:return new O("[]");case 1:if(r=i[0],!(r.object instanceof O))return new O(`[ ${this._encodePredicate(r.predicate)} ${this._encodeObject(r.object)} ]`);default:let t="[";for(let o=0;o<n;o++)r=i[o],r.predicate.equals(e)?t+=", "+this._encodeObject(r.object):(t+=`${(o?";\n ":"\n ")+this._encodePredicate(r.predicate)} ${this._encodeObject(r.object)}`,e=r.predicate);return new O(t+"\n]")}}list(e){const t=e&&e.length||0,r=new Array(t);for(let n=0;n<t;n++)r[n]=this._encodeObject(e[n]);return new O(`(${r.join(" ")})`)}end(e){null!==this._subject&&(this._write(this._inDefaultGraph?".\n":"\n}\n"),this._subject=null),this._write=this._blockedWrite;let t=e&&((r,n)=>{t=null,e(r,n)});if(this._endStream)try{return this._outputStream.end(t)}catch(e){}t&&t()}}function N(e){let t=T[e];return void 0===t&&(1===e.length?(t=e.charCodeAt(0).toString(16),t="\\u0000".substr(0,6-t.length)+t):(t=(1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)+9216).toString(16),t="\\U00000000".substr(0,10-t.length)+t)),t}function P(e){return new p(e)}function L(e,t,r,n){return new g(e,t,r,n)}}])}));e.SolidDocumentPermission=void 0,(Ty=e.SolidDocumentPermission||(e.SolidDocumentPermission={})).Read="read",Ty.Write="write",Ty.Append="append",Ty.Control="control";var Ny=function(t){c(n,t);var r=p(n);function n(e,t,i){var a;return o(this,n),u(h(a=r.call(this,t)),"url",void 0),u(h(a),"headers",void 0),a.url=e,a.headers=i,a}return s(n,[{key:"isACPResource",value:function(){var e;return!(null===(e=this.headers.get("Link"))||void 0===e||!e.match(/<http:\/\/www\.w3\.org\/ns\/solid\/acp#AccessControlResource>;[^,]+rel="type"/))}},{key:"isPersonalProfile",value:function(){return!!this.statement(this.url,wy("rdf:type"),wy("foaf:PersonalProfileDocument"))}},{key:"isStorage",value:function(){var e;return!(null===(e=this.headers.get("Link"))||void 0===e||!e.match(/<http:\/\/www\.w3\.org\/ns\/pim\/space#Storage>;[^,]+rel="type"/))}},{key:"isUserWritable",value:function(){return this.getUserPermissions().includes(e.SolidDocumentPermission.Write)}},{key:"getUserPermissions",value:function(){return this.getPermissionsFromWAC("user")}},{key:"getPublicPermissions",value:function(){return this.getPermissionsFromWAC("public")}},{key:"getLastModified",value:function(){var e,t,r,n;return null!==(e=null!==(t=null!==(r=zg(this.headers.get("last-modified")))&&void 0!==r?r:zg(null===(n=this.statement(this.url,"purl:modified"))||void 0===n?void 0:n.object.value))&&void 0!==t?t:this.getLatestDocumentDate())&&void 0!==e?e:null}},{key:"expandIRI",value:function(e){return wy(e,{defaultPrefix:this.url})}},{key:"getLatestDocumentDate",value:function(){var e=[].concat(g(this.statements(void 0,"purl:modified")),g(this.statements(void 0,"purl:created"))).map((function(e){return zg(e.object.value)})).filter((function(e){return null!==e}));return e.length>0?e.reduce((function(e,t){return e>t?e:t})):null}},{key:"getPermissionsFromWAC",value:function(t){var r,n,i,o,a,s=null!==(r=this.headers.get("WAC-Allow"))&&void 0!==r?r:"",u=null!==(n=null===(o=s,a=new RegExp("".concat(t,'="([^"]+)"')),i=o.match(a))||void 0===i?void 0:i[1])&&void 0!==n?n:"";return Mg([u.includes("read")&&e.SolidDocumentPermission.Read,u.includes("write")&&e.SolidDocumentPermission.Write,u.includes("append")&&e.SolidDocumentPermission.Append,u.includes("control")&&e.SolidDocumentPermission.Control])}}]),n}(Iy);function Py(){return(Py=i(regeneratorRuntime.mark((function e(t){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ay.compactJsonLD(t,{});case 2:if(!("@graph"in(r=e.sent))){e.next=5;break}return e.abrupt("return",r);case 5:if(!("@id"in r)){e.next=7;break}return e.abrupt("return",{"@graph":[r]});case 7:return e.abrupt("return",{"@graph":[]});case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ly(e){return"@graph"in e}function Cy(e,t){return Dy.apply(this,arguments)}function Dy(){return(Dy=i(regeneratorRuntime.mark((function e(t,r){var n,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={headers:{Accept:"text/turtle"}},e.prev=1,e.next=4,r(t,n);case 4:if(404!==(i=e.sent).status){e.next=7;break}throw new hy(t);case 7:if(![401,403].includes(i.status)){e.next=9;break}throw new dy(t,i.status);case 9:return e.next=11,i.text();case 11:return o=e.sent,e.abrupt("return",{body:o,headers:i.headers});case 15:if(e.prev=15,e.t0=e.catch(1),!(e.t0 instanceof dy)){e.next=19;break}throw e.t0;case 19:if(!(e.t0 instanceof hy)){e.next=21;break}throw e.t0;case 21:throw new fy(t,{cause:e.t0});case 22:case"end":return e.stop()}}),e,null,[[1,15]])})))).apply(this,arguments)}function My(e){var t,r=e.slice(0),n={},i=uy(e).flatMap((function(e,t){return sy(Mg(["BlankNode"===e.object.termType?e.object.value:null,"BlankNode"===e.subject.termType?e.subject.value:null]),(function(e){return e.forEach((function(e){var r;return(null!==(r=n[e])&&void 0!==r?r:n[e]=new Set).add(t)}))}))})).filter().unique(),o=b(i);try{var a=function(){var i,o=t.value,a=n[o],s=Oy(uy(a).map((function(t){return e[t]})).filter((function(e){var t=e.subject,r=t.termType,n=t.value;return"BlankNode"===r&&n===o})).map((function(e){var t=e.predicate,r=e.object;return"BlankNode"===r.termType?t.value:t.value+r.value})).sorted().join()),u=b(a);try{for(u.s();!(i=u.n()).done;){for(var c=i.value,l=r[c],f={subject:l.subject,object:l.object},h=0,d=Object.entries(f);h<d.length;h++){var p=v(d[h],2),g=p[0],y=p[1];"BlankNode"===y.termType&&y.value===o&&(f[g]=Ay.createBlankNode(s))}Bg(r,l,Ay.createQuad(f.subject,l.predicate,f.object))}}catch(e){u.e(e)}finally{u.f()}};for(o.s();!(t=o.n()).done;)a()}catch(e){o.e(e)}finally{o.f()}return r}function Uy(e,t,r){return By.apply(this,arguments)}function By(){return(By=i(regeneratorRuntime.mark((function e(t,r,n){var i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=null!==(i=n)&&void 0!==i?i:window.fetch.bind(window),e.next=3,tm(r);case 3:return o=e.sent,e.next=6,n(t,{method:"PUT",headers:{"Content-Type":"text/turtle"},body:r});case 6:return e.abrupt("return",new Ny(t,o,new Headers({})));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Fy(e,t){return qy.apply(this,arguments)}function qy(){return qy=i(regeneratorRuntime.mark((function e(t,r){var n,i,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Cy(t,null!=r?r:window.fetch);case 2:return n=e.sent,i=n.body,o=n.headers,e.next=7,tm(i,{baseIRI:t});case 7:return a=e.sent,e.abrupt("return",new Ny(t,a,o));case 9:case"end":return e.stop()}}),e)}))),qy.apply(this,arguments)}function zy(e,t){return Jy.apply(this,arguments)}function Jy(){return(Jy=i(regeneratorRuntime.mark((function e(t,r){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Fy(t,r);case 3:return n=e.sent,e.abrupt("return",n);case 7:if(e.prev=7,e.t0=e.catch(0),e.t0 instanceof hy){e.next=11;break}throw e.t0;case 11:return e.abrupt("return",null);case 12:case"end":return e.stop()}}),e,null,[[0,7]])})))).apply(this,arguments)}function $y(e,t){return Gy.apply(this,arguments)}function Gy(){return(Gy=i(regeneratorRuntime.mark((function e(t,r){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Ly(t)){e.next=5;break}return e.next=3,Promise.all(t["@graph"].map((function(e){return $y(e,r)})));case 3:return n=e.sent,e.abrupt("return",n.flat());case 5:return e.abrupt("return",Ay.jsonLDToRDF(t,{base:r}));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Qy(e){var t=em(e);return Object.entries(t).reduce((function(e,t){var r=v(t,2),n=r[0],i=r[1].map((function(e){return" "+Yy(e)})).sort().join("\n");return e.concat("".concat(n.toUpperCase()," DATA {\n").concat(i,"\n}"))}),[]).join(" ;\n")}function Vy(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Tg({baseIRI:r.baseIRI}),i=new Ay.TurtleParser(n),o={quads:[],containsRelativeIRIs:!1};return new Promise((function(n,a){var s=i._resolveRelativeIRI;i._resolveRelativeIRI=function(){return o.containsRelativeIRIs=!0,i._resolveRelativeIRI=s,i._resolveRelativeIRI.apply(i,arguments)},i.parse(t,(function(t,i){var s;t?a(new ly(null!==(s=r.baseIRI)&&void 0!==s?s:null,e.SolidDocumentFormat.Turtle,t.message)):i?o.quads.push(i):n(o)}))}))}function Hy(){return(Hy=i(regeneratorRuntime.mark((function e(t){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ay.jsonLDFromRDF(t);case 2:return r=e.sent,e.abrupt("return",{"@graph":r});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Wy(e){return(new Ay.TurtleWriter).quadsToString(e)}function Yy(e){return(new Ay.TurtleWriter).quadsToString([e]).slice(0,-1)}function Ky(e,t){return Xy.apply(this,arguments)}function Xy(){return(Xy=i(regeneratorRuntime.mark((function e(t,r){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Fy(t,r);case 3:return n=e.sent,e.abrupt("return",!n.isEmpty());case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",!1);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))).apply(this,arguments)}function Zy(){return Zy=i(regeneratorRuntime.mark((function e(t){var r,n,o,a=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:{},n=Qg(t,/(\w+) DATA {([^}]+)}/g),o={},e.next=5,Promise.all(g(n).map(function(){var e=i(regeneratorRuntime.mark((function e(t){var n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t[1].toLowerCase(),i=t[2],e.next=4,tm(i,r);case 4:o[n]=e.sent;case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 5:return e.abrupt("return",o);case 6:case"end":return e.stop()}}),e)}))),Zy.apply(this,arguments)}function em(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Qg(e,/(\w+) DATA {([^}]+)}/g),i={},o=b(n);try{for(o.s();!(t=o.n()).done;){var a=t.value,s=a[1].toLowerCase(),u=a[2];i[s]=nm(u,r)}}catch(e){o.e(e)}finally{o.f()}return i}function tm(e){return rm.apply(this,arguments)}function rm(){return rm=i(regeneratorRuntime.mark((function e(t){var r,n,i,o=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:{},e.next=3,Vy(t,r);case 3:return n=e.sent,i=n.quads,e.abrupt("return",i);case 6:case"end":return e.stop()}}),e)}))),rm.apply(this,arguments)}function nm(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Tg({baseIRI:r.baseIRI}),i=new Ay.TurtleParser(n);try{var o=i.parse(t);return r.normalizeBlankNodes?My(o):o}catch(t){var a,s;throw new ly(null!==(a=r.baseIRI)&&void 0!==a?a:null,e.SolidDocumentFormat.Turtle,null!==(s=t.message)&&void 0!==s?s:"")}}function im(e,t,r){return om.apply(this,arguments)}function om(){return(om=i(regeneratorRuntime.mark((function e(t,r,n){var i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=null!==(i=n)&&void 0!==i?i:window.fetch.bind(window),e.next=3,n(t,{method:"PATCH",headers:{"Content-Type":"application/sparql-update"},body:r});case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function am(e,t){return sm.apply(this,arguments)}function sm(){return sm=i(regeneratorRuntime.mark((function e(t,r){var n,o,a,s,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=new Iy(t.getQuads()),s=u({},t.url,t),c=function(e){e.statements(void 0,"foaf:isPrimaryTopicOf").map((function(e){return e.object.value})).forEach((function(e){var t;return s[e]=null!==(t=s[e])&&void 0!==t?t:null})),e.statements(void 0,"foaf:primaryTopic").map((function(e){return e.object.value})).forEach((function(e){var t;return s[e]=null!==(t=s[e])&&void 0!==t?t:null}))},l=function(){var e=i(regeneratorRuntime.mark((function e(){var t,n,i,o,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=0,n=Object.entries(s);case 1:if(!(t<n.length)){e.next=23;break}if(i=v(n[t],2),o=i[0],null===i[1]){e.next=5;break}return e.abrupt("continue",20);case 5:return e.prev=5,e.next=8,Fy(o,r);case 8:u=e.sent,s[o]=u,a.addQuads(u.getQuads()),c(u),e.next=20;break;case 14:if(e.prev=14,e.t0=e.catch(5),!(e.t0 instanceof dy)){e.next=19;break}return s[o]=!1,e.abrupt("continue",20);case 19:throw e.t0;case 20:t++,e.next=1;break;case 23:case"end":return e.stop()}}),e,null,[[5,14]])})));return function(){return e.apply(this,arguments)}}(),c(t);case 5:return e.next=7,l();case 7:if(Object.values(s).some((function(e){return null===e}))){e.next=5;break}case 8:return e.abrupt("return",{store:a,cloaked:Object.values(s).some((function(e){return!1===e})),writableProfileUrl:t.isUserWritable()?t.url:null!==(n=null===(o=Object.values(s).find((function(e){return!!e&&e.isUserWritable()})))||void 0===o?void 0:o.url)&&void 0!==n?n:null});case 9:case"end":return e.stop()}}),e)}))),sm.apply(this,arguments)}function um(e,t){return cm.apply(this,arguments)}function cm(){return cm=i(regeneratorRuntime.mark((function e(t,n){var i,o,a,s,u,c,l,f,h,d,p,v,g,y,m,b,x,w;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f=Zg(t),e.next=3,Fy(f,n);case 3:if((h=e.sent).isPersonalProfile()||h.contains(t,"solid:oidcIssuer")){e.next=6;break}throw new Error("".concat(t," is not a valid webId."));case 6:return e.next=8,am(h,n);case 8:d=e.sent,p=d.store,v=d.writableProfileUrl,g=d.cloaked,y=p.statements(t,"pim:storage").map((function(e){return e.object.value})),m=p.statement(t,"solid:publicTypeIndex"),b=p.statement(t,"solid:privateTypeIndex"),x=Kg(f);case 16:if(!x||0!==y.length){e.next=26;break}return e.next=19,Gg(Fy(x,n));case 19:if(null==(w=e.sent)||!w.isStorage()){e.next=23;break}return y.push(x),e.abrupt("break",26);case 23:x=Kg(x),e.next=16;break;case 26:return e.abrupt("return",r({webId:t,storageUrls:y,cloaked:g,writableProfileUrl:v},Tg({name:null!==(i=null===(o=p.statement(t,"vcard:fn"))||void 0===o?void 0:o.object.value)&&void 0!==i?i:null===(a=p.statement(t,"foaf:name"))||void 0===a?void 0:a.object.value,avatarUrl:null!==(s=null===(u=p.statement(t,"vcard:hasPhoto"))||void 0===u?void 0:u.object.value)&&void 0!==s?s:null===(c=p.statement(t,"foaf:img"))||void 0===c?void 0:c.object.value,oidcIssuerUrl:null===(l=p.statement(t,"solid:oidcIssuer"))||void 0===l?void 0:l.object.value,publicTypeIndexUrl:null==m?void 0:m.object.value,privateTypeIndexUrl:null==b?void 0:b.object.value})));case 27:case"end":return e.stop()}}),e)}))),cm.apply(this,arguments)}function lm(){return(lm=i(regeneratorRuntime.mark((function e(t,r){var n,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=Gg((function(e){return um(e,r)})),e.next=3,o(t);case 3:if(e.t2=i=e.sent,e.t1=null!==e.t2,!e.t1){e.next=7;break}e.t1=void 0!==i;case 7:if(!e.t1){e.next=11;break}e.t3=i,e.next=14;break;case 11:return e.next=13,o(t.replace(/\/$/,"").concat("/profile/card#me"));case 13:e.t3=e.sent;case 14:if(e.t4=n=e.t3,e.t0=null!==e.t4,!e.t0){e.next=18;break}e.t0=void 0!==n;case 18:if(!e.t0){e.next=22;break}e.t5=n,e.next=25;break;case 22:return e.next=24,o(Yg(t).concat("/profile/card#me"));case 24:e.t5=e.sent;case 25:return e.abrupt("return",e.t5);case 26:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function fm(e){var t=function(e){return e.path&&e.path.startsWith("/")?e.path.match(/^\/[^/]*$/)?"/":"/".concat(uy(e.path.split("/")).filter().slice(0,-1).join("/"),"/").replace("//","/"):null}(e);return e.protocol&&e.domain?"".concat(e.protocol,"://").concat(e.domain).concat(null!=t?t:"/"):t}function hm(e){var t;if("@type"in e&&!("@value"in e)){e["@id"]=null!==(t=e["@id"])&&void 0!==t?t:$g();for(var r=0,n=Object.values(e);r<n.length;r++){var i=n[r];Rg(i)&&hm(i),jg(i)&&i.forEach((function(e){return Rg(e)&&hm(e)}))}}}function dm(e,t,r){return pm.apply(this,arguments)}function pm(){return(pm=i(regeneratorRuntime.mark((function e(t,r,n){var i,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=null!==(i=n)&&void 0!==i?i:window.fetch.bind(n),o=t.storageUrls[0],a="".concat(o,"settings/").concat(r,"TypeIndex"),e.next=5,Ky(a,n);case 5:if(!e.sent){e.next=9;break}e.t0="".concat(o,"settings/").concat(r,"TypeIndex-").concat($g()),e.next=10;break;case 9:e.t0=a;case 10:return e.abrupt("return",e.t0);case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function vm(e,t,r){return gm.apply(this,arguments)}function gm(){return(gm=i(regeneratorRuntime.mark((function e(t,r,n){var i,o,a,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==t.writableProfileUrl){e.next=2;break}throw new Error("Can't create type index without a writable profile document");case 2:return n=null!==(i=n)&&void 0!==i?i:window.fetch.bind(n),e.next=5,dm(t,r,n);case 5:return o=e.sent,a="public"===r?"<> a <http://www.w3.org/ns/solid/terms#TypeIndex> .":"\n <> a\n <http://www.w3.org/ns/solid/terms#TypeIndex>,\n <http://www.w3.org/ns/solid/terms#UnlistedDocument> .\n ",s="\n INSERT DATA {\n <".concat(t.webId,"> <http://www.w3.org/ns/solid/terms#").concat(r,"TypeIndex> <").concat(o,"> .\n }\n "),e.next=10,Promise.all([Uy(o,a,n),im(t.writableProfileUrl,s,n)]);case 10:return e.abrupt("return",o);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ym(e,t,r,n){return mm.apply(this,arguments)}function mm(){return(mm=i(regeneratorRuntime.mark((function e(t,r,n,i){var o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Fy(t,i);case 2:return o=e.sent,a=Array.isArray(r)?r:[r],e.abrupt("return",a.map((function(e){return o.statements(void 0,"rdf:type","solid:TypeRegistration").filter((function(t){return o.contains(t.subject.value,"solid:forClass",e)})).map((function(e){return o.statements(e.subject.value,n)})).flat().map((function(e){return e.object.value})).filter((function(e){return!!e}))})).flat());case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function bm(){return(bm=i(regeneratorRuntime.mark((function e(t,r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",vm(t,"public",r));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function xm(){return(xm=i(regeneratorRuntime.mark((function e(t,r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",vm(t,"private",r));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function wm(){return(wm=i(regeneratorRuntime.mark((function e(t,r,n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",ym(t,r,"solid:instanceContainer",n));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _m(){return(_m=i(regeneratorRuntime.mark((function e(t,r,n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",ym(t,r,"solid:instance",n));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Im={},Sm={"%uuid%":"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"},jm=function(e){c(ExpectedQuadAssertionError,e);var t=p(ExpectedQuadAssertionError);function ExpectedQuadAssertionError(e){var r;return o(this,ExpectedQuadAssertionError),u(h(r=t.call(this,"Couldn't find the following triple: ".concat(Yy(e)))),"expectedQuad",void 0),r.expectedQuad=e,r}return ExpectedQuadAssertionError}(wg);function Rm(e,t){var r,n=b(e);try{var i=function(){var e=r.value,n=t.find((function(t){return n=t,function(e,t){if(e.termType!==t.termType)return!1;if("Literal"===e.termType&&"Literal"===t.termType){if(e.datatype.value!==t.datatype.value)return!1;if(!km(e.value))return"http://www.w3.org/2001/XMLSchema#dateTime"===e.datatype.value?new Date(e.value).getTime()===new Date(t.value).getTime():e.value===t.value}return Em(e.value,t.value)}((r=e).object,n.object)&&Em(r.subject.value,n.subject.value)&&Em(r.predicate.value,n.predicate.value);var r,n}));if(!n)throw new jm(e);Ug(t,n)};for(n.s();!(r=n.n()).done;)i()}catch(e){n.e(e)}finally{n.f()}}function km(e){return/\[\[(.*\]\[)?([^\]]+)\]\]/.test(e)}function Em(e,t){var r,n;return km(e)?(null!==(n=(r=Im)[e])&&void 0!==n?n:r[e]=function(e){var t,r=[],n=[],i=e,o=b(Qg(e,/\[\[((.*?)\]\[)?([^\]]+)\]\]/g));try{for(o.s();!(t=o.n()).done;){var a=t.value;a[2]&&r.push(a[2]),n.push(a[3]),i=i.replace(a[0],"%PATTERN".concat(n.length-1,"%"))}}catch(e){o.e(e)}finally{o.f()}i=i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");for(var s=0,u=Object.entries(n);s<u.length;s++){var c,l=v(u[s],2),f=l[0],h=l[1];i=i.replace("%PATTERN".concat(f,"%"),null!==(c=Sm[h])&&void 0!==c?c:h)}return new RegExp(i)}(e)).test(t):e===t}function Tm(){Im={}}function Om(e,t){return Am.apply(this,arguments)}function Am(){return(Am=i(regeneratorRuntime.mark((function e(t,r){var n,i,o,a,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Tm(),e.next=3,$y(t);case 3:return n=e.sent,e.next=6,$y(r);case 6:if(i=e.sent,o=Wy(n),a=Wy(i),s=function(e,t){return{success:e,message:t,expected:o,actual:a}},n.length===i.length){e.next=12;break}return e.abrupt("return",s(!1,"Expected ".concat(n.length," triples, found ").concat(i.length,".")));case 12:e.prev=12,Rm(n,i),e.next=21;break;case 16:if(e.prev=16,e.t0=e.catch(12),e.t0 instanceof jm){e.next=20;break}throw e.t0;case 20:return e.abrupt("return",s(!1,e.t0.message));case 21:return e.abrupt("return",s(!0,"jsonld matches"));case 22:case"end":return e.stop()}}),e,null,[[12,16]])})))).apply(this,arguments)}function Nm(e,t){var r;Tm();for(var n=em(e,{normalizeBlankNodes:!0}),i=em(t,{normalizeBlankNodes:!0}),o=function(r,n){return{success:r,message:n,expected:e,actual:t}},a=0,s=Object.keys(n);a<s.length;a++){var u=s[a];if(!(u in i))return o(!1,"Couldn't find expected ".concat(u," operation."));var c=cy(n,u),l=cy(i,u);if(c.length!==l.length)return o(!1,"Expected ".concat(c.length," ").concat(u," triples, found ").concat(l.length,"."));try{Rm(c,l)}catch(e){if(!(e instanceof jm))throw e;return o(!1,"Couldn't find the following ".concat(u," triple: ").concat(Yy(e.expectedQuad)))}}var f=null!==(r=Object.keys(i)[0])&&void 0!==r?r:null;return f?o(!1,"Did not expect to find ".concat(f," triples.")):o(!0,"sparql matches")}function Pm(e,t){Tm();var r=nm(e,{normalizeBlankNodes:!0}),n=nm(t,{normalizeBlankNodes:!0}),i=function(r,n){return{success:r,message:n,expected:e,actual:t}};if(r.length!==n.length)return i(!1,"Expected ".concat(r.length," triples, found ").concat(n.length,"."));try{Rm(r,n)}catch(e){if(!(e instanceof jm))throw e;return i(!1,e.message)}return i(!0,"turtle matches")}function Lm(e,t){return Cm.apply(this,arguments)}function Cm(){return(Cm=i(regeneratorRuntime.mark((function e(t,r){var n,i,o,a,s,u,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=null!==(n=r)&&void 0!==n?n:window.fetch.bind(window),e.next=3,r(t,{method:"HEAD"});case 3:if(s=e.sent,u=null!==(i=s.headers.get("Link"))&&void 0!==i?i:"",c=null!==(o=null===(a=u.match(/<([^>]+)>;\s*rel="acl"/))||void 0===a?void 0:a[1])&&void 0!==o?o:null){e.next=8;break}throw new Error("Could not find ACL Resource for '".concat(t,"'"));case 8:return e.abrupt("return",Wg(Hg(t),c));case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Dm(e,t,r){return Mm.apply(this,arguments)}function Mm(){return(Mm=i(regeneratorRuntime.mark((function e(t,r,n){var i,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(i=n)||void 0===i){e.next=4;break}e.t0=i,e.next=7;break;case 4:return e.next=6,Lm(t,r);case 6:e.t0=e.sent;case 7:return n=e.t0,e.next=10,zy(null!==(o=n)&&void 0!==o?o:"",r);case 10:if(a=e.sent){e.next=13;break}return e.abrupt("return",Dm(Hg(t),r));case 13:if(!a.isACPResource()){e.next=15;break}throw new vy(t,"ACP");case 15:return e.abrupt("return",a);case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Um(){return(Um=i(regeneratorRuntime.mark((function e(t,r){var n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Lm(t,r);case 2:return n=e.sent,e.next=5,Dm(t,r,n);case 5:return i=e.sent,e.abrupt("return",Tg({url:n,effectiveUrl:i.url,document:i}));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Bm={turtle:function(e){var t=this._obj,r=this.assert.bind(this),n=Pm(e,t);r(n.success,n.message,"",n.expected,n.actual)},sparql:function(e){var t=this._obj,r=this.assert.bind(this),n=Nm(e,t);r(n.success,n.message,"",n.expected,n.actual)}};function Fm(e,t){var r=e.success,n=t.context.utils;return{pass:r,message:r?function(){return[e.message,n.matcherHint(t.hint)].join("\n\n")}:function(){return[e.message,n.matcherHint(t.hint),["Expected: not ".concat(n.printExpected(t.expected)),"Received: ".concat(n.printReceived(t.received))].join("\n")].join("\n\n")}}}var qm={toEqualJsonLD:function(e,t){var r=this;return i(regeneratorRuntime.mark((function n(){var i;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Om(t,e);case 2:return i=n.sent,n.abrupt("return",Fm(i,{context:r,hint:"toEqualJsonLD",expected:t,received:e}));case 4:case"end":return n.stop()}}),n)})))()},toEqualSparql:function(e,t){return Fm(Nm(t,e),{context:this,hint:"toEqualSparql",expected:Qy(t),received:Qy(e)})}};e.MalformedSolidDocumentError=ly,e.NetworkRequestError=fy,e.NotFoundError=hy,e.SolidDocument=Ny,e.SolidStore=Iy,e.SolidThing=_y,e.UnauthorizedError=dy,e.UnsuccessfulNetworkRequestError=py,e.UnsupportedAuthorizationProtocolError=vy,e.compactJsonLDGraph=function(e){return Py.apply(this,arguments)},e.createPrivateTypeIndex=function(e,t){return xm.apply(this,arguments)},e.createPublicTypeIndex=function(e,t){return bm.apply(this,arguments)},e.createSolidDocument=Uy,e.defineIRIPrefix=function(e,t){xy[e]=t},e.expandIRI=wy,e.fetchLoginUserProfile=function(e,t){return lm.apply(this,arguments)},e.fetchSolidDocument=Fy,e.fetchSolidDocumentACL=function(e,t){return Um.apply(this,arguments)},e.fetchSolidDocumentIfFound=zy,e.findContainerRegistrations=function(e,t,r){return wm.apply(this,arguments)},e.findInstanceRegistrations=function(e,t,r){return _m.apply(this,arguments)},e.installChaiPlugin=function(){chai.use((function(e){return Object.entries(Bm).forEach((function(t){var r=v(t,2),n=r[0],i=r[1];return e.Assertion.addMethod(n,i)}))}))},e.installJestPlugin=function(){expect.extend(qm)},e.isJsonLDGraph=Ly,e.jsonldEquals=Om,e.jsonldToQuads=$y,e.mintJsonLDIdentifiers=function(e){return sy(kg(e),(function(e){return hm(e)}))},e.normalizeSparql=Qy,e.parseResourceSubject=function(e){var t=Xg(e);return t?Tg({containerUrl:fm(t),documentName:t.path?t.path.split("/").pop():null,resourceHash:t.fragment}):{}},e.parseTurtle=Vy,e.quadToTurtle=Yy,e.quadsToJsonLD=function(e){return Hy.apply(this,arguments)},e.quadsToTurtle=Wy,e.solidDocumentExists=Ky,e.sparqlEquals=Nm,e.sparqlToQuads=function(e){return Zy.apply(this,arguments)},e.sparqlToQuadsSync=em,e.turtleEquals=Pm,e.turtleToQuads=tm,e.turtleToQuadsSync=nm,e.updateSolidDocument=im,Object.defineProperty(e,"__esModule",{value:!0})}));
90
+ //# sourceMappingURL=noeldemartin-solid-utils.umd.js.map