@openhps/rdf 0.1.9 → 0.1.10
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.
- package/dist/cjs/index.serialization.d.ts +0 -1
- package/dist/cjs/index.serialization.js +0 -1
- package/dist/cjs/index.serialization.js.map +1 -1
- package/dist/cjs/mapping/Absolute2DPosition.js +2 -0
- package/dist/cjs/mapping/Absolute2DPosition.js.map +1 -1
- package/dist/cjs/mapping/Absolute3DPosition.js +2 -0
- package/dist/cjs/mapping/Absolute3DPosition.js.map +1 -1
- package/dist/cjs/rdf/SerializableNamedNode.d.ts +5 -0
- package/dist/cjs/rdf/SerializableNamedNode.js +60 -0
- package/dist/cjs/rdf/SerializableNamedNode.js.map +1 -0
- package/dist/cjs/rdf/index.d.ts +1 -0
- package/dist/cjs/rdf/index.js +1 -0
- package/dist/cjs/rdf/index.js.map +1 -1
- package/dist/cjs/vocab/openhps.d.ts +1 -0
- package/dist/cjs/vocab/openhps.js +2 -1
- package/dist/cjs/vocab/openhps.js.map +1 -1
- package/dist/esm/index.serialization.d.ts +0 -1
- package/dist/esm/index.serialization.js +0 -1
- package/dist/esm/index.serialization.js.map +1 -1
- package/dist/esm/mapping/Absolute2DPosition.js +2 -0
- package/dist/esm/mapping/Absolute2DPosition.js.map +1 -1
- package/dist/esm/mapping/Absolute3DPosition.js +2 -0
- package/dist/esm/mapping/Absolute3DPosition.js.map +1 -1
- package/dist/esm/rdf/SerializableNamedNode.d.ts +5 -0
- package/dist/esm/{data/ObservableProperty.js → rdf/SerializableNamedNode.js} +21 -18
- package/dist/esm/rdf/SerializableNamedNode.js.map +1 -0
- package/dist/esm/rdf/index.d.ts +1 -0
- package/dist/esm/rdf/index.js +1 -0
- package/dist/esm/rdf/index.js.map +1 -1
- package/dist/esm/vocab/openhps.d.ts +1 -0
- package/dist/esm/vocab/openhps.js +1 -0
- package/dist/esm/vocab/openhps.js.map +1 -1
- package/dist/types/index.serialization.d.ts +0 -1
- package/dist/types/rdf/SerializableNamedNode.d.ts +5 -0
- package/dist/types/rdf/index.d.ts +1 -0
- package/dist/types/vocab/openhps.d.ts +1 -0
- package/dist/web/openhps-rdf.all.es.js +59 -263
- package/dist/web/openhps-rdf.all.es.js.map +1 -1
- package/dist/web/openhps-rdf.all.es.min.js +1 -1
- package/dist/web/openhps-rdf.all.es.min.js.map +1 -1
- package/dist/web/openhps-rdf.all.js +58 -266
- package/dist/web/openhps-rdf.all.js.map +1 -1
- package/dist/web/openhps-rdf.all.min.js +1 -1
- package/dist/web/openhps-rdf.all.min.js.map +1 -1
- package/dist/web/openhps-rdf.serialization.es.js +62 -266
- package/dist/web/openhps-rdf.serialization.es.js.map +1 -1
- package/dist/web/openhps-rdf.serialization.es.min.js +1 -1
- package/dist/web/openhps-rdf.serialization.es.min.js.map +1 -1
- package/dist/web/openhps-rdf.serialization.js +61 -269
- package/dist/web/openhps-rdf.serialization.js.map +1 -1
- package/dist/web/openhps-rdf.serialization.min.js +1 -1
- package/dist/web/openhps-rdf.serialization.min.js.map +1 -1
- package/dist/web/openhps-rdf.sparql.es.js +2 -0
- package/dist/web/openhps-rdf.sparql.es.js.map +1 -1
- package/dist/web/openhps-rdf.sparql.js +2 -0
- package/dist/web/openhps-rdf.sparql.js.map +1 -1
- package/dist/web/openhps-rdf.vocab.es.js +2 -0
- package/dist/web/openhps-rdf.vocab.es.js.map +1 -1
- package/dist/web/openhps-rdf.vocab.es.min.js +1 -1
- package/dist/web/openhps-rdf.vocab.es.min.js.map +1 -1
- package/dist/web/openhps-rdf.vocab.js +2 -0
- package/dist/web/openhps-rdf.vocab.js.map +1 -1
- package/dist/web/openhps-rdf.vocab.min.js +1 -1
- package/dist/web/openhps-rdf.vocab.min.js.map +1 -1
- package/package.json +1 -1
- package/src/index.serialization.ts +0 -1
- package/src/mapping/Absolute2DPosition.ts +2 -0
- package/src/mapping/Absolute3DPosition.ts +2 -0
- package/src/rdf/SerializableNamedNode.ts +21 -0
- package/src/rdf/index.ts +1 -0
- package/src/vocab/openhps.ts +10 -1
- package/dist/cjs/data/FeatureOfInterest.d.ts +0 -5
- package/dist/cjs/data/FeatureOfInterest.js +0 -43
- package/dist/cjs/data/FeatureOfInterest.js.map +0 -1
- package/dist/cjs/data/ObservableProperty.d.ts +0 -3
- package/dist/cjs/data/ObservableProperty.js +0 -34
- package/dist/cjs/data/ObservableProperty.js.map +0 -1
- package/dist/cjs/data/Observation.d.ts +0 -6
- package/dist/cjs/data/Observation.js +0 -55
- package/dist/cjs/data/Observation.js.map +0 -1
- package/dist/cjs/data/QuantityValue.d.ts +0 -5
- package/dist/cjs/data/QuantityValue.js +0 -43
- package/dist/cjs/data/QuantityValue.js.map +0 -1
- package/dist/cjs/data/index.d.ts +0 -4
- package/dist/cjs/data/index.js +0 -21
- package/dist/cjs/data/index.js.map +0 -1
- package/dist/esm/data/FeatureOfInterest.d.ts +0 -5
- package/dist/esm/data/FeatureOfInterest.js +0 -40
- package/dist/esm/data/FeatureOfInterest.js.map +0 -1
- package/dist/esm/data/ObservableProperty.d.ts +0 -3
- package/dist/esm/data/ObservableProperty.js.map +0 -1
- package/dist/esm/data/Observation.d.ts +0 -6
- package/dist/esm/data/Observation.js +0 -52
- package/dist/esm/data/Observation.js.map +0 -1
- package/dist/esm/data/QuantityValue.d.ts +0 -5
- package/dist/esm/data/QuantityValue.js +0 -40
- package/dist/esm/data/QuantityValue.js.map +0 -1
- package/dist/esm/data/index.d.ts +0 -4
- package/dist/esm/data/index.js +0 -5
- package/dist/esm/data/index.js.map +0 -1
- package/dist/types/data/FeatureOfInterest.d.ts +0 -5
- package/dist/types/data/ObservableProperty.d.ts +0 -3
- package/dist/types/data/Observation.d.ts +0 -6
- package/dist/types/data/QuantityValue.d.ts +0 -5
- package/dist/types/data/index.d.ts +0 -4
- package/src/data/FeatureOfInterest.ts +0 -25
- package/src/data/ObservableProperty.ts +0 -17
- package/src/data/Observation.ts +0 -36
- package/src/data/QuantityValue.ts +0 -25
- package/src/data/index.ts +0 -4
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see openhps-rdf.serialization.min.js.LICENSE.txt */
|
|
2
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@openhps/core")):"function"==typeof define&&define.amd?define("OpenHPS",["core"],e):"object"==typeof exports?exports.OpenHPS=e(require("@openhps/core")):(t.OpenHPS=t.OpenHPS||{},t.OpenHPS.rdf=e(t.OpenHPS.core))}("undefined"!=typeof self?self:this,(function(t){return(()=>{var e={742:(t,e)=>{"use strict";e.byteLength=function(t){var e=u(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,o=u(t),s=o[0],a=o[1],h=new i(function(t,e,r){return 3*(e+r)/4-r}(0,s,a)),d=0,c=a>0?s-4:s;for(r=0;r<c;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],h[d++]=e>>16&255,h[d++]=e>>8&255,h[d++]=255&e;2===a&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,h[d++]=255&e);1===a&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,h[d++]=e>>8&255,h[d++]=255&e);return h},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=16383,a=0,u=n-i;a<u;a+=s)o.push(h(t,a,a+s>u?u:a+s));1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s<a;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function u(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function h(t,e,n){for(var i,o,s=[],a=e;a<n;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},764:(t,e,r)=>{"use strict";const n=r(742),i=r(645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50;const s=2147483647;function a(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,u.prototype),e}function u(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return c(t)}return h(t,e,r)}function h(t,e,r){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!u.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|g(t,e);let n=a(r);const i=n.write(t,e);i!==r&&(n=n.slice(0,i));return n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(H(t,Uint8Array)){const e=new Uint8Array(t);return f(e.buffer,e.byteOffset,e.byteLength)}return l(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(H(t,ArrayBuffer)||t&&H(t.buffer,ArrayBuffer))return f(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(H(t,SharedArrayBuffer)||t&&H(t.buffer,SharedArrayBuffer)))return f(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return u.from(n,e,r);const i=function(t){if(u.isBuffer(t)){const e=0|p(t.length),r=a(e);return 0===r.length||t.copy(r,0,0,e),r}if(void 0!==t.length)return"number"!=typeof t.length||X(t.length)?a(0):l(t);if("Buffer"===t.type&&Array.isArray(t.data))return l(t.data)}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return u.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function d(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function c(t){return d(t),a(t<0?0:0|p(t))}function l(t){const e=t.length<0?0:0|p(t.length),r=a(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function f(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,u.prototype),n}function p(t){if(t>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function g(t,e){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||H(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return K(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return W(t).length;default:if(i)return n?-1:K(t).length;e=(""+e).toLowerCase(),i=!0}}function m(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return I(this,e,r);case"utf8":case"utf-8":return T(this,e,r);case"ascii":return j(this,e,r);case"latin1":case"binary":return x(this,e,r);case"base64":return O(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function y(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function w(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),X(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,n,i){let o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function h(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){let n=-1;for(o=r;o<a;o++)if(h(t,o)===h(e,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===u)return n*s}else-1!==n&&(o-=o-n),n=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){let r=!0;for(let n=0;n<u;n++)if(h(t,o+n)!==h(e,n)){r=!1;break}if(r)return o}return-1}function v(t,e,r,n){r=Number(r)||0;const i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=e.length;let s;for(n>o/2&&(n=o/2),s=0;s<n;++s){const n=parseInt(e.substr(2*s,2),16);if(X(n))return s;t[r+s]=n}return s}function q(t,e,r,n){return G(K(e,t.length-r),t,r,n)}function _(t,e,r,n){return G(function(t){const e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function S(t,e,r,n){return G(W(e),t,r,n)}function E(t,e,r,n){return G(function(t,e){let r,n,i;const o=[];for(let s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function O(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function T(t,e,r){r=Math.min(t.length,r);const n=[];let i=e;for(;i<r;){const e=t[i];let o=null,s=e>239?4:e>223?3:e>191?2:1;if(i+s<=r){let r,n,a,u;switch(s){case 1:e<128&&(o=e);break;case 2:r=t[i+1],128==(192&r)&&(u=(31&e)<<6|63&r,u>127&&(o=u));break;case 3:r=t[i+1],n=t[i+2],128==(192&r)&&128==(192&n)&&(u=(15&e)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=t[i+1],n=t[i+2],a=t[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(u=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&a,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(t){const e=t.length;if(e<=R)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=R));return r}(n)}e.kMaxLength=s,u.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(t,e,r){return h(t,e,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(t,e,r){return function(t,e,r){return d(t),t<=0?a(t):void 0!==e?"string"==typeof r?a(t).fill(e,r):a(t).fill(e):a(t)}(t,e,r)},u.allocUnsafe=function(t){return c(t)},u.allocUnsafeSlow=function(t){return c(t)},u.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==u.prototype},u.compare=function(t,e){if(H(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),H(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;const n=u.allocUnsafe(e);let i=0;for(r=0;r<t.length;++r){let e=t[r];if(H(e,Uint8Array))i+e.length>n.length?(u.isBuffer(e)||(e=u.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else{if(!u.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,i)}i+=e.length}return n},u.byteLength=g,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)y(this,e,e+1);return this},u.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},u.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},u.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?T(this,0,t):m.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){let t="";const r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(t,e,r,n,i){if(H(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0);const a=Math.min(o,s),h=this.slice(n,i),d=t.slice(e,r);for(let t=0;t<a;++t)if(h[t]!==d[t]){o=h[t],s=d[t];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return w(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return w(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return q(this,t,e,r);case"ascii":case"latin1":case"binary":return _(this,t,e,r);case"base64":return S(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const R=4096;function j(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function x(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function I(t,e,r){const n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=e;n<r;++n)i+=Y[t[n]];return i}function L(t,e,r){const n=t.slice(e,r);let i="";for(let t=0;t<n.length-1;t+=2)i+=String.fromCharCode(n[t]+256*n[t+1]);return i}function B(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function U(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function N(t,e,r,n,i){$(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,r}function D(t,e,r,n,i){$(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s>>=8,t[r+2]=s,s>>=8,t[r+1]=s,s>>=8,t[r]=s,r+8}function A(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function M(t,e,r,n,o){return e=+e,r>>>=0,o||A(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function C(t,e,r,n,o){return e=+e,r>>>=0,o||A(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);const n=this.subarray(t,e);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||B(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||B(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(t,e){return t>>>=0,e||B(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||B(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||B(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||B(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(t,e){return t>>>=0,e||B(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readBigUInt64LE=J((function(t){Q(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||F(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),u.prototype.readBigUInt64BE=J((function(t){Q(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||F(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),u.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||B(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||B(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return t>>>=0,e||B(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||B(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){t>>>=0,e||B(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return t>>>=0,e||B(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return t>>>=0,e||B(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readBigInt64LE=J((function(t){Q(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||F(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)})),u.prototype.readBigInt64BE=J((function(t){Q(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||F(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+r)})),u.prototype.readFloatLE=function(t,e){return t>>>=0,e||B(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||B(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||B(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||B(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){U(this,t,e,r,Math.pow(2,8*r)-1,0)}let i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){U(this,t,e,r,Math.pow(2,8*r)-1,0)}let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigUInt64LE=J((function(t,e=0){return N(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=J((function(t,e=0){return D(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);U(this,t,e,r,n-1,-n)}let i=0,o=1,s=0;for(this[e]=255&t;++i<r&&(o*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/o>>0)-s&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);U(this,t,e,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/o>>0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigInt64LE=J((function(t,e=0){return N(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=J((function(t,e=0){return D(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(t,e,r){return M(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return M(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return C(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return C(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(!u.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);const i=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},u.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){const e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;let i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{const o=u.isBuffer(t)?t:u.from(t,n),s=o.length;if(0===s)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=o[i%s]}return this};const k={};function P(t,e,r){k[t]=class NodeError extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function z(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 $(t,e,r,n,i,o){if(t>r||t<e){const n="bigint"==typeof e?"n":"";let i;throw i=o>3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new k.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,r){Q(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||F(e,t.length-(r+1))}(n,i,o)}function Q(t,e){if("number"!=typeof t)throw new k.ERR_INVALID_ARG_TYPE(e,"number",t)}function F(t,e,r){if(Math.floor(t)!==t)throw Q(t,r),new k.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new k.ERR_BUFFER_OUT_OF_BOUNDS;throw new k.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}P("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),P("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),P("ERR_OUT_OF_RANGE",(function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=z(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=z(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n}),RangeError);const V=/[^+/0-9A-Za-z-_]/g;function K(t,e){let r;e=e||1/0;const n=t.length;let i=null;const o=[];for(let s=0;s<n;++s){if(r=t.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function W(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(V,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function G(t,e,r,n){let i;for(i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function H(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function X(t){return t!=t}const Y=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function J(t){return"undefined"==typeof BigInt?Z:t}function Z(){throw new Error("BigInt not supported")}},187:t=>{"use strict";var e,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};e=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}g(t,e,o,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&g(t,"error",e,r)}(t,i,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function u(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function h(t,e,r,n){var i,o,s,h;if(a(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),s=o[e]),void 0===s)s=o[e]=r,++t._eventsCount;else if("function"==typeof s?s=o[e]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=u(t))>0&&s.length>i&&!s.warned){s.warned=!0;var d=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");d.name="MaxListenersExceededWarning",d.emitter=t,d.type=e,d.count=s.length,h=d,console&&console.warn&&console.warn(h)}return t}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function c(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=d.bind(n);return i.listener=r,n.wrapFn=i,i}function l(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):p(i,i.length)}function f(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function g(t,e,r,n){if("function"==typeof t.on)n.once?t.once(e,r):t.on(e,r);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(o){n.once&&t.removeEventListener(e,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");s=t}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||i(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},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var i="error"===t,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[t];if(void 0===u)return!1;if("function"==typeof u)n(u,this,e);else{var h=u.length,d=p(u,h);for(r=0;r<h;++r)n(d[r],this,e)}return!0},o.prototype.addListener=function(t,e){return h(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return h(this,t,e,!0)},o.prototype.once=function(t,e){return a(e),this.on(t,c(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){return a(e),this.prependListener(t,c(this,t,e)),this},o.prototype.removeListener=function(t,e){var r,n,i,o,s;if(a(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,s||e)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(t){var e,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},o.prototype.listeners=function(t){return l(this,t,!0)},o.prototype.rawListeners=function(t){return l(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):f.call(t,e)},o.prototype.listenerCount=f,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},645:(t,e)=>{e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,h=u>>1,d=-7,c=r?i-1:0,l=r?-1:1,f=t[e+c];for(c+=l,o=f&(1<<-d)-1,f>>=-d,d+=a;d>0;o=256*o+t[e+c],c+=l,d-=8);for(s=o&(1<<-d)-1,o>>=-d,d+=n;d>0;s=256*s+t[e+c],c+=l,d-=8);if(0===o)o=1-h;else{if(o===u)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,n),o-=h}return(f?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,u,h=8*o-i-1,d=(1<<h)-1,c=d>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,p=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=d):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+c>=1?l/u:l*Math.pow(2,1-c))*u>=2&&(s++,u/=2),s+c>=d?(a=0,s=d):s+c>=1?(a=(e*u-1)*Math.pow(2,i),s+=c):(a=e*Math.pow(2,c-1)*Math.pow(2,i),s=0));i>=8;t[r+f]=255&a,f+=p,a/=256,i-=8);for(s=s<<i|a,h+=i;h>0;t[r+f]=255&s,f+=p,s/=256,h-=8);t[r+f-p]|=128*g}},717:t=>{"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},281:t=>{"use strict";var e={};function r(t,r,n){n||(n=Error);var i=function(t){var e,n;function i(e,n,i){return t.call(this,function(t,e,n){return"string"==typeof r?r:r(t,e,n)}(e,n,i))||this}return n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=t,e[t]=i}function n(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}r("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(t,e,r){var i,o,s,a;if("string"==typeof e&&(o="not ",e.substr(!s||s<0?0:+s,o.length)===o)?(i="must not be",e=e.replace(/^not /,"")):i="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))a="The ".concat(t," ").concat(i," ").concat(n(e,"type"));else{var u=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";a='The "'.concat(t,'" ').concat(u," ").concat(i," ").concat(n(e,"type"))}return a+=". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.q=e},753:(t,e,r)=>{"use strict";var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=h;var i=r(481),o=r(229);r(717)(h,i);for(var s=n(o.prototype),a=0;a<s.length;a++){var u=s[a];h.prototype[u]||(h.prototype[u]=o.prototype[u])}function h(t){if(!(this instanceof h))return new h(t);i.call(this,t),o.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",d)))}function d(){this._writableState.ended||process.nextTick(c,this)}function c(t){t.end()}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(h.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(h.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(h.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})},725:(t,e,r)=>{"use strict";t.exports=i;var n=r(605);function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}r(717)(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},481:(t,e,r)=>{"use strict";var n;t.exports=E,E.ReadableState=S;r(187).EventEmitter;var i=function(t,e){return t.listeners(e).length},o=r(503),s=r(764).Buffer,a=r.g.Uint8Array||function(){};var u,h=r(616);u=h&&h.debuglog?h.debuglog("stream"):function(){};var d,c,l,f=r(327),p=r(195),g=r(457).getHighWaterMark,m=r(281).q,y=m.ERR_INVALID_ARG_TYPE,w=m.ERR_STREAM_PUSH_AFTER_EOF,b=m.ERR_METHOD_NOT_IMPLEMENTED,v=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(717)(E,o);var q=p.errorOrDestroy,_=["error","close","destroy","pause","resume"];function S(t,e,i){n=n||r(753),t=t||{},"boolean"!=typeof i&&(i=e instanceof n),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=g(this,t,"readableHighWaterMark",i),this.buffer=new f,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(d||(d=r(553).s),this.decoder=new d(t.encoding),this.encoding=t.encoding)}function E(t){if(n=n||r(753),!(this instanceof E))return new E(t);var e=this instanceof n;this._readableState=new S(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),o.call(this)}function O(t,e,r,n,i){u("readableAddChunk",e);var o,h=t._readableState;if(null===e)h.reading=!1,function(t,e){if(u("onEofChunk"),e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?x(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,I(t)))}(t,h);else if(i||(o=function(t,e){var r;n=e,s.isBuffer(n)||n instanceof a||"string"==typeof e||void 0===e||t.objectMode||(r=new y("chunk",["string","Buffer","Uint8Array"],e));var n;return r}(h,e)),o)q(t,o);else if(h.objectMode||e&&e.length>0)if("string"==typeof e||h.objectMode||Object.getPrototypeOf(e)===s.prototype||(e=function(t){return s.from(t)}(e)),n)h.endEmitted?q(t,new v):T(t,h,e,!0);else if(h.ended)q(t,new w);else{if(h.destroyed)return!1;h.reading=!1,h.decoder&&!r?(e=h.decoder.write(e),h.objectMode||0!==e.length?T(t,h,e,!1):L(t,h)):T(t,h,e,!1)}else n||(h.reading=!1,L(t,h));return!h.ended&&(h.length<h.highWaterMark||0===h.length)}function T(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&x(t)),L(t,e)}Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),E.prototype.destroy=p.destroy,E.prototype._undestroy=p.undestroy,E.prototype._destroy=function(t,e){e(t)},E.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=s.from(t,e),e=""),r=!0),O(this,t,e,!1,r)},E.prototype.unshift=function(t){return O(this,t,null,!0,!1)},E.prototype.isPaused=function(){return!1===this._readableState.flowing},E.prototype.setEncoding=function(t){d||(d=r(553).s);var e=new d(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=e.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var R=1073741824;function j(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=R?t=R:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function x(t){var e=t._readableState;u("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(u("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(I,t))}function I(t){var e=t._readableState;u("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,A(t)}function L(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(B,t,e))}function B(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(u("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function U(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function N(t){u("readable nexttick read 0"),t.read(0)}function D(t,e){u("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),A(t),e.flowing&&!e.reading&&t.read(0)}function A(t){var e=t._readableState;for(u("flow",e.flowing);e.flowing&&null!==t.read(););}function M(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function C(t){var e=t._readableState;u("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(k,e,t))}function k(t,e){if(u("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function P(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}E.prototype.read=function(t){u("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return u("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?C(this):x(this),null;if(0===(t=j(t,e))&&e.ended)return 0===e.length&&C(this),null;var n,i=e.needReadable;return u("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&u("length less than watermark",i=!0),e.ended||e.reading?u("reading or ended",i=!1):i&&(u("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=j(r,e))),null===(n=t>0?M(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&C(this)),null!==n&&this.emit("data",n),n},E.prototype._read=function(t){q(this,new b("_read()"))},E.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t)}n.pipesCount+=1,u("pipe count=%d opts=%j",n.pipesCount,e);var o=(!e||!1!==e.end)&&t!==process.stdout&&t!==process.stderr?a:g;function s(e,i){u("onunpipe"),e===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,u("cleanup"),t.removeListener("close",f),t.removeListener("finish",p),t.removeListener("drain",h),t.removeListener("error",l),t.removeListener("unpipe",s),r.removeListener("end",a),r.removeListener("end",g),r.removeListener("data",c),d=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||h())}function a(){u("onend"),t.end()}n.endEmitted?process.nextTick(o):r.once("end",o),t.on("unpipe",s);var h=function(t){return function(){var e=t._readableState;u("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&i(t,"data")&&(e.flowing=!0,A(t))}}(r);t.on("drain",h);var d=!1;function c(e){u("ondata");var i=t.write(e);u("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==P(n.pipes,t))&&!d&&(u("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function l(e){u("onerror",e),g(),t.removeListener("error",l),0===i(t,"error")&&q(t,e)}function f(){t.removeListener("finish",p),g()}function p(){u("onfinish"),t.removeListener("close",f),g()}function g(){u("unpipe"),r.unpipe(t)}return r.on("data",c),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",l),t.once("close",f),t.once("finish",p),t.emit("pipe",r),n.flowing||(u("pipe resume"),r.resume()),t},E.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=P(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},E.prototype.on=function(t,e){var r=o.prototype.on.call(this,t,e),n=this._readableState;return"data"===t?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===t&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,u("on readable",n.length,n.reading),n.length?x(this):n.reading||process.nextTick(N,this))),r},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(t,e){var r=o.prototype.removeListener.call(this,t,e);return"readable"===t&&process.nextTick(U,this),r},E.prototype.removeAllListeners=function(t){var e=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||process.nextTick(U,this),e},E.prototype.resume=function(){var t=this._readableState;return t.flowing||(u("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(D,t,e))}(this,t)),t.paused=!1,this},E.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(u("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(u("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<_.length;o++)t.on(_[o],this.emit.bind(this,_[o]));return this._read=function(e){u("wrapped _read",e),n&&(n=!1,t.resume())},this},"function"==typeof Symbol&&(E.prototype[Symbol.asyncIterator]=function(){return void 0===c&&(c=r(850)),c(this)}),Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(E.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(E.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),E._fromList=M,Object.defineProperty(E.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(E.from=function(t,e){return void 0===l&&(l=r(167)),l(E,t,e)})},605:(t,e,r)=>{"use strict";t.exports=d;var n=r(281).q,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(753);function h(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function d(t){if(!(this instanceof d))return new d(t);u.call(this,t),this._transformState={afterTransform:h.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",c)}function c(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?l(this,null,null):this._flush((function(e,r){l(t,e,r)}))}function l(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new a;if(t._transformState.transforming)throw new s;return t.push(null)}r(717)(d,u),d.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},d.prototype._transform=function(t,e,r){r(new i("_transform()"))},d.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},d.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},d.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t)}))}},229:(t,e,r)=>{"use strict";function n(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}var i;t.exports=E,E.WritableState=S;var o={deprecate:r(927)},s=r(503),a=r(764).Buffer,u=r.g.Uint8Array||function(){};var h,d=r(195),c=r(457).getHighWaterMark,l=r(281).q,f=l.ERR_INVALID_ARG_TYPE,p=l.ERR_METHOD_NOT_IMPLEMENTED,g=l.ERR_MULTIPLE_CALLBACK,m=l.ERR_STREAM_CANNOT_PIPE,y=l.ERR_STREAM_DESTROYED,w=l.ERR_STREAM_NULL_VALUES,b=l.ERR_STREAM_WRITE_AFTER_END,v=l.ERR_UNKNOWN_ENCODING,q=d.errorOrDestroy;function _(){}function S(t,e,o){i=i||r(753),t=t||{},"boolean"!=typeof o&&(o=e instanceof i),this.objectMode=!!t.objectMode,o&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=c(this,t,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===t.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new g;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,i){--e.pendingcb,r?(process.nextTick(i,n),process.nextTick(I,t,e),t._writableState.errorEmitted=!0,q(t,n)):(i(n),t._writableState.errorEmitted=!0,q(t,n),I(t,e))}(t,r,n,e,i);else{var o=j(r)||t.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||R(t,r),n?process.nextTick(T,t,r,o,i):T(t,r,o,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}function E(t){var e=this instanceof(i=i||r(753));if(!e&&!h.call(E,this))return new E(t);this._writableState=new S(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),s.call(this)}function O(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new y("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function T(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),I(t,e)}function R(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,o=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)o[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;o.allBuffers=u,O(t,e,!0,e.length,o,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new n(e),e.bufferedRequestCount=0}else{for(;r;){var h=r.chunk,d=r.encoding,c=r.callback;if(O(t,e,!1,e.objectMode?1:h.length,h,d,c),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function j(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function x(t,e){t._final((function(r){e.pendingcb--,r&&q(t,r),e.prefinished=!0,t.emit("prefinish"),I(t,e)}))}function I(t,e){var r=j(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,process.nextTick(x,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return r}r(717)(E,s),S.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(S.prototype,"buffer",{get:o.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(E,Symbol.hasInstance,{value:function(t){return!!h.call(this,t)||this===E&&(t&&t._writableState instanceof S)}})):h=function(t){return t instanceof this},E.prototype.pipe=function(){q(this,new m)},E.prototype.write=function(t,e,r){var n,i=this._writableState,o=!1,s=!i.objectMode&&(n=t,a.isBuffer(n)||n instanceof u);return s&&!a.isBuffer(t)&&(t=function(t){return a.from(t)}(t)),"function"==typeof e&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof r&&(r=_),i.ending?function(t,e){var r=new b;q(t,r),process.nextTick(e,r)}(this,r):(s||function(t,e,r,n){var i;return null===r?i=new w:"string"==typeof r||e.objectMode||(i=new f("chunk",["string","Buffer"],r)),!i||(q(t,i),process.nextTick(n,i),!1)}(this,i,t,r))&&(i.pendingcb++,o=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=a.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var u=e.objectMode?1:n.length;e.length+=u;var h=e.length<e.highWaterMark;h||(e.needDrain=!0);if(e.writing||e.corked){var d=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},d?d.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else O(t,e,!1,u,n,i,o);return h}(this,i,s,t,e,r)),o},E.prototype.cork=function(){this._writableState.corked++},E.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||R(this,t))},E.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new v(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(t,e,r){r(new p("_write()"))},E.prototype._writev=null,E.prototype.end=function(t,e,r){var n=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,r){e.ending=!0,I(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),E.prototype.destroy=d.destroy,E.prototype._undestroy=d.undestroy,E.prototype._destroy=function(t,e){e(t)}},850:(t,e,r)=>{"use strict";var n;function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(610),s=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),h=Symbol("ended"),d=Symbol("lastPromise"),c=Symbol("handlePromise"),l=Symbol("stream");function f(t,e){return{value:t,done:e}}function p(t){var e=t[s];if(null!==e){var r=t[l].read();null!==r&&(t[d]=null,t[s]=null,t[a]=null,e(f(r,!1)))}}function g(t){process.nextTick(p,t)}var m=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((i(n={get stream(){return this[l]},next:function(){var t=this,e=this[u];if(null!==e)return Promise.reject(e);if(this[h])return Promise.resolve(f(void 0,!0));if(this[l].destroyed)return new Promise((function(e,r){process.nextTick((function(){t[u]?r(t[u]):e(f(void 0,!0))}))}));var r,n=this[d];if(n)r=new Promise(function(t,e){return function(r,n){t.then((function(){e[h]?r(f(void 0,!0)):e[c](r,n)}),n)}}(n,this));else{var i=this[l].read();if(null!==i)return Promise.resolve(f(i,!1));r=new Promise(this[c])}return this[d]=r,r}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var t=this;return new Promise((function(e,r){t[l].destroy(null,(function(t){t?r(t):e(f(void 0,!0))}))}))})),n),m);t.exports=function(t){var e,r=Object.create(y,(i(e={},l,{value:t,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,a,{value:null,writable:!0}),i(e,u,{value:null,writable:!0}),i(e,h,{value:t._readableState.endEmitted,writable:!0}),i(e,c,{value:function(t,e){var n=r[l].read();n?(r[d]=null,r[s]=null,r[a]=null,t(f(n,!1))):(r[s]=t,r[a]=e)},writable:!0}),e));return r[d]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[a];return null!==e&&(r[d]=null,r[s]=null,r[a]=null,e(t)),void(r[u]=t)}var n=r[s];null!==n&&(r[d]=null,r[s]=null,r[a]=null,n(f(void 0,!0))),r[h]=!0})),t.on("readable",g.bind(null,r)),r}},327:(t,e,r)=>{"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var s=r(764).Buffer,a=r(361).inspect,u=a&&a.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,r,h;return e=t,r=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return s.alloc(0);for(var e,r,n,i=s.allocUnsafe(t>>>0),o=this.head,a=0;o;)e=o.data,r=i,n=a,s.prototype.copy.call(e,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,n=e.data;for(t-=n.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0==(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=s.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0==(t-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:u,value:function(t,e){return a(this,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}],r&&o(e.prototype,r),h&&o(e,h),t}()},195:t=>{"use strict";function e(t,e){n(t,e),r(t)}function r(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function n(t,e){t.emit("error",e)}t.exports={destroy:function(t,i){var o=this,s=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return s||a?(i?i(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,t)):process.nextTick(n,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!i&&t?o._writableState?o._writableState.errorEmitted?process.nextTick(r,o):(o._writableState.errorEmitted=!0,process.nextTick(e,o,t)):process.nextTick(e,o,t):i?(process.nextTick(r,o),i(t)):process.nextTick(r,o)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}},610:(t,e,r)=>{"use strict";var n=r(281).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,r,o){if("function"==typeof r)return t(e,null,r);r||(r={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}(o||i);var s=r.readable||!1!==r.readable&&e.readable,a=r.writable||!1!==r.writable&&e.writable,u=function(){e.writable||d()},h=e._writableState&&e._writableState.finished,d=function(){a=!1,h=!0,s||o.call(e)},c=e._readableState&&e._readableState.endEmitted,l=function(){s=!1,c=!0,a||o.call(e)},f=function(t){o.call(e,t)},p=function(){var t;return s&&!c?(e._readableState&&e._readableState.ended||(t=new n),o.call(e,t)):a&&!h?(e._writableState&&e._writableState.ended||(t=new n),o.call(e,t)):void 0},g=function(){e.req.on("finish",d)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(e)?a&&!e._writableState&&(e.on("end",u),e.on("close",u)):(e.on("complete",d),e.on("abort",p),e.req?g():e.on("request",g)),e.on("end",l),e.on("finish",d),!1!==r.error&&e.on("error",f),e.on("close",p),function(){e.removeListener("complete",d),e.removeListener("abort",p),e.removeListener("request",g),e.req&&e.req.removeListener("finish",d),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",d),e.removeListener("end",l),e.removeListener("error",f),e.removeListener("close",p)}}},167:t=>{t.exports=function(){throw new Error("Readable.from is not available in the browser")}},946:(t,e,r)=>{"use strict";var n;var i=r(281).q,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(t){if(t)throw t}function u(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var a=!1;t.on("close",(function(){a=!0})),void 0===n&&(n=r(610)),n(t,{readable:e,writable:i},(function(t){if(t)return o(t);a=!0,o()}));var u=!1;return function(e){if(!a&&!u)return u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new s("pipe"))}}function h(t){t()}function d(t,e){return t.pipe(e)}function c(t){return t.length?"function"!=typeof t[t.length-1]?a:t.pop():a}t.exports=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n,i=c(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var s=e.map((function(t,r){var o=r<e.length-1;return u(t,o,r>0,(function(t){n||(n=t),t&&s.forEach(h),o||(s.forEach(h),i(n))}))}));return e.reduce(d)}},457:(t,e,r)=>{"use strict";var n=r(281).q.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},503:(t,e,r)=>{t.exports=r(187).EventEmitter},473:(t,e,r)=>{(e=t.exports=r(481)).Stream=e,e.Readable=e,e.Writable=r(229),e.Duplex=r(753),e.Transform=r(605),e.PassThrough=r(725),e.finished=r(610),e.pipeline=r(946)},509:(t,e,r)=>{var n=r(764),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},553:(t,e,r)=>{"use strict";var n=r(509).Buffer,i=n.isEncoding||function(t){switch((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 o(t){var e;switch(this.encoding=function(t){var e=function(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}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=h,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=d,this.end=c,e=3;break;default:return this.write=l,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(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 h(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 d(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?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 c(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function l(t){return t.toString(this.encoding)}function f(t){return t&&t.length?this.write(t):""}e.s=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))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||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},o.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var i=s(e[n]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if((i=s(e[n]))>=0)return i>0&&(t.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if((i=s(e[n]))>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(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)},o.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}},927:(t,e,r)=>{function n(t){try{if(!r.g.localStorage)return!1}catch(t){return!1}var e=r.g.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}t.exports=function(t,e){if(n("noDeprecation"))return t;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}},0:e=>{"use strict";e.exports=t},361:()=>{},616:()=>{}},r={};function n(t){var i=r[t];if(void 0!==i)return i.exports;var o=r[t]={exports:{}};return e[t](o,o.exports,n),o.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return(()=>{"use strict";n.r(i),n.d(i,{FeatureOfInterest:()=>Hs,ObservableProperty:()=>Qs,Observation:()=>Ks,QuantityValue:()=>Js,RDFSerializer:()=>RDFSerializer,xsd:()=>T});var t={};n.r(t),n.d(t,{Alt:()=>$,Bag:()=>P,CompoundLiteral:()=>F,HTML:()=>V,JSON__workaround:()=>H,List:()=>Q,PlainLiteral:()=>W,Property:()=>C,Seq:()=>z,Statement:()=>k,XMLLiteral:()=>G,direction:()=>M,first:()=>N,langString:()=>K,language:()=>A,nil:()=>X,object:()=>B,predicate:()=>L,rest:()=>D,subject:()=>I,type:()=>x,value:()=>U});var e={};n.r(e),n.d(e,{Class:()=>ut,Container:()=>dt,ContainerMembershipProperty:()=>ot,Datatype:()=>ct,Literal:()=>ht,Resource:()=>at,comment:()=>Z,domain:()=>rt,isDefinedBy:()=>Y,label:()=>J,member:()=>st,range:()=>et,seeAlso:()=>it,subClassOf:()=>tt,subPropertyOf:()=>nt});var r={};n.r(r),n.d(r,{AbstractQuantityKind:()=>Mt,Aspect:()=>Ki,AspectClass:()=>xt,BaseDimensionMagnitude:()=>Pt,BigEndian:()=>Wi,BinaryPrefix:()=>$t,BitEncodingType:()=>Ft,BooleanEncoding:()=>Gi,BooleanEncodingType:()=>Kt,ByteEncodingType:()=>Wt,CT_FINITE:()=>Hi,CT_UNCOUNTABLE:()=>Xi,CardinalityType:()=>Gt,CharEncoding:()=>Yi,CharEncodingType:()=>Xt,Citation:()=>Yt,Comment:()=>Jt,Concept:()=>Ct,ConstantValue:()=>te,CountingUnit:()=>re,CurrencyUnit:()=>ie,DataEncoding:()=>oe,Datatype:()=>se,DateTimeStringEncodingType:()=>ue,DecimalPrefix:()=>de,DerivedUnit:()=>ce,DimensionlessUnit:()=>ne,Discipline:()=>fe,DoublePrecisionEncoding:()=>Zi,Encoding:()=>Vt,EndianType:()=>zt,EnumeratedValue:()=>Ht,Enumeration:()=>ge,EnumerationScale:()=>me,Figure:()=>we,FloatingPointEncodingType:()=>pe,IEEE754_1985RealEncoding:()=>to,IntegerEncodingType:()=>be,IntervalScale:()=>ve,LatexString:()=>Lt,LittleEndian:()=>eo,LogarithmicUnit:()=>Ee,LongUnsignedIntegerEncoding:()=>ro,MathFunctionType:()=>Oe,NIST_SP811_Comment:()=>Te,NominalScale:()=>qe,OctetEncoding:()=>no,OrderedType:()=>ae,OrdinalScale:()=>_e,Organization:()=>Re,PartiallyOrdered:()=>oo,PhysicalConstant:()=>je,Prefix:()=>Qt,Quantifiable:()=>Ie,Quantity:()=>xe,QuantityKind:()=>kt,QuantityKindDimensionVector:()=>Le,QuantityKindDimensionVector_CGS:()=>Ne,QuantityKindDimensionVector_ISO:()=>De,QuantityKindDimensionVector_Imperial:()=>Ae,QuantityKindDimensionVector_SI:()=>Be,QuantityType:()=>Me,QuantityValue:()=>ee,RatioScale:()=>Se,Rule:()=>Zt,RuleType:()=>Ce,SIGNED:()=>ho,ScalarDatatype:()=>Pe,Scale:()=>ye,ScaleType:()=>ze,ShortSignedIntegerEncoding:()=>co,ShortUnsignedIntegerEncoding:()=>lo,SignedIntegerEncoding:()=>fo,SignednessType:()=>ke,SinglePrecisionRealEncoding:()=>go,Statement:()=>It,StringEncodingType:()=>he,StructuredDatatype:()=>$e,Symbol__workaround:()=>Qe,SystemOfQuantityKinds:()=>Ue,SystemOfUnits:()=>Fe,TotallyOrdered:()=>so,UCUMci:()=>Bt,UCUMcs:()=>Ut,UNSIGNED:()=>po,Unit:()=>le,Unordered:()=>io,UnsignedIntegerEncoding:()=>mo,UserQuantityKind:()=>Ve,Verifiable:()=>Ji,Wikipedia:()=>yo,abbreviation:()=>Bn,acronym:()=>ji,allowedPattern:()=>St,allowedUnitOfSystem:()=>Br,ansiSQLName:()=>mt,applicableCGSUnit:()=>cr,applicableISOUnit:()=>lr,applicableImperialUnit:()=>fr,applicablePhysicalConstant:()=>Sr,applicablePlanckUnit:()=>Ur,applicableSIUnit:()=>pr,applicableUSCustomaryUnit:()=>gr,applicableUnit:()=>mr,baseCGSUnitDimensions:()=>ii,baseDimensionEnumeration:()=>qr,baseISOUnitDimensions:()=>oi,baseImperialUnitDimensions:()=>si,baseSIUnitDimensions:()=>ai,baseUSCustomaryUnitDimensions:()=>ui,baseUnitDimensions:()=>hi,baseUnitOfSystem:()=>Nr,basis:()=>pt,belongsToSystemOfQuantities:()=>Ar,bitOrder:()=>He,bits:()=>Et,bounded:()=>yt,byteOrder:()=>Xe,bytes:()=>lt,cName:()=>wt,cardinality:()=>ft,categorizedAs:()=>Mr,citation:()=>xi,code:()=>Ii,coherentUnitOfSystem:()=>Dr,coherentUnitSystem:()=>kr,conversionCoefficient:()=>Li,conversionMultiplier:()=>Si,conversionOffset:()=>Ei,currencyExponent:()=>Bi,dataEncoding:()=>Ze,dataStructure:()=>qi,dataType:()=>tr,dbpediaMatch:()=>$n,default__workaround:()=>Ye,definedUnitOfSystem:()=>Cr,denominatorDimensionVector:()=>Pr,derivedCoherentUnitOfSystem:()=>zr,derivedNonCoherentUnitOfSystem:()=>Qr,derivedQuantityKindOfSystem:()=>Vr,derivedUnitOfSystem:()=>$r,description:()=>xn,dimensionExponent:()=>Ui,dimensionExponentForAmountOfSubstance:()=>di,dimensionExponentForElectricCurrent:()=>ci,dimensionExponentForLength:()=>li,dimensionExponentForLuminousIntensity:()=>fi,dimensionExponentForMass:()=>pi,dimensionExponentForThermodynamicTemperature:()=>gi,dimensionExponentForTime:()=>mi,dimensionInverse:()=>Wr,dimensionVectorForSI:()=>ar,dimensionlessExponent:()=>yi,element:()=>Je,elementKind:()=>Gr,elementType:()=>jt,encoding:()=>Ge,exactConstant:()=>Nn,exactMatch:()=>Hr,example:()=>uo,expression:()=>ao,fieldCode:()=>Ni,figure:()=>Xr,figureCaption:()=>Fn,figureLabel:()=>Vn,floatPercentage:()=>Nt,generalization:()=>or,guidance:()=>Di,hasAllowedUnit:()=>Er,hasBaseQuantityKind:()=>Ke,hasBaseUnit:()=>Or,hasCoherentUnit:()=>Tr,hasDefinedUnit:()=>Rr,hasDenominatorPart:()=>Zr,hasDerivedCoherentUnit:()=>jr,hasDerivedNonCoherentUnit:()=>Fr,hasDerivedUnit:()=>xr,hasDimension:()=>tn,hasDimensionExpression:()=>en,hasDimensionVector:()=>sr,hasNonCoherentUnit:()=>rn,hasNumeratorPart:()=>nn,hasPrefixUnit:()=>on,hasQuantity:()=>sn,hasQuantityKind:()=>ir,hasReferenceQuantityKind:()=>an,hasRule:()=>We,hasUnit:()=>Ir,hasUnitSystem:()=>_r,hasVocabulary:()=>un,height:()=>Kn,id:()=>Un,iec61360Code:()=>_i,image:()=>Wn,imageLocation:()=>Qn,informativeReference:()=>On,integerPercentage:()=>Dt,isBaseQuantityKindOfSystem:()=>Jr,isDeltaQuantity:()=>ni,isDimensionInSystem:()=>hn,isMetricUnit:()=>Ai,isQuantityKindOf:()=>ur,isScalingOf:()=>dn,isoNormativeReference:()=>Ti,javaName:()=>Dn,jsName:()=>An,landscape:()=>Gn,latexDefinition:()=>Yn,latexSymbol:()=>Sn,length:()=>Tt,literal:()=>Rn,lowerBound:()=>Mi,mathDefinition:()=>Ci,mathMLdefinition:()=>Jn,matlabName:()=>Mn,maxExclusive:()=>wi,maxInclusive:()=>bi,microsoftSQLServerName:()=>Cn,minExclusive:()=>Rt,minInclusive:()=>vi,mySQLName:()=>kn,negativeDeltaLimit:()=>Pi,normativeReference:()=>Ri,numeratorDimensionVector:()=>cn,numericValue:()=>zi,odbcName:()=>Pn,oleDBName:()=>zn,omUnit:()=>ln,onlineReference:()=>$i,oracleSQLName:()=>bt,order:()=>Xn,orderedType:()=>gt,outOfScope:()=>Qi,permissibleMaths:()=>wr,permissibleTransformation:()=>vr,plainTextDescription:()=>jn,positiveDeltaLimit:()=>Fi,prefix:()=>fn,prefixMultiplier:()=>ti,protocolBuffersName:()=>vt,pythonName:()=>qt,qkdvDenominator:()=>hr,qkdvNumerator:()=>dr,quantity:()=>pn,quantityValue:()=>nr,rationale:()=>Ln,rdfsDatatype:()=>Ot,reference:()=>gn,referenceUnit:()=>mn,relativeStandardUncertainty:()=>ei,relevantQuantityKind:()=>yn,relevantUnit:()=>wn,ruleType:()=>yr,scaleType:()=>br,siUnitsExpression:()=>Oi,specialization:()=>Yr,standardUncertainty:()=>ri,symbol:()=>En,systemDefinition:()=>bn,systemDerivedQuantityKind:()=>Kr,systemDimension:()=>vn,ucumCaseInsensitiveCode:()=>wo,ucumCaseSensitiveCode:()=>bo,ucumCode:()=>Zn,uneceCommonCode:()=>Vi,unit:()=>er,unitFor:()=>qn,unitOfSystem:()=>Lr,upperBound:()=>ki,url:()=>In,value:()=>rr,valueQuantity:()=>_n,valueUnion:()=>At,vbName:()=>_t,vectorMagnitude:()=>Tn,width:()=>Hn});var o={};n.r(o),n.d(o,{ActuatableProperty:()=>_o,Actuation:()=>xo,Actuator:()=>Oo,FeatureOfInterest:()=>vo,ObservableProperty:()=>qo,Observation:()=>Io,Platform:()=>Eo,Procedure:()=>jo,Result:()=>Bo,Sample:()=>So,Sampler:()=>Ro,Sampling:()=>Lo,Sensor:()=>To,actsOnProperty:()=>Wo,hasFeatureOfInterest:()=>Po,hasResult:()=>Yo,hasSample:()=>Uo,hasSimpleResult:()=>ts,hosts:()=>Do,isActedOnBy:()=>Go,isFeatureOfInterestOf:()=>zo,isHostedBy:()=>Ao,isObservedBy:()=>Co,isResultOf:()=>Jo,isSampleOf:()=>No,madeActuation:()=>Vo,madeByActuator:()=>Ko,madeBySampler:()=>Xo,madeBySensor:()=>Qo,madeObservation:()=>$o,madeSampling:()=>Ho,observedProperty:()=>Fo,observes:()=>Mo,phenomenonTime:()=>Zo,resultTime:()=>es,usedProcedure:()=>ko});var s={};n.r(s),n.d(s,{Deployment:()=>os,Input:()=>ss,Output:()=>as,Property:()=>rs,Stimulus:()=>ns,System:()=>is,_implements:()=>ms,deployedOnPlatform:()=>_s,deployedSystem:()=>ls,detects:()=>ys,forProperty:()=>ws,hasDeployment:()=>qs,hasInput:()=>fs,hasOutput:()=>ps,hasProperty:()=>us,hasSubSystem:()=>vs,implementedBy:()=>gs,inDeployment:()=>cs,isPropertyOf:()=>hs,isProxyFor:()=>ds,wasOriginatedBy:()=>bs});var a=n(0);const u="http://www.w3.org/1999/02/22-rdf-syntax-ns#",h="http://www.w3.org/2001/XMLSchema#",d="http://www.w3.org/2000/10/swap/",c={xsd:{decimal:`${h}decimal`,boolean:`${h}boolean`,double:`${h}double`,integer:`${h}integer`,string:`${h}string`},rdf:{type:`${u}type`,nil:`${u}nil`,first:`${u}first`,rest:`${u}rest`,langString:`${u}langString`},owl:{sameAs:"http://www.w3.org/2002/07/owl#sameAs"},r:{forSome:`${d}reify#forSome`,forAll:`${d}reify#forAll`},log:{implies:`${d}log#implies`}};function l(t){return!!t&&"DefaultGraph"===t.termType}const{rdf:f,xsd:p}=c;let g,m=0;const y=/^"(.*".*)(?="[^"]*$)/,w=/^<<("(?:""|[^"])*"[^ ]*|[^ ]+) ("(?:""|[^"])*"[^ ]*|[^ ]+) ("(?:""|[^"])*"[^ ]*|[^ ]+) ?("(?:""|[^"])*"[^ ]*|[^ ]+)?>>$/,b={namedNode:function(t){return new NamedNode(t)},blankNode:function(t){return new BlankNode(t||"n3-"+m++)},variable:function(t){return new Variable(t)},literal:function(t,e){if("string"==typeof e)return new Literal(`"${t}"@${e.toLowerCase()}`);let r=e?e.value:"";""===r&&("boolean"==typeof t?r=p.boolean:"number"==typeof t&&(Number.isFinite(t)?r=Number.isInteger(t)?p.integer:p.double:(r=p.double,Number.isNaN(t)||(t=t>0?"INF":"-INF"))));return""===r||r===p.string?new Literal(`"${t}"`):new Literal(`"${t}"^^${r}`)},defaultGraph:function(){return g},quad:O,triple:O},v=b;class Term{constructor(t){this.id=t}get value(){return this.id}equals(t){return t instanceof Term?this.id===t.id:!!t&&this.termType===t.termType&&this.value===t.value}hashCode(){return 0}toJSON(){return{termType:this.termType,value:this.value}}}class NamedNode extends Term{get termType(){return"NamedNode"}}class Literal extends Term{get termType(){return"Literal"}get value(){return this.id.substring(1,this.id.lastIndexOf('"'))}get language(){const t=this.id;let e=t.lastIndexOf('"')+1;return e<t.length&&"@"===t[e++]?t.substr(e).toLowerCase():""}get datatype(){return new NamedNode(this.datatypeString)}get datatypeString(){const t=this.id,e=t.lastIndexOf('"')+1,r=e<t.length?t[e]:"";return"^"===r?t.substr(e+2):"@"!==r?p.string:f.langString}equals(t){return t instanceof Literal?this.id===t.id:!!t&&!!t.datatype&&this.termType===t.termType&&this.value===t.value&&this.language===t.language&&this.datatype.value===t.datatype.value}toJSON(){return{termType:this.termType,value:this.value,language:this.language,datatype:{termType:"NamedNode",value:this.datatypeString}}}}class BlankNode extends Term{constructor(t){super(`_:${t}`)}get termType(){return"BlankNode"}get value(){return this.id.substr(2)}}class Variable extends Term{constructor(t){super(`?${t}`)}get termType(){return"Variable"}get value(){return this.id.substr(1)}}function q(t,e){if(e=e||b,!t)return e.defaultGraph();switch(t[0]){case"?":return e.variable(t.substr(1));case"_":return e.blankNode(t.substr(2));case'"':if(e===b)return new Literal(t);if('"'===t[t.length-1])return e.literal(t.substr(1,t.length-2));const r=t.lastIndexOf('"',t.length-1);return e.literal(t.substr(1,r-1),"@"===t[r+1]?t.substr(r+2):e.namedNode(t.substr(r+3)));case"<":const n=w.exec(t);return e.quad(q(E(n[1]),e),q(E(n[2]),e),q(E(n[3]),e),n[4]&&q(E(n[4]),e));default:return e.namedNode(t)}}function _(t){if("string"==typeof t)return t;if(t instanceof Term&&"Quad"!==t.termType)return t.id;if(!t)return g.id;switch(t.termType){case"NamedNode":return t.value;case"BlankNode":return`_:${t.value}`;case"Variable":return`?${t.value}`;case"DefaultGraph":return"";case"Literal":return`"${t.value}"${t.language?`@${t.language}`:t.datatype&&t.datatype.value!==p.string?`^^${t.datatype.value}`:""}`;case"Quad":return`<<${S(_(t.subject))} ${S(_(t.predicate))} ${S(_(t.object))}${l(t.graph)?"":` ${_(t.graph)}`}>>`;default:throw new Error(`Unexpected termType: ${t.termType}`)}}g=new class DefaultGraph extends Term{constructor(){return super(""),g||this}get termType(){return"DefaultGraph"}equals(t){return this===t||!!t&&this.termType===t.termType}};class Quad extends Term{constructor(t,e,r,n){super(""),this._subject=t,this._predicate=e,this._object=r,this._graph=n||g}get termType(){return"Quad"}get subject(){return this._subject}get predicate(){return this._predicate}get object(){return this._object}get graph(){return this._graph}toJSON(){return{termType:this.termType,subject:this._subject.toJSON(),predicate:this._predicate.toJSON(),object:this._object.toJSON(),graph:this._graph.toJSON()}}equals(t){return!!t&&this._subject.equals(t.subject)&&this._predicate.equals(t.predicate)&&this._object.equals(t.object)&&this._graph.equals(t.graph)}}function S(t){return t.replace(y,((t,e)=>`"${e.replace(/"/g,'""')}`))}function E(t){return t.replace(y,((t,e)=>`"${e.replace(/""/g,'"')}`))}function O(t,e,r,n){return new Quad(t,e,r,n)}const T={boolean:"http://www.w3.org/2001/XMLSchema#boolean",dateTime:"http://www.w3.org/2001/XMLSchema#dateTime",date:"http://www.w3.org/2001/XMLSchema#date",time:"http://www.w3.org/2001/XMLSchema#time",decimal:"http://www.w3.org/2001/XMLSchema#decimal",anyURI:"http://www.w3.org/2001/XMLSchema#anyURI",integer:"http://www.w3.org/2001/XMLSchema#integer",string:"http://www.w3.org/2001/XMLSchema#string",double:"http://www.w3.org/2001/XMLSchema#double",langString:"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"};function R(t,e){const r=Object.assign({},t);return j(t)&&j(e)&&Object.keys(e).forEach((n=>{Array.isArray(e[n])?(r[n]=e[n],r[n].push(...t[n]||[])):j(e[n])?n in t?r[n]=R(t[n],e[n]):Object.assign(r,{[n]:e[n]}):Object.assign(r,{[n]:e[n]})})),r}function j(t){return t&&"object"==typeof t&&!Array.isArray(t)}class InternalRDFSerializer extends a.Serializer{constructor(){super(...arguments),this.serializationStrategy=new Map([[Number,this.serializeLiteral.bind(this)],[String,this.serializeLiteral.bind(this)],[Boolean,this.serializeLiteral.bind(this)],[Date,this.serializeDate.bind(this)],[Array,this.serializeArray.bind(this)],[Map,this.serializeMap.bind(this)],[Set,this.serializeSet.bind(this)]])}convertSingleValue(t,e,r,n,i){if(this.retrievePreserveNull(n)&&null===t)return null;if(null==t)return;if(n&&n.options&&n.options.rdf&&n.options.rdf.serializer)return n.options.rdf.serializer(t);const o=this.serializationStrategy.get(e.ctor);if(void 0!==o)return o(t,e,r,this,n,i);if("object"==typeof t)return this.serializeObject(t,e,r,this,n,i);let s=`Could not serialize '${r}'; don't know how to serialize type`;e.hasFriendlyName()&&(s+=` '${e.ctor.name}'`),this.errorHandler(new TypeError(`${s}.`))}serializeObject(t,e,r,n,i,o){let s;const u=a.DataSerializer.getRootMetadata(t.constructor);s=t.constructor!==e.ctor&&t instanceof e.ctor?a.DataSerializer.getMetadata(t.constructor):a.DataSerializer.getMetadata(e.ctor);const h=s.options&&s.options.rdf?s.options.rdf:u.options&&u.options.rdf?u.options.rdf:void 0;if(!h)return;const d=Array.from(s.dataMembers.values()).filter((t=>t&&t.options&&t.options.rdf&&t.options.rdf.identifier))[0];let c;if(d){const e=d.options.rdf;c=e.serializer?e.serializer(t[d.key],t.constructor):t[d.key]}c=c&&!c.startsWith("http")&&o.rdf.baseUri?o.rdf.baseUri+c:v.blankNode(c).value;let l={value:c,predicates:h.predicates?Object.entries(h.predicates).map((([t,e])=>({[t]:e.map(v.namedNode)}))).reduce(((t,e)=>Object.assign(Object.assign({},t),e))):{}};return h.serializer&&(l=R(l,h.serializer(t,o.rdf.baseUri))),l.termType=l.value.startsWith("http")?"NamedNode":"BlankNode",s.dataMembers.forEach((e=>{const r=u.dataMembers.get(e.key),i=e.options&&e.options.rdf?e:r&&r.options&&r.options.rdf?r:void 0;if(!i||!i.options.rdf.predicate)return;const s=n.convertSingleValue(t[i.key],i.type(),`${i.name}`,i,o);if(s){const t=i.options.rdf.predicate;[...Array.isArray(t)?t:[t]].forEach((t=>{const e=l.predicates[t]||[];e.push(...(Array.isArray(s)?s:[s]).filter((t=>t))),l.predicates[t]=e}))}})),l}serializeArray(t,e,r,n,i,o){return t.map((t=>this.convertSingleValue(t,e.elementType,r,i,o)))}serializeMap(t,e,r,n,i,o){return Array.from(t.values()).map((t=>this.convertSingleValue(t,e.valueType,r,i,o)))}serializeSet(t,e,r,n,i,o){return Array.from(t.values()).map((t=>this.convertSingleValue(t,e.valueType,r,i,o)))}serializeLiteral(t,e,r,n,i){var o;let s;const a=i.options.rdf;if(a&&a.datatype)switch(s=a.datatype,a.datatype){case T.date:case T.dateTime:return this.serializeDate(t,e,r,n,i)}else switch(typeof t){case"bigint":case"number":s=T.decimal;break;case"boolean":s=T.boolean;break;default:s=T.string}const u=this.iriToNode(s);return v.literal(t,a&&null!==(o=a.language)&&void 0!==o?o:u)}serializeDate(t,e,r,n,i){var o;const s=i.options.rdf,a=T.dateTime,u=new Date(t).toISOString(),h=this.iriToNode(a);return v.literal(u,s&&null!==(o=s.language)&&void 0!==o?o:h)}iriToNode(t){return v.namedNode(t)}}const x="http://www.w3.org/1999/02/22-rdf-syntax-ns#type",I="http://www.w3.org/1999/02/22-rdf-syntax-ns#subject",L="http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate",B="http://www.w3.org/1999/02/22-rdf-syntax-ns#object",U="http://www.w3.org/1999/02/22-rdf-syntax-ns#value",N="http://www.w3.org/1999/02/22-rdf-syntax-ns#first",D="http://www.w3.org/1999/02/22-rdf-syntax-ns#rest",A="http://www.w3.org/1999/02/22-rdf-syntax-ns#language",M="http://www.w3.org/1999/02/22-rdf-syntax-ns#direction",C="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property",k="http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement",P="http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag",z="http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq",$="http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt",Q="http://www.w3.org/1999/02/22-rdf-syntax-ns#List",F="http://www.w3.org/1999/02/22-rdf-syntax-ns#CompoundLiteral",V="http://www.w3.org/1999/02/22-rdf-syntax-ns#HTML",K="http://www.w3.org/1999/02/22-rdf-syntax-ns#langString",W="http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral",G="http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral",H="http://www.w3.org/1999/02/22-rdf-syntax-ns#JSON",X="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil",Y="http://www.w3.org/2000/01/rdf-schema#isDefinedBy",J="http://www.w3.org/2000/01/rdf-schema#label",Z="http://www.w3.org/2000/01/rdf-schema#comment",tt="http://www.w3.org/2000/01/rdf-schema#subClassOf",et="http://www.w3.org/2000/01/rdf-schema#range",rt="http://www.w3.org/2000/01/rdf-schema#domain",nt="http://www.w3.org/2000/01/rdf-schema#subPropertyOf",it="http://www.w3.org/2000/01/rdf-schema#seeAlso",ot="http://www.w3.org/2000/01/rdf-schema#ContainerMembershipProperty",st="http://www.w3.org/2000/01/rdf-schema#member",at="http://www.w3.org/2000/01/rdf-schema#Resource",ut="http://www.w3.org/2000/01/rdf-schema#Class",ht="http://www.w3.org/2000/01/rdf-schema#Literal",dt="http://www.w3.org/2000/01/rdf-schema#Container",ct="http://www.w3.org/2000/01/rdf-schema#Datatype",lt="http://qudt.org/schema/qudt/bytes",ft="http://qudt.org/schema/qudt/cardinality",pt="http://qudt.org/schema/qudt/basis",gt="http://qudt.org/schema/qudt/orderedType",mt="http://qudt.org/schema/qudt/ansiSQLName",yt="http://qudt.org/schema/qudt/bounded",wt="http://qudt.org/schema/qudt/cName",bt="http://qudt.org/schema/qudt/oracleSQLName",vt="http://qudt.org/schema/qudt/protocolBuffersName",qt="http://qudt.org/schema/qudt/pythonName",_t="http://qudt.org/schema/qudt/vbName",St="http://qudt.org/schema/qudt/allowedPattern",Et="http://qudt.org/schema/qudt/bits",Ot="http://qudt.org/schema/qudt/rdfsDatatype",Tt="http://qudt.org/schema/qudt/length",Rt="http://qudt.org/schema/qudt/minExclusive",jt="http://qudt.org/schema/qudt/elementType",xt="http://qudt.org/schema/qudt/AspectClass",It="http://qudt.org/schema/qudt/Statement",Lt="http://qudt.org/schema/qudt/LatexString",Bt="http://qudt.org/schema/qudt/UCUMci",Ut="http://qudt.org/schema/qudt/UCUMcs",Nt="http://qudt.org/schema/qudt/floatPercentage",Dt="http://qudt.org/schema/qudt/integerPercentage",At="http://qudt.org/schema/qudt/valueUnion",Mt="http://qudt.org/schema/qudt/AbstractQuantityKind",Ct="http://qudt.org/schema/qudt/Concept",kt="http://qudt.org/schema/qudt/QuantityKind",Pt="http://qudt.org/schema/qudt/BaseDimensionMagnitude",zt="http://qudt.org/schema/qudt/EndianType",$t="http://qudt.org/schema/qudt/BinaryPrefix",Qt="http://qudt.org/schema/qudt/Prefix",Ft="http://qudt.org/schema/qudt/BitEncodingType",Vt="http://qudt.org/schema/qudt/Encoding",Kt="http://qudt.org/schema/qudt/BooleanEncodingType",Wt="http://qudt.org/schema/qudt/ByteEncodingType",Gt="http://qudt.org/schema/qudt/CardinalityType",Ht="http://qudt.org/schema/qudt/EnumeratedValue",Xt="http://qudt.org/schema/qudt/CharEncodingType",Yt="http://qudt.org/schema/qudt/Citation",Jt="http://qudt.org/schema/qudt/Comment",Zt="http://qudt.org/schema/qudt/Rule",te="http://qudt.org/schema/qudt/ConstantValue",ee="http://qudt.org/schema/qudt/QuantityValue",re="http://qudt.org/schema/qudt/CountingUnit",ne="http://qudt.org/schema/qudt/DimensionlessUnit",ie="http://qudt.org/schema/qudt/CurrencyUnit",oe="http://qudt.org/schema/qudt/DataEncoding",se="http://qudt.org/schema/qudt/Datatype",ae="http://qudt.org/schema/qudt/OrderedType",ue="http://qudt.org/schema/qudt/DateTimeStringEncodingType",he="http://qudt.org/schema/qudt/StringEncodingType",de="http://qudt.org/schema/qudt/DecimalPrefix",ce="http://qudt.org/schema/qudt/DerivedUnit",le="http://qudt.org/schema/qudt/Unit",fe="http://qudt.org/schema/qudt/Discipline",pe="http://qudt.org/schema/qudt/FloatingPointEncodingType",ge="http://qudt.org/schema/qudt/Enumeration",me="http://qudt.org/schema/qudt/EnumerationScale",ye="http://qudt.org/schema/qudt/Scale",we="http://qudt.org/schema/qudt/Figure",be="http://qudt.org/schema/qudt/IntegerEncodingType",ve="http://qudt.org/schema/qudt/IntervalScale",qe="http://qudt.org/schema/qudt/NominalScale",_e="http://qudt.org/schema/qudt/OrdinalScale",Se="http://qudt.org/schema/qudt/RatioScale",Ee="http://qudt.org/schema/qudt/LogarithmicUnit",Oe="http://qudt.org/schema/qudt/MathFunctionType",Te="http://qudt.org/schema/qudt/NIST_SP811_Comment",Re="http://qudt.org/schema/qudt/Organization",je="http://qudt.org/schema/qudt/PhysicalConstant",xe="http://qudt.org/schema/qudt/Quantity",Ie="http://qudt.org/schema/qudt/Quantifiable",Le="http://qudt.org/schema/qudt/QuantityKindDimensionVector",Be="http://qudt.org/schema/qudt/QuantityKindDimensionVector_SI",Ue="http://qudt.org/schema/qudt/SystemOfQuantityKinds",Ne="http://qudt.org/schema/qudt/QuantityKindDimensionVector_CGS",De="http://qudt.org/schema/qudt/QuantityKindDimensionVector_ISO",Ae="http://qudt.org/schema/qudt/QuantityKindDimensionVector_Imperial",Me="http://qudt.org/schema/qudt/QuantityType",Ce="http://qudt.org/schema/qudt/RuleType",ke="http://qudt.org/schema/qudt/SignednessType",Pe="http://qudt.org/schema/qudt/ScalarDatatype",ze="http://qudt.org/schema/qudt/ScaleType",$e="http://qudt.org/schema/qudt/StructuredDatatype",Qe="http://qudt.org/schema/qudt/Symbol",Fe="http://qudt.org/schema/qudt/SystemOfUnits",Ve="http://qudt.org/schema/qudt/UserQuantityKind",Ke="http://qudt.org/schema/qudt/hasBaseQuantityKind",We="http://qudt.org/schema/qudt/hasRule",Ge="http://qudt.org/schema/qudt/encoding",He="http://qudt.org/schema/qudt/bitOrder",Xe="http://qudt.org/schema/qudt/byteOrder",Ye="http://qudt.org/schema/qudt/default",Je="http://qudt.org/schema/qudt/element",Ze="http://qudt.org/schema/qudt/dataEncoding",tr="http://qudt.org/schema/qudt/dataType",er="http://qudt.org/schema/qudt/unit",rr="http://qudt.org/schema/qudt/value",nr="http://qudt.org/schema/qudt/quantityValue",ir="http://qudt.org/schema/qudt/hasQuantityKind",or="http://qudt.org/schema/qudt/generalization",sr="http://qudt.org/schema/qudt/hasDimensionVector",ar="http://qudt.org/schema/qudt/dimensionVectorForSI",ur="http://qudt.org/schema/qudt/isQuantityKindOf",hr="http://qudt.org/schema/qudt/qkdvDenominator",dr="http://qudt.org/schema/qudt/qkdvNumerator",cr="http://qudt.org/schema/qudt/applicableCGSUnit",lr="http://qudt.org/schema/qudt/applicableISOUnit",fr="http://qudt.org/schema/qudt/applicableImperialUnit",pr="http://qudt.org/schema/qudt/applicableSIUnit",gr="http://qudt.org/schema/qudt/applicableUSCustomaryUnit",mr="http://qudt.org/schema/qudt/applicableUnit",yr="http://qudt.org/schema/qudt/ruleType",wr="http://qudt.org/schema/qudt/permissibleMaths",br="http://qudt.org/schema/qudt/scaleType",vr="http://qudt.org/schema/qudt/permissibleTransformation",qr="http://qudt.org/schema/qudt/baseDimensionEnumeration",_r="http://qudt.org/schema/qudt/hasUnitSystem",Sr="http://qudt.org/schema/qudt/applicablePhysicalConstant",Er="http://qudt.org/schema/qudt/hasAllowedUnit",Or="http://qudt.org/schema/qudt/hasBaseUnit",Tr="http://qudt.org/schema/qudt/hasCoherentUnit",Rr="http://qudt.org/schema/qudt/hasDefinedUnit",jr="http://qudt.org/schema/qudt/hasDerivedCoherentUnit",xr="http://qudt.org/schema/qudt/hasDerivedUnit",Ir="http://qudt.org/schema/qudt/hasUnit",Lr="http://qudt.org/schema/qudt/unitOfSystem",Br="http://qudt.org/schema/qudt/allowedUnitOfSystem",Ur="http://qudt.org/schema/qudt/applicablePlanckUnit",Nr="http://qudt.org/schema/qudt/baseUnitOfSystem",Dr="http://qudt.org/schema/qudt/coherentUnitOfSystem",Ar="http://qudt.org/schema/qudt/belongsToSystemOfQuantities",Mr="http://qudt.org/schema/qudt/categorizedAs",Cr="http://qudt.org/schema/qudt/definedUnitOfSystem",kr="http://qudt.org/schema/qudt/coherentUnitSystem",Pr="http://qudt.org/schema/qudt/denominatorDimensionVector",zr="http://qudt.org/schema/qudt/derivedCoherentUnitOfSystem",$r="http://qudt.org/schema/qudt/derivedUnitOfSystem",Qr="http://qudt.org/schema/qudt/derivedNonCoherentUnitOfSystem",Fr="http://qudt.org/schema/qudt/hasDerivedNonCoherentUnit",Vr="http://qudt.org/schema/qudt/derivedQuantityKindOfSystem",Kr="http://qudt.org/schema/qudt/systemDerivedQuantityKind",Wr="http://qudt.org/schema/qudt/dimensionInverse",Gr="http://qudt.org/schema/qudt/elementKind",Hr="http://qudt.org/schema/qudt/exactMatch",Xr="http://qudt.org/schema/qudt/figure",Yr="http://qudt.org/schema/qudt/specialization",Jr="http://qudt.org/schema/qudt/isBaseQuantityKindOfSystem",Zr="http://qudt.org/schema/qudt/hasDenominatorPart",tn="http://qudt.org/schema/qudt/hasDimension",en="http://qudt.org/schema/qudt/hasDimensionExpression",rn="http://qudt.org/schema/qudt/hasNonCoherentUnit",nn="http://qudt.org/schema/qudt/hasNumeratorPart",on="http://qudt.org/schema/qudt/hasPrefixUnit",sn="http://qudt.org/schema/qudt/hasQuantity",an="http://qudt.org/schema/qudt/hasReferenceQuantityKind",un="http://qudt.org/schema/qudt/hasVocabulary",hn="http://qudt.org/schema/qudt/isDimensionInSystem",dn="http://qudt.org/schema/qudt/isScalingOf",cn="http://qudt.org/schema/qudt/numeratorDimensionVector",ln="http://qudt.org/schema/qudt/omUnit",fn="http://qudt.org/schema/qudt/prefix",pn="http://qudt.org/schema/qudt/quantity",gn="http://qudt.org/schema/qudt/reference",mn="http://qudt.org/schema/qudt/referenceUnit",yn="http://qudt.org/schema/qudt/relevantQuantityKind",wn="http://qudt.org/schema/qudt/relevantUnit",bn="http://qudt.org/schema/qudt/systemDefinition",vn="http://qudt.org/schema/qudt/systemDimension",qn="http://qudt.org/schema/qudt/unitFor",_n="http://qudt.org/schema/qudt/valueQuantity",Sn="http://qudt.org/schema/qudt/latexSymbol",En="http://qudt.org/schema/qudt/symbol",On="http://qudt.org/schema/qudt/informativeReference",Tn="http://qudt.org/schema/qudt/vectorMagnitude",Rn="http://qudt.org/schema/qudt/literal",jn="http://qudt.org/schema/qudt/plainTextDescription",xn="http://qudt.org/schema/qudt/description",In="http://qudt.org/schema/qudt/url",Ln="http://qudt.org/schema/qudt/rationale",Bn="http://qudt.org/schema/qudt/abbreviation",Un="http://qudt.org/schema/qudt/id",Nn="http://qudt.org/schema/qudt/exactConstant",Dn="http://qudt.org/schema/qudt/javaName",An="http://qudt.org/schema/qudt/jsName",Mn="http://qudt.org/schema/qudt/matlabName",Cn="http://qudt.org/schema/qudt/microsoftSQLServerName",kn="http://qudt.org/schema/qudt/mySQLName",Pn="http://qudt.org/schema/qudt/odbcName",zn="http://qudt.org/schema/qudt/oleDBName",$n="http://qudt.org/schema/qudt/dbpediaMatch",Qn="http://qudt.org/schema/qudt/imageLocation",Fn="http://qudt.org/schema/qudt/figureCaption",Vn="http://qudt.org/schema/qudt/figureLabel",Kn="http://qudt.org/schema/qudt/height",Wn="http://qudt.org/schema/qudt/image",Gn="http://qudt.org/schema/qudt/landscape",Hn="http://qudt.org/schema/qudt/width",Xn="http://qudt.org/schema/qudt/order",Yn="http://qudt.org/schema/qudt/latexDefinition",Jn="http://qudt.org/schema/qudt/mathMLdefinition",Zn="http://qudt.org/schema/qudt/ucumCode",ti="http://qudt.org/schema/qudt/prefixMultiplier",ei="http://qudt.org/schema/qudt/relativeStandardUncertainty",ri="http://qudt.org/schema/qudt/standardUncertainty",ni="http://qudt.org/schema/qudt/isDeltaQuantity",ii="http://qudt.org/schema/qudt/baseCGSUnitDimensions",oi="http://qudt.org/schema/qudt/baseISOUnitDimensions",si="http://qudt.org/schema/qudt/baseImperialUnitDimensions",ai="http://qudt.org/schema/qudt/baseSIUnitDimensions",ui="http://qudt.org/schema/qudt/baseUSCustomaryUnitDimensions",hi="http://qudt.org/schema/qudt/baseUnitDimensions",di="http://qudt.org/schema/qudt/dimensionExponentForAmountOfSubstance",ci="http://qudt.org/schema/qudt/dimensionExponentForElectricCurrent",li="http://qudt.org/schema/qudt/dimensionExponentForLength",fi="http://qudt.org/schema/qudt/dimensionExponentForLuminousIntensity",pi="http://qudt.org/schema/qudt/dimensionExponentForMass",gi="http://qudt.org/schema/qudt/dimensionExponentForThermodynamicTemperature",mi="http://qudt.org/schema/qudt/dimensionExponentForTime",yi="http://qudt.org/schema/qudt/dimensionlessExponent",wi="http://qudt.org/schema/qudt/maxExclusive",bi="http://qudt.org/schema/qudt/maxInclusive",vi="http://qudt.org/schema/qudt/minInclusive",qi="http://qudt.org/schema/qudt/dataStructure",_i="http://qudt.org/schema/qudt/iec61360Code",Si="http://qudt.org/schema/qudt/conversionMultiplier",Ei="http://qudt.org/schema/qudt/conversionOffset",Oi="http://qudt.org/schema/qudt/siUnitsExpression",Ti="http://qudt.org/schema/qudt/isoNormativeReference",Ri="http://qudt.org/schema/qudt/normativeReference",ji="http://qudt.org/schema/qudt/acronym",xi="http://qudt.org/schema/qudt/citation",Ii="http://qudt.org/schema/qudt/code",Li="http://qudt.org/schema/qudt/conversionCoefficient",Bi="http://qudt.org/schema/qudt/currencyExponent",Ui="http://qudt.org/schema/qudt/dimensionExponent",Ni="http://qudt.org/schema/qudt/fieldCode",Di="http://qudt.org/schema/qudt/guidance",Ai="http://qudt.org/schema/qudt/isMetricUnit",Mi="http://qudt.org/schema/qudt/lowerBound",Ci="http://qudt.org/schema/qudt/mathDefinition",ki="http://qudt.org/schema/qudt/upperBound",Pi="http://qudt.org/schema/qudt/negativeDeltaLimit",zi="http://qudt.org/schema/qudt/numericValue",$i="http://qudt.org/schema/qudt/onlineReference",Qi="http://qudt.org/schema/qudt/outOfScope",Fi="http://qudt.org/schema/qudt/positiveDeltaLimit",Vi="http://qudt.org/schema/qudt/uneceCommonCode",Ki="http://qudt.org/schema/qudt/Aspect",Wi="http://qudt.org/schema/qudt/BigEndian",Gi="http://qudt.org/schema/qudt/BooleanEncoding",Hi="http://qudt.org/schema/qudt/CT_FINITE",Xi="http://qudt.org/schema/qudt/CT_UNCOUNTABLE",Yi="http://qudt.org/schema/qudt/CharEncoding",Ji="http://qudt.org/schema/qudt/Verifiable",Zi="http://qudt.org/schema/qudt/DoublePrecisionEncoding",to="http://qudt.org/schema/qudt/IEEE754_1985RealEncoding",eo="http://qudt.org/schema/qudt/LittleEndian",ro="http://qudt.org/schema/qudt/LongUnsignedIntegerEncoding",no="http://qudt.org/schema/qudt/OctetEncoding",io="http://qudt.org/schema/qudt/Unordered",oo="http://qudt.org/schema/qudt/PartiallyOrdered",so="http://qudt.org/schema/qudt/TotallyOrdered",ao="http://qudt.org/schema/qudt/expression",uo="http://qudt.org/schema/qudt/example",ho="http://qudt.org/schema/qudt/SIGNED",co="http://qudt.org/schema/qudt/ShortSignedIntegerEncoding",lo="http://qudt.org/schema/qudt/ShortUnsignedIntegerEncoding",fo="http://qudt.org/schema/qudt/SignedIntegerEncoding",po="http://qudt.org/schema/qudt/UNSIGNED",go="http://qudt.org/schema/qudt/SinglePrecisionRealEncoding",mo="http://qudt.org/schema/qudt/UnsignedIntegerEncoding",yo="http://qudt.org/schema/qudt/Wikipedia",wo="http://qudt.org/schema/qudt/ucumCaseInsensitiveCode",bo="http://qudt.org/schema/qudt/ucumCaseSensitiveCode",vo="http://www.w3.org/ns/sosa/FeatureOfInterest",qo="http://www.w3.org/ns/sosa/ObservableProperty",_o="http://www.w3.org/ns/sosa/ActuatableProperty",So="http://www.w3.org/ns/sosa/Sample",Eo="http://www.w3.org/ns/sosa/Platform",Oo="http://www.w3.org/ns/sosa/Actuator",To="http://www.w3.org/ns/sosa/Sensor",Ro="http://www.w3.org/ns/sosa/Sampler",jo="http://www.w3.org/ns/sosa/Procedure",xo="http://www.w3.org/ns/sosa/Actuation",Io="http://www.w3.org/ns/sosa/Observation",Lo="http://www.w3.org/ns/sosa/Sampling",Bo="http://www.w3.org/ns/sosa/Result",Uo="http://www.w3.org/ns/sosa/hasSample",No="http://www.w3.org/ns/sosa/isSampleOf",Do="http://www.w3.org/ns/sosa/hosts",Ao="http://www.w3.org/ns/sosa/isHostedBy",Mo="http://www.w3.org/ns/sosa/observes",Co="http://www.w3.org/ns/sosa/isObservedBy",ko="http://www.w3.org/ns/sosa/usedProcedure",Po="http://www.w3.org/ns/sosa/hasFeatureOfInterest",zo="http://www.w3.org/ns/sosa/isFeatureOfInterestOf",$o="http://www.w3.org/ns/sosa/madeObservation",Qo="http://www.w3.org/ns/sosa/madeBySensor",Fo="http://www.w3.org/ns/sosa/observedProperty",Vo="http://www.w3.org/ns/sosa/madeActuation",Ko="http://www.w3.org/ns/sosa/madeByActuator",Wo="http://www.w3.org/ns/sosa/actsOnProperty",Go="http://www.w3.org/ns/sosa/isActedOnBy",Ho="http://www.w3.org/ns/sosa/madeSampling",Xo="http://www.w3.org/ns/sosa/madeBySampler",Yo="http://www.w3.org/ns/sosa/hasResult",Jo="http://www.w3.org/ns/sosa/isResultOf",Zo="http://www.w3.org/ns/sosa/phenomenonTime",ts="http://www.w3.org/ns/sosa/hasSimpleResult",es="http://www.w3.org/ns/sosa/resultTime",rs="http://www.w3.org/ns/ssn/Property",ns="http://www.w3.org/ns/ssn/Stimulus",is="http://www.w3.org/ns/ssn/System",os="http://www.w3.org/ns/ssn/Deployment",ss="http://www.w3.org/ns/ssn/Input",as="http://www.w3.org/ns/ssn/Output",us="http://www.w3.org/ns/ssn/hasProperty",hs="http://www.w3.org/ns/ssn/isPropertyOf",ds="http://www.w3.org/ns/ssn/isProxyFor",cs="http://www.w3.org/ns/ssn/inDeployment",ls="http://www.w3.org/ns/ssn/deployedSystem",fs="http://www.w3.org/ns/ssn/hasInput",ps="http://www.w3.org/ns/ssn/hasOutput",gs="http://www.w3.org/ns/ssn/implementedBy",ms="http://www.w3.org/ns/ssn/implements",ys="http://www.w3.org/ns/ssn/detects",ws="http://www.w3.org/ns/ssn/forProperty",bs="http://www.w3.org/ns/ssn/wasOriginatedBy",vs="http://www.w3.org/ns/ssn/hasSubSystem",qs="http://www.w3.org/ns/ssn/hasDeployment",_s="http://www.w3.org/ns/ssn/deployedOnPlatform",Ss=t,Es=e,Os=r,Ts=o,Rs=s;class InternalRDFDeserializer extends a.Deserializer{constructor(){super(...arguments),this.deserializationStrategy=new Map([[Number,this.deserializeLiteral.bind(this)],[String,this.deserializeLiteral.bind(this)],[Boolean,this.deserializeLiteral.bind(this)],[Date,this.deserializeLiteral.bind(this)],[Array,this.deserializeArray.bind(this)],[Map,this.deserializeMap.bind(this)],[Set,this.deserializeSet.bind(this)]])}rdfTypeResolver(t,e,r){if(void 0!==t.predicates){const n=Object.entries(t.predicates).filter((([t,e])=>t===Ss.type)).map((([t,e])=>e)).flat().map((t=>t.value)).map((t=>r.get(t))).flat().map((t=>e.get(t)));return n[0]}return Object}convertSingleValue(t,e,r,n="object",i,o){if(this.retrievePreserveNull(i)&&null===t)return null;if(null==t)return;const s=this.deserializationStrategy.get(e.ctor);if(void 0!==s)return s(t,e,r,n,this,i,o);if("object"==typeof t)return this.deserializeObject(t,e,r,n,this,o);let a=`Could not deserialize '${n}'; don't know how to deserialize type`;e.hasFriendlyName()&&(a+=` '${e.ctor.name}'`),this.errorHandler(new TypeError(`${a}.`))}deserializeObject(t,e,r,n,i,o){const s=e.ctor,u=this.rdfTypeResolver(t,r,o.rdf.knownTypes)||s,h=a.DataSerializer.getMetadata(u),d=a.DataSerializer.getRootMetadata(u);if(!h&&!d)return;const c=h.options&&h.options.rdf?h.options.rdf:d.options&&d.options.rdf?d.options.rdf:void 0;if(!c)return;const l=c.deserializer?c.deserializer(t):this.instantiateType(u),f=Array.from(h.dataMembers.values()).filter((t=>t&&t.options&&t.options.rdf&&t.options.rdf.identifier))[0];if(f){const e=f.options.rdf;l[f.key]=e.deserializer?e.deserializer(t,u):t.value}return h.dataMembers.forEach((e=>{const n=d.dataMembers.get(e.key),s=e.options&&e.options.rdf?e:n&&n.options&&n.options.rdf?n:void 0;if(!s||!s.options.rdf.predicate)return;const a=s.options.rdf.predicate;[...Array.isArray(a)?a:[a]].forEach((e=>{t.predicates[e]&&(s.type().ctor===Array?l[s.key]=i.convertSingleValue(t.predicates[e],s.type(),r,s.name,s,o):l[s.key]=t.predicates[e].map((t=>i.convertSingleValue(t,s.type(),r,s.name,s,o))).filter((t=>this.isInstanceOf(t,s.type().ctor)))[0])}))})),l}deserializeLiteral(t,e,r,n,i,o,s){return t.datatype.value===T.dateTime?new Date(t.value).getTime():t.value}deserializeDate(t,e,r,n,i,o,s){return new Date(t.value)}deserializeArray(t,e,r,n,i,o,s){return t?t.map((t=>i.convertSingleValue(t,e.elementType,r,n,o,s))).filter((t=>this.isInstanceOf(t,e.elementType.ctor))):[]}isInstanceOf(t,e){return"number"==typeof t?e===Number:"string"==typeof t?e===String:"boolean"==typeof t?e===Boolean:"object"==typeof t&&t instanceof e}deserializeMap(t,e,r,n,i,o,s){}deserializeSet(t,e,r,n,i,o,s){}}var js=n(473);class N3Store{constructor(t,e){this._size=0,this._graphs=Object.create(null),this._id=0,this._ids=Object.create(null),this._ids["><"]=0,this._entities=Object.create(null),this._blankNodeIndex=0,e||!t||t[0]||(e=t,t=null),e=e||{},this._factory=e.factory||v,t&&this.addQuads(t)}get size(){let t=this._size;if(null!==t)return t;t=0;const e=this._graphs;let r,n;for(const i in e)for(const o in r=e[i].subjects)for(const e in n=r[o])t+=Object.keys(n[e]).length;return this._size=t}_addToIndex(t,e,r,n){const i=t[e]||(t[e]={}),o=i[r]||(i[r]={}),s=n in o;return s||(o[n]=null),!s}_removeFromIndex(t,e,r,n){const i=t[e],o=i[r];delete o[n];for(const t in o)return;delete i[r];for(const t in i)return;delete t[e]}*_findInIndex(t,e,r,n,i,o,s,a){let u,h,d;const c=!e+!r+!n>1?Object.keys(this._ids):this._entities,l=q(a,this._factory);e&&((u=t,t={})[e]=u[e]);for(const e in t){const a=c[e];if(h=t[e]){r&&((u=h,h={})[r]=u[r]);for(const t in h){const e=c[t];if(d=h[t]){const t=n?n in d?[n]:[]:Object.keys(d);for(let r=0;r<t.length;r++){const n={subject:null,predicate:null,object:null};n[i]=q(a,this._factory),n[o]=q(e,this._factory),n[s]=q(c[t[r]],this._factory),yield this._factory.quad(n.subject,n.predicate,n.object,l)}}}}}}_loop(t,e){for(const r in t)e(r)}_loopByKey0(t,e,r){let n,i;if(n=t[e])for(i in n)r(i)}_loopByKey1(t,e,r){let n,i;for(n in t)i=t[n],i[e]&&r(n)}_loopBy2Keys(t,e,r,n){let i,o,s;if((i=t[e])&&(o=i[r]))for(s in o)n(s)}_countInIndex(t,e,r,n){let i,o,s,a=0;e&&((i=t,t={})[e]=i[e]);for(const e in t)if(o=t[e]){r&&((i=o,o={})[r]=i[r]);for(const t in o)(s=o[t])&&(n?n in s&&a++:a+=Object.keys(s).length)}return a}_getGraphs(t){if(!xs(t))return this._graphs;const e={};return e[t]=this._graphs[t],e}_uniqueEntities(t){const e=Object.create(null);return r=>{r in e||(e[r]=!0,t(q(this._entities[r],this._factory)))}}add(t){return this.addQuad(t),this}addQuad(t,e,r,n){e||(n=t.graph,r=t.object,e=t.predicate,t=t.subject),t=_(t),e=_(e),r=_(r),n=_(n);let i=this._graphs[n];i||(i=this._graphs[n]={subjects:{},predicates:{},objects:{}},Object.freeze(i));const o=this._ids,s=this._entities;t=o[t]||(o[s[++this._id]=t]=this._id),e=o[e]||(o[s[++this._id]=e]=this._id),r=o[r]||(o[s[++this._id]=r]=this._id);const a=this._addToIndex(i.subjects,t,e,r);return this._addToIndex(i.predicates,e,r,t),this._addToIndex(i.objects,r,t,e),this._size=null,a}addQuads(t){for(let e=0;e<t.length;e++)this.addQuad(t[e])}delete(t){return this.removeQuad(t),this}has(t,e,r,n){return t&&t.subject&&({subject:t,predicate:e,object:r,graph:n}=t),!this.readQuads(t,e,r,n).next().done}import(t){return t.on("data",(t=>{this.addQuad(t)})),t}removeQuad(t,e,r,n){e||(n=t.graph,r=t.object,e=t.predicate,t=t.subject),t=_(t),e=_(e),r=_(r),n=_(n);const i=this._ids,o=this._graphs;let s,a,u;if(!((t=i[t])&&(e=i[e])&&(r=i[r])&&(s=o[n])&&(a=s.subjects[t])&&(u=a[e])&&r in u))return!1;for(t in this._removeFromIndex(s.subjects,t,e,r),this._removeFromIndex(s.predicates,e,r,t),this._removeFromIndex(s.objects,r,t,e),null!==this._size&&this._size--,s.subjects)return!0;return delete o[n],!0}removeQuads(t){for(let e=0;e<t.length;e++)this.removeQuad(t[e])}remove(t){return t.on("data",(t=>{this.removeQuad(t)})),t}removeMatches(t,e,r,n){const i=new js.Readable({objectMode:!0});return i._read=()=>{for(const o of this.readQuads(t,e,r,n))i.push(o);i.push(null)},this.remove(i)}deleteGraph(t){return this.removeMatches(null,null,null,t)}getQuads(t,e,r,n){return[...this.readQuads(t,e,r,n)]}*readQuads(t,e,r,n){t=t&&_(t),e=e&&_(e),r=r&&_(r),n=n&&_(n);const i=this._getGraphs(n),o=this._ids;let s,a,u,h;if(!(xs(t)&&!(a=o[t])||xs(e)&&!(u=o[e])||xs(r)&&!(h=o[r])))for(const t in i)(s=i[t])&&(a?h?yield*this._findInIndex(s.objects,h,a,u,"object","subject","predicate",t,null,!0):yield*this._findInIndex(s.subjects,a,u,null,"subject","predicate","object",t,null,!0):u?yield*this._findInIndex(s.predicates,u,h,null,"predicate","object","subject",t,null,!0):h?yield*this._findInIndex(s.objects,h,null,null,"object","subject","predicate",t,null,!0):yield*this._findInIndex(s.subjects,null,null,null,"subject","predicate","object",t,null,!0))}match(t,e,r,n){return new DatasetCoreAndReadableStream(this,t,e,r,n)}countQuads(t,e,r,n){t=t&&_(t),e=e&&_(e),r=r&&_(r),n=n&&_(n);const i=this._getGraphs(n),o=this._ids;let s,a,u,h,d=0;if(xs(t)&&!(a=o[t])||xs(e)&&!(u=o[e])||xs(r)&&!(h=o[r]))return 0;for(const n in i)(s=i[n])&&(d+=t?r?this._countInIndex(s.objects,h,a,u):this._countInIndex(s.subjects,a,u,h):e?this._countInIndex(s.predicates,u,h,a):this._countInIndex(s.objects,h,a,u));return d}forEach(t,e,r,n,i){this.some((e=>(t(e),!1)),e,r,n,i)}every(t,e,r,n,i){let o=!1;const s=!this.some((e=>(o=!0,!t(e))),e,r,n,i);return o&&s}some(t,e,r,n,i){for(const o of this.readQuads(e,r,n,i))if(t(o))return!0;return!1}getSubjects(t,e,r){const n=[];return this.forSubjects((t=>{n.push(t)}),t,e,r),n}forSubjects(t,e,r,n){e=e&&_(e),r=r&&_(r),n=n&&_(n);const i=this._ids,o=this._getGraphs(n);let s,a,u;if(t=this._uniqueEntities(t),!(xs(e)&&!(a=i[e])||xs(r)&&!(u=i[r])))for(n in o)(s=o[n])&&(a?u?this._loopBy2Keys(s.predicates,a,u,t):this._loopByKey1(s.subjects,a,t):u?this._loopByKey0(s.objects,u,t):this._loop(s.subjects,t))}getPredicates(t,e,r){const n=[];return this.forPredicates((t=>{n.push(t)}),t,e,r),n}forPredicates(t,e,r,n){e=e&&_(e),r=r&&_(r),n=n&&_(n);const i=this._ids,o=this._getGraphs(n);let s,a,u;if(t=this._uniqueEntities(t),!(xs(e)&&!(a=i[e])||xs(r)&&!(u=i[r])))for(n in o)(s=o[n])&&(a?u?this._loopBy2Keys(s.objects,u,a,t):this._loopByKey0(s.subjects,a,t):u?this._loopByKey1(s.predicates,u,t):this._loop(s.predicates,t))}getObjects(t,e,r){const n=[];return this.forObjects((t=>{n.push(t)}),t,e,r),n}forObjects(t,e,r,n){e=e&&_(e),r=r&&_(r),n=n&&_(n);const i=this._ids,o=this._getGraphs(n);let s,a,u;if(t=this._uniqueEntities(t),!(xs(e)&&!(a=i[e])||xs(r)&&!(u=i[r])))for(n in o)(s=o[n])&&(a?u?this._loopBy2Keys(s.subjects,a,u,t):this._loopByKey1(s.objects,a,t):u?this._loopByKey0(s.predicates,u,t):this._loop(s.objects,t))}getGraphs(t,e,r){const n=[];return this.forGraphs((t=>{n.push(t)}),t,e,r),n}forGraphs(t,e,r,n){for(const i in this._graphs)this.some((e=>(t(e.graph),!0)),e,r,n,i)}createBlankNode(t){let e,r;if(t)for(e=t=`_:${t}`,r=1;this._ids[e];)e=t+r++;else do{e="_:b"+this._blankNodeIndex++}while(this._ids[e]);return this._ids[e]=++this._id,this._entities[this._id]=e,this._factory.blankNode(e.substr(2))}extractLists({remove:t=!1,ignoreErrors:e=!1}={}){const r={},n=e?()=>!0:(t,e)=>{throw new Error(`${t.value} ${e}`)},i=this.getQuads(null,c.rdf.rest,c.rdf.nil,null),o=t?[...i]:[];return i.forEach((e=>{const i=[];let s,a,u=!1;const h=e.graph;let d=e.subject;for(;d&&!u;){const t=this.getQuads(null,null,d,null),e=this.getQuads(d,null,null,null);let r,l=null,f=null,p=null;for(let i=0;i<e.length&&!u;i++)r=e[i],r.graph.equals(h)?s?u=n(d,"has non-list arcs out"):r.predicate.value===c.rdf.first?l?u=n(d,"has multiple rdf:first arcs"):o.push(l=r):r.predicate.value===c.rdf.rest?f?u=n(d,"has multiple rdf:rest arcs"):o.push(f=r):t.length?u=n(d,"can't be subject and object"):(s=r,a="subject"):u=n(d,"not confined to single graph");for(let e=0;e<t.length&&!u;++e)r=t[e],s?u=n(d,"can't have coreferences"):r.predicate.value===c.rdf.rest?p?u=n(d,"has incoming rdf:rest arcs"):p=r:(s=r,a="object");l?i.unshift(l.object):u=n(d,"has no list head"),d=p&&p.subject}u?t=!1:s&&(r[s[a].value]=i)})),t&&this.removeQuads(o),r}*[Symbol.iterator](){yield*this.readQuads()}}function xs(t){return"string"==typeof t||t instanceof String}class DatasetCoreAndReadableStream extends js.Readable{constructor(t,e,r,n,i){super({objectMode:!0}),Object.assign(this,{n3Store:t,subject:e,predicate:r,object:n,graph:i})}get filtered(){if(!this._filtered){const{n3Store:t,graph:e,object:r,predicate:n,subject:i}=this,o=t.getQuads(i,n,r,e);this._filtered=new N3Store(o,{factory:t._factory})}return this._filtered}get size(){return this.filtered.size}_read(){for(const t of this)this.push(t);this.push(null)}add(t){return this.filtered.add(t)}delete(t){return this.filtered.delete(t)}has(t){return this.filtered.has(t)}match(t,e,r,n){return new DatasetCoreAndReadableStream(this.filtered,t,e,r,n)}*[Symbol.iterator](){yield*this._filtered||this.n3Store.readQuads(this.subject,this.predicate,this.object,this.graph)}}const Is=v.defaultGraph(),{rdf:Ls,xsd:Bs}=c,Us=/["\\\t\n\r\b\f\u0000-\u0019\ud800-\udbff]/,Ns=/["\\\t\n\r\b\f\u0000-\u0019]|[\ud800-\udbff][\udc00-\udfff]/g,Ds={"\\":"\\\\",'"':'\\"',"\t":"\\t","\n":"\\n","\r":"\\r","\b":"\\b","\f":"\\f"};class SerializedTerm extends Term{equals(){return!1}}class N3Writer{constructor(t,e){if(this._prefixRegex=/$0^/,t&&"function"!=typeof t.write&&(e=t,t=null),e=e||{},this._lists=e.lists,t)this._outputStream=t,this._endStream=void 0===e.end||!!e.end;else{let t="";this._outputStream={write(e,r,n){t+=e,n&&n()},end:e=>{e&&e(null,t)}},this._endStream=!0}this._subject=null,/triple|quad/i.test(e.format)?(this._lineMode=!0,this._writeQuad=this._writeQuadLine):(this._lineMode=!1,this._graph=Is,this._prefixIRIs=Object.create(null),e.prefixes&&this.addPrefixes(e.prefixes),e.baseIRI&&(this._baseMatcher=new RegExp(`^${Ms(e.baseIRI)}${e.baseIRI.endsWith("/")?"":"[#?]"}`),this._baseLength=e.baseIRI.length))}get _inDefaultGraph(){return Is.equals(this._graph)}_write(t,e){this._outputStream.write(t,"utf8",e)}_writeQuad(t,e,r,n,i){try{n.equals(this._graph)||(this._write((null===this._subject?"":this._inDefaultGraph?".\n":"\n}\n")+(Is.equals(n)?"":`${this._encodeIriOrBlank(n)} {\n`)),this._graph=n,this._subject=null),t.equals(this._subject)?e.equals(this._predicate)?this._write(`, ${this._encodeObject(r)}`,i):this._write(`;\n ${this._encodePredicate(this._predicate=e)} ${this._encodeObject(r)}`,i):this._write(`${(null===this._subject?"":".\n")+this._encodeSubject(this._subject=t)} ${this._encodePredicate(this._predicate=e)} ${this._encodeObject(r)}`,i)}catch(t){i&&i(t)}}_writeQuadLine(t,e,r,n,i){delete this._prefixMatch,this._write(this.quadToString(t,e,r,n),i)}quadToString(t,e,r,n){return`${this._encodeSubject(t)} ${this._encodeIriOrBlank(e)} ${this._encodeObject(r)}${n&&n.value?` ${this._encodeIriOrBlank(n)} .\n`:" .\n"}`}quadsToString(t){return t.map((t=>this.quadToString(t.subject,t.predicate,t.object,t.graph))).join("")}_encodeSubject(t){return"Quad"===t.termType?this._encodeQuad(t):this._encodeIriOrBlank(t)}_encodeIriOrBlank(t){if("NamedNode"!==t.termType)return this._lists&&t.value in this._lists&&(t=this.list(this._lists[t.value])),"id"in t?t.id:`_:${t.value}`;let e=t.value;this._baseMatcher&&this._baseMatcher.test(e)&&(e=e.substr(this._baseLength)),Us.test(e)&&(e=e.replace(Ns,As));const r=this._prefixRegex.exec(e);return r?r[1]?this._prefixIRIs[r[1]]+r[2]:e:`<${e}>`}_encodeLiteral(t){let e=t.value;if(Us.test(e)&&(e=e.replace(Ns,As)),t.language)return`"${e}"@${t.language}`;if(this._lineMode){if(t.datatype.value===Bs.string)return`"${e}"`}else switch(t.datatype.value){case Bs.string:return`"${e}"`;case Bs.boolean:if("true"===e||"false"===e)return e;break;case Bs.integer:if(/^[+-]?\d+$/.test(e))return e;break;case Bs.decimal:if(/^[+-]?\d*\.\d+$/.test(e))return e;break;case Bs.double:if(/^[+-]?(?:\d+\.\d*|\.?\d+)[eE][+-]?\d+$/.test(e))return e}return`"${e}"^^${this._encodeIriOrBlank(t.datatype)}`}_encodePredicate(t){return t.value===Ls.type?"a":this._encodeIriOrBlank(t)}_encodeObject(t){switch(t.termType){case"Quad":return this._encodeQuad(t);case"Literal":return this._encodeLiteral(t);default:return this._encodeIriOrBlank(t)}}_encodeQuad({subject:t,predicate:e,object:r,graph:n}){return`<<${this._encodeSubject(t)} ${this._encodePredicate(e)} ${this._encodeObject(r)}${l(n)?"":` ${this._encodeIriOrBlank(n)}`}>>`}_blockedWrite(){throw new Error("Cannot write because the writer has been closed.")}addQuad(t,e,r,n,i){void 0===r?this._writeQuad(t.subject,t.predicate,t.object,t.graph,e):"function"==typeof n?this._writeQuad(t,e,r,Is,n):this._writeQuad(t,e,r,n||Is,i)}addQuads(t){for(let e=0;e<t.length;e++)this.addQuad(t[e])}addPrefix(t,e,r){const n={};n[t]=e,this.addPrefixes(n,r)}addPrefixes(t,e){if(!this._prefixIRIs)return e&&e();let r=!1;for(let e in t){let n=t[e];"string"!=typeof n&&(n=n.value),r=!0,null!==this._subject&&(this._write(this._inDefaultGraph?".\n":"\n}\n"),this._subject=null,this._graph=""),this._prefixIRIs[n]=e+=":",this._write(`@prefix ${e} <${n}>.\n`)}if(r){let t="",e="";for(const r in this._prefixIRIs)t+=t?`|${r}`:r,e+=(e?"|":"")+this._prefixIRIs[r];t=Ms(t),this._prefixRegex=new RegExp(`^(?:${e})[^/]*$|^(${t})([a-zA-Z][\\-_a-zA-Z0-9]*)$`)}this._write(r?"\n":"",e)}blank(t,e){let r,n,i=t;switch(void 0===t?i=[]:t.termType?i=[{predicate:t,object:e}]:"length"in t||(i=[t]),n=i.length){case 0:return new SerializedTerm("[]");case 1:if(r=i[0],!(r.object instanceof SerializedTerm))return new SerializedTerm(`[ ${this._encodePredicate(r.predicate)} ${this._encodeObject(r.object)} ]`);default:let e="[";for(let o=0;o<n;o++)r=i[o],r.predicate.equals(t)?e+=`, ${this._encodeObject(r.object)}`:(e+=`${(o?";\n ":"\n ")+this._encodePredicate(r.predicate)} ${this._encodeObject(r.object)}`,t=r.predicate);return new SerializedTerm(`${e}\n]`)}}list(t){const e=t&&t.length||0,r=new Array(e);for(let n=0;n<e;n++)r[n]=this._encodeObject(t[n]);return new SerializedTerm(`(${r.join(" ")})`)}end(t){null!==this._subject&&(this._write(this._inDefaultGraph?".\n":"\n}\n"),this._subject=null),this._write=this._blockedWrite;let e=t&&((r,n)=>{e=null,t(r,n)});if(this._endStream)try{return this._outputStream.end(e)}catch(t){}e&&e()}}function As(t){let e=Ds[t];return void 0===e&&(1===t.length?(e=t.charCodeAt(0).toString(16),e="\\u0000".substr(0,6-e.length)+e):(e=(1024*(t.charCodeAt(0)-55296)+t.charCodeAt(1)+9216).toString(16),e="\\U00000000".substr(0,10-e.length)+e)),e}function Ms(t){return t.replace(/[\]\/\(\)\*\+\?\.\\\$]/g,"\\$&")}const Cs={geo:"http://www.w3.org/2003/01/geo/wgs84_pos#",schema:"http://schema.org/",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",vcard:"http://www.w3.org/2006/vcard/ns#",owl:"http://www.w3.org/2002/07/owl#",time:"http://www.w3.org/2006/time#",dcterms:"http://purl.org/dc/terms/",dcmi:"http://purl.org/dc/terms/",dqm:"http://purl.org/dqm-vocabulary/v1/dqm#",foaf:"http://xmlns.com/foaf/0.1/",qudt:"http://qudt.org/schema/qudt/",qudt_unit:"http://qudt.org/vocab/unit/",quantitykind:"http://qudt.org/vocab/quantitykind/",sosa:"http://www.w3.org/ns/sosa/",ssn:"http://www.w3.org/ns/ssn/",ssns:"http://www.w3.org/ns/ssn/systems/",openhps:"http://openhps.org/terms#",ogc:"http://www.opengis.net/ont/geosparql#"};var ks,Ps=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):function(t){return t instanceof r?t:new r((function(e){e(t)}))}(t.value).then(s,a)}u((n=n.apply(t,e||[])).next())}))};class RDFSerializer extends a.DataSerializer{static get options(){return{serializer:new InternalRDFSerializer,deserializer:new InternalRDFDeserializer}}static registerRDFType(t){const e=this.getMetadata(t);if(!e.options||!e.options.rdf)return;const r=e.options.rdf;r.predicates&&Object.entries(r.predicates).filter((([t,e])=>t===Ss.type)).map((([t,e])=>e.flat())).flat().forEach((e=>{var r;const n=null!==(r=this.knownRDFTypes.get(e))&&void 0!==r?r:[];n.push(t.name),this.knownRDFTypes.set(e,n)}))}static serialize(t,e){return super.serialize(t,Object.assign({rdf:{baseUri:e}},this.options))}static deserializeFromStore(t,e){const r=function t(e,r){return{termType:e.termType,value:e.value,predicates:Object.assign({},r.getPredicates(e,null,null).map((n=>({[n.value]:r.getObjects(e,n,null).map((e=>"BlankNode"===e.constructor.name||"NamedNode"===e.constructor.name?t(e,r):e))}))).reduce(((t,e)=>Object.assign(Object.assign({},t),e)),{}))}}(t,e);return this.deserialize(r)}static serializeToQuads(t,e){const r=void 0!==t.predicates?t:this.serialize(t,e),n="BlankNode"===r.termType?v.blankNode(r.value):v.namedNode(r.value);return Object.keys(r.predicates).map((t=>{const e=v.namedNode(t);return r.predicates[t].map((t=>void 0!==t.predicates?[v.quad(n,e,t),...this.serializeToQuads(t)]:[v.quad(n,e,t)]))})).flat().flat()}static stringify(t,e={}){return Ps(this,void 0,void 0,(function*(){return new Promise(((r,n)=>{const i=this.serializeToQuads(t,e.baseUri),o=new N3Store(i),s=Object.assign({xsd:"http://www.w3.org/2001/XMLSchema#"},Cs),a=Object.keys(s).map((t=>({[s[t]]:t}))).reduce(((t,e)=>Object.assign(Object.assign({},t),e))),u={};i.map((t=>{[t.subject.value,t.predicate.value,"NamedNode"===t.object.termType?t.object.termType:"Literal"===t.object.termType?t.object.datatype.value:t.object.value].map((t=>{Object.keys(a).forEach((e=>{t.includes(e)&&(u[a[e]]=e)}))}))})),e.prefixes=Object.assign(Object.assign({},u),e.prefixes);const h=new N3Writer(e);e.prettyPrint?o.getSubjects(null,null,null).forEach((t=>{"BlankNode"!==t.termType&&o.getPredicates(t,null,null).forEach((e=>{o.getObjects(t,e,null).forEach((r=>{"BlankNode"===r.termType?h.addQuad(t,e,this.writeBlankNode(h,r,o)):h.addQuad(t,e,r)}))}))})):h.addQuads(i),h.end(((t,e)=>{if(t)return n(t);r(e)}))}))}))}static writeBlankNode(t,e,r){const n=r.getPredicates(e,null,null);return t.blank(n.map((n=>r.getObjects(e,n,null).map((e=>"BlankNode"===e.termType?{predicate:n,object:this.writeBlankNode(t,e,r)}:{predicate:n,object:e})))).flat())}static deserialize(t,e){if(void 0===t.predicates)return super.deserialize(t,e);const r=new InternalRDFDeserializer,n=null!=e?e:r.rdfTypeResolver(t,this.knownTypes,this.knownRDFTypes);return n===Object?t:r.convertSingleValue(t,this.ensureTypeDescriptor(n),this.knownTypes,void 0,void 0,{rdf:{knownTypes:this.knownRDFTypes}})}static getUriMetadata(t){const e=a.DataSerializer.getMetadata(t),r=a.DataSerializer.getRootMetadata(t);if(!(e.options&&e.options.rdf?e.options.rdf:r.options&&r.options.rdf?r.options.rdf:void 0))return;const n=Array.from(e.dataMembers.values()).filter((t=>t&&t.options&&t.options.rdf&&t.options.rdf.identifier))[0];return n}static normalizeUri(t,e,r){const n=this.getUriMetadata(t);let i;if(!n)return r;{const o=n.options.rdf;i=o.serializer?o.serializer(e,t):e,i=i&&!i.startsWith("http")&&r?r+i:v.blankNode(i).value}}}ks=RDFSerializer,RDFSerializer.knownRDFTypes=new Map,ks.eventEmitter.on("updateSerializableObject",((t,e)=>{if(e&&e.rdf&&e.rdf.type){e.rdf.predicates=e.rdf.predicates||{};const t=e.rdf.predicates[Ss.type]||[];t.push(e.rdf.type),e.rdf.predicates[Ss.type]=t}})),ks.eventEmitter.on("registerType",(t=>{RDFSerializer.registerRDFType(t)}));var zs=function(t,e,r,n){var i,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(o<3?i(s):o>3?i(e,r,s):i(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},$s=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let Qs=class ObservableProperty{};zs([(0,a.SerializableMember)({rdf:{predicate:Es.label,language:"en"}}),$s("design:type",String)],Qs.prototype,"label",void 0),Qs=zs([(0,a.SerializableObject)({rdf:{type:Ts.ObservableProperty}})],Qs);var Fs=function(t,e,r,n){var i,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(o<3?i(s):o>3?i(e,r,s):i(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Vs=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let Ks=class Observation{};Fs([(0,a.SerializableMember)({rdf:{predicate:Ts.phenomenonTime}}),Vs("design:type",Date)],Ks.prototype,"phenomenonTime",void 0),Fs([(0,a.SerializableMember)({rdf:{predicate:Ts.resultTime}}),Vs("design:type",Date)],Ks.prototype,"resultTime",void 0),Fs([(0,a.SerializableArrayMember)(Qs,{rdf:{predicate:Ts.observedProperty}}),Vs("design:type",Array)],Ks.prototype,"observedProperties",void 0),Ks=Fs([(0,a.SerializableObject)({rdf:{type:Ts.Observation,serializer:t=>({value:`${t.observedProperties[0]}/${t.phenomenonTime.getTime()}`})}})],Ks);var Ws=function(t,e,r,n){var i,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(o<3?i(s):o>3?i(e,r,s):i(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Gs=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let Hs=class FeatureOfInterest{};Ws([(0,a.SerializableMember)({rdf:{predicate:Es.label,language:"en"}}),Gs("design:type",String)],Hs.prototype,"label",void 0),Ws([(0,a.SerializableArrayMember)(Qs,{rdf:{predicate:Rs.hasProperty}}),Gs("design:type",Array)],Hs.prototype,"properties",void 0),Hs=Ws([(0,a.SerializableObject)({rdf:{type:Ts.FeatureOfInterest}})],Hs);var Xs=function(t,e,r,n){var i,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(o<3?i(s):o>3?i(e,r,s):i(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Ys=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let Js=class QuantityValue{};Xs([(0,a.SerializableMember)({rdf:{predicate:Os.numericValue,datatype:T.double}}),Ys("design:type",Number)],Js.prototype,"value",void 0),Xs([(0,a.SerializableMember)({rdf:{predicate:Os.unit}}),Ys("design:type",a.Unit)],Js.prototype,"unit",void 0),Js=Xs([(0,a.SerializableObject)({rdf:{type:Os.QuantityValue}})],Js)})(),i})()}));
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@openhps/core")):"function"==typeof define&&define.amd?define("OpenHPS",["core"],t):"object"==typeof exports?exports.OpenHPS=t(require("@openhps/core")):(e.OpenHPS=e.OpenHPS||{},e.OpenHPS.rdf=t(e.OpenHPS.core))}("undefined"!=typeof self?self:this,(function(e){return(()=>{var t={742:(e,t)=>{"use strict";t.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=u(e),s=o[0],a=o[1],l=new i(function(e,t,r){return 3*(t+r)/4-r}(0,s,a)),f=0,c=a>0?s-4:s;for(r=0;r<c;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],l[f++]=t>>16&255,l[f++]=t>>8&255,l[f++]=255&t;2===a&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,l[f++]=255&t);1===a&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,l[f++]=t>>8&255,l[f++]=255&t);return l},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=16383,a=0,u=n-i;a<u;a+=s)o.push(l(e,a,a+s>u?u:a+s));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s<a;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,n){for(var i,o,s=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},764:(e,t,r)=>{"use strict";const n=r(742),i=r(645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|g(e,t);let n=a(r);const i=n.write(e,t);i!==r&&(n=n.slice(0,i));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(K(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(K(e,ArrayBuffer)||e&&K(e.buffer,ArrayBuffer))return d(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(K(e,SharedArrayBuffer)||e&&K(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);const i=function(e){if(u.isBuffer(e)){const t=0|p(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||X(e.length)?a(0):h(e);if("Buffer"===e.type&&Array.isArray(e.data))return h(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return f(e),a(e<0?0:0|p(e))}function h(e){const t=e.length<0?0:0|p(e.length),r=a(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function d(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,u.prototype),n}function p(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function g(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||K(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return H(e).length;default:if(i)return n?-1:G(e).length;t=(""+t).toLowerCase(),i=!0}}function y(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return k(this,t,r);case"utf8":case"utf-8":return T(this,t,r);case"ascii":return x(this,t,r);case"latin1":case"binary":return L(this,t,r);case"base64":return R(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function b(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function w(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),X(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:m(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,n,i){let o,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}function l(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){let n=-1;for(o=r;o<a;o++)if(l(e,o)===l(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===u)return n*s}else-1!==n&&(o-=o-n),n=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){let r=!0;for(let n=0;n<u;n++)if(l(e,o+n)!==l(t,n)){r=!1;break}if(r)return o}return-1}function _(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=t.length;let s;for(n>o/2&&(n=o/2),s=0;s<n;++s){const n=parseInt(t.substr(2*s,2),16);if(X(n))return s;e[r+s]=n}return s}function v(e,t,r,n){return V(G(t,e.length-r),e,r,n)}function S(e,t,r,n){return V(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function E(e,t,r,n){return V(H(t),e,r,n)}function j(e,t,r,n){return V(function(e,t){let r,n,i;const o=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function R(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function T(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i<r;){const t=e[i];let o=null,s=t>239?4:t>223?3:t>191?2:1;if(i+s<=r){let r,n,a,u;switch(s){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(o=u));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(e){const t=e.length;if(t<=O)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=O));return r}(n)}t.kMaxLength=s,u.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return function(e,t,r){return f(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},u.allocUnsafe=function(e){return c(e)},u.allocUnsafeSlow=function(e){return c(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(K(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),K(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=u.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if(K(t,Uint8Array))i+t.length>n.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},u.byteLength=g,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)b(this,t,t+1);return this},u.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)b(this,t,t+3),b(this,t+1,t+2);return this},u.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)b(this,t,t+7),b(this,t+1,t+6),b(this,t+2,t+5),b(this,t+3,t+4);return this},u.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?T(this,0,e):y.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(K(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0);const a=Math.min(o,s),l=this.slice(n,i),f=e.slice(t,r);for(let e=0;e<a;++e)if(l[e]!==f[e]){o=l[e],s=f[e];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return w(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return w(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return _(this,e,t,r);case"utf8":case"utf-8":return v(this,e,t,r);case"ascii":case"latin1":case"binary":return S(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const O=4096;function x(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function L(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function k(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=Y[e[n]];return i}function I(e,t,r){const n=e.slice(t,r);let i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function B(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function A(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function M(e,t,r,n,i){q(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function N(e,t,r,n,i){q(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function P(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function C(e,t,r,n,o){return t=+t,r>>>=0,o||P(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function D(e,t,r,n,o){return t=+t,r>>>=0,o||P(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||B(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||B(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||B(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=J((function(e){F(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||Q(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),u.prototype.readBigUInt64BE=J((function(e){F(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||Q(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||B(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||B(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return e>>>=0,t||B(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||B(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||B(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=J((function(e){F(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||Q(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),u.prototype.readBigInt64BE=J((function(e){F(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||Q(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),u.prototype.readFloatLE=function(e,t){return e>>>=0,t||B(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||B(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||B(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||B(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){A(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){A(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||A(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||A(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||A(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||A(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||A(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=J((function(e,t=0){return M(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=J((function(e,t=0){return N(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);A(this,e,t,r,n-1,-n)}let i=0,o=1,s=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);A(this,e,t,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||A(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||A(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||A(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||A(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||A(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=J((function(e,t=0){return M(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=J((function(e,t=0){return N(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(e,t,r){return C(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return C(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return D(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return D(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const o=u.isBuffer(e)?e:u.from(e,n),s=o.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=o[i%s]}return this};const U={};function $(e,t,r){U[e]=class NodeError extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function z(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function q(e,t,r,n,i,o){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=o>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new U.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){F(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||Q(t,e.length-(r+1))}(n,i,o)}function F(e,t){if("number"!=typeof e)throw new U.ERR_INVALID_ARG_TYPE(t,"number",e)}function Q(e,t,r){if(Math.floor(e)!==e)throw F(e,r),new U.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new U.ERR_BUFFER_OUT_OF_BOUNDS;throw new U.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}$("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),$("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),$("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=z(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=z(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function G(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let s=0;s<n;++s){if(r=e.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function H(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function K(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function X(e){return e!=e}const Y=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function J(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},187:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}g(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&g(e,"error",t,r)}(e,i,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function l(e,t,r,n){var i,o,s,l;if(a(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=u(e))>0&&s.length>i&&!s.warned){s.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=e,f.type=t,f.count=s.length,l=f,console&&console.warn&&console.warn(l)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function c(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=f.bind(n);return i.listener=r,n.wrapFn=i,i}function h(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):p(i,i.length)}function d(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function g(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){n.once&&e.removeEventListener(t,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)n(u,this,t);else{var l=u.length,f=p(u,l);for(r=0;r<l;++r)n(f[r],this,t)}return!0},o.prototype.addListener=function(e,t){return l(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return l(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,c(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,c(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,i,o,s;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},o.prototype.listenerCount=d,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},645:(e,t)=>{t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,l=u>>1,f=-7,c=r?i-1:0,h=r?-1:1,d=e[t+c];for(c+=h,o=d&(1<<-f)-1,d>>=-f,f+=a;f>0;o=256*o+e[t+c],c+=h,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+e[t+c],c+=h,f-=8);if(0===o)o=1-l;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=l}return(d?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,u,l=8*o-i-1,f=(1<<l)-1,c=f>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=f):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+c>=1?h/u:h*Math.pow(2,1-c))*u>=2&&(s++,u/=2),s+c>=f?(a=0,s=f):s+c>=1?(a=(t*u-1)*Math.pow(2,i),s+=c):(a=t*Math.pow(2,c-1)*Math.pow(2,i),s=0));i>=8;e[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<<i|a,l+=i;l>0;e[r+d]=255&s,d+=p,s/=256,l-=8);e[r+d-p]|=128*g}},717:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},281:e=>{"use strict";var t={};function r(e,r,n){n||(n=Error);var i=function(e){var t,n;function i(t,n,i){return e.call(this,function(e,t,n){return"string"==typeof r?r:r(e,t,n)}(t,n,i))||this}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=e,t[e]=i}function n(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}r("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,o,s,a;if("string"==typeof t&&(o="not ",t.substr(!s||s<0?0:+s,o.length)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))a="The ".concat(e," ").concat(i," ").concat(n(t,"type"));else{var u=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(u," ").concat(i," ").concat(n(t,"type"))}return a+=". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},753:(e,t,r)=>{"use strict";var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=l;var i=r(481),o=r(229);r(717)(l,i);for(var s=n(o.prototype),a=0;a<s.length;a++){var u=s[a];l.prototype[u]||(l.prototype[u]=o.prototype[u])}function l(e){if(!(this instanceof l))return new l(e);i.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",f)))}function f(){this._writableState.ended||process.nextTick(c,this)}function c(e){e.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(l.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(l.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},725:(e,t,r)=>{"use strict";e.exports=i;var n=r(605);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r(717)(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},481:(e,t,r)=>{"use strict";var n;e.exports=j,j.ReadableState=E;r(187).EventEmitter;var i=function(e,t){return e.listeners(t).length},o=r(503),s=r(764).Buffer,a=r.g.Uint8Array||function(){};var u,l=r(616);u=l&&l.debuglog?l.debuglog("stream"):function(){};var f,c,h,d=r(327),p=r(195),g=r(457).getHighWaterMark,y=r(281).q,b=y.ERR_INVALID_ARG_TYPE,w=y.ERR_STREAM_PUSH_AFTER_EOF,m=y.ERR_METHOD_NOT_IMPLEMENTED,_=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(717)(j,o);var v=p.errorOrDestroy,S=["error","close","destroy","pause","resume"];function E(e,t,i){n=n||r(753),e=e||{},"boolean"!=typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=g(this,e,"readableHighWaterMark",i),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=r(553).s),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function j(e){if(n=n||r(753),!(this instanceof j))return new j(e);var t=this instanceof n;this._readableState=new E(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),o.call(this)}function R(e,t,r,n,i){u("readableAddChunk",t);var o,l=e._readableState;if(null===t)l.reading=!1,function(e,t){if(u("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?L(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,k(e)))}(e,l);else if(i||(o=function(e,t){var r;n=t,s.isBuffer(n)||n instanceof a||"string"==typeof t||void 0===t||e.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(l,t)),o)v(e,o);else if(l.objectMode||t&&t.length>0)if("string"==typeof t||l.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),n)l.endEmitted?v(e,new _):T(e,l,t,!0);else if(l.ended)v(e,new w);else{if(l.destroyed)return!1;l.reading=!1,l.decoder&&!r?(t=l.decoder.write(t),l.objectMode||0!==t.length?T(e,l,t,!1):I(e,l)):T(e,l,t,!1)}else n||(l.reading=!1,I(e,l));return!l.ended&&(l.length<l.highWaterMark||0===l.length)}function T(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&L(e)),I(e,t)}Object.defineProperty(j.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),j.prototype.destroy=p.destroy,j.prototype._undestroy=p.undestroy,j.prototype._destroy=function(e,t){t(e)},j.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=s.from(e,t),t=""),r=!0),R(this,e,t,!1,r)},j.prototype.unshift=function(e){return R(this,e,null,!0,!1)},j.prototype.isPaused=function(){return!1===this._readableState.flowing},j.prototype.setEncoding=function(e){f||(f=r(553).s);var t=new f(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var O=1073741824;function x(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=O?e=O:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function L(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(k,e))}function k(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,P(e)}function I(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(B,e,t))}function B(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(u("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function A(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function M(e){u("readable nexttick read 0"),e.read(0)}function N(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),P(e),t.flowing&&!t.reading&&e.read(0)}function P(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function C(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function D(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(U,t,e))}function U(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function $(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}j.prototype.read=function(e){u("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?D(this):L(this),null;if(0===(e=x(e,t))&&t.ended)return 0===t.length&&D(this),null;var n,i=t.needReadable;return u("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&u("length less than watermark",i=!0),t.ended||t.reading?u("reading or ended",i=!1):i&&(u("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=x(r,t))),null===(n=e>0?C(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&D(this)),null!==n&&this.emit("data",n),n},j.prototype._read=function(e){v(this,new m("_read()"))},j.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,u("pipe count=%d opts=%j",n.pipesCount,t);var o=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr?a:g;function s(t,i){u("onunpipe"),t===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,u("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),e.removeListener("drain",l),e.removeListener("error",h),e.removeListener("unpipe",s),r.removeListener("end",a),r.removeListener("end",g),r.removeListener("data",c),f=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function a(){u("onend"),e.end()}n.endEmitted?process.nextTick(o):r.once("end",o),e.on("unpipe",s);var l=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&i(e,"data")&&(t.flowing=!0,P(e))}}(r);e.on("drain",l);var f=!1;function c(t){u("ondata");var i=e.write(t);u("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==$(n.pipes,e))&&!f&&(u("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function h(t){u("onerror",t),g(),e.removeListener("error",h),0===i(e,"error")&&v(e,t)}function d(){e.removeListener("finish",p),g()}function p(){u("onfinish"),e.removeListener("close",d),g()}function g(){u("unpipe"),r.unpipe(e)}return r.on("data",c),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",d),e.once("finish",p),e.emit("pipe",r),n.flowing||(u("pipe resume"),r.resume()),e},j.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=$(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},j.prototype.on=function(e,t){var r=o.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,u("on readable",n.length,n.reading),n.length?L(this):n.reading||process.nextTick(M,this))),r},j.prototype.addListener=j.prototype.on,j.prototype.removeListener=function(e,t){var r=o.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(A,this),r},j.prototype.removeAllListeners=function(e){var t=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process.nextTick(A,this),t},j.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(N,e,t))}(this,e)),e.paused=!1,this},j.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},j.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(u("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(u("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<S.length;o++)e.on(S[o],this.emit.bind(this,S[o]));return this._read=function(t){u("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(j.prototype[Symbol.asyncIterator]=function(){return void 0===c&&(c=r(850)),c(this)}),Object.defineProperty(j.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(j.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(j.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),j._fromList=C,Object.defineProperty(j.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(j.from=function(e,t){return void 0===h&&(h=r(167)),h(j,e,t)})},605:(e,t,r)=>{"use strict";e.exports=f;var n=r(281).q,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(753);function l(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function f(e){if(!(this instanceof f))return new f(e);u.call(this,e),this._transformState={afterTransform:l.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",c)}function c(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush((function(t,r){h(e,t,r)}))}function h(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new a;if(e._transformState.transforming)throw new s;return e.push(null)}r(717)(f,u),f.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},f.prototype._transform=function(e,t,r){r(new i("_transform()"))},f.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},f.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},f.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,(function(e){t(e)}))}},229:(e,t,r)=>{"use strict";function n(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var i;e.exports=j,j.WritableState=E;var o={deprecate:r(927)},s=r(503),a=r(764).Buffer,u=r.g.Uint8Array||function(){};var l,f=r(195),c=r(457).getHighWaterMark,h=r(281).q,d=h.ERR_INVALID_ARG_TYPE,p=h.ERR_METHOD_NOT_IMPLEMENTED,g=h.ERR_MULTIPLE_CALLBACK,y=h.ERR_STREAM_CANNOT_PIPE,b=h.ERR_STREAM_DESTROYED,w=h.ERR_STREAM_NULL_VALUES,m=h.ERR_STREAM_WRITE_AFTER_END,_=h.ERR_UNKNOWN_ENCODING,v=f.errorOrDestroy;function S(){}function E(e,t,o){i=i||r(753),e=e||{},"boolean"!=typeof o&&(o=t instanceof i),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=c(this,e,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new g;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(process.nextTick(i,n),process.nextTick(k,e,t),e._writableState.errorEmitted=!0,v(e,n)):(i(n),e._writableState.errorEmitted=!0,v(e,n),k(e,t))}(e,r,n,t,i);else{var o=x(r)||e.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||O(e,r),n?process.nextTick(T,e,r,o,i):T(e,r,o,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}function j(e){var t=this instanceof(i=i||r(753));if(!t&&!l.call(j,this))return new j(e);this._writableState=new E(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),s.call(this)}function R(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function T(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),k(e,t)}function O(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,o=new Array(i),s=t.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)o[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;o.allBuffers=u,R(e,t,!0,t.length,o,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new n(t),t.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,f=r.encoding,c=r.callback;if(R(e,t,!1,t.objectMode?1:l.length,l,f,c),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function x(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function L(e,t){e._final((function(r){t.pendingcb--,r&&v(e,r),t.prefinished=!0,e.emit("prefinish"),k(e,t)}))}function k(e,t){var r=x(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process.nextTick(L,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}r(717)(j,s),E.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(E.prototype,"buffer",{get:o.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(j,Symbol.hasInstance,{value:function(e){return!!l.call(this,e)||this===j&&(e&&e._writableState instanceof E)}})):l=function(e){return e instanceof this},j.prototype.pipe=function(){v(this,new y)},j.prototype.write=function(e,t,r){var n,i=this._writableState,o=!1,s=!i.objectMode&&(n=e,a.isBuffer(n)||n instanceof u);return s&&!a.isBuffer(e)&&(e=function(e){return a.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=S),i.ending?function(e,t){var r=new m;v(e,r),process.nextTick(t,r)}(this,r):(s||function(e,t,r,n){var i;return null===r?i=new w:"string"==typeof r||t.objectMode||(i=new d("chunk",["string","Buffer"],r)),!i||(v(e,i),process.nextTick(n,i),!1)}(this,i,e,r))&&(i.pendingcb++,o=function(e,t,r,n,i,o){if(!r){var s=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=a.from(t,r));return t}(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var u=t.objectMode?1:n.length;t.length+=u;var l=t.length<t.highWaterMark;l||(t.needDrain=!0);if(t.writing||t.corked){var f=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},f?f.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else R(e,t,!1,u,n,i,o);return l}(this,i,s,e,t,r)),o},j.prototype.cork=function(){this._writableState.corked++},j.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||O(this,e))},j.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(j.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(j.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),j.prototype._write=function(e,t,r){r(new p("_write()"))},j.prototype._writev=null,j.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,k(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(j.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(j.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),j.prototype.destroy=f.destroy,j.prototype._undestroy=f.undestroy,j.prototype._destroy=function(e,t){t(e)}},850:(e,t,r)=>{"use strict";var n;function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=r(610),s=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),l=Symbol("ended"),f=Symbol("lastPromise"),c=Symbol("handlePromise"),h=Symbol("stream");function d(e,t){return{value:e,done:t}}function p(e){var t=e[s];if(null!==t){var r=e[h].read();null!==r&&(e[f]=null,e[s]=null,e[a]=null,t(d(r,!1)))}}function g(e){process.nextTick(p,e)}var y=Object.getPrototypeOf((function(){})),b=Object.setPrototypeOf((i(n={get stream(){return this[h]},next:function(){var e=this,t=this[u];if(null!==t)return Promise.reject(t);if(this[l])return Promise.resolve(d(void 0,!0));if(this[h].destroyed)return new Promise((function(t,r){process.nextTick((function(){e[u]?r(e[u]):t(d(void 0,!0))}))}));var r,n=this[f];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[l]?r(d(void 0,!0)):t[c](r,n)}),n)}}(n,this));else{var i=this[h].read();if(null!==i)return Promise.resolve(d(i,!1));r=new Promise(this[c])}return this[f]=r,r}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var e=this;return new Promise((function(t,r){e[h].destroy(null,(function(e){e?r(e):t(d(void 0,!0))}))}))})),n),y);e.exports=function(e){var t,r=Object.create(b,(i(t={},h,{value:e,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,l,{value:e._readableState.endEmitted,writable:!0}),i(t,c,{value:function(e,t){var n=r[h].read();n?(r[f]=null,r[s]=null,r[a]=null,e(d(n,!1))):(r[s]=e,r[a]=t)},writable:!0}),t));return r[f]=null,o(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[a];return null!==t&&(r[f]=null,r[s]=null,r[a]=null,t(e)),void(r[u]=e)}var n=r[s];null!==n&&(r[f]=null,r[s]=null,r[a]=null,n(d(void 0,!0))),r[l]=!0})),e.on("readable",g.bind(null,r)),r}},327:(e,t,r)=>{"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var s=r(764).Buffer,a=r(361).inspect,u=a&&a.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r,l;return t=e,r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return s.alloc(0);for(var t,r,n,i=s.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,r=i,n=a,s.prototype.copy.call(t,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=s.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:u,value:function(e,t){return a(this,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}],r&&o(t.prototype,r),l&&o(t,l),e}()},195:e=>{"use strict";function t(e,t){n(e,t),r(e)}function r(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function n(e,t){e.emit("error",t)}e.exports={destroy:function(e,i){var o=this,s=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return s||a?(i?i(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,e)):process.nextTick(n,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!i&&e?o._writableState?o._writableState.errorEmitted?process.nextTick(r,o):(o._writableState.errorEmitted=!0,process.nextTick(t,o,e)):process.nextTick(t,o,e):i?(process.nextTick(r,o),i(e)):process.nextTick(r,o)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},610:(e,t,r)=>{"use strict";var n=r(281).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r);r||(r={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}(o||i);var s=r.readable||!1!==r.readable&&t.readable,a=r.writable||!1!==r.writable&&t.writable,u=function(){t.writable||f()},l=t._writableState&&t._writableState.finished,f=function(){a=!1,l=!0,s||o.call(t)},c=t._readableState&&t._readableState.endEmitted,h=function(){s=!1,c=!0,a||o.call(t)},d=function(e){o.call(t,e)},p=function(){var e;return s&&!c?(t._readableState&&t._readableState.ended||(e=new n),o.call(t,e)):a&&!l?(t._writableState&&t._writableState.ended||(e=new n),o.call(t,e)):void 0},g=function(){t.req.on("finish",f)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?a&&!t._writableState&&(t.on("end",u),t.on("close",u)):(t.on("complete",f),t.on("abort",p),t.req?g():t.on("request",g)),t.on("end",h),t.on("finish",f),!1!==r.error&&t.on("error",d),t.on("close",p),function(){t.removeListener("complete",f),t.removeListener("abort",p),t.removeListener("request",g),t.req&&t.req.removeListener("finish",f),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",f),t.removeListener("end",h),t.removeListener("error",d),t.removeListener("close",p)}}},167:e=>{e.exports=function(){throw new Error("Readable.from is not available in the browser")}},946:(e,t,r)=>{"use strict";var n;var i=r(281).q,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function u(e,t,i,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var a=!1;e.on("close",(function(){a=!0})),void 0===n&&(n=r(610)),n(e,{readable:t,writable:i},(function(e){if(e)return o(e);a=!0,o()}));var u=!1;return function(t){if(!a&&!u)return u=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void o(t||new s("pipe"))}}function l(e){e()}function f(e,t){return e.pipe(t)}function c(e){return e.length?"function"!=typeof e[e.length-1]?a:e.pop():a}e.exports=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,i=c(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new o("streams");var s=t.map((function(e,r){var o=r<t.length-1;return u(e,o,r>0,(function(e){n||(n=e),e&&s.forEach(l),o||(s.forEach(l),i(n))}))}));return t.reduce(f)}},457:(e,t,r)=>{"use strict";var n=r(281).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var o=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},503:(e,t,r)=>{e.exports=r(187).EventEmitter},473:(e,t,r)=>{(t=e.exports=r(481)).Stream=t,t.Readable=t,t.Writable=r(229),t.Duplex=r(753),t.Transform=r(605),t.PassThrough=r(725),t.finished=r(610),t.pipeline=r(946)},509:(e,t,r)=>{var n=r(764),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},553:(e,t,r)=>{"use strict";var n=r(509).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.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 o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=l,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=f,this.end=c,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function f(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.s=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=s(t[n]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if((i=s(t[n]))>=0)return i>0&&(e.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if((i=s(t[n]))>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},927:(e,t,r)=>{function n(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}},0:t=>{"use strict";t.exports=e},361:()=>{},616:()=>{}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var o=r[e]={exports:{}};return t[e](o,o.exports,n),o.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{"use strict";n.r(i),n.d(i,{RDFSerializer:()=>RDFSerializer,SerializableNamedNode:()=>fe,xsd:()=>S});var e={};n.r(e),n.d(e,{Alt:()=>D,Bag:()=>P,CompoundLiteral:()=>$,HTML:()=>z,JSON__workaround:()=>W,List:()=>U,PlainLiteral:()=>F,Property:()=>M,Seq:()=>C,Statement:()=>N,XMLLiteral:()=>Q,direction:()=>A,first:()=>k,langString:()=>q,language:()=>B,nil:()=>G,object:()=>x,predicate:()=>O,rest:()=>I,subject:()=>T,type:()=>R,value:()=>L});var t=n(0);const r="http://www.w3.org/1999/02/22-rdf-syntax-ns#",o="http://www.w3.org/2001/XMLSchema#",s="http://www.w3.org/2000/10/swap/",a={xsd:{decimal:`${o}decimal`,boolean:`${o}boolean`,double:`${o}double`,integer:`${o}integer`,string:`${o}string`},rdf:{type:`${r}type`,nil:`${r}nil`,first:`${r}first`,rest:`${r}rest`,langString:`${r}langString`},owl:{sameAs:"http://www.w3.org/2002/07/owl#sameAs"},r:{forSome:`${s}reify#forSome`,forAll:`${s}reify#forAll`},log:{implies:`${s}log#implies`}};function u(e){return!!e&&"DefaultGraph"===e.termType}const{rdf:l,xsd:f}=a;let c,h=0;const d=/^"(.*".*)(?="[^"]*$)/,p=/^<<("(?:""|[^"])*"[^ ]*|[^ ]+) ("(?:""|[^"])*"[^ ]*|[^ ]+) ("(?:""|[^"])*"[^ ]*|[^ ]+) ?("(?:""|[^"])*"[^ ]*|[^ ]+)?>>$/,g={namedNode:function(e){return new NamedNode(e)},blankNode:function(e){return new BlankNode(e||"n3-"+h++)},variable:function(e){return new Variable(e)},literal:function(e,t){if("string"==typeof t)return new Literal(`"${e}"@${t.toLowerCase()}`);let r=t?t.value:"";""===r&&("boolean"==typeof e?r=f.boolean:"number"==typeof e&&(Number.isFinite(e)?r=Number.isInteger(e)?f.integer:f.double:(r=f.double,Number.isNaN(e)||(e=e>0?"INF":"-INF"))));return""===r||r===f.string?new Literal(`"${e}"`):new Literal(`"${e}"^^${r}`)},defaultGraph:function(){return c},quad:v,triple:v},y=g;class Term{constructor(e){this.id=e}get value(){return this.id}equals(e){return e instanceof Term?this.id===e.id:!!e&&this.termType===e.termType&&this.value===e.value}hashCode(){return 0}toJSON(){return{termType:this.termType,value:this.value}}}class NamedNode extends Term{get termType(){return"NamedNode"}}class Literal extends Term{get termType(){return"Literal"}get value(){return this.id.substring(1,this.id.lastIndexOf('"'))}get language(){const e=this.id;let t=e.lastIndexOf('"')+1;return t<e.length&&"@"===e[t++]?e.substr(t).toLowerCase():""}get datatype(){return new NamedNode(this.datatypeString)}get datatypeString(){const e=this.id,t=e.lastIndexOf('"')+1,r=t<e.length?e[t]:"";return"^"===r?e.substr(t+2):"@"!==r?f.string:l.langString}equals(e){return e instanceof Literal?this.id===e.id:!!e&&!!e.datatype&&this.termType===e.termType&&this.value===e.value&&this.language===e.language&&this.datatype.value===e.datatype.value}toJSON(){return{termType:this.termType,value:this.value,language:this.language,datatype:{termType:"NamedNode",value:this.datatypeString}}}}class BlankNode extends Term{constructor(e){super(`_:${e}`)}get termType(){return"BlankNode"}get value(){return this.id.substr(2)}}class Variable extends Term{constructor(e){super(`?${e}`)}get termType(){return"Variable"}get value(){return this.id.substr(1)}}function b(e,t){if(t=t||g,!e)return t.defaultGraph();switch(e[0]){case"?":return t.variable(e.substr(1));case"_":return t.blankNode(e.substr(2));case'"':if(t===g)return new Literal(e);if('"'===e[e.length-1])return t.literal(e.substr(1,e.length-2));const r=e.lastIndexOf('"',e.length-1);return t.literal(e.substr(1,r-1),"@"===e[r+1]?e.substr(r+2):t.namedNode(e.substr(r+3)));case"<":const n=p.exec(e);return t.quad(b(_(n[1]),t),b(_(n[2]),t),b(_(n[3]),t),n[4]&&b(_(n[4]),t));default:return t.namedNode(e)}}function w(e){if("string"==typeof e)return e;if(e instanceof Term&&"Quad"!==e.termType)return e.id;if(!e)return c.id;switch(e.termType){case"NamedNode":return e.value;case"BlankNode":return`_:${e.value}`;case"Variable":return`?${e.value}`;case"DefaultGraph":return"";case"Literal":return`"${e.value}"${e.language?`@${e.language}`:e.datatype&&e.datatype.value!==f.string?`^^${e.datatype.value}`:""}`;case"Quad":return`<<${m(w(e.subject))} ${m(w(e.predicate))} ${m(w(e.object))}${u(e.graph)?"":` ${w(e.graph)}`}>>`;default:throw new Error(`Unexpected termType: ${e.termType}`)}}c=new class DefaultGraph extends Term{constructor(){return super(""),c||this}get termType(){return"DefaultGraph"}equals(e){return this===e||!!e&&this.termType===e.termType}};class Quad extends Term{constructor(e,t,r,n){super(""),this._subject=e,this._predicate=t,this._object=r,this._graph=n||c}get termType(){return"Quad"}get subject(){return this._subject}get predicate(){return this._predicate}get object(){return this._object}get graph(){return this._graph}toJSON(){return{termType:this.termType,subject:this._subject.toJSON(),predicate:this._predicate.toJSON(),object:this._object.toJSON(),graph:this._graph.toJSON()}}equals(e){return!!e&&this._subject.equals(e.subject)&&this._predicate.equals(e.predicate)&&this._object.equals(e.object)&&this._graph.equals(e.graph)}}function m(e){return e.replace(d,((e,t)=>`"${t.replace(/"/g,'""')}`))}function _(e){return e.replace(d,((e,t)=>`"${t.replace(/""/g,'"')}`))}function v(e,t,r,n){return new Quad(e,t,r,n)}const S={boolean:"http://www.w3.org/2001/XMLSchema#boolean",dateTime:"http://www.w3.org/2001/XMLSchema#dateTime",date:"http://www.w3.org/2001/XMLSchema#date",time:"http://www.w3.org/2001/XMLSchema#time",decimal:"http://www.w3.org/2001/XMLSchema#decimal",anyURI:"http://www.w3.org/2001/XMLSchema#anyURI",integer:"http://www.w3.org/2001/XMLSchema#integer",string:"http://www.w3.org/2001/XMLSchema#string",double:"http://www.w3.org/2001/XMLSchema#double",langString:"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"};function E(e,t){const r=Object.assign({},e);return j(e)&&j(t)&&Object.keys(t).forEach((n=>{Array.isArray(t[n])?(r[n]=t[n],r[n].push(...e[n]||[])):j(t[n])?n in e?r[n]=E(e[n],t[n]):Object.assign(r,{[n]:t[n]}):Object.assign(r,{[n]:t[n]})})),r}function j(e){return e&&"object"==typeof e&&!Array.isArray(e)}class InternalRDFSerializer extends t.Serializer{constructor(){super(...arguments),this.serializationStrategy=new Map([[Number,this.serializeLiteral.bind(this)],[String,this.serializeLiteral.bind(this)],[Boolean,this.serializeLiteral.bind(this)],[Date,this.serializeDate.bind(this)],[Array,this.serializeArray.bind(this)],[Map,this.serializeMap.bind(this)],[Set,this.serializeSet.bind(this)]])}convertSingleValue(e,t,r,n,i){if(this.retrievePreserveNull(n)&&null===e)return null;if(null==e)return;if(n&&n.options&&n.options.rdf&&n.options.rdf.serializer)return n.options.rdf.serializer(e);const o=this.serializationStrategy.get(t.ctor);if(void 0!==o)return o(e,t,r,this,n,i);if("object"==typeof e)return this.serializeObject(e,t,r,this,n,i);let s=`Could not serialize '${r}'; don't know how to serialize type`;t.hasFriendlyName()&&(s+=` '${t.ctor.name}'`),this.errorHandler(new TypeError(`${s}.`))}serializeObject(e,r,n,i,o,s){let a;const u=t.DataSerializer.getRootMetadata(e.constructor);a=e.constructor!==r.ctor&&e instanceof r.ctor?t.DataSerializer.getMetadata(e.constructor):t.DataSerializer.getMetadata(r.ctor);const l=a.options&&a.options.rdf?a.options.rdf:u.options&&u.options.rdf?u.options.rdf:void 0;if(!l)return;const f=Array.from(a.dataMembers.values()).filter((e=>e&&e.options&&e.options.rdf&&e.options.rdf.identifier))[0];let c;if(f){const t=f.options.rdf;c=t.serializer?t.serializer(e[f.key],e.constructor):e[f.key]}c=c&&!c.startsWith("http")&&s.rdf.baseUri?s.rdf.baseUri+c:y.blankNode(c).value;let h={value:c,predicates:l.predicates?Object.entries(l.predicates).map((([e,t])=>({[e]:t.map(y.namedNode)}))).reduce(((e,t)=>Object.assign(Object.assign({},e),t))):{}};return l.serializer&&(h=E(h,l.serializer(e,s.rdf.baseUri))),h.termType=h.value.startsWith("http")?"NamedNode":"BlankNode",a.dataMembers.forEach((t=>{const r=u.dataMembers.get(t.key),n=t.options&&t.options.rdf?t:r&&r.options&&r.options.rdf?r:void 0;if(!n||!n.options.rdf.predicate)return;const o=i.convertSingleValue(e[n.key],n.type(),`${n.name}`,n,s);if(o){const e=n.options.rdf.predicate;[...Array.isArray(e)?e:[e]].forEach((e=>{const t=h.predicates[e]||[];t.push(...(Array.isArray(o)?o:[o]).filter((e=>e))),h.predicates[e]=t}))}})),h}serializeArray(e,t,r,n,i,o){return e.map((e=>this.convertSingleValue(e,t.elementType,r,i,o)))}serializeMap(e,t,r,n,i,o){return Array.from(e.values()).map((e=>this.convertSingleValue(e,t.valueType,r,i,o)))}serializeSet(e,t,r,n,i,o){return Array.from(e.values()).map((e=>this.convertSingleValue(e,t.valueType,r,i,o)))}serializeLiteral(e,t,r,n,i){var o;let s;const a=i.options.rdf;if(a&&a.datatype)switch(s=a.datatype,a.datatype){case S.date:case S.dateTime:return this.serializeDate(e,t,r,n,i)}else switch(typeof e){case"bigint":case"number":s=S.decimal;break;case"boolean":s=S.boolean;break;default:s=S.string}const u=this.iriToNode(s);return y.literal(e,a&&null!==(o=a.language)&&void 0!==o?o:u)}serializeDate(e,t,r,n,i){var o;const s=i.options.rdf,a=S.dateTime,u=new Date(e).toISOString(),l=this.iriToNode(a);return y.literal(u,s&&null!==(o=s.language)&&void 0!==o?o:l)}iriToNode(e){return y.namedNode(e)}}const R="http://www.w3.org/1999/02/22-rdf-syntax-ns#type",T="http://www.w3.org/1999/02/22-rdf-syntax-ns#subject",O="http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate",x="http://www.w3.org/1999/02/22-rdf-syntax-ns#object",L="http://www.w3.org/1999/02/22-rdf-syntax-ns#value",k="http://www.w3.org/1999/02/22-rdf-syntax-ns#first",I="http://www.w3.org/1999/02/22-rdf-syntax-ns#rest",B="http://www.w3.org/1999/02/22-rdf-syntax-ns#language",A="http://www.w3.org/1999/02/22-rdf-syntax-ns#direction",M="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property",N="http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement",P="http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag",C="http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq",D="http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt",U="http://www.w3.org/1999/02/22-rdf-syntax-ns#List",$="http://www.w3.org/1999/02/22-rdf-syntax-ns#CompoundLiteral",z="http://www.w3.org/1999/02/22-rdf-syntax-ns#HTML",q="http://www.w3.org/1999/02/22-rdf-syntax-ns#langString",F="http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral",Q="http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral",W="http://www.w3.org/1999/02/22-rdf-syntax-ns#JSON",G="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil",H=e;class InternalRDFDeserializer extends t.Deserializer{constructor(){super(...arguments),this.deserializationStrategy=new Map([[Number,this.deserializeLiteral.bind(this)],[String,this.deserializeLiteral.bind(this)],[Boolean,this.deserializeLiteral.bind(this)],[Date,this.deserializeLiteral.bind(this)],[Array,this.deserializeArray.bind(this)],[Map,this.deserializeMap.bind(this)],[Set,this.deserializeSet.bind(this)]])}rdfTypeResolver(e,t,r){if(void 0!==e.predicates){const n=Object.entries(e.predicates).filter((([e,t])=>e===H.type)).map((([e,t])=>t)).flat().map((e=>e.value)).map((e=>r.get(e))).flat().map((e=>t.get(e)));return n[0]}return Object}convertSingleValue(e,t,r,n="object",i,o){if(this.retrievePreserveNull(i)&&null===e)return null;if(null==e)return;const s=this.deserializationStrategy.get(t.ctor);if(void 0!==s)return s(e,t,r,n,this,i,o);if("object"==typeof e)return this.deserializeObject(e,t,r,n,this,o);let a=`Could not deserialize '${n}'; don't know how to deserialize type`;t.hasFriendlyName()&&(a+=` '${t.ctor.name}'`),this.errorHandler(new TypeError(`${a}.`))}deserializeObject(e,r,n,i,o,s){const a=r.ctor,u=this.rdfTypeResolver(e,n,s.rdf.knownTypes)||a,l=t.DataSerializer.getMetadata(u),f=t.DataSerializer.getRootMetadata(u);if(!l&&!f)return;const c=l.options&&l.options.rdf?l.options.rdf:f.options&&f.options.rdf?f.options.rdf:void 0;if(!c)return;const h=c.deserializer?c.deserializer(e):this.instantiateType(u),d=Array.from(l.dataMembers.values()).filter((e=>e&&e.options&&e.options.rdf&&e.options.rdf.identifier))[0];if(d){const t=d.options.rdf;h[d.key]=t.deserializer?t.deserializer(e,u):e.value}return l.dataMembers.forEach((t=>{const r=f.dataMembers.get(t.key),i=t.options&&t.options.rdf?t:r&&r.options&&r.options.rdf?r:void 0;if(!i||!i.options.rdf.predicate)return;const a=i.options.rdf.predicate;[...Array.isArray(a)?a:[a]].forEach((t=>{e.predicates[t]&&(i.type().ctor===Array?h[i.key]=o.convertSingleValue(e.predicates[t],i.type(),n,i.name,i,s):h[i.key]=e.predicates[t].map((e=>o.convertSingleValue(e,i.type(),n,i.name,i,s))).filter((e=>this.isInstanceOf(e,i.type().ctor)))[0])}))})),h}deserializeLiteral(e,t,r,n,i,o,s){return e.datatype.value===S.dateTime?new Date(e.value).getTime():e.value}deserializeDate(e,t,r,n,i,o,s){return new Date(e.value)}deserializeArray(e,t,r,n,i,o,s){return e?e.map((e=>i.convertSingleValue(e,t.elementType,r,n,o,s))).filter((e=>this.isInstanceOf(e,t.elementType.ctor))):[]}isInstanceOf(e,t){return"number"==typeof e?t===Number:"string"==typeof e?t===String:"boolean"==typeof e?t===Boolean:"object"==typeof e&&e instanceof t}deserializeMap(e,t,r,n,i,o,s){}deserializeSet(e,t,r,n,i,o,s){}}var V=n(473);class N3Store{constructor(e,t){this._size=0,this._graphs=Object.create(null),this._id=0,this._ids=Object.create(null),this._ids["><"]=0,this._entities=Object.create(null),this._blankNodeIndex=0,t||!e||e[0]||(t=e,e=null),t=t||{},this._factory=t.factory||y,e&&this.addQuads(e)}get size(){let e=this._size;if(null!==e)return e;e=0;const t=this._graphs;let r,n;for(const i in t)for(const o in r=t[i].subjects)for(const t in n=r[o])e+=Object.keys(n[t]).length;return this._size=e}_addToIndex(e,t,r,n){const i=e[t]||(e[t]={}),o=i[r]||(i[r]={}),s=n in o;return s||(o[n]=null),!s}_removeFromIndex(e,t,r,n){const i=e[t],o=i[r];delete o[n];for(const e in o)return;delete i[r];for(const e in i)return;delete e[t]}*_findInIndex(e,t,r,n,i,o,s,a){let u,l,f;const c=!t+!r+!n>1?Object.keys(this._ids):this._entities,h=b(a,this._factory);t&&((u=e,e={})[t]=u[t]);for(const t in e){const a=c[t];if(l=e[t]){r&&((u=l,l={})[r]=u[r]);for(const e in l){const t=c[e];if(f=l[e]){const e=n?n in f?[n]:[]:Object.keys(f);for(let r=0;r<e.length;r++){const n={subject:null,predicate:null,object:null};n[i]=b(a,this._factory),n[o]=b(t,this._factory),n[s]=b(c[e[r]],this._factory),yield this._factory.quad(n.subject,n.predicate,n.object,h)}}}}}}_loop(e,t){for(const r in e)t(r)}_loopByKey0(e,t,r){let n,i;if(n=e[t])for(i in n)r(i)}_loopByKey1(e,t,r){let n,i;for(n in e)i=e[n],i[t]&&r(n)}_loopBy2Keys(e,t,r,n){let i,o,s;if((i=e[t])&&(o=i[r]))for(s in o)n(s)}_countInIndex(e,t,r,n){let i,o,s,a=0;t&&((i=e,e={})[t]=i[t]);for(const t in e)if(o=e[t]){r&&((i=o,o={})[r]=i[r]);for(const e in o)(s=o[e])&&(n?n in s&&a++:a+=Object.keys(s).length)}return a}_getGraphs(e){if(!K(e))return this._graphs;const t={};return t[e]=this._graphs[e],t}_uniqueEntities(e){const t=Object.create(null);return r=>{r in t||(t[r]=!0,e(b(this._entities[r],this._factory)))}}add(e){return this.addQuad(e),this}addQuad(e,t,r,n){t||(n=e.graph,r=e.object,t=e.predicate,e=e.subject),e=w(e),t=w(t),r=w(r),n=w(n);let i=this._graphs[n];i||(i=this._graphs[n]={subjects:{},predicates:{},objects:{}},Object.freeze(i));const o=this._ids,s=this._entities;e=o[e]||(o[s[++this._id]=e]=this._id),t=o[t]||(o[s[++this._id]=t]=this._id),r=o[r]||(o[s[++this._id]=r]=this._id);const a=this._addToIndex(i.subjects,e,t,r);return this._addToIndex(i.predicates,t,r,e),this._addToIndex(i.objects,r,e,t),this._size=null,a}addQuads(e){for(let t=0;t<e.length;t++)this.addQuad(e[t])}delete(e){return this.removeQuad(e),this}has(e,t,r,n){return e&&e.subject&&({subject:e,predicate:t,object:r,graph:n}=e),!this.readQuads(e,t,r,n).next().done}import(e){return e.on("data",(e=>{this.addQuad(e)})),e}removeQuad(e,t,r,n){t||(n=e.graph,r=e.object,t=e.predicate,e=e.subject),e=w(e),t=w(t),r=w(r),n=w(n);const i=this._ids,o=this._graphs;let s,a,u;if(!((e=i[e])&&(t=i[t])&&(r=i[r])&&(s=o[n])&&(a=s.subjects[e])&&(u=a[t])&&r in u))return!1;for(e in this._removeFromIndex(s.subjects,e,t,r),this._removeFromIndex(s.predicates,t,r,e),this._removeFromIndex(s.objects,r,e,t),null!==this._size&&this._size--,s.subjects)return!0;return delete o[n],!0}removeQuads(e){for(let t=0;t<e.length;t++)this.removeQuad(e[t])}remove(e){return e.on("data",(e=>{this.removeQuad(e)})),e}removeMatches(e,t,r,n){const i=new V.Readable({objectMode:!0});return i._read=()=>{for(const o of this.readQuads(e,t,r,n))i.push(o);i.push(null)},this.remove(i)}deleteGraph(e){return this.removeMatches(null,null,null,e)}getQuads(e,t,r,n){return[...this.readQuads(e,t,r,n)]}*readQuads(e,t,r,n){e=e&&w(e),t=t&&w(t),r=r&&w(r),n=n&&w(n);const i=this._getGraphs(n),o=this._ids;let s,a,u,l;if(!(K(e)&&!(a=o[e])||K(t)&&!(u=o[t])||K(r)&&!(l=o[r])))for(const e in i)(s=i[e])&&(a?l?yield*this._findInIndex(s.objects,l,a,u,"object","subject","predicate",e,null,!0):yield*this._findInIndex(s.subjects,a,u,null,"subject","predicate","object",e,null,!0):u?yield*this._findInIndex(s.predicates,u,l,null,"predicate","object","subject",e,null,!0):l?yield*this._findInIndex(s.objects,l,null,null,"object","subject","predicate",e,null,!0):yield*this._findInIndex(s.subjects,null,null,null,"subject","predicate","object",e,null,!0))}match(e,t,r,n){return new DatasetCoreAndReadableStream(this,e,t,r,n)}countQuads(e,t,r,n){e=e&&w(e),t=t&&w(t),r=r&&w(r),n=n&&w(n);const i=this._getGraphs(n),o=this._ids;let s,a,u,l,f=0;if(K(e)&&!(a=o[e])||K(t)&&!(u=o[t])||K(r)&&!(l=o[r]))return 0;for(const n in i)(s=i[n])&&(f+=e?r?this._countInIndex(s.objects,l,a,u):this._countInIndex(s.subjects,a,u,l):t?this._countInIndex(s.predicates,u,l,a):this._countInIndex(s.objects,l,a,u));return f}forEach(e,t,r,n,i){this.some((t=>(e(t),!1)),t,r,n,i)}every(e,t,r,n,i){let o=!1;const s=!this.some((t=>(o=!0,!e(t))),t,r,n,i);return o&&s}some(e,t,r,n,i){for(const o of this.readQuads(t,r,n,i))if(e(o))return!0;return!1}getSubjects(e,t,r){const n=[];return this.forSubjects((e=>{n.push(e)}),e,t,r),n}forSubjects(e,t,r,n){t=t&&w(t),r=r&&w(r),n=n&&w(n);const i=this._ids,o=this._getGraphs(n);let s,a,u;if(e=this._uniqueEntities(e),!(K(t)&&!(a=i[t])||K(r)&&!(u=i[r])))for(n in o)(s=o[n])&&(a?u?this._loopBy2Keys(s.predicates,a,u,e):this._loopByKey1(s.subjects,a,e):u?this._loopByKey0(s.objects,u,e):this._loop(s.subjects,e))}getPredicates(e,t,r){const n=[];return this.forPredicates((e=>{n.push(e)}),e,t,r),n}forPredicates(e,t,r,n){t=t&&w(t),r=r&&w(r),n=n&&w(n);const i=this._ids,o=this._getGraphs(n);let s,a,u;if(e=this._uniqueEntities(e),!(K(t)&&!(a=i[t])||K(r)&&!(u=i[r])))for(n in o)(s=o[n])&&(a?u?this._loopBy2Keys(s.objects,u,a,e):this._loopByKey0(s.subjects,a,e):u?this._loopByKey1(s.predicates,u,e):this._loop(s.predicates,e))}getObjects(e,t,r){const n=[];return this.forObjects((e=>{n.push(e)}),e,t,r),n}forObjects(e,t,r,n){t=t&&w(t),r=r&&w(r),n=n&&w(n);const i=this._ids,o=this._getGraphs(n);let s,a,u;if(e=this._uniqueEntities(e),!(K(t)&&!(a=i[t])||K(r)&&!(u=i[r])))for(n in o)(s=o[n])&&(a?u?this._loopBy2Keys(s.subjects,a,u,e):this._loopByKey1(s.objects,a,e):u?this._loopByKey0(s.predicates,u,e):this._loop(s.objects,e))}getGraphs(e,t,r){const n=[];return this.forGraphs((e=>{n.push(e)}),e,t,r),n}forGraphs(e,t,r,n){for(const i in this._graphs)this.some((t=>(e(t.graph),!0)),t,r,n,i)}createBlankNode(e){let t,r;if(e)for(t=e=`_:${e}`,r=1;this._ids[t];)t=e+r++;else do{t="_:b"+this._blankNodeIndex++}while(this._ids[t]);return this._ids[t]=++this._id,this._entities[this._id]=t,this._factory.blankNode(t.substr(2))}extractLists({remove:e=!1,ignoreErrors:t=!1}={}){const r={},n=t?()=>!0:(e,t)=>{throw new Error(`${e.value} ${t}`)},i=this.getQuads(null,a.rdf.rest,a.rdf.nil,null),o=e?[...i]:[];return i.forEach((t=>{const i=[];let s,u,l=!1;const f=t.graph;let c=t.subject;for(;c&&!l;){const e=this.getQuads(null,null,c,null),t=this.getQuads(c,null,null,null);let r,h=null,d=null,p=null;for(let i=0;i<t.length&&!l;i++)r=t[i],r.graph.equals(f)?s?l=n(c,"has non-list arcs out"):r.predicate.value===a.rdf.first?h?l=n(c,"has multiple rdf:first arcs"):o.push(h=r):r.predicate.value===a.rdf.rest?d?l=n(c,"has multiple rdf:rest arcs"):o.push(d=r):e.length?l=n(c,"can't be subject and object"):(s=r,u="subject"):l=n(c,"not confined to single graph");for(let t=0;t<e.length&&!l;++t)r=e[t],s?l=n(c,"can't have coreferences"):r.predicate.value===a.rdf.rest?p?l=n(c,"has incoming rdf:rest arcs"):p=r:(s=r,u="object");h?i.unshift(h.object):l=n(c,"has no list head"),c=p&&p.subject}l?e=!1:s&&(r[s[u].value]=i)})),e&&this.removeQuads(o),r}*[Symbol.iterator](){yield*this.readQuads()}}function K(e){return"string"==typeof e||e instanceof String}class DatasetCoreAndReadableStream extends V.Readable{constructor(e,t,r,n,i){super({objectMode:!0}),Object.assign(this,{n3Store:e,subject:t,predicate:r,object:n,graph:i})}get filtered(){if(!this._filtered){const{n3Store:e,graph:t,object:r,predicate:n,subject:i}=this,o=e.getQuads(i,n,r,t);this._filtered=new N3Store(o,{factory:e._factory})}return this._filtered}get size(){return this.filtered.size}_read(){for(const e of this)this.push(e);this.push(null)}add(e){return this.filtered.add(e)}delete(e){return this.filtered.delete(e)}has(e){return this.filtered.has(e)}match(e,t,r,n){return new DatasetCoreAndReadableStream(this.filtered,e,t,r,n)}*[Symbol.iterator](){yield*this._filtered||this.n3Store.readQuads(this.subject,this.predicate,this.object,this.graph)}}const X=y.defaultGraph(),{rdf:Y,xsd:J}=a,Z=/["\\\t\n\r\b\f\u0000-\u0019\ud800-\udbff]/,ee=/["\\\t\n\r\b\f\u0000-\u0019]|[\ud800-\udbff][\udc00-\udfff]/g,te={"\\":"\\\\",'"':'\\"',"\t":"\\t","\n":"\\n","\r":"\\r","\b":"\\b","\f":"\\f"};class SerializedTerm extends Term{equals(){return!1}}class N3Writer{constructor(e,t){if(this._prefixRegex=/$0^/,e&&"function"!=typeof e.write&&(t=e,e=null),t=t||{},this._lists=t.lists,e)this._outputStream=e,this._endStream=void 0===t.end||!!t.end;else{let e="";this._outputStream={write(t,r,n){e+=t,n&&n()},end:t=>{t&&t(null,e)}},this._endStream=!0}this._subject=null,/triple|quad/i.test(t.format)?(this._lineMode=!0,this._writeQuad=this._writeQuadLine):(this._lineMode=!1,this._graph=X,this._prefixIRIs=Object.create(null),t.prefixes&&this.addPrefixes(t.prefixes),t.baseIRI&&(this._baseMatcher=new RegExp(`^${ne(t.baseIRI)}${t.baseIRI.endsWith("/")?"":"[#?]"}`),this._baseLength=t.baseIRI.length))}get _inDefaultGraph(){return X.equals(this._graph)}_write(e,t){this._outputStream.write(e,"utf8",t)}_writeQuad(e,t,r,n,i){try{n.equals(this._graph)||(this._write((null===this._subject?"":this._inDefaultGraph?".\n":"\n}\n")+(X.equals(n)?"":`${this._encodeIriOrBlank(n)} {\n`)),this._graph=n,this._subject=null),e.equals(this._subject)?t.equals(this._predicate)?this._write(`, ${this._encodeObject(r)}`,i):this._write(`;\n ${this._encodePredicate(this._predicate=t)} ${this._encodeObject(r)}`,i):this._write(`${(null===this._subject?"":".\n")+this._encodeSubject(this._subject=e)} ${this._encodePredicate(this._predicate=t)} ${this._encodeObject(r)}`,i)}catch(e){i&&i(e)}}_writeQuadLine(e,t,r,n,i){delete this._prefixMatch,this._write(this.quadToString(e,t,r,n),i)}quadToString(e,t,r,n){return`${this._encodeSubject(e)} ${this._encodeIriOrBlank(t)} ${this._encodeObject(r)}${n&&n.value?` ${this._encodeIriOrBlank(n)} .\n`:" .\n"}`}quadsToString(e){return e.map((e=>this.quadToString(e.subject,e.predicate,e.object,e.graph))).join("")}_encodeSubject(e){return"Quad"===e.termType?this._encodeQuad(e):this._encodeIriOrBlank(e)}_encodeIriOrBlank(e){if("NamedNode"!==e.termType)return this._lists&&e.value in this._lists&&(e=this.list(this._lists[e.value])),"id"in e?e.id:`_:${e.value}`;let t=e.value;this._baseMatcher&&this._baseMatcher.test(t)&&(t=t.substr(this._baseLength)),Z.test(t)&&(t=t.replace(ee,re));const r=this._prefixRegex.exec(t);return r?r[1]?this._prefixIRIs[r[1]]+r[2]:t:`<${t}>`}_encodeLiteral(e){let t=e.value;if(Z.test(t)&&(t=t.replace(ee,re)),e.language)return`"${t}"@${e.language}`;if(this._lineMode){if(e.datatype.value===J.string)return`"${t}"`}else switch(e.datatype.value){case J.string:return`"${t}"`;case J.boolean:if("true"===t||"false"===t)return t;break;case J.integer:if(/^[+-]?\d+$/.test(t))return t;break;case J.decimal:if(/^[+-]?\d*\.\d+$/.test(t))return t;break;case J.double:if(/^[+-]?(?:\d+\.\d*|\.?\d+)[eE][+-]?\d+$/.test(t))return t}return`"${t}"^^${this._encodeIriOrBlank(e.datatype)}`}_encodePredicate(e){return e.value===Y.type?"a":this._encodeIriOrBlank(e)}_encodeObject(e){switch(e.termType){case"Quad":return this._encodeQuad(e);case"Literal":return this._encodeLiteral(e);default:return this._encodeIriOrBlank(e)}}_encodeQuad({subject:e,predicate:t,object:r,graph:n}){return`<<${this._encodeSubject(e)} ${this._encodePredicate(t)} ${this._encodeObject(r)}${u(n)?"":` ${this._encodeIriOrBlank(n)}`}>>`}_blockedWrite(){throw new Error("Cannot write because the writer has been closed.")}addQuad(e,t,r,n,i){void 0===r?this._writeQuad(e.subject,e.predicate,e.object,e.graph,t):"function"==typeof n?this._writeQuad(e,t,r,X,n):this._writeQuad(e,t,r,n||X,i)}addQuads(e){for(let t=0;t<e.length;t++)this.addQuad(e[t])}addPrefix(e,t,r){const n={};n[e]=t,this.addPrefixes(n,r)}addPrefixes(e,t){if(!this._prefixIRIs)return t&&t();let r=!1;for(let t in e){let n=e[t];"string"!=typeof n&&(n=n.value),r=!0,null!==this._subject&&(this._write(this._inDefaultGraph?".\n":"\n}\n"),this._subject=null,this._graph=""),this._prefixIRIs[n]=t+=":",this._write(`@prefix ${t} <${n}>.\n`)}if(r){let e="",t="";for(const r in this._prefixIRIs)e+=e?`|${r}`:r,t+=(t?"|":"")+this._prefixIRIs[r];e=ne(e),this._prefixRegex=new RegExp(`^(?:${t})[^/]*$|^(${e})([a-zA-Z][\\-_a-zA-Z0-9]*)$`)}this._write(r?"\n":"",t)}blank(e,t){let r,n,i=e;switch(void 0===e?i=[]:e.termType?i=[{predicate:e,object:t}]:"length"in e||(i=[e]),n=i.length){case 0:return new SerializedTerm("[]");case 1:if(r=i[0],!(r.object instanceof SerializedTerm))return new SerializedTerm(`[ ${this._encodePredicate(r.predicate)} ${this._encodeObject(r.object)} ]`);default:let t="[";for(let o=0;o<n;o++)r=i[o],r.predicate.equals(e)?t+=`, ${this._encodeObject(r.object)}`:(t+=`${(o?";\n ":"\n ")+this._encodePredicate(r.predicate)} ${this._encodeObject(r.object)}`,e=r.predicate);return new SerializedTerm(`${t}\n]`)}}list(e){const t=e&&e.length||0,r=new Array(t);for(let n=0;n<t;n++)r[n]=this._encodeObject(e[n]);return new SerializedTerm(`(${r.join(" ")})`)}end(e){null!==this._subject&&(this._write(this._inDefaultGraph?".\n":"\n}\n"),this._subject=null),this._write=this._blockedWrite;let t=e&&((r,n)=>{t=null,e(r,n)});if(this._endStream)try{return this._outputStream.end(t)}catch(e){}t&&t()}}function re(e){let t=te[e];return void 0===t&&(1===e.length?(t=e.charCodeAt(0).toString(16),t="\\u0000".substr(0,6-t.length)+t):(t=(1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)+9216).toString(16),t="\\U00000000".substr(0,10-t.length)+t)),t}function ne(e){return e.replace(/[\]\/\(\)\*\+\?\.\\\$]/g,"\\$&")}const ie={geo:"http://www.w3.org/2003/01/geo/wgs84_pos#",schema:"http://schema.org/",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",vcard:"http://www.w3.org/2006/vcard/ns#",owl:"http://www.w3.org/2002/07/owl#",time:"http://www.w3.org/2006/time#",dcterms:"http://purl.org/dc/terms/",dcmi:"http://purl.org/dc/terms/",dqm:"http://purl.org/dqm-vocabulary/v1/dqm#",foaf:"http://xmlns.com/foaf/0.1/",qudt:"http://qudt.org/schema/qudt/",qudt_unit:"http://qudt.org/vocab/unit/",quantitykind:"http://qudt.org/vocab/quantitykind/",sosa:"http://www.w3.org/ns/sosa/",ssn:"http://www.w3.org/ns/ssn/",ssns:"http://www.w3.org/ns/ssn/systems/",openhps:"http://openhps.org/terms#",ogc:"http://www.opengis.net/ont/geosparql#"};var oe,se=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):function(e){return e instanceof r?e:new r((function(t){t(e)}))}(e.value).then(s,a)}u((n=n.apply(e,t||[])).next())}))};class RDFSerializer extends t.DataSerializer{static get options(){return{serializer:new InternalRDFSerializer,deserializer:new InternalRDFDeserializer}}static registerRDFType(e){const t=this.getMetadata(e);if(!t.options||!t.options.rdf)return;const r=t.options.rdf;r.predicates&&Object.entries(r.predicates).filter((([e,t])=>e===H.type)).map((([e,t])=>t.flat())).flat().forEach((t=>{var r;const n=null!==(r=this.knownRDFTypes.get(t))&&void 0!==r?r:[];n.push(e.name),this.knownRDFTypes.set(t,n)}))}static serialize(e,t){return super.serialize(e,Object.assign({rdf:{baseUri:t}},this.options))}static deserializeFromStore(e,t){const r=function e(t,r){return{termType:t.termType,value:t.value,predicates:Object.assign({},r.getPredicates(t,null,null).map((n=>({[n.value]:r.getObjects(t,n,null).map((t=>"BlankNode"===t.constructor.name||"NamedNode"===t.constructor.name?e(t,r):t))}))).reduce(((e,t)=>Object.assign(Object.assign({},e),t)),{}))}}(e,t);return this.deserialize(r)}static serializeToQuads(e,t){const r=void 0!==e.predicates?e:this.serialize(e,t),n="BlankNode"===r.termType?y.blankNode(r.value):y.namedNode(r.value);return Object.keys(r.predicates).map((e=>{const t=y.namedNode(e);return r.predicates[e].map((e=>void 0!==e.predicates?[y.quad(n,t,e),...this.serializeToQuads(e)]:[y.quad(n,t,e)]))})).flat().flat()}static stringify(e,t={}){return se(this,void 0,void 0,(function*(){return new Promise(((r,n)=>{const i=this.serializeToQuads(e,t.baseUri),o=new N3Store(i),s=Object.assign({xsd:"http://www.w3.org/2001/XMLSchema#"},ie),a=Object.keys(s).map((e=>({[s[e]]:e}))).reduce(((e,t)=>Object.assign(Object.assign({},e),t))),u={};i.map((e=>{[e.subject.value,e.predicate.value,"NamedNode"===e.object.termType?e.object.termType:"Literal"===e.object.termType?e.object.datatype.value:e.object.value].map((e=>{Object.keys(a).forEach((t=>{e.includes(t)&&(u[a[t]]=t)}))}))})),t.prefixes=Object.assign(Object.assign({},u),t.prefixes);const l=new N3Writer(t);t.prettyPrint?o.getSubjects(null,null,null).forEach((e=>{"BlankNode"!==e.termType&&o.getPredicates(e,null,null).forEach((t=>{o.getObjects(e,t,null).forEach((r=>{"BlankNode"===r.termType?l.addQuad(e,t,this.writeBlankNode(l,r,o)):l.addQuad(e,t,r)}))}))})):l.addQuads(i),l.end(((e,t)=>{if(e)return n(e);r(t)}))}))}))}static writeBlankNode(e,t,r){const n=r.getPredicates(t,null,null);return e.blank(n.map((n=>r.getObjects(t,n,null).map((t=>"BlankNode"===t.termType?{predicate:n,object:this.writeBlankNode(e,t,r)}:{predicate:n,object:t})))).flat())}static deserialize(e,t){if(void 0===e.predicates)return super.deserialize(e,t);const r=new InternalRDFDeserializer,n=null!=t?t:r.rdfTypeResolver(e,this.knownTypes,this.knownRDFTypes);return n===Object?e:r.convertSingleValue(e,this.ensureTypeDescriptor(n),this.knownTypes,void 0,void 0,{rdf:{knownTypes:this.knownRDFTypes}})}static getUriMetadata(e){const r=t.DataSerializer.getMetadata(e),n=t.DataSerializer.getRootMetadata(e);if(!(r.options&&r.options.rdf?r.options.rdf:n.options&&n.options.rdf?n.options.rdf:void 0))return;return Array.from(r.dataMembers.values()).filter((e=>e&&e.options&&e.options.rdf&&e.options.rdf.identifier))[0]}static normalizeUri(e,t,r){const n=this.getUriMetadata(e);let i;if(!n)return r;{const o=n.options.rdf;i=o.serializer?o.serializer(t,e):t,i=i&&!i.startsWith("http")&&r?r+i:y.blankNode(i).value}}}oe=RDFSerializer,RDFSerializer.knownRDFTypes=new Map,oe.eventEmitter.on("updateSerializableObject",((e,t)=>{if(t&&t.rdf&&t.rdf.type){t.rdf.predicates=t.rdf.predicates||{};const e=t.rdf.predicates[H.type]||[];e.push(t.rdf.type),t.rdf.predicates[H.type]=e}})),oe.eventEmitter.on("registerType",(e=>{RDFSerializer.registerRDFType(e)}));var ae,ue=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},le=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};let fe=ae=class SerializableNamedNode extends NamedNode{constructor(e){super(e)}};fe=ae=ue([(0,t.SerializableObject)({rdf:{serializer:e=>({value:e.value}),deserializer:e=>new ae(e.value)}}),le("design:paramtypes",[String])],fe)})(),i})()}));
|
|
3
3
|
//# sourceMappingURL=openhps-rdf.serialization.min.js.map
|