prez-components 4.1.2 → 4.1.3

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.
@@ -13441,6 +13441,7 @@ const yC = {
13441
13441
  facetName: "https://prez.dev/facetName",
13442
13442
  facetValue: "https://prez.dev/facetValue"
13443
13443
  }, Ia = {
13444
+ skosConceptScheme: "http://www.w3.org/2004/02/skos/core#ConceptScheme",
13444
13445
  skosConcept: "http://www.w3.org/2004/02/skos/core#Concept",
13445
13446
  a: "http://www.w3.org/1999/02/22-rdf-syntax-ns#type",
13446
13447
  rdfLangString: "http://www.w3.org/1999/02/22-rdf-syntax-ns#langString",
@@ -13709,7 +13710,7 @@ class bC {
13709
13710
  }
13710
13711
  getMaxReached() {
13711
13712
  const e = this.store.getObjects(null, In.count, null);
13712
- return e.length > 0 ? e[0].value.includes(">") : !1;
13713
+ return e.length > 0 ? !e[0].value.includes(">") : !1;
13713
13714
  }
13714
13715
  /**
13715
13716
  * Returns a list of item objects
@@ -13722,6 +13723,10 @@ class bC {
13722
13723
  e.push(this.toPrezFocusNode(r));
13723
13724
  }), e;
13724
13725
  }
13726
+ getSkosCollections(e) {
13727
+ const r = this.getSubjects("http://www.w3.org/2004/02/skos/core#inScheme", e.value);
13728
+ return this.getSubjects("http://www.w3.org/1999/02/22-rdf-syntax-ns#type", "http://www.w3.org/2004/02/skos/core#Collection").filter((n) => r.find((i) => i.value === n.value)).map((n) => this.toPrezTerm(n)).sort((n, i) => n.label && i.label ? n.label.value.localeCompare(i.label.value) : n.label ? -1 : i.label ? 1 : n.value.localeCompare(i.value));
13729
+ }
13725
13730
  /**
13726
13731
  * Returns an item object
13727
13732
  *
@@ -13733,14 +13738,11 @@ class bC {
13733
13738
  const r = this.getByPrezId();
13734
13739
  if (r.length == 0) throw new Error("Unable to find item");
13735
13740
  const n = this.toPrezFocusNode(r[0]);
13736
- if ((e = n.rdfTypes) != null && e.map((i) => i.value).includes(Ia.skosConcept)) {
13737
- const i = this.getConcepts(r[0]);
13741
+ if ((e = n.rdfTypes) != null && e.map((i) => i.value).includes(Ia.skosConceptScheme)) {
13742
+ const i = this.getSkosCollections(r[0]);
13738
13743
  return {
13739
13744
  ...n,
13740
- topConcepts: {
13741
- narrowers: i,
13742
- hasChildren: i.length > 0
13743
- }
13745
+ collections: i
13744
13746
  };
13745
13747
  }
13746
13748
  return n;
@@ -101,8 +101,8 @@
101
101
  `:`
102
102
  }
103
103
  `),this._subject=null),this._write=this._blockedWrite;let r=e&&((n,i)=>{r=null,e(n,i)});if(this._endStream)try{return this._outputStream.end(r)}catch{}r&&r()}}function oL(t){let e=Rae[t];return e===void 0&&(t.length===1?(e=t.charCodeAt(0).toString(16),e="\\u0000".substr(0,6-e.length)+e):(e=((t.charCodeAt(0)-55296)*1024+t.charCodeAt(1)+9216).toString(16),e="\\U00000000".substr(0,10-e.length)+e)),e}var lL={exports:{}},D3={exports:{}},nn={AggregateError:class extends Error{constructor(t){if(!Array.isArray(t))throw new TypeError(`Expected input to be an Array, got ${typeof t}`);let e="";for(let r=0;r<t.length;r++)e+=` ${t[r].stack}
104
- `;super(e),this.name="AggregateError",this.errors=t}},ArrayIsArray(t){return Array.isArray(t)},ArrayPrototypeIncludes(t,e){return t.includes(e)},ArrayPrototypeIndexOf(t,e){return t.indexOf(e)},ArrayPrototypeJoin(t,e){return t.join(e)},ArrayPrototypeMap(t,e){return t.map(e)},ArrayPrototypePop(t,e){return t.pop(e)},ArrayPrototypePush(t,e){return t.push(e)},ArrayPrototypeSlice(t,e,r){return t.slice(e,r)},Error,FunctionPrototypeCall(t,e,...r){return t.call(e,...r)},FunctionPrototypeSymbolHasInstance(t,e){return Function.prototype[Symbol.hasInstance].call(t,e)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(t,e){return Object.defineProperties(t,e)},ObjectDefineProperty(t,e,r){return Object.defineProperty(t,e,r)},ObjectGetOwnPropertyDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)},ObjectKeys(t){return Object.keys(t)},ObjectSetPrototypeOf(t,e){return Object.setPrototypeOf(t,e)},Promise,PromisePrototypeCatch(t,e){return t.catch(e)},PromisePrototypeThen(t,e,r){return t.then(e,r)},PromiseReject(t){return Promise.reject(t)},PromiseResolve(t){return Promise.resolve(t)},ReflectApply:Reflect.apply,RegExpPrototypeTest(t,e){return t.test(e)},SafeSet:Set,String,StringPrototypeSlice(t,e,r){return t.slice(e,r)},StringPrototypeToLowerCase(t){return t.toLowerCase()},StringPrototypeToUpperCase(t){return t.toUpperCase()},StringPrototypeTrim(t){return t.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(t,e,r){return t.set(e,r)},Boolean,Uint8Array},cL={exports:{}},uL={format(t,...e){return t.replace(/%([sdifj])/g,function(...[r,n]){const i=e.shift();return n==="f"?i.toFixed(6):n==="j"?JSON.stringify(i):n==="s"&&typeof i=="object"?`${i.constructor!==Object?i.constructor.name:""} {}`.trim():i.toString()})},inspect(t){switch(typeof t){case"string":if(t.includes("'"))if(t.includes('"')){if(!t.includes("`")&&!t.includes("${"))return`\`${t}\``}else return`"${t}"`;return`'${t}'`;case"number":return isNaN(t)?"NaN":Object.is(t,-0)?String(t):t;case"bigint":return`${String(t)}n`;case"boolean":case"undefined":return String(t);case"object":return"{}"}}};const{format:Iae,inspect:Dv}=uL,{AggregateError:Mae}=nn,Dae=globalThis.AggregateError||Mae,Oae=Symbol("kIsNodeError"),Bae=["string","function","number","object","Function","Object","boolean","bigint","symbol"],Pae=/^([A-Z][a-z0-9]*)+$/,Nae="__node_internal_",Ov={};function bu(t,e){if(!t)throw new Ov.ERR_INTERNAL_ASSERTION(e)}function hL(t){let e="",r=t.length;const n=t[0]==="-"?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function Fae(t,e,r){if(typeof e=="function")return bu(e.length<=r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${e.length}).`),e(...r);const n=(e.match(/%[dfijoOs]/g)||[]).length;return bu(n===r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${n}).`),r.length===0?e:Iae(e,...r)}function fi(t,e,r){r||(r=Error);class n extends r{constructor(...a){super(Fae(t,e,a))}toString(){return`${this.name} [${t}]: ${this.message}`}}Object.defineProperties(n.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),n.prototype.code=t,n.prototype[Oae]=!0,Ov[t]=n}function dL(t){const e=Nae+t.name;return Object.defineProperty(t,"name",{value:e}),t}function zae(t,e){if(t&&e&&t!==e){if(Array.isArray(e.errors))return e.errors.push(t),e;const r=new Dae([e,t],e.message);return r.code=e.code,r}return t||e}let $ae=class extends Error{constructor(t="The operation was aborted",e=void 0){if(e!==void 0&&typeof e!="object")throw new Ov.ERR_INVALID_ARG_TYPE("options","Object",e);super(t,e),this.code="ABORT_ERR",this.name="AbortError"}};fi("ERR_ASSERTION","%s",Error),fi("ERR_INVALID_ARG_TYPE",(t,e,r)=>{bu(typeof t=="string","'name' must be a string"),Array.isArray(e)||(e=[e]);let n="The ";t.endsWith(" argument")?n+=`${t} `:n+=`"${t}" ${t.includes(".")?"property":"argument"} `,n+="must be ";const i=[],a=[],s=[];for(const l of e)bu(typeof l=="string","All expected entries have to be of type string"),Bae.includes(l)?i.push(l.toLowerCase()):Pae.test(l)?a.push(l):(bu(l!=="object",'The value "object" should be written as "Object"'),s.push(l));if(a.length>0){const l=i.indexOf("object");l!==-1&&(i.splice(i,l,1),a.push("Object"))}if(i.length>0){switch(i.length){case 1:n+=`of type ${i[0]}`;break;case 2:n+=`one of type ${i[0]} or ${i[1]}`;break;default:{const l=i.pop();n+=`one of type ${i.join(", ")}, or ${l}`}}(a.length>0||s.length>0)&&(n+=" or ")}if(a.length>0){switch(a.length){case 1:n+=`an instance of ${a[0]}`;break;case 2:n+=`an instance of ${a[0]} or ${a[1]}`;break;default:{const l=a.pop();n+=`an instance of ${a.join(", ")}, or ${l}`}}s.length>0&&(n+=" or ")}switch(s.length){case 0:break;case 1:s[0].toLowerCase()!==s[0]&&(n+="an "),n+=`${s[0]}`;break;case 2:n+=`one of ${s[0]} or ${s[1]}`;break;default:{const l=s.pop();n+=`one of ${s.join(", ")}, or ${l}`}}if(r==null)n+=`. Received ${r}`;else if(typeof r=="function"&&r.name)n+=`. Received function ${r.name}`;else if(typeof r=="object"){var o;if((o=r.constructor)!==null&&o!==void 0&&o.name)n+=`. Received an instance of ${r.constructor.name}`;else{const l=Dv(r,{depth:-1});n+=`. Received ${l}`}}else{let l=Dv(r,{colors:!1});l.length>25&&(l=`${l.slice(0,25)}...`),n+=`. Received type ${typeof r} (${l})`}return n},TypeError),fi("ERR_INVALID_ARG_VALUE",(t,e,r="is invalid")=>{let n=Dv(e);return n.length>128&&(n=n.slice(0,128)+"..."),`The ${t.includes(".")?"property":"argument"} '${t}' ${r}. Received ${n}`},TypeError),fi("ERR_INVALID_RETURN_VALUE",(t,e,r)=>{var n;const i=r!=null&&(n=r.constructor)!==null&&n!==void 0&&n.name?`instance of ${r.constructor.name}`:`type ${typeof r}`;return`Expected ${t} to be returned from the "${e}" function but got ${i}.`},TypeError),fi("ERR_MISSING_ARGS",(...t)=>{bu(t.length>0,"At least one arg needs to be specified");let e;const r=t.length;switch(t=(Array.isArray(t)?t:[t]).map(n=>`"${n}"`).join(" or "),r){case 1:e+=`The ${t[0]} argument`;break;case 2:e+=`The ${t[0]} and ${t[1]} arguments`;break;default:{const n=t.pop();e+=`The ${t.join(", ")}, and ${n} arguments`}break}return`${e} must be specified`},TypeError),fi("ERR_OUT_OF_RANGE",(t,e,r)=>{bu(e,'Missing "range" argument');let n;if(Number.isInteger(r)&&Math.abs(r)>2**32)n=hL(String(r));else if(typeof r=="bigint"){n=String(r);const i=BigInt(2)**BigInt(32);(r>i||r<-i)&&(n=hL(n)),n+="n"}else n=Dv(r);return`The value of "${t}" is out of range. It must be ${e}. Received ${n}`},RangeError),fi("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),fi("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),fi("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),fi("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),fi("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),fi("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),fi("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),fi("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),fi("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),fi("ERR_STREAM_WRITE_AFTER_END","write after end",Error),fi("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError);var Ui={AbortError:$ae,aggregateTwoErrors:dL(zae),hideStackFrames:dL,codes:Ov},Ap={exports:{}},fL;function Lp(){if(fL)return Ap.exports;fL=1;const{AbortController:t,AbortSignal:e}=typeof self<"u"?self:typeof window<"u"?window:void 0;return Ap.exports=t,Ap.exports.AbortSignal=e,Ap.exports.default=t,Ap.exports}var O3={exports:{}},vd=typeof Reflect=="object"?Reflect:null,pL=vd&&typeof vd.apply=="function"?vd.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)},Bv;vd&&typeof vd.ownKeys=="function"?Bv=vd.ownKeys:Object.getOwnPropertySymbols?Bv=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Bv=function(t){return Object.getOwnPropertyNames(t)};function Vae(t){console&&console.warn&&console.warn(t)}var gL=Number.isNaN||function(t){return t!==t};function Pr(){Pr.init.call(this)}O3.exports=Pr,O3.exports.once=Hae,Pr.EventEmitter=Pr,Pr.prototype._events=void 0,Pr.prototype._eventsCount=0,Pr.prototype._maxListeners=void 0;var mL=10;function Pv(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(Pr,"defaultMaxListeners",{enumerable:!0,get:function(){return mL},set:function(t){if(typeof t!="number"||t<0||gL(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");mL=t}}),Pr.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Pr.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||gL(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function vL(t){return t._maxListeners===void 0?Pr.defaultMaxListeners:t._maxListeners}Pr.prototype.getMaxListeners=function(){return vL(this)},Pr.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var n=t==="error",i=this._events;if(i!==void 0)n=n&&i.error===void 0;else if(!n)return!1;if(n){var a;if(e.length>0&&(a=e[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var o=i[t];if(o===void 0)return!1;if(typeof o=="function")pL(o,this,e);else for(var l=o.length,u=TL(o,l),r=0;r<l;++r)pL(u[r],this,e);return!0};function yL(t,e,r,n){var i,a,s;if(Pv(r),a=t._events,a===void 0?(a=t._events=Object.create(null),t._eventsCount=0):(a.newListener!==void 0&&(t.emit("newListener",e,r.listener?r.listener:r),a=t._events),s=a[e]),s===void 0)s=a[e]=r,++t._eventsCount;else if(typeof s=="function"?s=a[e]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),i=vL(t),i>0&&s.length>i&&!s.warned){s.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=t,o.type=e,o.count=s.length,Vae(o)}return t}Pr.prototype.addListener=function(t,e){return yL(this,t,e,!1)},Pr.prototype.on=Pr.prototype.addListener,Pr.prototype.prependListener=function(t,e){return yL(this,t,e,!0)};function Uae(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function bL(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=Uae.bind(n);return i.listener=r,n.wrapFn=i,i}Pr.prototype.once=function(t,e){return Pv(e),this.on(t,bL(this,t,e)),this},Pr.prototype.prependOnceListener=function(t,e){return Pv(e),this.prependListener(t,bL(this,t,e)),this},Pr.prototype.removeListener=function(t,e){var r,n,i,a,s;if(Pv(e),n=this._events,n===void 0)return this;if(r=n[t],r===void 0)return this;if(r===e||r.listener===e)--this._eventsCount===0?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if(typeof r!="function"){for(i=-1,a=r.length-1;a>=0;a--)if(r[a]===e||r[a].listener===e){s=r[a].listener,i=a;break}if(i<0)return this;i===0?r.shift():Gae(r,i),r.length===1&&(n[t]=r[0]),n.removeListener!==void 0&&this.emit("removeListener",t,s||e)}return this},Pr.prototype.off=Pr.prototype.removeListener,Pr.prototype.removeAllListeners=function(t){var e,r,n;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[t]),this;if(arguments.length===0){var i=Object.keys(r),a;for(n=0;n<i.length;++n)a=i[n],a!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(e=r[t],typeof e=="function")this.removeListener(t,e);else if(e!==void 0)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this};function xL(t,e,r){var n=t._events;if(n===void 0)return[];var i=n[e];return i===void 0?[]:typeof i=="function"?r?[i.listener||i]:[i]:r?Wae(i):TL(i,i.length)}Pr.prototype.listeners=function(t){return xL(this,t,!0)},Pr.prototype.rawListeners=function(t){return xL(this,t,!1)},Pr.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):wL.call(t,e)},Pr.prototype.listenerCount=wL;function wL(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}Pr.prototype.eventNames=function(){return this._eventsCount>0?Bv(this._events):[]};function TL(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function Gae(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function Wae(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}function Hae(t,e){return new Promise(function(r,n){function i(s){t.removeListener(e,a),n(s)}function a(){typeof t.removeListener=="function"&&t.removeListener("error",i),r([].slice.call(arguments))}kL(t,e,a,{once:!0}),e!=="error"&&qae(t,i,{once:!0})})}function qae(t,e,r){typeof t.on=="function"&&kL(t,"error",e,r)}function kL(t,e,r,n){if(typeof t.on=="function")n.once?t.once(e,r):t.on(e,r);else if(typeof t.addEventListener=="function")t.addEventListener(e,function i(a){n.once&&t.removeEventListener(e,i),r(a)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}var Nv=O3.exports;(function(t){const e=co,{format:r,inspect:n}=uL,{codes:{ERR_INVALID_ARG_TYPE:i}}=Ui,{kResistStopPropagation:a,AggregateError:s,SymbolDispose:o}=nn,l=globalThis.AbortSignal||Lp().AbortSignal,u=globalThis.AbortController||Lp().AbortController,h=Object.getPrototypeOf(async function(){}).constructor,d=globalThis.Blob||e.Blob,f=typeof d<"u"?function(m){return m instanceof d}:function(m){return!1},p=(m,v)=>{if(m!==void 0&&(m===null||typeof m!="object"||!("aborted"in m)))throw new i(v,"AbortSignal",m)},g=(m,v)=>{if(typeof m!="function")throw new i(v,"Function",m)};t.exports={AggregateError:s,kEmptyObject:Object.freeze({}),once(m){let v=!1;return function(...y){v||(v=!0,m.apply(this,y))}},createDeferredPromise:function(){let m,v;return{promise:new Promise((y,b)=>{m=y,v=b}),resolve:m,reject:v}},promisify(m){return new Promise((v,y)=>{m((b,...x)=>b?y(b):v(...x))})},debuglog(){return function(){}},format:r,inspect:n,types:{isAsyncFunction(m){return m instanceof h},isArrayBufferView(m){return ArrayBuffer.isView(m)}},isBlob:f,deprecate(m,v){return m},addAbortListener:Nv.addAbortListener||function(m,v){if(m===void 0)throw new i("signal","AbortSignal",m);p(m,"signal"),g(v,"listener");let y;return m.aborted?queueMicrotask(()=>v()):(m.addEventListener("abort",v,{__proto__:null,once:!0,[a]:!0}),y=()=>{m.removeEventListener("abort",v)}),{__proto__:null,[o](){var b;(b=y)===null||b===void 0||b()}}},AbortSignalAny:l.any||function(m){if(m.length===1)return m[0];const v=new u,y=()=>v.abort();return m.forEach(b=>{p(b,"signals"),b.addEventListener("abort",y,{once:!0})}),v.signal.addEventListener("abort",()=>{m.forEach(b=>b.removeEventListener("abort",y))},{once:!0}),v.signal}},t.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")})(cL);var la=cL.exports,B3={};const{ArrayIsArray:EL,ArrayPrototypeIncludes:Yae,ArrayPrototypeJoin:jae,ArrayPrototypeMap:Xae,NumberIsInteger:P3,NumberMAX_SAFE_INTEGER:Kae,NumberMIN_SAFE_INTEGER:Qae,ObjectPrototypeHasOwnProperty:Zae,String:Jae}=nn,{hideStackFrames:ts,codes:{ERR_INVALID_ARG_TYPE:rs,ERR_INVALID_ARG_VALUE:SL,ERR_OUT_OF_RANGE:yd}}=Ui,{normalizeEncoding:mje}=la,{isAsyncFunction:ese,isArrayBufferView:tse}=la.types,rse=ts((t,e,r=Qae,n=Kae)=>{if(typeof t!="number")throw new rs(e,"number",t);if(!P3(t))throw new yd(e,"an integer",t);if(t<r||t>n)throw new yd(e,`>= ${r} && <= ${n}`,t)});ts((t,e,r=-2147483648,n=2147483647)=>{if(typeof t!="number")throw new rs(e,"number",t);if(!P3(t))throw new yd(e,"an integer",t);if(t<r||t>n)throw new yd(e,`>= ${r} && <= ${n}`,t)}),ts((t,e,r=!1)=>{if(typeof t!="number")throw new rs(e,"number",t);if(!P3(t))throw new yd(e,"an integer",t);const n=r?1:0,i=4294967295;if(t<n||t>i)throw new yd(e,`>= ${n} && <= ${i}`,t)}),ts((t,e,r)=>{if(!Yae(r,t)){const n="must be one of: "+jae(Xae(r,i=>typeof i=="string"?`'${i}'`:Jae(i)),", ");throw new SL(e,t,n)}});function nse(t,e){if(typeof t!="boolean")throw new rs(e,"boolean",t)}function N3(t,e,r){return t==null||!Zae(t,e)?r:t[e]}const ise=ts((t,e,r=null)=>{const n=N3(r,"allowArray",!1),i=N3(r,"allowFunction",!1);if(!N3(r,"nullable",!1)&&t===null||!n&&EL(t)||typeof t!="object"&&(!i||typeof t!="function"))throw new rs(e,"Object",t)});ts((t,e)=>{if(t!=null&&typeof t!="object"&&typeof t!="function")throw new rs(e,"a dictionary",t)}),ts((t,e,r=0)=>{if(!EL(t))throw new rs(e,"Array",t);if(t.length<r){const n=`must be longer than ${r}`;throw new SL(e,t,n)}}),ts((t,e="buffer")=>{if(!tse(t))throw new rs(e,["Buffer","TypedArray","DataView"],t)});const ase=ts((t,e)=>{if(t!==void 0&&(t===null||typeof t!="object"||!("aborted"in t)))throw new rs(e,"AbortSignal",t)}),sse=ts((t,e)=>{if(typeof t!="function")throw new rs(e,"Function",t)});ts((t,e)=>{if(typeof t!="function"||ese(t))throw new rs(e,"Function",t)}),ts((t,e)=>{if(t!==void 0)throw new rs(e,"undefined",t)});var Rp={validateBoolean:nse,validateFunction:sse,validateInteger:rse,validateObject:ise,validateAbortSignal:ase},F3={exports:{}},_L={exports:{}},bn=_L.exports={},ho,fo;function z3(){throw new Error("setTimeout has not been defined")}function $3(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?ho=setTimeout:ho=z3}catch{ho=z3}try{typeof clearTimeout=="function"?fo=clearTimeout:fo=$3}catch{fo=$3}})();function CL(t){if(ho===setTimeout)return setTimeout(t,0);if((ho===z3||!ho)&&setTimeout)return ho=setTimeout,setTimeout(t,0);try{return ho(t,0)}catch{try{return ho.call(null,t,0)}catch{return ho.call(this,t,0)}}}function ose(t){if(fo===clearTimeout)return clearTimeout(t);if((fo===$3||!fo)&&clearTimeout)return fo=clearTimeout,clearTimeout(t);try{return fo(t)}catch{try{return fo.call(null,t)}catch{return fo.call(this,t)}}}var ol=[],bd=!1,xu,Fv=-1;function lse(){!bd||!xu||(bd=!1,xu.length?ol=xu.concat(ol):Fv=-1,ol.length&&AL())}function AL(){if(!bd){var t=CL(lse);bd=!0;for(var e=ol.length;e;){for(xu=ol,ol=[];++Fv<e;)xu&&xu[Fv].run();Fv=-1,e=ol.length}xu=null,bd=!1,ose(t)}}bn.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];ol.push(new LL(t,e)),ol.length===1&&!bd&&CL(AL)};function LL(t,e){this.fun=t,this.array=e}LL.prototype.run=function(){this.fun.apply(null,this.array)},bn.title="browser",bn.browser=!0,bn.env={},bn.argv=[],bn.version="",bn.versions={};function ll(){}bn.on=ll,bn.addListener=ll,bn.once=ll,bn.off=ll,bn.removeListener=ll,bn.removeAllListeners=ll,bn.emit=ll,bn.prependListener=ll,bn.prependOnceListener=ll,bn.listeners=function(t){return[]},bn.binding=function(t){throw new Error("process.binding is not supported")},bn.cwd=function(){return"/"},bn.chdir=function(t){throw new Error("process.chdir is not supported")},bn.umask=function(){return 0};var wu=_L.exports;const{SymbolAsyncIterator:RL,SymbolIterator:IL,SymbolFor:Tu}=nn,ML=Tu("nodejs.stream.destroyed"),cse=Tu("nodejs.stream.errored"),DL=Tu("nodejs.stream.readable"),OL=Tu("nodejs.stream.writable"),use=Tu("nodejs.stream.disturbed"),hse=Tu("nodejs.webstream.isClosedPromise"),dse=Tu("nodejs.webstream.controllerErrorFunction");function V3(t,e=!1){var r;return!!(t&&typeof t.pipe=="function"&&typeof t.on=="function"&&(!e||typeof t.pause=="function"&&typeof t.resume=="function")&&(!t._writableState||((r=t._readableState)===null||r===void 0?void 0:r.readable)!==!1)&&(!t._writableState||t._readableState))}function zv(t){var e;return!!(t&&typeof t.write=="function"&&typeof t.on=="function"&&(!t._readableState||((e=t._writableState)===null||e===void 0?void 0:e.writable)!==!1))}function fse(t){return!!(t&&typeof t.pipe=="function"&&t._readableState&&typeof t.on=="function"&&typeof t.write=="function")}function po(t){return t&&(t._readableState||t._writableState||typeof t.write=="function"&&typeof t.on=="function"||typeof t.pipe=="function"&&typeof t.on=="function")}function BL(t){return!!(t&&!po(t)&&typeof t.pipeThrough=="function"&&typeof t.getReader=="function"&&typeof t.cancel=="function")}function PL(t){return!!(t&&!po(t)&&typeof t.getWriter=="function"&&typeof t.abort=="function")}function NL(t){return!!(t&&!po(t)&&typeof t.readable=="object"&&typeof t.writable=="object")}function pse(t){return BL(t)||PL(t)||NL(t)}function gse(t,e){return t==null?!1:e===!0?typeof t[RL]=="function":e===!1?typeof t[IL]=="function":typeof t[RL]=="function"||typeof t[IL]=="function"}function $v(t){if(!po(t))return null;const e=t._writableState,r=t._readableState,n=e||r;return!!(t.destroyed||t[ML]||n!=null&&n.destroyed)}function mse(t){if(!zv(t))return null;if(t.writableEnded===!0)return!0;const e=t._writableState;return e!=null&&e.errored?!1:typeof(e==null?void 0:e.ended)!="boolean"?null:e.ended}function vse(t,e){if(!zv(t))return null;if(t.writableFinished===!0)return!0;const r=t._writableState;return r!=null&&r.errored?!1:typeof(r==null?void 0:r.finished)!="boolean"?null:!!(r.finished||e===!1&&r.ended===!0&&r.length===0)}function FL(t,e){if(!V3(t))return null;const r=t._readableState;return r!=null&&r.errored?!1:typeof(r==null?void 0:r.endEmitted)!="boolean"?null:!!(r.endEmitted||e===!1&&r.ended===!0&&r.length===0)}function zL(t){return t&&t[DL]!=null?t[DL]:typeof(t==null?void 0:t.readable)!="boolean"?null:$v(t)?!1:V3(t)&&t.readable&&!FL(t)}function $L(t){return t&&t[OL]!=null?t[OL]:typeof(t==null?void 0:t.writable)!="boolean"?null:$v(t)?!1:zv(t)&&t.writable&&!mse(t)}function yse(t,e){return po(t)?$v(t)?!0:!((e==null?void 0:e.readable)!==!1&&zL(t)||(e==null?void 0:e.writable)!==!1&&$L(t)):null}function bse(t){var e,r;return po(t)?t.writableErrored?t.writableErrored:(e=(r=t._writableState)===null||r===void 0?void 0:r.errored)!==null&&e!==void 0?e:null:null}function xse(t){var e,r;return po(t)?t.readableErrored?t.readableErrored:(e=(r=t._readableState)===null||r===void 0?void 0:r.errored)!==null&&e!==void 0?e:null:null}function wse(t){if(!po(t))return null;if(typeof t.closed=="boolean")return t.closed;const e=t._writableState,r=t._readableState;return typeof(e==null?void 0:e.closed)=="boolean"||typeof(r==null?void 0:r.closed)=="boolean"?(e==null?void 0:e.closed)||(r==null?void 0:r.closed):typeof t._closed=="boolean"&&VL(t)?t._closed:null}function VL(t){return typeof t._closed=="boolean"&&typeof t._defaultKeepAlive=="boolean"&&typeof t._removedConnection=="boolean"&&typeof t._removedContLen=="boolean"}function Tse(t){return typeof t._sent100=="boolean"&&VL(t)}function kse(t){var e;return typeof t._consuming=="boolean"&&typeof t._dumped=="boolean"&&((e=t.req)===null||e===void 0?void 0:e.upgradeOrConnect)===void 0}function Ese(t){if(!po(t))return null;const e=t._writableState,r=t._readableState,n=e||r;return!n&&Tse(t)||!!(n&&n.autoDestroy&&n.emitClose&&n.closed===!1)}function Sse(t){var e;return!!(t&&((e=t[use])!==null&&e!==void 0?e:t.readableDidRead||t.readableAborted))}function _se(t){var e,r,n,i,a,s,o,l,u,h;return!!(t&&((e=(r=(n=(i=(a=(s=t[cse])!==null&&s!==void 0?s:t.readableErrored)!==null&&a!==void 0?a:t.writableErrored)!==null&&i!==void 0?i:(o=t._readableState)===null||o===void 0?void 0:o.errorEmitted)!==null&&n!==void 0?n:(l=t._writableState)===null||l===void 0?void 0:l.errorEmitted)!==null&&r!==void 0?r:(u=t._readableState)===null||u===void 0?void 0:u.errored)!==null&&e!==void 0?e:!((h=t._writableState)===null||h===void 0)&&h.errored))}var cl={isDestroyed:$v,kIsDestroyed:ML,isDisturbed:Sse,isErrored:_se,isReadable:zL,kIsClosedPromise:hse,kControllerErrorFunction:dse,isClosed:wse,isDuplexNodeStream:fse,isFinished:yse,isIterable:gse,isReadableNodeStream:V3,isReadableStream:BL,isReadableFinished:FL,isReadableErrored:xse,isNodeStream:po,isWebStream:pse,isWritable:$L,isWritableNodeStream:zv,isWritableStream:PL,isWritableFinished:vse,isWritableErrored:bse,isServerRequest:kse,willEmitClose:Ese,isTransformStream:NL};const xd=wu,{AbortError:UL,codes:Cse}=Ui,{ERR_INVALID_ARG_TYPE:Ase,ERR_STREAM_PREMATURE_CLOSE:GL}=Cse,{kEmptyObject:U3,once:G3}=la,{validateAbortSignal:Lse,validateFunction:Rse,validateObject:Ise,validateBoolean:Mse}=Rp,{Promise:Dse,PromisePrototypeThen:Ose,SymbolDispose:WL}=nn,{isClosed:Bse,isReadable:HL,isReadableNodeStream:W3,isReadableStream:Pse,isReadableFinished:qL,isReadableErrored:YL,isWritable:jL,isWritableNodeStream:XL,isWritableStream:Nse,isWritableFinished:KL,isWritableErrored:QL,isNodeStream:Fse,willEmitClose:zse,kIsClosedPromise:$se}=cl;let wd;function Vse(t){return t.setHeader&&typeof t.abort=="function"}const H3=()=>{};function ZL(t,e,r){var n,i;if(arguments.length===2?(r=e,e=U3):e==null?e=U3:Ise(e,"options"),Rse(r,"callback"),Lse(e.signal,"options.signal"),r=G3(r),Pse(t)||Nse(t))return Use(t,e,r);if(!Fse(t))throw new Ase("stream",["ReadableStream","WritableStream","Stream"],t);const a=(n=e.readable)!==null&&n!==void 0?n:W3(t),s=(i=e.writable)!==null&&i!==void 0?i:XL(t),o=t._writableState,l=t._readableState,u=()=>{t.writable||f()};let h=zse(t)&&W3(t)===a&&XL(t)===s,d=KL(t,!1);const f=()=>{d=!0,t.destroyed&&(h=!1),!(h&&(!t.readable||a))&&(!a||p)&&r.call(t)};let p=qL(t,!1);const g=()=>{p=!0,t.destroyed&&(h=!1),!(h&&(!t.writable||s))&&(!s||d)&&r.call(t)},m=E=>{r.call(t,E)};let v=Bse(t);const y=()=>{v=!0;const E=QL(t)||YL(t);if(E&&typeof E!="boolean")return r.call(t,E);if(a&&!p&&W3(t,!0)&&!qL(t,!1))return r.call(t,new GL);if(s&&!d&&!KL(t,!1))return r.call(t,new GL);r.call(t)},b=()=>{v=!0;const E=QL(t)||YL(t);if(E&&typeof E!="boolean")return r.call(t,E);r.call(t)},x=()=>{t.req.on("finish",f)};Vse(t)?(t.on("complete",f),h||t.on("abort",y),t.req?x():t.on("request",x)):s&&!o&&(t.on("end",u),t.on("close",u)),!h&&typeof t.aborted=="boolean"&&t.on("aborted",y),t.on("end",g),t.on("finish",f),e.error!==!1&&t.on("error",m),t.on("close",y),v?xd.nextTick(y):o!=null&&o.errorEmitted||l!=null&&l.errorEmitted?h||xd.nextTick(b):(!a&&(!h||HL(t))&&(d||jL(t)===!1)||!s&&(!h||jL(t))&&(p||HL(t)===!1)||l&&t.req&&t.aborted)&&xd.nextTick(b);const k=()=>{r=H3,t.removeListener("aborted",y),t.removeListener("complete",f),t.removeListener("abort",y),t.removeListener("request",x),t.req&&t.req.removeListener("finish",f),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",f),t.removeListener("end",g),t.removeListener("error",m),t.removeListener("close",y)};if(e.signal&&!v){const E=()=>{const C=r;k(),C.call(t,new UL(void 0,{cause:e.signal.reason}))};if(e.signal.aborted)xd.nextTick(E);else{wd=wd||la.addAbortListener;const C=wd(e.signal,E),S=r;r=G3((...R)=>{C[WL](),S.apply(t,R)})}}return k}function Use(t,e,r){let n=!1,i=H3;if(e.signal)if(i=()=>{n=!0,r.call(t,new UL(void 0,{cause:e.signal.reason}))},e.signal.aborted)xd.nextTick(i);else{wd=wd||la.addAbortListener;const s=wd(e.signal,i),o=r;r=G3((...l)=>{s[WL](),o.apply(t,l)})}const a=(...s)=>{n||xd.nextTick(()=>r.apply(t,s))};return Ose(t[$se].promise,a,a),H3}function Gse(t,e){var r;let n=!1;return e===null&&(e=U3),(r=e)!==null&&r!==void 0&&r.cleanup&&(Mse(e.cleanup,"cleanup"),n=e.cleanup),new Dse((i,a)=>{const s=ZL(t,e,o=>{n&&s(),o?a(o):i()})})}F3.exports=ZL,F3.exports.finished=Gse;var dc=F3.exports;const go=wu,{aggregateTwoErrors:Wse,codes:{ERR_MULTIPLE_CALLBACK:Hse},AbortError:qse}=Ui,{Symbol:JL}=nn,{kIsDestroyed:Yse,isDestroyed:jse,isFinished:Xse,isServerRequest:Kse}=cl,eR=JL("kDestroy"),q3=JL("kConstruct");function tR(t,e,r){t&&(t.stack,e&&!e.errored&&(e.errored=t),r&&!r.errored&&(r.errored=t))}function Qse(t,e){const r=this._readableState,n=this._writableState,i=n||r;return n!=null&&n.destroyed||r!=null&&r.destroyed?(typeof e=="function"&&e(),this):(tR(t,n,r),n&&(n.destroyed=!0),r&&(r.destroyed=!0),i.constructed?rR(this,t,e):this.once(eR,function(a){rR(this,Wse(a,t),e)}),this)}function rR(t,e,r){let n=!1;function i(a){if(n)return;n=!0;const s=t._readableState,o=t._writableState;tR(a,o,s),o&&(o.closed=!0),s&&(s.closed=!0),typeof r=="function"&&r(a),a?go.nextTick(Zse,t,a):go.nextTick(nR,t)}try{t._destroy(e||null,i)}catch(a){i(a)}}function Zse(t,e){Y3(t,e),nR(t)}function nR(t){const e=t._readableState,r=t._writableState;r&&(r.closeEmitted=!0),e&&(e.closeEmitted=!0),(r!=null&&r.emitClose||e!=null&&e.emitClose)&&t.emit("close")}function Y3(t,e){const r=t._readableState,n=t._writableState;n!=null&&n.errorEmitted||r!=null&&r.errorEmitted||(n&&(n.errorEmitted=!0),r&&(r.errorEmitted=!0),t.emit("error",e))}function Jse(){const t=this._readableState,e=this._writableState;t&&(t.constructed=!0,t.closed=!1,t.closeEmitted=!1,t.destroyed=!1,t.errored=null,t.errorEmitted=!1,t.reading=!1,t.ended=t.readable===!1,t.endEmitted=t.readable===!1),e&&(e.constructed=!0,e.destroyed=!1,e.closed=!1,e.closeEmitted=!1,e.errored=null,e.errorEmitted=!1,e.finalCalled=!1,e.prefinished=!1,e.ended=e.writable===!1,e.ending=e.writable===!1,e.finished=e.writable===!1)}function j3(t,e,r){const n=t._readableState,i=t._writableState;if(i!=null&&i.destroyed||n!=null&&n.destroyed)return this;n!=null&&n.autoDestroy||i!=null&&i.autoDestroy?t.destroy(e):e&&(e.stack,i&&!i.errored&&(i.errored=e),n&&!n.errored&&(n.errored=e),r?go.nextTick(Y3,t,e):Y3(t,e))}function eoe(t,e){if(typeof t._construct!="function")return;const r=t._readableState,n=t._writableState;r&&(r.constructed=!1),n&&(n.constructed=!1),t.once(q3,e),!(t.listenerCount(q3)>1)&&go.nextTick(toe,t)}function toe(t){let e=!1;function r(n){if(e){j3(t,n??new Hse);return}e=!0;const i=t._readableState,a=t._writableState,s=a||i;i&&(i.constructed=!0),a&&(a.constructed=!0),s.destroyed?t.emit(eR,n):n?j3(t,n,!0):go.nextTick(roe,t)}try{t._construct(n=>{go.nextTick(r,n)})}catch(n){go.nextTick(r,n)}}function roe(t){t.emit(q3)}function iR(t){return(t==null?void 0:t.setHeader)&&typeof t.abort=="function"}function aR(t){t.emit("close")}function noe(t,e){t.emit("error",e),go.nextTick(aR,t)}function ioe(t,e){!t||jse(t)||(!e&&!Xse(t)&&(e=new qse),Kse(t)?(t.socket=null,t.destroy(e)):iR(t)?t.abort():iR(t.req)?t.req.abort():typeof t.destroy=="function"?t.destroy(e):typeof t.close=="function"?t.close():e?go.nextTick(noe,t,e):go.nextTick(aR,t),t.destroyed||(t[Yse]=!0))}var Td={construct:eoe,destroyer:ioe,destroy:Qse,undestroy:Jse,errorOrDestroy:j3};const{ArrayIsArray:aoe,ObjectSetPrototypeOf:sR}=nn,{EventEmitter:Vv}=Nv;function Uv(t){Vv.call(this,t)}sR(Uv.prototype,Vv.prototype),sR(Uv,Vv),Uv.prototype.pipe=function(t,e){const r=this;function n(h){t.writable&&t.write(h)===!1&&r.pause&&r.pause()}r.on("data",n);function i(){r.readable&&r.resume&&r.resume()}t.on("drain",i),!t._isStdio&&(!e||e.end!==!1)&&(r.on("end",s),r.on("close",o));let a=!1;function s(){a||(a=!0,t.end())}function o(){a||(a=!0,typeof t.destroy=="function"&&t.destroy())}function l(h){u(),Vv.listenerCount(this,"error")===0&&this.emit("error",h)}X3(r,"error",l),X3(t,"error",l);function u(){r.removeListener("data",n),t.removeListener("drain",i),r.removeListener("end",s),r.removeListener("close",o),r.removeListener("error",l),t.removeListener("error",l),r.removeListener("end",u),r.removeListener("close",u),t.removeListener("close",u)}return r.on("end",u),r.on("close",u),t.on("close",u),t.emit("pipe",r),t};function X3(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):aoe(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}var K3={Stream:Uv,prependListener:X3},oR={exports:{}};(function(t){const{SymbolDispose:e}=nn,{AbortError:r,codes:n}=Ui,{isNodeStream:i,isWebStream:a,kControllerErrorFunction:s}=cl,o=dc,{ERR_INVALID_ARG_TYPE:l}=n;let u;const h=(d,f)=>{if(typeof d!="object"||!("aborted"in d))throw new l(f,"AbortSignal",d)};t.exports.addAbortSignal=function(d,f){if(h(d,"signal"),!i(f)&&!a(f))throw new l("stream",["ReadableStream","WritableStream","Stream"],f);return t.exports.addAbortSignalNoValidate(d,f)},t.exports.addAbortSignalNoValidate=function(d,f){if(typeof d!="object"||!("aborted"in d))return f;const p=i(f)?()=>{f.destroy(new r(void 0,{cause:d.reason}))}:()=>{f[s](new r(void 0,{cause:d.reason}))};if(d.aborted)p();else{u=u||la.addAbortListener;const g=u(d,p);o(f,g[e])}return f}})(oR);var Gv=oR.exports;const{StringPrototypeSlice:lR,SymbolIterator:soe,TypedArrayPrototypeSet:Wv,Uint8Array:ooe}=nn,{Buffer:Q3}=co,{inspect:loe}=la;var coe=class{constructor(){this.head=null,this.tail=null,this.length=0}push(t){const e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}unshift(t){const e={data:t,next:this.head};this.length===0&&(this.tail=e),this.head=e,++this.length}shift(){if(this.length===0)return;const t=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,t}clear(){this.head=this.tail=null,this.length=0}join(t){if(this.length===0)return"";let e=this.head,r=""+e.data;for(;(e=e.next)!==null;)r+=t+e.data;return r}concat(t){if(this.length===0)return Q3.alloc(0);const e=Q3.allocUnsafe(t>>>0);let r=this.head,n=0;for(;r;)Wv(e,r.data,n),n+=r.data.length,r=r.next;return e}consume(t,e){const r=this.head.data;if(t<r.length){const n=r.slice(0,t);return this.head.data=r.slice(t),n}return t===r.length?this.shift():e?this._getString(t):this._getBuffer(t)}first(){return this.head.data}*[soe](){for(let t=this.head;t;t=t.next)yield t.data}_getString(t){let e="",r=this.head,n=0;do{const i=r.data;if(t>i.length)e+=i,t-=i.length;else{t===i.length?(e+=i,++n,r.next?this.head=r.next:this.head=this.tail=null):(e+=lR(i,0,t),this.head=r,r.data=lR(i,t));break}++n}while((r=r.next)!==null);return this.length-=n,e}_getBuffer(t){const e=Q3.allocUnsafe(t),r=t;let n=this.head,i=0;do{const a=n.data;if(t>a.length)Wv(e,a,r-t),t-=a.length;else{t===a.length?(Wv(e,a,r-t),++i,n.next?this.head=n.next:this.head=this.tail=null):(Wv(e,new ooe(a.buffer,a.byteOffset,t),r-t),this.head=n,n.data=a.slice(t));break}++i}while((n=n.next)!==null);return this.length-=i,e}[Symbol.for("nodejs.util.inspect.custom")](t,e){return loe(this,{...e,depth:0,customInspect:!1})}};const{MathFloor:uoe,NumberIsInteger:hoe}=nn,{validateInteger:doe}=Rp,{ERR_INVALID_ARG_VALUE:foe}=Ui.codes;let cR=16*1024,uR=16;function poe(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function hR(t){return t?uR:cR}function goe(t,e){doe(e,"value",0),t?uR=e:cR=e}function moe(t,e,r,n){const i=poe(e,n,r);if(i!=null){if(!hoe(i)||i<0){const a=n?`options.${r}`:"options.highWaterMark";throw new foe(a,i)}return uoe(i)}return hR(t.objectMode)}var Hv={getHighWaterMark:moe,getDefaultHighWaterMark:hR,setDefaultHighWaterMark:goe},dR={},Z3={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */(function(t,e){var r=co,n=r.Buffer;function i(s,o){for(var l in s)o[l]=s[l]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(i(r,e),e.Buffer=a);function a(s,o,l){return n(s,o,l)}a.prototype=Object.create(n.prototype),i(n,a),a.from=function(s,o,l){if(typeof s=="number")throw new TypeError("Argument must not be a number");return n(s,o,l)},a.alloc=function(s,o,l){if(typeof s!="number")throw new TypeError("Argument must be a number");var u=n(s);return o!==void 0?typeof l=="string"?u.fill(o,l):u.fill(o):u.fill(0),u},a.allocUnsafe=function(s){if(typeof s!="number")throw new TypeError("Argument must be a number");return n(s)},a.allocUnsafeSlow=function(s){if(typeof s!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(s)}})(Z3,Z3.exports);var voe=Z3.exports,J3=voe.Buffer,fR=J3.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function yoe(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function boe(t){var e=yoe(t);if(typeof e!="string"&&(J3.isEncoding===fR||!fR(t)))throw new Error("Unknown encoding: "+t);return e||t}dR.StringDecoder=Ip;function Ip(t){this.encoding=boe(t);var e;switch(this.encoding){case"utf16le":this.text=Soe,this.end=_oe,e=4;break;case"utf8":this.fillLast=Toe,e=4;break;case"base64":this.text=Coe,this.end=Aoe,e=3;break;default:this.write=Loe,this.end=Roe;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=J3.allocUnsafe(e)}Ip.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},Ip.prototype.end=Eoe,Ip.prototype.text=koe,Ip.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function e5(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function xoe(t,e,r){var n=e.length-1;if(n<r)return 0;var i=e5(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r||i===-2?0:(i=e5(e[n]),i>=0?(i>0&&(t.lastNeed=i-2),i):--n<r||i===-2?0:(i=e5(e[n]),i>=0?(i>0&&(i===2?i=0:t.lastNeed=i-3),i):0))}function woe(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"�"}}function Toe(t){var e=this.lastTotal-this.lastNeed,r=woe(this,t);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function koe(t,e){var r=xoe(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)}function Eoe(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e}function Soe(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function _oe(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function Coe(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function Aoe(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function Loe(t){return t.toString(this.encoding)}function Roe(t){return t&&t.length?this.write(t):""}const pR=wu,{PromisePrototypeThen:Ioe,SymbolAsyncIterator:gR,SymbolIterator:mR}=nn,{Buffer:Moe}=co,{ERR_INVALID_ARG_TYPE:Doe,ERR_STREAM_NULL_VALUES:Ooe}=Ui.codes;function Boe(t,e,r){let n;if(typeof e=="string"||e instanceof Moe)return new t({objectMode:!0,...r,read(){this.push(e),this.push(null)}});let i;if(e&&e[gR])i=!0,n=e[gR]();else if(e&&e[mR])i=!1,n=e[mR]();else throw new Doe("iterable",["Iterable"],e);const a=new t({objectMode:!0,highWaterMark:1,...r});let s=!1;a._read=function(){s||(s=!0,l())},a._destroy=function(u,h){Ioe(o(u),()=>pR.nextTick(h,u),d=>pR.nextTick(h,d||u))};async function o(u){const h=u!=null,d=typeof n.throw=="function";if(h&&d){const{value:f,done:p}=await n.throw(u);if(await f,p)return}if(typeof n.return=="function"){const{value:f}=await n.return();await f}}async function l(){for(;;){try{const{value:u,done:h}=i?await n.next():n.next();if(h)a.push(null);else{const d=u&&typeof u.then=="function"?await u:u;if(d===null)throw s=!1,new Ooe;if(a.push(d))continue;s=!1}}catch(u){a.destroy(u)}break}}return a}var vR=Boe,t5,yR;function qv(){if(yR)return t5;yR=1;const t=wu,{ArrayPrototypeIndexOf:e,NumberIsInteger:r,NumberIsNaN:n,NumberParseInt:i,ObjectDefineProperties:a,ObjectKeys:s,ObjectSetPrototypeOf:o,Promise:l,SafeSet:u,SymbolAsyncDispose:h,SymbolAsyncIterator:d,Symbol:f}=nn;t5=Ne,Ne.ReadableState=We;const{EventEmitter:p}=Nv,{Stream:g,prependListener:m}=K3,{Buffer:v}=co,{addAbortSignal:y}=Gv,b=dc;let x=la.debuglog("stream",ce=>{x=ce});const k=coe,E=Td,{getHighWaterMark:C,getDefaultHighWaterMark:S}=Hv,{aggregateTwoErrors:R,codes:{ERR_INVALID_ARG_TYPE:L,ERR_METHOD_NOT_IMPLEMENTED:I,ERR_OUT_OF_RANGE:_,ERR_STREAM_PUSH_AFTER_EOF:M,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:N},AbortError:A}=Ui,{validateObject:D}=Rp,B=f("kPaused"),{StringDecoder:P}=dR,O=vR;o(Ne.prototype,g.prototype),o(Ne,g);const F=()=>{},{errorOrDestroy:U}=E,$=1,j=2,X=4,ee=8,se=16,ae=32,ge=64,we=128,re=256,te=512,ne=1024,J=2048,q=4096,Q=8192,Z=16384,ke=32768,he=65536,oe=1<<17,Me=1<<18;function xe(ce){return{enumerable:!1,get(){return(this.state&ce)!==0},set(ye){ye?this.state|=ce:this.state&=~ce}}}a(We.prototype,{objectMode:xe($),ended:xe(j),endEmitted:xe(X),reading:xe(ee),constructed:xe(se),sync:xe(ae),needReadable:xe(ge),emittedReadable:xe(we),readableListening:xe(re),resumeScheduled:xe(te),errorEmitted:xe(ne),emitClose:xe(J),autoDestroy:xe(q),destroyed:xe(Q),closed:xe(Z),closeEmitted:xe(ke),multiAwaitDrain:xe(he),readingMore:xe(oe),dataEmitted:xe(Me)});function We(ce,ye,ze){typeof ze!="boolean"&&(ze=ye instanceof ul()),this.state=J|q|se|ae,ce&&ce.objectMode&&(this.state|=$),ze&&ce&&ce.readableObjectMode&&(this.state|=$),this.highWaterMark=ce?C(this,ce,"readableHighWaterMark",ze):S(!1),this.buffer=new k,this.length=0,this.pipes=[],this.flowing=null,this[B]=null,ce&&ce.emitClose===!1&&(this.state&=-2049),ce&&ce.autoDestroy===!1&&(this.state&=-4097),this.errored=null,this.defaultEncoding=ce&&ce.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,ce&&ce.encoding&&(this.decoder=new P(ce.encoding),this.encoding=ce.encoding)}function Ne(ce){if(!(this instanceof Ne))return new Ne(ce);const ye=this instanceof ul();this._readableState=new We(ce,this,ye),ce&&(typeof ce.read=="function"&&(this._read=ce.read),typeof ce.destroy=="function"&&(this._destroy=ce.destroy),typeof ce.construct=="function"&&(this._construct=ce.construct),ce.signal&&!ye&&y(ce.signal,this)),g.call(this,ce),E.construct(this,()=>{this._readableState.needReadable&&Y(this,this._readableState)})}Ne.prototype.destroy=E.destroy,Ne.prototype._undestroy=E.undestroy,Ne.prototype._destroy=function(ce,ye){ye(ce)},Ne.prototype[p.captureRejectionSymbol]=function(ce){this.destroy(ce)},Ne.prototype[h]=function(){let ce;return this.destroyed||(ce=this.readableEnded?null:new A,this.destroy(ce)),new l((ye,ze)=>b(this,Oe=>Oe&&Oe!==ce?ze(Oe):ye(null)))},Ne.prototype.push=function(ce,ye){return Ve(this,ce,ye,!1)},Ne.prototype.unshift=function(ce,ye){return Ve(this,ce,ye,!0)};function Ve(ce,ye,ze,Oe){x("readableAddChunk",ye);const Ke=ce._readableState;let Xe;if((Ke.state&$)===0&&(typeof ye=="string"?(ze=ze||Ke.defaultEncoding,Ke.encoding!==ze&&(Oe&&Ke.encoding?ye=v.from(ye,ze).toString(Ke.encoding):(ye=v.from(ye,ze),ze=""))):ye instanceof v?ze="":g._isUint8Array(ye)?(ye=g._uint8ArrayToBuffer(ye),ze=""):ye!=null&&(Xe=new L("chunk",["string","Buffer","Uint8Array"],ye))),Xe)U(ce,Xe);else if(ye===null)Ke.state&=-9,H(ce,Ke);else if((Ke.state&$)!==0||ye&&ye.length>0)if(Oe)if((Ke.state&X)!==0)U(ce,new N);else{if(Ke.destroyed||Ke.errored)return!1;Be(ce,Ke,ye,!0)}else if(Ke.ended)U(ce,new M);else{if(Ke.destroyed||Ke.errored)return!1;Ke.state&=-9,Ke.decoder&&!ze?(ye=Ke.decoder.write(ye),Ke.objectMode||ye.length!==0?Be(ce,Ke,ye,!1):Y(ce,Ke)):Be(ce,Ke,ye,!1)}else Oe||(Ke.state&=-9,Y(ce,Ke));return!Ke.ended&&(Ke.length<Ke.highWaterMark||Ke.length===0)}function Be(ce,ye,ze,Oe){ye.flowing&&ye.length===0&&!ye.sync&&ce.listenerCount("data")>0?((ye.state&he)!==0?ye.awaitDrainWriters.clear():ye.awaitDrainWriters=null,ye.dataEmitted=!0,ce.emit("data",ze)):(ye.length+=ye.objectMode?1:ze.length,Oe?ye.buffer.unshift(ze):ye.buffer.push(ze),(ye.state&ge)!==0&&G(ce)),Y(ce,ye)}Ne.prototype.isPaused=function(){const ce=this._readableState;return ce[B]===!0||ce.flowing===!1},Ne.prototype.setEncoding=function(ce){const ye=new P(ce);this._readableState.decoder=ye,this._readableState.encoding=this._readableState.decoder.encoding;const ze=this._readableState.buffer;let Oe="";for(const Ke of ze)Oe+=ye.write(Ke);return ze.clear(),Oe!==""&&ze.push(Oe),this._readableState.length=Oe.length,this};const $e=1073741824;function De(ce){if(ce>$e)throw new _("size","<= 1GiB",ce);return ce--,ce|=ce>>>1,ce|=ce>>>2,ce|=ce>>>4,ce|=ce>>>8,ce|=ce>>>16,ce++,ce}function z(ce,ye){return ce<=0||ye.length===0&&ye.ended?0:(ye.state&$)!==0?1:n(ce)?ye.flowing&&ye.length?ye.buffer.first().length:ye.length:ce<=ye.length?ce:ye.ended?ye.length:0}Ne.prototype.read=function(ce){x("read",ce),ce===void 0?ce=NaN:r(ce)||(ce=i(ce,10));const ye=this._readableState,ze=ce;if(ce>ye.highWaterMark&&(ye.highWaterMark=De(ce)),ce!==0&&(ye.state&=-129),ce===0&&ye.needReadable&&((ye.highWaterMark!==0?ye.length>=ye.highWaterMark:ye.length>0)||ye.ended))return x("read: emitReadable",ye.length,ye.ended),ye.length===0&&ye.ended?rt(this):G(this),null;if(ce=z(ce,ye),ce===0&&ye.ended)return ye.length===0&&rt(this),null;let Oe=(ye.state&ge)!==0;if(x("need readable",Oe),(ye.length===0||ye.length-ce<ye.highWaterMark)&&(Oe=!0,x("length less than watermark",Oe)),ye.ended||ye.reading||ye.destroyed||ye.errored||!ye.constructed)Oe=!1,x("reading, ended or constructing",Oe);else if(Oe){x("do read"),ye.state|=ee|ae,ye.length===0&&(ye.state|=ge);try{this._read(ye.highWaterMark)}catch(Xe){U(this,Xe)}ye.state&=-33,ye.reading||(ce=z(ze,ye))}let Ke;return ce>0?Ke=je(ce,ye):Ke=null,Ke===null?(ye.needReadable=ye.length<=ye.highWaterMark,ce=0):(ye.length-=ce,ye.multiAwaitDrain?ye.awaitDrainWriters.clear():ye.awaitDrainWriters=null),ye.length===0&&(ye.ended||(ye.needReadable=!0),ze!==ce&&ye.ended&&rt(this)),Ke!==null&&!ye.errorEmitted&&!ye.closeEmitted&&(ye.dataEmitted=!0,this.emit("data",Ke)),Ke};function H(ce,ye){if(x("onEofChunk"),!ye.ended){if(ye.decoder){const ze=ye.decoder.end();ze&&ze.length&&(ye.buffer.push(ze),ye.length+=ye.objectMode?1:ze.length)}ye.ended=!0,ye.sync?G(ce):(ye.needReadable=!1,ye.emittedReadable=!0,pe(ce))}}function G(ce){const ye=ce._readableState;x("emitReadable",ye.needReadable,ye.emittedReadable),ye.needReadable=!1,ye.emittedReadable||(x("emitReadable",ye.flowing),ye.emittedReadable=!0,t.nextTick(pe,ce))}function pe(ce){const ye=ce._readableState;x("emitReadable_",ye.destroyed,ye.length,ye.ended),!ye.destroyed&&!ye.errored&&(ye.length||ye.ended)&&(ce.emit("readable"),ye.emittedReadable=!1),ye.needReadable=!ye.flowing&&!ye.ended&&ye.length<=ye.highWaterMark,Se(ce)}function Y(ce,ye){!ye.readingMore&&ye.constructed&&(ye.readingMore=!0,t.nextTick(ie,ce,ye))}function ie(ce,ye){for(;!ye.reading&&!ye.ended&&(ye.length<ye.highWaterMark||ye.flowing&&ye.length===0);){const ze=ye.length;if(x("maybeReadMore read 0"),ce.read(0),ze===ye.length)break}ye.readingMore=!1}Ne.prototype._read=function(ce){throw new I("_read()")},Ne.prototype.pipe=function(ce,ye){const ze=this,Oe=this._readableState;Oe.pipes.length===1&&(Oe.multiAwaitDrain||(Oe.multiAwaitDrain=!0,Oe.awaitDrainWriters=new u(Oe.awaitDrainWriters?[Oe.awaitDrainWriters]:[]))),Oe.pipes.push(ce),x("pipe count=%d opts=%j",Oe.pipes.length,ye);const Ke=(!ye||ye.end!==!1)&&ce!==t.stdout&&ce!==t.stderr?Je:Zt;Oe.endEmitted?t.nextTick(Ke):ze.once("end",Ke),ce.on("unpipe",Xe);function Xe(zt,vr){x("onunpipe"),zt===ze&&vr&&vr.hasUnpiped===!1&&(vr.hasUnpiped=!0,ft())}function Je(){x("onend"),ce.end()}let ut,ht=!1;function ft(){x("cleanup"),ce.removeListener("close",cr),ce.removeListener("finish",tr),ut&&ce.removeListener("drain",ut),ce.removeListener("error",At),ce.removeListener("unpipe",Xe),ze.removeListener("end",Je),ze.removeListener("end",Zt),ze.removeListener("data",ar),ht=!0,ut&&Oe.awaitDrainWriters&&(!ce._writableState||ce._writableState.needDrain)&&ut()}function mt(){ht||(Oe.pipes.length===1&&Oe.pipes[0]===ce?(x("false write response, pause",0),Oe.awaitDrainWriters=ce,Oe.multiAwaitDrain=!1):Oe.pipes.length>1&&Oe.pipes.includes(ce)&&(x("false write response, pause",Oe.awaitDrainWriters.size),Oe.awaitDrainWriters.add(ce)),ze.pause()),ut||(ut=V(ze,ce),ce.on("drain",ut))}ze.on("data",ar);function ar(zt){x("ondata");const vr=ce.write(zt);x("dest.write",vr),vr===!1&&mt()}function At(zt){if(x("onerror",zt),Zt(),ce.removeListener("error",At),ce.listenerCount("error")===0){const vr=ce._writableState||ce._readableState;vr&&!vr.errorEmitted?U(ce,zt):ce.emit("error",zt)}}m(ce,"error",At);function cr(){ce.removeListener("finish",tr),Zt()}ce.once("close",cr);function tr(){x("onfinish"),ce.removeListener("close",cr),Zt()}ce.once("finish",tr);function Zt(){x("unpipe"),ze.unpipe(ce)}return ce.emit("pipe",ze),ce.writableNeedDrain===!0?mt():Oe.flowing||(x("pipe resume"),ze.resume()),ce};function V(ce,ye){return function(){const ze=ce._readableState;ze.awaitDrainWriters===ye?(x("pipeOnDrain",1),ze.awaitDrainWriters=null):ze.multiAwaitDrain&&(x("pipeOnDrain",ze.awaitDrainWriters.size),ze.awaitDrainWriters.delete(ye)),(!ze.awaitDrainWriters||ze.awaitDrainWriters.size===0)&&ce.listenerCount("data")&&ce.resume()}}Ne.prototype.unpipe=function(ce){const ye=this._readableState,ze={hasUnpiped:!1};if(ye.pipes.length===0)return this;if(!ce){const Ke=ye.pipes;ye.pipes=[],this.pause();for(let Xe=0;Xe<Ke.length;Xe++)Ke[Xe].emit("unpipe",this,{hasUnpiped:!1});return this}const Oe=e(ye.pipes,ce);return Oe===-1?this:(ye.pipes.splice(Oe,1),ye.pipes.length===0&&this.pause(),ce.emit("unpipe",this,ze),this)},Ne.prototype.on=function(ce,ye){const ze=g.prototype.on.call(this,ce,ye),Oe=this._readableState;return ce==="data"?(Oe.readableListening=this.listenerCount("readable")>0,Oe.flowing!==!1&&this.resume()):ce==="readable"&&!Oe.endEmitted&&!Oe.readableListening&&(Oe.readableListening=Oe.needReadable=!0,Oe.flowing=!1,Oe.emittedReadable=!1,x("on readable",Oe.length,Oe.reading),Oe.length?G(this):Oe.reading||t.nextTick(ue,this)),ze},Ne.prototype.addListener=Ne.prototype.on,Ne.prototype.removeListener=function(ce,ye){const ze=g.prototype.removeListener.call(this,ce,ye);return ce==="readable"&&t.nextTick(de,this),ze},Ne.prototype.off=Ne.prototype.removeListener,Ne.prototype.removeAllListeners=function(ce){const ye=g.prototype.removeAllListeners.apply(this,arguments);return(ce==="readable"||ce===void 0)&&t.nextTick(de,this),ye};function de(ce){const ye=ce._readableState;ye.readableListening=ce.listenerCount("readable")>0,ye.resumeScheduled&&ye[B]===!1?ye.flowing=!0:ce.listenerCount("data")>0?ce.resume():ye.readableListening||(ye.flowing=null)}function ue(ce){x("readable nexttick read 0"),ce.read(0)}Ne.prototype.resume=function(){const ce=this._readableState;return ce.flowing||(x("resume"),ce.flowing=!ce.readableListening,be(this,ce)),ce[B]=!1,this};function be(ce,ye){ye.resumeScheduled||(ye.resumeScheduled=!0,t.nextTick(ve,ce,ye))}function ve(ce,ye){x("resume",ye.reading),ye.reading||ce.read(0),ye.resumeScheduled=!1,ce.emit("resume"),Se(ce),ye.flowing&&!ye.reading&&ce.read(0)}Ne.prototype.pause=function(){return x("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(x("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[B]=!0,this};function Se(ce){const ye=ce._readableState;for(x("flow",ye.flowing);ye.flowing&&ce.read()!==null;);}Ne.prototype.wrap=function(ce){let ye=!1;ce.on("data",Oe=>{!this.push(Oe)&&ce.pause&&(ye=!0,ce.pause())}),ce.on("end",()=>{this.push(null)}),ce.on("error",Oe=>{U(this,Oe)}),ce.on("close",()=>{this.destroy()}),ce.on("destroy",()=>{this.destroy()}),this._read=()=>{ye&&ce.resume&&(ye=!1,ce.resume())};const ze=s(ce);for(let Oe=1;Oe<ze.length;Oe++){const Ke=ze[Oe];this[Ke]===void 0&&typeof ce[Ke]=="function"&&(this[Ke]=ce[Ke].bind(ce))}return this},Ne.prototype[d]=function(){return Re(this)},Ne.prototype.iterator=function(ce){return ce!==void 0&&D(ce,"options"),Re(this,ce)};function Re(ce,ye){typeof ce.read!="function"&&(ce=Ne.wrap(ce,{objectMode:!0}));const ze=Le(ce,ye);return ze.stream=ce,ze}async function*Le(ce,ye){let ze=F;function Oe(Je){this===ce?(ze(),ze=F):ze=Je}ce.on("readable",Oe);let Ke;const Xe=b(ce,{writable:!1},Je=>{Ke=Je?R(Ke,Je):null,ze(),ze=F});try{for(;;){const Je=ce.destroyed?null:ce.read();if(Je!==null)yield Je;else{if(Ke)throw Ke;if(Ke===null)return;await new l(Oe)}}}catch(Je){throw Ke=R(Ke,Je),Ke}finally{(Ke||(ye==null?void 0:ye.destroyOnReturn)!==!1)&&(Ke===void 0||ce._readableState.autoDestroy)?E.destroyer(ce,null):(ce.off("readable",Oe),Xe())}}a(Ne.prototype,{readable:{__proto__:null,get(){const ce=this._readableState;return!!ce&&ce.readable!==!1&&!ce.destroyed&&!ce.errorEmitted&&!ce.endEmitted},set(ce){this._readableState&&(this._readableState.readable=!!ce)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(ce){this._readableState&&(this._readableState.flowing=ce)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(ce){this._readableState&&(this._readableState.destroyed=ce)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),a(We.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[B]!==!1},set(ce){this[B]=!!ce}}}),Ne._fromList=je;function je(ce,ye){if(ye.length===0)return null;let ze;return ye.objectMode?ze=ye.buffer.shift():!ce||ce>=ye.length?(ye.decoder?ze=ye.buffer.join(""):ye.buffer.length===1?ze=ye.buffer.first():ze=ye.buffer.concat(ye.length),ye.buffer.clear()):ze=ye.buffer.consume(ce,ye.decoder),ze}function rt(ce){const ye=ce._readableState;x("endReadable",ye.endEmitted),ye.endEmitted||(ye.ended=!0,t.nextTick(Qe,ye,ce))}function Qe(ce,ye){if(x("endReadableNT",ce.endEmitted,ce.length),!ce.errored&&!ce.closeEmitted&&!ce.endEmitted&&ce.length===0){if(ce.endEmitted=!0,ye.emit("end"),ye.writable&&ye.allowHalfOpen===!1)t.nextTick(et,ye);else if(ce.autoDestroy){const ze=ye._writableState;(!ze||ze.autoDestroy&&(ze.finished||ze.writable===!1))&&ye.destroy()}}}function et(ce){ce.writable&&!ce.writableEnded&&!ce.destroyed&&ce.end()}Ne.from=function(ce,ye){return O(Ne,ce,ye)};let tt;function He(){return tt===void 0&&(tt={}),tt}return Ne.fromWeb=function(ce,ye){return He().newStreamReadableFromReadableStream(ce,ye)},Ne.toWeb=function(ce,ye){return He().newReadableStreamFromStreamReadable(ce,ye)},Ne.wrap=function(ce,ye){var ze,Oe;return new Ne({objectMode:(ze=(Oe=ce.readableObjectMode)!==null&&Oe!==void 0?Oe:ce.objectMode)!==null&&ze!==void 0?ze:!0,...ye,destroy(Ke,Xe){E.destroyer(ce,Ke),Xe(Ke)}}).wrap(ce)},t5}var r5,bR;function n5(){if(bR)return r5;bR=1;const t=wu,{ArrayPrototypeSlice:e,Error:r,FunctionPrototypeSymbolHasInstance:n,ObjectDefineProperty:i,ObjectDefineProperties:a,ObjectSetPrototypeOf:s,StringPrototypeToLowerCase:o,Symbol:l,SymbolHasInstance:u}=nn;r5=D,D.WritableState=N;const{EventEmitter:h}=Nv,d=K3.Stream,{Buffer:f}=co,p=Td,{addAbortSignal:g}=Gv,{getHighWaterMark:m,getDefaultHighWaterMark:v}=Hv,{ERR_INVALID_ARG_TYPE:y,ERR_METHOD_NOT_IMPLEMENTED:b,ERR_MULTIPLE_CALLBACK:x,ERR_STREAM_CANNOT_PIPE:k,ERR_STREAM_DESTROYED:E,ERR_STREAM_ALREADY_FINISHED:C,ERR_STREAM_NULL_VALUES:S,ERR_STREAM_WRITE_AFTER_END:R,ERR_UNKNOWN_ENCODING:L}=Ui.codes,{errorOrDestroy:I}=p;s(D.prototype,d.prototype),s(D,d);function _(){}const M=l("kOnFinished");function N(q,Q,Z){typeof Z!="boolean"&&(Z=Q instanceof ul()),this.objectMode=!!(q&&q.objectMode),Z&&(this.objectMode=this.objectMode||!!(q&&q.writableObjectMode)),this.highWaterMark=q?m(this,q,"writableHighWaterMark",Z):v(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const ke=!!(q&&q.decodeStrings===!1);this.decodeStrings=!ke,this.defaultEncoding=q&&q.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=U.bind(void 0,Q),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,A(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!q||q.emitClose!==!1,this.autoDestroy=!q||q.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[M]=[]}function A(q){q.buffered=[],q.bufferedIndex=0,q.allBuffers=!0,q.allNoop=!0}N.prototype.getBuffer=function(){return e(this.buffered,this.bufferedIndex)},i(N.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function D(q){const Q=this instanceof ul();if(!Q&&!n(D,this))return new D(q);this._writableState=new N(q,this,Q),q&&(typeof q.write=="function"&&(this._write=q.write),typeof q.writev=="function"&&(this._writev=q.writev),typeof q.destroy=="function"&&(this._destroy=q.destroy),typeof q.final=="function"&&(this._final=q.final),typeof q.construct=="function"&&(this._construct=q.construct),q.signal&&g(q.signal,this)),d.call(this,q),p.construct(this,()=>{const Z=this._writableState;Z.writing||ee(this,Z),we(this,Z)})}i(D,u,{__proto__:null,value:function(q){return n(this,q)?!0:this!==D?!1:q&&q._writableState instanceof N}}),D.prototype.pipe=function(){I(this,new k)};function B(q,Q,Z,ke){const he=q._writableState;if(typeof Z=="function")ke=Z,Z=he.defaultEncoding;else{if(!Z)Z=he.defaultEncoding;else if(Z!=="buffer"&&!f.isEncoding(Z))throw new L(Z);typeof ke!="function"&&(ke=_)}if(Q===null)throw new S;if(!he.objectMode)if(typeof Q=="string")he.decodeStrings!==!1&&(Q=f.from(Q,Z),Z="buffer");else if(Q instanceof f)Z="buffer";else if(d._isUint8Array(Q))Q=d._uint8ArrayToBuffer(Q),Z="buffer";else throw new y("chunk",["string","Buffer","Uint8Array"],Q);let oe;return he.ending?oe=new R:he.destroyed&&(oe=new E("write")),oe?(t.nextTick(ke,oe),I(q,oe,!0),oe):(he.pendingcb++,P(q,he,Q,Z,ke))}D.prototype.write=function(q,Q,Z){return B(this,q,Q,Z)===!0},D.prototype.cork=function(){this._writableState.corked++},D.prototype.uncork=function(){const q=this._writableState;q.corked&&(q.corked--,q.writing||ee(this,q))},D.prototype.setDefaultEncoding=function(q){if(typeof q=="string"&&(q=o(q)),!f.isEncoding(q))throw new L(q);return this._writableState.defaultEncoding=q,this};function P(q,Q,Z,ke,he){const oe=Q.objectMode?1:Z.length;Q.length+=oe;const Me=Q.length<Q.highWaterMark;return Me||(Q.needDrain=!0),Q.writing||Q.corked||Q.errored||!Q.constructed?(Q.buffered.push({chunk:Z,encoding:ke,callback:he}),Q.allBuffers&&ke!=="buffer"&&(Q.allBuffers=!1),Q.allNoop&&he!==_&&(Q.allNoop=!1)):(Q.writelen=oe,Q.writecb=he,Q.writing=!0,Q.sync=!0,q._write(Z,ke,Q.onwrite),Q.sync=!1),Me&&!Q.errored&&!Q.destroyed}function O(q,Q,Z,ke,he,oe,Me){Q.writelen=ke,Q.writecb=Me,Q.writing=!0,Q.sync=!0,Q.destroyed?Q.onwrite(new E("write")):Z?q._writev(he,Q.onwrite):q._write(he,oe,Q.onwrite),Q.sync=!1}function F(q,Q,Z,ke){--Q.pendingcb,ke(Z),X(Q),I(q,Z)}function U(q,Q){const Z=q._writableState,ke=Z.sync,he=Z.writecb;if(typeof he!="function"){I(q,new x);return}Z.writing=!1,Z.writecb=null,Z.length-=Z.writelen,Z.writelen=0,Q?(Q.stack,Z.errored||(Z.errored=Q),q._readableState&&!q._readableState.errored&&(q._readableState.errored=Q),ke?t.nextTick(F,q,Z,Q,he):F(q,Z,Q,he)):(Z.buffered.length>Z.bufferedIndex&&ee(q,Z),ke?Z.afterWriteTickInfo!==null&&Z.afterWriteTickInfo.cb===he?Z.afterWriteTickInfo.count++:(Z.afterWriteTickInfo={count:1,cb:he,stream:q,state:Z},t.nextTick($,Z.afterWriteTickInfo)):j(q,Z,1,he))}function $({stream:q,state:Q,count:Z,cb:ke}){return Q.afterWriteTickInfo=null,j(q,Q,Z,ke)}function j(q,Q,Z,ke){for(!Q.ending&&!q.destroyed&&Q.length===0&&Q.needDrain&&(Q.needDrain=!1,q.emit("drain"));Z-- >0;)Q.pendingcb--,ke();Q.destroyed&&X(Q),we(q,Q)}function X(q){if(q.writing)return;for(let he=q.bufferedIndex;he<q.buffered.length;++he){var Q;const{chunk:oe,callback:Me}=q.buffered[he],xe=q.objectMode?1:oe.length;q.length-=xe,Me((Q=q.errored)!==null&&Q!==void 0?Q:new E("write"))}const Z=q[M].splice(0);for(let he=0;he<Z.length;he++){var ke;Z[he]((ke=q.errored)!==null&&ke!==void 0?ke:new E("end"))}A(q)}function ee(q,Q){if(Q.corked||Q.bufferProcessing||Q.destroyed||!Q.constructed)return;const{buffered:Z,bufferedIndex:ke,objectMode:he}=Q,oe=Z.length-ke;if(!oe)return;let Me=ke;if(Q.bufferProcessing=!0,oe>1&&q._writev){Q.pendingcb-=oe-1;const xe=Q.allNoop?_:Ne=>{for(let Ve=Me;Ve<Z.length;++Ve)Z[Ve].callback(Ne)},We=Q.allNoop&&Me===0?Z:e(Z,Me);We.allBuffers=Q.allBuffers,O(q,Q,!0,Q.length,We,"",xe),A(Q)}else{do{const{chunk:xe,encoding:We,callback:Ne}=Z[Me];Z[Me++]=null;const Ve=he?1:xe.length;O(q,Q,!1,Ve,xe,We,Ne)}while(Me<Z.length&&!Q.writing);Me===Z.length?A(Q):Me>256?(Z.splice(0,Me),Q.bufferedIndex=0):Q.bufferedIndex=Me}Q.bufferProcessing=!1}D.prototype._write=function(q,Q,Z){if(this._writev)this._writev([{chunk:q,encoding:Q}],Z);else throw new b("_write()")},D.prototype._writev=null,D.prototype.end=function(q,Q,Z){const ke=this._writableState;typeof q=="function"?(Z=q,q=null,Q=null):typeof Q=="function"&&(Z=Q,Q=null);let he;if(q!=null){const oe=B(this,q,Q);oe instanceof r&&(he=oe)}return ke.corked&&(ke.corked=1,this.uncork()),he||(!ke.errored&&!ke.ending?(ke.ending=!0,we(this,ke,!0),ke.ended=!0):ke.finished?he=new C("end"):ke.destroyed&&(he=new E("end"))),typeof Z=="function"&&(he||ke.finished?t.nextTick(Z,he):ke[M].push(Z)),this};function se(q){return q.ending&&!q.destroyed&&q.constructed&&q.length===0&&!q.errored&&q.buffered.length===0&&!q.finished&&!q.writing&&!q.errorEmitted&&!q.closeEmitted}function ae(q,Q){let Z=!1;function ke(he){if(Z){I(q,he??x());return}if(Z=!0,Q.pendingcb--,he){const oe=Q[M].splice(0);for(let Me=0;Me<oe.length;Me++)oe[Me](he);I(q,he,Q.sync)}else se(Q)&&(Q.prefinished=!0,q.emit("prefinish"),Q.pendingcb++,t.nextTick(re,q,Q))}Q.sync=!0,Q.pendingcb++;try{q._final(ke)}catch(he){ke(he)}Q.sync=!1}function ge(q,Q){!Q.prefinished&&!Q.finalCalled&&(typeof q._final=="function"&&!Q.destroyed?(Q.finalCalled=!0,ae(q,Q)):(Q.prefinished=!0,q.emit("prefinish")))}function we(q,Q,Z){se(Q)&&(ge(q,Q),Q.pendingcb===0&&(Z?(Q.pendingcb++,t.nextTick((ke,he)=>{se(he)?re(ke,he):he.pendingcb--},q,Q)):se(Q)&&(Q.pendingcb++,re(q,Q))))}function re(q,Q){Q.pendingcb--,Q.finished=!0;const Z=Q[M].splice(0);for(let ke=0;ke<Z.length;ke++)Z[ke]();if(q.emit("finish"),Q.autoDestroy){const ke=q._readableState;(!ke||ke.autoDestroy&&(ke.endEmitted||ke.readable===!1))&&q.destroy()}}a(D.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(q){this._writableState&&(this._writableState.destroyed=q)}},writable:{__proto__:null,get(){const q=this._writableState;return!!q&&q.writable!==!1&&!q.destroyed&&!q.errored&&!q.ending&&!q.ended},set(q){this._writableState&&(this._writableState.writable=!!q)}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){const q=this._writableState;return q?!q.destroyed&&!q.ending&&q.needDrain:!1}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});const te=p.destroy;D.prototype.destroy=function(q,Q){const Z=this._writableState;return!Z.destroyed&&(Z.bufferedIndex<Z.buffered.length||Z[M].length)&&t.nextTick(X,Z),te.call(this,q,Q),this},D.prototype._undestroy=p.undestroy,D.prototype._destroy=function(q,Q){Q(q)},D.prototype[h.captureRejectionSymbol]=function(q){this.destroy(q)};let ne;function J(){return ne===void 0&&(ne={}),ne}return D.fromWeb=function(q,Q){return J().newStreamWritableFromWritableStream(q,Q)},D.toWeb=function(q){return J().newWritableStreamFromStreamWritable(q)},r5}var i5,xR;function Poe(){if(xR)return i5;xR=1;const t=wu,e=co,{isReadable:r,isWritable:n,isIterable:i,isNodeStream:a,isReadableNodeStream:s,isWritableNodeStream:o,isDuplexNodeStream:l,isReadableStream:u,isWritableStream:h}=cl,d=dc,{AbortError:f,codes:{ERR_INVALID_ARG_TYPE:p,ERR_INVALID_RETURN_VALUE:g}}=Ui,{destroyer:m}=Td,v=ul(),y=qv(),b=n5(),{createDeferredPromise:x}=la,k=vR,E=globalThis.Blob||e.Blob,C=typeof E<"u"?function(M){return M instanceof E}:function(M){return!1},S=globalThis.AbortController||Lp().AbortController,{FunctionPrototypeCall:R}=nn;class L extends v{constructor(N){super(N),(N==null?void 0:N.readable)===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),(N==null?void 0:N.writable)===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}i5=function M(N,A){if(l(N))return N;if(s(N))return _({readable:N});if(o(N))return _({writable:N});if(a(N))return _({writable:!1,readable:!1});if(u(N))return _({readable:y.fromWeb(N)});if(h(N))return _({writable:b.fromWeb(N)});if(typeof N=="function"){const{value:B,write:P,final:O,destroy:F}=I(N);if(i(B))return k(L,B,{objectMode:!0,write:P,final:O,destroy:F});const U=B==null?void 0:B.then;if(typeof U=="function"){let $;const j=R(U,B,X=>{if(X!=null)throw new g("nully","body",X)},X=>{m($,X)});return $=new L({objectMode:!0,readable:!1,write:P,final(X){O(async()=>{try{await j,t.nextTick(X,null)}catch(ee){t.nextTick(X,ee)}})},destroy:F})}throw new g("Iterable, AsyncIterable or AsyncFunction",A,B)}if(C(N))return M(N.arrayBuffer());if(i(N))return k(L,N,{objectMode:!0,writable:!1});if(u(N==null?void 0:N.readable)&&h(N==null?void 0:N.writable))return L.fromWeb(N);if(typeof(N==null?void 0:N.writable)=="object"||typeof(N==null?void 0:N.readable)=="object"){const B=N!=null&&N.readable?s(N==null?void 0:N.readable)?N==null?void 0:N.readable:M(N.readable):void 0,P=N!=null&&N.writable?o(N==null?void 0:N.writable)?N==null?void 0:N.writable:M(N.writable):void 0;return _({readable:B,writable:P})}const D=N==null?void 0:N.then;if(typeof D=="function"){let B;return R(D,N,P=>{P!=null&&B.push(P),B.push(null)},P=>{m(B,P)}),B=new L({objectMode:!0,writable:!1,read(){}})}throw new p(A,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],N)};function I(M){let{promise:N,resolve:A}=x();const D=new S,B=D.signal;return{value:M(async function*(){for(;;){const P=N;N=null;const{chunk:O,done:F,cb:U}=await P;if(t.nextTick(U),F)return;if(B.aborted)throw new f(void 0,{cause:B.reason});({promise:N,resolve:A}=x()),yield O}}(),{signal:B}),write(P,O,F){const U=A;A=null,U({chunk:P,done:!1,cb:F})},final(P){const O=A;A=null,O({done:!0,cb:P})},destroy(P,O){D.abort(),O(P)}}}function _(M){const N=M.readable&&typeof M.readable.read!="function"?y.wrap(M.readable):M.readable,A=M.writable;let D=!!r(N),B=!!n(A),P,O,F,U,$;function j(X){const ee=U;U=null,ee?ee(X):X&&$.destroy(X)}return $=new L({readableObjectMode:!!(N!=null&&N.readableObjectMode),writableObjectMode:!!(A!=null&&A.writableObjectMode),readable:D,writable:B}),B&&(d(A,X=>{B=!1,X&&m(N,X),j(X)}),$._write=function(X,ee,se){A.write(X,ee)?se():P=se},$._final=function(X){A.end(),O=X},A.on("drain",function(){if(P){const X=P;P=null,X()}}),A.on("finish",function(){if(O){const X=O;O=null,X()}})),D&&(d(N,X=>{D=!1,X&&m(N,X),j(X)}),N.on("readable",function(){if(F){const X=F;F=null,X()}}),N.on("end",function(){$.push(null)}),$._read=function(){for(;;){const X=N.read();if(X===null){F=$._read;return}if(!$.push(X))return}}),$._destroy=function(X,ee){!X&&U!==null&&(X=new f),F=null,P=null,O=null,U===null?ee(X):(U=ee,m(A,X),m(N,X))},$}return i5}var a5,wR;function ul(){if(wR)return a5;wR=1;const{ObjectDefineProperties:t,ObjectGetOwnPropertyDescriptor:e,ObjectKeys:r,ObjectSetPrototypeOf:n}=nn;a5=s;const i=qv(),a=n5();n(s.prototype,i.prototype),n(s,i);{const h=r(a.prototype);for(let d=0;d<h.length;d++){const f=h[d];s.prototype[f]||(s.prototype[f]=a.prototype[f])}}function s(h){if(!(this instanceof s))return new s(h);i.call(this,h),a.call(this,h),h?(this.allowHalfOpen=h.allowHalfOpen!==!1,h.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),h.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}t(s.prototype,{writable:{__proto__:null,...e(a.prototype,"writable")},writableHighWaterMark:{__proto__:null,...e(a.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...e(a.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...e(a.prototype,"writableBuffer")},writableLength:{__proto__:null,...e(a.prototype,"writableLength")},writableFinished:{__proto__:null,...e(a.prototype,"writableFinished")},writableCorked:{__proto__:null,...e(a.prototype,"writableCorked")},writableEnded:{__proto__:null,...e(a.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...e(a.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(h){this._readableState&&this._writableState&&(this._readableState.destroyed=h,this._writableState.destroyed=h)}}});let o;function l(){return o===void 0&&(o={}),o}s.fromWeb=function(h,d){return l().newStreamDuplexFromReadableWritablePair(h,d)},s.toWeb=function(h){return l().newReadableWritablePairFromDuplex(h)};let u;return s.from=function(h){return u||(u=Poe()),u(h,"body")},a5}const{ObjectSetPrototypeOf:TR,Symbol:Noe}=nn;var kR=hl;const{ERR_METHOD_NOT_IMPLEMENTED:Foe}=Ui.codes,s5=ul(),{getHighWaterMark:zoe}=Hv;TR(hl.prototype,s5.prototype),TR(hl,s5);const Mp=Noe("kCallback");function hl(t){if(!(this instanceof hl))return new hl(t);const e=t?zoe(this,t,"readableHighWaterMark",!0):null;e===0&&(t={...t,highWaterMark:null,readableHighWaterMark:e,writableHighWaterMark:t.writableHighWaterMark||0}),s5.call(this,t),this._readableState.sync=!1,this[Mp]=null,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",$oe)}function o5(t){typeof this._flush=="function"&&!this.destroyed?this._flush((e,r)=>{if(e){t?t(e):this.destroy(e);return}r!=null&&this.push(r),this.push(null),t&&t()}):(this.push(null),t&&t())}function $oe(){this._final!==o5&&o5.call(this)}hl.prototype._final=o5,hl.prototype._transform=function(t,e,r){throw new Foe("_transform()")},hl.prototype._write=function(t,e,r){const n=this._readableState,i=this._writableState,a=n.length;this._transform(t,e,(s,o)=>{if(s){r(s);return}o!=null&&this.push(o),i.ended||a===n.length||n.length<n.highWaterMark?r():this[Mp]=r})},hl.prototype._read=function(){if(this[Mp]){const t=this[Mp];this[Mp]=null,t()}};const{ObjectSetPrototypeOf:ER}=nn;var SR=kd;const l5=kR;ER(kd.prototype,l5.prototype),ER(kd,l5);function kd(t){if(!(this instanceof kd))return new kd(t);l5.call(this,t)}kd.prototype._transform=function(t,e,r){r(null,t)};const Dp=wu,{ArrayIsArray:Voe,Promise:Uoe,SymbolAsyncIterator:Goe,SymbolDispose:Woe}=nn,Yv=dc,{once:Hoe}=la,qoe=Td,_R=ul(),{aggregateTwoErrors:Yoe,codes:{ERR_INVALID_ARG_TYPE:c5,ERR_INVALID_RETURN_VALUE:u5,ERR_MISSING_ARGS:joe,ERR_STREAM_DESTROYED:Xoe,ERR_STREAM_PREMATURE_CLOSE:Koe},AbortError:Qoe}=Ui,{validateFunction:Zoe,validateAbortSignal:Joe}=Rp,{isIterable:ku,isReadable:h5,isReadableNodeStream:jv,isNodeStream:CR,isTransformStream:Ed,isWebStream:ele,isReadableStream:d5,isReadableFinished:tle}=cl,rle=globalThis.AbortController||Lp().AbortController;let f5,p5,g5;function AR(t,e,r){let n=!1;t.on("close",()=>{n=!0});const i=Yv(t,{readable:e,writable:r},a=>{n=!a});return{destroy:a=>{n||(n=!0,qoe.destroyer(t,a||new Xoe("pipe")))},cleanup:i}}function nle(t){return Zoe(t[t.length-1],"streams[stream.length - 1]"),t.pop()}function m5(t){if(ku(t))return t;if(jv(t))return ile(t);throw new c5("val",["Readable","Iterable","AsyncIterable"],t)}async function*ile(t){p5||(p5=qv()),yield*p5.prototype[Goe].call(t)}async function Xv(t,e,r,{end:n}){let i,a=null;const s=u=>{if(u&&(i=u),a){const h=a;a=null,h()}},o=()=>new Uoe((u,h)=>{i?h(i):a=()=>{i?h(i):u()}});e.on("drain",s);const l=Yv(e,{readable:!1},s);try{e.writableNeedDrain&&await o();for await(const u of t)e.write(u)||await o();n&&(e.end(),await o()),r()}catch(u){r(i!==u?Yoe(i,u):u)}finally{l(),e.off("drain",s)}}async function v5(t,e,r,{end:n}){Ed(e)&&(e=e.writable);const i=e.getWriter();try{for await(const a of t)await i.ready,i.write(a).catch(()=>{});await i.ready,n&&await i.close(),r()}catch(a){try{await i.abort(a),r(a)}catch(s){r(s)}}}function ale(...t){return LR(t,Hoe(nle(t)))}function LR(t,e,r){if(t.length===1&&Voe(t[0])&&(t=t[0]),t.length<2)throw new joe("streams");const n=new rle,i=n.signal,a=r==null?void 0:r.signal,s=[];Joe(a,"options.signal");function o(){g(new Qoe)}g5=g5||la.addAbortListener;let l;a&&(l=g5(a,o));let u,h;const d=[];let f=0;function p(b){g(b,--f===0)}function g(b,x){var k;if(b&&(!u||u.code==="ERR_STREAM_PREMATURE_CLOSE")&&(u=b),!(!u&&!x)){for(;d.length;)d.shift()(u);(k=l)===null||k===void 0||k[Woe](),n.abort(),x&&(u||s.forEach(E=>E()),Dp.nextTick(e,u,h))}}let m;for(let b=0;b<t.length;b++){const x=t[b],k=b<t.length-1,E=b>0,C=k||(r==null?void 0:r.end)!==!1,S=b===t.length-1;if(CR(x)){let R=function(L){L&&L.name!=="AbortError"&&L.code!=="ERR_STREAM_PREMATURE_CLOSE"&&p(L)};if(C){const{destroy:L,cleanup:I}=AR(x,k,E);d.push(L),h5(x)&&S&&s.push(I)}x.on("error",R),h5(x)&&S&&s.push(()=>{x.removeListener("error",R)})}if(b===0)if(typeof x=="function"){if(m=x({signal:i}),!ku(m))throw new u5("Iterable, AsyncIterable or Stream","source",m)}else ku(x)||jv(x)||Ed(x)?m=x:m=_R.from(x);else if(typeof x=="function"){if(Ed(m)){var v;m=m5((v=m)===null||v===void 0?void 0:v.readable)}else m=m5(m);if(m=x(m,{signal:i}),k){if(!ku(m,!0))throw new u5("AsyncIterable",`transform[${b-1}]`,m)}else{var y;f5||(f5=SR);const R=new f5({objectMode:!0}),L=(y=m)===null||y===void 0?void 0:y.then;if(typeof L=="function")f++,L.call(m,M=>{h=M,M!=null&&R.write(M),C&&R.end(),Dp.nextTick(p)},M=>{R.destroy(M),Dp.nextTick(p,M)});else if(ku(m,!0))f++,Xv(m,R,p,{end:C});else if(d5(m)||Ed(m)){const M=m.readable||m;f++,Xv(M,R,p,{end:C})}else throw new u5("AsyncIterable or Promise","destination",m);m=R;const{destroy:I,cleanup:_}=AR(m,!1,!0);d.push(I),S&&s.push(_)}}else if(CR(x)){if(jv(m)){f+=2;const R=sle(m,x,p,{end:C});h5(x)&&S&&s.push(R)}else if(Ed(m)||d5(m)){const R=m.readable||m;f++,Xv(R,x,p,{end:C})}else if(ku(m))f++,Xv(m,x,p,{end:C});else throw new c5("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],m);m=x}else if(ele(x)){if(jv(m))f++,v5(m5(m),x,p,{end:C});else if(d5(m)||ku(m))f++,v5(m,x,p,{end:C});else if(Ed(m))f++,v5(m.readable,x,p,{end:C});else throw new c5("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],m);m=x}else m=_R.from(x)}return(i!=null&&i.aborted||a!=null&&a.aborted)&&Dp.nextTick(o),m}function sle(t,e,r,{end:n}){let i=!1;if(e.on("close",()=>{i||r(new Koe)}),t.pipe(e,{end:!1}),n){let a=function(){i=!0,e.end()};tle(t)?Dp.nextTick(a):t.once("end",a)}else r();return Yv(t,{readable:!0,writable:!1},a=>{const s=t._readableState;a&&a.code==="ERR_STREAM_PREMATURE_CLOSE"&&s&&s.ended&&!s.errored&&!s.errorEmitted?t.once("end",r).once("error",r):r(a)}),Yv(e,{readable:!1,writable:!0},r)}var y5={pipelineImpl:LR,pipeline:ale};const{pipeline:ole}=y5,Kv=ul(),{destroyer:lle}=Td,{isNodeStream:Qv,isReadable:RR,isWritable:IR,isWebStream:b5,isTransformStream:Eu,isWritableStream:MR,isReadableStream:DR}=cl,{AbortError:cle,codes:{ERR_INVALID_ARG_VALUE:OR,ERR_MISSING_ARGS:ule}}=Ui,hle=dc;var BR=function(...t){if(t.length===0)throw new ule("streams");if(t.length===1)return Kv.from(t[0]);const e=[...t];if(typeof t[0]=="function"&&(t[0]=Kv.from(t[0])),typeof t[t.length-1]=="function"){const f=t.length-1;t[f]=Kv.from(t[f])}for(let f=0;f<t.length;++f)if(!(!Qv(t[f])&&!b5(t[f]))){if(f<t.length-1&&!(RR(t[f])||DR(t[f])||Eu(t[f])))throw new OR(`streams[${f}]`,e[f],"must be readable");if(f>0&&!(IR(t[f])||MR(t[f])||Eu(t[f])))throw new OR(`streams[${f}]`,e[f],"must be writable")}let r,n,i,a,s;function o(f){const p=a;a=null,p?p(f):f?s.destroy(f):!d&&!h&&s.destroy()}const l=t[0],u=ole(t,o),h=!!(IR(l)||MR(l)||Eu(l)),d=!!(RR(u)||DR(u)||Eu(u));if(s=new Kv({writableObjectMode:!!(l!=null&&l.writableObjectMode),readableObjectMode:!!(u!=null&&u.readableObjectMode),writable:h,readable:d}),h){if(Qv(l))s._write=function(p,g,m){l.write(p,g)?m():r=m},s._final=function(p){l.end(),n=p},l.on("drain",function(){if(r){const p=r;r=null,p()}});else if(b5(l)){const p=(Eu(l)?l.writable:l).getWriter();s._write=async function(g,m,v){try{await p.ready,p.write(g).catch(()=>{}),v()}catch(y){v(y)}},s._final=async function(g){try{await p.ready,p.close().catch(()=>{}),n=g}catch(m){g(m)}}}const f=Eu(u)?u.readable:u;hle(f,()=>{if(n){const p=n;n=null,p()}})}if(d){if(Qv(u))u.on("readable",function(){if(i){const f=i;i=null,f()}}),u.on("end",function(){s.push(null)}),s._read=function(){for(;;){const f=u.read();if(f===null){i=s._read;return}if(!s.push(f))return}};else if(b5(u)){const f=(Eu(u)?u.readable:u).getReader();s._read=async function(){for(;;)try{const{value:p,done:g}=await f.read();if(!s.push(p))return;if(g){s.push(null);return}}catch{return}}}}return s._destroy=function(f,p){!f&&a!==null&&(f=new cle),i=null,r=null,n=null,a===null?p(f):(a=p,Qv(u)&&lle(u,f))},s};const dle=globalThis.AbortController||Lp().AbortController,{codes:{ERR_INVALID_ARG_VALUE:fle,ERR_INVALID_ARG_TYPE:Op,ERR_MISSING_ARGS:ple,ERR_OUT_OF_RANGE:gle},AbortError:mo}=Ui,{validateAbortSignal:Su,validateInteger:PR,validateObject:_u}=Rp,mle=nn.Symbol("kWeak"),vle=nn.Symbol("kResistStopPropagation"),{finished:yle}=dc,ble=BR,{addAbortSignalNoValidate:xle}=Gv,{isWritable:wle,isNodeStream:Tle}=cl,{deprecate:kle}=la,{ArrayPrototypePush:Ele,Boolean:Sle,MathFloor:NR,Number:_le,NumberIsNaN:Cle,Promise:FR,PromiseReject:zR,PromiseResolve:Ale,PromisePrototypeThen:$R,Symbol:VR}=nn,Zv=VR("kEmpty"),UR=VR("kEof");function Lle(t,e){if(e!=null&&_u(e,"options"),(e==null?void 0:e.signal)!=null&&Su(e.signal,"options.signal"),Tle(t)&&!wle(t))throw new fle("stream",t,"must be writable");const r=ble(this,t);return e!=null&&e.signal&&xle(e.signal,r),r}function Jv(t,e){if(typeof t!="function")throw new Op("fn",["Function","AsyncFunction"],t);e!=null&&_u(e,"options"),(e==null?void 0:e.signal)!=null&&Su(e.signal,"options.signal");let r=1;(e==null?void 0:e.concurrency)!=null&&(r=NR(e.concurrency));let n=r-1;return(e==null?void 0:e.highWaterMark)!=null&&(n=NR(e.highWaterMark)),PR(r,"options.concurrency",1),PR(n,"options.highWaterMark",0),n+=r,(async function*(){const i=la.AbortSignalAny([e==null?void 0:e.signal].filter(Sle)),a=this,s=[],o={signal:i};let l,u,h=!1,d=0;function f(){h=!0,p()}function p(){d-=1,g()}function g(){u&&!h&&d<r&&s.length<n&&(u(),u=null)}async function m(){try{for await(let v of a){if(h)return;if(i.aborted)throw new mo;try{if(v=t(v,o),v===Zv)continue;v=Ale(v)}catch(y){v=zR(y)}d+=1,$R(v,p,f),s.push(v),l&&(l(),l=null),!h&&(s.length>=n||d>=r)&&await new FR(y=>{u=y})}s.push(UR)}catch(v){const y=zR(v);$R(y,p,f),s.push(y)}finally{h=!0,l&&(l(),l=null)}}m();try{for(;;){for(;s.length>0;){const v=await s[0];if(v===UR)return;if(i.aborted)throw new mo;v!==Zv&&(yield v),s.shift(),g()}await new FR(v=>{l=v})}}finally{h=!0,u&&(u(),u=null)}}).call(this)}function Rle(t=void 0){return t!=null&&_u(t,"options"),(t==null?void 0:t.signal)!=null&&Su(t.signal,"options.signal"),(async function*(){let e=0;for await(const n of this){var r;if(t!=null&&(r=t.signal)!==null&&r!==void 0&&r.aborted)throw new mo({cause:t.signal.reason});yield[e++,n]}}).call(this)}async function GR(t,e=void 0){for await(const r of x5.call(this,t,e))return!0;return!1}async function Ile(t,e=void 0){if(typeof t!="function")throw new Op("fn",["Function","AsyncFunction"],t);return!await GR.call(this,async(...r)=>!await t(...r),e)}async function Mle(t,e){for await(const r of x5.call(this,t,e))return r}async function Dle(t,e){if(typeof t!="function")throw new Op("fn",["Function","AsyncFunction"],t);async function r(n,i){return await t(n,i),Zv}for await(const n of Jv.call(this,r,e));}function x5(t,e){if(typeof t!="function")throw new Op("fn",["Function","AsyncFunction"],t);async function r(n,i){return await t(n,i)?n:Zv}return Jv.call(this,r,e)}class Ole extends ple{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}async function Ble(t,e,r){var n;if(typeof t!="function")throw new Op("reducer",["Function","AsyncFunction"],t);r!=null&&_u(r,"options"),(r==null?void 0:r.signal)!=null&&Su(r.signal,"options.signal");let i=arguments.length>1;if(r!=null&&(n=r.signal)!==null&&n!==void 0&&n.aborted){const u=new mo(void 0,{cause:r.signal.reason});throw this.once("error",()=>{}),await yle(this.destroy(u)),u}const a=new dle,s=a.signal;if(r!=null&&r.signal){const u={once:!0,[mle]:this,[vle]:!0};r.signal.addEventListener("abort",()=>a.abort(),u)}let o=!1;try{for await(const u of this){var l;if(o=!0,r!=null&&(l=r.signal)!==null&&l!==void 0&&l.aborted)throw new mo;i?e=await t(e,u,{signal:s}):(e=u,i=!0)}if(!o&&!i)throw new Ole}finally{a.abort()}return e}async function Ple(t){t!=null&&_u(t,"options"),(t==null?void 0:t.signal)!=null&&Su(t.signal,"options.signal");const e=[];for await(const n of this){var r;if(t!=null&&(r=t.signal)!==null&&r!==void 0&&r.aborted)throw new mo(void 0,{cause:t.signal.reason});Ele(e,n)}return e}function Nle(t,e){const r=Jv.call(this,t,e);return(async function*(){for await(const n of r)yield*n}).call(this)}function WR(t){if(t=_le(t),Cle(t))return 0;if(t<0)throw new gle("number",">= 0",t);return t}function Fle(t,e=void 0){return e!=null&&_u(e,"options"),(e==null?void 0:e.signal)!=null&&Su(e.signal,"options.signal"),t=WR(t),(async function*(){var r;if(e!=null&&(r=e.signal)!==null&&r!==void 0&&r.aborted)throw new mo;for await(const i of this){var n;if(e!=null&&(n=e.signal)!==null&&n!==void 0&&n.aborted)throw new mo;t--<=0&&(yield i)}}).call(this)}function zle(t,e=void 0){return e!=null&&_u(e,"options"),(e==null?void 0:e.signal)!=null&&Su(e.signal,"options.signal"),t=WR(t),(async function*(){var r;if(e!=null&&(r=e.signal)!==null&&r!==void 0&&r.aborted)throw new mo;for await(const i of this){var n;if(e!=null&&(n=e.signal)!==null&&n!==void 0&&n.aborted)throw new mo;if(t-- >0&&(yield i),t<=0)return}}).call(this)}B3.streamReturningOperators={asIndexedPairs:kle(Rle,"readable.asIndexedPairs will be removed in a future version."),drop:Fle,filter:x5,flatMap:Nle,map:Jv,take:zle,compose:Lle},B3.promiseReturningOperators={every:Ile,forEach:Dle,reduce:Ble,toArray:Ple,some:GR,find:Mle};var w5,HR;function qR(){if(HR)return w5;HR=1;const{ArrayPrototypePop:t,Promise:e}=nn,{isIterable:r,isNodeStream:n,isWebStream:i}=cl,{pipelineImpl:a}=y5,{finished:s}=dc;jR();function o(...l){return new e((u,h)=>{let d,f;const p=l[l.length-1];if(p&&typeof p=="object"&&!n(p)&&!r(p)&&!i(p)){const g=t(l);d=g.signal,f=g.end}a(l,(g,m)=>{g?h(g):u(m)},{signal:d,end:f})})}return w5={finished:s,pipeline:o},w5}var YR;function jR(){if(YR)return D3.exports;YR=1;const{Buffer:t}=co,{ObjectDefineProperty:e,ObjectKeys:r,ReflectApply:n}=nn,{promisify:{custom:i}}=la,{streamReturningOperators:a,promiseReturningOperators:s}=B3,{codes:{ERR_ILLEGAL_CONSTRUCTOR:o}}=Ui,l=BR,{setDefaultHighWaterMark:u,getDefaultHighWaterMark:h}=Hv,{pipeline:d}=y5,{destroyer:f}=Td,p=dc,g=qR(),m=cl,v=D3.exports=K3.Stream;v.isDestroyed=m.isDestroyed,v.isDisturbed=m.isDisturbed,v.isErrored=m.isErrored,v.isReadable=m.isReadable,v.isWritable=m.isWritable,v.Readable=qv();for(const b of r(a)){let x=function(...E){if(new.target)throw o();return v.Readable.from(n(k,this,E))};const k=a[b];e(x,"name",{__proto__:null,value:k.name}),e(x,"length",{__proto__:null,value:k.length}),e(v.Readable.prototype,b,{__proto__:null,value:x,enumerable:!1,configurable:!0,writable:!0})}for(const b of r(s)){let x=function(...E){if(new.target)throw o();return n(k,this,E)};const k=s[b];e(x,"name",{__proto__:null,value:k.name}),e(x,"length",{__proto__:null,value:k.length}),e(v.Readable.prototype,b,{__proto__:null,value:x,enumerable:!1,configurable:!0,writable:!0})}v.Writable=n5(),v.Duplex=ul(),v.Transform=kR,v.PassThrough=SR,v.pipeline=d;const{addAbortSignal:y}=Gv;return v.addAbortSignal=y,v.finished=p,v.destroy=f,v.compose=l,v.setDefaultHighWaterMark=u,v.getDefaultHighWaterMark=h,e(v,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return g}}),e(d,i,{__proto__:null,enumerable:!0,get(){return g.pipeline}}),e(p,i,{__proto__:null,enumerable:!0,get(){return g.finished}}),v.Stream=v,v._isUint8Array=function(b){return b instanceof Uint8Array},v._uint8ArrayToBuffer=function(b){return t.from(b.buffer,b.byteOffset,b.byteLength)},D3.exports}(function(t){const e=jR(),r=qR(),n=e.Readable.destroy;t.exports=e.Readable,t.exports._uint8ArrayToBuffer=e._uint8ArrayToBuffer,t.exports._isUint8Array=e._isUint8Array,t.exports.isDisturbed=e.isDisturbed,t.exports.isErrored=e.isErrored,t.exports.isReadable=e.isReadable,t.exports.Readable=e.Readable,t.exports.Writable=e.Writable,t.exports.Duplex=e.Duplex,t.exports.Transform=e.Transform,t.exports.PassThrough=e.PassThrough,t.exports.addAbortSignal=e.addAbortSignal,t.exports.finished=e.finished,t.exports.destroy=e.destroy,t.exports.destroy=n,t.exports.pipeline=e.pipeline,t.exports.compose=e.compose,Object.defineProperty(e,"promises",{configurable:!0,enumerable:!0,get(){return r}}),t.exports.Stream=e.Stream,t.exports.default=t.exports})(lL);var XR=lL.exports;const T5=Symbol("iter");function Bp(t,e,r=4){if(r===0)return Object.assign(t,e);for(const n in e)t[n]=Bp(t[n]||Object.create(null),e[n],r-1);return t}function KR(t,e,r=4){let n=!1;for(const i in t)if(i in e){const a=r===0?null:KR(t[i],e[i],r-1);if(a!==!1)n=n||Object.create(null),n[i]=a;else if(r===3)return!1}return n}function QR(t,e,r=4){let n=!1;for(const i in t)if(!(i in e))n=n||Object.create(null),n[i]=r===0?null:Bp({},t[i],r-1);else if(r!==0){const a=QR(t[i],e[i],r-1);if(a!==!1)n=n||Object.create(null),n[i]=a;else if(r===3)return!1}return n}class $le{constructor(e={}){this._id=1,this._ids=Object.create(null),this._ids[""]=1,this._entities=Object.create(null),this._entities[1]="",this._blankNodeIndex=0,this._factory=e.factory||yu}_termFromId(e){if(e[0]==="."){const r=this._entities,n=e.split(".");return this._factory.quad(this._termFromId(r[n[1]]),this._termFromId(r[n[2]]),this._termFromId(r[n[3]]),n[4]&&this._termFromId(r[n[4]]))}return Ep(e,this._factory)}_termToNumericId(e){if(e.termType==="Quad"){const r=this._termToNumericId(e.subject),n=this._termToNumericId(e.predicate),i=this._termToNumericId(e.object);let a;return r&&n&&i&&(R3(e.graph)||(a=this._termToNumericId(e.graph)))&&this._ids[a?`.${r}.${n}.${i}.${a}`:`.${r}.${n}.${i}`]}return this._ids[gd(e)]}_termToNewNumericId(e){const r=e&&e.termType==="Quad"?`.${this._termToNewNumericId(e.subject)}.${this._termToNewNumericId(e.predicate)}.${this._termToNewNumericId(e.object)}${R3(e.graph)?"":`.${this._termToNewNumericId(e.graph)}`}`:gd(e);return this._ids[r]||(this._ids[this._entities[++this._id]=r]=this._id)}createBlankNode(e){let r,n;if(e)for(r=e=`_:${e}`,n=1;this._ids[r];)r=e+n++;else do r=`_:b${this._blankNodeIndex++}`;while(this._ids[r]);return this._ids[r]=++this._id,this._entities[this._id]=r,this._factory.blankNode(r.substr(2))}}class ca{constructor(e,r){this._size=0,this._graphs=Object.create(null),!r&&e&&!e[0]&&typeof e.match!="function"&&(r=e,e=null),r=r||{},this._factory=r.factory||yu,this._entityIndex=r.entityIndex||new $le({factory:this._factory}),this._entities=this._entityIndex._entities,this._termFromId=this._entityIndex._termFromId.bind(this._entityIndex),this._termToNumericId=this._entityIndex._termToNumericId.bind(this._entityIndex),this._termToNewNumericId=this._entityIndex._termToNewNumericId.bind(this._entityIndex),e&&this.addAll(e)}get size(){let e=this._size;if(e!==null)return e;e=0;const r=this._graphs;let n,i;for(const a in r)for(const s in n=r[a].subjects)for(const o in i=n[s])e+=Object.keys(i[o]).length;return this._size=e}_addToIndex(e,r,n,i){const a=e[r]||(e[r]={}),s=a[n]||(a[n]={}),o=i in s;return o||(s[i]=null),!o}_removeFromIndex(e,r,n,i){const a=e[r],s=a[n];delete s[i];for(const o in s)return;delete a[n];for(const o in a)return;delete e[r]}*_findInIndex(e,r,n,i,a,s,o,l){let u,h,d;const f=this._entities,p=this._termFromId(f[l]),g={subject:null,predicate:null,object:null};r&&((u=e,e={})[r]=u[r]);for(const m in e)if(h=e[m]){g[a]=this._termFromId(f[m]),n&&((u=h,h={})[n]=u[n]);for(const v in h)if(d=h[v]){g[s]=this._termFromId(f[v]);const y=i?i in d?[i]:[]:Object.keys(d);for(let b=0;b<y.length;b++)g[o]=this._termFromId(f[y[b]]),yield this._factory.quad(g.subject,g.predicate,g.object,p)}}}_loop(e,r){for(const n in e)r(n)}_loopByKey0(e,r,n){let i,a;if(i=e[r])for(a in i)n(a)}_loopByKey1(e,r,n){let i,a;for(i in e)a=e[i],a[r]&&n(i)}_loopBy2Keys(e,r,n,i){let a,s,o;if((a=e[r])&&(s=a[n]))for(o in s)i(o)}_countInIndex(e,r,n,i){let a=0,s,o,l;r&&((s=e,e={})[r]=s[r]);for(const u in e)if(o=e[u]){n&&((s=o,o={})[n]=s[n]);for(const h in o)(l=o[h])&&(i?i in l&&a++:a+=Object.keys(l).length)}return a}_getGraphs(e){return e=e===""?1:e&&(this._termToNumericId(e)||-1),typeof e!="number"?this._graphs:{[e]:this._graphs[e]}}_uniqueEntities(e){const r=Object.create(null);return n=>{n in r||(r[n]=!0,e(this._termFromId(this._entities[n],this._factory)))}}add(e){return this.addQuad(e),this}addQuad(e,r,n,i){r||(i=e.graph,n=e.object,r=e.predicate,e=e.subject),i=i?this._termToNewNumericId(i):1;let a=this._graphs[i];return a||(a=this._graphs[i]={subjects:{},predicates:{},objects:{}},Object.freeze(a)),e=this._termToNewNumericId(e),r=this._termToNewNumericId(r),n=this._termToNewNumericId(n),this._addToIndex(a.subjects,e,r,n)?(this._addToIndex(a.predicates,r,n,e),this._addToIndex(a.objects,n,e,r),this._size=null,!0):!1}addQuads(e){for(let r=0;r<e.length;r++)this.addQuad(e[r])}delete(e){return this.removeQuad(e),this}has(e,r,n,i){return e&&e.subject&&({subject:e,predicate:r,object:n,graph:i}=e),!this.readQuads(e,r,n,i).next().done}import(e){return e.on("data",r=>{this.addQuad(r)}),e}removeQuad(e,r,n,i){r||({subject:e,predicate:r,object:n,graph:i}=e),i=i?this._termToNumericId(i):1;const a=this._graphs;let s,o,l;if(!(e=e&&this._termToNumericId(e))||!(r=r&&this._termToNumericId(r))||!(n=n&&this._termToNumericId(n))||!(s=a[i])||!(o=s.subjects[e])||!(l=o[r])||!(n in l))return!1;this._removeFromIndex(s.subjects,e,r,n),this._removeFromIndex(s.predicates,r,n,e),this._removeFromIndex(s.objects,n,e,r),this._size!==null&&this._size--;for(e in s.subjects)return!0;return delete a[i],!0}removeQuads(e){for(let r=0;r<e.length;r++)this.removeQuad(e[r])}remove(e){return e.on("data",r=>{this.removeQuad(r)}),e}removeMatches(e,r,n,i){const a=new XR.Readable({objectMode:!0}),s=this.readQuads(e,r,n,i);return a._read=o=>{for(;--o>=0;){const{done:l,value:u}=s.next();if(l){a.push(null);return}a.push(u)}},this.remove(a)}deleteGraph(e){return this.removeMatches(null,null,null,e)}getQuads(e,r,n,i){return[...this.readQuads(e,r,n,i)]}*readQuads(e,r,n,i){const a=this._getGraphs(i);let s,o,l,u;if(!(e&&!(o=this._termToNumericId(e))||r&&!(l=this._termToNumericId(r))||n&&!(u=this._termToNumericId(n))))for(const h in a)(s=a[h])&&(o?u?yield*this._findInIndex(s.objects,u,o,l,"object","subject","predicate",h):yield*this._findInIndex(s.subjects,o,l,null,"subject","predicate","object",h):l?yield*this._findInIndex(s.predicates,l,u,null,"predicate","object","subject",h):u?yield*this._findInIndex(s.objects,u,null,null,"object","subject","predicate",h):yield*this._findInIndex(s.subjects,null,null,null,"subject","predicate","object",h))}match(e,r,n,i){return new Sd(this,e,r,n,i,{entityIndex:this._entityIndex})}countQuads(e,r,n,i){const a=this._getGraphs(i);let s=0,o,l,u,h;if(e&&!(l=this._termToNumericId(e))||r&&!(u=this._termToNumericId(r))||n&&!(h=this._termToNumericId(n)))return 0;for(const d in a)(o=a[d])&&(e?n?s+=this._countInIndex(o.objects,h,l,u):s+=this._countInIndex(o.subjects,l,u,h):r?s+=this._countInIndex(o.predicates,u,h,l):s+=this._countInIndex(o.objects,h,l,u));return s}forEach(e,r,n,i,a){this.some(s=>(e(s,this),!1),r,n,i,a)}every(e,r,n,i,a){return!this.some(s=>!e(s,this),r,n,i,a)}some(e,r,n,i,a){for(const s of this.readQuads(r,n,i,a))if(e(s,this))return!0;return!1}getSubjects(e,r,n){const i=[];return this.forSubjects(a=>{i.push(a)},e,r,n),i}forSubjects(e,r,n,i){const a=this._getGraphs(i);let s,o,l;if(e=this._uniqueEntities(e),!(r&&!(o=this._termToNumericId(r))||n&&!(l=this._termToNumericId(n))))for(i in a)(s=a[i])&&(o?l?this._loopBy2Keys(s.predicates,o,l,e):this._loopByKey1(s.subjects,o,e):l?this._loopByKey0(s.objects,l,e):this._loop(s.subjects,e))}getPredicates(e,r,n){const i=[];return this.forPredicates(a=>{i.push(a)},e,r,n),i}forPredicates(e,r,n,i){const a=this._getGraphs(i);let s,o,l;if(e=this._uniqueEntities(e),!(r&&!(o=this._termToNumericId(r))||n&&!(l=this._termToNumericId(n))))for(i in a)(s=a[i])&&(o?l?this._loopBy2Keys(s.objects,l,o,e):this._loopByKey0(s.subjects,o,e):l?this._loopByKey1(s.predicates,l,e):this._loop(s.predicates,e))}getObjects(e,r,n){const i=[];return this.forObjects(a=>{i.push(a)},e,r,n),i}forObjects(e,r,n,i){const a=this._getGraphs(i);let s,o,l;if(e=this._uniqueEntities(e),!(r&&!(o=this._termToNumericId(r))||n&&!(l=this._termToNumericId(n))))for(i in a)(s=a[i])&&(o?l?this._loopBy2Keys(s.subjects,o,l,e):this._loopByKey1(s.objects,o,e):l?this._loopByKey0(s.predicates,l,e):this._loop(s.objects,e))}getGraphs(e,r,n){const i=[];return this.forGraphs(a=>{i.push(a)},e,r,n),i}forGraphs(e,r,n,i){for(const a in this._graphs)this.some(s=>(e(s.graph),!0),r,n,i,this._termFromId(this._entities[a]))}createBlankNode(e){return this._entityIndex.createBlankNode(e)}extractLists({remove:e=!1,ignoreErrors:r=!1}={}){const n={},i=r?()=>!0:(o,l)=>{throw new Error(`${o.value} ${l}`)},a=this.getQuads(null,di.rdf.rest,di.rdf.nil,null),s=e?[...a]:[];return a.forEach(o=>{const l=[];let u=!1,h,d;const f=o.graph;let p=o.subject;for(;p&&!u;){const g=this.getQuads(null,null,p,null),m=this.getQuads(p,null,null,null);let v,y=null,b=null,x=null;for(let k=0;k<m.length&&!u;k++)v=m[k],v.graph.equals(f)?h?u=i(p,"has non-list arcs out"):v.predicate.value===di.rdf.first?y?u=i(p,"has multiple rdf:first arcs"):s.push(y=v):v.predicate.value===di.rdf.rest?b?u=i(p,"has multiple rdf:rest arcs"):s.push(b=v):g.length?u=i(p,"can't be subject and object"):(h=v,d="subject"):u=i(p,"not confined to single graph");for(let k=0;k<g.length&&!u;++k)v=g[k],h?u=i(p,"can't have coreferences"):v.predicate.value===di.rdf.rest?x?u=i(p,"has incoming rdf:rest arcs"):x=v:(h=v,d="object");y?l.unshift(y.object):u=i(p,"has no list head"),p=x&&x.subject}u?e=!1:h&&(n[h[d].value]=l)}),e&&this.removeQuads(s),n}addAll(e){if(e instanceof Sd&&(e=e.filtered),Array.isArray(e))this.addQuads(e);else if(e instanceof ca&&e._entityIndex===this._entityIndex)e._size!==0&&(this._graphs=Bp(this._graphs,e._graphs),this._size=null);else for(const r of e)this.add(r);return this}contains(e){if(e instanceof Sd&&(e=e.filtered),e===this)return!0;if(!(e instanceof ca)||this._entityIndex!==e._entityIndex)return e.every(u=>this.has(u));const r=this._graphs,n=e._graphs;let i,a,s,o,l;for(const u in n){if(!(i=r[u]))return!1;i=i.subjects;for(const h in a=n[u].subjects){if(!(s=i[h]))return!1;for(const d in o=a[h]){if(!(l=s[d]))return!1;for(const f in o[d])if(!(f in l))return!1}}}return!0}deleteMatches(e,r,n,i){for(const a of this.match(e,r,n,i))this.removeQuad(a);return this}difference(e){if(e&&e instanceof Sd&&(e=e.filtered),e===this)return new ca({entityIndex:this._entityIndex});if(e instanceof ca&&e._entityIndex===this._entityIndex){const r=new ca({entityIndex:this._entityIndex}),n=QR(this._graphs,e._graphs);return n&&(r._graphs=n,r._size=null),r}return this.filter(r=>!e.has(r))}equals(e){return e instanceof Sd&&(e=e.filtered),e===this||this.size===e.size&&this.contains(e)}filter(e){const r=new ca({entityIndex:this._entityIndex});for(const n of this)e(n,this)&&r.add(n);return r}intersection(e){if(e instanceof Sd&&(e=e.filtered),e===this){const r=new ca({entityIndex:this._entityIndex});return r._graphs=Bp(Object.create(null),this._graphs),r._size=this._size,r}else if(e instanceof ca&&this._entityIndex===e._entityIndex){const r=new ca({entityIndex:this._entityIndex}),n=KR(e._graphs,this._graphs);return n&&(r._graphs=n,r._size=null),r}return this.filter(r=>e.has(r))}map(e){const r=new ca({entityIndex:this._entityIndex});for(const n of this)r.add(e(n,this));return r}reduce(e,r){const n=this.readQuads();let i=r===void 0?n.next().value:r;for(const a of n)i=e(i,a,this);return i}toArray(){return this.getQuads()}toCanonical(){throw new Error("not implemented")}toStream(){return this.match()}toString(){return new sL().quadsToString(this)}union(e){const r=new ca({entityIndex:this._entityIndex});return r._graphs=Bp(Object.create(null),this._graphs),r._size=this._size,r.addAll(e),r}*[Symbol.iterator](){yield*this.readQuads()}}function vo(t,e,r=0){const n=e[r];if(n&&!(n in t))return!1;let i=!1;for(const a in n?{[n]:t[n]}:t){const s=r===2?null:vo(t[a],e,r+1);s!==!1&&(i=i||Object.create(null),i[a]=s)}return i}let Sd=class yte extends XR.Readable{constructor(e,r,n,i,a,s){super({objectMode:!0}),Object.assign(this,{n3Store:e,subject:r,predicate:n,object:i,graph:a,options:s})}get filtered(){if(!this._filtered){const{n3Store:e,graph:r,object:n,predicate:i,subject:a}=this,s=this._filtered=new ca({factory:e._factory,entityIndex:this.options.entityIndex});let o,l,u;if(a&&!(o=s._termToNumericId(a))||i&&!(l=s._termToNumericId(i))||n&&!(u=s._termToNumericId(n)))return s;const h=e._getGraphs(r);for(const d in h){let f,p,g,m;(m=h[d])&&(!o&&l?(p=vo(m.predicates,[l,u,o]))&&(f=vo(m.subjects,[o,l,u]),g=vo(m.objects,[u,o,l])):u?(g=vo(m.objects,[u,o,l]))&&(f=vo(m.subjects,[o,l,u]),p=vo(m.predicates,[l,u,o])):(f=vo(m.subjects,[o,l,u]))&&(p=vo(m.predicates,[l,u,o]),g=vo(m.objects,[u,o,l])),f&&(s._graphs[d]={subjects:f,predicates:p,objects:g}))}s._size=null}return this._filtered}get size(){return this.filtered.size}_read(e){e>0&&!this[T5]&&(this[T5]=this[Symbol.iterator]());const r=this[T5];for(;--e>=0;){const{done:n,value:i}=r.next();if(n){this.push(null);return}this.push(i)}}addAll(e){return this.filtered.addAll(e)}contains(e){return this.filtered.contains(e)}deleteMatches(e,r,n,i){return this.filtered.deleteMatches(e,r,n,i)}difference(e){return this.filtered.difference(e)}equals(e){return this.filtered.equals(e)}every(e,r,n,i,a){return this.filtered.every(e,r,n,i,a)}filter(e){return this.filtered.filter(e)}forEach(e,r,n,i,a){return this.filtered.forEach(e,r,n,i,a)}import(e){return this.filtered.import(e)}intersection(e){return this.filtered.intersection(e)}map(e){return this.filtered.map(e)}some(e,r,n,i,a){return this.filtered.some(e,r,n,i,a)}toCanonical(){return this.filtered.toCanonical()}toStream(){return this._filtered?this._filtered.toStream():this.n3Store.match(this.subject,this.predicate,this.object,this.graph)}union(e){return this._filtered?this._filtered.union(e):this.n3Store.match(this.subject,this.predicate,this.object,this.graph).addAll(e)}toArray(){return this._filtered?this._filtered.toArray():this.n3Store.getQuads(this.subject,this.predicate,this.object,this.graph)}reduce(e,r){return this.filtered.reduce(e,r)}toString(){return new sL().quadsToString(this)}add(e){return this.filtered.add(e)}delete(e){return this.filtered.delete(e)}has(e){return this.filtered.has(e)}match(e,r,n,i){return new yte(this.filtered,e,r,n,i,this.options)}*[Symbol.iterator](){yield*this._filtered||this.n3Store.readQuads(this.subject,this.predicate,this.object,this.graph)}};const k5={rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#"},xn={namespace:"https://prez.dev/",label:"https://prez.dev/label",description:"https://prez.dev/description",provenance:"https://prez.dev/provenance",link:"https://prez.dev/link",members:"https://prez.dev/members",identifier:"https://prez.dev/identifier",count:"https://prez.dev/count",searchResult:"https://prez.dev/SearchResult",searchResultWeight:"https://prez.dev/searchResultWeight",searchResultPredicate:"https://prez.dev/searchResultPredicate",searchResultURI:"https://prez.dev/searchResultURI",searchResultMatch:"https://prez.dev/searchResultMatch",hasChildren:"https://prez.dev/hasChildren",facetCount:"https://prez.dev/facetCount",facetName:"https://prez.dev/facetName",facetValue:"https://prez.dev/facetValue"},ua={skosConcept:"http://www.w3.org/2004/02/skos/core#Concept",a:"http://www.w3.org/1999/02/22-rdf-syntax-ns#type",rdfLangString:"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString",xmlString:"http://www.w3.org/2001/XMLSchema#string",w3Html:"http://www.w3.org/1999/02/22-rdf-syntax-ns#HTML",w3Markdown:"https://www.w3.org/ns/iana/media-types/text/markdown",shaclPathAlias:"http://example.com/shacl-extension#pathAlias",shaclPath:"http://www.w3.org/ns/shacl#path",shaclUnion:"http://www.w3.org/ns/shacl#union"};function Vle(t,e=k5){if(t==="a")return e.rdf+"type";{const[r,n]=t.split(":");return r?[r]+n:t}}function Ule(t,e=k5){let r="";return Object.entries(e).forEach(([n,i])=>{t.startsWith(i)&&(r=n+":"+t.split(i)[1])}),r}const Gle=t=>{const e=new URL(t);return`${e.protocol}//${e.hostname}`},{namedNode:Pp}=yu;class E5{constructor(){mu(this,"store"),mu(this,"parser"),mu(this,"prefixes"),mu(this,"basePath"),mu(this,"baseUrl"),mu(this,"linkedLists"),mu(this,"lists"),this.store=new ca,this.baseUrl="",this.basePath="",this.parser=new eL,this.prefixes=k5,this.linkedLists={},this.lists={}}load(e){e=`PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
105
- `+e;const r=this.parser.parse(e,null,(n,i)=>{this.prefixes[n]=i.value});this.store.addQuads(r),this.linkedLists=this.store.extractLists(),this.buildLists()}buildLists(){this.lists={};const e=this.linkedLists;this.store.getQuads(null,ua.shaclPath,null,null).forEach(r=>{const n=r.object;if(n.termType==="BlankNode"){const i=this.store.getQuads(n,ua.shaclUnion,null,null);if(i.length>0){const a=i[0].object;if(a.termType==="BlankNode"&&a.value in e){const s=e[a.value],o=n.value;this.lists[o]=this.buildSubList(s)}else console.warn(`[buildLists] Found sh:union for ${n.value}, but its object ${a.value} is not a valid list head in linkedLists.`)}}})}buildSubList(e){var r;const n=[];for(const i of e)if(i.termType=="BlankNode"){const a=i.value;if(a in this.linkedLists){const s=this.buildSubList(this.linkedLists[a]);if(s.length>1){const o=n.find(l=>l.node.value==s[0].node.value);o?(o.list??(o.list=[])).push(...s.slice(1)):n.push({node:s[0].node,list:s.slice(1)})}else n.push(...s)}else{const s=(r=this.store.getObjects(i,ua.shaclPathAlias,null))==null?void 0:r[0];if(s){const o=this.toPrezTerm(s);n.push({node:o,list:[]})}}}else if(i.termType=="NamedNode"&&i.value!=ua.shaclUnion){const a=this.toPrezTerm(i);n.push({node:a,list:[]})}return n}setBaseUrl(e){this.baseUrl=e,this.basePath=new URL(e).pathname}toIri(e){return Vle(e,this.prefixes)}fromIri(e){return Ule(e,this.prefixes)}getObjectLiteral(e,r){return this.getObjects(e,r).map(n=>this.toPrezTerm(n))[0]||void 0}getProperties(e,r){const n={};return this.store.forEach(i=>{var a;r!=null&&r.excludePrefix&&i.predicate.value.startsWith(r.excludePrefix)||r!=null&&r.includePrefix&&!i.predicate.value.startsWith(r.includePrefix)||(n[a=i.predicate.value]??(n[a]={predicate:this.toPrezTerm(i.predicate),objects:[]}),n[i.predicate.value].objects.push(this.toPrezTerm(i.object)))},e,null,null,null),e.termType,n}getParents(e){e.startsWith(this.basePath)&&(e=e.substring(this.basePath.length));const r=e.split("/"),n=[];let i="";for(const a of r){if(a=="")continue;i+="/"+a;const s={url:i,segment:a};if(a.includes(":")){const o=a.split(":"),l=this.prefixes[o[0]];if(l){const u=this.getObjects(l+o[1],xn.label);u.length>0&&(s.label=Cv(u[0].value))}}n.push(s)}return n}toPrezTerm(e){switch(e.termType){case"NamedNode":const r=sae(e.value);r.label=this.getObjectLiteral(e.value,xn.label),r.description=this.getObjectLiteral(e.value,xn.description),r.provenance=this.getObjectLiteral(e.value,xn.provenance);const n=this.getObjects(e.value,xn.identifier);n.length>0&&(r.identifiers=n.map(u=>this.toPrezTerm(u)));const i=this.getObjects(e.value,xn.link);i.length>0&&(r.links=i.map(u=>({value:u.value,parents:this.getParents(u.value)})));const a=this.getObjects(e.value,xn.members);a.length>0&&(r.members={value:a[0].value,parents:this.getParents(a[0].value)});const s=this.getObjects(e.value,ua.a);return s.length>0&&(r.rdfTypes=s.map(u=>this.toPrezTerm(u))),r;case"Literal":const o=Cv(e.value);return e.datatype&&(o.datatype=this.toPrezTerm(e.datatype)),e.language&&(o.language=e.language),o;case"BlankNode":const l=G9(e.value);return l.properties=this.getProperties(e),e.value in this.lists&&(l.list=this.lists[e.value]),l;default:throw"Invalid n3 Term object"}}toPrezFocusNode(e){var r,n,i,a,s;const o=this.toPrezTerm(e);return o.properties=this.getProperties(e,{excludePrefix:xn.namespace}),o.systemProperties=this.getProperties(e,{includePrefix:xn.namespace}),(r=o.rdfTypes)!=null&&r.map(l=>l.value).includes(ua.skosConcept)&&(o.hasChildren=((s=(a=(i=(n=o.systemProperties)==null?void 0:n[xn.hasChildren])==null?void 0:i.objects)==null?void 0:a[0])==null?void 0:s.value)=="true"),o}getSubjects(e,r){return this.store.getSubjects(e,r,null)}getObjects(e,r){if(typeof r=="string")return this.store.getObjects(Pp(e),Pp(r),null);{const n=[];return r.forEach(i=>{n.push(...this.store.getObjects(Pp(e),Pp(i),null))}),n}}getMembers(e){this.getObjects(e,this.toIri("prez:members")).forEach(r=>({value:r.value,parents:[]}))}getConcepts(e){const r=this.getSubjects(this.toIri("skos:inScheme"),e.value);function n(u){return r.map(h=>h.value).includes(u.value)}const i=this.getObjects(e.value,this.toIri("skos:hasTopConcept")),a=this.getObjects(e.value,this.toIri("skos:topConceptOf")),s={},o=[...i,...a].filter(u=>n(u));r.forEach(u=>{s[u.value]=[]}),r.forEach(u=>{this.getObjects(u.value,this.toIri("skos:broader")).forEach(h=>{n(h)&&s[h.value].push(u)}),this.getObjects(u.value,this.toIri("skos:narrower")).forEach(h=>{n(h)&&s[u.value].push(h)})});const l=[];return o.forEach(u=>{l.push(this.createHierarchy(u,s))}),l}createHierarchy(e,r){const n=r[e.value].map(i=>this.createHierarchy(i,r));return{...this.toPrezTerm(e),hasChildren:n.length>0,narrowers:n}}getByPrezId(e){const r=[];return this.store.forEach(n=>{r.push(n)},null,null,Pp("https://prez.dev/FocusNode"),null),e?r.find(n=>n.object.value===e).subject:r.map(n=>n.subject)}getCount(){const e=this.store.getObjects(null,xn.count,null);return e.length>0?Number(e[0].value.replace(">","")):0}getMaxReached(){const e=this.store.getObjects(null,xn.count,null);return e.length>0?e[0].value.includes(">"):!1}getList(){const e=[];return this.getByPrezId().forEach(r=>{e.push(this.toPrezFocusNode(r))}),e}getItem(){var e;const r=this.getByPrezId();if(r.length==0)throw new Error("Unable to find item");const n=this.toPrezFocusNode(r[0]);if((e=n.rdfTypes)!=null&&e.map(i=>i.value).includes(ua.skosConcept)){const i=this.getConcepts(r[0]);return{...n,topConcepts:{narrowers:i,hasChildren:i.length>0}}}return n}getSubItems(e){const r=this.store.getQuads(null,e,null,null),n=[];return r.forEach(i=>{const a=this.toPrezFocusNode(i.object);a&&n.push(a)}),n}search(){return this.getSubjects(ua.a,xn.searchResult).map(e=>({hash:e.value.split("urn:hash:").slice(-1)[0],weight:Number(this.getObjects(e.value,xn.searchResultWeight)[0].value),predicate:this.toPrezTerm(this.getObjects(e.value,xn.searchResultPredicate)[0]),match:this.toPrezTerm(this.getObjects(e.value,xn.searchResultMatch)[0]),resource:this.toPrezFocusNode(this.getObjects(e.value,xn.searchResultURI)[0])}))}getFacets(){const e=[];return this.store.getQuads(null,xn.facetName,null,null).forEach(r=>{var n,i,a,s,o,l,u,h,d;if(r.subject.termType=="BlankNode"){const f=G9(r.subject.value);f.properties=this.getProperties(r.subject);const p=Number((a=(i=(n=f.properties)==null?void 0:n[xn.facetCount])==null?void 0:i.objects)==null?void 0:a[0].value)||0,g=(l=(o=(s=f.properties)==null?void 0:s[xn.facetName])==null?void 0:o.objects)==null?void 0:l[0],m=(d=(h=(u=f.properties)==null?void 0:u[xn.facetValue])==null?void 0:h.objects)==null?void 0:d[0],v=g,y=e.find(b=>b.facetName.value==(v==null?void 0:v.value));if(p>0&&v!==void 0&&m!==void 0){const b=this.toPrezTerm(m);if(b.termType==="Literal"||b.termType==="NamedNode"){const x={term:b,count:p};y?y.facetValues.push(x):e.push({facetName:v,facetValues:[x]})}}}}),e}}class Wle extends Error{constructor(e){super(e),this.name="NetworkError"}}function Hle(t){let e={};const r=t.split(",").map(i=>{const[,a,s]=i.trim().match(/<(.+)>; (.+)/),o={uri:a};return s.split("; ").forEach(l=>{const[,u,h]=l.match(/(.+)=[\"<](.+)[\">]/);o[u]=h}),o});r.filter(i=>i.rel==="type").forEach(i=>{e[i.anchor]={default:!1,current:!1,token:i.token,mediatypes:[],title:i.title,description:"",uri:i.anchor}});const n=r.find(i=>i.rel==="self");return n.format in e&&(e[n.format].current=!0),r.filter(i=>i.rel==="alternate"&&i.format).forEach(i=>{e[i.format].mediatypes.map(a=>a.mediatype).includes(i.type)||e[i.format].mediatypes.push({title:"",mediatype:i.type,default:!1})}),Object.values(e)}async function S5(t){const e=await fetch(t,{method:"GET",headers:{Accept:"text/anot+turtle"}});if(!e.ok)throw new Wle(`Network error - status code ${e.status}: ${e.statusText}`);const r=e.headers.get("link")||e.headers.get("Link"),n=r?Hle(r):[];return{data:await e.text(),profiles:n}}async function qle(t,e){const r=t+e,n=new URL(r).pathname,{data:i,profiles:a}=await S5(r),s=new E5;return s.setBaseUrl(t),s.load(i),{type:"list",data:s.getList(),profiles:a,maxReached:s.getMaxReached(),count:s.getCount(),parents:s.getParents(n),facets:s.getFacets()}}async function Yle(t,e){const r=t+e,n=new URL(r).pathname,{data:i,profiles:a}=await S5(r),s=new E5;return s.setBaseUrl(t),s.load(i),{type:"item",data:s.getItem(),profiles:a,parents:s.getParents(n),store:s,facets:s.getFacets()}}async function jle(t,e){const r=t+e,n=new URL(r).pathname,{data:i,profiles:a}=await S5(r),s=new E5;return s.setBaseUrl(t),s.load(i),{type:"search",data:s.search(),profiles:a,maxReached:s.getMaxReached(),count:s.getCount(),parents:s.getParents(n),facets:s.getFacets()}}const ha=T.defineComponent({__name:"Skeleton",props:{class:{}},setup(t){const e=t;return(r,n)=>(T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass(T.unref(yn)("animate-pulse rounded-md bg-muted",e.class))},null,2))}}),Xle={key:0},Kle={class:"p-4 border-b"},Qle={key:1},Zle={class:"flex flex-row justify-between items-center"},Jle={key:2,class:"space-y-4"},ece={key:3},tce={class:"space-y-4"},rce={key:4},nce={key:0,class:"mb-4 mt-8"},ice={class:"space-y-4"},ey=T.defineComponent({__name:"Loading",props:{variant:{}},setup(t){const e=t;return(r,n)=>e.variant=="list"?(T.openBlock(),T.createElementBlock("div",Xle,[T.createElementVNode("div",Kle,[T.createVNode(T.unref(ha),{class:"h-4 w-16"})]),(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList([...Array(4).keys()],i=>(T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass(`p-4 ${i<3?"border-b":""}`)},[T.createVNode(T.unref(ha),{class:"h-4 w-[250px]"})],2))),256))])):e.variant=="search"?(T.openBlock(),T.createElementBlock("div",Qle,[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList([...Array(4).keys()],i=>(T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass(`p-4 flex flex-col gap-2 ${i<3?"border-b":""}`)},[T.createElementVNode("div",Zle,[T.createVNode(T.unref(ha),{class:"h-4 w-44"}),T.createVNode(T.unref(ha),{class:"h-4 w-24"})]),T.createVNode(T.unref(ha),{class:"h-4 w-[400px]"})],2))),256))])):e.variant=="concept"?(T.openBlock(),T.createElementBlock("div",Jle,[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList([...Array(6).keys()],i=>(T.openBlock(),T.createBlock(T.unref(ha),{class:"h-4 w-44",key:i}))),128))])):e.variant=="item"?(T.openBlock(),T.createElementBlock("div",ece,[T.createElementVNode("div",tce,[T.createVNode(T.unref(ha),{class:"h-4 w-[300px]"}),T.createVNode(T.unref(ha),{class:"h-4 w-[200px]"})]),(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList([...Array(4).keys()],i=>(T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass(`p-4 flex flex-row gap-4 mt-4 ${i<3?"border-b":""}`)},[T.createVNode(T.unref(ha),{class:"h-4 w-28"}),T.createVNode(T.unref(ha),{class:"h-4 w-48"})],2))),256))])):(T.openBlock(),T.createElementBlock("div",rce,[e.variant=="item-table"?(T.openBlock(),T.createElementBlock("hr",nce)):T.createCommentVNode("",!0),T.createElementVNode("div",ice,[T.createVNode(T.unref(ha),{class:"h-4 w-[300px]"}),T.createVNode(T.unref(ha),{class:"h-4 w-[200px]"})]),(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList([...Array(4).keys()],i=>(T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass(`p-4 flex flex-row gap-4 mt-4 ${i<3?"border-b":""}`)},[T.createVNode(T.unref(ha),{class:"h-4 w-28"}),T.createVNode(T.unref(ha),{class:"h-4 w-48"})],2))),256))]))}}),ace=T.defineComponent({__name:"Alert",props:{class:{},variant:{}},setup(t){const e=t;return(r,n)=>(T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass(T.unref(yn)(T.unref(lce)({variant:r.variant}),e.class)),role:"alert"},[T.renderSlot(r.$slots,"default")],2))}}),sce=T.defineComponent({__name:"AlertDescription",props:{class:{}},setup(t){const e=t;return(r,n)=>(T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass(T.unref(yn)("text-sm [&_p]:leading-relaxed",e.class))},[T.renderSlot(r.$slots,"default")],2))}}),oce=T.defineComponent({__name:"AlertTitle",props:{class:{}},setup(t){const e=t;return(r,n)=>(T.openBlock(),T.createElementBlock("h5",{class:T.normalizeClass(T.unref(yn)("mb-1 font-medium leading-none tracking-tight",e.class))},[T.renderSlot(r.$slots,"default")],2))}}),lce=S3("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),ZR=T.defineComponent({__name:"Message",props:{severity:{},text:{}},setup(t){const e=t;return(r,n)=>(T.openBlock(),T.createBlock(T.unref(ace),{variant:e.severity==="error"?"destructive":"default",class:"message"},{default:T.withCtx(()=>[e.severity==="error"?(T.openBlock(),T.createBlock(T.unref(Ste),{key:0,class:"w-4 h-4"})):(T.openBlock(),T.createBlock(T.unref(NA),{key:1,class:"w-4 h-4"})),T.createVNode(T.unref(oce),null,{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(e.severity==="error"?"Error":"Message"),1)]),_:1}),T.createVNode(T.unref(sce),null,{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(e.text),1)]),_:1})]),_:1},8,["variant"]))}}),cce=T.defineComponent({__name:"DataProvider",props:{baseUrl:{},urlPath:{},url:{},data:{},type:{},loadingVariant:{},_components:{default:()=>({loading:ey,message:ZR})}},setup(t){const e=t,r=T.ref(),n=T.ref(!1),i=T.ref(!1),a=T.ref(),s=T.ref([]),o=T.ref(e.url||e.baseUrl+e.urlPath),l=T.ref(e.baseUrl||Gle(o.value)),u=T.ref(e.urlPath?e.urlPath:o.value.startsWith(l.value)?o.value.substring(l.value.length):o.value),h=e.loadingVariant||e.type,d=async()=>{if(a.value=void 0,n.value=!1,s.value=[],!o.value){a.value=new Error("No data URL provided");return}n.value=!0;try{const f=e.type=="list"?qle(l.value,u.value):e.type=="item"?Yle(l.value,u.value):e.type=="search"?jle(l.value,u.value):void 0;if(!f)throw new Error(`Unknown type "${e.type}"`);const p=await f;if(e.type==="list"&&Array.isArray(p.data)&&(r.value===void 0||Array.isArray(r.value.data)))if(r.value===void 0)r.value=p;else if(Array.isArray(r.value.data)){const g=[...r.value.data];g.push(...p.data),r.value.data=g}else r.value=p;else r.value=p;i.value=Array.isArray(p.data)&&p.data.length>0}catch(f){a.value=f,console.error("Error fetching data:",f)}finally{n.value=!1}};return T.watch([()=>e.url,()=>e.baseUrl,()=>e.urlPath],async([f,p,g],[m,v,y])=>{(f!==m||p!==v||g!==y)&&await d()},{immediate:!0}),T.onMounted(async()=>{r.value=void 0}),(f,p)=>(T.openBlock(),T.createElementBlock(T.Fragment,null,[T.createTextVNode(T.toDisplayString(o.value)+" - "+T.toDisplayString(u.value)+" ",1),n.value?T.renderSlot(f.$slots,"loading",{key:0},()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(e._components.loading),{variant:T.unref(h)},null,8,["variant"]))]):a.value?T.renderSlot(f.$slots,"error",{key:1,error:a.value},()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(e._components.message),{severity:"error",text:a.value.message},null,8,["text"]))]):r.value?T.renderSlot(f.$slots,"default",{key:2,data:r.value,item:r.value.data,list:r.value.data,hasMore:i.value,concepts:r.value.data,parents:r.value.parents,properties:s.value,profiles:r.value.profiles,type:r.value.type,url:o.value,baseUrl:l.value}):T.createCommentVNode("",!0)],64))}}),uce=T.defineComponent({__name:"DropdownMenu",props:{defaultOpen:{type:Boolean},open:{type:Boolean},dir:{},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const i=al(t,e);return(a,s)=>(T.openBlock(),T.createBlock(T.unref(Uie),T.normalizeProps(T.guardReactiveProps(T.unref(i))),{default:T.withCtx(()=>[T.renderSlot(a.$slots,"default")]),_:3},16))}}),hce=T.defineComponent({__name:"DropdownMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(t,{emit:e}){const r=t,n=e,i=T.computed(()=>{const{class:s,...o}=r;return o}),a=al(i,n);return(s,o)=>(T.openBlock(),T.createBlock(T.unref(Wie),null,{default:T.withCtx(()=>[T.createVNode(T.unref(Hie),T.mergeProps(T.unref(a),{class:T.unref(yn)("z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r.class)}),{default:T.withCtx(()=>[T.renderSlot(s.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),JR=T.defineComponent({__name:"DropdownMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},setup(t){const e=t,r=T.computed(()=>{const{class:i,...a}=e;return a}),n=wv(r);return(i,a)=>(T.openBlock(),T.createBlock(T.unref(qie),T.mergeProps(T.unref(n),{class:T.unref(yn)("relative flex cursor-default select-none items-center rounded-sm gap-2 px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",i.inset&&"pl-8",e.class)}),{default:T.withCtx(()=>[T.renderSlot(i.$slots,"default")]),_:3},16,["class"]))}}),dce=T.defineComponent({__name:"DropdownMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const r=wv(t);return(n,i)=>(T.openBlock(),T.createBlock(T.unref(Gie),T.mergeProps({class:"outline-none"},T.unref(r)),{default:T.withCtx(()=>[T.renderSlot(n.$slots,"default")]),_:3},16))}}),fce={class:"inline-flex gap-1 items-center"},pce=["href","title","target","rel"],gce={key:1},mce=["href","title","target","rel"],eI="item-link",_d=T.defineComponent({__name:"ItemLink",props:{variant:{},to:{},secondaryTo:{},title:{},target:{default:"_blank"},rel:{default:"noopener noreferrer"},class:{},copyLink:{type:[Boolean,String]},hidePrimaryLink:{type:Boolean},hideSecondaryLink:{type:Boolean},hideTitle:{type:Boolean},useSecondaryLinkOnly:{type:Boolean},_components:{default:()=>({copyButton:U9})}},setup(t){var h,d,f,p;const e=t;let r=e.hideSecondaryLink||!1,n=e.hideTitle||!1,i=e.target;switch(e.variant){case"item-table":break;case"item-list":break;case"item-header":break;case"search-results":n=!0;break}const a=typeof e.to=="string"?e.to:(h=e.to)!=null&&h.links?(f=(d=e.to)==null?void 0:d.links[0])==null?void 0:f.value:void 0,s=e.secondaryTo!==void 0?typeof e.secondaryTo=="string"?e.secondaryTo:((p=e.secondaryTo)==null?void 0:p.value)||"":e.to&&typeof e.to=="object"?e.to.value:"",o=a?a.startsWith("http")||a.startsWith("mailto"):!1,l=s?s.startsWith("http")||s.startsWith("mailto"):!1,u=e.class?eI+" "+e.class:eI;return(g,m)=>T.renderSlot(g.$slots,"wrapper",{url:T.unref(a),title:e.title,secondaryUrl:T.unref(s),target:T.unref(i)},()=>[T.createElementVNode("span",fce,[T.unref(a)&&!e.hidePrimaryLink?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[T.unref(o)?(T.openBlock(),T.createElementBlock("a",{key:0,class:T.normalizeClass(T.unref(u)),href:T.unref(a),title:T.unref(n)?void 0:e.title,target:e.target,rel:e.rel},[T.renderSlot(g.$slots,"default")],10,pce)):(T.openBlock(),T.createBlock(T.unref(ao.RouterLink),{key:1,class:T.normalizeClass(T.unref(u)),to:T.unref(a),title:T.unref(n)?void 0:e.title},{default:T.withCtx(()=>[T.renderSlot(g.$slots,"default")]),_:3},8,["class","to","title"]))],64)):(T.openBlock(),T.createElementBlock("span",gce,[T.renderSlot(g.$slots,"default")])),T.unref(s)&&!T.unref(r)?(T.openBlock(),T.createElementBlock(T.Fragment,{key:2},[T.unref(l)?(T.openBlock(),T.createElementBlock("a",{key:0,href:T.unref(s),title:T.unref(n)?void 0:e.title,target:e.target,rel:e.rel,class:T.normalizeClass(T.unref(u))},[T.createVNode(T.unref(Ate),{class:"w-4 h-4"})],10,mce)):(T.openBlock(),T.createBlock(T.unref(ao.RouterLink),{key:1,to:T.unref(s),title:T.unref(n)?void 0:e.title,class:T.normalizeClass(T.unref(u))},{default:T.withCtx(()=>[T.createVNode(T.unref(Mte),{class:"w-4 h-4"})]),_:1},8,["to","title","class"]))],64)):T.createCommentVNode("",!0),e.copyLink?(T.openBlock(),T.createBlock(T.resolveDynamicComponent(e._components.copyButton),{key:3,"icon-only":"",value:typeof g.copyLink=="string"?g.copyLink:T.unref(a)||T.unref(s),size:"icon",variant:"outline"},null,8,["value"])):T.createCommentVNode("",!0)])])}}),Cu=T.defineComponent({__name:"Node",props:{term:{},hideTooltip:{type:Boolean},hideLink:{type:Boolean},useExternalLinkOnly:{type:Boolean},textOnly:{type:Boolean},variant:{},_components:{default:()=>({itemLink:_d})}},setup(t){var u,h;const e=t;let r=e.hideTooltip||!1,n=e.textOnly||!1,i=e.hideLink||!1,a=e.useExternalLinkOnly||!1;switch(e.variant){case"item-table":break;case"item-list":break;case"item-header":i=!0;break}const s=e.term,o=(u=s.label)!=null&&u.value?s.label.value:s.curie?s.curie:s.value;let l=((h=s.description)==null?void 0:h.value)||s.curie||s.value;return l==o&&(o!=s.value?l=s.value:l=void 0),(d,f)=>T.renderSlot(d.$slots,"wrapper",{term:T.unref(s),link:T.unref(s).value,label:T.unref(o),tooltip:T.unref(l),variant:d.variant},()=>[T.unref(n)||T.unref(i)?T.renderSlot(d.$slots,"default",{key:0,term:T.unref(s),link:T.unref(s).value,label:T.unref(o),tooltip:T.unref(l)},()=>[T.createTextVNode(T.toDisplayString(T.unref(o)),1)]):(T.openBlock(),T.createBlock(T.resolveDynamicComponent(e._components.itemLink),{key:1,to:T.unref(a)?T.unref(s).value:T.unref(s),title:T.unref(r)?void 0:T.unref(l),variant:d.variant},{default:T.withCtx(()=>[T.renderSlot(d.$slots,"default",{term:T.unref(s),link:T.unref(s).value,label:T.unref(o),tooltip:T.unref(l)},()=>[T.createTextVNode(T.toDisplayString(T.unref(o)),1)])]),_:3},8,["to","title","variant"]))])}});/*! @license DOMPurify 3.2.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.5/LICENSE */const{entries:tI,setPrototypeOf:rI,isFrozen:vce,getPrototypeOf:yce,getOwnPropertyDescriptor:bce}=Object;let{freeze:Gi,seal:ns,create:nI}=Object,{apply:_5,construct:C5}=typeof Reflect<"u"&&Reflect;Gi||(Gi=function(e){return e}),ns||(ns=function(e){return e}),_5||(_5=function(e,r,n){return e.apply(r,n)}),C5||(C5=function(e,r){return new e(...r)});const ty=Hi(Array.prototype.forEach),xce=Hi(Array.prototype.lastIndexOf),iI=Hi(Array.prototype.pop),Np=Hi(Array.prototype.push),wce=Hi(Array.prototype.splice),ry=Hi(String.prototype.toLowerCase),A5=Hi(String.prototype.toString),aI=Hi(String.prototype.match),Fp=Hi(String.prototype.replace),Tce=Hi(String.prototype.indexOf),kce=Hi(String.prototype.trim),Bs=Hi(Object.prototype.hasOwnProperty),Wi=Hi(RegExp.prototype.test),zp=Ece(TypeError);function Hi(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return _5(t,e,n)}}function Ece(t){return function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return C5(t,r)}}function hr(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ry;rI&&rI(t,null);let n=e.length;for(;n--;){let i=e[n];if(typeof i=="string"){const a=r(i);a!==i&&(vce(e)||(e[n]=a),i=a)}t[i]=!0}return t}function Sce(t){for(let e=0;e<t.length;e++)Bs(t,e)||(t[e]=null);return t}function Au(t){const e=nI(null);for(const[r,n]of tI(t))Bs(t,r)&&(Array.isArray(n)?e[r]=Sce(n):n&&typeof n=="object"&&n.constructor===Object?e[r]=Au(n):e[r]=n);return e}function $p(t,e){for(;t!==null;){const n=bce(t,e);if(n){if(n.get)return Hi(n.get);if(typeof n.value=="function")return Hi(n.value)}t=yce(t)}function r(){return null}return r}const sI=Gi(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),L5=Gi(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),R5=Gi(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),_ce=Gi(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),I5=Gi(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Cce=Gi(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),oI=Gi(["#text"]),lI=Gi(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),M5=Gi(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),cI=Gi(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ny=Gi(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ace=ns(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Lce=ns(/<%[\w\W]*|[\w\W]*%>/gm),Rce=ns(/\$\{[\w\W]*/gm),Ice=ns(/^data-[\-\w.\u00B7-\uFFFF]+$/),Mce=ns(/^aria-[\-\w]+$/),uI=ns(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Dce=ns(/^(?:\w+script|data):/i),Oce=ns(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),hI=ns(/^html$/i),Bce=ns(/^[a-z][.\w]*(-[.\w]+)+$/i);var dI=Object.freeze({__proto__:null,ARIA_ATTR:Mce,ATTR_WHITESPACE:Oce,CUSTOM_ELEMENT:Bce,DATA_ATTR:Ice,DOCTYPE_NAME:hI,ERB_EXPR:Lce,IS_ALLOWED_URI:uI,IS_SCRIPT_OR_DATA:Dce,MUSTACHE_EXPR:Ace,TMPLIT_EXPR:Rce});const Vp={element:1,text:3,progressingInstruction:7,comment:8,document:9},Pce=function(){return typeof window>"u"?null:window},Nce=function(e,r){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));const a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},fI=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function pI(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Pce();const e=vt=>pI(vt);if(e.version="3.2.5",e.removed=[],!t||!t.document||t.document.nodeType!==Vp.document||!t.Element)return e.isSupported=!1,e;let{document:r}=t;const n=r,i=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:o,Element:l,NodeFilter:u,NamedNodeMap:h=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=t,g=l.prototype,m=$p(g,"cloneNode"),v=$p(g,"remove"),y=$p(g,"nextSibling"),b=$p(g,"childNodes"),x=$p(g,"parentNode");if(typeof s=="function"){const vt=r.createElement("template");vt.content&&vt.content.ownerDocument&&(r=vt.content.ownerDocument)}let k,E="";const{implementation:C,createNodeIterator:S,createDocumentFragment:R,getElementsByTagName:L}=r,{importNode:I}=n;let _=fI();e.isSupported=typeof tI=="function"&&typeof x=="function"&&C&&C.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:M,ERB_EXPR:N,TMPLIT_EXPR:A,DATA_ATTR:D,ARIA_ATTR:B,IS_SCRIPT_OR_DATA:P,ATTR_WHITESPACE:O,CUSTOM_ELEMENT:F}=dI;let{IS_ALLOWED_URI:U}=dI,$=null;const j=hr({},[...sI,...L5,...R5,...I5,...oI]);let X=null;const ee=hr({},[...lI,...M5,...cI,...ny]);let se=Object.seal(nI(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ae=null,ge=null,we=!0,re=!0,te=!1,ne=!0,J=!1,q=!0,Q=!1,Z=!1,ke=!1,he=!1,oe=!1,Me=!1,xe=!0,We=!1;const Ne="user-content-";let Ve=!0,Be=!1,$e={},De=null;const z=hr({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let H=null;const G=hr({},["audio","video","img","source","image","track"]);let pe=null;const Y=hr({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ie="http://www.w3.org/1998/Math/MathML",V="http://www.w3.org/2000/svg",de="http://www.w3.org/1999/xhtml";let ue=de,be=!1,ve=null;const Se=hr({},[ie,V,de],A5);let Re=hr({},["mi","mo","mn","ms","mtext"]),Le=hr({},["annotation-xml"]);const je=hr({},["title","style","font","a","script"]);let rt=null;const Qe=["application/xhtml+xml","text/html"],et="text/html";let tt=null,He=null;const ce=r.createElement("form"),ye=function(Ie){return Ie instanceof RegExp||Ie instanceof Function},ze=function(){let Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(He&&He===Ie)){if((!Ie||typeof Ie!="object")&&(Ie={}),Ie=Au(Ie),rt=Qe.indexOf(Ie.PARSER_MEDIA_TYPE)===-1?et:Ie.PARSER_MEDIA_TYPE,tt=rt==="application/xhtml+xml"?A5:ry,$=Bs(Ie,"ALLOWED_TAGS")?hr({},Ie.ALLOWED_TAGS,tt):j,X=Bs(Ie,"ALLOWED_ATTR")?hr({},Ie.ALLOWED_ATTR,tt):ee,ve=Bs(Ie,"ALLOWED_NAMESPACES")?hr({},Ie.ALLOWED_NAMESPACES,A5):Se,pe=Bs(Ie,"ADD_URI_SAFE_ATTR")?hr(Au(Y),Ie.ADD_URI_SAFE_ATTR,tt):Y,H=Bs(Ie,"ADD_DATA_URI_TAGS")?hr(Au(G),Ie.ADD_DATA_URI_TAGS,tt):G,De=Bs(Ie,"FORBID_CONTENTS")?hr({},Ie.FORBID_CONTENTS,tt):z,ae=Bs(Ie,"FORBID_TAGS")?hr({},Ie.FORBID_TAGS,tt):{},ge=Bs(Ie,"FORBID_ATTR")?hr({},Ie.FORBID_ATTR,tt):{},$e=Bs(Ie,"USE_PROFILES")?Ie.USE_PROFILES:!1,we=Ie.ALLOW_ARIA_ATTR!==!1,re=Ie.ALLOW_DATA_ATTR!==!1,te=Ie.ALLOW_UNKNOWN_PROTOCOLS||!1,ne=Ie.ALLOW_SELF_CLOSE_IN_ATTR!==!1,J=Ie.SAFE_FOR_TEMPLATES||!1,q=Ie.SAFE_FOR_XML!==!1,Q=Ie.WHOLE_DOCUMENT||!1,he=Ie.RETURN_DOM||!1,oe=Ie.RETURN_DOM_FRAGMENT||!1,Me=Ie.RETURN_TRUSTED_TYPE||!1,ke=Ie.FORCE_BODY||!1,xe=Ie.SANITIZE_DOM!==!1,We=Ie.SANITIZE_NAMED_PROPS||!1,Ve=Ie.KEEP_CONTENT!==!1,Be=Ie.IN_PLACE||!1,U=Ie.ALLOWED_URI_REGEXP||uI,ue=Ie.NAMESPACE||de,Re=Ie.MATHML_TEXT_INTEGRATION_POINTS||Re,Le=Ie.HTML_INTEGRATION_POINTS||Le,se=Ie.CUSTOM_ELEMENT_HANDLING||{},Ie.CUSTOM_ELEMENT_HANDLING&&ye(Ie.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(se.tagNameCheck=Ie.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Ie.CUSTOM_ELEMENT_HANDLING&&ye(Ie.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(se.attributeNameCheck=Ie.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Ie.CUSTOM_ELEMENT_HANDLING&&typeof Ie.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(se.allowCustomizedBuiltInElements=Ie.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),J&&(re=!1),oe&&(he=!0),$e&&($=hr({},oI),X=[],$e.html===!0&&(hr($,sI),hr(X,lI)),$e.svg===!0&&(hr($,L5),hr(X,M5),hr(X,ny)),$e.svgFilters===!0&&(hr($,R5),hr(X,M5),hr(X,ny)),$e.mathMl===!0&&(hr($,I5),hr(X,cI),hr(X,ny))),Ie.ADD_TAGS&&($===j&&($=Au($)),hr($,Ie.ADD_TAGS,tt)),Ie.ADD_ATTR&&(X===ee&&(X=Au(X)),hr(X,Ie.ADD_ATTR,tt)),Ie.ADD_URI_SAFE_ATTR&&hr(pe,Ie.ADD_URI_SAFE_ATTR,tt),Ie.FORBID_CONTENTS&&(De===z&&(De=Au(De)),hr(De,Ie.FORBID_CONTENTS,tt)),Ve&&($["#text"]=!0),Q&&hr($,["html","head","body"]),$.table&&(hr($,["tbody"]),delete ae.tbody),Ie.TRUSTED_TYPES_POLICY){if(typeof Ie.TRUSTED_TYPES_POLICY.createHTML!="function")throw zp('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Ie.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw zp('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');k=Ie.TRUSTED_TYPES_POLICY,E=k.createHTML("")}else k===void 0&&(k=Nce(p,i)),k!==null&&typeof E=="string"&&(E=k.createHTML(""));Gi&&Gi(Ie),He=Ie}},Oe=hr({},[...L5,...R5,..._ce]),Ke=hr({},[...I5,...Cce]),Xe=function(Ie){let nt=x(Ie);(!nt||!nt.tagName)&&(nt={namespaceURI:ue,tagName:"template"});const wt=ry(Ie.tagName),sr=ry(nt.tagName);return ve[Ie.namespaceURI]?Ie.namespaceURI===V?nt.namespaceURI===de?wt==="svg":nt.namespaceURI===ie?wt==="svg"&&(sr==="annotation-xml"||Re[sr]):!!Oe[wt]:Ie.namespaceURI===ie?nt.namespaceURI===de?wt==="math":nt.namespaceURI===V?wt==="math"&&Le[sr]:!!Ke[wt]:Ie.namespaceURI===de?nt.namespaceURI===V&&!Le[sr]||nt.namespaceURI===ie&&!Re[sr]?!1:!Ke[wt]&&(je[wt]||!Oe[wt]):!!(rt==="application/xhtml+xml"&&ve[Ie.namespaceURI]):!1},Je=function(Ie){Np(e.removed,{element:Ie});try{x(Ie).removeChild(Ie)}catch{v(Ie)}},ut=function(Ie,nt){try{Np(e.removed,{attribute:nt.getAttributeNode(Ie),from:nt})}catch{Np(e.removed,{attribute:null,from:nt})}if(nt.removeAttribute(Ie),Ie==="is")if(he||oe)try{Je(nt)}catch{}else try{nt.setAttribute(Ie,"")}catch{}},ht=function(Ie){let nt=null,wt=null;if(ke)Ie="<remove></remove>"+Ie;else{const jr=aI(Ie,/^[\r\n\t ]+/);wt=jr&&jr[0]}rt==="application/xhtml+xml"&&ue===de&&(Ie='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Ie+"</body></html>");const sr=k?k.createHTML(Ie):Ie;if(ue===de)try{nt=new f().parseFromString(sr,rt)}catch{}if(!nt||!nt.documentElement){nt=C.createDocument(ue,"template",null);try{nt.documentElement.innerHTML=be?E:sr}catch{}}const $r=nt.body||nt.documentElement;return Ie&&wt&&$r.insertBefore(r.createTextNode(wt),$r.childNodes[0]||null),ue===de?L.call(nt,Q?"html":"body")[0]:Q?nt.documentElement:$r},ft=function(Ie){return S.call(Ie.ownerDocument||Ie,Ie,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},mt=function(Ie){return Ie instanceof d&&(typeof Ie.nodeName!="string"||typeof Ie.textContent!="string"||typeof Ie.removeChild!="function"||!(Ie.attributes instanceof h)||typeof Ie.removeAttribute!="function"||typeof Ie.setAttribute!="function"||typeof Ie.namespaceURI!="string"||typeof Ie.insertBefore!="function"||typeof Ie.hasChildNodes!="function")},ar=function(Ie){return typeof o=="function"&&Ie instanceof o};function At(vt,Ie,nt){ty(vt,wt=>{wt.call(e,Ie,nt,He)})}const cr=function(Ie){let nt=null;if(At(_.beforeSanitizeElements,Ie,null),mt(Ie))return Je(Ie),!0;const wt=tt(Ie.nodeName);if(At(_.uponSanitizeElement,Ie,{tagName:wt,allowedTags:$}),Ie.hasChildNodes()&&!ar(Ie.firstElementChild)&&Wi(/<[/\w!]/g,Ie.innerHTML)&&Wi(/<[/\w!]/g,Ie.textContent)||Ie.nodeType===Vp.progressingInstruction||q&&Ie.nodeType===Vp.comment&&Wi(/<[/\w]/g,Ie.data))return Je(Ie),!0;if(!$[wt]||ae[wt]){if(!ae[wt]&&Zt(wt)&&(se.tagNameCheck instanceof RegExp&&Wi(se.tagNameCheck,wt)||se.tagNameCheck instanceof Function&&se.tagNameCheck(wt)))return!1;if(Ve&&!De[wt]){const sr=x(Ie)||Ie.parentNode,$r=b(Ie)||Ie.childNodes;if($r&&sr){const jr=$r.length;for(let Br=jr-1;Br>=0;--Br){const Mn=m($r[Br],!0);Mn.__removalCount=(Ie.__removalCount||0)+1,sr.insertBefore(Mn,y(Ie))}}}return Je(Ie),!0}return Ie instanceof l&&!Xe(Ie)||(wt==="noscript"||wt==="noembed"||wt==="noframes")&&Wi(/<\/no(script|embed|frames)/i,Ie.innerHTML)?(Je(Ie),!0):(J&&Ie.nodeType===Vp.text&&(nt=Ie.textContent,ty([M,N,A],sr=>{nt=Fp(nt,sr," ")}),Ie.textContent!==nt&&(Np(e.removed,{element:Ie.cloneNode()}),Ie.textContent=nt)),At(_.afterSanitizeElements,Ie,null),!1)},tr=function(Ie,nt,wt){if(xe&&(nt==="id"||nt==="name")&&(wt in r||wt in ce))return!1;if(!(re&&!ge[nt]&&Wi(D,nt))){if(!(we&&Wi(B,nt))){if(!X[nt]||ge[nt]){if(!(Zt(Ie)&&(se.tagNameCheck instanceof RegExp&&Wi(se.tagNameCheck,Ie)||se.tagNameCheck instanceof Function&&se.tagNameCheck(Ie))&&(se.attributeNameCheck instanceof RegExp&&Wi(se.attributeNameCheck,nt)||se.attributeNameCheck instanceof Function&&se.attributeNameCheck(nt))||nt==="is"&&se.allowCustomizedBuiltInElements&&(se.tagNameCheck instanceof RegExp&&Wi(se.tagNameCheck,wt)||se.tagNameCheck instanceof Function&&se.tagNameCheck(wt))))return!1}else if(!pe[nt]){if(!Wi(U,Fp(wt,O,""))){if(!((nt==="src"||nt==="xlink:href"||nt==="href")&&Ie!=="script"&&Tce(wt,"data:")===0&&H[Ie])){if(!(te&&!Wi(P,Fp(wt,O,"")))){if(wt)return!1}}}}}}return!0},Zt=function(Ie){return Ie!=="annotation-xml"&&aI(Ie,F)},zt=function(Ie){At(_.beforeSanitizeAttributes,Ie,null);const{attributes:nt}=Ie;if(!nt||mt(Ie))return;const wt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:X,forceKeepAttr:void 0};let sr=nt.length;for(;sr--;){const $r=nt[sr],{name:jr,namespaceURI:Br,value:Mn}=$r,Vi=tt(jr);let Gr=jr==="value"?Mn:kce(Mn);if(wt.attrName=Vi,wt.attrValue=Gr,wt.keepAttr=!0,wt.forceKeepAttr=void 0,At(_.uponSanitizeAttribute,Ie,wt),Gr=wt.attrValue,We&&(Vi==="id"||Vi==="name")&&(ut(jr,Ie),Gr=Ne+Gr),q&&Wi(/((--!?|])>)|<\/(style|title)/i,Gr)){ut(jr,Ie);continue}if(wt.forceKeepAttr||(ut(jr,Ie),!wt.keepAttr))continue;if(!ne&&Wi(/\/>/i,Gr)){ut(jr,Ie);continue}J&&ty([M,N,A],Lt=>{Gr=Fp(Gr,Lt," ")});const Dn=tt(Ie.nodeName);if(tr(Dn,Vi,Gr)){if(k&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!Br)switch(p.getAttributeType(Dn,Vi)){case"TrustedHTML":{Gr=k.createHTML(Gr);break}case"TrustedScriptURL":{Gr=k.createScriptURL(Gr);break}}try{Br?Ie.setAttributeNS(Br,jr,Gr):Ie.setAttribute(jr,Gr),mt(Ie)?Je(Ie):iI(e.removed)}catch{}}}At(_.afterSanitizeAttributes,Ie,null)},vr=function vt(Ie){let nt=null;const wt=ft(Ie);for(At(_.beforeSanitizeShadowDOM,Ie,null);nt=wt.nextNode();)At(_.uponSanitizeShadowNode,nt,null),cr(nt),zt(nt),nt.content instanceof a&&vt(nt.content);At(_.afterSanitizeShadowDOM,Ie,null)};return e.sanitize=function(vt){let Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},nt=null,wt=null,sr=null,$r=null;if(be=!vt,be&&(vt="<!-->"),typeof vt!="string"&&!ar(vt))if(typeof vt.toString=="function"){if(vt=vt.toString(),typeof vt!="string")throw zp("dirty is not a string, aborting")}else throw zp("toString is not a function");if(!e.isSupported)return vt;if(Z||ze(Ie),e.removed=[],typeof vt=="string"&&(Be=!1),Be){if(vt.nodeName){const Mn=tt(vt.nodeName);if(!$[Mn]||ae[Mn])throw zp("root node is forbidden and cannot be sanitized in-place")}}else if(vt instanceof o)nt=ht("<!---->"),wt=nt.ownerDocument.importNode(vt,!0),wt.nodeType===Vp.element&&wt.nodeName==="BODY"||wt.nodeName==="HTML"?nt=wt:nt.appendChild(wt);else{if(!he&&!J&&!Q&&vt.indexOf("<")===-1)return k&&Me?k.createHTML(vt):vt;if(nt=ht(vt),!nt)return he?null:Me?E:""}nt&&ke&&Je(nt.firstChild);const jr=ft(Be?vt:nt);for(;sr=jr.nextNode();)cr(sr),zt(sr),sr.content instanceof a&&vr(sr.content);if(Be)return vt;if(he){if(oe)for($r=R.call(nt.ownerDocument);nt.firstChild;)$r.appendChild(nt.firstChild);else $r=nt;return(X.shadowroot||X.shadowrootmode)&&($r=I.call(n,$r,!0)),$r}let Br=Q?nt.outerHTML:nt.innerHTML;return Q&&$["!doctype"]&&nt.ownerDocument&&nt.ownerDocument.doctype&&nt.ownerDocument.doctype.name&&Wi(hI,nt.ownerDocument.doctype.name)&&(Br="<!DOCTYPE "+nt.ownerDocument.doctype.name+`>
104
+ `;super(e),this.name="AggregateError",this.errors=t}},ArrayIsArray(t){return Array.isArray(t)},ArrayPrototypeIncludes(t,e){return t.includes(e)},ArrayPrototypeIndexOf(t,e){return t.indexOf(e)},ArrayPrototypeJoin(t,e){return t.join(e)},ArrayPrototypeMap(t,e){return t.map(e)},ArrayPrototypePop(t,e){return t.pop(e)},ArrayPrototypePush(t,e){return t.push(e)},ArrayPrototypeSlice(t,e,r){return t.slice(e,r)},Error,FunctionPrototypeCall(t,e,...r){return t.call(e,...r)},FunctionPrototypeSymbolHasInstance(t,e){return Function.prototype[Symbol.hasInstance].call(t,e)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(t,e){return Object.defineProperties(t,e)},ObjectDefineProperty(t,e,r){return Object.defineProperty(t,e,r)},ObjectGetOwnPropertyDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)},ObjectKeys(t){return Object.keys(t)},ObjectSetPrototypeOf(t,e){return Object.setPrototypeOf(t,e)},Promise,PromisePrototypeCatch(t,e){return t.catch(e)},PromisePrototypeThen(t,e,r){return t.then(e,r)},PromiseReject(t){return Promise.reject(t)},PromiseResolve(t){return Promise.resolve(t)},ReflectApply:Reflect.apply,RegExpPrototypeTest(t,e){return t.test(e)},SafeSet:Set,String,StringPrototypeSlice(t,e,r){return t.slice(e,r)},StringPrototypeToLowerCase(t){return t.toLowerCase()},StringPrototypeToUpperCase(t){return t.toUpperCase()},StringPrototypeTrim(t){return t.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(t,e,r){return t.set(e,r)},Boolean,Uint8Array},cL={exports:{}},uL={format(t,...e){return t.replace(/%([sdifj])/g,function(...[r,n]){const i=e.shift();return n==="f"?i.toFixed(6):n==="j"?JSON.stringify(i):n==="s"&&typeof i=="object"?`${i.constructor!==Object?i.constructor.name:""} {}`.trim():i.toString()})},inspect(t){switch(typeof t){case"string":if(t.includes("'"))if(t.includes('"')){if(!t.includes("`")&&!t.includes("${"))return`\`${t}\``}else return`"${t}"`;return`'${t}'`;case"number":return isNaN(t)?"NaN":Object.is(t,-0)?String(t):t;case"bigint":return`${String(t)}n`;case"boolean":case"undefined":return String(t);case"object":return"{}"}}};const{format:Iae,inspect:Dv}=uL,{AggregateError:Mae}=nn,Dae=globalThis.AggregateError||Mae,Oae=Symbol("kIsNodeError"),Bae=["string","function","number","object","Function","Object","boolean","bigint","symbol"],Pae=/^([A-Z][a-z0-9]*)+$/,Nae="__node_internal_",Ov={};function bu(t,e){if(!t)throw new Ov.ERR_INTERNAL_ASSERTION(e)}function hL(t){let e="",r=t.length;const n=t[0]==="-"?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function Fae(t,e,r){if(typeof e=="function")return bu(e.length<=r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${e.length}).`),e(...r);const n=(e.match(/%[dfijoOs]/g)||[]).length;return bu(n===r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${n}).`),r.length===0?e:Iae(e,...r)}function fi(t,e,r){r||(r=Error);class n extends r{constructor(...a){super(Fae(t,e,a))}toString(){return`${this.name} [${t}]: ${this.message}`}}Object.defineProperties(n.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),n.prototype.code=t,n.prototype[Oae]=!0,Ov[t]=n}function dL(t){const e=Nae+t.name;return Object.defineProperty(t,"name",{value:e}),t}function zae(t,e){if(t&&e&&t!==e){if(Array.isArray(e.errors))return e.errors.push(t),e;const r=new Dae([e,t],e.message);return r.code=e.code,r}return t||e}let $ae=class extends Error{constructor(t="The operation was aborted",e=void 0){if(e!==void 0&&typeof e!="object")throw new Ov.ERR_INVALID_ARG_TYPE("options","Object",e);super(t,e),this.code="ABORT_ERR",this.name="AbortError"}};fi("ERR_ASSERTION","%s",Error),fi("ERR_INVALID_ARG_TYPE",(t,e,r)=>{bu(typeof t=="string","'name' must be a string"),Array.isArray(e)||(e=[e]);let n="The ";t.endsWith(" argument")?n+=`${t} `:n+=`"${t}" ${t.includes(".")?"property":"argument"} `,n+="must be ";const i=[],a=[],s=[];for(const l of e)bu(typeof l=="string","All expected entries have to be of type string"),Bae.includes(l)?i.push(l.toLowerCase()):Pae.test(l)?a.push(l):(bu(l!=="object",'The value "object" should be written as "Object"'),s.push(l));if(a.length>0){const l=i.indexOf("object");l!==-1&&(i.splice(i,l,1),a.push("Object"))}if(i.length>0){switch(i.length){case 1:n+=`of type ${i[0]}`;break;case 2:n+=`one of type ${i[0]} or ${i[1]}`;break;default:{const l=i.pop();n+=`one of type ${i.join(", ")}, or ${l}`}}(a.length>0||s.length>0)&&(n+=" or ")}if(a.length>0){switch(a.length){case 1:n+=`an instance of ${a[0]}`;break;case 2:n+=`an instance of ${a[0]} or ${a[1]}`;break;default:{const l=a.pop();n+=`an instance of ${a.join(", ")}, or ${l}`}}s.length>0&&(n+=" or ")}switch(s.length){case 0:break;case 1:s[0].toLowerCase()!==s[0]&&(n+="an "),n+=`${s[0]}`;break;case 2:n+=`one of ${s[0]} or ${s[1]}`;break;default:{const l=s.pop();n+=`one of ${s.join(", ")}, or ${l}`}}if(r==null)n+=`. Received ${r}`;else if(typeof r=="function"&&r.name)n+=`. Received function ${r.name}`;else if(typeof r=="object"){var o;if((o=r.constructor)!==null&&o!==void 0&&o.name)n+=`. Received an instance of ${r.constructor.name}`;else{const l=Dv(r,{depth:-1});n+=`. Received ${l}`}}else{let l=Dv(r,{colors:!1});l.length>25&&(l=`${l.slice(0,25)}...`),n+=`. Received type ${typeof r} (${l})`}return n},TypeError),fi("ERR_INVALID_ARG_VALUE",(t,e,r="is invalid")=>{let n=Dv(e);return n.length>128&&(n=n.slice(0,128)+"..."),`The ${t.includes(".")?"property":"argument"} '${t}' ${r}. Received ${n}`},TypeError),fi("ERR_INVALID_RETURN_VALUE",(t,e,r)=>{var n;const i=r!=null&&(n=r.constructor)!==null&&n!==void 0&&n.name?`instance of ${r.constructor.name}`:`type ${typeof r}`;return`Expected ${t} to be returned from the "${e}" function but got ${i}.`},TypeError),fi("ERR_MISSING_ARGS",(...t)=>{bu(t.length>0,"At least one arg needs to be specified");let e;const r=t.length;switch(t=(Array.isArray(t)?t:[t]).map(n=>`"${n}"`).join(" or "),r){case 1:e+=`The ${t[0]} argument`;break;case 2:e+=`The ${t[0]} and ${t[1]} arguments`;break;default:{const n=t.pop();e+=`The ${t.join(", ")}, and ${n} arguments`}break}return`${e} must be specified`},TypeError),fi("ERR_OUT_OF_RANGE",(t,e,r)=>{bu(e,'Missing "range" argument');let n;if(Number.isInteger(r)&&Math.abs(r)>2**32)n=hL(String(r));else if(typeof r=="bigint"){n=String(r);const i=BigInt(2)**BigInt(32);(r>i||r<-i)&&(n=hL(n)),n+="n"}else n=Dv(r);return`The value of "${t}" is out of range. It must be ${e}. Received ${n}`},RangeError),fi("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),fi("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),fi("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),fi("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),fi("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),fi("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),fi("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),fi("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),fi("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),fi("ERR_STREAM_WRITE_AFTER_END","write after end",Error),fi("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError);var Ui={AbortError:$ae,aggregateTwoErrors:dL(zae),hideStackFrames:dL,codes:Ov},Ap={exports:{}},fL;function Lp(){if(fL)return Ap.exports;fL=1;const{AbortController:t,AbortSignal:e}=typeof self<"u"?self:typeof window<"u"?window:void 0;return Ap.exports=t,Ap.exports.AbortSignal=e,Ap.exports.default=t,Ap.exports}var O3={exports:{}},vd=typeof Reflect=="object"?Reflect:null,pL=vd&&typeof vd.apply=="function"?vd.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)},Bv;vd&&typeof vd.ownKeys=="function"?Bv=vd.ownKeys:Object.getOwnPropertySymbols?Bv=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Bv=function(t){return Object.getOwnPropertyNames(t)};function Vae(t){console&&console.warn&&console.warn(t)}var gL=Number.isNaN||function(t){return t!==t};function Pr(){Pr.init.call(this)}O3.exports=Pr,O3.exports.once=Hae,Pr.EventEmitter=Pr,Pr.prototype._events=void 0,Pr.prototype._eventsCount=0,Pr.prototype._maxListeners=void 0;var mL=10;function Pv(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(Pr,"defaultMaxListeners",{enumerable:!0,get:function(){return mL},set:function(t){if(typeof t!="number"||t<0||gL(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");mL=t}}),Pr.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Pr.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||gL(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function vL(t){return t._maxListeners===void 0?Pr.defaultMaxListeners:t._maxListeners}Pr.prototype.getMaxListeners=function(){return vL(this)},Pr.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var n=t==="error",i=this._events;if(i!==void 0)n=n&&i.error===void 0;else if(!n)return!1;if(n){var a;if(e.length>0&&(a=e[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var o=i[t];if(o===void 0)return!1;if(typeof o=="function")pL(o,this,e);else for(var l=o.length,u=TL(o,l),r=0;r<l;++r)pL(u[r],this,e);return!0};function yL(t,e,r,n){var i,a,s;if(Pv(r),a=t._events,a===void 0?(a=t._events=Object.create(null),t._eventsCount=0):(a.newListener!==void 0&&(t.emit("newListener",e,r.listener?r.listener:r),a=t._events),s=a[e]),s===void 0)s=a[e]=r,++t._eventsCount;else if(typeof s=="function"?s=a[e]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),i=vL(t),i>0&&s.length>i&&!s.warned){s.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=t,o.type=e,o.count=s.length,Vae(o)}return t}Pr.prototype.addListener=function(t,e){return yL(this,t,e,!1)},Pr.prototype.on=Pr.prototype.addListener,Pr.prototype.prependListener=function(t,e){return yL(this,t,e,!0)};function Uae(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function bL(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=Uae.bind(n);return i.listener=r,n.wrapFn=i,i}Pr.prototype.once=function(t,e){return Pv(e),this.on(t,bL(this,t,e)),this},Pr.prototype.prependOnceListener=function(t,e){return Pv(e),this.prependListener(t,bL(this,t,e)),this},Pr.prototype.removeListener=function(t,e){var r,n,i,a,s;if(Pv(e),n=this._events,n===void 0)return this;if(r=n[t],r===void 0)return this;if(r===e||r.listener===e)--this._eventsCount===0?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if(typeof r!="function"){for(i=-1,a=r.length-1;a>=0;a--)if(r[a]===e||r[a].listener===e){s=r[a].listener,i=a;break}if(i<0)return this;i===0?r.shift():Gae(r,i),r.length===1&&(n[t]=r[0]),n.removeListener!==void 0&&this.emit("removeListener",t,s||e)}return this},Pr.prototype.off=Pr.prototype.removeListener,Pr.prototype.removeAllListeners=function(t){var e,r,n;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[t]),this;if(arguments.length===0){var i=Object.keys(r),a;for(n=0;n<i.length;++n)a=i[n],a!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(e=r[t],typeof e=="function")this.removeListener(t,e);else if(e!==void 0)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this};function xL(t,e,r){var n=t._events;if(n===void 0)return[];var i=n[e];return i===void 0?[]:typeof i=="function"?r?[i.listener||i]:[i]:r?Wae(i):TL(i,i.length)}Pr.prototype.listeners=function(t){return xL(this,t,!0)},Pr.prototype.rawListeners=function(t){return xL(this,t,!1)},Pr.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):wL.call(t,e)},Pr.prototype.listenerCount=wL;function wL(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}Pr.prototype.eventNames=function(){return this._eventsCount>0?Bv(this._events):[]};function TL(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function Gae(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function Wae(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}function Hae(t,e){return new Promise(function(r,n){function i(s){t.removeListener(e,a),n(s)}function a(){typeof t.removeListener=="function"&&t.removeListener("error",i),r([].slice.call(arguments))}kL(t,e,a,{once:!0}),e!=="error"&&qae(t,i,{once:!0})})}function qae(t,e,r){typeof t.on=="function"&&kL(t,"error",e,r)}function kL(t,e,r,n){if(typeof t.on=="function")n.once?t.once(e,r):t.on(e,r);else if(typeof t.addEventListener=="function")t.addEventListener(e,function i(a){n.once&&t.removeEventListener(e,i),r(a)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}var Nv=O3.exports;(function(t){const e=co,{format:r,inspect:n}=uL,{codes:{ERR_INVALID_ARG_TYPE:i}}=Ui,{kResistStopPropagation:a,AggregateError:s,SymbolDispose:o}=nn,l=globalThis.AbortSignal||Lp().AbortSignal,u=globalThis.AbortController||Lp().AbortController,h=Object.getPrototypeOf(async function(){}).constructor,d=globalThis.Blob||e.Blob,f=typeof d<"u"?function(m){return m instanceof d}:function(m){return!1},p=(m,v)=>{if(m!==void 0&&(m===null||typeof m!="object"||!("aborted"in m)))throw new i(v,"AbortSignal",m)},g=(m,v)=>{if(typeof m!="function")throw new i(v,"Function",m)};t.exports={AggregateError:s,kEmptyObject:Object.freeze({}),once(m){let v=!1;return function(...y){v||(v=!0,m.apply(this,y))}},createDeferredPromise:function(){let m,v;return{promise:new Promise((y,b)=>{m=y,v=b}),resolve:m,reject:v}},promisify(m){return new Promise((v,y)=>{m((b,...x)=>b?y(b):v(...x))})},debuglog(){return function(){}},format:r,inspect:n,types:{isAsyncFunction(m){return m instanceof h},isArrayBufferView(m){return ArrayBuffer.isView(m)}},isBlob:f,deprecate(m,v){return m},addAbortListener:Nv.addAbortListener||function(m,v){if(m===void 0)throw new i("signal","AbortSignal",m);p(m,"signal"),g(v,"listener");let y;return m.aborted?queueMicrotask(()=>v()):(m.addEventListener("abort",v,{__proto__:null,once:!0,[a]:!0}),y=()=>{m.removeEventListener("abort",v)}),{__proto__:null,[o](){var b;(b=y)===null||b===void 0||b()}}},AbortSignalAny:l.any||function(m){if(m.length===1)return m[0];const v=new u,y=()=>v.abort();return m.forEach(b=>{p(b,"signals"),b.addEventListener("abort",y,{once:!0})}),v.signal.addEventListener("abort",()=>{m.forEach(b=>b.removeEventListener("abort",y))},{once:!0}),v.signal}},t.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")})(cL);var la=cL.exports,B3={};const{ArrayIsArray:EL,ArrayPrototypeIncludes:Yae,ArrayPrototypeJoin:jae,ArrayPrototypeMap:Xae,NumberIsInteger:P3,NumberMAX_SAFE_INTEGER:Kae,NumberMIN_SAFE_INTEGER:Qae,ObjectPrototypeHasOwnProperty:Zae,String:Jae}=nn,{hideStackFrames:ts,codes:{ERR_INVALID_ARG_TYPE:rs,ERR_INVALID_ARG_VALUE:SL,ERR_OUT_OF_RANGE:yd}}=Ui,{normalizeEncoding:mje}=la,{isAsyncFunction:ese,isArrayBufferView:tse}=la.types,rse=ts((t,e,r=Qae,n=Kae)=>{if(typeof t!="number")throw new rs(e,"number",t);if(!P3(t))throw new yd(e,"an integer",t);if(t<r||t>n)throw new yd(e,`>= ${r} && <= ${n}`,t)});ts((t,e,r=-2147483648,n=2147483647)=>{if(typeof t!="number")throw new rs(e,"number",t);if(!P3(t))throw new yd(e,"an integer",t);if(t<r||t>n)throw new yd(e,`>= ${r} && <= ${n}`,t)}),ts((t,e,r=!1)=>{if(typeof t!="number")throw new rs(e,"number",t);if(!P3(t))throw new yd(e,"an integer",t);const n=r?1:0,i=4294967295;if(t<n||t>i)throw new yd(e,`>= ${n} && <= ${i}`,t)}),ts((t,e,r)=>{if(!Yae(r,t)){const n="must be one of: "+jae(Xae(r,i=>typeof i=="string"?`'${i}'`:Jae(i)),", ");throw new SL(e,t,n)}});function nse(t,e){if(typeof t!="boolean")throw new rs(e,"boolean",t)}function N3(t,e,r){return t==null||!Zae(t,e)?r:t[e]}const ise=ts((t,e,r=null)=>{const n=N3(r,"allowArray",!1),i=N3(r,"allowFunction",!1);if(!N3(r,"nullable",!1)&&t===null||!n&&EL(t)||typeof t!="object"&&(!i||typeof t!="function"))throw new rs(e,"Object",t)});ts((t,e)=>{if(t!=null&&typeof t!="object"&&typeof t!="function")throw new rs(e,"a dictionary",t)}),ts((t,e,r=0)=>{if(!EL(t))throw new rs(e,"Array",t);if(t.length<r){const n=`must be longer than ${r}`;throw new SL(e,t,n)}}),ts((t,e="buffer")=>{if(!tse(t))throw new rs(e,["Buffer","TypedArray","DataView"],t)});const ase=ts((t,e)=>{if(t!==void 0&&(t===null||typeof t!="object"||!("aborted"in t)))throw new rs(e,"AbortSignal",t)}),sse=ts((t,e)=>{if(typeof t!="function")throw new rs(e,"Function",t)});ts((t,e)=>{if(typeof t!="function"||ese(t))throw new rs(e,"Function",t)}),ts((t,e)=>{if(t!==void 0)throw new rs(e,"undefined",t)});var Rp={validateBoolean:nse,validateFunction:sse,validateInteger:rse,validateObject:ise,validateAbortSignal:ase},F3={exports:{}},_L={exports:{}},bn=_L.exports={},ho,fo;function z3(){throw new Error("setTimeout has not been defined")}function $3(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?ho=setTimeout:ho=z3}catch{ho=z3}try{typeof clearTimeout=="function"?fo=clearTimeout:fo=$3}catch{fo=$3}})();function CL(t){if(ho===setTimeout)return setTimeout(t,0);if((ho===z3||!ho)&&setTimeout)return ho=setTimeout,setTimeout(t,0);try{return ho(t,0)}catch{try{return ho.call(null,t,0)}catch{return ho.call(this,t,0)}}}function ose(t){if(fo===clearTimeout)return clearTimeout(t);if((fo===$3||!fo)&&clearTimeout)return fo=clearTimeout,clearTimeout(t);try{return fo(t)}catch{try{return fo.call(null,t)}catch{return fo.call(this,t)}}}var ol=[],bd=!1,xu,Fv=-1;function lse(){!bd||!xu||(bd=!1,xu.length?ol=xu.concat(ol):Fv=-1,ol.length&&AL())}function AL(){if(!bd){var t=CL(lse);bd=!0;for(var e=ol.length;e;){for(xu=ol,ol=[];++Fv<e;)xu&&xu[Fv].run();Fv=-1,e=ol.length}xu=null,bd=!1,ose(t)}}bn.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];ol.push(new LL(t,e)),ol.length===1&&!bd&&CL(AL)};function LL(t,e){this.fun=t,this.array=e}LL.prototype.run=function(){this.fun.apply(null,this.array)},bn.title="browser",bn.browser=!0,bn.env={},bn.argv=[],bn.version="",bn.versions={};function ll(){}bn.on=ll,bn.addListener=ll,bn.once=ll,bn.off=ll,bn.removeListener=ll,bn.removeAllListeners=ll,bn.emit=ll,bn.prependListener=ll,bn.prependOnceListener=ll,bn.listeners=function(t){return[]},bn.binding=function(t){throw new Error("process.binding is not supported")},bn.cwd=function(){return"/"},bn.chdir=function(t){throw new Error("process.chdir is not supported")},bn.umask=function(){return 0};var wu=_L.exports;const{SymbolAsyncIterator:RL,SymbolIterator:IL,SymbolFor:Tu}=nn,ML=Tu("nodejs.stream.destroyed"),cse=Tu("nodejs.stream.errored"),DL=Tu("nodejs.stream.readable"),OL=Tu("nodejs.stream.writable"),use=Tu("nodejs.stream.disturbed"),hse=Tu("nodejs.webstream.isClosedPromise"),dse=Tu("nodejs.webstream.controllerErrorFunction");function V3(t,e=!1){var r;return!!(t&&typeof t.pipe=="function"&&typeof t.on=="function"&&(!e||typeof t.pause=="function"&&typeof t.resume=="function")&&(!t._writableState||((r=t._readableState)===null||r===void 0?void 0:r.readable)!==!1)&&(!t._writableState||t._readableState))}function zv(t){var e;return!!(t&&typeof t.write=="function"&&typeof t.on=="function"&&(!t._readableState||((e=t._writableState)===null||e===void 0?void 0:e.writable)!==!1))}function fse(t){return!!(t&&typeof t.pipe=="function"&&t._readableState&&typeof t.on=="function"&&typeof t.write=="function")}function po(t){return t&&(t._readableState||t._writableState||typeof t.write=="function"&&typeof t.on=="function"||typeof t.pipe=="function"&&typeof t.on=="function")}function BL(t){return!!(t&&!po(t)&&typeof t.pipeThrough=="function"&&typeof t.getReader=="function"&&typeof t.cancel=="function")}function PL(t){return!!(t&&!po(t)&&typeof t.getWriter=="function"&&typeof t.abort=="function")}function NL(t){return!!(t&&!po(t)&&typeof t.readable=="object"&&typeof t.writable=="object")}function pse(t){return BL(t)||PL(t)||NL(t)}function gse(t,e){return t==null?!1:e===!0?typeof t[RL]=="function":e===!1?typeof t[IL]=="function":typeof t[RL]=="function"||typeof t[IL]=="function"}function $v(t){if(!po(t))return null;const e=t._writableState,r=t._readableState,n=e||r;return!!(t.destroyed||t[ML]||n!=null&&n.destroyed)}function mse(t){if(!zv(t))return null;if(t.writableEnded===!0)return!0;const e=t._writableState;return e!=null&&e.errored?!1:typeof(e==null?void 0:e.ended)!="boolean"?null:e.ended}function vse(t,e){if(!zv(t))return null;if(t.writableFinished===!0)return!0;const r=t._writableState;return r!=null&&r.errored?!1:typeof(r==null?void 0:r.finished)!="boolean"?null:!!(r.finished||e===!1&&r.ended===!0&&r.length===0)}function FL(t,e){if(!V3(t))return null;const r=t._readableState;return r!=null&&r.errored?!1:typeof(r==null?void 0:r.endEmitted)!="boolean"?null:!!(r.endEmitted||e===!1&&r.ended===!0&&r.length===0)}function zL(t){return t&&t[DL]!=null?t[DL]:typeof(t==null?void 0:t.readable)!="boolean"?null:$v(t)?!1:V3(t)&&t.readable&&!FL(t)}function $L(t){return t&&t[OL]!=null?t[OL]:typeof(t==null?void 0:t.writable)!="boolean"?null:$v(t)?!1:zv(t)&&t.writable&&!mse(t)}function yse(t,e){return po(t)?$v(t)?!0:!((e==null?void 0:e.readable)!==!1&&zL(t)||(e==null?void 0:e.writable)!==!1&&$L(t)):null}function bse(t){var e,r;return po(t)?t.writableErrored?t.writableErrored:(e=(r=t._writableState)===null||r===void 0?void 0:r.errored)!==null&&e!==void 0?e:null:null}function xse(t){var e,r;return po(t)?t.readableErrored?t.readableErrored:(e=(r=t._readableState)===null||r===void 0?void 0:r.errored)!==null&&e!==void 0?e:null:null}function wse(t){if(!po(t))return null;if(typeof t.closed=="boolean")return t.closed;const e=t._writableState,r=t._readableState;return typeof(e==null?void 0:e.closed)=="boolean"||typeof(r==null?void 0:r.closed)=="boolean"?(e==null?void 0:e.closed)||(r==null?void 0:r.closed):typeof t._closed=="boolean"&&VL(t)?t._closed:null}function VL(t){return typeof t._closed=="boolean"&&typeof t._defaultKeepAlive=="boolean"&&typeof t._removedConnection=="boolean"&&typeof t._removedContLen=="boolean"}function Tse(t){return typeof t._sent100=="boolean"&&VL(t)}function kse(t){var e;return typeof t._consuming=="boolean"&&typeof t._dumped=="boolean"&&((e=t.req)===null||e===void 0?void 0:e.upgradeOrConnect)===void 0}function Ese(t){if(!po(t))return null;const e=t._writableState,r=t._readableState,n=e||r;return!n&&Tse(t)||!!(n&&n.autoDestroy&&n.emitClose&&n.closed===!1)}function Sse(t){var e;return!!(t&&((e=t[use])!==null&&e!==void 0?e:t.readableDidRead||t.readableAborted))}function _se(t){var e,r,n,i,a,s,o,l,u,h;return!!(t&&((e=(r=(n=(i=(a=(s=t[cse])!==null&&s!==void 0?s:t.readableErrored)!==null&&a!==void 0?a:t.writableErrored)!==null&&i!==void 0?i:(o=t._readableState)===null||o===void 0?void 0:o.errorEmitted)!==null&&n!==void 0?n:(l=t._writableState)===null||l===void 0?void 0:l.errorEmitted)!==null&&r!==void 0?r:(u=t._readableState)===null||u===void 0?void 0:u.errored)!==null&&e!==void 0?e:!((h=t._writableState)===null||h===void 0)&&h.errored))}var cl={isDestroyed:$v,kIsDestroyed:ML,isDisturbed:Sse,isErrored:_se,isReadable:zL,kIsClosedPromise:hse,kControllerErrorFunction:dse,isClosed:wse,isDuplexNodeStream:fse,isFinished:yse,isIterable:gse,isReadableNodeStream:V3,isReadableStream:BL,isReadableFinished:FL,isReadableErrored:xse,isNodeStream:po,isWebStream:pse,isWritable:$L,isWritableNodeStream:zv,isWritableStream:PL,isWritableFinished:vse,isWritableErrored:bse,isServerRequest:kse,willEmitClose:Ese,isTransformStream:NL};const xd=wu,{AbortError:UL,codes:Cse}=Ui,{ERR_INVALID_ARG_TYPE:Ase,ERR_STREAM_PREMATURE_CLOSE:GL}=Cse,{kEmptyObject:U3,once:G3}=la,{validateAbortSignal:Lse,validateFunction:Rse,validateObject:Ise,validateBoolean:Mse}=Rp,{Promise:Dse,PromisePrototypeThen:Ose,SymbolDispose:WL}=nn,{isClosed:Bse,isReadable:HL,isReadableNodeStream:W3,isReadableStream:Pse,isReadableFinished:qL,isReadableErrored:YL,isWritable:jL,isWritableNodeStream:XL,isWritableStream:Nse,isWritableFinished:KL,isWritableErrored:QL,isNodeStream:Fse,willEmitClose:zse,kIsClosedPromise:$se}=cl;let wd;function Vse(t){return t.setHeader&&typeof t.abort=="function"}const H3=()=>{};function ZL(t,e,r){var n,i;if(arguments.length===2?(r=e,e=U3):e==null?e=U3:Ise(e,"options"),Rse(r,"callback"),Lse(e.signal,"options.signal"),r=G3(r),Pse(t)||Nse(t))return Use(t,e,r);if(!Fse(t))throw new Ase("stream",["ReadableStream","WritableStream","Stream"],t);const a=(n=e.readable)!==null&&n!==void 0?n:W3(t),s=(i=e.writable)!==null&&i!==void 0?i:XL(t),o=t._writableState,l=t._readableState,u=()=>{t.writable||f()};let h=zse(t)&&W3(t)===a&&XL(t)===s,d=KL(t,!1);const f=()=>{d=!0,t.destroyed&&(h=!1),!(h&&(!t.readable||a))&&(!a||p)&&r.call(t)};let p=qL(t,!1);const g=()=>{p=!0,t.destroyed&&(h=!1),!(h&&(!t.writable||s))&&(!s||d)&&r.call(t)},m=E=>{r.call(t,E)};let v=Bse(t);const y=()=>{v=!0;const E=QL(t)||YL(t);if(E&&typeof E!="boolean")return r.call(t,E);if(a&&!p&&W3(t,!0)&&!qL(t,!1))return r.call(t,new GL);if(s&&!d&&!KL(t,!1))return r.call(t,new GL);r.call(t)},b=()=>{v=!0;const E=QL(t)||YL(t);if(E&&typeof E!="boolean")return r.call(t,E);r.call(t)},x=()=>{t.req.on("finish",f)};Vse(t)?(t.on("complete",f),h||t.on("abort",y),t.req?x():t.on("request",x)):s&&!o&&(t.on("end",u),t.on("close",u)),!h&&typeof t.aborted=="boolean"&&t.on("aborted",y),t.on("end",g),t.on("finish",f),e.error!==!1&&t.on("error",m),t.on("close",y),v?xd.nextTick(y):o!=null&&o.errorEmitted||l!=null&&l.errorEmitted?h||xd.nextTick(b):(!a&&(!h||HL(t))&&(d||jL(t)===!1)||!s&&(!h||jL(t))&&(p||HL(t)===!1)||l&&t.req&&t.aborted)&&xd.nextTick(b);const k=()=>{r=H3,t.removeListener("aborted",y),t.removeListener("complete",f),t.removeListener("abort",y),t.removeListener("request",x),t.req&&t.req.removeListener("finish",f),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",f),t.removeListener("end",g),t.removeListener("error",m),t.removeListener("close",y)};if(e.signal&&!v){const E=()=>{const C=r;k(),C.call(t,new UL(void 0,{cause:e.signal.reason}))};if(e.signal.aborted)xd.nextTick(E);else{wd=wd||la.addAbortListener;const C=wd(e.signal,E),S=r;r=G3((...R)=>{C[WL](),S.apply(t,R)})}}return k}function Use(t,e,r){let n=!1,i=H3;if(e.signal)if(i=()=>{n=!0,r.call(t,new UL(void 0,{cause:e.signal.reason}))},e.signal.aborted)xd.nextTick(i);else{wd=wd||la.addAbortListener;const s=wd(e.signal,i),o=r;r=G3((...l)=>{s[WL](),o.apply(t,l)})}const a=(...s)=>{n||xd.nextTick(()=>r.apply(t,s))};return Ose(t[$se].promise,a,a),H3}function Gse(t,e){var r;let n=!1;return e===null&&(e=U3),(r=e)!==null&&r!==void 0&&r.cleanup&&(Mse(e.cleanup,"cleanup"),n=e.cleanup),new Dse((i,a)=>{const s=ZL(t,e,o=>{n&&s(),o?a(o):i()})})}F3.exports=ZL,F3.exports.finished=Gse;var dc=F3.exports;const go=wu,{aggregateTwoErrors:Wse,codes:{ERR_MULTIPLE_CALLBACK:Hse},AbortError:qse}=Ui,{Symbol:JL}=nn,{kIsDestroyed:Yse,isDestroyed:jse,isFinished:Xse,isServerRequest:Kse}=cl,eR=JL("kDestroy"),q3=JL("kConstruct");function tR(t,e,r){t&&(t.stack,e&&!e.errored&&(e.errored=t),r&&!r.errored&&(r.errored=t))}function Qse(t,e){const r=this._readableState,n=this._writableState,i=n||r;return n!=null&&n.destroyed||r!=null&&r.destroyed?(typeof e=="function"&&e(),this):(tR(t,n,r),n&&(n.destroyed=!0),r&&(r.destroyed=!0),i.constructed?rR(this,t,e):this.once(eR,function(a){rR(this,Wse(a,t),e)}),this)}function rR(t,e,r){let n=!1;function i(a){if(n)return;n=!0;const s=t._readableState,o=t._writableState;tR(a,o,s),o&&(o.closed=!0),s&&(s.closed=!0),typeof r=="function"&&r(a),a?go.nextTick(Zse,t,a):go.nextTick(nR,t)}try{t._destroy(e||null,i)}catch(a){i(a)}}function Zse(t,e){Y3(t,e),nR(t)}function nR(t){const e=t._readableState,r=t._writableState;r&&(r.closeEmitted=!0),e&&(e.closeEmitted=!0),(r!=null&&r.emitClose||e!=null&&e.emitClose)&&t.emit("close")}function Y3(t,e){const r=t._readableState,n=t._writableState;n!=null&&n.errorEmitted||r!=null&&r.errorEmitted||(n&&(n.errorEmitted=!0),r&&(r.errorEmitted=!0),t.emit("error",e))}function Jse(){const t=this._readableState,e=this._writableState;t&&(t.constructed=!0,t.closed=!1,t.closeEmitted=!1,t.destroyed=!1,t.errored=null,t.errorEmitted=!1,t.reading=!1,t.ended=t.readable===!1,t.endEmitted=t.readable===!1),e&&(e.constructed=!0,e.destroyed=!1,e.closed=!1,e.closeEmitted=!1,e.errored=null,e.errorEmitted=!1,e.finalCalled=!1,e.prefinished=!1,e.ended=e.writable===!1,e.ending=e.writable===!1,e.finished=e.writable===!1)}function j3(t,e,r){const n=t._readableState,i=t._writableState;if(i!=null&&i.destroyed||n!=null&&n.destroyed)return this;n!=null&&n.autoDestroy||i!=null&&i.autoDestroy?t.destroy(e):e&&(e.stack,i&&!i.errored&&(i.errored=e),n&&!n.errored&&(n.errored=e),r?go.nextTick(Y3,t,e):Y3(t,e))}function eoe(t,e){if(typeof t._construct!="function")return;const r=t._readableState,n=t._writableState;r&&(r.constructed=!1),n&&(n.constructed=!1),t.once(q3,e),!(t.listenerCount(q3)>1)&&go.nextTick(toe,t)}function toe(t){let e=!1;function r(n){if(e){j3(t,n??new Hse);return}e=!0;const i=t._readableState,a=t._writableState,s=a||i;i&&(i.constructed=!0),a&&(a.constructed=!0),s.destroyed?t.emit(eR,n):n?j3(t,n,!0):go.nextTick(roe,t)}try{t._construct(n=>{go.nextTick(r,n)})}catch(n){go.nextTick(r,n)}}function roe(t){t.emit(q3)}function iR(t){return(t==null?void 0:t.setHeader)&&typeof t.abort=="function"}function aR(t){t.emit("close")}function noe(t,e){t.emit("error",e),go.nextTick(aR,t)}function ioe(t,e){!t||jse(t)||(!e&&!Xse(t)&&(e=new qse),Kse(t)?(t.socket=null,t.destroy(e)):iR(t)?t.abort():iR(t.req)?t.req.abort():typeof t.destroy=="function"?t.destroy(e):typeof t.close=="function"?t.close():e?go.nextTick(noe,t,e):go.nextTick(aR,t),t.destroyed||(t[Yse]=!0))}var Td={construct:eoe,destroyer:ioe,destroy:Qse,undestroy:Jse,errorOrDestroy:j3};const{ArrayIsArray:aoe,ObjectSetPrototypeOf:sR}=nn,{EventEmitter:Vv}=Nv;function Uv(t){Vv.call(this,t)}sR(Uv.prototype,Vv.prototype),sR(Uv,Vv),Uv.prototype.pipe=function(t,e){const r=this;function n(h){t.writable&&t.write(h)===!1&&r.pause&&r.pause()}r.on("data",n);function i(){r.readable&&r.resume&&r.resume()}t.on("drain",i),!t._isStdio&&(!e||e.end!==!1)&&(r.on("end",s),r.on("close",o));let a=!1;function s(){a||(a=!0,t.end())}function o(){a||(a=!0,typeof t.destroy=="function"&&t.destroy())}function l(h){u(),Vv.listenerCount(this,"error")===0&&this.emit("error",h)}X3(r,"error",l),X3(t,"error",l);function u(){r.removeListener("data",n),t.removeListener("drain",i),r.removeListener("end",s),r.removeListener("close",o),r.removeListener("error",l),t.removeListener("error",l),r.removeListener("end",u),r.removeListener("close",u),t.removeListener("close",u)}return r.on("end",u),r.on("close",u),t.on("close",u),t.emit("pipe",r),t};function X3(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):aoe(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}var K3={Stream:Uv,prependListener:X3},oR={exports:{}};(function(t){const{SymbolDispose:e}=nn,{AbortError:r,codes:n}=Ui,{isNodeStream:i,isWebStream:a,kControllerErrorFunction:s}=cl,o=dc,{ERR_INVALID_ARG_TYPE:l}=n;let u;const h=(d,f)=>{if(typeof d!="object"||!("aborted"in d))throw new l(f,"AbortSignal",d)};t.exports.addAbortSignal=function(d,f){if(h(d,"signal"),!i(f)&&!a(f))throw new l("stream",["ReadableStream","WritableStream","Stream"],f);return t.exports.addAbortSignalNoValidate(d,f)},t.exports.addAbortSignalNoValidate=function(d,f){if(typeof d!="object"||!("aborted"in d))return f;const p=i(f)?()=>{f.destroy(new r(void 0,{cause:d.reason}))}:()=>{f[s](new r(void 0,{cause:d.reason}))};if(d.aborted)p();else{u=u||la.addAbortListener;const g=u(d,p);o(f,g[e])}return f}})(oR);var Gv=oR.exports;const{StringPrototypeSlice:lR,SymbolIterator:soe,TypedArrayPrototypeSet:Wv,Uint8Array:ooe}=nn,{Buffer:Q3}=co,{inspect:loe}=la;var coe=class{constructor(){this.head=null,this.tail=null,this.length=0}push(t){const e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}unshift(t){const e={data:t,next:this.head};this.length===0&&(this.tail=e),this.head=e,++this.length}shift(){if(this.length===0)return;const t=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,t}clear(){this.head=this.tail=null,this.length=0}join(t){if(this.length===0)return"";let e=this.head,r=""+e.data;for(;(e=e.next)!==null;)r+=t+e.data;return r}concat(t){if(this.length===0)return Q3.alloc(0);const e=Q3.allocUnsafe(t>>>0);let r=this.head,n=0;for(;r;)Wv(e,r.data,n),n+=r.data.length,r=r.next;return e}consume(t,e){const r=this.head.data;if(t<r.length){const n=r.slice(0,t);return this.head.data=r.slice(t),n}return t===r.length?this.shift():e?this._getString(t):this._getBuffer(t)}first(){return this.head.data}*[soe](){for(let t=this.head;t;t=t.next)yield t.data}_getString(t){let e="",r=this.head,n=0;do{const i=r.data;if(t>i.length)e+=i,t-=i.length;else{t===i.length?(e+=i,++n,r.next?this.head=r.next:this.head=this.tail=null):(e+=lR(i,0,t),this.head=r,r.data=lR(i,t));break}++n}while((r=r.next)!==null);return this.length-=n,e}_getBuffer(t){const e=Q3.allocUnsafe(t),r=t;let n=this.head,i=0;do{const a=n.data;if(t>a.length)Wv(e,a,r-t),t-=a.length;else{t===a.length?(Wv(e,a,r-t),++i,n.next?this.head=n.next:this.head=this.tail=null):(Wv(e,new ooe(a.buffer,a.byteOffset,t),r-t),this.head=n,n.data=a.slice(t));break}++i}while((n=n.next)!==null);return this.length-=i,e}[Symbol.for("nodejs.util.inspect.custom")](t,e){return loe(this,{...e,depth:0,customInspect:!1})}};const{MathFloor:uoe,NumberIsInteger:hoe}=nn,{validateInteger:doe}=Rp,{ERR_INVALID_ARG_VALUE:foe}=Ui.codes;let cR=16*1024,uR=16;function poe(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function hR(t){return t?uR:cR}function goe(t,e){doe(e,"value",0),t?uR=e:cR=e}function moe(t,e,r,n){const i=poe(e,n,r);if(i!=null){if(!hoe(i)||i<0){const a=n?`options.${r}`:"options.highWaterMark";throw new foe(a,i)}return uoe(i)}return hR(t.objectMode)}var Hv={getHighWaterMark:moe,getDefaultHighWaterMark:hR,setDefaultHighWaterMark:goe},dR={},Z3={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */(function(t,e){var r=co,n=r.Buffer;function i(s,o){for(var l in s)o[l]=s[l]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(i(r,e),e.Buffer=a);function a(s,o,l){return n(s,o,l)}a.prototype=Object.create(n.prototype),i(n,a),a.from=function(s,o,l){if(typeof s=="number")throw new TypeError("Argument must not be a number");return n(s,o,l)},a.alloc=function(s,o,l){if(typeof s!="number")throw new TypeError("Argument must be a number");var u=n(s);return o!==void 0?typeof l=="string"?u.fill(o,l):u.fill(o):u.fill(0),u},a.allocUnsafe=function(s){if(typeof s!="number")throw new TypeError("Argument must be a number");return n(s)},a.allocUnsafeSlow=function(s){if(typeof s!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(s)}})(Z3,Z3.exports);var voe=Z3.exports,J3=voe.Buffer,fR=J3.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function yoe(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function boe(t){var e=yoe(t);if(typeof e!="string"&&(J3.isEncoding===fR||!fR(t)))throw new Error("Unknown encoding: "+t);return e||t}dR.StringDecoder=Ip;function Ip(t){this.encoding=boe(t);var e;switch(this.encoding){case"utf16le":this.text=Soe,this.end=_oe,e=4;break;case"utf8":this.fillLast=Toe,e=4;break;case"base64":this.text=Coe,this.end=Aoe,e=3;break;default:this.write=Loe,this.end=Roe;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=J3.allocUnsafe(e)}Ip.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},Ip.prototype.end=Eoe,Ip.prototype.text=koe,Ip.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function e5(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function xoe(t,e,r){var n=e.length-1;if(n<r)return 0;var i=e5(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r||i===-2?0:(i=e5(e[n]),i>=0?(i>0&&(t.lastNeed=i-2),i):--n<r||i===-2?0:(i=e5(e[n]),i>=0?(i>0&&(i===2?i=0:t.lastNeed=i-3),i):0))}function woe(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"�"}}function Toe(t){var e=this.lastTotal-this.lastNeed,r=woe(this,t);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function koe(t,e){var r=xoe(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)}function Eoe(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e}function Soe(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function _oe(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function Coe(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function Aoe(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function Loe(t){return t.toString(this.encoding)}function Roe(t){return t&&t.length?this.write(t):""}const pR=wu,{PromisePrototypeThen:Ioe,SymbolAsyncIterator:gR,SymbolIterator:mR}=nn,{Buffer:Moe}=co,{ERR_INVALID_ARG_TYPE:Doe,ERR_STREAM_NULL_VALUES:Ooe}=Ui.codes;function Boe(t,e,r){let n;if(typeof e=="string"||e instanceof Moe)return new t({objectMode:!0,...r,read(){this.push(e),this.push(null)}});let i;if(e&&e[gR])i=!0,n=e[gR]();else if(e&&e[mR])i=!1,n=e[mR]();else throw new Doe("iterable",["Iterable"],e);const a=new t({objectMode:!0,highWaterMark:1,...r});let s=!1;a._read=function(){s||(s=!0,l())},a._destroy=function(u,h){Ioe(o(u),()=>pR.nextTick(h,u),d=>pR.nextTick(h,d||u))};async function o(u){const h=u!=null,d=typeof n.throw=="function";if(h&&d){const{value:f,done:p}=await n.throw(u);if(await f,p)return}if(typeof n.return=="function"){const{value:f}=await n.return();await f}}async function l(){for(;;){try{const{value:u,done:h}=i?await n.next():n.next();if(h)a.push(null);else{const d=u&&typeof u.then=="function"?await u:u;if(d===null)throw s=!1,new Ooe;if(a.push(d))continue;s=!1}}catch(u){a.destroy(u)}break}}return a}var vR=Boe,t5,yR;function qv(){if(yR)return t5;yR=1;const t=wu,{ArrayPrototypeIndexOf:e,NumberIsInteger:r,NumberIsNaN:n,NumberParseInt:i,ObjectDefineProperties:a,ObjectKeys:s,ObjectSetPrototypeOf:o,Promise:l,SafeSet:u,SymbolAsyncDispose:h,SymbolAsyncIterator:d,Symbol:f}=nn;t5=Ne,Ne.ReadableState=We;const{EventEmitter:p}=Nv,{Stream:g,prependListener:m}=K3,{Buffer:v}=co,{addAbortSignal:y}=Gv,b=dc;let x=la.debuglog("stream",ce=>{x=ce});const k=coe,E=Td,{getHighWaterMark:C,getDefaultHighWaterMark:S}=Hv,{aggregateTwoErrors:R,codes:{ERR_INVALID_ARG_TYPE:L,ERR_METHOD_NOT_IMPLEMENTED:I,ERR_OUT_OF_RANGE:_,ERR_STREAM_PUSH_AFTER_EOF:M,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:N},AbortError:A}=Ui,{validateObject:D}=Rp,B=f("kPaused"),{StringDecoder:P}=dR,O=vR;o(Ne.prototype,g.prototype),o(Ne,g);const F=()=>{},{errorOrDestroy:U}=E,$=1,j=2,X=4,ee=8,se=16,ae=32,ge=64,we=128,re=256,te=512,ne=1024,J=2048,q=4096,Q=8192,Z=16384,ke=32768,he=65536,oe=1<<17,Me=1<<18;function xe(ce){return{enumerable:!1,get(){return(this.state&ce)!==0},set(ye){ye?this.state|=ce:this.state&=~ce}}}a(We.prototype,{objectMode:xe($),ended:xe(j),endEmitted:xe(X),reading:xe(ee),constructed:xe(se),sync:xe(ae),needReadable:xe(ge),emittedReadable:xe(we),readableListening:xe(re),resumeScheduled:xe(te),errorEmitted:xe(ne),emitClose:xe(J),autoDestroy:xe(q),destroyed:xe(Q),closed:xe(Z),closeEmitted:xe(ke),multiAwaitDrain:xe(he),readingMore:xe(oe),dataEmitted:xe(Me)});function We(ce,ye,ze){typeof ze!="boolean"&&(ze=ye instanceof ul()),this.state=J|q|se|ae,ce&&ce.objectMode&&(this.state|=$),ze&&ce&&ce.readableObjectMode&&(this.state|=$),this.highWaterMark=ce?C(this,ce,"readableHighWaterMark",ze):S(!1),this.buffer=new k,this.length=0,this.pipes=[],this.flowing=null,this[B]=null,ce&&ce.emitClose===!1&&(this.state&=-2049),ce&&ce.autoDestroy===!1&&(this.state&=-4097),this.errored=null,this.defaultEncoding=ce&&ce.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,ce&&ce.encoding&&(this.decoder=new P(ce.encoding),this.encoding=ce.encoding)}function Ne(ce){if(!(this instanceof Ne))return new Ne(ce);const ye=this instanceof ul();this._readableState=new We(ce,this,ye),ce&&(typeof ce.read=="function"&&(this._read=ce.read),typeof ce.destroy=="function"&&(this._destroy=ce.destroy),typeof ce.construct=="function"&&(this._construct=ce.construct),ce.signal&&!ye&&y(ce.signal,this)),g.call(this,ce),E.construct(this,()=>{this._readableState.needReadable&&Y(this,this._readableState)})}Ne.prototype.destroy=E.destroy,Ne.prototype._undestroy=E.undestroy,Ne.prototype._destroy=function(ce,ye){ye(ce)},Ne.prototype[p.captureRejectionSymbol]=function(ce){this.destroy(ce)},Ne.prototype[h]=function(){let ce;return this.destroyed||(ce=this.readableEnded?null:new A,this.destroy(ce)),new l((ye,ze)=>b(this,Oe=>Oe&&Oe!==ce?ze(Oe):ye(null)))},Ne.prototype.push=function(ce,ye){return Ve(this,ce,ye,!1)},Ne.prototype.unshift=function(ce,ye){return Ve(this,ce,ye,!0)};function Ve(ce,ye,ze,Oe){x("readableAddChunk",ye);const Ke=ce._readableState;let Xe;if((Ke.state&$)===0&&(typeof ye=="string"?(ze=ze||Ke.defaultEncoding,Ke.encoding!==ze&&(Oe&&Ke.encoding?ye=v.from(ye,ze).toString(Ke.encoding):(ye=v.from(ye,ze),ze=""))):ye instanceof v?ze="":g._isUint8Array(ye)?(ye=g._uint8ArrayToBuffer(ye),ze=""):ye!=null&&(Xe=new L("chunk",["string","Buffer","Uint8Array"],ye))),Xe)U(ce,Xe);else if(ye===null)Ke.state&=-9,H(ce,Ke);else if((Ke.state&$)!==0||ye&&ye.length>0)if(Oe)if((Ke.state&X)!==0)U(ce,new N);else{if(Ke.destroyed||Ke.errored)return!1;Be(ce,Ke,ye,!0)}else if(Ke.ended)U(ce,new M);else{if(Ke.destroyed||Ke.errored)return!1;Ke.state&=-9,Ke.decoder&&!ze?(ye=Ke.decoder.write(ye),Ke.objectMode||ye.length!==0?Be(ce,Ke,ye,!1):Y(ce,Ke)):Be(ce,Ke,ye,!1)}else Oe||(Ke.state&=-9,Y(ce,Ke));return!Ke.ended&&(Ke.length<Ke.highWaterMark||Ke.length===0)}function Be(ce,ye,ze,Oe){ye.flowing&&ye.length===0&&!ye.sync&&ce.listenerCount("data")>0?((ye.state&he)!==0?ye.awaitDrainWriters.clear():ye.awaitDrainWriters=null,ye.dataEmitted=!0,ce.emit("data",ze)):(ye.length+=ye.objectMode?1:ze.length,Oe?ye.buffer.unshift(ze):ye.buffer.push(ze),(ye.state&ge)!==0&&G(ce)),Y(ce,ye)}Ne.prototype.isPaused=function(){const ce=this._readableState;return ce[B]===!0||ce.flowing===!1},Ne.prototype.setEncoding=function(ce){const ye=new P(ce);this._readableState.decoder=ye,this._readableState.encoding=this._readableState.decoder.encoding;const ze=this._readableState.buffer;let Oe="";for(const Ke of ze)Oe+=ye.write(Ke);return ze.clear(),Oe!==""&&ze.push(Oe),this._readableState.length=Oe.length,this};const $e=1073741824;function De(ce){if(ce>$e)throw new _("size","<= 1GiB",ce);return ce--,ce|=ce>>>1,ce|=ce>>>2,ce|=ce>>>4,ce|=ce>>>8,ce|=ce>>>16,ce++,ce}function z(ce,ye){return ce<=0||ye.length===0&&ye.ended?0:(ye.state&$)!==0?1:n(ce)?ye.flowing&&ye.length?ye.buffer.first().length:ye.length:ce<=ye.length?ce:ye.ended?ye.length:0}Ne.prototype.read=function(ce){x("read",ce),ce===void 0?ce=NaN:r(ce)||(ce=i(ce,10));const ye=this._readableState,ze=ce;if(ce>ye.highWaterMark&&(ye.highWaterMark=De(ce)),ce!==0&&(ye.state&=-129),ce===0&&ye.needReadable&&((ye.highWaterMark!==0?ye.length>=ye.highWaterMark:ye.length>0)||ye.ended))return x("read: emitReadable",ye.length,ye.ended),ye.length===0&&ye.ended?rt(this):G(this),null;if(ce=z(ce,ye),ce===0&&ye.ended)return ye.length===0&&rt(this),null;let Oe=(ye.state&ge)!==0;if(x("need readable",Oe),(ye.length===0||ye.length-ce<ye.highWaterMark)&&(Oe=!0,x("length less than watermark",Oe)),ye.ended||ye.reading||ye.destroyed||ye.errored||!ye.constructed)Oe=!1,x("reading, ended or constructing",Oe);else if(Oe){x("do read"),ye.state|=ee|ae,ye.length===0&&(ye.state|=ge);try{this._read(ye.highWaterMark)}catch(Xe){U(this,Xe)}ye.state&=-33,ye.reading||(ce=z(ze,ye))}let Ke;return ce>0?Ke=je(ce,ye):Ke=null,Ke===null?(ye.needReadable=ye.length<=ye.highWaterMark,ce=0):(ye.length-=ce,ye.multiAwaitDrain?ye.awaitDrainWriters.clear():ye.awaitDrainWriters=null),ye.length===0&&(ye.ended||(ye.needReadable=!0),ze!==ce&&ye.ended&&rt(this)),Ke!==null&&!ye.errorEmitted&&!ye.closeEmitted&&(ye.dataEmitted=!0,this.emit("data",Ke)),Ke};function H(ce,ye){if(x("onEofChunk"),!ye.ended){if(ye.decoder){const ze=ye.decoder.end();ze&&ze.length&&(ye.buffer.push(ze),ye.length+=ye.objectMode?1:ze.length)}ye.ended=!0,ye.sync?G(ce):(ye.needReadable=!1,ye.emittedReadable=!0,pe(ce))}}function G(ce){const ye=ce._readableState;x("emitReadable",ye.needReadable,ye.emittedReadable),ye.needReadable=!1,ye.emittedReadable||(x("emitReadable",ye.flowing),ye.emittedReadable=!0,t.nextTick(pe,ce))}function pe(ce){const ye=ce._readableState;x("emitReadable_",ye.destroyed,ye.length,ye.ended),!ye.destroyed&&!ye.errored&&(ye.length||ye.ended)&&(ce.emit("readable"),ye.emittedReadable=!1),ye.needReadable=!ye.flowing&&!ye.ended&&ye.length<=ye.highWaterMark,Se(ce)}function Y(ce,ye){!ye.readingMore&&ye.constructed&&(ye.readingMore=!0,t.nextTick(ie,ce,ye))}function ie(ce,ye){for(;!ye.reading&&!ye.ended&&(ye.length<ye.highWaterMark||ye.flowing&&ye.length===0);){const ze=ye.length;if(x("maybeReadMore read 0"),ce.read(0),ze===ye.length)break}ye.readingMore=!1}Ne.prototype._read=function(ce){throw new I("_read()")},Ne.prototype.pipe=function(ce,ye){const ze=this,Oe=this._readableState;Oe.pipes.length===1&&(Oe.multiAwaitDrain||(Oe.multiAwaitDrain=!0,Oe.awaitDrainWriters=new u(Oe.awaitDrainWriters?[Oe.awaitDrainWriters]:[]))),Oe.pipes.push(ce),x("pipe count=%d opts=%j",Oe.pipes.length,ye);const Ke=(!ye||ye.end!==!1)&&ce!==t.stdout&&ce!==t.stderr?Je:Zt;Oe.endEmitted?t.nextTick(Ke):ze.once("end",Ke),ce.on("unpipe",Xe);function Xe(zt,vr){x("onunpipe"),zt===ze&&vr&&vr.hasUnpiped===!1&&(vr.hasUnpiped=!0,ft())}function Je(){x("onend"),ce.end()}let ut,ht=!1;function ft(){x("cleanup"),ce.removeListener("close",cr),ce.removeListener("finish",tr),ut&&ce.removeListener("drain",ut),ce.removeListener("error",At),ce.removeListener("unpipe",Xe),ze.removeListener("end",Je),ze.removeListener("end",Zt),ze.removeListener("data",ar),ht=!0,ut&&Oe.awaitDrainWriters&&(!ce._writableState||ce._writableState.needDrain)&&ut()}function mt(){ht||(Oe.pipes.length===1&&Oe.pipes[0]===ce?(x("false write response, pause",0),Oe.awaitDrainWriters=ce,Oe.multiAwaitDrain=!1):Oe.pipes.length>1&&Oe.pipes.includes(ce)&&(x("false write response, pause",Oe.awaitDrainWriters.size),Oe.awaitDrainWriters.add(ce)),ze.pause()),ut||(ut=V(ze,ce),ce.on("drain",ut))}ze.on("data",ar);function ar(zt){x("ondata");const vr=ce.write(zt);x("dest.write",vr),vr===!1&&mt()}function At(zt){if(x("onerror",zt),Zt(),ce.removeListener("error",At),ce.listenerCount("error")===0){const vr=ce._writableState||ce._readableState;vr&&!vr.errorEmitted?U(ce,zt):ce.emit("error",zt)}}m(ce,"error",At);function cr(){ce.removeListener("finish",tr),Zt()}ce.once("close",cr);function tr(){x("onfinish"),ce.removeListener("close",cr),Zt()}ce.once("finish",tr);function Zt(){x("unpipe"),ze.unpipe(ce)}return ce.emit("pipe",ze),ce.writableNeedDrain===!0?mt():Oe.flowing||(x("pipe resume"),ze.resume()),ce};function V(ce,ye){return function(){const ze=ce._readableState;ze.awaitDrainWriters===ye?(x("pipeOnDrain",1),ze.awaitDrainWriters=null):ze.multiAwaitDrain&&(x("pipeOnDrain",ze.awaitDrainWriters.size),ze.awaitDrainWriters.delete(ye)),(!ze.awaitDrainWriters||ze.awaitDrainWriters.size===0)&&ce.listenerCount("data")&&ce.resume()}}Ne.prototype.unpipe=function(ce){const ye=this._readableState,ze={hasUnpiped:!1};if(ye.pipes.length===0)return this;if(!ce){const Ke=ye.pipes;ye.pipes=[],this.pause();for(let Xe=0;Xe<Ke.length;Xe++)Ke[Xe].emit("unpipe",this,{hasUnpiped:!1});return this}const Oe=e(ye.pipes,ce);return Oe===-1?this:(ye.pipes.splice(Oe,1),ye.pipes.length===0&&this.pause(),ce.emit("unpipe",this,ze),this)},Ne.prototype.on=function(ce,ye){const ze=g.prototype.on.call(this,ce,ye),Oe=this._readableState;return ce==="data"?(Oe.readableListening=this.listenerCount("readable")>0,Oe.flowing!==!1&&this.resume()):ce==="readable"&&!Oe.endEmitted&&!Oe.readableListening&&(Oe.readableListening=Oe.needReadable=!0,Oe.flowing=!1,Oe.emittedReadable=!1,x("on readable",Oe.length,Oe.reading),Oe.length?G(this):Oe.reading||t.nextTick(ue,this)),ze},Ne.prototype.addListener=Ne.prototype.on,Ne.prototype.removeListener=function(ce,ye){const ze=g.prototype.removeListener.call(this,ce,ye);return ce==="readable"&&t.nextTick(de,this),ze},Ne.prototype.off=Ne.prototype.removeListener,Ne.prototype.removeAllListeners=function(ce){const ye=g.prototype.removeAllListeners.apply(this,arguments);return(ce==="readable"||ce===void 0)&&t.nextTick(de,this),ye};function de(ce){const ye=ce._readableState;ye.readableListening=ce.listenerCount("readable")>0,ye.resumeScheduled&&ye[B]===!1?ye.flowing=!0:ce.listenerCount("data")>0?ce.resume():ye.readableListening||(ye.flowing=null)}function ue(ce){x("readable nexttick read 0"),ce.read(0)}Ne.prototype.resume=function(){const ce=this._readableState;return ce.flowing||(x("resume"),ce.flowing=!ce.readableListening,be(this,ce)),ce[B]=!1,this};function be(ce,ye){ye.resumeScheduled||(ye.resumeScheduled=!0,t.nextTick(ve,ce,ye))}function ve(ce,ye){x("resume",ye.reading),ye.reading||ce.read(0),ye.resumeScheduled=!1,ce.emit("resume"),Se(ce),ye.flowing&&!ye.reading&&ce.read(0)}Ne.prototype.pause=function(){return x("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(x("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[B]=!0,this};function Se(ce){const ye=ce._readableState;for(x("flow",ye.flowing);ye.flowing&&ce.read()!==null;);}Ne.prototype.wrap=function(ce){let ye=!1;ce.on("data",Oe=>{!this.push(Oe)&&ce.pause&&(ye=!0,ce.pause())}),ce.on("end",()=>{this.push(null)}),ce.on("error",Oe=>{U(this,Oe)}),ce.on("close",()=>{this.destroy()}),ce.on("destroy",()=>{this.destroy()}),this._read=()=>{ye&&ce.resume&&(ye=!1,ce.resume())};const ze=s(ce);for(let Oe=1;Oe<ze.length;Oe++){const Ke=ze[Oe];this[Ke]===void 0&&typeof ce[Ke]=="function"&&(this[Ke]=ce[Ke].bind(ce))}return this},Ne.prototype[d]=function(){return Re(this)},Ne.prototype.iterator=function(ce){return ce!==void 0&&D(ce,"options"),Re(this,ce)};function Re(ce,ye){typeof ce.read!="function"&&(ce=Ne.wrap(ce,{objectMode:!0}));const ze=Le(ce,ye);return ze.stream=ce,ze}async function*Le(ce,ye){let ze=F;function Oe(Je){this===ce?(ze(),ze=F):ze=Je}ce.on("readable",Oe);let Ke;const Xe=b(ce,{writable:!1},Je=>{Ke=Je?R(Ke,Je):null,ze(),ze=F});try{for(;;){const Je=ce.destroyed?null:ce.read();if(Je!==null)yield Je;else{if(Ke)throw Ke;if(Ke===null)return;await new l(Oe)}}}catch(Je){throw Ke=R(Ke,Je),Ke}finally{(Ke||(ye==null?void 0:ye.destroyOnReturn)!==!1)&&(Ke===void 0||ce._readableState.autoDestroy)?E.destroyer(ce,null):(ce.off("readable",Oe),Xe())}}a(Ne.prototype,{readable:{__proto__:null,get(){const ce=this._readableState;return!!ce&&ce.readable!==!1&&!ce.destroyed&&!ce.errorEmitted&&!ce.endEmitted},set(ce){this._readableState&&(this._readableState.readable=!!ce)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(ce){this._readableState&&(this._readableState.flowing=ce)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(ce){this._readableState&&(this._readableState.destroyed=ce)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),a(We.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[B]!==!1},set(ce){this[B]=!!ce}}}),Ne._fromList=je;function je(ce,ye){if(ye.length===0)return null;let ze;return ye.objectMode?ze=ye.buffer.shift():!ce||ce>=ye.length?(ye.decoder?ze=ye.buffer.join(""):ye.buffer.length===1?ze=ye.buffer.first():ze=ye.buffer.concat(ye.length),ye.buffer.clear()):ze=ye.buffer.consume(ce,ye.decoder),ze}function rt(ce){const ye=ce._readableState;x("endReadable",ye.endEmitted),ye.endEmitted||(ye.ended=!0,t.nextTick(Qe,ye,ce))}function Qe(ce,ye){if(x("endReadableNT",ce.endEmitted,ce.length),!ce.errored&&!ce.closeEmitted&&!ce.endEmitted&&ce.length===0){if(ce.endEmitted=!0,ye.emit("end"),ye.writable&&ye.allowHalfOpen===!1)t.nextTick(et,ye);else if(ce.autoDestroy){const ze=ye._writableState;(!ze||ze.autoDestroy&&(ze.finished||ze.writable===!1))&&ye.destroy()}}}function et(ce){ce.writable&&!ce.writableEnded&&!ce.destroyed&&ce.end()}Ne.from=function(ce,ye){return O(Ne,ce,ye)};let tt;function He(){return tt===void 0&&(tt={}),tt}return Ne.fromWeb=function(ce,ye){return He().newStreamReadableFromReadableStream(ce,ye)},Ne.toWeb=function(ce,ye){return He().newReadableStreamFromStreamReadable(ce,ye)},Ne.wrap=function(ce,ye){var ze,Oe;return new Ne({objectMode:(ze=(Oe=ce.readableObjectMode)!==null&&Oe!==void 0?Oe:ce.objectMode)!==null&&ze!==void 0?ze:!0,...ye,destroy(Ke,Xe){E.destroyer(ce,Ke),Xe(Ke)}}).wrap(ce)},t5}var r5,bR;function n5(){if(bR)return r5;bR=1;const t=wu,{ArrayPrototypeSlice:e,Error:r,FunctionPrototypeSymbolHasInstance:n,ObjectDefineProperty:i,ObjectDefineProperties:a,ObjectSetPrototypeOf:s,StringPrototypeToLowerCase:o,Symbol:l,SymbolHasInstance:u}=nn;r5=D,D.WritableState=N;const{EventEmitter:h}=Nv,d=K3.Stream,{Buffer:f}=co,p=Td,{addAbortSignal:g}=Gv,{getHighWaterMark:m,getDefaultHighWaterMark:v}=Hv,{ERR_INVALID_ARG_TYPE:y,ERR_METHOD_NOT_IMPLEMENTED:b,ERR_MULTIPLE_CALLBACK:x,ERR_STREAM_CANNOT_PIPE:k,ERR_STREAM_DESTROYED:E,ERR_STREAM_ALREADY_FINISHED:C,ERR_STREAM_NULL_VALUES:S,ERR_STREAM_WRITE_AFTER_END:R,ERR_UNKNOWN_ENCODING:L}=Ui.codes,{errorOrDestroy:I}=p;s(D.prototype,d.prototype),s(D,d);function _(){}const M=l("kOnFinished");function N(q,Q,Z){typeof Z!="boolean"&&(Z=Q instanceof ul()),this.objectMode=!!(q&&q.objectMode),Z&&(this.objectMode=this.objectMode||!!(q&&q.writableObjectMode)),this.highWaterMark=q?m(this,q,"writableHighWaterMark",Z):v(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const ke=!!(q&&q.decodeStrings===!1);this.decodeStrings=!ke,this.defaultEncoding=q&&q.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=U.bind(void 0,Q),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,A(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!q||q.emitClose!==!1,this.autoDestroy=!q||q.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[M]=[]}function A(q){q.buffered=[],q.bufferedIndex=0,q.allBuffers=!0,q.allNoop=!0}N.prototype.getBuffer=function(){return e(this.buffered,this.bufferedIndex)},i(N.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function D(q){const Q=this instanceof ul();if(!Q&&!n(D,this))return new D(q);this._writableState=new N(q,this,Q),q&&(typeof q.write=="function"&&(this._write=q.write),typeof q.writev=="function"&&(this._writev=q.writev),typeof q.destroy=="function"&&(this._destroy=q.destroy),typeof q.final=="function"&&(this._final=q.final),typeof q.construct=="function"&&(this._construct=q.construct),q.signal&&g(q.signal,this)),d.call(this,q),p.construct(this,()=>{const Z=this._writableState;Z.writing||ee(this,Z),we(this,Z)})}i(D,u,{__proto__:null,value:function(q){return n(this,q)?!0:this!==D?!1:q&&q._writableState instanceof N}}),D.prototype.pipe=function(){I(this,new k)};function B(q,Q,Z,ke){const he=q._writableState;if(typeof Z=="function")ke=Z,Z=he.defaultEncoding;else{if(!Z)Z=he.defaultEncoding;else if(Z!=="buffer"&&!f.isEncoding(Z))throw new L(Z);typeof ke!="function"&&(ke=_)}if(Q===null)throw new S;if(!he.objectMode)if(typeof Q=="string")he.decodeStrings!==!1&&(Q=f.from(Q,Z),Z="buffer");else if(Q instanceof f)Z="buffer";else if(d._isUint8Array(Q))Q=d._uint8ArrayToBuffer(Q),Z="buffer";else throw new y("chunk",["string","Buffer","Uint8Array"],Q);let oe;return he.ending?oe=new R:he.destroyed&&(oe=new E("write")),oe?(t.nextTick(ke,oe),I(q,oe,!0),oe):(he.pendingcb++,P(q,he,Q,Z,ke))}D.prototype.write=function(q,Q,Z){return B(this,q,Q,Z)===!0},D.prototype.cork=function(){this._writableState.corked++},D.prototype.uncork=function(){const q=this._writableState;q.corked&&(q.corked--,q.writing||ee(this,q))},D.prototype.setDefaultEncoding=function(q){if(typeof q=="string"&&(q=o(q)),!f.isEncoding(q))throw new L(q);return this._writableState.defaultEncoding=q,this};function P(q,Q,Z,ke,he){const oe=Q.objectMode?1:Z.length;Q.length+=oe;const Me=Q.length<Q.highWaterMark;return Me||(Q.needDrain=!0),Q.writing||Q.corked||Q.errored||!Q.constructed?(Q.buffered.push({chunk:Z,encoding:ke,callback:he}),Q.allBuffers&&ke!=="buffer"&&(Q.allBuffers=!1),Q.allNoop&&he!==_&&(Q.allNoop=!1)):(Q.writelen=oe,Q.writecb=he,Q.writing=!0,Q.sync=!0,q._write(Z,ke,Q.onwrite),Q.sync=!1),Me&&!Q.errored&&!Q.destroyed}function O(q,Q,Z,ke,he,oe,Me){Q.writelen=ke,Q.writecb=Me,Q.writing=!0,Q.sync=!0,Q.destroyed?Q.onwrite(new E("write")):Z?q._writev(he,Q.onwrite):q._write(he,oe,Q.onwrite),Q.sync=!1}function F(q,Q,Z,ke){--Q.pendingcb,ke(Z),X(Q),I(q,Z)}function U(q,Q){const Z=q._writableState,ke=Z.sync,he=Z.writecb;if(typeof he!="function"){I(q,new x);return}Z.writing=!1,Z.writecb=null,Z.length-=Z.writelen,Z.writelen=0,Q?(Q.stack,Z.errored||(Z.errored=Q),q._readableState&&!q._readableState.errored&&(q._readableState.errored=Q),ke?t.nextTick(F,q,Z,Q,he):F(q,Z,Q,he)):(Z.buffered.length>Z.bufferedIndex&&ee(q,Z),ke?Z.afterWriteTickInfo!==null&&Z.afterWriteTickInfo.cb===he?Z.afterWriteTickInfo.count++:(Z.afterWriteTickInfo={count:1,cb:he,stream:q,state:Z},t.nextTick($,Z.afterWriteTickInfo)):j(q,Z,1,he))}function $({stream:q,state:Q,count:Z,cb:ke}){return Q.afterWriteTickInfo=null,j(q,Q,Z,ke)}function j(q,Q,Z,ke){for(!Q.ending&&!q.destroyed&&Q.length===0&&Q.needDrain&&(Q.needDrain=!1,q.emit("drain"));Z-- >0;)Q.pendingcb--,ke();Q.destroyed&&X(Q),we(q,Q)}function X(q){if(q.writing)return;for(let he=q.bufferedIndex;he<q.buffered.length;++he){var Q;const{chunk:oe,callback:Me}=q.buffered[he],xe=q.objectMode?1:oe.length;q.length-=xe,Me((Q=q.errored)!==null&&Q!==void 0?Q:new E("write"))}const Z=q[M].splice(0);for(let he=0;he<Z.length;he++){var ke;Z[he]((ke=q.errored)!==null&&ke!==void 0?ke:new E("end"))}A(q)}function ee(q,Q){if(Q.corked||Q.bufferProcessing||Q.destroyed||!Q.constructed)return;const{buffered:Z,bufferedIndex:ke,objectMode:he}=Q,oe=Z.length-ke;if(!oe)return;let Me=ke;if(Q.bufferProcessing=!0,oe>1&&q._writev){Q.pendingcb-=oe-1;const xe=Q.allNoop?_:Ne=>{for(let Ve=Me;Ve<Z.length;++Ve)Z[Ve].callback(Ne)},We=Q.allNoop&&Me===0?Z:e(Z,Me);We.allBuffers=Q.allBuffers,O(q,Q,!0,Q.length,We,"",xe),A(Q)}else{do{const{chunk:xe,encoding:We,callback:Ne}=Z[Me];Z[Me++]=null;const Ve=he?1:xe.length;O(q,Q,!1,Ve,xe,We,Ne)}while(Me<Z.length&&!Q.writing);Me===Z.length?A(Q):Me>256?(Z.splice(0,Me),Q.bufferedIndex=0):Q.bufferedIndex=Me}Q.bufferProcessing=!1}D.prototype._write=function(q,Q,Z){if(this._writev)this._writev([{chunk:q,encoding:Q}],Z);else throw new b("_write()")},D.prototype._writev=null,D.prototype.end=function(q,Q,Z){const ke=this._writableState;typeof q=="function"?(Z=q,q=null,Q=null):typeof Q=="function"&&(Z=Q,Q=null);let he;if(q!=null){const oe=B(this,q,Q);oe instanceof r&&(he=oe)}return ke.corked&&(ke.corked=1,this.uncork()),he||(!ke.errored&&!ke.ending?(ke.ending=!0,we(this,ke,!0),ke.ended=!0):ke.finished?he=new C("end"):ke.destroyed&&(he=new E("end"))),typeof Z=="function"&&(he||ke.finished?t.nextTick(Z,he):ke[M].push(Z)),this};function se(q){return q.ending&&!q.destroyed&&q.constructed&&q.length===0&&!q.errored&&q.buffered.length===0&&!q.finished&&!q.writing&&!q.errorEmitted&&!q.closeEmitted}function ae(q,Q){let Z=!1;function ke(he){if(Z){I(q,he??x());return}if(Z=!0,Q.pendingcb--,he){const oe=Q[M].splice(0);for(let Me=0;Me<oe.length;Me++)oe[Me](he);I(q,he,Q.sync)}else se(Q)&&(Q.prefinished=!0,q.emit("prefinish"),Q.pendingcb++,t.nextTick(re,q,Q))}Q.sync=!0,Q.pendingcb++;try{q._final(ke)}catch(he){ke(he)}Q.sync=!1}function ge(q,Q){!Q.prefinished&&!Q.finalCalled&&(typeof q._final=="function"&&!Q.destroyed?(Q.finalCalled=!0,ae(q,Q)):(Q.prefinished=!0,q.emit("prefinish")))}function we(q,Q,Z){se(Q)&&(ge(q,Q),Q.pendingcb===0&&(Z?(Q.pendingcb++,t.nextTick((ke,he)=>{se(he)?re(ke,he):he.pendingcb--},q,Q)):se(Q)&&(Q.pendingcb++,re(q,Q))))}function re(q,Q){Q.pendingcb--,Q.finished=!0;const Z=Q[M].splice(0);for(let ke=0;ke<Z.length;ke++)Z[ke]();if(q.emit("finish"),Q.autoDestroy){const ke=q._readableState;(!ke||ke.autoDestroy&&(ke.endEmitted||ke.readable===!1))&&q.destroy()}}a(D.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(q){this._writableState&&(this._writableState.destroyed=q)}},writable:{__proto__:null,get(){const q=this._writableState;return!!q&&q.writable!==!1&&!q.destroyed&&!q.errored&&!q.ending&&!q.ended},set(q){this._writableState&&(this._writableState.writable=!!q)}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){const q=this._writableState;return q?!q.destroyed&&!q.ending&&q.needDrain:!1}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});const te=p.destroy;D.prototype.destroy=function(q,Q){const Z=this._writableState;return!Z.destroyed&&(Z.bufferedIndex<Z.buffered.length||Z[M].length)&&t.nextTick(X,Z),te.call(this,q,Q),this},D.prototype._undestroy=p.undestroy,D.prototype._destroy=function(q,Q){Q(q)},D.prototype[h.captureRejectionSymbol]=function(q){this.destroy(q)};let ne;function J(){return ne===void 0&&(ne={}),ne}return D.fromWeb=function(q,Q){return J().newStreamWritableFromWritableStream(q,Q)},D.toWeb=function(q){return J().newWritableStreamFromStreamWritable(q)},r5}var i5,xR;function Poe(){if(xR)return i5;xR=1;const t=wu,e=co,{isReadable:r,isWritable:n,isIterable:i,isNodeStream:a,isReadableNodeStream:s,isWritableNodeStream:o,isDuplexNodeStream:l,isReadableStream:u,isWritableStream:h}=cl,d=dc,{AbortError:f,codes:{ERR_INVALID_ARG_TYPE:p,ERR_INVALID_RETURN_VALUE:g}}=Ui,{destroyer:m}=Td,v=ul(),y=qv(),b=n5(),{createDeferredPromise:x}=la,k=vR,E=globalThis.Blob||e.Blob,C=typeof E<"u"?function(M){return M instanceof E}:function(M){return!1},S=globalThis.AbortController||Lp().AbortController,{FunctionPrototypeCall:R}=nn;class L extends v{constructor(N){super(N),(N==null?void 0:N.readable)===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),(N==null?void 0:N.writable)===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}i5=function M(N,A){if(l(N))return N;if(s(N))return _({readable:N});if(o(N))return _({writable:N});if(a(N))return _({writable:!1,readable:!1});if(u(N))return _({readable:y.fromWeb(N)});if(h(N))return _({writable:b.fromWeb(N)});if(typeof N=="function"){const{value:B,write:P,final:O,destroy:F}=I(N);if(i(B))return k(L,B,{objectMode:!0,write:P,final:O,destroy:F});const U=B==null?void 0:B.then;if(typeof U=="function"){let $;const j=R(U,B,X=>{if(X!=null)throw new g("nully","body",X)},X=>{m($,X)});return $=new L({objectMode:!0,readable:!1,write:P,final(X){O(async()=>{try{await j,t.nextTick(X,null)}catch(ee){t.nextTick(X,ee)}})},destroy:F})}throw new g("Iterable, AsyncIterable or AsyncFunction",A,B)}if(C(N))return M(N.arrayBuffer());if(i(N))return k(L,N,{objectMode:!0,writable:!1});if(u(N==null?void 0:N.readable)&&h(N==null?void 0:N.writable))return L.fromWeb(N);if(typeof(N==null?void 0:N.writable)=="object"||typeof(N==null?void 0:N.readable)=="object"){const B=N!=null&&N.readable?s(N==null?void 0:N.readable)?N==null?void 0:N.readable:M(N.readable):void 0,P=N!=null&&N.writable?o(N==null?void 0:N.writable)?N==null?void 0:N.writable:M(N.writable):void 0;return _({readable:B,writable:P})}const D=N==null?void 0:N.then;if(typeof D=="function"){let B;return R(D,N,P=>{P!=null&&B.push(P),B.push(null)},P=>{m(B,P)}),B=new L({objectMode:!0,writable:!1,read(){}})}throw new p(A,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],N)};function I(M){let{promise:N,resolve:A}=x();const D=new S,B=D.signal;return{value:M(async function*(){for(;;){const P=N;N=null;const{chunk:O,done:F,cb:U}=await P;if(t.nextTick(U),F)return;if(B.aborted)throw new f(void 0,{cause:B.reason});({promise:N,resolve:A}=x()),yield O}}(),{signal:B}),write(P,O,F){const U=A;A=null,U({chunk:P,done:!1,cb:F})},final(P){const O=A;A=null,O({done:!0,cb:P})},destroy(P,O){D.abort(),O(P)}}}function _(M){const N=M.readable&&typeof M.readable.read!="function"?y.wrap(M.readable):M.readable,A=M.writable;let D=!!r(N),B=!!n(A),P,O,F,U,$;function j(X){const ee=U;U=null,ee?ee(X):X&&$.destroy(X)}return $=new L({readableObjectMode:!!(N!=null&&N.readableObjectMode),writableObjectMode:!!(A!=null&&A.writableObjectMode),readable:D,writable:B}),B&&(d(A,X=>{B=!1,X&&m(N,X),j(X)}),$._write=function(X,ee,se){A.write(X,ee)?se():P=se},$._final=function(X){A.end(),O=X},A.on("drain",function(){if(P){const X=P;P=null,X()}}),A.on("finish",function(){if(O){const X=O;O=null,X()}})),D&&(d(N,X=>{D=!1,X&&m(N,X),j(X)}),N.on("readable",function(){if(F){const X=F;F=null,X()}}),N.on("end",function(){$.push(null)}),$._read=function(){for(;;){const X=N.read();if(X===null){F=$._read;return}if(!$.push(X))return}}),$._destroy=function(X,ee){!X&&U!==null&&(X=new f),F=null,P=null,O=null,U===null?ee(X):(U=ee,m(A,X),m(N,X))},$}return i5}var a5,wR;function ul(){if(wR)return a5;wR=1;const{ObjectDefineProperties:t,ObjectGetOwnPropertyDescriptor:e,ObjectKeys:r,ObjectSetPrototypeOf:n}=nn;a5=s;const i=qv(),a=n5();n(s.prototype,i.prototype),n(s,i);{const h=r(a.prototype);for(let d=0;d<h.length;d++){const f=h[d];s.prototype[f]||(s.prototype[f]=a.prototype[f])}}function s(h){if(!(this instanceof s))return new s(h);i.call(this,h),a.call(this,h),h?(this.allowHalfOpen=h.allowHalfOpen!==!1,h.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),h.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}t(s.prototype,{writable:{__proto__:null,...e(a.prototype,"writable")},writableHighWaterMark:{__proto__:null,...e(a.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...e(a.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...e(a.prototype,"writableBuffer")},writableLength:{__proto__:null,...e(a.prototype,"writableLength")},writableFinished:{__proto__:null,...e(a.prototype,"writableFinished")},writableCorked:{__proto__:null,...e(a.prototype,"writableCorked")},writableEnded:{__proto__:null,...e(a.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...e(a.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(h){this._readableState&&this._writableState&&(this._readableState.destroyed=h,this._writableState.destroyed=h)}}});let o;function l(){return o===void 0&&(o={}),o}s.fromWeb=function(h,d){return l().newStreamDuplexFromReadableWritablePair(h,d)},s.toWeb=function(h){return l().newReadableWritablePairFromDuplex(h)};let u;return s.from=function(h){return u||(u=Poe()),u(h,"body")},a5}const{ObjectSetPrototypeOf:TR,Symbol:Noe}=nn;var kR=hl;const{ERR_METHOD_NOT_IMPLEMENTED:Foe}=Ui.codes,s5=ul(),{getHighWaterMark:zoe}=Hv;TR(hl.prototype,s5.prototype),TR(hl,s5);const Mp=Noe("kCallback");function hl(t){if(!(this instanceof hl))return new hl(t);const e=t?zoe(this,t,"readableHighWaterMark",!0):null;e===0&&(t={...t,highWaterMark:null,readableHighWaterMark:e,writableHighWaterMark:t.writableHighWaterMark||0}),s5.call(this,t),this._readableState.sync=!1,this[Mp]=null,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",$oe)}function o5(t){typeof this._flush=="function"&&!this.destroyed?this._flush((e,r)=>{if(e){t?t(e):this.destroy(e);return}r!=null&&this.push(r),this.push(null),t&&t()}):(this.push(null),t&&t())}function $oe(){this._final!==o5&&o5.call(this)}hl.prototype._final=o5,hl.prototype._transform=function(t,e,r){throw new Foe("_transform()")},hl.prototype._write=function(t,e,r){const n=this._readableState,i=this._writableState,a=n.length;this._transform(t,e,(s,o)=>{if(s){r(s);return}o!=null&&this.push(o),i.ended||a===n.length||n.length<n.highWaterMark?r():this[Mp]=r})},hl.prototype._read=function(){if(this[Mp]){const t=this[Mp];this[Mp]=null,t()}};const{ObjectSetPrototypeOf:ER}=nn;var SR=kd;const l5=kR;ER(kd.prototype,l5.prototype),ER(kd,l5);function kd(t){if(!(this instanceof kd))return new kd(t);l5.call(this,t)}kd.prototype._transform=function(t,e,r){r(null,t)};const Dp=wu,{ArrayIsArray:Voe,Promise:Uoe,SymbolAsyncIterator:Goe,SymbolDispose:Woe}=nn,Yv=dc,{once:Hoe}=la,qoe=Td,_R=ul(),{aggregateTwoErrors:Yoe,codes:{ERR_INVALID_ARG_TYPE:c5,ERR_INVALID_RETURN_VALUE:u5,ERR_MISSING_ARGS:joe,ERR_STREAM_DESTROYED:Xoe,ERR_STREAM_PREMATURE_CLOSE:Koe},AbortError:Qoe}=Ui,{validateFunction:Zoe,validateAbortSignal:Joe}=Rp,{isIterable:ku,isReadable:h5,isReadableNodeStream:jv,isNodeStream:CR,isTransformStream:Ed,isWebStream:ele,isReadableStream:d5,isReadableFinished:tle}=cl,rle=globalThis.AbortController||Lp().AbortController;let f5,p5,g5;function AR(t,e,r){let n=!1;t.on("close",()=>{n=!0});const i=Yv(t,{readable:e,writable:r},a=>{n=!a});return{destroy:a=>{n||(n=!0,qoe.destroyer(t,a||new Xoe("pipe")))},cleanup:i}}function nle(t){return Zoe(t[t.length-1],"streams[stream.length - 1]"),t.pop()}function m5(t){if(ku(t))return t;if(jv(t))return ile(t);throw new c5("val",["Readable","Iterable","AsyncIterable"],t)}async function*ile(t){p5||(p5=qv()),yield*p5.prototype[Goe].call(t)}async function Xv(t,e,r,{end:n}){let i,a=null;const s=u=>{if(u&&(i=u),a){const h=a;a=null,h()}},o=()=>new Uoe((u,h)=>{i?h(i):a=()=>{i?h(i):u()}});e.on("drain",s);const l=Yv(e,{readable:!1},s);try{e.writableNeedDrain&&await o();for await(const u of t)e.write(u)||await o();n&&(e.end(),await o()),r()}catch(u){r(i!==u?Yoe(i,u):u)}finally{l(),e.off("drain",s)}}async function v5(t,e,r,{end:n}){Ed(e)&&(e=e.writable);const i=e.getWriter();try{for await(const a of t)await i.ready,i.write(a).catch(()=>{});await i.ready,n&&await i.close(),r()}catch(a){try{await i.abort(a),r(a)}catch(s){r(s)}}}function ale(...t){return LR(t,Hoe(nle(t)))}function LR(t,e,r){if(t.length===1&&Voe(t[0])&&(t=t[0]),t.length<2)throw new joe("streams");const n=new rle,i=n.signal,a=r==null?void 0:r.signal,s=[];Joe(a,"options.signal");function o(){g(new Qoe)}g5=g5||la.addAbortListener;let l;a&&(l=g5(a,o));let u,h;const d=[];let f=0;function p(b){g(b,--f===0)}function g(b,x){var k;if(b&&(!u||u.code==="ERR_STREAM_PREMATURE_CLOSE")&&(u=b),!(!u&&!x)){for(;d.length;)d.shift()(u);(k=l)===null||k===void 0||k[Woe](),n.abort(),x&&(u||s.forEach(E=>E()),Dp.nextTick(e,u,h))}}let m;for(let b=0;b<t.length;b++){const x=t[b],k=b<t.length-1,E=b>0,C=k||(r==null?void 0:r.end)!==!1,S=b===t.length-1;if(CR(x)){let R=function(L){L&&L.name!=="AbortError"&&L.code!=="ERR_STREAM_PREMATURE_CLOSE"&&p(L)};if(C){const{destroy:L,cleanup:I}=AR(x,k,E);d.push(L),h5(x)&&S&&s.push(I)}x.on("error",R),h5(x)&&S&&s.push(()=>{x.removeListener("error",R)})}if(b===0)if(typeof x=="function"){if(m=x({signal:i}),!ku(m))throw new u5("Iterable, AsyncIterable or Stream","source",m)}else ku(x)||jv(x)||Ed(x)?m=x:m=_R.from(x);else if(typeof x=="function"){if(Ed(m)){var v;m=m5((v=m)===null||v===void 0?void 0:v.readable)}else m=m5(m);if(m=x(m,{signal:i}),k){if(!ku(m,!0))throw new u5("AsyncIterable",`transform[${b-1}]`,m)}else{var y;f5||(f5=SR);const R=new f5({objectMode:!0}),L=(y=m)===null||y===void 0?void 0:y.then;if(typeof L=="function")f++,L.call(m,M=>{h=M,M!=null&&R.write(M),C&&R.end(),Dp.nextTick(p)},M=>{R.destroy(M),Dp.nextTick(p,M)});else if(ku(m,!0))f++,Xv(m,R,p,{end:C});else if(d5(m)||Ed(m)){const M=m.readable||m;f++,Xv(M,R,p,{end:C})}else throw new u5("AsyncIterable or Promise","destination",m);m=R;const{destroy:I,cleanup:_}=AR(m,!1,!0);d.push(I),S&&s.push(_)}}else if(CR(x)){if(jv(m)){f+=2;const R=sle(m,x,p,{end:C});h5(x)&&S&&s.push(R)}else if(Ed(m)||d5(m)){const R=m.readable||m;f++,Xv(R,x,p,{end:C})}else if(ku(m))f++,Xv(m,x,p,{end:C});else throw new c5("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],m);m=x}else if(ele(x)){if(jv(m))f++,v5(m5(m),x,p,{end:C});else if(d5(m)||ku(m))f++,v5(m,x,p,{end:C});else if(Ed(m))f++,v5(m.readable,x,p,{end:C});else throw new c5("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],m);m=x}else m=_R.from(x)}return(i!=null&&i.aborted||a!=null&&a.aborted)&&Dp.nextTick(o),m}function sle(t,e,r,{end:n}){let i=!1;if(e.on("close",()=>{i||r(new Koe)}),t.pipe(e,{end:!1}),n){let a=function(){i=!0,e.end()};tle(t)?Dp.nextTick(a):t.once("end",a)}else r();return Yv(t,{readable:!0,writable:!1},a=>{const s=t._readableState;a&&a.code==="ERR_STREAM_PREMATURE_CLOSE"&&s&&s.ended&&!s.errored&&!s.errorEmitted?t.once("end",r).once("error",r):r(a)}),Yv(e,{readable:!1,writable:!0},r)}var y5={pipelineImpl:LR,pipeline:ale};const{pipeline:ole}=y5,Kv=ul(),{destroyer:lle}=Td,{isNodeStream:Qv,isReadable:RR,isWritable:IR,isWebStream:b5,isTransformStream:Eu,isWritableStream:MR,isReadableStream:DR}=cl,{AbortError:cle,codes:{ERR_INVALID_ARG_VALUE:OR,ERR_MISSING_ARGS:ule}}=Ui,hle=dc;var BR=function(...t){if(t.length===0)throw new ule("streams");if(t.length===1)return Kv.from(t[0]);const e=[...t];if(typeof t[0]=="function"&&(t[0]=Kv.from(t[0])),typeof t[t.length-1]=="function"){const f=t.length-1;t[f]=Kv.from(t[f])}for(let f=0;f<t.length;++f)if(!(!Qv(t[f])&&!b5(t[f]))){if(f<t.length-1&&!(RR(t[f])||DR(t[f])||Eu(t[f])))throw new OR(`streams[${f}]`,e[f],"must be readable");if(f>0&&!(IR(t[f])||MR(t[f])||Eu(t[f])))throw new OR(`streams[${f}]`,e[f],"must be writable")}let r,n,i,a,s;function o(f){const p=a;a=null,p?p(f):f?s.destroy(f):!d&&!h&&s.destroy()}const l=t[0],u=ole(t,o),h=!!(IR(l)||MR(l)||Eu(l)),d=!!(RR(u)||DR(u)||Eu(u));if(s=new Kv({writableObjectMode:!!(l!=null&&l.writableObjectMode),readableObjectMode:!!(u!=null&&u.readableObjectMode),writable:h,readable:d}),h){if(Qv(l))s._write=function(p,g,m){l.write(p,g)?m():r=m},s._final=function(p){l.end(),n=p},l.on("drain",function(){if(r){const p=r;r=null,p()}});else if(b5(l)){const p=(Eu(l)?l.writable:l).getWriter();s._write=async function(g,m,v){try{await p.ready,p.write(g).catch(()=>{}),v()}catch(y){v(y)}},s._final=async function(g){try{await p.ready,p.close().catch(()=>{}),n=g}catch(m){g(m)}}}const f=Eu(u)?u.readable:u;hle(f,()=>{if(n){const p=n;n=null,p()}})}if(d){if(Qv(u))u.on("readable",function(){if(i){const f=i;i=null,f()}}),u.on("end",function(){s.push(null)}),s._read=function(){for(;;){const f=u.read();if(f===null){i=s._read;return}if(!s.push(f))return}};else if(b5(u)){const f=(Eu(u)?u.readable:u).getReader();s._read=async function(){for(;;)try{const{value:p,done:g}=await f.read();if(!s.push(p))return;if(g){s.push(null);return}}catch{return}}}}return s._destroy=function(f,p){!f&&a!==null&&(f=new cle),i=null,r=null,n=null,a===null?p(f):(a=p,Qv(u)&&lle(u,f))},s};const dle=globalThis.AbortController||Lp().AbortController,{codes:{ERR_INVALID_ARG_VALUE:fle,ERR_INVALID_ARG_TYPE:Op,ERR_MISSING_ARGS:ple,ERR_OUT_OF_RANGE:gle},AbortError:mo}=Ui,{validateAbortSignal:Su,validateInteger:PR,validateObject:_u}=Rp,mle=nn.Symbol("kWeak"),vle=nn.Symbol("kResistStopPropagation"),{finished:yle}=dc,ble=BR,{addAbortSignalNoValidate:xle}=Gv,{isWritable:wle,isNodeStream:Tle}=cl,{deprecate:kle}=la,{ArrayPrototypePush:Ele,Boolean:Sle,MathFloor:NR,Number:_le,NumberIsNaN:Cle,Promise:FR,PromiseReject:zR,PromiseResolve:Ale,PromisePrototypeThen:$R,Symbol:VR}=nn,Zv=VR("kEmpty"),UR=VR("kEof");function Lle(t,e){if(e!=null&&_u(e,"options"),(e==null?void 0:e.signal)!=null&&Su(e.signal,"options.signal"),Tle(t)&&!wle(t))throw new fle("stream",t,"must be writable");const r=ble(this,t);return e!=null&&e.signal&&xle(e.signal,r),r}function Jv(t,e){if(typeof t!="function")throw new Op("fn",["Function","AsyncFunction"],t);e!=null&&_u(e,"options"),(e==null?void 0:e.signal)!=null&&Su(e.signal,"options.signal");let r=1;(e==null?void 0:e.concurrency)!=null&&(r=NR(e.concurrency));let n=r-1;return(e==null?void 0:e.highWaterMark)!=null&&(n=NR(e.highWaterMark)),PR(r,"options.concurrency",1),PR(n,"options.highWaterMark",0),n+=r,(async function*(){const i=la.AbortSignalAny([e==null?void 0:e.signal].filter(Sle)),a=this,s=[],o={signal:i};let l,u,h=!1,d=0;function f(){h=!0,p()}function p(){d-=1,g()}function g(){u&&!h&&d<r&&s.length<n&&(u(),u=null)}async function m(){try{for await(let v of a){if(h)return;if(i.aborted)throw new mo;try{if(v=t(v,o),v===Zv)continue;v=Ale(v)}catch(y){v=zR(y)}d+=1,$R(v,p,f),s.push(v),l&&(l(),l=null),!h&&(s.length>=n||d>=r)&&await new FR(y=>{u=y})}s.push(UR)}catch(v){const y=zR(v);$R(y,p,f),s.push(y)}finally{h=!0,l&&(l(),l=null)}}m();try{for(;;){for(;s.length>0;){const v=await s[0];if(v===UR)return;if(i.aborted)throw new mo;v!==Zv&&(yield v),s.shift(),g()}await new FR(v=>{l=v})}}finally{h=!0,u&&(u(),u=null)}}).call(this)}function Rle(t=void 0){return t!=null&&_u(t,"options"),(t==null?void 0:t.signal)!=null&&Su(t.signal,"options.signal"),(async function*(){let e=0;for await(const n of this){var r;if(t!=null&&(r=t.signal)!==null&&r!==void 0&&r.aborted)throw new mo({cause:t.signal.reason});yield[e++,n]}}).call(this)}async function GR(t,e=void 0){for await(const r of x5.call(this,t,e))return!0;return!1}async function Ile(t,e=void 0){if(typeof t!="function")throw new Op("fn",["Function","AsyncFunction"],t);return!await GR.call(this,async(...r)=>!await t(...r),e)}async function Mle(t,e){for await(const r of x5.call(this,t,e))return r}async function Dle(t,e){if(typeof t!="function")throw new Op("fn",["Function","AsyncFunction"],t);async function r(n,i){return await t(n,i),Zv}for await(const n of Jv.call(this,r,e));}function x5(t,e){if(typeof t!="function")throw new Op("fn",["Function","AsyncFunction"],t);async function r(n,i){return await t(n,i)?n:Zv}return Jv.call(this,r,e)}class Ole extends ple{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}async function Ble(t,e,r){var n;if(typeof t!="function")throw new Op("reducer",["Function","AsyncFunction"],t);r!=null&&_u(r,"options"),(r==null?void 0:r.signal)!=null&&Su(r.signal,"options.signal");let i=arguments.length>1;if(r!=null&&(n=r.signal)!==null&&n!==void 0&&n.aborted){const u=new mo(void 0,{cause:r.signal.reason});throw this.once("error",()=>{}),await yle(this.destroy(u)),u}const a=new dle,s=a.signal;if(r!=null&&r.signal){const u={once:!0,[mle]:this,[vle]:!0};r.signal.addEventListener("abort",()=>a.abort(),u)}let o=!1;try{for await(const u of this){var l;if(o=!0,r!=null&&(l=r.signal)!==null&&l!==void 0&&l.aborted)throw new mo;i?e=await t(e,u,{signal:s}):(e=u,i=!0)}if(!o&&!i)throw new Ole}finally{a.abort()}return e}async function Ple(t){t!=null&&_u(t,"options"),(t==null?void 0:t.signal)!=null&&Su(t.signal,"options.signal");const e=[];for await(const n of this){var r;if(t!=null&&(r=t.signal)!==null&&r!==void 0&&r.aborted)throw new mo(void 0,{cause:t.signal.reason});Ele(e,n)}return e}function Nle(t,e){const r=Jv.call(this,t,e);return(async function*(){for await(const n of r)yield*n}).call(this)}function WR(t){if(t=_le(t),Cle(t))return 0;if(t<0)throw new gle("number",">= 0",t);return t}function Fle(t,e=void 0){return e!=null&&_u(e,"options"),(e==null?void 0:e.signal)!=null&&Su(e.signal,"options.signal"),t=WR(t),(async function*(){var r;if(e!=null&&(r=e.signal)!==null&&r!==void 0&&r.aborted)throw new mo;for await(const i of this){var n;if(e!=null&&(n=e.signal)!==null&&n!==void 0&&n.aborted)throw new mo;t--<=0&&(yield i)}}).call(this)}function zle(t,e=void 0){return e!=null&&_u(e,"options"),(e==null?void 0:e.signal)!=null&&Su(e.signal,"options.signal"),t=WR(t),(async function*(){var r;if(e!=null&&(r=e.signal)!==null&&r!==void 0&&r.aborted)throw new mo;for await(const i of this){var n;if(e!=null&&(n=e.signal)!==null&&n!==void 0&&n.aborted)throw new mo;if(t-- >0&&(yield i),t<=0)return}}).call(this)}B3.streamReturningOperators={asIndexedPairs:kle(Rle,"readable.asIndexedPairs will be removed in a future version."),drop:Fle,filter:x5,flatMap:Nle,map:Jv,take:zle,compose:Lle},B3.promiseReturningOperators={every:Ile,forEach:Dle,reduce:Ble,toArray:Ple,some:GR,find:Mle};var w5,HR;function qR(){if(HR)return w5;HR=1;const{ArrayPrototypePop:t,Promise:e}=nn,{isIterable:r,isNodeStream:n,isWebStream:i}=cl,{pipelineImpl:a}=y5,{finished:s}=dc;jR();function o(...l){return new e((u,h)=>{let d,f;const p=l[l.length-1];if(p&&typeof p=="object"&&!n(p)&&!r(p)&&!i(p)){const g=t(l);d=g.signal,f=g.end}a(l,(g,m)=>{g?h(g):u(m)},{signal:d,end:f})})}return w5={finished:s,pipeline:o},w5}var YR;function jR(){if(YR)return D3.exports;YR=1;const{Buffer:t}=co,{ObjectDefineProperty:e,ObjectKeys:r,ReflectApply:n}=nn,{promisify:{custom:i}}=la,{streamReturningOperators:a,promiseReturningOperators:s}=B3,{codes:{ERR_ILLEGAL_CONSTRUCTOR:o}}=Ui,l=BR,{setDefaultHighWaterMark:u,getDefaultHighWaterMark:h}=Hv,{pipeline:d}=y5,{destroyer:f}=Td,p=dc,g=qR(),m=cl,v=D3.exports=K3.Stream;v.isDestroyed=m.isDestroyed,v.isDisturbed=m.isDisturbed,v.isErrored=m.isErrored,v.isReadable=m.isReadable,v.isWritable=m.isWritable,v.Readable=qv();for(const b of r(a)){let x=function(...E){if(new.target)throw o();return v.Readable.from(n(k,this,E))};const k=a[b];e(x,"name",{__proto__:null,value:k.name}),e(x,"length",{__proto__:null,value:k.length}),e(v.Readable.prototype,b,{__proto__:null,value:x,enumerable:!1,configurable:!0,writable:!0})}for(const b of r(s)){let x=function(...E){if(new.target)throw o();return n(k,this,E)};const k=s[b];e(x,"name",{__proto__:null,value:k.name}),e(x,"length",{__proto__:null,value:k.length}),e(v.Readable.prototype,b,{__proto__:null,value:x,enumerable:!1,configurable:!0,writable:!0})}v.Writable=n5(),v.Duplex=ul(),v.Transform=kR,v.PassThrough=SR,v.pipeline=d;const{addAbortSignal:y}=Gv;return v.addAbortSignal=y,v.finished=p,v.destroy=f,v.compose=l,v.setDefaultHighWaterMark=u,v.getDefaultHighWaterMark=h,e(v,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return g}}),e(d,i,{__proto__:null,enumerable:!0,get(){return g.pipeline}}),e(p,i,{__proto__:null,enumerable:!0,get(){return g.finished}}),v.Stream=v,v._isUint8Array=function(b){return b instanceof Uint8Array},v._uint8ArrayToBuffer=function(b){return t.from(b.buffer,b.byteOffset,b.byteLength)},D3.exports}(function(t){const e=jR(),r=qR(),n=e.Readable.destroy;t.exports=e.Readable,t.exports._uint8ArrayToBuffer=e._uint8ArrayToBuffer,t.exports._isUint8Array=e._isUint8Array,t.exports.isDisturbed=e.isDisturbed,t.exports.isErrored=e.isErrored,t.exports.isReadable=e.isReadable,t.exports.Readable=e.Readable,t.exports.Writable=e.Writable,t.exports.Duplex=e.Duplex,t.exports.Transform=e.Transform,t.exports.PassThrough=e.PassThrough,t.exports.addAbortSignal=e.addAbortSignal,t.exports.finished=e.finished,t.exports.destroy=e.destroy,t.exports.destroy=n,t.exports.pipeline=e.pipeline,t.exports.compose=e.compose,Object.defineProperty(e,"promises",{configurable:!0,enumerable:!0,get(){return r}}),t.exports.Stream=e.Stream,t.exports.default=t.exports})(lL);var XR=lL.exports;const T5=Symbol("iter");function Bp(t,e,r=4){if(r===0)return Object.assign(t,e);for(const n in e)t[n]=Bp(t[n]||Object.create(null),e[n],r-1);return t}function KR(t,e,r=4){let n=!1;for(const i in t)if(i in e){const a=r===0?null:KR(t[i],e[i],r-1);if(a!==!1)n=n||Object.create(null),n[i]=a;else if(r===3)return!1}return n}function QR(t,e,r=4){let n=!1;for(const i in t)if(!(i in e))n=n||Object.create(null),n[i]=r===0?null:Bp({},t[i],r-1);else if(r!==0){const a=QR(t[i],e[i],r-1);if(a!==!1)n=n||Object.create(null),n[i]=a;else if(r===3)return!1}return n}class $le{constructor(e={}){this._id=1,this._ids=Object.create(null),this._ids[""]=1,this._entities=Object.create(null),this._entities[1]="",this._blankNodeIndex=0,this._factory=e.factory||yu}_termFromId(e){if(e[0]==="."){const r=this._entities,n=e.split(".");return this._factory.quad(this._termFromId(r[n[1]]),this._termFromId(r[n[2]]),this._termFromId(r[n[3]]),n[4]&&this._termFromId(r[n[4]]))}return Ep(e,this._factory)}_termToNumericId(e){if(e.termType==="Quad"){const r=this._termToNumericId(e.subject),n=this._termToNumericId(e.predicate),i=this._termToNumericId(e.object);let a;return r&&n&&i&&(R3(e.graph)||(a=this._termToNumericId(e.graph)))&&this._ids[a?`.${r}.${n}.${i}.${a}`:`.${r}.${n}.${i}`]}return this._ids[gd(e)]}_termToNewNumericId(e){const r=e&&e.termType==="Quad"?`.${this._termToNewNumericId(e.subject)}.${this._termToNewNumericId(e.predicate)}.${this._termToNewNumericId(e.object)}${R3(e.graph)?"":`.${this._termToNewNumericId(e.graph)}`}`:gd(e);return this._ids[r]||(this._ids[this._entities[++this._id]=r]=this._id)}createBlankNode(e){let r,n;if(e)for(r=e=`_:${e}`,n=1;this._ids[r];)r=e+n++;else do r=`_:b${this._blankNodeIndex++}`;while(this._ids[r]);return this._ids[r]=++this._id,this._entities[this._id]=r,this._factory.blankNode(r.substr(2))}}class ca{constructor(e,r){this._size=0,this._graphs=Object.create(null),!r&&e&&!e[0]&&typeof e.match!="function"&&(r=e,e=null),r=r||{},this._factory=r.factory||yu,this._entityIndex=r.entityIndex||new $le({factory:this._factory}),this._entities=this._entityIndex._entities,this._termFromId=this._entityIndex._termFromId.bind(this._entityIndex),this._termToNumericId=this._entityIndex._termToNumericId.bind(this._entityIndex),this._termToNewNumericId=this._entityIndex._termToNewNumericId.bind(this._entityIndex),e&&this.addAll(e)}get size(){let e=this._size;if(e!==null)return e;e=0;const r=this._graphs;let n,i;for(const a in r)for(const s in n=r[a].subjects)for(const o in i=n[s])e+=Object.keys(i[o]).length;return this._size=e}_addToIndex(e,r,n,i){const a=e[r]||(e[r]={}),s=a[n]||(a[n]={}),o=i in s;return o||(s[i]=null),!o}_removeFromIndex(e,r,n,i){const a=e[r],s=a[n];delete s[i];for(const o in s)return;delete a[n];for(const o in a)return;delete e[r]}*_findInIndex(e,r,n,i,a,s,o,l){let u,h,d;const f=this._entities,p=this._termFromId(f[l]),g={subject:null,predicate:null,object:null};r&&((u=e,e={})[r]=u[r]);for(const m in e)if(h=e[m]){g[a]=this._termFromId(f[m]),n&&((u=h,h={})[n]=u[n]);for(const v in h)if(d=h[v]){g[s]=this._termFromId(f[v]);const y=i?i in d?[i]:[]:Object.keys(d);for(let b=0;b<y.length;b++)g[o]=this._termFromId(f[y[b]]),yield this._factory.quad(g.subject,g.predicate,g.object,p)}}}_loop(e,r){for(const n in e)r(n)}_loopByKey0(e,r,n){let i,a;if(i=e[r])for(a in i)n(a)}_loopByKey1(e,r,n){let i,a;for(i in e)a=e[i],a[r]&&n(i)}_loopBy2Keys(e,r,n,i){let a,s,o;if((a=e[r])&&(s=a[n]))for(o in s)i(o)}_countInIndex(e,r,n,i){let a=0,s,o,l;r&&((s=e,e={})[r]=s[r]);for(const u in e)if(o=e[u]){n&&((s=o,o={})[n]=s[n]);for(const h in o)(l=o[h])&&(i?i in l&&a++:a+=Object.keys(l).length)}return a}_getGraphs(e){return e=e===""?1:e&&(this._termToNumericId(e)||-1),typeof e!="number"?this._graphs:{[e]:this._graphs[e]}}_uniqueEntities(e){const r=Object.create(null);return n=>{n in r||(r[n]=!0,e(this._termFromId(this._entities[n],this._factory)))}}add(e){return this.addQuad(e),this}addQuad(e,r,n,i){r||(i=e.graph,n=e.object,r=e.predicate,e=e.subject),i=i?this._termToNewNumericId(i):1;let a=this._graphs[i];return a||(a=this._graphs[i]={subjects:{},predicates:{},objects:{}},Object.freeze(a)),e=this._termToNewNumericId(e),r=this._termToNewNumericId(r),n=this._termToNewNumericId(n),this._addToIndex(a.subjects,e,r,n)?(this._addToIndex(a.predicates,r,n,e),this._addToIndex(a.objects,n,e,r),this._size=null,!0):!1}addQuads(e){for(let r=0;r<e.length;r++)this.addQuad(e[r])}delete(e){return this.removeQuad(e),this}has(e,r,n,i){return e&&e.subject&&({subject:e,predicate:r,object:n,graph:i}=e),!this.readQuads(e,r,n,i).next().done}import(e){return e.on("data",r=>{this.addQuad(r)}),e}removeQuad(e,r,n,i){r||({subject:e,predicate:r,object:n,graph:i}=e),i=i?this._termToNumericId(i):1;const a=this._graphs;let s,o,l;if(!(e=e&&this._termToNumericId(e))||!(r=r&&this._termToNumericId(r))||!(n=n&&this._termToNumericId(n))||!(s=a[i])||!(o=s.subjects[e])||!(l=o[r])||!(n in l))return!1;this._removeFromIndex(s.subjects,e,r,n),this._removeFromIndex(s.predicates,r,n,e),this._removeFromIndex(s.objects,n,e,r),this._size!==null&&this._size--;for(e in s.subjects)return!0;return delete a[i],!0}removeQuads(e){for(let r=0;r<e.length;r++)this.removeQuad(e[r])}remove(e){return e.on("data",r=>{this.removeQuad(r)}),e}removeMatches(e,r,n,i){const a=new XR.Readable({objectMode:!0}),s=this.readQuads(e,r,n,i);return a._read=o=>{for(;--o>=0;){const{done:l,value:u}=s.next();if(l){a.push(null);return}a.push(u)}},this.remove(a)}deleteGraph(e){return this.removeMatches(null,null,null,e)}getQuads(e,r,n,i){return[...this.readQuads(e,r,n,i)]}*readQuads(e,r,n,i){const a=this._getGraphs(i);let s,o,l,u;if(!(e&&!(o=this._termToNumericId(e))||r&&!(l=this._termToNumericId(r))||n&&!(u=this._termToNumericId(n))))for(const h in a)(s=a[h])&&(o?u?yield*this._findInIndex(s.objects,u,o,l,"object","subject","predicate",h):yield*this._findInIndex(s.subjects,o,l,null,"subject","predicate","object",h):l?yield*this._findInIndex(s.predicates,l,u,null,"predicate","object","subject",h):u?yield*this._findInIndex(s.objects,u,null,null,"object","subject","predicate",h):yield*this._findInIndex(s.subjects,null,null,null,"subject","predicate","object",h))}match(e,r,n,i){return new Sd(this,e,r,n,i,{entityIndex:this._entityIndex})}countQuads(e,r,n,i){const a=this._getGraphs(i);let s=0,o,l,u,h;if(e&&!(l=this._termToNumericId(e))||r&&!(u=this._termToNumericId(r))||n&&!(h=this._termToNumericId(n)))return 0;for(const d in a)(o=a[d])&&(e?n?s+=this._countInIndex(o.objects,h,l,u):s+=this._countInIndex(o.subjects,l,u,h):r?s+=this._countInIndex(o.predicates,u,h,l):s+=this._countInIndex(o.objects,h,l,u));return s}forEach(e,r,n,i,a){this.some(s=>(e(s,this),!1),r,n,i,a)}every(e,r,n,i,a){return!this.some(s=>!e(s,this),r,n,i,a)}some(e,r,n,i,a){for(const s of this.readQuads(r,n,i,a))if(e(s,this))return!0;return!1}getSubjects(e,r,n){const i=[];return this.forSubjects(a=>{i.push(a)},e,r,n),i}forSubjects(e,r,n,i){const a=this._getGraphs(i);let s,o,l;if(e=this._uniqueEntities(e),!(r&&!(o=this._termToNumericId(r))||n&&!(l=this._termToNumericId(n))))for(i in a)(s=a[i])&&(o?l?this._loopBy2Keys(s.predicates,o,l,e):this._loopByKey1(s.subjects,o,e):l?this._loopByKey0(s.objects,l,e):this._loop(s.subjects,e))}getPredicates(e,r,n){const i=[];return this.forPredicates(a=>{i.push(a)},e,r,n),i}forPredicates(e,r,n,i){const a=this._getGraphs(i);let s,o,l;if(e=this._uniqueEntities(e),!(r&&!(o=this._termToNumericId(r))||n&&!(l=this._termToNumericId(n))))for(i in a)(s=a[i])&&(o?l?this._loopBy2Keys(s.objects,l,o,e):this._loopByKey0(s.subjects,o,e):l?this._loopByKey1(s.predicates,l,e):this._loop(s.predicates,e))}getObjects(e,r,n){const i=[];return this.forObjects(a=>{i.push(a)},e,r,n),i}forObjects(e,r,n,i){const a=this._getGraphs(i);let s,o,l;if(e=this._uniqueEntities(e),!(r&&!(o=this._termToNumericId(r))||n&&!(l=this._termToNumericId(n))))for(i in a)(s=a[i])&&(o?l?this._loopBy2Keys(s.subjects,o,l,e):this._loopByKey1(s.objects,o,e):l?this._loopByKey0(s.predicates,l,e):this._loop(s.objects,e))}getGraphs(e,r,n){const i=[];return this.forGraphs(a=>{i.push(a)},e,r,n),i}forGraphs(e,r,n,i){for(const a in this._graphs)this.some(s=>(e(s.graph),!0),r,n,i,this._termFromId(this._entities[a]))}createBlankNode(e){return this._entityIndex.createBlankNode(e)}extractLists({remove:e=!1,ignoreErrors:r=!1}={}){const n={},i=r?()=>!0:(o,l)=>{throw new Error(`${o.value} ${l}`)},a=this.getQuads(null,di.rdf.rest,di.rdf.nil,null),s=e?[...a]:[];return a.forEach(o=>{const l=[];let u=!1,h,d;const f=o.graph;let p=o.subject;for(;p&&!u;){const g=this.getQuads(null,null,p,null),m=this.getQuads(p,null,null,null);let v,y=null,b=null,x=null;for(let k=0;k<m.length&&!u;k++)v=m[k],v.graph.equals(f)?h?u=i(p,"has non-list arcs out"):v.predicate.value===di.rdf.first?y?u=i(p,"has multiple rdf:first arcs"):s.push(y=v):v.predicate.value===di.rdf.rest?b?u=i(p,"has multiple rdf:rest arcs"):s.push(b=v):g.length?u=i(p,"can't be subject and object"):(h=v,d="subject"):u=i(p,"not confined to single graph");for(let k=0;k<g.length&&!u;++k)v=g[k],h?u=i(p,"can't have coreferences"):v.predicate.value===di.rdf.rest?x?u=i(p,"has incoming rdf:rest arcs"):x=v:(h=v,d="object");y?l.unshift(y.object):u=i(p,"has no list head"),p=x&&x.subject}u?e=!1:h&&(n[h[d].value]=l)}),e&&this.removeQuads(s),n}addAll(e){if(e instanceof Sd&&(e=e.filtered),Array.isArray(e))this.addQuads(e);else if(e instanceof ca&&e._entityIndex===this._entityIndex)e._size!==0&&(this._graphs=Bp(this._graphs,e._graphs),this._size=null);else for(const r of e)this.add(r);return this}contains(e){if(e instanceof Sd&&(e=e.filtered),e===this)return!0;if(!(e instanceof ca)||this._entityIndex!==e._entityIndex)return e.every(u=>this.has(u));const r=this._graphs,n=e._graphs;let i,a,s,o,l;for(const u in n){if(!(i=r[u]))return!1;i=i.subjects;for(const h in a=n[u].subjects){if(!(s=i[h]))return!1;for(const d in o=a[h]){if(!(l=s[d]))return!1;for(const f in o[d])if(!(f in l))return!1}}}return!0}deleteMatches(e,r,n,i){for(const a of this.match(e,r,n,i))this.removeQuad(a);return this}difference(e){if(e&&e instanceof Sd&&(e=e.filtered),e===this)return new ca({entityIndex:this._entityIndex});if(e instanceof ca&&e._entityIndex===this._entityIndex){const r=new ca({entityIndex:this._entityIndex}),n=QR(this._graphs,e._graphs);return n&&(r._graphs=n,r._size=null),r}return this.filter(r=>!e.has(r))}equals(e){return e instanceof Sd&&(e=e.filtered),e===this||this.size===e.size&&this.contains(e)}filter(e){const r=new ca({entityIndex:this._entityIndex});for(const n of this)e(n,this)&&r.add(n);return r}intersection(e){if(e instanceof Sd&&(e=e.filtered),e===this){const r=new ca({entityIndex:this._entityIndex});return r._graphs=Bp(Object.create(null),this._graphs),r._size=this._size,r}else if(e instanceof ca&&this._entityIndex===e._entityIndex){const r=new ca({entityIndex:this._entityIndex}),n=KR(e._graphs,this._graphs);return n&&(r._graphs=n,r._size=null),r}return this.filter(r=>e.has(r))}map(e){const r=new ca({entityIndex:this._entityIndex});for(const n of this)r.add(e(n,this));return r}reduce(e,r){const n=this.readQuads();let i=r===void 0?n.next().value:r;for(const a of n)i=e(i,a,this);return i}toArray(){return this.getQuads()}toCanonical(){throw new Error("not implemented")}toStream(){return this.match()}toString(){return new sL().quadsToString(this)}union(e){const r=new ca({entityIndex:this._entityIndex});return r._graphs=Bp(Object.create(null),this._graphs),r._size=this._size,r.addAll(e),r}*[Symbol.iterator](){yield*this.readQuads()}}function vo(t,e,r=0){const n=e[r];if(n&&!(n in t))return!1;let i=!1;for(const a in n?{[n]:t[n]}:t){const s=r===2?null:vo(t[a],e,r+1);s!==!1&&(i=i||Object.create(null),i[a]=s)}return i}let Sd=class yte extends XR.Readable{constructor(e,r,n,i,a,s){super({objectMode:!0}),Object.assign(this,{n3Store:e,subject:r,predicate:n,object:i,graph:a,options:s})}get filtered(){if(!this._filtered){const{n3Store:e,graph:r,object:n,predicate:i,subject:a}=this,s=this._filtered=new ca({factory:e._factory,entityIndex:this.options.entityIndex});let o,l,u;if(a&&!(o=s._termToNumericId(a))||i&&!(l=s._termToNumericId(i))||n&&!(u=s._termToNumericId(n)))return s;const h=e._getGraphs(r);for(const d in h){let f,p,g,m;(m=h[d])&&(!o&&l?(p=vo(m.predicates,[l,u,o]))&&(f=vo(m.subjects,[o,l,u]),g=vo(m.objects,[u,o,l])):u?(g=vo(m.objects,[u,o,l]))&&(f=vo(m.subjects,[o,l,u]),p=vo(m.predicates,[l,u,o])):(f=vo(m.subjects,[o,l,u]))&&(p=vo(m.predicates,[l,u,o]),g=vo(m.objects,[u,o,l])),f&&(s._graphs[d]={subjects:f,predicates:p,objects:g}))}s._size=null}return this._filtered}get size(){return this.filtered.size}_read(e){e>0&&!this[T5]&&(this[T5]=this[Symbol.iterator]());const r=this[T5];for(;--e>=0;){const{done:n,value:i}=r.next();if(n){this.push(null);return}this.push(i)}}addAll(e){return this.filtered.addAll(e)}contains(e){return this.filtered.contains(e)}deleteMatches(e,r,n,i){return this.filtered.deleteMatches(e,r,n,i)}difference(e){return this.filtered.difference(e)}equals(e){return this.filtered.equals(e)}every(e,r,n,i,a){return this.filtered.every(e,r,n,i,a)}filter(e){return this.filtered.filter(e)}forEach(e,r,n,i,a){return this.filtered.forEach(e,r,n,i,a)}import(e){return this.filtered.import(e)}intersection(e){return this.filtered.intersection(e)}map(e){return this.filtered.map(e)}some(e,r,n,i,a){return this.filtered.some(e,r,n,i,a)}toCanonical(){return this.filtered.toCanonical()}toStream(){return this._filtered?this._filtered.toStream():this.n3Store.match(this.subject,this.predicate,this.object,this.graph)}union(e){return this._filtered?this._filtered.union(e):this.n3Store.match(this.subject,this.predicate,this.object,this.graph).addAll(e)}toArray(){return this._filtered?this._filtered.toArray():this.n3Store.getQuads(this.subject,this.predicate,this.object,this.graph)}reduce(e,r){return this.filtered.reduce(e,r)}toString(){return new sL().quadsToString(this)}add(e){return this.filtered.add(e)}delete(e){return this.filtered.delete(e)}has(e){return this.filtered.has(e)}match(e,r,n,i){return new yte(this.filtered,e,r,n,i,this.options)}*[Symbol.iterator](){yield*this._filtered||this.n3Store.readQuads(this.subject,this.predicate,this.object,this.graph)}};const k5={rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#"},xn={namespace:"https://prez.dev/",label:"https://prez.dev/label",description:"https://prez.dev/description",provenance:"https://prez.dev/provenance",link:"https://prez.dev/link",members:"https://prez.dev/members",identifier:"https://prez.dev/identifier",count:"https://prez.dev/count",searchResult:"https://prez.dev/SearchResult",searchResultWeight:"https://prez.dev/searchResultWeight",searchResultPredicate:"https://prez.dev/searchResultPredicate",searchResultURI:"https://prez.dev/searchResultURI",searchResultMatch:"https://prez.dev/searchResultMatch",hasChildren:"https://prez.dev/hasChildren",facetCount:"https://prez.dev/facetCount",facetName:"https://prez.dev/facetName",facetValue:"https://prez.dev/facetValue"},ua={skosConceptScheme:"http://www.w3.org/2004/02/skos/core#ConceptScheme",skosConcept:"http://www.w3.org/2004/02/skos/core#Concept",a:"http://www.w3.org/1999/02/22-rdf-syntax-ns#type",rdfLangString:"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString",xmlString:"http://www.w3.org/2001/XMLSchema#string",w3Html:"http://www.w3.org/1999/02/22-rdf-syntax-ns#HTML",w3Markdown:"https://www.w3.org/ns/iana/media-types/text/markdown",shaclPathAlias:"http://example.com/shacl-extension#pathAlias",shaclPath:"http://www.w3.org/ns/shacl#path",shaclUnion:"http://www.w3.org/ns/shacl#union"};function Vle(t,e=k5){if(t==="a")return e.rdf+"type";{const[r,n]=t.split(":");return r?[r]+n:t}}function Ule(t,e=k5){let r="";return Object.entries(e).forEach(([n,i])=>{t.startsWith(i)&&(r=n+":"+t.split(i)[1])}),r}const Gle=t=>{const e=new URL(t);return`${e.protocol}//${e.hostname}`},{namedNode:Pp}=yu;class E5{constructor(){mu(this,"store"),mu(this,"parser"),mu(this,"prefixes"),mu(this,"basePath"),mu(this,"baseUrl"),mu(this,"linkedLists"),mu(this,"lists"),this.store=new ca,this.baseUrl="",this.basePath="",this.parser=new eL,this.prefixes=k5,this.linkedLists={},this.lists={}}load(e){e=`PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
105
+ `+e;const r=this.parser.parse(e,null,(n,i)=>{this.prefixes[n]=i.value});this.store.addQuads(r),this.linkedLists=this.store.extractLists(),this.buildLists()}buildLists(){this.lists={};const e=this.linkedLists;this.store.getQuads(null,ua.shaclPath,null,null).forEach(r=>{const n=r.object;if(n.termType==="BlankNode"){const i=this.store.getQuads(n,ua.shaclUnion,null,null);if(i.length>0){const a=i[0].object;if(a.termType==="BlankNode"&&a.value in e){const s=e[a.value],o=n.value;this.lists[o]=this.buildSubList(s)}else console.warn(`[buildLists] Found sh:union for ${n.value}, but its object ${a.value} is not a valid list head in linkedLists.`)}}})}buildSubList(e){var r;const n=[];for(const i of e)if(i.termType=="BlankNode"){const a=i.value;if(a in this.linkedLists){const s=this.buildSubList(this.linkedLists[a]);if(s.length>1){const o=n.find(l=>l.node.value==s[0].node.value);o?(o.list??(o.list=[])).push(...s.slice(1)):n.push({node:s[0].node,list:s.slice(1)})}else n.push(...s)}else{const s=(r=this.store.getObjects(i,ua.shaclPathAlias,null))==null?void 0:r[0];if(s){const o=this.toPrezTerm(s);n.push({node:o,list:[]})}}}else if(i.termType=="NamedNode"&&i.value!=ua.shaclUnion){const a=this.toPrezTerm(i);n.push({node:a,list:[]})}return n}setBaseUrl(e){this.baseUrl=e,this.basePath=new URL(e).pathname}toIri(e){return Vle(e,this.prefixes)}fromIri(e){return Ule(e,this.prefixes)}getObjectLiteral(e,r){return this.getObjects(e,r).map(n=>this.toPrezTerm(n))[0]||void 0}getProperties(e,r){const n={};return this.store.forEach(i=>{var a;r!=null&&r.excludePrefix&&i.predicate.value.startsWith(r.excludePrefix)||r!=null&&r.includePrefix&&!i.predicate.value.startsWith(r.includePrefix)||(n[a=i.predicate.value]??(n[a]={predicate:this.toPrezTerm(i.predicate),objects:[]}),n[i.predicate.value].objects.push(this.toPrezTerm(i.object)))},e,null,null,null),e.termType,n}getParents(e){e.startsWith(this.basePath)&&(e=e.substring(this.basePath.length));const r=e.split("/"),n=[];let i="";for(const a of r){if(a=="")continue;i+="/"+a;const s={url:i,segment:a};if(a.includes(":")){const o=a.split(":"),l=this.prefixes[o[0]];if(l){const u=this.getObjects(l+o[1],xn.label);u.length>0&&(s.label=Cv(u[0].value))}}n.push(s)}return n}toPrezTerm(e){switch(e.termType){case"NamedNode":const r=sae(e.value);r.label=this.getObjectLiteral(e.value,xn.label),r.description=this.getObjectLiteral(e.value,xn.description),r.provenance=this.getObjectLiteral(e.value,xn.provenance);const n=this.getObjects(e.value,xn.identifier);n.length>0&&(r.identifiers=n.map(u=>this.toPrezTerm(u)));const i=this.getObjects(e.value,xn.link);i.length>0&&(r.links=i.map(u=>({value:u.value,parents:this.getParents(u.value)})));const a=this.getObjects(e.value,xn.members);a.length>0&&(r.members={value:a[0].value,parents:this.getParents(a[0].value)});const s=this.getObjects(e.value,ua.a);return s.length>0&&(r.rdfTypes=s.map(u=>this.toPrezTerm(u))),r;case"Literal":const o=Cv(e.value);return e.datatype&&(o.datatype=this.toPrezTerm(e.datatype)),e.language&&(o.language=e.language),o;case"BlankNode":const l=G9(e.value);return l.properties=this.getProperties(e),e.value in this.lists&&(l.list=this.lists[e.value]),l;default:throw"Invalid n3 Term object"}}toPrezFocusNode(e){var r,n,i,a,s;const o=this.toPrezTerm(e);return o.properties=this.getProperties(e,{excludePrefix:xn.namespace}),o.systemProperties=this.getProperties(e,{includePrefix:xn.namespace}),(r=o.rdfTypes)!=null&&r.map(l=>l.value).includes(ua.skosConcept)&&(o.hasChildren=((s=(a=(i=(n=o.systemProperties)==null?void 0:n[xn.hasChildren])==null?void 0:i.objects)==null?void 0:a[0])==null?void 0:s.value)=="true"),o}getSubjects(e,r){return this.store.getSubjects(e,r,null)}getObjects(e,r){if(typeof r=="string")return this.store.getObjects(Pp(e),Pp(r),null);{const n=[];return r.forEach(i=>{n.push(...this.store.getObjects(Pp(e),Pp(i),null))}),n}}getMembers(e){this.getObjects(e,this.toIri("prez:members")).forEach(r=>({value:r.value,parents:[]}))}getConcepts(e){const r=this.getSubjects(this.toIri("skos:inScheme"),e.value);function n(u){return r.map(h=>h.value).includes(u.value)}const i=this.getObjects(e.value,this.toIri("skos:hasTopConcept")),a=this.getObjects(e.value,this.toIri("skos:topConceptOf")),s={},o=[...i,...a].filter(u=>n(u));r.forEach(u=>{s[u.value]=[]}),r.forEach(u=>{this.getObjects(u.value,this.toIri("skos:broader")).forEach(h=>{n(h)&&s[h.value].push(u)}),this.getObjects(u.value,this.toIri("skos:narrower")).forEach(h=>{n(h)&&s[u.value].push(h)})});const l=[];return o.forEach(u=>{l.push(this.createHierarchy(u,s))}),l}createHierarchy(e,r){const n=r[e.value].map(i=>this.createHierarchy(i,r));return{...this.toPrezTerm(e),hasChildren:n.length>0,narrowers:n}}getByPrezId(e){const r=[];return this.store.forEach(n=>{r.push(n)},null,null,Pp("https://prez.dev/FocusNode"),null),e?r.find(n=>n.object.value===e).subject:r.map(n=>n.subject)}getCount(){const e=this.store.getObjects(null,xn.count,null);return e.length>0?Number(e[0].value.replace(">","")):0}getMaxReached(){const e=this.store.getObjects(null,xn.count,null);return e.length>0?!e[0].value.includes(">"):!1}getList(){const e=[];return this.getByPrezId().forEach(r=>{e.push(this.toPrezFocusNode(r))}),e}getSkosCollections(e){const r=this.getSubjects("http://www.w3.org/2004/02/skos/core#inScheme",e.value);return this.getSubjects("http://www.w3.org/1999/02/22-rdf-syntax-ns#type","http://www.w3.org/2004/02/skos/core#Collection").filter(n=>r.find(i=>i.value===n.value)).map(n=>this.toPrezTerm(n)).sort((n,i)=>n.label&&i.label?n.label.value.localeCompare(i.label.value):n.label?-1:i.label?1:n.value.localeCompare(i.value))}getItem(){var e;const r=this.getByPrezId();if(r.length==0)throw new Error("Unable to find item");const n=this.toPrezFocusNode(r[0]);if((e=n.rdfTypes)!=null&&e.map(i=>i.value).includes(ua.skosConceptScheme)){const i=this.getSkosCollections(r[0]);return{...n,collections:i}}return n}getSubItems(e){const r=this.store.getQuads(null,e,null,null),n=[];return r.forEach(i=>{const a=this.toPrezFocusNode(i.object);a&&n.push(a)}),n}search(){return this.getSubjects(ua.a,xn.searchResult).map(e=>({hash:e.value.split("urn:hash:").slice(-1)[0],weight:Number(this.getObjects(e.value,xn.searchResultWeight)[0].value),predicate:this.toPrezTerm(this.getObjects(e.value,xn.searchResultPredicate)[0]),match:this.toPrezTerm(this.getObjects(e.value,xn.searchResultMatch)[0]),resource:this.toPrezFocusNode(this.getObjects(e.value,xn.searchResultURI)[0])}))}getFacets(){const e=[];return this.store.getQuads(null,xn.facetName,null,null).forEach(r=>{var n,i,a,s,o,l,u,h,d;if(r.subject.termType=="BlankNode"){const f=G9(r.subject.value);f.properties=this.getProperties(r.subject);const p=Number((a=(i=(n=f.properties)==null?void 0:n[xn.facetCount])==null?void 0:i.objects)==null?void 0:a[0].value)||0,g=(l=(o=(s=f.properties)==null?void 0:s[xn.facetName])==null?void 0:o.objects)==null?void 0:l[0],m=(d=(h=(u=f.properties)==null?void 0:u[xn.facetValue])==null?void 0:h.objects)==null?void 0:d[0],v=g,y=e.find(b=>b.facetName.value==(v==null?void 0:v.value));if(p>0&&v!==void 0&&m!==void 0){const b=this.toPrezTerm(m);if(b.termType==="Literal"||b.termType==="NamedNode"){const x={term:b,count:p};y?y.facetValues.push(x):e.push({facetName:v,facetValues:[x]})}}}}),e}}class Wle extends Error{constructor(e){super(e),this.name="NetworkError"}}function Hle(t){let e={};const r=t.split(",").map(i=>{const[,a,s]=i.trim().match(/<(.+)>; (.+)/),o={uri:a};return s.split("; ").forEach(l=>{const[,u,h]=l.match(/(.+)=[\"<](.+)[\">]/);o[u]=h}),o});r.filter(i=>i.rel==="type").forEach(i=>{e[i.anchor]={default:!1,current:!1,token:i.token,mediatypes:[],title:i.title,description:"",uri:i.anchor}});const n=r.find(i=>i.rel==="self");return n.format in e&&(e[n.format].current=!0),r.filter(i=>i.rel==="alternate"&&i.format).forEach(i=>{e[i.format].mediatypes.map(a=>a.mediatype).includes(i.type)||e[i.format].mediatypes.push({title:"",mediatype:i.type,default:!1})}),Object.values(e)}async function S5(t){const e=await fetch(t,{method:"GET",headers:{Accept:"text/anot+turtle"}});if(!e.ok)throw new Wle(`Network error - status code ${e.status}: ${e.statusText}`);const r=e.headers.get("link")||e.headers.get("Link"),n=r?Hle(r):[];return{data:await e.text(),profiles:n}}async function qle(t,e){const r=t+e,n=new URL(r).pathname,{data:i,profiles:a}=await S5(r),s=new E5;return s.setBaseUrl(t),s.load(i),{type:"list",data:s.getList(),profiles:a,maxReached:s.getMaxReached(),count:s.getCount(),parents:s.getParents(n),facets:s.getFacets()}}async function Yle(t,e){const r=t+e,n=new URL(r).pathname,{data:i,profiles:a}=await S5(r),s=new E5;return s.setBaseUrl(t),s.load(i),{type:"item",data:s.getItem(),profiles:a,parents:s.getParents(n),store:s,facets:s.getFacets()}}async function jle(t,e){const r=t+e,n=new URL(r).pathname,{data:i,profiles:a}=await S5(r),s=new E5;return s.setBaseUrl(t),s.load(i),{type:"search",data:s.search(),profiles:a,maxReached:s.getMaxReached(),count:s.getCount(),parents:s.getParents(n),facets:s.getFacets()}}const ha=T.defineComponent({__name:"Skeleton",props:{class:{}},setup(t){const e=t;return(r,n)=>(T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass(T.unref(yn)("animate-pulse rounded-md bg-muted",e.class))},null,2))}}),Xle={key:0},Kle={class:"p-4 border-b"},Qle={key:1},Zle={class:"flex flex-row justify-between items-center"},Jle={key:2,class:"space-y-4"},ece={key:3},tce={class:"space-y-4"},rce={key:4},nce={key:0,class:"mb-4 mt-8"},ice={class:"space-y-4"},ey=T.defineComponent({__name:"Loading",props:{variant:{}},setup(t){const e=t;return(r,n)=>e.variant=="list"?(T.openBlock(),T.createElementBlock("div",Xle,[T.createElementVNode("div",Kle,[T.createVNode(T.unref(ha),{class:"h-4 w-16"})]),(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList([...Array(4).keys()],i=>(T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass(`p-4 ${i<3?"border-b":""}`)},[T.createVNode(T.unref(ha),{class:"h-4 w-[250px]"})],2))),256))])):e.variant=="search"?(T.openBlock(),T.createElementBlock("div",Qle,[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList([...Array(4).keys()],i=>(T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass(`p-4 flex flex-col gap-2 ${i<3?"border-b":""}`)},[T.createElementVNode("div",Zle,[T.createVNode(T.unref(ha),{class:"h-4 w-44"}),T.createVNode(T.unref(ha),{class:"h-4 w-24"})]),T.createVNode(T.unref(ha),{class:"h-4 w-[400px]"})],2))),256))])):e.variant=="concept"?(T.openBlock(),T.createElementBlock("div",Jle,[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList([...Array(6).keys()],i=>(T.openBlock(),T.createBlock(T.unref(ha),{class:"h-4 w-44",key:i}))),128))])):e.variant=="item"?(T.openBlock(),T.createElementBlock("div",ece,[T.createElementVNode("div",tce,[T.createVNode(T.unref(ha),{class:"h-4 w-[300px]"}),T.createVNode(T.unref(ha),{class:"h-4 w-[200px]"})]),(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList([...Array(4).keys()],i=>(T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass(`p-4 flex flex-row gap-4 mt-4 ${i<3?"border-b":""}`)},[T.createVNode(T.unref(ha),{class:"h-4 w-28"}),T.createVNode(T.unref(ha),{class:"h-4 w-48"})],2))),256))])):(T.openBlock(),T.createElementBlock("div",rce,[e.variant=="item-table"?(T.openBlock(),T.createElementBlock("hr",nce)):T.createCommentVNode("",!0),T.createElementVNode("div",ice,[T.createVNode(T.unref(ha),{class:"h-4 w-[300px]"}),T.createVNode(T.unref(ha),{class:"h-4 w-[200px]"})]),(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList([...Array(4).keys()],i=>(T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass(`p-4 flex flex-row gap-4 mt-4 ${i<3?"border-b":""}`)},[T.createVNode(T.unref(ha),{class:"h-4 w-28"}),T.createVNode(T.unref(ha),{class:"h-4 w-48"})],2))),256))]))}}),ace=T.defineComponent({__name:"Alert",props:{class:{},variant:{}},setup(t){const e=t;return(r,n)=>(T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass(T.unref(yn)(T.unref(lce)({variant:r.variant}),e.class)),role:"alert"},[T.renderSlot(r.$slots,"default")],2))}}),sce=T.defineComponent({__name:"AlertDescription",props:{class:{}},setup(t){const e=t;return(r,n)=>(T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass(T.unref(yn)("text-sm [&_p]:leading-relaxed",e.class))},[T.renderSlot(r.$slots,"default")],2))}}),oce=T.defineComponent({__name:"AlertTitle",props:{class:{}},setup(t){const e=t;return(r,n)=>(T.openBlock(),T.createElementBlock("h5",{class:T.normalizeClass(T.unref(yn)("mb-1 font-medium leading-none tracking-tight",e.class))},[T.renderSlot(r.$slots,"default")],2))}}),lce=S3("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),ZR=T.defineComponent({__name:"Message",props:{severity:{},text:{}},setup(t){const e=t;return(r,n)=>(T.openBlock(),T.createBlock(T.unref(ace),{variant:e.severity==="error"?"destructive":"default",class:"message"},{default:T.withCtx(()=>[e.severity==="error"?(T.openBlock(),T.createBlock(T.unref(Ste),{key:0,class:"w-4 h-4"})):(T.openBlock(),T.createBlock(T.unref(NA),{key:1,class:"w-4 h-4"})),T.createVNode(T.unref(oce),null,{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(e.severity==="error"?"Error":"Message"),1)]),_:1}),T.createVNode(T.unref(sce),null,{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(e.text),1)]),_:1})]),_:1},8,["variant"]))}}),cce=T.defineComponent({__name:"DataProvider",props:{baseUrl:{},urlPath:{},url:{},data:{},type:{},loadingVariant:{},_components:{default:()=>({loading:ey,message:ZR})}},setup(t){const e=t,r=T.ref(),n=T.ref(!1),i=T.ref(!1),a=T.ref(),s=T.ref([]),o=T.ref(e.url||e.baseUrl+e.urlPath),l=T.ref(e.baseUrl||Gle(o.value)),u=T.ref(e.urlPath?e.urlPath:o.value.startsWith(l.value)?o.value.substring(l.value.length):o.value),h=e.loadingVariant||e.type,d=async()=>{if(a.value=void 0,n.value=!1,s.value=[],!o.value){a.value=new Error("No data URL provided");return}n.value=!0;try{const f=e.type=="list"?qle(l.value,u.value):e.type=="item"?Yle(l.value,u.value):e.type=="search"?jle(l.value,u.value):void 0;if(!f)throw new Error(`Unknown type "${e.type}"`);const p=await f;if(e.type==="list"&&Array.isArray(p.data)&&(r.value===void 0||Array.isArray(r.value.data)))if(r.value===void 0)r.value=p;else if(Array.isArray(r.value.data)){const g=[...r.value.data];g.push(...p.data),r.value.data=g}else r.value=p;else r.value=p;i.value=Array.isArray(p.data)&&p.data.length>0}catch(f){a.value=f,console.error("Error fetching data:",f)}finally{n.value=!1}};return T.watch([()=>e.url,()=>e.baseUrl,()=>e.urlPath],async([f,p,g],[m,v,y])=>{(f!==m||p!==v||g!==y)&&await d()},{immediate:!0}),T.onMounted(async()=>{r.value=void 0}),(f,p)=>(T.openBlock(),T.createElementBlock(T.Fragment,null,[T.createTextVNode(T.toDisplayString(o.value)+" - "+T.toDisplayString(u.value)+" ",1),n.value?T.renderSlot(f.$slots,"loading",{key:0},()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(e._components.loading),{variant:T.unref(h)},null,8,["variant"]))]):a.value?T.renderSlot(f.$slots,"error",{key:1,error:a.value},()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(e._components.message),{severity:"error",text:a.value.message},null,8,["text"]))]):r.value?T.renderSlot(f.$slots,"default",{key:2,data:r.value,item:r.value.data,list:r.value.data,hasMore:i.value,concepts:r.value.data,parents:r.value.parents,properties:s.value,profiles:r.value.profiles,type:r.value.type,url:o.value,baseUrl:l.value}):T.createCommentVNode("",!0)],64))}}),uce=T.defineComponent({__name:"DropdownMenu",props:{defaultOpen:{type:Boolean},open:{type:Boolean},dir:{},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const i=al(t,e);return(a,s)=>(T.openBlock(),T.createBlock(T.unref(Uie),T.normalizeProps(T.guardReactiveProps(T.unref(i))),{default:T.withCtx(()=>[T.renderSlot(a.$slots,"default")]),_:3},16))}}),hce=T.defineComponent({__name:"DropdownMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(t,{emit:e}){const r=t,n=e,i=T.computed(()=>{const{class:s,...o}=r;return o}),a=al(i,n);return(s,o)=>(T.openBlock(),T.createBlock(T.unref(Wie),null,{default:T.withCtx(()=>[T.createVNode(T.unref(Hie),T.mergeProps(T.unref(a),{class:T.unref(yn)("z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r.class)}),{default:T.withCtx(()=>[T.renderSlot(s.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),JR=T.defineComponent({__name:"DropdownMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},setup(t){const e=t,r=T.computed(()=>{const{class:i,...a}=e;return a}),n=wv(r);return(i,a)=>(T.openBlock(),T.createBlock(T.unref(qie),T.mergeProps(T.unref(n),{class:T.unref(yn)("relative flex cursor-default select-none items-center rounded-sm gap-2 px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",i.inset&&"pl-8",e.class)}),{default:T.withCtx(()=>[T.renderSlot(i.$slots,"default")]),_:3},16,["class"]))}}),dce=T.defineComponent({__name:"DropdownMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const r=wv(t);return(n,i)=>(T.openBlock(),T.createBlock(T.unref(Gie),T.mergeProps({class:"outline-none"},T.unref(r)),{default:T.withCtx(()=>[T.renderSlot(n.$slots,"default")]),_:3},16))}}),fce={class:"inline-flex gap-1 items-center"},pce=["href","title","target","rel"],gce={key:1},mce=["href","title","target","rel"],eI="item-link",_d=T.defineComponent({__name:"ItemLink",props:{variant:{},to:{},secondaryTo:{},title:{},target:{default:"_blank"},rel:{default:"noopener noreferrer"},class:{},copyLink:{type:[Boolean,String]},hidePrimaryLink:{type:Boolean},hideSecondaryLink:{type:Boolean},hideTitle:{type:Boolean},useSecondaryLinkOnly:{type:Boolean},_components:{default:()=>({copyButton:U9})}},setup(t){var h,d,f,p;const e=t;let r=e.hideSecondaryLink||!1,n=e.hideTitle||!1,i=e.target;switch(e.variant){case"item-table":break;case"item-list":break;case"item-header":break;case"search-results":n=!0;break}const a=typeof e.to=="string"?e.to:(h=e.to)!=null&&h.links?(f=(d=e.to)==null?void 0:d.links[0])==null?void 0:f.value:void 0,s=e.secondaryTo!==void 0?typeof e.secondaryTo=="string"?e.secondaryTo:((p=e.secondaryTo)==null?void 0:p.value)||"":e.to&&typeof e.to=="object"?e.to.value:"",o=a?a.startsWith("http")||a.startsWith("mailto"):!1,l=s?s.startsWith("http")||s.startsWith("mailto"):!1,u=e.class?eI+" "+e.class:eI;return(g,m)=>T.renderSlot(g.$slots,"wrapper",{url:T.unref(a),title:e.title,secondaryUrl:T.unref(s),target:T.unref(i)},()=>[T.createElementVNode("span",fce,[T.unref(a)&&!e.hidePrimaryLink?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[T.unref(o)?(T.openBlock(),T.createElementBlock("a",{key:0,class:T.normalizeClass(T.unref(u)),href:T.unref(a),title:T.unref(n)?void 0:e.title,target:e.target,rel:e.rel},[T.renderSlot(g.$slots,"default")],10,pce)):(T.openBlock(),T.createBlock(T.unref(ao.RouterLink),{key:1,class:T.normalizeClass(T.unref(u)),to:T.unref(a),title:T.unref(n)?void 0:e.title},{default:T.withCtx(()=>[T.renderSlot(g.$slots,"default")]),_:3},8,["class","to","title"]))],64)):(T.openBlock(),T.createElementBlock("span",gce,[T.renderSlot(g.$slots,"default")])),T.unref(s)&&!T.unref(r)?(T.openBlock(),T.createElementBlock(T.Fragment,{key:2},[T.unref(l)?(T.openBlock(),T.createElementBlock("a",{key:0,href:T.unref(s),title:T.unref(n)?void 0:e.title,target:e.target,rel:e.rel,class:T.normalizeClass(T.unref(u))},[T.createVNode(T.unref(Ate),{class:"w-4 h-4"})],10,mce)):(T.openBlock(),T.createBlock(T.unref(ao.RouterLink),{key:1,to:T.unref(s),title:T.unref(n)?void 0:e.title,class:T.normalizeClass(T.unref(u))},{default:T.withCtx(()=>[T.createVNode(T.unref(Mte),{class:"w-4 h-4"})]),_:1},8,["to","title","class"]))],64)):T.createCommentVNode("",!0),e.copyLink?(T.openBlock(),T.createBlock(T.resolveDynamicComponent(e._components.copyButton),{key:3,"icon-only":"",value:typeof g.copyLink=="string"?g.copyLink:T.unref(a)||T.unref(s),size:"icon",variant:"outline"},null,8,["value"])):T.createCommentVNode("",!0)])])}}),Cu=T.defineComponent({__name:"Node",props:{term:{},hideTooltip:{type:Boolean},hideLink:{type:Boolean},useExternalLinkOnly:{type:Boolean},textOnly:{type:Boolean},variant:{},_components:{default:()=>({itemLink:_d})}},setup(t){var u,h;const e=t;let r=e.hideTooltip||!1,n=e.textOnly||!1,i=e.hideLink||!1,a=e.useExternalLinkOnly||!1;switch(e.variant){case"item-table":break;case"item-list":break;case"item-header":i=!0;break}const s=e.term,o=(u=s.label)!=null&&u.value?s.label.value:s.curie?s.curie:s.value;let l=((h=s.description)==null?void 0:h.value)||s.curie||s.value;return l==o&&(o!=s.value?l=s.value:l=void 0),(d,f)=>T.renderSlot(d.$slots,"wrapper",{term:T.unref(s),link:T.unref(s).value,label:T.unref(o),tooltip:T.unref(l),variant:d.variant},()=>[T.unref(n)||T.unref(i)?T.renderSlot(d.$slots,"default",{key:0,term:T.unref(s),link:T.unref(s).value,label:T.unref(o),tooltip:T.unref(l)},()=>[T.createTextVNode(T.toDisplayString(T.unref(o)),1)]):(T.openBlock(),T.createBlock(T.resolveDynamicComponent(e._components.itemLink),{key:1,to:T.unref(a)?T.unref(s).value:T.unref(s),title:T.unref(r)?void 0:T.unref(l),variant:d.variant},{default:T.withCtx(()=>[T.renderSlot(d.$slots,"default",{term:T.unref(s),link:T.unref(s).value,label:T.unref(o),tooltip:T.unref(l)},()=>[T.createTextVNode(T.toDisplayString(T.unref(o)),1)])]),_:3},8,["to","title","variant"]))])}});/*! @license DOMPurify 3.2.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.5/LICENSE */const{entries:tI,setPrototypeOf:rI,isFrozen:vce,getPrototypeOf:yce,getOwnPropertyDescriptor:bce}=Object;let{freeze:Gi,seal:ns,create:nI}=Object,{apply:_5,construct:C5}=typeof Reflect<"u"&&Reflect;Gi||(Gi=function(e){return e}),ns||(ns=function(e){return e}),_5||(_5=function(e,r,n){return e.apply(r,n)}),C5||(C5=function(e,r){return new e(...r)});const ty=Hi(Array.prototype.forEach),xce=Hi(Array.prototype.lastIndexOf),iI=Hi(Array.prototype.pop),Np=Hi(Array.prototype.push),wce=Hi(Array.prototype.splice),ry=Hi(String.prototype.toLowerCase),A5=Hi(String.prototype.toString),aI=Hi(String.prototype.match),Fp=Hi(String.prototype.replace),Tce=Hi(String.prototype.indexOf),kce=Hi(String.prototype.trim),Bs=Hi(Object.prototype.hasOwnProperty),Wi=Hi(RegExp.prototype.test),zp=Ece(TypeError);function Hi(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return _5(t,e,n)}}function Ece(t){return function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return C5(t,r)}}function hr(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ry;rI&&rI(t,null);let n=e.length;for(;n--;){let i=e[n];if(typeof i=="string"){const a=r(i);a!==i&&(vce(e)||(e[n]=a),i=a)}t[i]=!0}return t}function Sce(t){for(let e=0;e<t.length;e++)Bs(t,e)||(t[e]=null);return t}function Au(t){const e=nI(null);for(const[r,n]of tI(t))Bs(t,r)&&(Array.isArray(n)?e[r]=Sce(n):n&&typeof n=="object"&&n.constructor===Object?e[r]=Au(n):e[r]=n);return e}function $p(t,e){for(;t!==null;){const n=bce(t,e);if(n){if(n.get)return Hi(n.get);if(typeof n.value=="function")return Hi(n.value)}t=yce(t)}function r(){return null}return r}const sI=Gi(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),L5=Gi(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),R5=Gi(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),_ce=Gi(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),I5=Gi(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Cce=Gi(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),oI=Gi(["#text"]),lI=Gi(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),M5=Gi(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),cI=Gi(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ny=Gi(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ace=ns(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Lce=ns(/<%[\w\W]*|[\w\W]*%>/gm),Rce=ns(/\$\{[\w\W]*/gm),Ice=ns(/^data-[\-\w.\u00B7-\uFFFF]+$/),Mce=ns(/^aria-[\-\w]+$/),uI=ns(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Dce=ns(/^(?:\w+script|data):/i),Oce=ns(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),hI=ns(/^html$/i),Bce=ns(/^[a-z][.\w]*(-[.\w]+)+$/i);var dI=Object.freeze({__proto__:null,ARIA_ATTR:Mce,ATTR_WHITESPACE:Oce,CUSTOM_ELEMENT:Bce,DATA_ATTR:Ice,DOCTYPE_NAME:hI,ERB_EXPR:Lce,IS_ALLOWED_URI:uI,IS_SCRIPT_OR_DATA:Dce,MUSTACHE_EXPR:Ace,TMPLIT_EXPR:Rce});const Vp={element:1,text:3,progressingInstruction:7,comment:8,document:9},Pce=function(){return typeof window>"u"?null:window},Nce=function(e,r){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));const a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},fI=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function pI(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Pce();const e=vt=>pI(vt);if(e.version="3.2.5",e.removed=[],!t||!t.document||t.document.nodeType!==Vp.document||!t.Element)return e.isSupported=!1,e;let{document:r}=t;const n=r,i=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:o,Element:l,NodeFilter:u,NamedNodeMap:h=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=t,g=l.prototype,m=$p(g,"cloneNode"),v=$p(g,"remove"),y=$p(g,"nextSibling"),b=$p(g,"childNodes"),x=$p(g,"parentNode");if(typeof s=="function"){const vt=r.createElement("template");vt.content&&vt.content.ownerDocument&&(r=vt.content.ownerDocument)}let k,E="";const{implementation:C,createNodeIterator:S,createDocumentFragment:R,getElementsByTagName:L}=r,{importNode:I}=n;let _=fI();e.isSupported=typeof tI=="function"&&typeof x=="function"&&C&&C.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:M,ERB_EXPR:N,TMPLIT_EXPR:A,DATA_ATTR:D,ARIA_ATTR:B,IS_SCRIPT_OR_DATA:P,ATTR_WHITESPACE:O,CUSTOM_ELEMENT:F}=dI;let{IS_ALLOWED_URI:U}=dI,$=null;const j=hr({},[...sI,...L5,...R5,...I5,...oI]);let X=null;const ee=hr({},[...lI,...M5,...cI,...ny]);let se=Object.seal(nI(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ae=null,ge=null,we=!0,re=!0,te=!1,ne=!0,J=!1,q=!0,Q=!1,Z=!1,ke=!1,he=!1,oe=!1,Me=!1,xe=!0,We=!1;const Ne="user-content-";let Ve=!0,Be=!1,$e={},De=null;const z=hr({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let H=null;const G=hr({},["audio","video","img","source","image","track"]);let pe=null;const Y=hr({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ie="http://www.w3.org/1998/Math/MathML",V="http://www.w3.org/2000/svg",de="http://www.w3.org/1999/xhtml";let ue=de,be=!1,ve=null;const Se=hr({},[ie,V,de],A5);let Re=hr({},["mi","mo","mn","ms","mtext"]),Le=hr({},["annotation-xml"]);const je=hr({},["title","style","font","a","script"]);let rt=null;const Qe=["application/xhtml+xml","text/html"],et="text/html";let tt=null,He=null;const ce=r.createElement("form"),ye=function(Ie){return Ie instanceof RegExp||Ie instanceof Function},ze=function(){let Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(He&&He===Ie)){if((!Ie||typeof Ie!="object")&&(Ie={}),Ie=Au(Ie),rt=Qe.indexOf(Ie.PARSER_MEDIA_TYPE)===-1?et:Ie.PARSER_MEDIA_TYPE,tt=rt==="application/xhtml+xml"?A5:ry,$=Bs(Ie,"ALLOWED_TAGS")?hr({},Ie.ALLOWED_TAGS,tt):j,X=Bs(Ie,"ALLOWED_ATTR")?hr({},Ie.ALLOWED_ATTR,tt):ee,ve=Bs(Ie,"ALLOWED_NAMESPACES")?hr({},Ie.ALLOWED_NAMESPACES,A5):Se,pe=Bs(Ie,"ADD_URI_SAFE_ATTR")?hr(Au(Y),Ie.ADD_URI_SAFE_ATTR,tt):Y,H=Bs(Ie,"ADD_DATA_URI_TAGS")?hr(Au(G),Ie.ADD_DATA_URI_TAGS,tt):G,De=Bs(Ie,"FORBID_CONTENTS")?hr({},Ie.FORBID_CONTENTS,tt):z,ae=Bs(Ie,"FORBID_TAGS")?hr({},Ie.FORBID_TAGS,tt):{},ge=Bs(Ie,"FORBID_ATTR")?hr({},Ie.FORBID_ATTR,tt):{},$e=Bs(Ie,"USE_PROFILES")?Ie.USE_PROFILES:!1,we=Ie.ALLOW_ARIA_ATTR!==!1,re=Ie.ALLOW_DATA_ATTR!==!1,te=Ie.ALLOW_UNKNOWN_PROTOCOLS||!1,ne=Ie.ALLOW_SELF_CLOSE_IN_ATTR!==!1,J=Ie.SAFE_FOR_TEMPLATES||!1,q=Ie.SAFE_FOR_XML!==!1,Q=Ie.WHOLE_DOCUMENT||!1,he=Ie.RETURN_DOM||!1,oe=Ie.RETURN_DOM_FRAGMENT||!1,Me=Ie.RETURN_TRUSTED_TYPE||!1,ke=Ie.FORCE_BODY||!1,xe=Ie.SANITIZE_DOM!==!1,We=Ie.SANITIZE_NAMED_PROPS||!1,Ve=Ie.KEEP_CONTENT!==!1,Be=Ie.IN_PLACE||!1,U=Ie.ALLOWED_URI_REGEXP||uI,ue=Ie.NAMESPACE||de,Re=Ie.MATHML_TEXT_INTEGRATION_POINTS||Re,Le=Ie.HTML_INTEGRATION_POINTS||Le,se=Ie.CUSTOM_ELEMENT_HANDLING||{},Ie.CUSTOM_ELEMENT_HANDLING&&ye(Ie.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(se.tagNameCheck=Ie.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Ie.CUSTOM_ELEMENT_HANDLING&&ye(Ie.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(se.attributeNameCheck=Ie.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Ie.CUSTOM_ELEMENT_HANDLING&&typeof Ie.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(se.allowCustomizedBuiltInElements=Ie.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),J&&(re=!1),oe&&(he=!0),$e&&($=hr({},oI),X=[],$e.html===!0&&(hr($,sI),hr(X,lI)),$e.svg===!0&&(hr($,L5),hr(X,M5),hr(X,ny)),$e.svgFilters===!0&&(hr($,R5),hr(X,M5),hr(X,ny)),$e.mathMl===!0&&(hr($,I5),hr(X,cI),hr(X,ny))),Ie.ADD_TAGS&&($===j&&($=Au($)),hr($,Ie.ADD_TAGS,tt)),Ie.ADD_ATTR&&(X===ee&&(X=Au(X)),hr(X,Ie.ADD_ATTR,tt)),Ie.ADD_URI_SAFE_ATTR&&hr(pe,Ie.ADD_URI_SAFE_ATTR,tt),Ie.FORBID_CONTENTS&&(De===z&&(De=Au(De)),hr(De,Ie.FORBID_CONTENTS,tt)),Ve&&($["#text"]=!0),Q&&hr($,["html","head","body"]),$.table&&(hr($,["tbody"]),delete ae.tbody),Ie.TRUSTED_TYPES_POLICY){if(typeof Ie.TRUSTED_TYPES_POLICY.createHTML!="function")throw zp('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Ie.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw zp('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');k=Ie.TRUSTED_TYPES_POLICY,E=k.createHTML("")}else k===void 0&&(k=Nce(p,i)),k!==null&&typeof E=="string"&&(E=k.createHTML(""));Gi&&Gi(Ie),He=Ie}},Oe=hr({},[...L5,...R5,..._ce]),Ke=hr({},[...I5,...Cce]),Xe=function(Ie){let nt=x(Ie);(!nt||!nt.tagName)&&(nt={namespaceURI:ue,tagName:"template"});const wt=ry(Ie.tagName),sr=ry(nt.tagName);return ve[Ie.namespaceURI]?Ie.namespaceURI===V?nt.namespaceURI===de?wt==="svg":nt.namespaceURI===ie?wt==="svg"&&(sr==="annotation-xml"||Re[sr]):!!Oe[wt]:Ie.namespaceURI===ie?nt.namespaceURI===de?wt==="math":nt.namespaceURI===V?wt==="math"&&Le[sr]:!!Ke[wt]:Ie.namespaceURI===de?nt.namespaceURI===V&&!Le[sr]||nt.namespaceURI===ie&&!Re[sr]?!1:!Ke[wt]&&(je[wt]||!Oe[wt]):!!(rt==="application/xhtml+xml"&&ve[Ie.namespaceURI]):!1},Je=function(Ie){Np(e.removed,{element:Ie});try{x(Ie).removeChild(Ie)}catch{v(Ie)}},ut=function(Ie,nt){try{Np(e.removed,{attribute:nt.getAttributeNode(Ie),from:nt})}catch{Np(e.removed,{attribute:null,from:nt})}if(nt.removeAttribute(Ie),Ie==="is")if(he||oe)try{Je(nt)}catch{}else try{nt.setAttribute(Ie,"")}catch{}},ht=function(Ie){let nt=null,wt=null;if(ke)Ie="<remove></remove>"+Ie;else{const jr=aI(Ie,/^[\r\n\t ]+/);wt=jr&&jr[0]}rt==="application/xhtml+xml"&&ue===de&&(Ie='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Ie+"</body></html>");const sr=k?k.createHTML(Ie):Ie;if(ue===de)try{nt=new f().parseFromString(sr,rt)}catch{}if(!nt||!nt.documentElement){nt=C.createDocument(ue,"template",null);try{nt.documentElement.innerHTML=be?E:sr}catch{}}const $r=nt.body||nt.documentElement;return Ie&&wt&&$r.insertBefore(r.createTextNode(wt),$r.childNodes[0]||null),ue===de?L.call(nt,Q?"html":"body")[0]:Q?nt.documentElement:$r},ft=function(Ie){return S.call(Ie.ownerDocument||Ie,Ie,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},mt=function(Ie){return Ie instanceof d&&(typeof Ie.nodeName!="string"||typeof Ie.textContent!="string"||typeof Ie.removeChild!="function"||!(Ie.attributes instanceof h)||typeof Ie.removeAttribute!="function"||typeof Ie.setAttribute!="function"||typeof Ie.namespaceURI!="string"||typeof Ie.insertBefore!="function"||typeof Ie.hasChildNodes!="function")},ar=function(Ie){return typeof o=="function"&&Ie instanceof o};function At(vt,Ie,nt){ty(vt,wt=>{wt.call(e,Ie,nt,He)})}const cr=function(Ie){let nt=null;if(At(_.beforeSanitizeElements,Ie,null),mt(Ie))return Je(Ie),!0;const wt=tt(Ie.nodeName);if(At(_.uponSanitizeElement,Ie,{tagName:wt,allowedTags:$}),Ie.hasChildNodes()&&!ar(Ie.firstElementChild)&&Wi(/<[/\w!]/g,Ie.innerHTML)&&Wi(/<[/\w!]/g,Ie.textContent)||Ie.nodeType===Vp.progressingInstruction||q&&Ie.nodeType===Vp.comment&&Wi(/<[/\w]/g,Ie.data))return Je(Ie),!0;if(!$[wt]||ae[wt]){if(!ae[wt]&&Zt(wt)&&(se.tagNameCheck instanceof RegExp&&Wi(se.tagNameCheck,wt)||se.tagNameCheck instanceof Function&&se.tagNameCheck(wt)))return!1;if(Ve&&!De[wt]){const sr=x(Ie)||Ie.parentNode,$r=b(Ie)||Ie.childNodes;if($r&&sr){const jr=$r.length;for(let Br=jr-1;Br>=0;--Br){const Mn=m($r[Br],!0);Mn.__removalCount=(Ie.__removalCount||0)+1,sr.insertBefore(Mn,y(Ie))}}}return Je(Ie),!0}return Ie instanceof l&&!Xe(Ie)||(wt==="noscript"||wt==="noembed"||wt==="noframes")&&Wi(/<\/no(script|embed|frames)/i,Ie.innerHTML)?(Je(Ie),!0):(J&&Ie.nodeType===Vp.text&&(nt=Ie.textContent,ty([M,N,A],sr=>{nt=Fp(nt,sr," ")}),Ie.textContent!==nt&&(Np(e.removed,{element:Ie.cloneNode()}),Ie.textContent=nt)),At(_.afterSanitizeElements,Ie,null),!1)},tr=function(Ie,nt,wt){if(xe&&(nt==="id"||nt==="name")&&(wt in r||wt in ce))return!1;if(!(re&&!ge[nt]&&Wi(D,nt))){if(!(we&&Wi(B,nt))){if(!X[nt]||ge[nt]){if(!(Zt(Ie)&&(se.tagNameCheck instanceof RegExp&&Wi(se.tagNameCheck,Ie)||se.tagNameCheck instanceof Function&&se.tagNameCheck(Ie))&&(se.attributeNameCheck instanceof RegExp&&Wi(se.attributeNameCheck,nt)||se.attributeNameCheck instanceof Function&&se.attributeNameCheck(nt))||nt==="is"&&se.allowCustomizedBuiltInElements&&(se.tagNameCheck instanceof RegExp&&Wi(se.tagNameCheck,wt)||se.tagNameCheck instanceof Function&&se.tagNameCheck(wt))))return!1}else if(!pe[nt]){if(!Wi(U,Fp(wt,O,""))){if(!((nt==="src"||nt==="xlink:href"||nt==="href")&&Ie!=="script"&&Tce(wt,"data:")===0&&H[Ie])){if(!(te&&!Wi(P,Fp(wt,O,"")))){if(wt)return!1}}}}}}return!0},Zt=function(Ie){return Ie!=="annotation-xml"&&aI(Ie,F)},zt=function(Ie){At(_.beforeSanitizeAttributes,Ie,null);const{attributes:nt}=Ie;if(!nt||mt(Ie))return;const wt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:X,forceKeepAttr:void 0};let sr=nt.length;for(;sr--;){const $r=nt[sr],{name:jr,namespaceURI:Br,value:Mn}=$r,Vi=tt(jr);let Gr=jr==="value"?Mn:kce(Mn);if(wt.attrName=Vi,wt.attrValue=Gr,wt.keepAttr=!0,wt.forceKeepAttr=void 0,At(_.uponSanitizeAttribute,Ie,wt),Gr=wt.attrValue,We&&(Vi==="id"||Vi==="name")&&(ut(jr,Ie),Gr=Ne+Gr),q&&Wi(/((--!?|])>)|<\/(style|title)/i,Gr)){ut(jr,Ie);continue}if(wt.forceKeepAttr||(ut(jr,Ie),!wt.keepAttr))continue;if(!ne&&Wi(/\/>/i,Gr)){ut(jr,Ie);continue}J&&ty([M,N,A],Lt=>{Gr=Fp(Gr,Lt," ")});const Dn=tt(Ie.nodeName);if(tr(Dn,Vi,Gr)){if(k&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!Br)switch(p.getAttributeType(Dn,Vi)){case"TrustedHTML":{Gr=k.createHTML(Gr);break}case"TrustedScriptURL":{Gr=k.createScriptURL(Gr);break}}try{Br?Ie.setAttributeNS(Br,jr,Gr):Ie.setAttribute(jr,Gr),mt(Ie)?Je(Ie):iI(e.removed)}catch{}}}At(_.afterSanitizeAttributes,Ie,null)},vr=function vt(Ie){let nt=null;const wt=ft(Ie);for(At(_.beforeSanitizeShadowDOM,Ie,null);nt=wt.nextNode();)At(_.uponSanitizeShadowNode,nt,null),cr(nt),zt(nt),nt.content instanceof a&&vt(nt.content);At(_.afterSanitizeShadowDOM,Ie,null)};return e.sanitize=function(vt){let Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},nt=null,wt=null,sr=null,$r=null;if(be=!vt,be&&(vt="<!-->"),typeof vt!="string"&&!ar(vt))if(typeof vt.toString=="function"){if(vt=vt.toString(),typeof vt!="string")throw zp("dirty is not a string, aborting")}else throw zp("toString is not a function");if(!e.isSupported)return vt;if(Z||ze(Ie),e.removed=[],typeof vt=="string"&&(Be=!1),Be){if(vt.nodeName){const Mn=tt(vt.nodeName);if(!$[Mn]||ae[Mn])throw zp("root node is forbidden and cannot be sanitized in-place")}}else if(vt instanceof o)nt=ht("<!---->"),wt=nt.ownerDocument.importNode(vt,!0),wt.nodeType===Vp.element&&wt.nodeName==="BODY"||wt.nodeName==="HTML"?nt=wt:nt.appendChild(wt);else{if(!he&&!J&&!Q&&vt.indexOf("<")===-1)return k&&Me?k.createHTML(vt):vt;if(nt=ht(vt),!nt)return he?null:Me?E:""}nt&&ke&&Je(nt.firstChild);const jr=ft(Be?vt:nt);for(;sr=jr.nextNode();)cr(sr),zt(sr),sr.content instanceof a&&vr(sr.content);if(Be)return vt;if(he){if(oe)for($r=R.call(nt.ownerDocument);nt.firstChild;)$r.appendChild(nt.firstChild);else $r=nt;return(X.shadowroot||X.shadowrootmode)&&($r=I.call(n,$r,!0)),$r}let Br=Q?nt.outerHTML:nt.innerHTML;return Q&&$["!doctype"]&&nt.ownerDocument&&nt.ownerDocument.doctype&&nt.ownerDocument.doctype.name&&Wi(hI,nt.ownerDocument.doctype.name)&&(Br="<!DOCTYPE "+nt.ownerDocument.doctype.name+`>
106
106
  `+Br),J&&ty([M,N,A],Mn=>{Br=Fp(Br,Mn," ")}),k&&Me?k.createHTML(Br):Br},e.setConfig=function(){let vt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ze(vt),Z=!0},e.clearConfig=function(){He=null,Z=!1},e.isValidAttribute=function(vt,Ie,nt){He||ze({});const wt=tt(vt),sr=tt(Ie);return tr(wt,sr,nt)},e.addHook=function(vt,Ie){typeof Ie=="function"&&Np(_[vt],Ie)},e.removeHook=function(vt,Ie){if(Ie!==void 0){const nt=xce(_[vt],Ie);return nt===-1?void 0:wce(_[vt],nt,1)[0]}return iI(_[vt])},e.removeHooks=function(vt){_[vt]=[]},e.removeAllHooks=function(){_=fI()},e}var fc=pI();function D5(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Lu=D5();function gI(t){Lu=t}const Up={exec:()=>null};function Sr(t,e=""){let r=typeof t=="string"?t:t.source;const n={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(qi.caret,"$1"),r=r.replace(i,s),n},getRegex:()=>new RegExp(r,e)};return n}const qi={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},Fce=/^(?:[ \t]*(?:\n|$))+/,zce=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,$ce=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Gp=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Vce=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,O5=/(?:[*+-]|\d{1,9}[.)])/,mI=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,vI=Sr(mI).replace(/bull/g,O5).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Uce=Sr(mI).replace(/bull/g,O5).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),B5=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Gce=/^[^\n]+/,P5=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Wce=Sr(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",P5).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Hce=Sr(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,O5).getRegex(),iy="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",N5=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,qce=Sr("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",N5).replace("tag",iy).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),yI=Sr(B5).replace("hr",Gp).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",iy).getRegex(),F5={blockquote:Sr(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",yI).getRegex(),code:zce,def:Wce,fences:$ce,heading:Vce,hr:Gp,html:qce,lheading:vI,list:Hce,newline:Fce,paragraph:yI,table:Up,text:Gce},bI=Sr("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Gp).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",iy).getRegex(),Yce={...F5,lheading:Uce,table:bI,paragraph:Sr(B5).replace("hr",Gp).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",bI).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",iy).getRegex()},jce={...F5,html:Sr(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",N5).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Up,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Sr(B5).replace("hr",Gp).replace("heading",` *#{1,6} *[^
107
107
  ]`).replace("lheading",vI).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Xce=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Kce=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,xI=/^( {2,}|\\)\n(?!\s*$)/,Qce=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ay=/[\p{P}\p{S}]/u,z5=/[\s\p{P}\p{S}]/u,wI=/[^\s\p{P}\p{S}]/u,Zce=Sr(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,z5).getRegex(),TI=/(?!~)[\p{P}\p{S}]/u,Jce=/(?!~)[\s\p{P}\p{S}]/u,eue=/(?:[^\s\p{P}\p{S}]|~)/u,tue=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,kI=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,rue=Sr(kI,"u").replace(/punct/g,ay).getRegex(),nue=Sr(kI,"u").replace(/punct/g,TI).getRegex(),EI="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",iue=Sr(EI,"gu").replace(/notPunctSpace/g,wI).replace(/punctSpace/g,z5).replace(/punct/g,ay).getRegex(),aue=Sr(EI,"gu").replace(/notPunctSpace/g,eue).replace(/punctSpace/g,Jce).replace(/punct/g,TI).getRegex(),sue=Sr("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,wI).replace(/punctSpace/g,z5).replace(/punct/g,ay).getRegex(),oue=Sr(/\\(punct)/,"gu").replace(/punct/g,ay).getRegex(),lue=Sr(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),cue=Sr(N5).replace("(?:-->|$)","-->").getRegex(),uue=Sr("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",cue).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),sy=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,hue=Sr(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",sy).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),SI=Sr(/^!?\[(label)\]\[(ref)\]/).replace("label",sy).replace("ref",P5).getRegex(),_I=Sr(/^!?\[(ref)\](?:\[\])?/).replace("ref",P5).getRegex(),due=Sr("reflink|nolink(?!\\()","g").replace("reflink",SI).replace("nolink",_I).getRegex(),$5={_backpedal:Up,anyPunctuation:oue,autolink:lue,blockSkip:tue,br:xI,code:Kce,del:Up,emStrongLDelim:rue,emStrongRDelimAst:iue,emStrongRDelimUnd:sue,escape:Xce,link:hue,nolink:_I,punctuation:Zce,reflink:SI,reflinkSearch:due,tag:uue,text:Qce,url:Up},fue={...$5,link:Sr(/^!?\[(label)\]\((.*?)\)/).replace("label",sy).getRegex(),reflink:Sr(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",sy).getRegex()},V5={...$5,emStrongRDelimAst:aue,emStrongLDelim:nue,url:Sr(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},pue={...V5,br:Sr(xI).replace("{2,}","*").getRegex(),text:Sr(V5.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},oy={normal:F5,gfm:Yce,pedantic:jce},Wp={normal:$5,gfm:V5,breaks:pue,pedantic:fue},gue={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},CI=t=>gue[t];function yo(t,e){if(e){if(qi.escapeTest.test(t))return t.replace(qi.escapeReplace,CI)}else if(qi.escapeTestNoEncode.test(t))return t.replace(qi.escapeReplaceNoEncode,CI);return t}function AI(t){try{t=encodeURI(t).replace(qi.percentDecode,"%")}catch{return null}return t}function LI(t,e){var a;const r=t.replace(qi.findPipe,(s,o,l)=>{let u=!1,h=o;for(;--h>=0&&l[h]==="\\";)u=!u;return u?"|":" |"}),n=r.split(qi.splitPipe);let i=0;if(n[0].trim()||n.shift(),n.length>0&&!((a=n.at(-1))!=null&&a.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(qi.slashPipe,"|");return n}function Hp(t,e,r){const n=t.length;if(n===0)return"";let i=0;for(;i<n&&t.charAt(n-i-1)===e;)i++;return t.slice(0,n-i)}function mue(t,e){if(t.indexOf(e[1])===-1)return-1;let r=0;for(let n=0;n<t.length;n++)if(t[n]==="\\")n++;else if(t[n]===e[0])r++;else if(t[n]===e[1]&&(r--,r<0))return n;return r>0?-2:-1}function RI(t,e,r,n,i){const a=e.href,s=e.title||null,o=t[1].replace(i.other.outputLinkReplace,"$1");n.state.inLink=!0;const l={type:t[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:s,text:o,tokens:n.inlineTokens(o)};return n.state.inLink=!1,l}function vue(t,e,r){const n=t.match(r.other.indentCodeCompensation);if(n===null)return e;const i=n[1];return e.split(`
108
108
  `).map(a=>{const s=a.match(r.other.beginningSpace);if(s===null)return a;const[o]=s;return o.length>=i.length?a.slice(i.length):a}).join(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prez-components",
3
- "version": "4.1.2",
3
+ "version": "4.1.3",
4
4
  "description": "A Vue.js component library for rendering RDF data for use with Prez UI",
5
5
  "type": "module",
6
6
  "license": "BSD-3-Clause",
@@ -40,7 +40,7 @@
40
40
  "tailwind-merge": "^2.5.5",
41
41
  "tailwindcss-animate": "^1.0.7",
42
42
  "vue-router": "^4.5.0",
43
- "prez-lib": "4.1.2"
43
+ "prez-lib": "4.1.3"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/node": "^22.10.0",